@motionscript/math 0.0.0-stage → 0.1.0-alpha.10
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 +144 -0
- package/LICENSE +201 -0
- package/NOTICE +49 -0
- package/README.md +389 -2
- package/dist/annotate/angle-mark.d.ts +96 -0
- package/dist/annotate/angle-mark.d.ts.map +1 -0
- package/dist/annotate/angle-mark.js +97 -0
- package/dist/annotate/angle-mark.js.map +1 -0
- package/dist/annotate/curly-brace.d.ts +115 -0
- package/dist/annotate/curly-brace.d.ts.map +1 -0
- package/dist/annotate/curly-brace.js +99 -0
- package/dist/annotate/curly-brace.js.map +1 -0
- package/dist/annotate/emphasis-mark.d.ts +80 -0
- package/dist/annotate/emphasis-mark.d.ts.map +1 -0
- package/dist/annotate/emphasis-mark.js +80 -0
- package/dist/annotate/emphasis-mark.js.map +1 -0
- package/dist/browser/THIRD_PARTY_LICENSES.txt +420 -0
- package/dist/browser/chunks/chunk-IRZCG6PM.js +2 -0
- package/dist/browser/chunks/chunk-IRZCG6PM.js.map +7 -0
- package/dist/browser/chunks/chunk-WMVW6ZIV.js +2 -0
- package/dist/browser/chunks/chunk-WMVW6ZIV.js.map +7 -0
- package/dist/browser/chunks/mathjax-WV55AC2P.js +61 -0
- package/dist/browser/chunks/mathjax-WV55AC2P.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 +71 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +45 -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/component.d.ts +51 -0
- package/dist/kit/component.d.ts.map +1 -0
- package/dist/kit/component.js +30 -0
- package/dist/kit/component.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 +28 -0
- package/dist/kit/curve.d.ts.map +1 -0
- package/dist/kit/curve.js +29 -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 +79 -0
- package/dist/kit/field-mark.d.ts.map +1 -0
- package/dist/kit/field-mark.js +109 -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 +109 -0
- package/dist/kit/follow.d.ts.map +1 -0
- package/dist/kit/follow.js +163 -0
- package/dist/kit/follow.js.map +1 -0
- package/dist/kit/furniture.d.ts +32 -0
- package/dist/kit/furniture.d.ts.map +1 -0
- package/dist/kit/furniture.js +92 -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/graph.d.ts +46 -0
- package/dist/kit/graph.d.ts.map +1 -0
- package/dist/kit/graph.js +90 -0
- package/dist/kit/graph.js.map +1 -0
- package/dist/kit/mark.d.ts +72 -0
- package/dist/kit/mark.d.ts.map +1 -0
- package/dist/kit/mark.js +87 -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 +20 -0
- package/dist/kit/place.d.ts.map +1 -0
- package/dist/kit/place.js +66 -0
- package/dist/kit/place.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 +31 -0
- package/dist/kit/system.d.ts.map +1 -0
- package/dist/kit/system.js +71 -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 +51 -0
- package/dist/marks/curve-area.d.ts.map +1 -0
- package/dist/marks/curve-area.js +59 -0
- package/dist/marks/curve-area.js.map +1 -0
- package/dist/marks/drop-lines.d.ts +57 -0
- package/dist/marks/drop-lines.d.ts.map +1 -0
- package/dist/marks/drop-lines.js +43 -0
- package/dist/marks/drop-lines.js.map +1 -0
- package/dist/marks/plot-point.d.ts +71 -0
- package/dist/marks/plot-point.d.ts.map +1 -0
- package/dist/marks/plot-point.js +71 -0
- package/dist/marks/plot-point.js.map +1 -0
- package/dist/marks/riemann-sum.d.ts +58 -0
- package/dist/marks/riemann-sum.d.ts.map +1 -0
- package/dist/marks/riemann-sum.js +63 -0
- package/dist/marks/riemann-sum.js.map +1 -0
- package/dist/marks/tangent-line.d.ts +71 -0
- package/dist/marks/tangent-line.d.ts.map +1 -0
- package/dist/marks/tangent-line.js +89 -0
- package/dist/marks/tangent-line.js.map +1 -0
- package/dist/marks/vector-arrow.d.ts +60 -0
- package/dist/marks/vector-arrow.d.ts.map +1 -0
- package/dist/marks/vector-arrow.js +67 -0
- package/dist/marks/vector-arrow.js.map +1 -0
- package/dist/nodes.d.ts +43 -0
- package/dist/nodes.d.ts.map +1 -0
- package/dist/nodes.js +57 -0
- package/dist/nodes.js.map +1 -0
- package/dist/plots/function-plot.d.ts +159 -0
- package/dist/plots/function-plot.d.ts.map +1 -0
- package/dist/plots/function-plot.js +184 -0
- package/dist/plots/function-plot.js.map +1 -0
- package/dist/plots/points-plot.d.ts +64 -0
- package/dist/plots/points-plot.d.ts.map +1 -0
- package/dist/plots/points-plot.js +72 -0
- package/dist/plots/points-plot.js.map +1 -0
- package/dist/plots/stream-lines.d.ts +76 -0
- package/dist/plots/stream-lines.d.ts.map +1 -0
- package/dist/plots/stream-lines.js +122 -0
- package/dist/plots/stream-lines.js.map +1 -0
- package/dist/plots/traced-path.d.ts +70 -0
- package/dist/plots/traced-path.d.ts.map +1 -0
- package/dist/plots/traced-path.js +41 -0
- package/dist/plots/traced-path.js.map +1 -0
- package/dist/plots/vector-field.d.ts +60 -0
- package/dist/plots/vector-field.d.ts.map +1 -0
- package/dist/plots/vector-field.js +77 -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 +174 -0
- package/dist/structures/network-graph.d.ts.map +1 -0
- package/dist/structures/network-graph.js +240 -0
- package/dist/structures/network-graph.js.map +1 -0
- package/dist/structures/sample-space.d.ts +114 -0
- package/dist/structures/sample-space.d.ts.map +1 -0
- package/dist/structures/sample-space.js +161 -0
- package/dist/structures/sample-space.js.map +1 -0
- package/dist/systems/axes2d.d.ts +197 -0
- package/dist/systems/axes2d.d.ts.map +1 -0
- package/dist/systems/axes2d.js +157 -0
- package/dist/systems/axes2d.js.map +1 -0
- package/dist/systems/number-line.d.ts +101 -0
- package/dist/systems/number-line.d.ts.map +1 -0
- package/dist/systems/number-line.js +91 -0
- package/dist/systems/number-line.js.map +1 -0
- package/dist/systems/number-plane.d.ts +168 -0
- package/dist/systems/number-plane.d.ts.map +1 -0
- package/dist/systems/number-plane.js +186 -0
- package/dist/systems/number-plane.js.map +1 -0
- package/dist/systems/polar-plane.d.ts +98 -0
- package/dist/systems/polar-plane.d.ts.map +1 -0
- package/dist/systems/polar-plane.js +139 -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 +10 -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 +101 -0
- package/dist/tex/matrix.d.ts.map +1 -0
- package/dist/tex/matrix.js +56 -0
- package/dist/tex/matrix.js.map +1 -0
- package/dist/tex/node.d.ts +98 -0
- package/dist/tex/node.d.ts.map +1 -0
- package/dist/tex/node.js +25 -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/tex/typeset.d.ts +133 -0
- package/dist/tex/typeset.d.ts.map +1 -0
- package/dist/tex/typeset.js +403 -0
- package/dist/tex/typeset.js.map +1 -0
- package/dist/three/axes3d.d.ts +247 -0
- package/dist/three/axes3d.d.ts.map +1 -0
- package/dist/three/axes3d.js +187 -0
- package/dist/three/axes3d.js.map +1 -0
- package/dist/three/curve-plot3d.d.ts +126 -0
- package/dist/three/curve-plot3d.d.ts.map +1 -0
- package/dist/three/curve-plot3d.js +109 -0
- package/dist/three/curve-plot3d.js.map +1 -0
- package/dist/three/entries.d.ts +17 -0
- package/dist/three/entries.d.ts.map +1 -0
- package/dist/three/entries.js +15 -0
- package/dist/three/entries.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 +42 -0
- package/dist/three/label3d.js.map +1 -0
- package/dist/three/plot-point3d.d.ts +99 -0
- package/dist/three/plot-point3d.d.ts.map +1 -0
- package/dist/three/plot-point3d.js +34 -0
- package/dist/three/plot-point3d.js.map +1 -0
- package/dist/three/space.d.ts +43 -0
- package/dist/three/space.d.ts.map +1 -0
- package/dist/three/space.js +58 -0
- package/dist/three/space.js.map +1 -0
- package/dist/three/surface-plot3d.d.ts +207 -0
- package/dist/three/surface-plot3d.d.ts.map +1 -0
- package/dist/three/surface-plot3d.js +261 -0
- package/dist/three/surface-plot3d.js.map +1 -0
- package/dist/three/vector-arrow3d.d.ts +96 -0
- package/dist/three/vector-arrow3d.d.ts.map +1 -0
- package/dist/three/vector-arrow3d.js +53 -0
- package/dist/three/vector-arrow3d.js.map +1 -0
- package/package.json +80 -3
- package/registry.json +251 -0
- package/src/annotate/angle-mark.ts +137 -0
- package/src/annotate/curly-brace.ts +148 -0
- package/src/annotate/emphasis-mark.ts +118 -0
- package/src/engine.ts +86 -0
- package/src/index.ts +29 -0
- package/src/kit/brace.ts +37 -0
- package/src/kit/cache.ts +61 -0
- package/src/kit/component.ts +57 -0
- package/src/kit/contour.ts +94 -0
- package/src/kit/coords.ts +278 -0
- package/src/kit/curve.ts +47 -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 +171 -0
- package/src/kit/field.ts +50 -0
- package/src/kit/follow.ts +229 -0
- package/src/kit/furniture.ts +113 -0
- package/src/kit/geometry.ts +49 -0
- package/src/kit/graph.ts +116 -0
- package/src/kit/mark.ts +152 -0
- package/src/kit/part-fills.ts +61 -0
- package/src/kit/place.ts +77 -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 +105 -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 +71 -0
- package/src/marks/plot-point.ts +102 -0
- package/src/marks/riemann-sum.ts +99 -0
- package/src/marks/tangent-line.ts +119 -0
- package/src/marks/vector-arrow.ts +98 -0
- package/src/nodes.ts +99 -0
- package/src/plots/function-plot.ts +220 -0
- package/src/plots/points-plot.ts +103 -0
- package/src/plots/stream-lines.ts +160 -0
- package/src/plots/traced-path.ts +70 -0
- package/src/plots/vector-field.ts +107 -0
- package/src/structures/graph-layout.ts +145 -0
- package/src/structures/network-graph.ts +291 -0
- package/src/structures/sample-space.ts +210 -0
- package/src/systems/axes2d.ts +226 -0
- package/src/systems/number-line.ts +130 -0
- package/src/systems/number-plane.ts +232 -0
- package/src/systems/polar-plane.ts +177 -0
- package/src/tex/geometry.ts +703 -0
- package/src/tex/index.ts +15 -0
- package/src/tex/mathjax.ts +82 -0
- package/src/tex/matrix.ts +97 -0
- package/src/tex/node.ts +74 -0
- package/src/tex/tween.ts +308 -0
- package/src/tex/typeset.ts +461 -0
- package/src/three/axes3d.ts +267 -0
- package/src/three/curve-plot3d.ts +146 -0
- package/src/three/entries.ts +42 -0
- package/src/three/label3d.ts +52 -0
- package/src/three/plot-point3d.ts +63 -0
- package/src/three/space.ts +92 -0
- package/src/three/surface-plot3d.ts +318 -0
- package/src/three/vector-arrow3d.ts +88 -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{H as Rt,J as Xt,K as Yt,M as Rn,a as A,b as ft,c as lt,f as Ft,h as Ct,l as L,m as _,n as pt,o as I,p as bt}from"./chunk-WMVW6ZIV.js";var $r=["fill","fillTo"],Vr=["stroke","strokeTo"],Hr=["start","end","progressTo","flash"];import{Graphics2D as er,insetsOps as or,Paint as Ee,provides as Se}from"@motionscript/sdk";import{createContext as Gn,Types as Ht}from"@motionscript/sdk";function mt(t,n="linear"){let[r,e]=t??[0,1];return(!Number.isFinite(r)||!Number.isFinite(e))&&([r,e]=[0,1]),r>e&&([r,e]=[e,r]),n==="log"&&(e>0||(e=10),r>0||(r=e/1e3)),e>r?[r,e]:[r,r+1]}function Dt(t,n,r,e="linear"){let[o,i]=t;if(e==="log"){let a=Math.log10(o),f=(r-n)/(Math.log10(i)-a);return{to:u=>n+(Math.log10(u)-a)*f,from:u=>10**(a+(u-n)/f)}}let s=(r-n)/(i-o);return{to:a=>n+(a-o)*s,from:a=>o+(a-n)/s}}function vt({xRange:t,yRange:n,area:r,xScaling:e="linear",yScaling:o="linear"}){let i=Dt(t,r.minX,r.maxX,e),s=Dt(n,r.minY,r.maxY,o);return{toPoint:(a,f,u={x:0,y:0})=>(u.x=i.to(a),u.y=s.to(f),u),toCoords:(a,f,u={x:0,y:0})=>(u.x=i.from(a),u.y=s.from(f),u),area:r,xRange:t,yRange:n,revision:[t,n,r.minX,r.minY,r.maxX,r.maxY,e,o].join("|")}}var Gr={minX:-1/0,minY:-1/0,maxX:1/0,maxY:1/0},z={toPoint:(t,n,r={x:0,y:0})=>(r.x=t,r.y=n,r),toCoords:(t,n,r={x:0,y:0})=>(r.x=t,r.y=n,r),area:Gr,xRange:[-1/0,1/0],yRange:[-1/0,1/0],revision:"pixels"},vn=[1,0,0,1];function Wr(t,n=vn){let r=Array.isArray(t)?t.flat():[];return r.length!==4||r.some(e=>typeof e!="number"||!Number.isFinite(e))?n:[r[0],r[1],r[2],r[3]]}function Qr(t,n,r){return[0,1,2,3].map(e=>t[e]+(n[e]-t[e])*r)}function Kr([t,n,r,e]){return t===1&&n===0&&r===0&&e===1}var Jr=4;function Xn([t,n]){let r=(t+n)/2,e=(n-t)/2*Jr;return[r-e,r+e]}function Zr(t,n){let[r,e,o,i]=n,s=r*i-e*o,a=Math.abs(s)<1e-9,f=(d,y,h)=>(a?(h.x=d,h.y=y):(h.x=(i*d-e*y)/s,h.y=(r*y-o*d)/s),h),u=Xn(t.xRange),c=Xn(t.yRange),l=u,p=c;if(!a){let d={x:0,y:0},y=1/0,h=1/0,E=-1/0,x=-1/0;for(let g of t.xRange)for(let m of t.yRange)f(g,m,d),y=Math.min(y,d.x),E=Math.max(E,d.x),h=Math.min(h,d.y),x=Math.max(x,d.y);l=[Math.max(y,u[0]),Math.min(E,u[1])],p=[Math.max(h,c[0]),Math.min(x,c[1])]}return{toPoint:(d,y,h={x:0,y:0})=>t.toPoint(r*d+e*y,o*d+i*y,h),toCoords:(d,y,h={x:0,y:0})=>(t.toCoords(d,y,h),f(h.x,h.y,h)),area:t.area,xRange:l,yRange:p,revision:`${t.revision}|m${n.join(",")}`,spills:!0}}function te(t,n,r){let e=(f,u,c)=>(n(f,u,c)||(c.x=f,c.y=u),c),o={x:0,y:0},i={x:0,y:0},s={x:0,y:0},a=1e-4;return{toPoint:(f,u,c={x:0,y:0})=>(e(f,u,c),t.toPoint(c.x,c.y,c)),toCoords:(f,u,c={x:0,y:0})=>{let l=t.toCoords(f,u),p=l.x,d=l.y;for(let y=0;y<8;y++){e(p,d,o);let h=o.x-l.x,E=o.y-l.y;if(Math.abs(h)+Math.abs(E)<1e-9)break;e(p+a,d,i),e(p,d+a,s);let x=(i.x-o.x)/a,g=(i.y-o.y)/a,m=(s.x-o.x)/a,M=(s.y-o.y)/a,S=x*M-m*g;if(!(Math.abs(S)>1e-12))break;p-=(M*h-m*E)/S,d-=(x*E-g*h)/S}return c.x=Number.isFinite(p)?p:l.x,c.y=Number.isFinite(d)?d:l.y,c},area:t.area,xRange:Yn(t.xRange),yRange:Yn(t.yRange),revision:`${t.revision}|w${r}`,curved:!0,spills:!0}}var ne=.3;function Yn([t,n]){let r=(n-t)*ne;return Number.isFinite(r)?[t-r,n+r]:[t,n]}var Dn=48;function xt(t,n,r,e,o){if(!t.curved)return[t.toPoint(n,r),t.toPoint(e,o)];let i=[];for(let s=0;s<=Dn;s++){let a=s/Dn;i.push(t.toPoint(n+(e-n)*a,r+(o-r)*a))}return i}import{expressionOps as oe}from"@motionscript/sdk";import{expressionOps as re}from"@motionscript/sdk";var qt={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},zt={atan2:{fn:Math.atan2,arity:[2,2]},pow:{fn:Math.pow,arity:[2,2]},mod:{fn:(t,n)=>t%n,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]}},zn={pi:Math.PI,PI:Math.PI,e:Math.E,E:Math.E,tau:Math.PI*2,phi:(1+Math.sqrt(5))/2},W={functions:{...Object.fromEntries(Object.keys(qt).map(t=>[t,{arity:[1,1]}])),...Object.fromEntries(Object.entries(zt).map(([t,{arity:n}])=>[t,{arity:n}]))},constants:zn,refs:"bare",unknownName:t=>`Unknown name '${t}'`};function ee(t){return{variables:t,functions:[...Object.keys(qt),...Object.keys(zt)].sort(),constants:["pi","e","tau","phi"]}}function Un(t,n,r=[]){for(let e of[...n,...r])if(Object.hasOwn(zn,e))throw new Error(`'${e}' is a constant, so it cannot be a variable`);return G(re.parse(t,W).root,n,r)}function G(t,n,r){switch(t.kind){case"const":{let{value:e}=t;return()=>e}case"ref":{let{name:e}=t,o=n.indexOf(e);if(o===0)return i=>i;if(o===1)return(i,s)=>s;if(r.includes(e))return(i,s,a)=>a?.[e]??NaN;throw new Error(W.unknownName(e))}case"unary":{let e=G(t.operand,n,r);return(o,i,s)=>-e(o,i,s)}case"binary":{let e=G(t.left,n,r),o=G(t.right,n,r);switch(t.op){case"+":return(i,s,a)=>e(i,s,a)+o(i,s,a);case"-":return(i,s,a)=>e(i,s,a)-o(i,s,a);case"*":return(i,s,a)=>e(i,s,a)*o(i,s,a);case"/":return(i,s,a)=>e(i,s,a)/o(i,s,a);case"%":return(i,s,a)=>e(i,s,a)%o(i,s,a);case"^":return(i,s,a)=>Math.pow(e(i,s,a),o(i,s,a))}break}case"call":{let e=t.args.map(s=>G(s,n,r)),o=qt[t.name];if(o){let[s]=e;return(a,f,u)=>o(s(a,f,u))}let{fn:i}=zt[t.name];if(e.length===2){let[s,a]=e;return(f,u,c)=>i(s(f,u,c),a(f,u,c))}return(s,a,f)=>i(...e.map(u=>u(s,a,f)))}}throw new Error("Unsupported expression")}var qn=A(256);function X(t,n,r=[]){let e=`${n.join(",")}|${r.join(",")}|${t}`,o=qn.get(e);if(o!==void 0)return o;let i;try{i=Un(t,n,r)}catch(s){i=s instanceof Error?s:new Error(String(s))}return qn.set(e,i),i}var ht={function:["x"],polar:["theta"],parametric:["t"],implicit:["x","y"]},Bn=A(256);function U(t,n=[]){let r=`${n.join(",")}|${t}`,e=Bn.get(r);if(e!==void 0)return e;let o;try{o=se(t.trim(),n)}catch(i){o=i instanceof Error?i:new Error(String(i))}return Bn.set(r,o),o}function Ut(t){if(t.trim()==="")return null;let n=U(t,k(t));return n instanceof Error?n.message:null}var ie=new Set(["r",...Object.values(ht).flat()]),jn=A(256);function B(t){let n=jn.get(t);if(n!==void 0)return n;let r=new Set,e=t.trim();try{for(let i of Y(e)??K(e,"="))Q(oe.parse(i.trim(),W).root,r)}catch{r.clear()}let o=[...r];return jn.set(t,o),o}function k(t){return B(t).filter(n=>!ie.has(n))}function Q(t,n){switch(t.kind){case"ref":n.add(t.name);return;case"unary":Q(t.operand,n);return;case"binary":Q(t.left,n),Q(t.right,n);return;case"call":for(let r of t.args)Q(r,n);return;default:}}function se(t,n){if(t==="")throw new Error("Empty equation");let r=(u,c)=>{let l=X(u.trim(),c,n);if(l instanceof Error)throw l;return l},e=Y(t);if(e?.length===2)return{kind:"parametric",x:r(e[0],["t"]),y:r(e[1],["t"])};let o=K(t,"=");if(o.length>2)throw new Error("An equation has one '='");if(o.length===1)return{kind:"function",of:"x",f:r(t,["x"])};let[i,s]=o,a=i.trim(),f=()=>{let u=r(i,["x","y"]),c=r(s,["x","y"]);return{kind:"implicit",f:(l,p,d)=>u(l,p,d)-c(l,p,d)}};if(a==="r")return{kind:"polar",f:r(s,["theta"])};if(a==="y"||a==="x"){let u=a==="y"?"x":"y";try{return{kind:"function",of:u,f:r(s,[u])}}catch(c){try{return f()}catch{throw c}}}return f()}function Y(t){if(!t.startsWith("(")||!t.endsWith(")"))return null;let n=0;for(let e=0;e<t.length-1;e++)if(t[e]==="(")n++;else if(t[e]===")"&&--n===0)return null;let r=K(t.slice(1,-1),",");return r.length>=2?r:null}function K(t,n){let r=[],e=0,o=0;for(let i=0;i<t.length;i++){let s=t[i];s==="("?e++:s===")"?e--:s===n&&e===0&&(r.push(t.slice(o,i)),o=i+1)}return r.push(t.slice(o)),r}function J(t){return typeof t=="string"?{source:t}:t??{source:""}}function Z(t,n,r){return r<=0||t.source===n.source?r<=0?t:n:r>=1?n:{source:n.source,blend:{from:t.source,t:r}}}function tt(t,n,r){return!t||!n?r<1?t:n:[t[0]+(n[0]-t[0])*r,t[1]+(n[1]-t[1])*r]}var Bt=1;function nt(t,n,r){let e={...t};for(let[o,i]of Object.entries(n)){let s=t[o]??Bt;e[o]=s+(i-s)*r}return e}function F(t,n){let r=null;for(let e of t)typeof n[e]!="number"&&((r??={...n})[e]=Bt);return r??n}function ae(t){let n=2166136261;for(let r=0;r<t.length;r++)n^=t.charCodeAt(r),n=Math.imul(n,16777619);return n>>>0}var dt=["functionPlot","tracedPath"];function ce(t,n){let{source:r,blend:e}=t.expression,o=t.graph?t:ue,i=$n(r,t.params,n-o.x)+o.y;if(!e)return i;let s=$n(e.from,t.params,n-o.x)+o.y;return s+(i-s)*e.t}function jt(t){return typeof t=="object"&&t!==null&&dt.includes(t.key??"")}var ue={x:0,y:0};function $n(t,n,r){let e=U(t,k(t));return e instanceof Error||e.kind!=="function"||e.of!=="x"?NaN:e.f(r,0,F(k(t),n))}var D=Gn(null,"mathSystem"),yt=Gn(null,"mathPlot"),Gt=Ht.custom(null,{private:!0,inherit:t=>t(D)}),Wt=Ht.custom(null,{private:!0,inherit:t=>t(yt)??t(D)}),fe=Ht.custom("",{kind:"nodeRef",nodeTypes:["functionPlot"],animatable:!1}),Wn=new Map,$t=class{map=z;curves=Wn;enclosing=null},Vt=class{parent;enclosing;constructor(n,r){this.parent=n,this.enclosing=r}get map(){return this.parent?.map??z}get curves(){return this.parent?.curves??Wn}},Vn=new WeakMap,Hn=new WeakMap;function gt(t){let n=Vn.get(t);return n||Vn.set(t,n=new $t),n}function Qt(t,n,r){t.map=n;let e=new Map;Qn(r,e),t.curves=e}function Mt(t,n){let r=Hn.get(t);return(!r||r.parent!==n)&&Hn.set(t,r=new Vt(n,t)),r}function le(t,n,r=!0){if(!t)return jt(n)?n.state:null;let e=Et(n);return(e===""?void 0:t.curves.get(e))??(r?t.enclosing:null)}function Et(t){return typeof t=="string"?t:typeof t=="object"&&t!==null&&typeof t.id=="string"?t.id:""}function Qn(t,n){for(let r of t)r.id!==""&&dt.includes(r.key)&&n.set(r.id,r.state),Qn(r.children,n)}function rt(t,n=!1){let r=[];for(let e of t)if(!(e.length<2)){r.push({type:"M",x:e[0].x,y:e[0].y});for(let o=1;o<e.length;o++)r.push({type:"L",x:e[o].x,y:e[o].y});n&&r.push({type:"Z"})}return r}function C(t){let n=1/0,r=1/0,e=-1/0,o=-1/0;for(let i of t)if(!(i.length<2))for(let s of i)s.x<n&&(n=s.x),s.x>e&&(e=s.x),s.y<r&&(r=s.y),s.y>o&&(o=s.y);return n<=e?{minX:n,minY:r,maxX:e,maxY:o}:null}function pe(t,n){return{minX:t.minX-n,minY:t.minY-n,maxX:t.maxX+n,maxY:t.maxY+n}}function v(t,n,r){return t<n?n:t>r?r:t}function me(t){let n={};if(!t)return n;for(let r of Object.keys(t))t[r]!==void 0&&(n[r]=t[r]);return n}import{Graphics2D as xe}from"@motionscript/sdk";var Kn={x:0,y:0},Jn=[];function Kt(t,n){return Jn.push({is:r=>t.is(r),trace:n}),t}function Jt(t,n,r){let e=Jn.find(i=>i.is(t));if(!e)return;let o=t.state;return e.trace(o,{map:n,shift:{x:o.x,y:o.y},plane:r})}function j(t){let n=t.graph;return n?{map:n.map,shift:{x:t.x,y:t.y},plane:n}:{map:z,shift:Kn,plane:null}}function Zt(t){let n=C(t);return n?{width:n.maxX-n.minX,height:n.maxY-n.minY}:{width:0,height:0}}function $(t){let n=C(t);return n?{x:(n.minX+n.maxX)/2,y:(n.minY+n.maxY)/2}:Kn}function he(t,n,r){let e=t.map.toPoint(r.x+t.shift.x,r.y+t.shift.y),o=$(n);return{x:e.x-o.x,y:e.y-o.y}}function de(t,n,r){let e=$(n),o=t.map.toCoords(r.x+e.x,r.y+e.y);return{x:o.x-t.shift.x,y:o.y-t.shift.y}}var tn=[];function Zn(t,n,r=!1){let e=C(t),o=rt(t,r);if(!e||o.length===0)return null;let i=[e.minX,e.minY,e.maxX,e.maxY];return()=>new xe().path({data:o,centerBounds:i,start:n.start??0,end:n.end??1})}function et(t,n,r,e={}){let o=Zn(r,n,e.closed),i=n.fill??tn;bt(t,()=>{o&&e.fills!==!1&&t.draw(o().shadow(n.shadow).fill(i));let s=e.ink?C(r):null;s&&e.ink?e.ink(t,s):o&&tr(t,o,n)})}function tr(t,n,r){let e=r.stroke??tn;e.length!==0&&t.draw(nr(r)?n().shadow(r.shadow).stroke(e):n().stroke(e))}function nr(t){return t.shadow.length===0?!1:!(t.fill??tn).some(n=>(n.opacity??1)>0)}var rr=[];function ye(t,n){return rr.push({is:r=>t.is(r),anchor:n}),t}function ot(t,n,r,e,o){return t.map(i=>{let s=Jt(i,n,o);if(s){let c=C(s),l=c?(c.minX+c.maxX)/2:r.x,p=c?(c.minY+c.maxY)/2:r.y;return{x:l-r.x,y:p-r.y,width:c?c.maxX-c.minX:0,height:c?c.maxY-c.minY:0,plane:Me(n,l,p)}}let a=i.measure({width:e.width,height:e.height}),f=rr.find(c=>c.is(i)),u=f?f.anchor(i.state,o):null;return{x:-r.x,y:-r.y,width:a.width,height:a.height,plane:ge(n,u)}})}function it(t,n){return{toOffset:(r,e)=>{let o=t.toPoint(r,e);return{x:o.x-n.x,y:o.y-n.y}},toCoords:(r,e)=>t.toCoords(r+n.x,e+n.y)}}function ge(t,n){let r={x:0,y:0};return{toOffset:(e,o)=>{let i=n?.(e,o);return i?t.toPoint(i.x,i.y,r):t.toPoint(e,o,r)},toCoords:(e,o)=>t.toCoords(e,o)}}function Me(t,n,r){let e={x:0,y:0};return{toOffset:()=>e,toCoords:(o,i)=>t.toCoords(n+o,r+i)}}var ir={x:0,y:0};function sr(t,n){let r=or.insetBounds(t.width,t.height,n);return{minX:r.x-r.width/2,maxX:r.x+r.width/2,minY:-r.y-r.height/2,maxY:-r.y+r.height/2}}function st(t,n,r){return r(sr(t,n.padding),n)}function nn(t){let{left:n,right:r,top:e,bottom:o}=t.padding;return{width:n+r,height:e+o}}function rn(t){return[Se(D,gt(t))]}function en(t,n,r,e){let o=st(t,n,e),i=gt(n);Qt(i,o,r);let s=or.insetBounds(t.width,t.height,n.padding);return ot(r,o,ir,s,i)}function on(t,n,r){return it(st(t,n,r),ir)}function sn(t,n,r,e){let{width:o,height:i}=t.size,{minX:s,minY:a,maxX:f,maxY:u}=r.area,c=new er().rect({x:(s+f)/2,y:(a+u)/2,width:f-s,height:u-a});t.inFront(()=>{t.draw(new er().rect({x:0,y:0,width:o,height:i}).shadow(n.shadow).fill(n.fill));let l=e(r);r.spills?t.clip(c,()=>t.draw(l)):t.draw(l)}),Ee.draw(t,n,null,{clipShape:c})}import{component2d as Fe,Graphics2D as fr,Types as O}from"@motionscript/sdk";import{niceStep as we}from"@motionscript/sdk/component";var cr=200,Ae=64;function St(t,n,r,e="linear"){let[o,i]=t;if(e==="log")return Te(o,i);let s=i-o;if(!(s>0))return{values:[],step:1};let a=n>0?n:we(Ae/Math.max(1,r)*s);return{values:Oe(o,i,a),step:a}}function Te(t,n){let r=[];for(let e=Math.ceil(Math.log10(t)-1e-9);e<=Math.floor(Math.log10(n)+1e-9)&&r.length<cr;e++)r.push(10**e);return{values:r,step:0}}function Oe(t,n,r){let e=Math.ceil(t/r-1e-9),i=Math.floor(n/r+1e-9)-e+1;if(!Number.isFinite(i)||i<=0||i>cr)return[];let s=new Array(i);for(let a=0;a<i;a++)s[a]=(e+a)*r;return s}function an(t){return Math.floor(Math.log10(t)+1e-12)}function wt(t,n){if(t===0)return"0";if(!Number.isFinite(t))return"";if(!(n>0)){let s=an(Math.abs(t));return s>=6||s<=-5?ar(t.toExponential(0)):String(Number(t.toPrecision(12)))}let r=an(Math.abs(t)),e=Math.max(1,r-an(n)+1);if((r>=6||r<=-5)&&e<=6)return ar(t.toExponential(e-1));let o=Pe(n),i=t.toFixed(o);return o>0?i.replace(/\.?0+$/,""):i}function Pe(t){for(let n=0;n<12;n++){let r=t*10**n;if(Math.abs(r-Math.round(r))<1e-9*Math.max(1,r))return n}return 12}function ar(t){let[n,r]=t.split("e");return`${n.replace(/\.?0+$/,"")}e${Number(r)}`}import{Fills as ke,Graphics2D as ur,toPathString as Ie}from"@motionscript/sdk";var At="#9ca3af",cn="#58a6ff";function un(t){return t.map(n=>({...n,startCap:void 0,endCap:void 0}))}var Ne=8,fn=/^\$([\s\S]+)\$$/;function Le(t,n){n.some(r=>fn.test(r.trim()))&&t.loader(ft,lt,{gate:"layout"})}function ln(t,n){n.some(r=>fn.test(r.trim()))&&t.task(ft,lt,{before:"layout"})}function pn(t,n){let r=[],e=ke.color(n.color),o=new ur,i=n.fontSize*Ne,s=!1;for(let a of t){let f=fn.exec(a.text.trim()),u=f?_e(f[1],a,n.fontSize):null;if(u){for(let p of u)r.push(p.fill(e));continue}let{at:c,align:l}=a;s=!0,o.text({text:a.text,fontSize:n.fontSize,...n.fontFamily===""?{}:{fontFamily:n.fontFamily},wrap:!1,width:i,textAlign:l,x:l==="center"?c.x:l==="right"?c.x-i/2:c.x+i/2,y:c.y})}return s&&r.push(o.fill(e)),r}function _e(t,{at:n,align:r},e){let o;try{o=Ct(t,e)}catch(l){return l instanceof Ft?[]:null}let[i,s,a,f]=o.bounds,u=n.x+(r==="left"?o.width/2:r==="right"?-o.width/2:0),c=[i-u,s+n.y,a-u,f+n.y];return o.tokens.map(l=>new ur().path({data:Ie(l.path),centerBounds:c}))}function mn(t,n,r){return t>=n-1e-9&&t<=r+1e-9}function xn(t,n,r){let e=r.x-n.x,o=r.y-n.y,i=e*e+o*o;return i===0?0:((t.x-n.x)*e+(t.y-n.y)*o)/i}function hn(t,n,r){return[t[0]+(n[0]-t[0])*r,t[1]+(n[1]-t[1])*r]}function dn(t,n){let[r,e]=Array.isArray(t)?t:n??[0,1];return[Number(r),Number(e)]}var lr=t=>O.custom(t,{resolve:dn,lerp:hn}),pr={...L,xRange:lr([-5,5]),yRange:lr([-3,3]),xStep:O.number(0,{min:0}),yStep:O.number(0,{min:0}),xScaling:pt(["linear","log"],"linear",{animatable:!1}),yScaling:pt(["linear","log"],"linear",{animatable:!1}),squareUnits:O.boolean(!1,{animatable:!1}),ticks:O.boolean(!0,{animatable:!1}),tickSize:O.number(10,{min:0,unit:"px"}),labels:O.boolean(!0,{animatable:!1}),labelSize:O.number(18,{min:1,unit:"px"}),labelColor:O.color(At),fontFamily:O.text("",{animatable:!1}),xLabel:O.text("",{animatable:!1}),yLabel:O.text("",{animatable:!1})},mr={..._,rangeTo:{args:["xRange","yRange"]}};function xr(t,n){n.fontFamily!==""&&t.font(n.fontFamily),ln(t,[n.xLabel,n.yLabel])}function Tt(t,n){let r=mt(n.xRange,n.xScaling),e=mt(n.yRange,n.yScaling),o=t.maxX-t.minX;if(n.squareUnits&&n.xScaling==="linear"&&n.yScaling==="linear"&&o>0){let i=(r[1]-r[0])*(t.maxY-t.minY)/o,s=(e[0]+e[1])/2;i>0&&(e=[s-i/2,s+i/2])}return vt({xRange:r,yRange:e,area:t,xScaling:n.xScaling,yScaling:n.yScaling})}function hr(t,n){let[r,e]=t.xRange,[o,i]=t.yRange,s=n.xScaling==="log"?r:v(0,r,e),a=n.yScaling==="log"?o:v(0,o,i),f=t.toPoint(r,a),u=t.toPoint(e,a),c=t.toPoint(s,o),l=t.toPoint(s,i);return[{from:f,to:u,line:xt(t,r,a,e,a),marks:St(t.xRange,n.xStep,Math.hypot(u.x-f.x,u.y-f.y),n.xScaling),crossing:s,at:p=>t.toPoint(p,a)},{from:c,to:l,line:xt(t,s,o,s,i),marks:St(t.yRange,n.yStep,Math.hypot(l.x-c.x,l.y-c.y),n.yScaling),crossing:a,at:p=>t.toPoint(s,p)}]}function dr(t,n,r=()=>[]){let e=n.stroke,{start:o,end:i}=n,[s,a]=hr(t,n),f=[...r(s,a)];if(e.length===0&&!n.labels)return f;e.length>0&&f.push(new fr().line({points:s.line,radius:0,start:o,end:i}).line({points:a.line,radius:0,start:o,end:i}).stroke(e));let u=n.tickSize/2,c=u+n.labelSize*.35,l=new fr,p=[],d=!1,y=(h,E)=>{for(let x of h.marks.values){if(Math.abs(x-h.crossing)<1e-9*Math.max(1,Math.abs(x)))continue;let g=h.at(x);mn(xn(g,h.from,h.to),o,i)&&(n.ticks&&u>0&&(l.line({points:E?[{x:g.x,y:g.y-u},{x:g.x,y:g.y+u}]:[{x:g.x-u,y:g.y},{x:g.x+u,y:g.y}],radius:0}),d=!0),n.labels&&p.push(E?{text:wt(x,h.marks.step),at:{x:g.x,y:g.y-c-n.labelSize/2},align:"center"}:{text:wt(x,h.marks.step),at:{x:g.x-c,y:g.y},align:"right"}))}};return y(s,!0),y(a,!1),d&&e.length>0&&f.push(l.stroke(un(e))),n.xLabel!==""&&i>=1&&p.push({text:n.xLabel,at:{x:s.to.x,y:s.to.y+c+n.labelSize/2},align:"right"}),n.yLabel!==""&&i>=1&&p.push({text:n.yLabel,at:{x:a.to.x+c,y:a.to.y-n.labelSize/2},align:"left"}),f.push(...pn(p,{fontSize:n.labelSize,fontFamily:n.fontFamily,color:n.labelColor})),f}var Ce=Fe({key:"axes2d",state:pr,defaults:{stroke:{weight:2,fill:At,align:"center",endCap:"triangle",capScale:5}},load:(t,n)=>xr(t,n),commands:mr,provide:t=>rn(t),measure:(t,n)=>nn(n),layout:(t,n,r)=>en(t,n,r,Tt),plane:(t,n)=>on(t,n,Tt),render:(t,n)=>sn(t,n,st(t.size,n,Tt),r=>dr(r,n))});var yr=[],Ot=0;function be(){let t=yr[Ot];return t===void 0&&(t=yn(),yr.push(t)),Ot++,t}function yn(){return{t:0,px:0,py:0,rx:0,ry:0,ok:!1}}var at={x:0,y:0};function Mn(t,n,r,e,{seeds:o=256,minStep:i=0}={}){if(!(r>n)||!Number.isFinite(n)||!Number.isFinite(r))return[];let s=new gn(e),a=0,f=(x,g)=>{let m=t(g,at);a++;let M=m&&Number.isFinite(at.x)&&Number.isFinite(at.y);return x.t=g,x.rx=M?at.x:0,x.ry=M?at.y:0,x.px=gr(x.rx),x.py=gr(x.ry),x.ok=M,x},u=x=>f(be(),x),c=(x,g)=>{let m=x,M=g.t;for(let S=0;S<60&&!(a>=4e4||Ye(m,e));S++){let w=(m.t+M)/2;if(w===m.t||w===M)break;let T=u(w);if(!T.ok){M=w;continue}let N=Math.abs(T.px-m.px)<.25&&Math.abs(T.py-m.py)<.25;if(m=T,N)break}return m},l=(x,g,m,M)=>{if(x.ok&&m.ok){M&&Xe(x,g,m,e)?s.break():s.draw(x,m);return}if(x.ok){let S=c(x,m);S.t!==x.t&&s.draw(x,S),s.break();return}if(s.break(),m.ok){let S=c(m,x);S.t!==m.t?s.draw(S,m):s.start(m)}},p=(x,g,m)=>{if(a>=4e4||s.points>=24e3){l(x,null,g,!1);return}let M=u((x.t+g.t)/2),S=m>=12||g.t-x.t<=i;if(S||Re(x,M,g)){l(x,M,g,S);return}p(x,M,m+1),p(M,g,m+1)},d=Math.max(1,Math.round(o)),y=(r-n)/d,h=[yn(),yn()],E=f(h[0],n);for(let x=1;x<=d;x++){let g=f(h[x&1],x===d?r:n+x*y);Ot=0,p(E,g,0),E=g}return Ot=0,s.finish()}function Re(t,n,r){if(t.ok!==n.ok||n.ok!==r.ok)return!1;if(!t.ok)return!0;let e=r.px-t.px,o=r.py-t.py,i=Math.hypot(e,o)||1;if(Math.abs((n.px-t.px)*o-(n.py-t.py)*e)/i>.25)return!1;let s=Math.abs(Math.atan2(n.py-t.py,n.px-t.px)-Math.atan2(r.py-n.py,r.px-n.px));return s>Math.PI&&(s=2*Math.PI-s),s<.05}function Xe(t,n,r,e){return!(t.py>e.maxY&&r.py<e.minY||t.py<e.minY&&r.py>e.maxY||t.px>e.maxX&&r.px<e.minX||t.px<e.minX&&r.px>e.maxX)||n===null?!1:n.ok?n.ry<Math.min(t.ry,r.ry)||n.ry>Math.max(t.ry,r.ry)||n.rx<Math.min(t.rx,r.rx)||n.rx>Math.max(t.rx,r.rx):!0}function Ye(t,n){return t.py>n.maxY||t.py<n.minY||t.px>n.maxX||t.px<n.minX}function gr(t){return t>16e3?16e3:t<-16e3?-16e3:t}var gn=class{clip;points=0;runs=[];open=[];cursor=null;constructor(n){this.clip=n}draw(n,r){let e=qe(n.px,n.py,r.px,r.py,this.clip);if(!e){this.break();return}let[o,i]=e;this.cursor&&De(this.cursor,o)?this.push(i):(this.break(),this.push(o),this.push(i)),this.cursor=i}start(n){this.break(),ve(n.px,n.py,this.clip)&&(this.cursor={x:n.px,y:n.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(n){this.open.push(n),this.points++}};function De(t,n){return Math.abs(t.x-n.x)<.1&&Math.abs(t.y-n.y)<.1}function ve(t,n,r){return t>=r.minX&&t<=r.maxX&&n>=r.minY&&n<=r.maxY}function qe(t,n,r,e,o){let i=r-t,s=e-n,a=0,f=1,u=[[-i,t-o.minX],[i,o.maxX-t],[-s,n-o.minY],[s,o.maxY-n]];for(let[c,l]of u){if(c===0){if(l<0)return null;continue}let p=l/c;if(c<0){if(p>f)return null;p>a&&(a=p)}else{if(p<a)return null;p<f&&(f=p)}}return[{x:t+a*i,y:n+a*s},{x:t+f*i,y:n+f*s}]}import{commandsFor as ze,pathOps as Ue,Types as b}from"@motionscript/sdk";function wr(t){return typeof t.partBounds=="function"||Rt(t)}function Be(t,n,r){return typeof t.partBounds=="function"?t.partBounds(n,r):Xt(t,n,r)??null}var Mr=({on:t,part:n,occurrence:r})=>({on:t,part:n,occurrence:r});function Ar(t,n,r){return r<=0||!n?r<1?t:n:{...Mr(n),from:t?Mr(t):null,t:r}}var je=b.custom("",{kind:"nodeRef",animatable:!1}),Er=b.custom("",{kind:"nodeRef",private:!0}),Tr={...I(L,"fill"),on:je,part:b.text("",{animatable:!1}),occurrence:b.number(1,{min:1,step:1,animatable:!1}),retarget:b.custom(null,{lerp:Ar}),retargetOn:Er,retargetFrom:Er},$e={...I(_,"fillTo"),...ze(Tr,{retargetTo:{args:{on:b.custom(void 0,{kind:"nodeRef"}),part:b.custom(void 0,{kind:"text"}),occurrence:b.number(1,{min:1,step:1})},run:(t,n)=>{let r=t.args,e=n.retarget??Ve(n),o={on:r.on??e.on,part:r.part??(r.on?"":e.part),occurrence:r.occurrence??1,t:1},i=n.retarget;return t.animate(s=>{let a=Ar(i,o,s);return{retarget:a,retargetOn:a?.on??"",retargetFrom:a?.from?.on??""}})}}})};function Ve(t){return{on:Et(t.on),part:t.part,occurrence:t.occurrence}}var Sr=new WeakMap;function He(t,n){if(!t)return Sr.get(n)??null;let r=t.ancestor(Yt)??t.ancestor(Rn),e=r&&wr(r.state)?r:null;return Sr.set(n,e),e}function Or(t,n){return t.on??n}function Ge(t,n){let r=t.retarget,e=()=>En(Or(t,n),t);if(!r)return e();let o=En(r.on===""?n:t.retargetOn,r),i=r.from?En(r.from.on===""?n:t.retargetFrom,r.from):e();return!i||!o||r.t>=1?o??i:We(i,o,r.t)}function En(t,n){if(!t)return null;let r=n.part&&wr(t.state)?Be(t.state,n.part,n.occurrence||1):{x:0,y:0,width:t.size.width,height:t.size.height};if(!r)return null;let e=t.frame,o=e.rotation*Math.PI/180,i=Math.cos(o),s=Math.sin(o),a=(c,l)=>({x:e.x+(i*c+s*l)*e.scale,y:e.y+(-s*c+i*l)*e.scale}),f=r.width/2,u=r.height/2;return[a(r.x-f,r.y+u),a(r.x+f,r.y+u),a(r.x+f,r.y-u),a(r.x-f,r.y-u)]}function We(t,n,r){return t.map((e,o)=>({x:e.x+(n[o].x-e.x)*r,y:e.y+(n[o].y-e.y)*r}))}function Qe(t){let n=Ue.bounds(t);return n?{x:(n.minX+n.maxX)/2,y:(n.minY+n.maxY)/2,width:n.maxX-n.minX,height:n.maxY-n.minY}:{x:0,y:0,width:0,height:0}}var Ke=[-1,-1,1,1],P=(t,n,r=1)=>({x:t.x+n.x*r,y:t.y+n.y*r}),Sn=(t,n,r=.5)=>({x:t.x+(n.x-t.x)*r,y:t.y+(n.y-t.y)*r});function ct(t,n){let r=n.x-t.x,e=n.y-t.y,o=Math.hypot(r,e);return{unit:o===0?{x:1,y:0}:{x:r/o,y:e/o},length:o}}function Je(t,n){let[r,e,o,i]=t,s=ct(r,e).unit,a=ct(i,r).unit;return[P(P(r,s,-n),a,n),P(P(e,s,n),a,n),P(P(o,s,n),a,-n),P(P(i,s,-n),a,-n)]}var ut=["x","y"],Ze=new Set(ut),Pr=A(128);function V(t){return B(t).filter(n=>!Ze.has(n))}function Pt(t,n=[]){let r=`${n.join(",")}|${t}`,e=Pr.get(r);if(e!==void 0)return e;let o;try{let i=t.trim();if(i==="")throw new Error("Empty equation");let s=Y(i);if(s?.length!==2)throw new Error("A field has two parts: (x, y)");let[a,f]=s.map(u=>{let c=X(u.trim(),ut,n);if(c instanceof Error)throw c;return c});o={x:a,y:f}}catch(i){o=i instanceof Error?i:new Error(String(i))}return Pr.set(r,o),o}function wn(t){if(t.trim()==="")return null;let n=Pt(t,V(t));return n instanceof Error?n.message:null}var q={height:["x","y"],surface:["u","v"],spaceCurve:["t"]},to=new Set(["x","y","z","u","v"]),no=new Set(["t"]),ro=A(128),eo=A(128);function An(t){return B(t).filter(n=>!to.has(n))}function Tn(t){return B(t).filter(n=>!no.has(n))}function kr(t,n=[]){return Fr(ro,t,n,r=>{let e=_r(n),o=Y(r);if(o){if(o.length!==3)throw new Error("A parametric surface has three parts: (x, y, z)");let[s,a,f]=o.map(u=>e(u,q.surface));return{kind:"parametric",x:s,y:a,z:f}}let i=K(r,"=");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:e(i[i.length-1],q.height)}})}function Ir(t,n=[]){return Fr(eo,t,n,r=>{let e=_r(n),o=Y(r);if(o?.length!==3)throw new Error("A space curve has three parts: (x, y, z)");let[i,s,a]=o.map(f=>e(f,q.spaceCurve));return{x:i,y:s,z:a}})}function Nr(t){if(t.trim()==="")return null;let n=kr(t,An(t));return n instanceof Error?n.message:null}function Lr(t){if(t.trim()==="")return null;let n=Ir(t,Tn(t));return n instanceof Error?n.message:null}function _r(t){return(n,r)=>{let e=X(n.trim(),r,t);if(e instanceof Error)throw e;return e}}function Fr(t,n,r,e){let o=`${r.join(",")}|${n}`,i=t.get(o);if(i!==void 0)return i;let s;try{let a=n.trim();if(a==="")throw new Error("Empty equation");s=e(a)}catch(a){s=a instanceof Error?a:new Error(String(a))}return t.set(o,s),s}var oo={equation:{error:Ut,params:k,variables:[...new Set(Object.values(ht).flat())]},surfaceEquation:{error:Nr,params:An,variables:[...q.height,...q.surface]},spaceCurveEquation:{error:Lr,params:Tn,variables:q.spaceCurve},fieldEquation:{error:wn,params:V,variables:ut}};import{createContext as io,Types as so}from"@motionscript/sdk";function ao(t,n,r,e){let o=On(t,e.x),i=On(n,e.y),s=On(r,e.z),a=(t[0]+t[1])/2,f=(n[0]+n[1])/2,u=(r[0]+r[1])/2;return{xRange:t,yRange:n,zRange:r,revision:[t,n,r,e.x,e.y,e.z].join("|"),toLocal:(c,l,p)=>({x:(l-f)*i,y:(p-u)*s,z:(c-a)*o}),offset:(c,l,p)=>({x:l*i,y:p*s,z:c*o})}}function On([t,n],r){let e=n-t;return e>0?r/e:0}var Pn=io(null,"math:graph3d");function co(){return so.custom(null,{private:!0,inherit:t=>t(Pn)})}function uo(t){return t.graph?.space()??null}function fo(t){return t.useContext(Pn)?.space()??null}function lo(t){let n=Math.hypot(t.x,t.y,t.z);if(!(n>0))return{x:0,y:0,z:0,w:1};let r=t.x/n,e=t.y/n,o=t.z/n;if(e<-1+1e-9)return{x:1,y:0,z:0,w:0};let i=1+e,s=Math.hypot(o,r,i);return{x:o/s,y:0,z:-r/s,w:i/s}}import{Material as po,Types as Cr}from"@motionscript/sdk";var mo={geometry:Cr.custom(void 0),...po.state};function xo(t,n){return Cr.custom(null,{lerp:tt,kind:"range",defaultMin:t,defaultMax:n})}import{Fills as ho,Graphics2D as yo,Mat as go,Tex as Mo}from"@motionscript/sdk";var kt=64,kn=96,br=A(256);function Eo(t,n){let r=`${n.fontFamily}|${JSON.stringify(n.color)}|${t}`,e=br.get(r);if(e)return e;let o=Math.min(1024,Math.max(128,Math.ceil((t.length*kt*.62+kt)/32)*32)),i=new yo().text({text:t,fontSize:kt,...n.fontFamily===""?{}:{fontFamily:n.fontFamily},wrap:!1,width:o,textAlign:"center"}).fill(ho.color(n.color)),a={texture:{...Mo.surface(i,{width:o,height:kn}),static:!0,identity:`label3d:${r}`},width:o};return br.set(r,a),a}function So(t,n,r,e){if(n===""||!(e.size>0))return;let{texture:o,width:i}=Eo(n,e),s=e.size*kn/kt;t.sprite({material:go.sprite({map:o,transparent:!0,depthWrite:!1}),position:r,scale:[s*i/kn,s,1]})}import{component2d as wo,provides as Ao,Types as Nn}from"@motionscript/sdk";function In(t,[n,r],[e,o],i,s){if(!(r>n)||!(o>e)||i<1||s<1)return[];let a=(r-n)/i,f=(o-e)/s,u=i+1,c=new Float64Array(u*(s+1));for(let m=0;m<=s;m++)for(let M=0;M<=i;M++)c[m*u+M]=t(n+M*a,e+m*f);let l=new Map,p=u*(s+1),d=(m,M,S)=>{let w=c[M*u+m],T=S?c[(M+1)*u+m]:c[M*u+m+1];if(!Number.isFinite(w)||!Number.isFinite(T)||w<0==T<0)return null;let N=(S?p:0)+M*u+m;if(!l.has(N)){let R=w/(w-T);l.set(N,S?{x:n+m*a,y:e+(M+R)*f}:{x:n+(m+R)*a,y:e+M*f})}return N},y=new Map,h=(m,M)=>{m===null||M===null||((y.get(m)??y.set(m,[]).get(m)).push(M),(y.get(M)??y.set(M,[]).get(M)).push(m))};for(let m=0;m<s;m++)for(let M=0;M<i;M++){let S=d(M,m,!1),w=d(M,m+1,!1),T=d(M,m,!0),N=d(M+1,m,!0),R=[S,N,w,T].filter(_t=>_t!==null);if(R.length===2)h(R[0],R[1]);else if(R.length===4){let _t=t(n+(M+.5)*a,e+(m+.5)*f),jr=c[m*u+M];_t<0==jr<0?(h(S,N),h(w,T)):(h(S,T),h(w,N))}}let E=[],x=new Set,g=m=>{let M=[l.get(m)];x.add(m);let S=m;for(;;){let w=(y.get(S)??[]).find(T=>!x.has(T));if(w===void 0)break;x.add(w),M.push(l.get(w)),S=w}return M};for(let[m,M]of y)M.length===1&&!x.has(m)&&E.push(g(m));for(let m of y.keys()){if(x.has(m))continue;let M=g(m);M.push(M[0]),E.push(M)}return E.filter(m=>m.length>1)}var To=Math.PI*2,Yr={...I(L,"fill"),expression:Nn.custom("",{resolve:J,lerp:Z,kind:"equation"}),domain:Nn.custom(null,{lerp:tt,kind:"range",defaultMin:-5,defaultMax:5}),params:Nn.custom({},{lerp:nt}),graph:Gt},Dr={...I(_,"fillTo"),morphTo:{args:["expression"]},paramsTo:{args:["params"]},domainTo:{args:["domain"]}},vr={weight:3,fill:cn,align:"center",cap:"round",join:"round"},Oo=Kt(wo({key:"functionPlot",state:Yr,defaults:{stroke:vr,width:"hug",height:"hug"},commands:Dr,provide:(t,n)=>[Ao(yt,Mt(t,n(D)))],measure:(t,n)=>Zt(H(n,j(n),n.domain)),layout:(t,n,r)=>{let e=j(n);return ot(r,e.map,$(H(n,e,n.domain)),t,Mt(n,n.graph))},plane:(t,n)=>{let r=j(n);return it(r.map,$(H(n,r,n.domain)))},render:(t,n)=>et(t,n,H(n,j(n),n.domain))}),(t,n)=>H(t,n,t.domain)),Rr=A(256);function H(t,n,r){let{map:e,shift:o}=n,{area:i}=e;if(!Number.isFinite(i.maxX-i.minX))return[];let{source:s,blend:a}=t.expression,f=[s,a?.from,a?.t,e.revision,r,JSON.stringify(t.params),o.x,o.y].join("|"),u=Rr.get(f);if(u)return u;let c,l=a&&a.t<.5?a.from:s;if(It(s)?.kind==="implicit"||a&&It(a.from)?.kind==="implicit")c=Po(l,t.params,e,o);else{let p=Xr(s,t.params,r,e,o);if(p&&a){let y=Xr(a.from,t.params,r,e,o);y&&(p=No(y,p,a.t))}let d=i.maxX-i.minX;c=p?Mn(p,0,1,i,{seeds:Math.min(512,Math.max(64,Math.round(d/8))),minStep:.5/Math.max(1,d)}):[]}return Rr.set(f,c),c}function It(t){let n=U(t,k(t));return n instanceof Error?null:n}function Po(t,n,r,e){let o=It(t);if(o?.kind!=="implicit")return[];let i=F(k(t),n),{area:s}=r,a=c=>Math.min(Io,Math.max(8,Math.round(c/ko))),{f}=o;return In((c,l)=>f(c-e.x,l-e.y,i),r.xRange,r.yRange,a(s.maxX-s.minX),a(s.maxY-s.minY)).map(c=>c.map(l=>r.toPoint(l.x,l.y)))}function Xr(t,n,r,e,o){let i=It(t);if(!i||i.kind==="implicit")return null;let s=F(k(t),n);switch(i.kind){case"function":{let a=i.of==="x",[f,u]=a?e.xRange:e.yRange,c=a?o.x:o.y,l=Math.max(f-c,r?.[0]??-1/0),p=Math.min(u-c,r?.[1]??1/0);if(!(p>l))return null;let{f:d}=i;return(y,h)=>{let E=l+(p-l)*y,x=d(E,0,s);return Number.isFinite(x)?(a?e.toPoint(E+o.x,x+o.y,h):e.toPoint(x+o.x,E+o.y,h),!0):!1}}case"polar":{let[a,f]=r??[0,To],{f:u}=i;return(c,l)=>{let p=a+(f-a)*c,d=u(p,0,s);return Number.isFinite(d)?(e.toPoint(d*Math.cos(p)+o.x,d*Math.sin(p)+o.y,l),!0):!1}}case"parametric":{let[a,f]=r??[0,1],{x:u,y:c}=i;return(l,p)=>{let d=a+(f-a)*l,y=u(d,0,s),h=c(d,0,s);return!Number.isFinite(y)||!Number.isFinite(h)?!1:(e.toPoint(y+o.x,h+o.y,p),!0)}}}}var ko=5,Io=220;function No(t,n,r){let e={x:0,y:0};return(o,i)=>!t(o,e)||!n(o,i)?!1:(i.x=e.x+(i.x-e.x)*r,i.y=e.y+(i.y-e.y)*r,!0)}import{Graphics2D as Co,Types as Nt}from"@motionscript/sdk";import{colorOps as Ln,fillOps as _n}from"@motionscript/sdk";function Lo(t){return(t??[]).map(n=>Ln.resolve(n))}function _o(t,n,r){return t.length!==n.length?r<1?t:n:n.map((e,o)=>Ln.lerp(t[o],e,r))}function Fo(t,n){if(t.length===1)return t[0];let r=v(n,0,1)*(t.length-1),e=Math.min(t.length-2,Math.floor(r));return Ln.lerp(t[e],t[e+1],r-e)}function Fn(t){return(Array.isArray(t)?t:[]).map(n=>_n.resolve(n??[]))}function Cn(t,n,r){return t.length!==n.length?r<1?t:n:n.map((e,o)=>_n.lerp(t[o],e,r))}function bn(t,n){if(t.length===1)return t[0];let r=v(n,0,1)*(t.length-1),e=Math.min(t.length-2,Math.floor(r));return _n.lerp(t[e],t[e+1],r-e)}var Lt=12,bo={...I(L,"fill","start","end"),expression:Nt.custom("",{resolve:J,lerp:Z,kind:"fieldEquation"}),params:Nt.custom({},{lerp:nt}),strengthFills:Nt.custom([],{resolve:Fn,lerp:Cn,kind:"vector"}),maxMagnitude:Nt.number(0,{min:0,step:.1}),graph:Wt},Ro={...I(_,"fillTo","progressTo","flash"),morphTo:{args:["expression"]},paramsTo:{args:["params"]}},qr=A(64),Xo={drawn:[],runs:[]};function Yo(t,n,r,{map:e,shift:o}){let{area:i}=e;if(!Number.isFinite(i.maxX-i.minX))return Xo;let{source:s,blend:a}=r.expression,f=[t,s,a?.from,a?.t,e.revision,JSON.stringify(r.params),o.x,o.y,n.own(r)].join("|"),u=qr.get(f);if(u)return u;let c=vo(r,o),l=c?n.strokes(r,e,c):[],p={drawn:l,runs:l.flatMap(d=>d.runs)};return qr.set(f,p),p}function Do(t,n,{drawn:r,runs:e}){let o=n.strengthFills,i=n.stroke,s=o.length>0&&i.length>0;et(t,n,e,{ink:s?(a,f)=>{let u=n.maxMagnitude>0?n.maxMagnitude:r.reduce((l,p)=>Math.max(l,p.magnitude),0),c=Array.from({length:Lt},()=>[]);for(let l of r){let p=u>0?Math.min(1,l.magnitude/u):0;c[Math.min(Lt-1,Math.floor(p*Lt))].push(...l.runs)}c.forEach((l,p)=>{if(l.length===0)return;let d=bn(o,(p+.5)/Lt);a.draw(new Co().path({data:rt(l),centerBounds:[f.minX,f.minY,f.maxX,f.maxY],start:n.start??0,end:n.end??1}).shadow(n.shadow).stroke(i.map(y=>({...y,fill:d}))))})}:void 0})}function vo(t,n){let{source:r,blend:e}=t.expression,o=zr(r,t.params,n);if(!o||!e)return o;let i=zr(e.from,t.params,n);if(!i)return o;let s={x:0,y:0};return(a,f,u)=>!i(a,f,s)||!o(a,f,u)?!1:(u.x=s.x+(u.x-s.x)*e.t,u.y=s.y+(u.y-s.y)*e.t,!0)}function zr(t,n,r){let e=V(t),o=Pt(t,e);if(o instanceof Error)return null;let i=F(e,n),{x:s,y:a}=o;return(f,u,c)=>{let l=s(f-r.x,u-r.y,i),p=a(f-r.x,u-r.y,i);return c.x=l,c.y=p,Number.isFinite(l)&&Number.isFinite(p)}}var qo=.5523;function zo(t,n,r,e){let{unit:o,length:i}=ct(t,n);if(i===0)return[];let s=Math.min(e/2,i/4),a=Sn(t,n),f=(x,g)=>P(x,r,g*s),u=(x,g)=>P(x,o,g*s),c=qo,l=(x,g,m)=>({type:"C",x1:x.x,y1:x.y,x2:g.x,y2:g.y,x:m.x,y:m.y}),p=f(u(t,1),1),d=f(u(a,-1),1),y=f(a,2),h=f(u(a,1),1),E=f(u(n,-1),1);return[{type:"M",x:t.x,y:t.y},l(f(t,c),f(u(t,1-c),1),p),{type:"L",x:d.x,y:d.y},l(f(u(a,-1+c),1),f(a,2-c),y),l(f(a,2-c),f(u(a,1-c),1),h),{type:"L",x:E.x,y:E.y},l(f(u(n,-1+c),1),f(n,c),n)]}var Uo=["circular","spring","tree","grid"];function Bo(t,n,r,e){let o=n.length;if(o===0)return new Map;if(o===1)return new Map([[n[0],{x:0,y:0}]]);switch(t){case"grid":return jo(n);case"tree":return Ur(Vo(n,r,e));case"spring":return Ur(Ho(n,r));default:return Br(n)}}function Br(t){let n=t.length;return new Map(t.map((r,e)=>{let o=Math.PI/2-2*Math.PI*e/n;return[r,{x:Math.cos(o),y:Math.sin(o)}]}))}function jo(t){let n=Math.ceil(Math.sqrt(t.length)),r=Math.ceil(t.length/n),e=(o,i)=>i===1?0:-1+2*o/(i-1);return new Map(t.map((o,i)=>[o,{x:e(i%n,n),y:-e(Math.floor(i/n),r)}]))}function $o(t,n){let r=new Map(t.map(e=>[e,[]]));for(let{from:e,to:o}of n)e===o||!r.has(e)||!r.has(o)||(r.get(e).push(o),r.get(o).push(e));return r}function Vo(t,n,r){let e=$o(t,n),o=new Map,i=0,s=(u,c,l)=>{l.add(u);let p=e.get(u).filter(h=>!l.has(h));for(let h of p)l.add(h);if(p.length===0)return o.set(u,{x:i++,y:-c}),o.get(u).x;let d=p.map(h=>s(h,c+1,l)),y=(d[0]+d[d.length-1])/2;return o.set(u,{x:y,y:-c}),y},a=new Set,f=e.has(r)?r:t[0];for(let u of[f,...t])a.has(u)||s(u,0,a);return o}function Ho(t,n){let r=t.length,e=new Map(t.map((c,l)=>[c,l])),o=Br(t),i=t.map(c=>o.get(c).x),s=t.map(c=>o.get(c).y),a=n.flatMap(({from:c,to:l})=>{let p=e.get(c),d=e.get(l);return p===void 0||d===void 0||p===d?[]:[[p,d]]}),f=Math.sqrt(4/r),u=160;for(let c=0;c<u;c++){let l=new Float64Array(r),p=new Float64Array(r);for(let y=0;y<r;y++)for(let h=y+1;h<r;h++){let E=i[y]-i[h],x=s[y]-s[h],g=Math.hypot(E,x);g<1e-6&&([E,x,g]=[.001*(y-h),.001,.001]);let m=f*f/g;l[y]+=E/g*m,p[y]+=x/g*m,l[h]-=E/g*m,p[h]-=x/g*m}for(let[y,h]of a){let E=i[y]-i[h],x=s[y]-s[h],g=Math.max(Math.hypot(E,x),1e-6),m=g*g/f;l[y]-=E/g*m,p[y]-=x/g*m,l[h]+=E/g*m,p[h]+=x/g*m}let d=.12*(1-c/u);for(let y=0;y<r;y++){let h=Math.hypot(l[y],p[y]);h>0&&(i[y]+=l[y]/h*Math.min(h,d),s[y]+=p[y]/h*Math.min(h,d))}}return new Map(t.map((c,l)=>[c,{x:i[l],y:s[l]}]))}function Ur(t){let n=1/0,r=1/0,e=-1/0,o=-1/0;for(let s of t.values())n=Math.min(n,s.x),e=Math.max(e,s.x),r=Math.min(r,s.y),o=Math.max(o,s.y);let i=(s,a,f)=>f-a<1e-9?0:-1+2*(s-a)/(f-a);return new Map([...t].map(([s,a])=>[s,{x:i(a.x,n,e),y:i(a.y,r,o)}]))}export{mt as a,Dt as b,vt as c,z as d,vn as e,Wr as f,Qr as g,Kr as h,Zr as i,te as j,xt as k,At as l,cn as m,un as n,Le as o,ln as p,pn as q,mn as r,xn as s,hn as t,dn as u,W as v,ee as w,Un as x,X as y,ht as z,U as A,Ut as B,k as C,J as D,Z as E,tt as F,Bt as G,nt as H,F as I,ae as J,dt as K,ce as L,jt as M,D as N,yt as O,Gt as P,Wt as Q,fe as R,gt as S,Qt as T,Mt as U,le as V,Et as W,rt as X,C as Y,pe as Z,v as _,me as $,Kt as aa,Jt as ba,j as ca,Zt as da,$ as ea,he as fa,de as ga,Zn as ha,et as ia,tr as ja,nr as ka,ye as la,ot as ma,it as na,sr as oa,st as pa,nn as qa,rn as ra,en as sa,on as ta,sn as ua,St as va,wt as wa,pr as xa,mr as ya,xr as za,Tt as Aa,hr as Ba,dr as Ca,Ce as Da,ut as Ea,V as Fa,Pt as Ga,wn as Ha,In as Ia,Mn as Ja,Yr as Ka,Dr as La,vr as Ma,Oo as Na,H as Oa,Tr as Pa,$e as Qa,He as Ra,Or as Sa,Ge as Ta,Qe as Ua,Ke as Va,P as Wa,Sn as Xa,ct as Ya,Je as Za,zo as _a,So as $a,ao as ab,Pn as bb,co as cb,uo as db,fo as eb,lo as fb,q as gb,An as hb,Tn as ib,kr as jb,Ir as kb,Nr as lb,Lr as mb,oo as nb,Lo as ob,_o as pb,Fo as qb,Fn as rb,Cn as sb,bn as tb,mo as ub,xo as vb,bo as wb,Ro as xb,Yo as yb,Do as zb,Uo as Ab,Bo as Bb,$r as Cb,Vr as Db,Hr as Eb};
|
|
2
|
+
//# sourceMappingURL=chunk-IRZCG6PM.js.map
|