/*!
 * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
 */
import { e as requireModel_entity_pb, f as requireGeometry_pb } from './wrappers_pb-aFAwKqIf.js';
import { m as mapper } from './bundle-DLfw87TV.js';
import { W as fromPbPlane, n as fromPbVector3f } from './streamAttributes-B6xi3kRV.js';

var model_entity_pbExports = requireModel_entity_pb();

const mapPlanePair = mapper.defineMapper(mapper.read(mapper.mapRequiredProp('start', fromPbPlane), mapper.mapRequiredProp('end', fromPbPlane)), ([start, end]) => ({ start, end }));
const mapPlanarDistance = mapper.defineMapper(mapper.read(mapper.getProp('distance'), mapper.mapRequiredProp('planes', mapper.compose(mapPlanePair, mapper.requiredProp('start'))), mapper.mapRequiredProp('planes', mapper.compose(mapPlanePair, mapper.requiredProp('end')))), ([distance, plane1, plane2]) => ({
    type: 'planar-distance',
    distance,
    plane1,
    plane2,
}));
const mapPlanarAngle = mapper.defineMapper(mapper.read(mapper.getProp('angleInRadians'), mapper.mapRequiredProp('planes', mapper.compose(mapPlanePair, mapper.requiredProp('start'))), mapper.mapRequiredProp('planes', mapper.compose(mapPlanePair, mapper.requiredProp('end')))), ([angle, plane1, plane2]) => ({
    type: 'planar-angle',
    angle,
    plane1,
    plane2,
}));
const mapMinimumDistance = mapper.defineMapper(mapper.read(mapper.getProp('distance'), mapper.mapRequiredProp('closestPoint1', fromPbVector3f), mapper.mapRequiredProp('closestPoint2', fromPbVector3f)), ([distance, point1, point2]) => ({
    type: 'minimum-distance',
    distance,
    point1,
    point2,
}));
const mapSurfaceArea = mapper.defineMapper(mapper.read(mapper.getProp('area')), ([area]) => ({
    type: 'surface-area',
    area,
}));
const mapPlanarDistanceFromResult = mapper.mapProp('planarDistance', mapper.ifDefined(mapPlanarDistance));
const mapPlanarAngleFromResult = mapper.mapProp('planarAngle', mapper.ifDefined(mapPlanarAngle));
const mapMinimumDistanceFromResult = mapper.mapProp('minimumDistance', mapper.ifDefined(mapMinimumDistance));
const mapSurfaceAreaFromResult = mapper.mapProp('totalSurfaceArea', mapper.ifDefined(mapSurfaceArea));
const mapMeasurementResult = mapper.compose(mapper.pickFirst(mapPlanarDistanceFromResult, mapPlanarAngleFromResult, mapMinimumDistanceFromResult, mapSurfaceAreaFromResult), mapper.required('Result field'));
const mapMeasureResponse = mapper.defineMapper(mapper.read(mapper.mapRequiredProp('outcome', mapper.mapRequiredProp('resultsList', mapper.mapArray(mapMeasurementResult))), mapper.mapRequiredProp('outcome', mapper.getProp('isApproximate'))), ([results, isApproximate]) => ({ results, isApproximate }));
const mapMeasureResponseOrThrow = mapper.ifInvalidThrow(mapMeasureResponse);

var geometry_pbExports = requireGeometry_pb();

export { mapMeasureResponseOrThrow as a, geometry_pbExports as g, model_entity_pbExports as m };
//# sourceMappingURL=geometry_pb-BPrLQ_K_.js.map

//# sourceMappingURL=geometry_pb-BPrLQ_K_.js.map