/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../chunks/_rollupPluginBabelHelpers","../chunks/tslib.es6","../geometry","./dimensionUtils","../core/Clonable","../core/Cyclical","../core/maybe","../core/accessorSupport/decorators/property","../core/arrayUtils","../core/has","../core/accessorSupport/decorators/cast","../core/accessorSupport/decorators/subclass","../core/accessorSupport/ensureType","../geometry/Extent","../geometry/Point"],(function(e,t,o,r,n,s,i,p,a,c,l,y,u,d,_){"use strict";let h=function(t){function o(e){var o;return(o=t.call(this,e)||this).type="length",o.startPoint=null,o.endPoint=null,o.axis="horizontal",o.offset=0,o.heading=0,o}return e._inheritsLoose(o,t),e._createClass(o,[{key:"extent",get:function(){if(i.isNone(this.startPoint))return null;const e=d.fromPoint(this.startPoint);return i.isSome(this.endPoint)&&e.union(d.fromPoint(this.endPoint)),e}}]),o}(n.Clonable);t.__decorate([p.property({type:["length"]})],h.prototype,"type",void 0),t.__decorate([p.property({type:_})],h.prototype,"startPoint",void 0),t.__decorate([p.property({type:_})],h.prototype,"endPoint",void 0),t.__decorate([p.property({type:r.lengthDimensionAxes,nonNullable:!0})],h.prototype,"axis",void 0),t.__decorate([p.property({type:Number,nonNullable:!0})],h.prototype,"offset",void 0),t.__decorate([p.property({type:Number,nonNullable:!0}),l.cast((e=>s.cyclicalDegrees.normalize(u.ensureNumber(e),0,!0)))],h.prototype,"heading",void 0),t.__decorate([p.property({readOnly:!0})],h.prototype,"extent",null),h=t.__decorate([y.subclass("esri.analysis.LengthDimension")],h);return h}));
