{"version":3,"file":"scene.min.js","sources":["../src/easing.ts","../src/consts.ts","../src/PropertyObject.ts","../src/utils/property.ts","../src/utils.ts","../src/Animator.ts","../src/Frame.ts","../src/utils/dot.ts","../src/SceneItem.ts","../src/Scene.ts","../src/presets.ts","../src/index.umd.ts"],"sourcesContent":["import { between } from \"@daybrush/utils\";\nimport { EasingFunction } from \"./types\";\n\nfunction cubic(y1: number, y2: number, t: number) {\n  const t2 = 1 - t;\n\n  // Bezier Curve Formula\n  return t * t * t + 3 * t * t * t2 * y2 + 3 * t * t2 * t2 * y1;\n}\nfunction solveFromX(x1: number, x2: number, x: number) {\n  // x  0 ~ 1\n  // t 0 ~ 1\n  let t = x;\n  let solveX = x;\n  let dx = 1;\n\n  while (Math.abs(dx) > 1 / 1000) {\n    // 예상 t초에 의한 _x값\n    solveX = cubic(x1, x2, t);\n    dx = solveX - x;\n    // 차이가 미세하면 그 값을 t로 지정\n    if (Math.abs(dx) < 1 / 1000) {\n      return t;\n    }\n    t -= dx / 2;\n  }\n  return t;\n}\n/**\n * @namespace easing\n */\n/**\n* Cubic Bezier curve.\n* @memberof easing\n* @func bezier\n* @param {number} [x1] - point1's x\n* @param {number} [y1] - point1's y\n* @param {number} [x2] - point2's x\n* @param {number} [y2] - point2's y\n* @return {function} the curve function\n* @example\nimport {bezier} from \"scenejs\";\nScene.bezier(0, 0, 1, 1) // LINEAR\nScene.bezier(0.25, 0.1, 0.25, 1) // EASE\n*/\nexport function bezier(x1: number, y1: number, x2: number, y2: number) {\n  /*\n\t\tx = f(t)\n\t\tcalculate inverse function by x\n\t\tt = f-1(x)\n\t*/\n  const func: EasingFunction = (x: number) => {\n    const t = solveFromX(x1, x2, between(x, 0, 1));\n\n    return cubic(y1, y2, t);\n  };\n\n  func.easingName = `cubic-bezier(${x1},${y1},${x2},${y2})`;\n  return func;\n}\n/**\n* Specifies a stepping function\n* @see {@link https://www.w3schools.com/cssref/css3_pr_animation-timing-function.asp|CSS3 Timing Function}\n* @memberof easing\n* @func steps\n* @param {number} count - point1's x\n* @param {\"start\" | \"end\"} postion - point1's y\n* @return {function} the curve function\n* @example\nimport {steps} from \"scenejs\";\nScene.steps(1, \"start\") // Scene.STEP_START\nScene.steps(1, \"end\") // Scene.STEP_END\n*/\nexport function steps(count: number, position: \"start\" | \"end\") {\n  const func: EasingFunction = (time: number) => {\n    const level = 1 / count;\n\n    if (time >= 1) {\n      return 1;\n    }\n    return (position === \"start\" ? level : 0) + Math.floor(time / level) * level;\n  };\n\n  func.easingName = `steps(${count}, ${position})`;\n\n  return func;\n}\n\n/**\n* Equivalent to steps(1, start)\n* @memberof easing\n* @name STEP_START\n* @static\n* @type {function}\n* @example\nimport {STEP_START} from \"scenejs\";\nScene.STEP_START // steps(1, start)\n*/\nexport const STEP_START = /*#__PURE__#*/steps(1, \"start\");\n/**\n* Equivalent to steps(1, end)\n* @memberof easing\n* @name STEP_END\n* @static\n* @type {function}\n* @example\nimport {STEP_END} from \"scenejs\";\nScene.STEP_END // steps(1, end)\n*/\nexport const STEP_END = /*#__PURE__#*/steps(1, \"end\");\n/**\n* Linear Speed (0, 0, 1, 1)\n* @memberof easing\n* @name LINEAR\n* @static\n* @type {function}\n* @example\nimport {LINEAR} from \"scenejs\";\nScene.LINEAR\n*/\nexport const LINEAR = /*#__PURE__#*/bezier(0, 0, 1, 1);\n/**\n* Ease Speed (0.25, 0.1, 0.25, 1)\n* @memberof easing\n* @name EASE\n* @static\n* @type {function}\n* @example\nimport {EASE} from \"scenejs\";\nScene.EASE\n*/\nexport const EASE = /*#__PURE__#*/bezier(0.25, 0.1, 0.25, 1);\n/**\n* Ease In Speed (0.42, 0, 1, 1)\n* @memberof easing\n* @name EASE_IN\n* @static\n* @type {function}\n* @example\nimport {EASE_IN} from \"scenejs\";\nScene.EASE_IN\n*/\nexport const EASE_IN = /*#__PURE__#*/bezier(0.42, 0, 1, 1);\n/**\n* Ease Out Speed (0, 0, 0.58, 1)\n* @memberof easing\n* @name EASE_OUT\n* @static\n* @type {function}\n* @example\nimport {EASE_OUT} from \"scenejs\";\nScene.EASE_OUT\n*/\nexport const EASE_OUT = /*#__PURE__#*/bezier(0, 0, 0.58, 1);\n/**\n* Ease In Out Speed (0.42, 0, 0.58, 1)\n* @memberof easing\n* @name EASE_IN_OUT\n* @static\n* @type {function}\n* @example\nimport {EASE_IN_OUT} from \"scenejs\";\nScene.EASE_IN_OUT\n*/\nexport const EASE_IN_OUT = /*#__PURE__#*/bezier(0.42, 0, 0.58, 1);\n","import { IObject } from \"@daybrush/utils\";\nimport { RoleObject, OptionType, EventType, EasingFunction } from \"./types\";\nimport { EASE, EASE_IN, EASE_IN_OUT, LINEAR, EASE_OUT, STEP_START, STEP_END } from \"./easing\";\n\nexport const PREFIX = \"__SCENEJS_\";\nexport const DATA_SCENE_ID = \"data-scene-id\";\nexport const TIMING_FUNCTION = \"animation-timing-function\";\nexport const ROLES: RoleObject = { transform: {}, filter: {}, attribute: {}, html: true };\nexport const ALIAS: IObject<string[]> = { easing: [TIMING_FUNCTION] };\nexport const FIXED = { [TIMING_FUNCTION]: true, contents: true, html: true };\nexport const MAXIMUM = 1000000;\nexport const THRESHOLD = 0.000001;\n\nexport const DURATION = \"duration\";\nexport const FILL_MODE = \"fillMode\";\nexport const DIRECTION = \"direction\";\nexport const ITERATION_COUNT = \"iterationCount\";\nexport const DELAY = \"delay\";\nexport const EASING = \"easing\";\nexport const PLAY_SPEED = \"playSpeed\";\nexport const EASING_NAME = \"easingName\";\nexport const ITERATION_TIME = \"iterationTime\";\nexport const PAUSED = \"paused\";\nexport const ENDED = \"ended\";\nexport const TIMEUPDATE = \"timeupdate\";\nexport const ANIMATE = \"animate\";\nexport const PLAY = \"play\";\nexport const RUNNING = \"running\";\nexport const ITERATION = \"iteration\";\nexport const START_ANIMATION = \"startAnimation\";\nexport const PAUSE_ANIMATION = \"pauseAnimation\";\nexport const ALTERNATE = \"alternate\";\nexport const REVERSE = \"reverse\";\nexport const ALTERNATE_REVERSE = \"alternate-reverse\";\nexport const NORMAL = \"normal\";\nexport const INFINITE = \"infinite\";\nexport const PLAY_STATE = \"playState\";\nexport const PLAY_CSS = \"playCSS\";\nexport const PREV_TIME = \"prevTime\";\nexport const TICK_TIME = \"tickTime\";\nexport const CURRENT_TIME = \"currentTime\";\nexport const SELECTOR = \"selector\";\nexport const TRANSFORM_NAME = \"transform\";\nexport const EASINGS = {\n    \"linear\": LINEAR,\n    \"ease\": EASE,\n    \"ease-in\": EASE_IN,\n    \"ease-out\": EASE_OUT,\n    \"ease-in-out\": EASE_IN_OUT,\n    \"step-start\": STEP_START,\n    \"step-end\": STEP_END,\n};\nexport const NAME_SEPARATOR = \"_///_\";\n/**\n* option name list\n* @name Scene.OPTIONS\n* @memberof Scene\n* @static\n* @type {$ts:OptionType}\n* @example\n* Scene.OPTIONS // [\"duration\", \"fillMode\", \"direction\", \"iterationCount\", \"delay\", \"easing\", \"playSpeed\"]\n*/\nexport const OPTIONS: OptionType = [DURATION, FILL_MODE, DIRECTION, ITERATION_COUNT, DELAY, EASING, PLAY_SPEED];\n\n/**\n* Event name list\n* @name Scene.EVENTS\n* @memberof Scene\n* @static\n* @type {$ts:EventType}\n* @example\n* Scene.EVENTS // [\"paused\", \"ended\", \"timeupdate\", \"animate\", \"play\", \"iteration\"];\n*/\nexport const EVENTS: EventType = [PAUSED, ENDED, TIMEUPDATE, ANIMATE, PLAY, ITERATION];\n","import { isString } from \"@daybrush/utils\";\nimport { PropertyObjectState } from \"./types\";\n\n/**\n* Make string, array to PropertyObject for the dot product\n*/\nclass PropertyObject implements PropertyObjectState {\n    public value: any[];\n    public prefix: string = \"\";\n    public suffix: string = \"\";\n    public model: string = \"\";\n    public type: string = \"\";\n    public separator: string = \",\";\n\n    /**\n      * @param - This value is in the array format.\n      * @param - options\n      * @example\n  var obj = new PropertyObject([100,100,100,0.5], {\n      \"separator\" : \",\",\n      \"prefix\" : \"rgba(\",\n      \"suffix\" : \")\"\n  });\n       */\n    constructor(value: string | any[], options?: Partial<PropertyObjectState>) {\n        options && this.setOptions(options);\n        this.value = isString(value) ? value.split(this.separator) : value;\n    }\n    public setOptions(newOptions: Partial<PropertyObjectState>) {\n        for (const name in newOptions) {\n            this[name as keyof PropertyObjectState] = newOptions[name as keyof PropertyObjectState];\n        }\n        return this;\n    }\n    /**\n      * the number of values.\n      * @example\n  const obj1 = new PropertyObject(\"1,2,3\", \",\");\n\n  console.log(obj1.length);\n  // 3\n       */\n    public size() {\n        return this.value.length;\n    }\n    /**\n      * retrieve one of values at the index\n      * @param {Number} index - index\n      * @return {Object} one of values at the index\n      * @example\n  const obj1 = new PropertyObject(\"1,2,3\", \",\");\n\n  console.log(obj1.get(0));\n  // 1\n       */\n    public get(index: number) {\n        return this.value[index];\n    }\n    /**\n      * Set the value at that index\n      * @param {Number} index - index\n      * @param {Object} value - text, a number, object to set\n      * @return {PropertyObject} An instance itself\n      * @example\n  const obj1 = new PropertyObject(\"1,2,3\", \",\");\n  obj1.set(0, 2);\n  console.log(obj1.toValue());\n  // 2,2,3\n       */\n    public set(index: number, value: any) {\n        this.value[index] = value;\n        return this;\n    }\n    /**\n      * create a copy of an instance itself.\n      * @return {PropertyObject} clone\n      * @example\n  const obj1 = new PropertyObject(\"1,2,3\", \",\");\n  const obj2 = obj1.clone();\n       */\n    public clone(): PropertyObject {\n        const {\n            separator,\n            prefix,\n            suffix,\n            model,\n            type,\n        } = this;\n        const arr = this.value.map(v => ((v instanceof PropertyObject) ? v.clone() : v));\n        return new PropertyObject(arr, {\n            separator,\n            prefix,\n            suffix,\n            model,\n            type,\n        });\n    }\n    /**\n      * Make Property Object to String\n      * @return {String} Make Property Object to String\n      * @example\n  //rgba(100, 100, 100, 0.5)\n  const obj4 = new PropertyObject([100,100,100,0.5], {\n      \"separator\" : \",\",\n      \"prefix\" : \"rgba(\",\n      \"suffix\" : \")\",\n  });\n  console.log(obj4.toValue());\n  // \"rgba(100,100,100,0.5)\"\n      */\n    public toValue(): string {\n        return this.prefix + this.join() + this.suffix;\n    }\n    /**\n      * Make Property Object's array to String\n      * @return {String} Join the elements of an array into a string\n      * @example\n      //rgba(100, 100, 100, 0.5)\n      var obj4 = new PropertyObject([100,100,100,0.5], {\n          \"separator\" : \",\",\n          \"prefix\" : \"rgba(\",\n          \"suffix\" : \")\"\n      });\n      obj4.join();  // =>   \"100,100,100,0.5\"\n       */\n    public join() {\n        return this.value.map(v => ((v instanceof PropertyObject) ? v.toValue() : v)).join(this.separator);\n    }\n    /**\n      * executes a provided function once per array element.\n      * @param {Function} callback - Function to execute for each element, taking three arguments\n      * @param {All} [callback.currentValue] The current element being processed in the array.\n      * @param {Number} [callback.index] The index of the current element being processed in the array.\n      * @param {Array} [callback.array] the array.\n      * @return {PropertyObject} An instance itself\n      * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach|MDN Array.forEach()} reference to MDN document.\n      * @example\n  //rgba(100, 100, 100, 0.5)\n  var obj4 = new PropertyObject([100,100,100,0.5], {\n      \"separator\" : \",\",\n      \"prefix\" : \"rgba(\",\n      \"suffix\" : \")\"\n  });\n\n  obj4.forEach(t => {\n      console.log(t);\n  });  // =>   \"100,100,100,0.5\"\n      */\n    public forEach(func: (value?: any, index?: number, array?: any[]) => void) {\n        this.value.forEach(func);\n        return this;\n    }\n}\nexport default PropertyObject;\n","/**\n* @namespace\n* @name Property\n*/\n\nimport PropertyObject from \"../PropertyObject\";\nimport {\n    COLOR_MODELS, isString,\n    splitComma, splitSpace, stringToRGBA,\n    RGBA, splitBracket, IObject, isArray, splitText\n} from \"@daybrush/utils\";\nimport { NameType } from \"../types\";\n\nexport function splitStyle(str: string) {\n\n    const properties = splitText(str, \";\");\n    const obj: IObject<string | PropertyObject> = {};\n    const totalLength = properties.length;\n    let length = totalLength;\n\n    for (let i = 0; i < totalLength; ++i) {\n        const matches = splitText(properties[i], \":\");\n\n        if (matches.length < 2 || !matches[1]) {\n            --length;\n            continue;\n        }\n        obj[matches[0].trim()] = toPropertyObject(matches[1].trim());\n    }\n    return { styles: obj, length };\n}\n/**\n* convert array to PropertyObject[type=color].\n* default model \"rgba\"\n* @memberof Property\n* @function arrayToColorObject\n* @param {Array|PropertyObject} value ex) [0, 0, 0, 1]\n* @return {PropertyObject} PropertyObject[type=color]\n* @example\narrayToColorObject([0, 0, 0])\n// => PropertyObject(type=\"color\", model=\"rgba\", value=[0, 0, 0, 1], separator=\",\")\n*/\nexport function arrayToColorObject(arr: number[]) {\n    const model = RGBA;\n\n    if (arr.length === 3) {\n        arr[3] = 1;\n    }\n    return new PropertyObject(arr, {\n        model,\n        separator: \",\",\n        type: \"color\",\n        prefix: `${model}(`,\n        suffix: \")\",\n    });\n}\n/**\n* convert text with parentheses to object.\n* @memberof Property\n* @function stringToBracketObject\n* @param {String} value ex) \"rgba(0,0,0,1)\"\n* @return {PropertyObject} PropertyObject\n* @example\nstringToBracketObject(\"abcde(0, 0, 0,1)\")\n// => PropertyObject(model=\"abcde\", value=[0, 0, 0,1], separator=\",\")\n*/\nexport function stringToBracketObject(text: string) {\n    // [prefix, value, other]\n    const { prefix: model, value, suffix: afterModel } = splitBracket(text);\n\n    if (typeof value === \"undefined\") {\n        return text;\n    }\n    if (COLOR_MODELS.indexOf(model) > -1) {\n        return arrayToColorObject(stringToRGBA(text));\n    }\n    // divide comma(,)\n    const obj = toPropertyObject(value, model);\n\n    let arr = [value];\n    let separator = \",\";\n    let prefix = `${model}(`;\n    let suffix = `)${afterModel}`;\n\n    if (obj instanceof PropertyObject) {\n        separator = obj.separator;\n        arr = obj.value;\n        prefix += obj.prefix;\n        suffix = obj.suffix + suffix;\n    }\n    return new PropertyObject(arr, {\n        separator,\n        model,\n        prefix,\n        suffix,\n    });\n}\n\nexport function arrayToPropertyObject(arr: any[], separator: string) {\n    return new PropertyObject(arr, {\n        type: \"array\",\n        separator,\n    });\n}\n\n/**\n* convert text with parentheses to PropertyObject[type=color].\n* If the values are not RGBA model, change them RGBA mdoel.\n* @memberof Property\n* @function stringToColorObject\n* @param {String|PropertyObject} value ex) \"rgba(0,0,0,1)\"\n* @return {PropertyObject} PropertyObject[type=color]\n* @example\nstringToColorObject(\"rgba(0, 0, 0,1)\")\n// => PropertyObject(type=\"color\", model=\"rgba\", value=[0, 0, 0,1], separator=\",\")\n*/\nexport function stringToColorObject(value: string): string | PropertyObject {\n    const result = stringToRGBA(value);\n\n    return result ? arrayToColorObject(result) : value;\n}\n/**\n* convert CSS Value to PropertyObject\n* @memberof Property\n* @function toPropertyObject\n* @param {String} value it's text contains the array.\n* @return {String} Not Array, Not Separator, Only Number & Unit\n* @return {PropertyObject} Array with Separator.\n* @see referenced regular expression {@link http://stackoverflow.com/questions/20215440/parse-css-gradient-rule-with-javascript-regex}\n* @example\ntoPropertyObject(\"1px solid #000\");\n// => PropertyObject([\"1px\", \"solid\", rgba(0, 0, 0, 1)])\n*/\nexport function toPropertyObject(value: any[], model?: NameType): PropertyObject;\nexport function toPropertyObject(value: IObject<any>, model?: NameType): IObject<any>;\nexport function toPropertyObject(value: string, model?: NameType): PropertyObject | string;\nexport function toPropertyObject(value: string | IObject<any> | any[], model?: NameType) {\n    if (!isString(value)) {\n        if (isArray(value)) {\n            return arrayToPropertyObject(value, \",\");\n        }\n        return value;\n    }\n    let values: any = splitComma(value);\n\n    if (values.length > 1) {\n        return arrayToPropertyObject(values.map(v => toPropertyObject(v)), \",\");\n    }\n    values = splitSpace(value);\n\n    if (values.length > 1) {\n        return arrayToPropertyObject(values.map(v => toPropertyObject(v)), \" \");\n    }\n    values = /^(['\"])([^'\"]*)(['\"])$/g.exec(value);\n\n    if (values && values[1] === values[3]) {\n        // Quotes\n        return new PropertyObject([toPropertyObject(values[2])], {\n            prefix: values[1],\n            suffix: values[1],\n        });\n    } else if (value.indexOf(\"(\") !== -1) {\n        // color\n        return stringToBracketObject(value);\n    } else if (value.charAt(0) === \"#\" && model !== \"url\") {\n        return stringToColorObject(value);\n    }\n    return value;\n}\nexport function toObject(object: PropertyObject, result: IObject<any> = {}) {\n    const model = object.model;\n\n    if (model) {\n        object.setOptions({\n            model: \"\",\n            suffix: \"\",\n            prefix: \"\",\n        });\n        const value = object.size() > 1 ? object : object.get(0);\n\n        result[model] = value;\n    } else {\n        object.forEach(obj => {\n            toObject(obj, result);\n        });\n    }\n    return result;\n}\n","import {\n    ROLES, MAXIMUM, FIXED, ALIAS,\n    RUNNING, PLAY, ENDED, PLAY_CSS, CURRENT_TIME, START_ANIMATION, EASINGS, NAME_SEPARATOR\n} from \"./consts\";\nimport PropertyObject from \"./PropertyObject\";\nimport Scene from \"./Scene\";\nimport SceneItem from \"./SceneItem\";\nimport {\n    isArray, ANIMATION, ARRAY, OBJECT,\n    PROPERTY, STRING, NUMBER, IS_WINDOW, IObject, $, isObject, addEvent, removeEvent, isString,\n} from \"@daybrush/utils\";\nimport { EasingType, EasingFunction, NameType } from \"./types\";\nimport { toPropertyObject } from \"./utils/property\";\nimport { bezier, steps } from \"./easing\";\nimport Animator from \"./Animator\";\n\nexport function isPropertyObject(value: any): value is PropertyObject {\n    return value instanceof PropertyObject;\n}\nexport function setAlias(name: string, alias: string[]) {\n    ALIAS[name] = alias;\n}\nexport function setRole(names: string[], isProperty?: boolean, isFixedProperty?: boolean) {\n    const length = names.length;\n    let roles: any = ROLES;\n    let fixed: any = FIXED;\n\n    for (let i = 0; i < length - 1; ++i) {\n        !roles[names[i]] && (roles[names[i]] = {});\n        roles = roles[names[i]];\n        if (isFixedProperty) {\n            !fixed[names[i]] && (fixed[names[i]] = {});\n            fixed = fixed[names[i]];\n        }\n    }\n    isFixedProperty && (fixed[names[length - 1]] = true);\n    roles[names[length - 1]] = isProperty ? true : {};\n}\nexport function getType(value: any) {\n    const type = typeof value;\n\n    if (type === OBJECT) {\n        if (isArray(value)) {\n            return ARRAY;\n        } else if (isPropertyObject(value)) {\n            return PROPERTY;\n        }\n    } else if (type === STRING || type === NUMBER) {\n        return \"value\";\n    }\n    return type;\n}\nexport function isPureObject(obj: any): obj is object {\n    return isObject(obj) && obj.constructor === Object;\n}\nexport function getNames(names: IObject<any>, stack: string[]) {\n    let arr: string[][] = [];\n\n    if (isPureObject(names)) {\n        for (const name in names) {\n            stack.push(name);\n            arr = arr.concat(getNames(names[name], stack));\n            stack.pop();\n        }\n    } else {\n        arr.push(stack.slice());\n    }\n    return arr;\n}\nexport function updateFrame(names: IObject<any>, properties: IObject<any>) {\n    for (const name in properties) {\n        const value = properties[name];\n\n        if (!isPureObject(value)) {\n            names[name] = true;\n            continue;\n        }\n        if (!isObject(names[name])) {\n            names[name] = {};\n        }\n        updateFrame(names[name], properties[name]);\n    }\n    return names;\n}\nexport function toFixed(num: number) {\n    return Math.round(num * MAXIMUM) / MAXIMUM;\n}\nexport function getValueByNames(\n    names: Array<string | number>,\n    properties: IObject<any>, length: number = names.length) {\n    let value = properties;\n\n    for (let i = 0; i < length; ++i) {\n        if (!isObject(value) || value == null) {\n            return undefined;\n        }\n        value = value[names[i]];\n    }\n    return value;\n}\nexport function isInProperties(roles: IObject<any>, args: NameType[], isLast?: boolean) {\n    const length = args.length;\n    let role: any = roles;\n\n    if (length === 0) {\n        return false;\n    }\n    for (let i = 0; i < length; ++i) {\n        if (role === true) {\n            return false;\n        }\n        role = role[args[i]];\n        if (!role || (!isLast && role === true)) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * @memberof Scene\n * @param - Property names\n * @param - Whether the property is the last property that cannot be an object (non-partitionable)\n */\nexport function isRole(args: NameType[], isLast?: boolean): boolean {\n    return isInProperties(ROLES, args, isLast);\n}\nexport function isFixed(args: NameType[]) {\n    return isInProperties(FIXED, args, true);\n}\n\nexport interface IterationInterface {\n    currentTime: number;\n    iterationCount: number;\n    elapsedTime: number;\n}\nexport function setPlayCSS(item: Animator, isActivate: boolean) {\n    item.state[PLAY_CSS] = isActivate;\n}\nexport function isPausedCSS(item: Scene | SceneItem) {\n    return item.state[PLAY_CSS] && item.isPaused();\n}\nexport function isEndedCSS(item: Scene | SceneItem) {\n    return !item.isEnded() && item.state[PLAY_CSS];\n}\n\nexport function makeId(selector?: boolean) {\n    for (; ;) {\n        const id = `${Math.floor(Math.random() * 10000000)}`;\n\n        if (!IS_WINDOW || !selector) {\n            return id;\n        }\n        const checkElement = $(`[data-scene-id=\"${id}\"]`);\n\n        if (!checkElement) {\n            return id;\n        }\n    }\n}\nexport function getRealId(item: Scene | SceneItem) {\n    return item.getId() || item.setId(makeId(false)).getId();\n}\nexport function toId(text: number | string) {\n    return `${text}`.match(/[0-9a-zA-Z]+/g).join(\"\");\n}\nexport function playCSS(\n    item: Scene | SceneItem, isExportCSS?: boolean,\n    playClassName?: string, properties: object = {}) {\n    if (!ANIMATION || item.getPlayState() === RUNNING) {\n        return;\n    }\n    const className = playClassName || START_ANIMATION;\n\n    if (isPausedCSS(item)) {\n        item.addPlayClass(true, className, properties);\n    } else {\n        if (item.isEnded()) {\n            item.setTime(0);\n        }\n        isExportCSS && item.exportCSS({ className });\n        const el = item.addPlayClass(false, className, properties);\n\n        if (!el) {\n            return;\n        }\n        addAnimationEvent(item, el);\n        setPlayCSS(item, true);\n    }\n    item.setPlayState(RUNNING);\n}\n\nexport function addAnimationEvent(item: Animator, el: Element) {\n    const state = item.state;\n    const duration = item.getDuration();\n    const isZeroDuration = !duration || !isFinite(duration);\n    const animationend = () => {\n        setPlayCSS(item, false);\n        item.finish();\n    };\n    const animationstart = () => {\n        item.trigger(PLAY);\n\n        addEvent(el, \"animationcancel\", animationend);\n        addEvent(el, \"animationend\", animationend);\n        addEvent(el, \"animationiteration\", animationiteration);\n    };\n    item.once(ENDED, () => {\n        removeEvent(el, \"animationcancel\", animationend);\n        removeEvent(el, \"animationend\", animationend);\n        removeEvent(el, \"animationiteration\", animationiteration);\n        removeEvent(el, \"animationstart\", animationstart);\n    });\n    const animationiteration = ({ elapsedTime }: any) => {\n        const currentTime = elapsedTime;\n        const iterationCount = isZeroDuration ? 0 : (currentTime / duration);\n\n        state[CURRENT_TIME] = currentTime;\n        item.setIteration(iterationCount);\n    };\n    addEvent(el, \"animationstart\", animationstart);\n}\n\nexport function getEasing(curveArray: string | number[] | EasingFunction): EasingType {\n    let easing: EasingType;\n\n    if (isString(curveArray)) {\n        if (curveArray in EASINGS) {\n            easing = EASINGS[curveArray];\n        } else {\n            const obj = toPropertyObject(curveArray);\n\n            if (isString(obj)) {\n                return 0;\n            } else {\n                if (obj.model === \"cubic-bezier\") {\n                    curveArray = obj.value.map(v => parseFloat(v));\n                    easing = bezier(curveArray[0], curveArray[1], curveArray[2], curveArray[3]);\n                } else if (obj.model === \"steps\") {\n                    easing = steps(parseFloat(obj.value[0]), obj.value[1]);\n                } else {\n                    return 0;\n                }\n            }\n        }\n    } else if (isArray(curveArray)) {\n        easing = bezier(curveArray[0], curveArray[1], curveArray[2], curveArray[3]);\n    } else {\n        easing = curveArray;\n    }\n\n    return easing;\n}\n","import {\n    THRESHOLD,\n    ALTERNATE, ALTERNATE_REVERSE, REVERSE, INFINITE, NORMAL,\n    ITERATION_COUNT, DELAY, FILL_MODE, DIRECTION, PLAY_SPEED,\n    DURATION, EASING, ITERATION_TIME, EASING_NAME, PAUSED,\n    RUNNING, PLAY, TIMEUPDATE, ENDED, PLAY_STATE, PREV_TIME, TICK_TIME, CURRENT_TIME, ITERATION, OPTIONS} from \"./consts\";\nimport { toFixed, getEasing } from \"./utils\";\nimport { splitUnit, isString, camelize, requestAnimationFrame, cancelAnimationFrame } from \"@daybrush/utils\";\nimport {\n    IterationCountType, DirectionType, AnimatorState,\n    EasingFunction, FillModeType, PlayStateType, EasingType, AnimatorOptions, AnimatorEvents,\n} from \"./types\";\nimport EventEmitter from \"@scena/event-emitter\";\n\nfunction GetterSetter<T extends new (...args: any[]) => {}>(\n    getter: string[], setter: string[], parent: string) {\n    return (constructor: T) => {\n        const prototype = constructor.prototype;\n\n        getter.forEach(name => {\n            prototype[camelize(`get ${name}`)] = function() {\n                return this[parent][name];\n            };\n        });\n        setter.forEach(name => {\n            prototype[camelize(`set ${name}`)] = function(value: any) {\n                this[parent][name] = value;\n                return this;\n            };\n        });\n    };\n}\nexport function isDirectionReverse(iteration: number, iteraiontCount: IterationCountType, direction: DirectionType) {\n    if (direction === REVERSE) {\n        return true;\n    } else if (iteraiontCount !== INFINITE && iteration === iteraiontCount && iteraiontCount % 1 === 0) {\n        return direction === (iteration % 2 >= 1 ? ALTERNATE_REVERSE : ALTERNATE);\n    }\n    return direction === (iteration % 2 >= 1 ? ALTERNATE : ALTERNATE_REVERSE);\n}\n/**\n* @typedef {Object} AnimatorState The Animator options. Properties used in css animation.\n* @property {number} [duration] The duration property defines how long an animation should take to complete one cycle.\n* @property {\"none\"|\"forwards\"|\"backwards\"|\"both\"} [fillMode] The fillMode property specifies a style for the element when the animation is not playing (before it starts, after it ends, or both).\n* @property {\"infinite\"|number} [iterationCount] The iterationCount property specifies the number of times an animation should be played.\n* @property {array|function} [easing] The easing(timing-function) specifies the speed curve of an animation.\n* @property {number} [delay] The delay property specifies a delay for the start of an animation.\n* @property {\"normal\"|\"reverse\"|\"alternate\"|\"alternate-reverse\"} [direction] The direction property defines whether an animation should be played forwards, backwards or in alternate cycles.\n*/\n\nconst setters = [\"id\", ITERATION_COUNT, DELAY, FILL_MODE,\n    DIRECTION, PLAY_SPEED, DURATION, PLAY_SPEED, ITERATION_TIME, PLAY_STATE];\nconst getters = [...setters, EASING, EASING_NAME];\n\n/**\n* play video, animation, the others\n* @extends EventEmitter\n* @see {@link https://www.w3schools.com/css/css3_animations.asp|CSS3 Animation}\n*/\n@GetterSetter(getters, setters, \"state\")\nclass Animator <\n    Options extends AnimatorOptions = AnimatorOptions,\n    State extends AnimatorState = AnimatorState,\n    Events extends {} = {},\n> extends EventEmitter<AnimatorEvents & Events> {\n    public state: State;\n    private timerId: number = 0;\n\n    /**\n     * @param - animator's options\n     * @example\n  const animator = new Animator({\n      delay: 2,\n      diretion: \"alternate\",\n      duration: 2,\n      fillMode: \"forwards\",\n      iterationCount: 3,\n      easing: Scene.easing.EASE,\n  });\n     */\n    constructor(options?: Partial<Options & AnimatorOptions>) {\n        super();\n        this.state = {\n            id: \"\",\n            easing: 0,\n            easingName: \"linear\",\n            iterationCount: 1,\n            delay: 0,\n            fillMode: \"forwards\",\n            direction: NORMAL,\n            playSpeed: 1,\n            currentTime: 0,\n            iterationTime: -1,\n            iteration: 0,\n            tickTime: 0,\n            prevTime: 0,\n            playState: PAUSED,\n            duration: 0,\n        } as State;\n        this.setOptions(options);\n    }\n    /**\n      * set animator's easing.\n      * @param curverArray - The speed curve of an animation.\n      * @return {Animator} An instance itself.\n      * @example\n  animator.({\n      delay: 2,\n      diretion: \"alternate\",\n      duration: 2,\n      fillMode: \"forwards\",\n      iterationCount: 3,\n      easing: Scene.easing.EASE,\n  });\n      */\n    public setEasing(curveArray: string | number[] | EasingFunction): this {\n        const easing: EasingType = getEasing(curveArray);\n        const easingName = easing && easing[EASING_NAME] || \"linear\";\n        const state = this.state;\n\n        state[EASING] = easing;\n        state[EASING_NAME] = easingName;\n        return this;\n    }\n    /**\n      * set animator's options.\n      * @see {@link https://www.w3schools.com/css/css3_animations.asp|CSS3 Animation}\n      * @param - animator's options\n      * @return {Animator} An instance itself.\n      * @example\n  animator.({\n      delay: 2,\n      diretion: \"alternate\",\n      duration: 2,\n      fillMode: \"forwards\",\n      iterationCount: 3,\n      easing: Scene.eaasing.EASE,\n  });\n      */\n    public setOptions(options: Partial<AnimatorOptions> = {}): this {\n        for (const name in options) {\n            const value = options[name];\n\n            if (name === EASING) {\n                this.setEasing(value);\n                continue;\n            } else if (name === DURATION) {\n                value && this.setDuration(value);\n                continue;\n            }\n            if (OPTIONS.indexOf(name as any) > -1) {\n                this.state[name] = value;\n            }\n        }\n\n        return this;\n    }\n    /**\n      * Get the animator's total duration including delay\n      * @return {number} Total duration\n      * @example\n  animator.getTotalDuration();\n      */\n    public getTotalDuration(): number {\n        return this.getActiveDuration(true);\n    }\n    /**\n      * Get the animator's total duration excluding delay\n      * @return {number} Total duration excluding delay\n      * @example\n  animator.getActiveDuration();\n      */\n    public getActiveDuration(delay?: boolean): number {\n        const state = this.state;\n        const count = state[ITERATION_COUNT];\n        if (count === INFINITE) {\n            return Infinity;\n        }\n        return (delay ? state[DELAY] : 0) + this.getDuration() * count;\n    }\n    /**\n      * Check if the animator has reached the end.\n      * @return {boolean} ended\n      * @example\n  animator.isEnded(); // true or false\n      */\n    public isEnded(): boolean {\n        if (this.state[TICK_TIME] === 0 && this.state[PLAY_STATE] === PAUSED) {\n            return true;\n        } else if (this.getTime() < this.getActiveDuration()) {\n            return false;\n        }\n        return true;\n    }\n    /**\n      *Check if the animator is paused:\n      * @return {boolean} paused\n      * @example\n  animator.isPaused(); // true or false\n      */\n    public isPaused(): boolean {\n        return this.state[PLAY_STATE] === PAUSED;\n    }\n    public start(delay: number = this.state[DELAY]): boolean {\n        const state = this.state;\n\n        state[PLAY_STATE] = RUNNING;\n\n        if (state[TICK_TIME] >= delay) {\n            /**\n             * This event is fired when play animator.\n             * @event Animator#play\n             */\n            this.trigger<\"play\", AnimatorEvents[\"play\"]>(PLAY);\n            return true;\n        }\n        return false;\n    }\n    /**\n      * play animator\n      * @return {Animator} An instance itself.\n      */\n    public play(toTime?: number) {\n        const state = this.state;\n        const delay = state[DELAY];\n        const currentTime = this.getTime();\n\n        state[PLAY_STATE] = RUNNING;\n\n        if (this.isEnded() && (currentTime === 0 || currentTime >= this.getActiveDuration())) {\n            this.setTime(-delay, true);\n        }\n\n        this.timerId = requestAnimationFrame((time: number) => {\n            state[PREV_TIME] = time;\n            this.tick(time, toTime);\n        });\n        this.start();\n        return this;\n    }\n    /**\n      * pause animator\n      * @return {Animator} An instance itself.\n      */\n    public pause(): this {\n        const state = this.state;\n\n        if (state[PLAY_STATE] !== PAUSED) {\n            state[PLAY_STATE] = PAUSED;\n            /**\n             * This event is fired when animator is paused.\n             * @event Animator#paused\n             */\n            this.trigger<\"paused\", AnimatorEvents[\"paused\"]>(PAUSED);\n        }\n        cancelAnimationFrame(this.timerId);\n        return this;\n    }\n    /**\n       * end animator\n       * @return {Animator} An instance itself.\n      */\n    public finish() {\n        this.setTime(0);\n        this.state[TICK_TIME] = 0;\n        this.end();\n        return this;\n    }\n    /**\n       * end animator\n       * @return {Animator} An instance itself.\n      */\n    public end() {\n        this.pause();\n        /**\n             * This event is fired when animator is ended.\n             * @event Animator#ended\n             */\n        this.trigger<\"ended\", AnimatorEvents[\"ended\"]>(ENDED);\n        return this;\n    }\n    /**\n      * set currentTime\n      * @param {Number|String} time - currentTime\n      * @return {Animator} An instance itself.\n      * @example\n\n  animator.setTime(\"from\"); // 0\n  animator.setTime(\"to\"); // 100%\n  animator.setTime(\"50%\");\n  animator.setTime(10);\n  animator.getTime() // 10\n      */\n    public setTime(time: number | string, isTick?: boolean, isParent?: boolean) {\n        const activeDuration = this.getActiveDuration();\n        const state = this.state;\n        const prevTime = state[TICK_TIME];\n        const delay = state[DELAY];\n        let currentTime = isTick ? (time as number) : this.getUnitTime(time);\n\n        state[TICK_TIME] = delay + currentTime;\n        if (currentTime < 0) {\n            currentTime = 0;\n        } else if (currentTime > activeDuration) {\n            currentTime = activeDuration;\n        }\n        state[CURRENT_TIME] = currentTime;\n        this.calculate();\n\n        if (isTick && !isParent) {\n            const tickTime = state[TICK_TIME];\n\n            if (prevTime < delay && time >= 0) {\n                this.start(0);\n            }\n            if (tickTime < prevTime || this.isEnded()) {\n                this.end();\n                return;\n            }\n        }\n        if (this.isDelay()) {\n            return this;\n        }\n        /**\n             * This event is fired when the animator updates the time.\n             * @event Animator#timeupdate\n             * @param {Object} param The object of data to be sent to an event.\n             * @param {Number} param.currentTime The total time that the animator is running.\n             * @param {Number} param.time The iteration time during duration that the animator is running.\n             * @param {Number} param.iterationCount The iteration count that the animator is running.\n             */\n        this.trigger<\"timeupdate\", AnimatorEvents[\"timeupdate\"]>(TIMEUPDATE, {\n            currentTime,\n            time: this.getIterationTime(),\n            iterationCount: state[ITERATION],\n        });\n\n        return this;\n    }\n    /**\n      * Get the animator's current time\n      * @return {number} current time\n      * @example\n  animator.getTime();\n      */\n    public getTime(): number {\n        return this.state[CURRENT_TIME];\n    }\n    public getUnitTime(time: string | number) {\n        if (isString(time)) {\n            const duration = this.getDuration() || 100;\n\n            if (time === \"from\") {\n                return 0;\n            } else if (time === \"to\") {\n                return duration;\n            }\n            const { unit, value } = splitUnit(time);\n\n            if (unit === \"%\") {\n                !this.getDuration() && (this.setDuration(duration));\n                return toFixed(parseFloat(time) / 100 * duration);\n            } else if (unit === \">\") {\n                return value + THRESHOLD;\n            } else {\n                return value;\n            }\n        } else {\n            return toFixed(time);\n        }\n    }\n    /**\n       * Check if the current state of animator is delayed.\n       * @return {boolean} check delay state\n       */\n    public isDelay() {\n        const state = this.state;\n        const delay = state[DELAY];\n        const tickTime = state[TICK_TIME];\n\n        return delay > 0 && (tickTime < delay);\n    }\n    public setIteration(iterationCount: number): this {\n        const state = this.state;\n        const passIterationCount = Math.floor(iterationCount);\n        const maxIterationCount = state[ITERATION_COUNT] === INFINITE ? Infinity : state[ITERATION_COUNT];\n\n        if (state[ITERATION] < passIterationCount && passIterationCount < maxIterationCount) {\n            /**\n                  * The event is fired when an iteration of an animation ends.\n                  * @event Animator#iteration\n                  * @param {Object} param The object of data to be sent to an event.\n                  * @param {Number} param.currentTime The total time that the animator is running.\n                  * @param {Number} param.iterationCount The iteration count that the animator is running.\n                  */\n            this.trigger<\"iteration\", AnimatorEvents[\"iteration\"]>(ITERATION, {\n                currentTime: state[CURRENT_TIME],\n                iterationCount: passIterationCount,\n            });\n        }\n        state[ITERATION] = iterationCount;\n        return this;\n    }\n    protected calculate() {\n        const state = this.state;\n        const iterationCount = state[ITERATION_COUNT];\n        const fillMode = state[FILL_MODE];\n        const direction = state[DIRECTION];\n        const duration = this.getDuration();\n        const time = this.getTime();\n        const iteration = duration === 0 ? 0 : time / duration;\n        let currentIterationTime = duration ? time % duration : 0;\n\n        if (!duration) {\n            this.setIterationTime(0);\n            return this;\n        }\n        this.setIteration(iteration);\n\n        // direction : normal, reverse, alternate, alternate-reverse\n        // fillMode : forwards, backwards, both, none\n        const isReverse = isDirectionReverse(iteration, iterationCount, direction);\n\n        const isFiniteDuration = isFinite(duration);\n        if (isFiniteDuration && isReverse) {\n            currentIterationTime = duration - currentIterationTime;\n        }\n        if (isFiniteDuration && iterationCount !== INFINITE) {\n            const isForwards = fillMode === \"both\" || fillMode === \"forwards\";\n\n            // fill forwards\n            if (iteration >= iterationCount) {\n                currentIterationTime = duration * (isForwards ? (iterationCount % 1) || 1 : 0);\n                isReverse && (currentIterationTime = duration - currentIterationTime);\n            }\n        }\n        this.setIterationTime(currentIterationTime);\n        return this;\n    }\n    private tick(now: number, to?: number) {\n        if (this.isPaused()) {\n            return;\n        }\n        const state = this.state;\n        const playSpeed = state[PLAY_SPEED];\n        const prevTime = state[PREV_TIME];\n        const delay = state[DELAY];\n        const tickTime = state[TICK_TIME];\n        const currentTime = tickTime + Math.min(1000, now - prevTime) / 1000 * playSpeed;\n\n        state[PREV_TIME] = now;\n        this.setTime(currentTime - delay, true);\n        if (to && to * 1000 < now) {\n            this.pause();\n        }\n        if (state[PLAY_STATE] === PAUSED) {\n            return;\n        }\n\n        this.timerId = requestAnimationFrame((time: number) => {\n            this.tick(time, to);\n        });\n    }\n}\n/**\n * Specifies the unique indicator of the animator\n * @method Animator#setId\n * @param {number | string} - String or number of id to be set in the animator\n * @return {Animator} An instance itself.\n */\n/**\n * Specifies the unique indicator of the animator\n * @method Animator#getId\n * @return {number | string} the indicator of the item.\n */\n/**\n * Get a delay for the start of an animation.\n * @method Animator#getDelay\n * @return {number} delay\n */\n/**\n * Set a delay for the start of an animation.\n * @method Animator#setDelay\n * @param {number} delay - delay\n * @return {Animator} An instance itself.\n */\n/**\n * Get fill mode for the item when the animation is not playing (before it starts, after it ends, or both)\n * @method Animator#getFillMode\n * @return {FillModeType} fillMode\n */\n/**\n * Set fill mode for the item when the animation is not playing (before it starts, after it ends, or both)\n * @method Animator#setFillMode\n * @param {FillModeType} fillMode - fillMode\n * @return {Animator} An instance itself.\n */\n/**\n * Get the number of times an animation should be played.\n * @method Animator#getIterationCount\n * @return {IterationCountType} iterationCount\n */\n/**\n * Set the number of times an animation should be played.\n * @method Animator#setIterationCount\n * @param {IterationCountType} iterationCount - iterationCount\n * @return {Animator} An instance itself.\n */\n/**\n * Get whether an animation should be played forwards, backwards or in alternate cycles.\n * @method Animator#getDirection\n * @return {DirectionType} direction\n */\n/**\n * Set whether an animation should be played forwards, backwards or in alternate cycles.\n * @method Animator#setDirection\n * @param {DirectionType} direction - direction\n * @return {Animator} An instance itself.\n */\n/**\n * Get whether the animation is running or paused.\n * @method Animator#getPlayState\n * @return {PlayStateType} playState\n */\n/**\n * Set whether the animation is running or paused.\n * @method Animator#setPlayState\n * @param {PlayStateType} playState - playState\n * @return {Animator} An instance itself.\n */\n/**\n * Get the animator's play speed\n * @method Animator#getPlaySpeed\n * @return {number} playSpeed\n */\n/**\n * Set the animator's play speed\n * @method Animator#setPlaySpeed\n * @param {number} playSpeed - playSpeed\n * @return {Animator} An instance itself.\n */\n/**\n * Get how long an animation should take to complete one cycle.\n * @method Animator#getDuration\n * @return {number} duration\n */\n/**\n * Set how long an animation should take to complete one cycle.\n * @method Animator#setDuration\n * @param {number} duration - duration\n * @return {Animator} An instance itself.\n */\n/**\n * Get the speed curve of an animation.\n * @method Animator#getEasing\n * @return {EasingType} easing\n */\n/**\n * Get the speed curve's name\n * @method Animator#getEasingName\n * @return {string} the curve's name.\n */\n/**\n\t* Get the animator's current iteration time\n\t* @method Animator#getIterationTime\n\t* @return {number} current iteration time\n\t* @example\nanimator.getIterationTime();\n\t*/\n\n// tslint:disable-next-line:interface-name\ninterface Animator <\n    Options extends AnimatorOptions = AnimatorOptions,\n    State extends AnimatorState = AnimatorState,\n    Events extends {} = {},\n> extends EventEmitter<AnimatorEvents & Events> {\n    setId(id: number | string): this;\n    getId(): number | string;\n    getIterationTime(): number;\n    setIterationTime(time: number): this;\n    setDelay(delay: number): this;\n    getDelay(): number;\n    setFillMode(fillMode: FillModeType): this;\n    getFillMode(): FillModeType;\n    setIterationCount(iterationCount: IterationCountType): this;\n    getIterationCount(): IterationCountType;\n    setDirection(direction: DirectionType): this;\n    getDirection(): DirectionType;\n    setPlayState(playState: PlayStateType): this;\n    getPlayState(): PlayStateType;\n    setPlaySpeed(playSpeed: number): this;\n    getPlaySpeed(): number;\n    setDuration(duration: number): this;\n    getDuration(): number;\n    getEasing(): EasingType;\n    getEasingName(): string;\n}\nexport default Animator;\n","import {\n    ALIAS, TIMING_FUNCTION, TRANSFORM_NAME, EASING_NAME, NAME_SEPARATOR\n} from \"./consts\";\nimport { isRole, getType, isPropertyObject, getValueByNames, isFixed, getNames, getEasing } from \"./utils\";\nimport { toPropertyObject, splitStyle, toObject } from \"./utils/property\";\nimport {\n    isObject, isArray, isString, getKeys,\n    ANIMATION, TRANSFORM, FILTER, PROPERTY, FUNCTION, ARRAY, OBJECT, IObject, isUndefined,\n    sortOrders,\n} from \"@daybrush/utils\";\nimport { NameType, KeyValueChildren } from \"./types\";\nimport OrderMap from \"order-map\";\n\nfunction toInnerProperties(obj: IObject<string>, orders: NameType[] = []) {\n    if (!obj) {\n        return \"\";\n    }\n    const arrObj = [];\n\n    const keys = getKeys(obj);\n\n    sortOrders(keys, orders);\n\n    keys.forEach(name => {\n        arrObj.push(`${name.replace(/\\d$/g, \"\")}(${obj[name]})`);\n    });\n\n    return arrObj.join(\" \");\n}\n\n/* eslint-disable */\nfunction clone(target: IObject<any>, toValue = false) {\n    return merge({}, target, toValue);\n}\nfunction merge(to: IObject<any>, from: IObject<any>, toValue = false) {\n    for (const name in from) {\n        const value = from[name];\n        const type = getType(value);\n\n        if (type === PROPERTY) {\n            to[name] = toValue ? value.toValue() : value.clone();\n        } else if (type === FUNCTION) {\n            to[name] = toValue ? getValue([name], value) : value;\n        } else if (type === ARRAY) {\n            to[name] = value.slice();\n        } else if (type === OBJECT) {\n            if (isObject(to[name]) && !isPropertyObject(to[name])) {\n                merge(to[name], value, toValue);\n            } else {\n                to[name] = clone(value, toValue);\n            }\n        } else {\n            to[name] = from[name];\n        }\n    }\n    return to;\n}\n/* eslint-enable */\n\nfunction getPropertyName(args: NameType[]) {\n    return args[0] in ALIAS ? ALIAS[args[0]] : args;\n}\nfunction getValue(names: NameType[], value: any): any {\n    const type = getType(value);\n\n    if (type === PROPERTY) {\n        return value.toValue();\n    } else if (type === FUNCTION) {\n        if (names[0] !== TIMING_FUNCTION) {\n            return getValue(names, value());\n        }\n    } else if (type === OBJECT) {\n        return clone(value, true);\n    }\n    return value;\n}\n/**\n* Animation's Frame\n*/\nclass Frame {\n    public properties: IObject<any> = {};\n    public orderMap: OrderMap = new OrderMap(NAME_SEPARATOR);\n    /**\n     * @param - properties\n     * @example\n  const frame = new Scene.Frame({\n      display: \"none\"\n      transform: {\n          translate: \"50px\",\n          scale: \"5, 5\",\n      }\n  });\n     */\n    constructor(properties: any = {}) {\n        this.properties = {};\n        // this.orders = [];\n        this.set(properties);\n    }\n    /**\n      * get property value\n      * @param {...Number|String|PropertyObject} args - property name or value\n      * @example\n      frame.get(\"display\") // => \"none\", \"block\", ....\n      frame.get(\"transform\", \"translate\") // => \"10px,10px\"\n      */\n    public get(...args: NameType[]) {\n        const value = this.raw(...args);\n\n        return getValue(getPropertyName(args), value);\n    }\n    /**\n      * get properties orders\n      * @param - property names\n      * @example\n      frame.getOrders([\"display\"]) // => []\n      frame.getOrders([\"transform\"]) // => [\"translate\", \"scale\"]\n      */\n    public getOrders(names: NameType[]): NameType[] | undefined {\n        return this.orderMap.get(names);\n    }\n    /**\n      * set properties orders\n      * @param - property names\n      * @param - orders\n      * @example\n      frame.getOrders([\"transform\"]) // => [\"translate\", \"scale\"]\n      frame.setOrders([\"transform\"], [\"scale\", \"tralsate\"])\n      */\n    public setOrders(names: NameType[], orders: NameType[]): NameType[] {\n        return this.orderMap.set(names, orders);\n    }\n    /**\n      * get properties order object\n      * @example\n      console.log(frame.getOrderObject());\n      */\n    public getOrderObject() {\n        return this.orderMap.getObject();\n    }\n    /**\n      * set properties orders object\n      * @param - properties orders object\n      * @example\n      frame.setOrderObject({\n          \"\": [\"transform\"],\n          \"transform\": [\"scale\", \"tralsate\"],\n      });\n      */\n    public setOrderObject(obj: IObject<NameType[]>) {\n        this.orderMap.setObject(obj);\n    }\n\n    /**\n      * get property keys\n      * @param - property names\n      * @example\n      frame.gets(\"display\") // => []\n      frame.gets(\"transform\") // => [\"translate\"]\n      */\n    public getKeys(...args: NameType[]): string[] {\n        const value = this.raw(...args);\n        const keys = getType(value) === OBJECT ? getKeys(value) : [];\n\n        sortOrders(keys, this.orderMap.get(args));\n        return keys;\n    }\n    /**\n      * get properties array\n      * @param - property names\n      * @example\n      frame.gets(\"display\") // => []\n      frame.gets(\"transform\") // => [{ key: \"translate\", value: \"10px, 10px\", children: [] }]\n      */\n    public gets(...args: NameType[]): KeyValueChildren[] {\n        const values = this.get(...args);\n        const keys = this.getKeys(...args);\n\n        return keys.map(key => {\n            const nextValue = values[key];\n            return { key, value: nextValue, children: this.gets(...args, key) };\n        });\n    }\n\n    public raw(...args: NameType[]) {\n        return getValueByNames(getPropertyName(args), this.properties);\n    }\n    /**\n      * remove property value\n      * @param {...String} args - property name\n      * @return {Frame} An instance itself\n      * @example\n      frame.remove(\"display\")\n      */\n    public remove(...args: NameType[]) {\n        const params = getPropertyName(args);\n        const length = params.length;\n\n        if (!length) {\n            return this;\n        }\n        this.orderMap.remove(params);\n        const value = getValueByNames(params, this.properties, length - 1);\n\n        if (isObject(value)) {\n            delete value[params[length - 1]];\n        }\n        return this;\n    }\n    /**\n      * set property\n      * @param {...Number|String|PropertyObject} args - property names or values\n      * @return {Frame} An instance itself\n      * @example\n  // one parameter\n  frame.set({\n      display: \"none\",\n      transform: {\n          translate: \"10px, 10px\",\n          scale: \"1\",\n      },\n      filter: {\n          brightness: \"50%\",\n          grayscale: \"100%\"\n      }\n  });\n\n  // two parameters\n  frame.set(\"transform\", {\n      translate: \"10px, 10px\",\n      scale: \"1\",\n  });\n\n  // three parameters\n  frame.set(\"transform\", \"translate\", \"50px\");\n    */\n    public set(...args: any[]) {\n        const self = this;\n        const length = args.length;\n        const params = args.slice(0, -1);\n        const value = args[length - 1];\n        const firstParam = params[0];\n\n        if (length === 1 && value instanceof Frame) {\n            self.merge(value);\n        } else if (firstParam in ALIAS) {\n            self._set(ALIAS[firstParam], value);\n        } else if (length === 2 && isArray(firstParam)) {\n            self._set(firstParam, value);\n        } else if (isPropertyObject(value)) {\n            if (isRole(params)) {\n                self.set(...params, toObject(value));\n            } else {\n                self._set(params, value);\n            }\n        } else if (isArray(value)) {\n            self._set(params, value);\n        } else if (isObject(value)) {\n            if (!self.has(...params) && isRole(params)) {\n                self._set(params, {});\n            }\n            for (const name in value) {\n                self.set(...params, name, value[name]);\n            }\n        } else if (isString(value)) {\n            if (isRole(params, true)) {\n                if (isFixed(params) || !isRole(params)) {\n                    this._set(params, value);\n                } else {\n                    const obj = toPropertyObject(value);\n\n                    if (isObject(obj)) {\n                        self.set(...params, obj);\n                    }\n                }\n                return this;\n            } else {\n                const { styles, length: stylesLength } = splitStyle(value);\n\n                for (const name in styles) {\n                    self.set(...params, name, styles[name]);\n                }\n                if (stylesLength) {\n                    return this;\n                }\n            }\n            self._set(params, value);\n        } else {\n            self._set(params, value);\n        }\n        return self;\n    }\n    /**\n      * Gets the names of properties.\n      * @return the names of properties.\n      * @example\n  // one parameter\n  frame.set({\n      display: \"none\",\n      transform: {\n          translate: \"10px, 10px\",\n          scale: \"1\",\n      },\n  });\n\n  // [[\"display\"], [\"transform\", \"translate\"], [\"transform\", \"scale\"]]\n  console.log(frame.getNames());\n    */\n    public getNames(): string[][] {\n        return getNames(this.properties, []);\n    }\n    /**\n      * check that has property.\n      * @param {...String} args - property name\n      * @example\n      frame.has(\"property\", \"display\") // => true or false\n      */\n    public has(...args: NameType[]) {\n        const params = getPropertyName(args);\n        const length = params.length;\n\n        if (!length) {\n            return false;\n        }\n        return !isUndefined(getValueByNames(params, this.properties, length));\n    }\n    /**\n      * clone frame.\n      * @return {Frame} An instance of clone\n      * @example\n      frame.clone();\n      */\n    public clone() {\n        const frame = new Frame();\n\n        frame.setOrderObject(this.orderMap.orderMap);\n        return frame.merge(this);\n    }\n    /**\n      * merge one frame to other frame.\n      * @param - target frame.\n      * @return {Frame} An instance itself\n      * @example\n      frame.merge(frame2);\n      */\n    public merge(frame: Frame) {\n        const properties = this.properties;\n        const frameProperties = frame.properties;\n\n        if (frameProperties) {\n            merge(properties, frameProperties);\n        }\n        return this;\n    }\n    /**\n      * Specifies an css object that coverted the frame.\n      * @return {object} cssObject\n      */\n    public toCSSObject() {\n        const properties = this.get();\n        const cssObject: IObject<string> = {};\n\n        for (const name in properties) {\n            if (isRole([name], true)) {\n                continue;\n            }\n            const value = properties[name];\n\n            if (name === TIMING_FUNCTION) {\n                cssObject[TIMING_FUNCTION.replace(\"animation\", ANIMATION)] =\n                    (isString(value) ? value : value[EASING_NAME]) || \"initial\";\n            } else {\n                cssObject[name] = value;\n            }\n        }\n        const transform = toInnerProperties(properties[TRANSFORM_NAME], this.orderMap.get([TRANSFORM_NAME]));\n        const filter = toInnerProperties(properties.filter, this.orderMap.get([FILTER]));\n\n        TRANSFORM && transform && (cssObject[TRANSFORM] = transform);\n        FILTER && filter && (cssObject[FILTER] = filter);\n        return cssObject;\n    }\n    /**\n      * Specifies an css text that coverted the frame.\n      * @return {string} cssText\n      */\n    public toCSS() {\n        const cssObject = this.toCSSObject();\n        const cssArray = [];\n        const keys = getKeys(cssObject);\n\n        sortOrders(keys, this.orderMap.get([]));\n        keys.forEach(name => {\n            cssArray.push(`${name}:${cssObject[name]};`);\n        });\n        return cssArray.join(\"\");\n    }\n    /**\n      * Remove All Properties\n      * @return {Frame} An instance itself\n      */\n    public clear() {\n        this.properties = {};\n        this.orderMap.clear();\n        return this;\n    }\n    private _set(args: NameType[], value: any) {\n        let properties = this.properties;\n        const length = args.length;\n\n        for (let i = 0; i < length - 1; ++i) {\n            const name = args[i];\n\n            !(name in properties) && (properties[name] = {});\n            properties = properties[name];\n        }\n        if (!length) {\n            return;\n        }\n        const lastParam = args[length - 1];\n\n        this.orderMap.add(args);\n        if (length === 1 && lastParam === TIMING_FUNCTION) {\n            properties[lastParam] = getEasing(value);\n        } else {\n            properties[lastParam] = isString(value) && !isFixed(args)\n                ? toPropertyObject(value, lastParam)\n                : value;\n        }\n    }\n}\nexport default Frame;\n","\nimport PropertyObject from \"../PropertyObject\";\nimport { getType } from \"../utils\";\nimport { toPropertyObject } from \"./property\";\nimport { splitUnit, PROPERTY, FUNCTION, ARRAY, dot as dotNumber } from \"@daybrush/utils\";\nimport { EasingType } from \"../types\";\n\nfunction dotArray(a1: any[], a2: any, b1: number, b2: number): any {\n  const length = a2.length;\n\n  return a1.map((v1, i) => {\n    if (i >= length) {\n      return v1;\n    } else {\n      return dot(v1, a2[i], b1, b2);\n    }\n  });\n}\n\nfunction dotColor(color1: PropertyObject, color2: PropertyObject, b1: number, b2: number) {\n  // convert array to PropertyObject(type=color)\n  const value1 = color1.value;\n  const value2 = color2.value;\n  // If the model name is not same, the inner product is impossible.\n  const model1 = color1.model;\n  const model2 = color2.model;\n\n  if (model1 !== model2) {\n    // It is recognized as a string.\n    return dot(color1.toValue(), color2.toValue(), b1, b2);\n  }\n  if (value1.length === 3) {\n    value1[3] = 1;\n  }\n  if (value2.length === 3) {\n    value2[3] = 1;\n  }\n  const v = dotArray(value1, value2, b1, b2);\n  const colorModel = model1;\n\n  for (let i = 0; i < 3; ++i) {\n    v[i] = parseInt(v[i], 10);\n  }\n  const object = new PropertyObject(v, {\n    type: \"color\",\n    model: colorModel,\n    prefix: `${colorModel}(`,\n    suffix: \")\",\n  });\n\n  return object;\n}\n\nfunction dotObject(a1: PropertyObject, a2: PropertyObject, b1: number, b2: number) {\n  const a1Type = a1.type;\n\n  if (a1Type === \"color\") {\n    return dotColor(a1, a2, b1, b2);\n  }\n  const value1 = a1.value;\n  const value2 = a2.value;\n  const arr = dotArray(value1, value2, b1, b2);\n\n  return new PropertyObject(arr, {\n    type: a1Type,\n    separator: a1.separator || a2.separator,\n    prefix: a1.prefix || a2.prefix,\n    suffix: a1.suffix || a2.suffix,\n    model: a1.model || a2.model,\n  });\n}\n/**\n* The dot product of a1 and a2 for the b1 and b2.\n* @memberof Dot\n* @function dot\n* @param {String|Number|PropertyObject} a1 value1\n* @param {String|Number|PropertyObject} a2 value2\n* @param {Number} b1 b1 ratio\n* @param {Number} b2 b2 ratio\n* @return {String} Not Array, Not Separator, Only Number & Unit\n* @return {PropertyObject} Array with Separator.\n* @example\ndot(1, 3, 0.3, 0.7);\n// => 1.6\n*/\nexport function dot(a1: any, a2: any, b1: number, b2: number): any {\n  if (b2 === 0) {\n    return a2;\n  } else if (b1 === 0 || b1 + b2 === 0) {\n    // prevent division by zero.\n    return a1;\n  }\n  // dot Object\n\n  const type1 = getType(a1);\n  const type2 = getType(a2);\n  const isFunction1 = type1 === FUNCTION;\n  const isFunction2 = type2 === FUNCTION;\n\n  if (isFunction1 || isFunction2) {\n    return () => {\n      return dot(isFunction1 ? toPropertyObject(a1()) : a1, isFunction2 ? toPropertyObject(a2()) : a2, b1, b2);\n    };\n  } else if (type1 === type2) {\n    if (type1 === PROPERTY) {\n      return dotObject(a1, a2, b1, b2);\n    } else if (type1 === ARRAY) {\n      return dotArray(a1, a2, b1, b2);\n    } else if (type1 !== \"value\") {\n      return a1;\n    }\n  } else {\n    return a1;\n  }\n  const v1 = splitUnit(`${a1}`);\n  const v2 = splitUnit(`${a2}`);\n  let v;\n\n  // 숫자가 아닐경우 첫번째 값을 반환 b2가 0일경우 두번째 값을 반환\n  if (isNaN(v1.value) || isNaN(v2.value)) {\n    return a1;\n  } else {\n    v = dotNumber(v1.value, v2.value, b1, b2);\n  }\n  const prefix = v1.prefix || v2.prefix;\n  const unit = v1.unit || v2.unit;\n\n  if (!prefix && !unit) {\n    return v;\n  }\n  return prefix + v + unit;\n}\n\nexport function dotValue(\n  time: number,\n  prevTime: number,\n  nextTime: number,\n  prevValue: any,\n  nextValue: any,\n  easing?: EasingType) {\n  if (time === prevTime) {\n    return prevValue;\n  } else if (time === nextTime) {\n    return nextValue;\n  } else if (!easing) {\n    return dot(prevValue, nextValue, time - prevTime, nextTime - time);\n  }\n  const ratio = easing((time - prevTime) / (nextTime - prevTime));\n  const value = dot(prevValue, nextValue, ratio, 1 - ratio);\n\n  return value;\n}\n","import Animator, { isDirectionReverse } from \"./Animator\";\nimport Frame from \"./Frame\";\nimport {\n    toFixed,\n    isFixed,\n    playCSS,\n    toId,\n    getRealId,\n    makeId,\n    isPausedCSS,\n    isRole,\n    getValueByNames,\n    isEndedCSS,\n    setPlayCSS,\n    getNames,\n    updateFrame,\n} from \"./utils\";\nimport { dotValue } from \"./utils/dot\";\nimport {\n    START_ANIMATION,\n    PREFIX, THRESHOLD,\n    TIMING_FUNCTION, ALTERNATE, ALTERNATE_REVERSE, INFINITE,\n    REVERSE, EASING, FILL_MODE, DIRECTION, ITERATION_COUNT,\n    EASING_NAME, DELAY, PLAY_SPEED, DURATION, PAUSE_ANIMATION,\n    DATA_SCENE_ID, SELECTOR, ROLES, NAME_SEPARATOR\n} from \"./consts\";\nimport {\n    isObject, isArray, isUndefined, decamelize,\n    ANIMATION, fromCSS, addClass, removeClass, hasClass,\n    KEYFRAMES, isFunction,\n    IObject, $, splitComma, toArray, isString, IArrayFormat,\n    dot as dotNumber,\n    find,\n    findIndex,\n    getKeys,\n    sortOrders,\n} from \"@daybrush/utils\";\nimport {\n    NameType, AnimateElement, AnimatorState,\n    SceneItemState, SceneItemOptions, EasingType, PlayCondition, DirectionType, SceneItemEvents\n} from \"./types\";\nimport OrderMap from \"order-map\";\nimport styled, { InjectResult, StyledInjector } from \"css-styled\";\n\nfunction getNearTimeIndex(times: number[], time: number) {\n    const length = times.length;\n\n    for (let i = 0; i < length; ++i) {\n        if (times[i] === time) {\n            return [i, i];\n        } else if (times[i] > time) {\n            return [i > 0 ? i - 1 : 0, i];\n        }\n    }\n    return [length - 1, length - 1];\n}\nfunction makeAnimationProperties(properties: object) {\n    const cssArray = [];\n\n    for (const name in properties) {\n        cssArray.push(`${ANIMATION}-${decamelize(name)}:${properties[name]};`);\n    }\n    return cssArray.join(\"\");\n}\nfunction addTime(times: number[], time: number) {\n    const length = times.length;\n    for (let i = 0; i < length; ++i) {\n        if (time < times[i]) {\n            times.splice(i, 0, time);\n            return;\n        }\n    }\n    times[length] = time;\n}\nfunction addEntry(entries: number[][], time: number, keytime: number) {\n    const prevEntry = entries[entries.length - 1];\n\n    (!prevEntry || prevEntry[0] !== time || prevEntry[1] !== keytime) &&\n        entries.push([toFixed(time), toFixed(keytime)]);\n}\nexport function getEntries(times: number[], states: AnimatorState[]) {\n    let entries = times.map(time => ([time, time]));\n    let nextEntries = [];\n\n    states.forEach(state => {\n        const iterationCount = state[ITERATION_COUNT] as number;\n        const delay = state[DELAY];\n        const playSpeed = state[PLAY_SPEED];\n        const direction = state[DIRECTION];\n        const intCount = Math.ceil(iterationCount);\n        const currentDuration = entries[entries.length - 1][0];\n        const length = entries.length;\n        const lastTime = currentDuration * iterationCount;\n\n        for (let i = 0; i < intCount; ++i) {\n            const isReverse =\n                direction === REVERSE ||\n                direction === ALTERNATE && i % 2 ||\n                direction === ALTERNATE_REVERSE && !(i % 2);\n\n            for (let j = 0; j < length; ++j) {\n                const entry = entries[isReverse ? length - j - 1 : j];\n                const time = entry[1];\n                const currentTime = currentDuration * i + (isReverse ? currentDuration - entry[0] : entry[0]);\n                const prevEntry = entries[isReverse ? length - j : j - 1];\n\n                if (currentTime > lastTime) {\n                    if (j !== 0) {\n                        const prevTime = currentDuration * i +\n                            (isReverse ? currentDuration - prevEntry[0] : prevEntry[0]);\n                        const divideTime = dotNumber(prevEntry[1], time, lastTime - prevTime, currentTime - lastTime);\n\n                        addEntry(nextEntries, (delay + currentDuration * iterationCount) / playSpeed, divideTime);\n                    }\n                    break;\n                } else if (\n                    currentTime === lastTime\n                    && nextEntries.length\n                    && nextEntries[nextEntries.length - 1][0] === lastTime + delay\n                ) {\n                    break;\n                }\n                addEntry(nextEntries, (delay + currentTime) / playSpeed, time);\n            }\n        }\n        // delay time\n        delay && nextEntries.unshift([0, nextEntries[0][1]]);\n\n        entries = nextEntries;\n        nextEntries = [];\n    });\n\n    return entries;\n}\n/**\n* manage Frame Keyframes and play keyframes.\n* @extends Animator\n* @example\nconst item = new SceneItem({\n\t0: {\n\t\tdisplay: \"none\",\n\t},\n\t1: {\n\t\tdisplay: \"block\",\n\t\topacity: 0,\n\t},\n\t2: {\n\t\topacity: 1,\n\t}\n});\n*/\nclass SceneItem extends Animator<SceneItemOptions, SceneItemState, SceneItemEvents> {\n    public times: number[] = [];\n    public items: IObject<Frame> = {};\n    public nameMap = new OrderMap(NAME_SEPARATOR);\n    public elements: AnimateElement[] = [];\n    public styled: StyledInjector;\n    public styledInjector: InjectResult;\n    public temp: Frame;\n    private needUpdate: boolean = true;\n    private target: any;\n    private targetFunc: (frame: Frame) => void;\n\n    /**\n      * @param - properties\n      * @param - options\n      * @example\n      const item = new SceneItem({\n          0: {\n              display: \"none\",\n          },\n          1: {\n              display: \"block\",\n              opacity: 0,\n          },\n          2: {\n              opacity: 1,\n          }\n      });\n       */\n    constructor(properties?: any, options?: Partial<SceneItemOptions>) {\n        super();\n        this.load(properties, options);\n    }\n    public getDuration() {\n        const times = this.times;\n        const length = times.length;\n\n        return (length === 0 ? 0 : times[length - 1]) || this.state[DURATION];\n    }\n    /**\n      * get size of list\n      * @return {Number} length of list\n      */\n    public size() {\n        return this.times.length;\n    }\n    public setDuration(duration: number) {\n        if (!duration) {\n            return this;\n        }\n        const originalDuration = this.getDuration();\n\n        if (originalDuration > 0) {\n            const ratio = duration / originalDuration;\n            const { times, items } = this;\n            const obj: IObject<Frame> = {};\n\n            this.times = times.map(time => {\n                const time2 = toFixed(time * ratio);\n\n                obj[time2] = items[time];\n\n                return time2;\n            });\n            this.items = obj;\n        } else {\n            this.newFrame(duration);\n        }\n        return this;\n    }\n    public setId(id?: number | string) {\n        const state = this.state;\n        const elements = this.elements;\n        const length = elements.length;\n\n        state.id = id || makeId(!!length);\n\n        if (length && !state[SELECTOR]) {\n            const sceneId = toId(this.getId());\n\n            state[SELECTOR] = `[${DATA_SCENE_ID}=\"${sceneId}\"]`;\n            elements.forEach(element => {\n                element.setAttribute(DATA_SCENE_ID, sceneId);\n            });\n        }\n        return this;\n    }\n\n    /**\n      * Set properties to the sceneItem at that time\n      * @param {Number} time - time\n      * @param {...String|Object} [properties] - property names or values\n      * @return {SceneItem} An instance itself\n      * @example\n  item.set(0, \"a\", \"b\") // item.getFrame(0).set(\"a\", \"b\")\n  console.log(item.get(0, \"a\")); // \"b\"\n      */\n    public set(time: any, ...args: any[]) {\n        if (time instanceof SceneItem) {\n            return this.set(0, time);\n        } else if (isArray(time)) {\n            const length = time.length;\n\n            for (let i = 0; i < length; ++i) {\n                const t = length === 1 ? 0 : this.getUnitTime(`${i / (length - 1) * 100}%`);\n\n                this.set(t, time[i]);\n            }\n        } else if (isObject(time)) {\n            for (const t in time) {\n                const value = time[t];\n\n                splitComma(t).forEach(eachTime => {\n                    const realTime = this.getUnitTime(eachTime);\n\n                    if (isNaN(realTime)) {\n                        getNames(value, [eachTime]).forEach(names => {\n                            const innerValue = getValueByNames(names.slice(1), value);\n                            const arr = isArray(innerValue) ?\n                                innerValue : [getValueByNames(names, this.target), innerValue];\n                            const length = arr.length;\n\n                            for (let i = 0; i < length; ++i) {\n                                this.newFrame(`${i / (length - 1) * 100}%`).set(...names, arr[i]);\n                            }\n                        });\n                    } else {\n                        this.set(realTime, value);\n                    }\n                });\n            }\n        } else if (!isUndefined(time)) {\n            const value = args[0];\n\n            splitComma(time + \"\").forEach(eachTime => {\n                const realTime = this.getUnitTime(eachTime);\n\n                if (value instanceof SceneItem) {\n                    const delay = value.getDelay();\n                    const frames = value.toObject(!this.hasFrame(realTime + delay));\n                    const duration = value.getDuration();\n                    const direction = value.getDirection();\n                    const isReverse = direction.indexOf(\"reverse\") > -1;\n\n                    for (const frameTime in frames) {\n                        const nextTime = isReverse ? duration - parseFloat(frameTime) : parseFloat(frameTime);\n                        this.set(realTime + nextTime, frames[frameTime]);\n                    }\n                } else if (args.length === 1 && isArray(value)) {\n                    value.forEach((item: any) => {\n                        this.set(realTime, item);\n                    });\n                } else {\n                    const frame = this.newFrame(realTime);\n\n                    frame.set(...args);\n                }\n            });\n        }\n        this.needUpdate = true;\n        return this;\n    }\n    /**\n      * Get properties of the sceneItem at that time\n      * @param {Number} time - time\n      * @param {...String|Object} args property's name or properties\n      * @return {Number|String|PropertyObejct} property value\n      * @example\n  item.get(0, \"a\"); // item.getFrame(0).get(\"a\");\n  item.get(0, \"transform\", \"translate\"); // item.getFrame(0).get(\"transform\", \"translate\");\n      */\n    public get(time: string | number, ...args: NameType[]) {\n        const frame = this.getFrame(time);\n\n        return frame && frame.get(...args);\n    }\n    /**\n      * get properties orders\n      * @param - property names\n      * @example\n      item.getOrders([\"display\"]) // => []\n      item.getOrders([\"transform\"]) // => [\"translate\", \"scale\"]\n      */\n    public getOrders(names: NameType[]): NameType[] | undefined {\n        this.needUpdate && this.update();\n\n        return this.nameMap.get(names);\n    }\n    /**\n      * set properties orders\n      * @param - property names\n      * @param - orders\n      * @example\n      item.getOrders([\"transform\"]) // => [\"translate\", \"scale\"]\n      item.setOrders([\"transform\"], [\"scale\", \"tralsate\"])\n      */\n    public setOrders(names: NameType[], orders: NameType[]): NameType[] {\n        this.needUpdate && this.update();\n\n        const result = this.nameMap.set(names, orders);\n\n        this.updateFrameOrders();\n\n        return result;\n    }\n    /**\n      * get properties order object\n      * @example\n      console.log(item.getOrderObject());\n      */\n     public getOrderObject() {\n        return this.nameMap.getObject();\n    }\n    /**\n      * set properties orders object\n      * @param - properties orders object\n      * @example\n      item.setOrderObject({\n          \"\": [\"transform\"],\n          \"transform\": [\"scale\", \"tralsate\"],\n      });\n      */\n    public setOrderObject(obj: IObject<NameType[]>) {\n        this.nameMap.setObject(obj);\n\n        this.updateFrameOrders();\n    }\n    public remove(time: string | number, ...args: any[]): this;\n    /**\n      * remove properties to the sceneItem at that time\n      * @param {Number} time - time\n      * @param {...String|Object} [properties] - property names or values\n      * @return {SceneItem} An instance itself\n      * @example\n  item.remove(0, \"a\");\n      */\n    public remove(time: string | number, ...args: NameType[]) {\n        if (args.length) {\n            const frame = this.getFrame(time);\n\n            frame && frame.remove(...args);\n        } else {\n            this.removeFrame(time);\n        }\n        this.needUpdate = true;\n        return this;\n    }\n    /**\n      * Append the item or object at the last time.\n      * @param - the scene item or item object\n      * @return An instance itself\n      * @example\n  item.append(new SceneItem({\n      0: {\n          opacity: 0,\n      },\n      1: {\n          opacity: 1,\n      }\n  }));\n  item.append({\n      0: {\n          opacity: 0,\n      },\n      1: {\n          opacity: 1,\n      }\n  });\n  item.set(item.getDuration(), {\n      0: {\n          opacity: 0,\n      },\n      1: {\n          opacity: 1,\n      }\n  });\n      */\n    public append(item: SceneItem | IObject<any>) {\n        if (item instanceof SceneItem) {\n            this.set(this.getDuration(), item);\n        } else {\n            this.append(new SceneItem(item));\n        }\n        return this;\n    }\n    /**\n      * Push the front frames for the time and prepend the scene item or item object.\n      * @param - the scene item or item object\n      * @return An instance itself\n      */\n    public prepend(item: SceneItem | IObject<any>) {\n        if (item instanceof SceneItem) {\n            const unshiftTime = item.getDuration() + item.getDelay();\n            const firstFrame = this.getFrame(0);\n            // remove first frame\n            this.removeFrame(0);\n            this.unshift(unshiftTime);\n            this.set(0, item);\n            this.set(unshiftTime + THRESHOLD, firstFrame);\n        } else {\n            this.prepend(new SceneItem(item));\n        }\n        return this;\n    }\n    /**\n     * Push out the amount of time.\n     * @param - time to push\n     * @example\n   item.get(0); // frame 0\n   item.unshift(3);\n   item.get(3) // frame 0\n     */\n    public unshift(time: number) {\n        const { times, items } = this;\n        const obj: IObject<Frame> = {};\n\n        this.times = times.map(t => {\n            const time2 = toFixed(time + t);\n\n            obj[time2] = items[t];\n            return time2;\n        });\n        this.items = obj;\n        return this;\n    }\n    /**\n     * Get the frames in the item in object form.\n     * @return {}\n     * @example\n item.toObject();\n // {0: {display: \"none\"}, 1: {display: \"block\"}}\n     */\n    public toObject(isStartZero = true): IObject<Frame> {\n        const obj: IObject<Frame> = {};\n        const delay = this.getDelay();\n\n        this.forEach((frame: Frame, time: number) => {\n            obj[(!time && !isStartZero ? THRESHOLD : 0) + delay + time] = frame.clone();\n        });\n        return obj;\n    }\n    /**\n     * Specifies an element to synchronize items' keyframes.\n     * @param {string} selectors - Selectors to find elements in items.\n     * @return {SceneItem} An instance itself\n     * @example\nitem.setSelector(\"#id.class\");\n     */\n    public setSelector(target: string | boolean | ((id: number | string) => string)) {\n        if (isFunction(target)) {\n            this.setElement(target(this.getId()));\n        } else {\n            this.setElement(target);\n        }\n        return this;\n    }\n    /**\n     * Get the elements connected to SceneItem.\n     */\n    public getElements(): AnimateElement[] {\n        return this.elements;\n    }\n    /**\n     * Specifies an element to synchronize item's keyframes.\n     * @param - elements to synchronize item's keyframes.\n     * @param - Make sure that you have peusdo.\n     * @return {SceneItem} An instance itself\n     * @example\nitem.setElement(document.querySelector(\"#id.class\"));\nitem.setElement(document.querySelectorAll(\".class\"));\n     */\n    public setElements(target: boolean | string | AnimateElement | IArrayFormat<AnimateElement>): this {\n        return this.setElement(target);\n    }\n    /**\n     * Specifies an element to synchronize item's keyframes.\n     * @param - elements to synchronize item's keyframes.\n     * @param - Make sure that you have peusdo.\n     * @return {SceneItem} An instance itself\n     * @example\nitem.setElement(document.querySelector(\"#id.class\"));\nitem.setElement(document.querySelectorAll(\".class\"));\n     */\n    public setElement(target: boolean | string | AnimateElement | IArrayFormat<AnimateElement>) {\n        const state = this.state;\n        let elements: AnimateElement[] = [];\n\n        if (!target) {\n            return this;\n        } else if (target === true || isString(target)) {\n            const selector = target === true ? `${state.id}` : target;\n            const matches = /([\\s\\S]+)(:+[a-zA-Z]+)$/g.exec(selector);\n\n            elements = toArray($(matches ? matches[1] : selector, true));\n            state[SELECTOR] = selector;\n        } else {\n            elements = (target instanceof Element) ? [target] : toArray(target);\n        }\n        if (!elements.length) {\n            return this;\n        }\n        this.elements = elements;\n        this.setId(this.getId());\n        this.target = elements[0].style;\n        this.targetFunc = (frame: Frame) => {\n            const attributes = frame.get(\"attribute\");\n\n            if (attributes) {\n                for (const name in attributes) {\n                    elements.forEach(el => {\n                        el.setAttribute(name, attributes[name]);\n                    });\n                }\n            }\n            if (frame.has(\"html\")) {\n                const html = frame.get(\"html\");\n\n                elements.forEach(el => {\n                    el.innerHTML = html;\n                });\n            }\n            const cssText = frame.toCSS();\n\n            if (state.cssText !== cssText) {\n                state.cssText = cssText;\n\n                elements.forEach(el => {\n                    el.style.cssText += cssText;\n                });\n                return frame;\n            }\n        };\n        return this;\n    }\n    public setTarget(target: any): this {\n        this.target = target;\n        this.targetFunc = (frame: Frame) => {\n            const obj = frame.get();\n\n            for (const name in obj) {\n                target[name] = obj[name];\n            }\n        };\n        return this;\n    }\n    /**\n      * add css styles of items's element to the frame at that time.\n      * @param - Time to synchronize and set css\n      * @param - elements to synchronize item's keyframes.\n      * @return {SceneItem} An instance itself\n      * @example\n  item.setElement(document.querySelector(\"#id.class\"));\n  item.setCSS(0, [\"opacity\"]);\n  item.setCSS(0, [\"opacity\", \"width\", \"height\"]);\n      */\n    public setCSS(time: number, properties: string[] = []) {\n        this.set(time, fromCSS(this.elements, properties));\n        return this;\n    }\n    public setTime(time: number | string, isTick?: boolean, isParent?: boolean, parentEasing?: EasingType) {\n        super.setTime(time, isTick, isParent);\n\n        const iterationTime = this.getIterationTime();\n        const easing = this.getEasing() || parentEasing;\n        const frame = this.getNowFrame(iterationTime, easing);\n        const currentTime = this.getTime();\n\n        this.temp = frame;\n        /**\n         * This event is fired when timeupdate and animate.\n         * @event SceneItem#animate\n         * @param {Number} param.currentTime The total time that the animator is running.\n         * @param {Number} param.time The iteration time during duration that the animator is running.\n         * @param {Frame} param.frame frame of that time.\n         */\n        this.trigger(\"animate\", {\n            frame,\n            currentTime,\n            time: iterationTime,\n        });\n        this.targetFunc && this.targetFunc(frame);\n        return this;\n    }\n    /**\n      * update property names used in frames.\n      * @return {SceneItem} An instance itself\n      * @example\n  item.update();\n      */\n    public update() {\n        const prevNameMap = this.nameMap;\n        const names = {};\n        this.forEach(frame => {\n            updateFrame(names, frame.properties);\n        });\n\n        const nameMap = new OrderMap(NAME_SEPARATOR);\n\n        function pushKeys(map: IObject<any>, stack: NameType[]) {\n            const keys = getKeys(map);\n\n            sortOrders(keys, prevNameMap.get(stack));\n\n            nameMap.set(stack, keys);\n            keys.forEach(key => {\n                const nextMap = map[key];\n                if (isObject(nextMap)) {\n                    pushKeys(nextMap, [...stack, key]);\n                }\n            });\n        }\n        pushKeys(names, []);\n\n        this.nameMap = nameMap;\n\n        this.forEach(frame => {\n            frame.setOrderObject(nameMap.orderMap);\n        });\n        this.needUpdate = false;\n        return this;\n    }\n    /**\n      * Create and add a frame to the sceneItem at that time\n      * @param {Number} time - frame's time\n      * @return {Frame} Created frame.\n      * @example\n  item.newFrame(time);\n      */\n    public newFrame(time: string | number) {\n        let frame = this.getFrame(time);\n\n        if (frame) {\n            return frame;\n        }\n        frame = new Frame();\n\n        this.setFrame(time, frame);\n        return frame;\n    }\n    /**\n      * Add a frame to the sceneItem at that time\n      * @param {Number} time - frame's time\n      * @return {SceneItem} An instance itself\n      * @example\n  item.setFrame(time, frame);\n      */\n    public setFrame(time: string | number, frame: Frame) {\n        const realTime = this.getUnitTime(time);\n\n        this.items[realTime] = frame;\n        addTime(this.times, realTime);\n        this.needUpdate = true;\n        return this;\n    }\n    public getFrame(time: number | string, ...names: any[]): Frame;\n    /**\n      * get sceneItem's frame at that time\n      * @param {Number} time - frame's time\n      * @return {Frame} sceneItem's frame at that time\n      * @example\n  const frame = item.getFrame(time);\n      */\n    public getFrame(time: number | string) {\n        return this.items[this.getUnitTime(time)];\n    }\n    public removeFrame(time: number | string, ...names: any[]): this;\n    /**\n      * remove sceneItem's frame at that time\n      * @param - frame's time\n      * @return {SceneItem} An instance itself\n      * @example\n  item.removeFrame(time);\n      */\n    public removeFrame(time: number | string) {\n        const realTime = this.getUnitTime(time);\n        const items = this.items;\n        const index = this.times.indexOf(realTime);\n\n        delete items[realTime];\n\n        // remove time\n        if (index > -1) {\n            this.times.splice(index, 1);\n        }\n        this.needUpdate = true;\n        return this;\n    }\n    /**\n      * check if the item has a frame at that time\n      * @param {Number} time - frame's time\n      * @return {Boolean} true: the item has a frame // false: not\n      * @example\n  if (item.hasFrame(10)) {\n      // has\n  } else {\n      // not\n  }\n      */\n    public hasFrame(time: number | string) {\n        return this.getUnitTime(time) in this.items;\n    }\n    /**\n      * Check if keyframes has propery's name\n      * @param - property's time\n      * @return {boolean} true: if has property, false: not\n      * @example\n    item.hasName([\"transform\", \"translate\"]); // true or not\n      */\n    public hasName(args: string[]) {\n        this.needUpdate && this.update();\n        return !!this.nameMap.get(args);\n    }\n    /**\n      * merge frame of the previous time at the next time.\n    * @param - The time of the frame to merge\n    * @param - The target frame\n      * @return {SceneItem} An instance itself\n      * @example\n  // getFrame(1) contains getFrame(0)\n  item.merge(0, 1);\n      */\n    public mergeFrame(time: number | string, frame: Frame) {\n        if (frame) {\n            const toFrame = this.newFrame(time);\n\n            toFrame.merge(frame);\n        }\n        return this;\n    }\n    /**\n      * Get frame of the current time\n      * @param {Number} time - the current time\n      * @param {function} easing - the speed curve of an animation\n      * @return {Frame} frame of the current time\n      * @example\n  let item = new SceneItem({\n      0: {\n          display: \"none\",\n      },\n      1: {\n          display: \"block\",\n          opacity: 0,\n      },\n      2: {\n          opacity: 1,\n      }\n  });\n  // opacity: 0.7; display:\"block\";\n  const frame = item.getNowFrame(1.7);\n      */\n    public getNowFrame(time: number, easing?: EasingType, isAccurate?: boolean) {\n        this.needUpdate && this.update();\n        const frame = new Frame();\n        const [left, right] = getNearTimeIndex(this.times, time);\n        let realEasing = this.getEasing() || easing;\n        let nameMap = this.nameMap;\n\n        if (this.hasName([TIMING_FUNCTION])) {\n            const nowEasing = this.getNowValue(time, [TIMING_FUNCTION], left, right, false, 0, true);\n\n            isFunction(nowEasing) && (realEasing = nowEasing);\n        }\n        if (isAccurate) {\n            const prevFrame = this.getFrame(time);\n            const prevOrderMap = prevFrame.orderMap.filter([], orders => {\n                return prevFrame.has(...orders);\n            });\n\n            for (const name in ROLES) {\n                const orders = nameMap.get([name]);\n                if (prevOrderMap.get([name]) && orders) {\n                    prevOrderMap.set([name], orders);\n                }\n            }\n            nameMap = prevOrderMap;\n        }\n        const names = nameMap.gets([]);\n\n        frame.setOrderObject(nameMap.orderMap);\n        names.forEach(properties => {\n            const value = this.getNowValue(time, properties, left, right, isAccurate, realEasing, isFixed(properties));\n\n            if (isUndefined(value)) {\n                return;\n            }\n            frame.set(properties, value);\n        });\n        return frame;\n    }\n    public load(properties: any = {}, options = properties.options) {\n        options && this.setOptions(options);\n\n        if (isArray(properties)) {\n            this.set(properties);\n        } else if (properties.keyframes) {\n            this.set(properties.keyframes);\n        } else {\n            for (const time in properties) {\n                if (time !== \"options\") {\n                    this.set({\n                        [time]: properties[time],\n                    });\n                }\n            }\n        }\n        if (options && options[DURATION]) {\n            this.setDuration(options[DURATION]);\n        }\n        return this;\n    }\n    /**\n       * clone SceneItem.\n       * @return {SceneItem} An instance of clone\n       * @example\n       * item.clone();\n       */\n    public clone() {\n        const item = new SceneItem();\n\n        item.setOptions(this.state);\n        item.setOrderObject(this.nameMap.orderMap);\n\n        this.forEach((frame: Frame, time: number) => {\n            item.setFrame(time, frame.clone());\n        });\n        return item;\n    }\n    /**\n       * executes a provided function once for each scene item.\n       * @param - Function to execute for each element, taking three arguments\n       * @return {Keyframes} An instance itself\n       */\n    public forEach(callback: (item: Frame, time: number, items: IObject<Frame>) => void) {\n        const times = this.times;\n        const items = this.items;\n\n        times.forEach(time => {\n            callback(items[time], time, items);\n        });\n        return this;\n    }\n    public setOptions(options: Partial<SceneItemOptions> = {}) {\n        super.setOptions(options);\n        const { id, selector, elements, element, target } = options;\n\n        id && this.setId(id);\n        if (target) {\n            this.setTarget(target);\n        } else if (selector) {\n            this.setSelector(selector);\n        } else if (elements || element) {\n            this.setElement(elements || element);\n        }\n        return this;\n    }\n    public toCSS(\n        playCondition: PlayCondition = { className: START_ANIMATION },\n        parentDuration = this.getDuration(), states: AnimatorState[] = []) {\n        const itemState = this.state;\n        const selector = itemState[SELECTOR];\n\n        if (!selector) {\n            return \"\";\n        }\n        const originalDuration = this.getDuration();\n        itemState[DURATION] = originalDuration;\n        states.push(itemState);\n\n        const reversedStates = toArray(states).reverse();\n        const id = toId(getRealId(this));\n        const superParent = states[0];\n        const infiniteIndex = findIndex(reversedStates, state => {\n            return state[ITERATION_COUNT] === INFINITE || !isFinite(state[DURATION]);\n        }, states.length - 1);\n        const finiteStates = reversedStates.slice(0, infiniteIndex);\n        const duration = parentDuration || finiteStates.reduce((prev, cur) => {\n            return (cur[DELAY] + prev * (cur[ITERATION_COUNT] as number)) / cur[PLAY_SPEED];\n        }, originalDuration);\n        const delay = reversedStates.slice(infiniteIndex).reduce((prev, cur) => {\n            return (prev + cur[DELAY]) / cur[PLAY_SPEED];\n        }, 0);\n        const easingName = find(reversedStates, state => (state[EASING] && state[EASING_NAME]), itemState)[EASING_NAME];\n        const iterationCount = reversedStates[infiniteIndex][ITERATION_COUNT];\n        const fillMode = superParent[FILL_MODE];\n        const direction = reversedStates[infiniteIndex][DIRECTION];\n        const cssText = makeAnimationProperties({\n            fillMode,\n            direction,\n            iterationCount,\n            delay: `${delay}s`,\n            name: `${PREFIX}KEYFRAMES_${id}`,\n            duration: `${duration / superParent[PLAY_SPEED]}s`,\n            timingFunction: easingName,\n        });\n        const selectors = splitComma(selector).map(sel => {\n            const matches = /([\\s\\S]+)(:+[a-zA-Z]+)$/g.exec(sel);\n\n            if (matches) {\n                return [matches[1], matches[2]];\n            } else {\n                return [sel, \"\"];\n            }\n        });\n        const className = playCondition.className;\n        const selectorCallback = playCondition.selector;\n        const preselector = isFunction(selectorCallback) ? selectorCallback(this, selector) : selectorCallback;\n\n        return `\n    ${preselector || selectors.map(([sel, peusdo]) => `${sel}.${className}${peusdo}`)} {${cssText}}\n    ${selectors.map(([sel, peusdo]) => `${sel}.${PAUSE_ANIMATION}${peusdo}`)} {${ANIMATION}-play-state: paused;}\n    @${KEYFRAMES} ${PREFIX}KEYFRAMES_${id}{${this._toKeyframes(duration, finiteStates, direction)}}`;\n    }\n    /**\n     * Export the CSS of the items to the style.\n     * @param - Add a selector or className to play.\n     * @return {SceneItem} An instance itself\n     */\n    public exportCSS(\n        playCondition?: PlayCondition,\n        duration?: number, options?: AnimatorState[]) {\n        if (!this.elements.length) {\n            return \"\";\n        }\n        const css = this.toCSS(playCondition, duration, options);\n        const isParent = options && !isUndefined(options[ITERATION_COUNT]);\n\n        if (!isParent) {\n            if (this.styledInjector) {\n                this.styledInjector.destroy();\n                this.styledInjector = null;\n            }\n            this.styled = styled(css);\n            this.styledInjector = this.styled.inject(this.getAnimationElement(), { original: true });\n        }\n        return this;\n    }\n    public pause() {\n        super.pause();\n        isPausedCSS(this) && this.pauseCSS();\n        return this;\n    }\n    public pauseCSS() {\n        this.elements.forEach(element => {\n            addClass(element, PAUSE_ANIMATION);\n        });\n        return this;\n    }\n    public endCSS() {\n        this.elements.forEach(element => {\n            removeClass(element, PAUSE_ANIMATION);\n            removeClass(element, START_ANIMATION);\n        });\n        setPlayCSS(this, false);\n        return this;\n    }\n    public end() {\n        isEndedCSS(this) && this.endCSS();\n        super.end();\n        return this;\n    }\n    /**\n      * Play using the css animation and keyframes.\n      * @param - Check if you want to export css.\n      * @param [playClassName=\"startAnimation\"] - Add a class name to play.\n      * @param - The shorthand properties for six of the animation properties.\n      * @see {@link https://www.w3schools.com/cssref/css3_pr_animation.asp}\n      * @example\n  item.playCSS();\n  item.playCSS(false, \"startAnimation\", {\n      direction: \"reverse\",\n      fillMode: \"forwards\",\n  });\n      */\n    public playCSS(isExportCSS = true, playClassName?: string, properties: object = {}) {\n        playCSS(this, isExportCSS, playClassName, properties);\n        return this;\n    }\n    public getAnimationElement(): AnimateElement {\n        return this.elements[0];\n    }\n    public addPlayClass(isPaused: boolean, playClassName?: string, properties: object = {}) {\n        const elements = this.elements;\n        const length = elements.length;\n        const cssText = makeAnimationProperties(properties);\n\n        if (!length) {\n            return;\n        }\n        if (isPaused) {\n            elements.forEach(element => {\n                removeClass(element, PAUSE_ANIMATION);\n            });\n        } else {\n            elements.forEach(element => {\n                element.style.cssText += cssText;\n\n                if (hasClass(element, START_ANIMATION)) {\n                    removeClass(element, START_ANIMATION);\n                }\n            });\n            elements.forEach(element => {\n                element.clientWidth;\n            });\n            elements.forEach(element => {\n                addClass(element, START_ANIMATION);\n            });\n        }\n        return elements[0];\n    }\n    /**\n      * Clear All Frames\n      * @return {SceneItem} An instance itself\n      */\n    public clear() {\n        this.times = [];\n        this.items = {};\n        this.nameMap = new OrderMap(NAME_SEPARATOR);\n\n        if (this.styledInjector) {\n            this.styledInjector.destroy();\n        }\n        this.styled = null;\n        this.styledInjector = null;\n        this.temp = null;\n        this.needUpdate = true;\n        return this;\n    }\n    public getNowValue(\n        time: number,\n        properties: NameType[],\n        left?: number,\n        right?: number,\n        isAccurate?: boolean,\n        easing?: EasingType,\n        usePrevValue?: boolean,\n    ) {\n        const times = this.times;\n        const length = times.length;\n\n        let prevTime: number;\n        let nextTime: number;\n        let prevFrame: Frame;\n        let nextFrame: Frame;\n        const isUndefinedLeft = isUndefined(left);\n        const isUndefinedRight = isUndefined(right);\n        if (isUndefinedLeft || isUndefinedRight) {\n            const indicies = getNearTimeIndex(times, time);\n            isUndefinedLeft && (left = indicies[0]);\n            isUndefinedRight && (right = indicies[1]);\n        }\n\n        for (let i = left; i >= 0; --i) {\n            const frame = this.getFrame(times[i]);\n\n            if (frame.has(...properties)) {\n                prevTime = times[i];\n                prevFrame = frame;\n                break;\n            }\n        }\n        const prevValue = prevFrame && prevFrame.raw(...properties);\n\n        if (isAccurate && !isRole([properties[0]])) {\n            return prevTime === time ? prevValue : undefined;\n        }\n        if (usePrevValue) {\n            return prevValue;\n        }\n        for (let i = right; i < length; ++i) {\n            const frame = this.getFrame(times[i]);\n\n            if (frame.has(...properties)) {\n                nextTime = times[i];\n                nextFrame = frame;\n                break;\n            }\n        }\n        const nextValue = nextFrame && nextFrame.raw(...properties);\n\n        if (!prevFrame || isUndefined(prevValue)) {\n            return nextValue;\n        }\n        if (!nextFrame || isUndefined(nextValue) || prevValue === nextValue) {\n            return prevValue;\n        }\n        return dotValue(time, Math.max(prevTime, 0), nextTime, prevValue, nextValue, easing);\n    }\n    private _toKeyframes(duration: number, states: AnimatorState[], direction: DirectionType) {\n        const frames: IObject<string> = {};\n        const times = this.times.slice();\n\n        if (!times.length) {\n            return \"\";\n        }\n        const originalDuration = this.getDuration();\n        (!this.getFrame(0)) && times.unshift(0);\n        (!this.getFrame(originalDuration)) && times.push(originalDuration);\n        const entries = getEntries(times, states);\n        const lastEntry = entries[entries.length - 1];\n\n        // end delay time\n        lastEntry[0] < duration && addEntry(entries, duration, lastEntry[1]);\n        let prevTime = -1;\n\n        return entries.map(([time, keytime]) => {\n            if (!frames[keytime]) {\n                frames[keytime] =\n                    (!this.hasFrame(keytime) || keytime === 0 || keytime === originalDuration ?\n                        this.getNowFrame(keytime) : this.getNowFrame(keytime, 0, true)).toCSS();\n            }\n\n            let frameTime = time / duration * 100;\n\n            if (frameTime - prevTime < THRESHOLD) {\n                frameTime += THRESHOLD;\n            }\n            prevTime = frameTime;\n            return `${Math.min(frameTime, 100)}%{\n                ${time === 0 && !isDirectionReverse(0, 1, direction) ? \"\" : frames[keytime]}\n            }`;\n        }).join(\"\");\n    }\n    private updateFrameOrders() {\n        const nameMap = this.nameMap.orderMap;\n\n        this.forEach(frame => {\n            frame.setOrderObject(nameMap);\n        });\n    }\n}\n\nexport default SceneItem;\n","import Animator from \"./Animator\";\nimport SceneItem from \"./SceneItem\";\nimport { SELECTOR, DURATION, DELAY, RUNNING, NAME_SEPARATOR } from \"./consts\";\nimport { playCSS, getRealId, isPausedCSS, isEndedCSS, setPlayCSS } from \"./utils\";\nimport { isFunction, IS_WINDOW, IObject, $, IArrayFormat } from \"@daybrush/utils\";\nimport {\n    AnimateElement, SceneState, SceneOptions, EasingType,\n    AnimatorState, SceneItemOptions, PlayCondition, NameType, SceneEvents\n} from \"./types\";\nimport Frame from \"./Frame\";\nimport OrderMap from \"order-map\";\nimport styled, { InjectResult, StyledInjector } from \"css-styled\";\n/**\n * manage sceneItems and play Scene.\n * @extends Animator\n * @sort 1\n */\nclass Scene extends Animator<SceneOptions, SceneState, SceneEvents> {\n    /**\n    * version info\n    * @type {string}\n    * @example\n    * Scene.VERSION // #__VERSION__#\n    */\n    public static VERSION: string = \"#__VERSION__#\";\n    public items: IObject<Scene | SceneItem> = {};\n    public orderMap = new OrderMap(NAME_SEPARATOR);\n    public styled: StyledInjector;\n    public styledInjector: InjectResult;\n    public temp: IObject<Frame>;\n    /**\n    * @param - properties\n    * @param - options\n    * @example\n    const scene = new Scene({\n      item1: {\n        0: {\n          display: \"none\",\n        },\n        1: {\n          display: \"block\",\n          opacity: 0,\n        },\n        2: {\n          opacity: 1,\n        },\n      },\n      item2: {\n        2: {\n          opacity: 1,\n        },\n      }\n    });\n      */\n    constructor(properties?: { options?: Partial<SceneOptions> } & IObject<any>, options?: Partial<SceneOptions>) {\n        super();\n        this.load(properties, options);\n    }\n    public getDuration() {\n        let time = 0;\n\n        this.forEach(item => {\n            time = Math.max(time, item.getTotalDuration() / item.getPlaySpeed());\n        });\n        return time || this.state[DURATION];\n    }\n    public setDuration(duration: number) {\n        const items = this.items;\n        const sceneDuration = this.getDuration();\n\n        if (duration === 0 || !isFinite(sceneDuration)) {\n            return this;\n        }\n        if (sceneDuration === 0) {\n            this.forEach(item => {\n                item.setDuration(duration);\n            });\n        } else {\n            const ratio = duration / sceneDuration;\n\n            this.forEach(item => {\n                item.setDelay(item.getDelay() * ratio);\n                item.setDuration(item.getDuration() * ratio);\n            });\n        }\n        super.setDuration(duration);\n        return this;\n    }\n    public getItem<T extends (Scene | SceneItem) = Scene | SceneItem>(name: number | string): T;\n    /**\n    * get item in scene by name\n    * @param - The item's name\n    * @return {Scene | SceneItem} item\n    * @example\n    const item = scene.getItem(\"item1\")\n    */\n    public getItem(name: number | string) {\n        return this.items[name];\n    }\n    /**\n    * create item in scene\n    * @param {} name - name of item to create\n    * @param {} options - The option object of SceneItem\n    * @return {} Newly created item\n    * @example\n    const item = scene.newItem(\"item1\")\n    */\n    public newItem(name: number | string, options: Partial<SceneItemOptions> = {}): Scene | SceneItem {\n        if (this.items[name]) {\n            return this.items[name];\n        }\n        const item = new SceneItem();\n\n        this.setItem(name, item);\n        item.setOptions(options);\n\n        return item;\n    }\n    /**\n    * remove item in scene\n    * @param - name of item to remove\n    * @return  An instance itself\n    * @example\n    const item = scene.newItem(\"item1\")\n\n    scene.removeItem(\"item1\");\n    */\n    public removeItem(name: number | string): this {\n        delete this.items[name];\n\n        this.orderMap.remove([name]);\n        return this;\n    }\n    /**\n    * add a sceneItem to the scene\n    * @param - name of item to create\n    * @param - sceneItem\n    * @example\n    const item = scene.newItem(\"item1\")\n    */\n    public setItem(name: number | string, item: Scene | SceneItem) {\n        item.setId(name);\n        this.items[name] = item;\n\n        this.orderMap.add([name]);\n        return this;\n    }\n    public setTime(time: number | string, isTick?: boolean, isParent?: boolean, parentEasing?: EasingType) {\n        super.setTime(time, isTick, isParent);\n\n        const iterationTime = this.getIterationTime();\n        const easing = this.getEasing() || parentEasing;\n        const frames: IObject<any> = {};\n\n        this.forEach(item => {\n            item.setTime(iterationTime * item.getPlaySpeed() - item.getDelay(), isTick, true, easing);\n\n            frames[item.getId()] = item.temp;\n        });\n        this.temp = frames;\n\n        /**\n         * This event is fired when timeupdate and animate.\n         * @event Scene#animate\n         * @param {object} param The object of data to be sent to an event.\n         * @param {number} param.currentTime The total time that the animator is running.\n         * @param {number} param.time The iteration time during duration that the animator is running.\n         * @param {object} param.frames frames of that time.\n         * @example\nconst scene = new Scene({\n    a: {\n        0: {\n            opacity: 0,\n        },\n        1: {\n            opacity: 1,\n        }\n    },\n    b: {\n        0: {\n            opacity: 0,\n        },\n        1: {\n            opacity: 1,\n        }\n    }\n}).on(\"animate\", e => {\n    console.log(e.frames);\n    // {a: Frame, b: Frame}\n    console.log(e.frames.a.get(\"opacity\"));\n});\n             */\n        this.trigger(\"animate\", {\n            frames,\n            currentTime: this.getTime(),\n            time: iterationTime,\n        });\n\n        return this;\n    }\n    /**\n     * executes a provided function once for each scene item.\n     * @param - Function to execute for each element, taking three arguments\n     * @return {Scene} An instance itself\n     */\n    public forEach(\n        func: (\n            item: Scene | SceneItem,\n            id: string | number,\n            index: number,\n            items: IObject<Scene | SceneItem>,\n        ) => void,\n    ) {\n        const items = this.items;\n        this.getOrders().forEach((id, index) => {\n            func(items[id], id, index, items);\n        });\n        return this;\n    }\n    public toCSS(\n        playCondition?: PlayCondition,\n        duration: number = this.getDuration(), parentStates: AnimatorState[] = []) {\n        const totalDuration = !duration || !isFinite(duration) ? 0 : duration;\n        const styles: string[] = [];\n        const state = this.state;\n\n        state[DURATION] = this.getDuration();\n\n        this.forEach(item => {\n            styles.push(item.toCSS(playCondition, totalDuration, parentStates.concat(state)));\n        });\n        return styles.join(\"\");\n    }\n    /**\n     * Export the CSS of the items to the style.\n     * @param - Add a selector or className to play.\n     * @return {Scene} An instance itself\n     */\n    public exportCSS(\n        playCondition?: PlayCondition, duration?: number, parentStates?: AnimatorState[]) {\n        const css = this.toCSS(playCondition, duration, parentStates);\n\n        if (!parentStates || !parentStates.length) {\n            if (this.styledInjector) {\n                this.styledInjector.destroy();\n                this.styledInjector = null;\n            }\n            this.styled = styled(css);\n            this.styledInjector = this.styled.inject(this.getAnimationElement(), { original: true });\n            // && exportCSS(getRealId(this), css);\n        }\n        return this;\n    }\n    public append(item: SceneItem | Scene) {\n        item.setDelay(item.getDelay() + this.getDuration());\n        this.setItem(getRealId(item), item);\n    }\n    public pauseCSS() {\n        return this.forEach(item => {\n            item.pauseCSS();\n        });\n    }\n    public pause() {\n        super.pause();\n\n        isPausedCSS(this) && this.pauseCSS();\n        this.forEach(item => {\n            item.pause();\n        });\n        return this;\n    }\n    public endCSS() {\n        this.forEach(item => {\n            item.endCSS();\n        });\n        setPlayCSS(this, false);\n    }\n    public end() {\n        isEndedCSS(this) && this.endCSS();\n        super.end();\n        return this;\n    }\n        /**\n      * get item orders\n      * @example\n      scene.getOrders() // => [\"item1\", \"item2\"]\n      */\n     public getOrders(): NameType[] {\n        return this.orderMap.get([]) || [];\n    }\n    /**\n      * set item orders\n      * @param - orders\n      * @example\n      frame.setOrders([\"item2\", \"item1\"]) // => [\"item2\", \"item1\"]\n      */\n    public setOrders(orders: NameType[]): NameType[] {\n        return this.orderMap.set([], orders);\n    }\n    public getAnimationElement() {\n        let animtionElement: AnimateElement;\n\n        this.forEach(item => {\n            const el = item.getAnimationElement();\n\n            !animtionElement && (animtionElement = el);\n        });\n        return animtionElement;\n    }\n    public addPlayClass(isPaused: boolean, playClassName?: string, properties: object = {}) {\n        let animtionElement: AnimateElement;\n\n        this.forEach(item => {\n            const el = item.addPlayClass(isPaused, playClassName, properties);\n\n            !animtionElement && (animtionElement = el);\n        });\n        return animtionElement;\n    }\n    /**\n    * Play using the css animation and keyframes.\n    * @param - Check if you want to export css.\n    * @param [playClassName=\"startAnimation\"] - Add a class name to play.\n    * @param - The shorthand properties for six of the animation properties.\n    * @return {Scene} An instance itself\n    * @see {@link https://www.w3schools.com/cssref/css3_pr_animation.asp}\n    * @example\n    scene.playCSS();\n    scene.playCSS(false, {\n    direction: \"reverse\",\n    fillMode: \"forwards\",\n    });\n    */\n    public playCSS(isExportCSS = true, playClassName?: string, properties: Partial<AnimatorState> = {}) {\n        playCSS(this, isExportCSS, playClassName, properties);\n        return this;\n    }\n    public set(properties: any, ...args: any[]): this;\n    /**\n      * Set properties to the Scene.\n      * @param - properties\n      * @return An instance itself\n      * @example\nscene.set({\n    \".a\": {\n        0: {\n            opacity: 0,\n        },\n        1: {\n            opacity: 1,\n        },\n    },\n});\n// 0\nconsole.log(scene.getItem(\".a\").get(0, \"opacity\"));\n// 1\nconsole.log(scene.getItem(\".a\").get(1, \"opacity\"));\n      */\n    public set(properties: any) {\n        this.load(properties);\n        return this;\n    }\n    /**\n      * Clear All Items\n      * @return {Scene} An instance itself\n      */\n    public clear() {\n        this.finish();\n        this.items = {};\n        this.orderMap = new OrderMap(NAME_SEPARATOR);\n\n        if (this.styledInjector) {\n            this.styledInjector.destroy();\n        }\n        this.styled = null;\n        this.styledInjector = null;\n    }\n    public load(properties: any = {}, options = properties.options) {\n        if (!properties) {\n            return this;\n        }\n        const selector = options && options[SELECTOR] || this.state[SELECTOR];\n        for (const name in properties) {\n            if (name === \"options\") {\n                continue;\n            }\n            const object = properties[name];\n            let item;\n\n            if (object instanceof Scene || object instanceof SceneItem) {\n                this.setItem(name, object);\n                item = object;\n            } else if (isFunction(object) && selector) {\n                const elements =\n                    IS_WINDOW\n                        ? $(`${isFunction(selector) ? selector(name) : name}`, true) as IArrayFormat<AnimateElement>\n                        : ([] as AnimateElement[]);\n                const length = elements.length;\n                const scene = new Scene();\n\n                for (let i = 0; i < length; ++i) {\n                    (scene.newItem(i) as SceneItem).setId().setElement(elements[i]).load(object(i, elements[i]));\n                }\n                this.setItem(name, scene);\n                continue;\n            } else {\n                item = this.newItem(name);\n                item.load(object);\n            }\n            selector && item.setSelector(selector);\n        }\n        this.setOptions(options);\n    }\n    public setOptions(options: Partial<SceneState> = {}): this {\n        super.setOptions(options);\n\n        const selector = options.selector;\n\n        if (selector) {\n            this.state[SELECTOR] = selector;\n        }\n        return this;\n    }\n    public setSelector(target?: string | boolean | ((id: number | string) => string)) {\n        const state = this.state;\n        const selector = target || state[SELECTOR];\n\n        state[SELECTOR] = selector;\n        const isItFunction = isFunction(target);\n        if (selector) {\n            this.forEach((item, name) => {\n                item.setSelector(isItFunction ? (target as (id: number | string) => string)(name) : selector);\n            });\n        }\n        return this;\n    }\n    public start(delay: number = this.state[DELAY]): boolean {\n        const result = super.start(delay);\n\n        if (result) {\n            this.forEach(item => {\n                item.start(0);\n            });\n        } else {\n            this.forEach(item => {\n                item.setPlayState(RUNNING);\n            });\n        }\n        return result;\n    }\n}\n\nexport default Scene;\n","import { IObject } from \"@daybrush/utils\";\nimport Scene from \"./Scene\";\nimport SceneItem from \"./SceneItem\";\nimport { SceneOptions, SceneItemOptions } from \"./types\";\n\nexport function animate(properties?: IObject<any>, options?: Partial<SceneOptions>) {\n    return new Scene(properties, options).play();\n}\nexport function animateItem(properties?: IObject<any>, options?: Partial<SceneItemOptions>) {\n    return new SceneItem(properties, options).play();\n}\n","import Scene, * as others from \"./index\";\n\nfor (const name in others) {\n    (Scene as any)[name] = (others as any)[name];\n}\n\nexport default Scene;\n"],"names":["cubic","y1","y2","t","t2","bezier","x1","x2","func","x","dx","Math","abs","solveFromX","easingName","steps","count","position","time","level","floor","STEP_START","STEP_END","LINEAR","EASE","EASE_IN","EASE_OUT","EASE_IN_OUT","PREFIX","DATA_SCENE_ID","TIMING_FUNCTION","ROLES","transform","filter","attribute","html","ALIAS","easing","FIXED","_a","MAXIMUM","THRESHOLD","DURATION","FILL_MODE","DIRECTION","ITERATION_COUNT","DELAY","EASING","PLAY_SPEED","EASING_NAME","PAUSED","ENDED","TIMEUPDATE","PLAY","RUNNING","ITERATION","START_ANIMATION","PAUSE_ANIMATION","ALTERNATE","REVERSE","ALTERNATE_REVERSE","INFINITE","PLAY_STATE","PLAY_CSS","PREV_TIME","TICK_TIME","CURRENT_TIME","SELECTOR","TRANSFORM_NAME","EASINGS","NAME_SEPARATOR","OPTIONS","EVENTS","value","options","this","setOptions","isString","split","separator","newOptions","name","length","index","prefix","suffix","model","type","PropertyObject","map","v","clone","join","toValue","forEach","arrayToColorObject","arr","RGBA","arrayToPropertyObject","toPropertyObject","isArray","result","values","splitComma","exec","indexOf","text","splitBracket","afterModel","COLOR_MODELS","stringToRGBA","obj","stringToBracketObject","charAt","isPropertyObject","getType","OBJECT","ARRAY","PROPERTY","STRING","NUMBER","isPureObject","isObject","constructor","Object","getNames","names","stack","push","concat","pop","slice","toFixed","num","round","getValueByNames","properties","i","isInProperties","roles","args","isLast","role","isRole","isFixed","setPlayCSS","item","isActivate","state","isPausedCSS","isPaused","isEndedCSS","isEnded","makeId","selector","id","random","IS_WINDOW","$","getRealId","getId","setId","toId","match","playCSS","isExportCSS","playClassName","ANIMATION","getPlayState","className","addPlayClass","setTime","exportCSS","el","animationend","finish","animationstart","trigger","addEvent","animationiteration","duration","getDuration","isZeroDuration","isFinite","once","removeEvent","elapsedTime","iterationCount","setIteration","addAnimationEvent","setPlayState","getEasing","curveArray","parseFloat","isDirectionReverse","iteration","iteraiontCount","direction","setters","getters","_super","_this","delay","fillMode","playSpeed","currentTime","iterationTime","tickTime","prevTime","playState","__extends","getter","setter","parent","setDuration","setEasing","getActiveDuration","Infinity","getTime","toTime","timerId","requestAnimationFrame","tick","start","cancelAnimationFrame","end","pause","isTick","isParent","activeDuration","getUnitTime","calculate","isDelay","getIterationTime","splitUnit","unit","passIterationCount","maxIterationCount","currentIterationTime","setIterationTime","isReverse","isFiniteDuration","now","to","min","prototype","camelize","Animator","EventEmitter","toInnerProperties","orders","arrObj","keys","getKeys","sortOrders","replace","target","merge","from","FUNCTION","getValue","getPropertyName","OrderMap","set","_i","raw","orderMap","get","getObject","setObject","key","children","gets","params","remove","self","firstParam","Frame","_set","toObject","object","size","has","str","splitText","totalLength","matches","trim","styles","splitStyle","stylesLength","isUndefined","frame","setOrderObject","frameProperties","cssObject","FILTER","TRANSFORM","toCSSObject","cssArray","clear","lastParam","add","dotArray","a1","a2","b1","b2","v1","dot","dotObject","a1Type","color1","color2","value1","value2","model1","colorModel","parseInt","dotColor","type1","type2","isFunction1","isFunction2","v2","isNaN","dotNumber","getNearTimeIndex","times","makeAnimationProperties","decamelize","addEntry","entries","keytime","prevEntry","load","ratio_1","items_1","obj_1","originalDuration","time2","items","newFrame","sceneId_1","elements","element","setAttribute","value_1","SceneItem","eachTime","realTime","innerValue","getDelay","frames","hasFrame","getDirection","frameTime","nextTime","needUpdate","getFrame","update","nameMap","updateFrameOrders","removeFrame","append","unshiftTime","firstFrame","unshift","prepend","isStartZero","isFunction","setElement","toArray","Element","style","targetFunc","html_1","attributes","innerHTML","cssText","toCSS","fromCSS","parentEasing","getNowFrame","temp","prevNameMap","updateFrame","pushKeys","nextMap","setFrame","splice","addTime","isAccurate","nowEasing","left","right","realEasing","hasName","getNowValue","prevFrame_1","prevOrderMap","keyframes","callback","setTarget","setSelector","playCondition","parentDuration","states","itemState","reversedStates","reverse","superParent","infiniteIndex","findIndex","finiteStates","reduce","prev","cur","timingFunction","selectors","sel","selectorCallback","peusdo","KEYFRAMES","_toKeyframes","css","styledInjector","destroy","styled","inject","getAnimationElement","original","pauseCSS","addClass","removeClass","endCSS","clientWidth","usePrevValue","prevFrame","nextFrame","indicies","isUndefinedLeft","isUndefinedRight","prevValue","undefined","nextValue","ratio","dotValue","max","nextEntries","intCount","ceil","currentDuration","lastTime","j","divideTime","entry","lastEntry","getTotalDuration","getPlaySpeed","sceneDuration","setDelay","setItem","getOrders","parentStates","totalDuration","animtionElement","Scene","scene","newItem","isItFunction","isProperty","isFixedProperty","fixed","alias","play","others"],"mappings":";;;;;;;;mqJAGA,SAASA,EAAMC,EAAYC,EAAYC,OAC/BC,EAAK,EAAID,SAGRA,EAAIA,EAAIA,EAAI,EAAIA,EAAIA,EAAIC,EAAKF,EAAK,EAAIC,EAAIC,EAAKA,EAAKH,WAsC7CI,EAAOC,EAAYL,EAAYM,EAAYL,GAM5B,SAAvBM,EAAwBC,aACtBN,EA3CV,SAAoBG,EAAYC,EAAYE,WAGtCN,EAAIM,EAEJC,EAAK,EAEa,KAAfC,KAAKC,IAAIF,IAAgB,IAG9BA,EADSV,EAAMM,EAAIC,EAAIJ,GACTM,EAEVE,KAAKC,IAAIF,GAAM,YACVP,EAETA,GAAKO,EAAK,SAELP,EA0BKU,CAAWP,EAAIC,KAAYE,IAAG,IAAG,qC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