// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define("../chunks/tslib.es6 ../core/lang ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/accessorSupport/decorators/subclass ../core/accessorSupport/decorators/writer ./Extent ./Geometry ./Point ./SpatialReference ./support/extentUtils ./support/zmUtils".split(" "),function(k,n,l,f,x,q,r,t,u,g,v,w,p){var m;f=m=class extends u{constructor(...a){super(...a);this.paths=[];this.type="polyline"}normalizeCtorArgs(a,b){let c=null,e,d,h=null;a&&!Array.isArray(a)?(c=a.paths?? null,b||(a.spatialReference?b=a.spatialReference:a.paths||(b=a)),e=a.hasZ,d=a.hasM):c=a;c=c||[];b=b||v.WGS84;c.length&&null!=c[0]?.[0]&&"number"===typeof c[0][0]&&(c=[c]);if(h=c[0]?.[0])void 0===e&&void 0===d?(e=2new g(c,b));this.notifyChange("paths");return a}removePoint(a,b){if(!this._validateInputs(a,b))return null;a=new g(this.paths[a].splice(b,1)[0],this.spatialReference);this.notifyChange("paths");return a}setPoint(a,b,c){if(!this._validateInputs(a,b))return this;p.updateSupportFromPoint(this,c);Array.isArray(c)||(c=c.toArray());this.paths[a][b]=c;this.notifyChange("paths");return this}_validateInputs(a,b,c=!1){return null== a||0>a||a>=this.paths.length||null!=b&&(a=this.paths[a],c&&(0>b||b>a.length)||!c&&(0>b||b>=a.length))?!1:!0}toJSON(a){return this.write({},a)}};k.__decorate([l.property({readOnly:!0})],f.prototype,"cache",null);k.__decorate([l.property({readOnly:!0})],f.prototype,"extent",null);k.__decorate([l.property({type:[[[Number]]],json:{write:{isRequired:!0}}})],f.prototype,"paths",void 0);k.__decorate([r.writer("paths")],f.prototype,"writePaths",null);f=m=k.__decorate([q.subclass("esri.geometry.Polyline")], f);f.prototype.toJSON.isDefaultToJSON=!0;return f});