@arcgis/core 4.33.0-next.20250611 → 4.33.0-next.20250613

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 (133) hide show
  1. package/applications/MapViewer/layerUtils.d.ts +3 -0
  2. package/applications/MapViewer/layerUtils.js +5 -0
  3. package/applications/SceneViewer/layerUtils.d.ts +2 -2
  4. package/arcade.js +1 -1
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/{a08ce98672ab94d19613.js → 04e558a970c6a77f243e.js} +1 -1
  7. package/assets/esri/core/workers/chunks/0512ee54f2259a437fdb.js +1 -0
  8. package/assets/esri/core/workers/chunks/{ad4f65d764654c70a117.js → 0f8f217aaf42eb1b9699.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{74276044cb75b51967f2.js → 10eb89a93c8e31f03c95.js} +1 -1
  10. package/assets/esri/core/workers/chunks/273beed633cc37416ad7.js +1 -0
  11. package/assets/esri/core/workers/chunks/{369978472cc9ee6a00b5.js → 28fceb79e5888e0109cc.js} +4 -4
  12. package/assets/esri/core/workers/chunks/{aaa564c84ee8ea36fbb4.js → 49a57dc1e6d1048fa949.js} +1 -1
  13. package/assets/esri/core/workers/chunks/4ab757344cfa254584c3.js +1 -0
  14. package/assets/esri/core/workers/chunks/513dc2467e9b8b8c6df4.js +1 -0
  15. package/assets/esri/core/workers/chunks/5198dc5f8620b47dce79.js +1 -0
  16. package/assets/esri/core/workers/chunks/{e7589c39b13295af8f1d.js → 604f8094992bb642378b.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{ee3940679d794d78b4ea.js → 7687f1071b1d161d6fc8.js} +1 -1
  18. package/assets/esri/core/workers/chunks/77ad62ed93f713a909f0.js +1 -0
  19. package/assets/esri/core/workers/chunks/{3cfc0a5f8a9cb9dc3b8f.js → 7b9eec0090f48e9cdaf1.js} +1 -1
  20. package/assets/esri/core/workers/chunks/7c56740cac444419e5b4.js +1 -0
  21. package/assets/esri/core/workers/chunks/{3b63edcd34f832ac7bd8.js → 7c6b9e2c1dada4668c01.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{af0d7a7cbbaad47a49c6.js → 802c6b1a6cb9264b8e4f.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{183a7dec68c8ba6eb3d6.js → 8281c9ae86fec895f617.js} +1 -1
  24. package/assets/esri/core/workers/chunks/87986f31061c426e761b.js +1 -0
  25. package/assets/esri/core/workers/chunks/8855f1a6224ffbd0bb66.js +1 -0
  26. package/assets/esri/core/workers/chunks/8b1842f0f94c18652d4e.js +1 -0
  27. package/assets/esri/core/workers/chunks/{1c7eda72ecc2880034b9.js → 93c145a738b3f6cf4ee4.js} +1 -1
  28. package/assets/esri/core/workers/chunks/9dd40566d0730f79e504.js +1 -0
  29. package/assets/esri/core/workers/chunks/{6cbe8205a4e0f62da519.js → a5a27e2e9b91fbe12da9.js} +1 -1
  30. package/assets/esri/core/workers/chunks/cc1328cacc4ac07eb548.js +1 -0
  31. package/assets/esri/core/workers/chunks/d0876a713079c669995a.js +1 -0
  32. package/assets/esri/core/workers/chunks/{3145218abe59b5e99ff8.js → d2139307f62ea8bf999a.js} +1 -1
  33. package/assets/esri/core/workers/chunks/d9cdefb1cd8399ffac20.js +1 -0
  34. package/assets/esri/core/workers/chunks/{d5f770302dc686e55ba7.js → daffceecdc71e74d2629.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{3f58da371633967a61ca.js → ddb66fe6fcd0764daa7a.js} +1 -1
  36. package/assets/esri/core/workers/chunks/e02437168d5a55b51831.js +1 -0
  37. package/assets/esri/core/workers/chunks/f5b426f57f87eb9b2f35.js +1 -0
  38. package/assets/esri/core/workers/chunks/fa5715ca3ce95d005b0a.js +1 -0
  39. package/assets/esri/themes/base/widgets/_SelectionList.scss +31 -28
  40. package/assets/esri/themes/dark/main.css +1 -1
  41. package/assets/esri/themes/light/main.css +1 -1
  42. package/assets/esri/themes/light/view.css +1 -1
  43. package/chunks/aiServices.js +1 -1
  44. package/core/accessorSupport/utils.js +1 -1
  45. package/core/object.js +1 -1
  46. package/core/urlUtils.js +1 -1
  47. package/editing/sharedTemplates/executor/builders/bufferPolygonToPolygon.js +1 -1
  48. package/interfaces.d.ts +51 -16
  49. package/layers/mixins/FeatureLayerBase.js +1 -1
  50. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  51. package/layers/support/arcgisLayers.js +1 -1
  52. package/layers/support/fetchService.js +1 -1
  53. package/layers/support/layerUtils.js +1 -1
  54. package/package.json +1 -1
  55. package/portal/support/layersLoader.js +1 -1
  56. package/portal/support/loadUtils.js +1 -1
  57. package/portal/support/portalLayers.js +1 -1
  58. package/renderers/support/DictionaryScriptEvaluator.js +1 -1
  59. package/rest/networks/circuits/support/CircuitVerifyResult.js +1 -1
  60. package/rest/support/TranslateParameters.js +1 -1
  61. package/smartMapping/renderers/size.js +1 -1
  62. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  63. package/smartMapping/support/adapters/support/utils.js +1 -1
  64. package/support/ArcadeExpression.js +1 -1
  65. package/support/revision.js +1 -1
  66. package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
  67. package/views/2d/engine/vectorTiles/style/StyleProperty.js +1 -1
  68. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  69. package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
  70. package/views/3d/analysis/DimensionAnalysisView3D.js +1 -1
  71. package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
  72. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  73. package/views/3d/analysis/SliceAnalysisView3D.js +1 -1
  74. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  75. package/views/3d/camera/intersectionUtils.js +1 -1
  76. package/views/analysis/analysisViewUtils.js +1 -1
  77. package/views/ui/UI.js +1 -1
  78. package/webscene/Slide.js +1 -1
  79. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  80. package/widgets/BatchAttributeForm.js +1 -1
  81. package/widgets/Directions/DirectionsVisibleElements.js +1 -1
  82. package/widgets/Directions.js +1 -1
  83. package/widgets/Editor/EditorViewModel.js +1 -1
  84. package/widgets/Editor/UpdateFeatureWorkflowData.js +1 -1
  85. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  86. package/widgets/Editor/UpdateWorkflow.js +1 -1
  87. package/widgets/Editor/components/PendingFeatureList.js +1 -1
  88. package/widgets/Editor.js +1 -1
  89. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  90. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  91. package/widgets/FeatureTable.js +1 -1
  92. package/widgets/FeatureTemplates.js +1 -1
  93. package/widgets/Features/FeaturesViewModel.js +1 -1
  94. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  95. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  96. package/widgets/OrientedImageryViewer/components/NavigationNode.js +1 -1
  97. package/widgets/OrientedImageryViewer/components/NavigationSettings.js +1 -1
  98. package/widgets/OrientedImageryViewer/components/NavigationUI.js +1 -1
  99. package/widgets/OrientedImageryViewer/components/NavigationUI360.js +5 -0
  100. package/widgets/OrientedImageryViewer/components/NavigationUIPanoramicViewModel.js +1 -1
  101. package/widgets/OrientedImageryViewer/components/NavigationUIViewModel.js +1 -1
  102. package/widgets/OrientedImageryViewer/components/imageNavigationUtils.js +1 -1
  103. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  104. package/widgets/OrientedImageryViewer.js +1 -1
  105. package/widgets/PanoramicViewer.js +1 -1
  106. package/widgets/Search/SearchViewModel.js +1 -1
  107. package/widgets/Search/support/layerSearchUtils.js +1 -1
  108. package/widgets/support/ItemList.js +1 -1
  109. package/widgets/support/SelectionList/FeatureItem.js +1 -1
  110. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  111. package/widgets/support/SelectionList/LayerItem.js +1 -1
  112. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  113. package/widgets/support/SelectionList.js +1 -1
  114. package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
  115. package/widgets/support/dateUtils.js +1 -1
  116. package/widgets/support/symbolPreviewUtils.js +1 -1
  117. package/assets/esri/core/workers/chunks/0ff6f15d46d7ddf6fe4d.js +0 -1
  118. package/assets/esri/core/workers/chunks/40111357b99235a4cb0f.js +0 -1
  119. package/assets/esri/core/workers/chunks/49089731ecfe7e8bb2f6.js +0 -1
  120. package/assets/esri/core/workers/chunks/4a1f0587a1cc1138faa3.js +0 -1
  121. package/assets/esri/core/workers/chunks/64f5f27e7c5649d79cbc.js +0 -1
  122. package/assets/esri/core/workers/chunks/679d7baea233faf3fdbc.js +0 -1
  123. package/assets/esri/core/workers/chunks/72ea996b03932c0f004f.js +0 -1
  124. package/assets/esri/core/workers/chunks/86c12fcaf8d0c96a52ba.js +0 -1
  125. package/assets/esri/core/workers/chunks/97b69fec3e87f11210ba.js +0 -1
  126. package/assets/esri/core/workers/chunks/b72137c63b7f2a525d9e.js +0 -1
  127. package/assets/esri/core/workers/chunks/c2264451d12f1fbaad22.js +0 -1
  128. package/assets/esri/core/workers/chunks/c23cc0eaaf737af3ac35.js +0 -1
  129. package/assets/esri/core/workers/chunks/c6c86cbe65a58c3093ae.js +0 -1
  130. package/assets/esri/core/workers/chunks/c8856370bae65d9eeb2b.js +0 -1
  131. package/assets/esri/core/workers/chunks/cd4fb107489594c57438.js +0 -1
  132. package/assets/esri/core/workers/chunks/d28d874c1337b69fedc0.js +0 -1
  133. package/assets/esri/core/workers/chunks/fe3703ec198cbfebec30.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{toSymbolId as t}from"../arcade/arcadeEnvironment.js";import e from"../arcade/Dictionary.js";import{ArcadeExecutionError as s,ExecutionErrorCodes as r}from"../arcade/executionError.js";import{B as n,j as o,L as a}from"./languageUtils.js";import i from"../core/Error.js";import c from"../core/Logger.js";import{getOrCreateMapValue as l}from"../core/MapUtils.js";import u from"../portal/Portal.js";import{translate as h}from"../rest/translate.js";import m from"../rest/support/TranslateContent.js";import f from"../rest/support/TranslateParameters.js";import p from"../rest/support/TranslateResult.js";import{isString as d,isArray as _}from"../support/guards.js";class g{constructor(t,e){this.portal=t,this._debugLog=e}async translate(t){this.portal.loaded||await this.portal.load();const e=this.portal.helperServices?.aiUtilityServices;if(null==e)return{success:!1};const s=e.url+e.translateUtility;try{return{success:!0,results:(await h(s,t,{authMode:"no-prompt",headers:{"x-esri-request-source":"arcade"}})).map((t=>t.toJSON()))}}catch(r){return null!=this._debugLog&&(r instanceof Error||r instanceof i)&&this._debugLog(`TranslateText error: ${r.message}`),c.getLogger("esri.arcade.functions.aiServices").error(r),{success:!1}}}}class y{constructor(t,e,s){this._parameters=t,this._maxTotalContentSize=e,this._maxContentsLength=s,this._requests=[],this._normalizedContents=new Map,this._contentsTotalSize=0}tryAdd(t){const e=new Set(t.filter((t=>!this._normalizedContents.has(t.text))).map((t=>t.text)));if(this._requests.length+e.size>this._maxContentsLength)return null;let s=0;for(const n of e)s+=n.length;if((s+this._contentsTotalSize)*(this._parameters.to.length??1)>this._maxTotalContentSize)return null;const r=this._requests.length;for(const{key:n,text:o}of t)l(this._normalizedContents,o,(()=>[])).push({batchIdx:r,key:n});return this._requests.push(t),this._contentsTotalSize+=s,r}async send(t){const e=[],s=[];let r=0;for(const[i,c]of this._normalizedContents)e.push(new m({key:String(r++),text:i})),s.push(c);const n=new f(this._parameters);n.contents=e;const o=await t.translate(n);if(!o.success)return Array.from(this._requests,(()=>o));const a=Array.from(this._requests,(()=>({success:!0,results:[]})));for(const i of o.results){const t=Number(i.key);for(const e of s[t])a[e.batchIdx].results.push({...i,key:e.key})}return a}}function x(t){const e=[...new Set(t.to)].sort(),s=t.from??null,r=t.portalUrl,n=t.translator,o=t.apiKey??null;return JSON.stringify([e,s,r,n,o])}async function w(t,e,s){try{return(await t.yieldFor(s))[e]}catch{return{success:!1}}}class S{constructor(t,e,{maxTotalContentSize:s=5e4,maxContentsLength:r=1e3}={}){this._executor=t,this._service=e,this._openBatches=new Map,this._maxTotalContentSize=s,this._maxContentsLength=r}create(t){return{translate:async e=>{const s=x(e),{contents:r,to:n,from:o,translator:a,portalUrl:i,apiKey:c}=e;if(null==n)return{success:!1};if(null==r||r.every((t=>0===t.text.length)))return{success:!1};const l=this._openBatches.get(s);if(null!=l){const e=l.data.tryAdd(r);if(null!=e)return await w(t,e,l);l.send()}const u=new y({to:n,from:o,translator:a,portalUrl:i,apiKey:c},this._maxTotalContentSize,this._maxContentsLength),h=u.tryAdd(r);if(null!=h){const e=this._executor.openBatch(u,{open:t=>{this._openBatches.set(s,t)},execute:t=>t.send(this._service),close:t=>{this._openBatches.get(s)===t&&this._openBatches.delete(s)}});return await w(t,h,e)}return await this._service.translate(e)}}}}function T(i){"async"===i.mode&&(i.functions[t("TranslateText")]=function(t,c){return i.standardFunctionAsync(t,c,(async(t,i,c)=>{if(n(c,2,3,t,i),!d(c[0])&&!_(c[0])&&!o(c[0]))throw new s(t,r.InvalidParameter,i);const l=a(c[0]);if(!d(c[1])&&!_(c[1])&&!o(c[1]))throw new s(t,r.InvalidParameter,i);const h=a(c[1]);let y=null;if(c.length>=3){if(!d(c[2]))throw new s(t,r.InvalidParameter,i);y=c[2]}const w=l.map(((t,e)=>new m({key:String(e),text:t}))),S=t.services?.portal??u.getDefault(),T=new f({to:h,contents:w,from:y,portalUrl:S.restUrl.replace(/\/sharing\/rest$/,"")}),v=new Map;let C=null;if(null!=t.lrucache){const e=t.lrucache;C??=x(T),T.contents=T.contents?.filter((t=>{const s=e.getCachedTranslation(C,t.text);return null==s||(v.set(t.key,{...s,key:t.key,text:t.text}),!1)}))}if(T.contents?.length){const n=t.services?.translation??new g(S,t.console),o=await n.translate(T);if(!o.success)return new e({__proto__:null,success:!1});for(const e of o.results){const n=T.contents?.find((t=>t.key===e.key))?.text;if(null==n)throw new s(null,r.NeverReach,null);v.set(e.key,e),null!=t.lrucache&&(C??=x(T),t.lrucache.setCachedTranslation(C,n,{detectedLanguage:e.detectedLanguage,translation:e.translation}))}}const j=Array.from(w,(n=>{const o=p.fromJSON(v.get(n.key));if(null==o)throw new s(null,r.NeverReach,null);return o.text=n.text,e.convertJsonToArcade(o.toJSON(),t.timeZone??"system",!0)}));return new e({__proto__:null,success:!0,results:j})}))})}const v=Object.freeze(Object.defineProperty({__proto__:null,BatchTranslationServiceFactory:S,PortalTranslationService:g,getTranslateParametersKey:x,registerFunctions:T},Symbol.toStringTag,{value:"Module"}));export{v as A,S as B,g as P,x as g,T as r};
5
+ import{toSymbolId as t}from"../arcade/arcadeEnvironment.js";import e from"../arcade/Dictionary.js";import{ArcadeExecutionError as s,ExecutionErrorCodes as r}from"../arcade/executionError.js";import{B as n,j as o,L as a}from"./languageUtils.js";import i from"../core/Error.js";import c from"../core/Logger.js";import{getOrCreateMapValue as l}from"../core/MapUtils.js";import u from"../portal/Portal.js";import{translate as h}from"../rest/translate.js";import m from"../rest/support/TranslateContent.js";import f from"../rest/support/TranslateParameters.js";import p from"../rest/support/TranslateResult.js";import{isString as _,isArray as d}from"../support/guards.js";class g{constructor(t,e){this.portal=t,this._debugLog=e}async translate(t){this.portal.loaded||await this.portal.load();const e=this.portal.helperServices?.aiUtilityServices;if(null==e)return{success:!1};const s=e.url+e.translateUtility;try{t.requestSource??="arcade";return{success:!0,results:(await h(s,t,{authMode:"no-prompt"})).map((t=>t.toJSON()))}}catch(r){return null!=this._debugLog&&(r instanceof Error||r instanceof i)&&this._debugLog(`TranslateText error: ${r.message}`),c.getLogger("esri.arcade.functions.aiServices").error(r),{success:!1}}}}class y{constructor(t,e,s){this._parameters=t,this._maxTotalContentSize=e,this._maxContentsLength=s,this._requests=[],this._normalizedContents=new Map,this._contentsTotalSize=0}tryAdd(t){const e=new Set(t.filter((t=>!this._normalizedContents.has(t.text))).map((t=>t.text)));if(this._requests.length+e.size>this._maxContentsLength)return null;let s=0;for(const n of e)s+=n.length;if((s+this._contentsTotalSize)*(this._parameters.to.length??1)>this._maxTotalContentSize)return null;const r=this._requests.length;for(const{key:n,text:o}of t)l(this._normalizedContents,o,(()=>[])).push({batchIdx:r,key:n});return this._requests.push(t),this._contentsTotalSize+=s,r}async send(t){const e=[],s=[];let r=0;for(const[i,c]of this._normalizedContents)e.push(new m({key:String(r++),text:i})),s.push(c);const n=new f(this._parameters);n.contents=e;const o=await t.translate(n);if(!o.success)return Array.from(this._requests,(()=>o));const a=Array.from(this._requests,(()=>({success:!0,results:[]})));for(const i of o.results){const t=Number(i.key);for(const e of s[t])a[e.batchIdx].results.push({...i,key:e.key})}return a}}function w(t){const e=[...new Set(t.to)].sort(),s=t.from??null,r=t.portalUrl,n=t.translator,o=t.apiKey??null;return JSON.stringify([e,s,r,n,o])}async function x(t,e,s){try{return(await t.yieldFor(s))[e]}catch{return{success:!1}}}class S{constructor(t,e,{maxTotalContentSize:s=5e4,maxContentsLength:r=1e3}={}){this._executor=t,this._service=e,this._openBatches=new Map,this._maxTotalContentSize=s,this._maxContentsLength=r}create(t){return{translate:async e=>{const s=w(e),{contents:r,to:n,from:o,translator:a,portalUrl:i,apiKey:c}=e;if(null==n)return{success:!1};if(null==r||r.every((t=>0===t.text.length)))return{success:!1};const l=this._openBatches.get(s);if(null!=l){const e=l.data.tryAdd(r);if(null!=e)return await x(t,e,l);l.send()}const u=new y({to:n,from:o,translator:a,portalUrl:i,apiKey:c},this._maxTotalContentSize,this._maxContentsLength),h=u.tryAdd(r);if(null!=h){const e=this._executor.openBatch(u,{open:t=>{this._openBatches.set(s,t)},execute:t=>t.send(this._service),close:t=>{this._openBatches.get(s)===t&&this._openBatches.delete(s)}});return await x(t,h,e)}return await this._service.translate(e)}}}}function T(i){"async"===i.mode&&(i.functions[t("TranslateText")]=function(t,c){return i.standardFunctionAsync(t,c,(async(t,i,c)=>{if(n(c,2,3,t,i),!_(c[0])&&!d(c[0])&&!o(c[0]))throw new s(t,r.InvalidParameter,i);const l=a(c[0]);if(!_(c[1])&&!d(c[1])&&!o(c[1]))throw new s(t,r.InvalidParameter,i);const h=a(c[1]);let y=null;if(c.length>=3){if(!_(c[2]))throw new s(t,r.InvalidParameter,i);y=c[2]}const x=l.map(((t,e)=>new m({key:String(e),text:t}))),S=t.services?.portal??u.getDefault(),T=new f({to:h,contents:x,from:y,portalUrl:S.restUrl.replace(/\/sharing\/rest$/,"")}),v=new Map;let C=null;if(null!=t.lrucache){const e=t.lrucache;C??=w(T),T.contents=T.contents?.filter((t=>{const s=e.getCachedTranslation(C,t.text);return null==s||(v.set(t.key,{...s,key:t.key,text:t.text}),!1)}))}if(T.contents?.length){const n=t.services?.translation??new g(S,t.console),o=await n.translate(T);if(!o.success)return new e({__proto__:null,success:!1});for(const e of o.results){const n=T.contents?.find((t=>t.key===e.key))?.text;if(null==n)throw new s(null,r.NeverReach,null);v.set(e.key,e),null!=t.lrucache&&(C??=w(T),t.lrucache.setCachedTranslation(C,n,{detectedLanguage:e.detectedLanguage,translation:e.translation}))}}const j=Array.from(x,(n=>{const o=p.fromJSON(v.get(n.key));if(null==o)throw new s(null,r.NeverReach,null);return o.text=n.text,e.convertJsonToArcade(o.toJSON(),t.timeZone??"system",!0)}));return new e({__proto__:null,success:!0,results:j})}))})}const v=Object.freeze(Object.defineProperty({__proto__:null,BatchTranslationServiceFactory:S,PortalTranslationService:g,getTranslateParametersKey:w,registerFunctions:T},Symbol.toStringTag,{value:"Module"}));export{v as A,S as B,g as P,w as g,T as r};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{handlesGroup as r}from"../handleUtils.js";import{clone as t}from"../lang.js";function n(r){return r.__accessor__??null}function e(r,t){return null!=r?.metadata?.[t]}function i(r,t){const e=n(r);return e?e.getDependsInfo(r,t,""):""}function u(r,t,n){if(n){return a(r,t,{policy:n,path:""})}return a(r,t,null)}function a(r,n,e){return n?Object.keys(n).reduce(((r,i)=>{const u=i;let s=null,o="merge";if(e&&(s=e.path?`${e.path}.${i}`:i,o=e.policy(s)),"replace"===o)return r[u]=n[u],r;if("replace-arrays"===o&&Array.isArray(r[u]))return r[u]=n[u],r;if(void 0===r[u])return r[u]=t(n[u]),r;let c=r[u],l=n[u];if(c===l)return r;if(Array.isArray(l)||Array.isArray(r))c=c?Array.isArray(c)?r[u]=c.slice():r[u]=[c]:r[u]=[],l&&(Array.isArray(l)||(l=[l]),l.forEach((r=>{c.includes(r)||c.push(r)})));else if(l&&"object"==typeof l)if(e){const t=e.path;e.path=s,r[u]=a(c,l,e),e.path=t}else r[u]=a(c,l,null);else r.hasOwnProperty(i)&&!n.hasOwnProperty(i)||(r[u]=l);return r}),r||{}):r}function s(r){return Array.isArray(r)?r:r.split(".")}function o(r){return r.includes(",")?r.split(",").map((r=>r.trim())):[r.trim()]}function c(r){if(Array.isArray(r)){const t=[];for(const n of r)t.push(...o(n));return t}return o(r)}function l(t,n,e,i){const u=c(n);if(1!==u.length){const n=u.map((r=>i(t,r,e)));return r(n)}return i(t,u[0],e)}export{i as getDependsInfo,n as getProperties,e as isPropertyDeclared,u as merge,l as parse,s as pathToArray,c as splitPath};
5
+ import{handlesGroup as r}from"../handleUtils.js";import{clone as t}from"../lang.js";function n(r){return r.__accessor__??null}function e(r,t){return null!=r?.metadata?.[t]}function i(r,t){const e=n(r);return e?e.getDependsInfo(r,t,""):""}function u(r,t,n){if(n){return a(r,t,{policy:n,path:""})}return a(r,t,null)}function a(r,n,e){return n?Object.keys(n).reduce(((r,i)=>{const u=i;if("__proto__"===u)return r;let o=null,s="merge";if(e&&(o=e.path?`${e.path}.${i}`:i,s=e.policy(o)),"replace"===s)return r[u]=n[u],r;if("replace-arrays"===s&&Array.isArray(r[u]))return r[u]=n[u],r;if(void 0===r[u])return r[u]=t(n[u]),r;let c=r[u],l=n[u];if(c===l)return r;if(Array.isArray(l)||Array.isArray(r))c=c?Array.isArray(c)?r[u]=c.slice():r[u]=[c]:r[u]=[],l&&(Array.isArray(l)||(l=[l]),l.forEach((r=>{c.includes(r)||c.push(r)})));else if(l&&"object"==typeof l)if(e){const t=e.path;e.path=o,r[u]=a(c,l,e),e.path=t}else r[u]=a(c,l,null);else r.hasOwnProperty(i)&&!n.hasOwnProperty(i)||(r[u]=l);return r}),r||{}):r}function o(r){return Array.isArray(r)?r:r.split(".")}function s(r){return r.includes(",")?r.split(",").map((r=>r.trim())):[r.trim()]}function c(r){if(Array.isArray(r)){const t=[];for(const n of r)t.push(...s(n));return t}return s(r)}function l(t,n,e,i){const u=c(n);if(1!==u.length){const n=u.map((r=>i(t,r,e)));return r(n)}return i(t,u[0],e)}export{i as getDependsInfo,n as getProperties,e as isPropertyDeclared,u as merge,l as parse,o as pathToArray,c as splitPath};
package/core/object.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/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{clone as r}from"./lang.js";function n(r,n,t=!1){return f(r,n,t)}function t(r,n){if(null!=n)return n[r]||u(r.split("."),!1,n)}function e(r,n,t){const e=r.split("."),i=e.pop(),f=u(e,!0,t);f&&i&&(f[i]=n)}function i(r,n){if(null==r&&null==n)return!1;if(null==r)return!0;if(null==n)return!0;if("object"==typeof r){if(Array.isArray(r)){const t=n;if(r.length!==t.length)return!0;for(let n=0;n<r.length;n++)if(i(r[n],t[n]))return!0;return!1}if(Object.keys(r).length!==Object.keys(n).length)return!0;for(const t in r){if(i(r[t],n[t]))return!0}return!1}return r!==n}function u(r,n,t){let e=t;for(const i of r){if(null==e)return;if(!(i in e)){if(!n)return;e[i]={}}e=e[i]}return e}function f(n,t,e){return t?Object.keys(t).reduce(((n,i)=>{let u=n[i],l=t[i];return u===l?n:void 0===u?(n[i]=r(l),n):(Array.isArray(l)||Array.isArray(n)?(u=u?Array.isArray(u)?n[i]=u.slice():n[i]=[u]:n[i]=[],l&&(Array.isArray(l)||(l=[l]),e?l.forEach((r=>{u.includes(r)||u.push(r)})):n[i]=l.slice())):l&&"object"==typeof l?n[i]=f(u,l,e):n.hasOwnProperty(i)&&!t.hasOwnProperty(i)||(n[i]=l),n)}),n||{}):n}export{n as deepMerge,t as getDeepValue,i as notDeepEqual,e as setDeepValue};
5
+ import{clone as r}from"./lang.js";function n(r,n,t=!1){return f(r,n,t)}function t(r,n){if(null!=n)return n[r]||u(r.split("."),!1,n)}function e(r,n,t){const e=r.split("."),i=e.pop(),f=u(e,!0,t);f&&i&&(f[i]=n)}function i(r,n){if(null==r&&null==n)return!1;if(null==r)return!0;if(null==n)return!0;if("object"==typeof r){if(Array.isArray(r)){const t=n;if(r.length!==t.length)return!0;for(let n=0;n<r.length;n++)if(i(r[n],t[n]))return!0;return!1}if(Object.keys(r).length!==Object.keys(n).length)return!0;for(const t in r){if(i(r[t],n[t]))return!0}return!1}return r!==n}function u(r,n,t){let e=t;for(const i of r){if(null==e)return;if(!(i in e)){if(!n)return;e[i]={}}e=e[i]}return e}function f(n,t,e){return t?Object.keys(t).reduce(((n,i)=>{if("__proto__"===i)return n;let u=n[i],o=t[i];return u===o?n:void 0===u?(n[i]=r(o),n):(Array.isArray(o)||Array.isArray(n)?(u=u?Array.isArray(u)?n[i]=u.slice():n[i]=[u]:n[i]=[],o&&(Array.isArray(o)||(o=[o]),e?o.forEach((r=>{u.includes(r)||u.push(r)})):n[i]=o.slice())):o&&"object"==typeof o?n[i]=f(u,o,e):n.hasOwnProperty(i)&&!t.hasOwnProperty(i)||(n[i]=o),n)}),n||{}):n}export{n as deepMerge,t as getDeepValue,i as notDeepEqual,e as setDeepValue};
package/core/urlUtils.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/4.33/esri/copyright.txt for details.
4
4
  */
5
- import t from"../config.js";import{isSome as n}from"./arrayUtils.js";import e from"./Error.js";import r from"./Logger.js";import{isSerializable as o}from"./support/jsonUtils.js";import{parseKnownArcGISOnlineDomain as s}from"../portal/support/urlUtils.js";import{base64ToArrayBuffer as i,arrayBufferToBase64 as u}from"../support/base64Utils.js";const l=()=>r.getLogger("esri.core.urlUtils"),c=t.request,f="esri/config: esriConfig.request.proxyUrl is not set.",a=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,p=/^\s*http:/i,h=/^\s*https:/i,d=/^\s*file:/i,m=/:\d+$/,y=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,g=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),$=new RegExp("^((([^[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^[:]*))(:([0-9]+))?$");class x{constructor(t=""){this.uri=t,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let n=this.uri.match(g);this.scheme=n[2]||(n[1]?"":null),this.authority=n[4]||(n[3]?"":null),this.path=n[5],this.query=n[7]||(n[6]?"":null),this.fragment=n[9]||(n[8]?"":null),null!=this.authority&&(n=this.authority.match($),this.user=n[3]||null,this.password=n[4]||null,this.host=n[6]||n[7],this.port=n[9]||null)}toString(){return this.uri}}const w={},U=new x(t.applicationUrl);let O=U;const R=b();let q=R;const C=()=>O,j=()=>q;function b(){const t=O.path,n=t.slice(0,t.lastIndexOf("/")+1);return`${`${O.scheme}://${O.host}${null!=O.port?`:${O.port}`:""}`}${n}`}const L={setAppUrl:t=>O=t,setAppBaseUrl:t=>q=t,restoreUrls:()=>{O=U,q=R}};function I(t){if(!t)return null;const n={path:null,query:null},e=new x(t),r=t.indexOf("?");return null===e.query?n.path=t:(n.path=t.slice(0,r),n.query=A(e.query)),e.fragment&&(n.hash=e.fragment,null===e.query&&(n.path=n.path.slice(0,n.path.length-(e.fragment.length+1)))),n}function A(t){const n=t.split("&"),e={};for(const r of n){if(!r)continue;const t=r.indexOf("=");let n,o;t<0?(n=decodeURIComponent(r),o=""):(n=decodeURIComponent(r.slice(0,t)),o=decodeURIComponent(r.slice(t+1)));let s=e[n];"string"==typeof s&&(s=e[n]=[s]),Array.isArray(s)?s.push(o):e[n]=o}return e}function v(t,n){return t?n&&"function"==typeof n?Object.keys(t).map((e=>encodeURIComponent(e)+"="+encodeURIComponent(n(e,t[e])))).join("&"):Object.keys(t).map((e=>{const r=t[e];if(null==r)return"";const s=encodeURIComponent(e)+"=",i=n?.[e];return i?s+encodeURIComponent(i(r)):Array.isArray(r)?r.map((t=>o(t)?s+encodeURIComponent(JSON.stringify(t)):s+encodeURIComponent(t))).join("&"):o(r)?s+encodeURIComponent(JSON.stringify(r)):s+encodeURIComponent(r)})).filter((t=>t)).join("&"):""}function P(t=!1){let n,r=c.proxyUrl;if("string"==typeof t){n=dt(t);const e=T(t);e&&(r=e.proxyUrl)}else n=!!t;if(!r)throw l().warn(f),new e("urlUtils:proxy-not-set",f);n&&wt()&&(r=$t(r));return I(r)}function k(t,n=!1){const e=T(t);let r,o;if(e){const t=S(e.proxyUrl);r=t.path,o=t.query?A(t.query):null}else if(n){const n=P(t);r=n.path,o=n.query}if(r){const n=I(t);t=r+"?"+n.path;const e=v({...o,...n.query});e&&(t=`${t}?${e}`)}return t}const E={path:"",query:""};function S(t){const n=t.indexOf("?");return-1!==n?(E.path=t.slice(0,n),E.query=t.slice(n+1)):(E.path=t,E.query=null),E}function B(t){return t=(t=Ut(t=Ct(t=S(t).path),!0)).toLowerCase()}function H(t){const n={proxyUrl:t.proxyUrl,urlPrefix:B(t.urlPrefix)},e=c.proxyRules,r=n.urlPrefix;let o=e.length;for(let s=0;s<e.length;s++){const t=e[s].urlPrefix;if(0===r.indexOf(t)){if(r.length===t.length)return-1;o=s;break}0===t.indexOf(r)&&(o=s+1)}return e.splice(o,0,n),o}function T(t){const n=c.proxyRules,e=B(t);for(let r=0;r<n.length;r++)if(0===e.indexOf(n[r].urlPrefix))return n[r]}function W(t,n){if(!t||!n)return!1;t=J(t),n=J(n);const e=s(t),r=s(n);return null!=e&&null!=r?e.portalHostname===r.portalHostname:null==e&&null==r&&F(t,n,!0)}function z(t,n){if(!t||!n)return!1;t=J(t),n=J(n);const e=s(t),r=s(n);return null!=e&&null!=r&&e.portalHostname===r.portalHostname}function D(t,n){return t=J(t),n=J(n),Ut(t)===Ut(n)}function J(t){const n=(t=K(t)).indexOf("/sharing");return n>0?t.slice(0,n):t.replace(/\/+$/,"")}function N(t,n=c.interceptors){const e=n=>n instanceof RegExp?n.test(t):"string"==typeof n?t.startsWith(n):null==n;if(n)for(const r of n)if(Array.isArray(r.urls)){if(r.urls.some(e))return r}else if(e(r.urls))return r;return null}function F(t,n,e=!1){if(!t||!n)return!1;const r=Pt(t),o=Pt(n);return!(!e&&r.scheme!==o.scheme)&&(null!=r.host&&null!=o.host&&(r.host.toLowerCase()===o.host.toLowerCase()&&r.port===o.port))}function M(t){if("string"==typeof t){if(!Y(t))return!0;t=Pt(t)}if(F(t,O))return!0;const n=c.trustedServers||[];for(let e=0;e<n.length;e++){const r=Q(n[e]);for(let n=0;n<r.length;n++)if(F(t,r[n]))return!0}return!1}function Q(t){return w[t]||(ht(t)||pt(t)?w[t]=[new x(_(t))]:w[t]=[new x(`http://${t}`),new x(`https://${t}`)]),w[t]}function _(t,n=q,e){return pt(t)?e?.preserveProtocolRelative?t:"http"===O.scheme&&O.authority===X(t).slice(2)?`http:${t}`:`https:${t}`:ht(t)?t:V("/"===t[0]?Ot(n):n,t)}function G(t,n=q,e){if(null==t||!Y(t))return t;const r=K(t),o=r.toLowerCase(),s=K(n).toLowerCase().replace(/\/+$/,""),i=e?K(e).toLowerCase().replace(/\/+$/,""):null;if(i&&0!==s.indexOf(i))return t;const u=(t,n,e)=>-1===(e=t.indexOf(n,e))?t.length:e;let l=u(o,"/",o.indexOf("//")+2),c=-1;for(;o.slice(0,l+1)===s.slice(0,l)+"/"&&(c=l+1,l!==o.length);)l=u(o,"/",l+1);if(-1===c)return t;if(i&&c<i.length)return t;t=r.slice(c);const f=s.slice(c-1).replaceAll(/[^/]+/g,"").length;if(f>0)for(let a=0;a<f;a++)t=`../${t}`;else t=`./${t}`;return t}function K(t){return t=It(t=Lt(t=bt(t=_(t=t.trim()))))}function V(...t){const e=t.filter(n);if(!e?.length)return;const r=[];if(Y(e[0])){const t=e[0],n=t.indexOf("//");-1!==n&&(r.push(t.slice(0,n+1)),yt(e[0])&&(r[0]+="/"),e[0]=t.slice(n+2))}else"/"===e[0][0]&&r.push("");const o=e.reduce(((t,n)=>n?t.concat(n.split("/")):t),[]);for(let n=0;n<o.length;n++){const t=o[n];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&n===o.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function X(t,n=!1){if(null==t||Z(t)||tt(t))return null;let e=t.indexOf("://");if(-1===e&&pt(t))e=2;else{if(-1===e)return null;e+=3}const r=t.indexOf("/",e);return-1!==r&&(t=t.slice(0,r)),n&&(t=Ut(t,!0)),t}function Y(t){return pt(t)||ht(t)}function Z(t){return null!=t&&"blob:"===t.slice(0,5)}function tt(t){return null!=t&&"data:"===t.slice(0,5)}function nt(t){const n=ot(t);return n?.isBase64?i(n.data):null}function et(t){return u(t).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}const rt=/^data:(.*?)(;base64)?,(.*)$/;function ot(t){const n=t.match(rt);if(!n)return null;const[,e,r,o]=n;return{mediaType:e,isBase64:!!r,data:o}}function st(t){return t.isBase64?`data:${t.mediaType};base64,${t.data}`:`data:${t.mediaType},${t.data}`}async function it(t){return(await fetch(t)).blob()}function ut(t){const n=nt(t);if(!n)return null;const e=ot(t);return new Blob([n],{type:e.mediaType})}function lt(t,n){ft(t,n)}function ct(t,n){at(t,n)}function ft(t,n){const e=ut(t);return!!e&&at(e,n)}function at(t,n){if(!t)return!1;const e=document.createElement("a");if(!("download"in e))return!1;const r=URL.createObjectURL(t);return e.download=n,e.href=r,e.style.display="none",document.body.appendChild(e),e.click(),document.body.removeChild(e),URL.revokeObjectURL(r),!0}function pt(t){return null!=t&&"/"===t[0]&&"/"===t[1]}function ht(t){return null!=t&&a.test(t)}function dt(t){return null!=t&&h.test(t)||"https"===O.scheme&&pt(t)}function mt(t){return null!=t&&p.test(t)||"http"===O.scheme&&pt(t)}function yt(t){return null!=t&&d.test(t)}function gt(t){return pt(t)?`http:${t}`:t.replace(h,"http:")}function $t(t){return pt(t)?`https:${t}`:t.replace(p,"https:")}function xt(){return"http"===O.scheme}function wt(){return"https"===O.scheme}function Ut(t,n=!1){return pt(t)?t.slice(2):(t=t.replace(a,""),n&&t.length>1&&"/"===t[0]&&"/"===t[1]&&(t=t.slice(2)),t)}function Ot(t){const n=t.indexOf("//"),e=t.indexOf("/",n+2);return-1===e?t:t.slice(0,e)}function Rt(t){let n=0;if(Y(t)){const e=t.indexOf("//");-1!==e&&(n=e+2)}const e=t.lastIndexOf("/");return e<n?t:t.slice(0,e+1)}function qt(t,n){if(!t)return"";const e=I(t).path.replace(/\/+$/,""),r=e.slice(e.lastIndexOf("/")+1);if(!n?.length)return r;const o=new RegExp(`\\.(${n.join("|")})$`,"i");return r.replace(o,"")}function Ct(t){return t.endsWith("/")?t:`${t}/`}function jt(t){return t.replace(/\/+$/,"")}function bt(t){if(/^https?:\/\//i.test(t)){const n=S(t);t=(t=n.path.replaceAll(/\/{2,}/g,"/")).replace("/","//"),n.query&&(t+=`?${n.query}`)}return t}function Lt(t){return t.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}function It(t){const n=c.httpsDomains;if(!mt(t))return t;const e=t.indexOf("/",7);let r;if(r=-1===e?t:t.slice(0,e),r=r.toLowerCase().slice(7),m.test(r)){if(!r.endsWith(":80"))return t;r=r.slice(0,-3),t=t.replace(":80","")}return xt()&&r===O.authority&&!y.test(t)||(wt()&&r===O.authority||n&&n.some((t=>r===t||r.endsWith(`.${t}`)))||wt()&&!T(t))&&(t=$t(t)),t}function At(t,n,e){if(!(n&&e&&t&&Y(t)))return t;const r=t.indexOf("//"),o=t.indexOf("/",r+2),s=t.indexOf(":",r+2),i=Math.min(o<0?t.length:o,s<0?t.length:s);if(t.slice(r+2,i).toLowerCase()!==n.toLowerCase())return t;return`${t.slice(0,r+2)}${e}${t.slice(i)}`}function vt(t,n){const e=new URL(t);return e.host=n,e.port&&!m.test(n)&&(e.port=""),e.toString()}function Pt(t){return"string"==typeof t?new x(_(t)):(t.scheme||(t.scheme=O.scheme),t)}function kt(t){return Jt.test(t)}function Et(t,n){const e=I(t),r=Object.keys(e.query||{});return r.length>0&&n&&n.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${r.join(", ")}.`),e.path}function St(t,n,e){const r=I(t),o=r.query||{};return o[n]=String(e),`${r.path}?${v(o)}`}function Bt(t,n){if(!n)return t;const e=I(t),r=e.query||{};for(const[s,i]of Object.entries(n))null!=i&&(r[s]=i);const o=v(r);return o?`${e.path}?${o}`:e.path}function Ht(t,n){const{path:e,query:r}=I(t);if(!r)return t;delete r[n];const o=v(r);return o?`${e}?${o}`:e}function Tt(t){if(null==t)return null;const n=t.match(Dt);return n?n[2]:null}function Wt(t){if(null==t)return null;const n=t.match(Dt);return n?{path:n[1],extension:n[2]}:{path:t,extension:null}}async function zt(t){if("string"==typeof t){return ot(t)??{data:t}}return new Promise(((n,e)=>{const r=new FileReader;r.readAsDataURL(t),r.onload=()=>n(ot(r.result)),r.onerror=t=>e(t)}))}const Dt=/([^.]*)\.([^/]*)$/,Jt=/(^data:image\/svg|\.svg$)/i;export{x as Url,k as addProxy,H as addProxyRule,St as addQueryParameter,Bt as addQueryParameters,et as base64UrlEncode,it as blobUrlToBlob,At as changeDomain,vt as changeHost,ot as dataComponents,nt as dataToArrayBuffer,ut as dataToBlob,ct as downloadBlobAsFile,lt as downloadDataAsFile,Ct as ensureTrailingSlash,j as getAppBaseUrl,C as getAppUrl,qt as getFilename,N as getInterceptor,X as getOrigin,Tt as getPathExtension,T as getProxyRule,P as getProxyUrl,ht as hasProtocol,z as hasSameCanonicalArcGISOnlinePortal,W as hasSameCanonicalPortal,F as hasSameOrigin,D as hasSamePortal,Y as isAbsolute,wt as isAppHTTPS,Z as isBlobProtocol,tt as isDataProtocol,dt as isHTTPSProtocol,pt as isProtocolRelative,kt as isSVG,M as isTrustedServer,V as join,_ as makeAbsolute,st as makeData,G as makeRelative,K as normalize,v as objectToQuery,zt as parseData,A as queryToObject,Rt as removeFile,Ht as removeQueryParameter,Et as removeQueryParameters,jt as removeTrailingSlash,Wt as splitPathExtension,L as test,gt as toHTTP,$t as toHTTPS,w as trustedServersUrlCache,I as urlToObject};
5
+ import t from"../config.js";import{isSome as n}from"./arrayUtils.js";import e from"./Error.js";import r from"./Logger.js";import{isSerializable as o}from"./support/jsonUtils.js";import{parseKnownArcGISOnlineDomain as s}from"../portal/support/urlUtils.js";import{base64ToArrayBuffer as i,arrayBufferToBase64 as u}from"../support/base64Utils.js";const l=()=>r.getLogger("esri.core.urlUtils"),c=t.request,f="esri/config: esriConfig.request.proxyUrl is not set.",a=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,p=/^\s*http:/i,h=/^\s*https:/i,d=/^\s*file:/i,m=/:\d+$/,y=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,g=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),$=new RegExp("^((([^[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^[:]*))(:([0-9]+))?$");class x{constructor(t=""){this.uri=t,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let n=this.uri.match(g);this.scheme=n[2]||(n[1]?"":null),this.authority=n[4]||(n[3]?"":null),this.path=n[5],this.query=n[7]||(n[6]?"":null),this.fragment=n[9]||(n[8]?"":null),null!=this.authority&&(n=this.authority.match($),this.user=n[3]||null,this.password=n[4]||null,this.host=n[6]||n[7],this.port=n[9]||null)}toString(){return this.uri}}const w={},U=new x(t.applicationUrl);let O=U;const R=b();let q=R;const C=()=>O,j=()=>q;function b(){const t=O.path,n=t.slice(0,t.lastIndexOf("/")+1);return`${`${O.scheme}://${O.host}${null!=O.port?`:${O.port}`:""}`}${n}`}const L={setAppUrl:t=>O=t,setAppBaseUrl:t=>q=t,restoreUrls:()=>{O=U,q=R}};function I(t){if(!t)return null;const n={path:null,query:null},e=new x(t),r=t.indexOf("?");return null===e.query?n.path=t:(n.path=t.slice(0,r),n.query=A(e.query)),e.fragment&&(n.hash=e.fragment,null===e.query&&(n.path=n.path.slice(0,n.path.length-(e.fragment.length+1)))),n}function A(t){const n=t.split("&"),e={};for(const r of n){if(!r)continue;const t=r.indexOf("=");let n,o;t<0?(n=decodeURIComponent(r),o=""):(n=decodeURIComponent(r.slice(0,t)),o=decodeURIComponent(r.slice(t+1)));let s=e[n];"string"==typeof s&&(s=e[n]=[s]),Array.isArray(s)?s.push(o):e[n]=o}return e}function v(t,n){return t?n&&"function"==typeof n?Object.keys(t).map((e=>encodeURIComponent(e)+"="+encodeURIComponent(n(e,t[e])))).join("&"):Object.keys(t).map((e=>{const r=t[e];if(null==r)return"";const s=encodeURIComponent(e)+"=",i=n?.[e];return i?s+encodeURIComponent(i(r)):Array.isArray(r)?r.map((t=>o(t)?s+encodeURIComponent(JSON.stringify(t)):s+encodeURIComponent(t))).join("&"):o(r)?s+encodeURIComponent(JSON.stringify(r)):s+encodeURIComponent(r)})).filter((t=>t)).join("&"):""}function P(t=!1){let n,r=c.proxyUrl;if("string"==typeof t){n=dt(t);const e=T(t);e&&(r=e.proxyUrl)}else n=!!t;if(!r)throw l().warn(f),new e("urlUtils:proxy-not-set",f);n&&wt()&&(r=$t(r));return I(r)}function k(t,n=!1){const e=T(t);let r,o;if(e){const t=S(e.proxyUrl);r=t.path,o=t.query?A(t.query):null}else if(n){const n=P(t);r=n.path,o=n.query}if(r){const n=I(t);t=r+"?"+n.path;const e=v({...o,...n.query});e&&(t=`${t}?${e}`)}return t}const E={path:"",query:""};function S(t){const n=t.indexOf("?");return-1!==n?(E.path=t.slice(0,n),E.query=t.slice(n+1)):(E.path=t,E.query=null),E}function B(t){return t=(t=Ut(t=Ct(t=S(t).path),!0)).toLowerCase()}function H(t){const n={proxyUrl:t.proxyUrl,urlPrefix:B(t.urlPrefix)},e=c.proxyRules,r=n.urlPrefix;let o=e.length;for(let s=0;s<e.length;s++){const t=e[s].urlPrefix;if(0===r.indexOf(t)){if(r.length===t.length)return-1;o=s;break}0===t.indexOf(r)&&(o=s+1)}return e.splice(o,0,n),o}function T(t){const n=c.proxyRules,e=B(t);for(let r=0;r<n.length;r++)if(0===e.indexOf(n[r].urlPrefix))return n[r]}function W(t,n){if(!t||!n)return!1;t=J(t),n=J(n);const e=s(t),r=s(n);return null!=e&&null!=r?e.portalHostname===r.portalHostname:null==e&&null==r&&F(t,n,!0)}function z(t,n){if(!t||!n)return!1;t=J(t),n=J(n);const e=s(t),r=s(n);return null!=e&&null!=r&&e.portalHostname===r.portalHostname}function D(t,n){return t=J(t),n=J(n),Ut(t)===Ut(n)}function J(t){const n=(t=K(t)).indexOf("/sharing");return n>0?t.slice(0,n):t.replace(/\/+$/,"")}function N(t,n=c.interceptors){const e=n=>n instanceof RegExp?n.test(t):"string"==typeof n?t.startsWith(n):null==n;if(n)for(const r of n)if(Array.isArray(r.urls)){if(r.urls.some(e))return r}else if(e(r.urls))return r;return null}function F(t,n,e=!1){if(!t||!n)return!1;const r=kt(t),o=kt(n);return!(!e&&r.scheme!==o.scheme)&&(null!=r.host&&null!=o.host&&(r.host.toLowerCase()===o.host.toLowerCase()&&r.port===o.port))}function M(t){if("string"==typeof t){if(!Y(t))return!0;t=kt(t)}if(F(t,O))return!0;const n=c.trustedServers||[];for(let e=0;e<n.length;e++){const r=Q(n[e]);for(let n=0;n<r.length;n++)if(F(t,r[n]))return!0}return!1}function Q(t){return w[t]||(ht(t)||pt(t)?w[t]=[new x(_(t))]:w[t]=[new x(`http://${t}`),new x(`https://${t}`)]),w[t]}function _(t,n=q,e){return pt(t)?e?.preserveProtocolRelative?t:"http"===O.scheme&&O.authority===X(t).slice(2)?`http:${t}`:`https:${t}`:ht(t)?t:V("/"===t[0]?Ot(n):n,t)}function G(t,n=q,e){if(null==t||!Y(t))return t;const r=K(t),o=r.toLowerCase(),s=K(n).toLowerCase().replace(/\/+$/,""),i=e?K(e).toLowerCase().replace(/\/+$/,""):null;if(i&&0!==s.indexOf(i))return t;const u=(t,n,e)=>-1===(e=t.indexOf(n,e))?t.length:e;let l=u(o,"/",o.indexOf("//")+2),c=-1;for(;o.slice(0,l+1)===s.slice(0,l)+"/"&&(c=l+1,l!==o.length);)l=u(o,"/",l+1);if(-1===c)return t;if(i&&c<i.length)return t;t=r.slice(c);const f=s.slice(c-1).replaceAll(/[^/]+/g,"").length;if(f>0)for(let a=0;a<f;a++)t=`../${t}`;else t=`./${t}`;return t}function K(t){return t=It(t=Lt(t=bt(t=_(t=t.trim()))))}function V(...t){const e=t.filter(n);if(!e?.length)return;const r=[];if(Y(e[0])){const t=e[0],n=t.indexOf("//");-1!==n&&(r.push(t.slice(0,n+1)),yt(e[0])&&(r[0]+="/"),e[0]=t.slice(n+2))}else"/"===e[0][0]&&r.push("");const o=e.reduce(((t,n)=>n?t.concat(n.split("/")):t),[]);for(let n=0;n<o.length;n++){const t=o[n];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&n===o.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function X(t,n=!1){if(null==t||Z(t)||tt(t))return null;let e=t.indexOf("://");if(-1===e&&pt(t))e=2;else{if(-1===e)return null;e+=3}const r=t.indexOf("/",e);return-1!==r&&(t=t.slice(0,r)),n&&(t=Ut(t,!0)),t}function Y(t){return pt(t)||ht(t)}function Z(t){return null!=t&&"blob:"===t.slice(0,5)}function tt(t){return null!=t&&"data:"===t.slice(0,5)}function nt(t){const n=ot(t);return n?.isBase64?i(n.data):null}function et(t){return u(t).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}const rt=/^data:(.*?)(;base64)?,(.*)$/;function ot(t){const n=t.match(rt);if(!n)return null;const[,e,r,o]=n;return{mediaType:e,isBase64:!!r,data:o}}function st(t){return t.isBase64?`data:${t.mediaType};base64,${t.data}`:`data:${t.mediaType},${t.data}`}async function it(t){return(await fetch(t)).blob()}function ut(t){const n=nt(t);if(!n)return null;const e=ot(t);return new Blob([n],{type:e.mediaType})}function lt(t,n){ft(t,n)}function ct(t,n){at(t,n)}function ft(t,n){const e=ut(t);return!!e&&at(e,n)}function at(t,n){if(!t)return!1;const e=document.createElement("a");if(!("download"in e))return!1;const r=URL.createObjectURL(t);return e.download=n,e.href=r,e.style.display="none",document.body.appendChild(e),e.click(),document.body.removeChild(e),URL.revokeObjectURL(r),!0}function pt(t){return null!=t&&"/"===t[0]&&"/"===t[1]}function ht(t){return null!=t&&a.test(t)}function dt(t){return null!=t&&h.test(t)||"https"===O.scheme&&pt(t)}function mt(t){return null!=t&&p.test(t)||"http"===O.scheme&&pt(t)}function yt(t){return null!=t&&d.test(t)}function gt(t){return pt(t)?`http:${t}`:t.replace(h,"http:")}function $t(t){return pt(t)?`https:${t}`:t.replace(p,"https:")}function xt(){return"http"===O.scheme}function wt(){return"https"===O.scheme}function Ut(t,n=!1){return pt(t)?t.slice(2):(t=t.replace(a,""),n&&t.length>1&&"/"===t[0]&&"/"===t[1]&&(t=t.slice(2)),t)}function Ot(t){const n=t.indexOf("//"),e=t.indexOf("/",n+2);return-1===e?t:t.slice(0,e)}function Rt(t){let n=0;if(Y(t)){const e=t.indexOf("//");-1!==e&&(n=e+2)}const e=t.lastIndexOf("/");return e<n?t:t.slice(0,e+1)}function qt(t,n){if(!t)return"";const e=I(t).path.replace(/\/+$/,""),r=e.slice(e.lastIndexOf("/")+1);if(!n?.length)return r;const o=new RegExp(`\\.(${n.join("|")})$`,"i");return r.replace(o,"")}function Ct(t){return t.endsWith("/")?t:`${t}/`}function jt(t){return t.replace(/\/+$/,"")}function bt(t){if(/^https?:\/\//i.test(t)){const n=S(t);t=(t=n.path.replaceAll(/\/{2,}/g,"/")).replace("/","//"),n.query&&(t+=`?${n.query}`)}return t}function Lt(t){return t.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}function It(t){const n=c.httpsDomains;if(!mt(t))return t;const e=t.indexOf("/",7);let r;if(r=-1===e?t:t.slice(0,e),r=r.toLowerCase().slice(7),m.test(r)){if(!r.endsWith(":80"))return t;r=r.slice(0,-3),t=t.replace(":80","")}return xt()&&r===O.authority&&!y.test(t)||(wt()&&r===O.authority||n&&n.some((t=>r===t||r.endsWith(`.${t}`)))||wt()&&!T(t))&&(t=$t(t)),t}function At(t,n,e){if(!(n&&e&&t&&Y(t)))return t;const r=t.indexOf("//"),o=t.indexOf("/",r+2),s=t.indexOf(":",r+2),i=Math.min(o<0?t.length:o,s<0?t.length:s);if(t.slice(r+2,i).toLowerCase()!==n.toLowerCase())return t;return`${t.slice(0,r+2)}${e}${t.slice(i)}`}function vt(t,n){const e=new URL(t);return e.host=n,e.port&&!m.test(n)&&(e.port=""),e.toString()}function Pt(t){return new URL(t).host}function kt(t){return"string"==typeof t?new x(_(t)):(t.scheme||(t.scheme=O.scheme),t)}function Et(t){return Nt.test(t)}function St(t,n){const e=I(t),r=Object.keys(e.query||{});return r.length>0&&n&&n.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${r.join(", ")}.`),e.path}function Bt(t,n,e){const r=I(t),o=r.query||{};return o[n]=String(e),`${r.path}?${v(o)}`}function Ht(t,n){if(!n)return t;const e=I(t),r=e.query||{};for(const[s,i]of Object.entries(n))null!=i&&(r[s]=i);const o=v(r);return o?`${e.path}?${o}`:e.path}function Tt(t,n){const{path:e,query:r}=I(t);if(!r)return t;delete r[n];const o=v(r);return o?`${e}?${o}`:e}function Wt(t){if(null==t)return null;const n=t.match(Jt);return n?n[2]:null}function zt(t){if(null==t)return null;const n=t.match(Jt);return n?{path:n[1],extension:n[2]}:{path:t,extension:null}}async function Dt(t){if("string"==typeof t){return ot(t)??{data:t}}return new Promise(((n,e)=>{const r=new FileReader;r.readAsDataURL(t),r.onload=()=>n(ot(r.result)),r.onerror=t=>e(t)}))}const Jt=/([^.]*)\.([^/]*)$/,Nt=/(^data:image\/svg|\.svg$)/i;export{x as Url,k as addProxy,H as addProxyRule,Bt as addQueryParameter,Ht as addQueryParameters,et as base64UrlEncode,it as blobUrlToBlob,At as changeDomain,vt as changeHost,ot as dataComponents,nt as dataToArrayBuffer,ut as dataToBlob,ct as downloadBlobAsFile,lt as downloadDataAsFile,Ct as ensureTrailingSlash,j as getAppBaseUrl,C as getAppUrl,qt as getFilename,Pt as getHost,N as getInterceptor,X as getOrigin,Wt as getPathExtension,T as getProxyRule,P as getProxyUrl,ht as hasProtocol,z as hasSameCanonicalArcGISOnlinePortal,W as hasSameCanonicalPortal,F as hasSameOrigin,D as hasSamePortal,Y as isAbsolute,wt as isAppHTTPS,Z as isBlobProtocol,tt as isDataProtocol,dt as isHTTPSProtocol,pt as isProtocolRelative,Et as isSVG,M as isTrustedServer,V as join,_ as makeAbsolute,st as makeData,G as makeRelative,K as normalize,v as objectToQuery,Dt as parseData,A as queryToObject,Rt as removeFile,Tt as removeQueryParameter,St as removeQueryParameters,jt as removeTrailingSlash,zt as splitPathExtension,L as test,gt as toHTTP,$t as toHTTPS,w as trustedServersUrlCache,I as urlToObject};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{correctZandMFollowingBuffer as t,makeFeatureFromGroupPart as e}from"./support/builderUtils.js";import{isPolygon as r}from"../support/executorUtils.js";import{e as s}from"../../../../chunks/bufferOperator.js";function o({templatePart:o,shape:i,edits:p,relationships:a,mode:n}){if(!r(i))return;const u=o.builderConfig?.distanceValue??0;if(u<=0)return;const m=t(s(i,u),i);m&&e({templatePart:o,shape:m,edits:p,relationships:a,mode:n})}const i=!1;export{o as execute,i as isAsync};
5
+ import{correctZandMFollowingBuffer as t,makeFeatureFromGroupPart as e}from"./support/builderUtils.js";import{isPolygon as r}from"../support/executorUtils.js";import{e as s}from"../../../../chunks/bufferOperator.js";function o({templatePart:o,shape:i,edits:p,relationships:a,mode:m}){if(!r(i))return;const n=o.builderConfig?.distanceValue??0,u=t(s(i,n),i);u&&e({templatePart:o,shape:u,edits:p,relationships:a,mode:m})}const i=!1;export{o as execute,i as isAsync};
package/interfaces.d.ts CHANGED
@@ -1059,7 +1059,7 @@ declare namespace __esri {
1059
1059
  */
1060
1060
  width: number;
1061
1061
  /**
1062
- * Provides the shape definition of a slice plane for a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slice.html Slice} widget
1062
+ * Provides the shape definition of a slice plane for a {@link https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-slice/ Slice component}
1063
1063
  * or {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-SliceAnalysis.html SliceAnalysis}.
1064
1064
  *
1065
1065
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-SlicePlane.html Read more...}
@@ -2001,6 +2001,25 @@ declare namespace __esri {
2001
2001
  relationshipsUrl?: string;
2002
2002
  }
2003
2003
 
2004
+ /**
2005
+ * Note: reserved for internal use only, this is not part of the stable public API.
2006
+ *
2007
+ * General layer utilities for the map viewer application.
2008
+ */
2009
+ interface layerUtils {
2010
+ /**
2011
+ * Note: reserved for internal use only, this is not part of the stable public API.
2012
+ *
2013
+ * Returns `true` if the layer url has been modified from its initial value to use the preferred host
2014
+ * advertised in its metadata via `preferredHost` property.
2015
+ *
2016
+ * @param layer The layer to check.
2017
+ */
2018
+ isUrlHostModified(layer: any): boolean;
2019
+ }
2020
+
2021
+ export const layerUtils: layerUtils;
2022
+
2004
2023
  /**
2005
2024
  * Note: reserved for internal use only, this is not part of the stable public API.
2006
2025
  *
@@ -2174,7 +2193,7 @@ declare namespace __esri {
2174
2193
  *
2175
2194
  * Various layer utilities for the Scene Viewer application.
2176
2195
  */
2177
- interface layerUtils {
2196
+ interface SceneViewerLayerUtils {
2178
2197
  /**
2179
2198
  * Note: reserved for internal use only, this is not part of the stable public API.
2180
2199
  *
@@ -2197,7 +2216,7 @@ declare namespace __esri {
2197
2216
  revertLayerProperty(layer: OperationalLayer, property: string, origin: "service" | "portal-item" | "web-scene" | "web-map" | "link-chart"): void;
2198
2217
  }
2199
2218
 
2200
- export const layerUtils: layerUtils;
2219
+ export const SceneViewerLayerUtils: SceneViewerLayerUtils;
2201
2220
 
2202
2221
  /**
2203
2222
  * Note: reserved for internal use only, this is not part of the stable public API.
@@ -21845,7 +21864,7 @@ declare namespace __esri {
21845
21864
  * @param width The width of the image in pixels.
21846
21865
  * @param height The height of the image in pixels.
21847
21866
  * @param options The parameter options is an object with the following properties.
21848
- * @deprecated since version 4.33. Use {@link module:esri/layers/ImageryLayer#fetchPixels} instead.
21867
+ * @deprecated since version 4.33. Use {@link module:esri/layers/ImageryLayer#fetchPixels ImagerLayer.fetchPixels} instead.
21849
21868
  *
21850
21869
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#fetchImage Read more...}
21851
21870
  */
@@ -25859,7 +25878,7 @@ declare namespace __esri {
25859
25878
  * @param width The width of the image in pixels.
25860
25879
  * @param height The height of the image in pixels.
25861
25880
  * @param options The parameter options is an object with the following properties.
25862
- * @deprecated since version 4.33. Use {@link module:esri/layers/ImageryLayer#fetchPixels} instead.
25881
+ * @deprecated since version 4.33. Use {@link module:esri/layers/ImageryLayer#fetchPixels ImagerLayer.fetchPixels} instead.
25863
25882
  *
25864
25883
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#fetchImage Read more...}
25865
25884
  */
@@ -40396,7 +40415,7 @@ declare namespace __esri {
40396
40415
  */
40397
40416
  constructor(properties?: SublayerProperties);
40398
40417
  /**
40399
- * The {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-tables-AttributeTableTemplate.html template} used to configure an associated layer's {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html FeatureTable}.
40418
+ * This property is used to configure the associated layer's {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html FeatureTable}.
40400
40419
  *
40401
40420
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#attributeTableTemplate Read more...}
40402
40421
  */
@@ -40608,7 +40627,7 @@ declare namespace __esri {
40608
40627
 
40609
40628
  interface SublayerProperties extends LoadableProperties, IdentifiableProperties {
40610
40629
  /**
40611
- * The {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-tables-AttributeTableTemplate.html template} used to configure an associated layer's {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html FeatureTable}.
40630
+ * This property is used to configure the associated layer's {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html FeatureTable}.
40612
40631
  *
40613
40632
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#attributeTableTemplate Read more...}
40614
40633
  */
@@ -66922,7 +66941,7 @@ declare namespace __esri {
66922
66941
  */
66923
66942
  valueType: "integer" | "string" | nullish;
66924
66943
  /**
66925
- * AttributeBinsGrouping is a class that defines the `stackBy` or `splitBy` parameter in the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-AttributeBinsQuery.html#binParameters AttributeBinsQuery}.
66944
+ * AttributeBinsGrouping is a class that defines the `stackBy` or `splitBy` parameter in the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-AttributeBinsQuery.html#binParameters binParameters}.
66926
66945
  *
66927
66946
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-AttributeBinsGrouping.html Read more...}
66928
66947
  */
@@ -76454,7 +76473,7 @@ declare namespace __esri {
76454
76473
  */
76455
76474
  transformForward: boolean | nullish;
76456
76475
  /**
76457
- * Defines the projection parameters used when calling the
76476
+ * Defines the projection parameters used when calling
76458
76477
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-geometryService.html#project geometryService.project()}.
76459
76478
  *
76460
76479
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ProjectParameters.html Read more...}
@@ -92693,7 +92712,7 @@ declare namespace __esri {
92693
92712
  */
92694
92713
  context: WebGL2RenderingContext;
92695
92714
  /**
92696
- * The array of module:esri/views/2d/layers/BaseLayerViewGL2D#Tile objects computed to cover the MapView's visible area.
92715
+ * The array of BaseLayerViewGL2D Tile objects computed to cover the MapView's visible area.
92697
92716
  *
92698
92717
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#tiles Read more...}
92699
92718
  */
@@ -92787,7 +92806,7 @@ declare namespace __esri {
92787
92806
  /**
92788
92807
  * Tessellate a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html Polygon} into triangles.
92789
92808
  *
92790
- * @param polygon The input geometry. *The geometry must be simple*; if the input geometry is not simple, you must first create a simplified version of it using {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#simplify geometryEngine}, and pass the simplified geometry to `tessellatePolygon`.
92809
+ * @param polygon The input geometry. *The geometry must be simple*; if the input geometry is not simple, you must first create a simplified version of it using {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#simplify geometryEngine.simplify}, and pass the simplified geometry to `tessellatePolygon`.
92791
92810
  *
92792
92811
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#tessellatePolygon Read more...}
92793
92812
  */
@@ -92795,7 +92814,7 @@ declare namespace __esri {
92795
92814
  /**
92796
92815
  * Tessellate a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html Polyline} into triangles.
92797
92816
  *
92798
- * @param polyline The input geometry. *The geometry must be simple*; if the input geometry is not simple, you must first create a simplified version of it using {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#simplify geometryEngine}, and pass the simplified geometry to `tessellatePolyline`.
92817
+ * @param polyline The input geometry. *The geometry must be simple*; if the input geometry is not simple, you must first create a simplified version of it using {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#simplify geometryEngine.simplify}, and pass the simplified geometry to `tessellatePolyline`.
92799
92818
  * @param width The width of the line; this will be used to scale xOffset and yOffset.
92800
92819
  *
92801
92820
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#tessellatePolyline Read more...}
@@ -92820,7 +92839,7 @@ declare namespace __esri {
92820
92839
  */
92821
92840
  context?: WebGL2RenderingContext;
92822
92841
  /**
92823
- * The array of module:esri/views/2d/layers/BaseLayerViewGL2D#Tile objects computed to cover the MapView's visible area.
92842
+ * The array of BaseLayerViewGL2D Tile objects computed to cover the MapView's visible area.
92824
92843
  *
92825
92844
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#tiles Read more...}
92826
92845
  */
@@ -93252,7 +93271,7 @@ declare namespace __esri {
93252
93271
  readonly intersectedLocation: Point | nullish;
93253
93272
  /**
93254
93273
  * Represents a target in a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-LineOfSightAnalysis.html LineOfSightAnalysis} which is used to calculate the visibility
93255
- * from the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-LineOfSightAnalysis.html#observer LineOfSightAnalysis}.
93274
+ * from the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-LineOfSightAnalysis.html#observer observer}.
93256
93275
  *
93257
93276
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-LineOfSightAnalysisResult.html#target Read more...}
93258
93277
  */
@@ -104840,6 +104859,13 @@ declare namespace __esri {
104840
104859
  */
104841
104860
  get elements(): SlideElements | nullish;
104842
104861
  set elements(value: SlideElementsProperties | nullish);
104862
+ /**
104863
+ * The enabled focus areas of the scene.
104864
+ *
104865
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html#enabledFocusAreas Read more...}
104866
+ */
104867
+ get enabledFocusAreas(): Collection<string> | nullish;
104868
+ set enabledFocusAreas(value: CollectionProperties<string> | nullish);
104843
104869
  /**
104844
104870
  * Represents settings that affect the environment in which the WebScene is displayed (such as lighting).
104845
104871
  *
@@ -104945,6 +104971,12 @@ declare namespace __esri {
104945
104971
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html#elements Read more...}
104946
104972
  */
104947
104973
  elements?: SlideElementsProperties | nullish;
104974
+ /**
104975
+ * The enabled focus areas of the scene.
104976
+ *
104977
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html#enabledFocusAreas Read more...}
104978
+ */
104979
+ enabledFocusAreas?: CollectionProperties<string> | nullish;
104948
104980
  /**
104949
104981
  * Represents settings that affect the environment in which the WebScene is displayed (such as lighting).
104950
104982
  *
@@ -110980,6 +111012,7 @@ declare namespace __esri {
110980
111012
  export interface DirectionsVisibleElements {
110981
111013
  editRouteButton?: boolean;
110982
111014
  layerDetails?: boolean;
111015
+ printButton?: boolean;
110983
111016
  saveAsButton?: boolean;
110984
111017
  saveButton?: boolean;
110985
111018
  }
@@ -116465,7 +116498,8 @@ declare namespace __esri {
116465
116498
  */
116466
116499
  readonly supportsDeleteAttachments: boolean;
116467
116500
  /**
116468
- * Indicates whether the table and associated layer support resizing attachments with the current configuration.
116501
+ * Defines whether or not the feature supports resizing
116502
+ * attachments.
116469
116503
  *
116470
116504
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#supportsResizeAttachments Read more...}
116471
116505
  */
@@ -117647,7 +117681,8 @@ declare namespace __esri {
117647
117681
  */
117648
117682
  readonly supportsDeleteAttachments: boolean;
117649
117683
  /**
117650
- * Indicates whether the table and associated layer support resizing attachments with the current configuration.
117684
+ * Defines whether or not the feature supports resizing
117685
+ * attachments.
117651
117686
  *
117652
117687
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#supportsResizeAttachments Read more...}
117653
117688
  */
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Collection.js";import{clone as i}from"../../core/lang.js";import r from"../../core/Logger.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{reader as s}from"../../core/accessorSupport/decorators/reader.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../../core/accessorSupport/decorators/writer.js";import{excludeTables as l}from"../../core/accessorSupport/layerContainerType.js";import d from"../../geometry/Extent.js";import a from"../../geometry/HeightModelInfo.js";import u from"../../geometry/SpatialReference.js";import{sanitizeUrlWithLayerId as y,writeUrlWithLayerId as c}from"../support/arcgisLayerUrl.js";import{elevationInfo as m,maxScale as f,minScale as h,url as v}from"../support/commonProperties.js";import g from"../support/EditFieldsInfo.js";import{FeatureIndex as I}from"../support/FeatureIndex.js";import{geometryTypeKebabDict as F,hasCurrentUser as j,isLayerCacheStale as S,supportsQueryOnly as b,readGlobalIdField as E,readObjectIdField as x,readVersion as U}from"../support/featureLayerUtils.js";import O from"../support/GeometryFieldsInfo.js";import D from"../support/LayerFloorInfo.js";import{isPreferredUrlApplicable as T,getPreferredUrl as w}from"../support/layerUtils.js";import M from"../support/Relationship.js";import{getFeatureLayerCapabilities as B}from"../support/serviceCapabilitiesUtils.js";import C from"../support/Subtype.js";import{timeZoneProperty as R}from"../../time/timeZoneUtils.js";const A=A=>{let Q=class extends A{constructor(){super(...arguments),this.copyright=null,this.capabilities=null,this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.definitionExpression=null,this.displayField=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.fieldsIndex=null,this.floorInfo=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.globalIdField=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.indexes=new(t.ofType(I)),this.isTable=!1,this.layerId=void 0,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.preferredTimeZone=null,this.relationships=null,this.returnM=void 0,this.returnZ=void 0,this.serviceDefinitionExpression=null,this.serviceItemId=null,this.sourceJSON=null,this.spatialReference=u.WGS84,this.subtypeField=null,this.subtypes=null,this.trackIdField=null,this.uniqueIdFields=null,this.version=void 0}getFieldDomain(){throw new Error("Not implemented")}getField(e){return this.fieldsIndex.get(e)}get authenticationTriggerEvent(){if(!this.url)return null;const{capabilities:e}=this;if(e){const{query:t,operations:i,editing:r}=e;if(!t.supportsQueryByOthers||!t.supportsQueryByAnonymous)return"load";if(i.supportsEditing&&!(r.supportsUpdateByOthers&&r.supportsUpdateByAnonymous&&r.supportsDeleteByOthers&&r.supportsDeleteByAnonymous))return"load"}if(j(this.serviceDefinitionExpression)||j(this.definitionExpression))return"load";if(this.userHasUpdateItemPrivileges){if(S(this))return"load";if(this.hasUpdateItemRestrictions)return e.operations.supportsQuery?"editing":"load"}if(this.userHasFullEditingPrivileges&&this.hasFullEditingRestrictions)return"editing";const t=this.editFieldsInfo;return(t?.creatorField||t?.editorField)&&e?.operations.supportsEditing?"editing":null}readCapabilitiesFromService(e,t){return B(t,this.url)}readEditingInfo(e,t){const{editingInfo:i}=t;return i?{lastEditDate:null!=i.lastEditDate?new Date(i.lastEditDate):null}:null}get effectiveCapabilities(){const e=this.capabilities;if(!e)return null;const t=i(e),{operations:r,editing:o}=t;return b(this)?(this.userHasUpdateItemPrivileges&&(r.supportsQuery=!0),t):this.userHasUpdateItemPrivileges?(r.supportsAdd=r.supportsDelete=r.supportsEditing=r.supportsQuery=r.supportsUpdate=o.supportsDeleteByOthers=o.supportsGeometryUpdate=o.supportsUpdateByOthers=!0,t):(this.userHasFullEditingPrivileges&&r.supportsEditing&&(r.supportsAdd=r.supportsDelete=r.supportsUpdate=o.supportsGeometryUpdate=!0),t)}get effectiveEditingEnabled(){return!1}readGlobalIdFieldFromService(e,t){return E(t)}get hasFullEditingRestrictions(){const e=this.capabilities;if(!e||b(this))return!1;const{operations:t,editing:i}=e;return t.supportsEditing&&!(t.supportsAdd&&t.supportsDelete&&t.supportsUpdate&&i.supportsGeometryUpdate)}get hasUpdateItemRestrictions(){const e=this.capabilities;if(!e)return!1;const{operations:t,editing:i}=e;return b(this)?!t.supportsQuery:!(t.supportsAdd&&t.supportsDelete&&t.supportsEditing&&t.supportsQuery&&t.supportsUpdate&&i.supportsDeleteByOthers&&i.supportsGeometryUpdate&&i.supportsUpdateByOthers)}readIsTableFromService(e,t){return"Table"===t.type}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readMinScale(e,t){return t.effectiveMinScale||e||0}readObjectIdFieldFromService(e,t){return x(t)}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}readUniqueIdFields(e,t){return t.uniqueIdInfo?.OIDFieldContainsHashValue?t.uniqueIdInfo.fields:null}set url(e){if(null==e)return void this._set("url",e);const t=y({layer:this,url:e,nonStandardUrlAllowed:!0,logger:r.getLogger(this)});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,i,r){c(this,e,null,t,r)}readVersion(e,t){return U(t)}applyPreferredHost(e){const{url:t,portalItem:i}=this;if(!t||!T(i))return;const r=w(t,e);r&&this._set("url",r)}};return e([o({readOnly:!0})],Q.prototype,"authenticationTriggerEvent",null),e([o({type:String,json:{origins:{service:{read:{source:"copyrightText"}}}}})],Q.prototype,"copyright",void 0),e([o({readOnly:!0,json:{read:!1,origins:{service:{read:{source:["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","isDataBranchVersioned","isDataVersioned","maxRecordCount","maxRecordCountFactor","maxUniqueIDCount","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"]}}}}})],Q.prototype,"capabilities",void 0),e([s("service","capabilities")],Q.prototype,"readCapabilitiesFromService",null),e([o(R("dateFieldsTimeReference"))],Q.prototype,"dateFieldsTimeZone",void 0),e([o({type:Boolean})],Q.prototype,"datesInUnknownTimezone",void 0),e([o({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Q.prototype,"definitionExpression",void 0),e([o({type:String,json:{origins:{service:{read:{source:"displayField"}}}}})],Q.prototype,"displayField",void 0),e([o({readOnly:!0,type:g})],Q.prototype,"editFieldsInfo",void 0),e([o({readOnly:!0})],Q.prototype,"editingInfo",void 0),e([s("editingInfo")],Q.prototype,"readEditingInfo",null),e([o({readOnly:!0})],Q.prototype,"effectiveCapabilities",null),e([o()],Q.prototype,"effectiveEditingEnabled",null),e([o((()=>{const e=i(m),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],Q.prototype,"elevationInfo",void 0),e([o()],Q.prototype,"fieldsIndex",void 0),e([o({type:D,json:{name:"layerDefinition.floorInfo",write:{layerContainerTypes:l}}})],Q.prototype,"floorInfo",void 0),e([o({type:d,json:{origins:{service:{read:{source:"extent"}}}}})],Q.prototype,"fullExtent",void 0),e([o()],Q.prototype,"gdbVersion",void 0),e([o({readOnly:!0,type:O,json:{read:{source:"geometryProperties"}}})],Q.prototype,"geometryFieldsInfo",void 0),e([o({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:F.read}}}})],Q.prototype,"geometryType",void 0),e([o({type:String})],Q.prototype,"globalIdField",void 0),e([s("service","globalIdField",["globalIdField","fields"])],Q.prototype,"readGlobalIdFieldFromService",null),e([o({readOnly:!0})],Q.prototype,"hasFullEditingRestrictions",null),e([o({type:Boolean,json:{origins:{service:{read:!0}}}})],Q.prototype,"hasM",void 0),e([o({readOnly:!0})],Q.prototype,"hasUpdateItemRestrictions",null),e([o({type:Boolean,json:{origins:{service:{read:!0}}}})],Q.prototype,"hasZ",void 0),e([o({readOnly:!0,type:a})],Q.prototype,"heightModelInfo",void 0),e([o({type:Date})],Q.prototype,"historicMoment",void 0),e([o({type:t.ofType(I),readOnly:!0})],Q.prototype,"indexes",void 0),e([o({readOnly:!0})],Q.prototype,"isTable",void 0),e([s("service","isTable",["type"])],Q.prototype,"readIsTableFromService",null),e([o({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],Q.prototype,"layerId",void 0),e([o(f)],Q.prototype,"maxScale",void 0),e([s("service","maxScale",["maxScale","effectiveMaxScale"])],Q.prototype,"readMaxScale",null),e([o(h)],Q.prototype,"minScale",void 0),e([s("service","minScale",["minScale","effectiveMinScale"])],Q.prototype,"readMinScale",null),e([o({type:String})],Q.prototype,"objectIdField",void 0),e([s("service","objectIdField",["objectIdField","fields"])],Q.prototype,"readObjectIdFieldFromService",null),e([o(R("preferredTimeReference"))],Q.prototype,"preferredTimeZone",void 0),e([o({type:[M],readOnly:!0})],Q.prototype,"relationships",void 0),e([o({type:Boolean})],Q.prototype,"returnM",void 0),e([o({type:Boolean})],Q.prototype,"returnZ",void 0),e([o({readOnly:!0,json:{write:!1}})],Q.prototype,"serverGens",void 0),e([o({readOnly:!0})],Q.prototype,"serviceDefinitionExpression",void 0),e([s("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],Q.prototype,"readServiceDefinitionExpression",null),e([o({type:String,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,"serviceItemId",void 0),e([o()],Q.prototype,"sourceJSON",void 0),e([o({type:u,json:{origins:{service:{read:{source:"extent.spatialReference"}}}}})],Q.prototype,"spatialReference",void 0),e([o({type:String,readOnly:!0,json:{origins:{service:{read:!0}}}})],Q.prototype,"subtypeField",void 0),e([o({type:[C],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,"subtypes",void 0),e([o({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],Q.prototype,"trackIdField",void 0),e([o({type:[String],readOnly:!0})],Q.prototype,"uniqueIdFields",void 0),e([s("service","uniqueIdFields",["uniqueIdInfo.OIDFieldContainsHashValue","uniqueIdInfo.fields"])],Q.prototype,"readUniqueIdFields",null),e([o(v)],Q.prototype,"url",null),e([p("url")],Q.prototype,"writeUrl",null),e([o({json:{origins:{service:{read:!0}},read:!1}})],Q.prototype,"version",void 0),e([s("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],Q.prototype,"readVersion",null),Q=e([n("esri.layers.mixins.FeatureLayerBase")],Q),Q};export{A as FeatureLayerBase};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Collection.js";import{clone as r}from"../../core/lang.js";import i from"../../core/Logger.js";import{hasSameOrigin as o,getHost as s,changeHost as n}from"../../core/urlUtils.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{reader as l}from"../../core/accessorSupport/decorators/reader.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import{writer as a}from"../../core/accessorSupport/decorators/writer.js";import{excludeTables as u}from"../../core/accessorSupport/layerContainerType.js";import{OriginId as c,idToName as y}from"../../core/accessorSupport/PropertyOrigin.js";import f from"../../geometry/Extent.js";import m from"../../geometry/HeightModelInfo.js";import h from"../../geometry/SpatialReference.js";import{sanitizeUrlWithLayerId as v,writeUrlWithLayerId as g}from"../support/arcgisLayerUrl.js";import{elevationInfo as I,maxScale as F,minScale as S,url as j}from"../support/commonProperties.js";import b from"../support/EditFieldsInfo.js";import{FeatureIndex as E}from"../support/FeatureIndex.js";import{geometryTypeKebabDict as U,hasCurrentUser as x,isLayerCacheStale as O,supportsQueryOnly as D,readGlobalIdField as M,readObjectIdField as T,readVersion as w}from"../support/featureLayerUtils.js";import R from"../support/GeometryFieldsInfo.js";import C from"../support/LayerFloorInfo.js";import{isPreferredUrlApplicable as B,getPreferredUrl as H,applyPreferredHostToPortalItem as A,getPreferredHost as Q}from"../support/layerUtils.js";import P from"../support/Relationship.js";import{getFeatureLayerCapabilities as q}from"../support/serviceCapabilitiesUtils.js";import V from"../support/Subtype.js";import{hasTypeKeyword as _,typeKeyword as G}from"../../portal/support/portalItemUtils.js";import{timeZoneProperty as Z}from"../../time/timeZoneUtils.js";const k=k=>{let L=class extends k{constructor(){super(...arguments),this.copyright=null,this.capabilities=null,this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.definitionExpression=null,this.displayField=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.fieldsIndex=null,this.floorInfo=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.globalIdField=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.indexes=new(t.ofType(E)),this.isTable=!1,this.layerId=void 0,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.preferredTimeZone=null,this.relationships=null,this.returnM=void 0,this.returnZ=void 0,this.serviceDefinitionExpression=null,this.serviceItemId=null,this.sourceJSON=null,this.spatialReference=h.WGS84,this.subtypeField=null,this.subtypes=null,this.trackIdField=null,this.uniqueIdFields=null,this.version=void 0,this._isUrlHostModified=!1}getFieldDomain(){throw new Error("Not implemented")}getField(e){return this.fieldsIndex.get(e)}get authenticationTriggerEvent(){if(!this.url)return null;const{capabilities:e}=this;if(e){const{query:t,operations:r,editing:i}=e;if(!t.supportsQueryByOthers||!t.supportsQueryByAnonymous)return"load";if(r.supportsEditing&&!(i.supportsUpdateByOthers&&i.supportsUpdateByAnonymous&&i.supportsDeleteByOthers&&i.supportsDeleteByAnonymous))return"load"}if(x(this.serviceDefinitionExpression)||x(this.definitionExpression))return"load";if(this.userHasUpdateItemPrivileges){if(O(this))return"load";if(this.hasUpdateItemRestrictions)return e.operations.supportsQuery?"editing":"load"}if(this.userHasFullEditingPrivileges&&this.hasFullEditingRestrictions)return"editing";const t=this.editFieldsInfo;return(t?.creatorField||t?.editorField)&&e?.operations.supportsEditing?"editing":null}readCapabilitiesFromService(e,t){return q(t,this.url)}readEditingInfo(e,t){const{editingInfo:r}=t;return r?{lastEditDate:null!=r.lastEditDate?new Date(r.lastEditDate):null}:null}get effectiveCapabilities(){const e=this.capabilities;if(!e)return null;const t=r(e),{operations:i,editing:o}=t;return D(this)?(this.userHasUpdateItemPrivileges&&(i.supportsQuery=!0),t):this.userHasUpdateItemPrivileges?(i.supportsAdd=i.supportsDelete=i.supportsEditing=i.supportsQuery=i.supportsUpdate=o.supportsDeleteByOthers=o.supportsGeometryUpdate=o.supportsUpdateByOthers=!0,t):(this.userHasFullEditingPrivileges&&i.supportsEditing&&(i.supportsAdd=i.supportsDelete=i.supportsUpdate=o.supportsGeometryUpdate=!0),t)}get effectiveEditingEnabled(){return!1}readGlobalIdFieldFromService(e,t){return M(t)}get hasFullEditingRestrictions(){const e=this.capabilities;if(!e||D(this))return!1;const{operations:t,editing:r}=e;return t.supportsEditing&&!(t.supportsAdd&&t.supportsDelete&&t.supportsUpdate&&r.supportsGeometryUpdate)}get hasUpdateItemRestrictions(){const e=this.capabilities;if(!e)return!1;const{operations:t,editing:r}=e;return D(this)?!t.supportsQuery:!(t.supportsAdd&&t.supportsDelete&&t.supportsEditing&&t.supportsQuery&&t.supportsUpdate&&r.supportsDeleteByOthers&&r.supportsGeometryUpdate&&r.supportsUpdateByOthers)}readIsTableFromService(e,t){return"Table"===t.type}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readMinScale(e,t){return t.effectiveMinScale||e||0}readObjectIdFieldFromService(e,t){return T(t)}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}readUniqueIdFields(e,t){return t.uniqueIdInfo?.OIDFieldContainsHashValue?t.uniqueIdInfo.fields:null}set url(e){if(null==e)return void this._set("url",e);const t=v({layer:this,url:e,nonStandardUrlAllowed:!0,logger:i.getLogger(this)});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){g(this,e,null,t,i)}readVersion(e,t){return w(t)}get isUrlHostModified(){const{loaded:e,url:t,_isUrlHostModified:r}=this;if(r)return!0;if(!e||!t)return!1;if(this.originIdOf("url")<c.USER)return!1;const i=this.sourceJSON?.preferredHost;if(!i)return!1;if(!o(t,`https://${i}`,!0))return!1;for(let s=c.USER-1;s>=c.PORTAL_ITEM;s--){const e=this.getAtOrigin("url",y(s));if(e)return!o(t,e,!0)}return!1}applyPreferredHost(e){const{url:t,portalItem:r}=this;if(!t||!B(r))return;const i=H(t,e);i&&(this._set("url",i),this._isUrlHostModified=!0,r&&A(r,Q(e)))}applyHostFromPortalItem(){const{url:e,portalItem:t}=this;if(!e||this.originIdOf("url")===c.USER||!t?.url||!B(t)||!_(t,G.HOSTED_SERVICE)||o(e,t.url,!0))return;const r=s(t.url);this._set("url",n(e,r)),this._isUrlHostModified=!0}};return e([p({readOnly:!0})],L.prototype,"authenticationTriggerEvent",null),e([p({type:String,json:{origins:{service:{read:{source:"copyrightText"}}}}})],L.prototype,"copyright",void 0),e([p({readOnly:!0,json:{read:!1,origins:{service:{read:{source:["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","isDataBranchVersioned","isDataVersioned","maxRecordCount","maxRecordCountFactor","maxUniqueIDCount","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"]}}}}})],L.prototype,"capabilities",void 0),e([l("service","capabilities")],L.prototype,"readCapabilitiesFromService",null),e([p(Z("dateFieldsTimeReference"))],L.prototype,"dateFieldsTimeZone",void 0),e([p({type:Boolean})],L.prototype,"datesInUnknownTimezone",void 0),e([p({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],L.prototype,"definitionExpression",void 0),e([p({type:String,json:{origins:{service:{read:{source:"displayField"}}}}})],L.prototype,"displayField",void 0),e([p({readOnly:!0,type:b})],L.prototype,"editFieldsInfo",void 0),e([p({readOnly:!0})],L.prototype,"editingInfo",void 0),e([l("editingInfo")],L.prototype,"readEditingInfo",null),e([p({readOnly:!0})],L.prototype,"effectiveCapabilities",null),e([p()],L.prototype,"effectiveEditingEnabled",null),e([p((()=>{const e=r(I),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],L.prototype,"elevationInfo",void 0),e([p()],L.prototype,"fieldsIndex",void 0),e([p({type:C,json:{name:"layerDefinition.floorInfo",write:{layerContainerTypes:u}}})],L.prototype,"floorInfo",void 0),e([p({type:f,json:{origins:{service:{read:{source:"extent"}}}}})],L.prototype,"fullExtent",void 0),e([p()],L.prototype,"gdbVersion",void 0),e([p({readOnly:!0,type:R,json:{read:{source:"geometryProperties"}}})],L.prototype,"geometryFieldsInfo",void 0),e([p({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:U.read}}}})],L.prototype,"geometryType",void 0),e([p({type:String})],L.prototype,"globalIdField",void 0),e([l("service","globalIdField",["globalIdField","fields"])],L.prototype,"readGlobalIdFieldFromService",null),e([p({readOnly:!0})],L.prototype,"hasFullEditingRestrictions",null),e([p({type:Boolean,json:{origins:{service:{read:!0}}}})],L.prototype,"hasM",void 0),e([p({readOnly:!0})],L.prototype,"hasUpdateItemRestrictions",null),e([p({type:Boolean,json:{origins:{service:{read:!0}}}})],L.prototype,"hasZ",void 0),e([p({readOnly:!0,type:m})],L.prototype,"heightModelInfo",void 0),e([p({type:Date})],L.prototype,"historicMoment",void 0),e([p({type:t.ofType(E),readOnly:!0})],L.prototype,"indexes",void 0),e([p({readOnly:!0})],L.prototype,"isTable",void 0),e([l("service","isTable",["type"])],L.prototype,"readIsTableFromService",null),e([p({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],L.prototype,"layerId",void 0),e([p(F)],L.prototype,"maxScale",void 0),e([l("service","maxScale",["maxScale","effectiveMaxScale"])],L.prototype,"readMaxScale",null),e([p(S)],L.prototype,"minScale",void 0),e([l("service","minScale",["minScale","effectiveMinScale"])],L.prototype,"readMinScale",null),e([p({type:String})],L.prototype,"objectIdField",void 0),e([l("service","objectIdField",["objectIdField","fields"])],L.prototype,"readObjectIdFieldFromService",null),e([p(Z("preferredTimeReference"))],L.prototype,"preferredTimeZone",void 0),e([p({type:[P],readOnly:!0})],L.prototype,"relationships",void 0),e([p({type:Boolean})],L.prototype,"returnM",void 0),e([p({type:Boolean})],L.prototype,"returnZ",void 0),e([p({readOnly:!0,json:{write:!1}})],L.prototype,"serverGens",void 0),e([p({readOnly:!0})],L.prototype,"serviceDefinitionExpression",void 0),e([l("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],L.prototype,"readServiceDefinitionExpression",null),e([p({type:String,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],L.prototype,"serviceItemId",void 0),e([p()],L.prototype,"sourceJSON",void 0),e([p({type:h,json:{origins:{service:{read:{source:"extent.spatialReference"}}}}})],L.prototype,"spatialReference",void 0),e([p({type:String,readOnly:!0,json:{origins:{service:{read:!0}}}})],L.prototype,"subtypeField",void 0),e([p({type:[V],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],L.prototype,"subtypes",void 0),e([p({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],L.prototype,"trackIdField",void 0),e([p({type:[String],readOnly:!0})],L.prototype,"uniqueIdFields",void 0),e([l("service","uniqueIdFields",["uniqueIdInfo.OIDFieldContainsHashValue","uniqueIdInfo.fields"])],L.prototype,"readUniqueIdFields",null),e([p(j)],L.prototype,"url",null),e([a("url")],L.prototype,"writeUrl",null),e([p({json:{origins:{service:{read:!0}},read:!1}})],L.prototype,"version",void 0),e([l("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],L.prototype,"readVersion",null),e([p({readOnly:!0})],L.prototype,"isUrlHostModified",null),L=e([d("esri.layers.mixins.FeatureLayerBase")],L),L};export{k as FeatureLayerBase};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Clonable.js";import r from"../../../core/Error.js";import o from"../../../core/JSONSupport.js";import a from"../../../core/Logger.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import{cast as n}from"../../../core/accessorSupport/decorators/cast.js";import{enumeration as s}from"../../../core/accessorSupport/decorators/enumeration.js";import{reader as p}from"../../../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../../../core/accessorSupport/decorators/subclass.js";import{writer as l}from"../../../core/accessorSupport/decorators/writer.js";import m from"../../../geometry/Point.js";import{getGeometryZScaler as u}from"../../../geometry/support/zscale.js";import d from"./CameraOrientation.js";import y from"./cameraOrientationFactory.js";import{appendPrefixAndSuffix as f,getEffectiveElevationSource as g,orientedImageryTypeMap as h}from"./utils.js";import{CameraOrientationType as v}from"../enums/CameraOrientationType.js";import{ltpToGeographic as w}from"../transformations/utils.js";function O(e){throw new r("exposure-point:missing-default-value",`a value for ${e} is missing in default properties`)}function j(e,t){throw new r("exposure-point:missing-attribute-value",`a value for ${e} is missing in attribute table`,{exposurePoint:t})}const b=e=>({cast:e=>{const t=parseFloat(e);return Number.isFinite(t)?t:void 0},json:{name:e,write:{writer:(e,t,r)=>{t[r]=Number.isFinite(e)?e:void 0}}}}),S=e=>({cast:e=>"string"==typeof e?e.split(";").map(Number):e,json:{default:e,write:{writer:(e,t,r)=>{t[r]=e?.join(";")}}}});let I=class extends(t.ClonableMixin(o)){constructor(e){super(e),this._geometry=null,this.cameraOrientation=null,this.elevation=null,this.elevationSource=null,this.name=null,this.sourceMap=null}read(e,t){const r={},{attributes:o,geometry:a}=e,i={};for(const s in o)r[s.toLowerCase()]=o[s],i[s.toLowerCase()]=s;const n=e.layer??{};n.sequenceOrderField?.length&&(r.sequenceorder=o[n.sequenceOrderField],i.sequenceorder=n.sequenceOrderField),super.read({geometry:a,layer:n,sourceMap:i,...r},t)}write(e,t){const r=super.write(e,t),{sourceMap:o}=this;if(!o||!r)return r;const a={};for(const i in r){const e=o[i.toLowerCase()];e&&(a[e]=r[i])}return a}readCameraHeading(e,t){const{cameraheading:r,camheading:o,layer:a}=t;return r??o??a.cameraHeading}readCameraHeight(e,t){const{cameraheight:r,avghtag:o,layer:a}=t;return r??o??a.cameraHeight}readCamOffset(e,t){const{cameraoffset:r,camoffset:o}=t;return r?.split(";").map(Number)??o?.split(";").map(Number)??null}writeCameraOffset(e,t){e&&(t.cameraOffset=e.join(";"))}readCameraOrientation(e,t){const{cameraorientation:r,camori:o}=t;return r??o}readCameraPitch(e,t){const{camerapitch:r,campitch:o,layer:a}=t;return r??o??a.cameraPitch}readCameraRoll(e,t){const{cameraroll:r,camroll:o,layer:a}=t;return r??o??a.cameraRoll}readDepthImage(e,t){const{depthimage:r,depthimg:o,layer:a}=t,i=r??o??null,{depthImagePathPrefix:n,depthImagePathSuffix:s}=a??{};return f(i,n,s)}readElevationSource(e,t){const{elevationsource:r,layer:o}=t,{demPathSuffix:a,demPathPrefix:i}=o;if(r){const e=this._parseIfJSON(r);return g(e,i,a)}return o.effectiveElevationSource}readFarDistance(e,t){const{fardistance:r,fardist:o,layer:a}=t;return r??o??a.farDistance}get geometry(){const e=this._geometry.clone();if(!e)return null;const{cameraOffset:t}=this;if(t){const[r,o,a]=t;e.x+=r,e.y+=o,null!=e.z&&null!=a&&(e.z+=a)}return e}set geometry(e){this._geometry=e}readHFOV(e,t){const{horizontalfieldofview:r,hfov:o,layer:a}=t;return r??o??a.horizontalFieldOfView}readImageURL(e,t){const{imagepath:r,layer:o}=t;r||j("imagePath",this);const{imagePathPrefix:a,imagePathSuffix:i}=o;return f(r,a,i)}readImageRotation(e,t){const{imagerotation:r,imgrot:o,layer:a}=t;return r??o??a.imageRotation}get isHorizontal(){return"horizontal"===this.orientedImageryType}get isInspection(){return"inspection"===this.orientedImageryType}get isNadir(){return"nadir"===this.orientedImageryType}get isOblique(){return"oblique"===this.orientedImageryType}get isSpherical(){return"360"===this.orientedImageryType}get location(){const{cameraOrientation:e,cameraHeight:t,elevation:r}=this;if(e){const{type:t,x:r,y:o,z:a,horizontalWKID:i,verticalWKID:n}=e,s="number"==typeof i?{wkid:i}:{wkt:i};if(t===v.LTP){const{latitude:t,longitude:r,ellipsoidRadius:o,squaredEccentricity:a,properties:i}=e,{x:n,y:s,z:p}=i;return new m(w([n,s,p],[t,r,o,a]))}const p=new m({x:r,y:o,z:a,spatialReference:s}),c=n?u("point",{wkid:n},s):null;return c&&c(p),p}if("number"!=typeof t)throw O("cameraHeight");const o=this.geometry.clone();return o.z=o.hasZ?o.z:(r??0)+t,o}set matrix(e){if(!e||9!==e.length)return a.getLogger(this).warn("Ignoring rotation matrix because it doesn't have 9 values",{value:e}),void this._set("matrix",null);this._set("matrix",e)}readNearDistance(e,t){const{neardistance:r,neardist:o,layer:a}=t;return r??o??a.nearDistance}readOffsetFromStart(e,t){return t.offsetfromstart??null}readOrientationAccuracy(e,t){const{accuracy:r,orientationaccuracy:o}=t;return o?.split(";").map(Number)??r?.split(";").map(Number)??null}writeOrientationAccuracy(e,t){e&&(t.orientationAccuracy=e.join(";"))}readOIType(e,t){const{orientedimagerytype:r,oitype:o,camerapitch:a,campitch:i,layer:n}=t,s=h.read(r??o??n.orientedImageryType),p=a??i??n.cameraPitch;return"oblique"===s?p<10?"nadir":"oblique":s}set radial(e){if(e)if("string"!=typeof e)this._set("radial",e);else{const[t,r,o]=e.split(";").map(Number);this._set("radial",[t??0,r??0,o??0])}else this._set("radial",[0,0,0])}readSequenceOrder(e,t){const{layer:r}=t;return t[r.sequenceOrderField.toLowerCase()]}writeSequenceOrder(e,t){if(!e)return;const{sourceMap:r}=this;if(r){t[r.sequenceorder]=e}}set tangential(e){if(e)if("string"!=typeof e)this._set("tangential",e);else{const[t,r]=e.split(";").map(Number);this._set("tangential",[t??0,r??0])}else this._set("tangential",[0,0])}readVFOV(e,t){const{verticalfieldofview:r,vfov:o,layer:a}=t;return r??o??a.verticalFieldOfView}_parseIfJSON(e){let t=null;try{t=JSON.parse(e)}catch(r){a.getLogger(this).error("couldn't parse the given elevation source JSON",e,r)}return t}};e([i()],I.prototype,"_geometry",void 0),e([i(b())],I.prototype,"a0",void 0),e([i(b())],I.prototype,"a1",void 0),e([i(b())],I.prototype,"a2",void 0),e([i({type:Date,json:{write:{enabled:!0,target:"acquisitionDate"},name:"acquisitiondate"}})],I.prototype,"acquisitionDate",void 0),e([i(b())],I.prototype,"b0",void 0),e([i(b())],I.prototype,"b1",void 0),e([i(b())],I.prototype,"b2",void 0),e([i({type:Number,json:{write:!0,read:{source:["cameraheading","camheading","layer.cameraHeading"]}}})],I.prototype,"cameraHeading",void 0),e([p("cameraHeading")],I.prototype,"readCameraHeading",null),e([i({type:Number,json:{write:!0}})],I.prototype,"cameraHeight",void 0),e([p("cameraHeight",["cameraheight","avghtag","layer.cameraHeight"])],I.prototype,"readCameraHeight",null),e([i()],I.prototype,"cameraOffset",void 0),e([p("cameraOffset",["cameraoffset","camoffset"])],I.prototype,"readCamOffset",null),e([l("cameraOffset")],I.prototype,"writeCameraOffset",null),e([i({json:{write:{writer:(e,t,r)=>{t[r]=e.toString()}}},type:d}),n((e=>e?y.getCameraOrientation(e):null))],I.prototype,"cameraOrientation",void 0),e([p("cameraOrientation",["cameraorientation","camori"])],I.prototype,"readCameraOrientation",null),e([i({type:Number,json:{write:!0}})],I.prototype,"cameraPitch",void 0),e([p("cameraPitch",["camerapitch","campitch","layer.cameraPitch"])],I.prototype,"readCameraPitch",null),e([i({type:Number,json:{write:!0}})],I.prototype,"cameraRoll",void 0),e([p("cameraRoll",["cameraroll","camroll","layer.cameraRoll"])],I.prototype,"readCameraRoll",null),e([i({json:{write:!0},type:String})],I.prototype,"depthImage",void 0),e([p("depthImage",["depthimage","depthimg"])],I.prototype,"readDepthImage",null),e([i({type:Number,json:{write:!0}})],I.prototype,"elevation",void 0),e([i({json:{write:!0},clonable:"reference"})],I.prototype,"elevationSource",void 0),e([p("elevationSource",["elevationsource","layer.effectiveElevationSource"])],I.prototype,"readElevationSource",null),e([i({json:{name:"exposurestationid",write:{target:"exposureStationId"}},type:String})],I.prototype,"exposureStationId",void 0),e([i({type:Number,json:{write:!0}})],I.prototype,"farDistance",void 0),e([p("farDistance",["fardistance","fardist","layer.farDistance"])],I.prototype,"readFarDistance",null),e([i(b("focallength"))],I.prototype,"focalLength",void 0),e([i({type:m,json:{name:"geometry"}})],I.prototype,"geometry",null),e([i({type:Number,json:{write:!0}})],I.prototype,"horizontalFieldOfView",void 0),e([p("horizontalFieldOfView",["horizontalfieldofview","hfov","layer.horizontalFieldOfView"])],I.prototype,"readHFOV",null),e([i({json:{write:!0},type:String})],I.prototype,"imagePath",void 0),e([p("imagePath",["imagepath"])],I.prototype,"readImageURL",null),e([i({type:Number,json:{write:!0}})],I.prototype,"imageRotation",void 0),e([p("imageRotation",["imagerotation","imgrot","layer.imageRotation"])],I.prototype,"readImageRotation",null),e([i()],I.prototype,"isHorizontal",null),e([i()],I.prototype,"isInspection",null),e([i()],I.prototype,"isNadir",null),e([i()],I.prototype,"isOblique",null),e([i()],I.prototype,"isSpherical",null),e([i()],I.prototype,"location",null),e([i(S())],I.prototype,"matrix",null),e([i({json:{write:!0},type:String})],I.prototype,"name",void 0),e([i({type:Number,json:{write:!0}})],I.prototype,"nearDistance",void 0),e([p("nearDistance",["neardistance","neardist","layer.nearDistance"])],I.prototype,"readNearDistance",null),e([i({json:{write:!0,name:"objectid"},type:Number})],I.prototype,"objectId",void 0),e([i({type:Number,json:{write:!0}})],I.prototype,"offsetFromStart",void 0),e([p("offsetFromStart",["offsetfromstart"])],I.prototype,"readOffsetFromStart",null),e([i()],I.prototype,"orientationAccuracy",void 0),e([p("orientationAccuracy",["accuracy","orientationaccuracy"])],I.prototype,"readOrientationAccuracy",null),e([l("orientationAccuracy")],I.prototype,"writeOrientationAccuracy",null),e([s(h)],I.prototype,"orientedImageryType",void 0),e([p("orientedImageryType",["orientedimagerytype","oitype","layer.orientedImageryType"])],I.prototype,"readOIType",null),e([i({type:Number,json:{write:!0,read:{source:"principalx"}}})],I.prototype,"principalX",void 0),e([i({type:Number,json:{write:!0,read:{source:"principaly"}}})],I.prototype,"principalY",void 0),e([i(S([0,0,0]))],I.prototype,"radial",null),e([i({type:String})],I.prototype,"sequenceOrder",void 0),e([p("sequenceOrder",["sequenceorder","layer.sequenceOrderField"])],I.prototype,"readSequenceOrder",null),e([l("sequenceOrder")],I.prototype,"writeSequenceOrder",null),e([i({type:Object})],I.prototype,"sourceMap",void 0),e([i(S([0,0]))],I.prototype,"tangential",null),e([i({type:Number,json:{write:!0}})],I.prototype,"verticalFieldOfView",void 0),e([p("verticalFieldOfView",["verticalfieldofview","vfov","layer.verticalFieldOfView"])],I.prototype,"readVFOV",null),I=e([c("esri.layers.orientedImagery.core.ExposurePoint")],I);const N=I;export{N as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Clonable.js";import r from"../../../core/Error.js";import o from"../../../core/JSONSupport.js";import a from"../../../core/Logger.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import{cast as n}from"../../../core/accessorSupport/decorators/cast.js";import{enumeration as s}from"../../../core/accessorSupport/decorators/enumeration.js";import{reader as p}from"../../../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../../../core/accessorSupport/decorators/subclass.js";import{writer as l}from"../../../core/accessorSupport/decorators/writer.js";import m from"../../../geometry/Point.js";import{getGeometryZScaler as u}from"../../../geometry/support/zscale.js";import d from"./CameraOrientation.js";import y from"./cameraOrientationFactory.js";import{appendPrefixAndSuffix as f,getEffectiveElevationSource as g,orientedImageryTypeMap as h}from"./utils.js";import{CameraOrientationType as v}from"../enums/CameraOrientationType.js";import{ltpToGeographic as w}from"../transformations/utils.js";function O(e){throw new r("exposure-point:missing-default-value",`a value for ${e} is missing in default properties`)}function j(e,t){throw new r("exposure-point:missing-attribute-value",`a value for ${e} is missing in attribute table`,{exposurePoint:t})}const b=e=>({cast:e=>{const t=parseFloat(e);return Number.isFinite(t)?t:void 0},json:{name:e,write:{writer:(e,t,r)=>{t[r]=Number.isFinite(e)?e:void 0}}}}),S=e=>({cast:e=>"string"==typeof e?e.split(";").map(Number):e,json:{default:e,write:{writer:(e,t,r)=>{t[r]=e?.join(";")}}}});let I=class extends(t.ClonableMixin(o)){constructor(e){super(e),this._geometry=null,this.cameraOrientation=null,this.elevation=null,this.elevationSource=null,this.name=null,this.sourceMap=null}read(e,t){const r={},{attributes:o,geometry:a}=e,i={};for(const s in o)r[s.toLowerCase()]=o[s],i[s.toLowerCase()]=s;const n=e.layer??{};n.sequenceOrderField?.length&&(r.sequenceorder=o[n.sequenceOrderField],i.sequenceorder=n.sequenceOrderField),super.read({geometry:a,layer:n,sourceMap:i,...r},t)}write(e,t){const r=super.write(e,t),{sourceMap:o}=this;if(!o||!r)return r;const a={};for(const i in r){const e=o[i.toLowerCase()];e&&(a[e]=r[i])}return a}readCameraHeading(e,t){const{cameraheading:r,camheading:o,layer:a}=t;return r??o??a.cameraHeading}readCameraHeight(e,t){const{cameraheight:r,avghtag:o,layer:a}=t;return r??o??a.cameraHeight}readCamOffset(e,t){const{cameraoffset:r,camoffset:o}=t;return r?.split(";").map(Number)??o?.split(";").map(Number)??null}writeCameraOffset(e,t){e&&(t.cameraOffset=e.join(";"))}readCameraOrientation(e,t){const{cameraorientation:r,camori:o}=t;return r??o}readCameraPitch(e,t){const{camerapitch:r,campitch:o,layer:a}=t;return r??o??a.cameraPitch}readCameraRoll(e,t){const{cameraroll:r,camroll:o,layer:a}=t;return r??o??a.cameraRoll}readDepthImage(e,t){const{depthimage:r,depthimg:o,layer:a}=t,i=r??o??null,{depthImagePathPrefix:n,depthImagePathSuffix:s}=a??{};return f(i,n,s)}readElevationSource(e,t){const{elevationsource:r,layer:o}=t,{demPathSuffix:a,demPathPrefix:i}=o;if(r){const e=this._parseIfJSON(r);return g(e,i,a)}return o.effectiveElevationSource}readFarDistance(e,t){const{fardistance:r,fardist:o,layer:a}=t;return r??o??a.farDistance}get geometry(){const e=this._geometry.clone();if(!e)return null;const{cameraOffset:t}=this;if(t){const[r,o,a]=t;e.x+=r,e.y+=o,null!=e.z&&null!=a&&(e.z+=a)}return e}set geometry(e){this._geometry=e}readHFOV(e,t){const{horizontalfieldofview:r,hfov:o,layer:a}=t;return r??o??a.horizontalFieldOfView}readImageURL(e,t){const{imagepath:r,layer:o}=t;r||j("imagePath",this);const{imagePathPrefix:a,imagePathSuffix:i}=o;return f(r,a,i)}readImageRotation(e,t){const{imagerotation:r,imgrot:o,layer:a}=t;return r??o??a.imageRotation}get isHorizontal(){return"horizontal"===this.orientedImageryType}get isInspection(){return"inspection"===this.orientedImageryType}get isNadir(){return"nadir"===this.orientedImageryType}get isOblique(){return"oblique"===this.orientedImageryType}get isSpherical(){return"360"===this.orientedImageryType}get location(){const{cameraOrientation:e,cameraHeight:t,elevation:r}=this;if(e){const{type:t,x:r,y:o,z:a,horizontalWKID:i,verticalWKID:n}=e,s="number"==typeof i?{wkid:i}:{wkt:i};if(t===v.LTP){const{latitude:t,longitude:r,ellipsoidRadius:o,squaredEccentricity:a,properties:i}=e,{x:n,y:s,z:p}=i;return new m(w([n,s,p],[t,r,o,a]))}const p=new m({x:r,y:o,z:a,spatialReference:s}),c=n?u("point",{wkid:n},s):null;return c&&c(p),p}if("number"!=typeof t)throw O("cameraHeight");const o=this.geometry.clone();return o.z=o.hasZ?o.z:(r??0)+t,o}set matrix(e){if(!e||9!==e.length)return a.getLogger(this).warn("Ignoring rotation matrix because it doesn't have 9 values",{value:e}),void this._set("matrix",null);this._set("matrix",e)}readNearDistance(e,t){const{neardistance:r,neardist:o,layer:a}=t;return r??o??a.nearDistance}readOffsetFromStart(e,t){return t.offsetfromstart??null}readOrientationAccuracy(e,t){const{accuracy:r,orientationaccuracy:o}=t;return o?.split(";").map(Number)??r?.split(";").map(Number)??null}writeOrientationAccuracy(e,t){e&&(t.orientationAccuracy=e.join(";"))}readOIType(e,t){const{orientedimagerytype:r,oitype:o,camerapitch:a,campitch:i,layer:n}=t,s=h.read(r??o??n.orientedImageryType),p=a??i??n.cameraPitch;return"oblique"===s?p<10?"nadir":"oblique":s}set radial(e){if(e)if("string"!=typeof e)this._set("radial",e);else{const[t,r,o]=e.split(";").map(Number);this._set("radial",[t??0,r??0,o??0])}else this._set("radial",[0,0,0])}readSequenceOrder(e,t){const{layer:r}=t;return t[r.sequenceOrderField.toLowerCase()]}writeSequenceOrder(e,t){if(!e)return;const{sourceMap:r}=this;if(r){t[r.sequenceorder]=e}}set tangential(e){if(e)if("string"!=typeof e)this._set("tangential",e);else{const[t,r]=e.split(";").map(Number);this._set("tangential",[t??0,r??0])}else this._set("tangential",[0,0])}readVFOV(e,t){const{verticalfieldofview:r,vfov:o,layer:a}=t;return r??o??a.verticalFieldOfView}_parseIfJSON(e){let t=null;try{t=JSON.parse(e)}catch(r){a.getLogger(this).error("couldn't parse the given elevation source JSON",e,r)}return t}};e([i()],I.prototype,"_geometry",void 0),e([i(b())],I.prototype,"a0",void 0),e([i(b())],I.prototype,"a1",void 0),e([i(b())],I.prototype,"a2",void 0),e([i({type:Date,json:{write:{enabled:!0,target:"acquisitionDate"},name:"acquisitiondate"}})],I.prototype,"acquisitionDate",void 0),e([i(b())],I.prototype,"b0",void 0),e([i(b())],I.prototype,"b1",void 0),e([i(b())],I.prototype,"b2",void 0),e([i({type:Number,json:{write:!0,read:{source:["cameraheading","camheading","layer.cameraHeading"]}}})],I.prototype,"cameraHeading",void 0),e([p("cameraHeading")],I.prototype,"readCameraHeading",null),e([i({type:Number,json:{write:!0}})],I.prototype,"cameraHeight",void 0),e([p("cameraHeight",["cameraheight","avghtag","layer.cameraHeight"])],I.prototype,"readCameraHeight",null),e([i()],I.prototype,"cameraOffset",void 0),e([p("cameraOffset",["cameraoffset","camoffset"])],I.prototype,"readCamOffset",null),e([l("cameraOffset")],I.prototype,"writeCameraOffset",null),e([i({json:{write:{writer:(e,t,r)=>{t[r]=e.toString()}}},type:d}),n((e=>e?y.getCameraOrientation(e):null))],I.prototype,"cameraOrientation",void 0),e([p("cameraOrientation",["cameraorientation","camori"])],I.prototype,"readCameraOrientation",null),e([i({type:Number,json:{write:!0}})],I.prototype,"cameraPitch",void 0),e([p("cameraPitch",["camerapitch","campitch","layer.cameraPitch"])],I.prototype,"readCameraPitch",null),e([i({type:Number,json:{write:!0}})],I.prototype,"cameraRoll",void 0),e([p("cameraRoll",["cameraroll","camroll","layer.cameraRoll"])],I.prototype,"readCameraRoll",null),e([i({json:{write:!0},type:String})],I.prototype,"depthImage",void 0),e([p("depthImage",["depthimage","depthimg"])],I.prototype,"readDepthImage",null),e([i({type:Number,json:{write:!0}})],I.prototype,"elevation",void 0),e([i({json:{write:!0},clonable:"reference"})],I.prototype,"elevationSource",void 0),e([p("elevationSource",["elevationsource","layer.effectiveElevationSource"])],I.prototype,"readElevationSource",null),e([i({json:{name:"exposurestationid",write:{target:"exposureStationId"}},type:String})],I.prototype,"exposureStationId",void 0),e([i({type:Number,json:{write:!0}})],I.prototype,"farDistance",void 0),e([p("farDistance",["fardistance","fardist","layer.farDistance"])],I.prototype,"readFarDistance",null),e([i(b("focallength"))],I.prototype,"focalLength",void 0),e([i({type:m,json:{name:"geometry"}})],I.prototype,"geometry",null),e([i({type:Number,json:{write:!0}})],I.prototype,"horizontalFieldOfView",void 0),e([p("horizontalFieldOfView",["horizontalfieldofview","hfov","layer.horizontalFieldOfView"])],I.prototype,"readHFOV",null),e([i({json:{write:!0},type:String})],I.prototype,"imagePath",void 0),e([p("imagePath",["imagepath"])],I.prototype,"readImageURL",null),e([i({type:Number,json:{write:!0}})],I.prototype,"imageRotation",void 0),e([p("imageRotation",["imagerotation","imgrot","layer.imageRotation"])],I.prototype,"readImageRotation",null),e([i()],I.prototype,"isHorizontal",null),e([i()],I.prototype,"isInspection",null),e([i()],I.prototype,"isNadir",null),e([i()],I.prototype,"isOblique",null),e([i()],I.prototype,"isSpherical",null),e([i()],I.prototype,"location",null),e([i(S())],I.prototype,"matrix",null),e([i({json:{write:!0},type:String})],I.prototype,"name",void 0),e([i({type:Number,json:{write:!0}})],I.prototype,"nearDistance",void 0),e([p("nearDistance",["neardistance","neardist","layer.nearDistance"])],I.prototype,"readNearDistance",null),e([i({json:{write:!0,name:"objectid"},type:Number})],I.prototype,"objectId",void 0),e([i({type:Number,json:{write:!0}})],I.prototype,"offsetFromStart",void 0),e([p("offsetFromStart",["offsetfromstart"])],I.prototype,"readOffsetFromStart",null),e([i()],I.prototype,"orientationAccuracy",void 0),e([p("orientationAccuracy",["accuracy","orientationaccuracy"])],I.prototype,"readOrientationAccuracy",null),e([l("orientationAccuracy")],I.prototype,"writeOrientationAccuracy",null),e([s(h)],I.prototype,"orientedImageryType",void 0),e([p("orientedImageryType",["orientedimagerytype","oitype","layer.orientedImageryType"])],I.prototype,"readOIType",null),e([i({type:Number,json:{write:!0,read:{source:"principalx"}}})],I.prototype,"principalX",void 0),e([i({type:Number,json:{write:!0,read:{source:"principaly"}}})],I.prototype,"principalY",void 0),e([i(S([0,0,0]))],I.prototype,"radial",null),e([i({type:String})],I.prototype,"sequenceOrder",void 0),e([p("sequenceOrder",["sequenceorder","layer.sequenceOrderField"])],I.prototype,"readSequenceOrder",null),e([l("sequenceOrder")],I.prototype,"writeSequenceOrder",null),e([i({type:Object})],I.prototype,"sourceMap",void 0),e([i(S([0,0]))],I.prototype,"tangential",null),e([i({type:Number,json:{write:!0}})],I.prototype,"verticalFieldOfView",void 0),e([p("verticalFieldOfView",["verticalfieldofview","vfov","layer.verticalFieldOfView"])],I.prototype,"readVFOV",null),I=e([c("esri.layers.orientedImagery.core.ExposurePoint")],I);export{I 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/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../core/Error.js";import{urlToObject as r,getFilename as a}from"../../core/urlUtils.js";import{parse as t,parseNonStandardSublayerUrl as s}from"./arcgisLayerUrl.js";import{findAssociatedFeatureService as l}from"./associatedFeatureServiceUtils.js";import{getLayerModuleType as o,fetchFeatureService as n}from"./fetchService.js";import{getPreferredUrl as c,sceneServiceLayerTypeToClassName as i}from"./layerUtils.js";import{layerLookupMap as u}from"./lazyLayerLoader.js";import{fetchArcGISServiceJSON as y}from"../../support/requestPresets.js";const f={FeatureLayer:!0,SceneLayer:!0,VideoLayer:!0};async function p(e){const{properties:r,url:a}=e,t={...r,url:a},s=await v(a,r?.customParameters),{Constructor:l,layerId:o,sourceJSON:n,parsedUrl:c,preferredUrl:i,layers:u,tables:y}=s;if(i&&(t.url=i),u.length+y.length===0)return null!=o&&(t.layerId=o),null!=n&&(t.sourceJSON=n),new l(t);const f=new(0,(await import("../GroupLayer.js")).default)({title:c.title});return await w(f,s,t),f}function m(e,r){return e?e.find((({id:e})=>e===r)):null}function d(e,r,a,t,s){const l={...s,layerId:r};return null!=e&&(l.url=e),null!=a&&(l.sourceJSON=a),"sublayerTitleMode"in t.prototype&&(l.sublayerTitleMode="service-name"),new t(l)}async function w(e,r,a){const t=r.sublayerConstructorProvider;for(const{id:s,serverUrl:l}of r.layers){const o=m(r.sublayerInfos,s),n=d(l,s,o,(o&&t?.(o))??r.Constructor,a);e.add(n)}if(r.tables.length){const t=await L("FeatureLayer");r.tables.forEach((({id:s,serverUrl:l})=>{const o=d(l,s,m(r.tableInfos,s),t,a);e.tables.add(o)}))}}async function v(r,a){let s=t(r);if(null==s&&(s=await S(r,a)),null==s)throw new e("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:r});const{serverType:l,sublayer:n}=s;let u;const p={FeatureServer:"FeatureLayer",KnowledgeGraphServer:"KnowledgeGraphLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer",VideoServer:"VideoLayer"},m="FeatureServer"===l,d="SceneServer"===l,w={parsedUrl:s,Constructor:null,layerId:m||d?n??void 0:void 0,layers:[],tables:[]};switch(l){case"MapServer":if(null!=n){const{type:t}=await y(r,{customParameters:a});switch(u="FeatureLayer",t){case"Catalog Layer":u="CatalogLayer";break;case"Catalog Dynamic Group Layer":throw new e("arcgis-layers:unsupported",`fromUrl() not supported for "${t}" layers`)}}else{u=await g(r,a)?"TileLayer":"MapImageLayer"}break;case"ImageServer":{const e=await y(r,{customParameters:a}),{tileInfo:t,cacheType:s}=e;u=t?"LERC"!==t?.format?.toUpperCase()||s&&"elevation"!==s.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await y(s.url.path,{customParameters:a});if(u="SceneLayer",e){const r=e?.layers;if("Voxel"===e?.layerType)u="VoxelLayer";else if(r?.length){const e=r[0]?.layerType;null!=e&&null!=i[e]&&(u=i[e])}}break}case"3DTilesServer":throw new e("arcgis-layers:unsupported","fromUrl() not supported for 3DTiles layers");case"FeatureServer":if(u="FeatureLayer",null!=n){const e=await y(r,{customParameters:a});w.sourceJSON=e,w.preferredUrl=c(r,e),u=o(e.type)}break;default:u=p[l]}if(f[u]&&null==n){const e=await h(r,l,a);m&&(w.preferredUrl=e.preferredUrl,w.sublayerInfos=e.layerInfos,w.tableInfos=e.tableInfos);if(1!==e.layers.length+e.tables.length)w.layers=e.layers,w.tables=e.tables,m&&e.layerInfos?.length&&(w.sublayerConstructorProvider=await P(e.layerInfos));else if(m||d){const r=e.layerInfos?.[0]??e.tableInfos?.[0];if(w.layerId=e.layers[0]?.id??e.tables[0]?.id,w.sourceJSON=r,m){const e=r?.type;u=o(e)}}}return w.Constructor=await L(u),w}async function S(e,t){const l=await y(e,{customParameters:t});let o=null,n=null;const c=l.type;if("Feature Layer"===c||"Table"===c?(o="FeatureServer",n=l.id??null):"indexedVector"===c?o="VectorTileServer":l.hasOwnProperty("mapName")?o="MapServer":l.hasOwnProperty("bandCount")&&l.hasOwnProperty("pixelSizeX")?o="ImageServer":l.hasOwnProperty("maxRecordCount")&&l.hasOwnProperty("allowGeometryUpdates")?o="FeatureServer":l.hasOwnProperty("streamUrls")?o="StreamServer":b(l)?(o="SceneServer",n=l.id):l.hasOwnProperty("layers")&&b(l.layers?.[0])&&(o="SceneServer"),!o)return null;const i=null!=n?s(e):null;return{title:null!=i&&l.name||a(e),serverType:o,sublayer:n,url:{path:null!=i?i.serviceUrl:r(e).path}}}function b(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function h(e,r,a){let t,s,l,o=!1;switch(r){case"FeatureServer":{const r=await n(e,{customParameters:a});l=r.preferredUrl,o=!!r.layersJSON,t=r.layersJSON||r.serviceJSON;break}case"SceneServer":{const r=await I(e,a);t=r.serviceInfo,s=r.tableServerUrl;break}default:t=await y(e,{customParameters:a})}const c=t?.layers,i=t?.tables;return{preferredUrl:l,layers:c?.map((e=>({id:e.id}))).reverse()||[],tables:i?.map((e=>({serverUrl:s,id:e.id}))).reverse()||[],layerInfos:o?c:[],tableInfos:o?i:[]}}async function I(e,r){const a=await y(e,{customParameters:r}),t=a.layers?.[0];if(!t)return{serviceInfo:a};try{const{serverUrl:t}=await l(e),s=await y(t,{customParameters:r}).catch((()=>null));return s&&(a.tables=s.tables),{serviceInfo:a,tableServerUrl:t}}catch{return{serviceInfo:a}}}async function L(e){return(0,u[e])()}async function g(e,r){return(await y(e,{customParameters:r})).tileInfo}async function P(e){if(!e.length)return;const r=new Set,a=[];for(const{type:l}of e)r.has(l)||(r.add(l),a.push(L(o(l))));const t=await Promise.all(a),s=new Map;return Array.from(r).forEach(((e,r)=>{s.set(e,t[r])})),e=>s.get(e.type)}export{p as fromUrl};
5
+ import e from"../../core/Error.js";import{urlToObject as r,getFilename as a}from"../../core/urlUtils.js";import{parse as t,parseNonStandardSublayerUrl as s}from"./arcgisLayerUrl.js";import{findAssociatedFeatureService as l}from"./associatedFeatureServiceUtils.js";import{getLayerModuleType as o,fetchFeatureService as n}from"./fetchService.js";import{getPreferredUrl as c,sceneServiceLayerTypeToClassName as i}from"./layerUtils.js";import{layerLookupMap as u}from"./lazyLayerLoader.js";import{fetchArcGISServiceJSON as y}from"../../support/requestPresets.js";const f={FeatureLayer:!0,SceneLayer:!0,VideoLayer:!0};async function p(e){const{properties:r,url:a}=e,t={...r,url:a},s=await v(a,r?.customParameters),{Constructor:l,layerId:o,sourceJSON:n,parsedUrl:c,preferredUrl:i,layers:u,tables:y}=s;if(i&&(t.url=i),u.length+y.length===0)return null!=o&&(t.layerId=o),null!=n&&(t.sourceJSON=n),new l(t);const f=new(0,(await import("../GroupLayer.js")).default)({title:c.title});return await w(f,s,t),f}function m(e,r){return e?e.find((({id:e})=>e===r)):null}function d(e,r,a,t,s){const l={...s,layerId:r};return null!=e&&(l.url=e),null!=a&&(l.sourceJSON=a),"sublayerTitleMode"in t.prototype&&(l.sublayerTitleMode="service-name"),new t(l)}async function w(e,r,a){const t=r.sublayerConstructorProvider;for(const{id:s,serverUrl:l}of r.layers){const o=m(r.sublayerInfos,s),n=d(l,s,o,(o&&t?.(o))??r.Constructor,a);e.add(n)}if(r.tables.length){const t=await L("FeatureLayer");r.tables.forEach((({id:s,serverUrl:l})=>{const o=d(l,s,m(r.tableInfos,s),t,a);e.tables.add(o)}))}}async function v(r,a){let s=t(r);if(null==s&&(s=await S(r,a)),null==s)throw new e("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:r});const{serverType:l,sublayer:n}=s;let u;const p={FeatureServer:"FeatureLayer",KnowledgeGraphServer:"KnowledgeGraphLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer",VideoServer:"VideoLayer"},m="FeatureServer"===l,d="SceneServer"===l,w={parsedUrl:s,Constructor:null,layerId:m||d?n??void 0:void 0,layers:[],tables:[]};switch(l){case"MapServer":if(null!=n){const{type:t}=await y(r,{customParameters:a});switch(u="FeatureLayer",t){case"Catalog Layer":u="CatalogLayer";break;case"Catalog Dynamic Group Layer":throw new e("arcgis-layers:unsupported",`fromUrl() not supported for "${t}" layers`)}}else{u=await g(r,a)?"TileLayer":"MapImageLayer"}break;case"ImageServer":{const e=await y(r,{customParameters:a}),{tileInfo:t,cacheType:s}=e;u=t?"LERC"!==t?.format?.toUpperCase()||s&&"elevation"!==s.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await y(s.url.path,{customParameters:a});if(u="SceneLayer",e){const r=e?.layers;if("Voxel"===e?.layerType)u="VoxelLayer";else if(r?.length){const e=r[0]?.layerType;null!=e&&null!=i[e]&&(u=i[e])}}break}case"3DTilesServer":throw new e("arcgis-layers:unsupported","fromUrl() not supported for 3DTiles layers");case"FeatureServer":if(u="FeatureLayer",null!=n){const e=await y(r,{customParameters:a});w.sourceJSON=e,w.preferredUrl=c(r,e),u=o(e.type)}break;default:u=p[l]}if(f[u]&&null==n){const e=await h(r,l,a);m&&(w.preferredUrl=e.preferredUrl,w.sublayerInfos=e.layerInfos,w.tableInfos=e.tableInfos);if(1!==e.layers.length+e.tables.length)w.layers=e.layers,w.tables=e.tables,m&&e.layerInfos?.length&&(w.sublayerConstructorProvider=await P(e.layerInfos));else if(m||d){const r=e.layerInfos?.[0]??e.tableInfos?.[0];if(w.layerId=e.layers[0]?.id??e.tables[0]?.id,w.sourceJSON=r,m){const e=r?.type;u=o(e)}}}return w.Constructor=await L(u),w}async function S(e,t){const l=await y(e,{customParameters:t});let o=null,n=null;const c=l.type;if("Feature Layer"===c||"Table"===c?(o="FeatureServer",n=l.id??null):"indexedVector"===c?o="VectorTileServer":l.hasOwnProperty("mapName")?o="MapServer":l.hasOwnProperty("bandCount")&&l.hasOwnProperty("pixelSizeX")?o="ImageServer":l.hasOwnProperty("maxRecordCount")&&l.hasOwnProperty("allowGeometryUpdates")?o="FeatureServer":l.hasOwnProperty("streamUrls")?o="StreamServer":b(l)?(o="SceneServer",n=l.id):l.hasOwnProperty("layers")&&b(l.layers?.[0])&&(o="SceneServer"),!o)return null;const i=null!=n?s(e):null;return{title:null!=i&&l.name||a(e),serverType:o,sublayer:n,url:{path:null!=i?i.serviceUrl:r(e).path}}}function b(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function h(e,r,a){let t,s,l,o=!1;switch(r){case"FeatureServer":{const r=await n(e,{customParameters:a});l=c(e,{preferredHost:r.preferredHost}),o=!!r.layersJSON,t=r.layersJSON||r.serviceJSON;break}case"SceneServer":{const r=await I(e,a);t=r.serviceInfo,s=r.tableServerUrl;break}default:t=await y(e,{customParameters:a})}const i=t?.layers,u=t?.tables;return{preferredUrl:l,layers:i?.map((e=>({id:e.id}))).reverse()||[],tables:u?.map((e=>({serverUrl:s,id:e.id}))).reverse()||[],layerInfos:o?i:[],tableInfos:o?u:[]}}async function I(e,r){const a=await y(e,{customParameters:r}),t=a.layers?.[0];if(!t)return{serviceInfo:a};try{const{serverUrl:t}=await l(e),s=await y(t,{customParameters:r}).catch((()=>null));return s&&(a.tables=s.tables),{serviceInfo:a,tableServerUrl:t}}catch{return{serviceInfo:a}}}async function L(e){return(0,u[e])()}async function g(e,r){return(await y(e,{customParameters:r})).tileInfo}async function P(e){if(!e.length)return;const r=new Set,a=[];for(const{type:l}of e)r.has(l)||(r.add(l),a.push(L(o(l))));const t=await Promise.all(a),s=new Map;return Array.from(r).forEach(((e,r)=>{s.set(e,t[r])})),e=>s.get(e.type)}export{p as fromUrl};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{getPreferredUrl as e}from"./layerUtils.js";import{fetchArcGISServiceJSON as r}from"../../support/requestPresets.js";const t=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function a(t,a){const{loadContext:n,...s}=a||{},o=n?await n.fetchServiceMetadata(t,s):await r(t,s),y=e(t,o);i(o),c(o);const l={serviceJSON:o,preferredUrl:y};if((o.currentVersion??0)<10.5)return l;const u=`${y??t}/layers`,f=n?await n.fetchServiceMetadata(u,s):await r(u,s);return i(f),c(f),l.layersJSON={layers:f.layers,tables:f.tables},l}function n(e){const{type:r}=e;return!!r&&t.has(r)}function s(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(n),e.tables=e.tables?.filter(s)}function o(e){e.type||="Feature Layer"}function y(e){e.type||="Table"}function i(e){e.layers?.forEach(o),e.tables?.forEach(y)}function l(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}export{a as fetchFeatureService,l as getLayerModuleType};
5
+ import{getPreferredHost as e,getPreferredUrl as r}from"./layerUtils.js";import{fetchArcGISServiceJSON as t}from"../../support/requestPresets.js";const a=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function n(a,n){const{loadContext:s,...o}=n||{},y=s?await s.fetchServiceMetadata(a,o):await t(a,o),i=e(y);u(y),c(y);const l={serviceJSON:y,preferredHost:i};if((y.currentVersion??0)<10.5)return l;const f=`${r(a,y)??a}/layers`,L=s?await s.fetchServiceMetadata(f,o):await t(f,o);return u(L),c(L),l.layersJSON={layers:L.layers,tables:L.tables},l}function s(e){const{type:r}=e;return!!r&&a.has(r)}function o(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(s),e.tables=e.tables?.filter(o)}function y(e){e.type||="Feature Layer"}function i(e){e.type||="Table"}function u(e){e.layers?.forEach(y),e.tables?.forEach(i)}function l(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}export{n as fetchFeatureService,l as getLayerModuleType};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{id as e}from"../../kernel.js";import t from"../../request.js";import n from"../../core/Collection.js";import{hasSameOrigin as r,changeHost as i}from"../../core/urlUtils.js";import{isLayerFromCatalog as u}from"../catalog/catalogUtils.js";function s(e){return d(e)||y(e)}function o(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}function a(e){return null!=e&&"object"==typeof e&&"type"in e&&"graphics"===e.type}function c(e){return null!=e&&"object"==typeof e&&"type"in e&&"map-image"===e.type}function l(e){return null!=e&&"object"==typeof e&&"type"in e&&"map-notes"===e.type&&"sublayers"in e}function f(e){return null!=e&&"object"==typeof e&&"type"in e&&"knowledge-graph"===e.type&&"layers"in e}function p(e){return null!=e&&"object"==typeof e&&"type"in e&&"link-chart"===e.type&&"layers"in e}function y(e){return"scene"===e?.type}function g(e){return null!=e&&"object"==typeof e&&"type"in e&&"subtype-group"===e.type&&"sublayers"in e}function b(e){return"subtype-sublayer"===e?.type}function d(e){const t=e?.type;return"imagery-tile"===t||"tile"===t||"open-street-map"===t||"vector-tile"===t||"web-tile"===t||"wmts"===t}function m(e){const t=e?.type;return"base-tile"===t||"tile"===t||"elevation"===t||"imagery-tile"===t||"base-elevation"===t||"open-street-map"===t||"wcs"===t||"web-tile"===t||"wmts"===t||"vector-tile"===t}function h(e){return null!=e&&"type"in e&&"group"===e.type}const j={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function v(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function w(e){return"IntegratedMeshLayer"===e||"IntegratedMesh3DTilesLayer"===e}function L(e){return"integrated-mesh"===e||"integrated-mesh-3dtiles"===e}function S(e){return"voxel"===e?.type}function E(e){return"imagery-tile"===e?.type}function C(e,t){return null!=e?.parent&&"declaredClass"in e.parent&&"esri.Basemap"===e.parent.declaredClass&&e.parent[t].includes(e)}function M(e){return C(e,"baseLayers")}function x(e){return C(e,"referenceLayers")}function I(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function T(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function U(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}function k(e){const t=/[:;]/,n=[];let r=!1;if(e&&(e.forEach(((e,i)=>{n.push([i,e]),!r&&t.test(e)&&(r=!0)})),n.length>0)){let e;if(r){const t={};n.forEach((e=>{t[e[0]]=e[1]})),e=JSON.stringify(t)}else{const t=[];n.forEach((e=>{t.push(e[0]+":"+e[1])})),e=t.join(";")}return e}return null}function O(e){if(!e)return;const t=[];return e.forEach(((e,n)=>{t.push('"'+n+'":'+JSON.stringify(e))})),t.length?"{"+t.join(",")+"}":void 0}function B(e){if(e.activeLayer){const t=e.activeLayer.tileMatrixSet;if(t)return t;const n=e.activeLayer.tileMatrixSets;if(n)return n}return null}async function P(n,r){const i=e?.findServerInfo(n);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const u=n.toLowerCase().indexOf("/rest/services");if(-1===u)return null;const s=`${n.slice(0,u)}/rest/info`,o=null!=r?r.signal:null,{data:a}=await t(s,{query:{f:"json"},responseType:"json",signal:o});return a?.owningSystemUrl||null}function q(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}function D(e){return null!=e&&"object"==typeof e&&"isTable"in e&&!!e.isTable}function J(e){return q(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function N(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}function $(e){return!!N(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function F(e){if(!e)return[];return("subtypes"in e?e.subtypes:g(e.parent)?e.parent.subtypes:[])??[]}function H(e){return("imagery"===e.type||"imagery-tile"===e.type)&&"flow"===e.renderer?.type}function V(e){const t=new n;for(const n of e.allLayers.concat(e.allTables))"csv"===n.type||u(n)||("charts"in n&&t.push(n),"subtype-group"===n.type&&t.push(...n.sublayers));return t}function z(e,t){const n=t?.preferredHost;return!n||r(e,`https://${n}`,!0)?null:i(e,n)}function A(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function G(e,t){t&&A(e)&&(e.url=t)}export{G as applyPreferredUrl,$ as getEffectiveEditingEnabled,J as getEffectiveLayerCapabilities,V as getLayersWithChartSupport,P as getOwningPortalUrl,z as getPreferredUrl,F as getSubtypesFromLayer,B as getTileMaxtrixSetFromActiveLayer,M as isBaseLayer,s as isBasemap3DSupportedLayer,d as isBasemapSupportedTiledLayer,I as isFeatureCollectionLayer,o as isFeatureLayer,U as isFeatureServiceLayer,a as isGraphicsLayer,h as isGroupLayer,E as isImageryTileLayer,L as isIntegratedMeshLayer,w as isIntegratedMeshOperationalLayer,f as isKnowledgeGraphLayer,q as isLayerWithFeatureCapabilities,T as isLayerWithFeatureLayerSource,H as isLayerWithFlowRenderer,p as isLinkChartLayer,c as isMapImageLayer,l as isMapNotesLayer,A as isPreferredUrlApplicable,x as isReferenceLayer,y as isSceneLayer,v as isSceneServiceLayer,g as isSubtypeGroupLayer,b as isSubtypeSublayer,D as isTable,m as isTiledLayer,S as isVoxelLayer,j as sceneServiceLayerTypeToClassName,k as serializeLayerDefinitions,O as serializeTimeOptions};
5
+ import{id as e}from"../../kernel.js";import t from"../../request.js";import n from"../../core/Collection.js";import{hasSameOrigin as r,changeHost as i}from"../../core/urlUtils.js";import{isLayerFromCatalog as u}from"../catalog/catalogUtils.js";function s(e){return d(e)||y(e)}function o(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}function a(e){return null!=e&&"object"==typeof e&&"type"in e&&"graphics"===e.type}function c(e){return null!=e&&"object"==typeof e&&"type"in e&&"map-image"===e.type}function l(e){return null!=e&&"object"==typeof e&&"type"in e&&"map-notes"===e.type&&"sublayers"in e}function f(e){return null!=e&&"object"==typeof e&&"type"in e&&"knowledge-graph"===e.type&&"layers"in e}function p(e){return null!=e&&"object"==typeof e&&"type"in e&&"link-chart"===e.type&&"layers"in e}function y(e){return"scene"===e?.type}function g(e){return null!=e&&"object"==typeof e&&"type"in e&&"subtype-group"===e.type&&"sublayers"in e}function b(e){return"subtype-sublayer"===e?.type}function d(e){const t=e?.type;return"imagery-tile"===t||"tile"===t||"open-street-map"===t||"vector-tile"===t||"web-tile"===t||"wmts"===t}function m(e){const t=e?.type;return"base-tile"===t||"tile"===t||"elevation"===t||"imagery-tile"===t||"base-elevation"===t||"open-street-map"===t||"wcs"===t||"web-tile"===t||"wmts"===t||"vector-tile"===t}function h(e){return null!=e&&"type"in e&&"group"===e.type}const j={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function v(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function w(e){return"IntegratedMeshLayer"===e||"IntegratedMesh3DTilesLayer"===e}function L(e){return"integrated-mesh"===e||"integrated-mesh-3dtiles"===e}function S(e){return"voxel"===e?.type}function E(e){return"imagery-tile"===e?.type}function C(e,t){return null!=e?.parent&&"declaredClass"in e.parent&&"esri.Basemap"===e.parent.declaredClass&&e.parent[t].includes(e)}function M(e){return C(e,"baseLayers")}function x(e){return C(e,"referenceLayers")}function I(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function T(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function U(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}function k(e){const t=/[:;]/,n=[];let r=!1;if(e&&(e.forEach(((e,i)=>{n.push([i,e]),!r&&t.test(e)&&(r=!0)})),n.length>0)){let e;if(r){const t={};n.forEach((e=>{t[e[0]]=e[1]})),e=JSON.stringify(t)}else{const t=[];n.forEach((e=>{t.push(e[0]+":"+e[1])})),e=t.join(";")}return e}return null}function O(e){if(!e)return;const t=[];return e.forEach(((e,n)=>{t.push('"'+n+'":'+JSON.stringify(e))})),t.length?"{"+t.join(",")+"}":void 0}function B(e){if(e.activeLayer){const t=e.activeLayer.tileMatrixSet;if(t)return t;const n=e.activeLayer.tileMatrixSets;if(n)return n}return null}async function P(n,r){const i=e?.findServerInfo(n);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const u=n.toLowerCase().indexOf("/rest/services");if(-1===u)return null;const s=`${n.slice(0,u)}/rest/info`,o=null!=r?r.signal:null,{data:a}=await t(s,{query:{f:"json"},responseType:"json",signal:o});return a?.owningSystemUrl||null}function q(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}function D(e){return null!=e&&"object"==typeof e&&"isTable"in e&&!!e.isTable}function H(e){return q(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function J(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}function N(e){return!!J(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function $(e){if(!e)return[];return("subtypes"in e?e.subtypes:g(e.parent)?e.parent.subtypes:[])??[]}function F(e){return("imagery"===e.type||"imagery-tile"===e.type)&&"flow"===e.renderer?.type}function V(e){const t=new n;for(const n of e.allLayers.concat(e.allTables))"csv"===n.type||u(n)||("charts"in n&&t.push(n),"subtype-group"===n.type&&t.push(...n.sublayers));return t}function z(e,t){const n=A(t);return!n||r(e,`https://${n}`,!0)?null:i(e,n)}function A(e){return e?.preferredHost}function G(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function K(e,t){if(!t||!G(e))return;const n=z(e.url,{preferredHost:t});n&&(e.url=n)}export{K as applyPreferredHostToPortalItem,N as getEffectiveEditingEnabled,H as getEffectiveLayerCapabilities,V as getLayersWithChartSupport,P as getOwningPortalUrl,A as getPreferredHost,z as getPreferredUrl,$ as getSubtypesFromLayer,B as getTileMaxtrixSetFromActiveLayer,M as isBaseLayer,s as isBasemap3DSupportedLayer,d as isBasemapSupportedTiledLayer,I as isFeatureCollectionLayer,o as isFeatureLayer,U as isFeatureServiceLayer,a as isGraphicsLayer,h as isGroupLayer,E as isImageryTileLayer,L as isIntegratedMeshLayer,w as isIntegratedMeshOperationalLayer,f as isKnowledgeGraphLayer,q as isLayerWithFeatureCapabilities,T as isLayerWithFeatureLayerSource,F as isLayerWithFlowRenderer,p as isLinkChartLayer,c as isMapImageLayer,l as isMapNotesLayer,G as isPreferredUrlApplicable,x as isReferenceLayer,y as isSceneLayer,v as isSceneServiceLayer,g as isSubtypeGroupLayer,b as isSubtypeSublayer,D as isTable,m as isTiledLayer,S as isVoxelLayer,j as sceneServiceLayerTypeToClassName,k as serializeLayerDefinitions,O as serializeTimeOptions};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.33.0-next.20250611",
3
+ "version": "4.33.0-next.20250613",
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": [