quantum-component-library 0.0.1 → 1.0.0-alpha.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.
Files changed (119) hide show
  1. package/README.md +115 -69
  2. package/dist/babel-vendor-BOM86iTb.js +221 -0
  3. package/dist/babel-vendor-cKvSpnBp.cjs +3 -0
  4. package/dist/components/activity-list/index.d.ts +19 -0
  5. package/dist/components/copy-activity-form/index.d.ts +30 -0
  6. package/dist/components/copy-activity-form/index.stories.d.ts +6 -0
  7. package/dist/components/copy-module-form/index.d.ts +30 -0
  8. package/dist/components/copy-module-form/index.stories.d.ts +6 -0
  9. package/dist/components/index.d.ts +8 -0
  10. package/dist/components/module-form/index.d.ts +15 -0
  11. package/dist/components/parameter-edit-list/index.d.ts +13 -0
  12. package/dist/components/parameter-edit-select/index.d.ts +16 -0
  13. package/dist/components/test-filter-panel/index.d.ts +7 -0
  14. package/dist/components/ui/form/index.d.ts +4 -0
  15. package/dist/components/ui/form/label/index.d.ts +4 -0
  16. package/dist/components/ui/form/list-order-input/index.d.ts +14 -0
  17. package/dist/components/ui/form/radio-buttons/index.d.ts +16 -0
  18. package/dist/components/ui/form/range-slider-input/index.d.ts +17 -0
  19. package/dist/components/ui/index.d.ts +2 -1
  20. package/dist/components/ui/tag-group/index.d.ts +7 -0
  21. package/dist/components/upsert-activity-form/index.d.ts +18 -0
  22. package/dist/components/upsert-activity-form/index.stories.d.ts +6 -0
  23. package/dist/components/upsert-module-form/index.d.ts +17 -0
  24. package/dist/components/upsert-module-form/index.stories.d.ts +6 -0
  25. package/dist/components.cjs +13 -0
  26. package/dist/components.js +2078 -0
  27. package/dist/dnd-core-vendor-bgjKfDi6.cjs +1 -0
  28. package/dist/dnd-core-vendor-q7mfiuVu.js +750 -0
  29. package/dist/generated/fragment-masking.d.ts +19 -0
  30. package/dist/generated/gql.d.ts +271 -0
  31. package/dist/generated/graphql.d.ts +2326 -0
  32. package/dist/generated/index.d.ts +2 -0
  33. package/dist/generated-ChsGaiYd.cjs +1 -0
  34. package/dist/generated-GfcSQz21.js +65 -0
  35. package/dist/graphql/fragments/actions.d.ts +1 -0
  36. package/dist/graphql/fragments/analysis.d.ts +12 -0
  37. package/dist/graphql/fragments/groups.d.ts +1 -0
  38. package/dist/graphql/fragments/index.d.ts +6 -0
  39. package/dist/graphql/fragments/modules.d.ts +3 -0
  40. package/dist/graphql/fragments/playback.d.ts +11 -0
  41. package/dist/graphql/fragments/session.d.ts +3 -0
  42. package/dist/graphql/index.d.ts +3 -0
  43. package/dist/graphql/mutations/actions.d.ts +7 -0
  44. package/dist/graphql/mutations/index.d.ts +2 -0
  45. package/dist/graphql/mutations/modules.d.ts +13 -0
  46. package/dist/graphql/queries/actions.d.ts +19 -0
  47. package/dist/graphql/queries/groups.d.ts +9 -0
  48. package/dist/graphql/queries/index.d.ts +3 -0
  49. package/dist/graphql/queries/modules.d.ts +9 -0
  50. package/dist/graphql-CqPvuCvr.cjs +679 -0
  51. package/dist/graphql-DiUes2Np.js +735 -0
  52. package/dist/graphql-vendor-JsvuUrRs.cjs +14 -0
  53. package/dist/graphql-vendor-YnA_qhJA.js +669 -0
  54. package/dist/hooks.cjs +1 -0
  55. package/dist/hooks.js +84 -0
  56. package/dist/index.cjs +1 -0
  57. package/dist/index.d.ts +6 -1
  58. package/dist/index.js +132 -3159
  59. package/dist/lib/hooks/index.d.ts +7 -0
  60. package/dist/lib/hooks/use-graphql-client.d.ts +5 -0
  61. package/dist/lib/hooks/use-joints-for-limb-ids.d.ts +2 -0
  62. package/dist/lib/hooks/use-joints-for-sensor-locations.d.ts +2 -0
  63. package/dist/lib/hooks/use-limbs-for-sensor-locations.d.ts +2 -0
  64. package/dist/lib/hooks/use-part-options-for-joints.d.ts +3 -0
  65. package/dist/lib/hooks/use-part-options-for-limbs.d.ts +3 -0
  66. package/dist/lib/hooks/use-part-options-for-sensor-locations.d.ts +3 -0
  67. package/dist/lib/services/human.d.ts +69 -0
  68. package/dist/lib/services/index.d.ts +1 -0
  69. package/dist/lib/services/rom.json.d.ts +226 -0
  70. package/dist/lib/types/activity.d.ts +19 -0
  71. package/dist/lib/types/analysis.d.ts +115 -0
  72. package/dist/lib/types/athlete.d.ts +8 -0
  73. package/dist/lib/types/catalog.d.ts +35 -0
  74. package/dist/lib/types/error.d.ts +4 -0
  75. package/dist/lib/types/human-part.d.ts +23 -0
  76. package/dist/lib/types/human.d.ts +147 -0
  77. package/dist/lib/types/index.d.ts +14 -0
  78. package/dist/lib/types/parameters.d.ts +10 -0
  79. package/dist/lib/types/playback.d.ts +20 -0
  80. package/dist/lib/types/recording.d.ts +5 -0
  81. package/dist/lib/types/sensor-info.d.ts +105 -0
  82. package/dist/lib/types/threshold.d.ts +30 -0
  83. package/dist/lib/types/tracking.d.ts +82 -0
  84. package/dist/lib/types/upload.d.ts +28 -0
  85. package/dist/lib/utils/conversion.d.ts +27 -0
  86. package/dist/lib/utils/index.d.ts +6 -0
  87. package/dist/lib/utils/memo.d.ts +7 -0
  88. package/dist/lib/utils/parameters.d.ts +6 -0
  89. package/dist/lib/utils/text.d.ts +2 -0
  90. package/dist/lodash-vendor-D5A6v3mw.cjs +1 -0
  91. package/dist/lodash-vendor-Dz4vW7Gd.js +1120 -0
  92. package/dist/other-CmpBz5tg.js +15 -0
  93. package/dist/other-TR0ap-t4.cjs +1 -0
  94. package/dist/providers/index.d.ts +1 -0
  95. package/dist/providers/quantum-library-provider.d.ts +8 -0
  96. package/dist/providers.cjs +1 -0
  97. package/dist/providers.js +11 -0
  98. package/dist/quantum-component-library.css +1 -0
  99. package/dist/react-dnd-vendor-BWqlt2EC.cjs +2 -0
  100. package/dist/react-dnd-vendor-BZs2igAJ.js +1375 -0
  101. package/dist/react-icons-vendor-D2s8zw9h.cjs +1 -0
  102. package/dist/react-icons-vendor-TETORdU9.js +119 -0
  103. package/dist/react-select-vendor-By3h6JjH.cjs +4 -0
  104. package/dist/react-select-vendor-eBH7yy3O.js +2801 -0
  105. package/dist/services.cjs +1 -0
  106. package/dist/services.js +810 -0
  107. package/dist/styled-components-vendor-Bvwhddj9.js +1154 -0
  108. package/dist/styled-components-vendor-D09ATioU.cjs +60 -0
  109. package/dist/types.cjs +1 -0
  110. package/dist/types.js +316 -0
  111. package/dist/utils.cjs +1 -0
  112. package/dist/utils.js +128 -0
  113. package/dist/vendor-BeqUcSbw.cjs +45 -0
  114. package/dist/vendor-DvX9OX-j.js +7876 -0
  115. package/package.json +118 -60
  116. package/dist/components/ui/button.d.ts +0 -10
  117. package/dist/index.css +0 -1
  118. package/dist/index.umd.cjs +0 -22
  119. package/dist/lib/utils.d.ts +0 -2
