@classytic/stage 0.3.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/dist/_virtual/_rolldown/runtime.mjs +18 -0
- 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/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 +3 -1
- package/dist/core/index.mjs +3 -1
- 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 +21 -39
- package/dist/finance/bizsim.mjs +276 -97
- package/dist/finance/index.d.mts +20 -43
- package/dist/finance/index.mjs +19 -77
- 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 +6 -6
- package/dist/index.mjs +1 -1
- 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 +4 -9
- package/dist/math/calculus.mjs +216 -7
- 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 +8 -22
- package/dist/math/index.mjs +8 -37
- package/dist/math/latex.mjs +2 -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/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/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/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 +74 -2
|
@@ -0,0 +1,644 @@
|
|
|
1
|
+
import { ExplanationStep } from "../accounting/types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/finance/management-accounting/types.d.ts
|
|
4
|
+
type InventoryCostingMethod = 'fifo' | 'avco';
|
|
5
|
+
type InventoryTransaction = {
|
|
6
|
+
id: string;
|
|
7
|
+
type: 'receipt';
|
|
8
|
+
quantity: number;
|
|
9
|
+
unitCost: number;
|
|
10
|
+
label?: string;
|
|
11
|
+
} | {
|
|
12
|
+
id: string;
|
|
13
|
+
type: 'issue';
|
|
14
|
+
quantity: number;
|
|
15
|
+
label?: string;
|
|
16
|
+
};
|
|
17
|
+
interface InventoryCostLayer {
|
|
18
|
+
sourceId: string;
|
|
19
|
+
quantity: number;
|
|
20
|
+
value: number;
|
|
21
|
+
unitCost: number;
|
|
22
|
+
}
|
|
23
|
+
interface InventoryLayerConsumption {
|
|
24
|
+
sourceId: string;
|
|
25
|
+
quantity: number;
|
|
26
|
+
value: number;
|
|
27
|
+
unitCost: number;
|
|
28
|
+
}
|
|
29
|
+
interface InventoryCostingMovement {
|
|
30
|
+
transactionId: string;
|
|
31
|
+
type: InventoryTransaction['type'];
|
|
32
|
+
quantity: number;
|
|
33
|
+
unitCost?: number;
|
|
34
|
+
issueCost: number;
|
|
35
|
+
runningCostOfSales: number;
|
|
36
|
+
runningQuantity: number;
|
|
37
|
+
runningValue: number;
|
|
38
|
+
averageUnitCost: number;
|
|
39
|
+
consumedLayers: readonly InventoryLayerConsumption[];
|
|
40
|
+
remainingLayers: readonly InventoryCostLayer[];
|
|
41
|
+
}
|
|
42
|
+
interface InventoryCostingDiagnostic {
|
|
43
|
+
code: 'duplicate-transaction' | 'invalid-quantity' | 'invalid-unit-cost' | 'insufficient-inventory';
|
|
44
|
+
severity: 'error';
|
|
45
|
+
transactionId: string;
|
|
46
|
+
message: string;
|
|
47
|
+
}
|
|
48
|
+
interface InventoryCostingResult {
|
|
49
|
+
method: InventoryCostingMethod;
|
|
50
|
+
completed: boolean;
|
|
51
|
+
movements: readonly InventoryCostingMovement[];
|
|
52
|
+
costOfSales: number;
|
|
53
|
+
closingQuantity: number;
|
|
54
|
+
closingValue: number;
|
|
55
|
+
closingLayers: readonly InventoryCostLayer[];
|
|
56
|
+
diagnostics: readonly InventoryCostingDiagnostic[];
|
|
57
|
+
trace: readonly ExplanationStep[];
|
|
58
|
+
}
|
|
59
|
+
type CostBehavior = 'variable' | 'fixed';
|
|
60
|
+
type CostFunction = 'production' | 'selling' | 'administration';
|
|
61
|
+
type CostTraceability = 'direct' | 'indirect';
|
|
62
|
+
interface ClassifiedCost {
|
|
63
|
+
id: string;
|
|
64
|
+
label: string;
|
|
65
|
+
behavior: CostBehavior;
|
|
66
|
+
function: CostFunction;
|
|
67
|
+
traceability: CostTraceability;
|
|
68
|
+
amount: number;
|
|
69
|
+
basis: 'per-unit' | 'period';
|
|
70
|
+
}
|
|
71
|
+
interface CostClassificationSummary {
|
|
72
|
+
variableProductionPerUnit: number;
|
|
73
|
+
variableNonProductionPerUnit: number;
|
|
74
|
+
fixedProduction: number;
|
|
75
|
+
fixedNonProduction: number;
|
|
76
|
+
directCostPerUnit: number;
|
|
77
|
+
indirectPeriodCost: number;
|
|
78
|
+
}
|
|
79
|
+
interface MarginalAbsorptionFacts {
|
|
80
|
+
unitsProduced: number;
|
|
81
|
+
unitsSold: number;
|
|
82
|
+
openingInventoryUnits?: number;
|
|
83
|
+
sellingPricePerUnit: number;
|
|
84
|
+
normalCapacityUnits: number;
|
|
85
|
+
actualFixedProductionOverhead?: number;
|
|
86
|
+
costs: readonly ClassifiedCost[];
|
|
87
|
+
}
|
|
88
|
+
interface CostingStatement {
|
|
89
|
+
revenue: number;
|
|
90
|
+
variableProductionCostOfSales: number;
|
|
91
|
+
fixedProductionCostOfSales: number;
|
|
92
|
+
variableNonProductionCost: number;
|
|
93
|
+
fixedNonProductionCost: number;
|
|
94
|
+
contribution?: number;
|
|
95
|
+
grossProfit?: number;
|
|
96
|
+
underAbsorption: number;
|
|
97
|
+
overAbsorption: number;
|
|
98
|
+
profit: number;
|
|
99
|
+
}
|
|
100
|
+
interface MarginalAbsorptionResult {
|
|
101
|
+
classification: CostClassificationSummary;
|
|
102
|
+
values: {
|
|
103
|
+
closingInventoryUnits: number;
|
|
104
|
+
fixedOverheadRate: number;
|
|
105
|
+
absorbedFixedOverhead: number;
|
|
106
|
+
actualFixedOverhead: number;
|
|
107
|
+
marginalClosingInventory: number;
|
|
108
|
+
absorptionClosingInventory: number;
|
|
109
|
+
inventoryFixedOverheadMovement: number;
|
|
110
|
+
profitDifference: number;
|
|
111
|
+
};
|
|
112
|
+
marginal: CostingStatement;
|
|
113
|
+
absorption: CostingStatement;
|
|
114
|
+
reconciles: boolean;
|
|
115
|
+
diagnostics: readonly {
|
|
116
|
+
code: 'invalid-cost' | 'invalid-volume' | 'invalid-capacity';
|
|
117
|
+
severity: 'error';
|
|
118
|
+
message: string;
|
|
119
|
+
costId?: string;
|
|
120
|
+
}[];
|
|
121
|
+
trace: readonly ExplanationStep[];
|
|
122
|
+
}
|
|
123
|
+
interface BudgetPeriodInput {
|
|
124
|
+
id: string;
|
|
125
|
+
label: string;
|
|
126
|
+
salesUnits: number;
|
|
127
|
+
sellingPricePerUnit: number;
|
|
128
|
+
desiredClosingFinishedGoodsUnits: number;
|
|
129
|
+
materialUnitsPerFinishedUnit: number;
|
|
130
|
+
desiredClosingMaterialUnits: number;
|
|
131
|
+
materialCostPerUnit: number;
|
|
132
|
+
directLabourHoursPerUnit?: number;
|
|
133
|
+
directLabourRatePerHour?: number;
|
|
134
|
+
variableProductionOverheadRatePerLabourHour?: number;
|
|
135
|
+
fixedProductionOverhead?: number;
|
|
136
|
+
}
|
|
137
|
+
interface OperatingBudgetFacts {
|
|
138
|
+
openingFinishedGoodsUnits: number;
|
|
139
|
+
openingMaterialUnits: number;
|
|
140
|
+
periods: readonly BudgetPeriodInput[];
|
|
141
|
+
}
|
|
142
|
+
interface OperatingBudgetPeriod {
|
|
143
|
+
id: string;
|
|
144
|
+
label: string;
|
|
145
|
+
sales: {
|
|
146
|
+
units: number;
|
|
147
|
+
pricePerUnit: number;
|
|
148
|
+
revenue: number;
|
|
149
|
+
};
|
|
150
|
+
production: {
|
|
151
|
+
openingFinishedGoodsUnits: number;
|
|
152
|
+
salesUnits: number;
|
|
153
|
+
desiredClosingFinishedGoodsUnits: number;
|
|
154
|
+
unitsToProduce: number;
|
|
155
|
+
};
|
|
156
|
+
materialsUsage: {
|
|
157
|
+
unitsPerFinishedUnit: number;
|
|
158
|
+
productionUnits: number;
|
|
159
|
+
materialUnitsRequired: number;
|
|
160
|
+
};
|
|
161
|
+
materialsPurchases: {
|
|
162
|
+
openingMaterialUnits: number;
|
|
163
|
+
materialUnitsRequired: number;
|
|
164
|
+
desiredClosingMaterialUnits: number;
|
|
165
|
+
unitsToPurchase: number;
|
|
166
|
+
costPerUnit: number;
|
|
167
|
+
purchaseCost: number;
|
|
168
|
+
};
|
|
169
|
+
directLabour: {
|
|
170
|
+
hoursPerUnit: number;
|
|
171
|
+
productionUnits: number;
|
|
172
|
+
labourHours: number;
|
|
173
|
+
ratePerHour: number;
|
|
174
|
+
labourCost: number;
|
|
175
|
+
};
|
|
176
|
+
productionOverhead: {
|
|
177
|
+
labourHours: number;
|
|
178
|
+
variableRatePerLabourHour: number;
|
|
179
|
+
variableOverhead: number;
|
|
180
|
+
fixedOverhead: number;
|
|
181
|
+
totalOverhead: number;
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
interface OperatingBudgetResult {
|
|
185
|
+
completed: boolean;
|
|
186
|
+
periods: readonly OperatingBudgetPeriod[];
|
|
187
|
+
totals: {
|
|
188
|
+
salesUnits: number;
|
|
189
|
+
revenue: number;
|
|
190
|
+
productionUnits: number;
|
|
191
|
+
materialUsageUnits: number;
|
|
192
|
+
materialPurchaseUnits: number;
|
|
193
|
+
materialPurchaseCost: number;
|
|
194
|
+
labourHours: number;
|
|
195
|
+
labourCost: number;
|
|
196
|
+
variableProductionOverhead: number;
|
|
197
|
+
fixedProductionOverhead: number;
|
|
198
|
+
totalProductionOverhead: number;
|
|
199
|
+
};
|
|
200
|
+
diagnostics: readonly {
|
|
201
|
+
code: 'duplicate-period' | 'invalid-input' | 'impossible-schedule';
|
|
202
|
+
severity: 'error';
|
|
203
|
+
periodId?: string;
|
|
204
|
+
message: string;
|
|
205
|
+
}[];
|
|
206
|
+
trace: readonly ExplanationStep[];
|
|
207
|
+
}
|
|
208
|
+
interface CashTimingAllocation {
|
|
209
|
+
offset: number;
|
|
210
|
+
proportion: number;
|
|
211
|
+
}
|
|
212
|
+
interface CashBudgetPeriodInput {
|
|
213
|
+
id: string;
|
|
214
|
+
label: string;
|
|
215
|
+
salesRevenue: number;
|
|
216
|
+
materialPurchases: number;
|
|
217
|
+
labourCost: number;
|
|
218
|
+
productionOverhead: number;
|
|
219
|
+
nonCashProductionOverhead?: number;
|
|
220
|
+
broughtForwardReceipts?: number;
|
|
221
|
+
broughtForwardPayments?: number;
|
|
222
|
+
otherReceipts?: number;
|
|
223
|
+
otherPayments?: number;
|
|
224
|
+
}
|
|
225
|
+
interface CashBudgetFacts {
|
|
226
|
+
openingCashBalance: number;
|
|
227
|
+
minimumCashBalance?: number;
|
|
228
|
+
collectionProfile: readonly CashTimingAllocation[];
|
|
229
|
+
materialPaymentProfile: readonly CashTimingAllocation[];
|
|
230
|
+
periods: readonly CashBudgetPeriodInput[];
|
|
231
|
+
}
|
|
232
|
+
interface CashBudgetPeriod {
|
|
233
|
+
id: string;
|
|
234
|
+
label: string;
|
|
235
|
+
openingCashBalance: number;
|
|
236
|
+
customerReceipts: number;
|
|
237
|
+
totalReceipts: number;
|
|
238
|
+
materialPayments: number;
|
|
239
|
+
labourPayments: number;
|
|
240
|
+
overheadPayments: number;
|
|
241
|
+
totalPayments: number;
|
|
242
|
+
preFinancingClosingCash: number;
|
|
243
|
+
financingRequired: number;
|
|
244
|
+
closingCashBalance: number;
|
|
245
|
+
}
|
|
246
|
+
interface CashBudgetResult {
|
|
247
|
+
completed: boolean;
|
|
248
|
+
periods: readonly CashBudgetPeriod[];
|
|
249
|
+
closingReceivables: number;
|
|
250
|
+
closingMaterialPayables: number;
|
|
251
|
+
totalFinancingRequired: number;
|
|
252
|
+
diagnostics: readonly {
|
|
253
|
+
code: 'duplicate-period' | 'invalid-input' | 'invalid-profile';
|
|
254
|
+
severity: 'error';
|
|
255
|
+
periodId?: string;
|
|
256
|
+
message: string;
|
|
257
|
+
}[];
|
|
258
|
+
trace: readonly ExplanationStep[];
|
|
259
|
+
}
|
|
260
|
+
interface MasterBudgetPeriodPolicy {
|
|
261
|
+
periodId: string;
|
|
262
|
+
variableSellingAdministrationPerUnit: number;
|
|
263
|
+
fixedSellingAdministration: number;
|
|
264
|
+
}
|
|
265
|
+
interface MasterBudgetFacts {
|
|
266
|
+
operating: OperatingBudgetResult;
|
|
267
|
+
cash: CashBudgetResult;
|
|
268
|
+
openingFinishedGoodsValue: number;
|
|
269
|
+
periodPolicies: readonly MasterBudgetPeriodPolicy[];
|
|
270
|
+
}
|
|
271
|
+
interface MasterBudgetPeriod {
|
|
272
|
+
id: string;
|
|
273
|
+
label: string;
|
|
274
|
+
revenue: number;
|
|
275
|
+
materialUsageCost: number;
|
|
276
|
+
labourCost: number;
|
|
277
|
+
productionOverhead: number;
|
|
278
|
+
manufacturingCost: number;
|
|
279
|
+
goodsAvailableValue: number;
|
|
280
|
+
closingFinishedGoodsValue: number;
|
|
281
|
+
costOfSales: number;
|
|
282
|
+
grossProfit: number;
|
|
283
|
+
variableSellingAdministration: number;
|
|
284
|
+
fixedSellingAdministration: number;
|
|
285
|
+
operatingProfit: number;
|
|
286
|
+
closingCashBalance: number;
|
|
287
|
+
financingRequired: number;
|
|
288
|
+
}
|
|
289
|
+
interface MasterBudgetResult {
|
|
290
|
+
completed: boolean;
|
|
291
|
+
periods: readonly MasterBudgetPeriod[];
|
|
292
|
+
totals: {
|
|
293
|
+
revenue: number;
|
|
294
|
+
manufacturingCost: number;
|
|
295
|
+
costOfSales: number;
|
|
296
|
+
grossProfit: number;
|
|
297
|
+
sellingAdministration: number;
|
|
298
|
+
operatingProfit: number;
|
|
299
|
+
financingRequired: number;
|
|
300
|
+
};
|
|
301
|
+
diagnostics: readonly {
|
|
302
|
+
code: 'invalid-input' | 'incomplete-source' | 'period-mismatch';
|
|
303
|
+
severity: 'error';
|
|
304
|
+
periodId?: string;
|
|
305
|
+
message: string;
|
|
306
|
+
}[];
|
|
307
|
+
trace: readonly ExplanationStep[];
|
|
308
|
+
}
|
|
309
|
+
interface IntegratedBudgetCashAdjustment {
|
|
310
|
+
periodId: string;
|
|
311
|
+
nonCashProductionOverhead?: number;
|
|
312
|
+
broughtForwardReceipts?: number;
|
|
313
|
+
broughtForwardPayments?: number;
|
|
314
|
+
otherReceipts?: number;
|
|
315
|
+
otherPayments?: number;
|
|
316
|
+
}
|
|
317
|
+
interface IntegratedMasterBudgetFacts {
|
|
318
|
+
operating: OperatingBudgetFacts;
|
|
319
|
+
openingCashBalance: number;
|
|
320
|
+
minimumCashBalance?: number;
|
|
321
|
+
collectionProfile: readonly CashTimingAllocation[];
|
|
322
|
+
materialPaymentProfile: readonly CashTimingAllocation[];
|
|
323
|
+
cashAdjustments?: readonly IntegratedBudgetCashAdjustment[];
|
|
324
|
+
openingFinishedGoodsValue: number;
|
|
325
|
+
periodPolicies: readonly MasterBudgetPeriodPolicy[];
|
|
326
|
+
}
|
|
327
|
+
interface IntegratedMasterBudgetResult {
|
|
328
|
+
completed: boolean;
|
|
329
|
+
operating: OperatingBudgetResult;
|
|
330
|
+
cash: CashBudgetResult;
|
|
331
|
+
master: MasterBudgetResult;
|
|
332
|
+
diagnostics: readonly {
|
|
333
|
+
code: string;
|
|
334
|
+
severity: 'error';
|
|
335
|
+
periodId?: string;
|
|
336
|
+
message: string;
|
|
337
|
+
}[];
|
|
338
|
+
trace: readonly ExplanationStep[];
|
|
339
|
+
}
|
|
340
|
+
interface CostVariance {
|
|
341
|
+
amount: number;
|
|
342
|
+
outcome: 'favorable' | 'adverse' | 'none';
|
|
343
|
+
}
|
|
344
|
+
interface CostVarianceFacts {
|
|
345
|
+
actualOutputUnits: number;
|
|
346
|
+
material: {
|
|
347
|
+
standardQuantityPerUnit: number;
|
|
348
|
+
standardPricePerUnit: number;
|
|
349
|
+
actualQuantity: number;
|
|
350
|
+
actualPricePerUnit: number;
|
|
351
|
+
};
|
|
352
|
+
labour: {
|
|
353
|
+
standardHoursPerUnit: number;
|
|
354
|
+
standardRatePerHour: number;
|
|
355
|
+
actualHours: number;
|
|
356
|
+
actualRatePerHour: number;
|
|
357
|
+
};
|
|
358
|
+
variableOverhead: {
|
|
359
|
+
standardRatePerHour: number;
|
|
360
|
+
actualRatePerHour: number;
|
|
361
|
+
};
|
|
362
|
+
fixedOverhead: {
|
|
363
|
+
budgeted: number;
|
|
364
|
+
actual: number;
|
|
365
|
+
normalCapacityHours: number;
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
interface CostVarianceResult {
|
|
369
|
+
completed: boolean;
|
|
370
|
+
standardQuantity: number;
|
|
371
|
+
standardHours: number;
|
|
372
|
+
material: {
|
|
373
|
+
price: CostVariance;
|
|
374
|
+
usage: CostVariance;
|
|
375
|
+
total: CostVariance;
|
|
376
|
+
};
|
|
377
|
+
labour: {
|
|
378
|
+
rate: CostVariance;
|
|
379
|
+
efficiency: CostVariance;
|
|
380
|
+
total: CostVariance;
|
|
381
|
+
};
|
|
382
|
+
variableOverhead: {
|
|
383
|
+
expenditure: CostVariance;
|
|
384
|
+
efficiency: CostVariance;
|
|
385
|
+
total: CostVariance;
|
|
386
|
+
};
|
|
387
|
+
fixedOverhead: {
|
|
388
|
+
expenditure: CostVariance;
|
|
389
|
+
volume: CostVariance;
|
|
390
|
+
total: CostVariance;
|
|
391
|
+
};
|
|
392
|
+
totalCostVariance: CostVariance;
|
|
393
|
+
diagnostics: readonly {
|
|
394
|
+
code: 'invalid-input';
|
|
395
|
+
severity: 'error';
|
|
396
|
+
message: string;
|
|
397
|
+
}[];
|
|
398
|
+
trace: readonly ExplanationStep[];
|
|
399
|
+
}
|
|
400
|
+
interface LimitedFactorProduct {
|
|
401
|
+
id: string;
|
|
402
|
+
label: string;
|
|
403
|
+
sellingPricePerUnit: number;
|
|
404
|
+
variableCostPerUnit: number;
|
|
405
|
+
scarceResourcePerUnit: number;
|
|
406
|
+
maximumDemandUnits: number;
|
|
407
|
+
}
|
|
408
|
+
interface LimitedFactorAllocation {
|
|
409
|
+
productId: string;
|
|
410
|
+
label: string;
|
|
411
|
+
contributionPerUnit: number;
|
|
412
|
+
contributionPerResourceUnit: number | 'unconstrained';
|
|
413
|
+
allocatedUnits: number;
|
|
414
|
+
resourceUsed: number;
|
|
415
|
+
contribution: number;
|
|
416
|
+
rank: number;
|
|
417
|
+
}
|
|
418
|
+
interface LimitedFactorResult {
|
|
419
|
+
completed: boolean;
|
|
420
|
+
resourceAvailable: number;
|
|
421
|
+
resourceUsed: number;
|
|
422
|
+
unusedResource: number;
|
|
423
|
+
totalContribution: number;
|
|
424
|
+
allocations: readonly LimitedFactorAllocation[];
|
|
425
|
+
diagnostics: readonly {
|
|
426
|
+
code: 'duplicate-product' | 'invalid-input';
|
|
427
|
+
severity: 'error';
|
|
428
|
+
productId?: string;
|
|
429
|
+
message: string;
|
|
430
|
+
}[];
|
|
431
|
+
trace: readonly ExplanationStep[];
|
|
432
|
+
}
|
|
433
|
+
type RelevantCashFlowKind = 'incremental-revenue' | 'incremental-cost' | 'avoidable-cost' | 'opportunity-cost' | 'sunk-cost' | 'unavoidable-allocated-cost';
|
|
434
|
+
interface RelevantCashFlow {
|
|
435
|
+
id: string;
|
|
436
|
+
label: string;
|
|
437
|
+
kind: RelevantCashFlowKind;
|
|
438
|
+
amount: number;
|
|
439
|
+
}
|
|
440
|
+
interface RelevantCostAlternative {
|
|
441
|
+
id: string;
|
|
442
|
+
label: string;
|
|
443
|
+
cashFlows: readonly RelevantCashFlow[];
|
|
444
|
+
}
|
|
445
|
+
interface RelevantCostAlternativeResult {
|
|
446
|
+
id: string;
|
|
447
|
+
label: string;
|
|
448
|
+
relevantBenefit: number;
|
|
449
|
+
relevantCost: number;
|
|
450
|
+
netBenefit: number;
|
|
451
|
+
included: readonly RelevantCashFlow[];
|
|
452
|
+
excluded: readonly RelevantCashFlow[];
|
|
453
|
+
}
|
|
454
|
+
interface RelevantCostDecisionResult {
|
|
455
|
+
completed: boolean;
|
|
456
|
+
alternatives: readonly RelevantCostAlternativeResult[];
|
|
457
|
+
recommendedAlternativeId?: string;
|
|
458
|
+
advantageOverNextBest: number;
|
|
459
|
+
diagnostics: readonly {
|
|
460
|
+
code: 'duplicate-alternative' | 'duplicate-cash-flow' | 'invalid-input' | 'insufficient-alternatives';
|
|
461
|
+
severity: 'error';
|
|
462
|
+
alternativeId?: string;
|
|
463
|
+
message: string;
|
|
464
|
+
}[];
|
|
465
|
+
trace: readonly ExplanationStep[];
|
|
466
|
+
}
|
|
467
|
+
interface InvestmentCashFlow {
|
|
468
|
+
period: number;
|
|
469
|
+
netCashFlow: number;
|
|
470
|
+
}
|
|
471
|
+
interface InvestmentAccountingProfit {
|
|
472
|
+
period: number;
|
|
473
|
+
profit: number;
|
|
474
|
+
}
|
|
475
|
+
interface InvestmentAppraisalFacts {
|
|
476
|
+
initialInvestment: number;
|
|
477
|
+
cashFlows: readonly InvestmentCashFlow[];
|
|
478
|
+
residualValue: {
|
|
479
|
+
period: number;
|
|
480
|
+
amount: number;
|
|
481
|
+
};
|
|
482
|
+
accountingProfits: readonly InvestmentAccountingProfit[];
|
|
483
|
+
discountRate: number;
|
|
484
|
+
arrInvestmentBasis: 'initial-investment' | 'average-investment';
|
|
485
|
+
}
|
|
486
|
+
interface InvestmentAppraisalPeriod {
|
|
487
|
+
period: number;
|
|
488
|
+
operatingCashFlow: number;
|
|
489
|
+
residualValue: number;
|
|
490
|
+
totalCashFlow: number;
|
|
491
|
+
discountFactor: number;
|
|
492
|
+
presentValue: number;
|
|
493
|
+
cumulativeCashFlow: number;
|
|
494
|
+
cumulativeDiscountedCashFlow: number;
|
|
495
|
+
}
|
|
496
|
+
interface InvestmentAppraisalResult {
|
|
497
|
+
completed: boolean;
|
|
498
|
+
periods: readonly InvestmentAppraisalPeriod[];
|
|
499
|
+
netPresentValue: number;
|
|
500
|
+
paybackPeriod: number | null;
|
|
501
|
+
discountedPaybackPeriod: number | null;
|
|
502
|
+
averageAnnualAccountingProfit: number;
|
|
503
|
+
accountingRateOfReturnPercent: number;
|
|
504
|
+
arrInvestmentBase: number;
|
|
505
|
+
diagnostics: readonly {
|
|
506
|
+
code: 'duplicate-period' | 'invalid-input' | 'incomplete-series' | 'invalid-terminal-period';
|
|
507
|
+
severity: 'error';
|
|
508
|
+
period?: number;
|
|
509
|
+
message: string;
|
|
510
|
+
}[];
|
|
511
|
+
trace: readonly ExplanationStep[];
|
|
512
|
+
}
|
|
513
|
+
interface JobBatchCostFacts {
|
|
514
|
+
kind: 'job' | 'batch';
|
|
515
|
+
outputUnits: number;
|
|
516
|
+
directMaterials: number;
|
|
517
|
+
directLabourHours: number;
|
|
518
|
+
directLabourRatePerHour: number;
|
|
519
|
+
directExpenses?: number;
|
|
520
|
+
productionOverhead: {
|
|
521
|
+
basisQuantity: number;
|
|
522
|
+
ratePerBasisUnit: number;
|
|
523
|
+
basisLabel: string;
|
|
524
|
+
};
|
|
525
|
+
nonProductionOverhead?: number;
|
|
526
|
+
}
|
|
527
|
+
interface JobBatchCostResult {
|
|
528
|
+
completed: boolean;
|
|
529
|
+
kind: 'job' | 'batch';
|
|
530
|
+
directLabour: number;
|
|
531
|
+
primeCost: number;
|
|
532
|
+
productionOverhead: number;
|
|
533
|
+
productionCost: number;
|
|
534
|
+
totalCost: number;
|
|
535
|
+
costPerUnit: number;
|
|
536
|
+
diagnostics: readonly {
|
|
537
|
+
code: 'invalid-input';
|
|
538
|
+
severity: 'error';
|
|
539
|
+
message: string;
|
|
540
|
+
}[];
|
|
541
|
+
trace: readonly ExplanationStep[];
|
|
542
|
+
}
|
|
543
|
+
interface ProcessCostFacts {
|
|
544
|
+
inputUnits: number;
|
|
545
|
+
directMaterials: number;
|
|
546
|
+
conversionCost: number;
|
|
547
|
+
normalLossUnits: number;
|
|
548
|
+
normalLossScrapValuePerUnit: number;
|
|
549
|
+
actualOutputUnits: number;
|
|
550
|
+
}
|
|
551
|
+
interface ProcessCostResult {
|
|
552
|
+
completed: boolean;
|
|
553
|
+
actualLossUnits: number;
|
|
554
|
+
expectedOutputUnits: number;
|
|
555
|
+
netProcessCost: number;
|
|
556
|
+
costPerExpectedUnit: number;
|
|
557
|
+
outputValue: number;
|
|
558
|
+
normalLossScrapValue: number;
|
|
559
|
+
abnormal: {
|
|
560
|
+
kind: 'loss' | 'gain' | 'none';
|
|
561
|
+
units: number;
|
|
562
|
+
grossValue: number;
|
|
563
|
+
scrapAdjustment: number;
|
|
564
|
+
netCostImpact: number;
|
|
565
|
+
};
|
|
566
|
+
processAccount: {
|
|
567
|
+
debit: number;
|
|
568
|
+
credit: number;
|
|
569
|
+
balances: boolean;
|
|
570
|
+
};
|
|
571
|
+
diagnostics: readonly {
|
|
572
|
+
code: 'invalid-input' | 'impossible-flow';
|
|
573
|
+
severity: 'error';
|
|
574
|
+
message: string;
|
|
575
|
+
}[];
|
|
576
|
+
trace: readonly ExplanationStep[];
|
|
577
|
+
}
|
|
578
|
+
type ManagementCaseTask = {
|
|
579
|
+
id: string;
|
|
580
|
+
kind: 'job-batch';
|
|
581
|
+
facts: JobBatchCostFacts;
|
|
582
|
+
} | {
|
|
583
|
+
id: string;
|
|
584
|
+
kind: 'process-loss';
|
|
585
|
+
facts: ProcessCostFacts;
|
|
586
|
+
} | {
|
|
587
|
+
id: string;
|
|
588
|
+
kind: 'limited-factor';
|
|
589
|
+
products: readonly LimitedFactorProduct[];
|
|
590
|
+
resourceAvailable: number;
|
|
591
|
+
} | {
|
|
592
|
+
id: string;
|
|
593
|
+
kind: 'relevant-cost';
|
|
594
|
+
alternatives: readonly RelevantCostAlternative[];
|
|
595
|
+
} | {
|
|
596
|
+
id: string;
|
|
597
|
+
kind: 'investment-appraisal';
|
|
598
|
+
facts: InvestmentAppraisalFacts;
|
|
599
|
+
};
|
|
600
|
+
type ManagementCaseSolution = JobBatchCostResult | ProcessCostResult | LimitedFactorResult | RelevantCostDecisionResult | InvestmentAppraisalResult;
|
|
601
|
+
type ManagementCaseTaskResult = {
|
|
602
|
+
id: string;
|
|
603
|
+
kind: 'job-batch';
|
|
604
|
+
completed: boolean;
|
|
605
|
+
solution: JobBatchCostResult;
|
|
606
|
+
} | {
|
|
607
|
+
id: string;
|
|
608
|
+
kind: 'process-loss';
|
|
609
|
+
completed: boolean;
|
|
610
|
+
solution: ProcessCostResult;
|
|
611
|
+
} | {
|
|
612
|
+
id: string;
|
|
613
|
+
kind: 'limited-factor';
|
|
614
|
+
completed: boolean;
|
|
615
|
+
solution: LimitedFactorResult;
|
|
616
|
+
} | {
|
|
617
|
+
id: string;
|
|
618
|
+
kind: 'relevant-cost';
|
|
619
|
+
completed: boolean;
|
|
620
|
+
solution: RelevantCostDecisionResult;
|
|
621
|
+
} | {
|
|
622
|
+
id: string;
|
|
623
|
+
kind: 'investment-appraisal';
|
|
624
|
+
completed: boolean;
|
|
625
|
+
solution: InvestmentAppraisalResult;
|
|
626
|
+
};
|
|
627
|
+
interface ManagementAccountingCase {
|
|
628
|
+
id: string;
|
|
629
|
+
tasks: readonly ManagementCaseTask[];
|
|
630
|
+
}
|
|
631
|
+
interface ManagementAccountingCaseResult {
|
|
632
|
+
caseId: string;
|
|
633
|
+
completed: boolean;
|
|
634
|
+
tasks: readonly ManagementCaseTaskResult[];
|
|
635
|
+
diagnostics: readonly {
|
|
636
|
+
code: 'duplicate-task' | 'task-failed';
|
|
637
|
+
severity: 'error';
|
|
638
|
+
taskId: string;
|
|
639
|
+
message: string;
|
|
640
|
+
}[];
|
|
641
|
+
trace: readonly ExplanationStep[];
|
|
642
|
+
}
|
|
643
|
+
//#endregion
|
|
644
|
+
export { BudgetPeriodInput, CashBudgetFacts, CashBudgetPeriod, CashBudgetPeriodInput, CashBudgetResult, CashTimingAllocation, ClassifiedCost, CostBehavior, CostClassificationSummary, CostFunction, CostTraceability, CostVariance, CostVarianceFacts, CostVarianceResult, CostingStatement, IntegratedBudgetCashAdjustment, IntegratedMasterBudgetFacts, IntegratedMasterBudgetResult, InventoryCostLayer, InventoryCostingDiagnostic, InventoryCostingMethod, InventoryCostingMovement, InventoryCostingResult, InventoryLayerConsumption, InventoryTransaction, InvestmentAccountingProfit, InvestmentAppraisalFacts, InvestmentAppraisalPeriod, InvestmentAppraisalResult, InvestmentCashFlow, JobBatchCostFacts, JobBatchCostResult, LimitedFactorAllocation, LimitedFactorProduct, LimitedFactorResult, ManagementAccountingCase, ManagementAccountingCaseResult, ManagementCaseSolution, ManagementCaseTask, ManagementCaseTaskResult, MarginalAbsorptionFacts, MarginalAbsorptionResult, MasterBudgetFacts, MasterBudgetPeriod, MasterBudgetPeriodPolicy, MasterBudgetResult, OperatingBudgetFacts, OperatingBudgetPeriod, OperatingBudgetResult, ProcessCostFacts, ProcessCostResult, RelevantCashFlow, RelevantCashFlowKind, RelevantCostAlternative, RelevantCostAlternativeResult, RelevantCostDecisionResult };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AccountingPolicy } from "../accounting/types.mjs";
|
|
2
|
+
import { CostVarianceFacts, CostVarianceResult } from "./types.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/finance/management-accounting/variances.d.ts
|
|
5
|
+
declare function analyzeCostVariances(facts: CostVarianceFacts, policy?: AccountingPolicy): CostVarianceResult;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { analyzeCostVariances };
|