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,EARQ,CAUpB,EACA,EAAM,KAAM,EAAI,SAAS,aAClB,CACT,CAiBA,OAlEA,EAAI,OAAO,WAAW,EAAQ,GAkD9B,EAAO,UAAU,SAAW,WAC1B,KAAK,WACP,EACA,EAAO,UAAU,WAAa,WAC5B,KAAK,WACP,EACA,EAAO,UAAU,OAAS,WACxB,IAAI,EAAK,KAAK,MACZ,EAAQ,EAAG,MACX,EAAY,EAAG,UACjB,OAAO,EAAI,SAAS,KAAK,QAAS,CAChC,IAAK,KAAK,IACV,MAAO,EACP,UAAW,GAEf,EACO,CACT,CApE0B,CAoExB,SAAS,WACP,SAAW,QAAQ,QAAU","file":"/npm/@antv/f-lottie@1.10.0/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@antv/f-lottie@1.10.0/lib/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\nvar _tslib = require(\"tslib\");\nvar _fEngine = require(\"@antv/f-engine\");\nvar _gLottiePlayer = require(\"@antv/g-lottie-player\");\nvar Lottie = /** @class */function (_super) {\n  (0, _tslib.__extends)(Lottie, _super);\n  function Lottie(props) {\n    var _this = _super.call(this, props) || this;\n    _this.addLottie = function () {\n      var _a = _this,\n        props = _a.props,\n        context = _a.context;\n      var data = props.data,\n        options = props.options,\n        play = props.play;\n      var canvas = context.canvas;\n      if (!data) return;\n      // 文档流后挂载lottie\n      canvas.ready.then(function () {\n        _this.animation = _this.animation ? _this.animation : (0, _gLottiePlayer.loadAnimation)(data, options);\n        _this.animation.render(_this.ref.current);\n        _this.size = _this.animation.size();\n        _this.updateSize();\n        // 播放控制\n        if (play) {\n          var _a = play.speed,\n            speed = _a === void 0 ? 1 : _a,\n            _b = play.start,\n            start = _b === void 0 ? 0 : _b,\n            _c = play.end,\n            end = _c === void 0 ? _this.animation.getDuration(true) : _c;\n          _this.animation.setSpeed(speed);\n          _this.animation.playSegments([start, end]);\n        }\n      });\n    };\n    _this.updateSize = function () {\n      var _a = _this.size,\n        currentWidth = _a.width,\n        currentHeight = _a.height;\n      var style = _this.props.style;\n      if (!style) return;\n      var _b = style.width,\n        width = _b === void 0 ? currentWidth : _b,\n        _c = style.height,\n        height = _c === void 0 ? currentHeight : _c;\n      _this.ref.current.scale(width / currentWidth, height / currentHeight);\n      _this.size = {\n        width: width,\n        height: height\n      };\n    };\n    _this.ref = (0, _fEngine.createRef)();\n    return _this;\n  }\n  Lottie.prototype.didMount = function () {\n    this.addLottie();\n  };\n  Lottie.prototype.willUpdate = function () {\n    this.addLottie();\n  };\n  Lottie.prototype.render = function () {\n    var _a = this.props,\n      style = _a.style,\n      animation = _a.animation;\n    return (0, _fEngine.jsx)(\"group\", {\n      ref: this.ref,\n      style: style,\n      animation: animation\n    });\n  };\n  return Lottie;\n}(_fEngine.Component);\nvar _default = exports.default = Lottie;"]}