// All material copyright ESRI, All Rights Reserved, unless otherwise specified.// See https://js.arcgis.com/4.6/esri/copyright.txt for details.//>>builtdefine("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/_base/lang ../core/JSONSupport ../core/kebabDictionary ../core/Warning ../core/accessorSupport/decorators ./support/scaleUtils".split(" "),function(v,w,q,f,r,t,g,l,d,m){functionn(d,a){returnnewl("height-unit:unsupported","Height unit of value '"+d+"' is not supported",a)}functionu(d,a){returnnewl("height-model:unsupported","Height model of value '"+d+"' is not supported",a)}varp=g({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"},{ignoreUnknown:!0}),k=g({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"},{ignoreUnknown:!0});returnfunction(g){functiona(e){e=g.call(this)||this;e.heightModel="gravity-related-height";e.heightUnit="meters";e.vertCRS=null;returne}q(a,g);h=a;a.prototype.writeHeightModel=function(e,a,c){returnp.write(e,a,c)};a.prototype.readHeightModel=function(e,a,c){if(a=p.read(e))returna;c&&c.messages&&c.messages.push(u(e,{context:c}));returnnull};a.prototype.readHeightUnit=function(e,a,c){if(a=k.read(e))returna;c&&c.messages&&c.messages.push(n(e,{context:c}));returnnull};a.prototype.readHeightUnitService=function(a,b,c){if(b=m.unitFromRESTJSON(a)||k.read(a))returnb;c&&c.messages&&c.messages.push(n(a,{context:c}));returnnull};a.prototype.readVertCRS=function(a,b){returnb.vertCRS||b.ellipsoid||b.geoid};a.prototype.clone=function(){returnnewh({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})};a.prototype.equals=function(a){returna?this===a?!0:this.heightModel===a.heightModel&&this.heightUnit===a.heightUnit&&this.vertCRS===a.vertCRS:!1};a.deriveUnitFromSR=function(a,b){b=m.getVerticalUnitStringForSR(b);returnnewh({heightModel:a.heightModel,heightUnit:b,vertCRS:a.vertCRS})};a.prototype.write=function(a,b){b=r.mixin({},{origin:"web-scene"},b);returnthis.inherited(arguments,[a,b])};a.fromJSON=function(a){if(!a)returnnull;varb=newh;b.read(a,{origin:"web-scene"});returnb};f([d.property({type:String,constructOnly:!0})],a.prototype,"heightModel",void0);f([d.writer("web-scene","heightModel")],a.prototype,"writeHeightModel",null);f([d.reader(["web-scene","service"],"heightModel")],a.prototype,"readHeightModel",null);f([d.property({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:k.write}}}})],a.prototype,"heightUnit",void0);f([d.reader("web-scene","heightUnit")],a.prototype,"readHeightUnit",null);f([d.reader("service","heightUnit")],a.prototype,"readHeightUnitService",null);f([d.property({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],a.prototype,"vertCRS",void0);f([d.reader("service","vertCRS",["vertCRS","ellipsoid","geoid"])],a.prototype,"readVertCRS",null);returna=h=f([d.subclass("esri.HeightModelInfo")],a);varh}(d.declared(t))});