@chili-publish/studio-sdk 1.43.0 → 1.44.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/_bundles/main.js +2 -2
- package/_bundles/main.js.map +1 -1
- package/connector-types/src/Connector.Shared.d.ts +1 -1
- package/connector-types/src/DataConnector.d.ts +8 -2
- package/lib/src/connector-types/src/Common.cjs.js +12 -0
- package/lib/src/connector-types/src/Common.cjs.js.map +1 -0
- package/lib/src/connector-types/src/Common.es.js +12 -0
- package/lib/src/connector-types/src/Common.es.js.map +1 -0
- package/lib/src/controllers/ActionController.cjs.js +78 -0
- package/lib/src/controllers/ActionController.cjs.js.map +1 -0
- package/lib/src/controllers/ActionController.es.js +78 -0
- package/lib/src/controllers/ActionController.es.js.map +1 -0
- package/lib/src/controllers/AnimationController.cjs.js +68 -0
- package/lib/src/controllers/AnimationController.cjs.js.map +1 -0
- package/lib/src/controllers/AnimationController.es.js +68 -0
- package/lib/src/controllers/AnimationController.es.js.map +1 -0
- package/lib/src/controllers/BarcodeController.cjs.js +159 -0
- package/lib/src/controllers/BarcodeController.cjs.js.map +1 -0
- package/lib/src/controllers/BarcodeController.es.js +159 -0
- package/lib/src/controllers/BarcodeController.es.js.map +1 -0
- package/lib/src/controllers/BrandKitController.cjs.js +142 -0
- package/lib/src/controllers/BrandKitController.cjs.js.map +1 -0
- package/lib/src/controllers/BrandKitController.es.js +142 -0
- package/lib/src/controllers/BrandKitController.es.js.map +1 -0
- package/lib/src/controllers/CanvasController.cjs.js +45 -0
- package/lib/src/controllers/CanvasController.cjs.js.map +1 -0
- package/lib/src/controllers/CanvasController.es.js +45 -0
- package/lib/src/controllers/CanvasController.es.js.map +1 -0
- package/lib/src/controllers/CharacterStyleController.cjs.js +58 -0
- package/lib/src/controllers/CharacterStyleController.cjs.js.map +1 -0
- package/lib/src/controllers/CharacterStyleController.es.js +58 -0
- package/lib/src/controllers/CharacterStyleController.es.js.map +1 -0
- package/lib/src/controllers/ClipboardController.cjs.js +54 -0
- package/lib/src/controllers/ClipboardController.cjs.js.map +1 -0
- package/lib/src/controllers/ClipboardController.es.js +54 -0
- package/lib/src/controllers/ClipboardController.es.js.map +1 -0
- package/lib/src/controllers/ColorConversionController.cjs.js +30 -0
- package/lib/src/controllers/ColorConversionController.cjs.js.map +1 -0
- package/lib/src/controllers/ColorConversionController.es.js +30 -0
- package/lib/src/controllers/ColorConversionController.es.js.map +1 -0
- package/lib/src/controllers/ColorStyleController.cjs.js +63 -0
- package/lib/src/controllers/ColorStyleController.cjs.js.map +1 -0
- package/lib/src/controllers/ColorStyleController.es.js +63 -0
- package/lib/src/controllers/ColorStyleController.es.js.map +1 -0
- package/lib/src/controllers/ComponentConnectorController.cjs.js +54 -0
- package/lib/src/controllers/ComponentConnectorController.cjs.js.map +1 -0
- package/lib/src/controllers/ComponentConnectorController.es.js +54 -0
- package/lib/src/controllers/ComponentConnectorController.es.js.map +1 -0
- package/lib/src/controllers/ComponentController.cjs.js +38 -0
- package/lib/src/controllers/ComponentController.cjs.js.map +1 -0
- package/lib/src/controllers/ComponentController.es.js +38 -0
- package/lib/src/controllers/ComponentController.es.js.map +1 -0
- package/lib/src/controllers/ComponentGridController.cjs.js +50 -0
- package/lib/src/controllers/ComponentGridController.cjs.js.map +1 -0
- package/lib/src/controllers/ComponentGridController.d.ts +59 -0
- package/lib/src/controllers/ComponentGridController.es.js +50 -0
- package/lib/src/controllers/ComponentGridController.es.js.map +1 -0
- package/lib/src/controllers/ConfigurationController.cjs.js +68 -0
- package/lib/src/controllers/ConfigurationController.cjs.js.map +1 -0
- package/lib/src/controllers/ConfigurationController.d.ts +6 -0
- package/lib/src/controllers/ConfigurationController.es.js +68 -0
- package/lib/src/controllers/ConfigurationController.es.js.map +1 -0
- package/lib/src/controllers/ConnectorController.cjs.js +190 -0
- package/lib/src/controllers/ConnectorController.cjs.js.map +1 -0
- package/lib/src/controllers/ConnectorController.es.js +190 -0
- package/lib/src/controllers/ConnectorController.es.js.map +1 -0
- package/lib/src/controllers/DataConnectorController.cjs.js +88 -0
- package/lib/src/controllers/DataConnectorController.cjs.js.map +1 -0
- package/lib/src/controllers/DataConnectorController.es.js +88 -0
- package/lib/src/controllers/DataConnectorController.es.js.map +1 -0
- package/lib/src/controllers/DataSourceController.cjs.js +46 -0
- package/lib/src/controllers/DataSourceController.cjs.js.map +1 -0
- package/lib/src/controllers/DataSourceController.es.js +46 -0
- package/lib/src/controllers/DataSourceController.es.js.map +1 -0
- package/lib/src/controllers/DebugController.cjs.js +42 -0
- package/lib/src/controllers/DebugController.cjs.js.map +1 -0
- package/lib/src/controllers/DebugController.es.js +42 -0
- package/lib/src/controllers/DebugController.es.js.map +1 -0
- package/lib/src/controllers/DocumentController.cjs.js +40 -0
- package/lib/src/controllers/DocumentController.cjs.js.map +1 -0
- package/lib/src/controllers/DocumentController.d.ts +6 -0
- package/lib/src/controllers/DocumentController.es.js +40 -0
- package/lib/src/controllers/DocumentController.es.js.map +1 -0
- package/lib/src/controllers/ExperimentController.cjs.js +60 -0
- package/lib/src/controllers/ExperimentController.cjs.js.map +1 -0
- package/lib/src/controllers/ExperimentController.es.js +60 -0
- package/lib/src/controllers/ExperimentController.es.js.map +1 -0
- package/lib/src/controllers/FontConnectorController.cjs.js +58 -0
- package/lib/src/controllers/FontConnectorController.cjs.js.map +1 -0
- package/lib/src/controllers/FontConnectorController.es.js +58 -0
- package/lib/src/controllers/FontConnectorController.es.js.map +1 -0
- package/lib/src/controllers/FontController.cjs.js +82 -0
- package/lib/src/controllers/FontController.cjs.js.map +1 -0
- package/lib/src/controllers/FontController.es.js +82 -0
- package/lib/src/controllers/FontController.es.js.map +1 -0
- package/lib/src/controllers/FrameController.cjs.js +585 -0
- package/lib/src/controllers/FrameController.cjs.js.map +1 -0
- package/lib/src/controllers/FrameController.d.ts +10 -1
- package/lib/src/controllers/FrameController.es.js +585 -0
- package/lib/src/controllers/FrameController.es.js.map +1 -0
- package/lib/src/controllers/GradientStyleController.cjs.js +59 -0
- package/lib/src/controllers/GradientStyleController.cjs.js.map +1 -0
- package/lib/src/controllers/GradientStyleController.es.js +59 -0
- package/lib/src/controllers/GradientStyleController.es.js.map +1 -0
- package/lib/src/controllers/InfoController.cjs.js +12 -0
- package/lib/src/controllers/InfoController.cjs.js.map +1 -0
- package/lib/src/controllers/InfoController.es.js +12 -0
- package/lib/src/controllers/InfoController.es.js.map +1 -0
- package/lib/src/controllers/LayoutController.cjs.js +179 -0
- package/lib/src/controllers/LayoutController.cjs.js.map +1 -0
- package/lib/src/controllers/LayoutController.es.js +179 -0
- package/lib/src/controllers/LayoutController.es.js.map +1 -0
- package/lib/src/controllers/MediaConnectorController.cjs.js +93 -0
- package/lib/src/controllers/MediaConnectorController.cjs.js.map +1 -0
- package/lib/src/controllers/MediaConnectorController.es.js +93 -0
- package/lib/src/controllers/MediaConnectorController.es.js.map +1 -0
- package/lib/src/controllers/PageController.cjs.js +95 -0
- package/lib/src/controllers/PageController.cjs.js.map +1 -0
- package/lib/src/controllers/PageController.es.js +95 -0
- package/lib/src/controllers/PageController.es.js.map +1 -0
- package/lib/src/controllers/ParagraphStyleController.cjs.js +58 -0
- package/lib/src/controllers/ParagraphStyleController.cjs.js.map +1 -0
- package/lib/src/controllers/ParagraphStyleController.es.js +58 -0
- package/lib/src/controllers/ParagraphStyleController.es.js.map +1 -0
- package/lib/src/controllers/ShapeController.cjs.js +78 -0
- package/lib/src/controllers/ShapeController.cjs.js.map +1 -0
- package/lib/src/controllers/ShapeController.es.js +78 -0
- package/lib/src/controllers/ShapeController.es.js.map +1 -0
- package/lib/src/controllers/SubscriberController.cjs.js +188 -0
- package/lib/src/controllers/SubscriberController.cjs.js.map +1 -0
- package/lib/src/controllers/SubscriberController.d.ts +6 -0
- package/lib/src/controllers/SubscriberController.es.js +188 -0
- package/lib/src/controllers/SubscriberController.es.js.map +1 -0
- package/lib/src/controllers/TextStyleController.cjs.js +38 -0
- package/lib/src/controllers/TextStyleController.cjs.js.map +1 -0
- package/lib/src/controllers/TextStyleController.es.js +38 -0
- package/lib/src/controllers/TextStyleController.es.js.map +1 -0
- package/lib/src/controllers/ToolController.cjs.js +65 -0
- package/lib/src/controllers/ToolController.cjs.js.map +1 -0
- package/lib/src/controllers/ToolController.d.ts +4 -0
- package/lib/src/controllers/ToolController.es.js +65 -0
- package/lib/src/controllers/ToolController.es.js.map +1 -0
- package/lib/src/controllers/UndoManagerController.cjs.js +134 -0
- package/lib/src/controllers/UndoManagerController.cjs.js.map +1 -0
- package/lib/src/controllers/UndoManagerController.es.js +134 -0
- package/lib/src/controllers/UndoManagerController.es.js.map +1 -0
- package/lib/src/controllers/UtilsController.cjs.js +97 -0
- package/lib/src/controllers/UtilsController.cjs.js.map +1 -0
- package/lib/src/controllers/UtilsController.es.js +97 -0
- package/lib/src/controllers/UtilsController.es.js.map +1 -0
- package/lib/src/controllers/VariableController.cjs.js +433 -0
- package/lib/src/controllers/VariableController.cjs.js.map +1 -0
- package/lib/src/controllers/VariableController.d.ts +16 -0
- package/lib/src/controllers/VariableController.es.js +433 -0
- package/lib/src/controllers/VariableController.es.js.map +1 -0
- package/lib/src/exceptions/AsyncExceptions.cjs.js +22 -0
- package/lib/src/exceptions/AsyncExceptions.cjs.js.map +1 -0
- package/lib/src/exceptions/AsyncExceptions.es.js +22 -0
- package/lib/src/exceptions/AsyncExceptions.es.js.map +1 -0
- package/lib/src/exceptions/Codes.cjs.js +7 -0
- package/lib/src/exceptions/Codes.cjs.js.map +1 -0
- package/lib/src/exceptions/Codes.es.js +7 -0
- package/lib/src/exceptions/Codes.es.js.map +1 -0
- package/lib/src/exceptions/Exceptions.cjs.js +17 -0
- package/lib/src/exceptions/Exceptions.cjs.js.map +1 -0
- package/lib/src/exceptions/Exceptions.es.js +17 -0
- package/lib/src/exceptions/Exceptions.es.js.map +1 -0
- package/lib/src/exceptions/Helpers.cjs.js +50 -0
- package/lib/src/exceptions/Helpers.cjs.js.map +1 -0
- package/lib/src/exceptions/Helpers.es.js +50 -0
- package/lib/src/exceptions/Helpers.es.js.map +1 -0
- package/lib/src/index.cjs.js +138 -0
- package/lib/src/index.cjs.js.map +1 -0
- package/lib/src/index.d.ts +8 -4
- package/lib/src/index.es.js +138 -0
- package/lib/src/index.es.js.map +1 -0
- package/lib/src/interactions/Connector.cjs.js +199 -0
- package/lib/src/interactions/Connector.cjs.js.map +1 -0
- package/lib/src/interactions/Connector.d.ts +1 -0
- package/lib/src/interactions/Connector.es.js +199 -0
- package/lib/src/interactions/Connector.es.js.map +1 -0
- package/lib/src/next/NextInitiator.cjs.js +28 -0
- package/lib/src/next/NextInitiator.cjs.js.map +1 -0
- package/lib/src/next/NextInitiator.es.js +28 -0
- package/lib/src/next/NextInitiator.es.js.map +1 -0
- package/lib/src/next/controllers/BrandKitController.cjs.js +34 -0
- package/lib/src/next/controllers/BrandKitController.cjs.js.map +1 -0
- package/lib/src/next/controllers/BrandKitController.es.js +34 -0
- package/lib/src/next/controllers/BrandKitController.es.js.map +1 -0
- package/lib/src/next/controllers/ConnectorController.cjs.js +38 -0
- package/lib/src/next/controllers/ConnectorController.cjs.js.map +1 -0
- package/lib/src/next/controllers/ConnectorController.es.js +38 -0
- package/lib/src/next/controllers/ConnectorController.es.js.map +1 -0
- package/lib/src/next/controllers/PageController.cjs.js +40 -0
- package/lib/src/next/controllers/PageController.cjs.js.map +1 -0
- package/lib/src/next/controllers/PageController.es.js +40 -0
- package/lib/src/next/controllers/PageController.es.js.map +1 -0
- package/lib/src/next/controllers/SubscriberController.cjs.js +24 -0
- package/lib/src/next/controllers/SubscriberController.cjs.js.map +1 -0
- package/lib/src/next/controllers/SubscriberController.es.js +24 -0
- package/lib/src/next/controllers/SubscriberController.es.js.map +1 -0
- package/lib/src/next/controllers/VariableController.cjs.js +87 -0
- package/lib/src/next/controllers/VariableController.cjs.js.map +1 -0
- package/lib/src/next/controllers/VariableController.es.js +87 -0
- package/lib/src/next/controllers/VariableController.es.js.map +1 -0
- package/lib/src/next/index.cjs.js +5 -0
- package/lib/src/next/index.cjs.js.map +1 -0
- package/lib/src/next/index.es.js +5 -0
- package/lib/src/next/index.es.js.map +1 -0
- package/lib/src/next/types/ConnectorTypes.cjs.js +10 -0
- package/lib/src/next/types/ConnectorTypes.cjs.js.map +1 -0
- package/lib/src/next/types/ConnectorTypes.es.js +10 -0
- package/lib/src/next/types/ConnectorTypes.es.js.map +1 -0
- package/lib/src/sdk/editor-engine.json.cjs.js +9 -0
- package/lib/src/sdk/editor-engine.json.cjs.js.map +1 -0
- package/lib/src/sdk/editor-engine.json.es.js +9 -0
- package/lib/src/sdk/editor-engine.json.es.js.map +1 -0
- package/lib/src/sdk/package.json.cjs.js +9 -0
- package/lib/src/sdk/package.json.cjs.js.map +1 -0
- package/lib/src/sdk/package.json.es.js +9 -0
- package/lib/src/sdk/package.json.es.js.map +1 -0
- package/lib/src/sdk.cjs.js +231 -0
- package/lib/src/sdk.cjs.js.map +1 -0
- package/lib/src/sdk.d.ts +2 -0
- package/lib/src/sdk.es.js +231 -0
- package/lib/src/sdk.es.js.map +1 -0
- package/lib/src/types/ActionTypes.cjs.js +12 -0
- package/lib/src/types/ActionTypes.cjs.js.map +1 -0
- package/lib/src/types/ActionTypes.es.js +12 -0
- package/lib/src/types/ActionTypes.es.js.map +1 -0
- package/lib/src/types/AnimationTypes.cjs.js +56 -0
- package/lib/src/types/AnimationTypes.cjs.js.map +1 -0
- package/lib/src/types/AnimationTypes.es.js +56 -0
- package/lib/src/types/AnimationTypes.es.js.map +1 -0
- package/lib/src/types/BarcodeTypes.cjs.js +45 -0
- package/lib/src/types/BarcodeTypes.cjs.js.map +1 -0
- package/lib/src/types/BarcodeTypes.es.js +45 -0
- package/lib/src/types/BarcodeTypes.es.js.map +1 -0
- package/lib/src/types/ColorStyleTypes.cjs.js +23 -0
- package/lib/src/types/ColorStyleTypes.cjs.js.map +1 -0
- package/lib/src/types/ColorStyleTypes.es.js +23 -0
- package/lib/src/types/ColorStyleTypes.es.js.map +1 -0
- package/lib/src/types/CommonTypes.cjs.js +30 -0
- package/lib/src/types/CommonTypes.cjs.js.map +1 -0
- package/lib/src/types/CommonTypes.d.ts +8 -0
- package/lib/src/types/CommonTypes.es.js +30 -0
- package/lib/src/types/CommonTypes.es.js.map +1 -0
- package/lib/src/types/ComponentConnectorTypes.cjs.js +10 -0
- package/lib/src/types/ComponentConnectorTypes.cjs.js.map +1 -0
- package/lib/src/types/ComponentConnectorTypes.es.js +10 -0
- package/lib/src/types/ComponentConnectorTypes.es.js.map +1 -0
- package/lib/src/types/ComponentGridTypes.cjs.js +8 -0
- package/lib/src/types/ComponentGridTypes.cjs.js.map +1 -0
- package/lib/src/types/ComponentGridTypes.d.ts +25 -0
- package/lib/src/types/ComponentGridTypes.es.js +8 -0
- package/lib/src/types/ComponentGridTypes.es.js.map +1 -0
- package/lib/src/types/ConfigurationTypes.cjs.js +39 -0
- package/lib/src/types/ConfigurationTypes.cjs.js.map +1 -0
- package/lib/src/types/ConfigurationTypes.d.ts +2 -0
- package/lib/src/types/ConfigurationTypes.es.js +39 -0
- package/lib/src/types/ConfigurationTypes.es.js.map +1 -0
- package/lib/src/types/ConnectorTypes.cjs.js +159 -0
- package/lib/src/types/ConnectorTypes.cjs.js.map +1 -0
- package/lib/src/types/ConnectorTypes.d.ts +10 -6
- package/lib/src/types/ConnectorTypes.es.js +159 -0
- package/lib/src/types/ConnectorTypes.es.js.map +1 -0
- package/lib/src/types/DataConnectorTypes.d.ts +1 -1
- package/lib/src/types/DocumentTypes.cjs.js +19 -0
- package/lib/src/types/DocumentTypes.cjs.js.map +1 -0
- package/lib/src/types/DocumentTypes.es.js +19 -0
- package/lib/src/types/DocumentTypes.es.js.map +1 -0
- package/lib/src/types/EngineEditModeTypes.cjs.js +13 -0
- package/lib/src/types/EngineEditModeTypes.cjs.js.map +1 -0
- package/lib/src/types/EngineEditModeTypes.es.js +13 -0
- package/lib/src/types/EngineEditModeTypes.es.js.map +1 -0
- package/lib/src/types/FontConnectorTypes.cjs.js +9 -0
- package/lib/src/types/FontConnectorTypes.cjs.js.map +1 -0
- package/lib/src/types/FontConnectorTypes.es.js +9 -0
- package/lib/src/types/FontConnectorTypes.es.js.map +1 -0
- package/lib/src/types/FrameTypes.cjs.js +174 -0
- package/lib/src/types/FrameTypes.cjs.js.map +1 -0
- package/lib/src/types/FrameTypes.d.ts +48 -4
- package/lib/src/types/FrameTypes.es.js +174 -0
- package/lib/src/types/FrameTypes.es.js.map +1 -0
- package/lib/src/types/GradientStyleTypes.cjs.js +14 -0
- package/lib/src/types/GradientStyleTypes.cjs.js.map +1 -0
- package/lib/src/types/GradientStyleTypes.es.js +14 -0
- package/lib/src/types/GradientStyleTypes.es.js.map +1 -0
- package/lib/src/types/LayoutTypes.cjs.js +31 -0
- package/lib/src/types/LayoutTypes.cjs.js.map +1 -0
- package/lib/src/types/LayoutTypes.es.js +31 -0
- package/lib/src/types/LayoutTypes.es.js.map +1 -0
- package/lib/src/types/MediaConnectorTypes.cjs.js +18 -0
- package/lib/src/types/MediaConnectorTypes.cjs.js.map +1 -0
- package/lib/src/types/MediaConnectorTypes.es.js +18 -0
- package/lib/src/types/MediaConnectorTypes.es.js.map +1 -0
- package/lib/src/types/ParagraphStyleTypes.cjs.js +21 -0
- package/lib/src/types/ParagraphStyleTypes.cjs.js.map +1 -0
- package/lib/src/types/ParagraphStyleTypes.es.js +21 -0
- package/lib/src/types/ParagraphStyleTypes.es.js.map +1 -0
- package/lib/src/types/RichTextRuleTypes.cjs.js +22 -0
- package/lib/src/types/RichTextRuleTypes.cjs.js.map +1 -0
- package/lib/src/types/RichTextRuleTypes.d.ts +119 -0
- package/lib/src/types/RichTextRuleTypes.es.js +22 -0
- package/lib/src/types/RichTextRuleTypes.es.js.map +1 -0
- package/lib/src/types/ShapeTypes.cjs.js +17 -0
- package/lib/src/types/ShapeTypes.cjs.js.map +1 -0
- package/lib/src/types/ShapeTypes.es.js +17 -0
- package/lib/src/types/ShapeTypes.es.js.map +1 -0
- package/lib/src/types/TextStyleTypes.cjs.js +86 -0
- package/lib/src/types/TextStyleTypes.cjs.js.map +1 -0
- package/lib/src/types/TextStyleTypes.es.js +86 -0
- package/lib/src/types/TextStyleTypes.es.js.map +1 -0
- package/lib/src/types/VariableTypes.cjs.js +81 -0
- package/lib/src/types/VariableTypes.cjs.js.map +1 -0
- package/lib/src/types/VariableTypes.d.ts +5 -0
- package/lib/src/types/VariableTypes.es.js +81 -0
- package/lib/src/types/VariableTypes.es.js.map +1 -0
- package/lib/src/types/ViewModeTypes.cjs.js +9 -0
- package/lib/src/types/ViewModeTypes.cjs.js.map +1 -0
- package/lib/src/types/ViewModeTypes.es.js +9 -0
- package/lib/src/types/ViewModeTypes.es.js.map +1 -0
- package/lib/src/utils/BrandKitAdapter.cjs.js +42 -0
- package/lib/src/utils/BrandKitAdapter.cjs.js.map +1 -0
- package/lib/src/utils/BrandKitAdapter.es.js +42 -0
- package/lib/src/utils/BrandKitAdapter.es.js.map +1 -0
- package/lib/src/utils/ConfigHelper.cjs.js +214 -0
- package/lib/src/utils/ConfigHelper.cjs.js.map +1 -0
- package/lib/src/utils/ConfigHelper.es.js +214 -0
- package/lib/src/utils/ConfigHelper.es.js.map +1 -0
- package/lib/src/utils/ConnectorCompatibilityTools.cjs.js +47 -0
- package/lib/src/utils/ConnectorCompatibilityTools.cjs.js.map +1 -0
- package/lib/src/utils/ConnectorCompatibilityTools.es.js +47 -0
- package/lib/src/utils/ConnectorCompatibilityTools.es.js.map +1 -0
- package/lib/src/utils/DataItemMappingTools.cjs.js +56 -0
- package/lib/src/utils/DataItemMappingTools.cjs.js.map +1 -0
- package/lib/src/utils/DataItemMappingTools.d.ts +3 -2
- package/lib/src/utils/DataItemMappingTools.es.js +56 -0
- package/lib/src/utils/DataItemMappingTools.es.js.map +1 -0
- package/lib/src/utils/EditorResponseData.cjs.js +35 -0
- package/lib/src/utils/EditorResponseData.cjs.js.map +1 -0
- package/lib/src/utils/EditorResponseData.es.js +35 -0
- package/lib/src/utils/EditorResponseData.es.js.map +1 -0
- package/lib/src/utils/EngineCallbackHandler.cjs.js +25 -0
- package/lib/src/utils/EngineCallbackHandler.cjs.js.map +1 -0
- package/lib/src/utils/EngineCallbackHandler.es.js +25 -0
- package/lib/src/utils/EngineCallbackHandler.es.js.map +1 -0
- package/lib/src/utils/EngineEvent.cjs.js +46 -0
- package/lib/src/utils/EngineEvent.cjs.js.map +1 -0
- package/lib/src/utils/EngineEvent.es.js +46 -0
- package/lib/src/utils/EngineEvent.es.js.map +1 -0
- package/lib/src/utils/EngineEventTrigger.cjs.js +32 -0
- package/lib/src/utils/EngineEventTrigger.cjs.js.map +1 -0
- package/lib/src/utils/EngineEventTrigger.es.js +32 -0
- package/lib/src/utils/EngineEventTrigger.es.js.map +1 -0
- package/lib/src/utils/Enums.cjs.js +52 -0
- package/lib/src/utils/Enums.cjs.js.map +1 -0
- package/lib/src/utils/Enums.d.ts +2 -1
- package/lib/src/utils/Enums.es.js +52 -0
- package/lib/src/utils/Enums.es.js.map +1 -0
- package/lib/src/utils/LocalConfigurationDecorator.cjs.js +59 -0
- package/lib/src/utils/LocalConfigurationDecorator.cjs.js.map +1 -0
- package/lib/src/utils/LocalConfigurationDecorator.es.js +59 -0
- package/lib/src/utils/LocalConfigurationDecorator.es.js.map +1 -0
- package/lib/src/utils/MathUtils.cjs.js +8 -0
- package/lib/src/utils/MathUtils.cjs.js.map +1 -0
- package/lib/src/utils/MathUtils.es.js +8 -0
- package/lib/src/utils/MathUtils.es.js.map +1 -0
- package/lib/src/utils/VariableHelper.cjs.js +15 -0
- package/lib/src/utils/VariableHelper.cjs.js.map +1 -0
- package/lib/src/utils/VariableHelper.es.js +15 -0
- package/lib/src/utils/VariableHelper.es.js.map +1 -0
- package/package.json +19 -6
- package/_bundles/main.es.js +0 -2688
- package/_bundles/main.es.js.map +0 -1
- package/connector-types/src/Common.js +0 -9
- package/connector-types/src/Common.js.map +0 -1
- package/connector-types/src/ComponentConnector.js +0 -3
- package/connector-types/src/ComponentConnector.js.map +0 -1
- package/connector-types/src/Connector.Shared.js +0 -2
- package/connector-types/src/Connector.Shared.js.map +0 -1
- package/connector-types/src/DataConnector.js +0 -2
- package/connector-types/src/DataConnector.js.map +0 -1
- package/connector-types/src/FontConnector.js +0 -2
- package/connector-types/src/FontConnector.js.map +0 -1
- package/connector-types/src/MediaConnector.js +0 -2
- package/connector-types/src/MediaConnector.js.map +0 -1
- package/connector-types/src/index.js +0 -7
- package/connector-types/src/index.js.map +0 -1
- package/lib/editor-engine.json +0 -3
- package/lib/package.json +0 -87
- package/lib/src/controllers/ActionController.js +0 -178
- package/lib/src/controllers/ActionController.js.map +0 -1
- package/lib/src/controllers/AnimationController.js +0 -135
- package/lib/src/controllers/AnimationController.js.map +0 -1
- package/lib/src/controllers/BarcodeController.js +0 -288
- package/lib/src/controllers/BarcodeController.js.map +0 -1
- package/lib/src/controllers/BrandKitController.js +0 -230
- package/lib/src/controllers/BrandKitController.js.map +0 -1
- package/lib/src/controllers/CanvasController.js +0 -84
- package/lib/src/controllers/CanvasController.js.map +0 -1
- package/lib/src/controllers/CharacterStyleController.js +0 -119
- package/lib/src/controllers/CharacterStyleController.js.map +0 -1
- package/lib/src/controllers/ClipboardController.js +0 -87
- package/lib/src/controllers/ClipboardController.js.map +0 -1
- package/lib/src/controllers/ColorConversionController.js +0 -49
- package/lib/src/controllers/ColorConversionController.js.map +0 -1
- package/lib/src/controllers/ColorStyleController.js +0 -118
- package/lib/src/controllers/ColorStyleController.js.map +0 -1
- package/lib/src/controllers/ComponentConnectorController.js +0 -124
- package/lib/src/controllers/ComponentConnectorController.js.map +0 -1
- package/lib/src/controllers/ComponentController.js +0 -74
- package/lib/src/controllers/ComponentController.js.map +0 -1
- package/lib/src/controllers/ConfigurationController.js +0 -84
- package/lib/src/controllers/ConfigurationController.js.map +0 -1
- package/lib/src/controllers/ConnectorController.js +0 -320
- package/lib/src/controllers/ConnectorController.js.map +0 -1
- package/lib/src/controllers/DataConnectorController.js +0 -129
- package/lib/src/controllers/DataConnectorController.js.map +0 -1
- package/lib/src/controllers/DataSourceController.js +0 -83
- package/lib/src/controllers/DataSourceController.js.map +0 -1
- package/lib/src/controllers/DebugController.js +0 -72
- package/lib/src/controllers/DebugController.js.map +0 -1
- package/lib/src/controllers/DocumentController.js +0 -77
- package/lib/src/controllers/DocumentController.js.map +0 -1
- package/lib/src/controllers/ExperimentController.js +0 -131
- package/lib/src/controllers/ExperimentController.js.map +0 -1
- package/lib/src/controllers/FontConnectorController.js +0 -146
- package/lib/src/controllers/FontConnectorController.js.map +0 -1
- package/lib/src/controllers/FontController.js +0 -178
- package/lib/src/controllers/FontController.js.map +0 -1
- package/lib/src/controllers/FrameController.js +0 -1308
- package/lib/src/controllers/FrameController.js.map +0 -1
- package/lib/src/controllers/GradientStyleController.js +0 -114
- package/lib/src/controllers/GradientStyleController.js.map +0 -1
- package/lib/src/controllers/InfoController.js +0 -20
- package/lib/src/controllers/InfoController.js.map +0 -1
- package/lib/src/controllers/LayoutController.js +0 -401
- package/lib/src/controllers/LayoutController.js.map +0 -1
- package/lib/src/controllers/MediaConnectorController.js +0 -177
- package/lib/src/controllers/MediaConnectorController.js.map +0 -1
- package/lib/src/controllers/PageController.js +0 -186
- package/lib/src/controllers/PageController.js.map +0 -1
- package/lib/src/controllers/ParagraphStyleController.js +0 -115
- package/lib/src/controllers/ParagraphStyleController.js.map +0 -1
- package/lib/src/controllers/ShapeController.js +0 -172
- package/lib/src/controllers/ShapeController.js.map +0 -1
- package/lib/src/controllers/SubscriberController.js +0 -379
- package/lib/src/controllers/SubscriberController.js.map +0 -1
- package/lib/src/controllers/TextStyleController.js +0 -69
- package/lib/src/controllers/TextStyleController.js.map +0 -1
- package/lib/src/controllers/ToolController.js +0 -112
- package/lib/src/controllers/ToolController.js.map +0 -1
- package/lib/src/controllers/UndoManagerController.js +0 -207
- package/lib/src/controllers/UndoManagerController.js.map +0 -1
- package/lib/src/controllers/UtilsController.js +0 -135
- package/lib/src/controllers/UtilsController.js.map +0 -1
- package/lib/src/controllers/VariableController.js +0 -891
- package/lib/src/controllers/VariableController.js.map +0 -1
- package/lib/src/exceptions/AsyncExceptions.js +0 -23
- package/lib/src/exceptions/AsyncExceptions.js.map +0 -1
- package/lib/src/exceptions/Codes.js +0 -4
- package/lib/src/exceptions/Codes.js.map +0 -1
- package/lib/src/exceptions/Exceptions.js +0 -13
- package/lib/src/exceptions/Exceptions.js.map +0 -1
- package/lib/src/exceptions/Helpers.js +0 -55
- package/lib/src/exceptions/Helpers.js.map +0 -1
- package/lib/src/exceptions/index.js +0 -4
- package/lib/src/exceptions/index.js.map +0 -1
- package/lib/src/index.js +0 -31
- package/lib/src/index.js.map +0 -1
- package/lib/src/interactions/Connector.js +0 -195
- package/lib/src/interactions/Connector.js.map +0 -1
- package/lib/src/next/NextInitiator.js +0 -34
- package/lib/src/next/NextInitiator.js.map +0 -1
- package/lib/src/next/controllers/BrandKitController.js +0 -57
- package/lib/src/next/controllers/BrandKitController.js.map +0 -1
- package/lib/src/next/controllers/CanvasController.js +0 -54
- package/lib/src/next/controllers/CanvasController.js.map +0 -1
- package/lib/src/next/controllers/ConnectorController.js +0 -79
- package/lib/src/next/controllers/ConnectorController.js.map +0 -1
- package/lib/src/next/controllers/PageController.js +0 -65
- package/lib/src/next/controllers/PageController.js.map +0 -1
- package/lib/src/next/controllers/SubscriberController.js +0 -42
- package/lib/src/next/controllers/SubscriberController.js.map +0 -1
- package/lib/src/next/controllers/VariableController.js +0 -158
- package/lib/src/next/controllers/VariableController.js.map +0 -1
- package/lib/src/next/index.js +0 -2
- package/lib/src/next/index.js.map +0 -1
- package/lib/src/next/tests/controllers/BrandKitController.test.js +0 -104
- package/lib/src/next/tests/controllers/BrandKitController.test.js.map +0 -1
- package/lib/src/next/tests/controllers/CanvasController.test.js +0 -37
- package/lib/src/next/tests/controllers/CanvasController.test.js.map +0 -1
- package/lib/src/next/tests/controllers/ConnectorController.test.js +0 -71
- package/lib/src/next/tests/controllers/ConnectorController.test.js.map +0 -1
- package/lib/src/next/tests/controllers/PageController.test.js +0 -37
- package/lib/src/next/tests/controllers/PageController.test.js.map +0 -1
- package/lib/src/next/tests/controllers/SubscriberContoller.test.js +0 -54
- package/lib/src/next/tests/controllers/SubscriberContoller.test.js.map +0 -1
- package/lib/src/next/tests/controllers/VariableController.test.js +0 -186
- package/lib/src/next/tests/controllers/VariableController.test.js.map +0 -1
- package/lib/src/next/types/BrandKitTypes.js +0 -2
- package/lib/src/next/types/BrandKitTypes.js.map +0 -1
- package/lib/src/next/types/ConnectorTypes.js +0 -27
- package/lib/src/next/types/ConnectorTypes.js.map +0 -1
- package/lib/src/next/types/NextSubscribers.js +0 -2
- package/lib/src/next/types/NextSubscribers.js.map +0 -1
- package/lib/src/next/types/PageTypes.js +0 -2
- package/lib/src/next/types/PageTypes.js.map +0 -1
- package/lib/src/next/types/VariableTypes.js +0 -12
- package/lib/src/next/types/VariableTypes.js.map +0 -1
- package/lib/src/sdk.js +0 -231
- package/lib/src/sdk.js.map +0 -1
- package/lib/src/setupTests.js +0 -2
- package/lib/src/setupTests.js.map +0 -1
- package/lib/src/tests/__mocks__/Animations.js +0 -10
- package/lib/src/tests/__mocks__/Animations.js.map +0 -1
- package/lib/src/tests/__mocks__/Brandkit.js +0 -532
- package/lib/src/tests/__mocks__/Brandkit.js.map +0 -1
- package/lib/src/tests/__mocks__/Config.js +0 -41
- package/lib/src/tests/__mocks__/Config.js.map +0 -1
- package/lib/src/tests/__mocks__/FrameProperties.js +0 -20
- package/lib/src/tests/__mocks__/FrameProperties.js.map +0 -1
- package/lib/src/tests/__mocks__/MockImageFrameSource.js +0 -15
- package/lib/src/tests/__mocks__/MockImageFrameSource.js.map +0 -1
- package/lib/src/tests/__mocks__/localConfig.js +0 -4
- package/lib/src/tests/__mocks__/localConfig.js.map +0 -1
- package/lib/src/tests/__mocks__/mockDocument.js +0 -2
- package/lib/src/tests/__mocks__/mockDocument.js.map +0 -1
- package/lib/src/tests/controllers/ActionController.test.js +0 -156
- package/lib/src/tests/controllers/ActionController.test.js.map +0 -1
- package/lib/src/tests/controllers/AnimationController.test.js +0 -91
- package/lib/src/tests/controllers/AnimationController.test.js.map +0 -1
- package/lib/src/tests/controllers/BarcodeController.test.js +0 -292
- package/lib/src/tests/controllers/BarcodeController.test.js.map +0 -1
- package/lib/src/tests/controllers/BrandKitController.test.js +0 -318
- package/lib/src/tests/controllers/BrandKitController.test.js.map +0 -1
- package/lib/src/tests/controllers/CanvasController.test.js +0 -58
- package/lib/src/tests/controllers/CanvasController.test.js.map +0 -1
- package/lib/src/tests/controllers/CharacterStyleController.test.js +0 -155
- package/lib/src/tests/controllers/CharacterStyleController.test.js.map +0 -1
- package/lib/src/tests/controllers/ClipboardController.test.js +0 -64
- package/lib/src/tests/controllers/ClipboardController.test.js.map +0 -1
- package/lib/src/tests/controllers/ColorConversionController.test.js +0 -32
- package/lib/src/tests/controllers/ColorConversionController.test.js.map +0 -1
- package/lib/src/tests/controllers/ColorStyleController.test.js +0 -94
- package/lib/src/tests/controllers/ColorStyleController.test.js.map +0 -1
- package/lib/src/tests/controllers/ComponentConnectorController.test.js +0 -73
- package/lib/src/tests/controllers/ComponentConnectorController.test.js.map +0 -1
- package/lib/src/tests/controllers/ComponentController.test.js +0 -52
- package/lib/src/tests/controllers/ComponentController.test.js.map +0 -1
- package/lib/src/tests/controllers/ConnectorController.test.js +0 -271
- package/lib/src/tests/controllers/ConnectorController.test.js.map +0 -1
- package/lib/src/tests/controllers/DataConnectorController.test.js +0 -145
- package/lib/src/tests/controllers/DataConnectorController.test.js.map +0 -1
- package/lib/src/tests/controllers/DataSourceController.test.js +0 -67
- package/lib/src/tests/controllers/DataSourceController.test.js.map +0 -1
- package/lib/src/tests/controllers/DebugController.test.js +0 -47
- package/lib/src/tests/controllers/DebugController.test.js.map +0 -1
- package/lib/src/tests/controllers/DocumentController.test.js +0 -63
- package/lib/src/tests/controllers/DocumentController.test.js.map +0 -1
- package/lib/src/tests/controllers/ExperimentController.test.js +0 -98
- package/lib/src/tests/controllers/ExperimentController.test.js.map +0 -1
- package/lib/src/tests/controllers/FontConnectorController.test.js +0 -87
- package/lib/src/tests/controllers/FontConnectorController.test.js.map +0 -1
- package/lib/src/tests/controllers/FontController.test.js +0 -142
- package/lib/src/tests/controllers/FontController.test.js.map +0 -1
- package/lib/src/tests/controllers/FrameConstraintController.test.js +0 -335
- package/lib/src/tests/controllers/FrameConstraintController.test.js.map +0 -1
- package/lib/src/tests/controllers/FrameController.test.js +0 -669
- package/lib/src/tests/controllers/FrameController.test.js.map +0 -1
- package/lib/src/tests/controllers/GradientStyleController.test.js +0 -82
- package/lib/src/tests/controllers/GradientStyleController.test.js.map +0 -1
- package/lib/src/tests/controllers/InfoController.test.js +0 -26
- package/lib/src/tests/controllers/InfoController.test.js.map +0 -1
- package/lib/src/tests/controllers/LayoutController.test.js +0 -345
- package/lib/src/tests/controllers/LayoutController.test.js.map +0 -1
- package/lib/src/tests/controllers/MediaConnectorController.test.js +0 -116
- package/lib/src/tests/controllers/MediaConnectorController.test.js.map +0 -1
- package/lib/src/tests/controllers/PageController.test.js +0 -141
- package/lib/src/tests/controllers/PageController.test.js.map +0 -1
- package/lib/src/tests/controllers/ParagraphStyleController.test.js +0 -164
- package/lib/src/tests/controllers/ParagraphStyleController.test.js.map +0 -1
- package/lib/src/tests/controllers/ShapeController.test.js +0 -102
- package/lib/src/tests/controllers/ShapeController.test.js.map +0 -1
- package/lib/src/tests/controllers/SubscriberContoller.test.js +0 -467
- package/lib/src/tests/controllers/SubscriberContoller.test.js.map +0 -1
- package/lib/src/tests/controllers/TextStyleController.test.js +0 -43
- package/lib/src/tests/controllers/TextStyleController.test.js.map +0 -1
- package/lib/src/tests/controllers/ToolController.test.js +0 -80
- package/lib/src/tests/controllers/ToolController.test.js.map +0 -1
- package/lib/src/tests/controllers/UndoManagerController.test.js +0 -120
- package/lib/src/tests/controllers/UndoManagerController.test.js.map +0 -1
- package/lib/src/tests/controllers/UtilsController.test.js +0 -127
- package/lib/src/tests/controllers/UtilsController.test.js.map +0 -1
- package/lib/src/tests/controllers/VariableController.test.js +0 -579
- package/lib/src/tests/controllers/VariableController.test.js.map +0 -1
- package/lib/src/tests/index.test.js +0 -26
- package/lib/src/tests/index.test.js.map +0 -1
- package/lib/src/tests/interactions/Connector.test.js +0 -44
- package/lib/src/tests/interactions/Connector.test.js.map +0 -1
- package/lib/src/tests/utils/ConnectorCompatibilityTools.test.js +0 -74
- package/lib/src/tests/utils/ConnectorCompatibilityTools.test.js.map +0 -1
- package/lib/src/tests/utils/EditorResponseData.test.js +0 -125
- package/lib/src/tests/utils/EditorResponseData.test.js.map +0 -1
- package/lib/src/tests/utils/EventSubscription.test.js +0 -238
- package/lib/src/tests/utils/EventSubscription.test.js.map +0 -1
- package/lib/src/tests/utils/LocalConfigurationDecorator.test.js +0 -61
- package/lib/src/tests/utils/LocalConfigurationDecorator.test.js.map +0 -1
- package/lib/src/tests/utils/Logging.test.js +0 -99
- package/lib/src/tests/utils/Logging.test.js.map +0 -1
- package/lib/src/tests/utils/Round.test.js +0 -16
- package/lib/src/tests/utils/Round.test.js.map +0 -1
- package/lib/src/types/ActionTypes.js +0 -29
- package/lib/src/types/ActionTypes.js.map +0 -1
- package/lib/src/types/AnimationTypes.js +0 -49
- package/lib/src/types/AnimationTypes.js.map +0 -1
- package/lib/src/types/BarcodeTypes.js +0 -39
- package/lib/src/types/BarcodeTypes.js.map +0 -1
- package/lib/src/types/BrandKitTypes.js +0 -2
- package/lib/src/types/BrandKitTypes.js.map +0 -1
- package/lib/src/types/CharacterStyleTypes.js +0 -2
- package/lib/src/types/CharacterStyleTypes.js.map +0 -1
- package/lib/src/types/ClipboardTypes.js +0 -6
- package/lib/src/types/ClipboardTypes.js.map +0 -1
- package/lib/src/types/ColorStyleTypes.js +0 -42
- package/lib/src/types/ColorStyleTypes.js.map +0 -1
- package/lib/src/types/CommonTypes.js +0 -28
- package/lib/src/types/CommonTypes.js.map +0 -1
- package/lib/src/types/ComponentConnectorTypes.js +0 -10
- package/lib/src/types/ComponentConnectorTypes.js.map +0 -1
- package/lib/src/types/ConfigurationTypes.js +0 -43
- package/lib/src/types/ConfigurationTypes.js.map +0 -1
- package/lib/src/types/ConnectorTypes.js +0 -207
- package/lib/src/types/ConnectorTypes.js.map +0 -1
- package/lib/src/types/DataConnectorTypes.js +0 -2
- package/lib/src/types/DataConnectorTypes.js.map +0 -1
- package/lib/src/types/DebugTypes.js +0 -8
- package/lib/src/types/DebugTypes.js.map +0 -1
- package/lib/src/types/DocumentTypes.js +0 -35
- package/lib/src/types/DocumentTypes.js.map +0 -1
- package/lib/src/types/EngineEditModeTypes.js +0 -10
- package/lib/src/types/EngineEditModeTypes.js.map +0 -1
- package/lib/src/types/FontConnectorTypes.js +0 -6
- package/lib/src/types/FontConnectorTypes.js.map +0 -1
- package/lib/src/types/FontTypes.js +0 -2
- package/lib/src/types/FontTypes.js.map +0 -1
- package/lib/src/types/FrameTypes.js +0 -147
- package/lib/src/types/FrameTypes.js.map +0 -1
- package/lib/src/types/GradientStyleTypes.js +0 -16
- package/lib/src/types/GradientStyleTypes.js.map +0 -1
- package/lib/src/types/LayoutTypes.js +0 -26
- package/lib/src/types/LayoutTypes.js.map +0 -1
- package/lib/src/types/MediaConnectorTypes.js +0 -14
- package/lib/src/types/MediaConnectorTypes.js.map +0 -1
- package/lib/src/types/PageTypes.js +0 -2
- package/lib/src/types/PageTypes.js.map +0 -1
- package/lib/src/types/ParagraphStyleTypes.js +0 -17
- package/lib/src/types/ParagraphStyleTypes.js.map +0 -1
- package/lib/src/types/ShapeTypes.js +0 -13
- package/lib/src/types/ShapeTypes.js.map +0 -1
- package/lib/src/types/TextStyleTypes.js +0 -83
- package/lib/src/types/TextStyleTypes.js.map +0 -1
- package/lib/src/types/TextTypes.js +0 -6
- package/lib/src/types/TextTypes.js.map +0 -1
- package/lib/src/types/VariableTypes.js +0 -70
- package/lib/src/types/VariableTypes.js.map +0 -1
- package/lib/src/types/ViewModeTypes.js +0 -6
- package/lib/src/types/ViewModeTypes.js.map +0 -1
- package/lib/src/types/ViewportTypes.js +0 -2
- package/lib/src/types/ViewportTypes.js.map +0 -1
- package/lib/src/utils/BrandKitAdapter.js +0 -45
- package/lib/src/utils/BrandKitAdapter.js.map +0 -1
- package/lib/src/utils/ConfigHelper.js +0 -92
- package/lib/src/utils/ConfigHelper.js.map +0 -1
- package/lib/src/utils/ConnectorCompatibilityTools.js +0 -54
- package/lib/src/utils/ConnectorCompatibilityTools.js.map +0 -1
- package/lib/src/utils/DataItemMappingTools.js +0 -58
- package/lib/src/utils/DataItemMappingTools.js.map +0 -1
- package/lib/src/utils/EditorResponseData.js +0 -44
- package/lib/src/utils/EditorResponseData.js.map +0 -1
- package/lib/src/utils/EngineCallbackHandler.js +0 -23
- package/lib/src/utils/EngineCallbackHandler.js.map +0 -1
- package/lib/src/utils/EngineEvent.js +0 -44
- package/lib/src/utils/EngineEvent.js.map +0 -1
- package/lib/src/utils/EngineEventTrigger.js +0 -33
- package/lib/src/utils/EngineEventTrigger.js.map +0 -1
- package/lib/src/utils/Enums.js +0 -47
- package/lib/src/utils/Enums.js.map +0 -1
- package/lib/src/utils/LocalConfigurationDecorator.js +0 -76
- package/lib/src/utils/LocalConfigurationDecorator.js.map +0 -1
- package/lib/src/utils/MathUtils.js +0 -5
- package/lib/src/utils/MathUtils.js.map +0 -1
- package/lib/src/utils/VariableHelper.js +0 -12
- package/lib/src/utils/VariableHelper.js.map +0 -1
package/_bundles/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(h,
|
|
1
|
+
(function(h,D){typeof exports=="object"&&typeof module<"u"?D(exports):typeof define=="function"&&define.amd?define(["exports"],D):(h=typeof globalThis<"u"?globalThis:h||self,D(h.StudioSDK=h.StudioSDK||{}))})(this,(function(h){"use strict";var rr=h=>{throw TypeError(h)};var ar=(h,D,V)=>D.has(h)||rr("Cannot "+V);var a=(h,D,V)=>(ar(h,D,"read from private field"),V?V.call(h):D.get(h)),g=(h,D,V)=>D.has(h)?rr("Cannot add the same private member more than once"):D instanceof WeakSet?D.add(h):D.set(h,V),y=(h,D,V,pe)=>(ar(h,D,"write to private field"),pe?pe.call(h,V):D.set(h,V),V);var R,M,z,P,kn,ot,U,ct,qt,k,B,Nt,mt,Gn,ft,St,tt,Rt,ht,Yt,dt,bt,G,lt,Mt,E,Vt,l,F,f,Zt,et,Qt,L,Xt,_n,_,vt,Bt,Z,K,te,ut,ee,Tt,se,ne,H,Jt,C,Ut,kt,Hn,Gt,gt,st,re,It,_t,ye,yt,Ht,x,At,ae,Pt,Q;const V={current:"2.27.0-rc.0"},De={version:"1.44.0"};var W;(function(s){s.Call="call",s.Reply="reply",s.Syn="syn",s.SynAck="synAck",s.Ack="ack"})(W||(W={}));var pt;(function(s){s.Fulfilled="fulfilled",s.Rejected="rejected"})(pt||(pt={}));var jt;(function(s){s.ConnectionDestroyed="ConnectionDestroyed",s.ConnectionTimeout="ConnectionTimeout",s.NoIframeSrc="NoIframeSrc"})(jt||(jt={}));var we;(function(s){s.DataCloneError="DataCloneError"})(we||(we={}));var at;(function(s){s.Message="message"})(at||(at={}));const ir=(s,o)=>{const e=[];let t=!1;return{destroy(n){t||(t=!0,o(`${s}: Destroying connection`),e.forEach(r=>{r(n)}))},onDestroy(n){t?n():e.push(n)}}},or=s=>(...o)=>{s&&console.log("[Penpal]",...o)},cr={"http:":"80","https:":"443"},hr=/^(https?:)?\/\/([^/:]+)?(:(\d+))?/,dr=["file:","data:"],lr=s=>{if(s&&dr.find(d=>s.startsWith(d)))return"null";const o=document.location,e=hr.exec(s);let t,n,r;e?(t=e[1]?e[1]:o.protocol,n=e[2],r=e[4]):(t=o.protocol,n=o.hostname,r=o.port);const c=r&&r!==cr[t]?`:${r}`:"";return`${t}//${n}${c}`},Oe=({name:s,message:o,stack:e})=>({name:s,message:o,stack:e}),ur=s=>{const o=new Error;return Object.keys(s).forEach(e=>o[e]=s[e]),o},gr=(s,o,e)=>{const{localName:t,local:n,remote:r,originForSending:c,originForReceiving:d}=s;let u=!1;const w=p=>{if(p.source!==r||p.data.penpal!==W.Call)return;if(p.origin!==d){e(`${t} received message from origin ${p.origin} which did not match expected origin ${d}`);return}const v=p.data,{methodName:S,args:I,id:N}=v;e(`${t}: Received ${S}() call`);const O=b=>X=>{if(e(`${t}: Sending ${S}() reply`),u){e(`${t}: Unable to send ${S}() reply due to destroyed connection`);return}const $={penpal:W.Reply,id:N,resolution:b,returnValue:X};b===pt.Rejected&&X instanceof Error&&($.returnValue=Oe(X),$.returnValueIsError=!0);try{r.postMessage($,c)}catch(A){if(A.name===we.DataCloneError){const nt={penpal:W.Reply,id:N,resolution:pt.Rejected,returnValue:Oe(A),returnValueIsError:!0};r.postMessage(nt,c)}throw A}};new Promise(b=>b(o[S].apply(o,I))).then(O(pt.Fulfilled),O(pt.Rejected))};return n.addEventListener(at.Message,w),()=>{u=!0,n.removeEventListener(at.Message,w)}};let yr=0;const pr=()=>++yr,Fe=".",Le=s=>s?s.split(Fe):[],wr=s=>s.join(Fe),Cr=(s,o)=>{const e=Le(o||"");return e.push(s),wr(e)},mr=(s,o,e)=>{const t=Le(o);return t.reduce((n,r,c)=>(typeof n[r]>"u"&&(n[r]={}),c===t.length-1&&(n[r]=e),n[r]),s),s},Ne=(s,o)=>{const e={};return Object.keys(s).forEach(t=>{const n=s[t],r=Cr(t,o);typeof n=="object"&&Object.assign(e,Ne(n,r)),typeof n=="function"&&(e[r]=n)}),e},fr=s=>{const o={};for(const e in s)mr(o,e,s[e]);return o},Sr=(s,o,e,t,n)=>{const{localName:r,local:c,remote:d,originForSending:u,originForReceiving:w}=o;let p=!1;n(`${r}: Connecting call sender`);const v=I=>(...N)=>{n(`${r}: Sending ${I}() call`);let O;try{d.closed&&(O=!0)}catch{O=!0}if(O&&t(),p){const b=new Error(`Unable to send ${I}() call due to destroyed connection`);throw b.code=jt.ConnectionDestroyed,b}return new Promise((b,X)=>{const $=pr(),A=rt=>{if(rt.source!==d||rt.data.penpal!==W.Reply||rt.data.id!==$)return;if(rt.origin!==w){n(`${r} received message from origin ${rt.origin} which did not match expected origin ${w}`);return}const xt=rt.data;n(`${r}: Received ${I}() reply`),c.removeEventListener(at.Message,A);let $t=xt.returnValue;xt.returnValueIsError&&($t=ur($t)),(xt.resolution===pt.Fulfilled?b:X)($t)};c.addEventListener(at.Message,A);const nt={penpal:W.Call,id:$,methodName:I,args:N};d.postMessage(nt,u)})},S=e.reduce((I,N)=>(I[N]=v(N),I),{});return Object.assign(s,fr(S)),()=>{p=!0}},br=(s,o,e,t,n)=>{const{destroy:r,onDestroy:c}=t;let d,u;const w={};return p=>{if(p.origin!==o){n(`Parent: Handshake - Received ACK message from origin ${p.origin} which did not match expected origin ${o}`);return}n("Parent: Handshake - Received ACK");const v={localName:"Parent",local:window,remote:p.source,originForSending:e,originForReceiving:o};d&&d(),d=gr(v,s,n),c(d),u&&u.forEach(I=>{delete w[I]}),u=p.data.methodNames;const S=Sr(w,v,u,r,n);return c(S),w}},vr=(s,o,e,t)=>n=>{if(n.origin!==e){s(`Parent: Handshake - Received SYN message from origin ${n.origin} which did not match expected origin ${e}`);return}s("Parent: Handshake - Received SYN, responding with SYN-ACK");const r={penpal:W.SynAck,methodNames:Object.keys(o)};n.source.postMessage(r,t)},Ir=6e4,Ar=(s,o)=>{const{destroy:e,onDestroy:t}=o,n=setInterval(()=>{s.isConnected||(clearInterval(n),e())},Ir);t(()=>{clearInterval(n)})},Pr=(s,o)=>{let e;return s!==void 0&&(e=window.setTimeout(()=>{const t=new Error(`Connection timed out after ${s}ms`);t.code=jt.ConnectionTimeout,o(t)},s)),()=>{clearTimeout(e)}},Er=s=>{if(!s.src&&!s.srcdoc){const o=new Error("Iframe must have src or srcdoc property defined.");throw o.code=jt.NoIframeSrc,o}},Dr=s=>{let{iframe:o,methods:e={},childOrigin:t,timeout:n,debug:r=!1}=s;const c=or(r),d=ir("Parent",c),{onDestroy:u,destroy:w}=d;t||(Er(o),t=lr(o.src));const p=t==="null"?"*":t,v=Ne(e),S=vr(c,v,t,p),I=br(v,t,p,d,c);return{promise:new Promise((O,b)=>{const X=Pr(n,w),$=A=>{if(!(A.source!==o.contentWindow||!A.data)){if(A.data.penpal===W.Syn){S(A);return}if(A.data.penpal===W.Ack){const nt=I(A);nt&&(X(),O(nt));return}}};window.addEventListener(at.Message,$),c("Parent: Awaiting handshake"),Ar(o,d),u(A=>{window.removeEventListener(at.Message,$),A&&b(A)})}),destroy(){w()}}},Or=s=>{const o=new RegExp(/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w]+\/$/);let e="";return o.test(s)?e=s:s.indexOf("/index.html")>-1?e=s.replace("/index.html","/"):s.charAt(-1)!=="/"&&(e=`${s}/`),e},Fr=(s,o,e)=>{const t=Or(o),r=`<html>
|
|
2
2
|
<head>
|
|
3
3
|
<base href="/" />
|
|
4
4
|
<meta charset="UTF-8"/>
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
}
|
|
66
66
|
<\/script>
|
|
67
67
|
</body>
|
|
68
|
-
</html>`;r.srcdoc=n};let ie=null;const vn=(r,o,e,t="chili-editor",s,n)=>{ie&&window.removeEventListener("message",ie);const c=`#${t}`,d=document.createElement("iframe");d.setAttribute("srcdoc"," "),d.setAttribute("title","Chili-Editor"),d.setAttribute("style","width: 100%; height: 100%;"),d.setAttribute("frameBorder","0"),d.setAttribute("referrerpolicy","origin");const u=()=>{const w=document.querySelector(c);if(w){w==null||w.appendChild(d),d.addEventListener("error",()=>{const p=new Error("Failed to setup frame: iframe failed to load");n==null||n(p)},{capture:!0,once:!0});try{bn(d,r,s)}catch(p){p instanceof Error?n==null||n(p):n==null||n(new Error(`Failed to setup frame: ${p}`))}}};document.readyState==="complete"||document.readyState==="interactive"?u():document.addEventListener("DOMContentLoaded",()=>{u()}),ie=w=>{var p;if(w.source===d.contentWindow&&((p=w.data)==null?void 0:p.type)==="iframe-error"){const v=w.data.error,b=new Error(v.message||"Failed to setup frame: error in iframe");n==null||n(b)}},window.addEventListener("message",ie),e(fn({iframe:d,methods:{actionsChanged:o.onActionsChanged,stateChanged:o.onStateChanged,documentLoaded:o.onDocumentLoaded,authExpired:o.onAuthExpired,viewportRequested:o.onViewportRequested,selectedFramesContent:o.onSelectedFramesContentChanged,selectedFramesLayout:o.onSelectedFramesLayoutChanged,allFramesLayout:o.onFramesLayoutChanged,selectedLayoutProperties:o.onSelectedLayoutPropertiesChanged,openLayoutPropertiesPanel:o.onPageSelectionChanged,selectedLayoutUnit:o.onSelectedLayoutUnitChanged,scrubberPositionChanged:o.onScrubberPositionChanged,frameAnimationsChanged:o.onFrameAnimationsChanged,selectedToolChanged:o.onSelectedToolChanged,variableListChanged:o.onVariableListChanged,undoStackStateChanged:o.onUndoStateChanged,selectedLayoutFramesChanged:o.onSelectedLayoutFramesChanged,selectedTextStyleChanged:o.onSelectedTextStyleChanged,colorsChanged:o.onColorsChanged,paragraphStylesChanged:o.onParagraphStylesChanged,characterStylesChanged:o.onCharacterStylesChanged,fontFamiliesChanged:o.onFontFamiliesChanged,selectedLayoutId:o.onSelectedLayoutIdChanged,layoutListChanged:o.onLayoutsChanged,connectorEvent:o.onConnectorEvent,connectorsChanged:o.onConnectorsChanged,zoomChanged:o.onZoomChanged,pageSnapshotInvalidated:o.onPageSnapshotInvalidated,pagesChanged:o.onPagesChanged,pageSizeChanged:o.onPageSizeChanged,shapeCornerRadiusChanged:o.onShapeCornerRadiusChanged,cropActiveFrameIdChanged:o.onCropActiveFrameIdChanged,asyncError:o.onAsyncError,viewModeChanged:o.onViewModeChanged,barcodeValidationChanged:o.onBarcodeValidationChanged,selectedPageIdChanged:o.onSelectedPageIdChanged,dataSourceIdChanged:o.onDataSourceIdChanged,documentIssueListChanged:o.onDocumentIssueListChanged,customUndoDataChanged:o.onCustomUndoDataChanged,engineEditingModeChanged:o.onEngineEditModeChanged,brandKitMediaChanged:o.onBrandKitMediaChanged}}))};var q=(r=>(r.GraFxStudioEnvironmentApiUrl="ENVIRONMENT_API",r.GraFxStudioSdkVersion="SDK_VERSION",r.GraFxStudioDocumentType="DOCUMENT_TYPE",r.GraFxStudioTemplateId="TEMPLATE_ID",r.GraFxStudioAuthToken="GRAFX_AUTH_TOKEN",r.QueryCallCacheEnabled="ENABLE_QUERY_CALL_CACHE",r))(q||{}),Ne=(r=>(r.full="full",r.followConstraints="followConstraints",r))(Ne||{});const An={shortcutOptions:{debugPanel:{enabled:!1},ellipse:{enabled:!1},hand:{enabled:!1},temporaryHand:{enabled:!1},image:{enabled:!1},polygon:{enabled:!1},rectangle:{enabled:!1},select:{enabled:!1},text:{enabled:!1},zoom:{enabled:!1},copyPaste:{enabled:!1},viewMode:{enabled:!1}},frameEditingMode:"full"};var Me=(r=>(r.overflow="overflow",r.fontLoading="fontLoading",r.actionRegister="actionRegister",r.actionExecution="actionExecution",r.actionCircular="actionCircular",r))(Me||{}),we=(r=>(r.project="project",r.template="template",r.component="component",r))(we||{});class Re{constructor(o,e,t,s){this.type="action",this.message=o,this.id=e,this.event=t,this.eventChain=s}}class Ve{constructor(o,e,t){this.type="dataRow",this.count=o,this.message=e,this.exceptions=t}}class Be extends Error{constructor(o,e,t){super(e,t),this.statusCode=o}}class Te extends Error{constructor(o,e,t){super(e,t),this.context=o}}const In=404075,Pn=403032;function pt(r){const o=r.error??"Yikes, something went wrong",e={cause:{name:String(r.status),message:r.error??"Yikes, something went wrong"}};if(r.status===In){const s=JSON.parse(r.data).statusCode;throw new Be(s,o,e)}else throw new Error(o,e)}function En(r){const o=[/DateVariable '([^']+)' should not be part of excludedDays, ".*" was given/,/DateVariable '([^']+)' expects \$date to be > startDate:.*$/,/DateVariable '([^']+)' expects \$date to be < endDate:.*$/,/NumberVariable '([^']+)' expects \$extractedValue to be >= .+$/,/NumberVariable '([^']+)' expects \$extractedValue to be <= .+$/];for(const e of o)if(r.match(e))return{valid:!0};return{valid:!1}}function On(r,o){if(r.status===Pn&&r.error){const e=r.error;if(En(e).valid)throw new Te(o,e,{cause:{name:String(r.status),message:e}})}}function Dn(r){pt(r)}function i(r,o){let e=!0,t=!1,s=Dn;typeof o=="function"?(t=!0,s=o):typeof o=="boolean"&&(e=o);try{r.success||(s(r),t&&pt(r));const n=r.data&&e;return{...r,parsedData:n?JSON.parse(r.data):r.data}}catch(n){throw console.error(n),n}}class Je{constructor(o){g(this,M);this.getAll=async()=>(await a(this,M)).getActions().then(t=>i(t)),this.getById=async e=>(await a(this,M)).getActionById(e).then(s=>i(s)),this.create=async()=>(await a(this,M)).createAction().then(t=>i(t)),this.duplicate=async e=>(await a(this,M)).duplicateAction(e).then(s=>i(s)),this.remove=async e=>(await a(this,M)).removeAction(e).then(s=>i(s)),this.update=async(e,t)=>(await a(this,M)).updateAction(e,JSON.stringify(t)).then(n=>i(n)),this.rename=async(e,t)=>this.update(e,{name:t}),this.updateScript=async(e,t)=>this.update(e,{script:t}),this.updateTriggers=async(e,t)=>this.update(e,{triggers:t}),this.move=async(e,t)=>(await a(this,M)).moveActions(e,t).then(n=>i(n)),this.setTypeError=async(e,t)=>this.update(e,{hasTypeError:t}),this.disable=async()=>(await a(this,M)).disableActions().then(t=>i(t)),this.enable=async()=>(await a(this,M)).enableActions().then(t=>i(t)),this.enableForComponents=async e=>(await a(this,M)).enableComponentActions(e).then(s=>i(s)),y(this,M,o)}}M=new WeakMap;class Ue{constructor(o){g(this,R);this.getAllOnSelectedLayout=async()=>(await a(this,R)).getAnimationsOnSelectedLayout().then(t=>i(t)),this.getByFrameId=async(e,t)=>(await a(this,R)).getAnimationByFrameId(e,t).then(n=>i(n)),this.getByLayoutId=async e=>(await a(this,R)).getAnimationsByLayoutId(e).then(s=>i(s)),this.setFrameAnimation=async e=>(await a(this,R)).setFrameAnimation(JSON.stringify(e)).then(s=>i({...s,data:JSON.stringify(e)})),this.play=async()=>(await a(this,R)).playAnimation().then(t=>i(t)),this.pause=async()=>(await a(this,R)).pauseAnimation().then(t=>i(t)),this.setScrubberPosition=async e=>(await a(this,R)).setScrubberPosition(e).then(s=>i(s)),this.setDuration=async e=>(await a(this,R)).setAnimationDuration(e).then(s=>i(s)),this.resetFrameAnimation=async e=>(await a(this,R)).resetFrameAnimation(e).then(s=>i(s)),this.reset=async()=>(await a(this,R)).resetAnimation().then(t=>i(t)),y(this,R,o)}}R=new WeakMap;var $=(r=>(r.code39="code39",r.code93="code93",r.code128="code128",r.dataMatrix="dataMatrix",r.ean13="ean13",r.ean8="ean8",r.qr="qr",r.upca="upca",r.upce="upce",r.gs1128="gs1128",r))($||{}),Pt=(r=>(r.low="low",r.medium="medium",r.quartile="quartile",r.high="high",r))(Pt||{}),wt=(r=>(r.utf8="utf8",r.iso8859_1="iso8859_1",r.code128a="code128a",r.code128b="code128b",r.code128c="code128c",r))(wt||{}),ke=(r=>(r.success="success",r.empty="empty",r.invalidLength="invalidLength",r.invalidCharacters="invalidCharacters",r.invalidChecksum="invalidChecksum",r.invalidUPCE="invalidUPCE",r.otherError="otherError",r))(ke||{}),Ge=(r=>(r.px="px",r.mm="mm",r.cm="cm",r.inch="inch",r.pt="pt",r))(Ge||{}),Y=(r=>(r.top="top",r.right="right",r.bottom="bottom",r.left="left",r))(Y||{}),_e=(r=>(r.top="top",r.child="child",r))(_e||{}),He=(r=>(r.print="print",r.digitalStatic="digitalStatic",r.digitalAnimated="digitalAnimated",r))(He||{}),xe=(r=>(r.locked="locked",r.range="range",r.none="none",r))(xe||{});class $e{constructor(o){g(this,z);this.setBarcodeProperties=async(e,t)=>(await a(this,z)).setBarcodeProperties(e,JSON.stringify(t)).then(n=>i(n)),this.setEnableBackground=async(e,t)=>{const s={enableBackground:t};return this.setBarcodeProperties(e,s)},this.setBackgroundColor=async(e,t)=>{const s={backgroundColor:t};return this.setBarcodeProperties(e,s)},this.setEnableBars=async(e,t)=>{const s={enableBars:t};return this.setBarcodeProperties(e,s)},this.setBarColor=async(e,t)=>{const s={barColor:t};return this.setBarcodeProperties(e,s)},this.setBarcodeSource=async(e,t)=>(await a(this,z)).setBarcodeSource(e,JSON.stringify(t)).then(n=>i(n)),this.removeBarcodeSource=async e=>(await a(this,z)).setBarcodeSource(e,null).then(s=>i(s)),this.setEnableText=async(e,t)=>{const s={enableText:t};return this.setBarcodeProperties(e,s)},this.setBarHeight=async(e,t)=>{const s={barHeight:t};return this.setBarcodeProperties(e,s)},this.setMagnification=async(e,t)=>{const s={magnification:t};return this.setBarcodeProperties(e,s)},this.setQuietZoneValue=async(e,t,s)=>{const n=s?{left:s===Y.left?t:void 0,top:s===Y.top?t:void 0,right:s===Y.right?t:void 0,bottom:s===Y.bottom?t:void 0}:{left:t,top:t,right:t,bottom:t};return(await a(this,z)).setBarcodeProperties(e,JSON.stringify({quietZone:n})).then(d=>i(d))},this.setAreQuietZoneValuesCombined=async(e,t)=>{const s={areQuietZoneValuesCombined:t};return(await a(this,z)).setBarcodeProperties(e,JSON.stringify({quietZone:s})).then(c=>i(c))},this.setErrorCorrectionLevel=async(e,t)=>(await a(this,z)).setBarcodeProperties(e,JSON.stringify({errorCorrectionLevel:t})).then(n=>i(n)),this.setCharacterSet=async(e,t)=>(await a(this,z)).setBarcodeProperties(e,JSON.stringify({characterSet:t})).then(n=>i(n)),this.setDrawLightMarginIndicator=async(e,t)=>{const s={drawStartStopChars:t};return this.setBarcodeProperties(e,s)},this.setDrawStartStopChars=async(e,t)=>{const s={drawStartStopChars:t};return this.setBarcodeProperties(e,s)},this.getBarcodeConfigationOptions=e=>{let t=!0,s=!0,n=!0,c,d,u=!1,w=!1,p=!1;switch(e){case $.qr:c=[wt.iso8859_1,wt.utf8],d=[Pt.low,Pt.medium,Pt.quartile,Pt.high];case $.dataMatrix:t=!1,s=!1,n=!1,u=!0;break;case $.ean13:t=!1,w=!0;break;case $.ean8:w=!0;case $.upca:case $.upce:t=!1;break;case $.code128:case $.gs1128:c=[wt.code128a,wt.code128b,wt.code128c];break;case $.code39:p=!0;break}return{allowEnableMagnification:n,allowBarHeight:s,allowQuietZone:!0,allowedCharacterSets:c,allowedErrorCorrectionLevels:d,allowToggleText:t,quietZoneAlwaysCombined:u,allowToggleLightMarginIndicator:w,allowToggleDrawStartAndEndChar:p}},y(this,z,o)}}z=new WeakMap;function Fn(r){const o=r.fontFamilies.length>0?String(r.fontFamilies[0].connectorId):"",e={id:r.id??"",name:r.name??"",dateCreated:"",lastModifiedDate:r.version??"",fonts:r.fontFamilies,colors:r.colors,characterStyles:r.characterStyles,paragraphStyles:r.paragraphStyles,media:r.media,themes:r.themes};return{id:r.id??"",name:r.name??"",fontConnectorId:o,brandKit:e}}function Ln(r){return{id:r.id??"",version:r.version??"",name:r.name??"",colors:r.colors,gradients:r.gradients,fonts:r.fontFamilies,characterStyles:r.characterStyles,paragraphStyles:r.paragraphStyles,media:r.media,themes:r.themes}}let Ke=(Lr=class{constructor(o,e){g(this,P);this.getId=async()=>(await a(this,P)).getBrandKitId().then(s=>i(s)),this.getVersion=async()=>(await a(this,P)).getBrandKitVersion().then(s=>i(s)),this.getName=async()=>(await a(this,P)).getBrandKitName().then(s=>i(s)),this.rename=async t=>(await a(this,P)).renameBrandKit(t).then(n=>i(n)),this.updateIdAndVersion=async(t,s)=>(await a(this,P)).updateBrandKitIdAndVersion(t,s).then(c=>i(c)),this.get=async()=>{const s=await(await a(this,P)).getBrandKit(),n=i(s),c=n.parsedData;if(c==null)throw new Error("Brand kit response has no data");return{...n,parsedData:Fn(c)}},this.getAllMedia=async()=>(await a(this,P)).getAllBrandKitMedia().then(s=>i(s)),this.addMedia=async(t,s,n)=>(await a(this,P)).addBrandKitMedia(t,s,n).then(d=>i(d)),this.updateMedia=async(t,s,n)=>(await a(this,P)).updateBrandKitMedia(t,s,n).then(d=>i(d)),this.renameMedia=async(t,s)=>(await a(this,P)).renameBrandKitMedia(t,s).then(c=>i(c)),this.removeMedia=async t=>(await a(this,P)).removeBrandKitMedia(t).then(n=>i(n)),this.remove=async()=>{const s=(await this.colorStyleController.getAll()).parsedData||[],c=(await this.gradientStyleController.getAll()).parsedData||[],u=(await this.paragraphStyleController.getAll()).parsedData||[],p=(await this.characterStyleController.getAll()).parsedData||[],b=(await this.fontController.getFontFamilies()).parsedData||[],N=(await this.getAllMedia()).parsedData||[];await this.undoManagerController.record("brandKit.remove",async D=>{for(const S of s)await D.colorStyle.remove(S.id);for(const S of c)await D.gradientStyle.remove(S.id);for(const S of u)await D.paragraphStyle.remove(S.id);for(const S of p)await D.characterStyle.remove(S.id);for(const S of b)await D.font.removeFontFamily(S.id);for(const S of N)await this.removeMedia(S.name)})},this.set=async t=>{const n=await(await a(this,P)).setBrandKit(JSON.stringify(t.brandKit)),c=i(n),d=c.parsedData;if(d==null)throw new Error("Brand kit set response has no data");return{...c,parsedData:Ln(d)}},this.isAutoSync=async()=>(await a(this,P)).isBrandKitAutoSync().then(s=>i(s)),this.enableAutoSync=async t=>(await a(this,P)).enableBrandKitAutoSync(t).then(n=>i(n)),y(this,P,o),this.colorStyleController=e.colorStyle,this.gradientStyleController=e.gradientStyle,this.fontController=e.font,this.mediaController=e.mediaConnector,this.paragraphStyleController=e.paragraphStyle,this.characterStyleController=e.characterStyle,this.undoManagerController=e.undoManager}},P=new WeakMap,Lr);class Ce{constructor(o){g(this,it);this.zoomToPage=async(e,t,s,n,c)=>(e!==void 0&&console.warn("id has no effect and will be deprecated in the future"),(await a(this,it)).zoomToPage(t,s,n,c).then(u=>i(u))),this.getZoomPercentage=async()=>(await a(this,it)).getZoomPercentage().then(t=>i(t)),this.setZoomPercentage=async e=>(await a(this,it)).setZoomPercentage(e).then(s=>i(s)),this.setViewMode=async e=>(await a(this,it)).setViewMode(e).then(s=>i(s)),y(this,it,o)}}it=new WeakMap;class ze{constructor(o){g(this,J);this.getAll=async()=>(await a(this,J)).getCharacterStyles().then(t=>i(t)),this.getById=async e=>(await a(this,J)).getCharacterStyleById(e).then(s=>i(s)),this.create=async()=>(await a(this,J)).createCharacterStyle().then(t=>i(t)),this.update=async(e,t)=>(await a(this,J)).updateCharacterStyle(e,JSON.stringify(t)).then(n=>i(n)),this.remove=async e=>(await a(this,J)).removeCharacterStyle(e).then(s=>i(s)),this.duplicate=async e=>(await a(this,J)).duplicateCharacterStyle(e).then(s=>i(s)),this.rename=async(e,t)=>(await a(this,J)).renameCharacterStyle(e,t).then(n=>i(n)),this.move=async(e,t)=>(await a(this,J)).moveCharacterStyles(e,t).then(n=>i(n)),y(this,J,o)}}J=new WeakMap;class je{constructor(o){g(this,ot);this.copyFrames=async e=>{const s=await(await a(this,ot)).copyFrames(e);return s.data&&await navigator.clipboard.writeText(s.data),i(s)},this.cutFrames=async e=>{const s=await(await a(this,ot)).cutFrames(e);return s.data&&await navigator.clipboard.writeText(s.data),i(s)},this.pasteFrames=async()=>{const e=await a(this,ot),t=await navigator.clipboard.readText(),s=await e.pasteFrames(t);return i(s)},this.getContentType=async()=>{const e=await a(this,ot),t=await navigator.clipboard.readText(),s=await e.getClipboardContentType(t);return i(s)},y(this,ot,o)}}ot=new WeakMap;class We{constructor(o){g(this,Wt);this.convertToRgb=async e=>(await a(this,Wt)).colorToRgb(JSON.stringify(e)).then(s=>i(s)),y(this,Wt,o)}}Wt=new WeakMap;var oe=(r=>(r.rgb="rgb",r.hex="hex",r.cmyk="cmyk",r.gray="gray",r.hsl="hsl",r.spot="spot",r.spotCMYK="spotCMYK",r.spotRGB="spotRGB",r.spotHEX="spotHEX",r))(oe||{}),qe=(r=>(r.local="local",r.brandKit="brandKit",r.stylekit="brandKit",r))(qe||{});class Ye{constructor(o){g(this,U);this.getAll=async()=>(await a(this,U)).getColors().then(t=>i(t)),this.getById=async e=>(await a(this,U)).getColorById(e).then(s=>i(s)),this.create=async()=>(await a(this,U)).createColor().then(t=>i(t)),this.duplicate=async e=>(await a(this,U)).duplicateColor(e).then(s=>i(s)),this.move=async(e,t)=>(await a(this,U)).moveColors(e,t).then(n=>i(n)),this.rename=async(e,t)=>(await a(this,U)).renameColor(e,t).then(n=>i(n)),this.update=async(e,t)=>{const s=await a(this,U),n=t;return n.type===oe.spot&&(n.type=oe.spotCMYK),s.updateColor(e,JSON.stringify(n)).then(c=>i(c))},this.remove=async e=>(await a(this,U)).removeColor(e).then(s=>i(s)),y(this,U,o)}}U=new WeakMap;var Et=(r=>(r[r.file=0]="file",r[r.collection=1]="collection",r))(Et||{}),ce=(r=>(r.LowResolutionWeb="lowresWeb",r.HighResolutionWeb="highresWeb",r))(ce||{}),Ot=(r=>(r.file="file",r.collection="collection",r))(Ot||{}),Ze=(r=>(r.media="media",r.fonts="fonts",r.data="data",r.components="components",r))(Ze||{}),Qe=(r=>(r.name="name",r.path="relativePath",r.id="id",r))(Qe||{}),Xe=(r=>(r.ascending="asc",r.descending="desc",r))(Xe||{}),ts=(r=>(r.text="text",r.boolean="boolean",r))(ts||{}),es=(r=>(r.query="query",r.upload="upload",r))(es||{}),Dt=(r=>(r.url="url",r.grafx="grafx",r.local="local",r))(Dt||{});class Nn{constructor(o,e,t,s="engineToConnector"){this.direction="engineToConnector",this.name=o,this.direction=s,e==="var"?this.value=`${e}.${t}`:this.value=t}}var ss=(r=>(r.variable="var",r.value="value",r))(ss||{}),rs=(r=>(r.engineToConnector="engineToConnector",r.connectorToEngine="connectorToEngine",r))(rs||{}),he=(r=>(r.loading="loading",r.loaded="loaded",r.running="running",r.ready="ready",r.error="error",r))(he||{}),ns=(r=>(r.stateChanged="stateChanged",r.authChanged="authChanged",r.reloadRequired="reloadRequired",r.unloaded="unloaded",r))(ns||{});const Mn={url:"grafx-media.json",source:"local"};class Rn{constructor(o,e){this.type="grafxToken",this.token=o,this.headers=e}}class Vn{constructor(o){this.type="refreshed",this.headers=o}}var as=(r=>(r.grafxToken="grafxToken",r.refreshed="refreshed",r))(as||{}),is=(r=>(r.grafxToken="grafxToken",r.any="any",r))(is||{}),me=(r=>(r.minDimension="minDimension",r))(me||{});class os extends Error{constructor(o,e){super(o),this.type=e}}var cs=(r=>(r.StaticKey="staticKey",r.OAuth2ClientCredentials="oAuth2ClientCredentials",r.OAuth2AuthorizationCode="oAuth2AuthorizationCode",r.OAuth2ResourceOwnerPassword="oAuth2ResourceOwnerPassword",r.OAuth2JwtBearer="oAuth2JwtBearer",r.None="none",r))(cs||{});class de{constructor(){this.makeConnectorSourceForwardsCompatible=o=>{if(o.source!=Dt.grafx||this.isSourceMigrated(o))return o;let e=o.url;for(;e.endsWith("/");)e=e.substring(0,e.length-1);const t=e.split("/");return{id:t[t.length-1],source:Dt.grafx}},this.makeMultipleConnectorsBackwardsCompatible=(o,e)=>o.map(t=>this.makeSingleConnectorBackwardsCompatible(t,e)),this.makeSingleConnectorBackwardsCompatible=(o,e)=>o.source.source!=Dt.grafx?o:{id:o.id,name:o.name,iconUrl:o.iconUrl,source:this.makeConnectorSourceBackwardsCompatible(o.source,e)},this.makeConnectorSourceBackwardsCompatible=(o,e)=>{let t=e;for(;t!=null&&t.endsWith("/");)t=t.substring(0,t.length-1);return{url:`${t}/connectors/${o.id}`,source:Dt.grafx}},this.isSourceMigrated=o=>"id"in o}}let hs=(Nr=class{constructor(o,e){g(this,B);g(this,Lt);g(this,Ct);this.getById=async t=>(await a(this,B)).getConnectorById(t).then(n=>i(n)).then(n=>{const c={...n,parsedData:null};return n.parsedData&&(c.parsedData=a(this,Ct).makeSingleConnectorBackwardsCompatible(n.parsedData,a(this,Lt).get(q.GraFxStudioEnvironmentApiUrl))),c}),this.getAllByType=async t=>(await a(this,B)).getConnectors(t).then(n=>i(n)).then(n=>{const c={...n,parsedData:null};return n.parsedData&&(c.parsedData=a(this,Ct).makeMultipleConnectorsBackwardsCompatible(n.parsedData,a(this,Lt).get(q.GraFxStudioEnvironmentApiUrl))),c}),this.register=async t=>{const s=await a(this,B),n=a(this,Ct).makeConnectorSourceForwardsCompatible(t);return s.registerConnector(JSON.stringify(n)).then(c=>i(c))},this.unregister=async t=>(await a(this,B)).unregisterConnector(t).then(n=>i(n)),this.configure=async(t,s)=>{const n=await a(this,B);return await this.waitToBeReady(t),await s(new Bn(t,n)),n.updateConnectorConfiguration(t).then(c=>i(c))},this.getState=async t=>(await a(this,B)).getConnectorState(t).then(n=>i(n)),this.getOptions=async t=>(await a(this,B)).getConnectorOptions(t).then(n=>i(n)),this.waitToBeReady=async(t,s=2e3)=>{let n=Math.max(s,500);n=Math.min(n,5e3);const c=100;let d=0;try{for(;d*c<n;){const u=await this.getState(t);if(u.success&&u.parsedData&&(u.parsedData.type===he.running||u.parsedData.type===he.ready))return i({data:null,success:!0,error:void 0,status:0,parsedData:void 0},!1);await new Promise(w=>setTimeout(w,c)),d++}}catch(u){return i({data:null,success:!1,error:`Error while getting connector state ${u}`,status:5e4,parsedData:void 0},!1)}return i({data:null,success:!1,error:"Timed out waiting for connector",status:5e4,parsedData:void 0},!1)},this.updateMappings=async(t,s)=>await this.configure(t,async n=>{const{parsedData:c}=await this.getMappings(t),d=(c==null?void 0:c.filter(p=>!s.some(v=>v.name===p.name&&v.direction===p.direction)))??[],u=s.filter(p=>p.name!==""&&p.value!==""),w=[...d,...u];await n.setMappings(w)}),this.applyMappings=async(t,s)=>await this.configure(t,async n=>{const c=s.filter(d=>d.name!==""&&d.value!=="");await n.setMappings(c)}),this.setHttpHeaders=async(t,s)=>(await a(this,B)).remoteConnectorAuthenticationSetHttpHeaders(t,JSON.stringify(s)).then(c=>i(c)),y(this,B,o),y(this,Lt,e),y(this,Ct,new de)}async getMappings(o,e){return(await a(this,B)).getConnectorMappings(o).then(s=>i(s)).then(s=>{var n;return e?{...s,parsedData:(n=s.parsedData)==null?void 0:n.filter(c=>c.direction===e)}:s})}},B=new WeakMap,Lt=new WeakMap,Ct=new WeakMap,Nr);class Bn{constructor(o,e){g(this,mt);g(this,ft);this.setOptions=async t=>a(this,ft).setConnectorOptions(a(this,mt),JSON.stringify(t)).then(s=>i(s)),this.setMappings=async t=>{const s=await a(this,ft).setConnectorMappings(a(this,mt),t.map(function(n){return JSON.stringify(n)}));return i(s)},this.setHttpHeader=async(t,s)=>a(this,ft).connectorAuthenticationSetHttpHeader(a(this,mt),t,s).then(n=>i(n)),y(this,mt,o),y(this,ft,e)}}mt=new WeakMap,ft=new WeakMap;class ds{constructor(o,e){g(this,X);g(this,Nt);this.getPageItemById=async(t,s,n,c={})=>{const u=await(await a(this,X)).dataConnectorGetPageItemById(t,s,JSON.stringify(n),JSON.stringify(c)),w=i(u),p={...w,parsedData:null};return w.parsedData&&(p.parsedData={...w.parsedData,data:a(this,Nt).mapEngineToDataItem(w.parsedData.data)}),p},this.getConfigurationOptions=async t=>(await a(this,X)).dataConnectorGetConfigurationOptions(t).then(n=>i(n)),this.getCapabilities=async t=>(await a(this,X)).dataConnectorGetCapabilities(t).then(n=>i(n)),y(this,X,o),y(this,Nt,e)}async getPage(o,e,t={}){const{previousPageToken:s,continuationToken:n}=e;if(s!=null&&n!=null)throw new Error('Invalid page config: "previousPageToken" and "continuationToken" are mutually exclusive. Provide only one to indicate navigation direction.');const d=await(await a(this,X)).dataConnectorGetPage(o,JSON.stringify(e),JSON.stringify(t)),u=i(d),w={...u,parsedData:null};return u.parsedData&&(w.parsedData={...u.parsedData,data:u.parsedData.data.map(p=>a(this,Nt).mapEngineToDataItem(p))}),w}async getModel(o,e={}){return(await a(this,X)).dataConnectorGetModel(o,JSON.stringify(e)).then(s=>i(s))}}X=new WeakMap,Nt=new WeakMap;class ls{constructor(o,e){g(this,ct);g(this,qt);this.setDataSource=async t=>(await a(this,ct)).setDataSource(t).then(n=>i(n)),this.getDataSource=async()=>(await a(this,ct)).getDataSource().then(s=>i(s)),this.removeDataSource=async()=>(await a(this,ct)).removeDataSource().then(s=>i(s)),this.setDataRow=async t=>{const s=await a(this,ct),n=a(this,qt).mapDataItemToEngine(t);return s.setDataRow(JSON.stringify(n)).then(c=>i(c))},y(this,ct,o),y(this,qt,e)}}ct=new WeakMap,qt=new WeakMap;class us{constructor(o){g(this,ht);this.getAllLogs=async()=>(await a(this,ht)).getLogs().then(t=>i(t)),this.toggleDebugPanel=async()=>(await a(this,ht)).toggleDebugPanel().then(t=>i(t)),this.enableDebug=async()=>(await a(this,ht)).enableDebug().then(t=>i(t)),this.disableDebug=async()=>(await a(this,ht)).disableDebug().then(t=>i(t)),y(this,ht,o)}}ht=new WeakMap;class gs{constructor(o){g(this,St);this.getCurrentState=async()=>(await a(this,St)).getCurrentDocumentState().then(t=>i(t)),this.load=async(e,t={keepConnectors:!1})=>{const s=await a(this,St),n=typeof e!="string"?JSON.stringify(e):e;return s.loadDocument(n,JSON.stringify(t)).then(c=>i(c))},this.createAndLoad=async e=>{const t=await a(this,St),s=JSON.stringify(e);return t.createAndLoadDocument(s).then(n=>i(n))},y(this,St,o)}}St=new WeakMap;var ys=(r=>(r.resize="resize",r.scale="scale",r.scaleAndResize="scaleAndResize",r))(ys||{}),ps=(r=>(r.top="top",r.bottom="bottom",r.left="left",r.right="right",r))(ps||{}),Kt=(r=>(r.url="url",r.variable="variable",r.connector="connector",r.brandKitMedia="brandKitMedia",r))(Kt||{}),ws=(r=>(r.connector="connector",r))(ws||{}),Cs=(r=>(r.text="text",r.image="image",r.shape="shape",r.barcode="barcode",r.component="component",r))(Cs||{}),ms=(r=>(r.variable="variable",r.text="text",r))(ms||{}),fs=(r=>(r.leftToRight="leftToRight",r.rightToLeft="rightToLeft",r.weak="weak",r))(fs||{}),Ss=(r=>(r.horizontal="horizontal",r.vertical="vertical",r.onPath="onPath",r))(Ss||{}),bs=(r=>(r.top="top",r.bottom="bottom",r.middle="middle",r.justify="justify",r))(bs||{}),vs=(r=>(r.normal="normal",r.screen="screen",r.overlay="overlay",r.darken="darken",r.lighten="lighten",r.colorDodge="colorDodge",r.colorBurn="colorBurn",r.hardLight="hardLight",r.softLight="softLight",r.difference="difference",r.exclusion="exclusion",r.multiply="multiply",r.hue="hue",r.saturation="saturation",r.color="color",r.luminosity="luminosity",r))(vs||{}),As=(r=>(r.fill="fill",r.fit="fit",r.smartCrop="smartCrop",r.manualCrop="manualCrop",r))(As||{}),Is=(r=>(r.topLeft="topLeft",r.topCenter="topCenter",r.topRight="topRight",r.centerLeft="centerLeft",r.center="center",r.centerRight="centerRight",r.bottomLeft="bottomLeft",r.bottomCenter="bottomCenter",r.bottomRight="bottomRight",r))(Is||{}),Ps=(r=>(r.bringToFront="bringToFront",r.sendToBack="sendToBack",r.bringForward="bringForward",r.sendBackward="sendBackward",r))(Ps||{}),Es=(r=>(r.relative="relative",r.start="start",r.end="end",r.startAndEnd="startAndEnd",r.center="center",r))(Es||{}),Os=(r=>(r.page="page",r.frame="frame",r))(Os||{}),Ds=(r=>(r.start="start",r.end="end",r.center="center",r))(Ds||{});class Tn{constructor(){this.type="page"}}class Jn{constructor(o,e){this.type="frame",this.frameId=o,this.edge=e}}var fe=(r=>(r.frameCrop="frameCrop",r.assetCrop="assetCrop",r))(fe||{});class Fs{constructor(o){g(this,k);this.insertImageVariableToFrame=async(e,t)=>{const s=await a(this,k),n={id:t,type:Kt.variable};return s.setImageSource(e,JSON.stringify(n)).then(c=>i(c))},this.insertTextVariable=async e=>(await a(this,k)).insertTextVariable(e).then(s=>i(s)),this.enterTextEditMode=async e=>(await a(this,k)).enterTextEditMode(e).then(s=>i(s)),this.exitTextEditMode=async()=>(await a(this,k)).exitTextEditMode().then(t=>i(t)),this.getText=async(e,t)=>(await a(this,k)).getTextByFrameId(e,t).then(n=>i(n)),this.setText=async(e,t)=>(await a(this,k)).setTextByFrameId(e,t).then(n=>i(n)),this.selectText=async(e,t,s)=>(await a(this,k)).selectTextById(e,t,s).then(c=>i(c)),this.addCustomUndoData=async(e,t,s)=>(await a(this,k)).setCustomUndoData(e,t,s??!1).then(c=>i(c)),y(this,k,o)}}k=new WeakMap;class Ls{constructor(o){g(this,dt);g(this,Mt);this.query=async(e,t,s={})=>(await a(this,dt)).fontConnectorQuery(e,JSON.stringify(t),JSON.stringify(s)).then(c=>i(c)),this.detail=async(e,t,s={})=>(await a(this,dt)).fontConnectorDetail(e,t,JSON.stringify(s)).then(c=>i(c)),this.download=async(e,t,s={})=>(await a(this,Mt)).fontConnectorDownload(e,t,JSON.stringify(s)).then(c=>c??c),this.preview=async(e,t,s,n={})=>(await a(this,Mt)).fontConnectorPreview(e,t,s,JSON.stringify(n)).then(d=>d??d),this.getConfigurationOptions=async e=>(await a(this,dt)).fontConnectorGetConfigurationOptions(e).then(s=>i(s)),this.getCapabilities=async e=>(await a(this,dt)).fontConnectorGetCapabilities(e).then(s=>i(s)),this.parseDeprecatedFontType=e=>{if(e===Et.file)return Ot.file;if(e===Et.collection)return Ot.collection},y(this,dt,o),y(this,Mt,o)}}dt=new WeakMap,Mt=new WeakMap;class Ns{constructor(o){g(this,E);this.addFontFamily=async(e,t)=>(await a(this,E)).addFontFamily(e,JSON.stringify(t)).then(n=>i(n)),this.removeFontFamily=async e=>(await a(this,E)).removeFontFamily(e).then(s=>i(s)),this.addFontStyle=async(e,t)=>(await a(this,E)).addFontStyle(e,JSON.stringify(t)).then(n=>i(n)),this.removeFontStyle=async e=>(await a(this,E)).removeFontStyle(e).then(s=>i(s)),this.getFontFamilies=async()=>(await a(this,E)).getFontFamilies().then(t=>i(t)),this.getFontStyles=async e=>(await a(this,E)).getFontStyles(e).then(s=>i(s)),this.getFontFamilyById=async e=>(await a(this,E)).getFontFamilyById(e).then(s=>i(s)),this.getFontStyleById=async e=>(await a(this,E)).getFontStyleById(e).then(s=>i(s)),this.getDefaultFontStyle=async()=>(await a(this,E)).getDefaultFontStyle().then(t=>i(t)),this.getDefaultFontFamily=async()=>(await a(this,E)).getDefaultFontFamily().then(t=>i(t)),this.isFontFamilyUsed=async e=>(await a(this,E)).isFontFamilyUsed(e).then(s=>i(s)),this.isFontStyleUsed=async e=>(await a(this,E)).isFontStyleUsed(e).then(s=>i(s)),this.moveFontFamilies=async(e,t)=>(await a(this,E)).moveFontFamilies(e,t).then(n=>i(n)),this.getPreviewsOfCharacterStrings=async(e,t)=>(await a(this,E)).getPreviewsOfCharacterStrings(e,JSON.stringify(t)).then(n=>i(n)),y(this,E,o)}}E=new WeakMap;class Se{constructor(o){g(this,Rt);this.setShapeProperties=async(e,t)=>(await a(this,Rt)).setShapeProperties(e,JSON.stringify(t)).then(n=>i(n)),this.setEnableFill=async(e,t)=>{const s={enableFill:t};return this.setShapeProperties(e,s)},this.setFillColor=async(e,t)=>{const s={fillColor:t};return this.setShapeProperties(e,s)},this.setEnableStroke=async(e,t)=>{const s={enableStroke:t};return this.setShapeProperties(e,s)},this.setStrokeColor=async(e,t)=>{const s={strokeColor:t};return this.setShapeProperties(e,s)},this.setStrokeWeight=async(e,t)=>{const s={strokeWeight:t};return this.setShapeProperties(e,s)},this.setFlagAllCornersSame=async(e,t)=>{const s={allCornersSame:t};return this.setShapeProperties(e,s)},this.setShapeCorners=async(e,t)=>(await a(this,Rt)).setShapeCorners(e,JSON.stringify(t)).then(n=>i(n)),this.setRadiusAll=async(e,t)=>{const s={radiusAll:t};return this.setShapeCorners(e,s)},this.setRadiusTopLeft=async(e,t)=>{const s={topLeft:t};return this.setShapeCorners(e,s)},this.setRadiusBottomLeft=async(e,t)=>{const s={bottomLeft:t};return this.setShapeCorners(e,s)},this.setRadiusTopRight=async(e,t)=>{const s={topRight:t};return this.setShapeCorners(e,s)},this.setRadiusBottomRight=async(e,t)=>{const s={bottomRight:t};return this.setShapeCorners(e,s)},y(this,Rt,o)}}Rt=new WeakMap;class Ms{constructor(o){g(this,l);this.getAll=async()=>(await a(this,l)).getFrames().then(t=>i(t)),this.getSelected=async()=>(await a(this,l)).getSelectedFrames().then(t=>i(t)),this.getAllByPageId=async e=>(await a(this,l)).getFramesByPageId(e).then(s=>i(s)),this.getByName=async e=>(await a(this,l)).getFrameByName(e).then(s=>i(s)),this.getById=async e=>(await a(this,l)).getFrameById(e).then(s=>i(s)),this.getPropertiesOnSelectedLayout=async()=>(await a(this,l)).getFramePropertiesOnSelectedLayout().then(t=>i(t)),this.getLayoutProperties=async(e,t)=>(await a(this,l)).getFramePropertiesByFrameId(e,t).then(n=>i(n)),this.getAllLayoutProperties=async e=>(await a(this,l)).getFramesProperties(e).then(s=>i(s)),this.resetTransformation=async e=>(await a(this,l)).resetFrameTransformation(e).then(s=>i(s)),this.resetSize=async e=>(await a(this,l)).resetFrameTransformation(e).then(s=>i(s)),this.select=async e=>(await a(this,l)).selectFrames([e]).then(s=>i(s)),this.selectMultiple=async e=>(await a(this,l)).selectFrames(e).then(s=>i(s)),this.deselectAll=async()=>(await a(this,l)).deselectFrames().then(t=>i(t)),this.reorderFrames=async(e,t)=>(await a(this,l)).reorderFrames(e,t).then(n=>i(n)),this.setZIndex=async(e,t)=>(await a(this,l)).setFrameZIndex(e,t).then(n=>i(n)),this.setHeight=async(e,t)=>(await a(this,l)).setFrameHeight(e,t).then(n=>i(n)),this.setRotation=async(e,t)=>(await a(this,l)).setFrameRotation(e,t).then(n=>i(n)),this.setWidth=async(e,t)=>(await a(this,l)).setFrameWidth(e,t).then(n=>i(n)),this.setX=async(e,t)=>(await a(this,l)).setFrameX(e,t).then(n=>i(n)),this.setY=async(e,t)=>(await a(this,l)).setFrameY(e,t).then(n=>i(n)),this.setOpacity=async(e,t)=>(await a(this,l)).setFrameOpacity(e,t).then(n=>i(n)),this.rename=async(e,t)=>(await a(this,l)).renameFrame(e,t).then(n=>i(n)),this.reset=async e=>(await a(this,l)).resetFrame(e).then(s=>i(s)),this.resetX=async e=>(await a(this,l)).resetFrameTransformation(e).then(s=>i(s)),this.resetY=async e=>(await a(this,l)).resetFrameTransformation(e).then(s=>i(s)),this.resetRotation=async e=>(await a(this,l)).resetFrameTransformation(e).then(s=>i(s)),this.resetWidth=async e=>(await a(this,l)).resetFrameTransformation(e).then(s=>i(s)),this.resetHeight=async e=>(await a(this,l)).resetFrameTransformation(e).then(s=>i(s)),this.resetImageFrameFitMode=async e=>(await a(this,l)).resetImageFrameFitMode(e).then(s=>i(s)),this.setVisibility=async(e,t)=>(await a(this,l)).setFrameIsVisible(e,t).then(n=>i(n)),this.setIsVisible=async(e,t)=>(await a(this,l)).setFrameIsVisible(e,t).then(n=>i(n)),this.remove=async e=>(await a(this,l)).removeFrames([e]).then(s=>i(s)),this.removeFrames=async e=>(await a(this,l)).removeFrames(e).then(s=>i(s)),this.create=async(e,t,s,n,c)=>(await a(this,l)).addFrame(e,t,s,n,c).then(u=>i(u)),this.createShapeFrame=async(e,t,s,n,c)=>(await a(this,l)).addFrame(e,t,s,n,c).then(u=>i(u)),this.createBarcodeFrame=async(e,t)=>(await a(this,l)).addBarcodeFrame(e,t==null?void 0:t.x,t==null?void 0:t.y).then(n=>i(n)),this.createComponentFrame=async(e,t,s,n,c)=>(await a(this,l)).addComponentFrame(t,s,n,c,JSON.stringify(e)).then(u=>i(u)),this.duplicateFrames=async e=>(await a(this,l)).duplicateFrames(e).then(s=>i(s)),this.updateImageSource=async(e,t)=>{const s=await a(this,l),n=t!==null?JSON.stringify(t):null;return s.setImageSource(e,n).then(c=>i(c))},this.removeImageSource=async e=>this.updateImageSource(e,null),this.setImageFromConnector=async(e,t,s)=>{const n={id:t,assetId:s,type:Kt.connector};return this.updateImageSource(e,n)},this.setImageFromUrl=async(e,t)=>{const s={url:t,type:Kt.url};return this.updateImageSource(e,s)},this.setImageFrameFitMode=async(e,t)=>(await a(this,l)).setImageFrameFitMode(e,t).then(n=>i(n)),this.setImageFrameFitModePosition=async(e,t)=>(await a(this,l)).setImageFrameFitModePosition(e,t).then(n=>i(n)),this.setFrameConstrainProportions=async(e,t)=>(console.error("setFrameConstrainProportions is not supported anymore"),i({success:!1,status:0,error:"setFrameConstrainProportions is not supported anymore",parsedData:null})),this.setVerticalAlign=async(e,t)=>(await a(this,l)).setVerticalAlignment(e,t).then(n=>i(n)),this.setNumberOfColumns=async(e,t)=>(await a(this,l)).setNumberOfColumns(e,t).then(n=>i(n)),this.setColumnGap=async(e,t)=>(await a(this,l)).setColumnGap(e,t).then(n=>i(n)),this.setMinCopyfitting=async(e,t)=>(await a(this,l)).setMinCopyfitting(e,t).then(n=>i(n)),this.setMaxCopyfitting=async(e,t)=>(await a(this,l)).setMaxCopyfitting(e,t).then(n=>i(n)),this.setEnableCopyfitting=async(e,t)=>(await a(this,l)).setEnableCopyfitting(e,t).then(n=>i(n)),this.resetMinCopyfitting=async e=>(await a(this,l)).resetMinCopyfitting(e).then(s=>i(s)),this.resetMaxCopyfitting=async e=>(await a(this,l)).resetMaxCopyfitting(e).then(s=>i(s)),this.resetEnableCopyfitting=async e=>(await a(this,l)).resetEnableCopyfitting(e).then(s=>i(s)),this.setShapeFrameEnableFill=async(e,t)=>this.shapeController.setEnableFill(e,t),this.setShapeFrameFillColor=async(e,t)=>this.shapeController.setFillColor(e,t),this.setShapeFrameEnableStroke=async(e,t)=>this.shapeController.setEnableStroke(e,t),this.setShapeFrameStrokeColor=async(e,t)=>this.shapeController.setStrokeColor(e,t),this.setShapeFrameStrokeWeight=async(e,t)=>this.shapeController.setStrokeWeight(e,t),this.setBlendMode=async(e,t)=>(await a(this,l)).setFrameBlendMode(e,t).then(n=>i(n)),this.setFrameContainerShape=async(e,t)=>(await a(this,l)).setFrameContainerShape(e,JSON.stringify(t)).then(n=>i(n)),this.enterCropMode=async(e,t=fe.frameCrop)=>(await a(this,l)).enterCropMode(e,t).then(n=>i(n)),this.applyCropMode=async()=>(await a(this,l)).applyCropMode().then(t=>i(t)),this.exitCropMode=async()=>(await a(this,l)).cancelCropMode().then(t=>i(t)),this.enterSubjectMode=async e=>(await a(this,l)).enterSubjectMode(e).then(s=>i(s)),this.applySubjectMode=async()=>(await a(this,l)).applySubjectMode().then(t=>i(t)),this.exitSubjectMode=async()=>(await a(this,l)).cancelSubjectMode().then(t=>i(t)),this.enterGradientMode=async e=>(await a(this,l)).enterGradientMode(e).then(s=>i(s)),this.applyGradientMode=async()=>(await a(this,l)).applyGradientMode().then(t=>i(t)),this.cancelGradientMode=async()=>(await a(this,l)).cancelGradientMode().then(t=>i(t)),this.resetCropMode=async e=>(console.error("resetCropMode is not supported anymore"),i({success:!1,status:0,error:"resetCropMode is not supported anymore",parsedData:null})),this.setEnableAutoGrow=async(e,t)=>{const s={enabled:{value:t}};return(await a(this,l)).updateAutoGrowSettings(e,JSON.stringify(s)).then(c=>i(c))},this.setAutoGrowMinWidth=async(e,t)=>{const s={minWidth:{value:t}};return(await a(this,l)).updateAutoGrowSettings(e,JSON.stringify(s)).then(c=>i(c))},this.setAutoGrowMaxWidth=async(e,t)=>{const s={maxWidth:{value:t}};return(await a(this,l)).updateAutoGrowSettings(e,JSON.stringify(s)).then(c=>i(c))},this.setAutoGrowMinHeight=async(e,t)=>{const s={minHeight:{value:t}};return(await a(this,l)).updateAutoGrowSettings(e,JSON.stringify(s)).then(c=>i(c))},this.setAutoGrowMaxHeight=async(e,t)=>{const s={maxHeight:{value:t}};return(await a(this,l)).updateAutoGrowSettings(e,JSON.stringify(s)).then(c=>i(c))},this.setAutoGrowDirections=async(e,t)=>{const s={directions:{value:t}};return(await a(this,l)).updateAutoGrowSettings(e,JSON.stringify(s)).then(c=>i(c))},this.resetAutoGrowSettingsEnabled=async e=>(console.error("resetAutoGrowSettingsEnabled is not supported anymore"),i({success:!1,status:0,error:"resetAutoGrowSettingsEnabled is not supported anymore",parsedData:null})),this.resetAutoGrowMinWidth=async e=>(console.error("resetAutoGrowMinWidth is not supported anymore"),i({success:!1,status:0,error:"resetAutoGrowMinWidth is not supported anymore",parsedData:null})),this.resetAutoGrowMaxWidth=async e=>(console.error("resetAutoGrowMaxWidth is not supported anymore"),i({success:!1,status:0,error:"resetAutoGrowMaxWidth is not supported anymore",parsedData:null})),this.resetAutoGrowMinHeight=async e=>(console.error("resetAutoGrowMinHeight is not supported anymore"),i({success:!1,status:0,error:"resetAutoGrowMinHeight is not supported anymore",parsedData:null})),this.resetAutoGrowMaxHeight=async e=>(console.error("resetAutoGrowMaxHeight is not supported anymore"),i({success:!1,status:0,error:"resetAutoGrowMaxHeight is not supported anymore",parsedData:null})),this.resetAutoGrowDirections=async e=>(console.error("resetAutoGrowDirections is not supported anymore"),i({success:!1,status:0,error:"resetAutoGrowDirections is not supported anymore",parsedData:null})),this.resetAutoGrow=async e=>(console.error("resetAutoGrow is not supported anymore"),i({success:!1,status:0,error:"resetAutoGrow is not supported anymore",parsedData:null})),this.setShadowEnabled=async(e,t)=>{const s={enabled:{value:t}};return(await a(this,l)).updateFrameShadowSettings(e,JSON.stringify(s)).then(c=>i(c))},this.setShadowDistance=async(e,t)=>{const s={distance:{value:t}};return(await a(this,l)).updateFrameShadowSettings(e,JSON.stringify(s)).then(c=>i(c))},this.setShadowAngleDegrees=async(e,t)=>{const s={angleDegrees:{value:t}};return(await a(this,l)).updateFrameShadowSettings(e,JSON.stringify(s)).then(c=>i(c))},this.setShadowBlurRadius=async(e,t)=>{const s={blurRadius:{value:t}};return(await a(this,l)).updateFrameShadowSettings(e,JSON.stringify(s)).then(c=>i(c))},this.setShadowColor=async(e,t)=>{const s={color:{value:t}};return(await a(this,l)).updateFrameShadowSettings(e,JSON.stringify(s)).then(c=>i(c))},this.setAnchor=async(e,t,s,n,c)=>{const d={horizontal:t,type:s,target:n,endTarget:c};return(await a(this,l)).setAnchorProperties(e,JSON.stringify(d)).then(w=>i(w))},this.setVerticalAnchor=async(e,t,s,n)=>this.setAnchor(e,!1,t,s,n),this.setHorizontalAnchor=async(e,t,s,n)=>this.setAnchor(e,!0,t,s,n),this.resetAnchoring=async e=>(await a(this,l)).resetFrameTransformation(e).then(s=>i(s)),this.resetVisibility=async e=>(await a(this,l)).setFrameIsVisible(e,null).then(s=>i(s)),this.getConfiguration=async e=>(await a(this,l)).getFrameConfiguration(e).then(s=>i(s)),this.resetAssetCropOverride=async e=>(await a(this,l)).resetAssetCropOverride(e).then(s=>i(s)),this.resetAllAssetCropOverrides=async e=>(await a(this,l)).resetAllAssetCropOverrides(e).then(s=>i(s)),this.setGradientApplied=async(e,t)=>{const s={isApplied:t};return(await a(this,l)).updateFrameGradientSettings(e,JSON.stringify(s)).then(c=>i(c))},this.setLocalGradient=async(e,t)=>{const s={gradient:t};return(await a(this,l)).updateFrameGradientSettings(e,JSON.stringify(s)).then(c=>i(c))},this.setBrandKitGradient=async(e,t)=>{const s={id:t};return(await a(this,l)).updateFrameGradientSettings(e,JSON.stringify(s)).then(c=>i(c))},this.setSmartCropSubjectId=async(e,t)=>(await a(this,l)).setSmartCropSubjectId(e,t).then(n=>i(n)),y(this,l,o),this.shapeController=new Se(a(this,l)),this.constraints=new Un(a(this,l))}}l=new WeakMap;class Un{constructor(o){g(this,F);this.get=async e=>(await a(this,F)).getFrameConstraints(e).then(s=>i(s)),this.setSelectable=async(e,t)=>{const s={selectionAllowed:{value:t}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(s)).then(c=>i(c))},this.setHorizontalMovement=async(e,t)=>{const s={horizontalMovementAllowed:{value:t}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(s)).then(c=>i(c))},this.setVerticalMovement=async(e,t)=>{const s={verticalMovementAllowed:{value:t}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(s)).then(c=>i(c))},this.setRotation=async(e,t)=>{const s={rotationAllowed:{value:t}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(s)).then(c=>i(c))},this.setResize=async(e,t,s)=>{const n={resizeAllowed:{value:t},...s!==void 0&&{proportionLocked:{value:s}}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(n)).then(d=>i(d))},this.setCrop=async(e,t)=>{const s={image:{cropAllowed:{value:t}}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(s)).then(c=>i(c))},this.setTextEditingAllowed=async(e,t)=>{const s={text:{editingAllowed:{value:t}}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(s)).then(c=>i(c))},this.setAllowedParagraphStyles=async(e,t)=>{const s={text:{paragraphStyles:{value:t}}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(s)).then(c=>i(c))},this.setAllowedCharacterStyles=async(e,t)=>{const s={text:{characterStyles:{value:t}}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(s)).then(c=>i(c))},this.setAllowedColors=async(e,t)=>{const s={text:{colors:{value:t}}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(s)).then(c=>i(c))},this.setAllowedFontSizes=async(e,t)=>{const s={text:{fontSizes:{value:t}}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(s)).then(c=>i(c))},y(this,F,o)}}F=new WeakMap;class Rs{constructor(){this.currentEngineVersion=V.current,this.currentSDKVersion=Ee.version}}class Vs{constructor(o){g(this,f);g(this,Yt);this.getAll=async()=>(await a(this,f)).getLayouts().then(t=>i(t)),this.getById=async e=>(await a(this,f)).getLayoutById(e).then(s=>i(s)),this.getByName=async e=>(await a(this,f)).getLayoutByName(e).then(s=>i(s)),this.getSelected=async()=>(await a(this,f)).getSelectedLayout().then(t=>i(t)),this.remove=async e=>(await a(this,f)).removeLayout(e).then(s=>i(s)),this.create=async(e,t)=>{const s=await a(this,f);return t!=null&&t.length?s.addLayouts(e,JSON.stringify(t)).then(n=>i(n)):s.addLayout(e).then(n=>i(n))},this.rename=async(e,t)=>(await a(this,f)).renameLayout(e,t).then(n=>i(n)),this.select=async e=>(await a(this,f)).selectLayoutWithOptions(e,null).then(s=>i(s)),this.selectWithPageSize=async(e,t)=>{const s=await a(this,f),n={pageSize:t};return s.selectLayoutWithOptions(e,JSON.stringify(n)).then(c=>i(c))},this.duplicate=async e=>(await a(this,f)).duplicateLayout(e).then(s=>i(s)),this.reset=async e=>(await a(this,f)).resetLayout(e).then(s=>i(s)),this.setHeight=async(e,t)=>(await a(this,f)).setLayoutHeight(e,t).then(n=>i(n)),this.setWidth=async(e,t)=>(await a(this,f)).setLayoutWidth(e,t).then(n=>i(n)),this.setUnit=async(e,t)=>(await a(this,f)).setLayoutUnit(e,t).then(n=>i(n)),this.resetHeight=async e=>(await a(this,f)).resetLayoutHeight(e).then(s=>i(s)),this.resetWidth=async e=>(await a(this,f)).resetLayoutWidth(e).then(s=>i(s)),this.resetUnit=async e=>(await a(this,f)).resetLayoutUnit(e).then(s=>i(s)),this.getSelectedSnapshot=async()=>(await a(this,Yt)).getPageSnapshot().then(t=>t??t),this.setIntent=async(e,t)=>(await a(this,f)).setLayoutIntent(e,t).then(n=>i(n)),this.resetIntent=async e=>(await a(this,f)).resetLayoutIntent(e).then(s=>i(s)),this.setFillColor=async(e,t)=>(await a(this,f)).setLayoutFillColor(e,JSON.stringify(t)).then(n=>i(n)),this.setFillColorEnabled=async(e,t)=>(await a(this,f)).setLayoutFillColorEnabled(e,t).then(n=>i(n)),this.resetFillColor=async e=>(await a(this,f)).resetLayoutFillColor(e).then(s=>i(s)),this.setBleedValue=async(e,t,s)=>{const n=s?{left:s===Y.left?t:void 0,top:s===Y.top?t:void 0,right:s===Y.right?t:void 0,bottom:s===Y.bottom?t:void 0}:{left:t,top:t,right:t,bottom:t};return(await a(this,f)).updateLayoutBleed(e,JSON.stringify(n)).then(d=>i(d))},this.setAreBleedValuesCombined=async(e,t)=>{const s={areBleedValuesCombined:t};return(await a(this,f)).updateLayoutBleed(e,JSON.stringify(s)).then(c=>i(c))},this.resetBleedValues=async e=>(await a(this,f)).updateLayoutBleed(e,null).then(s=>i(s)),this.setPrivateData=async(e,t)=>(await a(this,f)).setLayoutPrivateData(e,JSON.stringify(t)).then(n=>i(n)),this.getPrivateData=async e=>(await a(this,f)).getLayoutPrivateData(e).then(s=>i(s)),this.setDisplayName=async(e,t)=>(await a(this,f)).setLayoutDisplayName(e,t).then(n=>i(n)),this.getDisplayName=async e=>(await a(this,f)).getLayoutDisplayName(e).then(s=>i(s)),this.resetDisplayName=async e=>(await a(this,f)).setLayoutDisplayName(e,null).then(s=>i(s)),this.setAvailableForUser=async(e,t)=>(await a(this,f)).setLayoutAvailableForUser(e,t).then(n=>i(n)),this.setSelectedByUser=async(e,t)=>(await a(this,f)).setLayoutSelectedByUser(e,t).then(n=>i(n)),this.setResizableByUser=async(e,t)=>(await a(this,f)).setLayoutResizableByUser(e,JSON.stringify(t)).then(n=>i(n)),y(this,f,o),y(this,Yt,o)}}f=new WeakMap,Yt=new WeakMap;var le=(r=>(r.thumbnail="thumbnail",r.mediumres="mediumres",r.highres="highres",r.original="original",r))(le||{}),be=(r=>(r.web="web",r.print="print",r.animation="animation",r))(be||{});class Bs{constructor(o){g(this,tt);g(this,Zt);this.query=async(e,t,s={})=>(await a(this,tt)).mediaConnectorQuery(e,JSON.stringify(t),JSON.stringify(s)).then(c=>i(c)),this.detail=async(e,t,s={})=>(await a(this,tt)).mediaConnectorDetail(e,t,JSON.stringify(s)).then(c=>i(c)),this.download=async(e,t,s,n={})=>{const c=this.parseDeprecatedMediaDownloadType(s);return(await a(this,Zt)).mediaConnectorDownload(e,t,c,be.web,JSON.stringify(n)).then(u=>{if(u instanceof Uint8Array)return u;throw typeof u=="object"&&u!==null&&"success"in u&&!u.success&&pt(u),new Error(`Unexpected response type: ${typeof u}.`)})},this.getConfigurationOptions=async e=>(await a(this,tt)).mediaConnectorGetConfigurationOptions(e).then(s=>i(s)),this.getCapabilities=async e=>(await a(this,tt)).mediaConnectorGetCapabilities(e).then(s=>i(s)),this.parseDeprecatedMediaType=e=>{if(e===Et.file)return Ot.file;if(e===Et.collection)return Ot.collection},this.upload=async(e,t,s={})=>(await a(this,tt)).mediaConnectorUpload(e,JSON.stringify(t),JSON.stringify(s)).then(c=>i(c)),y(this,tt,o),y(this,Zt,o)}parseDeprecatedMediaDownloadType(o){switch(o){case ce.HighResolutionWeb:return le.highres;case ce.LowResolutionWeb:return le.thumbnail;default:return o}}}tt=new WeakMap,Zt=new WeakMap;let Ts=(Mr=class{constructor(o){g(this,L);g(this,Qt);this.add=async()=>(await a(this,L)).addPage().then(t=>i(t)),this.remove=async e=>(await a(this,L)).removePage(e).then(s=>i(s)),this.select=async e=>(await a(this,L)).selectPage(e).then(s=>i(s)),this.setVisibility=async(e,t)=>(await a(this,L)).setPageIsVisible(e,t).then(n=>i(n)),this.duplicate=async e=>(await a(this,L)).duplicatePage(e).then(s=>i(s)),this.getAll=async()=>(await a(this,L)).getPages().then(t=>i(t)),this.getById=async e=>(await a(this,L)).getPageById(e).then(s=>i(s)),this.getSnapshot=async(e,t)=>(await a(this,Qt)).getPageSnapshotWithSettings(e,t==null?null:JSON.stringify(t)).then(n=>{if(n instanceof Uint8Array)return n;throw typeof n=="object"&&n!==null&&"success"in n&&!n.success&&pt(n),new Error(`Unexpected response type: ${typeof n}.`)}),this.setWidth=async(e,t)=>(e!==void 0&&console.warn("pageId has no effect since all pages are being updated simultaneously."),(await a(this,L)).setPageWidth(t).then(n=>i(n))),this.setHeight=async(e,t)=>(e!==void 0&&console.warn("pageId has no effect since all pages are being updated simultaneously."),(await a(this,L)).setPageHeight(t).then(n=>i(n))),this.setSize=async(e,t)=>(await a(this,L)).setPageSize(e,t).then(n=>i(n)),this.move=async(e,t)=>(await a(this,L)).reorderPages(e,t).then(n=>i(n)),y(this,L,o),y(this,Qt,o)}},L=new WeakMap,Qt=new WeakMap,Mr);class Js{constructor(o){g(this,G);this.getAll=async()=>(await a(this,G)).getParagraphStyles().then(t=>i(t)),this.getById=async e=>(await a(this,G)).getParagraphStyleById(e).then(s=>i(s)),this.create=async()=>(await a(this,G)).createParagraphStyle().then(t=>i(t)),this.duplicate=async e=>(await a(this,G)).duplicateParagraphStyle(e).then(s=>i(s)),this.update=async(e,t)=>(await a(this,G)).updateParagraphStyle(e,JSON.stringify(t)).then(n=>i(n)),this.rename=async(e,t)=>(await a(this,G)).renameParagraphStyle(e,t).then(n=>i(n)),this.remove=async e=>(await a(this,G)).removeParagraphStyle(e).then(s=>i(s)),this.move=async(e,t)=>(await a(this,G)).moveParagraphStyles(e,t).then(n=>i(n)),y(this,G,o)}}G=new WeakMap;var zt=(r=>(r.shortText="shortText",r.longText="longText",r.image="image",r.list="list",r.boolean="boolean",r.group="group",r.number="number",r.date="date",r.dataSource="dataSource",r))(zt||{}),Us=(r=>(r.Monday="monday",r.Tuesday="tuesday",r.Wednesday="wednesday",r.Thursday="thursday",r.Friday="friday",r.Saturday="saturday",r.Sunday="sunday",r))(Us||{}),ks=(r=>(r.en_US="en_US",r.cs="cs",r.da="da",r.nl="nl",r.fi="fi",r.fr="fr",r.de="de",r.it="it",r.no="no",r.pl="pl",r.pt_PT="pt_PT",r.es_ES="es_ES",r.sv="sv",r))(ks||{}),Ft=(r=>(r.visible="visible",r.invisible="invisible",r.conditional="conditional",r))(Ft||{}),Gs=(r=>(r.boolean="boolean",r.text="text",r.number="number",r))(Gs||{}),_s=(r=>(r.equals="=",r.notEquals="!=",r.greaterThan=">",r.greaterThanOrEquals=">=",r.lessThan="<",r.lessThanOrEquals="<=",r))(_s||{}),ve=(r=>(r.injected="injected",r.connector="connector",r))(ve||{}),Hs=(r=>(r.table="table",r.list="list",r))(Hs||{});let kn=class{constructor(o,e){this.onActionsChanged=t=>{this.config.events.onActionsChanged.trigger(JSON.parse(t))},this.onAnimationChanged=t=>{this.config.events.onFrameAnimationsChanged.trigger(JSON.parse(t))},this.onAnimationPlaybackChanged=t=>{this.config.events.onScrubberPositionChanged.trigger(JSON.parse(t))},this.onSelectedLayoutPropertiesChanged=t=>{this.config.events.onSelectedLayoutPropertiesChanged.trigger(JSON.parse(t))},this.onSelectedLayoutUnitChanged=t=>{this.config.events.onSelectedLayoutUnitChanged.trigger(t)},this.onFramesLayoutChanged=t=>{const s=JSON.parse(t);this.config.events.onFramesLayoutChanged.trigger(s)},this.onSelectedFramesLayoutChanged=t=>{const s=JSON.parse(t);this.config.events.onSelectedFramesLayoutChanged.trigger(s);const n=this.config.onSelectedFrameLayoutChanged;n&&n(s.length>1?void 0:s[0])},this.onSelectedFramesContentChanged=t=>{const s=JSON.parse(t);this.config.events.onSelectedFramesContentChanged.trigger(s);const n=this.config.onSelectedFrameContentChanged;n&&n(s.length>1?null:s[0])},this.onStateChanged=()=>{this.config.events.onStateChanged.trigger()},this.onAuthExpired=async t=>{const s=await this.config.handlers.onAuthExpired.trigger(JSON.parse(t));return s!=null?JSON.stringify(s):null},this.onViewportRequested=()=>{const t=this.config.handlers.onViewportRequested.trigger();return t!=null?JSON.stringify(t):null},this.onDocumentLoaded=()=>{this.config.events.onDocumentLoaded.trigger()},this.onPageSelectionChanged=t=>{this.config.events.onPageSelectionChanged.trigger(t)},this.onVariableListChanged=t=>{const n=JSON.parse(t).map(c=>{var d;return c.type===zt.list?{...c,items:c.items.map(u=>u.value),selected:(d=c.selected)==null?void 0:d.value}:c});this.config.events.onVariableListChanged.trigger(n)},this.onSelectedToolChanged=t=>{this.config.events.onSelectedToolChanged.trigger(t)},this.onUndoStateChanged=t=>{this.config.events.onUndoStackStateChanged.trigger(JSON.parse(t))},this.onCustomUndoDataChanged=t=>{this.config.events.onCustomUndoDataChanged.trigger(JSON.parse(t))},this.onSelectedLayoutFramesChanged=t=>{this.config.events.onSelectedLayoutFramesChanged.trigger(JSON.parse(t))},this.onSelectedTextStyleChanged=t=>{this.config.events.onSelectedTextStyleChanged.trigger(JSON.parse(t))},this.onColorsChanged=t=>{this.config.events.onColorsChanged.trigger(JSON.parse(t))},this.onParagraphStylesChanged=t=>{this.config.events.onParagraphStylesChanged.trigger(JSON.parse(t))},this.onCharacterStylesChanged=t=>{this.config.events.onCharacterStylesChanged.trigger(JSON.parse(t))},this.onFontFamiliesChanged=t=>{this.config.events.onFontFamiliesChanged.trigger(JSON.parse(t))},this.onSelectedLayoutIdChanged=t=>{this.config.events.onSelectedLayoutIdChanged.trigger(t)},this.onLayoutsChanged=t=>{this.config.events.onLayoutsChanged.trigger(JSON.parse(t))},this.onZoomChanged=t=>{this.config.events.onZoomChanged.trigger(JSON.parse(t))},this.onConnectorEvent=t=>{this.config.events.onConnectorEvent.trigger(JSON.parse(t))},this.onConnectorsChanged=t=>{const n=new de().makeMultipleConnectorsBackwardsCompatible(JSON.parse(t),this.localConfig.get(q.GraFxStudioEnvironmentApiUrl));this.config.events.onConnectorsChanged.trigger(n)},this.onSelectedPageIdChanged=t=>{this.config.events.onSelectedPageIdChanged.trigger(t)},this.onPagesChanged=t=>{this.config.events.onPagesChanged.trigger(JSON.parse(t))},this.onPageSnapshotInvalidated=t=>{this.config.events.onPageSnapshotInvalidated.trigger(t)},this.onPageSizeChanged=t=>{this.config.events.onPageSizeChanged.trigger(JSON.parse(t))},this.onShapeCornerRadiusChanged=t=>{this.config.events.onShapeCornerRadiusChanged.trigger(JSON.parse(t))},this.onCropActiveFrameIdChanged=t=>{this.config.events.onCropActiveFrameIdChanged.trigger(t)},this.onAsyncError=t=>{const s=JSON.parse(t);if((s==null?void 0:s.type)==="dataRow"){const n=new Ve(s.count,s.message,s.exceptions);this.config.events.onAsyncError.trigger(n)}else if((s==null?void 0:s.type)==="action"){const n=new Re(s.message,s.id,s.event,s.eventChain);this.config.events.onAsyncError.trigger(n)}else this.config.events.onAsyncError.trigger(s)},this.onViewModeChanged=t=>{this.config.events.onViewModeChanged.trigger(t)},this.onBarcodeValidationChanged=t=>{this.config.events.onBarcodeValidationChanged.trigger(JSON.parse(t))},this.onDataSourceIdChanged=t=>{this.config.events.onDataSourceIdChanged.trigger(t)},this.onDocumentIssueListChanged=t=>{this.config.events.onDocumentIssueListChanged.trigger(JSON.parse(t))},this.onEngineEditModeChanged=t=>{this.config.events.onEngineEditModeChanged.trigger(JSON.parse(t))},this.onBrandKitMediaChanged=t=>{this.config.events.onBrandKitMediaChanged.trigger(JSON.parse(t))},this.config=o,this.localConfig=e}};class xs{constructor(o){g(this,bt);this.set=async e=>(await a(this,bt)).selectedTextStyleDeltaUpdate(JSON.stringify(e)).then(s=>i(s)),this.removeSelected=async()=>(await a(this,bt)).selectedTextStyleClean().then(t=>i(t)),this.getSelected=async()=>(await a(this,bt)).getSelectedTextStyle().then(t=>i(t)),y(this,bt,o)}}bt=new WeakMap;var $s=(r=>(r.FRAME_X="frameX",r.FRAME_Y="frameY",r.WIDTH="width",r.HEIGHT="height",r.FRAME_ROTATION="frameRotation",r))($s||{}),Ks=(r=>(r.LAYOUT_HEIGHT="layoutHeight",r.LAYOUT_WIDTH="layoutWidth",r.BLEED_TOP="bleedTop",r.BLEED_BOTTOM="bleedBottom",r.BLEED_LEFT="bleedLeft",r.BLEED_RIGHT="bleedRight",r.BLEED_VALUES_COMBINED="areBleedValuesCombined",r))(Ks||{}),K=(r=>(r.SELECT="select",r.ZOOM="zoom",r.HAND="hand",r.IMAGE_FRAME="imageFrame",r.TEXT_FRAME="textFrame",r.SHAPE_RECT="rect",r.SHAPE_ELLIPSE="ellipse",r.SHAPE_POLYGON="polygon",r))(K||{}),zs=(r=>(r.MP4="mp4",r.GIF="gif",r.PNG="png",r.JPG="jpg",r.PDF="pdf",r.HTML="html",r))(zs||{}),ue=(r=>(r.SANDBOX="sandbox",r.PRODUCTION="online",r))(ue||{});class js{constructor(o){g(this,Vt);this.setTool=async e=>(await a(this,Vt)).setTool(e).then(s=>i(s)),this.getSelected=async()=>(await a(this,Vt)).getSelectedTool().then(t=>i(t)),this.setPointer=async()=>this.setTool(K.SELECT),this.setSelect=async()=>this.setTool(K.SELECT),this.setHand=async()=>this.setTool(K.HAND),this.setZoom=async()=>this.setTool(K.ZOOM),this.setTextFrame=async()=>this.setTool(K.TEXT_FRAME),this.setImageFrame=async()=>this.setTool(K.IMAGE_FRAME),this.setShapeRect=async()=>this.setTool(K.SHAPE_RECT),this.setShapeEllipse=async()=>this.setTool(K.SHAPE_ELLIPSE),this.setShapePolygon=async()=>this.setTool(K.SHAPE_POLYGON),y(this,Vt,o)}}Vt=new WeakMap;class Ws{constructor(o,e){g(this,Z);g(this,j);g(this,Xt);this.undo=async()=>(await a(this,Z)).undo().then(s=>i(s)),this.redo=async()=>(await a(this,Z)).redo().then(s=>i(s)),this.addCustomData=async(t,s)=>(await a(this,Z)).setCustomUndoData(t,s,!1).then(c=>i(c)),this.record=async(t,s)=>{try{await a(this,j).beginIfNoneActive(t),await s(a(this,Xt)),await a(this,j).end()}catch(n){throw await a(this,j).abort(),n}},this.pause=async()=>(await a(this,Z)).pause().then(s=>i(s)),this.resume=async()=>(await a(this,Z)).resume().then(s=>i(s)),this.clear=async()=>(await a(this,Z)).clear().then(s=>i(s)),this.advanced={begin:async t=>a(this,j).begin(t),beginIfNoneActive:async t=>a(this,j).beginIfNoneActive(t),end:async()=>a(this,j).end(),abort:async()=>a(this,j).abort()},y(this,Z,o),y(this,Xt,e),y(this,j,new Gn(o))}}Z=new WeakMap,j=new WeakMap,Xt=new WeakMap;class Gn{constructor(o){g(this,lt);this.begin=async e=>(await a(this,lt)).begin(e).then(s=>i(s)),this.beginIfNoneActive=async e=>(await a(this,lt)).beginIfNoneActive(e).then(s=>i(s)),this.end=async()=>(await a(this,lt)).end().then(t=>i(t)),this.abort=async()=>(await a(this,lt)).abort().then(t=>i(t)),y(this,lt,o)}}lt=new WeakMap;const _n=(r,o=2)=>{const e=Math.pow(10,o);return Math.round(r*e)/e};class qs{constructor(o,e){g(this,te);g(this,Bt);this.round=(t,s)=>i({data:String(_n(t,s)),success:!0,status:200,parsedData:null}),this.createEnvironmentBaseURL=t=>{const{type:s=ue.SANDBOX,environment:n="ft-nostress",version:c="1"}=t,d=s==ue.SANDBOX?"chili-publish-sandbox":"chili-publish";return`https://${n}.${d}.online/grafx/api/v${c}/environment/${n}`},this.stageFiles=async(t,s,n)=>{const c=a(this,Bt).get(q.GraFxStudioEnvironmentApiUrl);if(!c)throw new Error("GraFx Studio Environment API URL is not set");const d=`${c}connectors/${s}/stage`,u=a(this,Bt).get(q.GraFxStudioAuthToken);if(!u)throw new Error("GraFx Studio Auth Token is not set");const w=new FormData;t.forEach((b,A)=>{const N=b instanceof File?b.name:`blob-${A}`;w.append("files",b,N)}),n&&w.append("validationJson",JSON.stringify({allowedMimeTypes:n.mimeTypes,minDimensions:{width:n.minWidthPixels,height:n.minHeightPixels}}));const p=await fetch(d,{method:"POST",body:w,headers:{Authorization:`Bearer ${u}`}});if(p.status===422){const b=await p.json();throw new os(b.message,me.minDimension)}if(!p.ok)throw new Error("Failed to stage files");return await p.json()},this.unitEvaluate=async(t,s)=>(await a(this,te)).unitEvaluate(t,s).then(c=>i(c)),y(this,te,o),y(this,Bt,e)}}te=new WeakMap,Bt=new WeakMap;const Hn=r=>r.type===zt.dataSource,xn=r=>{var o;return r?Hn(r)&&((o=r==null?void 0:r.value)==null?void 0:o.type)===ve.injected:!1};class $n{constructor(o){g(this,ee);this.setMinimum=async(e,t)=>{const s={minValue:{value:t}};return this.applyPropertiesUpdate(e,s)},this.setMaximum=async(e,t)=>{const s={maxValue:{value:t}};return this.applyPropertiesUpdate(e,s)},this.setShowStepper=async(e,t)=>{const s={showStepper:{value:t}};return this.applyPropertiesUpdate(e,s)},this.setStepSize=async(e,t)=>{const s={stepSize:{value:t}};return this.applyPropertiesUpdate(e,s)},this.setThousandsSeparator=async(e,t)=>{const s={thousandsSeparator:{value:t}};return this.applyPropertiesUpdate(e,s)},this.setDecimalSeparator=async(e,t)=>{const s={decimalSeparator:{value:t}};return this.applyPropertiesUpdate(e,s)},this.setDecimalCharacterStyle=async(e,t)=>{const s={decimalCharacterStyleId:{value:t}};return this.applyPropertiesUpdate(e,s)},this.setNumberOfDecimals=async(e,t)=>{const s={numberOfDecimals:{value:t}};return this.applyPropertiesUpdate(e,s)},y(this,ee,o)}async applyPropertiesUpdate(o,e){const s=await(await a(this,ee)).updateNumberVariableProperties(o,JSON.stringify(e));return i(s)}}ee=new WeakMap;class Kn{constructor(o){g(this,se);this.setDisplayFormat=async(e,t)=>{const s={displayFormat:{value:t}};return this.applyPropertiesUpdate(e,s)},this.setLocale=async(e,t)=>{const s={locale:{value:t}};return this.applyPropertiesUpdate(e,s)},this.setStartDate=async(e,t)=>{const s={startDate:{value:t}};return this.applyPropertiesUpdate(e,s)},this.setEndDate=async(e,t)=>{const s={endDate:{value:t}};return this.applyPropertiesUpdate(e,s)},this.setExcludedDays=async(e,t)=>{const s={excludedDays:{value:t}};return this.applyPropertiesUpdate(e,s)},y(this,se,o)}async applyPropertiesUpdate(o,e){const s=await(await a(this,se)).updateDateVariableProperties(o,JSON.stringify(e));return i(s)}}se=new WeakMap;class zn{constructor(o,e){g(this,_);g(this,Tt);this.setValue=async(t,s)=>{const n=await a(this,_);let c;return Array.isArray(s)?c=s.map(d=>a(this,Tt).mapDataItemToEngine(d)):c=s,n.setVariableValue(t,c).then(d=>i(d))},this.getInjectedData=async t=>(await a(this,_)).getInjectedDataSourceVariableData(t).then(n=>i(n)).then(n=>{const c={...n,parsedData:null};return n.parsedData&&(c.parsedData={...n.parsedData,data:n.parsedData.data.map(d=>a(this,Tt).mapEngineToDataItem(d))}),c}),this.getInjectedItemById=async(t,s)=>{var p;const c=await(await a(this,_)).getVariableById(t).then(v=>i(v));xn(c.parsedData)||pt({status:400,error:"Variable is not an injected data source variable"});const d=c.parsedData.value.itemIdPropertyName,w=(p=(await this.getInjectedData(t)).parsedData)==null?void 0:p.data.find(v=>{var b;return((b=v[d])==null?void 0:b.toString())===s.toString()});return w||pt({status:404,error:`Item not found in injected data for variable ${t}`}),{success:!0,status:200,parsedData:{data:w,continuationToken:null,previousPageToken:null}}},this.setInjectedModel=async(t,s)=>{const n=s.properties,c=s.itemIdPropertyName;return(await a(this,_)).setInjectedDataSourceVariableModel(t,JSON.stringify(n),c).then(u=>i(u))},this.setSourceType=async(t,s)=>(await a(this,_)).setDataSourceVariableSourceType(t,s).then(c=>i(c)),this.setConnector=async(t,s)=>{const n=await a(this,_),d=new de().makeConnectorSourceForwardsCompatible(s);return n.setDataSourceVariableConnector(t,JSON.stringify(d)).then(u=>i(u))},this.removeConnector=async t=>(await a(this,_)).setDataSourceVariableConnector(t,null).then(n=>i(n)),y(this,_,o),y(this,Tt,e)}async setDisplayOptions(o,e,t){return(await a(this,_)).setDataSourceVariableDisplayOptions(o,e,t??void 0).then(n=>i(n))}}_=new WeakMap,Tt=new WeakMap;let Ys=(Rr=class{constructor(o,e){g(this,C);g(this,Jt);g(this,Ut);this.getAll=async()=>(await a(this,C)).getVariables().then(s=>i(s)).then(s=>{const n=s;return n.parsedData&&(n.parsedData=this.makeVariablesBackwardsCompatible(n.parsedData)),n}),this.getById=async t=>(await a(this,C)).getVariableById(t).then(n=>i(n)).then(n=>{const c=n;return c.parsedData&&(c.parsedData=this.makeVariableBackwardsCompatible(c.parsedData)),c}),this.getByName=async t=>(await a(this,C)).getVariableByName(t).then(n=>i(n)).then(n=>{const c=n;return c.parsedData&&(c.parsedData=this.makeVariableBackwardsCompatible(c.parsedData)),c}),this.create=async(t,s)=>(await a(this,C)).addVariable(t,s).then(c=>i(c)),this.remove=async t=>(await a(this,C)).removeVariables(t).then(n=>i(n)),this.rename=async(t,s)=>(await a(this,C)).setVariableName(t,s).then(c=>i(c)),this.setLabel=async(t,s)=>(await a(this,C)).setVariableLabel(t,s).then(c=>i(c)),y(this,Jt,async(t,s)=>(await a(this,C)).setVariablePlaceholder(t,s).then(c=>i(c))),this.setPlaceholder=async(t,s)=>a(this,Jt).call(this,t,s),this.resetPlaceholder=async t=>a(this,Jt).call(this,t,null),y(this,Ut,async(t,s)=>(await a(this,C)).setVariableHelpText(t,s).then(c=>i(c))),this.setHelpText=async(t,s)=>a(this,Ut).call(this,t,s),this.resetHelpText=async t=>a(this,Ut).call(this,t,null),this.setType=async(t,s)=>(await a(this,C)).setVariableType(t,s).then(c=>i(c)),this.setListVariable=async(t,s)=>(await a(this,C)).setListVariableItems(t,s.map(c=>JSON.stringify({value:c}))).then(c=>i(c)),this.setValue=async(t,s)=>(await a(this,C)).setVariableValue(t,s).then(c=>i(c,d=>On(d,{id:t}))),this.duplicate=async t=>(await a(this,C)).duplicateVariable(t).then(n=>i(n)),this.groupVariables=async(t,s)=>(await a(this,C)).groupVariables(t,s).then(c=>i(c)),this.ungroupVariables=async t=>(await a(this,C)).ungroupVariable(t).then(n=>i(n)),this.move=async(t,s,n)=>(await a(this,C)).moveVariable(s,n,t).then(d=>i(d)),this.moveVariables=async(t,s,n)=>(await a(this,C)).moveVariables(s,n,t).then(d=>i(d)),this.setIsVisible=async(t,s)=>{const n=s?{type:Ft.visible}:{type:Ft.invisible};return this.setVariableVisibility(t,n)},this.setIsHidden=async(t,s)=>{const n=s?{type:Ft.invisible}:{type:Ft.visible};return this.setVariableVisibility(t,n)},this.setVariableVisibility=async(t,s)=>(await a(this,C)).setVariableVisibility(t,JSON.stringify(s)).then(c=>i(c)),this.setLayoutsForVariableVisibility=async t=>(await a(this,C)).setLayoutsForVariableVisibility(t?JSON.stringify(t):null).then(n=>i(n)),this.setIsRequired=async(t,s)=>(await a(this,C)).setVariableIsRequired(t,s).then(c=>i(c)),this.setRemoveParagraphIfEmpty=async(t,s)=>(await a(this,C)).setVariableRemoveParagraphIfEmpty(t,s).then(c=>i(c)),this.setVariableCharacterLimit=async(t,s)=>(await a(this,C)).setVariableCharacterLimit(t,s).then(c=>i(c)),this.setIsReadonly=async(t,s)=>(await a(this,C)).setVariableIsReadonly(t,s).then(c=>i(c)),this.getImageVariableConnectorId=async t=>(await a(this,C)).getImageVariableConnectorId(t).then(n=>i(n)),this.setImageVariableConnector=async(t,s)=>{const n=await a(this,C),d=new de().makeConnectorSourceForwardsCompatible(s);return n.setImageVariableConnector(t,JSON.stringify(d)).then(u=>i(u))},this.setImageVariableValueWithContext=async(t,s,n)=>(await a(this,C)).setImageVariableValueWithContext(t,s,JSON.stringify(n)).then(d=>i(d)),this.removeSource=async t=>this.setValue(t,null),this.setPrefix=async(t,s)=>{const n={prefix:{value:s}};return this.applyPrefixSuffixDeltaUpdate(t,n)},this.setSuffix=async(t,s)=>{const n={suffix:{value:s}};return this.applyPrefixSuffixDeltaUpdate(t,n)},this.setPrefixCharacterStyle=async(t,s)=>{const n={prefixCharacterStyleId:{value:s}};return this.applyPrefixSuffixDeltaUpdate(t,n)},this.setSuffixCharacterStyle=async(t,s)=>{const n={suffixCharacterStyleId:{value:s}};return this.applyPrefixSuffixDeltaUpdate(t,n)},this.setPrivateData=async(t,s)=>(await a(this,C)).setVariablePrivateData(t,JSON.stringify(s)).then(c=>i(c)),this.getPrivateData=async t=>(await a(this,C)).getVariablePrivateData(t).then(n=>i(n)),this.setAllowImageQuery=async(t,s)=>(await a(this,C)).setImageVariableAllowQuery(t,s).then(c=>i(c)),this.setAllowImageUpload=async(t,s)=>(await a(this,C)).setImageVariableAllowUpload(t,s).then(c=>i(c)),this.setMinImageUploadSize=async(t,s,n)=>(await a(this,C)).setImageVariableUploadMinSize(t,s,n).then(d=>i(d)),this.setIsDontBreak=async(t,s)=>(await a(this,C)).setVariableIsDontBreak(t,s).then(c=>i(c)),this.highlightUsages=async t=>(await a(this,C)).highlightVariableUsages(t).then(n=>i(n)),y(this,C,o),this.number=new $n(a(this,C)),this.date=new Kn(a(this,C)),this.dataSource=new zn(a(this,C),e)}makeVariablesBackwardsCompatible(o){return o.map(e=>this.makeVariableBackwardsCompatible(e))}makeVariableBackwardsCompatible(o){return o.type!==zt.list?o:this.makeListVariableBackwardsCompatible(o)}makeListVariableBackwardsCompatible(o){const e=o,t=o.items,s=o.selected,n=t.map(c=>c.value);return e.items=n,e.selected=s==null?void 0:s.value,e}async applyPrefixSuffixDeltaUpdate(o,e){const s=await(await a(this,C)).updateVariablePrefixSuffixProperties(o,JSON.stringify(e));return i(s)}},C=new WeakMap,Jt=new WeakMap,Ut=new WeakMap,Rr);class jn{constructor(o){g(this,kt);this.get=async()=>(await a(this,kt)).getBrandKit().then(t=>i(t)),this.set=async e=>(await a(this,kt)).setBrandKit(JSON.stringify(e)).then(s=>i(s)),y(this,kt,o)}}kt=new WeakMap;class Wn{constructor(o){this.onVariableListChanged=e=>{this.config.events.onVariableListChanged.trigger(JSON.parse(e))},this.onConnectorsChanged=e=>{this.config.events.onConnectorsChanged.trigger(JSON.parse(e))},this.onPageSizeChanged=e=>{this.config.events.onPageSizeChanged.trigger(JSON.parse(e))},this.onEngineEditModeChanged=e=>{this.config.events.onEngineEditModeChanged.trigger(JSON.parse(e))},this.config=o}}class qn{constructor(o){g(this,ut);this.getAll=async()=>(await a(this,ut)).getVariables().then(t=>i(t)),this.getById=async e=>(await a(this,ut)).getVariableById(e).then(s=>i(s)),this.getByName=async e=>(await a(this,ut)).getVariableByName(e).then(s=>i(s)),this.setListVariable=async(e,t)=>(await a(this,ut)).setListVariableItems(e,t.map(n=>JSON.stringify(n))).then(n=>i(n)),y(this,ut,o),this.image=new Yn(o),this.dataSource=new Zn(o)}}ut=new WeakMap;class Yn{constructor(o){g(this,et);this.setAllowQuery=async(e,t)=>(await a(this,et)).setImageVariableAllowQuery(e,t).then(n=>i(n)),this.setAllowUpload=async(e,t)=>(await a(this,et)).setImageVariableAllowUpload(e,t).then(n=>i(n)),this.setMinUploadSize=async(e,t,s)=>(await a(this,et)).setImageVariableUploadMinSize(e,t,s).then(c=>i(c)),this.setConnector=async(e,t)=>(await a(this,et)).setImageVariableConnector(e,JSON.stringify(t)).then(n=>i(n)),this.setConnectorContext=async(e,t)=>(await a(this,et)).setImageVariableConnectorContext(e,JSON.stringify(t)).then(n=>i(n)),y(this,et,o)}}et=new WeakMap;class Zn{constructor(o){g(this,re);this.setConnector=async(e,t)=>(await a(this,re)).setDataSourceVariableConnector(e,JSON.stringify(t)).then(n=>i(n)),y(this,re,o)}}re=new WeakMap;class Qn{constructor(o){g(this,vt);this.register=async e=>(await a(this,vt)).registerConnector(JSON.stringify(e)).then(s=>i(s)),this.getById=async e=>(await a(this,vt)).getConnectorById(e).then(s=>i(s)),this.getAllByType=async e=>(await a(this,vt)).getConnectors(e).then(s=>i(s)),y(this,vt,o)}}vt=new WeakMap;class Xn{constructor(o){g(this,Gt);g(this,ge);this.setWidth=async e=>(await a(this,Gt)).setPageWidth(e).then(s=>i(s)),this.setHeight=async e=>(await a(this,Gt)).setPageHeight(e).then(s=>i(s)),y(this,Gt,o),y(this,ge,o)}}Gt=new WeakMap,ge=new WeakMap;class Zs{constructor(o,e,t){this.config=o,this.connection=e,this.editorAPI=t,this.subscriber=new Wn(o),this.variable=new qn(this.editorAPI),this.connector=new Qn(this.editorAPI),this.page=new Xn(this.editorAPI),this.canvas=new Ce(this.editorAPI),this.brandKit=new jn(this.editorAPI)}}var T=(r=>(r.info="info",r.warn="warn",r.error="error",r))(T||{}),Qs=(r=>(r.general="general",r.connector="connector",r.event="event",r.engine="engine",r))(Qs||{}),jt=(r=>(r.throw="throw",r.log="log",r))(jt||{});class Xs{constructor(o){this.logger=o}createEventHandlerFn(o,e){return(...s)=>{try{const n=o(...s);return n instanceof Promise?n.catch(c=>this.handleError(c,e,o.name)):n}catch(n){this.handleError(n,e,o.name)}}}handleError(o,e,t){var s;if(e===jt.log)(s=this.logger)==null||s.call(this,T.error,Qs.event,`Error in callback ${t}: ${o}`);else throw o}}class tr extends Xs{constructor(o,e){super(e),this.handler=o}trigger(...o){const e=this.handler();if(e)return this.createEventHandlerFn(e,jt.throw)(...o)}}class m extends Xs{constructor(o,e){super(e),this.legacyHandler=o,this.subscriptions=new Set}trigger(...o){const e=this.legacyHandler();e&&this.createEventHandlerFn(e,jt.log)(...o);for(const t of this.subscriptions)t(...o)}registerCallback(o,e=jt.log){const t=this.createEventHandlerFn(o,e);return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}}class Ae{static createRuntimeConfig(o){var t,s,n,c,d,u,w,p,v,b,A,N,D,S,Q,x,I,st,rt,Ht,xt,Vr,Br,Tr,Jr,Ur,kr,Gr,_r,Hr,xr,$r,Kr,zr,jr;const e={...o};return e.logging={logLevel:((t=o.logging)==null?void 0:t.logLevel)||T.error,logger:((s=o.logging)==null?void 0:s.logger)||((ae,Ie,Pe)=>{var Wr;if(Ae.isLoggingEnabled(ae,((Wr=e.logging)==null?void 0:Wr.logLevel)??T.error))switch(ae){case T.error:console.error(`[${Ie}] [${ae}] ${Pe}`);break;case T.warn:console.warn(`[${Ie}] [${ae}] ${Pe}`);break;default:console.log(`[${Ie}] [${ae}] ${Pe}`)}})},e.handlers={onAuthExpired:new tr(()=>e.onAuthExpired,(n=e.logging)==null?void 0:n.logger),onViewportRequested:new tr(()=>e.onViewportRequested,(c=e.logging)==null?void 0:c.logger)},e.events={onActionsChanged:new m(()=>e.onActionsChanged,(d=e.logging)==null?void 0:d.logger),onStateChanged:new m(()=>e.onStateChanged,(u=e.logging)==null?void 0:u.logger),onDocumentLoaded:new m(()=>e.onDocumentLoaded,(w=e.logging)==null?void 0:w.logger),onSelectedFramesLayoutChanged:new m(()=>e.onSelectedFramesLayoutChanged,(p=e.logging)==null?void 0:p.logger),onFramesLayoutChanged:new m(()=>e.onFramesLayoutChanged,(v=e.logging)==null?void 0:v.logger),onSelectedFramesContentChanged:new m(()=>e.onSelectedFramesContentChanged,(b=e.logging)==null?void 0:b.logger),onPageSelectionChanged:new m(()=>e.onPageSelectionChanged,(A=e.logging)==null?void 0:A.logger),onSelectedLayoutPropertiesChanged:new m(()=>e.onSelectedLayoutPropertiesChanged,(N=e.logging)==null?void 0:N.logger),onSelectedLayoutUnitChanged:new m(()=>e.onSelectedLayoutUnitChanged,(D=e.logging)==null?void 0:D.logger),onScrubberPositionChanged:new m(()=>e.onScrubberPositionChanged,(S=e.logging)==null?void 0:S.logger),onFrameAnimationsChanged:new m(()=>e.onFrameAnimationsChanged,(Q=e.logging)==null?void 0:Q.logger),onVariableListChanged:new m(()=>e.onVariableListChanged,(x=e.logging)==null?void 0:x.logger),onSelectedToolChanged:new m(()=>e.onSelectedToolChanged,(I=e.logging)==null?void 0:I.logger),onUndoStackStateChanged:new m(()=>e.onUndoStackStateChanged,(st=e.logging)==null?void 0:st.logger),onSelectedLayoutFramesChanged:new m(()=>e.onSelectedLayoutFramesChanged,(rt=e.logging)==null?void 0:rt.logger),onSelectedTextStyleChanged:new m(()=>e.onSelectedTextStyleChanged,(Ht=e.logging)==null?void 0:Ht.logger),onColorsChanged:new m(()=>e.onColorsChanged,(xt=e.logging)==null?void 0:xt.logger),onParagraphStylesChanged:new m(()=>e.onParagraphStylesChanged,(Vr=e.logging)==null?void 0:Vr.logger),onCharacterStylesChanged:new m(()=>e.onCharacterStylesChanged,(Br=e.logging)==null?void 0:Br.logger),onFontFamiliesChanged:new m(()=>e.onFontFamiliesChanged,(Tr=e.logging)==null?void 0:Tr.logger),onSelectedLayoutIdChanged:new m(()=>e.onSelectedLayoutIdChanged,(Jr=e.logging)==null?void 0:Jr.logger),onLayoutsChanged:new m(()=>e.onLayoutsChanged,(Ur=e.logging)==null?void 0:Ur.logger),onConnectorEvent:new m(()=>e.onConnectorEvent,(kr=e.logging)==null?void 0:kr.logger),onConnectorsChanged:new m(()=>e.onConnectorsChanged,(Gr=e.logging)==null?void 0:Gr.logger),onZoomChanged:new m(()=>e.onZoomChanged,(_r=e.logging)==null?void 0:_r.logger),onSelectedPageIdChanged:new m(()=>e.onSelectedPageIdChanged,e.logging.logger),onPagesChanged:new m(()=>e.onPagesChanged,e.logging.logger),onPageSnapshotInvalidated:new m(()=>e.onPageSnapshotInvalidated,e.logging.logger),onPageSizeChanged:new m(()=>e.onPageSizeChanged,(Hr=e.logging)==null?void 0:Hr.logger),onShapeCornerRadiusChanged:new m(()=>e.onShapeCornerRadiusChanged,(xr=e.logging)==null?void 0:xr.logger),onCropActiveFrameIdChanged:new m(()=>e.onCropActiveFrameIdChanged,($r=e.logging)==null?void 0:$r.logger),onAsyncError:new m(()=>e.onAsyncError,(Kr=e.logging)==null?void 0:Kr.logger),onViewModeChanged:new m(()=>e.onViewModeChanged,(zr=e.logging)==null?void 0:zr.logger),onBarcodeValidationChanged:new m(()=>e.onBarcodeValidationChanged,(jr=e.logging)==null?void 0:jr.logger),onDataSourceIdChanged:new m(()=>e.onDataSourceIdChanged,e.logging.logger),onDocumentIssueListChanged:new m(()=>e.onDocumentIssueListChanged,e.logging.logger),onCustomUndoDataChanged:new m(()=>e.onCustomUndoDataChanged,e.logging.logger),onEngineEditModeChanged:new m(()=>e.onEngineEditModeChanged,e.logging.logger),onBrandKitMediaChanged:new m(()=>e.onBrandKitMediaChanged,e.logging.logger)},e}static isLoggingEnabled(o,e){return e==T.info||e==T.warn&&(o==T.warn||o==T.error)?!0:e==T.error&&o==T.error}}class ta{isDatePropertyWrapper(o){return typeof o=="object"&&(o==null?void 0:o.type)==="date"}isDateObject(o){return o instanceof Date}mapEngineToDataItem(o){const e={};return Object.entries(o).forEach(([t,s])=>{e[t]=this.isDatePropertyWrapper(s)?new Date(s.value):s}),e}mapDataItemToEngine(o){const e={};return Object.entries(o).forEach(([t,s])=>{e[t]=this.isDateObject(s)?{value:s.getTime(),type:"date"}:s}),e}}class ea{constructor(o){g(this,gt);y(this,gt,o)}async getValue(o){return(await a(this,gt)).getConfigValue(o).then(t=>i(t))}async setValue(o,e){return(await a(this,gt)).setConfigValue(o,e).then(s=>i(s))}async updateStudioOptions(o){return(await a(this,gt)).updateStudioOptions(JSON.stringify(o)).then(t=>i(t))}async getEngineSessionId(){return(await a(this,gt)).getEngineSessionId().then(e=>i(e))}}gt=new WeakMap;class er extends ea{constructor(e,t){super(e);g(this,_t);y(this,_t,t)}async getValue(e){const t=a(this,_t).get(e);return t!=null?i({status:200,success:!0,parsedData:t,data:t},!1):super.getValue(e)}async setValue(e,t){const s=super.setValue(e,t);return a(this,_t).set(e,t),s}}_t=new WeakMap;class sr{constructor(o){g(this,H);this.getAll=async()=>(await a(this,H)).getGradients().then(t=>i(t)),this.getById=async e=>(await a(this,H)).getGradientById(e).then(s=>i(s)),this.create=async()=>(await a(this,H)).createGradient().then(t=>i(t)),this.duplicate=async e=>(await a(this,H)).duplicateGradient(e).then(s=>i(s)),this.move=async(e,t)=>(await a(this,H)).moveGradients(e,t).then(n=>i(n)),this.rename=async(e,t)=>(await a(this,H)).renameGradient(e,t).then(n=>i(n)),this.update=async(e,t)=>{const s=await a(this,H),n=t;return s.updateGradient(e,JSON.stringify(n)).then(c=>i(c))},this.remove=async e=>(await a(this,H)).removeGradient(e).then(s=>i(s)),y(this,H,o)}}H=new WeakMap;class rr{constructor(o){g(this,At);g(this,ne);this.query=async(e,t,s={})=>(await a(this,At)).componentConnectorQuery(e,JSON.stringify(t),JSON.stringify(s)).then(c=>i(c)),this.preview=async(e,t,s,n={})=>(await a(this,ne)).componentConnectorPreview(e,t,s,JSON.stringify(n)).then(d=>{if(d instanceof Uint8Array)return d;throw typeof d=="object"&&d!==null&&"success"in d&&!d.success&&pt(d),new Error(`Unexpected response type: ${typeof d}.`)}),this.getConfigurationOptions=async e=>(await a(this,At)).componentConnectorGetConfigurationOptions(e).then(s=>i(s)),this.getCapabilities=async e=>(await a(this,At)).componentConnectorGetCapabilities(e).then(s=>i(s)),y(this,At,o),y(this,ne,o)}}At=new WeakMap,ne=new WeakMap;class nr{constructor(o){g(this,It);this.linkVariable=async(e,t,s,n)=>(await a(this,It)).linkComponentVariable(e,t,s,n??null).then(d=>i(d)),this.getComponentVariables=async e=>(await a(this,It)).getComponentVariables(e).then(s=>i(s)),this.setFitMode=async(e,t)=>(await a(this,It)).setComponentLayoutFit(e,t).then(n=>i(n)),y(this,It,o)}}It=new WeakMap;const sa=`https://studio-cdn.chiligrafx.com/editor/${V.current}/web`;let at;class ra{constructor(o){this.localConfig=new Map,this.dataItemMappingTools=new ta,this.loadEditor=()=>{var e;vn(this.config.editorLink||sa,{onActionsChanged:this.subscriber.onActionsChanged,onStateChanged:this.subscriber.onStateChanged,onAuthExpired:this.subscriber.onAuthExpired,onViewportRequested:this.subscriber.onViewportRequested,onDocumentLoaded:this.subscriber.onDocumentLoaded,onSelectedFramesContentChanged:this.subscriber.onSelectedFramesContentChanged,onSelectedFramesLayoutChanged:this.subscriber.onSelectedFramesLayoutChanged,onFramesLayoutChanged:this.subscriber.onFramesLayoutChanged,onSelectedLayoutPropertiesChanged:this.subscriber.onSelectedLayoutPropertiesChanged,onSelectedLayoutUnitChanged:this.subscriber.onSelectedLayoutUnitChanged,onPageSelectionChanged:this.subscriber.onPageSelectionChanged,onScrubberPositionChanged:this.subscriber.onAnimationPlaybackChanged,onFrameAnimationsChanged:this.subscriber.onAnimationChanged,onVariableListChanged:t=>{var s;(s=this.enabledNextSubscribers)!=null&&s.onVariableListChanged?this.next.subscriber.onVariableListChanged(t):this.subscriber.onVariableListChanged(t)},onSelectedToolChanged:this.subscriber.onSelectedToolChanged,onUndoStateChanged:this.subscriber.onUndoStateChanged,onSelectedLayoutFramesChanged:this.subscriber.onSelectedLayoutFramesChanged,onSelectedTextStyleChanged:this.subscriber.onSelectedTextStyleChanged,onColorsChanged:this.subscriber.onColorsChanged,onParagraphStylesChanged:this.subscriber.onParagraphStylesChanged,onCharacterStylesChanged:this.subscriber.onCharacterStylesChanged,onFontFamiliesChanged:this.subscriber.onFontFamiliesChanged,onSelectedLayoutIdChanged:this.subscriber.onSelectedLayoutIdChanged,onLayoutsChanged:this.subscriber.onLayoutsChanged,onConnectorEvent:this.subscriber.onConnectorEvent,onConnectorsChanged:t=>{var s;(s=this.enabledNextSubscribers)!=null&&s.onConnectorsChanged?this.next.subscriber.onConnectorsChanged(t):this.subscriber.onConnectorsChanged(t)},onZoomChanged:this.subscriber.onZoomChanged,onSelectedPageIdChanged:this.subscriber.onSelectedPageIdChanged,onPagesChanged:this.subscriber.onPagesChanged,onPageSnapshotInvalidated:this.subscriber.onPageSnapshotInvalidated,onPageSizeChanged:t=>{var s;(s=this.enabledNextSubscribers)!=null&&s.onPageSizeChanged?this.next.subscriber.onPageSizeChanged(t):this.subscriber.onPageSizeChanged(t)},onShapeCornerRadiusChanged:this.subscriber.onShapeCornerRadiusChanged,onCropActiveFrameIdChanged:this.subscriber.onCropActiveFrameIdChanged,onAsyncError:this.subscriber.onAsyncError,onViewModeChanged:this.subscriber.onViewModeChanged,onBarcodeValidationChanged:this.subscriber.onBarcodeValidationChanged,onDataSourceIdChanged:this.subscriber.onDataSourceIdChanged,onDocumentIssueListChanged:this.subscriber.onDocumentIssueListChanged,onCustomUndoDataChanged:this.subscriber.onCustomUndoDataChanged,onEngineEditModeChanged:this.subscriber.onEngineEditModeChanged,onBrandKitMediaChanged:this.subscriber.onBrandKitMediaChanged},this.setConnection,this.config.editorId,this.config.studioStyling,t=>{var s,n;(n=(s=this.config).onConnectionError)==null||n.call(s,t)}),this.editorAPI=at==null?void 0:at.promise.then(t=>t),this.action=new Je(this.editorAPI),this.layout=new Vs(this.editorAPI),this.frame=new Ms(this.editorAPI),this.barcode=new $e(this.editorAPI),this.component=new nr(this.editorAPI),this.animation=new Ue(this.editorAPI),this.document=new gs(this.editorAPI),this.configuration=new er(this.editorAPI,this.localConfig),this.utils=new qs(this.editorAPI,this.localConfig),this.tool=new js(this.editorAPI),this.page=new Ts(this.editorAPI),this.debug=new us(this.editorAPI),this.undoManager=new Ws(this.editorAPI,this),this.textSelection=new xs(this.editorAPI),this.colorStyle=new Ye(this.editorAPI),this.gradientStyle=new sr(this.editorAPI),this.paragraphStyle=new Js(this.editorAPI),this.characterStyle=new ze(this.editorAPI),this.mediaConnector=new Bs(this.editorAPI),this.fontConnector=new Ls(this.editorAPI),this.componentConnector=new rr(this.editorAPI),this.dataConnector=new ds(this.editorAPI,this.dataItemMappingTools),this.dataSource=new ls(this.editorAPI,this.dataItemMappingTools),this.connector=new hs(this.editorAPI,this.localConfig),this.variable=new Ys(this.editorAPI,this.dataItemMappingTools),this.font=new Ns(this.editorAPI),this.experiment=new Fs(this.editorAPI),this.canvas=new Ce(this.editorAPI),this.shape=new Se(this.editorAPI),this.colorConversion=new We(this.editorAPI),this.info=new Rs,this.clipboard=new je(this.editorAPI),this.brandKit=new Ke(this.editorAPI,this),this.next=new Zs(this.config,this.connection,this.editorAPI),this.configuration.setValue(q.GraFxStudioSdkVersion,Ee.version),this.configuration.setValue(q.GraFxStudioDocumentType,this.config.documentType||we.template),this.configuration.updateStudioOptions(this.config.studioOptions||An),this.configuration.setValue(q.QueryCallCacheEnabled,((e=this.config.enableQueryCallCache)==null?void 0:e.toString())||"false")},this.setConnection=e=>{at=e},this.config=Ae.createRuntimeConfig(o),this.connection=at,this.editorAPI=at==null?void 0:at.promise.then(e=>e),this.action=new Je(this.editorAPI),this.layout=new Vs(this.editorAPI),this.frame=new Ms(this.editorAPI),this.shape=new Se(this.editorAPI),this.barcode=new $e(this.editorAPI),this.component=new nr(this.editorAPI),this.undoManager=new Ws(this.editorAPI,this),this.connector=new hs(this.editorAPI,this.localConfig),this.mediaConnector=new Bs(this.editorAPI),this.fontConnector=new Ls(this.editorAPI),this.componentConnector=new rr(this.editorAPI),this.dataConnector=new ds(this.editorAPI,this.dataItemMappingTools),this.dataSource=new ls(this.editorAPI,this.dataItemMappingTools),this.animation=new Ue(this.editorAPI),this.document=new gs(this.editorAPI),this.configuration=new er(this.editorAPI,this.localConfig),this.variable=new Ys(this.editorAPI,this.dataItemMappingTools),this.utils=new qs(this.editorAPI,this.localConfig),this.subscriber=new kn(this.config,this.localConfig),this.tool=new js(this.editorAPI),this.page=new Ts(this.editorAPI),this.debug=new us(this.editorAPI),this.textSelection=new xs(this.editorAPI),this.colorStyle=new Ye(this.editorAPI),this.gradientStyle=new sr(this.editorAPI),this.paragraphStyle=new Js(this.editorAPI),this.characterStyle=new ze(this.editorAPI),this.font=new Ns(this.editorAPI),this.experiment=new Fs(this.editorAPI),this.canvas=new Ce(this.editorAPI),this.colorConversion=new We(this.editorAPI),this.info=new Rs,this.clipboard=new je(this.editorAPI),this.next=new Zs(this.config,this.connection,this.editorAPI),this.enabledNextSubscribers=this.config.enableNextSubscribers,this.brandKit=new Ke(this.editorAPI,this)}}var ar=(r=>(r.top="top",r.left="left",r.right="right",r.bottom="bottom",r.topLeft="topLeft",r.topRight="topRight",r.bottomLeft="bottomLeft",r.bottomRight="bottomRight",r))(ar||{}),ir=(r=>(r.horizontal="horizontal",r.vertical="vertical",r))(ir||{}),or=(r=>(r.easeIn="easeIn",r.easeOut="easeOut",r.easeInOut="easeInOut",r))(or||{}),cr=(r=>(r.quadratic="Quadratic",r.cubic="Cubic",r.quartic="Quartic",r.quintic="Quintic",r.sine="Sine",r.exponential="Exponential",r.circular="Circular",r.elastic="Elastic",r.bounce="Bounce",r.back="Back",r))(cr||{}),hr=(r=>(r.bounce="bounce",r.flash="flash",r.headshake="headShake",r.heartbeat="heartbeat",r.pulse="pulse",r.rubberBand="rubberBand",r.vertical="vertical",r.horizontal="horizontal",r.swing="swing",r.tada="tada",r))(hr||{}),dr=(r=>(r.preview="preview",r.normal="normal",r))(dr||{}),lr=(r=>(r.linear="linear",r))(lr||{}),ur=(r=>(r.local="linearLocal",r.linearBrandKit="linearBrandKit",r))(ur||{}),gr=(r=>(r.Square="square",r.Line="line",r))(gr||{}),yr=(r=>(r.thumbnail="thumbnail",r.highest="highest",r.medium="medium",r))(yr||{}),pr=(r=>(r.BOLD="Bold",r.ITALIC="Italic",r.REGULAR="Regular",r))(pr||{}),wr=(r=>(r.LEFT="left",r.CENTER="center",r.RIGHT="right",r.JUSTIFY="justify",r))(wr||{}),Cr=(r=>(r.TOP="top",r.CENTER="center",r.BOTTOM="bottom",r))(Cr||{}),mr=(r=>(r.TO_LOWER_CASE="lowercase",r.TO_UPPER_CASE="uppercase",r.NORMAL="normal",r))(mr||{}),fr=(r=>(r.SUPERSCRIPT="superscript",r.SUBSCRIPT="subscript",r.NORMAL="normal",r))(fr||{}),Sr=(r=>(r.none="none",r.bullet="bullet",r.number="number",r))(Sr||{}),br=(r=>(r.STYLE="textStyle",r.PROPERTIES="textProperties",r.APPEARANCE="appearance",r))(br||{}),vr=(r=>(r.PARAGRAPH="paragraphStyleId",r.CHARACTER="characterStyleId",r.FONT_FAMILY="fontKey",r.FONT_STYLE="fontStyle",r.FONT_SIZE="fontSize",r.LETTER_SPACING="letterSpacing",r.LINE_HEIGHT="lineHeight",r.TEXT_ALIGN="textAlign",r.VERTICAL_ALIGN="verticalAlign",r.TYPOGRAPHIC_CASE="typographicCase",r.SUB_SUPER_SCRIPT="subSuperScript",r.UNDERLINE="underline",r.LINE_THROUGH="lineThrough",r.FILL_COLOR="fillColor",r.COLOR="color",r.FILL_COLOR_APPLIED="fillColorApplied",r.STROKE_COLOR="strokeColor",r.STROKE_COLOR_APPLIED="strokeColorApplied",r.BACKGROUND_COLOR="backgroundColor",r.BACKGROUND_COLOR_APPLIED="backgroundColorApplied",r.DROP_SHADOW_COLOR="dropShadowColor",r.BLEND_MODE="blendMode",r.OPACITY="opacity",r.TRACKING_RIGHT="trackingRight",r.BASELINE_SHIFT="baselineShiftValue",r.STROKE_WIDTH="strokeWidth",r.MARKED_LIST_TYPE="markedListType",r.MARKED_LIST_GROUP="markedListGroup",r.MARKED_LIST_LEVEL="markedListLevel",r))(vr||{}),Ar=(r=>(r.arabic="arabic",r.romanUpperCase="romanUpperCase",r.romanLowerCase="romanLowerCase",r.latinUpperCase="latinUpperCase",r.latinLowerCase="latinLowerCase",r))(Ar||{}),Ir=(r=>(r.none="none",r.dash="dash",r.dot="dot",r.colon="colon",r.roundBracket="roundBracket",r))(Ir||{}),Pr=(r=>(r.selectedLayoutChanged="selectedLayoutChanged",r.frameMoved="frameMoved",r.pageSizeChanged="pageSizeChanged",r.documentLoaded="documentLoaded",r.variableValueChanged="variableValueChanged",r))(Pr||{}),Er=(r=>(r.ellipse="ellipse",r.rectangle="rectangle",r.polygon="polygon",r))(Er||{}),Or=(r=>(r.all="all",r.only="only",r.none="none",r))(Or||{}),Dr=(r=>(r.normal="normal",r.textEdit="textEdit",r.customCrop="customCrop",r.frameSubjectArea="frameSubjectArea",r.perAssetCrop="perAssetCrop",r.gradient="gradient",r))(Dr||{}),Fr=(r=>(r.url="url",r.grafx="grafx",r.local="local",r))(Fr||{});const na=Object.freeze(Object.defineProperty({__proto__:null,ConnectorRegistrationSource:Fr},Symbol.toStringTag,{value:"Module"}));h.ActionAsyncError=Re,h.ActionEditorEvent=Pr,h.Alignment=wr,h.AnchorTargetEdgeType=Ds,h.AnchorTargetType=Os,h.AuthCredentialsTypeEnum=as,h.AuthRefreshTypeEnum=is,h.AutoGrowDirection=ps,h.BarcodeCharacterSet=wt,h.BarcodeErrorCorrectionLevel=Pt,h.BarcodeSourceTypeEnum=ms,h.BarcodeType=$,h.BarcodeValidationResult=ke,h.BasicAnimationsEmphasisStyles=hr,h.BlendMode=vs,h.Case=mr,h.ColorType=oe,h.ColorUsageType=qe,h.ComponentFitEnum=ys,h.ComponentPreviewType=yr,h.ComponentSourceTypeEnum=ws,h.ConnectorConfigContextType=es,h.ConnectorConfigValueType=ts,h.ConnectorEventType=ns,h.ConnectorHttpError=Be,h.ConnectorMapping=Nn,h.ConnectorMappingDirection=rs,h.ConnectorMappingSource=ss,h.ConnectorRegistrationSource=Dt,h.ConnectorStateType=he,h.ConnectorSupportedAuth=cs,h.ConnectorType=Ze,h.ConstraintMode=xe,h.CornerRadiusType=Or,h.CropType=fe,h.DataRowAsyncError=Ve,h.DataSourceVariableDisplayOptionsType=Hs,h.DataSourceVariableSourceType=ve,h.Day=Us,h.DeprecatedMediaConnectorDownloadType=ce,h.DeprecatedMediaType=Et,h.DocumentIssueTypeEnum=Me,h.DocumentType=we,h.DownloadFormats=zs,h.EaseTypes=or,h.EngineEditModeType=Dr,h.EnvironmentType=ue,h.FitMode=As,h.FitModePosition=Is,h.FlowDirection=Ss,h.FontPreviewFormat=gr,h.FontWeights=pr,h.FrameAnchorTarget=Jn,h.FrameAnchorType=Es,h.FrameEditingMode=Ne,h.FramePropertyNames=$s,h.FrameTypeEnum=Cs,h.GradientType=lr,h.GradientUsageType=ur,h.GrafxTokenAuthCredentials=Rn,h.ImageSourceTypeEnum=Kt,h.LayoutIntent=He,h.LayoutPropertyNames=Ks,h.LayoutType=_e,h.Locale=ks,h.MarkedListType=Sr,h.MeasurementUnit=Ge,h.MediaDownloadIntent=be,h.MediaDownloadType=le,h.MediaType=Ot,h.Next=na,h.NumberListFormat=Ar,h.NumberListSeparatorSymbol=Ir,h.PageAnchorTarget=Tn,h.PositionEnum=Y,h.RefreshedAuthCredendentials=Vn,h.Scripting=fr,h.SelectedTextStyleSections=br,h.SelectedTextStyles=vr,h.ShakeDirections=ir,h.ShapeType=Er,h.SlideDirections=ar,h.SortBy=Qe,h.SortOrder=Xe,h.TextDirection=fs,h.TextPosition=Cr,h.ToolType=K,h.TweenTypes=cr,h.UpdateZIndexMethod=Ps,h.UploadAssetValidationError=os,h.UploadAssetValidationErrorType=me,h.VariableType=zt,h.VariableValueConstrainsViolationError=Te,h.VariableVisibilityOperator=_s,h.VariableVisibilityTargetType=Gs,h.VariableVisibilityType=Ft,h.VerticalAlign=bs,h.ViewMode=dr,h.WellKnownConfigurationKeys=q,h.default=ra,h.grafxMediaConnectorRegistration=Mn,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
68
|
+
</html>`;s.srcdoc=r};let oe=null;const Lr=(s,o,e,t="chili-editor",n,r)=>{oe&&window.removeEventListener("message",oe);const c=`#${t}`,d=document.createElement("iframe");d.setAttribute("srcdoc"," "),d.setAttribute("title","Chili-Editor"),d.setAttribute("style","width: 100%; height: 100%;"),d.setAttribute("frameBorder","0"),d.setAttribute("referrerpolicy","origin");const u=()=>{const w=document.querySelector(c);if(w){w==null||w.appendChild(d),d.addEventListener("error",()=>{const p=new Error("Failed to setup frame: iframe failed to load");r==null||r(p)},{capture:!0,once:!0});try{Fr(d,s,n)}catch(p){p instanceof Error?r==null||r(p):r==null||r(new Error(`Failed to setup frame: ${p}`))}}};document.readyState==="complete"||document.readyState==="interactive"?u():document.addEventListener("DOMContentLoaded",()=>{u()}),oe=w=>{var p;if(w.source===d.contentWindow&&((p=w.data)==null?void 0:p.type)==="iframe-error"){const v=w.data.error,S=new Error(v.message||"Failed to setup frame: error in iframe");r==null||r(S)}},window.addEventListener("message",oe),e(Dr({iframe:d,methods:{actionsChanged:o.onActionsChanged,stateChanged:o.onStateChanged,documentLoaded:o.onDocumentLoaded,authExpired:o.onAuthExpired,viewportRequested:o.onViewportRequested,selectedFramesContent:o.onSelectedFramesContentChanged,selectedFramesLayout:o.onSelectedFramesLayoutChanged,allFramesLayout:o.onFramesLayoutChanged,selectedLayoutProperties:o.onSelectedLayoutPropertiesChanged,openLayoutPropertiesPanel:o.onPageSelectionChanged,selectedLayoutUnit:o.onSelectedLayoutUnitChanged,scrubberPositionChanged:o.onScrubberPositionChanged,frameAnimationsChanged:o.onFrameAnimationsChanged,selectedToolChanged:o.onSelectedToolChanged,variableListChanged:o.onVariableListChanged,undoStackStateChanged:o.onUndoStateChanged,selectedLayoutFramesChanged:o.onSelectedLayoutFramesChanged,selectedTextStyleChanged:o.onSelectedTextStyleChanged,colorsChanged:o.onColorsChanged,paragraphStylesChanged:o.onParagraphStylesChanged,characterStylesChanged:o.onCharacterStylesChanged,fontFamiliesChanged:o.onFontFamiliesChanged,selectedLayoutId:o.onSelectedLayoutIdChanged,layoutListChanged:o.onLayoutsChanged,connectorEvent:o.onConnectorEvent,connectorsChanged:o.onConnectorsChanged,zoomChanged:o.onZoomChanged,pageSnapshotInvalidated:o.onPageSnapshotInvalidated,pagesChanged:o.onPagesChanged,pageSizeChanged:o.onPageSizeChanged,shapeCornerRadiusChanged:o.onShapeCornerRadiusChanged,cropActiveFrameIdChanged:o.onCropActiveFrameIdChanged,asyncError:o.onAsyncError,viewModeChanged:o.onViewModeChanged,barcodeValidationChanged:o.onBarcodeValidationChanged,selectedPageIdChanged:o.onSelectedPageIdChanged,dataSourceIdChanged:o.onDataSourceIdChanged,injectedDataChanged:o.onInjectedDataChanged,documentIssueListChanged:o.onDocumentIssueListChanged,customUndoDataChanged:o.onCustomUndoDataChanged,engineEditingModeChanged:o.onEngineEditModeChanged,brandKitMediaChanged:o.onBrandKitMediaChanged}}))};var q=(s=>(s.GraFxStudioEnvironmentApiUrl="ENVIRONMENT_API",s.GraFxStudioSdkVersion="SDK_VERSION",s.GraFxStudioDocumentType="DOCUMENT_TYPE",s.GraFxStudioTemplateId="TEMPLATE_ID",s.GraFxStudioAuthToken="GRAFX_AUTH_TOKEN",s.QueryCallCacheEnabled="ENABLE_QUERY_CALL_CACHE",s))(q||{}),Re=(s=>(s.full="full",s.followConstraints="followConstraints",s))(Re||{});const Nr={shortcutOptions:{debugPanel:{enabled:!1},ellipse:{enabled:!1},hand:{enabled:!1},temporaryHand:{enabled:!1},image:{enabled:!1},polygon:{enabled:!1},rectangle:{enabled:!1},select:{enabled:!1},text:{enabled:!1},zoom:{enabled:!1},copyPaste:{enabled:!1},viewMode:{enabled:!1},componentGrid:{enabled:!1}},frameEditingMode:"full"};var Me=(s=>(s.overflow="overflow",s.fontLoading="fontLoading",s.actionRegister="actionRegister",s.actionExecution="actionExecution",s.actionCircular="actionCircular",s))(Me||{}),Ce=(s=>(s.project="project",s.template="template",s.component="component",s))(Ce||{});class Ve{constructor(o,e,t,n){this.type="action",this.message=o,this.id=e,this.event=t,this.eventChain=n}}class Be{constructor(o,e,t){this.type="dataRow",this.count=o,this.message=e,this.exceptions=t}}class Te extends Error{constructor(o,e,t){super(e,t),this.statusCode=o}}class Je extends Error{constructor(o,e,t){super(e,t),this.context=o}}const Rr=404075,Mr=403032;function wt(s){const o=s.error??"Yikes, something went wrong",e={cause:{name:String(s.status),message:s.error??"Yikes, something went wrong"}};if(s.status===Rr){const n=JSON.parse(s.data).statusCode;throw new Te(n,o,e)}else throw new Error(o,e)}function Vr(s){const o=[/DateVariable '([^']+)' should not be part of excludedDays, ".*" was given/,/DateVariable '([^']+)' expects \$date to be > startDate:.*$/,/DateVariable '([^']+)' expects \$date to be < endDate:.*$/,/NumberVariable '([^']+)' expects \$extractedValue to be >= .+$/,/NumberVariable '([^']+)' expects \$extractedValue to be <= .+$/];for(const e of o)if(s.match(e))return{valid:!0};return{valid:!1}}function Br(s,o){if(s.status===Mr&&s.error){const e=s.error;if(Vr(e).valid)throw new Je(o,e,{cause:{name:String(s.status),message:e}})}}function Tr(s){wt(s)}function i(s,o){let e=!0,t=!1,n=Tr;typeof o=="function"?(t=!0,n=o):typeof o=="boolean"&&(e=o);try{s.success||(n(s),t&&wt(s));const r=s.data&&e;return{...s,parsedData:r?JSON.parse(s.data):s.data}}catch(r){throw console.error(r),r}}class Ue{constructor(o){g(this,R);this.getAll=async()=>(await a(this,R)).getActions().then(t=>i(t)),this.getById=async e=>(await a(this,R)).getActionById(e).then(n=>i(n)),this.create=async()=>(await a(this,R)).createAction().then(t=>i(t)),this.duplicate=async e=>(await a(this,R)).duplicateAction(e).then(n=>i(n)),this.remove=async e=>(await a(this,R)).removeAction(e).then(n=>i(n)),this.update=async(e,t)=>(await a(this,R)).updateAction(e,JSON.stringify(t)).then(r=>i(r)),this.rename=async(e,t)=>this.update(e,{name:t}),this.updateScript=async(e,t)=>this.update(e,{script:t}),this.updateTriggers=async(e,t)=>this.update(e,{triggers:t}),this.move=async(e,t)=>(await a(this,R)).moveActions(e,t).then(r=>i(r)),this.setTypeError=async(e,t)=>this.update(e,{hasTypeError:t}),this.disable=async()=>(await a(this,R)).disableActions().then(t=>i(t)),this.enable=async()=>(await a(this,R)).enableActions().then(t=>i(t)),this.enableForComponents=async e=>(await a(this,R)).enableComponentActions(e).then(n=>i(n)),y(this,R,o)}}R=new WeakMap;class ke{constructor(o){g(this,M);this.getAllOnSelectedLayout=async()=>(await a(this,M)).getAnimationsOnSelectedLayout().then(t=>i(t)),this.getByFrameId=async(e,t)=>(await a(this,M)).getAnimationByFrameId(e,t).then(r=>i(r)),this.getByLayoutId=async e=>(await a(this,M)).getAnimationsByLayoutId(e).then(n=>i(n)),this.setFrameAnimation=async e=>(await a(this,M)).setFrameAnimation(JSON.stringify(e)).then(n=>i({...n,data:JSON.stringify(e)})),this.play=async()=>(await a(this,M)).playAnimation().then(t=>i(t)),this.pause=async()=>(await a(this,M)).pauseAnimation().then(t=>i(t)),this.setScrubberPosition=async e=>(await a(this,M)).setScrubberPosition(e).then(n=>i(n)),this.setDuration=async e=>(await a(this,M)).setAnimationDuration(e).then(n=>i(n)),this.resetFrameAnimation=async e=>(await a(this,M)).resetFrameAnimation(e).then(n=>i(n)),this.reset=async()=>(await a(this,M)).resetAnimation().then(t=>i(t)),y(this,M,o)}}M=new WeakMap;var j=(s=>(s.code39="code39",s.code93="code93",s.code128="code128",s.dataMatrix="dataMatrix",s.ean13="ean13",s.ean8="ean8",s.qr="qr",s.upca="upca",s.upce="upce",s.gs1128="gs1128",s))(j||{}),Et=(s=>(s.low="low",s.medium="medium",s.quartile="quartile",s.high="high",s))(Et||{}),Ct=(s=>(s.utf8="utf8",s.iso8859_1="iso8859_1",s.code128a="code128a",s.code128b="code128b",s.code128c="code128c",s))(Ct||{}),Ge=(s=>(s.success="success",s.empty="empty",s.invalidLength="invalidLength",s.invalidCharacters="invalidCharacters",s.invalidChecksum="invalidChecksum",s.invalidUPCE="invalidUPCE",s.otherError="otherError",s))(Ge||{}),_e=(s=>(s.px="px",s.mm="mm",s.cm="cm",s.inch="inch",s.pt="pt",s))(_e||{}),Y=(s=>(s.top="top",s.right="right",s.bottom="bottom",s.left="left",s))(Y||{}),He=(s=>(s.top="top",s.child="child",s))(He||{}),xe=(s=>(s.print="print",s.digitalStatic="digitalStatic",s.digitalAnimated="digitalAnimated",s))(xe||{}),$e=(s=>(s.locked="locked",s.range="range",s.none="none",s))($e||{});class je{constructor(o){g(this,z);this.setBarcodeProperties=async(e,t)=>(await a(this,z)).setBarcodeProperties(e,JSON.stringify(t)).then(r=>i(r)),this.setEnableBackground=async(e,t)=>{const n={enableBackground:t};return this.setBarcodeProperties(e,n)},this.setBackgroundColor=async(e,t)=>{const n={backgroundColor:t};return this.setBarcodeProperties(e,n)},this.setEnableBars=async(e,t)=>{const n={enableBars:t};return this.setBarcodeProperties(e,n)},this.setBarColor=async(e,t)=>{const n={barColor:t};return this.setBarcodeProperties(e,n)},this.setBarcodeSource=async(e,t)=>(await a(this,z)).setBarcodeSource(e,JSON.stringify(t)).then(r=>i(r)),this.removeBarcodeSource=async e=>(await a(this,z)).setBarcodeSource(e,null).then(n=>i(n)),this.setEnableText=async(e,t)=>{const n={enableText:t};return this.setBarcodeProperties(e,n)},this.setBarHeight=async(e,t)=>{const n={barHeight:t};return this.setBarcodeProperties(e,n)},this.setMagnification=async(e,t)=>{const n={magnification:t};return this.setBarcodeProperties(e,n)},this.setQuietZoneValue=async(e,t,n)=>{const r=n?{left:n===Y.left?t:void 0,top:n===Y.top?t:void 0,right:n===Y.right?t:void 0,bottom:n===Y.bottom?t:void 0}:{left:t,top:t,right:t,bottom:t};return(await a(this,z)).setBarcodeProperties(e,JSON.stringify({quietZone:r})).then(d=>i(d))},this.setAreQuietZoneValuesCombined=async(e,t)=>{const n={areQuietZoneValuesCombined:t};return(await a(this,z)).setBarcodeProperties(e,JSON.stringify({quietZone:n})).then(c=>i(c))},this.setErrorCorrectionLevel=async(e,t)=>(await a(this,z)).setBarcodeProperties(e,JSON.stringify({errorCorrectionLevel:t})).then(r=>i(r)),this.setCharacterSet=async(e,t)=>(await a(this,z)).setBarcodeProperties(e,JSON.stringify({characterSet:t})).then(r=>i(r)),this.setDrawLightMarginIndicator=async(e,t)=>{const n={drawStartStopChars:t};return this.setBarcodeProperties(e,n)},this.setDrawStartStopChars=async(e,t)=>{const n={drawStartStopChars:t};return this.setBarcodeProperties(e,n)},this.getBarcodeConfigationOptions=e=>{let t=!0,n=!0,r=!0,c,d,u=!1,w=!1,p=!1;switch(e){case j.qr:c=[Ct.iso8859_1,Ct.utf8],d=[Et.low,Et.medium,Et.quartile,Et.high];case j.dataMatrix:t=!1,n=!1,r=!1,u=!0;break;case j.ean13:t=!1,w=!0;break;case j.ean8:w=!0;case j.upca:case j.upce:t=!1;break;case j.code128:case j.gs1128:c=[Ct.code128a,Ct.code128b,Ct.code128c];break;case j.code39:p=!0;break}return{allowEnableMagnification:r,allowBarHeight:n,allowQuietZone:!0,allowedCharacterSets:c,allowedErrorCorrectionLevels:d,allowToggleText:t,quietZoneAlwaysCombined:u,allowToggleLightMarginIndicator:w,allowToggleDrawStartAndEndChar:p}},y(this,z,o)}}z=new WeakMap;function Jr(s){const o=s.fontFamilies.length>0?String(s.fontFamilies[0].connectorId):"",e={id:s.id??"",name:s.name??"",dateCreated:"",lastModifiedDate:s.version??"",fonts:s.fontFamilies,colors:s.colors,characterStyles:s.characterStyles,paragraphStyles:s.paragraphStyles,media:s.media,themes:s.themes};return{id:s.id??"",name:s.name??"",fontConnectorId:o,brandKit:e}}function Ur(s){return{id:s.id??"",version:s.version??"",name:s.name??"",colors:s.colors,gradients:s.gradients,fonts:s.fontFamilies,characterStyles:s.characterStyles,paragraphStyles:s.paragraphStyles,media:s.media,themes:s.themes}}let ze=(kn=class{constructor(o,e){g(this,P);this.getId=async()=>(await a(this,P)).getBrandKitId().then(n=>i(n)),this.getVersion=async()=>(await a(this,P)).getBrandKitVersion().then(n=>i(n)),this.getName=async()=>(await a(this,P)).getBrandKitName().then(n=>i(n)),this.rename=async t=>(await a(this,P)).renameBrandKit(t).then(r=>i(r)),this.updateIdAndVersion=async(t,n)=>(await a(this,P)).updateBrandKitIdAndVersion(t,n).then(c=>i(c)),this.get=async()=>{const n=await(await a(this,P)).getBrandKit(),r=i(n),c=r.parsedData;if(c==null)throw new Error("Brand kit response has no data");return{...r,parsedData:Jr(c)}},this.getAllMedia=async()=>(await a(this,P)).getAllBrandKitMedia().then(n=>i(n)),this.addMedia=async(t,n,r)=>(await a(this,P)).addBrandKitMedia(t,n,r).then(d=>i(d)),this.updateMedia=async(t,n,r)=>(await a(this,P)).updateBrandKitMedia(t,n,r).then(d=>i(d)),this.renameMedia=async(t,n)=>(await a(this,P)).renameBrandKitMedia(t,n).then(c=>i(c)),this.removeMedia=async t=>(await a(this,P)).removeBrandKitMedia(t).then(r=>i(r)),this.remove=async()=>{const n=(await this.colorStyleController.getAll()).parsedData||[],c=(await this.gradientStyleController.getAll()).parsedData||[],u=(await this.paragraphStyleController.getAll()).parsedData||[],p=(await this.characterStyleController.getAll()).parsedData||[],S=(await this.fontController.getFontFamilies()).parsedData||[],N=(await this.getAllMedia()).parsedData||[];await this.undoManagerController.record("brandKit.remove",async O=>{for(const b of n)await O.colorStyle.remove(b.id);for(const b of c)await O.gradientStyle.remove(b.id);for(const b of u)await O.paragraphStyle.remove(b.id);for(const b of p)await O.characterStyle.remove(b.id);for(const b of S)await O.font.removeFontFamily(b.id);for(const b of N)await this.removeMedia(b.name)})},this.set=async t=>{const r=await(await a(this,P)).setBrandKit(JSON.stringify(t.brandKit)),c=i(r),d=c.parsedData;if(d==null)throw new Error("Brand kit set response has no data");return{...c,parsedData:Ur(d)}},this.isAutoSync=async()=>(await a(this,P)).isBrandKitAutoSync().then(n=>i(n)),this.enableAutoSync=async t=>(await a(this,P)).enableBrandKitAutoSync(t).then(r=>i(r)),y(this,P,o),this.colorStyleController=e.colorStyle,this.gradientStyleController=e.gradientStyle,this.fontController=e.font,this.mediaController=e.mediaConnector,this.paragraphStyleController=e.paragraphStyle,this.characterStyleController=e.characterStyle,this.undoManagerController=e.undoManager}},P=new WeakMap,kn);class me{constructor(o){g(this,ot);this.zoomToPage=async(e,t,n,r,c)=>(e!==void 0&&console.warn("id has no effect and will be deprecated in the future"),(await a(this,ot)).zoomToPage(t,n,r,c).then(u=>i(u))),this.getZoomPercentage=async()=>(await a(this,ot)).getZoomPercentage().then(t=>i(t)),this.setZoomPercentage=async e=>(await a(this,ot)).setZoomPercentage(e).then(n=>i(n)),this.setViewMode=async e=>(await a(this,ot)).setViewMode(e).then(n=>i(n)),y(this,ot,o)}}ot=new WeakMap;class Ke{constructor(o){g(this,U);this.getAll=async()=>(await a(this,U)).getCharacterStyles().then(t=>i(t)),this.getById=async e=>(await a(this,U)).getCharacterStyleById(e).then(n=>i(n)),this.create=async()=>(await a(this,U)).createCharacterStyle().then(t=>i(t)),this.update=async(e,t)=>(await a(this,U)).updateCharacterStyle(e,JSON.stringify(t)).then(r=>i(r)),this.remove=async e=>(await a(this,U)).removeCharacterStyle(e).then(n=>i(n)),this.duplicate=async e=>(await a(this,U)).duplicateCharacterStyle(e).then(n=>i(n)),this.rename=async(e,t)=>(await a(this,U)).renameCharacterStyle(e,t).then(r=>i(r)),this.move=async(e,t)=>(await a(this,U)).moveCharacterStyles(e,t).then(r=>i(r)),y(this,U,o)}}U=new WeakMap;class We{constructor(o){g(this,ct);this.copyFrames=async e=>{const n=await(await a(this,ct)).copyFrames(e);return n.data&&await navigator.clipboard.writeText(n.data),i(n)},this.cutFrames=async e=>{const n=await(await a(this,ct)).cutFrames(e);return n.data&&await navigator.clipboard.writeText(n.data),i(n)},this.pasteFrames=async()=>{const e=await a(this,ct),t=await navigator.clipboard.readText(),n=await e.pasteFrames(t);return i(n)},this.getContentType=async()=>{const e=await a(this,ct),t=await navigator.clipboard.readText(),n=await e.getClipboardContentType(t);return i(n)},y(this,ct,o)}}ct=new WeakMap;class qe{constructor(o){g(this,qt);this.convertToRgb=async e=>(await a(this,qt)).colorToRgb(JSON.stringify(e)).then(n=>i(n)),y(this,qt,o)}}qt=new WeakMap;var ce=(s=>(s.rgb="rgb",s.hex="hex",s.cmyk="cmyk",s.gray="gray",s.hsl="hsl",s.spot="spot",s.spotCMYK="spotCMYK",s.spotRGB="spotRGB",s.spotHEX="spotHEX",s))(ce||{}),Ye=(s=>(s.local="local",s.brandKit="brandKit",s.stylekit="brandKit",s))(Ye||{});class Ze{constructor(o){g(this,k);this.getAll=async()=>(await a(this,k)).getColors().then(t=>i(t)),this.getById=async e=>(await a(this,k)).getColorById(e).then(n=>i(n)),this.create=async()=>(await a(this,k)).createColor().then(t=>i(t)),this.duplicate=async e=>(await a(this,k)).duplicateColor(e).then(n=>i(n)),this.move=async(e,t)=>(await a(this,k)).moveColors(e,t).then(r=>i(r)),this.rename=async(e,t)=>(await a(this,k)).renameColor(e,t).then(r=>i(r)),this.update=async(e,t)=>{const n=await a(this,k),r=t;return r.type===ce.spot&&(r.type=ce.spotCMYK),n.updateColor(e,JSON.stringify(r)).then(c=>i(c))},this.remove=async e=>(await a(this,k)).removeColor(e).then(n=>i(n)),y(this,k,o)}}k=new WeakMap;var Dt=(s=>(s[s.file=0]="file",s[s.collection=1]="collection",s))(Dt||{}),he=(s=>(s.LowResolutionWeb="lowresWeb",s.HighResolutionWeb="highresWeb",s))(he||{}),Ot=(s=>(s.file="file",s.collection="collection",s))(Ot||{}),Qe=(s=>(s.media="media",s.fonts="fonts",s.data="data",s.components="components",s))(Qe||{}),Xe=(s=>(s.name="name",s.path="relativePath",s.id="id",s))(Xe||{}),ts=(s=>(s.ascending="asc",s.descending="desc",s))(ts||{}),es=(s=>(s.text="text",s.boolean="boolean",s.number="number",s))(es||{}),ss=(s=>(s.query="query",s.upload="upload",s))(ss||{}),Ft=(s=>(s.url="url",s.grafx="grafx",s.local="local",s))(Ft||{});class kr{constructor(o,e,t,n="engineToConnector"){this.direction="engineToConnector",this.name=o,this.direction=n,e==="var"?this.value=`${e}.${t}`:this.value=t}}var ns=(s=>(s.variable="var",s.value="value",s))(ns||{}),rs=(s=>(s.engineToConnector="engineToConnector",s.connectorToEngine="connectorToEngine",s))(rs||{}),de=(s=>(s.loading="loading",s.loaded="loaded",s.running="running",s.ready="ready",s.error="error",s))(de||{}),as=(s=>(s.stateChanged="stateChanged",s.authChanged="authChanged",s.reloadRequired="reloadRequired",s.unloaded="unloaded",s))(as||{});const Gr={url:"grafx-media.json",source:"local"};class _r{constructor(o,e){this.type="grafxToken",this.token=o,this.headers=e}}class Hr{constructor(o){this.type="refreshed",this.headers=o}}var is=(s=>(s.grafxToken="grafxToken",s.refreshed="refreshed",s))(is||{}),os=(s=>(s.grafxToken="grafxToken",s.any="any",s))(os||{}),fe=(s=>(s.minDimension="minDimension",s))(fe||{});class cs extends Error{constructor(o,e){super(o),this.type=e}}var hs=(s=>(s.StaticKey="staticKey",s.OAuth2ClientCredentials="oAuth2ClientCredentials",s.OAuth2AuthorizationCode="oAuth2AuthorizationCode",s.OAuth2ResourceOwnerPassword="oAuth2ResourceOwnerPassword",s.OAuth2JwtBearer="oAuth2JwtBearer",s.None="none",s))(hs||{});class le{constructor(){this.makeConnectorSourceForwardsCompatible=o=>{if(o.source!=Ft.grafx||this.isSourceMigrated(o))return o;let e=o.url;for(;e.endsWith("/");)e=e.substring(0,e.length-1);const t=e.split("/");return{id:t[t.length-1],source:Ft.grafx}},this.makeMultipleConnectorsBackwardsCompatible=(o,e)=>o.map(t=>this.makeSingleConnectorBackwardsCompatible(t,e)),this.makeSingleConnectorBackwardsCompatible=(o,e)=>o.source.source!=Ft.grafx?o:{id:o.id,name:o.name,iconUrl:o.iconUrl,source:this.makeConnectorSourceBackwardsCompatible(o.source,e)},this.makeConnectorSourceBackwardsCompatible=(o,e)=>{let t=e;for(;t!=null&&t.endsWith("/");)t=t.substring(0,t.length-1);return{url:`${t}/connectors/${o.id}`,source:Ft.grafx}},this.isSourceMigrated=o=>"id"in o}}let ds=(Gn=class{constructor(o,e){g(this,B);g(this,Nt);g(this,mt);this.getById=async t=>(await a(this,B)).getConnectorById(t).then(r=>i(r)).then(r=>{const c={...r,parsedData:null};return r.parsedData&&(c.parsedData=a(this,mt).makeSingleConnectorBackwardsCompatible(r.parsedData,a(this,Nt).get(q.GraFxStudioEnvironmentApiUrl))),c}),this.getAllByType=async t=>(await a(this,B)).getConnectors(t).then(r=>i(r)).then(r=>{const c={...r,parsedData:null};return r.parsedData&&(c.parsedData=a(this,mt).makeMultipleConnectorsBackwardsCompatible(r.parsedData,a(this,Nt).get(q.GraFxStudioEnvironmentApiUrl))),c}),this.register=async t=>{const n=await a(this,B),r=a(this,mt).makeConnectorSourceForwardsCompatible(t);return n.registerConnector(JSON.stringify(r)).then(c=>i(c))},this.unregister=async t=>(await a(this,B)).unregisterConnector(t).then(r=>i(r)),this.configure=async(t,n)=>{const r=await a(this,B);return await this.waitToBeReady(t),await n(new xr(t,r)),r.updateConnectorConfiguration(t).then(c=>i(c))},this.getState=async t=>(await a(this,B)).getConnectorState(t).then(r=>i(r)),this.getOptions=async t=>(await a(this,B)).getConnectorOptions(t).then(r=>i(r)),this.waitToBeReady=async(t,n=2e3)=>{let r=Math.max(n,500);r=Math.min(r,5e3);const c=100;let d=0;try{for(;d*c<r;){const u=await this.getState(t);if(u.success&&u.parsedData&&(u.parsedData.type===de.running||u.parsedData.type===de.ready))return i({data:null,success:!0,error:void 0,status:0,parsedData:void 0},!1);await new Promise(w=>setTimeout(w,c)),d++}}catch(u){return i({data:null,success:!1,error:`Error while getting connector state ${u}`,status:5e4,parsedData:void 0},!1)}return i({data:null,success:!1,error:"Timed out waiting for connector",status:5e4,parsedData:void 0},!1)},this.updateMappings=async(t,n)=>await this.configure(t,async r=>{const{parsedData:c}=await this.getMappings(t),d=(c==null?void 0:c.filter(p=>!n.some(v=>v.name===p.name&&v.direction===p.direction)))??[],u=n.filter(p=>p.name!==""&&p.value!==""),w=[...d,...u];await r.setMappings(w)}),this.applyMappings=async(t,n)=>await this.configure(t,async r=>{const c=n.filter(d=>d.name!==""&&d.value!=="");await r.setMappings(c)}),this.setHttpHeaders=async(t,n)=>(await a(this,B)).remoteConnectorAuthenticationSetHttpHeaders(t,JSON.stringify(n)).then(c=>i(c)),y(this,B,o),y(this,Nt,e),y(this,mt,new le)}async getMappings(o,e){return(await a(this,B)).getConnectorMappings(o).then(n=>i(n)).then(n=>{var r;return e?{...n,parsedData:(r=n.parsedData)==null?void 0:r.filter(c=>c.direction===e)}:n})}},B=new WeakMap,Nt=new WeakMap,mt=new WeakMap,Gn);class xr{constructor(o,e){g(this,ft);g(this,St);this.setOptions=async t=>a(this,St).setConnectorOptions(a(this,ft),JSON.stringify(t)).then(n=>i(n)),this.setMappings=async t=>{const n=await a(this,St).setConnectorMappings(a(this,ft),t.map(function(r){return JSON.stringify(r)}));return i(n)},this.setHttpHeader=async(t,n)=>a(this,St).connectorAuthenticationSetHttpHeader(a(this,ft),t,n).then(r=>i(r)),y(this,ft,o),y(this,St,e)}}ft=new WeakMap,St=new WeakMap;class ls{constructor(o,e){g(this,tt);g(this,Rt);this.getPageItemById=async(t,n,r,c={})=>{const u=await(await a(this,tt)).dataConnectorGetPageItemById(t,n,JSON.stringify(r),JSON.stringify(c)),w=i(u),p={...w,parsedData:null};return w.parsedData&&(p.parsedData={...w.parsedData,data:a(this,Rt).mapEngineToDataItem(w.parsedData.data)}),p},this.getConfigurationOptions=async t=>(await a(this,tt)).dataConnectorGetConfigurationOptions(t).then(r=>i(r)),this.getCapabilities=async t=>(await a(this,tt)).dataConnectorGetCapabilities(t).then(r=>i(r)),y(this,tt,o),y(this,Rt,e)}async getPage(o,e,t={}){const{previousPageToken:n,continuationToken:r}=e;if(n!=null&&r!=null)throw new Error('Invalid page config: "previousPageToken" and "continuationToken" are mutually exclusive. Provide only one to indicate navigation direction.');const d=await(await a(this,tt)).dataConnectorGetPage(o,JSON.stringify(e),JSON.stringify(t)),u=i(d),w={...u,parsedData:null};return u.parsedData&&(w.parsedData={...u.parsedData,data:u.parsedData.data.map(p=>a(this,Rt).mapEngineToDataItem(p))}),w}async getModel(o,e={}){return(await a(this,tt)).dataConnectorGetModel(o,JSON.stringify(e)).then(n=>i(n))}}tt=new WeakMap,Rt=new WeakMap;class us{constructor(o,e){g(this,ht);g(this,Yt);this.setDataSource=async t=>(await a(this,ht)).setDataSource(t).then(r=>i(r)),this.getDataSource=async()=>(await a(this,ht)).getDataSource().then(n=>i(n)),this.removeDataSource=async()=>(await a(this,ht)).removeDataSource().then(n=>i(n)),this.setDataRow=async t=>{const n=await a(this,ht),r=a(this,Yt).mapDataItemToEngine(t);return n.setDataRow(JSON.stringify(r)).then(c=>i(c))},y(this,ht,o),y(this,Yt,e)}}ht=new WeakMap,Yt=new WeakMap;class gs{constructor(o){g(this,dt);this.getAllLogs=async()=>(await a(this,dt)).getLogs().then(t=>i(t)),this.toggleDebugPanel=async()=>(await a(this,dt)).toggleDebugPanel().then(t=>i(t)),this.enableDebug=async()=>(await a(this,dt)).enableDebug().then(t=>i(t)),this.disableDebug=async()=>(await a(this,dt)).disableDebug().then(t=>i(t)),y(this,dt,o)}}dt=new WeakMap;class ys{constructor(o){g(this,bt);this.getCurrentState=async()=>(await a(this,bt)).getCurrentDocumentState().then(t=>i(t)),this.load=async(e,t={keepConnectors:!1})=>{const n=await a(this,bt),r=typeof e!="string"?JSON.stringify(e):e;return n.loadDocument(r,JSON.stringify(t)).then(c=>i(c))},this.createAndLoad=async e=>{const t=await a(this,bt),n=JSON.stringify(e);return t.createAndLoadDocument(n).then(r=>i(r))},y(this,bt,o)}}bt=new WeakMap;var ps=(s=>(s.resize="resize",s.scale="scale",s.scaleAndResize="scaleAndResize",s))(ps||{}),ws=(s=>(s.top="top",s.bottom="bottom",s.left="left",s.right="right",s))(ws||{}),zt=(s=>(s.url="url",s.variable="variable",s.connector="connector",s.brandKitMedia="brandKitMedia",s))(zt||{}),Cs=(s=>(s.connector="connector",s))(Cs||{}),ms=(s=>(s.text="text",s.image="image",s.shape="shape",s.barcode="barcode",s.component="component",s.componentGrid="componentGrid",s))(ms||{}),fs=(s=>(s.variable="variable",s.text="text",s))(fs||{}),Ss=(s=>(s.leftToRight="leftToRight",s.rightToLeft="rightToLeft",s.weak="weak",s))(Ss||{}),bs=(s=>(s.horizontal="horizontal",s.vertical="vertical",s.onPath="onPath",s))(bs||{}),vs=(s=>(s.top="top",s.bottom="bottom",s.middle="middle",s.justify="justify",s))(vs||{}),Is=(s=>(s.normal="normal",s.screen="screen",s.overlay="overlay",s.darken="darken",s.lighten="lighten",s.colorDodge="colorDodge",s.colorBurn="colorBurn",s.hardLight="hardLight",s.softLight="softLight",s.difference="difference",s.exclusion="exclusion",s.multiply="multiply",s.hue="hue",s.saturation="saturation",s.color="color",s.luminosity="luminosity",s))(Is||{}),As=(s=>(s.fill="fill",s.fit="fit",s.smartCrop="smartCrop",s.manualCrop="manualCrop",s))(As||{}),Ps=(s=>(s.topLeft="topLeft",s.topCenter="topCenter",s.topRight="topRight",s.centerLeft="centerLeft",s.center="center",s.centerRight="centerRight",s.bottomLeft="bottomLeft",s.bottomCenter="bottomCenter",s.bottomRight="bottomRight",s))(Ps||{}),Es=(s=>(s.bringToFront="bringToFront",s.sendToBack="sendToBack",s.bringForward="bringForward",s.sendBackward="sendBackward",s))(Es||{}),Ds=(s=>(s.relative="relative",s.start="start",s.end="end",s.startAndEnd="startAndEnd",s.center="center",s))(Ds||{}),Os=(s=>(s.page="page",s.frame="frame",s))(Os||{}),Fs=(s=>(s.start="start",s.end="end",s.center="center",s))(Fs||{});class $r{constructor(){this.type="page"}}class jr{constructor(o,e){this.type="frame",this.frameId=o,this.edge=e}}var Se=(s=>(s.frameCrop="frameCrop",s.assetCrop="assetCrop",s))(Se||{}),Ls=(s=>(s.v1="v1",s.v2="v2",s))(Ls||{});const zr="v2";var Ns=(s=>(s.start="start",s.center="center",s.end="end",s))(Ns||{});class Rs{constructor(o){g(this,G);this.insertImageVariableToFrame=async(e,t)=>{const n=await a(this,G),r={id:t,type:zt.variable};return n.setImageSource(e,JSON.stringify(r)).then(c=>i(c))},this.insertTextVariable=async e=>(await a(this,G)).insertTextVariable(e).then(n=>i(n)),this.enterTextEditMode=async e=>(await a(this,G)).enterTextEditMode(e).then(n=>i(n)),this.exitTextEditMode=async()=>(await a(this,G)).exitTextEditMode().then(t=>i(t)),this.getText=async(e,t)=>(await a(this,G)).getTextByFrameId(e,t).then(r=>i(r)),this.setText=async(e,t)=>(await a(this,G)).setTextByFrameId(e,t).then(r=>i(r)),this.selectText=async(e,t,n)=>(await a(this,G)).selectTextById(e,t,n).then(c=>i(c)),this.addCustomUndoData=async(e,t,n)=>(await a(this,G)).setCustomUndoData(e,t,n??!1).then(c=>i(c)),y(this,G,o)}}G=new WeakMap;class Ms{constructor(o){g(this,lt);g(this,Mt);this.query=async(e,t,n={})=>(await a(this,lt)).fontConnectorQuery(e,JSON.stringify(t),JSON.stringify(n)).then(c=>i(c)),this.detail=async(e,t,n={})=>(await a(this,lt)).fontConnectorDetail(e,t,JSON.stringify(n)).then(c=>i(c)),this.download=async(e,t,n={})=>(await a(this,Mt)).fontConnectorDownload(e,t,JSON.stringify(n)).then(c=>c??c),this.preview=async(e,t,n,r={})=>(await a(this,Mt)).fontConnectorPreview(e,t,n,JSON.stringify(r)).then(d=>d??d),this.getConfigurationOptions=async e=>(await a(this,lt)).fontConnectorGetConfigurationOptions(e).then(n=>i(n)),this.getCapabilities=async e=>(await a(this,lt)).fontConnectorGetCapabilities(e).then(n=>i(n)),this.parseDeprecatedFontType=e=>{if(e===Dt.file)return Ot.file;if(e===Dt.collection)return Ot.collection},y(this,lt,o),y(this,Mt,o)}}lt=new WeakMap,Mt=new WeakMap;class Vs{constructor(o){g(this,E);this.addFontFamily=async(e,t)=>(await a(this,E)).addFontFamily(e,JSON.stringify(t)).then(r=>i(r)),this.removeFontFamily=async e=>(await a(this,E)).removeFontFamily(e).then(n=>i(n)),this.addFontStyle=async(e,t)=>(await a(this,E)).addFontStyle(e,JSON.stringify(t)).then(r=>i(r)),this.removeFontStyle=async e=>(await a(this,E)).removeFontStyle(e).then(n=>i(n)),this.getFontFamilies=async()=>(await a(this,E)).getFontFamilies().then(t=>i(t)),this.getFontStyles=async e=>(await a(this,E)).getFontStyles(e).then(n=>i(n)),this.getFontFamilyById=async e=>(await a(this,E)).getFontFamilyById(e).then(n=>i(n)),this.getFontStyleById=async e=>(await a(this,E)).getFontStyleById(e).then(n=>i(n)),this.getDefaultFontStyle=async()=>(await a(this,E)).getDefaultFontStyle().then(t=>i(t)),this.getDefaultFontFamily=async()=>(await a(this,E)).getDefaultFontFamily().then(t=>i(t)),this.isFontFamilyUsed=async e=>(await a(this,E)).isFontFamilyUsed(e).then(n=>i(n)),this.isFontStyleUsed=async e=>(await a(this,E)).isFontStyleUsed(e).then(n=>i(n)),this.moveFontFamilies=async(e,t)=>(await a(this,E)).moveFontFamilies(e,t).then(r=>i(r)),this.getPreviewsOfCharacterStrings=async(e,t)=>(await a(this,E)).getPreviewsOfCharacterStrings(e,JSON.stringify(t)).then(r=>i(r)),y(this,E,o)}}E=new WeakMap;class be{constructor(o){g(this,Vt);this.setShapeProperties=async(e,t)=>(await a(this,Vt)).setShapeProperties(e,JSON.stringify(t)).then(r=>i(r)),this.setEnableFill=async(e,t)=>{const n={enableFill:t};return this.setShapeProperties(e,n)},this.setFillColor=async(e,t)=>{const n={fillColor:t};return this.setShapeProperties(e,n)},this.setEnableStroke=async(e,t)=>{const n={enableStroke:t};return this.setShapeProperties(e,n)},this.setStrokeColor=async(e,t)=>{const n={strokeColor:t};return this.setShapeProperties(e,n)},this.setStrokeWeight=async(e,t)=>{const n={strokeWeight:t};return this.setShapeProperties(e,n)},this.setFlagAllCornersSame=async(e,t)=>{const n={allCornersSame:t};return this.setShapeProperties(e,n)},this.setShapeCorners=async(e,t)=>(await a(this,Vt)).setShapeCorners(e,JSON.stringify(t)).then(r=>i(r)),this.setRadiusAll=async(e,t)=>{const n={radiusAll:t};return this.setShapeCorners(e,n)},this.setRadiusTopLeft=async(e,t)=>{const n={topLeft:t};return this.setShapeCorners(e,n)},this.setRadiusBottomLeft=async(e,t)=>{const n={bottomLeft:t};return this.setShapeCorners(e,n)},this.setRadiusTopRight=async(e,t)=>{const n={topRight:t};return this.setShapeCorners(e,n)},this.setRadiusBottomRight=async(e,t)=>{const n={bottomRight:t};return this.setShapeCorners(e,n)},y(this,Vt,o)}}Vt=new WeakMap;class Bs{constructor(o){g(this,l);this.getAll=async()=>(await a(this,l)).getFrames().then(t=>i(t)),this.getSelected=async()=>(await a(this,l)).getSelectedFrames().then(t=>i(t)),this.getAllByPageId=async e=>(await a(this,l)).getFramesByPageId(e).then(n=>i(n)),this.getByName=async e=>(await a(this,l)).getFrameByName(e).then(n=>i(n)),this.getById=async e=>(await a(this,l)).getFrameById(e).then(n=>i(n)),this.getPropertiesOnSelectedLayout=async()=>(await a(this,l)).getFramePropertiesOnSelectedLayout().then(t=>i(t)),this.getLayoutProperties=async(e,t)=>(await a(this,l)).getFramePropertiesByFrameId(e,t).then(r=>i(r)),this.getAllLayoutProperties=async e=>(await a(this,l)).getFramesProperties(e).then(n=>i(n)),this.resetTransformation=async e=>(await a(this,l)).resetFrameTransformation(e).then(n=>i(n)),this.resetSize=async e=>(await a(this,l)).resetFrameTransformation(e).then(n=>i(n)),this.select=async e=>(await a(this,l)).selectFrames([e]).then(n=>i(n)),this.selectMultiple=async e=>(await a(this,l)).selectFrames(e).then(n=>i(n)),this.deselectAll=async()=>(await a(this,l)).deselectFrames().then(t=>i(t)),this.reorderFrames=async(e,t)=>(await a(this,l)).reorderFrames(e,t).then(r=>i(r)),this.setZIndex=async(e,t)=>(await a(this,l)).setFrameZIndex(e,t).then(r=>i(r)),this.setHeight=async(e,t)=>(await a(this,l)).setFrameHeight(e,t).then(r=>i(r)),this.setRotation=async(e,t)=>(await a(this,l)).setFrameRotation(e,t).then(r=>i(r)),this.setWidth=async(e,t)=>(await a(this,l)).setFrameWidth(e,t).then(r=>i(r)),this.setX=async(e,t)=>(await a(this,l)).setFrameX(e,t).then(r=>i(r)),this.setY=async(e,t)=>(await a(this,l)).setFrameY(e,t).then(r=>i(r)),this.setOpacity=async(e,t)=>(await a(this,l)).setFrameOpacity(e,t).then(r=>i(r)),this.rename=async(e,t)=>(await a(this,l)).renameFrame(e,t).then(r=>i(r)),this.reset=async e=>(await a(this,l)).resetFrame(e).then(n=>i(n)),this.resetX=async e=>(await a(this,l)).resetFrameTransformation(e).then(n=>i(n)),this.resetY=async e=>(await a(this,l)).resetFrameTransformation(e).then(n=>i(n)),this.resetRotation=async e=>(await a(this,l)).resetFrameTransformation(e).then(n=>i(n)),this.resetWidth=async e=>(await a(this,l)).resetFrameTransformation(e).then(n=>i(n)),this.resetHeight=async e=>(await a(this,l)).resetFrameTransformation(e).then(n=>i(n)),this.resetImageFrameFitMode=async e=>(await a(this,l)).resetImageFrameFitMode(e).then(n=>i(n)),this.setVisibility=async(e,t)=>(await a(this,l)).setFrameIsVisible(e,t).then(r=>i(r)),this.setIsVisible=async(e,t)=>(await a(this,l)).setFrameIsVisible(e,t).then(r=>i(r)),this.remove=async e=>(await a(this,l)).removeFrames([e]).then(n=>i(n)),this.removeFrames=async e=>(await a(this,l)).removeFrames(e).then(n=>i(n)),this.create=async(e,t,n,r,c)=>(await a(this,l)).addFrame(e,t,n,r,c).then(u=>i(u)),this.createShapeFrame=async(e,t,n,r,c)=>(await a(this,l)).addFrame(e,t,n,r,c).then(u=>i(u)),this.createBarcodeFrame=async(e,t)=>(await a(this,l)).addBarcodeFrame(e,t==null?void 0:t.x,t==null?void 0:t.y).then(r=>i(r)),this.createComponentFrame=async(e,t,n,r,c)=>(await a(this,l)).addComponentFrame(t,n,r,c,JSON.stringify(e)).then(u=>i(u)),this.duplicateFrames=async e=>(await a(this,l)).duplicateFrames(e).then(n=>i(n)),this.updateImageSource=async(e,t)=>{const n=await a(this,l),r=t!==null?JSON.stringify(t):null;return n.setImageSource(e,r).then(c=>i(c))},this.removeImageSource=async e=>this.updateImageSource(e,null),this.setImageFromConnector=async(e,t,n)=>{const r={id:t,assetId:n,type:zt.connector};return this.updateImageSource(e,r)},this.setImageFromUrl=async(e,t)=>{const n={url:t,type:zt.url};return this.updateImageSource(e,n)},this.setImageFrameFitMode=async(e,t)=>(await a(this,l)).setImageFrameFitMode(e,t).then(r=>i(r)),this.setImageFrameFitModePosition=async(e,t)=>(await a(this,l)).setImageFrameFitModePosition(e,t).then(r=>i(r)),this.setImageFrameSmartCropSettings=async(e,t)=>(await a(this,l)).setImageFrameSmartCropSettings(e,JSON.stringify(t)).then(r=>i(r)),this.setFrameConstrainProportions=async(e,t)=>(console.error("setFrameConstrainProportions is not supported anymore"),i({success:!1,status:0,error:"setFrameConstrainProportions is not supported anymore",parsedData:null})),this.setVerticalAlign=async(e,t)=>(await a(this,l)).setVerticalAlignment(e,t).then(r=>i(r)),this.setNumberOfColumns=async(e,t)=>(await a(this,l)).setNumberOfColumns(e,t).then(r=>i(r)),this.setColumnGap=async(e,t)=>(await a(this,l)).setColumnGap(e,t).then(r=>i(r)),this.setMinCopyfitting=async(e,t)=>(await a(this,l)).setMinCopyfitting(e,t).then(r=>i(r)),this.setMaxCopyfitting=async(e,t)=>(await a(this,l)).setMaxCopyfitting(e,t).then(r=>i(r)),this.setEnableCopyfitting=async(e,t)=>(await a(this,l)).setEnableCopyfitting(e,t).then(r=>i(r)),this.resetMinCopyfitting=async e=>(await a(this,l)).resetMinCopyfitting(e).then(n=>i(n)),this.resetMaxCopyfitting=async e=>(await a(this,l)).resetMaxCopyfitting(e).then(n=>i(n)),this.resetEnableCopyfitting=async e=>(await a(this,l)).resetEnableCopyfitting(e).then(n=>i(n)),this.setShapeFrameEnableFill=async(e,t)=>this.shapeController.setEnableFill(e,t),this.setShapeFrameFillColor=async(e,t)=>this.shapeController.setFillColor(e,t),this.setShapeFrameEnableStroke=async(e,t)=>this.shapeController.setEnableStroke(e,t),this.setShapeFrameStrokeColor=async(e,t)=>this.shapeController.setStrokeColor(e,t),this.setShapeFrameStrokeWeight=async(e,t)=>this.shapeController.setStrokeWeight(e,t),this.setBlendMode=async(e,t)=>(await a(this,l)).setFrameBlendMode(e,t).then(r=>i(r)),this.setFrameContainerShape=async(e,t)=>(await a(this,l)).setFrameContainerShape(e,JSON.stringify(t)).then(r=>i(r)),this.enterCropMode=async(e,t=Se.frameCrop)=>(await a(this,l)).enterCropMode(e,t).then(r=>i(r)),this.applyCropMode=async()=>(await a(this,l)).applyCropMode().then(t=>i(t)),this.exitCropMode=async()=>(await a(this,l)).cancelCropMode().then(t=>i(t)),this.enterSubjectMode=async e=>(await a(this,l)).enterSubjectMode(e).then(n=>i(n)),this.applySubjectMode=async()=>(await a(this,l)).applySubjectMode().then(t=>i(t)),this.exitSubjectMode=async()=>(await a(this,l)).cancelSubjectMode().then(t=>i(t)),this.enterGradientMode=async e=>(await a(this,l)).enterGradientMode(e).then(n=>i(n)),this.applyGradientMode=async()=>(await a(this,l)).applyGradientMode().then(t=>i(t)),this.cancelGradientMode=async()=>(await a(this,l)).cancelGradientMode().then(t=>i(t)),this.resetCropMode=async e=>(console.error("resetCropMode is not supported anymore"),i({success:!1,status:0,error:"resetCropMode is not supported anymore",parsedData:null})),this.setEnableAutoGrow=async(e,t)=>{const n={enabled:{value:t}};return(await a(this,l)).updateAutoGrowSettings(e,JSON.stringify(n)).then(c=>i(c))},this.setAutoGrowMinWidth=async(e,t)=>{const n={minWidth:{value:t}};return(await a(this,l)).updateAutoGrowSettings(e,JSON.stringify(n)).then(c=>i(c))},this.setAutoGrowMaxWidth=async(e,t)=>{const n={maxWidth:{value:t}};return(await a(this,l)).updateAutoGrowSettings(e,JSON.stringify(n)).then(c=>i(c))},this.setAutoGrowMinHeight=async(e,t)=>{const n={minHeight:{value:t}};return(await a(this,l)).updateAutoGrowSettings(e,JSON.stringify(n)).then(c=>i(c))},this.setAutoGrowMaxHeight=async(e,t)=>{const n={maxHeight:{value:t}};return(await a(this,l)).updateAutoGrowSettings(e,JSON.stringify(n)).then(c=>i(c))},this.setAutoGrowDirections=async(e,t)=>{const n={directions:{value:t}};return(await a(this,l)).updateAutoGrowSettings(e,JSON.stringify(n)).then(c=>i(c))},this.resetAutoGrowSettingsEnabled=async e=>(console.error("resetAutoGrowSettingsEnabled is not supported anymore"),i({success:!1,status:0,error:"resetAutoGrowSettingsEnabled is not supported anymore",parsedData:null})),this.resetAutoGrowMinWidth=async e=>(console.error("resetAutoGrowMinWidth is not supported anymore"),i({success:!1,status:0,error:"resetAutoGrowMinWidth is not supported anymore",parsedData:null})),this.resetAutoGrowMaxWidth=async e=>(console.error("resetAutoGrowMaxWidth is not supported anymore"),i({success:!1,status:0,error:"resetAutoGrowMaxWidth is not supported anymore",parsedData:null})),this.resetAutoGrowMinHeight=async e=>(console.error("resetAutoGrowMinHeight is not supported anymore"),i({success:!1,status:0,error:"resetAutoGrowMinHeight is not supported anymore",parsedData:null})),this.resetAutoGrowMaxHeight=async e=>(console.error("resetAutoGrowMaxHeight is not supported anymore"),i({success:!1,status:0,error:"resetAutoGrowMaxHeight is not supported anymore",parsedData:null})),this.resetAutoGrowDirections=async e=>(console.error("resetAutoGrowDirections is not supported anymore"),i({success:!1,status:0,error:"resetAutoGrowDirections is not supported anymore",parsedData:null})),this.resetAutoGrow=async e=>(console.error("resetAutoGrow is not supported anymore"),i({success:!1,status:0,error:"resetAutoGrow is not supported anymore",parsedData:null})),this.setShadowEnabled=async(e,t)=>{const n={enabled:{value:t}};return(await a(this,l)).updateFrameShadowSettings(e,JSON.stringify(n)).then(c=>i(c))},this.setShadowDistance=async(e,t)=>{const n={distance:{value:t}};return(await a(this,l)).updateFrameShadowSettings(e,JSON.stringify(n)).then(c=>i(c))},this.setShadowAngleDegrees=async(e,t)=>{const n={angleDegrees:{value:t}};return(await a(this,l)).updateFrameShadowSettings(e,JSON.stringify(n)).then(c=>i(c))},this.setShadowBlurRadius=async(e,t)=>{const n={blurRadius:{value:t}};return(await a(this,l)).updateFrameShadowSettings(e,JSON.stringify(n)).then(c=>i(c))},this.setShadowColor=async(e,t)=>{const n={color:{value:t}};return(await a(this,l)).updateFrameShadowSettings(e,JSON.stringify(n)).then(c=>i(c))},this.setAnchor=async(e,t,n,r,c)=>{const d={horizontal:t,type:n,target:r,endTarget:c};return(await a(this,l)).setAnchorProperties(e,JSON.stringify(d)).then(w=>i(w))},this.setVerticalAnchor=async(e,t,n,r)=>this.setAnchor(e,!1,t,n,r),this.setHorizontalAnchor=async(e,t,n,r)=>this.setAnchor(e,!0,t,n,r),this.resetAnchoring=async e=>(await a(this,l)).resetFrameTransformation(e).then(n=>i(n)),this.resetVisibility=async e=>(await a(this,l)).setFrameIsVisible(e,null).then(n=>i(n)),this.getConfiguration=async e=>(await a(this,l)).getFrameConfiguration(e).then(n=>i(n)),this.resetAssetCropOverride=async e=>(await a(this,l)).resetAssetCropOverride(e).then(n=>i(n)),this.resetAllAssetCropOverrides=async e=>(await a(this,l)).resetAllAssetCropOverrides(e).then(n=>i(n)),this.setGradientApplied=async(e,t)=>{const n={isApplied:t};return(await a(this,l)).updateFrameGradientSettings(e,JSON.stringify(n)).then(c=>i(c))},this.setLocalGradient=async(e,t)=>{const n={gradient:t};return(await a(this,l)).updateFrameGradientSettings(e,JSON.stringify(n)).then(c=>i(c))},this.setBrandKitGradient=async(e,t)=>{const n={id:t};return(await a(this,l)).updateFrameGradientSettings(e,JSON.stringify(n)).then(c=>i(c))},this.setSmartCropSubjectId=async(e,t)=>(await a(this,l)).setSmartCropSubjectId(e,t).then(r=>i(r)),y(this,l,o),this.shapeController=new be(a(this,l)),this.constraints=new Kr(a(this,l))}}l=new WeakMap;class Kr{constructor(o){g(this,F);this.get=async e=>(await a(this,F)).getFrameConstraints(e).then(n=>i(n)),this.setSelectable=async(e,t)=>{const n={selectionAllowed:{value:t}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(n)).then(c=>i(c))},this.setHorizontalMovement=async(e,t)=>{const n={horizontalMovementAllowed:{value:t}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(n)).then(c=>i(c))},this.setVerticalMovement=async(e,t)=>{const n={verticalMovementAllowed:{value:t}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(n)).then(c=>i(c))},this.setRotation=async(e,t)=>{const n={rotationAllowed:{value:t}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(n)).then(c=>i(c))},this.setResize=async(e,t,n)=>{const r={resizeAllowed:{value:t},...n!==void 0&&{proportionLocked:{value:n}}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(r)).then(d=>i(d))},this.setCrop=async(e,t)=>{const n={image:{cropAllowed:{value:t}}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(n)).then(c=>i(c))},this.setTextEditingAllowed=async(e,t)=>{const n={text:{editingAllowed:{value:t}}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(n)).then(c=>i(c))},this.setAllowedParagraphStyles=async(e,t)=>{const n={text:{paragraphStyles:{value:t}}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(n)).then(c=>i(c))},this.setAllowedCharacterStyles=async(e,t)=>{const n={text:{characterStyles:{value:t}}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(n)).then(c=>i(c))},this.setAllowedColors=async(e,t)=>{const n={text:{colors:{value:t}}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(n)).then(c=>i(c))},this.setAllowedFontSizes=async(e,t)=>{const n={text:{fontSizes:{value:t}}};return(await a(this,F)).updateFrameConstraints(e,JSON.stringify(n)).then(c=>i(c))},y(this,F,o)}}F=new WeakMap;class Ts{constructor(){this.currentEngineVersion=V.current,this.currentSDKVersion=De.version}}class Js{constructor(o){g(this,f);g(this,Zt);this.getAll=async()=>(await a(this,f)).getLayouts().then(t=>i(t)),this.getById=async e=>(await a(this,f)).getLayoutById(e).then(n=>i(n)),this.getByName=async e=>(await a(this,f)).getLayoutByName(e).then(n=>i(n)),this.getSelected=async()=>(await a(this,f)).getSelectedLayout().then(t=>i(t)),this.remove=async e=>(await a(this,f)).removeLayout(e).then(n=>i(n)),this.create=async(e,t)=>{const n=await a(this,f);return t!=null&&t.length?n.addLayouts(e,JSON.stringify(t)).then(r=>i(r)):n.addLayout(e).then(r=>i(r))},this.rename=async(e,t)=>(await a(this,f)).renameLayout(e,t).then(r=>i(r)),this.select=async e=>(await a(this,f)).selectLayoutWithOptions(e,null).then(n=>i(n)),this.selectWithPageSize=async(e,t)=>{const n=await a(this,f),r={pageSize:t};return n.selectLayoutWithOptions(e,JSON.stringify(r)).then(c=>i(c))},this.duplicate=async e=>(await a(this,f)).duplicateLayout(e).then(n=>i(n)),this.reset=async e=>(await a(this,f)).resetLayout(e).then(n=>i(n)),this.setHeight=async(e,t)=>(await a(this,f)).setLayoutHeight(e,t).then(r=>i(r)),this.setWidth=async(e,t)=>(await a(this,f)).setLayoutWidth(e,t).then(r=>i(r)),this.setUnit=async(e,t)=>(await a(this,f)).setLayoutUnit(e,t).then(r=>i(r)),this.resetHeight=async e=>(await a(this,f)).resetLayoutHeight(e).then(n=>i(n)),this.resetWidth=async e=>(await a(this,f)).resetLayoutWidth(e).then(n=>i(n)),this.resetUnit=async e=>(await a(this,f)).resetLayoutUnit(e).then(n=>i(n)),this.getSelectedSnapshot=async()=>(await a(this,Zt)).getPageSnapshot().then(t=>t??t),this.setIntent=async(e,t)=>(await a(this,f)).setLayoutIntent(e,t).then(r=>i(r)),this.resetIntent=async e=>(await a(this,f)).resetLayoutIntent(e).then(n=>i(n)),this.setFillColor=async(e,t)=>(await a(this,f)).setLayoutFillColor(e,JSON.stringify(t)).then(r=>i(r)),this.setFillColorEnabled=async(e,t)=>(await a(this,f)).setLayoutFillColorEnabled(e,t).then(r=>i(r)),this.resetFillColor=async e=>(await a(this,f)).resetLayoutFillColor(e).then(n=>i(n)),this.setBleedValue=async(e,t,n)=>{const r=n?{left:n===Y.left?t:void 0,top:n===Y.top?t:void 0,right:n===Y.right?t:void 0,bottom:n===Y.bottom?t:void 0}:{left:t,top:t,right:t,bottom:t};return(await a(this,f)).updateLayoutBleed(e,JSON.stringify(r)).then(d=>i(d))},this.setAreBleedValuesCombined=async(e,t)=>{const n={areBleedValuesCombined:t};return(await a(this,f)).updateLayoutBleed(e,JSON.stringify(n)).then(c=>i(c))},this.resetBleedValues=async e=>(await a(this,f)).updateLayoutBleed(e,null).then(n=>i(n)),this.setPrivateData=async(e,t)=>(await a(this,f)).setLayoutPrivateData(e,JSON.stringify(t)).then(r=>i(r)),this.getPrivateData=async e=>(await a(this,f)).getLayoutPrivateData(e).then(n=>i(n)),this.setDisplayName=async(e,t)=>(await a(this,f)).setLayoutDisplayName(e,t).then(r=>i(r)),this.getDisplayName=async e=>(await a(this,f)).getLayoutDisplayName(e).then(n=>i(n)),this.resetDisplayName=async e=>(await a(this,f)).setLayoutDisplayName(e,null).then(n=>i(n)),this.setAvailableForUser=async(e,t)=>(await a(this,f)).setLayoutAvailableForUser(e,t).then(r=>i(r)),this.setSelectedByUser=async(e,t)=>(await a(this,f)).setLayoutSelectedByUser(e,t).then(r=>i(r)),this.setResizableByUser=async(e,t)=>(await a(this,f)).setLayoutResizableByUser(e,JSON.stringify(t)).then(r=>i(r)),y(this,f,o),y(this,Zt,o)}}f=new WeakMap,Zt=new WeakMap;var ue=(s=>(s.thumbnail="thumbnail",s.mediumres="mediumres",s.highres="highres",s.original="original",s))(ue||{}),ve=(s=>(s.web="web",s.print="print",s.animation="animation",s))(ve||{});class Us{constructor(o){g(this,et);g(this,Qt);this.query=async(e,t,n={})=>(await a(this,et)).mediaConnectorQuery(e,JSON.stringify(t),JSON.stringify(n)).then(c=>i(c)),this.detail=async(e,t,n={})=>(await a(this,et)).mediaConnectorDetail(e,t,JSON.stringify(n)).then(c=>i(c)),this.download=async(e,t,n,r={})=>{const c=this.parseDeprecatedMediaDownloadType(n);return(await a(this,Qt)).mediaConnectorDownload(e,t,c,ve.web,JSON.stringify(r)).then(u=>{if(u instanceof Uint8Array)return u;throw typeof u=="object"&&u!==null&&"success"in u&&!u.success&&wt(u),new Error(`Unexpected response type: ${typeof u}.`)})},this.getConfigurationOptions=async e=>(await a(this,et)).mediaConnectorGetConfigurationOptions(e).then(n=>i(n)),this.getCapabilities=async e=>(await a(this,et)).mediaConnectorGetCapabilities(e).then(n=>i(n)),this.parseDeprecatedMediaType=e=>{if(e===Dt.file)return Ot.file;if(e===Dt.collection)return Ot.collection},this.upload=async(e,t,n={})=>(await a(this,et)).mediaConnectorUpload(e,JSON.stringify(t),JSON.stringify(n)).then(c=>i(c)),y(this,et,o),y(this,Qt,o)}parseDeprecatedMediaDownloadType(o){switch(o){case he.HighResolutionWeb:return ue.highres;case he.LowResolutionWeb:return ue.thumbnail;default:return o}}}et=new WeakMap,Qt=new WeakMap;let ks=(_n=class{constructor(o){g(this,L);g(this,Xt);this.add=async()=>(await a(this,L)).addPage().then(t=>i(t)),this.remove=async e=>(await a(this,L)).removePage(e).then(n=>i(n)),this.select=async e=>(await a(this,L)).selectPage(e).then(n=>i(n)),this.setVisibility=async(e,t)=>(await a(this,L)).setPageIsVisible(e,t).then(r=>i(r)),this.duplicate=async e=>(await a(this,L)).duplicatePage(e).then(n=>i(n)),this.getAll=async()=>(await a(this,L)).getPages().then(t=>i(t)),this.getById=async e=>(await a(this,L)).getPageById(e).then(n=>i(n)),this.getSnapshot=async(e,t)=>(await a(this,Xt)).getPageSnapshotWithSettings(e,t==null?null:JSON.stringify(t)).then(r=>{if(r instanceof Uint8Array)return r;throw typeof r=="object"&&r!==null&&"success"in r&&!r.success&&wt(r),new Error(`Unexpected response type: ${typeof r}.`)}),this.setWidth=async(e,t)=>(e!==void 0&&console.warn("pageId has no effect since all pages are being updated simultaneously."),(await a(this,L)).setPageWidth(t).then(r=>i(r))),this.setHeight=async(e,t)=>(e!==void 0&&console.warn("pageId has no effect since all pages are being updated simultaneously."),(await a(this,L)).setPageHeight(t).then(r=>i(r))),this.setSize=async(e,t)=>(await a(this,L)).setPageSize(e,t).then(r=>i(r)),this.move=async(e,t)=>(await a(this,L)).reorderPages(e,t).then(r=>i(r)),y(this,L,o),y(this,Xt,o)}},L=new WeakMap,Xt=new WeakMap,_n);class Gs{constructor(o){g(this,_);this.getAll=async()=>(await a(this,_)).getParagraphStyles().then(t=>i(t)),this.getById=async e=>(await a(this,_)).getParagraphStyleById(e).then(n=>i(n)),this.create=async()=>(await a(this,_)).createParagraphStyle().then(t=>i(t)),this.duplicate=async e=>(await a(this,_)).duplicateParagraphStyle(e).then(n=>i(n)),this.update=async(e,t)=>(await a(this,_)).updateParagraphStyle(e,JSON.stringify(t)).then(r=>i(r)),this.rename=async(e,t)=>(await a(this,_)).renameParagraphStyle(e,t).then(r=>i(r)),this.remove=async e=>(await a(this,_)).removeParagraphStyle(e).then(n=>i(n)),this.move=async(e,t)=>(await a(this,_)).moveParagraphStyles(e,t).then(r=>i(r)),y(this,_,o)}}_=new WeakMap;var Kt=(s=>(s.shortText="shortText",s.longText="longText",s.richText="richText",s.image="image",s.list="list",s.boolean="boolean",s.group="group",s.number="number",s.date="date",s.dataSource="dataSource",s))(Kt||{}),_s=(s=>(s.Monday="monday",s.Tuesday="tuesday",s.Wednesday="wednesday",s.Thursday="thursday",s.Friday="friday",s.Saturday="saturday",s.Sunday="sunday",s))(_s||{}),Hs=(s=>(s.en_US="en_US",s.cs="cs",s.da="da",s.nl="nl",s.fi="fi",s.fr="fr",s.de="de",s.it="it",s.no="no",s.pl="pl",s.pt_PT="pt_PT",s.es_ES="es_ES",s.sv="sv",s))(Hs||{}),Lt=(s=>(s.visible="visible",s.invisible="invisible",s.conditional="conditional",s))(Lt||{}),xs=(s=>(s.boolean="boolean",s.text="text",s.number="number",s))(xs||{}),$s=(s=>(s.equals="=",s.notEquals="!=",s.greaterThan=">",s.greaterThanOrEquals=">=",s.lessThan="<",s.lessThanOrEquals="<=",s))($s||{}),Ie=(s=>(s.injected="injected",s.connector="connector",s))(Ie||{}),js=(s=>(s.table="table",s.list="list",s))(js||{});let Wr=class{constructor(o,e){this.onActionsChanged=t=>{this.config.events.onActionsChanged.trigger(JSON.parse(t))},this.onAnimationChanged=t=>{this.config.events.onFrameAnimationsChanged.trigger(JSON.parse(t))},this.onAnimationPlaybackChanged=t=>{this.config.events.onScrubberPositionChanged.trigger(JSON.parse(t))},this.onSelectedLayoutPropertiesChanged=t=>{this.config.events.onSelectedLayoutPropertiesChanged.trigger(JSON.parse(t))},this.onSelectedLayoutUnitChanged=t=>{this.config.events.onSelectedLayoutUnitChanged.trigger(t)},this.onFramesLayoutChanged=t=>{const n=JSON.parse(t);this.config.events.onFramesLayoutChanged.trigger(n)},this.onSelectedFramesLayoutChanged=t=>{const n=JSON.parse(t);this.config.events.onSelectedFramesLayoutChanged.trigger(n);const r=this.config.onSelectedFrameLayoutChanged;r&&r(n.length>1?void 0:n[0])},this.onSelectedFramesContentChanged=t=>{const n=JSON.parse(t);this.config.events.onSelectedFramesContentChanged.trigger(n);const r=this.config.onSelectedFrameContentChanged;r&&r(n.length>1?null:n[0])},this.onStateChanged=()=>{this.config.events.onStateChanged.trigger()},this.onAuthExpired=async t=>{const n=await this.config.handlers.onAuthExpired.trigger(JSON.parse(t));return n!=null?JSON.stringify(n):null},this.onViewportRequested=()=>{const t=this.config.handlers.onViewportRequested.trigger();return t!=null?JSON.stringify(t):null},this.onDocumentLoaded=()=>{this.config.events.onDocumentLoaded.trigger()},this.onPageSelectionChanged=t=>{this.config.events.onPageSelectionChanged.trigger(t)},this.onVariableListChanged=t=>{const r=JSON.parse(t).map(c=>{var d;return c.type===Kt.list?{...c,items:c.items.map(u=>u.value),selected:(d=c.selected)==null?void 0:d.value}:c});this.config.events.onVariableListChanged.trigger(r)},this.onSelectedToolChanged=t=>{this.config.events.onSelectedToolChanged.trigger(t)},this.onUndoStateChanged=t=>{this.config.events.onUndoStackStateChanged.trigger(JSON.parse(t))},this.onCustomUndoDataChanged=t=>{this.config.events.onCustomUndoDataChanged.trigger(JSON.parse(t))},this.onSelectedLayoutFramesChanged=t=>{this.config.events.onSelectedLayoutFramesChanged.trigger(JSON.parse(t))},this.onSelectedTextStyleChanged=t=>{this.config.events.onSelectedTextStyleChanged.trigger(JSON.parse(t))},this.onColorsChanged=t=>{this.config.events.onColorsChanged.trigger(JSON.parse(t))},this.onParagraphStylesChanged=t=>{this.config.events.onParagraphStylesChanged.trigger(JSON.parse(t))},this.onCharacterStylesChanged=t=>{this.config.events.onCharacterStylesChanged.trigger(JSON.parse(t))},this.onFontFamiliesChanged=t=>{this.config.events.onFontFamiliesChanged.trigger(JSON.parse(t))},this.onSelectedLayoutIdChanged=t=>{this.config.events.onSelectedLayoutIdChanged.trigger(t)},this.onLayoutsChanged=t=>{this.config.events.onLayoutsChanged.trigger(JSON.parse(t))},this.onZoomChanged=t=>{this.config.events.onZoomChanged.trigger(JSON.parse(t))},this.onConnectorEvent=t=>{this.config.events.onConnectorEvent.trigger(JSON.parse(t))},this.onConnectorsChanged=t=>{const r=new le().makeMultipleConnectorsBackwardsCompatible(JSON.parse(t),this.localConfig.get(q.GraFxStudioEnvironmentApiUrl));this.config.events.onConnectorsChanged.trigger(r)},this.onSelectedPageIdChanged=t=>{this.config.events.onSelectedPageIdChanged.trigger(t)},this.onPagesChanged=t=>{this.config.events.onPagesChanged.trigger(JSON.parse(t))},this.onPageSnapshotInvalidated=t=>{this.config.events.onPageSnapshotInvalidated.trigger(t)},this.onPageSizeChanged=t=>{this.config.events.onPageSizeChanged.trigger(JSON.parse(t))},this.onShapeCornerRadiusChanged=t=>{this.config.events.onShapeCornerRadiusChanged.trigger(JSON.parse(t))},this.onCropActiveFrameIdChanged=t=>{this.config.events.onCropActiveFrameIdChanged.trigger(t)},this.onAsyncError=t=>{const n=JSON.parse(t);if((n==null?void 0:n.type)==="dataRow"){const r=new Be(n.count,n.message,n.exceptions);this.config.events.onAsyncError.trigger(r)}else if((n==null?void 0:n.type)==="action"){const r=new Ve(n.message,n.id,n.event,n.eventChain);this.config.events.onAsyncError.trigger(r)}else this.config.events.onAsyncError.trigger(n)},this.onViewModeChanged=t=>{this.config.events.onViewModeChanged.trigger(t)},this.onBarcodeValidationChanged=t=>{this.config.events.onBarcodeValidationChanged.trigger(JSON.parse(t))},this.onDataSourceIdChanged=t=>{this.config.events.onDataSourceIdChanged.trigger(t)},this.onInjectedDataChanged=t=>{this.config.events.onInjectedDataChanged.trigger(t)},this.onDocumentIssueListChanged=t=>{this.config.events.onDocumentIssueListChanged.trigger(JSON.parse(t))},this.onEngineEditModeChanged=t=>{this.config.events.onEngineEditModeChanged.trigger(JSON.parse(t))},this.onBrandKitMediaChanged=t=>{this.config.events.onBrandKitMediaChanged.trigger(JSON.parse(t))},this.config=o,this.localConfig=e}};class zs{constructor(o){g(this,vt);this.set=async e=>(await a(this,vt)).selectedTextStyleDeltaUpdate(JSON.stringify(e)).then(n=>i(n)),this.removeSelected=async()=>(await a(this,vt)).selectedTextStyleClean().then(t=>i(t)),this.getSelected=async()=>(await a(this,vt)).getSelectedTextStyle().then(t=>i(t)),y(this,vt,o)}}vt=new WeakMap;var Ks=(s=>(s.FRAME_X="frameX",s.FRAME_Y="frameY",s.WIDTH="width",s.HEIGHT="height",s.FRAME_ROTATION="frameRotation",s))(Ks||{}),Ws=(s=>(s.LAYOUT_HEIGHT="layoutHeight",s.LAYOUT_WIDTH="layoutWidth",s.BLEED_TOP="bleedTop",s.BLEED_BOTTOM="bleedBottom",s.BLEED_LEFT="bleedLeft",s.BLEED_RIGHT="bleedRight",s.BLEED_VALUES_COMBINED="areBleedValuesCombined",s))(Ws||{}),T=(s=>(s.SELECT="select",s.ZOOM="zoom",s.HAND="hand",s.IMAGE_FRAME="imageFrame",s.TEXT_FRAME="textFrame",s.SHAPE_RECT="rect",s.SHAPE_ELLIPSE="ellipse",s.SHAPE_POLYGON="polygon",s.COMPONENT_GRID_FRAME="componentGridFrame",s))(T||{}),qs=(s=>(s.MP4="mp4",s.GIF="gif",s.PNG="png",s.JPG="jpg",s.PDF="pdf",s.HTML="html",s))(qs||{}),ge=(s=>(s.SANDBOX="sandbox",s.PRODUCTION="online",s))(ge||{});class Ys{constructor(o){g(this,Bt);this.setTool=async e=>(await a(this,Bt)).setTool(e).then(n=>i(n)),this.getSelected=async()=>(await a(this,Bt)).getSelectedTool().then(t=>i(t)),this.setPointer=async()=>this.setTool(T.SELECT),this.setSelect=async()=>this.setTool(T.SELECT),this.setHand=async()=>this.setTool(T.HAND),this.setZoom=async()=>this.setTool(T.ZOOM),this.setTextFrame=async()=>this.setTool(T.TEXT_FRAME),this.setImageFrame=async()=>this.setTool(T.IMAGE_FRAME),this.setShapeRect=async()=>this.setTool(T.SHAPE_RECT),this.setShapeEllipse=async()=>this.setTool(T.SHAPE_ELLIPSE),this.setShapePolygon=async()=>this.setTool(T.SHAPE_POLYGON),this.setComponentGrid=async()=>this.setTool(T.COMPONENT_GRID_FRAME),y(this,Bt,o)}}Bt=new WeakMap;class Zs{constructor(o,e){g(this,Z);g(this,K);g(this,te);this.undo=async()=>(await a(this,Z)).undo().then(n=>i(n)),this.redo=async()=>(await a(this,Z)).redo().then(n=>i(n)),this.addCustomData=async(t,n)=>(await a(this,Z)).setCustomUndoData(t,n,!1).then(c=>i(c)),this.record=async(t,n)=>{try{await a(this,K).beginIfNoneActive(t),await n(a(this,te)),await a(this,K).end()}catch(r){throw await a(this,K).abort(),r}},this.pause=async()=>(await a(this,Z)).pause().then(n=>i(n)),this.resume=async()=>(await a(this,Z)).resume().then(n=>i(n)),this.clear=async()=>(await a(this,Z)).clear().then(n=>i(n)),this.advanced={begin:async t=>a(this,K).begin(t),beginIfNoneActive:async t=>a(this,K).beginIfNoneActive(t),end:async()=>a(this,K).end(),abort:async()=>a(this,K).abort()},y(this,Z,o),y(this,te,e),y(this,K,new qr(o))}}Z=new WeakMap,K=new WeakMap,te=new WeakMap;class qr{constructor(o){g(this,ut);this.begin=async e=>(await a(this,ut)).begin(e).then(n=>i(n)),this.beginIfNoneActive=async e=>(await a(this,ut)).beginIfNoneActive(e).then(n=>i(n)),this.end=async()=>(await a(this,ut)).end().then(t=>i(t)),this.abort=async()=>(await a(this,ut)).abort().then(t=>i(t)),y(this,ut,o)}}ut=new WeakMap;var J=(s=>(s.info="info",s.warn="warn",s.error="error",s))(J||{}),Qs=(s=>(s.general="general",s.connector="connector",s.event="event",s.engine="engine",s))(Qs||{}),Wt=(s=>(s.throw="throw",s.log="log",s))(Wt||{});class Xs extends Error{constructor(o){super(o)}}const Yr=(s,o=2)=>{const e=Math.pow(10,o);return Math.round(s*e)/e};class tn{constructor(o,e){g(this,ee);g(this,Tt);this.round=(t,n)=>i({data:String(Yr(t,n)),success:!0,status:200,parsedData:null}),this.createEnvironmentBaseURL=t=>{const{type:n=ge.SANDBOX,environment:r="ft-nostress",version:c="1"}=t,d=n==ge.SANDBOX?"chili-publish-sandbox":"chili-publish";return`https://${r}.${d}.online/grafx/api/v${c}/environment/${r}`},this.stageFiles=async(t,n,r)=>{const c=a(this,Tt).get(q.GraFxStudioEnvironmentApiUrl);if(!c)throw new Error("GraFx Studio Environment API URL is not set");const d=`${c}connectors/${n}/stage`,u=a(this,Tt).get(q.GraFxStudioAuthToken);if(!u)throw new Error("GraFx Studio Auth Token is not set");const w=new FormData;t.forEach((S,I)=>{const N=S instanceof File?S.name:`blob-${I}`;w.append("files",S,N)}),r&&w.append("validationJson",JSON.stringify({allowedMimeTypes:r.mimeTypes,minDimensions:{width:r.minWidthPixels,height:r.minHeightPixels}}));const p=await fetch(d,{method:"POST",body:w,headers:{Authorization:`Bearer ${u}`}});if(p.status===422){const S=await p.json();throw new cs(S.message,fe.minDimension)}if(p.status===401){const S=await p.json();throw new Xs(S.message)}if(!p.ok)throw new Error("Failed to stage files");return await p.json()},this.unitEvaluate=async(t,n)=>(await a(this,ee)).unitEvaluate(t,n).then(c=>i(c)),y(this,ee,o),y(this,Tt,e)}}ee=new WeakMap,Tt=new WeakMap;const Zr=s=>s.type===Kt.dataSource,Qr=s=>{var o;return s?Zr(s)&&((o=s==null?void 0:s.value)==null?void 0:o.type)===Ie.injected:!1};class Xr{constructor(o){g(this,se);this.setMinimum=async(e,t)=>{const n={minValue:{value:t}};return this.applyPropertiesUpdate(e,n)},this.setMaximum=async(e,t)=>{const n={maxValue:{value:t}};return this.applyPropertiesUpdate(e,n)},this.setShowStepper=async(e,t)=>{const n={showStepper:{value:t}};return this.applyPropertiesUpdate(e,n)},this.setStepSize=async(e,t)=>{const n={stepSize:{value:t}};return this.applyPropertiesUpdate(e,n)},this.setThousandsSeparator=async(e,t)=>{const n={thousandsSeparator:{value:t}};return this.applyPropertiesUpdate(e,n)},this.setDecimalSeparator=async(e,t)=>{const n={decimalSeparator:{value:t}};return this.applyPropertiesUpdate(e,n)},this.setDecimalCharacterStyle=async(e,t)=>{const n={decimalCharacterStyleId:{value:t}};return this.applyPropertiesUpdate(e,n)},this.setNumberOfDecimals=async(e,t)=>{const n={numberOfDecimals:{value:t}};return this.applyPropertiesUpdate(e,n)},y(this,se,o)}async applyPropertiesUpdate(o,e){const n=await(await a(this,se)).updateNumberVariableProperties(o,JSON.stringify(e));return i(n)}}se=new WeakMap;class ta{constructor(o){g(this,ne);this.setDisplayFormat=async(e,t)=>{const n={displayFormat:{value:t}};return this.applyPropertiesUpdate(e,n)},this.setLocale=async(e,t)=>{const n={locale:{value:t}};return this.applyPropertiesUpdate(e,n)},this.setStartDate=async(e,t)=>{const n={startDate:{value:t}};return this.applyPropertiesUpdate(e,n)},this.setEndDate=async(e,t)=>{const n={endDate:{value:t}};return this.applyPropertiesUpdate(e,n)},this.setExcludedDays=async(e,t)=>{const n={excludedDays:{value:t}};return this.applyPropertiesUpdate(e,n)},y(this,ne,o)}async applyPropertiesUpdate(o,e){const n=await(await a(this,ne)).updateDateVariableProperties(o,JSON.stringify(e));return i(n)}}ne=new WeakMap;class ea{constructor(o,e){g(this,H);g(this,Jt);this.setValue=async(t,n)=>{const r=await a(this,H);let c;return Array.isArray(n)?c=n.map(d=>a(this,Jt).mapDataItemToEngine(d)):c=n,r.setVariableValue(t,c).then(d=>i(d))},this.getInjectedData=async t=>(await a(this,H)).getInjectedDataSourceVariableData(t).then(r=>i(r)).then(r=>{const c={...r,parsedData:null};return r.parsedData&&(c.parsedData={...r.parsedData,data:r.parsedData.data.map(d=>a(this,Jt).mapEngineToDataItem(d))}),c}),this.getInjectedItemById=async(t,n)=>{var p;const c=await(await a(this,H)).getVariableById(t).then(v=>i(v));Qr(c.parsedData)||wt({status:400,error:"Variable is not an injected data source variable"});const d=c.parsedData.value.itemIdPropertyName,w=(p=(await this.getInjectedData(t)).parsedData)==null?void 0:p.data.find(v=>{var S;return((S=v[d])==null?void 0:S.toString())===n.toString()});return w||wt({status:404,error:`Item not found in injected data for variable ${t}`}),{success:!0,status:200,parsedData:{data:w,continuationToken:null,previousPageToken:null}}},this.setInjectedModel=async(t,n)=>{const r=n.properties,c=n.itemIdPropertyName;return(await a(this,H)).setInjectedDataSourceVariableModel(t,JSON.stringify(r),c).then(u=>i(u))},this.setSourceType=async(t,n)=>(await a(this,H)).setDataSourceVariableSourceType(t,n).then(c=>i(c)),this.setConnector=async(t,n)=>{const r=await a(this,H),d=new le().makeConnectorSourceForwardsCompatible(n);return r.setDataSourceVariableConnector(t,JSON.stringify(d)).then(u=>i(u))},this.removeConnector=async t=>(await a(this,H)).setDataSourceVariableConnector(t,null).then(r=>i(r)),y(this,H,o),y(this,Jt,e)}async setDisplayOptions(o,e,t){return(await a(this,H)).setDataSourceVariableDisplayOptions(o,e,t??void 0).then(r=>i(r))}}H=new WeakMap,Jt=new WeakMap;let en=(Hn=class{constructor(o,e){g(this,C);g(this,Ut);g(this,kt);this.getAll=async()=>(await a(this,C)).getVariables().then(n=>i(n)).then(n=>{const r=n;return r.parsedData&&(r.parsedData=this.makeVariablesBackwardsCompatible(r.parsedData)),r}),this.getById=async t=>(await a(this,C)).getVariableById(t).then(r=>i(r)).then(r=>{const c=r;return c.parsedData&&(c.parsedData=this.makeVariableBackwardsCompatible(c.parsedData)),c}),this.getByName=async t=>(await a(this,C)).getVariableByName(t).then(r=>i(r)).then(r=>{const c=r;return c.parsedData&&(c.parsedData=this.makeVariableBackwardsCompatible(c.parsedData)),c}),this.create=async(t,n)=>(await a(this,C)).addVariable(t,n).then(c=>i(c)),this.remove=async t=>(await a(this,C)).removeVariables(t).then(r=>i(r)),this.rename=async(t,n)=>(await a(this,C)).setVariableName(t,n).then(c=>i(c)),this.setLabel=async(t,n)=>(await a(this,C)).setVariableLabel(t,n).then(c=>i(c)),y(this,Ut,async(t,n)=>(await a(this,C)).setVariablePlaceholder(t,n).then(c=>i(c))),this.setPlaceholder=async(t,n)=>a(this,Ut).call(this,t,n),this.resetPlaceholder=async t=>a(this,Ut).call(this,t,null),y(this,kt,async(t,n)=>(await a(this,C)).setVariableHelpText(t,n).then(c=>i(c))),this.setHelpText=async(t,n)=>a(this,kt).call(this,t,n),this.resetHelpText=async t=>a(this,kt).call(this,t,null),this.setType=async(t,n)=>(await a(this,C)).setVariableType(t,n).then(c=>i(c)),this.setRuleSetId=async(t,n)=>(await a(this,C)).setVariableRuleSetId(t,n).then(c=>i(c)),this.setListVariable=async(t,n)=>(await a(this,C)).setListVariableItems(t,n.map(c=>JSON.stringify({value:c}))).then(c=>i(c)),this.setValue=async(t,n)=>(await a(this,C)).setVariableValue(t,n).then(c=>i(c,d=>Br(d,{id:t}))),this.duplicate=async t=>(await a(this,C)).duplicateVariable(t).then(r=>i(r)),this.groupVariables=async(t,n)=>(await a(this,C)).groupVariables(t,n).then(c=>i(c)),this.ungroupVariables=async t=>(await a(this,C)).ungroupVariable(t).then(r=>i(r)),this.move=async(t,n,r)=>(await a(this,C)).moveVariable(n,r,t).then(d=>i(d)),this.moveVariables=async(t,n,r)=>(await a(this,C)).moveVariables(n,r,t).then(d=>i(d)),this.setIsVisible=async(t,n)=>{const r=n?{type:Lt.visible}:{type:Lt.invisible};return this.setVariableVisibility(t,r)},this.setIsHidden=async(t,n)=>{const r=n?{type:Lt.invisible}:{type:Lt.visible};return this.setVariableVisibility(t,r)},this.setVariableVisibility=async(t,n)=>(await a(this,C)).setVariableVisibility(t,JSON.stringify(n)).then(c=>i(c)),this.setLayoutsForVariableVisibility=async t=>(await a(this,C)).setLayoutsForVariableVisibility(t?JSON.stringify(t):null).then(r=>i(r)),this.setIsRequired=async(t,n)=>(await a(this,C)).setVariableIsRequired(t,n).then(c=>i(c)),this.setRemoveParagraphIfEmpty=async(t,n)=>(await a(this,C)).setVariableRemoveParagraphIfEmpty(t,n).then(c=>i(c)),this.setVariableCharacterLimit=async(t,n)=>(await a(this,C)).setVariableCharacterLimit(t,n).then(c=>i(c)),this.setIsReadonly=async(t,n)=>(await a(this,C)).setVariableIsReadonly(t,n).then(c=>i(c)),this.getImageVariableConnectorId=async t=>(await a(this,C)).getImageVariableConnectorId(t).then(r=>i(r)),this.setImageVariableConnector=async(t,n)=>{const r=await a(this,C),d=new le().makeConnectorSourceForwardsCompatible(n);return r.setImageVariableConnector(t,JSON.stringify(d)).then(u=>i(u))},this.setImageVariableValueWithContext=async(t,n,r)=>(await a(this,C)).setImageVariableValueWithContext(t,n,JSON.stringify(r)).then(d=>i(d)),this.removeSource=async t=>this.setValue(t,null),this.setPrefix=async(t,n)=>{const r={prefix:{value:n}};return this.applyPrefixSuffixDeltaUpdate(t,r)},this.setSuffix=async(t,n)=>{const r={suffix:{value:n}};return this.applyPrefixSuffixDeltaUpdate(t,r)},this.setPrefixCharacterStyle=async(t,n)=>{const r={prefixCharacterStyleId:{value:n}};return this.applyPrefixSuffixDeltaUpdate(t,r)},this.setSuffixCharacterStyle=async(t,n)=>{const r={suffixCharacterStyleId:{value:n}};return this.applyPrefixSuffixDeltaUpdate(t,r)},this.setPrivateData=async(t,n)=>(await a(this,C)).setVariablePrivateData(t,JSON.stringify(n)).then(c=>i(c)),this.getPrivateData=async t=>(await a(this,C)).getVariablePrivateData(t).then(r=>i(r)),this.setAllowImageQuery=async(t,n)=>(await a(this,C)).setImageVariableAllowQuery(t,n).then(c=>i(c)),this.setAllowImageUpload=async(t,n)=>(await a(this,C)).setImageVariableAllowUpload(t,n).then(c=>i(c)),this.setMinImageUploadSize=async(t,n,r)=>(await a(this,C)).setImageVariableUploadMinSize(t,n,r).then(d=>i(d)),this.setIsDontBreak=async(t,n)=>(await a(this,C)).setVariableIsDontBreak(t,n).then(c=>i(c)),this.highlightUsages=async t=>(await a(this,C)).highlightVariableUsages(t).then(r=>i(r)),this.setRichTextRules=async t=>(await a(this,C)).setRichTextRulesets(JSON.stringify(t)).then(r=>i(r)),y(this,C,o),this.number=new Xr(a(this,C)),this.date=new ta(a(this,C)),this.dataSource=new ea(a(this,C),e)}makeVariablesBackwardsCompatible(o){return o.map(e=>this.makeVariableBackwardsCompatible(e))}makeVariableBackwardsCompatible(o){return o.type!==Kt.list?o:this.makeListVariableBackwardsCompatible(o)}makeListVariableBackwardsCompatible(o){const e=o,t=o.items,n=o.selected,r=t.map(c=>c.value);return e.items=r,e.selected=n==null?void 0:n.value,e}async applyPrefixSuffixDeltaUpdate(o,e){const n=await(await a(this,C)).updateVariablePrefixSuffixProperties(o,JSON.stringify(e));return i(n)}},C=new WeakMap,Ut=new WeakMap,kt=new WeakMap,Hn);class sa{constructor(o){g(this,Gt);this.get=async()=>(await a(this,Gt)).getBrandKit().then(t=>i(t)),this.set=async e=>(await a(this,Gt)).setBrandKit(JSON.stringify(e)).then(n=>i(n)),y(this,Gt,o)}}Gt=new WeakMap;class na{constructor(o){this.onVariableListChanged=e=>{this.config.events.onVariableListChanged.trigger(JSON.parse(e))},this.onConnectorsChanged=e=>{this.config.events.onConnectorsChanged.trigger(JSON.parse(e))},this.onPageSizeChanged=e=>{this.config.events.onPageSizeChanged.trigger(JSON.parse(e))},this.onEngineEditModeChanged=e=>{this.config.events.onEngineEditModeChanged.trigger(JSON.parse(e))},this.config=o}}class ra{constructor(o){g(this,gt);this.getAll=async()=>(await a(this,gt)).getVariables().then(t=>i(t)),this.getById=async e=>(await a(this,gt)).getVariableById(e).then(n=>i(n)),this.getByName=async e=>(await a(this,gt)).getVariableByName(e).then(n=>i(n)),this.setListVariable=async(e,t)=>(await a(this,gt)).setListVariableItems(e,t.map(r=>JSON.stringify(r))).then(r=>i(r)),y(this,gt,o),this.image=new aa(o),this.dataSource=new ia(o)}}gt=new WeakMap;class aa{constructor(o){g(this,st);this.setAllowQuery=async(e,t)=>(await a(this,st)).setImageVariableAllowQuery(e,t).then(r=>i(r)),this.setAllowUpload=async(e,t)=>(await a(this,st)).setImageVariableAllowUpload(e,t).then(r=>i(r)),this.setMinUploadSize=async(e,t,n)=>(await a(this,st)).setImageVariableUploadMinSize(e,t,n).then(c=>i(c)),this.setConnector=async(e,t)=>(await a(this,st)).setImageVariableConnector(e,JSON.stringify(t)).then(r=>i(r)),this.setConnectorContext=async(e,t)=>(await a(this,st)).setImageVariableConnectorContext(e,JSON.stringify(t)).then(r=>i(r)),y(this,st,o)}}st=new WeakMap;class ia{constructor(o){g(this,re);this.setConnector=async(e,t)=>(await a(this,re)).setDataSourceVariableConnector(e,JSON.stringify(t)).then(r=>i(r)),y(this,re,o)}}re=new WeakMap;class oa{constructor(o){g(this,It);this.register=async e=>(await a(this,It)).registerConnector(JSON.stringify(e)).then(n=>i(n)),this.getById=async e=>(await a(this,It)).getConnectorById(e).then(n=>i(n)),this.getAllByType=async e=>(await a(this,It)).getConnectors(e).then(n=>i(n)),y(this,It,o)}}It=new WeakMap;class ca{constructor(o){g(this,_t);g(this,ye);this.setWidth=async e=>(await a(this,_t)).setPageWidth(e).then(n=>i(n)),this.setHeight=async e=>(await a(this,_t)).setPageHeight(e).then(n=>i(n)),y(this,_t,o),y(this,ye,o)}}_t=new WeakMap,ye=new WeakMap;class sn{constructor(o,e,t){this.config=o,this.connection=e,this.editorAPI=t,this.subscriber=new na(o),this.variable=new ra(this.editorAPI),this.connector=new oa(this.editorAPI),this.page=new ca(this.editorAPI),this.canvas=new me(this.editorAPI),this.brandKit=new sa(this.editorAPI)}}class nn{constructor(o){this.logger=o}createEventHandlerFn(o,e){return(...n)=>{try{const r=o(...n);return r instanceof Promise?r.catch(c=>this.handleError(c,e,o.name)):r}catch(r){this.handleError(r,e,o.name)}}}handleError(o,e,t){var n;if(e===Wt.log)(n=this.logger)==null||n.call(this,J.error,Qs.event,`Error in callback ${t}: ${o}`);else throw o}}class rn extends nn{constructor(o,e){super(e),this.handler=o}trigger(...o){const e=this.handler();if(e)return this.createEventHandlerFn(e,Wt.throw)(...o)}}class m extends nn{constructor(o,e){super(e),this.legacyHandler=o,this.subscriptions=new Set}trigger(...o){const e=this.legacyHandler();e&&this.createEventHandlerFn(e,Wt.log)(...o);for(const t of this.subscriptions)t(...o)}registerCallback(o,e=Wt.log){const t=this.createEventHandlerFn(o,e);return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}}class Ae{static createRuntimeConfig(o){var t,n,r,c,d,u,w,p,v,S,I,N,O,b,X,$,A,nt,rt,xt,$t,xn,$n,jn,zn,Kn,Wn,qn,Yn,Zn,Qn,Xn,tr,er,sr;const e={...o};return e.logging={logLevel:((t=o.logging)==null?void 0:t.logLevel)||J.error,logger:((n=o.logging)==null?void 0:n.logger)||((ie,Pe,Ee)=>{var nr;if(Ae.isLoggingEnabled(ie,((nr=e.logging)==null?void 0:nr.logLevel)??J.error))switch(ie){case J.error:console.error(`[${Pe}] [${ie}] ${Ee}`);break;case J.warn:console.warn(`[${Pe}] [${ie}] ${Ee}`);break;default:console.log(`[${Pe}] [${ie}] ${Ee}`)}})},e.handlers={onAuthExpired:new rn(()=>e.onAuthExpired,(r=e.logging)==null?void 0:r.logger),onViewportRequested:new rn(()=>e.onViewportRequested,(c=e.logging)==null?void 0:c.logger)},e.events={onActionsChanged:new m(()=>e.onActionsChanged,(d=e.logging)==null?void 0:d.logger),onStateChanged:new m(()=>e.onStateChanged,(u=e.logging)==null?void 0:u.logger),onDocumentLoaded:new m(()=>e.onDocumentLoaded,(w=e.logging)==null?void 0:w.logger),onSelectedFramesLayoutChanged:new m(()=>e.onSelectedFramesLayoutChanged,(p=e.logging)==null?void 0:p.logger),onFramesLayoutChanged:new m(()=>e.onFramesLayoutChanged,(v=e.logging)==null?void 0:v.logger),onSelectedFramesContentChanged:new m(()=>e.onSelectedFramesContentChanged,(S=e.logging)==null?void 0:S.logger),onPageSelectionChanged:new m(()=>e.onPageSelectionChanged,(I=e.logging)==null?void 0:I.logger),onSelectedLayoutPropertiesChanged:new m(()=>e.onSelectedLayoutPropertiesChanged,(N=e.logging)==null?void 0:N.logger),onSelectedLayoutUnitChanged:new m(()=>e.onSelectedLayoutUnitChanged,(O=e.logging)==null?void 0:O.logger),onScrubberPositionChanged:new m(()=>e.onScrubberPositionChanged,(b=e.logging)==null?void 0:b.logger),onFrameAnimationsChanged:new m(()=>e.onFrameAnimationsChanged,(X=e.logging)==null?void 0:X.logger),onVariableListChanged:new m(()=>e.onVariableListChanged,($=e.logging)==null?void 0:$.logger),onSelectedToolChanged:new m(()=>e.onSelectedToolChanged,(A=e.logging)==null?void 0:A.logger),onUndoStackStateChanged:new m(()=>e.onUndoStackStateChanged,(nt=e.logging)==null?void 0:nt.logger),onSelectedLayoutFramesChanged:new m(()=>e.onSelectedLayoutFramesChanged,(rt=e.logging)==null?void 0:rt.logger),onSelectedTextStyleChanged:new m(()=>e.onSelectedTextStyleChanged,(xt=e.logging)==null?void 0:xt.logger),onColorsChanged:new m(()=>e.onColorsChanged,($t=e.logging)==null?void 0:$t.logger),onParagraphStylesChanged:new m(()=>e.onParagraphStylesChanged,(xn=e.logging)==null?void 0:xn.logger),onCharacterStylesChanged:new m(()=>e.onCharacterStylesChanged,($n=e.logging)==null?void 0:$n.logger),onFontFamiliesChanged:new m(()=>e.onFontFamiliesChanged,(jn=e.logging)==null?void 0:jn.logger),onSelectedLayoutIdChanged:new m(()=>e.onSelectedLayoutIdChanged,(zn=e.logging)==null?void 0:zn.logger),onLayoutsChanged:new m(()=>e.onLayoutsChanged,(Kn=e.logging)==null?void 0:Kn.logger),onConnectorEvent:new m(()=>e.onConnectorEvent,(Wn=e.logging)==null?void 0:Wn.logger),onConnectorsChanged:new m(()=>e.onConnectorsChanged,(qn=e.logging)==null?void 0:qn.logger),onZoomChanged:new m(()=>e.onZoomChanged,(Yn=e.logging)==null?void 0:Yn.logger),onSelectedPageIdChanged:new m(()=>e.onSelectedPageIdChanged,e.logging.logger),onPagesChanged:new m(()=>e.onPagesChanged,e.logging.logger),onPageSnapshotInvalidated:new m(()=>e.onPageSnapshotInvalidated,e.logging.logger),onPageSizeChanged:new m(()=>e.onPageSizeChanged,(Zn=e.logging)==null?void 0:Zn.logger),onShapeCornerRadiusChanged:new m(()=>e.onShapeCornerRadiusChanged,(Qn=e.logging)==null?void 0:Qn.logger),onCropActiveFrameIdChanged:new m(()=>e.onCropActiveFrameIdChanged,(Xn=e.logging)==null?void 0:Xn.logger),onAsyncError:new m(()=>e.onAsyncError,(tr=e.logging)==null?void 0:tr.logger),onViewModeChanged:new m(()=>e.onViewModeChanged,(er=e.logging)==null?void 0:er.logger),onBarcodeValidationChanged:new m(()=>e.onBarcodeValidationChanged,(sr=e.logging)==null?void 0:sr.logger),onDataSourceIdChanged:new m(()=>e.onDataSourceIdChanged,e.logging.logger),onInjectedDataChanged:new m(()=>e.onInjectedDataChanged,e.logging.logger),onDocumentIssueListChanged:new m(()=>e.onDocumentIssueListChanged,e.logging.logger),onCustomUndoDataChanged:new m(()=>e.onCustomUndoDataChanged,e.logging.logger),onEngineEditModeChanged:new m(()=>e.onEngineEditModeChanged,e.logging.logger),onBrandKitMediaChanged:new m(()=>e.onBrandKitMediaChanged,e.logging.logger)},e}static isLoggingEnabled(o,e){return e==J.info||e==J.warn&&(o==J.warn||o==J.error)?!0:e==J.error&&o==J.error}}class ha{isDatePropertyWrapper(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&"type"in o&&o.type==="date"&&"chiliReservedTag"in o&&o.chiliReservedTag==="date"}isDateObject(o){return o instanceof Date}mapEngineToDataItem(o){const e={};return Object.entries(o).forEach(([t,n])=>{e[t]=this.isDatePropertyWrapper(n)?new Date(n.value):n}),e}mapDataItemToEngine(o){const e={};return Object.entries(o).forEach(([t,n])=>{e[t]=this.isDateObject(n)?{value:n.getTime(),type:"date",chiliReservedTag:"date"}:n}),e}}class da{constructor(o){g(this,yt);y(this,yt,o)}async getValue(o){return(await a(this,yt)).getConfigValue(o).then(t=>i(t))}async setValue(o,e){return(await a(this,yt)).setConfigValue(o,e).then(n=>i(n))}async updateStudioOptions(o){return(await a(this,yt)).updateStudioOptions(JSON.stringify(o)).then(t=>i(t))}async getEngineSessionId(){return(await a(this,yt)).getEngineSessionId().then(e=>i(e))}getLatestSmartCropVersion(){return zr}}yt=new WeakMap;class an extends da{constructor(e,t){super(e);g(this,Ht);y(this,Ht,t)}async getValue(e){const t=a(this,Ht).get(e);return t!=null?i({status:200,success:!0,parsedData:t,data:t},!1):super.getValue(e)}async setValue(e,t){const n=super.setValue(e,t);return a(this,Ht).set(e,t),n}}Ht=new WeakMap;class on{constructor(o){g(this,x);this.getAll=async()=>(await a(this,x)).getGradients().then(t=>i(t)),this.getById=async e=>(await a(this,x)).getGradientById(e).then(n=>i(n)),this.create=async()=>(await a(this,x)).createGradient().then(t=>i(t)),this.duplicate=async e=>(await a(this,x)).duplicateGradient(e).then(n=>i(n)),this.move=async(e,t)=>(await a(this,x)).moveGradients(e,t).then(r=>i(r)),this.rename=async(e,t)=>(await a(this,x)).renameGradient(e,t).then(r=>i(r)),this.update=async(e,t)=>{const n=await a(this,x),r=t;return n.updateGradient(e,JSON.stringify(r)).then(c=>i(c))},this.remove=async e=>(await a(this,x)).removeGradient(e).then(n=>i(n)),y(this,x,o)}}x=new WeakMap;class cn{constructor(o){g(this,At);g(this,ae);this.query=async(e,t,n={})=>(await a(this,At)).componentConnectorQuery(e,JSON.stringify(t),JSON.stringify(n)).then(c=>i(c)),this.preview=async(e,t,n,r={})=>(await a(this,ae)).componentConnectorPreview(e,t,n,JSON.stringify(r)).then(d=>{if(d instanceof Uint8Array)return d;throw typeof d=="object"&&d!==null&&"success"in d&&!d.success&&wt(d),new Error(`Unexpected response type: ${typeof d}.`)}),this.getConfigurationOptions=async e=>(await a(this,At)).componentConnectorGetConfigurationOptions(e).then(n=>i(n)),this.getCapabilities=async e=>(await a(this,At)).componentConnectorGetCapabilities(e).then(n=>i(n)),y(this,At,o),y(this,ae,o)}}At=new WeakMap,ae=new WeakMap;class hn{constructor(o){g(this,Pt);this.linkVariable=async(e,t,n,r)=>(await a(this,Pt)).linkComponentVariable(e,t,n,r??null).then(d=>i(d)),this.getComponentVariables=async e=>(await a(this,Pt)).getComponentVariables(e).then(n=>i(n)),this.setFitMode=async(e,t)=>(await a(this,Pt)).setComponentLayoutFit(e,t).then(r=>i(r)),y(this,Pt,o)}}Pt=new WeakMap;class dn{constructor(o){g(this,Q);this.updateSettings=async(e,t)=>(await a(this,Q)).updateComponentGridSettings(e,JSON.stringify(t)).then(r=>i(r)),this.setMapping=async(e,t,n,r,c)=>(await a(this,Q)).setComponentGridMapping(e,t,n,r,c).then(u=>i(u)),this.resetSettings=async e=>(await a(this,Q)).resetComponentGridSettings(e).then(n=>i(n)),this.setComponentSource=async(e,t)=>(await a(this,Q)).setComponentGridComponentSource(e,t?JSON.stringify(t):null).then(r=>i(r)),this.setDataSourceVariable=async(e,t)=>(await a(this,Q)).setComponentGridDataSourceVariable(e,t).then(r=>i(r)),this.setResizeMode=async(e,t)=>(await a(this,Q)).setComponentGridResizeMode(e,t).then(r=>i(r)),y(this,Q,o)}}Q=new WeakMap;const la=`https://studio-cdn.chiligrafx.com/editor/${V.current}/web`;let it;class ua{constructor(o){this.localConfig=new Map,this.dataItemMappingTools=new ha,this.loadEditor=()=>{var e;Lr(this.config.editorLink||la,{onActionsChanged:this.subscriber.onActionsChanged,onStateChanged:this.subscriber.onStateChanged,onAuthExpired:this.subscriber.onAuthExpired,onViewportRequested:this.subscriber.onViewportRequested,onDocumentLoaded:this.subscriber.onDocumentLoaded,onSelectedFramesContentChanged:this.subscriber.onSelectedFramesContentChanged,onSelectedFramesLayoutChanged:this.subscriber.onSelectedFramesLayoutChanged,onFramesLayoutChanged:this.subscriber.onFramesLayoutChanged,onSelectedLayoutPropertiesChanged:this.subscriber.onSelectedLayoutPropertiesChanged,onSelectedLayoutUnitChanged:this.subscriber.onSelectedLayoutUnitChanged,onPageSelectionChanged:this.subscriber.onPageSelectionChanged,onScrubberPositionChanged:this.subscriber.onAnimationPlaybackChanged,onFrameAnimationsChanged:this.subscriber.onAnimationChanged,onVariableListChanged:t=>{var n;(n=this.enabledNextSubscribers)!=null&&n.onVariableListChanged?this.next.subscriber.onVariableListChanged(t):this.subscriber.onVariableListChanged(t)},onSelectedToolChanged:this.subscriber.onSelectedToolChanged,onUndoStateChanged:this.subscriber.onUndoStateChanged,onSelectedLayoutFramesChanged:this.subscriber.onSelectedLayoutFramesChanged,onSelectedTextStyleChanged:this.subscriber.onSelectedTextStyleChanged,onColorsChanged:this.subscriber.onColorsChanged,onParagraphStylesChanged:this.subscriber.onParagraphStylesChanged,onCharacterStylesChanged:this.subscriber.onCharacterStylesChanged,onFontFamiliesChanged:this.subscriber.onFontFamiliesChanged,onSelectedLayoutIdChanged:this.subscriber.onSelectedLayoutIdChanged,onLayoutsChanged:this.subscriber.onLayoutsChanged,onConnectorEvent:this.subscriber.onConnectorEvent,onConnectorsChanged:t=>{var n;(n=this.enabledNextSubscribers)!=null&&n.onConnectorsChanged?this.next.subscriber.onConnectorsChanged(t):this.subscriber.onConnectorsChanged(t)},onZoomChanged:this.subscriber.onZoomChanged,onSelectedPageIdChanged:this.subscriber.onSelectedPageIdChanged,onPagesChanged:this.subscriber.onPagesChanged,onPageSnapshotInvalidated:this.subscriber.onPageSnapshotInvalidated,onPageSizeChanged:t=>{var n;(n=this.enabledNextSubscribers)!=null&&n.onPageSizeChanged?this.next.subscriber.onPageSizeChanged(t):this.subscriber.onPageSizeChanged(t)},onShapeCornerRadiusChanged:this.subscriber.onShapeCornerRadiusChanged,onCropActiveFrameIdChanged:this.subscriber.onCropActiveFrameIdChanged,onAsyncError:this.subscriber.onAsyncError,onViewModeChanged:this.subscriber.onViewModeChanged,onBarcodeValidationChanged:this.subscriber.onBarcodeValidationChanged,onDataSourceIdChanged:this.subscriber.onDataSourceIdChanged,onInjectedDataChanged:this.subscriber.onInjectedDataChanged,onDocumentIssueListChanged:this.subscriber.onDocumentIssueListChanged,onCustomUndoDataChanged:this.subscriber.onCustomUndoDataChanged,onEngineEditModeChanged:this.subscriber.onEngineEditModeChanged,onBrandKitMediaChanged:this.subscriber.onBrandKitMediaChanged},this.setConnection,this.config.editorId,this.config.studioStyling,t=>{var n,r;(r=(n=this.config).onConnectionError)==null||r.call(n,t)}),this.editorAPI=it==null?void 0:it.promise.then(t=>t),this.action=new Ue(this.editorAPI),this.layout=new Js(this.editorAPI),this.frame=new Bs(this.editorAPI),this.barcode=new je(this.editorAPI),this.component=new hn(this.editorAPI),this.animation=new ke(this.editorAPI),this.document=new ys(this.editorAPI),this.configuration=new an(this.editorAPI,this.localConfig),this.utils=new tn(this.editorAPI,this.localConfig),this.tool=new Ys(this.editorAPI),this.page=new ks(this.editorAPI),this.debug=new gs(this.editorAPI),this.undoManager=new Zs(this.editorAPI,this),this.textSelection=new zs(this.editorAPI),this.colorStyle=new Ze(this.editorAPI),this.gradientStyle=new on(this.editorAPI),this.paragraphStyle=new Gs(this.editorAPI),this.characterStyle=new Ke(this.editorAPI),this.mediaConnector=new Us(this.editorAPI),this.fontConnector=new Ms(this.editorAPI),this.componentConnector=new cn(this.editorAPI),this.dataConnector=new ls(this.editorAPI,this.dataItemMappingTools),this.dataSource=new us(this.editorAPI,this.dataItemMappingTools),this.connector=new ds(this.editorAPI,this.localConfig),this.variable=new en(this.editorAPI,this.dataItemMappingTools),this.font=new Vs(this.editorAPI),this.experiment=new Rs(this.editorAPI),this.canvas=new me(this.editorAPI),this.shape=new be(this.editorAPI),this.colorConversion=new qe(this.editorAPI),this.info=new Ts,this.clipboard=new We(this.editorAPI),this.brandKit=new ze(this.editorAPI,this),this.componentGrid=new dn(this.editorAPI),this.next=new sn(this.config,this.connection,this.editorAPI),this.configuration.setValue(q.GraFxStudioSdkVersion,De.version),this.configuration.setValue(q.GraFxStudioDocumentType,this.config.documentType||Ce.template),this.configuration.updateStudioOptions(this.config.studioOptions||Nr),this.configuration.setValue(q.QueryCallCacheEnabled,((e=this.config.enableQueryCallCache)==null?void 0:e.toString())||"false")},this.setConnection=e=>{it=e},this.config=Ae.createRuntimeConfig(o),this.connection=it,this.editorAPI=it==null?void 0:it.promise.then(e=>e),this.action=new Ue(this.editorAPI),this.layout=new Js(this.editorAPI),this.frame=new Bs(this.editorAPI),this.shape=new be(this.editorAPI),this.barcode=new je(this.editorAPI),this.component=new hn(this.editorAPI),this.undoManager=new Zs(this.editorAPI,this),this.connector=new ds(this.editorAPI,this.localConfig),this.mediaConnector=new Us(this.editorAPI),this.fontConnector=new Ms(this.editorAPI),this.componentConnector=new cn(this.editorAPI),this.dataConnector=new ls(this.editorAPI,this.dataItemMappingTools),this.dataSource=new us(this.editorAPI,this.dataItemMappingTools),this.animation=new ke(this.editorAPI),this.document=new ys(this.editorAPI),this.configuration=new an(this.editorAPI,this.localConfig),this.variable=new en(this.editorAPI,this.dataItemMappingTools),this.utils=new tn(this.editorAPI,this.localConfig),this.subscriber=new Wr(this.config,this.localConfig),this.tool=new Ys(this.editorAPI),this.page=new ks(this.editorAPI),this.debug=new gs(this.editorAPI),this.textSelection=new zs(this.editorAPI),this.colorStyle=new Ze(this.editorAPI),this.gradientStyle=new on(this.editorAPI),this.paragraphStyle=new Gs(this.editorAPI),this.characterStyle=new Ke(this.editorAPI),this.font=new Vs(this.editorAPI),this.experiment=new Rs(this.editorAPI),this.canvas=new me(this.editorAPI),this.colorConversion=new qe(this.editorAPI),this.info=new Ts,this.clipboard=new We(this.editorAPI),this.next=new sn(this.config,this.connection,this.editorAPI),this.enabledNextSubscribers=this.config.enableNextSubscribers,this.brandKit=new ze(this.editorAPI,this),this.componentGrid=new dn(this.editorAPI)}}var ln=(s=>(s.top="top",s.left="left",s.right="right",s.bottom="bottom",s.topLeft="topLeft",s.topRight="topRight",s.bottomLeft="bottomLeft",s.bottomRight="bottomRight",s))(ln||{}),un=(s=>(s.horizontal="horizontal",s.vertical="vertical",s))(un||{}),gn=(s=>(s.easeIn="easeIn",s.easeOut="easeOut",s.easeInOut="easeInOut",s))(gn||{}),yn=(s=>(s.quadratic="Quadratic",s.cubic="Cubic",s.quartic="Quartic",s.quintic="Quintic",s.sine="Sine",s.exponential="Exponential",s.circular="Circular",s.elastic="Elastic",s.bounce="Bounce",s.back="Back",s))(yn||{}),pn=(s=>(s.bounce="bounce",s.flash="flash",s.headshake="headShake",s.heartbeat="heartbeat",s.pulse="pulse",s.rubberBand="rubberBand",s.vertical="vertical",s.horizontal="horizontal",s.swing="swing",s.tada="tada",s))(pn||{}),wn=(s=>(s.preview="preview",s.normal="normal",s))(wn||{}),Cn=(s=>(s.linear="linear",s))(Cn||{}),mn=(s=>(s.local="linearLocal",s.linearBrandKit="linearBrandKit",s))(mn||{}),fn=(s=>(s.Square="square",s.Line="line",s))(fn||{}),Sn=(s=>(s.thumbnail="thumbnail",s.highest="highest",s.medium="medium",s))(Sn||{}),bn=(s=>(s.BOLD="Bold",s.ITALIC="Italic",s.REGULAR="Regular",s))(bn||{}),vn=(s=>(s.LEFT="left",s.CENTER="center",s.RIGHT="right",s.JUSTIFY="justify",s))(vn||{}),In=(s=>(s.TOP="top",s.CENTER="center",s.BOTTOM="bottom",s))(In||{}),An=(s=>(s.TO_LOWER_CASE="lowercase",s.TO_UPPER_CASE="uppercase",s.NORMAL="normal",s))(An||{}),Pn=(s=>(s.SUPERSCRIPT="superscript",s.SUBSCRIPT="subscript",s.NORMAL="normal",s))(Pn||{}),En=(s=>(s.none="none",s.bullet="bullet",s.number="number",s))(En||{}),Dn=(s=>(s.STYLE="textStyle",s.PROPERTIES="textProperties",s.APPEARANCE="appearance",s))(Dn||{}),On=(s=>(s.PARAGRAPH="paragraphStyleId",s.CHARACTER="characterStyleId",s.FONT_FAMILY="fontKey",s.FONT_STYLE="fontStyle",s.FONT_SIZE="fontSize",s.LETTER_SPACING="letterSpacing",s.LINE_HEIGHT="lineHeight",s.TEXT_ALIGN="textAlign",s.VERTICAL_ALIGN="verticalAlign",s.TYPOGRAPHIC_CASE="typographicCase",s.SUB_SUPER_SCRIPT="subSuperScript",s.UNDERLINE="underline",s.LINE_THROUGH="lineThrough",s.FILL_COLOR="fillColor",s.COLOR="color",s.FILL_COLOR_APPLIED="fillColorApplied",s.STROKE_COLOR="strokeColor",s.STROKE_COLOR_APPLIED="strokeColorApplied",s.BACKGROUND_COLOR="backgroundColor",s.BACKGROUND_COLOR_APPLIED="backgroundColorApplied",s.DROP_SHADOW_COLOR="dropShadowColor",s.BLEND_MODE="blendMode",s.OPACITY="opacity",s.TRACKING_RIGHT="trackingRight",s.BASELINE_SHIFT="baselineShiftValue",s.STROKE_WIDTH="strokeWidth",s.MARKED_LIST_TYPE="markedListType",s.MARKED_LIST_GROUP="markedListGroup",s.MARKED_LIST_LEVEL="markedListLevel",s))(On||{}),Fn=(s=>(s.arabic="arabic",s.romanUpperCase="romanUpperCase",s.romanLowerCase="romanLowerCase",s.latinUpperCase="latinUpperCase",s.latinLowerCase="latinLowerCase",s))(Fn||{}),Ln=(s=>(s.none="none",s.dash="dash",s.dot="dot",s.colon="colon",s.roundBracket="roundBracket",s))(Ln||{}),Nn=(s=>(s.fixed="fixed",s))(Nn||{}),Rn=(s=>(s.selectedLayoutChanged="selectedLayoutChanged",s.frameMoved="frameMoved",s.pageSizeChanged="pageSizeChanged",s.documentLoaded="documentLoaded",s.variableValueChanged="variableValueChanged",s))(Rn||{}),Mn=(s=>(s.ellipse="ellipse",s.rectangle="rectangle",s.polygon="polygon",s))(Mn||{}),Vn=(s=>(s.all="all",s.only="only",s.none="none",s))(Vn||{}),Bn=(s=>(s.paragraph="paragraph",s.character="character",s.lineBreak="lineBreak",s.inlineStyle="inlineStyle",s))(Bn||{}),Tn=(s=>(s.exists="exists",s.missing="missing",s.equals="equals",s.notEquals="notEquals",s.contains="contains",s.startsWith="startsWith",s.endsWith="endsWith",s))(Tn||{}),Jn=(s=>(s.normal="normal",s.textEdit="textEdit",s.customCrop="customCrop",s.frameSubjectArea="frameSubjectArea",s.perAssetCrop="perAssetCrop",s.gradient="gradient",s))(Jn||{}),Un=(s=>(s.url="url",s.grafx="grafx",s.local="local",s))(Un||{});const ga=Object.freeze(Object.defineProperty({__proto__:null,ConnectorRegistrationSource:Un},Symbol.toStringTag,{value:"Module"}));h.ActionAsyncError=Ve,h.ActionEditorEvent=Rn,h.Alignment=vn,h.AnchorTargetEdgeType=Fs,h.AnchorTargetType=Os,h.AuthCredentialsTypeEnum=is,h.AuthRefreshTypeEnum=os,h.AutoGrowDirection=ws,h.BarcodeCharacterSet=Ct,h.BarcodeErrorCorrectionLevel=Et,h.BarcodeSourceTypeEnum=fs,h.BarcodeType=j,h.BarcodeValidationResult=Ge,h.BasicAnimationsEmphasisStyles=pn,h.BlendMode=Is,h.Case=An,h.ColorType=ce,h.ColorUsageType=Ye,h.ComponentFitEnum=ps,h.ComponentGridLayoutAlgorithm=Nn,h.ComponentPreviewType=Sn,h.ComponentSourceTypeEnum=Cs,h.ConnectorConfigContextType=ss,h.ConnectorConfigValueType=es,h.ConnectorEventType=as,h.ConnectorHttpError=Te,h.ConnectorMapping=kr,h.ConnectorMappingDirection=rs,h.ConnectorMappingSource=ns,h.ConnectorRegistrationSource=Ft,h.ConnectorStateType=de,h.ConnectorSupportedAuth=hs,h.ConnectorType=Qe,h.ConstraintMode=$e,h.CornerRadiusType=Vn,h.CropType=Se,h.DataRowAsyncError=Be,h.DataSourceVariableDisplayOptionsType=js,h.DataSourceVariableSourceType=Ie,h.Day=_s,h.DeprecatedMediaConnectorDownloadType=he,h.DeprecatedMediaType=Dt,h.DocumentIssueTypeEnum=Me,h.DocumentType=Ce,h.DownloadFormats=qs,h.EaseTypes=gn,h.EngineEditModeType=Jn,h.EnvironmentType=ge,h.FitMode=As,h.FitModePosition=Ps,h.FlowDirection=bs,h.FontPreviewFormat=fn,h.FontWeights=bn,h.FrameAnchorTarget=jr,h.FrameAnchorType=Ds,h.FrameEditingMode=Re,h.FramePropertyNames=Ks,h.FrameTypeEnum=ms,h.GradientType=Cn,h.GradientUsageType=mn,h.GrafxTokenAuthCredentials=_r,h.ImageSourceTypeEnum=zt,h.LayoutIntent=xe,h.LayoutPropertyNames=Ws,h.LayoutType=He,h.Locale=Hs,h.MarkedListType=En,h.MeasurementUnit=_e,h.MediaDownloadIntent=ve,h.MediaDownloadType=ue,h.MediaType=Ot,h.Next=ga,h.NumberListFormat=Fn,h.NumberListSeparatorSymbol=Ln,h.PageAnchorTarget=$r,h.PositionEnum=Y,h.RefreshedAuthCredendentials=Hr,h.SDKUnauthorizedError=Xs,h.Scripting=Pn,h.SelectedTextStyleSections=Dn,h.SelectedTextStyles=On,h.ShakeDirections=un,h.ShapeType=Mn,h.SlideDirections=ln,h.SmartCropAxisBias=Ns,h.SmartCropVersion=Ls,h.SortBy=Xe,h.SortOrder=ts,h.StructuredTextAttributeMatchOperator=Tn,h.StructuredTextStyleKind=Bn,h.TextDirection=Ss,h.TextPosition=In,h.ToolType=T,h.TweenTypes=yn,h.UpdateZIndexMethod=Es,h.UploadAssetValidationError=cs,h.UploadAssetValidationErrorType=fe,h.VariableType=Kt,h.VariableValueConstrainsViolationError=Je,h.VariableVisibilityOperator=$s,h.VariableVisibilityTargetType=xs,h.VariableVisibilityType=Lt,h.VerticalAlign=vs,h.ViewMode=wn,h.WellKnownConfigurationKeys=q,h.default=ua,h.grafxMediaConnectorRegistration=Gr,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
69
69
|
//# sourceMappingURL=main.js.map
|