@imgly/plugin-ai-text-generation-web
Version:
AI text generation plugin for the CE.SDK editor
4 lines • 816 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../src/iconSprite.ts", "../../../internal/plugin-utils/src/icons/formats.ts", "../../../internal/plugin-utils/src/assetSources/CustomAssetSource.ts", "../../../internal/plugin-utils/src/assetSources/IndexedDBAssetSource.ts", "../../../internal/plugin-utils/src/assetSources/AggregatedAssetSource.ts", "../../../internal/plugin-utils/src/metadata/Metadata.ts", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_root.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArray.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isObject.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/eq.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isLength.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_overArg.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeys.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseKeys.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/keys.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Hash.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Map.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Stack.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/stubArray.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeys.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_DataView.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Promise.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Set.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getTag.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_setCacheAdd.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_setCacheHas.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_SetCache.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arraySome.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cacheHas.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_equalArrays.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapToArray.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_setToArray.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_equalByTag.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_equalObjects.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqualDeep.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqual.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isEqual.js", "../../../internal/plugin-utils/src/metadata/FillProcessingMetadata.ts", "../../../internal/plugin-utils/src/processing/fillProcessing.ts", "../../../internal/plugin-utils/src/processing/constants.ts", "../../../internal/plugin-utils/src/processing/initializeFillProcessing.ts", "../../../internal/plugin-utils/src/processing/registerFillProcessingComponents.ts", "../../../internal/plugin-utils/src/utils/colors.ts", "../../../internal/plugin-utils/src/utils/upload.ts", "../../../internal/plugin-utils/src/utils/uuid.ts", "../../../internal/plugin-utils/src/utils/images.ts", "../../../internal/plugin-utils/src/utils/isDefined.ts", "../../../internal/plugin-utils/src/utils/toArray.ts", "../../../internal/plugin-utils/src/translationHelpers.ts", "../../../internal/plugin-utils/src/index.ts", "../../plugin-ai-generation-web/src/utils/translationHelpers.ts", "../../plugin-ai-generation-web/src/ui/common/renderImageUrlProperty.ts", "../../plugin-ai-generation-web/src/ui/common/renderStyleTransferProperty.ts", "../../plugin-ai-generation-web/src/utils/propertyContext.ts", "../../plugin-ai-generation-web/src/utils/propertyResolver.ts", "../../plugin-ai-generation-web/src/assets/integrateIntoDefaultAssetLibraryEntry.ts", "../../plugin-ai-generation-web/src/core/ActionRegistry.ts", "../../plugin-ai-generation-web/src/core/ProviderRegistry.ts", "../../plugin-ai-generation-web/src/middleware/middleware.ts", "../../plugin-ai-generation-web/src/middleware/loggingMiddleware.ts", "../../plugin-ai-generation-web/src/utils/utils.ts", "../../plugin-ai-generation-web/src/middleware/uploadMiddleware.ts", "../../plugin-ai-generation-web/src/utils/mergeQuickActionsConfig.ts", "../../plugin-ai-generation-web/src/middleware/rateLimitMiddleware.ts", "../../plugin-ai-generation-web/src/utils/checkAiPluginVersion.ts", "../../plugin-ai-generation-web/src/ui/components/registerDockComponent.ts", "../../plugin-ai-generation-web/src/ui/quickActions/enableImageFill.ts", "../../plugin-ai-generation-web/src/generation/handleGenerationError.ts", "../../plugin-ai-generation-web/src/assets/previewUri.ts", "../../plugin-ai-generation-web/src/assets/getAssetResultForPlaceholder.ts", "../../plugin-ai-generation-web/src/assets/getAssetResultForGenerated.ts", "../../plugin-ai-generation-web/src/generation/handleGenerateFromPanel.ts", "../../plugin-ai-generation-web/src/ui/components/renderGenerationComponents.ts", "../../plugin-ai-generation-web/src/core/provider.ts", "../../plugin-ai-generation-web/src/ui/panels/createPanelRenderFunctionFromCustom.ts", "../../plugin-ai-generation-web/src/openapi/dereferenceDocument.ts", "../../plugin-ai-generation-web/src/openapi/isOpenAPISchema.ts", "../../plugin-ai-generation-web/src/openapi/getProperties.ts", "../../plugin-ai-generation-web/src/openapi/renderProperty.ts", "../../plugin-ai-generation-web/src/openapi/defaultTranslations.ts", "../../plugin-ai-generation-web/src/openapi/extractSchemaTranslations.ts", "../../plugin-ai-generation-web/src/ui/panels/createPanelRenderFunctionFromSchema.ts", "../../plugin-ai-generation-web/src/ui/panels/createPanelRenderFunction.ts", "../../plugin-ai-generation-web/src/assets/initializeHistoryAssetSource.ts", "../../plugin-ai-generation-web/src/assets/initializeHistoryAssetLibraryEntry.ts", "../../plugin-ai-generation-web/src/ui/icons.ts", "../../plugin-ai-generation-web/src/middleware/dryRunMiddleware.ts", "../../plugin-ai-generation-web/src/core/constants.ts", "../../plugin-ai-generation-web/src/generation/createGenerateFunction.ts", "../../plugin-ai-generation-web/src/providers/initializeProvider.ts", "../../plugin-ai-generation-web/src/assets/initializeHistoryCompositeAssetSource.ts", "../../plugin-ai-generation-web/src/providers/initializeProviders.ts", "../../plugin-ai-generation-web/src/ui/quickActions/utils.ts", "../../plugin-ai-generation-web/src/ui/panels/createConfirmationRenderFunction.ts", "../../plugin-ai-generation-web/src/utils/compactSeparators.ts", "../../plugin-ai-generation-web/src/providers/getCanvasMenuComponentId.ts", "../../plugin-ai-generation-web/src/ui/quickActions/getQuickActionOrder.ts", "../../plugin-ai-generation-web/src/providers/getApplyCallbacks.ts", "../../plugin-ai-generation-web/src/utils/lockSelectionToEditMode.ts", "../../plugin-ai-generation-web/src/generation/CallbacksRegistry.ts", "../../plugin-ai-generation-web/src/generation/handleGenerateFromQuickAction.ts", "../../plugin-ai-generation-web/src/ui/quickActions/createQuickActionMenuRenderFunction.ts", "../../plugin-ai-generation-web/src/ui/quickActions/initializeQuickActionComponents.ts", "../../plugin-ai-generation-web/src/gateway/createGatewayClient.ts", "../../plugin-ai-generation-web/src/gateway/types.ts", "../../plugin-ai-generation-web/src/gateway/createGatewayProvider.ts", "../../plugin-ai-generation-web/src/index.ts", "../../../internal/plugin-utils/src/icons/formats.ts", "../../../internal/plugin-utils/src/assetSources/CustomAssetSource.ts", "../../../internal/plugin-utils/src/assetSources/IndexedDBAssetSource.ts", "../../../internal/plugin-utils/src/assetSources/AggregatedAssetSource.ts", "../../../internal/plugin-utils/src/metadata/Metadata.ts", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_root.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArray.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isObject.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/eq.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isLength.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_overArg.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeys.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseKeys.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/keys.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Hash.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Map.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Stack.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/stubArray.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeys.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_DataView.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Promise.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Set.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getTag.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_setCacheAdd.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_setCacheHas.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_SetCache.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arraySome.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cacheHas.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_equalArrays.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapToArray.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_setToArray.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_equalByTag.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_equalObjects.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqualDeep.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqual.js", "../../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isEqual.js", "../../../internal/plugin-utils/src/metadata/FillProcessingMetadata.ts", "../../../internal/plugin-utils/src/processing/fillProcessing.ts", "../../../internal/plugin-utils/src/processing/constants.ts", "../../../internal/plugin-utils/src/processing/initializeFillProcessing.ts", "../../../internal/plugin-utils/src/processing/registerFillProcessingComponents.ts", "../../../internal/plugin-utils/src/utils/colors.ts", "../../../internal/plugin-utils/src/utils/upload.ts", "../../../internal/plugin-utils/src/utils/uuid.ts", "../../../internal/plugin-utils/src/utils/images.ts", "../../../internal/plugin-utils/src/utils/isDefined.ts", "../../../internal/plugin-utils/src/utils/toArray.ts", "../../../internal/plugin-utils/src/translationHelpers.ts", "../../../internal/plugin-utils/src/index.ts", "../src/prompts/improve.ts", "../src/quickActions/Improve.ts", "../src/prompts/fix.ts", "../src/quickActions/Fix.ts", "../src/prompts/shorter.ts", "../src/quickActions/Shorter.ts", "../src/prompts/longer.ts", "../src/quickActions/Longer.ts", "../src/prompts/changeTone.ts", "../src/quickActions/ChangeTone.ts", "../src/prompts/translate.ts", "../src/quickActions/Translate.ts", "../src/prompts/changeTextTo.ts", "../src/quickActions/ChangeTextTo.ts", "../src/constants.ts", "../src/plugin.ts", "../src/index.ts"],
"sourcesContent": ["export const PLUGIN_ICON_SET_ID = '@imgly/plugin-ai-text-generation';\n\nconst iconSprite = `\n <svg>\n <symbol\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n id=\"@imgly/Sparkle\"\n >\n <path d=\"M5.35545 2.06745C5.24149 1.72556 4.7579 1.72556 4.64394 2.06745L4.05898 3.82232C4.02166 3.93429 3.9338 4.02215 3.82184 4.05948L2.06694 4.64459C1.72506 4.75858 1.72509 5.24217 2.06699 5.3561L3.82179 5.9409C3.93378 5.97822 4.02166 6.06609 4.05899 6.17808L4.64394 7.93291C4.7579 8.2748 5.24149 8.2748 5.35545 7.93291L5.9404 6.17806C5.97773 6.06608 6.06559 5.97821 6.17757 5.94089L7.93242 5.35594C8.27431 5.24198 8.27431 4.75839 7.93242 4.64442L6.17757 4.05947C6.06559 4.02215 5.97773 3.93428 5.9404 3.8223L5.35545 2.06745Z\" fill=\"currentColor\"/>\n<path d=\"M17.9632 3.23614C17.8026 2.80788 17.1968 2.80788 17.0362 3.23614L16.0787 5.78951C16.0285 5.92337 15.9229 6.02899 15.789 6.07918L13.2356 7.0367C12.8074 7.19729 12.8074 7.80307 13.2356 7.96366L15.789 8.92118C15.9229 8.97138 16.0285 9.077 16.0787 9.21085L17.0362 11.7642C17.1968 12.1925 17.8026 12.1925 17.9632 11.7642L18.9207 9.21086C18.9709 9.077 19.0765 8.97138 19.2104 8.92118L21.7637 7.96366C22.192 7.80307 22.192 7.1973 21.7637 7.0367L19.2104 6.07918C19.0765 6.02899 18.9709 5.92337 18.9207 5.78951L17.9632 3.23614Z\" fill=\"currentColor\"/>\n<path d=\"M9.30058 7.82012C9.54712 7.1791 10.454 7.1791 10.7006 7.82012L12.3809 12.189C12.4571 12.3871 12.6136 12.5436 12.8117 12.6198L17.1806 14.3001C17.8216 14.5466 17.8216 15.4536 17.1806 15.7001L12.8117 17.3804C12.6136 17.4566 12.4571 17.6131 12.3809 17.8112L10.7006 22.1801C10.454 22.8211 9.54712 22.8211 9.30058 22.1801L7.62024 17.8112C7.54406 17.6131 7.38754 17.4566 7.18947 17.3804L2.82061 15.7001C2.17959 15.4536 2.17959 14.5466 2.82061 14.3001L7.18947 12.6198C7.38754 12.5436 7.54406 12.3871 7.62024 12.189L9.30058 7.82012Z\" fill=\"currentColor\"/>\n\n </symbol>\n <symbol\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n id=\"@imgly/Language\"\n >\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.1188 12.8768L11.4719 14.6133L9.1 12.2414L5.35 15.9914L4.14309 14.7845L7.96452 11.0156C7.04982 9.98423 6.31561 8.84524 5.77623 7.64087L5.71314 7.5H7.42861L7.45649 7.55438C7.89377 8.40744 8.44158 9.21897 9.09989 9.96235C10.1004 8.82939 10.8479 7.5455 11.336 6.1925H3V4.5H8.25V3H9.95V4.5H15.2V6.2H12.976C12.4276 7.93841 11.5121 9.58156 10.2367 11.017L12.1188 12.8768Z\" fill=\"currentColor\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M16.5371 11.0469L20.2764 21H18.2803L17.5324 18.7852H13.8155L13.0713 21H11.082L14.8008 11.0469H16.5371ZM14.314 17.3018H17.0316L15.6695 13.2679L14.314 17.3018Z\" fill=\"currentColor\"/>\n\n </symbol>\n <symbol\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n id=\"@imgly/Microphone\"\n >\n <path d=\"M22.0009 8C22.0009 9.42939 21.5011 10.742 20.6667 11.7727C19.2294 10.8473 17.4614 9.56645 15.9479 8.053C14.4345 6.53955 13.1536 4.77155 12.2282 3.33426C13.2589 2.49984 14.5715 2 16.0009 2C19.3146 2 22.0009 4.68629 22.0009 8Z\" fill=\"currentColor\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M10.0009 8C10.0009 6.67122 10.4329 5.44332 11.164 4.44907C12.1058 5.88166 13.3791 7.60552 14.8873 9.11366C16.3954 10.6218 18.1193 11.8951 19.5519 12.8369C18.5576 13.568 17.3297 14 16.0009 14C15.7709 14 15.5439 13.9871 15.3206 13.9619L11.9933 16.876C11.9983 16.9166 12.0009 16.958 12.0009 17V22C12.0009 22.5523 11.5532 23 11.0009 23C10.4486 23 10.0009 22.5523 10.0009 22V18.621L6.70661 21.5063C5.91426 22.2002 4.71947 22.1607 3.97468 21.4159L2.58384 20.0251C1.83905 19.2803 1.79955 18.0855 2.49353 17.2932L10.0388 8.67822C10.0138 8.4556 10.0009 8.2293 10.0009 8ZM10.7488 10.9032L3.99805 18.6109L5.38889 20.0017L13.0963 13.2513C12.1106 12.7049 11.2949 11.889 10.7488 10.9032Z\" fill=\"currentColor\"/>\n </symbol>\n <symbol\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n id=\"@imgly/TextLonger\"\n >\n <path d=\"M21 3H3V5H21V3Z\" fill=\"currentColor\"/>\n<path d=\"M21 8H3V10H21V8Z\" fill=\"currentColor\"/>\n<path d=\"M3 13H21V15H3V13Z\" fill=\"currentColor\"/>\n<path d=\"M14 18H3V20H14V18Z\" fill=\"currentColor\"/\n </symbol>\n <symbol\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n id=\"@imgly/TextShorter\"\n >\n <path d=\"M21 8H3V10H21V8Z\" fill=\"currentColor\"/>\n<path d=\"M13 13H3V15H13V13Z\" fill=\"currentColor\"/>\n </symbol>\n <symbol\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n id=\"@imgly/CheckmarkAll\"\n >\n <path d=\"M16.4052 6.84412L14.8434 5.59473L6.82422 15.6187L2.79961 12.6003L1.59961 14.2003L6.39961 17.8003C6.83171 18.1244 7.44307 18.0468 7.78048 17.625L16.4052 6.84412Z\" fill=\"currentColor\"/>\n<path d=\"M22.4052 6.84412L20.8434 5.59473L12.8242 15.6187L11.7996 14.8503L10.5996 16.4503L12.3996 17.8003C12.8317 18.1244 13.4431 18.0468 13.7805 17.625L22.4052 6.84412Z\" fill=\"currentColor\"/>\n\n </symbol>\n\n <symbol\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n id=\"@imgly/MagicWand\"\n >\n <path d=\"M7.27597 1.94728C7.3681 1.76302 7.63105 1.76302 7.72318 1.94728L8.46231 3.42553C8.4865 3.47391 8.52573 3.51314 8.57411 3.53733L10.0524 4.27646C10.2366 4.36859 10.2366 4.63154 10.0524 4.72367L8.57411 5.4628C8.52573 5.48699 8.4865 5.52622 8.46231 5.5746L7.72318 7.05285C7.63105 7.23711 7.3681 7.23711 7.27597 7.05285L6.53685 5.57461C6.51266 5.52622 6.47342 5.48699 6.42503 5.4628L4.94681 4.72382C4.76254 4.63171 4.76252 4.36875 4.94677 4.27661L6.42505 3.53733C6.47343 3.51314 6.51265 3.47391 6.53684 3.42554L7.27597 1.94728Z\" fill=\"currentColor\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M8.99943 9.0857C8.21838 9.86675 8.21838 11.1331 8.99943 11.9141L18.0854 21.0001C18.8665 21.7812 20.1329 21.7811 20.9139 21L22.4996 19.4141C23.2805 18.633 23.2805 17.3668 22.4995 16.5858L13.4136 7.49991C12.6326 6.71886 11.3663 6.71887 10.5852 7.49991L8.99943 9.0857ZM10.4136 10.4999L11.9994 8.91413L15.0427 11.9574L13.4569 13.5432L10.4136 10.4999Z\" fill=\"currentColor\"/>\n<path d=\"M4.72318 10.4473C4.63105 10.263 4.3681 10.263 4.27597 10.4473L3.70351 11.5922C3.67932 11.6406 3.64009 11.6798 3.59172 11.704L2.44677 12.2766C2.26252 12.3687 2.26254 12.6317 2.44681 12.7238L3.5917 13.2961C3.64009 13.3203 3.67932 13.3596 3.70352 13.4079L4.27597 14.5529C4.3681 14.7371 4.63105 14.7371 4.72318 14.5529L5.29564 13.4079C5.31983 13.3596 5.35906 13.3203 5.40745 13.2961L6.55236 12.7237C6.73663 12.6315 6.73662 12.3686 6.55236 12.2765L5.40745 11.704C5.35906 11.6798 5.31983 11.6406 5.29564 11.5922L4.72318 10.4473Z\" fill=\"currentColor\"/>\n<path d=\"M13.276 3.44728C13.3681 3.26302 13.6311 3.26302 13.7232 3.44728L13.9623 3.92553C13.9865 3.97391 14.0257 4.01314 14.0741 4.03733L14.5524 4.27646C14.7366 4.36859 14.7366 4.63154 14.5524 4.72367L14.0741 4.9628C14.0257 4.98699 13.9865 5.02622 13.9623 5.0746L13.7232 5.55285C13.6311 5.73711 13.3681 5.73711 13.276 5.55285L13.0368 5.07461C13.0127 5.02622 12.9734 4.98699 12.925 4.9628L12.4468 4.72373C12.2625 4.63161 12.2625 4.36866 12.4468 4.27652L12.9251 4.03733C12.9734 4.01314 13.0127 3.97391 13.0368 3.92554L13.276 3.44728Z\" fill=\"currentColor\"/>\n<path d=\"M3.72318 6.44728C3.63105 6.26302 3.3681 6.26302 3.27597 6.44728L3.03684 6.92554C3.01265 6.97392 2.97343 7.01314 2.92505 7.03733L2.44677 7.27652C2.26252 7.36866 2.26254 7.63161 2.44681 7.72373L2.92503 7.9628C2.97342 7.98699 3.01266 8.02622 3.03685 8.07461L3.27597 8.55285C3.3681 8.73711 3.63105 8.73711 3.72318 8.55285L3.96231 8.0746C3.9865 8.02622 4.02573 7.98699 4.07411 7.9628L4.55236 7.72367C4.73663 7.63154 4.73663 7.36859 4.55236 7.27646L4.07411 7.03733C4.02573 7.01314 3.9865 6.97391 3.96231 6.92553L3.72318 6.44728Z\" fill=\"currentColor\"/>\n </symbol>\n </svg>\n`;\n\nexport default iconSprite;\n", "export default `\n<svg>\n <symbol\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n id=\"@imgly/plugin/formats/ratioFree\"\n >\n <path d=\"M7 6C6.44772 6 6 6.44772 6 7V9.22222H4V7C4 5.34315 5.34315 4 7 4H9.22222V6H7Z\" fill=\"currentColor\"/>\n <path d=\"M17 6H14.7778V4H17C18.6569 4 20 5.34315 20 7V9.22222H18V7C18 6.44772 17.5523 6 17 6Z\" fill=\"currentColor\"/>\n <path d=\"M6 14.7778V17C6 17.5523 6.44772 18 7 18H9.22222V20H7C5.34315 20 4 18.6569 4 17V14.7778H6Z\" fill=\"currentColor\"/>\n <path d=\"M18 17V14.7778H20V17C20 18.6569 18.6569 20 17 20H14.7778V18H17C17.5523 18 18 17.5523 18 17Z\" fill=\"currentColor\"/>\n </symbol>\n <symbol\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n id=\"@imgly/plugin/formats/ratio4by3\"\n >\n <path d=\"M6.5 13H8V15H10V16.5H6.5V13Z\" fill=\"currentColor\"/>\n <path d=\"M14 9V7.5H17.5V11H16V9H14Z\" fill=\"currentColor\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6 4C4.34315 4 3 5.34315 3 7V17C3 18.6569 4.34315 20 6 20H18C19.6569 20 21 18.6569 21 17V7C21 5.34315 19.6569 4 18 4H6ZM5 7C5 6.44772 5.44772 6 6 6H18C18.5523 6 19 6.44772 19 7V17C19 17.5523 18.5523 18 18 18H6C5.44772 18 5 17.5523 5 17V7Z\" fill=\"currentColor\"/>\n </symbol>\n <symbol\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n id=\"@imgly/plugin/formats/ratio16by9\"\n >\n <path d=\"M4.5 13H6V15H8V16.5H4.5V13Z\" fill=\"currentColor\"/>\n <path d=\"M16 9V7.5H19.5V11H18V9H16Z\" fill=\"currentColor\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4 4C2.34315 4 1 5.34315 1 7V17C1 18.6569 2.34315 20 4 20H20C21.6569 20 23 18.6569 23 17V7C23 5.34315 21.6569 4 20 4H4ZM3 7C3 6.44772 3.44772 6 4 6H20C20.5523 6 21 6.44772 21 7V17C21 17.5523 20.5523 18 20 18H4C3.44772 18 3 17.5523 3 17V7Z\" fill=\"currentColor\"/>\n </symbol>\n <symbol\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n id=\"@imgly/plugin/formats/ratio9by16\"\n >\n <path d=\"M7.5 16H9V18H11V19.5H7.5V16Z\" fill=\"currentColor\"/>\n <path d=\"M13 6V4.5H16.5V8H15V6H13Z\" fill=\"currentColor\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4 20C4 21.6569 5.34315 23 7 23H17C18.6569 23 20 21.6569 20 20V4C20 2.34315 18.6569 1 17 1H7C5.34315 1 4 2.34315 4 4V20ZM7 21C6.44772 21 6 20.5523 6 20V4C6 3.44772 6.44772 3 7 3H17C17.5523 3 18 3.44772 18 4V20C18 20.5523 17.5523 21 17 21H7Z\" fill=\"currentColor\"/>\n </symbol>\n <symbol\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n id=\"@imgly/plugin/formats/ratio3by4\"\n >\n <path d=\"M11 17.5V16H9V14H7.5V17.5H11Z\" fill=\"currentColor\"/>\n <path d=\"M15 10H16.5V6.5H13V8H15V10Z\" fill=\"currentColor\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M20 18C20 19.6569 18.6569 21 17 21H7C5.34315 21 4 19.6569 4 18V6C4 4.34315 5.34315 3 7 3H17C18.6569 3 20 4.34315 20 6V18ZM17 19C17.5523 19 18 18.5523 18 18V6C18 5.44772 17.5523 5 17 5H7C6.44771 5 6 5.44771 6 6V18C6 18.5523 6.44772 19 7 19H17Z\" fill=\"currentColor\"/>\n </symbol>\n <symbol\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n id=\"@imgly/plugin/formats/ratio1by1\"\n >\n <path d=\"M17.4142 8.00009L16 6.58587L14.2929 8.29298L15.7071 9.70719L17.4142 8.00009Z\" fill=\"currentColor\"/>\n <path d=\"M13.0404 12.3739L15.0404 10.3739L13.6262 8.95965L11.6262 10.9596L13.0404 12.3739Z\" fill=\"currentColor\"/>\n <path d=\"M10.3737 15.0405L12.3737 13.0405L10.9595 11.6263L8.95953 13.6263L10.3737 15.0405Z\" fill=\"currentColor\"/>\n <path d=\"M9.70708 15.7072L8.29286 14.293L6.58576 16.0001L7.99997 17.4143L9.70708 15.7072Z\" fill=\"currentColor\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 4C5.34315 4 4 5.34315 4 7V17C4 18.6569 5.34315 20 7 20H17C18.6569 20 20 18.6569 20 17V7C20 5.34315 18.6569 4 17 4H7ZM6 7C6 6.44772 6.44772 6 7 6H17C17.5523 6 18 6.44772 18 7V17C18 17.5523 17.5523 18 17 18H7C6.44772 18 6 17.5523 6 17V7Z\" fill=\"currentColor\"/>\n </symbol>\n</svg>\n`;\n", "import type {\n AssetDefinition,\n AssetQueryData,\n AssetResult,\n AssetSource,\n AssetsQueryResult\n} from '@cesdk/engine';\n\n/**\n * Simplified value type for select inputs that can be converted to asset definitions\n */\nexport type SelectValue = {\n id: string;\n label: string;\n thumbUri?: string;\n meta?: { [key: string]: any };\n};\n\n/**\n * Options for CustomAssetSource constructor\n */\nexport interface CustomAssetSourceOptions {\n /**\n * Optional callback function to translate asset labels\n * @param assetId - The ID of the asset to translate\n * @param fallbackLabel - The fallback label to use if translation is not available\n * @param locale - The current locale\n * @returns The translated label or fallback\n */\n translateLabel?: (\n assetId: string,\n fallbackLabel: string,\n locale: string\n ) => string;\n}\n\n/**\n * A custom AssetSource implementation that manages assets from an array\n * and provides additional functionality like to mark assets as active or changing\n * labels.\n */\nexport class CustomAssetSource implements AssetSource {\n /** The unique id of the asset source */\n id: string;\n\n /** Array of assets to be served by this source */\n private assets: AssetDefinition[];\n\n /** Set of IDs for active assets */\n private activeAssetIds: Set<string>;\n\n /** Optional translation callback function */\n private translateLabel?: (\n assetId: string,\n fallbackLabel: string,\n locale: string\n ) => string;\n\n /**\n * Creates a new instance of CustomAssetSource\n *\n * @param id - The unique identifier for this asset source\n * @param assets - Array of asset definitions or SelectValue objects to include in this source\n * @param options - Optional configuration for the asset source\n */\n constructor(\n id: string,\n assets: (AssetDefinition | SelectValue)[] = [],\n options?: CustomAssetSourceOptions\n ) {\n this.id = id;\n this.translateLabel = options?.translateLabel;\n this.assets = assets.map((asset) => {\n // Check if the asset is a SelectValue by looking for the label property as a string\n if (\n typeof (asset as SelectValue).label === 'string' &&\n !(\n (asset as AssetDefinition).label &&\n typeof (asset as AssetDefinition).label === 'object'\n )\n ) {\n const selectValue = asset as SelectValue;\n // Convert SelectValue to AssetDefinition\n return {\n id: selectValue.id,\n label: { en: selectValue.label },\n meta: selectValue.thumbUri\n ? { ...(selectValue.meta ?? {}), thumbUri: selectValue.thumbUri }\n : selectValue.meta\n } as AssetDefinition;\n }\n return asset as AssetDefinition;\n });\n this.activeAssetIds = new Set<string>();\n\n // Automatically set first asset as active if available\n if (this.assets.length > 0) {\n this.activeAssetIds.add(this.assets[0].id);\n }\n }\n\n /**\n * Find assets based on the provided query data\n * Supports pagination, searching, filtering, and active-first sorting\n *\n * @param queryData - Query parameters to filter and sort assets\n * @returns Promise with the query results\n */\n async findAssets(\n queryData: AssetQueryData\n ): Promise<AssetsQueryResult | undefined> {\n const {\n page,\n perPage,\n locale = 'en',\n sortActiveFirst,\n query,\n tags,\n groups,\n excludeGroups,\n sortingOrder,\n sortKey\n } = queryData;\n\n // Start with all assets\n let filteredAssets = [...this.assets];\n\n // Filter by groups if provided\n if (groups && groups.length > 0) {\n filteredAssets = filteredAssets.filter(\n (asset) =>\n asset.groups && groups.some((group) => asset.groups?.includes(group))\n );\n }\n\n // Filter out excluded groups if provided\n if (excludeGroups && excludeGroups.length > 0) {\n filteredAssets = filteredAssets.filter(\n (asset) =>\n !asset.groups ||\n !excludeGroups.some((group) => asset.groups?.includes(group))\n );\n }\n\n // Filter by query (search in label and tags)\n if (query) {\n const lowerQuery = query.toLowerCase();\n filteredAssets = filteredAssets.filter((asset) => {\n const label = asset.label?.[locale]?.toLowerCase();\n const assetTags = asset.tags?.[locale] || [];\n\n return (\n (label && label.includes(lowerQuery)) ||\n assetTags.some((tag) => tag.toLowerCase().includes(lowerQuery))\n );\n });\n }\n\n // Filter by exact tags if provided\n if (tags && tags.length > 0) {\n const tagArray = Array.isArray(tags) ? tags : [tags];\n filteredAssets = filteredAssets.filter((asset) => {\n const assetTags = asset.tags?.[locale] || [];\n return tagArray.some((tag) => assetTags.includes(tag));\n });\n }\n\n // Sort by active first if requested\n if (sortActiveFirst) {\n filteredAssets.sort((a, b) => {\n const aActive = this.activeAssetIds.has(a.id);\n const bActive = this.activeAssetIds.has(b.id);\n\n if (aActive && !bActive) return -1;\n if (!aActive && bActive) return 1;\n return 0;\n });\n }\n\n // Sort by sortKey if provided\n if (sortKey && sortKey !== 'id') {\n filteredAssets.sort((a, b) => {\n // Sort by metadata field\n const aValue = a.meta?.[sortKey];\n const bValue = b.meta?.[sortKey];\n\n if (aValue === undefined) return 1;\n if (bValue === undefined) return -1;\n\n if (typeof aValue === 'string' && typeof bValue === 'string') {\n return sortingOrder === 'Descending'\n ? bValue.localeCompare(aValue)\n : aValue.localeCompare(bValue);\n }\n\n if (typeof aValue === 'number' && typeof bValue === 'number') {\n return sortingOrder === 'Descending'\n ? bValue - aValue\n : aValue - bValue;\n }\n\n return 0;\n });\n } else if (sortKey === 'id') {\n // Sort by id\n filteredAssets.sort((a, b) => {\n return sortingOrder === 'Descending'\n ? b.id.localeCompare(a.id)\n : a.id.localeCompare(b.id);\n });\n }\n\n // Calculate pagination\n const total = filteredAssets.length;\n const startIndex = page * perPage;\n const endIndex = startIndex + perPage;\n const paginatedAssets = filteredAssets.slice(startIndex, endIndex);\n\n // Transform AssetDefinition objects to AssetResult objects\n const resultAssets: AssetResult[] = paginatedAssets.map((asset) => {\n // Use translation callback if provided, otherwise use default label\n const fallbackLabel = asset.label?.[locale] || '';\n const label = this.translateLabel\n ? this.translateLabel(asset.id, fallbackLabel, locale)\n : fallbackLabel;\n\n return {\n id: asset.id,\n groups: asset.groups,\n meta: asset.meta,\n payload: asset.payload,\n locale,\n label,\n tags: asset.tags?.[locale],\n active: this.activeAssetIds.has(asset.id)\n };\n });\n\n // Calculate next page if there are more assets\n const nextPage = endIndex < total ? page + 1 : undefined;\n\n return {\n assets: resultAssets,\n currentPage: page,\n nextPage,\n total\n };\n }\n\n updateLabel(assetId: string, label: string, locale: string): void {\n this.assets.forEach((asset) => {\n if (asset.id === assetId) {\n asset.label = asset.label || {};\n asset.label[locale] = label;\n }\n });\n }\n\n /**\n * Get the asset select value by its ID\n *\n * @param assetId - The ID of the asset to retrieve\n * @returns The SelectValue object for the asset or undefined if not found\n */\n getAssetSelectValue(assetId: string): SelectValue | undefined {\n const asset = this.assets.find(({ id }) => id === assetId);\n if (asset) {\n // Get translated label if translation callback is available\n const label = this.translateLabel\n ? this.translateLabel(asset.id, asset.label?.en || '', '')\n : asset.label?.en || '';\n\n return {\n id: asset.id,\n label,\n thumbUri: asset.meta?.thumbUri\n };\n }\n return undefined;\n }\n\n /**\n * Get the currently active asset as a SelectValue\n *\n * @returns The SelectValue object for the active asset or undefined if no asset is active\n */\n getActiveSelectValue(): SelectValue | undefined {\n const activeIds = this.getActiveAssetIds();\n if (activeIds.length > 0) {\n const asset = this.assets.find(({ id }) => id === activeIds[0]);\n if (asset) {\n // Get translated label if translation callback is available\n const label = this.translateLabel\n ? this.translateLabel(asset.id, asset.label?.en || '', '')\n : asset.label?.en || '';\n\n return {\n id: asset.id,\n label,\n thumbUri: asset.meta?.thumbUri\n };\n }\n }\n return undefined;\n }\n\n /**\n * Get the translated label for an asset by its ID\n *\n * @param assetId - The ID of the asset\n * @returns The translated label or undefined if asset not found\n */\n getTranslatedLabel(assetId: string): string | undefined {\n const asset = this.assets.find(({ id }) => id === assetId);\n if (asset) {\n return this.translateLabel\n ? this.translateLabel(asset.id, asset.label?.en || '', '')\n : asset.label?.en || '';\n }\n return undefined;\n }\n\n /**\n * Get an asset by its ID\n */\n getAsset(id: string): AssetDefinition | undefined {\n return this.assets.find((asset) => asset.id === id);\n }\n\n /**\n * Set an asset as active by its ID\n *\n * @param assetId - The ID of the asset to mark as active\n */\n setAssetActive(assetId: string): void {\n this.activeAssetIds.add(assetId);\n }\n\n /**\n * Get all active asset IDs\n *\n * @returns Array of active asset IDs\n */\n getActiveAssetIds(): string[] {\n return Array.from(this.activeAssetIds);\n }\n\n /**\n * Set multiple assets as active by their IDs\n *\n * @param assetIds - Array of asset IDs to mark as active\n */\n setAssetsActive(assetIds: string[]): void {\n assetIds.forEach((id) => this.activeAssetIds.add(id));\n }\n\n /**\n * Set an asset as inactive by its ID\n *\n * @param assetId - The ID of the asset to mark as inactive\n */\n setAssetInactive(assetId: string): void {\n this.activeAssetIds.delete(assetId);\n }\n\n /**\n * Clear all active assets\n */\n clearActiveAssets(): void {\n this.activeAssetIds.clear();\n }\n\n /**\n * Check if an asset is marked as active\n *\n * @param assetId - The ID of the asset to check\n * @returns True if the asset is active, false otherwise\n */\n isAssetActive(assetId: string): boolean {\n return this.activeAssetIds.has(assetId);\n }\n\n /**\n * Add an asset to this source\n *\n * @param asset - The asset definition to add\n */\n addAsset(asset: AssetDefinition): void {\n // Check if asset with this ID already exists\n const existingIndex = this.assets.findIndex((a) => a.id === asset.id);\n if (existingIndex >= 0) {\n // Replace existing asset\n this.assets[existingIndex] = asset;\n } else {\n // Add new asset\n this.assets.push(asset);\n }\n }\n\n /**\n * Remove an asset from this source\n *\n * @param assetId - The ID of the asset to remove\n */\n removeAsset(assetId: string): void {\n const index = this.assets.findIndex((asset) => asset.id === assetId);\n if (index !== -1) {\n this.assets.splice(index, 1);\n this.activeAssetIds.delete(assetId);\n }\n }\n\n /**\n * Get all available groups from the assets\n *\n * @returns Array of unique group names\n */\n async getGroups(): Promise<string[]> {\n const groups = new Set<string>();\n this.assets.forEach((asset) => {\n if (asset.groups) {\n asset.groups.forEach((group) => groups.add(group));\n }\n });\n return Array.from(groups);\n }\n\n /**\n * Returns the supported MIME types for this asset source\n *\n * @returns Array of supported MIME types\n */\n getSupportedMimeTypes(): string[] {\n return [\n 'image/jpeg',\n 'image/png',\n 'image/svg+xml',\n 'image/webp',\n 'video/mp4',\n 'audio/mpeg'\n ];\n }\n}\n\n/**\n * Helper function to create a CustomAssetSource instance\n *\n * @param id - The unique identifier for this asset source\n * @param assets - Array of asset definitions or SelectValue objects to include in this source\n * @param options - Optional configuration for the asset source\n * @returns A new CustomAssetSource instance\n */\nexport function createCustomAssetSource(\n id: string,\n assets: (AssetDefinition | SelectValue)[] = [],\n options?: CustomAssetSourceOptions\n): CustomAssetSource {\n return new CustomAssetSource(id, assets, options);\n}\n\nexport default CustomAssetSource;\n", "/* eslint-disable no-console */\nimport {\n CreativeEngine,\n type AssetDefinition,\n type AssetQueryData,\n type AssetResult,\n type AssetSource,\n type AssetsQueryResult\n} from '@cesdk/cesdk-js';\n\ntype BlobEntry = {\n id: string;\n blob: Blob;\n};\n\n// Asset definition with meta containing insertedAt timestamp\ntype AssetEntryWithMeta = AssetDefinition;\n\n/**\n * IndexedDBAssetSource implements the AssetSource interface using IndexedDB as the storage backend.\n */\nexport class IndexedDBAssetSource implements AssetSource {\n /** The unique id of the API */\n public readonly id: string;\n\n public readonly engine: CreativeEngine;\n\n private readonly dbName: string;\n\n private readonly dbVersion: number;\n\n private readonly assetStoreName: string = 'assets';\n\n private readonly blobStoreName: string = 'blo