@salloomd/teeth-selector 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +277 -0
- package/dist/index.js +1875 -0
- package/package.json +53 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1875 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
7
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
8
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
9
|
+
for (let key of __getOwnPropNames(mod))
|
|
10
|
+
if (!__hasOwnProp.call(to, key))
|
|
11
|
+
__defProp(to, key, {
|
|
12
|
+
get: () => mod[key],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
18
|
+
|
|
19
|
+
// node_modules/react/cjs/react.development.js
|
|
20
|
+
var require_react_development = __commonJS((exports, module) => {
|
|
21
|
+
(function() {
|
|
22
|
+
function defineDeprecationWarning(methodName, info) {
|
|
23
|
+
Object.defineProperty(Component.prototype, methodName, {
|
|
24
|
+
get: function() {
|
|
25
|
+
console.warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function getIteratorFn(maybeIterable) {
|
|
30
|
+
if (maybeIterable === null || typeof maybeIterable !== "object")
|
|
31
|
+
return null;
|
|
32
|
+
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
|
33
|
+
return typeof maybeIterable === "function" ? maybeIterable : null;
|
|
34
|
+
}
|
|
35
|
+
function warnNoop(publicInstance, callerName) {
|
|
36
|
+
publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
|
|
37
|
+
var warningKey = publicInstance + "." + callerName;
|
|
38
|
+
didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, publicInstance), didWarnStateUpdateForUnmountedComponent[warningKey] = true);
|
|
39
|
+
}
|
|
40
|
+
function Component(props, context, updater) {
|
|
41
|
+
this.props = props;
|
|
42
|
+
this.context = context;
|
|
43
|
+
this.refs = emptyObject;
|
|
44
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
45
|
+
}
|
|
46
|
+
function ComponentDummy() {}
|
|
47
|
+
function PureComponent(props, context, updater) {
|
|
48
|
+
this.props = props;
|
|
49
|
+
this.context = context;
|
|
50
|
+
this.refs = emptyObject;
|
|
51
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
52
|
+
}
|
|
53
|
+
function noop() {}
|
|
54
|
+
function testStringCoercion(value) {
|
|
55
|
+
return "" + value;
|
|
56
|
+
}
|
|
57
|
+
function checkKeyStringCoercion(value) {
|
|
58
|
+
try {
|
|
59
|
+
testStringCoercion(value);
|
|
60
|
+
var JSCompiler_inline_result = false;
|
|
61
|
+
} catch (e) {
|
|
62
|
+
JSCompiler_inline_result = true;
|
|
63
|
+
}
|
|
64
|
+
if (JSCompiler_inline_result) {
|
|
65
|
+
JSCompiler_inline_result = console;
|
|
66
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
67
|
+
var JSCompiler_inline_result$jscomp$0 = typeof Symbol === "function" && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
68
|
+
JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
|
|
69
|
+
return testStringCoercion(value);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function getComponentNameFromType(type) {
|
|
73
|
+
if (type == null)
|
|
74
|
+
return null;
|
|
75
|
+
if (typeof type === "function")
|
|
76
|
+
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
|
77
|
+
if (typeof type === "string")
|
|
78
|
+
return type;
|
|
79
|
+
switch (type) {
|
|
80
|
+
case REACT_FRAGMENT_TYPE:
|
|
81
|
+
return "Fragment";
|
|
82
|
+
case REACT_PROFILER_TYPE:
|
|
83
|
+
return "Profiler";
|
|
84
|
+
case REACT_STRICT_MODE_TYPE:
|
|
85
|
+
return "StrictMode";
|
|
86
|
+
case REACT_SUSPENSE_TYPE:
|
|
87
|
+
return "Suspense";
|
|
88
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
89
|
+
return "SuspenseList";
|
|
90
|
+
case REACT_ACTIVITY_TYPE:
|
|
91
|
+
return "Activity";
|
|
92
|
+
}
|
|
93
|
+
if (typeof type === "object")
|
|
94
|
+
switch (typeof type.tag === "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) {
|
|
95
|
+
case REACT_PORTAL_TYPE:
|
|
96
|
+
return "Portal";
|
|
97
|
+
case REACT_CONTEXT_TYPE:
|
|
98
|
+
return type.displayName || "Context";
|
|
99
|
+
case REACT_CONSUMER_TYPE:
|
|
100
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
101
|
+
case REACT_FORWARD_REF_TYPE:
|
|
102
|
+
var innerType = type.render;
|
|
103
|
+
type = type.displayName;
|
|
104
|
+
type || (type = innerType.displayName || innerType.name || "", type = type !== "" ? "ForwardRef(" + type + ")" : "ForwardRef");
|
|
105
|
+
return type;
|
|
106
|
+
case REACT_MEMO_TYPE:
|
|
107
|
+
return innerType = type.displayName || null, innerType !== null ? innerType : getComponentNameFromType(type.type) || "Memo";
|
|
108
|
+
case REACT_LAZY_TYPE:
|
|
109
|
+
innerType = type._payload;
|
|
110
|
+
type = type._init;
|
|
111
|
+
try {
|
|
112
|
+
return getComponentNameFromType(type(innerType));
|
|
113
|
+
} catch (x) {}
|
|
114
|
+
}
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
function getTaskName(type) {
|
|
118
|
+
if (type === REACT_FRAGMENT_TYPE)
|
|
119
|
+
return "<>";
|
|
120
|
+
if (typeof type === "object" && type !== null && type.$$typeof === REACT_LAZY_TYPE)
|
|
121
|
+
return "<...>";
|
|
122
|
+
try {
|
|
123
|
+
var name = getComponentNameFromType(type);
|
|
124
|
+
return name ? "<" + name + ">" : "<...>";
|
|
125
|
+
} catch (x) {
|
|
126
|
+
return "<...>";
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function getOwner() {
|
|
130
|
+
var dispatcher = ReactSharedInternals.A;
|
|
131
|
+
return dispatcher === null ? null : dispatcher.getOwner();
|
|
132
|
+
}
|
|
133
|
+
function UnknownOwner() {
|
|
134
|
+
return Error("react-stack-top-frame");
|
|
135
|
+
}
|
|
136
|
+
function hasValidKey(config) {
|
|
137
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
138
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
139
|
+
if (getter && getter.isReactWarning)
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
return config.key !== undefined;
|
|
143
|
+
}
|
|
144
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
145
|
+
function warnAboutAccessingKey() {
|
|
146
|
+
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName));
|
|
147
|
+
}
|
|
148
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
149
|
+
Object.defineProperty(props, "key", {
|
|
150
|
+
get: warnAboutAccessingKey,
|
|
151
|
+
configurable: true
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
155
|
+
var componentName = getComponentNameFromType(this.type);
|
|
156
|
+
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."));
|
|
157
|
+
componentName = this.props.ref;
|
|
158
|
+
return componentName !== undefined ? componentName : null;
|
|
159
|
+
}
|
|
160
|
+
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
161
|
+
var refProp = props.ref;
|
|
162
|
+
type = {
|
|
163
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
164
|
+
type,
|
|
165
|
+
key,
|
|
166
|
+
props,
|
|
167
|
+
_owner: owner
|
|
168
|
+
};
|
|
169
|
+
(refProp !== undefined ? refProp : null) !== null ? Object.defineProperty(type, "ref", {
|
|
170
|
+
enumerable: false,
|
|
171
|
+
get: elementRefGetterWithDeprecationWarning
|
|
172
|
+
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
173
|
+
type._store = {};
|
|
174
|
+
Object.defineProperty(type._store, "validated", {
|
|
175
|
+
configurable: false,
|
|
176
|
+
enumerable: false,
|
|
177
|
+
writable: true,
|
|
178
|
+
value: 0
|
|
179
|
+
});
|
|
180
|
+
Object.defineProperty(type, "_debugInfo", {
|
|
181
|
+
configurable: false,
|
|
182
|
+
enumerable: false,
|
|
183
|
+
writable: true,
|
|
184
|
+
value: null
|
|
185
|
+
});
|
|
186
|
+
Object.defineProperty(type, "_debugStack", {
|
|
187
|
+
configurable: false,
|
|
188
|
+
enumerable: false,
|
|
189
|
+
writable: true,
|
|
190
|
+
value: debugStack
|
|
191
|
+
});
|
|
192
|
+
Object.defineProperty(type, "_debugTask", {
|
|
193
|
+
configurable: false,
|
|
194
|
+
enumerable: false,
|
|
195
|
+
writable: true,
|
|
196
|
+
value: debugTask
|
|
197
|
+
});
|
|
198
|
+
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
199
|
+
return type;
|
|
200
|
+
}
|
|
201
|
+
function cloneAndReplaceKey(oldElement, newKey) {
|
|
202
|
+
newKey = ReactElement(oldElement.type, newKey, oldElement.props, oldElement._owner, oldElement._debugStack, oldElement._debugTask);
|
|
203
|
+
oldElement._store && (newKey._store.validated = oldElement._store.validated);
|
|
204
|
+
return newKey;
|
|
205
|
+
}
|
|
206
|
+
function validateChildKeys(node) {
|
|
207
|
+
isValidElement(node) ? node._store && (node._store.validated = 1) : typeof node === "object" && node !== null && node.$$typeof === REACT_LAZY_TYPE && (node._payload.status === "fulfilled" ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
|
|
208
|
+
}
|
|
209
|
+
function isValidElement(object) {
|
|
210
|
+
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
211
|
+
}
|
|
212
|
+
function escape(key) {
|
|
213
|
+
var escaperLookup = { "=": "=0", ":": "=2" };
|
|
214
|
+
return "$" + key.replace(/[=:]/g, function(match) {
|
|
215
|
+
return escaperLookup[match];
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
function getElementKey(element, index) {
|
|
219
|
+
return typeof element === "object" && element !== null && element.key != null ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36);
|
|
220
|
+
}
|
|
221
|
+
function resolveThenable(thenable) {
|
|
222
|
+
switch (thenable.status) {
|
|
223
|
+
case "fulfilled":
|
|
224
|
+
return thenable.value;
|
|
225
|
+
case "rejected":
|
|
226
|
+
throw thenable.reason;
|
|
227
|
+
default:
|
|
228
|
+
switch (typeof thenable.status === "string" ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(function(fulfilledValue) {
|
|
229
|
+
thenable.status === "pending" && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
|
|
230
|
+
}, function(error) {
|
|
231
|
+
thenable.status === "pending" && (thenable.status = "rejected", thenable.reason = error);
|
|
232
|
+
})), thenable.status) {
|
|
233
|
+
case "fulfilled":
|
|
234
|
+
return thenable.value;
|
|
235
|
+
case "rejected":
|
|
236
|
+
throw thenable.reason;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
throw thenable;
|
|
240
|
+
}
|
|
241
|
+
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
242
|
+
var type = typeof children;
|
|
243
|
+
if (type === "undefined" || type === "boolean")
|
|
244
|
+
children = null;
|
|
245
|
+
var invokeCallback = false;
|
|
246
|
+
if (children === null)
|
|
247
|
+
invokeCallback = true;
|
|
248
|
+
else
|
|
249
|
+
switch (type) {
|
|
250
|
+
case "bigint":
|
|
251
|
+
case "string":
|
|
252
|
+
case "number":
|
|
253
|
+
invokeCallback = true;
|
|
254
|
+
break;
|
|
255
|
+
case "object":
|
|
256
|
+
switch (children.$$typeof) {
|
|
257
|
+
case REACT_ELEMENT_TYPE:
|
|
258
|
+
case REACT_PORTAL_TYPE:
|
|
259
|
+
invokeCallback = true;
|
|
260
|
+
break;
|
|
261
|
+
case REACT_LAZY_TYPE:
|
|
262
|
+
return invokeCallback = children._init, mapIntoArray(invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
if (invokeCallback) {
|
|
266
|
+
invokeCallback = children;
|
|
267
|
+
callback = callback(invokeCallback);
|
|
268
|
+
var childKey = nameSoFar === "" ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
|
|
269
|
+
isArrayImpl(callback) ? (escapedPrefix = "", childKey != null && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
|
|
270
|
+
return c;
|
|
271
|
+
})) : callback != null && (isValidElement(callback) && (callback.key != null && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(callback, escapedPrefix + (callback.key == null || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(userProvidedKeyEscapeRegex, "$&/") + "/") + childKey), nameSoFar !== "" && invokeCallback != null && isValidElement(invokeCallback) && invokeCallback.key == null && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback));
|
|
272
|
+
return 1;
|
|
273
|
+
}
|
|
274
|
+
invokeCallback = 0;
|
|
275
|
+
childKey = nameSoFar === "" ? "." : nameSoFar + ":";
|
|
276
|
+
if (isArrayImpl(children))
|
|
277
|
+
for (var i = 0;i < children.length; i++)
|
|
278
|
+
nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback);
|
|
279
|
+
else if (i = getIteratorFn(children), typeof i === "function")
|
|
280
|
+
for (i === children.entries && (didWarnAboutMaps || console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), didWarnAboutMaps = true), children = i.call(children), i = 0;!(nameSoFar = children.next()).done; )
|
|
281
|
+
nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback);
|
|
282
|
+
else if (type === "object") {
|
|
283
|
+
if (typeof children.then === "function")
|
|
284
|
+
return mapIntoArray(resolveThenable(children), array, escapedPrefix, nameSoFar, callback);
|
|
285
|
+
array = String(children);
|
|
286
|
+
throw Error("Objects are not valid as a React child (found: " + (array === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead.");
|
|
287
|
+
}
|
|
288
|
+
return invokeCallback;
|
|
289
|
+
}
|
|
290
|
+
function mapChildren(children, func, context) {
|
|
291
|
+
if (children == null)
|
|
292
|
+
return children;
|
|
293
|
+
var result = [], count = 0;
|
|
294
|
+
mapIntoArray(children, result, "", "", function(child) {
|
|
295
|
+
return func.call(context, child, count++);
|
|
296
|
+
});
|
|
297
|
+
return result;
|
|
298
|
+
}
|
|
299
|
+
function lazyInitializer(payload) {
|
|
300
|
+
if (payload._status === -1) {
|
|
301
|
+
var ioInfo = payload._ioInfo;
|
|
302
|
+
ioInfo != null && (ioInfo.start = ioInfo.end = performance.now());
|
|
303
|
+
ioInfo = payload._result;
|
|
304
|
+
var thenable = ioInfo();
|
|
305
|
+
thenable.then(function(moduleObject) {
|
|
306
|
+
if (payload._status === 0 || payload._status === -1) {
|
|
307
|
+
payload._status = 1;
|
|
308
|
+
payload._result = moduleObject;
|
|
309
|
+
var _ioInfo = payload._ioInfo;
|
|
310
|
+
_ioInfo != null && (_ioInfo.end = performance.now());
|
|
311
|
+
thenable.status === undefined && (thenable.status = "fulfilled", thenable.value = moduleObject);
|
|
312
|
+
}
|
|
313
|
+
}, function(error) {
|
|
314
|
+
if (payload._status === 0 || payload._status === -1) {
|
|
315
|
+
payload._status = 2;
|
|
316
|
+
payload._result = error;
|
|
317
|
+
var _ioInfo2 = payload._ioInfo;
|
|
318
|
+
_ioInfo2 != null && (_ioInfo2.end = performance.now());
|
|
319
|
+
thenable.status === undefined && (thenable.status = "rejected", thenable.reason = error);
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
ioInfo = payload._ioInfo;
|
|
323
|
+
if (ioInfo != null) {
|
|
324
|
+
ioInfo.value = thenable;
|
|
325
|
+
var displayName = thenable.displayName;
|
|
326
|
+
typeof displayName === "string" && (ioInfo.name = displayName);
|
|
327
|
+
}
|
|
328
|
+
payload._status === -1 && (payload._status = 0, payload._result = thenable);
|
|
329
|
+
}
|
|
330
|
+
if (payload._status === 1)
|
|
331
|
+
return ioInfo = payload._result, ioInfo === undefined && console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
332
|
+
|
|
333
|
+
Your code should look like:
|
|
334
|
+
const MyComponent = lazy(() => import('./MyComponent'))
|
|
335
|
+
|
|
336
|
+
Did you accidentally put curly braces around the import?`, ioInfo), "default" in ioInfo || console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
337
|
+
|
|
338
|
+
Your code should look like:
|
|
339
|
+
const MyComponent = lazy(() => import('./MyComponent'))`, ioInfo), ioInfo.default;
|
|
340
|
+
throw payload._result;
|
|
341
|
+
}
|
|
342
|
+
function resolveDispatcher() {
|
|
343
|
+
var dispatcher = ReactSharedInternals.H;
|
|
344
|
+
dispatcher === null && console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
345
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
346
|
+
2. You might be breaking the Rules of Hooks
|
|
347
|
+
3. You might have more than one copy of React in the same app
|
|
348
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`);
|
|
349
|
+
return dispatcher;
|
|
350
|
+
}
|
|
351
|
+
function releaseAsyncTransition() {
|
|
352
|
+
ReactSharedInternals.asyncTransitions--;
|
|
353
|
+
}
|
|
354
|
+
function enqueueTask(task) {
|
|
355
|
+
if (enqueueTaskImpl === null)
|
|
356
|
+
try {
|
|
357
|
+
var requireString = ("require" + Math.random()).slice(0, 7);
|
|
358
|
+
enqueueTaskImpl = (module && module[requireString]).call(module, "timers").setImmediate;
|
|
359
|
+
} catch (_err) {
|
|
360
|
+
enqueueTaskImpl = function(callback) {
|
|
361
|
+
didWarnAboutMessageChannel === false && (didWarnAboutMessageChannel = true, typeof MessageChannel === "undefined" && console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));
|
|
362
|
+
var channel = new MessageChannel;
|
|
363
|
+
channel.port1.onmessage = callback;
|
|
364
|
+
channel.port2.postMessage(undefined);
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
return enqueueTaskImpl(task);
|
|
368
|
+
}
|
|
369
|
+
function aggregateErrors(errors) {
|
|
370
|
+
return 1 < errors.length && typeof AggregateError === "function" ? new AggregateError(errors) : errors[0];
|
|
371
|
+
}
|
|
372
|
+
function popActScope(prevActQueue, prevActScopeDepth) {
|
|
373
|
+
prevActScopeDepth !== actScopeDepth - 1 && console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
|
|
374
|
+
actScopeDepth = prevActScopeDepth;
|
|
375
|
+
}
|
|
376
|
+
function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
|
|
377
|
+
var queue = ReactSharedInternals.actQueue;
|
|
378
|
+
if (queue !== null)
|
|
379
|
+
if (queue.length !== 0)
|
|
380
|
+
try {
|
|
381
|
+
flushActQueue(queue);
|
|
382
|
+
enqueueTask(function() {
|
|
383
|
+
return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
384
|
+
});
|
|
385
|
+
return;
|
|
386
|
+
} catch (error) {
|
|
387
|
+
ReactSharedInternals.thrownErrors.push(error);
|
|
388
|
+
}
|
|
389
|
+
else
|
|
390
|
+
ReactSharedInternals.actQueue = null;
|
|
391
|
+
0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue);
|
|
392
|
+
}
|
|
393
|
+
function flushActQueue(queue) {
|
|
394
|
+
if (!isFlushing) {
|
|
395
|
+
isFlushing = true;
|
|
396
|
+
var i = 0;
|
|
397
|
+
try {
|
|
398
|
+
for (;i < queue.length; i++) {
|
|
399
|
+
var callback = queue[i];
|
|
400
|
+
do {
|
|
401
|
+
ReactSharedInternals.didUsePromise = false;
|
|
402
|
+
var continuation = callback(false);
|
|
403
|
+
if (continuation !== null) {
|
|
404
|
+
if (ReactSharedInternals.didUsePromise) {
|
|
405
|
+
queue[i] = callback;
|
|
406
|
+
queue.splice(0, i);
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
callback = continuation;
|
|
410
|
+
} else
|
|
411
|
+
break;
|
|
412
|
+
} while (1);
|
|
413
|
+
}
|
|
414
|
+
queue.length = 0;
|
|
415
|
+
} catch (error) {
|
|
416
|
+
queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
|
|
417
|
+
} finally {
|
|
418
|
+
isFlushing = false;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
423
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
|
|
424
|
+
isMounted: function() {
|
|
425
|
+
return false;
|
|
426
|
+
},
|
|
427
|
+
enqueueForceUpdate: function(publicInstance) {
|
|
428
|
+
warnNoop(publicInstance, "forceUpdate");
|
|
429
|
+
},
|
|
430
|
+
enqueueReplaceState: function(publicInstance) {
|
|
431
|
+
warnNoop(publicInstance, "replaceState");
|
|
432
|
+
},
|
|
433
|
+
enqueueSetState: function(publicInstance) {
|
|
434
|
+
warnNoop(publicInstance, "setState");
|
|
435
|
+
}
|
|
436
|
+
}, assign = Object.assign, emptyObject = {};
|
|
437
|
+
Object.freeze(emptyObject);
|
|
438
|
+
Component.prototype.isReactComponent = {};
|
|
439
|
+
Component.prototype.setState = function(partialState, callback) {
|
|
440
|
+
if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null)
|
|
441
|
+
throw Error("takes an object of state variables to update or a function which returns an object of state variables.");
|
|
442
|
+
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
443
|
+
};
|
|
444
|
+
Component.prototype.forceUpdate = function(callback) {
|
|
445
|
+
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
446
|
+
};
|
|
447
|
+
var deprecatedAPIs = {
|
|
448
|
+
isMounted: [
|
|
449
|
+
"isMounted",
|
|
450
|
+
"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
|
|
451
|
+
],
|
|
452
|
+
replaceState: [
|
|
453
|
+
"replaceState",
|
|
454
|
+
"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
|
|
455
|
+
]
|
|
456
|
+
};
|
|
457
|
+
for (fnName in deprecatedAPIs)
|
|
458
|
+
deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
459
|
+
ComponentDummy.prototype = Component.prototype;
|
|
460
|
+
deprecatedAPIs = PureComponent.prototype = new ComponentDummy;
|
|
461
|
+
deprecatedAPIs.constructor = PureComponent;
|
|
462
|
+
assign(deprecatedAPIs, Component.prototype);
|
|
463
|
+
deprecatedAPIs.isPureReactComponent = true;
|
|
464
|
+
var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = {
|
|
465
|
+
H: null,
|
|
466
|
+
A: null,
|
|
467
|
+
T: null,
|
|
468
|
+
S: null,
|
|
469
|
+
actQueue: null,
|
|
470
|
+
asyncTransitions: 0,
|
|
471
|
+
isBatchingLegacy: false,
|
|
472
|
+
didScheduleLegacyUpdate: false,
|
|
473
|
+
didUsePromise: false,
|
|
474
|
+
thrownErrors: [],
|
|
475
|
+
getCurrentStack: null,
|
|
476
|
+
recentlyCreatedOwnerStacks: 0
|
|
477
|
+
}, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() {
|
|
478
|
+
return null;
|
|
479
|
+
};
|
|
480
|
+
deprecatedAPIs = {
|
|
481
|
+
react_stack_bottom_frame: function(callStackForError) {
|
|
482
|
+
return callStackForError();
|
|
483
|
+
}
|
|
484
|
+
};
|
|
485
|
+
var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
|
|
486
|
+
var didWarnAboutElementRef = {};
|
|
487
|
+
var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(deprecatedAPIs, UnknownOwner)();
|
|
488
|
+
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
489
|
+
var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = typeof reportError === "function" ? reportError : function(error) {
|
|
490
|
+
if (typeof window === "object" && typeof window.ErrorEvent === "function") {
|
|
491
|
+
var event = new window.ErrorEvent("error", {
|
|
492
|
+
bubbles: true,
|
|
493
|
+
cancelable: true,
|
|
494
|
+
message: typeof error === "object" && error !== null && typeof error.message === "string" ? String(error.message) : String(error),
|
|
495
|
+
error
|
|
496
|
+
});
|
|
497
|
+
if (!window.dispatchEvent(event))
|
|
498
|
+
return;
|
|
499
|
+
} else if (typeof process === "object" && typeof process.emit === "function") {
|
|
500
|
+
process.emit("uncaughtException", error);
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
console.error(error);
|
|
504
|
+
}, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = typeof queueMicrotask === "function" ? function(callback) {
|
|
505
|
+
queueMicrotask(function() {
|
|
506
|
+
return queueMicrotask(callback);
|
|
507
|
+
});
|
|
508
|
+
} : enqueueTask;
|
|
509
|
+
deprecatedAPIs = Object.freeze({
|
|
510
|
+
__proto__: null,
|
|
511
|
+
c: function(size) {
|
|
512
|
+
return resolveDispatcher().useMemoCache(size);
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
var fnName = {
|
|
516
|
+
map: mapChildren,
|
|
517
|
+
forEach: function(children, forEachFunc, forEachContext) {
|
|
518
|
+
mapChildren(children, function() {
|
|
519
|
+
forEachFunc.apply(this, arguments);
|
|
520
|
+
}, forEachContext);
|
|
521
|
+
},
|
|
522
|
+
count: function(children) {
|
|
523
|
+
var n = 0;
|
|
524
|
+
mapChildren(children, function() {
|
|
525
|
+
n++;
|
|
526
|
+
});
|
|
527
|
+
return n;
|
|
528
|
+
},
|
|
529
|
+
toArray: function(children) {
|
|
530
|
+
return mapChildren(children, function(child) {
|
|
531
|
+
return child;
|
|
532
|
+
}) || [];
|
|
533
|
+
},
|
|
534
|
+
only: function(children) {
|
|
535
|
+
if (!isValidElement(children))
|
|
536
|
+
throw Error("React.Children.only expected to receive a single React element child.");
|
|
537
|
+
return children;
|
|
538
|
+
}
|
|
539
|
+
};
|
|
540
|
+
exports.Activity = REACT_ACTIVITY_TYPE;
|
|
541
|
+
exports.Children = fnName;
|
|
542
|
+
exports.Component = Component;
|
|
543
|
+
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
544
|
+
exports.Profiler = REACT_PROFILER_TYPE;
|
|
545
|
+
exports.PureComponent = PureComponent;
|
|
546
|
+
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
547
|
+
exports.Suspense = REACT_SUSPENSE_TYPE;
|
|
548
|
+
exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
|
|
549
|
+
exports.__COMPILER_RUNTIME = deprecatedAPIs;
|
|
550
|
+
exports.act = function(callback) {
|
|
551
|
+
var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
|
|
552
|
+
actScopeDepth++;
|
|
553
|
+
var queue = ReactSharedInternals.actQueue = prevActQueue !== null ? prevActQueue : [], didAwaitActCall = false;
|
|
554
|
+
try {
|
|
555
|
+
var result = callback();
|
|
556
|
+
} catch (error) {
|
|
557
|
+
ReactSharedInternals.thrownErrors.push(error);
|
|
558
|
+
}
|
|
559
|
+
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
560
|
+
throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
|
|
561
|
+
if (result !== null && typeof result === "object" && typeof result.then === "function") {
|
|
562
|
+
var thenable = result;
|
|
563
|
+
queueSeveralMicrotasks(function() {
|
|
564
|
+
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
|
|
565
|
+
});
|
|
566
|
+
return {
|
|
567
|
+
then: function(resolve, reject) {
|
|
568
|
+
didAwaitActCall = true;
|
|
569
|
+
thenable.then(function(returnValue) {
|
|
570
|
+
popActScope(prevActQueue, prevActScopeDepth);
|
|
571
|
+
if (prevActScopeDepth === 0) {
|
|
572
|
+
try {
|
|
573
|
+
flushActQueue(queue), enqueueTask(function() {
|
|
574
|
+
return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
575
|
+
});
|
|
576
|
+
} catch (error$0) {
|
|
577
|
+
ReactSharedInternals.thrownErrors.push(error$0);
|
|
578
|
+
}
|
|
579
|
+
if (0 < ReactSharedInternals.thrownErrors.length) {
|
|
580
|
+
var _thrownError = aggregateErrors(ReactSharedInternals.thrownErrors);
|
|
581
|
+
ReactSharedInternals.thrownErrors.length = 0;
|
|
582
|
+
reject(_thrownError);
|
|
583
|
+
}
|
|
584
|
+
} else
|
|
585
|
+
resolve(returnValue);
|
|
586
|
+
}, function(error) {
|
|
587
|
+
popActScope(prevActQueue, prevActScopeDepth);
|
|
588
|
+
0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error);
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
var returnValue$jscomp$0 = result;
|
|
594
|
+
popActScope(prevActQueue, prevActScopeDepth);
|
|
595
|
+
prevActScopeDepth === 0 && (flushActQueue(queue), queue.length !== 0 && queueSeveralMicrotasks(function() {
|
|
596
|
+
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"));
|
|
597
|
+
}), ReactSharedInternals.actQueue = null);
|
|
598
|
+
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
599
|
+
throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
|
|
600
|
+
return {
|
|
601
|
+
then: function(resolve, reject) {
|
|
602
|
+
didAwaitActCall = true;
|
|
603
|
+
prevActScopeDepth === 0 ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
|
|
604
|
+
return recursivelyFlushAsyncActWork(returnValue$jscomp$0, resolve, reject);
|
|
605
|
+
})) : resolve(returnValue$jscomp$0);
|
|
606
|
+
}
|
|
607
|
+
};
|
|
608
|
+
};
|
|
609
|
+
exports.cache = function(fn) {
|
|
610
|
+
return function() {
|
|
611
|
+
return fn.apply(null, arguments);
|
|
612
|
+
};
|
|
613
|
+
};
|
|
614
|
+
exports.cacheSignal = function() {
|
|
615
|
+
return null;
|
|
616
|
+
};
|
|
617
|
+
exports.captureOwnerStack = function() {
|
|
618
|
+
var getCurrentStack = ReactSharedInternals.getCurrentStack;
|
|
619
|
+
return getCurrentStack === null ? null : getCurrentStack();
|
|
620
|
+
};
|
|
621
|
+
exports.cloneElement = function(element, config, children) {
|
|
622
|
+
if (element === null || element === undefined)
|
|
623
|
+
throw Error("The argument must be a React element, but you passed " + element + ".");
|
|
624
|
+
var props = assign({}, element.props), key = element.key, owner = element._owner;
|
|
625
|
+
if (config != null) {
|
|
626
|
+
var JSCompiler_inline_result;
|
|
627
|
+
a: {
|
|
628
|
+
if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(config, "ref").get) && JSCompiler_inline_result.isReactWarning) {
|
|
629
|
+
JSCompiler_inline_result = false;
|
|
630
|
+
break a;
|
|
631
|
+
}
|
|
632
|
+
JSCompiler_inline_result = config.ref !== undefined;
|
|
633
|
+
}
|
|
634
|
+
JSCompiler_inline_result && (owner = getOwner());
|
|
635
|
+
hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key);
|
|
636
|
+
for (propName in config)
|
|
637
|
+
!hasOwnProperty.call(config, propName) || propName === "key" || propName === "__self" || propName === "__source" || propName === "ref" && config.ref === undefined || (props[propName] = config[propName]);
|
|
638
|
+
}
|
|
639
|
+
var propName = arguments.length - 2;
|
|
640
|
+
if (propName === 1)
|
|
641
|
+
props.children = children;
|
|
642
|
+
else if (1 < propName) {
|
|
643
|
+
JSCompiler_inline_result = Array(propName);
|
|
644
|
+
for (var i = 0;i < propName; i++)
|
|
645
|
+
JSCompiler_inline_result[i] = arguments[i + 2];
|
|
646
|
+
props.children = JSCompiler_inline_result;
|
|
647
|
+
}
|
|
648
|
+
props = ReactElement(element.type, key, props, owner, element._debugStack, element._debugTask);
|
|
649
|
+
for (key = 2;key < arguments.length; key++)
|
|
650
|
+
validateChildKeys(arguments[key]);
|
|
651
|
+
return props;
|
|
652
|
+
};
|
|
653
|
+
exports.createContext = function(defaultValue) {
|
|
654
|
+
defaultValue = {
|
|
655
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
656
|
+
_currentValue: defaultValue,
|
|
657
|
+
_currentValue2: defaultValue,
|
|
658
|
+
_threadCount: 0,
|
|
659
|
+
Provider: null,
|
|
660
|
+
Consumer: null
|
|
661
|
+
};
|
|
662
|
+
defaultValue.Provider = defaultValue;
|
|
663
|
+
defaultValue.Consumer = {
|
|
664
|
+
$$typeof: REACT_CONSUMER_TYPE,
|
|
665
|
+
_context: defaultValue
|
|
666
|
+
};
|
|
667
|
+
defaultValue._currentRenderer = null;
|
|
668
|
+
defaultValue._currentRenderer2 = null;
|
|
669
|
+
return defaultValue;
|
|
670
|
+
};
|
|
671
|
+
exports.createElement = function(type, config, children) {
|
|
672
|
+
for (var i = 2;i < arguments.length; i++)
|
|
673
|
+
validateChildKeys(arguments[i]);
|
|
674
|
+
i = {};
|
|
675
|
+
var key = null;
|
|
676
|
+
if (config != null)
|
|
677
|
+
for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key), config)
|
|
678
|
+
hasOwnProperty.call(config, propName) && propName !== "key" && propName !== "__self" && propName !== "__source" && (i[propName] = config[propName]);
|
|
679
|
+
var childrenLength = arguments.length - 2;
|
|
680
|
+
if (childrenLength === 1)
|
|
681
|
+
i.children = children;
|
|
682
|
+
else if (1 < childrenLength) {
|
|
683
|
+
for (var childArray = Array(childrenLength), _i = 0;_i < childrenLength; _i++)
|
|
684
|
+
childArray[_i] = arguments[_i + 2];
|
|
685
|
+
Object.freeze && Object.freeze(childArray);
|
|
686
|
+
i.children = childArray;
|
|
687
|
+
}
|
|
688
|
+
if (type && type.defaultProps)
|
|
689
|
+
for (propName in childrenLength = type.defaultProps, childrenLength)
|
|
690
|
+
i[propName] === undefined && (i[propName] = childrenLength[propName]);
|
|
691
|
+
key && defineKeyPropWarningGetter(i, typeof type === "function" ? type.displayName || type.name || "Unknown" : type);
|
|
692
|
+
var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
693
|
+
return ReactElement(type, key, i, getOwner(), propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack, propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
|
|
694
|
+
};
|
|
695
|
+
exports.createRef = function() {
|
|
696
|
+
var refObject = { current: null };
|
|
697
|
+
Object.seal(refObject);
|
|
698
|
+
return refObject;
|
|
699
|
+
};
|
|
700
|
+
exports.forwardRef = function(render) {
|
|
701
|
+
render != null && render.$$typeof === REACT_MEMO_TYPE ? console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof render !== "function" ? console.error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render) : render.length !== 0 && render.length !== 2 && console.error("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined.");
|
|
702
|
+
render != null && render.defaultProps != null && console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");
|
|
703
|
+
var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }, ownName;
|
|
704
|
+
Object.defineProperty(elementType, "displayName", {
|
|
705
|
+
enumerable: false,
|
|
706
|
+
configurable: true,
|
|
707
|
+
get: function() {
|
|
708
|
+
return ownName;
|
|
709
|
+
},
|
|
710
|
+
set: function(name) {
|
|
711
|
+
ownName = name;
|
|
712
|
+
render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name);
|
|
713
|
+
}
|
|
714
|
+
});
|
|
715
|
+
return elementType;
|
|
716
|
+
};
|
|
717
|
+
exports.isValidElement = isValidElement;
|
|
718
|
+
exports.lazy = function(ctor) {
|
|
719
|
+
ctor = { _status: -1, _result: ctor };
|
|
720
|
+
var lazyType = {
|
|
721
|
+
$$typeof: REACT_LAZY_TYPE,
|
|
722
|
+
_payload: ctor,
|
|
723
|
+
_init: lazyInitializer
|
|
724
|
+
}, ioInfo = {
|
|
725
|
+
name: "lazy",
|
|
726
|
+
start: -1,
|
|
727
|
+
end: -1,
|
|
728
|
+
value: null,
|
|
729
|
+
owner: null,
|
|
730
|
+
debugStack: Error("react-stack-top-frame"),
|
|
731
|
+
debugTask: console.createTask ? console.createTask("lazy()") : null
|
|
732
|
+
};
|
|
733
|
+
ctor._ioInfo = ioInfo;
|
|
734
|
+
lazyType._debugInfo = [{ awaited: ioInfo }];
|
|
735
|
+
return lazyType;
|
|
736
|
+
};
|
|
737
|
+
exports.memo = function(type, compare) {
|
|
738
|
+
type == null && console.error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type);
|
|
739
|
+
compare = {
|
|
740
|
+
$$typeof: REACT_MEMO_TYPE,
|
|
741
|
+
type,
|
|
742
|
+
compare: compare === undefined ? null : compare
|
|
743
|
+
};
|
|
744
|
+
var ownName;
|
|
745
|
+
Object.defineProperty(compare, "displayName", {
|
|
746
|
+
enumerable: false,
|
|
747
|
+
configurable: true,
|
|
748
|
+
get: function() {
|
|
749
|
+
return ownName;
|
|
750
|
+
},
|
|
751
|
+
set: function(name) {
|
|
752
|
+
ownName = name;
|
|
753
|
+
type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name);
|
|
754
|
+
}
|
|
755
|
+
});
|
|
756
|
+
return compare;
|
|
757
|
+
};
|
|
758
|
+
exports.startTransition = function(scope) {
|
|
759
|
+
var prevTransition = ReactSharedInternals.T, currentTransition = {};
|
|
760
|
+
currentTransition._updatedFibers = new Set;
|
|
761
|
+
ReactSharedInternals.T = currentTransition;
|
|
762
|
+
try {
|
|
763
|
+
var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
|
|
764
|
+
onStartTransitionFinish !== null && onStartTransitionFinish(currentTransition, returnValue);
|
|
765
|
+
typeof returnValue === "object" && returnValue !== null && typeof returnValue.then === "function" && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
|
|
766
|
+
} catch (error) {
|
|
767
|
+
reportGlobalError(error);
|
|
768
|
+
} finally {
|
|
769
|
+
prevTransition === null && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")), prevTransition !== null && currentTransition.types !== null && (prevTransition.types !== null && prevTransition.types !== currentTransition.types && console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
|
|
770
|
+
}
|
|
771
|
+
};
|
|
772
|
+
exports.unstable_useCacheRefresh = function() {
|
|
773
|
+
return resolveDispatcher().useCacheRefresh();
|
|
774
|
+
};
|
|
775
|
+
exports.use = function(usable) {
|
|
776
|
+
return resolveDispatcher().use(usable);
|
|
777
|
+
};
|
|
778
|
+
exports.useActionState = function(action, initialState, permalink) {
|
|
779
|
+
return resolveDispatcher().useActionState(action, initialState, permalink);
|
|
780
|
+
};
|
|
781
|
+
exports.useCallback = function(callback, deps) {
|
|
782
|
+
return resolveDispatcher().useCallback(callback, deps);
|
|
783
|
+
};
|
|
784
|
+
exports.useContext = function(Context) {
|
|
785
|
+
var dispatcher = resolveDispatcher();
|
|
786
|
+
Context.$$typeof === REACT_CONSUMER_TYPE && console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?");
|
|
787
|
+
return dispatcher.useContext(Context);
|
|
788
|
+
};
|
|
789
|
+
exports.useDebugValue = function(value, formatterFn) {
|
|
790
|
+
return resolveDispatcher().useDebugValue(value, formatterFn);
|
|
791
|
+
};
|
|
792
|
+
exports.useDeferredValue = function(value, initialValue) {
|
|
793
|
+
return resolveDispatcher().useDeferredValue(value, initialValue);
|
|
794
|
+
};
|
|
795
|
+
exports.useEffect = function(create, deps) {
|
|
796
|
+
create == null && console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?");
|
|
797
|
+
return resolveDispatcher().useEffect(create, deps);
|
|
798
|
+
};
|
|
799
|
+
exports.useEffectEvent = function(callback) {
|
|
800
|
+
return resolveDispatcher().useEffectEvent(callback);
|
|
801
|
+
};
|
|
802
|
+
exports.useId = function() {
|
|
803
|
+
return resolveDispatcher().useId();
|
|
804
|
+
};
|
|
805
|
+
exports.useImperativeHandle = function(ref, create, deps) {
|
|
806
|
+
return resolveDispatcher().useImperativeHandle(ref, create, deps);
|
|
807
|
+
};
|
|
808
|
+
exports.useInsertionEffect = function(create, deps) {
|
|
809
|
+
create == null && console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?");
|
|
810
|
+
return resolveDispatcher().useInsertionEffect(create, deps);
|
|
811
|
+
};
|
|
812
|
+
exports.useLayoutEffect = function(create, deps) {
|
|
813
|
+
create == null && console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?");
|
|
814
|
+
return resolveDispatcher().useLayoutEffect(create, deps);
|
|
815
|
+
};
|
|
816
|
+
exports.useMemo = function(create, deps) {
|
|
817
|
+
return resolveDispatcher().useMemo(create, deps);
|
|
818
|
+
};
|
|
819
|
+
exports.useOptimistic = function(passthrough, reducer) {
|
|
820
|
+
return resolveDispatcher().useOptimistic(passthrough, reducer);
|
|
821
|
+
};
|
|
822
|
+
exports.useReducer = function(reducer, initialArg, init) {
|
|
823
|
+
return resolveDispatcher().useReducer(reducer, initialArg, init);
|
|
824
|
+
};
|
|
825
|
+
exports.useRef = function(initialValue) {
|
|
826
|
+
return resolveDispatcher().useRef(initialValue);
|
|
827
|
+
};
|
|
828
|
+
exports.useState = function(initialState) {
|
|
829
|
+
return resolveDispatcher().useState(initialState);
|
|
830
|
+
};
|
|
831
|
+
exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
|
|
832
|
+
return resolveDispatcher().useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
833
|
+
};
|
|
834
|
+
exports.useTransition = function() {
|
|
835
|
+
return resolveDispatcher().useTransition();
|
|
836
|
+
};
|
|
837
|
+
exports.version = "19.2.3";
|
|
838
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
839
|
+
})();
|
|
840
|
+
});
|
|
841
|
+
|
|
842
|
+
// node_modules/react/index.js
|
|
843
|
+
var require_react = __commonJS((exports, module) => {
|
|
844
|
+
var react_development = __toESM(require_react_development());
|
|
845
|
+
if (false) {} else {
|
|
846
|
+
module.exports = react_development;
|
|
847
|
+
}
|
|
848
|
+
});
|
|
849
|
+
|
|
850
|
+
// node_modules/react/cjs/react-jsx-dev-runtime.development.js
|
|
851
|
+
var require_react_jsx_dev_runtime_development = __commonJS((exports) => {
|
|
852
|
+
var React = __toESM(require_react());
|
|
853
|
+
(function() {
|
|
854
|
+
function getComponentNameFromType(type) {
|
|
855
|
+
if (type == null)
|
|
856
|
+
return null;
|
|
857
|
+
if (typeof type === "function")
|
|
858
|
+
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
|
859
|
+
if (typeof type === "string")
|
|
860
|
+
return type;
|
|
861
|
+
switch (type) {
|
|
862
|
+
case REACT_FRAGMENT_TYPE:
|
|
863
|
+
return "Fragment";
|
|
864
|
+
case REACT_PROFILER_TYPE:
|
|
865
|
+
return "Profiler";
|
|
866
|
+
case REACT_STRICT_MODE_TYPE:
|
|
867
|
+
return "StrictMode";
|
|
868
|
+
case REACT_SUSPENSE_TYPE:
|
|
869
|
+
return "Suspense";
|
|
870
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
871
|
+
return "SuspenseList";
|
|
872
|
+
case REACT_ACTIVITY_TYPE:
|
|
873
|
+
return "Activity";
|
|
874
|
+
}
|
|
875
|
+
if (typeof type === "object")
|
|
876
|
+
switch (typeof type.tag === "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) {
|
|
877
|
+
case REACT_PORTAL_TYPE:
|
|
878
|
+
return "Portal";
|
|
879
|
+
case REACT_CONTEXT_TYPE:
|
|
880
|
+
return type.displayName || "Context";
|
|
881
|
+
case REACT_CONSUMER_TYPE:
|
|
882
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
883
|
+
case REACT_FORWARD_REF_TYPE:
|
|
884
|
+
var innerType = type.render;
|
|
885
|
+
type = type.displayName;
|
|
886
|
+
type || (type = innerType.displayName || innerType.name || "", type = type !== "" ? "ForwardRef(" + type + ")" : "ForwardRef");
|
|
887
|
+
return type;
|
|
888
|
+
case REACT_MEMO_TYPE:
|
|
889
|
+
return innerType = type.displayName || null, innerType !== null ? innerType : getComponentNameFromType(type.type) || "Memo";
|
|
890
|
+
case REACT_LAZY_TYPE:
|
|
891
|
+
innerType = type._payload;
|
|
892
|
+
type = type._init;
|
|
893
|
+
try {
|
|
894
|
+
return getComponentNameFromType(type(innerType));
|
|
895
|
+
} catch (x) {}
|
|
896
|
+
}
|
|
897
|
+
return null;
|
|
898
|
+
}
|
|
899
|
+
function testStringCoercion(value) {
|
|
900
|
+
return "" + value;
|
|
901
|
+
}
|
|
902
|
+
function checkKeyStringCoercion(value) {
|
|
903
|
+
try {
|
|
904
|
+
testStringCoercion(value);
|
|
905
|
+
var JSCompiler_inline_result = false;
|
|
906
|
+
} catch (e) {
|
|
907
|
+
JSCompiler_inline_result = true;
|
|
908
|
+
}
|
|
909
|
+
if (JSCompiler_inline_result) {
|
|
910
|
+
JSCompiler_inline_result = console;
|
|
911
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
912
|
+
var JSCompiler_inline_result$jscomp$0 = typeof Symbol === "function" && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
913
|
+
JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
|
|
914
|
+
return testStringCoercion(value);
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
function getTaskName(type) {
|
|
918
|
+
if (type === REACT_FRAGMENT_TYPE)
|
|
919
|
+
return "<>";
|
|
920
|
+
if (typeof type === "object" && type !== null && type.$$typeof === REACT_LAZY_TYPE)
|
|
921
|
+
return "<...>";
|
|
922
|
+
try {
|
|
923
|
+
var name = getComponentNameFromType(type);
|
|
924
|
+
return name ? "<" + name + ">" : "<...>";
|
|
925
|
+
} catch (x) {
|
|
926
|
+
return "<...>";
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
function getOwner() {
|
|
930
|
+
var dispatcher = ReactSharedInternals.A;
|
|
931
|
+
return dispatcher === null ? null : dispatcher.getOwner();
|
|
932
|
+
}
|
|
933
|
+
function UnknownOwner() {
|
|
934
|
+
return Error("react-stack-top-frame");
|
|
935
|
+
}
|
|
936
|
+
function hasValidKey(config) {
|
|
937
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
938
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
939
|
+
if (getter && getter.isReactWarning)
|
|
940
|
+
return false;
|
|
941
|
+
}
|
|
942
|
+
return config.key !== undefined;
|
|
943
|
+
}
|
|
944
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
945
|
+
function warnAboutAccessingKey() {
|
|
946
|
+
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName));
|
|
947
|
+
}
|
|
948
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
949
|
+
Object.defineProperty(props, "key", {
|
|
950
|
+
get: warnAboutAccessingKey,
|
|
951
|
+
configurable: true
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
955
|
+
var componentName = getComponentNameFromType(this.type);
|
|
956
|
+
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."));
|
|
957
|
+
componentName = this.props.ref;
|
|
958
|
+
return componentName !== undefined ? componentName : null;
|
|
959
|
+
}
|
|
960
|
+
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
961
|
+
var refProp = props.ref;
|
|
962
|
+
type = {
|
|
963
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
964
|
+
type,
|
|
965
|
+
key,
|
|
966
|
+
props,
|
|
967
|
+
_owner: owner
|
|
968
|
+
};
|
|
969
|
+
(refProp !== undefined ? refProp : null) !== null ? Object.defineProperty(type, "ref", {
|
|
970
|
+
enumerable: false,
|
|
971
|
+
get: elementRefGetterWithDeprecationWarning
|
|
972
|
+
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
973
|
+
type._store = {};
|
|
974
|
+
Object.defineProperty(type._store, "validated", {
|
|
975
|
+
configurable: false,
|
|
976
|
+
enumerable: false,
|
|
977
|
+
writable: true,
|
|
978
|
+
value: 0
|
|
979
|
+
});
|
|
980
|
+
Object.defineProperty(type, "_debugInfo", {
|
|
981
|
+
configurable: false,
|
|
982
|
+
enumerable: false,
|
|
983
|
+
writable: true,
|
|
984
|
+
value: null
|
|
985
|
+
});
|
|
986
|
+
Object.defineProperty(type, "_debugStack", {
|
|
987
|
+
configurable: false,
|
|
988
|
+
enumerable: false,
|
|
989
|
+
writable: true,
|
|
990
|
+
value: debugStack
|
|
991
|
+
});
|
|
992
|
+
Object.defineProperty(type, "_debugTask", {
|
|
993
|
+
configurable: false,
|
|
994
|
+
enumerable: false,
|
|
995
|
+
writable: true,
|
|
996
|
+
value: debugTask
|
|
997
|
+
});
|
|
998
|
+
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
999
|
+
return type;
|
|
1000
|
+
}
|
|
1001
|
+
function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
|
|
1002
|
+
var children = config.children;
|
|
1003
|
+
if (children !== undefined)
|
|
1004
|
+
if (isStaticChildren)
|
|
1005
|
+
if (isArrayImpl(children)) {
|
|
1006
|
+
for (isStaticChildren = 0;isStaticChildren < children.length; isStaticChildren++)
|
|
1007
|
+
validateChildKeys(children[isStaticChildren]);
|
|
1008
|
+
Object.freeze && Object.freeze(children);
|
|
1009
|
+
} else
|
|
1010
|
+
console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
1011
|
+
else
|
|
1012
|
+
validateChildKeys(children);
|
|
1013
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
1014
|
+
children = getComponentNameFromType(type);
|
|
1015
|
+
var keys = Object.keys(config).filter(function(k) {
|
|
1016
|
+
return k !== "key";
|
|
1017
|
+
});
|
|
1018
|
+
isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
1019
|
+
didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
1020
|
+
let props = %s;
|
|
1021
|
+
<%s {...props} />
|
|
1022
|
+
React keys must be passed directly to JSX without using spread:
|
|
1023
|
+
let props = %s;
|
|
1024
|
+
<%s key={someKey} {...props} />`, isStaticChildren, children, keys, children), didWarnAboutKeySpread[children + isStaticChildren] = true);
|
|
1025
|
+
}
|
|
1026
|
+
children = null;
|
|
1027
|
+
maybeKey !== undefined && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
|
|
1028
|
+
hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
|
|
1029
|
+
if ("key" in config) {
|
|
1030
|
+
maybeKey = {};
|
|
1031
|
+
for (var propName in config)
|
|
1032
|
+
propName !== "key" && (maybeKey[propName] = config[propName]);
|
|
1033
|
+
} else
|
|
1034
|
+
maybeKey = config;
|
|
1035
|
+
children && defineKeyPropWarningGetter(maybeKey, typeof type === "function" ? type.displayName || type.name || "Unknown" : type);
|
|
1036
|
+
return ReactElement(type, children, maybeKey, getOwner(), debugStack, debugTask);
|
|
1037
|
+
}
|
|
1038
|
+
function validateChildKeys(node) {
|
|
1039
|
+
isValidElement(node) ? node._store && (node._store.validated = 1) : typeof node === "object" && node !== null && node.$$typeof === REACT_LAZY_TYPE && (node._payload.status === "fulfilled" ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
|
|
1040
|
+
}
|
|
1041
|
+
function isValidElement(object) {
|
|
1042
|
+
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1043
|
+
}
|
|
1044
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
|
|
1045
|
+
return null;
|
|
1046
|
+
};
|
|
1047
|
+
React = {
|
|
1048
|
+
react_stack_bottom_frame: function(callStackForError) {
|
|
1049
|
+
return callStackForError();
|
|
1050
|
+
}
|
|
1051
|
+
};
|
|
1052
|
+
var specialPropKeyWarningShown;
|
|
1053
|
+
var didWarnAboutElementRef = {};
|
|
1054
|
+
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(React, UnknownOwner)();
|
|
1055
|
+
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
1056
|
+
var didWarnAboutKeySpread = {};
|
|
1057
|
+
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
1058
|
+
exports.jsxDEV = function(type, config, maybeKey, isStaticChildren) {
|
|
1059
|
+
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
1060
|
+
return jsxDEVImpl(type, config, maybeKey, isStaticChildren, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
|
|
1061
|
+
};
|
|
1062
|
+
})();
|
|
1063
|
+
});
|
|
1064
|
+
|
|
1065
|
+
// node_modules/react/jsx-dev-runtime.js
|
|
1066
|
+
var require_jsx_dev_runtime = __commonJS((exports, module) => {
|
|
1067
|
+
var react_jsx_dev_runtime_development = __toESM(require_react_jsx_dev_runtime_development());
|
|
1068
|
+
if (false) {} else {
|
|
1069
|
+
module.exports = react_jsx_dev_runtime_development;
|
|
1070
|
+
}
|
|
1071
|
+
});
|
|
1072
|
+
|
|
1073
|
+
// components/teeth-selector.tsx
|
|
1074
|
+
var React = __toESM(require_react(), 1);
|
|
1075
|
+
|
|
1076
|
+
// lib/teeth.ts
|
|
1077
|
+
var teethData = [
|
|
1078
|
+
{
|
|
1079
|
+
order: 0,
|
|
1080
|
+
id: 18,
|
|
1081
|
+
name: "Upper Right Third Molar",
|
|
1082
|
+
position: "upper",
|
|
1083
|
+
side: "right",
|
|
1084
|
+
d: "m30 344c-1.8-0.6-3.4-1.6-4.7-3-1.5-1.6-2.7-3.7-3.6-6.5-0.63-2.1-0.94-4.2-0.94-6.1a16 16 0 0 1 0.73-4.7c0.87-2.8 2.3-4.7 3.4-6.2 0.78-1 1.3-1.8 1.4-2.4 0.026-1.2-0.17-2.8-0.37-4.5-0.4-3.4-0.86-7.3-0.044-9.8l5e-3 -0.015 3e-3 -0.015c0.51-2.5 2.5-4.7 6-6.4 2.8-1.4 5.8-2.1 7.1-2.4 0.21-0.049 0.37-0.088 0.48-0.12 4.7-1.1 10-0.73 14-0.23 4.9 0.62 9.3 1.7 12 2.4l0.1 0.034c7.1 2.3 14 7.5 18 14 4.3 7.1 5.5 15 3.3 23-1.1 3.7-2.7 7-4.8 9.8s-4.7 5-7.6 6.6c-5.6 3-12 3.3-19 1-2.4-0.76-4.8-1.8-7.2-3.2l-0.021-0.012-0.023-7e-3c-2.5-0.82-5.4-0.73-8.4-0.63-3.1 0.1-6.3 0.21-9.1-0.72z"
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
order: 1,
|
|
1088
|
+
id: 17,
|
|
1089
|
+
name: "Upper Right Second Molar",
|
|
1090
|
+
position: "upper",
|
|
1091
|
+
side: "right",
|
|
1092
|
+
d: "m39 279c-3-0.96-6.3-2.5-8.5-6.2-1.5-2.9-2.2-10-1.8-21l6e-3 -0.19c0.026-1.2-0.17-2.8-0.37-4.5-0.4-3.4-0.86-7.3-0.045-9.8 0.4-1.1 1.9-2.4 4.2-3.7 1.8-1 3.9-1.9 4.6-2.1l6e-3 -1e-3 6e-3 -2e-3c6.5-2.1 24 2.2 29 4l0.13 0.043c3.6 1.2 6.7 2.7 9.3 4.7s4.7 4.3 6.2 6.9c1.5 2.7 2.4 5.8 2.6 9.1 0.22 3.4-0.26 7.2-1.4 11-1.9 6.6-5.5 11-11 14-3 1.6-6.6 2.4-11 2.5-3.7 0.027-7.8-0.66-12-2l-0.24-0.078c-2-0.63-3.9-1.1-5.7-1.6-1.7-0.43-3.4-0.83-4.9-1.3z"
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
order: 2,
|
|
1096
|
+
id: 16,
|
|
1097
|
+
name: "Upper Right First Molar",
|
|
1098
|
+
position: "upper",
|
|
1099
|
+
side: "right",
|
|
1100
|
+
d: "m72 229c-0.72 0-1.5-0.018-2.2-0.053-8.3-0.39-16-2.8-21-6.7-3-2.1-5.3-4.7-6.9-7.5-1.7-3.1-2.6-6.6-2.6-10 0-2.7 0.77-5.6 2-7.3 0.41-0.58 1-1.2 1.7-1.9 1.2-1.2 2.6-2.7 3.4-4.4 0.41-0.98 0.45-2.4 0.5-4 0.072-2.5 0.16-5.6 1.8-8.1l4e-3 -7e-3 4e-3 -6e-3c1.4-2.4 3.6-4.1 6.6-5.1 2.4-0.79 5.4-1.1 9.5-1.1 4.7 0.79 9 2.2 13 4.3 3.9 2 7.3 4.6 10 7.5 2.8 3 4.9 6.4 6.3 10a27 27 0 0 1 1.6 12c-1.3 16-8.7 23-23 23z"
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
order: 3,
|
|
1104
|
+
id: 15,
|
|
1105
|
+
name: "Upper Right Second Premolar",
|
|
1106
|
+
position: "upper",
|
|
1107
|
+
side: "right",
|
|
1108
|
+
d: "m73 168a39 39 0 0 1-0.2-0.1c-3.9-1.9-7.1-4.1-9.5-6.5-2.3-2.3-3.8-4.7-4.6-7.2a13 13 0 0 1-0.52-5.8c0.24-1.9 0.89-3.8 1.9-5.7 2.2-4.1 6.2-6.9 11-8 2.6-0.56 5.3-0.64 8.1-0.23 3 0.42 6 1.4 9 2.8 0.71 0.34 1.4 0.72 2.1 1.1 3.2 1.8 6.1 3.9 8.5 6.2 2.4 2.2 4.3 4.5 5.7 6.8s2.2 4.6 2.5 6.8c0.29 2.2-0.014 4.3-0.9 6.2-0.62 1.3-1.6 2.5-2.9 3.6-1.3 1-2.9 1.9-4.8 2.5-3.5 1.2-7.6 1.7-12 1.3-4.7-0.38-9.4-1.7-14-3.8z"
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
order: 4,
|
|
1112
|
+
id: 14,
|
|
1113
|
+
name: "Upper Right First Premolar",
|
|
1114
|
+
position: "upper",
|
|
1115
|
+
side: "right",
|
|
1116
|
+
d: "m118 135a6.3 6.3 0 0 1-0.3 0.28c-2.4 2.1-6.6 2.8-12 2-5.4-0.85-11-3.3-16-6.8-5.7-4.1-9.3-9.3-9.7-14-0.28-3.4 0.92-6.6 3.5-9.2a16 16 0 0 1 1.6-1.4c8.7-6.6 22-4.9 29 3.7a26 26 0 0 1 4.2 7 27 27 0 0 1 1.8 7.4c0.47 4.9-0.57 9.1-2.8 11z"
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
order: 5,
|
|
1120
|
+
id: 13,
|
|
1121
|
+
name: "Upper Right Canine",
|
|
1122
|
+
position: "upper",
|
|
1123
|
+
side: "right",
|
|
1124
|
+
d: "m144 104c-0.09 0.084-0.19 0.17-0.29 0.24-1.2 0.9-2.9 1.5-5.1 1.8-2.2 0.33-4.9 0.3-7.7-0.086-6.4-0.88-13-3.5-19-7.5-2.2-1.6-4-3.4-5.2-5.4a13 13 0 0 1-1.8-5.8c-0.18-2.6 0.36-5.4 1.6-8 1.1-2.3 2.6-4.5 4.3-6.1 0.36-0.34 0.73-0.65 1.1-0.92 1.4-1.1 4.4-2.7 7.8-4 2.8-1.1 6.8-2.2 10-1.8h8e-3c2.5 0.26 4.4 1.4 5.8 3.6 1.3 2 2.1 4.4 2.9 6.8 0.19 0.58 0.36 1.1 0.55 1.7 0.52 1.5 1.1 3.1 1.7 4.7 1.6 4.3 3.2 8.8 3.9 12 0.83 4.1 0.48 6.9-1.1 8.3z"
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
order: 6,
|
|
1128
|
+
id: 12,
|
|
1129
|
+
name: "Upper Right Lateral Incisor",
|
|
1130
|
+
position: "upper",
|
|
1131
|
+
side: "right",
|
|
1132
|
+
d: "m168 82c-2.9 1.2-6.4 0.91-11-1-3.7-1.7-7.9-4.5-13-8.8-0.54-0.44-1.1-0.86-1.6-1.3-2-1.6-3.8-3-5-4.4-1.3-1.5-1.9-2.7-1.7-4 0.17-1.6 1.4-3.3 3.9-5.3 2.6-2.1 6.8-4.5 13-7.4a105 105 0 0 1 5.9-2.8c6.4-2.7 10-3.3 13-2 2.5 1.6 2.7 5.7 3 11 0.073 1.5 0.15 3 0.28 4.6 0.61 7.4 0.52 12-0.3 15-0.86 3.2-2.6 5.2-5.8 6.6l-0.04 0.017z"
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
order: 7,
|
|
1136
|
+
id: 11,
|
|
1137
|
+
name: "Upper Right Central Incisor",
|
|
1138
|
+
position: "upper",
|
|
1139
|
+
side: "right",
|
|
1140
|
+
d: "m205 74c-10 1.1-18-9.3-23-18l-0.3-0.5c-1.4-2.4-2.7-4.6-3.5-6.7-0.85-2.3-0.88-4.2-0.11-5.9 0.9-2 2.9-3.6 6.2-5.1 3.7-1.6 8.9-3 16-4.2a82 82 0 0 1 5-0.69c4.3-0.46 7.9-0.39 11 0.2 2.4 0.52 4.2 1.5 5.4 2.8 1.3 1.5 1.9 3.6 1.7 6.3-0.14 2.4-0.79 5-1.4 7.4-0.23 0.89-0.45 1.7-0.63 2.5l-0.29 1.3c-0.98 4.3-2.1 9.3-4.2 13-2.4 4.5-5.8 6.9-10 7.6-0.21 0.03-0.42 0.057-0.62 0.079z"
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
order: 8,
|
|
1144
|
+
id: 21,
|
|
1145
|
+
name: "Upper Left Central Incisor",
|
|
1146
|
+
position: "upper",
|
|
1147
|
+
side: "left",
|
|
1148
|
+
d: "m246 32h1e-3c1.5 0.16 3.2 0.4 5 0.69 7 1.2 12 2.5 16 4.2 3.3 1.5 5.3 3.1 6.2 5.1 0.77 1.7 0.73 3.5-0.12 5.9-0.77 2.1-2.1 4.4-3.5 6.7l-0.3 0.5c-5.4 9.2-13 20-23 18a15 15 0 0 1-0.62-0.079c-4.5-0.66-7.9-3.2-10-7.6-2.1-3.9-3.2-8.9-4.2-13l-0.29-1.3c-0.18-0.81-0.4-1.7-0.63-2.5-0.63-2.5-1.3-5-1.4-7.4-0.15-2.7 0.41-4.8 1.7-6.3 1.2-1.3 3-2.3 5.4-2.8 2.7-0.58 6.3-0.65 11-0.19z"
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
order: 9,
|
|
1152
|
+
id: 22,
|
|
1153
|
+
name: "Upper Left Lateral Incisor",
|
|
1154
|
+
position: "upper",
|
|
1155
|
+
side: "left",
|
|
1156
|
+
d: "m292 47h1e-3c1.8 0.75 3.8 1.7 5.9 2.8 5.8 2.9 9.9 5.4 13 7.4 2.5 1.9 3.7 3.7 3.9 5.3 0.14 1.3-0.41 2.5-1.7 4-1.2 1.4-3 2.8-5 4.4-0.51 0.41-1 0.83-1.6 1.3-5.3 4.3-9.5 7.1-13 8.8-4.3 1.9-7.8 2.3-11 1l-0.04-0.018c-3.2-1.4-4.9-3.3-5.8-6.6-0.82-3.1-0.91-7.3-0.3-15 0.13-1.6 0.21-3.1 0.28-4.6 0.26-5.3 0.47-9.4 3-11 2.2-1.4 6.2-0.77 13 2z"
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
order: 10,
|
|
1160
|
+
id: 23,
|
|
1161
|
+
name: "Upper Left Canine",
|
|
1162
|
+
position: "upper",
|
|
1163
|
+
side: "left",
|
|
1164
|
+
d: "m339 73c1.7 1.6 3.2 3.7 4.3 6.1 1.2 2.7 1.8 5.5 1.6 8a13 13 0 0 1-1.8 5.8c-1.2 2-2.9 3.8-5.2 5.4-5.6 3.9-12 6.6-19 7.5-2.8 0.38-5.4 0.41-7.7 0.086-2.2-0.32-3.9-0.96-5.1-1.8a4 4 0 0 1-0.29-0.24c-1.6-1.4-1.9-4.2-1.1-8.3 0.75-3.7 2.4-8.2 3.9-12a301 301 0 0 0 1.7-4.7c0.18-0.54 0.36-1.1 0.55-1.7 0.77-2.4 1.6-4.8 2.9-6.8 1.5-2.2 3.4-3.4 5.8-3.6h5e-3l4e-3 -1e-3c3.3-0.45 7.3 0.71 10 1.8 3.4 1.3 6.4 3 7.8 4 0.36 0.27 0.73 0.58 1.1 0.92z"
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
order: 11,
|
|
1168
|
+
id: 24,
|
|
1169
|
+
name: "Upper Left First Premolar",
|
|
1170
|
+
position: "upper",
|
|
1171
|
+
side: "left",
|
|
1172
|
+
d: "m367 107h1e-3c2.6 2.6 3.8 5.7 3.5 9.2-0.42 5-3.9 10-9.7 14-5 3.6-11 6-16 6.8-5.1 0.81-9.4 0.076-12-2a6.3 6.3 0 0 1-0.3-0.28c-2.2-2.2-3.3-6.5-2.8-11a27 27 0 0 1 1.8-7.4 26 26 0 0 1 4.2-7c7.4-8.7 21-10 29-3.7a16 16 0 0 1 1.6 1.4z"
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
order: 12,
|
|
1176
|
+
id: 25,
|
|
1177
|
+
name: "Upper Left Second Premolar",
|
|
1178
|
+
position: "upper",
|
|
1179
|
+
side: "left",
|
|
1180
|
+
d: "m362 137 2e-3 -1e-3c3-1.5 6-2.4 9-2.8 2.8-0.4 5.6-0.32 8.1 0.24 5 1.1 9 3.9 11 8 1 1.9 1.7 3.8 1.9 5.7a13 13 0 0 1-0.52 5.8c-0.8 2.5-2.4 5-4.6 7.2-2.4 2.4-5.6 4.6-9.5 6.5l-0.2 0.1c-4.3 2.1-9.1 3.4-14 3.8-4.3 0.35-8.5-0.11-12-1.3-1.9-0.65-3.5-1.5-4.8-2.5s-2.3-2.2-2.9-3.6c-0.89-1.9-1.2-4-0.9-6.2 0.28-2.2 1.1-4.5 2.5-6.8s3.3-4.6 5.7-6.8 5.3-4.3 8.5-6.2a37 37 0 0 1 2.1-1.1z"
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
order: 13,
|
|
1184
|
+
id: 26,
|
|
1185
|
+
name: "Upper Left First Molar",
|
|
1186
|
+
position: "upper",
|
|
1187
|
+
side: "left",
|
|
1188
|
+
d: "m378 229c-15 0-22-7.3-23-23-0.33-4.1 0.2-8 1.6-12 1.3-3.7 3.4-7 6.3-10 2.8-3 6.2-5.5 10-7.5 4-2.1 8.4-3.5 13-4.3 4.1 1e-3 7.1 0.36 9.5 1.1 3 0.98 5.2 2.6 6.6 5.1l4e-3 6e-3 4e-3 7e-3c1.6 2.4 1.7 5.5 1.8 8.1 0.046 1.6 0.087 3 0.5 4 0.76 1.8 2.1 3.2 3.4 4.4 0.65 0.66 1.3 1.3 1.7 1.9 1.2 1.7 2 4.5 2 7.3 0 3.8-0.87 7.2-2.6 10-1.6 2.9-3.9 5.4-6.9 7.5-5.5 3.9-13 6.3-21 6.7-0.76 0.035-1.5 0.053-2.2 0.053z"
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
order: 14,
|
|
1192
|
+
id: 27,
|
|
1193
|
+
name: "Upper Left Second Molar",
|
|
1194
|
+
position: "upper",
|
|
1195
|
+
side: "left",
|
|
1196
|
+
d: "m386 236c5.5-1.8 23-6.1 29-4l6e-3 2e-3 6e-3 1e-3c0.74 0.2 2.7 1 4.6 2.1 2.4 1.3 3.8 2.6 4.2 3.7 0.81 2.4 0.36 6.3-0.045 9.8-0.2 1.7-0.4 3.4-0.37 4.5l7e-3 0.2c0.36 11-0.3 18-1.8 21-2.2 3.8-5.6 5.3-8.5 6.2-1.5 0.5-3.2 0.9-4.9 1.3-1.9 0.48-3.9 0.97-6 1.6-4.2 1.4-8.3 2.1-12 2-4-0.028-7.5-0.86-11-2.5-5-2.7-8.6-7.4-11-14-1.2-4-1.7-7.8-1.4-11 0.22-3.3 1.1-6.4 2.6-9.1 1.5-2.6 3.5-5 6.2-6.9 2.6-1.9 5.7-3.5 9.3-4.7l0.13-0.043z"
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
order: 15,
|
|
1200
|
+
id: 28,
|
|
1201
|
+
name: "Upper Left Third Molar",
|
|
1202
|
+
position: "upper",
|
|
1203
|
+
side: "left",
|
|
1204
|
+
d: "m384 294c2.3-0.74 6.7-1.8 12-2.4 4-0.5 9.7-0.87 14 0.23 0.11 0.03 0.28 0.068 0.48 0.12 1.3 0.3 4.3 1 7.1 2.4 3.5 1.7 5.5 3.9 6 6.4l3e-3 0.015 5e-3 0.015c0.82 2.4 0.36 6.3-0.044 9.8-0.2 1.7-0.4 3.4-0.37 4.5 0.021 0.63 0.58 1.4 1.4 2.4 1.1 1.4 2.6 3.4 3.4 6.2 0.48 1.5 0.72 3.1 0.73 4.7 8e-3 1.9-0.31 4-0.94 6.1-0.91 2.8-2.1 4.9-3.6 6.5-1.3 1.4-2.8 2.4-4.7 3-2.8 0.93-6 0.82-9.1 0.72-3-0.1-5.9-0.2-8.4 0.63l-0.023 7e-3 -0.021 0.011c-2.4 1.3-4.8 2.4-7.2 3.2-7 2.3-14 1.9-19-1-2.9-1.5-5.5-3.8-7.6-6.6s-3.8-6.1-4.8-9.8c-2.2-7.6-1.1-16 3.3-23 4-6.7 10-12 18-14l0.1-0.034z"
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
order: 16,
|
|
1208
|
+
id: 38,
|
|
1209
|
+
name: "Lower Left Third Molar",
|
|
1210
|
+
position: "lower",
|
|
1211
|
+
side: "left",
|
|
1212
|
+
d: "m420 406c1.8 0.6 3.4 1.6 4.7 3 1.5 1.6 2.7 3.7 3.6 6.5 0.63 2.1 0.94 4.2 0.94 6.1a16 16 0 0 1-0.73 4.7c-0.87 2.8-2.3 4.7-3.4 6.2-0.78 1-1.3 1.8-1.4 2.4-0.026 1.2 0.17 2.8 0.37 4.5 0.4 3.4 0.86 7.3 0.044 9.8l-5e-3 0.015-3e-3 0.015c-0.51 2.5-2.5 4.7-6 6.4-2.8 1.4-5.8 2.1-7.1 2.4-0.21 0.049-0.37 0.088-0.48 0.12-4.7 1.1-10 0.73-14 0.23-4.9-0.62-9.3-1.7-12-2.4l-0.1-0.034c-7.1-2.3-14-7.5-18-14-4.3-7.1-5.5-15-3.3-23 1.1-3.7 2.7-7 4.8-9.8s4.7-5 7.6-6.6c5.6-3 12-3.3 19-1 2.4 0.76 4.8 1.8 7.2 3.2l0.021 0.012 0.023 7e-3c2.5 0.82 5.4 0.73 8.4 0.63 3.1-0.1 6.3-0.21 9.1 0.72z"
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
order: 17,
|
|
1216
|
+
id: 37,
|
|
1217
|
+
name: "Lower Left Second Molar",
|
|
1218
|
+
position: "lower",
|
|
1219
|
+
side: "left",
|
|
1220
|
+
d: "m411 471c3 0.96 6.3 2.5 8.5 6.2 1.5 2.9 2.2 10 1.8 21l-6e-3 0.19c-0.026 1.2 0.17 2.8 0.37 4.5 0.4 3.4 0.86 7.3 0.045 9.8-0.4 1.1-1.9 2.4-4.2 3.7-1.8 1-3.9 1.9-4.6 2.1l-6e-3 1e-3 -6e-3 2e-3c-6.5 2.1-24-2.2-29-4a32 32 0 0 1-0.13-0.043c-3.6-1.2-6.7-2.7-9.3-4.7s-4.7-4.3-6.2-6.9c-1.5-2.7-2.4-5.8-2.6-9.1-0.22-3.4 0.26-7.2 1.4-11 1.9-6.6 5.5-11 11-14 3-1.6 6.6-2.4 11-2.5 3.7-0.027 7.8 0.66 12 2l0.24 0.078c2 0.63 3.9 1.1 5.7 1.6 1.7 0.43 3.4 0.83 4.9 1.3z"
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
order: 18,
|
|
1224
|
+
id: 36,
|
|
1225
|
+
name: "Lower Left First Molar",
|
|
1226
|
+
position: "lower",
|
|
1227
|
+
side: "left",
|
|
1228
|
+
d: "m386 578c-4.7-0.79-9-2.2-13-4.3-3.9-2-7.3-4.6-10-7.5-2.8-3-4.9-6.4-6.3-10a27 27 0 0 1-1.6-12c1.3-16 8.7-23 23-23 0.72 0 1.5 0.018 2.2 0.053 8.3 0.39 16 2.8 21 6.7 3 2.1 5.3 4.7 6.9 7.5 1.7 3.1 2.6 6.6 2.6 10 0 2.7-0.77 5.6-2 7.3-0.41 0.58-1 1.2-1.7 1.9-1.2 1.2-2.6 2.7-3.4 4.4-0.41 0.98-0.45 2.4-0.5 4-0.072 2.5-0.16 5.6-1.8 8.1l-8e-3 0.012c-1.4 2.4-3.6 4.1-6.6 5.1-2.4 0.79-5.4 1.1-9.5 1.1z"
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
order: 19,
|
|
1232
|
+
id: 35,
|
|
1233
|
+
name: "Lower Left Second Premolar",
|
|
1234
|
+
position: "lower",
|
|
1235
|
+
side: "left",
|
|
1236
|
+
d: "m377 582 0.2 0.1c3.9 1.9 7.1 4.1 9.5 6.5 2.3 2.3 3.8 4.7 4.6 7.2 0.59 1.9 0.77 3.8 0.52 5.8-0.24 1.9-0.89 3.8-1.9 5.7-2.2 4.1-6.2 6.9-11 8-2.6 0.56-5.3 0.64-8.1 0.23-3-0.42-6-1.4-9-2.8a37 37 0 0 1-2.1-1.1c-3.2-1.8-6.1-3.9-8.5-6.2-2.4-2.2-4.3-4.5-5.7-6.8s-2.2-4.6-2.5-6.8c-0.29-2.2 0.014-4.3 0.9-6.2 0.62-1.3 1.6-2.5 2.9-3.6 1.3-1 2.9-1.9 4.8-2.5 3.5-1.2 7.6-1.7 12-1.3 4.7 0.38 9.4 1.7 14 3.8z"
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
order: 20,
|
|
1240
|
+
id: 34,
|
|
1241
|
+
name: "Lower Left First Premolar",
|
|
1242
|
+
position: "lower",
|
|
1243
|
+
side: "left",
|
|
1244
|
+
d: "m332 615a6.3 6.3 0 0 1 0.3-0.28c2.4-2.1 6.6-2.8 12-2 5.4 0.85 11 3.3 16 6.8 5.7 4.1 9.3 9.3 9.7 14 0.28 3.4-0.92 6.6-3.5 9.2-0.49 0.49-1 0.96-1.6 1.4-8.7 6.6-22 4.9-29-3.7a26 26 0 0 1-4.2-7 27 27 0 0 1-1.8-7.4c-0.47-4.9 0.57-9.1 2.8-11z"
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
order: 21,
|
|
1248
|
+
id: 33,
|
|
1249
|
+
name: "Lower Left Canine",
|
|
1250
|
+
position: "lower",
|
|
1251
|
+
side: "left",
|
|
1252
|
+
d: "m307 647c0.09-0.084 0.19-0.17 0.29-0.24 1.2-0.9 2.9-1.5 5.1-1.8 2.2-0.33 4.9-0.3 7.7 0.086 6.4 0.88 13 3.5 19 7.5 2.2 1.6 4 3.4 5.2 5.4a13 13 0 0 1 1.8 5.8c0.18 2.6-0.36 5.4-1.6 8-1.1 2.3-2.6 4.5-4.3 6.1-0.36 0.34-0.73 0.65-1.1 0.92-1.4 1.1-4.4 2.7-7.8 4-2.8 1.1-6.8 2.2-10 1.8h-8e-3c-2.5-0.26-4.4-1.4-5.8-3.6-1.3-2-2.1-4.4-2.9-6.8-0.19-0.58-0.36-1.1-0.55-1.7a301 301 0 0 0-1.7-4.7c-1.6-4.3-3.2-8.8-3.9-12-0.83-4.1-0.48-6.9 1.1-8.3z"
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
order: 22,
|
|
1256
|
+
id: 32,
|
|
1257
|
+
name: "Lower Left Lateral Incisor",
|
|
1258
|
+
position: "lower",
|
|
1259
|
+
side: "left",
|
|
1260
|
+
d: "m283 669c2.9-1.2 6.4-0.91 11 1 3.7 1.7 7.9 4.5 13 8.8 0.54 0.44 1.1 0.86 1.6 1.3 2 1.6 3.8 3 5 4.4 1.3 1.5 1.9 2.7 1.7 4-0.17 1.6-1.4 3.3-3.9 5.3-2.6 2.1-6.8 4.5-13 7.4a105 105 0 0 1-5.9 2.8c-6.4 2.7-10 3.3-13 2-2.5-1.6-2.7-5.7-3-11-0.073-1.5-0.15-3-0.28-4.6-0.61-7.4-0.52-12 0.3-15 0.86-3.2 2.6-5.2 5.8-6.6l0.04-0.017z"
|
|
1261
|
+
},
|
|
1262
|
+
{
|
|
1263
|
+
order: 23,
|
|
1264
|
+
id: 31,
|
|
1265
|
+
name: "Lower Left Central Incisor",
|
|
1266
|
+
position: "lower",
|
|
1267
|
+
side: "left",
|
|
1268
|
+
d: "m245 677c10-1.1 18 9.3 23 18l0.3 0.5c1.4 2.4 2.7 4.6 3.5 6.7 0.85 2.3 0.88 4.2 0.11 5.9-0.9 2-2.9 3.6-6.2 5.1-3.7 1.6-8.9 3-16 4.2a82 82 0 0 1-5 0.69c-4.3 0.46-7.9 0.39-11-0.2-2.4-0.52-4.2-1.5-5.4-2.8-1.3-1.5-1.9-3.6-1.7-6.3 0.14-2.4 0.79-5 1.4-7.4a96 96 0 0 0 0.92-3.8c0.98-4.3 2.1-9.3 4.2-13 2.4-4.5 5.8-6.9 10-7.6 0.21-0.03 0.42-0.057 0.62-0.079z"
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
order: 24,
|
|
1272
|
+
id: 41,
|
|
1273
|
+
name: "Lower Right Central Incisor",
|
|
1274
|
+
position: "lower",
|
|
1275
|
+
side: "right",
|
|
1276
|
+
d: "m205 718h-1e-3a82 82 0 0 1-5-0.69c-7-1.2-12-2.5-16-4.2-3.3-1.5-5.3-3.1-6.2-5.1-0.77-1.7-0.73-3.5 0.12-5.9 0.77-2.1 2.1-4.4 3.5-6.7l0.3-0.5c5.4-9.2 13-20 23-18 0.21 0.022 0.42 0.048 0.62 0.079 4.5 0.66 7.9 3.2 10 7.6 2.1 3.9 3.2 8.9 4.2 13l0.29 1.3c0.18 0.81 0.4 1.7 0.63 2.5 0.63 2.5 1.3 5 1.4 7.4 0.15 2.7-0.41 4.8-1.7 6.3-1.2 1.3-3 2.3-5.4 2.8-2.7 0.58-6.3 0.65-11 0.19z"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
order: 25,
|
|
1280
|
+
id: 42,
|
|
1281
|
+
name: "Lower Right Lateral Incisor",
|
|
1282
|
+
position: "lower",
|
|
1283
|
+
side: "right",
|
|
1284
|
+
d: "m158 704h-1e-3a105 105 0 0 1-5.9-2.8c-5.8-2.9-9.9-5.4-13-7.4-2.5-1.9-3.7-3.7-3.9-5.3-0.14-1.3 0.41-2.5 1.7-4 1.2-1.4 3-2.8 5-4.4 0.51-0.41 1-0.83 1.6-1.3 5.3-4.3 9.5-7.1 13-8.8 4.3-1.9 7.8-2.3 11-1l0.04 0.018c3.2 1.4 4.9 3.3 5.8 6.6 0.82 3.1 0.91 7.3 0.3 15-0.13 1.6-0.21 3.1-0.28 4.6-0.26 5.3-0.47 9.4-3 11-2.2 1.4-6.2 0.77-13-2z"
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
order: 26,
|
|
1288
|
+
id: 43,
|
|
1289
|
+
name: "Lower Right Canine",
|
|
1290
|
+
position: "lower",
|
|
1291
|
+
side: "right",
|
|
1292
|
+
d: "m111 677c-1.7-1.6-3.2-3.7-4.3-6.1-1.2-2.7-1.8-5.5-1.6-8a13 13 0 0 1 1.8-5.8c1.2-2 2.9-3.8 5.2-5.4 5.6-3.9 12-6.6 19-7.5 2.8-0.38 5.4-0.41 7.7-0.086 2.2 0.32 3.9 0.96 5.1 1.8 0.1 0.076 0.2 0.16 0.29 0.24 1.6 1.4 1.9 4.2 1.1 8.3-0.75 3.7-2.4 8.2-3.9 12a300 300 0 0 0-1.7 4.7c-0.18 0.54-0.36 1.1-0.55 1.7-0.77 2.4-1.6 4.8-2.9 6.8-1.5 2.2-3.4 3.4-5.8 3.6h-5e-3l-4e-3 1e-3c-3.3 0.45-7.3-0.71-10-1.8-3.4-1.3-6.4-3-7.8-4a13 13 0 0 1-1.1-0.92z"
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
order: 27,
|
|
1296
|
+
id: 44,
|
|
1297
|
+
name: "Lower Right First Premolar",
|
|
1298
|
+
position: "lower",
|
|
1299
|
+
side: "right",
|
|
1300
|
+
d: "m83 643h-1e-3c-2.6-2.6-3.8-5.7-3.5-9.2 0.42-5 3.9-10 9.7-14 5-3.6 11-6 16-6.8 5.1-0.81 9.4-0.076 12 2 0.1 0.089 0.2 0.18 0.3 0.28 2.2 2.2 3.3 6.5 2.8 11a27 27 0 0 1-1.8 7.4 26 26 0 0 1-4.2 7c-7.4 8.7-21 10-29 3.7a16 16 0 0 1-1.6-1.4z"
|
|
1301
|
+
},
|
|
1302
|
+
{
|
|
1303
|
+
order: 28,
|
|
1304
|
+
id: 45,
|
|
1305
|
+
name: "Lower Right Second Premolar",
|
|
1306
|
+
position: "lower",
|
|
1307
|
+
side: "right",
|
|
1308
|
+
d: "m88 613-2e-3 1e-3c-3 1.5-6 2.4-9 2.8-2.8 0.4-5.6 0.32-8.1-0.24-5-1.1-9-3.9-11-8-1-1.9-1.7-3.8-1.9-5.7a13 13 0 0 1 0.52-5.8c0.8-2.5 2.4-5 4.6-7.2 2.4-2.4 5.6-4.6 9.5-6.5l0.2-0.1c4.3-2.1 9.1-3.4 14-3.8 4.3-0.35 8.5 0.11 12 1.3 1.9 0.65 3.5 1.5 4.8 2.5s2.3 2.2 2.9 3.6c0.89 1.9 1.2 4 0.9 6.2-0.28 2.2-1.1 4.5-2.5 6.8s-3.3 4.6-5.7 6.8-5.3 4.3-8.5 6.2c-0.7 0.4-1.4 0.78-2.1 1.1z"
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
order: 29,
|
|
1312
|
+
id: 46,
|
|
1313
|
+
name: "Lower Right First Molar",
|
|
1314
|
+
position: "lower",
|
|
1315
|
+
side: "right",
|
|
1316
|
+
d: "m65 578c-4.1-1e-3 -7.1-0.36-9.5-1.1-3-0.98-5.2-2.6-6.6-5.1l-4e-3 -7e-3 -4e-3 -6e-3c-1.6-2.4-1.7-5.5-1.8-8.1-0.047-1.6-0.087-3-0.5-4-0.76-1.8-2.1-3.2-3.4-4.4-0.65-0.66-1.3-1.3-1.7-1.9-1.2-1.7-2-4.5-2-7.3 0-3.8 0.87-7.2 2.6-10 1.6-2.9 3.9-5.4 6.9-7.5 5.5-3.9 13-6.3 21-6.7 0.76-0.035 1.5-0.053 2.2-0.053 15 0 22 7.3 23 23 0.34 4.1-0.2 8-1.6 12-1.3 3.7-3.5 7-6.3 10s-6.2 5.5-10 7.5c-4 2.1-8.4 3.5-13 4.3z"
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
order: 30,
|
|
1320
|
+
id: 47,
|
|
1321
|
+
name: "Lower Right Second Molar",
|
|
1322
|
+
position: "lower",
|
|
1323
|
+
side: "right",
|
|
1324
|
+
d: "m66 515c-5.5 1.8-23 6.1-29 4l-7e-3 -2e-3 -6e-3 -1e-3c-0.74-0.2-2.7-1-4.6-2.1-2.4-1.3-3.8-2.6-4.2-3.7-0.81-2.4-0.36-6.3 0.045-9.8 0.2-1.7 0.4-3.4 0.37-4.5l-7e-3 -0.2c-0.36-11 0.3-18 1.8-21 2.2-3.8 5.6-5.3 8.5-6.2 1.5-0.5 3.2-0.9 4.9-1.3 1.9-0.48 3.9-0.97 6-1.6 4.2-1.4 8.3-2.1 12-2 4 0.028 7.5 0.86 11 2.5 5 2.7 8.6 7.4 11 14 1.2 4 1.7 7.8 1.4 11-0.22 3.3-1.1 6.4-2.6 9.1-1.5 2.6-3.5 5-6.2 6.9-2.6 1.9-5.7 3.5-9.3 4.7l-0.13 0.043z"
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
order: 31,
|
|
1328
|
+
id: 48,
|
|
1329
|
+
name: "Lower Right Third Molar",
|
|
1330
|
+
position: "lower",
|
|
1331
|
+
side: "right",
|
|
1332
|
+
d: "m66 456c-2.3 0.74-6.7 1.8-12 2.4-4 0.5-9.7 0.87-14-0.23a21 21 0 0 0-0.48-0.12c-1.3-0.3-4.3-1-7.1-2.4-3.5-1.7-5.5-3.9-6-6.4l-3e-3 -0.015-5e-3 -0.015c-0.82-2.4-0.36-6.3 0.044-9.8 0.2-1.7 0.4-3.4 0.37-4.5-0.021-0.63-0.58-1.4-1.4-2.4-1.1-1.4-2.6-3.4-3.4-6.2a16 16 0 0 1-0.73-4.7c-8e-3 -1.9 0.31-4 0.94-6.1 0.91-2.8 2.1-4.9 3.6-6.5 1.3-1.4 2.8-2.4 4.7-3 2.8-0.93 6-0.82 9.1-0.72 3 0.1 5.9 0.2 8.4-0.63l0.023-7e-3 0.021-0.011c2.4-1.3 4.8-2.4 7.2-3.2 7-2.3 14-1.9 19 1 2.9 1.5 5.5 3.8 7.6 6.6s3.8 6.1 4.8 9.8c2.2 7.6 1.1 16-3.3 23-4 6.7-10 12-18 14l-0.1 0.034z"
|
|
1333
|
+
}
|
|
1334
|
+
];
|
|
1335
|
+
var adjacentTeethPairs = [
|
|
1336
|
+
[17, 18],
|
|
1337
|
+
[16, 17],
|
|
1338
|
+
[15, 16],
|
|
1339
|
+
[14, 15],
|
|
1340
|
+
[13, 14],
|
|
1341
|
+
[12, 13],
|
|
1342
|
+
[11, 12],
|
|
1343
|
+
[11, 21],
|
|
1344
|
+
[21, 22],
|
|
1345
|
+
[22, 23],
|
|
1346
|
+
[23, 24],
|
|
1347
|
+
[24, 25],
|
|
1348
|
+
[25, 26],
|
|
1349
|
+
[26, 27],
|
|
1350
|
+
[27, 28],
|
|
1351
|
+
[37, 38],
|
|
1352
|
+
[36, 37],
|
|
1353
|
+
[35, 36],
|
|
1354
|
+
[34, 35],
|
|
1355
|
+
[33, 34],
|
|
1356
|
+
[32, 33],
|
|
1357
|
+
[31, 32],
|
|
1358
|
+
[31, 41],
|
|
1359
|
+
[41, 42],
|
|
1360
|
+
[42, 43],
|
|
1361
|
+
[43, 44],
|
|
1362
|
+
[44, 45],
|
|
1363
|
+
[45, 46],
|
|
1364
|
+
[46, 47],
|
|
1365
|
+
[47, 48]
|
|
1366
|
+
];
|
|
1367
|
+
function getTeethInRange(startId, endId) {
|
|
1368
|
+
const startTooth = teethData.find((t) => t.id === startId);
|
|
1369
|
+
const endTooth = teethData.find((t) => t.id === endId);
|
|
1370
|
+
if (!startTooth || !endTooth)
|
|
1371
|
+
return [];
|
|
1372
|
+
const minOrder = Math.min(startTooth.order, endTooth.order);
|
|
1373
|
+
const maxOrder = Math.max(startTooth.order, endTooth.order);
|
|
1374
|
+
return teethData.filter((t) => t.order >= minOrder && t.order <= maxOrder).map((t) => t.id);
|
|
1375
|
+
}
|
|
1376
|
+
function sameSide(tooth1, tooth2) {
|
|
1377
|
+
const [a, b] = [tooth1.toString(), tooth2.toString()];
|
|
1378
|
+
return a[0] === b[0];
|
|
1379
|
+
}
|
|
1380
|
+
function parseTeethSelection(input) {
|
|
1381
|
+
const selectedTeeth = [];
|
|
1382
|
+
const bridges = [];
|
|
1383
|
+
const regex = /\[(\d+)\s*,\s*(\d+)\]|(\d+)/g;
|
|
1384
|
+
let match;
|
|
1385
|
+
while ((match = regex.exec(input)) !== null) {
|
|
1386
|
+
if (match[1] && match[2]) {
|
|
1387
|
+
let start = Number(match[1]);
|
|
1388
|
+
let end = Number(match[2]);
|
|
1389
|
+
[start, end] = [Math.min(start, end), Math.max(start, end)];
|
|
1390
|
+
const range = [];
|
|
1391
|
+
if (sameSide(start, end)) {
|
|
1392
|
+
for (let i = start;i <= end; i++) {
|
|
1393
|
+
range.push(i);
|
|
1394
|
+
}
|
|
1395
|
+
} else {
|
|
1396
|
+
const crossA = Number(`${start.toString()[0]}1`);
|
|
1397
|
+
const crossB = Number(`${end.toString()[0]}1`);
|
|
1398
|
+
for (let i = start;i >= crossA; i--) {
|
|
1399
|
+
range.push(i);
|
|
1400
|
+
}
|
|
1401
|
+
for (let i = crossB;i <= end; i++) {
|
|
1402
|
+
range.push(i);
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
selectedTeeth.push(...range);
|
|
1406
|
+
for (let i = 0;i < range.length - 1; i++) {
|
|
1407
|
+
bridges.push([range[i], range[i + 1]]);
|
|
1408
|
+
}
|
|
1409
|
+
} else if (match[3]) {
|
|
1410
|
+
selectedTeeth.push(Number(match[3]));
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
return { selectedTeeth, bridges };
|
|
1414
|
+
}
|
|
1415
|
+
function formatTeethSelection(selectedTeeth, bridges) {
|
|
1416
|
+
if (!selectedTeeth || selectedTeeth.length === 0) {
|
|
1417
|
+
return "";
|
|
1418
|
+
}
|
|
1419
|
+
const bridgeMap = new Map;
|
|
1420
|
+
bridges.forEach(([tooth1, tooth2]) => {
|
|
1421
|
+
if (!bridgeMap.has(tooth1))
|
|
1422
|
+
bridgeMap.set(tooth1, []);
|
|
1423
|
+
if (!bridgeMap.has(tooth2))
|
|
1424
|
+
bridgeMap.set(tooth2, []);
|
|
1425
|
+
bridgeMap.get(tooth1).push(tooth2);
|
|
1426
|
+
bridgeMap.get(tooth2).push(tooth1);
|
|
1427
|
+
});
|
|
1428
|
+
const result = [];
|
|
1429
|
+
let currentGroup = [];
|
|
1430
|
+
selectedTeeth.forEach((tooth, index) => {
|
|
1431
|
+
if (index === 0) {
|
|
1432
|
+
currentGroup.push(tooth);
|
|
1433
|
+
return;
|
|
1434
|
+
}
|
|
1435
|
+
const prevTooth = selectedTeeth[index - 1];
|
|
1436
|
+
const hasBridge = bridgeMap.has(prevTooth) && bridgeMap.get(prevTooth).includes(tooth) && Math.abs(selectedTeeth.indexOf(tooth) - selectedTeeth.indexOf(prevTooth)) === 1;
|
|
1437
|
+
if (hasBridge) {
|
|
1438
|
+
currentGroup.push(tooth);
|
|
1439
|
+
} else {
|
|
1440
|
+
if (currentGroup.length > 0) {
|
|
1441
|
+
if (currentGroup.length === 1) {
|
|
1442
|
+
result.push(`${currentGroup[0]}`);
|
|
1443
|
+
} else {
|
|
1444
|
+
result.push(`[${currentGroup[0]}, ${currentGroup[currentGroup.length - 1]}]`);
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
currentGroup = [tooth];
|
|
1448
|
+
}
|
|
1449
|
+
});
|
|
1450
|
+
if (currentGroup.length > 0) {
|
|
1451
|
+
if (currentGroup.length === 1) {
|
|
1452
|
+
result.push(`${currentGroup[0]}`);
|
|
1453
|
+
} else {
|
|
1454
|
+
result.push(`[${currentGroup[0]}, ${currentGroup[currentGroup.length - 1]}]`);
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
return result.join(", ");
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
// components/teeth-selector.tsx
|
|
1461
|
+
var jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
|
|
1462
|
+
"use client";
|
|
1463
|
+
var initialState = {
|
|
1464
|
+
selectedTeeth: [],
|
|
1465
|
+
bridges: []
|
|
1466
|
+
};
|
|
1467
|
+
function selectionReducer(state, action) {
|
|
1468
|
+
switch (action.type) {
|
|
1469
|
+
case "toggle-tooth": {
|
|
1470
|
+
const exists = state.selectedTeeth.includes(action.toothId);
|
|
1471
|
+
const selectedTeeth = exists ? state.selectedTeeth.filter((id) => id !== action.toothId) : [...state.selectedTeeth, action.toothId];
|
|
1472
|
+
const bridges = exists ? state.bridges.filter(([a, b]) => a !== action.toothId && b !== action.toothId) : state.bridges;
|
|
1473
|
+
return { selectedTeeth, bridges };
|
|
1474
|
+
}
|
|
1475
|
+
case "select-range": {
|
|
1476
|
+
const selectedTeeth = Array.from(new Set([...state.selectedTeeth, ...action.teethIds]));
|
|
1477
|
+
const consecutivePairs = [];
|
|
1478
|
+
for (let i = 0;i < action.teethIds.length - 1; i++) {
|
|
1479
|
+
consecutivePairs.push([action.teethIds[i], action.teethIds[i + 1]]);
|
|
1480
|
+
}
|
|
1481
|
+
const existing = new Set(state.bridges.map((b) => `${Math.min(...b)}-${Math.max(...b)}`));
|
|
1482
|
+
const newBridges = consecutivePairs.filter(([a, b]) => adjacentTeethPairs.some(([x, y]) => x === a && y === b || x === b && y === a)).map((pair) => [Math.min(...pair), Math.max(...pair)]).filter((pair) => {
|
|
1483
|
+
const key = `${pair[0]}-${pair[1]}`;
|
|
1484
|
+
return !existing.has(key);
|
|
1485
|
+
});
|
|
1486
|
+
return {
|
|
1487
|
+
selectedTeeth,
|
|
1488
|
+
bridges: [...state.bridges, ...newBridges]
|
|
1489
|
+
};
|
|
1490
|
+
}
|
|
1491
|
+
case "select-upper": {
|
|
1492
|
+
const upper = teethData.filter((t) => t.position === "upper").map((t) => t.id);
|
|
1493
|
+
return selectionReducer(state, { type: "select-range", teethIds: upper });
|
|
1494
|
+
}
|
|
1495
|
+
case "select-lower": {
|
|
1496
|
+
const lower = teethData.filter((t) => t.position === "lower").map((t) => t.id);
|
|
1497
|
+
return selectionReducer(state, { type: "select-range", teethIds: lower });
|
|
1498
|
+
}
|
|
1499
|
+
case "clear-all":
|
|
1500
|
+
return initialState;
|
|
1501
|
+
case "toggle-bridge": {
|
|
1502
|
+
const { fromId, toId } = action;
|
|
1503
|
+
if (!state.selectedTeeth.includes(fromId) || !state.selectedTeeth.includes(toId)) {
|
|
1504
|
+
return {
|
|
1505
|
+
selectedTeeth: [...state.selectedTeeth, fromId, toId],
|
|
1506
|
+
bridges: [
|
|
1507
|
+
...state.bridges,
|
|
1508
|
+
[Math.min(fromId, toId), Math.max(fromId, toId)]
|
|
1509
|
+
]
|
|
1510
|
+
};
|
|
1511
|
+
}
|
|
1512
|
+
const key = (a, b) => `${Math.min(a, b)}-${Math.max(a, b)}`;
|
|
1513
|
+
const exists = state.bridges.some(([a, b]) => key(a, b) === key(fromId, toId));
|
|
1514
|
+
const bridges = exists ? state.bridges.filter(([a, b]) => key(a, b) !== key(fromId, toId)) : [...state.bridges, [Math.min(fromId, toId), Math.max(fromId, toId)]];
|
|
1515
|
+
return { ...state, bridges };
|
|
1516
|
+
}
|
|
1517
|
+
case "set":
|
|
1518
|
+
return action.state;
|
|
1519
|
+
default:
|
|
1520
|
+
return state;
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
var TeethSelectorContext = React.createContext(null);
|
|
1524
|
+
function useTeethSelectorContext() {
|
|
1525
|
+
const context = React.useContext(TeethSelectorContext);
|
|
1526
|
+
if (!context) {
|
|
1527
|
+
throw new Error("useTeethSelectorContext must be used within a TeethSelector");
|
|
1528
|
+
}
|
|
1529
|
+
return context;
|
|
1530
|
+
}
|
|
1531
|
+
var initialDragState = {
|
|
1532
|
+
start: null,
|
|
1533
|
+
current: null,
|
|
1534
|
+
teethInRange: []
|
|
1535
|
+
};
|
|
1536
|
+
var TeethSelector = React.forwardRef((props, ref) => {
|
|
1537
|
+
const {
|
|
1538
|
+
defaultSelectedTeeth = [],
|
|
1539
|
+
defaultBridges = [],
|
|
1540
|
+
selectedTeeth: controlledSelectedTeeth,
|
|
1541
|
+
bridges: controlledBridges,
|
|
1542
|
+
onSelectionChange,
|
|
1543
|
+
onBridgeChange,
|
|
1544
|
+
onChange,
|
|
1545
|
+
children
|
|
1546
|
+
} = props;
|
|
1547
|
+
const isControlled = controlledSelectedTeeth !== undefined || controlledBridges !== undefined;
|
|
1548
|
+
const [internalState, dispatch] = React.useReducer(selectionReducer, {
|
|
1549
|
+
selectedTeeth: defaultSelectedTeeth,
|
|
1550
|
+
bridges: defaultBridges
|
|
1551
|
+
});
|
|
1552
|
+
const [dragState, setDragState] = React.useState(initialDragState);
|
|
1553
|
+
const state = isControlled ? {
|
|
1554
|
+
selectedTeeth: controlledSelectedTeeth ?? internalState.selectedTeeth,
|
|
1555
|
+
bridges: controlledBridges ?? internalState.bridges
|
|
1556
|
+
} : internalState;
|
|
1557
|
+
const prevStateRef = React.useRef(state);
|
|
1558
|
+
React.useEffect(() => {
|
|
1559
|
+
if (prevStateRef.current.selectedTeeth !== state.selectedTeeth || prevStateRef.current.bridges !== state.bridges) {
|
|
1560
|
+
const sorted = teethData.filter((t) => state.selectedTeeth.includes(t.id)).sort((a, b) => a.order - b.order);
|
|
1561
|
+
onSelectionChange?.(sorted);
|
|
1562
|
+
onBridgeChange?.(state.bridges);
|
|
1563
|
+
onChange?.(sorted, state.bridges);
|
|
1564
|
+
prevStateRef.current = state;
|
|
1565
|
+
}
|
|
1566
|
+
}, [state, onSelectionChange, onBridgeChange, onChange]);
|
|
1567
|
+
const toggleTooth = React.useCallback((toothId) => {
|
|
1568
|
+
dispatch({ type: "toggle-tooth", toothId });
|
|
1569
|
+
}, []);
|
|
1570
|
+
const toggleBridge = React.useCallback((fromId, toId) => {
|
|
1571
|
+
dispatch({ type: "toggle-bridge", fromId, toId });
|
|
1572
|
+
}, []);
|
|
1573
|
+
const selectUpper = React.useCallback(() => {
|
|
1574
|
+
dispatch({ type: "select-upper" });
|
|
1575
|
+
}, []);
|
|
1576
|
+
const selectLower = React.useCallback(() => {
|
|
1577
|
+
dispatch({ type: "select-lower" });
|
|
1578
|
+
}, []);
|
|
1579
|
+
const selectRange = React.useCallback((teethIds) => {
|
|
1580
|
+
dispatch({ type: "select-range", teethIds });
|
|
1581
|
+
}, []);
|
|
1582
|
+
const clearAll = React.useCallback(() => {
|
|
1583
|
+
dispatch({ type: "clear-all" });
|
|
1584
|
+
}, []);
|
|
1585
|
+
const isSelected = React.useCallback((toothId) => state.selectedTeeth.includes(toothId), [state.selectedTeeth]);
|
|
1586
|
+
const hasBridge = React.useCallback((fromId, toId) => {
|
|
1587
|
+
const key = (a, b) => `${Math.min(a, b)}-${Math.max(a, b)}`;
|
|
1588
|
+
return state.bridges.some(([a, b]) => key(a, b) === key(fromId, toId));
|
|
1589
|
+
}, [state.bridges]);
|
|
1590
|
+
const getSelectedTeethData = React.useCallback(() => teethData.filter((t) => state.selectedTeeth.includes(t.id)).sort((a, b) => a.order - b.order), [state.selectedTeeth]);
|
|
1591
|
+
const renderProps = {
|
|
1592
|
+
...state,
|
|
1593
|
+
toggleTooth,
|
|
1594
|
+
toggleBridge,
|
|
1595
|
+
selectUpper,
|
|
1596
|
+
selectLower,
|
|
1597
|
+
selectRange,
|
|
1598
|
+
clearAll,
|
|
1599
|
+
isSelected,
|
|
1600
|
+
hasBridge,
|
|
1601
|
+
getSelectedTeethData
|
|
1602
|
+
};
|
|
1603
|
+
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(TeethSelectorContext.Provider, {
|
|
1604
|
+
value: { state, dispatch, dragState, setDragState },
|
|
1605
|
+
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV("div", {
|
|
1606
|
+
ref,
|
|
1607
|
+
children: children(renderProps)
|
|
1608
|
+
}, undefined, false, undefined, this)
|
|
1609
|
+
}, undefined, false, undefined, this);
|
|
1610
|
+
});
|
|
1611
|
+
TeethSelector.displayName = "TeethSelector";
|
|
1612
|
+
var TeethChart = React.forwardRef((props, ref) => {
|
|
1613
|
+
const {
|
|
1614
|
+
width = 300,
|
|
1615
|
+
height = 500,
|
|
1616
|
+
className,
|
|
1617
|
+
renderTooth,
|
|
1618
|
+
renderBridge,
|
|
1619
|
+
enableDragSelection = true
|
|
1620
|
+
} = props;
|
|
1621
|
+
const { state, dispatch, dragState, setDragState } = useTeethSelectorContext();
|
|
1622
|
+
const svgRef = React.useRef(null);
|
|
1623
|
+
const toothRefs = React.useRef(new Map);
|
|
1624
|
+
const holdRef = React.useRef(null);
|
|
1625
|
+
React.useImperativeHandle(ref, () => svgRef.current);
|
|
1626
|
+
React.useEffect(() => {
|
|
1627
|
+
if (!svgRef.current)
|
|
1628
|
+
return;
|
|
1629
|
+
const map = new Map;
|
|
1630
|
+
teethData.forEach(({ id }) => {
|
|
1631
|
+
map.set(id, svgRef.current.querySelector(`#teeth-${id}`));
|
|
1632
|
+
});
|
|
1633
|
+
toothRefs.current = map;
|
|
1634
|
+
}, []);
|
|
1635
|
+
const getBridgePos = React.useCallback((a, b) => {
|
|
1636
|
+
const from = toothRefs.current.get(a);
|
|
1637
|
+
const to = toothRefs.current.get(b);
|
|
1638
|
+
if (!from || !to)
|
|
1639
|
+
return null;
|
|
1640
|
+
const boxA = from.getBBox();
|
|
1641
|
+
const boxB = to.getBBox();
|
|
1642
|
+
const x1 = boxA.x + boxA.width / 2;
|
|
1643
|
+
const y1 = boxA.y + boxA.height / 2;
|
|
1644
|
+
const x2 = boxB.x + boxB.width / 2;
|
|
1645
|
+
const y2 = boxB.y + boxB.height / 2;
|
|
1646
|
+
return { x1, y1, x2, y2, midX: (x1 + x2) / 2, midY: (y1 + y2) / 2 };
|
|
1647
|
+
}, []);
|
|
1648
|
+
const handleClick = React.useCallback((id) => {
|
|
1649
|
+
if (holdRef.current)
|
|
1650
|
+
clearTimeout(holdRef.current);
|
|
1651
|
+
dispatch({ type: "toggle-tooth", toothId: id });
|
|
1652
|
+
}, [dispatch]);
|
|
1653
|
+
const handleDown = React.useCallback((id) => {
|
|
1654
|
+
if (!enableDragSelection)
|
|
1655
|
+
return;
|
|
1656
|
+
holdRef.current = setTimeout(() => {
|
|
1657
|
+
setDragState({
|
|
1658
|
+
start: id,
|
|
1659
|
+
current: id,
|
|
1660
|
+
teethInRange: [id]
|
|
1661
|
+
});
|
|
1662
|
+
}, 100);
|
|
1663
|
+
}, [enableDragSelection, setDragState]);
|
|
1664
|
+
const handleEnter = React.useCallback((id) => {
|
|
1665
|
+
if (dragState.start === null)
|
|
1666
|
+
return;
|
|
1667
|
+
if (holdRef.current)
|
|
1668
|
+
clearTimeout(holdRef.current);
|
|
1669
|
+
const range = getTeethInRange(dragState.start, id);
|
|
1670
|
+
setDragState((prev) => ({
|
|
1671
|
+
...prev,
|
|
1672
|
+
current: id,
|
|
1673
|
+
teethInRange: range
|
|
1674
|
+
}));
|
|
1675
|
+
}, [dragState.start, setDragState]);
|
|
1676
|
+
const handleUp = React.useCallback(() => {
|
|
1677
|
+
if (dragState.start === null)
|
|
1678
|
+
return;
|
|
1679
|
+
if (holdRef.current)
|
|
1680
|
+
clearTimeout(holdRef.current);
|
|
1681
|
+
if (dragState.teethInRange.length > 1) {
|
|
1682
|
+
dispatch({ type: "select-range", teethIds: dragState.teethInRange });
|
|
1683
|
+
}
|
|
1684
|
+
setDragState(initialDragState);
|
|
1685
|
+
}, [dragState, dispatch, setDragState]);
|
|
1686
|
+
const handleTouchMove = React.useCallback((e) => {
|
|
1687
|
+
if (!enableDragSelection)
|
|
1688
|
+
return;
|
|
1689
|
+
const touch = e.touches[0];
|
|
1690
|
+
const element = document.elementFromPoint(touch.clientX, touch.clientY);
|
|
1691
|
+
if (element?.id?.startsWith("teeth-")) {
|
|
1692
|
+
const toothId = parseInt(element.id.replace("teeth-", ""), 10);
|
|
1693
|
+
if (dragState.start === null) {
|
|
1694
|
+
setDragState({
|
|
1695
|
+
start: toothId,
|
|
1696
|
+
current: toothId,
|
|
1697
|
+
teethInRange: [toothId]
|
|
1698
|
+
});
|
|
1699
|
+
}
|
|
1700
|
+
handleEnter(toothId);
|
|
1701
|
+
}
|
|
1702
|
+
}, [enableDragSelection, dragState.start, handleEnter, setDragState]);
|
|
1703
|
+
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV("svg", {
|
|
1704
|
+
ref: svgRef,
|
|
1705
|
+
viewBox: "0 0 450 750",
|
|
1706
|
+
width,
|
|
1707
|
+
height,
|
|
1708
|
+
className,
|
|
1709
|
+
style: { touchAction: "none" },
|
|
1710
|
+
onMouseUp: handleUp,
|
|
1711
|
+
onTouchMove: handleTouchMove,
|
|
1712
|
+
onTouchEnd: handleUp,
|
|
1713
|
+
children: [
|
|
1714
|
+
teethData.map((tooth) => {
|
|
1715
|
+
const isSelected = state.selectedTeeth.includes(tooth.id);
|
|
1716
|
+
const isInDragRange = dragState.teethInRange.includes(tooth.id);
|
|
1717
|
+
const defaultElement = /* @__PURE__ */ jsx_dev_runtime.jsxDEV("path", {
|
|
1718
|
+
id: `teeth-${tooth.id}`,
|
|
1719
|
+
d: tooth.d,
|
|
1720
|
+
"data-selected": isSelected,
|
|
1721
|
+
"data-in-range": isInDragRange,
|
|
1722
|
+
onClick: () => handleClick(tooth.id),
|
|
1723
|
+
onMouseDown: () => handleDown(tooth.id),
|
|
1724
|
+
onMouseEnter: () => handleEnter(tooth.id)
|
|
1725
|
+
}, tooth.id, false, undefined, this);
|
|
1726
|
+
if (renderTooth) {
|
|
1727
|
+
return renderTooth({ tooth, isSelected, isInDragRange }, defaultElement);
|
|
1728
|
+
}
|
|
1729
|
+
return defaultElement;
|
|
1730
|
+
}),
|
|
1731
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV("g", {
|
|
1732
|
+
"data-bridges": true,
|
|
1733
|
+
children: adjacentTeethPairs.map((pair, i) => {
|
|
1734
|
+
const pos = getBridgePos(pair[0], pair[1]);
|
|
1735
|
+
if (!pos)
|
|
1736
|
+
return null;
|
|
1737
|
+
const exists = state.bridges.some(([a, b]) => a === pair[0] && b === pair[1] || a === pair[1] && b === pair[0]);
|
|
1738
|
+
const defaultElement = /* @__PURE__ */ jsx_dev_runtime.jsxDEV("g", {
|
|
1739
|
+
children: [
|
|
1740
|
+
exists && /* @__PURE__ */ jsx_dev_runtime.jsxDEV("line", {
|
|
1741
|
+
x1: pos.x1,
|
|
1742
|
+
y1: pos.y1,
|
|
1743
|
+
x2: pos.x2,
|
|
1744
|
+
y2: pos.y2,
|
|
1745
|
+
"data-bridge-line": true
|
|
1746
|
+
}, undefined, false, undefined, this),
|
|
1747
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV("circle", {
|
|
1748
|
+
cx: pos.midX,
|
|
1749
|
+
cy: pos.midY,
|
|
1750
|
+
r: 8,
|
|
1751
|
+
"data-bridge-button": true,
|
|
1752
|
+
"data-exists": exists,
|
|
1753
|
+
onClick: () => dispatch({
|
|
1754
|
+
type: "toggle-bridge",
|
|
1755
|
+
fromId: pair[0],
|
|
1756
|
+
toId: pair[1]
|
|
1757
|
+
})
|
|
1758
|
+
}, undefined, false, undefined, this)
|
|
1759
|
+
]
|
|
1760
|
+
}, i, true, undefined, this);
|
|
1761
|
+
if (renderBridge) {
|
|
1762
|
+
return renderBridge({ fromId: pair[0], toId: pair[1], exists, position: pos }, defaultElement);
|
|
1763
|
+
}
|
|
1764
|
+
return defaultElement;
|
|
1765
|
+
})
|
|
1766
|
+
}, undefined, false, undefined, this)
|
|
1767
|
+
]
|
|
1768
|
+
}, undefined, true, undefined, this);
|
|
1769
|
+
});
|
|
1770
|
+
TeethChart.displayName = "TeethChart";
|
|
1771
|
+
// components/teeth-preview.tsx
|
|
1772
|
+
var React2 = __toESM(require_react(), 1);
|
|
1773
|
+
var jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
|
|
1774
|
+
"use client";
|
|
1775
|
+
var TeethPreview = React2.forwardRef((props, ref) => {
|
|
1776
|
+
const {
|
|
1777
|
+
teeth,
|
|
1778
|
+
width = 150,
|
|
1779
|
+
height = 250,
|
|
1780
|
+
className,
|
|
1781
|
+
renderTooth,
|
|
1782
|
+
renderBridge
|
|
1783
|
+
} = props;
|
|
1784
|
+
const [refsReady, setRefsReady] = React2.useState(false);
|
|
1785
|
+
const svgRef = React2.useRef(null);
|
|
1786
|
+
const toothRefs = React2.useRef(new Map);
|
|
1787
|
+
const { selectedTeeth, bridges } = React2.useMemo(() => parseTeethSelection(teeth), [teeth]);
|
|
1788
|
+
React2.useImperativeHandle(ref, () => svgRef.current);
|
|
1789
|
+
const getBridgePos = React2.useCallback((a, b) => {
|
|
1790
|
+
const from = toothRefs.current.get(a);
|
|
1791
|
+
const to = toothRefs.current.get(b);
|
|
1792
|
+
if (!from || !to)
|
|
1793
|
+
return null;
|
|
1794
|
+
const boxA = from.getBBox();
|
|
1795
|
+
const boxB = to.getBBox();
|
|
1796
|
+
const x1 = boxA.x + boxA.width / 2;
|
|
1797
|
+
const y1 = boxA.y + boxA.height / 2;
|
|
1798
|
+
const x2 = boxB.x + boxB.width / 2;
|
|
1799
|
+
const y2 = boxB.y + boxB.height / 2;
|
|
1800
|
+
return { x1, y1, x2, y2, midX: (x1 + x2) / 2, midY: (y1 + y2) / 2 };
|
|
1801
|
+
}, []);
|
|
1802
|
+
React2.useLayoutEffect(() => {
|
|
1803
|
+
if (!svgRef.current)
|
|
1804
|
+
return;
|
|
1805
|
+
const map = new Map;
|
|
1806
|
+
teethData.forEach(({ id }) => {
|
|
1807
|
+
map.set(id, svgRef.current.querySelector(`#teeth-preview-${id}`));
|
|
1808
|
+
});
|
|
1809
|
+
toothRefs.current = map;
|
|
1810
|
+
setRefsReady(true);
|
|
1811
|
+
}, []);
|
|
1812
|
+
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV("svg", {
|
|
1813
|
+
ref: svgRef,
|
|
1814
|
+
viewBox: "0 0 450 750",
|
|
1815
|
+
width,
|
|
1816
|
+
height,
|
|
1817
|
+
className,
|
|
1818
|
+
children: [
|
|
1819
|
+
teethData.map((tooth) => {
|
|
1820
|
+
const isSelected = selectedTeeth.includes(tooth.id);
|
|
1821
|
+
const defaultElement = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV("path", {
|
|
1822
|
+
id: `teeth-preview-${tooth.id}`,
|
|
1823
|
+
d: tooth.d,
|
|
1824
|
+
"data-selected": isSelected
|
|
1825
|
+
}, tooth.id, false, undefined, this);
|
|
1826
|
+
if (renderTooth) {
|
|
1827
|
+
return renderTooth({ tooth, isSelected }, defaultElement);
|
|
1828
|
+
}
|
|
1829
|
+
return defaultElement;
|
|
1830
|
+
}),
|
|
1831
|
+
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV("g", {
|
|
1832
|
+
"data-bridges": true,
|
|
1833
|
+
children: refsReady && bridges.map((pair, i) => {
|
|
1834
|
+
const pos = getBridgePos(pair[0], pair[1]);
|
|
1835
|
+
if (!pos)
|
|
1836
|
+
return null;
|
|
1837
|
+
const defaultElement = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV("g", {
|
|
1838
|
+
children: [
|
|
1839
|
+
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV("line", {
|
|
1840
|
+
x1: pos.x1,
|
|
1841
|
+
y1: pos.y1,
|
|
1842
|
+
x2: pos.x2,
|
|
1843
|
+
y2: pos.y2,
|
|
1844
|
+
"data-bridge-line": true
|
|
1845
|
+
}, undefined, false, undefined, this),
|
|
1846
|
+
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV("circle", {
|
|
1847
|
+
cx: pos.midX,
|
|
1848
|
+
cy: pos.midY,
|
|
1849
|
+
r: 8,
|
|
1850
|
+
"data-bridge-marker": true
|
|
1851
|
+
}, undefined, false, undefined, this)
|
|
1852
|
+
]
|
|
1853
|
+
}, i, true, undefined, this);
|
|
1854
|
+
if (renderBridge) {
|
|
1855
|
+
return renderBridge({ fromId: pair[0], toId: pair[1], position: pos }, defaultElement);
|
|
1856
|
+
}
|
|
1857
|
+
return defaultElement;
|
|
1858
|
+
})
|
|
1859
|
+
}, undefined, false, undefined, this)
|
|
1860
|
+
]
|
|
1861
|
+
}, undefined, true, undefined, this);
|
|
1862
|
+
});
|
|
1863
|
+
TeethPreview.displayName = "TeethPreview";
|
|
1864
|
+
export {
|
|
1865
|
+
useTeethSelectorContext,
|
|
1866
|
+
teethData,
|
|
1867
|
+
sameSide,
|
|
1868
|
+
parseTeethSelection,
|
|
1869
|
+
getTeethInRange,
|
|
1870
|
+
formatTeethSelection,
|
|
1871
|
+
adjacentTeethPairs,
|
|
1872
|
+
TeethSelector,
|
|
1873
|
+
TeethPreview,
|
|
1874
|
+
TeethChart
|
|
1875
|
+
};
|