1import { UnavailabilityError } from 'expo-modules-core'; 2import ExpoFaceDetector from './ExpoFaceDetector'; 3// @docsMissing 4export var FaceDetectorMode; 5(function (FaceDetectorMode) { 6 FaceDetectorMode[FaceDetectorMode["fast"] = 1] = "fast"; 7 FaceDetectorMode[FaceDetectorMode["accurate"] = 2] = "accurate"; 8})(FaceDetectorMode || (FaceDetectorMode = {})); 9// @docsMissing 10export var FaceDetectorLandmarks; 11(function (FaceDetectorLandmarks) { 12 FaceDetectorLandmarks[FaceDetectorLandmarks["none"] = 1] = "none"; 13 FaceDetectorLandmarks[FaceDetectorLandmarks["all"] = 2] = "all"; 14})(FaceDetectorLandmarks || (FaceDetectorLandmarks = {})); 15// @docsMissing 16export var FaceDetectorClassifications; 17(function (FaceDetectorClassifications) { 18 FaceDetectorClassifications[FaceDetectorClassifications["none"] = 1] = "none"; 19 FaceDetectorClassifications[FaceDetectorClassifications["all"] = 2] = "all"; 20})(FaceDetectorClassifications || (FaceDetectorClassifications = {})); 21// @needsAudit 22/** 23 * Detect faces on a picture. 24 * @param uri `file://` URI to the image. 25 * @param options A map of detection options. 26 * @return Returns a Promise which fulfils with [`DetectionResult`](#detectionresult) object. 27 */ 28export async function detectFacesAsync(uri, options = {}) { 29 if (!ExpoFaceDetector || !ExpoFaceDetector.detectFaces) { 30 if (global.expo?.modules?.ExponentConstants?.appOwnership === 'expo') { 31 console.warn([ 32 "ExpoFaceDetector has been removed from Expo Go. To use this functionality, you'll have to create a development build or prebuild using npx expo run:android|ios commands.", 33 'Learn more: https://expo.fyi/face-detector-removed', 34 'Learn more about development builds: https://docs.expo.dev/develop/development-builds/create-a-build/', 35 'Learn more about prebuild: https://docs.expo.dev/workflow/prebuild/', 36 ].join('\n\n')); 37 } 38 throw new UnavailabilityError('expo-face-detector', 'detectFaces'); 39 } 40 return await ExpoFaceDetector.detectFaces({ ...options, uri }); 41} 42//# sourceMappingURL=FaceDetector.js.map