facebetter 1.5.1 → 2.0.0
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/README.md +90 -27
- package/dist/facebetter.esm.js +886 -566
- package/dist/facebetter.esm.js.map +1 -1
- package/dist/facebetter.js +905 -571
- package/dist/facebetter.js.map +1 -1
- package/package.json +8 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facebetter.esm.js","sources":["../src/core/errors.js","../src/core/config.js","../src/core/constants.js","../src/core/logging.js","../src/core/engine.js","../src/browser/image-utils.js","../src/esm/index.js"],"sourcesContent":["/**\n * Facebetter Error Classes\n * Platform-agnostic error handling\n */\n\n/**\n * Facebetter error class\n */\nexport class FacebetterError extends Error {\n constructor(message, code = -1) {\n super(message);\n this.name = 'FacebetterError';\n this.code = code;\n }\n}\n\n/**\n * Checks if a result code indicates success\n * @param {number} result - Result code from WASM function\n * @throws {FacebetterError} If result indicates failure\n */\nexport function checkResult(result, errorMessage = 'Operation failed') {\n if (result !== 0) {\n throw new FacebetterError(`${errorMessage} (error code: ${result})`, result);\n }\n}\n\n","/**\n * Engine Configuration\n * Platform-agnostic configuration class\n */\n\nimport { FacebetterError } from './errors.js';\n\n/**\n * Engine configuration class\n * Similar to EngineConfig struct in C++/Java/OC\n */\nexport class EngineConfig {\n /**\n * Creates a new EngineConfig instance\n * @param {Object} config - Configuration object\n * @param {string} [config.appId] - Application ID (required if licenseJson is not provided)\n * @param {string} [config.appKey] - Application key (required if licenseJson is not provided)\n * @param {string} [config.licenseJson] - License JSON string (optional, if provided, appId and appKey are not required)\n */\n constructor(config = {}) {\n this.appId = config.appId || null;\n this.appKey = config.appKey || null;\n this.licenseJson = config.licenseJson || null;\n this.resourcePath = '/resource.fbd';\n /**\n * Whether to use an external GL context (native platforms only).\n * In Web/WASM environments, this field is kept for configuration structure alignment,\n * but it does not take effect in the current implementation.\n */\n this.externalContext = !!config.externalContext;\n }\n\n /**\n * Validates the configuration\n * @returns {boolean} True if valid\n */\n isValid() {\n // If licenseJson is provided, use it for validation\n if (this.licenseJson) {\n return typeof this.licenseJson === 'string' && this.licenseJson.trim() !== '';\n }\n // Otherwise appId and appKey are required\n return this.appId && typeof this.appId === 'string' && this.appId.trim() !== '' &&\n this.appKey && typeof this.appKey === 'string' && this.appKey.trim() !== '';\n }\n\n /**\n * Returns a string representation of the config\n * @returns {string} String representation\n */\n toString() {\n return `EngineConfig{appId='${this.appId ? this.appId.substring(0, Math.min(this.appId.length, 8)) + '...' : 'null'}', appKey='${this.appKey ? '***' : 'null'}', licenseJson=${this.licenseJson ? 'provided' : 'null'}}`;\n }\n}\n\n","/**\n * Facebetter Constants and Enums\n * Platform-agnostic constants\n */\n\n/**\n * Beauty type enumeration\n */\nexport const BeautyType = {\n Basic: 0, // Basic beauty (smoothing, whitening, etc.)\n Reshape: 1, // Face reshaping (face thinning, big eyes, etc.)\n Makeup: 2, // Makeup effects (lipstick, blush, etc.)\n VirtualBackground: 3, // Virtual background (blur, image replacement)\n ChromaKey: 4, // Chroma key (green screen removal)\n Filter: 5, // LUT based filter\n Sticker: 6 // 2D/3D sticker\n};\n\n/**\n * Basic beauty parameter enumeration\n * All values should be in range [0.0, 1.0]\n */\nexport const BasicParam = {\n Smoothing: 0, // Skin smoothing (0.0: none, 1.0: maximum)\n Sharpening: 1, // Image sharpening (0.0: none, 1.0: maximum)\n Whitening: 2, // Skin whitening (0.0: none, 1.0: maximum)\n Rosiness: 3 // Skin rosiness (0.0: none, 1.0: maximum)\n};\n\n/**\n * Face reshape parameter enumeration\n * All values should be in range [0.0, 1.0]\n */\nexport const ReshapeParam = {\n FaceThinning: 0, // Face thinning (0.0: none, 1.0: maximum)\n FaceVShape: 1, // V-shape face (0.0: none, 1.0: maximum)\n FaceNarrowing: 2, // Face narrowing (0.0: none, 1.0: maximum)\n FaceShortening: 3,// Face shortening (0.0: none, 1.0: maximum)\n Cheekbone: 4, // Cheekbone slimming (0.0: none, 1.0: maximum)\n Jawbone: 5, // Jawbone slimming (0.0: none, 1.0: maximum)\n Chin: 6, // Chin length adjustment (0.0: none, 1.0: maximum)\n NoseSlimming: 7, // Nose slimming (0.0: none, 1.0: maximum)\n EyeSize: 8, // Eye size (0.0: normal, 1.0: maximum)\n EyeDistance: 9 // Eye distance (0.0: normal, 1.0: maximum)\n};\n\n/**\n * Makeup parameter enumeration\n * All values should be in range [0.0, 1.0]\n */\nexport const MakeupParam = {\n Lipstick: 0, // Lipstick intensity (0.0: none, 1.0: maximum)\n Blush: 1 // Blush intensity (0.0: none, 1.0: maximum)\n};\n\n/**\n * Lipstick style types\n */\nexport const LipstickStyle = {\n Rouge: 0, // Rose red\n Coral: 1, // Coral\n Pink: 2 // Pink\n};\n\n/**\n * Blush style types\n */\nexport const BlushStyle = {\n Classic: 0, // Classic\n Peach: 1, // Peach\n Rose: 2 // Rose\n};\n\n/**\n * Chroma Key parameter enumeration\n */\nexport const ChromaKeyParam = {\n KeyColor: 0, // Key color (0.0: Green, 1.0: Blue, 2.0: Red)\n Similarity: 1, // Color similarity (0.0 - 1.0)\n Smoothness: 2, // Edge smoothness (0.0 - 1.0)\n Desaturation: 3 // Spill desaturation (0.0 - 1.0)\n};\n\n/**\n * Background mode enumeration\n */\nexport const BackgroundMode = {\n None: 0, // No background processing\n Blur: 1, // Blurred background\n Image: 2 // Background image replacement\n};\n\n/**\n * Frame type enumeration\n */\nexport const FrameType = {\n Image: 0, // Image mode\n Video: 1 // Video mode\n};\n\n/**\n * Mirror mode enumeration (apply to input before processing)\n */\nexport const MirrorMode = {\n None: 0, // No mirror\n Horizontal: 1, // Mirror horizontally (e.g. front camera selfie)\n Vertical: 2, // Mirror vertically\n Both: 3 // Mirror both axes\n};\n\n/**\n * Virtual background options class\n * Matches the C++/Java/OC API design\n */\nexport class VirtualBackgroundOptions {\n /**\n * Creates a new VirtualBackgroundOptions instance\n * @param {Object} [options] - Options object\n * @param {number} [options.mode] - Background mode (use BackgroundMode enum)\n * @param {ImageData|HTMLImageElement|HTMLCanvasElement} [options.backgroundImage] - Background image (required when mode is Image)\n */\n constructor(options = {}) {\n this.mode = options.mode !== undefined ? options.mode : BackgroundMode.None;\n this.backgroundImage = options.backgroundImage || null;\n }\n\n /**\n * Validates the options\n * @returns {boolean} True if valid\n */\n isValid() {\n if (this.mode === BackgroundMode.Image) {\n return this.backgroundImage !== null;\n }\n return true;\n }\n}\n\n","/**\n * Browser-side console lines aligned with C++ Logger (src/base/logging.cc) Release pattern:\n * [%Y-%m-%d %H:%M:%S.%e] [facebetter] [%l] [%t] - %v\n * spdlog level names: info, warning, error (see spdlog SPDLOG_LEVEL_NAMES).\n */\n\nfunction pad2(n) {\n return String(n).padStart(2, '0');\n}\n\n/**\n * @param {'info'|'warning'|'error'} levelTag — must match spdlog long level strings\n * @param {string} message\n * @returns {string}\n */\nfunction formatLogLine(levelTag, message) {\n const d = new Date();\n const ms = String(d.getMilliseconds()).padStart(3, '0');\n const ts = `${d.getFullYear()}-${pad2(d.getMonth() + 1)}-${pad2(d.getDate())} ${pad2(\n d.getHours()\n )}:${pad2(d.getMinutes())}:${pad2(d.getSeconds())}.${ms}`;\n return `[${ts}] [facebetter] [${levelTag}] [0] - ${message}`;\n}\n\n/** @param {string} message */\nexport function logInfo(message) {\n console.info(formatLogLine('info', message));\n}\n\n/** @param {string} message */\nexport function logWarn(message) {\n console.warn(formatLogLine('warning', message));\n}\n\n/** @param {string} message */\nexport function logError(message) {\n console.error(formatLogLine('error', message));\n}\n","/**\n * Beauty Effect Engine Core\n * Platform-agnostic engine implementation with dependency injection\n */\n\nimport { EngineConfig } from './config.js';\nimport { FacebetterError, checkResult } from './errors.js';\nimport { FrameType, BackgroundMode, MirrorMode } from './constants.js';\nimport { logError, logInfo, logWarn } from './logging.js';\n\n/**\n * Beauty effect engine class\n * Provides high-level API for face beauty effects processing\n * Uses dependency injection for platform-specific functionality\n */\nexport class BeautyEffectEngine {\n /**\n * Creates a new BeautyEffectEngine instance\n * @param {EngineConfig|Object} config - EngineConfig object or configuration object\n * @param {Object} platformAPI - Platform-specific API (injected)\n * @param {Function} platformAPI.loadWasmModule - WASM module loader\n * @param {Function} platformAPI.getWasmModule - Get WASM module instance\n * @param {Function} platformAPI.getWasmBuffer - Get WASM memory buffer\n * @param {Function} platformAPI.toImageData - Convert to ImageData\n * @param {Function} platformAPI.verifyAppKeyOnline - Verify app key online\n * @param {Function} [platformAPI.ensureGPUPixelCanvas] - Ensure GPU canvas exists (browser only)\n * @param {Function} [platformAPI.cleanupGPUPixelCanvas] - Cleanup GPU canvas (browser only)\n */\n constructor(config, platformAPI) {\n if (!config) {\n throw new FacebetterError('Config is required. Expected EngineConfig or configuration object');\n }\n\n if (!platformAPI) {\n throw new FacebetterError('Platform API is required');\n }\n\n // If an EngineConfig instance is passed, use it directly; otherwise create a new EngineConfig\n let engineConfig;\n if (config instanceof EngineConfig) {\n engineConfig = config;\n } else if (config && typeof config === 'object') {\n engineConfig = new EngineConfig(config);\n } else {\n throw new FacebetterError('Invalid configuration. Expected EngineConfig or configuration object');\n }\n\n if (!engineConfig.isValid()) {\n throw new FacebetterError('Invalid config: ' + engineConfig.toString());\n }\n\n this.config = engineConfig;\n this.appId = engineConfig.appId;\n this.appKey = engineConfig.appKey;\n this.licenseJson = engineConfig.licenseJson;\n this.resourcePath = '/resource.fbd';\n this.enginePtr = null;\n this.initialized = false;\n this.srcBufferPtr = null;\n this.dstBufferPtr = null;\n this.bufferSize = 0;\n \n // Callback related state\n this._callbackSharedBufferPtr = null;\n this._callbackSharedBufferSize = 0;\n \n // Store platform API\n this._platformAPI = platformAPI;\n this._loadWasmModule = platformAPI.loadWasmModule;\n this._getWasmModule = platformAPI.getWasmModule;\n this._getWasmBuffer = platformAPI.getWasmBuffer;\n this._toImageData = platformAPI.toImageData;\n this._ensureGPUPixelCanvas = platformAPI.ensureGPUPixelCanvas;\n this._cleanupGPUPixelCanvas = platformAPI.cleanupGPUPixelCanvas;\n \n // Browser-specific state\n this._gpupixelCanvas = null;\n this._createdGPUPixelCanvas = false;\n this._offscreenCanvas = null;\n this._offscreenCtx = null;\n \n // Automatically create gpupixel_canvas if it doesn't exist (browser only)\n if (this._ensureGPUPixelCanvas) {\n this._ensureGPUPixelCanvas();\n }\n \n // Start loading WASM module immediately in constructor\n this._wasmLoadPromise = this._loadWasmModule();\n this._initPromise = null;\n }\n\n /**\n * Creates a timeout promise\n * @private\n * @param {number} timeout - Timeout in milliseconds\n * @param {string} operation - Operation name for error message\n * @returns {Promise} Promise that rejects after timeout\n */\n _createTimeout(timeout, operation) {\n return new Promise((_, reject) => {\n setTimeout(() => {\n reject(new FacebetterError(\n `${operation} timed out after ${timeout}ms. Please check your network connection or try increasing the timeout.`,\n 'TIMEOUT'\n ));\n }, timeout);\n });\n }\n\n /**\n * Enhances error with context information\n * @private\n * @param {Error} error - Original error\n * @param {string} context - Context information\n * @returns {FacebetterError} Enhanced error\n */\n _enhanceError(error, context) {\n if (error instanceof FacebetterError) {\n return error;\n }\n\n let errorCode = 'UNKNOWN_ERROR';\n let message = error.message || 'Unknown error occurred';\n\n // Categorize errors\n if (error.message?.includes('timeout') || error.message?.includes('TIMEOUT')) {\n errorCode = 'TIMEOUT';\n } else if (error.message?.includes('network') || error.message?.includes('fetch')) {\n errorCode = 'NETWORK_ERROR';\n } else if (error.message?.includes('WASM') || error.message?.includes('wasm')) {\n errorCode = 'WASM_LOAD_ERROR';\n } else if (error.message?.includes('license') || error.message?.includes('auth')) {\n errorCode = 'LICENSE_ERROR';\n }\n\n return new FacebetterError(\n context ? `${context}: ${message}` : message,\n errorCode\n );\n }\n\n /**\n * Initializes the engine\n * @param {Object} [options] - Initialization options\n * @param {number} [options.timeout] - Timeout in milliseconds (default: 30000 for WASM, 10000 for auth)\n * @param {number} [options.authTimeout] - Timeout for online authentication in milliseconds (default: 10000)\n * @returns {Promise<void>} Promise that resolves when initialization is complete\n */\n async init(options = {}) {\n // Concurrency control: if already initialized, return immediately\n if (this.initialized) {\n return;\n }\n\n // Concurrency control: if initialization is in progress, return the same Promise\n if (this._initPromise) {\n return this._initPromise;\n }\n\n // Create initialization Promise\n this._initPromise = (async () => {\n try {\n const wasmTimeout = options.timeout || 30000;\n\n // Wait for WASM module loading (with timeout)\n try {\n await Promise.race([\n this._wasmLoadPromise,\n this._createTimeout(wasmTimeout, 'WASM module loading')\n ]);\n } catch (error) {\n throw this._enhanceError(error, 'Failed to load WASM module');\n }\n\n const Module = this._getWasmModule();\n\n // Setup usage report proxy for WASM\n if (!Module.onReportUsage) {\n Module.onReportUsage = async (payloadJson) => {\n try {\n const url = 'https://facebetter.pixpark.net/facebetter/v1/report';\n const response = await fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: payloadJson\n });\n return response.ok;\n } catch (error) {\n return false;\n }\n };\n }\n\n // Setup online auth proxy for WASM(纯在线,失败不回退本地缓存)。\n if (!Module.onOnlineAuth) {\n Module.onOnlineAuth = async (payloadJson) => {\n const authUrl = 'https://facebetter.pixpark.net/facebetter/v1/auth';\n logInfo('Online license: requesting auth server');\n try {\n const response = await fetch(authUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: payloadJson,\n });\n if (!response.ok) {\n logWarn(`Online license: HTTP ${response.status}`);\n return '';\n }\n const text = await response.text();\n logInfo('Online license: server response ok');\n return text;\n } catch (err) {\n logWarn(\n `Online license: network error${err?.message ? `: ${err.message}` : ''}`\n );\n return '';\n }\n };\n }\n\n // Create engine instance, auth (online/offline) is handled by WASM layer via onOnlineAuth\n const enginePtr = Module.ccall(\n 'CreateBeautyEffectEngineEx',\n 'number',\n ['string', 'string', 'string', 'string', 'number'],\n [\n this.resourcePath,\n this.licenseJson || '',\n this.appId || '',\n this.appKey || '',\n this.config.externalContext ? 1 : 0\n ]\n );\n\n if (!enginePtr) {\n throw new FacebetterError(\n 'Failed to create BeautyEffect engine. This may be due to invalid license or resource path issues.',\n 'ENGINE_CREATE_FAILED'\n );\n }\n\n this.enginePtr = enginePtr;\n this.initialized = true;\n this._initPromise = null; // Clear Promise cache, allow re-initialization (if needed)\n } catch (error) {\n this._initPromise = null; // Clear Promise cache, allow retry\n throw error;\n }\n })();\n\n return this._initPromise;\n }\n\n /**\n * Destroys the engine and releases resources\n */\n destroy() {\n if (!this.initialized || !this.enginePtr) {\n return;\n }\n\n const Module = this._getWasmModule();\n\n if (this.srcBufferPtr) {\n Module._free(this.srcBufferPtr);\n this.srcBufferPtr = null;\n }\n\n if (this.dstBufferPtr) {\n Module._free(this.dstBufferPtr);\n this.dstBufferPtr = null;\n }\n\n // Clean up shared memory\n if (this._callbackSharedBufferPtr) {\n Module._free(this._callbackSharedBufferPtr);\n this._callbackSharedBufferPtr = null;\n this._callbackSharedBufferSize = 0;\n }\n\n Module.ccall('DestroyBeautyEffectEngine', null, ['number'], [this.enginePtr]);\n this.enginePtr = null;\n this.initialized = false;\n this.bufferSize = 0;\n this._initPromise = null; // Clear initialization Promise\n \n // Clean up offscreen canvas\n if (this._offscreenCanvas) {\n this._offscreenCanvas = null;\n this._offscreenCtx = null;\n }\n \n // Clean up gpupixel_canvas if we created it\n if (this._cleanupGPUPixelCanvas) {\n this._cleanupGPUPixelCanvas();\n }\n }\n\n /**\n * Sets log configuration\n * Can be called before init() since SetLogConfig is a global function\n * @param {Object} config - Log configuration\n * @param {boolean} config.consoleEnabled - Enable console logging\n * @param {boolean} config.fileEnabled - Enable file logging\n * @param {number} config.level - Log level\n * @param {string} config.fileName - Log file name\n * @returns {Promise<void>} Promise that resolves when log config is set\n */\n async setLogConfig(config) {\n // Wait for WASM module to be loaded (started in constructor)\n await this._wasmLoadPromise;\n const Module = this._getWasmModule();\n\n const result = Module.ccall(\n 'SetLogConfig',\n 'number',\n ['bool', 'bool', 'number', 'string'],\n [\n config.consoleEnabled || false,\n config.fileEnabled || false,\n config.level || 0,\n config.fileName || ''\n ]\n );\n\n checkResult(result, 'Failed to set log config');\n }\n\n /**\n * [Deprecated] No-op in parameter-driven mode. Use:\n * - setBasicParam/setReshapeParam/setMakeupParam\n * - setVirtualBackground\n * - setFilter/setSticker\n * Kept for compatibility and may be removed in a future release.\n * @deprecated\n * @param {number} beautyType - Beauty type (use BeautyType enum)\n * @param {boolean} enabled - Enable or disable\n */\n setBeautyTypeEnabled(beautyType, enabled) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n\n const result = Module.ccall(\n 'SetBeautyTypeEnabled',\n 'number',\n ['number', 'number', 'number'],\n [this.enginePtr, beautyType, enabled ? 1 : 0]\n );\n\n checkResult(result, `Failed to ${enabled ? 'enable' : 'disable'} beauty type`);\n }\n\n /**\n * [Deprecated] Always returns false in parameter-driven mode.\n * Query your own UI state or parameters instead.\n * Kept for compatibility and may be removed in a future release.\n * @deprecated\n * @param {number} beautyType - Beauty type (use BeautyType enum)\n * @returns {boolean} True if enabled\n */\n isBeautyTypeEnabled(beautyType) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n\n const result = Module.ccall(\n 'IsBeautyTypeEnabled',\n 'number',\n ['number', 'number'],\n [this.enginePtr, beautyType]\n );\n\n if (result === -1) {\n throw new FacebetterError('Failed to check beauty type status');\n }\n\n return result === 1;\n }\n\n /**\n * [Deprecated] No-op that returns success. To reset, explicitly zero parameters\n * and clear effects via parameter-driven APIs. Kept for compatibility and may\n * be removed in a future release.\n * @deprecated\n */\n disableAllBeautyTypes() {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n\n const result = Module.ccall(\n 'DisableAllBeautyTypes',\n 'number',\n ['number'],\n [this.enginePtr]\n );\n\n checkResult(result, 'Failed to disable all beauty types');\n }\n\n /**\n * Sets a basic beauty parameter\n * @param {number} param - Parameter (use BasicParam enum, e.g., BasicParam.Smoothing)\n * @param {number} value - Parameter value (0.0 - 1.0)\n */\n setBasicParam(param, value) {\n this._ensureInitialized();\n this._setBeautyParam('SetBeautyParamBasic', param, value);\n }\n\n /**\n * Sets a reshape parameter\n * @param {number} param - Parameter (use ReshapeParam enum, e.g., ReshapeParam.FaceThinning)\n * @param {number} value - Parameter value (0.0 - 1.0)\n */\n setReshapeParam(param, value) {\n this._ensureInitialized();\n this._setBeautyParam('SetBeautyParamReshape', param, value);\n }\n\n /**\n * Sets a makeup parameter\n * @param {number} param - Parameter (use MakeupParam enum, e.g., MakeupParam.Lipstick)\n * @param {number} value - Parameter value (0.0 - 1.0)\n */\n setMakeupParam(param, value) {\n this._ensureInitialized();\n this._setBeautyParam('SetBeautyParamMakeup', param, value);\n }\n\n /**\n * Sets lipstick style/texture\n * @param {number} style - Style (use LipstickStyle enum, e.g., LipstickStyle.Rouge)\n */\n setLipstickStyle(style) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const result = Module.ccall(\n 'SetLipstickStyle',\n 'number',\n ['number', 'number'],\n [this.enginePtr, style]\n );\n checkResult(result, 'Failed to set lipstick style');\n }\n\n /**\n * Sets blush style/texture\n * @param {number} style - Style (use BlushStyle enum, e.g., BlushStyle.Classic)\n */\n setBlushStyle(style) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const result = Module.ccall(\n 'SetBlushStyle',\n 'number',\n ['number', 'number'],\n [this.enginePtr, style]\n );\n checkResult(result, 'Failed to set blush style');\n }\n\n /**\n * Sets chroma key parameter\n * @param {number} param - Parameter (use ChromaKeyParam enum, e.g., ChromaKeyParam.Similarity)\n * @param {number} value - Parameter value (KeyColor: 0.0=Green, 1.0=Blue, 2.0=Red; others 0.0-1.0)\n */\n setChromaKeyParam(param, value) {\n this._ensureInitialized();\n // For KeyColor, values are 0, 1, 2, not 0.0-1.0\n if (param === 0) { // ChromaKeyParam.KeyColor\n const Module = this._getWasmModule();\n const result = Module.ccall(\n 'SetBeautyParamChromaKey',\n 'number',\n ['number', 'number', 'number'],\n [this.enginePtr, param, value]\n );\n checkResult(result, `Failed to set chroma key parameter`);\n return;\n }\n this._setBeautyParam('SetBeautyParamChromaKey', param, value);\n }\n\n /**\n * Sets a LUT-based filter\n * @param {string} filterId - Unique identifier of the filter (e.g., \"chuxin\"). Pass \"\" to clear.\n */\n setFilter(filterId) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const result = Module.ccall(\n 'SetFilter',\n 'number',\n ['number', 'string'],\n [this.enginePtr, filterId || '']\n );\n checkResult(result, 'Failed to set filter');\n }\n\n /**\n * Sets the intensity of the current filter\n * @param {number} intensity - Filter intensity (0.0 - 1.0)\n */\n setFilterIntensity(intensity) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const result = Module.ccall(\n 'SetFilterIntensity',\n 'number',\n ['number', 'number'],\n [this.enginePtr, intensity]\n );\n checkResult(result, 'Failed to set filter intensity');\n }\n\n /**\n * Sets a 2D sticker\n * @param {string} stickerId - Unique identifier of the sticker (e.g., \"樱花\"). Pass \"\" to clear.\n */\n setSticker(stickerId) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const result = Module.ccall(\n 'SetSticker',\n 'number',\n ['number', 'string'],\n [this.enginePtr, stickerId || '']\n );\n checkResult(result, 'Failed to set sticker');\n }\n\n /**\n * Registers a filter from a file path or data\n * @param {string} filterId - Unique identifier for the filter\n * @param {string|Uint8Array} resource - Path to .fbd file or Uint8Array data\n */\n registerFilter(filterId, resource) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n\n if (typeof resource === 'string') {\n const result = Module.ccall(\n 'RegisterFilterPath',\n 'number',\n ['number', 'string', 'string'],\n [this.enginePtr, filterId, resource]\n );\n checkResult(result, `Failed to register filter path: ${filterId}`);\n } else if (resource instanceof Uint8Array) {\n const dataPtr = Module._malloc(resource.length);\n Module.HEAPU8.set(resource, dataPtr);\n try {\n const result = Module.ccall(\n 'RegisterFilterData',\n 'number',\n ['number', 'string', 'number', 'number'],\n [this.enginePtr, filterId, dataPtr, resource.length]\n );\n checkResult(result, `Failed to register filter data: ${filterId}`);\n } finally {\n Module._free(dataPtr);\n }\n } else {\n throw new FacebetterError('Resource must be a string path or Uint8Array data');\n }\n }\n\n /**\n * Registers a sticker from a file path or data\n * @param {string} stickerId - Unique identifier for the sticker\n * @param {string|Uint8Array} resource - Path to .fbd file or Uint8Array data\n */\n registerSticker(stickerId, resource) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n\n if (typeof resource === 'string') {\n const result = Module.ccall(\n 'RegisterStickerPath',\n 'number',\n ['number', 'string', 'string'],\n [this.enginePtr, stickerId, resource]\n );\n checkResult(result, `Failed to register sticker path: ${stickerId}`);\n } else if (resource instanceof Uint8Array) {\n const dataPtr = Module._malloc(resource.length);\n Module.HEAPU8.set(resource, dataPtr);\n try {\n const result = Module.ccall(\n 'RegisterStickerData',\n 'number',\n ['number', 'string', 'number', 'number'],\n [this.enginePtr, stickerId, dataPtr, resource.length]\n );\n checkResult(result, `Failed to register sticker data: ${stickerId}`);\n } finally {\n Module._free(dataPtr);\n }\n } else {\n throw new FacebetterError('Resource must be a string path or Uint8Array data');\n }\n }\n\n /**\n * Unregisters a specific filter\n * @param {string} filterId - Filter ID to unregister\n */\n unregisterFilter(filterId) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const result = Module.ccall(\n 'UnregisterFilter',\n 'number',\n ['number', 'string'],\n [this.enginePtr, filterId]\n );\n checkResult(result, `Failed to unregister filter: ${filterId}`);\n }\n\n /**\n * Unregisters all filters\n */\n unregisterAllFilters() {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const result = Module.ccall(\n 'UnregisterAllFilters',\n 'number',\n ['number'],\n [this.enginePtr]\n );\n checkResult(result, 'Failed to unregister all filters');\n }\n\n /**\n * Unregisters a specific sticker\n * @param {string} stickerId - Sticker ID to unregister\n */\n unregisterSticker(stickerId) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const result = Module.ccall(\n 'UnregisterSticker',\n 'number',\n ['number', 'string'],\n [this.enginePtr, stickerId]\n );\n checkResult(result, `Failed to unregister sticker: ${stickerId}`);\n }\n\n /**\n * Unregisters all stickers\n */\n unregisterAllStickers() {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const result = Module.ccall(\n 'UnregisterAllStickers',\n 'number',\n ['number'],\n [this.enginePtr]\n );\n checkResult(result, 'Failed to unregister all stickers');\n }\n \n /**\n * Gets the list of registered filter IDs\n * @returns {string[]} Array of registered filter IDs\n */\n getRegisteredFilters() {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const jsonStr = Module.ccall(\n 'GetRegisteredFilters',\n 'string',\n ['number'],\n [this.enginePtr]\n );\n try {\n return JSON.parse(jsonStr || '[]');\n } catch (e) {\n logError(`Failed to parse registered filters JSON: ${e}`);\n return [];\n }\n }\n \n /**\n * Gets the list of registered sticker IDs\n * @returns {string[]} Array of registered sticker IDs\n */\n getRegisteredStickers() {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const jsonStr = Module.ccall(\n 'GetRegisteredStickers',\n 'string',\n ['number'],\n [this.enginePtr]\n );\n try {\n return JSON.parse(jsonStr || '[]');\n } catch (e) {\n logError(`Failed to parse registered stickers JSON: ${e}`);\n return [];\n }\n }\n \n /**\n * Internal method to set beauty parameters\n * @private\n */\n _setBeautyParam(functionName, param, value) {\n if (value < 0 || value > 1) {\n throw new FacebetterError('Parameter value must be between 0.0 and 1.0');\n }\n\n const Module = this._getWasmModule();\n const result = Module.ccall(\n functionName,\n 'number',\n ['number', 'number', 'number'],\n [this.enginePtr, param, value]\n );\n\n checkResult(result, `Failed to set beauty parameter`);\n }\n\n /**\n * Sets engine callbacks (face landmarks detection)\n * @param {Object} callbacks - Callback functions\n * @param {Function} callbacks.onFaceLandmarks - Callback for face landmarks detection\n * @param {number} [callbacks.maxFaces=10] - Maximum number of faces to support (affects shared buffer size)\n */\n setCallbacks(callbacks) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n \n // Initialize callback storage (if it doesn't exist)\n if (!Module._face_landmarks_callbacks) {\n Module._face_landmarks_callbacks = [];\n }\n \n let callbackId = 0;\n let sharedBufferPtr = null;\n let sharedBufferSize = 0;\n \n if (callbacks && callbacks.onFaceLandmarks) {\n // Get max faces (default 10)\n const maxFaces = callbacks.maxFaces || 10;\n \n // Pre-allocate shared memory\n // Metadata: 2 ints (frame_number, face_count) = 8 bytes\n // Face data: maxFaces * 343 floats * 4 bytes = maxFaces * 1372 bytes\n const metadataSize = 2 * 4; // 2 ints\n const faceDataSize = maxFaces * 343 * 4; // 343 floats per face\n sharedBufferSize = metadataSize + faceDataSize;\n sharedBufferPtr = Module._malloc(sharedBufferSize);\n \n if (!sharedBufferPtr) {\n throw new FacebetterError('Failed to allocate shared buffer for callbacks');\n }\n \n // Register callback function (internal wrapper, reads data from shared memory)\n // Push first, then get index as callbackId (allows callbackId to be 0)\n Module._face_landmarks_callbacks.push(\n (frameNumber, faceCount, dataPtr) => {\n // Read data from shared memory (zero-copy)\n const heap = Module.HEAPF32;\n const dataOffset = dataPtr / 4; // float is 4 bytes\n \n const results = [];\n const FLOATS_PER_FACE = 343;\n \n for (let i = 0; i < faceCount; i++) {\n const faceOffset = dataOffset + i * FLOATS_PER_FACE;\n let offset = faceOffset;\n \n // Read rect\n const rect = {\n x: heap[offset++],\n y: heap[offset++],\n width: heap[offset++],\n height: heap[offset++]\n };\n \n // Read basic fields\n const faceId = Math.round(heap[offset++]);\n const faceAction = Math.round(heap[offset++]);\n const score = heap[offset++];\n const pitch = heap[offset++];\n const roll = heap[offset++];\n const yaw = heap[offset++];\n \n // Read key_points (111 points)\n const keyPoints = [];\n for (let j = 0; j < 111; j++) {\n keyPoints.push({\n x: heap[offset++],\n y: heap[offset++]\n });\n }\n \n // Read visibility (111 points)\n const visibility = [];\n for (let j = 0; j < 111; j++) {\n visibility.push(heap[offset++]);\n }\n \n results.push({\n rect,\n key_points: keyPoints,\n visibility,\n face_id: faceId,\n face_action: faceAction,\n score,\n pitch,\n roll,\n yaw\n });\n }\n \n // Call user callback\n callbacks.onFaceLandmarks(results);\n }\n );\n \n // Get callback ID (index after push, can be 0)\n callbackId = Module._face_landmarks_callbacks.length - 1;\n }\n \n // Call C API\n const result = Module.ccall(\n 'SetCallbacks',\n 'number',\n ['number', 'number', 'number', 'number'],\n [\n this.enginePtr,\n callbackId,\n sharedBufferPtr || 0,\n sharedBufferSize\n ]\n );\n \n checkResult(result, 'Failed to set callbacks');\n \n // Clean up old shared memory (if it exists)\n if (this._callbackSharedBufferPtr) {\n Module._free(this._callbackSharedBufferPtr);\n }\n \n // Store new shared memory pointer for cleanup\n if (sharedBufferPtr) {\n this._callbackSharedBufferPtr = sharedBufferPtr;\n this._callbackSharedBufferSize = sharedBufferSize;\n } else {\n this._callbackSharedBufferPtr = null;\n this._callbackSharedBufferSize = 0;\n }\n }\n\n /**\n * Sets virtual background options (unified API, matches C++/Java/OC)\n * @param {VirtualBackgroundOptions|Object} options - Virtual background options\n * @param {number} [options.mode] - Background mode (use BackgroundMode enum)\n * @param {ImageData|HTMLImageElement|HTMLCanvasElement} [options.backgroundImage] - Background image (required when mode is Image)\n */\n setVirtualBackground(options) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n \n // Support both VirtualBackgroundOptions object and plain object\n const opts = options.mode !== undefined ? options : { mode: BackgroundMode.None, backgroundImage: null };\n \n let imageData = null;\n let imageBufferPtr = null;\n \n try {\n // If a background image is provided, convert to ImageData and prepare buffer\n if (opts.backgroundImage) {\n imageData = this._toImageData(opts.backgroundImage);\n const bufferSize = imageData.width * imageData.height * 4;\n imageBufferPtr = Module._malloc(bufferSize);\n \n const buffer = this._getWasmBuffer();\n const view = new Uint8Array(buffer, imageBufferPtr, bufferSize);\n view.set(imageData.data);\n }\n \n // Use unified SetVirtualBackground C interface (consistent with other platforms)\n const result = Module.ccall(\n 'SetVirtualBackground',\n 'number',\n ['number', 'number', 'number', 'number', 'number', 'number'],\n [\n this.enginePtr,\n opts.mode,\n imageBufferPtr || 0, // If null, pass 0\n imageData ? imageData.width : 0,\n imageData ? imageData.height : 0,\n imageData ? imageData.width * 4 : 0\n ]\n );\n \n checkResult(result, 'Failed to set virtual background');\n } finally {\n // Free memory\n if (imageBufferPtr) {\n Module._free(imageBufferPtr);\n }\n }\n }\n\n /**\n * Sets whether to apply beauty effects only on skin regions.\n * When enabled, beauty effects will only be applied to detected skin areas.\n * @param {boolean} enabled - True to enable skin-only beauty, false to apply to entire image.\n */\n setSkinOnlyBeauty(enabled) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n\n const result = Module.ccall(\n 'SetSkinOnlyBeauty',\n 'number',\n ['number', 'number'],\n [this.enginePtr, enabled ? 1 : 0]\n );\n\n checkResult(result, 'Failed to set skin only beauty');\n }\n\n\n /**\n * Ensures buffers are allocated for the given dimensions\n * @private\n */\n _ensureBuffers(width, height) {\n const requiredSize = width * height * 4;\n\n if (this.bufferSize < requiredSize) {\n const Module = this._getWasmModule();\n\n if (this.srcBufferPtr) {\n Module._free(this.srcBufferPtr);\n }\n if (this.dstBufferPtr) {\n Module._free(this.dstBufferPtr);\n }\n\n this.srcBufferPtr = Module._malloc(requiredSize);\n this.dstBufferPtr = Module._malloc(requiredSize);\n this.bufferSize = requiredSize;\n\n if (!this.srcBufferPtr || !this.dstBufferPtr) {\n throw new FacebetterError('Failed to allocate memory buffers');\n }\n }\n }\n\n /**\n * Processes an image\n * @param {ImageData|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|Uint8ClampedArray} input - Input image\n * @param {number} width - Image width (required if input is Uint8ClampedArray)\n * @param {number} height - Image height (required if input is Uint8ClampedArray)\n * @param {number} frameType - Frame type (use FrameType enum, default: FrameType.Video)\n * @param {number} mirrorMode - Mirror mode applied to input before processing (MirrorMode enum, default: MirrorMode.None)\n * @returns {ImageData} Processed image data\n */\n processImage(input, width, height, frameType = FrameType.Video, mirrorMode = MirrorMode.None) {\n this._ensureInitialized();\n const imageData = this._platformAPI.toImageData(input, width, height);\n const Module = this._getWasmModule();\n\n this._ensureBuffers(imageData.width, imageData.height);\n\n const bufferSize = imageData.width * imageData.height * 4;\n\n try {\n const buffer = this._getWasmBuffer();\n \n const srcView = new Uint8Array(buffer, this.srcBufferPtr, bufferSize);\n srcView.set(imageData.data);\n\n const result = Module.ccall(\n 'ProcessImageRGBA',\n 'number',\n ['number', 'number', 'number', 'number', 'number', 'number', 'number', 'number'],\n [\n this.enginePtr,\n this.srcBufferPtr,\n imageData.width,\n imageData.height,\n imageData.width * 4,\n this.dstBufferPtr,\n frameType,\n mirrorMode\n ]\n );\n\n checkResult(result, 'Failed to process image');\n\n const currentBuffer = this._getWasmBuffer();\n const dstView = new Uint8Array(currentBuffer, this.dstBufferPtr, bufferSize);\n const processedData = new Uint8ClampedArray(dstView);\n\n return new ImageData(processedData, imageData.width, imageData.height);\n } catch (error) {\n if (error instanceof FacebetterError) {\n throw error;\n }\n throw new FacebetterError(`Image processing error: ${error.message}`);\n }\n }\n\n /**\n * Processes an external GPU texture.\n *\n * Note:\n * - This interface is mainly used for integration with internal WASM or advanced scenarios.\n * - textureHandle must be a texture handle (uint32) compatible with the OpenGL/WebGL context used by WASM.\n * - For common web scenarios, it is recommended to use processImage with ImageData/Canvas etc.\n *\n * @param {number} textureHandle - External texture handle (GL_TEXTURE_2D)\n * @param {number} width - Texture width\n * @param {number} height - Texture height\n * @param {number} stride - Row stride (usually width * 4)\n * @param {number} [frameType] - Frame type (FrameType.Image / FrameType.Video)\n * @param {number} [mirrorMode] - Mirror mode (MirrorMode enum; texture path does not support mirror, param reserved)\n * @returns {number} Processed texture handle (GL_TEXTURE_2D, uint32)\n */\n processTexture(textureHandle,\n width,\n height,\n stride,\n frameType = FrameType.Video,\n mirrorMode = MirrorMode.None) {\n this._ensureInitialized();\n if (!textureHandle || width <= 0 || height <= 0 || stride <= 0) {\n throw new FacebetterError('Invalid textureHandle or dimensions for processTexture');\n }\n\n const Module = this._getWasmModule();\n\n try {\n const result = Module.ccall(\n 'ProcessImageTexture',\n 'number',\n ['number', 'number', 'number', 'number', 'number', 'number', 'number'],\n [\n this.enginePtr,\n textureHandle,\n width,\n height,\n stride,\n frameType,\n mirrorMode\n ]\n );\n\n if (!result || result === 0) {\n throw new FacebetterError('Failed to process external texture or got invalid output texture');\n }\n\n // Return processed texture handle for caller to continue using in same GL context\n return result;\n } catch (error) {\n if (error instanceof FacebetterError) {\n throw error;\n }\n throw new FacebetterError(`Texture processing error: ${error.message}`);\n }\n }\n\n /**\n * Ensures the engine is initialized\n * @private\n * @throws {FacebetterError} If engine is not initialized\n */\n _ensureInitialized() {\n if (!this.initialized || !this.enginePtr) {\n throw new FacebetterError('Engine not initialized. Call init() first.');\n }\n }\n\n /**\n * Ensures gpupixel_canvas exists in the DOM (browser only)\n * This canvas is required by GPUPixel for WebGL context creation\n * @private\n */\n _ensureGPUPixelCanvas() {\n if (typeof document === 'undefined') {\n return;\n }\n \n let canvas = document.getElementById('gpupixel_canvas');\n if (!canvas) {\n canvas = document.createElement('canvas');\n canvas.id = 'gpupixel_canvas';\n canvas.style.display = 'none';\n canvas.width = 1;\n canvas.height = 1;\n document.body.appendChild(canvas);\n this._createdGPUPixelCanvas = true;\n }\n this._gpupixelCanvas = canvas;\n }\n\n /**\n * Cleans up gpupixel_canvas if it was created by this engine instance (browser only)\n * @private\n */\n _cleanupGPUPixelCanvas() {\n if (this._createdGPUPixelCanvas && this._gpupixelCanvas) {\n this._gpupixelCanvas.remove();\n this._gpupixelCanvas = null;\n this._createdGPUPixelCanvas = false;\n }\n }\n\n /**\n * Ensures offscreen canvas exists and matches the required dimensions (browser only)\n * This canvas is reused for video processing to avoid creating temporary canvases\n * @private\n * @param {number} width - Required canvas width\n * @param {number} height - Required canvas height\n */\n _ensureOffscreenCanvas(width, height) {\n if (typeof document === 'undefined') {\n return null;\n }\n \n if (!this._offscreenCanvas || \n this._offscreenCanvas.width !== width || \n this._offscreenCanvas.height !== height) {\n this._offscreenCanvas = document.createElement('canvas');\n this._offscreenCanvas.width = width;\n this._offscreenCanvas.height = height;\n this._offscreenCtx = this._offscreenCanvas.getContext('2d', { willReadFrequently: true });\n }\n return this._offscreenCanvas;\n }\n\n}\n","/**\n * Browser-specific Image Utilities\n * Uses DOM APIs (canvas, ImageData, etc.)\n */\n\nimport { FacebetterError } from '../core/errors.js';\n\n/**\n * Converts various image sources to ImageData (browser version)\n * @param {ImageData|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|Uint8ClampedArray} source - Image source\n * @param {number} width - Image width (required if source is Uint8ClampedArray)\n * @param {number} height - Image height (required if source is Uint8ClampedArray)\n * @returns {ImageData} ImageData object\n */\nexport function toImageData(source, width, height) {\n if (source instanceof ImageData) {\n return source;\n }\n\n if (source instanceof HTMLCanvasElement || source instanceof HTMLVideoElement) {\n const canvas = source instanceof HTMLCanvasElement ? source : document.createElement('canvas');\n if (source instanceof HTMLVideoElement) {\n canvas.width = source.videoWidth;\n canvas.height = source.videoHeight;\n const ctx = canvas.getContext('2d');\n ctx.drawImage(source, 0, 0);\n }\n const ctx = canvas.getContext('2d');\n return ctx.getImageData(0, 0, canvas.width, canvas.height);\n }\n\n if (source instanceof HTMLImageElement) {\n const canvas = document.createElement('canvas');\n canvas.width = source.naturalWidth || source.width;\n canvas.height = source.naturalHeight || source.height;\n const ctx = canvas.getContext('2d');\n ctx.drawImage(source, 0, 0);\n return ctx.getImageData(0, 0, canvas.width, canvas.height);\n }\n\n if (source instanceof Uint8ClampedArray) {\n if (width === undefined || height === undefined) {\n throw new FacebetterError('Width and height are required when source is Uint8ClampedArray');\n }\n return new ImageData(source, width, height);\n }\n\n throw new FacebetterError('Unsupported image source type');\n}\n\n/**\n * Gets User-Agent string for web platform\n * @returns {string} User-Agent string\n */\nexport function getUserAgentString() {\n return 'FB/1.0 (web; wasm32)';\n}\n\n/**\n * Generates HMAC-SHA256 signature (browser version)\n * @param {string} key - HMAC key (app_key)\n * @param {string} data - Data to sign (timestamp string)\n * @returns {Promise<string>} Promise that resolves with hex-encoded signature\n */\nexport async function generateHMACSignature(key, data) {\n const encoder = new TextEncoder();\n const keyData = encoder.encode(key);\n const messageData = encoder.encode(data);\n\n const cryptoKey = await crypto.subtle.importKey(\n 'raw',\n keyData,\n { name: 'HMAC', hash: 'SHA-256' },\n false,\n ['sign']\n );\n\n const signature = await crypto.subtle.sign('HMAC', cryptoKey, messageData);\n\n // Convert to hex string\n const hashArray = Array.from(new Uint8Array(signature));\n const hashHex = hashArray.map(b => b.toString(16).padStart(2, '0')).join('');\n return hashHex;\n}\n\n","/**\n * ESM Entry Point\n * For Vue/React/Vite/Webpack (ES Module)\n * Uses facebetter-core npm package for WASM module loading\n */\n\nimport { BeautyEffectEngine } from '../core/engine.js';\nimport { EngineConfig } from '../core/config.js';\nimport { FacebetterError } from '../core/errors.js';\nimport * as constants from '../core/constants.js';\n\n// ESM-specific WASM loader\nlet wasmModuleInstance = null;\nlet wasmModulePromise = null;\n\n/**\n * Loads the WebAssembly module (ESM version)\n * Supports ESM format WASM modules (generated with MODULARIZE and EXPORT_ES6)\n * With SINGLE_FILE=1, WASM binary and data files are embedded in the JS file\n * @param {Object} [options] - Options\n * @param {string} [options.wasmUrl] - Custom WASM module URL (defaults to facebetter-core npm package)\n * @param {Function} [options.locateFile] - Custom locateFile function (usually not needed with SINGLE_FILE=1)\n * @returns {Promise<Object>} Promise that resolves with the WASM module\n */\nexport async function loadWasmModule(options = {}) {\n if (wasmModuleInstance) {\n return wasmModuleInstance;\n }\n\n if (wasmModulePromise) {\n return wasmModulePromise;\n }\n\n wasmModulePromise = (async () => {\n // Try to import the WASM module factory\n // facebetter-core.js is an Emscripten-generated ESM file (with MODULARIZE and EXPORT_ES6)\n // It's provided by the facebetter-core npm package\n let FaceBetterModuleFactory;\n \n try {\n // Get the WASM module\n if (options.wasmUrl) {\n // If custom URL is provided, use it (for backward compatibility or custom builds)\n const wasmModule = await import(options.wasmUrl);\n FaceBetterModuleFactory = wasmModule.default || wasmModule.createFaceBetterModule;\n } else {\n // Import from facebetter-core npm package\n const wasmModule = await import('facebetter-core');\n \n // Get the factory function (default export or named export)\n FaceBetterModuleFactory = wasmModule.default || wasmModule.createFaceBetterModule;\n }\n \n if (!FaceBetterModuleFactory) {\n throw new Error('WASM module does not export createFaceBetterModule function');\n }\n } catch (e) {\n throw new FacebetterError(`Failed to load WASM module: ${e.message}`);\n }\n\n // Configure module options\n // With SINGLE_FILE=1, WASM binary and data files are embedded in the JS file\n // No need to handle .wasm and .data file paths separately\n const moduleOptions = {\n locateFile: options.locateFile || function(path, prefix) {\n // With SINGLE_FILE=1, Emscripten handles embedded files automatically\n // Custom locateFile is only needed if user provides one\n return prefix + path;\n },\n ...options\n };\n\n // Initialize the module (MODULARIZE returns a Promise)\n wasmModuleInstance = await FaceBetterModuleFactory(moduleOptions);\n \n if (!wasmModuleInstance) {\n throw new FacebetterError('Failed to initialize WASM module');\n }\n\n wasmModuleInstance.ready = true;\n return wasmModuleInstance;\n })();\n\n return wasmModulePromise;\n}\n\n/**\n * Gets the current WASM module instance\n * @returns {Object} WASM module instance\n * @throws {Error} If module is not loaded\n */\nexport function getWasmModule() {\n if (!wasmModuleInstance) {\n throw new Error('WASM module not loaded. Call loadWasmModule() first or use BeautyEffectEngine.init()');\n }\n return wasmModuleInstance;\n}\n\n/**\n * Gets the current WASM memory buffer\n * @returns {ArrayBuffer} Current WASM memory buffer\n */\nexport function getWasmBuffer() {\n const Module = getWasmModule();\n \n if (Module.buffer) {\n return Module.buffer;\n } else if (Module.HEAPU8 && Module.HEAPU8.buffer) {\n return Module.HEAPU8.buffer;\n } else if (Module.asm && Module.asm.memory) {\n return Module.asm.memory.buffer;\n }\n \n throw new Error('Unable to access WASM memory buffer');\n}\n\n// Browser-specific image utilities (ESM version can use browser APIs)\nimport * as imageUtils from '../browser/image-utils.js';\n\n// Browser-specific GPU canvas management\nfunction ensureGPUPixelCanvas() {\n if (typeof document === 'undefined') {\n return;\n }\n \n let canvas = document.getElementById('gpupixel_canvas');\n if (!canvas) {\n canvas = document.createElement('canvas');\n canvas.id = 'gpupixel_canvas';\n canvas.style.display = 'none';\n canvas.width = 1;\n canvas.height = 1;\n if (document.body) {\n document.body.appendChild(canvas);\n }\n }\n}\n\nfunction cleanupGPUPixelCanvas() {\n // Cleanup is handled by engine instance\n}\n\n// Create platform API\nconst platformAPI = {\n loadWasmModule: () => loadWasmModule(),\n getWasmModule,\n getWasmBuffer,\n toImageData: imageUtils.toImageData,\n ensureGPUPixelCanvas,\n cleanupGPUPixelCanvas\n};\n\n// Export factory function\nexport function createBeautyEffectEngine(config) {\n return new BeautyEffectEngine(config, platformAPI);\n}\n\n// Create a wrapped BeautyEffectEngine class that automatically injects platformAPI\n// This allows users to use: new BeautyEffectEngine(config) without passing platformAPI\nclass ESMBeautyEffectEngine extends BeautyEffectEngine {\n constructor(config) {\n // Automatically inject platformAPI for ESM environment\n super(config, platformAPI);\n }\n}\n\n// Export all constants and classes\nexport {\n ESMBeautyEffectEngine as BeautyEffectEngine,\n EngineConfig,\n FacebetterError\n};\n\n// Export constants with proper names\nexport const BeautyType = constants.BeautyType;\nexport const BasicParam = constants.BasicParam;\nexport const ReshapeParam = constants.ReshapeParam;\nexport const MakeupParam = constants.MakeupParam;\nexport const LipstickStyle = constants.LipstickStyle;\nexport const BlushStyle = constants.BlushStyle;\nexport const ChromaKeyParam = constants.ChromaKeyParam;\nexport const BackgroundMode = constants.BackgroundMode;\nexport const FrameType = constants.FrameType;\nexport const MirrorMode = constants.MirrorMode;\nexport const VirtualBackgroundOptions = constants.VirtualBackgroundOptions;\n\n// Default export\nexport default {\n BeautyEffectEngine: ESMBeautyEffectEngine,\n EngineConfig,\n FacebetterError,\n ...constants,\n loadWasmModule\n};\n\n"],"names":["BeautyType","BasicParam","ReshapeParam","MakeupParam","LipstickStyle","BlushStyle","ChromaKeyParam","BackgroundMode","FrameType","MirrorMode","imageUtils.toImageData","constants.BeautyType","constants.BasicParam","constants.ReshapeParam","constants.MakeupParam","constants.LipstickStyle","constants.BlushStyle","constants.ChromaKeyParam","constants.BackgroundMode","constants.FrameType","constants.MirrorMode","constants.VirtualBackgroundOptions"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,eAAe,SAAS,KAAK,CAAC;AAC3C,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,GAAG,C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AC;AACrD,CAAC;AACD;AACA;AACA;AACA,MAAM,qBAAqB,SAAS,kBAAkB,CAAC;AACvD,EAAE,WAAW,CAAC,MAAM,EAAE;AACtB;AACA,IAAI,KAAK,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAC/B,GAAG;AACH,CAAC;AAQD;AACA;AACY,MAAC,UAAU,GAAGC,aAAqB;AACnC,MAAC,UAAU,GAAGC,aAAqB;AACnC,MAAC,YAAY,GAAGC,eAAuB;AACvC,MAAC,WAAW,GAAGC,cAAsB;AACrC,MAAC,aAAa,GAAGC,gBAAwB;AACzC,MAAC,UAAU,GAAGC,aAAqB;AACnC,MAAC,cAAc,GAAGC,iBAAyB;AAC3C,MAAC,cAAc,GAAGC,iBAAyB;AAC3C,MAAC,SAAS,GAAGC,YAAoB;AACjC,MAAC,UAAU,GAAGC,aAAqB;AACnC,MAAC,wBAAwB,GAAGC,2BAAmC;AAC3E;AACA;AACA,YAAe;AACf,EAAE,kBAAkB,EAAE,qBAAqB;AAC3C,EAAE,YAAY;AACd,EAAE,eAAe;AACjB,EAAE,GAAG,SAAS;AACd,EAAE,cAAc;AAChB,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"facebetter.esm.js","sources":["../src/core/config.js","../src/core/errors.js","../src/core/constants.js","../src/core/logging.js","../src/core/engine.js","../src/core/auth.js","../src/browser/image-utils.js","../src/esm/index.js"],"sourcesContent":["/**\n * Engine Configuration\n * Platform-agnostic configuration class\n */\n\n/**\n * Engine configuration class\n * Analogous to EngineConfig in C++ / Java / Objective-C, with Web-only auth fields.\n */\nexport class EngineConfig {\n /**\n * @param {Object} config\n * @param {string} [config.licenseToken] Compact JWS, or the raw `{success, token}`\n * HTTP response body from your auth server.\n * @param {string} [config.authProxyUrl] Production: forward the WASM auth\n * challenge to your server, which holds app_id/app_key and calls Cloudflare.\n * @param {Function} [config.fetchAuthResponse] Custom auth hook with signature\n * `async (challenge) => string|object`. For local debugging you can use\n * `createDirectAuthFetcher` to hit Cloudflare directly — never ship keys in\n * a production frontend bundle.\n * @param {boolean} [config.externalContext] Kept for cross-platform alignment;\n * unused on Web/WASM today.\n */\n constructor(config = {}) {\n this.licenseToken = config.licenseToken || null;\n this.authProxyUrl = config.authProxyUrl || null;\n this.fetchAuthResponse = config.fetchAuthResponse || null;\n this.resourcePath = '/resource.fbd';\n /**\n * Whether to use an external GL context (native platforms only).\n * On Web/WASM this field is kept for config-shape alignment and has no effect.\n */\n this.externalContext = !!config.externalContext;\n }\n\n isValid() {\n if (this.licenseToken && typeof this.licenseToken === 'string' &&\n this.licenseToken.trim() !== '') {\n return true;\n }\n if (typeof this.fetchAuthResponse === 'function') {\n return true;\n }\n if (this.authProxyUrl && typeof this.authProxyUrl === 'string' &&\n this.authProxyUrl.trim() !== '') {\n return true;\n }\n return false;\n }\n\n toString() {\n const mode = this.licenseToken\n ? 'licenseToken'\n : this.fetchAuthResponse\n ? 'fetchAuthResponse'\n : this.authProxyUrl\n ? 'authProxyUrl'\n : 'invalid';\n return `EngineConfig{mode='${mode}'}`;\n }\n}\n","/**\n * Facebetter Error Classes\n * Platform-agnostic error handling\n */\n\n/**\n * Facebetter error class\n */\nexport class FacebetterError extends Error {\n constructor(message, code = -1) {\n super(message);\n this.name = 'FacebetterError';\n this.code = code;\n }\n}\n\n/**\n * Checks if a result code indicates success\n * @param {number} result - Result code from WASM function\n * @throws {FacebetterError} If result indicates failure\n */\nexport function checkResult(result, errorMessage = 'Operation failed') {\n if (result !== 0) {\n throw new FacebetterError(`${errorMessage} (error code: ${result})`, result);\n }\n}\n\n","/**\n * Facebetter Constants and Enums\n * Platform-agnostic constants. Ordinals match facebetter::beauty_params.\n */\n\nexport const WhiteningStyle = {\n ColdWhite: 0, // Cool white\n PinkWhite: 1, // Pink white\n WarmWhite: 2, // Warm white\n Wheat: 3, // Light wheat / olive\n Tan: 4 // Tan / bronzed\n};\n\nexport const SmoothingStyle = {\n Natural: 0, // Natural: keeps pores\n Texture: 1, // Cleaner skin while retaining texture\n Smooth: 2 // Creamy / porcelain finish\n};\n\n/**\n * Face reshape parameters.\n * Values match facebetter::beauty_params::Reshape.\n * Intensity range is [-1.0, 1.0]; 0 is off. Comments list + / - directions.\n */\nexport const Reshape = {\n FaceThin: 0, // +slim face / -fuller cheeks\n FaceVShape: 1, // +V-shape jaw / -square jaw\n FaceNarrow: 2, // +narrow face / -wider face\n FaceShort: 3, // +shorter face / -longer face\n Cheekbone: 4, // +slim cheekbones / -wider cheekbones\n Jawbone: 5, // +slim jaw / -wider jaw\n Chin: 6, // +longer chin / -shorter chin\n NoseSlim: 7, // +slimmer nose / -wider nose\n EyeSize: 8, // +larger eyes / -smaller eyes\n EyeDistance: 9, // +wider eye spacing / -closer eyes\n FaceSmall: 10, // +smaller face / -larger face\n Forehead: 11, // +fuller forehead / -lower forehead\n NoseLong: 12, // +longer nose / -shorter nose\n Philtrum: 13, // +shorter philtrum / -longer philtrum\n MouthSize: 14, // +larger mouth / -smaller mouth\n MouthPosition: 15, // +mouth lower / -mouth higher\n MouthSmile: 16, // +smile lift / -droop corners\n LipThickness: 17, // +thicker lips / -thinner lips\n EyeRound: 18, // +rounder eyes / -narrower eyes\n EyePosition: 19, // +eyes lower / -eyes higher\n EyeAngle: 20, // +outer corner up / -outer corner down\n EyeCornerOpen: 21, // +open eye corners / -close eye corners\n LowerEyelid: 22, // +lower eyelid down / -lift lower eyelid\n BrowPosition: 23, // +brows higher / -brows lower\n BrowDistance: 24, // +wider brow spacing / -closer brows\n BrowThickness: 25 // +thicker brows / -thinner brows\n};\n\nexport const EngineEventCode = {\n LicenseValidationSuccess: 0,\n LicenseValidationFailed: 1,\n InitializationComplete: 100,\n InitializationFailed: 101\n};\n\nexport const LipstickColor = {\n Rouge: 0, // Classic rose\n RetroRed: 1, // Retro red\n Peach: 2, // Peach\n CoralOrange: 3, // Coral orange\n GentlePink: 4, // Soft pink\n VitalityOrange: 5 // Bright orange\n};\n\nexport const BlushStyle = {\n SunKissed: 0, // Sun-kissed sweep across cheekbones and bridge\n Igari: 1, // Flushed band across the nose bridge\n Soft: 2, // Soft dual cheeks\n Apple: 3, // Round apple cheeks\n Classic: 4, // Classic two spots\n Doll: 5, // Cheeks + nose tip\n Rose: 6 // Rose dual cheeks\n};\n\nexport const BlushColor = {\n CoralPink: 0, // Coral pink\n DustyRose: 1, // Dusty rose\n VividRed: 2, // Vivid red\n Berry: 3, // Berry\n SunsetOrange: 4 // Sunset orange\n};\n\nexport const ContourStyle = {\n Natural: 0, // Soft everyday contour\n Sculpt: 1, // Deeper sculpted contour\n Glow: 2, // Highlight-focused\n Slim: 3, // Slim cheekbones\n Nose: 4, // Nose bridge lift\n Glam: 5 // Spot highlights\n};\n\nexport const EyeShadowStyle = {\n Soft: 0, // Soft wash\n Crease: 1, // Crease deepen\n Smoky: 2, // Smoky surround\n Halo: 3, // Halo around the eye\n Glow: 4, // Outer-corner glow\n Drama: 5, // Full dramatic cover\n Warm: 6 // Warm-tone wash\n};\n\nexport const EyeShadowColor = {\n Plum: 0, // Plum / mauve (default)\n Brown: 1, // Warm brown\n Gold: 2, // Soft gold\n Pink: 3 // Dusty pink\n};\n\nexport const EyeLinerStyle = {\n Classic: 0, // Full liner with winged tip\n Flick: 1, // Extended outer flick\n CatEye: 2, // Short cat-eye lift\n Natural: 3, // Thin soft natural line\n Bold: 4, // Bold cover\n Soft: 5 // Soft feathered wing\n};\n\nexport const EyeLinerColor = {\n Burgundy: 0, // Burgundy brown\n Plum: 1, // Deep plum\n Chocolate: 2, // Chocolate brown\n Coffee: 3, // Near-black coffee\n Mauve: 4 // Mauve grey\n};\n\nexport const EyebrowStyle = {\n Natural: 0, // Natural arch with hair strokes\n Soft: 1, // Soft powdery thick brow\n Feathered: 2, // Feathered hair strokes\n Mist: 3, // Light powder mist\n Arched: 4, // Classic high arch\n Powder: 5, // Dense powder fill\n Wild: 6, // Wispy upper edge\n Full: 7, // Full balanced brow\n Straight: 8 // Straight low arch\n};\n\nexport const EyebrowColor = {\n DarkBrown: 0, // Dark brown (default)\n Black: 1, // Black\n SoftBrown: 2 // Soft brown\n};\n\nexport const EyelashStyle = {\n Classic: 0, // Balanced clusters + lower lashes\n Manga: 1, // Bold spiked clusters\n Winged: 2, // Extended outer corner\n Wispy: 3, // Fluffy lifted tips\n Clustered: 4, // Distinct clusters\n Doll: 5 // Short doll lashes\n};\n\nexport const EyelashColor = {\n Black: 0, // Near-black (default)\n Brown: 1, // Soft brown\n SoftBlack: 2 // Slightly softer black\n};\n\nexport const PupilColor = {\n Hazel: 0, // Amber / honey brown\n Ice: 1, // Icy blue\n Mocha: 2, // Dark brown with sparkle\n Olive: 3, // Forest green\n Gloss: 4, // Glossy dark brown\n Moss: 5, // Muted olive\n Sand: 6, // Sandy beige brown\n Glow: 7, // Lower-iris crescent highlight\n Slate: 8 // Cool blue-grey\n};\n\nexport const ChromaKeyColor = {\n Green: 0,\n Blue: 1,\n Red: 2\n};\n\n/** Frame type for processing (affects temporal smoothing / tracking). */\nexport const FrameType = {\n Image: 0, // Still image\n Video: 1 // Continuous video stream\n};\n\n/** Mirror mode applied to the input before processing. */\nexport const MirrorMode = {\n None: 0, // No mirror\n Horizontal: 1, // Horizontal (e.g. front-camera selfie)\n Vertical: 2, // Vertical\n Both: 3 // Both axes\n};\n","/**\n * Browser-side console lines aligned with C++ Logger (src/base/logging.cc) Release pattern:\n * [%Y-%m-%d %H:%M:%S.%e] [facebetter] [%l] [%t] - %v\n * spdlog level names: info, warning, error (see spdlog SPDLOG_LEVEL_NAMES).\n */\n\nfunction pad2(n) {\n return String(n).padStart(2, '0');\n}\n\n/**\n * @param {'info'|'warning'|'error'} levelTag — must match spdlog long level strings\n * @param {string} message\n * @returns {string}\n */\nfunction formatLogLine(levelTag, message) {\n const d = new Date();\n const ms = String(d.getMilliseconds()).padStart(3, '0');\n const ts = `${d.getFullYear()}-${pad2(d.getMonth() + 1)}-${pad2(d.getDate())} ${pad2(\n d.getHours()\n )}:${pad2(d.getMinutes())}:${pad2(d.getSeconds())}.${ms}`;\n return `[${ts}] [facebetter] [${levelTag}] [0] - ${message}`;\n}\n\n/** @param {string} message */\nexport function logInfo(message) {\n console.info(formatLogLine('info', message));\n}\n\n/** @param {string} message */\nexport function logWarn(message) {\n console.warn(formatLogLine('warning', message));\n}\n\n/** @param {string} message */\nexport function logError(message) {\n console.error(formatLogLine('error', message));\n}\n","/**\n * Beauty Effect Engine Core\n * Platform-agnostic engine implementation with dependency injection\n */\n\nimport { EngineConfig } from './config.js';\nimport { FacebetterError, checkResult } from './errors.js';\nimport { FrameType, MirrorMode } from './constants.js';\nimport { logError, logInfo, logWarn } from './logging.js';\n\n/** Byte layouts of fb_engine_config_t / fb_log_config_t on wasm32. */\nconst FB_ENGINE_CONFIG_SIZE = 28;\nconst FB_LOG_CONFIG_SIZE = 16;\n\nfunction allocUtf8(Module, text) {\n const value = text || '';\n const len = Module.lengthBytesUTF8(value) + 1;\n const ptr = Module._malloc(len);\n Module.stringToUTF8(value, ptr, len);\n return ptr;\n}\n\nfunction writeI32(Module, ptr, index, value) {\n Module.HEAP32[(ptr >> 2) + index] = value;\n}\n\n/**\n * Beauty effect engine class\n * Provides high-level API for face beauty effects processing\n * Uses dependency injection for platform-specific functionality\n */\nexport class BeautyEffectEngine {\n /**\n * Creates a new BeautyEffectEngine instance\n * @param {EngineConfig|Object} config - EngineConfig object or configuration object\n * @param {Object} platformAPI - Platform-specific API (injected)\n * @param {Function} platformAPI.loadWasmModule - WASM module loader\n * @param {Function} platformAPI.getWasmModule - Get WASM module instance\n * @param {Function} platformAPI.getWasmBuffer - Get WASM memory buffer\n * @param {Function} platformAPI.toImageData - Convert to ImageData\n * @param {Function} [platformAPI.ensureFacebetterCanvas] - Ensure GPU canvas exists (browser only)\n * @param {Function} [platformAPI.cleanupFacebetterCanvas] - Cleanup GPU canvas (browser only)\n */\n constructor(config, platformAPI) {\n if (!config) {\n throw new FacebetterError('Config is required. Expected EngineConfig or configuration object');\n }\n\n if (!platformAPI) {\n throw new FacebetterError('Platform API is required');\n }\n\n // If an EngineConfig instance is passed, use it directly; otherwise create a new EngineConfig\n let engineConfig;\n if (config instanceof EngineConfig) {\n engineConfig = config;\n } else if (config && typeof config === 'object') {\n engineConfig = new EngineConfig(config);\n } else {\n throw new FacebetterError('Invalid configuration. Expected EngineConfig or configuration object');\n }\n\n if (!engineConfig.isValid()) {\n throw new FacebetterError('Invalid config: ' + engineConfig.toString());\n }\n\n this.config = engineConfig;\n this.licenseToken = engineConfig.licenseToken;\n this.authProxyUrl = engineConfig.authProxyUrl;\n this.fetchAuthResponse = engineConfig.fetchAuthResponse;\n this.resourcePath = '/resource.fbd';\n this.enginePtr = null;\n this.initialized = false;\n this.srcBufferPtr = null;\n this.dstBufferPtr = null;\n this.bufferSize = 0;\n \n // Callback related state\n this._callbackSharedBufferPtr = null;\n this._callbackSharedBufferSize = 0;\n \n // Store platform API\n this._platformAPI = platformAPI;\n this._loadWasmModule = platformAPI.loadWasmModule;\n this._getWasmModule = platformAPI.getWasmModule;\n this._getWasmBuffer = platformAPI.getWasmBuffer;\n this._toImageData = platformAPI.toImageData;\n this._ensureFacebetterCanvas = platformAPI.ensureFacebetterCanvas;\n this._cleanupFacebetterCanvas = platformAPI.cleanupFacebetterCanvas;\n \n // Browser-specific state\n this._facebetterCanvas = null;\n this._createdFacebetterCanvas = false;\n this._offscreenCanvas = null;\n this._offscreenCtx = null;\n \n // Automatically create facebetter_canvas if it doesn't exist (browser only)\n if (this._ensureFacebetterCanvas) {\n this._ensureFacebetterCanvas();\n }\n \n // Start loading WASM module immediately in constructor\n this._wasmLoadPromise = this._loadWasmModule();\n this._initPromise = null;\n }\n\n /**\n * Creates a timeout promise\n * @private\n * @param {number} timeout - Timeout in milliseconds\n * @param {string} operation - Operation name for error message\n * @returns {Promise} Promise that rejects after timeout\n */\n _createTimeout(timeout, operation) {\n return new Promise((_, reject) => {\n setTimeout(() => {\n reject(new FacebetterError(\n `${operation} timed out after ${timeout}ms. Please check your network connection or try increasing the timeout.`,\n 'TIMEOUT'\n ));\n }, timeout);\n });\n }\n\n /**\n * Enhances error with context information\n * @private\n * @param {Error} error - Original error\n * @param {string} context - Context information\n * @returns {FacebetterError} Enhanced error\n */\n _enhanceError(error, context) {\n if (error instanceof FacebetterError) {\n return error;\n }\n\n let errorCode = 'UNKNOWN_ERROR';\n let message = error.message || 'Unknown error occurred';\n\n // Categorize errors\n if (error.message?.includes('timeout') || error.message?.includes('TIMEOUT')) {\n errorCode = 'TIMEOUT';\n } else if (error.message?.includes('network') || error.message?.includes('fetch')) {\n errorCode = 'NETWORK_ERROR';\n } else if (error.message?.includes('WASM') || error.message?.includes('wasm')) {\n errorCode = 'WASM_LOAD_ERROR';\n } else if (error.message?.includes('license') || error.message?.includes('auth')) {\n errorCode = 'LICENSE_ERROR';\n }\n\n return new FacebetterError(\n context ? `${context}: ${message}` : message,\n errorCode\n );\n }\n\n /**\n * Initializes the engine\n * @param {Object} [options] - Initialization options\n * @param {number} [options.timeout] - Timeout in milliseconds (default: 30000 for WASM, 10000 for auth)\n * @param {number} [options.authTimeout] - Timeout for online authentication in milliseconds (default: 10000)\n * @returns {Promise<void>} Promise that resolves when initialization is complete\n */\n async init(options = {}) {\n // Concurrency control: if already initialized, return immediately\n if (this.initialized) {\n return;\n }\n\n // Concurrency control: if initialization is in progress, return the same Promise\n if (this._initPromise) {\n return this._initPromise;\n }\n\n // Create initialization Promise\n this._initPromise = (async () => {\n try {\n const wasmTimeout = options.timeout || 30000;\n\n // Wait for WASM module loading (with timeout)\n try {\n await Promise.race([\n this._wasmLoadPromise,\n this._createTimeout(wasmTimeout, 'WASM module loading')\n ]);\n } catch (error) {\n throw this._enhanceError(error, 'Failed to load WASM module');\n }\n\n const Module = this._getWasmModule();\n\n // Setup usage report proxy for WASM\n if (!Module.onReportUsage) {\n Module.onReportUsage = async (payloadJson) => {\n try {\n const payload = JSON.parse(payloadJson);\n if (!payload.app_id || !payload.hmac_signature) {\n return true;\n }\n const url = 'https://facebetter.pixpark.net/facebetter/v1/report';\n const response = await fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: payloadJson\n });\n return response.ok;\n } catch (error) {\n return false;\n }\n };\n }\n\n // Web v2 auth: never accept appId/appKey in the browser.\n // - licenseToken: pre-fetched JWS or `{success, token}` body\n // - authProxyUrl: production — forward the challenge to your server\n // - fetchAuthResponse: custom hook; locally use createDirectAuthFetcher\n if (!this.licenseToken) {\n if (typeof this.fetchAuthResponse === 'function') {\n Module.onOnlineAuth = async (payloadJson) => {\n try {\n const challenge = JSON.parse(payloadJson);\n const result = await this.fetchAuthResponse(challenge);\n if (result && typeof result === 'object' && typeof result.response === 'string') {\n return { response: result.response };\n }\n if (typeof result === 'string') {\n return result;\n }\n if (result && typeof result === 'object') {\n return JSON.stringify(result);\n }\n return '';\n } catch (err) {\n logWarn(\n `Online license: fetchAuthResponse error${err?.message ? `: ${err.message}` : ''}`\n );\n return JSON.stringify({\n success: false,\n error: 'auth_fetch_failed',\n message: err?.message || 'auth fetch failed',\n });\n }\n };\n } else if (this.authProxyUrl) {\n Module.onOnlineAuth = async (payloadJson) => {\n logInfo('Online license: proxying auth challenge');\n try {\n const response = await fetch(this.authProxyUrl, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: payloadJson,\n });\n if (!response.ok) {\n logWarn(`Online license: proxy HTTP ${response.status}`);\n return '';\n }\n const text = await response.text();\n logInfo('Online license: proxy response ok');\n return text;\n } catch (err) {\n logWarn(\n `Online license: proxy error${err?.message ? `: ${err.message}` : ''}`\n );\n return '';\n }\n };\n } else {\n throw new FacebetterError(\n 'Web auth requires licenseToken, authProxyUrl, or fetchAuthResponse.',\n 'LICENSE_ERROR'\n );\n }\n }\n\n // C ABI still has app_id/app_key slots; leave them empty on Web.\n const appIdPtr = allocUtf8(Module, '');\n const appKeyPtr = allocUtf8(Module, '');\n const licensePtr = allocUtf8(Module, this.licenseToken);\n const resourcePtr = allocUtf8(Module, this.resourcePath);\n const configPtr = Module._malloc(FB_ENGINE_CONFIG_SIZE);\n writeI32(Module, configPtr, 0, appIdPtr);\n writeI32(Module, configPtr, 1, appKeyPtr);\n writeI32(Module, configPtr, 2, licensePtr);\n writeI32(Module, configPtr, 3, resourcePtr);\n writeI32(Module, configPtr, 4, 0);\n writeI32(Module, configPtr, 5, this.config.externalContext ? 1 : 0);\n writeI32(Module, configPtr, 6, 0);\n\n let enginePtr = 0;\n try {\n enginePtr = Module.ccall(\n 'fb_engine_create',\n 'number',\n ['number'],\n [configPtr]\n );\n } finally {\n Module._free(configPtr);\n Module._free(appIdPtr);\n Module._free(appKeyPtr);\n Module._free(licensePtr);\n Module._free(resourcePtr);\n }\n\n if (!enginePtr) {\n throw new FacebetterError(\n 'Failed to create BeautyEffect engine. This may be due to invalid license or resource path issues.',\n 'ENGINE_CREATE_FAILED'\n );\n }\n\n this.enginePtr = enginePtr;\n this.initialized = true;\n this._initPromise = null; // Clear Promise cache, allow re-initialization (if needed)\n } catch (error) {\n this._initPromise = null; // Clear Promise cache, allow retry\n throw error;\n }\n })();\n\n return this._initPromise;\n }\n\n /**\n * Destroys the engine and releases resources\n */\n destroy() {\n if (!this.initialized || !this.enginePtr) {\n return;\n }\n\n const Module = this._getWasmModule();\n\n if (this.srcBufferPtr) {\n Module._free(this.srcBufferPtr);\n this.srcBufferPtr = null;\n }\n\n if (this.dstBufferPtr) {\n Module._free(this.dstBufferPtr);\n this.dstBufferPtr = null;\n }\n\n // Clean up shared memory\n if (this._callbackSharedBufferPtr) {\n Module._free(this._callbackSharedBufferPtr);\n this._callbackSharedBufferPtr = null;\n this._callbackSharedBufferSize = 0;\n }\n\n Module.ccall('fb_engine_destroy', null, ['number'], [this.enginePtr]);\n if (Module._engine_event_callbacks) {\n delete Module._engine_event_callbacks[this.enginePtr];\n }\n this.enginePtr = null;\n this.initialized = false;\n this.bufferSize = 0;\n this._initPromise = null; // Clear initialization Promise\n \n // Clean up offscreen canvas\n if (this._offscreenCanvas) {\n this._offscreenCanvas = null;\n this._offscreenCtx = null;\n }\n \n // Clean up facebetter_canvas if we created it\n if (this._cleanupFacebetterCanvas) {\n this._cleanupFacebetterCanvas();\n }\n }\n\n /**\n * Sets log configuration\n * Can be called before init() since fb_set_log_config is a global function\n * @param {Object} config - Log configuration\n * @param {boolean} config.consoleEnabled - Enable console logging\n * @param {boolean} config.fileEnabled - Enable file logging\n * @param {number} config.level - Log level\n * @param {string} config.fileName - Log file name\n * @returns {Promise<void>} Promise that resolves when log config is set\n */\n async setLogConfig(config) {\n // Wait for WASM module to be loaded (started in constructor)\n await this._wasmLoadPromise;\n const Module = this._getWasmModule();\n\n const fileNamePtr = allocUtf8(Module, config.fileName);\n const configPtr = Module._malloc(FB_LOG_CONFIG_SIZE);\n writeI32(Module, configPtr, 0, config.consoleEnabled ? 1 : 0);\n writeI32(Module, configPtr, 1, config.fileEnabled ? 1 : 0);\n writeI32(Module, configPtr, 2, config.level || 0);\n writeI32(Module, configPtr, 3, fileNamePtr);\n\n let result;\n try {\n result = Module.ccall(\n 'fb_set_log_config',\n 'number',\n ['number'],\n [configPtr]\n );\n } finally {\n Module._free(configPtr);\n Module._free(fileNamePtr);\n }\n\n checkResult(result, 'Failed to set log config');\n }\n\n /**\n * Sets skin smoothing intensity\n * @param {number} value - Parameter value (0.0 - 1.0)\n */\n setSmoothing(value) {\n this._ensureInitialized();\n this._setIntensity('fb_set_smoothing', value);\n }\n\n /**\n * Sets skin smoothing style\n * @param {number} style - Style (use SmoothingStyle enum, e.g., SmoothingStyle.Natural)\n */\n setSmoothingStyle(style) {\n this._setMakeupStyle('fb_set_smoothing_style', style, 'Failed to set smoothing style');\n }\n\n /**\n * Sets skin whitening intensity\n * @param {number} value - Parameter value (0.0 - 1.0)\n */\n setWhitening(value) {\n this._ensureInitialized();\n this._setIntensity('fb_set_whitening', value);\n }\n\n /**\n * Sets whitening style by swapping the custom LUT\n * @param {number} style - Style (use WhiteningStyle enum, e.g., WhiteningStyle.ColdWhite)\n */\n setWhiteningStyle(style) {\n this._setMakeupStyle('fb_set_whitening_style', style, 'Failed to set whitening style');\n }\n\n /**\n * Sets image sharpening intensity\n * @param {number} value - Parameter value (0.0 - 1.0)\n */\n setSharpening(value) {\n this._ensureInitialized();\n this._setIntensity('fb_set_sharpening', value);\n }\n\n /**\n * Sets skin rosiness intensity\n * @param {number} value - Parameter value (0.0 - 1.0)\n */\n setRosiness(value) {\n this._ensureInitialized();\n this._setIntensity('fb_set_rosiness', value);\n }\n\n /**\n * Sets a reshape parameter\n * @param {number} param - Parameter (use Reshape enum, e.g., Reshape.FaceThin)\n * @param {number} value - Parameter value in [-1.0, 1.0]. 0 is off.\n */\n setReshape(param, value) {\n this._ensureInitialized();\n this._setBeautyParam('fb_set_reshape', param, value);\n }\n\n /**\n * Sets lipstick intensity\n * @param {number} value - Parameter value (0.0 - 1.0)\n */\n setLipstick(value) {\n this._ensureInitialized();\n this._setIntensity('fb_set_lipstick', value);\n }\n\n /**\n * Sets lipstick colour preset\n * @param {number} style - Style (use LipstickColor enum, e.g., LipstickColor.Rouge)\n */\n setLipstickColor(style) {\n this._setMakeupStyle('fb_set_lipstick_color', style, 'Failed to set lipstick style');\n }\n\n /**\n * Sets blush intensity\n * @param {number} value - Parameter value (0.0 - 1.0)\n */\n setBlush(value) {\n this._ensureInitialized();\n this._setIntensity('fb_set_blush', value);\n }\n\n setBlushStyle(style) {\n this._setMakeupStyle('fb_set_blush_style', style, 'Failed to set blush style');\n }\n\n setBlushColor(color) {\n this._setMakeupStyle('fb_set_blush_color', color, 'Failed to set blush color');\n }\n\n setContour(value) {\n this._ensureInitialized();\n this._setIntensity('fb_set_contour', value);\n }\n\n setContourStyle(style) {\n this._setMakeupStyle('fb_set_contour_style', style, 'Failed to set contour style');\n }\n\n setEyeShadow(value) {\n this._ensureInitialized();\n this._setIntensity('fb_set_eye_shadow', value);\n }\n\n setEyeShadowStyle(style) {\n this._setMakeupStyle('fb_set_eye_shadow_style', style, 'Failed to set eyeshadow style');\n }\n\n setEyeShadowColor(style) {\n this._setMakeupStyle('fb_set_eye_shadow_color', style, 'Failed to set eyeshadow style');\n }\n\n setEyeLiner(value) {\n this._ensureInitialized();\n this._setIntensity('fb_set_eye_liner', value);\n }\n\n setEyeLinerStyle(style) {\n this._setMakeupStyle('fb_set_eye_liner_style', style, 'Failed to set eyeliner style');\n }\n\n setEyeLinerColor(style) {\n this._setMakeupStyle('fb_set_eye_liner_color', style, 'Failed to set eyeliner style');\n }\n\n setEyebrow(value) {\n this._ensureInitialized();\n this._setIntensity('fb_set_eyebrow', value);\n }\n\n setEyebrowStyle(style) {\n this._setMakeupStyle('fb_set_eyebrow_style', style, 'Failed to set eyebrow style');\n }\n\n setEyebrowColor(style) {\n this._setMakeupStyle('fb_set_eyebrow_color', style, 'Failed to set eyebrow style');\n }\n\n setEyelash(value) {\n this._ensureInitialized();\n this._setIntensity('fb_set_eyelash', value);\n }\n\n setEyelashStyle(style) {\n this._setMakeupStyle('fb_set_eyelash_style', style, 'Failed to set eyelash style');\n }\n\n setEyelashColor(style) {\n this._setMakeupStyle('fb_set_eyelash_color', style, 'Failed to set eyelash style');\n }\n\n setPupil(value) {\n this._ensureInitialized();\n this._setIntensity('fb_set_pupil', value);\n }\n\n setPupilColor(style) {\n this._setMakeupStyle('fb_set_pupil_color', style, 'Failed to set pupil style');\n }\n\n /**\n * Uses chroma keying as the virtual-background mask.\n * Fill is still controlled by setVirtualBackgroundBlur / setVirtualBackground.\n * @param {number} color - Key colour (use ChromaKeyColor enum)\n */\n setChromaKey(color) {\n this._setMakeupStyle('fb_set_chroma_key', color, 'Failed to set chroma key');\n }\n\n /**\n * Turns off chroma keying and restores portrait-segmentation as the mask.\n */\n clearChromaKey() {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const result = Module.ccall(\n 'fb_clear_chroma_key',\n 'number',\n ['number'],\n [this.enginePtr]\n );\n checkResult(result, 'Failed to clear chroma key');\n }\n\n /** How close a pixel must be to the key colour to be keyed out. [0.0, 1.0]. */\n setChromaKeySimilarity(value) {\n this._setChromaKeyFloat('fb_set_chroma_key_similarity', value);\n }\n\n /** Edge feather around the key. [0.0, 1.0]. */\n setChromaKeySmoothness(value) {\n this._setChromaKeyFloat('fb_set_chroma_key_smoothness', value);\n }\n\n /** Spill suppression on semi-transparent edges. [0.0, 1.0]. */\n setChromaKeyDesaturation(value) {\n this._setChromaKeyFloat('fb_set_chroma_key_desaturation', value);\n }\n\n _setChromaKeyFloat(cFuncName, value) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const result = Module.ccall(\n cFuncName,\n 'number',\n ['number', 'number'],\n [this.enginePtr, value]\n );\n checkResult(result, `Failed to call ${cFuncName}`);\n }\n\n /**\n * Applies a LUT filter from a file path or in-memory .fbd data.\n * @param {string|Uint8Array} resource - Path to .fbd file or Uint8Array data.\n */\n setFilter(resource) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n\n if (typeof resource === 'string') {\n if (!resource) {\n throw new FacebetterError('Filter path must not be empty; use clearFilter()');\n }\n const result = Module.ccall(\n 'fb_set_filter',\n 'number',\n ['number', 'string'],\n [this.enginePtr, resource]\n );\n checkResult(result, 'Failed to set filter from path');\n return;\n }\n\n if (resource instanceof Uint8Array) {\n const dataPtr = Module._malloc(resource.length);\n Module.HEAPU8.set(resource, dataPtr);\n try {\n const result = Module.ccall(\n 'fb_set_filter_data',\n 'number',\n ['number', 'number', 'number'],\n [this.enginePtr, dataPtr, resource.length]\n );\n checkResult(result, 'Failed to set filter from data');\n } finally {\n Module._free(dataPtr);\n }\n return;\n }\n\n throw new FacebetterError('Filter resource must be a string path or Uint8Array');\n }\n\n /**\n * Clears the current LUT filter.\n */\n clearFilter() {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const result = Module.ccall(\n 'fb_clear_filter',\n 'number',\n ['number'],\n [this.enginePtr]\n );\n checkResult(result, 'Failed to clear filter');\n }\n\n /**\n * Sets the intensity of the current filter\n * @param {number} intensity - Filter intensity (0.0 - 1.0)\n */\n setFilterIntensity(intensity) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const result = Module.ccall(\n 'fb_set_filter_intensity',\n 'number',\n ['number', 'number'],\n [this.enginePtr, intensity]\n );\n checkResult(result, 'Failed to set filter intensity');\n }\n\n /**\n * Applies a 2D sticker from a file path or in-memory .fbd data.\n * @param {string|Uint8Array} resource - Path to .fbd file or Uint8Array data.\n */\n setSticker(resource) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n\n if (typeof resource === 'string') {\n if (!resource) {\n throw new FacebetterError('Sticker path must not be empty; use clearSticker()');\n }\n const result = Module.ccall(\n 'fb_set_sticker',\n 'number',\n ['number', 'string'],\n [this.enginePtr, resource]\n );\n checkResult(result, 'Failed to set sticker from path');\n return;\n }\n\n if (resource instanceof Uint8Array) {\n const dataPtr = Module._malloc(resource.length);\n Module.HEAPU8.set(resource, dataPtr);\n try {\n const result = Module.ccall(\n 'fb_set_sticker_data',\n 'number',\n ['number', 'number', 'number'],\n [this.enginePtr, dataPtr, resource.length]\n );\n checkResult(result, 'Failed to set sticker from data');\n } finally {\n Module._free(dataPtr);\n }\n return;\n }\n\n throw new FacebetterError('Sticker resource must be a string path or Uint8Array');\n }\n\n /**\n * Clears the current 2D sticker.\n */\n clearSticker() {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const result = Module.ccall(\n 'fb_clear_sticker',\n 'number',\n ['number'],\n [this.enginePtr]\n );\n checkResult(result, 'Failed to clear sticker');\n }\n\n /**\n * Internal method to set a single intensity parameter\n * @private\n */\n _setIntensity(functionName, value) {\n if (value < 0 || value > 1) {\n throw new FacebetterError('Parameter value must be between 0.0 and 1.0');\n }\n\n const Module = this._getWasmModule();\n const result = Module.ccall(\n functionName,\n 'number',\n ['number', 'number'],\n [this.enginePtr, value]\n );\n\n checkResult(result, `Failed to set beauty parameter`);\n }\n\n _setMakeupStyle(cFuncName, value, errorMessage) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const result = Module.ccall(\n cFuncName,\n 'number',\n ['number', 'number'],\n [this.enginePtr, value]\n );\n checkResult(result, errorMessage);\n }\n\n /**\n * Internal method to set beauty parameters\n * @private\n */\n _setBeautyParam(functionName, param, value) {\n if (value < -1 || value > 1) {\n throw new FacebetterError('Parameter value must be between -1.0 and 1.0');\n }\n\n const Module = this._getWasmModule();\n const result = Module.ccall(\n functionName,\n 'number',\n ['number', 'number', 'number'],\n [this.enginePtr, param, value]\n );\n\n checkResult(result, `Failed to set beauty parameter`);\n }\n\n /**\n * Sets engine callbacks (face landmarks and engine events)\n * @param {Object} callbacks - Callback functions\n * @param {Function} [callbacks.onFaceLandmarks] - Callback for face landmarks detection\n * @param {Function} [callbacks.onEngineEvent] - Callback for license / init events (code, message)\n * @param {number} [callbacks.maxFaces=10] - Maximum number of faces to support (affects shared buffer size)\n */\n setCallbacks(callbacks) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n\n if (!Module._engine_event_callbacks) {\n Module._engine_event_callbacks = {};\n }\n if (callbacks && typeof callbacks.onEngineEvent === 'function') {\n Module._engine_event_callbacks[this.enginePtr] = callbacks.onEngineEvent;\n } else {\n delete Module._engine_event_callbacks[this.enginePtr];\n }\n\n // Initialize callback storage (if it doesn't exist)\n if (!Module._face_landmarks_callbacks) {\n Module._face_landmarks_callbacks = [];\n }\n \n let callbackId = 0;\n let sharedBufferPtr = null;\n let sharedBufferSize = 0;\n \n if (callbacks && callbacks.onFaceLandmarks) {\n // Get max faces (default 10)\n const maxFaces = callbacks.maxFaces || 10;\n \n // Pre-allocate shared memory\n // Metadata: 2 ints (frame_number, face_count) = 8 bytes\n // Face data: maxFaces * 342 floats * 4 bytes = maxFaces * 1368 bytes\n const metadataSize = 2 * 4; // 2 ints\n const faceDataSize = maxFaces * 342 * 4; // 342 floats per face\n sharedBufferSize = metadataSize + faceDataSize;\n sharedBufferPtr = Module._malloc(sharedBufferSize);\n \n if (!sharedBufferPtr) {\n throw new FacebetterError('Failed to allocate shared buffer for callbacks');\n }\n \n // Register callback function (internal wrapper, reads data from shared memory)\n // Push first, then get index as callbackId (allows callbackId to be 0)\n Module._face_landmarks_callbacks.push(\n (frameNumber, faceCount, dataPtr) => {\n // Read data from shared memory (zero-copy)\n const heap = Module.HEAPF32;\n const dataOffset = dataPtr / 4; // float is 4 bytes\n \n const results = [];\n const FLOATS_PER_FACE = 342;\n \n for (let i = 0; i < faceCount; i++) {\n const faceOffset = dataOffset + i * FLOATS_PER_FACE;\n let offset = faceOffset;\n \n // Read rect\n const rect = {\n x: heap[offset++],\n y: heap[offset++],\n width: heap[offset++],\n height: heap[offset++]\n };\n \n // Read basic fields\n const faceId = Math.round(heap[offset++]);\n const score = heap[offset++];\n const pitch = heap[offset++];\n const roll = heap[offset++];\n const yaw = heap[offset++];\n \n // Read key_points (111 points)\n const keyPoints = [];\n for (let j = 0; j < 111; j++) {\n keyPoints.push({\n x: heap[offset++],\n y: heap[offset++]\n });\n }\n \n // Read visibility (111 points)\n const visibility = [];\n for (let j = 0; j < 111; j++) {\n visibility.push(heap[offset++]);\n }\n \n results.push({\n rect,\n key_points: keyPoints,\n visibility,\n face_id: faceId,\n score,\n pitch,\n roll,\n yaw\n });\n }\n \n // Call user callback\n callbacks.onFaceLandmarks(results);\n }\n );\n \n // Get callback ID (index after push, can be 0)\n callbackId = Module._face_landmarks_callbacks.length - 1;\n }\n \n // Call C API\n const result = Module.ccall(\n 'fb_engine_set_wasm_callbacks',\n 'number',\n ['number', 'number', 'number', 'number'],\n [\n this.enginePtr,\n callbackId,\n sharedBufferPtr || 0,\n sharedBufferSize\n ]\n );\n \n checkResult(result, 'Failed to set callbacks');\n \n // Clean up old shared memory (if it exists)\n if (this._callbackSharedBufferPtr) {\n Module._free(this._callbackSharedBufferPtr);\n }\n \n // Store new shared memory pointer for cleanup\n if (sharedBufferPtr) {\n this._callbackSharedBufferPtr = sharedBufferPtr;\n this._callbackSharedBufferSize = sharedBufferSize;\n } else {\n this._callbackSharedBufferPtr = null;\n this._callbackSharedBufferSize = 0;\n }\n }\n\n /**\n * Enables virtual background blur.\n * Level is continuous in [0.0, 1.0] (downsample + mix, no shader rebuild).\n * @param {number} level - Blur strength in [0.0, 1.0]. 0 clears the virtual background.\n */\n setVirtualBackgroundBlur(level) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const result = Module.ccall(\n 'fb_set_virtual_background_blur',\n 'number',\n ['number', 'number'],\n [this.enginePtr, level]\n );\n checkResult(result, 'Failed to set virtual background blur');\n }\n\n /**\n * Replaces the background with an image file path or encoded png/jpg bytes.\n * @param {string|Uint8Array} resource - Image path or Uint8Array data.\n */\n setVirtualBackground(resource) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n\n if (typeof resource === 'string') {\n if (!resource) {\n throw new FacebetterError(\n 'Virtual background path must not be empty; use clearVirtualBackground()'\n );\n }\n const result = Module.ccall(\n 'fb_set_virtual_background',\n 'number',\n ['number', 'string'],\n [this.enginePtr, resource]\n );\n checkResult(result, 'Failed to set virtual background from path');\n return;\n }\n\n if (resource instanceof Uint8Array) {\n const dataPtr = Module._malloc(resource.length);\n Module.HEAPU8.set(resource, dataPtr);\n try {\n const result = Module.ccall(\n 'fb_set_virtual_background_data',\n 'number',\n ['number', 'number', 'number'],\n [this.enginePtr, dataPtr, resource.length]\n );\n checkResult(result, 'Failed to set virtual background from data');\n } finally {\n Module._free(dataPtr);\n }\n return;\n }\n\n throw new FacebetterError(\n 'setVirtualBackground expects a file path string or Uint8Array'\n );\n }\n\n /**\n * Clears virtual background (blur or image replacement).\n */\n clearVirtualBackground() {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const result = Module.ccall(\n 'fb_clear_virtual_background',\n 'number',\n ['number'],\n [this.enginePtr]\n );\n checkResult(result, 'Failed to clear virtual background');\n }\n\n /**\n * Sets whether to apply beauty effects only on skin regions.\n * When enabled, beauty effects will only be applied to detected skin areas.\n * @param {boolean} enabled - True to enable skin-only beauty, false to apply to entire image.\n */\n setBeautySkinOnly(enabled) {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n\n const result = Module.ccall(\n 'fb_set_beauty_skin_only',\n 'number',\n ['number', 'number'],\n [this.enginePtr, enabled ? 1 : 0]\n );\n\n checkResult(result, 'Failed to set skin only beauty');\n }\n\n /**\n * Gets engine performance statistics.\n * @returns {{fps: number, avgProcessTimeMs: number, sessionTimeS: number}}\n */\n getStats() {\n this._ensureInitialized();\n const Module = this._getWasmModule();\n const ptr = Module._malloc(24);\n try {\n const result = Module.ccall(\n 'fb_engine_get_stats',\n 'number',\n ['number', 'number'],\n [this.enginePtr, ptr]\n );\n checkResult(result, 'Failed to get stats');\n if ((ptr & 7) !== 0) {\n throw new FacebetterError('Unaligned stats buffer');\n }\n const base = ptr >> 3;\n return {\n fps: Module.HEAPF64[base],\n avgProcessTimeMs: Module.HEAPF64[base + 1],\n sessionTimeS: Module.HEAPF64[base + 2]\n };\n } finally {\n Module._free(ptr);\n }\n }\n\n /**\n * Ensures buffers are allocated for the given dimensions\n * @private\n */\n _ensureBuffers(width, height) {\n const requiredSize = width * height * 4;\n\n if (this.bufferSize < requiredSize) {\n const Module = this._getWasmModule();\n\n if (this.srcBufferPtr) {\n Module._free(this.srcBufferPtr);\n }\n if (this.dstBufferPtr) {\n Module._free(this.dstBufferPtr);\n }\n\n this.srcBufferPtr = Module._malloc(requiredSize);\n this.dstBufferPtr = Module._malloc(requiredSize);\n this.bufferSize = requiredSize;\n\n if (!this.srcBufferPtr || !this.dstBufferPtr) {\n throw new FacebetterError('Failed to allocate memory buffers');\n }\n }\n }\n\n /**\n * Processes an image\n * @param {ImageData|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|Uint8ClampedArray} input - Input image\n * @param {number} width - Image width (required if input is Uint8ClampedArray)\n * @param {number} height - Image height (required if input is Uint8ClampedArray)\n * @param {number} frameType - Frame type (use FrameType enum, default: FrameType.Video)\n * @param {number} mirrorMode - Mirror mode applied to input before processing (MirrorMode enum, default: MirrorMode.None)\n * @returns {ImageData} Processed image data\n */\n processImage(input, width, height, frameType = FrameType.Video, mirrorMode = MirrorMode.None) {\n this._ensureInitialized();\n const imageData = this._platformAPI.toImageData(input, width, height);\n const Module = this._getWasmModule();\n\n this._ensureBuffers(imageData.width, imageData.height);\n\n const bufferSize = imageData.width * imageData.height * 4;\n\n try {\n const buffer = this._getWasmBuffer();\n \n const srcView = new Uint8Array(buffer, this.srcBufferPtr, bufferSize);\n srcView.set(imageData.data);\n\n const result = Module.ccall(\n 'fb_process_rgba',\n 'number',\n ['number', 'number', 'number', 'number', 'number', 'number', 'number', 'number'],\n [\n this.enginePtr,\n this.srcBufferPtr,\n imageData.width,\n imageData.height,\n imageData.width * 4,\n this.dstBufferPtr,\n frameType,\n mirrorMode\n ]\n );\n\n checkResult(result, 'Failed to process image');\n\n const currentBuffer = this._getWasmBuffer();\n const dstView = new Uint8Array(currentBuffer, this.dstBufferPtr, bufferSize);\n const processedData = new Uint8ClampedArray(dstView);\n\n return new ImageData(processedData, imageData.width, imageData.height);\n } catch (error) {\n if (error instanceof FacebetterError) {\n throw error;\n }\n throw new FacebetterError(`Image processing error: ${error.message}`);\n }\n }\n\n /**\n * Processes an external GPU texture.\n *\n * Note:\n * - This interface is mainly used for integration with internal WASM or advanced scenarios.\n * - textureHandle must be a texture handle (uint32) compatible with the OpenGL/WebGL context used by WASM.\n * - For common web scenarios, it is recommended to use processImage with ImageData/Canvas etc.\n *\n * @param {number} textureHandle - External texture handle (GL_TEXTURE_2D)\n * @param {number} width - Texture width\n * @param {number} height - Texture height\n * @param {number} stride - Row stride (usually width * 4)\n * @param {number} [frameType] - Frame type (FrameType.Image / FrameType.Video)\n * @param {number} [mirrorMode] - Mirror mode (MirrorMode enum; texture path does not support mirror, param reserved)\n * @returns {number} Processed texture handle (GL_TEXTURE_2D, uint32)\n */\n processTexture(textureHandle,\n width,\n height,\n stride,\n frameType = FrameType.Video,\n mirrorMode = MirrorMode.None) {\n this._ensureInitialized();\n if (!textureHandle || width <= 0 || height <= 0 || stride <= 0) {\n throw new FacebetterError('Invalid textureHandle or dimensions for processTexture');\n }\n\n const Module = this._getWasmModule();\n\n try {\n const result = Module.ccall(\n 'fb_process_texture',\n 'number',\n ['number', 'number', 'number', 'number', 'number', 'number', 'number'],\n [\n this.enginePtr,\n textureHandle,\n width,\n height,\n stride,\n frameType,\n mirrorMode\n ]\n );\n\n if (!result || result === 0) {\n throw new FacebetterError('Failed to process external texture or got invalid output texture');\n }\n\n // Return processed texture handle for caller to continue using in same GL context\n return result;\n } catch (error) {\n if (error instanceof FacebetterError) {\n throw error;\n }\n throw new FacebetterError(`Texture processing error: ${error.message}`);\n }\n }\n\n /**\n * Ensures the engine is initialized\n * @private\n * @throws {FacebetterError} If engine is not initialized\n */\n _ensureInitialized() {\n if (!this.initialized || !this.enginePtr) {\n throw new FacebetterError('Engine not initialized. Call init() first.');\n }\n }\n\n /**\n * Ensures facebetter_canvas exists in the DOM (browser only)\n * This canvas is required by GPUPixel for WebGL context creation\n * @private\n */\n _ensureFacebetterCanvas() {\n if (typeof document === 'undefined') {\n return;\n }\n \n let canvas = document.getElementById('facebetter_canvas');\n if (!canvas) {\n canvas = document.createElement('canvas');\n canvas.id = 'facebetter_canvas';\n canvas.style.display = 'none';\n canvas.width = 1;\n canvas.height = 1;\n document.body.appendChild(canvas);\n this._createdFacebetterCanvas = true;\n }\n this._facebetterCanvas = canvas;\n }\n\n /**\n * Cleans up facebetter_canvas if it was created by this engine instance (browser only)\n * @private\n */\n _cleanupFacebetterCanvas() {\n if (this._createdFacebetterCanvas && this._facebetterCanvas) {\n this._facebetterCanvas.remove();\n this._facebetterCanvas = null;\n this._createdFacebetterCanvas = false;\n }\n }\n\n /**\n * Ensures offscreen canvas exists and matches the required dimensions (browser only)\n * This canvas is reused for video processing to avoid creating temporary canvases\n * @private\n * @param {number} width - Required canvas width\n * @param {number} height - Required canvas height\n */\n _ensureOffscreenCanvas(width, height) {\n if (typeof document === 'undefined') {\n return null;\n }\n \n if (!this._offscreenCanvas || \n this._offscreenCanvas.width !== width || \n this._offscreenCanvas.height !== height) {\n this._offscreenCanvas = document.createElement('canvas');\n this._offscreenCanvas.width = width;\n this._offscreenCanvas.height = height;\n this._offscreenCtx = this._offscreenCanvas.getContext('2d', { willReadFrequently: true });\n }\n return this._offscreenCanvas;\n }\n\n}\n","import { FacebetterError } from './errors.js';\n\n/** Cloudflare v2 online auth URL. Proxy through your server in production; never ship keys in the frontend bundle. */\nexport const FACEBETTER_AUTH_URL =\n 'https://facebetter.pixpark.net/facebetter/v2/auth';\n\nfunction toHex(buffer) {\n return Array.from(new Uint8Array(buffer), (b) =>\n b.toString(16).padStart(2, '0')\n ).join('');\n}\n\nasync function hmacSha256Hex(key, message) {\n const encoder = new TextEncoder();\n const cryptoKey = await crypto.subtle.importKey(\n 'raw',\n encoder.encode(key),\n { name: 'HMAC', hash: 'SHA-256' },\n false,\n ['sign']\n );\n const signature = await crypto.subtle.sign(\n 'HMAC',\n cryptoKey,\n encoder.encode(message)\n );\n return toHex(signature);\n}\n\n/**\n * Call Cloudflare v2/auth directly with app_id / app_key.\n * Intended for local debugging, or environments where key leakage is not a risk.\n *\n * @param {Object} options\n * @param {string} options.appId\n * @param {string} options.appKey\n * @param {Object} options.challenge WASM challenge `{nonce, timestamp, platform, user_agent}`\n * @param {string} [options.authUrl]\n * @returns {Promise<string>} Raw HTTP body (`{success, token}` or an error envelope)\n */\nexport async function requestFacebetterAuth({\n appId,\n appKey,\n challenge,\n authUrl = FACEBETTER_AUTH_URL,\n}) {\n const id = typeof appId === 'string' ? appId.trim() : '';\n const key = typeof appKey === 'string' ? appKey.trim() : '';\n if (!id || !key) {\n throw new FacebetterError(\n 'requestFacebetterAuth requires appId and appKey',\n 'LICENSE_ERROR'\n );\n }\n if (!challenge || typeof challenge !== 'object') {\n throw new FacebetterError(\n 'requestFacebetterAuth requires a WASM auth challenge',\n 'LICENSE_ERROR'\n );\n }\n\n const nonce = String(challenge.nonce || '');\n const timestamp = Number(challenge.timestamp);\n const platform = String(challenge.platform || 'web');\n const userAgent = String(challenge.user_agent || '');\n const payload = `v2|${id}|${timestamp}|${nonce}|${platform}`;\n const hmac = await hmacSha256Hex(key, payload);\n\n const response = await fetch(authUrl, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n app_id: id,\n hmac_signature: hmac,\n timestamp,\n nonce,\n platform,\n user_agent: userAgent,\n }),\n });\n return response.text();\n}\n\n/**\n * Build an `EngineConfig.fetchAuthResponse` that talks to Cloudflare directly\n * (no customer proxy).\n *\n * @param {Object} options\n * @param {string} options.appId\n * @param {string} options.appKey\n * @param {string} [options.authUrl]\n * @returns {(challenge: Object) => Promise<string>}\n */\nexport function createDirectAuthFetcher({ appId, appKey, authUrl } = {}) {\n return (challenge) =>\n requestFacebetterAuth({ appId, appKey, challenge, authUrl });\n}\n","/**\n * Browser-specific Image Utilities\n * Uses DOM APIs (canvas, ImageData, etc.)\n */\n\nimport { FacebetterError } from '../core/errors.js';\n\n/**\n * Converts various image sources to ImageData (browser version)\n * @param {ImageData|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|Uint8ClampedArray} source - Image source\n * @param {number} width - Image width (required if source is Uint8ClampedArray)\n * @param {number} height - Image height (required if source is Uint8ClampedArray)\n * @returns {ImageData} ImageData object\n */\nexport function toImageData(source, width, height) {\n if (source instanceof ImageData) {\n return source;\n }\n\n if (source instanceof HTMLCanvasElement || source instanceof HTMLVideoElement) {\n const canvas = source instanceof HTMLCanvasElement ? source : document.createElement('canvas');\n if (source instanceof HTMLVideoElement) {\n canvas.width = source.videoWidth;\n canvas.height = source.videoHeight;\n const ctx = canvas.getContext('2d');\n ctx.drawImage(source, 0, 0);\n }\n const ctx = canvas.getContext('2d');\n return ctx.getImageData(0, 0, canvas.width, canvas.height);\n }\n\n if (source instanceof HTMLImageElement) {\n const canvas = document.createElement('canvas');\n canvas.width = source.naturalWidth || source.width;\n canvas.height = source.naturalHeight || source.height;\n const ctx = canvas.getContext('2d');\n ctx.drawImage(source, 0, 0);\n return ctx.getImageData(0, 0, canvas.width, canvas.height);\n }\n\n if (source instanceof Uint8ClampedArray) {\n if (width === undefined || height === undefined) {\n throw new FacebetterError('Width and height are required when source is Uint8ClampedArray');\n }\n return new ImageData(source, width, height);\n }\n\n throw new FacebetterError('Unsupported image source type');\n}\n\n/**\n * Gets User-Agent string for web platform\n * @returns {string} User-Agent string\n */\nexport function getUserAgentString() {\n return 'FB/1.0 (web; wasm32)';\n}\n\n/**\n * Generates HMAC-SHA256 signature (browser version)\n * @param {string} key - HMAC key (app_key)\n * @param {string} data - Data to sign (timestamp string)\n * @returns {Promise<string>} Promise that resolves with hex-encoded signature\n */\nexport async function generateHMACSignature(key, data) {\n const encoder = new TextEncoder();\n const keyData = encoder.encode(key);\n const messageData = encoder.encode(data);\n\n const cryptoKey = await crypto.subtle.importKey(\n 'raw',\n keyData,\n { name: 'HMAC', hash: 'SHA-256' },\n false,\n ['sign']\n );\n\n const signature = await crypto.subtle.sign('HMAC', cryptoKey, messageData);\n\n // Convert to hex string\n const hashArray = Array.from(new Uint8Array(signature));\n const hashHex = hashArray.map(b => b.toString(16).padStart(2, '0')).join('');\n return hashHex;\n}\n\n","/**\n * ESM Entry Point\n * For Vue/React/Vite/Webpack (ES Module)\n * Uses facebetter-core npm package for WASM module loading\n */\n\nimport { BeautyEffectEngine } from '../core/engine.js';\nimport { EngineConfig } from '../core/config.js';\nimport { FacebetterError } from '../core/errors.js';\nimport {\n FACEBETTER_AUTH_URL,\n createDirectAuthFetcher,\n requestFacebetterAuth,\n} from '../core/auth.js';\nimport * as constants from '../core/constants.js';\n\n// ESM-specific WASM loader\nlet wasmModuleInstance = null;\nlet wasmModulePromise = null;\n\n/**\n * Loads the WebAssembly module (ESM version)\n * Supports ESM format WASM modules (generated with MODULARIZE and EXPORT_ES6)\n * With SINGLE_FILE=1, WASM binary and data files are embedded in the JS file\n * @param {Object} [options] - Options\n * @param {string} [options.wasmUrl] - Custom WASM module URL (defaults to facebetter-core npm package)\n * @param {Function} [options.locateFile] - Custom locateFile function (usually not needed with SINGLE_FILE=1)\n * @returns {Promise<Object>} Promise that resolves with the WASM module\n */\nexport async function loadWasmModule(options = {}) {\n if (wasmModuleInstance) {\n return wasmModuleInstance;\n }\n\n if (wasmModulePromise) {\n return wasmModulePromise;\n }\n\n wasmModulePromise = (async () => {\n // Try to import the WASM module factory\n // facebetter-core.js is an Emscripten-generated ESM file (with MODULARIZE and EXPORT_ES6)\n // It's provided by the facebetter-core npm package\n let FaceBetterModuleFactory;\n \n try {\n // Get the WASM module\n if (options.wasmUrl) {\n // If custom URL is provided, use it (for backward compatibility or custom builds)\n const wasmModule = await import(options.wasmUrl);\n FaceBetterModuleFactory = wasmModule.default || wasmModule.createFaceBetterModule;\n } else {\n // Import from facebetter-core npm package\n const wasmModule = await import('facebetter-core');\n \n // Get the factory function (default export or named export)\n FaceBetterModuleFactory = wasmModule.default || wasmModule.createFaceBetterModule;\n }\n \n if (!FaceBetterModuleFactory) {\n throw new Error('WASM module does not export createFaceBetterModule function');\n }\n } catch (e) {\n throw new FacebetterError(`Failed to load WASM module: ${e.message}`);\n }\n\n // Configure module options\n // With SINGLE_FILE=1, WASM binary and data files are embedded in the JS file\n // No need to handle .wasm and .data file paths separately\n const moduleOptions = {\n locateFile: options.locateFile || function(path, prefix) {\n // With SINGLE_FILE=1, Emscripten handles embedded files automatically\n // Custom locateFile is only needed if user provides one\n return prefix + path;\n },\n ...options\n };\n\n // Initialize the module (MODULARIZE returns a Promise)\n wasmModuleInstance = await FaceBetterModuleFactory(moduleOptions);\n \n if (!wasmModuleInstance) {\n throw new FacebetterError('Failed to initialize WASM module');\n }\n\n wasmModuleInstance.ready = true;\n return wasmModuleInstance;\n })();\n\n return wasmModulePromise;\n}\n\n/**\n * Gets the current WASM module instance\n * @returns {Object} WASM module instance\n * @throws {Error} If module is not loaded\n */\nexport function getWasmModule() {\n if (!wasmModuleInstance) {\n throw new Error('WASM module not loaded. Call loadWasmModule() first or use BeautyEffectEngine.init()');\n }\n return wasmModuleInstance;\n}\n\n/**\n * Gets the current WASM memory buffer\n * @returns {ArrayBuffer} Current WASM memory buffer\n */\nexport function getWasmBuffer() {\n const Module = getWasmModule();\n \n if (Module.buffer) {\n return Module.buffer;\n } else if (Module.HEAPU8 && Module.HEAPU8.buffer) {\n return Module.HEAPU8.buffer;\n } else if (Module.asm && Module.asm.memory) {\n return Module.asm.memory.buffer;\n }\n \n throw new Error('Unable to access WASM memory buffer');\n}\n\n// Browser-specific image utilities (ESM version can use browser APIs)\nimport * as imageUtils from '../browser/image-utils.js';\n\n// Browser-specific GPU canvas management\nfunction ensureFacebetterCanvas() {\n if (typeof document === 'undefined') {\n return;\n }\n \n let canvas = document.getElementById('facebetter_canvas');\n if (!canvas) {\n canvas = document.createElement('canvas');\n canvas.id = 'facebetter_canvas';\n canvas.style.display = 'none';\n canvas.width = 1;\n canvas.height = 1;\n if (document.body) {\n document.body.appendChild(canvas);\n }\n }\n}\n\nfunction cleanupFacebetterCanvas() {\n // Cleanup is handled by engine instance\n}\n\n// Create platform API\nconst platformAPI = {\n loadWasmModule: () => loadWasmModule(),\n getWasmModule,\n getWasmBuffer,\n toImageData: imageUtils.toImageData,\n ensureFacebetterCanvas,\n cleanupFacebetterCanvas\n};\n\n// Export factory function\nexport function createBeautyEffectEngine(config) {\n return new BeautyEffectEngine(config, platformAPI);\n}\n\n// Create a wrapped BeautyEffectEngine class that automatically injects platformAPI\n// This allows users to use: new BeautyEffectEngine(config) without passing platformAPI\nclass ESMBeautyEffectEngine extends BeautyEffectEngine {\n constructor(config) {\n // Automatically inject platformAPI for ESM environment\n super(config, platformAPI);\n }\n}\n\n// Export all constants and classes\nexport {\n ESMBeautyEffectEngine as BeautyEffectEngine,\n EngineConfig,\n FacebetterError,\n FACEBETTER_AUTH_URL,\n createDirectAuthFetcher,\n requestFacebetterAuth,\n};\n\n// Export constants with proper names\nexport const WhiteningStyle = constants.WhiteningStyle;\nexport const SmoothingStyle = constants.SmoothingStyle;\nexport const Reshape = constants.Reshape;\nexport const LipstickColor = constants.LipstickColor;\nexport const BlushStyle = constants.BlushStyle;\nexport const BlushColor = constants.BlushColor;\nexport const ContourStyle = constants.ContourStyle;\nexport const EyeShadowStyle = constants.EyeShadowStyle;\nexport const EyeShadowColor = constants.EyeShadowColor;\nexport const EyeLinerStyle = constants.EyeLinerStyle;\nexport const EyeLinerColor = constants.EyeLinerColor;\nexport const EyebrowStyle = constants.EyebrowStyle;\nexport const EyebrowColor = constants.EyebrowColor;\nexport const EyelashStyle = constants.EyelashStyle;\nexport const EyelashColor = constants.EyelashColor;\nexport const PupilColor = constants.PupilColor;\nexport const ChromaKeyColor = constants.ChromaKeyColor;\nexport const FrameType = constants.FrameType;\nexport const MirrorMode = constants.MirrorMode;\nexport const EngineEventCode = constants.EngineEventCode;\n\n// Default export\nexport default {\n BeautyEffectEngine: ESMBeautyEffectEngine,\n EngineConfig,\n FacebetterError,\n FACEBETTER_AUTH_URL,\n createDirectAuthFetcher,\n requestFacebetterAuth,\n ...constants,\n loadWasmModule\n};\n\n"],"names":["WhiteningStyle","SmoothingStyle","Reshape","EngineEventCode","LipstickColor","BlushStyle","BlushColor","ContourStyle","EyeShadowStyle","EyeShadowColor","EyeLinerStyle","EyeLinerColor","EyebrowStyle","EyebrowColor","EyelashStyle","EyelashColor","PupilColor","ChromaKeyColor","FrameType","MirrorMode","imageUtils.toImageData","constants.WhiteningStyle","constants.SmoothingStyle","constants.Reshape","constants.LipstickColor","constants.BlushStyle","constants.BlushColor","constants.ContourStyle","constants.EyeShadowStyle","constants.EyeShadowColor","constants.EyeLinerStyle","constants.EyeLinerColor","constants.EyebrowStyle","constants.EyebrowColor","constants.EyelashStyle","constants.EyelashColor","constants.PupilColor","constants.ChromaKeyColor","constants.FrameType","constants.MirrorMode","constants.EngineEventCode"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,YAAY,CAAC;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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