BuildingSceneLayer-35UYR6TW.js 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  1. import {
  2. l as l4,
  3. t as t6
  4. } from "./chunk-Z25OS74A.js";
  5. import {
  6. l as l3,
  7. m as m4,
  8. s as s5,
  9. u
  10. } from "./chunk-M7HZTZK5.js";
  11. import {
  12. A,
  13. K,
  14. n as n4
  15. } from "./chunk-C62PEMUB.js";
  16. import "./chunk-5ZZSM3DU.js";
  17. import "./chunk-BQ7UE3XL.js";
  18. import "./chunk-UILPRJKY.js";
  19. import {
  20. Ke
  21. } from "./chunk-6NQ3AA2U.js";
  22. import "./chunk-524XACB7.js";
  23. import "./chunk-XKHC7KKF.js";
  24. import "./chunk-HGDNY7J3.js";
  25. import "./chunk-GD5TMIPM.js";
  26. import {
  27. l as l2
  28. } from "./chunk-ZRX5UNQH.js";
  29. import "./chunk-VEAEIBHK.js";
  30. import "./chunk-6SASJ6IM.js";
  31. import "./chunk-3OHML7FO.js";
  32. import "./chunk-JGOAMEPM.js";
  33. import "./chunk-Z64YKYHD.js";
  34. import "./chunk-2VFJVI2I.js";
  35. import "./chunk-F37AVPUF.js";
  36. import "./chunk-FUEX356Y.js";
  37. import "./chunk-TNLRDNTC.js";
  38. import "./chunk-OSNKP4CI.js";
  39. import "./chunk-435DJNTD.js";
  40. import "./chunk-T3EUPDKL.js";
  41. import {
  42. t as t3
  43. } from "./chunk-QY775BFA.js";
  44. import "./chunk-2SJEIKRW.js";
  45. import {
  46. i,
  47. n as n2
  48. } from "./chunk-5MVUZO4F.js";
  49. import "./chunk-PHRSJJ3U.js";
  50. import "./chunk-VVBOYBFX.js";
  51. import "./chunk-S7R5EXHN.js";
  52. import {
  53. i as i2
  54. } from "./chunk-FMKGHOGD.js";
  55. import {
  56. p as p3
  57. } from "./chunk-6URTNEGN.js";
  58. import "./chunk-KN7TOKVN.js";
  59. import "./chunk-RQJNTZAL.js";
  60. import "./chunk-QTOOFNRV.js";
  61. import "./chunk-7O56JPWQ.js";
  62. import "./chunk-6B2LQBKM.js";
  63. import {
  64. d as d4
  65. } from "./chunk-MFI6BALW.js";
  66. import {
  67. n as n3
  68. } from "./chunk-CIG5OHC7.js";
  69. import "./chunk-FUD7XO3N.js";
  70. import "./chunk-6EU7GFUT.js";
  71. import "./chunk-MFUAILAT.js";
  72. import "./chunk-HZJYXMI6.js";
  73. import "./chunk-27P5ZSC7.js";
  74. import "./chunk-UPD4MTCL.js";
  75. import "./chunk-GRBROWI6.js";
  76. import "./chunk-5NKYXKIA.js";
  77. import "./chunk-MPWGHCZG.js";
  78. import "./chunk-FTI5VP6T.js";
  79. import "./chunk-RZFGRBD7.js";
  80. import {
  81. B
  82. } from "./chunk-PUSPZYFZ.js";
  83. import {
  84. t as t5
  85. } from "./chunk-EN7YGJWG.js";
  86. import "./chunk-VBNMTM7L.js";
  87. import "./chunk-3D3QEPRE.js";
  88. import "./chunk-JFNNSBWL.js";
  89. import {
  90. b
  91. } from "./chunk-UD63WBG3.js";
  92. import "./chunk-X7DBH4KK.js";
  93. import "./chunk-LY74KTXV.js";
  94. import "./chunk-EWE6EXPY.js";
  95. import "./chunk-KUXNUNAI.js";
  96. import {
  97. d as d2
  98. } from "./chunk-KMAHKQ2G.js";
  99. import "./chunk-522WBHUO.js";
  100. import "./chunk-WNCU6BFU.js";
  101. import "./chunk-PIGRDDRG.js";
  102. import "./chunk-BJHM4JNS.js";
  103. import "./chunk-F6A2QQ26.js";
  104. import "./chunk-XLV7RUSE.js";
  105. import "./chunk-NTUXR253.js";
  106. import "./chunk-EOSZHC5H.js";
  107. import "./chunk-C43UE3Z5.js";
  108. import {
  109. p
  110. } from "./chunk-V7H6CJ37.js";
  111. import "./chunk-H2KDMZTR.js";
  112. import "./chunk-RMX2AZ4P.js";
  113. import "./chunk-NE3ESGA6.js";
  114. import "./chunk-YIS6BAC3.js";
  115. import "./chunk-7XXXCK2A.js";
  116. import {
  117. r as r2
  118. } from "./chunk-7ZIDBK7B.js";
  119. import {
  120. v
  121. } from "./chunk-KHA63LLS.js";
  122. import {
  123. c
  124. } from "./chunk-FGKNEJKJ.js";
  125. import {
  126. d as d3,
  127. j as j2,
  128. p as p2,
  129. x,
  130. y
  131. } from "./chunk-PSV473TI.js";
  132. import {
  133. O,
  134. S as S2
  135. } from "./chunk-I3OBGWNS.js";
  136. import "./chunk-FONIFA5N.js";
  137. import "./chunk-EG5OI4V4.js";
  138. import "./chunk-65BYCSII.js";
  139. import "./chunk-WZQZRKNH.js";
  140. import "./chunk-LRDX4TO7.js";
  141. import "./chunk-6A4U74YA.js";
  142. import "./chunk-CYI7KFYB.js";
  143. import "./chunk-5LXROFTA.js";
  144. import "./chunk-GJXW4HL5.js";
  145. import "./chunk-WJW5DUN6.js";
  146. import {
  147. t as t4
  148. } from "./chunk-W72F6AS3.js";
  149. import "./chunk-PJ7ZQ4VD.js";
  150. import "./chunk-WDLTDV2L.js";
  151. import "./chunk-TERAW6FT.js";
  152. import "./chunk-N2663GRX.js";
  153. import "./chunk-O4FY3ITT.js";
  154. import "./chunk-WEMIK25H.js";
  155. import {
  156. b as b2
  157. } from "./chunk-4DDBH2K5.js";
  158. import {
  159. s as s4
  160. } from "./chunk-7N4X6GF3.js";
  161. import "./chunk-JXW4QTJA.js";
  162. import "./chunk-UXF37FQ4.js";
  163. import "./chunk-ZOEK6QHJ.js";
  164. import "./chunk-XNLG7T2T.js";
  165. import "./chunk-IR4PV7VK.js";
  166. import "./chunk-2Z6LERTI.js";
  167. import "./chunk-OWVBLVP3.js";
  168. import "./chunk-AFZ7XSEW.js";
  169. import "./chunk-EGZW6HC3.js";
  170. import "./chunk-4NKD334K.js";
  171. import "./chunk-65K7LC56.js";
  172. import "./chunk-ATPLLI5W.js";
  173. import "./chunk-WJ3OEUD3.js";
  174. import "./chunk-MXB2XLKV.js";
  175. import "./chunk-XH7RUGVZ.js";
  176. import {
  177. m as m3
  178. } from "./chunk-TBBTRX4O.js";
  179. import {
  180. m as m2
  181. } from "./chunk-YBSUITLL.js";
  182. import {
  183. j
  184. } from "./chunk-ALDCDSPV.js";
  185. import "./chunk-DT6EAZQ5.js";
  186. import "./chunk-HNOZUNJ4.js";
  187. import {
  188. U
  189. } from "./chunk-VNFRAYHO.js";
  190. import "./chunk-R5IG2D6H.js";
  191. import {
  192. G
  193. } from "./chunk-VBRY5KJM.js";
  194. import {
  195. s as s3
  196. } from "./chunk-PDKDCAAD.js";
  197. import {
  198. M2 as M,
  199. o
  200. } from "./chunk-ECW2QABR.js";
  201. import "./chunk-GCDJLKH4.js";
  202. import {
  203. k2 as k
  204. } from "./chunk-MRJEICT6.js";
  205. import {
  206. d,
  207. e,
  208. l3 as l,
  209. n2 as n,
  210. t as t2
  211. } from "./chunk-Y3WMVFTW.js";
  212. import "./chunk-SAS7RONY.js";
  213. import "./chunk-WSRBH7BF.js";
  214. import {
  215. S
  216. } from "./chunk-IHXECKQQ.js";
  217. import {
  218. w
  219. } from "./chunk-ULGDPLM2.js";
  220. import {
  221. s,
  222. s3 as s2
  223. } from "./chunk-EMJ4ZSM2.js";
  224. import {
  225. m
  226. } from "./chunk-IKP3YN53.js";
  227. import {
  228. r,
  229. t
  230. } from "./chunk-GZT4BVFP.js";
  231. import "./chunk-A5ICIBVI.js";
  232. // node_modules/@arcgis/core/layers/buildingSublayers/BuildingSublayer.js
  233. var l5 = class extends s4(S2) {
  234. constructor(r3) {
  235. super(r3), this.title = "", this.id = -1, this.modelName = null, this.isEmpty = null, this.visible = true, this.opacity = 1;
  236. }
  237. readTitle(r3, e3) {
  238. return typeof e3.alias == "string" ? e3.alias : typeof e3.name == "string" ? e3.name : "";
  239. }
  240. readIdOnlyOnce(r3) {
  241. return this.id !== -1 ? this.id : typeof r3 == "number" ? r3 : void 0;
  242. }
  243. };
  244. e([d({ type: String, json: { origins: { "web-scene": { write: true }, "portal-item": { write: true } } } })], l5.prototype, "title", void 0), e([o("service", "title", ["alias", "name"])], l5.prototype, "readTitle", null), e([d()], l5.prototype, "layer", void 0), e([d({ type: S, readOnly: true, json: { read: false, write: { ignoreOrigin: true } } })], l5.prototype, "id", void 0), e([o("service", "id")], l5.prototype, "readIdOnlyOnce", null), e([d(y(String))], l5.prototype, "modelName", void 0), e([d(y(Boolean))], l5.prototype, "isEmpty", void 0), e([d({ type: Boolean, json: { name: "visibility", write: true } })], l5.prototype, "visible", void 0), e([d({ type: Number, json: { write: true } })], l5.prototype, "opacity", void 0), l5 = e([n("esri.layers.buildingSublayers.BuildingSublayer")], l5);
  245. var n5 = l5;
  246. // node_modules/@arcgis/core/layers/buildingSublayers/BuildingComponentSublayer.js
  247. var P = s.getLogger("esri.layers.buildingSublayers.BuildingComponentSublayer");
  248. var D = l2();
  249. var Q = class extends m3.LoadableMixin(m2(n5)) {
  250. constructor(e3) {
  251. super(e3), this.type = "building-component", this.nodePages = null, this.materialDefinitions = null, this.textureSetDefinitions = null, this.geometryDefinitions = null, this.serviceUpdateTimeStamp = null, this.fields = null, this.associatedLayer = null, this.outFields = null, this.listMode = "show", this.renderer = null, this.definitionExpression = null, this.popupEnabled = true, this.popupTemplate = null, this.layerType = "3d-object";
  252. }
  253. get parsedUrl() {
  254. return this.layer ? { path: `${this.layer.parsedUrl.path}/sublayers/${this.id}`, query: this.layer.parsedUrl.query } : null;
  255. }
  256. get fieldsIndex() {
  257. return new d2(this.fields);
  258. }
  259. readAssociatedLayer(e3, r3) {
  260. const t10 = this.layer.associatedFeatureServiceItem, o2 = r3.associatedLayerID;
  261. return r(t10) && typeof o2 == "number" ? new Ke({ portalItem: t10, layerId: o2 }) : null;
  262. }
  263. get objectIdField() {
  264. if (this.fields != null) {
  265. for (const e3 of this.fields)
  266. if (e3.type === "oid")
  267. return e3.name;
  268. }
  269. return null;
  270. }
  271. get displayField() {
  272. return r(this.associatedLayer) ? this.associatedLayer.displayField : null;
  273. }
  274. get apiKey() {
  275. return this.layer.apiKey;
  276. }
  277. get fullExtent() {
  278. return this.layer.fullExtent;
  279. }
  280. get spatialReference() {
  281. return this.layer.spatialReference;
  282. }
  283. get version() {
  284. return this.layer.version;
  285. }
  286. get elevationInfo() {
  287. return this.layer.elevationInfo;
  288. }
  289. get minScale() {
  290. return this.layer.minScale;
  291. }
  292. get maxScale() {
  293. return this.layer.maxScale;
  294. }
  295. get effectiveScaleRange() {
  296. return this.layer.effectiveScaleRange;
  297. }
  298. get defaultPopupTemplate() {
  299. return this.createPopupTemplate();
  300. }
  301. load(e3) {
  302. const r3 = r(e3) ? e3.signal : null, t10 = this._fetchService(r3).then(() => {
  303. this.indexInfo = n4(this.parsedUrl.path, this.rootNode, this.nodePages, this.apiKey, P, r3);
  304. });
  305. return this.addResolvingPromise(t10), Promise.resolve(this);
  306. }
  307. createPopupTemplate(e3) {
  308. return d4(this, e3);
  309. }
  310. async _fetchService(e3) {
  311. const r3 = (await U(this.parsedUrl.path, { query: { f: "json", token: this.apiKey }, responseType: "json", signal: e3 })).data;
  312. this.read(r3, { origin: "service", url: this.parsedUrl });
  313. }
  314. getField(e3) {
  315. return this.fieldsIndex.get(e3);
  316. }
  317. getFieldDomain(e3, r3) {
  318. const t10 = this.getFeatureType(r3?.feature)?.domains?.[e3];
  319. return t10 && t10.type !== "inherited" ? t10 : this.getField(e3)?.domain ?? null;
  320. }
  321. getFeatureType(e3) {
  322. return e3 && r(this.associatedLayer) ? this.associatedLayer.getFeatureType(e3) : null;
  323. }
  324. get types() {
  325. return r(this.associatedLayer) ? this.associatedLayer.types : [];
  326. }
  327. get typeIdField() {
  328. return r(this.associatedLayer) ? this.associatedLayer.typeIdField : null;
  329. }
  330. get geometryType() {
  331. return this.layerType === "3d-object" ? "mesh" : "point";
  332. }
  333. get profile() {
  334. return this.layerType === "3d-object" ? "mesh-pyramids" : "points";
  335. }
  336. get capabilities() {
  337. const e3 = r(this.associatedLayer) && this.associatedLayer.capabilities ? this.associatedLayer.capabilities : t6, { query: r3, data: { supportsZ: t10, supportsM: o2, isVersioned: s6 } } = e3;
  338. return { query: r3, data: { supportsZ: t10, supportsM: o2, isVersioned: s6 } };
  339. }
  340. createQuery() {
  341. const e3 = new b();
  342. return this.geometryType !== "mesh" && (e3.returnGeometry = true, e3.returnZ = true), e3.where = this.definitionExpression || "1=1", e3.sqlFormat = "standard", e3;
  343. }
  344. queryExtent(e3, r3) {
  345. return this._getAssociatedLayerForQuery().then((t10) => t10.queryExtent(e3 || this.createQuery(), r3));
  346. }
  347. queryFeatureCount(e3, r3) {
  348. return this._getAssociatedLayerForQuery().then((t10) => t10.queryFeatureCount(e3 || this.createQuery(), r3));
  349. }
  350. queryFeatures(e3, r3) {
  351. return this._getAssociatedLayerForQuery().then((t10) => t10.queryFeatures(e3 || this.createQuery(), r3)).then((e4) => {
  352. if (e4?.features)
  353. for (const r4 of e4.features)
  354. r4.layer = this.layer, r4.sourceLayer = this;
  355. return e4;
  356. });
  357. }
  358. queryObjectIds(e3, r3) {
  359. return this._getAssociatedLayerForQuery().then((t10) => t10.queryObjectIds(e3 || this.createQuery(), r3));
  360. }
  361. getFieldUsageInfo(e3) {
  362. return this.fieldsIndex.has(e3) ? { supportsLabelingInfo: false, supportsRenderer: false, supportsPopupTemplate: false, supportsLayerQuery: false } : { supportsLabelingInfo: false, supportsRenderer: true, supportsPopupTemplate: true, supportsLayerQuery: r(this.associatedLayer) };
  363. }
  364. _getAssociatedLayerForQuery() {
  365. const e3 = this.associatedLayer;
  366. return r(e3) && e3.loaded ? Promise.resolve(e3) : this._loadAssociatedLayerForQuery();
  367. }
  368. async _loadAssociatedLayerForQuery() {
  369. if (await this.load(), t(this.associatedLayer))
  370. throw new s2("buildingscenelayer:query-not-available", "BuildingSceneLayer component layer queries are not available without an associated feature layer", { layer: this });
  371. try {
  372. await this.associatedLayer.load();
  373. } catch (e3) {
  374. throw new s2("buildingscenelayer:query-not-available", "BuildingSceneLayer associated feature layer could not be loaded", { layer: this, error: e3 });
  375. }
  376. return this.associatedLayer;
  377. }
  378. };
  379. e([d({ readOnly: true })], Q.prototype, "parsedUrl", null), e([d({ type: s5, readOnly: true })], Q.prototype, "nodePages", void 0), e([d({ type: [l3], readOnly: true })], Q.prototype, "materialDefinitions", void 0), e([d({ type: [u], readOnly: true })], Q.prototype, "textureSetDefinitions", void 0), e([d({ type: [m4], readOnly: true })], Q.prototype, "geometryDefinitions", void 0), e([d({ readOnly: true })], Q.prototype, "serviceUpdateTimeStamp", void 0), e([d({ readOnly: true })], Q.prototype, "store", void 0), e([d({ type: String, readOnly: true, json: { read: { source: "store.rootNode" } } })], Q.prototype, "rootNode", void 0), e([d({ readOnly: true })], Q.prototype, "attributeStorageInfo", void 0), e([d(D.fields)], Q.prototype, "fields", void 0), e([d({ readOnly: true })], Q.prototype, "fieldsIndex", null), e([d({ readOnly: true, type: Ke })], Q.prototype, "associatedLayer", void 0), e([o("service", "associatedLayer", ["associatedLayerID"])], Q.prototype, "readAssociatedLayer", null), e([d(D.outFields)], Q.prototype, "outFields", void 0), e([d({ type: String, readOnly: true })], Q.prototype, "objectIdField", null), e([d({ readOnly: true, type: String, json: { read: false } })], Q.prototype, "displayField", null), e([d({ readOnly: true, type: String })], Q.prototype, "apiKey", null), e([d({ readOnly: true, type: M })], Q.prototype, "fullExtent", null), e([d({ readOnly: true, type: k })], Q.prototype, "spatialReference", null), e([d({ readOnly: true })], Q.prototype, "version", null), e([d({ readOnly: true, type: x })], Q.prototype, "elevationInfo", null), e([d({ readOnly: true, type: Number })], Q.prototype, "minScale", null), e([d({ readOnly: true, type: Number })], Q.prototype, "maxScale", null), e([d({ readOnly: true, type: Number })], Q.prototype, "effectiveScaleRange", null), e([d({ type: ["hide", "show"], json: { write: true } })], Q.prototype, "listMode", void 0), e([d({ types: n3, json: { origins: { service: { read: { source: "drawingInfo.renderer" } } }, name: "layerDefinition.drawingInfo.renderer", write: true }, value: null })], Q.prototype, "renderer", void 0), e([d({ type: String, json: { origins: { service: { read: false, write: false } }, name: "layerDefinition.definitionExpression", write: { enabled: true, allowNull: true } } })], Q.prototype, "definitionExpression", void 0), e([d(p2)], Q.prototype, "popupEnabled", void 0), e([d({ type: B, json: { read: { source: "popupInfo" }, write: { target: "popupInfo" } } })], Q.prototype, "popupTemplate", void 0), e([d({ readOnly: true, type: String, json: { origins: { service: { read: { source: "store.normalReferenceFrame" } } }, read: false } })], Q.prototype, "normalReferenceFrame", void 0), e([d({ readOnly: true, json: { read: false } })], Q.prototype, "defaultPopupTemplate", null), e([d()], Q.prototype, "types", null), e([d()], Q.prototype, "typeIdField", null), e([d({ json: { write: false } }), r2(new s3({ "3DObject": "3d-object", Point: "point" }))], Q.prototype, "layerType", void 0), e([d()], Q.prototype, "geometryType", null), e([d()], Q.prototype, "profile", null), e([d({ readOnly: true, json: { read: false } })], Q.prototype, "capabilities", null), Q = e([n("esri.layers.buildingSublayers.BuildingComponentSublayer")], Q);
  380. var E = Q;
  381. // node_modules/@arcgis/core/layers/buildingSublayers/BuildingGroupSublayer.js
  382. var a;
  383. var p4 = { type: j, readOnly: true, json: { origins: { service: { read: { source: "sublayers", reader: l6 } } }, read: false } };
  384. function l6(r3, o2, t10) {
  385. if (r3 && Array.isArray(r3))
  386. return new j(r3.map((r4) => {
  387. const e3 = y2(r4);
  388. if (e3) {
  389. const o3 = new e3();
  390. return o3.read(r4, t10), o3;
  391. }
  392. t10 && t10.messages && r4 && t10.messages.push(new t2("building-scene-layer:unsupported-sublayer-type", "Building scene sublayer of type '" + (r4.type || "unknown") + "' are not supported", { definition: r4, context: t10 }));
  393. }));
  394. }
  395. var c2 = a = class extends n5 {
  396. constructor(r3) {
  397. super(r3), this.type = "building-group", this.listMode = "show", this.sublayers = null;
  398. }
  399. loadAll() {
  400. return i(this, (r3) => a.forEachSublayer(this.sublayers, (e3) => {
  401. e3.type !== "building-group" && r3(e3);
  402. }));
  403. }
  404. };
  405. function y2(r3) {
  406. return r3.layerType === "group" ? c2 : E;
  407. }
  408. e([d({ type: ["hide", "show", "hide-children"], json: { write: true } })], c2.prototype, "listMode", void 0), e([d(p4)], c2.prototype, "sublayers", void 0), c2 = a = e([n("esri.layers.buildingSublayers.BuildingGroupSublayer")], c2), function(r3) {
  409. function e3(r4, o2) {
  410. r4.forEach((r5) => {
  411. o2(r5), r5.type === "building-group" && e3(r5.sublayers, o2);
  412. });
  413. }
  414. r3.sublayersProperty = p4, r3.readSublayers = l6, r3.forEachSublayer = e3;
  415. }(c2 || (c2 = {}));
  416. var d5 = c2;
  417. // node_modules/@arcgis/core/layers/support/BuildingFilterAuthoringInfo.js
  418. var e2 = class extends l {
  419. constructor() {
  420. super(...arguments), this.type = null;
  421. }
  422. };
  423. e([d({ type: String, readOnly: true, json: { write: true } })], e2.prototype, "type", void 0), e2 = e([n("esri.layers.support.BuildingFilterAuthoringInfo")], e2);
  424. var p5 = e2;
  425. // node_modules/@arcgis/core/layers/support/BuildingFilterAuthoringInfoType.js
  426. var p6;
  427. var i3 = p6 = class extends l {
  428. constructor() {
  429. super(...arguments), this.filterType = null, this.filterValues = null;
  430. }
  431. clone() {
  432. return new p6({ filterType: this.filterType, filterValues: m(this.filterValues) });
  433. }
  434. };
  435. e([d({ type: String, json: { write: true } })], i3.prototype, "filterType", void 0), e([d({ type: [String], json: { write: true } })], i3.prototype, "filterValues", void 0), i3 = p6 = e([n("esri.layers.support.BuildingFilterAuthoringInfoType")], i3);
  436. var l7 = i3;
  437. // node_modules/@arcgis/core/layers/support/BuildingFilterAuthoringInfoBlock.js
  438. var c3;
  439. var l8 = j.ofType(l7);
  440. var n6 = c3 = class extends l {
  441. clone() {
  442. return new c3({ filterTypes: m(this.filterTypes) });
  443. }
  444. };
  445. e([d({ type: l8, json: { write: true } })], n6.prototype, "filterTypes", void 0), n6 = c3 = e([n("esri.layers.support.BuildingFilterAuthoringInfoBlock")], n6);
  446. var m5 = n6;
  447. // node_modules/@arcgis/core/layers/support/BuildingFilterAuthoringInfoCheckbox.js
  448. var p7;
  449. var l9 = j.ofType(m5);
  450. var n7 = p7 = class extends p5 {
  451. constructor() {
  452. super(...arguments), this.type = "checkbox";
  453. }
  454. clone() {
  455. return new p7({ filterBlocks: m(this.filterBlocks) });
  456. }
  457. };
  458. e([d({ type: ["checkbox"] })], n7.prototype, "type", void 0), e([d({ type: l9, json: { write: true } })], n7.prototype, "filterBlocks", void 0), n7 = p7 = e([n("esri.layers.support.BuildingFilterAuthoringInfoCheckbox")], n7);
  459. var u2 = n7;
  460. // node_modules/@arcgis/core/layers/support/BuildingFilterMode.js
  461. var t7 = class extends l {
  462. };
  463. e([d({ readOnly: true, json: { read: false } })], t7.prototype, "type", void 0), t7 = e([n("esri.layers.support.BuildingFilterMode")], t7);
  464. var p8 = t7;
  465. // node_modules/@arcgis/core/layers/support/BuildingFilterModeSolid.js
  466. var t8;
  467. var p9 = t8 = class extends p8 {
  468. constructor() {
  469. super(...arguments), this.type = "solid";
  470. }
  471. clone() {
  472. return new t8();
  473. }
  474. };
  475. e([d({ type: ["solid"], readOnly: true, json: { write: true } })], p9.prototype, "type", void 0), p9 = t8 = e([n("esri.layers.support.BuildingFilterModeSolid")], p9);
  476. var i4 = p9;
  477. // node_modules/@arcgis/core/layers/support/BuildingFilterModeWireFrame.js
  478. var c4;
  479. var m6 = c4 = class extends p8 {
  480. constructor() {
  481. super(...arguments), this.type = "wire-frame", this.edges = null;
  482. }
  483. clone() {
  484. return new c4({ edges: m(this.edges) });
  485. }
  486. };
  487. e([r2({ wireFrame: "wire-frame" })], m6.prototype, "type", void 0), e([d(t5)], m6.prototype, "edges", void 0), m6 = c4 = e([n("esri.layers.support.BuildingFilterModeWireFrame")], m6);
  488. var a2 = m6;
  489. // node_modules/@arcgis/core/layers/support/BuildingFilterModeXRay.js
  490. var t9;
  491. var p10 = t9 = class extends p8 {
  492. constructor() {
  493. super(...arguments), this.type = "x-ray";
  494. }
  495. clone() {
  496. return new t9();
  497. }
  498. };
  499. e([d({ type: ["x-ray"], readOnly: true, json: { write: true } })], p10.prototype, "type", void 0), p10 = t9 = e([n("esri.layers.support.BuildingFilterModeXRay")], p10);
  500. var c5 = p10;
  501. // node_modules/@arcgis/core/layers/support/BuildingFilterBlock.js
  502. var d6;
  503. var a3 = { nonNullable: true, types: { key: "type", base: p8, typeMap: { solid: i4, "wire-frame": a2, "x-ray": c5 } }, json: { read: (e3) => {
  504. switch (e3 && e3.type) {
  505. case "solid":
  506. return i4.fromJSON(e3);
  507. case "wireFrame":
  508. return a2.fromJSON(e3);
  509. case "x-ray":
  510. return c5.fromJSON(e3);
  511. default:
  512. return;
  513. }
  514. }, write: { enabled: true, isRequired: true } } };
  515. var u3 = d6 = class extends l {
  516. constructor() {
  517. super(...arguments), this.filterExpression = null, this.filterMode = new i4(), this.title = "";
  518. }
  519. clone() {
  520. return new d6({ filterExpression: this.filterExpression, filterMode: m(this.filterMode), title: this.title });
  521. }
  522. };
  523. e([d({ type: String, json: { write: { enabled: true, isRequired: true } } })], u3.prototype, "filterExpression", void 0), e([d(a3)], u3.prototype, "filterMode", void 0), e([d({ type: String, json: { write: { enabled: true, isRequired: true } } })], u3.prototype, "title", void 0), u3 = d6 = e([n("esri.layers.support.BuildingFilterBlock")], u3);
  524. var c6 = u3;
  525. // node_modules/@arcgis/core/layers/support/BuildingFilter.js
  526. var u4;
  527. var d7 = j.ofType(c6);
  528. var m7 = u4 = class extends l {
  529. constructor() {
  530. super(...arguments), this.description = null, this.filterBlocks = null, this.id = t3(), this.name = null;
  531. }
  532. clone() {
  533. return new u4({ description: this.description, filterBlocks: m(this.filterBlocks), id: this.id, name: this.name, filterAuthoringInfo: m(this.filterAuthoringInfo) });
  534. }
  535. };
  536. e([d({ type: String, json: { write: true } })], m7.prototype, "description", void 0), e([d({ type: d7, json: { write: { enabled: true, isRequired: true } } })], m7.prototype, "filterBlocks", void 0), e([d({ types: { key: "type", base: p5, typeMap: { checkbox: u2 } }, json: { read: (o2) => (o2 && o2.type) === "checkbox" ? u2.fromJSON(o2) : null, write: true } })], m7.prototype, "filterAuthoringInfo", void 0), e([d({ type: String, constructOnly: true, json: { write: { enabled: true, isRequired: true } } })], m7.prototype, "id", void 0), e([d({ type: String, json: { write: { enabled: true, isRequired: true } } })], m7.prototype, "name", void 0), m7 = u4 = e([n("esri.layers.support.BuildingFilter")], m7);
  537. var f = m7;
  538. // node_modules/@arcgis/core/layers/support/BuildingSummaryStatistics.js
  539. var u5 = s.getLogger("esri.layers.support.BuildingSummaryStatistics");
  540. var n8 = class extends l {
  541. constructor() {
  542. super(...arguments), this.fieldName = null, this.modelName = null, this.label = null, this.min = null, this.max = null, this.mostFrequentValues = null, this.subLayerIds = null;
  543. }
  544. };
  545. e([d({ type: String })], n8.prototype, "fieldName", void 0), e([d({ type: String })], n8.prototype, "modelName", void 0), e([d({ type: String })], n8.prototype, "label", void 0), e([d({ type: Number })], n8.prototype, "min", void 0), e([d({ type: Number })], n8.prototype, "max", void 0), e([d({ json: { read: (e3) => Array.isArray(e3) && (e3.every((e4) => typeof e4 == "string") || e3.every((e4) => typeof e4 == "number")) ? e3.slice() : null } })], n8.prototype, "mostFrequentValues", void 0), e([d({ type: [Number] })], n8.prototype, "subLayerIds", void 0), n8 = e([n("esri.layers.support.BuildingFieldStatistics")], n8);
  546. var m8 = class extends m3.LoadableMixin(m2(l)) {
  547. constructor() {
  548. super(...arguments), this.url = null;
  549. }
  550. get fields() {
  551. return this.loaded || this.loadStatus === "loading" ? this._get("fields") : (u5.error("building summary statistics are not loaded"), null);
  552. }
  553. load(e3) {
  554. const r3 = r(e3) ? e3.signal : null;
  555. return this.addResolvingPromise(this._fetchService(r3)), Promise.resolve(this);
  556. }
  557. async _fetchService(e3) {
  558. const t10 = (await U(this.url, { query: { f: "json" }, responseType: "json", signal: e3 })).data;
  559. this.read(t10, { origin: "service" });
  560. }
  561. };
  562. e([d({ constructOnly: true, type: String })], m8.prototype, "url", void 0), e([d({ readOnly: true, type: [n8], json: { read: { source: "summary" } } })], m8.prototype, "fields", null), m8 = e([n("esri.layers.support.BuildingSummaryStatistics")], m8);
  563. var c7 = m8;
  564. // node_modules/@arcgis/core/layers/BuildingSceneLayer.js
  565. var B2 = s.getLogger("esri.layers.BuildingSceneLayer");
  566. var _ = j.ofType(f);
  567. var P2 = m(d5.sublayersProperty);
  568. P2.json.origins["web-scene"] = { type: [E], write: { enabled: true, overridePolicy: () => ({ enabled: false }) } }, P2.json.origins["portal-item"] = { type: [E], write: { enabled: true, overridePolicy: () => ({ enabled: false }) } };
  569. var K2 = class extends A(p3(c(v(t4(O(i2(b2))))))) {
  570. constructor(e3) {
  571. super(e3), this.operationalLayerType = "BuildingSceneLayer", this.allSublayers = new p({ getCollections: () => [this.sublayers], getChildrenFunction: (e4) => e4.type === "building-group" ? e4.sublayers : null }), this.sublayers = null, this.sublayerOverrides = null, this.filters = new _(), this.activeFilterId = null, this.summaryStatistics = null, this.outFields = null, this.type = "building-scene";
  572. }
  573. normalizeCtorArgs(e3) {
  574. return typeof e3 == "string" ? { url: e3 } : e3;
  575. }
  576. destroy() {
  577. this.allSublayers.destroy();
  578. }
  579. readSublayers(e3, r3, t10) {
  580. const s6 = d5.readSublayers(e3, r3, t10);
  581. return d5.forEachSublayer(s6, (e4) => e4.layer = this), this.sublayerOverrides && (this.applySublayerOverrides(s6, this.sublayerOverrides), this.sublayerOverrides = null), s6;
  582. }
  583. applySublayerOverrides(e3, { overrides: r3, context: t10 }) {
  584. d5.forEachSublayer(e3, (e4) => e4.read(r3.get(e4.id), t10));
  585. }
  586. readSublayerOverrides(e3, r3) {
  587. const t10 = new Map();
  588. for (const i5 of e3)
  589. i5 != null && typeof i5 == "object" && typeof i5.id == "number" ? t10.set(i5.id, i5) : r3.messages.push(new s2("building-scene-layer:invalid-sublayer-override", "Invalid value for sublayer override. Not an object or no id specified.", { value: i5 }));
  590. return { overrides: t10, context: r3 };
  591. }
  592. writeSublayerOverrides(e3, r3, t10) {
  593. const s6 = [];
  594. d5.forEachSublayer(this.sublayers, (e4) => {
  595. const r4 = e4.write({}, t10);
  596. Object.keys(r4).length > 1 && s6.push(r4);
  597. }), s6.length > 0 && (r3.sublayers = s6);
  598. }
  599. writeUnappliedOverrides(e3, r3) {
  600. r3.sublayers = [], e3.overrides.forEach((e4) => {
  601. r3.sublayers.push(m(e4));
  602. });
  603. }
  604. write(e3, r3) {
  605. return e3 = super.write(e3, r3), !r3 || r3.origin !== "web-scene" && r3.origin !== "portal-item" || (this.sublayers ? this.writeSublayerOverrides(this.sublayers, e3, r3) : this.sublayerOverrides && this.writeUnappliedOverrides(this.sublayerOverrides, e3)), e3;
  606. }
  607. read(e3, r3) {
  608. if (super.read(e3, r3), r3 && (r3.origin === "web-scene" || r3.origin === "portal-item") && e3 != null && Array.isArray(e3.sublayers)) {
  609. const t10 = this.readSublayerOverrides(e3.sublayers, r3);
  610. this.sublayers ? this.applySublayerOverrides(this.sublayers, t10) : this.sublayerOverrides = t10;
  611. }
  612. }
  613. readSummaryStatistics(e3, r3) {
  614. if (typeof r3.statisticsHRef == "string") {
  615. const e4 = G(this.parsedUrl.path, r3.statisticsHRef);
  616. return new c7({ url: e4 });
  617. }
  618. return null;
  619. }
  620. set elevationInfo(e3) {
  621. this._set("elevationInfo", e3), this._validateElevationInfo();
  622. }
  623. load(e3) {
  624. const r3 = r(e3) ? e3.signal : null, t10 = this.loadFromPortal({ supportedTypes: ["Scene Service"] }, e3).catch(w).then(() => this._fetchService(r3)).then(() => this._fetchAssociatedFeatureService(r3));
  625. return this.addResolvingPromise(t10), Promise.resolve(this);
  626. }
  627. loadAll() {
  628. return n2(this, (e3) => {
  629. d5.forEachSublayer(this.sublayers, (r3) => {
  630. r3.type !== "building-group" && e3(r3);
  631. }), this.summaryStatistics && e3(this.summaryStatistics);
  632. });
  633. }
  634. async saveAs(e3, r3) {
  635. return this._debouncedSaveOperations(K.SAVE_AS, { ...r3, getTypeKeywords: () => this._getTypeKeywords(), portalItemLayerType: "building-scene" }, e3);
  636. }
  637. async save() {
  638. const e3 = { getTypeKeywords: () => this._getTypeKeywords(), portalItemLayerType: "building-scene" };
  639. return this._debouncedSaveOperations(K.SAVE, e3);
  640. }
  641. validateLayer(e3) {
  642. if (!e3.layerType || e3.layerType !== "Building")
  643. throw new s2("buildingscenelayer:layer-type-not-supported", "BuildingSceneLayer does not support this layer type", { layerType: e3.layerType });
  644. }
  645. _getTypeKeywords() {
  646. return ["Building"];
  647. }
  648. _validateElevationInfo() {
  649. const e3 = this.elevationInfo;
  650. e3 && (e3.mode !== "absolute-height" && B2.warn(".elevationInfo=", "Building scene layers only support absolute-height elevation mode"), e3.featureExpressionInfo && e3.featureExpressionInfo.expression !== "0" && B2.warn(".elevationInfo=", "Building scene layers do not support featureExpressionInfo"));
  651. }
  652. async _fetchAssociatedFeatureService(e3) {
  653. const r3 = new l4(this.parsedUrl, this.portalItem, this.apiKey, e3);
  654. try {
  655. this.associatedFeatureServiceItem = await r3.fetchPortalItem();
  656. } catch (t10) {
  657. B2.warn("Associated feature service item could not be loaded", t10);
  658. }
  659. }
  660. };
  661. e([d({ type: ["BuildingSceneLayer"] })], K2.prototype, "operationalLayerType", void 0), e([d({ readOnly: true })], K2.prototype, "allSublayers", void 0), e([d(P2)], K2.prototype, "sublayers", void 0), e([o("service", "sublayers")], K2.prototype, "readSublayers", null), e([d({ type: _, nonNullable: true, json: { write: true } })], K2.prototype, "filters", void 0), e([d({ type: String, json: { write: true } })], K2.prototype, "activeFilterId", void 0), e([d({ readOnly: true, type: c7 })], K2.prototype, "summaryStatistics", void 0), e([o("summaryStatistics", ["statisticsHRef"])], K2.prototype, "readSummaryStatistics", null), e([d({ type: [String], json: { read: false } })], K2.prototype, "outFields", void 0), e([d(j2)], K2.prototype, "fullExtent", void 0), e([d({ type: ["show", "hide", "hide-children"] })], K2.prototype, "listMode", void 0), e([d(y(k))], K2.prototype, "spatialReference", void 0), e([d(d3)], K2.prototype, "elevationInfo", null), e([d({ json: { read: false }, readOnly: true })], K2.prototype, "type", void 0), e([d()], K2.prototype, "associatedFeatureServiceItem", void 0), K2 = e([n("esri.layers.BuildingSceneLayer")], K2);
  662. var R = K2;
  663. export {
  664. R as default
  665. };
  666. //# sourceMappingURL=BuildingSceneLayer-35UYR6TW.js.map