IntegratedMeshLayer-5SIEHZOP.js 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. import {
  2. w as w2
  3. } from "./chunk-BVMSF6QA.js";
  4. import {
  5. l as l2,
  6. m as m3,
  7. s as s2,
  8. u as u3
  9. } from "./chunk-M7HZTZK5.js";
  10. import {
  11. A,
  12. K
  13. } from "./chunk-C62PEMUB.js";
  14. import "./chunk-5ZZSM3DU.js";
  15. import "./chunk-BQ7UE3XL.js";
  16. import "./chunk-UILPRJKY.js";
  17. import "./chunk-524XACB7.js";
  18. import {
  19. An,
  20. Wn
  21. } from "./chunk-DH2OBAUC.js";
  22. import "./chunk-TNLRDNTC.js";
  23. import "./chunk-QY775BFA.js";
  24. import {
  25. i as i2
  26. } from "./chunk-FMKGHOGD.js";
  27. import {
  28. p
  29. } from "./chunk-6URTNEGN.js";
  30. import "./chunk-X7DBH4KK.js";
  31. import {
  32. u as u2
  33. } from "./chunk-NE3ESGA6.js";
  34. import {
  35. U,
  36. a
  37. } from "./chunk-YIS6BAC3.js";
  38. import "./chunk-7ZIDBK7B.js";
  39. import {
  40. v as v2
  41. } from "./chunk-KHA63LLS.js";
  42. import {
  43. c
  44. } from "./chunk-FGKNEJKJ.js";
  45. import {
  46. d as d2
  47. } from "./chunk-PSV473TI.js";
  48. import {
  49. O
  50. } from "./chunk-I3OBGWNS.js";
  51. import "./chunk-FONIFA5N.js";
  52. import "./chunk-EG5OI4V4.js";
  53. import {
  54. i
  55. } from "./chunk-65BYCSII.js";
  56. import "./chunk-WZQZRKNH.js";
  57. import "./chunk-LRDX4TO7.js";
  58. import "./chunk-6A4U74YA.js";
  59. import {
  60. t as t3
  61. } from "./chunk-W72F6AS3.js";
  62. import "./chunk-TERAW6FT.js";
  63. import "./chunk-N2663GRX.js";
  64. import "./chunk-O4FY3ITT.js";
  65. import {
  66. b
  67. } from "./chunk-4DDBH2K5.js";
  68. import "./chunk-7N4X6GF3.js";
  69. import "./chunk-UXF37FQ4.js";
  70. import "./chunk-ZOEK6QHJ.js";
  71. import "./chunk-XNLG7T2T.js";
  72. import "./chunk-IR4PV7VK.js";
  73. import "./chunk-2Z6LERTI.js";
  74. import {
  75. v2 as v
  76. } from "./chunk-OWVBLVP3.js";
  77. import "./chunk-EGZW6HC3.js";
  78. import "./chunk-4NKD334K.js";
  79. import "./chunk-65K7LC56.js";
  80. import "./chunk-ATPLLI5W.js";
  81. import "./chunk-WJ3OEUD3.js";
  82. import "./chunk-MXB2XLKV.js";
  83. import "./chunk-XH7RUGVZ.js";
  84. import "./chunk-TBBTRX4O.js";
  85. import "./chunk-YBSUITLL.js";
  86. import {
  87. j
  88. } from "./chunk-ALDCDSPV.js";
  89. import "./chunk-DT6EAZQ5.js";
  90. import "./chunk-HNOZUNJ4.js";
  91. import {
  92. U as U2
  93. } from "./chunk-VNFRAYHO.js";
  94. import "./chunk-R5IG2D6H.js";
  95. import {
  96. j as j2
  97. } from "./chunk-VBRY5KJM.js";
  98. import "./chunk-PDKDCAAD.js";
  99. import {
  100. o
  101. } from "./chunk-ECW2QABR.js";
  102. import "./chunk-GCDJLKH4.js";
  103. import {
  104. r as r2
  105. } from "./chunk-MRJEICT6.js";
  106. import {
  107. d,
  108. e,
  109. l3 as l,
  110. n2 as n,
  111. t as t2,
  112. u2 as u
  113. } from "./chunk-Y3WMVFTW.js";
  114. import "./chunk-SAS7RONY.js";
  115. import "./chunk-WSRBH7BF.js";
  116. import "./chunk-IHXECKQQ.js";
  117. import {
  118. w
  119. } from "./chunk-ULGDPLM2.js";
  120. import {
  121. s3 as s
  122. } from "./chunk-EMJ4ZSM2.js";
  123. import {
  124. m as m2
  125. } from "./chunk-IKP3YN53.js";
  126. import {
  127. m,
  128. r,
  129. t
  130. } from "./chunk-GZT4BVFP.js";
  131. import "./chunk-A5ICIBVI.js";
  132. // node_modules/@arcgis/core/layers/support/SceneModification.js
  133. var m4;
  134. var y = m4 = class extends l {
  135. constructor(e2) {
  136. super(e2), this.geometry = null, this.type = "clip";
  137. }
  138. writeGeometry(e2, r3, o2, s3) {
  139. if (s3.layer && s3.layer.spatialReference && !s3.layer.spatialReference.equals(this.geometry.spatialReference)) {
  140. if (!An(e2.spatialReference, s3.layer.spatialReference))
  141. return void (s3 && s3.messages && s3.messages.push(new t2("scenemodification:unsupported", "Scene modifications with incompatible spatial references are not supported", { modification: this, spatialReference: s3.layer.spatialReference, context: s3 })));
  142. const p2 = new v();
  143. Wn(e2, p2, s3.layer.spatialReference), r3[o2] = p2.toJSON(s3);
  144. } else
  145. r3[o2] = e2.toJSON(s3);
  146. delete r3[o2].spatialReference;
  147. }
  148. clone() {
  149. return new m4({ geometry: m2(this.geometry), type: this.type });
  150. }
  151. };
  152. e([d({ type: v }), w2()], y.prototype, "geometry", void 0), e([r2(["web-scene", "portal-item"], "geometry")], y.prototype, "writeGeometry", null), e([d({ type: ["clip", "mask", "replace"], nonNullable: true }), w2()], y.prototype, "type", void 0), y = m4 = e([n("esri.layers.support.SceneModification")], y);
  153. var f = y;
  154. // node_modules/@arcgis/core/layers/support/SceneModifications.js
  155. var a2;
  156. var n2 = a2 = class extends u(j.ofType(f)) {
  157. constructor(r3) {
  158. super(r3), this.url = null;
  159. }
  160. clone() {
  161. return new a2({ url: this.url, items: this.items.map((r3) => r3.clone()) });
  162. }
  163. toJSON(r3) {
  164. return this.toArray().map((o2) => o2.toJSON(r3)).filter((r4) => !!r4.geometry);
  165. }
  166. static fromJSON(r3, o2) {
  167. const t4 = new a2();
  168. for (const e2 of r3)
  169. t4.add(f.fromJSON(e2, o2));
  170. return t4;
  171. }
  172. static async fromUrl(r3, t4, e2) {
  173. const c2 = { url: j2(r3), origin: "service" }, p2 = await U2(r3, { responseType: "json", signal: m(e2, "signal") }), n3 = t4.toJSON(), l4 = [];
  174. for (const o2 of p2.data)
  175. l4.push(f.fromJSON({ ...o2, geometry: { ...o2.geometry, spatialReference: n3 } }, c2));
  176. return new a2({ url: r3, items: l4 });
  177. }
  178. };
  179. e([d({ type: String })], n2.prototype, "url", void 0), n2 = a2 = e([n("esri.layers.support.SceneModifications")], n2);
  180. var l3 = n2;
  181. // node_modules/@arcgis/core/layers/IntegratedMeshLayer.js
  182. var b2 = class extends A(p(c(v2(t3(O(i2(b))))))) {
  183. constructor(...e2) {
  184. super(...e2), this._handles = new u2(), 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;
  185. }
  186. destroy() {
  187. this._handles.destroy();
  188. }
  189. initialize() {
  190. this._handles.add(a(() => this.modifications, "after-changes", () => this.modifications = this.modifications, U));
  191. }
  192. normalizeCtorArgs(e2, t4) {
  193. return typeof e2 == "string" ? { url: e2, ...t4 } : e2;
  194. }
  195. readModifications(e2, t4, r3) {
  196. this._modificationsSource = { url: i(e2, r3), context: r3 };
  197. }
  198. async load(e2) {
  199. return this.addResolvingPromise(this._doLoad(e2)), this;
  200. }
  201. async _doLoad(e2) {
  202. const t4 = m(e2, "signal");
  203. try {
  204. await this.loadFromPortal({ supportedTypes: ["Scene Service"] }, e2);
  205. } catch (r3) {
  206. w(r3);
  207. }
  208. if (await this._fetchService(t4), r(this._modificationsSource)) {
  209. const t5 = await l3.fromUrl(this._modificationsSource.url, this.spatialReference, e2);
  210. this.setAtOrigin("modifications", t5, this._modificationsSource.context.origin), this._modificationsSource = null;
  211. }
  212. await this._fetchIndexAndUpdateExtent(this.nodePages, t4);
  213. }
  214. beforeSave() {
  215. if (!t(this._modificationsSource))
  216. return this.load().then(() => {
  217. }, () => {
  218. });
  219. }
  220. async saveAs(e2, t4) {
  221. return this._debouncedSaveOperations(K.SAVE_AS, { ...t4, getTypeKeywords: () => this._getTypeKeywords(), portalItemLayerType: "integrated-mesh" }, e2);
  222. }
  223. async save() {
  224. const e2 = { getTypeKeywords: () => this._getTypeKeywords(), portalItemLayerType: "integrated-mesh" };
  225. return this._debouncedSaveOperations(K.SAVE, e2);
  226. }
  227. validateLayer(e2) {
  228. if (e2.layerType && e2.layerType !== "IntegratedMesh")
  229. throw new s("integrated-mesh-layer:layer-type-not-supported", "IntegratedMeshLayer does not support this layer type", { layerType: e2.layerType });
  230. if (isNaN(this.version.major) || isNaN(this.version.minor))
  231. throw new s("layer:service-version-not-supported", "Service version is not supported.", { serviceVersion: this.version.versionString, supportedVersions: "1.x" });
  232. if (this.version.major > 1)
  233. throw new s("layer:service-version-too-new", "Service version is too new.", { serviceVersion: this.version.versionString, supportedVersions: "1.x" });
  234. }
  235. _getTypeKeywords() {
  236. return ["IntegratedMeshLayer"];
  237. }
  238. };
  239. e([d({ type: String, readOnly: true })], b2.prototype, "geometryType", void 0), e([d({ type: ["show", "hide"] })], b2.prototype, "listMode", void 0), e([d({ type: ["IntegratedMeshLayer"] })], b2.prototype, "operationalLayerType", void 0), e([d({ json: { read: false }, readOnly: true })], b2.prototype, "type", void 0), e([d({ type: s2, readOnly: true })], b2.prototype, "nodePages", void 0), e([d({ type: [l2], readOnly: true })], b2.prototype, "materialDefinitions", void 0), e([d({ type: [u3], readOnly: true })], b2.prototype, "textureSetDefinitions", void 0), e([d({ type: [m3], readOnly: true })], b2.prototype, "geometryDefinitions", void 0), e([d({ readOnly: true })], b2.prototype, "serviceUpdateTimeStamp", void 0), e([d({ type: l3 }), w2({ 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([d(d2)], b2.prototype, "elevationInfo", void 0), e([d({ 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);
  240. var A2 = b2;
  241. export {
  242. A2 as default
  243. };
  244. //# sourceMappingURL=IntegratedMeshLayer-5SIEHZOP.js.map