text: (this["webpackJsonpmy-app"]=this["webpackJsonpmy-app"]||[]).push([[146,9],{733:function(e,t,r){"use strict";function o(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,"a",(function(){return o}))},736:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var o=r(733);function a(e){e&&e.writtenProperties&&e.writtenProperties.forEach(e=>{const t=e.target;e.newOrigin&&e.oldOrigin!==e.newOrigin&&Object(o.a)(t)&&t.updateOrigin(e.propName,e.newOrigin)})}},747:function(e,t,r){"use strict";r.r(t),r.d(t,"addOrUpdateResource",(function(){return c})),r.d(t,"contentToBlob",(function(){return b})),r.d(t,"fetchResources",(function(){return s})),r.d(t,"getSiblingOfSameType",(function(){return y})),r.d(t,"getSiblingOfSameTypeI",(function(){return h})),r.d(t,"removeAllResources",(function(){return p})),r.d(t,"removeResource",(function(){return l})),r.d(t,"splitPrefixFileNameAndExtension",(function(){return d}));var o=r(47),a=r(8),i=r(2),n=r(16);async function s(e,t={},r){await e.load(r);const o=Object(n.B)(e.itemUrl,"resources"),{start:a=1,num:s=10,sortOrder:c="asc",sortField:l="created"}=t,p={query:{start:a,num:s,sortOrder:c,sortField:l,token:e.apiKey},signal:Object(i.h)(r,"signal")},u=await e.portal._request(o,p);return{total:u.total,nextStart:u.nextStart,resources:u.resources.map(({created:t,size:r,resource:o})=>({created:new Date(t),size:r,resource:e.resourceFromPath(o)}))}}async function c(e,t,r,o){if(!e.hasPath())throw new a.a(`portal-item-resource-${t}:invalid-path`,"Resource does not have a valid path");const s=e.portalItem;await s.load(o);const c=Object(n.B)(s.userItemUrl,"add"===t?"addResources":"updateResources"),[l,p]=u(e.path),d=await b(r),y=new FormData;return l&&"."!==l&&y.append("resourcesPrefix",l),y.append("fileName",p),y.append("file",d,p),y.append("f","json"),Object(i.j)(o)&&o.access&&y.append("access",o.access),await s.portal._request(c,{method:"post",body:y,signal:Object(i.h)(o,"signal")}),e}async function l(e,t,r){if(!t.hasPath())throw new a.a("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const o=Object(n.B)(e.userItemUrl,"removeResources");await e.portal._request(o,{method:"post",query:{resource:t.path},signal:Object(i.h)(r,"signal")}),t.portalItem=null}async function p(e,t){await e.load(t);const r=Object(n.B)(e.userItemUrl,"removeResources");return e.portal._request(r,{method:"post",query:{deleteAll:!0},signal:Object(i.h)(t,"signal")})}function u(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}function d(e){const[t,r]=function(e){const t=Object(n.p)(e);return Object(i.i)(t)?[e,""]:[e.slice(0,e.length-t.length-1),"."+t]}(e),[o,a]=u(t);return[o,a,r]}async function b(e){return e instanceof Blob?e:(await Object(o.default)(e.url,{responseType:"blob"})).data}function y(e,t){if(!e.hasPath())return null;const[r,,o]=d(e.path);return e.portalItem.resourceFromPath(Object(n.B)(r,t+o))}function h(e,t){if(!e.hasPath())return null;const[r,,o]=d(e.path);return e.portalItem.resourceFromPath(Object(n.B)(r,t+o))}},755:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var o=r(47),a=r(8),i=r(2);async function n(e,t,r,n,s,c){let l=null;if(Object(i.j)(r)){const t=e+"/nodepages/",a=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await Object(o.default)(a,{query:{f:"json",token:n},responseType:"json",signal:c})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(d){Object(i.j)(s)&&s.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",a,d),l=d}}if(!t)return null;const p=e+"/nodes/",u=p+(t&&t.split("/").pop());try{return{type:"node",rootNode:(await Object(o.default)(u,{query:{f:"json",token:n},responseType:"json",signal:c})).data,urlPrefix:p}}catch(d){throw new a.a("sceneservice:root-node-missing","Root node missing.",{pageError:l,nodeError:d,url:u})}}},758:function(e,t,r){"use strict";r.d(t,"a",(function(){return K})),r.d(t,"b",(function(){return P}));var o=r(0),a=r(47),i=r(8),n=(r(5),r(11)),s=r(2),c=r(12),l=r(16),p=r(1),u=(r(9),r(4),r(19)),d=r(3),b=r(18),y=r(736),h=r(35),f=r(178),O=r(30),j=r(112),m=r(102),v=r(755),g=r(79),w=r(258),S=r(139),x=r(399),I=r(747);async function T(e,t,r){if(!t||!t.resources)return;const o=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const a=new Set(t.resources.toKeep.map(e=>e.resource.path)),n=new Set,s=[];a.forEach(t=>{o.delete(t),e.paths.push(t)});for(const i of t.resources.toUpdate)if(o.delete(i.resource.path),a.has(i.resource.path)||n.has(i.resource.path)){const{resource:t,content:o,finish:a,error:n}=i,c=Object(I.getSiblingOfSameTypeI)(t,Object(x.a)());e.paths.push(c.path),s.push(R({resource:c,content:o,finish:a,error:n},r))}else e.paths.push(i.resource.path),s.push(_(i,r)),n.add(i.resource.path);for(const i of t.resources.toAdd)s.push(R(i,r)),e.paths.push(i.resource.path);if(o.forEach(e=>{const r=t.portalItem.resourceFromPath(e);s.push(r.portalItem.removeResource(r).catch(()=>{}))}),0===s.length)return;const l=await Object(c.i)(s);Object(c.t)(r);const p=l.filter(e=>"error"in e).map(e=>e.error);if(p.length>0)throw new i.a("save:resources","Failed to save one or more resources",{errors:p})}async function R(e,t){const r=await Object(S.c)(e.resource.portalItem.addResource(e.resource,e.content,t));if(!0!==r.ok)throw e.error&&e.error(r.error),r.error;e.finish&&e.finish(e.resource)}async function _(e,t){const r=await Object(S.c)(e.resource.update(e.content,t));if(!0!==r.ok)throw e.error(r.error),r.error;e.finish(e.resource)}const N=n.a.getLogger("esri.layers.mixins.SceneService"),P=e=>{let t=class extends e{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=Object(c.h)(async(e,t,r)=>{switch(e){case K.SAVE:return this._save(t);case K.SAVE_AS:return this._saveAs(r,t)}})}readSpatialReference(e,t){return this._readSpatialReference(t)}_readSpatialReference(e){if(null!=e.spatialReference)return O.a.fromJSON(e.spatialReference);{const t=e.store,r=t.indexCRS||t.geographicCRS,o=r&&parseInt(r.substring(r.lastIndexOf("/")+1,r.length),10);return null!=o?new O.a(o):null}}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const o=null==e.spatialReference?{...e,spatialReference:this._readSpatialReference(t)}:e;return h.a.fromJSON(o,r)}const o=t.store,a=this._readSpatialReference(t);return null==a||null==o||null==o.extent||!Array.isArray(o.extent)||o.extent.some(e=>e<U)?null:new h.a({xmin:o.extent[0],ymin:o.extent[1],xmax:o.extent[2],ymax:o.extent[3],spatialReference:a})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,o=null!=r.version?r.version.toString():"";return this.parseVersionString(o)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return Object(j.i)(this.url,t.name);let o=t.name;if(!o&&this.url){const e=Object(j.e)(this.url);Object(s.j)(e)&&(o=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(o=r+" - "+o),Object(j.a)(o)}set url(e){const t=Object(j.h)({layer:this,url:e,nonStandardUrlAllowed:!1,logger:N});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,o){Object(j.j)(this,e,"layers",t,o)}get parsedUrl(){const e=this._get("url");if(!e)return null;const t=Object(l.M)(e);return null!=this.layerId&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=Object(v.a)(this.parsedUrl.path,this.rootNode,e,this.apiKey,N,t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===(null==e?void 0:e.type)){var t,r;const o=e.rootIndex%e.pageSize,a=null==(t=e.rootPage)||null==(r=t.nodes)?void 0:r[o];if(null==a||null==a.obb||null==a.obb.center||null==a.obb.halfSize)throw new i.a("sceneservice:invalid-node-page","Invalid node page.");if(a.obb.center[0]<U||null==this.fullExtent||this.fullExtent.hasZ)return;const n=a.obb.halfSize,s=a.obb.center[2],c=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);this.fullExtent.zmin=s-c,this.fullExtent.zmax=s+c}else if("node"===(null==e?void 0:e.type)){var o;const t=null==(o=e.rootNode)?void 0:o.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<U)return;const r=t[2],a=t[3];this.fullExtent.zmin=r-a,this.fullExtent.zmax=r+a}}async _fetchService(e){if(null==this.url)throw new i.a("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await Object(a.default)(this.url,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await Object(a.default)(this.parsedUrl.path,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});t.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const o=t.data;this.read(o,{origin:"service",url:this.parsedUrl}),this.validateLayer(o)}async _fetchVoxelServiceLayer(e){const t=(await Object(a.default)(this.parsedUrl.path+"/layer",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl}),this.validateLayer(t)}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}_updateTypeKeywords(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const o=t.getTypeKeywords();for(const a of o)e.typeKeywords.push(a);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t),r===M.newItem&&(e.typeKeywords=e.typeKeywords.filter(e=>"Hosted Service"!==e)))}async _saveAs(e,t){const r={...L,...t};let o=w.default.from(e);o||(N.error("_saveAs(): requires a portal item parameter"),await Promise.reject(new i.a("sceneservice:portal-item-required","_saveAs() requires a portal item to save to"))),o.id&&(o=o.clone(),o.id=null);const a=o.portal||g.a.getDefault();await this._ensureLoadBeforeSave(),o.type=E,o.portal=a;const n={origin:"portal-item",url:null,messages:[],portal:a,portalItem:o,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},s={layers:[this.write({},n)]};return await Promise.all(n.resources.pendingOperations),await this._validateAgainstJSONSchema(s,n,r),o.url=this.url,o.title||(o.title=this.title),this._updateTypeKeywords(o,r,M.newItem),await a._signIn(),await a.user.addItem({item:o,folder:r&&r.folder,data:s}),await T(this.resourceReferences,n,null),this.portalItem=o,Object(y.a)(n),n.portalItem=o,o}async _save(e){const t={...L,...e};this.portalItem||(N.error("_save(): requires the .portalItem property to be set"),await Promise.reject(new i.a("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService"))),this.portalItem.type!==E&&(N.error("_save(): Non-matching portal item type. Got "+this.portalItem.type+", expected "+E),await Promise.reject(new i.a("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${E}"`))),await this._ensureLoadBeforeSave();const r={origin:"portal-item",url:this.portalItem.itemUrl&&Object(l.M)(this.portalItem.itemUrl),messages:[],portal:this.portalItem.portal||g.a.getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},o={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations),await this._validateAgainstJSONSchema(o,r,t),this.portalItem.url=this.url,this.portalItem.title||(this.portalItem.title=this.title),this._updateTypeKeywords(this.portalItem,t,M.existingItem),await this.portalItem.update({data:o}),await T(this.resourceReferences,r,null),Object(y.a)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,o){let a=t.messages.filter(e=>"error"===e.type).map(e=>new i.a(e.name,e.message,e.details));if(o&&o.validationOptions.ignoreUnsupported&&(a=a.filter(e=>"layer:unsupported"!==e.name&&"symbol:unsupported"!==e.name&&"symbol-layer:unsupported"!==e.name&&"property:unsupported"!==e.name&&"url:unsupported"!==e.name&&"scenemodification:unsupported"!==e.name)),o.validationOptions.enabled||A){const t=(await r.e(259).then(r.bind(null,1071))).validate(e,o.portalItemLayerType);if(t.length>0){const e="Layer item did not validate:\n"+t.join("\n");if(N.error("_validateAgainstJSONSchema(): "+e),"throw"===o.validationOptions.failPolicy){const e=t.map(e=>new i.a("sceneservice:schema-validation",e)).concat(a);throw new i.a("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{combined:e})}}}if(a.length>0)throw new i.a("sceneservice:save","Failed to save SceneService due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:a})}};return Object(o.a)([Object(p.b)(m.c)],t.prototype,"id",void 0),Object(o.a)([Object(p.b)({type:O.a})],t.prototype,"spatialReference",void 0),Object(o.a)([Object(u.a)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),Object(o.a)([Object(p.b)({type:h.a})],t.prototype,"fullExtent",void 0),Object(o.a)([Object(u.a)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),Object(o.a)([Object(p.b)({readOnly:!0,type:f.a})],t.prototype,"heightModelInfo",void 0),Object(o.a)([Object(p.b)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),Object(o.a)([Object(p.b)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),Object(o.a)([Object(p.b)({readOnly:!0})],t.prototype,"version",void 0),Object(o.a)([Object(u.a)("version",["store.version"])],t.prototype,"readVersion",null),Object(o.a)([Object(p.b)({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),Object(o.a)([Object(p.b)({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),Object(o.a)([Object(p.b)({type:String})],t.prototype,"title",void 0),Object(o.a)([Object(u.a)("portal-item","title")],t.prototype,"readTitlePortalItem",null),Object(o.a)([Object(u.a)("service","title",["name"])],t.prototype,"readTitleService",null),Object(o.a)([Object(p.b)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],t.prototype,"layerId",void 0),Object(o.a)([Object(p.b)(m.n)],t.prototype,"url",null),Object(o.a)([Object(b.a)("url")],t.prototype,"writeUrl",null),Object(o.a)([Object(p.b)()],t.prototype,"parsedUrl",null),Object(o.a)([Object(p.b)({readOnly:!0})],t.prototype,"store",void 0),Object(o.a)([Object(p.b)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=Object(o.a)([Object(d.a)("esri.layers.mixins.SceneService")],t),t},U=-1e38,A=!1;var M,F;(F=M||(M={}))[F.existingItem=0]="existingItem",F[F.newItem=1]="newItem";const E="Scene Service",L={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var K;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(K||(K={}))},829:function(e,t,r){"use strict";r.d(t,"a",(function(){return O})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return b}));var o=r(0),a=r(10),i=r(1),n=(r(9),r(5),r(4),r(22)),s=r(3);let c=class extends a.a{constructor(){super(...arguments),this.nodesPerPage=null,this.rootIndex=0,this.lodSelectionMetricType=null}};Object(o.a)([Object(i.b)({type:Number})],c.prototype,"nodesPerPage",void 0),Object(o.a)([Object(i.b)({type:Number})],c.prototype,"rootIndex",void 0),Object(o.a)([Object(i.b)({type:String})],c.prototype,"lodSelectionMetricType",void 0),c=Object(o.a)([Object(s.a)("esri.layer.support.I3SNodePageDefinition")],c);let l=class extends a.a{constructor(){super(...arguments),this.factor=1}};Object(o.a)([Object(i.b)({type:Number,json:{read:{source:"textureSetDefinitionId"}}})],l.prototype,"id",void 0),Object(o.a)([Object(i.b)({type:Number})],l.prototype,"factor",void 0),l=Object(o.a)([Object(s.a)("esri.layer.support.I3SMaterialTexture")],l);let p=class extends a.a{constructor(){super(...arguments),this.baseColorFactor=[1,1,1,1],this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.metallicFactor=1,this.roughnessFactor=1}};Object(o.a)([Object(i.b)({type:[Number]})],p.prototype,"baseColorFactor",void 0),Object(o.a)([Object(i.b)({type:l})],p.prototype,"baseColorTexture",void 0),Object(o.a)([Object(i.b)({type:l})],p.prototype,"metallicRoughnessTexture",void 0),Object(o.a)([Object(i.b)({type:Number})],p.prototype,"metallicFactor",void 0),Object(o.a)([Object(i.b)({type:Number})],p.prototype,"roughnessFactor",void 0),p=Object(o.a)([Object(s.a)("esri.layer.support.I3SMaterialPBRMetallicRoughness")],p);let u=class extends a.a{constructor(){super(...arguments),this.alphaMode="opaque",this.alphaCutoff=.25,this.doubleSided=!1,this.cullFace="none",this.normalTexture=null,this.occlusionTexture=null,this.emissiveTexture=null,this.emissiveFactor=null,this.pbrMetallicRoughness=null}};Object(o.a)([Object(n.a)({opaque:"opaque",mask:"mask",blend:"blend"})],u.prototype,"alphaMode",void 0),Object(o.a)([Object(i.b)({type:Number})],u.prototype,"alphaCutoff",void 0),Object(o.a)([Object(i.b)({type:Boolean})],u.prototype,"doubleSided",void 0),Object(o.a)([Object(n.a)({none:"none",back:"back",front:"front"})],u.prototype,"cullFace",void 0),Object(o.a)([Object(i.b)({type:l})],u.prototype,"normalTexture",void 0),Object(o.a)([Object(i.b)({type:l})],u.prototype,"occlusionTexture",void 0),Object(o.a)([Object(i.b)({type:l})],u.prototype,"emissiveTexture",void 0),Object(o.a)([Object(i.b)({type:[Number]})],u.prototype,"emissiveFactor",void 0),Object(o.a)([Object(i.b)({type:p})],u.prototype,"pbrMetallicRoughness",void 0),u=Object(o.a)([Object(s.a)("esri.layer.support.I3SMaterialDefinition")],u);let d=class extends a.a{};Object(o.a)([Object(i.b)({type:String,json:{read:{source:["name","index"],reader:(e,t)=>null!=e?e:""+t.index}}})],d.prototype,"name",void 0),Object(o.a)([Object(n.a)({jpg:"jpg",png:"png",dds:"dds","ktx-etc2":"ktx-etc2",ktx2:"ktx2",basis:"basis"})],d.prototype,"format",void 0),d=Object(o.a)([Object(s.a)("esri.layer.support.I3STextureFormat")],d);let b=class extends a.a{constructor(){super(...arguments),this.atlas=!1}};Object(o.a)([Object(i.b)({type:[d]})],b.prototype,"formats",void 0),Object(o.a)([Object(i.b)({type:Boolean})],b.prototype,"atlas",void 0),b=Object(o.a)([Object(s.a)("esri.layer.support.I3STextureSetDefinition")],b);let y=class extends a.a{};Object(o.a)([Object(n.a)({Float32:"Float32",UInt64:"UInt64",UInt32:"UInt32",UInt16:"UInt16",UInt8:"UInt8"})],y.prototype,"type",void 0),Object(o.a)([Object(i.b)({type:Number})],y.prototype,"component",void 0),y=Object(o.a)([Object(s.a)("esri.layer.support.I3SGeometryAttribute")],y);let h=class extends a.a{};Object(o.a)([Object(n.a)({draco:"draco"})],h.prototype,"encoding",void 0),Object(o.a)([Object(i.b)({type:[String]})],h.prototype,"attributes",void 0),h=Object(o.a)([Object(s.a)("esri.layer.support.I3SGeometryCompressedAttributes")],h);let f=class extends a.a{constructor(){super(...arguments),this.offset=0}};Object(o.a)([Object(i.b)({type:Number})],f.prototype,"offset",void 0),Object(o.a)([Object(i.b)({type:y})],f.prototype,"position",void 0),Object(o.a)([Object(i.b)({type:y})],f.prototype,"normal",void 0),Object(o.a)([Object(i.b)({type:y})],f.prototype,"uv0",void 0),Object(o.a)([Object(i.b)({type:y})],f.prototype,"color",void 0),Object(o.a)([Object(i.b)({type:y})],f.prototype,"uvRegion",void 0),Object(o.a)([Object(i.b)({type:y})],f.prototype,"featureId",void 0),Object(o.a)([Object(i.b)({type:y})],f.prototype,"faceRange",void 0),Object(o.a)([Object(i.b)({type:h})],f.prototype,"compressedAttributes",void 0),f=Object(o.a)([Object(s.a)("esri.layer.support.I3SGeometryBuffer")],f);let O=class extends a.a{};Object(o.a)([Object(n.a)({triangle:"triangle"})],O.prototype,"topology",void 0),Object(o.a)([Object(i.b)()],O.prototype,"geometryBuffers",void 0),O=Object(o.a)([Object(s.a)("esri.layer.support.I3SGeometryDefinition")],O)},862:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return X}));var o=r(0),a=r(8),i=r(57),n=r(2),s=r(371),c=r(12),l=r(31),p=r(1),u=(r(9),r(5),r(4),r(19)),d=r(3),b=r(733),y=r(16),h=r(399),f=r(116),O=r(42);function j(e){return m[function(e){return e instanceof Blob?e.type:function(e){const t=Object(y.p)(e);return w[t]||v}(e.url)}(e)]||g}const m={},v="text/plain",g=m[v],w={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip"};for(const Y in w)m[w[Y]]=Y;var S=r(75);function x(e){const t=Object(n.j)(e)&&e.origins?e.origins:[void 0];return(r,o)=>{const a=function(e,t,r){if(Object(n.j)(e)&&"resource"===e.type)return function(e,t,r){const o=Object(f.b)(t,r);return{type:String,read:(e,t,r)=>{const a=Object(S.e)(e,t,r);return o.type===String?a:"function"==typeof o.type?new o.type({url:a}):void 0},write:{writer(t,a,i,s){if(!s||!s.resources)return"string"==typeof t?void(a[i]=Object(S.f)(t,s)):void(a[i]=t.write({},s));const c=(u=t,Object(n.i)(u)?null:"string"==typeof u?u:u.url),l=c?Object(S.f)(c,{...s,verifyItemRelativeUrls:s&&s.verifyItemRelativeUrls?{writtenUrls:s.verifyItemRelativeUrls.writtenUrls,rootPath:null}:null},S.a.NO):null,p=o.type!==String&&(!Object(b.a)(this)||s&&s.origin&&this.originIdOf(r)>Object(O.e)(s.origin));var u;s&&s.portalItem&&Object(n.j)(l)&&!Object(y.u)(l)?p?function(e,t,r,o,a,i,n,s){const c=n.portalItem.resourceFromPath(o),l=R(r,o,n);j(l)===Object(y.p)(c.path)?(T(e,t,c,l,n.resources.toUpdate),a[i]=o):I(e,t,r,o,a,i,n,s)}(this,r,t,l,a,i,s,e):function(e,t,r,o){o.resources.toKeep.push({resource:o.portalItem.resourceFromPath(e)}),t[r]=e}(l,a,i,s):s&&s.portalItem&&(Object(n.i)(l)||Object(n.j)(Object(S.c)(l))||Object(y.v)(l)||p)?I(this,r,t,l,a,i,s,e):a[i]=l}}}}(e,t,r);switch(Object(n.j)(e)&&e.type?e.type:"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=S.d;return{read:e,write:t}}}}(e,r,o);for(const e of t){const t=Object(p.c)(r,e,o);for(const e in a)t[e]=a[e]}}}function I(e,t,o,a,i,s,c,l){const p=Object(h.a)(),u=R(o,a,c),d=Object(y.B)(Object(n.h)(l,"prefix"),p),b=`${d}.${j(u)}`,f=c.portalItem.resourceFromPath(b);Object(y.v)(a)&&c.resources.pendingOperations.push(async function(e){const t=(await Promise.resolve().then(r.bind(null,47))).default,{data:o}=await t(e,{responseType:"blob"});return o}(a).then(e=>{f.path=`${d}.${j(e)}`,i[s]=f.itemRelativeUrl}).catch(()=>{})),T(e,t,f,u,c.resources.toAdd),i[s]=f.itemRelativeUrl}function T(e,t,r,o,a){a.push({resource:r,content:o,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function R(e,t,r){return"string"==typeof e?{url:t}:new Blob([JSON.stringify(e.toJSON(r))],{type:"application/json"})}var _,N=r(227),P=r(391),U=r(386),A=r(375),M=r(373),F=r(374),E=r(758),L=r(102),K=r(829),k=r(47),q=r(24),B=r(10),V=(r(64),r(6)),J=r(90),D=r(18),z=r(77),C=r(86);let $=_=class extends B.a{constructor(e){super(e),this.geometry=null,this.type="clip"}writeGeometry(e,t,r,o){if(o.layer&&o.layer.spatialReference&&!o.layer.spatialReference.equals(this.geometry.spatialReference)){if(!Object(z.a)(e.spatialReference,o.layer.spatialReference))return void(o&&o.messages&&o.messages.push(new J.a("scenemodification:unsupported","Scene modifications with incompatible spatial references are not supported",{modification:this,spatialReference:o.layer.spatialReference,context:o})));const a=new C.a;Object(z.k)(e,a,o.layer.spatialReference),t[r]=a.toJSON(o)}else t[r]=e.toJSON(o);delete t[r].spatialReference}clone(){return new _({geometry:Object(V.a)(this.geometry),type:this.type})}};Object(o.a)([Object(p.b)({type:C.a}),x()],$.prototype,"geometry",void 0),Object(o.a)([Object(D.a)(["web-scene","portal-item"],"geometry")],$.prototype,"writeGeometry",null),Object(o.a)([Object(p.b)({type:["clip","mask","replace"],nonNullable:!0}),x()],$.prototype,"type",void 0),$=_=Object(o.a)([Object(d.a)("esri.layers.support.SceneModification")],$);const G=$;var Z;let H=Z=class extends(Object(B.b)(q.a.ofType(G))){constructor(e){super(e),this.url=null}toJSON(e){return this.toArray().map(t=>t.toJSON(e)).filter(e=>!!e.geometry)}clone(){return new Z({url:this.url,items:this.items.map(e=>e.clone())})}_readModifications(e,t){for(const r of e)this.add(G.fromJSON(r,t))}static fromJSON(e,t){const r=new Z;return r._readModifications(e,t),r}static async fromUrl(e,t,r){const o={url:Object(y.M)(e),origin:"service"},a=await Object(k.default)(e,{responseType:"json",signal:Object(n.h)(r,"signal")}),i=t.toJSON(),s=[];for(const n of a.data)s.push(G.fromJSON({...n,geometry:{...n.geometry,spatialReference:i}},o));return new Z({url:e,items:s})}};Object(o.a)([Object(p.b)({type:String})],H.prototype,"url",void 0),H=Z=Object(o.a)([Object(d.a)("esri.layers.support.SceneModifications")],H);const Q=H;let W=class extends(Object(E.b)(Object(U.a)(Object(A.a)(Object(M.a)(Object(F.a)(Object(s.a)(Object(P.a)(N.a)))))))){constructor(...e){super(...e),this.handles=new i.a,this.geometryType="mesh",this.operationalLayerType="IntegratedMeshLayer",this.type="integrated-mesh",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile="mesh-pyramids",this.modifications=null,this._modificationsSource=null,this.elevationInfo=null,this.path=null}destroy(){this.handles.destroy()}initialize(){this.handles.add(Object(l.b)(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,l.c))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readModifications(e,t,r){this._modificationsSource={url:Object(S.b)(e,r),context:r}}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const t=Object(n.h)(e,"signal");try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(r){Object(c.s)(r)}if(await this._fetchService(t),Object(n.j)(this._modificationsSource)){const t=await Q.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t)}beforeSave(){if(!Object(n.i)(this._modificationsSource))return this.load().then(()=>{},()=>{})}async saveAs(e,t){return this._debouncedSaveOperations(E.a.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"};return this._debouncedSaveOperations(E.a.SAVE,e)}validateLayer(e){if(e.layerType&&"IntegratedMesh"!==e.layerType)throw new a.a("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a.a("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(this.version.major>1)throw new a.a("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}};Object(o.a)([Object(p.b)({type:String,readOnly:!0})],W.prototype,"geometryType",void 0),Object(o.a)([Object(p.b)({type:["show","hide"]})],W.prototype,"listMode",void 0),Object(o.a)([Object(p.b)({type:["IntegratedMeshLayer"]})],W.prototype,"operationalLayerType",void 0),Object(o.a)([Object(p.b)({json:{read:!1},readOnly:!0})],W.prototype,"type",void 0),Object(o.a)([Object(p.b)({type:K.c,readOnly:!0})],W.prototype,"nodePages",void 0),Object(o.a)([Object(p.b)({type:[K.b],readOnly:!0})],W.prototype,"materialDefinitions",void 0),Object(o.a)([Object(p.b)({type:[K.d],readOnly:!0})],W.prototype,"textureSetDefinitions",void 0),Object(o.a)([Object(p.b)({type:[K.a],readOnly:!0})],W.prototype,"geometryDefinitions",void 0),Object(o.a)([Object(p.b)({readOnly:!0})],W.prototype,"serviceUpdateTimeStamp",void 0),Object(o.a)([Object(p.b)({type:Q}),x({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],W.prototype,"modifications",void 0),Object(o.a)([Object(u.a)(["web-scene","portal-item"],"modifications")],W.prototype,"readModifications",null),Object(o.a)([Object(p.b)(L.b)],W.prototype,"elevationInfo",void 0),Object(o.a)([Object(p.b)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],W.prototype,"path",void 0),W=Object(o.a)([Object(d.a)("esri.layers.IntegratedMeshLayer")],W);const X=W}}]);
  //# sourceMappingURL=146.93187ad7.chunk.js.map