@arcgis/core 4.30.0-next.20240210 → 4.30.0-next.20240213
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.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/05ebb9cec0e1826b283f.js +1 -0
- package/assets/esri/core/workers/chunks/0d54451c740f54a59f49.js +1 -0
- package/assets/esri/core/workers/chunks/{2b7513fe57eca6cff7c3.js → 0f30059c4e7a9cb85d1d.js} +1 -1
- package/assets/esri/core/workers/chunks/18551a7eb5a9b88aa0dc.js +1 -0
- package/assets/esri/core/workers/chunks/24d19abc680b341d13bb.js +1 -0
- package/assets/esri/core/workers/chunks/{3f4d63436c3de04a6ebb.js → 254b4ee3621bbe345bb1.js} +1 -1
- package/assets/esri/core/workers/chunks/2d682ee6e5d66f2ea5cd.js +1 -0
- package/assets/esri/core/workers/chunks/{d5484d470121de2b403b.js → 36d091be859bbb1a149b.js} +1 -1
- package/assets/esri/core/workers/chunks/50b41f91be903a0977f9.js +1 -0
- package/assets/esri/core/workers/chunks/50bb67f2eeace5d50673.js +1 -0
- package/assets/esri/core/workers/chunks/784b6a8216b97440b180.js +1 -0
- package/assets/esri/core/workers/chunks/{7f7a4de2cd4ab71b9aee.js → 8d119dc0a92ad3612daa.js} +1 -1
- package/assets/esri/core/workers/chunks/966cc0b54008c7348678.js +1 -0
- package/assets/esri/core/workers/chunks/{2853221e88ed7077a447.js → 9850b0e04cce8c1bdddf.js} +1 -1
- package/assets/esri/core/workers/chunks/{0014635097a32ad38895.js → a854611d1a86b838c6ad.js} +1 -1
- package/assets/esri/core/workers/chunks/{cf6970b490b98aa0a117.js → be562536212360943388.js} +1 -1
- package/assets/esri/core/workers/chunks/{50a5abd75fa7dbb571a5.js → ccd53b81c2688dd11584.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2b8e6a0b3f70ada2799.js → e4da908079417cc2f495.js} +1 -1
- package/assets/esri/core/workers/chunks/{af0314c2b5b7dc4f5bbd.js → e6dbf0a7b7b1cf64f23f.js} +1 -1
- package/assets/esri/core/workers/chunks/{eba72ff1726ff6998204.js → f03d62ab7806b68d0b62.js} +1 -1
- package/assets/esri/core/workers/chunks/{5fcda75ed02b8aee3a3c.js → f89278782ddfb154aa9f.js} +1 -1
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/geometry/Mesh.js +1 -1
- package/geometry/support/meshVertexSpaceUtils.js +1 -1
- package/interfaces.d.ts +174 -16
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/support/PixelBlock.js +1 -1
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/rasterDatasets/MRFRaster.js +1 -1
- package/layers/support/rasterFormats/RasterCodec.js +1 -1
- package/layers/support/rasterFunctions/surfaceUtils.js +1 -1
- package/package.json +2 -2
- package/portal/support/resourceUtils.js +1 -1
- package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
- package/rest/support/meshFeatureSet.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/constants.js +1 -1
- package/symbols/support/previewSymbol2D.js +1 -1
- package/versionManagement/support/versionManagementUtils.js +1 -1
- package/views/2d/engine/webgl/collisions/CollisionEngine.js +1 -1
- package/views/2d/engine/webgl/collisions/CollisionGrid.js +1 -1
- package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/segmentUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/GLSLShaderModule.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ExtentScale.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/extentUtils.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/support/Box.js +1 -1
- package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
- package/views/support/automaticLengthMeasurementUtils.js +1 -1
- package/views/support/extentUtils.js +5 -0
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/TableList.js +1 -1
- package/assets/esri/core/workers/chunks/062629a9b4695dea8bf8.js +0 -1
- package/assets/esri/core/workers/chunks/3401157faaa8619aaa47.js +0 -1
- package/assets/esri/core/workers/chunks/37803888bd9a537481a7.js +0 -1
- package/assets/esri/core/workers/chunks/560f677a356c7ebde5d3.js +0 -1
- package/assets/esri/core/workers/chunks/5bfc5ffad705aaaafcd4.js +0 -1
- package/assets/esri/core/workers/chunks/655f4560fb36a0d9ff0b.js +0 -1
- package/assets/esri/core/workers/chunks/b927b655e955abe00d48.js +0 -1
- package/assets/esri/core/workers/chunks/d2417d179d015f1193a1.js +0 -1
- package/assets/esri/core/workers/chunks/f75ec599f53c66cab194.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9896,6147],{44728:(t,r,e)=>{e.d(r,{c:()=>m});var n,o,i=e(46988),s=e(53648),a=e(53368);function l(t){return(0,s.qk)((0,a.Wu)(t),0,255)}function u(t,r,e){return t=Number(t),isNaN(t)?e:t<r?r:t>e?e:t}function c(t,r){const e=t.toString(16).padStart(2,"0");return r?e.substring(0,1):e}class h{static blendColors(t,r,e,n=new h){return n.r=Math.round(t.r+(r.r-t.r)*e),n.g=Math.round(t.g+(r.g-t.g)*e),n.b=Math.round(t.b+(r.b-t.b)*e),n.a=t.a+(r.a-t.a)*e,n._sanitize()}static fromRgb(t,r){const e=t.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(e){const t=e[2].split(/\s*,\s*/),n=e[1];if("rgb"===n&&3===t.length||"rgba"===n&&4===t.length){const e=t[0];if("%"===e.charAt(e.length-1)){const e=t.map((t=>2.56*parseFloat(t)));return 4===t.length&&(e[3]=parseFloat(t[3])),h.fromArray(e,r)}return h.fromArray(t.map((t=>parseFloat(t))),r)}if("hsl"===n&&3===t.length||"hsla"===n&&4===t.length)return h.fromArray((0,i.ec)(parseFloat(t[0]),parseFloat(t[1])/100,parseFloat(t[2])/100,parseFloat(t[3])),r)}return null}static fromHex(t,r=new h){if("#"!==t[0]||isNaN(Number(`0x${t.substring(1)}`)))return null;switch(t.length){case 4:case 5:{const e=parseInt(t.substring(1,2),16),n=parseInt(t.substring(2,3),16),o=parseInt(t.substring(3,4),16),i=5===t.length?15:parseInt(t.substring(4),16);return h.fromArray([e+16*e,n+16*n,o+16*o,(i+16*i)/255],r)}case 7:case 9:{const e=parseInt(t.substring(1,3),16),n=parseInt(t.substring(3,5),16),o=parseInt(t.substring(5,7),16),i=7===t.length?255:parseInt(t.substring(7),16);return h.fromArray([e,n,o,i/255],r)}default:return null}}static fromArray(t,r=new h){return r._set(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3])),isNaN(r.a)&&(r.a=1),r._sanitize()}static fromString(t,r){const e=(0,i.kv)(t)?(0,i.SQ)(t):null;return e&&h.fromArray(e,r)||h.fromRgb(t,r)||h.fromHex(t,r)}static fromJSON(t){return null!=t?new h([t[0],t[1],t[2],(t[3]??255)/255]):void 0}static toUnitRGB(t){return null!=t?[t.r/255,t.g/255,t.b/255]:null}static toUnitRGBA(t){return null!=t?[t.r/255,t.g/255,t.b/255,null!=t.a?t.a:1]:null}constructor(t){this.r=255,this.g=255,this.b=255,this.a=1,t&&this.setColor(t)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(t){return"string"==typeof t?h.fromString(t,this):Array.isArray(t)?h.fromArray(t,this):(this._set(t.r??0,t.g??0,t.b??0,t.a??1),t instanceof h||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(t){const r=t?.capitalize??!1,e=t?.digits??6,n=3===e||4===e,o=4===e||8===e,i=`#${c(this.r,n)}${c(this.g,n)}${c(this.b,n)}${o?c(Math.round(255*this.a),n):""}`;return r?i.toUpperCase():i}toCss(t=!1){const r=this.r+", "+this.g+", "+this.b;return t?`rgba(${r}, ${this.a})`:`rgb(${r})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(t=h.AlphaMode.ALWAYS){const r=l(this.r),e=l(this.g),n=l(this.b);return t===h.AlphaMode.ALWAYS||1!==this.a?[r,e,n,l(255*this.a)]:[r,e,n]}clone(){return new h(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(t){return null!=t&&t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}_sanitize(){return this.r=Math.round(u(this.r,0,255)),this.g=Math.round(u(this.g,0,255)),this.b=Math.round(u(this.b,0,255)),this.a=u(this.a,0,1),this}_set(t,r,e,n){this.r=t,this.g=r,this.b=e,this.a=n}}h.prototype.declaredClass="esri.Color",n=h||(h={}),(o=n.AlphaMode||(n.AlphaMode={}))[o.ALWAYS=0]="ALWAYS",o[o.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const m=h},8528:(t,r,e)=>{e.d(r,{c:()=>n,g:()=>o});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},74784:(t,r,e)=>{e.d(r,{a:()=>M,c:()=>o,d:()=>c,e:()=>S,g:()=>s,h:()=>g,i:()=>f,j:()=>d,l:()=>y,n:()=>p,s:()=>i,t:()=>b});var n=e(47364);function o(t,r){return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t}function i(t,r,e,n,o){return t[0]=r,t[1]=e,t[2]=n,t[3]=o,t}function s(t,r,e){return t[0]=r[0]+e[0],t[1]=r[1]+e[1],t[2]=r[2]+e[2],t[3]=r[3]+e[3],t}function a(t,r,e){return t[0]=r[0]-e[0],t[1]=r[1]-e[1],t[2]=r[2]-e[2],t[3]=r[3]-e[3],t}function l(t,r,e){return t[0]=r[0]*e[0],t[1]=r[1]*e[1],t[2]=r[2]*e[2],t[3]=r[3]*e[3],t}function u(t,r,e){return t[0]=r[0]/e[0],t[1]=r[1]/e[1],t[2]=r[2]/e[2],t[3]=r[3]/e[3],t}function c(t,r,e){return t[0]=r[0]*e,t[1]=r[1]*e,t[2]=r[2]*e,t[3]=r[3]*e,t}function h(t,r){const e=r[0]-t[0],n=r[1]-t[1],o=r[2]-t[2],i=r[3]-t[3];return Math.sqrt(e*e+n*n+o*o+i*i)}function m(t,r){const e=r[0]-t[0],n=r[1]-t[1],o=r[2]-t[2],i=r[3]-t[3];return e*e+n*n+o*o+i*i}function f(t){const r=t[0],e=t[1],n=t[2],o=t[3];return Math.sqrt(r*r+e*e+n*n+o*o)}function d(t){const r=t[0],e=t[1],n=t[2],o=t[3];return r*r+e*e+n*n+o*o}function p(t,r){const e=r[0],n=r[1],o=r[2],i=r[3];let s=e*e+n*n+o*o+i*i;return s>0&&(s=1/Math.sqrt(s),t[0]=e*s,t[1]=n*s,t[2]=o*s,t[3]=i*s),t}function g(t,r){return t[0]*r[0]+t[1]*r[1]+t[2]*r[2]+t[3]*r[3]}function y(t,r,e,n){const o=r[0],i=r[1],s=r[2],a=r[3];return t[0]=o+n*(e[0]-o),t[1]=i+n*(e[1]-i),t[2]=s+n*(e[2]-s),t[3]=a+n*(e[3]-a),t}function b(t,r,e){const n=r[0],o=r[1],i=r[2],s=r[3];return t[0]=e[0]*n+e[4]*o+e[8]*i+e[12]*s,t[1]=e[1]*n+e[5]*o+e[9]*i+e[13]*s,t[2]=e[2]*n+e[6]*o+e[10]*i+e[14]*s,t[3]=e[3]*n+e[7]*o+e[11]*i+e[15]*s,t}function M(t,r){return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]&&t[3]===r[3]}function S(t,r){const e=t[0],o=t[1],i=t[2],s=t[3],a=r[0],l=r[1],u=r[2],c=r[3],h=(0,n.Au)();return Math.abs(e-a)<=h*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(o-l)<=h*Math.max(1,Math.abs(o),Math.abs(l))&&Math.abs(i-u)<=h*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(s-c)<=h*Math.max(1,Math.abs(s),Math.abs(c))}const v=a,w=l,k=u,x=h,N=m,O=f,A=d;Object.freeze(Object.defineProperty({__proto__:null,add:s,ceil:function(t,r){return t[0]=Math.ceil(r[0]),t[1]=Math.ceil(r[1]),t[2]=Math.ceil(r[2]),t[3]=Math.ceil(r[3]),t},copy:o,copyVec3:function(t,r){return t[0]=r[0],t[1]=r[1],t[2]=r[2],t},dist:x,distance:h,div:k,divide:u,dot:g,equals:S,exactEquals:M,floor:function(t,r){return t[0]=Math.floor(r[0]),t[1]=Math.floor(r[1]),t[2]=Math.floor(r[2]),t[3]=Math.floor(r[3]),t},inverse:function(t,r){return t[0]=1/r[0],t[1]=1/r[1],t[2]=1/r[2],t[3]=1/r[3],t},len:O,length:f,lerp:y,max:function(t,r,e){return t[0]=Math.max(r[0],e[0]),t[1]=Math.max(r[1],e[1]),t[2]=Math.max(r[2],e[2]),t[3]=Math.max(r[3],e[3]),t},min:function(t,r,e){return t[0]=Math.min(r[0],e[0]),t[1]=Math.min(r[1],e[1]),t[2]=Math.min(r[2],e[2]),t[3]=Math.min(r[3],e[3]),t},mul:w,multiply:l,negate:function(t,r){return t[0]=-r[0],t[1]=-r[1],t[2]=-r[2],t[3]=-r[3],t},normalize:p,random:function(t,r){const e=n.QR;let o,i,s,a,l,u;r=r||1;do{o=2*e()-1,i=2*e()-1,l=o*o+i*i}while(l>=1);do{s=2*e()-1,a=2*e()-1,u=s*s+a*a}while(u>=1);const c=Math.sqrt((1-l)/u);return t[0]=r*o,t[1]=r*i,t[2]=r*s*c,t[3]=r*a*c,t},round:function(t,r){return t[0]=Math.round(r[0]),t[1]=Math.round(r[1]),t[2]=Math.round(r[2]),t[3]=Math.round(r[3]),t},scale:c,scaleAndAdd:function(t,r,e,n){return t[0]=r[0]+e[0]*n,t[1]=r[1]+e[1]*n,t[2]=r[2]+e[2]*n,t[3]=r[3]+e[3]*n,t},set:i,sqrDist:N,sqrLen:A,squaredDistance:m,squaredLength:d,str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},sub:v,subtract:a,transformMat4:b,transformQuat:function(t,r,e){const n=r[0],o=r[1],i=r[2],s=e[0],a=e[1],l=e[2],u=e[3],c=u*n+a*i-l*o,h=u*o+l*n-s*i,m=u*i+s*o-a*n,f=-s*n-a*o-l*i;return t[0]=c*u+f*-s+h*-l-m*-a,t[1]=h*u+f*-a+m*-s-c*-l,t[2]=m*u+f*-l+c*-a-h*-s,t[3]=r[3],t}},Symbol.toStringTag,{value:"Module"}))},46988:(t,r,e)=>{e.d(r,{SQ:()=>i,ec:()=>l,kv:()=>o,uO:()=>s,yU:()=>u});const n={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function o(t){return!!n[t]||!!n[t.toLowerCase()]}function i(t){return n[t]??n[t.toLowerCase()]}function s(t){return[...i(t)]}function a(t,r,e){e<0&&++e,e>1&&--e;const n=6*e;return n<1?t+(r-t)*n:2*e<1?r:3*e<2?t+(r-t)*(2/3-e)*6:t}function l(t,r,e,n=1){const o=(t%360+360)%360/360,i=e<=.5?e*(r+1):e+r-e*r,s=2*e-i;return[Math.round(255*a(s,i,o+1/3)),Math.round(255*a(s,i,o)),Math.round(255*a(s,i,o-1/3)),n]}function u(t){const r=t.length>5,e=r?8:4,n=(1<<e)-1,o=r?1:17,i=r?9===t.length:5===t.length;let s=Number("0x"+t.substr(1));if(isNaN(s))return null;const a=[0,0,0,1];let l;return i&&(l=s&n,s>>=e,a[3]=o*l/255),l=s&n,s>>=e,a[2]=o*l,l=s&n,s>>=e,a[1]=o*l,l=s&n,s>>=e,a[0]=o*l,a}},9592:(t,r,e)=>{e.d(r,{n:()=>o});var n=e(50504);class o extends n.g{notify(){const t=this._observers;if(t&&t.length>0){const r=t.slice();for(const t of r)t.onInvalidated(),t.onCommitted()}}}},27576:(t,r,e)=>{function n(t){return"r"in t&&"g"in t&&"b"in t}function o(t){return"h"in t&&"s"in t&&"v"in t}function i(t){return"l"in t&&"a"in t&&"b"in t}function s(t){return"l"in t&&"c"in t&&"h"in t}e.d(r,{AE:()=>d,Ij:()=>y,SJ:()=>g,_X:()=>p,eQ:()=>n}),e(44728),e(74784),e(37008);const a=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],l=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function u(t,r){const e=[];let n,o;if(t[0].length!==r.length)throw new Error("dimensions do not match");const i=t.length,s=t[0].length;let a=0;for(n=0;n<i;n++){for(a=0,o=0;o<s;o++)a+=t[n][o]*r[o];e.push(a)}return e}function c(t){const r=[t.r/255,t.g/255,t.b/255].map((t=>t<=.04045?t/12.92:((t+.055)/1.055)**2.4)),e=u(a,r);return{x:100*e[0],y:100*e[1],z:100*e[2]}}function h(t){const r=u(l,[t.x/100,t.y/100,t.z/100]).map((t=>{const r=t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055;return Math.min(1,Math.max(r,0))}));return{r:Math.round(255*r[0]),g:Math.round(255*r[1]),b:Math.round(255*r[2])}}function m(t){const r=[t.x/95.047,t.y/100,t.z/108.883].map((t=>t>(6/29)**3?t**(1/3):1/3*(29/6)**2*t+4/29));return{l:116*r[1]-16,a:500*(r[0]-r[1]),b:200*(r[1]-r[2])}}function f(t){const r=t.l,e=[(r+16)/116+t.a/500,(r+16)/116,(r+16)/116-t.b/200].map((t=>t>6/29?t**3:3*(6/29)**2*(t-4/29)));return{x:95.047*e[0],y:100*e[1],z:108.883*e[2]}}function d(t){return n(t)?t:s(t)?function(t){return h(f(function(t){const r=t.l,e=t.c,n=t.h;return{l:r,a:e*Math.cos(n),b:e*Math.sin(n)}}(t)))}(t):i(t)?function(t){return h(f(t))}(t):function(t){return"x"in t&&"y"in t&&"z"in t}(t)?h(t):o(t)?function(t){const r=(t.h+360)%360/60,e=t.s/100,n=t.v/100*255,o=n*e,i=o*(1-Math.abs(r%2-1));let s;switch(Math.floor(r)){case 0:s={r:o,g:i,b:0};break;case 1:s={r:i,g:o,b:0};break;case 2:s={r:0,g:o,b:i};break;case 3:s={r:0,g:i,b:o};break;case 4:s={r:i,g:0,b:o};break;case 5:case 6:s={r:o,g:0,b:i};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+n-o),s.g=Math.round(s.g+n-o),s.b=Math.round(s.b+n-o),s}(t):t}function p(t){return o(t)?t:function(t){const r=t.r,e=t.g,n=t.b,o=Math.max(r,e,n),i=o-Math.min(r,e,n);let s=o,a=0===i?0:o===r?(e-n)/i%6:o===e?(n-r)/i+2:(r-e)/i+4,l=0===i?0:i/s;return a<0&&(a+=6),a*=60,l*=100,s*=100/255,{h:a,s:l,v:s}}(d(t))}function g(t){return i(t)?t:function(t){return m(c(t))}(d(t))}function y(t){return s(t)?t:function(t){return function(t){const r=t.l,e=t.a,n=t.b,o=Math.sqrt(e*e+n*n);let i=Math.atan2(n,e);return i=i>0?i:i+2*Math.PI,{l:r,c:o,h:i}}(m(c(t)))}(d(t))}var b,M;(M=b||(b={}))[M.Low=160]="Low",M[M.High=225]="High"},37008:(t,r,e)=>{function n(){return[0,0,0,0]}function o(t,r,e,n){return[t,r,e,n]}function i(){return o(1,1,1,1)}function s(){return o(1,0,0,0)}function a(){return o(0,1,0,0)}function l(){return o(0,0,1,0)}function u(){return o(0,0,0,1)}e.d(r,{Su:()=>n,WK:()=>o});const c=i(),h=s(),m=a(),f=l(),d=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_W:d,UNIT_X:h,UNIT_Y:m,UNIT_Z:f,ZEROS:[0,0,0,0],clone:function(t){return[t[0],t[1],t[2],t[3]]},create:n,createView:function(t,r){return new Float64Array(t,r,4)},fromArray:function(t,r=[0,0,0,0]){const e=Math.min(4,t.length);for(let n=0;n<e;++n)r[n]=t[n];return r},fromValues:o,ones:i,unitW:u,unitX:s,unitY:a,unitZ:l,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},60708:(t,r,e)=>{e.d(r,{Su:()=>c});var n=e(53368),o=e(95247),i=e(50853),s=e(53004),a=e(67776),l=e(7488),u=e(48516);e(56156),e(97492),e(6704);const c={base:i.c,key:"type",typeMap:{extent:o.c,multipoint:s.c,point:a.c,polyline:u.c,polygon:l.c}};(0,n.S2)(c)},6704:(t,r,e)=>{e.d(r,{Ce:()=>p,Cs:()=>f,Ul:()=>u,_:()=>c,_x:()=>h,cZ:()=>m,h4:()=>d,uG:()=>y});var n=e(95247),o=e(50853),i=e(53004),s=e(67776),a=e(7488),l=e(48516);function u(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function c(t){return void 0!==t.points}function h(t){return void 0!==t.x&&void 0!==t.y}function m(t){return void 0!==t.paths}function f(t){return void 0!==t.rings}function d(t){return null==t?null:t instanceof o.c?t:h(t)?s.c.fromJSON(t):m(t)?l.c.fromJSON(t):f(t)?a.c.fromJSON(t):c(t)?i.c.fromJSON(t):u(t)?n.c.fromJSON(t):null}function p(t){return t?h(t)?"esriGeometryPoint":m(t)?"esriGeometryPolyline":f(t)?"esriGeometryPolygon":u(t)?"esriGeometryEnvelope":c(t)?"esriGeometryMultipoint":null:null}const g={esriGeometryPoint:s.c,esriGeometryPolyline:l.c,esriGeometryPolygon:a.c,esriGeometryEnvelope:n.c,esriGeometryMultipoint:i.c};function y(t){return t&&g[t]||null}},97492:(t,r,e)=>{e.d(r,{U:()=>o,j:()=>i});var n=e(14628);const o=(0,n.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),i=(0,n.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},91496:(t,r,e)=>{e.r(r),e.d(r,{default:()=>g}),e(60708);var n=e(9976),o=e(66820),i=e(34084),s=e(26852),a=e(89004),l=e(25404),u=e(72116),c=e(32876),h=e(95280),m=e(61944),f=e(46320),d=e(95247),p=e(67776);class g{convertVectorFieldData(t){const r=o.c.fromJSON(t.pixelBlock),e=(0,c.Ws)(r,t.type);return Promise.resolve(null!=e?e.toJSON():null)}computeStatisticsHistograms(t){const r=o.c.fromJSON(t.pixelBlock),e=(0,u.SA)(r);return Promise.resolve(e)}async decode(t){const r=await(0,i.Y)(t.data,t.options);return r&&r.toJSON()}symbolize(t){t.pixelBlock=o.c.fromJSON(t.pixelBlock),t.extent=t.extent?d.c.fromJSON(t.extent):null;const r=this.symbolizer.symbolize(t);return Promise.resolve(null!=r?r.toJSON():null)}async updateSymbolizer(t){this.symbolizer=m.c.fromJSON(t.symbolizerJSON),t.histograms&&"rasterStretch"===this.symbolizer?.rendererJSON.type&&(this.symbolizer.rendererJSON.histograms=t.histograms)}async updateRasterFunction(t){this.rasterFunction=(0,a.Su)(t.rasterFunctionJSON)}async process(t){const r=this.rasterFunction.process({extent:d.c.fromJSON(t.extent),primaryPixelBlocks:t.primaryPixelBlocks.map((t=>null!=t?o.c.fromJSON(t):null)),primaryPixelSizes:t.primaryPixelSizes?.map((t=>null!=t?p.c.fromJSON(t):null)),primaryRasterIds:t.primaryRasterIds});return null!=r?r.toJSON():null}stretch(t){const r=this.symbolizer.simpleStretch(o.c.fromJSON(t.srcPixelBlock),t.stretchParams);return Promise.resolve(r?.toJSON())}estimateStatisticsHistograms(t){const r=(0,u.CW)(o.c.fromJSON(t.srcPixelBlock));return Promise.resolve(r)}split(t){const r=(0,s.SG)(o.c.fromJSON(t.srcPixelBlock),t.tileSize,t.maximumPyramidLevel??0,!1===t.useBilinear);return r&&r.forEach(((t,e)=>{r.set(e,t?.toJSON())})),Promise.resolve(r)}clipTile(t){const r=o.c.fromJSON(t.pixelBlock),e=(0,s.qM)({...t,pixelBlock:r});return Promise.resolve(e?.toJSON())}async mosaicAndTransform(t){const r=t.srcPixelBlocks.map((t=>t?new o.c(t):null)),e=(0,s.Gw)(r,t.srcMosaicSize,{blockWidths:t.blockWidths,alignmentInfo:t.alignmentInfo,clipOffset:t.clipOffset,clipSize:t.clipSize});let n,i=e;return t.coefs&&(i=(0,s.S0)(e,t.destDimension,t.coefs,t.sampleSpacing,t.interpolation)),t.projectDirections&&t.gcsGrid&&(n=(0,s.O8)(t.destDimension,t.gcsGrid),i=(0,c.UB)(i,t.isUV?"vector-uv":"vector-magdir",n)),{pixelBlock:i?.toJSON(),localNorthDirections:n}}async createFlowMesh(t,r){const e={data:new Float32Array(t.flowData.buffer),mask:new Uint8Array(t.flowData.maskBuffer),width:t.flowData.width,height:t.flowData.height},{vertexData:n,indexData:o}=await(0,f.__)(t.meshType,t.simulationSettings,e,r.signal);return{result:{vertexBuffer:n.buffer,indexBuffer:o.buffer},transferList:[n.buffer,o.buffer]}}async getProjectionOffsetGrid(t){const r=d.c.fromJSON(t.projectedExtent),e=d.c.fromJSON(t.srcBufferExtent);let o=null;t.datumTransformationSteps&&(o=new n.c({steps:t.datumTransformationSteps})),(t.includeGCSGrid||(0,l.S0)(r.spatialReference,e.spatialReference,o))&&await(0,l.AJ)();const i=t.rasterTransform?(0,h.O)(t.rasterTransform):null;return(0,l.iG)({...t,projectedExtent:r,srcBufferExtent:e,datumTransformation:o,rasterTransform:i})}}},21432:(t,r,e)=>{e.d(r,{c:()=>f});var n,o=e(41948),i=e(44728),s=e(62088),a=e(1580),l=e(53368),u=e(9968),c=e(12552),h=e(3712);let m=n=class extends h.c{constructor(t){super(t),this.algorithm=null,this.fromColor=null,this.toColor=null,this.type="algorithmic"}clone(){return new n({fromColor:(0,s.ct)(this.fromColor),toColor:(0,s.ct)(this.toColor),algorithm:this.algorithm})}};(0,o._)([(0,u.G)({esriCIELabAlgorithm:"cie-lab",esriHSVAlgorithm:"hsv",esriLabLChAlgorithm:"lab-lch"})],m.prototype,"algorithm",void 0),(0,o._)([(0,a.qq)({type:i.c,json:{type:[l.Ab],write:!0}})],m.prototype,"fromColor",void 0),(0,o._)([(0,a.qq)({type:i.c,json:{type:[l.Ab],write:!0}})],m.prototype,"toColor",void 0),(0,o._)([(0,a.qq)({type:["algorithmic"]})],m.prototype,"type",void 0),m=n=(0,o._)([(0,c.c)("esri.rest.support.AlgorithmicColorRamp")],m);const f=m},3712:(t,r,e)=>{e.d(r,{c:()=>l});var n=e(41948),o=e(40504),i=e(1580),s=(e(9456),e(66360),e(72052),e(12552));let a=class extends o.am{constructor(t){super(t),this.type=null}};(0,n._)([(0,i.qq)({readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,n._)([(0,s.c)("esri.rest.support.ColorRamp")],a);const l=a},70516:(t,r,e)=>{e.d(r,{c:()=>h});var n,o=e(41948),i=e(62088),s=e(1580),a=(e(9456),e(66360),e(12552)),l=e(21432),u=e(3712);let c=n=class extends u.c{constructor(t){super(t),this.colorRamps=null,this.type="multipart"}clone(){return new n({colorRamps:(0,i.ct)(this.colorRamps)})}};(0,o._)([(0,s.qq)({type:[l.c],json:{write:!0}})],c.prototype,"colorRamps",void 0),(0,o._)([(0,s.qq)({type:["multipart"]})],c.prototype,"type",void 0),c=n=(0,o._)([(0,a.c)("esri.rest.support.MultipartColorRamp")],c);const h=c},55952:(t,r,e)=>{e.d(r,{h:()=>a,i:()=>s});var n=e(21432),o=e(3712),i=e(70516);const s={key:"type",base:o.c,typeMap:{algorithmic:n.c,multipart:i.c}};function a(t){return t?.type?"algorithmic"===t.type?n.c.fromJSON(t):"multipart"===t.type?i.c.fromJSON(t):null:null}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9896,6147],{44728:(t,r,e)=>{e.d(r,{c:()=>m});var n,o,i=e(46988),s=e(53648),a=e(53368);function l(t){return(0,s.qk)((0,a.Wu)(t),0,255)}function u(t,r,e){return t=Number(t),isNaN(t)?e:t<r?r:t>e?e:t}function c(t,r){const e=t.toString(16).padStart(2,"0");return r?e.substring(0,1):e}class h{static blendColors(t,r,e,n=new h){return n.r=Math.round(t.r+(r.r-t.r)*e),n.g=Math.round(t.g+(r.g-t.g)*e),n.b=Math.round(t.b+(r.b-t.b)*e),n.a=t.a+(r.a-t.a)*e,n._sanitize()}static fromRgb(t,r){const e=t.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(e){const t=e[2].split(/\s*,\s*/),n=e[1];if("rgb"===n&&3===t.length||"rgba"===n&&4===t.length){const e=t[0];if("%"===e.charAt(e.length-1)){const e=t.map((t=>2.56*parseFloat(t)));return 4===t.length&&(e[3]=parseFloat(t[3])),h.fromArray(e,r)}return h.fromArray(t.map((t=>parseFloat(t))),r)}if("hsl"===n&&3===t.length||"hsla"===n&&4===t.length)return h.fromArray((0,i.ec)(parseFloat(t[0]),parseFloat(t[1])/100,parseFloat(t[2])/100,parseFloat(t[3])),r)}return null}static fromHex(t,r=new h){if("#"!==t[0]||isNaN(Number(`0x${t.substring(1)}`)))return null;switch(t.length){case 4:case 5:{const e=parseInt(t.substring(1,2),16),n=parseInt(t.substring(2,3),16),o=parseInt(t.substring(3,4),16),i=5===t.length?15:parseInt(t.substring(4),16);return h.fromArray([e+16*e,n+16*n,o+16*o,(i+16*i)/255],r)}case 7:case 9:{const e=parseInt(t.substring(1,3),16),n=parseInt(t.substring(3,5),16),o=parseInt(t.substring(5,7),16),i=7===t.length?255:parseInt(t.substring(7),16);return h.fromArray([e,n,o,i/255],r)}default:return null}}static fromArray(t,r=new h){return r._set(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3])),isNaN(r.a)&&(r.a=1),r._sanitize()}static fromString(t,r){const e=(0,i.kv)(t)?(0,i.SQ)(t):null;return e&&h.fromArray(e,r)||h.fromRgb(t,r)||h.fromHex(t,r)}static fromJSON(t){return null!=t?new h([t[0],t[1],t[2],(t[3]??255)/255]):void 0}static toUnitRGB(t){return null!=t?[t.r/255,t.g/255,t.b/255]:null}static toUnitRGBA(t){return null!=t?[t.r/255,t.g/255,t.b/255,null!=t.a?t.a:1]:null}constructor(t){this.r=255,this.g=255,this.b=255,this.a=1,t&&this.setColor(t)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(t){return"string"==typeof t?h.fromString(t,this):Array.isArray(t)?h.fromArray(t,this):(this._set(t.r??0,t.g??0,t.b??0,t.a??1),t instanceof h||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(t){const r=t?.capitalize??!1,e=t?.digits??6,n=3===e||4===e,o=4===e||8===e,i=`#${c(this.r,n)}${c(this.g,n)}${c(this.b,n)}${o?c(Math.round(255*this.a),n):""}`;return r?i.toUpperCase():i}toCss(t=!1){const r=this.r+", "+this.g+", "+this.b;return t?`rgba(${r}, ${this.a})`:`rgb(${r})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(t=h.AlphaMode.ALWAYS){const r=l(this.r),e=l(this.g),n=l(this.b);return t===h.AlphaMode.ALWAYS||1!==this.a?[r,e,n,l(255*this.a)]:[r,e,n]}clone(){return new h(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(t){return null!=t&&t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}_sanitize(){return this.r=Math.round(u(this.r,0,255)),this.g=Math.round(u(this.g,0,255)),this.b=Math.round(u(this.b,0,255)),this.a=u(this.a,0,1),this}_set(t,r,e,n){this.r=t,this.g=r,this.b=e,this.a=n}}h.prototype.declaredClass="esri.Color",n=h||(h={}),(o=n.AlphaMode||(n.AlphaMode={}))[o.ALWAYS=0]="ALWAYS",o[o.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const m=h},8528:(t,r,e)=>{e.d(r,{c:()=>n,g:()=>o});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},74784:(t,r,e)=>{e.d(r,{a:()=>M,c:()=>o,d:()=>c,e:()=>S,g:()=>s,h:()=>g,i:()=>f,j:()=>d,l:()=>y,n:()=>p,s:()=>i,t:()=>b});var n=e(47364);function o(t,r){return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t}function i(t,r,e,n,o){return t[0]=r,t[1]=e,t[2]=n,t[3]=o,t}function s(t,r,e){return t[0]=r[0]+e[0],t[1]=r[1]+e[1],t[2]=r[2]+e[2],t[3]=r[3]+e[3],t}function a(t,r,e){return t[0]=r[0]-e[0],t[1]=r[1]-e[1],t[2]=r[2]-e[2],t[3]=r[3]-e[3],t}function l(t,r,e){return t[0]=r[0]*e[0],t[1]=r[1]*e[1],t[2]=r[2]*e[2],t[3]=r[3]*e[3],t}function u(t,r,e){return t[0]=r[0]/e[0],t[1]=r[1]/e[1],t[2]=r[2]/e[2],t[3]=r[3]/e[3],t}function c(t,r,e){return t[0]=r[0]*e,t[1]=r[1]*e,t[2]=r[2]*e,t[3]=r[3]*e,t}function h(t,r){const e=r[0]-t[0],n=r[1]-t[1],o=r[2]-t[2],i=r[3]-t[3];return Math.sqrt(e*e+n*n+o*o+i*i)}function m(t,r){const e=r[0]-t[0],n=r[1]-t[1],o=r[2]-t[2],i=r[3]-t[3];return e*e+n*n+o*o+i*i}function f(t){const r=t[0],e=t[1],n=t[2],o=t[3];return Math.sqrt(r*r+e*e+n*n+o*o)}function d(t){const r=t[0],e=t[1],n=t[2],o=t[3];return r*r+e*e+n*n+o*o}function p(t,r){const e=r[0],n=r[1],o=r[2],i=r[3];let s=e*e+n*n+o*o+i*i;return s>0&&(s=1/Math.sqrt(s),t[0]=e*s,t[1]=n*s,t[2]=o*s,t[3]=i*s),t}function g(t,r){return t[0]*r[0]+t[1]*r[1]+t[2]*r[2]+t[3]*r[3]}function y(t,r,e,n){const o=r[0],i=r[1],s=r[2],a=r[3];return t[0]=o+n*(e[0]-o),t[1]=i+n*(e[1]-i),t[2]=s+n*(e[2]-s),t[3]=a+n*(e[3]-a),t}function b(t,r,e){const n=r[0],o=r[1],i=r[2],s=r[3];return t[0]=e[0]*n+e[4]*o+e[8]*i+e[12]*s,t[1]=e[1]*n+e[5]*o+e[9]*i+e[13]*s,t[2]=e[2]*n+e[6]*o+e[10]*i+e[14]*s,t[3]=e[3]*n+e[7]*o+e[11]*i+e[15]*s,t}function M(t,r){return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]&&t[3]===r[3]}function S(t,r){const e=t[0],o=t[1],i=t[2],s=t[3],a=r[0],l=r[1],u=r[2],c=r[3],h=(0,n.Au)();return Math.abs(e-a)<=h*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(o-l)<=h*Math.max(1,Math.abs(o),Math.abs(l))&&Math.abs(i-u)<=h*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(s-c)<=h*Math.max(1,Math.abs(s),Math.abs(c))}const v=a,w=l,k=u,x=h,N=m,O=f,A=d;Object.freeze(Object.defineProperty({__proto__:null,add:s,ceil:function(t,r){return t[0]=Math.ceil(r[0]),t[1]=Math.ceil(r[1]),t[2]=Math.ceil(r[2]),t[3]=Math.ceil(r[3]),t},copy:o,copyVec3:function(t,r){return t[0]=r[0],t[1]=r[1],t[2]=r[2],t},dist:x,distance:h,div:k,divide:u,dot:g,equals:S,exactEquals:M,floor:function(t,r){return t[0]=Math.floor(r[0]),t[1]=Math.floor(r[1]),t[2]=Math.floor(r[2]),t[3]=Math.floor(r[3]),t},inverse:function(t,r){return t[0]=1/r[0],t[1]=1/r[1],t[2]=1/r[2],t[3]=1/r[3],t},len:O,length:f,lerp:y,max:function(t,r,e){return t[0]=Math.max(r[0],e[0]),t[1]=Math.max(r[1],e[1]),t[2]=Math.max(r[2],e[2]),t[3]=Math.max(r[3],e[3]),t},min:function(t,r,e){return t[0]=Math.min(r[0],e[0]),t[1]=Math.min(r[1],e[1]),t[2]=Math.min(r[2],e[2]),t[3]=Math.min(r[3],e[3]),t},mul:w,multiply:l,negate:function(t,r){return t[0]=-r[0],t[1]=-r[1],t[2]=-r[2],t[3]=-r[3],t},normalize:p,random:function(t,r){const e=n.QR;let o,i,s,a,l,u;r=r||1;do{o=2*e()-1,i=2*e()-1,l=o*o+i*i}while(l>=1);do{s=2*e()-1,a=2*e()-1,u=s*s+a*a}while(u>=1);const c=Math.sqrt((1-l)/u);return t[0]=r*o,t[1]=r*i,t[2]=r*s*c,t[3]=r*a*c,t},round:function(t,r){return t[0]=Math.round(r[0]),t[1]=Math.round(r[1]),t[2]=Math.round(r[2]),t[3]=Math.round(r[3]),t},scale:c,scaleAndAdd:function(t,r,e,n){return t[0]=r[0]+e[0]*n,t[1]=r[1]+e[1]*n,t[2]=r[2]+e[2]*n,t[3]=r[3]+e[3]*n,t},set:i,sqrDist:N,sqrLen:A,squaredDistance:m,squaredLength:d,str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},sub:v,subtract:a,transformMat4:b,transformQuat:function(t,r,e){const n=r[0],o=r[1],i=r[2],s=e[0],a=e[1],l=e[2],u=e[3],c=u*n+a*i-l*o,h=u*o+l*n-s*i,m=u*i+s*o-a*n,f=-s*n-a*o-l*i;return t[0]=c*u+f*-s+h*-l-m*-a,t[1]=h*u+f*-a+m*-s-c*-l,t[2]=m*u+f*-l+c*-a-h*-s,t[3]=r[3],t}},Symbol.toStringTag,{value:"Module"}))},46988:(t,r,e)=>{e.d(r,{SQ:()=>i,ec:()=>l,kv:()=>o,uO:()=>s,yU:()=>u});const n={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function o(t){return!!n[t]||!!n[t.toLowerCase()]}function i(t){return n[t]??n[t.toLowerCase()]}function s(t){return[...i(t)]}function a(t,r,e){e<0&&++e,e>1&&--e;const n=6*e;return n<1?t+(r-t)*n:2*e<1?r:3*e<2?t+(r-t)*(2/3-e)*6:t}function l(t,r,e,n=1){const o=(t%360+360)%360/360,i=e<=.5?e*(r+1):e+r-e*r,s=2*e-i;return[Math.round(255*a(s,i,o+1/3)),Math.round(255*a(s,i,o)),Math.round(255*a(s,i,o-1/3)),n]}function u(t){const r=t.length>5,e=r?8:4,n=(1<<e)-1,o=r?1:17,i=r?9===t.length:5===t.length;let s=Number("0x"+t.substr(1));if(isNaN(s))return null;const a=[0,0,0,1];let l;return i&&(l=s&n,s>>=e,a[3]=o*l/255),l=s&n,s>>=e,a[2]=o*l,l=s&n,s>>=e,a[1]=o*l,l=s&n,s>>=e,a[0]=o*l,a}},9592:(t,r,e)=>{e.d(r,{n:()=>o});var n=e(50504);class o extends n.g{notify(){const t=this._observers;if(t&&t.length>0){const r=t.slice();for(const t of r)t.onInvalidated(),t.onCommitted()}}}},27576:(t,r,e)=>{function n(t){return"r"in t&&"g"in t&&"b"in t}function o(t){return"h"in t&&"s"in t&&"v"in t}function i(t){return"l"in t&&"a"in t&&"b"in t}function s(t){return"l"in t&&"c"in t&&"h"in t}e.d(r,{AE:()=>d,Ij:()=>y,SJ:()=>g,_X:()=>p,eQ:()=>n}),e(44728),e(74784),e(37008);const a=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],l=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function u(t,r){const e=[];let n,o;if(t[0].length!==r.length)throw new Error("dimensions do not match");const i=t.length,s=t[0].length;let a=0;for(n=0;n<i;n++){for(a=0,o=0;o<s;o++)a+=t[n][o]*r[o];e.push(a)}return e}function c(t){const r=[t.r/255,t.g/255,t.b/255].map((t=>t<=.04045?t/12.92:((t+.055)/1.055)**2.4)),e=u(a,r);return{x:100*e[0],y:100*e[1],z:100*e[2]}}function h(t){const r=u(l,[t.x/100,t.y/100,t.z/100]).map((t=>{const r=t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055;return Math.min(1,Math.max(r,0))}));return{r:Math.round(255*r[0]),g:Math.round(255*r[1]),b:Math.round(255*r[2])}}function m(t){const r=[t.x/95.047,t.y/100,t.z/108.883].map((t=>t>(6/29)**3?t**(1/3):1/3*(29/6)**2*t+4/29));return{l:116*r[1]-16,a:500*(r[0]-r[1]),b:200*(r[1]-r[2])}}function f(t){const r=t.l,e=[(r+16)/116+t.a/500,(r+16)/116,(r+16)/116-t.b/200].map((t=>t>6/29?t**3:3*(6/29)**2*(t-4/29)));return{x:95.047*e[0],y:100*e[1],z:108.883*e[2]}}function d(t){return n(t)?t:s(t)?function(t){return h(f(function(t){const r=t.l,e=t.c,n=t.h;return{l:r,a:e*Math.cos(n),b:e*Math.sin(n)}}(t)))}(t):i(t)?function(t){return h(f(t))}(t):function(t){return"x"in t&&"y"in t&&"z"in t}(t)?h(t):o(t)?function(t){const r=(t.h+360)%360/60,e=t.s/100,n=t.v/100*255,o=n*e,i=o*(1-Math.abs(r%2-1));let s;switch(Math.floor(r)){case 0:s={r:o,g:i,b:0};break;case 1:s={r:i,g:o,b:0};break;case 2:s={r:0,g:o,b:i};break;case 3:s={r:0,g:i,b:o};break;case 4:s={r:i,g:0,b:o};break;case 5:case 6:s={r:o,g:0,b:i};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+n-o),s.g=Math.round(s.g+n-o),s.b=Math.round(s.b+n-o),s}(t):t}function p(t){return o(t)?t:function(t){const r=t.r,e=t.g,n=t.b,o=Math.max(r,e,n),i=o-Math.min(r,e,n);let s=o,a=0===i?0:o===r?(e-n)/i%6:o===e?(n-r)/i+2:(r-e)/i+4,l=0===i?0:i/s;return a<0&&(a+=6),a*=60,l*=100,s*=100/255,{h:a,s:l,v:s}}(d(t))}function g(t){return i(t)?t:function(t){return m(c(t))}(d(t))}function y(t){return s(t)?t:function(t){return function(t){const r=t.l,e=t.a,n=t.b,o=Math.sqrt(e*e+n*n);let i=Math.atan2(n,e);return i=i>0?i:i+2*Math.PI,{l:r,c:o,h:i}}(m(c(t)))}(d(t))}var b,M;(M=b||(b={}))[M.Low=160]="Low",M[M.High=225]="High"},37008:(t,r,e)=>{function n(){return[0,0,0,0]}function o(t,r,e,n){return[t,r,e,n]}function i(){return o(1,1,1,1)}function s(){return o(1,0,0,0)}function a(){return o(0,1,0,0)}function l(){return o(0,0,1,0)}function u(){return o(0,0,0,1)}e.d(r,{Su:()=>n,WK:()=>o});const c=i(),h=s(),m=a(),f=l(),d=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_W:d,UNIT_X:h,UNIT_Y:m,UNIT_Z:f,ZEROS:[0,0,0,0],clone:function(t){return[t[0],t[1],t[2],t[3]]},create:n,createView:function(t,r){return new Float64Array(t,r,4)},fromArray:function(t,r=[0,0,0,0]){const e=Math.min(4,t.length);for(let n=0;n<e;++n)r[n]=t[n];return r},fromValues:o,ones:i,unitW:u,unitX:s,unitY:a,unitZ:l,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},60708:(t,r,e)=>{e.d(r,{Su:()=>c});var n=e(53368),o=e(95247),i=e(50853),s=e(53004),a=e(67776),l=e(7488),u=e(48516);e(56156),e(97492),e(6704);const c={base:i.c,key:"type",typeMap:{extent:o.c,multipoint:s.c,point:a.c,polyline:u.c,polygon:l.c}};(0,n.S2)(c)},6704:(t,r,e)=>{e.d(r,{Ce:()=>p,Cs:()=>f,Ul:()=>u,_:()=>c,_x:()=>h,cZ:()=>m,h4:()=>d,uG:()=>y});var n=e(95247),o=e(50853),i=e(53004),s=e(67776),a=e(7488),l=e(48516);function u(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function c(t){return void 0!==t.points}function h(t){return void 0!==t.x&&void 0!==t.y}function m(t){return void 0!==t.paths}function f(t){return void 0!==t.rings}function d(t){return null==t?null:t instanceof o.c?t:h(t)?s.c.fromJSON(t):m(t)?l.c.fromJSON(t):f(t)?a.c.fromJSON(t):c(t)?i.c.fromJSON(t):u(t)?n.c.fromJSON(t):null}function p(t){return t?h(t)?"esriGeometryPoint":m(t)?"esriGeometryPolyline":f(t)?"esriGeometryPolygon":u(t)?"esriGeometryEnvelope":c(t)?"esriGeometryMultipoint":null:null}const g={esriGeometryPoint:s.c,esriGeometryPolyline:l.c,esriGeometryPolygon:a.c,esriGeometryEnvelope:n.c,esriGeometryMultipoint:i.c};function y(t){return t&&g[t]||null}},97492:(t,r,e)=>{e.d(r,{U:()=>o,j:()=>i});var n=e(14628);const o=(0,n.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),i=(0,n.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},91496:(t,r,e)=>{e.r(r),e.d(r,{default:()=>g}),e(60708);var n=e(9976),o=e(32104),i=e(34084),s=e(26852),a=e(89004),l=e(25404),u=e(72116),c=e(32876),h=e(95280),m=e(61944),f=e(46320),d=e(95247),p=e(67776);class g{convertVectorFieldData(t){const r=o.c.fromJSON(t.pixelBlock),e=(0,c.Ws)(r,t.type);return Promise.resolve(null!=e?e.toJSON():null)}computeStatisticsHistograms(t){const r=o.c.fromJSON(t.pixelBlock),e=(0,u.SA)(r);return Promise.resolve(e)}async decode(t){const r=await(0,i.Y)(t.data,t.options);return r&&r.toJSON()}symbolize(t){t.pixelBlock=o.c.fromJSON(t.pixelBlock),t.extent=t.extent?d.c.fromJSON(t.extent):null;const r=this.symbolizer.symbolize(t);return Promise.resolve(null!=r?r.toJSON():null)}async updateSymbolizer(t){this.symbolizer=m.c.fromJSON(t.symbolizerJSON),t.histograms&&"rasterStretch"===this.symbolizer?.rendererJSON.type&&(this.symbolizer.rendererJSON.histograms=t.histograms)}async updateRasterFunction(t){this.rasterFunction=(0,a.Su)(t.rasterFunctionJSON)}async process(t){const r=this.rasterFunction.process({extent:d.c.fromJSON(t.extent),primaryPixelBlocks:t.primaryPixelBlocks.map((t=>null!=t?o.c.fromJSON(t):null)),primaryPixelSizes:t.primaryPixelSizes?.map((t=>null!=t?p.c.fromJSON(t):null)),primaryRasterIds:t.primaryRasterIds});return null!=r?r.toJSON():null}stretch(t){const r=this.symbolizer.simpleStretch(o.c.fromJSON(t.srcPixelBlock),t.stretchParams);return Promise.resolve(r?.toJSON())}estimateStatisticsHistograms(t){const r=(0,u.CW)(o.c.fromJSON(t.srcPixelBlock));return Promise.resolve(r)}split(t){const r=(0,s.SG)(o.c.fromJSON(t.srcPixelBlock),t.tileSize,t.maximumPyramidLevel??0,!1===t.useBilinear);return r&&r.forEach(((t,e)=>{r.set(e,t?.toJSON())})),Promise.resolve(r)}clipTile(t){const r=o.c.fromJSON(t.pixelBlock),e=(0,s.qM)({...t,pixelBlock:r});return Promise.resolve(e?.toJSON())}async mosaicAndTransform(t){const r=t.srcPixelBlocks.map((t=>t?new o.c(t):null)),e=(0,s.Gw)(r,t.srcMosaicSize,{blockWidths:t.blockWidths,alignmentInfo:t.alignmentInfo,clipOffset:t.clipOffset,clipSize:t.clipSize});let n,i=e;return t.coefs&&(i=(0,s.S0)(e,t.destDimension,t.coefs,t.sampleSpacing,t.interpolation)),t.projectDirections&&t.gcsGrid&&(n=(0,s.O8)(t.destDimension,t.gcsGrid),i=(0,c.UB)(i,t.isUV?"vector-uv":"vector-magdir",n)),{pixelBlock:i?.toJSON(),localNorthDirections:n}}async createFlowMesh(t,r){const e={data:new Float32Array(t.flowData.buffer),mask:new Uint8Array(t.flowData.maskBuffer),width:t.flowData.width,height:t.flowData.height},{vertexData:n,indexData:o}=await(0,f.__)(t.meshType,t.simulationSettings,e,r.signal);return{result:{vertexBuffer:n.buffer,indexBuffer:o.buffer},transferList:[n.buffer,o.buffer]}}async getProjectionOffsetGrid(t){const r=d.c.fromJSON(t.projectedExtent),e=d.c.fromJSON(t.srcBufferExtent);let o=null;t.datumTransformationSteps&&(o=new n.c({steps:t.datumTransformationSteps})),(t.includeGCSGrid||(0,l.S0)(r.spatialReference,e.spatialReference,o))&&await(0,l.AJ)();const i=t.rasterTransform?(0,h.O)(t.rasterTransform):null;return(0,l.iG)({...t,projectedExtent:r,srcBufferExtent:e,datumTransformation:o,rasterTransform:i})}}},21432:(t,r,e)=>{e.d(r,{c:()=>f});var n,o=e(41948),i=e(44728),s=e(62088),a=e(1580),l=e(53368),u=e(9968),c=e(12552),h=e(3712);let m=n=class extends h.c{constructor(t){super(t),this.algorithm=null,this.fromColor=null,this.toColor=null,this.type="algorithmic"}clone(){return new n({fromColor:(0,s.ct)(this.fromColor),toColor:(0,s.ct)(this.toColor),algorithm:this.algorithm})}};(0,o._)([(0,u.G)({esriCIELabAlgorithm:"cie-lab",esriHSVAlgorithm:"hsv",esriLabLChAlgorithm:"lab-lch"})],m.prototype,"algorithm",void 0),(0,o._)([(0,a.qq)({type:i.c,json:{type:[l.Ab],write:!0}})],m.prototype,"fromColor",void 0),(0,o._)([(0,a.qq)({type:i.c,json:{type:[l.Ab],write:!0}})],m.prototype,"toColor",void 0),(0,o._)([(0,a.qq)({type:["algorithmic"]})],m.prototype,"type",void 0),m=n=(0,o._)([(0,c.c)("esri.rest.support.AlgorithmicColorRamp")],m);const f=m},3712:(t,r,e)=>{e.d(r,{c:()=>l});var n=e(41948),o=e(40504),i=e(1580),s=(e(9456),e(66360),e(72052),e(12552));let a=class extends o.am{constructor(t){super(t),this.type=null}};(0,n._)([(0,i.qq)({readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,n._)([(0,s.c)("esri.rest.support.ColorRamp")],a);const l=a},70516:(t,r,e)=>{e.d(r,{c:()=>h});var n,o=e(41948),i=e(62088),s=e(1580),a=(e(9456),e(66360),e(12552)),l=e(21432),u=e(3712);let c=n=class extends u.c{constructor(t){super(t),this.colorRamps=null,this.type="multipart"}clone(){return new n({colorRamps:(0,i.ct)(this.colorRamps)})}};(0,o._)([(0,s.qq)({type:[l.c],json:{write:!0}})],c.prototype,"colorRamps",void 0),(0,o._)([(0,s.qq)({type:["multipart"]})],c.prototype,"type",void 0),c=n=(0,o._)([(0,a.c)("esri.rest.support.MultipartColorRamp")],c);const h=c},55952:(t,r,e)=>{e.d(r,{h:()=>a,i:()=>s});var n=e(21432),o=e(3712),i=e(70516);const s={key:"type",base:o.c,typeMap:{algorithmic:n.c,multipart:i.c}};function a(t){return t?.type?"algorithmic"===t.type?n.c.fromJSON(t):"multipart"===t.type?i.c.fromJSON(t):null:null}}}]);
|
|
Binary file
|
package/geometry/Mesh.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.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import{deprecatedFunction as t}from"../core/deprecate.js";import r from"../core/Error.js";import o from"../core/Loadable.js";import s from"../core/Logger.js";import{EsriPromiseMixin as n}from"../core/Promise.js";import{whenOrAbort as i}from"../core/promiseUtils.js";import{watch as a}from"../core/reactiveUtils.js";import{property as c}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import{fromValues as l}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import m from"./Extent.js";import h from"./Geometry.js";import u from"./Point.js";import f from"./Polygon.js";import{composeAxes as d,create as x}from"./support/axisAngleDegrees.js";import y from"./support/MeshComponent.js";import{componentNotFoundMessage as v,meshNotLoadedMessage as g,invalidLocationMessage as S,invalidPolygonMessage as j,InvalidLocationError as w}from"./support/meshErrors.js";import b from"./support/MeshGeoreferencedVertexSpace.js";import A from"./support/MeshLocalVertexSpace.js";import R from"./support/MeshTransform.js";import{MeshVertexAttributes as L}from"./support/MeshVertexAttributes.js";import{isRelativeVertexSpace as M,vertexSpaceOriginToPoint as F}from"./support/meshVertexSpaceUtils.js";import{triangulate as
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import{deprecatedFunction as t}from"../core/deprecate.js";import r from"../core/Error.js";import o from"../core/Loadable.js";import s from"../core/Logger.js";import{EsriPromiseMixin as n}from"../core/Promise.js";import{whenOrAbort as i}from"../core/promiseUtils.js";import{watch as a}from"../core/reactiveUtils.js";import{property as c}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import{fromValues as l}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import m from"./Extent.js";import h from"./Geometry.js";import u from"./Point.js";import f from"./Polygon.js";import{composeAxes as d,create as x}from"./support/axisAngleDegrees.js";import y from"./support/MeshComponent.js";import{componentNotFoundMessage as v,meshNotLoadedMessage as g,invalidLocationMessage as S,invalidPolygonMessage as j,InvalidLocationError as w}from"./support/meshErrors.js";import b from"./support/MeshGeoreferencedVertexSpace.js";import A from"./support/MeshLocalVertexSpace.js";import R from"./support/MeshTransform.js";import{MeshVertexAttributes as L}from"./support/MeshVertexAttributes.js";import{isRelativeVertexSpace as M,vertexSpaceOriginToPoint as F,createVertexSpace as U,preferredVertexSpaceTypeForSR as _}from"./support/meshVertexSpaceUtils.js";import{triangulate as E}from"./support/triangulationUtils.js";import{getProjectedExtent as C,getExtentFromPositions as P}from"./support/meshUtils/bounds.js";import{centerAt as z}from"./support/meshUtils/centerAt.js";import{project as G}from"./support/meshUtils/georeference.js";import{loadExternal as k}from"./support/meshUtils/loadExternal.js";import{Metadata as I}from"./support/meshUtils/Metadata.js";import{convertUnitGeometry as T,createUnitSizeBox as V,extractSingleFaceOfBox as O,createUnitSizeSphere as B,createUnitSizeCylinder as W,convertPlaneSizeParameter as D,createUnitSizePlane as N}from"./support/meshUtils/primitives.js";import{rotate as Z}from"./support/meshUtils/rotate.js";import{scale as q}from"./support/meshUtils/scale.js";var H;const K="esri.geometry.Mesh";function J(){return s.getLogger(K)}const Q={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:b,local:A}};let X=H=class extends(o.LoadableMixin(n(h))){constructor(e){super(e),this.components=null,this.vertexSpace=new b,this.transform=null,this.metadata=new I,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new L,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.addHandles(a((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:e,spatialReference:t,vertexAttributes:r,vertexSpace:o}=this,s=r.position;if(0===s.length||e&&0===e.length)return new m({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t});if("local"===o.type){const{_untransformedExtent:e,transform:r}=this;return C(e,r,o,t)}if("georeferenced"===o.type&&M(o)){const{transform:e}=this,r=G({positions:s,transform:e,vertexSpace:o,inSpatialReference:t,outSpatialReference:t});return P(r,t)}return P(s,t)}get _untransformedExtent(){return P(this.vertexAttributes.position,this.spatialReference)}get anchor(){const e=F(this.vertexSpace,this.spatialReference);if(null!=e)return e;const{center:t,zmin:r}=this._transformedExtent;return new u({x:t.x,y:t.y,z:r,spatialReference:this.spatialReference})}get origin(){const e=F(this.vertexSpace,this.spatialReference);return null!=e?e:this._transformedExtent.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||(this.components=[]),this.components.push(y.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}J().error("removeComponent()",v)}}rotate(e,t,r,o){return d(e,t,r,Y),Z(this,Y,o),this}offset(e,t,r){if(!this._checkIfLoaded("offset()"))return this;const{vertexSpace:o,vertexAttributes:s}=this,n=s?.position;if(!n)return this;if(M(o)){const[s,n,i]=o.origin;o.origin=l(s+e,n+t,i+r)}else{for(let o=0;o<n.length;o+=3)n[o]+=e,n[o+1]+=t,n[o+2]+=r;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")?(q(this,e,t),this):this}centerAt(e,t){return this._checkIfLoaded("centerAt()")?(z(this,e,t),this):this}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(k(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){return this.cloneWithVertexSpace(this.vertexSpace.clone())}cloneWithVertexSpace(e){let t=null;if(this.components){const e=new Map,r=new Map;t=this.components.map((t=>t.cloneWithDeduplication(e,r)))}const r={components:t,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:e,transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new H(r)}cloneShallow(){return new H({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=import("./support/meshUtils/exporters/gltf/gltfexport.js"),r=this.load(),o=await Promise.all([t,r]),{toBinaryGLTF:s}=o[0];return s(this,e)}get memoryUsage(){let e=0;if(e+=this.vertexAttributes.memoryUsage,null!=this.components)for(const t of this.components)e+=t.memoryUsage;return e}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(J().error(e,g),!1)}static createBox(e,t){if(!(e instanceof u))return J().error(".createBox()",S),null;const r=new H(T(V(),e,t));return t?.imageFace&&"all"!==t.imageFace?O(r,t.imageFace):r}static createSphere(e,t){return e instanceof u?new H(T(B(t?.densificationFactor||0),e,t)):(J().error(".createSphere()",S),null)}static createCylinder(e,t){return e instanceof u?new H(T(W(t?.densificationFactor||0),e,t)):(J().error(".createCylinder()",S),null)}static createPlane(e,t){if(!(e instanceof u))return J().error(".createPlane()",S),null;const r=t?.facing??"up",o=D(r,t?.size);return new H(T(N(r),e,{...t,size:o}))}static createFromPolygon(e,t){if(!(e instanceof f))return J().error(".createFromPolygon()",j),null;const r=E(e);return new H({vertexAttributes:new L({position:r.position}),components:[new y({faces:r.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new b})}static async createFromGLTF(e,t,r){if(!(e instanceof u)){const e=new w;throw J().error(".createfromGLTF()",e.message),e}const{loadGLTFMesh:o}=await i(import("./support/meshUtils/loadGLTFMesh.js"),r);return new H(await o(e,t,r))}static async createFromFiles(e,o,s){t(J(),"`Mesh.createFromFiles` is deprecated in favor of 'SceneLayer.convertMesh'",{replacement:"SceneLayer.convertMesh",version:"4.29"});const n=e=>J().error(".createFromFiles()",e.message);if(!(e instanceof u)){const e=new w;throw n(e),e}if(!s?.layer)throw new r("invalid:no-layer","SceneLayer required for file to mesh conversion.");return s.layer.convertMesh(o,{location:e,...s})}static createWithExternalSource(e,t,r){const o=r?.extent??null,{x:s,y:n,z:i,spatialReference:a}=e,c=r?.transform?.clone()??new R,p=l(s,n,i??0),m=U(r?.vertexSpace??_(a),p),h={source:t,extent:o},u=new I;return u.externalSources.push(h),new H({metadata:u,transform:c,vertexSpace:m,spatialReference:a})}static createIncomplete(e,t){const{x:o,y:s,z:n,spatialReference:i}=e,a=t?.transform?.clone()??new R,c=l(o,s,n??0),p=U(t?.vertexSpace??_(i),c),m=new H({transform:a,vertexSpace:p,spatialReference:i});return m.addResolvingPromise(Promise.reject(new r("mesh-incomplete","Mesh resources are not complete"))),m}};e([c({type:[y],json:{write:!0}})],X.prototype,"components",void 0),e([c({nonNullable:!0,types:Q,constructOnly:!0,json:{write:!0}})],X.prototype,"vertexSpace",void 0),e([c({type:R,json:{write:!0}})],X.prototype,"transform",void 0),e([c({constructOnly:!0})],X.prototype,"metadata",void 0),e([c()],X.prototype,"hasExtent",null),e([c()],X.prototype,"_transformedExtent",null),e([c()],X.prototype,"_untransformedExtent",null),e([c()],X.prototype,"anchor",null),e([c()],X.prototype,"origin",null),e([c({readOnly:!0,json:{read:!1}})],X.prototype,"extent",null),e([c({readOnly:!0,json:{read:!1,write:!0,default:!0}})],X.prototype,"hasZ",void 0),e([c({readOnly:!0,json:{read:!1,write:!0,default:!1}})],X.prototype,"hasM",void 0),e([c({type:L,nonNullable:!0,json:{write:!0}})],X.prototype,"vertexAttributes",void 0),X=H=e([p(K)],X);const Y=x(),$=X;export{$ 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.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{deprecated as e}from"../../core/deprecate.js";import r from"../../core/Logger.js";import n from"../Point.js";import o from"./MeshGeoreferencedVertexSpace.js";import
|
|
5
|
+
import{deprecated as e}from"../../core/deprecate.js";import r from"../../core/Logger.js";import n from"../Point.js";import o from"./MeshGeoreferencedVertexSpace.js";import i from"./MeshLocalVertexSpace.js";import{t}from"../../chunks/vec3.js";function c(){return r.getLogger("esri.geometry.Mesh")}function a(e){const{vertexSpace:r}=e;if(null!=r.origin)return e.clone();const{anchor:n}=e,i=n.clone(),c=new o({origin:[i.x,i.y,i.z]}),a=e.cloneWithVertexSpace(c),{position:s}=a.vertexAttributes;return a.vertexAttributes.position=t(new Float64Array(s.length),s,[-i.x,-i.y,-(i.z??0)]),a.vertexAttributesChanged(),a}function s(e,r){switch(e.type){case"georeferenced":return g(e)&&!r.isGeographic&&!r.isWebMercator;case"local":return r.isGeographic||r.isWebMercator}}function g(e){return null!=e.origin}function p(e,r){if(!g(e))return null;const[o,i,t]=e.origin;return new n({x:o,y:i,z:t,spatialReference:r})}function u(r,n){const{x:t,y:a,z:s,spatialReference:g}=r,p=[t,a,s??0];if(void 0!==n?.geographic){if(e(c(),"option: geographic",{replacement:"use vertexSpace option instead",version:"4.29",warnOnce:!0}),!n?.vertexSpace)return n?.geographic?new i({origin:p}):new o({origin:p});c().warn("Deprecated geographic flag ignored since vertexSpace option is provided.")}if(!n?.vertexSpace)return g.isGeographic||g.isWebMercator?new i({origin:p}):new o({origin:p});switch(n.vertexSpace){case"local":return new i({origin:p});case"georeferenced":return new o({origin:p});case"georeferenced-absolute":return new o}}function f(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}function l(e,r){return"local"===e?new i({origin:r}):new o({origin:r})}export{l as createVertexSpace,c as getMeshLogger,g as isRelativeVertexSpace,f as preferredVertexSpaceTypeForSR,u as selectVertexSpace,s as shouldUpdateFast,a as toRelativeVertexSpace,p as vertexSpaceOriginToPoint};
|
package/interfaces.d.ts
CHANGED
|
@@ -19346,6 +19346,12 @@ declare namespace __esri {
|
|
|
19346
19346
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#cameraRoll)
|
|
19347
19347
|
*/
|
|
19348
19348
|
cameraRoll: number;
|
|
19349
|
+
/**
|
|
19350
|
+
* Copyright information for the layer.
|
|
19351
|
+
*
|
|
19352
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#copyright)
|
|
19353
|
+
*/
|
|
19354
|
+
copyright: string;
|
|
19349
19355
|
/**
|
|
19350
19356
|
* Modifies the extent of the image's ground footprint.
|
|
19351
19357
|
*
|
|
@@ -19382,6 +19388,12 @@ declare namespace __esri {
|
|
|
19382
19388
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#depthImagePathSuffix)
|
|
19383
19389
|
*/
|
|
19384
19390
|
depthImagePathSuffix: string;
|
|
19391
|
+
/**
|
|
19392
|
+
* The name of the layer's primary display field.
|
|
19393
|
+
*
|
|
19394
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#displayField)
|
|
19395
|
+
*/
|
|
19396
|
+
displayField: string;
|
|
19385
19397
|
/**
|
|
19386
19398
|
* The source of elevation, that will be used to compute ground to image transformations.
|
|
19387
19399
|
*
|
|
@@ -19450,6 +19462,12 @@ declare namespace __esri {
|
|
|
19450
19462
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#labelsVisible)
|
|
19451
19463
|
*/
|
|
19452
19464
|
labelsVisible: boolean;
|
|
19465
|
+
/**
|
|
19466
|
+
* A unique id that identifies an operational layer in a map.
|
|
19467
|
+
*
|
|
19468
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#layerId)
|
|
19469
|
+
*/
|
|
19470
|
+
readonly layerId: string;
|
|
19453
19471
|
/**
|
|
19454
19472
|
* Maximum search distance to be used while querying the feature service specified in the Oriented Imagery Layer.
|
|
19455
19473
|
*
|
|
@@ -19480,18 +19498,46 @@ declare namespace __esri {
|
|
|
19480
19498
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#orientedImageryType)
|
|
19481
19499
|
*/
|
|
19482
19500
|
orientedImageryType: "horizontal" | "nadir" | "oblique" | "360" | "inspection";
|
|
19501
|
+
/**
|
|
19502
|
+
* An array of field names to include in the OrientedImageryLayer.
|
|
19503
|
+
*
|
|
19504
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#outFields)
|
|
19505
|
+
*/
|
|
19506
|
+
outFields: string[];
|
|
19507
|
+
/**
|
|
19508
|
+
* Indicates whether to display popups when features in the layer are clicked.
|
|
19509
|
+
*
|
|
19510
|
+
* @default true
|
|
19511
|
+
*
|
|
19512
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#popupEnabled)
|
|
19513
|
+
*/
|
|
19514
|
+
popupEnabled: boolean;
|
|
19483
19515
|
/**
|
|
19484
19516
|
* The popup template for the layer.
|
|
19485
19517
|
*
|
|
19486
19518
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#popupTemplate)
|
|
19487
19519
|
*/
|
|
19488
19520
|
popupTemplate: PopupTemplate;
|
|
19521
|
+
/**
|
|
19522
|
+
* The portal item referencing the Oriented Imagery layer item from which the OrientedImageryLayer is loaded.
|
|
19523
|
+
*
|
|
19524
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#portalItem)
|
|
19525
|
+
*/
|
|
19526
|
+
portalItem: PortalItem;
|
|
19489
19527
|
/**
|
|
19490
19528
|
* The renderer assigned to the layer.
|
|
19491
19529
|
*
|
|
19492
19530
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#renderer)
|
|
19493
19531
|
*/
|
|
19494
19532
|
renderer: Renderer;
|
|
19533
|
+
/**
|
|
19534
|
+
* The spatial reference of the layer.
|
|
19535
|
+
*
|
|
19536
|
+
* @default SpatialReference.WGS84
|
|
19537
|
+
*
|
|
19538
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#spatialReference)
|
|
19539
|
+
*/
|
|
19540
|
+
spatialReference: SpatialReference;
|
|
19495
19541
|
/**
|
|
19496
19542
|
* Defines the unit of time used in the viewer's time selector tool.
|
|
19497
19543
|
*
|
|
@@ -19580,6 +19626,12 @@ declare namespace __esri {
|
|
|
19580
19626
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#cameraRoll)
|
|
19581
19627
|
*/
|
|
19582
19628
|
cameraRoll?: number;
|
|
19629
|
+
/**
|
|
19630
|
+
* Copyright information for the layer.
|
|
19631
|
+
*
|
|
19632
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#copyright)
|
|
19633
|
+
*/
|
|
19634
|
+
copyright?: string;
|
|
19583
19635
|
/**
|
|
19584
19636
|
* Modifies the extent of the image's ground footprint.
|
|
19585
19637
|
*
|
|
@@ -19616,6 +19668,12 @@ declare namespace __esri {
|
|
|
19616
19668
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#depthImagePathSuffix)
|
|
19617
19669
|
*/
|
|
19618
19670
|
depthImagePathSuffix?: string;
|
|
19671
|
+
/**
|
|
19672
|
+
* The name of the layer's primary display field.
|
|
19673
|
+
*
|
|
19674
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#displayField)
|
|
19675
|
+
*/
|
|
19676
|
+
displayField?: string;
|
|
19619
19677
|
/**
|
|
19620
19678
|
* The source of elevation, that will be used to compute ground to image transformations.
|
|
19621
19679
|
*
|
|
@@ -19714,18 +19772,46 @@ declare namespace __esri {
|
|
|
19714
19772
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#orientedImageryType)
|
|
19715
19773
|
*/
|
|
19716
19774
|
orientedImageryType?: "horizontal" | "nadir" | "oblique" | "360" | "inspection";
|
|
19775
|
+
/**
|
|
19776
|
+
* An array of field names to include in the OrientedImageryLayer.
|
|
19777
|
+
*
|
|
19778
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#outFields)
|
|
19779
|
+
*/
|
|
19780
|
+
outFields?: string[];
|
|
19781
|
+
/**
|
|
19782
|
+
* Indicates whether to display popups when features in the layer are clicked.
|
|
19783
|
+
*
|
|
19784
|
+
* @default true
|
|
19785
|
+
*
|
|
19786
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#popupEnabled)
|
|
19787
|
+
*/
|
|
19788
|
+
popupEnabled?: boolean;
|
|
19717
19789
|
/**
|
|
19718
19790
|
* The popup template for the layer.
|
|
19719
19791
|
*
|
|
19720
19792
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#popupTemplate)
|
|
19721
19793
|
*/
|
|
19722
19794
|
popupTemplate?: PopupTemplateProperties;
|
|
19795
|
+
/**
|
|
19796
|
+
* The portal item referencing the Oriented Imagery layer item from which the OrientedImageryLayer is loaded.
|
|
19797
|
+
*
|
|
19798
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#portalItem)
|
|
19799
|
+
*/
|
|
19800
|
+
portalItem?: PortalItemProperties;
|
|
19723
19801
|
/**
|
|
19724
19802
|
* The renderer assigned to the layer.
|
|
19725
19803
|
*
|
|
19726
19804
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#renderer)
|
|
19727
19805
|
*/
|
|
19728
19806
|
renderer?: RendererProperties;
|
|
19807
|
+
/**
|
|
19808
|
+
* The spatial reference of the layer.
|
|
19809
|
+
*
|
|
19810
|
+
* @default SpatialReference.WGS84
|
|
19811
|
+
*
|
|
19812
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html#spatialReference)
|
|
19813
|
+
*/
|
|
19814
|
+
spatialReference?: SpatialReferenceProperties;
|
|
19729
19815
|
/**
|
|
19730
19816
|
* Defines the unit of time used in the viewer's time selector tool.
|
|
19731
19817
|
*
|
|
@@ -20487,6 +20573,12 @@ declare namespace __esri {
|
|
|
20487
20573
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#applyEdits)
|
|
20488
20574
|
*/
|
|
20489
20575
|
applyEdits(edits: SceneLayerApplyEditsEdits, options?: SceneLayerApplyEditsOptions): Promise<SceneLayerEditsResult>;
|
|
20576
|
+
/**
|
|
20577
|
+
* Converts a file or list of files to mesh geometry.
|
|
20578
|
+
*
|
|
20579
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#convertMesh)
|
|
20580
|
+
*/
|
|
20581
|
+
convertMesh(files: any[], options?: ConvertMeshOptions): Promise<Mesh>;
|
|
20490
20582
|
/**
|
|
20491
20583
|
* Creates a default popup template for the layer, populated with all the fields of the layer.
|
|
20492
20584
|
*
|
|
@@ -20569,12 +20661,6 @@ declare namespace __esri {
|
|
|
20569
20661
|
on(name: "layerview-create", eventHandler: SceneLayerLayerviewCreateEventHandler): IHandle;
|
|
20570
20662
|
on(name: "layerview-create-error", eventHandler: SceneLayerLayerviewCreateErrorEventHandler): IHandle;
|
|
20571
20663
|
on(name: "layerview-destroy", eventHandler: SceneLayerLayerviewDestroyEventHandler): IHandle;
|
|
20572
|
-
/**
|
|
20573
|
-
* Converts a file or list of files to mesh geometry.
|
|
20574
|
-
*
|
|
20575
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#convertMesh)
|
|
20576
|
-
*/
|
|
20577
|
-
static convertMesh(files: any[], options?: ConvertMeshOptions): Promise<Mesh>;
|
|
20578
20664
|
static fromJSON(json: any): SceneLayer;
|
|
20579
20665
|
}
|
|
20580
20666
|
|
|
@@ -20737,6 +20823,12 @@ declare namespace __esri {
|
|
|
20737
20823
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#ConvertMeshOptions)
|
|
20738
20824
|
*/
|
|
20739
20825
|
location?: Point;
|
|
20826
|
+
/**
|
|
20827
|
+
* Specifies the vertex space of the created mesh.
|
|
20828
|
+
*
|
|
20829
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#ConvertMeshOptions)
|
|
20830
|
+
*/
|
|
20831
|
+
vertexSpace?: "local" | "georeferenced";
|
|
20740
20832
|
/**
|
|
20741
20833
|
* An [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) to abort the loading process.
|
|
20742
20834
|
*
|
|
@@ -25211,7 +25303,7 @@ declare namespace __esri {
|
|
|
25211
25303
|
*
|
|
25212
25304
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-PixelBlock.html#mask)
|
|
25213
25305
|
*/
|
|
25214
|
-
mask:
|
|
25306
|
+
mask: Uint8Array;
|
|
25215
25307
|
/**
|
|
25216
25308
|
* Indicates whether mask should be used as alpha values.
|
|
25217
25309
|
*
|
|
@@ -25301,7 +25393,7 @@ declare namespace __esri {
|
|
|
25301
25393
|
*
|
|
25302
25394
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-PixelBlock.html#mask)
|
|
25303
25395
|
*/
|
|
25304
|
-
mask?:
|
|
25396
|
+
mask?: Uint8Array;
|
|
25305
25397
|
/**
|
|
25306
25398
|
* Indicates whether mask should be used as alpha values.
|
|
25307
25399
|
*
|
|
@@ -27121,6 +27213,12 @@ declare namespace __esri {
|
|
|
27121
27213
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#bandArithmeticClayMinerals)
|
|
27122
27214
|
*/
|
|
27123
27215
|
bandArithmeticClayMinerals(parameters: rasterFunctionUtilsBandArithmeticClayMineralsParameters): RasterFunction;
|
|
27216
|
+
/**
|
|
27217
|
+
* Creates a custom Band Arithmetic function.
|
|
27218
|
+
*
|
|
27219
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#bandArithmeticCustom)
|
|
27220
|
+
*/
|
|
27221
|
+
bandArithmeticCustom(parameters: rasterFunctionUtilsBandArithmeticCustomParameters): RasterFunction;
|
|
27124
27222
|
/**
|
|
27125
27223
|
* Creates a Band Arithmetic function to calculate EVI.
|
|
27126
27224
|
*
|
|
@@ -27223,6 +27321,12 @@ declare namespace __esri {
|
|
|
27223
27321
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#bandArithmeticPVI)
|
|
27224
27322
|
*/
|
|
27225
27323
|
bandArithmeticPVI(parameters: rasterFunctionUtilsBandArithmeticPVIParameters): RasterFunction;
|
|
27324
|
+
/**
|
|
27325
|
+
* Creates a Band Arithmetic function to calculate RTVICore.
|
|
27326
|
+
*
|
|
27327
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#bandArithmeticRTVICore)
|
|
27328
|
+
*/
|
|
27329
|
+
bandArithmeticRTVICore(parameters: rasterFunctionUtilsBandArithmeticRTVICoreParameters): RasterFunction;
|
|
27226
27330
|
/**
|
|
27227
27331
|
* Creates a Band Arithmetic function to calculate SAVI.
|
|
27228
27332
|
*
|
|
@@ -28109,6 +28213,27 @@ declare namespace __esri {
|
|
|
28109
28213
|
outputPixelType?: "unknown" | "s8" | "s16" | "s32" | "u8" | "u16" | "u32" | "f32" | "f64";
|
|
28110
28214
|
}
|
|
28111
28215
|
|
|
28216
|
+
export interface rasterFunctionUtilsBandArithmeticCustomParameters {
|
|
28217
|
+
/**
|
|
28218
|
+
* The custom band index, e.g.
|
|
28219
|
+
*
|
|
28220
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#bandArithmeticCustom)
|
|
28221
|
+
*/
|
|
28222
|
+
bandIndexes: string;
|
|
28223
|
+
/**
|
|
28224
|
+
* The input raster.
|
|
28225
|
+
*
|
|
28226
|
+
* [Read more...](global.html#raster)
|
|
28227
|
+
*/
|
|
28228
|
+
raster?: RasterArgument;
|
|
28229
|
+
/**
|
|
28230
|
+
* The output pixel type, default is unknown.
|
|
28231
|
+
*
|
|
28232
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#bandArithmeticCustom)
|
|
28233
|
+
*/
|
|
28234
|
+
outputPixelType?: "unknown" | "s8" | "s16" | "s32" | "u8" | "u16" | "u32" | "f32" | "f64";
|
|
28235
|
+
}
|
|
28236
|
+
|
|
28112
28237
|
export interface rasterFunctionUtilsBandArithmeticEVIParameters {
|
|
28113
28238
|
/**
|
|
28114
28239
|
* The 0-based near infrared band id.
|
|
@@ -28592,6 +28717,39 @@ declare namespace __esri {
|
|
|
28592
28717
|
outputPixelType?: "unknown" | "s8" | "s16" | "s32" | "u8" | "u16" | "u32" | "f32" | "f64";
|
|
28593
28718
|
}
|
|
28594
28719
|
|
|
28720
|
+
export interface rasterFunctionUtilsBandArithmeticRTVICoreParameters {
|
|
28721
|
+
/**
|
|
28722
|
+
* The 0-based near infrared band id.
|
|
28723
|
+
*
|
|
28724
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#bandArithmeticRTVICore)
|
|
28725
|
+
*/
|
|
28726
|
+
nirBandId: number;
|
|
28727
|
+
/**
|
|
28728
|
+
* The 0-based red edge band id.
|
|
28729
|
+
*
|
|
28730
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#bandArithmeticRTVICore)
|
|
28731
|
+
*/
|
|
28732
|
+
reBandId: number;
|
|
28733
|
+
/**
|
|
28734
|
+
* The 0-based green band id.
|
|
28735
|
+
*
|
|
28736
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#bandArithmeticRTVICore)
|
|
28737
|
+
*/
|
|
28738
|
+
greenBandId: number;
|
|
28739
|
+
/**
|
|
28740
|
+
* The input raster.
|
|
28741
|
+
*
|
|
28742
|
+
* [Read more...](global.html#raster)
|
|
28743
|
+
*/
|
|
28744
|
+
raster?: RasterArgument;
|
|
28745
|
+
/**
|
|
28746
|
+
* The output pixel type, default is unknown.
|
|
28747
|
+
*
|
|
28748
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#bandArithmeticRTVICore)
|
|
28749
|
+
*/
|
|
28750
|
+
outputPixelType?: "unknown" | "s8" | "s16" | "s32" | "u8" | "u16" | "u32" | "f32" | "f64";
|
|
28751
|
+
}
|
|
28752
|
+
|
|
28595
28753
|
export interface rasterFunctionUtilsBandArithmeticSAVIParameters {
|
|
28596
28754
|
/**
|
|
28597
28755
|
* The 0-based near infrared band id.
|
|
@@ -41574,7 +41732,7 @@ declare namespace __esri {
|
|
|
41574
41732
|
*/
|
|
41575
41733
|
export interface FetchResource {
|
|
41576
41734
|
/**
|
|
41577
|
-
*
|
|
41735
|
+
* Relative path of the resource.
|
|
41578
41736
|
*
|
|
41579
41737
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html#FetchResource)
|
|
41580
41738
|
*/
|
|
@@ -41622,7 +41780,7 @@ declare namespace __esri {
|
|
|
41622
41780
|
*
|
|
41623
41781
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html#FetchResourcesParams)
|
|
41624
41782
|
*/
|
|
41625
|
-
sortField?: "created" | "size" | "
|
|
41783
|
+
sortField?: "created" | "size" | "resource";
|
|
41626
41784
|
}
|
|
41627
41785
|
|
|
41628
41786
|
/**
|
|
@@ -91815,7 +91973,7 @@ declare namespace __esri {
|
|
|
91815
91973
|
*/
|
|
91816
91974
|
iconClass: string;
|
|
91817
91975
|
/**
|
|
91818
|
-
* The minimum number of list items required to
|
|
91976
|
+
* The minimum number of list items required to display the visibleElements.filter input box.
|
|
91819
91977
|
*
|
|
91820
91978
|
* @default 10
|
|
91821
91979
|
*
|
|
@@ -91985,7 +92143,7 @@ declare namespace __esri {
|
|
|
91985
92143
|
*/
|
|
91986
92144
|
iconClass?: string;
|
|
91987
92145
|
/**
|
|
91988
|
-
* The minimum number of list items required to
|
|
92146
|
+
* The minimum number of list items required to display the visibleElements.filter input box.
|
|
91989
92147
|
*
|
|
91990
92148
|
* @default 10
|
|
91991
92149
|
*
|
|
@@ -103324,7 +103482,7 @@ declare namespace __esri {
|
|
|
103324
103482
|
*/
|
|
103325
103483
|
minDragEnabledItems: number;
|
|
103326
103484
|
/**
|
|
103327
|
-
* The minimum number of list items required to
|
|
103485
|
+
* The minimum number of list items required to display the visibleElements.filter input box.
|
|
103328
103486
|
*
|
|
103329
103487
|
* @default 10
|
|
103330
103488
|
*
|
|
@@ -103474,7 +103632,7 @@ declare namespace __esri {
|
|
|
103474
103632
|
*/
|
|
103475
103633
|
minDragEnabledItems?: number;
|
|
103476
103634
|
/**
|
|
103477
|
-
* The minimum number of list items required to
|
|
103635
|
+
* The minimum number of list items required to display the visibleElements.filter input box.
|
|
103478
103636
|
*
|
|
103479
103637
|
* @default 10
|
|
103480
103638
|
*
|
|
@@ -115470,7 +115628,7 @@ declare namespace __esri {
|
|
|
115470
115628
|
*/
|
|
115471
115629
|
minDragEnabledItems: number;
|
|
115472
115630
|
/**
|
|
115473
|
-
* The minimum number of list items required to
|
|
115631
|
+
* The minimum number of list items required to display the visibleElements.filter input box.
|
|
115474
115632
|
*
|
|
115475
115633
|
* @default 10
|
|
115476
115634
|
*
|
|
@@ -115612,7 +115770,7 @@ declare namespace __esri {
|
|
|
115612
115770
|
*/
|
|
115613
115771
|
minDragEnabledItems?: number;
|
|
115614
115772
|
/**
|
|
115615
|
-
* The minimum number of list items required to
|
|
115773
|
+
* The minimum number of list items required to display the visibleElements.filter input box.
|
|
115616
115774
|
*
|
|
115617
115775
|
* @default 10
|
|
115618
115776
|
*
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.30/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../request.js";import i from"../core/Accessor.js";import r from"../core/Logger.js";import{isAbortError as s}from"../core/promiseUtils.js";import{watch as n}from"../core/reactiveUtils.js";import{addFrameTask as a}from"../core/scheduling.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{wasmFailedToInit as d,Lyr3DWasmWorkerOutputStatus as h,invalidLayerView as u}from"./ILyr3DWasmPerSceneView.js";import{Lyr3DWorkerHandle as _}from"./Lyr3DWorkerHandle.js";import{loadLyr3DMainWASM as y}from"../libs/lyr3d/Lyr3DModule.js";import{getMetersPerUnit as c}from"../symbols/support/unitConversionUtils.js";import{makeScheduleFunction as g}from"../views/3d/layers/I3SMeshView3D.js";var m,b;!function(e){e[e.Lifetime=0]="Lifetime",e[e.Jobs=1]="Jobs",e[e.Renderables=2]="Renderables"}(m||(m={})),function(e){e[e.Critical=0]="Critical",e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Info=3]="Info"}(b||(b={}));let f=class extends i{constructor(e){super(e),this._lyr3DMainPromise=null,this._lyr3DMain=null,this._layers=new Map,this._debugFlags=new Set,this._debugLevel=b.Warning,this._pulseTaskHandle=null,this._session=null,this._debugFlags.add(m.Lifetime),this._debugFlags.add(m.Jobs),this._debugFlags.add(m.Renderables)}_debugLog(e,t,i,s=!0){if(this._debugFlags.has(e)&&this._debugLevel>=t){const e=s?`[js] ${i}`:`${i}`;t===b.Critical||t===b.Error?r.getLogger(this).error(e):t===b.Warning&&r.getLogger(this).warn(e),r.getLogger(this).info(e)}}initialize(){this._debugLevel>b.Warning&&(r.getLogger(this).level="info"),this._debugLog(m.Lifetime,b.Info,"Lyr3DWasmPerSceneView.initialize()"),this.addHandles([n((()=>this.view.state?.contentCamera),(()=>this._updateWasmCamera()))]),this._pulseTaskHandle=a({preRender:()=>this._pulseTask()})}destroy(){this._debugLog(m.Lifetime,b.Info,"Lyr3DWasmPerSceneView.destroy()"),this._lyr3DMain&&(this._layers.forEach((e=>{e.abortController.abort()})),this._lyr3DMain.uninitialize_lyr3d_wasm(),this._lyr3DMain=null);const e=this._worker;e&&e.destroyWasm().then((()=>{this._worker?.destroy(),this._worker=null})),this._pulseTaskHandle?.remove(),this._pulseTaskHandle=null}add3DTilesLayerView(e){return this._lyr3DMain?this._add3DTilesLayerView(e):(this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.add3DTilesLayerView() called when WASM wasn't initialized"),d)}remove3DTilesLayerView(e){if(!this._lyr3DMain)return this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.remove3DTilesLayerView() called when WASM wasn't loaded!"),0;this._doRemoveLayerView(e);const t=this._layers.size;return 0===t&&(this._debugLog(m.Lifetime,b.Info,"Lyr3DWasmPerSceneView.remove3DTilesLayerView() no Lyr3D layers left after removing a layer, destroying"),this.destroy()),t}setEnabled(e,t){if(!this._lyr3DMain)return void this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.setEnabled() called when WASM wasn't loaded!");const i=this._layers.get(e.wasmLayerId);i&&(this._lyr3DMain.set_enabled(e.wasmLayerId,t),i.needMemoryUsageUpdate=!0)}setLayerOffset(e,t){if(!this._lyr3DMain)return void this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.setLayerOffset() called when WASM wasn't loaded!");this._layers.get(e.wasmLayerId)&&this._lyr3DMain.set_carto_offset_z(e.wasmLayerId,t)}getAttributionText(){if(!this._lyr3DMain)return this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.getAttributionText() called when WASM wasn't loaded!"),[];return this._lyr3DMain.get_current_attribution_text().split("|")}onRenderableEvicted(e,t,i){if(!this._lyr3DMain)return void this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.onRenderableEvicted() called when WASM wasn't loaded!");this._layers.get(e.wasmLayerId)&&this._lyr3DMain.on_renderable_evicted(e.wasmLayerId,t,i)}isUpdating(e){if(!this._lyr3DMain&&this._lyr3DMainPromise)return!0;const t=this._layers.get(e);return!!t&&(t.outstandingJobCount>0||t.outstandingRenderableCount>0)}initializeWasm(){return this._lyr3DMain?Promise.resolve():(this._debugLog(m.Lifetime,b.Info,"Lyr3DWasmPerSceneView.initializeWasm()"),this._lyr3DMainPromise||(this._lyr3DMainPromise=y().then((e=>{this._lyr3DMain=e,this._lyr3DMainPromise=null;const t=this._lyr3DMain.addFunction(this._onNewJob.bind(this),"v"),i=this._lyr3DMain.addFunction(this._onNewRenderable.bind(this),"v"),r=this._lyr3DMain.addFunction(this._freeRenderables.bind(this),"viii"),s=this._lyr3DMain.addFunction(this._setRenderableVisibility.bind(this),"viiii"),n=this._lyr3DMain.addFunction(this._onWasmError.bind(this),"viiii"),a="global"===this.view.viewingMode,o=this.view.renderSpatialReference?.isWebMercator?3857:this.view.renderSpatialReference?.wkid??-1,l=this.view.heightModelInfo?.heightModel,d=!l||"gravity-related-height"===l;return this._lyr3DMain.initialize_lyr3d_wasm(n,t,i,r,s,a,d,o,this._debugLevel)?(this._worker=new _(g(this.view.resourceController)),this._worker.promise?this._worker.promise:void 0):(this._lyr3DMain=null,void this._debugLog(m.Lifetime,b.Critical,"Lyr3d Main WASM failed to initialize",!1))})).catch((e=>{this._debugLog(m.Lifetime,b.Critical,`Lyr3d WASM failed to download error = ${e}`,!1)}))),this._lyr3DMainPromise)}_pulseTask(){if(this._lyr3DMain){let e=0;this._layers.forEach((t=>{e+=t.layerView.usedMemory})),e/=1048576;const t=this.view.resourceController.memoryController,i=t.usedMemory*t.maxMemory-e,r=t.maxMemory-i+t.additionalCacheMemory;this._lyr3DMain.frame_pulse(r,e,i,t.maxMemory)}}_incrementJobCount(e){e.outstandingJobCount+=1,1===e.outstandingJobCount&&e.outstandingRenderableCount<1&&e.layerView.updatingFlagChanged()}_decrementJobCount(e){e.outstandingJobCount-=1,0===e.outstandingJobCount&&e.outstandingRenderableCount<1&&e.layerView.updatingFlagChanged()}_incrementRenderableCount(e){e.outstandingRenderableCount+=1,e.outstandingJobCount<1&&1===e.outstandingRenderableCount&&e.layerView.updatingFlagChanged()}_decrementRenderableCount(e){e.outstandingRenderableCount-=1,e.outstandingJobCount<1&&0===e.outstandingRenderableCount&&e.layerView.updatingFlagChanged()}_onJobFailed(e,t,i){t.error.length&&this._debugLog(m.Jobs,b.Error,t.error,!1),this._lyr3DMain&&this._lyr3DMain.on_job_failed(i.jobId,i.desc),this._decrementJobCount(e)}_onJobSucceeded(e,t,i){if(this._lyr3DMain){const e=t.data.byteLength,r=this._lyr3DMain._malloc(e);new Uint8Array(this._lyr3DMain.HEAPU8.buffer,r,e).set(t.data),this._lyr3DMain.on_job_completed(i.jobId,t.jobDescJson,r,e),this._lyr3DMain._free(r)}this._decrementJobCount(e)}_getRequestPromises(e,i){const r=[];for(const s of e){const e=new URL(s),n=e.searchParams.get("session");n?this._session=n:this._session&&e.searchParams.append("session",this._session),r.push(t(e.toString(),i).then((e=>e.data)))}return r}_onNewJob(){const e=this._lyr3DMain.get_next_job(),t=this._layers.get(e.layerId);if(!t)return;this._incrementJobCount(t);const i=t.abortController.signal,r={responseType:"array-buffer",signal:i,query:{...t.customParameters,token:t.apiKey}},n={inputs:[],jobDescJson:e.desc,isMissingResourceCase:!1},a=this._getRequestPromises(e.urls,r);Promise.all(a).then((e=>(n.inputs=e,this._worker.invoke(n,i)))).then((e=>e)).catch((t=>(s(t)?this._debugLog(m.Jobs,b.Warning,`job ${e.jobId} was cancelled.`):this._debugLog(m.Jobs,b.Error,`job ${e.jobId} failed with error ${t}.`),{status:h.Failed,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[],inputs:[]}))).then((a=>{if(a.status===h.Failed)this._onJobFailed(t,a,e);else if(a.status===h.Succeeded)this._onJobSucceeded(t,a,e);else if(a.status===h.MissingInputs){const o=this._getRequestPromises(a.missingInputUrls,r);Promise.all(o).then((e=>{n.jobDescJson=a.jobDescJson,a.originalInputs?n.inputs=a.originalInputs:n.inputs=[],n.isMissingResourceCase=!0;for(const t of e)n.inputs.push(t);return this._worker.invoke(n,i)})).then((i=>{i.status===h.Failed?this._onJobFailed(t,i,e):i.status===h.Succeeded&&this._onJobSucceeded(t,i,e)})).catch((i=>{this._decrementJobCount(t),s(i)?this._debugLog(m.Jobs,b.Warning,`job ${e.jobId} was cancelled.`):this._debugLog(m.Jobs,b.Error,`job ${e.jobId} failed with error2 ${i}.`),this._lyr3DMain&&this._lyr3DMain.on_job_failed(e.jobId,e.desc)}))}}))}_onNewRenderable(){const e=this._lyr3DMain.get_next_renderable(),t=e.meshData;if(t.data&&t.data.byteLength>0){const e=t.data.slice();t.data=e}const i=this._layers.get(e.layerId);i&&(this._incrementRenderableCount(i),i.layerView.createRenderable(e).then((t=>{this._lyr3DMain&&this._lyr3DMain.on_renderable_created(!0,e.layerId,e.handle,t.memUsageBytes),this._decrementRenderableCount(i)})).catch((t=>{s(t)||this._debugLog(m.Renderables,b.Error,`createRenderable failed with error ${t}.`),this._lyr3DMain&&this._lyr3DMain.on_renderable_created(!1,e.layerId,e.handle,0),this._decrementRenderableCount(i)})))}_freeRenderables(e,t,i){if(i<1)return;const r=this._layers.get(e);if(!r)return;const s=r.layerView,n=[],a=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,t,i);for(let o=0;o<i;++o)n.push(a[o]);for(let o=0;o<i;++o)s.freeRenderable(n[o])}_setRenderableVisibility(e,t,i,r){if(r<1)return;const s=this._layers.get(e);if(!s)return;const n=s.layerView,a=[],o=[],l=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,t,r),d=new Uint8Array(this._lyr3DMain.HEAPU8.buffer,i,r);for(let h=0;h<r;++h)a.push(l[h]),o.push(1===d[h]);for(let h=0;h<r;++h)n.setRenderableVisibility(a[h],o[h])}_onWasmError(e,t,i,r){this._lyr3DMain&&this._debugLog(i,r,this._lyr3DMain.UTF8ToString(e,t),!1)}_doRemoveLayerView(e){const t=this._layers.get(e.wasmLayerId);return!!t&&(t.abortController.abort(),this._lyr3DMain.remove_layer(e.wasmLayerId),this._layers.delete(e.wasmLayerId),!0)}_add3DTilesLayerView(e){const t=e.layer;if(!t.url)return u;const i=this._lyr3DMain.get_next_layer_id(),r=new AbortController;this._layers.set(i,{layerView:e,abortController:r,needMemoryUsageUpdate:!1,outstandingJobCount:0,outstandingRenderableCount:0,customParameters:t.customParameters,apiKey:t.apiKey});const s=t.elevationInfo?.offset??0,n=t.elevationInfo?.unit?c(t.elevationInfo?.unit):1;return this._lyr3DMain.add_layer(t.url,i,s*n)?(this._updateWasmCamera(),i):(this._layers.delete(i),u)}_updateWasmCamera(){const e=this.view.state?.contentCamera;if(!e||!this._lyr3DMain)return;const{eye:t,center:i,up:r,near:s,far:n,fovY:a}=e,o=[e.viewport[2],e.viewport[3]],l=e.width/e.height;this._lyr3DMain.set_camera_parameters({eye:t,center:i,up:r,near:s,far:n,fov:a,aspectRatio:l,viewport:o})}};e([o({constructOnly:!0})],f.prototype,"view",void 0),f=e([l("esri.layers.Lyr3DWasmPerSceneView")],f);const w=f;export{w as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../request.js";import i from"../core/Accessor.js";import r from"../core/Logger.js";import{isAbortError as s}from"../core/promiseUtils.js";import{watch as n}from"../core/reactiveUtils.js";import{addFrameTask as a}from"../core/scheduling.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{wasmFailedToInit as d,Lyr3DWasmWorkerOutputStatus as h,invalidLayerView as u}from"./ILyr3DWasmPerSceneView.js";import{Lyr3DWorkerHandle as _}from"./Lyr3DWorkerHandle.js";import{loadLyr3DMainWASM as y}from"../libs/lyr3d/Lyr3DModule.js";import{getMetersPerUnit as c}from"../symbols/support/unitConversionUtils.js";import{makeScheduleFunction as g}from"../views/3d/layers/I3SMeshView3D.js";var m,b;!function(e){e[e.Lifetime=0]="Lifetime",e[e.Jobs=1]="Jobs",e[e.Renderables=2]="Renderables"}(m||(m={})),function(e){e[e.Critical=0]="Critical",e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Info=3]="Info"}(b||(b={}));let f=class extends i{constructor(e){super(e),this._lyr3DMainPromise=null,this._lyr3DMain=null,this._layers=new Map,this._debugFlags=new Set,this._debugLevel=b.Critical,this._pulseTaskHandle=null,this._session=null,this._debugFlags.add(m.Lifetime),this._debugFlags.add(m.Jobs),this._debugFlags.add(m.Renderables)}_debugLog(e,t,i,s=!0){if(this._debugFlags.has(e)&&this._debugLevel>=t){const e=s?`[js] ${i}`:`${i}`;t===b.Critical||t===b.Error?r.getLogger(this).error(e):t===b.Warning&&r.getLogger(this).warn(e),r.getLogger(this).info(e)}}initialize(){this._debugLevel>b.Warning&&(r.getLogger(this).level="info"),this._debugLog(m.Lifetime,b.Info,"Lyr3DWasmPerSceneView.initialize()"),this.addHandles([n((()=>this.view.state?.contentCamera),(()=>this._updateWasmCamera()))]),this._pulseTaskHandle=a({preRender:()=>this._pulseTask()})}destroy(){this._debugLog(m.Lifetime,b.Info,"Lyr3DWasmPerSceneView.destroy()"),this._lyr3DMain&&(this._layers.forEach((e=>{e.abortController.abort()})),this._lyr3DMain.uninitialize_lyr3d_wasm(),this._lyr3DMain=null);const e=this._worker;e&&e.destroyWasm().then((()=>{this._worker?.destroy(),this._worker=null})),this._pulseTaskHandle?.remove(),this._pulseTaskHandle=null}add3DTilesLayerView(e){return this._lyr3DMain?this._add3DTilesLayerView(e):(this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.add3DTilesLayerView() called when WASM wasn't initialized"),d)}remove3DTilesLayerView(e){if(!this._lyr3DMain)return this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.remove3DTilesLayerView() called when WASM wasn't loaded!"),0;this._doRemoveLayerView(e);const t=this._layers.size;return 0===t&&(this._debugLog(m.Lifetime,b.Info,"Lyr3DWasmPerSceneView.remove3DTilesLayerView() no Lyr3D layers left after removing a layer, destroying"),this.destroy()),t}setEnabled(e,t){if(!this._lyr3DMain)return void this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.setEnabled() called when WASM wasn't loaded!");const i=this._layers.get(e.wasmLayerId);i&&(this._lyr3DMain.set_enabled(e.wasmLayerId,t),i.needMemoryUsageUpdate=!0)}setLayerOffset(e,t){if(!this._lyr3DMain)return void this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.setLayerOffset() called when WASM wasn't loaded!");this._layers.get(e.wasmLayerId)&&this._lyr3DMain.set_carto_offset_z(e.wasmLayerId,t)}getAttributionText(){if(!this._lyr3DMain)return this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.getAttributionText() called when WASM wasn't loaded!"),[];return this._lyr3DMain.get_current_attribution_text().split("|")}onRenderableEvicted(e,t,i){if(!this._lyr3DMain)return void this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.onRenderableEvicted() called when WASM wasn't loaded!");this._layers.get(e.wasmLayerId)&&this._lyr3DMain.on_renderable_evicted(e.wasmLayerId,t,i)}isUpdating(e){if(!this._lyr3DMain&&this._lyr3DMainPromise)return!0;const t=this._layers.get(e);return!!t&&(t.outstandingJobCount>0||t.outstandingRenderableCount>0)}initializeWasm(){return this._lyr3DMain?Promise.resolve():(this._debugLog(m.Lifetime,b.Info,"Lyr3DWasmPerSceneView.initializeWasm()"),this._lyr3DMainPromise||(this._lyr3DMainPromise=y().then((e=>{this._lyr3DMain=e,this._lyr3DMainPromise=null;const t=this._lyr3DMain.addFunction(this._onNewJob.bind(this),"v"),i=this._lyr3DMain.addFunction(this._onNewRenderable.bind(this),"v"),r=this._lyr3DMain.addFunction(this._freeRenderables.bind(this),"viii"),s=this._lyr3DMain.addFunction(this._setRenderableVisibility.bind(this),"viiii"),n=this._lyr3DMain.addFunction(this._onWasmError.bind(this),"viiii"),a="global"===this.view.viewingMode,o=this.view.renderSpatialReference?.isWebMercator?3857:this.view.renderSpatialReference?.wkid??-1,l=this.view.heightModelInfo?.heightModel,d=!l||"gravity-related-height"===l;return this._lyr3DMain.initialize_lyr3d_wasm(n,t,i,r,s,a,d,o,this._debugLevel)?(this._worker=new _(g(this.view.resourceController)),this._worker.promise?this._worker.promise:void 0):(this._lyr3DMain=null,void this._debugLog(m.Lifetime,b.Critical,"Lyr3d Main WASM failed to initialize",!1))})).catch((e=>{this._debugLog(m.Lifetime,b.Critical,`Lyr3d WASM failed to download error = ${e}`,!1)}))),this._lyr3DMainPromise)}_pulseTask(){if(this._lyr3DMain){let e=0;this._layers.forEach((t=>{e+=t.layerView.usedMemory})),e/=1048576;const t=this.view.resourceController.memoryController,i=t.usedMemory*t.maxMemory-e,r=t.maxMemory-i+t.additionalCacheMemory;this._lyr3DMain.frame_pulse(r,e,i,t.maxMemory)}}_incrementJobCount(e){e.outstandingJobCount+=1,1===e.outstandingJobCount&&e.outstandingRenderableCount<1&&e.layerView.updatingFlagChanged()}_decrementJobCount(e){e.outstandingJobCount-=1,0===e.outstandingJobCount&&e.outstandingRenderableCount<1&&e.layerView.updatingFlagChanged()}_incrementRenderableCount(e){e.outstandingRenderableCount+=1,e.outstandingJobCount<1&&1===e.outstandingRenderableCount&&e.layerView.updatingFlagChanged()}_decrementRenderableCount(e){e.outstandingRenderableCount-=1,e.outstandingJobCount<1&&0===e.outstandingRenderableCount&&e.layerView.updatingFlagChanged()}_onJobFailed(e,t,i){t.error.length&&this._debugLog(m.Jobs,b.Error,t.error,!1),this._lyr3DMain&&this._lyr3DMain.on_job_failed(i.jobId,i.desc),this._decrementJobCount(e)}_onJobSucceeded(e,t,i){if(this._lyr3DMain){const e=t.data.byteLength,r=this._lyr3DMain._malloc(e);new Uint8Array(this._lyr3DMain.HEAPU8.buffer,r,e).set(t.data),this._lyr3DMain.on_job_completed(i.jobId,t.jobDescJson,r,e),this._lyr3DMain._free(r)}this._decrementJobCount(e)}_getRequestPromises(e,i){const r=[];for(const s of e){const e=new URL(s),n=e.searchParams.get("session");n?this._session=n:this._session&&e.searchParams.append("session",this._session),r.push(t(e.toString(),i).then((e=>e.data)))}return r}_onNewJob(){const e=this._lyr3DMain.get_next_job(),t=this._layers.get(e.layerId);if(!t)return;this._incrementJobCount(t);const i=t.abortController.signal,r={responseType:"array-buffer",signal:i,query:{...t.customParameters,token:t.apiKey}},n={inputs:[],jobDescJson:e.desc,isMissingResourceCase:!1},a=this._getRequestPromises(e.urls,r);Promise.all(a).then((e=>(n.inputs=e,this._worker.invoke(n,i)))).then((e=>e)).catch((t=>(s(t)?this._debugLog(m.Jobs,b.Warning,`job ${e.jobId} was cancelled.`):this._debugLog(m.Jobs,b.Error,`job ${e.jobId} failed with error ${t}.`),{status:h.Failed,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[],inputs:[]}))).then((a=>{if(a.status===h.Failed)this._onJobFailed(t,a,e);else if(a.status===h.Succeeded)this._onJobSucceeded(t,a,e);else if(a.status===h.MissingInputs){const o=this._getRequestPromises(a.missingInputUrls,r);Promise.all(o).then((e=>{n.jobDescJson=a.jobDescJson,a.originalInputs?n.inputs=a.originalInputs:n.inputs=[],n.isMissingResourceCase=!0;for(const t of e)n.inputs.push(t);return this._worker.invoke(n,i)})).then((i=>{i.status===h.Failed?this._onJobFailed(t,i,e):i.status===h.Succeeded&&this._onJobSucceeded(t,i,e)})).catch((i=>{this._decrementJobCount(t),s(i)?this._debugLog(m.Jobs,b.Warning,`job ${e.jobId} was cancelled.`):this._debugLog(m.Jobs,b.Error,`job ${e.jobId} failed with error2 ${i}.`),this._lyr3DMain&&this._lyr3DMain.on_job_failed(e.jobId,e.desc)}))}}))}_onNewRenderable(){const e=this._lyr3DMain.get_next_renderable(),t=e.meshData;if(t.data&&t.data.byteLength>0){const e=t.data.slice();t.data=e}const i=this._layers.get(e.layerId);i&&(this._incrementRenderableCount(i),i.layerView.createRenderable(e).then((t=>{this._lyr3DMain&&this._lyr3DMain.on_renderable_created(!0,e.layerId,e.handle,t.memUsageBytes),this._decrementRenderableCount(i)})).catch((t=>{s(t)||this._debugLog(m.Renderables,b.Error,`createRenderable failed with error ${t}.`),this._lyr3DMain&&this._lyr3DMain.on_renderable_created(!1,e.layerId,e.handle,0),this._decrementRenderableCount(i)})))}_freeRenderables(e,t,i){if(i<1)return;const r=this._layers.get(e);if(!r)return;const s=r.layerView,n=[],a=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,t,i);for(let o=0;o<i;++o)n.push(a[o]);for(let o=0;o<i;++o)s.freeRenderable(n[o])}_setRenderableVisibility(e,t,i,r){if(r<1)return;const s=this._layers.get(e);if(!s)return;const n=s.layerView,a=[],o=[],l=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,t,r),d=new Uint8Array(this._lyr3DMain.HEAPU8.buffer,i,r);for(let h=0;h<r;++h)a.push(l[h]),o.push(1===d[h]);n.setRenderableVisibility(a,o,r)}_onWasmError(e,t,i,r){this._lyr3DMain&&this._debugLog(i,r,this._lyr3DMain.UTF8ToString(e,t),!1)}_doRemoveLayerView(e){const t=this._layers.get(e.wasmLayerId);return!!t&&(t.abortController.abort(),this._lyr3DMain.remove_layer(e.wasmLayerId),this._layers.delete(e.wasmLayerId),!0)}_add3DTilesLayerView(e){const t=e.layer;if(!t.url)return u;const i=this._lyr3DMain.get_next_layer_id(),r=new AbortController;this._layers.set(i,{layerView:e,abortController:r,needMemoryUsageUpdate:!1,outstandingJobCount:0,outstandingRenderableCount:0,customParameters:t.customParameters,apiKey:t.apiKey});const s=t.elevationInfo?.offset??0,n=t.elevationInfo?.unit?c(t.elevationInfo?.unit):1;return this._lyr3DMain.add_layer(t.url,i,s*n)?(this._updateWasmCamera(),i):(this._layers.delete(i),u)}_updateWasmCamera(){const e=this.view.state?.contentCamera;if(!e||!this._lyr3DMain)return;const{eye:t,center:i,up:r,near:s,far:n,fovY:a}=e,o=[e.viewport[2],e.viewport[3]],l=e.width/e.height;this._lyr3DMain.set_camera_parameters({eye:t,center:i,up:r,near:s,far:n,fov:a,aspectRatio:l,viewport:o})}};e([o({constructOnly:!0})],f.prototype,"view",void 0),f=e([l("esri.layers.Lyr3DWasmPerSceneView")],f);const w=f;export{w as default};
|