license import { Marker } from '../../../defs/marker.js' ; import { Barcode } from '../schema/core-schema-org.js' ; import { ARArtifact } from '../schema/extension-ar-artifacts.js' ; import { PerceptionResult } from './artifact-store.js' ; export class LocalMarkerStore { private readonly markers = new Map < string , PerceptionResult > ( ) ; addMarker ( artifact , barcode ) { if ( ! barcode . text ) { return false ; } this . markers . set ( barcode . text , { target : barcode , artifact } ) ; return true ; } findRelevantArtifacts ( markers ) { const ret = [ ] ; for ( const marker of markers ) { const nearbyResult = this . markers . get ( marker . value ) ; if ( nearbyResult ) { ret . push ( nearbyResult ) ; } } return ret ; } }