@arcgis/core 4.34.0-next.22 → 4.34.0-next.23
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/applications/Components/arcadeFeatureUtils.d.ts +5 -0
- package/applications/Components/arcadeFeatureUtils.js +5 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0f6203ae32663b2b52db.js +1 -0
- package/assets/esri/core/workers/chunks/20bcd2e6cf02e057ad7d.js +1 -0
- package/assets/esri/core/workers/chunks/{1d9e44bdd129cc682ae5.js → ac93b3f1ff15a95d926c.js} +1 -1
- package/assets/esri/core/workers/chunks/{8b19fe829a9dc26fb3fe.js → d915d0a30d9beb24bd3a.js} +1 -1
- package/assets/esri/core/workers/chunks/{bbca1b85656d9ba71e4c.js → def8a854a05f17d3538e.js} +1 -1
- package/assets/esri/core/workers/chunks/f90573c9dc36e51cd588.js +1 -0
- package/config.js +1 -1
- package/interfaces.d.ts +89 -31
- package/kernel.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/support/SceneModification.js +1 -1
- package/layers/support/SceneModifications.js +1 -1
- package/layers/support/rasterDatasets/MRFRaster.js +1 -1
- package/layers/video/videoUtils.js +1 -1
- package/libs/basisu/BasisUEncoder.js +1 -1
- package/libs/dxtEncoder/DXTEncoder.js +1 -1
- package/libs/i3s/I3SModule.js +1 -1
- package/networks/support/utils.js +1 -1
- package/package.json +1 -1
- package/rest/knowledgeGraph/GraphAddFieldIndexResult.js +1 -1
- package/rest/knowledgeGraph/GraphAddNamedTypesResult.js +1 -1
- package/rest/knowledgeGraph/GraphAddPropertyResult.js +1 -1
- package/rest/knowledgeGraph/GraphDataModelOperationResult.d.ts +1 -1
- package/rest/knowledgeGraph/GraphDataModelOperationResult.js +1 -1
- package/rest/knowledgeGraph/GraphDeleteFieldIndexResult.js +1 -1
- package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.js +1 -1
- package/rest/knowledgeGraph/GraphDeletePropertyResult.js +1 -1
- package/rest/knowledgeGraph/GraphUpdateNamedTypesResult.js +1 -1
- package/rest/knowledgeGraph/GraphUpdatePropertyResult.js +1 -1
- package/rest/knowledgeGraph/GraphUpdateSearchIndexResult.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/VideoLayerView2D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/draw/DrawScreenTool.js +1 -1
- package/views/support/TextureCompressionHelper.js +1 -1
- package/views/support/TextureCompressionWorker.js +1 -1
- package/views/support/TextureCompressionWorkerHandle.js +1 -1
- package/widgets/BatchAttributeForm/inputs/EditableInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/GroupInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/InputBase.d.ts +1 -1
- package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/support/Selector2D/SelectionOperation.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/58e74681ddef30ba9cb6.js +0 -1
- package/assets/esri/core/workers/chunks/8fa6c938e8dc7bbfaeb7.js +0 -1
- package/assets/esri/core/workers/chunks/e2cb295104ed2f8cd2ff.js +0 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../geometry/Point.js";import t from"../../geometry/Polygon.js";import r from"../../geometry/Polyline.js";import n from"../support/TelemetryData.js";import
|
|
5
|
+
import e from"../../geometry/Point.js";import t from"../../geometry/Polygon.js";import r from"../../geometry/Polyline.js";import n from"../support/TelemetryData.js";import o from"../support/VideoTimeExtent.js";import{applyCIMSymbolColor as i}from"../../symbols/support/cimSymbolUtils.js";import{applyColorToSymbol as a}from"../../symbols/support/utils.js";const u="application/x-mpegURL",s="video/mp4",l="video/webm",d={UASDatalinkLocalSet:1e4,PrecisionTimeStamp:10002,MissionId:10003,PlatformTailNumber:10004,PlatformHeadingAngle:10005,PlatformPitchAngle:10006,PlatformRollAngle:10007,PlatformTrueAirspeed:10008,PlatformIndicatedAirspeed:10009,PlatformDesignation:10010,ImageSourceSensor:10011,ImageCoordinateSystem:10012,SensorLatitude:10013,SensorLongitude:10014,SensorTrueAltitude:10015,SensorHorizontalFOV:10016,SensorVerticalFOV:10017,SensorAzimuthAngle:10018,SensorElevationAngle:10019,SensorRollAngle:10020,PlatformSlantRange:10021,TargetWidth:10022,FrameCenterLatitude:10023,FrameCenterLongitude:10024,FrameCenterElevation:10025,OffsetCorner1Latitude:10026,OffsetCorner1Longitude:10027,OffsetCorner2Latitude:10028,OffsetCorner2Longitude:10029,OffsetCorner3Latitude:10030,OffsetCorner3Longitude:10031,OffsetCorner4Latitude:10032,OffsetCorner4Longitude:10033,TargetLocationLatitude:10040,TargetLocationLongitude:10041,TargetLocationElevation:10042,TargetTrackGateWidth:10043,TargetTrackGateHeight:10044,TargetErrorEstimateHorizontal:10045,TargetErrorEstimateLateral:10046,GenericFlagData:10047,PlatformGroundSpeed:10056,PlatformGroundRange:10057,PlatformRemainingFuel:10058,PlatformCallSign:10059,SensorFOVName:10063,PlatformMagneticHeading:10064,LDSVersionNumber:10065,AlternatePlatformName:10070,EventStartTimeUTC:10072,VMTIDataSet:10074,SensorEllipsoidHeight:10075,OperationalMode:10077,FrameCenterAboveEllipsoid:10078,CornerLatitudePoint1:10082,CornerLongitudePoint1:10083,CornerLatitudePoint2:10084,CornerLongitudePoint2:10085,CornerLatitudePoint3:10086,CornerLongitudePoint3:10087,CornerLatitudePoint4:10088,CornerLongitudePoint4:10089,SARMotionImageryMetadata:10095,SecurityClassification:20001,SecurityClassifyingAuthority:20002,SecurityClassifyingCountry:20003,SecuritySCI:20004,SecurityCaveats:20005,SecurityReleaseInstructions:20006,SecurityLDSVersion:20022,EsriVideoWidth:90001,EsriVideoHeight:90002,EsriFrameCenterLatitude:90050,EsriFrameCenterLongitude:90051,EsriCornerLatitudePt1:90052,EsriCornerLongitudePt1:90053,EsriCornerLatitudePt2:90054,EsriCornerLongitudePt2:90055,EsriCornerLatitudePt3:90056,EsriCornerLongitudePt3:90057,EsriCornerLatitudePt4:90058,EsriCornerLongitudePt4:90059,EsriFrameOutline:90060,EsriSensorPosition:90061,EsriHorizonPixelPack:90063,EsriGroundControlPoints:90064};function f(e,t=1e4){if(!e||!e.length)return[];let r=[],n=[];for(let i=0;i<e.length;i++){const t=e[i],n=t?.text?JSON.parse(t.text):null;"EsriVideoServer"===n?.source&&(r=[...n.data])}const o=r.find(e=>e.tagId===t);return Array.isArray(o?.value)&&(n=[...o.value]),n}function g(e){const{duration:t,end:r,start:n,timezone:i="UTC"}=e||{};return"number"!=typeof t?null:new o({duration:t||null,end:"number"==typeof r?new Date(r):null,start:"number"==typeof n?new Date(n):null,timezone:i})}function m(e,t){const r=[...t],n=r.findIndex(t=>t.equals(e));return n>-1&&r.splice(n),r.push(e),r}function C(e){if(!e?.size)return new n;const t=b(e),r=P(e),o=O(e),i=A(t,r);return new n({frameCenter:r,frameOutline:o,lineOfSight:i,sensorLocation:t})}function L(e){if(!e?.size)return null;return e.get(d.EsriGroundControlPoints)?.value??null??null}function c(e){return e?.size?e.get(d.EsriHorizonPixelPack)?.value??null:null}function P(e){return S(e)??y(e)}function E(e){if(!e)return u;const t=e.match(/\.(\w{3,4})(?:$|\?)/i);if(!t)return u;switch(t[1].toLowerCase()){case"mp4":return s;case"webm":return l;default:return u}}function p(e){const t=e?.layers;return t?.length?t.map(e=>({layerId:e.id,posterUrl:e.poster,sourceType:e.serviceType,title:e.name,type:e.type||"Video Layer"})):[]}function v(e,t,r){if(!e)return null;const n=e.clone();switch(n.type){case"simple-fill":a(n,r),n.outline.color=t;break;case"simple-line":a(n,t);break;case"simple-marker":a(n,t),n?.outline?.color&&(n.outline.color=t);break;case"cim":i(n,t)}return n}function h(e){const{cameraAzimuth:t,platformHeading:r,source:n=null,symbolOffset:o=0}=e||{};let i=0;if(!n)return i;i="platformHeading"===n?r+o:r+t+o;const a=i>360?i-360:i;return Math.round(Math.abs(a))}function S(t){return t&&t.has(d.EsriFrameCenterLatitude)&&t.has(d.EsriFrameCenterLongitude)?new e({x:t.get(d.EsriFrameCenterLongitude).value,y:t.get(d.EsriFrameCenterLatitude).value,z:t.get(d.FrameCenterAboveEllipsoid)?.value??t.get(d.FrameCenterElevation)?.value}):null}function y(t){return t&&t.has(d.FrameCenterLatitude)&&t.has(d.FrameCenterLongitude)?new e({x:t.get(d.FrameCenterLongitude)?.value,y:t.get(d.FrameCenterLatitude)?.value,z:t.get(d.FrameCenterElevation)?.value}):null}function O(e){if(!e)return null;const r=e.get(d.EsriFrameOutline)?.value;return r?t.fromJSON(r.geometry):F(e)??T(e)}function F(e){if(!(e.has(d.EsriCornerLatitudePt1)&&e.has(d.EsriCornerLongitudePt1)&&e.has(d.EsriCornerLatitudePt2)&&e.has(d.EsriCornerLongitudePt2)&&e.has(d.EsriCornerLatitudePt3)&&e.has(d.EsriCornerLongitudePt3)&&e.has(d.EsriCornerLatitudePt4)&&e.has(d.EsriCornerLongitudePt4)))return null;const r=[e.get(d.EsriCornerLongitudePt1)?.value,e.get(d.EsriCornerLatitudePt1)?.value],n=[e.get(d.EsriCornerLongitudePt2)?.value,e.get(d.EsriCornerLatitudePt2)?.value],o=[e.get(d.EsriCornerLongitudePt3)?.value,e.get(d.EsriCornerLatitudePt3)?.value],i=[e.get(d.EsriCornerLongitudePt4)?.value,e.get(d.EsriCornerLatitudePt4)?.value];return new t({rings:[[r,n,o,i]]})}function T(e){if(!(e.has(d.OffsetCorner1Latitude)&&e.has(d.OffsetCorner1Longitude)&&e.has(d.OffsetCorner2Latitude)&&e.has(d.OffsetCorner2Longitude)&&e.has(d.OffsetCorner3Latitude)&&e.has(d.OffsetCorner3Longitude)&&e.has(d.OffsetCorner4Latitude)&&e.has(d.OffsetCorner4Longitude)&&e.has(d.FrameCenterLatitude)&&e.has(d.FrameCenterLongitude)))return null;const r=e.get(d.FrameCenterLatitude)?.value,n=e.get(d.FrameCenterLongitude)?.value,o=r+e.get(d.OffsetCorner1Latitude)?.value,i=n+e.get(d.OffsetCorner1Longitude)?.value,a=r+e.get(d.OffsetCorner2Latitude)?.value,u=n+e.get(d.OffsetCorner2Longitude)?.value,s=r+e.get(d.OffsetCorner3Latitude)?.value,l=n+e.get(d.OffsetCorner3Longitude)?.value,f=r+e.get(d.OffsetCorner4Latitude)?.value,g=n+e.get(d.OffsetCorner4Longitude)?.value;return new t({rings:[[[i,o],[u,a],[l,s],[g,f]]]})}function A(e,t){if(!e||!t)return null;const n=[e.x,e.y,e.z??0],o=[t.x,t.y,t.z??0];return new r({paths:[[n,o]]})}function b(t){if(!t?.size)return null;if(t.has(d.EsriSensorPosition)){const r=t.get(d.EsriSensorPosition)?.value;if(r)return e.fromJSON(r.geometry)}return t.has(d.SensorLongitude)&&t.has(d.SensorLatitude)?new e({x:t.get(d.SensorLongitude)?.value,y:t.get(d.SensorLatitude)?.value,z:t.get(d.SensorTrueAltitude)?.value}):null}export{P as getFrameCenter,c as getFrameHorizonPoints,L as getGroundControlPoints,m as getSensorTrailPoints,p as getServiceLayersInfo,v as getStyledTelemetrySymbol,h as getSymbolDisplayAngle,C as getTelemetryData,f as getVideoMetadataFromCueList,E as getVideoMimeType,g as readVideoTimeExtent,d as videoMetadataEntryId};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{getAssetUrl as
|
|
5
|
+
import{getAssetUrl as i}from"../../assets.js";function s(){return t??=(async()=>{const s=await import("../../chunks/basis_encoder.js"),t=await s.default({locateFile:s=>i(`esri/libs/basisu/${s}`)});return t.initializeBasis(),t})(),t}let t;function a(){t=null}export{a as destroyBasisEncoder,s as getBasisEncoder};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{getAssetUrl as t}from"../../assets.js";function e(){return
|
|
5
|
+
import{getAssetUrl as t}from"../../assets.js";function e(){return n??=(async()=>{const e=await import("../../chunks/dxt_encoder.js");return await e.default({locateFile:e=>t(`esri/libs/dxtEncoder/${e}`)})})(),n}let n;function r(){n=null}export{r as destroyDXTEncoder,e as getDXTEncoder};
|
package/libs/i3s/I3SModule.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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{getAssetUrl as t}from"../../assets.js";function e(){return
|
|
5
|
+
import{getAssetUrl as t}from"../../assets.js";function e(){return o||(o=new Promise(t=>import("../../chunks/i3s.js").then(t=>t.i).then(({default:e})=>{const i=e({locateFile:n,onRuntimeInitialized:()=>t(i)});delete i.then})).catch(t=>{throw t})),o}function n(e){return t(`esri/libs/i3s/${e}`)}function i(){o=null}let o;export{i as cleanup,e as get};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../request.js";import t from"../../core/Error.js";import{queryAllJSON as r}from"../../layers/support/featureQueryAll.js";import{isSubtypeSublayer as n,isFeatureLayer as o}from"../../layers/support/layerUtils.js";import{RuleType as a}from"./typeUtils.js";import s from"../../portal/PortalItem.js";import u from"../../rest/support/FeatureSet.js";import{isGraphic as l}from"../../support/guards.js";function i(e,t,r="from"){const{fromRuleElement:n,viaRuleElement:o,toRuleElement:s}=f(e),u=[];switch(e.ruleType){case a.RTContainment:case a.RTAttachment:"from"===r&&y(t,n,!1)?u.push(s):"to"===r&&y(t,s,!1)&&u.push(n);break;case a.RTJunctionEdgeConnectivity:case a.RTJunctionJunctionConnectivity:y(t,n,!0)?u.push(s):y(t,s,!0)&&u.push(n);break;case a.RTEdgeJunctionEdgeConnectivity:o&&(y(t,o,!0)?(u.push(n),u.push(s)):(y(t,n,!0)||y(t,s,!0))&&u.push(o));break;default:return[]}return u}function c(e,t,r){const{fromRuleElement:n,viaRuleElement:o,toRuleElement:s}=f(e);switch(e.ruleType){case a.RTContainment:case a.RTAttachment:return p(t,r,n,s,!1,!1);case a.RTJunctionEdgeConnectivity:case a.RTJunctionJunctionConnectivity:return p(t,r,n,s,!0,!0);case a.RTEdgeJunctionEdgeConnectivity:return p(t,r,n,o,!0,!0)||p(t,r,s,o,!0,!0);default:return!1}}function p(e,t,r,n,o,a){if(!r||!n)return!1;const s=y(e,r,a),u=y(t,n,a);if(o){const o=y(e,n,a),l=y(t,r,a);return s&&u||o&&l}return s&&u}function m(e,t){const r=e.terminal?.terminalId,n=t.terminalId;return null==r&&null==n||(1===r?null==n||1===n:r===n)}function y(e,t,r){const{assetGroupCode:n,assetTypeCode:o}=e;return("layerId"in e?e.layerId===t.networkSource?.layerId:e.networkSourceId===t.networkSource?.sourceId)&&(null==n||n===t.assetGroup?.assetGroupCode)&&(null==o||o===t.assetType?.assetTypeCode)&&(!r||!("terminalId"in e)||m(t,e))}function f(e){return{fromRuleElement:{networkSource:e.fromNetworkSource,assetGroup:e.fromAssetGroup,assetType:e.fromAssetType,terminal:e.fromTerminal},viaRuleElement:e.viaNetworkSource?{networkSource:e.viaNetworkSource,assetGroup:e.viaAssetGroup,assetType:e.viaAssetType,terminal:e.viaTerminal}:void 0,toRuleElement:{networkSource:e.toNetworkSource,assetGroup:e.toAssetGroup,assetType:e.toAssetType,terminal:e.toTerminal}}}function d(e){let t=null,r=null,o=null;if(l(e))t=w(e),[r,o]=I(e);else if(n(e)){t=e.parent?.layerId??null;const[n]=T(e);n===e.subtypeField&&(r=e.subtypeCode)}else t=e.layerId??null;return{layerId:t,assetGroupCode:r,assetTypeCode:o}}function w(e){const{sourceLayer:t}=e;let r;return o(t)?r=t.layerId:n(t)&&(r=t.parent?.layerId),r??null}function I(e){const[t,r]=T(e.sourceLayer);return[t?e.attributes[t]:null,r?e.attributes[r]:null]}function T(e){if(!e||!("fieldsIndex"in e))return[null,null];return[e.fieldsIndex.normalizeFieldName("assetGroup")??null,e.fieldsIndex.normalizeFieldName("assetType")??null]}async function R(e,t){const n=e.layers,o=e.layerInfos,a=e.returnGeometry||!1,s=e.outSpatialReference;await Promise.all(n.map(async e=>{await e.load()}));return(await Promise.all(n.map(async e=>{const n=o.find(t=>t.layerUrl===e.parsedUrl?.path);if(!n?.objectIds?.length)return{layer:e,featureSet:void 0};const l=e.createQuery();l.returnGeometry=a,l.outFields=n.outFields||["*"],l.outSpatialReference=s,l.gdbVersion=e.gdbVersion,l.objectIds=n.objectIds,t&&(l.where="1=1");const i=u.fromJSON(await r(e,l));return i.features.forEach(t=>{t.layer=e}),{layer:e,featureSet:i}}))).filter(e=>void 0!==e.featureSet)}async function k(e,t){if("Utility Network Layer"===e){const{default:e}=await import("../UtilityNetwork.js");return new e({layerUrl:t})}return null}async function v(r){let n="portalItem"in r?r:{portalItem:r};!n.portalItem||n.portalItem instanceof s||(n={...n,portalItem:new s(n.portalItem)});const o=n.portalItem;if(await o.load(),"Feature Service"!==o.type)throw new t("portal:unknown-item-type","Unknown item type '${type}'",{type:o.type});const a=o.url,u=await e(a,{responseType:"json",query:{f:"json"}}),l="Network Layer";if(u.data.type?.includes(l))return k(u.data.type,a);if(u.data.layers){const e=u.data.layers.find(e=>e.type.includes(l));if(e){const t=`${a}/${e.id}`;return k(e.type,t)}}return null}export{p as doElementsMatchRule,c as doesRuleAllowAssociation,T as getAssetFieldNames,i as getCompatibleRuleElements,f as getElementsFromRule,I as getFeatureAssetCodes,w as getFeatureSourceLayerId,R as getFeaturesFromLayers,d as getRuleValues,y as isRuleElementMatch,m as isTerminalMatch,v as networkFromPortalItem};
|
|
5
|
+
import e from"../../request.js";import t from"../../core/Error.js";import{queryAllJSON as r}from"../../layers/support/featureQueryAll.js";import{isSubtypeSublayer as n,isFeatureLayer as o}from"../../layers/support/layerUtils.js";import{RuleType as a}from"./typeUtils.js";import s from"../../portal/PortalItem.js";import u from"../../rest/support/FeatureSet.js";import{isGraphic as l}from"../../support/guards.js";function i(e,t,r="from"){const{fromRuleElement:n,viaRuleElement:o,toRuleElement:s}=f(e),u=[];switch(e.ruleType){case a.RTContainment:case a.RTAttachment:"from"===r&&y(t,n,!1)?u.push(s):"to"===r&&y(t,s,!1)&&u.push(n);break;case a.RTJunctionEdgeConnectivity:case a.RTJunctionJunctionConnectivity:y(t,n,!0)?u.push(s):y(t,s,!0)&&u.push(n);break;case a.RTEdgeJunctionEdgeConnectivity:o&&(y(t,o,!0)?(u.push(n),u.push(s)):(y(t,n,!0)||y(t,s,!0))&&u.push(o));break;default:return[]}return u}function c(e,t,r){const{fromRuleElement:n,viaRuleElement:o,toRuleElement:s}=f(e);switch(e.ruleType){case a.RTContainment:case a.RTAttachment:return p(t,r,n,s,!1,!1);case a.RTJunctionEdgeConnectivity:case a.RTJunctionJunctionConnectivity:return p(t,r,n,s,!0,!0);case a.RTEdgeJunctionEdgeConnectivity:return p(t,r,n,o,!0,!0)||p(t,r,s,o,!0,!0);default:return!1}}function p(e,t,r,n,o,a){if(!r||!n)return!1;const s=y(e,r,a),u=y(t,n,a);if(o){const o=y(e,n,a),l=y(t,r,a);return s&&u||o&&l}return s&&u}function m(e,t){const r=e.terminal?.terminalId,n=t.terminalId;return null==r&&null==n||(1===r?null==n||1===n:r===n)}function y(e,t,r){const{assetGroupCode:n,assetTypeCode:o}=e;return("layerId"in e?e.layerId===t.networkSource?.layerId:e.networkSourceId===t.networkSource?.sourceId)&&(null==n||n===t.assetGroup?.assetGroupCode)&&(null==o||o===t.assetType?.assetTypeCode)&&(!r||!("terminalId"in e)||m(t,e))}function f(e){return{fromRuleElement:{networkSource:e.fromNetworkSource,assetGroup:e.fromAssetGroup,assetType:e.fromAssetType,terminal:e.fromTerminal},viaRuleElement:e.viaNetworkSource?{networkSource:e.viaNetworkSource,assetGroup:e.viaAssetGroup,assetType:e.viaAssetType,terminal:e.viaTerminal}:void 0,toRuleElement:{networkSource:e.toNetworkSource,assetGroup:e.toAssetGroup,assetType:e.toAssetType,terminal:e.toTerminal}}}function d(e){let t=null,r=null,o=null;if(l(e))t=w(e),[r,o]=I(e);else if(n(e)){t=e.parent?.layerId??null;const[n]=T(e);n===e.subtypeField&&(r=e.subtypeCode)}else t=e.layerId??null;return{layerId:t,assetGroupCode:r,assetTypeCode:o}}function w(e){const{sourceLayer:t}=e;let r;return o(t)?r=t.layerId:n(t)&&(r=t.parent?.layerId),r??null}function I(e){const[t,r]=T(e.sourceLayer);return[t?e.attributes[t]:null,r?e.attributes[r]:null]}function T(e){if(!e||!("fieldsIndex"in e))return[null,null];return[e.fieldsIndex.normalizeFieldName("assetGroup")??null,e.fieldsIndex.normalizeFieldName("assetType")??null]}async function R(e,t){const n=e.layers,o=e.layerInfos,a=e.returnGeometry||!1,s=e.outSpatialReference;await Promise.all(n.map(async e=>{await e.load()}));return(await Promise.all(n.map(async e=>{const n=o.find(t=>t.layerUrl===e.parsedUrl?.path);if(!n?.objectIds?.length)return{layer:e,featureSet:void 0};const l=e.createQuery();l.returnGeometry=a,l.outFields=n.outFields||["*"],l.outSpatialReference=s,l.gdbVersion=e.gdbVersion,l.objectIds=n.objectIds,t&&(l.where="1=1");const i=u.fromJSON(await r(e,l));return i.features.forEach(t=>{t.layer=t.sourceLayer=e}),{layer:e,featureSet:i}}))).filter(e=>void 0!==e.featureSet)}async function k(e,t){if("Utility Network Layer"===e){const{default:e}=await import("../UtilityNetwork.js");return new e({layerUrl:t})}return null}async function v(r){let n="portalItem"in r?r:{portalItem:r};!n.portalItem||n.portalItem instanceof s||(n={...n,portalItem:new s(n.portalItem)});const o=n.portalItem;if(await o.load(),"Feature Service"!==o.type)throw new t("portal:unknown-item-type","Unknown item type '${type}'",{type:o.type});const a=o.url,u=await e(a,{responseType:"json",query:{f:"json"}}),l="Network Layer";if(u.data.type?.includes(l))return k(u.data.type,a);if(u.data.layers){const e=u.data.layers.find(e=>e.type.includes(l));if(e){const t=`${a}/${e.id}`;return k(e.type,t)}}return null}export{p as doElementsMatchRule,c as doesRuleAllowAssociation,T as getAssetFieldNames,i as getCompatibleRuleElements,f as getElementsFromRule,I as getFeatureAssetCodes,w as getFeatureSourceLayerId,R as getFeaturesFromLayers,d as getRuleValues,y as isRuleElementMatch,m as isTerminalMatch,v as networkFromPortalItem};
|
package/package.json
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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as r}from"../../chunks/tslib.es6.js";import"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import
|
|
5
|
+
import{_ as r}from"../../chunks/tslib.es6.js";import"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import s from"./GraphDataModelOperationResult.js";let e=class extends s{constructor(r){super(r)}};e=r([o("esri.rest.knowledgeGraph.GraphAddFieldIndexResult")],e);const t=e;export{t 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../chunks/tslib.es6.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import
|
|
5
|
+
import{_ as t}from"../../chunks/tslib.es6.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import e from"./GraphDataModelOperationResult.js";let r=class extends e{constructor(t){super(t),this.entityAddResultsCount=0,this.relationshipAddResultsCount=0,this.entityAddResults=[],this.relationshipAddResults=[]}};t([s()],r.prototype,"entityAddResultsCount",void 0),t([s()],r.prototype,"relationshipAddResultsCount",void 0),t([s()],r.prototype,"entityAddResults",void 0),t([s()],r.prototype,"relationshipAddResults",void 0),r=t([o("esri.rest.knowledgeGraph.GraphAddNamedTypesResult")],r);const p=r;export{p 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as r}from"../../chunks/tslib.es6.js";import"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import
|
|
5
|
+
import{_ as r}from"../../chunks/tslib.es6.js";import"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import s from"./GraphDataModelOperationResult.js";let e=class extends s{constructor(r){super(r)}};e=r([o("esri.rest.knowledgeGraph.GraphAddPropertyResult")],e);const t=e;export{t 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as
|
|
5
|
+
import{_ as o}from"../../chunks/tslib.es6.js";import r from"../../core/Accessor.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";let t=class extends r{constructor(o){super(o),this.decoderError=null,this.resultsCount=0,this.results=[],this.updatedKnowledgeGraph=null}};o([e()],t.prototype,"decoderError",void 0),o([e()],t.prototype,"resultsCount",void 0),o([e()],t.prototype,"results",void 0),o([e()],t.prototype,"updatedKnowledgeGraph",void 0),t=o([s("esri.rest.knowledgeGraph.GraphDataModelOperationResult")],t);const p=t;export{p 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as r}from"../../chunks/tslib.es6.js";import"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import
|
|
5
|
+
import{_ as r}from"../../chunks/tslib.es6.js";import"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import s from"./GraphDataModelOperationResult.js";let e=class extends s{constructor(r){super(r)}};e=r([o("esri.rest.knowledgeGraph.GraphDeleteFieldIndexResult")],e);const t=e;export{t 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as r}from"../../chunks/tslib.es6.js";import"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import
|
|
5
|
+
import{_ as r}from"../../chunks/tslib.es6.js";import"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import s from"./GraphDataModelOperationResult.js";let e=class extends s{constructor(r){super(r)}};e=r([o("esri.rest.knowledgeGraph.GraphDeleteNamedTypeResult")],e);const t=e;export{t 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as r}from"../../chunks/tslib.es6.js";import"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import
|
|
5
|
+
import{_ as r}from"../../chunks/tslib.es6.js";import"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import s from"./GraphDataModelOperationResult.js";let e=class extends s{constructor(r){super(r)}};e=r([o("esri.rest.knowledgeGraph.GraphDeletePropertyResult")],e);const t=e;export{t 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as r}from"../../chunks/tslib.es6.js";import"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import
|
|
5
|
+
import{_ as r}from"../../chunks/tslib.es6.js";import"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import o from"./GraphDataModelOperationResult.js";let e=class extends o{constructor(r){super(r)}};e=r([s("esri.rest.knowledgeGraph.GraphUpdateNamedTypesResult")],e);const t=e;export{t 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as r}from"../../chunks/tslib.es6.js";import"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import
|
|
5
|
+
import{_ as r}from"../../chunks/tslib.es6.js";import"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import s from"./GraphDataModelOperationResult.js";let e=class extends s{constructor(r){super(r)}};e=r([o("esri.rest.knowledgeGraph.GraphUpdatePropertyResult")],e);const t=e;export{t 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as r}from"../../chunks/tslib.es6.js";import"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import
|
|
5
|
+
import{_ as r}from"../../chunks/tslib.es6.js";import"../../core/Logger.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import s from"./GraphDataModelOperationResult.js";let e=class extends s{constructor(r){super(r)}};e=r([o("esri.rest.knowledgeGraph.GraphUpdateSearchIndexResult")],e);const t=e;export{t as default};
|
package/support/revision.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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const a="20250621",c="ea00436b45a50c3f8afd9a8a4c601a1640a36508";export{a as buildDate,c as commitHash};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Color.js";import i from"../../../Graphic.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{watch as r,initial as l}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import n from"../../../layers/GraphicsLayer.js";import m from"../../../layers/support/TelemetryDisplay.js";import y from"../../../symbols/SimpleFillSymbol.js";import
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Color.js";import i from"../../../Graphic.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{watch as r,initial as l}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import n from"../../../layers/GraphicsLayer.js";import m from"../../../layers/support/TelemetryDisplay.js";import{getSymbolDisplayAngle as y}from"../../../layers/video/videoUtils.js";import h from"../../../symbols/SimpleFillSymbol.js";import p from"../../../symbols/SimpleLineSymbol.js";import c from"../../../symbols/SimpleMarkerSymbol.js";import{applyCIMSymbolRotation as b}from"../../../symbols/support/cimSymbolUtils.js";import{symbolTypes as f}from"../../../symbols/support/typeUtils.js";import S from"../engine/webgl/OverlayContainer.js";import u from"../engine/webgl/OverlayMultipoint.js";import{LayerView2DMixin as d}from"./LayerView2D.js";import g from"./graphics/GraphicContainer.js";import _ from"./graphics/GraphicsView2D.js";import L from"../../layers/LayerView.js";const v=new t([255,127,0]),T=10005,w=10018;let O=class extends(d(L)){constructor(){super(...arguments),this._graphicsLayer=new n,this._frameOutlineGraphic=new i({symbol:new h({outline:{type:"simple-line",color:v}})}),this._frameCenterGraphic=new i({symbol:new c({color:v,style:"cross"})}),this._sensorTrailGraphic=new i({symbol:new p({color:v})}),this._sensorSightlineGraphic=new i({symbol:new p({color:v})}),this._sensorLocationGraphic=new i({symbol:new c({color:v})}),this._overlayContainer=null,this._sensorLocationSymbolType=null,this.layer=null,this.sensorLocationSymbol=null,this.symbolAngle=0,this.visibleTelemetryElements=null}destroy(){this._graphicsLayer=s(this._graphicsLayer)}initialize(){this._sensorLocationSymbolType=this.layer?.sensorSymbol.type,this._graphicsLayer.graphics.addMany([this._frameCenterGraphic,this._frameOutlineGraphic,this._sensorLocationGraphic,this._sensorSightlineGraphic,this._sensorTrailGraphic]),this.visibleTelemetryElements=new m({frame:this.layer.telemetryDisplay?.frame??!1,frameCenter:this.layer.telemetryDisplay?.frameCenter??!0,frameOutline:this.layer.telemetryDisplay?.frameOutline??!0,lineOfSight:this.layer.telemetryDisplay?.lineOfSight??!0,sensorLocation:this.layer.telemetryDisplay?.sensorLocation??!0,sensorTrail:this.layer.telemetryDisplay?.sensorTrail??!0})}attach(){this._overlayContainer=new S,this.container.addChild(this._overlayContainer),this._addOverlayMultipoint(),this.graphicsView=new _({requestUpdateCallback:()=>this.requestUpdate(),view:this.view,graphics:this._graphicsLayer.graphics,container:new g(this.view.featuresTilingScheme)}),this.container.addChild(this.graphicsView.container),this.addAttachHandles(this._graphicsLayer.on("graphic-update",this.graphicsView.graphicUpdateHandler)),this.addAttachHandles([r(()=>[this.layer.telemetryDisplay?.frame,this.layer.telemetryDisplay?.frameCenter,this.layer.telemetryDisplay?.frameOutline,this.layer.telemetryDisplay?.sensorLocation,this.layer.telemetryDisplay?.sensorTrail,this.layer.telemetryDisplay?.lineOfSight],()=>this._updateVisibleTelemetryElements(),l),r(()=>[this.layer.telemetry,this.visibleTelemetryElements?.frameCenter,this.visibleTelemetryElements?.frameOutline,this.visibleTelemetryElements?.sensorLocation,this.visibleTelemetryElements?.sensorTrail,this.visibleTelemetryElements?.lineOfSight],()=>this._updateGraphicGeometries(),l),r(()=>this.layer.metadata,()=>this._updateSensorLocationSymbolAngle(),l),r(()=>this.layer?.frameCenterSymbol,()=>this._updateFrameCenterSymbol(),l),r(()=>this.layer?.frameOutlineSymbol,()=>this._updateFrameOutlineSymbol(),l),r(()=>this.layer?.sensorSightLineSymbol,()=>this._updateSensorSightlineSymbol(),l),r(()=>this.layer?.sensorSymbol,()=>this._updateSensorLocationSymbol(),l),r(()=>this.layer?.sensorTrailSymbol,()=>this._updateSensorTrailSymbol(),l),r(()=>this.symbolAngle,()=>this._updateSensorLocationSymbol(),l)])}detach(){this._overlayContainer.removeAllChildren(),this.container.removeAllChildren(),this.graphicsView=s(this.graphicsView)}supportsSpatialReference(e){return!0}moveEnd(){}viewChange(){this.graphicsView.viewChange()}update(e){this.graphicsView.processUpdate(e)}isUpdating(){return!this.graphicsView||this.graphicsView.updating}_updateVisibleTelemetryElements(){this.visibleTelemetryElements&&this.layer.telemetryDisplay&&(this.visibleTelemetryElements.frame=this.layer.telemetryDisplay.frame,this.visibleTelemetryElements.frameCenter=this.layer.telemetryDisplay.frameCenter,this.visibleTelemetryElements.frameOutline=this.layer.telemetryDisplay.frameOutline,this.visibleTelemetryElements.lineOfSight=this.layer.telemetryDisplay.lineOfSight,this.visibleTelemetryElements.sensorLocation=this.layer.telemetryDisplay.sensorLocation,this.visibleTelemetryElements.sensorTrail=this.layer.telemetryDisplay.sensorTrail)}_updateGraphicGeometries(){const{telemetry:e}=this.layer,{visibleTelemetryElements:t}=this;e&&t&&(t.frameOutline&&e.frameOutline?this._frameOutlineGraphic.geometry=this.layer.telemetry.frameOutline:this._frameOutlineGraphic.geometry=null,t.sensorTrail&&e.sensorTrail?this._sensorTrailGraphic.geometry=this.layer.telemetry.sensorTrail:this._sensorTrailGraphic.geometry=null,t.lineOfSight&&e.lineOfSight?this._sensorSightlineGraphic.geometry=this.layer.telemetry.lineOfSight:this._sensorSightlineGraphic.geometry=null,t.sensorLocation&&e.sensorLocation?this._sensorLocationGraphic.geometry=this.layer.telemetry.sensorLocation:this._sensorLocationGraphic.geometry=null,t.frameCenter&&e.frameCenter?this._frameCenterGraphic.geometry=this.layer.telemetry.frameCenter:this._frameCenterGraphic.geometry=null)}_updateSensorLocationSymbolAngle(){if(!this.layer?.metadata?.size)return;const{source:e,symbolOffset:t=0}=this.layer.sensorSymbolOrientation||{};if(!e&&!t)return;const i=this.layer?.metadata?.get(T)?.value??0,s=this.layer?.metadata?.get(w)?.value??0,r=y({cameraAzimuth:s,platformHeading:i,source:this.layer.sensorSymbolOrientation?.source,symbolOffset:this.layer.sensorSymbolOrientation?.symbolOffset??0});this.symbolAngle=Math.round(Math.abs(r))}_updateSensorLocationSymbol(){switch(this._sensorLocationSymbolType){case"simple-marker":this.sensorLocationSymbol=this.layer.sensorSymbol.clone(),this.sensorLocationSymbol.angle=this.symbolAngle,this._sensorLocationGraphic.symbol=this.sensorLocationSymbol.clone();break;case"picture-marker":this.sensorLocationSymbol=this.layer.sensorSymbol,this.sensorLocationSymbol.angle=this.symbolAngle,this._sensorLocationGraphic.symbol=this.sensorLocationSymbol;break;case"cim":this.sensorLocationSymbol=this.layer.sensorSymbol,b(this.sensorLocationSymbol,this.symbolAngle,!0),this._sensorLocationGraphic.symbol=this.sensorLocationSymbol}}_updateFrameCenterSymbol(){this.layer?.frameCenterSymbol&&(this._frameCenterGraphic.symbol=this.layer.frameCenterSymbol.clone())}_updateFrameOutlineSymbol(){this.layer?.frameOutlineSymbol&&(this._frameOutlineGraphic.symbol=this.layer.frameOutlineSymbol.clone())}_updateSensorSightlineSymbol(){this.layer?.sensorSightLineSymbol&&(this._sensorSightlineGraphic.symbol=this.layer.sensorSightLineSymbol.clone())}_updateSensorTrailSymbol(){this.layer?.sensorTrailSymbol&&(this._sensorTrailGraphic.symbol=this.layer.sensorTrailSymbol.clone())}async _addOverlayMultipoint(){if(!this.layer.videoElement)return;const e=new u(this.layer.videoElement);this.addAttachHandles([r(()=>[this.layer.frameHorizonPoints,this.layer.groundControlPoints,this.layer.frameOpacity,this.layer.telemetryDisplay?.frame],()=>{const{visibleTelemetryElements:t}=this;e.frameHorizonPoints=this.layer.frameHorizonPoints,e.groundControlPoints=this.layer.groundControlPoints,e.opacity=this.layer.frameOpacity,e.visible=t?.frame??!1},l)]),this._overlayContainer.addChild(e),this.view.stage.requestRender()}};e([o()],O.prototype,"graphicsView",void 0),e([o()],O.prototype,"layer",void 0),e([o({types:f})],O.prototype,"sensorLocationSymbol",void 0),e([o()],O.prototype,"symbolAngle",void 0),e([o({type:m})],O.prototype,"visibleTelemetryElements",void 0),O=e([a("esri.views.2d.layers.VideoLayerView2D")],O);const C=O;export{C 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{hasScaling as e}from"../../../core/mathUtils.js";import r from"../../../geometry/SpatialReference.js";import t from"../../../geometry/support/MeshGeoreferencedVertexSpace.js";import o from"../../../geometry/support/MeshLocalVertexSpace.js";import{b as n,n as s}from"../../../chunks/vec3.js";import{IndexType as i}from"../../../libs/i3s/enums.js";import{get as a}from"../../../libs/i3s/I3SModule.js";import{TransformedGeometry as
|
|
5
|
+
import{hasScaling as e}from"../../../core/mathUtils.js";import r from"../../../geometry/SpatialReference.js";import t from"../../../geometry/support/MeshGeoreferencedVertexSpace.js";import o from"../../../geometry/support/MeshLocalVertexSpace.js";import{b as n,n as s}from"../../../chunks/vec3.js";import{IndexType as i}from"../../../libs/i3s/enums.js";import{get as a,cleanup as f}from"../../../libs/i3s/I3SModule.js";import{TransformedGeometry as c,TransformedData as l}from"./I3SMeshWorkerHandle.js";import{NodeIMModificationImpact as u}from"./i3s/I3SNode.js";async function m(e){j=await M();const r=[e.geometryBuffer];return{result:L(j,e,r),transferList:r}}async function y(e){j=await M();const r=[e.geometryBuffer],{geometryBuffer:t}=e,o=t.byteLength,n=j._malloc(o),s=new Uint8Array(j.HEAPU8.buffer,n,o);s.set(new Uint8Array(t));const i=j.dracoDecompressPointCloudData(n,s.byteLength);if(j._free(n),i.error.length>0)throw new Error(`i3s.wasm: ${i.error}`);const a=i.featureIds?.length>0?i.featureIds.slice():null,f=i.positions.slice();return a&&r.push(a.buffer),r.push(f.buffer),{result:{positions:f,featureIds:a},transferList:r}}async function p(e){await M(),x(e);const r={buffer:e.buffer};return{result:r,transferList:[r.buffer]}}async function d(e){await M(),A(e)}async function h(e){j=await M(),j.setLegacySchema(e.context,e.jsonSchema)}async function b(e){const{localMatrix:n,origin:s,positions:i,vertexSpace:a}=e,f=r.fromJSON(e.inSpatialReference),c=r.fromJSON(e.outSpatialReference);let l;const[{projectBuffer:u},{initializeProjection:m}]=await Promise.all([import("../../../geometry/projection/projectBuffer.js"),import("../../../geometry/projectionUtils.js")]);await m(f,c);const y=[0,0,0];if(!u(s,f,0,y,c,0))throw new Error("Failed to project");if("georeferenced"===a.type&&null==a.origin){if(l=new Float64Array(i.length),!u(i,f,0,l,c,0,l.length/3))throw new Error("Failed to project")}else{const e="georeferenced"===a.type?t.fromJSON(a):o.fromJSON(a),{projectMeshVertexPositions:r}=await import("../../../geometry/support/meshUtils/projectMeshVertexPositions.js"),s=r({vertexAttributes:{position:i},transform:n?{localMatrix:n}:void 0,vertexSpace:e,spatialReference:f},c);if(!s)throw new Error("Failed to project");l=s}const p=l.length,[d,h,b]=y;for(let r=0;r<p;r+=3)l[r]-=d,l[r+1]-=h,l[r+2]-=b;return{result:{projected:l,original:i,projectedOrigin:y},transferList:[l.buffer,i.buffer]}}async function g({normalMatrix:r,normals:t}){const o=new Float32Array(t.length);return n(o,t,r),e(r)&&s(o,o),{result:{transformed:o,original:t},transferList:[o.buffer,t.buffer]}}function w(e){_(e)}let E,j;function A(e){if(!j)return;const r=e.modifications,t=j._malloc(8*r.length),o=new Float64Array(j.HEAPU8.buffer,t,r.length);for(let n=0;n<r.length;++n)o[n]=r[n];j.setModifications(e.context,t,r.length,e.isGeodetic),j._free(t)}function L(e,r,t){const{context:o,globalTrafo:n,mbs:s,obbData:a,elevationOffset:f,geometryBuffer:u,geometryDescriptor:m,indexToVertexProjector:y,vertexToRenderProjector:p}=r,d=e._malloc(u.byteLength),h=33,b=e._malloc(h*Float64Array.BYTES_PER_ELEMENT),g=new Uint8Array(e.HEAPU8.buffer,d,u.byteLength);g.set(new Uint8Array(u));const w=new Float64Array(e.HEAPU8.buffer,b,h);P(w,[NaN,NaN,NaN]);let E=w.byteOffset+3*w.BYTES_PER_ELEMENT,j=new Float64Array(w.buffer,E);P(j,n),E+=16*w.BYTES_PER_ELEMENT,j=new Float64Array(w.buffer,E),P(j,s),E+=4*w.BYTES_PER_ELEMENT,a&&(j=new Float64Array(w.buffer,E),P(j,a));const A=m,L={isDraco:!1,isLegacy:!1,color:r.layouts.some(e=>e.some(e=>"color"===e.name)),normal:r.needNormals&&r.layouts.some(e=>e.some(e=>"normalCompressed"===e.name)),uv0:r.layouts.some(e=>e.some(e=>"uv0"===e.name)),uvRegion:r.layouts.some(e=>e.some(e=>"uvRegion"===e.name)),featureIndex:A.featureIndex},S=e.process(o,!!r.obbData,d,g.byteLength,A,L,b,f,y,p,r.normalReferenceFrame);if(e._free(b),e._free(d),S.error.length>0)throw new Error(`i3s.wasm: ${S.error}`);if(S.discarded)return null;const x=S.componentOffsets.length>0?S.componentOffsets.slice():null,_=S.featureIds.length>0?S.featureIds.slice():null,U=S.anchorIds.length>0?Array.from(S.anchorIds):null,M=S.anchors.length>0?Array.from(S.anchors):null,N=S.interleavedVertedData.slice().buffer,I=S.indicesType===i.Int16?new Uint16Array(S.indices.buffer,S.indices.byteOffset,S.indices.byteLength/2).slice():new Uint32Array(S.indices.buffer,S.indices.byteOffset,S.indices.byteLength/4).slice(),F=S.positions.slice(),{buffer:T,byteOffset:B,byteLength:O}=S.positionIndices,R=S.positionIndicesType===i.Int16?new Uint16Array(T,B,O/2).slice():new Uint32Array(T,B,O/4).slice(),v=new c(r.layouts[0],N,I,S.hasColors,S.hasModifications,{data:F,indices:R});return _&&t.push(_.buffer),x&&t.push(x.buffer),t.push(N),t.push(I.buffer),t.push(F.buffer),t.push(R.buffer),new l(x,_,U,M,v,n,S.obb)}function S(e){return 0===e?u.Unmodified:1===e?u.PotentiallyModified:2===e?u.Culled:u.Unknown}function x(e){if(!j)return;const{context:r,buffer:t}=e,o=j._malloc(t.byteLength),n=t.byteLength/Float64Array.BYTES_PER_ELEMENT,s=new Float64Array(j.HEAPU8.buffer,o,n),i=new Float64Array(t);s.set(i),j.filterOBBs(r,o,n),i.set(s),j._free(o)}function _(e){j&&0===j.destroy(e)&&(j=null,E=null,f())}function P(e,r){for(let t=0;t<r.length;++t)e[t]=r[t]}async function U(){j||await M()}async function M(){return j||(j=await(E??=a())),j}const N={transform:(e,r)=>j&&L(j,e,r),destroy:_};export{w as destroyContext,y as dracoDecompressPointCloudData,p as filterObbsForModifications,x as filterObbsForModificationsSync,U as initialize,S as interpretObbModificationResults,m as process,b as project,h as setLegacySchema,d as setModifications,A as setModificationsSync,N as test,g as transformNormals};
|
package/views/VideoView.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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Color.js";import i from"../Viewpoint.js";import s from"../core/Accessor.js";import r from"../core/Evented.js";import{destroyMaybe as o}from"../core/maybe.js";import n from"../core/Promise.js";import{watch as a,initial as l,whenOnce as p,syncAndInitial as m}from"../core/reactiveUtils.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import{cast as d}from"../core/accessorSupport/decorators/cast.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{ensureClass as g}from"../core/accessorSupport/ensureType.js";import f from"../geometry/Extent.js";import j from"../geometry/Point.js";import y from"../geometry/SpatialReference.js";import{load as u,execute as w}from"../geometry/operators/projectOperator.js";import b from"../layers/support/ExtentAndRotationGeoreference.js";import{MediaElementView as v}from"../layers/support/MediaElementView.js";import M from"../layers/support/TileInfo.js";import _ from"../layers/support/VideoElement.js";import{DOMContainer as C}from"./DOMContainer.js";import{Viewport2DBaseMixin as S}from"./Viewport2DBaseMixin.js";import{Viewport2DMixin as x}from"./Viewport2DMixin.js";import P from"./2d/AnimationManager.js";import V from"./2d/MapViewConstraints.js";import"../core/Error.js";import"../core/scheduling.js";import"../core/Logger.js";import"../core/colorUtils.js";import"../config.js";import"../symbols/cim/defaultCIMValues.js";import"../symbols/cim/enums.js";import"../core/floatRGBA.js";import"../geometry/Geometry.js";import"../geometry/Multipoint.js";import"../geometry/Polygon.js";import"../geometry/Polyline.js";import"./2d/engine/webgl/definitions.js";import"./2d/engine/webgl/animations/instructions.js";import"../core/mathUtils.js";import"../symbols/Font.js";import"../core/ObjectPool.js";import"../geometry/support/Axis.js";import"../geometry/support/spatialReferenceUtils.js";import"../geometry/support/TileClipper.js";import"../symbols/cim/effects/EffectAddControlPoints.js";import"../symbols/cim/effects/EffectArrow.js";import"../symbols/cim/effects/EffectBuffer.js";import"../symbols/cim/effects/EffectControlMeasureLine.js";import"../symbols/cim/effects/EffectCut.js";import"../symbols/cim/effects/EffectDashes.js";import"../symbols/cim/effects/EffectDonut.js";import"../symbols/cim/effects/EffectEnclosingPolygon.js";import"../symbols/cim/effects/EffectJog.js";import"../symbols/cim/effects/EffectMove.js";import"../symbols/cim/effects/EffectOffset.js";import"../symbols/cim/effects/EffectRadial.js";import"../symbols/cim/effects/EffectReverse.js";import"../symbols/cim/effects/EffectRotate.js";import"../symbols/cim/effects/EffectScale.js";import"../symbols/cim/effects/EffectSuppress.js";import"../symbols/cim/effects/EffectTaperedPolygon.js";import"../symbols/cim/effects/EffectWave.js";import"../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../symbols/cim/placements/PlacementAtExtremities.js";import"../symbols/cim/placements/PlacementAtRatioPositions.js";import"../symbols/cim/placements/PlacementInsidePolygon.js";import"../symbols/cim/placements/PlacementOnLine.js";import"../symbols/cim/placements/PlacementOnVertices.js";import"../symbols/cim/placements/PlacementPolygonCenter.js";import"../symbols/cim/constants.js";import"../core/libs/gl-matrix-2/factories/vec2f32.js";import"./2d/engine/webgl/alignmentUtils.js";import"../symbols/support/defaults.js";import"../symbols/cim/OverrideHelper.js";import{Container as G}from"./2d/engine/Container.js";import"./2d/engine/webgl/enums.js";import"../core/libs/gl-matrix-2/factories/vec4f32.js";import"./webgl/enums.js";import"./2d/engine/webgl/shaders/BackgroundPrograms.js";import"./webgl/checkWebGLError.js";import"./2d/engine/webgl/DefaultVertexAttributeLayouts.js";import"./2d/engine/webgl/AFeatureTile.js";import"./2d/engine/webgl/DisplayEntity.js";import"./2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"./2d/engine/webgl/cpuMapped/MappedMesh.js";import"./2d/engine/webgl/number.js";import"./2d/engine/webgl/shaders/TileInfoPrograms.js";import"./webgl/Texture.js";import"./webgl/FBOAttachmentType.js";import"./2d/engine/vectorTiles/style/StyleDefinition.js";import"./2d/engine/vectorTiles/enums.js";import"./2d/engine/webgl/shaders/BitBlitPrograms.js";import"../request.js";import"../core/urlUtils.js";import"../core/pbf.js";import"./2d/engine/webgl/shaders/StencilPrograms.js";import"./2d/engine/webgl/shaderGraph/techniques/TechniqueType.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"./2d/engine/webgl/shaders/HighlightPrograms.js";import"./webgl/FramebufferObject.js";import"./2d/engine/webgl/meshing/SimpleMesh.js";import"./2d/engine/webgl/PooledUint32Array.js";import"./2d/engine/webgl/Profiler.js";import"./2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"./2d/engine/webgl/shaderGraph/techniques/animated/attributes.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/constants.js";import"./2d/engine/webgl/mesh/templates/templateUtils.js";import"./2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../geometry/support/aaBoundingBox.js";import"./2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../arcade/ArcadeDate.js";import"../intl/locale.js";import"luxon";import"../core/sql/UnknownTimeZone.js";import"../layers/support/fieldUtils.js";import"../time/constants.js";import"./2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"./webgl/renderState.js";import"./3d/webgl-engine/core/shaderModules/glsl.js";import"./webgl/testSVGPremultipliedAlpha.js";import{ManagedCanvas as E}from"./2d/engine/ManagedCanvas.js";import"./2d/engine/transitions/FadeTransition.js";import"./2d/engine/webgl/meshing/definitions.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"./2d/LabelManager.js";import"./2d/layers/graphics/GraphicsView2D.js";import"../chunks/earcut.js";import"../core/libs/gl-matrix-2/factories/vec3f32.js";import"../geometry/support/normalizeUtilsCommon.js";import"../geometry/support/Ellipsoid.js";import"../kernel.js";import"./2d/layers/support/util.js";import q from"./2d/navigation/MapViewNavigation.js";import"../core/asyncUtils.js";import"../core/support/UpdatingHandles.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../core/unitUtils.js";import"../geometry/ellipsoidUtils.js";import"../chunks/pe.js";import"../geometry/projection/projectors.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../geometry/support/geodesicConstants.js";import{ViewStateManager as R}from"./2d/ViewStateManager.js";import D from"./2d/engine/webgl/Overlay.js";import T from"./2d/engine/webgl/OverlayContainer.js";import O from"./navigation/Navigation.js";import z from"./ui/DefaultUI.js";import W from"./ui/video/DefaultUIVideo.js";const A=new t("#000");let U;async function k(){const[,{ParentStage:e}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);U=e}const F=.01,H=["feature","geojson","csv","stream","ogc-feature","catalog","wfs","parquet","graphics"];let L=class extends s{};L=e([c("esri.views.VideoView.Base")],L);let B=class extends(x(S(C(r.EventedMixin(n.EsriPromiseMixin(L)))))){constructor(e){super(e),this._isValid=!1,this.stage=null,this.childStage=null,this._operationalDataView=null,this.operationalDataVisible=!0,this.layer=null,this.map=null,this.navigation=new O,this.ready=!1,this.spatialReference=new y({wkid:0}),this.stateManager=new R({constraints:new V({view:this,minScale:1,maxScale:F})}),this.type="2d",this.ui=new W,this.view2dType="video",this.addHandles([a(()=>this.preconditionsReady,e=>e?this._startup():this._teardown()),a(()=>this.layer,()=>this.addResolvingPromise(p(()=>this.ready)),l),a(()=>this.videoSize,([e,t])=>{this._extent&&e&&t&&(this._extent.xmax=e,this._extent.ymax=t)}),a(()=>[this.layer?.frameEffect,this._effectsContainer],()=>{this._effectsContainer&&(this._effectsContainer.effect=this.layer?.frameEffect??null)},m),a(()=>[this.childStage,this.operationalDataVisible],()=>{this.childStage&&(this.childStage.visible=this.operationalDataVisible)},m)])}initialize(){this.addResolvingPromise(k().then(()=>(this._isValid=!0,p(()=>this.ready))))}destroy(){this._teardown(),this.removeAllHandles(),this._set("preconditionsReady",!1),this.frameTask=o(this.frameTask),this.goToManager.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get constraintsInfo(){return{lods:null,spatialReference:this.spatialReference}}get preconditionsReady(){return!(!this._isValid||0===this.width||0===this.height||0===this.videoSize[0]||0===this.videoSize[1])}get rendering(){return this.stage?.renderRequested??!1}get scale(){return this.stateManager?.scale??0}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get videoSize(){if(!this.layer?.videoWidth||!this.layer?.videoHeight)return[0,0];const[e,t]=this.size,i=(this.layer?.videoWidth||0)/(this.layer?.videoHeight||0),s=t*i,r=e/i;return e/t>=1?i>=1?s<=e?[s,t]:[e,r]:r<=t?[e,r]:[s,t]:i>=1?r<=t?[e,r]:[s,t]:s<=e?[s,t]:[e,r]}async hitTest(e,t){return this._operationalDataView&&this._operationalDataView.ready?this._operationalDataView.hitTest(e,t):{screenPoint:e,results:[]}}_startup(){if(!this.layer)return;const e=this._getViewpoint();this.stateManager.startup(e,this.size,e.targetGeometry.spatialReference);const t={renderingOptions:this.renderingOptions,backgroundColor:A,groundControlPoints:()=>this.layer?.groundControlPoints},i=new U(this.surface,t,new E(this.surface));this.stage=i,this._prepareStage(this.stage),this.childStage=i.childStage,this._prepareChildStage(this.childStage);const s=new P({view:this});this._set("animationManager",s);const r=new q({view:this,animationManager:s});this._set("mapViewNavigation",r),this._updateConstraints(),this.frameTask.start(),this._set("ready",!0)}_teardown(){this.stage.destroy(),this.stage=null,this._videoElementView=null,this._overlayContainer.removeAllChildren(),this._overlayContainer=null,this.removeHandles("video-view"),this._set("ready",!1),this.stateManager.teardown(),this.frameTask.stop(),this.stationaryManager.clear()}_getViewpoint(){return new i({targetGeometry:new j({x:this.videoSize[0]/2,y:this.videoSize[1]/2,spatialReference:this.spatialReference}),scale:1})}_prepareStage(e){this.addHandles([a(()=>this.stationary,t=>e.stationary=t,m),a(()=>this.state.id,()=>e.state=this.state,m),a(()=>this.renderingOptions,t=>e.renderingOptions=t,m)],"video-view"),this._extent=new f({xmin:0,ymin:0,xmax:this.videoSize[0],ymax:this.videoSize[1],spatialReference:{wkid:0}}),this._videoElementView=new v({element:new _({video:this.layer?.videoElement,georeference:new b({extent:this._extent}),autoplay:!1}),spatialReference:this.spatialReference});const t=new D(this._videoElementView);this._overlayContainer=new T,this._overlayContainer.addChild(t),this._effectsContainer=new G,this._effectsContainer.addChild(this._overlayContainer),this.stage.addChild(this._effectsContainer);const i=document.createElement("div");i.classList.add("esri-video-poster"),this.container?.classList.add("esri-video-view"),this.container?.appendChild(i)}_prepareChildStage(e){this.addHandles([a(()=>this.map,async t=>{if(this.ready&&t!==this.map)return;const{default:i}=await import("./video/VideoOperationalDataView.js");this._operationalDataView=new i({stage:e,layerViewFilter:e=>new Set(H).has(e.type),videoWidth:this.videoSize[0],videoHeight:this.videoSize[1],map:t})},m),a(()=>this.layer?.groundControlPoints,async()=>{if(!this.layer?.groundControlPoints)return;const t=this.layer.groundControlPoints,i=t?.length;if(!i)return;await u();const s=new Array(i),r=e.state.spatialReference;for(let e=0;e<i;e++){const{lat:i,lon:o}=t[e];s[e]=w(new j(o,i),r)}let o=1/0,n=1/0,a=-1/0,l=-1/0;for(const e of s)o=Math.min(o,e.x),n=Math.min(n,e.y),a=Math.max(a,e.x),l=Math.max(l,e.y);const p=f.fromJSON({xmin:o,ymin:n,xmax:a,ymax:l,spatialReference:r});await(this._operationalDataView?.goTo(p,{animate:!1}).catch(()=>{}))},m)])}_updateConstraints(){this._updateZoomConstraints(),this._updatePanConstraints()}_updateZoomConstraints(){const e=this.videoSize,t=Math.max(e[0]/this.size[0],e[1]/this.size[1]),i=[];for(let r=t;r>F;r/=2)i.push(r);i.push(F);const{lods:s}=M.create({scales:i});this.constraints.set({lods:s,minScale:t})}_updatePanConstraints(){const e=e=>{if(!e.targetGeometry)return e;const[t,i]=this.videoSize,s=t*e.scale/2,r=i*e.scale/2,o=e.targetGeometry.clone();return o.x=Math.max(s,Math.min(t-s,o.x)),o.y=Math.max(r,Math.min(i-r,o.y)),e.targetGeometry=o,e};this.constraints.customConstraints.add({constrain:e,applyPanConstraint:e})}};e([h()],B.prototype,"_overlayContainer",void 0),e([h()],B.prototype,"_isValid",void 0),e([h()],B.prototype,"_effectsContainer",void 0),e([h()],B.prototype,"constraintsInfo",null),e([h()],B.prototype,"operationalDataVisible",void 0),e([h()],B.prototype,"layer",void 0),e([h()],B.prototype,"map",void 0),e([h({type:O,nonNullable:!0})],B.prototype,"navigation",void 0),e([h({readOnly:!0})],B.prototype,"preconditionsReady",null),e([h({readOnly:!0})],B.prototype,"ready",void 0),e([h({readOnly:!0})],B.prototype,"rendering",null),e([h()],B.prototype,"scale",null),e([h()],B.prototype,"spatialReference",void 0),e([h()],B.prototype,"stateManager",void 0),e([h()],B.prototype,"type",void 0),e([h(),d(e=>e instanceof z?e:g(W,e))],B.prototype,"ui",void 0),e([h({readOnly:!0})],B.prototype,"videoSize",null),e([h({readOnly:!0})],B.prototype,"view2dType",void 0),B=e([c("esri.views.VideoView")],B);const I=B;export{I as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Color.js";import i from"../Viewpoint.js";import s from"../core/Accessor.js";import r from"../core/Evented.js";import{destroyMaybe as o}from"../core/maybe.js";import n from"../core/Promise.js";import{watch as a,initial as l,whenOnce as p,syncAndInitial as m}from"../core/reactiveUtils.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import{cast as d}from"../core/accessorSupport/decorators/cast.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{ensureClass as g}from"../core/accessorSupport/ensureType.js";import f from"../geometry/Extent.js";import u from"../geometry/Point.js";import y from"../geometry/SpatialReference.js";import{load as j,execute as w}from"../geometry/operators/projectOperator.js";import b from"../layers/support/ExtentAndRotationGeoreference.js";import{MediaElementView as v}from"../layers/support/MediaElementView.js";import M from"../layers/support/TileInfo.js";import _ from"../layers/support/VideoElement.js";import{DOMContainer as S}from"./DOMContainer.js";import{Viewport2DBaseMixin as C}from"./Viewport2DBaseMixin.js";import{Viewport2DMixin as x}from"./Viewport2DMixin.js";import V from"./2d/AnimationManager.js";import E from"./2d/MapViewConstraints.js";import"../core/Error.js";import"../core/scheduling.js";import"../core/Logger.js";import"../core/colorUtils.js";import"../config.js";import"../symbols/cim/defaultCIMValues.js";import"../symbols/cim/enums.js";import"../core/floatRGBA.js";import"../geometry/Geometry.js";import"../geometry/Multipoint.js";import"../geometry/Polygon.js";import"../geometry/Polyline.js";import"./2d/engine/webgl/definitions.js";import"./2d/engine/webgl/animations/instructions.js";import"../core/mathUtils.js";import"../symbols/Font.js";import"../core/ObjectPool.js";import"../geometry/support/Axis.js";import"../geometry/support/spatialReferenceUtils.js";import"../geometry/support/TileClipper.js";import"../symbols/cim/effects/EffectAddControlPoints.js";import"../symbols/cim/effects/EffectArrow.js";import"../symbols/cim/effects/EffectBuffer.js";import"../symbols/cim/effects/EffectControlMeasureLine.js";import"../symbols/cim/effects/EffectCut.js";import"../symbols/cim/effects/EffectDashes.js";import"../symbols/cim/effects/EffectDonut.js";import"../symbols/cim/effects/EffectEnclosingPolygon.js";import"../symbols/cim/effects/EffectJog.js";import"../symbols/cim/effects/EffectMove.js";import"../symbols/cim/effects/EffectOffset.js";import"../symbols/cim/effects/EffectRadial.js";import"../symbols/cim/effects/EffectReverse.js";import"../symbols/cim/effects/EffectRotate.js";import"../symbols/cim/effects/EffectScale.js";import"../symbols/cim/effects/EffectSuppress.js";import"../symbols/cim/effects/EffectTaperedPolygon.js";import"../symbols/cim/effects/EffectWave.js";import"../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../symbols/cim/placements/PlacementAtExtremities.js";import"../symbols/cim/placements/PlacementAtRatioPositions.js";import"../symbols/cim/placements/PlacementInsidePolygon.js";import"../symbols/cim/placements/PlacementOnLine.js";import"../symbols/cim/placements/PlacementOnVertices.js";import"../symbols/cim/placements/PlacementPolygonCenter.js";import"../symbols/cim/constants.js";import"../core/libs/gl-matrix-2/factories/vec2f32.js";import"./2d/engine/webgl/alignmentUtils.js";import"../symbols/support/defaults.js";import"../symbols/cim/OverrideHelper.js";import{Container as P}from"./2d/engine/Container.js";import"./2d/engine/webgl/enums.js";import"../core/libs/gl-matrix-2/factories/vec4f32.js";import"./webgl/enums.js";import"./2d/engine/webgl/shaders/BackgroundPrograms.js";import"./webgl/checkWebGLError.js";import"./2d/engine/webgl/DefaultVertexAttributeLayouts.js";import"./2d/engine/webgl/AFeatureTile.js";import"./2d/engine/webgl/DisplayEntity.js";import"./2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"./2d/engine/webgl/cpuMapped/MappedMesh.js";import"./2d/engine/webgl/number.js";import"./2d/engine/webgl/shaders/TileInfoPrograms.js";import"./webgl/Texture.js";import"./webgl/FBOAttachmentType.js";import"./2d/engine/vectorTiles/style/StyleDefinition.js";import"./2d/engine/vectorTiles/enums.js";import"./2d/engine/webgl/shaders/BitBlitPrograms.js";import"../request.js";import"../core/urlUtils.js";import"../core/pbf.js";import"./2d/engine/webgl/shaders/StencilPrograms.js";import"./2d/engine/webgl/shaderGraph/techniques/TechniqueType.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"./2d/engine/webgl/shaders/HighlightPrograms.js";import"./webgl/FramebufferObject.js";import"./2d/engine/webgl/meshing/SimpleMesh.js";import"./2d/engine/webgl/PooledUint32Array.js";import"./2d/engine/webgl/Profiler.js";import"./2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"./2d/engine/webgl/shaderGraph/techniques/animated/attributes.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/constants.js";import"./2d/engine/webgl/mesh/templates/templateUtils.js";import"./2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../geometry/support/aaBoundingBox.js";import"./2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../arcade/ArcadeDate.js";import"../intl/locale.js";import"luxon";import"../core/sql/UnknownTimeZone.js";import"../layers/support/fieldUtils.js";import"../time/constants.js";import"./2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"./webgl/renderState.js";import"./3d/webgl-engine/core/shaderModules/glsl.js";import"./webgl/testSVGPremultipliedAlpha.js";import{ManagedCanvas as G}from"./2d/engine/ManagedCanvas.js";import"./2d/engine/transitions/FadeTransition.js";import"./2d/engine/webgl/meshing/definitions.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"./2d/LabelManager.js";import"./2d/layers/graphics/GraphicsView2D.js";import"../chunks/earcut.js";import"../core/libs/gl-matrix-2/factories/vec3f32.js";import"../geometry/support/normalizeUtilsCommon.js";import"../geometry/support/Ellipsoid.js";import"../kernel.js";import"./2d/layers/support/util.js";import D from"./2d/navigation/MapViewNavigation.js";import"../core/asyncUtils.js";import"../core/support/UpdatingHandles.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../core/unitUtils.js";import"../geometry/ellipsoidUtils.js";import"../chunks/pe.js";import"../geometry/projection/projectors.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../geometry/support/geodesicConstants.js";import{ViewStateManager as R}from"./2d/ViewStateManager.js";import q from"./2d/engine/webgl/Overlay.js";import T from"./2d/engine/webgl/OverlayContainer.js";import O from"./navigation/Navigation.js";import z from"./ui/DefaultUI.js";import W from"./ui/video/DefaultUIVideo.js";const A=new t("#000");let U;async function k(){const[,{ParentStage:e}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);U=e}const F=.01,H=["feature","geojson","csv","stream","ogc-feature","catalog","wfs","parquet","graphics"];let L=class extends s{};L=e([c("esri.views.VideoView.Base")],L);let B=class extends(x(C(S(r.EventedMixin(n.EsriPromiseMixin(L)))))){constructor(e){super(e),this._isValid=!1,this._prevZoomEnabled=!1,this._prevRotationEnabled=!1,this.stage=null,this.childStage=null,this._operationalDataView=null,this.operationalDataVisible=!1,this.layer=null,this.map=null,this.navigation=new O,this.ready=!1,this.spatialReference=new y({wkid:0}),this.stateManager=new R({constraints:new E({view:this,minScale:1,maxScale:F})}),this.type="2d",this.ui=new W,this.view2dType="video",this.addHandles([a(()=>this.preconditionsReady,e=>e?this._startup():this._teardown()),a(()=>this.layer,()=>this.addResolvingPromise(p(()=>this.ready)),l),a(()=>this.videoSize,([e,t])=>{this._extent&&e&&t&&(this._extent.xmax=e,this._extent.ymax=t)}),a(()=>[this.layer?.frameEffect,this._effectsContainer],()=>{this._effectsContainer&&(this._effectsContainer.effect=this.layer?.frameEffect??null)},m),a(()=>this.operationalDataVisible,()=>{this.childStage&&(this.childStage.videoScreenRenderer.visible=this.operationalDataVisible),this.operationalDataVisible&&(this.scale=1,this.rotation=0),this.navigation&&(this._prevZoomEnabled&&(this.navigation.actionMap.mouseWheel=this.operationalDataVisible?"none":"zoom",this.navigation.actionMap.dragPrimary=this.operationalDataVisible?"none":"pan",this.ui.components&&(this.ui.components=this.operationalDataVisible?this.ui.components.filter(e=>"zoom"!==e):[...new Set([...this.ui.components,"zoom"])])),this._prevRotationEnabled&&(this.navigation.actionMap.dragSecondary=this.operationalDataVisible?"none":"rotate",this.ui.components&&(this.ui.components=this.operationalDataVisible?this.ui.components.filter(e=>"compass"!==e):[...new Set([...this.ui.components,"compass"])])))},m)])}initialize(){this._prevZoomEnabled="zoom"===this.navigation.actionMap.mouseWheel&&this.ui.components.includes("zoom"),this._prevRotationEnabled="rotate"===this.navigation.actionMap.dragSecondary&&this.ui.components.includes("compass"),this.addResolvingPromise(k().then(()=>(this._isValid=!0,p(()=>this.ready))))}destroy(){this._teardown(),this.removeAllHandles(),this._set("preconditionsReady",!1),this.frameTask=o(this.frameTask),this.goToManager.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get constraintsInfo(){return{lods:null,spatialReference:this.spatialReference}}get preconditionsReady(){return!(!this._isValid||0===this.width||0===this.height||0===this.videoSize[0]||0===this.videoSize[1])}get rendering(){return this.stage?.renderRequested??!1}get scale(){return this.stateManager?.scale??0}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get videoSize(){if(!this.layer?.videoWidth||!this.layer?.videoHeight)return[0,0];const[e,t]=this.size,i=(this.layer?.videoWidth||0)/(this.layer?.videoHeight||0),s=t*i,r=e/i;return e/t>=1?i>=1?s<=e?[s,t]:[e,r]:r<=t?[e,r]:[s,t]:i>=1?r<=t?[e,r]:[s,t]:s<=e?[s,t]:[e,r]}async hitTest(e,t){return this._operationalDataView&&this._operationalDataView.ready?this._operationalDataView.hitTest(e,t):{screenPoint:e,results:[]}}_startup(){if(!this.layer)return;const e=this._getViewpoint();this.stateManager.startup(e,this.size,e.targetGeometry.spatialReference);const t={renderingOptions:this.renderingOptions,backgroundColor:A,groundControlPoints:()=>this.layer?.groundControlPoints},i=new U(this.surface,t,new G(this.surface));this.stage=i,this._prepareStage(this.stage),this.childStage=i.childStage,this._prepareChildStage(this.childStage);const s=new V({view:this});this._set("animationManager",s);const r=new D({view:this,animationManager:s});this._set("mapViewNavigation",r),this._updateConstraints(),this.frameTask.start(),this._set("ready",!0)}_teardown(){this.stage.destroy(),this.stage=null,this._videoElementView=null,this._overlayContainer.removeAllChildren(),this._overlayContainer=null,this.removeHandles("video-view"),this._set("ready",!1),this.stateManager.teardown(),this.frameTask.stop(),this.stationaryManager.clear()}_getViewpoint(){return new i({targetGeometry:new u({x:this.videoSize[0]/2,y:this.videoSize[1]/2,spatialReference:this.spatialReference}),scale:1})}_prepareStage(e){this.addHandles([a(()=>this.stationary,t=>e.stationary=t,m),a(()=>this.state.id,()=>e.state=this.state,m),a(()=>this.renderingOptions,t=>e.renderingOptions=t,m)],"video-view"),this._extent=new f({xmin:0,ymin:0,xmax:this.videoSize[0],ymax:this.videoSize[1],spatialReference:{wkid:0}}),this._videoElementView=new v({element:new _({video:this.layer?.videoElement,georeference:new b({extent:this._extent}),autoplay:!1}),spatialReference:this.spatialReference});const t=new q(this._videoElementView);this._overlayContainer=new T,this._overlayContainer.addChild(t),this._effectsContainer=new P,this._effectsContainer.addChild(this._overlayContainer),this.stage.addChild(this._effectsContainer);const i=document.createElement("div");i.classList.add("esri-video-poster"),this.container?.classList.add("esri-video-view"),this.container?.appendChild(i)}_prepareChildStage(e){this.addHandles([a(()=>this.map,async t=>{if(this.ready&&t!==this.map)return;const{default:i}=await import("./video/VideoOperationalDataView.js");this._operationalDataView=new i({stage:e,layerViewFilter:e=>new Set(H).has(e.type),videoWidth:this.videoSize[0],videoHeight:this.videoSize[1],map:t}),p(()=>this._operationalDataView?.ready).then(()=>{e.videoScreenRenderer.visible=this.operationalDataVisible})},m),a(()=>this.layer?.groundControlPoints,async()=>{if(!this.layer?.groundControlPoints)return;const t=this.layer.groundControlPoints,i=t?.length;if(!i)return;await j();const s=new Array(i),r=e.state.spatialReference;for(let e=0;e<i;e++){const{lat:i,lon:o}=t[e];s[e]=w(new u(o,i),r)}let o=1/0,n=1/0,a=-1/0,l=-1/0;for(const e of s)o=Math.min(o,e.x),n=Math.min(n,e.y),a=Math.max(a,e.x),l=Math.max(l,e.y);const p=f.fromJSON({xmin:o,ymin:n,xmax:a,ymax:l,spatialReference:r});await(this._operationalDataView?.goTo(p,{animate:!1}).catch(()=>{}))},m)])}_updateConstraints(){this._updateZoomConstraints(),this._updatePanConstraints()}_updateZoomConstraints(){const e=this.videoSize,t=Math.max(e[0]/this.size[0],e[1]/this.size[1]),i=[];for(let r=t;r>F;r/=2)i.push(r);i.push(F);const{lods:s}=M.create({scales:i});this.constraints.set({lods:s,minScale:t})}_updatePanConstraints(){const e=e=>{if(!e.targetGeometry)return e;const[t,i]=this.videoSize,s=t*e.scale/2,r=i*e.scale/2,o=e.targetGeometry.clone();return o.x=Math.max(s,Math.min(t-s,o.x)),o.y=Math.max(r,Math.min(i-r,o.y)),e.targetGeometry=o,e};this.constraints.customConstraints.add({constrain:e,applyPanConstraint:e})}};e([h()],B.prototype,"_overlayContainer",void 0),e([h()],B.prototype,"_isValid",void 0),e([h()],B.prototype,"_effectsContainer",void 0),e([h()],B.prototype,"constraintsInfo",null),e([h()],B.prototype,"operationalDataVisible",void 0),e([h()],B.prototype,"layer",void 0),e([h()],B.prototype,"map",void 0),e([h({type:O,nonNullable:!0})],B.prototype,"navigation",void 0),e([h({readOnly:!0})],B.prototype,"preconditionsReady",null),e([h({readOnly:!0})],B.prototype,"ready",void 0),e([h({readOnly:!0})],B.prototype,"rendering",null),e([h()],B.prototype,"scale",null),e([h()],B.prototype,"spatialReference",void 0),e([h()],B.prototype,"stateManager",void 0),e([h()],B.prototype,"type",void 0),e([h(),d(e=>e instanceof z?e:g(W,e))],B.prototype,"ui",void 0),e([h({readOnly:!0})],B.prototype,"videoSize",null),e([h({readOnly:!0})],B.prototype,"view2dType",void 0),B=e([c("esri.views.VideoView")],B);const I=B;export{I as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Evented.js";import{makeHandle as r}from"../../core/handleUtils.js";import{destroyMaybe as o}from"../../core/maybe.js";import{property as
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Evented.js";import{makeHandle as r}from"../../core/handleUtils.js";import{destroyMaybe as o}from"../../core/maybe.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{IDENTITY as a}from"../../core/libs/gl-matrix-2/factories/mat2df64.js";import{DrawOperation as n}from"./DrawOperation.js";import{ScreenDrawSurface as p}from"./drawSurfaces.js";import{createCircle as c,createSquare as l,createEllipse as d,createRectangle as u}from"./support/createUtils.js";import{AffineCoordinateSystem as m}from"./support/surfaceCoordinateSystems.js";import{InteractiveToolBase as h}from"../interactive/InteractiveToolBase.js";import g from"../overlay/OutlineOverlayItem.js";let y=class extends(t.EventedMixin(h)){constructor(e){super(e),this.drawOperation=null,this._overlayItem=void 0,this.geometryType=null,this.mode=null,this.type="draw-screen"}initialize(){this.drawOperation=this._makeDrawOperation();const e=e=>this.drawOperation?.on(e,t=>{this._updateVisuals(),this.emit(e,t)})??r();this.addHandles([e("vertex-add"),e("vertex-remove"),e("vertex-update"),e("cursor-update"),e("complete")]),this.finishToolCreation()}destroy(){this.drawOperation=o(this.drawOperation),this._set("view",null)}get canRedo(){return!!this.drawOperation?.canRedo}get canUndo(){return!!this.drawOperation?.canUndo}set centeredToggled(e){this._set("centeredToggled",e),this._updateVisuals()}set enabled(e){const{drawOperation:t}=this;t&&(t.interactive=e),this._set("enabled",e)}set uniformSizeToggled(e){this._set("uniformSizeToggled",e),this._updateVisuals()}get updating(){return this.drawOperation?.updating??!1}get cursor(){return this._get("cursor")??"crosshair"}set cursor(e){this._set("cursor",e);const{drawOperation:t}=this;t&&(t.cursor=e)}completeCreateOperation(){this.drawOperation?.complete()}onInputEvent(e){this.destroyed||this.drawOperation?.onInputEvent(e)}redo(){this.drawOperation?.redo()}undo(){this.drawOperation?.undo()}reset(){}_makeDrawOperation(){const{view:e}=this;return new n({view:e,manipulators:this.manipulators,geometryType:v(this.geometryType),drawingMode:this.mode,hasZ:!1,defaultZ:0,snapToSceneEnabled:!1,drawSurface:new p,hasM:!1,snappingManager:null,snappingVisualizer:null,graphic:null,cursor:this.cursor,automaticLengthMeasurementUtils:this.automaticLengthMeasurementUtils})}get coordinates(){const{drawOperation:e}=this;if(!e?.geometryIncludingUncommittedVertices.length)return[];const{coordinateHelper:t}=e,r=e.committableVertex,o=e.committedVertices.slice();null!=r&&o.push(t.pointToArray(r));const s=o.length;switch(this.geometryType){case"point":return o.slice(0,1);case"circle":case"rectangle":{const t=new m(a,p.spatialReference),r="circle"===this.geometryType?c:l,i="circle"===this.geometryType?d:u;if(1===s&&e.isCompleted){const e=o[0],s=t.makeMapPoint(e[0]+w,e[1]);return r([e,s],t,!0)?.geometry.rings[0]??[]}if(2===s){const e="rectangle"!==this.geometryType,s=this.centeredToggled!==e,a="rectangle"!==this.geometryType;return(this.uniformSizeToggled!==a?r(o,t,s)?.geometry.rings[0]:i(o,t,s)?.geometry.rings[0])??[]}return[]}}return o}_updateVisuals(){if(!this._overlayItem){const e=new g({strokeDash:[5],strokeDashColor:[255,255,255,255]});this.view.overlay?.addItem(e),this.addHandles(r(()=>{this.view.overlay?.removeItem(e),e?.destroy(),this._overlayItem=void 0})),this._overlayItem=e}this._overlayItem.coordinates=this.coordinates}onDeactivate(){this.drawOperation?.isCompleted||this.drawOperation?.cancel()}};function v(e){switch(e){case"polygon":case"point":return e;case"circle":case"rectangle":return"segment"}}e([s({value:!1})],y.prototype,"centeredToggled",null),e([s()],y.prototype,"drawOperation",void 0),e([s({value:!0})],y.prototype,"enabled",null),e([s({value:!1})],y.prototype,"uniformSizeToggled",null),e([s({constructOnly:!0})],y.prototype,"geometryType",void 0),e([s({constructOnly:!0})],y.prototype,"mode",void 0),e([s({readOnly:!0})],y.prototype,"type",void 0),e([s({readOnly:!0})],y.prototype,"updating",null),e([s({constructOnly:!0,nonNullable:!0})],y.prototype,"view",void 0),e([s({constructOnly:!0})],y.prototype,"automaticLengthMeasurementUtils",void 0),e([s()],y.prototype,"cursor",null),y=e([i("esri.views.draw.DrawScreenTool")],y);const w=48;export{y as DrawScreenTool,v as geometryTypeToDrawOperationGeometryType};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../core/Logger.js";import{
|
|
5
|
+
import e from"../../core/Logger.js";import{makeScheduleFunction as r}from"../3d/layers/support/makeScheduleFunction.js";import{TextureCompressionWorkerHandle as o}from"./TextureCompressionWorkerHandle.js";import{Texture as t}from"../webgl/Texture.js";const n=new Set,s=()=>e.getLogger("esri/views/support/TextureCompressionHelper");function i(e,i){return t.compressionWorkerHandle??=new o(r(i)),n.has(e)?s().warn("Repeated texture compression worker initialization by the same view."):n.add(e),t.compressionWorkerHandle}function p(e){const r=t.compressionWorkerHandle;r&&(n.delete(e)||s().warn("Unknown view attempted to destroy the texture compression worker."),n.size||(r.destroyWorkerAndSelf(),t.compressionWorkerHandle=null))}export{p as destroyTextureCompressionWorker,i as initializeTextureCompressionWorker};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{getBasisEncoder as e}from"../../libs/basisu/BasisUEncoder.js";import{TextureFormat as
|
|
5
|
+
import{getBasisEncoder as e,destroyBasisEncoder as t}from"../../libs/basisu/BasisUEncoder.js";import{TextureFormat as n}from"../../libs/basisu/TextureFormat.js";import{getDXTEncoder as r,destroyDXTEncoder as a}from"../../libs/dxtEncoder/DXTEncoder.js";import{CompressedTextureFormat as l}from"../webgl/enums.js";let s,i,o=null,u=null;class c{constructor(e,t){this.internalFormat=e,this.compressedTexture=t}}function h(){o=null,s=null,u=null,i=null,t(),a()}async function f(e){let t;if(t=e.data instanceof ImageBitmap?y(e.data):T(e.data,e.width,e.height,e.components,e.needsFlip),e.hasS3TC){u||await p();const n=new Uint8Array(t.length);if(u?.encode(t,e.width,e.height,e.preMultiplyAlpha,n)){const e=B(n,!0),t=[n.buffer];return{result:new c(e?.internalFormat??null,e?.textureData??null),transferList:t}}return{result:new c(null,null)}}if(e.hasETC){if(o||await d(),e.preMultiplyAlpha&&!u&&await p(),e.preMultiplyAlpha){const n=new Uint8ClampedArray(t.length);u?.premultiply(new Uint8Array(t),e.width,e.height,n),t=n}const n=await m(t,e.width,e.height,e.hasMipmap),r=n?await w(n):null,a=r?.compressedTexture?.levels.map(e=>e.buffer)||[];return{result:new c(r?.internalFormat??null,r?.compressedTexture??null),transferList:a}}return{result:new c(null,null)}}async function d(){o||(o=await(s??=e()),s=null)}async function p(){u||(u=await(i??=r()),i=null)}async function m(e,t,n,r,a=255,l=0,s=!1,i=!1){if(!o)return null;const u=new o.BasisEncoder;u.setPerceptual(!i),u.setCheckForAlpha(!0),u.setForceAlpha(!1),u.setRenormalize(i),u.setMipGen(r),u.setMipSRGB(!i),u.setCreateKTX2File(!0),u.setKTX2SRGBTransferFunc(!i),u.setQualityLevel(a),u.setCompressionLevel(l);const c=new Uint8Array(e.byteLength);u.setSliceSourceImage(0,new Uint8Array(e),t,n,s);const h=u.encode(c),f=new Uint8Array(c.buffer,0,h),d=new o.KTX2File(new Uint8Array(f));return d.isValid()?(u.delete(),f):(d.close(),d.delete(),u.delete(),null)}async function w(e){if(!o)return new c(null,null);const t=new o.KTX2File(new Uint8Array(e));t.startTranscoding();const[r,a]=t.getHasAlpha()?[n.ETC2_RGBA,l.COMPRESSED_RGBA8_ETC2_EAC]:[n.ETC1_RGB,l.COMPRESSED_RGB8_ETC2],s=t.getLevels(),i=[];for(let n=0;n<s;n++)i.push(new Uint8Array(t.getImageTranscodedSizeInBytes(n,0,0,r))),t.transcodeImage(i[n],n,0,0,r,0,-1,-1);return t.close(),t.delete(),{internalFormat:a,compressedTexture:{type:"compressed",levels:i}}}function y(e){const t=new OffscreenCanvas(e.width,e.height),n=t.getContext("2d");n.drawImage(e,0,0);return n.getImageData(0,0,t.width,t.height).data}function T(e,t,n,r,a){const l=new Uint8ClampedArray(e).subarray(0,t*n*r);if(!a)return l;const s=new Uint8ClampedArray(l.length),i=t*r;for(let o=0;o<n;o++){const e=o*i,t=(n-o-1)*i;s.set(l.subarray(e,e+i),t)}return s}const A=31,C=1,g=2,E=3,b=4,S=7,_=21,D=131072;function R(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const M=R("DXT1"),X=R("DXT3"),x=R("DXT5");function B(e,t){const n=new Int32Array(e.buffer,e.byteOffset,A);let r,a;switch(n[_]){case M:r=8,a=l.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case X:r=16,a=l.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case x:r=16,a=l.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return null}let s=1,i=n[b],o=n[E];(3&i||3&o)&&(i=i+3&-4,o=o+3&-4);const u=i,c=o;let h,f;n[g]&D&&!1!==t&&(s=Math.max(1,n[S]));let d=e.byteOffset+n[C]+4;const p=[];for(let l=0;l<s;++l)f=(i+3>>2)*(o+3>>2)*r,h=new Uint8Array(e.buffer,d,f),p.push(h),d+=f,i=Math.max(1,i>>1),o=Math.max(1,o>>1);return{textureData:{type:"compressed",levels:p},internalFormat:a,width:u,height:c}}export{c as TextureCompressionWorkerOutput,f as compress,m as compressRGBADataToKTX2,w as createTextureDataKTX2,h as destroy,d as initializeBasisEncoder,p as initializeDXTEncoder};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isPowerOfTwo as e}from"../../core/mathUtils.js";import{WorkerHandle as
|
|
5
|
+
import{isPowerOfTwo as e}from"../../core/mathUtils.js";import{WorkerHandle as t}from"../../core/workers/WorkerHandle.js";import{PixelFormat as r}from"../webgl/enums.js";function s(t,s){let o=s.width,n=s.height;return(t instanceof HTMLImageElement||t instanceof HTMLCanvasElement)&&(o=t.width,n=t.height),(t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof Uint8Array)&&(s.pixelFormat===r.RGBA||s.pixelFormat===r.RGB)&&e(o)&&e(n)&&o>=16&&n>=16}class o extends t{constructor(e){super("TextureCompressionWorker","compress",{compress:e=>[e.data]},e)}async destroyWorkerAndSelf(){await this.broadcast({},"destroy"),this.destroy()}isCompressible(e,t){return s(e,t)}}export{o as TextureCompressionWorkerHandle,s as isCompressible};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import o from"./InputBase.js";let r=class extends o{constructor(){super(...arguments),this.editType="NA"}get editable(){return this._evaluatedEditableExpression??!0}get _evaluatedEditableExpression(){let e=!0,t=!0;for(const s of this.features){if(null==this.template.getExpressionExecutorsForLayer(s.layer)?.editableExpression){e=e&&!0;continue}t=!1;const o=this._lookupEvaluatedExpression(s,"editable");"success"===o?.status?e=e&&!0===o.result:e=!1}return t?null:e}};e([t()],r.prototype,"editable",null),e([t()],r.prototype,"editType",void 0),e([t()],r.prototype,"_evaluatedEditableExpression",null),r=e([s("esri.widgets.BatchAttributeForm.inputs.EditableInput")],r);const i=r;export{i as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../chunks/tslib.es6.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";import
|
|
5
|
+
import{_ as t}from"../../../chunks/tslib.es6.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";import o from"./InputBase.js";import{visibilityCodeToBoolean as r}from"./support/inputUtils.js";let i=class extends o{constructor(t){super(t),this.inputs=[],this.type="group"}initialize(){for(const t of this.inputs)t.group=this}get open(){return"expanded"===this.template.initialState}set open(t){this._override("open",t)}get visible(){return r(this.visibilityCode)&&this.inputs.some(t=>t.visible)}visibleForFeature(t){if(null==this.template.getExpressionExecutorsForLayer(t.layer)?.visibilityExpression)return!0;const s=this._lookupEvaluatedExpression(t,"visibility");return"success"===s?.status&&!0===s.result}};t([s()],i.prototype,"inputs",void 0),t([s({readOnly:!0})],i.prototype,"type",void 0),t([s()],i.prototype,"open",null),t([s()],i.prototype,"visible",null),i=t([e("esri.widgets.BatchAttributeForm.inputs.GroupInput")],i);const p=i;export{p 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import s from"../../../core/Collection.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{visibilityCodeToBoolean as o,InputVisibilityCode as l,makeUseId as a}from"./support/inputUtils.js";let p=class extends t{constructor(e){super(e),this.existsInAllLayers=!0,this.features=new s}get description(){return this.template.description}get featuresHaveSameCalculatedVisibility(){const e=new Set;for(const t of this.features){if(null==this.template.getExpressionExecutorsForLayer(t.layer)?.visibilityExpression){e.add(!0);continue}const s=this._lookupEvaluatedExpression(t,"visibility");if("success"===s?.status){if(e.add(!0===s.result),e.size>1)return!1}else e.add(!1)}return e.size<=1}get label(){return this.template.label}get layers(){return Array.from(new Set(this.features.map(e=>e.layer).filter(e=>null!=e&&("feature"===e.type||"geojson"===e.type||"scene"===e.type||"subtype-sublayer"===e.type||"oriented-imagery"===e.type))))}get visibilityCode(){return this._baseVisibilityCode}get visible(){return o(this.visibilityCode)}get _baseVisibilityCode(){return this.existsInAllLayers?this.featuresHaveSameCalculatedVisibility?!1===this._evaluatedVisibilityExpression?l.HIDDEN_VISIBILITY_EXPRESSION_ALL:l.VISIBLE:l.HIDDEN_VISIBILITY_EXPRESSION_SOME:l.HIDDEN_NOT_IN_ALL_LAYERS}get _evaluatedVisibilityExpression(){let e=!0,t=!0;for(const s of this.features){if(null==this.template.getExpressionExecutorsForLayer(s.layer)?.visibilityExpression){e=e&&!0;continue}t=!1;const i=this._lookupEvaluatedExpression(s,"visibility");"success"===i?.status?e=e&&!0===i.result:e=!1}return t?null:e}_lookupEvaluatedExpression(e,t){return this.expressionsManager.evaluatedExpressions.get(e)?.get(a(this.template.elementId,t))}};e([i({constructOnly:!0})],p.prototype,"expressionsManager",void 0),e([i()],p.prototype,"description",null),e([i()],p.prototype,"existsInAllLayers",void 0),e([i()],p.prototype,"features",void 0),e([i()],p.prototype,"featuresHaveSameCalculatedVisibility",null),e([i()],p.prototype,"label",null),e([i()],p.prototype,"layers",null),e([i({constructOnly:!0})],p.prototype,"template",void 0),e([i()],p.prototype,"visibilityCode",null),e([i()],p.prototype,"visible",null),e([i()],p.prototype,"_baseVisibilityCode",null),e([i()],p.prototype,"_evaluatedVisibilityExpression",null),p=e([r("esri.widgets.BatchAttributeForm.inputs.InputBase")],p);export{
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import s from"../../../core/Collection.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{visibilityCodeToBoolean as o,InputVisibilityCode as l,makeUseId as a}from"./support/inputUtils.js";let p=class extends t{constructor(e){super(e),this.existsInAllLayers=!0,this.features=new s}get description(){return this.template.description}get featuresHaveSameCalculatedVisibility(){const e=new Set;for(const t of this.features){if(null==this.template.getExpressionExecutorsForLayer(t.layer)?.visibilityExpression){e.add(!0);continue}const s=this._lookupEvaluatedExpression(t,"visibility");if("success"===s?.status){if(e.add(!0===s.result),e.size>1)return!1}else e.add(!1)}return e.size<=1}get label(){return this.template.label}get layers(){return Array.from(new Set(this.features.map(e=>e.layer).filter(e=>null!=e&&("feature"===e.type||"geojson"===e.type||"scene"===e.type||"subtype-sublayer"===e.type||"oriented-imagery"===e.type))))}get visibilityCode(){return this._baseVisibilityCode}get visible(){return o(this.visibilityCode)}get _baseVisibilityCode(){return this.existsInAllLayers?this.featuresHaveSameCalculatedVisibility?!1===this._evaluatedVisibilityExpression?l.HIDDEN_VISIBILITY_EXPRESSION_ALL:l.VISIBLE:l.HIDDEN_VISIBILITY_EXPRESSION_SOME:l.HIDDEN_NOT_IN_ALL_LAYERS}get _evaluatedVisibilityExpression(){let e=!0,t=!0;for(const s of this.features){if(null==this.template.getExpressionExecutorsForLayer(s.layer)?.visibilityExpression){e=e&&!0;continue}t=!1;const i=this._lookupEvaluatedExpression(s,"visibility");"success"===i?.status?e=e&&!0===i.result:e=!1}return t?null:e}_lookupEvaluatedExpression(e,t){return this.expressionsManager.evaluatedExpressions.get(e)?.get(a(this.template.elementId,t))}};e([i({constructOnly:!0})],p.prototype,"expressionsManager",void 0),e([i()],p.prototype,"description",null),e([i()],p.prototype,"existsInAllLayers",void 0),e([i()],p.prototype,"features",void 0),e([i()],p.prototype,"featuresHaveSameCalculatedVisibility",null),e([i()],p.prototype,"label",null),e([i()],p.prototype,"layers",null),e([i({constructOnly:!0})],p.prototype,"template",void 0),e([i()],p.prototype,"visibilityCode",null),e([i()],p.prototype,"visible",null),e([i()],p.prototype,"_baseVisibilityCode",null),e([i()],p.prototype,"_evaluatedVisibilityExpression",null),p=e([r("esri.widgets.BatchAttributeForm.inputs.InputBase")],p);const n=p;export{n as default};
|