@arcgis/core 4.26.0-next.20230211 → 4.26.0-next.20230213

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 (23) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{f8e4217dde2e16986c4c.js → 1770729d33e57bb2919a.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{ddc33f14bede99eeb9df.js → 722e06dc25299d5f11b0.js} +1 -1
  4. package/assets/esri/core/workers/chunks/8be68f08c270c62e38bb.js +1 -0
  5. package/assets/esri/core/workers/chunks/accb787c5c8ee7bfe35b.js +1 -0
  6. package/assets/esri/core/workers/chunks/{788932d9ea7314dc2bae.js → f28cd2654583aebe2c03.js} +1 -1
  7. package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
  8. package/package.json +1 -1
  9. package/support/revision.js +1 -1
  10. package/symbols/support/styleUtils.js +1 -1
  11. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  12. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  13. package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
  14. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  15. package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
  16. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  17. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  18. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  19. package/views/interactive/snapping/snappingUtils.js +1 -1
  20. package/widgets/Editor/EditorViewModel.js +1 -1
  21. package/widgets/Histogram.js +1 -1
  22. package/assets/esri/core/workers/chunks/c83551bc496366301060.js +0 -1
  23. package/assets/esri/core/workers/chunks/f4e903b80243ee517abd.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4499],{32243:(e,t,n)=>{function o(e){return e=e||globalThis.location.hostname,m.some((t=>null!=e?.match(t)))}function r(e,t){return e&&(t=t||globalThis.location.hostname)?null!=t.match(s)||null!=t.match(a)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(l)||null!=t.match(i)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e}n.d(t,{XO:()=>o,pJ:()=>r});const s=/^devext.arcgis.com$/,l=/^qaext.arcgis.com$/,a=/^[\w-]*\.mapsdevext.arcgis.com$/,i=/^[\w-]*\.mapsqa.arcgis.com$/,m=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local.esri.com$/,s,l,/^jsapps.esri.com$/,a,i]},72245:(e,t,n)=>{n.d(t,{K3:()=>r,Rx:()=>s});var o=n(80442);const r=()=>!!(0,o.Z)("enable-feature:force-wosr"),s=()=>!!(0,o.Z)("enable-feature:SceneLayer-editing")},21878:(e,t,n)=>{n.d(t,{im:()=>N,cW:()=>Z,vX:()=>C});var o=n(9790),r=n(20102),s=n(70586),l=n(84230),a=n(87223),i=n(59390),m=n(42143),c=n(4095),u=n(98587),y=n(77987),f=n(37898),p=n(20256),b=n(3456),d=n(86114),h=n(78724),g=n(20825);const w={retainId:!1,ignoreDrivers:!1,hasLabelingContext:!0};function S(e,t=w){if(!e)return{symbol:null};const{retainId:n=w.retainId,ignoreDrivers:s=w.ignoreDrivers,hasLabelingContext:l=w.hasLabelingContext,retainCIM:a=w.retainCIM}=t;let S=null;if((0,o.dU)(e)||e instanceof i.Z)S=e.clone();else if("cim"===e.type){const t=e.data?.symbol?.type;if("CIMPointSymbol"!==t)return{error:new r.Z("symbol-conversion:unsupported-cim-symbol",`CIM symbol of type '${t||"unknown"}' is unsupported in 3D`,{symbol:e})};S=a?e.clone():m.Z.fromCIMSymbol(e)}else if(e instanceof c.Z)S=u.Z.fromSimpleLineSymbol(e);else if(e instanceof y.Z)S=m.Z.fromSimpleMarkerSymbol(e);else if(e instanceof f.Z)S=m.Z.fromPictureMarkerSymbol(e);else if(e instanceof p.Z)S=t.geometryType&&"mesh"===t.geometryType?b.Z.fromSimpleFillSymbol(e):d.Z.fromSimpleFillSymbol(e);else{if(!(e instanceof h.Z))return{error:new r.Z("symbol-conversion:unsupported-2d-symbol",`2D symbol of type '${e.type||e.declaredClass}' is unsupported in 3D`,{symbol:e})};S=l?g.Z.fromTextSymbol(e):m.Z.fromTextSymbol(e)}if(n&&S&&"cim"!==S.type&&(S.id=e.id),s&&(0,o.dU)(S))for(let e=0;e<S.symbolLayers.length;++e)S.symbolLayers.getItemAt(e)._ignoreDrivers=!0;return{symbol:S}}function Z(e,t,n,o){const r=$(e,{},{context:o,isLabelSymbol:!1});(0,s.pC)(r)&&(t[n]=r)}function C(e,t,n,o){const r=$(e,{},{context:o,isLabelSymbol:!0});(0,s.pC)(r)&&(t[n]=r)}function v(e){return e instanceof a.Z||e instanceof i.Z}function $(e,t,n){if((0,s.Wi)(e))return null;const{context:o,isLabelSymbol:a}=n,i=o?.origin,m=o?.messages;if("web-scene"===i&&!v(e)){const n=S(e,{retainCIM:!0,hasLabelingContext:a});return(0,s.pC)(n.symbol)?n.symbol.write(t,o):(m?.push(new r.Z("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in scenes. Use 3D symbology instead when working with WebScene and SceneView`,{symbol:e,context:o,error:n.error})),null)}return("web-map"===i||"portal-item"===i&&!(0,l.A2)(o?.layer))&&v(e)?(m?.push(new r.Z("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in web maps and portal items. Use 2D symbology and CIMSymbol instead when working with MapView`,{symbol:e,context:o})),null):e.write(t,o)}function N(e,t){return(0,o.S9)(e,null,t)}},27883:(e,t,n)=>{n.d(t,{EJ:()=>b,KV:()=>f,n2:()=>y,v9:()=>p,wm:()=>g});var o=n(3172),r=n(20102),s=n(70586),l=n(95330),a=n(17452),i=n(65587),m=n(41253),c=n(72245);let u={};function y(e,t,n){return e&&(0,s.pC)(e.styleUrl)?async function(e,t){try{return{data:(await b(e,t)).data,baseUrl:(0,a.Yd)(e),styleUrl:e}}catch(e){return(0,l.r9)(e),null}}(e.styleUrl,n):e&&(0,s.pC)(e.styleName)?function(e,t,n){const o=(0,s.pC)(t.portal)?t.portal:i.Z.getDefault();let l;const a=`${o.url} - ${o.user&&o.user.username} - ${e}`;return u[a]||(u[a]=function(e,t,n){return t.load(n).then((()=>{const o=new m.Z({disableExtraQuery:!0,query:`owner:${d} AND type:${h} AND typekeywords:"${e}"`});return t.queryItems(o,n)})).then((({results:t})=>{let o=null;const s=e.toLowerCase();if(t&&Array.isArray(t))for(const e of t){const t=e.typeKeywords?.some((e=>e.toLowerCase()===s));if(t&&e.type===h&&e.owner===d){o=e;break}}if(!o)throw new r.Z("symbolstyleutils:style-not-found",`The style '${e}' could not be found`,{styleName:e});return o.load(n)}))}(e,o,n).then((e=>(l=e,e.fetchData()))).then((t=>({data:t,baseUrl:l.itemUrl??"",styleName:e})))),u[a]}(e.styleName,t,n):Promise.reject(new r.Z("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function f(e){return null===e||"CIMSymbolReference"===e.type?e:{type:"CIMSymbolReference",symbol:e}}function p(e,t){if("cimRef"===t)return e.cimRef;if(e.formatInfos&&!(0,c.K3)()){const t=e.formatInfos.find((e=>"gltf_basisu"===e.type));if(t)return t.href;const n=e.formatInfos.find((e=>"gltf"===e.type));if(n)return n.href}return e.webRef}function b(e,t){const n={responseType:"json",query:{f:"json"},...t};return(0,o.default)((0,a.Fv)(e),n)}const d="esri_en",h="Style",g="https://cdn.arcgis.com/sharing/rest/content/items/220936cc6ed342c9937abd8f180e7d1e/resources/styles/cim/{SymbolName}.json?f=json"},74499:(e,t,n)=>{n.r(t),n.d(t,{fetchSymbolFromStyle:()=>b,resolveWebStyleSymbol:()=>p});var o=n(9790),r=n(32243),s=n(20102),l=n(70586),a=n(17452),i=n(65587),m=n(25929),c=n(21878),u=n(71144),y=n(27883),f=n(23203);function p(e,t,n,o){return e.name?e.styleName&&"Esri2DPointSymbolsStyle"===e.styleName?function(e,t,n){const o=y.wm.replace(/\{SymbolName\}/gi,e.name),r=(0,l.pC)(t.portal)?t.portal:i.Z.getDefault();return(0,y.EJ)(o,n).then((e=>{const t=(0,y.KV)(e.data);return(0,c.im)(t,{portal:r,url:(0,a.mN)((0,a.Yd)(o)),origin:"portal-item"})}))}(e,t,o):(0,y.n2)(e,t,o).then((r=>b((0,l.s3)(r),e.name,t,n,o))):Promise.reject(new s.Z("symbolstyleutils:style-symbol-reference-name-missing","Missing name in style symbol reference"))}function b(e,t,n,p,b){const d=e.data,h=n&&(0,l.pC)(n.portal)?n.portal:i.Z.getDefault(),g={portal:h,url:(0,a.mN)(e.baseUrl),origin:"portal-item"},w=d.items.find((e=>e.name===t));if(!w){const e=`The symbol name '${t}' could not be found`;return Promise.reject(new s.Z("symbolstyleutils:symbol-name-not-found",e,{symbolName:t}))}let S=(0,m.f)((0,y.v9)(w,p),g),Z=w.thumbnail?.href??null;const C=w.thumbnail&&w.thumbnail.imageData;(0,r.XO)()&&(S=(0,r.pJ)(S)??"",Z=(0,r.pJ)(Z));const v={portal:h,url:(0,a.mN)((0,a.Yd)(S)),origin:"portal-item"};return(0,y.EJ)(S,b).then((r=>{const s="cimRef"===p?(0,y.KV)(r.data):r.data,l=(0,c.im)(s,v);if(l&&(0,o.dU)(l)){if(Z){const e=(0,m.f)(Z,g);l.thumbnail=new f.p({url:e})}else C&&(l.thumbnail=new f.p({url:`data:image/png;base64,${C}`}));e.styleUrl?l.styleOrigin=new u.Z({portal:n.portal,styleUrl:e.styleUrl,name:t}):e.styleName&&(l.styleOrigin=new u.Z({portal:n.portal,styleName:e.styleName,name:t}))}return l}))}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4499],{32243:(e,t,n)=>{function o(e){return e=e||globalThis.location.hostname,m.some((t=>null!=e?.match(t)))}function r(e,t){return e&&(t=t||globalThis.location.hostname)?null!=t.match(s)||null!=t.match(a)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(l)||null!=t.match(i)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e}n.d(t,{XO:()=>o,pJ:()=>r});const s=/^devext.arcgis.com$/,l=/^qaext.arcgis.com$/,a=/^[\w-]*\.mapsdevext.arcgis.com$/,i=/^[\w-]*\.mapsqa.arcgis.com$/,m=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local.esri.com$/,s,l,/^jsapps.esri.com$/,a,i]},72245:(e,t,n)=>{n.d(t,{K3:()=>r,Rx:()=>s});var o=n(80442);const r=()=>!!(0,o.Z)("enable-feature:force-wosr"),s=()=>!!(0,o.Z)("enable-feature:SceneLayer-editing")},21878:(e,t,n)=>{n.d(t,{im:()=>N,cW:()=>Z,vX:()=>C});var o=n(9790),r=n(20102),s=n(70586),l=n(84230),a=n(87223),i=n(59390),m=n(42143),c=n(4095),y=n(98587),u=n(77987),f=n(37898),p=n(20256),b=n(3456),d=n(86114),h=n(78724),g=n(20825);const w={retainId:!1,ignoreDrivers:!1,hasLabelingContext:!0};function S(e,t=w){if(!e)return{symbol:null};const{retainId:n=w.retainId,ignoreDrivers:s=w.ignoreDrivers,hasLabelingContext:l=w.hasLabelingContext,retainCIM:a=w.retainCIM}=t;let S=null;if((0,o.dU)(e)||e instanceof i.Z)S=e.clone();else if("cim"===e.type){const t=e.data?.symbol?.type;if("CIMPointSymbol"!==t)return{error:new r.Z("symbol-conversion:unsupported-cim-symbol",`CIM symbol of type '${t||"unknown"}' is unsupported in 3D`,{symbol:e})};S=a?e.clone():m.Z.fromCIMSymbol(e)}else if(e instanceof c.Z)S=y.Z.fromSimpleLineSymbol(e);else if(e instanceof u.Z)S=m.Z.fromSimpleMarkerSymbol(e);else if(e instanceof f.Z)S=m.Z.fromPictureMarkerSymbol(e);else if(e instanceof p.Z)S=t.geometryType&&"mesh"===t.geometryType?b.Z.fromSimpleFillSymbol(e):d.Z.fromSimpleFillSymbol(e);else{if(!(e instanceof h.Z))return{error:new r.Z("symbol-conversion:unsupported-2d-symbol",`2D symbol of type '${e.type||e.declaredClass}' is unsupported in 3D`,{symbol:e})};S=l?g.Z.fromTextSymbol(e):m.Z.fromTextSymbol(e)}if(n&&S&&"cim"!==S.type&&(S.id=e.id),s&&(0,o.dU)(S))for(let e=0;e<S.symbolLayers.length;++e)S.symbolLayers.getItemAt(e)._ignoreDrivers=!0;return{symbol:S}}function Z(e,t,n,o){const r=$(e,{},{context:o,isLabelSymbol:!1});(0,s.pC)(r)&&(t[n]=r)}function C(e,t,n,o){const r=$(e,{},{context:o,isLabelSymbol:!0});(0,s.pC)(r)&&(t[n]=r)}function v(e){return e instanceof a.Z||e instanceof i.Z}function $(e,t,n){if((0,s.Wi)(e))return null;const{context:o,isLabelSymbol:a}=n,i=o?.origin,m=o?.messages;if("web-scene"===i&&!v(e)){const n=S(e,{retainCIM:!0,hasLabelingContext:a});return(0,s.pC)(n.symbol)?n.symbol.write(t,o):(m?.push(new r.Z("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in scenes. Use 3D symbology instead when working with WebScene and SceneView`,{symbol:e,context:o,error:n.error})),null)}return("web-map"===i||"portal-item"===i&&!(0,l.A2)(o?.layer))&&v(e)?(m?.push(new r.Z("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in web maps and portal items. Use 2D symbology and CIMSymbol instead when working with MapView`,{symbol:e,context:o})),null):e.write(t,o)}function N(e,t){return(0,o.S9)(e,null,t)}},27883:(e,t,n)=>{n.d(t,{EJ:()=>b,KV:()=>f,n2:()=>u,v9:()=>p,wm:()=>g});var o=n(3172),r=n(20102),s=n(70586),l=n(95330),a=n(17452),i=n(65587),m=n(41253),c=n(72245);let y={};function u(e,t,n){return e&&(0,s.pC)(e.styleUrl)?async function(e,t){try{return{data:(await b(e,t)).data,baseUrl:(0,a.Yd)(e),styleUrl:e}}catch(e){return(0,l.r9)(e),null}}(e.styleUrl,n):e&&(0,s.pC)(e.styleName)?function(e,t,n){const o=(0,s.pC)(t.portal)?t.portal:i.Z.getDefault();let l;const a=`${o.url} - ${o.user&&o.user.username} - ${e}`;return y[a]||(y[a]=function(e,t,n){return t.load(n).then((()=>{const o=new m.Z({disableExtraQuery:!0,query:`owner:${d} AND type:${h} AND typekeywords:"${e}"`});return t.queryItems(o,n)})).then((({results:t})=>{let o=null;const s=e.toLowerCase();if(t&&Array.isArray(t))for(const e of t){const t=e.typeKeywords?.some((e=>e.toLowerCase()===s));if(t&&e.type===h&&e.owner===d){o=e;break}}if(!o)throw new r.Z("symbolstyleutils:style-not-found",`The style '${e}' could not be found`,{styleName:e});return o.load(n)}))}(e,o,n).then((e=>(l=e,e.fetchData()))).then((t=>({data:t,baseUrl:l.itemUrl??"",styleName:e})))),y[a]}(e.styleName,t,n):Promise.reject(new r.Z("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function f(e){return null===e||"CIMSymbolReference"===e.type?e:{type:"CIMSymbolReference",symbol:e}}function p(e,t){if("cimRef"===t)return e.cimRef;if(e.formatInfos&&!(0,c.K3)())for(const t of e.formatInfos)if("gltf"===t.type)return t.href;return e.webRef}function b(e,t){const n={responseType:"json",query:{f:"json"},...t};return(0,o.default)((0,a.Fv)(e),n)}const d="esri_en",h="Style",g="https://cdn.arcgis.com/sharing/rest/content/items/220936cc6ed342c9937abd8f180e7d1e/resources/styles/cim/{SymbolName}.json?f=json"},74499:(e,t,n)=>{n.r(t),n.d(t,{fetchSymbolFromStyle:()=>b,resolveWebStyleSymbol:()=>p});var o=n(9790),r=n(32243),s=n(20102),l=n(70586),a=n(17452),i=n(65587),m=n(25929),c=n(21878),y=n(71144),u=n(27883),f=n(23203);function p(e,t,n,o){return e.name?e.styleName&&"Esri2DPointSymbolsStyle"===e.styleName?function(e,t,n){const o=u.wm.replace(/\{SymbolName\}/gi,e.name),r=(0,l.pC)(t.portal)?t.portal:i.Z.getDefault();return(0,u.EJ)(o,n).then((e=>{const t=(0,u.KV)(e.data);return(0,c.im)(t,{portal:r,url:(0,a.mN)((0,a.Yd)(o)),origin:"portal-item"})}))}(e,t,o):(0,u.n2)(e,t,o).then((r=>b((0,l.s3)(r),e.name,t,n,o))):Promise.reject(new s.Z("symbolstyleutils:style-symbol-reference-name-missing","Missing name in style symbol reference"))}function b(e,t,n,p,b){const d=e.data,h=n&&(0,l.pC)(n.portal)?n.portal:i.Z.getDefault(),g={portal:h,url:(0,a.mN)(e.baseUrl),origin:"portal-item"},w=d.items.find((e=>e.name===t));if(!w){const e=`The symbol name '${t}' could not be found`;return Promise.reject(new s.Z("symbolstyleutils:symbol-name-not-found",e,{symbolName:t}))}let S=(0,m.f)((0,u.v9)(w,p),g),Z=w.thumbnail?.href??null;const C=w.thumbnail&&w.thumbnail.imageData;(0,r.XO)()&&(S=(0,r.pJ)(S)??"",Z=(0,r.pJ)(Z));const v={portal:h,url:(0,a.mN)((0,a.Yd)(S)),origin:"portal-item"};return(0,u.EJ)(S,b).then((r=>{const s="cimRef"===p?(0,u.KV)(r.data):r.data,l=(0,c.im)(s,v);if(l&&(0,o.dU)(l)){if(Z){const e=(0,m.f)(Z,g);l.thumbnail=new f.p({url:e})}else C&&(l.thumbnail=new f.p({url:`data:image/png;base64,${C}`}));e.styleUrl?l.styleOrigin=new y.Z({portal:n.portal,styleUrl:e.styleUrl,name:t}):e.styleName&&(l.styleOrigin=new y.Z({portal:n.portal,styleName:e.styleName,name:t}))}return l}))}}}]);
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.26/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../chunks/tslib.es6.js";import{JSONSupport as s}from"../../../core/JSONSupport.js";import{isSome as e,isNone as r}from"../../../core/maybe.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import{cast as n}from"../../../core/accessorSupport/decorators/cast.js";import"../../../core/arrayUtils.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";let a=class extends s{constructor(){super(...arguments),this.functionArguments=null,this.readingBufferSize=0,this.id=-1,this.isNoopProcess=!1,this.rawInputBandIds=[],this.isInputBandIdsSwizzled=!1,this.swizzledBandSelection=[],this.isBranch=!1,this._bindingResult=null}get supportsGPU(){return this._bindingResult.supportsGPU}bind(t,s=!1,r=-1){this.id=r+1;const i=this._getRasterValues();let n=!0;for(let o=0;o<i.length;o++){const r=i[o];if(e(r)&&this._isRasterFunctionValue(r)){const e=r.bind(t,s,this.id+o);if(!e.success)return this._bindingResult=e,e;n=n&&e.supportsGPU}}return!this.rasterInfo||s?(this.sourceRasterInfos=this._getSourceRasterInfos(t),this._bindingResult=this._bindSourceRasters(),this._bindingResult.supportsGPU=n&&this._bindingResult.supportsGPU,this.processInputBandIds(),this._bindingResult):(this._bindingResult={success:!0,supportsGPU:!0},this.processInputBandIds(),this._bindingResult)}process(t){const s=this._getRasterValues(),e=0===s.length?t.pixelBlocks??t.primaryPixelBlocks:s.map((s=>this._readRasterValue(s,t)));return this._processPixels({...t,pixelBlocks:e})}processInputBandIds(){const t=this._getRasterValues().filter(this._isRasterFunctionValue);let s;if(t.length>1){const s=t.map((t=>t.processInputBandIds()[0]));this.rawInputBandIds=s,this.isInputBandIdsSwizzled=this.rawInputBandIds.some(((t,s)=>t!==s));const e=t.filter((t=>"ExtractBand"===t.functionName));return e.length&&e.forEach(((t,s)=>{t.isInputBandIdsSwizzled=!0,t.swizzledBandSelection=[s,s,s]})),this.rawInputBandIds}const e=t[0];if(e){if(s=e.processInputBandIds(),e.isInputBandIdsSwizzled)return s}else{s=[];const{bandCount:t}=this.sourceRasterInfos[0];for(let e=0;e<t;e++)s.push(e)}const r=this._getInputBandIds(s);return this.isInputBandIdsSwizzled=r.some(((t,s)=>t!==s)),this.rawInputBandIds=r,this.rawInputBandIds}getPrimaryRasters(){const t=[],s=[];return this._getPrimaryRasters(this,t,s),{rasters:t,rasterIds:s}}getWebGLProcessorDefinition(){const t=this._getWebGLParameters(),{raster:s,rasters:e}=this.functionArguments;return e&&Array.isArray(e)&&e.length?(t.rasters=e.map((t=>this._isRasterFunctionValue(t)?t.getWebGLProcessorDefinition():"number"==typeof t?{name:"Constant",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}:{name:"Identity",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1})),t.rasters.some((t=>null!=t))||(t.rasters=null)):this._isRasterFunctionValue(s)&&(t.raster=s.getWebGLProcessorDefinition()),{name:this.functionName,parameters:t,pixelType:this.outputPixelType,id:this.id,isNoopProcess:this.isNoopProcess}}getFlatWebGLFunctionChain(){const t=this.getWebGLProcessorDefinition();if(!t)return null;const s=[t],{parameters:e}=t;let r=e.rasters||e.raster&&[e.raster];for(;r?.length;){s.unshift(...r);const t=[];for(let s=0;s<r.length;s++){const{parameters:e}=r[s],i=e.rasters||e.raster&&[e.raster];i?.length&&t.push(...i)}r=t}for(let n=s.length-1;n>=0;n--)s[n].isNoopProcess&&s.splice(n,1);let i=!1;for(let n=0;n<s.length;n++){const t=s[n];t.id=s.length-n-1;const{rasters:e}=t.parameters;i=i||null!=e&&e.length>1}return{hasBranches:i,functions:s}}_getOutputPixelType(t){return"unknown"===this.outputPixelType?t:this.outputPixelType??t}_getWebGLParameters(){return{}}_getInputBandIds(t){return t}_isOutputRoundingNeeded(){const{outputPixelType:t}=this;return(t?.startsWith("u")||t?.startsWith("s"))??!1}_getRasterValues(){const{rasterArgumentNames:t}=this;return"rasters"===t[0]?this.functionArguments.rasters??[]:t.map((t=>this.functionArguments[t]))}_getSourceRasterInfos(t){const s=this._getRasterValues(),{rasterInfos:e,rasterIds:r}=t;return 0===s.length?e:s.map((t=>t&&"object"==typeof t&&"bind"in t&&t.rasterInfo?t.rasterInfo:"string"==typeof t&&r.includes(t)?e[r.indexOf(t)]:e[0]))}_getPrimaryRasterId(t){return t?.url}_getPrimaryRasters(t,s=[],e=[]){for(let r=0;r<t.sourceRasters.length;r++){const i=t.sourceRasters[r];if("number"!=typeof i)if("bind"in i)this._getPrimaryRasters(i,s,e);else{const t=i,r=this._getPrimaryRasterId(t);if(null==r)continue;e.includes(r)||(this.mainPrimaryRasterId===r?(s.unshift(t),e.unshift(r)):(s.push(t),e.push(r)))}}}_isRasterFunctionValue(t){return null!=t&&"object"==typeof t&&"getWebGLProcessorDefinition"in t}_readRasterValue(t,s){const{primaryPixelBlocks:e}=s;if(r(t)||"$$"===t){const t=e[0];return r(t)?null:t.clone()}if("string"==typeof t){const r=s.primaryRasterIds.indexOf(t);return-1===r?null:e[r]}if("number"==typeof t){const s=e[0];if(r(s))return null;const i=new Float32Array(s.width*s.height);i.fill(t);const n=s.clone();return n.pixels=n.pixels.map((()=>i)),n}return t.process(s)}};t([i({json:{write:!0}})],a.prototype,"functionName",void 0),t([i({json:{write:!0}})],a.prototype,"functionArguments",void 0),t([i()],a.prototype,"rasterArgumentNames",void 0),t([i({json:{write:!0}}),n((t=>t?.toLowerCase()))],a.prototype,"outputPixelType",void 0),t([i({json:{write:!0}})],a.prototype,"mainPrimaryRasterId",void 0),t([i()],a.prototype,"sourceRasters",void 0),t([i({json:{write:!0}})],a.prototype,"sourceRasterInfos",void 0),t([i({json:{write:!0}})],a.prototype,"rasterInfo",void 0),t([i({json:{write:!0}})],a.prototype,"readingBufferSize",void 0),t([i({json:{write:!0}})],a.prototype,"id",void 0),t([i()],a.prototype,"isNoopProcess",void 0),t([i()],a.prototype,"supportsGPU",null),t([i()],a.prototype,"rawInputBandIds",void 0),t([i()],a.prototype,"isInputBandIdsSwizzled",void 0),t([i()],a.prototype,"swizzledBandSelection",void 0),t([i()],a.prototype,"isBranch",void 0),t([i()],a.prototype,"_bindingResult",void 0),a=t([o("esri.layers.support.rasterFunctions.BaseRasterFunction")],a);const u=a;export{u as default};
5
+ import{_ as t}from"../../../chunks/tslib.es6.js";import{JSONSupport as s}from"../../../core/JSONSupport.js";import{isSome as e,isNone as r}from"../../../core/maybe.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import{cast as n}from"../../../core/accessorSupport/decorators/cast.js";import"../../../core/arrayUtils.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";let a=class extends s{constructor(){super(...arguments),this.functionArguments=null,this.readingBufferSize=0,this.id=-1,this.isNoopProcess=!1,this.rawInputBandIds=[],this.isInputBandIdsSwizzled=!1,this.swizzledBandSelection=[],this.isBranch=!1,this._bindingResult=null}get supportsGPU(){return this._bindingResult.supportsGPU}bind(t,s=!1,r=-1){this.id=r+1;const i=this._getRasterValues();let n=!0;for(let o=0;o<i.length;o++){const r=i[o];if(e(r)&&this._isRasterFunctionValue(r)){const e=r.bind(t,s,this.id+o);if(!e.success)return this._bindingResult=e,e;n=n&&e.supportsGPU}}return!this.rasterInfo||s?(this.sourceRasterInfos=this._getSourceRasterInfos(t),this._bindingResult=this._bindSourceRasters(),this._bindingResult.supportsGPU=n&&this._bindingResult.supportsGPU,this.processInputBandIds(),this._bindingResult):(this._bindingResult={success:!0,supportsGPU:!0},this.processInputBandIds(),this._bindingResult)}process(t){const s=this._getRasterValues(),e=0===s.length?t.pixelBlocks??t.primaryPixelBlocks:s.map((s=>this._readRasterValue(s,t)));return this._processPixels({...t,pixelBlocks:e})}processInputBandIds(){const t=this._getRasterValues().filter(this._isRasterFunctionValue);let s;if(t.length>1){const s=t.map((t=>t.processInputBandIds()[0]));this.rawInputBandIds=s,this.isInputBandIdsSwizzled=this.rawInputBandIds.some(((t,s)=>t!==s));const e=t.filter((t=>"ExtractBand"===t.functionName));return e.length&&e.forEach(((t,s)=>{t.isInputBandIdsSwizzled=!0,t.swizzledBandSelection=[s,s,s]})),this.rawInputBandIds}const e=t[0];if(e){if(s=e.processInputBandIds(),e.isInputBandIdsSwizzled)return this.rawInputBandIds=s,s}else{s=[];const{bandCount:t}=this.sourceRasterInfos[0];for(let e=0;e<t;e++)s.push(e)}const r=this._getInputBandIds(s);return this.isInputBandIdsSwizzled=r.some(((t,s)=>t!==s)),this.rawInputBandIds=r,this.rawInputBandIds}getPrimaryRasters(){const t=[],s=[];return this._getPrimaryRasters(this,t,s),{rasters:t,rasterIds:s}}getWebGLProcessorDefinition(){const t=this._getWebGLParameters(),{raster:s,rasters:e}=this.functionArguments;return e&&Array.isArray(e)&&e.length?(t.rasters=e.map((t=>this._isRasterFunctionValue(t)?t.getWebGLProcessorDefinition():"number"==typeof t?{name:"Constant",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}:{name:"Identity",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1})),t.rasters.some((t=>null!=t))||(t.rasters=null)):this._isRasterFunctionValue(s)&&(t.raster=s.getWebGLProcessorDefinition()),{name:this.functionName,parameters:t,pixelType:this.outputPixelType,id:this.id,isNoopProcess:this.isNoopProcess}}getFlatWebGLFunctionChain(){const t=this.getWebGLProcessorDefinition();if(!t)return null;const s=[t],{parameters:e}=t;let r=e.rasters||e.raster&&[e.raster];for(;r?.length;){s.unshift(...r);const t=[];for(let s=0;s<r.length;s++){const{parameters:e}=r[s],i=e.rasters||e.raster&&[e.raster];i?.length&&t.push(...i)}r=t}for(let n=s.length-1;n>=0;n--)s[n].isNoopProcess&&s.splice(n,1);let i=!1;for(let n=0;n<s.length;n++){const t=s[n];t.id=s.length-n-1;const{rasters:e}=t.parameters;i=i||null!=e&&e.length>1}return{hasBranches:i,functions:s}}_getOutputPixelType(t){return"unknown"===this.outputPixelType?t:this.outputPixelType??t}_getWebGLParameters(){return{}}_getInputBandIds(t){return t}_isOutputRoundingNeeded(){const{outputPixelType:t}=this;return(t?.startsWith("u")||t?.startsWith("s"))??!1}_getRasterValues(){const{rasterArgumentNames:t}=this;return"rasters"===t[0]?this.functionArguments.rasters??[]:t.map((t=>this.functionArguments[t]))}_getSourceRasterInfos(t){const s=this._getRasterValues(),{rasterInfos:e,rasterIds:r}=t;return 0===s.length?e:s.map((t=>t&&"object"==typeof t&&"bind"in t&&t.rasterInfo?t.rasterInfo:"string"==typeof t&&r.includes(t)?e[r.indexOf(t)]:e[0]))}_getPrimaryRasterId(t){return t?.url}_getPrimaryRasters(t,s=[],e=[]){for(let r=0;r<t.sourceRasters.length;r++){const i=t.sourceRasters[r];if("number"!=typeof i)if("bind"in i)this._getPrimaryRasters(i,s,e);else{const t=i,r=this._getPrimaryRasterId(t);if(null==r)continue;e.includes(r)||(this.mainPrimaryRasterId===r?(s.unshift(t),e.unshift(r)):(s.push(t),e.push(r)))}}}_isRasterFunctionValue(t){return null!=t&&"object"==typeof t&&"getWebGLProcessorDefinition"in t}_readRasterValue(t,s){const{primaryPixelBlocks:e}=s;if(r(t)||"$$"===t){const t=e[0];return r(t)?null:t.clone()}if("string"==typeof t){const r=s.primaryRasterIds.indexOf(t);return-1===r?null:e[r]}if("number"==typeof t){const s=e[0];if(r(s))return null;const i=new Float32Array(s.width*s.height);i.fill(t);const n=s.clone();return n.pixels=n.pixels.map((()=>i)),n}return t.process(s)}};t([i({json:{write:!0}})],a.prototype,"functionName",void 0),t([i({json:{write:!0}})],a.prototype,"functionArguments",void 0),t([i()],a.prototype,"rasterArgumentNames",void 0),t([i({json:{write:!0}}),n((t=>t?.toLowerCase()))],a.prototype,"outputPixelType",void 0),t([i({json:{write:!0}})],a.prototype,"mainPrimaryRasterId",void 0),t([i()],a.prototype,"sourceRasters",void 0),t([i({json:{write:!0}})],a.prototype,"sourceRasterInfos",void 0),t([i({json:{write:!0}})],a.prototype,"rasterInfo",void 0),t([i({json:{write:!0}})],a.prototype,"readingBufferSize",void 0),t([i({json:{write:!0}})],a.prototype,"id",void 0),t([i()],a.prototype,"isNoopProcess",void 0),t([i()],a.prototype,"supportsGPU",null),t([i()],a.prototype,"rawInputBandIds",void 0),t([i()],a.prototype,"isInputBandIdsSwizzled",void 0),t([i()],a.prototype,"swizzledBandSelection",void 0),t([i()],a.prototype,"isBranch",void 0),t([i()],a.prototype,"_bindingResult",void 0),a=t([o("esri.layers.support.rasterFunctions.BaseRasterFunction")],a);const u=a;export{u as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.26.0-next.20230211",
3
+ "version": "4.26.0-next.20230213",
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": [
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.26/esri/copyright.txt for details.
4
4
  */
5
- const a="20230211",c="9a73af7aa9f33966b4dc0e9498ee4bca979c7827";export{a as buildDate,c as commitHash};
5
+ const b="20230213",d="b666db1b1129517663ed8d4504de2bc3fc4407f5";export{b as buildDate,d as commitHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.26/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../request.js";import t from"../../core/Error.js";import{isSome as r}from"../../core/maybe.js";import{throwIfAbortError as o}from"../../core/promiseUtils.js";import{normalize as s,removeFile as n}from"../../core/urlUtils.js";import l from"../../portal/Portal.js";import a from"../../portal/PortalQueryParams.js";import{enableWebStyleForceWOSR as f}from"../../support/featureFlags.js";let i={};async function u(e,t){try{return{data:(await h(e,t)).data,baseUrl:n(e),styleUrl:e}}catch(r){return o(r),null}}function m(e,t,o){const s=r(t.portal)?t.portal:l.getDefault();let n;const a=`${s.url} - ${s.user&&s.user.username} - ${e}`;return i[a]||(i[a]=c(e,s,o).then((e=>(n=e,e.fetchData()))).then((t=>({data:t,baseUrl:n.itemUrl??"",styleName:e})))),i[a]}function y(){i&&(i={})}function c(e,r,o){return r.load(o).then((()=>{const t=new a({disableExtraQuery:!0,query:`owner:${j} AND type:${w} AND typekeywords:"${e}"`});return r.queryItems(t,o)})).then((({results:r})=>{let s=null;const n=e.toLowerCase();if(r&&Array.isArray(r))for(const e of r){const t=e.typeKeywords?.some((e=>e.toLowerCase()===n));if(t&&e.type===w&&e.owner===j){s=e;break}}if(!s)throw new t("symbolstyleutils:style-not-found",`The style '${e}' could not be found`,{styleName:e});return s.load(o)}))}function p(e,o,s){return e&&r(e.styleUrl)?u(e.styleUrl,s):e&&r(e.styleName)?m(e.styleName,o,s):Promise.reject(new t("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function d(e){return null===e||"CIMSymbolReference"===e.type?e:{type:"CIMSymbolReference",symbol:e}}function b(e,t){if("cimRef"===t)return e.cimRef;if(e.formatInfos&&!f()){const t=e.formatInfos.find((e=>"gltf_basisu"===e.type));if(t)return t.href;const r=e.formatInfos.find((e=>"gltf"===e.type));if(r)return r.href}return e.webRef}function h(t,r){const o={responseType:"json",query:{f:"json"},...r};return e(s(t),o)}const j="esri_en",w="Style",U="https://cdn.arcgis.com/sharing/rest/content/items/220936cc6ed342c9937abd8f180e7d1e/resources/styles/cim/{SymbolName}.json?f=json";export{U as Style2DUrlTemplate,i as cachedStyles,y as cleanupStyleUtilsCache,p as fetchStyle,d as makeCIMSymbolRef,h as requestJSON,b as symbolUrlFromStyleItem};
5
+ import e from"../../request.js";import r from"../../core/Error.js";import{isSome as t}from"../../core/maybe.js";import{throwIfAbortError as o}from"../../core/promiseUtils.js";import{normalize as s,removeFile as n}from"../../core/urlUtils.js";import l from"../../portal/Portal.js";import a from"../../portal/PortalQueryParams.js";import{enableWebStyleForceWOSR as u}from"../../support/featureFlags.js";let f={};async function m(e,r){try{return{data:(await j(e,r)).data,baseUrl:n(e),styleUrl:e}}catch(t){return o(t),null}}function i(e,r,o){const s=t(r.portal)?r.portal:l.getDefault();let n;const a=`${s.url} - ${s.user&&s.user.username} - ${e}`;return f[a]||(f[a]=c(e,s,o).then((e=>(n=e,e.fetchData()))).then((r=>({data:r,baseUrl:n.itemUrl??"",styleName:e})))),f[a]}function y(){f&&(f={})}function c(e,t,o){return t.load(o).then((()=>{const r=new a({disableExtraQuery:!0,query:`owner:${h} AND type:${w} AND typekeywords:"${e}"`});return t.queryItems(r,o)})).then((({results:t})=>{let s=null;const n=e.toLowerCase();if(t&&Array.isArray(t))for(const e of t){const r=e.typeKeywords?.some((e=>e.toLowerCase()===n));if(r&&e.type===w&&e.owner===h){s=e;break}}if(!s)throw new r("symbolstyleutils:style-not-found",`The style '${e}' could not be found`,{styleName:e});return s.load(o)}))}function p(e,o,s){return e&&t(e.styleUrl)?m(e.styleUrl,s):e&&t(e.styleName)?i(e.styleName,o,s):Promise.reject(new r("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function d(e){return null===e||"CIMSymbolReference"===e.type?e:{type:"CIMSymbolReference",symbol:e}}function b(e,r){if("cimRef"===r)return e.cimRef;if(e.formatInfos&&!u())for(const t of e.formatInfos)if("gltf"===t.type)return t.href;return e.webRef}function j(r,t){const o={responseType:"json",query:{f:"json"},...t};return e(s(r),o)}const h="esri_en",w="Style",U="https://cdn.arcgis.com/sharing/rest/content/items/220936cc6ed342c9937abd8f180e7d1e/resources/styles/cim/{SymbolName}.json?f=json";export{U as Style2DUrlTemplate,f as cachedStyles,y as cleanupStyleUtilsCache,p as fetchStyle,d as makeCIMSymbolRef,j as requestJSON,b as symbolUrlFromStyleItem};