@classytic/stage 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +5 -1
- package/dist/_virtual/_rolldown/runtime.mjs +18 -0
- package/dist/assets/index.mjs +0 -1
- package/dist/atomic/aufbau.d.mts +144 -0
- package/dist/atomic/aufbau.mjs +384 -0
- package/dist/atomic/elements.d.mts +67 -0
- package/dist/atomic/elements.mjs +785 -0
- package/dist/atomic/emission.d.mts +112 -0
- package/dist/atomic/emission.mjs +179 -0
- package/dist/atomic/index.d.mts +8 -0
- package/dist/atomic/index.mjs +9 -0
- package/dist/atomic/periodic.d.mts +82 -0
- package/dist/atomic/periodic.mjs +231 -0
- package/dist/atomic/properties.d.mts +100 -0
- package/dist/atomic/properties.mjs +574 -0
- package/dist/atomic/shells.d.mts +137 -0
- package/dist/atomic/shells.mjs +170 -0
- package/dist/atomic/trends.d.mts +148 -0
- package/dist/atomic/trends.mjs +225 -0
- package/dist/builder/Palette.mjs +50 -89
- package/dist/builder/SceneBuilder.mjs +15 -73
- package/dist/chem/chromatography.d.mts +66 -0
- package/dist/chem/chromatography.mjs +63 -0
- package/dist/chem/complex.d.mts +114 -0
- package/dist/chem/complex.mjs +234 -0
- package/dist/chem/cycle.d.mts +75 -0
- package/dist/chem/cycle.mjs +145 -0
- package/dist/chem/equation.d.mts +86 -0
- package/dist/chem/equation.mjs +168 -0
- package/dist/chem/formula.d.mts +90 -0
- package/dist/chem/formula.mjs +201 -0
- package/dist/chem/functional-groups.d.mts +31 -0
- package/dist/chem/functional-groups.mjs +187 -0
- package/dist/chem/hazard.d.mts +94 -0
- package/dist/chem/hazard.mjs +329 -0
- package/dist/chem/index.d.mts +34 -33
- package/dist/chem/index.mjs +34 -28
- package/dist/chem/ionic.d.mts +98 -0
- package/dist/chem/ionic.mjs +156 -0
- package/dist/chem/layout.d.mts +46 -0
- package/dist/chem/layout.mjs +342 -0
- package/dist/chem/lewis.d.mts +79 -0
- package/dist/chem/lewis.mjs +163 -0
- package/dist/chem/molecular-orbital.d.mts +114 -0
- package/dist/chem/molecular-orbital.mjs +201 -0
- package/dist/chem/molecule.d.mts +154 -0
- package/dist/chem/molecule.mjs +282 -0
- package/dist/chem/nmr.d.mts +153 -0
- package/dist/chem/nmr.mjs +165 -0
- package/dist/chem/polymer.d.mts +65 -0
- package/dist/chem/polymer.mjs +179 -0
- package/dist/chem/redox.d.mts +138 -0
- package/dist/chem/redox.mjs +328 -0
- package/dist/chem/relations.d.mts +183 -0
- package/dist/chem/relations.mjs +299 -0
- package/dist/chem/skeleton.d.mts +51 -0
- package/dist/chem/skeleton.mjs +186 -0
- package/dist/chem/solution.d.mts +116 -0
- package/dist/chem/solution.mjs +186 -0
- package/dist/chem/species.d.mts +47 -0
- package/dist/chem/species.mjs +128 -0
- package/dist/chem/stereo.d.mts +108 -0
- package/dist/chem/stereo.mjs +286 -0
- package/dist/chem/stoichiometry.d.mts +95 -0
- package/dist/chem/stoichiometry.mjs +145 -0
- package/dist/chem/synthesis.d.mts +113 -0
- package/dist/chem/synthesis.mjs +281 -0
- package/dist/chem/vsepr.d.mts +80 -0
- package/dist/chem/vsepr.mjs +247 -0
- package/dist/circuit/ac.d.mts +163 -0
- package/dist/circuit/ac.mjs +452 -0
- package/dist/circuit/dc.d.mts +92 -0
- package/dist/circuit/dc.mjs +333 -0
- package/dist/circuit/index.d.mts +5 -92
- package/dist/circuit/index.mjs +5 -332
- package/dist/circuit/network.d.mts +99 -0
- package/dist/circuit/network.mjs +440 -0
- package/dist/circuit/topology.d.mts +102 -0
- package/dist/circuit/topology.mjs +143 -0
- package/dist/colour/absorption.d.mts +79 -0
- package/dist/colour/absorption.mjs +137 -0
- package/dist/colour/index.d.mts +6 -0
- package/dist/colour/index.mjs +7 -0
- package/dist/colour/name.d.mts +14 -0
- package/dist/colour/name.mjs +76 -0
- package/dist/colour/observer.d.mts +31 -0
- package/dist/colour/observer.mjs +46 -0
- package/dist/colour/spectrum.d.mts +61 -0
- package/dist/colour/spectrum.mjs +108 -0
- package/dist/colour/srgb.d.mts +49 -0
- package/dist/colour/srgb.mjs +108 -0
- package/dist/core/constants.d.mts +138 -0
- package/dist/core/constants.mjs +139 -0
- package/dist/core/index.d.mts +4 -1
- package/dist/core/index.mjs +4 -1
- package/dist/core/math.d.mts +26 -0
- package/dist/core/math.mjs +37 -0
- package/dist/core/vec3.d.mts +94 -0
- package/dist/core/vec3.mjs +123 -0
- package/dist/core/worked.d.mts +35 -0
- package/dist/core/worked.mjs +44 -0
- package/dist/electro/cell.d.mts +102 -0
- package/dist/electro/cell.mjs +170 -0
- package/dist/electro/conductivity.d.mts +157 -0
- package/dist/electro/conductivity.mjs +156 -0
- package/dist/electro/couples.d.mts +114 -0
- package/dist/electro/couples.mjs +334 -0
- package/dist/electro/electrolysis.d.mts +96 -0
- package/dist/electro/electrolysis.mjs +274 -0
- package/dist/electro/faraday.d.mts +150 -0
- package/dist/electro/faraday.mjs +118 -0
- package/dist/electro/index.d.mts +6 -0
- package/dist/electro/index.mjs +7 -0
- package/dist/finance/accounting/adjustments.d.mts +17 -0
- package/dist/finance/accounting/adjustments.mjs +202 -0
- package/dist/finance/accounting/analysis.d.mts +8 -0
- package/dist/finance/accounting/analysis.mjs +205 -0
- package/dist/finance/accounting/clubs.d.mts +21 -0
- package/dist/finance/accounting/clubs.mjs +217 -0
- package/dist/finance/accounting/company-statements.d.mts +7 -0
- package/dist/finance/accounting/company-statements.mjs +150 -0
- package/dist/finance/accounting/harness.d.mts +7 -0
- package/dist/finance/accounting/harness.mjs +45 -0
- package/dist/finance/accounting/index.d.mts +18 -0
- package/dist/finance/accounting/index.mjs +18 -0
- package/dist/finance/accounting/journalize.d.mts +16 -0
- package/dist/finance/accounting/journalize.mjs +128 -0
- package/dist/finance/accounting/manufacturing.d.mts +8 -0
- package/dist/finance/accounting/manufacturing.mjs +236 -0
- package/dist/finance/accounting/partnership.d.mts +7 -0
- package/dist/finance/accounting/partnership.mjs +152 -0
- package/dist/finance/accounting/period-case.d.mts +6 -0
- package/dist/finance/accounting/period-case.mjs +71 -0
- package/dist/finance/accounting/post.d.mts +9 -0
- package/dist/finance/accounting/post.mjs +84 -0
- package/dist/finance/accounting/precision.d.mts +9 -0
- package/dist/finance/accounting/precision.mjs +15 -0
- package/dist/finance/accounting/rules.d.mts +21 -0
- package/dist/finance/accounting/rules.mjs +37 -0
- package/dist/finance/accounting/solve.d.mts +28 -0
- package/dist/finance/accounting/solve.mjs +92 -0
- package/dist/finance/accounting/statements.d.mts +7 -0
- package/dist/finance/accounting/statements.mjs +142 -0
- package/dist/finance/accounting/types.d.mts +649 -0
- package/dist/finance/accounting/validate.d.mts +7 -0
- package/dist/finance/accounting/validate.mjs +67 -0
- package/dist/finance/accounting/verification.d.mts +24 -0
- package/dist/finance/accounting/verification.mjs +386 -0
- package/dist/finance/bizsim.d.mts +75 -0
- package/dist/finance/bizsim.mjs +296 -0
- package/dist/finance/index.d.mts +95 -0
- package/dist/finance/index.mjs +145 -0
- package/dist/finance/investment-math.d.mts +7 -0
- package/dist/finance/investment-math.mjs +18 -0
- package/dist/finance/management-accounting/budgeting.d.mts +7 -0
- package/dist/finance/management-accounting/budgeting.mjs +189 -0
- package/dist/finance/management-accounting/cash-budget.d.mts +7 -0
- package/dist/finance/management-accounting/cash-budget.mjs +154 -0
- package/dist/finance/management-accounting/costing.d.mts +8 -0
- package/dist/finance/management-accounting/costing.mjs +175 -0
- package/dist/finance/management-accounting/decisions.d.mts +8 -0
- package/dist/finance/management-accounting/decisions.mjs +164 -0
- package/dist/finance/management-accounting/index.d.mts +13 -0
- package/dist/finance/management-accounting/index.mjs +13 -0
- package/dist/finance/management-accounting/integrated-budget.d.mts +8 -0
- package/dist/finance/management-accounting/integrated-budget.mjs +67 -0
- package/dist/finance/management-accounting/inventory-costing.d.mts +7 -0
- package/dist/finance/management-accounting/inventory-costing.mjs +173 -0
- package/dist/finance/management-accounting/investment-appraisal.d.mts +7 -0
- package/dist/finance/management-accounting/investment-appraisal.mjs +148 -0
- package/dist/finance/management-accounting/management-case.d.mts +8 -0
- package/dist/finance/management-accounting/management-case.mjs +91 -0
- package/dist/finance/management-accounting/master-budget.d.mts +7 -0
- package/dist/finance/management-accounting/master-budget.mjs +137 -0
- package/dist/finance/management-accounting/production-costing.d.mts +8 -0
- package/dist/finance/management-accounting/production-costing.mjs +214 -0
- package/dist/finance/management-accounting/types.d.mts +644 -0
- package/dist/finance/management-accounting/variances.d.mts +7 -0
- package/dist/finance/management-accounting/variances.mjs +150 -0
- package/dist/index.d.mts +9 -8
- package/dist/index.mjs +5 -5
- package/dist/interaction/MovableDot.mjs +19 -0
- package/dist/interaction/useDraggable.mjs +24 -4
- package/dist/math/analysis.d.mts +61 -0
- package/dist/math/analysis.mjs +187 -0
- package/dist/math/answer-check.d.mts +50 -0
- package/dist/math/answer-check.mjs +106 -0
- package/dist/math/calculus.d.mts +17 -1
- package/dist/math/calculus.mjs +365 -2
- package/dist/math/complex.d.mts +93 -0
- package/dist/math/complex.mjs +239 -0
- package/dist/math/expr.d.mts +23 -0
- package/dist/math/expr.mjs +36 -0
- package/dist/math/index.d.mts +9 -23
- package/dist/math/index.mjs +9 -38
- package/dist/math/latex.mjs +10 -1
- package/dist/math/parse.mjs +1 -1
- package/dist/math/poly.d.mts +55 -0
- package/dist/math/poly.mjs +273 -0
- package/dist/math/rearrange.d.mts +14 -0
- package/dist/math/rearrange.mjs +125 -0
- package/dist/math/solve.d.mts +21 -0
- package/dist/math/solve.mjs +75 -0
- package/dist/networking/addressing.d.mts +26 -0
- package/dist/networking/addressing.mjs +33 -0
- package/dist/networking/cloud/access.d.mts +36 -0
- package/dist/networking/cloud/access.mjs +95 -0
- package/dist/networking/cloud/containers.d.mts +43 -0
- package/dist/networking/cloud/containers.mjs +54 -0
- package/dist/networking/cloud/edge.d.mts +17 -0
- package/dist/networking/cloud/edge.mjs +31 -0
- package/dist/networking/cloud/failure-domains.d.mts +19 -0
- package/dist/networking/cloud/failure-domains.mjs +22 -0
- package/dist/networking/cloud/geo-routing.d.mts +22 -0
- package/dist/networking/cloud/geo-routing.mjs +64 -0
- package/dist/networking/cloud/index.d.mts +18 -0
- package/dist/networking/cloud/index.mjs +19 -0
- package/dist/networking/cloud/inference-reliability.d.mts +30 -0
- package/dist/networking/cloud/inference-reliability.mjs +76 -0
- package/dist/networking/cloud/inference.d.mts +118 -0
- package/dist/networking/cloud/inference.mjs +179 -0
- package/dist/networking/cloud/infrastructure.d.mts +45 -0
- package/dist/networking/cloud/infrastructure.mjs +96 -0
- package/dist/networking/cloud/observability.d.mts +24 -0
- package/dist/networking/cloud/observability.mjs +34 -0
- package/dist/networking/cloud/orchestration.d.mts +32 -0
- package/dist/networking/cloud/orchestration.mjs +38 -0
- package/dist/networking/cloud/recovery.d.mts +21 -0
- package/dist/networking/cloud/recovery.mjs +27 -0
- package/dist/networking/cloud/releases.d.mts +42 -0
- package/dist/networking/cloud/releases.mjs +135 -0
- package/dist/networking/cloud/scaling.d.mts +25 -0
- package/dist/networking/cloud/scaling.mjs +65 -0
- package/dist/networking/cloud/secrets.d.mts +39 -0
- package/dist/networking/cloud/secrets.mjs +68 -0
- package/dist/networking/cloud/server-deployment.d.mts +29 -0
- package/dist/networking/cloud/server-deployment.mjs +72 -0
- package/dist/networking/cloud/storage.d.mts +16 -0
- package/dist/networking/cloud/storage.mjs +58 -0
- package/dist/networking/cloud/vpc.d.mts +18 -0
- package/dist/networking/cloud/vpc.mjs +100 -0
- package/dist/networking/delivery.d.mts +34 -0
- package/dist/networking/delivery.mjs +52 -0
- package/dist/networking/index.d.mts +47 -0
- package/dist/networking/index.mjs +47 -0
- package/dist/networking/ipv6.d.mts +28 -0
- package/dist/networking/ipv6.mjs +17 -0
- package/dist/networking/journeys.d.mts +83 -0
- package/dist/networking/journeys.mjs +161 -0
- package/dist/networking/models/airtime.d.mts +87 -0
- package/dist/networking/models/airtime.mjs +130 -0
- package/dist/networking/models/cellular.d.mts +157 -0
- package/dist/networking/models/cellular.mjs +252 -0
- package/dist/networking/models/encapsulation.d.mts +98 -0
- package/dist/networking/models/encapsulation.mjs +132 -0
- package/dist/networking/models/handover.d.mts +116 -0
- package/dist/networking/models/handover.mjs +209 -0
- package/dist/networking/models/handshake.d.mts +90 -0
- package/dist/networking/models/handshake.mjs +122 -0
- package/dist/networking/models/index.d.mts +14 -0
- package/dist/networking/models/index.mjs +15 -0
- package/dist/networking/models/media.d.mts +82 -0
- package/dist/networking/models/media.mjs +188 -0
- package/dist/networking/models/satellite.d.mts +86 -0
- package/dist/networking/models/satellite.mjs +121 -0
- package/dist/networking/models/spectrum.d.mts +83 -0
- package/dist/networking/models/spectrum.mjs +235 -0
- package/dist/networking/models/switch.d.mts +80 -0
- package/dist/networking/models/switch.mjs +155 -0
- package/dist/networking/models/vlan.d.mts +62 -0
- package/dist/networking/models/vlan.mjs +100 -0
- package/dist/networking/models/vpn.d.mts +66 -0
- package/dist/networking/models/vpn.mjs +125 -0
- package/dist/networking/models/wifi-privacy.d.mts +82 -0
- package/dist/networking/models/wifi-privacy.mjs +130 -0
- package/dist/networking/models/wifi.d.mts +240 -0
- package/dist/networking/models/wifi.mjs +562 -0
- package/dist/networking/nat-traversal.d.mts +24 -0
- package/dist/networking/nat-traversal.mjs +38 -0
- package/dist/networking/protocols.d.mts +17 -0
- package/dist/networking/protocols.mjs +57 -0
- package/dist/networking/queue.d.mts +12 -0
- package/dist/networking/queue.mjs +18 -0
- package/dist/networking/route-learning.d.mts +23 -0
- package/dist/networking/route-learning.mjs +43 -0
- package/dist/networking/routing.d.mts +11 -0
- package/dist/networking/routing.mjs +25 -0
- package/dist/networking/signals.d.mts +26 -0
- package/dist/networking/signals.mjs +35 -0
- package/dist/networking/subnet.d.mts +49 -0
- package/dist/networking/subnet.mjs +89 -0
- package/dist/networking/tcp-reliability.d.mts +24 -0
- package/dist/networking/tcp-reliability.mjs +38 -0
- package/dist/networking/topology/contract.d.mts +123 -0
- package/dist/networking/topology/index.d.mts +4 -0
- package/dist/networking/topology/index.mjs +4 -0
- package/dist/networking/topology/presets.d.mts +7 -0
- package/dist/networking/topology/presets.mjs +302 -0
- package/dist/networking/topology/simulation.d.mts +8 -0
- package/dist/networking/topology/simulation.mjs +179 -0
- package/dist/networking/wireless.d.mts +11 -0
- package/dist/networking/wireless.mjs +17 -0
- package/dist/optics/imaging.d.mts +218 -0
- package/dist/optics/imaging.mjs +276 -0
- package/dist/optics/index.d.mts +7 -0
- package/dist/optics/index.mjs +8 -0
- package/dist/optics/laws.d.mts +70 -0
- package/dist/optics/laws.mjs +195 -0
- package/dist/optics/prism.d.mts +148 -0
- package/dist/optics/prism.mjs +197 -0
- package/dist/optics/refraction.d.mts +201 -0
- package/dist/optics/refraction.mjs +270 -0
- package/dist/optics/wave-optics.d.mts +171 -0
- package/dist/optics/wave-optics.mjs +259 -0
- package/dist/physics/ac/index.d.mts +183 -0
- package/dist/physics/ac/index.mjs +203 -0
- package/dist/physics/dynamics/forces.d.mts +98 -0
- package/dist/physics/dynamics/forces.mjs +153 -0
- package/dist/physics/dynamics/friction.d.mts +76 -0
- package/dist/physics/dynamics/friction.mjs +119 -0
- package/dist/physics/dynamics/system.d.mts +68 -0
- package/dist/physics/dynamics/system.mjs +125 -0
- package/dist/physics/electrostatics/index.d.mts +169 -0
- package/dist/physics/electrostatics/index.mjs +249 -0
- package/dist/physics/energy/centre-of-mass.d.mts +115 -0
- package/dist/physics/energy/centre-of-mass.mjs +180 -0
- package/dist/physics/energy/conservation.d.mts +81 -0
- package/dist/physics/energy/conservation.mjs +129 -0
- package/dist/physics/energy/power.d.mts +90 -0
- package/dist/physics/energy/power.mjs +167 -0
- package/dist/physics/energy/spring.d.mts +73 -0
- package/dist/physics/energy/spring.mjs +129 -0
- package/dist/physics/energy/store.d.mts +63 -0
- package/dist/physics/energy/store.mjs +108 -0
- package/dist/physics/energy/theorem.d.mts +65 -0
- package/dist/physics/energy/theorem.mjs +113 -0
- package/dist/physics/energy/work.d.mts +114 -0
- package/dist/physics/energy/work.mjs +219 -0
- package/dist/physics/gravitation/body.d.mts +85 -0
- package/dist/physics/gravitation/body.mjs +168 -0
- package/dist/physics/gravitation/kepler.d.mts +127 -0
- package/dist/physics/gravitation/kepler.mjs +216 -0
- package/dist/physics/gravitation/law.d.mts +117 -0
- package/dist/physics/gravitation/law.mjs +175 -0
- package/dist/physics/gravitation/orbit.d.mts +119 -0
- package/dist/physics/gravitation/orbit.mjs +202 -0
- package/dist/physics/gravitation/potential.d.mts +114 -0
- package/dist/physics/gravitation/potential.mjs +202 -0
- package/dist/physics/gravitation/variation.d.mts +97 -0
- package/dist/physics/gravitation/variation.mjs +175 -0
- package/dist/physics/index.d.mts +35 -0
- package/dist/physics/index.mjs +36 -0
- package/dist/physics/integral-sweep.d.mts +63 -0
- package/dist/physics/integral-sweep.mjs +126 -0
- package/dist/physics/kinematics/equations.d.mts +47 -0
- package/dist/physics/kinematics/equations.mjs +126 -0
- package/dist/physics/kinematics/free-fall.d.mts +53 -0
- package/dist/physics/kinematics/free-fall.mjs +71 -0
- package/dist/physics/kinematics/given.d.mts +16 -0
- package/dist/physics/kinematics/given.mjs +55 -0
- package/dist/physics/kinematics/roots.d.mts +41 -0
- package/dist/physics/kinematics/roots.mjs +72 -0
- package/dist/physics/kinematics/solve.d.mts +52 -0
- package/dist/physics/kinematics/solve.mjs +172 -0
- package/dist/physics/magnetism/biot-savart.d.mts +161 -0
- package/dist/physics/magnetism/biot-savart.mjs +353 -0
- package/dist/physics/magnetism/flux.d.mts +94 -0
- package/dist/physics/magnetism/flux.mjs +313 -0
- package/dist/physics/magnetism/geomagnetism.d.mts +151 -0
- package/dist/physics/magnetism/geomagnetism.mjs +184 -0
- package/dist/physics/magnetism/index.d.mts +12 -0
- package/dist/physics/magnetism/index.mjs +74 -0
- package/dist/physics/magnetism/lorentz.d.mts +28 -0
- package/dist/physics/magnetism/lorentz.mjs +88 -0
- package/dist/physics/magnetism/magnetic-force.d.mts +102 -0
- package/dist/physics/magnetism/magnetic-force.mjs +169 -0
- package/dist/physics/momentum/collide.d.mts +77 -0
- package/dist/physics/momentum/collide.mjs +115 -0
- package/dist/physics/momentum/impulse.d.mts +89 -0
- package/dist/physics/momentum/impulse.mjs +159 -0
- package/dist/physics/momentum/planar.d.mts +60 -0
- package/dist/physics/momentum/planar.mjs +110 -0
- package/dist/physics/projectile.d.mts +107 -0
- package/dist/physics/projectile.mjs +185 -0
- package/dist/physics/rotation/angular.d.mts +85 -0
- package/dist/physics/rotation/angular.mjs +130 -0
- package/dist/physics/rotation/circular.d.mts +79 -0
- package/dist/physics/rotation/circular.mjs +131 -0
- package/dist/physics/rotation/inertia.d.mts +164 -0
- package/dist/physics/rotation/inertia.mjs +332 -0
- package/dist/physics/rotation/torque.d.mts +65 -0
- package/dist/physics/rotation/torque.mjs +134 -0
- package/dist/physics/vectors.d.mts +64 -0
- package/dist/physics/vectors.mjs +114 -0
- package/dist/primitives/Dot.d.mts +2 -15
- package/dist/primitives/Dot.mjs +6 -4
- package/dist/primitives/Grid.d.mts +33 -17
- package/dist/primitives/Grid.mjs +89 -17
- package/dist/primitives/Label.d.mts +1 -14
- package/dist/primitives/Label.mjs +3 -2
- package/dist/primitives/Lines.d.mts +4 -32
- package/dist/primitives/Lines.mjs +10 -8
- package/dist/primitives/Shapes.d.mts +5 -43
- package/dist/primitives/Shapes.mjs +12 -10
- package/dist/primitives/index.d.mts +2 -2
- package/dist/primitives/index.mjs +2 -2
- package/dist/primitives/props.mjs +31 -0
- package/dist/quantity/index.d.mts +119 -0
- package/dist/quantity/index.mjs +417 -0
- package/dist/relation/derive.d.mts +74 -0
- package/dist/relation/derive.mjs +73 -0
- package/dist/relation/index.d.mts +56 -0
- package/dist/relation/index.mjs +234 -0
- package/dist/scene/Scene.d.mts +6 -1
- package/dist/scene/Scene.mjs +15 -40
- package/dist/scene/evaluators.mjs +1 -1
- package/dist/sim/thermal.mjs +45 -20
- package/dist/thermo/calorimetry.d.mts +207 -0
- package/dist/thermo/calorimetry.mjs +345 -0
- package/dist/thermo/cycles.d.mts +142 -0
- package/dist/thermo/cycles.mjs +256 -0
- package/dist/thermo/entropy.d.mts +87 -0
- package/dist/thermo/entropy.mjs +140 -0
- package/dist/thermo/expansion.d.mts +130 -0
- package/dist/thermo/expansion.mjs +178 -0
- package/dist/thermo/gas.d.mts +197 -0
- package/dist/thermo/gas.mjs +279 -0
- package/dist/thermo/heat-transfer.d.mts +164 -0
- package/dist/thermo/heat-transfer.mjs +217 -0
- package/dist/thermo/index.d.mts +9 -82
- package/dist/thermo/index.mjs +9 -132
- package/dist/thermo/processes.d.mts +95 -0
- package/dist/thermo/processes.mjs +154 -0
- package/dist/thermo/temperature.d.mts +174 -0
- package/dist/thermo/temperature.mjs +236 -0
- package/dist/view/Stage.mjs +4 -11
- package/dist/waves/damping.d.mts +224 -0
- package/dist/waves/damping.mjs +317 -0
- package/dist/waves/doppler.d.mts +72 -0
- package/dist/waves/doppler.mjs +125 -0
- package/dist/waves/index.d.mts +10 -0
- package/dist/waves/index.mjs +10 -0
- package/dist/waves/pendulum.d.mts +130 -0
- package/dist/waves/pendulum.mjs +211 -0
- package/dist/waves/pitch.d.mts +125 -0
- package/dist/waves/pitch.mjs +158 -0
- package/dist/waves/shm.d.mts +170 -0
- package/dist/waves/shm.mjs +279 -0
- package/dist/waves/springs.d.mts +103 -0
- package/dist/waves/springs.mjs +176 -0
- package/dist/waves/superposition.d.mts +124 -0
- package/dist/waves/superposition.mjs +196 -0
- package/dist/waves/wave.d.mts +154 -0
- package/dist/waves/wave.mjs +178 -0
- package/package.json +103 -23
- package/styles.css +125 -8
- package/dist/assets/kit/index.mjs +0 -4
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
//#region src/electro/conductivity.ts
|
|
2
|
+
/**
|
|
3
|
+
* How well a solution conducts, and the three quantities that all get called "conductivity".
|
|
4
|
+
*
|
|
5
|
+
* ## Three quantities, three different questions
|
|
6
|
+
*
|
|
7
|
+
* conductance G = 1/R this SAMPLE, in this cell. siemens
|
|
8
|
+
* conductivity κ = G · (l/A) this SOLUTION, cell removed. S/cm
|
|
9
|
+
* molar conductivity Λm = κ / c one MOLE of it, dilution removed. S·cm²/mol
|
|
10
|
+
*
|
|
11
|
+
* Each strips away one thing the one before it still depends on. Conductance depends on the
|
|
12
|
+
* electrodes' spacing and area, so two labs measuring the same solution disagree. Conductivity
|
|
13
|
+
* removes the cell through its geometry (l/A, the cell constant) and is a property of the
|
|
14
|
+
* solution, but it still falls as the solution is diluted, simply because there are fewer ions.
|
|
15
|
+
* Molar conductivity divides that out and asks what one mole contributes wherever it is.
|
|
16
|
+
*
|
|
17
|
+
* The payoff is the last one. Molar conductivity RISES on dilution, which sounds backwards until
|
|
18
|
+
* you see it is measuring per mole while conductivity measures per volume. For a strong
|
|
19
|
+
* electrolyte it rises a little and levels off, because the ions were already fully separated and
|
|
20
|
+
* only get out of each other's way. For a weak one it climbs steeply without ever levelling,
|
|
21
|
+
* because dilution is pushing its dissociation equilibrium further over: at ordinary
|
|
22
|
+
* concentrations most of the acetic acid in a beaker is not ionised at all.
|
|
23
|
+
*
|
|
24
|
+
* That difference is the measurement's whole diagnostic value. It tells strong from weak
|
|
25
|
+
* electrolytes without any chemistry beyond a resistance reading.
|
|
26
|
+
*
|
|
27
|
+
* ## Units, and the trap in them
|
|
28
|
+
*
|
|
29
|
+
* Everything here is in the CENTIMETRE units this topic is universally taught and examined in:
|
|
30
|
+
* cm for the electrode spacing, cm² for the area, cm³ for volume, mol/dm³ for concentration. That
|
|
31
|
+
* last one is the trap, because a concentration in mol/dm³ and a volume in cm³ differ by the
|
|
32
|
+
* factor of 1000 that {@link molarConductivity} carries. Mixing the two is the commonest wrong
|
|
33
|
+
* answer in the topic, and it is wrong by exactly a thousand, which is large enough to spot and
|
|
34
|
+
* quiet enough to miss.
|
|
35
|
+
*
|
|
36
|
+
* Pure: no React, no pixels.
|
|
37
|
+
*/
|
|
38
|
+
/**
|
|
39
|
+
* Cell constant l/A, in cm⁻¹: the geometry that turns a measured conductance into a property.
|
|
40
|
+
*
|
|
41
|
+
* Measured in practice rather than calculated, by putting a solution of known conductivity
|
|
42
|
+
* (standard KCl) in the cell and reading what it gives. The electrodes are never quite the flat
|
|
43
|
+
* parallel plates the formula assumes.
|
|
44
|
+
*/
|
|
45
|
+
const cellConstant = (separationCm, areaCm2) => separationCm / areaCm2;
|
|
46
|
+
/** Conductance in siemens, the reciprocal of the measured resistance. */
|
|
47
|
+
const conductance = (resistanceOhm) => 1 / resistanceOhm;
|
|
48
|
+
/**
|
|
49
|
+
* Conductivity κ in S/cm: the solution's own property, with the cell divided out.
|
|
50
|
+
*
|
|
51
|
+
* Also called specific conductance. It is the conductance a centimetre cube of the solution would
|
|
52
|
+
* show between opposite faces, which is why the units carry a length.
|
|
53
|
+
*/
|
|
54
|
+
const conductivity = (resistanceOhm, cellConstantPerCm) => conductance(resistanceOhm) * cellConstantPerCm;
|
|
55
|
+
/**
|
|
56
|
+
* Molar conductivity Λm in S·cm²/mol, from conductivity and concentration in mol/dm³.
|
|
57
|
+
*
|
|
58
|
+
* The 1000 converts dm³ to cm³. It is not a fudge factor: κ is per cubic centimetre and c is per
|
|
59
|
+
* cubic decimetre, and the conversion has to appear somewhere. Here, once, rather than in every
|
|
60
|
+
* caller.
|
|
61
|
+
*/
|
|
62
|
+
const molarConductivity = (conductivityScm, concentrationMolPerDm3) => conductivityScm * 1e3 / concentrationMolPerDm3;
|
|
63
|
+
/**
|
|
64
|
+
* Equivalent conductivity in S·cm²/equivalent, for the older papers that ask for it.
|
|
65
|
+
*
|
|
66
|
+
* Same quantity per EQUIVALENT rather than per mole, so it differs by the number of charges the
|
|
67
|
+
* formula unit carries. Sulfuric acid supplies two hydrogen ions per molecule, so a solution
|
|
68
|
+
* 0.5 mol/dm³ in H₂SO₄ is 1 equivalent per cubic decimetre, and its equivalent conductivity is
|
|
69
|
+
* half its molar conductivity. Worth keeping, because the two are quoted interchangeably in older
|
|
70
|
+
* sources and differ by a factor nobody signposts.
|
|
71
|
+
*/
|
|
72
|
+
const equivalentConductivity = (conductivityScm, concentrationMolPerDm3, chargesPerFormulaUnit) => molarConductivity(conductivityScm, concentrationMolPerDm3) / chargesPerFormulaUnit;
|
|
73
|
+
/**
|
|
74
|
+
* Volume in cm³ holding one mole, from a concentration in mol/dm³.
|
|
75
|
+
*
|
|
76
|
+
* The form older texts state the relation in: Λm = κ · V. Same content as dividing by
|
|
77
|
+
* concentration, and worth exposing because a question phrased with V is asking for this.
|
|
78
|
+
*/
|
|
79
|
+
const molarVolumeOfSolution = (concentrationMolPerDm3) => 1e3 / concentrationMolPerDm3;
|
|
80
|
+
/**
|
|
81
|
+
* Degree of dissociation from molar conductivity, against its value at infinite dilution.
|
|
82
|
+
*
|
|
83
|
+
* Arrhenius's ratio: at infinite dilution a weak electrolyte is fully dissociated, so how far
|
|
84
|
+
* short of that a real solution falls is how far short of fully dissociated it is. This is the
|
|
85
|
+
* measurement that makes "weak acid" a number rather than a word.
|
|
86
|
+
*
|
|
87
|
+
* Λ°m cannot be reached by extrapolating a weak electrolyte's own curve, because it is still
|
|
88
|
+
* climbing steeply where the data runs out. It is assembled from ion conductivities instead, which
|
|
89
|
+
* is what Kohlrausch's law is for.
|
|
90
|
+
*/
|
|
91
|
+
const degreeOfDissociation = (molar, atInfiniteDilution) => atInfiniteDilution === 0 ? 0 : molar / atInfiniteDilution;
|
|
92
|
+
/**
|
|
93
|
+
* Λ°m for an electrolyte from its separate ions (Kohlrausch's law of independent migration).
|
|
94
|
+
*
|
|
95
|
+
* At infinite dilution the ions are far enough apart to ignore each other entirely, so each
|
|
96
|
+
* contributes the same amount whatever it arrived with. That independence is the claim, and it is
|
|
97
|
+
* what lets a weak acid's Λ°m be assembled from strong-electrolyte measurements it could never be
|
|
98
|
+
* extrapolated from directly.
|
|
99
|
+
*/
|
|
100
|
+
const limitingMolarConductivity = (cation, anion) => cation.conductivity * cation.count + anion.conductivity * anion.count;
|
|
101
|
+
/**
|
|
102
|
+
* The dissociation constant of a weak electrolyte from its conductivity (Ostwald's dilution law).
|
|
103
|
+
*
|
|
104
|
+
* K = c α² / (1 − α)
|
|
105
|
+
*
|
|
106
|
+
* The bridge between an electrical measurement and an equilibrium constant, and the reason this
|
|
107
|
+
* technique mattered historically: it gives Ka for an acid too weak to titrate accurately.
|
|
108
|
+
*/
|
|
109
|
+
const ostwaldConstant = (concentrationMolPerDm3, dissociation) => dissociation >= 1 ? Number.POSITIVE_INFINITY : concentrationMolPerDm3 * dissociation * dissociation / (1 - dissociation);
|
|
110
|
+
/**
|
|
111
|
+
* How far a weak electrolyte dissociates at a given concentration, from its constant.
|
|
112
|
+
*
|
|
113
|
+
* Ostwald's law run the other way, and the direction that actually gets used: the constant is the
|
|
114
|
+
* fixed property and the concentration is what a learner changes. Solving cα² + Kα − K = 0 for the
|
|
115
|
+
* positive root,
|
|
116
|
+
*
|
|
117
|
+
* α = (−K + √(K² + 4cK)) / 2c
|
|
118
|
+
*
|
|
119
|
+
* written that way rather than as the textbook quadratic because the other arrangement subtracts
|
|
120
|
+
* two nearly equal numbers when K is small, which is exactly the case here: cancellation would eat
|
|
121
|
+
* most of the significant figures for an acid with a K of 10⁻⁵.
|
|
122
|
+
*
|
|
123
|
+
* This is what makes dilution visible. Acetic acid is about 1.3% ionised at 0.1 mol/dm³ and about
|
|
124
|
+
* 13% at 0.001, so its molar conductivity climbs steeply on dilution while a strong electrolyte's
|
|
125
|
+
* barely moves.
|
|
126
|
+
*/
|
|
127
|
+
function dissociationFromConstant(concentrationMolPerDm3, dissociationConstant) {
|
|
128
|
+
if (concentrationMolPerDm3 <= 0) return 1;
|
|
129
|
+
const k = dissociationConstant;
|
|
130
|
+
return (-k + Math.sqrt(k * k + 4 * concentrationMolPerDm3 * k)) / (2 * concentrationMolPerDm3);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Molar conductivity of a STRONG electrolyte at a real concentration (Kohlrausch's √c law).
|
|
134
|
+
*
|
|
135
|
+
* Λm = Λ°m − A√c
|
|
136
|
+
*
|
|
137
|
+
* A strong electrolyte is fully dissociated at every concentration, so its molar conductivity has
|
|
138
|
+
* no dissociation to change. What little it loses on concentrating is the ions getting in each
|
|
139
|
+
* other's way: an ion drags an oppositely charged atmosphere behind it, and the closer they are
|
|
140
|
+
* packed the more it drags.
|
|
141
|
+
*
|
|
142
|
+
* That is the whole diagnostic. The square-root fall is gentle and levels off; a weak
|
|
143
|
+
* electrolyte's rise does not level off at all, because its dissociation is still moving. Told
|
|
144
|
+
* apart by the SHAPE of the curve, without knowing anything else about either substance.
|
|
145
|
+
*/
|
|
146
|
+
const strongMolarConductivity = (limiting, slope, concentrationMolPerDm3) => limiting - slope * Math.sqrt(concentrationMolPerDm3);
|
|
147
|
+
/**
|
|
148
|
+
* Molar conductivity of a WEAK electrolyte, which is its limit scaled by how far it has gone.
|
|
149
|
+
*
|
|
150
|
+
* Λm = α Λ°m, with α from the dissociation constant. The same statement as
|
|
151
|
+
* {@link degreeOfDissociation} solved for the conductivity instead of the ratio.
|
|
152
|
+
*/
|
|
153
|
+
const weakMolarConductivity = (limiting, dissociationConstant, concentrationMolPerDm3) => limiting * dissociationFromConstant(concentrationMolPerDm3, dissociationConstant);
|
|
154
|
+
|
|
155
|
+
//#endregion
|
|
156
|
+
export { cellConstant, conductance, conductivity, degreeOfDissociation, dissociationFromConstant, equivalentConductivity, limitingMolarConductivity, molarConductivity, molarVolumeOfSolution, ostwaldConstant, strongMolarConductivity, weakMolarConductivity };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
//#region src/electro/couples.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Standard electrode potentials: the measured half of electrochemistry.
|
|
4
|
+
*
|
|
5
|
+
* ## One convention, stated once, and never a second table
|
|
6
|
+
*
|
|
7
|
+
* Every value here is a standard REDUCTION potential, written for the half-reaction running as
|
|
8
|
+
*
|
|
9
|
+
* Ox + n e⁻ → Red E° in volts, against the standard hydrogen electrode at 298.15 K
|
|
10
|
+
*
|
|
11
|
+
* That is the IUPAC convention and it is the only one stored. Oxidation potentials are the same
|
|
12
|
+
* numbers with the sign flipped, so {@link oxidationPotential} computes them rather than a second
|
|
13
|
+
* table repeating them. That matters more than it sounds: a table of oxidation potentials beside a
|
|
14
|
+
* table of reduction potentials is the single commonest source of sign errors in this topic, and
|
|
15
|
+
* two tables can disagree while one cannot.
|
|
16
|
+
*
|
|
17
|
+
* Textbooks write the same cell either way. "E°cell = E°anode(ox) + E°cathode(red)" and
|
|
18
|
+
* "E°cell = E°cathode(red) − E°anode(red)" are the same statement, because E°ox = −E°red. Both
|
|
19
|
+
* routes are reachable from what is here, and neither needs its own data.
|
|
20
|
+
*
|
|
21
|
+
* ## Why a couple is not a metal
|
|
22
|
+
*
|
|
23
|
+
* The obvious shape for this data is a list of metals, and it is wrong. Iron has two couples in
|
|
24
|
+
* ordinary use, Fe²⁺/Fe at −0.44 V and Fe³⁺/Fe²⁺ at +0.77 V, and they sit at opposite ends of the
|
|
25
|
+
* series: one of the most readily oxidised metals and a respectable oxidising agent. The same is
|
|
26
|
+
* true of copper, tin and manganese. Keying on the element would make those unreachable or, worse,
|
|
27
|
+
* silently pick one.
|
|
28
|
+
*
|
|
29
|
+
* So the record is the COUPLE, and a half-reaction it can write out.
|
|
30
|
+
*
|
|
31
|
+
* ## Provenance
|
|
32
|
+
*
|
|
33
|
+
* Aqueous standard reduction potentials at 298.15 K, unit activity, from the CRC Handbook's
|
|
34
|
+
* electrochemical series. Values are quoted to the two decimals that data booklets use, because
|
|
35
|
+
* that is the precision a learner is asked to work to and quoting more would imply an agreement
|
|
36
|
+
* between sources that does not exist at the third decimal.
|
|
37
|
+
*
|
|
38
|
+
* Pure: no React, no pixels.
|
|
39
|
+
*/
|
|
40
|
+
/** Which electrode a half-cell ends up as in a given cell. */
|
|
41
|
+
type Role = 'cathode' | 'anode';
|
|
42
|
+
interface Couple {
|
|
43
|
+
/** Stable key, e.g. `Zn2+/Zn`. */
|
|
44
|
+
readonly id: string;
|
|
45
|
+
/**
|
|
46
|
+
* The BALANCED reduction half-equation, written out.
|
|
47
|
+
*
|
|
48
|
+
* Stored rather than assembled, because assembling it needs stoichiometry this record does not
|
|
49
|
+
* carry. A template of `oxidised + ne⁻ → reduced` is right only for a metal and its own ion, and
|
|
50
|
+
* it was quietly wrong for most of this table: it produced `Cl₂ + 2e⁻ → Cl⁻`, missing the 2 on
|
|
51
|
+
* the chloride, and `OH⁻ → O₂ + 4e⁻` with no water in it at all. Both look like half-equations
|
|
52
|
+
* and neither balances.
|
|
53
|
+
*
|
|
54
|
+
* A rendered lab caught it, because a wrong equation printed under a beaker is still a
|
|
55
|
+
* perfectly plausible-looking string.
|
|
56
|
+
*/
|
|
57
|
+
readonly halfEquation: string;
|
|
58
|
+
/** The oxidised form, as written in the half-equation. */
|
|
59
|
+
readonly oxidised: string;
|
|
60
|
+
/** The reduced form. */
|
|
61
|
+
readonly reduced: string;
|
|
62
|
+
/** Electrons transferred in the half-reaction as written. */
|
|
63
|
+
readonly electrons: number;
|
|
64
|
+
/** Standard REDUCTION potential, volts against the standard hydrogen electrode. */
|
|
65
|
+
readonly standardPotential: number;
|
|
66
|
+
/**
|
|
67
|
+
* Species whose concentration enters the reaction quotient, with the power it is raised to.
|
|
68
|
+
*
|
|
69
|
+
* Positive powers for the oxidised side, negative for the reduced side, and solids and the
|
|
70
|
+
* solvent omitted entirely. A solid has unit activity, so including copper metal in Q as though
|
|
71
|
+
* it had a concentration is exactly the error that makes a learner's Nernst answer drift.
|
|
72
|
+
*/
|
|
73
|
+
readonly quotient: Readonly<Record<string, number>>;
|
|
74
|
+
/** True where the electrode is inert and only carries electrons (platinum, graphite). */
|
|
75
|
+
readonly inertElectrode?: boolean;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* The electrochemical series, most negative first.
|
|
79
|
+
*
|
|
80
|
+
* Ordering is by potential rather than by insertion, so "more readily oxidised" is a position in
|
|
81
|
+
* this array and never a separate claim that could drift out of step with the numbers.
|
|
82
|
+
*/
|
|
83
|
+
declare const COUPLES: readonly Couple[];
|
|
84
|
+
/** A couple by id, case-insensitively. Undefined rather than a guess when it is not in the series. */
|
|
85
|
+
declare const coupleById: (id: string) => Couple | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* The standard OXIDATION potential, which is the reduction potential with its sign reversed.
|
|
88
|
+
*
|
|
89
|
+
* Computed rather than stored. See the note at the top of this file on why a second table would be
|
|
90
|
+
* a liability rather than a convenience.
|
|
91
|
+
*/
|
|
92
|
+
declare const oxidationPotential: (couple: Couple) => number;
|
|
93
|
+
/** The balanced half-equation as written for reduction, e.g. `Cu²⁺ + 2e⁻ → Cu`. */
|
|
94
|
+
declare const reductionEquation: (couple: Couple) => string;
|
|
95
|
+
/**
|
|
96
|
+
* The same half-reaction run backwards, which is what happens at an anode.
|
|
97
|
+
*
|
|
98
|
+
* Derived from the reduction equation by swapping the sides and carrying the electrons across,
|
|
99
|
+
* rather than stored a second time. Two strings for one reaction could disagree; this cannot, and
|
|
100
|
+
* it keeps whatever stoichiometry and spectator water the reduction form already got right.
|
|
101
|
+
*/
|
|
102
|
+
declare function oxidationEquation(couple: Couple): string;
|
|
103
|
+
/**
|
|
104
|
+
* Is the reduced form of `a` able to reduce the oxidised form of `b`?
|
|
105
|
+
*
|
|
106
|
+
* The whole predictive content of the series in one comparison: a couple lower in the table has
|
|
107
|
+
* the stronger reducing agent on its reduced side, so zinc metal reduces copper(II) and copper
|
|
108
|
+
* metal does not reduce zinc(II).
|
|
109
|
+
*/
|
|
110
|
+
declare const canReduce: (a: Couple, b: Couple) => boolean;
|
|
111
|
+
/** The stronger oxidising agent of two oxidised forms, which is the one higher in the series. */
|
|
112
|
+
declare const strongerOxidant: (a: Couple, b: Couple) => Couple;
|
|
113
|
+
//#endregion
|
|
114
|
+
export { COUPLES, Couple, Role, canReduce, coupleById, oxidationEquation, oxidationPotential, reductionEquation, strongerOxidant };
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
//#region src/electro/couples.ts
|
|
2
|
+
/**
|
|
3
|
+
* The electrochemical series, most negative first.
|
|
4
|
+
*
|
|
5
|
+
* Ordering is by potential rather than by insertion, so "more readily oxidised" is a position in
|
|
6
|
+
* this array and never a separate claim that could drift out of step with the numbers.
|
|
7
|
+
*/
|
|
8
|
+
const COUPLES = [
|
|
9
|
+
{
|
|
10
|
+
id: "Li+/Li",
|
|
11
|
+
halfEquation: "Li⁺ + e⁻ → Li",
|
|
12
|
+
oxidised: "Li⁺",
|
|
13
|
+
reduced: "Li",
|
|
14
|
+
electrons: 1,
|
|
15
|
+
standardPotential: -3.04,
|
|
16
|
+
quotient: { "Li+": 1 }
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: "K+/K",
|
|
20
|
+
halfEquation: "K⁺ + e⁻ → K",
|
|
21
|
+
oxidised: "K⁺",
|
|
22
|
+
reduced: "K",
|
|
23
|
+
electrons: 1,
|
|
24
|
+
standardPotential: -2.93,
|
|
25
|
+
quotient: { "K+": 1 }
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: "Ca2+/Ca",
|
|
29
|
+
halfEquation: "Ca²⁺ + 2e⁻ → Ca",
|
|
30
|
+
oxidised: "Ca²⁺",
|
|
31
|
+
reduced: "Ca",
|
|
32
|
+
electrons: 2,
|
|
33
|
+
standardPotential: -2.87,
|
|
34
|
+
quotient: { "Ca2+": 1 }
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: "Na+/Na",
|
|
38
|
+
halfEquation: "Na⁺ + e⁻ → Na",
|
|
39
|
+
oxidised: "Na⁺",
|
|
40
|
+
reduced: "Na",
|
|
41
|
+
electrons: 1,
|
|
42
|
+
standardPotential: -2.71,
|
|
43
|
+
quotient: { "Na+": 1 }
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: "Mg2+/Mg",
|
|
47
|
+
halfEquation: "Mg²⁺ + 2e⁻ → Mg",
|
|
48
|
+
oxidised: "Mg²⁺",
|
|
49
|
+
reduced: "Mg",
|
|
50
|
+
electrons: 2,
|
|
51
|
+
standardPotential: -2.37,
|
|
52
|
+
quotient: { "Mg2+": 1 }
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: "Al3+/Al",
|
|
56
|
+
halfEquation: "Al³⁺ + 3e⁻ → Al",
|
|
57
|
+
oxidised: "Al³⁺",
|
|
58
|
+
reduced: "Al",
|
|
59
|
+
electrons: 3,
|
|
60
|
+
standardPotential: -1.66,
|
|
61
|
+
quotient: { "Al3+": 1 }
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: "Mn2+/Mn",
|
|
65
|
+
halfEquation: "Mn²⁺ + 2e⁻ → Mn",
|
|
66
|
+
oxidised: "Mn²⁺",
|
|
67
|
+
reduced: "Mn",
|
|
68
|
+
electrons: 2,
|
|
69
|
+
standardPotential: -1.18,
|
|
70
|
+
quotient: { "Mn2+": 1 }
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "Zn2+/Zn",
|
|
74
|
+
halfEquation: "Zn²⁺ + 2e⁻ → Zn",
|
|
75
|
+
oxidised: "Zn²⁺",
|
|
76
|
+
reduced: "Zn",
|
|
77
|
+
electrons: 2,
|
|
78
|
+
standardPotential: -.76,
|
|
79
|
+
quotient: { "Zn2+": 1 }
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: "Cr3+/Cr",
|
|
83
|
+
halfEquation: "Cr³⁺ + 3e⁻ → Cr",
|
|
84
|
+
oxidised: "Cr³⁺",
|
|
85
|
+
reduced: "Cr",
|
|
86
|
+
electrons: 3,
|
|
87
|
+
standardPotential: -.74,
|
|
88
|
+
quotient: { "Cr3+": 1 }
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: "Fe2+/Fe",
|
|
92
|
+
halfEquation: "Fe²⁺ + 2e⁻ → Fe",
|
|
93
|
+
oxidised: "Fe²⁺",
|
|
94
|
+
reduced: "Fe",
|
|
95
|
+
electrons: 2,
|
|
96
|
+
standardPotential: -.44,
|
|
97
|
+
quotient: { "Fe2+": 1 }
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: "Cd2+/Cd",
|
|
101
|
+
halfEquation: "Cd²⁺ + 2e⁻ → Cd",
|
|
102
|
+
oxidised: "Cd²⁺",
|
|
103
|
+
reduced: "Cd",
|
|
104
|
+
electrons: 2,
|
|
105
|
+
standardPotential: -.4,
|
|
106
|
+
quotient: { "Cd2+": 1 }
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
id: "Co2+/Co",
|
|
110
|
+
halfEquation: "Co²⁺ + 2e⁻ → Co",
|
|
111
|
+
oxidised: "Co²⁺",
|
|
112
|
+
reduced: "Co",
|
|
113
|
+
electrons: 2,
|
|
114
|
+
standardPotential: -.28,
|
|
115
|
+
quotient: { "Co2+": 1 }
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: "Ni2+/Ni",
|
|
119
|
+
halfEquation: "Ni²⁺ + 2e⁻ → Ni",
|
|
120
|
+
oxidised: "Ni²⁺",
|
|
121
|
+
reduced: "Ni",
|
|
122
|
+
electrons: 2,
|
|
123
|
+
standardPotential: -.25,
|
|
124
|
+
quotient: { "Ni2+": 1 }
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: "Sn2+/Sn",
|
|
128
|
+
halfEquation: "Sn²⁺ + 2e⁻ → Sn",
|
|
129
|
+
oxidised: "Sn²⁺",
|
|
130
|
+
reduced: "Sn",
|
|
131
|
+
electrons: 2,
|
|
132
|
+
standardPotential: -.14,
|
|
133
|
+
quotient: { "Sn2+": 1 }
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: "Pb2+/Pb",
|
|
137
|
+
halfEquation: "Pb²⁺ + 2e⁻ → Pb",
|
|
138
|
+
oxidised: "Pb²⁺",
|
|
139
|
+
reduced: "Pb",
|
|
140
|
+
electrons: 2,
|
|
141
|
+
standardPotential: -.13,
|
|
142
|
+
quotient: { "Pb2+": 1 }
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
id: "H+/H2",
|
|
146
|
+
halfEquation: "2H⁺ + 2e⁻ → H₂",
|
|
147
|
+
oxidised: "H⁺",
|
|
148
|
+
reduced: "H₂",
|
|
149
|
+
electrons: 2,
|
|
150
|
+
standardPotential: 0,
|
|
151
|
+
quotient: {
|
|
152
|
+
"H+": 2,
|
|
153
|
+
H2: -1
|
|
154
|
+
},
|
|
155
|
+
inertElectrode: true
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
id: "Sn4+/Sn2+",
|
|
159
|
+
halfEquation: "Sn⁴⁺ + 2e⁻ → Sn²⁺",
|
|
160
|
+
oxidised: "Sn⁴⁺",
|
|
161
|
+
reduced: "Sn²⁺",
|
|
162
|
+
electrons: 2,
|
|
163
|
+
standardPotential: .15,
|
|
164
|
+
quotient: {
|
|
165
|
+
"Sn4+": 1,
|
|
166
|
+
"Sn2+": -1
|
|
167
|
+
},
|
|
168
|
+
inertElectrode: true
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
id: "Cu2+/Cu",
|
|
172
|
+
halfEquation: "Cu²⁺ + 2e⁻ → Cu",
|
|
173
|
+
oxidised: "Cu²⁺",
|
|
174
|
+
reduced: "Cu",
|
|
175
|
+
electrons: 2,
|
|
176
|
+
standardPotential: .34,
|
|
177
|
+
quotient: { "Cu2+": 1 }
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
id: "O2/OH-",
|
|
181
|
+
halfEquation: "O₂ + 2H₂O + 4e⁻ → 4OH⁻",
|
|
182
|
+
oxidised: "O₂",
|
|
183
|
+
reduced: "OH⁻",
|
|
184
|
+
electrons: 4,
|
|
185
|
+
standardPotential: .4,
|
|
186
|
+
quotient: {
|
|
187
|
+
O2: 1,
|
|
188
|
+
"OH-": -4
|
|
189
|
+
},
|
|
190
|
+
inertElectrode: true
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
id: "I2/I-",
|
|
194
|
+
halfEquation: "I₂ + 2e⁻ → 2I⁻",
|
|
195
|
+
oxidised: "I₂",
|
|
196
|
+
reduced: "I⁻",
|
|
197
|
+
electrons: 2,
|
|
198
|
+
standardPotential: .54,
|
|
199
|
+
quotient: { "I-": -2 },
|
|
200
|
+
inertElectrode: true
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
id: "Fe3+/Fe2+",
|
|
204
|
+
halfEquation: "Fe³⁺ + e⁻ → Fe²⁺",
|
|
205
|
+
oxidised: "Fe³⁺",
|
|
206
|
+
reduced: "Fe²⁺",
|
|
207
|
+
electrons: 1,
|
|
208
|
+
standardPotential: .77,
|
|
209
|
+
quotient: {
|
|
210
|
+
"Fe3+": 1,
|
|
211
|
+
"Fe2+": -1
|
|
212
|
+
},
|
|
213
|
+
inertElectrode: true
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
id: "Ag+/Ag",
|
|
217
|
+
halfEquation: "Ag⁺ + e⁻ → Ag",
|
|
218
|
+
oxidised: "Ag⁺",
|
|
219
|
+
reduced: "Ag",
|
|
220
|
+
electrons: 1,
|
|
221
|
+
standardPotential: .8,
|
|
222
|
+
quotient: { "Ag+": 1 }
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
id: "Br2/Br-",
|
|
226
|
+
halfEquation: "Br₂ + 2e⁻ → 2Br⁻",
|
|
227
|
+
oxidised: "Br₂",
|
|
228
|
+
reduced: "Br⁻",
|
|
229
|
+
electrons: 2,
|
|
230
|
+
standardPotential: 1.07,
|
|
231
|
+
quotient: { "Br-": -2 },
|
|
232
|
+
inertElectrode: true
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
id: "O2/H2O",
|
|
236
|
+
halfEquation: "O₂ + 4H⁺ + 4e⁻ → 2H₂O",
|
|
237
|
+
oxidised: "O₂",
|
|
238
|
+
reduced: "H₂O",
|
|
239
|
+
electrons: 4,
|
|
240
|
+
standardPotential: 1.23,
|
|
241
|
+
quotient: {
|
|
242
|
+
O2: 1,
|
|
243
|
+
"H+": 4
|
|
244
|
+
},
|
|
245
|
+
inertElectrode: true
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
id: "Cr2O7^2-/Cr3+",
|
|
249
|
+
halfEquation: "Cr₂O₇²⁻ + 14H⁺ + 6e⁻ → 2Cr³⁺ + 7H₂O",
|
|
250
|
+
oxidised: "Cr₂O₇²⁻",
|
|
251
|
+
reduced: "Cr³⁺",
|
|
252
|
+
electrons: 6,
|
|
253
|
+
standardPotential: 1.33,
|
|
254
|
+
quotient: {
|
|
255
|
+
"Cr2O7^2-": 1,
|
|
256
|
+
"H+": 14,
|
|
257
|
+
"Cr3+": -2
|
|
258
|
+
},
|
|
259
|
+
inertElectrode: true
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
id: "Cl2/Cl-",
|
|
263
|
+
halfEquation: "Cl₂ + 2e⁻ → 2Cl⁻",
|
|
264
|
+
oxidised: "Cl₂",
|
|
265
|
+
reduced: "Cl⁻",
|
|
266
|
+
electrons: 2,
|
|
267
|
+
standardPotential: 1.36,
|
|
268
|
+
quotient: { "Cl-": -2 },
|
|
269
|
+
inertElectrode: true
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
id: "MnO4-/Mn2+",
|
|
273
|
+
halfEquation: "MnO₄⁻ + 8H⁺ + 5e⁻ → Mn²⁺ + 4H₂O",
|
|
274
|
+
oxidised: "MnO₄⁻",
|
|
275
|
+
reduced: "Mn²⁺",
|
|
276
|
+
electrons: 5,
|
|
277
|
+
standardPotential: 1.51,
|
|
278
|
+
quotient: {
|
|
279
|
+
"MnO4-": 1,
|
|
280
|
+
"H+": 8,
|
|
281
|
+
"Mn2+": -1
|
|
282
|
+
},
|
|
283
|
+
inertElectrode: true
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
id: "F2/F-",
|
|
287
|
+
halfEquation: "F₂ + 2e⁻ → 2F⁻",
|
|
288
|
+
oxidised: "F₂",
|
|
289
|
+
reduced: "F⁻",
|
|
290
|
+
electrons: 2,
|
|
291
|
+
standardPotential: 2.87,
|
|
292
|
+
quotient: { "F-": -2 },
|
|
293
|
+
inertElectrode: true
|
|
294
|
+
}
|
|
295
|
+
];
|
|
296
|
+
const BY_ID = new Map(COUPLES.map((c) => [c.id.toLowerCase(), c]));
|
|
297
|
+
/** A couple by id, case-insensitively. Undefined rather than a guess when it is not in the series. */
|
|
298
|
+
const coupleById = (id) => BY_ID.get(id.toLowerCase());
|
|
299
|
+
/**
|
|
300
|
+
* The standard OXIDATION potential, which is the reduction potential with its sign reversed.
|
|
301
|
+
*
|
|
302
|
+
* Computed rather than stored. See the note at the top of this file on why a second table would be
|
|
303
|
+
* a liability rather than a convenience.
|
|
304
|
+
*/
|
|
305
|
+
const oxidationPotential = (couple) => -couple.standardPotential;
|
|
306
|
+
/** The balanced half-equation as written for reduction, e.g. `Cu²⁺ + 2e⁻ → Cu`. */
|
|
307
|
+
const reductionEquation = (couple) => couple.halfEquation;
|
|
308
|
+
/**
|
|
309
|
+
* The same half-reaction run backwards, which is what happens at an anode.
|
|
310
|
+
*
|
|
311
|
+
* Derived from the reduction equation by swapping the sides and carrying the electrons across,
|
|
312
|
+
* rather than stored a second time. Two strings for one reaction could disagree; this cannot, and
|
|
313
|
+
* it keeps whatever stoichiometry and spectator water the reduction form already got right.
|
|
314
|
+
*/
|
|
315
|
+
function oxidationEquation(couple) {
|
|
316
|
+
const [left, right] = couple.halfEquation.split("→");
|
|
317
|
+
if (left === void 0 || right === void 0) return couple.halfEquation;
|
|
318
|
+
const electrons = couple.electrons === 1 ? "e⁻" : `${couple.electrons}e⁻`;
|
|
319
|
+
const withoutElectrons = left.split("+").map((part) => part.trim()).filter((part) => part !== electrons).join(" + ");
|
|
320
|
+
return `${right.trim()} → ${withoutElectrons} + ${electrons}`;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Is the reduced form of `a` able to reduce the oxidised form of `b`?
|
|
324
|
+
*
|
|
325
|
+
* The whole predictive content of the series in one comparison: a couple lower in the table has
|
|
326
|
+
* the stronger reducing agent on its reduced side, so zinc metal reduces copper(II) and copper
|
|
327
|
+
* metal does not reduce zinc(II).
|
|
328
|
+
*/
|
|
329
|
+
const canReduce = (a, b) => a.standardPotential < b.standardPotential;
|
|
330
|
+
/** The stronger oxidising agent of two oxidised forms, which is the one higher in the series. */
|
|
331
|
+
const strongerOxidant = (a, b) => a.standardPotential >= b.standardPotential ? a : b;
|
|
332
|
+
|
|
333
|
+
//#endregion
|
|
334
|
+
export { COUPLES, canReduce, coupleById, oxidationEquation, oxidationPotential, reductionEquation, strongerOxidant };
|