@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
1 lines • 14.5 kB
JavaScript
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9695],{13069(t,e,n){n.d(e,{AG:()=>a,lk:()=>o,vD:()=>i,yS:()=>s});const r="randomUUID"in crypto;function o(){if(r)return crypto.randomUUID();const t=crypto.getRandomValues(new Uint16Array(8));t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const e=e=>t[e].toString(16).padStart(4,"0");return e(0)+e(1)+"-"+e(2)+"-"+e(3)+"-"+e(4)+"-"+e(5)+e(6)+e(7)}function s(){return`{${o().toUpperCase()}}`}function i(){return`{${o()}}`}function a(t){const e=t.toUpperCase();return t.startsWith("{")?e:`{${e}}`}},24212(t,e,n){n.d(e,{$7:()=>a,B:()=>i,XF:()=>u,tW:()=>l,w7:()=>s});var r=n(56512),o=n(86211);function s(t,e){return function(t,e){return e?.mode?e.mode:function(t){return t?p:c}(t).mode}(null==t||(t.hasZ??!1),e)}function i(t,e,n){return n&&n.mode!==e?`${t} only support ${e} elevation mode`:null}function a(t,e,n){return n?.mode===e?`${t} do not support ${e} elevation mode`:null}function l(t,e){return null!=e?.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression?`${t} do not support featureExpressionInfo`:null}function u(t,e){e&&t.warn(".elevationInfo=",e)}n(16271),(0,r.B)((t,e,n)=>{if(!t)return 0;if("decimal-degrees"===e)return 0;const r="unknown"!==e&&e?e:"meters",s=(0,o.mq)(n);return s?(0,o.oU)(t,r,s):0});const p={mode:"absolute-height",offset:0},c={mode:"on-the-ground",offset:null}},49695(t,e,n){n.r(e),n.d(e,{default:()=>S});var r=n(5482),o=n(79608),s=n(91715),i=n(69622),a=n(69540),l=n(25482),u=n(97768),p=n(91429),c=n(87024),f=n(86738),d=n(88625);let g=class extends((0,l.T)((0,a.OU)(i.A))){constructor(t){super(t),this.position=null,this.elevationInfo=null,this.feature=null}equals(t){return(0,u.CM)(this.position,t.position)&&(0,u.CM)(this.elevationInfo,t.elevationInfo)&&(0,s.xH)(this.feature,t.feature)}};(0,r.Cg)([(0,p.MZ)({type:f.A,json:{write:{isRequired:!0}}})],g.prototype,"position",void 0),(0,r.Cg)([(0,p.MZ)({type:d.A}),(0,c.P)()],g.prototype,"elevationInfo",void 0),(0,r.Cg)([(0,p.MZ)(s.N1)],g.prototype,"feature",void 0),g=(0,r.Cg)([(0,p.$K)("esri.analysis.LineOfSightAnalysisObserver")],g);const y=g;let h=class extends((0,l.T)(a.Pw)){constructor(t){super(t),this.position=null,this.elevationInfo=null,this.feature=null}equals(t){return(0,u.CM)(this.position,t.position)&&(0,u.CM)(this.elevationInfo,t.elevationInfo)&&(0,s.xH)(this.feature,t.feature)}};(0,r.Cg)([(0,p.MZ)({type:f.A,json:{write:!0,origins:{"web-scene":{write:{isRequired:!0}}}}}),(0,c.P)()],h.prototype,"position",void 0),(0,r.Cg)([(0,p.MZ)({type:d.A}),(0,c.P)()],h.prototype,"elevationInfo",void 0),(0,r.Cg)([(0,p.MZ)(s.N1)],h.prototype,"feature",void 0),h=(0,r.Cg)([(0,p.$K)("esri.analysis.LineOfSightAnalysisTarget")],h);var v=n(4576),m=n(7762),w=n(62885),x=n(36708),b=n(91218),C=n(70328),A=n(24212);const j=m.A.ofType(h);let M=class extends o.A{constructor(t){super(t),this.type="line-of-sight",this.observer=null,this.extent=null}initialize(){this.addHandles((0,x.wB)(()=>this._computeExtent(),t=>{null==t?.pending&&this._set("extent",null!=t?t.extent:null)},x.pc))}get targets(){return this._get("targets")||new j}set targets(t){this._set("targets",(0,w.V)(t,this.targets,j))}get spatialReference(){return null!=this.observer?.position?this.observer.position.spatialReference:null}get valid(){return null!=this.observer?.position}async waitComputeExtent(){const t=this._computeExtent();return null!=t?t.pending:Promise.resolve()}_computeExtent(){const t=this.spatialReference;if(null==this.observer?.position||null==t)return null;const e=t=>"absolute-height"===(0,A.w7)(t.position,t.elevationInfo),n=this.observer.position,r=(0,C.fA)(n.x,n.y,n.z,n.x,n.y,n.z);for(const e of this.targets)if(null!=e.position){const n=(0,b.projectOrLoad)(e.position,t);if(null!=n.pending)return{pending:n.pending,extent:null};if(null!=n.geometry){const{x:t,y:e,z:o}=n.geometry;(0,C.iT)(r,[t,e,o])}}const o=(0,C.w1)(r,t);return e(this.observer)&&this.targets.every(e)||(o.zmin=void 0,o.zmax=void 0),{pending:null,extent:o}}clear(){this.observer=null,this.targets.removeAll()}equals(t){return this===t||super.equals(t)&&(0,u.CM)(this.observer,t.observer)&&(0,v.aI)(this.targets.toArray(),t.targets.toArray(),(t,e)=>t.equals(e))}};(0,r.Cg)([(0,p.MZ)({type:["line-of-sight"]})],M.prototype,"type",void 0),(0,r.Cg)([(0,p.MZ)({type:y,json:{read:!0,write:!0}})],M.prototype,"observer",void 0),(0,r.Cg)([(0,p.MZ)({cast:w.H,type:j,nonNullable:!0,json:{read:!0,write:!0}})],M.prototype,"targets",null),(0,r.Cg)([(0,p.MZ)({value:null,readOnly:!0})],M.prototype,"extent",void 0),(0,r.Cg)([(0,p.MZ)()],M.prototype,"spatialReference",null),(0,r.Cg)([(0,p.MZ)({readOnly:!0})],M.prototype,"valid",null),M=(0,r.Cg)([(0,p.$K)("esri.analysis.LineOfSightAnalysis")],M);var I=n(25728),R=n(4146),Z=n(16131);const O=m.A.ofType(h);let U=class extends((0,Z.q)((0,I.M)(R.A))){constructor(t){super(t),this.type="line-of-sight",this.operationalLayerType="LineOfSightLayer",this.analysis=new M,this.opacity=1}initialize(){this.addHandles((0,x.wB)(()=>this.analysis,(t,e)=>{null!=e&&e.parent===this&&(e.parent=null),null!=t&&(t.parent=this)},x.pc))}async load(){return null!=this.analysis&&this.addResolvingPromise(this.analysis.waitComputeExtent()),this}get observer(){return this.analysis?.observer}set observer(t){const{analysis:e}=this;e&&(e.observer=t)}get targets(){return null!=this.analysis?this.analysis.targets:new m.A}set targets(t){(0,w.V)(t,this.analysis?.targets)}get fullExtent(){return null!=this.analysis?this.analysis.extent:null}get spatialReference(){return null!=this.analysis?this.analysis.spatialReference:null}releaseAnalysis(t){this.analysis===t&&(this.analysis=new M)}};(0,r.Cg)([(0,p.MZ)({json:{read:!1},readOnly:!0})],U.prototype,"type",void 0),(0,r.Cg)([(0,p.MZ)({type:["LineOfSightLayer"]})],U.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,p.MZ)({type:y,json:{read:!0,write:{isRequired:!0,ignoreOrigin:!0}}})],U.prototype,"observer",null),(0,r.Cg)([(0,p.MZ)({type:O,json:{read:!0,write:{ignoreOrigin:!0,isRequired:!0}}})],U.prototype,"targets",null),(0,r.Cg)([(0,p.MZ)({type:M,nonNullable:!0,json:{read:!1,write:!1}})],U.prototype,"analysis",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0})],U.prototype,"fullExtent",null),(0,r.Cg)([(0,p.MZ)({readOnly:!0})],U.prototype,"spatialReference",null),(0,r.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],U.prototype,"opacity",void 0),(0,r.Cg)([(0,p.MZ)({type:["show","hide"]})],U.prototype,"listMode",void 0),U=(0,r.Cg)([(0,p.$K)("esri.layers.LineOfSightLayer")],U);const S=U},56512(t,e,n){function r(t){let e,n,r=[],o=!1;return function(...s){return o&&e===this&&function(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(t[n]!==e[n])return!1;return!0}(s,r)||(n=t.apply(this,s),e=this,r=s,o=!0),n}}n.d(e,{B:()=>r})},76553(t,e,n){function r(t){return t&&"getAtOrigin"in t&&"originOf"in t}n.d(e,{H:()=>r})},80200(t,e,n){n.d(e,{T:()=>r,d:()=>c});const r={Base64:0,Hex:1,String:2,Raw:3};function o(t,e){const n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function s(t,e,n,r,s,i){return o(function(t,e){return t<<e|t>>>32-e}(o(o(e,t),o(r,i)),s),n)}function i(t,e,n,r,o,i,a){return s(e&n|~e&r,t,e,o,i,a)}function a(t,e,n,r,o,i,a){return s(e&r|n&~r,t,e,o,i,a)}function l(t,e,n,r,o,i,a){return s(e^n^r,t,e,o,i,a)}function u(t,e,n,r,o,i,a){return s(n^(e|~r),t,e,o,i,a)}function p(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;let n=1732584193,r=-271733879,s=-1732584194,p=271733878;for(let e=0;e<t.length;e+=16){const c=n,f=r,d=s,g=p;n=i(n,r,s,p,t[e],7,-680876936),p=i(p,n,r,s,t[e+1],12,-389564586),s=i(s,p,n,r,t[e+2],17,606105819),r=i(r,s,p,n,t[e+3],22,-1044525330),n=i(n,r,s,p,t[e+4],7,-176418897),p=i(p,n,r,s,t[e+5],12,1200080426),s=i(s,p,n,r,t[e+6],17,-1473231341),r=i(r,s,p,n,t[e+7],22,-45705983),n=i(n,r,s,p,t[e+8],7,1770035416),p=i(p,n,r,s,t[e+9],12,-1958414417),s=i(s,p,n,r,t[e+10],17,-42063),r=i(r,s,p,n,t[e+11],22,-1990404162),n=i(n,r,s,p,t[e+12],7,1804603682),p=i(p,n,r,s,t[e+13],12,-40341101),s=i(s,p,n,r,t[e+14],17,-1502002290),r=i(r,s,p,n,t[e+15],22,1236535329),n=a(n,r,s,p,t[e+1],5,-165796510),p=a(p,n,r,s,t[e+6],9,-1069501632),s=a(s,p,n,r,t[e+11],14,643717713),r=a(r,s,p,n,t[e],20,-373897302),n=a(n,r,s,p,t[e+5],5,-701558691),p=a(p,n,r,s,t[e+10],9,38016083),s=a(s,p,n,r,t[e+15],14,-660478335),r=a(r,s,p,n,t[e+4],20,-405537848),n=a(n,r,s,p,t[e+9],5,568446438),p=a(p,n,r,s,t[e+14],9,-1019803690),s=a(s,p,n,r,t[e+3],14,-187363961),r=a(r,s,p,n,t[e+8],20,1163531501),n=a(n,r,s,p,t[e+13],5,-1444681467),p=a(p,n,r,s,t[e+2],9,-51403784),s=a(s,p,n,r,t[e+7],14,1735328473),r=a(r,s,p,n,t[e+12],20,-1926607734),n=l(n,r,s,p,t[e+5],4,-378558),p=l(p,n,r,s,t[e+8],11,-2022574463),s=l(s,p,n,r,t[e+11],16,1839030562),r=l(r,s,p,n,t[e+14],23,-35309556),n=l(n,r,s,p,t[e+1],4,-1530992060),p=l(p,n,r,s,t[e+4],11,1272893353),s=l(s,p,n,r,t[e+7],16,-155497632),r=l(r,s,p,n,t[e+10],23,-1094730640),n=l(n,r,s,p,t[e+13],4,681279174),p=l(p,n,r,s,t[e],11,-358537222),s=l(s,p,n,r,t[e+3],16,-722521979),r=l(r,s,p,n,t[e+6],23,76029189),n=l(n,r,s,p,t[e+9],4,-640364487),p=l(p,n,r,s,t[e+12],11,-421815835),s=l(s,p,n,r,t[e+15],16,530742520),r=l(r,s,p,n,t[e+2],23,-995338651),n=u(n,r,s,p,t[e],6,-198630844),p=u(p,n,r,s,t[e+7],10,1126891415),s=u(s,p,n,r,t[e+14],15,-1416354905),r=u(r,s,p,n,t[e+5],21,-57434055),n=u(n,r,s,p,t[e+12],6,1700485571),p=u(p,n,r,s,t[e+3],10,-1894986606),s=u(s,p,n,r,t[e+10],15,-1051523),r=u(r,s,p,n,t[e+1],21,-2054922799),n=u(n,r,s,p,t[e+8],6,1873313359),p=u(p,n,r,s,t[e+15],10,-30611744),s=u(s,p,n,r,t[e+6],15,-1560198380),r=u(r,s,p,n,t[e+13],21,1309151649),n=u(n,r,s,p,t[e+4],6,-145523070),p=u(p,n,r,s,t[e+11],10,-1120210379),s=u(s,p,n,r,t[e+2],15,718787259),r=u(r,s,p,n,t[e+9],21,-343485551),n=o(n,c),r=o(r,f),s=o(s,d),p=o(p,g)}return[n,r,s,p]}function c(t,e=r.Hex){const n=e||r.Base64,o=p(function(t){const e=[];for(let n=0,r=8*t.length;n<r;n+=8)e[n>>5]|=(255&t.charCodeAt(n/8))<<n%32;return e}(t),8*t.length);switch(n){case r.Raw:return o;case r.Hex:return function(t){const e="0123456789abcdef",n=[];for(let r=0,o=4*t.length;r<o;r++)n.push(e.charAt(t[r>>2]>>r%4*8+4&15)+e.charAt(t[r>>2]>>r%4*8&15));return n.join("")}(o);case r.String:return function(t){const e=[];for(let n=0,r=32*t.length;n<r;n+=8)e.push(String.fromCharCode(t[n>>5]>>>n%32&255));return e.join("")}(o);case r.Base64:return function(t){const e=[];for(let n=0,r=4*t.length;n<r;n+=3){const r=(t[n>>2]>>n%4*8&255)<<16|(t[n+1>>2]>>(n+1)%4*8&255)<<8|t[n+2>>2]>>(n+2)%4*8&255;for(let o=0;o<4;o++)8*n+6*o>32*t.length?e.push("="):e.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6*(3-o)&63))}return e.join("")}(o)}}},85648(t,e,n){n.d(e,{n:()=>o});var r=n(84952);function o(t){return s[function(t){return"json"===t.type?"application/json":"blob"===t.type?t.blob.type:function(t){const e=(0,r.Zo)(t);return l[e]||i}(t.url)}(t)]||a}const s={},i="text/plain",a=s[i],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const t in l)s[l[t]]=t},87024(t,e,n){n.d(e,{P:()=>d});var r=n(49186),o=n(80200),s=n(76553),i=n(84952),a=n(13069),l=n(96156),u=n(35666),p=n(10107),c=n(85648),f=n(97159);function d(t){const e=t?.origins??[void 0];return(n,r)=>{const o=function(t,e,n){if("resource"===t?.type)return function(t,e,n){const r=(0,l.z4)(e,n);return{type:String,read:(t,e,n)=>{const o=(0,f.r)(t,e,n);return r.type===String?o:"function"==typeof r.type?new r.type({url:o}):void 0},write:{isRequired:r.json?.write?.isRequired,writer(e,o,a,l){if(!l?.resources)return"string"==typeof e?void(o[a]=(0,f.t)(e,l)):void(o[a]=e.write({},l));const p=function(t){return null==t?null:"string"==typeof t?t:t.url}(e),d=(0,f.t)(p,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1),v=r.type!==String&&(!(0,s.H)(this)||l?.origin&&this.originIdOf(n)>(0,u.aB)(l.origin)),m={object:this,propertyName:n,value:e,targetUrl:d,dest:o,targetPropertyName:a,context:l,params:t};l?.portalItem&&d&&!(0,i.oP)(d)?v&&t?.contentAddressed?g(m):v?function(t){const{context:e,targetUrl:n,params:r,value:o,dest:s,targetPropertyName:a}=t;if(!e.portalItem)return;const l=e.portalItem.resourceFromPath(n),u=h(o,n,e),p=(0,c.n)(u),f=(0,i.Zo)(l.path),d=r?.compress??!1;p===f?(e.resources&&y({...t,resource:l,content:u,compress:d,updates:e.resources.toUpdate}),s[a]=n):g(t)}(m):function({context:t,targetUrl:e,dest:n,targetPropertyName:r}){t.portalItem&&t.resources&&(t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(e),compress:!1}),n[r]=e)}(m):l?.portalItem&&(null==d||null!=(0,f.i)(d)||(0,i.w8)(d)||v)?g(m):o[a]=d}}}}(t,e,n);switch(t?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:t,write:e}=f.b;return{read:t,write:e}}}}(t,n,r);for(const t of e){const e=(0,p.rM)(n,t,r);for(const t in o)e[t]=o[t]}}}function g(t){const{targetUrl:e,params:n,value:s,context:l,dest:u,targetPropertyName:p}=t;if(!l.portalItem)return;const d=(0,f.p)(e),g=h(s,e,l);if(n?.contentAddressed&&"json"!==g.type)return void l.messages?.push(new r.A("persistable:contentAddressingUnsupported",`Property "${p}" is trying to serializing a resource with content of type ${g.type} with content addressing. Content addressing is only supported for json resources.`,{content:g}));const v=n?.contentAddressed&&"json"===g.type?(0,o.d)(g.jsonString):d?.filename??(0,a.lk)(),m=(0,i.fj)(n?.prefix??d?.prefix,v),w=`${m}.${(0,c.n)(g)}`;if(n?.contentAddressed&&l.resources&&"json"===g.type){const t=l.resources.toKeep.find(({resource:t})=>t.path===w)??l.resources.toAdd.find(({resource:t})=>t.path===w);if(t)return void(u[p]=t.resource.itemRelativeUrl)}const x=l.portalItem.resourceFromPath(w);(0,i.w8)(e)&&l.resources&&l.resources.pendingOperations.push((0,i.tk)(e).then(t=>{x.path=`${m}.${(0,c.n)({type:"blob",blob:t})}`,u[p]=x.itemRelativeUrl}).catch(()=>{}));const b=n?.compress??!1;l.resources&&y({...t,resource:x,content:g,compress:b,updates:l.resources.toAdd}),u[p]=x.itemRelativeUrl}function y({object:t,propertyName:e,updates:n,resource:r,content:o,compress:s}){n.push({resource:r,content:o,compress:s,finish:n=>{!function(t,e,n){"string"==typeof t[e]?t[e]=n.url:t[e].url=n.url}(t,e,n)}})}function h(t,e,n){return"string"==typeof t?{type:"url",url:e}:{type:"json",jsonString:JSON.stringify(t.toJSON(n))}}}}]);