@margoengine/rigging 0.1.0 → 1.0.0

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.
@@ -0,0 +1,2229 @@
1
+ import { detectSkeleton as e, humanoidBones as t } from "./retarget.js";
2
+ import { bound as n, defineSpecies as r, fitAnatomy as i, mirrorJoint as a } from "./anatomy.js";
3
+ //#region src/anatomy-data-ansur2.ts
4
+ var o = 1986, s = 4082, c = {
5
+ stature: [
6
+ 162.85,
7
+ 6.42,
8
+ 175.62,
9
+ 6.86
10
+ ],
11
+ "acromial height": [
12
+ 133.51,
13
+ 5.81,
14
+ 144.07,
15
+ 6.33
16
+ ],
17
+ "cervicale height": [
18
+ 139.57,
19
+ 5.95,
20
+ 151.73,
21
+ 6.33
22
+ ],
23
+ "chest height": [
24
+ 117.16,
25
+ 5.55,
26
+ 129.11,
27
+ 5.7
28
+ ],
29
+ "waist height (omphalion)": [
30
+ 98.01,
31
+ 5,
32
+ 105.65,
33
+ 5.22
34
+ ],
35
+ "iliocristale height": [
36
+ 99.57,
37
+ 4.97,
38
+ 106.16,
39
+ 5.2
40
+ ],
41
+ "trochanterion height": [
42
+ 84.54,
43
+ 4.47,
44
+ 90.09,
45
+ 4.92
46
+ ],
47
+ "crotch height": [
48
+ 78.23,
49
+ 4.46,
50
+ 84.59,
51
+ 4.65
52
+ ],
53
+ "lateral femoral epicondyle height": [
54
+ 46.59,
55
+ 2.71,
56
+ 49.17,
57
+ 2.66
58
+ ],
59
+ "knee height, midpatella": [
60
+ 44.9,
61
+ 2.6,
62
+ 48.84,
63
+ 2.81
64
+ ],
65
+ "tibial height": [
66
+ 43.78,
67
+ 2.5,
68
+ 46.82,
69
+ 2.66
70
+ ],
71
+ "lateral malleolus height": [
72
+ 6.27,
73
+ .51,
74
+ 7.29,
75
+ .57
76
+ ],
77
+ "shoulder-elbow length": [
78
+ 33.43,
79
+ 1.73,
80
+ 36.37,
81
+ 1.82
82
+ ],
83
+ "radiale-stylion length": [
84
+ 24.13,
85
+ 1.52,
86
+ 26.79,
87
+ 1.54
88
+ ],
89
+ "forearm-hand length": [
90
+ 43.99,
91
+ 2.34,
92
+ 48.02,
93
+ 2.33
94
+ ],
95
+ "hand length": [
96
+ 18.11,
97
+ 1.01,
98
+ 19.33,
99
+ .99
100
+ ],
101
+ "palm length": [
102
+ 10.87,
103
+ .59,
104
+ 11.65,
105
+ .62
106
+ ],
107
+ "wrist height": [
108
+ 79.42,
109
+ 3.82,
110
+ 84.75,
111
+ 4.17
112
+ ],
113
+ "acromion-radiale length": [
114
+ 31.12,
115
+ 1.72,
116
+ 33.52,
117
+ 1.75
118
+ ],
119
+ span: [
120
+ 166.03,
121
+ 8.3,
122
+ 181.42,
123
+ 8.46
124
+ ],
125
+ "biacromial breadth": [
126
+ 36.53,
127
+ 1.83,
128
+ 41.57,
129
+ 1.92
130
+ ],
131
+ "bideltoid breadth": [
132
+ 45.03,
133
+ 2.87,
134
+ 51.04,
135
+ 3.25
136
+ ],
137
+ "hip breadth": [
138
+ 35.38,
139
+ 2.67,
140
+ 34.57,
141
+ 2.42
142
+ ],
143
+ "bimalleolar breadth": [
144
+ 6.7,
145
+ .35,
146
+ 7.48,
147
+ .41
148
+ ],
149
+ "foot length": [
150
+ 24.63,
151
+ 1.24,
152
+ 27.12,
153
+ 1.31
154
+ ],
155
+ "ball of foot length": [
156
+ 18.21,
157
+ .96,
158
+ 20.09,
159
+ 1.05
160
+ ],
161
+ "foot breadth, horizontal": [
162
+ 9.27,
163
+ .48,
164
+ 10.19,
165
+ .52
166
+ ],
167
+ "heel breadth": [
168
+ 6.72,
169
+ .52,
170
+ 7.25,
171
+ .55
172
+ ],
173
+ "head length": [
174
+ 18.98,
175
+ .74,
176
+ 19.95,
177
+ .7
178
+ ],
179
+ "head breadth": [
180
+ 14.78,
181
+ .52,
182
+ 15.43,
183
+ .55
184
+ ],
185
+ "tragion-top of head": [
186
+ 12.65,
187
+ .65,
188
+ 13.11,
189
+ .62
190
+ ],
191
+ "sitting height": [
192
+ 85.66,
193
+ 3.31,
194
+ 91.83,
195
+ 3.57
196
+ ],
197
+ "eye height, sitting": [
198
+ 74.77,
199
+ 3.04,
200
+ 80.45,
201
+ 3.32
202
+ ],
203
+ "buttock-knee length": [
204
+ 59.06,
205
+ 3.26,
206
+ 61.8,
207
+ 3.06
208
+ ],
209
+ "buttock-popliteal length": [
210
+ 48.51,
211
+ 2.87,
212
+ 50.29,
213
+ 2.74
214
+ ],
215
+ "functional leg length": [
216
+ 104.43,
217
+ 5.4,
218
+ 113.02,
219
+ 5.61
220
+ ],
221
+ "weight (kg)": [
222
+ 67.76,
223
+ 10.98,
224
+ 85.52,
225
+ 14.22
226
+ ],
227
+ "biceps circumference, flexed": [
228
+ 30.56,
229
+ 3.08,
230
+ 35.81,
231
+ 3.46
232
+ ],
233
+ "forearm circumference, flexed": [
234
+ 26.41,
235
+ 1.85,
236
+ 31.01,
237
+ 2.2
238
+ ],
239
+ "wrist circumference": [
240
+ 15.48,
241
+ .78,
242
+ 17.59,
243
+ .9
244
+ ],
245
+ "thigh circumference": [
246
+ 61.61,
247
+ 5.58,
248
+ 62.51,
249
+ 5.85
250
+ ],
251
+ "lower thigh circumference": [
252
+ 40.07,
253
+ 3.52,
254
+ 40.93,
255
+ 3.19
256
+ ],
257
+ "calf circumference": [
258
+ 37.33,
259
+ 2.85,
260
+ 39.23,
261
+ 2.97
262
+ ],
263
+ "ankle circumference": [
264
+ 21.57,
265
+ 1.49,
266
+ 22.93,
267
+ 1.46
268
+ ],
269
+ "chest depth": [
270
+ 24.74,
271
+ 2.73,
272
+ 25.38,
273
+ 2.62
274
+ ],
275
+ "waist depth": [
276
+ 21.3,
277
+ 3.14,
278
+ 23.78,
279
+ 3.47
280
+ ],
281
+ "chest breadth": [
282
+ 26.93,
283
+ 1.86,
284
+ 28.94,
285
+ 1.83
286
+ ],
287
+ "waist breadth": [
288
+ 29.99,
289
+ 3.3,
290
+ 32.64,
291
+ 3.47
292
+ ]
293
+ }, ee = "packages/rigging/src/anatomy-data-ansur2.ts", te = [
294
+ "2-8",
295
+ "9-19",
296
+ "20-44",
297
+ "45-69"
298
+ ], ne = [
299
+ "hip extension",
300
+ "hip flexion",
301
+ "knee flexion",
302
+ "knee extension",
303
+ "ankle dorsiflexion",
304
+ "ankle plantar flexion",
305
+ "shoulder flexion",
306
+ "elbow flexion",
307
+ "elbow extension",
308
+ "elbow pronation",
309
+ "elbow supination"
310
+ ], l = {
311
+ female: {
312
+ "2-8": [
313
+ [
314
+ 26.2,
315
+ 23.9,
316
+ 28.5
317
+ ],
318
+ [
319
+ 140.8,
320
+ 139.2,
321
+ 142.4
322
+ ],
323
+ [
324
+ 152.6,
325
+ 151.2,
326
+ 154
327
+ ],
328
+ [
329
+ 5.4,
330
+ 3.9,
331
+ 6.9
332
+ ],
333
+ [
334
+ 24.8,
335
+ 22.5,
336
+ 27.1
337
+ ],
338
+ [
339
+ 67.1,
340
+ 64.8,
341
+ 69.4
342
+ ],
343
+ [
344
+ 178.6,
345
+ 176.9,
346
+ 180.3
347
+ ],
348
+ [
349
+ 152.9,
350
+ 151.5,
351
+ 154.3
352
+ ],
353
+ [
354
+ 6.8,
355
+ 5.2,
356
+ 8.4
357
+ ],
358
+ [
359
+ 84.6,
360
+ 82.8,
361
+ 86.4
362
+ ],
363
+ [
364
+ 93.7,
365
+ 91.4,
366
+ 96
367
+ ]
368
+ ],
369
+ "9-19": [
370
+ [
371
+ 20.5,
372
+ 18.6,
373
+ 22.4
374
+ ],
375
+ [
376
+ 134.9,
377
+ 133,
378
+ 136.8
379
+ ],
380
+ [
381
+ 142.3,
382
+ 140.8,
383
+ 143.8
384
+ ],
385
+ [
386
+ 2.4,
387
+ 1.5,
388
+ 3.3
389
+ ],
390
+ [
391
+ 17.3,
392
+ 15.6,
393
+ 19
394
+ ],
395
+ [
396
+ 57.3,
397
+ 54.8,
398
+ 59.8
399
+ ],
400
+ [
401
+ 171.8,
402
+ 169.8,
403
+ 173.8
404
+ ],
405
+ [
406
+ 149.7,
407
+ 148.5,
408
+ 150.9
409
+ ],
410
+ [
411
+ 6.4,
412
+ 4.7,
413
+ 8.1
414
+ ],
415
+ [
416
+ 81.2,
417
+ 79.6,
418
+ 82.8
419
+ ],
420
+ [
421
+ 90,
422
+ 88,
423
+ 92
424
+ ]
425
+ ],
426
+ "20-44": [
427
+ [
428
+ 18.1,
429
+ 17,
430
+ 19.2
431
+ ],
432
+ [
433
+ 133.8,
434
+ 132.5,
435
+ 135.1
436
+ ],
437
+ [
438
+ 141.9,
439
+ 140.9,
440
+ 142.9
441
+ ],
442
+ [
443
+ 1.6,
444
+ 1.1,
445
+ 2.1
446
+ ],
447
+ [
448
+ 13.8,
449
+ 12.9,
450
+ 14.7
451
+ ],
452
+ [
453
+ 62.1,
454
+ 60.6,
455
+ 63.6
456
+ ],
457
+ [
458
+ 172,
459
+ 170.9,
460
+ 173.1
461
+ ],
462
+ [
463
+ 150,
464
+ 149.1,
465
+ 150.9
466
+ ],
467
+ [
468
+ 4.7,
469
+ 3.9,
470
+ 5.5
471
+ ],
472
+ [
473
+ 82,
474
+ 81,
475
+ 83
476
+ ],
477
+ [
478
+ 90.6,
479
+ 89.2,
480
+ 92
481
+ ]
482
+ ],
483
+ "45-69": [
484
+ [
485
+ 16.7,
486
+ 15.5,
487
+ 17.9
488
+ ],
489
+ [
490
+ 130.8,
491
+ 129.2,
492
+ 132.4
493
+ ],
494
+ [
495
+ 137.8,
496
+ 136.5,
497
+ 139.1
498
+ ],
499
+ [
500
+ 1.2,
501
+ .7,
502
+ 1.7
503
+ ],
504
+ [
505
+ 11.6,
506
+ 10.6,
507
+ 12.6
508
+ ],
509
+ [
510
+ 56.5,
511
+ 55,
512
+ 58
513
+ ],
514
+ [
515
+ 168.1,
516
+ 166.7,
517
+ 169.5
518
+ ],
519
+ [
520
+ 148.3,
521
+ 147.3,
522
+ 149.3
523
+ ],
524
+ [
525
+ 3.6,
526
+ 2.6,
527
+ 4.6
528
+ ],
529
+ [
530
+ 80.8,
531
+ 79.7,
532
+ 81.9
533
+ ],
534
+ [
535
+ 87.2,
536
+ 86,
537
+ 88.4
538
+ ]
539
+ ]
540
+ },
541
+ male: {
542
+ "2-8": [
543
+ [
544
+ 28.3,
545
+ 27.2,
546
+ 29.4
547
+ ],
548
+ [
549
+ 131.1,
550
+ 129.4,
551
+ 132.8
552
+ ],
553
+ [
554
+ 147.8,
555
+ 146.6,
556
+ 149
557
+ ],
558
+ [
559
+ 1.6,
560
+ .9,
561
+ 2.3
562
+ ],
563
+ [
564
+ 22.8,
565
+ 21.3,
566
+ 24.3
567
+ ],
568
+ [
569
+ 55.8,
570
+ 54.4,
571
+ 57.2
572
+ ],
573
+ [
574
+ 177.8,
575
+ 176.7,
576
+ 178.9
577
+ ],
578
+ [
579
+ 151.4,
580
+ 150.8,
581
+ 152
582
+ ],
583
+ [
584
+ 2.2,
585
+ .9,
586
+ 3.5
587
+ ],
588
+ [
589
+ 79.6,
590
+ 78.8,
591
+ 80.4
592
+ ],
593
+ [
594
+ 86.4,
595
+ 85.3,
596
+ 87.5
597
+ ]
598
+ ],
599
+ "9-19": [
600
+ [
601
+ 18.2,
602
+ 16.6,
603
+ 19.8
604
+ ],
605
+ [
606
+ 135.2,
607
+ 133,
608
+ 137.4
609
+ ],
610
+ [
611
+ 142.2,
612
+ 140.4,
613
+ 144
614
+ ],
615
+ [
616
+ 1.8,
617
+ .9,
618
+ 2.7
619
+ ],
620
+ [
621
+ 16.3,
622
+ 14.9,
623
+ 17.7
624
+ ],
625
+ [
626
+ 52.8,
627
+ 50.8,
628
+ 54.8
629
+ ],
630
+ [
631
+ 170.9,
632
+ 169.1,
633
+ 172.7
634
+ ],
635
+ [
636
+ 148.3,
637
+ 146.8,
638
+ 149.8
639
+ ],
640
+ [
641
+ 5.3,
642
+ 3.6,
643
+ 7
644
+ ],
645
+ [
646
+ 79.8,
647
+ 77.8,
648
+ 81.8
649
+ ],
650
+ [
651
+ 87.8,
652
+ 85.7,
653
+ 89.9
654
+ ]
655
+ ],
656
+ "20-44": [
657
+ [
658
+ 17.4,
659
+ 16.3,
660
+ 18.5
661
+ ],
662
+ [
663
+ 130.4,
664
+ 129,
665
+ 131.8
666
+ ],
667
+ [
668
+ 137.7,
669
+ 136.5,
670
+ 138.9
671
+ ],
672
+ [
673
+ 1,
674
+ .6,
675
+ 1.4
676
+ ],
677
+ [
678
+ 12.7,
679
+ 11.6,
680
+ 13.8
681
+ ],
682
+ [
683
+ 54.6,
684
+ 53.2,
685
+ 56
686
+ ],
687
+ [
688
+ 168.8,
689
+ 167.3,
690
+ 170.3
691
+ ],
692
+ [
693
+ 144.6,
694
+ 143.6,
695
+ 145.6
696
+ ],
697
+ [
698
+ .8,
699
+ .1,
700
+ 1.5
701
+ ],
702
+ [
703
+ 76.9,
704
+ 75.6,
705
+ 78.2
706
+ ],
707
+ [
708
+ 85,
709
+ 83.8,
710
+ 86.2
711
+ ]
712
+ ],
713
+ "45-69": [
714
+ [
715
+ 13.5,
716
+ 12.5,
717
+ 14.5
718
+ ],
719
+ [
720
+ 127.2,
721
+ 125.7,
722
+ 128.7
723
+ ],
724
+ [
725
+ 132.9,
726
+ 131.6,
727
+ 134.2
728
+ ],
729
+ [
730
+ .5,
731
+ .1,
732
+ .9
733
+ ],
734
+ [
735
+ 11.9,
736
+ 10.9,
737
+ 12.9
738
+ ],
739
+ [
740
+ 49.4,
741
+ 47.7,
742
+ 51.1
743
+ ],
744
+ [
745
+ 164,
746
+ 162.3,
747
+ 165.7
748
+ ],
749
+ [
750
+ 143.5,
751
+ 142.3,
752
+ 144.7
753
+ ],
754
+ [
755
+ -.7,
756
+ -1.5,
757
+ .1
758
+ ],
759
+ [
760
+ 77.7,
761
+ 76.5,
762
+ 78.9
763
+ ],
764
+ [
765
+ 82.4,
766
+ 80.9,
767
+ 83.9
768
+ ]
769
+ ]
770
+ }
771
+ }, re = "packages/rigging/src/anatomy-data-cdc.ts";
772
+ function ie(e, t, n) {
773
+ return l[e][t][ne.indexOf(n)][0];
774
+ }
775
+ //#endregion
776
+ //#region src/anatomy-data-deleva.ts
777
+ var ae = {
778
+ head: {
779
+ from: "vertex",
780
+ to: "mid gonion",
781
+ mass: [6.68, 6.94],
782
+ centre: [58.94, 59.76]
783
+ },
784
+ trunk: {
785
+ from: "suprasternale",
786
+ to: "mid hip",
787
+ mass: [42.57, 43.46],
788
+ centre: [41.51, 44.86]
789
+ },
790
+ upperTrunk: {
791
+ from: "suprasternale",
792
+ to: "xiphion",
793
+ mass: [15.45, 15.96],
794
+ centre: [20.77, 29.99]
795
+ },
796
+ middleTrunk: {
797
+ from: "xiphion",
798
+ to: "omphalion",
799
+ mass: [14.65, 16.33],
800
+ centre: [45.12, 45.02]
801
+ },
802
+ lowerTrunk: {
803
+ from: "omphalion",
804
+ to: "mid hip",
805
+ mass: [12.47, 11.17],
806
+ centre: [49.2, 61.15]
807
+ },
808
+ upperArm: {
809
+ from: "shoulder joint centre",
810
+ to: "elbow joint centre",
811
+ mass: [2.55, 2.71],
812
+ centre: [57.54, 57.72]
813
+ },
814
+ forearm: {
815
+ from: "elbow joint centre",
816
+ to: "wrist joint centre",
817
+ mass: [1.38, 1.62],
818
+ centre: [45.59, 45.74]
819
+ },
820
+ hand: {
821
+ from: "wrist joint centre",
822
+ to: "third metacarpale",
823
+ mass: [.56, .61],
824
+ centre: [74.74, 79]
825
+ },
826
+ thigh: {
827
+ from: "hip joint centre",
828
+ to: "knee joint centre",
829
+ mass: [14.78, 14.16],
830
+ centre: [36.12, 40.95]
831
+ },
832
+ shank: {
833
+ from: "knee joint centre",
834
+ to: "ankle",
835
+ mass: [4.81, 4.33],
836
+ centre: [44.16, 44.59]
837
+ },
838
+ foot: {
839
+ from: "heel",
840
+ to: "toe tip",
841
+ mass: [1.29, 1.37],
842
+ centre: [40.14, 44.15]
843
+ }
844
+ }, oe = "packages/rigging/src/anatomy-data-deleva.ts", u = "https://cdn-links.lww.com/permalink/prsgo/b/prsgo_8_6_2020_04_17_hendriks_gox-d-20-00155r2_sdc1.pdf", d = "https://theotbench.com/rom/", se = "https://goniometer.io/range-of-motion", ce = "https://workcompce.com/wp-content/uploads/2014/06/Guides_2014.pdf", f = "https://www.dshs.wa.gov/sites/default/files/FORMS/pdf/13-585a.pdf", p = "https://pages.uoregon.edu/biomech/obl/articles/2001_mcclure_jses2001.pdf", m = "https://europepmc.org/article/MED/", le = "https://pmc.ncbi.nlm.nih.gov/articles/PMC3699246/table/TB04006-3/", ue = "https://musculoskeletalkey.com/of-the-spine/", h = "https://pubmed.ncbi.nlm.nih.gov/", de = "https://courses.grainger.illinois.edu/me481/sp2021/Anthro-Winter.pdf", g = "https://pmc.ncbi.nlm.nih.gov/articles/PMC2657311/", _ = "https://pmc.ncbi.nlm.nih.gov/articles/PMC4553277/", fe = {
845
+ hanim: {
846
+ cite: "ISO/IEC 19774-1:2019, Information technology, Computer graphics, image processing and environmental data representation, Humanoid animation (HAnim), Part 1: Architecture",
847
+ url: "https://www.web3d.org/documents/specifications/19774/V2.0/Architecture/concepts.html"
848
+ },
849
+ isb2002: {
850
+ cite: "Wu G et al. 2002, ISB recommendation on definitions of joint coordinate system of various joints for the reporting of human joint motion, part I: ankle, hip, and spine, J Biomech 35(4):543-548",
851
+ url: "https://doi.org/10.1016/S0021-9290(01)00222-6"
852
+ },
853
+ isb2005: {
854
+ cite: "Wu G et al. 2005, ISB recommendation on definitions of joint coordinate systems of various joints for the reporting of human joint motion, part II: shoulder, elbow, wrist and hand, J Biomech 38(5):981-992",
855
+ url: "https://doi.org/10.1016/j.jbiomech.2004.05.042"
856
+ },
857
+ grood1983: {
858
+ cite: "Grood ES, Suntay WJ 1983, A joint coordinate system for the clinical description of three-dimensional motions: application to the knee, J Biomech Eng 105(2):136-144",
859
+ url: "https://doi.org/10.1115/1.3138397"
860
+ },
861
+ cdc2011: {
862
+ cite: "Soucie JM et al. 2011, Range of motion measurements: reference values and a database for comparison studies, Haemophilia 17(3):500-507; the CDC Normal Joint Range of Motion Study table",
863
+ url: "https://archive.cdc.gov/www_cdc_gov/ncbddd/jointrom/index.html"
864
+ },
865
+ aaos1965: { cite: "American Academy of Orthopaedic Surgeons 1965, Joint Motion: Method of Measuring and Recording (print); each value is as the page named with it reproduces it" },
866
+ ama2000: { cite: "Cocchiarella L, Andersson GBJ (eds) 2000, Guides to the Evaluation of Permanent Impairment, 5th ed., American Medical Association (print); each value is as the worksheet named with it reproduces it" },
867
+ hendriks2020: {
868
+ cite: "Hendriks et al. 2020, Plast Reconstr Surg Glob Open 8(6), supplemental content 1: normal range of motion values according to AAOS, with the values its authors added to that list",
869
+ url: u
870
+ },
871
+ dshs: {
872
+ cite: "Washington State Department of Social and Health Services, Range of Joint Motion Evaluation Chart, form 13-585A",
873
+ url: f
874
+ },
875
+ paraskevas2004: {
876
+ cite: "Paraskevas G et al. 2004, Study of the carrying angle of the human elbow joint in full extension: a morphometric analysis, Surg Radiol Anat 26:19-23",
877
+ url: "https://doi.org/10.1007/s00276-003-0185-z"
878
+ },
879
+ inman1944: {
880
+ cite: "Inman VT, Saunders JB, Abbott LC 1944, Observations on the function of the shoulder joint, J Bone Joint Surg 26(1):1-30, as reported by McClure et al. 2001, J Shoulder Elbow Surg, and by the open paper named with each value",
881
+ url: p
882
+ },
883
+ ludewig2009: {
884
+ cite: "Ludewig PM et al. 2009, Motion of the shoulder complex during multiplanar humeral elevation, J Bone Joint Surg Am 91(2):378-389",
885
+ url: "https://doi.org/10.2106/JBJS.G.01483"
886
+ },
887
+ sahara2007: {
888
+ cite: "Sahara W, Sugamoto K, Murai M, Yoshikawa H 2007, Three-dimensional clavicular and acromioclavicular rotations during arm abduction using vertically open MRI, J Orthop Res 25(9):1243-1249",
889
+ url: "https://doi.org/10.1002/jor.20407"
890
+ },
891
+ white1990: { cite: "White AA, Panjabi MM 1990, Clinical Biomechanics of the Spine, 2nd ed., Lippincott (print): representative rotations at each level" },
892
+ pearcy1984: {
893
+ cite: "Pearcy MJ, Tibrewal SB 1984, Axial rotation and lateral bending in the normal lumbar spine measured by three-dimensional radiography, Spine 9(6):582-587",
894
+ url: `${h}6495028/`
895
+ },
896
+ bogduk2000: {
897
+ cite: "Bogduk N, Mercer S 2000, Biomechanics of the cervical spine I: normal kinematics, Clin Biomech 15(9):633-648",
898
+ url: `${h}10946096/`
899
+ },
900
+ kapandji: { cite: "Kapandji IA, The Physiology of the Joints, vols 1 to 3 (print)" },
901
+ bennell1998: { cite: "Bennell K et al. 1998, Intra-rater and inter-rater reliability of a weight-bearing lunge measure of ankle dorsiflexion, Aust J Physiother 44(3):175-180 (print)" },
902
+ kim2015: {
903
+ cite: "Kim HY, Kim KJ, Yang DS, Jeung SW, Choi HG, Choy WS 2015, Screw-home movement of the tibiofemoral joint during normal gait: three-dimensional analysis, Clin Orthop Surg 7(3):303-309; it reports the RSA range of Karrholm et al. in its discussion",
904
+ url: "https://pmc.ncbi.nlm.nih.gov/articles/PMC4553277/"
905
+ },
906
+ rijpkema1991: { cite: "Rijpkema H, Girard M 1991, Computer animation of knowledge-based human grasping, SIGGRAPH 91 (print)" },
907
+ ansur2: {
908
+ cite: "Gordon CC et al., 2012 Anthropometric Survey of U.S. Army Personnel: Methods and Summary Statistics, NATICK/TR-15/007",
909
+ url: "https://tools.openlab.psu.edu/publicData/ANSURII-TR15-007.pdf"
910
+ },
911
+ winter2009: {
912
+ cite: "Drillis R, Contini R 1966, Body Segment Parameters, report 1166.03, New York University, as figure 4.1 of Winter DA 2009, Biomechanics and Motor Control of Human Movement, 4th ed., Wiley",
913
+ url: de
914
+ },
915
+ deleva1996: {
916
+ cite: "de Leva P 1996, Adjustments to Zatsiorsky-Seluyanov's segment inertia parameters, J Biomech 29(9):1223-1230, table 4",
917
+ url: "https://doi.org/10.1016/0021-9290(95)00178-6"
918
+ }
919
+ }, v = (e, t, n, r, i) => ({
920
+ source: e,
921
+ value: t,
922
+ what: n,
923
+ provenance: r,
924
+ ...i ? { via: i } : {}
925
+ }), y = (e, t, n = u) => v("aaos1965", e, t, "online", n), b = (e, t) => v("ama2000", e, t, "online", ce), x = (e, t, n) => v(e, t, n, "recalled"), S = [
926
+ 0,
927
+ 1,
928
+ 0
929
+ ], C = [
930
+ 0,
931
+ -1,
932
+ 0
933
+ ], pe = [
934
+ 1,
935
+ 0,
936
+ 0
937
+ ], w = [
938
+ -1,
939
+ 0,
940
+ 0
941
+ ], T = [
942
+ 0,
943
+ 0,
944
+ 1
945
+ ], E = [
946
+ 0,
947
+ 0,
948
+ -1
949
+ ], me = [
950
+ Math.SQRT1_2,
951
+ 0,
952
+ Math.SQRT1_2
953
+ ], he = [
954
+ Math.SQRT1_2,
955
+ 0,
956
+ -Math.SQRT1_2
957
+ ], D = (e, t, n, r, i, a = {}) => ({
958
+ axis: e,
959
+ positive: t,
960
+ negative: n,
961
+ max: r,
962
+ min: i,
963
+ ...a
964
+ }), O = (e = 0) => n(e), k = (e) => e.startsWith("r_") ? `l_${e.slice(2)}` : e.startsWith("l_") ? `r_${e.slice(2)}` : e, A = {
965
+ lumbar: [
966
+ [
967
+ "vl5",
968
+ "L5-S1",
969
+ 17,
970
+ 3,
971
+ 2
972
+ ],
973
+ [
974
+ "vl4",
975
+ "L4-L5",
976
+ 17,
977
+ 6,
978
+ 2
979
+ ],
980
+ [
981
+ "vl3",
982
+ "L3-L4",
983
+ 15,
984
+ 10,
985
+ 2
986
+ ],
987
+ [
988
+ "vl2",
989
+ "L2-L3",
990
+ 14,
991
+ 10,
992
+ 2
993
+ ],
994
+ [
995
+ "vl1",
996
+ "L1-L2",
997
+ 12,
998
+ 10,
999
+ 2
1000
+ ]
1001
+ ],
1002
+ thoracic: [
1003
+ [
1004
+ "vt12",
1005
+ "T12-L1",
1006
+ 12,
1007
+ 8,
1008
+ 2
1009
+ ],
1010
+ [
1011
+ "vt11",
1012
+ "T11-T12",
1013
+ 12,
1014
+ 9,
1015
+ 2
1016
+ ],
1017
+ [
1018
+ "vt10",
1019
+ "T10-T11",
1020
+ 9,
1021
+ 7,
1022
+ 2
1023
+ ],
1024
+ [
1025
+ "vt9",
1026
+ "T9-T10",
1027
+ 6,
1028
+ 6,
1029
+ 4
1030
+ ],
1031
+ [
1032
+ "vt8",
1033
+ "T8-T9",
1034
+ 6,
1035
+ 6,
1036
+ 6
1037
+ ],
1038
+ [
1039
+ "vt7",
1040
+ "T7-T8",
1041
+ 6,
1042
+ 6,
1043
+ 7
1044
+ ],
1045
+ [
1046
+ "vt6",
1047
+ "T6-T7",
1048
+ 5,
1049
+ 6,
1050
+ 7
1051
+ ],
1052
+ [
1053
+ "vt5",
1054
+ "T5-T6",
1055
+ 4,
1056
+ 6,
1057
+ 8
1058
+ ],
1059
+ [
1060
+ "vt4",
1061
+ "T4-T5",
1062
+ 4,
1063
+ 6,
1064
+ 8
1065
+ ],
1066
+ [
1067
+ "vt3",
1068
+ "T3-T4",
1069
+ 4,
1070
+ 5,
1071
+ 8
1072
+ ],
1073
+ [
1074
+ "vt2",
1075
+ "T2-T3",
1076
+ 4,
1077
+ 6,
1078
+ 8
1079
+ ],
1080
+ [
1081
+ "vt1",
1082
+ "T1-T2",
1083
+ 4,
1084
+ 5,
1085
+ 9
1086
+ ]
1087
+ ],
1088
+ cervical: [
1089
+ [
1090
+ "vc7",
1091
+ "C7-T1",
1092
+ 9,
1093
+ 4,
1094
+ 2
1095
+ ],
1096
+ [
1097
+ "vc6",
1098
+ "C6-C7",
1099
+ 17,
1100
+ 7,
1101
+ 6
1102
+ ],
1103
+ [
1104
+ "vc5",
1105
+ "C5-C6",
1106
+ 20,
1107
+ 8,
1108
+ 7
1109
+ ],
1110
+ [
1111
+ "vc4",
1112
+ "C4-C5",
1113
+ 20,
1114
+ 11,
1115
+ 7
1116
+ ],
1117
+ [
1118
+ "vc3",
1119
+ "C3-C4",
1120
+ 15,
1121
+ 11,
1122
+ 7
1123
+ ],
1124
+ [
1125
+ "vc2",
1126
+ "C2-C3",
1127
+ 10,
1128
+ 10,
1129
+ 3
1130
+ ],
1131
+ [
1132
+ "vc1",
1133
+ "C1-C2",
1134
+ 20,
1135
+ 5,
1136
+ 40
1137
+ ],
1138
+ [
1139
+ "skullbase",
1140
+ "C0-C1",
1141
+ 25,
1142
+ 5,
1143
+ 5
1144
+ ]
1145
+ ]
1146
+ }, ge = [
1147
+ 62,
1148
+ 36,
1149
+ 32.5
1150
+ ], _e = [
1151
+ "flexion plus extension",
1152
+ "side bend to one side",
1153
+ "rotation to one side"
1154
+ ];
1155
+ function j(e = {}) {
1156
+ let { sex: t } = e, i = e.age ?? 30;
1157
+ if (!(i > 0 && Number.isFinite(i))) throw RangeError("humanTable: age must be a positive number of years");
1158
+ if (t !== void 0 && t !== "female" && t !== "male") throw RangeError("humanTable: sex must be 'female' or 'male'");
1159
+ let o = i < 9 ? "2-8" : i < 20 ? "9-19" : i < 45 ? "20-44" : "45-69", s = (e) => {
1160
+ let n = (t) => ({
1161
+ source: "cdc2011",
1162
+ value: ie(t, o, e),
1163
+ what: `${e}, ${t === "female" ? "women" : "men"} ${o} years, mean`,
1164
+ provenance: "dataset",
1165
+ file: re
1166
+ });
1167
+ if (t) return [n(t)];
1168
+ let r = n("female"), i = n("male");
1169
+ return r.value >= i.value ? [r, i] : [i, r];
1170
+ }, te = [
1171
+ n(15, y(80, "thoracolumbar spine flexion", `${d}spine`), v("dshs", 90, "back flexion", "online", f)),
1172
+ n(15, y(25, "thoracolumbar spine extension", `${d}spine`), b(25, "lumbar spine extension")),
1173
+ n(15, y(35, "thoracolumbar spine lateral flexion, each side", `${d}spine`), b(25, "lumbar spine lateral flexion, each side")),
1174
+ n(15, y(45, "thoracolumbar spine rotation, each side", `${d}spine`), b(30, "thoracic spine rotation, each side"))
1175
+ ], ne = [
1176
+ n(15, y(45, "cervical spine flexion"), b(50, "cervical spine flexion")),
1177
+ n(15, y(45, "cervical spine extension"), b(60, "cervical spine extension")),
1178
+ n(15, y(45, "cervical spine lateral flexion, each side"), b(45, "cervical spine lateral flexion, each side")),
1179
+ n(15, y(60, "cervical spine rotation, each side"), b(80, "cervical spine rotation, each side"))
1180
+ ], l = (e, t) => {
1181
+ let n = A[e], r = [], i = [];
1182
+ for (let a = 0; a < 3; a++) {
1183
+ let o = t[2 + a], s = `${t[1]} ${_e[a]}`;
1184
+ if (e === "thoracic") {
1185
+ let e = n.reduce((e, t) => e + t[2 + a], 0);
1186
+ r.push(ge[a] * o / e), i.push([v("white1990", ge[a], `thoracic spine ${_e[a]}, total`, "online", ue), x("white1990", o, `${s}, representative`)]);
1187
+ } else e === "cervical" || a === 0 && t[0] === "vl5" ? (r.push(o), i.push([x("white1990", o, `${s}, representative`)])) : (r.push(o), i.push([a === 0 ? v("white1990", o, `${s}, representative`, "online", le) : v("pearcy1984", o, `${s}, about`, "online", `${h}6495028/`)]));
1188
+ }
1189
+ return {
1190
+ weight: r,
1191
+ rows: i
1192
+ };
1193
+ }, ce = (e, t, n, r, i) => {
1194
+ let a = e.flatMap((e) => A[e].map((t) => ({
1195
+ level: t,
1196
+ ...l(e, t)
1197
+ }))), o = [
1198
+ 0,
1199
+ 1,
1200
+ 2
1201
+ ].map((e) => a.reduce((t, n) => t + n.weight[e], 0)), s = (e, t, n) => ({
1202
+ normal: e.normal * n.weight[t] / o[t],
1203
+ structural: e.structural * n.weight[t] / o[t],
1204
+ allowance: e.allowance,
1205
+ rows: [...e.rows, ...n.rows[t]],
1206
+ rule: "this level's share of the region's range, by its weight among the region's levels"
1207
+ });
1208
+ return a.map((e, o) => ({
1209
+ id: e.level[0],
1210
+ parent: o ? a[o - 1].level[0] : r,
1211
+ ...o === 0 && i ? { reference: i } : {},
1212
+ segment: e.level[0] === "skullbase" ? "skull" : e.level[0].slice(1),
1213
+ kind: e.level[0] === "vc1" ? "pivot" : "ball",
1214
+ side: "centre",
1215
+ neutral: "rest",
1216
+ long: S,
1217
+ region: t,
1218
+ dofs: [
1219
+ D(pe, "flexion", "extension", s(n[0], 0, e), s(n[1], 0, e)),
1220
+ D(T, "right bend", "left bend", s(n[2], 1, e), s(n[2], 1, e)),
1221
+ D(S, "left rotation", "right rotation", s(n[3], 2, e), s(n[3], 2, e))
1222
+ ]
1223
+ }));
1224
+ }, j = [
1225
+ {
1226
+ id: "humanoid_root",
1227
+ parent: null,
1228
+ segment: "sacrum",
1229
+ kind: "free",
1230
+ side: "centre",
1231
+ neutral: "rest",
1232
+ long: S
1233
+ },
1234
+ {
1235
+ id: "sacroiliac",
1236
+ parent: "humanoid_root",
1237
+ segment: "pelvis",
1238
+ kind: "free",
1239
+ side: "centre",
1240
+ neutral: "rest",
1241
+ long: S
1242
+ },
1243
+ ...ce(["lumbar", "thoracic"], "trunk", te, "humanoid_root", "sacroiliac"),
1244
+ ...ce(["cervical"], "neck", ne, "vt1")
1245
+ ], M = (e, t, n, r, i, a = {}) => ({
1246
+ id: e,
1247
+ parent: t,
1248
+ segment: n,
1249
+ kind: "glide",
1250
+ side: "right",
1251
+ mirror: k(e),
1252
+ neutral: "rest",
1253
+ long: T,
1254
+ dofs: [
1255
+ D(w, "dorsiflexion", "plantar flexion", r, i),
1256
+ D(C, "abduction", "adduction", O(5), O(5)),
1257
+ D(T, "inversion", "eversion", O(5), O(5))
1258
+ ],
1259
+ ...a
1260
+ }), N = (e, t, n, r, i, a) => ({
1261
+ id: e,
1262
+ parent: t,
1263
+ segment: n,
1264
+ kind: r,
1265
+ side: "right",
1266
+ mirror: k(e),
1267
+ neutral: "rest",
1268
+ long: T,
1269
+ dofs: [
1270
+ D(pe, "flexion", "extension", i, a),
1271
+ D(C, "abduction", "adduction", O(r === "hinge" ? 5 : 10), O(r === "hinge" ? 5 : 10)),
1272
+ D(T, "inversion", "eversion", O(5), O(5))
1273
+ ]
1274
+ }), P = [
1275
+ {
1276
+ id: "r_hip",
1277
+ parent: "sacroiliac",
1278
+ segment: "r_thigh",
1279
+ kind: "ball",
1280
+ side: "right",
1281
+ mirror: "l_hip",
1282
+ neutral: "body",
1283
+ long: C,
1284
+ distal: ["r_knee"],
1285
+ dofs: [
1286
+ D(w, "flexion", "extension", n(15, ...s("hip flexion"), y(120, "hip flexion"), b(100, "hip flexion")), n(15, ...s("hip extension"), y(20, "hip extension"), b(30, "hip extension"))),
1287
+ D(E, "abduction", "adduction", n(15, y(40, "hip abduction"), b(40, "hip abduction")), n(15, y(20, "hip adduction"), b(20, "hip adduction"))),
1288
+ D(S, "internal rotation", "external rotation", n(15, y(45, "hip internal rotation", `${d}hip-knee-ankle`), b(40, "hip internal rotation")), n(15, y(45, "hip external rotation", `${d}hip-knee-ankle`), b(50, "hip external rotation")))
1289
+ ]
1290
+ },
1291
+ {
1292
+ id: "r_knee",
1293
+ parent: "r_hip",
1294
+ segment: "r_calf",
1295
+ kind: "hinge",
1296
+ side: "right",
1297
+ mirror: "l_knee",
1298
+ neutral: "straight",
1299
+ long: C,
1300
+ distal: ["r_talocrural"],
1301
+ dofs: [
1302
+ D(pe, "flexion", "hyperextension", n(10, ...s("knee flexion"), y(135, "knee flexion"), b(150, "knee flexion")), n(0, ...s("knee extension"))),
1303
+ D(E, "valgus", "varus", O(10), O(10)),
1304
+ D(S, "internal rotation", "external rotation", n(10, x("kapandji", 30, "tibial internal rotation, knee flexed 90 degrees")), n(10, x("kapandji", 40, "tibial external rotation, knee flexed 90 degrees")), { gate: {
1305
+ by: 0,
1306
+ from: 0,
1307
+ to: 90,
1308
+ floor: 5
1309
+ } })
1310
+ ]
1311
+ },
1312
+ {
1313
+ id: "r_talocrural",
1314
+ parent: "r_knee",
1315
+ segment: "r_talus",
1316
+ kind: "hinge",
1317
+ side: "right",
1318
+ mirror: "l_talocrural",
1319
+ neutral: "rest",
1320
+ long: T,
1321
+ distal: [
1322
+ "r_metatarsophalangeal_2",
1323
+ "r_metatarsophalangeal_1",
1324
+ "r_metatarsophalangeal_3"
1325
+ ],
1326
+ region: "r_hindfoot",
1327
+ dofs: [
1328
+ D(w, "dorsiflexion", "plantar flexion", n(0, ...s("ankle dorsiflexion"), y(20, "ankle dorsiflexion"), v("dshs", 20, "ankle dorsal flexion", "online", f), x("bennell1998", 45, "ankle dorsiflexion bearing weight in a lunge, about")), n(10, ...s("ankle plantar flexion"), y(50, "ankle plantar flexion"), v("dshs", 40, "ankle plantar flexion", "online", f))),
1329
+ D(C, "abduction", "adduction", O(), O()),
1330
+ D(T, "inversion", "eversion", O(), O())
1331
+ ]
1332
+ },
1333
+ {
1334
+ id: "r_talocalcaneonavicular",
1335
+ parent: "r_talocrural",
1336
+ segment: "r_navicular",
1337
+ kind: "glide",
1338
+ side: "right",
1339
+ mirror: "l_talocalcaneonavicular",
1340
+ neutral: "rest",
1341
+ long: T,
1342
+ region: "r_hindfoot",
1343
+ dofs: [
1344
+ D(w, "dorsiflexion", "plantar flexion", O(), O()),
1345
+ D(C, "abduction", "adduction", n(10, x("aaos1965", 10, "forefoot abduction")), n(10, x("aaos1965", 20, "forefoot adduction"))),
1346
+ D(T, "inversion", "eversion", n(15, y(35, "foot inversion", se), b(30, "foot inversion")), n(15, y(15, "foot eversion", se), b(20, "foot eversion")))
1347
+ ]
1348
+ },
1349
+ ...[
1350
+ 1,
1351
+ 2,
1352
+ 3
1353
+ ].map((e) => M(`r_cuneonavicular_${e}`, "r_talocalcaneonavicular", `r_cuneiform_${e}`, O(5), O(5))),
1354
+ ...[
1355
+ 1,
1356
+ 2,
1357
+ 3
1358
+ ].map((e) => M(`r_tarsometatarsal_${e}`, `r_cuneonavicular_${e}`, `r_metatarsal_${e}`, O(5), O(5))),
1359
+ M("r_calcaneocuboid", "r_talocrural", "r_calcaneus", O(5), O(5)),
1360
+ M("r_transversetarsal", "r_calcaneocuboid", "r_cuboid", O(5), O(5)),
1361
+ ...[4, 5].map((e) => M(`r_tarsometatarsal_${e}`, "r_transversetarsal", `r_metatarsal_${e}`, O(5), O(5))),
1362
+ N("r_metatarsophalangeal_1", "r_tarsometatarsal_1", "r_tarsal_proximal_phalanx_1", "condyloid", n(10, y(45, "great toe MTP flexion")), n(10, y(70, "great toe MTP extension"))),
1363
+ ...[
1364
+ 2,
1365
+ 3,
1366
+ 4,
1367
+ 5
1368
+ ].map((e) => N(`r_metatarsophalangeal_${e}`, `r_tarsometatarsal_${e}`, `r_tarsal_proximal_phalanx_${e}`, "condyloid", n(10, x("aaos1965", 40, "lesser toe MTP flexion")), n(10, x("aaos1965", 40, "lesser toe MTP extension")))),
1369
+ N("r_tarsal_interphalangeal_1", "r_metatarsophalangeal_1", "r_tarsal_distal_phalanx_1", "hinge", n(10, x("aaos1965", 90, "great toe IP flexion")), O()),
1370
+ ...[
1371
+ 2,
1372
+ 3,
1373
+ 4,
1374
+ 5
1375
+ ].map((e) => N(`r_tarsal_proximal_interphalangeal_${e}`, `r_metatarsophalangeal_${e}`, `r_tarsal_middle_phalanx_${e}`, "hinge", n(10, x("aaos1965", 35, "lesser toe PIP flexion")), O())),
1376
+ ...[
1377
+ 2,
1378
+ 3,
1379
+ 4,
1380
+ 5
1381
+ ].map((e) => N(`r_tarsal_distal_interphalangeal_${e}`, `r_tarsal_proximal_interphalangeal_${e}`, `r_tarsal_distal_phalanx_${e}`, "hinge", n(10, x("aaos1965", 60, "lesser toe DIP flexion")), n(0, x("aaos1965", 30, "lesser toe DIP extension"))))
1382
+ ], F = (e, t, n, r) => ({
1383
+ id: e,
1384
+ parent: t,
1385
+ segment: n,
1386
+ kind: "glide",
1387
+ side: "right",
1388
+ mirror: k(e),
1389
+ neutral: "rest",
1390
+ long: C,
1391
+ dofs: [
1392
+ D(T, "flexion", "extension", r, O(5)),
1393
+ D(w, "radial deviation", "ulnar deviation", O(5), O(5)),
1394
+ D(S, "pronation", "supination", O(5), O(5))
1395
+ ]
1396
+ }), I = (e, t, n, r, i, a, o = !1) => ({
1397
+ id: e,
1398
+ parent: t,
1399
+ segment: n,
1400
+ kind: "hinge",
1401
+ side: "right",
1402
+ mirror: k(e),
1403
+ neutral: "straight",
1404
+ long: C,
1405
+ ...r ? { distal: [r] } : {},
1406
+ dofs: [
1407
+ D(o ? me : T, "flexion", "hyperextension", i, a),
1408
+ D(o ? he : w, o ? "abduction" : "radial deviation", o ? "adduction" : "ulnar deviation", O(5), O(5)),
1409
+ D(S, "pronation", "supination", O(5), O(5))
1410
+ ]
1411
+ }), L = (e, t, r, i) => n(10, y(t, `finger ${e} flexion`, `${d}wrist-hand`), b(r, `finger ${e} flexion`), v("hendriks2020", i, `finger ${e} flexion, from Richard and Parry`, "online", u)), R = (e, ...t) => n(0, v("hendriks2020", 0, `finger ${e} extension, from Richard and Parry`, "online", u), b(30, `finger ${e} extension`), ...t), z = [
1412
+ {
1413
+ id: "r_sternoclavicular",
1414
+ parent: "vt1",
1415
+ segment: "r_clavicle",
1416
+ kind: "saddle",
1417
+ side: "right",
1418
+ mirror: "l_sternoclavicular",
1419
+ neutral: "rest",
1420
+ long: w,
1421
+ distal: ["r_shoulder"],
1422
+ rhythm: {
1423
+ from: "r_shoulder",
1424
+ to: "r_elbow",
1425
+ curve: [
1426
+ [
1427
+ 0,
1428
+ 5.9,
1429
+ 19.2
1430
+ ],
1431
+ [
1432
+ 30,
1433
+ 11,
1434
+ 23
1435
+ ],
1436
+ [
1437
+ 120,
1438
+ 17,
1439
+ 39
1440
+ ]
1441
+ ],
1442
+ rows: [
1443
+ v("ludewig2009", 5.9, "clavicle elevation at rest, arm at side (Table I)", "online", `${m}19181982`),
1444
+ v("ludewig2009", 19.2, "clavicle retraction at rest, arm at side (Table I)", "online", `${m}19181982`),
1445
+ v("ludewig2009", 6, "clavicle elevation gained from 30 to 120 degrees of arm elevation, 11 to 17", "online", `${m}19181982`),
1446
+ v("ludewig2009", 16, "clavicle retraction gained from 30 to 120 degrees of arm elevation, 23 to 39", "online", `${m}19181982`)
1447
+ ]
1448
+ },
1449
+ dofs: [
1450
+ D(E, "elevation", "depression", n(15, v("inman1944", 30, "clavicular elevation during arm raising, about", "online", p)), n(5, x("kapandji", 10, "clavicular depression"))),
1451
+ D(S, "protraction", "retraction", n(10, x("kapandji", 15, "clavicular protraction")), n(10, v("sahara2007", 30.6, "clavicle retraction over arm abduction, against the lung", "online", `${m}17474135`), x("kapandji", 20, "clavicular retraction"))),
1452
+ D(w, "posterior rotation", "anterior rotation", n(15, v("inman1944", 40, "posterior rotation of the clavicle, about", "online", p), v("ludewig2009", 31, "sternoclavicular posterior rotation, average", "online", `${m}19181982`)), O(5))
1453
+ ]
1454
+ },
1455
+ {
1456
+ id: "r_acromioclavicular",
1457
+ parent: "r_sternoclavicular",
1458
+ segment: "r_scapula",
1459
+ kind: "glide",
1460
+ side: "right",
1461
+ mirror: "l_acromioclavicular",
1462
+ neutral: "rest",
1463
+ long: w,
1464
+ dofs: [
1465
+ D(E, "upward rotation", "downward rotation", n(10, x("ludewig2009", 11, "scapular upward rotation on the clavicle, average")), O(5)),
1466
+ D(S, "internal rotation", "external rotation", n(10, x("ludewig2009", 8, "scapular internal rotation on the clavicle, average")), O(5)),
1467
+ D(w, "posterior tilt", "anterior tilt", n(10, v("ludewig2009", 19, "acromioclavicular posterior tilt, average", "online", `${m}19181982`)), O(5))
1468
+ ]
1469
+ },
1470
+ {
1471
+ id: "r_shoulder",
1472
+ parent: "r_acromioclavicular",
1473
+ reference: "vt1",
1474
+ segment: "r_upperarm",
1475
+ kind: "ball",
1476
+ side: "right",
1477
+ mirror: "l_shoulder",
1478
+ neutral: "body",
1479
+ long: C,
1480
+ distal: ["r_elbow"],
1481
+ dofs: [
1482
+ D(w, "flexion", "extension", n(15, ...s("shoulder flexion"), y(180, "shoulder flexion"), b(180, "shoulder flexion")), n(15, y(60, "shoulder extension"), b(50, "shoulder extension"))),
1483
+ D(E, "abduction", "adduction", n(15, y(180, "shoulder abduction"), b(180, "shoulder abduction")), n(15, b(50, "shoulder adduction"), v("hendriks2020", 40, "shoulder adduction, added by the authors", "online", u))),
1484
+ D(S, "internal rotation", "external rotation", n(15, y(70, "shoulder internal rotation"), b(90, "shoulder internal rotation")), n(15, y(90, "shoulder external rotation"), b(90, "shoulder external rotation")))
1485
+ ]
1486
+ },
1487
+ {
1488
+ id: "r_elbow",
1489
+ parent: "r_shoulder",
1490
+ segment: "r_forearm",
1491
+ kind: "hinge",
1492
+ side: "right",
1493
+ mirror: "l_elbow",
1494
+ neutral: "straight",
1495
+ long: C,
1496
+ distal: ["r_radiocarpal"],
1497
+ dofs: [
1498
+ D(w, "flexion", "hyperextension", n(10, ...s("elbow flexion"), y(150, "elbow flexion"), b(140, "elbow flexion")), n(0, ...s("elbow extension"))),
1499
+ D(E, "valgus", "varus", n(5, v("paraskevas2004", 20.02, "carrying angle, women, mean 15.07 plus one standard deviation 4.95", "online", `${m}14648036`), v("paraskevas2004", 15.24, "carrying angle, men, mean 10.97 plus one standard deviation 4.27", "online", `${m}14648036`), v("paraskevas2004", 12.88, "carrying angle, all, mean", "online", `${m}14648036`)), O(5)),
1500
+ D(S, "pronation", "supination", n(15, ...s("elbow pronation"), y(80, "forearm pronation", `${d}elbow-forearm`), b(80, "forearm pronation")), n(15, ...s("elbow supination"), y(80, "forearm supination", `${d}elbow-forearm`), b(80, "forearm supination")))
1501
+ ]
1502
+ },
1503
+ {
1504
+ id: "r_radiocarpal",
1505
+ parent: "r_elbow",
1506
+ segment: "r_carpal",
1507
+ kind: "condyloid",
1508
+ side: "right",
1509
+ mirror: "l_radiocarpal",
1510
+ neutral: "straight",
1511
+ long: C,
1512
+ distal: [
1513
+ "r_metacarpophalangeal_3",
1514
+ "r_metacarpophalangeal_2",
1515
+ "r_metacarpophalangeal_4"
1516
+ ],
1517
+ across: {
1518
+ pairs: [
1519
+ ["r_metacarpophalangeal_3", "r_metacarpophalangeal_2"],
1520
+ ["r_metacarpophalangeal_4", "r_metacarpophalangeal_2"],
1521
+ ["r_metacarpophalangeal_5", "r_metacarpophalangeal_2"],
1522
+ ["r_metacarpophalangeal_5", "r_metacarpophalangeal_3"]
1523
+ ],
1524
+ neutral: T
1525
+ },
1526
+ dofs: [
1527
+ D(T, "flexion", "extension", n(15, y(80, "wrist flexion"), b(60, "wrist flexion")), n(15, y(70, "wrist extension"), b(60, "wrist extension"))),
1528
+ D(w, "radial deviation", "ulnar deviation", n(15, y(20, "wrist radial deviation", `${d}wrist-hand`), b(20, "wrist radial deviation")), n(15, y(30, "wrist ulnar deviation", `${d}wrist-hand`), b(30, "wrist ulnar deviation"))),
1529
+ D(S, "pronation", "supination", n(5, x("kapandji", 10, "passive rotation at the wrist, each way")), n(5, x("kapandji", 10, "passive rotation at the wrist, each way")), { spill: !0 })
1530
+ ]
1531
+ },
1532
+ F("r_midcarpal_1", "r_radiocarpal", "r_trapezium", O(5)),
1533
+ F("r_midcarpal_2", "r_radiocarpal", "r_trapezoid", O(5)),
1534
+ F("r_midcarpal_3", "r_radiocarpal", "r_capitate", O(5)),
1535
+ F("r_midcarpal_4_5", "r_radiocarpal", "r_hamate", O(5)),
1536
+ {
1537
+ id: "r_carpometacarpal_1",
1538
+ parent: "r_midcarpal_1",
1539
+ segment: "r_metacarpal_1",
1540
+ kind: "saddle",
1541
+ side: "right",
1542
+ mirror: "l_carpometacarpal_1",
1543
+ neutral: "body",
1544
+ long: C,
1545
+ distal: ["r_metacarpophalangeal_1"],
1546
+ dofs: [
1547
+ D(T, "palmar abduction", "retroposition", n(15, y(60, "thumb CMC palmar abduction", `${d}wrist-hand`), v("hendriks2020", 60, "thumb CMC palmar abduction, added by the authors", "online", u)), n(10, x("kapandji", 15, "thumb retroposition"))),
1548
+ D(w, "radial abduction", "adduction", n(15, v("hendriks2020", 60, "thumb CMC radial abduction, added by the authors", "online", u), b(50, "thumb CMC radial abduction")), n(10, x("kapandji", 10, "thumb adduction across the palm"))),
1549
+ D(S, "pronation", "supination", n(10, x("kapandji", 30, "thumb rotation in opposition")), O(10))
1550
+ ]
1551
+ },
1552
+ F("r_carpometacarpal_2", "r_midcarpal_2", "r_metacarpal_2", n(5, x("kapandji", 2, "second carpometacarpal flexion"))),
1553
+ F("r_carpometacarpal_3", "r_midcarpal_3", "r_metacarpal_3", n(5, x("kapandji", 2, "third carpometacarpal flexion"))),
1554
+ F("r_carpometacarpal_4", "r_midcarpal_4_5", "r_metacarpal_4", n(5, x("kapandji", 15, "fourth carpometacarpal flexion"))),
1555
+ F("r_carpometacarpal_5", "r_midcarpal_4_5", "r_metacarpal_5", n(5, x("kapandji", 25, "fifth carpometacarpal flexion"))),
1556
+ I("r_metacarpophalangeal_1", "r_carpometacarpal_1", "r_carpal_proximal_phalanx_1", "r_carpal_interphalangeal_1", n(10, y(50, "thumb MCP flexion"), b(60, "thumb MP flexion")), n(0, y(0, "thumb MCP extension"), b(40, "thumb MP extension")), !0),
1557
+ ...[
1558
+ 2,
1559
+ 3,
1560
+ 4,
1561
+ 5
1562
+ ].map((e) => ({
1563
+ id: `r_metacarpophalangeal_${e}`,
1564
+ parent: `r_carpometacarpal_${e}`,
1565
+ segment: `r_carpal_proximal_phalanx_${e}`,
1566
+ kind: "condyloid",
1567
+ side: "right",
1568
+ mirror: `l_metacarpophalangeal_${e}`,
1569
+ neutral: "straight",
1570
+ long: C,
1571
+ distal: [`r_carpal_proximal_interphalangeal_${e}`],
1572
+ dofs: [
1573
+ D(T, "flexion", "hyperextension", L("MCP", 90, 90, 80), n(0, b(20, "finger MP extension"), x("aaos1965", 45, "finger MCP hyperextension"))),
1574
+ D(w, "radial deviation", "ulnar deviation", n(10, x("kapandji", 20, "finger MCP abduction, each way")), n(10, x("kapandji", 20, "finger MCP abduction, each way"))),
1575
+ D(S, "pronation", "supination", O(10), O(10))
1576
+ ]
1577
+ })),
1578
+ I("r_carpal_interphalangeal_1", "r_metacarpophalangeal_1", "r_carpal_distal_phalanx_1", null, n(10, y(80, "thumb IP flexion"), b(80, "thumb IP flexion")), n(0, y(0, "thumb IP extension"), b(30, "thumb IP extension")), !0),
1579
+ ...[
1580
+ 2,
1581
+ 3,
1582
+ 4,
1583
+ 5
1584
+ ].map((e) => I(`r_carpal_proximal_interphalangeal_${e}`, `r_metacarpophalangeal_${e}`, `r_carpal_middle_phalanx_${e}`, `r_carpal_distal_interphalangeal_${e}`, L("PIP", 100, 100, 90), R("PIP"))),
1585
+ ...[
1586
+ 2,
1587
+ 3,
1588
+ 4,
1589
+ 5
1590
+ ].map((e) => I(`r_carpal_distal_interphalangeal_${e}`, `r_carpal_proximal_interphalangeal_${e}`, `r_carpal_distal_phalanx_${e}`, null, L("DIP", 90, 70, 65), R("DIP", x("aaos1965", 10, "finger DIP hyperextension"))))
1591
+ ], B = (e) => {
1592
+ let t = a(e, k);
1593
+ return e.region ? {
1594
+ ...t,
1595
+ region: k(e.region)
1596
+ } : t;
1597
+ }, V = [
1598
+ ...j,
1599
+ ...P,
1600
+ ...P.map(B),
1601
+ ...z,
1602
+ ...z.map(B)
1603
+ ], H = [
1604
+ {
1605
+ id: "trunk",
1606
+ joints: [...A.lumbar, ...A.thoracic].map((e) => e[0]),
1607
+ shared: !0
1608
+ },
1609
+ {
1610
+ id: "neck",
1611
+ joints: A.cervical.map((e) => e[0]),
1612
+ shared: !0
1613
+ },
1614
+ {
1615
+ id: "r_hindfoot",
1616
+ joints: ["r_talocrural", "r_talocalcaneonavicular"],
1617
+ shared: !1
1618
+ },
1619
+ {
1620
+ id: "l_hindfoot",
1621
+ joints: ["l_talocrural", "l_talocalcaneonavicular"],
1622
+ shared: !1
1623
+ }
1624
+ ], U = t ? [t] : ["female", "male"], W = (e, t) => c[t][e === "female" ? 0 : 2], G = (e) => ["female", "male"].map((t) => ({
1625
+ source: "ansur2",
1626
+ value: W(t, e),
1627
+ what: `${e}, ${t === "female" ? "women" : "men"}, mean, cm`,
1628
+ provenance: "dataset",
1629
+ file: ee
1630
+ })), K = (e, t, n, r, i) => {
1631
+ let a = (e) => (W(e, n) - (r ? W(e, r) : 0)) / W(e, "stature"), o = (e) => c[n][e === "female" ? 1 : 3] / W(e, "stature");
1632
+ return {
1633
+ id: e,
1634
+ what: t,
1635
+ share: U.reduce((e, t) => e + a(t), 0) / U.length,
1636
+ female: a("female"),
1637
+ male: a("male"),
1638
+ ...r ? {} : { spread: U.reduce((e, t) => e + o(t), 0) / U.length },
1639
+ rows: [
1640
+ ...G(n),
1641
+ ...r ? G(r) : [],
1642
+ ...G("stature"),
1643
+ ...i === void 0 ? [] : [v("winter2009", i, `${t}, share of stature`, "online", de)]
1644
+ ]
1645
+ };
1646
+ }, q = [
1647
+ K("shoulderHeight", "shoulder height", "acromial height", null, .818),
1648
+ K("neckBaseHeight", "height of the base of the neck", "cervicale height", null),
1649
+ K("elbowHeight", "elbow height, arm hanging", "acromial height", "acromion-radiale length", .63),
1650
+ K("wristHeight", "wrist height, arm hanging", "wrist height", null, .485),
1651
+ K("fingertipHeight", "fingertip height, arm hanging", "wrist height", "hand length", .377),
1652
+ K("hipHeight", "hip height", "trochanterion height", null, .53),
1653
+ K("crotchHeight", "crotch height", "crotch height", null),
1654
+ K("kneeHeight", "knee height", "lateral femoral epicondyle height", null, .285),
1655
+ K("ankleHeight", "ankle height", "lateral malleolus height", null, .039),
1656
+ K("upperArmLength", "upper arm length", "acromion-radiale length", null, .186),
1657
+ K("forearmLength", "forearm length", "radiale-stylion length", null, .146),
1658
+ K("handLength", "hand length", "hand length", null, .108),
1659
+ K("thighLength", "thigh length", "trochanterion height", "lateral femoral epicondyle height"),
1660
+ K("shankLength", "shank length", "lateral femoral epicondyle height", "lateral malleolus height"),
1661
+ K("footLength", "foot length", "foot length", null, .152),
1662
+ K("shoulderBreadth", "breadth across the shoulder joints", "biacromial breadth", null),
1663
+ K("hipBreadth", "hip breadth", "hip breadth", null),
1664
+ K("armSpan", "arm span", "span", null),
1665
+ K("sittingHeight", "sitting height", "sitting height", null),
1666
+ K("trunkLength", "shoulder height above the hip", "acromial height", "trochanterion height"),
1667
+ K("legLength", "hip height above the ankle", "trochanterion height", "lateral malleolus height")
1668
+ ], J = (e) => q.find((t) => t.id === e).share, Y = J("ankleHeight"), be = {
1669
+ shoulderHeight: {
1670
+ from: "l_talocrural",
1671
+ to: "l_shoulder",
1672
+ along: "up",
1673
+ offset: Y
1674
+ },
1675
+ elbowHeight: {
1676
+ from: "l_talocrural",
1677
+ to: "l_elbow",
1678
+ along: "up",
1679
+ offset: Y
1680
+ },
1681
+ wristHeight: {
1682
+ from: "l_talocrural",
1683
+ to: "l_radiocarpal",
1684
+ along: "up",
1685
+ offset: Y
1686
+ },
1687
+ kneeHeight: {
1688
+ from: "l_talocrural",
1689
+ to: "l_knee",
1690
+ along: "up",
1691
+ offset: Y
1692
+ },
1693
+ upperArmLength: {
1694
+ from: "l_shoulder",
1695
+ to: "l_elbow",
1696
+ along: "length"
1697
+ },
1698
+ forearmLength: {
1699
+ from: "l_elbow",
1700
+ to: "l_radiocarpal",
1701
+ along: "length"
1702
+ },
1703
+ thighLength: {
1704
+ from: "l_hip",
1705
+ to: "l_knee",
1706
+ along: "length"
1707
+ },
1708
+ shankLength: {
1709
+ from: "l_knee",
1710
+ to: "l_talocrural",
1711
+ along: "length"
1712
+ },
1713
+ trunkLength: {
1714
+ from: "l_hip",
1715
+ to: "l_shoulder",
1716
+ along: "up"
1717
+ }
1718
+ };
1719
+ q.forEach((e, t) => {
1720
+ let n = be[e.id];
1721
+ if (!n) return;
1722
+ let r = n.along === "up" && n.offset !== void 0 ? [e.share - .05, e.share + .05] : [e.share * .8, e.share * 1.2];
1723
+ q[t] = {
1724
+ ...e,
1725
+ measure: {
1726
+ ...n,
1727
+ band: r,
1728
+ rule: n.offset === void 0 ? "share times 0.8 to 1.2: a joint centre is not the skin landmark measured" : "share plus or minus 0.05 of stature: a joint centre is not the skin landmark measured"
1729
+ }
1730
+ };
1731
+ });
1732
+ let xe = (e, t = !1) => U.reduce((t, n) => t + W(n, e) / W(n, "stature"), 0) / U.length / (t ? 2 : 2 * Math.PI), X = (e, t, n, r, i, a = !1) => ({
1733
+ id: e,
1734
+ from: t,
1735
+ to: n,
1736
+ radius: [xe(r, a), xe(i, a)],
1737
+ rows: [
1738
+ ...G(r),
1739
+ ...i === r ? [] : G(i),
1740
+ ...G("stature")
1741
+ ]
1742
+ }), Se = (e) => [
1743
+ X(`${e}_upperArm`, `${e}_shoulder`, [`${e}_elbow`], "biceps circumference, flexed", "forearm circumference, flexed"),
1744
+ X(`${e}_forearm`, `${e}_elbow`, [`${e}_radiocarpal`], "forearm circumference, flexed", "wrist circumference"),
1745
+ X(`${e}_thigh`, `${e}_hip`, [`${e}_knee`], "thigh circumference", "lower thigh circumference"),
1746
+ X(`${e}_shank`, `${e}_knee`, [`${e}_talocrural`], "calf circumference", "ankle circumference")
1747
+ ], Ce = [
1748
+ X("trunk", "humanoid_root", [
1749
+ "vc7",
1750
+ "vc4",
1751
+ "vc1",
1752
+ "skullbase"
1753
+ ], "waist depth", "chest depth", !0),
1754
+ ...Se("l"),
1755
+ ...Se("r")
1756
+ ], Z = [];
1757
+ for (let e of ["l", "r"]) for (let t of ["upperArm", "forearm"]) for (let n of [
1758
+ "trunk",
1759
+ `${e === "l" ? "r" : "l"}_thigh`,
1760
+ "l_shank",
1761
+ "r_shank"
1762
+ ]) Z.push([`${e}_${t}`, n]);
1763
+ Z.push(["l_forearm", "r_forearm"], ["l_forearm", "r_upperArm"], ["r_forearm", "l_upperArm"]), Z.push(["l_thigh", "r_thigh"], ["l_shank", "r_shank"], ["l_thigh", "r_shank"], ["r_thigh", "l_shank"]);
1764
+ let we = (e) => (t ? e[t === "female" ? 0 : 1] : (e[0] + e[1]) / 2) / 100, Q = (e, t) => {
1765
+ let n = ae[e];
1766
+ return {
1767
+ id: e,
1768
+ joints: t,
1769
+ mass: we(n.mass),
1770
+ centre: we(n.centre),
1771
+ massBySex: [n.mass[0] / 100, n.mass[1] / 100],
1772
+ centreBySex: [n.centre[0] / 100, n.centre[1] / 100],
1773
+ landmarks: [n.from, n.to],
1774
+ rows: ["mass", "centre"].flatMap((t) => [0, 1].map((r) => ({
1775
+ source: "deleva1996",
1776
+ value: n[t][r],
1777
+ what: `${e} ${t === "mass" ? "mass, percent of body mass" : "centre of mass, percent of its length"}, ${r ? "men" : "women"}`,
1778
+ provenance: "dataset",
1779
+ file: oe
1780
+ })))
1781
+ };
1782
+ }, $ = (e) => [`l_${e}`, `r_${e}`], Te = [
1783
+ Q("head", ["skullbase"]),
1784
+ Q("trunk", ["humanoid_root"]),
1785
+ Q("upperTrunk", ["vt1"]),
1786
+ Q("middleTrunk", ["vt12"]),
1787
+ Q("lowerTrunk", ["vl5"]),
1788
+ Q("upperArm", $("shoulder")),
1789
+ Q("forearm", $("elbow")),
1790
+ Q("hand", $("radiocarpal")),
1791
+ Q("thigh", $("hip")),
1792
+ Q("shank", $("knee")),
1793
+ Q("foot", $("talocrural"))
1794
+ ], Ee = [
1795
+ {
1796
+ id: "shoulder-girdle",
1797
+ kind: "ratio",
1798
+ joints: [
1799
+ "r_shoulder",
1800
+ "r_sternoclavicular",
1801
+ "r_acromioclavicular"
1802
+ ],
1803
+ note: "Raising the arm turns the shoulder blade and collarbone with it: about two degrees at the shoulder joint for each degree of the shoulder blade, after a setting phase of the first 30 degrees of abduction or 60 of flexion. The collarbone rolls backward mostly past 90 degrees. The same holds on the left.",
1804
+ values: {
1805
+ glenohumeral: 2,
1806
+ scapulothoracic: 1,
1807
+ settingAbduction: 30,
1808
+ settingFlexion: 60,
1809
+ clavicleRollFrom: 90,
1810
+ clavicleRollTo: 180,
1811
+ clavicleRoll: 31,
1812
+ scapulaFrom: 30,
1813
+ scapulaTo: 120,
1814
+ scapulaUpward: 11,
1815
+ scapulaInternal: 8,
1816
+ scapulaTilt: 19
1817
+ },
1818
+ rows: [
1819
+ v("inman1944", 2, "glenohumeral elevation for each degree of scapular upward rotation", "online", p),
1820
+ v("inman1944", 30, "setting phase of abduction, degrees", "online", "https://pmc.ncbi.nlm.nih.gov/articles/PMC2841046/"),
1821
+ v("inman1944", 60, "setting phase of flexion, degrees", "online", "https://pmc.ncbi.nlm.nih.gov/articles/PMC2841046/"),
1822
+ v("inman1944", 90, "humeral elevation past which the clavicle mostly rotates", "online", p),
1823
+ v("ludewig2009", 31, "sternoclavicular posterior rotation gained over elevation, 0 to 31", "online", g),
1824
+ v("ludewig2009", 11, "acromioclavicular upward rotation gained over elevation, 5 to 16", "online", g),
1825
+ v("ludewig2009", 8, "acromioclavicular internal rotation gained over elevation, 57 to 65", "online", g),
1826
+ v("ludewig2009", 19, "acromioclavicular posterior tilt gained over elevation, -4 to 15", "online", g),
1827
+ v("ludewig2009", 2.1, "glenohumeral elevation to scapular upward rotation, abduction (2.4 flexion)", "online", g)
1828
+ ]
1829
+ },
1830
+ {
1831
+ id: "carrying-angle",
1832
+ kind: "offset",
1833
+ joints: ["r_elbow"],
1834
+ note: "A straight, supinated elbow leaves the forearm angled away from the body: the carrying angle. A rig may model it as a valgus of the elbow at rest.",
1835
+ values: {
1836
+ mean: 12.88,
1837
+ deviation: 5.92,
1838
+ men: 10.97,
1839
+ menDeviation: 4.27,
1840
+ women: 15.07,
1841
+ womenDeviation: 4.95
1842
+ },
1843
+ rows: [
1844
+ v("paraskevas2004", 12.88, "carrying angle, all, mean", "online", `${m}14648036`),
1845
+ v("paraskevas2004", 5.92, "carrying angle, all, standard deviation", "online", `${m}14648036`),
1846
+ v("paraskevas2004", 10.97, "carrying angle, men, mean", "online", `${m}14648036`),
1847
+ v("paraskevas2004", 4.27, "carrying angle, men, standard deviation", "online", `${m}14648036`),
1848
+ v("paraskevas2004", 15.07, "carrying angle, women, mean", "online", `${m}14648036`),
1849
+ v("paraskevas2004", 4.95, "carrying angle, women, standard deviation", "online", `${m}14648036`)
1850
+ ]
1851
+ },
1852
+ {
1853
+ id: "forearm-rotation",
1854
+ kind: "spill",
1855
+ joints: ["r_radiocarpal", "r_elbow"],
1856
+ note: "The wrist itself barely twists: a hand turned over turns the forearm. Twist past the wrist range belongs to the forearm, whose pronation and supination range then holds the whole turn.",
1857
+ values: { wrist: 10 },
1858
+ rows: [x("kapandji", 10, "passive rotation at the wrist, each way")]
1859
+ },
1860
+ {
1861
+ id: "knee-rotation",
1862
+ kind: "gate",
1863
+ joints: ["r_knee"],
1864
+ note: "A straight knee is locked against twisting; its rotation opens as it bends and is widest near 90 degrees of flexion.",
1865
+ values: {
1866
+ from: 0,
1867
+ to: 90,
1868
+ floor: 5
1869
+ },
1870
+ rows: [x("kapandji", 90, "knee flexion at which tibial rotation is widest")]
1871
+ },
1872
+ {
1873
+ id: "screw-home",
1874
+ kind: "screw",
1875
+ joints: ["r_knee"],
1876
+ note: "Over the last degrees of extension the tibia turns outward on the femur and locks the knee; bending it again turns the tibia inward by the same amount. The same holds on the left.",
1877
+ values: {
1878
+ rotation: 11.5,
1879
+ over: 20
1880
+ },
1881
+ rows: [
1882
+ v("kim2015", 15, "tibial external rotation over the last 20 degrees of extension, as the introduction states it", "online", _),
1883
+ v("kim2015", 20, "knee flexion over which the screw-home turn happens, degrees", "online", _),
1884
+ v("kim2015", 11.5, "tibial rotation range in active extension by RSA (Karrholm et al.: 9.9 internal to 1.6 external), as the discussion reports it", "online", _),
1885
+ v("kim2015", 17, "tibial external rotation reaching full extension in late swing of gait", "online", _)
1886
+ ]
1887
+ },
1888
+ {
1889
+ id: "spine-share",
1890
+ kind: "share",
1891
+ joints: [],
1892
+ note: "A bend of the trunk or neck is shared by its levels in proportion to the range of each level: no single level takes the whole bend.",
1893
+ values: {},
1894
+ rows: [x("white1990", 1, "segmental motion shares follow the range of each level (the level weights of the trunk and neck regions)")]
1895
+ },
1896
+ {
1897
+ id: "limb-twist",
1898
+ kind: "spread",
1899
+ joints: [
1900
+ "r_shoulder",
1901
+ "r_elbow",
1902
+ "r_hip",
1903
+ "r_knee"
1904
+ ],
1905
+ note: "The twist of a limb segment spreads along its skin: a forearm turned by its hand twists from none at the elbow to all of it at the wrist, as the radius rolls over the ulna; an upper arm or thigh turned at its root twists from none at the root to all of it at the far end. The twist bones of a rig carry the share of their place along the segment.",
1906
+ values: { spread: 1 },
1907
+ rows: [x("kapandji", 1, "forearm rotation is the radius turning about the ulna, the whole length of the forearm")]
1908
+ },
1909
+ {
1910
+ id: "finger-curl",
1911
+ kind: "follow",
1912
+ joints: [
1913
+ 2,
1914
+ 3,
1915
+ 4,
1916
+ 5
1917
+ ].flatMap((e) => [`r_carpal_proximal_interphalangeal_${e}`, `r_carpal_distal_interphalangeal_${e}`]),
1918
+ note: "The last joint of a finger bends with the middle one, at about two thirds of its angle; the same holds for fingers 3 to 5 and the left hand.",
1919
+ values: { ratio: 2 / 3 },
1920
+ rows: [x("rijpkema1991", 2 / 3, "distal interphalangeal flexion as a fraction of proximal interphalangeal flexion")]
1921
+ },
1922
+ {
1923
+ id: "head-rotation",
1924
+ kind: "share",
1925
+ joints: ["vc1", "skullbase"],
1926
+ note: "About half of the turn of the head happens between the first two neck vertebrae; nodding happens mostly at the skull. The level weights of the neck region carry this.",
1927
+ values: {
1928
+ atlantoaxialRotation: 40,
1929
+ cervicalRotation: 77
1930
+ },
1931
+ rows: [x("white1990", 40, "C1-C2 rotation to one side, representative")]
1932
+ }
1933
+ ];
1934
+ return r({
1935
+ id: "human",
1936
+ standard: "ISO/IEC 19774-1:2019 (HAnim), level of articulation 4",
1937
+ joints: V,
1938
+ regions: H,
1939
+ frame: {
1940
+ pairs: [["l_hip", "r_hip"], ["l_shoulder", "r_shoulder"]],
1941
+ top: [
1942
+ ...A.cervical,
1943
+ ...A.thoracic,
1944
+ ...A.lumbar
1945
+ ].map((e) => e[0]).reverse(),
1946
+ bottom: [
1947
+ "l_knee",
1948
+ "r_knee",
1949
+ "l_talocrural",
1950
+ "r_talocrural"
1951
+ ],
1952
+ ahead: ["l", "r"].flatMap((e) => [
1953
+ 1,
1954
+ 2,
1955
+ 3
1956
+ ].map((t) => [`${e}_talocrural`, `${e}_metatarsophalangeal_${t}`]))
1957
+ },
1958
+ stature: [
1959
+ {
1960
+ from: "l_talocrural",
1961
+ to: "l_hip",
1962
+ share: J("legLength")
1963
+ },
1964
+ {
1965
+ from: "r_talocrural",
1966
+ to: "r_hip",
1967
+ share: J("legLength")
1968
+ },
1969
+ {
1970
+ from: "l_knee",
1971
+ to: "l_hip",
1972
+ share: J("thighLength")
1973
+ },
1974
+ {
1975
+ from: "r_knee",
1976
+ to: "r_hip",
1977
+ share: J("thighLength")
1978
+ },
1979
+ {
1980
+ from: "l_hip",
1981
+ to: "l_shoulder",
1982
+ share: J("trunkLength")
1983
+ },
1984
+ {
1985
+ from: "r_hip",
1986
+ to: "r_shoulder",
1987
+ share: J("trunkLength")
1988
+ }
1989
+ ],
1990
+ proportions: q,
1991
+ segments: Te,
1992
+ couplings: Ee,
1993
+ volumes: Ce,
1994
+ apart: Z,
1995
+ feet: ["l", "r"].flatMap((e) => [`${e}_talocrural`, ...[
1996
+ 1,
1997
+ 2,
1998
+ 3
1999
+ ].map((t) => `${e}_metatarsophalangeal_${t}`)]),
2000
+ sources: fe,
2001
+ naming: ye,
2002
+ describeRest: ve
2003
+ });
2004
+ }
2005
+ function ve(e) {
2006
+ let t = [e.l_shoulder, e.r_shoulder].filter((e) => e !== void 0);
2007
+ if (!t.length) return "unknown";
2008
+ let n = t.reduce((e, t) => e + t.abduction, 0) / t.length;
2009
+ return t.reduce((e, t) => e + Math.abs(t.flexion), 0) / t.length > 30 ? "other" : n >= 65 ? "T" : n >= 20 ? "A" : "arms-down";
2010
+ }
2011
+ var M = (() => {
2012
+ let e = {
2013
+ hips: "humanoid_root",
2014
+ spine: "vl5",
2015
+ chest: "vt12",
2016
+ upperChest: "vt6",
2017
+ neck: "vc7",
2018
+ head: "vc1"
2019
+ };
2020
+ for (let [t, n] of [["left", "l"], ["right", "r"]]) Object.assign(e, {
2021
+ [`${t}Shoulder`]: `${n}_sternoclavicular`,
2022
+ [`${t}UpperArm`]: `${n}_shoulder`,
2023
+ [`${t}LowerArm`]: `${n}_elbow`,
2024
+ [`${t}Hand`]: `${n}_radiocarpal`,
2025
+ [`${t}UpperLeg`]: `${n}_hip`,
2026
+ [`${t}LowerLeg`]: `${n}_knee`,
2027
+ [`${t}Foot`]: `${n}_talocrural`,
2028
+ [`${t}Toes`]: `${n}_metatarsophalangeal_1`,
2029
+ [`${t}ThumbMetacarpal`]: `${n}_carpometacarpal_1`,
2030
+ [`${t}ThumbProximal`]: `${n}_metacarpophalangeal_1`,
2031
+ [`${t}ThumbDistal`]: `${n}_carpal_interphalangeal_1`
2032
+ }), [
2033
+ "Index",
2034
+ "Middle",
2035
+ "Ring",
2036
+ "Little"
2037
+ ].forEach((r, i) => {
2038
+ e[`${t}${r}Proximal`] = `${n}_metacarpophalangeal_${i + 2}`, e[`${t}${r}Intermediate`] = `${n}_carpal_proximal_interphalangeal_${i + 2}`, e[`${t}${r}Distal`] = `${n}_carpal_distal_interphalangeal_${i + 2}`;
2039
+ });
2040
+ return e;
2041
+ })(), N = (e) => e.replace(/^.*[:|]/, "").replace(/^mixamorig\d*_?/i, "").toLowerCase().replace(/[^a-z0-9]/g, ""), P = {
2042
+ spine01: "vl5",
2043
+ spine02: "vt12",
2044
+ spine03: "vt6"
2045
+ }, F = {
2046
+ spine01: "vl5",
2047
+ spine02: "vl3",
2048
+ spine03: "vt12",
2049
+ spine04: "vt8",
2050
+ spine05: "vt4"
2051
+ }, I = (() => {
2052
+ let e = {}, t = {
2053
+ hips: "humanoid_root",
2054
+ lowerback: "vl5",
2055
+ spine: "vl3",
2056
+ spine1: "vt12",
2057
+ spine2: "vt6",
2058
+ neck: "vc7",
2059
+ neck1: "vc4",
2060
+ head: "vc1"
2061
+ }, n = {
2062
+ hips: "humanoid_root",
2063
+ chest: "vl5",
2064
+ chest2: "vl2",
2065
+ chest3: "vt9",
2066
+ chest4: "vt4",
2067
+ neck: "vc7",
2068
+ head: "vc1"
2069
+ }, r = {
2070
+ hips: "humanoid_root",
2071
+ spine: "vl5",
2072
+ chest: "vt12",
2073
+ head: "vc1"
2074
+ }, i = (e) => {
2075
+ let t = {
2076
+ pelvis: "humanoid_root",
2077
+ neck01: "vc7",
2078
+ neck02: "vc4",
2079
+ head: "vc1",
2080
+ ...e
2081
+ };
2082
+ for (let e of ["l", "r"]) Object.assign(t, {
2083
+ [`clavicle${e}`]: `${e}_sternoclavicular`,
2084
+ [`upperarm${e}`]: `${e}_shoulder`,
2085
+ [`lowerarm${e}`]: `${e}_elbow`,
2086
+ [`hand${e}`]: `${e}_radiocarpal`,
2087
+ [`thigh${e}`]: `${e}_hip`,
2088
+ [`calf${e}`]: `${e}_knee`,
2089
+ [`foot${e}`]: `${e}_talocrural`,
2090
+ [`ball${e}`]: `${e}_metatarsophalangeal_1`,
2091
+ [`thumb01${e}`]: `${e}_carpometacarpal_1`,
2092
+ [`thumb02${e}`]: `${e}_metacarpophalangeal_1`,
2093
+ [`thumb03${e}`]: `${e}_carpal_interphalangeal_1`
2094
+ }), [
2095
+ "index",
2096
+ "middle",
2097
+ "ring",
2098
+ "pinky"
2099
+ ].forEach((n, r) => {
2100
+ t[`${n}metacarpal${e}`] = `${e}_carpometacarpal_${r + 2}`, t[`${n}01${e}`] = `${e}_metacarpophalangeal_${r + 2}`, t[`${n}02${e}`] = `${e}_carpal_proximal_interphalangeal_${r + 2}`, t[`${n}03${e}`] = `${e}_carpal_distal_interphalangeal_${r + 2}`;
2101
+ });
2102
+ return t;
2103
+ };
2104
+ for (let [i, a] of [["left", "l"], ["right", "r"]]) Object.assign(e, {
2105
+ [`${a}ankle`]: `${a}_talocrural`,
2106
+ [`${a}subtalar`]: `${a}_talocalcaneonavicular`,
2107
+ [`${a}metatarsal`]: `${a}_metatarsophalangeal_2`,
2108
+ [`${a}wrist`]: `${a}_radiocarpal`,
2109
+ [`${a}thumb1`]: `${a}_carpometacarpal_1`,
2110
+ [`${a}thumb2`]: `${a}_metacarpophalangeal_1`,
2111
+ [`${a}thumb3`]: `${a}_carpal_interphalangeal_1`
2112
+ }), [
2113
+ "index",
2114
+ "middle",
2115
+ "ring",
2116
+ "pinky"
2117
+ ].forEach((n, r) => {
2118
+ e[`${a}${n}0`] = `${a}_carpometacarpal_${r + 2}`, e[`${a}${n}1`] = `${a}_metacarpophalangeal_${r + 2}`, e[`${a}${n}2`] = `${a}_carpal_proximal_interphalangeal_${r + 2}`, e[`${a}${n}3`] = `${a}_carpal_distal_interphalangeal_${r + 2}`, t[`${i}hand${n}1`] = `${a}_metacarpophalangeal_${r + 2}`, t[`${i}hand${n}2`] = `${a}_carpal_proximal_interphalangeal_${r + 2}`, t[`${i}hand${n}3`] = `${a}_carpal_distal_interphalangeal_${r + 2}`;
2119
+ }), Object.assign(t, {
2120
+ [`${i}shoulder`]: `${a}_sternoclavicular`,
2121
+ [`${i}arm`]: `${a}_shoulder`,
2122
+ [`${i}forearm`]: `${a}_elbow`,
2123
+ [`${i}hand`]: `${a}_radiocarpal`,
2124
+ [`${i}upleg`]: `${a}_hip`,
2125
+ [`${i}leg`]: `${a}_knee`,
2126
+ [`${i}foot`]: `${a}_talocrural`,
2127
+ [`${i}toebase`]: `${a}_metatarsophalangeal_1`,
2128
+ [`${i}handthumb1`]: `${a}_carpometacarpal_1`,
2129
+ [`${i}handthumb2`]: `${a}_metacarpophalangeal_1`,
2130
+ [`${i}handthumb3`]: `${a}_carpal_interphalangeal_1`,
2131
+ [`${a}thumb`]: `${a}_carpometacarpal_1`
2132
+ }), Object.assign(r, {
2133
+ [`upperarm${a}`]: `${a}_shoulder`,
2134
+ [`lowerarm${a}`]: `${a}_elbow`,
2135
+ [`wrist${a}`]: `${a}_radiocarpal`,
2136
+ [`upperleg${a}`]: `${a}_hip`,
2137
+ [`lowerleg${a}`]: `${a}_knee`,
2138
+ [`foot${a}`]: `${a}_talocrural`,
2139
+ [`toes${a}`]: `${a}_metatarsophalangeal_1`
2140
+ }), Object.assign(n, {
2141
+ [`${i}collar`]: `${a}_sternoclavicular`,
2142
+ [`${i}shoulder`]: `${a}_shoulder`,
2143
+ [`${i}elbow`]: `${a}_elbow`,
2144
+ [`${i}wrist`]: `${a}_radiocarpal`,
2145
+ [`${i}hip`]: `${a}_hip`,
2146
+ [`${i}knee`]: `${a}_knee`,
2147
+ [`${i}ankle`]: `${a}_talocrural`,
2148
+ [`${i}toe`]: `${a}_metatarsophalangeal_1`
2149
+ });
2150
+ return {
2151
+ hanim: e,
2152
+ segments: t,
2153
+ joints: n,
2154
+ unreal: i(P),
2155
+ unreal5: i(F),
2156
+ kaykit: r
2157
+ };
2158
+ })(), L = {
2159
+ ccbasepelvis: "sacroiliac",
2160
+ ccbasenecktwist02: "vc4"
2161
+ }, R = {
2162
+ lhand: "l_radiocarpal",
2163
+ rhand: "r_radiocarpal",
2164
+ leftfingerbase: "l_radiocarpal",
2165
+ rightfingerbase: "r_radiocarpal"
2166
+ }, z = [
2167
+ "mixamo",
2168
+ "roblox",
2169
+ "godot",
2170
+ "margo",
2171
+ "cmu",
2172
+ "mpfb",
2173
+ "characterCreator",
2174
+ "humanoid"
2175
+ ], B = [
2176
+ "hanim",
2177
+ "segments",
2178
+ "joints",
2179
+ ...z,
2180
+ "unreal",
2181
+ "unreal5",
2182
+ "kaykit"
2183
+ ], V = null;
2184
+ function ye(n, r) {
2185
+ if (r !== void 0 && !B.includes(r)) throw RangeError(`Human naming "${r}" must be one of ${B.join(", ")}`);
2186
+ V ??= new Map(H.joints.map((e) => [N(e.id), e.id]));
2187
+ let i = n.map((e) => typeof e == "string" ? N(e) : ""), a = null, o = (e, t) => {
2188
+ if (r !== void 0 && r !== e) return;
2189
+ let n = /* @__PURE__ */ new Map();
2190
+ i.forEach((e, r) => {
2191
+ let i = t(e) ?? L[e];
2192
+ i && !n.has(i) && ![...n.values()].includes(r) && n.set(i, r);
2193
+ }), i.forEach((e, t) => {
2194
+ R[e] && n.has(R[e]) && n.set(R[e], t);
2195
+ }), n.has("humanoid_root") && (!a || n.size > a.joints.size) && (a = {
2196
+ preset: e,
2197
+ joints: n
2198
+ });
2199
+ };
2200
+ o("hanim", (e) => V.get(e) ?? I.hanim[e]), o("segments", (e) => I.segments[e]), o("joints", (e) => I.joints[e]);
2201
+ let s = i.includes("spine04");
2202
+ for (let e of [
2203
+ "unreal",
2204
+ "unreal5",
2205
+ "kaykit"
2206
+ ]) (r !== void 0 || e !== (s ? "unreal" : "unreal5")) && o(e, (t) => I[e][t]);
2207
+ let c = r === void 0 ? e([...n])?.preset : void 0;
2208
+ for (let e of z) {
2209
+ if (r === void 0 ? e !== c : e !== r) continue;
2210
+ let a = /* @__PURE__ */ new Map();
2211
+ for (let [r, i] of t([...n], e)) M[r] && a.set(i, M[r]);
2212
+ let s = new Map(i.map((e, t) => [e, a.get(t)]));
2213
+ o(e, (e) => s.get(e));
2214
+ }
2215
+ return a;
2216
+ }
2217
+ var H = j();
2218
+ function U(e, t = {}) {
2219
+ let { sex: n, age: r, ...a } = t;
2220
+ return i(e, {
2221
+ ...a,
2222
+ species: n === void 0 && r === void 0 ? H : j({
2223
+ sex: n,
2224
+ age: r
2225
+ })
2226
+ });
2227
+ }
2228
+ //#endregion
2229
+ export { c as ANSUR2, o as ANSUR2_FEMALES, s as ANSUR2_MALES, te as CDC_AGES, ne as CDC_MOTIONS, l as CDC_RANGE_OF_MOTION, ae as DE_LEVA_1996, B as HUMAN_NAMINGS, A as HUMAN_SPINE_LEVELS, U as fitHuman, H as human, j as humanTable };