@arcgis/core 4.32.0-next.20250107 → 4.32.0-next.20250108

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 (99) hide show
  1. package/WebLinkChart.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{07304287ed5244fa4e12.js → 12b2c8251ec2d0e2ca46.js} +1 -1
  4. package/assets/esri/core/workers/chunks/24a597ae32a2083a50a5.js +1 -0
  5. package/assets/esri/core/workers/chunks/510cb8647841fec436c8.js +1 -0
  6. package/assets/esri/core/workers/chunks/{f6d6bc43ac1c13892d44.js → 58485909e1cfeb52c01e.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{c49707b577f3805f0142.js → 5b61a1e7ac60a02a906d.js} +1 -1
  8. package/assets/esri/core/workers/chunks/76a7114a69264f5c07b0.js +2 -0
  9. package/assets/esri/core/workers/chunks/{ca1e186f136abb23ae4b.js → 7d0fc25ce1f74adcfeb6.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{dca0eb66116e4b5403fc.js → 7df076d15b7b7a66dcee.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{955421ee2247965244f0.js → 7fe92f072d3641ec4662.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{4423aac6e44c3dbf184e.js → 89286d8f59844724cd16.js} +1 -1
  13. package/assets/esri/core/workers/chunks/a8ec4189ec3b37d5ff74.js +1 -0
  14. package/assets/esri/core/workers/chunks/cd92b80de7e9f982f9a9.js +1 -0
  15. package/chunks/CrackAndCluster-CfzXpEle.js +1 -1
  16. package/chunks/LineSeries.js +1 -1
  17. package/chunks/OperatorProject.js +1 -1
  18. package/chunks/Pattern.glsl.js +1 -1
  19. package/chunks/QuadraticBezier.js +1 -1
  20. package/chunks/Transformation2D.js +1 -1
  21. package/chunks/chartUtilsAm5.js +1 -1
  22. package/chunks/lyr3DWorker.js +1 -1
  23. package/chunks/vxlLayer.js +1 -1
  24. package/geometry/support/meshUtils/primitives.js +1 -1
  25. package/geometry/support/triangle.js +1 -1
  26. package/interfaces.d.ts +175 -91
  27. package/layers/LinkChartLayer.js +1 -1
  28. package/layers/MapNotesLayer.js +1 -1
  29. package/layers/MediaLayer.js +1 -1
  30. package/layers/support/ImageElement.js +1 -1
  31. package/layers/support/VideoElement.js +1 -1
  32. package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
  33. package/layers/video/VideoController.js +1 -1
  34. package/linkChart/OrganicLayoutSettings.js +1 -1
  35. package/package.json +3 -3
  36. package/smartMapping/renderers/color.js +1 -1
  37. package/smartMapping/renderers/size.js +1 -1
  38. package/smartMapping/renderers/univariateColorSize.js +1 -1
  39. package/support/mediaLayerUtils.js +5 -0
  40. package/support/revision.js +1 -1
  41. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  42. package/symbols/cim/placements/PlacementInsidePolygon.js +1 -1
  43. package/views/2d/AnimationManager.js +1 -1
  44. package/views/2d/engine/vectorTiles/buckets/FillBucket.js +1 -1
  45. package/views/2d/engine/webgl/Overlay.js +1 -1
  46. package/views/2d/engine/webgl/SDFConverter.js +1 -1
  47. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  48. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  49. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  50. package/views/2d/layers/features/support/GraphicsReader.js +1 -1
  51. package/views/2d/navigation/MapViewNavigation.js +1 -1
  52. package/views/2d/support/HighlightGroup.js +1 -1
  53. package/views/3d/analysis/Slice/ShiftManipulator.js +1 -1
  54. package/views/3d/analysis/Viewshed/FieldOfViewManipulation.js +1 -1
  55. package/views/3d/analysis/support/measurementUtils.js +1 -1
  56. package/views/3d/environment/CloudsParameters.js +1 -1
  57. package/views/3d/environment/MarsAtmosphere.js +1 -1
  58. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
  59. package/views/3d/layers/MediaLayerView3D.js +1 -1
  60. package/views/3d/layers/graphics/placementUtils.js +1 -1
  61. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  62. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  63. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  64. package/views/3d/support/HighlightGroup.js +1 -1
  65. package/views/3d/terrain/SphericalPatch.js +1 -1
  66. package/views/3d/terrain/TilePerLayerInfo.js +1 -1
  67. package/views/3d/terrain/TileRenderer.js +1 -1
  68. package/views/3d/terrain/TileTexture.js +1 -1
  69. package/views/3d/webgl-engine/collections/Component/ComponentIntersectionData.js +1 -1
  70. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  71. package/views/3d/webgl-engine/lib/PathProfile.js +1 -1
  72. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  73. package/views/SceneView.js +1 -1
  74. package/views/View.js +1 -1
  75. package/views/input/BrowserEventSource.js +1 -1
  76. package/views/layers/MediaLayerView.js +1 -1
  77. package/views/support/HighlightGroup.d.ts +4 -0
  78. package/views/support/HighlightGroup.js +5 -0
  79. package/views/webgl/Texture.js +1 -1
  80. package/views/webgl/textureUtils.js +1 -1
  81. package/webscene/Slide.js +1 -1
  82. package/widgets/BasemapLayerList.js +1 -1
  83. package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
  84. package/widgets/CatalogLayerList.js +1 -1
  85. package/widgets/FeatureTable/support/exportUtils.js +1 -1
  86. package/widgets/LayerList/support/layerListUtils.js +1 -1
  87. package/widgets/LayerList.js +1 -1
  88. package/widgets/Legend/styles/support/relationshipUtils.js +1 -1
  89. package/widgets/PanoramicViewer/utils.js +1 -1
  90. package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
  91. package/widgets/Sketch/SketchViewModel.js +1 -1
  92. package/widgets/TableList.js +1 -1
  93. package/assets/esri/core/workers/chunks/127c82cdb229434883b6.js +0 -1
  94. package/assets/esri/core/workers/chunks/66b411119b8ffb99b9dc.js +0 -1
  95. package/assets/esri/core/workers/chunks/8cd2c9ec1e541836b81c.js +0 -1
  96. package/assets/esri/core/workers/chunks/b07710e01494a6cda097.js +0 -1
  97. package/assets/esri/core/workers/chunks/c05e0bd145a1c27d6857.js +0 -2
  98. package/views/2d/support/HighlightGroup.d.ts +0 -4
  99. /package/assets/esri/core/workers/chunks/{c05e0bd145a1c27d6857.js.LICENSE.txt → 76a7114a69264f5c07b0.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4172],{9775:(e,t,r)=>{r.d(t,{A:()=>o});var s=r(62788),i=r(95488);class o{constructor(e=e=>e.values().next().value){this._peeker=e,this._observable=new i.I,this._items=new Set}get length(){return(0,s.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,s.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,s.gc)(this._observable),yield*this._items}}},10382:(e,t,r)=>{r.d(t,{A:()=>c});var s=r(36563),i=(r(44208),r(74887)),o=r(9775),n=r(72457),a=r(52268),l=r(61322);class c{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new o.A}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,s)=>{let o=!0;const n=e=>{(0,i.Te)(t.signal),o&&(o=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let o=0;o<e.length;++o){const a=e[o];(0,i.$X)(a)?this._clientPromises[o]=a.then((e=>(this._clients[o]=new l.default(e,t,this._ongoingJobsQueue),n(r),this._clients[o])),(()=>(n(s),null))):(this._clients[o]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[o]=Promise.resolve(this._clients[o]),n(r))}}))}broadcast(e,t,r){const s=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const o=this._clientPromises[i];s[i]=o.then((s=>s?.invoke(e,t,r)))}return s}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,i.NK)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,n.h)(this)}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const s=(0,i.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:s});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return s.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,s.vE)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let s=0;s<this._clientPromises.length;++s)this._clientPromises[s].then((i=>{i&&(t[s]=i.openPort()),0==--r&&e(t)}))}))}get test(){}}},35982:(e,t,r)=>{r.d(t,{B:()=>l});var s=r(4576),i=r(36563),o=r(53966),n=r(74887),a=r(29953);class l{constructor(e,t,r,s,i={}){this._mainMethod=t,this._transferLists=r,this._listeners=[],this._promise=(0,a.ho)(e,{...i,schedule:s}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,i.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>o.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const r={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(r),this._connectListener(r),(0,i.hA)((()=>{r.removed=!0,(0,s.TF)(this._listeners,r),this._thread&&null!=r.threadHandle&&r.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,r){if(this._thread){const s=this._transferLists[e],i=s?s(t):[];return this._thread.invoke(e,t,{transferList:i,signal:r})}return this._promise?this._promise.then((()=>((0,n.Te)(r),this.invokeMethod(e,t,r)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}},72457:(e,t,r)=>{r.d(t,{h:()=>o,k:()=>i});const s=new FinalizationRegistry((e=>{e.close()}));function i(e,t){s.register(e,t,t)}function o(e){s.unregister(e)}},29953:(e,t,r)=>{r.d(t,{ho:()=>j});var s=r(49186),i=r(44208),o=r(74887),n=r(10382),a=r(72457),l=r(61322),c=r(53966),h=r(97768),d=r(78888),u=r(84952);const p={async request(e,t){const r=e.options,s=r.responseType;r.signal=t?.signal,r.responseType="native"===s||"native-request-init"===s?"native-request-init":s&&["blob","json","text"].includes(s)&&(0,u.sC)(e.url)?.after?s:"array-buffer";const i=await(0,d.A)(e.url,r),o={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch(i.requestOptions?.responseType){case"native-request-init":return delete o.data.signal,o;case"blob":o.data=await o.data.arrayBuffer();break;case"json":o.data=(new TextEncoder).encode(JSON.stringify(o.data)).buffer;break;case"text":o.data=(new TextEncoder).encode(o.data).buffer}return{result:o,transferList:[o.data]}}};var m=r(8341),_=r(2741),g=r(92602),f=(r(47566),r(70333));const A={};var E=r(26390);class b{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class T{constructor(){this._dispatcher=new b,this._workerPostMessage({type:m.Go.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,E.d)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,E.d)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,m.VI)(e);if(t&&t.type===m.Go.OPEN){const{modulePath:e,jobId:r}=t;let s=await l.default.loadWorker(e);s||(s=await import(e));const i=l.default.connect(s);this._workerPostMessage({type:m.Go.OPENED,jobId:r,data:i})}}}var R=r(73444),w=r(18357);const I=()=>c.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:y}=m.Go;let M,v;const P="Failed to create Worker. Fallback to execute module in main thread";async function x(e){return new Promise((t=>{function r(i){const o=(0,m.VI)(i);o&&o.type===y&&(e.removeEventListener("message",r),e.removeEventListener("error",s),t(e))}function s(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",s),I().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new T).addEventListener("message",r),e.addEventListener("error",s)}e.addEventListener("message",r),e.addEventListener("error",s)}))}let N=0;const{ABORT:C,INVOKE:S,OPEN:D,OPENED:k,RESPONSE:U}=m.Go;class H{static async create(e){const t=await async function(){if(!(0,i.A)("esri-workers"))return x(new T);if(!M&&!v)try{const e='let globalId=0;const outgoing=new Map,configuration={CONFIGURATION};self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;let s=null;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());s=()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))},t.addEventListener("abort",s)}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})})).finally((()=>{t&&t.removeEventListener("abort",s)}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\nModules version: ${r}\nAssets version: ${n??s}\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let n;function t(e){const o=n.connect(e);self.postMessage({type:2,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split("{CONFIGURATION}").join(function(){let e;if(null!=g.A.default){const t={...g.A};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(g.A));e.assetsPath=(0,u.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,u.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,R.JK)(),e.has={"esri-csp-restrictions":(0,i.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,i.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,i.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,i.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,i.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,i.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,i.A)("esri-atomics"),"esri-shared-array-buffer":(0,i.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,u.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,u.s2)(e.workers.workerPath):e.workers.workerPath=(0,u.s2)((0,_.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=g.A.workers.loaderConfig,r=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.slice()||[],paths:{...A.paths,...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=A.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,R.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),s={buildDate:w.$,fullVersion:f.ol,revision:w.u};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:s})}());M=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){v=e||{}}let e;if(M)try{e=new Worker(M,{name:"esri-worker-"+N++})}catch(t){I().warn(P,v),e=new T}else I().warn(P,v),e=new T;return x(e)}();return new H(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),c.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,s=(0,m.Jc)();return new Promise(((t,i)=>{const n={resolve:t,reject:i,abortHandle:(0,o.NY)(r,(()=>{this._outJobs.delete(s),this._post({type:C,jobId:s})}))};this._outJobs.set(s,n),this._post({type:D,jobId:s,modulePath:e})}))}_onMessage(e){const t=(0,m.VI)(e);if(t)switch(t.type){case k:this._onOpenedMessage(t);break;case U:this._onResponseMessage(t);break;case C:this._onAbortMessage(t);break;case S:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,s=t.get(r);s&&(s.controller&&s.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:s,abortable:i}=e,n=i?new AbortController:null,a=this._inJobs,l=p[t];let c;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);c=l.call(null,s,{signal:n?n.signal:null})}catch(e){return void this._post({type:U,jobId:r,error:(0,m.mF)(e)})}(0,o.$X)(c)?(a.set(r,{controller:n,promise:c}),c.then((e=>{a.has(r)&&(a.delete(r),this._post({type:U,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,o.zf)(e)||this._post({type:U,jobId:r,error:(0,m.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:U,jobId:r},c)}_onOpenedMessage(e){const{jobId:t,data:r}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,h.xt)(s.abortHandle),s.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:i}=e,o=this._outJobs.get(t);o&&(this._outJobs.delete(t),(0,h.xt)(o.abortHandle),r?o.reject(s.A.fromJSON(JSON.parse(r))):o.resolve(i))}_post(e,t,r){return(0,m.u1)(this.worker,e,t,r)}}const O=(0,i.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,i.A)("workers-pool-size")??8):0;let L=(0,i.A)("esri-mobile")?Math.min(O,3):O;L||(L=(0,i.A)("safari")&&(0,i.A)("mac")?7:2);let F=0;const G=[];async function B(e,t){const r=new n.A,{registryTarget:s,...i}=t;return await r.open(e,i),s&&(0,a.k)(s,r),r}async function j(e,t={}){if("string"!=typeof e)throw new s.A("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,i.A)("host-webworker")&&!(0,i.A)("esri-workers")&&(r="local"),"local"===r){let r=await l.default.loadWorker(e);r||(r=await import(e)),(0,o.Te)(t.signal);const s=t.client||r;return B([l.default.connect(r,t.schedule)],{...t,client:s})}if(await async function(){if(X)return X;W=new AbortController;const e=[];for(let t=0;t<L;t++){const r=H.create(t).then((e=>(G[t]=e,e)));e.push(r)}return X=Promise.all(e),X}(),(0,o.Te)(t.signal),"dedicated"===r){const r=F++%L;return B([await G[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,L);if(r<L){const s=new Array(r);for(let i=0;i<r;++i){const r=F++%L;s[i]=G[r].open(e,t)}return B(s,t)}}return B(G.map((r=>r.open(e,t))),t)}let W,X=null},36421:(e,t,r)=>{var s;r.d(t,{p:()=>s}),function(e){e[e.Texture=0]="Texture",e[e.RenderBuffer=1]="RenderBuffer"}(s||(s={}))},4172:(e,t,r)=>{r.d(t,{g:()=>E});var s=r(49186),i=(r(44208),r(53966)),o=r(44794);(r(36708),r(35982)).B;new Set;var n=r(94656),a=r(63907),l=r(36421),c=r(67171);function h(e){(null!=e.width&&e.width<0||null!=e.height&&e.height<0||null!=e.depth&&e.depth<0)&&i.A.getLogger("esri/views/webgl/textureUtils").error("Negative dimension parameters are not allowed!")}function d(e){return null!=e&&"type"in e&&"compressed"===e.type}function u(e){return null!=e&&!d(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function p(e){return e===a.Ap.TEXTURE_3D||e===a.Ap.TEXTURE_2D_ARRAY}function m(e,t,r,s=1){let i=Math.max(t,r);return e===a.Ap.TEXTURE_3D&&(i=Math.max(i,s)),Math.floor(Math.log2(i))+1}function _(e){if(null!=e.internalFormat)return e.internalFormat===a.Ab.DEPTH_STENCIL?a.Ab.DEPTH24_STENCIL8:e.internalFormat;switch(e.dataType){case a.ld.FLOAT:switch(e.pixelFormat){case a.Ab.RGBA:return a.H0.RGBA32F;case a.Ab.RGB:return a.H0.RGB32F;default:throw new s.A("Unable to derive format")}case a.ld.UNSIGNED_BYTE:switch(e.pixelFormat){case a.Ab.RGBA:return a.H0.RGBA8;case a.Ab.RGB:return a.H0.RGB8}}return e.internalFormat=e.pixelFormat===a.Ab.DEPTH_STENCIL?a.Ab.DEPTH24_STENCIL8:e.pixelFormat}function g(e){let t="width"in e?e.width:e.codedWidth,r="height"in e?e.height:e.codedHeight;return e instanceof HTMLVideoElement&&(t=e.videoWidth,r=e.videoHeight),{width:t,height:r,depth:1}}class f extends c.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case a.H0.R16F:case a.H0.R16I:case a.H0.R16UI:case a.H0.R32F:case a.H0.R32I:case a.H0.R32UI:case a.H0.R8_SNORM:case a.H0.R8:case a.H0.R8I:case a.H0.R8UI:this.pixelFormat=a.Ab.RED}}static validate(e,t){return new f(e,t)}}const A=()=>i.A.getLogger("esri/views/webgl/Texture");let E=class e{constructor(e,t=null,r=null){if(this.type=l.p.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,this._isCompressing=(0,o.v)(!1),"context"in e)this._descriptor=e,r=t;else{const r=f.validate(e,t);if(!r)throw new s.A("Texture descriptor invalid");this._descriptor=r}this._descriptor.target===a.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return(0,c.e)(this._descriptor)}get cachedMemory(){return this.usedMemory}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}get isCompressing(){return this._isCompressing.value}set isCompressing(e){e?(this._compressionWorkerAbortController=new AbortController,this._isCompressing.value=!0):(this._compressionWorkerAbortController=null,this._isCompressing.value=!1)}dispose(){this.abortCompression(),this._glName&&this._descriptor.context.instanceCounter.decrement(a.vt.Texture,this),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new s.A("Immutable textures can't be resized!");r.width=e,r.height=t,this._descriptor.target===a.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e){this._descriptor.shouldCompress=e}setData(e){return this.abortCompression(),!d(e)&&this._descriptor.internalFormat&&this._descriptor.internalFormat in a.CQ&&(this._descriptor.internalFormat=void 0),this._setData(e),this.isCompressing}updateData(t,r,i,o,n,a,l=0){a||A().error("An attempt to use uninitialized data!"),this._glName||A().error("An attempt to update uninitialized texture!");const c=this._descriptor;c.internalFormat=_(c);const{context:h,pixelFormat:p,dataType:m,target:f,isImmutable:E}=c;if(E&&!this._wasImmutablyAllocated)throw new s.A("Cannot update immutable texture before allocation!");const b=h.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||i<0||r+o>c.width||i+n>c.height)&&A().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:T}=h;if(l&&(o&&n||A().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),T.pixelStorei(T.UNPACK_SKIP_ROWS,l)),u(a)){const{width:e,height:s}=g(a);e===o&&s===n||A().warn("The size of the data does not match the provided dimensions"),T.texSubImage2D(f,t,r,i,o,n,p,m,a)}else d(a)?T.compressedTexSubImage2D(f,t,r,i,o,n,c.internalFormat,a.levels[t]):T.texSubImage2D(f,t,r,i,o,n,p,m,a);l&&T.pixelStorei(T.UNPACK_SKIP_ROWS,0),h.bindTexture(b,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(t,r,i,o,n,a,l,c){c||A().error("An attempt to use uninitialized data!"),this._glName||A().error("An attempt to update an uninitialized texture!");const h=this._descriptor;h.internalFormat=_(h);const{context:u,pixelFormat:m,dataType:g,isImmutable:f,target:E}=h;if(f&&!this._wasImmutablyAllocated)throw new s.A("Cannot update immutable texture before allocation!");p(E)||A().warn("Attempting to set 3D texture data on a non-3D texture");const b=u.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);u.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||i<0||o<0||r+n>h.width||i+a>h.height||o+l>h.depth)&&A().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:T}=u;if(d(c))c=c.levels[t],T.compressedTexSubImage3D(E,t,r,i,o,n,a,l,h.internalFormat,c);else{const e=c;T.texSubImage3D(E,t,r,i,o,n,a,l,m,g,e)}u.bindTexture(b,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const t=this._descriptor;if(!t.hasMipmap){if(this._wasImmutablyAllocated)throw new s.A("Cannot add mipmaps to immutable texture after allocation");t.hasMipmap=!0,this._samplingModeDirty=!0,h(t)}t.samplingMode===a.Cj.LINEAR?(this._samplingModeDirty=!0,t.samplingMode=a.Cj.LINEAR_MIPMAP_NEAREST):t.samplingMode===a.Cj.NEAREST&&(this._samplingModeDirty=!0,t.samplingMode=a.Cj.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(t.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new s.A("Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,h(e)}e.samplingMode===a.Cj.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=a.Cj.LINEAR):e.samplingMode===a.Cj.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=a.Cj.NEAREST)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,h(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1)}_setData(t,r){const i=this._descriptor,o=i.context?.gl;if(!o)return;(0,n.Y2)(o),this._glName||(this._glName=o.createTexture(),this._glName&&i.context.instanceCounter.increment(a.vt.Texture,this)),h(i);const l=i.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);i.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),(0,n.Y2)(o);const c=r??i.target,m=p(c);if(u(t))this._setDataFromTexImageSource(t,c);else{const{width:e,height:r,depth:l}=i;if(null==e||null==r)throw new s.A("Width and height must be specified!");if(m&&null==l)throw new s.A("Depth must be specified!");if(i.internalFormat=_(i),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(c,i.internalFormat,i.hasMipmap,e,r,l),d(t)){if(!(i.internalFormat in a.CQ))throw new s.A("Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(t,i.internalFormat,c)}else this._texImage(c,0,i.internalFormat,e,r,l,t),(0,n.Y2)(o),i.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),(0,n.Y2)(o),i.context.bindTexture(l,e.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(e=null){for(let t=a.Ap.TEXTURE_CUBE_MAP_POSITIVE_X;t<=a.Ap.TEXTURE_CUBE_MAP_NEGATIVE_Z;t++)this._setData(e,t)}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:s}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s?1:0)}_setDataFromTexImageSource(e,t){const{gl:r}=this._descriptor.context,s=this._descriptor;s.internalFormat=_(s);const i=p(t),{width:o,height:a,depth:l}=g(e);s.width&&s.height,s.width||(s.width=o),s.height||(s.height=a),i&&s.depth,i&&(s.depth=l),s.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,s.internalFormat,s.hasMipmap,o,a,l),this._texImage(t,0,s.internalFormat,o,a,l,e),(0,n.Y2)(r),s.hasMipmap&&(this.generateMipmap(),(0,n.Y2)(r))}_setDataFromCompressedSource(e,t,r){const s=this._descriptor,{width:i,height:o,depth:n}=s,a=e.levels,l=m(r,i,o,n),c=Math.min(l,a.length)-1;this._descriptor.context.gl.texParameteri(s.target,s.context.gl.TEXTURE_MAX_LEVEL,c),this._forEachMipmapLevel(((e,s,i,o)=>{const n=a[Math.min(e,a.length-1)];this._compressedTexImage(r,e,t,s,i,o,n)}),c)}_texStorage(e,t,r,i,o,n){const{gl:l}=this._descriptor.context;if(!(t in a.H0))throw new s.A("Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const c=r?m(e,i,o,n):1;if(p(e)){if(null==n)throw new s.A("Missing depth dimension for 3D texture upload");l.texStorage3D(e,c,t,i,o,n)}else l.texStorage2D(e,c,t,i,o);this._wasImmutablyAllocated=!0}_texImage(e,t,r,i,o,n,a){const l=this._descriptor.context.gl,c=p(e),{isImmutable:h,pixelFormat:d,dataType:u}=this._descriptor;if(h){if(null!=a){const r=a;if(c){if(null==n)throw new s.A("Missing depth dimension for 3D texture upload");l.texSubImage3D(e,t,0,0,0,i,o,n,d,u,r)}else l.texSubImage2D(e,t,0,0,i,o,d,u,r)}}else{const h=a;if(c){if(null==n)throw new s.A("Missing depth dimension for 3D texture upload");l.texImage3D(e,t,r,i,o,n,0,d,u,h)}else l.texImage2D(e,t,r,i,o,0,d,u,h)}}_compressedTexImage(e,t,r,i,o,n,a){const l=this._descriptor.context.gl,c=p(e);if(this._descriptor.isImmutable){if(null!=a)if(c){if(null==n)throw new s.A("Missing depth dimension for 3D texture upload");l.compressedTexSubImage3D(e,t,0,0,0,i,o,n,r,a)}else l.compressedTexSubImage2D(e,t,0,0,i,o,r,a)}else if(c){if(null==n)throw new s.A("Missing depth dimension for 3D texture upload");l.compressedTexImage3D(e,t,r,i,o,n,0,a)}else l.compressedTexImage2D(e,t,r,i,o,0,a)}async compressOnWorker(e){const t=this._descriptor.context?.gl.getExtension("WEBGL_compressed_texture_etc"),r=this._descriptor.context?.gl.getExtension("WEBGL_compressed_texture_s3tc"),s=null,i=await createImageBitmap(e);if(s&&(t||r)){const o={data:i,flipped:this.descriptor.flipped,width:e.width,height:e.height,hasMipmap:this._descriptor.hasMipmap,hasETC:!!t,hasS3TC:!!r,buffer:[new ArrayBuffer(0)]};s.invoke(o,this._compressionWorkerAbortController.signal).then((e=>{e&&this.glName&&(this._descriptor.internalFormat=e.internalFormat,this._setData(e.compressedTexture)),this.isCompressing=!1})).catch((()=>{this.isCompressing=!1}))}}abortCompression(){this.isCompressing&&(this._compressionWorkerAbortController.abort(),this.isCompressing=!1)}_forEachMipmapLevel(e,t=1/0){let{width:r,height:i,depth:o,hasMipmap:n,target:l}=this._descriptor;const c=l===a.Ap.TEXTURE_3D;if(null==r||null==i||c&&null==o)throw new s.A("Missing texture dimensions for mipmap calculation");for(let s=0;e(s,r,i,o),n&&(1!==r||1!==i||c&&1!==o)&&!(s>=t);++s)r=Math.max(1,r>>1),i=Math.max(1,i>>1),c&&(o=Math.max(1,o>>1))}_applySamplingMode(){const e=this._descriptor,t=e.context?.gl;let r=e.samplingMode,s=e.samplingMode;r===a.Cj.LINEAR_MIPMAP_NEAREST||r===a.Cj.LINEAR_MIPMAP_LINEAR?(r=a.Cj.LINEAR,e.hasMipmap||(s=a.Cj.LINEAR)):r!==a.Cj.NEAREST_MIPMAP_NEAREST&&r!==a.Cj.NEAREST_MIPMAP_LINEAR||(r=a.Cj.NEAREST,e.hasMipmap||(s=a.Cj.NEAREST)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,r),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,s)}_applyWrapMode(){const e=this._descriptor,t=e.context?.gl;"number"==typeof e.wrapMode?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}_applyAnisotropicFilteringParameters(){const e=this._descriptor,t=e.context.capabilities.textureFilterAnisotropic;t&&e.context.gl.texParameterf(e.target,t.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}};E.TEXTURE_UNIT_FOR_UPDATES=0},67171:(e,t,r)=>{r.d(t,{R:()=>o,e:()=>n});var s=r(63907),i=r(42293);class o{constructor(e=0,t=e){this.width=e,this.height=t,this.target=s.Ap.TEXTURE_2D,this.pixelFormat=s.Ab.RGBA,this.dataType=s.ld.UNSIGNED_BYTE,this.samplingMode=s.Cj.LINEAR,this.wrapMode=s.pF.REPEAT,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.shouldCompress=!1,this.depth=1,this.isImmutable=!1}}function n(e){return e.width<=0||e.height<=0?0:Math.round(e.width*e.height*e.depth*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,i.IB)(e.internalFormat))*(e.target===s.Ap.TEXTURE_CUBE_MAP?6:1))}},42293:(e,t,r)=>{r.d(t,{Hi:()=>l,IB:()=>c,yu:()=>a}),r(44208);var s=r(94656),i=r(63907),o=r(62298);function n(e){const t=e.gl;switch(t.getError()){case t.NO_ERROR:return null;case t.INVALID_ENUM:return"An unacceptable value has been specified for an enumerated argument";case t.INVALID_VALUE:return"An unacceptable value has been specified for an argument";case t.INVALID_OPERATION:return"The specified command is not allowed for the current state";case t.INVALID_FRAMEBUFFER_OPERATION:return"The currently bound framebuffer is not framebuffer complete";case t.OUT_OF_MEMORY:return"Not enough memory is left to execute the command";case t.CONTEXT_LOST_WEBGL:return"WebGL context is lost"}return"Unknown error"}function a(e,t,r,i,a=0){const l=e.gl;e.bindBuffer(r);for(const r of i){const i=t.get(r.name);if(null==i){console.warn(`There is no location for vertex attribute '${r.name}' defined.`);continue}const c=a*r.stride;if(r.count<=4)l.vertexAttribPointer(i,r.count,r.type,r.normalized,r.stride,r.offset+c),l.enableVertexAttribArray(i),r.divisor>0&&e.gl.vertexAttribDivisor(i,r.divisor);else if(9===r.count)for(let t=0;t<3;t++)l.vertexAttribPointer(i+t,3,r.type,r.normalized,r.stride,r.offset+12*t+c),l.enableVertexAttribArray(i+t),r.divisor>0&&e.gl.vertexAttribDivisor(i+t,r.divisor);else if(16===r.count)for(let t=0;t<4;t++)l.vertexAttribPointer(i+t,4,r.type,r.normalized,r.stride,r.offset+16*t+c),l.enableVertexAttribArray(i+t),r.divisor>0&&e.gl?.vertexAttribDivisor(i+t,r.divisor);else console.error("Unsupported vertex attribute element count: "+r.count);if((0,s.en)()){const t=n(e),s=(0,o._)(r.type),i=r.offset,a=Math.round(s/i)!==s/i?`. Offset not a multiple of stride. DataType requires ${s} bytes, but descriptor has an offset of ${i}`:"";t&&console.error(`Unable to bind vertex attribute "${r.name}" with baseInstanceOffset ${c}${a}:`,t,r)}}}function l(e,t,r,s){const o=e.gl;e.bindBuffer(r);for(const r of s){const s=t.get(r.name);if(r.count<=4)o.disableVertexAttribArray(s),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(s,0);else if(9===r.count)for(let t=0;t<3;t++)o.disableVertexAttribArray(s+t),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(s+t,0);else if(16===r.count)for(let t=0;t<4;t++)o.disableVertexAttribArray(s+t),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(s+t,0);else console.error("Unsupported vertex attribute element count: "+r.count)}e.unbindBuffer(i.NZ.ARRAY_BUFFER)}function c(e){switch(e){case i.Ab.ALPHA:case i.Ab.LUMINANCE:case i.Ab.RED:case i.Ab.RED_INTEGER:case i.H0.R8:case i.H0.R8I:case i.H0.R8UI:case i.H0.R8_SNORM:case i.yQ.STENCIL_INDEX8:return 1;case i.Ab.LUMINANCE_ALPHA:case i.Ab.RG:case i.Ab.RG_INTEGER:case i.H0.RGBA4:case i.H0.R16F:case i.H0.R16I:case i.H0.R16UI:case i.H0.RG8:case i.H0.RG8I:case i.H0.RG8UI:case i.H0.RG8_SNORM:case i.H0.RGB565:case i.H0.RGB5_A1:case i.yQ.DEPTH_COMPONENT16:return 2;case i.Ab.DEPTH_COMPONENT:case i.Ab.RGB:case i.Ab.RGB_INTEGER:case i.H0.RGB8:case i.H0.RGB8I:case i.H0.RGB8UI:case i.H0.RGB8_SNORM:case i.H0.SRGB8:case i.yQ.DEPTH_COMPONENT24:return 3;case i.Ab.DEPTH_STENCIL:case i.Ab.DEPTH24_STENCIL8:case i.Ab.RGBA:case i.Ab.RGBA_INTEGER:case i.H0.RGBA8:case i.H0.R32F:case i.H0.R11F_G11F_B10F:case i.H0.RG16F:case i.H0.R32I:case i.H0.R32UI:case i.H0.RG16I:case i.H0.RG16UI:case i.H0.RGBA8I:case i.H0.RGBA8UI:case i.H0.RGBA8_SNORM:case i.H0.SRGB8_ALPHA8:case i.H0.RGB9_E5:case i.H0.RGB10_A2UI:case i.H0.RGB10_A2:case i.yQ.DEPTH_STENCIL:case i.yQ.DEPTH_COMPONENT32F:case i.yQ.DEPTH24_STENCIL8:return 4;case i.yQ.DEPTH32F_STENCIL8:return 5;case i.H0.RGB16F:case i.H0.RGB16I:case i.H0.RGB16UI:return 6;case i.H0.RG32F:case i.H0.RG32I:case i.H0.RG32UI:case i.H0.RGBA16F:case i.H0.RGBA16I:case i.H0.RGBA16UI:return 8;case i.H0.RGB32F:case i.H0.RGB32I:case i.H0.RGB32UI:return 12;case i.H0.RGBA32F:case i.H0.RGBA32I:case i.H0.RGBA32UI:return 16;case i.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case i.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case i.CQ.COMPRESSED_R11_EAC:case i.CQ.COMPRESSED_SIGNED_R11_EAC:case i.CQ.COMPRESSED_RGB8_ETC2:case i.CQ.COMPRESSED_SRGB8_ETC2:case i.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case i.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case i.CQ.COMPRESSED_RG11_EAC:case i.CQ.COMPRESSED_SIGNED_RG11_EAC:case i.CQ.COMPRESSED_RGBA8_ETC2_EAC:case i.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}},94656:(e,t,r)=>{r.d(t,{Xc:()=>c,Y2:()=>h,en:()=>l});var s=r(49186),i=r(44208),o=r(53966);const n=()=>o.A.getLogger("esri.views.webgl.checkWebGLError"),a=!!(0,i.A)("enable-feature:webgl-debug");function l(){return a}function c(){return a}function h(e){if(l()){const t=e.getError();if(t){const r=function(e,t){switch(t){case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}(e,t),i=(new Error).stack;n().error(new s.A("webgl-error","WebGL error occurred",{message:r,stack:i}))}}}},62298:(e,t,r)=>{r.d(t,{_:()=>i});var s=r(63907);function i(e){switch(e){case s.pe.BYTE:case s.pe.UNSIGNED_BYTE:return 1;case s.pe.SHORT:case s.pe.UNSIGNED_SHORT:case s.pe.HALF_FLOAT:return 2;case s.pe.FLOAT:case s.pe.INT:case s.pe.UNSIGNED_INT:return 4}}}}]);