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AKtP,WAEnB,EAEOstF,CACT,CAvLiC,CAuL/B3uF,EAAAA,WAEF2uF,EAAcmC,aAAe,CAC3BjB,WAAY,IAEdlB,EAAcrY,UAiIT,CAAC,EACN","sources":["../node_modules/@material-ui/core/esm/Collapse/Collapse.js","../node_modules/@material-ui/icons/Add.js","../node_modules/@material-ui/icons/AddCircle.js","../node_modules/@material-ui/icons/ArrowDropDown.js","../node_modules/@material-ui/icons/NavigateBefore.js","../node_modules/@material-ui/icons/NavigateNext.js","../node_modules/@material-ui/icons/Replay.js","../node_modules/lottie-react/compiled/hooks/useLottie.js","../node_modules/lottie-react/compiled/hooks/useLottieInteractivity.js","../node_modules/lottie-react/compiled/components/Lottie.js","../node_modules/lottie-web/build/player/lottie.js","../node_modules/dom-helpers/esm/removeClass.js","../node_modules/react-transition-group/esm/CSSTransition.js","../node_modules/dom-helpers/esm/addClass.js","../node_modules/dom-helpers/esm/hasClass.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { chainPropTypes } from '@material-ui/utils';\nimport { Transition } from 'react-transition-group';\nimport withStyles from '../styles/withStyles';\nimport { duration } from '../styles/transitions';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport { getTransitionProps } from '../transitions/utils';\nimport useTheme from '../styles/useTheme';\nimport { useForkRef } from '../utils';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n height: 0,\n overflow: 'hidden',\n transition: theme.transitions.create('height')\n },\n\n /* Styles applied to the root element when the transition has entered. */\n entered: {\n height: 'auto',\n overflow: 'visible'\n },\n\n /* Styles applied to the root element when the transition has exited and `collapsedSize` != 0px. */\n hidden: {\n visibility: 'hidden'\n },\n\n /* Styles applied to the outer wrapper element. */\n wrapper: {\n // Hack to get children with a negative margin to not falsify the height computation.\n display: 'flex'\n },\n\n /* Styles applied to the inner wrapper element. */\n wrapperInner: {\n width: '100%'\n }\n };\n};\n/**\r\n * The Collapse transition is used by the\r\n * [Vertical Stepper](/components/steppers/#vertical-stepper) StepContent component.\r\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\r\n */\n\nvar Collapse = /*#__PURE__*/React.forwardRef(function Collapse(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n collapsedHeight = props.collapsedHeight,\n _props$collapsedSize = props.collapsedSize,\n collapsedSizeProp = _props$collapsedSize === void 0 ? '0px' : _props$collapsedSize,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disableStrictM = props.disableStrictModeCompat,\n disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM,\n inProp = props.in,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n style = props.style,\n _props$timeout = props.timeout,\n timeout = _props$timeout === void 0 ? duration.standard : _props$timeout,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Transition : _props$TransitionComp,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"collapsedHeight\", \"collapsedSize\", \"component\", \"disableStrictModeCompat\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"timeout\", \"TransitionComponent\"]);\n\n var theme = useTheme();\n var timer = React.useRef();\n var wrapperRef = React.useRef(null);\n var autoTransitionDuration = React.useRef();\n var collapsedSize = typeof (collapsedHeight || collapsedSizeProp) === 'number' ? \"\".concat(collapsedHeight || collapsedSizeProp, \"px\") : collapsedHeight || collapsedSizeProp;\n React.useEffect(function () {\n return function () {\n clearTimeout(timer.current);\n };\n }, []);\n var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat;\n var nodeRef = React.useRef(null);\n var handleRef = useForkRef(ref, enableStrictModeCompat ? nodeRef : undefined);\n\n var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {\n return function (nodeOrAppearing, maybeAppearing) {\n if (callback) {\n var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing],\n _ref2 = _slicedToArray(_ref, 2),\n node = _ref2[0],\n isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n\n\n if (isAppearing === undefined) {\n callback(node);\n } else {\n callback(node, isAppearing);\n }\n }\n };\n };\n\n var handleEnter = normalizedTransitionCallback(function (node, isAppearing) {\n node.style.height = collapsedSize;\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n var handleEntering = normalizedTransitionCallback(function (node, isAppearing) {\n var wrapperHeight = wrapperRef.current ? wrapperRef.current.clientHeight : 0;\n\n var _getTransitionProps = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'enter'\n }),\n transitionDuration = _getTransitionProps.duration;\n\n if (timeout === 'auto') {\n var duration2 = theme.transitions.getAutoHeightDuration(wrapperHeight);\n node.style.transitionDuration = \"\".concat(duration2, \"ms\");\n autoTransitionDuration.current = duration2;\n } else {\n node.style.transitionDuration = typeof transitionDuration === 'string' ? transitionDuration : \"\".concat(transitionDuration, \"ms\");\n }\n\n node.style.height = \"\".concat(wrapperHeight, \"px\");\n\n if (onEntering) {\n onEntering(node, isAppearing);\n }\n });\n var handleEntered = normalizedTransitionCallback(function (node, isAppearing) {\n node.style.height = 'auto';\n\n if (onEntered) {\n onEntered(node, isAppearing);\n }\n });\n var handleExit = normalizedTransitionCallback(function (node) {\n var wrapperHeight = wrapperRef.current ? wrapperRef.current.clientHeight : 0;\n node.style.height = \"\".concat(wrapperHeight, \"px\");\n\n if (onExit) {\n onExit(node);\n }\n });\n var handleExited = normalizedTransitionCallback(onExited);\n var handleExiting = normalizedTransitionCallback(function (node) {\n var wrapperHeight = wrapperRef.current ? wrapperRef.current.clientHeight : 0;\n\n var _getTransitionProps2 = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'exit'\n }),\n transitionDuration = _getTransitionProps2.duration;\n\n if (timeout === 'auto') {\n var duration2 = theme.transitions.getAutoHeightDuration(wrapperHeight);\n node.style.transitionDuration = \"\".concat(duration2, \"ms\");\n autoTransitionDuration.current = duration2;\n } else {\n node.style.transitionDuration = typeof transitionDuration === 'string' ? transitionDuration : \"\".concat(transitionDuration, \"ms\");\n }\n\n node.style.height = collapsedSize;\n\n if (onExiting) {\n onExiting(node);\n }\n });\n\n var addEndListener = function addEndListener(nodeOrNext, maybeNext) {\n var next = enableStrictModeCompat ? nodeOrNext : maybeNext;\n\n if (timeout === 'auto') {\n timer.current = setTimeout(next, autoTransitionDuration.current || 0);\n }\n };\n\n return /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: inProp,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: addEndListener,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n timeout: timeout === 'auto' ? null : timeout\n }, other), function (state, childProps) {\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, classes.container, className, {\n 'entered': classes.entered,\n 'exited': !inProp && collapsedSize === '0px' && classes.hidden\n }[state]),\n style: _extends({\n minHeight: collapsedSize\n }, style),\n ref: handleRef\n }, childProps), /*#__PURE__*/React.createElement(\"div\", {\n className: classes.wrapper,\n ref: wrapperRef\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classes.wrapperInner\n }, children)));\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Collapse.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\r\n * The content node to be collapsed.\r\n */\n children: PropTypes.node,\n\n /**\r\n * Override or extend the styles applied to the component.\r\n * See [CSS API](#css) below for more details.\r\n */\n classes: chainPropTypes(PropTypes.object, function (props) {\n if (props.classes && props.classes.container) {\n throw new Error(['Material-UI: the classes.container key is deprecated.', 'Use `classes.root` instead', 'The name of the pseudo-class was changed for consistency.']).join('\\n');\n }\n\n return null;\n }),\n\n /**\r\n * @ignore\r\n */\n className: PropTypes.string,\n\n /**\r\n * The height of the container when collapsed.\r\n * @deprecated The prop was renamed to support the addition of horizontal orientation, use `collapsedSize` instead.\r\n */\n collapsedHeight: deprecatedPropType(PropTypes.oneOfType([PropTypes.number, PropTypes.string]), 'The prop was renamed to support the vertical orientation, use `collapsedSize` instead'),\n\n /**\r\n * The height of the container when collapsed.\r\n */\n collapsedSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\r\n * The component used for the root node.\r\n * Either a string to use a HTML element or a component.\r\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\r\n * Enable this prop if you encounter 'Function components cannot be given refs',\r\n * use `unstable_createStrictModeTheme`,\r\n * and can't forward the ref in the passed `Component`.\r\n */\n disableStrictModeCompat: PropTypes.bool,\n\n /**\r\n * If `true`, the component will transition in.\r\n */\n in: PropTypes.bool,\n\n /**\r\n * @ignore\r\n */\n onEnter: PropTypes.func,\n\n /**\r\n * @ignore\r\n */\n onEntered: PropTypes.func,\n\n /**\r\n * @ignore\r\n */\n onEntering: PropTypes.func,\n\n /**\r\n * @ignore\r\n */\n onExit: PropTypes.func,\n\n /**\r\n * @ignore\r\n */\n onExited: PropTypes.func,\n\n /**\r\n * @ignore\r\n */\n onExiting: PropTypes.func,\n\n /**\r\n * @ignore\r\n */\n style: PropTypes.object,\n\n /**\r\n * The duration for the transition, in milliseconds.\r\n * You may specify a single timeout for all transitions, or individually with an object.\r\n *\r\n * Set to 'auto' to automatically calculate transition time based on height.\r\n */\n timeout: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nCollapse.muiSupportAuto = true;\nexport default withStyles(styles, {\n name: 'MuiCollapse'\n})(Collapse);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"\n}), 'Add');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z\"\n}), 'AddCircle');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7 10l5 5 5-5z\"\n}), 'ArrowDropDown');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"\n}), 'NavigateBefore');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"\n}), 'NavigateNext');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z\"\n}), 'Replay');\n\nexports.default = _default;","import lottie from \"lottie-web\";\nimport React, { useEffect, useRef, useState, } from \"react\";\nconst useLottie = (props, style) => {\n const { animationData, loop, autoplay, initialSegment, onComplete, onLoopComplete, onEnterFrame, onSegmentStart, onConfigReady, onDataReady, onDataFailed, onLoadedImages, onDOMLoaded, onDestroy, \n // Specified here to take them out from the 'rest'\n lottieRef, renderer, name, assetsPath, rendererSettings, \n // TODO: find a better way to extract the html props to avoid specifying\n // all the props that we want to exclude (as you can see above)\n ...rest } = props;\n const [animationLoaded, setAnimationLoaded] = useState(false);\n const animationInstanceRef = useRef();\n const animationContainer = useRef(null);\n /*\n ======================================\n INTERACTION METHODS\n ======================================\n */\n /**\n * Play\n */\n const play = () => {\n var _a;\n (_a = animationInstanceRef.current) === null || _a === void 0 ? void 0 : _a.play();\n };\n /**\n * Stop\n */\n const stop = () => {\n var _a;\n (_a = animationInstanceRef.current) === null || _a === void 0 ? void 0 : _a.stop();\n };\n /**\n * Pause\n */\n const pause = () => {\n var _a;\n (_a = animationInstanceRef.current) === null || _a === void 0 ? void 0 : _a.pause();\n };\n /**\n * Set animation speed\n * @param speed\n */\n const setSpeed = (speed) => {\n var _a;\n (_a = animationInstanceRef.current) === null || _a === void 0 ? void 0 : _a.setSpeed(speed);\n };\n /**\n * Got to frame and play\n * @param value\n * @param isFrame\n */\n const goToAndPlay = (value, isFrame) => {\n var _a;\n (_a = animationInstanceRef.current) === null || _a === void 0 ? void 0 : _a.goToAndPlay(value, isFrame);\n };\n /**\n * Got to frame and stop\n * @param value\n * @param isFrame\n */\n const goToAndStop = (value, isFrame) => {\n var _a;\n (_a = animationInstanceRef.current) === null || _a === void 0 ? void 0 : _a.goToAndStop(value, isFrame);\n };\n /**\n * Set animation direction\n * @param direction\n */\n const setDirection = (direction) => {\n var _a;\n (_a = animationInstanceRef.current) === null || _a === void 0 ? void 0 : _a.setDirection(direction);\n };\n /**\n * Play animation segments\n * @param segments\n * @param forceFlag\n */\n const playSegments = (segments, forceFlag) => {\n var _a;\n (_a = animationInstanceRef.current) === null || _a === void 0 ? void 0 : _a.playSegments(segments, forceFlag);\n };\n /**\n * Set sub frames\n * @param useSubFrames\n */\n const setSubframe = (useSubFrames) => {\n var _a;\n (_a = animationInstanceRef.current) === null || _a === void 0 ? void 0 : _a.setSubframe(useSubFrames);\n };\n /**\n * Get animation duration\n * @param inFrames\n */\n const getDuration = (inFrames) => { var _a; return (_a = animationInstanceRef.current) === null || _a === void 0 ? void 0 : _a.getDuration(inFrames); };\n /**\n * Destroy animation\n */\n const destroy = () => {\n var _a;\n (_a = animationInstanceRef.current) === null || _a === void 0 ? void 0 : _a.destroy();\n // Removing the reference to the animation so separate cleanups are skipped.\n // Without it the internal `lottie-react` instance throws exceptions as it already cleared itself on destroy.\n animationInstanceRef.current = undefined;\n };\n /*\n ======================================\n LOTTIE\n ======================================\n */\n /**\n * Load a new animation, and if it's the case, destroy the previous one\n * @param {Object} forcedConfigs\n */\n const loadAnimation = (forcedConfigs = {}) => {\n var _a;\n // Return if the container ref is null\n if (!animationContainer.current) {\n return;\n }\n // Destroy any previous instance\n (_a = animationInstanceRef.current) === null || _a === void 0 ? void 0 : _a.destroy();\n // Build the animation configuration\n const config = {\n ...props,\n ...forcedConfigs,\n container: animationContainer.current,\n };\n // Save the animation instance\n animationInstanceRef.current = lottie.loadAnimation(config);\n setAnimationLoaded(!!animationInstanceRef.current);\n // Return a function that will clean up\n return () => {\n var _a;\n (_a = animationInstanceRef.current) === null || _a === void 0 ? void 0 : _a.destroy();\n animationInstanceRef.current = undefined;\n };\n };\n /**\n * (Re)Initialize when animation data changed\n */\n useEffect(() => {\n const onUnmount = loadAnimation();\n // Clean up on unmount\n return () => onUnmount === null || onUnmount === void 0 ? void 0 : onUnmount();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animationData, loop]);\n // Update the autoplay state\n useEffect(() => {\n if (!animationInstanceRef.current) {\n return;\n }\n animationInstanceRef.current.autoplay = !!autoplay;\n }, [autoplay]);\n // Update the initial segment state\n useEffect(() => {\n if (!animationInstanceRef.current) {\n return;\n }\n // When null should reset to default animation length\n if (!initialSegment) {\n animationInstanceRef.current.resetSegments(true);\n return;\n }\n // If it's not a valid segment, do nothing\n if (!Array.isArray(initialSegment) || !initialSegment.length) {\n return;\n }\n // If the current position it's not in the new segment\n // set the current position to start\n if (animationInstanceRef.current.currentRawFrame < initialSegment[0] ||\n animationInstanceRef.current.currentRawFrame > initialSegment[1]) {\n animationInstanceRef.current.currentRawFrame = initialSegment[0];\n }\n // Update the segment\n animationInstanceRef.current.setSegment(initialSegment[0], initialSegment[1]);\n }, [initialSegment]);\n /*\n ======================================\n EVENTS\n ======================================\n */\n /**\n * Reinitialize listener on change\n */\n useEffect(() => {\n const partialListeners = [\n { name: \"complete\", handler: onComplete },\n { name: \"loopComplete\", handler: onLoopComplete },\n { name: \"enterFrame\", handler: onEnterFrame },\n { name: \"segmentStart\", handler: onSegmentStart },\n { name: \"config_ready\", handler: onConfigReady },\n { name: \"data_ready\", handler: onDataReady },\n { name: \"data_failed\", handler: onDataFailed },\n { name: \"loaded_images\", handler: onLoadedImages },\n { name: \"DOMLoaded\", handler: onDOMLoaded },\n { name: \"destroy\", handler: onDestroy },\n ];\n const listeners = partialListeners.filter((listener) => listener.handler != null);\n if (!listeners.length) {\n return;\n }\n const deregisterList = listeners.map(\n /**\n * Handle the process of adding an event listener\n * @param {Listener} listener\n * @return {Function} Function that deregister the listener\n */\n (listener) => {\n var _a;\n (_a = animationInstanceRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener(listener.name, listener.handler);\n // Return a function to deregister this listener\n return () => {\n var _a;\n (_a = animationInstanceRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener(listener.name, listener.handler);\n };\n });\n // Deregister listeners on unmount\n return () => {\n deregisterList.forEach((deregister) => deregister());\n };\n }, [\n onComplete,\n onLoopComplete,\n onEnterFrame,\n onSegmentStart,\n onConfigReady,\n onDataReady,\n onDataFailed,\n onLoadedImages,\n onDOMLoaded,\n onDestroy,\n ]);\n /**\n * Build the animation view\n */\n const View = React.createElement(\"div\", { style: style, ref: animationContainer, ...rest });\n return {\n View,\n play,\n stop,\n pause,\n setSpeed,\n goToAndStop,\n goToAndPlay,\n setDirection,\n playSegments,\n setSubframe,\n getDuration,\n destroy,\n animationContainerRef: animationContainer,\n animationLoaded,\n animationItem: animationInstanceRef.current,\n };\n};\nexport default useLottie;\n","import { useEffect } from \"react\";\n// helpers\nexport function getContainerVisibility(container) {\n const { top, height } = container.getBoundingClientRect();\n const current = window.innerHeight - top;\n const max = window.innerHeight + height;\n return current / max;\n}\nexport function getContainerCursorPosition(container, cursorX, cursorY) {\n const { top, left, width, height } = container.getBoundingClientRect();\n const x = (cursorX - left) / width;\n const y = (cursorY - top) / height;\n return { x, y };\n}\nexport const useInitInteractivity = ({ wrapperRef, animationItem, mode, actions, }) => {\n useEffect(() => {\n const wrapper = wrapperRef.current;\n if (!wrapper || !animationItem || !actions.length) {\n return;\n }\n animationItem.stop();\n const scrollModeHandler = () => {\n let assignedSegment = null;\n const scrollHandler = () => {\n const currentPercent = getContainerVisibility(wrapper);\n // Find the first action that satisfies the current position conditions\n const action = actions.find(({ visibility }) => visibility &&\n currentPercent >= visibility[0] &&\n currentPercent <= visibility[1]);\n // Skip if no matching action was found!\n if (!action) {\n return;\n }\n if (action.type === \"seek\" &&\n action.visibility &&\n action.frames.length === 2) {\n // Seek: Go to a frame based on player scroll position action\n const frameToGo = action.frames[0] +\n Math.ceil(((currentPercent - action.visibility[0]) /\n (action.visibility[1] - action.visibility[0])) *\n action.frames[1]);\n //! goToAndStop must be relative to the start of the current segment\n animationItem.goToAndStop(frameToGo - animationItem.firstFrame - 1, true);\n }\n if (action.type === \"loop\") {\n // Loop: Loop a given frames\n if (assignedSegment === null) {\n // if not playing any segments currently. play those segments and save to state\n animationItem.playSegments(action.frames, true);\n assignedSegment = action.frames;\n }\n else {\n // if playing any segments currently.\n //check if segments in state are equal to the frames selected by action\n if (assignedSegment !== action.frames) {\n // if they are not equal. new segments are to be loaded\n animationItem.playSegments(action.frames, true);\n assignedSegment = action.frames;\n }\n else if (animationItem.isPaused) {\n // if they are equal the play method must be called only if lottie is paused\n animationItem.playSegments(action.frames, true);\n assignedSegment = action.frames;\n }\n }\n }\n if (action.type === \"play\" && animationItem.isPaused) {\n // Play: Reset segments and continue playing full animation from current position\n animationItem.resetSegments(true);\n animationItem.play();\n }\n if (action.type === \"stop\") {\n // Stop: Stop playback\n animationItem.goToAndStop(action.frames[0] - animationItem.firstFrame - 1, true);\n }\n };\n document.addEventListener(\"scroll\", scrollHandler);\n return () => {\n document.removeEventListener(\"scroll\", scrollHandler);\n };\n };\n const cursorModeHandler = () => {\n const handleCursor = (_x, _y) => {\n let x = _x;\n let y = _y;\n // Resolve cursor position if cursor is inside container\n if (x !== -1 && y !== -1) {\n // Get container cursor position\n const pos = getContainerCursorPosition(wrapper, x, y);\n // Use the resolved position\n x = pos.x;\n y = pos.y;\n }\n // Find the first action that satisfies the current position conditions\n const action = actions.find(({ position }) => {\n if (position &&\n Array.isArray(position.x) &&\n Array.isArray(position.y)) {\n return (x >= position.x[0] &&\n x <= position.x[1] &&\n y >= position.y[0] &&\n y <= position.y[1]);\n }\n if (position &&\n !Number.isNaN(position.x) &&\n !Number.isNaN(position.y)) {\n return x === position.x && y === position.y;\n }\n return false;\n });\n // Skip if no matching action was found!\n if (!action) {\n return;\n }\n // Process action types:\n if (action.type === \"seek\" &&\n action.position &&\n Array.isArray(action.position.x) &&\n Array.isArray(action.position.y) &&\n action.frames.length === 2) {\n // Seek: Go to a frame based on player scroll position action\n const xPercent = (x - action.position.x[0]) /\n (action.position.x[1] - action.position.x[0]);\n const yPercent = (y - action.position.y[0]) /\n (action.position.y[1] - action.position.y[0]);\n animationItem.playSegments(action.frames, true);\n animationItem.goToAndStop(Math.ceil(((xPercent + yPercent) / 2) *\n (action.frames[1] - action.frames[0])), true);\n }\n if (action.type === \"loop\") {\n animationItem.playSegments(action.frames, true);\n }\n if (action.type === \"play\") {\n // Play: Reset segments and continue playing full animation from current position\n if (animationItem.isPaused) {\n animationItem.resetSegments(false);\n }\n animationItem.playSegments(action.frames);\n }\n if (action.type === \"stop\") {\n animationItem.goToAndStop(action.frames[0], true);\n }\n };\n const mouseMoveHandler = (ev) => {\n handleCursor(ev.clientX, ev.clientY);\n };\n const mouseOutHandler = () => {\n handleCursor(-1, -1);\n };\n wrapper.addEventListener(\"mousemove\", mouseMoveHandler);\n wrapper.addEventListener(\"mouseout\", mouseOutHandler);\n return () => {\n wrapper.removeEventListener(\"mousemove\", mouseMoveHandler);\n wrapper.removeEventListener(\"mouseout\", mouseOutHandler);\n };\n };\n switch (mode) {\n case \"scroll\":\n return scrollModeHandler();\n case \"cursor\":\n return cursorModeHandler();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [mode, animationItem]);\n};\nconst useLottieInteractivity = ({ actions, mode, lottieObj, }) => {\n const { animationItem, View, animationContainerRef } = lottieObj;\n useInitInteractivity({\n actions,\n animationItem,\n mode,\n wrapperRef: animationContainerRef,\n });\n return View;\n};\nexport default useLottieInteractivity;\n","import { useEffect } from \"react\";\nimport useLottie from \"../hooks/useLottie\";\nimport useLottieInteractivity from \"../hooks/useLottieInteractivity\";\nconst Lottie = (props) => {\n var _a, _b, _c;\n const { style, interactivity, ...lottieProps } = props;\n /**\n * Initialize the 'useLottie' hook\n */\n const { View, play, stop, pause, setSpeed, goToAndStop, goToAndPlay, setDirection, playSegments, setSubframe, getDuration, destroy, animationContainerRef, animationLoaded, animationItem, } = useLottie(lottieProps, style);\n /**\n * Make the hook variables/methods available through the provided 'lottieRef'\n */\n useEffect(() => {\n if (props.lottieRef) {\n props.lottieRef.current = {\n play,\n stop,\n pause,\n setSpeed,\n goToAndPlay,\n goToAndStop,\n setDirection,\n playSegments,\n setSubframe,\n getDuration,\n destroy,\n animationContainerRef,\n animationLoaded,\n animationItem,\n };\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [(_a = props.lottieRef) === null || _a === void 0 ? void 0 : _a.current]);\n return useLottieInteractivity({\n lottieObj: {\n View,\n play,\n stop,\n pause,\n setSpeed,\n goToAndStop,\n goToAndPlay,\n setDirection,\n playSegments,\n setSubframe,\n getDuration,\n destroy,\n animationContainerRef,\n animationLoaded,\n animationItem,\n },\n actions: (_b = interactivity === null || interactivity === void 0 ? void 0 : interactivity.actions) !== null && _b !== void 0 ? _b : [],\n mode: (_c = interactivity === null || interactivity === void 0 ? void 0 : interactivity.mode) !== null && _c !== void 0 ? _c : \"scroll\",\n });\n};\nexport default Lottie;\n","(typeof navigator !== \"undefined\") && (function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lottie = factory());\n})(this, (function () { 'use strict';\n\n var svgNS = 'http://www.w3.org/2000/svg';\n var locationHref = '';\n var _useWebWorker = false;\n var initialDefaultFrame = -999999;\n\n var setWebWorker = function setWebWorker(flag) {\n _useWebWorker = !!flag;\n };\n\n var getWebWorker = function getWebWorker() {\n return _useWebWorker;\n };\n\n var setLocationHref = function setLocationHref(value) {\n locationHref = value;\n };\n\n var getLocationHref = function getLocationHref() {\n return locationHref;\n };\n\n function createTag(type) {\n // return {appendChild:function(){},setAttribute:function(){},style:{}}\n return document.createElement(type);\n }\n\n function extendPrototype(sources, destination) {\n var i;\n var len = sources.length;\n var sourcePrototype;\n\n for (i = 0; i < len; i += 1) {\n sourcePrototype = sources[i].prototype;\n\n for (var attr in sourcePrototype) {\n if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];\n }\n }\n }\n\n function getDescriptor(object, prop) {\n return Object.getOwnPropertyDescriptor(object, prop);\n }\n\n function createProxyFunction(prototype) {\n function ProxyFunction() {}\n\n ProxyFunction.prototype = prototype;\n return ProxyFunction;\n }\n\n // import Howl from '../../3rd_party/howler';\n var audioControllerFactory = function () {\n function AudioController(audioFactory) {\n this.audios = [];\n this.audioFactory = audioFactory;\n this._volume = 1;\n this._isMuted = false;\n }\n\n AudioController.prototype = {\n addAudio: function addAudio(audio) {\n this.audios.push(audio);\n },\n pause: function pause() {\n var i;\n var len = this.audios.length;\n\n for (i = 0; i < len; i += 1) {\n this.audios[i].pause();\n }\n },\n resume: function resume() {\n var i;\n var len = this.audios.length;\n\n for (i = 0; i < len; i += 1) {\n this.audios[i].resume();\n }\n },\n setRate: function setRate(rateValue) {\n var i;\n var len = this.audios.length;\n\n for (i = 0; i < len; i += 1) {\n this.audios[i].setRate(rateValue);\n }\n },\n createAudio: function createAudio(assetPath) {\n if (this.audioFactory) {\n return this.audioFactory(assetPath);\n }\n\n if (window.Howl) {\n return new window.Howl({\n src: [assetPath]\n });\n }\n\n return {\n isPlaying: false,\n play: function play() {\n this.isPlaying = true;\n },\n seek: function seek() {\n this.isPlaying = false;\n },\n playing: function playing() {},\n rate: function rate() {},\n setVolume: function setVolume() {}\n };\n },\n setAudioFactory: function setAudioFactory(audioFactory) {\n this.audioFactory = audioFactory;\n },\n setVolume: function setVolume(value) {\n this._volume = value;\n\n this._updateVolume();\n },\n mute: function mute() {\n this._isMuted = true;\n\n this._updateVolume();\n },\n unmute: function unmute() {\n this._isMuted = false;\n\n this._updateVolume();\n },\n getVolume: function getVolume() {\n return this._volume;\n },\n _updateVolume: function _updateVolume() {\n var i;\n var len = this.audios.length;\n\n for (i = 0; i < len; i += 1) {\n this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));\n }\n }\n };\n return function () {\n return new AudioController();\n };\n }();\n\n var createTypedArray = function () {\n function createRegularArray(type, len) {\n var i = 0;\n var arr = [];\n var value;\n\n switch (type) {\n case 'int16':\n case 'uint8c':\n value = 1;\n break;\n\n default:\n value = 1.1;\n break;\n }\n\n for (i = 0; i < len; i += 1) {\n arr.push(value);\n }\n\n return arr;\n }\n\n function createTypedArrayFactory(type, len) {\n if (type === 'float32') {\n return new Float32Array(len);\n }\n\n if (type === 'int16') {\n return new Int16Array(len);\n }\n\n if (type === 'uint8c') {\n return new Uint8ClampedArray(len);\n }\n\n return createRegularArray(type, len);\n }\n\n if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {\n return createTypedArrayFactory;\n }\n\n return createRegularArray;\n }();\n\n function createSizedArray(len) {\n return Array.apply(null, {\n length: len\n });\n }\n\n function _typeof$6(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$6 = function _typeof(obj) { return typeof obj; }; } else { _typeof$6 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$6(obj); }\n var subframeEnabled = true;\n var expressionsPlugin = null;\n var expressionsInterfaces = null;\n var idPrefix$1 = '';\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n var _shouldRoundValues = false;\n var bmPow = Math.pow;\n var bmSqrt = Math.sqrt;\n var bmFloor = Math.floor;\n var bmMax = Math.max;\n var bmMin = Math.min;\n var BMMath = {};\n\n (function () {\n var propertyNames = ['abs', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atanh', 'atan2', 'ceil', 'cbrt', 'expm1', 'clz32', 'cos', 'cosh', 'exp', 'floor', 'fround', 'hypot', 'imul', 'log', 'log1p', 'log2', 'log10', 'max', 'min', 'pow', 'random', 'round', 'sign', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc', 'E', 'LN10', 'LN2', 'LOG10E', 'LOG2E', 'PI', 'SQRT1_2', 'SQRT2'];\n var i;\n var len = propertyNames.length;\n\n for (i = 0; i < len; i += 1) {\n BMMath[propertyNames[i]] = Math[propertyNames[i]];\n }\n })();\n\n function ProjectInterface$1() {\n return {};\n }\n\n BMMath.random = Math.random;\n\n BMMath.abs = function (val) {\n var tOfVal = _typeof$6(val);\n\n if (tOfVal === 'object' && val.length) {\n var absArr = createSizedArray(val.length);\n var i;\n var len = val.length;\n\n for (i = 0; i < len; i += 1) {\n absArr[i] = Math.abs(val[i]);\n }\n\n return absArr;\n }\n\n return Math.abs(val);\n };\n\n var defaultCurveSegments = 150;\n var degToRads = Math.PI / 180;\n var roundCorner = 0.5519;\n\n function roundValues(flag) {\n _shouldRoundValues = !!flag;\n }\n\n function bmRnd(value) {\n if (_shouldRoundValues) {\n return Math.round(value);\n }\n\n return value;\n }\n\n function styleDiv(element) {\n element.style.position = 'absolute';\n element.style.top = 0;\n element.style.left = 0;\n element.style.display = 'block';\n element.style.transformOrigin = '0 0';\n element.style.webkitTransformOrigin = '0 0';\n element.style.backfaceVisibility = 'visible';\n element.style.webkitBackfaceVisibility = 'visible';\n element.style.transformStyle = 'preserve-3d';\n element.style.webkitTransformStyle = 'preserve-3d';\n element.style.mozTransformStyle = 'preserve-3d';\n }\n\n function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {\n this.type = type;\n this.currentTime = currentTime;\n this.totalTime = totalTime;\n this.direction = frameMultiplier < 0 ? -1 : 1;\n }\n\n function BMCompleteEvent(type, frameMultiplier) {\n this.type = type;\n this.direction = frameMultiplier < 0 ? -1 : 1;\n }\n\n function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {\n this.type = type;\n this.currentLoop = currentLoop;\n this.totalLoops = totalLoops;\n this.direction = frameMultiplier < 0 ? -1 : 1;\n }\n\n function BMSegmentStartEvent(type, firstFrame, totalFrames) {\n this.type = type;\n this.firstFrame = firstFrame;\n this.totalFrames = totalFrames;\n }\n\n function BMDestroyEvent(type, target) {\n this.type = type;\n this.target = target;\n }\n\n function BMRenderFrameErrorEvent(nativeError, currentTime) {\n this.type = 'renderFrameError';\n this.nativeError = nativeError;\n this.currentTime = currentTime;\n }\n\n function BMConfigErrorEvent(nativeError) {\n this.type = 'configError';\n this.nativeError = nativeError;\n }\n\n function BMAnimationConfigErrorEvent(type, nativeError) {\n this.type = type;\n this.nativeError = nativeError;\n }\n\n var createElementID = function () {\n var _count = 0;\n return function createID() {\n _count += 1;\n return idPrefix$1 + '__lottie_element_' + _count;\n };\n }();\n\n function HSVtoRGB(h, s, v) {\n var r;\n var g;\n var b;\n var i;\n var f;\n var p;\n var q;\n var t;\n i = Math.floor(h * 6);\n f = h * 6 - i;\n p = v * (1 - s);\n q = v * (1 - f * s);\n t = v * (1 - (1 - f) * s);\n\n switch (i % 6) {\n case 0:\n r = v;\n g = t;\n b = p;\n break;\n\n case 1:\n r = q;\n g = v;\n b = p;\n break;\n\n case 2:\n r = p;\n g = v;\n b = t;\n break;\n\n case 3:\n r = p;\n g = q;\n b = v;\n break;\n\n case 4:\n r = t;\n g = p;\n b = v;\n break;\n\n case 5:\n r = v;\n g = p;\n b = q;\n break;\n\n default:\n break;\n }\n\n return [r, g, b];\n }\n\n function RGBtoHSV(r, g, b) {\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var d = max - min;\n var h;\n var s = max === 0 ? 0 : d / max;\n var v = max / 255;\n\n switch (max) {\n case min:\n h = 0;\n break;\n\n case r:\n h = g - b + d * (g < b ? 6 : 0);\n h /= 6 * d;\n break;\n\n case g:\n h = b - r + d * 2;\n h /= 6 * d;\n break;\n\n case b:\n h = r - g + d * 4;\n h /= 6 * d;\n break;\n\n default:\n break;\n }\n\n return [h, s, v];\n }\n\n function addSaturationToRGB(color, offset) {\n var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\n hsv[1] += offset;\n\n if (hsv[1] > 1) {\n hsv[1] = 1;\n } else if (hsv[1] <= 0) {\n hsv[1] = 0;\n }\n\n return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\n }\n\n function addBrightnessToRGB(color, offset) {\n var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\n hsv[2] += offset;\n\n if (hsv[2] > 1) {\n hsv[2] = 1;\n } else if (hsv[2] < 0) {\n hsv[2] = 0;\n }\n\n return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\n }\n\n function addHueToRGB(color, offset) {\n var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\n hsv[0] += offset / 360;\n\n if (hsv[0] > 1) {\n hsv[0] -= 1;\n } else if (hsv[0] < 0) {\n hsv[0] += 1;\n }\n\n return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\n }\n\n var rgbToHex = function () {\n var colorMap = [];\n var i;\n var hex;\n\n for (i = 0; i < 256; i += 1) {\n hex = i.toString(16);\n colorMap[i] = hex.length === 1 ? '0' + hex : hex;\n }\n\n return function (r, g, b) {\n if (r < 0) {\n r = 0;\n }\n\n if (g < 0) {\n g = 0;\n }\n\n if (b < 0) {\n b = 0;\n }\n\n return '#' + colorMap[r] + colorMap[g] + colorMap[b];\n };\n }();\n\n var setSubframeEnabled = function setSubframeEnabled(flag) {\n subframeEnabled = !!flag;\n };\n\n var getSubframeEnabled = function getSubframeEnabled() {\n return subframeEnabled;\n };\n\n var setExpressionsPlugin = function setExpressionsPlugin(value) {\n expressionsPlugin = value;\n };\n\n var getExpressionsPlugin = function getExpressionsPlugin() {\n return expressionsPlugin;\n };\n\n var setExpressionInterfaces = function setExpressionInterfaces(value) {\n expressionsInterfaces = value;\n };\n\n var getExpressionInterfaces = function getExpressionInterfaces() {\n return expressionsInterfaces;\n };\n\n var setDefaultCurveSegments = function setDefaultCurveSegments(value) {\n defaultCurveSegments = value;\n };\n\n var getDefaultCurveSegments = function getDefaultCurveSegments() {\n return defaultCurveSegments;\n };\n\n var setIdPrefix = function setIdPrefix(value) {\n idPrefix$1 = value;\n };\n\n var getIdPrefix = function getIdPrefix() {\n return idPrefix$1;\n };\n\n function createNS(type) {\n // return {appendChild:function(){},setAttribute:function(){},style:{}}\n return document.createElementNS(svgNS, type);\n }\n\n function _typeof$5(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$5 = function _typeof(obj) { return typeof obj; }; } else { _typeof$5 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$5(obj); }\n\n var dataManager = function () {\n var _counterId = 1;\n var processes = [];\n var workerFn;\n var workerInstance;\n var workerProxy = {\n onmessage: function onmessage() {},\n postMessage: function postMessage(path) {\n workerFn({\n data: path\n });\n }\n };\n var _workerSelf = {\n postMessage: function postMessage(data) {\n workerProxy.onmessage({\n data: data\n });\n }\n };\n\n function createWorker(fn) {\n if (window.Worker && window.Blob && getWebWorker()) {\n var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], {\n type: 'text/javascript'\n }); // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });\n\n var url = URL.createObjectURL(blob);\n return new Worker(url);\n }\n\n workerFn = fn;\n return workerProxy;\n }\n\n function setupWorker() {\n if (!workerInstance) {\n workerInstance = createWorker(function workerStart(e) {\n function dataFunctionManager() {\n function completeLayers(layers, comps) {\n var layerData;\n var i;\n var len = layers.length;\n var j;\n var jLen;\n var k;\n var kLen;\n\n for (i = 0; i < len; i += 1) {\n layerData = layers[i];\n\n if ('ks' in layerData && !layerData.completed) {\n layerData.completed = true;\n\n if (layerData.hasMask) {\n var maskProps = layerData.masksProperties;\n jLen = maskProps.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (maskProps[j].pt.k.i) {\n convertPathsToAbsoluteValues(maskProps[j].pt.k);\n } else {\n kLen = maskProps[j].pt.k.length;\n\n for (k = 0; k < kLen; k += 1) {\n if (maskProps[j].pt.k[k].s) {\n convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);\n }\n\n if (maskProps[j].pt.k[k].e) {\n convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);\n }\n }\n }\n }\n }\n\n if (layerData.ty === 0) {\n layerData.layers = findCompLayers(layerData.refId, comps);\n completeLayers(layerData.layers, comps);\n } else if (layerData.ty === 4) {\n completeShapes(layerData.shapes);\n } else if (layerData.ty === 5) {\n completeText(layerData);\n }\n }\n }\n }\n\n function completeChars(chars, assets) {\n if (chars) {\n var i = 0;\n var len = chars.length;\n\n for (i = 0; i < len; i += 1) {\n if (chars[i].t === 1) {\n // var compData = findComp(chars[i].data.refId, assets);\n chars[i].data.layers = findCompLayers(chars[i].data.refId, assets); // chars[i].data.ip = 0;\n // chars[i].data.op = 99999;\n // chars[i].data.st = 0;\n // chars[i].data.sr = 1;\n // chars[i].w = compData.w;\n // chars[i].data.ks = {\n // a: { k: [0, 0, 0], a: 0 },\n // p: { k: [0, -compData.h, 0], a: 0 },\n // r: { k: 0, a: 0 },\n // s: { k: [100, 100], a: 0 },\n // o: { k: 100, a: 0 },\n // };\n\n completeLayers(chars[i].data.layers, assets);\n }\n }\n }\n }\n\n function findComp(id, comps) {\n var i = 0;\n var len = comps.length;\n\n while (i < len) {\n if (comps[i].id === id) {\n return comps[i];\n }\n\n i += 1;\n }\n\n return null;\n }\n\n function findCompLayers(id, comps) {\n var comp = findComp(id, comps);\n\n if (comp) {\n if (!comp.layers.__used) {\n comp.layers.__used = true;\n return comp.layers;\n }\n\n return JSON.parse(JSON.stringify(comp.layers));\n }\n\n return null;\n }\n\n function completeShapes(arr) {\n var i;\n var len = arr.length;\n var j;\n var jLen;\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (arr[i].ty === 'sh') {\n if (arr[i].ks.k.i) {\n convertPathsToAbsoluteValues(arr[i].ks.k);\n } else {\n jLen = arr[i].ks.k.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (arr[i].ks.k[j].s) {\n convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);\n }\n\n if (arr[i].ks.k[j].e) {\n convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);\n }\n }\n }\n } else if (arr[i].ty === 'gr') {\n completeShapes(arr[i].it);\n }\n }\n }\n\n function convertPathsToAbsoluteValues(path) {\n var i;\n var len = path.i.length;\n\n for (i = 0; i < len; i += 1) {\n path.i[i][0] += path.v[i][0];\n path.i[i][1] += path.v[i][1];\n path.o[i][0] += path.v[i][0];\n path.o[i][1] += path.v[i][1];\n }\n }\n\n function checkVersion(minimum, animVersionString) {\n var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];\n\n if (minimum[0] > animVersion[0]) {\n return true;\n }\n\n if (animVersion[0] > minimum[0]) {\n return false;\n }\n\n if (minimum[1] > animVersion[1]) {\n return true;\n }\n\n if (animVersion[1] > minimum[1]) {\n return false;\n }\n\n if (minimum[2] > animVersion[2]) {\n return true;\n }\n\n if (animVersion[2] > minimum[2]) {\n return false;\n }\n\n return null;\n }\n\n var checkText = function () {\n var minimumVersion = [4, 4, 14];\n\n function updateTextLayer(textLayer) {\n var documentData = textLayer.t.d;\n textLayer.t.d = {\n k: [{\n s: documentData,\n t: 0\n }]\n };\n }\n\n function iterateLayers(layers) {\n var i;\n var len = layers.length;\n\n for (i = 0; i < len; i += 1) {\n if (layers[i].ty === 5) {\n updateTextLayer(layers[i]);\n }\n }\n }\n\n return function (animationData) {\n if (checkVersion(minimumVersion, animationData.v)) {\n iterateLayers(animationData.layers);\n\n if (animationData.assets) {\n var i;\n var len = animationData.assets.length;\n\n for (i = 0; i < len; i += 1) {\n if (animationData.assets[i].layers) {\n iterateLayers(animationData.assets[i].layers);\n }\n }\n }\n }\n };\n }();\n\n var checkChars = function () {\n var minimumVersion = [4, 7, 99];\n return function (animationData) {\n if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {\n var i;\n var len = animationData.chars.length;\n\n for (i = 0; i < len; i += 1) {\n var charData = animationData.chars[i];\n\n if (charData.data && charData.data.shapes) {\n completeShapes(charData.data.shapes);\n charData.data.ip = 0;\n charData.data.op = 99999;\n charData.data.st = 0;\n charData.data.sr = 1;\n charData.data.ks = {\n p: {\n k: [0, 0],\n a: 0\n },\n s: {\n k: [100, 100],\n a: 0\n },\n a: {\n k: [0, 0],\n a: 0\n },\n r: {\n k: 0,\n a: 0\n },\n o: {\n k: 100,\n a: 0\n }\n };\n\n if (!animationData.chars[i].t) {\n charData.data.shapes.push({\n ty: 'no'\n });\n charData.data.shapes[0].it.push({\n p: {\n k: [0, 0],\n a: 0\n },\n s: {\n k: [100, 100],\n a: 0\n },\n a: {\n k: [0, 0],\n a: 0\n },\n r: {\n k: 0,\n a: 0\n },\n o: {\n k: 100,\n a: 0\n },\n sk: {\n k: 0,\n a: 0\n },\n sa: {\n k: 0,\n a: 0\n },\n ty: 'tr'\n });\n }\n }\n }\n }\n };\n }();\n\n var checkPathProperties = function () {\n var minimumVersion = [5, 7, 15];\n\n function updateTextLayer(textLayer) {\n var pathData = textLayer.t.p;\n\n if (typeof pathData.a === 'number') {\n pathData.a = {\n a: 0,\n k: pathData.a\n };\n }\n\n if (typeof pathData.p === 'number') {\n pathData.p = {\n a: 0,\n k: pathData.p\n };\n }\n\n if (typeof pathData.r === 'number') {\n pathData.r = {\n a: 0,\n k: pathData.r\n };\n }\n }\n\n function iterateLayers(layers) {\n var i;\n var len = layers.length;\n\n for (i = 0; i < len; i += 1) {\n if (layers[i].ty === 5) {\n updateTextLayer(layers[i]);\n }\n }\n }\n\n return function (animationData) {\n if (checkVersion(minimumVersion, animationData.v)) {\n iterateLayers(animationData.layers);\n\n if (animationData.assets) {\n var i;\n var len = animationData.assets.length;\n\n for (i = 0; i < len; i += 1) {\n if (animationData.assets[i].layers) {\n iterateLayers(animationData.assets[i].layers);\n }\n }\n }\n }\n };\n }();\n\n var checkColors = function () {\n var minimumVersion = [4, 1, 9];\n\n function iterateShapes(shapes) {\n var i;\n var len = shapes.length;\n var j;\n var jLen;\n\n for (i = 0; i < len; i += 1) {\n if (shapes[i].ty === 'gr') {\n iterateShapes(shapes[i].it);\n } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {\n if (shapes[i].c.k && shapes[i].c.k[0].i) {\n jLen = shapes[i].c.k.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (shapes[i].c.k[j].s) {\n shapes[i].c.k[j].s[0] /= 255;\n shapes[i].c.k[j].s[1] /= 255;\n shapes[i].c.k[j].s[2] /= 255;\n shapes[i].c.k[j].s[3] /= 255;\n }\n\n if (shapes[i].c.k[j].e) {\n shapes[i].c.k[j].e[0] /= 255;\n shapes[i].c.k[j].e[1] /= 255;\n shapes[i].c.k[j].e[2] /= 255;\n shapes[i].c.k[j].e[3] /= 255;\n }\n }\n } else {\n shapes[i].c.k[0] /= 255;\n shapes[i].c.k[1] /= 255;\n shapes[i].c.k[2] /= 255;\n shapes[i].c.k[3] /= 255;\n }\n }\n }\n }\n\n function iterateLayers(layers) {\n var i;\n var len = layers.length;\n\n for (i = 0; i < len; i += 1) {\n if (layers[i].ty === 4) {\n iterateShapes(layers[i].shapes);\n }\n }\n }\n\n return function (animationData) {\n if (checkVersion(minimumVersion, animationData.v)) {\n iterateLayers(animationData.layers);\n\n if (animationData.assets) {\n var i;\n var len = animationData.assets.length;\n\n for (i = 0; i < len; i += 1) {\n if (animationData.assets[i].layers) {\n iterateLayers(animationData.assets[i].layers);\n }\n }\n }\n }\n };\n }();\n\n var checkShapes = function () {\n var minimumVersion = [4, 4, 18];\n\n function completeClosingShapes(arr) {\n var i;\n var len = arr.length;\n var j;\n var jLen;\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (arr[i].ty === 'sh') {\n if (arr[i].ks.k.i) {\n arr[i].ks.k.c = arr[i].closed;\n } else {\n jLen = arr[i].ks.k.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (arr[i].ks.k[j].s) {\n arr[i].ks.k[j].s[0].c = arr[i].closed;\n }\n\n if (arr[i].ks.k[j].e) {\n arr[i].ks.k[j].e[0].c = arr[i].closed;\n }\n }\n }\n } else if (arr[i].ty === 'gr') {\n completeClosingShapes(arr[i].it);\n }\n }\n }\n\n function iterateLayers(layers) {\n var layerData;\n var i;\n var len = layers.length;\n var j;\n var jLen;\n var k;\n var kLen;\n\n for (i = 0; i < len; i += 1) {\n layerData = layers[i];\n\n if (layerData.hasMask) {\n var maskProps = layerData.masksProperties;\n jLen = maskProps.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (maskProps[j].pt.k.i) {\n maskProps[j].pt.k.c = maskProps[j].cl;\n } else {\n kLen = maskProps[j].pt.k.length;\n\n for (k = 0; k < kLen; k += 1) {\n if (maskProps[j].pt.k[k].s) {\n maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;\n }\n\n if (maskProps[j].pt.k[k].e) {\n maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;\n }\n }\n }\n }\n }\n\n if (layerData.ty === 4) {\n completeClosingShapes(layerData.shapes);\n }\n }\n }\n\n return function (animationData) {\n if (checkVersion(minimumVersion, animationData.v)) {\n iterateLayers(animationData.layers);\n\n if (animationData.assets) {\n var i;\n var len = animationData.assets.length;\n\n for (i = 0; i < len; i += 1) {\n if (animationData.assets[i].layers) {\n iterateLayers(animationData.assets[i].layers);\n }\n }\n }\n }\n };\n }();\n\n function completeData(animationData) {\n if (animationData.__complete) {\n return;\n }\n\n checkColors(animationData);\n checkText(animationData);\n checkChars(animationData);\n checkPathProperties(animationData);\n checkShapes(animationData);\n completeLayers(animationData.layers, animationData.assets);\n completeChars(animationData.chars, animationData.assets);\n animationData.__complete = true;\n }\n\n function completeText(data) {\n if (data.t.a.length === 0 && !('m' in data.t.p)) {// data.singleShape = true;\n }\n }\n\n var moduleOb = {};\n moduleOb.completeData = completeData;\n moduleOb.checkColors = checkColors;\n moduleOb.checkChars = checkChars;\n moduleOb.checkPathProperties = checkPathProperties;\n moduleOb.checkShapes = checkShapes;\n moduleOb.completeLayers = completeLayers;\n return moduleOb;\n }\n\n if (!_workerSelf.dataManager) {\n _workerSelf.dataManager = dataFunctionManager();\n }\n\n if (!_workerSelf.assetLoader) {\n _workerSelf.assetLoader = function () {\n function formatResponse(xhr) {\n // using typeof doubles the time of execution of this method,\n // so if available, it's better to use the header to validate the type\n var contentTypeHeader = xhr.getResponseHeader('content-type');\n\n if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {\n return xhr.response;\n }\n\n if (xhr.response && _typeof$5(xhr.response) === 'object') {\n return xhr.response;\n }\n\n if (xhr.response && typeof xhr.response === 'string') {\n return JSON.parse(xhr.response);\n }\n\n if (xhr.responseText) {\n return JSON.parse(xhr.responseText);\n }\n\n return null;\n }\n\n function loadAsset(path, fullPath, callback, errorCallback) {\n var response;\n var xhr = new XMLHttpRequest(); // set responseType after calling open or IE will break.\n\n try {\n // This crashes on Android WebView prior to KitKat\n xhr.responseType = 'json';\n } catch (err) {} // eslint-disable-line no-empty\n\n\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status === 200) {\n response = formatResponse(xhr);\n callback(response);\n } else {\n try {\n response = formatResponse(xhr);\n callback(response);\n } catch (err) {\n if (errorCallback) {\n errorCallback(err);\n }\n }\n }\n }\n };\n\n try {\n // Hack to workaround banner validation\n xhr.open(['G', 'E', 'T'].join(''), path, true);\n } catch (error) {\n // Hack to workaround banner validation\n xhr.open(['G', 'E', 'T'].join(''), fullPath + '/' + path, true);\n }\n\n xhr.send();\n }\n\n return {\n load: loadAsset\n };\n }();\n }\n\n if (e.data.type === 'loadAnimation') {\n _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {\n _workerSelf.dataManager.completeData(data);\n\n _workerSelf.postMessage({\n id: e.data.id,\n payload: data,\n status: 'success'\n });\n }, function () {\n _workerSelf.postMessage({\n id: e.data.id,\n status: 'error'\n });\n });\n } else if (e.data.type === 'complete') {\n var animation = e.data.animation;\n\n _workerSelf.dataManager.completeData(animation);\n\n _workerSelf.postMessage({\n id: e.data.id,\n payload: animation,\n status: 'success'\n });\n } else if (e.data.type === 'loadData') {\n _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {\n _workerSelf.postMessage({\n id: e.data.id,\n payload: data,\n status: 'success'\n });\n }, function () {\n _workerSelf.postMessage({\n id: e.data.id,\n status: 'error'\n });\n });\n }\n });\n\n workerInstance.onmessage = function (event) {\n var data = event.data;\n var id = data.id;\n var process = processes[id];\n processes[id] = null;\n\n if (data.status === 'success') {\n process.onComplete(data.payload);\n } else if (process.onError) {\n process.onError();\n }\n };\n }\n }\n\n function createProcess(onComplete, onError) {\n _counterId += 1;\n var id = 'processId_' + _counterId;\n processes[id] = {\n onComplete: onComplete,\n onError: onError\n };\n return id;\n }\n\n function loadAnimation(path, onComplete, onError) {\n setupWorker();\n var processId = createProcess(onComplete, onError);\n workerInstance.postMessage({\n type: 'loadAnimation',\n path: path,\n fullPath: window.location.origin + window.location.pathname,\n id: processId\n });\n }\n\n function loadData(path, onComplete, onError) {\n setupWorker();\n var processId = createProcess(onComplete, onError);\n workerInstance.postMessage({\n type: 'loadData',\n path: path,\n fullPath: window.location.origin + window.location.pathname,\n id: processId\n });\n }\n\n function completeAnimation(anim, onComplete, onError) {\n setupWorker();\n var processId = createProcess(onComplete, onError);\n workerInstance.postMessage({\n type: 'complete',\n animation: anim,\n id: processId\n });\n }\n\n return {\n loadAnimation: loadAnimation,\n loadData: loadData,\n completeAnimation: completeAnimation\n };\n }();\n\n var ImagePreloader = function () {\n var proxyImage = function () {\n var canvas = createTag('canvas');\n canvas.width = 1;\n canvas.height = 1;\n var ctx = canvas.getContext('2d');\n ctx.fillStyle = 'rgba(0,0,0,0)';\n ctx.fillRect(0, 0, 1, 1);\n return canvas;\n }();\n\n function imageLoaded() {\n this.loadedAssets += 1;\n\n if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {\n if (this.imagesLoadedCb) {\n this.imagesLoadedCb(null);\n }\n }\n }\n\n function footageLoaded() {\n this.loadedFootagesCount += 1;\n\n if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {\n if (this.imagesLoadedCb) {\n this.imagesLoadedCb(null);\n }\n }\n }\n\n function getAssetsPath(assetData, assetsPath, originalPath) {\n var path = '';\n\n if (assetData.e) {\n path = assetData.p;\n } else if (assetsPath) {\n var imagePath = assetData.p;\n\n if (imagePath.indexOf('images/') !== -1) {\n imagePath = imagePath.split('/')[1];\n }\n\n path = assetsPath + imagePath;\n } else {\n path = originalPath;\n path += assetData.u ? assetData.u : '';\n path += assetData.p;\n }\n\n return path;\n }\n\n function testImageLoaded(img) {\n var _count = 0;\n var intervalId = setInterval(function () {\n var box = img.getBBox();\n\n if (box.width || _count > 500) {\n this._imageLoaded();\n\n clearInterval(intervalId);\n }\n\n _count += 1;\n }.bind(this), 50);\n }\n\n function createImageData(assetData) {\n var path = getAssetsPath(assetData, this.assetsPath, this.path);\n var img = createNS('image');\n\n if (isSafari) {\n this.testImageLoaded(img);\n } else {\n img.addEventListener('load', this._imageLoaded, false);\n }\n\n img.addEventListener('error', function () {\n ob.img = proxyImage;\n\n this._imageLoaded();\n }.bind(this), false);\n img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);\n\n if (this._elementHelper.append) {\n this._elementHelper.append(img);\n } else {\n this._elementHelper.appendChild(img);\n }\n\n var ob = {\n img: img,\n assetData: assetData\n };\n return ob;\n }\n\n function createImgData(assetData) {\n var path = getAssetsPath(assetData, this.assetsPath, this.path);\n var img = createTag('img');\n img.crossOrigin = 'anonymous';\n img.addEventListener('load', this._imageLoaded, false);\n img.addEventListener('error', function () {\n ob.img = proxyImage;\n\n this._imageLoaded();\n }.bind(this), false);\n img.src = path;\n var ob = {\n img: img,\n assetData: assetData\n };\n return ob;\n }\n\n function createFootageData(data) {\n var ob = {\n assetData: data\n };\n var path = getAssetsPath(data, this.assetsPath, this.path);\n dataManager.loadData(path, function (footageData) {\n ob.img = footageData;\n\n this._footageLoaded();\n }.bind(this), function () {\n ob.img = {};\n\n this._footageLoaded();\n }.bind(this));\n return ob;\n }\n\n function loadAssets(assets, cb) {\n this.imagesLoadedCb = cb;\n var i;\n var len = assets.length;\n\n for (i = 0; i < len; i += 1) {\n if (!assets[i].layers) {\n if (!assets[i].t || assets[i].t === 'seq') {\n this.totalImages += 1;\n this.images.push(this._createImageData(assets[i]));\n } else if (assets[i].t === 3) {\n this.totalFootages += 1;\n this.images.push(this.createFootageData(assets[i]));\n }\n }\n }\n }\n\n function setPath(path) {\n this.path = path || '';\n }\n\n function setAssetsPath(path) {\n this.assetsPath = path || '';\n }\n\n function getAsset(assetData) {\n var i = 0;\n var len = this.images.length;\n\n while (i < len) {\n if (this.images[i].assetData === assetData) {\n return this.images[i].img;\n }\n\n i += 1;\n }\n\n return null;\n }\n\n function destroy() {\n this.imagesLoadedCb = null;\n this.images.length = 0;\n }\n\n function loadedImages() {\n return this.totalImages === this.loadedAssets;\n }\n\n function loadedFootages() {\n return this.totalFootages === this.loadedFootagesCount;\n }\n\n function setCacheType(type, elementHelper) {\n if (type === 'svg') {\n this._elementHelper = elementHelper;\n this._createImageData = this.createImageData.bind(this);\n } else {\n this._createImageData = this.createImgData.bind(this);\n }\n }\n\n function ImagePreloaderFactory() {\n this._imageLoaded = imageLoaded.bind(this);\n this._footageLoaded = footageLoaded.bind(this);\n this.testImageLoaded = testImageLoaded.bind(this);\n this.createFootageData = createFootageData.bind(this);\n this.assetsPath = '';\n this.path = '';\n this.totalImages = 0;\n this.totalFootages = 0;\n this.loadedAssets = 0;\n this.loadedFootagesCount = 0;\n this.imagesLoadedCb = null;\n this.images = [];\n }\n\n ImagePreloaderFactory.prototype = {\n loadAssets: loadAssets,\n setAssetsPath: setAssetsPath,\n setPath: setPath,\n loadedImages: loadedImages,\n loadedFootages: loadedFootages,\n destroy: destroy,\n getAsset: getAsset,\n createImgData: createImgData,\n createImageData: createImageData,\n imageLoaded: imageLoaded,\n footageLoaded: footageLoaded,\n setCacheType: setCacheType\n };\n return ImagePreloaderFactory;\n }();\n\n function BaseEvent() {}\n\n BaseEvent.prototype = {\n triggerEvent: function triggerEvent(eventName, args) {\n if (this._cbs[eventName]) {\n var callbacks = this._cbs[eventName];\n\n for (var i = 0; i < callbacks.length; i += 1) {\n callbacks[i](args);\n }\n }\n },\n addEventListener: function addEventListener(eventName, callback) {\n if (!this._cbs[eventName]) {\n this._cbs[eventName] = [];\n }\n\n this._cbs[eventName].push(callback);\n\n return function () {\n this.removeEventListener(eventName, callback);\n }.bind(this);\n },\n removeEventListener: function removeEventListener(eventName, callback) {\n if (!callback) {\n this._cbs[eventName] = null;\n } else if (this._cbs[eventName]) {\n var i = 0;\n var len = this._cbs[eventName].length;\n\n while (i < len) {\n if (this._cbs[eventName][i] === callback) {\n this._cbs[eventName].splice(i, 1);\n\n i -= 1;\n len -= 1;\n }\n\n i += 1;\n }\n\n if (!this._cbs[eventName].length) {\n this._cbs[eventName] = null;\n }\n }\n }\n };\n\n var markerParser = function () {\n function parsePayloadLines(payload) {\n var lines = payload.split('\\r\\n');\n var keys = {};\n var line;\n var keysCount = 0;\n\n for (var i = 0; i < lines.length; i += 1) {\n line = lines[i].split(':');\n\n if (line.length === 2) {\n keys[line[0]] = line[1].trim();\n keysCount += 1;\n }\n }\n\n if (keysCount === 0) {\n throw new Error();\n }\n\n return keys;\n }\n\n return function (_markers) {\n var markers = [];\n\n for (var i = 0; i < _markers.length; i += 1) {\n var _marker = _markers[i];\n var markerData = {\n time: _marker.tm,\n duration: _marker.dr\n };\n\n try {\n markerData.payload = JSON.parse(_markers[i].cm);\n } catch (_) {\n try {\n markerData.payload = parsePayloadLines(_markers[i].cm);\n } catch (__) {\n markerData.payload = {\n name: _markers[i].cm\n };\n }\n }\n\n markers.push(markerData);\n }\n\n return markers;\n };\n }();\n\n var ProjectInterface = function () {\n function registerComposition(comp) {\n this.compositions.push(comp);\n }\n\n return function () {\n function _thisProjectFunction(name) {\n var i = 0;\n var len = this.compositions.length;\n\n while (i < len) {\n if (this.compositions[i].data && this.compositions[i].data.nm === name) {\n if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {\n this.compositions[i].prepareFrame(this.currentFrame);\n }\n\n return this.compositions[i].compInterface;\n }\n\n i += 1;\n }\n\n return null;\n }\n\n _thisProjectFunction.compositions = [];\n _thisProjectFunction.currentFrame = 0;\n _thisProjectFunction.registerComposition = registerComposition;\n return _thisProjectFunction;\n };\n }();\n\n var renderers = {};\n\n var registerRenderer = function registerRenderer(key, value) {\n renderers[key] = value;\n };\n\n function getRenderer(key) {\n return renderers[key];\n }\n\n function getRegisteredRenderer() {\n // Returns canvas by default for compatibility\n if (renderers.canvas) {\n return 'canvas';\n } // Returns any renderer that is registered\n\n\n for (var key in renderers) {\n if (renderers[key]) {\n return key;\n }\n }\n\n return '';\n }\n\n function _typeof$4(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$4 = function _typeof(obj) { return typeof obj; }; } else { _typeof$4 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$4(obj); }\n\n var AnimationItem = function AnimationItem() {\n this._cbs = [];\n this.name = '';\n this.path = '';\n this.isLoaded = false;\n this.currentFrame = 0;\n this.currentRawFrame = 0;\n this.firstFrame = 0;\n this.totalFrames = 0;\n this.frameRate = 0;\n this.frameMult = 0;\n this.playSpeed = 1;\n this.playDirection = 1;\n this.playCount = 0;\n this.animationData = {};\n this.assets = [];\n this.isPaused = true;\n this.autoplay = false;\n this.loop = true;\n this.renderer = null;\n this.animationID = createElementID();\n this.assetsPath = '';\n this.timeCompleted = 0;\n this.segmentPos = 0;\n this.isSubframeEnabled = getSubframeEnabled();\n this.segments = [];\n this._idle = true;\n this._completedLoop = false;\n this.projectInterface = ProjectInterface();\n this.imagePreloader = new ImagePreloader();\n this.audioController = audioControllerFactory();\n this.markers = [];\n this.configAnimation = this.configAnimation.bind(this);\n this.onSetupError = this.onSetupError.bind(this);\n this.onSegmentComplete = this.onSegmentComplete.bind(this);\n this.drawnFrameEvent = new BMEnterFrameEvent('drawnFrame', 0, 0, 0);\n this.expressionsPlugin = getExpressionsPlugin();\n };\n\n extendPrototype([BaseEvent], AnimationItem);\n\n AnimationItem.prototype.setParams = function (params) {\n if (params.wrapper || params.container) {\n this.wrapper = params.wrapper || params.container;\n }\n\n var animType = 'svg';\n\n if (params.animType) {\n animType = params.animType;\n } else if (params.renderer) {\n animType = params.renderer;\n }\n\n var RendererClass = getRenderer(animType);\n this.renderer = new RendererClass(this, params.rendererSettings);\n this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);\n this.renderer.setProjectInterface(this.projectInterface);\n this.animType = animType;\n\n if (params.loop === '' || params.loop === null || params.loop === undefined || params.loop === true) {\n this.loop = true;\n } else if (params.loop === false) {\n this.loop = false;\n } else {\n this.loop = parseInt(params.loop, 10);\n }\n\n this.autoplay = 'autoplay' in params ? params.autoplay : true;\n this.name = params.name ? params.name : '';\n this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;\n this.assetsPath = params.assetsPath;\n this.initialSegment = params.initialSegment;\n\n if (params.audioFactory) {\n this.audioController.setAudioFactory(params.audioFactory);\n }\n\n if (params.animationData) {\n this.setupAnimation(params.animationData);\n } else if (params.path) {\n if (params.path.lastIndexOf('\\\\') !== -1) {\n this.path = params.path.substr(0, params.path.lastIndexOf('\\\\') + 1);\n } else {\n this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);\n }\n\n this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);\n this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));\n dataManager.loadAnimation(params.path, this.configAnimation, this.onSetupError);\n }\n };\n\n AnimationItem.prototype.onSetupError = function () {\n this.trigger('data_failed');\n };\n\n AnimationItem.prototype.setupAnimation = function (data) {\n dataManager.completeAnimation(data, this.configAnimation);\n };\n\n AnimationItem.prototype.setData = function (wrapper, animationData) {\n if (animationData) {\n if (_typeof$4(animationData) !== 'object') {\n animationData = JSON.parse(animationData);\n }\n }\n\n var params = {\n wrapper: wrapper,\n animationData: animationData\n };\n var wrapperAttributes = wrapper.attributes;\n params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-animation-path').value : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-path').value : wrapperAttributes.getNamedItem('bm-path') ? wrapperAttributes.getNamedItem('bm-path').value : '';\n params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-anim-type').value : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-type').value : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('bm-type').value : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-renderer').value : wrapperAttributes.getNamedItem('bm-renderer') ? wrapperAttributes.getNamedItem('bm-renderer').value : getRegisteredRenderer() || 'canvas';\n var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-anim-loop').value : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-loop').value : wrapperAttributes.getNamedItem('bm-loop') ? wrapperAttributes.getNamedItem('bm-loop').value : '';\n\n if (loop === 'false') {\n params.loop = false;\n } else if (loop === 'true') {\n params.loop = true;\n } else if (loop !== '') {\n params.loop = parseInt(loop, 10);\n }\n\n var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-anim-autoplay').value : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-autoplay').value : wrapperAttributes.getNamedItem('bm-autoplay') ? wrapperAttributes.getNamedItem('bm-autoplay').value : true;\n params.autoplay = autoplay !== 'false';\n params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-name').value : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-name').value : wrapperAttributes.getNamedItem('bm-name') ? wrapperAttributes.getNamedItem('bm-name').value : '';\n var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-anim-prerender').value : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-prerender').value : wrapperAttributes.getNamedItem('bm-prerender') ? wrapperAttributes.getNamedItem('bm-prerender').value : '';\n\n if (prerender === 'false') {\n params.prerender = false;\n }\n\n if (!params.path) {\n this.trigger('destroy');\n } else {\n this.setParams(params);\n }\n };\n\n AnimationItem.prototype.includeLayers = function (data) {\n if (data.op > this.animationData.op) {\n this.animationData.op = data.op;\n this.totalFrames = Math.floor(data.op - this.animationData.ip);\n }\n\n var layers = this.animationData.layers;\n var i;\n var len = layers.length;\n var newLayers = data.layers;\n var j;\n var jLen = newLayers.length;\n\n for (j = 0; j < jLen; j += 1) {\n i = 0;\n\n while (i < len) {\n if (layers[i].id === newLayers[j].id) {\n layers[i] = newLayers[j];\n break;\n }\n\n i += 1;\n }\n }\n\n if (data.chars || data.fonts) {\n this.renderer.globalData.fontManager.addChars(data.chars);\n this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);\n }\n\n if (data.assets) {\n len = data.assets.length;\n\n for (i = 0; i < len; i += 1) {\n this.animationData.assets.push(data.assets[i]);\n }\n }\n\n this.animationData.__complete = false;\n dataManager.completeAnimation(this.animationData, this.onSegmentComplete);\n };\n\n AnimationItem.prototype.onSegmentComplete = function (data) {\n this.animationData = data;\n var expressionsPlugin = getExpressionsPlugin();\n\n if (expressionsPlugin) {\n expressionsPlugin.initExpressions(this);\n }\n\n this.loadNextSegment();\n };\n\n AnimationItem.prototype.loadNextSegment = function () {\n var segments = this.animationData.segments;\n\n if (!segments || segments.length === 0 || !this.autoloadSegments) {\n this.trigger('data_ready');\n this.timeCompleted = this.totalFrames;\n return;\n }\n\n var segment = segments.shift();\n this.timeCompleted = segment.time * this.frameRate;\n var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';\n this.segmentPos += 1;\n dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {\n this.trigger('data_failed');\n }.bind(this));\n };\n\n AnimationItem.prototype.loadSegments = function () {\n var segments = this.animationData.segments;\n\n if (!segments) {\n this.timeCompleted = this.totalFrames;\n }\n\n this.loadNextSegment();\n };\n\n AnimationItem.prototype.imagesLoaded = function () {\n this.trigger('loaded_images');\n this.checkLoaded();\n };\n\n AnimationItem.prototype.preloadImages = function () {\n this.imagePreloader.setAssetsPath(this.assetsPath);\n this.imagePreloader.setPath(this.path);\n this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));\n };\n\n AnimationItem.prototype.configAnimation = function (animData) {\n if (!this.renderer) {\n return;\n }\n\n try {\n this.animationData = animData;\n\n if (this.initialSegment) {\n this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);\n this.firstFrame = Math.round(this.initialSegment[0]);\n } else {\n this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);\n this.firstFrame = Math.round(this.animationData.ip);\n }\n\n this.renderer.configAnimation(animData);\n\n if (!animData.assets) {\n animData.assets = [];\n }\n\n this.assets = this.animationData.assets;\n this.frameRate = this.animationData.fr;\n this.frameMult = this.animationData.fr / 1000;\n this.renderer.searchExtraCompositions(animData.assets);\n this.markers = markerParser(animData.markers || []);\n this.trigger('config_ready');\n this.preloadImages();\n this.loadSegments();\n this.updaFrameModifier();\n this.waitForFontsLoaded();\n\n if (this.isPaused) {\n this.audioController.pause();\n }\n } catch (error) {\n this.triggerConfigError(error);\n }\n };\n\n AnimationItem.prototype.waitForFontsLoaded = function () {\n if (!this.renderer) {\n return;\n }\n\n if (this.renderer.globalData.fontManager.isLoaded) {\n this.checkLoaded();\n } else {\n setTimeout(this.waitForFontsLoaded.bind(this), 20);\n }\n };\n\n AnimationItem.prototype.checkLoaded = function () {\n if (!this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas') && this.imagePreloader.loadedFootages()) {\n this.isLoaded = true;\n var expressionsPlugin = getExpressionsPlugin();\n\n if (expressionsPlugin) {\n expressionsPlugin.initExpressions(this);\n }\n\n this.renderer.initItems();\n setTimeout(function () {\n this.trigger('DOMLoaded');\n }.bind(this), 0);\n this.gotoFrame();\n\n if (this.autoplay) {\n this.play();\n }\n }\n };\n\n AnimationItem.prototype.resize = function (width, height) {\n // Adding this validation for backwards compatibility in case an event object was being passed down\n var _width = typeof width === 'number' ? width : undefined;\n\n var _height = typeof height === 'number' ? height : undefined;\n\n this.renderer.updateContainerSize(_width, _height);\n };\n\n AnimationItem.prototype.setSubframe = function (flag) {\n this.isSubframeEnabled = !!flag;\n };\n\n AnimationItem.prototype.gotoFrame = function () {\n this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise\n\n if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {\n this.currentFrame = this.timeCompleted;\n }\n\n this.trigger('enterFrame');\n this.renderFrame();\n this.trigger('drawnFrame');\n };\n\n AnimationItem.prototype.renderFrame = function () {\n if (this.isLoaded === false || !this.renderer) {\n return;\n }\n\n try {\n if (this.expressionsPlugin) {\n this.expressionsPlugin.resetFrame();\n }\n\n this.renderer.renderFrame(this.currentFrame + this.firstFrame);\n } catch (error) {\n this.triggerRenderFrameError(error);\n }\n };\n\n AnimationItem.prototype.play = function (name) {\n if (name && this.name !== name) {\n return;\n }\n\n if (this.isPaused === true) {\n this.isPaused = false;\n this.trigger('_play');\n this.audioController.resume();\n\n if (this._idle) {\n this._idle = false;\n this.trigger('_active');\n }\n }\n };\n\n AnimationItem.prototype.pause = function (name) {\n if (name && this.name !== name) {\n return;\n }\n\n if (this.isPaused === false) {\n this.isPaused = true;\n this.trigger('_pause');\n this._idle = true;\n this.trigger('_idle');\n this.audioController.pause();\n }\n };\n\n AnimationItem.prototype.togglePause = function (name) {\n if (name && this.name !== name) {\n return;\n }\n\n if (this.isPaused === true) {\n this.play();\n } else {\n this.pause();\n }\n };\n\n AnimationItem.prototype.stop = function (name) {\n if (name && this.name !== name) {\n return;\n }\n\n this.pause();\n this.playCount = 0;\n this._completedLoop = false;\n this.setCurrentRawFrameValue(0);\n };\n\n AnimationItem.prototype.getMarkerData = function (markerName) {\n var marker;\n\n for (var i = 0; i < this.markers.length; i += 1) {\n marker = this.markers[i];\n\n if (marker.payload && marker.payload.name === markerName) {\n return marker;\n }\n }\n\n return null;\n };\n\n AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {\n if (name && this.name !== name) {\n return;\n }\n\n var numValue = Number(value);\n\n if (isNaN(numValue)) {\n var marker = this.getMarkerData(value);\n\n if (marker) {\n this.goToAndStop(marker.time, true);\n }\n } else if (isFrame) {\n this.setCurrentRawFrameValue(value);\n } else {\n this.setCurrentRawFrameValue(value * this.frameModifier);\n }\n\n this.pause();\n };\n\n AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {\n if (name && this.name !== name) {\n return;\n }\n\n var numValue = Number(value);\n\n if (isNaN(numValue)) {\n var marker = this.getMarkerData(value);\n\n if (marker) {\n if (!marker.duration) {\n this.goToAndStop(marker.time, true);\n } else {\n this.playSegments([marker.time, marker.time + marker.duration], true);\n }\n }\n } else {\n this.goToAndStop(numValue, isFrame, name);\n }\n\n this.play();\n };\n\n AnimationItem.prototype.advanceTime = function (value) {\n if (this.isPaused === true || this.isLoaded === false) {\n return;\n }\n\n var nextValue = this.currentRawFrame + value * this.frameModifier;\n var _isComplete = false; // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.\n // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.\n\n if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {\n if (!this.loop || this.playCount === this.loop) {\n if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {\n _isComplete = true;\n nextValue = this.totalFrames - 1;\n }\n } else if (nextValue >= this.totalFrames) {\n this.playCount += 1;\n\n if (!this.checkSegments(nextValue % this.totalFrames)) {\n this.setCurrentRawFrameValue(nextValue % this.totalFrames);\n this._completedLoop = true;\n this.trigger('loopComplete');\n }\n } else {\n this.setCurrentRawFrameValue(nextValue);\n }\n } else if (nextValue < 0) {\n if (!this.checkSegments(nextValue % this.totalFrames)) {\n if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) {\n // eslint-disable-line no-plusplus\n this.setCurrentRawFrameValue(this.totalFrames + nextValue % this.totalFrames);\n\n if (!this._completedLoop) {\n this._completedLoop = true;\n } else {\n this.trigger('loopComplete');\n }\n } else {\n _isComplete = true;\n nextValue = 0;\n }\n }\n } else {\n this.setCurrentRawFrameValue(nextValue);\n }\n\n if (_isComplete) {\n this.setCurrentRawFrameValue(nextValue);\n this.pause();\n this.trigger('complete');\n }\n };\n\n AnimationItem.prototype.adjustSegment = function (arr, offset) {\n this.playCount = 0;\n\n if (arr[1] < arr[0]) {\n if (this.frameModifier > 0) {\n if (this.playSpeed < 0) {\n this.setSpeed(-this.playSpeed);\n } else {\n this.setDirection(-1);\n }\n }\n\n this.totalFrames = arr[0] - arr[1];\n this.timeCompleted = this.totalFrames;\n this.firstFrame = arr[1];\n this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);\n } else if (arr[1] > arr[0]) {\n if (this.frameModifier < 0) {\n if (this.playSpeed < 0) {\n this.setSpeed(-this.playSpeed);\n } else {\n this.setDirection(1);\n }\n }\n\n this.totalFrames = arr[1] - arr[0];\n this.timeCompleted = this.totalFrames;\n this.firstFrame = arr[0];\n this.setCurrentRawFrameValue(0.001 + offset);\n }\n\n this.trigger('segmentStart');\n };\n\n AnimationItem.prototype.setSegment = function (init, end) {\n var pendingFrame = -1;\n\n if (this.isPaused) {\n if (this.currentRawFrame + this.firstFrame < init) {\n pendingFrame = init;\n } else if (this.currentRawFrame + this.firstFrame > end) {\n pendingFrame = end - init;\n }\n }\n\n this.firstFrame = init;\n this.totalFrames = end - init;\n this.timeCompleted = this.totalFrames;\n\n if (pendingFrame !== -1) {\n this.goToAndStop(pendingFrame, true);\n }\n };\n\n AnimationItem.prototype.playSegments = function (arr, forceFlag) {\n if (forceFlag) {\n this.segments.length = 0;\n }\n\n if (_typeof$4(arr[0]) === 'object') {\n var i;\n var len = arr.length;\n\n for (i = 0; i < len; i += 1) {\n this.segments.push(arr[i]);\n }\n } else {\n this.segments.push(arr);\n }\n\n if (this.segments.length && forceFlag) {\n this.adjustSegment(this.segments.shift(), 0);\n }\n\n if (this.isPaused) {\n this.play();\n }\n };\n\n AnimationItem.prototype.resetSegments = function (forceFlag) {\n this.segments.length = 0;\n this.segments.push([this.animationData.ip, this.animationData.op]);\n\n if (forceFlag) {\n this.checkSegments(0);\n }\n };\n\n AnimationItem.prototype.checkSegments = function (offset) {\n if (this.segments.length) {\n this.adjustSegment(this.segments.shift(), offset);\n return true;\n }\n\n return false;\n };\n\n AnimationItem.prototype.destroy = function (name) {\n if (name && this.name !== name || !this.renderer) {\n return;\n }\n\n this.renderer.destroy();\n this.imagePreloader.destroy();\n this.trigger('destroy');\n this._cbs = null;\n this.onEnterFrame = null;\n this.onLoopComplete = null;\n this.onComplete = null;\n this.onSegmentStart = null;\n this.onDestroy = null;\n this.renderer = null;\n this.expressionsPlugin = null;\n this.imagePreloader = null;\n this.projectInterface = null;\n };\n\n AnimationItem.prototype.setCurrentRawFrameValue = function (value) {\n this.currentRawFrame = value;\n this.gotoFrame();\n };\n\n AnimationItem.prototype.setSpeed = function (val) {\n this.playSpeed = val;\n this.updaFrameModifier();\n };\n\n AnimationItem.prototype.setDirection = function (val) {\n this.playDirection = val < 0 ? -1 : 1;\n this.updaFrameModifier();\n };\n\n AnimationItem.prototype.setLoop = function (isLooping) {\n this.loop = isLooping;\n };\n\n AnimationItem.prototype.setVolume = function (val, name) {\n if (name && this.name !== name) {\n return;\n }\n\n this.audioController.setVolume(val);\n };\n\n AnimationItem.prototype.getVolume = function () {\n return this.audioController.getVolume();\n };\n\n AnimationItem.prototype.mute = function (name) {\n if (name && this.name !== name) {\n return;\n }\n\n this.audioController.mute();\n };\n\n AnimationItem.prototype.unmute = function (name) {\n if (name && this.name !== name) {\n return;\n }\n\n this.audioController.unmute();\n };\n\n AnimationItem.prototype.updaFrameModifier = function () {\n this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;\n this.audioController.setRate(this.playSpeed * this.playDirection);\n };\n\n AnimationItem.prototype.getPath = function () {\n return this.path;\n };\n\n AnimationItem.prototype.getAssetsPath = function (assetData) {\n var path = '';\n\n if (assetData.e) {\n path = assetData.p;\n } else if (this.assetsPath) {\n var imagePath = assetData.p;\n\n if (imagePath.indexOf('images/') !== -1) {\n imagePath = imagePath.split('/')[1];\n }\n\n path = this.assetsPath + imagePath;\n } else {\n path = this.path;\n path += assetData.u ? assetData.u : '';\n path += assetData.p;\n }\n\n return path;\n };\n\n AnimationItem.prototype.getAssetData = function (id) {\n var i = 0;\n var len = this.assets.length;\n\n while (i < len) {\n if (id === this.assets[i].id) {\n return this.assets[i];\n }\n\n i += 1;\n }\n\n return null;\n };\n\n AnimationItem.prototype.hide = function () {\n this.renderer.hide();\n };\n\n AnimationItem.prototype.show = function () {\n this.renderer.show();\n };\n\n AnimationItem.prototype.getDuration = function (isFrame) {\n return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;\n };\n\n AnimationItem.prototype.updateDocumentData = function (path, documentData, index) {\n try {\n var element = this.renderer.getElementByPath(path);\n element.updateDocumentData(documentData, index);\n } catch (error) {// TODO: decide how to handle catch case\n }\n };\n\n AnimationItem.prototype.trigger = function (name) {\n if (this._cbs && this._cbs[name]) {\n switch (name) {\n case 'enterFrame':\n this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));\n break;\n\n case 'drawnFrame':\n this.drawnFrameEvent.currentTime = this.currentFrame;\n this.drawnFrameEvent.totalTime = this.totalFrames;\n this.drawnFrameEvent.direction = this.frameModifier;\n this.triggerEvent(name, this.drawnFrameEvent);\n break;\n\n case 'loopComplete':\n this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));\n break;\n\n case 'complete':\n this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));\n break;\n\n case 'segmentStart':\n this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));\n break;\n\n case 'destroy':\n this.triggerEvent(name, new BMDestroyEvent(name, this));\n break;\n\n default:\n this.triggerEvent(name);\n }\n }\n\n if (name === 'enterFrame' && this.onEnterFrame) {\n this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));\n }\n\n if (name === 'loopComplete' && this.onLoopComplete) {\n this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));\n }\n\n if (name === 'complete' && this.onComplete) {\n this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));\n }\n\n if (name === 'segmentStart' && this.onSegmentStart) {\n this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));\n }\n\n if (name === 'destroy' && this.onDestroy) {\n this.onDestroy.call(this, new BMDestroyEvent(name, this));\n }\n };\n\n AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {\n var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);\n this.triggerEvent('error', error);\n\n if (this.onError) {\n this.onError.call(this, error);\n }\n };\n\n AnimationItem.prototype.triggerConfigError = function (nativeError) {\n var error = new BMConfigErrorEvent(nativeError, this.currentFrame);\n this.triggerEvent('error', error);\n\n if (this.onError) {\n this.onError.call(this, error);\n }\n };\n\n var animationManager = function () {\n var moduleOb = {};\n var registeredAnimations = [];\n var initTime = 0;\n var len = 0;\n var playingAnimationsNum = 0;\n var _stopped = true;\n var _isFrozen = false;\n\n function removeElement(ev) {\n var i = 0;\n var animItem = ev.target;\n\n while (i < len) {\n if (registeredAnimations[i].animation === animItem) {\n registeredAnimations.splice(i, 1);\n i -= 1;\n len -= 1;\n\n if (!animItem.isPaused) {\n subtractPlayingCount();\n }\n }\n\n i += 1;\n }\n }\n\n function registerAnimation(element, animationData) {\n if (!element) {\n return null;\n }\n\n var i = 0;\n\n while (i < len) {\n if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {\n return registeredAnimations[i].animation;\n }\n\n i += 1;\n }\n\n var animItem = new AnimationItem();\n setupAnimation(animItem, element);\n animItem.setData(element, animationData);\n return animItem;\n }\n\n function getRegisteredAnimations() {\n var i;\n var lenAnims = registeredAnimations.length;\n var animations = [];\n\n for (i = 0; i < lenAnims; i += 1) {\n animations.push(registeredAnimations[i].animation);\n }\n\n return animations;\n }\n\n function addPlayingCount() {\n playingAnimationsNum += 1;\n activate();\n }\n\n function subtractPlayingCount() {\n playingAnimationsNum -= 1;\n }\n\n function setupAnimation(animItem, element) {\n animItem.addEventListener('destroy', removeElement);\n animItem.addEventListener('_active', addPlayingCount);\n animItem.addEventListener('_idle', subtractPlayingCount);\n registeredAnimations.push({\n elem: element,\n animation: animItem\n });\n len += 1;\n }\n\n function loadAnimation(params) {\n var animItem = new AnimationItem();\n setupAnimation(animItem, null);\n animItem.setParams(params);\n return animItem;\n }\n\n function setSpeed(val, animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.setSpeed(val, animation);\n }\n }\n\n function setDirection(val, animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.setDirection(val, animation);\n }\n }\n\n function play(animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.play(animation);\n }\n }\n\n function resume(nowTime) {\n var elapsedTime = nowTime - initTime;\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.advanceTime(elapsedTime);\n }\n\n initTime = nowTime;\n\n if (playingAnimationsNum && !_isFrozen) {\n window.requestAnimationFrame(resume);\n } else {\n _stopped = true;\n }\n }\n\n function first(nowTime) {\n initTime = nowTime;\n window.requestAnimationFrame(resume);\n }\n\n function pause(animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.pause(animation);\n }\n }\n\n function goToAndStop(value, isFrame, animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);\n }\n }\n\n function stop(animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.stop(animation);\n }\n }\n\n function togglePause(animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.togglePause(animation);\n }\n }\n\n function destroy(animation) {\n var i;\n\n for (i = len - 1; i >= 0; i -= 1) {\n registeredAnimations[i].animation.destroy(animation);\n }\n }\n\n function searchAnimations(animationData, standalone, renderer) {\n var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')), [].slice.call(document.getElementsByClassName('bodymovin')));\n var i;\n var lenAnims = animElements.length;\n\n for (i = 0; i < lenAnims; i += 1) {\n if (renderer) {\n animElements[i].setAttribute('data-bm-type', renderer);\n }\n\n registerAnimation(animElements[i], animationData);\n }\n\n if (standalone && lenAnims === 0) {\n if (!renderer) {\n renderer = 'svg';\n }\n\n var body = document.getElementsByTagName('body')[0];\n body.innerText = '';\n var div = createTag('div');\n div.style.width = '100%';\n div.style.height = '100%';\n div.setAttribute('data-bm-type', renderer);\n body.appendChild(div);\n registerAnimation(div, animationData);\n }\n }\n\n function resize() {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.resize();\n }\n }\n\n function activate() {\n if (!_isFrozen && playingAnimationsNum) {\n if (_stopped) {\n window.requestAnimationFrame(first);\n _stopped = false;\n }\n }\n }\n\n function freeze() {\n _isFrozen = true;\n }\n\n function unfreeze() {\n _isFrozen = false;\n activate();\n }\n\n function setVolume(val, animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.setVolume(val, animation);\n }\n }\n\n function mute(animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.mute(animation);\n }\n }\n\n function unmute(animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.unmute(animation);\n }\n }\n\n moduleOb.registerAnimation = registerAnimation;\n moduleOb.loadAnimation = loadAnimation;\n moduleOb.setSpeed = setSpeed;\n moduleOb.setDirection = setDirection;\n moduleOb.play = play;\n moduleOb.pause = pause;\n moduleOb.stop = stop;\n moduleOb.togglePause = togglePause;\n moduleOb.searchAnimations = searchAnimations;\n moduleOb.resize = resize; // moduleOb.start = start;\n\n moduleOb.goToAndStop = goToAndStop;\n moduleOb.destroy = destroy;\n moduleOb.freeze = freeze;\n moduleOb.unfreeze = unfreeze;\n moduleOb.setVolume = setVolume;\n moduleOb.mute = mute;\n moduleOb.unmute = unmute;\n moduleOb.getRegisteredAnimations = getRegisteredAnimations;\n return moduleOb;\n }();\n\n /* eslint-disable */\n var BezierFactory = function () {\n /**\r\n * BezierEasing - use bezier curve for transition easing function\r\n * by Gaëtan Renaudeau 2014 - 2015 – MIT License\r\n *\r\n * Credits: is based on Firefox's nsSMILKeySpline.cpp\r\n * Usage:\r\n * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])\r\n * spline.get(x) => returns the easing value | x must be in [0, 1] range\r\n *\r\n */\n var ob = {};\n ob.getBezierEasing = getBezierEasing;\n var beziers = {};\n\n function getBezierEasing(a, b, c, d, nm) {\n var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\\./g, 'p');\n\n if (beziers[str]) {\n return beziers[str];\n }\n\n var bezEasing = new BezierEasing([a, b, c, d]);\n beziers[str] = bezEasing;\n return bezEasing;\n } // These values are established by empiricism with tests (tradeoff: performance VS precision)\n\n\n var NEWTON_ITERATIONS = 4;\n var NEWTON_MIN_SLOPE = 0.001;\n var SUBDIVISION_PRECISION = 0.0000001;\n var SUBDIVISION_MAX_ITERATIONS = 10;\n var kSplineTableSize = 11;\n var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n var float32ArraySupported = typeof Float32Array === 'function';\n\n function A(aA1, aA2) {\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n }\n\n function B(aA1, aA2) {\n return 3.0 * aA2 - 6.0 * aA1;\n }\n\n function C(aA1) {\n return 3.0 * aA1;\n } // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\n\n\n function calcBezier(aT, aA1, aA2) {\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n } // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\n\n\n function getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n }\n\n function binarySubdivide(aX, aA, aB, mX1, mX2) {\n var currentX,\n currentT,\n i = 0;\n\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n\n if (currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n\n return currentT;\n }\n\n function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n for (var i = 0; i < NEWTON_ITERATIONS; ++i) {\n var currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0.0) return aGuessT;\n var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n\n return aGuessT;\n }\n /**\r\n * points is an array of [ mX1, mY1, mX2, mY2 ]\r\n */\n\n\n function BezierEasing(points) {\n this._p = points;\n this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n this._precomputed = false;\n this.get = this.get.bind(this);\n }\n\n BezierEasing.prototype = {\n get: function get(x) {\n var mX1 = this._p[0],\n mY1 = this._p[1],\n mX2 = this._p[2],\n mY2 = this._p[3];\n if (!this._precomputed) this._precompute();\n if (mX1 === mY1 && mX2 === mY2) return x; // linear\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n\n if (x === 0) return 0;\n if (x === 1) return 1;\n return calcBezier(this._getTForX(x), mY1, mY2);\n },\n // Private part\n _precompute: function _precompute() {\n var mX1 = this._p[0],\n mY1 = this._p[1],\n mX2 = this._p[2],\n mY2 = this._p[3];\n this._precomputed = true;\n\n if (mX1 !== mY1 || mX2 !== mY2) {\n this._calcSampleValues();\n }\n },\n _calcSampleValues: function _calcSampleValues() {\n var mX1 = this._p[0],\n mX2 = this._p[2];\n\n for (var i = 0; i < kSplineTableSize; ++i) {\n this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n },\n\n /**\r\n * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.\r\n */\n _getTForX: function _getTForX(aX) {\n var mX1 = this._p[0],\n mX2 = this._p[2],\n mSampleValues = this._mSampleValues;\n var intervalStart = 0.0;\n var currentSample = 1;\n var lastSample = kSplineTableSize - 1;\n\n for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n\n --currentSample; // Interpolate to provide an initial guess for t\n\n var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);\n var guessForT = intervalStart + dist * kSampleStepSize;\n var initialSlope = getSlope(guessForT, mX1, mX2);\n\n if (initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n }\n\n if (initialSlope === 0.0) {\n return guessForT;\n }\n\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n };\n return ob;\n }();\n\n var pooling = function () {\n function _double(arr) {\n return arr.concat(createSizedArray(arr.length));\n }\n\n return {\n \"double\": _double\n };\n }();\n\n var poolFactory = function () {\n return function (initialLength, _create, _release) {\n var _length = 0;\n var _maxLength = initialLength;\n var pool = createSizedArray(_maxLength);\n var ob = {\n newElement: newElement,\n release: release\n };\n\n function newElement() {\n var element;\n\n if (_length) {\n _length -= 1;\n element = pool[_length];\n } else {\n element = _create();\n }\n\n return element;\n }\n\n function release(element) {\n if (_length === _maxLength) {\n pool = pooling[\"double\"](pool);\n _maxLength *= 2;\n }\n\n if (_release) {\n _release(element);\n }\n\n pool[_length] = element;\n _length += 1;\n }\n\n return ob;\n };\n }();\n\n var bezierLengthPool = function () {\n function create() {\n return {\n addedLength: 0,\n percents: createTypedArray('float32', getDefaultCurveSegments()),\n lengths: createTypedArray('float32', getDefaultCurveSegments())\n };\n }\n\n return poolFactory(8, create);\n }();\n\n var segmentsLengthPool = function () {\n function create() {\n return {\n lengths: [],\n totalLength: 0\n };\n }\n\n function release(element) {\n var i;\n var len = element.lengths.length;\n\n for (i = 0; i < len; i += 1) {\n bezierLengthPool.release(element.lengths[i]);\n }\n\n element.lengths.length = 0;\n }\n\n return poolFactory(8, create, release);\n }();\n\n function bezFunction() {\n var math = Math;\n\n function pointOnLine2D(x1, y1, x2, y2, x3, y3) {\n var det1 = x1 * y2 + y1 * x3 + x2 * y3 - x3 * y2 - y3 * x1 - x2 * y1;\n return det1 > -0.001 && det1 < 0.001;\n }\n\n function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {\n if (z1 === 0 && z2 === 0 && z3 === 0) {\n return pointOnLine2D(x1, y1, x2, y2, x3, y3);\n }\n\n var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));\n var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));\n var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));\n var diffDist;\n\n if (dist1 > dist2) {\n if (dist1 > dist3) {\n diffDist = dist1 - dist2 - dist3;\n } else {\n diffDist = dist3 - dist2 - dist1;\n }\n } else if (dist3 > dist2) {\n diffDist = dist3 - dist2 - dist1;\n } else {\n diffDist = dist2 - dist1 - dist3;\n }\n\n return diffDist > -0.0001 && diffDist < 0.0001;\n }\n\n var getBezierLength = function () {\n return function (pt1, pt2, pt3, pt4) {\n var curveSegments = getDefaultCurveSegments();\n var k;\n var i;\n var len;\n var ptCoord;\n var perc;\n var addedLength = 0;\n var ptDistance;\n var point = [];\n var lastPoint = [];\n var lengthData = bezierLengthPool.newElement();\n len = pt3.length;\n\n for (k = 0; k < curveSegments; k += 1) {\n perc = k / (curveSegments - 1);\n ptDistance = 0;\n\n for (i = 0; i < len; i += 1) {\n ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];\n point[i] = ptCoord;\n\n if (lastPoint[i] !== null) {\n ptDistance += bmPow(point[i] - lastPoint[i], 2);\n }\n\n lastPoint[i] = point[i];\n }\n\n if (ptDistance) {\n ptDistance = bmSqrt(ptDistance);\n addedLength += ptDistance;\n }\n\n lengthData.percents[k] = perc;\n lengthData.lengths[k] = addedLength;\n }\n\n lengthData.addedLength = addedLength;\n return lengthData;\n };\n }();\n\n function getSegmentsLength(shapeData) {\n var segmentsLength = segmentsLengthPool.newElement();\n var closed = shapeData.c;\n var pathV = shapeData.v;\n var pathO = shapeData.o;\n var pathI = shapeData.i;\n var i;\n var len = shapeData._length;\n var lengths = segmentsLength.lengths;\n var totalLength = 0;\n\n for (i = 0; i < len - 1; i += 1) {\n lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);\n totalLength += lengths[i].addedLength;\n }\n\n if (closed && len) {\n lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);\n totalLength += lengths[i].addedLength;\n }\n\n segmentsLength.totalLength = totalLength;\n return segmentsLength;\n }\n\n function BezierData(length) {\n this.segmentLength = 0;\n this.points = new Array(length);\n }\n\n function PointData(partial, point) {\n this.partialLength = partial;\n this.point = point;\n }\n\n var buildBezierData = function () {\n var storedData = {};\n return function (pt1, pt2, pt3, pt4) {\n var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\\./g, 'p');\n\n if (!storedData[bezierName]) {\n var curveSegments = getDefaultCurveSegments();\n var k;\n var i;\n var len;\n var ptCoord;\n var perc;\n var addedLength = 0;\n var ptDistance;\n var point;\n var lastPoint = null;\n\n if (pt1.length === 2 && (pt1[0] !== pt2[0] || pt1[1] !== pt2[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt1[0] + pt3[0], pt1[1] + pt3[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt2[0] + pt4[0], pt2[1] + pt4[1])) {\n curveSegments = 2;\n }\n\n var bezierData = new BezierData(curveSegments);\n len = pt3.length;\n\n for (k = 0; k < curveSegments; k += 1) {\n point = createSizedArray(len);\n perc = k / (curveSegments - 1);\n ptDistance = 0;\n\n for (i = 0; i < len; i += 1) {\n ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];\n point[i] = ptCoord;\n\n if (lastPoint !== null) {\n ptDistance += bmPow(point[i] - lastPoint[i], 2);\n }\n }\n\n ptDistance = bmSqrt(ptDistance);\n addedLength += ptDistance;\n bezierData.points[k] = new PointData(ptDistance, point);\n lastPoint = point;\n }\n\n bezierData.segmentLength = addedLength;\n storedData[bezierName] = bezierData;\n }\n\n return storedData[bezierName];\n };\n }();\n\n function getDistancePerc(perc, bezierData) {\n var percents = bezierData.percents;\n var lengths = bezierData.lengths;\n var len = percents.length;\n var initPos = bmFloor((len - 1) * perc);\n var lengthPos = perc * bezierData.addedLength;\n var lPerc = 0;\n\n if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {\n return percents[initPos];\n }\n\n var dir = lengths[initPos] > lengthPos ? -1 : 1;\n var flag = true;\n\n while (flag) {\n if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {\n lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);\n flag = false;\n } else {\n initPos += dir;\n }\n\n if (initPos < 0 || initPos >= len - 1) {\n // FIX for TypedArrays that don't store floating point values with enough accuracy\n if (initPos === len - 1) {\n return percents[initPos];\n }\n\n flag = false;\n }\n }\n\n return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;\n }\n\n function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {\n var t1 = getDistancePerc(percent, bezierData);\n var u1 = 1 - t1;\n var ptX = math.round((u1 * u1 * u1 * pt1[0] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[0] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[0] + t1 * t1 * t1 * pt2[0]) * 1000) / 1000;\n var ptY = math.round((u1 * u1 * u1 * pt1[1] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[1] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[1] + t1 * t1 * t1 * pt2[1]) * 1000) / 1000;\n return [ptX, ptY];\n }\n\n var bezierSegmentPoints = createTypedArray('float32', 8);\n\n function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {\n if (startPerc < 0) {\n startPerc = 0;\n } else if (startPerc > 1) {\n startPerc = 1;\n }\n\n var t0 = getDistancePerc(startPerc, bezierData);\n endPerc = endPerc > 1 ? 1 : endPerc;\n var t1 = getDistancePerc(endPerc, bezierData);\n var i;\n var len = pt1.length;\n var u0 = 1 - t0;\n var u1 = 1 - t1;\n var u0u0u0 = u0 * u0 * u0;\n var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase\n\n var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase\n\n var t0t0t0 = t0 * t0 * t0; //\n\n var u0u0u1 = u0 * u0 * u1;\n var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase\n\n var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase\n\n var t0t0t1 = t0 * t0 * t1; //\n\n var u0u1u1 = u0 * u1 * u1;\n var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase\n\n var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase\n\n var t0t1t1 = t0 * t1 * t1; //\n\n var u1u1u1 = u1 * u1 * u1;\n var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase\n\n var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase\n\n var t1t1t1 = t1 * t1 * t1;\n\n for (i = 0; i < len; i += 1) {\n bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\n\n bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\n\n bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\n\n bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\n }\n\n return bezierSegmentPoints;\n }\n\n return {\n getSegmentsLength: getSegmentsLength,\n getNewSegment: getNewSegment,\n getPointInSegment: getPointInSegment,\n buildBezierData: buildBezierData,\n pointOnLine2D: pointOnLine2D,\n pointOnLine3D: pointOnLine3D\n };\n }\n\n var bez = bezFunction();\n\n var initFrame = initialDefaultFrame;\n var mathAbs = Math.abs;\n\n function interpolateValue(frameNum, caching) {\n var offsetTime = this.offsetTime;\n var newValue;\n\n if (this.propType === 'multidimensional') {\n newValue = createTypedArray('float32', this.pv.length);\n }\n\n var iterationIndex = caching.lastIndex;\n var i = iterationIndex;\n var len = this.keyframes.length - 1;\n var flag = true;\n var keyData;\n var nextKeyData;\n var keyframeMetadata;\n\n while (flag) {\n keyData = this.keyframes[i];\n nextKeyData = this.keyframes[i + 1];\n\n if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {\n if (keyData.h) {\n keyData = nextKeyData;\n }\n\n iterationIndex = 0;\n break;\n }\n\n if (nextKeyData.t - offsetTime > frameNum) {\n iterationIndex = i;\n break;\n }\n\n if (i < len - 1) {\n i += 1;\n } else {\n iterationIndex = 0;\n flag = false;\n }\n }\n\n keyframeMetadata = this.keyframesMetadata[i] || {};\n var k;\n var kLen;\n var perc;\n var jLen;\n var j;\n var fnc;\n var nextKeyTime = nextKeyData.t - offsetTime;\n var keyTime = keyData.t - offsetTime;\n var endValue;\n\n if (keyData.to) {\n if (!keyframeMetadata.bezierData) {\n keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);\n }\n\n var bezierData = keyframeMetadata.bezierData;\n\n if (frameNum >= nextKeyTime || frameNum < keyTime) {\n var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;\n kLen = bezierData.points[ind].point.length;\n\n for (k = 0; k < kLen; k += 1) {\n newValue[k] = bezierData.points[ind].point[k];\n } // caching._lastKeyframeIndex = -1;\n\n } else {\n if (keyframeMetadata.__fnct) {\n fnc = keyframeMetadata.__fnct;\n } else {\n fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;\n keyframeMetadata.__fnct = fnc;\n }\n\n perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));\n var distanceInLine = bezierData.segmentLength * perc;\n var segmentPerc;\n var addedLength = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastAddedLength : 0;\n j = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastPoint : 0;\n flag = true;\n jLen = bezierData.points.length;\n\n while (flag) {\n addedLength += bezierData.points[j].partialLength;\n\n if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {\n kLen = bezierData.points[j].point.length;\n\n for (k = 0; k < kLen; k += 1) {\n newValue[k] = bezierData.points[j].point[k];\n }\n\n break;\n } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {\n segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;\n kLen = bezierData.points[j].point.length;\n\n for (k = 0; k < kLen; k += 1) {\n newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;\n }\n\n break;\n }\n\n if (j < jLen - 1) {\n j += 1;\n } else {\n flag = false;\n }\n }\n\n caching._lastPoint = j;\n caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;\n caching._lastKeyframeIndex = i;\n }\n } else {\n var outX;\n var outY;\n var inX;\n var inY;\n var keyValue;\n len = keyData.s.length;\n endValue = nextKeyData.s || keyData.e;\n\n if (this.sh && keyData.h !== 1) {\n if (frameNum >= nextKeyTime) {\n newValue[0] = endValue[0];\n newValue[1] = endValue[1];\n newValue[2] = endValue[2];\n } else if (frameNum <= keyTime) {\n newValue[0] = keyData.s[0];\n newValue[1] = keyData.s[1];\n newValue[2] = keyData.s[2];\n } else {\n var quatStart = createQuaternion(keyData.s);\n var quatEnd = createQuaternion(endValue);\n var time = (frameNum - keyTime) / (nextKeyTime - keyTime);\n quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));\n }\n } else {\n for (i = 0; i < len; i += 1) {\n if (keyData.h !== 1) {\n if (frameNum >= nextKeyTime) {\n perc = 1;\n } else if (frameNum < keyTime) {\n perc = 0;\n } else {\n if (keyData.o.x.constructor === Array) {\n if (!keyframeMetadata.__fnct) {\n keyframeMetadata.__fnct = [];\n }\n\n if (!keyframeMetadata.__fnct[i]) {\n outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];\n outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];\n inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];\n inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];\n fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;\n keyframeMetadata.__fnct[i] = fnc;\n } else {\n fnc = keyframeMetadata.__fnct[i];\n }\n } else if (!keyframeMetadata.__fnct) {\n outX = keyData.o.x;\n outY = keyData.o.y;\n inX = keyData.i.x;\n inY = keyData.i.y;\n fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;\n keyData.keyframeMetadata = fnc;\n } else {\n fnc = keyframeMetadata.__fnct;\n }\n\n perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));\n }\n }\n\n endValue = nextKeyData.s || keyData.e;\n keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;\n\n if (this.propType === 'multidimensional') {\n newValue[i] = keyValue;\n } else {\n newValue = keyValue;\n }\n }\n }\n }\n\n caching.lastIndex = iterationIndex;\n return newValue;\n } // based on @Toji's https://github.com/toji/gl-matrix/\n\n\n function slerp(a, b, t) {\n var out = [];\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n var aw = a[3];\n var bx = b[0];\n var by = b[1];\n var bz = b[2];\n var bw = b[3];\n var omega;\n var cosom;\n var sinom;\n var scale0;\n var scale1;\n cosom = ax * bx + ay * by + az * bz + aw * bw;\n\n if (cosom < 0.0) {\n cosom = -cosom;\n bx = -bx;\n by = -by;\n bz = -bz;\n bw = -bw;\n }\n\n if (1.0 - cosom > 0.000001) {\n omega = Math.acos(cosom);\n sinom = Math.sin(omega);\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n } else {\n scale0 = 1.0 - t;\n scale1 = t;\n }\n\n out[0] = scale0 * ax + scale1 * bx;\n out[1] = scale0 * ay + scale1 * by;\n out[2] = scale0 * az + scale1 * bz;\n out[3] = scale0 * aw + scale1 * bw;\n return out;\n }\n\n function quaternionToEuler(out, quat) {\n var qx = quat[0];\n var qy = quat[1];\n var qz = quat[2];\n var qw = quat[3];\n var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);\n var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);\n var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);\n out[0] = heading / degToRads;\n out[1] = attitude / degToRads;\n out[2] = bank / degToRads;\n }\n\n function createQuaternion(values) {\n var heading = values[0] * degToRads;\n var attitude = values[1] * degToRads;\n var bank = values[2] * degToRads;\n var c1 = Math.cos(heading / 2);\n var c2 = Math.cos(attitude / 2);\n var c3 = Math.cos(bank / 2);\n var s1 = Math.sin(heading / 2);\n var s2 = Math.sin(attitude / 2);\n var s3 = Math.sin(bank / 2);\n var w = c1 * c2 * c3 - s1 * s2 * s3;\n var x = s1 * s2 * c3 + c1 * c2 * s3;\n var y = s1 * c2 * c3 + c1 * s2 * s3;\n var z = c1 * s2 * c3 - s1 * c2 * s3;\n return [x, y, z, w];\n }\n\n function getValueAtCurrentTime() {\n var frameNum = this.comp.renderedFrame - this.offsetTime;\n var initTime = this.keyframes[0].t - this.offsetTime;\n var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;\n\n if (!(frameNum === this._caching.lastFrame || this._caching.lastFrame !== initFrame && (this._caching.lastFrame >= endTime && frameNum >= endTime || this._caching.lastFrame < initTime && frameNum < initTime))) {\n if (this._caching.lastFrame >= frameNum) {\n this._caching._lastKeyframeIndex = -1;\n this._caching.lastIndex = 0;\n }\n\n var renderResult = this.interpolateValue(frameNum, this._caching);\n this.pv = renderResult;\n }\n\n this._caching.lastFrame = frameNum;\n return this.pv;\n }\n\n function setVValue(val) {\n var multipliedValue;\n\n if (this.propType === 'unidimensional') {\n multipliedValue = val * this.mult;\n\n if (mathAbs(this.v - multipliedValue) > 0.00001) {\n this.v = multipliedValue;\n this._mdf = true;\n }\n } else {\n var i = 0;\n var len = this.v.length;\n\n while (i < len) {\n multipliedValue = val[i] * this.mult;\n\n if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {\n this.v[i] = multipliedValue;\n this._mdf = true;\n }\n\n i += 1;\n }\n }\n }\n\n function processEffectsSequence() {\n if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {\n return;\n }\n\n if (this.lock) {\n this.setVValue(this.pv);\n return;\n }\n\n this.lock = true;\n this._mdf = this._isFirstFrame;\n var i;\n var len = this.effectsSequence.length;\n var finalValue = this.kf ? this.pv : this.data.k;\n\n for (i = 0; i < len; i += 1) {\n finalValue = this.effectsSequence[i](finalValue);\n }\n\n this.setVValue(finalValue);\n this._isFirstFrame = false;\n this.lock = false;\n this.frameId = this.elem.globalData.frameId;\n }\n\n function addEffect(effectFunction) {\n this.effectsSequence.push(effectFunction);\n this.container.addDynamicProperty(this);\n }\n\n function ValueProperty(elem, data, mult, container) {\n this.propType = 'unidimensional';\n this.mult = mult || 1;\n this.data = data;\n this.v = mult ? data.k * mult : data.k;\n this.pv = data.k;\n this._mdf = false;\n this.elem = elem;\n this.container = container;\n this.comp = elem.comp;\n this.k = false;\n this.kf = false;\n this.vel = 0;\n this.effectsSequence = [];\n this._isFirstFrame = true;\n this.getValue = processEffectsSequence;\n this.setVValue = setVValue;\n this.addEffect = addEffect;\n }\n\n function MultiDimensionalProperty(elem, data, mult, container) {\n this.propType = 'multidimensional';\n this.mult = mult || 1;\n this.data = data;\n this._mdf = false;\n this.elem = elem;\n this.container = container;\n this.comp = elem.comp;\n this.k = false;\n this.kf = false;\n this.frameId = -1;\n var i;\n var len = data.k.length;\n this.v = createTypedArray('float32', len);\n this.pv = createTypedArray('float32', len);\n this.vel = createTypedArray('float32', len);\n\n for (i = 0; i < len; i += 1) {\n this.v[i] = data.k[i] * this.mult;\n this.pv[i] = data.k[i];\n }\n\n this._isFirstFrame = true;\n this.effectsSequence = [];\n this.getValue = processEffectsSequence;\n this.setVValue = setVValue;\n this.addEffect = addEffect;\n }\n\n function KeyframedValueProperty(elem, data, mult, container) {\n this.propType = 'unidimensional';\n this.keyframes = data.k;\n this.keyframesMetadata = [];\n this.offsetTime = elem.data.st;\n this.frameId = -1;\n this._caching = {\n lastFrame: initFrame,\n lastIndex: 0,\n value: 0,\n _lastKeyframeIndex: -1\n };\n this.k = true;\n this.kf = true;\n this.data = data;\n this.mult = mult || 1;\n this.elem = elem;\n this.container = container;\n this.comp = elem.comp;\n this.v = initFrame;\n this.pv = initFrame;\n this._isFirstFrame = true;\n this.getValue = processEffectsSequence;\n this.setVValue = setVValue;\n this.interpolateValue = interpolateValue;\n this.effectsSequence = [getValueAtCurrentTime.bind(this)];\n this.addEffect = addEffect;\n }\n\n function KeyframedMultidimensionalProperty(elem, data, mult, container) {\n this.propType = 'multidimensional';\n var i;\n var len = data.k.length;\n var s;\n var e;\n var to;\n var ti;\n\n for (i = 0; i < len - 1; i += 1) {\n if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {\n s = data.k[i].s;\n e = data.k[i + 1].s;\n to = data.k[i].to;\n ti = data.k[i].ti;\n\n if (s.length === 2 && !(s[0] === e[0] && s[1] === e[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], s[0] + to[0], s[1] + to[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], e[0] + ti[0], e[1] + ti[1]) || s.length === 3 && !(s[0] === e[0] && s[1] === e[1] && s[2] === e[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], s[0] + to[0], s[1] + to[1], s[2] + to[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], e[0] + ti[0], e[1] + ti[1], e[2] + ti[2])) {\n data.k[i].to = null;\n data.k[i].ti = null;\n }\n\n if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {\n if (s.length === 2 || s[2] === e[2] && to[2] === 0 && ti[2] === 0) {\n data.k[i].to = null;\n data.k[i].ti = null;\n }\n }\n }\n }\n\n this.effectsSequence = [getValueAtCurrentTime.bind(this)];\n this.data = data;\n this.keyframes = data.k;\n this.keyframesMetadata = [];\n this.offsetTime = elem.data.st;\n this.k = true;\n this.kf = true;\n this._isFirstFrame = true;\n this.mult = mult || 1;\n this.elem = elem;\n this.container = container;\n this.comp = elem.comp;\n this.getValue = processEffectsSequence;\n this.setVValue = setVValue;\n this.interpolateValue = interpolateValue;\n this.frameId = -1;\n var arrLen = data.k[0].s.length;\n this.v = createTypedArray('float32', arrLen);\n this.pv = createTypedArray('float32', arrLen);\n\n for (i = 0; i < arrLen; i += 1) {\n this.v[i] = initFrame;\n this.pv[i] = initFrame;\n }\n\n this._caching = {\n lastFrame: initFrame,\n lastIndex: 0,\n value: createTypedArray('float32', arrLen)\n };\n this.addEffect = addEffect;\n }\n\n var PropertyFactory = function () {\n function getProp(elem, data, type, mult, container) {\n if (data.sid) {\n data = elem.globalData.slotManager.getProp(data);\n }\n\n var p;\n\n if (!data.k.length) {\n p = new ValueProperty(elem, data, mult, container);\n } else if (typeof data.k[0] === 'number') {\n p = new MultiDimensionalProperty(elem, data, mult, container);\n } else {\n switch (type) {\n case 0:\n p = new KeyframedValueProperty(elem, data, mult, container);\n break;\n\n case 1:\n p = new KeyframedMultidimensionalProperty(elem, data, mult, container);\n break;\n\n default:\n break;\n }\n }\n\n if (p.effectsSequence.length) {\n container.addDynamicProperty(p);\n }\n\n return p;\n }\n\n var ob = {\n getProp: getProp\n };\n return ob;\n }();\n\n function DynamicPropertyContainer() {}\n\n DynamicPropertyContainer.prototype = {\n addDynamicProperty: function addDynamicProperty(prop) {\n if (this.dynamicProperties.indexOf(prop) === -1) {\n this.dynamicProperties.push(prop);\n this.container.addDynamicProperty(this);\n this._isAnimated = true;\n }\n },\n iterateDynamicProperties: function iterateDynamicProperties() {\n this._mdf = false;\n var i;\n var len = this.dynamicProperties.length;\n\n for (i = 0; i < len; i += 1) {\n this.dynamicProperties[i].getValue();\n\n if (this.dynamicProperties[i]._mdf) {\n this._mdf = true;\n }\n }\n },\n initDynamicPropertyContainer: function initDynamicPropertyContainer(container) {\n this.container = container;\n this.dynamicProperties = [];\n this._mdf = false;\n this._isAnimated = false;\n }\n };\n\n var pointPool = function () {\n function create() {\n return createTypedArray('float32', 2);\n }\n\n return poolFactory(8, create);\n }();\n\n function ShapePath() {\n this.c = false;\n this._length = 0;\n this._maxLength = 8;\n this.v = createSizedArray(this._maxLength);\n this.o = createSizedArray(this._maxLength);\n this.i = createSizedArray(this._maxLength);\n }\n\n ShapePath.prototype.setPathData = function (closed, len) {\n this.c = closed;\n this.setLength(len);\n var i = 0;\n\n while (i < len) {\n this.v[i] = pointPool.newElement();\n this.o[i] = pointPool.newElement();\n this.i[i] = pointPool.newElement();\n i += 1;\n }\n };\n\n ShapePath.prototype.setLength = function (len) {\n while (this._maxLength < len) {\n this.doubleArrayLength();\n }\n\n this._length = len;\n };\n\n ShapePath.prototype.doubleArrayLength = function () {\n this.v = this.v.concat(createSizedArray(this._maxLength));\n this.i = this.i.concat(createSizedArray(this._maxLength));\n this.o = this.o.concat(createSizedArray(this._maxLength));\n this._maxLength *= 2;\n };\n\n ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {\n var arr;\n this._length = Math.max(this._length, pos + 1);\n\n if (this._length >= this._maxLength) {\n this.doubleArrayLength();\n }\n\n switch (type) {\n case 'v':\n arr = this.v;\n break;\n\n case 'i':\n arr = this.i;\n break;\n\n case 'o':\n arr = this.o;\n break;\n\n default:\n arr = [];\n break;\n }\n\n if (!arr[pos] || arr[pos] && !replace) {\n arr[pos] = pointPool.newElement();\n }\n\n arr[pos][0] = x;\n arr[pos][1] = y;\n };\n\n ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {\n this.setXYAt(vX, vY, 'v', pos, replace);\n this.setXYAt(oX, oY, 'o', pos, replace);\n this.setXYAt(iX, iY, 'i', pos, replace);\n };\n\n ShapePath.prototype.reverse = function () {\n var newPath = new ShapePath();\n newPath.setPathData(this.c, this._length);\n var vertices = this.v;\n var outPoints = this.o;\n var inPoints = this.i;\n var init = 0;\n\n if (this.c) {\n newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);\n init = 1;\n }\n\n var cnt = this._length - 1;\n var len = this._length;\n var i;\n\n for (i = init; i < len; i += 1) {\n newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);\n cnt -= 1;\n }\n\n return newPath;\n };\n\n ShapePath.prototype.length = function () {\n return this._length;\n };\n\n var shapePool = function () {\n function create() {\n return new ShapePath();\n }\n\n function release(shapePath) {\n var len = shapePath._length;\n var i;\n\n for (i = 0; i < len; i += 1) {\n pointPool.release(shapePath.v[i]);\n pointPool.release(shapePath.i[i]);\n pointPool.release(shapePath.o[i]);\n shapePath.v[i] = null;\n shapePath.i[i] = null;\n shapePath.o[i] = null;\n }\n\n shapePath._length = 0;\n shapePath.c = false;\n }\n\n function clone(shape) {\n var cloned = factory.newElement();\n var i;\n var len = shape._length === undefined ? shape.v.length : shape._length;\n cloned.setLength(len);\n cloned.c = shape.c;\n\n for (i = 0; i < len; i += 1) {\n cloned.setTripleAt(shape.v[i][0], shape.v[i][1], shape.o[i][0], shape.o[i][1], shape.i[i][0], shape.i[i][1], i);\n }\n\n return cloned;\n }\n\n var factory = poolFactory(4, create, release);\n factory.clone = clone;\n return factory;\n }();\n\n function ShapeCollection() {\n this._length = 0;\n this._maxLength = 4;\n this.shapes = createSizedArray(this._maxLength);\n }\n\n ShapeCollection.prototype.addShape = function (shapeData) {\n if (this._length === this._maxLength) {\n this.shapes = this.shapes.concat(createSizedArray(this._maxLength));\n this._maxLength *= 2;\n }\n\n this.shapes[this._length] = shapeData;\n this._length += 1;\n };\n\n ShapeCollection.prototype.releaseShapes = function () {\n var i;\n\n for (i = 0; i < this._length; i += 1) {\n shapePool.release(this.shapes[i]);\n }\n\n this._length = 0;\n };\n\n var shapeCollectionPool = function () {\n var ob = {\n newShapeCollection: newShapeCollection,\n release: release\n };\n var _length = 0;\n var _maxLength = 4;\n var pool = createSizedArray(_maxLength);\n\n function newShapeCollection() {\n var shapeCollection;\n\n if (_length) {\n _length -= 1;\n shapeCollection = pool[_length];\n } else {\n shapeCollection = new ShapeCollection();\n }\n\n return shapeCollection;\n }\n\n function release(shapeCollection) {\n var i;\n var len = shapeCollection._length;\n\n for (i = 0; i < len; i += 1) {\n shapePool.release(shapeCollection.shapes[i]);\n }\n\n shapeCollection._length = 0;\n\n if (_length === _maxLength) {\n pool = pooling[\"double\"](pool);\n _maxLength *= 2;\n }\n\n pool[_length] = shapeCollection;\n _length += 1;\n }\n\n return ob;\n }();\n\n var ShapePropertyFactory = function () {\n var initFrame = -999999;\n\n function interpolateShape(frameNum, previousValue, caching) {\n var iterationIndex = caching.lastIndex;\n var keyPropS;\n var keyPropE;\n var isHold;\n var j;\n var k;\n var jLen;\n var kLen;\n var perc;\n var vertexValue;\n var kf = this.keyframes;\n\n if (frameNum < kf[0].t - this.offsetTime) {\n keyPropS = kf[0].s[0];\n isHold = true;\n iterationIndex = 0;\n } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {\n keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];\n /* if(kf[kf.length - 1].s){\r\n keyPropS = kf[kf.length - 1].s[0];\r\n }else{\r\n keyPropS = kf[kf.length - 2].e[0];\r\n } */\n\n isHold = true;\n } else {\n var i = iterationIndex;\n var len = kf.length - 1;\n var flag = true;\n var keyData;\n var nextKeyData;\n var keyframeMetadata;\n\n while (flag) {\n keyData = kf[i];\n nextKeyData = kf[i + 1];\n\n if (nextKeyData.t - this.offsetTime > frameNum) {\n break;\n }\n\n if (i < len - 1) {\n i += 1;\n } else {\n flag = false;\n }\n }\n\n keyframeMetadata = this.keyframesMetadata[i] || {};\n isHold = keyData.h === 1;\n iterationIndex = i;\n\n if (!isHold) {\n if (frameNum >= nextKeyData.t - this.offsetTime) {\n perc = 1;\n } else if (frameNum < keyData.t - this.offsetTime) {\n perc = 0;\n } else {\n var fnc;\n\n if (keyframeMetadata.__fnct) {\n fnc = keyframeMetadata.__fnct;\n } else {\n fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;\n keyframeMetadata.__fnct = fnc;\n }\n\n perc = fnc((frameNum - (keyData.t - this.offsetTime)) / (nextKeyData.t - this.offsetTime - (keyData.t - this.offsetTime)));\n }\n\n keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];\n }\n\n keyPropS = keyData.s[0];\n }\n\n jLen = previousValue._length;\n kLen = keyPropS.i[0].length;\n caching.lastIndex = iterationIndex;\n\n for (j = 0; j < jLen; j += 1) {\n for (k = 0; k < kLen; k += 1) {\n vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;\n previousValue.i[j][k] = vertexValue;\n vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;\n previousValue.o[j][k] = vertexValue;\n vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;\n previousValue.v[j][k] = vertexValue;\n }\n }\n }\n\n function interpolateShapeCurrentTime() {\n var frameNum = this.comp.renderedFrame - this.offsetTime;\n var initTime = this.keyframes[0].t - this.offsetTime;\n var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;\n var lastFrame = this._caching.lastFrame;\n\n if (!(lastFrame !== initFrame && (lastFrame < initTime && frameNum < initTime || lastFrame > endTime && frameNum > endTime))) {\n /// /\n this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;\n this.interpolateShape(frameNum, this.pv, this._caching); /// /\n }\n\n this._caching.lastFrame = frameNum;\n return this.pv;\n }\n\n function resetShape() {\n this.paths = this.localShapeCollection;\n }\n\n function shapesEqual(shape1, shape2) {\n if (shape1._length !== shape2._length || shape1.c !== shape2.c) {\n return false;\n }\n\n var i;\n var len = shape1._length;\n\n for (i = 0; i < len; i += 1) {\n if (shape1.v[i][0] !== shape2.v[i][0] || shape1.v[i][1] !== shape2.v[i][1] || shape1.o[i][0] !== shape2.o[i][0] || shape1.o[i][1] !== shape2.o[i][1] || shape1.i[i][0] !== shape2.i[i][0] || shape1.i[i][1] !== shape2.i[i][1]) {\n return false;\n }\n }\n\n return true;\n }\n\n function setVValue(newPath) {\n if (!shapesEqual(this.v, newPath)) {\n this.v = shapePool.clone(newPath);\n this.localShapeCollection.releaseShapes();\n this.localShapeCollection.addShape(this.v);\n this._mdf = true;\n this.paths = this.localShapeCollection;\n }\n }\n\n function processEffectsSequence() {\n if (this.elem.globalData.frameId === this.frameId) {\n return;\n }\n\n if (!this.effectsSequence.length) {\n this._mdf = false;\n return;\n }\n\n if (this.lock) {\n this.setVValue(this.pv);\n return;\n }\n\n this.lock = true;\n this._mdf = false;\n var finalValue;\n\n if (this.kf) {\n finalValue = this.pv;\n } else if (this.data.ks) {\n finalValue = this.data.ks.k;\n } else {\n finalValue = this.data.pt.k;\n }\n\n var i;\n var len = this.effectsSequence.length;\n\n for (i = 0; i < len; i += 1) {\n finalValue = this.effectsSequence[i](finalValue);\n }\n\n this.setVValue(finalValue);\n this.lock = false;\n this.frameId = this.elem.globalData.frameId;\n }\n\n function ShapeProperty(elem, data, type) {\n this.propType = 'shape';\n this.comp = elem.comp;\n this.container = elem;\n this.elem = elem;\n this.data = data;\n this.k = false;\n this.kf = false;\n this._mdf = false;\n var pathData = type === 3 ? data.pt.k : data.ks.k;\n this.v = shapePool.clone(pathData);\n this.pv = shapePool.clone(this.v);\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\n this.paths = this.localShapeCollection;\n this.paths.addShape(this.v);\n this.reset = resetShape;\n this.effectsSequence = [];\n }\n\n function addEffect(effectFunction) {\n this.effectsSequence.push(effectFunction);\n this.container.addDynamicProperty(this);\n }\n\n ShapeProperty.prototype.interpolateShape = interpolateShape;\n ShapeProperty.prototype.getValue = processEffectsSequence;\n ShapeProperty.prototype.setVValue = setVValue;\n ShapeProperty.prototype.addEffect = addEffect;\n\n function KeyframedShapeProperty(elem, data, type) {\n this.propType = 'shape';\n this.comp = elem.comp;\n this.elem = elem;\n this.container = elem;\n this.offsetTime = elem.data.st;\n this.keyframes = type === 3 ? data.pt.k : data.ks.k;\n this.keyframesMetadata = [];\n this.k = true;\n this.kf = true;\n var len = this.keyframes[0].s[0].i.length;\n this.v = shapePool.newElement();\n this.v.setPathData(this.keyframes[0].s[0].c, len);\n this.pv = shapePool.clone(this.v);\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\n this.paths = this.localShapeCollection;\n this.paths.addShape(this.v);\n this.lastFrame = initFrame;\n this.reset = resetShape;\n this._caching = {\n lastFrame: initFrame,\n lastIndex: 0\n };\n this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];\n }\n\n KeyframedShapeProperty.prototype.getValue = processEffectsSequence;\n KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;\n KeyframedShapeProperty.prototype.setVValue = setVValue;\n KeyframedShapeProperty.prototype.addEffect = addEffect;\n\n var EllShapeProperty = function () {\n var cPoint = roundCorner;\n\n function EllShapePropertyFactory(elem, data) {\n this.v = shapePool.newElement();\n this.v.setPathData(true, 4);\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\n this.paths = this.localShapeCollection;\n this.localShapeCollection.addShape(this.v);\n this.d = data.d;\n this.elem = elem;\n this.comp = elem.comp;\n this.frameId = -1;\n this.initDynamicPropertyContainer(elem);\n this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\n this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);\n\n if (this.dynamicProperties.length) {\n this.k = true;\n } else {\n this.k = false;\n this.convertEllToPath();\n }\n }\n\n EllShapePropertyFactory.prototype = {\n reset: resetShape,\n getValue: function getValue() {\n if (this.elem.globalData.frameId === this.frameId) {\n return;\n }\n\n this.frameId = this.elem.globalData.frameId;\n this.iterateDynamicProperties();\n\n if (this._mdf) {\n this.convertEllToPath();\n }\n },\n convertEllToPath: function convertEllToPath() {\n var p0 = this.p.v[0];\n var p1 = this.p.v[1];\n var s0 = this.s.v[0] / 2;\n var s1 = this.s.v[1] / 2;\n\n var _cw = this.d !== 3;\n\n var _v = this.v;\n _v.v[0][0] = p0;\n _v.v[0][1] = p1 - s1;\n _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;\n _v.v[1][1] = p1;\n _v.v[2][0] = p0;\n _v.v[2][1] = p1 + s1;\n _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;\n _v.v[3][1] = p1;\n _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;\n _v.i[0][1] = p1 - s1;\n _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;\n _v.i[1][1] = p1 - s1 * cPoint;\n _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;\n _v.i[2][1] = p1 + s1;\n _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;\n _v.i[3][1] = p1 + s1 * cPoint;\n _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;\n _v.o[0][1] = p1 - s1;\n _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;\n _v.o[1][1] = p1 + s1 * cPoint;\n _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;\n _v.o[2][1] = p1 + s1;\n _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;\n _v.o[3][1] = p1 - s1 * cPoint;\n }\n };\n extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);\n return EllShapePropertyFactory;\n }();\n\n var StarShapeProperty = function () {\n function StarShapePropertyFactory(elem, data) {\n this.v = shapePool.newElement();\n this.v.setPathData(true, 0);\n this.elem = elem;\n this.comp = elem.comp;\n this.data = data;\n this.frameId = -1;\n this.d = data.d;\n this.initDynamicPropertyContainer(elem);\n\n if (data.sy === 1) {\n this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);\n this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);\n this.convertToPath = this.convertStarToPath;\n } else {\n this.convertToPath = this.convertPolygonToPath;\n }\n\n this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);\n this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\n this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);\n this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);\n this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\n this.localShapeCollection.addShape(this.v);\n this.paths = this.localShapeCollection;\n\n if (this.dynamicProperties.length) {\n this.k = true;\n } else {\n this.k = false;\n this.convertToPath();\n }\n }\n\n StarShapePropertyFactory.prototype = {\n reset: resetShape,\n getValue: function getValue() {\n if (this.elem.globalData.frameId === this.frameId) {\n return;\n }\n\n this.frameId = this.elem.globalData.frameId;\n this.iterateDynamicProperties();\n\n if (this._mdf) {\n this.convertToPath();\n }\n },\n convertStarToPath: function convertStarToPath() {\n var numPts = Math.floor(this.pt.v) * 2;\n var angle = Math.PI * 2 / numPts;\n /* this.v.v.length = numPts;\r\n this.v.i.length = numPts;\r\n this.v.o.length = numPts; */\n\n var longFlag = true;\n var longRad = this.or.v;\n var shortRad = this.ir.v;\n var longRound = this.os.v;\n var shortRound = this.is.v;\n var longPerimSegment = 2 * Math.PI * longRad / (numPts * 2);\n var shortPerimSegment = 2 * Math.PI * shortRad / (numPts * 2);\n var i;\n var rad;\n var roundness;\n var perimSegment;\n var currentAng = -Math.PI / 2;\n currentAng += this.r.v;\n var dir = this.data.d === 3 ? -1 : 1;\n this.v._length = 0;\n\n for (i = 0; i < numPts; i += 1) {\n rad = longFlag ? longRad : shortRad;\n roundness = longFlag ? longRound : shortRound;\n perimSegment = longFlag ? longPerimSegment : shortPerimSegment;\n var x = rad * Math.cos(currentAng);\n var y = rad * Math.sin(currentAng);\n var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);\n var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);\n x += +this.p.v[0];\n y += +this.p.v[1];\n this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true);\n /* this.v.v[i] = [x,y];\r\n this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];\r\n this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];\r\n this.v._length = numPts; */\n\n longFlag = !longFlag;\n currentAng += angle * dir;\n }\n },\n convertPolygonToPath: function convertPolygonToPath() {\n var numPts = Math.floor(this.pt.v);\n var angle = Math.PI * 2 / numPts;\n var rad = this.or.v;\n var roundness = this.os.v;\n var perimSegment = 2 * Math.PI * rad / (numPts * 4);\n var i;\n var currentAng = -Math.PI * 0.5;\n var dir = this.data.d === 3 ? -1 : 1;\n currentAng += this.r.v;\n this.v._length = 0;\n\n for (i = 0; i < numPts; i += 1) {\n var x = rad * Math.cos(currentAng);\n var y = rad * Math.sin(currentAng);\n var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);\n var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);\n x += +this.p.v[0];\n y += +this.p.v[1];\n this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true);\n currentAng += angle * dir;\n }\n\n this.paths.length = 0;\n this.paths[0] = this.v;\n }\n };\n extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);\n return StarShapePropertyFactory;\n }();\n\n var RectShapeProperty = function () {\n function RectShapePropertyFactory(elem, data) {\n this.v = shapePool.newElement();\n this.v.c = true;\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\n this.localShapeCollection.addShape(this.v);\n this.paths = this.localShapeCollection;\n this.elem = elem;\n this.comp = elem.comp;\n this.frameId = -1;\n this.d = data.d;\n this.initDynamicPropertyContainer(elem);\n this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\n this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);\n this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);\n\n if (this.dynamicProperties.length) {\n this.k = true;\n } else {\n this.k = false;\n this.convertRectToPath();\n }\n }\n\n RectShapePropertyFactory.prototype = {\n convertRectToPath: function convertRectToPath() {\n var p0 = this.p.v[0];\n var p1 = this.p.v[1];\n var v0 = this.s.v[0] / 2;\n var v1 = this.s.v[1] / 2;\n var round = bmMin(v0, v1, this.r.v);\n var cPoint = round * (1 - roundCorner);\n this.v._length = 0;\n\n if (this.d === 2 || this.d === 1) {\n this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);\n this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);\n\n if (round !== 0) {\n this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);\n this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);\n this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);\n this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);\n this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);\n this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);\n } else {\n this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);\n this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);\n }\n } else {\n this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);\n\n if (round !== 0) {\n this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);\n this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);\n this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);\n this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);\n this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);\n this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);\n this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);\n } else {\n this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);\n this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);\n this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);\n }\n }\n },\n getValue: function getValue() {\n if (this.elem.globalData.frameId === this.frameId) {\n return;\n }\n\n this.frameId = this.elem.globalData.frameId;\n this.iterateDynamicProperties();\n\n if (this._mdf) {\n this.convertRectToPath();\n }\n },\n reset: resetShape\n };\n extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);\n return RectShapePropertyFactory;\n }();\n\n function getShapeProp(elem, data, type) {\n var prop;\n\n if (type === 3 || type === 4) {\n var dataProp = type === 3 ? data.pt : data.ks;\n var keys = dataProp.k;\n\n if (keys.length) {\n prop = new KeyframedShapeProperty(elem, data, type);\n } else {\n prop = new ShapeProperty(elem, data, type);\n }\n } else if (type === 5) {\n prop = new RectShapeProperty(elem, data);\n } else if (type === 6) {\n prop = new EllShapeProperty(elem, data);\n } else if (type === 7) {\n prop = new StarShapeProperty(elem, data);\n }\n\n if (prop.k) {\n elem.addDynamicProperty(prop);\n }\n\n return prop;\n }\n\n function getConstructorFunction() {\n return ShapeProperty;\n }\n\n function getKeyframedConstructorFunction() {\n return KeyframedShapeProperty;\n }\n\n var ob = {};\n ob.getShapeProp = getShapeProp;\n ob.getConstructorFunction = getConstructorFunction;\n ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;\n return ob;\n }();\n\n /*!\r\n Transformation Matrix v2.0\r\n (c) Epistemex 2014-2015\r\n www.epistemex.com\r\n By Ken Fyrstenberg\r\n Contributions by leeoniya.\r\n License: MIT, header required.\r\n */\n\n /**\r\n * 2D transformation matrix object initialized with identity matrix.\r\n *\r\n * The matrix can synchronize a canvas context by supplying the context\r\n * as an argument, or later apply current absolute transform to an\r\n * existing context.\r\n *\r\n * All values are handled as floating point values.\r\n *\r\n * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix\r\n * @prop {number} a - scale x\r\n * @prop {number} b - shear y\r\n * @prop {number} c - shear x\r\n * @prop {number} d - scale y\r\n * @prop {number} e - translate x\r\n * @prop {number} f - translate y\r\n * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context\r\n * @constructor\r\n */\n\n var Matrix = function () {\n var _cos = Math.cos;\n var _sin = Math.sin;\n var _tan = Math.tan;\n var _rnd = Math.round;\n\n function reset() {\n this.props[0] = 1;\n this.props[1] = 0;\n this.props[2] = 0;\n this.props[3] = 0;\n this.props[4] = 0;\n this.props[5] = 1;\n this.props[6] = 0;\n this.props[7] = 0;\n this.props[8] = 0;\n this.props[9] = 0;\n this.props[10] = 1;\n this.props[11] = 0;\n this.props[12] = 0;\n this.props[13] = 0;\n this.props[14] = 0;\n this.props[15] = 1;\n return this;\n }\n\n function rotate(angle) {\n if (angle === 0) {\n return this;\n }\n\n var mCos = _cos(angle);\n\n var mSin = _sin(angle);\n\n return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n\n function rotateX(angle) {\n if (angle === 0) {\n return this;\n }\n\n var mCos = _cos(angle);\n\n var mSin = _sin(angle);\n\n return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);\n }\n\n function rotateY(angle) {\n if (angle === 0) {\n return this;\n }\n\n var mCos = _cos(angle);\n\n var mSin = _sin(angle);\n\n return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);\n }\n\n function rotateZ(angle) {\n if (angle === 0) {\n return this;\n }\n\n var mCos = _cos(angle);\n\n var mSin = _sin(angle);\n\n return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n\n function shear(sx, sy) {\n return this._t(1, sy, sx, 1, 0, 0);\n }\n\n function skew(ax, ay) {\n return this.shear(_tan(ax), _tan(ay));\n }\n\n function skewFromAxis(ax, angle) {\n var mCos = _cos(angle);\n\n var mSin = _sin(angle);\n\n return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);\n }\n\n function scale(sx, sy, sz) {\n if (!sz && sz !== 0) {\n sz = 1;\n }\n\n if (sx === 1 && sy === 1 && sz === 1) {\n return this;\n }\n\n return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);\n }\n\n function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {\n this.props[0] = a;\n this.props[1] = b;\n this.props[2] = c;\n this.props[3] = d;\n this.props[4] = e;\n this.props[5] = f;\n this.props[6] = g;\n this.props[7] = h;\n this.props[8] = i;\n this.props[9] = j;\n this.props[10] = k;\n this.props[11] = l;\n this.props[12] = m;\n this.props[13] = n;\n this.props[14] = o;\n this.props[15] = p;\n return this;\n }\n\n function translate(tx, ty, tz) {\n tz = tz || 0;\n\n if (tx !== 0 || ty !== 0 || tz !== 0) {\n return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);\n }\n\n return this;\n }\n\n function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {\n var _p = this.props;\n\n if (a2 === 1 && b2 === 0 && c2 === 0 && d2 === 0 && e2 === 0 && f2 === 1 && g2 === 0 && h2 === 0 && i2 === 0 && j2 === 0 && k2 === 1 && l2 === 0) {\n // NOTE: commenting this condition because TurboFan deoptimizes code when present\n // if(m2 !== 0 || n2 !== 0 || o2 !== 0){\n _p[12] = _p[12] * a2 + _p[15] * m2;\n _p[13] = _p[13] * f2 + _p[15] * n2;\n _p[14] = _p[14] * k2 + _p[15] * o2;\n _p[15] *= p2; // }\n\n this._identityCalculated = false;\n return this;\n }\n\n var a1 = _p[0];\n var b1 = _p[1];\n var c1 = _p[2];\n var d1 = _p[3];\n var e1 = _p[4];\n var f1 = _p[5];\n var g1 = _p[6];\n var h1 = _p[7];\n var i1 = _p[8];\n var j1 = _p[9];\n var k1 = _p[10];\n var l1 = _p[11];\n var m1 = _p[12];\n var n1 = _p[13];\n var o1 = _p[14];\n var p1 = _p[15];\n /* matrix order (canvas compatible):\r\n * ace\r\n * bdf\r\n * 001\r\n */\n\n _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;\n _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;\n _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;\n _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;\n _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;\n _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;\n _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;\n _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;\n _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;\n _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;\n _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;\n _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;\n _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;\n _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;\n _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;\n _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;\n this._identityCalculated = false;\n return this;\n }\n\n function multiply(matrix) {\n var matrixProps = matrix.props;\n return this.transform(matrixProps[0], matrixProps[1], matrixProps[2], matrixProps[3], matrixProps[4], matrixProps[5], matrixProps[6], matrixProps[7], matrixProps[8], matrixProps[9], matrixProps[10], matrixProps[11], matrixProps[12], matrixProps[13], matrixProps[14], matrixProps[15]);\n }\n\n function isIdentity() {\n if (!this._identityCalculated) {\n this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0 || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0 || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0 || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1);\n this._identityCalculated = true;\n }\n\n return this._identity;\n }\n\n function equals(matr) {\n var i = 0;\n\n while (i < 16) {\n if (matr.props[i] !== this.props[i]) {\n return false;\n }\n\n i += 1;\n }\n\n return true;\n }\n\n function clone(matr) {\n var i;\n\n for (i = 0; i < 16; i += 1) {\n matr.props[i] = this.props[i];\n }\n\n return matr;\n }\n\n function cloneFromProps(props) {\n var i;\n\n for (i = 0; i < 16; i += 1) {\n this.props[i] = props[i];\n }\n }\n\n function applyToPoint(x, y, z) {\n return {\n x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],\n y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],\n z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]\n };\n /* return {\r\n x: x * me.a + y * me.c + me.e,\r\n y: x * me.b + y * me.d + me.f\r\n }; */\n }\n\n function applyToX(x, y, z) {\n return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];\n }\n\n function applyToY(x, y, z) {\n return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];\n }\n\n function applyToZ(x, y, z) {\n return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];\n }\n\n function getInverseMatrix() {\n var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];\n var a = this.props[5] / determinant;\n var b = -this.props[1] / determinant;\n var c = -this.props[4] / determinant;\n var d = this.props[0] / determinant;\n var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;\n var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;\n var inverseMatrix = new Matrix();\n inverseMatrix.props[0] = a;\n inverseMatrix.props[1] = b;\n inverseMatrix.props[4] = c;\n inverseMatrix.props[5] = d;\n inverseMatrix.props[12] = e;\n inverseMatrix.props[13] = f;\n return inverseMatrix;\n }\n\n function inversePoint(pt) {\n var inverseMatrix = this.getInverseMatrix();\n return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);\n }\n\n function inversePoints(pts) {\n var i;\n var len = pts.length;\n var retPts = [];\n\n for (i = 0; i < len; i += 1) {\n retPts[i] = inversePoint(pts[i]);\n }\n\n return retPts;\n }\n\n function applyToTriplePoints(pt1, pt2, pt3) {\n var arr = createTypedArray('float32', 6);\n\n if (this.isIdentity()) {\n arr[0] = pt1[0];\n arr[1] = pt1[1];\n arr[2] = pt2[0];\n arr[3] = pt2[1];\n arr[4] = pt3[0];\n arr[5] = pt3[1];\n } else {\n var p0 = this.props[0];\n var p1 = this.props[1];\n var p4 = this.props[4];\n var p5 = this.props[5];\n var p12 = this.props[12];\n var p13 = this.props[13];\n arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;\n arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;\n arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;\n arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;\n arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;\n arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;\n }\n\n return arr;\n }\n\n function applyToPointArray(x, y, z) {\n var arr;\n\n if (this.isIdentity()) {\n arr = [x, y, z];\n } else {\n arr = [x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12], x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13], x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]];\n }\n\n return arr;\n }\n\n function applyToPointStringified(x, y) {\n if (this.isIdentity()) {\n return x + ',' + y;\n }\n\n var _p = this.props;\n return Math.round((x * _p[0] + y * _p[4] + _p[12]) * 100) / 100 + ',' + Math.round((x * _p[1] + y * _p[5] + _p[13]) * 100) / 100;\n }\n\n function toCSS() {\n // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed.\n\n /* if(this.isIdentity()) {\r\n return '';\r\n } */\n var i = 0;\n var props = this.props;\n var cssValue = 'matrix3d(';\n var v = 10000;\n\n while (i < 16) {\n cssValue += _rnd(props[i] * v) / v;\n cssValue += i === 15 ? ')' : ',';\n i += 1;\n }\n\n return cssValue;\n }\n\n function roundMatrixProperty(val) {\n var v = 10000;\n\n if (val < 0.000001 && val > 0 || val > -0.000001 && val < 0) {\n return _rnd(val * v) / v;\n }\n\n return val;\n }\n\n function to2dCSS() {\n // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed.\n\n /* if(this.isIdentity()) {\r\n return '';\r\n } */\n var props = this.props;\n\n var _a = roundMatrixProperty(props[0]);\n\n var _b = roundMatrixProperty(props[1]);\n\n var _c = roundMatrixProperty(props[4]);\n\n var _d = roundMatrixProperty(props[5]);\n\n var _e = roundMatrixProperty(props[12]);\n\n var _f = roundMatrixProperty(props[13]);\n\n return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';\n }\n\n return function () {\n this.reset = reset;\n this.rotate = rotate;\n this.rotateX = rotateX;\n this.rotateY = rotateY;\n this.rotateZ = rotateZ;\n this.skew = skew;\n this.skewFromAxis = skewFromAxis;\n this.shear = shear;\n this.scale = scale;\n this.setTransform = setTransform;\n this.translate = translate;\n this.transform = transform;\n this.multiply = multiply;\n this.applyToPoint = applyToPoint;\n this.applyToX = applyToX;\n this.applyToY = applyToY;\n this.applyToZ = applyToZ;\n this.applyToPointArray = applyToPointArray;\n this.applyToTriplePoints = applyToTriplePoints;\n this.applyToPointStringified = applyToPointStringified;\n this.toCSS = toCSS;\n this.to2dCSS = to2dCSS;\n this.clone = clone;\n this.cloneFromProps = cloneFromProps;\n this.equals = equals;\n this.inversePoints = inversePoints;\n this.inversePoint = inversePoint;\n this.getInverseMatrix = getInverseMatrix;\n this._t = this.transform;\n this.isIdentity = isIdentity;\n this._identity = true;\n this._identityCalculated = false;\n this.props = createTypedArray('float32', 16);\n this.reset();\n };\n }();\n\n function _typeof$3(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$3(obj); }\n var lottie = {};\n var standalone = '__[STANDALONE]__';\n var animationData = '__[ANIMATIONDATA]__';\n var renderer = '';\n\n function setLocation(href) {\n setLocationHref(href);\n }\n\n function searchAnimations() {\n if (standalone === true) {\n animationManager.searchAnimations(animationData, standalone, renderer);\n } else {\n animationManager.searchAnimations();\n }\n }\n\n function setSubframeRendering(flag) {\n setSubframeEnabled(flag);\n }\n\n function setPrefix(prefix) {\n setIdPrefix(prefix);\n }\n\n function loadAnimation(params) {\n if (standalone === true) {\n params.animationData = JSON.parse(animationData);\n }\n\n return animationManager.loadAnimation(params);\n }\n\n function setQuality(value) {\n if (typeof value === 'string') {\n switch (value) {\n case 'high':\n setDefaultCurveSegments(200);\n break;\n\n default:\n case 'medium':\n setDefaultCurveSegments(50);\n break;\n\n case 'low':\n setDefaultCurveSegments(10);\n break;\n }\n } else if (!isNaN(value) && value > 1) {\n setDefaultCurveSegments(value);\n }\n\n if (getDefaultCurveSegments() >= 50) {\n roundValues(false);\n } else {\n roundValues(true);\n }\n }\n\n function inBrowser() {\n return typeof navigator !== 'undefined';\n }\n\n function installPlugin(type, plugin) {\n if (type === 'expressions') {\n setExpressionsPlugin(plugin);\n }\n }\n\n function getFactory(name) {\n switch (name) {\n case 'propertyFactory':\n return PropertyFactory;\n\n case 'shapePropertyFactory':\n return ShapePropertyFactory;\n\n case 'matrix':\n return Matrix;\n\n default:\n return null;\n }\n }\n\n lottie.play = animationManager.play;\n lottie.pause = animationManager.pause;\n lottie.setLocationHref = setLocation;\n lottie.togglePause = animationManager.togglePause;\n lottie.setSpeed = animationManager.setSpeed;\n lottie.setDirection = animationManager.setDirection;\n lottie.stop = animationManager.stop;\n lottie.searchAnimations = searchAnimations;\n lottie.registerAnimation = animationManager.registerAnimation;\n lottie.loadAnimation = loadAnimation;\n lottie.setSubframeRendering = setSubframeRendering;\n lottie.resize = animationManager.resize; // lottie.start = start;\n\n lottie.goToAndStop = animationManager.goToAndStop;\n lottie.destroy = animationManager.destroy;\n lottie.setQuality = setQuality;\n lottie.inBrowser = inBrowser;\n lottie.installPlugin = installPlugin;\n lottie.freeze = animationManager.freeze;\n lottie.unfreeze = animationManager.unfreeze;\n lottie.setVolume = animationManager.setVolume;\n lottie.mute = animationManager.mute;\n lottie.unmute = animationManager.unmute;\n lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;\n lottie.useWebWorker = setWebWorker;\n lottie.setIDPrefix = setPrefix;\n lottie.__getFactory = getFactory;\n lottie.version = '5.12.2';\n\n function checkReady() {\n if (document.readyState === 'complete') {\n clearInterval(readyStateCheckInterval);\n searchAnimations();\n }\n }\n\n function getQueryVariable(variable) {\n var vars = queryString.split('&');\n\n for (var i = 0; i < vars.length; i += 1) {\n var pair = vars[i].split('=');\n\n if (decodeURIComponent(pair[0]) == variable) {\n // eslint-disable-line eqeqeq\n return decodeURIComponent(pair[1]);\n }\n }\n\n return null;\n }\n\n var queryString = '';\n\n if (standalone) {\n var scripts = document.getElementsByTagName('script');\n var index = scripts.length - 1;\n var myScript = scripts[index] || {\n src: ''\n };\n queryString = myScript.src ? myScript.src.replace(/^[^\\?]+\\??/, '') : ''; // eslint-disable-line no-useless-escape\n\n renderer = getQueryVariable('renderer');\n }\n\n var readyStateCheckInterval = setInterval(checkReady, 100); // this adds bodymovin to the window object for backwards compatibility\n\n try {\n if (!((typeof exports === \"undefined\" ? \"undefined\" : _typeof$3(exports)) === 'object' && typeof module !== 'undefined') && !(typeof define === 'function' && define.amd) // eslint-disable-line no-undef\n ) {\n window.bodymovin = lottie;\n }\n } catch (err) {//\n }\n\n var ShapeModifiers = function () {\n var ob = {};\n var modifiers = {};\n ob.registerModifier = registerModifier;\n ob.getModifier = getModifier;\n\n function registerModifier(nm, factory) {\n if (!modifiers[nm]) {\n modifiers[nm] = factory;\n }\n }\n\n function getModifier(nm, elem, data) {\n return new modifiers[nm](elem, data);\n }\n\n return ob;\n }();\n\n function ShapeModifier() {}\n\n ShapeModifier.prototype.initModifierProperties = function () {};\n\n ShapeModifier.prototype.addShapeToModifier = function () {};\n\n ShapeModifier.prototype.addShape = function (data) {\n if (!this.closed) {\n // Adding shape to dynamic properties. It covers the case where a shape has no effects applied, to reset it's _mdf state on every tick.\n data.sh.container.addDynamicProperty(data.sh);\n var shapeData = {\n shape: data.sh,\n data: data,\n localShapeCollection: shapeCollectionPool.newShapeCollection()\n };\n this.shapes.push(shapeData);\n this.addShapeToModifier(shapeData);\n\n if (this._isAnimated) {\n data.setAsAnimated();\n }\n }\n };\n\n ShapeModifier.prototype.init = function (elem, data) {\n this.shapes = [];\n this.elem = elem;\n this.initDynamicPropertyContainer(elem);\n this.initModifierProperties(elem, data);\n this.frameId = initialDefaultFrame;\n this.closed = false;\n this.k = false;\n\n if (this.dynamicProperties.length) {\n this.k = true;\n } else {\n this.getValue(true);\n }\n };\n\n ShapeModifier.prototype.processKeys = function () {\n if (this.elem.globalData.frameId === this.frameId) {\n return;\n }\n\n this.frameId = this.elem.globalData.frameId;\n this.iterateDynamicProperties();\n };\n\n extendPrototype([DynamicPropertyContainer], ShapeModifier);\n\n function TrimModifier() {}\n\n extendPrototype([ShapeModifier], TrimModifier);\n\n TrimModifier.prototype.initModifierProperties = function (elem, data) {\n this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);\n this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);\n this.sValue = 0;\n this.eValue = 0;\n this.getValue = this.processKeys;\n this.m = data.m;\n this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;\n };\n\n TrimModifier.prototype.addShapeToModifier = function (shapeData) {\n shapeData.pathsData = [];\n };\n\n TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {\n var segments = [];\n\n if (e <= 1) {\n segments.push({\n s: s,\n e: e\n });\n } else if (s >= 1) {\n segments.push({\n s: s - 1,\n e: e - 1\n });\n } else {\n segments.push({\n s: s,\n e: 1\n });\n segments.push({\n s: 0,\n e: e - 1\n });\n }\n\n var shapeSegments = [];\n var i;\n var len = segments.length;\n var segmentOb;\n\n for (i = 0; i < len; i += 1) {\n segmentOb = segments[i];\n\n if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {\n var shapeS;\n var shapeE;\n\n if (segmentOb.s * totalModifierLength <= addedLength) {\n shapeS = 0;\n } else {\n shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;\n }\n\n if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {\n shapeE = 1;\n } else {\n shapeE = (segmentOb.e * totalModifierLength - addedLength) / shapeLength;\n }\n\n shapeSegments.push([shapeS, shapeE]);\n }\n }\n\n if (!shapeSegments.length) {\n shapeSegments.push([0, 0]);\n }\n\n return shapeSegments;\n };\n\n TrimModifier.prototype.releasePathsData = function (pathsData) {\n var i;\n var len = pathsData.length;\n\n for (i = 0; i < len; i += 1) {\n segmentsLengthPool.release(pathsData[i]);\n }\n\n pathsData.length = 0;\n return pathsData;\n };\n\n TrimModifier.prototype.processShapes = function (_isFirstFrame) {\n var s;\n var e;\n\n if (this._mdf || _isFirstFrame) {\n var o = this.o.v % 360 / 360;\n\n if (o < 0) {\n o += 1;\n }\n\n if (this.s.v > 1) {\n s = 1 + o;\n } else if (this.s.v < 0) {\n s = 0 + o;\n } else {\n s = this.s.v + o;\n }\n\n if (this.e.v > 1) {\n e = 1 + o;\n } else if (this.e.v < 0) {\n e = 0 + o;\n } else {\n e = this.e.v + o;\n }\n\n if (s > e) {\n var _s = s;\n s = e;\n e = _s;\n }\n\n s = Math.round(s * 10000) * 0.0001;\n e = Math.round(e * 10000) * 0.0001;\n this.sValue = s;\n this.eValue = e;\n } else {\n s = this.sValue;\n e = this.eValue;\n }\n\n var shapePaths;\n var i;\n var len = this.shapes.length;\n var j;\n var jLen;\n var pathsData;\n var pathData;\n var totalShapeLength;\n var totalModifierLength = 0;\n\n if (e === s) {\n for (i = 0; i < len; i += 1) {\n this.shapes[i].localShapeCollection.releaseShapes();\n this.shapes[i].shape._mdf = true;\n this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;\n\n if (this._mdf) {\n this.shapes[i].pathsData.length = 0;\n }\n }\n } else if (!(e === 1 && s === 0 || e === 0 && s === 1)) {\n var segments = [];\n var shapeData;\n var localShapeCollection;\n\n for (i = 0; i < len; i += 1) {\n shapeData = this.shapes[i]; // if shape hasn't changed and trim properties haven't changed, cached previous path can be used\n\n if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {\n shapeData.shape.paths = shapeData.localShapeCollection;\n } else {\n shapePaths = shapeData.shape.paths;\n jLen = shapePaths._length;\n totalShapeLength = 0;\n\n if (!shapeData.shape._mdf && shapeData.pathsData.length) {\n totalShapeLength = shapeData.totalShapeLength;\n } else {\n pathsData = this.releasePathsData(shapeData.pathsData);\n\n for (j = 0; j < jLen; j += 1) {\n pathData = bez.getSegmentsLength(shapePaths.shapes[j]);\n pathsData.push(pathData);\n totalShapeLength += pathData.totalLength;\n }\n\n shapeData.totalShapeLength = totalShapeLength;\n shapeData.pathsData = pathsData;\n }\n\n totalModifierLength += totalShapeLength;\n shapeData.shape._mdf = true;\n }\n }\n\n var shapeS = s;\n var shapeE = e;\n var addedLength = 0;\n var edges;\n\n for (i = len - 1; i >= 0; i -= 1) {\n shapeData = this.shapes[i];\n\n if (shapeData.shape._mdf) {\n localShapeCollection = shapeData.localShapeCollection;\n localShapeCollection.releaseShapes(); // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group\n\n if (this.m === 2 && len > 1) {\n edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);\n addedLength += shapeData.totalShapeLength;\n } else {\n edges = [[shapeS, shapeE]];\n }\n\n jLen = edges.length;\n\n for (j = 0; j < jLen; j += 1) {\n shapeS = edges[j][0];\n shapeE = edges[j][1];\n segments.length = 0;\n\n if (shapeE <= 1) {\n segments.push({\n s: shapeData.totalShapeLength * shapeS,\n e: shapeData.totalShapeLength * shapeE\n });\n } else if (shapeS >= 1) {\n segments.push({\n s: shapeData.totalShapeLength * (shapeS - 1),\n e: shapeData.totalShapeLength * (shapeE - 1)\n });\n } else {\n segments.push({\n s: shapeData.totalShapeLength * shapeS,\n e: shapeData.totalShapeLength\n });\n segments.push({\n s: 0,\n e: shapeData.totalShapeLength * (shapeE - 1)\n });\n }\n\n var newShapesData = this.addShapes(shapeData, segments[0]);\n\n if (segments[0].s !== segments[0].e) {\n if (segments.length > 1) {\n var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];\n\n if (lastShapeInCollection.c) {\n var lastShape = newShapesData.pop();\n this.addPaths(newShapesData, localShapeCollection);\n newShapesData = this.addShapes(shapeData, segments[1], lastShape);\n } else {\n this.addPaths(newShapesData, localShapeCollection);\n newShapesData = this.addShapes(shapeData, segments[1]);\n }\n }\n\n this.addPaths(newShapesData, localShapeCollection);\n }\n }\n\n shapeData.shape.paths = localShapeCollection;\n }\n }\n } else if (this._mdf) {\n for (i = 0; i < len; i += 1) {\n // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.\n // Don't remove this even if it's losing cached info.\n this.shapes[i].pathsData.length = 0;\n this.shapes[i].shape._mdf = true;\n }\n }\n };\n\n TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {\n var i;\n var len = newPaths.length;\n\n for (i = 0; i < len; i += 1) {\n localShapeCollection.addShape(newPaths[i]);\n }\n };\n\n TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {\n shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);\n shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);\n\n if (newShape) {\n shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);\n }\n\n shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);\n };\n\n TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {\n shapePath.setXYAt(points[1], points[5], 'o', pos);\n shapePath.setXYAt(points[2], points[6], 'i', pos + 1);\n\n if (newShape) {\n shapePath.setXYAt(points[0], points[4], 'v', pos);\n }\n\n shapePath.setXYAt(points[3], points[7], 'v', pos + 1);\n };\n\n TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {\n var pathsData = shapeData.pathsData;\n var shapePaths = shapeData.shape.paths.shapes;\n var i;\n var len = shapeData.shape.paths._length;\n var j;\n var jLen;\n var addedLength = 0;\n var currentLengthData;\n var segmentCount;\n var lengths;\n var segment;\n var shapes = [];\n var initPos;\n var newShape = true;\n\n if (!shapePath) {\n shapePath = shapePool.newElement();\n segmentCount = 0;\n initPos = 0;\n } else {\n segmentCount = shapePath._length;\n initPos = shapePath._length;\n }\n\n shapes.push(shapePath);\n\n for (i = 0; i < len; i += 1) {\n lengths = pathsData[i].lengths;\n shapePath.c = shapePaths[i].c;\n jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;\n\n for (j = 1; j < jLen; j += 1) {\n currentLengthData = lengths[j - 1];\n\n if (addedLength + currentLengthData.addedLength < shapeSegment.s) {\n addedLength += currentLengthData.addedLength;\n shapePath.c = false;\n } else if (addedLength > shapeSegment.e) {\n shapePath.c = false;\n break;\n } else {\n if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {\n this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);\n newShape = false;\n } else {\n segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[j], shapePaths[i].o[j - 1], shapePaths[i].i[j], (shapeSegment.s - addedLength) / currentLengthData.addedLength, (shapeSegment.e - addedLength) / currentLengthData.addedLength, lengths[j - 1]);\n this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);\n\n newShape = false;\n shapePath.c = false;\n }\n\n addedLength += currentLengthData.addedLength;\n segmentCount += 1;\n }\n }\n\n if (shapePaths[i].c && lengths.length) {\n currentLengthData = lengths[j - 1];\n\n if (addedLength <= shapeSegment.e) {\n var segmentLength = lengths[j - 1].addedLength;\n\n if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {\n this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);\n newShape = false;\n } else {\n segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[0], shapePaths[i].o[j - 1], shapePaths[i].i[0], (shapeSegment.s - addedLength) / segmentLength, (shapeSegment.e - addedLength) / segmentLength, lengths[j - 1]);\n this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);\n\n newShape = false;\n shapePath.c = false;\n }\n } else {\n shapePath.c = false;\n }\n\n addedLength += currentLengthData.addedLength;\n segmentCount += 1;\n }\n\n if (shapePath._length) {\n shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);\n shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);\n }\n\n if (addedLength > shapeSegment.e) {\n break;\n }\n\n if (i < len - 1) {\n shapePath = shapePool.newElement();\n newShape = true;\n shapes.push(shapePath);\n segmentCount = 0;\n }\n }\n\n return shapes;\n };\n\n function PuckerAndBloatModifier() {}\n\n extendPrototype([ShapeModifier], PuckerAndBloatModifier);\n\n PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {\n this.getValue = this.processKeys;\n this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);\n this._isAnimated = !!this.amount.effectsSequence.length;\n };\n\n PuckerAndBloatModifier.prototype.processPath = function (path, amount) {\n var percent = amount / 100;\n var centerPoint = [0, 0];\n var pathLength = path._length;\n var i = 0;\n\n for (i = 0; i < pathLength; i += 1) {\n centerPoint[0] += path.v[i][0];\n centerPoint[1] += path.v[i][1];\n }\n\n centerPoint[0] /= pathLength;\n centerPoint[1] /= pathLength;\n var clonedPath = shapePool.newElement();\n clonedPath.c = path.c;\n var vX;\n var vY;\n var oX;\n var oY;\n var iX;\n var iY;\n\n for (i = 0; i < pathLength; i += 1) {\n vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;\n vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;\n oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;\n oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;\n iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;\n iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;\n clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);\n }\n\n return clonedPath;\n };\n\n PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {\n var shapePaths;\n var i;\n var len = this.shapes.length;\n var j;\n var jLen;\n var amount = this.amount.v;\n\n if (amount !== 0) {\n var shapeData;\n var localShapeCollection;\n\n for (i = 0; i < len; i += 1) {\n shapeData = this.shapes[i];\n localShapeCollection = shapeData.localShapeCollection;\n\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\n localShapeCollection.releaseShapes();\n shapeData.shape._mdf = true;\n shapePaths = shapeData.shape.paths.shapes;\n jLen = shapeData.shape.paths._length;\n\n for (j = 0; j < jLen; j += 1) {\n localShapeCollection.addShape(this.processPath(shapePaths[j], amount));\n }\n }\n\n shapeData.shape.paths = shapeData.localShapeCollection;\n }\n }\n\n if (!this.dynamicProperties.length) {\n this._mdf = false;\n }\n };\n\n var TransformPropertyFactory = function () {\n var defaultVector = [0, 0];\n\n function applyToMatrix(mat) {\n var _mdf = this._mdf;\n this.iterateDynamicProperties();\n this._mdf = this._mdf || _mdf;\n\n if (this.a) {\n mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\n }\n\n if (this.s) {\n mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\n }\n\n if (this.sk) {\n mat.skewFromAxis(-this.sk.v, this.sa.v);\n }\n\n if (this.r) {\n mat.rotate(-this.r.v);\n } else {\n mat.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);\n }\n\n if (this.data.p.s) {\n if (this.data.p.z) {\n mat.translate(this.px.v, this.py.v, -this.pz.v);\n } else {\n mat.translate(this.px.v, this.py.v, 0);\n }\n } else {\n mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);\n }\n }\n\n function processKeys(forceRender) {\n if (this.elem.globalData.frameId === this.frameId) {\n return;\n }\n\n if (this._isDirty) {\n this.precalculateMatrix();\n this._isDirty = false;\n }\n\n this.iterateDynamicProperties();\n\n if (this._mdf || forceRender) {\n var frameRate;\n this.v.cloneFromProps(this.pre.props);\n\n if (this.appliedTransformations < 1) {\n this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\n }\n\n if (this.appliedTransformations < 2) {\n this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\n }\n\n if (this.sk && this.appliedTransformations < 3) {\n this.v.skewFromAxis(-this.sk.v, this.sa.v);\n }\n\n if (this.r && this.appliedTransformations < 4) {\n this.v.rotate(-this.r.v);\n } else if (!this.r && this.appliedTransformations < 4) {\n this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);\n }\n\n if (this.autoOriented) {\n var v1;\n var v2;\n frameRate = this.elem.globalData.frameRate;\n\n if (this.p && this.p.keyframes && this.p.getValueAtTime) {\n if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {\n v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);\n v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);\n } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {\n v1 = this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length - 1].t / frameRate, 0);\n v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);\n } else {\n v1 = this.p.pv;\n v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);\n }\n } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {\n v1 = [];\n v2 = [];\n var px = this.px;\n var py = this.py;\n\n if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {\n v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);\n v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);\n v2[0] = px.getValueAtTime(px.keyframes[0].t / frameRate, 0);\n v2[1] = py.getValueAtTime(py.keyframes[0].t / frameRate, 0);\n } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {\n v1[0] = px.getValueAtTime(px.keyframes[px.keyframes.length - 1].t / frameRate, 0);\n v1[1] = py.getValueAtTime(py.keyframes[py.keyframes.length - 1].t / frameRate, 0);\n v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);\n v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);\n } else {\n v1 = [px.pv, py.pv];\n v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);\n v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);\n }\n } else {\n v2 = defaultVector;\n v1 = v2;\n }\n\n this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));\n }\n\n if (this.data.p && this.data.p.s) {\n if (this.data.p.z) {\n this.v.translate(this.px.v, this.py.v, -this.pz.v);\n } else {\n this.v.translate(this.px.v, this.py.v, 0);\n }\n } else {\n this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);\n }\n }\n\n this.frameId = this.elem.globalData.frameId;\n }\n\n function precalculateMatrix() {\n this.appliedTransformations = 0;\n this.pre.reset();\n\n if (!this.a.effectsSequence.length) {\n this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\n this.appliedTransformations = 1;\n } else {\n return;\n }\n\n if (!this.s.effectsSequence.length) {\n this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\n this.appliedTransformations = 2;\n } else {\n return;\n }\n\n if (this.sk) {\n if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {\n this.pre.skewFromAxis(-this.sk.v, this.sa.v);\n this.appliedTransformations = 3;\n } else {\n return;\n }\n }\n\n if (this.r) {\n if (!this.r.effectsSequence.length) {\n this.pre.rotate(-this.r.v);\n this.appliedTransformations = 4;\n }\n } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {\n this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);\n this.appliedTransformations = 4;\n }\n }\n\n function autoOrient() {//\n // var prevP = this.getValueAtTime();\n }\n\n function addDynamicProperty(prop) {\n this._addDynamicProperty(prop);\n\n this.elem.addDynamicProperty(prop);\n this._isDirty = true;\n }\n\n function TransformProperty(elem, data, container) {\n this.elem = elem;\n this.frameId = -1;\n this.propType = 'transform';\n this.data = data;\n this.v = new Matrix(); // Precalculated matrix with non animated properties\n\n this.pre = new Matrix();\n this.appliedTransformations = 0;\n this.initDynamicPropertyContainer(container || elem);\n\n if (data.p && data.p.s) {\n this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);\n this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);\n\n if (data.p.z) {\n this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);\n }\n } else {\n this.p = PropertyFactory.getProp(elem, data.p || {\n k: [0, 0, 0]\n }, 1, 0, this);\n }\n\n if (data.rx) {\n this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);\n this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);\n this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);\n\n if (data.or.k[0].ti) {\n var i;\n var len = data.or.k.length;\n\n for (i = 0; i < len; i += 1) {\n data.or.k[i].to = null;\n data.or.k[i].ti = null;\n }\n }\n\n this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this); // sh Indicates it needs to be capped between -180 and 180\n\n this.or.sh = true;\n } else {\n this.r = PropertyFactory.getProp(elem, data.r || {\n k: 0\n }, 0, degToRads, this);\n }\n\n if (data.sk) {\n this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);\n this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);\n }\n\n this.a = PropertyFactory.getProp(elem, data.a || {\n k: [0, 0, 0]\n }, 1, 0, this);\n this.s = PropertyFactory.getProp(elem, data.s || {\n k: [100, 100, 100]\n }, 1, 0.01, this); // Opacity is not part of the transform properties, that's why it won't use this.dynamicProperties. That way transforms won't get updated if opacity changes.\n\n if (data.o) {\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);\n } else {\n this.o = {\n _mdf: false,\n v: 1\n };\n }\n\n this._isDirty = true;\n\n if (!this.dynamicProperties.length) {\n this.getValue(true);\n }\n }\n\n TransformProperty.prototype = {\n applyToMatrix: applyToMatrix,\n getValue: processKeys,\n precalculateMatrix: precalculateMatrix,\n autoOrient: autoOrient\n };\n extendPrototype([DynamicPropertyContainer], TransformProperty);\n TransformProperty.prototype.addDynamicProperty = addDynamicProperty;\n TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;\n\n function getTransformProperty(elem, data, container) {\n return new TransformProperty(elem, data, container);\n }\n\n return {\n getTransformProperty: getTransformProperty\n };\n }();\n\n function RepeaterModifier() {}\n\n extendPrototype([ShapeModifier], RepeaterModifier);\n\n RepeaterModifier.prototype.initModifierProperties = function (elem, data) {\n this.getValue = this.processKeys;\n this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);\n this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);\n this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);\n this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);\n this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);\n this.data = data;\n\n if (!this.dynamicProperties.length) {\n this.getValue(true);\n }\n\n this._isAnimated = !!this.dynamicProperties.length;\n this.pMatrix = new Matrix();\n this.rMatrix = new Matrix();\n this.sMatrix = new Matrix();\n this.tMatrix = new Matrix();\n this.matrix = new Matrix();\n };\n\n RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {\n var dir = inv ? -1 : 1;\n var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);\n var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);\n pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);\n rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);\n rMatrix.rotate(-transform.r.v * dir * perc);\n rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);\n sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);\n sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);\n sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);\n };\n\n RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {\n this.elem = elem;\n this.arr = arr;\n this.pos = pos;\n this.elemsData = elemsData;\n this._currentCopies = 0;\n this._elements = [];\n this._groups = [];\n this.frameId = -1;\n this.initDynamicPropertyContainer(elem);\n this.initModifierProperties(elem, arr[pos]);\n\n while (pos > 0) {\n pos -= 1; // this._elements.unshift(arr.splice(pos,1)[0]);\n\n this._elements.unshift(arr[pos]);\n }\n\n if (this.dynamicProperties.length) {\n this.k = true;\n } else {\n this.getValue(true);\n }\n };\n\n RepeaterModifier.prototype.resetElements = function (elements) {\n var i;\n var len = elements.length;\n\n for (i = 0; i < len; i += 1) {\n elements[i]._processed = false;\n\n if (elements[i].ty === 'gr') {\n this.resetElements(elements[i].it);\n }\n }\n };\n\n RepeaterModifier.prototype.cloneElements = function (elements) {\n var newElements = JSON.parse(JSON.stringify(elements));\n this.resetElements(newElements);\n return newElements;\n };\n\n RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {\n var i;\n var len = elements.length;\n\n for (i = 0; i < len; i += 1) {\n elements[i]._render = renderFlag;\n\n if (elements[i].ty === 'gr') {\n this.changeGroupRender(elements[i].it, renderFlag);\n }\n }\n };\n\n RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {\n var items;\n var itemsTransform;\n var i;\n var dir;\n var cont;\n var hasReloaded = false;\n\n if (this._mdf || _isFirstFrame) {\n var copies = Math.ceil(this.c.v);\n\n if (this._groups.length < copies) {\n while (this._groups.length < copies) {\n var group = {\n it: this.cloneElements(this._elements),\n ty: 'gr'\n };\n group.it.push({\n a: {\n a: 0,\n ix: 1,\n k: [0, 0]\n },\n nm: 'Transform',\n o: {\n a: 0,\n ix: 7,\n k: 100\n },\n p: {\n a: 0,\n ix: 2,\n k: [0, 0]\n },\n r: {\n a: 1,\n ix: 6,\n k: [{\n s: 0,\n e: 0,\n t: 0\n }, {\n s: 0,\n e: 0,\n t: 1\n }]\n },\n s: {\n a: 0,\n ix: 3,\n k: [100, 100]\n },\n sa: {\n a: 0,\n ix: 5,\n k: 0\n },\n sk: {\n a: 0,\n ix: 4,\n k: 0\n },\n ty: 'tr'\n });\n this.arr.splice(0, 0, group);\n\n this._groups.splice(0, 0, group);\n\n this._currentCopies += 1;\n }\n\n this.elem.reloadShapes();\n hasReloaded = true;\n }\n\n cont = 0;\n var renderFlag;\n\n for (i = 0; i <= this._groups.length - 1; i += 1) {\n renderFlag = cont < copies;\n this._groups[i]._render = renderFlag;\n this.changeGroupRender(this._groups[i].it, renderFlag);\n\n if (!renderFlag) {\n var elems = this.elemsData[i].it;\n var transformData = elems[elems.length - 1];\n\n if (transformData.transform.op.v !== 0) {\n transformData.transform.op._mdf = true;\n transformData.transform.op.v = 0;\n } else {\n transformData.transform.op._mdf = false;\n }\n }\n\n cont += 1;\n }\n\n this._currentCopies = copies; /// /\n\n var offset = this.o.v;\n var offsetModulo = offset % 1;\n var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);\n var pProps = this.pMatrix.props;\n var rProps = this.rMatrix.props;\n var sProps = this.sMatrix.props;\n this.pMatrix.reset();\n this.rMatrix.reset();\n this.sMatrix.reset();\n this.tMatrix.reset();\n this.matrix.reset();\n var iteration = 0;\n\n if (offset > 0) {\n while (iteration < roundOffset) {\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);\n iteration += 1;\n }\n\n if (offsetModulo) {\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);\n iteration += offsetModulo;\n }\n } else if (offset < 0) {\n while (iteration > roundOffset) {\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);\n iteration -= 1;\n }\n\n if (offsetModulo) {\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);\n iteration -= offsetModulo;\n }\n }\n\n i = this.data.m === 1 ? 0 : this._currentCopies - 1;\n dir = this.data.m === 1 ? 1 : -1;\n cont = this._currentCopies;\n var j;\n var jLen;\n\n while (cont) {\n items = this.elemsData[i].it;\n itemsTransform = items[items.length - 1].transform.mProps.v.props;\n jLen = itemsTransform.length;\n items[items.length - 1].transform.mProps._mdf = true;\n items[items.length - 1].transform.op._mdf = true;\n items[items.length - 1].transform.op.v = this._currentCopies === 1 ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));\n\n if (iteration !== 0) {\n if (i !== 0 && dir === 1 || i !== this._currentCopies - 1 && dir === -1) {\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);\n }\n\n this.matrix.transform(rProps[0], rProps[1], rProps[2], rProps[3], rProps[4], rProps[5], rProps[6], rProps[7], rProps[8], rProps[9], rProps[10], rProps[11], rProps[12], rProps[13], rProps[14], rProps[15]);\n this.matrix.transform(sProps[0], sProps[1], sProps[2], sProps[3], sProps[4], sProps[5], sProps[6], sProps[7], sProps[8], sProps[9], sProps[10], sProps[11], sProps[12], sProps[13], sProps[14], sProps[15]);\n this.matrix.transform(pProps[0], pProps[1], pProps[2], pProps[3], pProps[4], pProps[5], pProps[6], pProps[7], pProps[8], pProps[9], pProps[10], pProps[11], pProps[12], pProps[13], pProps[14], pProps[15]);\n\n for (j = 0; j < jLen; j += 1) {\n itemsTransform[j] = this.matrix.props[j];\n }\n\n this.matrix.reset();\n } else {\n this.matrix.reset();\n\n for (j = 0; j < jLen; j += 1) {\n itemsTransform[j] = this.matrix.props[j];\n }\n }\n\n iteration += 1;\n cont -= 1;\n i += dir;\n }\n } else {\n cont = this._currentCopies;\n i = 0;\n dir = 1;\n\n while (cont) {\n items = this.elemsData[i].it;\n itemsTransform = items[items.length - 1].transform.mProps.v.props;\n items[items.length - 1].transform.mProps._mdf = false;\n items[items.length - 1].transform.op._mdf = false;\n cont -= 1;\n i += dir;\n }\n }\n\n return hasReloaded;\n };\n\n RepeaterModifier.prototype.addShape = function () {};\n\n function RoundCornersModifier() {}\n\n extendPrototype([ShapeModifier], RoundCornersModifier);\n\n RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {\n this.getValue = this.processKeys;\n this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);\n this._isAnimated = !!this.rd.effectsSequence.length;\n };\n\n RoundCornersModifier.prototype.processPath = function (path, round) {\n var clonedPath = shapePool.newElement();\n clonedPath.c = path.c;\n var i;\n var len = path._length;\n var currentV;\n var currentI;\n var currentO;\n var closerV;\n var distance;\n var newPosPerc;\n var index = 0;\n var vX;\n var vY;\n var oX;\n var oY;\n var iX;\n var iY;\n\n for (i = 0; i < len; i += 1) {\n currentV = path.v[i];\n currentO = path.o[i];\n currentI = path.i[i];\n\n if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {\n if ((i === 0 || i === len - 1) && !path.c) {\n clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);\n /* clonedPath.v[index] = currentV;\r\n clonedPath.o[index] = currentO;\r\n clonedPath.i[index] = currentI; */\n\n index += 1;\n } else {\n if (i === 0) {\n closerV = path.v[len - 1];\n } else {\n closerV = path.v[i - 1];\n }\n\n distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));\n newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;\n iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;\n vX = iX;\n iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;\n vY = iY;\n oX = vX - (vX - currentV[0]) * roundCorner;\n oY = vY - (vY - currentV[1]) * roundCorner;\n clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);\n index += 1;\n\n if (i === len - 1) {\n closerV = path.v[0];\n } else {\n closerV = path.v[i + 1];\n }\n\n distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));\n newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;\n oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;\n vX = oX;\n oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;\n vY = oY;\n iX = vX - (vX - currentV[0]) * roundCorner;\n iY = vY - (vY - currentV[1]) * roundCorner;\n clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);\n index += 1;\n }\n } else {\n clonedPath.setTripleAt(path.v[i][0], path.v[i][1], path.o[i][0], path.o[i][1], path.i[i][0], path.i[i][1], index);\n index += 1;\n }\n }\n\n return clonedPath;\n };\n\n RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {\n var shapePaths;\n var i;\n var len = this.shapes.length;\n var j;\n var jLen;\n var rd = this.rd.v;\n\n if (rd !== 0) {\n var shapeData;\n var localShapeCollection;\n\n for (i = 0; i < len; i += 1) {\n shapeData = this.shapes[i];\n localShapeCollection = shapeData.localShapeCollection;\n\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\n localShapeCollection.releaseShapes();\n shapeData.shape._mdf = true;\n shapePaths = shapeData.shape.paths.shapes;\n jLen = shapeData.shape.paths._length;\n\n for (j = 0; j < jLen; j += 1) {\n localShapeCollection.addShape(this.processPath(shapePaths[j], rd));\n }\n }\n\n shapeData.shape.paths = shapeData.localShapeCollection;\n }\n }\n\n if (!this.dynamicProperties.length) {\n this._mdf = false;\n }\n };\n\n function floatEqual(a, b) {\n return Math.abs(a - b) * 100000 <= Math.min(Math.abs(a), Math.abs(b));\n }\n\n function floatZero(f) {\n return Math.abs(f) <= 0.00001;\n }\n\n function lerp(p0, p1, amount) {\n return p0 * (1 - amount) + p1 * amount;\n }\n\n function lerpPoint(p0, p1, amount) {\n return [lerp(p0[0], p1[0], amount), lerp(p0[1], p1[1], amount)];\n }\n\n function quadRoots(a, b, c) {\n // no root\n if (a === 0) return [];\n var s = b * b - 4 * a * c; // Complex roots\n\n if (s < 0) return [];\n var singleRoot = -b / (2 * a); // 1 root\n\n if (s === 0) return [singleRoot];\n var delta = Math.sqrt(s) / (2 * a); // 2 roots\n\n return [singleRoot - delta, singleRoot + delta];\n }\n\n function polynomialCoefficients(p0, p1, p2, p3) {\n return [-p0 + 3 * p1 - 3 * p2 + p3, 3 * p0 - 6 * p1 + 3 * p2, -3 * p0 + 3 * p1, p0];\n }\n\n function singlePoint(p) {\n return new PolynomialBezier(p, p, p, p, false);\n }\n\n function PolynomialBezier(p0, p1, p2, p3, linearize) {\n if (linearize && pointEqual(p0, p1)) {\n p1 = lerpPoint(p0, p3, 1 / 3);\n }\n\n if (linearize && pointEqual(p2, p3)) {\n p2 = lerpPoint(p0, p3, 2 / 3);\n }\n\n var coeffx = polynomialCoefficients(p0[0], p1[0], p2[0], p3[0]);\n var coeffy = polynomialCoefficients(p0[1], p1[1], p2[1], p3[1]);\n this.a = [coeffx[0], coeffy[0]];\n this.b = [coeffx[1], coeffy[1]];\n this.c = [coeffx[2], coeffy[2]];\n this.d = [coeffx[3], coeffy[3]];\n this.points = [p0, p1, p2, p3];\n }\n\n PolynomialBezier.prototype.point = function (t) {\n return [((this.a[0] * t + this.b[0]) * t + this.c[0]) * t + this.d[0], ((this.a[1] * t + this.b[1]) * t + this.c[1]) * t + this.d[1]];\n };\n\n PolynomialBezier.prototype.derivative = function (t) {\n return [(3 * t * this.a[0] + 2 * this.b[0]) * t + this.c[0], (3 * t * this.a[1] + 2 * this.b[1]) * t + this.c[1]];\n };\n\n PolynomialBezier.prototype.tangentAngle = function (t) {\n var p = this.derivative(t);\n return Math.atan2(p[1], p[0]);\n };\n\n PolynomialBezier.prototype.normalAngle = function (t) {\n var p = this.derivative(t);\n return Math.atan2(p[0], p[1]);\n };\n\n PolynomialBezier.prototype.inflectionPoints = function () {\n var denom = this.a[1] * this.b[0] - this.a[0] * this.b[1];\n if (floatZero(denom)) return [];\n var tcusp = -0.5 * (this.a[1] * this.c[0] - this.a[0] * this.c[1]) / denom;\n var square = tcusp * tcusp - 1 / 3 * (this.b[1] * this.c[0] - this.b[0] * this.c[1]) / denom;\n if (square < 0) return [];\n var root = Math.sqrt(square);\n\n if (floatZero(root)) {\n if (root > 0 && root < 1) return [tcusp];\n return [];\n }\n\n return [tcusp - root, tcusp + root].filter(function (r) {\n return r > 0 && r < 1;\n });\n };\n\n PolynomialBezier.prototype.split = function (t) {\n if (t <= 0) return [singlePoint(this.points[0]), this];\n if (t >= 1) return [this, singlePoint(this.points[this.points.length - 1])];\n var p10 = lerpPoint(this.points[0], this.points[1], t);\n var p11 = lerpPoint(this.points[1], this.points[2], t);\n var p12 = lerpPoint(this.points[2], this.points[3], t);\n var p20 = lerpPoint(p10, p11, t);\n var p21 = lerpPoint(p11, p12, t);\n var p3 = lerpPoint(p20, p21, t);\n return [new PolynomialBezier(this.points[0], p10, p20, p3, true), new PolynomialBezier(p3, p21, p12, this.points[3], true)];\n };\n\n function extrema(bez, comp) {\n var min = bez.points[0][comp];\n var max = bez.points[bez.points.length - 1][comp];\n\n if (min > max) {\n var e = max;\n max = min;\n min = e;\n } // Derivative roots to find min/max\n\n\n var f = quadRoots(3 * bez.a[comp], 2 * bez.b[comp], bez.c[comp]);\n\n for (var i = 0; i < f.length; i += 1) {\n if (f[i] > 0 && f[i] < 1) {\n var val = bez.point(f[i])[comp];\n if (val < min) min = val;else if (val > max) max = val;\n }\n }\n\n return {\n min: min,\n max: max\n };\n }\n\n PolynomialBezier.prototype.bounds = function () {\n return {\n x: extrema(this, 0),\n y: extrema(this, 1)\n };\n };\n\n PolynomialBezier.prototype.boundingBox = function () {\n var bounds = this.bounds();\n return {\n left: bounds.x.min,\n right: bounds.x.max,\n top: bounds.y.min,\n bottom: bounds.y.max,\n width: bounds.x.max - bounds.x.min,\n height: bounds.y.max - bounds.y.min,\n cx: (bounds.x.max + bounds.x.min) / 2,\n cy: (bounds.y.max + bounds.y.min) / 2\n };\n };\n\n function intersectData(bez, t1, t2) {\n var box = bez.boundingBox();\n return {\n cx: box.cx,\n cy: box.cy,\n width: box.width,\n height: box.height,\n bez: bez,\n t: (t1 + t2) / 2,\n t1: t1,\n t2: t2\n };\n }\n\n function splitData(data) {\n var split = data.bez.split(0.5);\n return [intersectData(split[0], data.t1, data.t), intersectData(split[1], data.t, data.t2)];\n }\n\n function boxIntersect(b1, b2) {\n return Math.abs(b1.cx - b2.cx) * 2 < b1.width + b2.width && Math.abs(b1.cy - b2.cy) * 2 < b1.height + b2.height;\n }\n\n function intersectsImpl(d1, d2, depth, tolerance, intersections, maxRecursion) {\n if (!boxIntersect(d1, d2)) return;\n\n if (depth >= maxRecursion || d1.width <= tolerance && d1.height <= tolerance && d2.width <= tolerance && d2.height <= tolerance) {\n intersections.push([d1.t, d2.t]);\n return;\n }\n\n var d1s = splitData(d1);\n var d2s = splitData(d2);\n intersectsImpl(d1s[0], d2s[0], depth + 1, tolerance, intersections, maxRecursion);\n intersectsImpl(d1s[0], d2s[1], depth + 1, tolerance, intersections, maxRecursion);\n intersectsImpl(d1s[1], d2s[0], depth + 1, tolerance, intersections, maxRecursion);\n intersectsImpl(d1s[1], d2s[1], depth + 1, tolerance, intersections, maxRecursion);\n }\n\n PolynomialBezier.prototype.intersections = function (other, tolerance, maxRecursion) {\n if (tolerance === undefined) tolerance = 2;\n if (maxRecursion === undefined) maxRecursion = 7;\n var intersections = [];\n intersectsImpl(intersectData(this, 0, 1), intersectData(other, 0, 1), 0, tolerance, intersections, maxRecursion);\n return intersections;\n };\n\n PolynomialBezier.shapeSegment = function (shapePath, index) {\n var nextIndex = (index + 1) % shapePath.length();\n return new PolynomialBezier(shapePath.v[index], shapePath.o[index], shapePath.i[nextIndex], shapePath.v[nextIndex], true);\n };\n\n PolynomialBezier.shapeSegmentInverted = function (shapePath, index) {\n var nextIndex = (index + 1) % shapePath.length();\n return new PolynomialBezier(shapePath.v[nextIndex], shapePath.i[nextIndex], shapePath.o[index], shapePath.v[index], true);\n };\n\n function crossProduct(a, b) {\n return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n }\n\n function lineIntersection(start1, end1, start2, end2) {\n var v1 = [start1[0], start1[1], 1];\n var v2 = [end1[0], end1[1], 1];\n var v3 = [start2[0], start2[1], 1];\n var v4 = [end2[0], end2[1], 1];\n var r = crossProduct(crossProduct(v1, v2), crossProduct(v3, v4));\n if (floatZero(r[2])) return null;\n return [r[0] / r[2], r[1] / r[2]];\n }\n\n function polarOffset(p, angle, length) {\n return [p[0] + Math.cos(angle) * length, p[1] - Math.sin(angle) * length];\n }\n\n function pointDistance(p1, p2) {\n return Math.hypot(p1[0] - p2[0], p1[1] - p2[1]);\n }\n\n function pointEqual(p1, p2) {\n return floatEqual(p1[0], p2[0]) && floatEqual(p1[1], p2[1]);\n }\n\n function ZigZagModifier() {}\n\n extendPrototype([ShapeModifier], ZigZagModifier);\n\n ZigZagModifier.prototype.initModifierProperties = function (elem, data) {\n this.getValue = this.processKeys;\n this.amplitude = PropertyFactory.getProp(elem, data.s, 0, null, this);\n this.frequency = PropertyFactory.getProp(elem, data.r, 0, null, this);\n this.pointsType = PropertyFactory.getProp(elem, data.pt, 0, null, this);\n this._isAnimated = this.amplitude.effectsSequence.length !== 0 || this.frequency.effectsSequence.length !== 0 || this.pointsType.effectsSequence.length !== 0;\n };\n\n function setPoint(outputBezier, point, angle, direction, amplitude, outAmplitude, inAmplitude) {\n var angO = angle - Math.PI / 2;\n var angI = angle + Math.PI / 2;\n var px = point[0] + Math.cos(angle) * direction * amplitude;\n var py = point[1] - Math.sin(angle) * direction * amplitude;\n outputBezier.setTripleAt(px, py, px + Math.cos(angO) * outAmplitude, py - Math.sin(angO) * outAmplitude, px + Math.cos(angI) * inAmplitude, py - Math.sin(angI) * inAmplitude, outputBezier.length());\n }\n\n function getPerpendicularVector(pt1, pt2) {\n var vector = [pt2[0] - pt1[0], pt2[1] - pt1[1]];\n var rot = -Math.PI * 0.5;\n var rotatedVector = [Math.cos(rot) * vector[0] - Math.sin(rot) * vector[1], Math.sin(rot) * vector[0] + Math.cos(rot) * vector[1]];\n return rotatedVector;\n }\n\n function getProjectingAngle(path, cur) {\n var prevIndex = cur === 0 ? path.length() - 1 : cur - 1;\n var nextIndex = (cur + 1) % path.length();\n var prevPoint = path.v[prevIndex];\n var nextPoint = path.v[nextIndex];\n var pVector = getPerpendicularVector(prevPoint, nextPoint);\n return Math.atan2(0, 1) - Math.atan2(pVector[1], pVector[0]);\n }\n\n function zigZagCorner(outputBezier, path, cur, amplitude, frequency, pointType, direction) {\n var angle = getProjectingAngle(path, cur);\n var point = path.v[cur % path._length];\n var prevPoint = path.v[cur === 0 ? path._length - 1 : cur - 1];\n var nextPoint = path.v[(cur + 1) % path._length];\n var prevDist = pointType === 2 ? Math.sqrt(Math.pow(point[0] - prevPoint[0], 2) + Math.pow(point[1] - prevPoint[1], 2)) : 0;\n var nextDist = pointType === 2 ? Math.sqrt(Math.pow(point[0] - nextPoint[0], 2) + Math.pow(point[1] - nextPoint[1], 2)) : 0;\n setPoint(outputBezier, path.v[cur % path._length], angle, direction, amplitude, nextDist / ((frequency + 1) * 2), prevDist / ((frequency + 1) * 2), pointType);\n }\n\n function zigZagSegment(outputBezier, segment, amplitude, frequency, pointType, direction) {\n for (var i = 0; i < frequency; i += 1) {\n var t = (i + 1) / (frequency + 1);\n var dist = pointType === 2 ? Math.sqrt(Math.pow(segment.points[3][0] - segment.points[0][0], 2) + Math.pow(segment.points[3][1] - segment.points[0][1], 2)) : 0;\n var angle = segment.normalAngle(t);\n var point = segment.point(t);\n setPoint(outputBezier, point, angle, direction, amplitude, dist / ((frequency + 1) * 2), dist / ((frequency + 1) * 2), pointType);\n direction = -direction;\n }\n\n return direction;\n }\n\n ZigZagModifier.prototype.processPath = function (path, amplitude, frequency, pointType) {\n var count = path._length;\n var clonedPath = shapePool.newElement();\n clonedPath.c = path.c;\n\n if (!path.c) {\n count -= 1;\n }\n\n if (count === 0) return clonedPath;\n var direction = -1;\n var segment = PolynomialBezier.shapeSegment(path, 0);\n zigZagCorner(clonedPath, path, 0, amplitude, frequency, pointType, direction);\n\n for (var i = 0; i < count; i += 1) {\n direction = zigZagSegment(clonedPath, segment, amplitude, frequency, pointType, -direction);\n\n if (i === count - 1 && !path.c) {\n segment = null;\n } else {\n segment = PolynomialBezier.shapeSegment(path, (i + 1) % count);\n }\n\n zigZagCorner(clonedPath, path, i + 1, amplitude, frequency, pointType, direction);\n }\n\n return clonedPath;\n };\n\n ZigZagModifier.prototype.processShapes = function (_isFirstFrame) {\n var shapePaths;\n var i;\n var len = this.shapes.length;\n var j;\n var jLen;\n var amplitude = this.amplitude.v;\n var frequency = Math.max(0, Math.round(this.frequency.v));\n var pointType = this.pointsType.v;\n\n if (amplitude !== 0) {\n var shapeData;\n var localShapeCollection;\n\n for (i = 0; i < len; i += 1) {\n shapeData = this.shapes[i];\n localShapeCollection = shapeData.localShapeCollection;\n\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\n localShapeCollection.releaseShapes();\n shapeData.shape._mdf = true;\n shapePaths = shapeData.shape.paths.shapes;\n jLen = shapeData.shape.paths._length;\n\n for (j = 0; j < jLen; j += 1) {\n localShapeCollection.addShape(this.processPath(shapePaths[j], amplitude, frequency, pointType));\n }\n }\n\n shapeData.shape.paths = shapeData.localShapeCollection;\n }\n }\n\n if (!this.dynamicProperties.length) {\n this._mdf = false;\n }\n };\n\n function linearOffset(p1, p2, amount) {\n var angle = Math.atan2(p2[0] - p1[0], p2[1] - p1[1]);\n return [polarOffset(p1, angle, amount), polarOffset(p2, angle, amount)];\n }\n\n function offsetSegment(segment, amount) {\n var p0;\n var p1a;\n var p1b;\n var p2b;\n var p2a;\n var p3;\n var e;\n e = linearOffset(segment.points[0], segment.points[1], amount);\n p0 = e[0];\n p1a = e[1];\n e = linearOffset(segment.points[1], segment.points[2], amount);\n p1b = e[0];\n p2b = e[1];\n e = linearOffset(segment.points[2], segment.points[3], amount);\n p2a = e[0];\n p3 = e[1];\n var p1 = lineIntersection(p0, p1a, p1b, p2b);\n if (p1 === null) p1 = p1a;\n var p2 = lineIntersection(p2a, p3, p1b, p2b);\n if (p2 === null) p2 = p2a;\n return new PolynomialBezier(p0, p1, p2, p3);\n }\n\n function joinLines(outputBezier, seg1, seg2, lineJoin, miterLimit) {\n var p0 = seg1.points[3];\n var p1 = seg2.points[0]; // Bevel\n\n if (lineJoin === 3) return p0; // Connected, they don't need a joint\n\n if (pointEqual(p0, p1)) return p0; // Round\n\n if (lineJoin === 2) {\n var angleOut = -seg1.tangentAngle(1);\n var angleIn = -seg2.tangentAngle(0) + Math.PI;\n var center = lineIntersection(p0, polarOffset(p0, angleOut + Math.PI / 2, 100), p1, polarOffset(p1, angleOut + Math.PI / 2, 100));\n var radius = center ? pointDistance(center, p0) : pointDistance(p0, p1) / 2;\n var tan = polarOffset(p0, angleOut, 2 * radius * roundCorner);\n outputBezier.setXYAt(tan[0], tan[1], 'o', outputBezier.length() - 1);\n tan = polarOffset(p1, angleIn, 2 * radius * roundCorner);\n outputBezier.setTripleAt(p1[0], p1[1], p1[0], p1[1], tan[0], tan[1], outputBezier.length());\n return p1;\n } // Miter\n\n\n var t0 = pointEqual(p0, seg1.points[2]) ? seg1.points[0] : seg1.points[2];\n var t1 = pointEqual(p1, seg2.points[1]) ? seg2.points[3] : seg2.points[1];\n var intersection = lineIntersection(t0, p0, p1, t1);\n\n if (intersection && pointDistance(intersection, p0) < miterLimit) {\n outputBezier.setTripleAt(intersection[0], intersection[1], intersection[0], intersection[1], intersection[0], intersection[1], outputBezier.length());\n return intersection;\n }\n\n return p0;\n }\n\n function getIntersection(a, b) {\n var intersect = a.intersections(b);\n if (intersect.length && floatEqual(intersect[0][0], 1)) intersect.shift();\n if (intersect.length) return intersect[0];\n return null;\n }\n\n function pruneSegmentIntersection(a, b) {\n var outa = a.slice();\n var outb = b.slice();\n var intersect = getIntersection(a[a.length - 1], b[0]);\n\n if (intersect) {\n outa[a.length - 1] = a[a.length - 1].split(intersect[0])[0];\n outb[0] = b[0].split(intersect[1])[1];\n }\n\n if (a.length > 1 && b.length > 1) {\n intersect = getIntersection(a[0], b[b.length - 1]);\n\n if (intersect) {\n return [[a[0].split(intersect[0])[0]], [b[b.length - 1].split(intersect[1])[1]]];\n }\n }\n\n return [outa, outb];\n }\n\n function pruneIntersections(segments) {\n var e;\n\n for (var i = 1; i < segments.length; i += 1) {\n e = pruneSegmentIntersection(segments[i - 1], segments[i]);\n segments[i - 1] = e[0];\n segments[i] = e[1];\n }\n\n if (segments.length > 1) {\n e = pruneSegmentIntersection(segments[segments.length - 1], segments[0]);\n segments[segments.length - 1] = e[0];\n segments[0] = e[1];\n }\n\n return segments;\n }\n\n function offsetSegmentSplit(segment, amount) {\n /*\r\n We split each bezier segment into smaller pieces based\r\n on inflection points, this ensures the control point\r\n polygon is convex.\r\n (A cubic bezier can have none, one, or two inflection points)\r\n */\n var flex = segment.inflectionPoints();\n var left;\n var right;\n var split;\n var mid;\n\n if (flex.length === 0) {\n return [offsetSegment(segment, amount)];\n }\n\n if (flex.length === 1 || floatEqual(flex[1], 1)) {\n split = segment.split(flex[0]);\n left = split[0];\n right = split[1];\n return [offsetSegment(left, amount), offsetSegment(right, amount)];\n }\n\n split = segment.split(flex[0]);\n left = split[0];\n var t = (flex[1] - flex[0]) / (1 - flex[0]);\n split = split[1].split(t);\n mid = split[0];\n right = split[1];\n return [offsetSegment(left, amount), offsetSegment(mid, amount), offsetSegment(right, amount)];\n }\n\n function OffsetPathModifier() {}\n\n extendPrototype([ShapeModifier], OffsetPathModifier);\n\n OffsetPathModifier.prototype.initModifierProperties = function (elem, data) {\n this.getValue = this.processKeys;\n this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);\n this.miterLimit = PropertyFactory.getProp(elem, data.ml, 0, null, this);\n this.lineJoin = data.lj;\n this._isAnimated = this.amount.effectsSequence.length !== 0;\n };\n\n OffsetPathModifier.prototype.processPath = function (inputBezier, amount, lineJoin, miterLimit) {\n var outputBezier = shapePool.newElement();\n outputBezier.c = inputBezier.c;\n var count = inputBezier.length();\n\n if (!inputBezier.c) {\n count -= 1;\n }\n\n var i;\n var j;\n var segment;\n var multiSegments = [];\n\n for (i = 0; i < count; i += 1) {\n segment = PolynomialBezier.shapeSegment(inputBezier, i);\n multiSegments.push(offsetSegmentSplit(segment, amount));\n }\n\n if (!inputBezier.c) {\n for (i = count - 1; i >= 0; i -= 1) {\n segment = PolynomialBezier.shapeSegmentInverted(inputBezier, i);\n multiSegments.push(offsetSegmentSplit(segment, amount));\n }\n }\n\n multiSegments = pruneIntersections(multiSegments); // Add bezier segments to the output and apply line joints\n\n var lastPoint = null;\n var lastSeg = null;\n\n for (i = 0; i < multiSegments.length; i += 1) {\n var multiSegment = multiSegments[i];\n if (lastSeg) lastPoint = joinLines(outputBezier, lastSeg, multiSegment[0], lineJoin, miterLimit);\n lastSeg = multiSegment[multiSegment.length - 1];\n\n for (j = 0; j < multiSegment.length; j += 1) {\n segment = multiSegment[j];\n\n if (lastPoint && pointEqual(segment.points[0], lastPoint)) {\n outputBezier.setXYAt(segment.points[1][0], segment.points[1][1], 'o', outputBezier.length() - 1);\n } else {\n outputBezier.setTripleAt(segment.points[0][0], segment.points[0][1], segment.points[1][0], segment.points[1][1], segment.points[0][0], segment.points[0][1], outputBezier.length());\n }\n\n outputBezier.setTripleAt(segment.points[3][0], segment.points[3][1], segment.points[3][0], segment.points[3][1], segment.points[2][0], segment.points[2][1], outputBezier.length());\n lastPoint = segment.points[3];\n }\n }\n\n if (multiSegments.length) joinLines(outputBezier, lastSeg, multiSegments[0][0], lineJoin, miterLimit);\n return outputBezier;\n };\n\n OffsetPathModifier.prototype.processShapes = function (_isFirstFrame) {\n var shapePaths;\n var i;\n var len = this.shapes.length;\n var j;\n var jLen;\n var amount = this.amount.v;\n var miterLimit = this.miterLimit.v;\n var lineJoin = this.lineJoin;\n\n if (amount !== 0) {\n var shapeData;\n var localShapeCollection;\n\n for (i = 0; i < len; i += 1) {\n shapeData = this.shapes[i];\n localShapeCollection = shapeData.localShapeCollection;\n\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\n localShapeCollection.releaseShapes();\n shapeData.shape._mdf = true;\n shapePaths = shapeData.shape.paths.shapes;\n jLen = shapeData.shape.paths._length;\n\n for (j = 0; j < jLen; j += 1) {\n localShapeCollection.addShape(this.processPath(shapePaths[j], amount, lineJoin, miterLimit));\n }\n }\n\n shapeData.shape.paths = shapeData.localShapeCollection;\n }\n }\n\n if (!this.dynamicProperties.length) {\n this._mdf = false;\n }\n };\n\n function getFontProperties(fontData) {\n var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];\n var fWeight = 'normal';\n var fStyle = 'normal';\n var len = styles.length;\n var styleName;\n\n for (var i = 0; i < len; i += 1) {\n styleName = styles[i].toLowerCase();\n\n switch (styleName) {\n case 'italic':\n fStyle = 'italic';\n break;\n\n case 'bold':\n fWeight = '700';\n break;\n\n case 'black':\n fWeight = '900';\n break;\n\n case 'medium':\n fWeight = '500';\n break;\n\n case 'regular':\n case 'normal':\n fWeight = '400';\n break;\n\n case 'light':\n case 'thin':\n fWeight = '200';\n break;\n\n default:\n break;\n }\n }\n\n return {\n style: fStyle,\n weight: fontData.fWeight || fWeight\n };\n }\n\n var FontManager = function () {\n var maxWaitingTime = 5000;\n var emptyChar = {\n w: 0,\n size: 0,\n shapes: [],\n data: {\n shapes: []\n }\n };\n var combinedCharacters = []; // Hindi characters\n\n combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);\n var BLACK_FLAG_CODE_POINT = 127988;\n var CANCEL_TAG_CODE_POINT = 917631;\n var A_TAG_CODE_POINT = 917601;\n var Z_TAG_CODE_POINT = 917626;\n var VARIATION_SELECTOR_16_CODE_POINT = 65039;\n var ZERO_WIDTH_JOINER_CODE_POINT = 8205;\n var REGIONAL_CHARACTER_A_CODE_POINT = 127462;\n var REGIONAL_CHARACTER_Z_CODE_POINT = 127487;\n var surrogateModifiers = ['d83cdffb', 'd83cdffc', 'd83cdffd', 'd83cdffe', 'd83cdfff'];\n\n function trimFontOptions(font) {\n var familyArray = font.split(',');\n var i;\n var len = familyArray.length;\n var enabledFamilies = [];\n\n for (i = 0; i < len; i += 1) {\n if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {\n enabledFamilies.push(familyArray[i]);\n }\n }\n\n return enabledFamilies.join(',');\n }\n\n function setUpNode(font, family) {\n var parentNode = createTag('span'); // Node is invisible to screen readers.\n\n parentNode.setAttribute('aria-hidden', true);\n parentNode.style.fontFamily = family;\n var node = createTag('span'); // Characters that vary significantly among different fonts\n\n node.innerText = 'giItT1WQy@!-/#'; // Visible - so we can measure it - but not on the screen\n\n parentNode.style.position = 'absolute';\n parentNode.style.left = '-10000px';\n parentNode.style.top = '-10000px'; // Large font size makes even subtle changes obvious\n\n parentNode.style.fontSize = '300px'; // Reset any font properties\n\n parentNode.style.fontVariant = 'normal';\n parentNode.style.fontStyle = 'normal';\n parentNode.style.fontWeight = 'normal';\n parentNode.style.letterSpacing = '0';\n parentNode.appendChild(node);\n document.body.appendChild(parentNode); // Remember width with no applied web font\n\n var width = node.offsetWidth;\n node.style.fontFamily = trimFontOptions(font) + ', ' + family;\n return {\n node: node,\n w: width,\n parent: parentNode\n };\n }\n\n function checkLoadedFonts() {\n var i;\n var len = this.fonts.length;\n var node;\n var w;\n var loadedCount = len;\n\n for (i = 0; i < len; i += 1) {\n if (this.fonts[i].loaded) {\n loadedCount -= 1;\n } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {\n this.fonts[i].loaded = true;\n } else {\n node = this.fonts[i].monoCase.node;\n w = this.fonts[i].monoCase.w;\n\n if (node.offsetWidth !== w) {\n loadedCount -= 1;\n this.fonts[i].loaded = true;\n } else {\n node = this.fonts[i].sansCase.node;\n w = this.fonts[i].sansCase.w;\n\n if (node.offsetWidth !== w) {\n loadedCount -= 1;\n this.fonts[i].loaded = true;\n }\n }\n\n if (this.fonts[i].loaded) {\n this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);\n this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);\n }\n }\n }\n\n if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {\n setTimeout(this.checkLoadedFontsBinded, 20);\n } else {\n setTimeout(this.setIsLoadedBinded, 10);\n }\n }\n\n function createHelper(fontData, def) {\n var engine = document.body && def ? 'svg' : 'canvas';\n var helper;\n var fontProps = getFontProperties(fontData);\n\n if (engine === 'svg') {\n var tHelper = createNS('text');\n tHelper.style.fontSize = '100px'; // tHelper.style.fontFamily = fontData.fFamily;\n\n tHelper.setAttribute('font-family', fontData.fFamily);\n tHelper.setAttribute('font-style', fontProps.style);\n tHelper.setAttribute('font-weight', fontProps.weight);\n tHelper.textContent = '1';\n\n if (fontData.fClass) {\n tHelper.style.fontFamily = 'inherit';\n tHelper.setAttribute('class', fontData.fClass);\n } else {\n tHelper.style.fontFamily = fontData.fFamily;\n }\n\n def.appendChild(tHelper);\n helper = tHelper;\n } else {\n var tCanvasHelper = new OffscreenCanvas(500, 500).getContext('2d');\n tCanvasHelper.font = fontProps.style + ' ' + fontProps.weight + ' 100px ' + fontData.fFamily;\n helper = tCanvasHelper;\n }\n\n function measure(text) {\n if (engine === 'svg') {\n helper.textContent = text;\n return helper.getComputedTextLength();\n }\n\n return helper.measureText(text).width;\n }\n\n return {\n measureText: measure\n };\n }\n\n function addFonts(fontData, defs) {\n if (!fontData) {\n this.isLoaded = true;\n return;\n }\n\n if (this.chars) {\n this.isLoaded = true;\n this.fonts = fontData.list;\n return;\n }\n\n if (!document.body) {\n this.isLoaded = true;\n fontData.list.forEach(function (data) {\n data.helper = createHelper(data);\n data.cache = {};\n });\n this.fonts = fontData.list;\n return;\n }\n\n var fontArr = fontData.list;\n var i;\n var len = fontArr.length;\n var _pendingFonts = len;\n\n for (i = 0; i < len; i += 1) {\n var shouldLoadFont = true;\n var loadedSelector;\n var j;\n fontArr[i].loaded = false;\n fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');\n fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');\n\n if (!fontArr[i].fPath) {\n fontArr[i].loaded = true;\n _pendingFonts -= 1;\n } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {\n loadedSelector = document.querySelectorAll('style[f-forigin=\"p\"][f-family=\"' + fontArr[i].fFamily + '\"], style[f-origin=\"3\"][f-family=\"' + fontArr[i].fFamily + '\"]');\n\n if (loadedSelector.length > 0) {\n shouldLoadFont = false;\n }\n\n if (shouldLoadFont) {\n var s = createTag('style');\n s.setAttribute('f-forigin', fontArr[i].fOrigin);\n s.setAttribute('f-origin', fontArr[i].origin);\n s.setAttribute('f-family', fontArr[i].fFamily);\n s.type = 'text/css';\n s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + \"; font-style: normal; src: url('\" + fontArr[i].fPath + \"');}\";\n defs.appendChild(s);\n }\n } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {\n loadedSelector = document.querySelectorAll('link[f-forigin=\"g\"], link[f-origin=\"1\"]');\n\n for (j = 0; j < loadedSelector.length; j += 1) {\n if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {\n // Font is already loaded\n shouldLoadFont = false;\n }\n }\n\n if (shouldLoadFont) {\n var l = createTag('link');\n l.setAttribute('f-forigin', fontArr[i].fOrigin);\n l.setAttribute('f-origin', fontArr[i].origin);\n l.type = 'text/css';\n l.rel = 'stylesheet';\n l.href = fontArr[i].fPath;\n document.body.appendChild(l);\n }\n } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {\n loadedSelector = document.querySelectorAll('script[f-forigin=\"t\"], script[f-origin=\"2\"]');\n\n for (j = 0; j < loadedSelector.length; j += 1) {\n if (fontArr[i].fPath === loadedSelector[j].src) {\n // Font is already loaded\n shouldLoadFont = false;\n }\n }\n\n if (shouldLoadFont) {\n var sc = createTag('link');\n sc.setAttribute('f-forigin', fontArr[i].fOrigin);\n sc.setAttribute('f-origin', fontArr[i].origin);\n sc.setAttribute('rel', 'stylesheet');\n sc.setAttribute('href', fontArr[i].fPath);\n defs.appendChild(sc);\n }\n }\n\n fontArr[i].helper = createHelper(fontArr[i], defs);\n fontArr[i].cache = {};\n this.fonts.push(fontArr[i]);\n }\n\n if (_pendingFonts === 0) {\n this.isLoaded = true;\n } else {\n // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.\n // Adding this timeout seems to fix it\n setTimeout(this.checkLoadedFonts.bind(this), 100);\n }\n }\n\n function addChars(chars) {\n if (!chars) {\n return;\n }\n\n if (!this.chars) {\n this.chars = [];\n }\n\n var i;\n var len = chars.length;\n var j;\n var jLen = this.chars.length;\n var found;\n\n for (i = 0; i < len; i += 1) {\n j = 0;\n found = false;\n\n while (j < jLen) {\n if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {\n found = true;\n }\n\n j += 1;\n }\n\n if (!found) {\n this.chars.push(chars[i]);\n jLen += 1;\n }\n }\n }\n\n function getCharData(_char, style, font) {\n var i = 0;\n var len = this.chars.length;\n\n while (i < len) {\n if (this.chars[i].ch === _char && this.chars[i].style === style && this.chars[i].fFamily === font) {\n return this.chars[i];\n }\n\n i += 1;\n }\n\n if ((typeof _char === 'string' && _char.charCodeAt(0) !== 13 || !_char) && console && console.warn // eslint-disable-line no-console\n && !this._warned) {\n this._warned = true;\n console.warn('Missing character from exported characters list: ', _char, style, font); // eslint-disable-line no-console\n }\n\n return emptyChar;\n }\n\n function measureText(_char2, fontName, size) {\n var fontData = this.getFontByName(fontName); // Using the char instead of char.charCodeAt(0)\n // to avoid collisions between equal chars\n\n var index = _char2;\n\n if (!fontData.cache[index]) {\n var tHelper = fontData.helper;\n\n if (_char2 === ' ') {\n var doubleSize = tHelper.measureText('|' + _char2 + '|');\n var singleSize = tHelper.measureText('||');\n fontData.cache[index] = (doubleSize - singleSize) / 100;\n } else {\n fontData.cache[index] = tHelper.measureText(_char2) / 100;\n }\n }\n\n return fontData.cache[index] * size;\n }\n\n function getFontByName(name) {\n var i = 0;\n var len = this.fonts.length;\n\n while (i < len) {\n if (this.fonts[i].fName === name) {\n return this.fonts[i];\n }\n\n i += 1;\n }\n\n return this.fonts[0];\n }\n\n function getCodePoint(string) {\n var codePoint = 0;\n var first = string.charCodeAt(0);\n\n if (first >= 0xD800 && first <= 0xDBFF) {\n var second = string.charCodeAt(1);\n\n if (second >= 0xDC00 && second <= 0xDFFF) {\n codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n }\n }\n\n return codePoint;\n } // Skin tone modifiers\n\n\n function isModifier(firstCharCode, secondCharCode) {\n var sum = firstCharCode.toString(16) + secondCharCode.toString(16);\n return surrogateModifiers.indexOf(sum) !== -1;\n }\n\n function isZeroWidthJoiner(charCode) {\n return charCode === ZERO_WIDTH_JOINER_CODE_POINT;\n } // This codepoint may change the appearance of the preceding character.\n // If that is a symbol, dingbat or emoji, U+FE0F forces it to be rendered\n // as a colorful image as compared to a monochrome text variant.\n\n\n function isVariationSelector(charCode) {\n return charCode === VARIATION_SELECTOR_16_CODE_POINT;\n } // The regional indicator symbols are a set of 26 alphabetic Unicode\n /// characters (A–Z) intended to be used to encode ISO 3166-1 alpha-2\n // two-letter country codes in a way that allows optional special treatment.\n\n\n function isRegionalCode(string) {\n var codePoint = getCodePoint(string);\n\n if (codePoint >= REGIONAL_CHARACTER_A_CODE_POINT && codePoint <= REGIONAL_CHARACTER_Z_CODE_POINT) {\n return true;\n }\n\n return false;\n } // Some Emoji implementations represent combinations of\n // two “regional indicator” letters as a single flag symbol.\n\n\n function isFlagEmoji(string) {\n return isRegionalCode(string.substr(0, 2)) && isRegionalCode(string.substr(2, 2));\n }\n\n function isCombinedCharacter(_char3) {\n return combinedCharacters.indexOf(_char3) !== -1;\n } // Regional flags start with a BLACK_FLAG_CODE_POINT\n // folowed by 5 chars in the TAG range\n // and end with a CANCEL_TAG_CODE_POINT\n\n\n function isRegionalFlag(text, index) {\n var codePoint = getCodePoint(text.substr(index, 2));\n\n if (codePoint !== BLACK_FLAG_CODE_POINT) {\n return false;\n }\n\n var count = 0;\n index += 2;\n\n while (count < 5) {\n codePoint = getCodePoint(text.substr(index, 2));\n\n if (codePoint < A_TAG_CODE_POINT || codePoint > Z_TAG_CODE_POINT) {\n return false;\n }\n\n count += 1;\n index += 2;\n }\n\n return getCodePoint(text.substr(index, 2)) === CANCEL_TAG_CODE_POINT;\n }\n\n function setIsLoaded() {\n this.isLoaded = true;\n }\n\n var Font = function Font() {\n this.fonts = [];\n this.chars = null;\n this.typekitLoaded = 0;\n this.isLoaded = false;\n this._warned = false;\n this.initTime = Date.now();\n this.setIsLoadedBinded = this.setIsLoaded.bind(this);\n this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);\n };\n\n Font.isModifier = isModifier;\n Font.isZeroWidthJoiner = isZeroWidthJoiner;\n Font.isFlagEmoji = isFlagEmoji;\n Font.isRegionalCode = isRegionalCode;\n Font.isCombinedCharacter = isCombinedCharacter;\n Font.isRegionalFlag = isRegionalFlag;\n Font.isVariationSelector = isVariationSelector;\n Font.BLACK_FLAG_CODE_POINT = BLACK_FLAG_CODE_POINT;\n var fontPrototype = {\n addChars: addChars,\n addFonts: addFonts,\n getCharData: getCharData,\n getFontByName: getFontByName,\n measureText: measureText,\n checkLoadedFonts: checkLoadedFonts,\n setIsLoaded: setIsLoaded\n };\n Font.prototype = fontPrototype;\n return Font;\n }();\n\n function SlotManager(animationData) {\n this.animationData = animationData;\n }\n\n SlotManager.prototype.getProp = function (data) {\n if (this.animationData.slots && this.animationData.slots[data.sid]) {\n return Object.assign(data, this.animationData.slots[data.sid].p);\n }\n\n return data;\n };\n\n function slotFactory(animationData) {\n return new SlotManager(animationData);\n }\n\n function RenderableElement() {}\n\n RenderableElement.prototype = {\n initRenderable: function initRenderable() {\n // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange\n this.isInRange = false; // layer's display state\n\n this.hidden = false; // If layer's transparency equals 0, it can be hidden\n\n this.isTransparent = false; // list of animated components\n\n this.renderableComponents = [];\n },\n addRenderableComponent: function addRenderableComponent(component) {\n if (this.renderableComponents.indexOf(component) === -1) {\n this.renderableComponents.push(component);\n }\n },\n removeRenderableComponent: function removeRenderableComponent(component) {\n if (this.renderableComponents.indexOf(component) !== -1) {\n this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);\n }\n },\n prepareRenderableFrame: function prepareRenderableFrame(num) {\n this.checkLayerLimits(num);\n },\n checkTransparency: function checkTransparency() {\n if (this.finalTransform.mProp.o.v <= 0) {\n if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {\n this.isTransparent = true;\n this.hide();\n }\n } else if (this.isTransparent) {\n this.isTransparent = false;\n this.show();\n }\n },\n\n /**\r\n * @function\r\n * Initializes frame related properties.\r\n *\r\n * @param {number} num\r\n * current frame number in Layer's time\r\n *\r\n */\n checkLayerLimits: function checkLayerLimits(num) {\n if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {\n if (this.isInRange !== true) {\n this.globalData._mdf = true;\n this._mdf = true;\n this.isInRange = true;\n this.show();\n }\n } else if (this.isInRange !== false) {\n this.globalData._mdf = true;\n this.isInRange = false;\n this.hide();\n }\n },\n renderRenderable: function renderRenderable() {\n var i;\n var len = this.renderableComponents.length;\n\n for (i = 0; i < len; i += 1) {\n this.renderableComponents[i].renderFrame(this._isFirstFrame);\n }\n /* this.maskManager.renderFrame(this.finalTransform.mat);\r\n this.renderableEffectsManager.renderFrame(this._isFirstFrame); */\n\n },\n sourceRectAtTime: function sourceRectAtTime() {\n return {\n top: 0,\n left: 0,\n width: 100,\n height: 100\n };\n },\n getLayerSize: function getLayerSize() {\n if (this.data.ty === 5) {\n return {\n w: this.data.textData.width,\n h: this.data.textData.height\n };\n }\n\n return {\n w: this.data.width,\n h: this.data.height\n };\n }\n };\n\n var getBlendMode = function () {\n var blendModeEnums = {\n 0: 'source-over',\n 1: 'multiply',\n 2: 'screen',\n 3: 'overlay',\n 4: 'darken',\n 5: 'lighten',\n 6: 'color-dodge',\n 7: 'color-burn',\n 8: 'hard-light',\n 9: 'soft-light',\n 10: 'difference',\n 11: 'exclusion',\n 12: 'hue',\n 13: 'saturation',\n 14: 'color',\n 15: 'luminosity'\n };\n return function (mode) {\n return blendModeEnums[mode] || '';\n };\n }();\n\n function SliderEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\n }\n\n function AngleEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\n }\n\n function ColorEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);\n }\n\n function PointEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);\n }\n\n function LayerIndexEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\n }\n\n function MaskIndexEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\n }\n\n function CheckboxEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\n }\n\n function NoValueEffect() {\n this.p = {};\n }\n\n function EffectsManager(data, element) {\n var effects = data.ef || [];\n this.effectElements = [];\n var i;\n var len = effects.length;\n var effectItem;\n\n for (i = 0; i < len; i += 1) {\n effectItem = new GroupEffect(effects[i], element);\n this.effectElements.push(effectItem);\n }\n }\n\n function GroupEffect(data, element) {\n this.init(data, element);\n }\n\n extendPrototype([DynamicPropertyContainer], GroupEffect);\n GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;\n\n GroupEffect.prototype.init = function (data, element) {\n this.data = data;\n this.effectElements = [];\n this.initDynamicPropertyContainer(element);\n var i;\n var len = this.data.ef.length;\n var eff;\n var effects = this.data.ef;\n\n for (i = 0; i < len; i += 1) {\n eff = null;\n\n switch (effects[i].ty) {\n case 0:\n eff = new SliderEffect(effects[i], element, this);\n break;\n\n case 1:\n eff = new AngleEffect(effects[i], element, this);\n break;\n\n case 2:\n eff = new ColorEffect(effects[i], element, this);\n break;\n\n case 3:\n eff = new PointEffect(effects[i], element, this);\n break;\n\n case 4:\n case 7:\n eff = new CheckboxEffect(effects[i], element, this);\n break;\n\n case 10:\n eff = new LayerIndexEffect(effects[i], element, this);\n break;\n\n case 11:\n eff = new MaskIndexEffect(effects[i], element, this);\n break;\n\n case 5:\n eff = new EffectsManager(effects[i], element, this);\n break;\n // case 6:\n\n default:\n eff = new NoValueEffect(effects[i], element, this);\n break;\n }\n\n if (eff) {\n this.effectElements.push(eff);\n }\n }\n };\n\n function BaseElement() {}\n\n BaseElement.prototype = {\n checkMasks: function checkMasks() {\n if (!this.data.hasMask) {\n return false;\n }\n\n var i = 0;\n var len = this.data.masksProperties.length;\n\n while (i < len) {\n if (this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false) {\n return true;\n }\n\n i += 1;\n }\n\n return false;\n },\n initExpressions: function initExpressions() {\n var expressionsInterfaces = getExpressionInterfaces();\n\n if (!expressionsInterfaces) {\n return;\n }\n\n var LayerExpressionInterface = expressionsInterfaces('layer');\n var EffectsExpressionInterface = expressionsInterfaces('effects');\n var ShapeExpressionInterface = expressionsInterfaces('shape');\n var TextExpressionInterface = expressionsInterfaces('text');\n var CompExpressionInterface = expressionsInterfaces('comp');\n this.layerInterface = LayerExpressionInterface(this);\n\n if (this.data.hasMask && this.maskManager) {\n this.layerInterface.registerMaskInterface(this.maskManager);\n }\n\n var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);\n this.layerInterface.registerEffectsInterface(effectsInterface);\n\n if (this.data.ty === 0 || this.data.xt) {\n this.compInterface = CompExpressionInterface(this);\n } else if (this.data.ty === 4) {\n this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);\n this.layerInterface.content = this.layerInterface.shapeInterface;\n } else if (this.data.ty === 5) {\n this.layerInterface.textInterface = TextExpressionInterface(this);\n this.layerInterface.text = this.layerInterface.textInterface;\n }\n },\n setBlendMode: function setBlendMode() {\n var blendModeValue = getBlendMode(this.data.bm);\n var elem = this.baseElement || this.layerElement;\n elem.style['mix-blend-mode'] = blendModeValue;\n },\n initBaseData: function initBaseData(data, globalData, comp) {\n this.globalData = globalData;\n this.comp = comp;\n this.data = data;\n this.layerId = createElementID(); // Stretch factor for old animations missing this property.\n\n if (!this.data.sr) {\n this.data.sr = 1;\n } // effects manager\n\n\n this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);\n },\n getType: function getType() {\n return this.type;\n },\n sourceRectAtTime: function sourceRectAtTime() {}\n };\n\n /**\r\n * @file\r\n * Handles element's layer frame update.\r\n * Checks layer in point and out point\r\n *\r\n */\n function FrameElement() {}\n\n FrameElement.prototype = {\n /**\r\n * @function\r\n * Initializes frame related properties.\r\n *\r\n */\n initFrame: function initFrame() {\n // set to true when inpoint is rendered\n this._isFirstFrame = false; // list of animated properties\n\n this.dynamicProperties = []; // If layer has been modified in current tick this will be true\n\n this._mdf = false;\n },\n\n /**\r\n * @function\r\n * Calculates all dynamic values\r\n *\r\n * @param {number} num\r\n * current frame number in Layer's time\r\n * @param {boolean} isVisible\r\n * if layers is currently in range\r\n *\r\n */\n prepareProperties: function prepareProperties(num, isVisible) {\n var i;\n var len = this.dynamicProperties.length;\n\n for (i = 0; i < len; i += 1) {\n if (isVisible || this._isParent && this.dynamicProperties[i].propType === 'transform') {\n this.dynamicProperties[i].getValue();\n\n if (this.dynamicProperties[i]._mdf) {\n this.globalData._mdf = true;\n this._mdf = true;\n }\n }\n }\n },\n addDynamicProperty: function addDynamicProperty(prop) {\n if (this.dynamicProperties.indexOf(prop) === -1) {\n this.dynamicProperties.push(prop);\n }\n }\n };\n\n function FootageElement(data, globalData, comp) {\n this.initFrame();\n this.initRenderable();\n this.assetData = globalData.getAssetData(data.refId);\n this.footageData = globalData.imageLoader.getAsset(this.assetData);\n this.initBaseData(data, globalData, comp);\n }\n\n FootageElement.prototype.prepareFrame = function () {};\n\n extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);\n\n FootageElement.prototype.getBaseElement = function () {\n return null;\n };\n\n FootageElement.prototype.renderFrame = function () {};\n\n FootageElement.prototype.destroy = function () {};\n\n FootageElement.prototype.initExpressions = function () {\n var expressionsInterfaces = getExpressionInterfaces();\n\n if (!expressionsInterfaces) {\n return;\n }\n\n var FootageInterface = expressionsInterfaces('footage');\n this.layerInterface = FootageInterface(this);\n };\n\n FootageElement.prototype.getFootageData = function () {\n return this.footageData;\n };\n\n function AudioElement(data, globalData, comp) {\n this.initFrame();\n this.initRenderable();\n this.assetData = globalData.getAssetData(data.refId);\n this.initBaseData(data, globalData, comp);\n this._isPlaying = false;\n this._canPlay = false;\n var assetPath = this.globalData.getAssetsPath(this.assetData);\n this.audio = this.globalData.audioController.createAudio(assetPath);\n this._currentTime = 0;\n this.globalData.audioController.addAudio(this);\n this._volumeMultiplier = 1;\n this._volume = 1;\n this._previousVolume = null;\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\n _placeholder: true\n };\n this.lv = PropertyFactory.getProp(this, data.au && data.au.lv ? data.au.lv : {\n k: [100]\n }, 1, 0.01, this);\n }\n\n AudioElement.prototype.prepareFrame = function (num) {\n this.prepareRenderableFrame(num, true);\n this.prepareProperties(num, true);\n\n if (!this.tm._placeholder) {\n var timeRemapped = this.tm.v;\n this._currentTime = timeRemapped;\n } else {\n this._currentTime = num / this.data.sr;\n }\n\n this._volume = this.lv.v[0];\n var totalVolume = this._volume * this._volumeMultiplier;\n\n if (this._previousVolume !== totalVolume) {\n this._previousVolume = totalVolume;\n this.audio.volume(totalVolume);\n }\n };\n\n extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);\n\n AudioElement.prototype.renderFrame = function () {\n if (this.isInRange && this._canPlay) {\n if (!this._isPlaying) {\n this.audio.play();\n this.audio.seek(this._currentTime / this.globalData.frameRate);\n this._isPlaying = true;\n } else if (!this.audio.playing() || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1) {\n this.audio.seek(this._currentTime / this.globalData.frameRate);\n }\n }\n };\n\n AudioElement.prototype.show = function () {// this.audio.play()\n };\n\n AudioElement.prototype.hide = function () {\n this.audio.pause();\n this._isPlaying = false;\n };\n\n AudioElement.prototype.pause = function () {\n this.audio.pause();\n this._isPlaying = false;\n this._canPlay = false;\n };\n\n AudioElement.prototype.resume = function () {\n this._canPlay = true;\n };\n\n AudioElement.prototype.setRate = function (rateValue) {\n this.audio.rate(rateValue);\n };\n\n AudioElement.prototype.volume = function (volumeValue) {\n this._volumeMultiplier = volumeValue;\n this._previousVolume = volumeValue * this._volume;\n this.audio.volume(this._previousVolume);\n };\n\n AudioElement.prototype.getBaseElement = function () {\n return null;\n };\n\n AudioElement.prototype.destroy = function () {};\n\n AudioElement.prototype.sourceRectAtTime = function () {};\n\n AudioElement.prototype.initExpressions = function () {};\n\n function BaseRenderer() {}\n\n BaseRenderer.prototype.checkLayers = function (num) {\n var i;\n var len = this.layers.length;\n var data;\n this.completeLayers = true;\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (!this.elements[i]) {\n data = this.layers[i];\n\n if (data.ip - data.st <= num - this.layers[i].st && data.op - data.st > num - this.layers[i].st) {\n this.buildItem(i);\n }\n }\n\n this.completeLayers = this.elements[i] ? this.completeLayers : false;\n }\n\n this.checkPendingElements();\n };\n\n BaseRenderer.prototype.createItem = function (layer) {\n switch (layer.ty) {\n case 2:\n return this.createImage(layer);\n\n case 0:\n return this.createComp(layer);\n\n case 1:\n return this.createSolid(layer);\n\n case 3:\n return this.createNull(layer);\n\n case 4:\n return this.createShape(layer);\n\n case 5:\n return this.createText(layer);\n\n case 6:\n return this.createAudio(layer);\n\n case 13:\n return this.createCamera(layer);\n\n case 15:\n return this.createFootage(layer);\n\n default:\n return this.createNull(layer);\n }\n };\n\n BaseRenderer.prototype.createCamera = function () {\n throw new Error('You\\'re using a 3d camera. Try the html renderer.');\n };\n\n BaseRenderer.prototype.createAudio = function (data) {\n return new AudioElement(data, this.globalData, this);\n };\n\n BaseRenderer.prototype.createFootage = function (data) {\n return new FootageElement(data, this.globalData, this);\n };\n\n BaseRenderer.prototype.buildAllItems = function () {\n var i;\n var len = this.layers.length;\n\n for (i = 0; i < len; i += 1) {\n this.buildItem(i);\n }\n\n this.checkPendingElements();\n };\n\n BaseRenderer.prototype.includeLayers = function (newLayers) {\n this.completeLayers = false;\n var i;\n var len = newLayers.length;\n var j;\n var jLen = this.layers.length;\n\n for (i = 0; i < len; i += 1) {\n j = 0;\n\n while (j < jLen) {\n if (this.layers[j].id === newLayers[i].id) {\n this.layers[j] = newLayers[i];\n break;\n }\n\n j += 1;\n }\n }\n };\n\n BaseRenderer.prototype.setProjectInterface = function (pInterface) {\n this.globalData.projectInterface = pInterface;\n };\n\n BaseRenderer.prototype.initItems = function () {\n if (!this.globalData.progressiveLoad) {\n this.buildAllItems();\n }\n };\n\n BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {\n var elements = this.elements;\n var layers = this.layers;\n var i = 0;\n var len = layers.length;\n\n while (i < len) {\n if (layers[i].ind == parentName) {\n // eslint-disable-line eqeqeq\n if (!elements[i] || elements[i] === true) {\n this.buildItem(i);\n this.addPendingElement(element);\n } else {\n hierarchy.push(elements[i]);\n elements[i].setAsParent();\n\n if (layers[i].parent !== undefined) {\n this.buildElementParenting(element, layers[i].parent, hierarchy);\n } else {\n element.setHierarchy(hierarchy);\n }\n }\n }\n\n i += 1;\n }\n };\n\n BaseRenderer.prototype.addPendingElement = function (element) {\n this.pendingElements.push(element);\n };\n\n BaseRenderer.prototype.searchExtraCompositions = function (assets) {\n var i;\n var len = assets.length;\n\n for (i = 0; i < len; i += 1) {\n if (assets[i].xt) {\n var comp = this.createComp(assets[i]);\n comp.initExpressions();\n this.globalData.projectInterface.registerComposition(comp);\n }\n }\n };\n\n BaseRenderer.prototype.getElementById = function (ind) {\n var i;\n var len = this.elements.length;\n\n for (i = 0; i < len; i += 1) {\n if (this.elements[i].data.ind === ind) {\n return this.elements[i];\n }\n }\n\n return null;\n };\n\n BaseRenderer.prototype.getElementByPath = function (path) {\n var pathValue = path.shift();\n var element;\n\n if (typeof pathValue === 'number') {\n element = this.elements[pathValue];\n } else {\n var i;\n var len = this.elements.length;\n\n for (i = 0; i < len; i += 1) {\n if (this.elements[i].data.nm === pathValue) {\n element = this.elements[i];\n break;\n }\n }\n }\n\n if (path.length === 0) {\n return element;\n }\n\n return element.getElementByPath(path);\n };\n\n BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {\n this.globalData.fontManager = new FontManager();\n this.globalData.slotManager = slotFactory(animData);\n this.globalData.fontManager.addChars(animData.chars);\n this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);\n this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);\n this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);\n this.globalData.imageLoader = this.animationItem.imagePreloader;\n this.globalData.audioController = this.animationItem.audioController;\n this.globalData.frameId = 0;\n this.globalData.frameRate = animData.fr;\n this.globalData.nm = animData.nm;\n this.globalData.compSize = {\n w: animData.w,\n h: animData.h\n };\n };\n\n var effectTypes = {\n TRANSFORM_EFFECT: 'transformEFfect'\n };\n\n function TransformElement() {}\n\n TransformElement.prototype = {\n initTransform: function initTransform() {\n var mat = new Matrix();\n this.finalTransform = {\n mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : {\n o: 0\n },\n _matMdf: false,\n _localMatMdf: false,\n _opMdf: false,\n mat: mat,\n localMat: mat,\n localOpacity: 1\n };\n\n if (this.data.ao) {\n this.finalTransform.mProp.autoOriented = true;\n } // TODO: check TYPE 11: Guided elements\n\n\n if (this.data.ty !== 11) {// this.createElements();\n }\n },\n renderTransform: function renderTransform() {\n this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;\n this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;\n\n if (this.hierarchy) {\n var mat;\n var finalMat = this.finalTransform.mat;\n var i = 0;\n var len = this.hierarchy.length; // Checking if any of the transformation matrices in the hierarchy chain has changed.\n\n if (!this.finalTransform._matMdf) {\n while (i < len) {\n if (this.hierarchy[i].finalTransform.mProp._mdf) {\n this.finalTransform._matMdf = true;\n break;\n }\n\n i += 1;\n }\n }\n\n if (this.finalTransform._matMdf) {\n mat = this.finalTransform.mProp.v.props;\n finalMat.cloneFromProps(mat);\n\n for (i = 0; i < len; i += 1) {\n finalMat.multiply(this.hierarchy[i].finalTransform.mProp.v);\n }\n }\n }\n\n if (this.finalTransform._matMdf) {\n this.finalTransform._localMatMdf = this.finalTransform._matMdf;\n }\n\n if (this.finalTransform._opMdf) {\n this.finalTransform.localOpacity = this.finalTransform.mProp.o.v;\n }\n },\n renderLocalTransform: function renderLocalTransform() {\n if (this.localTransforms) {\n var i = 0;\n var len = this.localTransforms.length;\n this.finalTransform._localMatMdf = this.finalTransform._matMdf;\n\n if (!this.finalTransform._localMatMdf || !this.finalTransform._opMdf) {\n while (i < len) {\n if (this.localTransforms[i]._mdf) {\n this.finalTransform._localMatMdf = true;\n }\n\n if (this.localTransforms[i]._opMdf && !this.finalTransform._opMdf) {\n this.finalTransform.localOpacity = this.finalTransform.mProp.o.v;\n this.finalTransform._opMdf = true;\n }\n\n i += 1;\n }\n }\n\n if (this.finalTransform._localMatMdf) {\n var localMat = this.finalTransform.localMat;\n this.localTransforms[0].matrix.clone(localMat);\n\n for (i = 1; i < len; i += 1) {\n var lmat = this.localTransforms[i].matrix;\n localMat.multiply(lmat);\n }\n\n localMat.multiply(this.finalTransform.mat);\n }\n\n if (this.finalTransform._opMdf) {\n var localOp = this.finalTransform.localOpacity;\n\n for (i = 0; i < len; i += 1) {\n localOp *= this.localTransforms[i].opacity * 0.01;\n }\n\n this.finalTransform.localOpacity = localOp;\n }\n }\n },\n searchEffectTransforms: function searchEffectTransforms() {\n if (this.renderableEffectsManager) {\n var transformEffects = this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);\n\n if (transformEffects.length) {\n this.localTransforms = [];\n this.finalTransform.localMat = new Matrix();\n var i = 0;\n var len = transformEffects.length;\n\n for (i = 0; i < len; i += 1) {\n this.localTransforms.push(transformEffects[i]);\n }\n }\n }\n },\n globalToLocal: function globalToLocal(pt) {\n var transforms = [];\n transforms.push(this.finalTransform);\n var flag = true;\n var comp = this.comp;\n\n while (flag) {\n if (comp.finalTransform) {\n if (comp.data.hasMask) {\n transforms.splice(0, 0, comp.finalTransform);\n }\n\n comp = comp.comp;\n } else {\n flag = false;\n }\n }\n\n var i;\n var len = transforms.length;\n var ptNew;\n\n for (i = 0; i < len; i += 1) {\n ptNew = transforms[i].mat.applyToPointArray(0, 0, 0); // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);\n\n pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];\n }\n\n return pt;\n },\n mHelper: new Matrix()\n };\n\n function MaskElement(data, element, globalData) {\n this.data = data;\n this.element = element;\n this.globalData = globalData;\n this.storedData = [];\n this.masksProperties = this.data.masksProperties || [];\n this.maskElement = null;\n var defs = this.globalData.defs;\n var i;\n var len = this.masksProperties ? this.masksProperties.length : 0;\n this.viewData = createSizedArray(len);\n this.solidPath = '';\n var path;\n var properties = this.masksProperties;\n var count = 0;\n var currentMasks = [];\n var j;\n var jLen;\n var layerId = createElementID();\n var rect;\n var expansor;\n var feMorph;\n var x;\n var maskType = 'clipPath';\n var maskRef = 'clip-path';\n\n for (i = 0; i < len; i += 1) {\n if (properties[i].mode !== 'a' && properties[i].mode !== 'n' || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {\n maskType = 'mask';\n maskRef = 'mask';\n }\n\n if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {\n rect = createNS('rect');\n rect.setAttribute('fill', '#ffffff');\n rect.setAttribute('width', this.element.comp.data.w || 0);\n rect.setAttribute('height', this.element.comp.data.h || 0);\n currentMasks.push(rect);\n } else {\n rect = null;\n }\n\n path = createNS('path');\n\n if (properties[i].mode === 'n') {\n // TODO move this to a factory or to a constructor\n this.viewData[i] = {\n op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),\n prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),\n elem: path,\n lastPath: ''\n };\n defs.appendChild(path);\n } else {\n count += 1;\n path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');\n path.setAttribute('clip-rule', 'nonzero');\n var filterID;\n\n if (properties[i].x.k !== 0) {\n maskType = 'mask';\n maskRef = 'mask';\n x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);\n filterID = createElementID();\n expansor = createNS('filter');\n expansor.setAttribute('id', filterID);\n feMorph = createNS('feMorphology');\n feMorph.setAttribute('operator', 'erode');\n feMorph.setAttribute('in', 'SourceGraphic');\n feMorph.setAttribute('radius', '0');\n expansor.appendChild(feMorph);\n defs.appendChild(expansor);\n path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');\n } else {\n feMorph = null;\n x = null;\n } // TODO move this to a factory or to a constructor\n\n\n this.storedData[i] = {\n elem: path,\n x: x,\n expan: feMorph,\n lastPath: '',\n lastOperator: '',\n filterId: filterID,\n lastRadius: 0\n };\n\n if (properties[i].mode === 'i') {\n jLen = currentMasks.length;\n var g = createNS('g');\n\n for (j = 0; j < jLen; j += 1) {\n g.appendChild(currentMasks[j]);\n }\n\n var mask = createNS('mask');\n mask.setAttribute('mask-type', 'alpha');\n mask.setAttribute('id', layerId + '_' + count);\n mask.appendChild(path);\n defs.appendChild(mask);\n g.setAttribute('mask', 'url(' + getLocationHref() + '#' + layerId + '_' + count + ')');\n currentMasks.length = 0;\n currentMasks.push(g);\n } else {\n currentMasks.push(path);\n }\n\n if (properties[i].inv && !this.solidPath) {\n this.solidPath = this.createLayerSolidPath();\n } // TODO move this to a factory or to a constructor\n\n\n this.viewData[i] = {\n elem: path,\n lastPath: '',\n op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),\n prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),\n invRect: rect\n };\n\n if (!this.viewData[i].prop.k) {\n this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);\n }\n }\n }\n\n this.maskElement = createNS(maskType);\n len = currentMasks.length;\n\n for (i = 0; i < len; i += 1) {\n this.maskElement.appendChild(currentMasks[i]);\n }\n\n if (count > 0) {\n this.maskElement.setAttribute('id', layerId);\n this.element.maskedElement.setAttribute(maskRef, 'url(' + getLocationHref() + '#' + layerId + ')');\n defs.appendChild(this.maskElement);\n }\n\n if (this.viewData.length) {\n this.element.addRenderableComponent(this);\n }\n }\n\n MaskElement.prototype.getMaskProperty = function (pos) {\n return this.viewData[pos].prop;\n };\n\n MaskElement.prototype.renderFrame = function (isFirstFrame) {\n var finalMat = this.element.finalTransform.mat;\n var i;\n var len = this.masksProperties.length;\n\n for (i = 0; i < len; i += 1) {\n if (this.viewData[i].prop._mdf || isFirstFrame) {\n this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);\n }\n\n if (this.viewData[i].op._mdf || isFirstFrame) {\n this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);\n }\n\n if (this.masksProperties[i].mode !== 'n') {\n if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {\n this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());\n }\n\n if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {\n var feMorph = this.storedData[i].expan;\n\n if (this.storedData[i].x.v < 0) {\n if (this.storedData[i].lastOperator !== 'erode') {\n this.storedData[i].lastOperator = 'erode';\n this.storedData[i].elem.setAttribute('filter', 'url(' + getLocationHref() + '#' + this.storedData[i].filterId + ')');\n }\n\n feMorph.setAttribute('radius', -this.storedData[i].x.v);\n } else {\n if (this.storedData[i].lastOperator !== 'dilate') {\n this.storedData[i].lastOperator = 'dilate';\n this.storedData[i].elem.setAttribute('filter', null);\n }\n\n this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);\n }\n }\n }\n }\n };\n\n MaskElement.prototype.getMaskelement = function () {\n return this.maskElement;\n };\n\n MaskElement.prototype.createLayerSolidPath = function () {\n var path = 'M0,0 ';\n path += ' h' + this.globalData.compSize.w;\n path += ' v' + this.globalData.compSize.h;\n path += ' h-' + this.globalData.compSize.w;\n path += ' v-' + this.globalData.compSize.h + ' ';\n return path;\n };\n\n MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {\n var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];\n var i;\n var len;\n len = pathNodes._length;\n\n for (i = 1; i < len; i += 1) {\n // pathString += \" C\"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + \" \"+pathNodes.i[i][0]+','+pathNodes.i[i][1] + \" \"+pathNodes.v[i][0]+','+pathNodes.v[i][1];\n pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[i][0] + ',' + pathNodes.i[i][1] + ' ' + pathNodes.v[i][0] + ',' + pathNodes.v[i][1];\n } // pathString += \" C\"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + \" \"+pathNodes.i[0][0]+','+pathNodes.i[0][1] + \" \"+pathNodes.v[0][0]+','+pathNodes.v[0][1];\n\n\n if (pathNodes.c && len > 1) {\n pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[0][0] + ',' + pathNodes.i[0][1] + ' ' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];\n } // pathNodes.__renderedString = pathString;\n\n\n if (viewData.lastPath !== pathString) {\n var pathShapeValue = '';\n\n if (viewData.elem) {\n if (pathNodes.c) {\n pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;\n }\n\n viewData.elem.setAttribute('d', pathShapeValue);\n }\n\n viewData.lastPath = pathString;\n }\n };\n\n MaskElement.prototype.destroy = function () {\n this.element = null;\n this.globalData = null;\n this.maskElement = null;\n this.data = null;\n this.masksProperties = null;\n };\n\n var filtersFactory = function () {\n var ob = {};\n ob.createFilter = createFilter;\n ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;\n\n function createFilter(filId, skipCoordinates) {\n var fil = createNS('filter');\n fil.setAttribute('id', filId);\n\n if (skipCoordinates !== true) {\n fil.setAttribute('filterUnits', 'objectBoundingBox');\n fil.setAttribute('x', '0%');\n fil.setAttribute('y', '0%');\n fil.setAttribute('width', '100%');\n fil.setAttribute('height', '100%');\n }\n\n return fil;\n }\n\n function createAlphaToLuminanceFilter() {\n var feColorMatrix = createNS('feColorMatrix');\n feColorMatrix.setAttribute('type', 'matrix');\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\n feColorMatrix.setAttribute('values', '0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1');\n return feColorMatrix;\n }\n\n return ob;\n }();\n\n var featureSupport = function () {\n var ob = {\n maskType: true,\n svgLumaHidden: true,\n offscreenCanvas: typeof OffscreenCanvas !== 'undefined'\n };\n\n if (/MSIE 10/i.test(navigator.userAgent) || /MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent) || /Edge\\/\\d./i.test(navigator.userAgent)) {\n ob.maskType = false;\n }\n\n if (/firefox/i.test(navigator.userAgent)) {\n ob.svgLumaHidden = false;\n }\n\n return ob;\n }();\n\n var registeredEffects$1 = {};\n var idPrefix = 'filter_result_';\n\n function SVGEffects(elem) {\n var i;\n var source = 'SourceGraphic';\n var len = elem.data.ef ? elem.data.ef.length : 0;\n var filId = createElementID();\n var fil = filtersFactory.createFilter(filId, true);\n var count = 0;\n this.filters = [];\n var filterManager;\n\n for (i = 0; i < len; i += 1) {\n filterManager = null;\n var type = elem.data.ef[i].ty;\n\n if (registeredEffects$1[type]) {\n var Effect = registeredEffects$1[type].effect;\n filterManager = new Effect(fil, elem.effectsManager.effectElements[i], elem, idPrefix + count, source);\n source = idPrefix + count;\n\n if (registeredEffects$1[type].countsAsEffect) {\n count += 1;\n }\n }\n\n if (filterManager) {\n this.filters.push(filterManager);\n }\n }\n\n if (count) {\n elem.globalData.defs.appendChild(fil);\n elem.layerElement.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');\n }\n\n if (this.filters.length) {\n elem.addRenderableComponent(this);\n }\n }\n\n SVGEffects.prototype.renderFrame = function (_isFirstFrame) {\n var i;\n var len = this.filters.length;\n\n for (i = 0; i < len; i += 1) {\n this.filters[i].renderFrame(_isFirstFrame);\n }\n };\n\n SVGEffects.prototype.getEffects = function (type) {\n var i;\n var len = this.filters.length;\n var effects = [];\n\n for (i = 0; i < len; i += 1) {\n if (this.filters[i].type === type) {\n effects.push(this.filters[i]);\n }\n }\n\n return effects;\n };\n\n function registerEffect$1(id, effect, countsAsEffect) {\n registeredEffects$1[id] = {\n effect: effect,\n countsAsEffect: countsAsEffect\n };\n }\n\n function SVGBaseElement() {}\n\n SVGBaseElement.prototype = {\n initRendererElement: function initRendererElement() {\n this.layerElement = createNS('g');\n },\n createContainerElements: function createContainerElements() {\n this.matteElement = createNS('g');\n this.transformedElement = this.layerElement;\n this.maskedElement = this.layerElement;\n this._sizeChanged = false;\n var layerElementParent = null; // If this layer acts as a mask for the following layer\n\n if (this.data.td) {\n this.matteMasks = {};\n var gg = createNS('g');\n gg.setAttribute('id', this.layerId);\n gg.appendChild(this.layerElement);\n layerElementParent = gg;\n this.globalData.defs.appendChild(gg);\n } else if (this.data.tt) {\n this.matteElement.appendChild(this.layerElement);\n layerElementParent = this.matteElement;\n this.baseElement = this.matteElement;\n } else {\n this.baseElement = this.layerElement;\n }\n\n if (this.data.ln) {\n this.layerElement.setAttribute('id', this.data.ln);\n }\n\n if (this.data.cl) {\n this.layerElement.setAttribute('class', this.data.cl);\n } // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped\n\n\n if (this.data.ty === 0 && !this.data.hd) {\n var cp = createNS('clipPath');\n var pt = createNS('path');\n pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');\n var clipId = createElementID();\n cp.setAttribute('id', clipId);\n cp.appendChild(pt);\n this.globalData.defs.appendChild(cp);\n\n if (this.checkMasks()) {\n var cpGroup = createNS('g');\n cpGroup.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');\n cpGroup.appendChild(this.layerElement);\n this.transformedElement = cpGroup;\n\n if (layerElementParent) {\n layerElementParent.appendChild(this.transformedElement);\n } else {\n this.baseElement = this.transformedElement;\n }\n } else {\n this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');\n }\n }\n\n if (this.data.bm !== 0) {\n this.setBlendMode();\n }\n },\n renderElement: function renderElement() {\n if (this.finalTransform._localMatMdf) {\n this.transformedElement.setAttribute('transform', this.finalTransform.localMat.to2dCSS());\n }\n\n if (this.finalTransform._opMdf) {\n this.transformedElement.setAttribute('opacity', this.finalTransform.localOpacity);\n }\n },\n destroyBaseElement: function destroyBaseElement() {\n this.layerElement = null;\n this.matteElement = null;\n this.maskManager.destroy();\n },\n getBaseElement: function getBaseElement() {\n if (this.data.hd) {\n return null;\n }\n\n return this.baseElement;\n },\n createRenderableComponents: function createRenderableComponents() {\n this.maskManager = new MaskElement(this.data, this, this.globalData);\n this.renderableEffectsManager = new SVGEffects(this);\n this.searchEffectTransforms();\n },\n getMatte: function getMatte(matteType) {\n // This should not be a common case. But for backward compatibility, we'll create the matte object.\n // It solves animations that have two consecutive layers marked as matte masks.\n // Which is an undefined behavior in AE.\n if (!this.matteMasks) {\n this.matteMasks = {};\n }\n\n if (!this.matteMasks[matteType]) {\n var id = this.layerId + '_' + matteType;\n var filId;\n var fil;\n var useElement;\n var gg;\n\n if (matteType === 1 || matteType === 3) {\n var masker = createNS('mask');\n masker.setAttribute('id', id);\n masker.setAttribute('mask-type', matteType === 3 ? 'luminance' : 'alpha');\n useElement = createNS('use');\n useElement.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '#' + this.layerId);\n masker.appendChild(useElement);\n this.globalData.defs.appendChild(masker);\n\n if (!featureSupport.maskType && matteType === 1) {\n masker.setAttribute('mask-type', 'luminance');\n filId = createElementID();\n fil = filtersFactory.createFilter(filId);\n this.globalData.defs.appendChild(fil);\n fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());\n gg = createNS('g');\n gg.appendChild(useElement);\n masker.appendChild(gg);\n gg.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');\n }\n } else if (matteType === 2) {\n var maskGroup = createNS('mask');\n maskGroup.setAttribute('id', id);\n maskGroup.setAttribute('mask-type', 'alpha');\n var maskGrouper = createNS('g');\n maskGroup.appendChild(maskGrouper);\n filId = createElementID();\n fil = filtersFactory.createFilter(filId); /// /\n\n var feCTr = createNS('feComponentTransfer');\n feCTr.setAttribute('in', 'SourceGraphic');\n fil.appendChild(feCTr);\n var feFunc = createNS('feFuncA');\n feFunc.setAttribute('type', 'table');\n feFunc.setAttribute('tableValues', '1.0 0.0');\n feCTr.appendChild(feFunc); /// /\n\n this.globalData.defs.appendChild(fil);\n var alphaRect = createNS('rect');\n alphaRect.setAttribute('width', this.comp.data.w);\n alphaRect.setAttribute('height', this.comp.data.h);\n alphaRect.setAttribute('x', '0');\n alphaRect.setAttribute('y', '0');\n alphaRect.setAttribute('fill', '#ffffff');\n alphaRect.setAttribute('opacity', '0');\n maskGrouper.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');\n maskGrouper.appendChild(alphaRect);\n useElement = createNS('use');\n useElement.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '#' + this.layerId);\n maskGrouper.appendChild(useElement);\n\n if (!featureSupport.maskType) {\n maskGroup.setAttribute('mask-type', 'luminance');\n fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());\n gg = createNS('g');\n maskGrouper.appendChild(alphaRect);\n gg.appendChild(this.layerElement);\n maskGrouper.appendChild(gg);\n }\n\n this.globalData.defs.appendChild(maskGroup);\n }\n\n this.matteMasks[matteType] = id;\n }\n\n return this.matteMasks[matteType];\n },\n setMatte: function setMatte(id) {\n if (!this.matteElement) {\n return;\n }\n\n this.matteElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');\n }\n };\n\n /**\r\n * @file\r\n * Handles AE's layer parenting property.\r\n *\r\n */\n function HierarchyElement() {}\n\n HierarchyElement.prototype = {\n /**\r\n * @function\r\n * Initializes hierarchy properties\r\n *\r\n */\n initHierarchy: function initHierarchy() {\n // element's parent list\n this.hierarchy = []; // if element is parent of another layer _isParent will be true\n\n this._isParent = false;\n this.checkParenting();\n },\n\n /**\r\n * @function\r\n * Sets layer's hierarchy.\r\n * @param {array} hierarch\r\n * layer's parent list\r\n *\r\n */\n setHierarchy: function setHierarchy(hierarchy) {\n this.hierarchy = hierarchy;\n },\n\n /**\r\n * @function\r\n * Sets layer as parent.\r\n *\r\n */\n setAsParent: function setAsParent() {\n this._isParent = true;\n },\n\n /**\r\n * @function\r\n * Searches layer's parenting chain\r\n *\r\n */\n checkParenting: function checkParenting() {\n if (this.data.parent !== undefined) {\n this.comp.buildElementParenting(this, this.data.parent, []);\n }\n }\n };\n\n function RenderableDOMElement() {}\n\n (function () {\n var _prototype = {\n initElement: function initElement(data, globalData, comp) {\n this.initFrame();\n this.initBaseData(data, globalData, comp);\n this.initTransform(data, globalData, comp);\n this.initHierarchy();\n this.initRenderable();\n this.initRendererElement();\n this.createContainerElements();\n this.createRenderableComponents();\n this.createContent();\n this.hide();\n },\n hide: function hide() {\n // console.log('HIDE', this);\n if (!this.hidden && (!this.isInRange || this.isTransparent)) {\n var elem = this.baseElement || this.layerElement;\n elem.style.display = 'none';\n this.hidden = true;\n }\n },\n show: function show() {\n // console.log('SHOW', this);\n if (this.isInRange && !this.isTransparent) {\n if (!this.data.hd) {\n var elem = this.baseElement || this.layerElement;\n elem.style.display = 'block';\n }\n\n this.hidden = false;\n this._isFirstFrame = true;\n }\n },\n renderFrame: function renderFrame() {\n // If it is exported as hidden (data.hd === true) no need to render\n // If it is not visible no need to render\n if (this.data.hd || this.hidden) {\n return;\n }\n\n this.renderTransform();\n this.renderRenderable();\n this.renderLocalTransform();\n this.renderElement();\n this.renderInnerContent();\n\n if (this._isFirstFrame) {\n this._isFirstFrame = false;\n }\n },\n renderInnerContent: function renderInnerContent() {},\n prepareFrame: function prepareFrame(num) {\n this._mdf = false;\n this.prepareRenderableFrame(num);\n this.prepareProperties(num, this.isInRange);\n this.checkTransparency();\n },\n destroy: function destroy() {\n this.innerElem = null;\n this.destroyBaseElement();\n }\n };\n extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);\n })();\n\n function IImageElement(data, globalData, comp) {\n this.assetData = globalData.getAssetData(data.refId);\n\n if (this.assetData && this.assetData.sid) {\n this.assetData = globalData.slotManager.getProp(this.assetData);\n }\n\n this.initElement(data, globalData, comp);\n this.sourceRect = {\n top: 0,\n left: 0,\n width: this.assetData.w,\n height: this.assetData.h\n };\n }\n\n extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);\n\n IImageElement.prototype.createContent = function () {\n var assetPath = this.globalData.getAssetsPath(this.assetData);\n this.innerElem = createNS('image');\n this.innerElem.setAttribute('width', this.assetData.w + 'px');\n this.innerElem.setAttribute('height', this.assetData.h + 'px');\n this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);\n this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);\n this.layerElement.appendChild(this.innerElem);\n };\n\n IImageElement.prototype.sourceRectAtTime = function () {\n return this.sourceRect;\n };\n\n function ProcessedElement(element, position) {\n this.elem = element;\n this.pos = position;\n }\n\n function IShapeElement() {}\n\n IShapeElement.prototype = {\n addShapeToModifiers: function addShapeToModifiers(data) {\n var i;\n var len = this.shapeModifiers.length;\n\n for (i = 0; i < len; i += 1) {\n this.shapeModifiers[i].addShape(data);\n }\n },\n isShapeInAnimatedModifiers: function isShapeInAnimatedModifiers(data) {\n var i = 0;\n var len = this.shapeModifiers.length;\n\n while (i < len) {\n if (this.shapeModifiers[i].isAnimatedWithShape(data)) {\n return true;\n }\n }\n\n return false;\n },\n renderModifiers: function renderModifiers() {\n if (!this.shapeModifiers.length) {\n return;\n }\n\n var i;\n var len = this.shapes.length;\n\n for (i = 0; i < len; i += 1) {\n this.shapes[i].sh.reset();\n }\n\n len = this.shapeModifiers.length;\n var shouldBreakProcess;\n\n for (i = len - 1; i >= 0; i -= 1) {\n shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame); // workaround to fix cases where a repeater resets the shape so the following processes get called twice\n // TODO: find a better solution for this\n\n if (shouldBreakProcess) {\n break;\n }\n }\n },\n searchProcessedElement: function searchProcessedElement(elem) {\n var elements = this.processedElements;\n var i = 0;\n var len = elements.length;\n\n while (i < len) {\n if (elements[i].elem === elem) {\n return elements[i].pos;\n }\n\n i += 1;\n }\n\n return 0;\n },\n addProcessedElement: function addProcessedElement(elem, pos) {\n var elements = this.processedElements;\n var i = elements.length;\n\n while (i) {\n i -= 1;\n\n if (elements[i].elem === elem) {\n elements[i].pos = pos;\n return;\n }\n }\n\n elements.push(new ProcessedElement(elem, pos));\n },\n prepareFrame: function prepareFrame(num) {\n this.prepareRenderableFrame(num);\n this.prepareProperties(num, this.isInRange);\n }\n };\n\n var lineCapEnum = {\n 1: 'butt',\n 2: 'round',\n 3: 'square'\n };\n var lineJoinEnum = {\n 1: 'miter',\n 2: 'round',\n 3: 'bevel'\n };\n\n function SVGShapeData(transformers, level, shape) {\n this.caches = [];\n this.styles = [];\n this.transformers = transformers;\n this.lStr = '';\n this.sh = shape;\n this.lvl = level; // TODO find if there are some cases where _isAnimated can be false.\n // For now, since shapes add up with other shapes. They have to be calculated every time.\n // One way of finding out is checking if all styles associated to this shape depend only of this shape\n\n this._isAnimated = !!shape.k; // TODO: commenting this for now since all shapes are animated\n\n var i = 0;\n var len = transformers.length;\n\n while (i < len) {\n if (transformers[i].mProps.dynamicProperties.length) {\n this._isAnimated = true;\n break;\n }\n\n i += 1;\n }\n }\n\n SVGShapeData.prototype.setAsAnimated = function () {\n this._isAnimated = true;\n };\n\n function SVGStyleData(data, level) {\n this.data = data;\n this.type = data.ty;\n this.d = '';\n this.lvl = level;\n this._mdf = false;\n this.closed = data.hd === true;\n this.pElem = createNS('path');\n this.msElem = null;\n }\n\n SVGStyleData.prototype.reset = function () {\n this.d = '';\n this._mdf = false;\n };\n\n function DashProperty(elem, data, renderer, container) {\n this.elem = elem;\n this.frameId = -1;\n this.dataProps = createSizedArray(data.length);\n this.renderer = renderer;\n this.k = false;\n this.dashStr = '';\n this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);\n this.dashoffset = createTypedArray('float32', 1);\n this.initDynamicPropertyContainer(container);\n var i;\n var len = data.length || 0;\n var prop;\n\n for (i = 0; i < len; i += 1) {\n prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);\n this.k = prop.k || this.k;\n this.dataProps[i] = {\n n: data[i].n,\n p: prop\n };\n }\n\n if (!this.k) {\n this.getValue(true);\n }\n\n this._isAnimated = this.k;\n }\n\n DashProperty.prototype.getValue = function (forceRender) {\n if (this.elem.globalData.frameId === this.frameId && !forceRender) {\n return;\n }\n\n this.frameId = this.elem.globalData.frameId;\n this.iterateDynamicProperties();\n this._mdf = this._mdf || forceRender;\n\n if (this._mdf) {\n var i = 0;\n var len = this.dataProps.length;\n\n if (this.renderer === 'svg') {\n this.dashStr = '';\n }\n\n for (i = 0; i < len; i += 1) {\n if (this.dataProps[i].n !== 'o') {\n if (this.renderer === 'svg') {\n this.dashStr += ' ' + this.dataProps[i].p.v;\n } else {\n this.dashArray[i] = this.dataProps[i].p.v;\n }\n } else {\n this.dashoffset[0] = this.dataProps[i].p.v;\n }\n }\n }\n };\n\n extendPrototype([DynamicPropertyContainer], DashProperty);\n\n function SVGStrokeStyleData(elem, data, styleOb) {\n this.initDynamicPropertyContainer(elem);\n this.getValue = this.iterateDynamicProperties;\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\n this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);\n this.d = new DashProperty(elem, data.d || {}, 'svg', this);\n this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);\n this.style = styleOb;\n this._isAnimated = !!this._isAnimated;\n }\n\n extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);\n\n function SVGFillStyleData(elem, data, styleOb) {\n this.initDynamicPropertyContainer(elem);\n this.getValue = this.iterateDynamicProperties;\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\n this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);\n this.style = styleOb;\n }\n\n extendPrototype([DynamicPropertyContainer], SVGFillStyleData);\n\n function SVGNoStyleData(elem, data, styleOb) {\n this.initDynamicPropertyContainer(elem);\n this.getValue = this.iterateDynamicProperties;\n this.style = styleOb;\n }\n\n extendPrototype([DynamicPropertyContainer], SVGNoStyleData);\n\n function GradientProperty(elem, data, container) {\n this.data = data;\n this.c = createTypedArray('uint8c', data.p * 4);\n var cLength = data.k.k[0].s ? data.k.k[0].s.length - data.p * 4 : data.k.k.length - data.p * 4;\n this.o = createTypedArray('float32', cLength);\n this._cmdf = false;\n this._omdf = false;\n this._collapsable = this.checkCollapsable();\n this._hasOpacity = cLength;\n this.initDynamicPropertyContainer(container);\n this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);\n this.k = this.prop.k;\n this.getValue(true);\n }\n\n GradientProperty.prototype.comparePoints = function (values, points) {\n var i = 0;\n var len = this.o.length / 2;\n var diff;\n\n while (i < len) {\n diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);\n\n if (diff > 0.01) {\n return false;\n }\n\n i += 1;\n }\n\n return true;\n };\n\n GradientProperty.prototype.checkCollapsable = function () {\n if (this.o.length / 2 !== this.c.length / 4) {\n return false;\n }\n\n if (this.data.k.k[0].s) {\n var i = 0;\n var len = this.data.k.k.length;\n\n while (i < len) {\n if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {\n return false;\n }\n\n i += 1;\n }\n } else if (!this.comparePoints(this.data.k.k, this.data.p)) {\n return false;\n }\n\n return true;\n };\n\n GradientProperty.prototype.getValue = function (forceRender) {\n this.prop.getValue();\n this._mdf = false;\n this._cmdf = false;\n this._omdf = false;\n\n if (this.prop._mdf || forceRender) {\n var i;\n var len = this.data.p * 4;\n var mult;\n var val;\n\n for (i = 0; i < len; i += 1) {\n mult = i % 4 === 0 ? 100 : 255;\n val = Math.round(this.prop.v[i] * mult);\n\n if (this.c[i] !== val) {\n this.c[i] = val;\n this._cmdf = !forceRender;\n }\n }\n\n if (this.o.length) {\n len = this.prop.v.length;\n\n for (i = this.data.p * 4; i < len; i += 1) {\n mult = i % 2 === 0 ? 100 : 1;\n val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];\n\n if (this.o[i - this.data.p * 4] !== val) {\n this.o[i - this.data.p * 4] = val;\n this._omdf = !forceRender;\n }\n }\n }\n\n this._mdf = !forceRender;\n }\n };\n\n extendPrototype([DynamicPropertyContainer], GradientProperty);\n\n function SVGGradientFillStyleData(elem, data, styleOb) {\n this.initDynamicPropertyContainer(elem);\n this.getValue = this.iterateDynamicProperties;\n this.initGradientData(elem, data, styleOb);\n }\n\n SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\n this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);\n this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);\n this.h = PropertyFactory.getProp(elem, data.h || {\n k: 0\n }, 0, 0.01, this);\n this.a = PropertyFactory.getProp(elem, data.a || {\n k: 0\n }, 0, degToRads, this);\n this.g = new GradientProperty(elem, data.g, this);\n this.style = styleOb;\n this.stops = [];\n this.setGradientData(styleOb.pElem, data);\n this.setGradientOpacity(data, styleOb);\n this._isAnimated = !!this._isAnimated;\n };\n\n SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {\n var gradientId = createElementID();\n var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');\n gfill.setAttribute('id', gradientId);\n gfill.setAttribute('spreadMethod', 'pad');\n gfill.setAttribute('gradientUnits', 'userSpaceOnUse');\n var stops = [];\n var stop;\n var j;\n var jLen;\n jLen = data.g.p * 4;\n\n for (j = 0; j < jLen; j += 4) {\n stop = createNS('stop');\n gfill.appendChild(stop);\n stops.push(stop);\n }\n\n pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + gradientId + ')');\n this.gf = gfill;\n this.cst = stops;\n };\n\n SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {\n if (this.g._hasOpacity && !this.g._collapsable) {\n var stop;\n var j;\n var jLen;\n var mask = createNS('mask');\n var maskElement = createNS('path');\n mask.appendChild(maskElement);\n var opacityId = createElementID();\n var maskId = createElementID();\n mask.setAttribute('id', maskId);\n var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');\n opFill.setAttribute('id', opacityId);\n opFill.setAttribute('spreadMethod', 'pad');\n opFill.setAttribute('gradientUnits', 'userSpaceOnUse');\n jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;\n var stops = this.stops;\n\n for (j = data.g.p * 4; j < jLen; j += 2) {\n stop = createNS('stop');\n stop.setAttribute('stop-color', 'rgb(255,255,255)');\n opFill.appendChild(stop);\n stops.push(stop);\n }\n\n maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + opacityId + ')');\n\n if (data.ty === 'gs') {\n maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);\n maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);\n\n if (data.lj === 1) {\n maskElement.setAttribute('stroke-miterlimit', data.ml);\n }\n }\n\n this.of = opFill;\n this.ms = mask;\n this.ost = stops;\n this.maskId = maskId;\n styleOb.msElem = maskElement;\n }\n };\n\n extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);\n\n function SVGGradientStrokeStyleData(elem, data, styleOb) {\n this.initDynamicPropertyContainer(elem);\n this.getValue = this.iterateDynamicProperties;\n this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);\n this.d = new DashProperty(elem, data.d || {}, 'svg', this);\n this.initGradientData(elem, data, styleOb);\n this._isAnimated = !!this._isAnimated;\n }\n\n extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);\n\n function ShapeGroupData() {\n this.it = [];\n this.prevViewData = [];\n this.gr = createNS('g');\n }\n\n function SVGTransformData(mProps, op, container) {\n this.transform = {\n mProps: mProps,\n op: op,\n container: container\n };\n this.elements = [];\n this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;\n }\n\n var buildShapeString = function buildShapeString(pathNodes, length, closed, mat) {\n if (length === 0) {\n return '';\n }\n\n var _o = pathNodes.o;\n var _i = pathNodes.i;\n var _v = pathNodes.v;\n var i;\n var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);\n\n for (i = 1; i < length; i += 1) {\n shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[i][0], _i[i][1]) + ' ' + mat.applyToPointStringified(_v[i][0], _v[i][1]);\n }\n\n if (closed && length) {\n shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[0][0], _i[0][1]) + ' ' + mat.applyToPointStringified(_v[0][0], _v[0][1]);\n shapeString += 'z';\n }\n\n return shapeString;\n };\n\n var SVGElementsRenderer = function () {\n var _identityMatrix = new Matrix();\n\n var _matrixHelper = new Matrix();\n\n var ob = {\n createRenderFunction: createRenderFunction\n };\n\n function createRenderFunction(data) {\n switch (data.ty) {\n case 'fl':\n return renderFill;\n\n case 'gf':\n return renderGradient;\n\n case 'gs':\n return renderGradientStroke;\n\n case 'st':\n return renderStroke;\n\n case 'sh':\n case 'el':\n case 'rc':\n case 'sr':\n return renderPath;\n\n case 'tr':\n return renderContentTransform;\n\n case 'no':\n return renderNoop;\n\n default:\n return null;\n }\n }\n\n function renderContentTransform(styleData, itemData, isFirstFrame) {\n if (isFirstFrame || itemData.transform.op._mdf) {\n itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);\n }\n\n if (isFirstFrame || itemData.transform.mProps._mdf) {\n itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());\n }\n }\n\n function renderNoop() {}\n\n function renderPath(styleData, itemData, isFirstFrame) {\n var j;\n var jLen;\n var pathStringTransformed;\n var redraw;\n var pathNodes;\n var l;\n var lLen = itemData.styles.length;\n var lvl = itemData.lvl;\n var paths;\n var mat;\n var iterations;\n var k;\n\n for (l = 0; l < lLen; l += 1) {\n redraw = itemData.sh._mdf || isFirstFrame;\n\n if (itemData.styles[l].lvl < lvl) {\n mat = _matrixHelper.reset();\n iterations = lvl - itemData.styles[l].lvl;\n k = itemData.transformers.length - 1;\n\n while (!redraw && iterations > 0) {\n redraw = itemData.transformers[k].mProps._mdf || redraw;\n iterations -= 1;\n k -= 1;\n }\n\n if (redraw) {\n iterations = lvl - itemData.styles[l].lvl;\n k = itemData.transformers.length - 1;\n\n while (iterations > 0) {\n mat.multiply(itemData.transformers[k].mProps.v);\n iterations -= 1;\n k -= 1;\n }\n }\n } else {\n mat = _identityMatrix;\n }\n\n paths = itemData.sh.paths;\n jLen = paths._length;\n\n if (redraw) {\n pathStringTransformed = '';\n\n for (j = 0; j < jLen; j += 1) {\n pathNodes = paths.shapes[j];\n\n if (pathNodes && pathNodes._length) {\n pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);\n }\n }\n\n itemData.caches[l] = pathStringTransformed;\n } else {\n pathStringTransformed = itemData.caches[l];\n }\n\n itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;\n itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;\n }\n }\n\n function renderFill(styleData, itemData, isFirstFrame) {\n var styleElem = itemData.style;\n\n if (itemData.c._mdf || isFirstFrame) {\n styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');\n }\n\n if (itemData.o._mdf || isFirstFrame) {\n styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);\n }\n }\n\n function renderGradientStroke(styleData, itemData, isFirstFrame) {\n renderGradient(styleData, itemData, isFirstFrame);\n renderStroke(styleData, itemData, isFirstFrame);\n }\n\n function renderGradient(styleData, itemData, isFirstFrame) {\n var gfill = itemData.gf;\n var hasOpacity = itemData.g._hasOpacity;\n var pt1 = itemData.s.v;\n var pt2 = itemData.e.v;\n\n if (itemData.o._mdf || isFirstFrame) {\n var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';\n itemData.style.pElem.setAttribute(attr, itemData.o.v);\n }\n\n if (itemData.s._mdf || isFirstFrame) {\n var attr1 = styleData.t === 1 ? 'x1' : 'cx';\n var attr2 = attr1 === 'x1' ? 'y1' : 'cy';\n gfill.setAttribute(attr1, pt1[0]);\n gfill.setAttribute(attr2, pt1[1]);\n\n if (hasOpacity && !itemData.g._collapsable) {\n itemData.of.setAttribute(attr1, pt1[0]);\n itemData.of.setAttribute(attr2, pt1[1]);\n }\n }\n\n var stops;\n var i;\n var len;\n var stop;\n\n if (itemData.g._cmdf || isFirstFrame) {\n stops = itemData.cst;\n var cValues = itemData.g.c;\n len = stops.length;\n\n for (i = 0; i < len; i += 1) {\n stop = stops[i];\n stop.setAttribute('offset', cValues[i * 4] + '%');\n stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');\n }\n }\n\n if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {\n var oValues = itemData.g.o;\n\n if (itemData.g._collapsable) {\n stops = itemData.cst;\n } else {\n stops = itemData.ost;\n }\n\n len = stops.length;\n\n for (i = 0; i < len; i += 1) {\n stop = stops[i];\n\n if (!itemData.g._collapsable) {\n stop.setAttribute('offset', oValues[i * 2] + '%');\n }\n\n stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);\n }\n }\n\n if (styleData.t === 1) {\n if (itemData.e._mdf || isFirstFrame) {\n gfill.setAttribute('x2', pt2[0]);\n gfill.setAttribute('y2', pt2[1]);\n\n if (hasOpacity && !itemData.g._collapsable) {\n itemData.of.setAttribute('x2', pt2[0]);\n itemData.of.setAttribute('y2', pt2[1]);\n }\n }\n } else {\n var rad;\n\n if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {\n rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\n gfill.setAttribute('r', rad);\n\n if (hasOpacity && !itemData.g._collapsable) {\n itemData.of.setAttribute('r', rad);\n }\n }\n\n if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {\n if (!rad) {\n rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\n }\n\n var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);\n var percent = itemData.h.v;\n\n if (percent >= 1) {\n percent = 0.99;\n } else if (percent <= -1) {\n percent = -0.99;\n }\n\n var dist = rad * percent;\n var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];\n var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];\n gfill.setAttribute('fx', x);\n gfill.setAttribute('fy', y);\n\n if (hasOpacity && !itemData.g._collapsable) {\n itemData.of.setAttribute('fx', x);\n itemData.of.setAttribute('fy', y);\n }\n } // gfill.setAttribute('fy','200');\n\n }\n }\n\n function renderStroke(styleData, itemData, isFirstFrame) {\n var styleElem = itemData.style;\n var d = itemData.d;\n\n if (d && (d._mdf || isFirstFrame) && d.dashStr) {\n styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);\n styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);\n }\n\n if (itemData.c && (itemData.c._mdf || isFirstFrame)) {\n styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');\n }\n\n if (itemData.o._mdf || isFirstFrame) {\n styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);\n }\n\n if (itemData.w._mdf || isFirstFrame) {\n styleElem.pElem.setAttribute('stroke-width', itemData.w.v);\n\n if (styleElem.msElem) {\n styleElem.msElem.setAttribute('stroke-width', itemData.w.v);\n }\n }\n }\n\n return ob;\n }();\n\n function SVGShapeElement(data, globalData, comp) {\n // List of drawable elements\n this.shapes = []; // Full shape data\n\n this.shapesData = data.shapes; // List of styles that will be applied to shapes\n\n this.stylesList = []; // List of modifiers that will be applied to shapes\n\n this.shapeModifiers = []; // List of items in shape tree\n\n this.itemsData = []; // List of items in previous shape tree\n\n this.processedElements = []; // List of animated components\n\n this.animatedContents = [];\n this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\n // List of elements that have been created\n\n this.prevViewData = []; // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\n }\n\n extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);\n\n SVGShapeElement.prototype.initSecondaryElement = function () {};\n\n SVGShapeElement.prototype.identityMatrix = new Matrix();\n\n SVGShapeElement.prototype.buildExpressionInterface = function () {};\n\n SVGShapeElement.prototype.createContent = function () {\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);\n this.filterUniqueShapes();\n };\n /*\r\n This method searches for multiple shapes that affect a single element and one of them is animated\r\n */\n\n\n SVGShapeElement.prototype.filterUniqueShapes = function () {\n var i;\n var len = this.shapes.length;\n var shape;\n var j;\n var jLen = this.stylesList.length;\n var style;\n var tempShapes = [];\n var areAnimated = false;\n\n for (j = 0; j < jLen; j += 1) {\n style = this.stylesList[j];\n areAnimated = false;\n tempShapes.length = 0;\n\n for (i = 0; i < len; i += 1) {\n shape = this.shapes[i];\n\n if (shape.styles.indexOf(style) !== -1) {\n tempShapes.push(shape);\n areAnimated = shape._isAnimated || areAnimated;\n }\n }\n\n if (tempShapes.length > 1 && areAnimated) {\n this.setShapesAsAnimated(tempShapes);\n }\n }\n };\n\n SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {\n var i;\n var len = shapes.length;\n\n for (i = 0; i < len; i += 1) {\n shapes[i].setAsAnimated();\n }\n };\n\n SVGShapeElement.prototype.createStyleElement = function (data, level) {\n // TODO: prevent drawing of hidden styles\n var elementData;\n var styleOb = new SVGStyleData(data, level);\n var pathElement = styleOb.pElem;\n\n if (data.ty === 'st') {\n elementData = new SVGStrokeStyleData(this, data, styleOb);\n } else if (data.ty === 'fl') {\n elementData = new SVGFillStyleData(this, data, styleOb);\n } else if (data.ty === 'gf' || data.ty === 'gs') {\n var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;\n elementData = new GradientConstructor(this, data, styleOb);\n this.globalData.defs.appendChild(elementData.gf);\n\n if (elementData.maskId) {\n this.globalData.defs.appendChild(elementData.ms);\n this.globalData.defs.appendChild(elementData.of);\n pathElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + elementData.maskId + ')');\n }\n } else if (data.ty === 'no') {\n elementData = new SVGNoStyleData(this, data, styleOb);\n }\n\n if (data.ty === 'st' || data.ty === 'gs') {\n pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);\n pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);\n pathElement.setAttribute('fill-opacity', '0');\n\n if (data.lj === 1) {\n pathElement.setAttribute('stroke-miterlimit', data.ml);\n }\n }\n\n if (data.r === 2) {\n pathElement.setAttribute('fill-rule', 'evenodd');\n }\n\n if (data.ln) {\n pathElement.setAttribute('id', data.ln);\n }\n\n if (data.cl) {\n pathElement.setAttribute('class', data.cl);\n }\n\n if (data.bm) {\n pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);\n }\n\n this.stylesList.push(styleOb);\n this.addToAnimatedContents(data, elementData);\n return elementData;\n };\n\n SVGShapeElement.prototype.createGroupElement = function (data) {\n var elementData = new ShapeGroupData();\n\n if (data.ln) {\n elementData.gr.setAttribute('id', data.ln);\n }\n\n if (data.cl) {\n elementData.gr.setAttribute('class', data.cl);\n }\n\n if (data.bm) {\n elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);\n }\n\n return elementData;\n };\n\n SVGShapeElement.prototype.createTransformElement = function (data, container) {\n var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);\n var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);\n this.addToAnimatedContents(data, elementData);\n return elementData;\n };\n\n SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {\n var ty = 4;\n\n if (data.ty === 'rc') {\n ty = 5;\n } else if (data.ty === 'el') {\n ty = 6;\n } else if (data.ty === 'sr') {\n ty = 7;\n }\n\n var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);\n var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);\n this.shapes.push(elementData);\n this.addShapeToModifiers(elementData);\n this.addToAnimatedContents(data, elementData);\n return elementData;\n };\n\n SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {\n var i = 0;\n var len = this.animatedContents.length;\n\n while (i < len) {\n if (this.animatedContents[i].element === element) {\n return;\n }\n\n i += 1;\n }\n\n this.animatedContents.push({\n fn: SVGElementsRenderer.createRenderFunction(data),\n element: element,\n data: data\n });\n };\n\n SVGShapeElement.prototype.setElementStyles = function (elementData) {\n var arr = elementData.styles;\n var j;\n var jLen = this.stylesList.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (!this.stylesList[j].closed) {\n arr.push(this.stylesList[j]);\n }\n }\n };\n\n SVGShapeElement.prototype.reloadShapes = function () {\n this._isFirstFrame = true;\n var i;\n var len = this.itemsData.length;\n\n for (i = 0; i < len; i += 1) {\n this.prevViewData[i] = this.itemsData[i];\n }\n\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);\n this.filterUniqueShapes();\n len = this.dynamicProperties.length;\n\n for (i = 0; i < len; i += 1) {\n this.dynamicProperties[i].getValue();\n }\n\n this.renderModifiers();\n };\n\n SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {\n var ownTransformers = [].concat(transformers);\n var i;\n var len = arr.length - 1;\n var j;\n var jLen;\n var ownStyles = [];\n var ownModifiers = [];\n var currentTransform;\n var modifier;\n var processedPos;\n\n for (i = len; i >= 0; i -= 1) {\n processedPos = this.searchProcessedElement(arr[i]);\n\n if (!processedPos) {\n arr[i]._render = render;\n } else {\n itemsData[i] = prevViewData[processedPos - 1];\n }\n\n if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs' || arr[i].ty === 'no') {\n if (!processedPos) {\n itemsData[i] = this.createStyleElement(arr[i], level);\n } else {\n itemsData[i].style.closed = false;\n }\n\n if (arr[i]._render) {\n if (itemsData[i].style.pElem.parentNode !== container) {\n container.appendChild(itemsData[i].style.pElem);\n }\n }\n\n ownStyles.push(itemsData[i].style);\n } else if (arr[i].ty === 'gr') {\n if (!processedPos) {\n itemsData[i] = this.createGroupElement(arr[i]);\n } else {\n jLen = itemsData[i].it.length;\n\n for (j = 0; j < jLen; j += 1) {\n itemsData[i].prevViewData[j] = itemsData[i].it[j];\n }\n }\n\n this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);\n\n if (arr[i]._render) {\n if (itemsData[i].gr.parentNode !== container) {\n container.appendChild(itemsData[i].gr);\n }\n }\n } else if (arr[i].ty === 'tr') {\n if (!processedPos) {\n itemsData[i] = this.createTransformElement(arr[i], container);\n }\n\n currentTransform = itemsData[i].transform;\n ownTransformers.push(currentTransform);\n } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {\n if (!processedPos) {\n itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);\n }\n\n this.setElementStyles(itemsData[i]);\n } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb' || arr[i].ty === 'zz' || arr[i].ty === 'op') {\n if (!processedPos) {\n modifier = ShapeModifiers.getModifier(arr[i].ty);\n modifier.init(this, arr[i]);\n itemsData[i] = modifier;\n this.shapeModifiers.push(modifier);\n } else {\n modifier = itemsData[i];\n modifier.closed = false;\n }\n\n ownModifiers.push(modifier);\n } else if (arr[i].ty === 'rp') {\n if (!processedPos) {\n modifier = ShapeModifiers.getModifier(arr[i].ty);\n itemsData[i] = modifier;\n modifier.init(this, arr, i, itemsData);\n this.shapeModifiers.push(modifier);\n render = false;\n } else {\n modifier = itemsData[i];\n modifier.closed = true;\n }\n\n ownModifiers.push(modifier);\n }\n\n this.addProcessedElement(arr[i], i + 1);\n }\n\n len = ownStyles.length;\n\n for (i = 0; i < len; i += 1) {\n ownStyles[i].closed = true;\n }\n\n len = ownModifiers.length;\n\n for (i = 0; i < len; i += 1) {\n ownModifiers[i].closed = true;\n }\n };\n\n SVGShapeElement.prototype.renderInnerContent = function () {\n this.renderModifiers();\n var i;\n var len = this.stylesList.length;\n\n for (i = 0; i < len; i += 1) {\n this.stylesList[i].reset();\n }\n\n this.renderShape();\n\n for (i = 0; i < len; i += 1) {\n if (this.stylesList[i]._mdf || this._isFirstFrame) {\n if (this.stylesList[i].msElem) {\n this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d); // Adding M0 0 fixes same mask bug on all browsers\n\n this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;\n }\n\n this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');\n }\n }\n };\n\n SVGShapeElement.prototype.renderShape = function () {\n var i;\n var len = this.animatedContents.length;\n var animatedContent;\n\n for (i = 0; i < len; i += 1) {\n animatedContent = this.animatedContents[i];\n\n if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {\n animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);\n }\n }\n };\n\n SVGShapeElement.prototype.destroy = function () {\n this.destroyBaseElement();\n this.shapesData = null;\n this.itemsData = null;\n };\n\n function LetterProps(o, sw, sc, fc, m, p) {\n this.o = o;\n this.sw = sw;\n this.sc = sc;\n this.fc = fc;\n this.m = m;\n this.p = p;\n this._mdf = {\n o: true,\n sw: !!sw,\n sc: !!sc,\n fc: !!fc,\n m: true,\n p: true\n };\n }\n\n LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {\n this._mdf.o = false;\n this._mdf.sw = false;\n this._mdf.sc = false;\n this._mdf.fc = false;\n this._mdf.m = false;\n this._mdf.p = false;\n var updated = false;\n\n if (this.o !== o) {\n this.o = o;\n this._mdf.o = true;\n updated = true;\n }\n\n if (this.sw !== sw) {\n this.sw = sw;\n this._mdf.sw = true;\n updated = true;\n }\n\n if (this.sc !== sc) {\n this.sc = sc;\n this._mdf.sc = true;\n updated = true;\n }\n\n if (this.fc !== fc) {\n this.fc = fc;\n this._mdf.fc = true;\n updated = true;\n }\n\n if (this.m !== m) {\n this.m = m;\n this._mdf.m = true;\n updated = true;\n }\n\n if (p.length && (this.p[0] !== p[0] || this.p[1] !== p[1] || this.p[4] !== p[4] || this.p[5] !== p[5] || this.p[12] !== p[12] || this.p[13] !== p[13])) {\n this.p = p;\n this._mdf.p = true;\n updated = true;\n }\n\n return updated;\n };\n\n function TextProperty(elem, data) {\n this._frameId = initialDefaultFrame;\n this.pv = '';\n this.v = '';\n this.kf = false;\n this._isFirstFrame = true;\n this._mdf = false;\n\n if (data.d && data.d.sid) {\n data.d = elem.globalData.slotManager.getProp(data.d);\n }\n\n this.data = data;\n this.elem = elem;\n this.comp = this.elem.comp;\n this.keysIndex = 0;\n this.canResize = false;\n this.minimumFontSize = 1;\n this.effectsSequence = [];\n this.currentData = {\n ascent: 0,\n boxWidth: this.defaultBoxWidth,\n f: '',\n fStyle: '',\n fWeight: '',\n fc: '',\n j: '',\n justifyOffset: '',\n l: [],\n lh: 0,\n lineWidths: [],\n ls: '',\n of: '',\n s: '',\n sc: '',\n sw: 0,\n t: 0,\n tr: 0,\n sz: 0,\n ps: null,\n fillColorAnim: false,\n strokeColorAnim: false,\n strokeWidthAnim: false,\n yOffset: 0,\n finalSize: 0,\n finalText: [],\n finalLineHeight: 0,\n __complete: false\n };\n this.copyData(this.currentData, this.data.d.k[0].s);\n\n if (!this.searchProperty()) {\n this.completeTextData(this.currentData);\n }\n }\n\n TextProperty.prototype.defaultBoxWidth = [0, 0];\n\n TextProperty.prototype.copyData = function (obj, data) {\n for (var s in data) {\n if (Object.prototype.hasOwnProperty.call(data, s)) {\n obj[s] = data[s];\n }\n }\n\n return obj;\n };\n\n TextProperty.prototype.setCurrentData = function (data) {\n if (!data.__complete) {\n this.completeTextData(data);\n }\n\n this.currentData = data;\n this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;\n this._mdf = true;\n };\n\n TextProperty.prototype.searchProperty = function () {\n return this.searchKeyframes();\n };\n\n TextProperty.prototype.searchKeyframes = function () {\n this.kf = this.data.d.k.length > 1;\n\n if (this.kf) {\n this.addEffect(this.getKeyframeValue.bind(this));\n }\n\n return this.kf;\n };\n\n TextProperty.prototype.addEffect = function (effectFunction) {\n this.effectsSequence.push(effectFunction);\n this.elem.addDynamicProperty(this);\n };\n\n TextProperty.prototype.getValue = function (_finalValue) {\n if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {\n return;\n }\n\n this.currentData.t = this.data.d.k[this.keysIndex].s.t;\n var currentValue = this.currentData;\n var currentIndex = this.keysIndex;\n\n if (this.lock) {\n this.setCurrentData(this.currentData);\n return;\n }\n\n this.lock = true;\n this._mdf = false;\n var i;\n var len = this.effectsSequence.length;\n var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;\n\n for (i = 0; i < len; i += 1) {\n // Checking if index changed to prevent creating a new object every time the expression updates.\n if (currentIndex !== this.keysIndex) {\n finalValue = this.effectsSequence[i](finalValue, finalValue.t);\n } else {\n finalValue = this.effectsSequence[i](this.currentData, finalValue.t);\n }\n }\n\n if (currentValue !== finalValue) {\n this.setCurrentData(finalValue);\n }\n\n this.v = this.currentData;\n this.pv = this.v;\n this.lock = false;\n this.frameId = this.elem.globalData.frameId;\n };\n\n TextProperty.prototype.getKeyframeValue = function () {\n var textKeys = this.data.d.k;\n var frameNum = this.elem.comp.renderedFrame;\n var i = 0;\n var len = textKeys.length;\n\n while (i <= len - 1) {\n if (i === len - 1 || textKeys[i + 1].t > frameNum) {\n break;\n }\n\n i += 1;\n }\n\n if (this.keysIndex !== i) {\n this.keysIndex = i;\n }\n\n return this.data.d.k[this.keysIndex].s;\n };\n\n TextProperty.prototype.buildFinalText = function (text) {\n var charactersArray = [];\n var i = 0;\n var len = text.length;\n var charCode;\n var secondCharCode;\n var shouldCombine = false;\n var shouldCombineNext = false;\n var currentChars = '';\n\n while (i < len) {\n shouldCombine = shouldCombineNext;\n shouldCombineNext = false;\n charCode = text.charCodeAt(i);\n currentChars = text.charAt(i);\n\n if (FontManager.isCombinedCharacter(charCode)) {\n shouldCombine = true; // It's a potential surrogate pair (this is the High surrogate)\n } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n if (FontManager.isRegionalFlag(text, i)) {\n currentChars = text.substr(i, 14);\n } else {\n secondCharCode = text.charCodeAt(i + 1); // It's a surrogate pair (this is the Low surrogate)\n\n if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {\n if (FontManager.isModifier(charCode, secondCharCode)) {\n currentChars = text.substr(i, 2);\n shouldCombine = true;\n } else if (FontManager.isFlagEmoji(text.substr(i, 4))) {\n currentChars = text.substr(i, 4);\n } else {\n currentChars = text.substr(i, 2);\n }\n }\n }\n } else if (charCode > 0xDBFF) {\n secondCharCode = text.charCodeAt(i + 1);\n\n if (FontManager.isVariationSelector(charCode)) {\n shouldCombine = true;\n }\n } else if (FontManager.isZeroWidthJoiner(charCode)) {\n shouldCombine = true;\n shouldCombineNext = true;\n }\n\n if (shouldCombine) {\n charactersArray[charactersArray.length - 1] += currentChars;\n shouldCombine = false;\n } else {\n charactersArray.push(currentChars);\n }\n\n i += currentChars.length;\n }\n\n return charactersArray;\n };\n\n TextProperty.prototype.completeTextData = function (documentData) {\n documentData.__complete = true;\n var fontManager = this.elem.globalData.fontManager;\n var data = this.data;\n var letters = [];\n var i;\n var len;\n var newLineFlag;\n var index = 0;\n var val;\n var anchorGrouping = data.m.g;\n var currentSize = 0;\n var currentPos = 0;\n var currentLine = 0;\n var lineWidths = [];\n var lineWidth = 0;\n var maxLineWidth = 0;\n var j;\n var jLen;\n var fontData = fontManager.getFontByName(documentData.f);\n var charData;\n var cLength = 0;\n var fontProps = getFontProperties(fontData);\n documentData.fWeight = fontProps.weight;\n documentData.fStyle = fontProps.style;\n documentData.finalSize = documentData.s;\n documentData.finalText = this.buildFinalText(documentData.t);\n len = documentData.finalText.length;\n documentData.finalLineHeight = documentData.lh;\n var trackingOffset = documentData.tr / 1000 * documentData.finalSize;\n var charCode;\n\n if (documentData.sz) {\n var flag = true;\n var boxWidth = documentData.sz[0];\n var boxHeight = documentData.sz[1];\n var currentHeight;\n var finalText;\n\n while (flag) {\n finalText = this.buildFinalText(documentData.t);\n currentHeight = 0;\n lineWidth = 0;\n len = finalText.length;\n trackingOffset = documentData.tr / 1000 * documentData.finalSize;\n var lastSpaceIndex = -1;\n\n for (i = 0; i < len; i += 1) {\n charCode = finalText[i].charCodeAt(0);\n newLineFlag = false;\n\n if (finalText[i] === ' ') {\n lastSpaceIndex = i;\n } else if (charCode === 13 || charCode === 3) {\n lineWidth = 0;\n newLineFlag = true;\n currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;\n }\n\n if (fontManager.chars) {\n charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);\n cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;\n } else {\n // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;\n cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);\n }\n\n if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {\n if (lastSpaceIndex === -1) {\n len += 1;\n } else {\n i = lastSpaceIndex;\n }\n\n currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;\n finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\\r'); // finalText = finalText.substr(0,i) + \"\\r\" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);\n\n lastSpaceIndex = -1;\n lineWidth = 0;\n } else {\n lineWidth += cLength;\n lineWidth += trackingOffset;\n }\n }\n\n currentHeight += fontData.ascent * documentData.finalSize / 100;\n\n if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {\n documentData.finalSize -= 1;\n documentData.finalLineHeight = documentData.finalSize * documentData.lh / documentData.s;\n } else {\n documentData.finalText = finalText;\n len = documentData.finalText.length;\n flag = false;\n }\n }\n }\n\n lineWidth = -trackingOffset;\n cLength = 0;\n var uncollapsedSpaces = 0;\n var currentChar;\n\n for (i = 0; i < len; i += 1) {\n newLineFlag = false;\n currentChar = documentData.finalText[i];\n charCode = currentChar.charCodeAt(0);\n\n if (charCode === 13 || charCode === 3) {\n uncollapsedSpaces = 0;\n lineWidths.push(lineWidth);\n maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;\n lineWidth = -2 * trackingOffset;\n val = '';\n newLineFlag = true;\n currentLine += 1;\n } else {\n val = currentChar;\n }\n\n if (fontManager.chars) {\n charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);\n cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;\n } else {\n // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);\n // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;\n cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);\n } //\n\n\n if (currentChar === ' ') {\n uncollapsedSpaces += cLength + trackingOffset;\n } else {\n lineWidth += cLength + trackingOffset + uncollapsedSpaces;\n uncollapsedSpaces = 0;\n }\n\n letters.push({\n l: cLength,\n an: cLength,\n add: currentSize,\n n: newLineFlag,\n anIndexes: [],\n val: val,\n line: currentLine,\n animatorJustifyOffset: 0\n });\n\n if (anchorGrouping == 2) {\n // eslint-disable-line eqeqeq\n currentSize += cLength;\n\n if (val === '' || val === ' ' || i === len - 1) {\n if (val === '' || val === ' ') {\n currentSize -= cLength;\n }\n\n while (currentPos <= i) {\n letters[currentPos].an = currentSize;\n letters[currentPos].ind = index;\n letters[currentPos].extra = cLength;\n currentPos += 1;\n }\n\n index += 1;\n currentSize = 0;\n }\n } else if (anchorGrouping == 3) {\n // eslint-disable-line eqeqeq\n currentSize += cLength;\n\n if (val === '' || i === len - 1) {\n if (val === '') {\n currentSize -= cLength;\n }\n\n while (currentPos <= i) {\n letters[currentPos].an = currentSize;\n letters[currentPos].ind = index;\n letters[currentPos].extra = cLength;\n currentPos += 1;\n }\n\n currentSize = 0;\n index += 1;\n }\n } else {\n letters[index].ind = index;\n letters[index].extra = 0;\n index += 1;\n }\n }\n\n documentData.l = letters;\n maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;\n lineWidths.push(lineWidth);\n\n if (documentData.sz) {\n documentData.boxWidth = documentData.sz[0];\n documentData.justifyOffset = 0;\n } else {\n documentData.boxWidth = maxLineWidth;\n\n switch (documentData.j) {\n case 1:\n documentData.justifyOffset = -documentData.boxWidth;\n break;\n\n case 2:\n documentData.justifyOffset = -documentData.boxWidth / 2;\n break;\n\n default:\n documentData.justifyOffset = 0;\n }\n }\n\n documentData.lineWidths = lineWidths;\n var animators = data.a;\n var animatorData;\n var letterData;\n jLen = animators.length;\n var based;\n var ind;\n var indexes = [];\n\n for (j = 0; j < jLen; j += 1) {\n animatorData = animators[j];\n\n if (animatorData.a.sc) {\n documentData.strokeColorAnim = true;\n }\n\n if (animatorData.a.sw) {\n documentData.strokeWidthAnim = true;\n }\n\n if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {\n documentData.fillColorAnim = true;\n }\n\n ind = 0;\n based = animatorData.s.b;\n\n for (i = 0; i < len; i += 1) {\n letterData = letters[i];\n letterData.anIndexes[j] = ind;\n\n if (based == 1 && letterData.val !== '' || based == 2 && letterData.val !== '' && letterData.val !== ' ' || based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1) || based == 4 && (letterData.n || i == len - 1)) {\n // eslint-disable-line eqeqeq\n if (animatorData.s.rn === 1) {\n indexes.push(ind);\n }\n\n ind += 1;\n }\n }\n\n data.a[j].s.totalChars = ind;\n var currentInd = -1;\n var newInd;\n\n if (animatorData.s.rn === 1) {\n for (i = 0; i < len; i += 1) {\n letterData = letters[i];\n\n if (currentInd != letterData.anIndexes[j]) {\n // eslint-disable-line eqeqeq\n currentInd = letterData.anIndexes[j];\n newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];\n }\n\n letterData.anIndexes[j] = newInd;\n }\n }\n }\n\n documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;\n documentData.ls = documentData.ls || 0;\n documentData.ascent = fontData.ascent * documentData.finalSize / 100;\n };\n\n TextProperty.prototype.updateDocumentData = function (newData, index) {\n index = index === undefined ? this.keysIndex : index;\n var dData = this.copyData({}, this.data.d.k[index].s);\n dData = this.copyData(dData, newData);\n this.data.d.k[index].s = dData;\n this.recalculate(index);\n this.setCurrentData(dData);\n this.elem.addDynamicProperty(this);\n };\n\n TextProperty.prototype.recalculate = function (index) {\n var dData = this.data.d.k[index].s;\n dData.__complete = false;\n this.keysIndex = 0;\n this._isFirstFrame = true;\n this.getValue(dData);\n };\n\n TextProperty.prototype.canResizeFont = function (_canResize) {\n this.canResize = _canResize;\n this.recalculate(this.keysIndex);\n this.elem.addDynamicProperty(this);\n };\n\n TextProperty.prototype.setMinimumFontSize = function (_fontValue) {\n this.minimumFontSize = Math.floor(_fontValue) || 1;\n this.recalculate(this.keysIndex);\n this.elem.addDynamicProperty(this);\n };\n\n var TextSelectorProp = function () {\n var max = Math.max;\n var min = Math.min;\n var floor = Math.floor;\n\n function TextSelectorPropFactory(elem, data) {\n this._currentTextLength = -1;\n this.k = false;\n this.data = data;\n this.elem = elem;\n this.comp = elem.comp;\n this.finalS = 0;\n this.finalE = 0;\n this.initDynamicPropertyContainer(elem);\n this.s = PropertyFactory.getProp(elem, data.s || {\n k: 0\n }, 0, 0, this);\n\n if ('e' in data) {\n this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);\n } else {\n this.e = {\n v: 100\n };\n }\n\n this.o = PropertyFactory.getProp(elem, data.o || {\n k: 0\n }, 0, 0, this);\n this.xe = PropertyFactory.getProp(elem, data.xe || {\n k: 0\n }, 0, 0, this);\n this.ne = PropertyFactory.getProp(elem, data.ne || {\n k: 0\n }, 0, 0, this);\n this.sm = PropertyFactory.getProp(elem, data.sm || {\n k: 100\n }, 0, 0, this);\n this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);\n\n if (!this.dynamicProperties.length) {\n this.getValue();\n }\n }\n\n TextSelectorPropFactory.prototype = {\n getMult: function getMult(ind) {\n if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {\n this.getValue();\n }\n\n var x1 = 0;\n var y1 = 0;\n var x2 = 1;\n var y2 = 1;\n\n if (this.ne.v > 0) {\n x1 = this.ne.v / 100.0;\n } else {\n y1 = -this.ne.v / 100.0;\n }\n\n if (this.xe.v > 0) {\n x2 = 1.0 - this.xe.v / 100.0;\n } else {\n y2 = 1.0 + this.xe.v / 100.0;\n }\n\n var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;\n var mult = 0;\n var s = this.finalS;\n var e = this.finalE;\n var type = this.data.sh;\n\n if (type === 2) {\n if (e === s) {\n mult = ind >= e ? 1 : 0;\n } else {\n mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\n }\n\n mult = easer(mult);\n } else if (type === 3) {\n if (e === s) {\n mult = ind >= e ? 0 : 1;\n } else {\n mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\n }\n\n mult = easer(mult);\n } else if (type === 4) {\n if (e === s) {\n mult = 0;\n } else {\n mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\n\n if (mult < 0.5) {\n mult *= 2;\n } else {\n mult = 1 - 2 * (mult - 0.5);\n }\n }\n\n mult = easer(mult);\n } else if (type === 5) {\n if (e === s) {\n mult = 0;\n } else {\n var tot = e - s;\n /* ind += 0.5;\r\n mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */\n\n ind = min(max(0, ind + 0.5 - s), e - s);\n var x = -tot / 2 + ind;\n var a = tot / 2;\n mult = Math.sqrt(1 - x * x / (a * a));\n }\n\n mult = easer(mult);\n } else if (type === 6) {\n if (e === s) {\n mult = 0;\n } else {\n ind = min(max(0, ind + 0.5 - s), e - s);\n mult = (1 + Math.cos(Math.PI + Math.PI * 2 * ind / (e - s))) / 2; // eslint-disable-line\n }\n\n mult = easer(mult);\n } else {\n if (ind >= floor(s)) {\n if (ind - s < 0) {\n mult = max(0, min(min(e, 1) - (s - ind), 1));\n } else {\n mult = max(0, min(e - ind, 1));\n }\n }\n\n mult = easer(mult);\n } // Smoothness implementation.\n // The smoothness represents a reduced range of the original [0; 1] range.\n // if smoothness is 25%, the new range will be [0.375; 0.625]\n // Steps are:\n // - find the lower value of the new range (threshold)\n // - if multiplier is smaller than that value, floor it to 0\n // - if it is larger,\n // - subtract the threshold\n // - divide it by the smoothness (this will return the range to [0; 1])\n // Note: If it doesn't work on some scenarios, consider applying it before the easer.\n\n\n if (this.sm.v !== 100) {\n var smoothness = this.sm.v * 0.01;\n\n if (smoothness === 0) {\n smoothness = 0.00000001;\n }\n\n var threshold = 0.5 - smoothness * 0.5;\n\n if (mult < threshold) {\n mult = 0;\n } else {\n mult = (mult - threshold) / smoothness;\n\n if (mult > 1) {\n mult = 1;\n }\n }\n }\n\n return mult * this.a.v;\n },\n getValue: function getValue(newCharsFlag) {\n this.iterateDynamicProperties();\n this._mdf = newCharsFlag || this._mdf;\n this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;\n\n if (newCharsFlag && this.data.r === 2) {\n this.e.v = this._currentTextLength;\n }\n\n var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;\n var o = this.o.v / divisor;\n var s = this.s.v / divisor + o;\n var e = this.e.v / divisor + o;\n\n if (s > e) {\n var _s = s;\n s = e;\n e = _s;\n }\n\n this.finalS = s;\n this.finalE = e;\n }\n };\n extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);\n\n function getTextSelectorProp(elem, data, arr) {\n return new TextSelectorPropFactory(elem, data, arr);\n }\n\n return {\n getTextSelectorProp: getTextSelectorProp\n };\n }();\n\n function TextAnimatorDataProperty(elem, animatorProps, container) {\n var defaultData = {\n propType: false\n };\n var getProp = PropertyFactory.getProp;\n var textAnimatorAnimatables = animatorProps.a;\n this.a = {\n r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,\n rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,\n ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,\n sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,\n sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,\n s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,\n a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,\n o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,\n p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,\n sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,\n sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,\n fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,\n fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,\n fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,\n fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,\n t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData\n };\n this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);\n this.s.t = animatorProps.s.t;\n }\n\n function TextAnimatorProperty(textData, renderType, elem) {\n this._isFirstFrame = true;\n this._hasMaskedPath = false;\n this._frameId = -1;\n this._textData = textData;\n this._renderType = renderType;\n this._elem = elem;\n this._animatorsData = createSizedArray(this._textData.a.length);\n this._pathData = {};\n this._moreOptions = {\n alignment: {}\n };\n this.renderedLetters = [];\n this.lettersChangedFlag = false;\n this.initDynamicPropertyContainer(elem);\n }\n\n TextAnimatorProperty.prototype.searchProperties = function () {\n var i;\n var len = this._textData.a.length;\n var animatorProps;\n var getProp = PropertyFactory.getProp;\n\n for (i = 0; i < len; i += 1) {\n animatorProps = this._textData.a[i];\n this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);\n }\n\n if (this._textData.p && 'm' in this._textData.p) {\n this._pathData = {\n a: getProp(this._elem, this._textData.p.a, 0, 0, this),\n f: getProp(this._elem, this._textData.p.f, 0, 0, this),\n l: getProp(this._elem, this._textData.p.l, 0, 0, this),\n r: getProp(this._elem, this._textData.p.r, 0, 0, this),\n p: getProp(this._elem, this._textData.p.p, 0, 0, this),\n m: this._elem.maskManager.getMaskProperty(this._textData.p.m)\n };\n this._hasMaskedPath = true;\n } else {\n this._hasMaskedPath = false;\n }\n\n this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);\n };\n\n TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {\n this.lettersChangedFlag = lettersChangedFlag;\n\n if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {\n return;\n }\n\n this._isFirstFrame = false;\n var alignment = this._moreOptions.alignment.v;\n var animators = this._animatorsData;\n var textData = this._textData;\n var matrixHelper = this.mHelper;\n var renderType = this._renderType;\n var renderedLettersCount = this.renderedLetters.length;\n var xPos;\n var yPos;\n var i;\n var len;\n var letters = documentData.l;\n var pathInfo;\n var currentLength;\n var currentPoint;\n var segmentLength;\n var flag;\n var pointInd;\n var segmentInd;\n var prevPoint;\n var points;\n var segments;\n var partialLength;\n var totalLength;\n var perc;\n var tanAngle;\n var mask;\n\n if (this._hasMaskedPath) {\n mask = this._pathData.m;\n\n if (!this._pathData.n || this._pathData._mdf) {\n var paths = mask.v;\n\n if (this._pathData.r.v) {\n paths = paths.reverse();\n } // TODO: release bezier data cached from previous pathInfo: this._pathData.pi\n\n\n pathInfo = {\n tLength: 0,\n segments: []\n };\n len = paths._length - 1;\n var bezierData;\n totalLength = 0;\n\n for (i = 0; i < len; i += 1) {\n bezierData = bez.buildBezierData(paths.v[i], paths.v[i + 1], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);\n pathInfo.tLength += bezierData.segmentLength;\n pathInfo.segments.push(bezierData);\n totalLength += bezierData.segmentLength;\n }\n\n i = len;\n\n if (mask.v.c) {\n bezierData = bez.buildBezierData(paths.v[i], paths.v[0], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);\n pathInfo.tLength += bezierData.segmentLength;\n pathInfo.segments.push(bezierData);\n totalLength += bezierData.segmentLength;\n }\n\n this._pathData.pi = pathInfo;\n }\n\n pathInfo = this._pathData.pi;\n currentLength = this._pathData.f.v;\n segmentInd = 0;\n pointInd = 1;\n segmentLength = 0;\n flag = true;\n segments = pathInfo.segments;\n\n if (currentLength < 0 && mask.v.c) {\n if (pathInfo.tLength < Math.abs(currentLength)) {\n currentLength = -Math.abs(currentLength) % pathInfo.tLength;\n }\n\n segmentInd = segments.length - 1;\n points = segments[segmentInd].points;\n pointInd = points.length - 1;\n\n while (currentLength < 0) {\n currentLength += points[pointInd].partialLength;\n pointInd -= 1;\n\n if (pointInd < 0) {\n segmentInd -= 1;\n points = segments[segmentInd].points;\n pointInd = points.length - 1;\n }\n }\n }\n\n points = segments[segmentInd].points;\n prevPoint = points[pointInd - 1];\n currentPoint = points[pointInd];\n partialLength = currentPoint.partialLength;\n }\n\n len = letters.length;\n xPos = 0;\n yPos = 0;\n var yOff = documentData.finalSize * 1.2 * 0.714;\n var firstLine = true;\n var animatorProps;\n var animatorSelector;\n var j;\n var jLen;\n var letterValue;\n jLen = animators.length;\n var mult;\n var ind = -1;\n var offf;\n var xPathPos;\n var yPathPos;\n var initPathPos = currentLength;\n var initSegmentInd = segmentInd;\n var initPointInd = pointInd;\n var currentLine = -1;\n var elemOpacity;\n var sc;\n var sw;\n var fc;\n var k;\n var letterSw;\n var letterSc;\n var letterFc;\n var letterM = '';\n var letterP = this.defaultPropsArray;\n var letterO; //\n\n if (documentData.j === 2 || documentData.j === 1) {\n var animatorJustifyOffset = 0;\n var animatorFirstCharOffset = 0;\n var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;\n var lastIndex = 0;\n var isNewLine = true;\n\n for (i = 0; i < len; i += 1) {\n if (letters[i].n) {\n if (animatorJustifyOffset) {\n animatorJustifyOffset += animatorFirstCharOffset;\n }\n\n while (lastIndex < i) {\n letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;\n lastIndex += 1;\n }\n\n animatorJustifyOffset = 0;\n isNewLine = true;\n } else {\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n\n if (animatorProps.t.propType) {\n if (isNewLine && documentData.j === 2) {\n animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;\n }\n\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (mult.length) {\n animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;\n } else {\n animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;\n }\n }\n }\n\n isNewLine = false;\n }\n }\n\n if (animatorJustifyOffset) {\n animatorJustifyOffset += animatorFirstCharOffset;\n }\n\n while (lastIndex < i) {\n letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;\n lastIndex += 1;\n }\n } //\n\n\n for (i = 0; i < len; i += 1) {\n matrixHelper.reset();\n elemOpacity = 1;\n\n if (letters[i].n) {\n xPos = 0;\n yPos += documentData.yOffset;\n yPos += firstLine ? 1 : 0;\n currentLength = initPathPos;\n firstLine = false;\n\n if (this._hasMaskedPath) {\n segmentInd = initSegmentInd;\n pointInd = initPointInd;\n points = segments[segmentInd].points;\n prevPoint = points[pointInd - 1];\n currentPoint = points[pointInd];\n partialLength = currentPoint.partialLength;\n segmentLength = 0;\n }\n\n letterM = '';\n letterFc = '';\n letterSw = '';\n letterO = '';\n letterP = this.defaultPropsArray;\n } else {\n if (this._hasMaskedPath) {\n if (currentLine !== letters[i].line) {\n switch (documentData.j) {\n case 1:\n currentLength += totalLength - documentData.lineWidths[letters[i].line];\n break;\n\n case 2:\n currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;\n break;\n\n default:\n break;\n }\n\n currentLine = letters[i].line;\n }\n\n if (ind !== letters[i].ind) {\n if (letters[ind]) {\n currentLength += letters[ind].extra;\n }\n\n currentLength += letters[i].an / 2;\n ind = letters[i].ind;\n }\n\n currentLength += alignment[0] * letters[i].an * 0.005;\n var animatorOffset = 0;\n\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n\n if (animatorProps.p.propType) {\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (mult.length) {\n animatorOffset += animatorProps.p.v[0] * mult[0];\n } else {\n animatorOffset += animatorProps.p.v[0] * mult;\n }\n }\n\n if (animatorProps.a.propType) {\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (mult.length) {\n animatorOffset += animatorProps.a.v[0] * mult[0];\n } else {\n animatorOffset += animatorProps.a.v[0] * mult;\n }\n }\n }\n\n flag = true; // Force alignment only works with a single line for now\n\n if (this._pathData.a.v) {\n currentLength = letters[0].an * 0.5 + (totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind / (len - 1);\n currentLength += this._pathData.f.v;\n }\n\n while (flag) {\n if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {\n perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;\n xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;\n yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;\n matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -(alignment[1] * yOff) * 0.01);\n flag = false;\n } else if (points) {\n segmentLength += currentPoint.partialLength;\n pointInd += 1;\n\n if (pointInd >= points.length) {\n pointInd = 0;\n segmentInd += 1;\n\n if (!segments[segmentInd]) {\n if (mask.v.c) {\n pointInd = 0;\n segmentInd = 0;\n points = segments[segmentInd].points;\n } else {\n segmentLength -= currentPoint.partialLength;\n points = null;\n }\n } else {\n points = segments[segmentInd].points;\n }\n }\n\n if (points) {\n prevPoint = currentPoint;\n currentPoint = points[pointInd];\n partialLength = currentPoint.partialLength;\n }\n }\n }\n\n offf = letters[i].an / 2 - letters[i].add;\n matrixHelper.translate(-offf, 0, 0);\n } else {\n offf = letters[i].an / 2 - letters[i].add;\n matrixHelper.translate(-offf, 0, 0); // Grouping alignment\n\n matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -alignment[1] * yOff * 0.01, 0);\n }\n\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n\n if (animatorProps.t.propType) {\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean \"isNewLine\"\n\n if (xPos !== 0 || documentData.j !== 0) {\n if (this._hasMaskedPath) {\n if (mult.length) {\n currentLength += animatorProps.t.v * mult[0];\n } else {\n currentLength += animatorProps.t.v * mult;\n }\n } else if (mult.length) {\n xPos += animatorProps.t.v * mult[0];\n } else {\n xPos += animatorProps.t.v * mult;\n }\n }\n }\n }\n\n if (documentData.strokeWidthAnim) {\n sw = documentData.sw || 0;\n }\n\n if (documentData.strokeColorAnim) {\n if (documentData.sc) {\n sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];\n } else {\n sc = [0, 0, 0];\n }\n }\n\n if (documentData.fillColorAnim && documentData.fc) {\n fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];\n }\n\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n\n if (animatorProps.a.propType) {\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (mult.length) {\n matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);\n } else {\n matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);\n }\n }\n }\n\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n\n if (animatorProps.s.propType) {\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (mult.length) {\n matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult[0], 1 + (animatorProps.s.v[1] - 1) * mult[1], 1);\n } else {\n matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult, 1 + (animatorProps.s.v[1] - 1) * mult, 1);\n }\n }\n }\n\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (animatorProps.sk.propType) {\n if (mult.length) {\n matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);\n } else {\n matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);\n }\n }\n\n if (animatorProps.r.propType) {\n if (mult.length) {\n matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);\n } else {\n matrixHelper.rotateZ(-animatorProps.r.v * mult);\n }\n }\n\n if (animatorProps.ry.propType) {\n if (mult.length) {\n matrixHelper.rotateY(animatorProps.ry.v * mult[1]);\n } else {\n matrixHelper.rotateY(animatorProps.ry.v * mult);\n }\n }\n\n if (animatorProps.rx.propType) {\n if (mult.length) {\n matrixHelper.rotateX(animatorProps.rx.v * mult[0]);\n } else {\n matrixHelper.rotateX(animatorProps.rx.v * mult);\n }\n }\n\n if (animatorProps.o.propType) {\n if (mult.length) {\n elemOpacity += (animatorProps.o.v * mult[0] - elemOpacity) * mult[0];\n } else {\n elemOpacity += (animatorProps.o.v * mult - elemOpacity) * mult;\n }\n }\n\n if (documentData.strokeWidthAnim && animatorProps.sw.propType) {\n if (mult.length) {\n sw += animatorProps.sw.v * mult[0];\n } else {\n sw += animatorProps.sw.v * mult;\n }\n }\n\n if (documentData.strokeColorAnim && animatorProps.sc.propType) {\n for (k = 0; k < 3; k += 1) {\n if (mult.length) {\n sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];\n } else {\n sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;\n }\n }\n }\n\n if (documentData.fillColorAnim && documentData.fc) {\n if (animatorProps.fc.propType) {\n for (k = 0; k < 3; k += 1) {\n if (mult.length) {\n fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];\n } else {\n fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;\n }\n }\n }\n\n if (animatorProps.fh.propType) {\n if (mult.length) {\n fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);\n } else {\n fc = addHueToRGB(fc, animatorProps.fh.v * mult);\n }\n }\n\n if (animatorProps.fs.propType) {\n if (mult.length) {\n fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);\n } else {\n fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);\n }\n }\n\n if (animatorProps.fb.propType) {\n if (mult.length) {\n fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);\n } else {\n fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);\n }\n }\n }\n }\n\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n\n if (animatorProps.p.propType) {\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (this._hasMaskedPath) {\n if (mult.length) {\n matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);\n } else {\n matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);\n }\n } else if (mult.length) {\n matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);\n } else {\n matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);\n }\n }\n }\n\n if (documentData.strokeWidthAnim) {\n letterSw = sw < 0 ? 0 : sw;\n }\n\n if (documentData.strokeColorAnim) {\n letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';\n }\n\n if (documentData.fillColorAnim && documentData.fc) {\n letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';\n }\n\n if (this._hasMaskedPath) {\n matrixHelper.translate(0, -documentData.ls);\n matrixHelper.translate(0, alignment[1] * yOff * 0.01 + yPos, 0);\n\n if (this._pathData.p.v) {\n tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);\n var rot = Math.atan(tanAngle) * 180 / Math.PI;\n\n if (currentPoint.point[0] < prevPoint.point[0]) {\n rot += 180;\n }\n\n matrixHelper.rotate(-rot * Math.PI / 180);\n }\n\n matrixHelper.translate(xPathPos, yPathPos, 0);\n currentLength -= alignment[0] * letters[i].an * 0.005;\n\n if (letters[i + 1] && ind !== letters[i + 1].ind) {\n currentLength += letters[i].an / 2;\n currentLength += documentData.tr * 0.001 * documentData.finalSize;\n }\n } else {\n matrixHelper.translate(xPos, yPos, 0);\n\n if (documentData.ps) {\n // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);\n matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);\n }\n\n switch (documentData.j) {\n case 1:\n matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);\n break;\n\n case 2:\n matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);\n break;\n\n default:\n break;\n }\n\n matrixHelper.translate(0, -documentData.ls);\n matrixHelper.translate(offf, 0, 0);\n matrixHelper.translate(alignment[0] * letters[i].an * 0.005, alignment[1] * yOff * 0.01, 0);\n xPos += letters[i].l + documentData.tr * 0.001 * documentData.finalSize;\n }\n\n if (renderType === 'html') {\n letterM = matrixHelper.toCSS();\n } else if (renderType === 'svg') {\n letterM = matrixHelper.to2dCSS();\n } else {\n letterP = [matrixHelper.props[0], matrixHelper.props[1], matrixHelper.props[2], matrixHelper.props[3], matrixHelper.props[4], matrixHelper.props[5], matrixHelper.props[6], matrixHelper.props[7], matrixHelper.props[8], matrixHelper.props[9], matrixHelper.props[10], matrixHelper.props[11], matrixHelper.props[12], matrixHelper.props[13], matrixHelper.props[14], matrixHelper.props[15]];\n }\n\n letterO = elemOpacity;\n }\n\n if (renderedLettersCount <= i) {\n letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);\n this.renderedLetters.push(letterValue);\n renderedLettersCount += 1;\n this.lettersChangedFlag = true;\n } else {\n letterValue = this.renderedLetters[i];\n this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;\n }\n }\n };\n\n TextAnimatorProperty.prototype.getValue = function () {\n if (this._elem.globalData.frameId === this._frameId) {\n return;\n }\n\n this._frameId = this._elem.globalData.frameId;\n this.iterateDynamicProperties();\n };\n\n TextAnimatorProperty.prototype.mHelper = new Matrix();\n TextAnimatorProperty.prototype.defaultPropsArray = [];\n extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);\n\n function ITextElement() {}\n\n ITextElement.prototype.initElement = function (data, globalData, comp) {\n this.lettersChangedFlag = true;\n this.initFrame();\n this.initBaseData(data, globalData, comp);\n this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);\n this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);\n this.initTransform(data, globalData, comp);\n this.initHierarchy();\n this.initRenderable();\n this.initRendererElement();\n this.createContainerElements();\n this.createRenderableComponents();\n this.createContent();\n this.hide();\n this.textAnimator.searchProperties(this.dynamicProperties);\n };\n\n ITextElement.prototype.prepareFrame = function (num) {\n this._mdf = false;\n this.prepareRenderableFrame(num);\n this.prepareProperties(num, this.isInRange);\n };\n\n ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {\n var j;\n var jLen = shapes.length;\n var pathNodes;\n var shapeStr = '';\n\n for (j = 0; j < jLen; j += 1) {\n if (shapes[j].ty === 'sh') {\n pathNodes = shapes[j].ks.k;\n shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);\n }\n }\n\n return shapeStr;\n };\n\n ITextElement.prototype.updateDocumentData = function (newData, index) {\n this.textProperty.updateDocumentData(newData, index);\n };\n\n ITextElement.prototype.canResizeFont = function (_canResize) {\n this.textProperty.canResizeFont(_canResize);\n };\n\n ITextElement.prototype.setMinimumFontSize = function (_fontSize) {\n this.textProperty.setMinimumFontSize(_fontSize);\n };\n\n ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {\n if (documentData.ps) {\n matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);\n }\n\n matrixHelper.translate(0, -documentData.ls, 0);\n\n switch (documentData.j) {\n case 1:\n matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);\n break;\n\n case 2:\n matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);\n break;\n\n default:\n break;\n }\n\n matrixHelper.translate(xPos, yPos, 0);\n };\n\n ITextElement.prototype.buildColor = function (colorData) {\n return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';\n };\n\n ITextElement.prototype.emptyProp = new LetterProps();\n\n ITextElement.prototype.destroy = function () {};\n\n ITextElement.prototype.validateText = function () {\n if (this.textProperty._mdf || this.textProperty._isFirstFrame) {\n this.buildNewText();\n this.textProperty._isFirstFrame = false;\n this.textProperty._mdf = false;\n }\n };\n\n var emptyShapeData = {\n shapes: []\n };\n\n function SVGTextLottieElement(data, globalData, comp) {\n this.textSpans = [];\n this.renderType = 'svg';\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);\n\n SVGTextLottieElement.prototype.createContent = function () {\n if (this.data.singleShape && !this.globalData.fontManager.chars) {\n this.textContainer = createNS('text');\n }\n };\n\n SVGTextLottieElement.prototype.buildTextContents = function (textArray) {\n var i = 0;\n var len = textArray.length;\n var textContents = [];\n var currentTextContent = '';\n\n while (i < len) {\n if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {\n textContents.push(currentTextContent);\n currentTextContent = '';\n } else {\n currentTextContent += textArray[i];\n }\n\n i += 1;\n }\n\n textContents.push(currentTextContent);\n return textContents;\n };\n\n SVGTextLottieElement.prototype.buildShapeData = function (data, scale) {\n // data should probably be cloned to apply scale separately to each instance of a text on different layers\n // but since text internal content gets only rendered once and then it's never rerendered,\n // it's probably safe not to clone data and reuse always the same instance even if the object is mutated.\n // Avoiding cloning is preferred since cloning each character shape data is expensive\n if (data.shapes && data.shapes.length) {\n var shape = data.shapes[0];\n\n if (shape.it) {\n var shapeItem = shape.it[shape.it.length - 1];\n\n if (shapeItem.s) {\n shapeItem.s.k[0] = scale;\n shapeItem.s.k[1] = scale;\n }\n }\n }\n\n return data;\n };\n\n SVGTextLottieElement.prototype.buildNewText = function () {\n this.addDynamicProperty(this);\n var i;\n var len;\n var documentData = this.textProperty.currentData;\n this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);\n\n if (documentData.fc) {\n this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));\n } else {\n this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');\n }\n\n if (documentData.sc) {\n this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));\n this.layerElement.setAttribute('stroke-width', documentData.sw);\n }\n\n this.layerElement.setAttribute('font-size', documentData.finalSize);\n var fontData = this.globalData.fontManager.getFontByName(documentData.f);\n\n if (fontData.fClass) {\n this.layerElement.setAttribute('class', fontData.fClass);\n } else {\n this.layerElement.setAttribute('font-family', fontData.fFamily);\n var fWeight = documentData.fWeight;\n var fStyle = documentData.fStyle;\n this.layerElement.setAttribute('font-style', fStyle);\n this.layerElement.setAttribute('font-weight', fWeight);\n }\n\n this.layerElement.setAttribute('aria-label', documentData.t);\n var letters = documentData.l || [];\n var usesGlyphs = !!this.globalData.fontManager.chars;\n len = letters.length;\n var tSpan;\n var matrixHelper = this.mHelper;\n var shapeStr = '';\n var singleShape = this.data.singleShape;\n var xPos = 0;\n var yPos = 0;\n var firstLine = true;\n var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;\n\n if (singleShape && !usesGlyphs && !documentData.sz) {\n var tElement = this.textContainer;\n var justify = 'start';\n\n switch (documentData.j) {\n case 1:\n justify = 'end';\n break;\n\n case 2:\n justify = 'middle';\n break;\n\n default:\n justify = 'start';\n break;\n }\n\n tElement.setAttribute('text-anchor', justify);\n tElement.setAttribute('letter-spacing', trackingOffset);\n var textContent = this.buildTextContents(documentData.finalText);\n len = textContent.length;\n yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;\n\n for (i = 0; i < len; i += 1) {\n tSpan = this.textSpans[i].span || createNS('tspan');\n tSpan.textContent = textContent[i];\n tSpan.setAttribute('x', 0);\n tSpan.setAttribute('y', yPos);\n tSpan.style.display = 'inherit';\n tElement.appendChild(tSpan);\n\n if (!this.textSpans[i]) {\n this.textSpans[i] = {\n span: null,\n glyph: null\n };\n }\n\n this.textSpans[i].span = tSpan;\n yPos += documentData.finalLineHeight;\n }\n\n this.layerElement.appendChild(tElement);\n } else {\n var cachedSpansLength = this.textSpans.length;\n var charData;\n\n for (i = 0; i < len; i += 1) {\n if (!this.textSpans[i]) {\n this.textSpans[i] = {\n span: null,\n childSpan: null,\n glyph: null\n };\n }\n\n if (!usesGlyphs || !singleShape || i === 0) {\n tSpan = cachedSpansLength > i ? this.textSpans[i].span : createNS(usesGlyphs ? 'g' : 'text');\n\n if (cachedSpansLength <= i) {\n tSpan.setAttribute('stroke-linecap', 'butt');\n tSpan.setAttribute('stroke-linejoin', 'round');\n tSpan.setAttribute('stroke-miterlimit', '4');\n this.textSpans[i].span = tSpan;\n\n if (usesGlyphs) {\n var childSpan = createNS('g');\n tSpan.appendChild(childSpan);\n this.textSpans[i].childSpan = childSpan;\n }\n\n this.textSpans[i].span = tSpan;\n this.layerElement.appendChild(tSpan);\n }\n\n tSpan.style.display = 'inherit';\n }\n\n matrixHelper.reset();\n\n if (singleShape) {\n if (letters[i].n) {\n xPos = -trackingOffset;\n yPos += documentData.yOffset;\n yPos += firstLine ? 1 : 0;\n firstLine = false;\n }\n\n this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);\n xPos += letters[i].l || 0; // xPos += letters[i].val === ' ' ? 0 : trackingOffset;\n\n xPos += trackingOffset;\n }\n\n if (usesGlyphs) {\n charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\n var glyphElement; // t === 1 means the character has been replaced with an animated shaped\n\n if (charData.t === 1) {\n glyphElement = new SVGCompElement(charData.data, this.globalData, this);\n } else {\n var data = emptyShapeData;\n\n if (charData.data && charData.data.shapes) {\n data = this.buildShapeData(charData.data, documentData.finalSize);\n }\n\n glyphElement = new SVGShapeElement(data, this.globalData, this);\n }\n\n if (this.textSpans[i].glyph) {\n var glyph = this.textSpans[i].glyph;\n this.textSpans[i].childSpan.removeChild(glyph.layerElement);\n glyph.destroy();\n }\n\n this.textSpans[i].glyph = glyphElement;\n glyphElement._debug = true;\n glyphElement.prepareFrame(0);\n glyphElement.renderFrame();\n this.textSpans[i].childSpan.appendChild(glyphElement.layerElement); // when using animated shapes, the layer will be scaled instead of replacing the internal scale\n // this might have issues with strokes and might need a different solution\n\n if (charData.t === 1) {\n this.textSpans[i].childSpan.setAttribute('transform', 'scale(' + documentData.finalSize / 100 + ',' + documentData.finalSize / 100 + ')');\n }\n } else {\n if (singleShape) {\n tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');\n }\n\n tSpan.textContent = letters[i].val;\n tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n } //\n\n }\n\n if (singleShape && tSpan) {\n tSpan.setAttribute('d', shapeStr);\n }\n }\n\n while (i < this.textSpans.length) {\n this.textSpans[i].span.style.display = 'none';\n i += 1;\n }\n\n this._sizeChanged = true;\n };\n\n SVGTextLottieElement.prototype.sourceRectAtTime = function () {\n this.prepareFrame(this.comp.renderedFrame - this.data.st);\n this.renderInnerContent();\n\n if (this._sizeChanged) {\n this._sizeChanged = false;\n var textBox = this.layerElement.getBBox();\n this.bbox = {\n top: textBox.y,\n left: textBox.x,\n width: textBox.width,\n height: textBox.height\n };\n }\n\n return this.bbox;\n };\n\n SVGTextLottieElement.prototype.getValue = function () {\n var i;\n var len = this.textSpans.length;\n var glyphElement;\n this.renderedFrame = this.comp.renderedFrame;\n\n for (i = 0; i < len; i += 1) {\n glyphElement = this.textSpans[i].glyph;\n\n if (glyphElement) {\n glyphElement.prepareFrame(this.comp.renderedFrame - this.data.st);\n\n if (glyphElement._mdf) {\n this._mdf = true;\n }\n }\n }\n };\n\n SVGTextLottieElement.prototype.renderInnerContent = function () {\n this.validateText();\n\n if (!this.data.singleShape || this._mdf) {\n this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\n\n if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {\n this._sizeChanged = true;\n var i;\n var len;\n var renderedLetters = this.textAnimator.renderedLetters;\n var letters = this.textProperty.currentData.l;\n len = letters.length;\n var renderedLetter;\n var textSpan;\n var glyphElement;\n\n for (i = 0; i < len; i += 1) {\n if (!letters[i].n) {\n renderedLetter = renderedLetters[i];\n textSpan = this.textSpans[i].span;\n glyphElement = this.textSpans[i].glyph;\n\n if (glyphElement) {\n glyphElement.renderFrame();\n }\n\n if (renderedLetter._mdf.m) {\n textSpan.setAttribute('transform', renderedLetter.m);\n }\n\n if (renderedLetter._mdf.o) {\n textSpan.setAttribute('opacity', renderedLetter.o);\n }\n\n if (renderedLetter._mdf.sw) {\n textSpan.setAttribute('stroke-width', renderedLetter.sw);\n }\n\n if (renderedLetter._mdf.sc) {\n textSpan.setAttribute('stroke', renderedLetter.sc);\n }\n\n if (renderedLetter._mdf.fc) {\n textSpan.setAttribute('fill', renderedLetter.fc);\n }\n }\n }\n }\n }\n };\n\n function ISolidElement(data, globalData, comp) {\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([IImageElement], ISolidElement);\n\n ISolidElement.prototype.createContent = function () {\n var rect = createNS('rect'); /// /rect.style.width = this.data.sw;\n /// /rect.style.height = this.data.sh;\n /// /rect.style.fill = this.data.sc;\n\n rect.setAttribute('width', this.data.sw);\n rect.setAttribute('height', this.data.sh);\n rect.setAttribute('fill', this.data.sc);\n this.layerElement.appendChild(rect);\n };\n\n function NullElement(data, globalData, comp) {\n this.initFrame();\n this.initBaseData(data, globalData, comp);\n this.initFrame();\n this.initTransform(data, globalData, comp);\n this.initHierarchy();\n }\n\n NullElement.prototype.prepareFrame = function (num) {\n this.prepareProperties(num, true);\n };\n\n NullElement.prototype.renderFrame = function () {};\n\n NullElement.prototype.getBaseElement = function () {\n return null;\n };\n\n NullElement.prototype.destroy = function () {};\n\n NullElement.prototype.sourceRectAtTime = function () {};\n\n NullElement.prototype.hide = function () {};\n\n extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);\n\n function SVGRendererBase() {}\n\n extendPrototype([BaseRenderer], SVGRendererBase);\n\n SVGRendererBase.prototype.createNull = function (data) {\n return new NullElement(data, this.globalData, this);\n };\n\n SVGRendererBase.prototype.createShape = function (data) {\n return new SVGShapeElement(data, this.globalData, this);\n };\n\n SVGRendererBase.prototype.createText = function (data) {\n return new SVGTextLottieElement(data, this.globalData, this);\n };\n\n SVGRendererBase.prototype.createImage = function (data) {\n return new IImageElement(data, this.globalData, this);\n };\n\n SVGRendererBase.prototype.createSolid = function (data) {\n return new ISolidElement(data, this.globalData, this);\n };\n\n SVGRendererBase.prototype.configAnimation = function (animData) {\n this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n this.svgElement.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n\n if (this.renderConfig.viewBoxSize) {\n this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);\n } else {\n this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);\n }\n\n if (!this.renderConfig.viewBoxOnly) {\n this.svgElement.setAttribute('width', animData.w);\n this.svgElement.setAttribute('height', animData.h);\n this.svgElement.style.width = '100%';\n this.svgElement.style.height = '100%';\n this.svgElement.style.transform = 'translate3d(0,0,0)';\n this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;\n }\n\n if (this.renderConfig.width) {\n this.svgElement.setAttribute('width', this.renderConfig.width);\n }\n\n if (this.renderConfig.height) {\n this.svgElement.setAttribute('height', this.renderConfig.height);\n }\n\n if (this.renderConfig.className) {\n this.svgElement.setAttribute('class', this.renderConfig.className);\n }\n\n if (this.renderConfig.id) {\n this.svgElement.setAttribute('id', this.renderConfig.id);\n }\n\n if (this.renderConfig.focusable !== undefined) {\n this.svgElement.setAttribute('focusable', this.renderConfig.focusable);\n }\n\n this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio); // this.layerElement.style.transform = 'translate3d(0,0,0)';\n // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = \"0px 0px 0px\";\n\n this.animationItem.wrapper.appendChild(this.svgElement); // Mask animation\n\n var defs = this.globalData.defs;\n this.setupGlobalData(animData, defs);\n this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;\n this.data = animData;\n var maskElement = createNS('clipPath');\n var rect = createNS('rect');\n rect.setAttribute('width', animData.w);\n rect.setAttribute('height', animData.h);\n rect.setAttribute('x', 0);\n rect.setAttribute('y', 0);\n var maskId = createElementID();\n maskElement.setAttribute('id', maskId);\n maskElement.appendChild(rect);\n this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + maskId + ')');\n defs.appendChild(maskElement);\n this.layers = animData.layers;\n this.elements = createSizedArray(animData.layers.length);\n };\n\n SVGRendererBase.prototype.destroy = function () {\n if (this.animationItem.wrapper) {\n this.animationItem.wrapper.innerText = '';\n }\n\n this.layerElement = null;\n this.globalData.defs = null;\n var i;\n var len = this.layers ? this.layers.length : 0;\n\n for (i = 0; i < len; i += 1) {\n if (this.elements[i] && this.elements[i].destroy) {\n this.elements[i].destroy();\n }\n }\n\n this.elements.length = 0;\n this.destroyed = true;\n this.animationItem = null;\n };\n\n SVGRendererBase.prototype.updateContainerSize = function () {};\n\n SVGRendererBase.prototype.findIndexByInd = function (ind) {\n var i = 0;\n var len = this.layers.length;\n\n for (i = 0; i < len; i += 1) {\n if (this.layers[i].ind === ind) {\n return i;\n }\n }\n\n return -1;\n };\n\n SVGRendererBase.prototype.buildItem = function (pos) {\n var elements = this.elements;\n\n if (elements[pos] || this.layers[pos].ty === 99) {\n return;\n }\n\n elements[pos] = true;\n var element = this.createItem(this.layers[pos]);\n elements[pos] = element;\n\n if (getExpressionsPlugin()) {\n if (this.layers[pos].ty === 0) {\n this.globalData.projectInterface.registerComposition(element);\n }\n\n element.initExpressions();\n }\n\n this.appendElementInPos(element, pos);\n\n if (this.layers[pos].tt) {\n var elementIndex = 'tp' in this.layers[pos] ? this.findIndexByInd(this.layers[pos].tp) : pos - 1;\n\n if (elementIndex === -1) {\n return;\n }\n\n if (!this.elements[elementIndex] || this.elements[elementIndex] === true) {\n this.buildItem(elementIndex);\n this.addPendingElement(element);\n } else {\n var matteElement = elements[elementIndex];\n var matteMask = matteElement.getMatte(this.layers[pos].tt);\n element.setMatte(matteMask);\n }\n }\n };\n\n SVGRendererBase.prototype.checkPendingElements = function () {\n while (this.pendingElements.length) {\n var element = this.pendingElements.pop();\n element.checkParenting();\n\n if (element.data.tt) {\n var i = 0;\n var len = this.elements.length;\n\n while (i < len) {\n if (this.elements[i] === element) {\n var elementIndex = 'tp' in element.data ? this.findIndexByInd(element.data.tp) : i - 1;\n var matteElement = this.elements[elementIndex];\n var matteMask = matteElement.getMatte(this.layers[i].tt);\n element.setMatte(matteMask);\n break;\n }\n\n i += 1;\n }\n }\n }\n };\n\n SVGRendererBase.prototype.renderFrame = function (num) {\n if (this.renderedFrame === num || this.destroyed) {\n return;\n }\n\n if (num === null) {\n num = this.renderedFrame;\n } else {\n this.renderedFrame = num;\n } // console.log('-------');\n // console.log('FRAME ',num);\n\n\n this.globalData.frameNum = num;\n this.globalData.frameId += 1;\n this.globalData.projectInterface.currentFrame = num;\n this.globalData._mdf = false;\n var i;\n var len = this.layers.length;\n\n if (!this.completeLayers) {\n this.checkLayers(num);\n }\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].prepareFrame(num - this.layers[i].st);\n }\n }\n\n if (this.globalData._mdf) {\n for (i = 0; i < len; i += 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].renderFrame();\n }\n }\n }\n };\n\n SVGRendererBase.prototype.appendElementInPos = function (element, pos) {\n var newElement = element.getBaseElement();\n\n if (!newElement) {\n return;\n }\n\n var i = 0;\n var nextElement;\n\n while (i < pos) {\n if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {\n nextElement = this.elements[i].getBaseElement();\n }\n\n i += 1;\n }\n\n if (nextElement) {\n this.layerElement.insertBefore(newElement, nextElement);\n } else {\n this.layerElement.appendChild(newElement);\n }\n };\n\n SVGRendererBase.prototype.hide = function () {\n this.layerElement.style.display = 'none';\n };\n\n SVGRendererBase.prototype.show = function () {\n this.layerElement.style.display = 'block';\n };\n\n function ICompElement() {}\n\n extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);\n\n ICompElement.prototype.initElement = function (data, globalData, comp) {\n this.initFrame();\n this.initBaseData(data, globalData, comp);\n this.initTransform(data, globalData, comp);\n this.initRenderable();\n this.initHierarchy();\n this.initRendererElement();\n this.createContainerElements();\n this.createRenderableComponents();\n\n if (this.data.xt || !globalData.progressiveLoad) {\n this.buildAllItems();\n }\n\n this.hide();\n };\n /* ICompElement.prototype.hide = function(){\r\n if(!this.hidden){\r\n this.hideElement();\r\n var i,len = this.elements.length;\r\n for( i = 0; i < len; i+=1 ){\r\n if(this.elements[i]){\r\n this.elements[i].hide();\r\n }\r\n }\r\n }\r\n }; */\n\n\n ICompElement.prototype.prepareFrame = function (num) {\n this._mdf = false;\n this.prepareRenderableFrame(num);\n this.prepareProperties(num, this.isInRange);\n\n if (!this.isInRange && !this.data.xt) {\n return;\n }\n\n if (!this.tm._placeholder) {\n var timeRemapped = this.tm.v;\n\n if (timeRemapped === this.data.op) {\n timeRemapped = this.data.op - 1;\n }\n\n this.renderedFrame = timeRemapped;\n } else {\n this.renderedFrame = num / this.data.sr;\n }\n\n var i;\n var len = this.elements.length;\n\n if (!this.completeLayers) {\n this.checkLayers(this.renderedFrame);\n } // This iteration needs to be backwards because of how expressions connect between each other\n\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);\n\n if (this.elements[i]._mdf) {\n this._mdf = true;\n }\n }\n }\n };\n\n ICompElement.prototype.renderInnerContent = function () {\n var i;\n var len = this.layers.length;\n\n for (i = 0; i < len; i += 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].renderFrame();\n }\n }\n };\n\n ICompElement.prototype.setElements = function (elems) {\n this.elements = elems;\n };\n\n ICompElement.prototype.getElements = function () {\n return this.elements;\n };\n\n ICompElement.prototype.destroyElements = function () {\n var i;\n var len = this.layers.length;\n\n for (i = 0; i < len; i += 1) {\n if (this.elements[i]) {\n this.elements[i].destroy();\n }\n }\n };\n\n ICompElement.prototype.destroy = function () {\n this.destroyElements();\n this.destroyBaseElement();\n };\n\n function SVGCompElement(data, globalData, comp) {\n this.layers = data.layers;\n this.supports3d = true;\n this.completeLayers = false;\n this.pendingElements = [];\n this.elements = this.layers ? createSizedArray(this.layers.length) : [];\n this.initElement(data, globalData, comp);\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\n _placeholder: true\n };\n }\n\n extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement);\n\n SVGCompElement.prototype.createComp = function (data) {\n return new SVGCompElement(data, this.globalData, this);\n };\n\n function SVGRenderer(animationItem, config) {\n this.animationItem = animationItem;\n this.layers = null;\n this.renderedFrame = -1;\n this.svgElement = createNS('svg');\n var ariaLabel = '';\n\n if (config && config.title) {\n var titleElement = createNS('title');\n var titleId = createElementID();\n titleElement.setAttribute('id', titleId);\n titleElement.textContent = config.title;\n this.svgElement.appendChild(titleElement);\n ariaLabel += titleId;\n }\n\n if (config && config.description) {\n var descElement = createNS('desc');\n var descId = createElementID();\n descElement.setAttribute('id', descId);\n descElement.textContent = config.description;\n this.svgElement.appendChild(descElement);\n ariaLabel += ' ' + descId;\n }\n\n if (ariaLabel) {\n this.svgElement.setAttribute('aria-labelledby', ariaLabel);\n }\n\n var defs = createNS('defs');\n this.svgElement.appendChild(defs);\n var maskElement = createNS('g');\n this.svgElement.appendChild(maskElement);\n this.layerElement = maskElement;\n this.renderConfig = {\n preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\n contentVisibility: config && config.contentVisibility || 'visible',\n progressiveLoad: config && config.progressiveLoad || false,\n hideOnTransparent: !(config && config.hideOnTransparent === false),\n viewBoxOnly: config && config.viewBoxOnly || false,\n viewBoxSize: config && config.viewBoxSize || false,\n className: config && config.className || '',\n id: config && config.id || '',\n focusable: config && config.focusable,\n filterSize: {\n width: config && config.filterSize && config.filterSize.width || '100%',\n height: config && config.filterSize && config.filterSize.height || '100%',\n x: config && config.filterSize && config.filterSize.x || '0%',\n y: config && config.filterSize && config.filterSize.y || '0%'\n },\n width: config && config.width,\n height: config && config.height,\n runExpressions: !config || config.runExpressions === undefined || config.runExpressions\n };\n this.globalData = {\n _mdf: false,\n frameNum: -1,\n defs: defs,\n renderConfig: this.renderConfig\n };\n this.elements = [];\n this.pendingElements = [];\n this.destroyed = false;\n this.rendererType = 'svg';\n }\n\n extendPrototype([SVGRendererBase], SVGRenderer);\n\n SVGRenderer.prototype.createComp = function (data) {\n return new SVGCompElement(data, this.globalData, this);\n };\n\n function ShapeTransformManager() {\n this.sequences = {};\n this.sequenceList = [];\n this.transform_key_count = 0;\n }\n\n ShapeTransformManager.prototype = {\n addTransformSequence: function addTransformSequence(transforms) {\n var i;\n var len = transforms.length;\n var key = '_';\n\n for (i = 0; i < len; i += 1) {\n key += transforms[i].transform.key + '_';\n }\n\n var sequence = this.sequences[key];\n\n if (!sequence) {\n sequence = {\n transforms: [].concat(transforms),\n finalTransform: new Matrix(),\n _mdf: false\n };\n this.sequences[key] = sequence;\n this.sequenceList.push(sequence);\n }\n\n return sequence;\n },\n processSequence: function processSequence(sequence, isFirstFrame) {\n var i = 0;\n var len = sequence.transforms.length;\n var _mdf = isFirstFrame;\n\n while (i < len && !isFirstFrame) {\n if (sequence.transforms[i].transform.mProps._mdf) {\n _mdf = true;\n break;\n }\n\n i += 1;\n }\n\n if (_mdf) {\n sequence.finalTransform.reset();\n\n for (i = len - 1; i >= 0; i -= 1) {\n sequence.finalTransform.multiply(sequence.transforms[i].transform.mProps.v);\n }\n }\n\n sequence._mdf = _mdf;\n },\n processSequences: function processSequences(isFirstFrame) {\n var i;\n var len = this.sequenceList.length;\n\n for (i = 0; i < len; i += 1) {\n this.processSequence(this.sequenceList[i], isFirstFrame);\n }\n },\n getNewKey: function getNewKey() {\n this.transform_key_count += 1;\n return '_' + this.transform_key_count;\n }\n };\n\n var lumaLoader = function lumaLoader() {\n var id = '__lottie_element_luma_buffer';\n var lumaBuffer = null;\n var lumaBufferCtx = null;\n var svg = null; // This alternate solution has a slight delay before the filter is applied, resulting in a flicker on the first frame.\n // Keeping this here for reference, and in the future, if offscreen canvas supports url filters, this can be used.\n // For now, neither of them work for offscreen canvas, so canvas workers can't support the luma track matte mask.\n // Naming it solution 2 to mark the extra comment lines.\n\n /*\r\n var svgString = [\r\n '',\r\n '',\r\n '',\r\n '',\r\n '',\r\n ].join('');\r\n var blob = new Blob([svgString], { type: 'image/svg+xml' });\r\n var url = URL.createObjectURL(blob);\r\n */\n\n function createLumaSvgFilter() {\n var _svg = createNS('svg');\n\n var fil = createNS('filter');\n var matrix = createNS('feColorMatrix');\n fil.setAttribute('id', id);\n matrix.setAttribute('type', 'matrix');\n matrix.setAttribute('color-interpolation-filters', 'sRGB');\n matrix.setAttribute('values', '0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0');\n fil.appendChild(matrix);\n\n _svg.appendChild(fil);\n\n _svg.setAttribute('id', id + '_svg');\n\n if (featureSupport.svgLumaHidden) {\n _svg.style.display = 'none';\n }\n\n return _svg;\n }\n\n function loadLuma() {\n if (!lumaBuffer) {\n svg = createLumaSvgFilter();\n document.body.appendChild(svg);\n lumaBuffer = createTag('canvas');\n lumaBufferCtx = lumaBuffer.getContext('2d'); // lumaBufferCtx.filter = `url('${url}#__lottie_element_luma_buffer')`; // part of solution 2\n\n lumaBufferCtx.filter = 'url(#' + id + ')';\n lumaBufferCtx.fillStyle = 'rgba(0,0,0,0)';\n lumaBufferCtx.fillRect(0, 0, 1, 1);\n }\n }\n\n function getLuma(canvas) {\n if (!lumaBuffer) {\n loadLuma();\n }\n\n lumaBuffer.width = canvas.width;\n lumaBuffer.height = canvas.height; // lumaBufferCtx.filter = `url('${url}#__lottie_element_luma_buffer')`; // part of solution 2\n\n lumaBufferCtx.filter = 'url(#' + id + ')';\n return lumaBuffer;\n }\n\n return {\n load: loadLuma,\n get: getLuma\n };\n };\n\n function createCanvas(width, height) {\n if (featureSupport.offscreenCanvas) {\n return new OffscreenCanvas(width, height);\n }\n\n var canvas = createTag('canvas');\n canvas.width = width;\n canvas.height = height;\n return canvas;\n }\n\n var assetLoader = function () {\n return {\n loadLumaCanvas: lumaLoader.load,\n getLumaCanvas: lumaLoader.get,\n createCanvas: createCanvas\n };\n }();\n\n var registeredEffects = {};\n\n function CVEffects(elem) {\n var i;\n var len = elem.data.ef ? elem.data.ef.length : 0;\n this.filters = [];\n var filterManager;\n\n for (i = 0; i < len; i += 1) {\n filterManager = null;\n var type = elem.data.ef[i].ty;\n\n if (registeredEffects[type]) {\n var Effect = registeredEffects[type].effect;\n filterManager = new Effect(elem.effectsManager.effectElements[i], elem);\n }\n\n if (filterManager) {\n this.filters.push(filterManager);\n }\n }\n\n if (this.filters.length) {\n elem.addRenderableComponent(this);\n }\n }\n\n CVEffects.prototype.renderFrame = function (_isFirstFrame) {\n var i;\n var len = this.filters.length;\n\n for (i = 0; i < len; i += 1) {\n this.filters[i].renderFrame(_isFirstFrame);\n }\n };\n\n CVEffects.prototype.getEffects = function (type) {\n var i;\n var len = this.filters.length;\n var effects = [];\n\n for (i = 0; i < len; i += 1) {\n if (this.filters[i].type === type) {\n effects.push(this.filters[i]);\n }\n }\n\n return effects;\n };\n\n function registerEffect(id, effect) {\n registeredEffects[id] = {\n effect: effect\n };\n }\n\n function CVMaskElement(data, element) {\n this.data = data;\n this.element = element;\n this.masksProperties = this.data.masksProperties || [];\n this.viewData = createSizedArray(this.masksProperties.length);\n var i;\n var len = this.masksProperties.length;\n var hasMasks = false;\n\n for (i = 0; i < len; i += 1) {\n if (this.masksProperties[i].mode !== 'n') {\n hasMasks = true;\n }\n\n this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3);\n }\n\n this.hasMasks = hasMasks;\n\n if (hasMasks) {\n this.element.addRenderableComponent(this);\n }\n }\n\n CVMaskElement.prototype.renderFrame = function () {\n if (!this.hasMasks) {\n return;\n }\n\n var transform = this.element.finalTransform.mat;\n var ctx = this.element.canvasContext;\n var i;\n var len = this.masksProperties.length;\n var pt;\n var pts;\n var data;\n ctx.beginPath();\n\n for (i = 0; i < len; i += 1) {\n if (this.masksProperties[i].mode !== 'n') {\n if (this.masksProperties[i].inv) {\n ctx.moveTo(0, 0);\n ctx.lineTo(this.element.globalData.compSize.w, 0);\n ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h);\n ctx.lineTo(0, this.element.globalData.compSize.h);\n ctx.lineTo(0, 0);\n }\n\n data = this.viewData[i].v;\n pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0);\n ctx.moveTo(pt[0], pt[1]);\n var j;\n var jLen = data._length;\n\n for (j = 1; j < jLen; j += 1) {\n pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]);\n ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);\n }\n\n pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]);\n ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);\n }\n }\n\n this.element.globalData.renderer.save(true);\n ctx.clip();\n };\n\n CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty;\n\n CVMaskElement.prototype.destroy = function () {\n this.element = null;\n };\n\n function CVBaseElement() {}\n\n var operationsMap = {\n 1: 'source-in',\n 2: 'source-out',\n 3: 'source-in',\n 4: 'source-out'\n };\n CVBaseElement.prototype = {\n createElements: function createElements() {},\n initRendererElement: function initRendererElement() {},\n createContainerElements: function createContainerElements() {\n // If the layer is masked we will use two buffers to store each different states of the drawing\n // This solution is not ideal for several reason. But unfortunately, because of the recursive\n // nature of the render tree, it's the only simple way to make sure one inner mask doesn't override an outer mask.\n // TODO: try to reduce the size of these buffers to the size of the composition contaning the layer\n // It might be challenging because the layer most likely is transformed in some way\n if (this.data.tt >= 1) {\n this.buffers = [];\n var canvasContext = this.globalData.canvasContext;\n var bufferCanvas = assetLoader.createCanvas(canvasContext.canvas.width, canvasContext.canvas.height);\n this.buffers.push(bufferCanvas);\n var bufferCanvas2 = assetLoader.createCanvas(canvasContext.canvas.width, canvasContext.canvas.height);\n this.buffers.push(bufferCanvas2);\n\n if (this.data.tt >= 3 && !document._isProxy) {\n assetLoader.loadLumaCanvas();\n }\n }\n\n this.canvasContext = this.globalData.canvasContext;\n this.transformCanvas = this.globalData.transformCanvas;\n this.renderableEffectsManager = new CVEffects(this);\n this.searchEffectTransforms();\n },\n createContent: function createContent() {},\n setBlendMode: function setBlendMode() {\n var globalData = this.globalData;\n\n if (globalData.blendMode !== this.data.bm) {\n globalData.blendMode = this.data.bm;\n var blendModeValue = getBlendMode(this.data.bm);\n globalData.canvasContext.globalCompositeOperation = blendModeValue;\n }\n },\n createRenderableComponents: function createRenderableComponents() {\n this.maskManager = new CVMaskElement(this.data, this);\n this.transformEffects = this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);\n },\n hideElement: function hideElement() {\n if (!this.hidden && (!this.isInRange || this.isTransparent)) {\n this.hidden = true;\n }\n },\n showElement: function showElement() {\n if (this.isInRange && !this.isTransparent) {\n this.hidden = false;\n this._isFirstFrame = true;\n this.maskManager._isFirstFrame = true;\n }\n },\n clearCanvas: function clearCanvas(canvasContext) {\n canvasContext.clearRect(this.transformCanvas.tx, this.transformCanvas.ty, this.transformCanvas.w * this.transformCanvas.sx, this.transformCanvas.h * this.transformCanvas.sy);\n },\n prepareLayer: function prepareLayer() {\n if (this.data.tt >= 1) {\n var buffer = this.buffers[0];\n var bufferCtx = buffer.getContext('2d');\n this.clearCanvas(bufferCtx); // on the first buffer we store the current state of the global drawing\n\n bufferCtx.drawImage(this.canvasContext.canvas, 0, 0); // The next four lines are to clear the canvas\n // TODO: Check if there is a way to clear the canvas without resetting the transform\n\n this.currentTransform = this.canvasContext.getTransform();\n this.canvasContext.setTransform(1, 0, 0, 1, 0, 0);\n this.clearCanvas(this.canvasContext);\n this.canvasContext.setTransform(this.currentTransform);\n }\n },\n exitLayer: function exitLayer() {\n if (this.data.tt >= 1) {\n var buffer = this.buffers[1]; // On the second buffer we store the current state of the global drawing\n // that only contains the content of this layer\n // (if it is a composition, it also includes the nested layers)\n\n var bufferCtx = buffer.getContext('2d');\n this.clearCanvas(bufferCtx);\n bufferCtx.drawImage(this.canvasContext.canvas, 0, 0); // We clear the canvas again\n\n this.canvasContext.setTransform(1, 0, 0, 1, 0, 0);\n this.clearCanvas(this.canvasContext);\n this.canvasContext.setTransform(this.currentTransform); // We draw the mask\n\n var mask = this.comp.getElementById('tp' in this.data ? this.data.tp : this.data.ind - 1);\n mask.renderFrame(true); // We draw the second buffer (that contains the content of this layer)\n\n this.canvasContext.setTransform(1, 0, 0, 1, 0, 0); // If the mask is a Luma matte, we need to do two extra painting operations\n // the _isProxy check is to avoid drawing a fake canvas in workers that will throw an error\n\n if (this.data.tt >= 3 && !document._isProxy) {\n // We copy the painted mask to a buffer that has a color matrix filter applied to it\n // that applies the rgb values to the alpha channel\n var lumaBuffer = assetLoader.getLumaCanvas(this.canvasContext.canvas);\n var lumaBufferCtx = lumaBuffer.getContext('2d');\n lumaBufferCtx.drawImage(this.canvasContext.canvas, 0, 0);\n this.clearCanvas(this.canvasContext); // we repaint the context with the mask applied to it\n\n this.canvasContext.drawImage(lumaBuffer, 0, 0);\n }\n\n this.canvasContext.globalCompositeOperation = operationsMap[this.data.tt];\n this.canvasContext.drawImage(buffer, 0, 0); // We finally draw the first buffer (that contains the content of the global drawing)\n // We use destination-over to draw the global drawing below the current layer\n\n this.canvasContext.globalCompositeOperation = 'destination-over';\n this.canvasContext.drawImage(this.buffers[0], 0, 0);\n this.canvasContext.setTransform(this.currentTransform); // We reset the globalCompositeOperation to source-over, the standard type of operation\n\n this.canvasContext.globalCompositeOperation = 'source-over';\n }\n },\n renderFrame: function renderFrame(forceRender) {\n if (this.hidden || this.data.hd) {\n return;\n }\n\n if (this.data.td === 1 && !forceRender) {\n return;\n }\n\n this.renderTransform();\n this.renderRenderable();\n this.renderLocalTransform();\n this.setBlendMode();\n var forceRealStack = this.data.ty === 0;\n this.prepareLayer();\n this.globalData.renderer.save(forceRealStack);\n this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props);\n this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity);\n this.renderInnerContent();\n this.globalData.renderer.restore(forceRealStack);\n this.exitLayer();\n\n if (this.maskManager.hasMasks) {\n this.globalData.renderer.restore(true);\n }\n\n if (this._isFirstFrame) {\n this._isFirstFrame = false;\n }\n },\n destroy: function destroy() {\n this.canvasContext = null;\n this.data = null;\n this.globalData = null;\n this.maskManager.destroy();\n },\n mHelper: new Matrix()\n };\n CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;\n CVBaseElement.prototype.show = CVBaseElement.prototype.showElement;\n\n function CVShapeData(element, data, styles, transformsManager) {\n this.styledShapes = [];\n this.tr = [0, 0, 0, 0, 0, 0];\n var ty = 4;\n\n if (data.ty === 'rc') {\n ty = 5;\n } else if (data.ty === 'el') {\n ty = 6;\n } else if (data.ty === 'sr') {\n ty = 7;\n }\n\n this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element);\n var i;\n var len = styles.length;\n var styledShape;\n\n for (i = 0; i < len; i += 1) {\n if (!styles[i].closed) {\n styledShape = {\n transforms: transformsManager.addTransformSequence(styles[i].transforms),\n trNodes: []\n };\n this.styledShapes.push(styledShape);\n styles[i].elements.push(styledShape);\n }\n }\n }\n\n CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;\n\n function CVShapeElement(data, globalData, comp) {\n this.shapes = [];\n this.shapesData = data.shapes;\n this.stylesList = [];\n this.itemsData = [];\n this.prevViewData = [];\n this.shapeModifiers = [];\n this.processedElements = [];\n this.transformsManager = new ShapeTransformManager();\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement);\n CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement;\n CVShapeElement.prototype.transformHelper = {\n opacity: 1,\n _opMdf: false\n };\n CVShapeElement.prototype.dashResetter = [];\n\n CVShapeElement.prototype.createContent = function () {\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);\n };\n\n CVShapeElement.prototype.createStyleElement = function (data, transforms) {\n var styleElem = {\n data: data,\n type: data.ty,\n preTransforms: this.transformsManager.addTransformSequence(transforms),\n transforms: [],\n elements: [],\n closed: data.hd === true\n };\n var elementData = {};\n\n if (data.ty === 'fl' || data.ty === 'st') {\n elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this);\n\n if (!elementData.c.k) {\n styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')';\n }\n } else if (data.ty === 'gf' || data.ty === 'gs') {\n elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this);\n elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this);\n elementData.h = PropertyFactory.getProp(this, data.h || {\n k: 0\n }, 0, 0.01, this);\n elementData.a = PropertyFactory.getProp(this, data.a || {\n k: 0\n }, 0, degToRads, this);\n elementData.g = new GradientProperty(this, data.g, this);\n }\n\n elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this);\n\n if (data.ty === 'st' || data.ty === 'gs') {\n styleElem.lc = lineCapEnum[data.lc || 2];\n styleElem.lj = lineJoinEnum[data.lj || 2];\n\n if (data.lj == 1) {\n // eslint-disable-line eqeqeq\n styleElem.ml = data.ml;\n }\n\n elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this);\n\n if (!elementData.w.k) {\n styleElem.wi = elementData.w.v;\n }\n\n if (data.d) {\n var d = new DashProperty(this, data.d, 'canvas', this);\n elementData.d = d;\n\n if (!elementData.d.k) {\n styleElem.da = elementData.d.dashArray;\n styleElem[\"do\"] = elementData.d.dashoffset[0];\n }\n }\n } else {\n styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero';\n }\n\n this.stylesList.push(styleElem);\n elementData.style = styleElem;\n return elementData;\n };\n\n CVShapeElement.prototype.createGroupElement = function () {\n var elementData = {\n it: [],\n prevViewData: []\n };\n return elementData;\n };\n\n CVShapeElement.prototype.createTransformElement = function (data) {\n var elementData = {\n transform: {\n opacity: 1,\n _opMdf: false,\n key: this.transformsManager.getNewKey(),\n op: PropertyFactory.getProp(this, data.o, 0, 0.01, this),\n mProps: TransformPropertyFactory.getTransformProperty(this, data, this)\n }\n };\n return elementData;\n };\n\n CVShapeElement.prototype.createShapeElement = function (data) {\n var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager);\n this.shapes.push(elementData);\n this.addShapeToModifiers(elementData);\n return elementData;\n };\n\n CVShapeElement.prototype.reloadShapes = function () {\n this._isFirstFrame = true;\n var i;\n var len = this.itemsData.length;\n\n for (i = 0; i < len; i += 1) {\n this.prevViewData[i] = this.itemsData[i];\n }\n\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);\n len = this.dynamicProperties.length;\n\n for (i = 0; i < len; i += 1) {\n this.dynamicProperties[i].getValue();\n }\n\n this.renderModifiers();\n this.transformsManager.processSequences(this._isFirstFrame);\n };\n\n CVShapeElement.prototype.addTransformToStyleList = function (transform) {\n var i;\n var len = this.stylesList.length;\n\n for (i = 0; i < len; i += 1) {\n if (!this.stylesList[i].closed) {\n this.stylesList[i].transforms.push(transform);\n }\n }\n };\n\n CVShapeElement.prototype.removeTransformFromStyleList = function () {\n var i;\n var len = this.stylesList.length;\n\n for (i = 0; i < len; i += 1) {\n if (!this.stylesList[i].closed) {\n this.stylesList[i].transforms.pop();\n }\n }\n };\n\n CVShapeElement.prototype.closeStyles = function (styles) {\n var i;\n var len = styles.length;\n\n for (i = 0; i < len; i += 1) {\n styles[i].closed = true;\n }\n };\n\n CVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) {\n var i;\n var len = arr.length - 1;\n var j;\n var jLen;\n var ownStyles = [];\n var ownModifiers = [];\n var processedPos;\n var modifier;\n var currentTransform;\n var ownTransforms = [].concat(transforms);\n\n for (i = len; i >= 0; i -= 1) {\n processedPos = this.searchProcessedElement(arr[i]);\n\n if (!processedPos) {\n arr[i]._shouldRender = shouldRender;\n } else {\n itemsData[i] = prevViewData[processedPos - 1];\n }\n\n if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {\n if (!processedPos) {\n itemsData[i] = this.createStyleElement(arr[i], ownTransforms);\n } else {\n itemsData[i].style.closed = false;\n }\n\n ownStyles.push(itemsData[i].style);\n } else if (arr[i].ty === 'gr') {\n if (!processedPos) {\n itemsData[i] = this.createGroupElement(arr[i]);\n } else {\n jLen = itemsData[i].it.length;\n\n for (j = 0; j < jLen; j += 1) {\n itemsData[i].prevViewData[j] = itemsData[i].it[j];\n }\n }\n\n this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms);\n } else if (arr[i].ty === 'tr') {\n if (!processedPos) {\n currentTransform = this.createTransformElement(arr[i]);\n itemsData[i] = currentTransform;\n }\n\n ownTransforms.push(itemsData[i]);\n this.addTransformToStyleList(itemsData[i]);\n } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {\n if (!processedPos) {\n itemsData[i] = this.createShapeElement(arr[i]);\n }\n } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb' || arr[i].ty === 'zz' || arr[i].ty === 'op') {\n if (!processedPos) {\n modifier = ShapeModifiers.getModifier(arr[i].ty);\n modifier.init(this, arr[i]);\n itemsData[i] = modifier;\n this.shapeModifiers.push(modifier);\n } else {\n modifier = itemsData[i];\n modifier.closed = false;\n }\n\n ownModifiers.push(modifier);\n } else if (arr[i].ty === 'rp') {\n if (!processedPos) {\n modifier = ShapeModifiers.getModifier(arr[i].ty);\n itemsData[i] = modifier;\n modifier.init(this, arr, i, itemsData);\n this.shapeModifiers.push(modifier);\n shouldRender = false;\n } else {\n modifier = itemsData[i];\n modifier.closed = true;\n }\n\n ownModifiers.push(modifier);\n }\n\n this.addProcessedElement(arr[i], i + 1);\n }\n\n this.removeTransformFromStyleList();\n this.closeStyles(ownStyles);\n len = ownModifiers.length;\n\n for (i = 0; i < len; i += 1) {\n ownModifiers[i].closed = true;\n }\n };\n\n CVShapeElement.prototype.renderInnerContent = function () {\n this.transformHelper.opacity = 1;\n this.transformHelper._opMdf = false;\n this.renderModifiers();\n this.transformsManager.processSequences(this._isFirstFrame);\n this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true);\n };\n\n CVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) {\n if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {\n groupTransform.opacity = parentTransform.opacity;\n groupTransform.opacity *= groupTransform.op.v;\n groupTransform._opMdf = true;\n }\n };\n\n CVShapeElement.prototype.drawLayer = function () {\n var i;\n var len = this.stylesList.length;\n var j;\n var jLen;\n var k;\n var kLen;\n var elems;\n var nodes;\n var renderer = this.globalData.renderer;\n var ctx = this.globalData.canvasContext;\n var type;\n var currentStyle;\n\n for (i = 0; i < len; i += 1) {\n currentStyle = this.stylesList[i];\n type = currentStyle.type; // Skipping style when\n // Stroke width equals 0\n // style should not be rendered (extra unused repeaters)\n // current opacity equals 0\n // global opacity equals 0\n\n if (!((type === 'st' || type === 'gs') && currentStyle.wi === 0 || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) {\n renderer.save();\n elems = currentStyle.elements;\n\n if (type === 'st' || type === 'gs') {\n renderer.ctxStrokeStyle(type === 'st' ? currentStyle.co : currentStyle.grd); // ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd;\n\n renderer.ctxLineWidth(currentStyle.wi); // ctx.lineWidth = currentStyle.wi;\n\n renderer.ctxLineCap(currentStyle.lc); // ctx.lineCap = currentStyle.lc;\n\n renderer.ctxLineJoin(currentStyle.lj); // ctx.lineJoin = currentStyle.lj;\n\n renderer.ctxMiterLimit(currentStyle.ml || 0); // ctx.miterLimit = currentStyle.ml || 0;\n } else {\n renderer.ctxFillStyle(type === 'fl' ? currentStyle.co : currentStyle.grd); // ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd;\n }\n\n renderer.ctxOpacity(currentStyle.coOp);\n\n if (type !== 'st' && type !== 'gs') {\n ctx.beginPath();\n }\n\n renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props);\n jLen = elems.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (type === 'st' || type === 'gs') {\n ctx.beginPath();\n\n if (currentStyle.da) {\n ctx.setLineDash(currentStyle.da);\n ctx.lineDashOffset = currentStyle[\"do\"];\n }\n }\n\n nodes = elems[j].trNodes;\n kLen = nodes.length;\n\n for (k = 0; k < kLen; k += 1) {\n if (nodes[k].t === 'm') {\n ctx.moveTo(nodes[k].p[0], nodes[k].p[1]);\n } else if (nodes[k].t === 'c') {\n ctx.bezierCurveTo(nodes[k].pts[0], nodes[k].pts[1], nodes[k].pts[2], nodes[k].pts[3], nodes[k].pts[4], nodes[k].pts[5]);\n } else {\n ctx.closePath();\n }\n }\n\n if (type === 'st' || type === 'gs') {\n // ctx.stroke();\n renderer.ctxStroke();\n\n if (currentStyle.da) {\n ctx.setLineDash(this.dashResetter);\n }\n }\n }\n\n if (type !== 'st' && type !== 'gs') {\n // ctx.fill(currentStyle.r);\n this.globalData.renderer.ctxFill(currentStyle.r);\n }\n\n renderer.restore();\n }\n }\n };\n\n CVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) {\n var i;\n var len = items.length - 1;\n var groupTransform;\n groupTransform = parentTransform;\n\n for (i = len; i >= 0; i -= 1) {\n if (items[i].ty === 'tr') {\n groupTransform = data[i].transform;\n this.renderShapeTransform(parentTransform, groupTransform);\n } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') {\n this.renderPath(items[i], data[i]);\n } else if (items[i].ty === 'fl') {\n this.renderFill(items[i], data[i], groupTransform);\n } else if (items[i].ty === 'st') {\n this.renderStroke(items[i], data[i], groupTransform);\n } else if (items[i].ty === 'gf' || items[i].ty === 'gs') {\n this.renderGradientFill(items[i], data[i], groupTransform);\n } else if (items[i].ty === 'gr') {\n this.renderShape(groupTransform, items[i].it, data[i].it);\n } else if (items[i].ty === 'tm') {//\n }\n }\n\n if (isMain) {\n this.drawLayer();\n }\n };\n\n CVShapeElement.prototype.renderStyledShape = function (styledShape, shape) {\n if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) {\n var shapeNodes = styledShape.trNodes;\n var paths = shape.paths;\n var i;\n var len;\n var j;\n var jLen = paths._length;\n shapeNodes.length = 0;\n var groupTransformMat = styledShape.transforms.finalTransform;\n\n for (j = 0; j < jLen; j += 1) {\n var pathNodes = paths.shapes[j];\n\n if (pathNodes && pathNodes.v) {\n len = pathNodes._length;\n\n for (i = 1; i < len; i += 1) {\n if (i === 1) {\n shapeNodes.push({\n t: 'm',\n p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)\n });\n }\n\n shapeNodes.push({\n t: 'c',\n pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i])\n });\n }\n\n if (len === 1) {\n shapeNodes.push({\n t: 'm',\n p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)\n });\n }\n\n if (pathNodes.c && len) {\n shapeNodes.push({\n t: 'c',\n pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0])\n });\n shapeNodes.push({\n t: 'z'\n });\n }\n }\n }\n\n styledShape.trNodes = shapeNodes;\n }\n };\n\n CVShapeElement.prototype.renderPath = function (pathData, itemData) {\n if (pathData.hd !== true && pathData._shouldRender) {\n var i;\n var len = itemData.styledShapes.length;\n\n for (i = 0; i < len; i += 1) {\n this.renderStyledShape(itemData.styledShapes[i], itemData.sh);\n }\n }\n };\n\n CVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) {\n var styleElem = itemData.style;\n\n if (itemData.c._mdf || this._isFirstFrame) {\n styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';\n }\n\n if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {\n styleElem.coOp = itemData.o.v * groupTransform.opacity;\n }\n };\n\n CVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) {\n var styleElem = itemData.style;\n var grd;\n\n if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf)) {\n var ctx = this.globalData.canvasContext;\n var pt1 = itemData.s.v;\n var pt2 = itemData.e.v;\n\n if (styleData.t === 1) {\n grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]);\n } else {\n var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\n var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);\n var percent = itemData.h.v;\n\n if (percent >= 1) {\n percent = 0.99;\n } else if (percent <= -1) {\n percent = -0.99;\n }\n\n var dist = rad * percent;\n var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];\n var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];\n grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad);\n }\n\n var i;\n var len = styleData.g.p;\n var cValues = itemData.g.c;\n var opacity = 1;\n\n for (i = 0; i < len; i += 1) {\n if (itemData.g._hasOpacity && itemData.g._collapsable) {\n opacity = itemData.g.o[i * 2 + 1];\n }\n\n grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')');\n }\n\n styleElem.grd = grd;\n }\n\n styleElem.coOp = itemData.o.v * groupTransform.opacity;\n };\n\n CVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) {\n var styleElem = itemData.style;\n var d = itemData.d;\n\n if (d && (d._mdf || this._isFirstFrame)) {\n styleElem.da = d.dashArray;\n styleElem[\"do\"] = d.dashoffset[0];\n }\n\n if (itemData.c._mdf || this._isFirstFrame) {\n styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';\n }\n\n if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {\n styleElem.coOp = itemData.o.v * groupTransform.opacity;\n }\n\n if (itemData.w._mdf || this._isFirstFrame) {\n styleElem.wi = itemData.w.v;\n }\n };\n\n CVShapeElement.prototype.destroy = function () {\n this.shapesData = null;\n this.globalData = null;\n this.canvasContext = null;\n this.stylesList.length = 0;\n this.itemsData.length = 0;\n };\n\n function CVTextElement(data, globalData, comp) {\n this.textSpans = [];\n this.yOffset = 0;\n this.fillColorAnim = false;\n this.strokeColorAnim = false;\n this.strokeWidthAnim = false;\n this.stroke = false;\n this.fill = false;\n this.justifyOffset = 0;\n this.currentRender = null;\n this.renderType = 'canvas';\n this.values = {\n fill: 'rgba(0,0,0,0)',\n stroke: 'rgba(0,0,0,0)',\n sWidth: 0,\n fValue: ''\n };\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement], CVTextElement);\n CVTextElement.prototype.tHelper = createTag('canvas').getContext('2d');\n\n CVTextElement.prototype.buildNewText = function () {\n var documentData = this.textProperty.currentData;\n this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);\n var hasFill = false;\n\n if (documentData.fc) {\n hasFill = true;\n this.values.fill = this.buildColor(documentData.fc);\n } else {\n this.values.fill = 'rgba(0,0,0,0)';\n }\n\n this.fill = hasFill;\n var hasStroke = false;\n\n if (documentData.sc) {\n hasStroke = true;\n this.values.stroke = this.buildColor(documentData.sc);\n this.values.sWidth = documentData.sw;\n }\n\n var fontData = this.globalData.fontManager.getFontByName(documentData.f);\n var i;\n var len;\n var letters = documentData.l;\n var matrixHelper = this.mHelper;\n this.stroke = hasStroke;\n this.values.fValue = documentData.finalSize + 'px ' + this.globalData.fontManager.getFontByName(documentData.f).fFamily;\n len = documentData.finalText.length; // this.tHelper.font = this.values.fValue;\n\n var charData;\n var shapeData;\n var k;\n var kLen;\n var shapes;\n var j;\n var jLen;\n var pathNodes;\n var commands;\n var pathArr;\n var singleShape = this.data.singleShape;\n var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;\n var xPos = 0;\n var yPos = 0;\n var firstLine = true;\n var cnt = 0;\n\n for (i = 0; i < len; i += 1) {\n charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\n shapeData = charData && charData.data || {};\n matrixHelper.reset();\n\n if (singleShape && letters[i].n) {\n xPos = -trackingOffset;\n yPos += documentData.yOffset;\n yPos += firstLine ? 1 : 0;\n firstLine = false;\n }\n\n shapes = shapeData.shapes ? shapeData.shapes[0].it : [];\n jLen = shapes.length;\n matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);\n\n if (singleShape) {\n this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);\n }\n\n commands = createSizedArray(jLen - 1);\n var commandsCounter = 0;\n\n for (j = 0; j < jLen; j += 1) {\n if (shapes[j].ty === 'sh') {\n kLen = shapes[j].ks.k.i.length;\n pathNodes = shapes[j].ks.k;\n pathArr = [];\n\n for (k = 1; k < kLen; k += 1) {\n if (k === 1) {\n pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));\n }\n\n pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToY(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToX(pathNodes.v[k][0], pathNodes.v[k][1], 0), matrixHelper.applyToY(pathNodes.v[k][0], pathNodes.v[k][1], 0));\n }\n\n pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToY(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));\n commands[commandsCounter] = pathArr;\n commandsCounter += 1;\n }\n }\n\n if (singleShape) {\n xPos += letters[i].l;\n xPos += trackingOffset;\n }\n\n if (this.textSpans[cnt]) {\n this.textSpans[cnt].elem = commands;\n } else {\n this.textSpans[cnt] = {\n elem: commands\n };\n }\n\n cnt += 1;\n }\n };\n\n CVTextElement.prototype.renderInnerContent = function () {\n this.validateText();\n var ctx = this.canvasContext;\n ctx.font = this.values.fValue;\n this.globalData.renderer.ctxLineCap('butt'); // ctx.lineCap = 'butt';\n\n this.globalData.renderer.ctxLineJoin('miter'); // ctx.lineJoin = 'miter';\n\n this.globalData.renderer.ctxMiterLimit(4); // ctx.miterLimit = 4;\n\n if (!this.data.singleShape) {\n this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\n }\n\n var i;\n var len;\n var j;\n var jLen;\n var k;\n var kLen;\n var renderedLetters = this.textAnimator.renderedLetters;\n var letters = this.textProperty.currentData.l;\n len = letters.length;\n var renderedLetter;\n var lastFill = null;\n var lastStroke = null;\n var lastStrokeW = null;\n var commands;\n var pathArr;\n var renderer = this.globalData.renderer;\n\n for (i = 0; i < len; i += 1) {\n if (!letters[i].n) {\n renderedLetter = renderedLetters[i];\n\n if (renderedLetter) {\n renderer.save();\n renderer.ctxTransform(renderedLetter.p);\n renderer.ctxOpacity(renderedLetter.o);\n }\n\n if (this.fill) {\n if (renderedLetter && renderedLetter.fc) {\n if (lastFill !== renderedLetter.fc) {\n renderer.ctxFillStyle(renderedLetter.fc);\n lastFill = renderedLetter.fc; // ctx.fillStyle = renderedLetter.fc;\n }\n } else if (lastFill !== this.values.fill) {\n lastFill = this.values.fill;\n renderer.ctxFillStyle(this.values.fill); // ctx.fillStyle = this.values.fill;\n }\n\n commands = this.textSpans[i].elem;\n jLen = commands.length;\n this.globalData.canvasContext.beginPath();\n\n for (j = 0; j < jLen; j += 1) {\n pathArr = commands[j];\n kLen = pathArr.length;\n this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);\n\n for (k = 2; k < kLen; k += 6) {\n this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);\n }\n }\n\n this.globalData.canvasContext.closePath();\n renderer.ctxFill(); // this.globalData.canvasContext.fill();\n /// ctx.fillText(this.textSpans[i].val,0,0);\n }\n\n if (this.stroke) {\n if (renderedLetter && renderedLetter.sw) {\n if (lastStrokeW !== renderedLetter.sw) {\n lastStrokeW = renderedLetter.sw;\n renderer.ctxLineWidth(renderedLetter.sw); // ctx.lineWidth = renderedLetter.sw;\n }\n } else if (lastStrokeW !== this.values.sWidth) {\n lastStrokeW = this.values.sWidth;\n renderer.ctxLineWidth(this.values.sWidth); // ctx.lineWidth = this.values.sWidth;\n }\n\n if (renderedLetter && renderedLetter.sc) {\n if (lastStroke !== renderedLetter.sc) {\n lastStroke = renderedLetter.sc;\n renderer.ctxStrokeStyle(renderedLetter.sc); // ctx.strokeStyle = renderedLetter.sc;\n }\n } else if (lastStroke !== this.values.stroke) {\n lastStroke = this.values.stroke;\n renderer.ctxStrokeStyle(this.values.stroke); // ctx.strokeStyle = this.values.stroke;\n }\n\n commands = this.textSpans[i].elem;\n jLen = commands.length;\n this.globalData.canvasContext.beginPath();\n\n for (j = 0; j < jLen; j += 1) {\n pathArr = commands[j];\n kLen = pathArr.length;\n this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);\n\n for (k = 2; k < kLen; k += 6) {\n this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);\n }\n }\n\n this.globalData.canvasContext.closePath();\n renderer.ctxStroke(); // this.globalData.canvasContext.stroke();\n /// ctx.strokeText(letters[i].val,0,0);\n }\n\n if (renderedLetter) {\n this.globalData.renderer.restore();\n }\n }\n }\n };\n\n function CVImageElement(data, globalData, comp) {\n this.assetData = globalData.getAssetData(data.refId);\n this.img = globalData.imageLoader.getAsset(this.assetData);\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement);\n CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement;\n CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;\n\n CVImageElement.prototype.createContent = function () {\n if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) {\n var canvas = createTag('canvas');\n canvas.width = this.assetData.w;\n canvas.height = this.assetData.h;\n var ctx = canvas.getContext('2d');\n var imgW = this.img.width;\n var imgH = this.img.height;\n var imgRel = imgW / imgH;\n var canvasRel = this.assetData.w / this.assetData.h;\n var widthCrop;\n var heightCrop;\n var par = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio;\n\n if (imgRel > canvasRel && par === 'xMidYMid slice' || imgRel < canvasRel && par !== 'xMidYMid slice') {\n heightCrop = imgH;\n widthCrop = heightCrop * canvasRel;\n } else {\n widthCrop = imgW;\n heightCrop = widthCrop / canvasRel;\n }\n\n ctx.drawImage(this.img, (imgW - widthCrop) / 2, (imgH - heightCrop) / 2, widthCrop, heightCrop, 0, 0, this.assetData.w, this.assetData.h);\n this.img = canvas;\n }\n };\n\n CVImageElement.prototype.renderInnerContent = function () {\n this.canvasContext.drawImage(this.img, 0, 0);\n };\n\n CVImageElement.prototype.destroy = function () {\n this.img = null;\n };\n\n function CVSolidElement(data, globalData, comp) {\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);\n CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;\n CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;\n\n CVSolidElement.prototype.renderInnerContent = function () {\n // var ctx = this.canvasContext;\n this.globalData.renderer.ctxFillStyle(this.data.sc); // ctx.fillStyle = this.data.sc;\n\n this.globalData.renderer.ctxFillRect(0, 0, this.data.sw, this.data.sh); // ctx.fillRect(0, 0, this.data.sw, this.data.sh);\n //\n };\n\n function CanvasRendererBase() {}\n\n extendPrototype([BaseRenderer], CanvasRendererBase);\n\n CanvasRendererBase.prototype.createShape = function (data) {\n return new CVShapeElement(data, this.globalData, this);\n };\n\n CanvasRendererBase.prototype.createText = function (data) {\n return new CVTextElement(data, this.globalData, this);\n };\n\n CanvasRendererBase.prototype.createImage = function (data) {\n return new CVImageElement(data, this.globalData, this);\n };\n\n CanvasRendererBase.prototype.createSolid = function (data) {\n return new CVSolidElement(data, this.globalData, this);\n };\n\n CanvasRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;\n\n CanvasRendererBase.prototype.ctxTransform = function (props) {\n if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) {\n return;\n }\n\n this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]);\n };\n\n CanvasRendererBase.prototype.ctxOpacity = function (op) {\n this.canvasContext.globalAlpha *= op < 0 ? 0 : op;\n };\n\n CanvasRendererBase.prototype.ctxFillStyle = function (value) {\n this.canvasContext.fillStyle = value;\n };\n\n CanvasRendererBase.prototype.ctxStrokeStyle = function (value) {\n this.canvasContext.strokeStyle = value;\n };\n\n CanvasRendererBase.prototype.ctxLineWidth = function (value) {\n this.canvasContext.lineWidth = value;\n };\n\n CanvasRendererBase.prototype.ctxLineCap = function (value) {\n this.canvasContext.lineCap = value;\n };\n\n CanvasRendererBase.prototype.ctxLineJoin = function (value) {\n this.canvasContext.lineJoin = value;\n };\n\n CanvasRendererBase.prototype.ctxMiterLimit = function (value) {\n this.canvasContext.miterLimit = value;\n };\n\n CanvasRendererBase.prototype.ctxFill = function (rule) {\n this.canvasContext.fill(rule);\n };\n\n CanvasRendererBase.prototype.ctxFillRect = function (x, y, w, h) {\n this.canvasContext.fillRect(x, y, w, h);\n };\n\n CanvasRendererBase.prototype.ctxStroke = function () {\n this.canvasContext.stroke();\n };\n\n CanvasRendererBase.prototype.reset = function () {\n if (!this.renderConfig.clearCanvas) {\n this.canvasContext.restore();\n return;\n }\n\n this.contextData.reset();\n };\n\n CanvasRendererBase.prototype.save = function () {\n this.canvasContext.save();\n };\n\n CanvasRendererBase.prototype.restore = function (actionFlag) {\n if (!this.renderConfig.clearCanvas) {\n this.canvasContext.restore();\n return;\n }\n\n if (actionFlag) {\n this.globalData.blendMode = 'source-over';\n }\n\n this.contextData.restore(actionFlag);\n };\n\n CanvasRendererBase.prototype.configAnimation = function (animData) {\n if (this.animationItem.wrapper) {\n this.animationItem.container = createTag('canvas');\n var containerStyle = this.animationItem.container.style;\n containerStyle.width = '100%';\n containerStyle.height = '100%';\n var origin = '0px 0px 0px';\n containerStyle.transformOrigin = origin;\n containerStyle.mozTransformOrigin = origin;\n containerStyle.webkitTransformOrigin = origin;\n containerStyle['-webkit-transform'] = origin;\n containerStyle.contentVisibility = this.renderConfig.contentVisibility;\n this.animationItem.wrapper.appendChild(this.animationItem.container);\n this.canvasContext = this.animationItem.container.getContext('2d');\n\n if (this.renderConfig.className) {\n this.animationItem.container.setAttribute('class', this.renderConfig.className);\n }\n\n if (this.renderConfig.id) {\n this.animationItem.container.setAttribute('id', this.renderConfig.id);\n }\n } else {\n this.canvasContext = this.renderConfig.context;\n }\n\n this.contextData.setContext(this.canvasContext);\n this.data = animData;\n this.layers = animData.layers;\n this.transformCanvas = {\n w: animData.w,\n h: animData.h,\n sx: 0,\n sy: 0,\n tx: 0,\n ty: 0\n };\n this.setupGlobalData(animData, document.body);\n this.globalData.canvasContext = this.canvasContext;\n this.globalData.renderer = this;\n this.globalData.isDashed = false;\n this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;\n this.globalData.transformCanvas = this.transformCanvas;\n this.elements = createSizedArray(animData.layers.length);\n this.updateContainerSize();\n };\n\n CanvasRendererBase.prototype.updateContainerSize = function (width, height) {\n this.reset();\n var elementWidth;\n var elementHeight;\n\n if (width) {\n elementWidth = width;\n elementHeight = height;\n this.canvasContext.canvas.width = elementWidth;\n this.canvasContext.canvas.height = elementHeight;\n } else {\n if (this.animationItem.wrapper && this.animationItem.container) {\n elementWidth = this.animationItem.wrapper.offsetWidth;\n elementHeight = this.animationItem.wrapper.offsetHeight;\n } else {\n elementWidth = this.canvasContext.canvas.width;\n elementHeight = this.canvasContext.canvas.height;\n }\n\n this.canvasContext.canvas.width = elementWidth * this.renderConfig.dpr;\n this.canvasContext.canvas.height = elementHeight * this.renderConfig.dpr;\n }\n\n var elementRel;\n var animationRel;\n\n if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) {\n var par = this.renderConfig.preserveAspectRatio.split(' ');\n var fillType = par[1] || 'meet';\n var pos = par[0] || 'xMidYMid';\n var xPos = pos.substr(0, 4);\n var yPos = pos.substr(4);\n elementRel = elementWidth / elementHeight;\n animationRel = this.transformCanvas.w / this.transformCanvas.h;\n\n if (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice') {\n this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\n this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\n } else {\n this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\n this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\n }\n\n if (xPos === 'xMid' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {\n this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2 * this.renderConfig.dpr;\n } else if (xPos === 'xMax' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {\n this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr;\n } else {\n this.transformCanvas.tx = 0;\n }\n\n if (yPos === 'YMid' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {\n this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2 * this.renderConfig.dpr;\n } else if (yPos === 'YMax' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {\n this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) * this.renderConfig.dpr;\n } else {\n this.transformCanvas.ty = 0;\n }\n } else if (this.renderConfig.preserveAspectRatio === 'none') {\n this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\n this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\n this.transformCanvas.tx = 0;\n this.transformCanvas.ty = 0;\n } else {\n this.transformCanvas.sx = this.renderConfig.dpr;\n this.transformCanvas.sy = this.renderConfig.dpr;\n this.transformCanvas.tx = 0;\n this.transformCanvas.ty = 0;\n }\n\n this.transformCanvas.props = [this.transformCanvas.sx, 0, 0, 0, 0, this.transformCanvas.sy, 0, 0, 0, 0, 1, 0, this.transformCanvas.tx, this.transformCanvas.ty, 0, 1];\n /* var i, len = this.elements.length;\r\n for(i=0;i= 0; i -= 1) {\n if (this.elements[i] && this.elements[i].destroy) {\n this.elements[i].destroy();\n }\n }\n\n this.elements.length = 0;\n this.globalData.canvasContext = null;\n this.animationItem.container = null;\n this.destroyed = true;\n };\n\n CanvasRendererBase.prototype.renderFrame = function (num, forceRender) {\n if (this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender || this.destroyed || num === -1) {\n return;\n }\n\n this.renderedFrame = num;\n this.globalData.frameNum = num - this.animationItem._isFirstFrame;\n this.globalData.frameId += 1;\n this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;\n this.globalData.projectInterface.currentFrame = num; // console.log('--------');\n // console.log('NEW: ',num);\n\n var i;\n var len = this.layers.length;\n\n if (!this.completeLayers) {\n this.checkLayers(num);\n }\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].prepareFrame(num - this.layers[i].st);\n }\n }\n\n if (this.globalData._mdf) {\n if (this.renderConfig.clearCanvas === true) {\n this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);\n } else {\n this.save();\n }\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].renderFrame();\n }\n }\n\n if (this.renderConfig.clearCanvas !== true) {\n this.restore();\n }\n }\n };\n\n CanvasRendererBase.prototype.buildItem = function (pos) {\n var elements = this.elements;\n\n if (elements[pos] || this.layers[pos].ty === 99) {\n return;\n }\n\n var element = this.createItem(this.layers[pos], this, this.globalData);\n elements[pos] = element;\n element.initExpressions();\n /* if(this.layers[pos].ty === 0){\r\n element.resize(this.globalData.transformCanvas);\r\n } */\n };\n\n CanvasRendererBase.prototype.checkPendingElements = function () {\n while (this.pendingElements.length) {\n var element = this.pendingElements.pop();\n element.checkParenting();\n }\n };\n\n CanvasRendererBase.prototype.hide = function () {\n this.animationItem.container.style.display = 'none';\n };\n\n CanvasRendererBase.prototype.show = function () {\n this.animationItem.container.style.display = 'block';\n };\n\n function CanvasContext() {\n this.opacity = -1;\n this.transform = createTypedArray('float32', 16);\n this.fillStyle = '';\n this.strokeStyle = '';\n this.lineWidth = '';\n this.lineCap = '';\n this.lineJoin = '';\n this.miterLimit = '';\n this.id = Math.random();\n }\n\n function CVContextData() {\n this.stack = [];\n this.cArrPos = 0;\n this.cTr = new Matrix();\n var i;\n var len = 15;\n\n for (i = 0; i < len; i += 1) {\n var canvasContext = new CanvasContext();\n this.stack[i] = canvasContext;\n }\n\n this._length = len;\n this.nativeContext = null;\n this.transformMat = new Matrix();\n this.currentOpacity = 1; //\n\n this.currentFillStyle = '';\n this.appliedFillStyle = ''; //\n\n this.currentStrokeStyle = '';\n this.appliedStrokeStyle = ''; //\n\n this.currentLineWidth = '';\n this.appliedLineWidth = ''; //\n\n this.currentLineCap = '';\n this.appliedLineCap = ''; //\n\n this.currentLineJoin = '';\n this.appliedLineJoin = ''; //\n\n this.appliedMiterLimit = '';\n this.currentMiterLimit = '';\n }\n\n CVContextData.prototype.duplicate = function () {\n var newLength = this._length * 2;\n var i = 0;\n\n for (i = this._length; i < newLength; i += 1) {\n this.stack[i] = new CanvasContext();\n }\n\n this._length = newLength;\n };\n\n CVContextData.prototype.reset = function () {\n this.cArrPos = 0;\n this.cTr.reset();\n this.stack[this.cArrPos].opacity = 1;\n };\n\n CVContextData.prototype.restore = function (forceRestore) {\n this.cArrPos -= 1;\n var currentContext = this.stack[this.cArrPos];\n var transform = currentContext.transform;\n var i;\n var arr = this.cTr.props;\n\n for (i = 0; i < 16; i += 1) {\n arr[i] = transform[i];\n }\n\n if (forceRestore) {\n this.nativeContext.restore();\n var prevStack = this.stack[this.cArrPos + 1];\n this.appliedFillStyle = prevStack.fillStyle;\n this.appliedStrokeStyle = prevStack.strokeStyle;\n this.appliedLineWidth = prevStack.lineWidth;\n this.appliedLineCap = prevStack.lineCap;\n this.appliedLineJoin = prevStack.lineJoin;\n this.appliedMiterLimit = prevStack.miterLimit;\n }\n\n this.nativeContext.setTransform(transform[0], transform[1], transform[4], transform[5], transform[12], transform[13]);\n\n if (forceRestore || currentContext.opacity !== -1 && this.currentOpacity !== currentContext.opacity) {\n this.nativeContext.globalAlpha = currentContext.opacity;\n this.currentOpacity = currentContext.opacity;\n }\n\n this.currentFillStyle = currentContext.fillStyle;\n this.currentStrokeStyle = currentContext.strokeStyle;\n this.currentLineWidth = currentContext.lineWidth;\n this.currentLineCap = currentContext.lineCap;\n this.currentLineJoin = currentContext.lineJoin;\n this.currentMiterLimit = currentContext.miterLimit;\n };\n\n CVContextData.prototype.save = function (saveOnNativeFlag) {\n if (saveOnNativeFlag) {\n this.nativeContext.save();\n }\n\n var props = this.cTr.props;\n\n if (this._length <= this.cArrPos) {\n this.duplicate();\n }\n\n var currentStack = this.stack[this.cArrPos];\n var i;\n\n for (i = 0; i < 16; i += 1) {\n currentStack.transform[i] = props[i];\n }\n\n this.cArrPos += 1;\n var newStack = this.stack[this.cArrPos];\n newStack.opacity = currentStack.opacity;\n newStack.fillStyle = currentStack.fillStyle;\n newStack.strokeStyle = currentStack.strokeStyle;\n newStack.lineWidth = currentStack.lineWidth;\n newStack.lineCap = currentStack.lineCap;\n newStack.lineJoin = currentStack.lineJoin;\n newStack.miterLimit = currentStack.miterLimit;\n };\n\n CVContextData.prototype.setOpacity = function (value) {\n this.stack[this.cArrPos].opacity = value;\n };\n\n CVContextData.prototype.setContext = function (value) {\n this.nativeContext = value;\n };\n\n CVContextData.prototype.fillStyle = function (value) {\n if (this.stack[this.cArrPos].fillStyle !== value) {\n this.currentFillStyle = value;\n this.stack[this.cArrPos].fillStyle = value;\n }\n };\n\n CVContextData.prototype.strokeStyle = function (value) {\n if (this.stack[this.cArrPos].strokeStyle !== value) {\n this.currentStrokeStyle = value;\n this.stack[this.cArrPos].strokeStyle = value;\n }\n };\n\n CVContextData.prototype.lineWidth = function (value) {\n if (this.stack[this.cArrPos].lineWidth !== value) {\n this.currentLineWidth = value;\n this.stack[this.cArrPos].lineWidth = value;\n }\n };\n\n CVContextData.prototype.lineCap = function (value) {\n if (this.stack[this.cArrPos].lineCap !== value) {\n this.currentLineCap = value;\n this.stack[this.cArrPos].lineCap = value;\n }\n };\n\n CVContextData.prototype.lineJoin = function (value) {\n if (this.stack[this.cArrPos].lineJoin !== value) {\n this.currentLineJoin = value;\n this.stack[this.cArrPos].lineJoin = value;\n }\n };\n\n CVContextData.prototype.miterLimit = function (value) {\n if (this.stack[this.cArrPos].miterLimit !== value) {\n this.currentMiterLimit = value;\n this.stack[this.cArrPos].miterLimit = value;\n }\n };\n\n CVContextData.prototype.transform = function (props) {\n this.transformMat.cloneFromProps(props); // Taking the last transform value from the stored stack of transforms\n\n var currentTransform = this.cTr; // Applying the last transform value after the new transform to respect the order of transformations\n\n this.transformMat.multiply(currentTransform); // Storing the new transformed value in the stored transform\n\n currentTransform.cloneFromProps(this.transformMat.props);\n var trProps = currentTransform.props; // Applying the new transform to the canvas\n\n this.nativeContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]);\n };\n\n CVContextData.prototype.opacity = function (op) {\n var currentOpacity = this.stack[this.cArrPos].opacity;\n currentOpacity *= op < 0 ? 0 : op;\n\n if (this.stack[this.cArrPos].opacity !== currentOpacity) {\n if (this.currentOpacity !== op) {\n this.nativeContext.globalAlpha = op;\n this.currentOpacity = op;\n }\n\n this.stack[this.cArrPos].opacity = currentOpacity;\n }\n };\n\n CVContextData.prototype.fill = function (rule) {\n if (this.appliedFillStyle !== this.currentFillStyle) {\n this.appliedFillStyle = this.currentFillStyle;\n this.nativeContext.fillStyle = this.appliedFillStyle;\n }\n\n this.nativeContext.fill(rule);\n };\n\n CVContextData.prototype.fillRect = function (x, y, w, h) {\n if (this.appliedFillStyle !== this.currentFillStyle) {\n this.appliedFillStyle = this.currentFillStyle;\n this.nativeContext.fillStyle = this.appliedFillStyle;\n }\n\n this.nativeContext.fillRect(x, y, w, h);\n };\n\n CVContextData.prototype.stroke = function () {\n if (this.appliedStrokeStyle !== this.currentStrokeStyle) {\n this.appliedStrokeStyle = this.currentStrokeStyle;\n this.nativeContext.strokeStyle = this.appliedStrokeStyle;\n }\n\n if (this.appliedLineWidth !== this.currentLineWidth) {\n this.appliedLineWidth = this.currentLineWidth;\n this.nativeContext.lineWidth = this.appliedLineWidth;\n }\n\n if (this.appliedLineCap !== this.currentLineCap) {\n this.appliedLineCap = this.currentLineCap;\n this.nativeContext.lineCap = this.appliedLineCap;\n }\n\n if (this.appliedLineJoin !== this.currentLineJoin) {\n this.appliedLineJoin = this.currentLineJoin;\n this.nativeContext.lineJoin = this.appliedLineJoin;\n }\n\n if (this.appliedMiterLimit !== this.currentMiterLimit) {\n this.appliedMiterLimit = this.currentMiterLimit;\n this.nativeContext.miterLimit = this.appliedMiterLimit;\n }\n\n this.nativeContext.stroke();\n };\n\n function CVCompElement(data, globalData, comp) {\n this.completeLayers = false;\n this.layers = data.layers;\n this.pendingElements = [];\n this.elements = createSizedArray(this.layers.length);\n this.initElement(data, globalData, comp);\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\n _placeholder: true\n };\n }\n\n extendPrototype([CanvasRendererBase, ICompElement, CVBaseElement], CVCompElement);\n\n CVCompElement.prototype.renderInnerContent = function () {\n var ctx = this.canvasContext;\n ctx.beginPath();\n ctx.moveTo(0, 0);\n ctx.lineTo(this.data.w, 0);\n ctx.lineTo(this.data.w, this.data.h);\n ctx.lineTo(0, this.data.h);\n ctx.lineTo(0, 0);\n ctx.clip();\n var i;\n var len = this.layers.length;\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].renderFrame();\n }\n }\n };\n\n CVCompElement.prototype.destroy = function () {\n var i;\n var len = this.layers.length;\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (this.elements[i]) {\n this.elements[i].destroy();\n }\n }\n\n this.layers = null;\n this.elements = null;\n };\n\n CVCompElement.prototype.createComp = function (data) {\n return new CVCompElement(data, this.globalData, this);\n };\n\n function CanvasRenderer(animationItem, config) {\n this.animationItem = animationItem;\n this.renderConfig = {\n clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,\n context: config && config.context || null,\n progressiveLoad: config && config.progressiveLoad || false,\n preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\n contentVisibility: config && config.contentVisibility || 'visible',\n className: config && config.className || '',\n id: config && config.id || '',\n runExpressions: !config || config.runExpressions === undefined || config.runExpressions\n };\n this.renderConfig.dpr = config && config.dpr || 1;\n\n if (this.animationItem.wrapper) {\n this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;\n }\n\n this.renderedFrame = -1;\n this.globalData = {\n frameNum: -1,\n _mdf: false,\n renderConfig: this.renderConfig,\n currentGlobalAlpha: -1\n };\n this.contextData = new CVContextData();\n this.elements = [];\n this.pendingElements = [];\n this.transformMat = new Matrix();\n this.completeLayers = false;\n this.rendererType = 'canvas';\n\n if (this.renderConfig.clearCanvas) {\n this.ctxTransform = this.contextData.transform.bind(this.contextData);\n this.ctxOpacity = this.contextData.opacity.bind(this.contextData);\n this.ctxFillStyle = this.contextData.fillStyle.bind(this.contextData);\n this.ctxStrokeStyle = this.contextData.strokeStyle.bind(this.contextData);\n this.ctxLineWidth = this.contextData.lineWidth.bind(this.contextData);\n this.ctxLineCap = this.contextData.lineCap.bind(this.contextData);\n this.ctxLineJoin = this.contextData.lineJoin.bind(this.contextData);\n this.ctxMiterLimit = this.contextData.miterLimit.bind(this.contextData);\n this.ctxFill = this.contextData.fill.bind(this.contextData);\n this.ctxFillRect = this.contextData.fillRect.bind(this.contextData);\n this.ctxStroke = this.contextData.stroke.bind(this.contextData);\n this.save = this.contextData.save.bind(this.contextData);\n }\n }\n\n extendPrototype([CanvasRendererBase], CanvasRenderer);\n\n CanvasRenderer.prototype.createComp = function (data) {\n return new CVCompElement(data, this.globalData, this);\n };\n\n function HBaseElement() {}\n\n HBaseElement.prototype = {\n checkBlendMode: function checkBlendMode() {},\n initRendererElement: function initRendererElement() {\n this.baseElement = createTag(this.data.tg || 'div');\n\n if (this.data.hasMask) {\n this.svgElement = createNS('svg');\n this.layerElement = createNS('g');\n this.maskedElement = this.layerElement;\n this.svgElement.appendChild(this.layerElement);\n this.baseElement.appendChild(this.svgElement);\n } else {\n this.layerElement = this.baseElement;\n }\n\n styleDiv(this.baseElement);\n },\n createContainerElements: function createContainerElements() {\n this.renderableEffectsManager = new CVEffects(this);\n this.transformedElement = this.baseElement;\n this.maskedElement = this.layerElement;\n\n if (this.data.ln) {\n this.layerElement.setAttribute('id', this.data.ln);\n }\n\n if (this.data.cl) {\n this.layerElement.setAttribute('class', this.data.cl);\n }\n\n if (this.data.bm !== 0) {\n this.setBlendMode();\n }\n },\n renderElement: function renderElement() {\n var transformedElementStyle = this.transformedElement ? this.transformedElement.style : {};\n\n if (this.finalTransform._matMdf) {\n var matrixValue = this.finalTransform.mat.toCSS();\n transformedElementStyle.transform = matrixValue;\n transformedElementStyle.webkitTransform = matrixValue;\n }\n\n if (this.finalTransform._opMdf) {\n transformedElementStyle.opacity = this.finalTransform.mProp.o.v;\n }\n },\n renderFrame: function renderFrame() {\n // If it is exported as hidden (data.hd === true) no need to render\n // If it is not visible no need to render\n if (this.data.hd || this.hidden) {\n return;\n }\n\n this.renderTransform();\n this.renderRenderable();\n this.renderElement();\n this.renderInnerContent();\n\n if (this._isFirstFrame) {\n this._isFirstFrame = false;\n }\n },\n destroy: function destroy() {\n this.layerElement = null;\n this.transformedElement = null;\n\n if (this.matteElement) {\n this.matteElement = null;\n }\n\n if (this.maskManager) {\n this.maskManager.destroy();\n this.maskManager = null;\n }\n },\n createRenderableComponents: function createRenderableComponents() {\n this.maskManager = new MaskElement(this.data, this, this.globalData);\n },\n addEffects: function addEffects() {},\n setMatte: function setMatte() {}\n };\n HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement;\n HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy;\n HBaseElement.prototype.buildElementParenting = BaseRenderer.prototype.buildElementParenting;\n\n function HSolidElement(data, globalData, comp) {\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], HSolidElement);\n\n HSolidElement.prototype.createContent = function () {\n var rect;\n\n if (this.data.hasMask) {\n rect = createNS('rect');\n rect.setAttribute('width', this.data.sw);\n rect.setAttribute('height', this.data.sh);\n rect.setAttribute('fill', this.data.sc);\n this.svgElement.setAttribute('width', this.data.sw);\n this.svgElement.setAttribute('height', this.data.sh);\n } else {\n rect = createTag('div');\n rect.style.width = this.data.sw + 'px';\n rect.style.height = this.data.sh + 'px';\n rect.style.backgroundColor = this.data.sc;\n }\n\n this.layerElement.appendChild(rect);\n };\n\n function HShapeElement(data, globalData, comp) {\n // List of drawable elements\n this.shapes = []; // Full shape data\n\n this.shapesData = data.shapes; // List of styles that will be applied to shapes\n\n this.stylesList = []; // List of modifiers that will be applied to shapes\n\n this.shapeModifiers = []; // List of items in shape tree\n\n this.itemsData = []; // List of items in previous shape tree\n\n this.processedElements = []; // List of animated components\n\n this.animatedContents = [];\n this.shapesContainer = createNS('g');\n this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\n // List of elements that have been created\n\n this.prevViewData = [];\n this.currentBBox = {\n x: 999999,\n y: -999999,\n h: 0,\n w: 0\n };\n }\n\n extendPrototype([BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement, HierarchyElement, FrameElement, RenderableElement], HShapeElement);\n HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent;\n\n HShapeElement.prototype.createContent = function () {\n var cont;\n this.baseElement.style.fontSize = 0;\n\n if (this.data.hasMask) {\n this.layerElement.appendChild(this.shapesContainer);\n cont = this.svgElement;\n } else {\n cont = createNS('svg');\n var size = this.comp.data ? this.comp.data : this.globalData.compSize;\n cont.setAttribute('width', size.w);\n cont.setAttribute('height', size.h);\n cont.appendChild(this.shapesContainer);\n this.layerElement.appendChild(cont);\n }\n\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.shapesContainer, 0, [], true);\n this.filterUniqueShapes();\n this.shapeCont = cont;\n };\n\n HShapeElement.prototype.getTransformedPoint = function (transformers, point) {\n var i;\n var len = transformers.length;\n\n for (i = 0; i < len; i += 1) {\n point = transformers[i].mProps.v.applyToPointArray(point[0], point[1], 0);\n }\n\n return point;\n };\n\n HShapeElement.prototype.calculateShapeBoundingBox = function (item, boundingBox) {\n var shape = item.sh.v;\n var transformers = item.transformers;\n var i;\n var len = shape._length;\n var vPoint;\n var oPoint;\n var nextIPoint;\n var nextVPoint;\n\n if (len <= 1) {\n return;\n }\n\n for (i = 0; i < len - 1; i += 1) {\n vPoint = this.getTransformedPoint(transformers, shape.v[i]);\n oPoint = this.getTransformedPoint(transformers, shape.o[i]);\n nextIPoint = this.getTransformedPoint(transformers, shape.i[i + 1]);\n nextVPoint = this.getTransformedPoint(transformers, shape.v[i + 1]);\n this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);\n }\n\n if (shape.c) {\n vPoint = this.getTransformedPoint(transformers, shape.v[i]);\n oPoint = this.getTransformedPoint(transformers, shape.o[i]);\n nextIPoint = this.getTransformedPoint(transformers, shape.i[0]);\n nextVPoint = this.getTransformedPoint(transformers, shape.v[0]);\n this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);\n }\n };\n\n HShapeElement.prototype.checkBounds = function (vPoint, oPoint, nextIPoint, nextVPoint, boundingBox) {\n this.getBoundsOfCurve(vPoint, oPoint, nextIPoint, nextVPoint);\n var bounds = this.shapeBoundingBox;\n boundingBox.x = bmMin(bounds.left, boundingBox.x);\n boundingBox.xMax = bmMax(bounds.right, boundingBox.xMax);\n boundingBox.y = bmMin(bounds.top, boundingBox.y);\n boundingBox.yMax = bmMax(bounds.bottom, boundingBox.yMax);\n };\n\n HShapeElement.prototype.shapeBoundingBox = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n };\n HShapeElement.prototype.tempBoundingBox = {\n x: 0,\n xMax: 0,\n y: 0,\n yMax: 0,\n width: 0,\n height: 0\n };\n\n HShapeElement.prototype.getBoundsOfCurve = function (p0, p1, p2, p3) {\n var bounds = [[p0[0], p3[0]], [p0[1], p3[1]]];\n\n for (var a, b, c, t, b2ac, t1, t2, i = 0; i < 2; ++i) {\n // eslint-disable-line no-plusplus\n b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];\n a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];\n c = 3 * p1[i] - 3 * p0[i];\n b |= 0; // eslint-disable-line no-bitwise\n\n a |= 0; // eslint-disable-line no-bitwise\n\n c |= 0; // eslint-disable-line no-bitwise\n\n if (a === 0 && b === 0) {//\n } else if (a === 0) {\n t = -c / b;\n\n if (t > 0 && t < 1) {\n bounds[i].push(this.calculateF(t, p0, p1, p2, p3, i));\n }\n } else {\n b2ac = b * b - 4 * c * a;\n\n if (b2ac >= 0) {\n t1 = (-b + bmSqrt(b2ac)) / (2 * a);\n if (t1 > 0 && t1 < 1) bounds[i].push(this.calculateF(t1, p0, p1, p2, p3, i));\n t2 = (-b - bmSqrt(b2ac)) / (2 * a);\n if (t2 > 0 && t2 < 1) bounds[i].push(this.calculateF(t2, p0, p1, p2, p3, i));\n }\n }\n }\n\n this.shapeBoundingBox.left = bmMin.apply(null, bounds[0]);\n this.shapeBoundingBox.top = bmMin.apply(null, bounds[1]);\n this.shapeBoundingBox.right = bmMax.apply(null, bounds[0]);\n this.shapeBoundingBox.bottom = bmMax.apply(null, bounds[1]);\n };\n\n HShapeElement.prototype.calculateF = function (t, p0, p1, p2, p3, i) {\n return bmPow(1 - t, 3) * p0[i] + 3 * bmPow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * bmPow(t, 2) * p2[i] + bmPow(t, 3) * p3[i];\n };\n\n HShapeElement.prototype.calculateBoundingBox = function (itemsData, boundingBox) {\n var i;\n var len = itemsData.length;\n\n for (i = 0; i < len; i += 1) {\n if (itemsData[i] && itemsData[i].sh) {\n this.calculateShapeBoundingBox(itemsData[i], boundingBox);\n } else if (itemsData[i] && itemsData[i].it) {\n this.calculateBoundingBox(itemsData[i].it, boundingBox);\n } else if (itemsData[i] && itemsData[i].style && itemsData[i].w) {\n this.expandStrokeBoundingBox(itemsData[i].w, boundingBox);\n }\n }\n };\n\n HShapeElement.prototype.expandStrokeBoundingBox = function (widthProperty, boundingBox) {\n var width = 0;\n\n if (widthProperty.keyframes) {\n for (var i = 0; i < widthProperty.keyframes.length; i += 1) {\n var kfw = widthProperty.keyframes[i].s;\n\n if (kfw > width) {\n width = kfw;\n }\n }\n\n width *= widthProperty.mult;\n } else {\n width = widthProperty.v * widthProperty.mult;\n }\n\n boundingBox.x -= width;\n boundingBox.xMax += width;\n boundingBox.y -= width;\n boundingBox.yMax += width;\n };\n\n HShapeElement.prototype.currentBoxContains = function (box) {\n return this.currentBBox.x <= box.x && this.currentBBox.y <= box.y && this.currentBBox.width + this.currentBBox.x >= box.x + box.width && this.currentBBox.height + this.currentBBox.y >= box.y + box.height;\n };\n\n HShapeElement.prototype.renderInnerContent = function () {\n this._renderShapeFrame();\n\n if (!this.hidden && (this._isFirstFrame || this._mdf)) {\n var tempBoundingBox = this.tempBoundingBox;\n var max = 999999;\n tempBoundingBox.x = max;\n tempBoundingBox.xMax = -max;\n tempBoundingBox.y = max;\n tempBoundingBox.yMax = -max;\n this.calculateBoundingBox(this.itemsData, tempBoundingBox);\n tempBoundingBox.width = tempBoundingBox.xMax < tempBoundingBox.x ? 0 : tempBoundingBox.xMax - tempBoundingBox.x;\n tempBoundingBox.height = tempBoundingBox.yMax < tempBoundingBox.y ? 0 : tempBoundingBox.yMax - tempBoundingBox.y; // var tempBoundingBox = this.shapeCont.getBBox();\n\n if (this.currentBoxContains(tempBoundingBox)) {\n return;\n }\n\n var changed = false;\n\n if (this.currentBBox.w !== tempBoundingBox.width) {\n this.currentBBox.w = tempBoundingBox.width;\n this.shapeCont.setAttribute('width', tempBoundingBox.width);\n changed = true;\n }\n\n if (this.currentBBox.h !== tempBoundingBox.height) {\n this.currentBBox.h = tempBoundingBox.height;\n this.shapeCont.setAttribute('height', tempBoundingBox.height);\n changed = true;\n }\n\n if (changed || this.currentBBox.x !== tempBoundingBox.x || this.currentBBox.y !== tempBoundingBox.y) {\n this.currentBBox.w = tempBoundingBox.width;\n this.currentBBox.h = tempBoundingBox.height;\n this.currentBBox.x = tempBoundingBox.x;\n this.currentBBox.y = tempBoundingBox.y;\n this.shapeCont.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);\n var shapeStyle = this.shapeCont.style;\n var shapeTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';\n shapeStyle.transform = shapeTransform;\n shapeStyle.webkitTransform = shapeTransform;\n }\n }\n };\n\n function HTextElement(data, globalData, comp) {\n this.textSpans = [];\n this.textPaths = [];\n this.currentBBox = {\n x: 999999,\n y: -999999,\n h: 0,\n w: 0\n };\n this.renderType = 'svg';\n this.isMasked = false;\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], HTextElement);\n\n HTextElement.prototype.createContent = function () {\n this.isMasked = this.checkMasks();\n\n if (this.isMasked) {\n this.renderType = 'svg';\n this.compW = this.comp.data.w;\n this.compH = this.comp.data.h;\n this.svgElement.setAttribute('width', this.compW);\n this.svgElement.setAttribute('height', this.compH);\n var g = createNS('g');\n this.maskedElement.appendChild(g);\n this.innerElem = g;\n } else {\n this.renderType = 'html';\n this.innerElem = this.layerElement;\n }\n\n this.checkParenting();\n };\n\n HTextElement.prototype.buildNewText = function () {\n var documentData = this.textProperty.currentData;\n this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);\n var innerElemStyle = this.innerElem.style;\n var textColor = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)';\n innerElemStyle.fill = textColor;\n innerElemStyle.color = textColor;\n\n if (documentData.sc) {\n innerElemStyle.stroke = this.buildColor(documentData.sc);\n innerElemStyle.strokeWidth = documentData.sw + 'px';\n }\n\n var fontData = this.globalData.fontManager.getFontByName(documentData.f);\n\n if (!this.globalData.fontManager.chars) {\n innerElemStyle.fontSize = documentData.finalSize + 'px';\n innerElemStyle.lineHeight = documentData.finalSize + 'px';\n\n if (fontData.fClass) {\n this.innerElem.className = fontData.fClass;\n } else {\n innerElemStyle.fontFamily = fontData.fFamily;\n var fWeight = documentData.fWeight;\n var fStyle = documentData.fStyle;\n innerElemStyle.fontStyle = fStyle;\n innerElemStyle.fontWeight = fWeight;\n }\n }\n\n var i;\n var len;\n var letters = documentData.l;\n len = letters.length;\n var tSpan;\n var tParent;\n var tCont;\n var matrixHelper = this.mHelper;\n var shapes;\n var shapeStr = '';\n var cnt = 0;\n\n for (i = 0; i < len; i += 1) {\n if (this.globalData.fontManager.chars) {\n if (!this.textPaths[cnt]) {\n tSpan = createNS('path');\n tSpan.setAttribute('stroke-linecap', lineCapEnum[1]);\n tSpan.setAttribute('stroke-linejoin', lineJoinEnum[2]);\n tSpan.setAttribute('stroke-miterlimit', '4');\n } else {\n tSpan = this.textPaths[cnt];\n }\n\n if (!this.isMasked) {\n if (this.textSpans[cnt]) {\n tParent = this.textSpans[cnt];\n tCont = tParent.children[0];\n } else {\n tParent = createTag('div');\n tParent.style.lineHeight = 0;\n tCont = createNS('svg');\n tCont.appendChild(tSpan);\n styleDiv(tParent);\n }\n }\n } else if (!this.isMasked) {\n if (this.textSpans[cnt]) {\n tParent = this.textSpans[cnt];\n tSpan = this.textPaths[cnt];\n } else {\n tParent = createTag('span');\n styleDiv(tParent);\n tSpan = createTag('span');\n styleDiv(tSpan);\n tParent.appendChild(tSpan);\n }\n } else {\n tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : createNS('text');\n } // tSpan.setAttribute('visibility', 'hidden');\n\n\n if (this.globalData.fontManager.chars) {\n var charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\n var shapeData;\n\n if (charData) {\n shapeData = charData.data;\n } else {\n shapeData = null;\n }\n\n matrixHelper.reset();\n\n if (shapeData && shapeData.shapes && shapeData.shapes.length) {\n shapes = shapeData.shapes[0].it;\n matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);\n shapeStr = this.createPathShape(matrixHelper, shapes);\n tSpan.setAttribute('d', shapeStr);\n }\n\n if (!this.isMasked) {\n this.innerElem.appendChild(tParent);\n\n if (shapeData && shapeData.shapes) {\n // document.body.appendChild is needed to get exact measure of shape\n document.body.appendChild(tCont);\n var boundingBox = tCont.getBBox();\n tCont.setAttribute('width', boundingBox.width + 2);\n tCont.setAttribute('height', boundingBox.height + 2);\n tCont.setAttribute('viewBox', boundingBox.x - 1 + ' ' + (boundingBox.y - 1) + ' ' + (boundingBox.width + 2) + ' ' + (boundingBox.height + 2));\n var tContStyle = tCont.style;\n var tContTranslation = 'translate(' + (boundingBox.x - 1) + 'px,' + (boundingBox.y - 1) + 'px)';\n tContStyle.transform = tContTranslation;\n tContStyle.webkitTransform = tContTranslation;\n letters[i].yOffset = boundingBox.y - 1;\n } else {\n tCont.setAttribute('width', 1);\n tCont.setAttribute('height', 1);\n }\n\n tParent.appendChild(tCont);\n } else {\n this.innerElem.appendChild(tSpan);\n }\n } else {\n tSpan.textContent = letters[i].val;\n tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n\n if (!this.isMasked) {\n this.innerElem.appendChild(tParent); //\n\n var tStyle = tSpan.style;\n var tSpanTranslation = 'translate3d(0,' + -documentData.finalSize / 1.2 + 'px,0)';\n tStyle.transform = tSpanTranslation;\n tStyle.webkitTransform = tSpanTranslation;\n } else {\n this.innerElem.appendChild(tSpan);\n }\n } //\n\n\n if (!this.isMasked) {\n this.textSpans[cnt] = tParent;\n } else {\n this.textSpans[cnt] = tSpan;\n }\n\n this.textSpans[cnt].style.display = 'block';\n this.textPaths[cnt] = tSpan;\n cnt += 1;\n }\n\n while (cnt < this.textSpans.length) {\n this.textSpans[cnt].style.display = 'none';\n cnt += 1;\n }\n };\n\n HTextElement.prototype.renderInnerContent = function () {\n this.validateText();\n var svgStyle;\n\n if (this.data.singleShape) {\n if (!this._isFirstFrame && !this.lettersChangedFlag) {\n return;\n }\n\n if (this.isMasked && this.finalTransform._matMdf) {\n // Todo Benchmark if using this is better than getBBox\n this.svgElement.setAttribute('viewBox', -this.finalTransform.mProp.p.v[0] + ' ' + -this.finalTransform.mProp.p.v[1] + ' ' + this.compW + ' ' + this.compH);\n svgStyle = this.svgElement.style;\n var translation = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)';\n svgStyle.transform = translation;\n svgStyle.webkitTransform = translation;\n }\n }\n\n this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\n\n if (!this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag) {\n return;\n }\n\n var i;\n var len;\n var count = 0;\n var renderedLetters = this.textAnimator.renderedLetters;\n var letters = this.textProperty.currentData.l;\n len = letters.length;\n var renderedLetter;\n var textSpan;\n var textPath;\n\n for (i = 0; i < len; i += 1) {\n if (letters[i].n) {\n count += 1;\n } else {\n textSpan = this.textSpans[i];\n textPath = this.textPaths[i];\n renderedLetter = renderedLetters[count];\n count += 1;\n\n if (renderedLetter._mdf.m) {\n if (!this.isMasked) {\n textSpan.style.webkitTransform = renderedLetter.m;\n textSpan.style.transform = renderedLetter.m;\n } else {\n textSpan.setAttribute('transform', renderedLetter.m);\n }\n } /// /textSpan.setAttribute('opacity',renderedLetter.o);\n\n\n textSpan.style.opacity = renderedLetter.o;\n\n if (renderedLetter.sw && renderedLetter._mdf.sw) {\n textPath.setAttribute('stroke-width', renderedLetter.sw);\n }\n\n if (renderedLetter.sc && renderedLetter._mdf.sc) {\n textPath.setAttribute('stroke', renderedLetter.sc);\n }\n\n if (renderedLetter.fc && renderedLetter._mdf.fc) {\n textPath.setAttribute('fill', renderedLetter.fc);\n textPath.style.color = renderedLetter.fc;\n }\n }\n }\n\n if (this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)) {\n var boundingBox = this.innerElem.getBBox();\n\n if (this.currentBBox.w !== boundingBox.width) {\n this.currentBBox.w = boundingBox.width;\n this.svgElement.setAttribute('width', boundingBox.width);\n }\n\n if (this.currentBBox.h !== boundingBox.height) {\n this.currentBBox.h = boundingBox.height;\n this.svgElement.setAttribute('height', boundingBox.height);\n }\n\n var margin = 1;\n\n if (this.currentBBox.w !== boundingBox.width + margin * 2 || this.currentBBox.h !== boundingBox.height + margin * 2 || this.currentBBox.x !== boundingBox.x - margin || this.currentBBox.y !== boundingBox.y - margin) {\n this.currentBBox.w = boundingBox.width + margin * 2;\n this.currentBBox.h = boundingBox.height + margin * 2;\n this.currentBBox.x = boundingBox.x - margin;\n this.currentBBox.y = boundingBox.y - margin;\n this.svgElement.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);\n svgStyle = this.svgElement.style;\n var svgTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';\n svgStyle.transform = svgTransform;\n svgStyle.webkitTransform = svgTransform;\n }\n }\n };\n\n function HCameraElement(data, globalData, comp) {\n this.initFrame();\n this.initBaseData(data, globalData, comp);\n this.initHierarchy();\n var getProp = PropertyFactory.getProp;\n this.pe = getProp(this, data.pe, 0, 0, this);\n\n if (data.ks.p.s) {\n this.px = getProp(this, data.ks.p.x, 1, 0, this);\n this.py = getProp(this, data.ks.p.y, 1, 0, this);\n this.pz = getProp(this, data.ks.p.z, 1, 0, this);\n } else {\n this.p = getProp(this, data.ks.p, 1, 0, this);\n }\n\n if (data.ks.a) {\n this.a = getProp(this, data.ks.a, 1, 0, this);\n }\n\n if (data.ks.or.k.length && data.ks.or.k[0].to) {\n var i;\n var len = data.ks.or.k.length;\n\n for (i = 0; i < len; i += 1) {\n data.ks.or.k[i].to = null;\n data.ks.or.k[i].ti = null;\n }\n }\n\n this.or = getProp(this, data.ks.or, 1, degToRads, this);\n this.or.sh = true;\n this.rx = getProp(this, data.ks.rx, 0, degToRads, this);\n this.ry = getProp(this, data.ks.ry, 0, degToRads, this);\n this.rz = getProp(this, data.ks.rz, 0, degToRads, this);\n this.mat = new Matrix();\n this._prevMat = new Matrix();\n this._isFirstFrame = true; // TODO: find a better way to make the HCamera element to be compatible with the LayerInterface and TransformInterface.\n\n this.finalTransform = {\n mProp: this\n };\n }\n\n extendPrototype([BaseElement, FrameElement, HierarchyElement], HCameraElement);\n\n HCameraElement.prototype.setup = function () {\n var i;\n var len = this.comp.threeDElements.length;\n var comp;\n var perspectiveStyle;\n var containerStyle;\n\n for (i = 0; i < len; i += 1) {\n // [perspectiveElem,container]\n comp = this.comp.threeDElements[i];\n\n if (comp.type === '3d') {\n perspectiveStyle = comp.perspectiveElem.style;\n containerStyle = comp.container.style;\n var perspective = this.pe.v + 'px';\n var origin = '0px 0px 0px';\n var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';\n perspectiveStyle.perspective = perspective;\n perspectiveStyle.webkitPerspective = perspective;\n containerStyle.transformOrigin = origin;\n containerStyle.mozTransformOrigin = origin;\n containerStyle.webkitTransformOrigin = origin;\n perspectiveStyle.transform = matrix;\n perspectiveStyle.webkitTransform = matrix;\n }\n }\n };\n\n HCameraElement.prototype.createElements = function () {};\n\n HCameraElement.prototype.hide = function () {};\n\n HCameraElement.prototype.renderFrame = function () {\n var _mdf = this._isFirstFrame;\n var i;\n var len;\n\n if (this.hierarchy) {\n len = this.hierarchy.length;\n\n for (i = 0; i < len; i += 1) {\n _mdf = this.hierarchy[i].finalTransform.mProp._mdf || _mdf;\n }\n }\n\n if (_mdf || this.pe._mdf || this.p && this.p._mdf || this.px && (this.px._mdf || this.py._mdf || this.pz._mdf) || this.rx._mdf || this.ry._mdf || this.rz._mdf || this.or._mdf || this.a && this.a._mdf) {\n this.mat.reset();\n\n if (this.hierarchy) {\n len = this.hierarchy.length - 1;\n\n for (i = len; i >= 0; i -= 1) {\n var mTransf = this.hierarchy[i].finalTransform.mProp;\n this.mat.translate(-mTransf.p.v[0], -mTransf.p.v[1], mTransf.p.v[2]);\n this.mat.rotateX(-mTransf.or.v[0]).rotateY(-mTransf.or.v[1]).rotateZ(mTransf.or.v[2]);\n this.mat.rotateX(-mTransf.rx.v).rotateY(-mTransf.ry.v).rotateZ(mTransf.rz.v);\n this.mat.scale(1 / mTransf.s.v[0], 1 / mTransf.s.v[1], 1 / mTransf.s.v[2]);\n this.mat.translate(mTransf.a.v[0], mTransf.a.v[1], mTransf.a.v[2]);\n }\n }\n\n if (this.p) {\n this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2]);\n } else {\n this.mat.translate(-this.px.v, -this.py.v, this.pz.v);\n }\n\n if (this.a) {\n var diffVector;\n\n if (this.p) {\n diffVector = [this.p.v[0] - this.a.v[0], this.p.v[1] - this.a.v[1], this.p.v[2] - this.a.v[2]];\n } else {\n diffVector = [this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2]];\n }\n\n var mag = Math.sqrt(Math.pow(diffVector[0], 2) + Math.pow(diffVector[1], 2) + Math.pow(diffVector[2], 2)); // var lookDir = getNormalizedPoint(getDiffVector(this.a.v,this.p.v));\n\n var lookDir = [diffVector[0] / mag, diffVector[1] / mag, diffVector[2] / mag];\n var lookLengthOnXZ = Math.sqrt(lookDir[2] * lookDir[2] + lookDir[0] * lookDir[0]);\n var mRotationX = Math.atan2(lookDir[1], lookLengthOnXZ);\n var mRotationY = Math.atan2(lookDir[0], -lookDir[2]);\n this.mat.rotateY(mRotationY).rotateX(-mRotationX);\n }\n\n this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v);\n this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]);\n this.mat.translate(this.globalData.compSize.w / 2, this.globalData.compSize.h / 2, 0);\n this.mat.translate(0, 0, this.pe.v);\n var hasMatrixChanged = !this._prevMat.equals(this.mat);\n\n if ((hasMatrixChanged || this.pe._mdf) && this.comp.threeDElements) {\n len = this.comp.threeDElements.length;\n var comp;\n var perspectiveStyle;\n var containerStyle;\n\n for (i = 0; i < len; i += 1) {\n comp = this.comp.threeDElements[i];\n\n if (comp.type === '3d') {\n if (hasMatrixChanged) {\n var matValue = this.mat.toCSS();\n containerStyle = comp.container.style;\n containerStyle.transform = matValue;\n containerStyle.webkitTransform = matValue;\n }\n\n if (this.pe._mdf) {\n perspectiveStyle = comp.perspectiveElem.style;\n perspectiveStyle.perspective = this.pe.v + 'px';\n perspectiveStyle.webkitPerspective = this.pe.v + 'px';\n }\n }\n }\n\n this.mat.clone(this._prevMat);\n }\n }\n\n this._isFirstFrame = false;\n };\n\n HCameraElement.prototype.prepareFrame = function (num) {\n this.prepareProperties(num, true);\n };\n\n HCameraElement.prototype.destroy = function () {};\n\n HCameraElement.prototype.getBaseElement = function () {\n return null;\n };\n\n function HImageElement(data, globalData, comp) {\n this.assetData = globalData.getAssetData(data.refId);\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement, FrameElement, RenderableElement], HImageElement);\n\n HImageElement.prototype.createContent = function () {\n var assetPath = this.globalData.getAssetsPath(this.assetData);\n var img = new Image();\n\n if (this.data.hasMask) {\n this.imageElem = createNS('image');\n this.imageElem.setAttribute('width', this.assetData.w + 'px');\n this.imageElem.setAttribute('height', this.assetData.h + 'px');\n this.imageElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);\n this.layerElement.appendChild(this.imageElem);\n this.baseElement.setAttribute('width', this.assetData.w);\n this.baseElement.setAttribute('height', this.assetData.h);\n } else {\n this.layerElement.appendChild(img);\n }\n\n img.crossOrigin = 'anonymous';\n img.src = assetPath;\n\n if (this.data.ln) {\n this.baseElement.setAttribute('id', this.data.ln);\n }\n };\n\n function HybridRendererBase(animationItem, config) {\n this.animationItem = animationItem;\n this.layers = null;\n this.renderedFrame = -1;\n this.renderConfig = {\n className: config && config.className || '',\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\n hideOnTransparent: !(config && config.hideOnTransparent === false),\n filterSize: {\n width: config && config.filterSize && config.filterSize.width || '400%',\n height: config && config.filterSize && config.filterSize.height || '400%',\n x: config && config.filterSize && config.filterSize.x || '-100%',\n y: config && config.filterSize && config.filterSize.y || '-100%'\n }\n };\n this.globalData = {\n _mdf: false,\n frameNum: -1,\n renderConfig: this.renderConfig\n };\n this.pendingElements = [];\n this.elements = [];\n this.threeDElements = [];\n this.destroyed = false;\n this.camera = null;\n this.supports3d = true;\n this.rendererType = 'html';\n }\n\n extendPrototype([BaseRenderer], HybridRendererBase);\n HybridRendererBase.prototype.buildItem = SVGRenderer.prototype.buildItem;\n\n HybridRendererBase.prototype.checkPendingElements = function () {\n while (this.pendingElements.length) {\n var element = this.pendingElements.pop();\n element.checkParenting();\n }\n };\n\n HybridRendererBase.prototype.appendElementInPos = function (element, pos) {\n var newDOMElement = element.getBaseElement();\n\n if (!newDOMElement) {\n return;\n }\n\n var layer = this.layers[pos];\n\n if (!layer.ddd || !this.supports3d) {\n if (this.threeDElements) {\n this.addTo3dContainer(newDOMElement, pos);\n } else {\n var i = 0;\n var nextDOMElement;\n var nextLayer;\n var tmpDOMElement;\n\n while (i < pos) {\n if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement) {\n nextLayer = this.elements[i];\n tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement();\n nextDOMElement = tmpDOMElement || nextDOMElement;\n }\n\n i += 1;\n }\n\n if (nextDOMElement) {\n if (!layer.ddd || !this.supports3d) {\n this.layerElement.insertBefore(newDOMElement, nextDOMElement);\n }\n } else if (!layer.ddd || !this.supports3d) {\n this.layerElement.appendChild(newDOMElement);\n }\n }\n } else {\n this.addTo3dContainer(newDOMElement, pos);\n }\n };\n\n HybridRendererBase.prototype.createShape = function (data) {\n if (!this.supports3d) {\n return new SVGShapeElement(data, this.globalData, this);\n }\n\n return new HShapeElement(data, this.globalData, this);\n };\n\n HybridRendererBase.prototype.createText = function (data) {\n if (!this.supports3d) {\n return new SVGTextLottieElement(data, this.globalData, this);\n }\n\n return new HTextElement(data, this.globalData, this);\n };\n\n HybridRendererBase.prototype.createCamera = function (data) {\n this.camera = new HCameraElement(data, this.globalData, this);\n return this.camera;\n };\n\n HybridRendererBase.prototype.createImage = function (data) {\n if (!this.supports3d) {\n return new IImageElement(data, this.globalData, this);\n }\n\n return new HImageElement(data, this.globalData, this);\n };\n\n HybridRendererBase.prototype.createSolid = function (data) {\n if (!this.supports3d) {\n return new ISolidElement(data, this.globalData, this);\n }\n\n return new HSolidElement(data, this.globalData, this);\n };\n\n HybridRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;\n\n HybridRendererBase.prototype.getThreeDContainerByPos = function (pos) {\n var i = 0;\n var len = this.threeDElements.length;\n\n while (i < len) {\n if (this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) {\n return this.threeDElements[i].perspectiveElem;\n }\n\n i += 1;\n }\n\n return null;\n };\n\n HybridRendererBase.prototype.createThreeDContainer = function (pos, type) {\n var perspectiveElem = createTag('div');\n var style;\n var containerStyle;\n styleDiv(perspectiveElem);\n var container = createTag('div');\n styleDiv(container);\n\n if (type === '3d') {\n style = perspectiveElem.style;\n style.width = this.globalData.compSize.w + 'px';\n style.height = this.globalData.compSize.h + 'px';\n var center = '50% 50%';\n style.webkitTransformOrigin = center;\n style.mozTransformOrigin = center;\n style.transformOrigin = center;\n containerStyle = container.style;\n var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';\n containerStyle.transform = matrix;\n containerStyle.webkitTransform = matrix;\n }\n\n perspectiveElem.appendChild(container); // this.resizerElem.appendChild(perspectiveElem);\n\n var threeDContainerData = {\n container: container,\n perspectiveElem: perspectiveElem,\n startPos: pos,\n endPos: pos,\n type: type\n };\n this.threeDElements.push(threeDContainerData);\n return threeDContainerData;\n };\n\n HybridRendererBase.prototype.build3dContainers = function () {\n var i;\n var len = this.layers.length;\n var lastThreeDContainerData;\n var currentContainer = '';\n\n for (i = 0; i < len; i += 1) {\n if (this.layers[i].ddd && this.layers[i].ty !== 3) {\n if (currentContainer !== '3d') {\n currentContainer = '3d';\n lastThreeDContainerData = this.createThreeDContainer(i, '3d');\n }\n\n lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);\n } else {\n if (currentContainer !== '2d') {\n currentContainer = '2d';\n lastThreeDContainerData = this.createThreeDContainer(i, '2d');\n }\n\n lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);\n }\n }\n\n len = this.threeDElements.length;\n\n for (i = len - 1; i >= 0; i -= 1) {\n this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem);\n }\n };\n\n HybridRendererBase.prototype.addTo3dContainer = function (elem, pos) {\n var i = 0;\n var len = this.threeDElements.length;\n\n while (i < len) {\n if (pos <= this.threeDElements[i].endPos) {\n var j = this.threeDElements[i].startPos;\n var nextElement;\n\n while (j < pos) {\n if (this.elements[j] && this.elements[j].getBaseElement) {\n nextElement = this.elements[j].getBaseElement();\n }\n\n j += 1;\n }\n\n if (nextElement) {\n this.threeDElements[i].container.insertBefore(elem, nextElement);\n } else {\n this.threeDElements[i].container.appendChild(elem);\n }\n\n break;\n }\n\n i += 1;\n }\n };\n\n HybridRendererBase.prototype.configAnimation = function (animData) {\n var resizerElem = createTag('div');\n var wrapper = this.animationItem.wrapper;\n var style = resizerElem.style;\n style.width = animData.w + 'px';\n style.height = animData.h + 'px';\n this.resizerElem = resizerElem;\n styleDiv(resizerElem);\n style.transformStyle = 'flat';\n style.mozTransformStyle = 'flat';\n style.webkitTransformStyle = 'flat';\n\n if (this.renderConfig.className) {\n resizerElem.setAttribute('class', this.renderConfig.className);\n }\n\n wrapper.appendChild(resizerElem);\n style.overflow = 'hidden';\n var svg = createNS('svg');\n svg.setAttribute('width', '1');\n svg.setAttribute('height', '1');\n styleDiv(svg);\n this.resizerElem.appendChild(svg);\n var defs = createNS('defs');\n svg.appendChild(defs);\n this.data = animData; // Mask animation\n\n this.setupGlobalData(animData, svg);\n this.globalData.defs = defs;\n this.layers = animData.layers;\n this.layerElement = this.resizerElem;\n this.build3dContainers();\n this.updateContainerSize();\n };\n\n HybridRendererBase.prototype.destroy = function () {\n if (this.animationItem.wrapper) {\n this.animationItem.wrapper.innerText = '';\n }\n\n this.animationItem.container = null;\n this.globalData.defs = null;\n var i;\n var len = this.layers ? this.layers.length : 0;\n\n for (i = 0; i < len; i += 1) {\n if (this.elements[i] && this.elements[i].destroy) {\n this.elements[i].destroy();\n }\n }\n\n this.elements.length = 0;\n this.destroyed = true;\n this.animationItem = null;\n };\n\n HybridRendererBase.prototype.updateContainerSize = function () {\n var elementWidth = this.animationItem.wrapper.offsetWidth;\n var elementHeight = this.animationItem.wrapper.offsetHeight;\n var elementRel = elementWidth / elementHeight;\n var animationRel = this.globalData.compSize.w / this.globalData.compSize.h;\n var sx;\n var sy;\n var tx;\n var ty;\n\n if (animationRel > elementRel) {\n sx = elementWidth / this.globalData.compSize.w;\n sy = elementWidth / this.globalData.compSize.w;\n tx = 0;\n ty = (elementHeight - this.globalData.compSize.h * (elementWidth / this.globalData.compSize.w)) / 2;\n } else {\n sx = elementHeight / this.globalData.compSize.h;\n sy = elementHeight / this.globalData.compSize.h;\n tx = (elementWidth - this.globalData.compSize.w * (elementHeight / this.globalData.compSize.h)) / 2;\n ty = 0;\n }\n\n var style = this.resizerElem.style;\n style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,' + sy + ',0,0,0,0,1,0,' + tx + ',' + ty + ',0,1)';\n style.transform = style.webkitTransform;\n };\n\n HybridRendererBase.prototype.renderFrame = SVGRenderer.prototype.renderFrame;\n\n HybridRendererBase.prototype.hide = function () {\n this.resizerElem.style.display = 'none';\n };\n\n HybridRendererBase.prototype.show = function () {\n this.resizerElem.style.display = 'block';\n };\n\n HybridRendererBase.prototype.initItems = function () {\n this.buildAllItems();\n\n if (this.camera) {\n this.camera.setup();\n } else {\n var cWidth = this.globalData.compSize.w;\n var cHeight = this.globalData.compSize.h;\n var i;\n var len = this.threeDElements.length;\n\n for (i = 0; i < len; i += 1) {\n var style = this.threeDElements[i].perspectiveElem.style;\n style.webkitPerspective = Math.sqrt(Math.pow(cWidth, 2) + Math.pow(cHeight, 2)) + 'px';\n style.perspective = style.webkitPerspective;\n }\n }\n };\n\n HybridRendererBase.prototype.searchExtraCompositions = function (assets) {\n var i;\n var len = assets.length;\n var floatingContainer = createTag('div');\n\n for (i = 0; i < len; i += 1) {\n if (assets[i].xt) {\n var comp = this.createComp(assets[i], floatingContainer, this.globalData.comp, null);\n comp.initExpressions();\n this.globalData.projectInterface.registerComposition(comp);\n }\n }\n };\n\n function HCompElement(data, globalData, comp) {\n this.layers = data.layers;\n this.supports3d = !data.hasMask;\n this.completeLayers = false;\n this.pendingElements = [];\n this.elements = this.layers ? createSizedArray(this.layers.length) : [];\n this.initElement(data, globalData, comp);\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\n _placeholder: true\n };\n }\n\n extendPrototype([HybridRendererBase, ICompElement, HBaseElement], HCompElement);\n HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements;\n\n HCompElement.prototype.createContainerElements = function () {\n this._createBaseContainerElements(); // divElement.style.clip = 'rect(0px, '+this.data.w+'px, '+this.data.h+'px, 0px)';\n\n\n if (this.data.hasMask) {\n this.svgElement.setAttribute('width', this.data.w);\n this.svgElement.setAttribute('height', this.data.h);\n this.transformedElement = this.baseElement;\n } else {\n this.transformedElement = this.layerElement;\n }\n };\n\n HCompElement.prototype.addTo3dContainer = function (elem, pos) {\n var j = 0;\n var nextElement;\n\n while (j < pos) {\n if (this.elements[j] && this.elements[j].getBaseElement) {\n nextElement = this.elements[j].getBaseElement();\n }\n\n j += 1;\n }\n\n if (nextElement) {\n this.layerElement.insertBefore(elem, nextElement);\n } else {\n this.layerElement.appendChild(elem);\n }\n };\n\n HCompElement.prototype.createComp = function (data) {\n if (!this.supports3d) {\n return new SVGCompElement(data, this.globalData, this);\n }\n\n return new HCompElement(data, this.globalData, this);\n };\n\n function HybridRenderer(animationItem, config) {\n this.animationItem = animationItem;\n this.layers = null;\n this.renderedFrame = -1;\n this.renderConfig = {\n className: config && config.className || '',\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\n hideOnTransparent: !(config && config.hideOnTransparent === false),\n filterSize: {\n width: config && config.filterSize && config.filterSize.width || '400%',\n height: config && config.filterSize && config.filterSize.height || '400%',\n x: config && config.filterSize && config.filterSize.x || '-100%',\n y: config && config.filterSize && config.filterSize.y || '-100%'\n },\n runExpressions: !config || config.runExpressions === undefined || config.runExpressions\n };\n this.globalData = {\n _mdf: false,\n frameNum: -1,\n renderConfig: this.renderConfig\n };\n this.pendingElements = [];\n this.elements = [];\n this.threeDElements = [];\n this.destroyed = false;\n this.camera = null;\n this.supports3d = true;\n this.rendererType = 'html';\n }\n\n extendPrototype([HybridRendererBase], HybridRenderer);\n\n HybridRenderer.prototype.createComp = function (data) {\n if (!this.supports3d) {\n return new SVGCompElement(data, this.globalData, this);\n }\n\n return new HCompElement(data, this.globalData, this);\n };\n\n var CompExpressionInterface = function () {\n return function (comp) {\n function _thisLayerFunction(name) {\n var i = 0;\n var len = comp.layers.length;\n\n while (i < len) {\n if (comp.layers[i].nm === name || comp.layers[i].ind === name) {\n return comp.elements[i].layerInterface;\n }\n\n i += 1;\n }\n\n return null; // return {active:false};\n }\n\n Object.defineProperty(_thisLayerFunction, '_name', {\n value: comp.data.nm\n });\n _thisLayerFunction.layer = _thisLayerFunction;\n _thisLayerFunction.pixelAspect = 1;\n _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;\n _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;\n _thisLayerFunction.pixelAspect = 1;\n _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;\n _thisLayerFunction.displayStartTime = 0;\n _thisLayerFunction.numLayers = comp.layers.length;\n return _thisLayerFunction;\n };\n }();\n\n function _typeof$2(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$2(obj); }\n\n /* eslint-disable */\n\n /*\r\n Copyright 2014 David Bau.\r\n\r\n Permission is hereby granted, free of charge, to any person obtaining\r\n a copy of this software and associated documentation files (the\r\n \"Software\"), to deal in the Software without restriction, including\r\n without limitation the rights to use, copy, modify, merge, publish,\r\n distribute, sublicense, and/or sell copies of the Software, and to\r\n permit persons to whom the Software is furnished to do so, subject to\r\n the following conditions:\r\n\r\n The above copyright notice and this permission notice shall be\r\n included in all copies or substantial portions of the Software.\r\n\r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n */\n function seedRandom(pool, math) {\n //\n // The following constants are related to IEEE 754 limits.\n //\n var global = this,\n width = 256,\n // each RC4 output is 0 <= x < 256\n chunks = 6,\n // at least six RC4 outputs for each double\n digits = 52,\n // there are 52 significant digits in a double\n rngname = 'random',\n // rngname: name for Math.random and Math.seedrandom\n startdenom = math.pow(width, chunks),\n significance = math.pow(2, digits),\n overflow = significance * 2,\n mask = width - 1,\n nodecrypto; // node.js crypto module, initialized at the bottom.\n //\n // seedrandom()\n // This is the seedrandom function described above.\n //\n\n function seedrandom(seed, options, callback) {\n var key = [];\n options = options === true ? {\n entropy: true\n } : options || {}; // Flatten the seed string or build one from local entropy if needed.\n\n var shortseed = mixkey(flatten(options.entropy ? [seed, tostring(pool)] : seed === null ? autoseed() : seed, 3), key); // Use the seed to initialize an ARC4 generator.\n\n var arc4 = new ARC4(key); // This function returns a random double in [0, 1) that contains\n // randomness in every bit of the mantissa of the IEEE 754 value.\n\n var prng = function prng() {\n var n = arc4.g(chunks),\n // Start with a numerator n < 2 ^ 48\n d = startdenom,\n // and denominator d = 2 ^ 48.\n x = 0; // and no 'extra last byte'.\n\n while (n < significance) {\n // Fill up all significant digits by\n n = (n + x) * width; // shifting numerator and\n\n d *= width; // denominator and generating a\n\n x = arc4.g(1); // new least-significant-byte.\n }\n\n while (n >= overflow) {\n // To avoid rounding up, before adding\n n /= 2; // last byte, shift everything\n\n d /= 2; // right using integer math until\n\n x >>>= 1; // we have exactly the desired bits.\n }\n\n return (n + x) / d; // Form the number within [0, 1).\n };\n\n prng.int32 = function () {\n return arc4.g(4) | 0;\n };\n\n prng.quick = function () {\n return arc4.g(4) / 0x100000000;\n };\n\n prng[\"double\"] = prng; // Mix the randomness into accumulated entropy.\n\n mixkey(tostring(arc4.S), pool); // Calling convention: what to return as a function of prng, seed, is_math.\n\n return (options.pass || callback || function (prng, seed, is_math_call, state) {\n if (state) {\n // Load the arc4 state from the given state if it has an S array.\n if (state.S) {\n copy(state, arc4);\n } // Only provide the .state method if requested via options.state.\n\n\n prng.state = function () {\n return copy(arc4, {});\n };\n } // If called as a method of Math (Math.seedrandom()), mutate\n // Math.random because that is how seedrandom.js has worked since v1.0.\n\n\n if (is_math_call) {\n math[rngname] = prng;\n return seed;\n } // Otherwise, it is a newer calling convention, so return the\n // prng directly.\n else return prng;\n })(prng, shortseed, 'global' in options ? options.global : this == math, options.state);\n }\n\n math['seed' + rngname] = seedrandom; //\n // ARC4\n //\n // An ARC4 implementation. The constructor takes a key in the form of\n // an array of at most (width) integers that should be 0 <= x < (width).\n //\n // The g(count) method returns a pseudorandom integer that concatenates\n // the next (count) outputs from ARC4. Its return value is a number x\n // that is in the range 0 <= x < (width ^ count).\n //\n\n function ARC4(key) {\n var t,\n keylen = key.length,\n me = this,\n i = 0,\n j = me.i = me.j = 0,\n s = me.S = []; // The empty key [] is treated as [0].\n\n if (!keylen) {\n key = [keylen++];\n } // Set up S using the standard key scheduling algorithm.\n\n\n while (i < width) {\n s[i] = i++;\n }\n\n for (i = 0; i < width; i++) {\n s[i] = s[j = mask & j + key[i % keylen] + (t = s[i])];\n s[j] = t;\n } // The \"g\" method returns the next (count) outputs as one number.\n\n\n me.g = function (count) {\n // Using instance members instead of closure state nearly doubles speed.\n var t,\n r = 0,\n i = me.i,\n j = me.j,\n s = me.S;\n\n while (count--) {\n t = s[i = mask & i + 1];\n r = r * width + s[mask & (s[i] = s[j = mask & j + t]) + (s[j] = t)];\n }\n\n me.i = i;\n me.j = j;\n return r; // For robust unpredictability, the function call below automatically\n // discards an initial batch of values. This is called RC4-drop[256].\n // See http://google.com/search?q=rsa+fluhrer+response&btnI\n };\n } //\n // copy()\n // Copies internal state of ARC4 to or from a plain object.\n //\n\n\n function copy(f, t) {\n t.i = f.i;\n t.j = f.j;\n t.S = f.S.slice();\n return t;\n } //\n // flatten()\n // Converts an object tree to nested arrays of strings.\n //\n\n\n function flatten(obj, depth) {\n var result = [],\n typ = _typeof$2(obj),\n prop;\n\n if (depth && typ == 'object') {\n for (prop in obj) {\n try {\n result.push(flatten(obj[prop], depth - 1));\n } catch (e) {}\n }\n }\n\n return result.length ? result : typ == 'string' ? obj : obj + '\\0';\n } //\n // mixkey()\n // Mixes a string seed into a key that is an array of integers, and\n // returns a shortened string seed that is equivalent to the result key.\n //\n\n\n function mixkey(seed, key) {\n var stringseed = seed + '',\n smear,\n j = 0;\n\n while (j < stringseed.length) {\n key[mask & j] = mask & (smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++);\n }\n\n return tostring(key);\n } //\n // autoseed()\n // Returns an object for autoseeding, using window.crypto and Node crypto\n // module if available.\n //\n\n\n function autoseed() {\n try {\n if (nodecrypto) {\n return tostring(nodecrypto.randomBytes(width));\n }\n\n var out = new Uint8Array(width);\n (global.crypto || global.msCrypto).getRandomValues(out);\n return tostring(out);\n } catch (e) {\n var browser = global.navigator,\n plugins = browser && browser.plugins;\n return [+new Date(), global, plugins, global.screen, tostring(pool)];\n }\n } //\n // tostring()\n // Converts an array of charcodes to a string\n //\n\n\n function tostring(a) {\n return String.fromCharCode.apply(0, a);\n } //\n // When seedrandom.js is loaded, we immediately mix a few bits\n // from the built-in RNG into the entropy pool. Because we do\n // not want to interfere with deterministic PRNG state later,\n // seedrandom will not call math.random on its own again after\n // initialization.\n //\n\n\n mixkey(math.random(), pool); //\n // Nodejs and AMD support: export the implementation as a module using\n // either convention.\n //\n // End anonymous scope, and pass initial values.\n }\n\n ;\n\n function initialize$2(BMMath) {\n seedRandom([], BMMath);\n }\n\n var propTypes = {\n SHAPE: 'shape'\n };\n\n function _typeof$1(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$1(obj); }\n\n var ExpressionManager = function () {\n 'use strict';\n\n var ob = {};\n var Math = BMMath;\n var window = null;\n var document = null;\n var XMLHttpRequest = null;\n var fetch = null;\n var frames = null;\n var _lottieGlobal = {};\n initialize$2(BMMath);\n\n function resetFrame() {\n _lottieGlobal = {};\n }\n\n function $bm_isInstanceOfArray(arr) {\n return arr.constructor === Array || arr.constructor === Float32Array;\n }\n\n function isNumerable(tOfV, v) {\n return tOfV === 'number' || v instanceof Number || tOfV === 'boolean' || tOfV === 'string';\n }\n\n function $bm_neg(a) {\n var tOfA = _typeof$1(a);\n\n if (tOfA === 'number' || a instanceof Number || tOfA === 'boolean') {\n return -a;\n }\n\n if ($bm_isInstanceOfArray(a)) {\n var i;\n var lenA = a.length;\n var retArr = [];\n\n for (i = 0; i < lenA; i += 1) {\n retArr[i] = -a[i];\n }\n\n return retArr;\n }\n\n if (a.propType) {\n return a.v;\n }\n\n return -a;\n }\n\n var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;\n var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;\n var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;\n\n function sum(a, b) {\n var tOfA = _typeof$1(a);\n\n var tOfB = _typeof$1(b);\n\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b) || tOfA === 'string' || tOfB === 'string') {\n return a + b;\n }\n\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\n a = a.slice(0);\n a[0] += b;\n return a;\n }\n\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\n b = b.slice(0);\n b[0] = a + b[0];\n return b;\n }\n\n if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {\n var i = 0;\n var lenA = a.length;\n var lenB = b.length;\n var retArr = [];\n\n while (i < lenA || i < lenB) {\n if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {\n retArr[i] = a[i] + b[i];\n } else {\n retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];\n }\n\n i += 1;\n }\n\n return retArr;\n }\n\n return 0;\n }\n\n var add = sum;\n\n function sub(a, b) {\n var tOfA = _typeof$1(a);\n\n var tOfB = _typeof$1(b);\n\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\n if (tOfA === 'string') {\n a = parseInt(a, 10);\n }\n\n if (tOfB === 'string') {\n b = parseInt(b, 10);\n }\n\n return a - b;\n }\n\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\n a = a.slice(0);\n a[0] -= b;\n return a;\n }\n\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\n b = b.slice(0);\n b[0] = a - b[0];\n return b;\n }\n\n if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {\n var i = 0;\n var lenA = a.length;\n var lenB = b.length;\n var retArr = [];\n\n while (i < lenA || i < lenB) {\n if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {\n retArr[i] = a[i] - b[i];\n } else {\n retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];\n }\n\n i += 1;\n }\n\n return retArr;\n }\n\n return 0;\n }\n\n function mul(a, b) {\n var tOfA = _typeof$1(a);\n\n var tOfB = _typeof$1(b);\n\n var arr;\n\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\n return a * b;\n }\n\n var i;\n var len;\n\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\n len = a.length;\n arr = createTypedArray('float32', len);\n\n for (i = 0; i < len; i += 1) {\n arr[i] = a[i] * b;\n }\n\n return arr;\n }\n\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\n len = b.length;\n arr = createTypedArray('float32', len);\n\n for (i = 0; i < len; i += 1) {\n arr[i] = a * b[i];\n }\n\n return arr;\n }\n\n return 0;\n }\n\n function div(a, b) {\n var tOfA = _typeof$1(a);\n\n var tOfB = _typeof$1(b);\n\n var arr;\n\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\n return a / b;\n }\n\n var i;\n var len;\n\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\n len = a.length;\n arr = createTypedArray('float32', len);\n\n for (i = 0; i < len; i += 1) {\n arr[i] = a[i] / b;\n }\n\n return arr;\n }\n\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\n len = b.length;\n arr = createTypedArray('float32', len);\n\n for (i = 0; i < len; i += 1) {\n arr[i] = a / b[i];\n }\n\n return arr;\n }\n\n return 0;\n }\n\n function mod(a, b) {\n if (typeof a === 'string') {\n a = parseInt(a, 10);\n }\n\n if (typeof b === 'string') {\n b = parseInt(b, 10);\n }\n\n return a % b;\n }\n\n var $bm_sum = sum;\n var $bm_sub = sub;\n var $bm_mul = mul;\n var $bm_div = div;\n var $bm_mod = mod;\n\n function clamp(num, min, max) {\n if (min > max) {\n var mm = max;\n max = min;\n min = mm;\n }\n\n return Math.min(Math.max(num, min), max);\n }\n\n function radiansToDegrees(val) {\n return val / degToRads;\n }\n\n var radians_to_degrees = radiansToDegrees;\n\n function degreesToRadians(val) {\n return val * degToRads;\n }\n\n var degrees_to_radians = radiansToDegrees;\n var helperLengthArray = [0, 0, 0, 0, 0, 0];\n\n function length(arr1, arr2) {\n if (typeof arr1 === 'number' || arr1 instanceof Number) {\n arr2 = arr2 || 0;\n return Math.abs(arr1 - arr2);\n }\n\n if (!arr2) {\n arr2 = helperLengthArray;\n }\n\n var i;\n var len = Math.min(arr1.length, arr2.length);\n var addedLength = 0;\n\n for (i = 0; i < len; i += 1) {\n addedLength += Math.pow(arr2[i] - arr1[i], 2);\n }\n\n return Math.sqrt(addedLength);\n }\n\n function normalize(vec) {\n return div(vec, length(vec));\n }\n\n function rgbToHsl(val) {\n var r = val[0];\n var g = val[1];\n var b = val[2];\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h;\n var s;\n var l = (max + min) / 2;\n\n if (max === min) {\n h = 0; // achromatic\n\n s = 0; // achromatic\n } else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n\n case g:\n h = (b - r) / d + 2;\n break;\n\n case b:\n h = (r - g) / d + 4;\n break;\n\n default:\n break;\n }\n\n h /= 6;\n }\n\n return [h, s, l, val[3]];\n }\n\n function hue2rgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1 / 6) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n }\n\n function hslToRgb(val) {\n var h = val[0];\n var s = val[1];\n var l = val[2];\n var r;\n var g;\n var b;\n\n if (s === 0) {\n r = l; // achromatic\n\n b = l; // achromatic\n\n g = l; // achromatic\n } else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n\n return [r, g, b, val[3]];\n }\n\n function linear(t, tMin, tMax, value1, value2) {\n if (value1 === undefined || value2 === undefined) {\n value1 = tMin;\n value2 = tMax;\n tMin = 0;\n tMax = 1;\n }\n\n if (tMax < tMin) {\n var _tMin = tMax;\n tMax = tMin;\n tMin = _tMin;\n }\n\n if (t <= tMin) {\n return value1;\n }\n\n if (t >= tMax) {\n return value2;\n }\n\n var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);\n\n if (!value1.length) {\n return value1 + (value2 - value1) * perc;\n }\n\n var i;\n var len = value1.length;\n var arr = createTypedArray('float32', len);\n\n for (i = 0; i < len; i += 1) {\n arr[i] = value1[i] + (value2[i] - value1[i]) * perc;\n }\n\n return arr;\n }\n\n function random(min, max) {\n if (max === undefined) {\n if (min === undefined) {\n min = 0;\n max = 1;\n } else {\n max = min;\n min = undefined;\n }\n }\n\n if (max.length) {\n var i;\n var len = max.length;\n\n if (!min) {\n min = createTypedArray('float32', len);\n }\n\n var arr = createTypedArray('float32', len);\n var rnd = BMMath.random();\n\n for (i = 0; i < len; i += 1) {\n arr[i] = min[i] + rnd * (max[i] - min[i]);\n }\n\n return arr;\n }\n\n if (min === undefined) {\n min = 0;\n }\n\n var rndm = BMMath.random();\n return min + rndm * (max - min);\n }\n\n function createPath(points, inTangents, outTangents, closed) {\n var i;\n var len = points.length;\n var path = shapePool.newElement();\n path.setPathData(!!closed, len);\n var arrPlaceholder = [0, 0];\n var inVertexPoint;\n var outVertexPoint;\n\n for (i = 0; i < len; i += 1) {\n inVertexPoint = inTangents && inTangents[i] ? inTangents[i] : arrPlaceholder;\n outVertexPoint = outTangents && outTangents[i] ? outTangents[i] : arrPlaceholder;\n path.setTripleAt(points[i][0], points[i][1], outVertexPoint[0] + points[i][0], outVertexPoint[1] + points[i][1], inVertexPoint[0] + points[i][0], inVertexPoint[1] + points[i][1], i, true);\n }\n\n return path;\n }\n\n function initiateExpression(elem, data, property) {\n // Bail out if we don't want expressions\n function noOp(_value) {\n return _value;\n }\n\n if (!elem.globalData.renderConfig.runExpressions) {\n return noOp;\n }\n\n var val = data.x;\n var needsVelocity = /velocity(?![\\w\\d])/.test(val);\n\n var _needsRandom = val.indexOf('random') !== -1;\n\n var elemType = elem.data.ty;\n var transform;\n var $bm_transform;\n var content;\n var effect;\n var thisProperty = property;\n thisProperty.valueAtTime = thisProperty.getValueAtTime;\n Object.defineProperty(thisProperty, 'value', {\n get: function get() {\n return thisProperty.v;\n }\n });\n elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;\n elem.comp.displayStartTime = 0;\n var inPoint = elem.data.ip / elem.comp.globalData.frameRate;\n var outPoint = elem.data.op / elem.comp.globalData.frameRate;\n var width = elem.data.sw ? elem.data.sw : 0;\n var height = elem.data.sh ? elem.data.sh : 0;\n var name = elem.data.nm;\n var loopIn;\n var loop_in;\n var loopOut;\n var loop_out;\n var smooth;\n var toWorld;\n var fromWorld;\n var fromComp;\n var toComp;\n var fromCompToSurface;\n var position;\n var rotation;\n var anchorPoint;\n var scale;\n var thisLayer;\n var thisComp;\n var mask;\n var valueAtTime;\n var velocityAtTime;\n var scoped_bm_rt; // val = val.replace(/(\\\\?\"|')((http)(s)?(:\\/))?\\/.*?(\\\\?\"|')/g, \"\\\"\\\"\"); // deter potential network calls\n\n var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval\n\n var numKeys = property.kf ? data.k.length : 0;\n var active = !this.data || this.data.hd !== true;\n\n var wiggle = function wiggle(freq, amp) {\n var iWiggle;\n var j;\n var lenWiggle = this.pv.length ? this.pv.length : 1;\n var addedAmps = createTypedArray('float32', lenWiggle);\n freq = 5;\n var iterations = Math.floor(time * freq);\n iWiggle = 0;\n j = 0;\n\n while (iWiggle < iterations) {\n // var rnd = BMMath.random();\n for (j = 0; j < lenWiggle; j += 1) {\n addedAmps[j] += -amp + amp * 2 * BMMath.random(); // addedAmps[j] += -amp + amp*2*rnd;\n }\n\n iWiggle += 1;\n } // var rnd2 = BMMath.random();\n\n\n var periods = time * freq;\n var perc = periods - Math.floor(periods);\n var arr = createTypedArray('float32', lenWiggle);\n\n if (lenWiggle > 1) {\n for (j = 0; j < lenWiggle; j += 1) {\n arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc; // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;\n // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);\n }\n\n return arr;\n }\n\n return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;\n }.bind(this);\n\n if (thisProperty.loopIn) {\n loopIn = thisProperty.loopIn.bind(thisProperty);\n loop_in = loopIn;\n }\n\n if (thisProperty.loopOut) {\n loopOut = thisProperty.loopOut.bind(thisProperty);\n loop_out = loopOut;\n }\n\n if (thisProperty.smooth) {\n smooth = thisProperty.smooth.bind(thisProperty);\n }\n\n function loopInDuration(type, duration) {\n return loopIn(type, duration, true);\n }\n\n function loopOutDuration(type, duration) {\n return loopOut(type, duration, true);\n }\n\n if (this.getValueAtTime) {\n valueAtTime = this.getValueAtTime.bind(this);\n }\n\n if (this.getVelocityAtTime) {\n velocityAtTime = this.getVelocityAtTime.bind(this);\n }\n\n var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);\n\n function lookAt(elem1, elem2) {\n var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];\n var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;\n var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;\n return [yaw, pitch, 0];\n }\n\n function easeOut(t, tMin, tMax, val1, val2) {\n return applyEase(easeOutBez, t, tMin, tMax, val1, val2);\n }\n\n function easeIn(t, tMin, tMax, val1, val2) {\n return applyEase(easeInBez, t, tMin, tMax, val1, val2);\n }\n\n function ease(t, tMin, tMax, val1, val2) {\n return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);\n }\n\n function applyEase(fn, t, tMin, tMax, val1, val2) {\n if (val1 === undefined) {\n val1 = tMin;\n val2 = tMax;\n } else {\n t = (t - tMin) / (tMax - tMin);\n }\n\n if (t > 1) {\n t = 1;\n } else if (t < 0) {\n t = 0;\n }\n\n var mult = fn(t);\n\n if ($bm_isInstanceOfArray(val1)) {\n var iKey;\n var lenKey = val1.length;\n var arr = createTypedArray('float32', lenKey);\n\n for (iKey = 0; iKey < lenKey; iKey += 1) {\n arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];\n }\n\n return arr;\n }\n\n return (val2 - val1) * mult + val1;\n }\n\n function nearestKey(time) {\n var iKey;\n var lenKey = data.k.length;\n var index;\n var keyTime;\n\n if (!data.k.length || typeof data.k[0] === 'number') {\n index = 0;\n keyTime = 0;\n } else {\n index = -1;\n time *= elem.comp.globalData.frameRate;\n\n if (time < data.k[0].t) {\n index = 1;\n keyTime = data.k[0].t;\n } else {\n for (iKey = 0; iKey < lenKey - 1; iKey += 1) {\n if (time === data.k[iKey].t) {\n index = iKey + 1;\n keyTime = data.k[iKey].t;\n break;\n } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {\n if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {\n index = iKey + 2;\n keyTime = data.k[iKey + 1].t;\n } else {\n index = iKey + 1;\n keyTime = data.k[iKey].t;\n }\n\n break;\n }\n }\n\n if (index === -1) {\n index = iKey + 1;\n keyTime = data.k[iKey].t;\n }\n }\n }\n\n var obKey = {};\n obKey.index = index;\n obKey.time = keyTime / elem.comp.globalData.frameRate;\n return obKey;\n }\n\n function key(ind) {\n var obKey;\n var iKey;\n var lenKey;\n\n if (!data.k.length || typeof data.k[0] === 'number') {\n throw new Error('The property has no keyframe at index ' + ind);\n }\n\n ind -= 1;\n obKey = {\n time: data.k[ind].t / elem.comp.globalData.frameRate,\n value: []\n };\n var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;\n lenKey = arr.length;\n\n for (iKey = 0; iKey < lenKey; iKey += 1) {\n obKey[iKey] = arr[iKey];\n obKey.value[iKey] = arr[iKey];\n }\n\n return obKey;\n }\n\n function framesToTime(fr, fps) {\n if (!fps) {\n fps = elem.comp.globalData.frameRate;\n }\n\n return fr / fps;\n }\n\n function timeToFrames(t, fps) {\n if (!t && t !== 0) {\n t = time;\n }\n\n if (!fps) {\n fps = elem.comp.globalData.frameRate;\n }\n\n return t * fps;\n }\n\n function seedRandom(seed) {\n BMMath.seedrandom(randSeed + seed);\n }\n\n function sourceRectAtTime() {\n return elem.sourceRectAtTime();\n }\n\n function substring(init, end) {\n if (typeof value === 'string') {\n if (end === undefined) {\n return value.substring(init);\n }\n\n return value.substring(init, end);\n }\n\n return '';\n }\n\n function substr(init, end) {\n if (typeof value === 'string') {\n if (end === undefined) {\n return value.substr(init);\n }\n\n return value.substr(init, end);\n }\n\n return '';\n }\n\n function posterizeTime(framesPerSecond) {\n time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;\n value = valueAtTime(time);\n }\n\n var time;\n var velocity;\n var value;\n var text;\n var textIndex;\n var textTotal;\n var selectorValue;\n var index = elem.data.ind;\n var hasParent = !!(elem.hierarchy && elem.hierarchy.length);\n var parent;\n var randSeed = Math.floor(Math.random() * 1000000);\n var globalData = elem.globalData;\n\n function executeExpression(_value) {\n // globalData.pushExpression();\n value = _value;\n\n if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {\n return value;\n }\n\n if (this.propType === 'textSelector') {\n textIndex = this.textIndex;\n textTotal = this.textTotal;\n selectorValue = this.selectorValue;\n }\n\n if (!thisLayer) {\n text = elem.layerInterface.text;\n thisLayer = elem.layerInterface;\n thisComp = elem.comp.compInterface;\n toWorld = thisLayer.toWorld.bind(thisLayer);\n fromWorld = thisLayer.fromWorld.bind(thisLayer);\n fromComp = thisLayer.fromComp.bind(thisLayer);\n toComp = thisLayer.toComp.bind(thisLayer);\n mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;\n fromCompToSurface = fromComp;\n }\n\n if (!transform) {\n transform = elem.layerInterface('ADBE Transform Group');\n $bm_transform = transform;\n\n if (transform) {\n anchorPoint = transform.anchorPoint;\n /* position = transform.position;\r\n rotation = transform.rotation;\r\n scale = transform.scale; */\n }\n }\n\n if (elemType === 4 && !content) {\n content = thisLayer('ADBE Root Vectors Group');\n }\n\n if (!effect) {\n effect = thisLayer(4);\n }\n\n hasParent = !!(elem.hierarchy && elem.hierarchy.length);\n\n if (hasParent && !parent) {\n parent = elem.hierarchy[0].layerInterface;\n }\n\n time = this.comp.renderedFrame / this.comp.globalData.frameRate;\n\n if (_needsRandom) {\n seedRandom(randSeed + time);\n }\n\n if (needsVelocity) {\n velocity = velocityAtTime(time);\n }\n\n expression_function();\n this.frameExpressionId = elem.globalData.frameId; // TODO: Check if it's possible to return on ShapeInterface the .v value\n // Changed this to a ternary operation because Rollup failed compiling it correctly\n\n scoped_bm_rt = scoped_bm_rt.propType === propTypes.SHAPE ? scoped_bm_rt.v : scoped_bm_rt;\n return scoped_bm_rt;\n } // Bundlers will see these as dead code and unless we reference them\n\n\n executeExpression.__preventDeadCodeRemoval = [$bm_transform, anchorPoint, time, velocity, inPoint, outPoint, width, height, name, loop_in, loop_out, smooth, toComp, fromCompToSurface, toWorld, fromWorld, mask, position, rotation, scale, thisComp, numKeys, active, wiggle, loopInDuration, loopOutDuration, comp, lookAt, easeOut, easeIn, ease, nearestKey, key, text, textIndex, textTotal, selectorValue, framesToTime, timeToFrames, sourceRectAtTime, substring, substr, posterizeTime, index, globalData];\n return executeExpression;\n }\n\n ob.initiateExpression = initiateExpression;\n ob.__preventDeadCodeRemoval = [window, document, XMLHttpRequest, fetch, frames, $bm_neg, add, $bm_sum, $bm_sub, $bm_mul, $bm_div, $bm_mod, clamp, radians_to_degrees, degreesToRadians, degrees_to_radians, normalize, rgbToHsl, hslToRgb, linear, random, createPath, _lottieGlobal];\n ob.resetFrame = resetFrame;\n return ob;\n }();\n\n var Expressions = function () {\n var ob = {};\n ob.initExpressions = initExpressions;\n ob.resetFrame = ExpressionManager.resetFrame;\n\n function initExpressions(animation) {\n var stackCount = 0;\n var registers = [];\n\n function pushExpression() {\n stackCount += 1;\n }\n\n function popExpression() {\n stackCount -= 1;\n\n if (stackCount === 0) {\n releaseInstances();\n }\n }\n\n function registerExpressionProperty(expression) {\n if (registers.indexOf(expression) === -1) {\n registers.push(expression);\n }\n }\n\n function releaseInstances() {\n var i;\n var len = registers.length;\n\n for (i = 0; i < len; i += 1) {\n registers[i].release();\n }\n\n registers.length = 0;\n }\n\n animation.renderer.compInterface = CompExpressionInterface(animation.renderer);\n animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);\n animation.renderer.globalData.pushExpression = pushExpression;\n animation.renderer.globalData.popExpression = popExpression;\n animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;\n }\n\n return ob;\n }();\n\n var MaskManagerInterface = function () {\n function MaskInterface(mask, data) {\n this._mask = mask;\n this._data = data;\n }\n\n Object.defineProperty(MaskInterface.prototype, 'maskPath', {\n get: function get() {\n if (this._mask.prop.k) {\n this._mask.prop.getValue();\n }\n\n return this._mask.prop;\n }\n });\n Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {\n get: function get() {\n if (this._mask.op.k) {\n this._mask.op.getValue();\n }\n\n return this._mask.op.v * 100;\n }\n });\n\n var MaskManager = function MaskManager(maskManager) {\n var _masksInterfaces = createSizedArray(maskManager.viewData.length);\n\n var i;\n var len = maskManager.viewData.length;\n\n for (i = 0; i < len; i += 1) {\n _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);\n }\n\n var maskFunction = function maskFunction(name) {\n i = 0;\n\n while (i < len) {\n if (maskManager.masksProperties[i].nm === name) {\n return _masksInterfaces[i];\n }\n\n i += 1;\n }\n\n return null;\n };\n\n return maskFunction;\n };\n\n return MaskManager;\n }();\n\n var ExpressionPropertyInterface = function () {\n var defaultUnidimensionalValue = {\n pv: 0,\n v: 0,\n mult: 1\n };\n var defaultMultidimensionalValue = {\n pv: [0, 0, 0],\n v: [0, 0, 0],\n mult: 1\n };\n\n function completeProperty(expressionValue, property, type) {\n Object.defineProperty(expressionValue, 'velocity', {\n get: function get() {\n return property.getVelocityAtTime(property.comp.currentFrame);\n }\n });\n expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;\n\n expressionValue.key = function (pos) {\n if (!expressionValue.numKeys) {\n return 0;\n }\n\n var value = '';\n\n if ('s' in property.keyframes[pos - 1]) {\n value = property.keyframes[pos - 1].s;\n } else if ('e' in property.keyframes[pos - 2]) {\n value = property.keyframes[pos - 2].e;\n } else {\n value = property.keyframes[pos - 2].s;\n }\n\n var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers\n\n valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;\n valueProp.value = type === 'unidimensional' ? value[0] : value;\n return valueProp;\n };\n\n expressionValue.valueAtTime = property.getValueAtTime;\n expressionValue.speedAtTime = property.getSpeedAtTime;\n expressionValue.velocityAtTime = property.getVelocityAtTime;\n expressionValue.propertyGroup = property.propertyGroup;\n }\n\n function UnidimensionalPropertyInterface(property) {\n if (!property || !('pv' in property)) {\n property = defaultUnidimensionalValue;\n }\n\n var mult = 1 / property.mult;\n var val = property.pv * mult;\n var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers\n\n expressionValue.value = val;\n completeProperty(expressionValue, property, 'unidimensional');\n return function () {\n if (property.k) {\n property.getValue();\n }\n\n val = property.v * mult;\n\n if (expressionValue.value !== val) {\n expressionValue = new Number(val); // eslint-disable-line no-new-wrappers\n\n expressionValue.value = val;\n completeProperty(expressionValue, property, 'unidimensional');\n }\n\n return expressionValue;\n };\n }\n\n function MultidimensionalPropertyInterface(property) {\n if (!property || !('pv' in property)) {\n property = defaultMultidimensionalValue;\n }\n\n var mult = 1 / property.mult;\n var len = property.data && property.data.l || property.pv.length;\n var expressionValue = createTypedArray('float32', len);\n var arrValue = createTypedArray('float32', len);\n expressionValue.value = arrValue;\n completeProperty(expressionValue, property, 'multidimensional');\n return function () {\n if (property.k) {\n property.getValue();\n }\n\n for (var i = 0; i < len; i += 1) {\n arrValue[i] = property.v[i] * mult;\n expressionValue[i] = arrValue[i];\n }\n\n return expressionValue;\n };\n } // TODO: try to avoid using this getter\n\n\n function defaultGetter() {\n return defaultUnidimensionalValue;\n }\n\n return function (property) {\n if (!property) {\n return defaultGetter;\n }\n\n if (property.propType === 'unidimensional') {\n return UnidimensionalPropertyInterface(property);\n }\n\n return MultidimensionalPropertyInterface(property);\n };\n }();\n\n var TransformExpressionInterface = function () {\n return function (transform) {\n function _thisFunction(name) {\n switch (name) {\n case 'scale':\n case 'Scale':\n case 'ADBE Scale':\n case 6:\n return _thisFunction.scale;\n\n case 'rotation':\n case 'Rotation':\n case 'ADBE Rotation':\n case 'ADBE Rotate Z':\n case 10:\n return _thisFunction.rotation;\n\n case 'ADBE Rotate X':\n return _thisFunction.xRotation;\n\n case 'ADBE Rotate Y':\n return _thisFunction.yRotation;\n\n case 'position':\n case 'Position':\n case 'ADBE Position':\n case 2:\n return _thisFunction.position;\n\n case 'ADBE Position_0':\n return _thisFunction.xPosition;\n\n case 'ADBE Position_1':\n return _thisFunction.yPosition;\n\n case 'ADBE Position_2':\n return _thisFunction.zPosition;\n\n case 'anchorPoint':\n case 'AnchorPoint':\n case 'Anchor Point':\n case 'ADBE AnchorPoint':\n case 1:\n return _thisFunction.anchorPoint;\n\n case 'opacity':\n case 'Opacity':\n case 11:\n return _thisFunction.opacity;\n\n default:\n return null;\n }\n }\n\n Object.defineProperty(_thisFunction, 'rotation', {\n get: ExpressionPropertyInterface(transform.r || transform.rz)\n });\n Object.defineProperty(_thisFunction, 'zRotation', {\n get: ExpressionPropertyInterface(transform.rz || transform.r)\n });\n Object.defineProperty(_thisFunction, 'xRotation', {\n get: ExpressionPropertyInterface(transform.rx)\n });\n Object.defineProperty(_thisFunction, 'yRotation', {\n get: ExpressionPropertyInterface(transform.ry)\n });\n Object.defineProperty(_thisFunction, 'scale', {\n get: ExpressionPropertyInterface(transform.s)\n });\n\n var _px;\n\n var _py;\n\n var _pz;\n\n var _transformFactory;\n\n if (transform.p) {\n _transformFactory = ExpressionPropertyInterface(transform.p);\n } else {\n _px = ExpressionPropertyInterface(transform.px);\n _py = ExpressionPropertyInterface(transform.py);\n\n if (transform.pz) {\n _pz = ExpressionPropertyInterface(transform.pz);\n }\n }\n\n Object.defineProperty(_thisFunction, 'position', {\n get: function get() {\n if (transform.p) {\n return _transformFactory();\n }\n\n return [_px(), _py(), _pz ? _pz() : 0];\n }\n });\n Object.defineProperty(_thisFunction, 'xPosition', {\n get: ExpressionPropertyInterface(transform.px)\n });\n Object.defineProperty(_thisFunction, 'yPosition', {\n get: ExpressionPropertyInterface(transform.py)\n });\n Object.defineProperty(_thisFunction, 'zPosition', {\n get: ExpressionPropertyInterface(transform.pz)\n });\n Object.defineProperty(_thisFunction, 'anchorPoint', {\n get: ExpressionPropertyInterface(transform.a)\n });\n Object.defineProperty(_thisFunction, 'opacity', {\n get: ExpressionPropertyInterface(transform.o)\n });\n Object.defineProperty(_thisFunction, 'skew', {\n get: ExpressionPropertyInterface(transform.sk)\n });\n Object.defineProperty(_thisFunction, 'skewAxis', {\n get: ExpressionPropertyInterface(transform.sa)\n });\n Object.defineProperty(_thisFunction, 'orientation', {\n get: ExpressionPropertyInterface(transform.or)\n });\n return _thisFunction;\n };\n }();\n\n var LayerExpressionInterface = function () {\n function getMatrix(time) {\n var toWorldMat = new Matrix();\n\n if (time !== undefined) {\n var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);\n\n propMatrix.clone(toWorldMat);\n } else {\n var transformMat = this._elem.finalTransform.mProp;\n transformMat.applyToMatrix(toWorldMat);\n }\n\n return toWorldMat;\n }\n\n function toWorldVec(arr, time) {\n var toWorldMat = this.getMatrix(time);\n toWorldMat.props[12] = 0;\n toWorldMat.props[13] = 0;\n toWorldMat.props[14] = 0;\n return this.applyPoint(toWorldMat, arr);\n }\n\n function toWorld(arr, time) {\n var toWorldMat = this.getMatrix(time);\n return this.applyPoint(toWorldMat, arr);\n }\n\n function fromWorldVec(arr, time) {\n var toWorldMat = this.getMatrix(time);\n toWorldMat.props[12] = 0;\n toWorldMat.props[13] = 0;\n toWorldMat.props[14] = 0;\n return this.invertPoint(toWorldMat, arr);\n }\n\n function fromWorld(arr, time) {\n var toWorldMat = this.getMatrix(time);\n return this.invertPoint(toWorldMat, arr);\n }\n\n function applyPoint(matrix, arr) {\n if (this._elem.hierarchy && this._elem.hierarchy.length) {\n var i;\n var len = this._elem.hierarchy.length;\n\n for (i = 0; i < len; i += 1) {\n this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);\n }\n }\n\n return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);\n }\n\n function invertPoint(matrix, arr) {\n if (this._elem.hierarchy && this._elem.hierarchy.length) {\n var i;\n var len = this._elem.hierarchy.length;\n\n for (i = 0; i < len; i += 1) {\n this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);\n }\n }\n\n return matrix.inversePoint(arr);\n }\n\n function fromComp(arr) {\n var toWorldMat = new Matrix();\n toWorldMat.reset();\n\n this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);\n\n if (this._elem.hierarchy && this._elem.hierarchy.length) {\n var i;\n var len = this._elem.hierarchy.length;\n\n for (i = 0; i < len; i += 1) {\n this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);\n }\n\n return toWorldMat.inversePoint(arr);\n }\n\n return toWorldMat.inversePoint(arr);\n }\n\n function sampleImage() {\n return [1, 1, 1, 1];\n }\n\n return function (elem) {\n var transformInterface;\n\n function _registerMaskInterface(maskManager) {\n _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);\n }\n\n function _registerEffectsInterface(effects) {\n _thisLayerFunction.effect = effects;\n }\n\n function _thisLayerFunction(name) {\n switch (name) {\n case 'ADBE Root Vectors Group':\n case 'Contents':\n case 2:\n return _thisLayerFunction.shapeInterface;\n\n case 1:\n case 6:\n case 'Transform':\n case 'transform':\n case 'ADBE Transform Group':\n return transformInterface;\n\n case 4:\n case 'ADBE Effect Parade':\n case 'effects':\n case 'Effects':\n return _thisLayerFunction.effect;\n\n case 'ADBE Text Properties':\n return _thisLayerFunction.textInterface;\n\n default:\n return null;\n }\n }\n\n _thisLayerFunction.getMatrix = getMatrix;\n _thisLayerFunction.invertPoint = invertPoint;\n _thisLayerFunction.applyPoint = applyPoint;\n _thisLayerFunction.toWorld = toWorld;\n _thisLayerFunction.toWorldVec = toWorldVec;\n _thisLayerFunction.fromWorld = fromWorld;\n _thisLayerFunction.fromWorldVec = fromWorldVec;\n _thisLayerFunction.toComp = toWorld;\n _thisLayerFunction.fromComp = fromComp;\n _thisLayerFunction.sampleImage = sampleImage;\n _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);\n _thisLayerFunction._elem = elem;\n transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);\n var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');\n Object.defineProperties(_thisLayerFunction, {\n hasParent: {\n get: function get() {\n return elem.hierarchy.length;\n }\n },\n parent: {\n get: function get() {\n return elem.hierarchy[0].layerInterface;\n }\n },\n rotation: getDescriptor(transformInterface, 'rotation'),\n scale: getDescriptor(transformInterface, 'scale'),\n position: getDescriptor(transformInterface, 'position'),\n opacity: getDescriptor(transformInterface, 'opacity'),\n anchorPoint: anchorPointDescriptor,\n anchor_point: anchorPointDescriptor,\n transform: {\n get: function get() {\n return transformInterface;\n }\n },\n active: {\n get: function get() {\n return elem.isInRange;\n }\n }\n });\n _thisLayerFunction.startTime = elem.data.st;\n _thisLayerFunction.index = elem.data.ind;\n _thisLayerFunction.source = elem.data.refId;\n _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;\n _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;\n _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;\n _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;\n _thisLayerFunction._name = elem.data.nm;\n _thisLayerFunction.registerMaskInterface = _registerMaskInterface;\n _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;\n return _thisLayerFunction;\n };\n }();\n\n var propertyGroupFactory = function () {\n return function (interfaceFunction, parentPropertyGroup) {\n return function (val) {\n val = val === undefined ? 1 : val;\n\n if (val <= 0) {\n return interfaceFunction;\n }\n\n return parentPropertyGroup(val - 1);\n };\n };\n }();\n\n var PropertyInterface = function () {\n return function (propertyName, propertyGroup) {\n var interfaceFunction = {\n _name: propertyName\n };\n\n function _propertyGroup(val) {\n val = val === undefined ? 1 : val;\n\n if (val <= 0) {\n return interfaceFunction;\n }\n\n return propertyGroup(val - 1);\n }\n\n return _propertyGroup;\n };\n }();\n\n var EffectsExpressionInterface = function () {\n var ob = {\n createEffectsInterface: createEffectsInterface\n };\n\n function createEffectsInterface(elem, propertyGroup) {\n if (elem.effectsManager) {\n var effectElements = [];\n var effectsData = elem.data.ef;\n var i;\n var len = elem.effectsManager.effectElements.length;\n\n for (i = 0; i < len; i += 1) {\n effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));\n }\n\n var effects = elem.data.ef || [];\n\n var groupInterface = function groupInterface(name) {\n i = 0;\n len = effects.length;\n\n while (i < len) {\n if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {\n return effectElements[i];\n }\n\n i += 1;\n }\n\n return null;\n };\n\n Object.defineProperty(groupInterface, 'numProperties', {\n get: function get() {\n return effects.length;\n }\n });\n return groupInterface;\n }\n\n return null;\n }\n\n function createGroupInterface(data, elements, propertyGroup, elem) {\n function groupInterface(name) {\n var effects = data.ef;\n var i = 0;\n var len = effects.length;\n\n while (i < len) {\n if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {\n if (effects[i].ty === 5) {\n return effectElements[i];\n }\n\n return effectElements[i]();\n }\n\n i += 1;\n }\n\n throw new Error();\n }\n\n var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);\n\n var effectElements = [];\n var i;\n var len = data.ef.length;\n\n for (i = 0; i < len; i += 1) {\n if (data.ef[i].ty === 5) {\n effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));\n } else {\n effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));\n }\n }\n\n if (data.mn === 'ADBE Color Control') {\n Object.defineProperty(groupInterface, 'color', {\n get: function get() {\n return effectElements[0]();\n }\n });\n }\n\n Object.defineProperties(groupInterface, {\n numProperties: {\n get: function get() {\n return data.np;\n }\n },\n _name: {\n value: data.nm\n },\n propertyGroup: {\n value: _propertyGroup\n }\n });\n groupInterface.enabled = data.en !== 0;\n groupInterface.active = groupInterface.enabled;\n return groupInterface;\n }\n\n function createValueInterface(element, type, elem, propertyGroup) {\n var expressionProperty = ExpressionPropertyInterface(element.p);\n\n function interfaceFunction() {\n if (type === 10) {\n return elem.comp.compInterface(element.p.v);\n }\n\n return expressionProperty();\n }\n\n if (element.p.setGroupProperty) {\n element.p.setGroupProperty(PropertyInterface('', propertyGroup));\n }\n\n return interfaceFunction;\n }\n\n return ob;\n }();\n\n var ShapePathInterface = function () {\n return function pathInterfaceFactory(shape, view, propertyGroup) {\n var prop = view.sh;\n\n function interfaceFunction(val) {\n if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) {\n return interfaceFunction.path;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n prop.setGroupProperty(PropertyInterface('Path', _propertyGroup));\n Object.defineProperties(interfaceFunction, {\n path: {\n get: function get() {\n if (prop.k) {\n prop.getValue();\n }\n\n return prop;\n }\n },\n shape: {\n get: function get() {\n if (prop.k) {\n prop.getValue();\n }\n\n return prop;\n }\n },\n _name: {\n value: shape.nm\n },\n ix: {\n value: shape.ix\n },\n propertyIndex: {\n value: shape.ix\n },\n mn: {\n value: shape.mn\n },\n propertyGroup: {\n value: propertyGroup\n }\n });\n return interfaceFunction;\n };\n }();\n\n var ShapeExpressionInterface = function () {\n function iterateElements(shapes, view, propertyGroup) {\n var arr = [];\n var i;\n var len = shapes ? shapes.length : 0;\n\n for (i = 0; i < len; i += 1) {\n if (shapes[i].ty === 'gr') {\n arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'fl') {\n arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'st') {\n arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'tm') {\n arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'tr') {// arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));\n } else if (shapes[i].ty === 'el') {\n arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'sr') {\n arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'sh') {\n arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'rc') {\n arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'rd') {\n arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'rp') {\n arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'gf') {\n arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else {\n arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));\n }\n }\n\n return arr;\n }\n\n function contentsInterfaceFactory(shape, view, propertyGroup) {\n var interfaces;\n\n var interfaceFunction = function _interfaceFunction(value) {\n var i = 0;\n var len = interfaces.length;\n\n while (i < len) {\n if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {\n return interfaces[i];\n }\n\n i += 1;\n }\n\n if (typeof value === 'number') {\n return interfaces[value - 1];\n }\n\n return null;\n };\n\n interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);\n interfaceFunction.numProperties = interfaces.length;\n var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);\n interfaceFunction.transform = transformInterface;\n interfaceFunction.propertyIndex = shape.cix;\n interfaceFunction._name = shape.nm;\n return interfaceFunction;\n }\n\n function groupInterfaceFactory(shape, view, propertyGroup) {\n var interfaceFunction = function _interfaceFunction(value) {\n switch (value) {\n case 'ADBE Vectors Group':\n case 'Contents':\n case 2:\n return interfaceFunction.content;\n // Not necessary for now. Keeping them here in case a new case appears\n // case 'ADBE Vector Transform Group':\n // case 3:\n\n default:\n return interfaceFunction.transform;\n }\n };\n\n interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);\n var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);\n interfaceFunction.content = content;\n interfaceFunction.transform = transformInterface;\n Object.defineProperty(interfaceFunction, '_name', {\n get: function get() {\n return shape.nm;\n }\n }); // interfaceFunction.content = interfaceFunction;\n\n interfaceFunction.numProperties = shape.np;\n interfaceFunction.propertyIndex = shape.ix;\n interfaceFunction.nm = shape.nm;\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n function fillInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(val) {\n if (val === 'Color' || val === 'color') {\n return interfaceFunction.color;\n }\n\n if (val === 'Opacity' || val === 'opacity') {\n return interfaceFunction.opacity;\n }\n\n return null;\n }\n\n Object.defineProperties(interfaceFunction, {\n color: {\n get: ExpressionPropertyInterface(view.c)\n },\n opacity: {\n get: ExpressionPropertyInterface(view.o)\n },\n _name: {\n value: shape.nm\n },\n mn: {\n value: shape.mn\n }\n });\n view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));\n view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));\n return interfaceFunction;\n }\n\n function gradientFillInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(val) {\n if (val === 'Start Point' || val === 'start point') {\n return interfaceFunction.startPoint;\n }\n\n if (val === 'End Point' || val === 'end point') {\n return interfaceFunction.endPoint;\n }\n\n if (val === 'Opacity' || val === 'opacity') {\n return interfaceFunction.opacity;\n }\n\n return null;\n }\n\n Object.defineProperties(interfaceFunction, {\n startPoint: {\n get: ExpressionPropertyInterface(view.s)\n },\n endPoint: {\n get: ExpressionPropertyInterface(view.e)\n },\n opacity: {\n get: ExpressionPropertyInterface(view.o)\n },\n type: {\n get: function get() {\n return 'a';\n }\n },\n _name: {\n value: shape.nm\n },\n mn: {\n value: shape.mn\n }\n });\n view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));\n view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));\n view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));\n return interfaceFunction;\n }\n\n function defaultInterfaceFactory() {\n function interfaceFunction() {\n return null;\n }\n\n return interfaceFunction;\n }\n\n function strokeInterfaceFactory(shape, view, propertyGroup) {\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);\n\n function addPropertyToDashOb(i) {\n Object.defineProperty(dashOb, shape.d[i].nm, {\n get: ExpressionPropertyInterface(view.d.dataProps[i].p)\n });\n }\n\n var i;\n var len = shape.d ? shape.d.length : 0;\n var dashOb = {};\n\n for (i = 0; i < len; i += 1) {\n addPropertyToDashOb(i);\n view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);\n }\n\n function interfaceFunction(val) {\n if (val === 'Color' || val === 'color') {\n return interfaceFunction.color;\n }\n\n if (val === 'Opacity' || val === 'opacity') {\n return interfaceFunction.opacity;\n }\n\n if (val === 'Stroke Width' || val === 'stroke width') {\n return interfaceFunction.strokeWidth;\n }\n\n return null;\n }\n\n Object.defineProperties(interfaceFunction, {\n color: {\n get: ExpressionPropertyInterface(view.c)\n },\n opacity: {\n get: ExpressionPropertyInterface(view.o)\n },\n strokeWidth: {\n get: ExpressionPropertyInterface(view.w)\n },\n dash: {\n get: function get() {\n return dashOb;\n }\n },\n _name: {\n value: shape.nm\n },\n mn: {\n value: shape.mn\n }\n });\n view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));\n view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\n view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));\n return interfaceFunction;\n }\n\n function trimInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(val) {\n if (val === shape.e.ix || val === 'End' || val === 'end') {\n return interfaceFunction.end;\n }\n\n if (val === shape.s.ix) {\n return interfaceFunction.start;\n }\n\n if (val === shape.o.ix) {\n return interfaceFunction.offset;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n interfaceFunction.propertyIndex = shape.ix;\n view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));\n view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));\n view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));\n interfaceFunction.propertyIndex = shape.ix;\n interfaceFunction.propertyGroup = propertyGroup;\n Object.defineProperties(interfaceFunction, {\n start: {\n get: ExpressionPropertyInterface(view.s)\n },\n end: {\n get: ExpressionPropertyInterface(view.e)\n },\n offset: {\n get: ExpressionPropertyInterface(view.o)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n function transformInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(value) {\n if (shape.a.ix === value || value === 'Anchor Point') {\n return interfaceFunction.anchorPoint;\n }\n\n if (shape.o.ix === value || value === 'Opacity') {\n return interfaceFunction.opacity;\n }\n\n if (shape.p.ix === value || value === 'Position') {\n return interfaceFunction.position;\n }\n\n if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {\n return interfaceFunction.rotation;\n }\n\n if (shape.s.ix === value || value === 'Scale') {\n return interfaceFunction.scale;\n }\n\n if (shape.sk && shape.sk.ix === value || value === 'Skew') {\n return interfaceFunction.skew;\n }\n\n if (shape.sa && shape.sa.ix === value || value === 'Skew Axis') {\n return interfaceFunction.skewAxis;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\n view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\n view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));\n view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));\n view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\n\n if (view.transform.mProps.sk) {\n view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));\n view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));\n }\n\n view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\n Object.defineProperties(interfaceFunction, {\n opacity: {\n get: ExpressionPropertyInterface(view.transform.mProps.o)\n },\n position: {\n get: ExpressionPropertyInterface(view.transform.mProps.p)\n },\n anchorPoint: {\n get: ExpressionPropertyInterface(view.transform.mProps.a)\n },\n scale: {\n get: ExpressionPropertyInterface(view.transform.mProps.s)\n },\n rotation: {\n get: ExpressionPropertyInterface(view.transform.mProps.r)\n },\n skew: {\n get: ExpressionPropertyInterface(view.transform.mProps.sk)\n },\n skewAxis: {\n get: ExpressionPropertyInterface(view.transform.mProps.sa)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.ty = 'tr';\n interfaceFunction.mn = shape.mn;\n interfaceFunction.propertyGroup = propertyGroup;\n return interfaceFunction;\n }\n\n function ellipseInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(value) {\n if (shape.p.ix === value) {\n return interfaceFunction.position;\n }\n\n if (shape.s.ix === value) {\n return interfaceFunction.size;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n interfaceFunction.propertyIndex = shape.ix;\n var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\n prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));\n prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\n Object.defineProperties(interfaceFunction, {\n size: {\n get: ExpressionPropertyInterface(prop.s)\n },\n position: {\n get: ExpressionPropertyInterface(prop.p)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n function starInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(value) {\n if (shape.p.ix === value) {\n return interfaceFunction.position;\n }\n\n if (shape.r.ix === value) {\n return interfaceFunction.rotation;\n }\n\n if (shape.pt.ix === value) {\n return interfaceFunction.points;\n }\n\n if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {\n return interfaceFunction.outerRadius;\n }\n\n if (shape.os.ix === value) {\n return interfaceFunction.outerRoundness;\n }\n\n if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {\n return interfaceFunction.innerRadius;\n }\n\n if (shape.is && shape.is.ix === value) {\n return interfaceFunction.innerRoundness;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\n interfaceFunction.propertyIndex = shape.ix;\n prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));\n prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));\n prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));\n prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\n prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\n\n if (shape.ir) {\n prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));\n prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));\n }\n\n Object.defineProperties(interfaceFunction, {\n position: {\n get: ExpressionPropertyInterface(prop.p)\n },\n rotation: {\n get: ExpressionPropertyInterface(prop.r)\n },\n points: {\n get: ExpressionPropertyInterface(prop.pt)\n },\n outerRadius: {\n get: ExpressionPropertyInterface(prop.or)\n },\n outerRoundness: {\n get: ExpressionPropertyInterface(prop.os)\n },\n innerRadius: {\n get: ExpressionPropertyInterface(prop.ir)\n },\n innerRoundness: {\n get: ExpressionPropertyInterface(prop.is)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n function rectInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(value) {\n if (shape.p.ix === value) {\n return interfaceFunction.position;\n }\n\n if (shape.r.ix === value) {\n return interfaceFunction.roundness;\n }\n\n if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {\n return interfaceFunction.size;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\n interfaceFunction.propertyIndex = shape.ix;\n prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\n prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));\n prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\n Object.defineProperties(interfaceFunction, {\n position: {\n get: ExpressionPropertyInterface(prop.p)\n },\n roundness: {\n get: ExpressionPropertyInterface(prop.r)\n },\n size: {\n get: ExpressionPropertyInterface(prop.s)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n function roundedInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(value) {\n if (shape.r.ix === value || value === 'Round Corners 1') {\n return interfaceFunction.radius;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n var prop = view;\n interfaceFunction.propertyIndex = shape.ix;\n prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));\n Object.defineProperties(interfaceFunction, {\n radius: {\n get: ExpressionPropertyInterface(prop.rd)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n function repeaterInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(value) {\n if (shape.c.ix === value || value === 'Copies') {\n return interfaceFunction.copies;\n }\n\n if (shape.o.ix === value || value === 'Offset') {\n return interfaceFunction.offset;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n var prop = view;\n interfaceFunction.propertyIndex = shape.ix;\n prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));\n prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));\n Object.defineProperties(interfaceFunction, {\n copies: {\n get: ExpressionPropertyInterface(prop.c)\n },\n offset: {\n get: ExpressionPropertyInterface(prop.o)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n return function (shapes, view, propertyGroup) {\n var interfaces;\n\n function _interfaceFunction(value) {\n if (typeof value === 'number') {\n value = value === undefined ? 1 : value;\n\n if (value === 0) {\n return propertyGroup;\n }\n\n return interfaces[value - 1];\n }\n\n var i = 0;\n var len = interfaces.length;\n\n while (i < len) {\n if (interfaces[i]._name === value) {\n return interfaces[i];\n }\n\n i += 1;\n }\n\n return null;\n }\n\n function parentGroupWrapper() {\n return propertyGroup;\n }\n\n _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);\n interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);\n _interfaceFunction.numProperties = interfaces.length;\n _interfaceFunction._name = 'Contents';\n return _interfaceFunction;\n };\n }();\n\n var TextExpressionInterface = function () {\n return function (elem) {\n var _sourceText;\n\n function _thisLayerFunction(name) {\n switch (name) {\n case 'ADBE Text Document':\n return _thisLayerFunction.sourceText;\n\n default:\n return null;\n }\n }\n\n Object.defineProperty(_thisLayerFunction, 'sourceText', {\n get: function get() {\n elem.textProperty.getValue();\n var stringValue = elem.textProperty.currentData.t;\n\n if (!_sourceText || stringValue !== _sourceText.value) {\n _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers\n // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive\n\n _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers\n\n Object.defineProperty(_sourceText, 'style', {\n get: function get() {\n return {\n fillColor: elem.textProperty.currentData.fc\n };\n }\n });\n }\n\n return _sourceText;\n }\n });\n return _thisLayerFunction;\n };\n }();\n\n function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n var FootageInterface = function () {\n var outlineInterfaceFactory = function outlineInterfaceFactory(elem) {\n var currentPropertyName = '';\n var currentProperty = elem.getFootageData();\n\n function init() {\n currentPropertyName = '';\n currentProperty = elem.getFootageData();\n return searchProperty;\n }\n\n function searchProperty(value) {\n if (currentProperty[value]) {\n currentPropertyName = value;\n currentProperty = currentProperty[value];\n\n if (_typeof(currentProperty) === 'object') {\n return searchProperty;\n }\n\n return currentProperty;\n }\n\n var propertyNameIndex = value.indexOf(currentPropertyName);\n\n if (propertyNameIndex !== -1) {\n var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);\n currentProperty = currentProperty[index];\n\n if (_typeof(currentProperty) === 'object') {\n return searchProperty;\n }\n\n return currentProperty;\n }\n\n return '';\n }\n\n return init;\n };\n\n var dataInterfaceFactory = function dataInterfaceFactory(elem) {\n function interfaceFunction(value) {\n if (value === 'Outline') {\n return interfaceFunction.outlineInterface();\n }\n\n return null;\n }\n\n interfaceFunction._name = 'Outline';\n interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);\n return interfaceFunction;\n };\n\n return function (elem) {\n function _interfaceFunction(value) {\n if (value === 'Data') {\n return _interfaceFunction.dataInterface;\n }\n\n return null;\n }\n\n _interfaceFunction._name = 'Data';\n _interfaceFunction.dataInterface = dataInterfaceFactory(elem);\n return _interfaceFunction;\n };\n }();\n\n var interfaces = {\n layer: LayerExpressionInterface,\n effects: EffectsExpressionInterface,\n comp: CompExpressionInterface,\n shape: ShapeExpressionInterface,\n text: TextExpressionInterface,\n footage: FootageInterface\n };\n\n function getInterface(type) {\n return interfaces[type] || null;\n }\n\n var expressionHelpers = function () {\n function searchExpressions(elem, data, prop) {\n if (data.x) {\n prop.k = true;\n prop.x = true;\n prop.initiateExpression = ExpressionManager.initiateExpression;\n prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop));\n }\n }\n\n function getValueAtTime(frameNum) {\n frameNum *= this.elem.globalData.frameRate;\n frameNum -= this.offsetTime;\n\n if (frameNum !== this._cachingAtTime.lastFrame) {\n this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;\n this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);\n this._cachingAtTime.lastFrame = frameNum;\n }\n\n return this._cachingAtTime.value;\n }\n\n function getSpeedAtTime(frameNum) {\n var delta = -0.01;\n var v1 = this.getValueAtTime(frameNum);\n var v2 = this.getValueAtTime(frameNum + delta);\n var speed = 0;\n\n if (v1.length) {\n var i;\n\n for (i = 0; i < v1.length; i += 1) {\n speed += Math.pow(v2[i] - v1[i], 2);\n }\n\n speed = Math.sqrt(speed) * 100;\n } else {\n speed = 0;\n }\n\n return speed;\n }\n\n function getVelocityAtTime(frameNum) {\n if (this.vel !== undefined) {\n return this.vel;\n }\n\n var delta = -0.001; // frameNum += this.elem.data.st;\n\n var v1 = this.getValueAtTime(frameNum);\n var v2 = this.getValueAtTime(frameNum + delta);\n var velocity;\n\n if (v1.length) {\n velocity = createTypedArray('float32', v1.length);\n var i;\n\n for (i = 0; i < v1.length; i += 1) {\n // removing frameRate\n // if needed, don't add it here\n // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);\n velocity[i] = (v2[i] - v1[i]) / delta;\n }\n } else {\n velocity = (v2 - v1) / delta;\n }\n\n return velocity;\n }\n\n function getStaticValueAtTime() {\n return this.pv;\n }\n\n function setGroupProperty(propertyGroup) {\n this.propertyGroup = propertyGroup;\n }\n\n return {\n searchExpressions: searchExpressions,\n getSpeedAtTime: getSpeedAtTime,\n getVelocityAtTime: getVelocityAtTime,\n getValueAtTime: getValueAtTime,\n getStaticValueAtTime: getStaticValueAtTime,\n setGroupProperty: setGroupProperty\n };\n }();\n\n function addPropertyDecorator() {\n function loopOut(type, duration, durationFlag) {\n if (!this.k || !this.keyframes) {\n return this.pv;\n }\n\n type = type ? type.toLowerCase() : '';\n var currentFrame = this.comp.renderedFrame;\n var keyframes = this.keyframes;\n var lastKeyFrame = keyframes[keyframes.length - 1].t;\n\n if (currentFrame <= lastKeyFrame) {\n return this.pv;\n }\n\n var cycleDuration;\n var firstKeyFrame;\n\n if (!durationFlag) {\n if (!duration || duration > keyframes.length - 1) {\n duration = keyframes.length - 1;\n }\n\n firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;\n cycleDuration = lastKeyFrame - firstKeyFrame;\n } else {\n if (!duration) {\n cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip);\n } else {\n cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration);\n }\n\n firstKeyFrame = lastKeyFrame - cycleDuration;\n }\n\n var i;\n var len;\n var ret;\n\n if (type === 'pingpong') {\n var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);\n\n if (iterations % 2 !== 0) {\n return this.getValueAtTime((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\n }\n } else if (type === 'offset') {\n var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\n var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\n var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\n\n var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);\n\n if (this.pv.length) {\n ret = new Array(initV.length);\n len = ret.length;\n\n for (i = 0; i < len; i += 1) {\n ret[i] = (endV[i] - initV[i]) * repeats + current[i];\n }\n\n return ret;\n }\n\n return (endV - initV) * repeats + current;\n } else if (type === 'continue') {\n var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\n var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);\n\n if (this.pv.length) {\n ret = new Array(lastValue.length);\n len = ret.length;\n\n for (i = 0; i < len; i += 1) {\n ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line\n }\n\n return ret;\n }\n\n return lastValue + (lastValue - nextLastValue) * ((currentFrame - lastKeyFrame) / 0.001);\n }\n\n return this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\n }\n\n function loopIn(type, duration, durationFlag) {\n if (!this.k) {\n return this.pv;\n }\n\n type = type ? type.toLowerCase() : '';\n var currentFrame = this.comp.renderedFrame;\n var keyframes = this.keyframes;\n var firstKeyFrame = keyframes[0].t;\n\n if (currentFrame >= firstKeyFrame) {\n return this.pv;\n }\n\n var cycleDuration;\n var lastKeyFrame;\n\n if (!durationFlag) {\n if (!duration || duration > keyframes.length - 1) {\n duration = keyframes.length - 1;\n }\n\n lastKeyFrame = keyframes[duration].t;\n cycleDuration = lastKeyFrame - firstKeyFrame;\n } else {\n if (!duration) {\n cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame);\n } else {\n cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration);\n }\n\n lastKeyFrame = firstKeyFrame + cycleDuration;\n }\n\n var i;\n var len;\n var ret;\n\n if (type === 'pingpong') {\n var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration);\n\n if (iterations % 2 === 0) {\n return this.getValueAtTime(((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\n }\n } else if (type === 'offset') {\n var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\n var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\n var current = this.getValueAtTime((cycleDuration - (firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0);\n var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1;\n\n if (this.pv.length) {\n ret = new Array(initV.length);\n len = ret.length;\n\n for (i = 0; i < len; i += 1) {\n ret[i] = current[i] - (endV[i] - initV[i]) * repeats;\n }\n\n return ret;\n }\n\n return current - (endV - initV) * repeats;\n } else if (type === 'continue') {\n var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\n var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);\n\n if (this.pv.length) {\n ret = new Array(firstValue.length);\n len = ret.length;\n\n for (i = 0; i < len; i += 1) {\n ret[i] = firstValue[i] + (firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame) / 0.001;\n }\n\n return ret;\n }\n\n return firstValue + (firstValue - nextFirstValue) * (firstKeyFrame - currentFrame) / 0.001;\n }\n\n return this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line\n }\n\n function smooth(width, samples) {\n if (!this.k) {\n return this.pv;\n }\n\n width = (width || 0.4) * 0.5;\n samples = Math.floor(samples || 5);\n\n if (samples <= 1) {\n return this.pv;\n }\n\n var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;\n var initFrame = currentTime - width;\n var endFrame = currentTime + width;\n var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;\n var i = 0;\n var j = 0;\n var value;\n\n if (this.pv.length) {\n value = createTypedArray('float32', this.pv.length);\n } else {\n value = 0;\n }\n\n var sampleValue;\n\n while (i < samples) {\n sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);\n\n if (this.pv.length) {\n for (j = 0; j < this.pv.length; j += 1) {\n value[j] += sampleValue[j];\n }\n } else {\n value += sampleValue;\n }\n\n i += 1;\n }\n\n if (this.pv.length) {\n for (j = 0; j < this.pv.length; j += 1) {\n value[j] /= samples;\n }\n } else {\n value /= samples;\n }\n\n return value;\n }\n\n function getTransformValueAtTime(time) {\n if (!this._transformCachingAtTime) {\n this._transformCachingAtTime = {\n v: new Matrix()\n };\n } /// /\n\n\n var matrix = this._transformCachingAtTime.v;\n matrix.cloneFromProps(this.pre.props);\n\n if (this.appliedTransformations < 1) {\n var anchor = this.a.getValueAtTime(time);\n matrix.translate(-anchor[0] * this.a.mult, -anchor[1] * this.a.mult, anchor[2] * this.a.mult);\n }\n\n if (this.appliedTransformations < 2) {\n var scale = this.s.getValueAtTime(time);\n matrix.scale(scale[0] * this.s.mult, scale[1] * this.s.mult, scale[2] * this.s.mult);\n }\n\n if (this.sk && this.appliedTransformations < 3) {\n var skew = this.sk.getValueAtTime(time);\n var skewAxis = this.sa.getValueAtTime(time);\n matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult);\n }\n\n if (this.r && this.appliedTransformations < 4) {\n var rotation = this.r.getValueAtTime(time);\n matrix.rotate(-rotation * this.r.mult);\n } else if (!this.r && this.appliedTransformations < 4) {\n var rotationZ = this.rz.getValueAtTime(time);\n var rotationY = this.ry.getValueAtTime(time);\n var rotationX = this.rx.getValueAtTime(time);\n var orientation = this.or.getValueAtTime(time);\n matrix.rotateZ(-rotationZ * this.rz.mult).rotateY(rotationY * this.ry.mult).rotateX(rotationX * this.rx.mult).rotateZ(-orientation[2] * this.or.mult).rotateY(orientation[1] * this.or.mult).rotateX(orientation[0] * this.or.mult);\n }\n\n if (this.data.p && this.data.p.s) {\n var positionX = this.px.getValueAtTime(time);\n var positionY = this.py.getValueAtTime(time);\n\n if (this.data.p.z) {\n var positionZ = this.pz.getValueAtTime(time);\n matrix.translate(positionX * this.px.mult, positionY * this.py.mult, -positionZ * this.pz.mult);\n } else {\n matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0);\n }\n } else {\n var position = this.p.getValueAtTime(time);\n matrix.translate(position[0] * this.p.mult, position[1] * this.p.mult, -position[2] * this.p.mult);\n }\n\n return matrix; /// /\n }\n\n function getTransformStaticValueAtTime() {\n return this.v.clone(new Matrix());\n }\n\n var getTransformProperty = TransformPropertyFactory.getTransformProperty;\n\n TransformPropertyFactory.getTransformProperty = function (elem, data, container) {\n var prop = getTransformProperty(elem, data, container);\n\n if (prop.dynamicProperties.length) {\n prop.getValueAtTime = getTransformValueAtTime.bind(prop);\n } else {\n prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);\n }\n\n prop.setGroupProperty = expressionHelpers.setGroupProperty;\n return prop;\n };\n\n var propertyGetProp = PropertyFactory.getProp;\n\n PropertyFactory.getProp = function (elem, data, type, mult, container) {\n var prop = propertyGetProp(elem, data, type, mult, container); // prop.getVelocityAtTime = getVelocityAtTime;\n // prop.loopOut = loopOut;\n // prop.loopIn = loopIn;\n\n if (prop.kf) {\n prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);\n } else {\n prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);\n }\n\n prop.setGroupProperty = expressionHelpers.setGroupProperty;\n prop.loopOut = loopOut;\n prop.loopIn = loopIn;\n prop.smooth = smooth;\n prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);\n prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);\n prop.numKeys = data.a === 1 ? data.k.length : 0;\n prop.propertyIndex = data.ix;\n var value = 0;\n\n if (type !== 0) {\n value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length);\n }\n\n prop._cachingAtTime = {\n lastFrame: initialDefaultFrame,\n lastIndex: 0,\n value: value\n };\n expressionHelpers.searchExpressions(elem, data, prop);\n\n if (prop.k) {\n container.addDynamicProperty(prop);\n }\n\n return prop;\n };\n\n function getShapeValueAtTime(frameNum) {\n // For now this caching object is created only when needed instead of creating it when the shape is initialized.\n if (!this._cachingAtTime) {\n this._cachingAtTime = {\n shapeValue: shapePool.clone(this.pv),\n lastIndex: 0,\n lastTime: initialDefaultFrame\n };\n }\n\n frameNum *= this.elem.globalData.frameRate;\n frameNum -= this.offsetTime;\n\n if (frameNum !== this._cachingAtTime.lastTime) {\n this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;\n this._cachingAtTime.lastTime = frameNum;\n this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);\n }\n\n return this._cachingAtTime.shapeValue;\n }\n\n var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();\n var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();\n\n function ShapeExpressions() {}\n\n ShapeExpressions.prototype = {\n vertices: function vertices(prop, time) {\n if (this.k) {\n this.getValue();\n }\n\n var shapePath = this.v;\n\n if (time !== undefined) {\n shapePath = this.getValueAtTime(time, 0);\n }\n\n var i;\n var len = shapePath._length;\n var vertices = shapePath[prop];\n var points = shapePath.v;\n var arr = createSizedArray(len);\n\n for (i = 0; i < len; i += 1) {\n if (prop === 'i' || prop === 'o') {\n arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];\n } else {\n arr[i] = [vertices[i][0], vertices[i][1]];\n }\n }\n\n return arr;\n },\n points: function points(time) {\n return this.vertices('v', time);\n },\n inTangents: function inTangents(time) {\n return this.vertices('i', time);\n },\n outTangents: function outTangents(time) {\n return this.vertices('o', time);\n },\n isClosed: function isClosed() {\n return this.v.c;\n },\n pointOnPath: function pointOnPath(perc, time) {\n var shapePath = this.v;\n\n if (time !== undefined) {\n shapePath = this.getValueAtTime(time, 0);\n }\n\n if (!this._segmentsLength) {\n this._segmentsLength = bez.getSegmentsLength(shapePath);\n }\n\n var segmentsLength = this._segmentsLength;\n var lengths = segmentsLength.lengths;\n var lengthPos = segmentsLength.totalLength * perc;\n var i = 0;\n var len = lengths.length;\n var accumulatedLength = 0;\n var pt;\n\n while (i < len) {\n if (accumulatedLength + lengths[i].addedLength > lengthPos) {\n var initIndex = i;\n var endIndex = shapePath.c && i === len - 1 ? 0 : i + 1;\n var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength;\n pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);\n break;\n } else {\n accumulatedLength += lengths[i].addedLength;\n }\n\n i += 1;\n }\n\n if (!pt) {\n pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]];\n }\n\n return pt;\n },\n vectorOnPath: function vectorOnPath(perc, time, vectorType) {\n // perc doesn't use triple equality because it can be a Number object as well as a primitive.\n if (perc == 1) {\n // eslint-disable-line eqeqeq\n perc = this.v.c;\n } else if (perc == 0) {\n // eslint-disable-line eqeqeq\n perc = 0.999;\n }\n\n var pt1 = this.pointOnPath(perc, time);\n var pt2 = this.pointOnPath(perc + 0.001, time);\n var xLength = pt2[0] - pt1[0];\n var yLength = pt2[1] - pt1[1];\n var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2));\n\n if (magnitude === 0) {\n return [0, 0];\n }\n\n var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude];\n return unitVector;\n },\n tangentOnPath: function tangentOnPath(perc, time) {\n return this.vectorOnPath(perc, time, 'tangent');\n },\n normalOnPath: function normalOnPath(perc, time) {\n return this.vectorOnPath(perc, time, 'normal');\n },\n setGroupProperty: expressionHelpers.setGroupProperty,\n getValueAtTime: expressionHelpers.getStaticValueAtTime\n };\n extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);\n extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);\n KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;\n KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;\n var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;\n\n ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) {\n var prop = propertyGetShapeProp(elem, data, type, arr, trims);\n prop.propertyIndex = data.ix;\n prop.lock = false;\n\n if (type === 3) {\n expressionHelpers.searchExpressions(elem, data.pt, prop);\n } else if (type === 4) {\n expressionHelpers.searchExpressions(elem, data.ks, prop);\n }\n\n if (prop.k) {\n elem.addDynamicProperty(prop);\n }\n\n return prop;\n };\n }\n\n function initialize$1() {\n addPropertyDecorator();\n }\n\n function addDecorator() {\n function searchExpressions() {\n if (this.data.d.x) {\n this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);\n this.addEffect(this.getExpressionValue.bind(this));\n return true;\n }\n\n return null;\n }\n\n TextProperty.prototype.getExpressionValue = function (currentValue, text) {\n var newValue = this.calculateExpression(text);\n\n if (currentValue.t !== newValue) {\n var newData = {};\n this.copyData(newData, currentValue);\n newData.t = newValue.toString();\n newData.__complete = false;\n return newData;\n }\n\n return currentValue;\n };\n\n TextProperty.prototype.searchProperty = function () {\n var isKeyframed = this.searchKeyframes();\n var hasExpressions = this.searchExpressions();\n this.kf = isKeyframed || hasExpressions;\n return this.kf;\n };\n\n TextProperty.prototype.searchExpressions = searchExpressions;\n }\n\n function initialize() {\n addDecorator();\n }\n\n function SVGComposableEffect() {}\n\n SVGComposableEffect.prototype = {\n createMergeNode: function createMergeNode(resultId, ins) {\n var feMerge = createNS('feMerge');\n feMerge.setAttribute('result', resultId);\n var feMergeNode;\n var i;\n\n for (i = 0; i < ins.length; i += 1) {\n feMergeNode = createNS('feMergeNode');\n feMergeNode.setAttribute('in', ins[i]);\n feMerge.appendChild(feMergeNode);\n feMerge.appendChild(feMergeNode);\n }\n\n return feMerge;\n }\n };\n\n var linearFilterValue = '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0';\n\n function SVGTintFilter(filter, filterManager, elem, id, source) {\n this.filterManager = filterManager;\n var feColorMatrix = createNS('feColorMatrix');\n feColorMatrix.setAttribute('type', 'matrix');\n feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');\n feColorMatrix.setAttribute('values', linearFilterValue + ' 1 0');\n this.linearFilter = feColorMatrix;\n feColorMatrix.setAttribute('result', id + '_tint_1');\n filter.appendChild(feColorMatrix);\n feColorMatrix = createNS('feColorMatrix');\n feColorMatrix.setAttribute('type', 'matrix');\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\n feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');\n feColorMatrix.setAttribute('result', id + '_tint_2');\n filter.appendChild(feColorMatrix);\n this.matrixFilter = feColorMatrix;\n var feMerge = this.createMergeNode(id, [source, id + '_tint_1', id + '_tint_2']);\n filter.appendChild(feMerge);\n }\n\n extendPrototype([SVGComposableEffect], SVGTintFilter);\n\n SVGTintFilter.prototype.renderFrame = function (forceRender) {\n if (forceRender || this.filterManager._mdf) {\n var colorBlack = this.filterManager.effectElements[0].p.v;\n var colorWhite = this.filterManager.effectElements[1].p.v;\n var opacity = this.filterManager.effectElements[2].p.v / 100;\n this.linearFilter.setAttribute('values', linearFilterValue + ' ' + opacity + ' 0');\n this.matrixFilter.setAttribute('values', colorWhite[0] - colorBlack[0] + ' 0 0 0 ' + colorBlack[0] + ' ' + (colorWhite[1] - colorBlack[1]) + ' 0 0 0 ' + colorBlack[1] + ' ' + (colorWhite[2] - colorBlack[2]) + ' 0 0 0 ' + colorBlack[2] + ' 0 0 0 1 0');\n }\n };\n\n function SVGFillFilter(filter, filterManager, elem, id) {\n this.filterManager = filterManager;\n var feColorMatrix = createNS('feColorMatrix');\n feColorMatrix.setAttribute('type', 'matrix');\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\n feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');\n feColorMatrix.setAttribute('result', id);\n filter.appendChild(feColorMatrix);\n this.matrixFilter = feColorMatrix;\n }\n\n SVGFillFilter.prototype.renderFrame = function (forceRender) {\n if (forceRender || this.filterManager._mdf) {\n var color = this.filterManager.effectElements[2].p.v;\n var opacity = this.filterManager.effectElements[6].p.v;\n this.matrixFilter.setAttribute('values', '0 0 0 0 ' + color[0] + ' 0 0 0 0 ' + color[1] + ' 0 0 0 0 ' + color[2] + ' 0 0 0 ' + opacity + ' 0');\n }\n };\n\n function SVGStrokeEffect(fil, filterManager, elem) {\n this.initialized = false;\n this.filterManager = filterManager;\n this.elem = elem;\n this.paths = [];\n }\n\n SVGStrokeEffect.prototype.initialize = function () {\n var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;\n var path;\n var groupPath;\n var i;\n var len;\n\n if (this.filterManager.effectElements[1].p.v === 1) {\n len = this.elem.maskManager.masksProperties.length;\n i = 0;\n } else {\n i = this.filterManager.effectElements[0].p.v - 1;\n len = i + 1;\n }\n\n groupPath = createNS('g');\n groupPath.setAttribute('fill', 'none');\n groupPath.setAttribute('stroke-linecap', 'round');\n groupPath.setAttribute('stroke-dashoffset', 1);\n\n for (i; i < len; i += 1) {\n path = createNS('path');\n groupPath.appendChild(path);\n this.paths.push({\n p: path,\n m: i\n });\n }\n\n if (this.filterManager.effectElements[10].p.v === 3) {\n var mask = createNS('mask');\n var id = createElementID();\n mask.setAttribute('id', id);\n mask.setAttribute('mask-type', 'alpha');\n mask.appendChild(groupPath);\n this.elem.globalData.defs.appendChild(mask);\n var g = createNS('g');\n g.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');\n\n while (elemChildren[0]) {\n g.appendChild(elemChildren[0]);\n }\n\n this.elem.layerElement.appendChild(g);\n this.masker = mask;\n groupPath.setAttribute('stroke', '#fff');\n } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {\n if (this.filterManager.effectElements[10].p.v === 2) {\n elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;\n\n while (elemChildren.length) {\n this.elem.layerElement.removeChild(elemChildren[0]);\n }\n }\n\n this.elem.layerElement.appendChild(groupPath);\n this.elem.layerElement.removeAttribute('mask');\n groupPath.setAttribute('stroke', '#fff');\n }\n\n this.initialized = true;\n this.pathMasker = groupPath;\n };\n\n SVGStrokeEffect.prototype.renderFrame = function (forceRender) {\n if (!this.initialized) {\n this.initialize();\n }\n\n var i;\n var len = this.paths.length;\n var mask;\n var path;\n\n for (i = 0; i < len; i += 1) {\n if (this.paths[i].m !== -1) {\n mask = this.elem.maskManager.viewData[this.paths[i].m];\n path = this.paths[i].p;\n\n if (forceRender || this.filterManager._mdf || mask.prop._mdf) {\n path.setAttribute('d', mask.lastPath);\n }\n\n if (forceRender || this.filterManager.effectElements[9].p._mdf || this.filterManager.effectElements[4].p._mdf || this.filterManager.effectElements[7].p._mdf || this.filterManager.effectElements[8].p._mdf || mask.prop._mdf) {\n var dasharrayValue;\n\n if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {\n var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;\n var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;\n var l = path.getTotalLength();\n dasharrayValue = '0 0 0 ' + l * s + ' ';\n var lineLength = l * (e - s);\n var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;\n var units = Math.floor(lineLength / segment);\n var j;\n\n for (j = 0; j < units; j += 1) {\n dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';\n }\n\n dasharrayValue += '0 ' + l * 10 + ' 0 0';\n } else {\n dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;\n }\n\n path.setAttribute('stroke-dasharray', dasharrayValue);\n }\n }\n }\n\n if (forceRender || this.filterManager.effectElements[4].p._mdf) {\n this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);\n }\n\n if (forceRender || this.filterManager.effectElements[6].p._mdf) {\n this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);\n }\n\n if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {\n if (forceRender || this.filterManager.effectElements[3].p._mdf) {\n var color = this.filterManager.effectElements[3].p.v;\n this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');\n }\n }\n };\n\n function SVGTritoneFilter(filter, filterManager, elem, id) {\n this.filterManager = filterManager;\n var feColorMatrix = createNS('feColorMatrix');\n feColorMatrix.setAttribute('type', 'matrix');\n feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');\n feColorMatrix.setAttribute('values', '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0');\n filter.appendChild(feColorMatrix);\n var feComponentTransfer = createNS('feComponentTransfer');\n feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\n feComponentTransfer.setAttribute('result', id);\n this.matrixFilter = feComponentTransfer;\n var feFuncR = createNS('feFuncR');\n feFuncR.setAttribute('type', 'table');\n feComponentTransfer.appendChild(feFuncR);\n this.feFuncR = feFuncR;\n var feFuncG = createNS('feFuncG');\n feFuncG.setAttribute('type', 'table');\n feComponentTransfer.appendChild(feFuncG);\n this.feFuncG = feFuncG;\n var feFuncB = createNS('feFuncB');\n feFuncB.setAttribute('type', 'table');\n feComponentTransfer.appendChild(feFuncB);\n this.feFuncB = feFuncB;\n filter.appendChild(feComponentTransfer);\n }\n\n SVGTritoneFilter.prototype.renderFrame = function (forceRender) {\n if (forceRender || this.filterManager._mdf) {\n var color1 = this.filterManager.effectElements[0].p.v;\n var color2 = this.filterManager.effectElements[1].p.v;\n var color3 = this.filterManager.effectElements[2].p.v;\n var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];\n var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];\n var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];\n this.feFuncR.setAttribute('tableValues', tableR);\n this.feFuncG.setAttribute('tableValues', tableG);\n this.feFuncB.setAttribute('tableValues', tableB);\n }\n };\n\n function SVGProLevelsFilter(filter, filterManager, elem, id) {\n this.filterManager = filterManager;\n var effectElements = this.filterManager.effectElements;\n var feComponentTransfer = createNS('feComponentTransfer'); // Red\n\n if (effectElements[10].p.k || effectElements[10].p.v !== 0 || effectElements[11].p.k || effectElements[11].p.v !== 1 || effectElements[12].p.k || effectElements[12].p.v !== 1 || effectElements[13].p.k || effectElements[13].p.v !== 0 || effectElements[14].p.k || effectElements[14].p.v !== 1) {\n this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);\n } // Green\n\n\n if (effectElements[17].p.k || effectElements[17].p.v !== 0 || effectElements[18].p.k || effectElements[18].p.v !== 1 || effectElements[19].p.k || effectElements[19].p.v !== 1 || effectElements[20].p.k || effectElements[20].p.v !== 0 || effectElements[21].p.k || effectElements[21].p.v !== 1) {\n this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);\n } // Blue\n\n\n if (effectElements[24].p.k || effectElements[24].p.v !== 0 || effectElements[25].p.k || effectElements[25].p.v !== 1 || effectElements[26].p.k || effectElements[26].p.v !== 1 || effectElements[27].p.k || effectElements[27].p.v !== 0 || effectElements[28].p.k || effectElements[28].p.v !== 1) {\n this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);\n } // Alpha\n\n\n if (effectElements[31].p.k || effectElements[31].p.v !== 0 || effectElements[32].p.k || effectElements[32].p.v !== 1 || effectElements[33].p.k || effectElements[33].p.v !== 1 || effectElements[34].p.k || effectElements[34].p.v !== 0 || effectElements[35].p.k || effectElements[35].p.v !== 1) {\n this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);\n } // RGB\n\n\n if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {\n feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\n filter.appendChild(feComponentTransfer);\n }\n\n if (effectElements[3].p.k || effectElements[3].p.v !== 0 || effectElements[4].p.k || effectElements[4].p.v !== 1 || effectElements[5].p.k || effectElements[5].p.v !== 1 || effectElements[6].p.k || effectElements[6].p.v !== 0 || effectElements[7].p.k || effectElements[7].p.v !== 1) {\n feComponentTransfer = createNS('feComponentTransfer');\n feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\n feComponentTransfer.setAttribute('result', id);\n filter.appendChild(feComponentTransfer);\n this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);\n this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);\n this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);\n }\n }\n\n SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {\n var feFunc = createNS(type);\n feFunc.setAttribute('type', 'table');\n feComponentTransfer.appendChild(feFunc);\n return feFunc;\n };\n\n SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {\n var cnt = 0;\n var segments = 256;\n var perc;\n var min = Math.min(inputBlack, inputWhite);\n var max = Math.max(inputBlack, inputWhite);\n var table = Array.call(null, {\n length: segments\n });\n var colorValue;\n var pos = 0;\n var outputDelta = outputWhite - outputBlack;\n var inputDelta = inputWhite - inputBlack;\n\n while (cnt <= 256) {\n perc = cnt / 256;\n\n if (perc <= min) {\n colorValue = inputDelta < 0 ? outputWhite : outputBlack;\n } else if (perc >= max) {\n colorValue = inputDelta < 0 ? outputBlack : outputWhite;\n } else {\n colorValue = outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma);\n }\n\n table[pos] = colorValue;\n pos += 1;\n cnt += 256 / (segments - 1);\n }\n\n return table.join(' ');\n };\n\n SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {\n if (forceRender || this.filterManager._mdf) {\n var val;\n var effectElements = this.filterManager.effectElements;\n\n if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {\n val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);\n this.feFuncRComposed.setAttribute('tableValues', val);\n this.feFuncGComposed.setAttribute('tableValues', val);\n this.feFuncBComposed.setAttribute('tableValues', val);\n }\n\n if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {\n val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);\n this.feFuncR.setAttribute('tableValues', val);\n }\n\n if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {\n val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);\n this.feFuncG.setAttribute('tableValues', val);\n }\n\n if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {\n val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);\n this.feFuncB.setAttribute('tableValues', val);\n }\n\n if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {\n val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);\n this.feFuncA.setAttribute('tableValues', val);\n }\n }\n };\n\n function SVGDropShadowEffect(filter, filterManager, elem, id, source) {\n var globalFilterSize = filterManager.container.globalData.renderConfig.filterSize;\n var filterSize = filterManager.data.fs || globalFilterSize;\n filter.setAttribute('x', filterSize.x || globalFilterSize.x);\n filter.setAttribute('y', filterSize.y || globalFilterSize.y);\n filter.setAttribute('width', filterSize.width || globalFilterSize.width);\n filter.setAttribute('height', filterSize.height || globalFilterSize.height);\n this.filterManager = filterManager;\n var feGaussianBlur = createNS('feGaussianBlur');\n feGaussianBlur.setAttribute('in', 'SourceAlpha');\n feGaussianBlur.setAttribute('result', id + '_drop_shadow_1');\n feGaussianBlur.setAttribute('stdDeviation', '0');\n this.feGaussianBlur = feGaussianBlur;\n filter.appendChild(feGaussianBlur);\n var feOffset = createNS('feOffset');\n feOffset.setAttribute('dx', '25');\n feOffset.setAttribute('dy', '0');\n feOffset.setAttribute('in', id + '_drop_shadow_1');\n feOffset.setAttribute('result', id + '_drop_shadow_2');\n this.feOffset = feOffset;\n filter.appendChild(feOffset);\n var feFlood = createNS('feFlood');\n feFlood.setAttribute('flood-color', '#00ff00');\n feFlood.setAttribute('flood-opacity', '1');\n feFlood.setAttribute('result', id + '_drop_shadow_3');\n this.feFlood = feFlood;\n filter.appendChild(feFlood);\n var feComposite = createNS('feComposite');\n feComposite.setAttribute('in', id + '_drop_shadow_3');\n feComposite.setAttribute('in2', id + '_drop_shadow_2');\n feComposite.setAttribute('operator', 'in');\n feComposite.setAttribute('result', id + '_drop_shadow_4');\n filter.appendChild(feComposite);\n var feMerge = this.createMergeNode(id, [id + '_drop_shadow_4', source]);\n filter.appendChild(feMerge); //\n }\n\n extendPrototype([SVGComposableEffect], SVGDropShadowEffect);\n\n SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {\n if (forceRender || this.filterManager._mdf) {\n if (forceRender || this.filterManager.effectElements[4].p._mdf) {\n this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);\n }\n\n if (forceRender || this.filterManager.effectElements[0].p._mdf) {\n var col = this.filterManager.effectElements[0].p.v;\n this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));\n }\n\n if (forceRender || this.filterManager.effectElements[1].p._mdf) {\n this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);\n }\n\n if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {\n var distance = this.filterManager.effectElements[3].p.v;\n var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;\n var x = distance * Math.cos(angle);\n var y = distance * Math.sin(angle);\n this.feOffset.setAttribute('dx', x);\n this.feOffset.setAttribute('dy', y);\n }\n }\n };\n\n var _svgMatteSymbols = [];\n\n function SVGMatte3Effect(filterElem, filterManager, elem) {\n this.initialized = false;\n this.filterManager = filterManager;\n this.filterElem = filterElem;\n this.elem = elem;\n elem.matteElement = createNS('g');\n elem.matteElement.appendChild(elem.layerElement);\n elem.matteElement.appendChild(elem.transformedElement);\n elem.baseElement = elem.matteElement;\n }\n\n SVGMatte3Effect.prototype.findSymbol = function (mask) {\n var i = 0;\n var len = _svgMatteSymbols.length;\n\n while (i < len) {\n if (_svgMatteSymbols[i] === mask) {\n return _svgMatteSymbols[i];\n }\n\n i += 1;\n }\n\n return null;\n };\n\n SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {\n var parentNode = mask.layerElement.parentNode;\n\n if (!parentNode) {\n return;\n }\n\n var children = parentNode.children;\n var i = 0;\n var len = children.length;\n\n while (i < len) {\n if (children[i] === mask.layerElement) {\n break;\n }\n\n i += 1;\n }\n\n var nextChild;\n\n if (i <= len - 2) {\n nextChild = children[i + 1];\n }\n\n var useElem = createNS('use');\n useElem.setAttribute('href', '#' + symbolId);\n\n if (nextChild) {\n parentNode.insertBefore(useElem, nextChild);\n } else {\n parentNode.appendChild(useElem);\n }\n };\n\n SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {\n if (!this.findSymbol(mask)) {\n var symbolId = createElementID();\n var masker = createNS('mask');\n masker.setAttribute('id', mask.layerId);\n masker.setAttribute('mask-type', 'alpha');\n\n _svgMatteSymbols.push(mask);\n\n var defs = elem.globalData.defs;\n defs.appendChild(masker);\n var symbol = createNS('symbol');\n symbol.setAttribute('id', symbolId);\n this.replaceInParent(mask, symbolId);\n symbol.appendChild(mask.layerElement);\n defs.appendChild(symbol);\n var useElem = createNS('use');\n useElem.setAttribute('href', '#' + symbolId);\n masker.appendChild(useElem);\n mask.data.hd = false;\n mask.show();\n }\n\n elem.setMatte(mask.layerId);\n };\n\n SVGMatte3Effect.prototype.initialize = function () {\n var ind = this.filterManager.effectElements[0].p.v;\n var elements = this.elem.comp.elements;\n var i = 0;\n var len = elements.length;\n\n while (i < len) {\n if (elements[i] && elements[i].data.ind === ind) {\n this.setElementAsMask(this.elem, elements[i]);\n }\n\n i += 1;\n }\n\n this.initialized = true;\n };\n\n SVGMatte3Effect.prototype.renderFrame = function () {\n if (!this.initialized) {\n this.initialize();\n }\n };\n\n function SVGGaussianBlurEffect(filter, filterManager, elem, id) {\n // Outset the filter region by 100% on all sides to accommodate blur expansion.\n filter.setAttribute('x', '-100%');\n filter.setAttribute('y', '-100%');\n filter.setAttribute('width', '300%');\n filter.setAttribute('height', '300%');\n this.filterManager = filterManager;\n var feGaussianBlur = createNS('feGaussianBlur');\n feGaussianBlur.setAttribute('result', id);\n filter.appendChild(feGaussianBlur);\n this.feGaussianBlur = feGaussianBlur;\n }\n\n SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {\n if (forceRender || this.filterManager._mdf) {\n // Empirical value, matching AE's blur appearance.\n var kBlurrinessToSigma = 0.3;\n var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma; // Dimensions mapping:\n //\n // 1 -> horizontal & vertical\n // 2 -> horizontal only\n // 3 -> vertical only\n //\n\n var dimensions = this.filterManager.effectElements[1].p.v;\n var sigmaX = dimensions == 3 ? 0 : sigma; // eslint-disable-line eqeqeq\n\n var sigmaY = dimensions == 2 ? 0 : sigma; // eslint-disable-line eqeqeq\n\n this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY); // Repeat edges mapping:\n //\n // 0 -> off -> duplicate\n // 1 -> on -> wrap\n\n var edgeMode = this.filterManager.effectElements[2].p.v == 1 ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq\n\n this.feGaussianBlur.setAttribute('edgeMode', edgeMode);\n }\n };\n\n function TransformEffect() {}\n\n TransformEffect.prototype.init = function (effectsManager) {\n this.effectsManager = effectsManager;\n this.type = effectTypes.TRANSFORM_EFFECT;\n this.matrix = new Matrix();\n this.opacity = -1;\n this._mdf = false;\n this._opMdf = false;\n };\n\n TransformEffect.prototype.renderFrame = function (forceFrame) {\n this._opMdf = false;\n this._mdf = false;\n\n if (forceFrame || this.effectsManager._mdf) {\n var effectElements = this.effectsManager.effectElements;\n var anchor = effectElements[0].p.v;\n var position = effectElements[1].p.v;\n var isUniformScale = effectElements[2].p.v === 1;\n var scaleHeight = effectElements[3].p.v;\n var scaleWidth = isUniformScale ? scaleHeight : effectElements[4].p.v;\n var skew = effectElements[5].p.v;\n var skewAxis = effectElements[6].p.v;\n var rotation = effectElements[7].p.v;\n this.matrix.reset();\n this.matrix.translate(-anchor[0], -anchor[1], anchor[2]);\n this.matrix.scale(scaleWidth * 0.01, scaleHeight * 0.01, 1);\n this.matrix.rotate(-rotation * degToRads);\n this.matrix.skewFromAxis(-skew * degToRads, (skewAxis + 90) * degToRads);\n this.matrix.translate(position[0], position[1], 0);\n this._mdf = true;\n\n if (this.opacity !== effectElements[8].p.v) {\n this.opacity = effectElements[8].p.v;\n this._opMdf = true;\n }\n }\n };\n\n function SVGTransformEffect(_, filterManager) {\n this.init(filterManager);\n }\n\n extendPrototype([TransformEffect], SVGTransformEffect);\n\n function CVTransformEffect(effectsManager) {\n this.init(effectsManager);\n }\n\n extendPrototype([TransformEffect], CVTransformEffect);\n\n registerRenderer('canvas', CanvasRenderer);\n registerRenderer('html', HybridRenderer);\n registerRenderer('svg', SVGRenderer); // Registering shape modifiers\n\n ShapeModifiers.registerModifier('tm', TrimModifier);\n ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);\n ShapeModifiers.registerModifier('rp', RepeaterModifier);\n ShapeModifiers.registerModifier('rd', RoundCornersModifier);\n ShapeModifiers.registerModifier('zz', ZigZagModifier);\n ShapeModifiers.registerModifier('op', OffsetPathModifier); // Registering expression plugin\n\n setExpressionsPlugin(Expressions);\n setExpressionInterfaces(getInterface);\n initialize$1();\n initialize(); // Registering svg effects\n\n registerEffect$1(20, SVGTintFilter, true);\n registerEffect$1(21, SVGFillFilter, true);\n registerEffect$1(22, SVGStrokeEffect, false);\n registerEffect$1(23, SVGTritoneFilter, true);\n registerEffect$1(24, SVGProLevelsFilter, true);\n registerEffect$1(25, SVGDropShadowEffect, true);\n registerEffect$1(28, SVGMatte3Effect, false);\n registerEffect$1(29, SVGGaussianBlurEffect, true);\n registerEffect$1(35, SVGTransformEffect, false);\n registerEffect(35, CVTransformEffect);\n\n return lottie;\n\n}));\n","function replaceClassName(origClass, classToRemove) {\n return origClass.replace(new RegExp(\"(^|\\\\s)\" + classToRemove + \"(?:\\\\s|$)\", 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n/**\n * Removes a CSS class from a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\n\nexport default function removeClass(element, className) {\n if (element.classList) {\n element.classList.remove(className);\n } else if (typeof element.className === 'string') {\n element.className = replaceClassName(element.className, className);\n } else {\n element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport addOneClass from 'dom-helpers/addClass';\nimport removeOneClass from 'dom-helpers/removeClass';\nimport React from 'react';\nimport Transition from './Transition';\nimport { classNamesShape } from './utils/PropTypes';\nimport { forceReflow } from './utils/reflow';\n\nvar _addClass = function addClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return addOneClass(node, c);\n });\n};\n\nvar removeClass = function removeClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return removeOneClass(node, c);\n });\n};\n/**\n * A transition component inspired by the excellent\n * [ng-animate](https://docs.angularjs.org/api/ngAnimate) library, you should\n * use it if you're using CSS transitions or animations. It's built upon the\n * [`Transition`](https://reactcommunity.org/react-transition-group/transition)\n * component, so it inherits all of its props.\n *\n * `CSSTransition` applies a pair of class names during the `appear`, `enter`,\n * and `exit` states of the transition. The first class is applied and then a\n * second `*-active` class in order to activate the CSS transition. After the\n * transition, matching `*-done` class names are applied to persist the\n * transition state.\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n *
\n * \n *
\n * {\"I'll receive my-node-* classes\"}\n *
\n *
\n * \n *
\n * );\n * }\n * ```\n *\n * When the `in` prop is set to `true`, the child component will first receive\n * the class `example-enter`, then the `example-enter-active` will be added in\n * the next tick. `CSSTransition` [forces a\n * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)\n * between before adding the `example-enter-active`. This is an important trick\n * because it allows us to transition between `example-enter` and\n * `example-enter-active` even though they were added immediately one after\n * another. Most notably, this is what makes it possible for us to animate\n * _appearance_.\n *\n * ```css\n * .my-node-enter {\n * opacity: 0;\n * }\n * .my-node-enter-active {\n * opacity: 1;\n * transition: opacity 200ms;\n * }\n * .my-node-exit {\n * opacity: 1;\n * }\n * .my-node-exit-active {\n * opacity: 0;\n * transition: opacity 200ms;\n * }\n * ```\n *\n * `*-active` classes represent which styles you want to animate **to**, so it's\n * important to add `transition` declaration only to them, otherwise transitions\n * might not behave as intended! This might not be obvious when the transitions\n * are symmetrical, i.e. when `*-enter-active` is the same as `*-exit`, like in\n * the example above (minus `transition`), but it becomes apparent in more\n * complex transitions.\n *\n * **Note**: If you're using the\n * [`appear`](http://reactcommunity.org/react-transition-group/transition#Transition-prop-appear)\n * prop, make sure to define styles for `.appear-*` classes as well.\n */\n\n\nvar CSSTransition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(CSSTransition, _React$Component);\n\n function CSSTransition() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.appliedClasses = {\n appear: {},\n enter: {},\n exit: {}\n };\n\n _this.onEnter = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument[0],\n appearing = _this$resolveArgument[1];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, appearing ? 'appear' : 'enter', 'base');\n\n if (_this.props.onEnter) {\n _this.props.onEnter(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntering = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument2[0],\n appearing = _this$resolveArgument2[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.addClass(node, type, 'active');\n\n if (_this.props.onEntering) {\n _this.props.onEntering(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntered = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument3[0],\n appearing = _this$resolveArgument3[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.removeClasses(node, type);\n\n _this.addClass(node, type, 'done');\n\n if (_this.props.onEntered) {\n _this.props.onEntered(maybeNode, maybeAppearing);\n }\n };\n\n _this.onExit = function (maybeNode) {\n var _this$resolveArgument4 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument4[0];\n\n _this.removeClasses(node, 'appear');\n\n _this.removeClasses(node, 'enter');\n\n _this.addClass(node, 'exit', 'base');\n\n if (_this.props.onExit) {\n _this.props.onExit(maybeNode);\n }\n };\n\n _this.onExiting = function (maybeNode) {\n var _this$resolveArgument5 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument5[0];\n\n _this.addClass(node, 'exit', 'active');\n\n if (_this.props.onExiting) {\n _this.props.onExiting(maybeNode);\n }\n };\n\n _this.onExited = function (maybeNode) {\n var _this$resolveArgument6 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument6[0];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, 'exit', 'done');\n\n if (_this.props.onExited) {\n _this.props.onExited(maybeNode);\n }\n };\n\n _this.resolveArguments = function (maybeNode, maybeAppearing) {\n return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] // here `maybeNode` is actually `appearing`\n : [maybeNode, maybeAppearing];\n };\n\n _this.getClassNames = function (type) {\n var classNames = _this.props.classNames;\n var isStringClassNames = typeof classNames === 'string';\n var prefix = isStringClassNames && classNames ? classNames + \"-\" : '';\n var baseClassName = isStringClassNames ? \"\" + prefix + type : classNames[type];\n var activeClassName = isStringClassNames ? baseClassName + \"-active\" : classNames[type + \"Active\"];\n var doneClassName = isStringClassNames ? baseClassName + \"-done\" : classNames[type + \"Done\"];\n return {\n baseClassName: baseClassName,\n activeClassName: activeClassName,\n doneClassName: doneClassName\n };\n };\n\n return _this;\n }\n\n var _proto = CSSTransition.prototype;\n\n _proto.addClass = function addClass(node, type, phase) {\n var className = this.getClassNames(type)[phase + \"ClassName\"];\n\n var _this$getClassNames = this.getClassNames('enter'),\n doneClassName = _this$getClassNames.doneClassName;\n\n if (type === 'appear' && phase === 'done' && doneClassName) {\n className += \" \" + doneClassName;\n } // This is to force a repaint,\n // which is necessary in order to transition styles when adding a class name.\n\n\n if (phase === 'active') {\n if (node) forceReflow(node);\n }\n\n if (className) {\n this.appliedClasses[type][phase] = className;\n\n _addClass(node, className);\n }\n };\n\n _proto.removeClasses = function removeClasses(node, type) {\n var _this$appliedClasses$ = this.appliedClasses[type],\n baseClassName = _this$appliedClasses$.base,\n activeClassName = _this$appliedClasses$.active,\n doneClassName = _this$appliedClasses$.done;\n this.appliedClasses[type] = {};\n\n if (baseClassName) {\n removeClass(node, baseClassName);\n }\n\n if (activeClassName) {\n removeClass(node, activeClassName);\n }\n\n if (doneClassName) {\n removeClass(node, doneClassName);\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n _ = _this$props.classNames,\n props = _objectWithoutPropertiesLoose(_this$props, [\"classNames\"]);\n\n return /*#__PURE__*/React.createElement(Transition, _extends({}, props, {\n onEnter: this.onEnter,\n onEntered: this.onEntered,\n onEntering: this.onEntering,\n onExit: this.onExit,\n onExiting: this.onExiting,\n onExited: this.onExited\n }));\n };\n\n return CSSTransition;\n}(React.Component);\n\nCSSTransition.defaultProps = {\n classNames: ''\n};\nCSSTransition.propTypes = process.env.NODE_ENV !== \"production\" ? _extends({}, Transition.propTypes, {\n /**\n * The animation classNames applied to the component as it appears, enters,\n * exits or has finished the transition. A single name can be provided, which\n * will be suffixed for each stage, e.g. `classNames=\"fade\"` applies:\n *\n * - `fade-appear`, `fade-appear-active`, `fade-appear-done`\n * - `fade-enter`, `fade-enter-active`, `fade-enter-done`\n * - `fade-exit`, `fade-exit-active`, `fade-exit-done`\n *\n * A few details to note about how these classes are applied:\n *\n * 1. They are _joined_ with the ones that are already defined on the child\n * component, so if you want to add some base styles, you can use\n * `className` without worrying that it will be overridden.\n *\n * 2. If the transition component mounts with `in={false}`, no classes are\n * applied yet. You might be expecting `*-exit-done`, but if you think\n * about it, a component cannot finish exiting if it hasn't entered yet.\n *\n * 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This\n * allows you to define different behavior for when appearing is done and\n * when regular entering is done, using selectors like\n * `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply\n * an epic entrance animation when element first appears in the DOM using\n * [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can\n * simply use `fade-enter-done` for defining both cases.\n *\n * Each individual classNames can also be specified independently like:\n *\n * ```js\n * classNames={{\n * appear: 'my-appear',\n * appearActive: 'my-active-appear',\n * appearDone: 'my-done-appear',\n * enter: 'my-enter',\n * enterActive: 'my-active-enter',\n * enterDone: 'my-done-enter',\n * exit: 'my-exit',\n * exitActive: 'my-active-exit',\n * exitDone: 'my-done-exit',\n * }}\n * ```\n *\n * If you want to set these classes using CSS Modules:\n *\n * ```js\n * import styles from './styles.css';\n * ```\n *\n * you might want to use camelCase in your CSS file, that way could simply\n * spread them instead of listing them one by one:\n *\n * ```js\n * classNames={{ ...styles }}\n * ```\n *\n * @type {string | {\n * appear?: string,\n * appearActive?: string,\n * appearDone?: string,\n * enter?: string,\n * enterActive?: string,\n * enterDone?: string,\n * exit?: string,\n * exitActive?: string,\n * exitDone?: string,\n * }}\n */\n classNames: classNamesShape,\n\n /**\n * A `` callback fired immediately after the 'enter' or 'appear' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEnter: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'enter-active' or\n * 'appear-active' class is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'enter' or\n * 'appear' classes are **removed** and the `done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntered: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'exit' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExit: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'exit-active' is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExiting: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'exit' classes\n * are **removed** and the `exit-done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExited: PropTypes.func\n}) : {};\nexport default CSSTransition;","import hasClass from './hasClass';\n/**\n * Adds a CSS class to a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\nexport default function addClass(element, className) {\n if (element.classList) element.classList.add(className);else if (!hasClass(element, className)) if (typeof element.className === 'string') element.className = element.className + \" \" + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + \" \" + className);\n}","/**\n * Checks if a given element has a CSS class.\n * \n * @param element the element\n * @param className the CSS class name\n */\nexport default function hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);\n return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}"],"names":["Collapse","React","props","ref","children","classes","className","collapsedHeight","_props$collapsedSize","collapsedSize","collapsedSizeProp","_props$component","component","Component","_props$disableStrictM","disableStrictModeCompat","inProp","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","_props$timeout","timeout","duration","standard","_props$TransitionComp","TransitionComponent","Transition","other","_objectWithoutProperties","theme","useTheme","timer","wrapperRef","autoTransitionDuration","concat","clearTimeout","current","enableStrictModeCompat","unstable_strictMode","nodeRef","handleRef","useForkRef","undefined","normalizedTransitionCallback","callback","nodeOrAppearing","maybeAppearing","_ref","_ref2","_slicedToArray","node","isAppearing","handleEnter","height","handleEntering","wrapperHeight","clientHeight","transitionDuration","getTransitionProps","mode","duration2","transitions","getAutoHeightDuration","handleEntered","handleExit","handleExited","handleExiting","_extends","addEndListener","nodeOrNext","maybeNext","next","setTimeout","state","childProps","clsx","root","container","entered","hidden","minHeight","wrapper","wrapperInner","muiSupportAuto","withStyles","overflow","transition","create","visibility","display","width","name","_interopRequireDefault","require","_interopRequireWildcard","exports","_default","default","createElement","d","useLottie","animationData","loop","autoplay","initialSegment","onComplete","onLoopComplete","onEnterFrame","onSegmentStart","onConfigReady","onDataReady","onDataFailed","onLoadedImages","onDOMLoaded","onDestroy","lottieRef","renderer","assetsPath","rendererSettings","rest","_excluded$1","_useState2","useState","animationLoaded","setAnimationLoaded","animationInstanceRef","useRef","animationContainer","play","_a","stop","pause","setSpeed","speed","goToAndPlay","value","isFrame","goToAndStop","setDirection","direction","playSegments","segments","forceFlag","setSubframe","useSubFrames","getDuration","inFrames","destroy","loadAnimation","forcedConfigs","arguments","length","config","_objectSpread2","lottie__default","useEffect","onUnmount","Array","isArray","currentRawFrame","setSegment","resetSegments","listeners","handler","filter","listener","deregisterList","map","addEventListener","removeEventListener","forEach","deregister","View","React__default","animationContainerRef","animationItem","getContainerVisibility","_container$getBoundin","getBoundingClientRect","top","window","innerHeight","getContainerCursorPosition","cursorX","cursorY","_container$getBoundin2","x","left","y","useInitInteractivity","actions","scrollModeHandler","assignedSegment","scrollHandler","currentPercent","action","find","type","frames","frameToGo","Math","ceil","firstFrame","isPaused","document","cursorModeHandler","handleCursor","_x","_y","pos","_ref3","position","Number","isNaN","xPercent","yPercent","mouseMoveHandler","ev","clientX","clientY","mouseOutHandler","useLottieInteractivity","_ref4","lottieObj","Lottie","_b","_c","interactivity","lottieProps","_excluded","_useLottie","factory","navigator","svgNS","locationHref","_useWebWorker","initialDefaultFrame","setWebWorker","flag","getWebWorker","setLocationHref","getLocationHref","createTag","extendPrototype","sources","destination","i","sourcePrototype","len","attr","prototype","Object","hasOwnProperty","call","getDescriptor","object","prop","getOwnPropertyDescriptor","createProxyFunction","ProxyFunction","audioControllerFactory","AudioController","audioFactory","this","audios","_volume","_isMuted","addAudio","audio","push","resume","setRate","rateValue","createAudio","assetPath","Howl","src","isPlaying","seek","playing","rate","setVolume","setAudioFactory","_updateVolume","mute","unmute","getVolume","volume","createTypedArray","createRegularArray","arr","Uint8ClampedArray","Float32Array","Int16Array","createSizedArray","apply","_typeof$6","obj","Symbol","iterator","constructor","subframeEnabled","expressionsPlugin","expressionsInterfaces","idPrefix$1","isSafari","test","userAgent","_shouldRoundValues","bmPow","pow","bmSqrt","sqrt","bmFloor","floor","bmMax","max","bmMin","min","BMMath","ProjectInterface$1","propertyNames","random","abs","val","absArr","defaultCurveSegments","degToRads","PI","roundCorner","roundValues","bmRnd","round","styleDiv","element","transformOrigin","webkitTransformOrigin","backfaceVisibility","webkitBackfaceVisibility","transformStyle","webkitTransformStyle","mozTransformStyle","BMEnterFrameEvent","currentTime","totalTime","frameMultiplier","BMCompleteEvent","BMCompleteLoopEvent","totalLoops","currentLoop","BMSegmentStartEvent","totalFrames","BMDestroyEvent","target","BMRenderFrameErrorEvent","nativeError","BMConfigErrorEvent","BMAnimationConfigErrorEvent","createElementID","_count","HSVtoRGB","h","s","v","r","g","b","f","p","q","t","RGBtoHSV","addSaturationToRGB","color","offset","hsv","addBrightnessToRGB","addHueToRGB","rgbToHex","hex","colorMap","toString","setSubframeEnabled","getSubframeEnabled","setExpressionsPlugin","getExpressionsPlugin","setExpressionInterfaces","getExpressionInterfaces","setDefaultCurveSegments","getDefaultCurveSegments","setIdPrefix","getIdPrefix","createNS","createElementNS","_typeof$5","dataManager","workerFn","workerInstance","_counterId","processes","workerProxy","onmessage","postMessage","path","data","_workerSelf","setupWorker","fn","Worker","Blob","blob","url","URL","createObjectURL","createWorker","e","completeLayers","layers","comps","layerData","j","jLen","k","kLen","completed","hasMask","maskProps","masksProperties","pt","convertPathsToAbsoluteValues","ty","findCompLayers","refId","completeShapes","shapes","completeText","id","comp","findComp","__used","JSON","parse","stringify","ks","it","o","checkVersion","minimum","animVersionString","animVersion","split","checkText","minimumVersion","updateTextLayer","textLayer","documentData","iterateLayers","assets","checkChars","chars","charData","ip","op","st","sr","a","sk","sa","checkPathProperties","pathData","checkColors","iterateShapes","c","checkShapes","completeClosingShapes","closed","cl","moduleOb","__complete","completeChars","dataFunctionManager","assetLoader","formatResponse","xhr","contentTypeHeader","getResponseHeader","responseType","indexOf","response","responseText","load","fullPath","errorCallback","XMLHttpRequest","err","onreadystatechange","readyState","status","open","join","error","send","completeData","payload","animation","event","process","onError","createProcess","processId","location","origin","pathname","loadData","completeAnimation","anim","ImagePreloader","proxyImage","canvas","ctx","getContext","fillStyle","fillRect","imageLoaded","loadedAssets","totalImages","loadedFootagesCount","totalFootages","imagesLoadedCb","footageLoaded","getAssetsPath","assetData","originalPath","imagePath","u","testImageLoaded","img","intervalId","setInterval","getBBox","_imageLoaded","clearInterval","bind","createFootageData","ob","footageData","_footageLoaded","ImagePreloaderFactory","images","loadAssets","cb","_createImageData","setAssetsPath","setPath","loadedImages","loadedFootages","getAsset","createImgData","crossOrigin","createImageData","setAttributeNS","_elementHelper","append","appendChild","setCacheType","elementHelper","BaseEvent","triggerEvent","eventName","args","_cbs","callbacks","splice","markerParser","parsePayloadLines","line","lines","keys","keysCount","trim","Error","_markers","markers","_marker","markerData","time","tm","dr","cm","_","__","ProjectInterface","registerComposition","compositions","_thisProjectFunction","nm","prepareFrame","xt","currentFrame","compInterface","renderers","registerRenderer","key","getRenderer","getRegisteredRenderer","_typeof$4","AnimationItem","isLoaded","frameRate","frameMult","playSpeed","playDirection","playCount","animationID","timeCompleted","segmentPos","isSubframeEnabled","_idle","_completedLoop","projectInterface","imagePreloader","audioController","configAnimation","onSetupError","onSegmentComplete","drawnFrameEvent","setParams","params","animType","RendererClass","globalData","defs","setProjectInterface","parseInt","autoloadSegments","setupAnimation","lastIndexOf","substr","fileName","trigger","setData","wrapperAttributes","attributes","getNamedItem","prerender","includeLayers","newLayers","fonts","fontManager","addChars","addFonts","initExpressions","loadNextSegment","segment","shift","segmentPath","loadSegments","imagesLoaded","checkLoaded","preloadImages","animData","fr","searchExtraCompositions","updaFrameModifier","waitForFontsLoaded","triggerConfigError","rendererType","initItems","gotoFrame","resize","_width","_height","updateContainerSize","renderFrame","resetFrame","triggerRenderFrameError","togglePause","setCurrentRawFrameValue","getMarkerData","markerName","marker","numValue","frameModifier","advanceTime","nextValue","_isComplete","checkSegments","adjustSegment","init","end","pendingFrame","setLoop","isLooping","getPath","getAssetData","hide","show","updateDocumentData","index","getElementByPath","animationManager","registeredAnimations","initTime","playingAnimationsNum","_stopped","_isFrozen","removeElement","animItem","subtractPlayingCount","registerAnimation","elem","addPlayingCount","activate","nowTime","elapsedTime","requestAnimationFrame","first","searchAnimations","standalone","animElements","slice","getElementsByClassName","lenAnims","setAttribute","body","getElementsByTagName","innerText","div","freeze","unfreeze","getRegisteredAnimations","animations","BezierFactory","str","replace","beziers","bezEasing","BezierEasing","kSplineTableSize","kSampleStepSize","float32ArraySupported","A","aA1","aA2","B","C","calcBezier","aT","getSlope","points","_p","_mSampleValues","_precomputed","get","mX1","mY1","mX2","mY2","_precompute","_getTForX","_calcSampleValues","aX","mSampleValues","intervalStart","currentSample","lastSample","guessForT","initialSlope","aGuessT","currentSlope","newtonRaphsonIterate","aA","aB","currentX","currentT","binarySubdivide","pooling","poolFactory","initialLength","_create","_release","_length","_maxLength","pool","newElement","release","bezierLengthPool","addedLength","percents","lengths","segmentsLengthPool","totalLength","bezFunction","math","pointOnLine2D","x1","y1","x2","y2","x3","y3","det1","getBezierLength","pt1","pt2","pt3","pt4","ptCoord","perc","ptDistance","curveSegments","point","lastPoint","lengthData","BezierData","segmentLength","PointData","partial","partialLength","buildBezierData","storedData","bezierName","bezierData","getDistancePerc","initPos","lengthPos","lPerc","dir","bezierSegmentPoints","getSegmentsLength","shapeData","segmentsLength","pathV","pathO","pathI","getNewSegment","startPerc","endPerc","t0","t1","u0","u1","u0u0u0","t0u0u0_3","t0t0u0_3","t0t0t0","u0u0u1","t0u0u1_3","t0t0u1_3","t0t0t1","u0u1u1","t0u1u1_3","t0t1u1_3","t0t1t1","u1u1u1","t1u1u1_3","t1t1u1_3","t1t1t1","getPointInSegment","percent","pointOnLine3D","z1","z2","z3","diffDist","dist1","dist2","dist3","bez","initFrame","mathAbs","interpolateValue","frameNum","caching","newValue","offsetTime","propType","pv","keyData","nextKeyData","keyframeMetadata","fnc","iterationIndex","lastIndex","keyframes","keyframesMetadata","endValue","nextKeyTime","keyTime","to","ti","ind","__fnct","getBezierEasing","n","segmentPerc","distanceInLine","lastFrame","_lastKeyframeIndex","_lastAddedLength","_lastPoint","outX","outY","inX","inY","keyValue","sh","quaternionToEuler","slerp","createQuaternion","omega","cosom","sinom","scale0","scale1","out","ax","ay","az","aw","bx","by","bz","bw","acos","sin","quat","qx","qy","qz","qw","heading","atan2","attitude","asin","bank","values","c1","cos","c2","c3","s1","s2","s3","getValueAtCurrentTime","renderedFrame","endTime","_caching","renderResult","setVValue","multipliedValue","mult","_mdf","processEffectsSequence","frameId","effectsSequence","lock","_isFirstFrame","finalValue","kf","addEffect","effectFunction","addDynamicProperty","ValueProperty","vel","getValue","MultiDimensionalProperty","KeyframedValueProperty","KeyframedMultidimensionalProperty","arrLen","PropertyFactory","getProp","sid","slotManager","DynamicPropertyContainer","dynamicProperties","_isAnimated","iterateDynamicProperties","initDynamicPropertyContainer","pointPool","ShapePath","setPathData","setLength","doubleArrayLength","setXYAt","setTripleAt","vX","vY","oX","oY","iX","iY","reverse","newPath","vertices","outPoints","inPoints","cnt","shapePool","shapePath","clone","shape","cloned","ShapeCollection","addShape","releaseShapes","shapeCollectionPool","newShapeCollection","shapeCollection","ShapePropertyFactory","interpolateShape","previousValue","keyPropS","keyPropE","isHold","vertexValue","interpolateShapeCurrentTime","resetShape","paths","localShapeCollection","shape1","shape2","shapesEqual","ShapeProperty","reset","KeyframedShapeProperty","EllShapeProperty","cPoint","EllShapePropertyFactory","convertEllToPath","p0","p1","s0","_cw","_v","StarShapeProperty","StarShapePropertyFactory","sy","ir","is","convertToPath","convertStarToPath","convertPolygonToPath","or","os","rad","roundness","perimSegment","numPts","angle","longFlag","longRad","shortRad","longRound","shortRound","longPerimSegment","shortPerimSegment","currentAng","ox","oy","RectShapeProperty","RectShapePropertyFactory","convertRectToPath","v0","v1","Matrix","_cos","_sin","_tan","tan","_rnd","rotate","mCos","mSin","_t","rotateX","rotateY","rotateZ","shear","sx","skew","skewFromAxis","scale","sz","setTransform","l","m","translate","tx","tz","transform","a2","b2","d2","e2","f2","g2","h2","i2","j2","k2","l2","m2","n2","o2","p2","_identityCalculated","a1","b1","d1","e1","f1","g1","h1","i1","j1","k1","l1","m1","n1","o1","multiply","matrix","matrixProps","isIdentity","_identity","equals","matr","cloneFromProps","applyToPoint","z","applyToX","applyToY","applyToZ","getInverseMatrix","determinant","inverseMatrix","inversePoint","applyToPointArray","inversePoints","pts","retPts","applyToTriplePoints","p4","p5","p12","p13","applyToPointStringified","toCSS","cssValue","roundMatrixProperty","to2dCSS","_typeof$3","lottie","setLocation","href","setSubframeRendering","setPrefix","prefix","setQuality","inBrowser","installPlugin","plugin","getFactory","checkReady","readyStateCheckInterval","getQueryVariable","variable","vars","queryString","pair","decodeURIComponent","useWebWorker","setIDPrefix","__getFactory","version","scripts","myScript","define","ShapeModifiers","modifiers","registerModifier","getModifier","ShapeModifier","TrimModifier","PuckerAndBloatModifier","initModifierProperties","addShapeToModifier","setAsAnimated","processKeys","sValue","eValue","pathsData","calculateShapeEdges","shapeLength","totalModifierLength","segmentOb","shapeSegments","shapeS","shapeE","releasePathsData","processShapes","shapePaths","_s","totalShapeLength","edges","newShapesData","addShapes","lastShape","pop","addPaths","newPaths","addSegment","newShape","addSegmentFromArray","shapeSegment","currentLengthData","segmentCount","amount","processPath","centerPoint","pathLength","clonedPath","TransformPropertyFactory","defaultVector","TransformProperty","pre","appliedTransformations","px","py","pz","rx","ry","rz","_isDirty","applyToMatrix","mat","forceRender","precalculateMatrix","autoOriented","v2","getValueAtTime","autoOrient","_addDynamicProperty","getTransformProperty","RepeaterModifier","RoundCornersModifier","floatEqual","floatZero","lerp","lerpPoint","quadRoots","singleRoot","delta","polynomialCoefficients","p3","singlePoint","PolynomialBezier","linearize","pointEqual","coeffx","coeffy","extrema","intersectData","t2","box","boundingBox","cx","cy","splitData","boxIntersect","intersectsImpl","depth","tolerance","intersections","maxRecursion","d1s","d2s","crossProduct","lineIntersection","start1","end1","start2","end2","v3","v4","polarOffset","pointDistance","hypot","ZigZagModifier","setPoint","outputBezier","amplitude","outAmplitude","inAmplitude","angO","angI","getPerpendicularVector","vector","rot","getProjectingAngle","cur","prevIndex","nextIndex","pVector","zigZagCorner","frequency","pointType","prevPoint","nextPoint","prevDist","nextDist","zigZagSegment","dist","normalAngle","linearOffset","offsetSegment","p1a","p1b","p2b","p2a","joinLines","seg1","seg2","lineJoin","miterLimit","angleOut","tangentAngle","angleIn","center","radius","intersection","getIntersection","intersect","pruneSegmentIntersection","outa","outb","pruneIntersections","offsetSegmentSplit","right","mid","flex","inflectionPoints","OffsetPathModifier","getFontProperties","fontData","styles","fStyle","fWeight","toLowerCase","weight","tr","so","eo","pMatrix","rMatrix","sMatrix","tMatrix","applyTransforms","inv","scaleX","scaleY","elemsData","_currentCopies","_elements","_groups","unshift","resetElements","elements","_processed","cloneElements","newElements","changeGroupRender","renderFlag","_render","items","itemsTransform","cont","hasReloaded","copies","group","ix","reloadShapes","elems","transformData","offsetModulo","roundOffset","pProps","rProps","sProps","iteration","mProps","rd","currentV","currentI","currentO","closerV","distance","newPosPerc","derivative","denom","tcusp","square","p10","p11","p20","p21","bounds","bottom","shapeSegmentInverted","pointsType","count","ml","lj","inputBezier","multiSegments","lastSeg","multiSegment","FontManager","emptyChar","w","size","combinedCharacters","BLACK_FLAG_CODE_POINT","REGIONAL_CHARACTER_A_CODE_POINT","REGIONAL_CHARACTER_Z_CODE_POINT","surrogateModifiers","setUpNode","font","family","parentNode","fontFamily","fontSize","fontVariant","fontStyle","fontWeight","letterSpacing","offsetWidth","familyArray","enabledFamilies","trimFontOptions","parent","createHelper","def","helper","engine","fontProps","tHelper","fFamily","textContent","fClass","tCanvasHelper","OffscreenCanvas","measureText","text","getComputedTextLength","getCodePoint","string","codePoint","charCodeAt","second","isRegionalCode","Font","typekitLoaded","_warned","Date","now","setIsLoadedBinded","setIsLoaded","checkLoadedFontsBinded","checkLoadedFonts","isModifier","firstCharCode","secondCharCode","sum","isZeroWidthJoiner","charCode","isFlagEmoji","isCombinedCharacter","_char3","isRegionalFlag","isVariationSelector","fontPrototype","found","ch","list","cache","fontArr","_pendingFonts","loadedSelector","shouldLoadFont","loaded","monoCase","sansCase","fPath","fOrigin","querySelectorAll","rel","sc","getCharData","_char","console","warn","getFontByName","fName","_char2","fontName","doubleSize","singleSize","loadedCount","removeChild","SlotManager","slotFactory","RenderableElement","slots","assign","initRenderable","isInRange","isTransparent","renderableComponents","addRenderableComponent","removeRenderableComponent","prepareRenderableFrame","num","checkLayerLimits","checkTransparency","finalTransform","mProp","renderConfig","hideOnTransparent","renderRenderable","sourceRectAtTime","getLayerSize","textData","getBlendMode","blendModeEnums","SliderEffect","AngleEffect","ColorEffect","PointEffect","LayerIndexEffect","MaskIndexEffect","CheckboxEffect","NoValueEffect","EffectsManager","effects","ef","effectElements","effectItem","GroupEffect","BaseElement","FrameElement","FootageElement","imageLoader","initBaseData","AudioElement","_isPlaying","_canPlay","_currentTime","_volumeMultiplier","_previousVolume","_placeholder","lv","au","BaseRenderer","eff","checkMasks","LayerExpressionInterface","EffectsExpressionInterface","ShapeExpressionInterface","TextExpressionInterface","CompExpressionInterface","layerInterface","maskManager","registerMaskInterface","effectsInterface","createEffectsInterface","registerEffectsInterface","shapeInterface","shapesData","itemsData","content","textInterface","setBlendMode","blendModeValue","bm","baseElement","layerElement","layerId","effectsManager","getType","prepareProperties","isVisible","_isParent","getBaseElement","FootageInterface","getFootageData","timeRemapped","totalVolume","volumeValue","checkLayers","buildItem","checkPendingElements","createItem","layer","createImage","createComp","createSolid","createNull","createShape","createText","createCamera","createFootage","buildAllItems","pInterface","progressiveLoad","buildElementParenting","parentName","hierarchy","setAsParent","setHierarchy","addPendingElement","pendingElements","getElementById","pathValue","setupGlobalData","fontsContainer","compSize","effectTypes","TRANSFORM_EFFECT","TransformElement","MaskElement","maskElement","viewData","solidPath","rect","expansor","feMorph","properties","currentMasks","maskType","maskRef","getShapeProp","lastPath","filterID","expan","lastOperator","filterId","lastRadius","mask","createLayerSolidPath","invRect","drawPath","maskedElement","initTransform","_matMdf","_localMatMdf","_opMdf","localMat","localOpacity","ao","renderTransform","finalMat","renderLocalTransform","localTransforms","lmat","localOp","opacity","searchEffectTransforms","renderableEffectsManager","transformEffects","getEffects","globalToLocal","transforms","ptNew","mHelper","getMaskProperty","isFirstFrame","getMaskelement","pathNodes","pathString","pathShapeValue","filtersFactory","filId","skipCoordinates","fil","feColorMatrix","featureSupport","svgLumaHidden","offscreenCanvas","registeredEffects$1","idPrefix","SVGEffects","filterManager","source","createFilter","filters","Effect","effect","countsAsEffect","registerEffect$1","SVGBaseElement","HierarchyElement","RenderableDOMElement","IImageElement","initElement","sourceRect","ProcessedElement","IShapeElement","initRendererElement","createContainerElements","matteElement","transformedElement","_sizeChanged","layerElementParent","td","matteMasks","gg","tt","ln","hd","cp","clipId","cpGroup","renderElement","destroyBaseElement","createRenderableComponents","getMatte","matteType","useElement","masker","createAlphaToLuminanceFilter","maskGroup","maskGrouper","feCTr","feFunc","alphaRect","setMatte","initHierarchy","checkParenting","createContent","renderInnerContent","innerElem","pr","imagePreserveAspectRatio","addShapeToModifiers","shapeModifiers","isShapeInAnimatedModifiers","isAnimatedWithShape","renderModifiers","searchProcessedElement","processedElements","addProcessedElement","lineCapEnum","lineJoinEnum","SVGShapeData","transformers","level","caches","lStr","lvl","SVGStyleData","pElem","msElem","DashProperty","dataProps","dashStr","dashArray","dashoffset","SVGStrokeStyleData","styleOb","SVGFillStyleData","SVGNoStyleData","GradientProperty","cLength","_cmdf","_omdf","_collapsable","checkCollapsable","_hasOpacity","SVGGradientFillStyleData","initGradientData","SVGGradientStrokeStyleData","ShapeGroupData","prevViewData","gr","SVGTransformData","comparePoints","stops","setGradientData","setGradientOpacity","pathElement","gradientId","gfill","gf","cst","opacityId","maskId","opFill","lc","of","ms","ost","buildShapeString","_o","_i","shapeString","SVGElementsRenderer","_identityMatrix","_matrixHelper","renderContentTransform","styleData","itemData","renderNoop","renderPath","pathStringTransformed","redraw","iterations","lLen","renderFill","styleElem","renderGradientStroke","renderGradient","renderStroke","hasOpacity","attr1","attr2","cValues","oValues","ang","createRenderFunction","SVGShapeElement","stylesList","animatedContents","LetterProps","sw","fc","TextProperty","_frameId","keysIndex","canResize","minimumFontSize","currentData","ascent","boxWidth","defaultBoxWidth","justifyOffset","lh","lineWidths","ls","ps","fillColorAnim","strokeColorAnim","strokeWidthAnim","yOffset","finalSize","finalText","finalLineHeight","copyData","searchProperty","completeTextData","initSecondaryElement","identityMatrix","buildExpressionInterface","searchShapes","filterUniqueShapes","tempShapes","areAnimated","setShapesAsAnimated","createStyleElement","elementData","addToAnimatedContents","createGroupElement","createTransformElement","transformProperty","createShapeElement","ownTransformers","setElementStyles","render","currentTransform","modifier","processedPos","ownStyles","ownModifiers","renderShape","animatedContent","update","updated","setCurrentData","searchKeyframes","getKeyframeValue","_finalValue","currentValue","currentIndex","textKeys","buildFinalText","charactersArray","shouldCombine","shouldCombineNext","currentChars","charAt","newLineFlag","letters","anchorGrouping","currentSize","currentPos","currentLine","lineWidth","maxLineWidth","trackingOffset","currentHeight","boxHeight","lastSpaceIndex","currentChar","uncollapsedSpaces","an","add","anIndexes","animatorJustifyOffset","extra","animatorData","letterData","based","animators","indexes","fh","fs","fb","rn","totalChars","newInd","currentInd","newData","dData","recalculate","canResizeFont","_canResize","setMinimumFontSize","_fontValue","TextSelectorProp","TextSelectorPropFactory","_currentTextLength","finalS","finalE","xe","ne","sm","getMult","textProperty","easer","tot","smoothness","threshold","newCharsFlag","divisor","getTextSelectorProp","TextAnimatorDataProperty","animatorProps","defaultData","textAnimatorAnimatables","TextAnimatorProperty","renderType","_hasMaskedPath","_textData","_renderType","_elem","_animatorsData","_pathData","_moreOptions","alignment","renderedLetters","lettersChangedFlag","ITextElement","searchProperties","getMeasures","xPos","yPos","pathInfo","currentLength","currentPoint","pointInd","segmentInd","tanAngle","matrixHelper","renderedLettersCount","tLength","pi","letterValue","yOff","firstLine","offf","xPathPos","yPathPos","elemOpacity","letterSw","letterSc","letterFc","letterO","initPathPos","initSegmentInd","initPointInd","letterM","letterP","defaultPropsArray","animatorFirstCharOffset","justifyOffsetMult","isNewLine","animatorOffset","atan","textAnimator","createPathShape","shapeStr","_fontSize","applyTextPropertiesToMatrix","lineNumber","buildColor","colorData","emptyProp","validateText","buildNewText","emptyShapeData","SVGTextLottieElement","textSpans","ISolidElement","NullElement","SVGRendererBase","ICompElement","SVGCompElement","supports3d","SVGRenderer","svgElement","ariaLabel","title","titleElement","titleId","description","descElement","descId","preserveAspectRatio","contentVisibility","viewBoxOnly","viewBoxSize","focusable","filterSize","runExpressions","destroyed","ShapeTransformManager","sequences","sequenceList","transform_key_count","singleShape","textContainer","buildTextContents","textArray","textContents","currentTextContent","String","fromCharCode","buildShapeData","shapeItem","tSpan","usesGlyphs","cachedSpansLength","span","childSpan","glyph","glyphElement","_debug","tElement","justify","textBox","bbox","renderedLetter","textSpan","findIndexByInd","appendElementInPos","elementIndex","tp","matteMask","nextElement","insertBefore","setElements","getElements","destroyElements","addTransformSequence","sequence","processSequence","processSequences","getNewKey","lumaLoader","lumaBuffer","lumaBufferCtx","svg","loadLuma","_svg","createLumaSvgFilter","createCanvas","loadLumaCanvas","getLumaCanvas","registeredEffects","CVEffects","registerEffect","CVMaskElement","hasMasks","CVBaseElement","canvasContext","beginPath","moveTo","lineTo","bezierCurveTo","save","clip","operationsMap","CVShapeData","transformsManager","styledShapes","styledShape","trNodes","CVShapeElement","CVTextElement","stroke","fill","currentRender","sWidth","fValue","CVImageElement","CVSolidElement","CanvasRendererBase","CanvasContext","strokeStyle","lineCap","CVContextData","stack","cArrPos","cTr","nativeContext","transformMat","currentOpacity","currentFillStyle","appliedFillStyle","currentStrokeStyle","appliedStrokeStyle","currentLineWidth","appliedLineWidth","currentLineCap","appliedLineCap","currentLineJoin","appliedLineJoin","appliedMiterLimit","currentMiterLimit","CVCompElement","CanvasRenderer","clearCanvas","context","dpr","devicePixelRatio","currentGlobalAlpha","contextData","ctxTransform","ctxOpacity","ctxFillStyle","ctxStrokeStyle","ctxLineWidth","ctxLineCap","ctxLineJoin","ctxMiterLimit","ctxFill","ctxFillRect","ctxStroke","HBaseElement","HSolidElement","HShapeElement","shapesContainer","currentBBox","HTextElement","textPaths","isMasked","HCameraElement","pe","_prevMat","HImageElement","HybridRendererBase","threeDElements","camera","HCompElement","HybridRenderer","createElements","buffers","bufferCanvas","bufferCanvas2","_isProxy","transformCanvas","blendMode","globalCompositeOperation","hideElement","showElement","clearRect","prepareLayer","bufferCtx","drawImage","getTransform","exitLayer","buffer","forceRealStack","restore","transformHelper","dashResetter","preTransforms","co","wi","da","addTransformToStyleList","removeTransformFromStyleList","closeStyles","shouldRender","ownTransforms","_shouldRender","renderShapeTransform","parentTransform","groupTransform","drawLayer","nodes","currentStyle","coOp","grd","setLineDash","lineDashOffset","closePath","isMain","renderGradientFill","renderStyledShape","shapeNodes","groupTransformMat","createLinearGradient","createRadialGradient","addColorStop","hasFill","hasStroke","commands","pathArr","commandsCounter","lastFill","lastStroke","lastStrokeW","widthCrop","heightCrop","imgW","imgH","imgRel","canvasRel","par","globalAlpha","rule","actionFlag","containerStyle","mozTransformOrigin","setContext","isDashed","elementWidth","elementHeight","elementRel","animationRel","offsetHeight","fillType","duplicate","newLength","forceRestore","currentContext","prevStack","saveOnNativeFlag","currentStack","newStack","setOpacity","trProps","checkBlendMode","tg","transformedElementStyle","matrixValue","webkitTransform","addEffects","backgroundColor","_renderShapeFrame","shapeCont","getTransformedPoint","calculateShapeBoundingBox","item","vPoint","oPoint","nextIPoint","nextVPoint","checkBounds","getBoundsOfCurve","shapeBoundingBox","xMax","yMax","tempBoundingBox","b2ac","calculateF","calculateBoundingBox","expandStrokeBoundingBox","widthProperty","kfw","currentBoxContains","changed","shapeStyle","shapeTransform","compW","compH","innerElemStyle","textColor","strokeWidth","lineHeight","tParent","tCont","tContStyle","tContTranslation","tStyle","tSpanTranslation","svgStyle","translation","textPath","margin","svgTransform","setup","perspectiveStyle","perspectiveElem","perspective","webkitPerspective","mTransf","diffVector","mag","lookDir","lookLengthOnXZ","mRotationX","mRotationY","hasMatrixChanged","matValue","Image","imageElem","newDOMElement","ddd","addTo3dContainer","nextDOMElement","nextLayer","getThreeDContainerByPos","startPos","endPos","createThreeDContainer","threeDContainerData","build3dContainers","lastThreeDContainerData","currentContainer","resizerElem","cWidth","cHeight","floatingContainer","_createBaseContainerElements","_thisLayerFunction","defineProperty","pixelAspect","frameDuration","displayStartTime","numLayers","_typeof$2","seedRandom","nodecrypto","global","rngname","startdenom","significance","ARC4","keylen","me","S","copy","flatten","result","typ","mixkey","seed","smear","stringseed","tostring","options","shortseed","entropy","randomBytes","Uint8Array","crypto","msCrypto","getRandomValues","browser","plugins","screen","autoseed","arc4","prng","int32","quick","pass","is_math_call","initialize$2","propTypes","SHAPE","_typeof$1","ExpressionManager","fetch","_lottieGlobal","$bm_isInstanceOfArray","isNumerable","tOfV","$bm_neg","tOfA","lenA","retArr","easeInBez","easeOutBez","easeInOutBez","tOfB","lenB","sub","mul","mod","$bm_sum","$bm_sub","$bm_mul","$bm_div","$bm_mod","clamp","mm","radiansToDegrees","radians_to_degrees","degreesToRadians","degrees_to_radians","helperLengthArray","arr1","arr2","normalize","vec","rgbToHsl","hue2rgb","hslToRgb","linear","tMin","tMax","value1","value2","_tMin","rnd","createPath","inTangents","outTangents","inVertexPoint","outVertexPoint","arrPlaceholder","initiateExpression","property","noOp","_value","needsVelocity","_needsRandom","elemType","$bm_transform","thisProperty","valueAtTime","inPoint","outPoint","loopIn","loop_in","loopOut","loop_out","smooth","toWorld","fromWorld","fromComp","toComp","fromCompToSurface","rotation","anchorPoint","thisLayer","thisComp","velocityAtTime","scoped_bm_rt","expression_function","eval","numKeys","active","wiggle","freq","amp","iWiggle","lenWiggle","addedAmps","periods","loopInDuration","loopOutDuration","getVelocityAtTime","velocity","textIndex","textTotal","selectorValue","lookAt","elem1","elem2","fVec","pitch","easeOut","val1","val2","applyEase","easeIn","ease","iKey","lenKey","nearestKey","obKey","framesToTime","fps","timeToFrames","seedrandom","randSeed","substring","posterizeTime","framesPerSecond","hasParent","executeExpression","frameExpressionId","__preventDeadCodeRemoval","Expressions","stackCount","registers","pushExpression","popExpression","releaseInstances","registerExpressionProperty","expression","MaskManagerInterface","MaskInterface","_mask","_data","_masksInterfaces","ExpressionPropertyInterface","defaultUnidimensionalValue","defaultMultidimensionalValue","completeProperty","expressionValue","valueProp","speedAtTime","getSpeedAtTime","propertyGroup","defaultGetter","UnidimensionalPropertyInterface","arrValue","MultidimensionalPropertyInterface","TransformExpressionInterface","_thisFunction","xRotation","yRotation","xPosition","yPosition","zPosition","_px","_py","_pz","_transformFactory","getMatrix","toWorldMat","toWorldVec","applyPoint","fromWorldVec","invertPoint","sampleImage","transformInterface","anchorPointDescriptor","defineProperties","anchor_point","startTime","_name","propertyGroupFactory","interfaceFunction","parentPropertyGroup","PropertyInterface","propertyName","createGroupInterface","groupInterface","mn","_propertyGroup","createValueInterface","numProperties","np","enabled","en","expressionProperty","setGroupProperty","effectsData","ShapePathInterface","view","propertyIndex","iterateElements","groupInterfaceFactory","fillInterfaceFactory","strokeInterfaceFactory","trimInterfaceFactory","ellipseInterfaceFactory","starInterfaceFactory","rectInterfaceFactory","roundedInterfaceFactory","repeaterInterfaceFactory","gradientFillInterfaceFactory","interfaces","transformInterfaceFactory","cix","contentsInterfaceFactory","startPoint","endPoint","_dashPropertyGroup","dashOb","addPropertyToDashOb","dash","start","skewAxis","outerRadius","outerRoundness","innerRoundness","innerRadius","_interfaceFunction","_sourceText","sourceText","stringValue","fillColor","_typeof","dataInterfaceFactory","outlineInterface","currentPropertyName","currentProperty","propertyNameIndex","outlineInterfaceFactory","dataInterface","footage","getInterface","expressionHelpers","searchExpressions","_cachingAtTime","getStaticValueAtTime","addPropertyDecorator","durationFlag","cycleDuration","firstKeyFrame","ret","lastKeyFrame","initV","endV","repeats","lastValue","nextLastValue","firstValue","nextFirstValue","samples","sampleValue","sampleFrequency","getTransformValueAtTime","_transformCachingAtTime","anchor","rotationZ","rotationY","rotationX","orientation","positionX","positionY","positionZ","getTransformStaticValueAtTime","propertyGetProp","ShapePropertyConstructorFunction","getConstructorFunction","KeyframedShapePropertyConstructorFunction","getKeyframedConstructorFunction","ShapeExpressions","isClosed","pointOnPath","_segmentsLength","accumulatedLength","initIndex","endIndex","vectorOnPath","vectorType","xLength","yLength","magnitude","tangentOnPath","normalOnPath","shapeValue","lastTime","propertyGetShapeProp","trims","initialize$1","addDecorator","getExpressionValue","calculateExpression","isKeyframed","hasExpressions","initialize","SVGComposableEffect","createMergeNode","resultId","ins","feMergeNode","feMerge","linearFilterValue","SVGTintFilter","linearFilter","matrixFilter","SVGFillFilter","SVGStrokeEffect","initialized","SVGTritoneFilter","feComponentTransfer","feFuncR","feFuncG","feFuncB","SVGProLevelsFilter","createFeFunc","feFuncA","feFuncRComposed","feFuncGComposed","feFuncBComposed","SVGDropShadowEffect","globalFilterSize","feGaussianBlur","feOffset","feFlood","feComposite","colorBlack","colorWhite","groupPath","elemChildren","childNodes","removeAttribute","pathMasker","dasharrayValue","getTotalLength","lineLength","units","color1","color2","color3","tableR","tableG","tableB","getTableValue","inputBlack","inputWhite","gamma","outputBlack","outputWhite","colorValue","table","outputDelta","inputDelta","col","_svgMatteSymbols","SVGMatte3Effect","filterElem","SVGGaussianBlurEffect","TransformEffect","SVGTransformEffect","CVTransformEffect","findSymbol","replaceInParent","symbolId","nextChild","useElem","setElementAsMask","symbol","sigma","dimensions","sigmaX","sigmaY","edgeMode","forceFrame","isUniformScale","scaleHeight","scaleWidth","module","replaceClassName","origClass","classToRemove","RegExp","removeClass","classList","remove","baseVal","CSSTransition","_React$Component","_this","_len","_key","appliedClasses","appear","enter","exit","maybeNode","_this$resolveArgument","resolveArguments","appearing","removeClasses","addClass","_this$resolveArgument2","_this$resolveArgument3","getClassNames","classNames","isStringClassNames","baseClassName","activeClassName","doneClassName","_inheritsLoose","_proto","phase","forceReflow","contains","hasClass","_addClass","_this$appliedClasses$","base","done","_this$props","_objectWithoutPropertiesLoose","defaultProps"],"sourceRoot":""}