@motionscript/math 0.0.0-stage → 0.1.0-alpha.4
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/CHANGELOG.md +92 -0
- package/LICENSE +201 -0
- package/NOTICE +48 -0
- package/README.md +385 -3
- package/dist/annotate/angle-mark.d.ts +46 -0
- package/dist/annotate/angle-mark.d.ts.map +1 -0
- package/dist/annotate/angle-mark.js +132 -0
- package/dist/annotate/angle-mark.js.map +1 -0
- package/dist/annotate/curly-brace.d.ts +46 -0
- package/dist/annotate/curly-brace.d.ts.map +1 -0
- package/dist/annotate/curly-brace.js +114 -0
- package/dist/annotate/curly-brace.js.map +1 -0
- package/dist/annotate/emphasis-mark.d.ts +20 -0
- package/dist/annotate/emphasis-mark.d.ts.map +1 -0
- package/dist/annotate/emphasis-mark.js +81 -0
- package/dist/annotate/emphasis-mark.js.map +1 -0
- package/dist/browser/THIRD_PARTY_LICENSES.txt +420 -0
- package/dist/browser/chunks/chunk-3GJB6AVO.js +2 -0
- package/dist/browser/chunks/chunk-3GJB6AVO.js.map +7 -0
- package/dist/browser/chunks/chunk-D5WHCVBC.js +2 -0
- package/dist/browser/chunks/chunk-D5WHCVBC.js.map +7 -0
- package/dist/browser/chunks/chunk-WL4KEX7Y.js +2 -0
- package/dist/browser/chunks/chunk-WL4KEX7Y.js.map +7 -0
- package/dist/browser/chunks/mathjax-DNP3YRES.js +61 -0
- package/dist/browser/chunks/mathjax-DNP3YRES.js.map +7 -0
- package/dist/browser/index.js +2 -0
- package/dist/browser/index.js.map +7 -0
- package/dist/browser/kit.js +2 -0
- package/dist/browser/kit.js.map +7 -0
- package/dist/browser/manifest.json +30 -0
- package/dist/browser/tex.js +2 -0
- package/dist/browser/tex.js.map +7 -0
- package/dist/engine.d.ts +64 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +42 -0
- package/dist/engine.js.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -0
- package/dist/kit/brace.d.ts +8 -0
- package/dist/kit/brace.d.ts.map +1 -0
- package/dist/kit/brace.js +36 -0
- package/dist/kit/brace.js.map +1 -0
- package/dist/kit/cache.d.ts +30 -0
- package/dist/kit/cache.d.ts.map +1 -0
- package/dist/kit/cache.js +53 -0
- package/dist/kit/cache.js.map +1 -0
- package/dist/kit/contour.d.ts +8 -0
- package/dist/kit/contour.d.ts.map +1 -0
- package/dist/kit/contour.js +93 -0
- package/dist/kit/contour.js.map +1 -0
- package/dist/kit/coords.d.ts +69 -0
- package/dist/kit/coords.d.ts.map +1 -0
- package/dist/kit/coords.js +224 -0
- package/dist/kit/coords.js.map +1 -0
- package/dist/kit/curve.d.ts +17 -0
- package/dist/kit/curve.d.ts.map +1 -0
- package/dist/kit/curve.js +22 -0
- package/dist/kit/curve.js.map +1 -0
- package/dist/kit/equation.d.ts +61 -0
- package/dist/kit/equation.d.ts.map +1 -0
- package/dist/kit/equation.js +168 -0
- package/dist/kit/equation.js.map +1 -0
- package/dist/kit/equation3d.d.ts +50 -0
- package/dist/kit/equation3d.d.ts.map +1 -0
- package/dist/kit/equation3d.js +103 -0
- package/dist/kit/equation3d.js.map +1 -0
- package/dist/kit/expression.d.ts +35 -0
- package/dist/kit/expression.d.ts.map +1 -0
- package/dist/kit/expression.js +124 -0
- package/dist/kit/expression.js.map +1 -0
- package/dist/kit/field-mark.d.ts +58 -0
- package/dist/kit/field-mark.d.ts.map +1 -0
- package/dist/kit/field-mark.js +129 -0
- package/dist/kit/field-mark.js.map +1 -0
- package/dist/kit/field.d.ts +14 -0
- package/dist/kit/field.d.ts.map +1 -0
- package/dist/kit/field.js +46 -0
- package/dist/kit/field.js.map +1 -0
- package/dist/kit/follow.d.ts +71 -0
- package/dist/kit/follow.d.ts.map +1 -0
- package/dist/kit/follow.js +159 -0
- package/dist/kit/follow.js.map +1 -0
- package/dist/kit/furniture.d.ts +30 -0
- package/dist/kit/furniture.d.ts.map +1 -0
- package/dist/kit/furniture.js +87 -0
- package/dist/kit/furniture.js.map +1 -0
- package/dist/kit/geometry.d.ts +13 -0
- package/dist/kit/geometry.d.ts.map +1 -0
- package/dist/kit/geometry.js +54 -0
- package/dist/kit/geometry.js.map +1 -0
- package/dist/kit/mark.d.ts +47 -0
- package/dist/kit/mark.d.ts.map +1 -0
- package/dist/kit/mark.js +103 -0
- package/dist/kit/mark.js.map +1 -0
- package/dist/kit/part-fills.d.ts +23 -0
- package/dist/kit/part-fills.d.ts.map +1 -0
- package/dist/kit/part-fills.js +46 -0
- package/dist/kit/part-fills.js.map +1 -0
- package/dist/kit/place.d.ts +18 -0
- package/dist/kit/place.d.ts.map +1 -0
- package/dist/kit/place.js +68 -0
- package/dist/kit/place.js.map +1 -0
- package/dist/kit/placement.d.ts +8 -0
- package/dist/kit/placement.d.ts.map +1 -0
- package/dist/kit/placement.js +8 -0
- package/dist/kit/placement.js.map +1 -0
- package/dist/kit/sampler.d.ts +17 -0
- package/dist/kit/sampler.d.ts.map +1 -0
- package/dist/kit/sampler.js +250 -0
- package/dist/kit/sampler.js.map +1 -0
- package/dist/kit/scale.d.ts +12 -0
- package/dist/kit/scale.d.ts.map +1 -0
- package/dist/kit/scale.js +37 -0
- package/dist/kit/scale.js.map +1 -0
- package/dist/kit/source.d.ts +22 -0
- package/dist/kit/source.d.ts.map +1 -0
- package/dist/kit/source.js +45 -0
- package/dist/kit/source.js.map +1 -0
- package/dist/kit/system.d.ts +33 -0
- package/dist/kit/system.d.ts.map +1 -0
- package/dist/kit/system.js +67 -0
- package/dist/kit/system.js.map +1 -0
- package/dist/kit/ticks.d.ts +19 -0
- package/dist/kit/ticks.d.ts.map +1 -0
- package/dist/kit/ticks.js +78 -0
- package/dist/kit/ticks.js.map +1 -0
- package/dist/kit/withdrawn.d.ts +9 -0
- package/dist/kit/withdrawn.d.ts.map +1 -0
- package/dist/kit/withdrawn.js +9 -0
- package/dist/kit/withdrawn.js.map +1 -0
- package/dist/marks/curve-area.d.ts +32 -0
- package/dist/marks/curve-area.d.ts.map +1 -0
- package/dist/marks/curve-area.js +82 -0
- package/dist/marks/curve-area.js.map +1 -0
- package/dist/marks/drop-lines.d.ts +22 -0
- package/dist/marks/drop-lines.d.ts.map +1 -0
- package/dist/marks/drop-lines.js +58 -0
- package/dist/marks/drop-lines.js.map +1 -0
- package/dist/marks/plot-point.d.ts +35 -0
- package/dist/marks/plot-point.d.ts.map +1 -0
- package/dist/marks/plot-point.js +97 -0
- package/dist/marks/plot-point.js.map +1 -0
- package/dist/marks/riemann-sum.d.ts +37 -0
- package/dist/marks/riemann-sum.d.ts.map +1 -0
- package/dist/marks/riemann-sum.js +91 -0
- package/dist/marks/riemann-sum.js.map +1 -0
- package/dist/marks/tangent-line.d.ts +27 -0
- package/dist/marks/tangent-line.d.ts.map +1 -0
- package/dist/marks/tangent-line.js +103 -0
- package/dist/marks/tangent-line.js.map +1 -0
- package/dist/marks/vector-arrow.d.ts +32 -0
- package/dist/marks/vector-arrow.d.ts.map +1 -0
- package/dist/marks/vector-arrow.js +87 -0
- package/dist/marks/vector-arrow.js.map +1 -0
- package/dist/nodes.d.ts +35 -0
- package/dist/nodes.d.ts.map +1 -0
- package/dist/nodes.js +63 -0
- package/dist/nodes.js.map +1 -0
- package/dist/plots/function-plot.d.ts +67 -0
- package/dist/plots/function-plot.d.ts.map +1 -0
- package/dist/plots/function-plot.js +215 -0
- package/dist/plots/function-plot.js.map +1 -0
- package/dist/plots/points-plot.d.ts +28 -0
- package/dist/plots/points-plot.d.ts.map +1 -0
- package/dist/plots/points-plot.js +99 -0
- package/dist/plots/points-plot.js.map +1 -0
- package/dist/plots/stream-lines.d.ts +35 -0
- package/dist/plots/stream-lines.d.ts.map +1 -0
- package/dist/plots/stream-lines.js +141 -0
- package/dist/plots/stream-lines.js.map +1 -0
- package/dist/plots/traced-path.d.ts +31 -0
- package/dist/plots/traced-path.d.ts.map +1 -0
- package/dist/plots/traced-path.js +56 -0
- package/dist/plots/traced-path.js.map +1 -0
- package/dist/plots/vector-field.d.ts +23 -0
- package/dist/plots/vector-field.d.ts.map +1 -0
- package/dist/plots/vector-field.js +91 -0
- package/dist/plots/vector-field.js.map +1 -0
- package/dist/structures/graph-layout.d.ts +11 -0
- package/dist/structures/graph-layout.d.ts.map +1 -0
- package/dist/structures/graph-layout.js +135 -0
- package/dist/structures/graph-layout.js.map +1 -0
- package/dist/structures/network-graph.d.ts +83 -0
- package/dist/structures/network-graph.d.ts.map +1 -0
- package/dist/structures/network-graph.js +289 -0
- package/dist/structures/network-graph.js.map +1 -0
- package/dist/structures/sample-space.d.ts +62 -0
- package/dist/structures/sample-space.d.ts.map +1 -0
- package/dist/structures/sample-space.js +199 -0
- package/dist/structures/sample-space.js.map +1 -0
- package/dist/systems/axes2d.d.ts +75 -0
- package/dist/systems/axes2d.d.ts.map +1 -0
- package/dist/systems/axes2d.js +193 -0
- package/dist/systems/axes2d.js.map +1 -0
- package/dist/systems/number-line.d.ts +49 -0
- package/dist/systems/number-line.d.ts.map +1 -0
- package/dist/systems/number-line.js +127 -0
- package/dist/systems/number-line.js.map +1 -0
- package/dist/systems/number-plane.d.ts +59 -0
- package/dist/systems/number-plane.d.ts.map +1 -0
- package/dist/systems/number-plane.js +193 -0
- package/dist/systems/number-plane.js.map +1 -0
- package/dist/systems/polar-plane.d.ts +48 -0
- package/dist/systems/polar-plane.d.ts.map +1 -0
- package/dist/systems/polar-plane.js +165 -0
- package/dist/systems/polar-plane.js.map +1 -0
- package/dist/tex/geometry.d.ts +85 -0
- package/dist/tex/geometry.d.ts.map +1 -0
- package/dist/tex/geometry.js +632 -0
- package/dist/tex/geometry.js.map +1 -0
- package/dist/tex/index.d.ts +11 -0
- package/dist/tex/index.d.ts.map +1 -0
- package/dist/tex/index.js +9 -0
- package/dist/tex/index.js.map +1 -0
- package/dist/tex/mathjax.d.ts +33 -0
- package/dist/tex/mathjax.d.ts.map +1 -0
- package/dist/tex/mathjax.js +74 -0
- package/dist/tex/mathjax.js.map +1 -0
- package/dist/tex/matrix.d.ts +31 -0
- package/dist/tex/matrix.d.ts.map +1 -0
- package/dist/tex/matrix.js +73 -0
- package/dist/tex/matrix.js.map +1 -0
- package/dist/tex/node.d.ts +215 -0
- package/dist/tex/node.d.ts.map +1 -0
- package/dist/tex/node.js +595 -0
- package/dist/tex/node.js.map +1 -0
- package/dist/tex/tween.d.ts +50 -0
- package/dist/tex/tween.d.ts.map +1 -0
- package/dist/tex/tween.js +253 -0
- package/dist/tex/tween.js.map +1 -0
- package/dist/three/axes3d.d.ts +87 -0
- package/dist/three/axes3d.d.ts.map +1 -0
- package/dist/three/axes3d.js +228 -0
- package/dist/three/axes3d.js.map +1 -0
- package/dist/three/curve-plot3d.d.ts +60 -0
- package/dist/three/curve-plot3d.d.ts.map +1 -0
- package/dist/three/curve-plot3d.js +143 -0
- package/dist/three/curve-plot3d.js.map +1 -0
- package/dist/three/label3d.d.ts +11 -0
- package/dist/three/label3d.d.ts.map +1 -0
- package/dist/three/label3d.js +40 -0
- package/dist/three/label3d.js.map +1 -0
- package/dist/three/plot-point3d.d.ts +26 -0
- package/dist/three/plot-point3d.d.ts.map +1 -0
- package/dist/three/plot-point3d.js +60 -0
- package/dist/three/plot-point3d.js.map +1 -0
- package/dist/three/space.d.ts +28 -0
- package/dist/three/space.d.ts.map +1 -0
- package/dist/three/space.js +47 -0
- package/dist/three/space.js.map +1 -0
- package/dist/three/surface-plot3d.d.ts +80 -0
- package/dist/three/surface-plot3d.d.ts.map +1 -0
- package/dist/three/surface-plot3d.js +290 -0
- package/dist/three/surface-plot3d.js.map +1 -0
- package/dist/three/vector-arrow3d.d.ts +25 -0
- package/dist/three/vector-arrow3d.d.ts.map +1 -0
- package/dist/three/vector-arrow3d.js +72 -0
- package/dist/three/vector-arrow3d.js.map +1 -0
- package/package.json +79 -3
- package/registry.json +251 -0
- package/src/annotate/angle-mark.ts +147 -0
- package/src/annotate/curly-brace.ts +126 -0
- package/src/annotate/emphasis-mark.ts +89 -0
- package/src/engine.ts +72 -0
- package/src/index.ts +29 -0
- package/src/kit/brace.ts +37 -0
- package/src/kit/cache.ts +61 -0
- package/src/kit/contour.ts +94 -0
- package/src/kit/coords.ts +278 -0
- package/src/kit/curve.ts +29 -0
- package/src/kit/equation.ts +181 -0
- package/src/kit/equation3d.ts +137 -0
- package/src/kit/expression.ts +159 -0
- package/src/kit/field-mark.ts +155 -0
- package/src/kit/field.ts +50 -0
- package/src/kit/follow.ts +203 -0
- package/src/kit/furniture.ts +108 -0
- package/src/kit/geometry.ts +49 -0
- package/src/kit/mark.ts +131 -0
- package/src/kit/part-fills.ts +61 -0
- package/src/kit/place.ts +101 -0
- package/src/kit/placement.ts +8 -0
- package/src/kit/sampler.ts +281 -0
- package/src/kit/scale.ts +39 -0
- package/src/kit/source.ts +57 -0
- package/src/kit/system.ts +99 -0
- package/src/kit/ticks.ts +85 -0
- package/src/kit/withdrawn.ts +8 -0
- package/src/marks/curve-area.ts +89 -0
- package/src/marks/drop-lines.ts +63 -0
- package/src/marks/plot-point.ts +107 -0
- package/src/marks/riemann-sum.ts +98 -0
- package/src/marks/tangent-line.ts +103 -0
- package/src/marks/vector-arrow.ts +98 -0
- package/src/nodes.ts +63 -0
- package/src/plots/function-plot.ts +236 -0
- package/src/plots/points-plot.ts +107 -0
- package/src/plots/stream-lines.ts +151 -0
- package/src/plots/traced-path.ts +52 -0
- package/src/plots/vector-field.ts +88 -0
- package/src/structures/graph-layout.ts +145 -0
- package/src/structures/network-graph.ts +308 -0
- package/src/structures/sample-space.ts +209 -0
- package/src/systems/axes2d.ts +217 -0
- package/src/systems/number-line.ts +131 -0
- package/src/systems/number-plane.ts +203 -0
- package/src/systems/polar-plane.ts +176 -0
- package/src/tex/geometry.ts +703 -0
- package/src/tex/index.ts +14 -0
- package/src/tex/mathjax.ts +82 -0
- package/src/tex/matrix.ts +75 -0
- package/src/tex/node.ts +641 -0
- package/src/tex/tween.ts +308 -0
- package/src/three/axes3d.ts +240 -0
- package/src/three/curve-plot3d.ts +147 -0
- package/src/three/label3d.ts +50 -0
- package/src/three/plot-point3d.ts +66 -0
- package/src/three/space.ts +67 -0
- package/src/three/surface-plot3d.ts +323 -0
- package/src/three/vector-arrow3d.ts +77 -0
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
Third-party software bundled into @motionscript/math's browser build (dist/browser/).
|
|
2
|
+
|
|
3
|
+
@mathjax/mathjax-newcm-font 4.1.2
|
|
4
|
+
License: Apache-2.0
|
|
5
|
+
|
|
6
|
+
Apache-2.0 (no licence file in the package)
|
|
7
|
+
|
|
8
|
+
------------------------------------------------------------------------------
|
|
9
|
+
|
|
10
|
+
@mathjax/src 4.1.2
|
|
11
|
+
License: Apache-2.0
|
|
12
|
+
|
|
13
|
+
Apache License
|
|
14
|
+
Version 2.0, January 2004
|
|
15
|
+
http://www.apache.org/licenses/
|
|
16
|
+
|
|
17
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
18
|
+
|
|
19
|
+
1. Definitions.
|
|
20
|
+
|
|
21
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
22
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
23
|
+
|
|
24
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
25
|
+
the copyright owner that is granting the License.
|
|
26
|
+
|
|
27
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
28
|
+
other entities that control, are controlled by, or are under common
|
|
29
|
+
control with that entity. For the purposes of this definition,
|
|
30
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
31
|
+
direction or management of such entity, whether by contract or
|
|
32
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
33
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
34
|
+
|
|
35
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
36
|
+
exercising permissions granted by this License.
|
|
37
|
+
|
|
38
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
39
|
+
including but not limited to software source code, documentation
|
|
40
|
+
source, and configuration files.
|
|
41
|
+
|
|
42
|
+
"Object" form shall mean any form resulting from mechanical
|
|
43
|
+
transformation or translation of a Source form, including but
|
|
44
|
+
not limited to compiled object code, generated documentation,
|
|
45
|
+
and conversions to other media types.
|
|
46
|
+
|
|
47
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
48
|
+
Object form, made available under the License, as indicated by a
|
|
49
|
+
copyright notice that is included in or attached to the work
|
|
50
|
+
(an example is provided in the Appendix below).
|
|
51
|
+
|
|
52
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
53
|
+
form, that is based on (or derived from) the Work and for which the
|
|
54
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
55
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
56
|
+
of this License, Derivative Works shall not include works that remain
|
|
57
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
58
|
+
the Work and Derivative Works thereof.
|
|
59
|
+
|
|
60
|
+
"Contribution" shall mean any work of authorship, including
|
|
61
|
+
the original version of the Work and any modifications or additions
|
|
62
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
63
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
64
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
65
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
66
|
+
means any form of electronic, verbal, or written communication sent
|
|
67
|
+
to the Licensor or its representatives, including but not limited to
|
|
68
|
+
communication on electronic mailing lists, source code control systems,
|
|
69
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
70
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
71
|
+
excluding communication that is conspicuously marked or otherwise
|
|
72
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
73
|
+
|
|
74
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
75
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
76
|
+
subsequently incorporated within the Work.
|
|
77
|
+
|
|
78
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
79
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
80
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
81
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
82
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
83
|
+
Work and such Derivative Works in Source or Object form.
|
|
84
|
+
|
|
85
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
86
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
87
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
88
|
+
(except as stated in this section) patent license to make, have made,
|
|
89
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
90
|
+
where such license applies only to those patent claims licensable
|
|
91
|
+
by such Contributor that are necessarily infringed by their
|
|
92
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
93
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
94
|
+
institute patent litigation against any entity (including a
|
|
95
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
96
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
97
|
+
or contributory patent infringement, then any patent licenses
|
|
98
|
+
granted to You under this License for that Work shall terminate
|
|
99
|
+
as of the date such litigation is filed.
|
|
100
|
+
|
|
101
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
102
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
103
|
+
modifications, and in Source or Object form, provided that You
|
|
104
|
+
meet the following conditions:
|
|
105
|
+
|
|
106
|
+
(a) You must give any other recipients of the Work or
|
|
107
|
+
Derivative Works a copy of this License; and
|
|
108
|
+
|
|
109
|
+
(b) You must cause any modified files to carry prominent notices
|
|
110
|
+
stating that You changed the files; and
|
|
111
|
+
|
|
112
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
113
|
+
that You distribute, all copyright, patent, trademark, and
|
|
114
|
+
attribution notices from the Source form of the Work,
|
|
115
|
+
excluding those notices that do not pertain to any part of
|
|
116
|
+
the Derivative Works; and
|
|
117
|
+
|
|
118
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
119
|
+
distribution, then any Derivative Works that You distribute must
|
|
120
|
+
include a readable copy of the attribution notices contained
|
|
121
|
+
within such NOTICE file, excluding those notices that do not
|
|
122
|
+
pertain to any part of the Derivative Works, in at least one
|
|
123
|
+
of the following places: within a NOTICE text file distributed
|
|
124
|
+
as part of the Derivative Works; within the Source form or
|
|
125
|
+
documentation, if provided along with the Derivative Works; or,
|
|
126
|
+
within a display generated by the Derivative Works, if and
|
|
127
|
+
wherever such third-party notices normally appear. The contents
|
|
128
|
+
of the NOTICE file are for informational purposes only and
|
|
129
|
+
do not modify the License. You may add Your own attribution
|
|
130
|
+
notices within Derivative Works that You distribute, alongside
|
|
131
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
132
|
+
that such additional attribution notices cannot be construed
|
|
133
|
+
as modifying the License.
|
|
134
|
+
|
|
135
|
+
You may add Your own copyright statement to Your modifications and
|
|
136
|
+
may provide additional or different license terms and conditions
|
|
137
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
138
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
139
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
140
|
+
the conditions stated in this License.
|
|
141
|
+
|
|
142
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
143
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
144
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
145
|
+
this License, without any additional terms or conditions.
|
|
146
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
147
|
+
the terms of any separate license agreement you may have executed
|
|
148
|
+
with Licensor regarding such Contributions.
|
|
149
|
+
|
|
150
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
151
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
152
|
+
except as required for reasonable and customary use in describing the
|
|
153
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
154
|
+
|
|
155
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
156
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
157
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
158
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
159
|
+
implied, including, without limitation, any warranties or conditions
|
|
160
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
161
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
162
|
+
appropriateness of using or redistributing the Work and assume any
|
|
163
|
+
risks associated with Your exercise of permissions under this License.
|
|
164
|
+
|
|
165
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
166
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
167
|
+
unless required by applicable law (such as deliberate and grossly
|
|
168
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
169
|
+
liable to You for damages, including any direct, indirect, special,
|
|
170
|
+
incidental, or consequential damages of any character arising as a
|
|
171
|
+
result of this License or out of the use or inability to use the
|
|
172
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
173
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
174
|
+
other commercial damages or losses), even if such Contributor
|
|
175
|
+
has been advised of the possibility of such damages.
|
|
176
|
+
|
|
177
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
178
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
179
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
180
|
+
or other liability obligations and/or rights consistent with this
|
|
181
|
+
License. However, in accepting such obligations, You may act only
|
|
182
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
183
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
184
|
+
defend, and hold each Contributor harmless for any liability
|
|
185
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
186
|
+
of your accepting any such warranty or additional liability.
|
|
187
|
+
|
|
188
|
+
END OF TERMS AND CONDITIONS
|
|
189
|
+
|
|
190
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
191
|
+
|
|
192
|
+
To apply the Apache License to your work, attach the following
|
|
193
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
194
|
+
replaced with your own identifying information. (Don't include
|
|
195
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
196
|
+
comment syntax for the file format. We also recommend that a
|
|
197
|
+
file or class name and description of purpose be included on the
|
|
198
|
+
same "printed page" as the copyright notice for easier
|
|
199
|
+
identification within third-party archives.
|
|
200
|
+
|
|
201
|
+
Copyright [yyyy] [name of copyright owner]
|
|
202
|
+
|
|
203
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
204
|
+
you may not use this file except in compliance with the License.
|
|
205
|
+
You may obtain a copy of the License at
|
|
206
|
+
|
|
207
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
208
|
+
|
|
209
|
+
Unless required by applicable law or agreed to in writing, software
|
|
210
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
211
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
212
|
+
See the License for the specific language governing permissions and
|
|
213
|
+
limitations under the License.
|
|
214
|
+
|
|
215
|
+
------------------------------------------------------------------------------
|
|
216
|
+
|
|
217
|
+
mhchemparser 4.2.1
|
|
218
|
+
License: Apache-2.0
|
|
219
|
+
|
|
220
|
+
Apache License
|
|
221
|
+
Version 2.0, January 2004
|
|
222
|
+
http://www.apache.org/licenses/
|
|
223
|
+
|
|
224
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
225
|
+
|
|
226
|
+
1. Definitions.
|
|
227
|
+
|
|
228
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
229
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
230
|
+
|
|
231
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
232
|
+
the copyright owner that is granting the License.
|
|
233
|
+
|
|
234
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
235
|
+
other entities that control, are controlled by, or are under common
|
|
236
|
+
control with that entity. For the purposes of this definition,
|
|
237
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
238
|
+
direction or management of such entity, whether by contract or
|
|
239
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
240
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
241
|
+
|
|
242
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
243
|
+
exercising permissions granted by this License.
|
|
244
|
+
|
|
245
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
246
|
+
including but not limited to software source code, documentation
|
|
247
|
+
source, and configuration files.
|
|
248
|
+
|
|
249
|
+
"Object" form shall mean any form resulting from mechanical
|
|
250
|
+
transformation or translation of a Source form, including but
|
|
251
|
+
not limited to compiled object code, generated documentation,
|
|
252
|
+
and conversions to other media types.
|
|
253
|
+
|
|
254
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
255
|
+
Object form, made available under the License, as indicated by a
|
|
256
|
+
copyright notice that is included in or attached to the work
|
|
257
|
+
(an example is provided in the Appendix below).
|
|
258
|
+
|
|
259
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
260
|
+
form, that is based on (or derived from) the Work and for which the
|
|
261
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
262
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
263
|
+
of this License, Derivative Works shall not include works that remain
|
|
264
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
265
|
+
the Work and Derivative Works thereof.
|
|
266
|
+
|
|
267
|
+
"Contribution" shall mean any work of authorship, including
|
|
268
|
+
the original version of the Work and any modifications or additions
|
|
269
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
270
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
271
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
272
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
273
|
+
means any form of electronic, verbal, or written communication sent
|
|
274
|
+
to the Licensor or its representatives, including but not limited to
|
|
275
|
+
communication on electronic mailing lists, source code control systems,
|
|
276
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
277
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
278
|
+
excluding communication that is conspicuously marked or otherwise
|
|
279
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
280
|
+
|
|
281
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
282
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
283
|
+
subsequently incorporated within the Work.
|
|
284
|
+
|
|
285
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
286
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
287
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
288
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
289
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
290
|
+
Work and such Derivative Works in Source or Object form.
|
|
291
|
+
|
|
292
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
293
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
294
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
295
|
+
(except as stated in this section) patent license to make, have made,
|
|
296
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
297
|
+
where such license applies only to those patent claims licensable
|
|
298
|
+
by such Contributor that are necessarily infringed by their
|
|
299
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
300
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
301
|
+
institute patent litigation against any entity (including a
|
|
302
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
303
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
304
|
+
or contributory patent infringement, then any patent licenses
|
|
305
|
+
granted to You under this License for that Work shall terminate
|
|
306
|
+
as of the date such litigation is filed.
|
|
307
|
+
|
|
308
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
309
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
310
|
+
modifications, and in Source or Object form, provided that You
|
|
311
|
+
meet the following conditions:
|
|
312
|
+
|
|
313
|
+
(a) You must give any other recipients of the Work or
|
|
314
|
+
Derivative Works a copy of this License; and
|
|
315
|
+
|
|
316
|
+
(b) You must cause any modified files to carry prominent notices
|
|
317
|
+
stating that You changed the files; and
|
|
318
|
+
|
|
319
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
320
|
+
that You distribute, all copyright, patent, trademark, and
|
|
321
|
+
attribution notices from the Source form of the Work,
|
|
322
|
+
excluding those notices that do not pertain to any part of
|
|
323
|
+
the Derivative Works; and
|
|
324
|
+
|
|
325
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
326
|
+
distribution, then any Derivative Works that You distribute must
|
|
327
|
+
include a readable copy of the attribution notices contained
|
|
328
|
+
within such NOTICE file, excluding those notices that do not
|
|
329
|
+
pertain to any part of the Derivative Works, in at least one
|
|
330
|
+
of the following places: within a NOTICE text file distributed
|
|
331
|
+
as part of the Derivative Works; within the Source form or
|
|
332
|
+
documentation, if provided along with the Derivative Works; or,
|
|
333
|
+
within a display generated by the Derivative Works, if and
|
|
334
|
+
wherever such third-party notices normally appear. The contents
|
|
335
|
+
of the NOTICE file are for informational purposes only and
|
|
336
|
+
do not modify the License. You may add Your own attribution
|
|
337
|
+
notices within Derivative Works that You distribute, alongside
|
|
338
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
339
|
+
that such additional attribution notices cannot be construed
|
|
340
|
+
as modifying the License.
|
|
341
|
+
|
|
342
|
+
You may add Your own copyright statement to Your modifications and
|
|
343
|
+
may provide additional or different license terms and conditions
|
|
344
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
345
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
346
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
347
|
+
the conditions stated in this License.
|
|
348
|
+
|
|
349
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
350
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
351
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
352
|
+
this License, without any additional terms or conditions.
|
|
353
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
354
|
+
the terms of any separate license agreement you may have executed
|
|
355
|
+
with Licensor regarding such Contributions.
|
|
356
|
+
|
|
357
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
358
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
359
|
+
except as required for reasonable and customary use in describing the
|
|
360
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
361
|
+
|
|
362
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
363
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
364
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
365
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
366
|
+
implied, including, without limitation, any warranties or conditions
|
|
367
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
368
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
369
|
+
appropriateness of using or redistributing the Work and assume any
|
|
370
|
+
risks associated with Your exercise of permissions under this License.
|
|
371
|
+
|
|
372
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
373
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
374
|
+
unless required by applicable law (such as deliberate and grossly
|
|
375
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
376
|
+
liable to You for damages, including any direct, indirect, special,
|
|
377
|
+
incidental, or consequential damages of any character arising as a
|
|
378
|
+
result of this License or out of the use or inability to use the
|
|
379
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
380
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
381
|
+
other commercial damages or losses), even if such Contributor
|
|
382
|
+
has been advised of the possibility of such damages.
|
|
383
|
+
|
|
384
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
385
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
386
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
387
|
+
or other liability obligations and/or rights consistent with this
|
|
388
|
+
License. However, in accepting such obligations, You may act only
|
|
389
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
390
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
391
|
+
defend, and hold each Contributor harmless for any liability
|
|
392
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
393
|
+
of your accepting any such warranty or additional liability.
|
|
394
|
+
|
|
395
|
+
END OF TERMS AND CONDITIONS
|
|
396
|
+
|
|
397
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
398
|
+
|
|
399
|
+
To apply the Apache License to your work, attach the following
|
|
400
|
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
401
|
+
replaced with your own identifying information. (Don't include
|
|
402
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
403
|
+
comment syntax for the file format. We also recommend that a
|
|
404
|
+
file or class name and description of purpose be included on the
|
|
405
|
+
same "printed page" as the copyright notice for easier
|
|
406
|
+
identification within third-party archives.
|
|
407
|
+
|
|
408
|
+
Copyright {yyyy} {name of copyright owner}
|
|
409
|
+
|
|
410
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
411
|
+
you may not use this file except in compliance with the License.
|
|
412
|
+
You may obtain a copy of the License at
|
|
413
|
+
|
|
414
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
415
|
+
|
|
416
|
+
Unless required by applicable law or agreed to in writing, software
|
|
417
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
418
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
419
|
+
See the License for the specific language governing permissions and
|
|
420
|
+
limitations under the License.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as P,b as It,c as Tt,f as bt,h as Nt,p as X,r as Lt}from"./chunk-WL4KEX7Y.js";import{Clip as Jn,flowOps as Kn,Graphics2D as Zn,insetsOps as fn,PaintNode as te}from"@motionscript/sdk";import{flowOps as Gn}from"@motionscript/sdk";function Hn(e){return typeof e.anchorAt=="function"}function Vn(e){return typeof e._resolve=="function"}function V(e,t,n,r,o){let i=new WeakMap,s=[];for(let u of e){if(!Vn(u)){s.push(u);continue}let c=u._resolve(t),f=c?(c.minX+c.maxX)/2:n.x,l=c?(c.minY+c.maxY)/2:n.y;u.layout({x:f-n.x,y:n.y-l,width:c?c.maxX-c.minX:0,height:c?c.maxY-c.minY:0},o),i.set(u,Qn(t,f,l))}if(s.length===0)return i;let a=Gn.measure({},s,r,o).sizes;return s.forEach((u,c)=>{u.layout({x:-n.x,y:n.y,width:a[c].width,height:a[c].height},o),i.set(u,Wn(t,u))}),i}function W(e,t){return{toOffset:(n,r)=>{let o=e.toPoint(n,r);return{x:o.x-t.x,y:o.y-t.y}},toCoords:(n,r)=>e.toCoords(n+t.x,r+t.y)}}function Wn(e,t){let n={x:0,y:0},r=Hn(t)?t:null;return{toOffset:(o,i)=>{let s=r?.anchorAt(o,i);return s?e.toPoint(s.x,s.y,n):e.toPoint(o,i,n)},toCoords:(o,i)=>e.toCoords(o,i)}}function Qn(e,t,n){let r={x:0,y:0};return{toOffset:()=>r,toCoords:(o,i)=>e.toCoords(t+o,n+i)}}var ne={width:0,height:0},ln={x:0,y:0},Q=class extends te{get coordinates(){return this._map??(this._map=this.mapFor(this._area(this.layoutBounds)))}measure(t){return Kn.size(this,t,this.effectivePadding(),ne)}layoutChildren(t,n){let r=this.mapFor(this._area(t));this._map=r;let o=fn.insetBounds(t.width,t.height,this.effectivePadding());this._planes=V(this.flowChildren(),r,ln,o,n)}_planeOf(t){return t?this._planes.get(t)??null:W(this.coordinates,ln)}shapeGraphics(){let t=this.layoutBounds;return new Zn().rect({x:0,y:0,width:t.width,height:t.height})}renderSelf(t){super.renderSelf(t);let n=this.coordinates,r=n.spills?this.clipSelf():null;r&&t.beginClip(r);for(let o of this.furniture(n))t.draw(o);r&&t.endClip()}renderStroke(){}clipSelf(){let{minX:t,minY:n,maxX:r,maxY:o}=this.coordinates.area;return new Jn().rect({x:(t+r)/2,y:(n+o)/2,width:r-t,height:o-n})}_map=null;_planes=new WeakMap;_area(t){let n=fn.insetBounds(t.width,t.height,this.effectivePadding());return{minX:n.x-n.width/2,maxX:n.x+n.width/2,minY:-n.y-n.height/2,maxY:-n.y+n.height/2}}};import{colorProperty as _e,command as we,Graphics2D as wn,node as Ee,property as O,strokeProperty as Se}from"@motionscript/sdk";function ut(e,t="linear"){let[n,r]=e??[0,1];return(!Number.isFinite(n)||!Number.isFinite(r))&&([n,r]=[0,1]),n>r&&([n,r]=[r,n]),t==="log"&&(r>0||(r=10),n>0||(n=r/1e3)),r>n?[n,r]:[n,n+1]}function Ct(e,t,n,r="linear"){let[o,i]=e;if(r==="log"){let a=Math.log10(o),u=(n-t)/(Math.log10(i)-a);return{to:c=>t+(Math.log10(c)-a)*u,from:c=>10**(a+(c-t)/u)}}let s=(n-t)/(i-o);return{to:a=>t+(a-o)*s,from:a=>o+(a-t)/s}}function Ft({xRange:e,yRange:t,area:n,xScaling:r="linear",yScaling:o="linear"}){let i=Ct(e,n.minX,n.maxX,r),s=Ct(t,n.minY,n.maxY,o);return{toPoint:(a,u,c={x:0,y:0})=>(c.x=i.to(a),c.y=s.to(u),c),toCoords:(a,u,c={x:0,y:0})=>(c.x=i.from(a),c.y=s.from(u),c),area:n,xRange:e,yRange:t,revision:[e,t,n.minX,n.minY,n.maxX,n.maxY,r,o].join("|")}}var ee={minX:-1/0,minY:-1/0,maxX:1/0,maxY:1/0},ft={toPoint:(e,t,n={x:0,y:0})=>(n.x=e,n.y=t,n),toCoords:(e,t,n={x:0,y:0})=>(n.x=e,n.y=t,n),area:ee,xRange:[-1/0,1/0],yRange:[-1/0,1/0],revision:"pixels"},dn=[1,0,0,1];function re(e,t=dn){let n=Array.isArray(e)?e.flat():[];return n.length!==4||n.some(r=>typeof r!="number"||!Number.isFinite(r))?t:[n[0],n[1],n[2],n[3]]}function oe(e,t,n){return[0,1,2,3].map(r=>e[r]+(t[r]-e[r])*n)}function ie([e,t,n,r]){return e===1&&t===0&&n===0&&r===1}var se=4;function pn([e,t]){let n=(e+t)/2,r=(t-e)/2*se;return[n-r,n+r]}function ae(e,t){let[n,r,o,i]=t,s=n*i-r*o,a=Math.abs(s)<1e-9,u=(y,d,m)=>(a?(m.x=y,m.y=d):(m.x=(i*y-r*d)/s,m.y=(n*d-o*y)/s),m),c=pn(e.xRange),f=pn(e.yRange),l=c,x=f;if(!a){let y={x:0,y:0},d=1/0,m=1/0,_=-1/0,p=-1/0;for(let M of e.xRange)for(let h of e.yRange)u(M,h,y),d=Math.min(d,y.x),_=Math.max(_,y.x),m=Math.min(m,y.y),p=Math.max(p,y.y);l=[Math.max(d,c[0]),Math.min(_,c[1])],x=[Math.max(m,f[0]),Math.min(p,f[1])]}return{toPoint:(y,d,m={x:0,y:0})=>e.toPoint(n*y+r*d,o*y+i*d,m),toCoords:(y,d,m={x:0,y:0})=>(e.toCoords(y,d,m),u(m.x,m.y,m)),area:e.area,xRange:l,yRange:x,revision:`${e.revision}|m${t.join(",")}`,spills:!0}}function ce(e,t,n){let r=(u,c,f)=>(t(u,c,f)||(f.x=u,f.y=c),f),o={x:0,y:0},i={x:0,y:0},s={x:0,y:0},a=1e-4;return{toPoint:(u,c,f={x:0,y:0})=>(r(u,c,f),e.toPoint(f.x,f.y,f)),toCoords:(u,c,f={x:0,y:0})=>{let l=e.toCoords(u,c),x=l.x,y=l.y;for(let d=0;d<8;d++){r(x,y,o);let m=o.x-l.x,_=o.y-l.y;if(Math.abs(m)+Math.abs(_)<1e-9)break;r(x+a,y,i),r(x,y+a,s);let p=(i.x-o.x)/a,M=(i.y-o.y)/a,h=(s.x-o.x)/a,g=(s.y-o.y)/a,w=p*g-h*M;if(!(Math.abs(w)>1e-12))break;x-=(g*m-h*_)/w,y-=(p*_-M*m)/w}return f.x=Number.isFinite(x)?x:l.x,f.y=Number.isFinite(y)?y:l.y,f},area:e.area,xRange:hn(e.xRange),yRange:hn(e.yRange),revision:`${e.revision}|w${n}`,curved:!0,spills:!0}}var ue=.3;function hn([e,t]){let n=(t-e)*ue;return Number.isFinite(n)?[e-n,t+n]:[e,t]}var xn=48;function lt(e,t,n,r,o){if(!e.curved)return[e.toPoint(t,n),e.toPoint(r,o)];let i=[];for(let s=0;s<=xn;s++){let a=s/xn;i.push(e.toPoint(t+(r-t)*a,n+(o-n)*a))}return i}function J(e,t=!1){let n=[];for(let r of e)if(!(r.length<2)){n.push({type:"M",x:r[0].x,y:r[0].y});for(let o=1;o<r.length;o++)n.push({type:"L",x:r[o].x,y:r[o].y});t&&n.push({type:"Z"})}return n}function K(e){let t=1/0,n=1/0,r=-1/0,o=-1/0;for(let i of e)if(!(i.length<2))for(let s of i)s.x<t&&(t=s.x),s.x>r&&(r=s.x),s.y<n&&(n=s.y),s.y>o&&(o=s.y);return t<=r?{minX:t,minY:n,maxX:r,maxY:o}:null}function fe(e,t){return{minX:e.minX-t,minY:e.minY-t,maxX:e.maxX+t,maxY:e.maxY+t}}function Y(e,t,n){return e<t?t:e>n?n:e}function T(e){let t={};if(!e)return t;for(let n of Object.keys(e))e[n]!==void 0&&(t[n]=e[n]);return t}import{niceStep as le}from"@motionscript/sdk/component";var yn=200,pe=64;function pt(e,t,n,r="linear"){let[o,i]=e;if(r==="log")return he(o,i);let s=i-o;if(!(s>0))return{values:[],step:1};let a=t>0?t:le(pe/Math.max(1,n)*s);return{values:xe(o,i,a),step:a}}function he(e,t){let n=[];for(let r=Math.ceil(Math.log10(e)-1e-9);r<=Math.floor(Math.log10(t)+1e-9)&&n.length<yn;r++)n.push(10**r);return{values:n,step:0}}function xe(e,t,n){let r=Math.ceil(e/n-1e-9),i=Math.floor(t/n+1e-9)-r+1;if(!Number.isFinite(i)||i<=0||i>yn)return[];let s=new Array(i);for(let a=0;a<i;a++)s[a]=(r+a)*n;return s}function vt(e){return Math.floor(Math.log10(e)+1e-12)}function ht(e,t){if(e===0)return"0";if(!Number.isFinite(e))return"";if(!(t>0)){let s=vt(Math.abs(e));return s>=6||s<=-5?mn(e.toExponential(0)):String(Number(e.toPrecision(12)))}let n=vt(Math.abs(e)),r=Math.max(1,n-vt(t)+1);if((n>=6||n<=-5)&&r<=6)return mn(e.toExponential(r-1));let o=de(t),i=e.toFixed(o);return o>0?i.replace(/\.?0+$/,""):i}function de(e){for(let t=0;t<12;t++){let n=e*10**t;if(Math.abs(n-Math.round(n))<1e-9*Math.max(1,n))return t}return 12}function mn(e){let[t,n]=e.split("e");return`${t.replace(/\.?0+$/,"")}e${Number(n)}`}import{Fills as me,Graphics2D as gn,toPathString as ye}from"@motionscript/sdk";var xt="#9ca3af",Rt="#58a6ff";function Xt(e){return e.map(t=>({...t,startCap:void 0,endCap:void 0}))}var ge=8,Mn=/^\$([\s\S]+)\$$/;function _n(e,t){t.some(n=>Mn.test(n.trim()))&&e.loader(It,Tt,{gate:"layout"})}function Yt(e,t){let n=[],r=me.color(t.color),o=new gn,i=t.fontSize*ge,s=!1;for(let a of e){let u=Mn.exec(a.text.trim()),c=u?Me(u[1],a,t.fontSize):null;if(c){for(let x of c)n.push(x.fill(r));continue}let{at:f,align:l}=a;s=!0,o.text({text:a.text,fontSize:t.fontSize,...t.fontFamily===""?{}:{fontFamily:t.fontFamily},wrap:!1,width:i,textAlign:l,x:l==="center"?f.x:l==="right"?f.x-i/2:f.x+i/2,y:f.y})}return s&&n.push(o.fill(r)),n}function Me(e,{at:t,align:n},r){let o;try{o=Nt(e,r)}catch(l){return l instanceof bt?[]:null}let[i,s,a,u]=o.bounds,c=t.x+(n==="left"?o.width/2:n==="right"?-o.width/2:0),f=[i-c,s+t.y,a-c,u+t.y];return o.tokens.map(l=>new gn().path({data:ye(l.path),centerBounds:f}))}function Dt(e,t,n){return e>=t-1e-9&&e<=n+1e-9}function qt(e,t,n){let r=n.x-t.x,o=n.y-t.y,i=r*r+o*o;return i===0?0:((e.x-t.x)*r+(e.y-t.y)*o)/i}function dt(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function mt(e,t){let[n,r]=Array.isArray(e)?e:t??[0,1];return[Number(n),Number(r)]}var A=function(e,t,n,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,n,i):s(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i},E=class extends Q{constructor(t){super(t??{})}rangeTo(t){return this.to({data:T(t.data),duration:t.duration,easing:t.easing})}declareAssets(t){super.declareAssets(t),this.fontFamily!==""&&t.font(this.fontFamily),_n(t,[this.xLabel,this.yLabel])}mapFor(t){let n=ut(this.xRange,this.xScaling),r=ut(this.yRange,this.yScaling),o=t.maxX-t.minX;if(this.squareUnits&&this.xScaling==="linear"&&this.yScaling==="linear"&&o>0){let i=(n[1]-n[0])*(t.maxY-t.minY)/o,s=(r[0]+r[1])/2;i>0&&(r=[s-i/2,s+i/2])}return Ft({xRange:n,yRange:r,area:t,xScaling:this.xScaling,yScaling:this.yScaling})}furniture(t){let n=this.stroke,{start:r,end:o}=this,[i,s]=this.axes(t),a=[...this.backdrop(t,i,s)];if(n.length===0&&!this.labels)return a;n.length>0&&a.push(new wn().line({points:i.line,radius:0,start:r,end:o}).line({points:s.line,radius:0,start:r,end:o}).stroke(n));let u=this.tickSize/2,c=u+this.labelSize*.35,f=new wn,l=[],x=!1,y=(d,m)=>{for(let _ of d.marks.values){if(Math.abs(_-d.crossing)<1e-9*Math.max(1,Math.abs(_)))continue;let p=d.at(_);Dt(qt(p,d.from,d.to),r,o)&&(this.ticks&&u>0&&(f.line({points:m?[{x:p.x,y:p.y-u},{x:p.x,y:p.y+u}]:[{x:p.x-u,y:p.y},{x:p.x+u,y:p.y}],radius:0}),x=!0),this.labels&&l.push(m?{text:ht(_,d.marks.step),at:{x:p.x,y:p.y-c-this.labelSize/2},align:"center"}:{text:ht(_,d.marks.step),at:{x:p.x-c,y:p.y},align:"right"}))}};return y(i,!0),y(s,!1),x&&n.length>0&&a.push(f.stroke(Xt(n))),this.xLabel!==""&&o>=1&&l.push({text:this.xLabel,at:{x:i.to.x,y:i.to.y+c+this.labelSize/2},align:"right"}),this.yLabel!==""&&o>=1&&l.push({text:this.yLabel,at:{x:s.to.x+c,y:s.to.y-this.labelSize/2},align:"left"}),a.push(...Yt(l,{fontSize:this.labelSize,fontFamily:this.fontFamily,color:this.labelColor})),a}backdrop(t,n,r){return[]}axes(t){let[n,r]=t.xRange,[o,i]=t.yRange,s=this.xScaling==="log"?n:Y(0,n,r),a=this.yScaling==="log"?o:Y(0,o,i),u=t.toPoint(n,a),c=t.toPoint(r,a),f=t.toPoint(s,o),l=t.toPoint(s,i);return[{from:u,to:c,line:lt(t,n,a,r,a),marks:pt(t.xRange,this.xStep,Math.hypot(c.x-u.x,c.y-u.y),this.xScaling),crossing:s,at:x=>t.toPoint(x,a)},{from:f,to:l,line:lt(t,s,o,s,i),marks:pt(t.yRange,this.yStep,Math.hypot(l.x-f.x,l.y-f.y),this.yScaling),crossing:a,at:x=>t.toPoint(s,x)}]}};A([O({default:[-5,5],mapper:mt,tween:dt})],E.prototype,"xRange",void 0);A([O({default:[-3,3],mapper:mt,tween:dt})],E.prototype,"yRange",void 0);A([O({default:0,min:0})],E.prototype,"xStep",void 0);A([O({default:0,min:0})],E.prototype,"yStep",void 0);A([O({default:"linear",options:["linear","log"],animatable:!1})],E.prototype,"xScaling",void 0);A([O({default:"linear",options:["linear","log"],animatable:!1})],E.prototype,"yScaling",void 0);A([O({default:!1,animatable:!1})],E.prototype,"squareUnits",void 0);A([O({default:!0,animatable:!1})],E.prototype,"ticks",void 0);A([O({default:10,min:0,unit:"px"})],E.prototype,"tickSize",void 0);A([O({default:!0,animatable:!1})],E.prototype,"labels",void 0);A([O({default:18,min:1,unit:"px"})],E.prototype,"labelSize",void 0);A([_e({default:xt})],E.prototype,"labelColor",void 0);A([O({default:"",animatable:!1})],E.prototype,"fontFamily",void 0);A([O({default:"",animatable:!1})],E.prototype,"xLabel",void 0);A([O({default:"",animatable:!1})],E.prototype,"yLabel",void 0);A([Se({default:{weight:2,fill:xt,align:"center",endCap:"triangle",capScale:5}})],E.prototype,"stroke",void 0);A([we({args:["xRange","yRange"]})],E.prototype,"rangeTo",null);E=A([Ee({key:"axes2d",parentKey:"node",forkable:!0,layout:{children:"freeform",defaultWidthMode:"fixed",defaultHeightMode:"fixed",acceptsChildren:!0},seed:{width:800,height:500,padding:32}})],E);import{Graphics2D as Ae,PaintNode as ke}from"@motionscript/sdk";var D=class extends ke{isClosed(){return!1}shift(){return this._inSystem?{x:this.x,y:this.y}:En}ownPoint(t){let n=this.shift(),r=this._map.toPoint(t.x+n.x,t.y+n.y),o=this._centre();return{x:r.x-o.x,y:r.y-o.y}}graphPoint(t){let n=this.shift(),r=this._centre(),o=this._map.toCoords(t.x+r.x,t.y+r.y);return{x:o.x-n.x,y:o.y-n.y}}paintsFill(){return!0}measure(){let t=this._resolve(ft,!1);return t?{width:t.maxX-t.minX,height:t.maxY-t.minY}:{width:0,height:0}}shapeGraphics(){let t=this._ink;return!t||this._data.length===0?null:new Ae().path({data:this._data,centerBounds:[t.minX,t.minY,t.maxX,t.maxY],start:this.start,end:this.end})}renderSelf(t){this.paintsFill()&&super.renderSelf(t),this.renderInk(t)}renderInk(t){super.renderStroke(t)}renderStroke(){}layoutChildren(t,n){let r=this.flowChildren();if(r.length===0)return;let o={x:0,y:0,width:t.width,height:t.height};this._planes=V(r,this._map,this._centre(),o,n)}_planeOf(t){return t?this._planes.get(t)??null:W(this._map,this._centre())}_data=[];_ink=null;_inSystem=!1;_map=ft;_planes=new WeakMap;_centre(){let t=this._ink;return t?{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}:En}_resolve(t,n=!0){this._inSystem=n,this._map=t;let r=this.trace(t);return this._data=J(r,this.isClosed()),this._ink=K(r),this._ink}},En={x:0,y:0};import{expressionOps as Oe}from"@motionscript/sdk";var jt={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh,cosh:Math.cosh,tanh:Math.tanh,sqrt:Math.sqrt,cbrt:Math.cbrt,abs:Math.abs,exp:Math.exp,log:Math.log,ln:Math.log,log2:Math.log2,log10:Math.log10,floor:Math.floor,ceil:Math.ceil,round:Math.round,sign:Math.sign,trunc:Math.trunc},Ut={atan2:{fn:Math.atan2,arity:[2,2]},pow:{fn:Math.pow,arity:[2,2]},mod:{fn:(e,t)=>e%t,arity:[2,2]},hypot:{fn:Math.hypot,arity:[1,1/0]},min:{fn:Math.min,arity:[1,1/0]},max:{fn:Math.max,arity:[1,1/0]}},An={pi:Math.PI,PI:Math.PI,e:Math.E,E:Math.E,tau:Math.PI*2,phi:(1+Math.sqrt(5))/2},tt={functions:{...Object.fromEntries(Object.keys(jt).map(e=>[e,{arity:[1,1]}])),...Object.fromEntries(Object.entries(Ut).map(([e,{arity:t}])=>[e,{arity:t}]))},constants:An,refs:"bare",unknownName:e=>`Unknown name '${e}'`};function Pe(e){return{variables:e,functions:[...Object.keys(jt),...Object.keys(Ut)].sort(),constants:["pi","e","tau","phi"]}}function kn(e,t,n=[]){for(let r of[...t,...n])if(Object.hasOwn(An,r))throw new Error(`'${r}' is a constant, so it cannot be a variable`);return Z(Oe.parse(e,tt).root,t,n)}function Z(e,t,n){switch(e.kind){case"const":{let{value:r}=e;return()=>r}case"ref":{let{name:r}=e,o=t.indexOf(r);if(o===0)return i=>i;if(o===1)return(i,s)=>s;if(n.includes(r))return(i,s,a)=>a?.[r]??NaN;throw new Error(tt.unknownName(r))}case"unary":{let r=Z(e.operand,t,n);return(o,i,s)=>-r(o,i,s)}case"binary":{let r=Z(e.left,t,n),o=Z(e.right,t,n);switch(e.op){case"+":return(i,s,a)=>r(i,s,a)+o(i,s,a);case"-":return(i,s,a)=>r(i,s,a)-o(i,s,a);case"*":return(i,s,a)=>r(i,s,a)*o(i,s,a);case"/":return(i,s,a)=>r(i,s,a)/o(i,s,a);case"%":return(i,s,a)=>r(i,s,a)%o(i,s,a);case"^":return(i,s,a)=>Math.pow(r(i,s,a),o(i,s,a))}break}case"call":{let r=e.args.map(s=>Z(s,t,n)),o=jt[e.name];if(o){let[s]=r;return(a,u,c)=>o(s(a,u,c))}let{fn:i}=Ut[e.name];if(r.length===2){let[s,a]=r;return(u,c,f)=>i(s(u,c,f),a(u,c,f))}return(s,a,u)=>i(...r.map(c=>c(s,a,u)))}}throw new Error("Unsupported expression")}var Sn=P(256);function q(e,t,n=[]){let r=`${t.join(",")}|${n.join(",")}|${e}`,o=Sn.get(r);if(o!==void 0)return o;let i;try{i=kn(e,t,n)}catch(s){i=s instanceof Error?s:new Error(String(s))}return Sn.set(r,i),i}import{expressionOps as Ie}from"@motionscript/sdk";var yt={function:["x"],polar:["theta"],parametric:["t"],implicit:["x","y"]},On=P(256);function gt(e,t=[]){let n=`${t.join(",")}|${e}`,r=On.get(n);if(r!==void 0)return r;let o;try{o=be(e.trim(),t)}catch(i){o=i instanceof Error?i:new Error(String(i))}return On.set(n,o),o}function zt(e){if(e.trim()==="")return null;let t=gt(e,L(e));return t instanceof Error?t.message:null}var Te=new Set(["r",...Object.values(yt).flat()]),Pn=P(256);function $(e){let t=Pn.get(e);if(t!==void 0)return t;let n=new Set,r=e.trim();try{for(let i of j(r)??et(r,"="))nt(Ie.parse(i.trim(),tt).root,n)}catch{n.clear()}let o=[...n];return Pn.set(e,o),o}function L(e){return $(e).filter(t=>!Te.has(t))}function nt(e,t){switch(e.kind){case"ref":t.add(e.name);return;case"unary":nt(e.operand,t);return;case"binary":nt(e.left,t),nt(e.right,t);return;case"call":for(let n of e.args)nt(n,t);return;default:}}function be(e,t){if(e==="")throw new Error("Empty equation");let n=(c,f)=>{let l=q(c.trim(),f,t);if(l instanceof Error)throw l;return l},r=j(e);if(r?.length===2)return{kind:"parametric",x:n(r[0],["t"]),y:n(r[1],["t"])};let o=et(e,"=");if(o.length>2)throw new Error("An equation has one '='");if(o.length===1)return{kind:"function",of:"x",f:n(e,["x"])};let[i,s]=o,a=i.trim(),u=()=>{let c=n(i,["x","y"]),f=n(s,["x","y"]);return{kind:"implicit",f:(l,x,y)=>c(l,x,y)-f(l,x,y)}};if(a==="r")return{kind:"polar",f:n(s,["theta"])};if(a==="y"||a==="x"){let c=a==="y"?"x":"y";try{return{kind:"function",of:c,f:n(s,[c])}}catch(f){try{return u()}catch{throw f}}}return u()}function j(e){if(!e.startsWith("(")||!e.endsWith(")"))return null;let t=0;for(let r=0;r<e.length-1;r++)if(e[r]==="(")t++;else if(e[r]===")"&&--t===0)return null;let n=et(e.slice(1,-1),",");return n.length>=2?n:null}function et(e,t){let n=[],r=0,o=0;for(let i=0;i<e.length;i++){let s=e[i];s==="("?r++:s===")"?r--:s===t&&r===0&&(n.push(e.slice(o,i)),o=i+1)}return n.push(e.slice(o)),n}function rt(e){return typeof e=="string"?{source:e}:e??{source:""}}function ot(e,t,n){return n<=0||e.source===t.source?n<=0?e:t:n>=1?t:{source:t.source,blend:{from:e.source,t:n}}}function Bt(e,t,n){return!e||!t?n<1?e:t:[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}var $t=1;function it(e,t,n){let r={...e};for(let[o,i]of Object.entries(t)){let s=e[o]??$t;r[o]=s+(i-s)*n}return r}function U(e,t){let n=null;for(let r of e)typeof t[r]!="number"&&((n??={...t})[r]=$t);return n??t}function Ne(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}var In=[],Mt=0;function Le(){let e=In[Mt];return e===void 0&&(e=Gt(),In.push(e)),Mt++,e}function Gt(){return{t:0,px:0,py:0,rx:0,ry:0,ok:!1}}var st={x:0,y:0};function Vt(e,t,n,r,{seeds:o=256,minStep:i=0}={}){if(!(n>t)||!Number.isFinite(t)||!Number.isFinite(n))return[];let s=new Ht(r),a=0,u=(p,M)=>{let h=e(M,st);a++;let g=h&&Number.isFinite(st.x)&&Number.isFinite(st.y);return p.t=M,p.rx=g?st.x:0,p.ry=g?st.y:0,p.px=Tn(p.rx),p.py=Tn(p.ry),p.ok=g,p},c=p=>u(Le(),p),f=(p,M)=>{let h=p,g=M.t;for(let w=0;w<60&&!(a>=4e4||ve(h,r));w++){let S=(h.t+g)/2;if(S===h.t||S===g)break;let k=c(S);if(!k.ok){g=S;continue}let N=Math.abs(k.px-h.px)<.25&&Math.abs(k.py-h.py)<.25;if(h=k,N)break}return h},l=(p,M,h,g)=>{if(p.ok&&h.ok){g&&Fe(p,M,h,r)?s.break():s.draw(p,h);return}if(p.ok){let w=f(p,h);w.t!==p.t&&s.draw(p,w),s.break();return}if(s.break(),h.ok){let w=f(h,p);w.t!==h.t?s.draw(w,h):s.start(h)}},x=(p,M,h)=>{if(a>=4e4||s.points>=24e3){l(p,null,M,!1);return}let g=c((p.t+M.t)/2),w=h>=12||M.t-p.t<=i;if(w||Ce(p,g,M)){l(p,g,M,w);return}x(p,g,h+1),x(g,M,h+1)},y=Math.max(1,Math.round(o)),d=(n-t)/y,m=[Gt(),Gt()],_=u(m[0],t);for(let p=1;p<=y;p++){let M=u(m[p&1],p===y?n:t+p*d);Mt=0,x(_,M,0),_=M}return Mt=0,s.finish()}function Ce(e,t,n){if(e.ok!==t.ok||t.ok!==n.ok)return!1;if(!e.ok)return!0;let r=n.px-e.px,o=n.py-e.py,i=Math.hypot(r,o)||1;if(Math.abs((t.px-e.px)*o-(t.py-e.py)*r)/i>.25)return!1;let s=Math.abs(Math.atan2(t.py-e.py,t.px-e.px)-Math.atan2(n.py-t.py,n.px-t.px));return s>Math.PI&&(s=2*Math.PI-s),s<.05}function Fe(e,t,n,r){return!(e.py>r.maxY&&n.py<r.minY||e.py<r.minY&&n.py>r.maxY||e.px>r.maxX&&n.px<r.minX||e.px<r.minX&&n.px>r.maxX)||t===null?!1:t.ok?t.ry<Math.min(e.ry,n.ry)||t.ry>Math.max(e.ry,n.ry)||t.rx<Math.min(e.rx,n.rx)||t.rx>Math.max(e.rx,n.rx):!0}function ve(e,t){return e.py>t.maxY||e.py<t.minY||e.px>t.maxX||e.px<t.minX}function Tn(e){return e>16e3?16e3:e<-16e3?-16e3:e}var Ht=class{clip;points=0;runs=[];open=[];cursor=null;constructor(t){this.clip=t}draw(t,n){let r=Ye(t.px,t.py,n.px,n.py,this.clip);if(!r){this.break();return}let[o,i]=r;this.cursor&&Re(this.cursor,o)?this.push(i):(this.break(),this.push(o),this.push(i)),this.cursor=i}start(t){this.break(),Xe(t.px,t.py,this.clip)&&(this.cursor={x:t.px,y:t.py},this.push(this.cursor))}break(){this.open.length>=2&&this.runs.push(this.open),this.open=[],this.cursor=null}finish(){return this.break(),this.runs}push(t){this.open.push(t),this.points++}};function Re(e,t){return Math.abs(e.x-t.x)<.1&&Math.abs(e.y-t.y)<.1}function Xe(e,t,n){return e>=n.minX&&e<=n.maxX&&t>=n.minY&&t<=n.maxY}function Ye(e,t,n,r,o){let i=n-e,s=r-t,a=0,u=1,c=[[-i,e-o.minX],[i,o.maxX-e],[-s,t-o.minY],[s,o.maxY-t]];for(let[f,l]of c){if(f===0){if(l<0)return null;continue}let x=l/f;if(f<0){if(x>u)return null;x>a&&(a=x)}else{if(x<a)return null;x<u&&(u=x)}}return[{x:e+a*i,y:t+a*s},{x:e+u*i,y:t+u*s}]}import{findNode2D as De}from"@motionscript/sdk";function bn(e,t){if(t==="")return null;let n=De(e,t);return n&&typeof n.valueAt=="function"?n:null}function qe(e,t){if(t!=="")return bn(e,t);for(let n=e.parent;n;n=n.parent)if(typeof n.valueAt=="function")return n;return null}import{command as je,findNode2D as Ue,frameIn as ze,Graphics2D as Be,PaintNode as $e,pathOps as Ge,property as wt,withdraw as He}from"@motionscript/sdk";var G=function(e,t,n,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,n,i):s(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i};function Ln(e){return typeof e.partBounds=="function"}function Cn(e,t){if(t!==""){let n=Ue(e,t);return n&&n!==e?n:null}for(let n=e.parent;n;n=n.parent)if(Ln(n))return n;return null}function _t(e,t){let n=Cn(e,t.on);if(!n)return null;let r=t.part&&Ln(n)?n.partBounds(t.part,t.occurrence||1):{x:0,y:0,width:n.layoutBounds.width,height:n.layoutBounds.height};if(!r)return null;let o=ze(e,n),i=o.rotation*Math.PI/180,s=Math.cos(i),a=Math.sin(i),u=(l,x)=>({x:o.x+(s*l+a*x)*o.scale,y:o.y+(-a*l+s*x)*o.scale}),c=r.width/2,f=r.height/2;return[u(r.x-c,r.y+f),u(r.x+c,r.y+f),u(r.x+c,r.y-f),u(r.x-c,r.y-f)]}function Ve(e,t,n){return e.map((r,o)=>({x:r.x+(t[o].x-r.x)*n,y:r.y+(t[o].y-r.y)*n}))}var Nn=({on:e,part:t,occurrence:n})=>({on:e,part:t,occurrence:n});function We(e,t,n){return n<=0||!t?n<1?e:t:{...Nn(t),from:e?Nn(e):null,t:n}}var Qe=[-1,-1,1,1],F=class extends $e{retargetTo(t){let n=t.data??{},r=this.retarget??this,o={on:n.on??r.on,part:n.part??(n.on?"":r.part),occurrence:n.occurrence??1,t:1};return this.to({data:{retarget:o},duration:t.duration,easing:t.easing})}quad(){let t=this.retarget;if(!t)return _t(this,this);let n=_t(this,t),r=_t(this,t.from??this);return!r||!n||t.t>=1?n??r:Ve(r,n,t.t)}measure(){return{width:0,height:0}}shapeGraphics(){let t=this._outline();return t.length===0?null:new Be().path({data:t,centerBounds:Qe,start:this.start,end:this.end})}_localBounds(){let t=Ge.bounds(this._outline());return t?{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2,width:t.maxX-t.minX,height:t.maxY-t.minY}:{x:0,y:0,width:0,height:0}}_outline(){let t=this.quad();return t?this.outline(t):[]}};G([wt({default:"",kind:"nodeRef",animatable:!1})],F.prototype,"on",void 0);G([wt({default:"",animatable:!1})],F.prototype,"part",void 0);G([wt({default:1,min:1,step:1,animatable:!1})],F.prototype,"occurrence",void 0);G([wt({default:null,tween:We})],F.prototype,"retarget",void 0);G([je({args:[{key:"on",kind:"nodeRef"},{key:"part",kind:"text",default:""},{key:"occurrence",kind:"number",min:1,step:1,default:1}]})],F.prototype,"retargetTo",null);F=G([He(...X)],F);var I=(e,t,n=1)=>({x:e.x+t.x*n,y:e.y+t.y*n}),Wt=(e,t,n=.5)=>({x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n});function at(e,t){let n=t.x-e.x,r=t.y-e.y,o=Math.hypot(n,r);return{unit:o===0?{x:1,y:0}:{x:n/o,y:r/o},length:o}}function Je(e,t){let[n,r,o,i]=e,s=at(n,r).unit,a=at(i,n).unit;return[I(I(n,s,-t),a,t),I(I(r,s,t),a,t),I(I(o,s,t),a,-t),I(I(i,s,-t),a,-t)]}var ct=["x","y"],Ke=new Set(ct),Fn=P(128);function H(e){return $(e).filter(t=>!Ke.has(t))}function Et(e,t=[]){let n=`${t.join(",")}|${e}`,r=Fn.get(n);if(r!==void 0)return r;let o;try{let i=e.trim();if(i==="")throw new Error("Empty equation");let s=j(i);if(s?.length!==2)throw new Error("A field has two parts: (x, y)");let[a,u]=s.map(c=>{let f=q(c.trim(),ct,t);if(f instanceof Error)throw f;return f});o={x:a,y:u}}catch(i){o=i instanceof Error?i:new Error(String(i))}return Fn.set(n,o),o}function Qt(e){if(e.trim()==="")return null;let t=Et(e,H(e));return t instanceof Error?t.message:null}var z={height:["x","y"],surface:["u","v"],spaceCurve:["t"]},Ze=new Set(["x","y","z","u","v"]),tr=new Set(["t"]),nr=P(128),er=P(128);function Jt(e){return $(e).filter(t=>!Ze.has(t))}function Kt(e){return $(e).filter(t=>!tr.has(t))}function vn(e,t=[]){return qn(nr,e,t,n=>{let r=Dn(t),o=j(n);if(o){if(o.length!==3)throw new Error("A parametric surface has three parts: (x, y, z)");let[s,a,u]=o.map(c=>r(c,z.surface));return{kind:"parametric",x:s,y:a,z:u}}let i=et(n,"=");if(i.length>2)throw new Error("An equation has one '='");if(i.length===2&&i[0].trim()!=="z")throw new Error("A surface is written z = \u2026, or as three parts (x, y, z)");return{kind:"height",f:r(i[i.length-1],z.height)}})}function Rn(e,t=[]){return qn(er,e,t,n=>{let r=Dn(t),o=j(n);if(o?.length!==3)throw new Error("A space curve has three parts: (x, y, z)");let[i,s,a]=o.map(u=>r(u,z.spaceCurve));return{x:i,y:s,z:a}})}function Xn(e){if(e.trim()==="")return null;let t=vn(e,Jt(e));return t instanceof Error?t.message:null}function Yn(e){if(e.trim()==="")return null;let t=Rn(e,Kt(e));return t instanceof Error?t.message:null}function Dn(e){return(t,n)=>{let r=q(t.trim(),n,e);if(r instanceof Error)throw r;return r}}function qn(e,t,n,r){let o=`${n.join(",")}|${t}`,i=e.get(o);if(i!==void 0)return i;let s;try{let a=t.trim();if(a==="")throw new Error("Empty equation");s=r(a)}catch(a){s=a instanceof Error?a:new Error(String(a))}return e.set(o,s),s}var rr={equation:{error:zt,params:L,variables:[...new Set(Object.values(yt).flat())]},surfaceEquation:{error:Xn,params:Jt,variables:[...z.height,...z.surface]},spaceCurveEquation:{error:Yn,params:Kt,variables:z.spaceCurve},fieldEquation:{error:Qt,params:H,variables:ct}};import{Node3D as or}from"@motionscript/sdk";function ir(e,t,n,r){let o=Zt(e,r.x),i=Zt(t,r.y),s=Zt(n,r.z),a=(e[0]+e[1])/2,u=(t[0]+t[1])/2,c=(n[0]+n[1])/2;return{xRange:e,yRange:t,zRange:n,revision:[e,t,n,r.x,r.y,r.z].join("|"),toLocal:(f,l,x)=>({x:(l-u)*i,y:(x-c)*s,z:(f-a)*o}),offset:(f,l,x)=>({x:l*i,y:x*s,z:f*o})}}function Zt([e,t],n){let r=t-e;return r>0?n/r:0}function sr(e){for(let t=e.parent;t;t=t instanceof or?t.parent:null){let n=t;if(typeof n._graphSpace=="function")return n._graphSpace()}return null}function ar(e){let t=Math.hypot(e.x,e.y,e.z);if(!(t>0))return{x:0,y:0,z:0,w:1};let n=e.x/t,r=e.y/t,o=e.z/t;if(r<-1+1e-9)return{x:1,y:0,z:0,w:0};let i=1+r,s=Math.hypot(o,n,i);return{x:o/s,y:0,z:-n/s,w:i/s}}import{Fills as cr,Graphics2D as ur,Mat as fr,Tex as lr}from"@motionscript/sdk";var St=64,tn=96,jn=P(256);function pr(e,t){let n=`${t.fontFamily}|${JSON.stringify(t.color)}|${e}`,r=jn.get(n);if(r)return r;let o=Math.min(1024,Math.max(128,Math.ceil((e.length*St*.62+St)/32)*32)),i=new ur().text({text:e,fontSize:St,...t.fontFamily===""?{}:{fontFamily:t.fontFamily},wrap:!1,width:o,textAlign:"center"}).fill(cr.color(t.color)),s={texture:lr.surface(i,{width:o,height:tn}),width:o};return jn.set(n,s),s}function hr(e,t,n,r){if(t===""||!(r.size>0))return;let{texture:o,width:i}=pr(t,r),s=r.size*tn/St;e.sprite({material:fr.sprite({map:o,transparent:!0,depthWrite:!1}),position:n,scale:[s*i/tn,s,1]})}import{command as en,node as dr,property as rn,strokeProperty as mr,withdraw as yr}from"@motionscript/sdk";function nn(e,[t,n],[r,o],i,s){if(!(n>t)||!(o>r)||i<1||s<1)return[];let a=(n-t)/i,u=(o-r)/s,c=i+1,f=new Float64Array(c*(s+1));for(let h=0;h<=s;h++)for(let g=0;g<=i;g++)f[h*c+g]=e(t+g*a,r+h*u);let l=new Map,x=c*(s+1),y=(h,g,w)=>{let S=f[g*c+h],k=w?f[(g+1)*c+h]:f[g*c+h+1];if(!Number.isFinite(S)||!Number.isFinite(k)||S<0==k<0)return null;let N=(w?x:0)+g*c+h;if(!l.has(N)){let R=S/(S-k);l.set(N,w?{x:t+h*a,y:r+(g+R)*u}:{x:t+(h+R)*a,y:r+g*u})}return N},d=new Map,m=(h,g)=>{h===null||g===null||((d.get(h)??d.set(h,[]).get(h)).push(g),(d.get(g)??d.set(g,[]).get(g)).push(h))};for(let h=0;h<s;h++)for(let g=0;g<i;g++){let w=y(g,h,!1),S=y(g,h+1,!1),k=y(g,h,!0),N=y(g+1,h,!0),R=[w,N,S,k].filter(Pt=>Pt!==null);if(R.length===2)m(R[0],R[1]);else if(R.length===4){let Pt=e(t+(g+.5)*a,r+(h+.5)*u),$n=f[h*c+g];Pt<0==$n<0?(m(w,N),m(S,k)):(m(w,k),m(S,N))}}let _=[],p=new Set,M=h=>{let g=[l.get(h)];p.add(h);let w=h;for(;;){let S=(d.get(w)??[]).find(k=>!p.has(k));if(S===void 0)break;p.add(S),g.push(l.get(S)),w=S}return g};for(let[h,g]of d)g.length===1&&!p.has(h)&&_.push(M(h));for(let h of d.keys()){if(p.has(h))continue;let g=M(h);g.push(g[0]),_.push(g)}return _.filter(h=>h.length>1)}var At=["axes2d","numberLine","polarPlane"],xr=[...At,"functionPlot"];var v=function(e,t,n,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,n,i):s(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i},gr=Math.PI*2,b=class extends D{constructor(t){super(t??{})}morphTo(t){return this.to({data:T(t.data),duration:t.duration,easing:t.easing})}paramsTo(t){return this.to({data:T(t.data),duration:t.duration,easing:t.easing})}domainTo(t){return this.to({data:T(t.data),duration:t.duration,easing:t.easing})}valueAt(t){let{source:n,blend:r}=this.expression,o=this.shift(),i=this._heightOf(n,t-o.x)+o.y;if(!r)return i;let s=this._heightOf(r.from,t-o.x)+o.y;return s+(i-s)*r.t}span(){return this.domain}trace(t){let{area:n}=t;if(!Number.isFinite(n.maxX-n.minX))return[];let{source:r,blend:o}=this.expression,i=this.shift(),s=[r,o?.from,o?.t,t.revision,this.span(),JSON.stringify(this.params),i.x,i.y].join("|");if(s===this._key)return this._runs;this._key=s;let a=o&&o.t<.5?o.from:r;if(this._equation(r)?.kind==="implicit"||o&&this._equation(o.from)?.kind==="implicit")return this._runs=this._contour(a,t,i),this._runs;let u=this._curve(r,t,i);if(u&&o){let f=this._curve(o.from,t,i);f&&(u=wr(f,u,o.t))}let c=n.maxX-n.minX;return this._runs=u?Vt(u,0,1,n,{seeds:Math.min(512,Math.max(64,Math.round(c/8))),minStep:.5/Math.max(1,c)}):[],this._runs}_key="";_runs=[];_equation(t){let n=gt(t,L(t));return n instanceof Error?null:n}_heightOf(t,n){let r=this._equation(t);return r?.kind!=="function"||r.of!=="x"?NaN:r.f(n,0,U(L(t),this.params))}_contour(t,n,r){let o=this._equation(t);if(o?.kind!=="implicit")return[];let i=U(L(t),this.params),{area:s}=n,a=f=>Math.min(_r,Math.max(8,Math.round(f/Mr))),{f:u}=o;return nn((f,l)=>u(f-r.x,l-r.y,i),n.xRange,n.yRange,a(s.maxX-s.minX),a(s.maxY-s.minY)).map(f=>f.map(l=>n.toPoint(l.x,l.y)))}_curve(t,n,r){let o=this._equation(t);if(!o||o.kind==="implicit")return null;let i=U(L(t),this.params),s=this.span();switch(o.kind){case"function":{let a=o.of==="x",[u,c]=a?n.xRange:n.yRange,f=a?r.x:r.y,l=Math.max(u-f,s?.[0]??-1/0),x=Math.min(c-f,s?.[1]??1/0);if(!(x>l))return null;let{f:y}=o;return(d,m)=>{let _=l+(x-l)*d,p=y(_,0,i);return Number.isFinite(p)?(a?n.toPoint(_+r.x,p+r.y,m):n.toPoint(p+r.x,_+r.y,m),!0):!1}}case"polar":{let[a,u]=s??[0,gr],{f:c}=o;return(f,l)=>{let x=a+(u-a)*f,y=c(x,0,i);return Number.isFinite(y)?(n.toPoint(y*Math.cos(x)+r.x,y*Math.sin(x)+r.y,l),!0):!1}}case"parametric":{let[a,u]=s??[0,1],{x:c,y:f}=o;return(l,x)=>{let y=a+(u-a)*l,d=c(y,0,i),m=f(y,0,i);return!Number.isFinite(d)||!Number.isFinite(m)?!1:(n.toPoint(d+r.x,m+r.y,x),!0)}}}}};v([rn({default:"",mapper:rt,tween:ot,kind:"equation"})],b.prototype,"expression",void 0);v([rn({default:null,tween:Bt,kind:"range",defaultMin:-5,defaultMax:5})],b.prototype,"domain",void 0);v([rn({default:{},tween:it})],b.prototype,"params",void 0);v([mr({default:{weight:3,fill:Rt,align:"center",cap:"round",join:"round"}})],b.prototype,"stroke",void 0);v([en({args:["expression"]})],b.prototype,"morphTo",null);v([en({args:["params"]})],b.prototype,"paramsTo",null);v([en({args:["domain"]})],b.prototype,"domainTo",null);b=v([dr({key:"functionPlot",within:At,closed:!0,parentKey:"shape",forkable:!0,layout:{children:"freeform",defaultWidthMode:"hug",defaultHeightMode:"hug",acceptsChildren:!0},seed:{expression:"sin(x)"}}),yr(...X)],b);var Mr=5,_r=220;function wr(e,t,n){let r={x:0,y:0};return(o,i)=>!e(o,r)||!t(o,i)?!1:(i.x=r.x+(i.x-r.x)*n,i.y=r.y+(i.y-r.y)*n,!0)}import{command as Un,Graphics2D as kr,property as Ot,withdraw as Or}from"@motionscript/sdk";import{colorOps as on,fillOps as sn}from"@motionscript/sdk";function Er(e){return(e??[]).map(t=>on.resolve(t))}function Sr(e,t,n){return e.length!==t.length?n<1?e:t:t.map((r,o)=>on.lerp(e[o],r,n))}function Ar(e,t){if(e.length===1)return e[0];let n=Y(t,0,1)*(e.length-1),r=Math.min(e.length-2,Math.floor(n));return on.lerp(e[r],e[r+1],n-r)}function an(e){return(Array.isArray(e)?e:[]).map(t=>sn.resolve(t??[]))}function cn(e,t,n){return e.length!==t.length?n<1?e:t:t.map((r,o)=>sn.lerp(e[o],r,n))}function un(e,t){if(e.length===1)return e[0];let n=Y(t,0,1)*(e.length-1),r=Math.min(e.length-2,Math.floor(n));return sn.lerp(e[r],e[r+1],n-r)}var B=function(e,t,n,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,n,i):s(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i},kt=12,C=class extends D{morphTo(t){return this.to({data:T(t.data),duration:t.duration,easing:t.easing})}paramsTo(t){return this.to({data:T(t.data),duration:t.duration,easing:t.easing})}trace(t){let{area:n}=t;if(!Number.isFinite(n.maxX-n.minX))return[];let{source:r,blend:o}=this.expression,i=this.shift(),s=[r,o?.from,o?.t,t.revision,JSON.stringify(this.params),i.x,i.y,this.own()].join("|");if(s!==this._key){this._key=s;let a=this._sampler(i);this._drawn=a?this.strokes(t,a):[],this._runs=this._drawn.flatMap(u=>u.runs)}return this._runs}renderInk(t){let n=this.strengthFills,r=this.stroke,o=n.length>0&&r.length>0?K(this._runs):null;if(!o){super.renderInk(t);return}let i=this.maxMagnitude>0?this.maxMagnitude:this._drawn.reduce((a,u)=>Math.max(a,u.magnitude),0),s=Array.from({length:kt},()=>[]);for(let a of this._drawn){let u=i>0?Math.min(1,a.magnitude/i):0;s[Math.min(kt-1,Math.floor(u*kt))].push(...a.runs)}s.forEach((a,u)=>{if(a.length===0)return;let c=un(n,(u+.5)/kt);t.draw(new kr().path({data:J(a),centerBounds:[o.minX,o.minY,o.maxX,o.maxY],start:this.start,end:this.end}).shadow(this.shadow).stroke(r.map(f=>({...f,fill:c}))))})}_key="";_drawn=[];_runs=[];_sampler(t){let{source:n,blend:r}=this.expression,o=this._field(n,t);if(!o||!r)return o;let i=this._field(r.from,t);if(!i)return o;let s={x:0,y:0};return(a,u,c)=>!i(a,u,s)||!o(a,u,c)?!1:(c.x=s.x+(c.x-s.x)*r.t,c.y=s.y+(c.y-s.y)*r.t,!0)}_field(t,n){let r=H(t),o=Et(t,r);if(o instanceof Error)return null;let i=U(r,this.params),{x:s,y:a}=o;return(u,c,f)=>{let l=s(u-n.x,c-n.y,i),x=a(u-n.x,c-n.y,i);return f.x=l,f.y=x,Number.isFinite(l)&&Number.isFinite(x)}}};B([Ot({default:"",mapper:rt,tween:ot,kind:"fieldEquation"})],C.prototype,"expression",void 0);B([Ot({default:{},tween:it})],C.prototype,"params",void 0);B([Ot({default:[],mapper:an,tween:cn,kind:"vector"})],C.prototype,"strengthFills",void 0);B([Ot({default:0,min:0,step:.1})],C.prototype,"maxMagnitude",void 0);B([Un({args:["expression"]})],C.prototype,"morphTo",null);B([Un({args:["params"]})],C.prototype,"paramsTo",null);C=B([Or(...X,...Lt)],C);var Pr=.5523;function Ir(e,t,n,r){let{unit:o,length:i}=at(e,t);if(i===0)return[];let s=Math.min(r/2,i/4),a=Wt(e,t),u=(p,M)=>I(p,n,M*s),c=(p,M)=>I(p,o,M*s),f=Pr,l=(p,M,h)=>({type:"C",x1:p.x,y1:p.y,x2:M.x,y2:M.y,x:h.x,y:h.y}),x=u(c(e,1),1),y=u(c(a,-1),1),d=u(a,2),m=u(c(a,1),1),_=u(c(t,-1),1);return[{type:"M",x:e.x,y:e.y},l(u(e,f),u(c(e,1-f),1),x),{type:"L",x:y.x,y:y.y},l(u(c(a,-1+f),1),u(a,2-f),d),l(u(a,2-f),u(c(a,1-f),1),m),{type:"L",x:_.x,y:_.y},l(u(c(t,-1+f),1),u(t,f),t)]}var Tr=["circular","spring","tree","grid"];function br(e,t,n,r){let o=t.length;if(o===0)return new Map;if(o===1)return new Map([[t[0],{x:0,y:0}]]);switch(e){case"grid":return Nr(t);case"tree":return zn(Cr(t,n,r));case"spring":return zn(Fr(t,n));default:return Bn(t)}}function Bn(e){let t=e.length;return new Map(e.map((n,r)=>{let o=Math.PI/2-2*Math.PI*r/t;return[n,{x:Math.cos(o),y:Math.sin(o)}]}))}function Nr(e){let t=Math.ceil(Math.sqrt(e.length)),n=Math.ceil(e.length/t),r=(o,i)=>i===1?0:-1+2*o/(i-1);return new Map(e.map((o,i)=>[o,{x:r(i%t,t),y:-r(Math.floor(i/t),n)}]))}function Lr(e,t){let n=new Map(e.map(r=>[r,[]]));for(let{from:r,to:o}of t)r===o||!n.has(r)||!n.has(o)||(n.get(r).push(o),n.get(o).push(r));return n}function Cr(e,t,n){let r=Lr(e,t),o=new Map,i=0,s=(c,f,l)=>{l.add(c);let x=r.get(c).filter(m=>!l.has(m));for(let m of x)l.add(m);if(x.length===0)return o.set(c,{x:i++,y:-f}),o.get(c).x;let y=x.map(m=>s(m,f+1,l)),d=(y[0]+y[y.length-1])/2;return o.set(c,{x:d,y:-f}),d},a=new Set,u=r.has(n)?n:e[0];for(let c of[u,...e])a.has(c)||s(c,0,a);return o}function Fr(e,t){let n=e.length,r=new Map(e.map((f,l)=>[f,l])),o=Bn(e),i=e.map(f=>o.get(f).x),s=e.map(f=>o.get(f).y),a=t.flatMap(({from:f,to:l})=>{let x=r.get(f),y=r.get(l);return x===void 0||y===void 0||x===y?[]:[[x,y]]}),u=Math.sqrt(4/n),c=160;for(let f=0;f<c;f++){let l=new Float64Array(n),x=new Float64Array(n);for(let d=0;d<n;d++)for(let m=d+1;m<n;m++){let _=i[d]-i[m],p=s[d]-s[m],M=Math.hypot(_,p);M<1e-6&&([_,p,M]=[.001*(d-m),.001,.001]);let h=u*u/M;l[d]+=_/M*h,x[d]+=p/M*h,l[m]-=_/M*h,x[m]-=p/M*h}for(let[d,m]of a){let _=i[d]-i[m],p=s[d]-s[m],M=Math.max(Math.hypot(_,p),1e-6),h=M*M/u;l[d]-=_/M*h,x[d]-=p/M*h,l[m]+=_/M*h,x[m]+=p/M*h}let y=.12*(1-f/c);for(let d=0;d<n;d++){let m=Math.hypot(l[d],x[d]);m>0&&(i[d]+=l[d]/m*Math.min(m,y),s[d]+=x[d]/m*Math.min(m,y))}}return new Map(e.map((f,l)=>[f,{x:i[l],y:s[l]}]))}function zn(e){let t=1/0,n=1/0,r=-1/0,o=-1/0;for(let s of e.values())t=Math.min(t,s.x),r=Math.max(r,s.x),n=Math.min(n,s.y),o=Math.max(o,s.y);let i=(s,a,u)=>u-a<1e-9?0:-1+2*(s-a)/(u-a);return new Map([...e].map(([s,a])=>[s,{x:i(a.x,t,r),y:i(a.y,n,o)}]))}export{ut as a,Ct as b,Ft as c,ft as d,dn as e,re as f,oe as g,ie as h,ae as i,ce as j,lt as k,J as l,K as m,fe as n,Y as o,T as p,V as q,W as r,Q as s,pt as t,ht as u,xt as v,Rt as w,Xt as x,_n as y,Yt as z,Dt as A,qt as B,dt as C,mt as D,E,tt as F,Pe as G,kn as H,q as I,yt as J,gt as K,zt as L,L as M,ct as N,H as O,Et as P,Qt as Q,rt as R,ot as S,Bt as T,$t as U,it as V,U as W,Ne as X,nn as Y,D as Z,Vt as _,At as $,xr as aa,b as ba,bn as ca,qe as da,Cn as ea,_t as fa,F as ga,I as ha,Wt as ia,at as ja,Je as ka,Ir as la,hr as ma,ir as na,sr as oa,ar as pa,z as qa,Jt as ra,Kt as sa,vn as ta,Rn as ua,Xn as va,Yn as wa,rr as xa,Er as ya,Sr as za,Ar as Aa,an as Ba,cn as Ca,un as Da,C as Ea,Tr as Fa,br as Ga};
|
|
2
|
+
//# sourceMappingURL=chunk-3GJB6AVO.js.map
|