{"ast":null,"code":"import { Feature } from '../Feature.mjs';\nlet id = 0;\nclass ExitAnimationFeature extends Feature {\n  constructor() {\n    super(...arguments);\n    this.id = id++;\n  }\n  update() {\n    if (!this.node.presenceContext) return;\n    const {\n      isPresent,\n      onExitComplete,\n      custom\n    } = this.node.presenceContext;\n    const {\n      isPresent: prevIsPresent\n    } = this.node.prevPresenceContext || {};\n    if (!this.node.animationState || isPresent === prevIsPresent) {\n      return;\n    }\n    const exitAnimation = this.node.animationState.setActive(\"exit\", !isPresent, {\n      custom: custom !== null && custom !== void 0 ? custom : this.node.getProps().custom\n    });\n    if (onExitComplete && !isPresent) {\n      exitAnimation.then(() => onExitComplete(this.id));\n    }\n  }\n  mount() {\n    const {\n      register\n    } = this.node.presenceContext || {};\n    if (register) {\n      this.unmount = register(this.id);\n    }\n  }\n  unmount() {}\n}\nexport { ExitAnimationFeature };","map":{"version":3,"names":["Feature","id","ExitAnimationFeature","constructor","arguments","update","node","presenceContext","isPresent","onExitComplete","custom","prevIsPresent","prevPresenceContext","animationState","exitAnimation","setActive","getProps","then","mount","register","unmount"],"sources":["/opt/bitnami/minigames/frasle/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs"],"sourcesContent":["import { Feature } from '../Feature.mjs';\n\nlet id = 0;\nclass ExitAnimationFeature extends Feature {\n    constructor() {\n        super(...arguments);\n        this.id = id++;\n    }\n    update() {\n        if (!this.node.presenceContext)\n            return;\n        const { isPresent, onExitComplete, custom } = this.node.presenceContext;\n        const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {};\n        if (!this.node.animationState || isPresent === prevIsPresent) {\n            return;\n        }\n        const exitAnimation = this.node.animationState.setActive(\"exit\", !isPresent, { custom: custom !== null && custom !== void 0 ? custom : this.node.getProps().custom });\n        if (onExitComplete && !isPresent) {\n            exitAnimation.then(() => onExitComplete(this.id));\n        }\n    }\n    mount() {\n        const { register } = this.node.presenceContext || {};\n        if (register) {\n            this.unmount = register(this.id);\n        }\n    }\n    unmount() { }\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