@agentic-ui-experience/ui-arcgis 0.0.1-beta.1

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.
@@ -0,0 +1 @@
1
+ function _0x578a(_0x3a4b63,_0x413c11){_0x3a4b63=_0x3a4b63-0xe6;const _0x13a1e=_0x13a1();let _0x578af1=_0x13a1e[_0x3a4b63];return _0x578af1;}function _0x13a1(){const _0x352453=['4PselDr','955008ZGTeHW','927zRGGFz','2635362whAxnZ','superRefine','operationOrigins','99128LjyaCM','literal','31211550RTqEqs','stale-controller','2165961ctprxk','hasExternalChanges','optional','size','unsupported-command','record','custom','49kdhltF','195462RRuTyn','A\x20map\x20notification\x20requires\x20an\x20operation\x20origin\x20or\x20an\x20external-change\x20marker.','string','addIssue','5068390xsoqyB','max','min','strict','Map\x20notification\x20operation\x20origins\x20must\x20be\x20unique.','unknown','array','type','object','boolean'];_0x13a1=function(){return _0x352453;};return _0x13a1();}const _0x82106=_0x578a;(function(_0x52afee,_0x3c1197){const _0x639b23=_0x578a,_0x367b55=_0x52afee();while(!![]){try{const _0x213b88=-parseInt(_0x639b23(0xe7))/0x1+parseInt(_0x639b23(0xf8))/0x2+-parseInt(_0x639b23(0xff))/0x3*(parseInt(_0x639b23(0xf5))/0x4)+parseInt(_0x639b23(0xeb))/0x5+parseInt(_0x639b23(0xf6))/0x6*(parseInt(_0x639b23(0xe6))/0x7)+-parseInt(_0x639b23(0xfb))/0x8*(-parseInt(_0x639b23(0xf7))/0x9)+-parseInt(_0x639b23(0xfd))/0xa;if(_0x213b88===_0x3c1197)break;else _0x367b55['push'](_0x367b55['shift']());}catch(_0x3b221d){_0x367b55['push'](_0x367b55['shift']());}}}(_0x13a1,0xa6cc4));import{z}from'zod';const FiniteNumberSchema=z['number']()['finite'](),ArcGISMapCenterSchema=z['object']({'longitude':FiniteNumberSchema['min'](-0xb4)['max'](0xb4),'latitude':FiniteNumberSchema[_0x82106(0xed)](-0x5a)['max'](0x5a)})[_0x82106(0xee)](),ArcGISMapLayerSnapshotSchema=z['object']({'id':z[_0x82106(0xe9)]()['min'](0x1),'title':z['string'](),'type':z[_0x82106(0xe9)](),'visible':z[_0x82106(0xf4)]()})['strict'](),ArcGISMapSnapshotSchema=z['object']({'map':z['object']({'itemId':z['string']()['min'](0x1)[_0x82106(0x101)](),'title':z['string']()['min'](0x1)[_0x82106(0x101)]()})[_0x82106(0xee)](),'viewpoint':z['object']({'center':ArcGISMapCenterSchema,'zoom':FiniteNumberSchema[_0x82106(0xed)](0x0)[_0x82106(0xec)](0x17),'scale':FiniteNumberSchema['positive']()})[_0x82106(0xee)](),'layers':z['array'](ArcGISMapLayerSnapshotSchema),'capabilities':z['object']({'goTo':z['boolean'](),'setLayerVisibility':z[_0x82106(0xf4)]()})['strict']()})[_0x82106(0xee)](),ArcGISGoToCommandSchema=z['object']({'type':z['literal']('goTo'),'target':z['object']({'center':ArcGISMapCenterSchema,'zoom':FiniteNumberSchema[_0x82106(0xed)](0x0)[_0x82106(0xec)](0x17)['optional']()})['strict']()})['strict'](),ArcGISSetLayerVisibilityCommandSchema=z['object']({'type':z['literal']('setLayerVisibility'),'layerId':z[_0x82106(0xe9)]()[_0x82106(0xed)](0x1),'visible':z['boolean']()})['strict'](),ArcGISMapCommandSchema=z['discriminatedUnion'](_0x82106(0xf2),[ArcGISGoToCommandSchema,ArcGISSetLayerVisibilityCommandSchema]),ArcGISMapOperationOriginIdSchema=z[_0x82106(0xe9)]()['trim']()[_0x82106(0xed)](0x1)['max'](0x80),ArcGISMapOperationOriginSchema=z['object']({'transactionId':ArcGISMapOperationOriginIdSchema,'operationId':ArcGISMapOperationOriginIdSchema})[_0x82106(0xee)](),ArcGISMapSnapshotNotificationSchema=z[_0x82106(0xf3)]({'snapshot':ArcGISMapSnapshotSchema,'operationOrigins':z[_0x82106(0xf1)](ArcGISMapOperationOriginSchema)['max'](0x10),'hasExternalChanges':z[_0x82106(0xf4)]()})['strict']()[_0x82106(0xf9)]((_0x15ea06,_0x32ba4c)=>{const _0x53ee3f=_0x82106;_0x15ea06[_0x53ee3f(0xfa)]['length']===0x0&&!_0x15ea06[_0x53ee3f(0x100)]&&_0x32ba4c[_0x53ee3f(0xea)]({'code':_0x53ee3f(0x105),'path':[_0x53ee3f(0xfa)],'message':_0x53ee3f(0xe8)});const _0x223de7=_0x15ea06['operationOrigins']['map'](({transactionId:_0x52d91a,operationId:_0x1b2f47})=>_0x52d91a+'\x00'+_0x1b2f47);new Set(_0x223de7)[_0x53ee3f(0x102)]!==_0x223de7['length']&&_0x32ba4c['addIssue']({'code':'custom','path':[_0x53ee3f(0xfa)],'message':_0x53ee3f(0xef)});}),ArcGISMapCommandErrorCodes=['map-not-ready','layer-not-found','invalid-target',_0x82106(0x103),'execution-failed','cancelled',_0x82106(0xfe)],ArcGISMapCommandErrorCodeSchema=z['enum'](ArcGISMapCommandErrorCodes),ArcGISMapCommandSuccessSchema=z[_0x82106(0xf3)]({'ok':z[_0x82106(0xfc)](!![]),'command':ArcGISMapCommandSchema,'snapshot':ArcGISMapSnapshotSchema})['strict'](),ArcGISMapCommandFailureSchema=z['object']({'ok':z['literal'](![]),'command':z['union']([ArcGISMapCommandSchema,z[_0x82106(0x104)](z[_0x82106(0xf0)]())]),'code':ArcGISMapCommandErrorCodeSchema,'message':z[_0x82106(0xe9)]()[_0x82106(0xed)](0x1),'snapshot':ArcGISMapSnapshotSchema['optional']()})['strict'](),ArcGISMapCommandResultSchema=z['discriminatedUnion']('ok',[ArcGISMapCommandSuccessSchema,ArcGISMapCommandFailureSchema]);export{ArcGISMapCommandErrorCodes,ArcGISMapCommandResultSchema,ArcGISMapCommandSchema,ArcGISMapOperationOriginSchema,ArcGISMapSnapshotNotificationSchema,ArcGISMapSnapshotSchema};
@@ -0,0 +1,16 @@
1
+ import type { ArcgisMap } from "@arcgis/map-components/components/arcgis-map";
2
+ import { type ArcGISMapController } from "./api.js";
3
+ interface WatchHandle {
4
+ remove(): void;
5
+ }
6
+ interface ArcGISMapControllerDependencies {
7
+ watch(getValue: () => unknown, callback: (value: unknown) => void): WatchHandle;
8
+ requestAnimationFrame(callback: FrameRequestCallback): number;
9
+ cancelAnimationFrame(handle: number): void;
10
+ }
11
+ export interface ArcGISMapControllerHandle {
12
+ controller: ArcGISMapController;
13
+ dispose(): void;
14
+ }
15
+ export declare function createArcGISMapController(mapElement: ArcgisMap, dependencies?: ArcGISMapControllerDependencies): Promise<ArcGISMapControllerHandle>;
16
+ export {};
@@ -0,0 +1 @@
1
+ const _0x58c600=_0x23bc;(function(_0x3fbefc,_0x238c5f){const _0x31508b=_0x23bc,_0x245f42=_0x3fbefc();while(!![]){try{const _0x4baf01=parseInt(_0x31508b(0x1f9))/0x1*(-parseInt(_0x31508b(0x208))/0x2)+-parseInt(_0x31508b(0x207))/0x3*(parseInt(_0x31508b(0x1ef))/0x4)+parseInt(_0x31508b(0x1cd))/0x5+parseInt(_0x31508b(0x203))/0x6*(parseInt(_0x31508b(0x1da))/0x7)+-parseInt(_0x31508b(0x20d))/0x8*(parseInt(_0x31508b(0x1e9))/0x9)+-parseInt(_0x31508b(0x1fe))/0xa*(parseInt(_0x31508b(0x1e4))/0xb)+parseInt(_0x31508b(0x1d6))/0xc;if(_0x4baf01===_0x238c5f)break;else _0x245f42['push'](_0x245f42['shift']());}catch(_0xa6335d){_0x245f42['push'](_0x245f42['shift']());}}}(_0x51e4,0xe6f34));import*as _0x2074e3 from'@arcgis/core/core/reactiveUtils.js';import _0x3da698 from'@arcgis/core/layers/support/FeatureFilter.js';import{ArcGISMapSnapshotSchema,ArcGISMapCommandSchema,ArcGISMapOperationOriginSchema,ArcGISMapSnapshotNotificationSchema}from'./api.js';import{createFeatureFilterRuntime}from'./featureFilterRuntime.js';function _0x51e4(){const _0x5f3a5c=['size','13164bNJrWo','before','execution-failed','kind','2309277MNYlmV','8nyypmG','clear','zoom','parse','map-not-ready','88qCysaR','unsupported-command','clearFeatureFilter','latitude','target','longitude','mapReplaced','queryFeatureLayer','ownershipInvalidated','dispose','3560605eBqHHP','ArcGIS\x20map\x20view\x20is\x20not\x20ready.','stringify','goTo','ready','center','interacting','completed','state','45669156TAxKxd','signal','lifecycle','after','1631ukYYeo','retained','abort','cancelAnimationFrame','viewpoint.center','push','\x20was\x20not\x20found.','message','set','removeEventListener','447557KODRuC','remove','describeFeatureLayer','object','title','839250uzurxe','has','visible','number','watch','isArray','4EoBfPV','length','splice','itemId','portalItem','indexOf','viewpoint','operationOrigins','layers','delete','337951UPujgP','success','data','layers.visible','map','230oDnooa','sequence','type','stale-controller'];_0x51e4=function(){return _0x5f3a5c;};return _0x51e4();}function _0x23bc(_0x4bf88f,_0x9259c9){_0x4bf88f=_0x4bf88f-0x1c9;const _0x51e409=_0x51e4();let _0x23bc52=_0x51e409[_0x4bf88f];return _0x23bc52;}import{createFeatureQueryRuntime}from'./featureQueryRuntime.js';const defaultDependencies={'watch':(_0x5b464a,_0x126273)=>_0x2074e3['watch'](_0x5b464a,_0x126273),'requestAnimationFrame':_0xf6baae=>globalThis['requestAnimationFrame'](_0xf6baae),'cancelAnimationFrame':_0x45b91d=>globalThis[_0x58c600(0x1dd)](_0x45b91d)};class MapControllerError extends Error{constructor(_0x418452,_0xc0d584){super(_0xc0d584),this['code']=_0x418452,this['name']='MapControllerError';}}function collectOperationalLayers(_0xac47f7){const _0x430306=_0x58c600,_0xf6a08e=[];for(const _0x321a72 of _0xac47f7){_0xf6a08e['push'](_0x321a72),_0x321a72[_0x430306(0x1f7)]&&_0xf6a08e[_0x430306(0x1df)](...collectOperationalLayers(_0x321a72[_0x430306(0x1f7)]));}return _0xf6a08e;}function readSnapshot(_0x2357e4){const _0x1d15e6=_0x58c600;if(!_0x2357e4[_0x1d15e6(0x1d1)]||!_0x2357e4[_0x1d15e6(0x1fd)]||!_0x2357e4[_0x1d15e6(0x1d2)])throw new MapControllerError(_0x1d15e6(0x20c),_0x1d15e6(0x1ce));const _0x4123e4=_0x2357e4['map'][_0x1d15e6(0x1f3)]?.[_0x1d15e6(0x1e8)],_0x400e4d=collectOperationalLayers(_0x2357e4[_0x1d15e6(0x1fd)][_0x1d15e6(0x1f7)]);return ArcGISMapSnapshotSchema[_0x1d15e6(0x20b)]({'map':{..._0x2357e4['itemId']?{'itemId':_0x2357e4['itemId']}:{},..._0x4123e4?{'title':_0x4123e4}:{}},'viewpoint':{'center':{'longitude':_0x2357e4[_0x1d15e6(0x1d2)][_0x1d15e6(0x212)],'latitude':_0x2357e4[_0x1d15e6(0x1d2)][_0x1d15e6(0x210)]},'zoom':_0x2357e4[_0x1d15e6(0x20a)],'scale':_0x2357e4['scale']},'layers':_0x400e4d[_0x1d15e6(0x1fd)](_0xb09402=>({'id':_0xb09402['id'],'title':_0xb09402['title'],'type':_0xb09402[_0x1d15e6(0x200)],'visible':_0xb09402[_0x1d15e6(0x1eb)]})),'capabilities':{'goTo':!![],'setLayerVisibility':!![]}});}function commandRecord(_0x5f05e8){const _0x5e9832=_0x58c600;if(typeof _0x5f05e8===_0x5e9832(0x1e7)&&_0x5f05e8!==null&&!Array['isArray'](_0x5f05e8))return _0x5f05e8;return{'value':_0x5f05e8};}function failure(_0xe25aa1,_0x261430,_0x5437ef,_0x493b99){let _0x4a6242;try{_0x4a6242=readSnapshot(_0xe25aa1);}catch{_0x4a6242=void 0x0;}return{'ok':![],'command':commandRecord(_0x261430),'code':_0x5437ef,'message':_0x493b99,..._0x4a6242?{'snapshot':_0x4a6242}:{}};}function layerProjection(_0x26ed01){const _0x2efa7b=_0x58c600;return collectOperationalLayers(_0x26ed01['map']?.['layers']??[])['map'](_0x316007=>[_0x316007['id'],_0x316007['title'],_0x316007[_0x2efa7b(0x200)],_0x316007[_0x2efa7b(0x1eb)]]);}function originKey(_0x5f04e4){return _0x5f04e4['transactionId']+'\x00'+_0x5f04e4['operationId'];}function sameSnapshot(_0x188713,_0x5ad2e2){const _0x51b391=_0x58c600;return JSON[_0x51b391(0x1cf)](_0x188713)===JSON['stringify'](_0x5ad2e2);}function matchesNavigationTarget(_0x5a4c10,_0xaeeea0){const _0x5ee162=_0x58c600;return _0x5a4c10['center'][_0x5ee162(0x212)]===_0xaeeea0[_0x5ee162(0x212)]&&_0x5a4c10['center'][_0x5ee162(0x210)]===_0xaeeea0[_0x5ee162(0x210)]&&_0x5a4c10[_0x5ee162(0x20a)]===_0xaeeea0['zoom'];}async function createArcGISMapController(_0x3aa153,_0x16e210=defaultDependencies){const _0x504f25=_0x58c600,_0x2b41ee=_0x3aa153;await _0x2b41ee['viewOnReady']();const _0x2216d8=readSnapshot(_0x2b41ee);let _0x128f5d=![],_0x49f541=null,_0x2423ea=structuredClone(_0x2216d8),_0x2fd551=_0x2b41ee[_0x504f25(0x1fd)],_0x26e9a7=![],_0x4a2aa0=0x0,_0x14a08d=![];const _0x1b6ec7=Symbol('arcgis-map-controller'),_0x5174f9=new Set(),_0x5181b2=[],_0x13120f=createFeatureFilterRuntime({'isReady':()=>Boolean(_0x2b41ee['ready']&&_0x2b41ee['map']&&_0x2b41ee[_0x504f25(0x1d2)]),'isDisposed':()=>_0x128f5d,'resolveLayer':_0x2d81fb=>collectOperationalLayers(_0x2b41ee['map']?.[_0x504f25(0x1f7)]??[])['find'](_0x4e50c3=>_0x4e50c3['id']===_0x2d81fb),'whenLayerView':_0x15e248=>_0x2b41ee['whenLayerView'](_0x15e248),'createFilter':_0x490043=>new _0x3da698(_0x490043)}),_0x13b1e3=createFeatureQueryRuntime({'isReady':()=>Boolean(_0x2b41ee[_0x504f25(0x1d1)]&&_0x2b41ee[_0x504f25(0x1fd)]&&_0x2b41ee[_0x504f25(0x1d2)]),'isDisposed':()=>_0x128f5d,'resolveLayer':_0x9afa43=>collectOperationalLayers(_0x2b41ee[_0x504f25(0x1fd)]?.['layers']??[])['find'](_0x4892fb=>_0x4892fb['id']===_0x9afa43)}),_0x33f126=0x10,_0x5497a1=0x10,_0x3a2cdc=_0x17a22b=>{const _0x3342f3=_0x504f25;if(_0x5181b2[_0x3342f3(0x1f0)]>=_0x33f126)return _0x14a08d=!![],null;return _0x5181b2[_0x3342f3(0x1df)](_0x17a22b),_0x17a22b;},_0x3664d2=_0x48032a=>{const _0x1d3967=_0x504f25;if(!_0x48032a)return;const _0x52ca4c=_0x5181b2[_0x1d3967(0x1f4)](_0x48032a);if(_0x52ca4c>=0x0)_0x5181b2[_0x1d3967(0x1f1)](_0x52ca4c,0x1);},_0x36f7c7=()=>{const _0x1ffe6f=_0x504f25;for(const _0x29e652 of _0x5181b2){_0x29e652[_0x1ffe6f(0x206)]==='navigation'&&_0x29e652['state']==='active'&&(_0x29e652[_0x1ffe6f(0x1cb)]=!![]);}},_0x37b9c1=_0x387adc=>{const _0x2223cc=_0x504f25;if(!Array[_0x2223cc(0x1ee)](_0x387adc)||_0x387adc[_0x2223cc(0x1f0)]!==0x5){_0x36f7c7();return;}const [,_0x2f6561,_0x1b39e6,_0x33b7b0,_0x50fa27]=_0x387adc;if(typeof _0x2f6561!=='number'||typeof _0x1b39e6!==_0x2223cc(0x1ec)||typeof _0x33b7b0!==_0x2223cc(0x1ec)||typeof _0x50fa27!==_0x2223cc(0x1ec)){_0x36f7c7();return;}const _0x45de23={'center':{'longitude':_0x2f6561,'latitude':_0x1b39e6},'zoom':_0x33b7b0,'scale':_0x50fa27};for(const _0x37e9de of _0x5181b2){_0x37e9de['kind']==='navigation'&&_0x37e9de['state']==='active'&&!sameSnapshot(_0x37e9de['before'],_0x45de23)&&!matchesNavigationTarget(_0x45de23,_0x37e9de[_0x2223cc(0x211)])&&(_0x37e9de[_0x2223cc(0x1cb)]=!![]);}},_0x4798f3=()=>{if(_0x49f541===null)return;_0x16e210['cancelAnimationFrame'](_0x49f541),_0x49f541=null;},_0x2e4ab9=()=>{const _0x5d37ba=_0x504f25;if(_0x2b41ee[_0x5d37ba(0x1fd)]===_0x2fd551)return![];return _0x4798f3(),_0x2fd551=_0x2b41ee[_0x5d37ba(0x1fd)],_0x5181b2['length']=0x0,_0x14a08d=![],_0x26e9a7=!![],!![];},_0x27a4b0=_0x29562b=>{const _0x237d99=_0x504f25;_0x4798f3(),_0x5181b2[_0x237d99(0x1f0)]=0x0,_0x14a08d=![],_0x2fd551=_0x2b41ee['map'],_0x26e9a7=![];if(!_0x29562b||_0x128f5d)return;try{_0x2423ea=readSnapshot(_0x2b41ee);}catch{}},_0x2060c8=_0x3f8941=>{const _0x1ffb1d=_0x504f25,_0x3cf519=new Map();let _0x2a22d5=_0x14a08d;const _0x15a424=_0x26e9a7||_0x3f8941['map'][_0x1ffb1d(0x1f2)]!==_0x2423ea[_0x1ffb1d(0x1fd)]['itemId'],_0x9d70c5=structuredClone(_0x2423ea),_0x5eefb0=[];let _0x219a9c=![];const _0x4e976c=_0x41b55f=>{const _0x16cf7d=_0x1ffb1d,_0x38fda9=originKey(_0x41b55f);if(_0x3cf519[_0x16cf7d(0x1ea)](_0x38fda9))return;if(_0x3cf519['size']>=_0x5497a1){_0x2a22d5=!![];return;}_0x3cf519[_0x16cf7d(0x1e2)](_0x38fda9,structuredClone(_0x41b55f));};if(!_0x15a424)for(const _0x12582c of[..._0x5181b2]['sort']((_0x1a0b59,_0x325cbd)=>_0x1a0b59[_0x1ffb1d(0x1ff)]-_0x325cbd['sequence'])){if(_0x12582c[_0x1ffb1d(0x1d8)]!==_0x1b6ec7){_0x2a22d5=!![];continue;}if(_0x12582c[_0x1ffb1d(0x206)]==='visibility'){_0x4e976c(_0x12582c['origin']);const _0x157490=_0x9d70c5['layers']['find'](({id:_0x1c1ad7})=>_0x1c1ad7===_0x12582c['layerId']);if(!_0x157490||_0x157490[_0x1ffb1d(0x1eb)]!==_0x12582c['before']){_0x2a22d5=!![];continue;}_0x157490['visible']=_0x12582c['after'];continue;}!sameSnapshot(_0x9d70c5[_0x1ffb1d(0x1f5)],_0x12582c['before'])&&(_0x2a22d5=!![]);if(_0x12582c[_0x1ffb1d(0x1d5)]==='active'){_0x5eefb0[_0x1ffb1d(0x1df)](_0x12582c);if(sameSnapshot(_0x12582c['before'],_0x3f8941['viewpoint']))continue;if(_0x12582c['ownershipInvalidated']||_0x2b41ee[_0x1ffb1d(0x1d3)]||!matchesNavigationTarget(_0x3f8941[_0x1ffb1d(0x1f5)],_0x12582c['target'])){_0x12582c[_0x1ffb1d(0x1cb)]=!![],_0x2a22d5=!![];continue;}_0x9d70c5[_0x1ffb1d(0x1f5)]=structuredClone(_0x3f8941['viewpoint']),_0x219a9c=!![];}else _0x12582c[_0x1ffb1d(0x1cb)]||_0x2b41ee['interacting']||!_0x12582c['after']||!matchesNavigationTarget(_0x12582c[_0x1ffb1d(0x1d9)],_0x12582c[_0x1ffb1d(0x211)])?_0x2a22d5=!![]:(!sameSnapshot(_0x12582c['before'],_0x12582c['after'])&&_0x4e976c(_0x12582c['origin']),_0x9d70c5['viewpoint']=structuredClone(_0x12582c[_0x1ffb1d(0x1d9)]));}else _0x2a22d5=!![];if(!sameSnapshot(_0x9d70c5,_0x3f8941))_0x2a22d5=!![];return{'hasExternalChanges':_0x2a22d5,'defer':_0x219a9c&&!_0x2a22d5,'mapReplaced':_0x15a424,'operationOrigins':[..._0x3cf519['values']()],'retained':_0x5eefb0};},_0xe949b8=()=>{const _0x1fc33a=_0x504f25;if(_0x128f5d)return;_0x2e4ab9();if(!_0x2b41ee[_0x1fc33a(0x1d1)]||!_0x2b41ee['map']||!_0x2b41ee[_0x1fc33a(0x1d2)])return;const _0x4df08c=readSnapshot(_0x2b41ee),_0x2e72d0=_0x14a08d,_0x41246a=_0x2060c8(_0x4df08c),_0xf81cb0=!sameSnapshot(_0x2423ea,_0x4df08c);if(_0x41246a['defer'])return;if(!_0xf81cb0&&!_0x2e72d0&&_0x41246a['operationOrigins']['length']===0x0&&!_0x41246a['hasExternalChanges']){_0x5181b2['length']=0x0;for(const _0x507bc1 of _0x41246a['retained']){_0x5181b2['push'](_0x507bc1);}return;}_0x2423ea=structuredClone(_0x4df08c),_0x5181b2['length']=0x0,_0x14a08d=![],_0x26e9a7=![];if(!_0x41246a[_0x1fc33a(0x1c9)])for(const _0x5a57c9 of _0x41246a[_0x1fc33a(0x1db)]){_0x5a57c9[_0x1fc33a(0x204)]=structuredClone(_0x4df08c[_0x1fc33a(0x1f5)]),_0x5181b2[_0x1fc33a(0x1df)](_0x5a57c9);}const _0x45f488=ArcGISMapSnapshotNotificationSchema[_0x1fc33a(0x20b)]({'snapshot':_0x4df08c,'operationOrigins':_0x41246a[_0x1fc33a(0x1f6)],'hasExternalChanges':_0x41246a['hasExternalChanges']});for(const _0x1033d5 of _0x5174f9){_0x1033d5(structuredClone(_0x45f488));}},_0xaf5f31=()=>{if(_0x128f5d)return;_0x2e4ab9();if(_0x49f541!==null)return;_0x49f541=_0x16e210['requestAnimationFrame'](()=>{_0x49f541=null,_0xe949b8();});},_0x4e8214=_0x16e210['watch'](()=>[_0x2b41ee['stationary'],_0x2b41ee[_0x504f25(0x1d2)]?.[_0x504f25(0x212)],_0x2b41ee['center']?.['latitude'],_0x2b41ee[_0x504f25(0x20a)],_0x2b41ee['scale']],_0x3f8995=>{_0x37b9c1(_0x3f8995),_0xaf5f31();}),_0x5717c1=_0x16e210[_0x504f25(0x1ed)](()=>layerProjection(_0x2b41ee),_0xaf5f31),_0x336c1d=_0x16e210['watch'](()=>_0x2b41ee[_0x504f25(0x1d3)],()=>{const _0x36613c=_0x504f25;if(_0x2b41ee[_0x36613c(0x1d3)])_0x36f7c7();_0xaf5f31();}),_0x2ef145=_0x16e210['watch'](()=>_0x2b41ee['map'],_0xaf5f31),_0x15e34e={async 'getSnapshot'(){const _0x26770c=_0x2e4ab9(),_0x3c3dfc=readSnapshot(_0x2b41ee);if(_0x26770c)_0xaf5f31();return _0x3c3dfc;},'subscribe'(_0x23a26d){if(_0x128f5d)return()=>void 0x0;_0x5174f9['add'](_0x23a26d);if(_0x2e4ab9())_0xaf5f31();return()=>{const _0x3c6608=_0x23bc;_0x5174f9[_0x3c6608(0x1f8)](_0x23a26d);if(_0x5174f9[_0x3c6608(0x202)]===0x0)_0x27a4b0(!![]);};},async 'execute'(_0x1d31b3,_0x57e34d){const _0x5d0afe=_0x504f25,_0x89c56a=ArcGISMapCommandSchema['safeParse'](_0x1d31b3),_0x2c9abc=_0x57e34d?.['origin']?ArcGISMapOperationOriginSchema['safeParse'](_0x57e34d['origin']):null,_0x4257b8=_0x2c9abc?.[_0x5d0afe(0x1fa)]?_0x2c9abc['data']:null;if(!_0x89c56a['success']){const _0x2e7005=_0x1d31b3?.[_0x5d0afe(0x200)];return failure(_0x2b41ee,_0x1d31b3,_0x2e7005===_0x5d0afe(0x1d0)||_0x2e7005==='setLayerVisibility'?'invalid-target':_0x5d0afe(0x20e),'Map\x20command\x20is\x20not\x20supported\x20or\x20has\x20invalid\x20arguments.');}const _0x498863=_0x2e4ab9();if(!_0x2b41ee[_0x5d0afe(0x1d1)]||!_0x2b41ee['map']||!_0x2b41ee['center'])return failure(_0x2b41ee,_0x89c56a['data'],_0x5d0afe(0x20c),'ArcGIS\x20map\x20view\x20is\x20not\x20ready.');if(_0x498863)_0xaf5f31();const _0x2dbfa4=_0x2fd551,_0x4053ae=()=>_0x128f5d?failure(_0x2b41ee,_0x89c56a['data'],_0x5d0afe(0x201),'Map\x20controller\x20is\x20no\x20longer\x20active.'):_0x57e34d?.['signal']?.['aborted']?failure(_0x2b41ee,_0x89c56a[_0x5d0afe(0x1fb)],'cancelled','Map\x20command\x20was\x20cancelled.'):null,_0x293864=_0x4053ae();if(_0x293864)return _0x293864;try{if(_0x89c56a['data']['type']===_0x5d0afe(0x1d0)){const {longitude:_0x344a38,latitude:_0x4e877c}=_0x89c56a[_0x5d0afe(0x1fb)]['target'][_0x5d0afe(0x1d2)],_0xf348bf=_0x4257b8?_0x3a2cdc({'kind':'navigation','affectedFields':[_0x5d0afe(0x1de),'viewpoint.zoom','viewpoint.scale'],'sequence':++_0x4a2aa0,'origin':structuredClone(_0x4257b8),'lifecycle':_0x1b6ec7,'state':'active','before':structuredClone(readSnapshot(_0x2b41ee)['viewpoint']),'target':{'longitude':_0x344a38,'latitude':_0x4e877c,'zoom':_0x89c56a['data'][_0x5d0afe(0x211)]['zoom']??_0x2b41ee[_0x5d0afe(0x20a)]},'after':null,'ownershipInvalidated':_0x2b41ee[_0x5d0afe(0x1d3)]}):null,_0x2b0810=()=>{const _0x12f6f8=_0x5d0afe;if(!_0xf348bf)return;_0xf348bf[_0x12f6f8(0x1d5)]='aborted',_0x3664d2(_0xf348bf);};_0x57e34d?.['signal']?.['addEventListener'](_0x5d0afe(0x1dc),_0x2b0810,{'once':!![]});let _0x429077=![];try{const _0x16f9ac={'signal':_0x57e34d?.[_0x5d0afe(0x1d7)],..._0x4257b8?{'animate':![]}:{}},_0x57a4c9=_0x2b41ee['goTo']({'center':[_0x344a38,_0x4e877c],..._0x89c56a[_0x5d0afe(0x1fb)][_0x5d0afe(0x211)]['zoom']===void 0x0?{}:{'zoom':_0x89c56a[_0x5d0afe(0x1fb)][_0x5d0afe(0x211)][_0x5d0afe(0x20a)]}},_0x16f9ac);_0xaf5f31(),await _0x57a4c9;const _0x15d78e=_0x2e4ab9();if(_0x15d78e)_0xaf5f31();if(_0x2b41ee['map']!==_0x2dbfa4)return failure(_0x2b41ee,_0x89c56a['data'],'stale-controller','The\x20host\x20map\x20changed\x20during\x20navigation.');const _0x2902ef=_0x4053ae();if(_0x2902ef)return _0x2902ef;_0x429077=!![],_0xf348bf&&(_0xf348bf[_0x5d0afe(0x1d5)]='completed',_0xf348bf['after']=structuredClone(readSnapshot(_0x2b41ee)[_0x5d0afe(0x1f5)])),_0xaf5f31();}finally{_0x57e34d?.['signal']?.[_0x5d0afe(0x1e3)]('abort',_0x2b0810);if(!_0x429077)_0x2b0810();}}else{const {layerId:_0x4c9d33,visible:_0x4fe94e}=_0x89c56a['data'],_0x10c925=collectOperationalLayers(_0x2b41ee['map'][_0x5d0afe(0x1f7)])['find'](_0x185577=>_0x185577['id']===_0x4c9d33);if(!_0x10c925)return failure(_0x2b41ee,_0x89c56a[_0x5d0afe(0x1fb)],'layer-not-found','Layer\x20'+_0x4c9d33+_0x5d0afe(0x1e0));const _0xfa818d=_0x4053ae();if(_0xfa818d)return _0xfa818d;_0x4257b8&&_0x10c925[_0x5d0afe(0x1eb)]!==_0x4fe94e&&_0x3a2cdc({'kind':'visibility','affectedFields':[_0x5d0afe(0x1fc)],'sequence':++_0x4a2aa0,'origin':structuredClone(_0x4257b8),'lifecycle':_0x1b6ec7,'state':_0x5d0afe(0x1d4),'layerId':_0x4c9d33,'before':_0x10c925['visible'],'after':_0x4fe94e}),_0x10c925[_0x5d0afe(0x1eb)]=_0x4fe94e,_0xaf5f31();}const _0x434887=_0x4053ae();if(_0x434887)return _0x434887;return{'ok':!![],'command':_0x89c56a[_0x5d0afe(0x1fb)],'snapshot':readSnapshot(_0x2b41ee)};}catch(_0x5799af){const _0x23210f=_0x4053ae();if(_0x23210f)return _0x23210f;const _0x3cda6b=_0x5799af instanceof MapControllerError?_0x5799af['code']:_0x2b41ee[_0x5d0afe(0x1d1)]?_0x5d0afe(0x205):_0x5d0afe(0x20c);return failure(_0x2b41ee,_0x89c56a[_0x5d0afe(0x1fb)],_0x3cda6b,_0x5799af instanceof Error?_0x5799af[_0x5d0afe(0x1e1)]:String(_0x5799af));}},'describeFeatureLayer'(_0x26b823,_0x2da5c9){const _0x5efec5=_0x504f25;return _0x13120f[_0x5efec5(0x1e6)](_0x26b823,_0x2da5c9);},'validateFeatureFilter'(_0x1108b9,_0x387abf){return _0x13120f['validateFeatureFilter'](_0x1108b9,_0x387abf);},'setFeatureFilter'(_0x524302,_0x44cc0f){return _0x13120f['setFeatureFilter'](_0x524302,_0x44cc0f);},'clearFeatureFilter'(_0x34dbed,_0x4938c7){const _0x4a292e=_0x504f25;return _0x13120f[_0x4a292e(0x20f)](_0x34dbed,_0x4938c7);},'queryFeatureLayer'(_0xe701f6,_0x26f435){const _0x4b12cd=_0x504f25;return _0x13b1e3[_0x4b12cd(0x1ca)](_0xe701f6,_0x26f435);}};return{'controller':_0x15e34e,'dispose'(){const _0x5b1b89=_0x504f25;if(_0x128f5d)return;_0x128f5d=!![],_0x13b1e3[_0x5b1b89(0x1cc)](),_0x13120f['dispose'](),_0x4e8214['remove'](),_0x5717c1['remove'](),_0x336c1d['remove'](),_0x2ef145[_0x5b1b89(0x1e5)](),_0x27a4b0(![]),_0x5174f9[_0x5b1b89(0x209)]();}};}export{createArcGISMapController};
@@ -0,0 +1,425 @@
1
+ import { z } from "zod";
2
+ export declare const ArcGISFeatureFilterOperators: readonly ["eq", "ne", "gt", "gte", "lt", "lte", "between", "in", "contains", "starts_with", "is_null", "is_not_null"];
3
+ export declare const ArcGISFeatureFilterOperatorSchema: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte", "between", "in", "contains", "starts_with", "is_null", "is_not_null"]>;
4
+ export declare function isArcGISFeatureFilterFieldTypeSupported(fieldType: string): boolean;
5
+ export declare const ArcGISFeaturePredicateSchema: z.ZodEffects<z.ZodObject<{
6
+ fieldName: z.ZodString;
7
+ operator: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte", "between", "in", "contains", "starts_with", "is_null", "is_not_null"]>;
8
+ values: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
9
+ }, "strict", z.ZodTypeAny, {
10
+ values: (string | number)[];
11
+ fieldName: string;
12
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
13
+ }, {
14
+ values: (string | number)[];
15
+ fieldName: string;
16
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
17
+ }>, {
18
+ values: (string | number)[];
19
+ fieldName: string;
20
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
21
+ }, {
22
+ values: (string | number)[];
23
+ fieldName: string;
24
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
25
+ }>;
26
+ export declare const ArcGISFeatureFilterRequestSchema: z.ZodObject<{
27
+ layerId: z.ZodString;
28
+ logic: z.ZodEnum<["and", "or"]>;
29
+ predicates: z.ZodArray<z.ZodEffects<z.ZodObject<{
30
+ fieldName: z.ZodString;
31
+ operator: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte", "between", "in", "contains", "starts_with", "is_null", "is_not_null"]>;
32
+ values: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
33
+ }, "strict", z.ZodTypeAny, {
34
+ values: (string | number)[];
35
+ fieldName: string;
36
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
37
+ }, {
38
+ values: (string | number)[];
39
+ fieldName: string;
40
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
41
+ }>, {
42
+ values: (string | number)[];
43
+ fieldName: string;
44
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
45
+ }, {
46
+ values: (string | number)[];
47
+ fieldName: string;
48
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
49
+ }>, "many">;
50
+ }, "strict", z.ZodTypeAny, {
51
+ layerId: string;
52
+ logic: "and" | "or";
53
+ predicates: {
54
+ values: (string | number)[];
55
+ fieldName: string;
56
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
57
+ }[];
58
+ }, {
59
+ layerId: string;
60
+ logic: "and" | "or";
61
+ predicates: {
62
+ values: (string | number)[];
63
+ fieldName: string;
64
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
65
+ }[];
66
+ }>;
67
+ export declare const ArcGISClearFeatureFilterRequestSchema: z.ZodObject<{
68
+ layerId: z.ZodNullable<z.ZodString>;
69
+ }, "strict", z.ZodTypeAny, {
70
+ layerId: string | null;
71
+ }, {
72
+ layerId: string | null;
73
+ }>;
74
+ export type ArcGISFeaturePredicate = z.infer<typeof ArcGISFeaturePredicateSchema>;
75
+ export type ArcGISFeatureFilterRequest = z.infer<typeof ArcGISFeatureFilterRequestSchema>;
76
+ export type ArcGISClearFeatureFilterRequest = z.infer<typeof ArcGISClearFeatureFilterRequestSchema>;
77
+ export declare function isFeaturePredicateValueCountValid(predicate: Pick<ArcGISFeaturePredicate, "operator" | "values">): boolean;
78
+ export declare const ArcGISFeatureFilterErrorCodes: readonly ["map-not-ready", "layer-not-found", "unsupported-layer", "field-not-found", "invalid-predicate", "query-failed", "filter-failed", "cancelled", "stale-controller"];
79
+ export type ArcGISFeatureFilterErrorCode = (typeof ArcGISFeatureFilterErrorCodes)[number];
80
+ export interface ArcGISFeatureOperationOptions {
81
+ signal?: AbortSignal;
82
+ }
83
+ export declare const ArcGISFeatureLayerDescriptionResultSchema: z.ZodDiscriminatedUnion<"ok", [z.ZodObject<{
84
+ ok: z.ZodLiteral<true>;
85
+ operation: z.ZodLiteral<"describeFeatureLayer">;
86
+ layer: z.ZodObject<{
87
+ id: z.ZodString;
88
+ title: z.ZodString;
89
+ fields: z.ZodArray<z.ZodObject<{
90
+ name: z.ZodString;
91
+ alias: z.ZodString;
92
+ type: z.ZodString;
93
+ }, "strict", z.ZodTypeAny, {
94
+ type: string;
95
+ name: string;
96
+ alias: string;
97
+ }, {
98
+ type: string;
99
+ name: string;
100
+ alias: string;
101
+ }>, "many">;
102
+ }, "strict", z.ZodTypeAny, {
103
+ title: string;
104
+ id: string;
105
+ fields: {
106
+ type: string;
107
+ name: string;
108
+ alias: string;
109
+ }[];
110
+ }, {
111
+ title: string;
112
+ id: string;
113
+ fields: {
114
+ type: string;
115
+ name: string;
116
+ alias: string;
117
+ }[];
118
+ }>;
119
+ }, "strict", z.ZodTypeAny, {
120
+ ok: true;
121
+ operation: "describeFeatureLayer";
122
+ layer: {
123
+ title: string;
124
+ id: string;
125
+ fields: {
126
+ type: string;
127
+ name: string;
128
+ alias: string;
129
+ }[];
130
+ };
131
+ }, {
132
+ ok: true;
133
+ operation: "describeFeatureLayer";
134
+ layer: {
135
+ title: string;
136
+ id: string;
137
+ fields: {
138
+ type: string;
139
+ name: string;
140
+ alias: string;
141
+ }[];
142
+ };
143
+ }>, z.ZodObject<{
144
+ ok: z.ZodLiteral<false>;
145
+ operation: z.ZodLiteral<"describeFeatureLayer">;
146
+ layerId: z.ZodString;
147
+ code: z.ZodEnum<["map-not-ready", "layer-not-found", "unsupported-layer", "field-not-found", "invalid-predicate", "query-failed", "filter-failed", "cancelled", "stale-controller"]>;
148
+ message: z.ZodString;
149
+ }, "strict", z.ZodTypeAny, {
150
+ code: "map-not-ready" | "layer-not-found" | "unsupported-layer" | "field-not-found" | "invalid-predicate" | "query-failed" | "filter-failed" | "cancelled" | "stale-controller";
151
+ message: string;
152
+ layerId: string;
153
+ ok: false;
154
+ operation: "describeFeatureLayer";
155
+ }, {
156
+ code: "map-not-ready" | "layer-not-found" | "unsupported-layer" | "field-not-found" | "invalid-predicate" | "query-failed" | "filter-failed" | "cancelled" | "stale-controller";
157
+ message: string;
158
+ layerId: string;
159
+ ok: false;
160
+ operation: "describeFeatureLayer";
161
+ }>]>;
162
+ export declare const ArcGISValidateFeatureFilterResultSchema: z.ZodDiscriminatedUnion<"ok", [z.ZodObject<{
163
+ ok: z.ZodLiteral<true>;
164
+ operation: z.ZodLiteral<"validateFeatureFilter">;
165
+ layer: z.ZodObject<{
166
+ id: z.ZodString;
167
+ title: z.ZodString;
168
+ }, "strict", z.ZodTypeAny, {
169
+ title: string;
170
+ id: string;
171
+ }, {
172
+ title: string;
173
+ id: string;
174
+ }>;
175
+ filter: z.ZodObject<{
176
+ layerId: z.ZodString;
177
+ logic: z.ZodEnum<["and", "or"]>;
178
+ predicates: z.ZodArray<z.ZodEffects<z.ZodObject<{
179
+ fieldName: z.ZodString;
180
+ operator: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte", "between", "in", "contains", "starts_with", "is_null", "is_not_null"]>;
181
+ values: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
182
+ }, "strict", z.ZodTypeAny, {
183
+ values: (string | number)[];
184
+ fieldName: string;
185
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
186
+ }, {
187
+ values: (string | number)[];
188
+ fieldName: string;
189
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
190
+ }>, {
191
+ values: (string | number)[];
192
+ fieldName: string;
193
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
194
+ }, {
195
+ values: (string | number)[];
196
+ fieldName: string;
197
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
198
+ }>, "many">;
199
+ }, "strict", z.ZodTypeAny, {
200
+ layerId: string;
201
+ logic: "and" | "or";
202
+ predicates: {
203
+ values: (string | number)[];
204
+ fieldName: string;
205
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
206
+ }[];
207
+ }, {
208
+ layerId: string;
209
+ logic: "and" | "or";
210
+ predicates: {
211
+ values: (string | number)[];
212
+ fieldName: string;
213
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
214
+ }[];
215
+ }>;
216
+ }, "strict", z.ZodTypeAny, {
217
+ filter: {
218
+ layerId: string;
219
+ logic: "and" | "or";
220
+ predicates: {
221
+ values: (string | number)[];
222
+ fieldName: string;
223
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
224
+ }[];
225
+ };
226
+ ok: true;
227
+ operation: "validateFeatureFilter";
228
+ layer: {
229
+ title: string;
230
+ id: string;
231
+ };
232
+ }, {
233
+ filter: {
234
+ layerId: string;
235
+ logic: "and" | "or";
236
+ predicates: {
237
+ values: (string | number)[];
238
+ fieldName: string;
239
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
240
+ }[];
241
+ };
242
+ ok: true;
243
+ operation: "validateFeatureFilter";
244
+ layer: {
245
+ title: string;
246
+ id: string;
247
+ };
248
+ }>, z.ZodObject<{
249
+ ok: z.ZodLiteral<false>;
250
+ operation: z.ZodLiteral<"validateFeatureFilter">;
251
+ layerId: z.ZodString;
252
+ code: z.ZodEnum<["map-not-ready", "layer-not-found", "unsupported-layer", "field-not-found", "invalid-predicate", "query-failed", "filter-failed", "cancelled", "stale-controller"]>;
253
+ message: z.ZodString;
254
+ }, "strict", z.ZodTypeAny, {
255
+ code: "map-not-ready" | "layer-not-found" | "unsupported-layer" | "field-not-found" | "invalid-predicate" | "query-failed" | "filter-failed" | "cancelled" | "stale-controller";
256
+ message: string;
257
+ layerId: string;
258
+ ok: false;
259
+ operation: "validateFeatureFilter";
260
+ }, {
261
+ code: "map-not-ready" | "layer-not-found" | "unsupported-layer" | "field-not-found" | "invalid-predicate" | "query-failed" | "filter-failed" | "cancelled" | "stale-controller";
262
+ message: string;
263
+ layerId: string;
264
+ ok: false;
265
+ operation: "validateFeatureFilter";
266
+ }>]>;
267
+ export declare const ArcGISSetFeatureFilterResultSchema: z.ZodDiscriminatedUnion<"ok", [z.ZodObject<{
268
+ ok: z.ZodLiteral<true>;
269
+ operation: z.ZodLiteral<"setFeatureFilter">;
270
+ layer: z.ZodObject<{
271
+ id: z.ZodString;
272
+ title: z.ZodString;
273
+ }, "strict", z.ZodTypeAny, {
274
+ title: string;
275
+ id: string;
276
+ }, {
277
+ title: string;
278
+ id: string;
279
+ }>;
280
+ filter: z.ZodObject<{
281
+ layerId: z.ZodString;
282
+ logic: z.ZodEnum<["and", "or"]>;
283
+ predicates: z.ZodArray<z.ZodEffects<z.ZodObject<{
284
+ fieldName: z.ZodString;
285
+ operator: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte", "between", "in", "contains", "starts_with", "is_null", "is_not_null"]>;
286
+ values: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
287
+ }, "strict", z.ZodTypeAny, {
288
+ values: (string | number)[];
289
+ fieldName: string;
290
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
291
+ }, {
292
+ values: (string | number)[];
293
+ fieldName: string;
294
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
295
+ }>, {
296
+ values: (string | number)[];
297
+ fieldName: string;
298
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
299
+ }, {
300
+ values: (string | number)[];
301
+ fieldName: string;
302
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
303
+ }>, "many">;
304
+ }, "strict", z.ZodTypeAny, {
305
+ layerId: string;
306
+ logic: "and" | "or";
307
+ predicates: {
308
+ values: (string | number)[];
309
+ fieldName: string;
310
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
311
+ }[];
312
+ }, {
313
+ layerId: string;
314
+ logic: "and" | "or";
315
+ predicates: {
316
+ values: (string | number)[];
317
+ fieldName: string;
318
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
319
+ }[];
320
+ }>;
321
+ matchedFeatureCount: z.ZodNumber;
322
+ }, "strict", z.ZodTypeAny, {
323
+ filter: {
324
+ layerId: string;
325
+ logic: "and" | "or";
326
+ predicates: {
327
+ values: (string | number)[];
328
+ fieldName: string;
329
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
330
+ }[];
331
+ };
332
+ ok: true;
333
+ operation: "setFeatureFilter";
334
+ layer: {
335
+ title: string;
336
+ id: string;
337
+ };
338
+ matchedFeatureCount: number;
339
+ }, {
340
+ filter: {
341
+ layerId: string;
342
+ logic: "and" | "or";
343
+ predicates: {
344
+ values: (string | number)[];
345
+ fieldName: string;
346
+ operator: "contains" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "starts_with" | "is_null" | "is_not_null";
347
+ }[];
348
+ };
349
+ ok: true;
350
+ operation: "setFeatureFilter";
351
+ layer: {
352
+ title: string;
353
+ id: string;
354
+ };
355
+ matchedFeatureCount: number;
356
+ }>, z.ZodObject<{
357
+ ok: z.ZodLiteral<false>;
358
+ operation: z.ZodLiteral<"setFeatureFilter">;
359
+ layerId: z.ZodString;
360
+ code: z.ZodEnum<["map-not-ready", "layer-not-found", "unsupported-layer", "field-not-found", "invalid-predicate", "query-failed", "filter-failed", "cancelled", "stale-controller"]>;
361
+ message: z.ZodString;
362
+ }, "strict", z.ZodTypeAny, {
363
+ code: "map-not-ready" | "layer-not-found" | "unsupported-layer" | "field-not-found" | "invalid-predicate" | "query-failed" | "filter-failed" | "cancelled" | "stale-controller";
364
+ message: string;
365
+ layerId: string;
366
+ ok: false;
367
+ operation: "setFeatureFilter";
368
+ }, {
369
+ code: "map-not-ready" | "layer-not-found" | "unsupported-layer" | "field-not-found" | "invalid-predicate" | "query-failed" | "filter-failed" | "cancelled" | "stale-controller";
370
+ message: string;
371
+ layerId: string;
372
+ ok: false;
373
+ operation: "setFeatureFilter";
374
+ }>]>;
375
+ export declare const ArcGISClearFeatureFilterResultSchema: z.ZodDiscriminatedUnion<"ok", [z.ZodObject<{
376
+ ok: z.ZodLiteral<true>;
377
+ operation: z.ZodLiteral<"clearFeatureFilter">;
378
+ request: z.ZodObject<{
379
+ layerId: z.ZodNullable<z.ZodString>;
380
+ }, "strict", z.ZodTypeAny, {
381
+ layerId: string | null;
382
+ }, {
383
+ layerId: string | null;
384
+ }>;
385
+ clearedLayerIds: z.ZodArray<z.ZodString, "many">;
386
+ }, "strict", z.ZodTypeAny, {
387
+ ok: true;
388
+ operation: "clearFeatureFilter";
389
+ request: {
390
+ layerId: string | null;
391
+ };
392
+ clearedLayerIds: string[];
393
+ }, {
394
+ ok: true;
395
+ operation: "clearFeatureFilter";
396
+ request: {
397
+ layerId: string | null;
398
+ };
399
+ clearedLayerIds: string[];
400
+ }>, z.ZodObject<{
401
+ ok: z.ZodLiteral<false>;
402
+ operation: z.ZodLiteral<"clearFeatureFilter">;
403
+ layerId: z.ZodNullable<z.ZodString>;
404
+ code: z.ZodEnum<["map-not-ready", "layer-not-found", "unsupported-layer", "field-not-found", "invalid-predicate", "query-failed", "filter-failed", "cancelled", "stale-controller"]>;
405
+ message: z.ZodString;
406
+ clearedLayerIds: z.ZodArray<z.ZodString, "many">;
407
+ }, "strict", z.ZodTypeAny, {
408
+ code: "map-not-ready" | "layer-not-found" | "unsupported-layer" | "field-not-found" | "invalid-predicate" | "query-failed" | "filter-failed" | "cancelled" | "stale-controller";
409
+ message: string;
410
+ layerId: string | null;
411
+ ok: false;
412
+ operation: "clearFeatureFilter";
413
+ clearedLayerIds: string[];
414
+ }, {
415
+ code: "map-not-ready" | "layer-not-found" | "unsupported-layer" | "field-not-found" | "invalid-predicate" | "query-failed" | "filter-failed" | "cancelled" | "stale-controller";
416
+ message: string;
417
+ layerId: string | null;
418
+ ok: false;
419
+ operation: "clearFeatureFilter";
420
+ clearedLayerIds: string[];
421
+ }>]>;
422
+ export type ArcGISFeatureLayerDescriptionResult = z.infer<typeof ArcGISFeatureLayerDescriptionResultSchema>;
423
+ export type ArcGISValidateFeatureFilterResult = z.infer<typeof ArcGISValidateFeatureFilterResultSchema>;
424
+ export type ArcGISSetFeatureFilterResult = z.infer<typeof ArcGISSetFeatureFilterResultSchema>;
425
+ export type ArcGISClearFeatureFilterResult = z.infer<typeof ArcGISClearFeatureFilterResultSchema>;
@@ -0,0 +1 @@
1
+ const _0x46bb58=_0xa9d8;(function(_0x4eff85,_0x5663b5){const _0x51ee60=_0xa9d8,_0x5a8db4=_0x4eff85();while(!![]){try{const _0x3b3249=parseInt(_0x51ee60(0x20a))/0x1+parseInt(_0x51ee60(0x204))/0x2+parseInt(_0x51ee60(0x1f0))/0x3*(parseInt(_0x51ee60(0x1f5))/0x4)+parseInt(_0x51ee60(0x211))/0x5+parseInt(_0x51ee60(0x20b))/0x6+-parseInt(_0x51ee60(0x212))/0x7+-parseInt(_0x51ee60(0x20e))/0x8;if(_0x3b3249===_0x5663b5)break;else _0x5a8db4['push'](_0x5a8db4['shift']());}catch(_0x171f0b){_0x5a8db4['push'](_0x5a8db4['shift']());}}}(_0x1c85,0xbe73f));import{z}from'zod';const ArcGISFeatureFilterOperators=['eq','ne','gt',_0x46bb58(0x1f2),'lt',_0x46bb58(0x215),'between','in','contains','starts_with','is_null',_0x46bb58(0x1ef)],ArcGISFeatureFilterOperatorSchema=z['enum'](ArcGISFeatureFilterOperators),supportedFeatureFilterFieldTypes=new Set([_0x46bb58(0x200),_0x46bb58(0x1f4),'single',_0x46bb58(0x1fe),'long','oid','big-integer',_0x46bb58(0x1fc),'guid','global-id',_0x46bb58(0x1fb),'date-only',_0x46bb58(0x206),_0x46bb58(0x1fa)]);function _0xa9d8(_0x925a0,_0x52bf02){_0x925a0=_0x925a0-0x1ef;const _0x1c8564=_0x1c85();let _0xa9d857=_0x1c8564[_0x925a0];return _0xa9d857;}function isArcGISFeatureFilterFieldTypeSupported(_0x766890){const _0x42f79c=_0x46bb58;return supportedFeatureFilterFieldTypes[_0x42f79c(0x209)](_0x766890);}const FeatureFilterValueSchema=z[_0x46bb58(0x210)]([z[_0x46bb58(0x1fc)]()[_0x46bb58(0x1fd)](0x100),z['number']()['finite']()]),ArcGISFeaturePredicateSchema=z[_0x46bb58(0x214)]({'fieldName':z[_0x46bb58(0x1fc)]()['min'](0x1),'operator':ArcGISFeatureFilterOperatorSchema,'values':z[_0x46bb58(0x207)](FeatureFilterValueSchema)[_0x46bb58(0x1fd)](0x32)})[_0x46bb58(0x1f8)]()[_0x46bb58(0x1f6)]((_0x514959,_0x1cef84)=>{const _0x5eaf80=_0x46bb58;!isFeaturePredicateValueCountValid(_0x514959)&&_0x1cef84[_0x5eaf80(0x20f)]({'code':'custom','path':[_0x5eaf80(0x1ff)],'message':'Operator\x20'+_0x514959['operator']+'\x20received\x20an\x20invalid\x20value\x20count.'});}),ArcGISFeatureFilterRequestSchema=z[_0x46bb58(0x214)]({'layerId':z['string']()[_0x46bb58(0x203)](0x1),'logic':z[_0x46bb58(0x1f9)](['and','or']),'predicates':z[_0x46bb58(0x207)](ArcGISFeaturePredicateSchema)['min'](0x1)['max'](0x8)})[_0x46bb58(0x1f8)](),ArcGISClearFeatureFilterRequestSchema=z[_0x46bb58(0x214)]({'layerId':z[_0x46bb58(0x1fc)]()['min'](0x1)[_0x46bb58(0x208)]()})[_0x46bb58(0x1f8)]();function _0x1c85(){const _0x1a45ee=['strict','enum','timestamp-offset','date','string','max','double','values','small-integer','setFeatureFilter','operator','min','1294054auofmB','clearFeatureFilter','time-only','array','nullable','has','204700uSKCsx','338712sUpGjO','length','describeFeatureLayer','13143120jtnBZg','addIssue','union','7369650yMyCas','7505316hzoLWi','query-failed','object','lte','is_not_null','3Ibyowg','map-not-ready','gte','validateFeatureFilter','integer','4452256aePzol','superRefine','literal'];_0x1c85=function(){return _0x1a45ee;};return _0x1c85();}function isFeaturePredicateValueCountValid(_0x4606bd){const _0x5a6562=_0x46bb58,_0x22426f=_0x4606bd[_0x5a6562(0x202)]==='between'?0x2:_0x4606bd[_0x5a6562(0x202)]==='in'?null:_0x4606bd[_0x5a6562(0x202)]==='is_null'||_0x4606bd['operator']==='is_not_null'?0x0:0x1;return _0x22426f===null?_0x4606bd[_0x5a6562(0x1ff)][_0x5a6562(0x20c)]>=0x1:_0x4606bd[_0x5a6562(0x1ff)]['length']===_0x22426f;}const ArcGISFeatureFilterErrorCodes=[_0x46bb58(0x1f1),'layer-not-found','unsupported-layer','field-not-found','invalid-predicate',_0x46bb58(0x213),'filter-failed','cancelled','stale-controller'],ArcGISFeatureFilterErrorCodeSchema=z['enum'](ArcGISFeatureFilterErrorCodes),ArcGISFeatureFieldDescriptorSchema=z[_0x46bb58(0x214)]({'name':z['string']()['min'](0x1),'alias':z[_0x46bb58(0x1fc)](),'type':z[_0x46bb58(0x1fc)]()[_0x46bb58(0x203)](0x1)})['strict'](),ArcGISFeatureLayerDescriptionResultSchema=z['discriminatedUnion']('ok',[z['object']({'ok':z[_0x46bb58(0x1f7)](!![]),'operation':z['literal']('describeFeatureLayer'),'layer':z[_0x46bb58(0x214)]({'id':z[_0x46bb58(0x1fc)]()['min'](0x1),'title':z['string'](),'fields':z[_0x46bb58(0x207)](ArcGISFeatureFieldDescriptorSchema)})[_0x46bb58(0x1f8)]()})[_0x46bb58(0x1f8)](),z['object']({'ok':z['literal'](![]),'operation':z['literal'](_0x46bb58(0x20d)),'layerId':z[_0x46bb58(0x1fc)]()['min'](0x1),'code':ArcGISFeatureFilterErrorCodeSchema,'message':z[_0x46bb58(0x1fc)]()['min'](0x1)})['strict']()]),ArcGISValidateFeatureFilterResultSchema=z['discriminatedUnion']('ok',[z[_0x46bb58(0x214)]({'ok':z[_0x46bb58(0x1f7)](!![]),'operation':z[_0x46bb58(0x1f7)](_0x46bb58(0x1f3)),'layer':z[_0x46bb58(0x214)]({'id':z['string']()[_0x46bb58(0x203)](0x1),'title':z['string']()})['strict'](),'filter':ArcGISFeatureFilterRequestSchema})['strict'](),z['object']({'ok':z[_0x46bb58(0x1f7)](![]),'operation':z['literal']('validateFeatureFilter'),'layerId':z['string']()[_0x46bb58(0x203)](0x1),'code':ArcGISFeatureFilterErrorCodeSchema,'message':z['string']()['min'](0x1)})['strict']()]),ArcGISSetFeatureFilterResultSchema=z['discriminatedUnion']('ok',[z['object']({'ok':z['literal'](!![]),'operation':z[_0x46bb58(0x1f7)](_0x46bb58(0x201)),'layer':z[_0x46bb58(0x214)]({'id':z['string']()[_0x46bb58(0x203)](0x1),'title':z['string']()})[_0x46bb58(0x1f8)](),'filter':ArcGISFeatureFilterRequestSchema,'matchedFeatureCount':z['number']()['int']()['nonnegative']()})[_0x46bb58(0x1f8)](),z[_0x46bb58(0x214)]({'ok':z['literal'](![]),'operation':z['literal']('setFeatureFilter'),'layerId':z[_0x46bb58(0x1fc)]()['min'](0x1),'code':ArcGISFeatureFilterErrorCodeSchema,'message':z[_0x46bb58(0x1fc)]()['min'](0x1)})[_0x46bb58(0x1f8)]()]),ArcGISClearFeatureFilterResultSchema=z['discriminatedUnion']('ok',[z['object']({'ok':z['literal'](!![]),'operation':z[_0x46bb58(0x1f7)](_0x46bb58(0x205)),'request':ArcGISClearFeatureFilterRequestSchema,'clearedLayerIds':z['array'](z['string']()[_0x46bb58(0x203)](0x1))})[_0x46bb58(0x1f8)](),z[_0x46bb58(0x214)]({'ok':z[_0x46bb58(0x1f7)](![]),'operation':z[_0x46bb58(0x1f7)](_0x46bb58(0x205)),'layerId':z['string']()['min'](0x1)['nullable'](),'code':ArcGISFeatureFilterErrorCodeSchema,'message':z[_0x46bb58(0x1fc)]()[_0x46bb58(0x203)](0x1),'clearedLayerIds':z['array'](z[_0x46bb58(0x1fc)]()[_0x46bb58(0x203)](0x1))})[_0x46bb58(0x1f8)]()]);export{ArcGISClearFeatureFilterRequestSchema,ArcGISClearFeatureFilterResultSchema,ArcGISFeatureFilterErrorCodes,ArcGISFeatureFilterOperatorSchema,ArcGISFeatureFilterOperators,ArcGISFeatureFilterRequestSchema,ArcGISFeatureLayerDescriptionResultSchema,ArcGISFeaturePredicateSchema,ArcGISSetFeatureFilterResultSchema,ArcGISValidateFeatureFilterResultSchema,isArcGISFeatureFilterFieldTypeSupported,isFeaturePredicateValueCountValid};
@@ -0,0 +1,16 @@
1
+ import { type ArcGISFeatureFilterRequest, type ArcGISFeaturePredicate } from "./featureFilter.js";
2
+ export interface FeatureFilterFieldMetadata {
3
+ name: string;
4
+ alias: string;
5
+ type: string;
6
+ timeZone: string | null;
7
+ }
8
+ export declare class FeatureFilterExpressionError extends Error {
9
+ constructor(message: string);
10
+ }
11
+ export interface CompiledFeatureFilterExpression {
12
+ request: ArcGISFeatureFilterRequest;
13
+ where: string;
14
+ }
15
+ export declare function compileFeaturePredicateWhere(logic: "and" | "or", predicates: readonly ArcGISFeaturePredicate[], fields: readonly FeatureFilterFieldMetadata[]): string;
16
+ export declare function compileFeatureFilterExpression(request: ArcGISFeatureFilterRequest, fields: readonly FeatureFilterFieldMetadata[]): CompiledFeatureFilterExpression;
@@ -0,0 +1 @@
1
+ const _0x5be487=_0x3db8;(function(_0x3807f0,_0x381d76){const _0x5c94d7=_0x3db8,_0x267ce6=_0x3807f0();while(!![]){try{const _0x42217d=-parseInt(_0x5c94d7(0x1c6))/0x1+-parseInt(_0x5c94d7(0x1c7))/0x2*(-parseInt(_0x5c94d7(0x1f2))/0x3)+-parseInt(_0x5c94d7(0x1c1))/0x4+parseInt(_0x5c94d7(0x1f9))/0x5*(parseInt(_0x5c94d7(0x1d7))/0x6)+parseInt(_0x5c94d7(0x1ca))/0x7*(parseInt(_0x5c94d7(0x1ce))/0x8)+parseInt(_0x5c94d7(0x1e0))/0x9*(parseInt(_0x5c94d7(0x1d9))/0xa)+-parseInt(_0x5c94d7(0x1e4))/0xb*(-parseInt(_0x5c94d7(0x208))/0xc);if(_0x42217d===_0x381d76)break;else _0x267ce6['push'](_0x267ce6['shift']());}catch(_0x558544){_0x267ce6['push'](_0x267ce6['shift']());}}}(_0x466d,0xac0fd));import{sqlName}from'@arcgis/core/core/sql.js';import{ArcGISFeatureFilterRequestSchema,isArcGISFeatureFilterFieldTypeSupported}from'./featureFilter.js';class FeatureFilterExpressionError extends Error{constructor(_0x22b9a1){const _0x121baf=_0x3db8;super(_0x22b9a1),this[_0x121baf(0x1d1)]=_0x121baf(0x1cb);}}function compileFeaturePredicateWhere(_0x28811b,_0x28e23c,_0x43214b){const _0x39e7bc=_0x3db8,_0x5798a1=new Map(),_0x2738b5=_0x28e23c[_0x39e7bc(0x1e6)](_0x58e667=>compilePredicate(_0x58e667,_0x43214b,_0x5798a1));if(_0x2738b5[_0x39e7bc(0x1c0)]===0x0)return'1=1';return _0x2738b5[_0x39e7bc(0x1c0)]===0x1?_0x2738b5[0x0]:_0x2738b5[_0x39e7bc(0x1e6)](_0x300bc5=>'('+_0x300bc5+')')[_0x39e7bc(0x206)]('\x20'+_0x28811b['toUpperCase']()+'\x20');}const numericTypes=new Set(['small-integer','integer',_0x5be487(0x20c),_0x5be487(0x1de),'long',_0x5be487(0x1e3),_0x5be487(0x20a)]),integerTypes=new Set(['small-integer',_0x5be487(0x209),_0x5be487(0x1f5),_0x5be487(0x1e3),'big-integer']),dateTypes=new Set(['date',_0x5be487(0x1e1),_0x5be487(0x1eb),'timestamp-offset']),identifierTypes=new Set(['guid','global-id']),comparisonOperators=new Set(['eq','ne','gt',_0x5be487(0x1e5),'lt','lte']);function quoteString(_0xd6d095){const _0x5347f7=_0x5be487;return'\x27'+_0xd6d095['split']('\x27')[_0x5347f7(0x206)]('\x27\x27')+'\x27';}function quoteLike(_0x3b16b7,_0x1104b0){const _0x4fb8d6=_0x5be487,_0x48de6f=_0x3b16b7[_0x4fb8d6(0x1db)]('\x5c')['join']('\x5c\x5c')['split']('%')[_0x4fb8d6(0x206)]('\x5c%')[_0x4fb8d6(0x1db)]('_')['join']('\x5c_')[_0x4fb8d6(0x1db)]('\x27')['join']('\x27\x27'),_0x574844=_0x1104b0==='contains'?'%'+_0x48de6f+'%':_0x48de6f+'%';return'\x27'+_0x574844+'\x27';}function comparisonSymbol(_0x128d98){const _0x84a309=_0x5be487,_0x40f303={'eq':'=','ne':'<>','gt':'>','gte':'>=','lt':'<','lte':'<='},_0x59390c=_0x40f303[_0x128d98];if(!_0x59390c)throw new FeatureFilterExpressionError('Operator\x20'+_0x128d98+_0x84a309(0x1f1));return _0x59390c;}function isValidCalendarDate(_0x5bc52b,_0x4fe09e,_0x35d4ff){if(_0x4fe09e<0x1||_0x4fe09e>0xc||_0x35d4ff<0x1)return![];const _0x298f22=_0x5bc52b%0x4===0x0&&(_0x5bc52b%0x64!==0x0||_0x5bc52b%0x190===0x0),_0x579932=[0x1f,_0x298f22?0x1d:0x1c,0x1f,0x1e,0x1f,0x1e,0x1f,0x1f,0x1e,0x1f,0x1e,0x1f];return _0x35d4ff<=(_0x579932[_0x4fe09e-0x1]??0x0);}function _0x3db8(_0x1baebb,_0x4a8374){_0x1baebb=_0x1baebb-0x1c0;const _0x466dc6=_0x466d();let _0x3db88d=_0x466dc6[_0x1baebb];return _0x3db88d;}function validateDateParts(_0x11443f,_0x41d1b6,_0x2e8dc8,_0xe2919a){const _0x2e3d4e=_0x5be487;if(Number(_0x11443f)===0x0)throw new FeatureFilterExpressionError('Invalid\x20date\x20value\x20'+_0xe2919a+_0x2e3d4e(0x1fc));if(!isValidCalendarDate(Number(_0x11443f),Number(_0x41d1b6),Number(_0x2e8dc8)))throw new FeatureFilterExpressionError(_0x2e3d4e(0x205)+_0xe2919a+'.');}function validateTimeParts(_0x28c034,_0x935daf,_0x4ffb71,_0x50f150){const _0x37ebdf=_0x5be487;if(Number(_0x28c034)>0x17||Number(_0x935daf)>0x3b||Number(_0x4ffb71)>0x3b)throw new FeatureFilterExpressionError(_0x37ebdf(0x1d5)+_0x50f150+'.');}function dateOnlyLiteral(_0x4b4482){const _0xa5980c=_0x5be487,_0x203a85=/^(\d{4})-(\d{2})-(\d{2})$/['exec'](_0x4b4482);if(!_0x203a85)throw new FeatureFilterExpressionError(_0xa5980c(0x1f7)+_0x4b4482+_0xa5980c(0x1ec));return validateDateParts(_0x203a85[0x1],_0x203a85[0x2],_0x203a85[0x3],_0x4b4482),_0xa5980c(0x1ed)+_0x4b4482+'\x27';}function timeOnlyLiteral(_0x524461){const _0x329ad3=_0x5be487,_0x3e35b1=/^(\d{2}):(\d{2}):(\d{2})$/['exec'](_0x524461);if(!_0x3e35b1)throw new FeatureFilterExpressionError('Time-only\x20value\x20'+_0x524461+'\x20must\x20use\x20HH:MM:SS.');return validateTimeParts(_0x3e35b1[0x1],_0x3e35b1[0x2],_0x3e35b1[0x3],_0x524461),_0x329ad3(0x1df)+_0x524461+'\x27';}function timestampOffsetLiteral(_0x33b311){const _0x332638=_0x5be487,_0x2f245f=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})([+-])(\d{2}):(\d{2})$/[_0x332638(0x1c8)](_0x33b311);if(!_0x2f245f)throw new FeatureFilterExpressionError(_0x332638(0x1da)+_0x33b311+_0x332638(0x1c3));validateDateParts(_0x2f245f[0x1],_0x2f245f[0x2],_0x2f245f[0x3],_0x33b311),validateTimeParts(_0x2f245f[0x4],_0x2f245f[0x5],_0x2f245f[0x6],_0x33b311);if(Number(_0x2f245f[0x8])>0x17||Number(_0x2f245f[0x9])>0x3b)throw new FeatureFilterExpressionError(_0x332638(0x1da)+_0x33b311+_0x332638(0x1c2));return _0x332638(0x1e7)+_0x2f245f[0x1]+'-'+_0x2f245f[0x2]+'-'+_0x2f245f[0x3]+'\x20'+_0x2f245f[0x4]+':'+_0x2f245f[0x5]+':'+_0x2f245f[0x6]+'\x20'+_0x2f245f[0x7]+_0x2f245f[0x8]+':'+_0x2f245f[0x9]+'\x27';}function formatInstantInTimeZone(_0x573f5a,_0x3a218f){const _0x2679be=_0x5be487;let _0x5284c4;try{_0x5284c4=new Intl['DateTimeFormat'](_0x2679be(0x1dd),{'timeZone':_0x3a218f,'era':'short','year':'numeric','month':_0x2679be(0x1f6),'day':_0x2679be(0x1f6),'hour':_0x2679be(0x1f6),'minute':'2-digit','second':'2-digit','hourCycle':'h23'})['formatToParts'](_0x573f5a);}catch{throw new FeatureFilterExpressionError('Field\x20timezone\x20'+_0x3a218f+_0x2679be(0x1e2));}const _0x4daada=new Map(_0x5284c4['map'](_0x28b513=>[_0x28b513[_0x2679be(0x1fe)],_0x28b513['value']])),_0x15fa32=_0x4daada['get']('year'),_0x5b65ca=Number(_0x15fa32);if(_0x4daada['get'](_0x2679be(0x1fd))!=='AD'||!Number[_0x2679be(0x204)](_0x5b65ca)||_0x5b65ca<0x1||_0x5b65ca>0x270f)throw new FeatureFilterExpressionError('Converted\x20date\x20is\x20outside\x20the\x20supported\x20year\x20range\x200001-9999.');const _0x21e8c1=_0x15fa32['padStart'](0x4,'0');return _0x21e8c1+'-'+_0x4daada['get']('month')+'-'+_0x4daada[_0x2679be(0x1f0)](_0x2679be(0x1d8))+'\x20'+_0x4daada['get']('hour')+':'+_0x4daada[_0x2679be(0x1f0)](_0x2679be(0x1f8))+':'+_0x4daada['get'](_0x2679be(0x1dc));}function dateLiteral(_0x335316,_0x390f96){const _0x22fb89=_0x5be487,_0x17bd7c=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+(?:Z|[+-]\d{2}:\d{2})$/['test'](_0x335316);if(_0x17bd7c)throw new FeatureFilterExpressionError('Date\x20value\x20'+_0x335316+'\x20must\x20not\x20include\x20fractional\x20seconds.');const _0x3a8990=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(Z|[+-](\d{2}):(\d{2}))$/['exec'](_0x335316);if(!_0x3a8990)throw new FeatureFilterExpressionError(_0x22fb89(0x1cf)+_0x335316+'\x20must\x20be\x20an\x20ISO\x20instant\x20with\x20Z\x20or\x20an\x20explicit\x20offset.');validateDateParts(_0x3a8990[0x1],_0x3a8990[0x2],_0x3a8990[0x3],_0x335316),validateTimeParts(_0x3a8990[0x4],_0x3a8990[0x5],_0x3a8990[0x6],_0x335316);if(_0x3a8990[0x8]&&(Number(_0x3a8990[0x8])>0x17||Number(_0x3a8990[0x9])>0x3b))throw new FeatureFilterExpressionError('Date\x20value\x20'+_0x335316+'\x20has\x20an\x20invalid\x20timezone\x20offset.');if(_0x390f96==='unknown')throw new FeatureFilterExpressionError('Date\x20field\x20timezone\x20unknown\x20cannot\x20be\x20used\x20for\x20filtering.');const _0x3d56dc=new Date(_0x335316);if(Number['isNaN'](_0x3d56dc['getTime']()))throw new FeatureFilterExpressionError('Invalid\x20date\x20value\x20'+_0x335316+'.');const _0x3aa318=formatInstantInTimeZone(_0x3d56dc,_0x390f96??'UTC');return _0x22fb89(0x1e7)+_0x3aa318+'\x27';}function dateValue(_0x54676e,_0x56529c){const _0x2dfc76=_0x5be487;switch(_0x54676e['type']){case _0x2dfc76(0x1e1):return dateOnlyLiteral(_0x56529c);case'time-only':return timeOnlyLiteral(_0x56529c);case'timestamp-offset':return timestampOffsetLiteral(_0x56529c);case _0x2dfc76(0x1fb):return dateLiteral(_0x56529c,_0x54676e[_0x2dfc76(0x1f4)]);default:throw new FeatureFilterExpressionError(_0x2dfc76(0x1c9)+_0x54676e[_0x2dfc76(0x1d1)]+_0x2dfc76(0x1d3));}}function fieldCategory(_0x1ee945){const _0x22b090=_0x5be487;if(!isArcGISFeatureFilterFieldTypeSupported(_0x1ee945[_0x22b090(0x1fe)]))throw new FeatureFilterExpressionError(_0x22b090(0x1c9)+_0x1ee945[_0x22b090(0x1d1)]+'\x20has\x20unsupported\x20field\x20type\x20'+_0x1ee945['type']+'.');if(numericTypes[_0x22b090(0x1c4)](_0x1ee945[_0x22b090(0x1fe)]))return'numeric';if(_0x1ee945[_0x22b090(0x1fe)]===_0x22b090(0x203))return'string';if(identifierTypes['has'](_0x1ee945['type']))return _0x22b090(0x1d0);if(dateTypes[_0x22b090(0x1c4)](_0x1ee945['type']))return'date';throw new FeatureFilterExpressionError('Field\x20'+_0x1ee945['name']+'\x20is\x20unsupported.');}function literalValue(_0x35ac37,_0x1ed83b,_0x1dbe40){const _0x4466fe=_0x5be487;if(_0x1ed83b==='numeric'){if(typeof _0x1dbe40!==_0x4466fe(0x1c5))throw new FeatureFilterExpressionError(_0x4466fe(0x1c9)+_0x35ac37[_0x4466fe(0x1d1)]+'\x20requires\x20a\x20numeric\x20value.');if(integerTypes[_0x4466fe(0x1c4)](_0x35ac37['type'])&&!Number['isSafeInteger'](_0x1dbe40))throw new FeatureFilterExpressionError(_0x4466fe(0x1c9)+_0x35ac37['name']+'\x20requires\x20a\x20safe\x20integer\x20value.');return String(_0x1dbe40);}if(typeof _0x1dbe40!=='string')throw new FeatureFilterExpressionError(_0x4466fe(0x1c9)+_0x35ac37['name']+'\x20requires\x20a\x20string\x20value.');return _0x1ed83b==='date'?dateValue(_0x35ac37,_0x1dbe40):quoteString(_0x1dbe40);}function assertOperatorSupported(_0x38b0da,_0x897858,_0x478e3f){const _0x32d9c3=_0x5be487,_0x43b4a6=_0x478e3f===_0x32d9c3(0x1d4)||_0x478e3f===_0x32d9c3(0x1cc)||comparisonOperators[_0x32d9c3(0x1c4)](_0x478e3f)&&(_0x897858==='numeric'||_0x897858==='date'||_0x478e3f==='eq'||_0x478e3f==='ne')||_0x478e3f==='between'&&(_0x897858===_0x32d9c3(0x1cd)||_0x897858===_0x32d9c3(0x1fb))||_0x478e3f==='in'&&_0x897858!=='date'||(_0x478e3f===_0x32d9c3(0x1ea)||_0x478e3f==='starts_with')&&_0x897858===_0x32d9c3(0x203);if(!_0x43b4a6)throw new FeatureFilterExpressionError(_0x32d9c3(0x1ff)+_0x478e3f+'\x20is\x20not\x20supported\x20for\x20field\x20'+_0x38b0da['name']+'.');}function compilePredicate(_0x52dae2,_0x5778f5,_0x25d5c3){const _0x586297=_0x5be487,_0x5a8f87=_0x5778f5['find'](_0x11204d=>_0x11204d['name']===_0x52dae2[_0x586297(0x207)]);if(!_0x5a8f87)throw new FeatureFilterExpressionError(_0x586297(0x1c9)+_0x52dae2[_0x586297(0x207)]+'\x20was\x20not\x20found.');const _0x4a3ca3=fieldCategory(_0x5a8f87);assertOperatorSupported(_0x5a8f87,_0x4a3ca3,_0x52dae2['operator']);let _0x2b7853=_0x25d5c3['get'](_0x5a8f87[_0x586297(0x1d1)]);_0x2b7853===void 0x0&&(_0x2b7853=sqlName(_0x5a8f87['name']),_0x25d5c3['set'](_0x5a8f87['name'],_0x2b7853));if(_0x52dae2[_0x586297(0x1d2)]==='is_null')return _0x2b7853+'\x20IS\x20NULL';if(_0x52dae2['operator']===_0x586297(0x1cc))return _0x2b7853+_0x586297(0x200);if(_0x52dae2['operator']===_0x586297(0x1ea)||_0x52dae2['operator']==='starts_with'){const _0x528424=_0x52dae2['values'][0x0];if(typeof _0x528424!==_0x586297(0x203))throw new FeatureFilterExpressionError(_0x586297(0x1ff)+_0x52dae2[_0x586297(0x1d2)]+_0x586297(0x1ee));return _0x2b7853+_0x586297(0x1e9)+quoteLike(_0x528424,_0x52dae2['operator'])+'\x20ESCAPE\x20\x27\x5c\x27';}const _0x3a2eb3=_0x52dae2['values']['map'](_0x594708=>literalValue(_0x5a8f87,_0x4a3ca3,_0x594708));if(_0x52dae2['operator']==='between')return _0x2b7853+_0x586297(0x1fa)+_0x3a2eb3[0x0]+_0x586297(0x1ef)+_0x3a2eb3[0x1];if(_0x52dae2['operator']==='in')return _0x2b7853+_0x586297(0x202)+_0x3a2eb3[_0x586297(0x206)](',\x20')+')';return _0x2b7853+'\x20'+comparisonSymbol(_0x52dae2[_0x586297(0x1d2)])+'\x20'+_0x3a2eb3[0x0];}function compileFeatureFilterExpression(_0x172577,_0x48b699){const _0x572e0e=_0x5be487,_0x4bb5e7=ArcGISFeatureFilterRequestSchema[_0x572e0e(0x201)](_0x172577);if(!_0x4bb5e7[_0x572e0e(0x20b)])throw new FeatureFilterExpressionError(_0x572e0e(0x1e8)+(_0x4bb5e7['error']['issues'][0x0]?.['message']??_0x572e0e(0x1f3)));return{'request':_0x4bb5e7[_0x572e0e(0x1d6)],'where':compileFeaturePredicateWhere(_0x4bb5e7[_0x572e0e(0x1d6)]['logic'],_0x4bb5e7['data']['predicates'],_0x48b699)};}function _0x466d(){const _0x1c5f30=['TIMESTAMP\x20\x27','Invalid\x20feature\x20filter\x20request:\x20','\x20LIKE\x20','contains','time-only','\x20must\x20use\x20YYYY-MM-DD.','DATE\x20\x27','\x20requires\x20a\x20string\x20value.','\x20AND\x20','get','\x20is\x20not\x20a\x20comparison\x20operator.','96HDajTf','unknown\x20validation\x20error','timeZone','long','2-digit','Date-only\x20value\x20','minute','15EofiUP','\x20BETWEEN\x20','date',':\x20year\x200000\x20is\x20not\x20supported.','era','type','Operator\x20','\x20IS\x20NOT\x20NULL','safeParse','\x20IN\x20(','string','isInteger','Invalid\x20date\x20value\x20','join','fieldName','228NTfrst','integer','big-integer','success','single','length','5047712osNWNb','\x20has\x20an\x20invalid\x20timezone\x20offset.','\x20must\x20include\x20an\x20explicit\x20offset.','has','number','833647gVwNrM','68062tVdFMb','exec','Field\x20','42tbofpr','FeatureFilterExpressionError','is_not_null','numeric','954312StEsGN','Date\x20value\x20','identifier','name','operator','\x20is\x20not\x20a\x20date\x20field.','is_null','Invalid\x20time\x20value\x20','data','483006fMNOYU','day','220ptFWZG','Timestamp-offset\x20value\x20','split','second','en-US','double','TIME\x20\x27','7983isYgYS','date-only','\x20is\x20invalid.','oid','425293fquYlB','gte','map'];_0x466d=function(){return _0x1c5f30;};return _0x466d();}export{FeatureFilterExpressionError,compileFeatureFilterExpression,compileFeaturePredicateWhere};
@@ -0,0 +1,19 @@
1
+ import type FeatureLayer from "@arcgis/core/layers/FeatureLayer.js";
2
+ import FeatureFilter, { type FeatureFilterProperties } from "@arcgis/core/layers/support/FeatureFilter.js";
3
+ import type FeatureLayerView from "@arcgis/core/views/layers/FeatureLayerView.js";
4
+ import type { ArcGISMapController } from "./api.js";
5
+ export interface FeatureFilterRuntime {
6
+ describeFeatureLayer: ArcGISMapController["describeFeatureLayer"];
7
+ validateFeatureFilter: ArcGISMapController["validateFeatureFilter"];
8
+ setFeatureFilter: ArcGISMapController["setFeatureFilter"];
9
+ clearFeatureFilter: ArcGISMapController["clearFeatureFilter"];
10
+ dispose(): void;
11
+ }
12
+ export interface FeatureFilterRuntimeDependencies {
13
+ isReady(): boolean;
14
+ isDisposed(): boolean;
15
+ resolveLayer(layerId: string): FeatureLayer | undefined;
16
+ whenLayerView(layer: FeatureLayer): Promise<FeatureLayerView>;
17
+ createFilter(properties: FeatureFilterProperties): FeatureFilter;
18
+ }
19
+ export declare function createFeatureFilterRuntime(dependencies: FeatureFilterRuntimeDependencies): FeatureFilterRuntime;