// 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/Error ../core/Logger ../core/MultiOriginJSONSupport ../core/promiseUtils ../core/reactiveUtils ../core/accessorSupport/decorators/property ../core/has ../core/RandomLCG ../core/accessorSupport/decorators/reader ../core/accessorSupport/decorators/subclass ../core/accessorSupport/decorators/persistable ./Layer ./mixins/APIKeyMixin ./mixins/ArcGISService ./mixins/CustomParametersMixin ./mixins/OperationalLayer ./mixins/PortalLayer ./mixins/ScaleRangeLayer ./mixins/SceneService ./support/commonProperties ./support/I3SLayerDefinitions ./support/SceneModifications ../support/elevationInfoUtils ../chunks/persistableUrlUtils".split(" "), function(c,k,m,b,q,n,d,E,F,r,t,u,v,w,x,y,z,A,B,l,C,f,p,g,D){b=class extends l.SceneService(x.ArcGISService(z.OperationalLayer(A.PortalLayer(B.ScaleRangeLayer(b.MultiOriginJSONMixin(y.CustomParametersMixin(w.APIKeyMixin(v)))))))){constructor(...a){super(...a);this.geometryType="mesh";this.operationalLayerType="IntegratedMeshLayer";this.type="integrated-mesh";this.serviceUpdateTimeStamp=this.geometryDefinitions=this.textureSetDefinitions=this.materialDefinitions=this.nodePages=null;this.profile="mesh-pyramids"; this.path=this._modificationsSource=this.modifications=null}initialize(){this.addHandles(n.on(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,n.sync))}normalizeCtorArgs(a,e){return"string"===typeof a?{url:a,...e}:a}readModifications(a,e,h){this._modificationsSource={url:D.fromJSON(a,h),context:h}}set elevationInfo(a){this._set("elevationInfo",a);this._validateElevationInfo()}async load(a){this.addResolvingPromise(this._doLoad(a));return this}async _doLoad(a){const e= a?.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},a)}catch(h){q.throwIfAbortError(h)}await this._fetchService(e);null!=this._modificationsSource&&(a=await p.fromUrl(this._modificationsSource.url,this.spatialReference,a),this.setAtOrigin("modifications",a,this._modificationsSource.context.origin),this._modificationsSource=null);await this._fetchIndexAndUpdateExtent(this.nodePages,e)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},()=>{})}async saveAs(a, e){return this._debouncedSaveOperations(l.SaveOperationType.SAVE_AS,{...e,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},a)}async save(){return this._debouncedSaveOperations(l.SaveOperationType.SAVE,{getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"})}validateLayer(a){if(a.layerType&&"IntegratedMesh"!==a.layerType)throw new k("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:a.layerType}); if(isNaN(this.version.major)||isNaN(this.version.minor))throw new k("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(1