@@ -0,0 +1,810 @@
1
+ import { axes as k, planes as A, AngleDataSource as c, limbAngle as S, jointAngle as E } from "./types.js";
2
+ import "./vendor-DvX9OX-j.js";
3
+ import { memo as l, capitalizeAll as R } from "./utils.js";
4
+ const w = { sagittal: { __COMMENT__: "-Plantar Flexion, +Dorsi flexion", min: -20, max: 30 }, frontal: { __COMMENT__: "-Inversion, +Eversion", min: -30, max: 20 }, transverse: { __COMMENT__: "-Pronation, +Supination", min: -10, max: 10 } }, T = { sagittal: { __COMMENT__: "-Plantar Flexion, +Dorsi flexion", min: -20, max: 30 }, frontal: { __COMMENT__: "-Inversion, +Eversion", min: -30, max: 20 }, transverse: { __COMMENT__: "-Pronation, +Supination", min: -10, max: 10 } }, v = { sagittal: { __COMMENT__: "-Extension, +Flexion", min: -5, max: 142 }, frontal: { __COMMENT__: "N/A", min: 0, max: 0 }, transverse: { __COMMENT__: "N/A", min: 0, max: 0 } }, N = { sagittal: { __COMMENT__: "-Extension, +Flexion", min: -5, max: 142 }, frontal: { __COMMENT__: "N/A", min: 0, max: 0 }, transverse: { __COMMENT__: "N/A", min: 0, max: 0 } }, b = { sagittal: { __COMMENT__: "-Extension, +Flexion", min: -18, max: 134 }, frontal: { __COMMENT__: "-Adduction, +Abduction", min: -20, max: 40 }, transverse: { __COMMENT__: "-Internal Rotation, +External Rotation", min: -40, max: 50 } }, F = { sagittal: { __COMMENT__: "-Extension, +Flexion", min: -18, max: 134 }, frontal: { __COMMENT__: "-Adduction, +Abduction", min: -20, max: 40 }, transverse: { __COMMENT__: "-Internal Rotation, +External Rotation", min: -40, max: 50 } }, M = { sagittal: { __COMMENT__: "-Extension, +Flexion", min: -75, max: 60 }, frontal: { __COMMENT__: "-Bend Right, +Bend Left", min: -45, max: 45 }, transverse: { __COMMENT__: "-Twist Right, +Twist Left", min: -80, max: 80 } }, C = { sagittal: { __COMMENT__: "-Extension, +Flexion", min: -25, max: 50 }, frontal: { __COMMENT__: "-Bend Right, +Bend Left", min: -25, max: 25 }, transverse: { __COMMENT__: "-Twist Right, +Twist Left", min: -30, max: 30 } }, P = { __COMMENT__: "This is the sum of the ChestSpine and NavalSpine", sagittal: { __COMMENT__: "-Extension, +Flexion", min: -100, max: 110 }, frontal: { __COMMENT__: "-Bend Right, +Bend Left", min: -70, max: 70 }, transverse: { __COMMENT__: "-Twist Right, +Twist Left", min: -110, max: 110 } }, B = { sagittal: { __COMMENT__: "-Extension, +Flexion", min: -50, max: 180 }, frontal: { __COMMENT__: "-Adduction, +Abduction", min: -50, max: 180 }, transverse: { __COMMENT__: "-Internal Rotation, +External Rotation", min: -90, max: 90 } }, H = { sagittal: { __COMMENT__: "-Extension, +Flexion", min: -50, max: 180 }, frontal: { __COMMENT__: "-Adduction, +Abduction", min: -50, max: 180 }, transverse: { __COMMENT__: "-Internal Rotation, +External Rotation", min: -90, max: 90 } }, U = { sagittal: { __COMMENT__: "-Extension, +Flexion", min: 0, max: 140 }, frontal: { __COMMENT__: "N/A", min: 0, max: 0 }, transverse: { __COMMENT__: "-Pronation/+Supination (of forearm)", min: -80, max: 80 } }, O = { sagittal: { __COMMENT__: "-Extension, +Flexion", min: 0, max: 140 }, frontal: { __COMMENT__: "N/A", min: 0, max: 0 }, transverse: { __COMMENT__: "-Pronation/+Supination (of forearm)", min: -80, max: 80 } }, x = {
5
+ LeftAnkle: w,
6
+ RightAnkle: T,
7
+ LeftKnee: v,
8
+ RightKnee: N,
9
+ LeftHip: b,
10
+ RightHip: F,
11
+ NavalSpine: M,
12
+ ChestSpine: C,
13
+ TotalSpine: P,
14
+ LeftShoulder: B,
15
+ RightShoulder: H,
16
+ LeftElbow: U,
17
+ RightElbow: O
18
+ }, i = {
19
+ LeftFoot: "Left Foot",
20
+ RightFoot: "Right Foot",
21
+ LeftShank: "Left Shank",
22
+ RightShank: "Right Shank",
23
+ LeftThigh: "Left Thigh",
24
+ RightThigh: "Right Thigh",
25
+ LeftPelvis: "Left Pelvis",
26
+ RightPelvis: "Right Pelvis",
27
+ LowerBack: "Pelvis",
28
+ CenterBack: "Center Back",
29
+ UpperBack: "Thorax",
30
+ Head: "Head",
31
+ LeftClavicle: "Left Clavicle",
32
+ RightClavicle: "Right Clavicle",
33
+ LeftUpperArm: "Left Upper Arm",
34
+ RightUpperArm: "Right Upper Arm",
35
+ LeftForearm: "Left Forearm",
36
+ RightForearm: "Right Forearm"
37
+ }, a = {
38
+ LeftAnkle: "Left Ankle",
39
+ RightAnkle: "Right Ankle",
40
+ LeftKnee: "Left Knee",
41
+ RightKnee: "Right Knee",
42
+ LeftHip: "Left Hip",
43
+ RightHip: "Right Hip",
44
+ NavalSpine: "Lower Back",
45
+ ChestSpine: "Upper Back",
46
+ TotalSpine: "Total Spine",
47
+ LeftShoulder: "Left Shoulder",
48
+ RightShoulder: "Right Shoulder",
49
+ LeftElbow: "Left Elbow",
50
+ RightElbow: "Right Elbow",
51
+ Neck: "Neck"
52
+ }, me = {
53
+ LeftFoot: ["LeftAnkle"],
54
+ RightFoot: ["RightAnkle"],
55
+ LeftShank: ["LeftKnee", "LeftAnkle"],
56
+ RightShank: ["RightKnee", "RightAnkle"],
57
+ LeftThigh: ["LeftHip", "LeftKnee"],
58
+ RightThigh: ["RightHip", "RightKnee"],
59
+ LeftPelvis: ["LeftHip"],
60
+ RightPelvis: ["RightHip"],
61
+ LowerBack: ["LeftHip", "RightHip", "NavalSpine", "TotalSpine"],
62
+ CenterBack: ["NavalSpine", "ChestSpine"],
63
+ UpperBack: ["ChestSpine", "TotalSpine"],
64
+ Head: ["Neck"],
65
+ LeftClavicle: ["LeftShoulder"],
66
+ RightClavicle: ["RightShoulder"],
67
+ LeftUpperArm: ["LeftShoulder", "LeftElbow"],
68
+ RightUpperArm: ["RightShoulder", "RightElbow"],
69
+ LeftForearm: ["LeftElbow"],
70
+ RightForearm: ["RightElbow"]
71
+ }, d = {
72
+ LeftAnkle: ["LeftFoot", "LeftShank"],
73
+ RightAnkle: ["RightFoot", "RightShank"],
74
+ LeftKnee: ["LeftShank", "LeftThigh"],
75
+ RightKnee: ["RightShank", "RightThigh"],
76
+ LeftHip: ["LeftThigh", "LowerBack"],
77
+ RightHip: ["RightThigh", "LowerBack"],
78
+ NavalSpine: ["LowerBack", "CenterBack"],
79
+ ChestSpine: ["CenterBack", "UpperBack"],
80
+ TotalSpine: ["UpperBack", "LowerBack"],
81
+ LeftShoulder: ["LeftClavicle", "LeftUpperArm"],
82
+ RightShoulder: ["RightClavicle", "RightUpperArm"],
83
+ LeftElbow: ["LeftUpperArm", "LeftForearm"],
84
+ RightElbow: ["RightUpperArm", "RightForearm"],
85
+ Neck: ["Head", "UpperBack"]
86
+ }, _ = () => [
87
+ { id: "LeftFoot", name: i.LeftFoot },
88
+ { id: "RightFoot", name: i.RightFoot },
89
+ { id: "LeftShank", name: i.LeftShank },
90
+ { id: "RightShank", name: i.RightShank },
91
+ { id: "LeftThigh", name: i.LeftThigh },
92
+ { id: "RightThigh", name: i.RightThigh },
93
+ // { id: 'LeftPelvis', name: limbNames.LeftPelvis },
94
+ // { id: 'RightPelvis', name: limbNames.RightPelvis },
95
+ { id: "LowerBack", name: i.LowerBack },
96
+ { id: "CenterBack", name: i.CenterBack },
97
+ { id: "UpperBack", name: i.UpperBack },
98
+ { id: "Head", name: i.Head },
99
+ // { id: 'LeftClavicle', name: limbNames.LeftClavicle },
100
+ // { id: 'RightClavicle', name: limbNames.RightClavicle },
101
+ { id: "LeftUpperArm", name: i.LeftUpperArm },
102
+ { id: "RightUpperArm", name: i.RightUpperArm },
103
+ { id: "LeftForearm", name: i.LeftForearm },
104
+ { id: "RightForearm", name: i.RightForearm }
105
+ ], he = (t) => _().filter((e) => t.find((n) => n == e.id)), K = () => [
106
+ { id: "LeftAnkle", name: a.LeftAnkle },
107
+ { id: "RightAnkle", name: a.RightAnkle },
108
+ { id: "LeftKnee", name: a.LeftKnee },
109
+ { id: "RightKnee", name: a.RightKnee },
110
+ { id: "LeftHip", name: a.LeftHip },
111
+ { id: "RightHip", name: a.RightHip },
112
+ { id: "NavalSpine", name: a.NavalSpine },
113
+ { id: "ChestSpine", name: a.ChestSpine },
114
+ { id: "TotalSpine", name: a.TotalSpine },
115
+ { id: "LeftShoulder", name: a.LeftShoulder },
116
+ { id: "RightShoulder", name: a.RightShoulder },
117
+ { id: "LeftElbow", name: a.LeftElbow },
118
+ { id: "RightElbow", name: a.RightElbow },
119
+ { id: "Neck", name: a.Neck }
120
+ ], j = () => [
121
+ { id: "LeftAnkle", name: a.LeftAnkle },
122
+ { id: "RightAnkle", name: a.RightAnkle },
123
+ { id: "LeftKnee", name: a.LeftKnee },
124
+ { id: "RightKnee", name: a.RightKnee },
125
+ { id: "LeftHip", name: a.LeftHip },
126
+ { id: "RightHip", name: a.RightHip },
127
+ { id: "NavalSpine", name: a.NavalSpine },
128
+ { id: "ChestSpine", name: a.ChestSpine },
129
+ { id: "TotalSpine", name: a.TotalSpine },
130
+ { id: "LeftShoulder", name: a.LeftShoulder },
131
+ { id: "RightShoulder", name: a.RightShoulder },
132
+ // TODO: Left & Right elbow hidden while validation is being done
133
+ // { id: 'LeftElbow', name: jointNames.LeftElbow },
134
+ // { id: 'RightElbow', name: jointNames.RightElbow },
135
+ { id: "Neck", name: a.Neck }
136
+ ], J = () => [
137
+ { id: "LeftAnkle", name: a.LeftAnkle },
138
+ { id: "RightAnkle", name: a.RightAnkle },
139
+ { id: "LeftKnee", name: a.LeftKnee },
140
+ { id: "RightKnee", name: a.RightKnee },
141
+ { id: "LeftHip", name: a.LeftHip },
142
+ { id: "RightHip", name: a.RightHip },
143
+ { id: "TotalSpine", name: a.TotalSpine },
144
+ { id: "LeftShoulder", name: a.LeftShoulder },
145
+ { id: "RightShoulder", name: a.RightShoulder },
146
+ { id: "LeftElbow", name: a.LeftElbow },
147
+ { id: "RightElbow", name: a.RightElbow },
148
+ { id: "Neck", name: a.Neck }
149
+ ], ge = () => [
150
+ { id: "Head", name: i.Head },
151
+ { id: "LeftThigh", name: i.LeftThigh },
152
+ { id: "RightThigh", name: i.RightThigh },
153
+ { id: "LeftShank", name: i.LeftShank },
154
+ { id: "RightShank", name: i.RightShank },
155
+ { id: "LeftFoot", name: i.LeftFoot },
156
+ { id: "RightFoot", name: i.RightFoot },
157
+ { id: "LowerBack", name: i.LowerBack },
158
+ { id: "UpperBack", name: i.UpperBack },
159
+ { id: "LeftUpperArm", name: i.LeftUpperArm },
160
+ { id: "RightUpperArm", name: i.RightUpperArm },
161
+ { id: "LeftForearm", name: i.LeftForearm },
162
+ { id: "RightForearm", name: i.RightForearm }
163
+ ], fe = (t) => j().filter((n) => d[n.id].every((s) => t.includes(s))), ue = (t) => J().filter((n) => d[n.id].every((s) => t.includes(s))), y = (t, e, n) => {
164
+ if (n)
165
+ return ["frontal", "sagittal", "transverse"];
166
+ switch (t) {
167
+ case "LeftKnee":
168
+ case "RightKnee":
169
+ return ["sagittal"];
170
+ case "LeftAnkle":
171
+ case "RightAnkle":
172
+ return e && e == c.Pose ? ["sagittal"] : ["frontal", "sagittal"];
173
+ case "TotalSpine":
174
+ return e && e == c.Pose ? ["frontal"] : ["frontal", "sagittal", "transverse"];
175
+ case "LeftElbow":
176
+ case "RightElbow":
177
+ return e && e == c.Pose ? ["sagittal"] : ["frontal", "sagittal", "transverse"];
178
+ }
179
+ return e && e == c.Pose ? ["frontal", "sagittal"] : ["frontal", "sagittal", "transverse"];
180
+ }, $ = (t, e) => {
181
+ if (e === c.Sensor)
182
+ return ["frontal", "sagittal", "transverse"];
183
+ switch (t) {
184
+ case "Head":
185
+ case "LeftThigh":
186
+ case "RightThigh":
187
+ case "LeftShank":
188
+ case "RightShank":
189
+ case "LeftUpperArm":
190
+ case "RightUpperArm":
191
+ case "LeftForearm":
192
+ case "RightForearm":
193
+ return ["frontal", "sagittal"];
194
+ case "LeftFoot":
195
+ case "RightFoot":
196
+ return ["sagittal"];
197
+ case "LowerBack":
198
+ return ["frontal"];
199
+ case "UpperBack":
200
+ return ["frontal", "sagittal"];
201
+ }
202
+ return [];
203
+ }, D = l(
204
+ (t, e, n) => {
205
+ switch (t) {
206
+ case "LeftAnkle":
207
+ case "RightAnkle":
208
+ switch (e) {
209
+ case "frontal":
210
+ return n < 0 ? "inversion" : "eversion";
211
+ case "sagittal":
212
+ return n < 0 ? "plantar flexion" : "dorsi flexion";
213
+ case "transverse":
214
+ return n < 0 ? "internal rotation" : "external rotation";
215
+ }
216
+ case "LeftKnee":
217
+ case "RightKnee":
218
+ switch (e) {
219
+ case "frontal":
220
+ return n < 0 ? "adduction" : "abduction";
221
+ case "sagittal":
222
+ return n < 0 ? "extension" : "flexion";
223
+ case "transverse":
224
+ return n < 0 ? "internal rotation" : "external rotation";
225
+ }
226
+ case "LeftHip":
227
+ case "RightHip":
228
+ case "LeftShoulder":
229
+ case "RightShoulder":
230
+ switch (e) {
231
+ case "frontal":
232
+ return n < 0 ? "adduction" : "abduction";
233
+ case "sagittal":
234
+ return n < 0 ? "extension" : "flexion";
235
+ case "transverse":
236
+ return n < 0 ? "internal rotation" : "external rotation";
237
+ }
238
+ case "NavalSpine":
239
+ case "ChestSpine":
240
+ case "TotalSpine":
241
+ case "Neck":
242
+ switch (e) {
243
+ case "frontal":
244
+ return n < 0 ? "right lateral flexion" : "left lateral flexion";
245
+ case "sagittal":
246
+ return n < 0 ? "extension" : "flexion";
247
+ case "transverse":
248
+ return n < 0 ? "right rotation" : "left rotation";
249
+ }
250
+ case "LeftElbow":
251
+ case "RightElbow":
252
+ switch (e) {
253
+ case "frontal":
254
+ return null;
255
+ case "sagittal":
256
+ return n < 0 ? "extension" : "flexion";
257
+ case "transverse":
258
+ return n < 0 ? "pronation" : "supination";
259
+ }
260
+ }
261
+ return null;
262
+ }
263
+ ), I = l(
264
+ (t, e, n) => {
265
+ switch (t) {
266
+ case "LeftAnkle":
267
+ case "RightAnkle":
268
+ switch (e) {
269
+ case "frontal":
270
+ return n < 0 ? "Inv." : "Ev.";
271
+ case "sagittal":
272
+ return n < 0 ? "PF." : "DF.";
273
+ case "transverse":
274
+ return n < 0 ? "IR." : "ER.";
275
+ }
276
+ case "LeftKnee":
277
+ case "RightKnee":
278
+ switch (e) {
279
+ case "frontal":
280
+ return n < 0 ? "Add." : "Abd.";
281
+ case "sagittal":
282
+ return n < 0 ? "Ext." : "Flex.";
283
+ case "transverse":
284
+ return n < 0 ? "IR." : "ER.";
285
+ }
286
+ case "LeftHip":
287
+ case "RightHip":
288
+ case "LeftShoulder":
289
+ case "RightShoulder":
290
+ switch (e) {
291
+ case "frontal":
292
+ return n < 0 ? "Add." : "Abd.";
293
+ case "sagittal":
294
+ return n < 0 ? "Ext." : "Flex.";
295
+ case "transverse":
296
+ return n < 0 ? "IR." : "ER.";
297
+ }
298
+ case "NavalSpine":
299
+ case "ChestSpine":
300
+ case "TotalSpine":
301
+ case "Neck":
302
+ switch (e) {
303
+ case "frontal":
304
+ return n < 0 ? "R. Bend" : "L. Bend";
305
+ case "sagittal":
306
+ return n < 0 ? "Ext." : "Flex.";
307
+ case "transverse":
308
+ return n < 0 ? "R. Rot." : "L. Rot.";
309
+ }
310
+ case "LeftElbow":
311
+ case "RightElbow":
312
+ switch (e) {
313
+ case "frontal":
314
+ return null;
315
+ case "sagittal":
316
+ return n < 0 ? "Ext." : "Flex.";
317
+ case "transverse":
318
+ return n < 0 ? "Pro." : "Sup.";
319
+ }
320
+ }
321
+ return null;
322
+ }
323
+ ), u = l(
324
+ (t, e, n) => {
325
+ switch (t) {
326
+ case "LowerBack":
327
+ case "LeftPelvis":
328
+ case "RightPelvis":
329
+ switch (e) {
330
+ case "frontal":
331
+ return n < 0 ? "right drop" : "left drop";
332
+ case "sagittal":
333
+ return n < 0 ? "anterior tilt" : "posterior tilt";
334
+ case "transverse":
335
+ return n < 0 ? "right rotation" : "left rotation";
336
+ }
337
+ case "Head":
338
+ case "UpperBack":
339
+ case "CenterBack":
340
+ case "LeftShank":
341
+ case "RightShank":
342
+ case "LeftThigh":
343
+ case "RightThigh":
344
+ case "LeftFoot":
345
+ case "RightFoot":
346
+ case "LeftUpperArm":
347
+ case "RightUpperArm":
348
+ case "LeftForearm":
349
+ case "RightForearm":
350
+ switch (e) {
351
+ case "frontal":
352
+ return n < 0 ? "right tilt" : "left tilt";
353
+ case "sagittal":
354
+ return n < 0 ? "anterior tilt" : "posterior tilt";
355
+ case "transverse":
356
+ return n < 0 ? "right rotation" : "left rotation";
357
+ }
358
+ default:
359
+ return null;
360
+ }
361
+ }
362
+ ), z = l(
363
+ (t, e, n) => {
364
+ switch (t) {
365
+ case "LowerBack":
366
+ case "LeftPelvis":
367
+ case "RightPelvis":
368
+ switch (e) {
369
+ case "frontal":
370
+ return n < 0 ? "R. Drop" : "L. Drop";
371
+ case "sagittal":
372
+ return n < 0 ? "Ant. Tilt" : "Pos. Tilt";
373
+ case "transverse":
374
+ return n < 0 ? "R. Rot." : "L. Rot.";
375
+ }
376
+ case "Head":
377
+ case "UpperBack":
378
+ case "CenterBack":
379
+ case "LeftShank":
380
+ case "RightShank":
381
+ case "LeftThigh":
382
+ case "RightThigh":
383
+ case "LeftFoot":
384
+ case "RightFoot":
385
+ case "LeftUpperArm":
386
+ case "RightUpperArm":
387
+ case "LeftForearm":
388
+ case "RightForearm":
389
+ switch (e) {
390
+ case "frontal":
391
+ return n < 0 ? "R. Tilt" : "L. Tilt";
392
+ case "sagittal":
393
+ return n < 0 ? "Ant. Tilt" : "Pos. Tilt";
394
+ case "transverse":
395
+ return n < 0 ? "R. Rot." : "L. Rot.";
396
+ }
397
+ default:
398
+ return null;
399
+ }
400
+ }
401
+ ), Re = l(
402
+ (t, e) => {
403
+ switch (t) {
404
+ case "LeftAnkle":
405
+ case "RightAnkle":
406
+ switch (e) {
407
+ case "frontal":
408
+ return { min: -20, max: 20 };
409
+ case "sagittal":
410
+ return { min: -30, max: 30 };
411
+ case "transverse":
412
+ return { min: -5, max: 5 };
413
+ }
414
+ case "LeftKnee":
415
+ case "RightKnee":
416
+ switch (e) {
417
+ case "frontal":
418
+ return { min: -5, max: 5 };
419
+ case "sagittal":
420
+ return { min: -5, max: 90 };
421
+ case "transverse":
422
+ return { min: -5, max: 5 };
423
+ }
424
+ case "LeftHip":
425
+ case "RightHip":
426
+ return { min: -30, max: 30 };
427
+ case "LeftShoulder":
428
+ case "RightShoulder":
429
+ return { min: -50, max: 50 };
430
+ case "NavalSpine":
431
+ case "ChestSpine":
432
+ case "TotalSpine":
433
+ case "Neck":
434
+ switch (e) {
435
+ case "frontal":
436
+ return { min: -5, max: 5 };
437
+ case "sagittal":
438
+ return { min: -5, max: 5 };
439
+ case "transverse":
440
+ return { min: -5, max: 5 };
441
+ }
442
+ case "LeftElbow":
443
+ case "RightElbow":
444
+ switch (e) {
445
+ case "frontal":
446
+ return { min: -5, max: 5 };
447
+ case "sagittal":
448
+ return { min: -5, max: 50 };
449
+ case "transverse":
450
+ return { min: -5, max: 5 };
451
+ }
452
+ }
453
+ return { min: -10, max: 10 };
454
+ }
455
+ ), Le = l(
456
+ (t, e) => {
457
+ switch (t) {
458
+ case "LeftFoot":
459
+ case "RightFoot":
460
+ switch (e) {
461
+ case "frontal":
462
+ return { min: -20, max: 20 };
463
+ case "sagittal":
464
+ return { min: -30, max: 30 };
465
+ case "transverse":
466
+ return { min: -5, max: 5 };
467
+ }
468
+ case "LeftShank":
469
+ case "RightShank":
470
+ switch (e) {
471
+ case "frontal":
472
+ return { min: -35, max: 35 };
473
+ case "sagittal":
474
+ return { min: -35, max: 35 };
475
+ case "transverse":
476
+ return { min: -5, max: 5 };
477
+ }
478
+ case "LeftThigh":
479
+ case "RightThigh":
480
+ switch (e) {
481
+ case "frontal":
482
+ return { min: -35, max: 35 };
483
+ case "sagittal":
484
+ return { min: -35, max: 35 };
485
+ case "transverse":
486
+ return { min: -10, max: 5 };
487
+ }
488
+ case "LeftPelvis":
489
+ case "RightPelvis":
490
+ switch (e) {
491
+ case "frontal":
492
+ return { min: -15, max: 15 };
493
+ case "sagittal":
494
+ return { min: -10, max: 10 };
495
+ case "transverse":
496
+ return { min: -10, max: 10 };
497
+ }
498
+ case "LowerBack":
499
+ case "CenterBack":
500
+ case "UpperBack":
501
+ case "Head":
502
+ return { min: -5, max: 5 };
503
+ case "LeftClavicle":
504
+ case "RightClavicle":
505
+ switch (e) {
506
+ case "frontal":
507
+ return { min: -15, max: 15 };
508
+ case "sagittal":
509
+ return { min: -10, max: 10 };
510
+ case "transverse":
511
+ return { min: -10, max: 10 };
512
+ }
513
+ case "LeftUpperArm":
514
+ case "RightUpperArm":
515
+ case "LeftForearm":
516
+ case "RightForearm":
517
+ switch (e) {
518
+ case "frontal":
519
+ return { min: -45, max: 45 };
520
+ case "sagittal":
521
+ return { min: -45, max: 45 };
522
+ case "transverse":
523
+ return { min: -20, max: 20 };
524
+ }
525
+ }
526
+ return { min: -10, max: 10 };
527
+ }
528
+ ), xe = l(
529
+ (t, e) => {
530
+ switch (t) {
531
+ case "LeftAnkle":
532
+ case "RightAnkle":
533
+ switch (e) {
534
+ case "frontal":
535
+ return { min: -40, max: 30 };
536
+ case "sagittal":
537
+ return { min: -80, max: 50 };
538
+ case "transverse":
539
+ return { min: -90, max: 90 };
540
+ }
541
+ case "LeftKnee":
542
+ case "RightKnee":
543
+ switch (e) {
544
+ case "frontal":
545
+ return { min: -15, max: 5 };
546
+ case "sagittal":
547
+ return { min: -10, max: 160 };
548
+ case "transverse":
549
+ return { min: -35, max: 45 };
550
+ }
551
+ case "LeftHip":
552
+ case "RightHip":
553
+ switch (e) {
554
+ case "frontal":
555
+ return { min: -50, max: 60 };
556
+ case "sagittal":
557
+ return { min: -50, max: 150 };
558
+ case "transverse":
559
+ return { min: -60, max: 70 };
560
+ }
561
+ case "TotalSpine":
562
+ switch (e) {
563
+ case "frontal":
564
+ return { min: -60, max: 60 };
565
+ case "sagittal":
566
+ return { min: -50, max: 150 };
567
+ case "transverse":
568
+ return { min: -50, max: 50 };
569
+ }
570
+ case "ChestSpine":
571
+ switch (e) {
572
+ case "frontal":
573
+ return { min: -25, max: 25 };
574
+ case "sagittal":
575
+ return { min: -25, max: 40 };
576
+ case "transverse":
577
+ return { min: -35, max: 35 };
578
+ }
579
+ case "NavalSpine":
580
+ switch (e) {
581
+ case "frontal":
582
+ return { min: -25, max: 25 };
583
+ case "sagittal":
584
+ return { min: -35, max: 60 };
585
+ case "transverse":
586
+ return { min: -15, max: 15 };
587
+ }
588
+ default:
589
+ return { min: -180, max: 180 };
590
+ }
591
+ }
592
+ ), W = (t, e) => ({
593
+ kind: "joint",
594
+ value: t,
595
+ plane: e
596
+ }), V = (t, e) => ({
597
+ kind: "limb",
598
+ value: t,
599
+ plane: e
600
+ }), q = (t, e) => ({
601
+ kind: "acceleration",
602
+ value: t,
603
+ axis: e
604
+ }), X = (t, e) => ({
605
+ kind: "angular_velocity",
606
+ value: t,
607
+ plane: e
608
+ }), G = (t) => k.includes(t), de = (t) => A.includes(t), Q = (t) => typeof t == "object" && t !== null && "id" in t && "name" in t && !!_().find((e) => e.id === t.id), Y = (t) => typeof t == "object" && t !== null && "id" in t && "name" in t && !!K().find((e) => e.id === t.id), _e = (t, e, n = !1) => G(e) ? Q(t) ? q(t, e) : Z(
609
+ `Can't make acceleration part from joint: ${t} ${e}`
610
+ ) : Y(t) ? n ? X(t, e) : W(t, e) : V(t, e), pe = (t) => t.kind === "acceleration" ? t.axis : t.plane, ke = (t) => t?.kind === "acceleration" ? t.axis : null, Ae = (t) => t?.kind === "acceleration" ? null : t?.plane ?? null, Z = (t) => {
611
+ throw new Error(t);
612
+ }, f = (t) => t in a ? a[t] : t in i ? i[t] : "Unknown", Se = (t) => f(t).replace(/Left|Right/g, ""), ee = (t) => t in x, te = (t, e) => {
613
+ if (!ee(t))
614
+ return null;
615
+ const n = x[t];
616
+ if (e in n) {
617
+ const { min: r, max: s } = n[e];
618
+ return {
619
+ min: r ?? 0,
620
+ max: s ?? 0
621
+ };
622
+ }
623
+ return null;
624
+ }, Ee = (...t) => {
625
+ const e = te(...t);
626
+ return e ? Math.abs(e.max - e.min) : 0;
627
+ }, ne = (t, e) => {
628
+ const n = Object.keys(i).find((s) => s === e), r = Object.keys(a).find((s) => s === e);
629
+ return !n && !r ? null : n ? t.limbs[e].sensor_angle ? c.Sensor : c.Pose : t.joints[e].sensor_angle ? c.Sensor : c.Pose;
630
+ }, we = (t, e, n) => {
631
+ const r = Object.keys(a).find((o) => o === e), s = ne(t, e);
632
+ return s ? r ? y(e, s).includes(n) : $(e, s).includes(n) : !1;
633
+ }, Te = (t, e, n) => {
634
+ const r = Object.keys(i).find((o) => o === e), s = Object.keys(a).find((o) => o === e);
635
+ if (!r && !s)
636
+ throw new Error(
637
+ `Unknown partId: ${e} - this invariant should've been enforced by typescript`
638
+ );
639
+ return r ? S(t.limbs[e])?.[n] ?? null : E(
640
+ t.joints[e],
641
+ void 0,
642
+ t.direction
643
+ )?.[n] ?? null;
644
+ }, g = (t = !1) => t ? "Internal/External Rotation" : "External/Internal Rotation", ae = (t, e, n = !1) => {
645
+ switch (t) {
646
+ case "LeftAnkle":
647
+ case "RightAnkle":
648
+ switch (e) {
649
+ case "frontal":
650
+ return n ? "Inversion/Eversion" : "Eversion/Inversion";
651
+ case "sagittal":
652
+ return n ? "Plantar/Dorsi Flexion" : "Dorsi/Plantar Flexion";
653
+ case "transverse":
654
+ return g(n);
655
+ }
656
+ case "LeftKnee":
657
+ case "RightKnee":
658
+ switch (e) {
659
+ case "frontal":
660
+ return n ? "Adduction/Abduction" : "Abduction/Adduction";
661
+ case "sagittal":
662
+ return n ? "Extension/Flexion" : "Flexion/Extension";
663
+ case "transverse":
664
+ return g(n);
665
+ }
666
+ case "LeftHip":
667
+ case "RightHip":
668
+ switch (e) {
669
+ case "frontal":
670
+ return n ? "Adduction/Abduction" : "Abduction/Adduction";
671
+ case "sagittal":
672
+ return n ? "Extension/Flexion" : "Flexion/Extension";
673
+ case "transverse":
674
+ return g(n);
675
+ }
676
+ case "NavalSpine":
677
+ case "ChestSpine":
678
+ case "TotalSpine":
679
+ case "Neck":
680
+ switch (e) {
681
+ case "frontal":
682
+ return "Lateral Bend";
683
+ case "sagittal":
684
+ return n ? "Extension/Flexion" : "Flexion/Extension";
685
+ case "transverse":
686
+ return "Rotation";
687
+ }
688
+ case "LeftShoulder":
689
+ case "RightShoulder":
690
+ switch (e) {
691
+ case "frontal":
692
+ return n ? "Adduction/Abduction" : "Abduction/Adduction";
693
+ case "sagittal":
694
+ return n ? "Extension/Flexion" : "Flexion/Extension";
695
+ case "transverse":
696
+ return g(n);
697
+ }
698
+ case "LeftElbow":
699
+ case "RightElbow":
700
+ switch (e) {
701
+ case "frontal":
702
+ return n ? "Adduction/Abduction" : "Abduction/Adduction";
703
+ case "sagittal":
704
+ return n ? "Extension/Flexion" : "Flexion/Extension";
705
+ case "transverse":
706
+ return n ? "Pronation/Supination" : "Supination/Pronation";
707
+ }
708
+ }
709
+ }, ie = (t, e, n = !1) => {
710
+ const r = f(t), s = u(t, e, 1), o = u(t, e, -1);
711
+ if (s && o) {
712
+ const m = R(s), h = R(o), p = n ? `${h}/${m}` : `${m}/${h}`;
713
+ return `${r} (${p})`;
714
+ }
715
+ return `${r} (${e})`;
716
+ }, ve = (t, e) => {
717
+ let n;
718
+ switch (e) {
719
+ case "x":
720
+ n = "Med./Lat.";
721
+ break;
722
+ case "y":
723
+ n = "Vertical";
724
+ break;
725
+ case "z":
726
+ n = "Ant./Post.";
727
+ }
728
+ return `${f(t)} ${n}`;
729
+ }, se = (t, e, n = !1) => {
730
+ const r = f(t), s = ae(t, e, n);
731
+ return s ? `${r} (${s})` : null;
732
+ }, Ne = (t, e) => se(t, e) || ie(t, e), L = (t, e, n, r = !1) => {
733
+ const s = r ? I : D, o = r ? z : u, [m, h] = t === "joint" ? [
734
+ s(e, n, 1),
735
+ s(e, n, -1)
736
+ ] : [
737
+ o(e, n, 1),
738
+ o(e, n, -1)
739
+ ];
740
+ return {
741
+ positive: m,
742
+ negative: h
743
+ };
744
+ }, re = (t, e = !1) => t.partKind === "joint" ? L(
745
+ "joint",
746
+ t.partId,
747
+ t.partDimension,
748
+ e
749
+ ) : L(
750
+ "segment",
751
+ t.partId,
752
+ t.partDimension,
753
+ e
754
+ ), be = (t, e, n = !1) => {
755
+ const { positive: r, negative: s } = re(
756
+ e,
757
+ n
758
+ );
759
+ return t >= 0 ? r : s;
760
+ };
761
+ export {
762
+ K as getAllAvailableJoints,
763
+ _ as getAllAvailableLimbs,
764
+ J as getAllAvailablePoseJoints,
765
+ ge as getAllAvailablePoseLimbs,
766
+ j as getAllAvailableSensorJoints,
767
+ L as getAngleDirectionNames,
768
+ he as getAvailableLimbsForLimbIds,
769
+ ue as getAvailablePoseJointsForLimbIds,
770
+ fe as getAvailableSensorJointsForLimbIds,
771
+ ke as getAxis,
772
+ ne as getDefaultAngleSource,
773
+ Re as getDefaultJointRange,
774
+ Le as getDefaultLimbRange,
775
+ y as getEnabledJointPlanes,
776
+ $ as getEnabledSegmentPlanes,
777
+ Te as getHumanBodyAngle,
778
+ we as getIsDefaultAngleAllowed,
779
+ I as getJointAngleDirectionAbbr,
780
+ D as getJointAngleDirectionName,
781
+ se as getJointNameWithPlane,
782
+ Ne as getJointOrSegmentNameWithPlane,
783
+ ae as getJointPlaneName,
784
+ xe as getNormativeJointRange,
785
+ be as getParameterAngleDirectionName,
786
+ re as getParameterDirectionNames,
787
+ f as getPartName,
788
+ Se as getPartNameNoSide,
789
+ Ae as getPlane,
790
+ z as getSegmentAngleDirectionAbbr,
791
+ u as getSegmentAngleDirectionName,
792
+ ie as getSegmentNameWithPlane,
793
+ ve as getSegmentXyzName,
794
+ te as getTypicalRom,
795
+ Ee as getTypicalRomSize,
796
+ G as isAxis,
797
+ Y as isJoint,
798
+ Q as isLimb,
799
+ de as isPlane,
800
+ a as jointNames,
801
+ me as jointsUsedByLimbs,
802
+ i as limbNames,
803
+ d as limbsRequiredForJoints,
804
+ q as mkAccelerationPart,
805
+ X as mkAngularVelocityPart,
806
+ _e as mkHumanPart,
807
+ W as mkJointPart,
808
+ V as mkLimbPart,
809
+ pe as planeOrAxis
810
+ };