@arcgis/core 5.0.0-next.5 → 5.0.0-next.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/analysis/VolumeMeasurement/volumeMeasurementConfiguration.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/020c8913d8e35d63080b.js +1 -0
  4. package/assets/esri/core/workers/chunks/{c2b47a7dc961863d283f.js → 02e69f0c63d97661da60.js} +1 -1
  5. package/assets/esri/core/workers/chunks/087973e7c4fea5fcfa5e.js +1 -0
  6. package/assets/esri/core/workers/chunks/{929ece362604dc301229.js → 17acde0245ecd956306c.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{8cea114168d849c38b1b.js → 20278683bddc8c2d8136.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{dc4982b0ac007bd70213.js → 22d6b8102e75bdef204c.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{3271614322ba4b44fb5a.js → 279366e6b743f9680603.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{f7c99e9c8d19352af38d.js → 3ac7562ea90f91a9f30c.js} +1 -1
  11. package/assets/esri/core/workers/chunks/3f3d492f1093b7832aab.js +1 -0
  12. package/assets/esri/core/workers/chunks/464d42bebb365287808d.js +1 -0
  13. package/assets/esri/core/workers/chunks/{d570c75a425aa29672c8.js → 4d599008e1ea42321b37.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{0686243904381ef863dc.js → 53bd8996e8812f1ad7b2.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{762fe93015b705546188.js → 5bd36dbf46c25bd961c8.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{b7a17927e14f502006b4.js → 5ea0c62016d56990787b.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{2ea6985da4eb0107bb9d.js → 5fc7b61f467f1d60a284.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{a87521ebe632bf783ef4.js → 62a49cfd9a2508950e9f.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{ec13053af1999701464a.js → 6826fe54562dcdc054d7.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{309c5f69ea06f3081d83.js → 73487b9d85e726e9c012.js} +1 -1
  21. package/assets/esri/core/workers/chunks/7413e582bc2b16af6a0f.js +1 -0
  22. package/assets/esri/core/workers/chunks/{88d942cd25bef74fd50a.js → 7461124454bfb4fb6474.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{147ad5fdd02f46b6da24.js → 7544316a75dbd981aea6.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{0f8847f9ae3068833fa4.js → 75bf27271a31e26e1b21.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{630efe10c871425b6a95.js → 76ae1702fecc7ad7017c.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{de1f75c907152df7e788.js → 794748fd1edc29a621cd.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{e1258b6a404e58878c7a.js → 7aaaebbabee27690283c.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{6a69dafeb7c9ca8a3d84.js → 7c4a63aeead2505d6f02.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{d84373a6ec94dcfec8c2.js → 88074189fa10c335370b.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{a8c4fd779e454e4075c4.js → 8833c3d168951be4bf20.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{85622fe99f4d08afe875.js → 8a314b3790313e6dc5db.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{b0b2670596d6d8c32b5e.js → 8c056eac35d05d9524b7.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{1a713dcc9971e1935401.js → 8f56f298e7c1a283f407.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{dabc5a38a472c9719df9.js → 8ffd4710d168c2fcfd96.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{1da74aa308ded5748ef5.js → 90250e9239c173aace88.js} +1 -1
  36. package/assets/esri/core/workers/chunks/90b2b43b8b54c9a1ec35.js +1 -0
  37. package/assets/esri/core/workers/chunks/90f8b4bda28af43ea019.js +1 -0
  38. package/assets/esri/core/workers/chunks/{89027f6800e17fab8973.js → 9486032af3e934d85582.js} +1 -1
  39. package/assets/esri/core/workers/chunks/95c594a87b732f5c4979.js +1 -0
  40. package/assets/esri/core/workers/chunks/{239377336a2009caea01.js → 99859dce1925b406ccd0.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{a137c27ce078bea44f89.js → 9e8dceef4c961f56940d.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{f5b7e7f2860a825ed373.js → 9fac5a12e878cd745354.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{f779034623980bf9a37c.js → a06bac9b8f9e18874de8.js} +2 -2
  44. package/assets/esri/core/workers/chunks/{01642fe19e81bfa33eb5.js → a395373e3173e6458a56.js} +1 -1
  45. package/assets/esri/core/workers/chunks/a3991ae8caa713d4ddcd.js +1 -0
  46. package/assets/esri/core/workers/chunks/{a6ac1ff89c40f3a4797a.js → a712cdff78fc826acd8c.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{af3fc2562bb6d217adf6.js → aa54b6f2aba6952af149.js} +1 -1
  48. package/assets/esri/core/workers/chunks/ac26e3e77df4302f47a2.js +1 -0
  49. package/assets/esri/core/workers/chunks/af5fc5d6c1d072a27df1.js +1 -0
  50. package/assets/esri/core/workers/chunks/{bc3bcf88b252760e2574.js → b3028b1ff75eafd0c358.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{5875a51b97ee9bd438a0.js → bc241c7735e4efba734a.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{56916e56c20465428dd4.js → be3b874f86f627f4fa98.js} +1 -1
  53. package/assets/esri/core/workers/chunks/c4e4da69969499a89a2c.js +1 -0
  54. package/assets/esri/core/workers/chunks/c8733cd621105afab2ac.js +1 -0
  55. package/assets/esri/core/workers/chunks/ccc0da0e01f023c8aa1f.js +1 -0
  56. package/assets/esri/core/workers/chunks/{c0b7e86860838638537f.js → cd1930f08e1fc8b30b14.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{551c6c89b51b99f4864b.js → d1fe816b6990918c13c7.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{8605ec4678eb4511c715.js → d305a21666b1ed5bf33d.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{037b2548bf85e2d7c6ac.js → d40f57f9fc47f9a9f97c.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{a29d7205394cb8b2a847.js → d97fadbc69e055d183a0.js} +1 -1
  61. package/assets/esri/core/workers/chunks/dedc4583b5f32a278124.js +1 -0
  62. package/assets/esri/core/workers/chunks/{e5bcc44f3dc6fc90835a.js → e5a06ce0ef6a9a90e100.js} +1 -1
  63. package/assets/esri/core/workers/chunks/f0e0a63962784acb4ba1.js +1 -0
  64. package/assets/esri/core/workers/chunks/f4d0ae6be1b3984228d0.js +1 -0
  65. package/assets/esri/core/workers/chunks/{7c5c272612198db83851.js → f5e47eea8720ba84665b.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{fa4411e0a5ac3fcba365.js → f65c0102af17390a50ac.js} +1 -1
  67. package/assets/esri/core/workers/chunks/f6c11c8ac687de3ef1ab.js +1 -0
  68. package/assets/esri/core/workers/chunks/{7596d005a4dc3964b140.js → f6c8beb60f6d29945a2e.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{a2a284d4dd5caaecbc2e.js → f746e3f7ebff2bbdf333.js} +1 -1
  70. package/assets/esri/core/workers/chunks/f9324e88c359c03f35aa.js +1 -0
  71. package/assets/esri/core/workers/chunks/{cfa3164e7fa1884dc2b9.js → facb3886714222772ab2.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{aa6eb55e4fb57c4e8eeb.js → fd2efd1d1cf9d95a87e6.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{fe3f95fda29e4844b153.js → fe77ae6cf232a7a3298e.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{2ce4a0fe4fae63c43a81.js → ff35a077ac6776469805.js} +1 -1
  75. package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +14 -4
  76. package/assets/esri/themes/dark/main.css +1 -1
  77. package/assets/esri/themes/light/main.css +1 -1
  78. package/assets/esri/themes/light/view.css +1 -1
  79. package/config.js +1 -1
  80. package/core/Identifiable.js +1 -1
  81. package/core/MultiOriginJSONSupport.js +1 -1
  82. package/core/NumericIdentifiable.js +5 -0
  83. package/core/WriteableMultiOriginJSONMixin.js +5 -0
  84. package/core/performance.js +5 -0
  85. package/core/scheduling.js +1 -1
  86. package/editing/sharedTemplates/executor/support/createFeatureServiceEdit.js +1 -1
  87. package/interfaces.d.ts +18 -2
  88. package/kernel.js +1 -1
  89. package/layers/support/MediaElementBase.js +1 -1
  90. package/layers/support/fieldUtils.js +1 -1
  91. package/package.json +3 -3
  92. package/support/basemapDefinitions.js +1 -1
  93. package/support/revision.js +1 -1
  94. package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
  95. package/undoredo/support/Services.js +1 -1
  96. package/views/2d/constraints/GeometryConstraint.js +1 -1
  97. package/views/2d/constraints/RotationConstraint.js +1 -1
  98. package/views/2d/constraints/ZoomConstraint.js +1 -1
  99. package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
  100. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  101. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  102. package/views/3d/layers/FlowSubView3D.js +1 -1
  103. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  104. package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
  105. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  106. package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
  107. package/views/3d/layers/support/lyr3dTypeConversions.js +1 -1
  108. package/views/3d/support/flow/FlowSubViewExtent3D.js +1 -1
  109. package/views/3d/support/flow/StreamlineResources3DOverlay.js +1 -1
  110. package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
  111. package/views/3d/terrain/OverlayRenderer.js +1 -1
  112. package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
  113. package/views/analysis/ElevationProfile/constants.js +1 -1
  114. package/views/support/Scheduler.js +1 -1
  115. package/widgets/Attachments/AttachmentsViewModel.js +1 -1
  116. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  117. package/widgets/Search/LayerSearchSource.js +1 -1
  118. package/widgets/UtilityNetworkTrace.js +1 -1
  119. package/assets/esri/core/workers/chunks/0366b78b0ccf4ed5f6ac.js +0 -1
  120. package/assets/esri/core/workers/chunks/0429c1a3690f20647c9f.js +0 -1
  121. package/assets/esri/core/workers/chunks/0f100e163e1847e04155.js +0 -1
  122. package/assets/esri/core/workers/chunks/1eedac33c9fcd7681427.js +0 -1
  123. package/assets/esri/core/workers/chunks/2f03d33f4ca8a48461fc.js +0 -1
  124. package/assets/esri/core/workers/chunks/50864c1924030e62497d.js +0 -1
  125. package/assets/esri/core/workers/chunks/655360995c1cbc78a5a3.js +0 -1
  126. package/assets/esri/core/workers/chunks/71762199aef5d3107da2.js +0 -1
  127. package/assets/esri/core/workers/chunks/72c851c400752094b162.js +0 -1
  128. package/assets/esri/core/workers/chunks/7558919912f7fdc4837b.js +0 -1
  129. package/assets/esri/core/workers/chunks/829bc5dbda2f51561446.js +0 -1
  130. package/assets/esri/core/workers/chunks/98311fec6c16a1b23586.js +0 -1
  131. package/assets/esri/core/workers/chunks/a61cb4f1ca282bf8b75d.js +0 -1
  132. package/assets/esri/core/workers/chunks/bc6619307f312f9241bf.js +0 -1
  133. package/assets/esri/core/workers/chunks/bfc1e8aec7aace3ff30e.js +0 -1
  134. package/assets/esri/core/workers/chunks/c134ebbaeac514cbd657.js +0 -1
  135. package/assets/esri/core/workers/chunks/c368a8e8d2f1535af446.js +0 -1
  136. package/assets/esri/core/workers/chunks/d886fb97bdb348a16f25.js +0 -1
  137. package/assets/esri/core/workers/chunks/e6a86cad44056735ed26.js +0 -1
package/config.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.0.0-next.5";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
5
+ import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.0.0-next.6";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{subclass as t}from"./accessorSupport/decorators/subclass.js";let r=0;const s=s=>{const o=s;let i=class extends o{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+r++})}};return i=e([t("esri.core.Identifiable")],i),i},o=s=>{const o=s;let i=class extends o{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:r++})}};return i=e([t("esri.core.Identifiable.NumericIdentifiable")],i),i},i=s(class{});export{i as Identifiable,s as IdentifiableMixin,o as NumericIdentifiableMixin};
5
+ import{__decorate as t}from"tslib";import{subclass as e}from"./accessorSupport/decorators/subclass.js";let r=0;const o=o=>{const s=o;let c=class extends s{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+r++})}};return c=t([e("esri.core.Identifiable")],c),c},s=o(class{});export{s as Identifiable,o as IdentifiableMixin};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as r}from"tslib";import t from"./Accessor.js";import{ReadOnlyMultiOriginJSONMixin as o}from"./ReadOnlyMultiOriginJSONSupport.js";import{get as s}from"./accessorSupport/get.js";import{nameToId as e,originIdNum as i}from"./accessorSupport/PropertyOrigin.js";import{getProperties as p}from"./accessorSupport/utils.js";import{write as c}from"./accessorSupport/write.js";import{subclass as n}from"./accessorSupport/decorators/subclass.js";const u=t=>{const o=t;let u=class extends o{constructor(...r){super(...r)}clear(r,t="user"){p(this).clearOrigin(r,e(t))}write(r,t){return c(this,r=r||{},t),r}setAtOrigin(r,t,o){p(this).setAtOrigin(r,t,e(o))}removeOrigin(r){const t=O(this),o=e(r),s=t.keys(o);for(const e of s)t.originOf(e)===o&&t.set(e,t.get(e,o),7)}updateOrigin(r,t){const o=O(this),p=e(t),c=s(this,r);for(let s=p+1;s<i;++s)o.delete(r,s);o.set(r,c,p)}toJSON(r){return this.write({},r)}};return u=r([n("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],u),u.prototype.toJSON.isDefaultToJSON=!0,u};function O(r){return p(r).store}const l=t=>{const s=u(o(t));let e=class extends s{};return e=r([n("esri.core.MultiOriginJSONSupport")],e),e},m=l(t);export{l as MultiOriginJSONMixin,m as MultiOriginJSONSupport};
5
+ import{__decorate as r}from"tslib";import o from"./Accessor.js";import{ReadOnlyMultiOriginJSONMixin as t}from"./ReadOnlyMultiOriginJSONSupport.js";import{WriteableMultiOriginJSONMixin as i}from"./WriteableMultiOriginJSONMixin.js";import{subclass as s}from"./accessorSupport/decorators/subclass.js";const e=o=>{const e=i(t(o));let p=class extends e{};return p=r([s("esri.core.MultiOriginJSONSupport")],p),p},p=e(o);export{e as MultiOriginJSONMixin,p as MultiOriginJSONSupport};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
+ */
5
+ import{__decorate as e}from"tslib";import{subclass as r}from"./accessorSupport/decorators/subclass.js";let t=0;const s=s=>{const o=s;let c=class extends o{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:t++})}};return c=e([r("esri.core.NumericIdentifiable")],c),c};export{s as NumericIdentifiableMixin};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
+ */
5
+ import{__decorate as r}from"tslib";import"./Logger.js";import"./has.js";import{get as t}from"./accessorSupport/get.js";import"./RandomLCG.js";import{getProperties as o}from"./accessorSupport/utils.js";import"./Error.js";import{subclass as s}from"./accessorSupport/decorators/subclass.js";import{nameToId as i,originIdNum as e}from"./accessorSupport/PropertyOrigin.js";import{write as p}from"./accessorSupport/write.js";const c=c=>{const m=c;let u=class extends m{constructor(...r){super(...r)}clear(r,t="user"){o(this).clearOrigin(r,i(t))}write(r,t){return p(this,r=r||{},t),r}setAtOrigin(r,t,s){o(this).setAtOrigin(r,t,i(s))}removeOrigin(r){const t=n(this),o=i(r),s=t.keys(o);for(const i of s)t.originOf(i)===o&&t.set(i,t.get(i,o),7)}updateOrigin(r,o){const s=n(this),p=i(o),c=t(this,r);for(let t=p+1;t<e;++t)s.delete(r,t);s.set(r,c,p)}toJSON(r){return this.write({},r)}};return u=r([s("esri.core.WriteableMultiOriginJSONMixin")],u),u.prototype.toJSON.isDefaultToJSON=!0,u};function n(r){return o(r).store}export{c as WriteableMultiOriginJSONMixin};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
+ */
5
+ function o(o,t,e,n,c){console.timeStamp(o,t,e,c,n)}export{o as recordPerformance};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{nextTick as e}from"./nextTick.js";import t from"./PerformanceSampler.js";import n from"./PooledArray.js";import{createResolver as r,isAborted as s,createAbortError as o}from"./promiseUtils.js";import{Milliseconds as a}from"./time.js";class i{constructor(e){this.phases=e,this.paused=!1,this.ticks=-1,this.removed=!1}}class c{constructor(e){this.callback=e,this.isActive=!0}remove(){this.isActive=!1}}let m=0,u=0;const l={time:a(0),deltaTime:a(0),elapsedFrameTime:a(0),frameDuration:a(0)},p=["prepare","preRender","render","postRender","update","finish"],f=[],h=new n;class d{constructor(e){this._task=e}remove(){this._task.removed=!0}pause(){this._task.paused=!0}resume(){this._task.paused=!1,k()}}function w(){null!=T&&(cancelAnimationFrame(T),T=requestAnimationFrame(D))}function k(){null==T&&(m=performance.now(),T=requestAnimationFrame(D))}const v={frameTasks:h,willDispatch:!1,clearFrameTasks:j,dispatch:y,executeFrameTasks:q,reschedule:w};function A(t){const n=new c(t);return f.push(n),v.willDispatch||(v.willDispatch=!0,e(y)),n}function F(e){const t=new i(e);return h.push(t),k(),new d(t)}let T=null;function j(e=!1){h.forAll(e=>{e.removed=!0}),e&&b()}function x(e){u=Math.max(0,e)}function D(){const e=performance.now();T=null;const t=h.some(e=>!e.paused&&!e.removed);T=t?requestAnimationFrame(D):null,v.executeFrameTasks(e)}function q(e){const t=a(e-m);m=e;const n=u>0?u:1e3/60,r=Math.max(0,t-n);l.time=e,l.frameDuration=a(n-r);for(let s=0;s<p.length;s++){const n=performance.now(),r=p[s];h.forAll(n=>{if(n.paused||n.removed)return;0===s&&n.ticks++;n.phases[r]&&(l.elapsedFrameTime=a(performance.now()-e),l.deltaTime=0===n.ticks?a(0):t,n.phases[r]?.call(n,l))}),S[s].push(performance.now()-n)}b(),z.push(performance.now()-e)}const _=new n;function b(){h.forAll(e=>{e.removed&&_.push(e)}),h.removeUnorderedMany(_.data,_.length),_.clear()}function g(){h.prune(),_.prune()}function y(){for(;f.length;){const e=f.shift();e.isActive&&e.callback()}v.willDispatch=!1}function M(t=1,n){const a=r(),i=()=>{s(n)?a.reject(o()):0===t?a():(--t,e(()=>i()))};return i(),a.promise}function P(e){return M(1,e)}function R(){const e=r(),t=F({postRender:()=>{t.remove(),A(e)}});return e.promise}async function U(e){await P(e),await new Promise(t=>requestAnimationFrame(()=>{e?.aborted||t()}))}const S=p.map(e=>new t(e)),z=new t("total");export{d as FrameTaskHandle,F as addFrameTask,g as cleanupScheduling,v as debug,S as performanceInfo,z as performanceTotal,A as schedule,x as setFrameDuration,U as waitAnimationFrame,R as waitRender,P as waitTick,M as waitTicks};
5
+ import{nextTick as e}from"./nextTick.js";import{recordPerformance as t}from"./performance.js";import n from"./PerformanceSampler.js";import r from"./PooledArray.js";import{createResolver as s,isAborted as o,createAbortError as a}from"./promiseUtils.js";import{Milliseconds as i}from"./time.js";class c{constructor(e){this.phases=e,this.paused=!1,this.ticks=-1,this.removed=!1}}class m{constructor(e){this.callback=e,this.isActive=!0}remove(){this.isActive=!1}}let u=0,l=0;const p={time:i(0),deltaTime:i(0),elapsedFrameTime:i(0),frameDuration:i(0)},f=["prepare","preRender","render","postRender","update","finish"],h=[],d=new r;class w{constructor(e){this._task=e}remove(){this._task.removed=!0}pause(){this._task.paused=!0}resume(){this._task.paused=!1,v()}}function k(){null!=D&&(cancelAnimationFrame(D),D=requestAnimationFrame(g))}function v(){null==D&&(u=performance.now(),D=requestAnimationFrame(g))}const A={frameTasks:d,willDispatch:!1,clearFrameTasks:j,dispatch:b,executeFrameTasks:M,reschedule:k};function F(t){const n=new m(t);return h.push(n),A.willDispatch||(A.willDispatch=!0,e(b)),n}function T(e){const t=new c(e);return d.push(t),v(),new w(t)}let D=null;function j(e=!1){d.forAll(e=>{e.removed=!0}),e&&q()}function x(e){l=Math.max(0,e)}function g(){const e=performance.now();D=null;const t=d.some(e=>!e.paused&&!e.removed);D=t?requestAnimationFrame(g):null,A.executeFrameTasks(e)}function M(e){const n=i(e-u);u=e;const r=l>0?l:1e3/60,s=Math.max(0,n-r);p.time=e,p.frameDuration=i(r-s);for(let a=0;a<f.length;a++){const r=performance.now(),s=f[a];d.forAll(t=>{if(t.paused||t.removed)return;0===a&&t.ticks++;t.phases[s]&&(p.elapsedFrameTime=i(performance.now()-e),p.deltaTime=0===t.ticks?i(0):n,t.phases[s]?.call(t,p))});const o=performance.now();U[a].push(o-r),t(s,r,o,"Maps SDK","Scheduling")}q();const o=performance.now();z.push(o-e),t("Animation Frame",e,o,"Maps SDK","Scheduling")}const S=new r;function q(){d.forAll(e=>{e.removed&&S.push(e)}),d.removeUnorderedMany(S.data,S.length),S.clear()}function _(){d.prune(),S.prune()}function b(){for(;h.length;){const e=h.shift();e.isActive&&e.callback()}A.willDispatch=!1}function y(t=1,n){const r=s(),i=()=>{o(n)?r.reject(a()):0===t?r():(--t,e(()=>i()))};return i(),r.promise}function P(e){return y(1,e)}function R(){const e=s(),t=T({postRender:()=>{t.remove(),F(e)}});return e.promise}async function K(e){await P(e),await new Promise(t=>requestAnimationFrame(()=>{e?.aborted||t()}))}const U=f.map(e=>new n(e)),z=new n("total");export{w as FrameTaskHandle,T as addFrameTask,_ as cleanupScheduling,A as debug,U as performanceInfo,z as performanceTotal,F as schedule,x as setFrameDuration,K as waitAnimationFrame,R as waitRender,P as waitTick,y as waitTicks};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../Graphic.js";import t from"../../../../core/Error.js";import{generateBracedUUID as a}from"../../../../core/uuid.js";import{isLoadedSharedTemplate as s}from"../../../templateUtils.js";import{isRadial as r}from"./executorUtils.js";import i from"../../../../geometry/Multipoint.js";import o from"../../../../geometry/Point.js";import n from"../../../../geometry/Polygon.js";import l from"../../../../geometry/Polyline.js";import{isSubtypeGroupLayer as h}from"../../../../layers/support/layerUtils.js";function p({edits:i,geometry:o,relationships:n,tag:h="",template:f}){if(r(o)){const e=o.geometry.clone();for(const t of e.paths){p({geometry:new l({spatialReference:e.spatialReference,paths:[t],hasZ:e.hasZ,hasM:e.hasM}),template:f,edits:i,relationships:n,tag:h})}return}const{definition:c,layer:m}=f;o=u(o,m);const d=new e({attributes:c.defaultValues?{...c.defaultValues}:{},geometry:o,sourceLayer:m});if(y(d,m),m.globalIdField&&(d.attributes[m.globalIdField]=a()),i.push({id:m.layerId,graphic:d,tag:h,layer:m}),0!==c.relationships.length)for(const r of c.relationships||[]){const o=r.template;if(null==r.relationshipMetadata||!s(o))throw new t("shared-template:missing-relationship-metadata-or-definition","Relationship part must have metadata and a fully loaded template with definition");const{layer:l}=o,h=new e({attributes:{...c.defaultValues},sourceLayer:l});y(h,l),l.globalIdField&&(h.attributes[l.globalIdField]=a()),i.push({graphic:h,id:l.layerId,tag:"",layer:l}),n.push({...r.relationshipMetadata,sourceGraphic:d,destinationGraphic:h})}}function u(e,t){if(!e)return null;if(e.hasZ===t.hasZ&&e.hasM===t.hasM)return e;switch(e.type){case"point":return new o({spatialReference:e.spatialReference,x:e.x,y:e.y,...t.hasZ?e.hasZ?{z:e.z}:{z:m(t)}:{},...t.hasM?e.hasM?{m:e.m}:{m:d(t)}:{}});case"polygon":return new n({spatialReference:e.spatialReference,rings:f(e.rings,t.hasZ,t.hasM,m(t),d(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1),hasZ:t.hasZ,hasM:t.hasM});case"polyline":return new l({spatialReference:e.spatialReference,paths:f(e.paths,t.hasZ,t.hasM,m(t),d(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1),hasZ:t.hasZ,hasM:t.hasM});case"multipoint":return new i({spatialReference:e.spatialReference,hasZ:t.hasZ,hasM:t.hasM,points:c(e.points,t.hasZ,t.hasM,m(t),d(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1)});default:return e}}function f(e,t,a,s,r,i,o){const n=[];for(const l of e)n.push(c(l,t,a,s,r,i,o));return n}function c(e,t,a,s,r,i,o){const n=[];for(const l of e){const e=[l[0],l[1]];t&&(e[2]=o>-1?l[2]:s),a&&(e[t?3:2]=i>-1?l[i]:r),n.push(e)}return n}function m(e){return e.capabilities.editing?.zDefault??0}function d(e){return e.capabilities.editing.supportsUpdateWithoutM?void 0:0}function y(e,t){h(t)&&(e.sourceLayer=t.findSublayerForFeature(e))}export{p as createFeatureServiceEdit};
5
+ import e from"../../../../Graphic.js";import t from"../../../../core/Error.js";import{generateBracedUUID as a}from"../../../../core/uuid.js";import{isLoadedSharedTemplate as s}from"../../../templateUtils.js";import{isRadial as r}from"./executorUtils.js";import i from"../../../../geometry/Multipoint.js";import o from"../../../../geometry/Point.js";import n from"../../../../geometry/Polygon.js";import l from"../../../../geometry/Polyline.js";import{isSubtypeGroupLayer as h}from"../../../../layers/support/layerUtils.js";function p({edits:i,geometry:o,relationships:n,tag:h="",template:f}){if(r(o)){const e=o.geometry.clone();for(const t of e.paths){p({geometry:new l({spatialReference:e.spatialReference,paths:[t],hasZ:e.hasZ,hasM:e.hasM}),template:f,edits:i,relationships:n,tag:h})}return}const{definition:c,layer:m}=f;o=u(o,m);const d=new e({attributes:c.defaultValues?{...c.defaultValues}:{},geometry:o,sourceLayer:m});if(y(d,m),m.globalIdField&&(d.attributes[m.globalIdField]=a()),i.push({id:m.layerId,graphic:d,tag:h,layer:m}),0!==c.relationships.length)for(const r of c.relationships||[]){const o=r.template;if(null==r.relationshipMetadata||!s(o))throw new t("shared-template:missing-relationship-metadata-or-definition","Relationship part must have metadata and a fully loaded template with definition");const{layer:l}=o,h=new e({attributes:{...c.defaultValues},sourceLayer:l});y(h,l),l.globalIdField&&(h.attributes[l.globalIdField]=a()),i.push({graphic:h,id:l.layerId,tag:"",layer:l}),n.push({...r.relationshipMetadata,sourceGraphic:d,destinationGraphic:h})}}function u(e,t){if(!e)return null;if(e.hasZ===t.hasZ&&e.hasM===t.hasM)return e;switch(e.type){case"point":return new o({spatialReference:e.spatialReference,x:e.x,y:e.y,...t.hasZ?e.hasZ?{z:e.z}:{z:m(t)}:{},...t.hasM?e.hasM?{m:e.m}:{m:d(t)??void 0}:{}});case"polygon":return new n({spatialReference:e.spatialReference,rings:f(e.rings,t.hasZ,t.hasM,m(t),d(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1),hasZ:t.hasZ,hasM:t.hasM});case"polyline":return new l({spatialReference:e.spatialReference,paths:f(e.paths,t.hasZ,t.hasM,m(t),d(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1),hasZ:t.hasZ,hasM:t.hasM});case"multipoint":return new i({spatialReference:e.spatialReference,hasZ:t.hasZ,hasM:t.hasM,points:c(e.points,t.hasZ,t.hasM,m(t),d(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1)});default:return e}}function f(e,t,a,s,r,i,o){const n=[];for(const l of e)n.push(c(l,t,a,s,r,i,o));return n}function c(e,t,a,s,r,i,o){const n=[];for(const l of e){const e=[l[0],l[1]];t&&(e[2]=o>-1?l[2]:s),a&&(e[t?3:2]=i>-1?l[i]:r),n.push(e)}return n}function m(e){return e.capabilities.editing?.zDefault??0}function d(e){return e.capabilities.editing.supportsUpdateWithoutM?void 0:0}function y(e,t){h(t)&&(e.sourceLayer=t.findSublayerForFeature(e))}export{p as createFeatureServiceEdit};
package/interfaces.d.ts CHANGED
@@ -50872,8 +50872,6 @@ declare namespace __esri {
50872
50872
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-Network.html#ValidateTopologyProps Read more...}
50873
50873
  */
50874
50874
  export interface ValidateTopologyProps {
50875
- gdbVersion?: string;
50876
- sessionID?: string;
50877
50875
  validateArea: Extent;
50878
50876
  validationSet?: ValidationSetItemJSON[];
50879
50877
  validationType?: "normal" | "rebuild" | "force-rebuild";
@@ -51739,6 +51737,15 @@ declare namespace __esri {
51739
51737
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#queryAssociations Read more...}
51740
51738
  */
51741
51739
  queryAssociations(props: QueryAssociationsParameters, options?: UtilityNetworkQueryAssociationsOptions): Promise<Association[]>;
51740
+ /**
51741
+ * Whenever the network is edited or modified, the network and its features become out of date in the [network topology]( https://pro.arcgis.com/en/pro-app/latest/help/data/utility-network/about-network-topology.htm).
51742
+ *
51743
+ * @param parameters The parameters that are used to validate the network topology.
51744
+ * @param options The request options specified by the user in the data request. See {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#RequestOptions RequestOptions} for available properties.
51745
+ *
51746
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#submitTopologyValidationJob Read more...}
51747
+ */
51748
+ submitTopologyValidationJob(parameters: ValidateTopologyProps, options?: RequestOptions): Promise<TopologyValidationJobInfo | nullish>;
51742
51749
  /**
51743
51750
  * The submitTraceJob method takes a set of parameters, executes the asynchronous trace on the backend, and returns trace results.
51744
51751
  *
@@ -51763,6 +51770,15 @@ declare namespace __esri {
51763
51770
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#trace Read more...}
51764
51771
  */
51765
51772
  trace(props: UtilityNetworkTraceProps): Promise<TraceResult>;
51773
+ /**
51774
+ * Whenever the network is edited or modified, the network and its features become out of date in the [network topology]( https://pro.arcgis.com/en/pro-app/latest/help/data/utility-network/about-network-topology.htm).
51775
+ *
51776
+ * @param parameters The parameters that are used to validate the network topology.
51777
+ * @param options The request options specified by the user in the data request. See {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#RequestOptions RequestOptions} for available properties.
51778
+ *
51779
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#validateTopology Read more...}
51780
+ */
51781
+ validateTopology(parameters: ValidateTopologyProps, options?: RequestOptions): Promise<ValidateNetworkTopologyResult>;
51766
51782
  static fromJSON(json: any): UtilityNetwork;
51767
51783
  }
51768
51784
 
package/kernel.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.0";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.0.0-next.5",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
5
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.0";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.0.0-next.6",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import r from"../../core/Error.js";import{NumericIdentifiableMixin as o}from"../../core/Identifiable.js";import{Loadable as t}from"../../core/Loadable.js";import s from"../../core/Logger.js";import{MultiOriginJSONMixin as n}from"../../core/MultiOriginJSONSupport.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{reader as c}from"../../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{writer as l}from"../../core/accessorSupport/decorators/writer.js";import a from"./ControlPointsGeoreference.js";import{toControlPointsGeoreference as m,mediaGeoreferenceProperty as f}from"./mediaUtils.js";let u=class extends(o(n(t))){constructor(e){super(e),this.georeference=null,this.opacity=1}readGeoreference(e){return a.fromJSON(e)}writeGeoreference(e,o,t,n){const i=n?.resources?.pendingOperations,c=()=>{const i=m(this.georeference,this.contentWidth,this.contentHeight);if(i){if("control-points"!==e.type&&s.getLogger(this).warn(`only georeference of type 'control-points' may be persisted. The georeference of type '${e.type}' has been automatically converted.`),4!==i.controlPoints?.length&&n?.messages)return void n.messages.push(new r("property:unsupported","only 'control-points' georeference with 4 control points may be persisted."));o[t]=i.write({},n)}};if("control-points"!==e.type&&!this.loaded&&i)return o[t]={},void i.push(this.load().then(c));c()}get contentWidth(){return 0}get contentHeight(){return 0}toSource(e){const{georeference:r,contentWidth:o,contentHeight:t}=this;if(null==e||null==r||0===o||0===t)return null;const s=r.toSourceNormalized(e);return null==s?null:(s.x*=o,s.y*=t,s)}};e([i(f)],u.prototype,"georeference",void 0),e([c("georeference")],u.prototype,"readGeoreference",null),e([l("georeference")],u.prototype,"writeGeoreference",null),e([i({json:{read:!1,write:!1}})],u.prototype,"opacity",void 0),u=e([p("esri.layers.support.MediaElementBase")],u);export{u as default};
5
+ import{__decorate as e}from"tslib";import r from"../../core/Error.js";import{Loadable as o}from"../../core/Loadable.js";import t from"../../core/Logger.js";import{MultiOriginJSONMixin as s}from"../../core/MultiOriginJSONSupport.js";import{NumericIdentifiableMixin as n}from"../../core/NumericIdentifiable.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{reader as c}from"../../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{writer as l}from"../../core/accessorSupport/decorators/writer.js";import a from"./ControlPointsGeoreference.js";import{toControlPointsGeoreference as m,mediaGeoreferenceProperty as f}from"./mediaUtils.js";let u=class extends(n(s(o))){constructor(e){super(e),this.georeference=null,this.opacity=1}readGeoreference(e){return a.fromJSON(e)}writeGeoreference(e,o,s,n){const i=n?.resources?.pendingOperations,c=()=>{const i=m(this.georeference,this.contentWidth,this.contentHeight);if(i){if("control-points"!==e.type&&t.getLogger(this).warn(`only georeference of type 'control-points' may be persisted. The georeference of type '${e.type}' has been automatically converted.`),4!==i.controlPoints?.length&&n?.messages)return void n.messages.push(new r("property:unsupported","only 'control-points' georeference with 4 control points may be persisted."));o[s]=i.write({},n)}};if("control-points"!==e.type&&!this.loaded&&i)return o[s]={},void i.push(this.load().then(c));c()}get contentWidth(){return 0}get contentHeight(){return 0}toSource(e){const{georeference:r,contentWidth:o,contentHeight:t}=this;if(null==e||null==r||0===o||0===t)return null;const s=r.toSourceNormalized(e);return null==s?null:(s.x*=o,s.y*=t,s)}};e([i(f)],u.prototype,"georeference",void 0),e([c("georeference")],u.prototype,"readGeoreference",null),e([l("georeference")],u.prototype,"writeGeoreference",null),e([i({json:{read:!1,write:!1}})],u.prototype,"opacity",void 0),u=e([p("esri.layers.support.MediaElementBase")],u);export{u as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../core/Error.js";import{getDeepValue as n,setDeepValue as i}from"../../core/object.js";import{union as t}from"../../core/SetUtils.js";import{parseWhereClause as r}from"../../core/sql.js";import{getDomainRange as l}from"./domainUtils.js";import{getFieldNameFromSimpleExpression as o}from"../../support/arcadeExpressionUtils.js";import{isStringOrNull as s,isString as a}from"../../support/guards.js";import{loadArcade as u}from"../../support/loadArcade.js";const f=/^([0-9_])/,d=/[^a-z0-9_\u0080-\uffff]+/gi;function c(e){if(null==e)return null;return e.trim().replaceAll(d,"_").replace(f,"F$1")||null}const p=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],m=["field","normalizationField"];function y(e,n){if(null!=e&&null!=n)for(const i of Array.isArray(e)?e:[e])if(g(p,i,n),"visualVariables"in i&&i.visualVariables)for(const e of i.visualVariables)g(m,e,n)}function g(e,t,r){if(e)for(const l of e){const e=n(l,t),o=e&&"function"!=typeof e&&r.get(e);o&&i(l,o.name,t)}}function F(e,n){if(null!=e&&n?.fields?.length)if("startField"in e){const i=n.get(e.startField),t=n.get(e.endField);e.startField=i?.name??null,e.endField=t?.name??null}else{const i=n.get(e.startTimeField),t=n.get(e.endTimeField);e.startTimeField=i?.name??null,e.endTimeField=t?.name??null}}const I=new Set;function b(e,n){return e&&n?(I.clear(),w(I,e,n),Array.from(I).sort()):[]}function w(e,n,i){if(i)if(n?.fields?.length)if(i.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const t of i)x(e,n,t);else{if(i.includes("*"))return e.clear(),void e.add("*");for(const n of i)null!=n&&e.add(n)}}function x(e,n,i){if("string"==typeof i)if(n){const t=n.get(i);t&&e.add(t.name)}else e.add(i)}function T(e,n){return null==n||null==e?[]:n.includes("*")?(e.fields??[]).map(e=>e.name):n}function h(e,n,i=1){if(!n||!e)return[];if(n.includes("*"))return["*"];const t=b(e,n);return t.length/e.fields.length>=i?["*"]:t}async function v(e,n,i,t){if(!t)return;const r=o(t);if(r)x(e,n,r);else{const{arcadeUtils:r}=await u(),l=r.extractFieldNames(t,i?.partitions??n?.fields?.map(e=>e.name));for(const t of l)x(e,i?.index??n,t)}}async function S(n,i,t){if(t&&"1=1"!==t){const l=await r(t,i);if(!l.isStandardized)throw new e("fieldUtils:collectFilterFields","Where clause is not standardized",{where:t});w(n,i,l.fieldNames)}}function E({displayField:e,fields:n}){return e||(n?.length?$(n,"name-or-title")||$(n,"unique-identifier")||$(n,"type-or-category")||A(n):null)}function A(e){for(const n of e){if(!n?.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}function $(e,n){for(const i of e)if(i?.valueType&&i.valueType===n)return i.name;return null}async function _(e){if(!e)return[];const n=new Set;return await N(n,e),Array.from(n).sort()}async function N(e,n){if(!n)return;const i=n.elevationInfo?.featureExpressionInfo;return i?i.collectRequiredFields(e,n.fieldsIndex):void 0}function L(e,n,i){i.onStatisticExpression?v(e,n,null,i.onStatisticExpression.expression):e.add(i.onStatisticField)}async function M(e,n,i){if(!n||!i||!("fields"in i))return;const t=[],r=i.popupTemplate;t.push(D(e,n,r)),i.fields&&t.push(...i.fields.map(async i=>L(e,n.fieldsIndex,i))),await Promise.all(t)}async function j(e,n){const{fieldsIndex:i,trackInfo:t}=n;if(!n||!t||!i)return;const r=[t.latestObservations.renderer?.collectRequiredFields(e,i),t.previousObservations.renderer?.collectRequiredFields(e,i),t.trackLines.renderer?.collectRequiredFields(e,i)];t.popupTemplate&&r.push(D(e,n,t.popupTemplate));for(const l of[t.latestObservations.labelingInfo,t.previousObservations.labelingInfo,t.trackLines.labelingInfo])if(l)for(const n of l)r.push(Y(e,i,n));await Promise.all(r)}async function D(e,n,i){const t=[];i?.expressionInfos&&t.push(...i.expressionInfos.map(i=>v(e,n.fieldsIndex,null,i.expression)));const r=i?.content;if(Array.isArray(r))for(const l of r)"expression"===l.type&&l.expressionInfo&&t.push(v(e,n.fieldsIndex,null,l.expressionInfo.expression));await Promise.all(t)}async function O(e,n,i){n&&(n.timeInfo&&i?.timeExtent&&w(e,n.fieldsIndex,[n.timeInfo.startField,n.timeInfo.endField]),n.floorInfo&&w(e,n.fieldsIndex,[n.floorInfo.floorField]),null!=i?.where&&await S(e,n.fieldsIndex,i.where))}async function R(e,n,i){n&&i&&await Promise.all(i.map(i=>V(e,n,i)))}async function V(e,n,i){n&&i&&(i.valueExpression?await v(e,n.fieldsIndex,null,i.valueExpression):i.field&&x(e,n.fieldsIndex,i.field))}async function k(e){if(!e)return[];const n="timeInfo"in e&&e.timeInfo;return n?b(e.fieldsIndex,[e.trackIdField,n.startField,n.endField]):[]}function C(e){return e?b(e.fieldsIndex,G(e)):[]}function U(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?b(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}async function q(e,n,i){if(!n||!i)return;const t=n.fieldsIndex;await Promise.all(i.filters.map(n=>S(e,t,n.where)))}const X=new Set(["oid","global-id","guid"]),z=new Set(["oid","global-id"]),P=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^shape$/i,/^shape_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/objectid/i,/^perimeter_/i,/_perimeter$/i,/_i$/i];function B(e){const n=new Set;J(e).forEach(e=>n.add(e)),U(e).forEach(e=>n.add(e.toLowerCase()));const i=e&&"infoFor3D"in e?e.infoFor3D:void 0;return i&&(Object.values(i.assetMapFieldRoles).forEach(e=>n.add(e.toLowerCase())),Object.values(i.transformFieldRoles).forEach(e=>n.add(e.toLowerCase()))),Array.from(n)}function G(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;if(!n)return[];const{creationDateField:i,creatorField:t,editDateField:r,editorField:l}=n;return[i,t,r,l].filter(Boolean)}function J(e){return G(e).map(e=>e.toLowerCase())}function W(e,n){return e.editable&&!X.has(e.type)&&!J(n).includes(e.name?.toLowerCase()??"")}function H(e,n){const i=e.name?.toLowerCase()??"";return!(null!=n?.objectIdField&&i===n.objectIdField.toLowerCase()||null!=n?.globalIdField&&i===n.globalIdField.toLowerCase()||B(n).includes(i)||z.has(e.type)||P.some(e=>e.test(i)))}async function K(e){if(!e)return[];const n=new Set;return await Q(n,e),Array.from(n).sort()}async function Q(e,n){const{labelingInfo:i,fieldsIndex:t}=n;i?.length&&await Promise.all(i.map(n=>Y(e,t,n)))}async function Y(e,n,i){if(!i)return;const t=i.getLabelExpression(),r=i.where;if("arcade"===t.type)await v(e,n,null,t.expression);else{const i=t.expression.match(/{[^}]*}/g);i&&i.forEach(i=>{x(e,n,i.slice(1,-1))})}await S(e,n,r)}function Z(e){const n=e.defaultValue;return void 0!==n&&le(e,n)?n:e.nullable?null:void 0}function ee(e){const n="string"==typeof e?{type:e}:e;return ge(n)?255:"esriFieldTypeDate"===n.type||"date"===n.type?8:void 0}function ne(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function ie(e){return null===e||ne(e)}function te(e){return null===e||Number.isInteger(e)}function re(){return!0}function le(e,n){let i;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":i=e.nullable?te:Number.isInteger;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":i=e.nullable?ie:ne;break;case"string":case"esriFieldTypeString":i=e.nullable?s:a;break;default:i=re}return 1===arguments.length?i:i(n)}const oe=["integer","small-integer","big-integer","long"],se=["single","double"],ae=[...oe,...se],ue=["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeLong","esriFieldTypeBigInteger"],fe=["esriFieldTypeSingle","esriFieldTypeDouble"],de=new Set([...oe,...ue]),ce=new Set([...se,...fe]),pe=t(de,ce);function me(e){return null!=e&&de.has(e.type)}function ye(e){return null!=e&&pe.has(e.type)}function ge(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function Fe(e){return null!=e&&("date"===e.type||"esriFieldTypeDate"===e.type)}function Ie(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function be(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function we(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function xe(e){return null!=e&&("oid"===e.type||"esriFieldTypeOID"===e.type)}function Te(e){return null!=e&&("global-id"===e.type||"esriFieldTypeGlobalID"===e.type)}function he(e,n){return null===Se(e,n)}function ve(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function Se(e,n){return null==e||e.nullable&&null===n?null:le(e,n)?ye(e)&&!Ee(e.type,Number(n))?"numeric-range-validation-error::out-of-range":null:"type-validation-error::invalid-type"}function Ee(e,n){const i="string"==typeof e?$e(e):e;if(!i)return!1;const t=i.min,r=i.max;return i.isInteger?Number.isInteger(n)&&n>=t&&n<=r:n>=t&&n<=r}function Ae(e,n){const i=l(e,n);return i||(ye(e)?$e(e.type):void 0)}function $e(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return Ne;case"esriFieldTypeInteger":case"esriFieldTypeLong":case"integer":case"long":return Le;case"esriFieldTypeBigInteger":case"big-integer":return Me;case"esriFieldTypeSingle":case"single":return je;case"esriFieldTypeDouble":case"double":return De}}function _e(e){if(!ne(e))return null;if(Number.isInteger(e)){if(e>=Ne.min&&e<=Ne.max)return"esriFieldTypeSmallInteger";if(e>=Le.min&&e<=Le.max)return"esriFieldTypeInteger";if(e>=Me.min&&e<=Me.max)return"esriFieldTypeBigInteger"}return e>=je.min&&e<=je.max?"esriFieldTypeSingle":"esriFieldTypeDouble"}const Ne={min:-32768,max:32767,isInteger:!0,rawMin:-32768,rawMax:32767},Le={min:-2147483648,max:2147483647,isInteger:!0,rawMin:-2147483648,rawMax:2147483647},Me={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0,rawMin:-Number.MAX_SAFE_INTEGER,rawMax:Number.MAX_SAFE_INTEGER},je={min:-34e37,max:12e37,isInteger:!1,rawMin:-34e37,rawMax:12e37},De={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1,rawMin:-Number.MAX_VALUE,rawMax:Number.MAX_VALUE};function Oe(e,n,i){switch(e){case"domain-validation-error::invalid-coded-value":return`Value ${i} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case"domain-validation-error::value-out-of-range":return`Value ${i} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case"type-validation-error::invalid-type":return`Value ${i} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case"numeric-range-validation-error::out-of-range":{const{min:e,max:t}=$e(n.type);return`Value ${i} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${t}`}}}function Re(e,n){return!Ve(e,n,null)}function Ve(e,n,i){if(!e?.attributes||!n){if(null!=i)for(const e of n??[])i.add(e);return!0}const t=new Set(Object.keys(e.attributes));let r=!1;for(const l of n)if(!t.has(l)){if(r=!0,null==i)break;i.add(l)}return r}async function ke(e,n){const i=new Set;for(const t of n)await v(i,e.fieldsIndex,null,t);return Array.from(i).sort()}function Ce(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some(n=>e.toLowerCase().startsWith(n))}async function Ue(e,n){const i=new Set;return e?.collectRequiredFields&&await e.collectRequiredFields(i,n),Array.from(i).sort()}function qe(e){const n=e?.match(/{[^}]+}/g);return n?n.map(e=>e.slice(1,-1).split(":")[0].trim()):[]}export{Me as bigIntegerRange,v as collectArcadeFieldNames,q as collectDisplayFilterFields,N as collectElevationFields,M as collectFeatureReductionFields,x as collectField,w as collectFields,O as collectFilterFields,Q as collectLabelingFields,R as collectOrderByInfos,D as collectPopupTemplateFields,S as collectSQLFieldNames,j as collectTrackInfoFields,De as doubleRange,qe as extractSubstitutionTemplatesFromString,Re as featureHasFields,b as fixFields,y as fixRendererFields,F as fixTimeInfoFields,fe as floatJSONTypes,se as floatTypes,E as getDisplayFieldName,G as getEditTrackingFields,_ as getElevationFields,ke as getExpressionFields,C as getFeatureEditFields,U as getFeatureGeometryFields,ee as getFieldDefaultLength,Z as getFieldDefaultValue,Ae as getFieldRange,K as getLabelingFields,B as getLowerCaseDefaultHiddenFields,J as getLowerCaseEditTrackingFields,_e as getNumericTypeForValue,Ue as getRendererFields,k as getTimeFields,ue as integerJSONTypes,Le as integerRange,oe as integerTypes,Fe as isDateField,Ie as isDateOnlyField,W as isFieldEditable,H as isFieldVisibleByDefault,Te as isGlobalIDField,me as isIntegerField,Ee as isNumberInRange,ye as isNumericField,xe as isObjectIDField,Ce as isRasterPixelValueField,ge as isStringField,we as isTimeOnlyField,be as isTimestampOffsetField,he as isValidFieldValue,le as isValueMatchingFieldType,c as normalizeFieldName,ae as numericTypes,h as packFields,Ve as populateMissingFields,p as rendererFields,ve as sanitizeNullFieldValue,je as singleRange,Ne as smallIntegerRange,T as unpackFieldNames,Se as validateFieldValue,Oe as validationErrorToString,m as visualVariableFields};
5
+ import e from"../../core/Error.js";import{getDeepValue as n,setDeepValue as i}from"../../core/object.js";import{union as t}from"../../core/SetUtils.js";import{parseWhereClause as r}from"../../core/sql.js";import{getDomainRange as l}from"./domainUtils.js";import{getFieldNameFromSimpleExpression as o}from"../../support/arcadeExpressionUtils.js";import{isStringOrNull as s,isString as a}from"../../support/guards.js";import{loadArcade as u}from"../../support/loadArcade.js";const f=/^([0-9_])/,d=/[^a-z0-9_\u0080-\uffff]+/gi;function c(e){if(null==e)return null;return e.trim().replaceAll(d,"_").replace(f,"F$1")||null}const p=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],m=["field","normalizationField"];function y(e,n){if(null!=e&&null!=n)for(const i of Array.isArray(e)?e:[e])if(g(p,i,n),"visualVariables"in i&&i.visualVariables)for(const e of i.visualVariables)g(m,e,n)}function g(e,t,r){if(e)for(const l of e){const e=n(l,t),o=e&&"function"!=typeof e&&r.get(e);o&&i(l,o.name,t)}}function F(e,n){if(null!=e&&n?.fields?.length)if("startField"in e){const i=n.get(e.startField),t=n.get(e.endField);e.startField=i?.name??null,e.endField=t?.name??null}else{const i=n.get(e.startTimeField),t=n.get(e.endTimeField);e.startTimeField=i?.name??null,e.endTimeField=t?.name??null}}const I=new Set;function b(e,n){return e&&n?(I.clear(),w(I,e,n),Array.from(I).sort()):[]}function w(e,n,i){if(i)if(n?.fields?.length)if(i.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const t of i)x(e,n,t);else{if(i.includes("*"))return e.clear(),void e.add("*");for(const n of i)null!=n&&e.add(n)}}function x(e,n,i){if("string"==typeof i)if(n){const t=n.get(i);t&&e.add(t.name)}else e.add(i)}function T(e,n){return null==n||null==e?[]:n.includes("*")?(e.fields??[]).map(e=>e.name):n}function h(e,n,i=1){if(!n||!e)return[];if(n.includes("*"))return["*"];const t=b(e,n);return t.length/e.fields.length>=i?["*"]:t}async function v(e,n,i,t){if(!t)return;const r=o(t);if(r)x(e,n,r);else{const{arcadeUtils:r}=await u(),l=r.extractFieldNames(t,i?.partitions??n?.fields?.map(e=>e.name));for(const t of l)x(e,i?.index??n,t)}}async function S(n,i,t){if(t&&"1=1"!==t){const l=await r(t,i);if(!l.isStandardized)throw new e("fieldUtils:collectFilterFields","Where clause is not standardized",{where:t});w(n,i,l.fieldNames)}}function E({displayField:e,fields:n}){return e||(n?.length?$(n,"name-or-title")||$(n,"unique-identifier")||$(n,"type-or-category")||A(n):null)}function A(e){for(const n of e){if(!n?.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}function $(e,n){for(const i of e)if(i?.valueType&&i.valueType===n)return i.name;return null}async function _(e){if(!e)return[];const n=new Set;return await N(n,e),Array.from(n).sort()}async function N(e,n){if(!n)return;const i=n.elevationInfo?.featureExpressionInfo;return i?i.collectRequiredFields(e,n.fieldsIndex):void 0}function L(e,n,i){i.onStatisticExpression?v(e,n,null,i.onStatisticExpression.expression):e.add(i.onStatisticField)}async function M(e,n,i){if(!n||!i||!("fields"in i))return;const t=[],r=i.popupTemplate;t.push(D(e,n,r)),i.fields&&t.push(...i.fields.map(async i=>L(e,n.fieldsIndex,i))),await Promise.all(t)}async function j(e,n){const{fieldsIndex:i,trackInfo:t}=n;if(!n||!t||!i)return;const r=[t.latestObservations.renderer?.collectRequiredFields(e,i),t.previousObservations.renderer?.collectRequiredFields(e,i),t.trackLines.renderer?.collectRequiredFields(e,i)];t.popupTemplate&&r.push(D(e,n,t.popupTemplate));for(const l of[t.latestObservations.labelingInfo,t.previousObservations.labelingInfo,t.trackLines.labelingInfo])if(l)for(const n of l)r.push(Y(e,i,n));await Promise.all(r)}async function D(e,n,i){const t=[];i?.expressionInfos&&t.push(...i.expressionInfos.map(i=>v(e,n.fieldsIndex,null,i.expression)));const r=i?.content;if(Array.isArray(r))for(const l of r)"expression"===l.type&&l.expressionInfo&&t.push(v(e,n.fieldsIndex,null,l.expressionInfo.expression));await Promise.all(t)}async function O(e,n,i){n&&(n.timeInfo&&i?.timeExtent&&w(e,n.fieldsIndex,[n.timeInfo.startField,n.timeInfo.endField]),n.floorInfo&&w(e,n.fieldsIndex,[n.floorInfo.floorField]),null!=i?.where&&await S(e,n.fieldsIndex,i.where))}async function R(e,n,i){n&&i&&await Promise.all(i.map(i=>V(e,n,i)))}async function V(e,n,i){n&&i&&(i.valueExpression?await v(e,n.fieldsIndex,null,i.valueExpression):i.field&&x(e,n.fieldsIndex,i.field))}async function k(e){if(!e)return[];const n="timeInfo"in e&&e.timeInfo;return n?b(e.fieldsIndex,[e.trackIdField,n.startField,n.endField]):[]}function C(e){return e?b(e.fieldsIndex,G(e)):[]}function U(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?b(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}async function q(e,n,i){if(!n||!i)return;const t=n.fieldsIndex;await Promise.all(i.filters.map(n=>S(e,t,n.where)))}const X=new Set(["oid","global-id","guid"]),z=new Set(["oid","global-id"]),P=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^shape$/i,/^shape_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/objectid/i,/^perimeter_/i,/_perimeter$/i,/_i$/i];function B(e){const n=new Set;J(e).forEach(e=>n.add(e)),U(e).forEach(e=>n.add(e.toLowerCase()));const i=e&&"infoFor3D"in e?e.infoFor3D:void 0;return i&&(Object.values(i.assetMapFieldRoles).forEach(e=>n.add(e.toLowerCase())),Object.values(i.transformFieldRoles).forEach(e=>n.add(e.toLowerCase()))),Array.from(n)}function G(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;if(!n)return[];const{creationDateField:i,creatorField:t,editDateField:r,editorField:l}=n;return[i,t,r,l].filter(Boolean)}function J(e){return G(e).map(e=>e.toLowerCase())}function W(e,n){return e.editable&&!X.has(e.type)&&!J(n).includes(e.name?.toLowerCase()??"")}function H(e,n){const i=e.name?.toLowerCase()??"";return!(null!=n?.objectIdField&&i===n.objectIdField.toLowerCase()||null!=n?.globalIdField&&i===n.globalIdField.toLowerCase()||B(n).includes(i)||z.has(e.type)||P.some(e=>e.test(i)))}async function K(e){if(!e)return[];const n=new Set;return await Q(n,e),Array.from(n).sort()}async function Q(e,n){const{labelingInfo:i,fieldsIndex:t}=n;i?.length&&await Promise.all(i.map(n=>Y(e,t,n)))}async function Y(e,n,i){if(!i)return;const t=i.getLabelExpression(),r=i.where;if("arcade"===t.type)await v(e,n,null,t.expression);else{const i=t.expression.match(/{[^}]*}/g);i&&i.forEach(i=>{x(e,n,i.slice(1,-1))})}await S(e,n,r)}function Z(e){const n=e.defaultValue;return void 0!==n&&le(e,n)?n:e.nullable?null:void 0}function ee(e){const n="string"==typeof e?{type:e}:e;return ge(n)?255:"esriFieldTypeDate"===n.type||"date"===n.type?8:void 0}function ne(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function ie(e){return null===e||ne(e)}function te(e){return null===e||Number.isInteger(e)}function re(){return!0}function le(e,n){let i;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":i=e.nullable?te:Number.isInteger;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":i=e.nullable?ie:ne;break;case"string":case"esriFieldTypeString":i=e.nullable?s:a;break;default:i=re}return 1===arguments.length?i:i(n)}const oe=["integer","small-integer","big-integer","long"],se=["single","double"],ae=[...oe,...se],ue=["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeLong","esriFieldTypeBigInteger"],fe=["esriFieldTypeSingle","esriFieldTypeDouble"],de=new Set([...oe,...ue]),ce=new Set([...se,...fe]),pe=t(de,ce);function me(e){return null!=e&&de.has(e.type)}function ye(e){return null!=e&&pe.has(e.type)}function ge(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function Fe(e){return null!=e&&("date"===e.type||"esriFieldTypeDate"===e.type)}function Ie(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function be(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function we(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function xe(e){return null!=e&&("oid"===e.type||"esriFieldTypeOID"===e.type)}function Te(e){return null!=e&&("global-id"===e.type||"esriFieldTypeGlobalID"===e.type)}function he(e,n){return null===Se(e,n)}function ve(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function Se(e,n){return null==e||e.nullable&&null===n?null:le(e,n)?ye(e)&&!Ee(e.type,Number(n))?"numeric-range-validation-error::out-of-range":null:"type-validation-error::invalid-type"}function Ee(e,n){const i="string"==typeof e?$e(e):e;if(!i)return!1;const t=i.min,r=i.max;return i.isInteger?Number.isInteger(n)&&n>=t&&n<=r:n>=t&&n<=r}function Ae(e,n){const i=l(e,n);return i||(ye(e)?$e(e.type):void 0)}function $e(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return Ne;case"esriFieldTypeInteger":case"esriFieldTypeLong":case"integer":case"long":return Le;case"esriFieldTypeBigInteger":case"big-integer":return Me;case"esriFieldTypeSingle":case"single":return De;case"esriFieldTypeDouble":case"double":return Oe}}function _e(e){if(!ne(e))return null;if(Number.isInteger(e)){if(e>=Ne.min&&e<=Ne.max)return"esriFieldTypeSmallInteger";if(e>=Le.min&&e<=Le.max)return"esriFieldTypeInteger";if(e>=Me.min&&e<=Me.max)return"esriFieldTypeBigInteger"}return e>=De.min&&e<=De.max?"esriFieldTypeSingle":"esriFieldTypeDouble"}const Ne={min:-32768,max:32767,isInteger:!0,rawMin:-32768,rawMax:32767},Le={min:-2147483648,max:2147483647,isInteger:!0,rawMin:-2147483648,rawMax:2147483647},Me={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0,rawMin:-Number.MAX_SAFE_INTEGER,rawMax:Number.MAX_SAFE_INTEGER},je=(2-2**-23)*2**127,De={min:-je,max:je,isInteger:!1,rawMin:-je,rawMax:je},Oe={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1,rawMin:-Number.MAX_VALUE,rawMax:Number.MAX_VALUE};function Re(e,n,i){switch(e){case"domain-validation-error::invalid-coded-value":return`Value ${i} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case"domain-validation-error::value-out-of-range":return`Value ${i} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case"type-validation-error::invalid-type":return`Value ${i} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case"numeric-range-validation-error::out-of-range":{const{min:e,max:t}=$e(n.type);return`Value ${i} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${t}`}}}function Ve(e,n){return!ke(e,n,null)}function ke(e,n,i){if(!e?.attributes||!n){if(null!=i)for(const e of n??[])i.add(e);return!0}const t=new Set(Object.keys(e.attributes));let r=!1;for(const l of n)if(!t.has(l)){if(r=!0,null==i)break;i.add(l)}return r}async function Ce(e,n){const i=new Set;for(const t of n)await v(i,e.fieldsIndex,null,t);return Array.from(i).sort()}function Ue(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some(n=>e.toLowerCase().startsWith(n))}async function qe(e,n){const i=new Set;return e?.collectRequiredFields&&await e.collectRequiredFields(i,n),Array.from(i).sort()}function Xe(e){const n=e?.match(/{[^}]+}/g);return n?n.map(e=>e.slice(1,-1).split(":")[0].trim()):[]}export{Me as bigIntegerRange,v as collectArcadeFieldNames,q as collectDisplayFilterFields,N as collectElevationFields,M as collectFeatureReductionFields,x as collectField,w as collectFields,O as collectFilterFields,Q as collectLabelingFields,R as collectOrderByInfos,D as collectPopupTemplateFields,S as collectSQLFieldNames,j as collectTrackInfoFields,Oe as doubleRange,Xe as extractSubstitutionTemplatesFromString,Ve as featureHasFields,b as fixFields,y as fixRendererFields,F as fixTimeInfoFields,fe as floatJSONTypes,se as floatTypes,E as getDisplayFieldName,G as getEditTrackingFields,_ as getElevationFields,Ce as getExpressionFields,C as getFeatureEditFields,U as getFeatureGeometryFields,ee as getFieldDefaultLength,Z as getFieldDefaultValue,Ae as getFieldRange,K as getLabelingFields,B as getLowerCaseDefaultHiddenFields,J as getLowerCaseEditTrackingFields,_e as getNumericTypeForValue,qe as getRendererFields,k as getTimeFields,ue as integerJSONTypes,Le as integerRange,oe as integerTypes,Fe as isDateField,Ie as isDateOnlyField,W as isFieldEditable,H as isFieldVisibleByDefault,Te as isGlobalIDField,me as isIntegerField,Ee as isNumberInRange,ye as isNumericField,xe as isObjectIDField,Ue as isRasterPixelValueField,ge as isStringField,we as isTimeOnlyField,be as isTimestampOffsetField,he as isValidFieldValue,le as isValueMatchingFieldType,c as normalizeFieldName,ae as numericTypes,h as packFields,ke as populateMissingFields,p as rendererFields,ve as sanitizeNullFieldValue,De as singleRange,Ne as smallIntegerRange,T as unpackFieldNames,Se as validateFieldValue,Re as validationErrorToString,m as visualVariableFields};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.0.0-next.5",
3
+ "version": "5.0.0-next.6",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -19,11 +19,11 @@
19
19
  "license": "SEE LICENSE IN copyright.txt",
20
20
  "dependencies": {
21
21
  "@amcharts/amcharts5": "~5.14.1",
22
- "@arcgis/toolkit": "^4.34.0-next.151",
22
+ "@arcgis/toolkit": "^4.34.0-next.154",
23
23
  "@esri/arcgis-html-sanitizer": "~4.1.0",
24
24
  "@esri/calcite-components": "^3.3.1",
25
25
  "@vaadin/grid": "~24.9.1",
26
- "@zip.js/zip.js": "~2.8.3",
26
+ "@zip.js/zip.js": "~2.8.5",
27
27
  "luxon": "~3.7.2",
28
28
  "marked": "~16.3.0",
29
29
  "tslib": "^2.8.1"
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{getAssetUrl as e}from"../assets.js";import{fetchMessageBundle as r}from"../intl/messages.js";async function s(e){if(!e)return;const s=e.includes("-vector")?e.slice(0,e.indexOf("-vector")):e.includes("-3d")?e.slice(0,e.indexOf("-3d")):e,a=await r("esri/t9n/basemaps");return a[e]||a[s]}const a={satellite:{id:"satellite",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/satellite.jpg")},baseMapLayers:[{id:"satellite-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1}]},hybrid:{id:"hybrid",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/hybrid.jpg")},baseMapLayers:[{id:"hybrid-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1},{id:"hybrid-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/30d6b8271e1849cd9c3042060001f425/resources/styles/root.json",layerType:"VectorTileLayer",title:"Hybrid Reference Layer",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},terrain:{id:"terrain",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/terrain.jpg")},baseMapLayers:[{id:"terrain-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"terrain-reference-layer",url:"https://cdn.arcgis.com/sharing/rest/content/items/30d6b8271e1849cd9c3042060001f425/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Reference Overlay",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},oceans:{id:"oceans",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/oceans.jpg")},baseMapLayers:[{id:"oceans-base-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Base",showLegend:!1,visibility:!0,opacity:1},{id:"oceans-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/94329802cbfa44a18f423e6f1a0b875c/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Ocean Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},osm:{id:"osm",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/osm.jpg")},baseMapLayers:[{id:"osm-base-layer",layerType:"OpenStreetMap",title:"Open Street Map",showLegend:!1,visibility:!0,opacity:1}]},"dark-gray-vector":{id:"dark-gray-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/dark-gray-vector.jpg")},baseMapLayers:[{id:"dark-gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/5e9b3685f4c24d8781073dd928ebda50/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Base",visibility:!0,opacity:1},{id:"dark-gray-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/747cb7a5329c478cbe6981076cc879c5/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Reference",isReference:!0,visibility:!0,opacity:1}]},get"dark-gray"(){return{...this["dark-gray-vector"],id:"dark-gray"}},"gray-vector":{id:"gray-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/gray-vector.jpg")},baseMapLayers:[{id:"gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/291da5eab3a0412593b66d384379f89f/resources/styles/root.json",layerType:"VectorTileLayer",title:"Light Gray Base",visibility:!0,opacity:1},{id:"gray-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/1768e8369a214dfab4e2167d5c5f2454/resources/styles/root.json",layerType:"VectorTileLayer",title:"Light Gray Reference",isReference:!0,visibility:!0,opacity:1}]},get gray(){return{...this["gray-vector"],id:"gray"}},"streets-vector":{id:"streets-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-vector.jpg")},baseMapLayers:[{id:"streets-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/de26a3cf4cc9451298ea173c4b324736/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets",visibility:!0,opacity:1}]},get streets(){return{...this["streets-vector"],id:"streets"}},"topo-vector":{id:"topo-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/topo-vector.jpg")},baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"topo-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Topo",visibility:!0,opacity:1}]},get topo(){return{...this["topo-vector"],id:"topo"}},"streets-night-vector":{id:"streets-night-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-night.jpg")},baseMapLayers:[{id:"streets-night-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/86f556a2d1fd468181855a35e344567f/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Night",visibility:!0,opacity:1}]},"streets-relief-vector":{id:"streets-relief-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-relief.jpg")},baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"streets-relief-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/b266e6d17fc345b498345613930fbd76/resources/styles/root.json",title:"World Streets Relief",layerType:"VectorTileLayer",visibility:!0,opacity:1}]},"streets-navigation-vector":{id:"streets-navigation-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-navigation.jpg")},baseMapLayers:[{id:"streets-navigation-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/63c47b7177f946b49902c24129b87252/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Navigation",visibility:!0,opacity:1}]},"topo-3d":{id:"topo-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/topo-3d.png")},baseMapLayers:[{id:"topo-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/1e7d1784d1ef4b79ba6764d0bd6c3150/resources/styles/root.json",layerType:"VectorTileLayer",title:"Topographic",visibility:!0,opacity:1},{id:"topo-3d-trees",title:"Trees",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Open3D_Trees_v1/SceneServer",itemId:"9d3d89d42cfe4e2c9d108a2f0d518406",layerType:"ArcGISSceneServiceLayer"},{id:"topo-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"topo-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]},"navigation-3d":{id:"navigation-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/navigation-3d.jpg")},baseMapLayers:[{id:"navigation-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/ccc904ff872b4144b94934e55e32784b/resources/styles/root.json",layerType:"VectorTileLayer",title:"Navigation",visibility:!0,opacity:1},{id:"navigation-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"navigation-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]},"streets-3d":{id:"streets-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-3d.png")},baseMapLayers:[{id:"streets-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/198298c4c64c4cb19de5b46aa00c198d/resources/styles/root.json",layerType:"VectorTileLayer",title:"Streets",visibility:!0,opacity:1},{id:"streets-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"streets-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]},"osm-3d":{id:"osm-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/osm-3d.png")},baseMapLayers:[{id:"osm-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/8628d259c9d14bdc848771c23c513940/resources/styles/root.json",layerType:"VectorTileLayer",title:"OpenStreetMap",visibility:!0,opacity:1},{id:"osm-3d-trees",title:"Trees",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Open3D_Trees_v1/SceneServer",itemId:"9d3d89d42cfe4e2c9d108a2f0d518406",layerType:"ArcGISSceneServiceLayer"},{id:"osm-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"osm-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Open3D_Buildings_v1/SceneServer",itemId:"cd33b09dde0a419c986ca1a78a5fc06d",layerType:"ArcGISSceneServiceLayer"}]},"gray-3d":{id:"gray-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/gray-3d.png")},baseMapLayers:[{id:"gray-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/01a14b466345455ba4176d2e6390db92/resources/styles/root.json",layerType:"VectorTileLayer",title:"Streets",visibility:!0,opacity:1},{id:"gray-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"gray-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]},"navigation-dark-3d":{id:"navigation-dark-3d",itemId:"5a1365328b4943f09a54cf5fd1205707",is3d:!0,baseMapLayers:[{id:"navigation-dark-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/451a1777ab3f4bf095fae24a117439d9/resources/styles/root.json",layerType:"VectorTileLayer",title:"Navigation Dark"},{id:"navigation-dark-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_LightLabels_v1/SceneServer/layers/0",itemId:"f364b70b012a4da5a4b5921e193eac4a",layerType:"ArcGISSceneServiceLayer"},{id:"navigation-dark-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]},"streets-dark-3d":{id:"streets-dark-3d",itemId:"8a4efa2c20484ec9b4557895e65736ff",is3d:!0,baseMapLayers:[{id:"streets-dark-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/bc599b6d741a4ac084b7eea7bf8c5938/resources/styles/root.json",layerType:"VectorTileLayer",title:"OpenStreetMap Streets Night (for 3D)"},{id:"streets-dark-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_LightLabels_v1/SceneServer",itemId:"f364b70b012a4da5a4b5921e193eac4a",layerType:"ArcGISSceneServiceLayer"},{id:"streets-dark-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]},"dark-gray-3d":{id:"dark-gray-3d",itemId:"a8b7322a5fe94002bb0f5e0eeb0c5c18",is3d:!0,baseMapLayers:[{id:"dark-gray-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/4178f71acb934fb89f169e7d667c20c6/resources/styles/root.json",layerType:"VectorTileLayer",title:"OpenStreetMap Dark Gray Canvas (for 3D)"},{id:"dark-gray-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_LightLabels_v1/SceneServer/layers/0",itemId:"f364b70b012a4da5a4b5921e193eac4a",layerType:"ArcGISSceneServiceLayer"},{id:"dark-gray-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]}};export{a as esriBasemapDefinitions,s as getBasemapTitle};
5
+ import{getAssetUrl as e}from"../assets.js";import{fetchMessageBundle as r}from"../intl/messages.js";async function s(e){if(!e)return;const s=e.includes("-vector")?e.slice(0,e.indexOf("-vector")):e.includes("-3d")?e.slice(0,e.indexOf("-3d")):e,a=await r("esri/t9n/basemaps");return a[e]||a[s]}const a={satellite:{id:"satellite",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/satellite.jpg")},baseMapLayers:[{id:"satellite-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1}]},hybrid:{id:"hybrid",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/hybrid.jpg")},baseMapLayers:[{id:"hybrid-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1},{id:"hybrid-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/30d6b8271e1849cd9c3042060001f425/resources/styles/root.json",layerType:"VectorTileLayer",title:"Hybrid Reference Layer",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},terrain:{id:"terrain",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/terrain.jpg")},baseMapLayers:[{id:"terrain-hillshade",url:"https://services.arcgisonline.com/ArcGIS/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1},{id:"terrain-base",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/33064a20de0c48d2bb61efa8faca93a8/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Terrain Base"},{id:"terrain-reference",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/14fbc125ccc9488888b014db09f35f67/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Reference Reference",isReference:!0}]},oceans:{id:"oceans",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/oceans.jpg")},baseMapLayers:[{id:"oceans-base-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Base",showLegend:!1,visibility:!0,opacity:1},{id:"oceans-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/94329802cbfa44a18f423e6f1a0b875c/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Ocean Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},osm:{id:"osm",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/osm.jpg")},baseMapLayers:[{id:"osm-base-layer",layerType:"OpenStreetMap",title:"Open Street Map",showLegend:!1,visibility:!0,opacity:1}]},"dark-gray-vector":{id:"dark-gray-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/dark-gray-vector.jpg")},baseMapLayers:[{id:"dark-gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/5e9b3685f4c24d8781073dd928ebda50/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Base",visibility:!0,opacity:1},{id:"dark-gray-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/747cb7a5329c478cbe6981076cc879c5/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Reference",isReference:!0,visibility:!0,opacity:1}]},get"dark-gray"(){return{...this["dark-gray-vector"],id:"dark-gray"}},"gray-vector":{id:"gray-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/gray-vector.jpg")},baseMapLayers:[{id:"gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/291da5eab3a0412593b66d384379f89f/resources/styles/root.json",layerType:"VectorTileLayer",title:"Light Gray Base",visibility:!0,opacity:1},{id:"gray-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/1768e8369a214dfab4e2167d5c5f2454/resources/styles/root.json",layerType:"VectorTileLayer",title:"Light Gray Reference",isReference:!0,visibility:!0,opacity:1}]},get gray(){return{...this["gray-vector"],id:"gray"}},"streets-vector":{id:"streets-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-vector.jpg")},baseMapLayers:[{id:"streets-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/de26a3cf4cc9451298ea173c4b324736/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets",visibility:!0,opacity:1}]},get streets(){return{...this["streets-vector"],id:"streets"}},"topo-vector":{id:"topo-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/topo-vector.jpg")},baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"topo-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Topo",visibility:!0,opacity:1}]},get topo(){return{...this["topo-vector"],id:"topo"}},"streets-night-vector":{id:"streets-night-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-night.jpg")},baseMapLayers:[{id:"streets-night-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/86f556a2d1fd468181855a35e344567f/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Night",visibility:!0,opacity:1}]},"streets-relief-vector":{id:"streets-relief-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-relief.jpg")},baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"streets-relief-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/b266e6d17fc345b498345613930fbd76/resources/styles/root.json",title:"World Streets Relief",layerType:"VectorTileLayer",visibility:!0,opacity:1}]},"streets-navigation-vector":{id:"streets-navigation-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-navigation.jpg")},baseMapLayers:[{id:"streets-navigation-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/63c47b7177f946b49902c24129b87252/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Navigation",visibility:!0,opacity:1}]},"topo-3d":{id:"topo-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/topo-3d.png")},baseMapLayers:[{id:"topo-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/1e7d1784d1ef4b79ba6764d0bd6c3150/resources/styles/root.json",layerType:"VectorTileLayer",title:"Topographic",visibility:!0,opacity:1},{id:"topo-3d-trees",title:"Trees",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Open3D_Trees_v1/SceneServer",itemId:"9d3d89d42cfe4e2c9d108a2f0d518406",layerType:"ArcGISSceneServiceLayer"},{id:"topo-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"topo-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]},"navigation-3d":{id:"navigation-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/navigation-3d.jpg")},baseMapLayers:[{id:"navigation-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/ccc904ff872b4144b94934e55e32784b/resources/styles/root.json",layerType:"VectorTileLayer",title:"Navigation",visibility:!0,opacity:1},{id:"navigation-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"navigation-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]},"streets-3d":{id:"streets-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-3d.png")},baseMapLayers:[{id:"streets-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/198298c4c64c4cb19de5b46aa00c198d/resources/styles/root.json",layerType:"VectorTileLayer",title:"Streets",visibility:!0,opacity:1},{id:"streets-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"streets-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]},"osm-3d":{id:"osm-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/osm-3d.png")},baseMapLayers:[{id:"osm-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/8628d259c9d14bdc848771c23c513940/resources/styles/root.json",layerType:"VectorTileLayer",title:"OpenStreetMap",visibility:!0,opacity:1},{id:"osm-3d-trees",title:"Trees",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Open3D_Trees_v1/SceneServer",itemId:"9d3d89d42cfe4e2c9d108a2f0d518406",layerType:"ArcGISSceneServiceLayer"},{id:"osm-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"osm-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Open3D_Buildings_v1/SceneServer",itemId:"cd33b09dde0a419c986ca1a78a5fc06d",layerType:"ArcGISSceneServiceLayer"}]},"gray-3d":{id:"gray-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/gray-3d.png")},baseMapLayers:[{id:"gray-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/01a14b466345455ba4176d2e6390db92/resources/styles/root.json",layerType:"VectorTileLayer",title:"Streets",visibility:!0,opacity:1},{id:"gray-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"gray-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]},"navigation-dark-3d":{id:"navigation-dark-3d",itemId:"5a1365328b4943f09a54cf5fd1205707",is3d:!0,baseMapLayers:[{id:"navigation-dark-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/451a1777ab3f4bf095fae24a117439d9/resources/styles/root.json",layerType:"VectorTileLayer",title:"Navigation Dark"},{id:"navigation-dark-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_LightLabels_v1/SceneServer/layers/0",itemId:"f364b70b012a4da5a4b5921e193eac4a",layerType:"ArcGISSceneServiceLayer"},{id:"navigation-dark-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]},"streets-dark-3d":{id:"streets-dark-3d",itemId:"8a4efa2c20484ec9b4557895e65736ff",is3d:!0,baseMapLayers:[{id:"streets-dark-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/bc599b6d741a4ac084b7eea7bf8c5938/resources/styles/root.json",layerType:"VectorTileLayer",title:"OpenStreetMap Streets Night (for 3D)"},{id:"streets-dark-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_LightLabels_v1/SceneServer",itemId:"f364b70b012a4da5a4b5921e193eac4a",layerType:"ArcGISSceneServiceLayer"},{id:"streets-dark-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]},"dark-gray-3d":{id:"dark-gray-3d",itemId:"a8b7322a5fe94002bb0f5e0eeb0c5c18",is3d:!0,baseMapLayers:[{id:"dark-gray-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/4178f71acb934fb89f169e7d667c20c6/resources/styles/root.json",layerType:"VectorTileLayer",title:"OpenStreetMap Dark Gray Canvas (for 3D)"},{id:"dark-gray-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_LightLabels_v1/SceneServer/layers/0",itemId:"f364b70b012a4da5a4b5921e193eac4a",layerType:"ArcGISSceneServiceLayer"},{id:"dark-gray-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]}};export{a as esriBasemapDefinitions,s as getBasemapTitle};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- const c="20251003",a="55b421a1dc4dcb7c254395a0a3baff23fce0d7d4";export{c as buildDate,a as commitHash};
5
+ const f="20251004",a="3f652fd7033abd1ef65f1cc9633815567ef3a6a8";export{f as buildDate,a as commitHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Error.js";import t from"../../../core/Logger.js";import{GeometryCursor as s}from"../../../geometry/GeometryCursor.js";import o from"../../../geometry/SpatialReference.js";import{isPolygon as i,isPolyline as l}from"../../../geometry/support/jsonUtils.js";import r from"../../../geometry/support/PolylineBuilder.js";import{Point as n}from"../../../geometry/support/TileClipper.js";import{PathEffectCursor as h}from"../CIMCursor.js";import{lazyGeneralizeOperator as a,lazyLengthOperator as c,lazySimplifyOperator as _}from"../CIMEffects.js";const p=()=>t.getLogger("esri.symbols.cim.effects.EffectTaperedPolygon");class y{static{this.instance=null}static local(){return null===y.instance&&(y.instance=new y),y.instance}execute(e,t,s){return new f(e,t,s)}}class f extends h{constructor(e,t,s){super(e,!1,!0),this._slopeS=0,this._slopeC=1,this._lastTangent1=new n(NaN,NaN),this._lastWidth=0,this._geomUnitsPerPoint=s,this._halfFromWidth=Math.abs(void 0!==t.fromWidth?t.fromWidth:0)*s*.5,this._halfToWidth=Math.abs(void 0!==t.toWidth?t.toWidth:1)*s*.5,this._originalLength=(void 0!==t.length?t.length:0)*s,this._length=0}processPath(t){if(t.totalSize<=0)return null;if(this._halfFromWidth<=0&&this._halfToWidth<=0){const e=s.createEmptyOptimizedCIM("esriGeometryPolygon",!1,!1,t.yFactor);for(t.seekPathEnd();t.prevPoint();)e.pushXY(t.x,t.y);for(t.seekPathStart();t.nextPoint();)e.pushXY(t.x,t.y);return e}const n=t.asJSON();t.seekPath(t.totalSize-1);const h=a.module.execute(n,.25*this._geomUnitsPerPoint,{removeDegenerateParts:!0}),y=null==h?null:i(h)?h.rings:l(h)?h.paths:null;if(!y)return p().error(new e("mapview-bad-resource","Unable to process geometry")),null;const f=c.module.execute(h);if((0===this._originalLength||this._originalLength>f)&&f>0){this._length=f;const e=(this._halfToWidth-this._halfFromWidth)/this._length;if(Math.abs(e)<1){const t=e*e;this._slopeC=Math.sqrt(1/(1+t)),this._slopeS=Math.sqrt(t/(1+t)),e<0&&(this._slopeS=-this._slopeS)}else this._slopeC=this._slopeS=.7071}else this._length=this._originalLength,this._slopeC=1,this._slopeS=0;const m=[];for(const e of y){const t=new r,s=new r;let o=0;this._setFromOffset(e.slice(0,2),t,s);for(let r=0,n=3;n<=e.length;++r,++n)o=this._setOffset(e.slice(r,n),o,t,s);this._setToOffset(e.slice(-2),o,t,s);const[i]=t.getGeometry(),[l]=s.getGeometry();m.push([...i,...l.reverse()])}const x={rings:m,spatialReference:{wkid:o.WebMercator.wkid}},d=_.module.execute(x);return s.fromJSONCIM(d)}_setFromOffset([[e,t],[s,o]],i,l){const r=this._halfFromWidth,h=new n(s-e,o-t).normalize().scale(r);i.beginPath([e-h.y,t+h.x]),l.beginPath([e+h.y,t-h.x])}_setToOffset([[e,t],[s,o]],i,l,r){let h;h=(i+=Math.sqrt((s-e)**2+(o-t)**2))>=this._length?this._halfToWidth:this._halfFromWidth+(this._halfToWidth-this._halfFromWidth)*i/this._length;const a=new n(s-e,o-t).normalize().scale(h);l.lineTo([s-a.y,o+a.x]),r.lineTo([s+a.y,o-a.x])}_setOffset([[t,s],[o,i],[l,r]],h,a,c){const _=Math.sqrt((o-t)**2+(i-s)**2);let y;y=h+_>=this._length?this._halfToWidth:this._halfFromWidth+(this._halfToWidth-this._halfFromWidth)*(h+_)/this._length,h+=_;const f=new n(o,i),m=new n(o-t,i-s).normalize(),x=new n(l-o,r-i).normalize(),d=n.sub(x,m),g=a.getPointCount(),u=c.getPointCount();m.leftPerpendicular(),x.leftPerpendicular();const T=m.x*x.x+m.y*x.y;if(T>.99){const e=n.add(m,x).scale(y/2),t=e.clone().rotate(this._slopeC,this._slopeS);a.lineTo([f.x+t.x,f.y+t.y]);const s=e.rotateReverse(this._slopeC,this._slopeS);c.lineTo([f.x-s.x,f.y-s.y])}else{const o=m.x*x.y-m.y*x.x;if(d.scale(1/o),o<0){d.scale(-y).rotateReverse(this._slopeC,this._slopeS);const t=c.getXY(u-1);t||p().error(new e("mapview-bad-resource","Unable to process geometry, index out of scope"));const s=n.add(f,d).sub(n.fromArray(t));if(m.x*s.y-m.y*s.x>0){const e=m.clone().scale(-y).rotateReverse(this._slopeC,this._slopeS),t=x.clone().scale(-y).rotateReverse(this._slopeC,this._slopeS);c.lineTo([f.x+e.x,f.y+e.y]),c.lineTo([f.x,f.y]),c.lineTo([f.x+t.x,f.y+t.y])}else c.lineTo([f.x+d.x,f.y+d.y])}else{d.scale(y).rotate(this._slopeC,this._slopeS);const t=a.getXY(g-1);t||p().error(new e("mapview-bad-resource","Unable to process geometry, index out of scope"));const s=n.add(f,d).sub(n.fromArray(t));if(m.x*s.y-m.y*s.x>0){const e=m.clone().scale(y).rotate(this._slopeC,this._slopeS),t=x.clone().scale(y).rotate(this._slopeC,this._slopeS);a.lineTo([f.x+e.x,f.y+e.y]),a.lineTo([f.x,f.y]),a.lineTo([f.x+t.x,f.y+t.y])}else a.lineTo([f.x+d.x,f.y+d.y])}const i=Math.acos(T);let l=1;if(y>.25){const e=2*Math.acos(1-.25/y);e<i&&(l=Math.round(i/e))}const r=Math.cos(i/l),h=Math.sin(i/l),_=m.clone();if(o<0){_.rotate(this._slopeC,this._slopeS);const o=a.getXY(g-1);o||p().error(new e("mapview-bad-resource","Unable to process geometry, index out of scope"));const i=n.add(f,_.clone().scale(this._lastWidth)),l=n.sub(i,n.fromArray(o)),r=m.x*l.y-m.y*l.x;if(!isNaN(this._lastTangent1.x)&&!isNaN(this._lastTangent1.y)&&r>0){const e=new n(t,s),o=this._lastTangent1.clone().scale(this._lastWidth);o.rotate(this._slopeC,this._slopeS);const i=m.clone().scale(this._lastWidth);i.rotate(this._slopeC,this._slopeS),a.lineTo([e.x+o.x,e.y+o.y]),a.lineTo([e.x,e.y]),a.lineTo([e.x+i.x,e.y+i.y])}}else{_.scale(-1).rotateReverse(this._slopeC,this._slopeS);const o=c.getXY(u-1);o||p().error(new e("mapview-bad-resource","Unable to process geometry, index out of scope"));const i=n.add(f,_.clone().scale(this._lastWidth)),l=n.sub(i,n.fromArray(o)),r=m.x*l.y-m.y*l.x;if(!isNaN(this._lastTangent1.x)&&!isNaN(this._lastTangent1.y)&&r>0){const e=new n(t,s),o=this._lastTangent1.clone().scale(-this._lastWidth);o.rotateReverse(this._slopeC,this._slopeS);const i=m.clone().scale(-this._lastWidth);i.rotateReverse(this._slopeC,this._slopeS),c.lineTo([e.x+o.x,e.y+o.y]),c.lineTo([e.x,e.y]),c.lineTo([e.x+i.x,e.y+i.y])}}_.scale(y);for(let e=0;e<=l;e++)o<0?(a.lineTo([f.x+_.x,f.y+_.y]),_.rotateReverse(r,h)):(c.lineTo([f.x+_.x,f.y+_.y]),_.rotate(r,h))}return this._lastTangent1.setCoords(m.x,m.y),this._lastWidth=y,h}}export{y as EffectTaperedPolygon};
5
+ import e from"../../../core/Error.js";import t from"../../../core/Logger.js";import{GeometryCursor as s}from"../../../geometry/GeometryCursor.js";import o from"../../../geometry/SpatialReference.js";import{isPolygon as i,isPolyline as l}from"../../../geometry/support/jsonUtils.js";import r from"../../../geometry/support/PolylineBuilder.js";import{Point as n}from"../../../geometry/support/TileClipper.js";import{PathEffectCursor as h}from"../CIMCursor.js";import{lazyGeneralizeOperator as a,lazyLengthOperator as c,lazySimplifyOperator as _}from"../CIMEffects.js";const p=()=>t.getLogger("esri.symbols.cim.effects.EffectTaperedPolygon");class y{static{this.instance=null}static local(){return null===y.instance&&(y.instance=new y),y.instance}execute(e,t,s){return new f(e,t,s)}}class f extends h{constructor(e,t,s){super(e,!1,!0),this._slopeS=0,this._slopeC=1,this._lastTangent1=new n(NaN,NaN),this._lastWidth=0,this._geomUnitsPerPoint=s,this._halfFromWidth=Math.abs(void 0!==t.fromWidth?t.fromWidth:0)*s*.5,this._halfToWidth=Math.abs(void 0!==t.toWidth?t.toWidth:1)*s*.5,this._originalLength=(void 0!==t.length?t.length:0)*s,this._length=0}processPath(t){if(t.totalSize<=0)return null;if(this._halfFromWidth<=0&&this._halfToWidth<=0){const e=s.createEmptyOptimizedCIM("esriGeometryPolygon",!1,!1,t.yFactor);for(t.seekPathEnd();t.prevPoint();)e.pushXY(t.x,t.y);for(t.seekPathStart();t.nextPoint();)e.pushXY(t.x,t.y);return e}const n=t.getCurrentPath().asJSON(),h=a.module.execute(n,.25*this._geomUnitsPerPoint,{removeDegenerateParts:!0}),y=null==h?null:i(h)?h.rings:l(h)?h.paths:null;if(!y)return p().error(new e("mapview-bad-resource","Unable to process geometry")),null;const f=c.module.execute(h);if((0===this._originalLength||this._originalLength>f)&&f>0){this._length=f;const e=(this._halfToWidth-this._halfFromWidth)/this._length;if(Math.abs(e)<1){const t=e*e;this._slopeC=Math.sqrt(1/(1+t)),this._slopeS=Math.sqrt(t/(1+t)),e<0&&(this._slopeS=-this._slopeS)}else this._slopeC=this._slopeS=.7071}else this._length=this._originalLength,this._slopeC=1,this._slopeS=0;const m=[];for(const e of y){const t=new r,s=new r;let o=0;this._setFromOffset(e.slice(0,2),t,s);for(let r=0,n=3;n<=e.length;++r,++n)o=this._setOffset(e.slice(r,n),o,t,s);this._setToOffset(e.slice(-2),o,t,s);const[i]=t.getGeometry(),[l]=s.getGeometry();m.push([...i,...l.reverse()])}const x={rings:m,spatialReference:{wkid:o.WebMercator.wkid}},d=_.module.execute(x);return s.fromJSONCIM(d)}_setFromOffset([[e,t],[s,o]],i,l){const r=this._halfFromWidth,h=new n(s-e,o-t).normalize().scale(r);i.beginPath([e-h.y,t+h.x]),l.beginPath([e+h.y,t-h.x])}_setToOffset([[e,t],[s,o]],i,l,r){let h;h=(i+=Math.sqrt((s-e)**2+(o-t)**2))>=this._length?this._halfToWidth:this._halfFromWidth+(this._halfToWidth-this._halfFromWidth)*i/this._length;const a=new n(s-e,o-t).normalize().scale(h);l.lineTo([s-a.y,o+a.x]),r.lineTo([s+a.y,o-a.x])}_setOffset([[t,s],[o,i],[l,r]],h,a,c){const _=Math.sqrt((o-t)**2+(i-s)**2);let y;y=h+_>=this._length?this._halfToWidth:this._halfFromWidth+(this._halfToWidth-this._halfFromWidth)*(h+_)/this._length,h+=_;const f=new n(o,i),m=new n(o-t,i-s).normalize(),x=new n(l-o,r-i).normalize(),d=n.sub(x,m),g=a.getPointCount(),u=c.getPointCount();m.leftPerpendicular(),x.leftPerpendicular();const T=m.x*x.x+m.y*x.y;if(T>.99){const e=n.add(m,x).scale(y/2),t=e.clone().rotate(this._slopeC,this._slopeS);a.lineTo([f.x+t.x,f.y+t.y]);const s=e.rotateReverse(this._slopeC,this._slopeS);c.lineTo([f.x-s.x,f.y-s.y])}else{const o=m.x*x.y-m.y*x.x;if(d.scale(1/o),o<0){d.scale(-y).rotateReverse(this._slopeC,this._slopeS);const t=c.getXY(u-1);t||p().error(new e("mapview-bad-resource","Unable to process geometry, index out of scope"));const s=n.add(f,d).sub(n.fromArray(t));if(m.x*s.y-m.y*s.x>0){const e=m.clone().scale(-y).rotateReverse(this._slopeC,this._slopeS),t=x.clone().scale(-y).rotateReverse(this._slopeC,this._slopeS);c.lineTo([f.x+e.x,f.y+e.y]),c.lineTo([f.x,f.y]),c.lineTo([f.x+t.x,f.y+t.y])}else c.lineTo([f.x+d.x,f.y+d.y])}else{d.scale(y).rotate(this._slopeC,this._slopeS);const t=a.getXY(g-1);t||p().error(new e("mapview-bad-resource","Unable to process geometry, index out of scope"));const s=n.add(f,d).sub(n.fromArray(t));if(m.x*s.y-m.y*s.x>0){const e=m.clone().scale(y).rotate(this._slopeC,this._slopeS),t=x.clone().scale(y).rotate(this._slopeC,this._slopeS);a.lineTo([f.x+e.x,f.y+e.y]),a.lineTo([f.x,f.y]),a.lineTo([f.x+t.x,f.y+t.y])}else a.lineTo([f.x+d.x,f.y+d.y])}const i=Math.acos(T);let l=1;if(y>.25){const e=2*Math.acos(1-.25/y);e<i&&(l=Math.round(i/e))}const r=Math.cos(i/l),h=Math.sin(i/l),_=m.clone();if(o<0){_.rotate(this._slopeC,this._slopeS);const o=a.getXY(g-1);o||p().error(new e("mapview-bad-resource","Unable to process geometry, index out of scope"));const i=n.add(f,_.clone().scale(this._lastWidth)),l=n.sub(i,n.fromArray(o)),r=m.x*l.y-m.y*l.x;if(!isNaN(this._lastTangent1.x)&&!isNaN(this._lastTangent1.y)&&r>0){const e=new n(t,s),o=this._lastTangent1.clone().scale(this._lastWidth);o.rotate(this._slopeC,this._slopeS);const i=m.clone().scale(this._lastWidth);i.rotate(this._slopeC,this._slopeS),a.lineTo([e.x+o.x,e.y+o.y]),a.lineTo([e.x,e.y]),a.lineTo([e.x+i.x,e.y+i.y])}}else{_.scale(-1).rotateReverse(this._slopeC,this._slopeS);const o=c.getXY(u-1);o||p().error(new e("mapview-bad-resource","Unable to process geometry, index out of scope"));const i=n.add(f,_.clone().scale(this._lastWidth)),l=n.sub(i,n.fromArray(o)),r=m.x*l.y-m.y*l.x;if(!isNaN(this._lastTangent1.x)&&!isNaN(this._lastTangent1.y)&&r>0){const e=new n(t,s),o=this._lastTangent1.clone().scale(-this._lastWidth);o.rotateReverse(this._slopeC,this._slopeS);const i=m.clone().scale(-this._lastWidth);i.rotateReverse(this._slopeC,this._slopeS),c.lineTo([e.x+o.x,e.y+o.y]),c.lineTo([e.x,e.y]),c.lineTo([e.x+i.x,e.y+i.y])}}_.scale(y);for(let e=0;e<=l;e++)o<0?(a.lineTo([f.x+_.x,f.y+_.y]),_.rotateReverse(r,h)):(c.lineTo([f.x+_.x,f.y+_.y]),_.rotate(r,h))}return this._lastTangent1.setCoords(m.x,m.y),this._lastWidth=y,h}}export{y as EffectTaperedPolygon};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{id as i}from"../../kernel.js";import r from"../../core/Collection.js";import s from"../../core/Error.js";import{EventedAccessor as n}from"../../core/Evented.js";import{LoadableMixin as t}from"../../core/Loadable.js";import o from"../../core/Logger.js";import{getOrCreateMapValue as a}from"../../core/MapUtils.js";import{EsriPromiseMixin as d}from"../../core/Promise.js";import{debounce as c,throwIfAborted as v}from"../../core/promiseUtils.js";import l from"../../core/ReactiveMap.js";import{whenOnce as p,watch as m}from"../../core/reactiveUtils.js";import{normalize as u}from"../../core/urlUtils.js";import{property as f}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as h}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as g}from"../../core/support/UpdatingHandles.js";import{parse as w}from"../../layers/support/arcgisLayerUrl.js";import{isSubtypeGroupLayer as y,isFeatureLayer as S}from"../../layers/support/layerUtils.js";import I from"../../portal/Portal.js";import{hasUserTypeExtension as _}from"../../portal/support/utils.js";import L from"../../rest/featureService/FeatureService.js";import{ServiceVersionInfo as b}from"./ServiceVersionInfo.js";function V(e){return!e||0===e.trim().length}const A=new Map;function U(e){return a(A,e,()=>{const i=new T({view:e});return e.addHandles({remove(){A.delete(e),i.destroy()}}),i.load().catch(e=>{o.getLogger("esri.views.Services").error("Failed to load service metadata",e)}),i})}let T=class extends(t(d(n))){constructor(e){super(e),this._updatingHandles=new g,this.items=new r,this.tablesAndLayersLookup=new l,this.additionalLayers=new r,this._debouncedCheckAndUpdateServiceInfos=c(async()=>{const e=[];for(const i of this.items){if(0===i.layersAndTables.length)continue;const r=i.layersAndTables.getItemAt(0);r?.gdbVersion!==i.versionInfo?.versionIdentifier.name&&e.push(i)}0!==e.length&&(await p(()=>!this.updating),await this._updateVersionInfos(e))}),this._debouncedLayersChanged=c(async()=>{const e=this._detectNewLayersAndTables();0!==e.length&&(await p(()=>!this._updatingHandles.updating),await this._updatingHandles.addPromise((async()=>{const i=new Set;for(const s of e)if("feature"===s.type||"subtype-group"===s.type){if(!s.url)continue;const e=w(s.url).url.path,n=this._findServiceInfo(e);if(n)this.tablesAndLayersLookup.set(s,n),s.isTable?n.tables.push(s):n.layers.push(s);else if(!i.has(e))try{await this._addServiceInfo(e,s)}catch(r){o.getLogger(this).error(`Failed to load feature service: ${e}`,r)}finally{i.add(e)}}})()))}),this._processed=new Set}destroy(){this._set("view",null),this.items.removeAll(),this.tablesAndLayersLookup.clear()}async load(e){return v(e),this.addHandles([m(()=>this.view.map,()=>{this._reset()}),m(()=>this._allLayersAndTables,()=>{this._debouncedLayersChanged().catch(e=>{o.getLogger(this).warn("Failed to update service info",e)})}),m(()=>this.items.map(e=>e.layersAndTables.map(e=>e.gdbVersion??"").join(",")),()=>{this.checkAndUpdateServiceInfos().catch(e=>{o.getLogger(this).warn("Failed to update service info",e)})})]),this.addResolvingPromise(this._debouncedLayersChanged()),this}get updating(){return"loading"===this.loadStatus||this._updatingHandles.updating}checkAndUpdateServiceInfos(){return this._debouncedCheckAndUpdateServiceInfos()}changeVersion(e,i,r){return this._updatingHandles.addPromise((async()=>{await this._changeVersionInternal(e,i,r)})())}createVersion(e){return this._updatingHandles.addPromise((async()=>{const i=e.featureServerUrl,r=this._findServiceInfo(i);if(!r?.versionService)throw new s("services:no-version-management-service","No version management service");const n=r.loggedInServiceUser.toUpperCase(),t=V(e.ownerName)?n:e.ownerName?.trim().toUpperCase();if(t!==n&&r.featureServiceVersion<=11.1)throw new s("services:versioning-api-error","Version management API too old");if("SDE"===t?.toUpperCase()&&"DEFAULT"===e.versionName.toUpperCase())throw new s("services:no-valid-version-name","No valid version name");{const i=await r.versionService.getVersionInfos();if(i?.find(i=>i.versionIdentifier.name.toUpperCase()===(t+"."+e.versionName).toUpperCase()||i.versionIdentifier.name.toUpperCase()===(n+"."+e.versionName).toUpperCase()))throw new s("services:no-valid-version-name","No valid version name")}const o=await r.versionService.createVersion({versionName:e.versionName,access:t!==n?"public":e.access,description:e.description});if(t!==n){const{guid:i,name:s}=o.versionIdentifier;await r.versionService.alterVersion({guid:i,name:s},{ownerName:t,access:e.access})}e.switchToVersion&&await this._changeVersionInternal(i,o.versionIdentifier.name,o.versionIdentifier.guid),this.emit("version-created",{versionIdentifier:o.versionIdentifier,versionManagementService:r.versionService})})())}deleteVersion(e,i,r){return this._updatingHandles.addPromise((async()=>{const n=this._findServiceInfo(e);if(!n?.versionService)throw new s("services:no-version-management-service","No version management service");if(n.featureServiceVersion<=11.1)throw new s("services:versioning-api-error","Version management API too old");const t={name:i,guid:r};await n.versionService.deleteVersion(t)&&(await this._updateVersionInfo(n),this.emit("version-deleted",{versionIdentifier:t,versionManagementService:n.versionService}))})())}startEditing(e){return this._updatingHandles.addPromise((async()=>{const i=this._findServiceInfo(e);if(!i?.versionService)throw new s("services:no-version-management-service","No version management service");const r=i.versionInfo?.versionIdentifier??{name:i.versionService.defaultVersionIdentifier.name,guid:i.versionService.defaultVersionIdentifier.guid};let n=!0;("none"!==i.versionService.getLockType(r)||(n=await i.versionService.startReading(r),n))&&(n=await i.versionService.startEditing(r),i.updateLockType())})())}finishEditing(e,i){return this._updatingHandles.addPromise((async()=>{const r=this._findServiceInfo(e);if(!r?.versionService)throw new s("services:no-version-management-service","No version management service");const n=r.versionInfo?.versionIdentifier??{name:r.versionService.defaultVersionIdentifier.name,guid:r.versionService.defaultVersionIdentifier.guid},t=r.versionService.getLockType(n);if("none"!==t)return"read"===t?(await r.versionService.stopReading(n),void r.updateLockType()):"edit"===t?(await r.versionService.stopEditing(n,i),await r.versionService.stopReading(n),void r.updateLockType()):void 0})())}async _changeVersionInternal(e,i,r){const n=this._findServiceInfo(e);if(!n?.versionService)throw new s("services:no-version-management-service","No version management service");const t=n.versionInfo?.versionIdentifier??{name:n.versionService.defaultVersionIdentifier.name,guid:n.versionService.defaultVersionIdentifier.guid},o={name:i,guid:r};await n.versionService.changeVersion(this.view?.map,t,o)&&await this._updateVersionInfo(n)}async _updateVersionInfo(e){const i=e.versionService;if(!i)return;if(0===e.layersAndTables.length)return;const r=e.layersAndTables.getItemAt(0)?.gdbVersion,s=r?await i.getVersionIdentifierFromName(r):i.defaultVersionIdentifier;e.versionInfo=await i.getVersionInfoExtended(s)}_findServiceInfo(e){return this.items.find(i=>i.featureService.url===e)??null}_removeFeatureService(e){this.items.remove(e)}_reset(){this.additionalLayers.removeAll(),this._processed.clear(),this.tablesAndLayersLookup.clear(),this.items.removeAll()}async _findPortal(e){const r=i?.findServerInfo(e??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,n=I.getDefault();if(n?.loaded&&u(n.restUrl)===u(s))return n;return new I({authMode:"immediate",url:r.owningSystemUrl}).load()}_updateVersionInfos(e){return this._updatingHandles.addPromise((async()=>{for(const i of e)await this._updateVersionInfo(i).catch(e=>{o.getLogger(this).error("Failed to update version details",e)})})())}async _addServiceInfo(e,i){const s=new L({url:e});await s.load();const n=await this._findPortal(e),t=n?.user?.username;let o=!1;t&&(o=await _(n,t,"advediting"));let a=null;if(s.versionManagementServiceUrl){a=new(0,(await import("../../versionManagement/VersionManagementService.js")).default)({url:s.versionManagementServiceUrl}),await a.load()}const d=i.isTable?[]:[i],c=i.isTable?[i]:[],v=new b({loggedInServiceUser:t??"",hasAdvancedEditingUserTypeExtension:o,versionInfo:null,lockType:"none",canEditVersionedData:!0,canCreateVersion:!0,featureService:s,versionService:a,layers:new r(d),tables:new r(c)});return a&&await this._updateVersionInfo(v),this.items.push(v),this.tablesAndLayersLookup.set(i,v),i.isTable?v.tables.push(i):v.layers.push(i),v}get _allLayersAndTables(){return[...this.view.map?.allLayers??[],...this.view.map?.allTables??[],...this.additionalLayers]}_detectNewLayersAndTables(){const e=new Set(this._allLayersAndTables),i=[];for(const r of e)"feature"!==r.type&&"subtype-group"!==r.type||this._processed.has(r)||i.push(r);for(const r of this._processed)if(!e.has(r)&&(y(r)||S(r))){const e=this.tablesAndLayersLookup.get(r);if(!e)continue;this.tablesAndLayersLookup.delete(r),r.isTable?e.tables.remove(r):e.layers.remove(r),0===e.layersAndTables.length&&this._removeFeatureService(e)}return this._processed=e,i}};e([f({constructOnly:!0})],T.prototype,"view",void 0),e([f()],T.prototype,"items",void 0),e([f()],T.prototype,"tablesAndLayersLookup",void 0),e([f()],T.prototype,"additionalLayers",void 0),e([f()],T.prototype,"updating",null),e([f()],T.prototype,"_allLayersAndTables",null),T=e([h("esri.undoredo.support.Services")],T);export{T as Services,U as getServices};
5
+ import{__decorate as e}from"tslib";import{id as i}from"../../kernel.js";import r from"../../core/Collection.js";import s from"../../core/Error.js";import{EventedAccessor as n}from"../../core/Evented.js";import{LoadableMixin as t}from"../../core/Loadable.js";import o from"../../core/Logger.js";import{getOrCreateMapValue as a}from"../../core/MapUtils.js";import{EsriPromiseMixin as d}from"../../core/Promise.js";import{debounce as c,throwIfAborted as v,logOnError as l}from"../../core/promiseUtils.js";import p from"../../core/ReactiveMap.js";import{whenOnce as m,watch as u}from"../../core/reactiveUtils.js";import{normalize as f}from"../../core/urlUtils.js";import{property as h}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as g}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as w}from"../../core/support/UpdatingHandles.js";import{parse as y}from"../../layers/support/arcgisLayerUrl.js";import{isSubtypeGroupLayer as S,isFeatureLayer as I}from"../../layers/support/layerUtils.js";import _ from"../../portal/Portal.js";import{hasUserTypeExtension as L}from"../../portal/support/utils.js";import b from"../../rest/featureService/FeatureService.js";import{ServiceVersionInfo as V}from"./ServiceVersionInfo.js";function A(e){return!e||0===e.trim().length}const U=new Map;function T(e){return a(U,e,()=>{const i=new j({view:e});return e.addHandles({remove(){U.delete(e),i.destroy()}}),i.load().catch(e=>{o.getLogger("esri.views.Services").error("Failed to load service metadata",e)}),i})}let j=class extends(t(d(n))){constructor(e){super(e),this._updatingHandles=new w,this.items=new r,this.tablesAndLayersLookup=new p,this.additionalLayers=new r,this._debouncedCheckAndUpdateServiceInfos=c(async()=>{const e=[];for(const i of this.items){if(0===i.layersAndTables.length)continue;const r=i.layersAndTables.getItemAt(0);r?.gdbVersion!==i.versionInfo?.versionIdentifier.name&&e.push(i)}0!==e.length&&(await m(()=>!this.updating),await this._updateVersionInfos(e))}),this._debouncedLayersChanged=c(async()=>{const e=this._detectNewLayersAndTables();0!==e.length&&(await m(()=>!this._updatingHandles.updating),await this._updatingHandles.addPromise((async()=>{const i=new Set;for(const s of e)if("feature"===s.type||"subtype-group"===s.type){if(!s.url)continue;const e=y(s.url).url.path,n=this._findServiceInfo(e);if(n)this.tablesAndLayersLookup.set(s,n),s.isTable?n.tables.push(s):n.layers.push(s);else if(!i.has(e))try{await this._addServiceInfo(e,s)}catch(r){o.getLogger(this).error(`Failed to load feature service: ${e}`,r)}finally{i.add(e)}}})()))}),this._processed=new Set}destroy(){this._set("view",null),this.items.removeAll(),this.tablesAndLayersLookup.clear()}async load(e){return v(e),this.addHandles([u(()=>this.view.map,()=>{this._reset()}),u(()=>this._allLayersAndTables,()=>{this._debouncedLayersChanged().catch(e=>{o.getLogger(this).warn("Failed to update service info",e)})}),u(()=>this.items.map(e=>e.layersAndTables.map(e=>e.gdbVersion??"").join(",")),()=>{l(this.checkAndUpdateServiceInfos(),o.getLogger(this))})]),this.addResolvingPromise(this._debouncedLayersChanged()),this}get updating(){return"loading"===this.loadStatus||this._updatingHandles.updating}checkAndUpdateServiceInfos(){return this._debouncedCheckAndUpdateServiceInfos()}changeVersion(e,i,r){return this._updatingHandles.addPromise((async()=>{await this._changeVersionInternal(e,i,r)})())}createVersion(e){return this._updatingHandles.addPromise((async()=>{const i=e.featureServerUrl,r=this._findServiceInfo(i);if(!r?.versionService)throw new s("services:no-version-management-service","No version management service");const n=r.loggedInServiceUser.toUpperCase(),t=A(e.ownerName)?n:e.ownerName?.trim().toUpperCase();if(t!==n&&r.featureServiceVersion<=11.1)throw new s("services:versioning-api-error","Version management API too old");if("SDE"===t?.toUpperCase()&&"DEFAULT"===e.versionName.toUpperCase())throw new s("services:no-valid-version-name","No valid version name");{const i=await r.versionService.getVersionInfos();if(i?.find(i=>i.versionIdentifier.name.toUpperCase()===(t+"."+e.versionName).toUpperCase()||i.versionIdentifier.name.toUpperCase()===(n+"."+e.versionName).toUpperCase()))throw new s("services:no-valid-version-name","No valid version name")}const o=await r.versionService.createVersion({versionName:e.versionName,access:t!==n?"public":e.access,description:e.description});if(t!==n){const{guid:i,name:s}=o.versionIdentifier;await r.versionService.alterVersion({guid:i,name:s},{ownerName:t,access:e.access})}e.switchToVersion&&await this._changeVersionInternal(i,o.versionIdentifier.name,o.versionIdentifier.guid),this.emit("version-created",{versionIdentifier:o.versionIdentifier,versionManagementService:r.versionService})})())}deleteVersion(e,i,r){return this._updatingHandles.addPromise((async()=>{const n=this._findServiceInfo(e);if(!n?.versionService)throw new s("services:no-version-management-service","No version management service");if(n.featureServiceVersion<=11.1)throw new s("services:versioning-api-error","Version management API too old");const t={name:i,guid:r};await n.versionService.deleteVersion(t)&&(await this._updateVersionInfo(n),this.emit("version-deleted",{versionIdentifier:t,versionManagementService:n.versionService}))})())}startEditing(e){return this._updatingHandles.addPromise((async()=>{const i=this._findServiceInfo(e);if(!i?.versionService)throw new s("services:no-version-management-service","No version management service");const r=i.versionInfo?.versionIdentifier??{name:i.versionService.defaultVersionIdentifier.name,guid:i.versionService.defaultVersionIdentifier.guid};let n=!0;("none"!==i.versionService.getLockType(r)||(n=await i.versionService.startReading(r),n))&&(n=await i.versionService.startEditing(r),i.updateLockType())})())}finishEditing(e,i){return this._updatingHandles.addPromise((async()=>{const r=this._findServiceInfo(e);if(!r?.versionService)throw new s("services:no-version-management-service","No version management service");const n=r.versionInfo?.versionIdentifier??{name:r.versionService.defaultVersionIdentifier.name,guid:r.versionService.defaultVersionIdentifier.guid},t=r.versionService.getLockType(n);if("none"!==t)return"read"===t?(await r.versionService.stopReading(n),void r.updateLockType()):"edit"===t?(await r.versionService.stopEditing(n,i),await r.versionService.stopReading(n),void r.updateLockType()):void 0})())}async _changeVersionInternal(e,i,r){const n=this._findServiceInfo(e);if(!n?.versionService)throw new s("services:no-version-management-service","No version management service");const t=n.versionInfo?.versionIdentifier??{name:n.versionService.defaultVersionIdentifier.name,guid:n.versionService.defaultVersionIdentifier.guid},o={name:i,guid:r};await n.versionService.changeVersion(this.view?.map,t,o)&&await this._updateVersionInfo(n)}async _updateVersionInfo(e){const i=e.versionService;if(!i)return;if(0===e.layersAndTables.length)return;const r=e.layersAndTables.getItemAt(0)?.gdbVersion,s=r?await i.getVersionIdentifierFromName(r):i.defaultVersionIdentifier;e.versionInfo=await i.getVersionInfoExtended(s)}_findServiceInfo(e){return this.items.find(i=>i.featureService.url===e)??null}_removeFeatureService(e){this.items.remove(e)}_reset(){this.additionalLayers.removeAll(),this._processed.clear(),this.tablesAndLayersLookup.clear(),this.items.removeAll()}async _findPortal(e){const r=i?.findServerInfo(e??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,n=_.getDefault();if(n?.loaded&&f(n.restUrl)===f(s))return n;return new _({authMode:"immediate",url:r.owningSystemUrl}).load()}_updateVersionInfos(e){return this._updatingHandles.addPromise((async()=>{for(const i of e)await this._updateVersionInfo(i).catch(e=>{o.getLogger(this).error("Failed to update version details",e)})})())}async _addServiceInfo(e,i){const s=new b({url:e});await s.load();const n=await this._findPortal(e),t=n?.user?.username;let o=!1;t&&(o=await L(n,t,"advediting"));let a=null;if(s.versionManagementServiceUrl){a=new(0,(await import("../../versionManagement/VersionManagementService.js")).default)({url:s.versionManagementServiceUrl}),await a.load()}const d=i.isTable?[]:[i],c=i.isTable?[i]:[],v=new V({loggedInServiceUser:t??"",hasAdvancedEditingUserTypeExtension:o,versionInfo:null,lockType:"none",canEditVersionedData:!0,canCreateVersion:!0,featureService:s,versionService:a,layers:new r(d),tables:new r(c)});return a&&await this._updateVersionInfo(v),this.items.push(v),this.tablesAndLayersLookup.set(i,v),i.isTable?v.tables.push(i):v.layers.push(i),v}get _allLayersAndTables(){return[...this.view.map?.allLayers??[],...this.view.map?.allTables??[],...this.additionalLayers]}_detectNewLayersAndTables(){const e=new Set(this._allLayersAndTables),i=[];for(const r of e)"feature"!==r.type&&"subtype-group"!==r.type||this._processed.has(r)||i.push(r);for(const r of this._processed)if(!e.has(r)&&(S(r)||I(r))){const e=this.tablesAndLayersLookup.get(r);if(!e)continue;this.tablesAndLayersLookup.delete(r),r.isTable?e.tables.remove(r):e.layers.remove(r),0===e.layersAndTables.length&&this._removeFeatureService(e)}return this._processed=e,i}};e([h({constructOnly:!0})],j.prototype,"view",void 0),e([h()],j.prototype,"items",void 0),e([h()],j.prototype,"tablesAndLayersLookup",void 0),e([h()],j.prototype,"additionalLayers",void 0),e([h()],j.prototype,"updating",null),e([h()],j.prototype,"_allLayersAndTables",null),j=e([g("esri.undoredo.support.Services")],j);export{j as Services,T as getServices};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import r from"../../../core/Accessor.js";import{NumericIdentifiableMixin as t}from"../../../core/Identifiable.js";import o from"../../../core/Logger.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{project as n}from"../../../geometry/projectionUtils.js";import{extentContainsPoint as m,polygonContainsPoint as a}from"../../../geometry/support/contains.js";import{nearestCoordinate as c}from"../../../geometry/support/near.js";var l;let p=l=class extends(t(r)){constructor(e){super(e),this.geometry=null,this.spatialReference=null}get normalizedGeometry(){if(null==this.geometry||!this.spatialReference)return null;if(!this.spatialReference.equals(this.geometry.spatialReference))try{return n(this.geometry,this.spatialReference)}catch(e){return o.getLogger(this).error("#constraints.geometry","could not project the geometry to the view's spatial reference",{geometry:this.geometry,spatialReference:this.spatialReference,error:e}),null}return this.geometry}constrain(e,r){if(null==this.normalizedGeometry)return e;const t=e.targetGeometry;if("extent"===this.normalizedGeometry.type?m(this.normalizedGeometry,t):a(this.normalizedGeometry,t))return e;const{coordinate:o}=c(this.normalizedGeometry,t);return o?(e.targetGeometry=o,e):e}clone(){return new l({geometry:this.geometry?.clone(),spatialReference:this.spatialReference?.clone()})}};e([s({constructOnly:!0})],p.prototype,"geometry",void 0),e([s({readOnly:!0})],p.prototype,"normalizedGeometry",null),e([s({constructOnly:!0})],p.prototype,"spatialReference",void 0),p=l=e([i("esri.views.2d.constraints.GeometryConstraint")],p);export{p as GeometryConstraint};
5
+ import{__decorate as e}from"tslib";import r from"../../../core/Accessor.js";import t from"../../../core/Logger.js";import{NumericIdentifiableMixin as o}from"../../../core/NumericIdentifiable.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{project as n}from"../../../geometry/projectionUtils.js";import{extentContainsPoint as m,polygonContainsPoint as a}from"../../../geometry/support/contains.js";import{nearestCoordinate as c}from"../../../geometry/support/near.js";var l;let p=l=class extends(o(r)){constructor(e){super(e),this.geometry=null,this.spatialReference=null}get normalizedGeometry(){if(null==this.geometry||!this.spatialReference)return null;if(!this.spatialReference.equals(this.geometry.spatialReference))try{return n(this.geometry,this.spatialReference)}catch(e){return t.getLogger(this).error("#constraints.geometry","could not project the geometry to the view's spatial reference",{geometry:this.geometry,spatialReference:this.spatialReference,error:e}),null}return this.geometry}constrain(e,r){if(null==this.normalizedGeometry)return e;const t=e.targetGeometry;if("extent"===this.normalizedGeometry.type?m(this.normalizedGeometry,t):a(this.normalizedGeometry,t))return e;const{coordinate:o}=c(this.normalizedGeometry,t);return o?(e.targetGeometry=o,e):e}clone(){return new l({geometry:this.geometry?.clone(),spatialReference:this.spatialReference?.clone()})}};e([s({constructOnly:!0})],p.prototype,"geometry",void 0),e([s({readOnly:!0})],p.prototype,"normalizedGeometry",null),e([s({constructOnly:!0})],p.prototype,"spatialReference",void 0),p=l=e([i("esri.views.2d.constraints.GeometryConstraint")],p);export{p as GeometryConstraint};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as o}from"tslib";import t from"../../../core/Accessor.js";import{NumericIdentifiableMixin as r}from"../../../core/Identifiable.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";var a;let n=a=class extends(r(t)){constructor(){super(...arguments),this.enabled=!0,this.rotationEnabled=!0}constrain(o,t){return this.enabled&&t?(this.rotationEnabled||(o.rotation=t.rotation),o):o}clone(){return new a({enabled:this.enabled,rotationEnabled:this.rotationEnabled})}};o([e()],n.prototype,"enabled",void 0),o([e()],n.prototype,"rotationEnabled",void 0),n=a=o([s("esri.views.2d.constraints.RotationConstraint")],n);const i=n;export{i as default};
5
+ import{__decorate as o}from"tslib";import r from"../../../core/Accessor.js";import{NumericIdentifiableMixin as t}from"../../../core/NumericIdentifiable.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";var a;let i=a=class extends(t(r)){constructor(){super(...arguments),this.enabled=!0,this.rotationEnabled=!0}constrain(o,r){return this.enabled&&r?(this.rotationEnabled||(o.rotation=r.rotation),o):o}clone(){return new a({enabled:this.enabled,rotationEnabled:this.rotationEnabled})}};o([e()],i.prototype,"enabled",void 0),o([e()],i.prototype,"rotationEnabled",void 0),i=a=o([s("esri.views.2d.constraints.RotationConstraint")],i);const n=i;export{n as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{NumericIdentifiableMixin as o}from"../../../core/Identifiable.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";var a;let c=a=class extends(o(t)){constructor(e){super(e),this._lodByScale={},this._scales=[],this.effectiveLODs=null,this.effectiveMinZoom=-1,this.effectiveMaxZoom=-1,this.effectiveMinScale=0,this.effectiveMaxScale=0,this.lods=null,this.minZoom=-1,this.maxZoom=-1,this.minScale=0,this.maxScale=0,this.snapToZoom=!0}initialize(){let e,{lods:t,minScale:o,maxScale:s,minZoom:i,maxZoom:a}=this,c=-1,r=-1,l=!1,n=!1;if(0!==o&&0!==s&&o<s&&([o,s]=[s,o]),!t?.length)return this._set("effectiveMinScale",o),void this._set("effectiveMaxScale",s);t=t.map(e=>e.clone()),t.sort((e,t)=>t.scale-e.scale),t.forEach((e,t)=>e.level=t);for(const f of t)!l&&o>0&&o>=f.scale&&(c=f.level,l=!0),!n&&s>0&&s>=f.scale&&(r=e?e.level:-1,n=!0),e=f;-1===i&&(i=0===o?0:c),-1===a&&(a=0===s?t.length-1:r),i=Math.max(i,0),i=Math.min(i,t.length-1),a=Math.max(a,0),a=Math.min(a,t.length-1),i>a&&([i,a]=[a,i]),o=t[i].scale,s=t[a].scale,t.splice(0,i),t.splice(a-i+1),t.forEach((e,t)=>{this._lodByScale[e.scale]=e,this._scales[t]=e.scale}),this._set("effectiveLODs",t),this._set("effectiveMinZoom",i),this._set("effectiveMaxZoom",a),this._set("effectiveMinScale",o),this._set("effectiveMaxScale",s)}constrain(e,t){if(t&&e.scale===t.scale)return e;const o=this.effectiveMinScale,s=this.effectiveMaxScale,i=e.targetGeometry,a=t&&t.targetGeometry,c=0!==s&&e.scale<s,r=0!==o&&e.scale>o;if(c||r){const c=r?o:s;if(t&&a){const o=(c-t.scale)/(e.scale-t.scale);i.x=a.x+(i.x-a.x)*o,i.y=a.y+(i.y-a.y)*o}e.scale=c}return this.snapToZoom&&this.effectiveLODs&&(e.scale=this._getClosestScale(e.scale)),e}fit(e){if(!this.effectiveLODs||!this.snapToZoom)return this.constrain(e,null);const t=this.scaleToZoom(e.scale),o=Math.abs(t-Math.floor(t));return e.scale=this.zoomToScale(o>.99?Math.round(t):Math.floor(t)),e}zoomToScale(e){if(!this.effectiveLODs)return 0;e-=this.effectiveMinZoom,e=Math.max(0,e);const t=this._scales;if(e<=0)return t[0];if(e>=t.length)return t[t.length-1];const o=Math.floor(e),s=Math.ceil(e);return t[o]+(e-o)*(t[s]-t[o])}scaleToZoom(e){if(!this.effectiveLODs)return-1;const t=this._scales;let o,s;if(e>=t[0])return this.effectiveMinZoom;if(e<=t[t.length-1])return this.effectiveMaxZoom;for(let i=0;i<t.length-1;i++){if(o=t[i],s=t[i+1],s===e){return i+this.effectiveMinZoom+1}if(o>e&&s<e){return i+this.effectiveMinZoom+1-(e-s)/(o-s)}}return-1}snapToClosestScale(e){if(!this.effectiveLODs)return e;const t=this.scaleToZoom(e);return this.zoomToScale(Math.round(t))}snapToNextScale(e,t=.5){if(!this.effectiveLODs)return e*t;const o=Math.round(this.scaleToZoom(e));return this.zoomToScale(o+1)}snapToPreviousScale(e,t=2){if(!this.effectiveLODs)return e*t;const o=Math.round(this.scaleToZoom(e));return this.zoomToScale(o-1)}clone(){return new a({lods:this.lods,minZoom:this.minZoom,maxZoom:this.maxZoom,minScale:this.minScale,maxScale:this.maxScale})}_getClosestScale(e){return this._lodByScale[e]||(e=this._scales.reduce((t,o)=>Math.abs(o-e)<=Math.abs(t-e)?o:t,this._scales[0])),this._lodByScale[e].scale}};e([s({readOnly:!0})],c.prototype,"effectiveLODs",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMinZoom",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMaxZoom",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMinScale",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMaxScale",void 0),e([s()],c.prototype,"lods",void 0),e([s()],c.prototype,"minZoom",void 0),e([s()],c.prototype,"maxZoom",void 0),e([s()],c.prototype,"minScale",void 0),e([s()],c.prototype,"maxScale",void 0),e([s()],c.prototype,"snapToZoom",void 0),c=a=e([i("esri.views.2d.constraints.ZoomConstraint")],c);const r=c;export{r as default};
5
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{NumericIdentifiableMixin as o}from"../../../core/NumericIdentifiable.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";var a;let c=a=class extends(o(t)){constructor(e){super(e),this._lodByScale={},this._scales=[],this.effectiveLODs=null,this.effectiveMinZoom=-1,this.effectiveMaxZoom=-1,this.effectiveMinScale=0,this.effectiveMaxScale=0,this.lods=null,this.minZoom=-1,this.maxZoom=-1,this.minScale=0,this.maxScale=0,this.snapToZoom=!0}initialize(){let e,{lods:t,minScale:o,maxScale:s,minZoom:i,maxZoom:a}=this,c=-1,r=-1,l=!1,n=!1;if(0!==o&&0!==s&&o<s&&([o,s]=[s,o]),!t?.length)return this._set("effectiveMinScale",o),void this._set("effectiveMaxScale",s);t=t.map(e=>e.clone()),t.sort((e,t)=>t.scale-e.scale),t.forEach((e,t)=>e.level=t);for(const f of t)!l&&o>0&&o>=f.scale&&(c=f.level,l=!0),!n&&s>0&&s>=f.scale&&(r=e?e.level:-1,n=!0),e=f;-1===i&&(i=0===o?0:c),-1===a&&(a=0===s?t.length-1:r),i=Math.max(i,0),i=Math.min(i,t.length-1),a=Math.max(a,0),a=Math.min(a,t.length-1),i>a&&([i,a]=[a,i]),o=t[i].scale,s=t[a].scale,t.splice(0,i),t.splice(a-i+1),t.forEach((e,t)=>{this._lodByScale[e.scale]=e,this._scales[t]=e.scale}),this._set("effectiveLODs",t),this._set("effectiveMinZoom",i),this._set("effectiveMaxZoom",a),this._set("effectiveMinScale",o),this._set("effectiveMaxScale",s)}constrain(e,t){if(t&&e.scale===t.scale)return e;const o=this.effectiveMinScale,s=this.effectiveMaxScale,i=e.targetGeometry,a=t&&t.targetGeometry,c=0!==s&&e.scale<s,r=0!==o&&e.scale>o;if(c||r){const c=r?o:s;if(t&&a){const o=(c-t.scale)/(e.scale-t.scale);i.x=a.x+(i.x-a.x)*o,i.y=a.y+(i.y-a.y)*o}e.scale=c}return this.snapToZoom&&this.effectiveLODs&&(e.scale=this._getClosestScale(e.scale)),e}fit(e){if(!this.effectiveLODs||!this.snapToZoom)return this.constrain(e,null);const t=this.scaleToZoom(e.scale),o=Math.abs(t-Math.floor(t));return e.scale=this.zoomToScale(o>.99?Math.round(t):Math.floor(t)),e}zoomToScale(e){if(!this.effectiveLODs)return 0;e-=this.effectiveMinZoom,e=Math.max(0,e);const t=this._scales;if(e<=0)return t[0];if(e>=t.length)return t[t.length-1];const o=Math.floor(e),s=Math.ceil(e);return t[o]+(e-o)*(t[s]-t[o])}scaleToZoom(e){if(!this.effectiveLODs)return-1;const t=this._scales;let o,s;if(e>=t[0])return this.effectiveMinZoom;if(e<=t[t.length-1])return this.effectiveMaxZoom;for(let i=0;i<t.length-1;i++){if(o=t[i],s=t[i+1],s===e){return i+this.effectiveMinZoom+1}if(o>e&&s<e){return i+this.effectiveMinZoom+1-(e-s)/(o-s)}}return-1}snapToClosestScale(e){if(!this.effectiveLODs)return e;const t=this.scaleToZoom(e);return this.zoomToScale(Math.round(t))}snapToNextScale(e,t=.5){if(!this.effectiveLODs)return e*t;const o=Math.round(this.scaleToZoom(e));return this.zoomToScale(o+1)}snapToPreviousScale(e,t=2){if(!this.effectiveLODs)return e*t;const o=Math.round(this.scaleToZoom(e));return this.zoomToScale(o-1)}clone(){return new a({lods:this.lods,minZoom:this.minZoom,maxZoom:this.maxZoom,minScale:this.minScale,maxScale:this.maxScale})}_getClosestScale(e){return this._lodByScale[e]||(e=this._scales.reduce((t,o)=>Math.abs(o-e)<=Math.abs(t-e)?o:t,this._scales[0])),this._lodByScale[e].scale}};e([s({readOnly:!0})],c.prototype,"effectiveLODs",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMinZoom",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMaxZoom",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMinScale",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMaxScale",void 0),e([s()],c.prototype,"lods",void 0),e([s()],c.prototype,"minZoom",void 0),e([s()],c.prototype,"maxZoom",void 0),e([s()],c.prototype,"minScale",void 0),e([s()],c.prototype,"maxScale",void 0),e([s()],c.prototype,"snapToZoom",void 0),c=a=e([i("esri.views.2d.constraints.ZoomConstraint")],c);const r=c;export{r as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{signal as t}from"../../../../../core/signal.js";import{CollisionJob as e}from"./CollisionJob.js";import{declutterBudget as i,fadeDuration as s}from"./config.js";import{SymbolDeclutterer as r}from"./SymbolDeclutterer.js";import{SymbolRepository as o}from"./SymbolRepository.js";const l=.5,a=1e-6;class n{constructor(e,s,l,n,c,h=i){this.styleRepository=s,this._declutterBudget=h,this._tileToHandle=new Map,this._viewState={scale:0,rotation:0,center:[0,0],size:[0,0]},this._declutterViewState={scale:0,rotation:0,center:[0,0],size:[0,0]},this._offsetFromScreenCenter=[0,0],this._completed=!1,this._fading=t(!1);const y=(t,e,i)=>this._createCollisionJob(t,e,i),_=t=>{const e=this.styleRepository.getStyleLayerByUID?.(t);if(e){if(this._zoom+a<e.minzoom||this._zoom-a>=e.maxzoom)return!1;const t=e.getLayoutProperty?.("visibility");if(t&&1===t.getValue())return!1}return!0},u=(t,e)=>(this.styleRepository.getStyleLayerByUID?.(t.styleLayerUID)?.z??0)-(this.styleRepository.getStyleLayerByUID?.(e.styleLayerUID)?.z??0);this._symbolRepository=new o(c,n),this._symbolDeclutterer=new r(e,n,this._symbolRepository,this.styleRepository,y,l,u,_)}get symbolRepository(){return this._symbolRepository}_createCollisionJob(t,i,s){return this.updateDecluttererViewState(),new e(t,i,s,this.styleRepository,this._zoom,this._viewState.rotation)}get fading(){return this._fading.value}get decluttererOffset(){return this._offsetFromScreenCenter}registerFeatureTile(t){this.symbolRepository?(this.symbolRepository.registerFeatureTile(t),this.restartDeclutter()):console.error("InternalError: Symbol repository not yet initialized")}unregisterFeatureTile(t){this.symbolRepository?(this._symbolRepository.unregisterFeatureTile(t),this.restartDeclutter()):console.error("InternalError: Symbol repository not yet initialized")}insertFeatureTileMetrics(t,e){this.symbolRepository?(this.symbolRepository.insertFeatureTileMetrics(t,e),this.restartDeclutter()):console.error("InternalError: Symbol repository not yet initialized")}removeFeatureTileMetrics(t,e){this.symbolRepository?(this.symbolRepository.removeFeatureTileMetrics(t,e),this.restartDeclutter()):console.error("InternalError: Symbol repository not yet initialized")}addTile(t){t.decluttered=!1,this._tileToHandle.set(t,t.on("symbols-changed",()=>{this._symbolRepository.registerVectorTile(t),this.restartDeclutter()})),this._symbolRepository.registerVectorTile(t),this.restartDeclutter()}removeTile(t){const e=this._tileToHandle.get(t);e&&(this._symbolRepository.unregisterVectorTile(t),this.restartDeclutter(),e.remove(),this._tileToHandle.delete(t))}update(t,e){this._zoom=t,this._viewState={scale:e.scale,rotation:e.rotation,center:[e.center[0],e.center[1]],size:[e.size[0],e.size[1]]};const i=[0,0];e.toScreen(i,e.center);const s=[0,0];return e.toScreen(s,this._declutterViewState.center),this._offsetFromScreenCenter[0]=i[0]-s[0],this._offsetFromScreenCenter[1]=i[1]-s[1],this._continueDeclutter(),this._completed}restartDeclutter(){this._completed=!1,this._symbolDeclutterer.restart(),this._notifyUnstable()}clear(){this._completed=!1,this._symbolRepository=null,this._symbolDeclutterer.restart(),this._tileToHandle.forEach(t=>t.remove()),this._tileToHandle.clear()}get stale(){return this._zoom!==this._declutterZoom||this._viewState.size[0]!==this._declutterViewState.size[0]||this._viewState.size[1]!==this._declutterViewState.size[1]||this._viewState.scale!==this._declutterViewState.scale||this._viewState.rotation!==this._declutterViewState.rotation}deleteStyleLayers(t){this._symbolRepository.deleteStyleLayers(t)}_continueDeclutter(){this._completed&&!this.stale||(this._symbolDeclutterer.running||(this.updateDecluttererViewState(),this._symbolDeclutterer.restart()),this._symbolDeclutterer.setScreenSize(this._viewState.size[0],this._viewState.size[1]),this._completed=this._symbolDeclutterer.continue(this._declutterBudget),this._completed&&this._scheduleNotifyStable())}_scheduleNotifyStable(){null!=this._stableNotificationHandle&&clearTimeout(this._stableNotificationHandle),this._stableNotificationHandle=setTimeout(()=>{this._stableNotificationHandle=null,this._fading.value=!1},(1+l)*s)}_notifyUnstable(){null!=this._stableNotificationHandle&&(clearTimeout(this._stableNotificationHandle),this._stableNotificationHandle=null),this._fading.value=!0}updateDecluttererViewState(){this._declutterZoom=this._zoom,this._declutterViewState.center[0]=this._viewState.center[0],this._declutterViewState.center[1]=this._viewState.center[1],this._declutterViewState.rotation=this._viewState.rotation,this._declutterViewState.scale=this._viewState.scale,this._declutterViewState.size[0]=this._viewState.size[0],this._declutterViewState.size[1]=this._viewState.size[1],this._offsetFromScreenCenter[0]=0,this._offsetFromScreenCenter[1]=0}}export{n as SymbolFader};
5
+ import{signal as t}from"../../../../../core/signal.js";import{CollisionJob as e}from"./CollisionJob.js";import{declutterBudget as i,fadeDuration as s}from"./config.js";import{SymbolDeclutterer as r}from"./SymbolDeclutterer.js";import{SymbolRepository as o}from"./SymbolRepository.js";const l=.5,a=1e-6;class n{constructor(e,s,l,n,c,h=i){this.styleRepository=s,this._declutterBudget=h,this._tileToHandle=new Map,this._viewState={scale:0,rotation:0,center:[0,0],size:[0,0]},this._declutterViewState={scale:0,rotation:0,center:[0,0],size:[0,0]},this._offsetFromScreenCenter=[0,0],this._completed=!1,this._fading=t(!1);const y=(t,e,i)=>this._createCollisionJob(t,e,i),_=t=>{const e=this.styleRepository.getStyleLayerByUID?.(t);if(e){if(this._zoom+a<e.minzoom||this._zoom-a>=e.maxzoom)return!1;const t=e.getLayoutProperty?.("visibility");if(t&&1===t.getValue())return!1}const i=this.styleRepository.layerContexts?.get(t);return!(i&&!i.layerView.layer.visible)},u=(t,e)=>(this.styleRepository.getStyleLayerByUID?.(t.styleLayerUID)?.z??0)-(this.styleRepository.getStyleLayerByUID?.(e.styleLayerUID)?.z??0);this._symbolRepository=new o(c,n),this._symbolDeclutterer=new r(e,n,this._symbolRepository,this.styleRepository,y,l,u,_)}get symbolRepository(){return this._symbolRepository}_createCollisionJob(t,i,s){return this.updateDecluttererViewState(),new e(t,i,s,this.styleRepository,this._zoom,this._viewState.rotation)}get fading(){return this._fading.value}get decluttererOffset(){return this._offsetFromScreenCenter}registerFeatureTile(t){this.symbolRepository?(this.symbolRepository.registerFeatureTile(t),this.restartDeclutter()):console.error("InternalError: Symbol repository not yet initialized")}unregisterFeatureTile(t){this.symbolRepository?(this._symbolRepository.unregisterFeatureTile(t),this.restartDeclutter()):console.error("InternalError: Symbol repository not yet initialized")}insertFeatureTileMetrics(t,e){this.symbolRepository?(this.symbolRepository.insertFeatureTileMetrics(t,e),this.restartDeclutter()):console.error("InternalError: Symbol repository not yet initialized")}removeFeatureTileMetrics(t,e){this.symbolRepository?(this.symbolRepository.removeFeatureTileMetrics(t,e),this.restartDeclutter()):console.error("InternalError: Symbol repository not yet initialized")}addTile(t){t.decluttered=!1,this._tileToHandle.set(t,t.on("symbols-changed",()=>{this._symbolRepository.registerVectorTile(t),this.restartDeclutter()})),this._symbolRepository.registerVectorTile(t),this.restartDeclutter()}removeTile(t){const e=this._tileToHandle.get(t);e&&(this._symbolRepository.unregisterVectorTile(t),this.restartDeclutter(),e.remove(),this._tileToHandle.delete(t))}update(t,e){this._zoom=t,this._viewState={scale:e.scale,rotation:e.rotation,center:[e.center[0],e.center[1]],size:[e.size[0],e.size[1]]};const i=[0,0];e.toScreen(i,e.center);const s=[0,0];return e.toScreen(s,this._declutterViewState.center),this._offsetFromScreenCenter[0]=i[0]-s[0],this._offsetFromScreenCenter[1]=i[1]-s[1],this._continueDeclutter(),this._completed}restartDeclutter(){this._completed=!1,this._symbolDeclutterer.restart(),this._notifyUnstable()}clear(){this._completed=!1,this._symbolRepository=null,this._symbolDeclutterer.restart(),this._tileToHandle.forEach(t=>t.remove()),this._tileToHandle.clear()}get stale(){return this._zoom!==this._declutterZoom||this._viewState.size[0]!==this._declutterViewState.size[0]||this._viewState.size[1]!==this._declutterViewState.size[1]||this._viewState.scale!==this._declutterViewState.scale||this._viewState.rotation!==this._declutterViewState.rotation}deleteStyleLayers(t){this._symbolRepository.deleteStyleLayers(t)}_continueDeclutter(){this._completed&&!this.stale||(this._symbolDeclutterer.running||(this.updateDecluttererViewState(),this._symbolDeclutterer.restart()),this._symbolDeclutterer.setScreenSize(this._viewState.size[0],this._viewState.size[1]),this._completed=this._symbolDeclutterer.continue(this._declutterBudget),this._completed&&this._scheduleNotifyStable())}_scheduleNotifyStable(){null!=this._stableNotificationHandle&&clearTimeout(this._stableNotificationHandle),this._stableNotificationHandle=setTimeout(()=>{this._stableNotificationHandle=null,this._fading.value=!1},(1+l)*s)}_notifyUnstable(){null!=this._stableNotificationHandle&&(clearTimeout(this._stableNotificationHandle),this._stableNotificationHandle=null),this._fading.value=!0}updateDecluttererViewState(){this._declutterZoom=this._zoom,this._declutterViewState.center[0]=this._viewState.center[0],this._declutterViewState.center[1]=this._viewState.center[1],this._declutterViewState.rotation=this._viewState.rotation,this._declutterViewState.scale=this._viewState.scale,this._declutterViewState.size[0]=this._viewState.size[0],this._declutterViewState.size[1]=this._viewState.size[1],this._offsetFromScreenCenter[0]=0,this._offsetFromScreenCenter[1]=0}}export{n as SymbolFader};