IntegratedMeshLayer-7YTE5FG5.js 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. import {
  2. g
  3. } from "./chunk-IN44RUPP.js";
  4. import {
  5. l as l2,
  6. m,
  7. s as s2,
  8. u as u2
  9. } from "./chunk-NXF22CVW.js";
  10. import {
  11. L,
  12. N
  13. } from "./chunk-DRPR56GA.js";
  14. import "./chunk-LX2NI53X.js";
  15. import "./chunk-IZUZZJS7.js";
  16. import "./chunk-56OWH4DC.js";
  17. import "./chunk-7B57NUGF.js";
  18. import {
  19. An,
  20. mn
  21. } from "./chunk-P24XEEHY.js";
  22. import "./chunk-SAJAEMIJ.js";
  23. import "./chunk-I4RYNNL6.js";
  24. import {
  25. i
  26. } from "./chunk-WWXZOC2Y.js";
  27. import {
  28. p
  29. } from "./chunk-ZOKNWEG3.js";
  30. import "./chunk-SZFMKPVM.js";
  31. import {
  32. U,
  33. a
  34. } from "./chunk-TJV6ODRM.js";
  35. import {
  36. v as v2
  37. } from "./chunk-JUWKPBLS.js";
  38. import {
  39. c as c2
  40. } from "./chunk-WLSB4F4I.js";
  41. import {
  42. d
  43. } from "./chunk-GLSWDDR3.js";
  44. import {
  45. O
  46. } from "./chunk-MIQGEDET.js";
  47. import "./chunk-DUEMJ5XS.js";
  48. import "./chunk-VRLXUHP2.js";
  49. import "./chunk-3LVSQLWJ.js";
  50. import {
  51. c
  52. } from "./chunk-4ONPMX2F.js";
  53. import "./chunk-CRGY2SDS.js";
  54. import "./chunk-4T5ZGMEN.js";
  55. import {
  56. t as t4
  57. } from "./chunk-PLWDAYK7.js";
  58. import "./chunk-VGWC3IKZ.js";
  59. import "./chunk-2H5MD622.js";
  60. import "./chunk-3RSFVUKZ.js";
  61. import "./chunk-5N7JLUJJ.js";
  62. import "./chunk-P3XKUGLS.js";
  63. import "./chunk-2ZSOO377.js";
  64. import "./chunk-YUA3AHKR.js";
  65. import "./chunk-LU5IJZB4.js";
  66. import "./chunk-7IBV2TRE.js";
  67. import "./chunk-ZLNEXZAN.js";
  68. import "./chunk-5UVJ64RB.js";
  69. import "./chunk-SFEFRQCL.js";
  70. import {
  71. b
  72. } from "./chunk-DXVOOCG4.js";
  73. import "./chunk-3GZSQU56.js";
  74. import "./chunk-RYY6632W.js";
  75. import "./chunk-DW42UVIT.js";
  76. import "./chunk-YAEIHDJH.js";
  77. import "./chunk-TJNOJH33.js";
  78. import "./chunk-OSHI574D.js";
  79. import "./chunk-ETGAZ7LF.js";
  80. import "./chunk-75U5LM2V.js";
  81. import "./chunk-RMDDCMKS.js";
  82. import {
  83. v2 as v
  84. } from "./chunk-VCH45Q2I.js";
  85. import {
  86. j
  87. } from "./chunk-LBW34VZ2.js";
  88. import "./chunk-GSSTTHIT.js";
  89. import "./chunk-YFSLJIO4.js";
  90. import "./chunk-IM3LVQXV.js";
  91. import "./chunk-55RWC67C.js";
  92. import "./chunk-HZRKBTHJ.js";
  93. import {
  94. U as U2
  95. } from "./chunk-DVUG3KID.js";
  96. import "./chunk-FWSQEIAR.js";
  97. import {
  98. j as j2
  99. } from "./chunk-VEGAOVMY.js";
  100. import {
  101. o
  102. } from "./chunk-6T6G6LCQ.js";
  103. import "./chunk-YEJL5NEF.js";
  104. import {
  105. r as r2
  106. } from "./chunk-PQFTYGF5.js";
  107. import {
  108. e,
  109. l3 as l,
  110. n5 as n,
  111. t2,
  112. t5 as t3,
  113. u2 as u,
  114. y3 as y2
  115. } from "./chunk-2Z2TG5CU.js";
  116. import "./chunk-6KZ2LTDA.js";
  117. import "./chunk-U2XHEJM7.js";
  118. import "./chunk-SQOPWYIT.js";
  119. import {
  120. w
  121. } from "./chunk-V6P2MAQQ.js";
  122. import {
  123. s3 as s
  124. } from "./chunk-E5O6P5I2.js";
  125. import {
  126. y
  127. } from "./chunk-SPWQ3AWG.js";
  128. import "./chunk-2TIUKVZN.js";
  129. import {
  130. q,
  131. r,
  132. t
  133. } from "./chunk-YXWMMD76.js";
  134. import "./chunk-S5KM4IGW.js";
  135. // node_modules/@arcgis/core/layers/support/SceneModification.js
  136. var m2;
  137. var y3 = m2 = class extends l {
  138. constructor(e2) {
  139. super(e2), this.geometry = null, this.type = "clip";
  140. }
  141. writeGeometry(e2, r3, o2, s3) {
  142. if (s3.layer && s3.layer.spatialReference && !s3.layer.spatialReference.equals(this.geometry.spatialReference)) {
  143. if (!An(e2.spatialReference, s3.layer.spatialReference))
  144. return void (s3 && s3.messages && s3.messages.push(new t3("scenemodification:unsupported", "Scene modifications with incompatible spatial references are not supported", { modification: this, spatialReference: s3.layer.spatialReference, context: s3 })));
  145. const p2 = new v();
  146. mn(e2, p2, s3.layer.spatialReference), r3[o2] = p2.toJSON(s3);
  147. } else
  148. r3[o2] = e2.toJSON(s3);
  149. delete r3[o2].spatialReference;
  150. }
  151. clone() {
  152. return new m2({ geometry: y(this.geometry), type: this.type });
  153. }
  154. };
  155. e([y2({ type: v }), g()], y3.prototype, "geometry", void 0), e([r2(["web-scene", "portal-item"], "geometry")], y3.prototype, "writeGeometry", null), e([y2({ type: ["clip", "mask", "replace"], nonNullable: true }), g()], y3.prototype, "type", void 0), y3 = m2 = e([n("esri.layers.support.SceneModification")], y3);
  156. var f = y3;
  157. // node_modules/@arcgis/core/layers/support/SceneModifications.js
  158. var a2;
  159. var n2 = a2 = class extends u(j.ofType(f)) {
  160. constructor(r3) {
  161. super(r3), this.url = null;
  162. }
  163. clone() {
  164. return new a2({ url: this.url, items: this.items.map((r3) => r3.clone()) });
  165. }
  166. toJSON(r3) {
  167. return this.toArray().map((o2) => o2.toJSON(r3)).filter((r4) => !!r4.geometry);
  168. }
  169. static fromJSON(r3, o2) {
  170. const t5 = new a2();
  171. for (const e2 of r3)
  172. t5.add(f.fromJSON(e2, o2));
  173. return t5;
  174. }
  175. static async fromUrl(r3, t5, e2) {
  176. const c3 = { url: j2(r3), origin: "service" }, p2 = await U2(r3, { responseType: "json", signal: q(e2, "signal") }), n3 = t5.toJSON(), l4 = [];
  177. for (const o2 of p2.data)
  178. l4.push(f.fromJSON({ ...o2, geometry: { ...o2.geometry, spatialReference: n3 } }, c3));
  179. return new a2({ url: r3, items: l4 });
  180. }
  181. };
  182. e([y2({ type: String })], n2.prototype, "url", void 0), n2 = a2 = e([n("esri.layers.support.SceneModifications")], n2);
  183. var l3 = n2;
  184. // node_modules/@arcgis/core/layers/IntegratedMeshLayer.js
  185. var b2 = class extends N(p(c2(v2(t4(O(i(b))))))) {
  186. constructor(...e2) {
  187. super(...e2), this._handles = new t2(), 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;
  188. }
  189. destroy() {
  190. this._handles.destroy();
  191. }
  192. initialize() {
  193. this._handles.add(a(() => this.modifications, "after-changes", () => this.modifications = this.modifications, U));
  194. }
  195. normalizeCtorArgs(e2, t5) {
  196. return "string" == typeof e2 ? { url: e2, ...t5 } : e2;
  197. }
  198. readModifications(e2, t5, r3) {
  199. this._modificationsSource = { url: c(e2, r3), context: r3 };
  200. }
  201. async load(e2) {
  202. return this.addResolvingPromise(this._doLoad(e2)), this;
  203. }
  204. async _doLoad(e2) {
  205. const t5 = q(e2, "signal");
  206. try {
  207. await this.loadFromPortal({ supportedTypes: ["Scene Service"] }, e2);
  208. } catch (r3) {
  209. w(r3);
  210. }
  211. if (await this._fetchService(t5), r(this._modificationsSource)) {
  212. const t6 = await l3.fromUrl(this._modificationsSource.url, this.spatialReference, e2);
  213. this.setAtOrigin("modifications", t6, this._modificationsSource.context.origin), this._modificationsSource = null;
  214. }
  215. await this._fetchIndexAndUpdateExtent(this.nodePages, t5);
  216. }
  217. beforeSave() {
  218. if (!t(this._modificationsSource))
  219. return this.load().then(() => {
  220. }, () => {
  221. });
  222. }
  223. async saveAs(e2, t5) {
  224. return this._debouncedSaveOperations(L.SAVE_AS, { ...t5, getTypeKeywords: () => this._getTypeKeywords(), portalItemLayerType: "integrated-mesh" }, e2);
  225. }
  226. async save() {
  227. const e2 = { getTypeKeywords: () => this._getTypeKeywords(), portalItemLayerType: "integrated-mesh" };
  228. return this._debouncedSaveOperations(L.SAVE, e2);
  229. }
  230. validateLayer(e2) {
  231. if (e2.layerType && "IntegratedMesh" !== e2.layerType)
  232. throw new s("integrated-mesh-layer:layer-type-not-supported", "IntegratedMeshLayer does not support this layer type", { layerType: e2.layerType });
  233. if (isNaN(this.version.major) || isNaN(this.version.minor))
  234. throw new s("layer:service-version-not-supported", "Service version is not supported.", { serviceVersion: this.version.versionString, supportedVersions: "1.x" });
  235. if (this.version.major > 1)
  236. throw new s("layer:service-version-too-new", "Service version is too new.", { serviceVersion: this.version.versionString, supportedVersions: "1.x" });
  237. }
  238. _getTypeKeywords() {
  239. return ["IntegratedMeshLayer"];
  240. }
  241. };
  242. e([y2({ type: String, readOnly: true })], b2.prototype, "geometryType", void 0), e([y2({ type: ["show", "hide"] })], b2.prototype, "listMode", void 0), e([y2({ type: ["IntegratedMeshLayer"] })], b2.prototype, "operationalLayerType", void 0), e([y2({ json: { read: false }, readOnly: true })], b2.prototype, "type", void 0), e([y2({ type: s2, readOnly: true })], b2.prototype, "nodePages", void 0), e([y2({ type: [l2], readOnly: true })], b2.prototype, "materialDefinitions", void 0), e([y2({ type: [u2], readOnly: true })], b2.prototype, "textureSetDefinitions", void 0), e([y2({ type: [m], readOnly: true })], b2.prototype, "geometryDefinitions", void 0), e([y2({ readOnly: true })], b2.prototype, "serviceUpdateTimeStamp", void 0), e([y2({ type: l3 }), g({ origins: ["web-scene", "portal-item"], type: "resource", prefix: "modifications" })], b2.prototype, "modifications", void 0), e([o(["web-scene", "portal-item"], "modifications")], b2.prototype, "readModifications", null), e([y2(d)], b2.prototype, "elevationInfo", void 0), e([y2({ type: String, json: { origins: { "web-scene": { read: true, write: true }, "portal-item": { read: true, write: true } }, read: false } })], b2.prototype, "path", void 0), b2 = e([n("esri.layers.IntegratedMeshLayer")], b2);
  243. var A = b2;
  244. export {
  245. A as default
  246. };
  247. //# sourceMappingURL=IntegratedMeshLayer-7YTE5FG5.js.map