From 046b5241a28a61c5cfbe251554c4f7075a4fe573 Mon Sep 17 00:00:00 2001 From: becarta Date: Fri, 16 May 2025 00:31:10 +0200 Subject: [PATCH] Refactor Vite server configuration by removing HMR host setting --- node_modules/.vite/_svelte_metadata.json | 1 + .../.vite/deps/@lottiefiles_lottie-player.js | 7420 +++++++++++++++++ .../deps/@lottiefiles_lottie-player.js.map | 7 + node_modules/.vite/deps/_metadata.json | 79 + node_modules/.vite/deps/chunk-2GBBIY5G.js | 9 + node_modules/.vite/deps/chunk-2GBBIY5G.js.map | 7 + node_modules/.vite/deps/chunk-76MXQKTF.js | 117 + node_modules/.vite/deps/chunk-76MXQKTF.js.map | 7 + node_modules/.vite/deps/chunk-ETWSND26.js | 144 + node_modules/.vite/deps/chunk-ETWSND26.js.map | 7 + node_modules/.vite/deps/chunk-TB4K45JM.js | 2848 +++++++ node_modules/.vite/deps/chunk-TB4K45JM.js.map | 7 + node_modules/.vite/deps/chunk-V6TY7KAL.js | 7 + node_modules/.vite/deps/chunk-V6TY7KAL.js.map | 7 + node_modules/.vite/deps/package.json | 3 + node_modules/.vite/deps/svelte.js | 30 + node_modules/.vite/deps/svelte.js.map | 7 + node_modules/.vite/deps/svelte_animate.js | 34 + node_modules/.vite/deps/svelte_animate.js.map | 7 + node_modules/.vite/deps/svelte_easing.js | 70 + node_modules/.vite/deps/svelte_easing.js.map | 7 + node_modules/.vite/deps/svelte_internal.js | 412 + .../.vite/deps/svelte_internal.js.map | 7 + .../deps/svelte_internal_disclose-version.js | 9 + .../svelte_internal_disclose-version.js.map | 7 + node_modules/.vite/deps/svelte_motion.js | 216 + node_modules/.vite/deps/svelte_motion.js.map | 7 + node_modules/.vite/deps/svelte_store.js | 18 + node_modules/.vite/deps/svelte_store.js.map | 7 + node_modules/.vite/deps/svelte_transition.js | 175 + .../.vite/deps/svelte_transition.js.map | 7 + vite.config.ts | 5 +- 32 files changed, 11691 insertions(+), 4 deletions(-) create mode 100644 node_modules/.vite/_svelte_metadata.json create mode 100644 node_modules/.vite/deps/@lottiefiles_lottie-player.js create mode 100644 node_modules/.vite/deps/@lottiefiles_lottie-player.js.map create mode 100644 node_modules/.vite/deps/_metadata.json create mode 100644 node_modules/.vite/deps/chunk-2GBBIY5G.js create mode 100644 node_modules/.vite/deps/chunk-2GBBIY5G.js.map create mode 100644 node_modules/.vite/deps/chunk-76MXQKTF.js create mode 100644 node_modules/.vite/deps/chunk-76MXQKTF.js.map create mode 100644 node_modules/.vite/deps/chunk-ETWSND26.js create mode 100644 node_modules/.vite/deps/chunk-ETWSND26.js.map create mode 100644 node_modules/.vite/deps/chunk-TB4K45JM.js create mode 100644 node_modules/.vite/deps/chunk-TB4K45JM.js.map create mode 100644 node_modules/.vite/deps/chunk-V6TY7KAL.js create mode 100644 node_modules/.vite/deps/chunk-V6TY7KAL.js.map create mode 100644 node_modules/.vite/deps/package.json create mode 100644 node_modules/.vite/deps/svelte.js create mode 100644 node_modules/.vite/deps/svelte.js.map create mode 100644 node_modules/.vite/deps/svelte_animate.js create mode 100644 node_modules/.vite/deps/svelte_animate.js.map create mode 100644 node_modules/.vite/deps/svelte_easing.js create mode 100644 node_modules/.vite/deps/svelte_easing.js.map create mode 100644 node_modules/.vite/deps/svelte_internal.js create mode 100644 node_modules/.vite/deps/svelte_internal.js.map create mode 100644 node_modules/.vite/deps/svelte_internal_disclose-version.js create mode 100644 node_modules/.vite/deps/svelte_internal_disclose-version.js.map create mode 100644 node_modules/.vite/deps/svelte_motion.js create mode 100644 node_modules/.vite/deps/svelte_motion.js.map create mode 100644 node_modules/.vite/deps/svelte_store.js create mode 100644 node_modules/.vite/deps/svelte_store.js.map create mode 100644 node_modules/.vite/deps/svelte_transition.js create mode 100644 node_modules/.vite/deps/svelte_transition.js.map diff --git a/node_modules/.vite/_svelte_metadata.json b/node_modules/.vite/_svelte_metadata.json new file mode 100644 index 00000000..8fbeddf2 --- /dev/null +++ b/node_modules/.vite/_svelte_metadata.json @@ -0,0 +1 @@ +{"compilerOptions":{"css":"injected","dev":true,"hmr":true,"enableSourcemap":true},"configFile":"/Users/richard/Website Development/tiber365/svelte.config.js","extensions":[".svelte"]} \ No newline at end of file diff --git a/node_modules/.vite/deps/@lottiefiles_lottie-player.js b/node_modules/.vite/deps/@lottiefiles_lottie-player.js new file mode 100644 index 00000000..53f06204 --- /dev/null +++ b/node_modules/.vite/deps/@lottiefiles_lottie-player.js @@ -0,0 +1,7420 @@ +import "./chunk-V6TY7KAL.js"; + +// node_modules/@lottiefiles/lottie-player/dist/lottie-player.esm.js +function _asyncIterator(t2) { + var e2, r2, i2, s2 = 2; + for ("undefined" != typeof Symbol && (r2 = Symbol.asyncIterator, i2 = Symbol.iterator); s2--; ) { + if (r2 && null != (e2 = t2[r2])) return e2.call(t2); + if (i2 && null != (e2 = t2[i2])) return new AsyncFromSyncIterator(e2.call(t2)); + r2 = "@@asyncIterator", i2 = "@@iterator"; + } + throw new TypeError("Object is not async iterable"); +} +function AsyncFromSyncIterator(t2) { + function e2(t3) { + if (Object(t3) !== t3) return Promise.reject(new TypeError(t3 + " is not an object.")); + var e3 = t3.done; + return Promise.resolve(t3.value).then(function(t4) { + return { value: t4, done: e3 }; + }); + } + return AsyncFromSyncIterator = function(t3) { + this.s = t3, this.n = t3.next; + }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function() { + return e2(this.n.apply(this.s, arguments)); + }, return: function(t3) { + var r2 = this.s.return; + return void 0 === r2 ? Promise.resolve({ value: t3, done: true }) : e2(r2.apply(this.s, arguments)); + }, throw: function(t3) { + var r2 = this.s.return; + return void 0 === r2 ? Promise.reject(t3) : e2(r2.apply(this.s, arguments)); + } }, new AsyncFromSyncIterator(t2); +} +var REACT_ELEMENT_TYPE; +function _jsx(t2, e2, r2, i2) { + REACT_ELEMENT_TYPE || (REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103); + var s2 = t2 && t2.defaultProps, a2 = arguments.length - 3; + if (e2 || 0 === a2 || (e2 = { children: void 0 }), 1 === a2) e2.children = i2; + else if (a2 > 1) { + for (var n2 = new Array(a2), o2 = 0; o2 < a2; o2++) n2[o2] = arguments[o2 + 3]; + e2.children = n2; + } + if (e2 && s2) for (var h2 in s2) void 0 === e2[h2] && (e2[h2] = s2[h2]); + else e2 || (e2 = s2 || {}); + return { $$typeof: REACT_ELEMENT_TYPE, type: t2, key: void 0 === r2 ? null : "" + r2, ref: null, props: e2, _owner: null }; +} +function ownKeys(t2, e2) { + var r2 = Object.keys(t2); + if (Object.getOwnPropertySymbols) { + var i2 = Object.getOwnPropertySymbols(t2); + e2 && (i2 = i2.filter(function(e3) { + return Object.getOwnPropertyDescriptor(t2, e3).enumerable; + })), r2.push.apply(r2, i2); + } + return r2; +} +function _objectSpread2(t2) { + for (var e2 = 1; e2 < arguments.length; e2++) { + var r2 = null != arguments[e2] ? arguments[e2] : {}; + e2 % 2 ? ownKeys(Object(r2), true).forEach(function(e3) { + _defineProperty(t2, e3, r2[e3]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t2, Object.getOwnPropertyDescriptors(r2)) : ownKeys(Object(r2)).forEach(function(e3) { + Object.defineProperty(t2, e3, Object.getOwnPropertyDescriptor(r2, e3)); + }); + } + return t2; +} +function _typeof2(t2) { + return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t3) { + return typeof t3; + } : function(t3) { + return t3 && "function" == typeof Symbol && t3.constructor === Symbol && t3 !== Symbol.prototype ? "symbol" : typeof t3; + }, _typeof2(t2); +} +function _wrapRegExp() { + _wrapRegExp = function(t3, e3) { + return new r2(t3, void 0, e3); + }; + var t2 = RegExp.prototype, e2 = /* @__PURE__ */ new WeakMap(); + function r2(t3, i3, s2) { + var a2 = new RegExp(t3, i3); + return e2.set(a2, s2 || e2.get(t3)), _setPrototypeOf(a2, r2.prototype); + } + function i2(t3, r3) { + var i3 = e2.get(r3); + return Object.keys(i3).reduce(function(e3, r4) { + return e3[r4] = t3[i3[r4]], e3; + }, /* @__PURE__ */ Object.create(null)); + } + return _inherits(r2, RegExp), r2.prototype.exec = function(e3) { + var r3 = t2.exec.call(this, e3); + return r3 && (r3.groups = i2(r3, this)), r3; + }, r2.prototype[Symbol.replace] = function(r3, s2) { + if ("string" == typeof s2) { + var a2 = e2.get(this); + return t2[Symbol.replace].call(this, r3, s2.replace(/\$<([^>]+)>/g, function(t3, e3) { + return "$" + a2[e3]; + })); + } + if ("function" == typeof s2) { + var n2 = this; + return t2[Symbol.replace].call(this, r3, function() { + var t3 = arguments; + return "object" != typeof t3[t3.length - 1] && (t3 = [].slice.call(t3)).push(i2(t3, n2)), s2.apply(this, t3); + }); + } + return t2[Symbol.replace].call(this, r3, s2); + }, _wrapRegExp.apply(this, arguments); +} +function _AwaitValue(t2) { + this.wrapped = t2; +} +function _AsyncGenerator(t2) { + var e2, r2; + function i2(e3, r3) { + try { + var a2 = t2[e3](r3), n2 = a2.value, o2 = n2 instanceof _AwaitValue; + Promise.resolve(o2 ? n2.wrapped : n2).then(function(t3) { + o2 ? i2("return" === e3 ? "return" : "next", t3) : s2(a2.done ? "return" : "normal", t3); + }, function(t3) { + i2("throw", t3); + }); + } catch (t3) { + s2("throw", t3); + } + } + function s2(t3, s3) { + switch (t3) { + case "return": + e2.resolve({ value: s3, done: true }); + break; + case "throw": + e2.reject(s3); + break; + default: + e2.resolve({ value: s3, done: false }); + } + (e2 = e2.next) ? i2(e2.key, e2.arg) : r2 = null; + } + this._invoke = function(t3, s3) { + return new Promise(function(a2, n2) { + var o2 = { key: t3, arg: s3, resolve: a2, reject: n2, next: null }; + r2 ? r2 = r2.next = o2 : (e2 = r2 = o2, i2(t3, s3)); + }); + }, "function" != typeof t2.return && (this.return = void 0); +} +function _wrapAsyncGenerator(t2) { + return function() { + return new _AsyncGenerator(t2.apply(this, arguments)); + }; +} +function _awaitAsyncGenerator(t2) { + return new _AwaitValue(t2); +} +function _asyncGeneratorDelegate(t2, e2) { + var r2 = {}, i2 = false; + function s2(r3, s3) { + return i2 = true, s3 = new Promise(function(e3) { + e3(t2[r3](s3)); + }), { done: false, value: e2(s3) }; + } + return r2["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function() { + return this; + }, r2.next = function(t3) { + return i2 ? (i2 = false, t3) : s2("next", t3); + }, "function" == typeof t2.throw && (r2.throw = function(t3) { + if (i2) throw i2 = false, t3; + return s2("throw", t3); + }), "function" == typeof t2.return && (r2.return = function(t3) { + return i2 ? (i2 = false, t3) : s2("return", t3); + }), r2; +} +function asyncGeneratorStep(t2, e2, r2, i2, s2, a2, n2) { + try { + var o2 = t2[a2](n2), h2 = o2.value; + } catch (t3) { + return void r2(t3); + } + o2.done ? e2(h2) : Promise.resolve(h2).then(i2, s2); +} +function _asyncToGenerator(t2) { + return function() { + var e2 = this, r2 = arguments; + return new Promise(function(i2, s2) { + var a2 = t2.apply(e2, r2); + function n2(t3) { + asyncGeneratorStep(a2, i2, s2, n2, o2, "next", t3); + } + function o2(t3) { + asyncGeneratorStep(a2, i2, s2, n2, o2, "throw", t3); + } + n2(void 0); + }); + }; +} +function _classCallCheck(t2, e2) { + if (!(t2 instanceof e2)) throw new TypeError("Cannot call a class as a function"); +} +function _defineProperties(t2, e2) { + for (var r2 = 0; r2 < e2.length; r2++) { + var i2 = e2[r2]; + i2.enumerable = i2.enumerable || false, i2.configurable = true, "value" in i2 && (i2.writable = true), Object.defineProperty(t2, i2.key, i2); + } +} +function _createClass(t2, e2, r2) { + return e2 && _defineProperties(t2.prototype, e2), r2 && _defineProperties(t2, r2), Object.defineProperty(t2, "prototype", { writable: false }), t2; +} +function _defineEnumerableProperties(t2, e2) { + for (var r2 in e2) { + (a2 = e2[r2]).configurable = a2.enumerable = true, "value" in a2 && (a2.writable = true), Object.defineProperty(t2, r2, a2); + } + if (Object.getOwnPropertySymbols) for (var i2 = Object.getOwnPropertySymbols(e2), s2 = 0; s2 < i2.length; s2++) { + var a2, n2 = i2[s2]; + (a2 = e2[n2]).configurable = a2.enumerable = true, "value" in a2 && (a2.writable = true), Object.defineProperty(t2, n2, a2); + } + return t2; +} +function _defaults(t2, e2) { + for (var r2 = Object.getOwnPropertyNames(e2), i2 = 0; i2 < r2.length; i2++) { + var s2 = r2[i2], a2 = Object.getOwnPropertyDescriptor(e2, s2); + a2 && a2.configurable && void 0 === t2[s2] && Object.defineProperty(t2, s2, a2); + } + return t2; +} +function _defineProperty(t2, e2, r2) { + return e2 in t2 ? Object.defineProperty(t2, e2, { value: r2, enumerable: true, configurable: true, writable: true }) : t2[e2] = r2, t2; +} +function _extends() { + return _extends = Object.assign || function(t2) { + for (var e2 = 1; e2 < arguments.length; e2++) { + var r2 = arguments[e2]; + for (var i2 in r2) Object.prototype.hasOwnProperty.call(r2, i2) && (t2[i2] = r2[i2]); + } + return t2; + }, _extends.apply(this, arguments); +} +function _objectSpread(t2) { + for (var e2 = 1; e2 < arguments.length; e2++) { + var r2 = null != arguments[e2] ? Object(arguments[e2]) : {}, i2 = Object.keys(r2); + "function" == typeof Object.getOwnPropertySymbols && i2.push.apply(i2, Object.getOwnPropertySymbols(r2).filter(function(t3) { + return Object.getOwnPropertyDescriptor(r2, t3).enumerable; + })), i2.forEach(function(e3) { + _defineProperty(t2, e3, r2[e3]); + }); + } + return t2; +} +function _inherits(t2, e2) { + if ("function" != typeof e2 && null !== e2) throw new TypeError("Super expression must either be null or a function"); + t2.prototype = Object.create(e2 && e2.prototype, { constructor: { value: t2, writable: true, configurable: true } }), Object.defineProperty(t2, "prototype", { writable: false }), e2 && _setPrototypeOf(t2, e2); +} +function _inheritsLoose(t2, e2) { + t2.prototype = Object.create(e2.prototype), t2.prototype.constructor = t2, _setPrototypeOf(t2, e2); +} +function _getPrototypeOf(t2) { + return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function(t3) { + return t3.__proto__ || Object.getPrototypeOf(t3); + }, _getPrototypeOf(t2); +} +function _setPrototypeOf(t2, e2) { + return _setPrototypeOf = Object.setPrototypeOf || function(t3, e3) { + return t3.__proto__ = e3, t3; + }, _setPrototypeOf(t2, e2); +} +function _isNativeReflectConstruct() { + if ("undefined" == typeof Reflect || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if ("function" == typeof Proxy) return true; + try { + return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { + })), true; + } catch (t2) { + return false; + } +} +function _construct(t2, e2, r2) { + return _construct = _isNativeReflectConstruct() ? Reflect.construct : function(t3, e3, r3) { + var i2 = [null]; + i2.push.apply(i2, e3); + var s2 = new (Function.bind.apply(t3, i2))(); + return r3 && _setPrototypeOf(s2, r3.prototype), s2; + }, _construct.apply(null, arguments); +} +function _isNativeFunction(t2) { + return -1 !== Function.toString.call(t2).indexOf("[native code]"); +} +function _wrapNativeSuper(t2) { + var e2 = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0; + return _wrapNativeSuper = function(t3) { + if (null === t3 || !_isNativeFunction(t3)) return t3; + if ("function" != typeof t3) throw new TypeError("Super expression must either be null or a function"); + if (void 0 !== e2) { + if (e2.has(t3)) return e2.get(t3); + e2.set(t3, r2); + } + function r2() { + return _construct(t3, arguments, _getPrototypeOf(this).constructor); + } + return r2.prototype = Object.create(t3.prototype, { constructor: { value: r2, enumerable: false, writable: true, configurable: true } }), _setPrototypeOf(r2, t3); + }, _wrapNativeSuper(t2); +} +function _instanceof(t2, e2) { + return null != e2 && "undefined" != typeof Symbol && e2[Symbol.hasInstance] ? !!e2[Symbol.hasInstance](t2) : t2 instanceof e2; +} +function _interopRequireDefault(t2) { + return t2 && t2.__esModule ? t2 : { default: t2 }; +} +function _getRequireWildcardCache(t2) { + if ("function" != typeof WeakMap) return null; + var e2 = /* @__PURE__ */ new WeakMap(), r2 = /* @__PURE__ */ new WeakMap(); + return (_getRequireWildcardCache = function(t3) { + return t3 ? r2 : e2; + })(t2); +} +function _interopRequireWildcard(t2, e2) { + if (!e2 && t2 && t2.__esModule) return t2; + if (null === t2 || "object" != typeof t2 && "function" != typeof t2) return { default: t2 }; + var r2 = _getRequireWildcardCache(e2); + if (r2 && r2.has(t2)) return r2.get(t2); + var i2 = {}, s2 = Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var a2 in t2) if ("default" !== a2 && Object.prototype.hasOwnProperty.call(t2, a2)) { + var n2 = s2 ? Object.getOwnPropertyDescriptor(t2, a2) : null; + n2 && (n2.get || n2.set) ? Object.defineProperty(i2, a2, n2) : i2[a2] = t2[a2]; + } + return i2.default = t2, r2 && r2.set(t2, i2), i2; +} +function _newArrowCheck(t2, e2) { + if (t2 !== e2) throw new TypeError("Cannot instantiate an arrow function"); +} +function _objectDestructuringEmpty(t2) { + if (null == t2) throw new TypeError("Cannot destructure undefined"); +} +function _objectWithoutPropertiesLoose(t2, e2) { + if (null == t2) return {}; + var r2, i2, s2 = {}, a2 = Object.keys(t2); + for (i2 = 0; i2 < a2.length; i2++) r2 = a2[i2], e2.indexOf(r2) >= 0 || (s2[r2] = t2[r2]); + return s2; +} +function _objectWithoutProperties(t2, e2) { + if (null == t2) return {}; + var r2, i2, s2 = _objectWithoutPropertiesLoose(t2, e2); + if (Object.getOwnPropertySymbols) { + var a2 = Object.getOwnPropertySymbols(t2); + for (i2 = 0; i2 < a2.length; i2++) r2 = a2[i2], e2.indexOf(r2) >= 0 || Object.prototype.propertyIsEnumerable.call(t2, r2) && (s2[r2] = t2[r2]); + } + return s2; +} +function _assertThisInitialized(t2) { + if (void 0 === t2) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return t2; +} +function _possibleConstructorReturn(t2, e2) { + if (e2 && ("object" == typeof e2 || "function" == typeof e2)) return e2; + if (void 0 !== e2) throw new TypeError("Derived constructors may only return object or undefined"); + return _assertThisInitialized(t2); +} +function _createSuper(t2) { + var e2 = _isNativeReflectConstruct(); + return function() { + var r2, i2 = _getPrototypeOf(t2); + if (e2) { + var s2 = _getPrototypeOf(this).constructor; + r2 = Reflect.construct(i2, arguments, s2); + } else r2 = i2.apply(this, arguments); + return _possibleConstructorReturn(this, r2); + }; +} +function _superPropBase(t2, e2) { + for (; !Object.prototype.hasOwnProperty.call(t2, e2) && null !== (t2 = _getPrototypeOf(t2)); ) ; + return t2; +} +function _get() { + return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get : function(t2, e2, r2) { + var i2 = _superPropBase(t2, e2); + if (i2) { + var s2 = Object.getOwnPropertyDescriptor(i2, e2); + return s2.get ? s2.get.call(arguments.length < 3 ? t2 : r2) : s2.value; + } + }, _get.apply(this, arguments); +} +function set(t2, e2, r2, i2) { + return set = "undefined" != typeof Reflect && Reflect.set ? Reflect.set : function(t3, e3, r3, i3) { + var s2, a2 = _superPropBase(t3, e3); + if (a2) { + if ((s2 = Object.getOwnPropertyDescriptor(a2, e3)).set) return s2.set.call(i3, r3), true; + if (!s2.writable) return false; + } + if (s2 = Object.getOwnPropertyDescriptor(i3, e3)) { + if (!s2.writable) return false; + s2.value = r3, Object.defineProperty(i3, e3, s2); + } else _defineProperty(i3, e3, r3); + return true; + }, set(t2, e2, r2, i2); +} +function _set(t2, e2, r2, i2, s2) { + if (!set(t2, e2, r2, i2 || t2) && s2) throw new Error("failed to set property"); + return r2; +} +function _taggedTemplateLiteral(t2, e2) { + return e2 || (e2 = t2.slice(0)), Object.freeze(Object.defineProperties(t2, { raw: { value: Object.freeze(e2) } })); +} +function _taggedTemplateLiteralLoose(t2, e2) { + return e2 || (e2 = t2.slice(0)), t2.raw = e2, t2; +} +function _readOnlyError(t2) { + throw new TypeError('"' + t2 + '" is read-only'); +} +function _writeOnlyError(t2) { + throw new TypeError('"' + t2 + '" is write-only'); +} +function _classNameTDZError(t2) { + throw new Error('Class "' + t2 + '" cannot be referenced in computed property keys.'); +} +function _temporalUndefined() { +} +function _tdz(t2) { + throw new ReferenceError(t2 + " is not defined - temporal dead zone"); +} +function _temporalRef(t2, e2) { + return t2 === _temporalUndefined ? _tdz(e2) : t2; +} +function _slicedToArray(t2, e2) { + return _arrayWithHoles(t2) || _iterableToArrayLimit(t2, e2) || _unsupportedIterableToArray(t2, e2) || _nonIterableRest(); +} +function _slicedToArrayLoose(t2, e2) { + return _arrayWithHoles(t2) || _iterableToArrayLimitLoose(t2, e2) || _unsupportedIterableToArray(t2, e2) || _nonIterableRest(); +} +function _toArray(t2) { + return _arrayWithHoles(t2) || _iterableToArray(t2) || _unsupportedIterableToArray(t2) || _nonIterableRest(); +} +function _toConsumableArray(t2) { + return _arrayWithoutHoles(t2) || _iterableToArray(t2) || _unsupportedIterableToArray(t2) || _nonIterableSpread(); +} +function _arrayWithoutHoles(t2) { + if (Array.isArray(t2)) return _arrayLikeToArray(t2); +} +function _arrayWithHoles(t2) { + if (Array.isArray(t2)) return t2; +} +function _maybeArrayLike(t2, e2, r2) { + if (e2 && !Array.isArray(e2) && "number" == typeof e2.length) { + var i2 = e2.length; + return _arrayLikeToArray(e2, void 0 !== r2 && r2 < i2 ? r2 : i2); + } + return t2(e2, r2); +} +function _iterableToArray(t2) { + if ("undefined" != typeof Symbol && null != t2[Symbol.iterator] || null != t2["@@iterator"]) return Array.from(t2); +} +function _iterableToArrayLimit(t2, e2) { + var r2 = null == t2 ? null : "undefined" != typeof Symbol && t2[Symbol.iterator] || t2["@@iterator"]; + if (null != r2) { + var i2, s2, a2 = [], n2 = true, o2 = false; + try { + for (r2 = r2.call(t2); !(n2 = (i2 = r2.next()).done) && (a2.push(i2.value), !e2 || a2.length !== e2); n2 = true) ; + } catch (t3) { + o2 = true, s2 = t3; + } finally { + try { + n2 || null == r2.return || r2.return(); + } finally { + if (o2) throw s2; + } + } + return a2; + } +} +function _iterableToArrayLimitLoose(t2, e2) { + var r2 = t2 && ("undefined" != typeof Symbol && t2[Symbol.iterator] || t2["@@iterator"]); + if (null != r2) { + var i2 = []; + for (r2 = r2.call(t2), _step; !(_step = r2.next()).done && (i2.push(_step.value), !e2 || i2.length !== e2); ) ; + return i2; + } +} +function _unsupportedIterableToArray(t2, e2) { + if (t2) { + if ("string" == typeof t2) return _arrayLikeToArray(t2, e2); + var r2 = Object.prototype.toString.call(t2).slice(8, -1); + return "Object" === r2 && t2.constructor && (r2 = t2.constructor.name), "Map" === r2 || "Set" === r2 ? Array.from(t2) : "Arguments" === r2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r2) ? _arrayLikeToArray(t2, e2) : void 0; + } +} +function _arrayLikeToArray(t2, e2) { + (null == e2 || e2 > t2.length) && (e2 = t2.length); + for (var r2 = 0, i2 = new Array(e2); r2 < e2; r2++) i2[r2] = t2[r2]; + return i2; +} +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _createForOfIteratorHelper(t2, e2) { + var r2 = "undefined" != typeof Symbol && t2[Symbol.iterator] || t2["@@iterator"]; + if (!r2) { + if (Array.isArray(t2) || (r2 = _unsupportedIterableToArray(t2)) || e2 && t2 && "number" == typeof t2.length) { + r2 && (t2 = r2); + var i2 = 0, s2 = function() { + }; + return { s: s2, n: function() { + return i2 >= t2.length ? { done: true } : { done: false, value: t2[i2++] }; + }, e: function(t3) { + throw t3; + }, f: s2 }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + var a2, n2 = true, o2 = false; + return { s: function() { + r2 = r2.call(t2); + }, n: function() { + var t3 = r2.next(); + return n2 = t3.done, t3; + }, e: function(t3) { + o2 = true, a2 = t3; + }, f: function() { + try { + n2 || null == r2.return || r2.return(); + } finally { + if (o2) throw a2; + } + } }; +} +function _createForOfIteratorHelperLoose(t2, e2) { + var r2 = "undefined" != typeof Symbol && t2[Symbol.iterator] || t2["@@iterator"]; + if (r2) return (r2 = r2.call(t2)).next.bind(r2); + if (Array.isArray(t2) || (r2 = _unsupportedIterableToArray(t2)) || e2 && t2 && "number" == typeof t2.length) { + r2 && (t2 = r2); + var i2 = 0; + return function() { + return i2 >= t2.length ? { done: true } : { done: false, value: t2[i2++] }; + }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _skipFirstGeneratorNext(t2) { + return function() { + var e2 = t2.apply(this, arguments); + return e2.next(), e2; + }; +} +function _toPrimitive(t2, e2) { + if ("object" != typeof t2 || null === t2) return t2; + var r2 = t2[Symbol.toPrimitive]; + if (void 0 !== r2) { + var i2 = r2.call(t2, e2 || "default"); + if ("object" != typeof i2) return i2; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === e2 ? String : Number)(t2); +} +function _toPropertyKey(t2) { + var e2 = _toPrimitive(t2, "string"); + return "symbol" == typeof e2 ? e2 : String(e2); +} +function _initializerWarningHelper(t2, e2) { + throw new Error("Decorating class property failed. Please ensure that proposal-class-properties is enabled and runs after the decorators transform."); +} +function _initializerDefineProperty(t2, e2, r2, i2) { + r2 && Object.defineProperty(t2, e2, { enumerable: r2.enumerable, configurable: r2.configurable, writable: r2.writable, value: r2.initializer ? r2.initializer.call(i2) : void 0 }); +} +function _applyDecoratedDescriptor(t2, e2, r2, i2, s2) { + var a2 = {}; + return Object.keys(i2).forEach(function(t3) { + a2[t3] = i2[t3]; + }), a2.enumerable = !!a2.enumerable, a2.configurable = !!a2.configurable, ("value" in a2 || a2.initializer) && (a2.writable = true), a2 = r2.slice().reverse().reduce(function(r3, i3) { + return i3(t2, e2, r3) || r3; + }, a2), s2 && void 0 !== a2.initializer && (a2.value = a2.initializer ? a2.initializer.call(s2) : void 0, a2.initializer = void 0), void 0 === a2.initializer && (Object.defineProperty(t2, e2, a2), a2 = null), a2; +} +_AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function() { + return this; +}, _AsyncGenerator.prototype.next = function(t2) { + return this._invoke("next", t2); +}, _AsyncGenerator.prototype.throw = function(t2) { + return this._invoke("throw", t2); +}, _AsyncGenerator.prototype.return = function(t2) { + return this._invoke("return", t2); +}; +var id = 0; +function _classPrivateFieldLooseKey(t2) { + return "__private_" + id++ + "_" + t2; +} +function _classPrivateFieldLooseBase(t2, e2) { + if (!Object.prototype.hasOwnProperty.call(t2, e2)) throw new TypeError("attempted to use private field on non-instance"); + return t2; +} +function _classPrivateFieldGet(t2, e2) { + return _classApplyDescriptorGet(t2, _classExtractFieldDescriptor(t2, e2, "get")); +} +function _classPrivateFieldSet(t2, e2, r2) { + return _classApplyDescriptorSet(t2, _classExtractFieldDescriptor(t2, e2, "set"), r2), r2; +} +function _classPrivateFieldDestructureSet(t2, e2) { + return _classApplyDescriptorDestructureSet(t2, _classExtractFieldDescriptor(t2, e2, "set")); +} +function _classExtractFieldDescriptor(t2, e2, r2) { + if (!e2.has(t2)) throw new TypeError("attempted to " + r2 + " private field on non-instance"); + return e2.get(t2); +} +function _classStaticPrivateFieldSpecGet(t2, e2, r2) { + return _classCheckPrivateStaticAccess(t2, e2), _classCheckPrivateStaticFieldDescriptor(r2, "get"), _classApplyDescriptorGet(t2, r2); +} +function _classStaticPrivateFieldSpecSet(t2, e2, r2, i2) { + return _classCheckPrivateStaticAccess(t2, e2), _classCheckPrivateStaticFieldDescriptor(r2, "set"), _classApplyDescriptorSet(t2, r2, i2), i2; +} +function _classStaticPrivateMethodGet(t2, e2, r2) { + return _classCheckPrivateStaticAccess(t2, e2), r2; +} +function _classStaticPrivateMethodSet() { + throw new TypeError("attempted to set read only static private field"); +} +function _classApplyDescriptorGet(t2, e2) { + return e2.get ? e2.get.call(t2) : e2.value; +} +function _classApplyDescriptorSet(t2, e2, r2) { + if (e2.set) e2.set.call(t2, r2); + else { + if (!e2.writable) throw new TypeError("attempted to set read only private field"); + e2.value = r2; + } +} +function _classApplyDescriptorDestructureSet(t2, e2) { + if (e2.set) return "__destrObj" in e2 || (e2.__destrObj = { set value(r2) { + e2.set.call(t2, r2); + } }), e2.__destrObj; + if (!e2.writable) throw new TypeError("attempted to set read only private field"); + return e2; +} +function _classStaticPrivateFieldDestructureSet(t2, e2, r2) { + return _classCheckPrivateStaticAccess(t2, e2), _classCheckPrivateStaticFieldDescriptor(r2, "set"), _classApplyDescriptorDestructureSet(t2, r2); +} +function _classCheckPrivateStaticAccess(t2, e2) { + if (t2 !== e2) throw new TypeError("Private static access of wrong provenance"); +} +function _classCheckPrivateStaticFieldDescriptor(t2, e2) { + if (void 0 === t2) throw new TypeError("attempted to " + e2 + " private static field before its declaration"); +} +function _decorate(t2, e2, r2, i2) { + var s2 = _getDecoratorsApi(); + if (i2) for (var a2 = 0; a2 < i2.length; a2++) s2 = i2[a2](s2); + var n2 = e2(function(t3) { + s2.initializeInstanceElements(t3, o2.elements); + }, r2), o2 = s2.decorateClass(_coalesceClassElements(n2.d.map(_createElementDescriptor)), t2); + return s2.initializeClassElements(n2.F, o2.elements), s2.runClassFinishers(n2.F, o2.finishers); +} +function _getDecoratorsApi() { + _getDecoratorsApi = function() { + return t2; + }; + var t2 = { elementsDefinitionOrder: [["method"], ["field"]], initializeInstanceElements: function(t3, e2) { + ["method", "field"].forEach(function(r2) { + e2.forEach(function(e3) { + e3.kind === r2 && "own" === e3.placement && this.defineClassElement(t3, e3); + }, this); + }, this); + }, initializeClassElements: function(t3, e2) { + var r2 = t3.prototype; + ["method", "field"].forEach(function(i2) { + e2.forEach(function(e3) { + var s2 = e3.placement; + if (e3.kind === i2 && ("static" === s2 || "prototype" === s2)) { + var a2 = "static" === s2 ? t3 : r2; + this.defineClassElement(a2, e3); + } + }, this); + }, this); + }, defineClassElement: function(t3, e2) { + var r2 = e2.descriptor; + if ("field" === e2.kind) { + var i2 = e2.initializer; + r2 = { enumerable: r2.enumerable, writable: r2.writable, configurable: r2.configurable, value: void 0 === i2 ? void 0 : i2.call(t3) }; + } + Object.defineProperty(t3, e2.key, r2); + }, decorateClass: function(t3, e2) { + var r2 = [], i2 = [], s2 = { static: [], prototype: [], own: [] }; + if (t3.forEach(function(t4) { + this.addElementPlacement(t4, s2); + }, this), t3.forEach(function(t4) { + if (!_hasDecorators(t4)) return r2.push(t4); + var e3 = this.decorateElement(t4, s2); + r2.push(e3.element), r2.push.apply(r2, e3.extras), i2.push.apply(i2, e3.finishers); + }, this), !e2) return { elements: r2, finishers: i2 }; + var a2 = this.decorateConstructor(r2, e2); + return i2.push.apply(i2, a2.finishers), a2.finishers = i2, a2; + }, addElementPlacement: function(t3, e2, r2) { + var i2 = e2[t3.placement]; + if (!r2 && -1 !== i2.indexOf(t3.key)) throw new TypeError("Duplicated element (" + t3.key + ")"); + i2.push(t3.key); + }, decorateElement: function(t3, e2) { + for (var r2 = [], i2 = [], s2 = t3.decorators, a2 = s2.length - 1; a2 >= 0; a2--) { + var n2 = e2[t3.placement]; + n2.splice(n2.indexOf(t3.key), 1); + var o2 = this.fromElementDescriptor(t3), h2 = this.toElementFinisherExtras((0, s2[a2])(o2) || o2); + t3 = h2.element, this.addElementPlacement(t3, e2), h2.finisher && i2.push(h2.finisher); + var l2 = h2.extras; + if (l2) { + for (var p2 = 0; p2 < l2.length; p2++) this.addElementPlacement(l2[p2], e2); + r2.push.apply(r2, l2); + } + } + return { element: t3, finishers: i2, extras: r2 }; + }, decorateConstructor: function(t3, e2) { + for (var r2 = [], i2 = e2.length - 1; i2 >= 0; i2--) { + var s2 = this.fromClassDescriptor(t3), a2 = this.toClassDescriptor((0, e2[i2])(s2) || s2); + if (void 0 !== a2.finisher && r2.push(a2.finisher), void 0 !== a2.elements) { + t3 = a2.elements; + for (var n2 = 0; n2 < t3.length - 1; n2++) for (var o2 = n2 + 1; o2 < t3.length; o2++) if (t3[n2].key === t3[o2].key && t3[n2].placement === t3[o2].placement) throw new TypeError("Duplicated element (" + t3[n2].key + ")"); + } + } + return { elements: t3, finishers: r2 }; + }, fromElementDescriptor: function(t3) { + var e2 = { kind: t3.kind, key: t3.key, placement: t3.placement, descriptor: t3.descriptor }; + return Object.defineProperty(e2, Symbol.toStringTag, { value: "Descriptor", configurable: true }), "field" === t3.kind && (e2.initializer = t3.initializer), e2; + }, toElementDescriptors: function(t3) { + if (void 0 !== t3) return _toArray(t3).map(function(t4) { + var e2 = this.toElementDescriptor(t4); + return this.disallowProperty(t4, "finisher", "An element descriptor"), this.disallowProperty(t4, "extras", "An element descriptor"), e2; + }, this); + }, toElementDescriptor: function(t3) { + var e2 = String(t3.kind); + if ("method" !== e2 && "field" !== e2) throw new TypeError(`An element descriptor's .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "` + e2 + '"'); + var r2 = _toPropertyKey(t3.key), i2 = String(t3.placement); + if ("static" !== i2 && "prototype" !== i2 && "own" !== i2) throw new TypeError(`An element descriptor's .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "` + i2 + '"'); + var s2 = t3.descriptor; + this.disallowProperty(t3, "elements", "An element descriptor"); + var a2 = { kind: e2, key: r2, placement: i2, descriptor: Object.assign({}, s2) }; + return "field" !== e2 ? this.disallowProperty(t3, "initializer", "A method descriptor") : (this.disallowProperty(s2, "get", "The property descriptor of a field descriptor"), this.disallowProperty(s2, "set", "The property descriptor of a field descriptor"), this.disallowProperty(s2, "value", "The property descriptor of a field descriptor"), a2.initializer = t3.initializer), a2; + }, toElementFinisherExtras: function(t3) { + return { element: this.toElementDescriptor(t3), finisher: _optionalCallableProperty(t3, "finisher"), extras: this.toElementDescriptors(t3.extras) }; + }, fromClassDescriptor: function(t3) { + var e2 = { kind: "class", elements: t3.map(this.fromElementDescriptor, this) }; + return Object.defineProperty(e2, Symbol.toStringTag, { value: "Descriptor", configurable: true }), e2; + }, toClassDescriptor: function(t3) { + var e2 = String(t3.kind); + if ("class" !== e2) throw new TypeError(`A class descriptor's .kind property must be "class", but a decorator created a class descriptor with .kind "` + e2 + '"'); + this.disallowProperty(t3, "key", "A class descriptor"), this.disallowProperty(t3, "placement", "A class descriptor"), this.disallowProperty(t3, "descriptor", "A class descriptor"), this.disallowProperty(t3, "initializer", "A class descriptor"), this.disallowProperty(t3, "extras", "A class descriptor"); + var r2 = _optionalCallableProperty(t3, "finisher"); + return { elements: this.toElementDescriptors(t3.elements), finisher: r2 }; + }, runClassFinishers: function(t3, e2) { + for (var r2 = 0; r2 < e2.length; r2++) { + var i2 = (0, e2[r2])(t3); + if (void 0 !== i2) { + if ("function" != typeof i2) throw new TypeError("Finishers must return a constructor."); + t3 = i2; + } + } + return t3; + }, disallowProperty: function(t3, e2, r2) { + if (void 0 !== t3[e2]) throw new TypeError(r2 + " can't have a ." + e2 + " property."); + } }; + return t2; +} +function _createElementDescriptor(t2) { + var e2, r2 = _toPropertyKey(t2.key); + "method" === t2.kind ? e2 = { value: t2.value, writable: true, configurable: true, enumerable: false } : "get" === t2.kind ? e2 = { get: t2.value, configurable: true, enumerable: false } : "set" === t2.kind ? e2 = { set: t2.value, configurable: true, enumerable: false } : "field" === t2.kind && (e2 = { configurable: true, writable: true, enumerable: true }); + var i2 = { kind: "field" === t2.kind ? "field" : "method", key: r2, placement: t2.static ? "static" : "field" === t2.kind ? "own" : "prototype", descriptor: e2 }; + return t2.decorators && (i2.decorators = t2.decorators), "field" === t2.kind && (i2.initializer = t2.value), i2; +} +function _coalesceGetterSetter(t2, e2) { + void 0 !== t2.descriptor.get ? e2.descriptor.get = t2.descriptor.get : e2.descriptor.set = t2.descriptor.set; +} +function _coalesceClassElements(t2) { + for (var e2 = [], r2 = function(t3) { + return "method" === t3.kind && t3.key === a2.key && t3.placement === a2.placement; + }, i2 = 0; i2 < t2.length; i2++) { + var s2, a2 = t2[i2]; + if ("method" === a2.kind && (s2 = e2.find(r2))) if (_isDataDescriptor(a2.descriptor) || _isDataDescriptor(s2.descriptor)) { + if (_hasDecorators(a2) || _hasDecorators(s2)) throw new ReferenceError("Duplicated methods (" + a2.key + ") can't be decorated."); + s2.descriptor = a2.descriptor; + } else { + if (_hasDecorators(a2)) { + if (_hasDecorators(s2)) throw new ReferenceError("Decorators can't be placed on different accessors with for the same property (" + a2.key + ")."); + s2.decorators = a2.decorators; + } + _coalesceGetterSetter(a2, s2); + } + else e2.push(a2); + } + return e2; +} +function _hasDecorators(t2) { + return t2.decorators && t2.decorators.length; +} +function _isDataDescriptor(t2) { + return void 0 !== t2 && !(void 0 === t2.value && void 0 === t2.writable); +} +function _optionalCallableProperty(t2, e2) { + var r2 = t2[e2]; + if (void 0 !== r2 && "function" != typeof r2) throw new TypeError("Expected '" + e2 + "' to be a function"); + return r2; +} +function _classPrivateMethodGet(t2, e2, r2) { + if (!e2.has(t2)) throw new TypeError("attempted to get private field on non-instance"); + return r2; +} +function _checkPrivateRedeclaration(t2, e2) { + if (e2.has(t2)) throw new TypeError("Cannot initialize the same private elements twice on an object"); +} +function _classPrivateFieldInitSpec(t2, e2, r2) { + _checkPrivateRedeclaration(t2, e2), e2.set(t2, r2); +} +function _classPrivateMethodInitSpec(t2, e2) { + _checkPrivateRedeclaration(t2, e2), e2.add(t2); +} +function _classPrivateMethodSet() { + throw new TypeError("attempted to reassign private method"); +} +var _extendStatics = function(t2, e2) { + return _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t3, e3) { + t3.__proto__ = e3; + } || function(t3, e3) { + for (var r2 in e3) Object.prototype.hasOwnProperty.call(e3, r2) && (t3[r2] = e3[r2]); + }, _extendStatics(t2, e2); +}; +function __extends(t2, e2) { + if ("function" != typeof e2 && null !== e2) throw new TypeError("Class extends value " + String(e2) + " is not a constructor or null"); + function r2() { + this.constructor = t2; + } + _extendStatics(t2, e2), t2.prototype = null === e2 ? Object.create(e2) : (r2.prototype = e2.prototype, new r2()); +} +var _assign = function() { + return _assign = Object.assign || function(t2) { + for (var e2, r2 = 1, i2 = arguments.length; r2 < i2; r2++) for (var s2 in e2 = arguments[r2]) Object.prototype.hasOwnProperty.call(e2, s2) && (t2[s2] = e2[s2]); + return t2; + }, _assign.apply(this, arguments); +}; +function __rest(t2, e2) { + var r2 = {}; + for (var i2 in t2) Object.prototype.hasOwnProperty.call(t2, i2) && e2.indexOf(i2) < 0 && (r2[i2] = t2[i2]); + if (null != t2 && "function" == typeof Object.getOwnPropertySymbols) { + var s2 = 0; + for (i2 = Object.getOwnPropertySymbols(t2); s2 < i2.length; s2++) e2.indexOf(i2[s2]) < 0 && Object.prototype.propertyIsEnumerable.call(t2, i2[s2]) && (r2[i2[s2]] = t2[i2[s2]]); + } + return r2; +} +function __decorate(t2, e2, r2, i2) { + var s2, a2 = arguments.length, n2 = a2 < 3 ? e2 : null === i2 ? i2 = Object.getOwnPropertyDescriptor(e2, r2) : i2; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n2 = Reflect.decorate(t2, e2, r2, i2); + else for (var o2 = t2.length - 1; o2 >= 0; o2--) (s2 = t2[o2]) && (n2 = (a2 < 3 ? s2(n2) : a2 > 3 ? s2(e2, r2, n2) : s2(e2, r2)) || n2); + return a2 > 3 && n2 && Object.defineProperty(e2, r2, n2), n2; +} +function __param(t2, e2) { + return function(r2, i2) { + e2(r2, i2, t2); + }; +} +function __metadata(t2, e2) { + if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(t2, e2); +} +function __awaiter(t2, e2, r2, i2) { + return new (r2 || (r2 = Promise))(function(s2, a2) { + function n2(t3) { + try { + h2(i2.next(t3)); + } catch (t4) { + a2(t4); + } + } + function o2(t3) { + try { + h2(i2.throw(t3)); + } catch (t4) { + a2(t4); + } + } + function h2(t3) { + var e3; + t3.done ? s2(t3.value) : (e3 = t3.value, e3 instanceof r2 ? e3 : new r2(function(t4) { + t4(e3); + })).then(n2, o2); + } + h2((i2 = i2.apply(t2, e2 || [])).next()); + }); +} +function __generator(t2, e2) { + var r2, i2, s2, a2, n2 = { label: 0, sent: function() { + if (1 & s2[0]) throw s2[1]; + return s2[1]; + }, trys: [], ops: [] }; + return a2 = { next: o2(0), throw: o2(1), return: o2(2) }, "function" == typeof Symbol && (a2[Symbol.iterator] = function() { + return this; + }), a2; + function o2(a3) { + return function(o3) { + return function(a4) { + if (r2) throw new TypeError("Generator is already executing."); + for (; n2; ) try { + if (r2 = 1, i2 && (s2 = 2 & a4[0] ? i2.return : a4[0] ? i2.throw || ((s2 = i2.return) && s2.call(i2), 0) : i2.next) && !(s2 = s2.call(i2, a4[1])).done) return s2; + switch (i2 = 0, s2 && (a4 = [2 & a4[0], s2.value]), a4[0]) { + case 0: + case 1: + s2 = a4; + break; + case 4: + return n2.label++, { value: a4[1], done: false }; + case 5: + n2.label++, i2 = a4[1], a4 = [0]; + continue; + case 7: + a4 = n2.ops.pop(), n2.trys.pop(); + continue; + default: + if (!(s2 = n2.trys, (s2 = s2.length > 0 && s2[s2.length - 1]) || 6 !== a4[0] && 2 !== a4[0])) { + n2 = 0; + continue; + } + if (3 === a4[0] && (!s2 || a4[1] > s2[0] && a4[1] < s2[3])) { + n2.label = a4[1]; + break; + } + if (6 === a4[0] && n2.label < s2[1]) { + n2.label = s2[1], s2 = a4; + break; + } + if (s2 && n2.label < s2[2]) { + n2.label = s2[2], n2.ops.push(a4); + break; + } + s2[2] && n2.ops.pop(), n2.trys.pop(); + continue; + } + a4 = e2.call(t2, n2); + } catch (t3) { + a4 = [6, t3], i2 = 0; + } finally { + r2 = s2 = 0; + } + if (5 & a4[0]) throw a4[1]; + return { value: a4[0] ? a4[1] : void 0, done: true }; + }([a3, o3]); + }; + } +} +var __createBinding = Object.create ? function(t2, e2, r2, i2) { + void 0 === i2 && (i2 = r2), Object.defineProperty(t2, i2, { enumerable: true, get: function() { + return e2[r2]; + } }); +} : function(t2, e2, r2, i2) { + void 0 === i2 && (i2 = r2), t2[i2] = e2[r2]; +}; +function __exportStar(t2, e2) { + for (var r2 in t2) "default" === r2 || Object.prototype.hasOwnProperty.call(e2, r2) || __createBinding(e2, t2, r2); +} +function __values(t2) { + var e2 = "function" == typeof Symbol && Symbol.iterator, r2 = e2 && t2[e2], i2 = 0; + if (r2) return r2.call(t2); + if (t2 && "number" == typeof t2.length) return { next: function() { + return t2 && i2 >= t2.length && (t2 = void 0), { value: t2 && t2[i2++], done: !t2 }; + } }; + throw new TypeError(e2 ? "Object is not iterable." : "Symbol.iterator is not defined."); +} +function __read(t2, e2) { + var r2 = "function" == typeof Symbol && t2[Symbol.iterator]; + if (!r2) return t2; + var i2, s2, a2 = r2.call(t2), n2 = []; + try { + for (; (void 0 === e2 || e2-- > 0) && !(i2 = a2.next()).done; ) n2.push(i2.value); + } catch (t3) { + s2 = { error: t3 }; + } finally { + try { + i2 && !i2.done && (r2 = a2.return) && r2.call(a2); + } finally { + if (s2) throw s2.error; + } + } + return n2; +} +function __spread() { + for (var t2 = [], e2 = 0; e2 < arguments.length; e2++) t2 = t2.concat(__read(arguments[e2])); + return t2; +} +function __spreadArrays() { + for (var t2 = 0, e2 = 0, r2 = arguments.length; e2 < r2; e2++) t2 += arguments[e2].length; + var i2 = Array(t2), s2 = 0; + for (e2 = 0; e2 < r2; e2++) for (var a2 = arguments[e2], n2 = 0, o2 = a2.length; n2 < o2; n2++, s2++) i2[s2] = a2[n2]; + return i2; +} +function __spreadArray(t2, e2, r2) { + if (r2 || 2 === arguments.length) for (var i2, s2 = 0, a2 = e2.length; s2 < a2; s2++) !i2 && s2 in e2 || (i2 || (i2 = Array.prototype.slice.call(e2, 0, s2)), i2[s2] = e2[s2]); + return t2.concat(i2 || Array.prototype.slice.call(e2)); +} +function __await(t2) { + return this instanceof __await ? (this.v = t2, this) : new __await(t2); +} +function __asyncGenerator(t2, e2, r2) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var i2, s2 = r2.apply(t2, e2 || []), a2 = []; + return i2 = {}, n2("next"), n2("throw"), n2("return"), i2[Symbol.asyncIterator] = function() { + return this; + }, i2; + function n2(t3) { + s2[t3] && (i2[t3] = function(e3) { + return new Promise(function(r3, i3) { + a2.push([t3, e3, r3, i3]) > 1 || o2(t3, e3); + }); + }); + } + function o2(t3, e3) { + try { + !function(t4) { + t4.value instanceof __await ? Promise.resolve(t4.value.v).then(h2, l2) : p2(a2[0][2], t4); + }(s2[t3](e3)); + } catch (t4) { + p2(a2[0][3], t4); + } + } + function h2(t3) { + o2("next", t3); + } + function l2(t3) { + o2("throw", t3); + } + function p2(t3, e3) { + t3(e3), a2.shift(), a2.length && o2(a2[0][0], a2[0][1]); + } +} +function __asyncDelegator(t2) { + var e2, r2; + return e2 = {}, i2("next"), i2("throw", function(t3) { + throw t3; + }), i2("return"), e2[Symbol.iterator] = function() { + return this; + }, e2; + function i2(i3, s2) { + e2[i3] = t2[i3] ? function(e3) { + return (r2 = !r2) ? { value: __await(t2[i3](e3)), done: "return" === i3 } : s2 ? s2(e3) : e3; + } : s2; + } +} +function __asyncValues(t2) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var e2, r2 = t2[Symbol.asyncIterator]; + return r2 ? r2.call(t2) : (t2 = "function" == typeof __values ? __values(t2) : t2[Symbol.iterator](), e2 = {}, i2("next"), i2("throw"), i2("return"), e2[Symbol.asyncIterator] = function() { + return this; + }, e2); + function i2(r3) { + e2[r3] = t2[r3] && function(e3) { + return new Promise(function(i3, s2) { + (function(t3, e4, r4, i4) { + Promise.resolve(i4).then(function(e5) { + t3({ value: e5, done: r4 }); + }, e4); + })(i3, s2, (e3 = t2[r3](e3)).done, e3.value); + }); + }; + } +} +function __makeTemplateObject(t2, e2) { + return Object.defineProperty ? Object.defineProperty(t2, "raw", { value: e2 }) : t2.raw = e2, t2; +} +var __setModuleDefault = Object.create ? function(t2, e2) { + Object.defineProperty(t2, "default", { enumerable: true, value: e2 }); +} : function(t2, e2) { + t2.default = e2; +}; +function __importStar(t2) { + if (t2 && t2.__esModule) return t2; + var e2 = {}; + if (null != t2) for (var r2 in t2) "default" !== r2 && Object.prototype.hasOwnProperty.call(t2, r2) && __createBinding(e2, t2, r2); + return __setModuleDefault(e2, t2), e2; +} +function __importDefault(t2) { + return t2 && t2.__esModule ? t2 : { default: t2 }; +} +function __classPrivateFieldGet(t2, e2, r2, i2) { + if ("a" === r2 && !i2) throw new TypeError("Private accessor was defined without a getter"); + if ("function" == typeof e2 ? t2 !== e2 || !i2 : !e2.has(t2)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return "m" === r2 ? i2 : "a" === r2 ? i2.call(t2) : i2 ? i2.value : e2.get(t2); +} +function __classPrivateFieldSet(t2, e2, r2, i2, s2) { + if ("m" === i2) throw new TypeError("Private method is not writable"); + if ("a" === i2 && !s2) throw new TypeError("Private accessor was defined without a setter"); + if ("function" == typeof e2 ? t2 !== e2 || !s2 : !e2.has(t2)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return "a" === i2 ? s2.call(t2, r2) : s2 ? s2.value = r2 : e2.set(t2, r2), r2; +} +var t$3 = window.ShadowRoot && (void 0 === window.ShadyCSS || window.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype; +var e$8 = Symbol(); +var n$5 = /* @__PURE__ */ new Map(); +var s$3 = class { + constructor(t2, e2) { + if (this._$cssResult$ = true, e2 !== e$8) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); + this.cssText = t2; + } + get styleSheet() { + var t2 = n$5.get(this.cssText); + return t$3 && void 0 === t2 && (n$5.set(this.cssText, t2 = new CSSStyleSheet()), t2.replaceSync(this.cssText)), t2; + } + toString() { + return this.cssText; + } +}; +var o$5 = (t2) => new s$3("string" == typeof t2 ? t2 : t2 + "", e$8); +var r$3 = function(t2) { + for (var e2 = arguments.length, r2 = new Array(e2 > 1 ? e2 - 1 : 0), i2 = 1; i2 < e2; i2++) r2[i2 - 1] = arguments[i2]; + var s2 = 1 === t2.length ? t2[0] : r2.reduce((e3, r3, i3) => e3 + ((t3) => { + if (true === t3._$cssResult$) return t3.cssText; + if ("number" == typeof t3) return t3; + throw Error("Value passed to 'css' function must be a 'css' function result: " + t3 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); + })(r3) + t2[i3 + 1], t2[0]); + return new s$3(s2, e$8); +}; +var i$3 = (t2, e2) => { + t$3 ? t2.adoptedStyleSheets = e2.map((t3) => t3 instanceof CSSStyleSheet ? t3 : t3.styleSheet) : e2.forEach((e3) => { + var r2 = document.createElement("style"), i2 = window.litNonce; + void 0 !== i2 && r2.setAttribute("nonce", i2), r2.textContent = e3.cssText, t2.appendChild(r2); + }); +}; +var S$1 = t$3 ? (t2) => t2 : (t2) => t2 instanceof CSSStyleSheet ? ((t3) => { + var e2 = ""; + for (var r2 of t3.cssRules) e2 += r2.cssText; + return o$5(e2); +})(t2) : t2; +var s$2; +var e$7 = window.trustedTypes; +var r$2 = e$7 ? e$7.emptyScript : ""; +var h$2 = window.reactiveElementPolyfillSupport; +var o$4 = { toAttribute(t2, e2) { + switch (e2) { + case Boolean: + t2 = t2 ? r$2 : null; + break; + case Object: + case Array: + t2 = null == t2 ? t2 : JSON.stringify(t2); + } + return t2; +}, fromAttribute(t2, e2) { + var r2 = t2; + switch (e2) { + case Boolean: + r2 = null !== t2; + break; + case Number: + r2 = null === t2 ? null : Number(t2); + break; + case Object: + case Array: + try { + r2 = JSON.parse(t2); + } catch (t3) { + r2 = null; + } + } + return r2; +} }; +var n$4 = (t2, e2) => e2 !== t2 && (e2 == e2 || t2 == t2); +var l$3 = { attribute: true, type: String, converter: o$4, reflect: false, hasChanged: n$4 }; +var t$2; +var a$1 = class extends HTMLElement { + constructor() { + super(), this._$Et = /* @__PURE__ */ new Map(), this.isUpdatePending = false, this.hasUpdated = false, this._$Ei = null, this.o(); + } + static addInitializer(t2) { + var e2; + null !== (e2 = this.l) && void 0 !== e2 || (this.l = []), this.l.push(t2); + } + static get observedAttributes() { + this.finalize(); + var t2 = []; + return this.elementProperties.forEach((e2, r2) => { + var i2 = this._$Eh(r2, e2); + void 0 !== i2 && (this._$Eu.set(i2, r2), t2.push(i2)); + }), t2; + } + static createProperty(t2) { + var e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : l$3; + if (e2.state && (e2.attribute = false), this.finalize(), this.elementProperties.set(t2, e2), !e2.noAccessor && !this.prototype.hasOwnProperty(t2)) { + var r2 = "symbol" == typeof t2 ? Symbol() : "__" + t2, i2 = this.getPropertyDescriptor(t2, r2, e2); + void 0 !== i2 && Object.defineProperty(this.prototype, t2, i2); + } + } + static getPropertyDescriptor(t2, e2, r2) { + return { get() { + return this[e2]; + }, set(i2) { + var s2 = this[t2]; + this[e2] = i2, this.requestUpdate(t2, s2, r2); + }, configurable: true, enumerable: true }; + } + static getPropertyOptions(t2) { + return this.elementProperties.get(t2) || l$3; + } + static finalize() { + if (this.hasOwnProperty("finalized")) return false; + this.finalized = true; + var t2 = Object.getPrototypeOf(this); + if (t2.finalize(), this.elementProperties = new Map(t2.elementProperties), this._$Eu = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) { + var e2 = this.properties, r2 = [...Object.getOwnPropertyNames(e2), ...Object.getOwnPropertySymbols(e2)]; + for (var i2 of r2) this.createProperty(i2, e2[i2]); + } + return this.elementStyles = this.finalizeStyles(this.styles), true; + } + static finalizeStyles(t2) { + var e2 = []; + if (Array.isArray(t2)) { + var r2 = new Set(t2.flat(1 / 0).reverse()); + for (var i2 of r2) e2.unshift(S$1(i2)); + } else void 0 !== t2 && e2.push(S$1(t2)); + return e2; + } + static _$Eh(t2, e2) { + var r2 = e2.attribute; + return false === r2 ? void 0 : "string" == typeof r2 ? r2 : "string" == typeof t2 ? t2.toLowerCase() : void 0; + } + o() { + var t2; + this._$Ep = new Promise((t3) => this.enableUpdating = t3), this._$AL = /* @__PURE__ */ new Map(), this._$Em(), this.requestUpdate(), null === (t2 = this.constructor.l) || void 0 === t2 || t2.forEach((t3) => t3(this)); + } + addController(t2) { + var e2, r2; + (null !== (e2 = this._$Eg) && void 0 !== e2 ? e2 : this._$Eg = []).push(t2), void 0 !== this.renderRoot && this.isConnected && (null === (r2 = t2.hostConnected) || void 0 === r2 || r2.call(t2)); + } + removeController(t2) { + var e2; + null === (e2 = this._$Eg) || void 0 === e2 || e2.splice(this._$Eg.indexOf(t2) >>> 0, 1); + } + _$Em() { + this.constructor.elementProperties.forEach((t2, e2) => { + this.hasOwnProperty(e2) && (this._$Et.set(e2, this[e2]), delete this[e2]); + }); + } + createRenderRoot() { + var t2, e2 = null !== (t2 = this.shadowRoot) && void 0 !== t2 ? t2 : this.attachShadow(this.constructor.shadowRootOptions); + return i$3(e2, this.constructor.elementStyles), e2; + } + connectedCallback() { + var t2; + void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(true), null === (t2 = this._$Eg) || void 0 === t2 || t2.forEach((t3) => { + var e2; + return null === (e2 = t3.hostConnected) || void 0 === e2 ? void 0 : e2.call(t3); + }); + } + enableUpdating(t2) { + } + disconnectedCallback() { + var t2; + null === (t2 = this._$Eg) || void 0 === t2 || t2.forEach((t3) => { + var e2; + return null === (e2 = t3.hostDisconnected) || void 0 === e2 ? void 0 : e2.call(t3); + }); + } + attributeChangedCallback(t2, e2, r2) { + this._$AK(t2, r2); + } + _$ES(t2, e2) { + var r2, i2, s2 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : l$3, a2 = this.constructor._$Eh(t2, s2); + if (void 0 !== a2 && true === s2.reflect) { + var n2 = (null !== (i2 = null === (r2 = s2.converter) || void 0 === r2 ? void 0 : r2.toAttribute) && void 0 !== i2 ? i2 : o$4.toAttribute)(e2, s2.type); + this._$Ei = t2, null == n2 ? this.removeAttribute(a2) : this.setAttribute(a2, n2), this._$Ei = null; + } + } + _$AK(t2, e2) { + var r2, i2, s2, a2 = this.constructor, n2 = a2._$Eu.get(t2); + if (void 0 !== n2 && this._$Ei !== n2) { + var o2 = a2.getPropertyOptions(n2), h2 = o2.converter, l2 = null !== (s2 = null !== (i2 = null === (r2 = h2) || void 0 === r2 ? void 0 : r2.fromAttribute) && void 0 !== i2 ? i2 : "function" == typeof h2 ? h2 : null) && void 0 !== s2 ? s2 : o$4.fromAttribute; + this._$Ei = n2, this[n2] = l2(e2, o2.type), this._$Ei = null; + } + } + requestUpdate(t2, e2, r2) { + var i2 = true; + void 0 !== t2 && (((r2 = r2 || this.constructor.getPropertyOptions(t2)).hasChanged || n$4)(this[t2], e2) ? (this._$AL.has(t2) || this._$AL.set(t2, e2), true === r2.reflect && this._$Ei !== t2 && (void 0 === this._$E_ && (this._$E_ = /* @__PURE__ */ new Map()), this._$E_.set(t2, r2))) : i2 = false), !this.isUpdatePending && i2 && (this._$Ep = this._$EC()); + } + _$EC() { + var t2 = this; + return _asyncToGenerator(function* () { + t2.isUpdatePending = true; + try { + yield t2._$Ep; + } catch (e3) { + Promise.reject(e3); + } + var e2 = t2.scheduleUpdate(); + return null != e2 && (yield e2), !t2.isUpdatePending; + })(); + } + scheduleUpdate() { + return this.performUpdate(); + } + performUpdate() { + var t2; + if (this.isUpdatePending) { + this.hasUpdated, this._$Et && (this._$Et.forEach((t3, e3) => this[e3] = t3), this._$Et = void 0); + var e2 = false, r2 = this._$AL; + try { + (e2 = this.shouldUpdate(r2)) ? (this.willUpdate(r2), null === (t2 = this._$Eg) || void 0 === t2 || t2.forEach((t3) => { + var e3; + return null === (e3 = t3.hostUpdate) || void 0 === e3 ? void 0 : e3.call(t3); + }), this.update(r2)) : this._$EU(); + } catch (t3) { + throw e2 = false, this._$EU(), t3; + } + e2 && this._$AE(r2); + } + } + willUpdate(t2) { + } + _$AE(t2) { + var e2; + null === (e2 = this._$Eg) || void 0 === e2 || e2.forEach((t3) => { + var e3; + return null === (e3 = t3.hostUpdated) || void 0 === e3 ? void 0 : e3.call(t3); + }), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t2)), this.updated(t2); + } + _$EU() { + this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false; + } + get updateComplete() { + return this.getUpdateComplete(); + } + getUpdateComplete() { + return this._$Ep; + } + shouldUpdate(t2) { + return true; + } + update(t2) { + void 0 !== this._$E_ && (this._$E_.forEach((t3, e2) => this._$ES(e2, this[e2], t3)), this._$E_ = void 0), this._$EU(); + } + updated(t2) { + } + firstUpdated(t2) { + } +}; +a$1.finalized = true, a$1.elementProperties = /* @__PURE__ */ new Map(), a$1.elementStyles = [], a$1.shadowRootOptions = { mode: "open" }, null == h$2 || h$2({ ReactiveElement: a$1 }), (null !== (s$2 = globalThis.reactiveElementVersions) && void 0 !== s$2 ? s$2 : globalThis.reactiveElementVersions = []).push("1.2.1"); +var i$2 = globalThis.trustedTypes; +var s$1 = i$2 ? i$2.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0; +var e$6 = "lit$".concat((Math.random() + "").slice(9), "$"); +var o$3 = "?" + e$6; +var n$3 = "<".concat(o$3, ">"); +var l$2 = document; +var h$1 = function() { + var t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ""; + return l$2.createComment(t2); +}; +var r$1 = (t2) => null === t2 || "object" != typeof t2 && "function" != typeof t2; +var d = Array.isArray; +var u = (t2) => { + var e2; + return d(t2) || "function" == typeof (null === (e2 = t2) || void 0 === e2 ? void 0 : e2[Symbol.iterator]); +}; +var c = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g; +var v = /-->/g; +var a = />/g; +var f = />|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g; +var _ = /'/g; +var m = /"/g; +var g = /^(?:script|style|textarea)$/i; +var p = (t2) => function(e2) { + for (var r2 = arguments.length, i2 = new Array(r2 > 1 ? r2 - 1 : 0), s2 = 1; s2 < r2; s2++) i2[s2 - 1] = arguments[s2]; + return { _$litType$: t2, strings: e2, values: i2 }; +}; +var $ = p(1); +var y = p(2); +var b = Symbol.for("lit-noChange"); +var w = Symbol.for("lit-nothing"); +var T = /* @__PURE__ */ new WeakMap(); +var x = (t2, e2, r2) => { + var i2, s2, a2 = null !== (i2 = null == r2 ? void 0 : r2.renderBefore) && void 0 !== i2 ? i2 : e2, n2 = a2._$litPart$; + if (void 0 === n2) { + var o2 = null !== (s2 = null == r2 ? void 0 : r2.renderBefore) && void 0 !== s2 ? s2 : null; + a2._$litPart$ = n2 = new N(e2.insertBefore(h$1(), o2), o2, void 0, null != r2 ? r2 : {}); + } + return n2._$AI(t2), n2; +}; +var A = l$2.createTreeWalker(l$2, 129, null, false); +var C = (t2, e2) => { + for (var r2, i2 = t2.length - 1, s2 = [], n2 = 2 === e2 ? "" : "", o2 = c, h2 = 0; h2 < i2; h2++) { + for (var l2 = t2[h2], p2 = void 0, u2 = void 0, d2 = -1, y2 = 0; y2 < l2.length && (o2.lastIndex = y2, null !== (u2 = o2.exec(l2))); ) y2 = o2.lastIndex, o2 === c ? "!--" === u2[1] ? o2 = v : void 0 !== u2[1] ? o2 = a : void 0 !== u2[2] ? (g.test(u2[2]) && (r2 = RegExp("" === u2[0] ? (o2 = null != r2 ? r2 : c, d2 = -1) : void 0 === u2[1] ? d2 = -2 : (d2 = o2.lastIndex - u2[2].length, p2 = u2[1], o2 = void 0 === u2[3] ? f : '"' === u2[3] ? m : _) : o2 === m || o2 === _ ? o2 = f : o2 === v || o2 === a ? o2 = c : (o2 = f, r2 = void 0); + var b2 = o2 === f && t2[h2 + 1].startsWith("/>") ? " " : ""; + n2 += o2 === c ? l2 + n$3 : d2 >= 0 ? (s2.push(p2), l2.slice(0, d2) + "$lit$" + l2.slice(d2) + e$6 + b2) : l2 + e$6 + (-2 === d2 ? (s2.push(void 0), h2) : b2); + } + var P2 = n2 + (t2[i2] || "") + (2 === e2 ? "" : ""); + if (!Array.isArray(t2) || !t2.hasOwnProperty("raw")) throw Error("invalid template strings array"); + return [void 0 !== s$1 ? s$1.createHTML(P2) : P2, s2]; +}; +var E = class _E { + constructor(t2, e2) { + var r2, { strings: i2, _$litType$: s2 } = t2; + this.parts = []; + var a2 = 0, n2 = 0, o2 = i2.length - 1, h2 = this.parts, [l2, p2] = C(i2, s2); + if (this.el = _E.createElement(l2, e2), A.currentNode = this.el.content, 2 === s2) { + var c2 = this.el.content, f2 = c2.firstChild; + f2.remove(), c2.append(...f2.childNodes); + } + for (; null !== (r2 = A.nextNode()) && h2.length < o2; ) { + if (1 === r2.nodeType) { + if (r2.hasAttributes()) { + var u2 = []; + for (var d2 of r2.getAttributeNames()) if (d2.endsWith("$lit$") || d2.startsWith(e$6)) { + var m2 = p2[n2++]; + if (u2.push(d2), void 0 !== m2) { + var y2 = r2.getAttribute(m2.toLowerCase() + "$lit$").split(e$6), v2 = /([.?@])?(.*)/.exec(m2); + h2.push({ type: 1, index: a2, name: v2[2], strings: y2, ctor: "." === v2[1] ? M : "?" === v2[1] ? H : "@" === v2[1] ? I : S }); + } else h2.push({ type: 6, index: a2 }); + } + for (var b2 of u2) r2.removeAttribute(b2); + } + if (g.test(r2.tagName)) { + var _2 = r2.textContent.split(e$6), P2 = _2.length - 1; + if (P2 > 0) { + r2.textContent = i$2 ? i$2.emptyScript : ""; + for (var x2 = 0; x2 < P2; x2++) r2.append(_2[x2], h$1()), A.nextNode(), h2.push({ type: 2, index: ++a2 }); + r2.append(_2[P2], h$1()); + } + } + } else if (8 === r2.nodeType) if (r2.data === o$3) h2.push({ type: 2, index: a2 }); + else for (var w2 = -1; -1 !== (w2 = r2.data.indexOf(e$6, w2 + 1)); ) h2.push({ type: 7, index: a2 }), w2 += e$6.length - 1; + a2++; + } + } + static createElement(t2, e2) { + var r2 = l$2.createElement("template"); + return r2.innerHTML = t2, r2; + } +}; +function P(t2, e2) { + var r2, i2, s2, a2, n2 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : t2, o2 = arguments.length > 3 ? arguments[3] : void 0; + if (e2 === b) return e2; + var h2 = void 0 !== o2 ? null === (r2 = n2._$Cl) || void 0 === r2 ? void 0 : r2[o2] : n2._$Cu, l2 = r$1(e2) ? void 0 : e2._$litDirective$; + return (null == h2 ? void 0 : h2.constructor) !== l2 && (null === (i2 = null == h2 ? void 0 : h2._$AO) || void 0 === i2 || i2.call(h2, false), void 0 === l2 ? h2 = void 0 : (h2 = new l2(t2))._$AT(t2, n2, o2), void 0 !== o2 ? (null !== (s2 = (a2 = n2)._$Cl) && void 0 !== s2 ? s2 : a2._$Cl = [])[o2] = h2 : n2._$Cu = h2), void 0 !== h2 && (e2 = P(t2, h2._$AS(t2, e2.values), h2, o2)), e2; +} +var V = class { + constructor(t2, e2) { + this.v = [], this._$AN = void 0, this._$AD = t2, this._$AM = e2; + } + get parentNode() { + return this._$AM.parentNode; + } + get _$AU() { + return this._$AM._$AU; + } + p(t2) { + var e2, { el: { content: r2 }, parts: i2 } = this._$AD, s2 = (null !== (e2 = null == t2 ? void 0 : t2.creationScope) && void 0 !== e2 ? e2 : l$2).importNode(r2, true); + A.currentNode = s2; + for (var a2 = A.nextNode(), n2 = 0, o2 = 0, h2 = i2[0]; void 0 !== h2; ) { + if (n2 === h2.index) { + var l2 = void 0; + 2 === h2.type ? l2 = new N(a2, a2.nextSibling, this, t2) : 1 === h2.type ? l2 = new h2.ctor(a2, h2.name, h2.strings, this, t2) : 6 === h2.type && (l2 = new L(a2, this, t2)), this.v.push(l2), h2 = i2[++o2]; + } + n2 !== (null == h2 ? void 0 : h2.index) && (a2 = A.nextNode(), n2++); + } + return s2; + } + m(t2) { + var e2 = 0; + for (var r2 of this.v) void 0 !== r2 && (void 0 !== r2.strings ? (r2._$AI(t2, r2, e2), e2 += r2.strings.length - 2) : r2._$AI(t2[e2])), e2++; + } +}; +var N = class _N { + constructor(t2, e2, r2, i2) { + var s2; + this.type = 2, this._$AH = w, this._$AN = void 0, this._$AA = t2, this._$AB = e2, this._$AM = r2, this.options = i2, this._$Cg = null === (s2 = null == i2 ? void 0 : i2.isConnected) || void 0 === s2 || s2; + } + get _$AU() { + var t2, e2; + return null !== (e2 = null === (t2 = this._$AM) || void 0 === t2 ? void 0 : t2._$AU) && void 0 !== e2 ? e2 : this._$Cg; + } + get parentNode() { + var t2 = this._$AA.parentNode, e2 = this._$AM; + return void 0 !== e2 && 11 === t2.nodeType && (t2 = e2.parentNode), t2; + } + get startNode() { + return this._$AA; + } + get endNode() { + return this._$AB; + } + _$AI(t2) { + t2 = P(this, t2, arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this), r$1(t2) ? t2 === w || null == t2 || "" === t2 ? (this._$AH !== w && this._$AR(), this._$AH = w) : t2 !== this._$AH && t2 !== b && this.$(t2) : void 0 !== t2._$litType$ ? this.T(t2) : void 0 !== t2.nodeType ? this.S(t2) : u(t2) ? this.A(t2) : this.$(t2); + } + M(t2) { + var e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._$AB; + return this._$AA.parentNode.insertBefore(t2, e2); + } + S(t2) { + this._$AH !== t2 && (this._$AR(), this._$AH = this.M(t2)); + } + $(t2) { + this._$AH !== w && r$1(this._$AH) ? this._$AA.nextSibling.data = t2 : this.S(l$2.createTextNode(t2)), this._$AH = t2; + } + T(t2) { + var e2, { values: r2, _$litType$: i2 } = t2, s2 = "number" == typeof i2 ? this._$AC(t2) : (void 0 === i2.el && (i2.el = E.createElement(i2.h, this.options)), i2); + if ((null === (e2 = this._$AH) || void 0 === e2 ? void 0 : e2._$AD) === s2) this._$AH.m(r2); + else { + var a2 = new V(s2, this), n2 = a2.p(this.options); + a2.m(r2), this.S(n2), this._$AH = a2; + } + } + _$AC(t2) { + var e2 = T.get(t2.strings); + return void 0 === e2 && T.set(t2.strings, e2 = new E(t2)), e2; + } + A(t2) { + d(this._$AH) || (this._$AH = [], this._$AR()); + var e2, r2 = this._$AH, i2 = 0; + for (var s2 of t2) i2 === r2.length ? r2.push(e2 = new _N(this.M(h$1()), this.M(h$1()), this, this.options)) : e2 = r2[i2], e2._$AI(s2), i2++; + i2 < r2.length && (this._$AR(e2 && e2._$AB.nextSibling, i2), r2.length = i2); + } + _$AR() { + var t2, e2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._$AA.nextSibling, r2 = arguments.length > 1 ? arguments[1] : void 0; + for (null === (t2 = this._$AP) || void 0 === t2 || t2.call(this, false, true, r2); e2 && e2 !== this._$AB; ) { + var i2 = e2.nextSibling; + e2.remove(), e2 = i2; + } + } + setConnected(t2) { + var e2; + void 0 === this._$AM && (this._$Cg = t2, null === (e2 = this._$AP) || void 0 === e2 || e2.call(this, t2)); + } +}; +var S = class { + constructor(t2, e2, r2, i2, s2) { + this.type = 1, this._$AH = w, this._$AN = void 0, this.element = t2, this.name = e2, this._$AM = i2, this.options = s2, r2.length > 2 || "" !== r2[0] || "" !== r2[1] ? (this._$AH = Array(r2.length - 1).fill(new String()), this.strings = r2) : this._$AH = w; + } + get tagName() { + return this.element.tagName; + } + get _$AU() { + return this._$AM._$AU; + } + _$AI(t2) { + var e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this, r2 = arguments.length > 2 ? arguments[2] : void 0, i2 = arguments.length > 3 ? arguments[3] : void 0, s2 = this.strings, a2 = false; + if (void 0 === s2) t2 = P(this, t2, e2, 0), (a2 = !r$1(t2) || t2 !== this._$AH && t2 !== b) && (this._$AH = t2); + else { + var n2, o2, h2 = t2; + for (t2 = s2[0], n2 = 0; n2 < s2.length - 1; n2++) (o2 = P(this, h2[r2 + n2], e2, n2)) === b && (o2 = this._$AH[n2]), a2 || (a2 = !r$1(o2) || o2 !== this._$AH[n2]), o2 === w ? t2 = w : t2 !== w && (t2 += (null != o2 ? o2 : "") + s2[n2 + 1]), this._$AH[n2] = o2; + } + a2 && !i2 && this.k(t2); + } + k(t2) { + t2 === w ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t2 ? t2 : ""); + } +}; +var M = class extends S { + constructor() { + super(...arguments), this.type = 3; + } + k(t2) { + this.element[this.name] = t2 === w ? void 0 : t2; + } +}; +var k = i$2 ? i$2.emptyScript : ""; +var H = class extends S { + constructor() { + super(...arguments), this.type = 4; + } + k(t2) { + t2 && t2 !== w ? this.element.setAttribute(this.name, k) : this.element.removeAttribute(this.name); + } +}; +var I = class extends S { + constructor(t2, e2, r2, i2, s2) { + super(t2, e2, r2, i2, s2), this.type = 5; + } + _$AI(t2) { + var e2; + if ((t2 = null !== (e2 = P(this, t2, arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this, 0)) && void 0 !== e2 ? e2 : w) !== b) { + var r2 = this._$AH, i2 = t2 === w && r2 !== w || t2.capture !== r2.capture || t2.once !== r2.once || t2.passive !== r2.passive, s2 = t2 !== w && (r2 === w || i2); + i2 && this.element.removeEventListener(this.name, this, r2), s2 && this.element.addEventListener(this.name, this, t2), this._$AH = t2; + } + } + handleEvent(t2) { + var e2, r2; + "function" == typeof this._$AH ? this._$AH.call(null !== (r2 = null === (e2 = this.options) || void 0 === e2 ? void 0 : e2.host) && void 0 !== r2 ? r2 : this.element, t2) : this._$AH.handleEvent(t2); + } +}; +var L = class { + constructor(t2, e2, r2) { + this.element = t2, this.type = 6, this._$AN = void 0, this._$AM = e2, this.options = r2; + } + get _$AU() { + return this._$AM._$AU; + } + _$AI(t2) { + P(this, t2); + } +}; +var R = { P: "$lit$", V: e$6, L: o$3, I: 1, N: C, R: V, D: u, j: P, H: N, O: S, F: H, B: I, W: M, Z: L }; +var z = window.litHtmlPolyfillSupport; +var l$1; +var o$2; +null == z || z(E, N), (null !== (t$2 = globalThis.litHtmlVersions) && void 0 !== t$2 ? t$2 : globalThis.litHtmlVersions = []).push("2.1.2"); +var r = a$1; +var s = class extends a$1 { + constructor() { + super(...arguments), this.renderOptions = { host: this }, this._$Dt = void 0; + } + createRenderRoot() { + var t2, e2, r2 = super.createRenderRoot(); + return null !== (t2 = (e2 = this.renderOptions).renderBefore) && void 0 !== t2 || (e2.renderBefore = r2.firstChild), r2; + } + update(t2) { + var e2 = this.render(); + this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t2), this._$Dt = x(e2, this.renderRoot, this.renderOptions); + } + connectedCallback() { + var t2; + super.connectedCallback(), null === (t2 = this._$Dt) || void 0 === t2 || t2.setConnected(true); + } + disconnectedCallback() { + var t2; + super.disconnectedCallback(), null === (t2 = this._$Dt) || void 0 === t2 || t2.setConnected(false); + } + render() { + return b; + } +}; +s.finalized = true, s._$litElement$ = true, null === (l$1 = globalThis.litElementHydrateSupport) || void 0 === l$1 || l$1.call(globalThis, { LitElement: s }); +var n$2 = globalThis.litElementPolyfillSupport; +null == n$2 || n$2({ LitElement: s }); +var h = { _$AK: (t2, e2, r2) => { + t2._$AK(e2, r2); +}, _$AL: (t2) => t2._$AL }; +(null !== (o$2 = globalThis.litElementVersions) && void 0 !== o$2 ? o$2 : globalThis.litElementVersions = []).push("3.1.2"); +var n$1 = (t2) => (e2) => "function" == typeof e2 ? ((t3, e3) => (window.customElements.define(t3, e3), e3))(t2, e2) : ((t3, e3) => { + var { kind: r2, elements: i2 } = e3; + return { kind: r2, elements: i2, finisher(e4) { + window.customElements.define(t3, e4); + } }; +})(t2, e2); +var i$1 = (t2, e2) => "method" === e2.kind && e2.descriptor && !("value" in e2.descriptor) ? _objectSpread2(_objectSpread2({}, e2), {}, { finisher(r2) { + r2.createProperty(e2.key, t2); +} }) : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: e2.key, initializer() { + "function" == typeof e2.initializer && (this[e2.key] = e2.initializer.call(this)); +}, finisher(r2) { + r2.createProperty(e2.key, t2); +} }; +function e$5(t2) { + return (e2, r2) => void 0 !== r2 ? ((t3, e3, r3) => { + e3.constructor.createProperty(r3, t3); + })(t2, e2, r2) : i$1(t2, e2); +} +function t$1(t2) { + return e$5(_objectSpread2(_objectSpread2({}, t2), {}, { state: true })); +} +var e$4 = (t2, e2, r2) => { + Object.defineProperty(e2, r2, t2); +}; +var t = (t2, e2) => ({ kind: "method", placement: "prototype", key: e2.key, descriptor: t2 }); +var o$1 = (t2) => { + var { finisher: e2, descriptor: r2 } = t2; + return (t3, i2) => { + var s2; + if (void 0 === i2) { + var a2 = null !== (s2 = t3.originalKey) && void 0 !== s2 ? s2 : t3.key, n2 = null != r2 ? { kind: "method", placement: "prototype", key: a2, descriptor: r2(t3.key) } : _objectSpread2(_objectSpread2({}, t3), {}, { key: a2 }); + return null != e2 && (n2.finisher = function(t4) { + e2(t4, a2); + }), n2; + } + var o2 = t3.constructor; + void 0 !== r2 && Object.defineProperty(t3, i2, r2(i2)), null == e2 || e2(o2, i2); + }; +}; +var n; +function e$3(t2) { + return o$1({ finisher: (e2, r2) => { + Object.assign(e2.prototype[r2], t2); + } }); +} +function i(t2, e2) { + return o$1({ descriptor: (r2) => { + var i2 = { get() { + var e3, r3; + return null !== (r3 = null === (e3 = this.renderRoot) || void 0 === e3 ? void 0 : e3.querySelector(t2)) && void 0 !== r3 ? r3 : null; + }, enumerable: true, configurable: true }; + if (e2) { + var s2 = "symbol" == typeof r2 ? Symbol() : "__" + r2; + i2.get = function() { + var e3, r3; + return void 0 === this[s2] && (this[s2] = null !== (r3 = null === (e3 = this.renderRoot) || void 0 === e3 ? void 0 : e3.querySelector(t2)) && void 0 !== r3 ? r3 : null), this[s2]; + }; + } + return i2; + } }); +} +function e$2(t2) { + return o$1({ descriptor: (e2) => ({ get() { + var e3, r2; + return null !== (r2 = null === (e3 = this.renderRoot) || void 0 === e3 ? void 0 : e3.querySelectorAll(t2)) && void 0 !== r2 ? r2 : []; + }, enumerable: true, configurable: true }) }); +} +function e$1(t2) { + return o$1({ descriptor: (e2) => ({ get() { + var e3 = this; + return _asyncToGenerator(function* () { + var r2; + return yield e3.updateComplete, null === (r2 = e3.renderRoot) || void 0 === r2 ? void 0 : r2.querySelector(t2); + })(); + }, enumerable: true, configurable: true }) }); +} +var e = null != (null === (n = window.HTMLSlotElement) || void 0 === n ? void 0 : n.prototype.assignedElements) ? (t2, e2) => t2.assignedElements(e2) : (t2, e2) => t2.assignedNodes(e2).filter((t3) => t3.nodeType === Node.ELEMENT_NODE); +function l(t2) { + var { slot: r2, selector: i2 } = null != t2 ? t2 : {}; + return o$1({ descriptor: (s2) => ({ get() { + var s3, a2 = "slot" + (r2 ? "[name=".concat(r2, "]") : ":not([name])"), n2 = null === (s3 = this.renderRoot) || void 0 === s3 ? void 0 : s3.querySelector(a2), o2 = null != n2 ? e(n2, t2) : []; + return i2 ? o2.filter((t3) => t3.matches(i2)) : o2; + }, enumerable: true, configurable: true }) }); +} +function o(t2, e2, r2) { + var i2, s2 = t2; + return "object" == typeof t2 ? (s2 = t2.slot, i2 = t2) : i2 = { flatten: e2 }, r2 ? l({ slot: s2, flatten: e2, selector: r2 }) : o$1({ descriptor: (t3) => ({ get() { + var t4, e3, r3 = "slot" + (s2 ? "[name=".concat(s2, "]") : ":not([name])"), a2 = null === (t4 = this.renderRoot) || void 0 === t4 ? void 0 : t4.querySelector(r3); + return null !== (e3 = null == a2 ? void 0 : a2.assignedNodes(i2)) && void 0 !== e3 ? e3 : []; + }, enumerable: true, configurable: true }) }); +} +var commonjsGlobal = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; +function getDefaultExportFromCjs(t2) { + return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2; +} +function getDefaultExportFromNamespaceIfPresent(t2) { + return t2 && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2; +} +function getDefaultExportFromNamespaceIfNotNamed(t2) { + return t2 && Object.prototype.hasOwnProperty.call(t2, "default") && 1 === Object.keys(t2).length ? t2.default : t2; +} +function getAugmentedNamespace(t2) { + if (t2.__esModule) return t2; + var e2 = Object.defineProperty({}, "__esModule", { value: true }); + return Object.keys(t2).forEach(function(r2) { + var i2 = Object.getOwnPropertyDescriptor(t2, r2); + Object.defineProperty(e2, r2, i2.get ? i2 : { enumerable: true, get: function() { + return t2[r2]; + } }); + }), e2; +} +function commonjsRequire(t2) { + throw new Error('Could not dynamically require "' + t2 + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); +} +var lottie$1 = { exports: {} }; +(function(module, exports) { + var factory; + "undefined" != typeof navigator && (factory = function() { + var svgNS = "http://www.w3.org/2000/svg", locationHref = "", _useWebWorker = false, initialDefaultFrame = -999999, setWebWorker = function(t2) { + _useWebWorker = !!t2; + }, getWebWorker = function() { + return _useWebWorker; + }, setLocationHref = function(t2) { + locationHref = t2; + }, getLocationHref = function() { + return locationHref; + }; + function createTag(t2) { + return document.createElement(t2); + } + function extendPrototype(t2, e2) { + var r2, i2, s2 = t2.length; + for (r2 = 0; r2 < s2; r2 += 1) for (var a2 in i2 = t2[r2].prototype) Object.prototype.hasOwnProperty.call(i2, a2) && (e2.prototype[a2] = i2[a2]); + } + function getDescriptor(t2, e2) { + return Object.getOwnPropertyDescriptor(t2, e2); + } + function createProxyFunction(t2) { + function e2() { + } + return e2.prototype = t2, e2; + } + var audioControllerFactory = function() { + function t2(t3) { + this.audios = [], this.audioFactory = t3, this._volume = 1, this._isMuted = false; + } + return t2.prototype = { addAudio: function(t3) { + this.audios.push(t3); + }, pause: function() { + var t3, e2 = this.audios.length; + for (t3 = 0; t3 < e2; t3 += 1) this.audios[t3].pause(); + }, resume: function() { + var t3, e2 = this.audios.length; + for (t3 = 0; t3 < e2; t3 += 1) this.audios[t3].resume(); + }, setRate: function(t3) { + var e2, r2 = this.audios.length; + for (e2 = 0; e2 < r2; e2 += 1) this.audios[e2].setRate(t3); + }, createAudio: function(t3) { + return this.audioFactory ? this.audioFactory(t3) : window.Howl ? new window.Howl({ src: [t3] }) : { isPlaying: false, play: function() { + this.isPlaying = true; + }, seek: function() { + this.isPlaying = false; + }, playing: function() { + }, rate: function() { + }, setVolume: function() { + } }; + }, setAudioFactory: function(t3) { + this.audioFactory = t3; + }, setVolume: function(t3) { + this._volume = t3, this._updateVolume(); + }, mute: function() { + this._isMuted = true, this._updateVolume(); + }, unmute: function() { + this._isMuted = false, this._updateVolume(); + }, getVolume: function() { + return this._volume; + }, _updateVolume: function() { + var t3, e2 = this.audios.length; + for (t3 = 0; t3 < e2; t3 += 1) this.audios[t3].volume(this._volume * (this._isMuted ? 0 : 1)); + } }, function() { + return new t2(); + }; + }(), createTypedArray = /* @__PURE__ */ function() { + function t2(t3, e2) { + var r2, i2 = 0, s2 = []; + switch (t3) { + case "int16": + case "uint8c": + r2 = 1; + break; + default: + r2 = 1.1; + } + for (i2 = 0; i2 < e2; i2 += 1) s2.push(r2); + return s2; + } + return "function" == typeof Uint8ClampedArray && "function" == typeof Float32Array ? function(e2, r2) { + return "float32" === e2 ? new Float32Array(r2) : "int16" === e2 ? new Int16Array(r2) : "uint8c" === e2 ? new Uint8ClampedArray(r2) : t2(e2, r2); + } : t2; + }(); + function createSizedArray(t2) { + return Array.apply(null, { length: t2 }); + } + function _typeof$6(t2) { + return _typeof$6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t3) { + return typeof t3; + } : function(t3) { + return t3 && "function" == typeof Symbol && t3.constructor === Symbol && t3 !== Symbol.prototype ? "symbol" : typeof t3; + }, _typeof$6(t2); + } + var subframeEnabled = true, expressionsPlugin = null, expressionsInterfaces = null, idPrefix$1 = "", isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent), _shouldRoundValues = false, bmPow = Math.pow, bmSqrt = Math.sqrt, bmFloor = Math.floor, bmMax = Math.max, bmMin = Math.min, BMMath = {}; + function ProjectInterface$1() { + return {}; + } + !function() { + var t2, e2 = ["abs", "acos", "acosh", "asin", "asinh", "atan", "atanh", "atan2", "ceil", "cbrt", "expm1", "clz32", "cos", "cosh", "exp", "floor", "fround", "hypot", "imul", "log", "log1p", "log2", "log10", "max", "min", "pow", "random", "round", "sign", "sin", "sinh", "sqrt", "tan", "tanh", "trunc", "E", "LN10", "LN2", "LOG10E", "LOG2E", "PI", "SQRT1_2", "SQRT2"], r2 = e2.length; + for (t2 = 0; t2 < r2; t2 += 1) BMMath[e2[t2]] = Math[e2[t2]]; + }(), BMMath.random = Math.random, BMMath.abs = function(t2) { + if ("object" === _typeof$6(t2) && t2.length) { + var e2, r2 = createSizedArray(t2.length), i2 = t2.length; + for (e2 = 0; e2 < i2; e2 += 1) r2[e2] = Math.abs(t2[e2]); + return r2; + } + return Math.abs(t2); + }; + var defaultCurveSegments = 150, degToRads = Math.PI / 180, roundCorner = 0.5519; + function roundValues(t2) { + _shouldRoundValues = !!t2; + } + function bmRnd(t2) { + return _shouldRoundValues ? Math.round(t2) : t2; + } + function styleDiv(t2) { + t2.style.position = "absolute", t2.style.top = 0, t2.style.left = 0, t2.style.display = "block", t2.style.transformOrigin = "0 0", t2.style.webkitTransformOrigin = "0 0", t2.style.backfaceVisibility = "visible", t2.style.webkitBackfaceVisibility = "visible", t2.style.transformStyle = "preserve-3d", t2.style.webkitTransformStyle = "preserve-3d", t2.style.mozTransformStyle = "preserve-3d"; + } + function BMEnterFrameEvent(t2, e2, r2, i2) { + this.type = t2, this.currentTime = e2, this.totalTime = r2, this.direction = i2 < 0 ? -1 : 1; + } + function BMCompleteEvent(t2, e2) { + this.type = t2, this.direction = e2 < 0 ? -1 : 1; + } + function BMCompleteLoopEvent(t2, e2, r2, i2) { + this.type = t2, this.currentLoop = r2, this.totalLoops = e2, this.direction = i2 < 0 ? -1 : 1; + } + function BMSegmentStartEvent(t2, e2, r2) { + this.type = t2, this.firstFrame = e2, this.totalFrames = r2; + } + function BMDestroyEvent(t2, e2) { + this.type = t2, this.target = e2; + } + function BMRenderFrameErrorEvent(t2, e2) { + this.type = "renderFrameError", this.nativeError = t2, this.currentTime = e2; + } + function BMConfigErrorEvent(t2) { + this.type = "configError", this.nativeError = t2; + } + function BMAnimationConfigErrorEvent(t2, e2) { + this.type = t2, this.nativeError = e2; + } + var createElementID = (_count = 0, function() { + return idPrefix$1 + "__lottie_element_" + (_count += 1); + }), _count; + function HSVtoRGB(t2, e2, r2) { + var i2, s2, a2, n2, o2, h2, l2, p2; + switch (h2 = r2 * (1 - e2), l2 = r2 * (1 - (o2 = 6 * t2 - (n2 = Math.floor(6 * t2))) * e2), p2 = r2 * (1 - (1 - o2) * e2), n2 % 6) { + case 0: + i2 = r2, s2 = p2, a2 = h2; + break; + case 1: + i2 = l2, s2 = r2, a2 = h2; + break; + case 2: + i2 = h2, s2 = r2, a2 = p2; + break; + case 3: + i2 = h2, s2 = l2, a2 = r2; + break; + case 4: + i2 = p2, s2 = h2, a2 = r2; + break; + case 5: + i2 = r2, s2 = h2, a2 = l2; + } + return [i2, s2, a2]; + } + function RGBtoHSV(t2, e2, r2) { + var i2, s2 = Math.max(t2, e2, r2), a2 = Math.min(t2, e2, r2), n2 = s2 - a2, o2 = 0 === s2 ? 0 : n2 / s2, h2 = s2 / 255; + switch (s2) { + case a2: + i2 = 0; + break; + case t2: + i2 = e2 - r2 + n2 * (e2 < r2 ? 6 : 0), i2 /= 6 * n2; + break; + case e2: + i2 = r2 - t2 + 2 * n2, i2 /= 6 * n2; + break; + case r2: + i2 = t2 - e2 + 4 * n2, i2 /= 6 * n2; + } + return [i2, o2, h2]; + } + function addSaturationToRGB(t2, e2) { + var r2 = RGBtoHSV(255 * t2[0], 255 * t2[1], 255 * t2[2]); + return r2[1] += e2, r2[1] > 1 ? r2[1] = 1 : r2[1] <= 0 && (r2[1] = 0), HSVtoRGB(r2[0], r2[1], r2[2]); + } + function addBrightnessToRGB(t2, e2) { + var r2 = RGBtoHSV(255 * t2[0], 255 * t2[1], 255 * t2[2]); + return r2[2] += e2, r2[2] > 1 ? r2[2] = 1 : r2[2] < 0 && (r2[2] = 0), HSVtoRGB(r2[0], r2[1], r2[2]); + } + function addHueToRGB(t2, e2) { + var r2 = RGBtoHSV(255 * t2[0], 255 * t2[1], 255 * t2[2]); + return r2[0] += e2 / 360, r2[0] > 1 ? r2[0] -= 1 : r2[0] < 0 && (r2[0] += 1), HSVtoRGB(r2[0], r2[1], r2[2]); + } + var rgbToHex = function() { + var t2, e2, r2 = []; + for (t2 = 0; t2 < 256; t2 += 1) e2 = t2.toString(16), r2[t2] = 1 === e2.length ? "0" + e2 : e2; + return function(t3, e3, i2) { + return t3 < 0 && (t3 = 0), e3 < 0 && (e3 = 0), i2 < 0 && (i2 = 0), "#" + r2[t3] + r2[e3] + r2[i2]; + }; + }(), setSubframeEnabled = function(t2) { + subframeEnabled = !!t2; + }, getSubframeEnabled = function() { + return subframeEnabled; + }, setExpressionsPlugin = function(t2) { + expressionsPlugin = t2; + }, getExpressionsPlugin = function() { + return expressionsPlugin; + }, setExpressionInterfaces = function(t2) { + expressionsInterfaces = t2; + }, getExpressionInterfaces = function() { + return expressionsInterfaces; + }, setDefaultCurveSegments = function(t2) { + defaultCurveSegments = t2; + }, getDefaultCurveSegments = function() { + return defaultCurveSegments; + }, setIdPrefix = function(t2) { + idPrefix$1 = t2; + }, getIdPrefix = function() { + return idPrefix$1; + }; + function createNS(t2) { + return document.createElementNS(svgNS, t2); + } + function _typeof$5(t2) { + return _typeof$5 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t3) { + return typeof t3; + } : function(t3) { + return t3 && "function" == typeof Symbol && t3.constructor === Symbol && t3 !== Symbol.prototype ? "symbol" : typeof t3; + }, _typeof$5(t2); + } + var dataManager = /* @__PURE__ */ function() { + var t2, e2, r2 = 1, i2 = [], s2 = { onmessage: function() { + }, postMessage: function(e3) { + t2({ data: e3 }); + } }, _workerSelf = { postMessage: function(t3) { + s2.onmessage({ data: t3 }); + } }; + function a2() { + e2 || (e2 = function(e3) { + if (window.Worker && window.Blob && getWebWorker()) { + var r3 = new Blob(["var _workerSelf = self; self.onmessage = ", e3.toString()], { type: "text/javascript" }), i3 = URL.createObjectURL(r3); + return new Worker(i3); + } + return t2 = e3, s2; + }(function(t3) { + if (_workerSelf.dataManager || (_workerSelf.dataManager = function() { + function t4(s4, a4) { + var n4, o3, h3, l3, p3, f3, u2 = s4.length; + for (o3 = 0; o3 < u2; o3 += 1) if ("ks" in (n4 = s4[o3]) && !n4.completed) { + if (n4.completed = true, n4.hasMask) { + var d2 = n4.masksProperties; + for (l3 = d2.length, h3 = 0; h3 < l3; h3 += 1) if (d2[h3].pt.k.i) i3(d2[h3].pt.k); + else for (f3 = d2[h3].pt.k.length, p3 = 0; p3 < f3; p3 += 1) d2[h3].pt.k[p3].s && i3(d2[h3].pt.k[p3].s[0]), d2[h3].pt.k[p3].e && i3(d2[h3].pt.k[p3].e[0]); + } + 0 === n4.ty ? (n4.layers = e4(n4.refId, a4), t4(n4.layers, a4)) : 4 === n4.ty ? r3(n4.shapes) : 5 === n4.ty && c2(n4); + } + } + function e4(t5, e5) { + var r4 = function(t6, e6) { + for (var r5 = 0, i4 = e6.length; r5 < i4; ) { + if (e6[r5].id === t6) return e6[r5]; + r5 += 1; + } + return null; + }(t5, e5); + return r4 ? r4.layers.__used ? JSON.parse(JSON.stringify(r4.layers)) : (r4.layers.__used = true, r4.layers) : null; + } + function r3(t5) { + var e5, s4, a4; + for (e5 = t5.length - 1; e5 >= 0; e5 -= 1) if ("sh" === t5[e5].ty) if (t5[e5].ks.k.i) i3(t5[e5].ks.k); + else for (a4 = t5[e5].ks.k.length, s4 = 0; s4 < a4; s4 += 1) t5[e5].ks.k[s4].s && i3(t5[e5].ks.k[s4].s[0]), t5[e5].ks.k[s4].e && i3(t5[e5].ks.k[s4].e[0]); + else "gr" === t5[e5].ty && r3(t5[e5].it); + } + function i3(t5) { + var e5, r4 = t5.i.length; + for (e5 = 0; e5 < r4; e5 += 1) t5.i[e5][0] += t5.v[e5][0], t5.i[e5][1] += t5.v[e5][1], t5.o[e5][0] += t5.v[e5][0], t5.o[e5][1] += t5.v[e5][1]; + } + function s3(t5, e5) { + var r4 = e5 ? e5.split(".") : [100, 100, 100]; + return t5[0] > r4[0] || !(r4[0] > t5[0]) && (t5[1] > r4[1] || !(r4[1] > t5[1]) && (t5[2] > r4[2] || !(r4[2] > t5[2]) && null)); + } + var a3, n3 = /* @__PURE__ */ function() { + var t5 = [4, 4, 14]; + function e5(t6) { + var e6, r4, i4, s4 = t6.length; + for (e6 = 0; e6 < s4; e6 += 1) 5 === t6[e6].ty && (i4 = void 0, i4 = (r4 = t6[e6]).t.d, r4.t.d = { k: [{ s: i4, t: 0 }] }); + } + return function(r4) { + if (s3(t5, r4.v) && (e5(r4.layers), r4.assets)) { + var i4, a4 = r4.assets.length; + for (i4 = 0; i4 < a4; i4 += 1) r4.assets[i4].layers && e5(r4.assets[i4].layers); + } + }; + }(), o2 = (a3 = [4, 7, 99], function(t5) { + if (t5.chars && !s3(a3, t5.v)) { + var e5, i4 = t5.chars.length; + for (e5 = 0; e5 < i4; e5 += 1) { + var n4 = t5.chars[e5]; + n4.data && n4.data.shapes && (r3(n4.data.shapes), n4.data.ip = 0, n4.data.op = 99999, n4.data.st = 0, n4.data.sr = 1, n4.data.ks = { p: { k: [0, 0], a: 0 }, s: { k: [100, 100], a: 0 }, a: { k: [0, 0], a: 0 }, r: { k: 0, a: 0 }, o: { k: 100, a: 0 } }, t5.chars[e5].t || (n4.data.shapes.push({ ty: "no" }), n4.data.shapes[0].it.push({ p: { k: [0, 0], a: 0 }, s: { k: [100, 100], a: 0 }, a: { k: [0, 0], a: 0 }, r: { k: 0, a: 0 }, o: { k: 100, a: 0 }, sk: { k: 0, a: 0 }, sa: { k: 0, a: 0 }, ty: "tr" }))); + } + } + }), h2 = /* @__PURE__ */ function() { + var t5 = [5, 7, 15]; + function e5(t6) { + var e6, r4, i4 = t6.length; + for (e6 = 0; e6 < i4; e6 += 1) 5 === t6[e6].ty && (r4 = void 0, "number" == typeof (r4 = t6[e6].t.p).a && (r4.a = { a: 0, k: r4.a }), "number" == typeof r4.p && (r4.p = { a: 0, k: r4.p }), "number" == typeof r4.r && (r4.r = { a: 0, k: r4.r })); + } + return function(r4) { + if (s3(t5, r4.v) && (e5(r4.layers), r4.assets)) { + var i4, a4 = r4.assets.length; + for (i4 = 0; i4 < a4; i4 += 1) r4.assets[i4].layers && e5(r4.assets[i4].layers); + } + }; + }(), l2 = /* @__PURE__ */ function() { + var t5 = [4, 1, 9]; + function e5(t6) { + var r5, i4, s4, a4 = t6.length; + for (r5 = 0; r5 < a4; r5 += 1) if ("gr" === t6[r5].ty) e5(t6[r5].it); + else if ("fl" === t6[r5].ty || "st" === t6[r5].ty) if (t6[r5].c.k && t6[r5].c.k[0].i) for (s4 = t6[r5].c.k.length, i4 = 0; i4 < s4; i4 += 1) t6[r5].c.k[i4].s && (t6[r5].c.k[i4].s[0] /= 255, t6[r5].c.k[i4].s[1] /= 255, t6[r5].c.k[i4].s[2] /= 255, t6[r5].c.k[i4].s[3] /= 255), t6[r5].c.k[i4].e && (t6[r5].c.k[i4].e[0] /= 255, t6[r5].c.k[i4].e[1] /= 255, t6[r5].c.k[i4].e[2] /= 255, t6[r5].c.k[i4].e[3] /= 255); + else t6[r5].c.k[0] /= 255, t6[r5].c.k[1] /= 255, t6[r5].c.k[2] /= 255, t6[r5].c.k[3] /= 255; + } + function r4(t6) { + var r5, i4 = t6.length; + for (r5 = 0; r5 < i4; r5 += 1) 4 === t6[r5].ty && e5(t6[r5].shapes); + } + return function(e6) { + if (s3(t5, e6.v) && (r4(e6.layers), e6.assets)) { + var i4, a4 = e6.assets.length; + for (i4 = 0; i4 < a4; i4 += 1) e6.assets[i4].layers && r4(e6.assets[i4].layers); + } + }; + }(), p2 = /* @__PURE__ */ function() { + var t5 = [4, 4, 18]; + function e5(t6) { + var r5, i4, s4; + for (r5 = t6.length - 1; r5 >= 0; r5 -= 1) if ("sh" === t6[r5].ty) if (t6[r5].ks.k.i) t6[r5].ks.k.c = t6[r5].closed; + else for (s4 = t6[r5].ks.k.length, i4 = 0; i4 < s4; i4 += 1) t6[r5].ks.k[i4].s && (t6[r5].ks.k[i4].s[0].c = t6[r5].closed), t6[r5].ks.k[i4].e && (t6[r5].ks.k[i4].e[0].c = t6[r5].closed); + else "gr" === t6[r5].ty && e5(t6[r5].it); + } + function r4(t6) { + var r5, i4, s4, a4, n4, o3, h3 = t6.length; + for (i4 = 0; i4 < h3; i4 += 1) { + if ((r5 = t6[i4]).hasMask) { + var l3 = r5.masksProperties; + for (a4 = l3.length, s4 = 0; s4 < a4; s4 += 1) if (l3[s4].pt.k.i) l3[s4].pt.k.c = l3[s4].cl; + else for (o3 = l3[s4].pt.k.length, n4 = 0; n4 < o3; n4 += 1) l3[s4].pt.k[n4].s && (l3[s4].pt.k[n4].s[0].c = l3[s4].cl), l3[s4].pt.k[n4].e && (l3[s4].pt.k[n4].e[0].c = l3[s4].cl); + } + 4 === r5.ty && e5(r5.shapes); + } + } + return function(e6) { + if (s3(t5, e6.v) && (r4(e6.layers), e6.assets)) { + var i4, a4 = e6.assets.length; + for (i4 = 0; i4 < a4; i4 += 1) e6.assets[i4].layers && r4(e6.assets[i4].layers); + } + }; + }(); + function c2(t5) { + 0 === t5.t.a.length && t5.t.p; + } + var f2 = { completeData: function(r4) { + r4.__complete || (l2(r4), n3(r4), o2(r4), h2(r4), p2(r4), t4(r4.layers, r4.assets), function(r5, i4) { + if (r5) { + var s4 = 0, a4 = r5.length; + for (s4 = 0; s4 < a4; s4 += 1) 1 === r5[s4].t && (r5[s4].data.layers = e4(r5[s4].data.refId, i4), t4(r5[s4].data.layers, i4)); + } + }(r4.chars, r4.assets), r4.__complete = true); + } }; + return f2.checkColors = l2, f2.checkChars = o2, f2.checkPathProperties = h2, f2.checkShapes = p2, f2.completeLayers = t4, f2; + }()), _workerSelf.assetLoader || (_workerSelf.assetLoader = /* @__PURE__ */ function() { + function t4(t5) { + var e4 = t5.getResponseHeader("content-type"); + return e4 && "json" === t5.responseType && -1 !== e4.indexOf("json") || t5.response && "object" === _typeof$5(t5.response) ? t5.response : t5.response && "string" == typeof t5.response ? JSON.parse(t5.response) : t5.responseText ? JSON.parse(t5.responseText) : null; + } + return { load: function(e4, r3, i3, s3) { + var a3, n3 = new XMLHttpRequest(); + try { + n3.responseType = "json"; + } catch (t5) { + } + n3.onreadystatechange = function() { + if (4 === n3.readyState) if (200 === n3.status) a3 = t4(n3), i3(a3); + else try { + a3 = t4(n3), i3(a3); + } catch (t5) { + s3 && s3(t5); + } + }; + try { + n3.open(["G", "E", "T"].join(""), e4, true); + } catch (t5) { + n3.open(["G", "E", "T"].join(""), r3 + "/" + e4, true); + } + n3.send(); + } }; + }()), "loadAnimation" === t3.data.type) _workerSelf.assetLoader.load(t3.data.path, t3.data.fullPath, function(e4) { + _workerSelf.dataManager.completeData(e4), _workerSelf.postMessage({ id: t3.data.id, payload: e4, status: "success" }); + }, function() { + _workerSelf.postMessage({ id: t3.data.id, status: "error" }); + }); + else if ("complete" === t3.data.type) { + var e3 = t3.data.animation; + _workerSelf.dataManager.completeData(e3), _workerSelf.postMessage({ id: t3.data.id, payload: e3, status: "success" }); + } else "loadData" === t3.data.type && _workerSelf.assetLoader.load(t3.data.path, t3.data.fullPath, function(e4) { + _workerSelf.postMessage({ id: t3.data.id, payload: e4, status: "success" }); + }, function() { + _workerSelf.postMessage({ id: t3.data.id, status: "error" }); + }); + }), e2.onmessage = function(t3) { + var e3 = t3.data, r3 = e3.id, s3 = i2[r3]; + i2[r3] = null, "success" === e3.status ? s3.onComplete(e3.payload) : s3.onError && s3.onError(); + }); + } + function n2(t3, e3) { + var s3 = "processId_" + (r2 += 1); + return i2[s3] = { onComplete: t3, onError: e3 }, s3; + } + return { loadAnimation: function(t3, r3, i3) { + a2(); + var s3 = n2(r3, i3); + e2.postMessage({ type: "loadAnimation", path: t3, fullPath: window.location.origin + window.location.pathname, id: s3 }); + }, loadData: function(t3, r3, i3) { + a2(); + var s3 = n2(r3, i3); + e2.postMessage({ type: "loadData", path: t3, fullPath: window.location.origin + window.location.pathname, id: s3 }); + }, completeAnimation: function(t3, r3, i3) { + a2(); + var s3 = n2(r3, i3); + e2.postMessage({ type: "complete", animation: t3, id: s3 }); + } }; + }(), ImagePreloader = function() { + var t2 = function() { + var t3 = createTag("canvas"); + t3.width = 1, t3.height = 1; + var e3 = t3.getContext("2d"); + return e3.fillStyle = "rgba(0,0,0,0)", e3.fillRect(0, 0, 1, 1), t3; + }(); + function e2() { + this.loadedAssets += 1, this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages && this.imagesLoadedCb && this.imagesLoadedCb(null); + } + function r2() { + this.loadedFootagesCount += 1, this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages && this.imagesLoadedCb && this.imagesLoadedCb(null); + } + function i2(t3, e3, r3) { + var i3 = ""; + if (t3.e) i3 = t3.p; + else if (e3) { + var s3 = t3.p; + -1 !== s3.indexOf("images/") && (s3 = s3.split("/")[1]), i3 = e3 + s3; + } else i3 = r3, i3 += t3.u ? t3.u : "", i3 += t3.p; + return i3; + } + function s2(t3) { + var e3 = 0, r3 = setInterval((function() { + (t3.getBBox().width || e3 > 500) && (this._imageLoaded(), clearInterval(r3)), e3 += 1; + }).bind(this), 50); + } + function a2(t3) { + var e3 = { assetData: t3 }, r3 = i2(t3, this.assetsPath, this.path); + return dataManager.loadData(r3, (function(t4) { + e3.img = t4, this._footageLoaded(); + }).bind(this), (function() { + e3.img = {}, this._footageLoaded(); + }).bind(this)), e3; + } + function n2() { + this._imageLoaded = e2.bind(this), this._footageLoaded = r2.bind(this), this.testImageLoaded = s2.bind(this), this.createFootageData = a2.bind(this), this.assetsPath = "", this.path = "", this.totalImages = 0, this.totalFootages = 0, this.loadedAssets = 0, this.loadedFootagesCount = 0, this.imagesLoadedCb = null, this.images = []; + } + return n2.prototype = { loadAssets: function(t3, e3) { + var r3; + this.imagesLoadedCb = e3; + var i3 = t3.length; + for (r3 = 0; r3 < i3; r3 += 1) t3[r3].layers || (t3[r3].t && "seq" !== t3[r3].t ? 3 === t3[r3].t && (this.totalFootages += 1, this.images.push(this.createFootageData(t3[r3]))) : (this.totalImages += 1, this.images.push(this._createImageData(t3[r3])))); + }, setAssetsPath: function(t3) { + this.assetsPath = t3 || ""; + }, setPath: function(t3) { + this.path = t3 || ""; + }, loadedImages: function() { + return this.totalImages === this.loadedAssets; + }, loadedFootages: function() { + return this.totalFootages === this.loadedFootagesCount; + }, destroy: function() { + this.imagesLoadedCb = null, this.images.length = 0; + }, getAsset: function(t3) { + for (var e3 = 0, r3 = this.images.length; e3 < r3; ) { + if (this.images[e3].assetData === t3) return this.images[e3].img; + e3 += 1; + } + return null; + }, createImgData: function(e3) { + var r3 = i2(e3, this.assetsPath, this.path), s3 = createTag("img"); + s3.crossOrigin = "anonymous", s3.addEventListener("load", this._imageLoaded, false), s3.addEventListener("error", (function() { + a3.img = t2, this._imageLoaded(); + }).bind(this), false), s3.src = r3; + var a3 = { img: s3, assetData: e3 }; + return a3; + }, createImageData: function(e3) { + var r3 = i2(e3, this.assetsPath, this.path), s3 = createNS("image"); + isSafari ? this.testImageLoaded(s3) : s3.addEventListener("load", this._imageLoaded, false), s3.addEventListener("error", (function() { + a3.img = t2, this._imageLoaded(); + }).bind(this), false), s3.setAttributeNS("http://www.w3.org/1999/xlink", "href", r3), this._elementHelper.append ? this._elementHelper.append(s3) : this._elementHelper.appendChild(s3); + var a3 = { img: s3, assetData: e3 }; + return a3; + }, imageLoaded: e2, footageLoaded: r2, setCacheType: function(t3, e3) { + "svg" === t3 ? (this._elementHelper = e3, this._createImageData = this.createImageData.bind(this)) : this._createImageData = this.createImgData.bind(this); + } }, n2; + }(); + function BaseEvent() { + } + BaseEvent.prototype = { triggerEvent: function(t2, e2) { + if (this._cbs[t2]) for (var r2 = this._cbs[t2], i2 = 0; i2 < r2.length; i2 += 1) r2[i2](e2); + }, addEventListener: function(t2, e2) { + return this._cbs[t2] || (this._cbs[t2] = []), this._cbs[t2].push(e2), (function() { + this.removeEventListener(t2, e2); + }).bind(this); + }, removeEventListener: function(t2, e2) { + if (e2) { + if (this._cbs[t2]) { + for (var r2 = 0, i2 = this._cbs[t2].length; r2 < i2; ) this._cbs[t2][r2] === e2 && (this._cbs[t2].splice(r2, 1), r2 -= 1, i2 -= 1), r2 += 1; + this._cbs[t2].length || (this._cbs[t2] = null); + } + } else this._cbs[t2] = null; + } }; + var markerParser = /* @__PURE__ */ function() { + function t2(t3) { + for (var e2, r2 = t3.split("\r\n"), i2 = {}, s2 = 0, a2 = 0; a2 < r2.length; a2 += 1) 2 === (e2 = r2[a2].split(":")).length && (i2[e2[0]] = e2[1].trim(), s2 += 1); + if (0 === s2) throw new Error(); + return i2; + } + return function(e2) { + for (var r2 = [], i2 = 0; i2 < e2.length; i2 += 1) { + var s2 = e2[i2], a2 = { time: s2.tm, duration: s2.dr }; + try { + a2.payload = JSON.parse(e2[i2].cm); + } catch (r3) { + try { + a2.payload = t2(e2[i2].cm); + } catch (t3) { + a2.payload = { name: e2[i2].cm }; + } + } + r2.push(a2); + } + return r2; + }; + }(), ProjectInterface = /* @__PURE__ */ function() { + function t2(t3) { + this.compositions.push(t3); + } + return function() { + function e2(t3) { + for (var e3 = 0, r2 = this.compositions.length; e3 < r2; ) { + if (this.compositions[e3].data && this.compositions[e3].data.nm === t3) return this.compositions[e3].prepareFrame && this.compositions[e3].data.xt && this.compositions[e3].prepareFrame(this.currentFrame), this.compositions[e3].compInterface; + e3 += 1; + } + return null; + } + return e2.compositions = [], e2.currentFrame = 0, e2.registerComposition = t2, e2; + }; + }(), renderers = {}, registerRenderer = function(t2, e2) { + renderers[t2] = e2; + }; + function getRenderer(t2) { + return renderers[t2]; + } + function getRegisteredRenderer() { + if (renderers.canvas) return "canvas"; + for (var t2 in renderers) if (renderers[t2]) return t2; + return ""; + } + function _typeof$4(t2) { + return _typeof$4 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t3) { + return typeof t3; + } : function(t3) { + return t3 && "function" == typeof Symbol && t3.constructor === Symbol && t3 !== Symbol.prototype ? "symbol" : typeof t3; + }, _typeof$4(t2); + } + var AnimationItem = function() { + this._cbs = [], this.name = "", this.path = "", this.isLoaded = false, this.currentFrame = 0, this.currentRawFrame = 0, this.firstFrame = 0, this.totalFrames = 0, this.frameRate = 0, this.frameMult = 0, this.playSpeed = 1, this.playDirection = 1, this.playCount = 0, this.animationData = {}, this.assets = [], this.isPaused = true, this.autoplay = false, this.loop = true, this.renderer = null, this.animationID = createElementID(), this.assetsPath = "", this.timeCompleted = 0, this.segmentPos = 0, this.isSubframeEnabled = getSubframeEnabled(), this.segments = [], this._idle = true, this._completedLoop = false, this.projectInterface = ProjectInterface(), this.imagePreloader = new ImagePreloader(), this.audioController = audioControllerFactory(), this.markers = [], this.configAnimation = this.configAnimation.bind(this), this.onSetupError = this.onSetupError.bind(this), this.onSegmentComplete = this.onSegmentComplete.bind(this), this.drawnFrameEvent = new BMEnterFrameEvent("drawnFrame", 0, 0, 0), this.expressionsPlugin = getExpressionsPlugin(); + }; + extendPrototype([BaseEvent], AnimationItem), AnimationItem.prototype.setParams = function(t2) { + (t2.wrapper || t2.container) && (this.wrapper = t2.wrapper || t2.container); + var e2 = "svg"; + t2.animType ? e2 = t2.animType : t2.renderer && (e2 = t2.renderer); + var r2 = getRenderer(e2); + this.renderer = new r2(this, t2.rendererSettings), this.imagePreloader.setCacheType(e2, this.renderer.globalData.defs), this.renderer.setProjectInterface(this.projectInterface), this.animType = e2, "" === t2.loop || null === t2.loop || void 0 === t2.loop || true === t2.loop ? this.loop = true : false === t2.loop ? this.loop = false : this.loop = parseInt(t2.loop, 10), this.autoplay = !("autoplay" in t2) || t2.autoplay, this.name = t2.name ? t2.name : "", this.autoloadSegments = !Object.prototype.hasOwnProperty.call(t2, "autoloadSegments") || t2.autoloadSegments, this.assetsPath = t2.assetsPath, this.initialSegment = t2.initialSegment, t2.audioFactory && this.audioController.setAudioFactory(t2.audioFactory), t2.animationData ? this.setupAnimation(t2.animationData) : t2.path && (-1 !== t2.path.lastIndexOf("\\") ? this.path = t2.path.substr(0, t2.path.lastIndexOf("\\") + 1) : this.path = t2.path.substr(0, t2.path.lastIndexOf("/") + 1), this.fileName = t2.path.substr(t2.path.lastIndexOf("/") + 1), this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf(".json")), dataManager.loadAnimation(t2.path, this.configAnimation, this.onSetupError)); + }, AnimationItem.prototype.onSetupError = function() { + this.trigger("data_failed"); + }, AnimationItem.prototype.setupAnimation = function(t2) { + dataManager.completeAnimation(t2, this.configAnimation); + }, AnimationItem.prototype.setData = function(t2, e2) { + e2 && "object" !== _typeof$4(e2) && (e2 = JSON.parse(e2)); + var r2 = { wrapper: t2, animationData: e2 }, i2 = t2.attributes; + r2.path = i2.getNamedItem("data-animation-path") ? i2.getNamedItem("data-animation-path").value : i2.getNamedItem("data-bm-path") ? i2.getNamedItem("data-bm-path").value : i2.getNamedItem("bm-path") ? i2.getNamedItem("bm-path").value : "", r2.animType = i2.getNamedItem("data-anim-type") ? i2.getNamedItem("data-anim-type").value : i2.getNamedItem("data-bm-type") ? i2.getNamedItem("data-bm-type").value : i2.getNamedItem("bm-type") ? i2.getNamedItem("bm-type").value : i2.getNamedItem("data-bm-renderer") ? i2.getNamedItem("data-bm-renderer").value : i2.getNamedItem("bm-renderer") ? i2.getNamedItem("bm-renderer").value : getRegisteredRenderer() || "canvas"; + var s2 = i2.getNamedItem("data-anim-loop") ? i2.getNamedItem("data-anim-loop").value : i2.getNamedItem("data-bm-loop") ? i2.getNamedItem("data-bm-loop").value : i2.getNamedItem("bm-loop") ? i2.getNamedItem("bm-loop").value : ""; + "false" === s2 ? r2.loop = false : "true" === s2 ? r2.loop = true : "" !== s2 && (r2.loop = parseInt(s2, 10)); + var a2 = i2.getNamedItem("data-anim-autoplay") ? i2.getNamedItem("data-anim-autoplay").value : i2.getNamedItem("data-bm-autoplay") ? i2.getNamedItem("data-bm-autoplay").value : !i2.getNamedItem("bm-autoplay") || i2.getNamedItem("bm-autoplay").value; + r2.autoplay = "false" !== a2, r2.name = i2.getNamedItem("data-name") ? i2.getNamedItem("data-name").value : i2.getNamedItem("data-bm-name") ? i2.getNamedItem("data-bm-name").value : i2.getNamedItem("bm-name") ? i2.getNamedItem("bm-name").value : "", "false" === (i2.getNamedItem("data-anim-prerender") ? i2.getNamedItem("data-anim-prerender").value : i2.getNamedItem("data-bm-prerender") ? i2.getNamedItem("data-bm-prerender").value : i2.getNamedItem("bm-prerender") ? i2.getNamedItem("bm-prerender").value : "") && (r2.prerender = false), r2.path ? this.setParams(r2) : this.trigger("destroy"); + }, AnimationItem.prototype.includeLayers = function(t2) { + t2.op > this.animationData.op && (this.animationData.op = t2.op, this.totalFrames = Math.floor(t2.op - this.animationData.ip)); + var e2, r2, i2 = this.animationData.layers, s2 = i2.length, a2 = t2.layers, n2 = a2.length; + for (r2 = 0; r2 < n2; r2 += 1) for (e2 = 0; e2 < s2; ) { + if (i2[e2].id === a2[r2].id) { + i2[e2] = a2[r2]; + break; + } + e2 += 1; + } + if ((t2.chars || t2.fonts) && (this.renderer.globalData.fontManager.addChars(t2.chars), this.renderer.globalData.fontManager.addFonts(t2.fonts, this.renderer.globalData.defs)), t2.assets) for (s2 = t2.assets.length, e2 = 0; e2 < s2; e2 += 1) this.animationData.assets.push(t2.assets[e2]); + this.animationData.__complete = false, dataManager.completeAnimation(this.animationData, this.onSegmentComplete); + }, AnimationItem.prototype.onSegmentComplete = function(t2) { + this.animationData = t2; + var e2 = getExpressionsPlugin(); + e2 && e2.initExpressions(this), this.loadNextSegment(); + }, AnimationItem.prototype.loadNextSegment = function() { + var t2 = this.animationData.segments; + if (!t2 || 0 === t2.length || !this.autoloadSegments) return this.trigger("data_ready"), void (this.timeCompleted = this.totalFrames); + var e2 = t2.shift(); + this.timeCompleted = e2.time * this.frameRate; + var r2 = this.path + this.fileName + "_" + this.segmentPos + ".json"; + this.segmentPos += 1, dataManager.loadData(r2, this.includeLayers.bind(this), (function() { + this.trigger("data_failed"); + }).bind(this)); + }, AnimationItem.prototype.loadSegments = function() { + this.animationData.segments || (this.timeCompleted = this.totalFrames), this.loadNextSegment(); + }, AnimationItem.prototype.imagesLoaded = function() { + this.trigger("loaded_images"), this.checkLoaded(); + }, AnimationItem.prototype.preloadImages = function() { + this.imagePreloader.setAssetsPath(this.assetsPath), this.imagePreloader.setPath(this.path), this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this)); + }, AnimationItem.prototype.configAnimation = function(t2) { + if (this.renderer) try { + this.animationData = t2, this.initialSegment ? (this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]), this.firstFrame = Math.round(this.initialSegment[0])) : (this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip), this.firstFrame = Math.round(this.animationData.ip)), this.renderer.configAnimation(t2), t2.assets || (t2.assets = []), this.assets = this.animationData.assets, this.frameRate = this.animationData.fr, this.frameMult = this.animationData.fr / 1e3, this.renderer.searchExtraCompositions(t2.assets), this.markers = markerParser(t2.markers || []), this.trigger("config_ready"), this.preloadImages(), this.loadSegments(), this.updaFrameModifier(), this.waitForFontsLoaded(), this.isPaused && this.audioController.pause(); + } catch (t3) { + this.triggerConfigError(t3); + } + }, AnimationItem.prototype.waitForFontsLoaded = function() { + this.renderer && (this.renderer.globalData.fontManager.isLoaded ? this.checkLoaded() : setTimeout(this.waitForFontsLoaded.bind(this), 20)); + }, AnimationItem.prototype.checkLoaded = function() { + if (!this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || "canvas" !== this.renderer.rendererType) && this.imagePreloader.loadedFootages()) { + this.isLoaded = true; + var t2 = getExpressionsPlugin(); + t2 && t2.initExpressions(this), this.renderer.initItems(), setTimeout((function() { + this.trigger("DOMLoaded"); + }).bind(this), 0), this.gotoFrame(), this.autoplay && this.play(); + } + }, AnimationItem.prototype.resize = function(t2, e2) { + var r2 = "number" == typeof t2 ? t2 : void 0, i2 = "number" == typeof e2 ? e2 : void 0; + this.renderer.updateContainerSize(r2, i2); + }, AnimationItem.prototype.setSubframe = function(t2) { + this.isSubframeEnabled = !!t2; + }, AnimationItem.prototype.gotoFrame = function() { + this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame, this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted && (this.currentFrame = this.timeCompleted), this.trigger("enterFrame"), this.renderFrame(), this.trigger("drawnFrame"); + }, AnimationItem.prototype.renderFrame = function() { + if (false !== this.isLoaded && this.renderer) try { + this.expressionsPlugin && this.expressionsPlugin.resetFrame(), this.renderer.renderFrame(this.currentFrame + this.firstFrame); + } catch (t2) { + this.triggerRenderFrameError(t2); + } + }, AnimationItem.prototype.play = function(t2) { + t2 && this.name !== t2 || true === this.isPaused && (this.isPaused = false, this.trigger("_play"), this.audioController.resume(), this._idle && (this._idle = false, this.trigger("_active"))); + }, AnimationItem.prototype.pause = function(t2) { + t2 && this.name !== t2 || false === this.isPaused && (this.isPaused = true, this.trigger("_pause"), this._idle = true, this.trigger("_idle"), this.audioController.pause()); + }, AnimationItem.prototype.togglePause = function(t2) { + t2 && this.name !== t2 || (true === this.isPaused ? this.play() : this.pause()); + }, AnimationItem.prototype.stop = function(t2) { + t2 && this.name !== t2 || (this.pause(), this.playCount = 0, this._completedLoop = false, this.setCurrentRawFrameValue(0)); + }, AnimationItem.prototype.getMarkerData = function(t2) { + for (var e2, r2 = 0; r2 < this.markers.length; r2 += 1) if ((e2 = this.markers[r2]).payload && e2.payload.name === t2) return e2; + return null; + }, AnimationItem.prototype.goToAndStop = function(t2, e2, r2) { + if (!r2 || this.name === r2) { + var i2 = Number(t2); + if (isNaN(i2)) { + var s2 = this.getMarkerData(t2); + s2 && this.goToAndStop(s2.time, true); + } else e2 ? this.setCurrentRawFrameValue(t2) : this.setCurrentRawFrameValue(t2 * this.frameModifier); + this.pause(); + } + }, AnimationItem.prototype.goToAndPlay = function(t2, e2, r2) { + if (!r2 || this.name === r2) { + var i2 = Number(t2); + if (isNaN(i2)) { + var s2 = this.getMarkerData(t2); + s2 && (s2.duration ? this.playSegments([s2.time, s2.time + s2.duration], true) : this.goToAndStop(s2.time, true)); + } else this.goToAndStop(i2, e2, r2); + this.play(); + } + }, AnimationItem.prototype.advanceTime = function(t2) { + if (true !== this.isPaused && false !== this.isLoaded) { + var e2 = this.currentRawFrame + t2 * this.frameModifier, r2 = false; + e2 >= this.totalFrames - 1 && this.frameModifier > 0 ? this.loop && this.playCount !== this.loop ? e2 >= this.totalFrames ? (this.playCount += 1, this.checkSegments(e2 % this.totalFrames) || (this.setCurrentRawFrameValue(e2 % this.totalFrames), this._completedLoop = true, this.trigger("loopComplete"))) : this.setCurrentRawFrameValue(e2) : this.checkSegments(e2 > this.totalFrames ? e2 % this.totalFrames : 0) || (r2 = true, e2 = this.totalFrames - 1) : e2 < 0 ? this.checkSegments(e2 % this.totalFrames) || (!this.loop || this.playCount-- <= 0 && true !== this.loop ? (r2 = true, e2 = 0) : (this.setCurrentRawFrameValue(this.totalFrames + e2 % this.totalFrames), this._completedLoop ? this.trigger("loopComplete") : this._completedLoop = true)) : this.setCurrentRawFrameValue(e2), r2 && (this.setCurrentRawFrameValue(e2), this.pause(), this.trigger("complete")); + } + }, AnimationItem.prototype.adjustSegment = function(t2, e2) { + this.playCount = 0, t2[1] < t2[0] ? (this.frameModifier > 0 && (this.playSpeed < 0 ? this.setSpeed(-this.playSpeed) : this.setDirection(-1)), this.totalFrames = t2[0] - t2[1], this.timeCompleted = this.totalFrames, this.firstFrame = t2[1], this.setCurrentRawFrameValue(this.totalFrames - 1e-3 - e2)) : t2[1] > t2[0] && (this.frameModifier < 0 && (this.playSpeed < 0 ? this.setSpeed(-this.playSpeed) : this.setDirection(1)), this.totalFrames = t2[1] - t2[0], this.timeCompleted = this.totalFrames, this.firstFrame = t2[0], this.setCurrentRawFrameValue(1e-3 + e2)), this.trigger("segmentStart"); + }, AnimationItem.prototype.setSegment = function(t2, e2) { + var r2 = -1; + this.isPaused && (this.currentRawFrame + this.firstFrame < t2 ? r2 = t2 : this.currentRawFrame + this.firstFrame > e2 && (r2 = e2 - t2)), this.firstFrame = t2, this.totalFrames = e2 - t2, this.timeCompleted = this.totalFrames, -1 !== r2 && this.goToAndStop(r2, true); + }, AnimationItem.prototype.playSegments = function(t2, e2) { + if (e2 && (this.segments.length = 0), "object" === _typeof$4(t2[0])) { + var r2, i2 = t2.length; + for (r2 = 0; r2 < i2; r2 += 1) this.segments.push(t2[r2]); + } else this.segments.push(t2); + this.segments.length && e2 && this.adjustSegment(this.segments.shift(), 0), this.isPaused && this.play(); + }, AnimationItem.prototype.resetSegments = function(t2) { + this.segments.length = 0, this.segments.push([this.animationData.ip, this.animationData.op]), t2 && this.checkSegments(0); + }, AnimationItem.prototype.checkSegments = function(t2) { + return !!this.segments.length && (this.adjustSegment(this.segments.shift(), t2), true); + }, AnimationItem.prototype.destroy = function(t2) { + t2 && this.name !== t2 || !this.renderer || (this.renderer.destroy(), this.imagePreloader.destroy(), this.trigger("destroy"), this._cbs = null, this.onEnterFrame = null, this.onLoopComplete = null, this.onComplete = null, this.onSegmentStart = null, this.onDestroy = null, this.renderer = null, this.expressionsPlugin = null, this.imagePreloader = null, this.projectInterface = null); + }, AnimationItem.prototype.setCurrentRawFrameValue = function(t2) { + this.currentRawFrame = t2, this.gotoFrame(); + }, AnimationItem.prototype.setSpeed = function(t2) { + this.playSpeed = t2, this.updaFrameModifier(); + }, AnimationItem.prototype.setDirection = function(t2) { + this.playDirection = t2 < 0 ? -1 : 1, this.updaFrameModifier(); + }, AnimationItem.prototype.setLoop = function(t2) { + this.loop = t2; + }, AnimationItem.prototype.setVolume = function(t2, e2) { + e2 && this.name !== e2 || this.audioController.setVolume(t2); + }, AnimationItem.prototype.getVolume = function() { + return this.audioController.getVolume(); + }, AnimationItem.prototype.mute = function(t2) { + t2 && this.name !== t2 || this.audioController.mute(); + }, AnimationItem.prototype.unmute = function(t2) { + t2 && this.name !== t2 || this.audioController.unmute(); + }, AnimationItem.prototype.updaFrameModifier = function() { + this.frameModifier = this.frameMult * this.playSpeed * this.playDirection, this.audioController.setRate(this.playSpeed * this.playDirection); + }, AnimationItem.prototype.getPath = function() { + return this.path; + }, AnimationItem.prototype.getAssetsPath = function(t2) { + var e2 = ""; + if (t2.e) e2 = t2.p; + else if (this.assetsPath) { + var r2 = t2.p; + -1 !== r2.indexOf("images/") && (r2 = r2.split("/")[1]), e2 = this.assetsPath + r2; + } else e2 = this.path, e2 += t2.u ? t2.u : "", e2 += t2.p; + return e2; + }, AnimationItem.prototype.getAssetData = function(t2) { + for (var e2 = 0, r2 = this.assets.length; e2 < r2; ) { + if (t2 === this.assets[e2].id) return this.assets[e2]; + e2 += 1; + } + return null; + }, AnimationItem.prototype.hide = function() { + this.renderer.hide(); + }, AnimationItem.prototype.show = function() { + this.renderer.show(); + }, AnimationItem.prototype.getDuration = function(t2) { + return t2 ? this.totalFrames : this.totalFrames / this.frameRate; + }, AnimationItem.prototype.updateDocumentData = function(t2, e2, r2) { + try { + this.renderer.getElementByPath(t2).updateDocumentData(e2, r2); + } catch (t3) { + } + }, AnimationItem.prototype.trigger = function(t2) { + if (this._cbs && this._cbs[t2]) switch (t2) { + case "enterFrame": + this.triggerEvent(t2, new BMEnterFrameEvent(t2, this.currentFrame, this.totalFrames, this.frameModifier)); + break; + case "drawnFrame": + this.drawnFrameEvent.currentTime = this.currentFrame, this.drawnFrameEvent.totalTime = this.totalFrames, this.drawnFrameEvent.direction = this.frameModifier, this.triggerEvent(t2, this.drawnFrameEvent); + break; + case "loopComplete": + this.triggerEvent(t2, new BMCompleteLoopEvent(t2, this.loop, this.playCount, this.frameMult)); + break; + case "complete": + this.triggerEvent(t2, new BMCompleteEvent(t2, this.frameMult)); + break; + case "segmentStart": + this.triggerEvent(t2, new BMSegmentStartEvent(t2, this.firstFrame, this.totalFrames)); + break; + case "destroy": + this.triggerEvent(t2, new BMDestroyEvent(t2, this)); + break; + default: + this.triggerEvent(t2); + } + "enterFrame" === t2 && this.onEnterFrame && this.onEnterFrame.call(this, new BMEnterFrameEvent(t2, this.currentFrame, this.totalFrames, this.frameMult)), "loopComplete" === t2 && this.onLoopComplete && this.onLoopComplete.call(this, new BMCompleteLoopEvent(t2, this.loop, this.playCount, this.frameMult)), "complete" === t2 && this.onComplete && this.onComplete.call(this, new BMCompleteEvent(t2, this.frameMult)), "segmentStart" === t2 && this.onSegmentStart && this.onSegmentStart.call(this, new BMSegmentStartEvent(t2, this.firstFrame, this.totalFrames)), "destroy" === t2 && this.onDestroy && this.onDestroy.call(this, new BMDestroyEvent(t2, this)); + }, AnimationItem.prototype.triggerRenderFrameError = function(t2) { + var e2 = new BMRenderFrameErrorEvent(t2, this.currentFrame); + this.triggerEvent("error", e2), this.onError && this.onError.call(this, e2); + }, AnimationItem.prototype.triggerConfigError = function(t2) { + var e2 = new BMConfigErrorEvent(t2, this.currentFrame); + this.triggerEvent("error", e2), this.onError && this.onError.call(this, e2); + }; + var animationManager = function() { + var t2 = {}, e2 = [], r2 = 0, i2 = 0, s2 = 0, a2 = true, n2 = false; + function o2(t3) { + for (var r3 = 0, s3 = t3.target; r3 < i2; ) e2[r3].animation === s3 && (e2.splice(r3, 1), r3 -= 1, i2 -= 1, s3.isPaused || p2()), r3 += 1; + } + function h2(t3, r3) { + if (!t3) return null; + for (var s3 = 0; s3 < i2; ) { + if (e2[s3].elem === t3 && null !== e2[s3].elem) return e2[s3].animation; + s3 += 1; + } + var a3 = new AnimationItem(); + return c2(a3, t3), a3.setData(t3, r3), a3; + } + function l2() { + s2 += 1, d2(); + } + function p2() { + s2 -= 1; + } + function c2(t3, r3) { + t3.addEventListener("destroy", o2), t3.addEventListener("_active", l2), t3.addEventListener("_idle", p2), e2.push({ elem: r3, animation: t3 }), i2 += 1; + } + function f2(t3) { + var o3, h3 = t3 - r2; + for (o3 = 0; o3 < i2; o3 += 1) e2[o3].animation.advanceTime(h3); + r2 = t3, s2 && !n2 ? window.requestAnimationFrame(f2) : a2 = true; + } + function u2(t3) { + r2 = t3, window.requestAnimationFrame(f2); + } + function d2() { + !n2 && s2 && a2 && (window.requestAnimationFrame(u2), a2 = false); + } + return t2.registerAnimation = h2, t2.loadAnimation = function(t3) { + var e3 = new AnimationItem(); + return c2(e3, null), e3.setParams(t3), e3; + }, t2.setSpeed = function(t3, r3) { + var s3; + for (s3 = 0; s3 < i2; s3 += 1) e2[s3].animation.setSpeed(t3, r3); + }, t2.setDirection = function(t3, r3) { + var s3; + for (s3 = 0; s3 < i2; s3 += 1) e2[s3].animation.setDirection(t3, r3); + }, t2.play = function(t3) { + var r3; + for (r3 = 0; r3 < i2; r3 += 1) e2[r3].animation.play(t3); + }, t2.pause = function(t3) { + var r3; + for (r3 = 0; r3 < i2; r3 += 1) e2[r3].animation.pause(t3); + }, t2.stop = function(t3) { + var r3; + for (r3 = 0; r3 < i2; r3 += 1) e2[r3].animation.stop(t3); + }, t2.togglePause = function(t3) { + var r3; + for (r3 = 0; r3 < i2; r3 += 1) e2[r3].animation.togglePause(t3); + }, t2.searchAnimations = function(t3, e3, r3) { + var i3, s3 = [].concat([].slice.call(document.getElementsByClassName("lottie")), [].slice.call(document.getElementsByClassName("bodymovin"))), a3 = s3.length; + for (i3 = 0; i3 < a3; i3 += 1) r3 && s3[i3].setAttribute("data-bm-type", r3), h2(s3[i3], t3); + if (e3 && 0 === a3) { + r3 || (r3 = "svg"); + var n3 = document.getElementsByTagName("body")[0]; + n3.innerText = ""; + var o3 = createTag("div"); + o3.style.width = "100%", o3.style.height = "100%", o3.setAttribute("data-bm-type", r3), n3.appendChild(o3), h2(o3, t3); + } + }, t2.resize = function() { + var t3; + for (t3 = 0; t3 < i2; t3 += 1) e2[t3].animation.resize(); + }, t2.goToAndStop = function(t3, r3, s3) { + var a3; + for (a3 = 0; a3 < i2; a3 += 1) e2[a3].animation.goToAndStop(t3, r3, s3); + }, t2.destroy = function(t3) { + var r3; + for (r3 = i2 - 1; r3 >= 0; r3 -= 1) e2[r3].animation.destroy(t3); + }, t2.freeze = function() { + n2 = true; + }, t2.unfreeze = function() { + n2 = false, d2(); + }, t2.setVolume = function(t3, r3) { + var s3; + for (s3 = 0; s3 < i2; s3 += 1) e2[s3].animation.setVolume(t3, r3); + }, t2.mute = function(t3) { + var r3; + for (r3 = 0; r3 < i2; r3 += 1) e2[r3].animation.mute(t3); + }, t2.unmute = function(t3) { + var r3; + for (r3 = 0; r3 < i2; r3 += 1) e2[r3].animation.unmute(t3); + }, t2.getRegisteredAnimations = function() { + var t3, r3 = e2.length, i3 = []; + for (t3 = 0; t3 < r3; t3 += 1) i3.push(e2[t3].animation); + return i3; + }, t2; + }(), BezierFactory = function() { + var t2 = { getBezierEasing: function(t3, r3, i3, s3, a3) { + var n3 = a3 || ("bez_" + t3 + "_" + r3 + "_" + i3 + "_" + s3).replace(/\./g, "p"); + if (e2[n3]) return e2[n3]; + var o3 = new l2([t3, r3, i3, s3]); + return e2[n3] = o3, o3; + } }, e2 = {}, r2 = 0.1, i2 = "function" == typeof Float32Array; + function s2(t3, e3) { + return 1 - 3 * e3 + 3 * t3; + } + function a2(t3, e3) { + return 3 * e3 - 6 * t3; + } + function n2(t3) { + return 3 * t3; + } + function o2(t3, e3, r3) { + return ((s2(e3, r3) * t3 + a2(e3, r3)) * t3 + n2(e3)) * t3; + } + function h2(t3, e3, r3) { + return 3 * s2(e3, r3) * t3 * t3 + 2 * a2(e3, r3) * t3 + n2(e3); + } + function l2(t3) { + this._p = t3, this._mSampleValues = i2 ? new Float32Array(11) : new Array(11), this._precomputed = false, this.get = this.get.bind(this); + } + return l2.prototype = { get: function(t3) { + var e3 = this._p[0], r3 = this._p[1], i3 = this._p[2], s3 = this._p[3]; + return this._precomputed || this._precompute(), e3 === r3 && i3 === s3 ? t3 : 0 === t3 ? 0 : 1 === t3 ? 1 : o2(this._getTForX(t3), r3, s3); + }, _precompute: function() { + var t3 = this._p[0], e3 = this._p[1], r3 = this._p[2], i3 = this._p[3]; + this._precomputed = true, t3 === e3 && r3 === i3 || this._calcSampleValues(); + }, _calcSampleValues: function() { + for (var t3 = this._p[0], e3 = this._p[2], i3 = 0; i3 < 11; ++i3) this._mSampleValues[i3] = o2(i3 * r2, t3, e3); + }, _getTForX: function(t3) { + for (var e3 = this._p[0], i3 = this._p[2], s3 = this._mSampleValues, a3 = 0, n3 = 1; 10 !== n3 && s3[n3] <= t3; ++n3) a3 += r2; + var l3 = a3 + (t3 - s3[--n3]) / (s3[n3 + 1] - s3[n3]) * r2, p2 = h2(l3, e3, i3); + return p2 >= 1e-3 ? function(t4, e4, r3, i4) { + for (var s4 = 0; s4 < 4; ++s4) { + var a4 = h2(e4, r3, i4); + if (0 === a4) return e4; + e4 -= (o2(e4, r3, i4) - t4) / a4; + } + return e4; + }(t3, l3, e3, i3) : 0 === p2 ? l3 : function(t4, e4, r3, i4, s4) { + var a4, n4, h3 = 0; + do { + (a4 = o2(n4 = e4 + (r3 - e4) / 2, i4, s4) - t4) > 0 ? r3 = n4 : e4 = n4; + } while (Math.abs(a4) > 1e-7 && ++h3 < 10); + return n4; + }(t3, a3, a3 + r2, e3, i3); + } }, t2; + }(), pooling = { double: function(t2) { + return t2.concat(createSizedArray(t2.length)); + } }, poolFactory = function(t2, e2, r2) { + var i2 = 0, s2 = t2, a2 = createSizedArray(s2); + return { newElement: function() { + return i2 ? a2[i2 -= 1] : e2(); + }, release: function(t3) { + i2 === s2 && (a2 = pooling.double(a2), s2 *= 2), r2 && r2(t3), a2[i2] = t3, i2 += 1; + } }; + }, bezierLengthPool = poolFactory(8, function() { + return { addedLength: 0, percents: createTypedArray("float32", getDefaultCurveSegments()), lengths: createTypedArray("float32", getDefaultCurveSegments()) }; + }), segmentsLengthPool = poolFactory(8, function() { + return { lengths: [], totalLength: 0 }; + }, function(t2) { + var e2, r2 = t2.lengths.length; + for (e2 = 0; e2 < r2; e2 += 1) bezierLengthPool.release(t2.lengths[e2]); + t2.lengths.length = 0; + }); + function bezFunction() { + var t2 = Math; + function e2(t3, e3, r3, i3, s3, a3) { + var n3 = t3 * i3 + e3 * s3 + r3 * a3 - s3 * i3 - a3 * t3 - r3 * e3; + return n3 > -1e-3 && n3 < 1e-3; + } + var r2 = function(t3, e3, r3, i3) { + var s3, a3, n3, o3, h3, l2, p2 = getDefaultCurveSegments(), c2 = 0, f2 = [], u2 = [], d2 = bezierLengthPool.newElement(); + for (n3 = r3.length, s3 = 0; s3 < p2; s3 += 1) { + for (h3 = s3 / (p2 - 1), l2 = 0, a3 = 0; a3 < n3; a3 += 1) o3 = bmPow(1 - h3, 3) * t3[a3] + 3 * bmPow(1 - h3, 2) * h3 * r3[a3] + 3 * (1 - h3) * bmPow(h3, 2) * i3[a3] + bmPow(h3, 3) * e3[a3], f2[a3] = o3, null !== u2[a3] && (l2 += bmPow(f2[a3] - u2[a3], 2)), u2[a3] = f2[a3]; + l2 && (c2 += l2 = bmSqrt(l2)), d2.percents[s3] = h3, d2.lengths[s3] = c2; + } + return d2.addedLength = c2, d2; + }; + function i2(t3) { + this.segmentLength = 0, this.points = new Array(t3); + } + function s2(t3, e3) { + this.partialLength = t3, this.point = e3; + } + var a2, n2 = (a2 = {}, function(t3, r3, n3, o3) { + var h3 = (t3[0] + "_" + t3[1] + "_" + r3[0] + "_" + r3[1] + "_" + n3[0] + "_" + n3[1] + "_" + o3[0] + "_" + o3[1]).replace(/\./g, "p"); + if (!a2[h3]) { + var l2, p2, c2, f2, u2, d2, m2, y2 = getDefaultCurveSegments(), g2 = 0, v2 = null; + 2 === t3.length && (t3[0] !== r3[0] || t3[1] !== r3[1]) && e2(t3[0], t3[1], r3[0], r3[1], t3[0] + n3[0], t3[1] + n3[1]) && e2(t3[0], t3[1], r3[0], r3[1], r3[0] + o3[0], r3[1] + o3[1]) && (y2 = 2); + var b2 = new i2(y2); + for (c2 = n3.length, l2 = 0; l2 < y2; l2 += 1) { + for (m2 = createSizedArray(c2), u2 = l2 / (y2 - 1), d2 = 0, p2 = 0; p2 < c2; p2 += 1) f2 = bmPow(1 - u2, 3) * t3[p2] + 3 * bmPow(1 - u2, 2) * u2 * (t3[p2] + n3[p2]) + 3 * (1 - u2) * bmPow(u2, 2) * (r3[p2] + o3[p2]) + bmPow(u2, 3) * r3[p2], m2[p2] = f2, null !== v2 && (d2 += bmPow(m2[p2] - v2[p2], 2)); + g2 += d2 = bmSqrt(d2), b2.points[l2] = new s2(d2, m2), v2 = m2; + } + b2.segmentLength = g2, a2[h3] = b2; + } + return a2[h3]; + }); + function o2(t3, e3) { + var r3 = e3.percents, i3 = e3.lengths, s3 = r3.length, a3 = bmFloor((s3 - 1) * t3), n3 = t3 * e3.addedLength, o3 = 0; + if (a3 === s3 - 1 || 0 === a3 || n3 === i3[a3]) return r3[a3]; + for (var h3 = i3[a3] > n3 ? -1 : 1, l2 = true; l2; ) if (i3[a3] <= n3 && i3[a3 + 1] > n3 ? (o3 = (n3 - i3[a3]) / (i3[a3 + 1] - i3[a3]), l2 = false) : a3 += h3, a3 < 0 || a3 >= s3 - 1) { + if (a3 === s3 - 1) return r3[a3]; + l2 = false; + } + return r3[a3] + (r3[a3 + 1] - r3[a3]) * o3; + } + var h2 = createTypedArray("float32", 8); + return { getSegmentsLength: function(t3) { + var e3, i3 = segmentsLengthPool.newElement(), s3 = t3.c, a3 = t3.v, n3 = t3.o, o3 = t3.i, h3 = t3._length, l2 = i3.lengths, p2 = 0; + for (e3 = 0; e3 < h3 - 1; e3 += 1) l2[e3] = r2(a3[e3], a3[e3 + 1], n3[e3], o3[e3 + 1]), p2 += l2[e3].addedLength; + return s3 && h3 && (l2[e3] = r2(a3[e3], a3[0], n3[e3], o3[0]), p2 += l2[e3].addedLength), i3.totalLength = p2, i3; + }, getNewSegment: function(e3, r3, i3, s3, a3, n3, l2) { + a3 < 0 ? a3 = 0 : a3 > 1 && (a3 = 1); + var p2, c2 = o2(a3, l2), f2 = o2(n3 = n3 > 1 ? 1 : n3, l2), u2 = e3.length, d2 = 1 - c2, m2 = 1 - f2, y2 = d2 * d2 * d2, g2 = c2 * d2 * d2 * 3, v2 = c2 * c2 * d2 * 3, b2 = c2 * c2 * c2, _2 = d2 * d2 * m2, P2 = c2 * d2 * m2 + d2 * c2 * m2 + d2 * d2 * f2, S2 = c2 * c2 * m2 + d2 * c2 * f2 + c2 * d2 * f2, E2 = c2 * c2 * f2, x2 = d2 * m2 * m2, C2 = c2 * m2 * m2 + d2 * f2 * m2 + d2 * m2 * f2, A2 = c2 * f2 * m2 + d2 * f2 * f2 + c2 * m2 * f2, w2 = c2 * f2 * f2, k2 = m2 * m2 * m2, T2 = f2 * m2 * m2 + m2 * f2 * m2 + m2 * m2 * f2, M2 = f2 * f2 * m2 + m2 * f2 * f2 + f2 * m2 * f2, D = f2 * f2 * f2; + for (p2 = 0; p2 < u2; p2 += 1) h2[4 * p2] = t2.round(1e3 * (y2 * e3[p2] + g2 * i3[p2] + v2 * s3[p2] + b2 * r3[p2])) / 1e3, h2[4 * p2 + 1] = t2.round(1e3 * (_2 * e3[p2] + P2 * i3[p2] + S2 * s3[p2] + E2 * r3[p2])) / 1e3, h2[4 * p2 + 2] = t2.round(1e3 * (x2 * e3[p2] + C2 * i3[p2] + A2 * s3[p2] + w2 * r3[p2])) / 1e3, h2[4 * p2 + 3] = t2.round(1e3 * (k2 * e3[p2] + T2 * i3[p2] + M2 * s3[p2] + D * r3[p2])) / 1e3; + return h2; + }, getPointInSegment: function(e3, r3, i3, s3, a3, n3) { + var h3 = o2(a3, n3), l2 = 1 - h3; + return [t2.round(1e3 * (l2 * l2 * l2 * e3[0] + (h3 * l2 * l2 + l2 * h3 * l2 + l2 * l2 * h3) * i3[0] + (h3 * h3 * l2 + l2 * h3 * h3 + h3 * l2 * h3) * s3[0] + h3 * h3 * h3 * r3[0])) / 1e3, t2.round(1e3 * (l2 * l2 * l2 * e3[1] + (h3 * l2 * l2 + l2 * h3 * l2 + l2 * l2 * h3) * i3[1] + (h3 * h3 * l2 + l2 * h3 * h3 + h3 * l2 * h3) * s3[1] + h3 * h3 * h3 * r3[1])) / 1e3]; + }, buildBezierData: n2, pointOnLine2D: e2, pointOnLine3D: function(r3, i3, s3, a3, n3, o3, h3, l2, p2) { + if (0 === s3 && 0 === o3 && 0 === p2) return e2(r3, i3, a3, n3, h3, l2); + var c2, f2 = t2.sqrt(t2.pow(a3 - r3, 2) + t2.pow(n3 - i3, 2) + t2.pow(o3 - s3, 2)), u2 = t2.sqrt(t2.pow(h3 - r3, 2) + t2.pow(l2 - i3, 2) + t2.pow(p2 - s3, 2)), d2 = t2.sqrt(t2.pow(h3 - a3, 2) + t2.pow(l2 - n3, 2) + t2.pow(p2 - o3, 2)); + return (c2 = f2 > u2 ? f2 > d2 ? f2 - u2 - d2 : d2 - u2 - f2 : d2 > u2 ? d2 - u2 - f2 : u2 - f2 - d2) > -1e-4 && c2 < 1e-4; + } }; + } + var bez = bezFunction(), initFrame = initialDefaultFrame, mathAbs = Math.abs; + function interpolateValue(t2, e2) { + var r2, i2 = this.offsetTime; + "multidimensional" === this.propType && (r2 = createTypedArray("float32", this.pv.length)); + for (var s2, a2, n2, o2, h2, l2, p2, c2, f2, u2 = e2.lastIndex, d2 = u2, m2 = this.keyframes.length - 1, y2 = true; y2; ) { + if (s2 = this.keyframes[d2], a2 = this.keyframes[d2 + 1], d2 === m2 - 1 && t2 >= a2.t - i2) { + s2.h && (s2 = a2), u2 = 0; + break; + } + if (a2.t - i2 > t2) { + u2 = d2; + break; + } + d2 < m2 - 1 ? d2 += 1 : (u2 = 0, y2 = false); + } + n2 = this.keyframesMetadata[d2] || {}; + var g2, v2 = a2.t - i2, b2 = s2.t - i2; + if (s2.to) { + n2.bezierData || (n2.bezierData = bez.buildBezierData(s2.s, a2.s || s2.e, s2.to, s2.ti)); + var _2 = n2.bezierData; + if (t2 >= v2 || t2 < b2) { + var P2 = t2 >= v2 ? _2.points.length - 1 : 0; + for (h2 = _2.points[P2].point.length, o2 = 0; o2 < h2; o2 += 1) r2[o2] = _2.points[P2].point[o2]; + } else { + n2.__fnct ? f2 = n2.__fnct : (f2 = BezierFactory.getBezierEasing(s2.o.x, s2.o.y, s2.i.x, s2.i.y, s2.n).get, n2.__fnct = f2), l2 = f2((t2 - b2) / (v2 - b2)); + var S2, E2 = _2.segmentLength * l2, x2 = e2.lastFrame < t2 && e2._lastKeyframeIndex === d2 ? e2._lastAddedLength : 0; + for (c2 = e2.lastFrame < t2 && e2._lastKeyframeIndex === d2 ? e2._lastPoint : 0, y2 = true, p2 = _2.points.length; y2; ) { + if (x2 += _2.points[c2].partialLength, 0 === E2 || 0 === l2 || c2 === _2.points.length - 1) { + for (h2 = _2.points[c2].point.length, o2 = 0; o2 < h2; o2 += 1) r2[o2] = _2.points[c2].point[o2]; + break; + } + if (E2 >= x2 && E2 < x2 + _2.points[c2 + 1].partialLength) { + for (S2 = (E2 - x2) / _2.points[c2 + 1].partialLength, h2 = _2.points[c2].point.length, o2 = 0; o2 < h2; o2 += 1) r2[o2] = _2.points[c2].point[o2] + (_2.points[c2 + 1].point[o2] - _2.points[c2].point[o2]) * S2; + break; + } + c2 < p2 - 1 ? c2 += 1 : y2 = false; + } + e2._lastPoint = c2, e2._lastAddedLength = x2 - _2.points[c2].partialLength, e2._lastKeyframeIndex = d2; + } + } else { + var C2, A2, w2, k2, T2; + if (m2 = s2.s.length, g2 = a2.s || s2.e, this.sh && 1 !== s2.h) t2 >= v2 ? (r2[0] = g2[0], r2[1] = g2[1], r2[2] = g2[2]) : t2 <= b2 ? (r2[0] = s2.s[0], r2[1] = s2.s[1], r2[2] = s2.s[2]) : quaternionToEuler(r2, slerp(createQuaternion(s2.s), createQuaternion(g2), (t2 - b2) / (v2 - b2))); + else for (d2 = 0; d2 < m2; d2 += 1) 1 !== s2.h && (t2 >= v2 ? l2 = 1 : t2 < b2 ? l2 = 0 : (s2.o.x.constructor === Array ? (n2.__fnct || (n2.__fnct = []), n2.__fnct[d2] ? f2 = n2.__fnct[d2] : (C2 = void 0 === s2.o.x[d2] ? s2.o.x[0] : s2.o.x[d2], A2 = void 0 === s2.o.y[d2] ? s2.o.y[0] : s2.o.y[d2], w2 = void 0 === s2.i.x[d2] ? s2.i.x[0] : s2.i.x[d2], k2 = void 0 === s2.i.y[d2] ? s2.i.y[0] : s2.i.y[d2], f2 = BezierFactory.getBezierEasing(C2, A2, w2, k2).get, n2.__fnct[d2] = f2)) : n2.__fnct ? f2 = n2.__fnct : (C2 = s2.o.x, A2 = s2.o.y, w2 = s2.i.x, k2 = s2.i.y, f2 = BezierFactory.getBezierEasing(C2, A2, w2, k2).get, s2.keyframeMetadata = f2), l2 = f2((t2 - b2) / (v2 - b2)))), g2 = a2.s || s2.e, T2 = 1 === s2.h ? s2.s[d2] : s2.s[d2] + (g2[d2] - s2.s[d2]) * l2, "multidimensional" === this.propType ? r2[d2] = T2 : r2 = T2; + } + return e2.lastIndex = u2, r2; + } + function slerp(t2, e2, r2) { + var i2, s2, a2, n2, o2, h2 = [], l2 = t2[0], p2 = t2[1], c2 = t2[2], f2 = t2[3], u2 = e2[0], d2 = e2[1], m2 = e2[2], y2 = e2[3]; + return (s2 = l2 * u2 + p2 * d2 + c2 * m2 + f2 * y2) < 0 && (s2 = -s2, u2 = -u2, d2 = -d2, m2 = -m2, y2 = -y2), 1 - s2 > 1e-6 ? (i2 = Math.acos(s2), a2 = Math.sin(i2), n2 = Math.sin((1 - r2) * i2) / a2, o2 = Math.sin(r2 * i2) / a2) : (n2 = 1 - r2, o2 = r2), h2[0] = n2 * l2 + o2 * u2, h2[1] = n2 * p2 + o2 * d2, h2[2] = n2 * c2 + o2 * m2, h2[3] = n2 * f2 + o2 * y2, h2; + } + function quaternionToEuler(t2, e2) { + var r2 = e2[0], i2 = e2[1], s2 = e2[2], a2 = e2[3], n2 = Math.atan2(2 * i2 * a2 - 2 * r2 * s2, 1 - 2 * i2 * i2 - 2 * s2 * s2), o2 = Math.asin(2 * r2 * i2 + 2 * s2 * a2), h2 = Math.atan2(2 * r2 * a2 - 2 * i2 * s2, 1 - 2 * r2 * r2 - 2 * s2 * s2); + t2[0] = n2 / degToRads, t2[1] = o2 / degToRads, t2[2] = h2 / degToRads; + } + function createQuaternion(t2) { + var e2 = t2[0] * degToRads, r2 = t2[1] * degToRads, i2 = t2[2] * degToRads, s2 = Math.cos(e2 / 2), a2 = Math.cos(r2 / 2), n2 = Math.cos(i2 / 2), o2 = Math.sin(e2 / 2), h2 = Math.sin(r2 / 2), l2 = Math.sin(i2 / 2); + return [o2 * h2 * n2 + s2 * a2 * l2, o2 * a2 * n2 + s2 * h2 * l2, s2 * h2 * n2 - o2 * a2 * l2, s2 * a2 * n2 - o2 * h2 * l2]; + } + function getValueAtCurrentTime() { + var t2 = this.comp.renderedFrame - this.offsetTime, e2 = this.keyframes[0].t - this.offsetTime, r2 = this.keyframes[this.keyframes.length - 1].t - this.offsetTime; + if (!(t2 === this._caching.lastFrame || this._caching.lastFrame !== initFrame && (this._caching.lastFrame >= r2 && t2 >= r2 || this._caching.lastFrame < e2 && t2 < e2))) { + this._caching.lastFrame >= t2 && (this._caching._lastKeyframeIndex = -1, this._caching.lastIndex = 0); + var i2 = this.interpolateValue(t2, this._caching); + this.pv = i2; + } + return this._caching.lastFrame = t2, this.pv; + } + function setVValue(t2) { + var e2; + if ("unidimensional" === this.propType) e2 = t2 * this.mult, mathAbs(this.v - e2) > 1e-5 && (this.v = e2, this._mdf = true); + else for (var r2 = 0, i2 = this.v.length; r2 < i2; ) e2 = t2[r2] * this.mult, mathAbs(this.v[r2] - e2) > 1e-5 && (this.v[r2] = e2, this._mdf = true), r2 += 1; + } + function processEffectsSequence() { + if (this.elem.globalData.frameId !== this.frameId && this.effectsSequence.length) if (this.lock) this.setVValue(this.pv); + else { + var t2; + this.lock = true, this._mdf = this._isFirstFrame; + var e2 = this.effectsSequence.length, r2 = this.kf ? this.pv : this.data.k; + for (t2 = 0; t2 < e2; t2 += 1) r2 = this.effectsSequence[t2](r2); + this.setVValue(r2), this._isFirstFrame = false, this.lock = false, this.frameId = this.elem.globalData.frameId; + } + } + function addEffect(t2) { + this.effectsSequence.push(t2), this.container.addDynamicProperty(this); + } + function ValueProperty(t2, e2, r2, i2) { + this.propType = "unidimensional", this.mult = r2 || 1, this.data = e2, this.v = r2 ? e2.k * r2 : e2.k, this.pv = e2.k, this._mdf = false, this.elem = t2, this.container = i2, this.comp = t2.comp, this.k = false, this.kf = false, this.vel = 0, this.effectsSequence = [], this._isFirstFrame = true, this.getValue = processEffectsSequence, this.setVValue = setVValue, this.addEffect = addEffect; + } + function MultiDimensionalProperty(t2, e2, r2, i2) { + var s2; + this.propType = "multidimensional", this.mult = r2 || 1, this.data = e2, this._mdf = false, this.elem = t2, this.container = i2, this.comp = t2.comp, this.k = false, this.kf = false, this.frameId = -1; + var a2 = e2.k.length; + for (this.v = createTypedArray("float32", a2), this.pv = createTypedArray("float32", a2), this.vel = createTypedArray("float32", a2), s2 = 0; s2 < a2; s2 += 1) this.v[s2] = e2.k[s2] * this.mult, this.pv[s2] = e2.k[s2]; + this._isFirstFrame = true, this.effectsSequence = [], this.getValue = processEffectsSequence, this.setVValue = setVValue, this.addEffect = addEffect; + } + function KeyframedValueProperty(t2, e2, r2, i2) { + this.propType = "unidimensional", this.keyframes = e2.k, this.keyframesMetadata = [], this.offsetTime = t2.data.st, this.frameId = -1, this._caching = { lastFrame: initFrame, lastIndex: 0, value: 0, _lastKeyframeIndex: -1 }, this.k = true, this.kf = true, this.data = e2, this.mult = r2 || 1, this.elem = t2, this.container = i2, this.comp = t2.comp, this.v = initFrame, this.pv = initFrame, this._isFirstFrame = true, this.getValue = processEffectsSequence, this.setVValue = setVValue, this.interpolateValue = interpolateValue, this.effectsSequence = [getValueAtCurrentTime.bind(this)], this.addEffect = addEffect; + } + function KeyframedMultidimensionalProperty(t2, e2, r2, i2) { + var s2; + this.propType = "multidimensional"; + var a2, n2, o2, h2, l2 = e2.k.length; + for (s2 = 0; s2 < l2 - 1; s2 += 1) e2.k[s2].to && e2.k[s2].s && e2.k[s2 + 1] && e2.k[s2 + 1].s && (a2 = e2.k[s2].s, n2 = e2.k[s2 + 1].s, o2 = e2.k[s2].to, h2 = e2.k[s2].ti, (2 === a2.length && (a2[0] !== n2[0] || a2[1] !== n2[1]) && bez.pointOnLine2D(a2[0], a2[1], n2[0], n2[1], a2[0] + o2[0], a2[1] + o2[1]) && bez.pointOnLine2D(a2[0], a2[1], n2[0], n2[1], n2[0] + h2[0], n2[1] + h2[1]) || 3 === a2.length && (a2[0] !== n2[0] || a2[1] !== n2[1] || a2[2] !== n2[2]) && bez.pointOnLine3D(a2[0], a2[1], a2[2], n2[0], n2[1], n2[2], a2[0] + o2[0], a2[1] + o2[1], a2[2] + o2[2]) && bez.pointOnLine3D(a2[0], a2[1], a2[2], n2[0], n2[1], n2[2], n2[0] + h2[0], n2[1] + h2[1], n2[2] + h2[2])) && (e2.k[s2].to = null, e2.k[s2].ti = null), a2[0] === n2[0] && a2[1] === n2[1] && 0 === o2[0] && 0 === o2[1] && 0 === h2[0] && 0 === h2[1] && (2 === a2.length || a2[2] === n2[2] && 0 === o2[2] && 0 === h2[2]) && (e2.k[s2].to = null, e2.k[s2].ti = null)); + this.effectsSequence = [getValueAtCurrentTime.bind(this)], this.data = e2, this.keyframes = e2.k, this.keyframesMetadata = [], this.offsetTime = t2.data.st, this.k = true, this.kf = true, this._isFirstFrame = true, this.mult = r2 || 1, this.elem = t2, this.container = i2, this.comp = t2.comp, this.getValue = processEffectsSequence, this.setVValue = setVValue, this.interpolateValue = interpolateValue, this.frameId = -1; + var p2 = e2.k[0].s.length; + for (this.v = createTypedArray("float32", p2), this.pv = createTypedArray("float32", p2), s2 = 0; s2 < p2; s2 += 1) this.v[s2] = initFrame, this.pv[s2] = initFrame; + this._caching = { lastFrame: initFrame, lastIndex: 0, value: createTypedArray("float32", p2) }, this.addEffect = addEffect; + } + var PropertyFactory = (ob = { getProp: function(t2, e2, r2, i2, s2) { + var a2; + if (e2.sid && (e2 = t2.globalData.slotManager.getProp(e2)), e2.k.length) if ("number" == typeof e2.k[0]) a2 = new MultiDimensionalProperty(t2, e2, i2, s2); + else switch (r2) { + case 0: + a2 = new KeyframedValueProperty(t2, e2, i2, s2); + break; + case 1: + a2 = new KeyframedMultidimensionalProperty(t2, e2, i2, s2); + } + else a2 = new ValueProperty(t2, e2, i2, s2); + return a2.effectsSequence.length && s2.addDynamicProperty(a2), a2; + } }, ob), ob; + function DynamicPropertyContainer() { + } + DynamicPropertyContainer.prototype = { addDynamicProperty: function(t2) { + -1 === this.dynamicProperties.indexOf(t2) && (this.dynamicProperties.push(t2), this.container.addDynamicProperty(this), this._isAnimated = true); + }, iterateDynamicProperties: function() { + var t2; + this._mdf = false; + var e2 = this.dynamicProperties.length; + for (t2 = 0; t2 < e2; t2 += 1) this.dynamicProperties[t2].getValue(), this.dynamicProperties[t2]._mdf && (this._mdf = true); + }, initDynamicPropertyContainer: function(t2) { + this.container = t2, this.dynamicProperties = [], this._mdf = false, this._isAnimated = false; + } }; + var pointPool = poolFactory(8, function() { + return createTypedArray("float32", 2); + }); + function ShapePath() { + this.c = false, this._length = 0, this._maxLength = 8, this.v = createSizedArray(this._maxLength), this.o = createSizedArray(this._maxLength), this.i = createSizedArray(this._maxLength); + } + ShapePath.prototype.setPathData = function(t2, e2) { + this.c = t2, this.setLength(e2); + for (var r2 = 0; r2 < e2; ) this.v[r2] = pointPool.newElement(), this.o[r2] = pointPool.newElement(), this.i[r2] = pointPool.newElement(), r2 += 1; + }, ShapePath.prototype.setLength = function(t2) { + for (; this._maxLength < t2; ) this.doubleArrayLength(); + this._length = t2; + }, ShapePath.prototype.doubleArrayLength = function() { + this.v = this.v.concat(createSizedArray(this._maxLength)), this.i = this.i.concat(createSizedArray(this._maxLength)), this.o = this.o.concat(createSizedArray(this._maxLength)), this._maxLength *= 2; + }, ShapePath.prototype.setXYAt = function(t2, e2, r2, i2, s2) { + var a2; + switch (this._length = Math.max(this._length, i2 + 1), this._length >= this._maxLength && this.doubleArrayLength(), r2) { + case "v": + a2 = this.v; + break; + case "i": + a2 = this.i; + break; + case "o": + a2 = this.o; + break; + default: + a2 = []; + } + (!a2[i2] || a2[i2] && !s2) && (a2[i2] = pointPool.newElement()), a2[i2][0] = t2, a2[i2][1] = e2; + }, ShapePath.prototype.setTripleAt = function(t2, e2, r2, i2, s2, a2, n2, o2) { + this.setXYAt(t2, e2, "v", n2, o2), this.setXYAt(r2, i2, "o", n2, o2), this.setXYAt(s2, a2, "i", n2, o2); + }, ShapePath.prototype.reverse = function() { + var t2 = new ShapePath(); + t2.setPathData(this.c, this._length); + var e2 = this.v, r2 = this.o, i2 = this.i, s2 = 0; + this.c && (t2.setTripleAt(e2[0][0], e2[0][1], i2[0][0], i2[0][1], r2[0][0], r2[0][1], 0, false), s2 = 1); + var a2, n2 = this._length - 1, o2 = this._length; + for (a2 = s2; a2 < o2; a2 += 1) t2.setTripleAt(e2[n2][0], e2[n2][1], i2[n2][0], i2[n2][1], r2[n2][0], r2[n2][1], a2, false), n2 -= 1; + return t2; + }, ShapePath.prototype.length = function() { + return this._length; + }; + var shapePool = (factory = poolFactory(4, function() { + return new ShapePath(); + }, function(t2) { + var e2, r2 = t2._length; + for (e2 = 0; e2 < r2; e2 += 1) pointPool.release(t2.v[e2]), pointPool.release(t2.i[e2]), pointPool.release(t2.o[e2]), t2.v[e2] = null, t2.i[e2] = null, t2.o[e2] = null; + t2._length = 0, t2.c = false; + }), factory.clone = function(t2) { + var e2, r2 = factory.newElement(), i2 = void 0 === t2._length ? t2.v.length : t2._length; + for (r2.setLength(i2), r2.c = t2.c, e2 = 0; e2 < i2; e2 += 1) r2.setTripleAt(t2.v[e2][0], t2.v[e2][1], t2.o[e2][0], t2.o[e2][1], t2.i[e2][0], t2.i[e2][1], e2); + return r2; + }, factory), factory; + function ShapeCollection() { + this._length = 0, this._maxLength = 4, this.shapes = createSizedArray(this._maxLength); + } + ShapeCollection.prototype.addShape = function(t2) { + this._length === this._maxLength && (this.shapes = this.shapes.concat(createSizedArray(this._maxLength)), this._maxLength *= 2), this.shapes[this._length] = t2, this._length += 1; + }, ShapeCollection.prototype.releaseShapes = function() { + var t2; + for (t2 = 0; t2 < this._length; t2 += 1) shapePool.release(this.shapes[t2]); + this._length = 0; + }; + var shapeCollectionPool = function() { + var t2 = { newShapeCollection: function() { + return e2 ? i2[e2 -= 1] : new ShapeCollection(); + }, release: function(t3) { + var s2, a2 = t3._length; + for (s2 = 0; s2 < a2; s2 += 1) shapePool.release(t3.shapes[s2]); + t3._length = 0, e2 === r2 && (i2 = pooling.double(i2), r2 *= 2), i2[e2] = t3, e2 += 1; + } }, e2 = 0, r2 = 4, i2 = createSizedArray(r2); + return t2; + }(), ShapePropertyFactory = function() { + var t2 = -999999; + function e2(t3, e3, r3) { + var i3, s3, a3, n3, o3, h3, l3, p3, c3, f3 = r3.lastIndex, u2 = this.keyframes; + if (t3 < u2[0].t - this.offsetTime) i3 = u2[0].s[0], a3 = true, f3 = 0; + else if (t3 >= u2[u2.length - 1].t - this.offsetTime) i3 = u2[u2.length - 1].s ? u2[u2.length - 1].s[0] : u2[u2.length - 2].e[0], a3 = true; + else { + for (var d2, m2, y2, g2 = f3, v2 = u2.length - 1, b2 = true; b2 && (d2 = u2[g2], !((m2 = u2[g2 + 1]).t - this.offsetTime > t3)); ) g2 < v2 - 1 ? g2 += 1 : b2 = false; + if (y2 = this.keyframesMetadata[g2] || {}, f3 = g2, !(a3 = 1 === d2.h)) { + if (t3 >= m2.t - this.offsetTime) p3 = 1; + else if (t3 < d2.t - this.offsetTime) p3 = 0; + else { + var _2; + y2.__fnct ? _2 = y2.__fnct : (_2 = BezierFactory.getBezierEasing(d2.o.x, d2.o.y, d2.i.x, d2.i.y).get, y2.__fnct = _2), p3 = _2((t3 - (d2.t - this.offsetTime)) / (m2.t - this.offsetTime - (d2.t - this.offsetTime))); + } + s3 = m2.s ? m2.s[0] : d2.e[0]; + } + i3 = d2.s[0]; + } + for (h3 = e3._length, l3 = i3.i[0].length, r3.lastIndex = f3, n3 = 0; n3 < h3; n3 += 1) for (o3 = 0; o3 < l3; o3 += 1) c3 = a3 ? i3.i[n3][o3] : i3.i[n3][o3] + (s3.i[n3][o3] - i3.i[n3][o3]) * p3, e3.i[n3][o3] = c3, c3 = a3 ? i3.o[n3][o3] : i3.o[n3][o3] + (s3.o[n3][o3] - i3.o[n3][o3]) * p3, e3.o[n3][o3] = c3, c3 = a3 ? i3.v[n3][o3] : i3.v[n3][o3] + (s3.v[n3][o3] - i3.v[n3][o3]) * p3, e3.v[n3][o3] = c3; + } + function r2() { + var e3 = this.comp.renderedFrame - this.offsetTime, r3 = this.keyframes[0].t - this.offsetTime, i3 = this.keyframes[this.keyframes.length - 1].t - this.offsetTime, s3 = this._caching.lastFrame; + return s3 !== t2 && (s3 < r3 && e3 < r3 || s3 > i3 && e3 > i3) || (this._caching.lastIndex = s3 < e3 ? this._caching.lastIndex : 0, this.interpolateShape(e3, this.pv, this._caching)), this._caching.lastFrame = e3, this.pv; + } + function i2() { + this.paths = this.localShapeCollection; + } + function s2(t3) { + (function(t4, e3) { + if (t4._length !== e3._length || t4.c !== e3.c) return false; + var r3, i3 = t4._length; + for (r3 = 0; r3 < i3; r3 += 1) if (t4.v[r3][0] !== e3.v[r3][0] || t4.v[r3][1] !== e3.v[r3][1] || t4.o[r3][0] !== e3.o[r3][0] || t4.o[r3][1] !== e3.o[r3][1] || t4.i[r3][0] !== e3.i[r3][0] || t4.i[r3][1] !== e3.i[r3][1]) return false; + return true; + })(this.v, t3) || (this.v = shapePool.clone(t3), this.localShapeCollection.releaseShapes(), this.localShapeCollection.addShape(this.v), this._mdf = true, this.paths = this.localShapeCollection); + } + function a2() { + if (this.elem.globalData.frameId !== this.frameId) if (this.effectsSequence.length) if (this.lock) this.setVValue(this.pv); + else { + var t3, e3; + this.lock = true, this._mdf = false, t3 = this.kf ? this.pv : this.data.ks ? this.data.ks.k : this.data.pt.k; + var r3 = this.effectsSequence.length; + for (e3 = 0; e3 < r3; e3 += 1) t3 = this.effectsSequence[e3](t3); + this.setVValue(t3), this.lock = false, this.frameId = this.elem.globalData.frameId; + } + else this._mdf = false; + } + function n2(t3, e3, r3) { + this.propType = "shape", this.comp = t3.comp, this.container = t3, this.elem = t3, this.data = e3, this.k = false, this.kf = false, this._mdf = false; + var s3 = 3 === r3 ? e3.pt.k : e3.ks.k; + this.v = shapePool.clone(s3), this.pv = shapePool.clone(this.v), this.localShapeCollection = shapeCollectionPool.newShapeCollection(), this.paths = this.localShapeCollection, this.paths.addShape(this.v), this.reset = i2, this.effectsSequence = []; + } + function o2(t3) { + this.effectsSequence.push(t3), this.container.addDynamicProperty(this); + } + function h2(e3, s3, a3) { + this.propType = "shape", this.comp = e3.comp, this.elem = e3, this.container = e3, this.offsetTime = e3.data.st, this.keyframes = 3 === a3 ? s3.pt.k : s3.ks.k, this.keyframesMetadata = [], this.k = true, this.kf = true; + var n3 = this.keyframes[0].s[0].i.length; + this.v = shapePool.newElement(), this.v.setPathData(this.keyframes[0].s[0].c, n3), this.pv = shapePool.clone(this.v), this.localShapeCollection = shapeCollectionPool.newShapeCollection(), this.paths = this.localShapeCollection, this.paths.addShape(this.v), this.lastFrame = t2, this.reset = i2, this._caching = { lastFrame: t2, lastIndex: 0 }, this.effectsSequence = [r2.bind(this)]; + } + n2.prototype.interpolateShape = e2, n2.prototype.getValue = a2, n2.prototype.setVValue = s2, n2.prototype.addEffect = o2, h2.prototype.getValue = a2, h2.prototype.interpolateShape = e2, h2.prototype.setVValue = s2, h2.prototype.addEffect = o2; + var l2 = function() { + var t3 = roundCorner; + function e3(t4, e4) { + this.v = shapePool.newElement(), this.v.setPathData(true, 4), this.localShapeCollection = shapeCollectionPool.newShapeCollection(), this.paths = this.localShapeCollection, this.localShapeCollection.addShape(this.v), this.d = e4.d, this.elem = t4, this.comp = t4.comp, this.frameId = -1, this.initDynamicPropertyContainer(t4), this.p = PropertyFactory.getProp(t4, e4.p, 1, 0, this), this.s = PropertyFactory.getProp(t4, e4.s, 1, 0, this), this.dynamicProperties.length ? this.k = true : (this.k = false, this.convertEllToPath()); + } + return e3.prototype = { reset: i2, getValue: function() { + this.elem.globalData.frameId !== this.frameId && (this.frameId = this.elem.globalData.frameId, this.iterateDynamicProperties(), this._mdf && this.convertEllToPath()); + }, convertEllToPath: function() { + var e4 = this.p.v[0], r3 = this.p.v[1], i3 = this.s.v[0] / 2, s3 = this.s.v[1] / 2, a3 = 3 !== this.d, n3 = this.v; + n3.v[0][0] = e4, n3.v[0][1] = r3 - s3, n3.v[1][0] = a3 ? e4 + i3 : e4 - i3, n3.v[1][1] = r3, n3.v[2][0] = e4, n3.v[2][1] = r3 + s3, n3.v[3][0] = a3 ? e4 - i3 : e4 + i3, n3.v[3][1] = r3, n3.i[0][0] = a3 ? e4 - i3 * t3 : e4 + i3 * t3, n3.i[0][1] = r3 - s3, n3.i[1][0] = a3 ? e4 + i3 : e4 - i3, n3.i[1][1] = r3 - s3 * t3, n3.i[2][0] = a3 ? e4 + i3 * t3 : e4 - i3 * t3, n3.i[2][1] = r3 + s3, n3.i[3][0] = a3 ? e4 - i3 : e4 + i3, n3.i[3][1] = r3 + s3 * t3, n3.o[0][0] = a3 ? e4 + i3 * t3 : e4 - i3 * t3, n3.o[0][1] = r3 - s3, n3.o[1][0] = a3 ? e4 + i3 : e4 - i3, n3.o[1][1] = r3 + s3 * t3, n3.o[2][0] = a3 ? e4 - i3 * t3 : e4 + i3 * t3, n3.o[2][1] = r3 + s3, n3.o[3][0] = a3 ? e4 - i3 : e4 + i3, n3.o[3][1] = r3 - s3 * t3; + } }, extendPrototype([DynamicPropertyContainer], e3), e3; + }(), p2 = function() { + function t3(t4, e3) { + this.v = shapePool.newElement(), this.v.setPathData(true, 0), this.elem = t4, this.comp = t4.comp, this.data = e3, this.frameId = -1, this.d = e3.d, this.initDynamicPropertyContainer(t4), 1 === e3.sy ? (this.ir = PropertyFactory.getProp(t4, e3.ir, 0, 0, this), this.is = PropertyFactory.getProp(t4, e3.is, 0, 0.01, this), this.convertToPath = this.convertStarToPath) : this.convertToPath = this.convertPolygonToPath, this.pt = PropertyFactory.getProp(t4, e3.pt, 0, 0, this), this.p = PropertyFactory.getProp(t4, e3.p, 1, 0, this), this.r = PropertyFactory.getProp(t4, e3.r, 0, degToRads, this), this.or = PropertyFactory.getProp(t4, e3.or, 0, 0, this), this.os = PropertyFactory.getProp(t4, e3.os, 0, 0.01, this), this.localShapeCollection = shapeCollectionPool.newShapeCollection(), this.localShapeCollection.addShape(this.v), this.paths = this.localShapeCollection, this.dynamicProperties.length ? this.k = true : (this.k = false, this.convertToPath()); + } + return t3.prototype = { reset: i2, getValue: function() { + this.elem.globalData.frameId !== this.frameId && (this.frameId = this.elem.globalData.frameId, this.iterateDynamicProperties(), this._mdf && this.convertToPath()); + }, convertStarToPath: function() { + var t4, e3, r3, i3, s3 = 2 * Math.floor(this.pt.v), a3 = 2 * Math.PI / s3, n3 = true, o3 = this.or.v, h3 = this.ir.v, l3 = this.os.v, p3 = this.is.v, c3 = 2 * Math.PI * o3 / (2 * s3), f3 = 2 * Math.PI * h3 / (2 * s3), u2 = -Math.PI / 2; + u2 += this.r.v; + var d2 = 3 === this.data.d ? -1 : 1; + for (this.v._length = 0, t4 = 0; t4 < s3; t4 += 1) { + r3 = n3 ? l3 : p3, i3 = n3 ? c3 : f3; + var m2 = (e3 = n3 ? o3 : h3) * Math.cos(u2), y2 = e3 * Math.sin(u2), g2 = 0 === m2 && 0 === y2 ? 0 : y2 / Math.sqrt(m2 * m2 + y2 * y2), v2 = 0 === m2 && 0 === y2 ? 0 : -m2 / Math.sqrt(m2 * m2 + y2 * y2); + m2 += +this.p.v[0], y2 += +this.p.v[1], this.v.setTripleAt(m2, y2, m2 - g2 * i3 * r3 * d2, y2 - v2 * i3 * r3 * d2, m2 + g2 * i3 * r3 * d2, y2 + v2 * i3 * r3 * d2, t4, true), n3 = !n3, u2 += a3 * d2; + } + }, convertPolygonToPath: function() { + var t4, e3 = Math.floor(this.pt.v), r3 = 2 * Math.PI / e3, i3 = this.or.v, s3 = this.os.v, a3 = 2 * Math.PI * i3 / (4 * e3), n3 = 0.5 * -Math.PI, o3 = 3 === this.data.d ? -1 : 1; + for (n3 += this.r.v, this.v._length = 0, t4 = 0; t4 < e3; t4 += 1) { + var h3 = i3 * Math.cos(n3), l3 = i3 * Math.sin(n3), p3 = 0 === h3 && 0 === l3 ? 0 : l3 / Math.sqrt(h3 * h3 + l3 * l3), c3 = 0 === h3 && 0 === l3 ? 0 : -h3 / Math.sqrt(h3 * h3 + l3 * l3); + h3 += +this.p.v[0], l3 += +this.p.v[1], this.v.setTripleAt(h3, l3, h3 - p3 * a3 * s3 * o3, l3 - c3 * a3 * s3 * o3, h3 + p3 * a3 * s3 * o3, l3 + c3 * a3 * s3 * o3, t4, true), n3 += r3 * o3; + } + this.paths.length = 0, this.paths[0] = this.v; + } }, extendPrototype([DynamicPropertyContainer], t3), t3; + }(), c2 = function() { + function t3(t4, e3) { + this.v = shapePool.newElement(), this.v.c = true, this.localShapeCollection = shapeCollectionPool.newShapeCollection(), this.localShapeCollection.addShape(this.v), this.paths = this.localShapeCollection, this.elem = t4, this.comp = t4.comp, this.frameId = -1, this.d = e3.d, this.initDynamicPropertyContainer(t4), this.p = PropertyFactory.getProp(t4, e3.p, 1, 0, this), this.s = PropertyFactory.getProp(t4, e3.s, 1, 0, this), this.r = PropertyFactory.getProp(t4, e3.r, 0, 0, this), this.dynamicProperties.length ? this.k = true : (this.k = false, this.convertRectToPath()); + } + return t3.prototype = { convertRectToPath: function() { + var t4 = this.p.v[0], e3 = this.p.v[1], r3 = this.s.v[0] / 2, i3 = this.s.v[1] / 2, s3 = bmMin(r3, i3, this.r.v), a3 = s3 * (1 - roundCorner); + this.v._length = 0, 2 === this.d || 1 === this.d ? (this.v.setTripleAt(t4 + r3, e3 - i3 + s3, t4 + r3, e3 - i3 + s3, t4 + r3, e3 - i3 + a3, 0, true), this.v.setTripleAt(t4 + r3, e3 + i3 - s3, t4 + r3, e3 + i3 - a3, t4 + r3, e3 + i3 - s3, 1, true), 0 !== s3 ? (this.v.setTripleAt(t4 + r3 - s3, e3 + i3, t4 + r3 - s3, e3 + i3, t4 + r3 - a3, e3 + i3, 2, true), this.v.setTripleAt(t4 - r3 + s3, e3 + i3, t4 - r3 + a3, e3 + i3, t4 - r3 + s3, e3 + i3, 3, true), this.v.setTripleAt(t4 - r3, e3 + i3 - s3, t4 - r3, e3 + i3 - s3, t4 - r3, e3 + i3 - a3, 4, true), this.v.setTripleAt(t4 - r3, e3 - i3 + s3, t4 - r3, e3 - i3 + a3, t4 - r3, e3 - i3 + s3, 5, true), this.v.setTripleAt(t4 - r3 + s3, e3 - i3, t4 - r3 + s3, e3 - i3, t4 - r3 + a3, e3 - i3, 6, true), this.v.setTripleAt(t4 + r3 - s3, e3 - i3, t4 + r3 - a3, e3 - i3, t4 + r3 - s3, e3 - i3, 7, true)) : (this.v.setTripleAt(t4 - r3, e3 + i3, t4 - r3 + a3, e3 + i3, t4 - r3, e3 + i3, 2), this.v.setTripleAt(t4 - r3, e3 - i3, t4 - r3, e3 - i3 + a3, t4 - r3, e3 - i3, 3))) : (this.v.setTripleAt(t4 + r3, e3 - i3 + s3, t4 + r3, e3 - i3 + a3, t4 + r3, e3 - i3 + s3, 0, true), 0 !== s3 ? (this.v.setTripleAt(t4 + r3 - s3, e3 - i3, t4 + r3 - s3, e3 - i3, t4 + r3 - a3, e3 - i3, 1, true), this.v.setTripleAt(t4 - r3 + s3, e3 - i3, t4 - r3 + a3, e3 - i3, t4 - r3 + s3, e3 - i3, 2, true), this.v.setTripleAt(t4 - r3, e3 - i3 + s3, t4 - r3, e3 - i3 + s3, t4 - r3, e3 - i3 + a3, 3, true), this.v.setTripleAt(t4 - r3, e3 + i3 - s3, t4 - r3, e3 + i3 - a3, t4 - r3, e3 + i3 - s3, 4, true), this.v.setTripleAt(t4 - r3 + s3, e3 + i3, t4 - r3 + s3, e3 + i3, t4 - r3 + a3, e3 + i3, 5, true), this.v.setTripleAt(t4 + r3 - s3, e3 + i3, t4 + r3 - a3, e3 + i3, t4 + r3 - s3, e3 + i3, 6, true), this.v.setTripleAt(t4 + r3, e3 + i3 - s3, t4 + r3, e3 + i3 - s3, t4 + r3, e3 + i3 - a3, 7, true)) : (this.v.setTripleAt(t4 - r3, e3 - i3, t4 - r3 + a3, e3 - i3, t4 - r3, e3 - i3, 1, true), this.v.setTripleAt(t4 - r3, e3 + i3, t4 - r3, e3 + i3 - a3, t4 - r3, e3 + i3, 2, true), this.v.setTripleAt(t4 + r3, e3 + i3, t4 + r3 - a3, e3 + i3, t4 + r3, e3 + i3, 3, true))); + }, getValue: function() { + this.elem.globalData.frameId !== this.frameId && (this.frameId = this.elem.globalData.frameId, this.iterateDynamicProperties(), this._mdf && this.convertRectToPath()); + }, reset: i2 }, extendPrototype([DynamicPropertyContainer], t3), t3; + }(), f2 = { getShapeProp: function(t3, e3, r3) { + var i3; + return 3 === r3 || 4 === r3 ? i3 = (3 === r3 ? e3.pt : e3.ks).k.length ? new h2(t3, e3, r3) : new n2(t3, e3, r3) : 5 === r3 ? i3 = new c2(t3, e3) : 6 === r3 ? i3 = new l2(t3, e3) : 7 === r3 && (i3 = new p2(t3, e3)), i3.k && t3.addDynamicProperty(i3), i3; + }, getConstructorFunction: function() { + return n2; + }, getKeyframedConstructorFunction: function() { + return h2; + } }; + return f2; + }(), Matrix = /* @__PURE__ */ function() { + var t2 = Math.cos, e2 = Math.sin, r2 = Math.tan, i2 = Math.round; + function s2() { + return this.props[0] = 1, this.props[1] = 0, this.props[2] = 0, this.props[3] = 0, this.props[4] = 0, this.props[5] = 1, this.props[6] = 0, this.props[7] = 0, this.props[8] = 0, this.props[9] = 0, this.props[10] = 1, this.props[11] = 0, this.props[12] = 0, this.props[13] = 0, this.props[14] = 0, this.props[15] = 1, this; + } + function a2(r3) { + if (0 === r3) return this; + var i3 = t2(r3), s3 = e2(r3); + return this._t(i3, -s3, 0, 0, s3, i3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + function n2(r3) { + if (0 === r3) return this; + var i3 = t2(r3), s3 = e2(r3); + return this._t(1, 0, 0, 0, 0, i3, -s3, 0, 0, s3, i3, 0, 0, 0, 0, 1); + } + function o2(r3) { + if (0 === r3) return this; + var i3 = t2(r3), s3 = e2(r3); + return this._t(i3, 0, s3, 0, 0, 1, 0, 0, -s3, 0, i3, 0, 0, 0, 0, 1); + } + function h2(r3) { + if (0 === r3) return this; + var i3 = t2(r3), s3 = e2(r3); + return this._t(i3, -s3, 0, 0, s3, i3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + function l2(t3, e3) { + return this._t(1, e3, t3, 1, 0, 0); + } + function p2(t3, e3) { + return this.shear(r2(t3), r2(e3)); + } + function c2(i3, s3) { + var a3 = t2(s3), n3 = e2(s3); + return this._t(a3, n3, 0, 0, -n3, a3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(1, 0, 0, 0, r2(i3), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(a3, -n3, 0, 0, n3, a3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + function f2(t3, e3, r3) { + return r3 || 0 === r3 || (r3 = 1), 1 === t3 && 1 === e3 && 1 === r3 ? this : this._t(t3, 0, 0, 0, 0, e3, 0, 0, 0, 0, r3, 0, 0, 0, 0, 1); + } + function u2(t3, e3, r3, i3, s3, a3, n3, o3, h3, l3, p3, c3, f3, u3, d3, m3) { + return this.props[0] = t3, this.props[1] = e3, this.props[2] = r3, this.props[3] = i3, this.props[4] = s3, this.props[5] = a3, this.props[6] = n3, this.props[7] = o3, this.props[8] = h3, this.props[9] = l3, this.props[10] = p3, this.props[11] = c3, this.props[12] = f3, this.props[13] = u3, this.props[14] = d3, this.props[15] = m3, this; + } + function d2(t3, e3, r3) { + return r3 = r3 || 0, 0 !== t3 || 0 !== e3 || 0 !== r3 ? this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t3, e3, r3, 1) : this; + } + function m2(t3, e3, r3, i3, s3, a3, n3, o3, h3, l3, p3, c3, f3, u3, d3, m3) { + var y3 = this.props; + if (1 === t3 && 0 === e3 && 0 === r3 && 0 === i3 && 0 === s3 && 1 === a3 && 0 === n3 && 0 === o3 && 0 === h3 && 0 === l3 && 1 === p3 && 0 === c3) return y3[12] = y3[12] * t3 + y3[15] * f3, y3[13] = y3[13] * a3 + y3[15] * u3, y3[14] = y3[14] * p3 + y3[15] * d3, y3[15] *= m3, this._identityCalculated = false, this; + var g3 = y3[0], v3 = y3[1], b3 = y3[2], _3 = y3[3], P3 = y3[4], S3 = y3[5], E3 = y3[6], x3 = y3[7], C3 = y3[8], A3 = y3[9], w3 = y3[10], k3 = y3[11], T3 = y3[12], M3 = y3[13], D2 = y3[14], F2 = y3[15]; + return y3[0] = g3 * t3 + v3 * s3 + b3 * h3 + _3 * f3, y3[1] = g3 * e3 + v3 * a3 + b3 * l3 + _3 * u3, y3[2] = g3 * r3 + v3 * n3 + b3 * p3 + _3 * d3, y3[3] = g3 * i3 + v3 * o3 + b3 * c3 + _3 * m3, y3[4] = P3 * t3 + S3 * s3 + E3 * h3 + x3 * f3, y3[5] = P3 * e3 + S3 * a3 + E3 * l3 + x3 * u3, y3[6] = P3 * r3 + S3 * n3 + E3 * p3 + x3 * d3, y3[7] = P3 * i3 + S3 * o3 + E3 * c3 + x3 * m3, y3[8] = C3 * t3 + A3 * s3 + w3 * h3 + k3 * f3, y3[9] = C3 * e3 + A3 * a3 + w3 * l3 + k3 * u3, y3[10] = C3 * r3 + A3 * n3 + w3 * p3 + k3 * d3, y3[11] = C3 * i3 + A3 * o3 + w3 * c3 + k3 * m3, y3[12] = T3 * t3 + M3 * s3 + D2 * h3 + F2 * f3, y3[13] = T3 * e3 + M3 * a3 + D2 * l3 + F2 * u3, y3[14] = T3 * r3 + M3 * n3 + D2 * p3 + F2 * d3, y3[15] = T3 * i3 + M3 * o3 + D2 * c3 + F2 * m3, this._identityCalculated = false, this; + } + function y2(t3) { + var e3 = t3.props; + return this.transform(e3[0], e3[1], e3[2], e3[3], e3[4], e3[5], e3[6], e3[7], e3[8], e3[9], e3[10], e3[11], e3[12], e3[13], e3[14], e3[15]); + } + function g2() { + return this._identityCalculated || (this._identity = !(1 !== this.props[0] || 0 !== this.props[1] || 0 !== this.props[2] || 0 !== this.props[3] || 0 !== this.props[4] || 1 !== this.props[5] || 0 !== this.props[6] || 0 !== this.props[7] || 0 !== this.props[8] || 0 !== this.props[9] || 1 !== this.props[10] || 0 !== this.props[11] || 0 !== this.props[12] || 0 !== this.props[13] || 0 !== this.props[14] || 1 !== this.props[15]), this._identityCalculated = true), this._identity; + } + function v2(t3) { + for (var e3 = 0; e3 < 16; ) { + if (t3.props[e3] !== this.props[e3]) return false; + e3 += 1; + } + return true; + } + function b2(t3) { + var e3; + for (e3 = 0; e3 < 16; e3 += 1) t3.props[e3] = this.props[e3]; + return t3; + } + function _2(t3) { + var e3; + for (e3 = 0; e3 < 16; e3 += 1) this.props[e3] = t3[e3]; + } + function P2(t3, e3, r3) { + return { x: t3 * this.props[0] + e3 * this.props[4] + r3 * this.props[8] + this.props[12], y: t3 * this.props[1] + e3 * this.props[5] + r3 * this.props[9] + this.props[13], z: t3 * this.props[2] + e3 * this.props[6] + r3 * this.props[10] + this.props[14] }; + } + function S2(t3, e3, r3) { + return t3 * this.props[0] + e3 * this.props[4] + r3 * this.props[8] + this.props[12]; + } + function E2(t3, e3, r3) { + return t3 * this.props[1] + e3 * this.props[5] + r3 * this.props[9] + this.props[13]; + } + function x2(t3, e3, r3) { + return t3 * this.props[2] + e3 * this.props[6] + r3 * this.props[10] + this.props[14]; + } + function C2() { + var t3 = this.props[0] * this.props[5] - this.props[1] * this.props[4], e3 = this.props[5] / t3, r3 = -this.props[1] / t3, i3 = -this.props[4] / t3, s3 = this.props[0] / t3, a3 = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / t3, n3 = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / t3, o3 = new Matrix(); + return o3.props[0] = e3, o3.props[1] = r3, o3.props[4] = i3, o3.props[5] = s3, o3.props[12] = a3, o3.props[13] = n3, o3; + } + function A2(t3) { + return this.getInverseMatrix().applyToPointArray(t3[0], t3[1], t3[2] || 0); + } + function w2(t3) { + var e3, r3 = t3.length, i3 = []; + for (e3 = 0; e3 < r3; e3 += 1) i3[e3] = A2(t3[e3]); + return i3; + } + function k2(t3, e3, r3) { + var i3 = createTypedArray("float32", 6); + if (this.isIdentity()) i3[0] = t3[0], i3[1] = t3[1], i3[2] = e3[0], i3[3] = e3[1], i3[4] = r3[0], i3[5] = r3[1]; + else { + var s3 = this.props[0], a3 = this.props[1], n3 = this.props[4], o3 = this.props[5], h3 = this.props[12], l3 = this.props[13]; + i3[0] = t3[0] * s3 + t3[1] * n3 + h3, i3[1] = t3[0] * a3 + t3[1] * o3 + l3, i3[2] = e3[0] * s3 + e3[1] * n3 + h3, i3[3] = e3[0] * a3 + e3[1] * o3 + l3, i3[4] = r3[0] * s3 + r3[1] * n3 + h3, i3[5] = r3[0] * a3 + r3[1] * o3 + l3; + } + return i3; + } + function T2(t3, e3, r3) { + return this.isIdentity() ? [t3, e3, r3] : [t3 * this.props[0] + e3 * this.props[4] + r3 * this.props[8] + this.props[12], t3 * this.props[1] + e3 * this.props[5] + r3 * this.props[9] + this.props[13], t3 * this.props[2] + e3 * this.props[6] + r3 * this.props[10] + this.props[14]]; + } + function M2(t3, e3) { + if (this.isIdentity()) return t3 + "," + e3; + var r3 = this.props; + return Math.round(100 * (t3 * r3[0] + e3 * r3[4] + r3[12])) / 100 + "," + Math.round(100 * (t3 * r3[1] + e3 * r3[5] + r3[13])) / 100; + } + function D() { + for (var t3 = 0, e3 = this.props, r3 = "matrix3d("; t3 < 16; ) r3 += i2(1e4 * e3[t3]) / 1e4, r3 += 15 === t3 ? ")" : ",", t3 += 1; + return r3; + } + function F(t3) { + return t3 < 1e-6 && t3 > 0 || t3 > -1e-6 && t3 < 0 ? i2(1e4 * t3) / 1e4 : t3; + } + function I2() { + var t3 = this.props; + return "matrix(" + F(t3[0]) + "," + F(t3[1]) + "," + F(t3[4]) + "," + F(t3[5]) + "," + F(t3[12]) + "," + F(t3[13]) + ")"; + } + return function() { + this.reset = s2, this.rotate = a2, this.rotateX = n2, this.rotateY = o2, this.rotateZ = h2, this.skew = p2, this.skewFromAxis = c2, this.shear = l2, this.scale = f2, this.setTransform = u2, this.translate = d2, this.transform = m2, this.multiply = y2, this.applyToPoint = P2, this.applyToX = S2, this.applyToY = E2, this.applyToZ = x2, this.applyToPointArray = T2, this.applyToTriplePoints = k2, this.applyToPointStringified = M2, this.toCSS = D, this.to2dCSS = I2, this.clone = b2, this.cloneFromProps = _2, this.equals = v2, this.inversePoints = w2, this.inversePoint = A2, this.getInverseMatrix = C2, this._t = this.transform, this.isIdentity = g2, this._identity = true, this._identityCalculated = false, this.props = createTypedArray("float32", 16), this.reset(); + }; + }(); + function _typeof$3(t2) { + return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t3) { + return typeof t3; + } : function(t3) { + return t3 && "function" == typeof Symbol && t3.constructor === Symbol && t3 !== Symbol.prototype ? "symbol" : typeof t3; + }, _typeof$3(t2); + } + var lottie = {}, standalone = "__[STANDALONE]__", animationData = "__[ANIMATIONDATA]__", renderer = ""; + function setLocation(t2) { + setLocationHref(t2); + } + function searchAnimations() { + true === standalone ? animationManager.searchAnimations(animationData, standalone, renderer) : animationManager.searchAnimations(); + } + function setSubframeRendering(t2) { + setSubframeEnabled(t2); + } + function setPrefix(t2) { + setIdPrefix(t2); + } + function loadAnimation(t2) { + return true === standalone && (t2.animationData = JSON.parse(animationData)), animationManager.loadAnimation(t2); + } + function setQuality(t2) { + if ("string" == typeof t2) switch (t2) { + case "high": + setDefaultCurveSegments(200); + break; + default: + case "medium": + setDefaultCurveSegments(50); + break; + case "low": + setDefaultCurveSegments(10); + } + else !isNaN(t2) && t2 > 1 && setDefaultCurveSegments(t2); + getDefaultCurveSegments() >= 50 ? roundValues(false) : roundValues(true); + } + function inBrowser() { + return "undefined" != typeof navigator; + } + function installPlugin(t2, e2) { + "expressions" === t2 && setExpressionsPlugin(e2); + } + function getFactory(t2) { + switch (t2) { + case "propertyFactory": + return PropertyFactory; + case "shapePropertyFactory": + return ShapePropertyFactory; + case "matrix": + return Matrix; + default: + return null; + } + } + function checkReady() { + "complete" === document.readyState && (clearInterval(readyStateCheckInterval), searchAnimations()); + } + function getQueryVariable(t2) { + for (var e2 = queryString.split("&"), r2 = 0; r2 < e2.length; r2 += 1) { + var i2 = e2[r2].split("="); + if (decodeURIComponent(i2[0]) == t2) return decodeURIComponent(i2[1]); + } + return null; + } + lottie.play = animationManager.play, lottie.pause = animationManager.pause, lottie.setLocationHref = setLocation, lottie.togglePause = animationManager.togglePause, lottie.setSpeed = animationManager.setSpeed, lottie.setDirection = animationManager.setDirection, lottie.stop = animationManager.stop, lottie.searchAnimations = searchAnimations, lottie.registerAnimation = animationManager.registerAnimation, lottie.loadAnimation = loadAnimation, lottie.setSubframeRendering = setSubframeRendering, lottie.resize = animationManager.resize, lottie.goToAndStop = animationManager.goToAndStop, lottie.destroy = animationManager.destroy, lottie.setQuality = setQuality, lottie.inBrowser = inBrowser, lottie.installPlugin = installPlugin, lottie.freeze = animationManager.freeze, lottie.unfreeze = animationManager.unfreeze, lottie.setVolume = animationManager.setVolume, lottie.mute = animationManager.mute, lottie.unmute = animationManager.unmute, lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations, lottie.useWebWorker = setWebWorker, lottie.setIDPrefix = setPrefix, lottie.__getFactory = getFactory, lottie.version = "5.12.2"; + var queryString = ""; + if (standalone) { + var scripts = document.getElementsByTagName("script"), index = scripts.length - 1, myScript = scripts[index] || { src: "" }; + queryString = myScript.src ? myScript.src.replace(/^[^\?]+\??/, "") : "", renderer = getQueryVariable("renderer"); + } + var readyStateCheckInterval = setInterval(checkReady, 100); + try { + "object" !== _typeof$3(exports) && (window.bodymovin = lottie); + } catch (t2) { + } + var ShapeModifiers = function() { + var t2 = {}, e2 = {}; + return t2.registerModifier = function(t3, r2) { + e2[t3] || (e2[t3] = r2); + }, t2.getModifier = function(t3, r2, i2) { + return new e2[t3](r2, i2); + }, t2; + }(); + function ShapeModifier() { + } + function TrimModifier() { + } + function PuckerAndBloatModifier() { + } + ShapeModifier.prototype.initModifierProperties = function() { + }, ShapeModifier.prototype.addShapeToModifier = function() { + }, ShapeModifier.prototype.addShape = function(t2) { + if (!this.closed) { + t2.sh.container.addDynamicProperty(t2.sh); + var e2 = { shape: t2.sh, data: t2, localShapeCollection: shapeCollectionPool.newShapeCollection() }; + this.shapes.push(e2), this.addShapeToModifier(e2), this._isAnimated && t2.setAsAnimated(); + } + }, ShapeModifier.prototype.init = function(t2, e2) { + this.shapes = [], this.elem = t2, this.initDynamicPropertyContainer(t2), this.initModifierProperties(t2, e2), this.frameId = initialDefaultFrame, this.closed = false, this.k = false, this.dynamicProperties.length ? this.k = true : this.getValue(true); + }, ShapeModifier.prototype.processKeys = function() { + this.elem.globalData.frameId !== this.frameId && (this.frameId = this.elem.globalData.frameId, this.iterateDynamicProperties()); + }, extendPrototype([DynamicPropertyContainer], ShapeModifier), extendPrototype([ShapeModifier], TrimModifier), TrimModifier.prototype.initModifierProperties = function(t2, e2) { + this.s = PropertyFactory.getProp(t2, e2.s, 0, 0.01, this), this.e = PropertyFactory.getProp(t2, e2.e, 0, 0.01, this), this.o = PropertyFactory.getProp(t2, e2.o, 0, 0, this), this.sValue = 0, this.eValue = 0, this.getValue = this.processKeys, this.m = e2.m, this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length; + }, TrimModifier.prototype.addShapeToModifier = function(t2) { + t2.pathsData = []; + }, TrimModifier.prototype.calculateShapeEdges = function(t2, e2, r2, i2, s2) { + var a2 = []; + e2 <= 1 ? a2.push({ s: t2, e: e2 }) : t2 >= 1 ? a2.push({ s: t2 - 1, e: e2 - 1 }) : (a2.push({ s: t2, e: 1 }), a2.push({ s: 0, e: e2 - 1 })); + var n2, o2, h2 = [], l2 = a2.length; + for (n2 = 0; n2 < l2; n2 += 1) { + var p2, c2; + (o2 = a2[n2]).e * s2 < i2 || o2.s * s2 > i2 + r2 || (p2 = o2.s * s2 <= i2 ? 0 : (o2.s * s2 - i2) / r2, c2 = o2.e * s2 >= i2 + r2 ? 1 : (o2.e * s2 - i2) / r2, h2.push([p2, c2])); + } + return h2.length || h2.push([0, 0]), h2; + }, TrimModifier.prototype.releasePathsData = function(t2) { + var e2, r2 = t2.length; + for (e2 = 0; e2 < r2; e2 += 1) segmentsLengthPool.release(t2[e2]); + return t2.length = 0, t2; + }, TrimModifier.prototype.processShapes = function(t2) { + var e2, r2, i2, s2; + if (this._mdf || t2) { + var a2 = this.o.v % 360 / 360; + if (a2 < 0 && (a2 += 1), (e2 = this.s.v > 1 ? 1 + a2 : this.s.v < 0 ? 0 + a2 : this.s.v + a2) > (r2 = this.e.v > 1 ? 1 + a2 : this.e.v < 0 ? 0 + a2 : this.e.v + a2)) { + var n2 = e2; + e2 = r2, r2 = n2; + } + e2 = 1e-4 * Math.round(1e4 * e2), r2 = 1e-4 * Math.round(1e4 * r2), this.sValue = e2, this.eValue = r2; + } else e2 = this.sValue, r2 = this.eValue; + var o2, h2, l2, p2, c2, f2 = this.shapes.length, u2 = 0; + if (r2 === e2) for (s2 = 0; s2 < f2; s2 += 1) this.shapes[s2].localShapeCollection.releaseShapes(), this.shapes[s2].shape._mdf = true, this.shapes[s2].shape.paths = this.shapes[s2].localShapeCollection, this._mdf && (this.shapes[s2].pathsData.length = 0); + else if (1 === r2 && 0 === e2 || 0 === r2 && 1 === e2) { + if (this._mdf) for (s2 = 0; s2 < f2; s2 += 1) this.shapes[s2].pathsData.length = 0, this.shapes[s2].shape._mdf = true; + } else { + var d2, m2, y2 = []; + for (s2 = 0; s2 < f2; s2 += 1) if ((d2 = this.shapes[s2]).shape._mdf || this._mdf || t2 || 2 === this.m) { + if (h2 = (i2 = d2.shape.paths)._length, c2 = 0, !d2.shape._mdf && d2.pathsData.length) c2 = d2.totalShapeLength; + else { + for (l2 = this.releasePathsData(d2.pathsData), o2 = 0; o2 < h2; o2 += 1) p2 = bez.getSegmentsLength(i2.shapes[o2]), l2.push(p2), c2 += p2.totalLength; + d2.totalShapeLength = c2, d2.pathsData = l2; + } + u2 += c2, d2.shape._mdf = true; + } else d2.shape.paths = d2.localShapeCollection; + var g2, v2 = e2, b2 = r2, _2 = 0; + for (s2 = f2 - 1; s2 >= 0; s2 -= 1) if ((d2 = this.shapes[s2]).shape._mdf) { + for ((m2 = d2.localShapeCollection).releaseShapes(), 2 === this.m && f2 > 1 ? (g2 = this.calculateShapeEdges(e2, r2, d2.totalShapeLength, _2, u2), _2 += d2.totalShapeLength) : g2 = [[v2, b2]], h2 = g2.length, o2 = 0; o2 < h2; o2 += 1) { + v2 = g2[o2][0], b2 = g2[o2][1], y2.length = 0, b2 <= 1 ? y2.push({ s: d2.totalShapeLength * v2, e: d2.totalShapeLength * b2 }) : v2 >= 1 ? y2.push({ s: d2.totalShapeLength * (v2 - 1), e: d2.totalShapeLength * (b2 - 1) }) : (y2.push({ s: d2.totalShapeLength * v2, e: d2.totalShapeLength }), y2.push({ s: 0, e: d2.totalShapeLength * (b2 - 1) })); + var P2 = this.addShapes(d2, y2[0]); + if (y2[0].s !== y2[0].e) { + if (y2.length > 1) if (d2.shape.paths.shapes[d2.shape.paths._length - 1].c) { + var S2 = P2.pop(); + this.addPaths(P2, m2), P2 = this.addShapes(d2, y2[1], S2); + } else this.addPaths(P2, m2), P2 = this.addShapes(d2, y2[1]); + this.addPaths(P2, m2); + } + } + d2.shape.paths = m2; + } + } + }, TrimModifier.prototype.addPaths = function(t2, e2) { + var r2, i2 = t2.length; + for (r2 = 0; r2 < i2; r2 += 1) e2.addShape(t2[r2]); + }, TrimModifier.prototype.addSegment = function(t2, e2, r2, i2, s2, a2, n2) { + s2.setXYAt(e2[0], e2[1], "o", a2), s2.setXYAt(r2[0], r2[1], "i", a2 + 1), n2 && s2.setXYAt(t2[0], t2[1], "v", a2), s2.setXYAt(i2[0], i2[1], "v", a2 + 1); + }, TrimModifier.prototype.addSegmentFromArray = function(t2, e2, r2, i2) { + e2.setXYAt(t2[1], t2[5], "o", r2), e2.setXYAt(t2[2], t2[6], "i", r2 + 1), i2 && e2.setXYAt(t2[0], t2[4], "v", r2), e2.setXYAt(t2[3], t2[7], "v", r2 + 1); + }, TrimModifier.prototype.addShapes = function(t2, e2, r2) { + var i2, s2, a2, n2, o2, h2, l2, p2, c2 = t2.pathsData, f2 = t2.shape.paths.shapes, u2 = t2.shape.paths._length, d2 = 0, m2 = [], y2 = true; + for (r2 ? (o2 = r2._length, p2 = r2._length) : (r2 = shapePool.newElement(), o2 = 0, p2 = 0), m2.push(r2), i2 = 0; i2 < u2; i2 += 1) { + for (h2 = c2[i2].lengths, r2.c = f2[i2].c, a2 = f2[i2].c ? h2.length : h2.length + 1, s2 = 1; s2 < a2; s2 += 1) if (d2 + (n2 = h2[s2 - 1]).addedLength < e2.s) d2 += n2.addedLength, r2.c = false; + else { + if (d2 > e2.e) { + r2.c = false; + break; + } + e2.s <= d2 && e2.e >= d2 + n2.addedLength ? (this.addSegment(f2[i2].v[s2 - 1], f2[i2].o[s2 - 1], f2[i2].i[s2], f2[i2].v[s2], r2, o2, y2), y2 = false) : (l2 = bez.getNewSegment(f2[i2].v[s2 - 1], f2[i2].v[s2], f2[i2].o[s2 - 1], f2[i2].i[s2], (e2.s - d2) / n2.addedLength, (e2.e - d2) / n2.addedLength, h2[s2 - 1]), this.addSegmentFromArray(l2, r2, o2, y2), y2 = false, r2.c = false), d2 += n2.addedLength, o2 += 1; + } + if (f2[i2].c && h2.length) { + if (n2 = h2[s2 - 1], d2 <= e2.e) { + var g2 = h2[s2 - 1].addedLength; + e2.s <= d2 && e2.e >= d2 + g2 ? (this.addSegment(f2[i2].v[s2 - 1], f2[i2].o[s2 - 1], f2[i2].i[0], f2[i2].v[0], r2, o2, y2), y2 = false) : (l2 = bez.getNewSegment(f2[i2].v[s2 - 1], f2[i2].v[0], f2[i2].o[s2 - 1], f2[i2].i[0], (e2.s - d2) / g2, (e2.e - d2) / g2, h2[s2 - 1]), this.addSegmentFromArray(l2, r2, o2, y2), y2 = false, r2.c = false); + } else r2.c = false; + d2 += n2.addedLength, o2 += 1; + } + if (r2._length && (r2.setXYAt(r2.v[p2][0], r2.v[p2][1], "i", p2), r2.setXYAt(r2.v[r2._length - 1][0], r2.v[r2._length - 1][1], "o", r2._length - 1)), d2 > e2.e) break; + i2 < u2 - 1 && (r2 = shapePool.newElement(), y2 = true, m2.push(r2), o2 = 0); + } + return m2; + }, extendPrototype([ShapeModifier], PuckerAndBloatModifier), PuckerAndBloatModifier.prototype.initModifierProperties = function(t2, e2) { + this.getValue = this.processKeys, this.amount = PropertyFactory.getProp(t2, e2.a, 0, null, this), this._isAnimated = !!this.amount.effectsSequence.length; + }, PuckerAndBloatModifier.prototype.processPath = function(t2, e2) { + var r2 = e2 / 100, i2 = [0, 0], s2 = t2._length, a2 = 0; + for (a2 = 0; a2 < s2; a2 += 1) i2[0] += t2.v[a2][0], i2[1] += t2.v[a2][1]; + i2[0] /= s2, i2[1] /= s2; + var n2, o2, h2, l2, p2, c2, f2 = shapePool.newElement(); + for (f2.c = t2.c, a2 = 0; a2 < s2; a2 += 1) n2 = t2.v[a2][0] + (i2[0] - t2.v[a2][0]) * r2, o2 = t2.v[a2][1] + (i2[1] - t2.v[a2][1]) * r2, h2 = t2.o[a2][0] + (i2[0] - t2.o[a2][0]) * -r2, l2 = t2.o[a2][1] + (i2[1] - t2.o[a2][1]) * -r2, p2 = t2.i[a2][0] + (i2[0] - t2.i[a2][0]) * -r2, c2 = t2.i[a2][1] + (i2[1] - t2.i[a2][1]) * -r2, f2.setTripleAt(n2, o2, h2, l2, p2, c2, a2); + return f2; + }, PuckerAndBloatModifier.prototype.processShapes = function(t2) { + var e2, r2, i2, s2, a2, n2, o2 = this.shapes.length, h2 = this.amount.v; + if (0 !== h2) for (r2 = 0; r2 < o2; r2 += 1) { + if (n2 = (a2 = this.shapes[r2]).localShapeCollection, a2.shape._mdf || this._mdf || t2) for (n2.releaseShapes(), a2.shape._mdf = true, e2 = a2.shape.paths.shapes, s2 = a2.shape.paths._length, i2 = 0; i2 < s2; i2 += 1) n2.addShape(this.processPath(e2[i2], h2)); + a2.shape.paths = a2.localShapeCollection; + } + this.dynamicProperties.length || (this._mdf = false); + }; + var TransformPropertyFactory = function() { + var t2 = [0, 0]; + function e2(t3, e3, r2) { + if (this.elem = t3, this.frameId = -1, this.propType = "transform", this.data = e3, this.v = new Matrix(), this.pre = new Matrix(), this.appliedTransformations = 0, this.initDynamicPropertyContainer(r2 || t3), e3.p && e3.p.s ? (this.px = PropertyFactory.getProp(t3, e3.p.x, 0, 0, this), this.py = PropertyFactory.getProp(t3, e3.p.y, 0, 0, this), e3.p.z && (this.pz = PropertyFactory.getProp(t3, e3.p.z, 0, 0, this))) : this.p = PropertyFactory.getProp(t3, e3.p || { k: [0, 0, 0] }, 1, 0, this), e3.rx) { + if (this.rx = PropertyFactory.getProp(t3, e3.rx, 0, degToRads, this), this.ry = PropertyFactory.getProp(t3, e3.ry, 0, degToRads, this), this.rz = PropertyFactory.getProp(t3, e3.rz, 0, degToRads, this), e3.or.k[0].ti) { + var i2, s2 = e3.or.k.length; + for (i2 = 0; i2 < s2; i2 += 1) e3.or.k[i2].to = null, e3.or.k[i2].ti = null; + } + this.or = PropertyFactory.getProp(t3, e3.or, 1, degToRads, this), this.or.sh = true; + } else this.r = PropertyFactory.getProp(t3, e3.r || { k: 0 }, 0, degToRads, this); + e3.sk && (this.sk = PropertyFactory.getProp(t3, e3.sk, 0, degToRads, this), this.sa = PropertyFactory.getProp(t3, e3.sa, 0, degToRads, this)), this.a = PropertyFactory.getProp(t3, e3.a || { k: [0, 0, 0] }, 1, 0, this), this.s = PropertyFactory.getProp(t3, e3.s || { k: [100, 100, 100] }, 1, 0.01, this), e3.o ? this.o = PropertyFactory.getProp(t3, e3.o, 0, 0.01, t3) : this.o = { _mdf: false, v: 1 }, this._isDirty = true, this.dynamicProperties.length || this.getValue(true); + } + return e2.prototype = { applyToMatrix: function(t3) { + var e3 = this._mdf; + this.iterateDynamicProperties(), this._mdf = this._mdf || e3, this.a && t3.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]), this.s && t3.scale(this.s.v[0], this.s.v[1], this.s.v[2]), this.sk && t3.skewFromAxis(-this.sk.v, this.sa.v), this.r ? t3.rotate(-this.r.v) : t3.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]), this.data.p.s ? this.data.p.z ? t3.translate(this.px.v, this.py.v, -this.pz.v) : t3.translate(this.px.v, this.py.v, 0) : t3.translate(this.p.v[0], this.p.v[1], -this.p.v[2]); + }, getValue: function(e3) { + if (this.elem.globalData.frameId !== this.frameId) { + if (this._isDirty && (this.precalculateMatrix(), this._isDirty = false), this.iterateDynamicProperties(), this._mdf || e3) { + var r2; + if (this.v.cloneFromProps(this.pre.props), this.appliedTransformations < 1 && this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]), this.appliedTransformations < 2 && this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]), this.sk && this.appliedTransformations < 3 && this.v.skewFromAxis(-this.sk.v, this.sa.v), this.r && this.appliedTransformations < 4 ? this.v.rotate(-this.r.v) : !this.r && this.appliedTransformations < 4 && this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]), this.autoOriented) { + var i2, s2; + if (r2 = this.elem.globalData.frameRate, this.p && this.p.keyframes && this.p.getValueAtTime) this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t ? (i2 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / r2, 0), s2 = this.p.getValueAtTime(this.p.keyframes[0].t / r2, 0)) : this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t ? (i2 = this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length - 1].t / r2, 0), s2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / r2, 0)) : (i2 = this.p.pv, s2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / r2, this.p.offsetTime)); + else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) { + i2 = [], s2 = []; + var a2 = this.px, n2 = this.py; + a2._caching.lastFrame + a2.offsetTime <= a2.keyframes[0].t ? (i2[0] = a2.getValueAtTime((a2.keyframes[0].t + 0.01) / r2, 0), i2[1] = n2.getValueAtTime((n2.keyframes[0].t + 0.01) / r2, 0), s2[0] = a2.getValueAtTime(a2.keyframes[0].t / r2, 0), s2[1] = n2.getValueAtTime(n2.keyframes[0].t / r2, 0)) : a2._caching.lastFrame + a2.offsetTime >= a2.keyframes[a2.keyframes.length - 1].t ? (i2[0] = a2.getValueAtTime(a2.keyframes[a2.keyframes.length - 1].t / r2, 0), i2[1] = n2.getValueAtTime(n2.keyframes[n2.keyframes.length - 1].t / r2, 0), s2[0] = a2.getValueAtTime((a2.keyframes[a2.keyframes.length - 1].t - 0.01) / r2, 0), s2[1] = n2.getValueAtTime((n2.keyframes[n2.keyframes.length - 1].t - 0.01) / r2, 0)) : (i2 = [a2.pv, n2.pv], s2[0] = a2.getValueAtTime((a2._caching.lastFrame + a2.offsetTime - 0.01) / r2, a2.offsetTime), s2[1] = n2.getValueAtTime((n2._caching.lastFrame + n2.offsetTime - 0.01) / r2, n2.offsetTime)); + } else i2 = s2 = t2; + this.v.rotate(-Math.atan2(i2[1] - s2[1], i2[0] - s2[0])); + } + this.data.p && this.data.p.s ? this.data.p.z ? this.v.translate(this.px.v, this.py.v, -this.pz.v) : this.v.translate(this.px.v, this.py.v, 0) : this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]); + } + this.frameId = this.elem.globalData.frameId; + } + }, precalculateMatrix: function() { + if (this.appliedTransformations = 0, this.pre.reset(), !this.a.effectsSequence.length && (this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]), this.appliedTransformations = 1, !this.s.effectsSequence.length)) { + if (this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]), this.appliedTransformations = 2, this.sk) { + if (this.sk.effectsSequence.length || this.sa.effectsSequence.length) return; + this.pre.skewFromAxis(-this.sk.v, this.sa.v), this.appliedTransformations = 3; + } + this.r ? this.r.effectsSequence.length || (this.pre.rotate(-this.r.v), this.appliedTransformations = 4) : this.rz.effectsSequence.length || this.ry.effectsSequence.length || this.rx.effectsSequence.length || this.or.effectsSequence.length || (this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]), this.appliedTransformations = 4); + } + }, autoOrient: function() { + } }, extendPrototype([DynamicPropertyContainer], e2), e2.prototype.addDynamicProperty = function(t3) { + this._addDynamicProperty(t3), this.elem.addDynamicProperty(t3), this._isDirty = true; + }, e2.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty, { getTransformProperty: function(t3, r2, i2) { + return new e2(t3, r2, i2); + } }; + }(); + function RepeaterModifier() { + } + function RoundCornersModifier() { + } + function floatEqual(t2, e2) { + return 1e5 * Math.abs(t2 - e2) <= Math.min(Math.abs(t2), Math.abs(e2)); + } + function floatZero(t2) { + return Math.abs(t2) <= 1e-5; + } + function lerp(t2, e2, r2) { + return t2 * (1 - r2) + e2 * r2; + } + function lerpPoint(t2, e2, r2) { + return [lerp(t2[0], e2[0], r2), lerp(t2[1], e2[1], r2)]; + } + function quadRoots(t2, e2, r2) { + if (0 === t2) return []; + var i2 = e2 * e2 - 4 * t2 * r2; + if (i2 < 0) return []; + var s2 = -e2 / (2 * t2); + if (0 === i2) return [s2]; + var a2 = Math.sqrt(i2) / (2 * t2); + return [s2 - a2, s2 + a2]; + } + function polynomialCoefficients(t2, e2, r2, i2) { + return [3 * e2 - t2 - 3 * r2 + i2, 3 * t2 - 6 * e2 + 3 * r2, -3 * t2 + 3 * e2, t2]; + } + function singlePoint(t2) { + return new PolynomialBezier(t2, t2, t2, t2, false); + } + function PolynomialBezier(t2, e2, r2, i2, s2) { + s2 && pointEqual(t2, e2) && (e2 = lerpPoint(t2, i2, 1 / 3)), s2 && pointEqual(r2, i2) && (r2 = lerpPoint(t2, i2, 2 / 3)); + var a2 = polynomialCoefficients(t2[0], e2[0], r2[0], i2[0]), n2 = polynomialCoefficients(t2[1], e2[1], r2[1], i2[1]); + this.a = [a2[0], n2[0]], this.b = [a2[1], n2[1]], this.c = [a2[2], n2[2]], this.d = [a2[3], n2[3]], this.points = [t2, e2, r2, i2]; + } + function extrema(t2, e2) { + var r2 = t2.points[0][e2], i2 = t2.points[t2.points.length - 1][e2]; + if (r2 > i2) { + var s2 = i2; + i2 = r2, r2 = s2; + } + for (var a2 = quadRoots(3 * t2.a[e2], 2 * t2.b[e2], t2.c[e2]), n2 = 0; n2 < a2.length; n2 += 1) if (a2[n2] > 0 && a2[n2] < 1) { + var o2 = t2.point(a2[n2])[e2]; + o2 < r2 ? r2 = o2 : o2 > i2 && (i2 = o2); + } + return { min: r2, max: i2 }; + } + function intersectData(t2, e2, r2) { + var i2 = t2.boundingBox(); + return { cx: i2.cx, cy: i2.cy, width: i2.width, height: i2.height, bez: t2, t: (e2 + r2) / 2, t1: e2, t2: r2 }; + } + function splitData(t2) { + var e2 = t2.bez.split(0.5); + return [intersectData(e2[0], t2.t1, t2.t), intersectData(e2[1], t2.t, t2.t2)]; + } + function boxIntersect(t2, e2) { + return 2 * Math.abs(t2.cx - e2.cx) < t2.width + e2.width && 2 * Math.abs(t2.cy - e2.cy) < t2.height + e2.height; + } + function intersectsImpl(t2, e2, r2, i2, s2, a2) { + if (boxIntersect(t2, e2)) if (r2 >= a2 || t2.width <= i2 && t2.height <= i2 && e2.width <= i2 && e2.height <= i2) s2.push([t2.t, e2.t]); + else { + var n2 = splitData(t2), o2 = splitData(e2); + intersectsImpl(n2[0], o2[0], r2 + 1, i2, s2, a2), intersectsImpl(n2[0], o2[1], r2 + 1, i2, s2, a2), intersectsImpl(n2[1], o2[0], r2 + 1, i2, s2, a2), intersectsImpl(n2[1], o2[1], r2 + 1, i2, s2, a2); + } + } + function crossProduct(t2, e2) { + return [t2[1] * e2[2] - t2[2] * e2[1], t2[2] * e2[0] - t2[0] * e2[2], t2[0] * e2[1] - t2[1] * e2[0]]; + } + function lineIntersection(t2, e2, r2, i2) { + var s2 = [t2[0], t2[1], 1], a2 = [e2[0], e2[1], 1], n2 = [r2[0], r2[1], 1], o2 = [i2[0], i2[1], 1], h2 = crossProduct(crossProduct(s2, a2), crossProduct(n2, o2)); + return floatZero(h2[2]) ? null : [h2[0] / h2[2], h2[1] / h2[2]]; + } + function polarOffset(t2, e2, r2) { + return [t2[0] + Math.cos(e2) * r2, t2[1] - Math.sin(e2) * r2]; + } + function pointDistance(t2, e2) { + return Math.hypot(t2[0] - e2[0], t2[1] - e2[1]); + } + function pointEqual(t2, e2) { + return floatEqual(t2[0], e2[0]) && floatEqual(t2[1], e2[1]); + } + function ZigZagModifier() { + } + function setPoint(t2, e2, r2, i2, s2, a2, n2) { + var o2 = r2 - Math.PI / 2, h2 = r2 + Math.PI / 2, l2 = e2[0] + Math.cos(r2) * i2 * s2, p2 = e2[1] - Math.sin(r2) * i2 * s2; + t2.setTripleAt(l2, p2, l2 + Math.cos(o2) * a2, p2 - Math.sin(o2) * a2, l2 + Math.cos(h2) * n2, p2 - Math.sin(h2) * n2, t2.length()); + } + function getPerpendicularVector(t2, e2) { + var r2 = [e2[0] - t2[0], e2[1] - t2[1]], i2 = 0.5 * -Math.PI; + return [Math.cos(i2) * r2[0] - Math.sin(i2) * r2[1], Math.sin(i2) * r2[0] + Math.cos(i2) * r2[1]]; + } + function getProjectingAngle(t2, e2) { + var r2 = 0 === e2 ? t2.length() - 1 : e2 - 1, i2 = (e2 + 1) % t2.length(), s2 = getPerpendicularVector(t2.v[r2], t2.v[i2]); + return Math.atan2(0, 1) - Math.atan2(s2[1], s2[0]); + } + function zigZagCorner(t2, e2, r2, i2, s2, a2, n2) { + var o2 = getProjectingAngle(e2, r2), h2 = e2.v[r2 % e2._length], l2 = e2.v[0 === r2 ? e2._length - 1 : r2 - 1], p2 = e2.v[(r2 + 1) % e2._length], c2 = 2 === a2 ? Math.sqrt(Math.pow(h2[0] - l2[0], 2) + Math.pow(h2[1] - l2[1], 2)) : 0, f2 = 2 === a2 ? Math.sqrt(Math.pow(h2[0] - p2[0], 2) + Math.pow(h2[1] - p2[1], 2)) : 0; + setPoint(t2, e2.v[r2 % e2._length], o2, n2, i2, f2 / (2 * (s2 + 1)), c2 / (2 * (s2 + 1)), a2); + } + function zigZagSegment(t2, e2, r2, i2, s2, a2) { + for (var n2 = 0; n2 < i2; n2 += 1) { + var o2 = (n2 + 1) / (i2 + 1), h2 = 2 === s2 ? Math.sqrt(Math.pow(e2.points[3][0] - e2.points[0][0], 2) + Math.pow(e2.points[3][1] - e2.points[0][1], 2)) : 0, l2 = e2.normalAngle(o2); + setPoint(t2, e2.point(o2), l2, a2, r2, h2 / (2 * (i2 + 1)), h2 / (2 * (i2 + 1)), s2), a2 = -a2; + } + return a2; + } + function linearOffset(t2, e2, r2) { + var i2 = Math.atan2(e2[0] - t2[0], e2[1] - t2[1]); + return [polarOffset(t2, i2, r2), polarOffset(e2, i2, r2)]; + } + function offsetSegment(t2, e2) { + var r2, i2, s2, a2, n2, o2, h2; + r2 = (h2 = linearOffset(t2.points[0], t2.points[1], e2))[0], i2 = h2[1], s2 = (h2 = linearOffset(t2.points[1], t2.points[2], e2))[0], a2 = h2[1], n2 = (h2 = linearOffset(t2.points[2], t2.points[3], e2))[0], o2 = h2[1]; + var l2 = lineIntersection(r2, i2, s2, a2); + null === l2 && (l2 = i2); + var p2 = lineIntersection(n2, o2, s2, a2); + return null === p2 && (p2 = n2), new PolynomialBezier(r2, l2, p2, o2); + } + function joinLines(t2, e2, r2, i2, s2) { + var a2 = e2.points[3], n2 = r2.points[0]; + if (3 === i2) return a2; + if (pointEqual(a2, n2)) return a2; + if (2 === i2) { + var o2 = -e2.tangentAngle(1), h2 = -r2.tangentAngle(0) + Math.PI, l2 = lineIntersection(a2, polarOffset(a2, o2 + Math.PI / 2, 100), n2, polarOffset(n2, o2 + Math.PI / 2, 100)), p2 = l2 ? pointDistance(l2, a2) : pointDistance(a2, n2) / 2, c2 = polarOffset(a2, o2, 2 * p2 * roundCorner); + return t2.setXYAt(c2[0], c2[1], "o", t2.length() - 1), c2 = polarOffset(n2, h2, 2 * p2 * roundCorner), t2.setTripleAt(n2[0], n2[1], n2[0], n2[1], c2[0], c2[1], t2.length()), n2; + } + var f2 = lineIntersection(pointEqual(a2, e2.points[2]) ? e2.points[0] : e2.points[2], a2, n2, pointEqual(n2, r2.points[1]) ? r2.points[3] : r2.points[1]); + return f2 && pointDistance(f2, a2) < s2 ? (t2.setTripleAt(f2[0], f2[1], f2[0], f2[1], f2[0], f2[1], t2.length()), f2) : a2; + } + function getIntersection(t2, e2) { + var r2 = t2.intersections(e2); + return r2.length && floatEqual(r2[0][0], 1) && r2.shift(), r2.length ? r2[0] : null; + } + function pruneSegmentIntersection(t2, e2) { + var r2 = t2.slice(), i2 = e2.slice(), s2 = getIntersection(t2[t2.length - 1], e2[0]); + return s2 && (r2[t2.length - 1] = t2[t2.length - 1].split(s2[0])[0], i2[0] = e2[0].split(s2[1])[1]), t2.length > 1 && e2.length > 1 && (s2 = getIntersection(t2[0], e2[e2.length - 1])) ? [[t2[0].split(s2[0])[0]], [e2[e2.length - 1].split(s2[1])[1]]] : [r2, i2]; + } + function pruneIntersections(t2) { + for (var e2, r2 = 1; r2 < t2.length; r2 += 1) e2 = pruneSegmentIntersection(t2[r2 - 1], t2[r2]), t2[r2 - 1] = e2[0], t2[r2] = e2[1]; + return t2.length > 1 && (e2 = pruneSegmentIntersection(t2[t2.length - 1], t2[0]), t2[t2.length - 1] = e2[0], t2[0] = e2[1]), t2; + } + function offsetSegmentSplit(t2, e2) { + var r2, i2, s2, a2, n2 = t2.inflectionPoints(); + if (0 === n2.length) return [offsetSegment(t2, e2)]; + if (1 === n2.length || floatEqual(n2[1], 1)) return r2 = (s2 = t2.split(n2[0]))[0], i2 = s2[1], [offsetSegment(r2, e2), offsetSegment(i2, e2)]; + r2 = (s2 = t2.split(n2[0]))[0]; + var o2 = (n2[1] - n2[0]) / (1 - n2[0]); + return a2 = (s2 = s2[1].split(o2))[0], i2 = s2[1], [offsetSegment(r2, e2), offsetSegment(a2, e2), offsetSegment(i2, e2)]; + } + function OffsetPathModifier() { + } + function getFontProperties(t2) { + for (var e2 = t2.fStyle ? t2.fStyle.split(" ") : [], r2 = "normal", i2 = "normal", s2 = e2.length, a2 = 0; a2 < s2; a2 += 1) switch (e2[a2].toLowerCase()) { + case "italic": + i2 = "italic"; + break; + case "bold": + r2 = "700"; + break; + case "black": + r2 = "900"; + break; + case "medium": + r2 = "500"; + break; + case "regular": + case "normal": + r2 = "400"; + break; + case "light": + case "thin": + r2 = "200"; + } + return { style: i2, weight: t2.fWeight || r2 }; + } + extendPrototype([ShapeModifier], RepeaterModifier), RepeaterModifier.prototype.initModifierProperties = function(t2, e2) { + this.getValue = this.processKeys, this.c = PropertyFactory.getProp(t2, e2.c, 0, null, this), this.o = PropertyFactory.getProp(t2, e2.o, 0, null, this), this.tr = TransformPropertyFactory.getTransformProperty(t2, e2.tr, this), this.so = PropertyFactory.getProp(t2, e2.tr.so, 0, 0.01, this), this.eo = PropertyFactory.getProp(t2, e2.tr.eo, 0, 0.01, this), this.data = e2, this.dynamicProperties.length || this.getValue(true), this._isAnimated = !!this.dynamicProperties.length, this.pMatrix = new Matrix(), this.rMatrix = new Matrix(), this.sMatrix = new Matrix(), this.tMatrix = new Matrix(), this.matrix = new Matrix(); + }, RepeaterModifier.prototype.applyTransforms = function(t2, e2, r2, i2, s2, a2) { + var n2 = a2 ? -1 : 1, o2 = i2.s.v[0] + (1 - i2.s.v[0]) * (1 - s2), h2 = i2.s.v[1] + (1 - i2.s.v[1]) * (1 - s2); + t2.translate(i2.p.v[0] * n2 * s2, i2.p.v[1] * n2 * s2, i2.p.v[2]), e2.translate(-i2.a.v[0], -i2.a.v[1], i2.a.v[2]), e2.rotate(-i2.r.v * n2 * s2), e2.translate(i2.a.v[0], i2.a.v[1], i2.a.v[2]), r2.translate(-i2.a.v[0], -i2.a.v[1], i2.a.v[2]), r2.scale(a2 ? 1 / o2 : o2, a2 ? 1 / h2 : h2), r2.translate(i2.a.v[0], i2.a.v[1], i2.a.v[2]); + }, RepeaterModifier.prototype.init = function(t2, e2, r2, i2) { + for (this.elem = t2, this.arr = e2, this.pos = r2, this.elemsData = i2, this._currentCopies = 0, this._elements = [], this._groups = [], this.frameId = -1, this.initDynamicPropertyContainer(t2), this.initModifierProperties(t2, e2[r2]); r2 > 0; ) r2 -= 1, this._elements.unshift(e2[r2]); + this.dynamicProperties.length ? this.k = true : this.getValue(true); + }, RepeaterModifier.prototype.resetElements = function(t2) { + var e2, r2 = t2.length; + for (e2 = 0; e2 < r2; e2 += 1) t2[e2]._processed = false, "gr" === t2[e2].ty && this.resetElements(t2[e2].it); + }, RepeaterModifier.prototype.cloneElements = function(t2) { + var e2 = JSON.parse(JSON.stringify(t2)); + return this.resetElements(e2), e2; + }, RepeaterModifier.prototype.changeGroupRender = function(t2, e2) { + var r2, i2 = t2.length; + for (r2 = 0; r2 < i2; r2 += 1) t2[r2]._render = e2, "gr" === t2[r2].ty && this.changeGroupRender(t2[r2].it, e2); + }, RepeaterModifier.prototype.processShapes = function(t2) { + var e2, r2, i2, s2, a2, n2 = false; + if (this._mdf || t2) { + var o2, h2 = Math.ceil(this.c.v); + if (this._groups.length < h2) { + for (; this._groups.length < h2; ) { + var l2 = { it: this.cloneElements(this._elements), ty: "gr" }; + l2.it.push({ a: { a: 0, ix: 1, k: [0, 0] }, nm: "Transform", o: { a: 0, ix: 7, k: 100 }, p: { a: 0, ix: 2, k: [0, 0] }, r: { a: 1, ix: 6, k: [{ s: 0, e: 0, t: 0 }, { s: 0, e: 0, t: 1 }] }, s: { a: 0, ix: 3, k: [100, 100] }, sa: { a: 0, ix: 5, k: 0 }, sk: { a: 0, ix: 4, k: 0 }, ty: "tr" }), this.arr.splice(0, 0, l2), this._groups.splice(0, 0, l2), this._currentCopies += 1; + } + this.elem.reloadShapes(), n2 = true; + } + for (a2 = 0, i2 = 0; i2 <= this._groups.length - 1; i2 += 1) { + if (o2 = a2 < h2, this._groups[i2]._render = o2, this.changeGroupRender(this._groups[i2].it, o2), !o2) { + var p2 = this.elemsData[i2].it, c2 = p2[p2.length - 1]; + 0 !== c2.transform.op.v ? (c2.transform.op._mdf = true, c2.transform.op.v = 0) : c2.transform.op._mdf = false; + } + a2 += 1; + } + this._currentCopies = h2; + var f2 = this.o.v, u2 = f2 % 1, d2 = f2 > 0 ? Math.floor(f2) : Math.ceil(f2), m2 = this.pMatrix.props, y2 = this.rMatrix.props, g2 = this.sMatrix.props; + this.pMatrix.reset(), this.rMatrix.reset(), this.sMatrix.reset(), this.tMatrix.reset(), this.matrix.reset(); + var v2, b2, _2 = 0; + if (f2 > 0) { + for (; _2 < d2; ) this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false), _2 += 1; + u2 && (this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, u2, false), _2 += u2); + } else if (f2 < 0) { + for (; _2 > d2; ) this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true), _2 -= 1; + u2 && (this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -u2, true), _2 -= u2); + } + for (i2 = 1 === this.data.m ? 0 : this._currentCopies - 1, s2 = 1 === this.data.m ? 1 : -1, a2 = this._currentCopies; a2; ) { + if (b2 = (r2 = (e2 = this.elemsData[i2].it)[e2.length - 1].transform.mProps.v.props).length, e2[e2.length - 1].transform.mProps._mdf = true, e2[e2.length - 1].transform.op._mdf = true, e2[e2.length - 1].transform.op.v = 1 === this._currentCopies ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (i2 / (this._currentCopies - 1)), 0 !== _2) { + for ((0 !== i2 && 1 === s2 || i2 !== this._currentCopies - 1 && -1 === s2) && this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false), this.matrix.transform(y2[0], y2[1], y2[2], y2[3], y2[4], y2[5], y2[6], y2[7], y2[8], y2[9], y2[10], y2[11], y2[12], y2[13], y2[14], y2[15]), this.matrix.transform(g2[0], g2[1], g2[2], g2[3], g2[4], g2[5], g2[6], g2[7], g2[8], g2[9], g2[10], g2[11], g2[12], g2[13], g2[14], g2[15]), this.matrix.transform(m2[0], m2[1], m2[2], m2[3], m2[4], m2[5], m2[6], m2[7], m2[8], m2[9], m2[10], m2[11], m2[12], m2[13], m2[14], m2[15]), v2 = 0; v2 < b2; v2 += 1) r2[v2] = this.matrix.props[v2]; + this.matrix.reset(); + } else for (this.matrix.reset(), v2 = 0; v2 < b2; v2 += 1) r2[v2] = this.matrix.props[v2]; + _2 += 1, a2 -= 1, i2 += s2; + } + } else for (a2 = this._currentCopies, i2 = 0, s2 = 1; a2; ) r2 = (e2 = this.elemsData[i2].it)[e2.length - 1].transform.mProps.v.props, e2[e2.length - 1].transform.mProps._mdf = false, e2[e2.length - 1].transform.op._mdf = false, a2 -= 1, i2 += s2; + return n2; + }, RepeaterModifier.prototype.addShape = function() { + }, extendPrototype([ShapeModifier], RoundCornersModifier), RoundCornersModifier.prototype.initModifierProperties = function(t2, e2) { + this.getValue = this.processKeys, this.rd = PropertyFactory.getProp(t2, e2.r, 0, null, this), this._isAnimated = !!this.rd.effectsSequence.length; + }, RoundCornersModifier.prototype.processPath = function(t2, e2) { + var r2, i2 = shapePool.newElement(); + i2.c = t2.c; + var s2, a2, n2, o2, h2, l2, p2, c2, f2, u2, d2, m2, y2 = t2._length, g2 = 0; + for (r2 = 0; r2 < y2; r2 += 1) s2 = t2.v[r2], n2 = t2.o[r2], a2 = t2.i[r2], s2[0] === n2[0] && s2[1] === n2[1] && s2[0] === a2[0] && s2[1] === a2[1] ? 0 !== r2 && r2 !== y2 - 1 || t2.c ? (o2 = 0 === r2 ? t2.v[y2 - 1] : t2.v[r2 - 1], l2 = (h2 = Math.sqrt(Math.pow(s2[0] - o2[0], 2) + Math.pow(s2[1] - o2[1], 2))) ? Math.min(h2 / 2, e2) / h2 : 0, p2 = d2 = s2[0] + (o2[0] - s2[0]) * l2, c2 = m2 = s2[1] - (s2[1] - o2[1]) * l2, f2 = p2 - (p2 - s2[0]) * roundCorner, u2 = c2 - (c2 - s2[1]) * roundCorner, i2.setTripleAt(p2, c2, f2, u2, d2, m2, g2), g2 += 1, o2 = r2 === y2 - 1 ? t2.v[0] : t2.v[r2 + 1], l2 = (h2 = Math.sqrt(Math.pow(s2[0] - o2[0], 2) + Math.pow(s2[1] - o2[1], 2))) ? Math.min(h2 / 2, e2) / h2 : 0, p2 = f2 = s2[0] + (o2[0] - s2[0]) * l2, c2 = u2 = s2[1] + (o2[1] - s2[1]) * l2, d2 = p2 - (p2 - s2[0]) * roundCorner, m2 = c2 - (c2 - s2[1]) * roundCorner, i2.setTripleAt(p2, c2, f2, u2, d2, m2, g2), g2 += 1) : (i2.setTripleAt(s2[0], s2[1], n2[0], n2[1], a2[0], a2[1], g2), g2 += 1) : (i2.setTripleAt(t2.v[r2][0], t2.v[r2][1], t2.o[r2][0], t2.o[r2][1], t2.i[r2][0], t2.i[r2][1], g2), g2 += 1); + return i2; + }, RoundCornersModifier.prototype.processShapes = function(t2) { + var e2, r2, i2, s2, a2, n2, o2 = this.shapes.length, h2 = this.rd.v; + if (0 !== h2) for (r2 = 0; r2 < o2; r2 += 1) { + if (n2 = (a2 = this.shapes[r2]).localShapeCollection, a2.shape._mdf || this._mdf || t2) for (n2.releaseShapes(), a2.shape._mdf = true, e2 = a2.shape.paths.shapes, s2 = a2.shape.paths._length, i2 = 0; i2 < s2; i2 += 1) n2.addShape(this.processPath(e2[i2], h2)); + a2.shape.paths = a2.localShapeCollection; + } + this.dynamicProperties.length || (this._mdf = false); + }, PolynomialBezier.prototype.point = function(t2) { + return [((this.a[0] * t2 + this.b[0]) * t2 + this.c[0]) * t2 + this.d[0], ((this.a[1] * t2 + this.b[1]) * t2 + this.c[1]) * t2 + this.d[1]]; + }, PolynomialBezier.prototype.derivative = function(t2) { + return [(3 * t2 * this.a[0] + 2 * this.b[0]) * t2 + this.c[0], (3 * t2 * this.a[1] + 2 * this.b[1]) * t2 + this.c[1]]; + }, PolynomialBezier.prototype.tangentAngle = function(t2) { + var e2 = this.derivative(t2); + return Math.atan2(e2[1], e2[0]); + }, PolynomialBezier.prototype.normalAngle = function(t2) { + var e2 = this.derivative(t2); + return Math.atan2(e2[0], e2[1]); + }, PolynomialBezier.prototype.inflectionPoints = function() { + var t2 = this.a[1] * this.b[0] - this.a[0] * this.b[1]; + if (floatZero(t2)) return []; + var e2 = -0.5 * (this.a[1] * this.c[0] - this.a[0] * this.c[1]) / t2, r2 = e2 * e2 - 1 / 3 * (this.b[1] * this.c[0] - this.b[0] * this.c[1]) / t2; + if (r2 < 0) return []; + var i2 = Math.sqrt(r2); + return floatZero(i2) ? i2 > 0 && i2 < 1 ? [e2] : [] : [e2 - i2, e2 + i2].filter(function(t3) { + return t3 > 0 && t3 < 1; + }); + }, PolynomialBezier.prototype.split = function(t2) { + if (t2 <= 0) return [singlePoint(this.points[0]), this]; + if (t2 >= 1) return [this, singlePoint(this.points[this.points.length - 1])]; + var e2 = lerpPoint(this.points[0], this.points[1], t2), r2 = lerpPoint(this.points[1], this.points[2], t2), i2 = lerpPoint(this.points[2], this.points[3], t2), s2 = lerpPoint(e2, r2, t2), a2 = lerpPoint(r2, i2, t2), n2 = lerpPoint(s2, a2, t2); + return [new PolynomialBezier(this.points[0], e2, s2, n2, true), new PolynomialBezier(n2, a2, i2, this.points[3], true)]; + }, PolynomialBezier.prototype.bounds = function() { + return { x: extrema(this, 0), y: extrema(this, 1) }; + }, PolynomialBezier.prototype.boundingBox = function() { + var t2 = this.bounds(); + return { left: t2.x.min, right: t2.x.max, top: t2.y.min, bottom: t2.y.max, width: t2.x.max - t2.x.min, height: t2.y.max - t2.y.min, cx: (t2.x.max + t2.x.min) / 2, cy: (t2.y.max + t2.y.min) / 2 }; + }, PolynomialBezier.prototype.intersections = function(t2, e2, r2) { + void 0 === e2 && (e2 = 2), void 0 === r2 && (r2 = 7); + var i2 = []; + return intersectsImpl(intersectData(this, 0, 1), intersectData(t2, 0, 1), 0, e2, i2, r2), i2; + }, PolynomialBezier.shapeSegment = function(t2, e2) { + var r2 = (e2 + 1) % t2.length(); + return new PolynomialBezier(t2.v[e2], t2.o[e2], t2.i[r2], t2.v[r2], true); + }, PolynomialBezier.shapeSegmentInverted = function(t2, e2) { + var r2 = (e2 + 1) % t2.length(); + return new PolynomialBezier(t2.v[r2], t2.i[r2], t2.o[e2], t2.v[e2], true); + }, extendPrototype([ShapeModifier], ZigZagModifier), ZigZagModifier.prototype.initModifierProperties = function(t2, e2) { + this.getValue = this.processKeys, this.amplitude = PropertyFactory.getProp(t2, e2.s, 0, null, this), this.frequency = PropertyFactory.getProp(t2, e2.r, 0, null, this), this.pointsType = PropertyFactory.getProp(t2, e2.pt, 0, null, this), this._isAnimated = 0 !== this.amplitude.effectsSequence.length || 0 !== this.frequency.effectsSequence.length || 0 !== this.pointsType.effectsSequence.length; + }, ZigZagModifier.prototype.processPath = function(t2, e2, r2, i2) { + var s2 = t2._length, a2 = shapePool.newElement(); + if (a2.c = t2.c, t2.c || (s2 -= 1), 0 === s2) return a2; + var n2 = -1, o2 = PolynomialBezier.shapeSegment(t2, 0); + zigZagCorner(a2, t2, 0, e2, r2, i2, n2); + for (var h2 = 0; h2 < s2; h2 += 1) n2 = zigZagSegment(a2, o2, e2, r2, i2, -n2), o2 = h2 !== s2 - 1 || t2.c ? PolynomialBezier.shapeSegment(t2, (h2 + 1) % s2) : null, zigZagCorner(a2, t2, h2 + 1, e2, r2, i2, n2); + return a2; + }, ZigZagModifier.prototype.processShapes = function(t2) { + var e2, r2, i2, s2, a2, n2, o2 = this.shapes.length, h2 = this.amplitude.v, l2 = Math.max(0, Math.round(this.frequency.v)), p2 = this.pointsType.v; + if (0 !== h2) for (r2 = 0; r2 < o2; r2 += 1) { + if (n2 = (a2 = this.shapes[r2]).localShapeCollection, a2.shape._mdf || this._mdf || t2) for (n2.releaseShapes(), a2.shape._mdf = true, e2 = a2.shape.paths.shapes, s2 = a2.shape.paths._length, i2 = 0; i2 < s2; i2 += 1) n2.addShape(this.processPath(e2[i2], h2, l2, p2)); + a2.shape.paths = a2.localShapeCollection; + } + this.dynamicProperties.length || (this._mdf = false); + }, extendPrototype([ShapeModifier], OffsetPathModifier), OffsetPathModifier.prototype.initModifierProperties = function(t2, e2) { + this.getValue = this.processKeys, this.amount = PropertyFactory.getProp(t2, e2.a, 0, null, this), this.miterLimit = PropertyFactory.getProp(t2, e2.ml, 0, null, this), this.lineJoin = e2.lj, this._isAnimated = 0 !== this.amount.effectsSequence.length; + }, OffsetPathModifier.prototype.processPath = function(t2, e2, r2, i2) { + var s2 = shapePool.newElement(); + s2.c = t2.c; + var a2, n2, o2, h2 = t2.length(); + t2.c || (h2 -= 1); + var l2 = []; + for (a2 = 0; a2 < h2; a2 += 1) o2 = PolynomialBezier.shapeSegment(t2, a2), l2.push(offsetSegmentSplit(o2, e2)); + if (!t2.c) for (a2 = h2 - 1; a2 >= 0; a2 -= 1) o2 = PolynomialBezier.shapeSegmentInverted(t2, a2), l2.push(offsetSegmentSplit(o2, e2)); + l2 = pruneIntersections(l2); + var p2 = null, c2 = null; + for (a2 = 0; a2 < l2.length; a2 += 1) { + var f2 = l2[a2]; + for (c2 && (p2 = joinLines(s2, c2, f2[0], r2, i2)), c2 = f2[f2.length - 1], n2 = 0; n2 < f2.length; n2 += 1) o2 = f2[n2], p2 && pointEqual(o2.points[0], p2) ? s2.setXYAt(o2.points[1][0], o2.points[1][1], "o", s2.length() - 1) : s2.setTripleAt(o2.points[0][0], o2.points[0][1], o2.points[1][0], o2.points[1][1], o2.points[0][0], o2.points[0][1], s2.length()), s2.setTripleAt(o2.points[3][0], o2.points[3][1], o2.points[3][0], o2.points[3][1], o2.points[2][0], o2.points[2][1], s2.length()), p2 = o2.points[3]; + } + return l2.length && joinLines(s2, c2, l2[0][0], r2, i2), s2; + }, OffsetPathModifier.prototype.processShapes = function(t2) { + var e2, r2, i2, s2, a2, n2, o2 = this.shapes.length, h2 = this.amount.v, l2 = this.miterLimit.v, p2 = this.lineJoin; + if (0 !== h2) for (r2 = 0; r2 < o2; r2 += 1) { + if (n2 = (a2 = this.shapes[r2]).localShapeCollection, a2.shape._mdf || this._mdf || t2) for (n2.releaseShapes(), a2.shape._mdf = true, e2 = a2.shape.paths.shapes, s2 = a2.shape.paths._length, i2 = 0; i2 < s2; i2 += 1) n2.addShape(this.processPath(e2[i2], h2, p2, l2)); + a2.shape.paths = a2.localShapeCollection; + } + this.dynamicProperties.length || (this._mdf = false); + }; + var FontManager = function() { + var t2 = { w: 0, size: 0, shapes: [], data: { shapes: [] } }, e2 = []; + e2 = e2.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]); + var r2 = 127988, i2 = ["d83cdffb", "d83cdffc", "d83cdffd", "d83cdffe", "d83cdfff"]; + function s2(t3, e3) { + var r3 = createTag("span"); + r3.setAttribute("aria-hidden", true), r3.style.fontFamily = e3; + var i3 = createTag("span"); + i3.innerText = "giItT1WQy@!-/#", r3.style.position = "absolute", r3.style.left = "-10000px", r3.style.top = "-10000px", r3.style.fontSize = "300px", r3.style.fontVariant = "normal", r3.style.fontStyle = "normal", r3.style.fontWeight = "normal", r3.style.letterSpacing = "0", r3.appendChild(i3), document.body.appendChild(r3); + var s3 = i3.offsetWidth; + return i3.style.fontFamily = function(t4) { + var e4, r4 = t4.split(","), i4 = r4.length, s4 = []; + for (e4 = 0; e4 < i4; e4 += 1) "sans-serif" !== r4[e4] && "monospace" !== r4[e4] && s4.push(r4[e4]); + return s4.join(","); + }(t3) + ", " + e3, { node: i3, w: s3, parent: r3 }; + } + function a2(t3, e3) { + var r3, i3 = document.body && e3 ? "svg" : "canvas", s3 = getFontProperties(t3); + if ("svg" === i3) { + var a3 = createNS("text"); + a3.style.fontSize = "100px", a3.setAttribute("font-family", t3.fFamily), a3.setAttribute("font-style", s3.style), a3.setAttribute("font-weight", s3.weight), a3.textContent = "1", t3.fClass ? (a3.style.fontFamily = "inherit", a3.setAttribute("class", t3.fClass)) : a3.style.fontFamily = t3.fFamily, e3.appendChild(a3), r3 = a3; + } else { + var n3 = new OffscreenCanvas(500, 500).getContext("2d"); + n3.font = s3.style + " " + s3.weight + " 100px " + t3.fFamily, r3 = n3; + } + return { measureText: function(t4) { + return "svg" === i3 ? (r3.textContent = t4, r3.getComputedTextLength()) : r3.measureText(t4).width; + } }; + } + function n2(t3) { + var e3 = 0, r3 = t3.charCodeAt(0); + if (r3 >= 55296 && r3 <= 56319) { + var i3 = t3.charCodeAt(1); + i3 >= 56320 && i3 <= 57343 && (e3 = 1024 * (r3 - 55296) + i3 - 56320 + 65536); + } + return e3; + } + function o2(t3) { + var e3 = n2(t3); + return e3 >= 127462 && e3 <= 127487; + } + var h2 = function() { + this.fonts = [], this.chars = null, this.typekitLoaded = 0, this.isLoaded = false, this._warned = false, this.initTime = Date.now(), this.setIsLoadedBinded = this.setIsLoaded.bind(this), this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this); + }; + h2.isModifier = function(t3, e3) { + var r3 = t3.toString(16) + e3.toString(16); + return -1 !== i2.indexOf(r3); + }, h2.isZeroWidthJoiner = function(t3) { + return 8205 === t3; + }, h2.isFlagEmoji = function(t3) { + return o2(t3.substr(0, 2)) && o2(t3.substr(2, 2)); + }, h2.isRegionalCode = o2, h2.isCombinedCharacter = function(t3) { + return -1 !== e2.indexOf(t3); + }, h2.isRegionalFlag = function(t3, e3) { + var i3 = n2(t3.substr(e3, 2)); + if (i3 !== r2) return false; + var s3 = 0; + for (e3 += 2; s3 < 5; ) { + if ((i3 = n2(t3.substr(e3, 2))) < 917601 || i3 > 917626) return false; + s3 += 1, e3 += 2; + } + return 917631 === n2(t3.substr(e3, 2)); + }, h2.isVariationSelector = function(t3) { + return 65039 === t3; + }, h2.BLACK_FLAG_CODE_POINT = r2; + var l2 = { addChars: function(t3) { + if (t3) { + var e3; + this.chars || (this.chars = []); + var r3, i3, s3 = t3.length, a3 = this.chars.length; + for (e3 = 0; e3 < s3; e3 += 1) { + for (r3 = 0, i3 = false; r3 < a3; ) this.chars[r3].style === t3[e3].style && this.chars[r3].fFamily === t3[e3].fFamily && this.chars[r3].ch === t3[e3].ch && (i3 = true), r3 += 1; + i3 || (this.chars.push(t3[e3]), a3 += 1); + } + } + }, addFonts: function(t3, e3) { + if (t3) { + if (this.chars) return this.isLoaded = true, void (this.fonts = t3.list); + if (!document.body) return this.isLoaded = true, t3.list.forEach(function(t4) { + t4.helper = a2(t4), t4.cache = {}; + }), void (this.fonts = t3.list); + var r3, i3 = t3.list, n3 = i3.length, o3 = n3; + for (r3 = 0; r3 < n3; r3 += 1) { + var h3, l3, p2 = true; + if (i3[r3].loaded = false, i3[r3].monoCase = s2(i3[r3].fFamily, "monospace"), i3[r3].sansCase = s2(i3[r3].fFamily, "sans-serif"), i3[r3].fPath) { + if ("p" === i3[r3].fOrigin || 3 === i3[r3].origin) { + if ((h3 = document.querySelectorAll('style[f-forigin="p"][f-family="' + i3[r3].fFamily + '"], style[f-origin="3"][f-family="' + i3[r3].fFamily + '"]')).length > 0 && (p2 = false), p2) { + var c2 = createTag("style"); + c2.setAttribute("f-forigin", i3[r3].fOrigin), c2.setAttribute("f-origin", i3[r3].origin), c2.setAttribute("f-family", i3[r3].fFamily), c2.type = "text/css", c2.innerText = "@font-face {font-family: " + i3[r3].fFamily + "; font-style: normal; src: url('" + i3[r3].fPath + "');}", e3.appendChild(c2); + } + } else if ("g" === i3[r3].fOrigin || 1 === i3[r3].origin) { + for (h3 = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'), l3 = 0; l3 < h3.length; l3 += 1) -1 !== h3[l3].href.indexOf(i3[r3].fPath) && (p2 = false); + if (p2) { + var f2 = createTag("link"); + f2.setAttribute("f-forigin", i3[r3].fOrigin), f2.setAttribute("f-origin", i3[r3].origin), f2.type = "text/css", f2.rel = "stylesheet", f2.href = i3[r3].fPath, document.body.appendChild(f2); + } + } else if ("t" === i3[r3].fOrigin || 2 === i3[r3].origin) { + for (h3 = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'), l3 = 0; l3 < h3.length; l3 += 1) i3[r3].fPath === h3[l3].src && (p2 = false); + if (p2) { + var u2 = createTag("link"); + u2.setAttribute("f-forigin", i3[r3].fOrigin), u2.setAttribute("f-origin", i3[r3].origin), u2.setAttribute("rel", "stylesheet"), u2.setAttribute("href", i3[r3].fPath), e3.appendChild(u2); + } + } + } else i3[r3].loaded = true, o3 -= 1; + i3[r3].helper = a2(i3[r3], e3), i3[r3].cache = {}, this.fonts.push(i3[r3]); + } + 0 === o3 ? this.isLoaded = true : setTimeout(this.checkLoadedFonts.bind(this), 100); + } else this.isLoaded = true; + }, getCharData: function(e3, r3, i3) { + for (var s3 = 0, a3 = this.chars.length; s3 < a3; ) { + if (this.chars[s3].ch === e3 && this.chars[s3].style === r3 && this.chars[s3].fFamily === i3) return this.chars[s3]; + s3 += 1; + } + return ("string" == typeof e3 && 13 !== e3.charCodeAt(0) || !e3) && console && console.warn && !this._warned && (this._warned = true, console.warn("Missing character from exported characters list: ", e3, r3, i3)), t2; + }, getFontByName: function(t3) { + for (var e3 = 0, r3 = this.fonts.length; e3 < r3; ) { + if (this.fonts[e3].fName === t3) return this.fonts[e3]; + e3 += 1; + } + return this.fonts[0]; + }, measureText: function(t3, e3, r3) { + var i3 = this.getFontByName(e3), s3 = t3; + if (!i3.cache[s3]) { + var a3 = i3.helper; + if (" " === t3) { + var n3 = a3.measureText("|" + t3 + "|"), o3 = a3.measureText("||"); + i3.cache[s3] = (n3 - o3) / 100; + } else i3.cache[s3] = a3.measureText(t3) / 100; + } + return i3.cache[s3] * r3; + }, checkLoadedFonts: function() { + var t3, e3, r3, i3 = this.fonts.length, s3 = i3; + for (t3 = 0; t3 < i3; t3 += 1) this.fonts[t3].loaded ? s3 -= 1 : "n" === this.fonts[t3].fOrigin || 0 === this.fonts[t3].origin ? this.fonts[t3].loaded = true : (e3 = this.fonts[t3].monoCase.node, r3 = this.fonts[t3].monoCase.w, e3.offsetWidth !== r3 ? (s3 -= 1, this.fonts[t3].loaded = true) : (e3 = this.fonts[t3].sansCase.node, r3 = this.fonts[t3].sansCase.w, e3.offsetWidth !== r3 && (s3 -= 1, this.fonts[t3].loaded = true)), this.fonts[t3].loaded && (this.fonts[t3].sansCase.parent.parentNode.removeChild(this.fonts[t3].sansCase.parent), this.fonts[t3].monoCase.parent.parentNode.removeChild(this.fonts[t3].monoCase.parent))); + 0 !== s3 && Date.now() - this.initTime < 5e3 ? setTimeout(this.checkLoadedFontsBinded, 20) : setTimeout(this.setIsLoadedBinded, 10); + }, setIsLoaded: function() { + this.isLoaded = true; + } }; + return h2.prototype = l2, h2; + }(); + function SlotManager(t2) { + this.animationData = t2; + } + function slotFactory(t2) { + return new SlotManager(t2); + } + function RenderableElement() { + } + SlotManager.prototype.getProp = function(t2) { + return this.animationData.slots && this.animationData.slots[t2.sid] ? Object.assign(t2, this.animationData.slots[t2.sid].p) : t2; + }, RenderableElement.prototype = { initRenderable: function() { + this.isInRange = false, this.hidden = false, this.isTransparent = false, this.renderableComponents = []; + }, addRenderableComponent: function(t2) { + -1 === this.renderableComponents.indexOf(t2) && this.renderableComponents.push(t2); + }, removeRenderableComponent: function(t2) { + -1 !== this.renderableComponents.indexOf(t2) && this.renderableComponents.splice(this.renderableComponents.indexOf(t2), 1); + }, prepareRenderableFrame: function(t2) { + this.checkLayerLimits(t2); + }, checkTransparency: function() { + this.finalTransform.mProp.o.v <= 0 ? !this.isTransparent && this.globalData.renderConfig.hideOnTransparent && (this.isTransparent = true, this.hide()) : this.isTransparent && (this.isTransparent = false, this.show()); + }, checkLayerLimits: function(t2) { + this.data.ip - this.data.st <= t2 && this.data.op - this.data.st > t2 ? true !== this.isInRange && (this.globalData._mdf = true, this._mdf = true, this.isInRange = true, this.show()) : false !== this.isInRange && (this.globalData._mdf = true, this.isInRange = false, this.hide()); + }, renderRenderable: function() { + var t2, e2 = this.renderableComponents.length; + for (t2 = 0; t2 < e2; t2 += 1) this.renderableComponents[t2].renderFrame(this._isFirstFrame); + }, sourceRectAtTime: function() { + return { top: 0, left: 0, width: 100, height: 100 }; + }, getLayerSize: function() { + return 5 === this.data.ty ? { w: this.data.textData.width, h: this.data.textData.height } : { w: this.data.width, h: this.data.height }; + } }; + var getBlendMode = (blendModeEnums = { 0: "source-over", 1: "multiply", 2: "screen", 3: "overlay", 4: "darken", 5: "lighten", 6: "color-dodge", 7: "color-burn", 8: "hard-light", 9: "soft-light", 10: "difference", 11: "exclusion", 12: "hue", 13: "saturation", 14: "color", 15: "luminosity" }, function(t2) { + return blendModeEnums[t2] || ""; + }), blendModeEnums; + function SliderEffect(t2, e2, r2) { + this.p = PropertyFactory.getProp(e2, t2.v, 0, 0, r2); + } + function AngleEffect(t2, e2, r2) { + this.p = PropertyFactory.getProp(e2, t2.v, 0, 0, r2); + } + function ColorEffect(t2, e2, r2) { + this.p = PropertyFactory.getProp(e2, t2.v, 1, 0, r2); + } + function PointEffect(t2, e2, r2) { + this.p = PropertyFactory.getProp(e2, t2.v, 1, 0, r2); + } + function LayerIndexEffect(t2, e2, r2) { + this.p = PropertyFactory.getProp(e2, t2.v, 0, 0, r2); + } + function MaskIndexEffect(t2, e2, r2) { + this.p = PropertyFactory.getProp(e2, t2.v, 0, 0, r2); + } + function CheckboxEffect(t2, e2, r2) { + this.p = PropertyFactory.getProp(e2, t2.v, 0, 0, r2); + } + function NoValueEffect() { + this.p = {}; + } + function EffectsManager(t2, e2) { + var r2, i2 = t2.ef || []; + this.effectElements = []; + var s2, a2 = i2.length; + for (r2 = 0; r2 < a2; r2 += 1) s2 = new GroupEffect(i2[r2], e2), this.effectElements.push(s2); + } + function GroupEffect(t2, e2) { + this.init(t2, e2); + } + function BaseElement() { + } + function FrameElement() { + } + function FootageElement(t2, e2, r2) { + this.initFrame(), this.initRenderable(), this.assetData = e2.getAssetData(t2.refId), this.footageData = e2.imageLoader.getAsset(this.assetData), this.initBaseData(t2, e2, r2); + } + function AudioElement(t2, e2, r2) { + this.initFrame(), this.initRenderable(), this.assetData = e2.getAssetData(t2.refId), this.initBaseData(t2, e2, r2), this._isPlaying = false, this._canPlay = false; + var i2 = this.globalData.getAssetsPath(this.assetData); + this.audio = this.globalData.audioController.createAudio(i2), this._currentTime = 0, this.globalData.audioController.addAudio(this), this._volumeMultiplier = 1, this._volume = 1, this._previousVolume = null, this.tm = t2.tm ? PropertyFactory.getProp(this, t2.tm, 0, e2.frameRate, this) : { _placeholder: true }, this.lv = PropertyFactory.getProp(this, t2.au && t2.au.lv ? t2.au.lv : { k: [100] }, 1, 0.01, this); + } + function BaseRenderer() { + } + extendPrototype([DynamicPropertyContainer], GroupEffect), GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties, GroupEffect.prototype.init = function(t2, e2) { + var r2; + this.data = t2, this.effectElements = [], this.initDynamicPropertyContainer(e2); + var i2, s2 = this.data.ef.length, a2 = this.data.ef; + for (r2 = 0; r2 < s2; r2 += 1) { + switch (i2 = null, a2[r2].ty) { + case 0: + i2 = new SliderEffect(a2[r2], e2, this); + break; + case 1: + i2 = new AngleEffect(a2[r2], e2, this); + break; + case 2: + i2 = new ColorEffect(a2[r2], e2, this); + break; + case 3: + i2 = new PointEffect(a2[r2], e2, this); + break; + case 4: + case 7: + i2 = new CheckboxEffect(a2[r2], e2, this); + break; + case 10: + i2 = new LayerIndexEffect(a2[r2], e2, this); + break; + case 11: + i2 = new MaskIndexEffect(a2[r2], e2, this); + break; + case 5: + i2 = new EffectsManager(a2[r2], e2, this); + break; + default: + i2 = new NoValueEffect(a2[r2], e2, this); + } + i2 && this.effectElements.push(i2); + } + }, BaseElement.prototype = { checkMasks: function() { + if (!this.data.hasMask) return false; + for (var t2 = 0, e2 = this.data.masksProperties.length; t2 < e2; ) { + if ("n" !== this.data.masksProperties[t2].mode && false !== this.data.masksProperties[t2].cl) return true; + t2 += 1; + } + return false; + }, initExpressions: function() { + var t2 = getExpressionInterfaces(); + if (t2) { + var e2 = t2("layer"), r2 = t2("effects"), i2 = t2("shape"), s2 = t2("text"), a2 = t2("comp"); + this.layerInterface = e2(this), this.data.hasMask && this.maskManager && this.layerInterface.registerMaskInterface(this.maskManager); + var n2 = r2.createEffectsInterface(this, this.layerInterface); + this.layerInterface.registerEffectsInterface(n2), 0 === this.data.ty || this.data.xt ? this.compInterface = a2(this) : 4 === this.data.ty ? (this.layerInterface.shapeInterface = i2(this.shapesData, this.itemsData, this.layerInterface), this.layerInterface.content = this.layerInterface.shapeInterface) : 5 === this.data.ty && (this.layerInterface.textInterface = s2(this), this.layerInterface.text = this.layerInterface.textInterface); + } + }, setBlendMode: function() { + var t2 = getBlendMode(this.data.bm); + (this.baseElement || this.layerElement).style["mix-blend-mode"] = t2; + }, initBaseData: function(t2, e2, r2) { + this.globalData = e2, this.comp = r2, this.data = t2, this.layerId = createElementID(), this.data.sr || (this.data.sr = 1), this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties); + }, getType: function() { + return this.type; + }, sourceRectAtTime: function() { + } }, FrameElement.prototype = { initFrame: function() { + this._isFirstFrame = false, this.dynamicProperties = [], this._mdf = false; + }, prepareProperties: function(t2, e2) { + var r2, i2 = this.dynamicProperties.length; + for (r2 = 0; r2 < i2; r2 += 1) (e2 || this._isParent && "transform" === this.dynamicProperties[r2].propType) && (this.dynamicProperties[r2].getValue(), this.dynamicProperties[r2]._mdf && (this.globalData._mdf = true, this._mdf = true)); + }, addDynamicProperty: function(t2) { + -1 === this.dynamicProperties.indexOf(t2) && this.dynamicProperties.push(t2); + } }, FootageElement.prototype.prepareFrame = function() { + }, extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement), FootageElement.prototype.getBaseElement = function() { + return null; + }, FootageElement.prototype.renderFrame = function() { + }, FootageElement.prototype.destroy = function() { + }, FootageElement.prototype.initExpressions = function() { + var t2 = getExpressionInterfaces(); + if (t2) { + var e2 = t2("footage"); + this.layerInterface = e2(this); + } + }, FootageElement.prototype.getFootageData = function() { + return this.footageData; + }, AudioElement.prototype.prepareFrame = function(t2) { + if (this.prepareRenderableFrame(t2, true), this.prepareProperties(t2, true), this.tm._placeholder) this._currentTime = t2 / this.data.sr; + else { + var e2 = this.tm.v; + this._currentTime = e2; + } + this._volume = this.lv.v[0]; + var r2 = this._volume * this._volumeMultiplier; + this._previousVolume !== r2 && (this._previousVolume = r2, this.audio.volume(r2)); + }, extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement), AudioElement.prototype.renderFrame = function() { + this.isInRange && this._canPlay && (this._isPlaying ? (!this.audio.playing() || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1) && this.audio.seek(this._currentTime / this.globalData.frameRate) : (this.audio.play(), this.audio.seek(this._currentTime / this.globalData.frameRate), this._isPlaying = true)); + }, AudioElement.prototype.show = function() { + }, AudioElement.prototype.hide = function() { + this.audio.pause(), this._isPlaying = false; + }, AudioElement.prototype.pause = function() { + this.audio.pause(), this._isPlaying = false, this._canPlay = false; + }, AudioElement.prototype.resume = function() { + this._canPlay = true; + }, AudioElement.prototype.setRate = function(t2) { + this.audio.rate(t2); + }, AudioElement.prototype.volume = function(t2) { + this._volumeMultiplier = t2, this._previousVolume = t2 * this._volume, this.audio.volume(this._previousVolume); + }, AudioElement.prototype.getBaseElement = function() { + return null; + }, AudioElement.prototype.destroy = function() { + }, AudioElement.prototype.sourceRectAtTime = function() { + }, AudioElement.prototype.initExpressions = function() { + }, BaseRenderer.prototype.checkLayers = function(t2) { + var e2, r2, i2 = this.layers.length; + for (this.completeLayers = true, e2 = i2 - 1; e2 >= 0; e2 -= 1) this.elements[e2] || (r2 = this.layers[e2]).ip - r2.st <= t2 - this.layers[e2].st && r2.op - r2.st > t2 - this.layers[e2].st && this.buildItem(e2), this.completeLayers = !!this.elements[e2] && this.completeLayers; + this.checkPendingElements(); + }, BaseRenderer.prototype.createItem = function(t2) { + switch (t2.ty) { + case 2: + return this.createImage(t2); + case 0: + return this.createComp(t2); + case 1: + return this.createSolid(t2); + case 3: + default: + return this.createNull(t2); + case 4: + return this.createShape(t2); + case 5: + return this.createText(t2); + case 6: + return this.createAudio(t2); + case 13: + return this.createCamera(t2); + case 15: + return this.createFootage(t2); + } + }, BaseRenderer.prototype.createCamera = function() { + throw new Error("You're using a 3d camera. Try the html renderer."); + }, BaseRenderer.prototype.createAudio = function(t2) { + return new AudioElement(t2, this.globalData, this); + }, BaseRenderer.prototype.createFootage = function(t2) { + return new FootageElement(t2, this.globalData, this); + }, BaseRenderer.prototype.buildAllItems = function() { + var t2, e2 = this.layers.length; + for (t2 = 0; t2 < e2; t2 += 1) this.buildItem(t2); + this.checkPendingElements(); + }, BaseRenderer.prototype.includeLayers = function(t2) { + var e2; + this.completeLayers = false; + var r2, i2 = t2.length, s2 = this.layers.length; + for (e2 = 0; e2 < i2; e2 += 1) for (r2 = 0; r2 < s2; ) { + if (this.layers[r2].id === t2[e2].id) { + this.layers[r2] = t2[e2]; + break; + } + r2 += 1; + } + }, BaseRenderer.prototype.setProjectInterface = function(t2) { + this.globalData.projectInterface = t2; + }, BaseRenderer.prototype.initItems = function() { + this.globalData.progressiveLoad || this.buildAllItems(); + }, BaseRenderer.prototype.buildElementParenting = function(t2, e2, r2) { + for (var i2 = this.elements, s2 = this.layers, a2 = 0, n2 = s2.length; a2 < n2; ) s2[a2].ind == e2 && (i2[a2] && true !== i2[a2] ? (r2.push(i2[a2]), i2[a2].setAsParent(), void 0 !== s2[a2].parent ? this.buildElementParenting(t2, s2[a2].parent, r2) : t2.setHierarchy(r2)) : (this.buildItem(a2), this.addPendingElement(t2))), a2 += 1; + }, BaseRenderer.prototype.addPendingElement = function(t2) { + this.pendingElements.push(t2); + }, BaseRenderer.prototype.searchExtraCompositions = function(t2) { + var e2, r2 = t2.length; + for (e2 = 0; e2 < r2; e2 += 1) if (t2[e2].xt) { + var i2 = this.createComp(t2[e2]); + i2.initExpressions(), this.globalData.projectInterface.registerComposition(i2); + } + }, BaseRenderer.prototype.getElementById = function(t2) { + var e2, r2 = this.elements.length; + for (e2 = 0; e2 < r2; e2 += 1) if (this.elements[e2].data.ind === t2) return this.elements[e2]; + return null; + }, BaseRenderer.prototype.getElementByPath = function(t2) { + var e2, r2 = t2.shift(); + if ("number" == typeof r2) e2 = this.elements[r2]; + else { + var i2, s2 = this.elements.length; + for (i2 = 0; i2 < s2; i2 += 1) if (this.elements[i2].data.nm === r2) { + e2 = this.elements[i2]; + break; + } + } + return 0 === t2.length ? e2 : e2.getElementByPath(t2); + }, BaseRenderer.prototype.setupGlobalData = function(t2, e2) { + this.globalData.fontManager = new FontManager(), this.globalData.slotManager = slotFactory(t2), this.globalData.fontManager.addChars(t2.chars), this.globalData.fontManager.addFonts(t2.fonts, e2), this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem), this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem), this.globalData.imageLoader = this.animationItem.imagePreloader, this.globalData.audioController = this.animationItem.audioController, this.globalData.frameId = 0, this.globalData.frameRate = t2.fr, this.globalData.nm = t2.nm, this.globalData.compSize = { w: t2.w, h: t2.h }; + }; + var effectTypes = { TRANSFORM_EFFECT: "transformEFfect" }; + function TransformElement() { + } + function MaskElement(t2, e2, r2) { + this.data = t2, this.element = e2, this.globalData = r2, this.storedData = [], this.masksProperties = this.data.masksProperties || [], this.maskElement = null; + var i2, s2, a2 = this.globalData.defs, n2 = this.masksProperties ? this.masksProperties.length : 0; + this.viewData = createSizedArray(n2), this.solidPath = ""; + var o2, h2, l2, p2, c2, f2, u2 = this.masksProperties, d2 = 0, m2 = [], y2 = createElementID(), g2 = "clipPath", v2 = "clip-path"; + for (i2 = 0; i2 < n2; i2 += 1) if (("a" !== u2[i2].mode && "n" !== u2[i2].mode || u2[i2].inv || 100 !== u2[i2].o.k || u2[i2].o.x) && (g2 = "mask", v2 = "mask"), "s" !== u2[i2].mode && "i" !== u2[i2].mode || 0 !== d2 ? l2 = null : ((l2 = createNS("rect")).setAttribute("fill", "#ffffff"), l2.setAttribute("width", this.element.comp.data.w || 0), l2.setAttribute("height", this.element.comp.data.h || 0), m2.push(l2)), s2 = createNS("path"), "n" === u2[i2].mode) this.viewData[i2] = { op: PropertyFactory.getProp(this.element, u2[i2].o, 0, 0.01, this.element), prop: ShapePropertyFactory.getShapeProp(this.element, u2[i2], 3), elem: s2, lastPath: "" }, a2.appendChild(s2); + else { + var b2; + if (d2 += 1, s2.setAttribute("fill", "s" === u2[i2].mode ? "#000000" : "#ffffff"), s2.setAttribute("clip-rule", "nonzero"), 0 !== u2[i2].x.k ? (g2 = "mask", v2 = "mask", f2 = PropertyFactory.getProp(this.element, u2[i2].x, 0, null, this.element), b2 = createElementID(), (p2 = createNS("filter")).setAttribute("id", b2), (c2 = createNS("feMorphology")).setAttribute("operator", "erode"), c2.setAttribute("in", "SourceGraphic"), c2.setAttribute("radius", "0"), p2.appendChild(c2), a2.appendChild(p2), s2.setAttribute("stroke", "s" === u2[i2].mode ? "#000000" : "#ffffff")) : (c2 = null, f2 = null), this.storedData[i2] = { elem: s2, x: f2, expan: c2, lastPath: "", lastOperator: "", filterId: b2, lastRadius: 0 }, "i" === u2[i2].mode) { + h2 = m2.length; + var _2 = createNS("g"); + for (o2 = 0; o2 < h2; o2 += 1) _2.appendChild(m2[o2]); + var P2 = createNS("mask"); + P2.setAttribute("mask-type", "alpha"), P2.setAttribute("id", y2 + "_" + d2), P2.appendChild(s2), a2.appendChild(P2), _2.setAttribute("mask", "url(" + getLocationHref() + "#" + y2 + "_" + d2 + ")"), m2.length = 0, m2.push(_2); + } else m2.push(s2); + u2[i2].inv && !this.solidPath && (this.solidPath = this.createLayerSolidPath()), this.viewData[i2] = { elem: s2, lastPath: "", op: PropertyFactory.getProp(this.element, u2[i2].o, 0, 0.01, this.element), prop: ShapePropertyFactory.getShapeProp(this.element, u2[i2], 3), invRect: l2 }, this.viewData[i2].prop.k || this.drawPath(u2[i2], this.viewData[i2].prop.v, this.viewData[i2]); + } + for (this.maskElement = createNS(g2), n2 = m2.length, i2 = 0; i2 < n2; i2 += 1) this.maskElement.appendChild(m2[i2]); + d2 > 0 && (this.maskElement.setAttribute("id", y2), this.element.maskedElement.setAttribute(v2, "url(" + getLocationHref() + "#" + y2 + ")"), a2.appendChild(this.maskElement)), this.viewData.length && this.element.addRenderableComponent(this); + } + TransformElement.prototype = { initTransform: function() { + var t2 = new Matrix(); + this.finalTransform = { mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : { o: 0 }, _matMdf: false, _localMatMdf: false, _opMdf: false, mat: t2, localMat: t2, localOpacity: 1 }, this.data.ao && (this.finalTransform.mProp.autoOriented = true), this.data.ty; + }, renderTransform: function() { + if (this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame, this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame, this.hierarchy) { + var t2, e2 = this.finalTransform.mat, r2 = 0, i2 = this.hierarchy.length; + if (!this.finalTransform._matMdf) for (; r2 < i2; ) { + if (this.hierarchy[r2].finalTransform.mProp._mdf) { + this.finalTransform._matMdf = true; + break; + } + r2 += 1; + } + if (this.finalTransform._matMdf) for (t2 = this.finalTransform.mProp.v.props, e2.cloneFromProps(t2), r2 = 0; r2 < i2; r2 += 1) e2.multiply(this.hierarchy[r2].finalTransform.mProp.v); + } + this.finalTransform._matMdf && (this.finalTransform._localMatMdf = this.finalTransform._matMdf), this.finalTransform._opMdf && (this.finalTransform.localOpacity = this.finalTransform.mProp.o.v); + }, renderLocalTransform: function() { + if (this.localTransforms) { + var t2 = 0, e2 = this.localTransforms.length; + if (this.finalTransform._localMatMdf = this.finalTransform._matMdf, !this.finalTransform._localMatMdf || !this.finalTransform._opMdf) for (; t2 < e2; ) this.localTransforms[t2]._mdf && (this.finalTransform._localMatMdf = true), this.localTransforms[t2]._opMdf && !this.finalTransform._opMdf && (this.finalTransform.localOpacity = this.finalTransform.mProp.o.v, this.finalTransform._opMdf = true), t2 += 1; + if (this.finalTransform._localMatMdf) { + var r2 = this.finalTransform.localMat; + for (this.localTransforms[0].matrix.clone(r2), t2 = 1; t2 < e2; t2 += 1) { + var i2 = this.localTransforms[t2].matrix; + r2.multiply(i2); + } + r2.multiply(this.finalTransform.mat); + } + if (this.finalTransform._opMdf) { + var s2 = this.finalTransform.localOpacity; + for (t2 = 0; t2 < e2; t2 += 1) s2 *= 0.01 * this.localTransforms[t2].opacity; + this.finalTransform.localOpacity = s2; + } + } + }, searchEffectTransforms: function() { + if (this.renderableEffectsManager) { + var t2 = this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT); + if (t2.length) { + this.localTransforms = [], this.finalTransform.localMat = new Matrix(); + var e2 = 0, r2 = t2.length; + for (e2 = 0; e2 < r2; e2 += 1) this.localTransforms.push(t2[e2]); + } + } + }, globalToLocal: function(t2) { + var e2 = []; + e2.push(this.finalTransform); + for (var r2, i2 = true, s2 = this.comp; i2; ) s2.finalTransform ? (s2.data.hasMask && e2.splice(0, 0, s2.finalTransform), s2 = s2.comp) : i2 = false; + var a2, n2 = e2.length; + for (r2 = 0; r2 < n2; r2 += 1) a2 = e2[r2].mat.applyToPointArray(0, 0, 0), t2 = [t2[0] - a2[0], t2[1] - a2[1], 0]; + return t2; + }, mHelper: new Matrix() }, MaskElement.prototype.getMaskProperty = function(t2) { + return this.viewData[t2].prop; + }, MaskElement.prototype.renderFrame = function(t2) { + var e2, r2 = this.element.finalTransform.mat, i2 = this.masksProperties.length; + for (e2 = 0; e2 < i2; e2 += 1) if ((this.viewData[e2].prop._mdf || t2) && this.drawPath(this.masksProperties[e2], this.viewData[e2].prop.v, this.viewData[e2]), (this.viewData[e2].op._mdf || t2) && this.viewData[e2].elem.setAttribute("fill-opacity", this.viewData[e2].op.v), "n" !== this.masksProperties[e2].mode && (this.viewData[e2].invRect && (this.element.finalTransform.mProp._mdf || t2) && this.viewData[e2].invRect.setAttribute("transform", r2.getInverseMatrix().to2dCSS()), this.storedData[e2].x && (this.storedData[e2].x._mdf || t2))) { + var s2 = this.storedData[e2].expan; + this.storedData[e2].x.v < 0 ? ("erode" !== this.storedData[e2].lastOperator && (this.storedData[e2].lastOperator = "erode", this.storedData[e2].elem.setAttribute("filter", "url(" + getLocationHref() + "#" + this.storedData[e2].filterId + ")")), s2.setAttribute("radius", -this.storedData[e2].x.v)) : ("dilate" !== this.storedData[e2].lastOperator && (this.storedData[e2].lastOperator = "dilate", this.storedData[e2].elem.setAttribute("filter", null)), this.storedData[e2].elem.setAttribute("stroke-width", 2 * this.storedData[e2].x.v)); + } + }, MaskElement.prototype.getMaskelement = function() { + return this.maskElement; + }, MaskElement.prototype.createLayerSolidPath = function() { + var t2 = "M0,0 "; + return t2 += " h" + this.globalData.compSize.w, t2 += " v" + this.globalData.compSize.h, t2 += " h-" + this.globalData.compSize.w, t2 += " v-" + this.globalData.compSize.h + " "; + }, MaskElement.prototype.drawPath = function(t2, e2, r2) { + var i2, s2, a2 = " M" + e2.v[0][0] + "," + e2.v[0][1]; + for (s2 = e2._length, i2 = 1; i2 < s2; i2 += 1) a2 += " C" + e2.o[i2 - 1][0] + "," + e2.o[i2 - 1][1] + " " + e2.i[i2][0] + "," + e2.i[i2][1] + " " + e2.v[i2][0] + "," + e2.v[i2][1]; + if (e2.c && s2 > 1 && (a2 += " C" + e2.o[i2 - 1][0] + "," + e2.o[i2 - 1][1] + " " + e2.i[0][0] + "," + e2.i[0][1] + " " + e2.v[0][0] + "," + e2.v[0][1]), r2.lastPath !== a2) { + var n2 = ""; + r2.elem && (e2.c && (n2 = t2.inv ? this.solidPath + a2 : a2), r2.elem.setAttribute("d", n2)), r2.lastPath = a2; + } + }, MaskElement.prototype.destroy = function() { + this.element = null, this.globalData = null, this.maskElement = null, this.data = null, this.masksProperties = null; + }; + var filtersFactory = /* @__PURE__ */ function() { + var t2 = { createFilter: function(t3, e2) { + var r2 = createNS("filter"); + return r2.setAttribute("id", t3), true !== e2 && (r2.setAttribute("filterUnits", "objectBoundingBox"), r2.setAttribute("x", "0%"), r2.setAttribute("y", "0%"), r2.setAttribute("width", "100%"), r2.setAttribute("height", "100%")), r2; + }, createAlphaToLuminanceFilter: function() { + var t3 = createNS("feColorMatrix"); + return t3.setAttribute("type", "matrix"), t3.setAttribute("color-interpolation-filters", "sRGB"), t3.setAttribute("values", "0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"), t3; + } }; + return t2; + }(), featureSupport = function() { + var t2 = { maskType: true, svgLumaHidden: true, offscreenCanvas: "undefined" != typeof OffscreenCanvas }; + return (/MSIE 10/i.test(navigator.userAgent) || /MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent) || /Edge\/\d./i.test(navigator.userAgent)) && (t2.maskType = false), /firefox/i.test(navigator.userAgent) && (t2.svgLumaHidden = false), t2; + }(), registeredEffects$1 = {}, idPrefix = "filter_result_"; + function SVGEffects(t2) { + var e2, r2, i2 = "SourceGraphic", s2 = t2.data.ef ? t2.data.ef.length : 0, a2 = createElementID(), n2 = filtersFactory.createFilter(a2, true), o2 = 0; + for (this.filters = [], e2 = 0; e2 < s2; e2 += 1) { + r2 = null; + var h2 = t2.data.ef[e2].ty; + registeredEffects$1[h2] && (r2 = new (0, registeredEffects$1[h2].effect)(n2, t2.effectsManager.effectElements[e2], t2, idPrefix + o2, i2), i2 = idPrefix + o2, registeredEffects$1[h2].countsAsEffect && (o2 += 1)), r2 && this.filters.push(r2); + } + o2 && (t2.globalData.defs.appendChild(n2), t2.layerElement.setAttribute("filter", "url(" + getLocationHref() + "#" + a2 + ")")), this.filters.length && t2.addRenderableComponent(this); + } + function registerEffect$1(t2, e2, r2) { + registeredEffects$1[t2] = { effect: e2, countsAsEffect: r2 }; + } + function SVGBaseElement() { + } + function HierarchyElement() { + } + function RenderableDOMElement() { + } + function IImageElement(t2, e2, r2) { + this.assetData = e2.getAssetData(t2.refId), this.assetData && this.assetData.sid && (this.assetData = e2.slotManager.getProp(this.assetData)), this.initElement(t2, e2, r2), this.sourceRect = { top: 0, left: 0, width: this.assetData.w, height: this.assetData.h }; + } + function ProcessedElement(t2, e2) { + this.elem = t2, this.pos = e2; + } + function IShapeElement() { + } + SVGEffects.prototype.renderFrame = function(t2) { + var e2, r2 = this.filters.length; + for (e2 = 0; e2 < r2; e2 += 1) this.filters[e2].renderFrame(t2); + }, SVGEffects.prototype.getEffects = function(t2) { + var e2, r2 = this.filters.length, i2 = []; + for (e2 = 0; e2 < r2; e2 += 1) this.filters[e2].type === t2 && i2.push(this.filters[e2]); + return i2; + }, SVGBaseElement.prototype = { initRendererElement: function() { + this.layerElement = createNS("g"); + }, createContainerElements: function() { + this.matteElement = createNS("g"), this.transformedElement = this.layerElement, this.maskedElement = this.layerElement, this._sizeChanged = false; + var t2 = null; + if (this.data.td) { + this.matteMasks = {}; + var e2 = createNS("g"); + e2.setAttribute("id", this.layerId), e2.appendChild(this.layerElement), t2 = e2, this.globalData.defs.appendChild(e2); + } else this.data.tt ? (this.matteElement.appendChild(this.layerElement), t2 = this.matteElement, this.baseElement = this.matteElement) : this.baseElement = this.layerElement; + if (this.data.ln && this.layerElement.setAttribute("id", this.data.ln), this.data.cl && this.layerElement.setAttribute("class", this.data.cl), 0 === this.data.ty && !this.data.hd) { + var r2 = createNS("clipPath"), i2 = createNS("path"); + i2.setAttribute("d", "M0,0 L" + this.data.w + ",0 L" + this.data.w + "," + this.data.h + " L0," + this.data.h + "z"); + var s2 = createElementID(); + if (r2.setAttribute("id", s2), r2.appendChild(i2), this.globalData.defs.appendChild(r2), this.checkMasks()) { + var a2 = createNS("g"); + a2.setAttribute("clip-path", "url(" + getLocationHref() + "#" + s2 + ")"), a2.appendChild(this.layerElement), this.transformedElement = a2, t2 ? t2.appendChild(this.transformedElement) : this.baseElement = this.transformedElement; + } else this.layerElement.setAttribute("clip-path", "url(" + getLocationHref() + "#" + s2 + ")"); + } + 0 !== this.data.bm && this.setBlendMode(); + }, renderElement: function() { + this.finalTransform._localMatMdf && this.transformedElement.setAttribute("transform", this.finalTransform.localMat.to2dCSS()), this.finalTransform._opMdf && this.transformedElement.setAttribute("opacity", this.finalTransform.localOpacity); + }, destroyBaseElement: function() { + this.layerElement = null, this.matteElement = null, this.maskManager.destroy(); + }, getBaseElement: function() { + return this.data.hd ? null : this.baseElement; + }, createRenderableComponents: function() { + this.maskManager = new MaskElement(this.data, this, this.globalData), this.renderableEffectsManager = new SVGEffects(this), this.searchEffectTransforms(); + }, getMatte: function(t2) { + if (this.matteMasks || (this.matteMasks = {}), !this.matteMasks[t2]) { + var e2, r2, i2, s2, a2 = this.layerId + "_" + t2; + if (1 === t2 || 3 === t2) { + var n2 = createNS("mask"); + n2.setAttribute("id", a2), n2.setAttribute("mask-type", 3 === t2 ? "luminance" : "alpha"), (i2 = createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink", "href", "#" + this.layerId), n2.appendChild(i2), this.globalData.defs.appendChild(n2), featureSupport.maskType || 1 !== t2 || (n2.setAttribute("mask-type", "luminance"), e2 = createElementID(), r2 = filtersFactory.createFilter(e2), this.globalData.defs.appendChild(r2), r2.appendChild(filtersFactory.createAlphaToLuminanceFilter()), (s2 = createNS("g")).appendChild(i2), n2.appendChild(s2), s2.setAttribute("filter", "url(" + getLocationHref() + "#" + e2 + ")")); + } else if (2 === t2) { + var o2 = createNS("mask"); + o2.setAttribute("id", a2), o2.setAttribute("mask-type", "alpha"); + var h2 = createNS("g"); + o2.appendChild(h2), e2 = createElementID(), r2 = filtersFactory.createFilter(e2); + var l2 = createNS("feComponentTransfer"); + l2.setAttribute("in", "SourceGraphic"), r2.appendChild(l2); + var p2 = createNS("feFuncA"); + p2.setAttribute("type", "table"), p2.setAttribute("tableValues", "1.0 0.0"), l2.appendChild(p2), this.globalData.defs.appendChild(r2); + var c2 = createNS("rect"); + c2.setAttribute("width", this.comp.data.w), c2.setAttribute("height", this.comp.data.h), c2.setAttribute("x", "0"), c2.setAttribute("y", "0"), c2.setAttribute("fill", "#ffffff"), c2.setAttribute("opacity", "0"), h2.setAttribute("filter", "url(" + getLocationHref() + "#" + e2 + ")"), h2.appendChild(c2), (i2 = createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink", "href", "#" + this.layerId), h2.appendChild(i2), featureSupport.maskType || (o2.setAttribute("mask-type", "luminance"), r2.appendChild(filtersFactory.createAlphaToLuminanceFilter()), s2 = createNS("g"), h2.appendChild(c2), s2.appendChild(this.layerElement), h2.appendChild(s2)), this.globalData.defs.appendChild(o2); + } + this.matteMasks[t2] = a2; + } + return this.matteMasks[t2]; + }, setMatte: function(t2) { + this.matteElement && this.matteElement.setAttribute("mask", "url(" + getLocationHref() + "#" + t2 + ")"); + } }, HierarchyElement.prototype = { initHierarchy: function() { + this.hierarchy = [], this._isParent = false, this.checkParenting(); + }, setHierarchy: function(t2) { + this.hierarchy = t2; + }, setAsParent: function() { + this._isParent = true; + }, checkParenting: function() { + void 0 !== this.data.parent && this.comp.buildElementParenting(this, this.data.parent, []); + } }, extendPrototype([RenderableElement, createProxyFunction({ initElement: function(t2, e2, r2) { + this.initFrame(), this.initBaseData(t2, e2, r2), this.initTransform(t2, e2, r2), this.initHierarchy(), this.initRenderable(), this.initRendererElement(), this.createContainerElements(), this.createRenderableComponents(), this.createContent(), this.hide(); + }, hide: function() { + this.hidden || this.isInRange && !this.isTransparent || ((this.baseElement || this.layerElement).style.display = "none", this.hidden = true); + }, show: function() { + this.isInRange && !this.isTransparent && (this.data.hd || ((this.baseElement || this.layerElement).style.display = "block"), this.hidden = false, this._isFirstFrame = true); + }, renderFrame: function() { + this.data.hd || this.hidden || (this.renderTransform(), this.renderRenderable(), this.renderLocalTransform(), this.renderElement(), this.renderInnerContent(), this._isFirstFrame && (this._isFirstFrame = false)); + }, renderInnerContent: function() { + }, prepareFrame: function(t2) { + this._mdf = false, this.prepareRenderableFrame(t2), this.prepareProperties(t2, this.isInRange), this.checkTransparency(); + }, destroy: function() { + this.innerElem = null, this.destroyBaseElement(); + } })], RenderableDOMElement), extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement), IImageElement.prototype.createContent = function() { + var t2 = this.globalData.getAssetsPath(this.assetData); + this.innerElem = createNS("image"), this.innerElem.setAttribute("width", this.assetData.w + "px"), this.innerElem.setAttribute("height", this.assetData.h + "px"), this.innerElem.setAttribute("preserveAspectRatio", this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio), this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink", "href", t2), this.layerElement.appendChild(this.innerElem); + }, IImageElement.prototype.sourceRectAtTime = function() { + return this.sourceRect; + }, IShapeElement.prototype = { addShapeToModifiers: function(t2) { + var e2, r2 = this.shapeModifiers.length; + for (e2 = 0; e2 < r2; e2 += 1) this.shapeModifiers[e2].addShape(t2); + }, isShapeInAnimatedModifiers: function(t2) { + for (var e2 = this.shapeModifiers.length; 0 < e2; ) if (this.shapeModifiers[0].isAnimatedWithShape(t2)) return true; + return false; + }, renderModifiers: function() { + if (this.shapeModifiers.length) { + var t2, e2 = this.shapes.length; + for (t2 = 0; t2 < e2; t2 += 1) this.shapes[t2].sh.reset(); + for (t2 = (e2 = this.shapeModifiers.length) - 1; t2 >= 0 && !this.shapeModifiers[t2].processShapes(this._isFirstFrame); t2 -= 1) ; + } + }, searchProcessedElement: function(t2) { + for (var e2 = this.processedElements, r2 = 0, i2 = e2.length; r2 < i2; ) { + if (e2[r2].elem === t2) return e2[r2].pos; + r2 += 1; + } + return 0; + }, addProcessedElement: function(t2, e2) { + for (var r2 = this.processedElements, i2 = r2.length; i2; ) if (r2[i2 -= 1].elem === t2) return void (r2[i2].pos = e2); + r2.push(new ProcessedElement(t2, e2)); + }, prepareFrame: function(t2) { + this.prepareRenderableFrame(t2), this.prepareProperties(t2, this.isInRange); + } }; + var lineCapEnum = { 1: "butt", 2: "round", 3: "square" }, lineJoinEnum = { 1: "miter", 2: "round", 3: "bevel" }; + function SVGShapeData(t2, e2, r2) { + this.caches = [], this.styles = [], this.transformers = t2, this.lStr = "", this.sh = r2, this.lvl = e2, this._isAnimated = !!r2.k; + for (var i2 = 0, s2 = t2.length; i2 < s2; ) { + if (t2[i2].mProps.dynamicProperties.length) { + this._isAnimated = true; + break; + } + i2 += 1; + } + } + function SVGStyleData(t2, e2) { + this.data = t2, this.type = t2.ty, this.d = "", this.lvl = e2, this._mdf = false, this.closed = true === t2.hd, this.pElem = createNS("path"), this.msElem = null; + } + function DashProperty(t2, e2, r2, i2) { + var s2; + this.elem = t2, this.frameId = -1, this.dataProps = createSizedArray(e2.length), this.renderer = r2, this.k = false, this.dashStr = "", this.dashArray = createTypedArray("float32", e2.length ? e2.length - 1 : 0), this.dashoffset = createTypedArray("float32", 1), this.initDynamicPropertyContainer(i2); + var a2, n2 = e2.length || 0; + for (s2 = 0; s2 < n2; s2 += 1) a2 = PropertyFactory.getProp(t2, e2[s2].v, 0, 0, this), this.k = a2.k || this.k, this.dataProps[s2] = { n: e2[s2].n, p: a2 }; + this.k || this.getValue(true), this._isAnimated = this.k; + } + function SVGStrokeStyleData(t2, e2, r2) { + this.initDynamicPropertyContainer(t2), this.getValue = this.iterateDynamicProperties, this.o = PropertyFactory.getProp(t2, e2.o, 0, 0.01, this), this.w = PropertyFactory.getProp(t2, e2.w, 0, null, this), this.d = new DashProperty(t2, e2.d || {}, "svg", this), this.c = PropertyFactory.getProp(t2, e2.c, 1, 255, this), this.style = r2, this._isAnimated = !!this._isAnimated; + } + function SVGFillStyleData(t2, e2, r2) { + this.initDynamicPropertyContainer(t2), this.getValue = this.iterateDynamicProperties, this.o = PropertyFactory.getProp(t2, e2.o, 0, 0.01, this), this.c = PropertyFactory.getProp(t2, e2.c, 1, 255, this), this.style = r2; + } + function SVGNoStyleData(t2, e2, r2) { + this.initDynamicPropertyContainer(t2), this.getValue = this.iterateDynamicProperties, this.style = r2; + } + function GradientProperty(t2, e2, r2) { + this.data = e2, this.c = createTypedArray("uint8c", 4 * e2.p); + var i2 = e2.k.k[0].s ? e2.k.k[0].s.length - 4 * e2.p : e2.k.k.length - 4 * e2.p; + this.o = createTypedArray("float32", i2), this._cmdf = false, this._omdf = false, this._collapsable = this.checkCollapsable(), this._hasOpacity = i2, this.initDynamicPropertyContainer(r2), this.prop = PropertyFactory.getProp(t2, e2.k, 1, null, this), this.k = this.prop.k, this.getValue(true); + } + function SVGGradientFillStyleData(t2, e2, r2) { + this.initDynamicPropertyContainer(t2), this.getValue = this.iterateDynamicProperties, this.initGradientData(t2, e2, r2); + } + function SVGGradientStrokeStyleData(t2, e2, r2) { + this.initDynamicPropertyContainer(t2), this.getValue = this.iterateDynamicProperties, this.w = PropertyFactory.getProp(t2, e2.w, 0, null, this), this.d = new DashProperty(t2, e2.d || {}, "svg", this), this.initGradientData(t2, e2, r2), this._isAnimated = !!this._isAnimated; + } + function ShapeGroupData() { + this.it = [], this.prevViewData = [], this.gr = createNS("g"); + } + function SVGTransformData(t2, e2, r2) { + this.transform = { mProps: t2, op: e2, container: r2 }, this.elements = [], this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length; + } + SVGShapeData.prototype.setAsAnimated = function() { + this._isAnimated = true; + }, SVGStyleData.prototype.reset = function() { + this.d = "", this._mdf = false; + }, DashProperty.prototype.getValue = function(t2) { + if ((this.elem.globalData.frameId !== this.frameId || t2) && (this.frameId = this.elem.globalData.frameId, this.iterateDynamicProperties(), this._mdf = this._mdf || t2, this._mdf)) { + var e2 = 0, r2 = this.dataProps.length; + for ("svg" === this.renderer && (this.dashStr = ""), e2 = 0; e2 < r2; e2 += 1) "o" !== this.dataProps[e2].n ? "svg" === this.renderer ? this.dashStr += " " + this.dataProps[e2].p.v : this.dashArray[e2] = this.dataProps[e2].p.v : this.dashoffset[0] = this.dataProps[e2].p.v; + } + }, extendPrototype([DynamicPropertyContainer], DashProperty), extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData), extendPrototype([DynamicPropertyContainer], SVGFillStyleData), extendPrototype([DynamicPropertyContainer], SVGNoStyleData), GradientProperty.prototype.comparePoints = function(t2, e2) { + for (var r2 = 0, i2 = this.o.length / 2; r2 < i2; ) { + if (Math.abs(t2[4 * r2] - t2[4 * e2 + 2 * r2]) > 0.01) return false; + r2 += 1; + } + return true; + }, GradientProperty.prototype.checkCollapsable = function() { + if (this.o.length / 2 != this.c.length / 4) return false; + if (this.data.k.k[0].s) for (var t2 = 0, e2 = this.data.k.k.length; t2 < e2; ) { + if (!this.comparePoints(this.data.k.k[t2].s, this.data.p)) return false; + t2 += 1; + } + else if (!this.comparePoints(this.data.k.k, this.data.p)) return false; + return true; + }, GradientProperty.prototype.getValue = function(t2) { + if (this.prop.getValue(), this._mdf = false, this._cmdf = false, this._omdf = false, this.prop._mdf || t2) { + var e2, r2, i2, s2 = 4 * this.data.p; + for (e2 = 0; e2 < s2; e2 += 1) r2 = e2 % 4 == 0 ? 100 : 255, i2 = Math.round(this.prop.v[e2] * r2), this.c[e2] !== i2 && (this.c[e2] = i2, this._cmdf = !t2); + if (this.o.length) for (s2 = this.prop.v.length, e2 = 4 * this.data.p; e2 < s2; e2 += 1) r2 = e2 % 2 == 0 ? 100 : 1, i2 = e2 % 2 == 0 ? Math.round(100 * this.prop.v[e2]) : this.prop.v[e2], this.o[e2 - 4 * this.data.p] !== i2 && (this.o[e2 - 4 * this.data.p] = i2, this._omdf = !t2); + this._mdf = !t2; + } + }, extendPrototype([DynamicPropertyContainer], GradientProperty), SVGGradientFillStyleData.prototype.initGradientData = function(t2, e2, r2) { + this.o = PropertyFactory.getProp(t2, e2.o, 0, 0.01, this), this.s = PropertyFactory.getProp(t2, e2.s, 1, null, this), this.e = PropertyFactory.getProp(t2, e2.e, 1, null, this), this.h = PropertyFactory.getProp(t2, e2.h || { k: 0 }, 0, 0.01, this), this.a = PropertyFactory.getProp(t2, e2.a || { k: 0 }, 0, degToRads, this), this.g = new GradientProperty(t2, e2.g, this), this.style = r2, this.stops = [], this.setGradientData(r2.pElem, e2), this.setGradientOpacity(e2, r2), this._isAnimated = !!this._isAnimated; + }, SVGGradientFillStyleData.prototype.setGradientData = function(t2, e2) { + var r2 = createElementID(), i2 = createNS(1 === e2.t ? "linearGradient" : "radialGradient"); + i2.setAttribute("id", r2), i2.setAttribute("spreadMethod", "pad"), i2.setAttribute("gradientUnits", "userSpaceOnUse"); + var s2, a2, n2, o2 = []; + for (n2 = 4 * e2.g.p, a2 = 0; a2 < n2; a2 += 4) s2 = createNS("stop"), i2.appendChild(s2), o2.push(s2); + t2.setAttribute("gf" === e2.ty ? "fill" : "stroke", "url(" + getLocationHref() + "#" + r2 + ")"), this.gf = i2, this.cst = o2; + }, SVGGradientFillStyleData.prototype.setGradientOpacity = function(t2, e2) { + if (this.g._hasOpacity && !this.g._collapsable) { + var r2, i2, s2, a2 = createNS("mask"), n2 = createNS("path"); + a2.appendChild(n2); + var o2 = createElementID(), h2 = createElementID(); + a2.setAttribute("id", h2); + var l2 = createNS(1 === t2.t ? "linearGradient" : "radialGradient"); + l2.setAttribute("id", o2), l2.setAttribute("spreadMethod", "pad"), l2.setAttribute("gradientUnits", "userSpaceOnUse"), s2 = t2.g.k.k[0].s ? t2.g.k.k[0].s.length : t2.g.k.k.length; + var p2 = this.stops; + for (i2 = 4 * t2.g.p; i2 < s2; i2 += 2) (r2 = createNS("stop")).setAttribute("stop-color", "rgb(255,255,255)"), l2.appendChild(r2), p2.push(r2); + n2.setAttribute("gf" === t2.ty ? "fill" : "stroke", "url(" + getLocationHref() + "#" + o2 + ")"), "gs" === t2.ty && (n2.setAttribute("stroke-linecap", lineCapEnum[t2.lc || 2]), n2.setAttribute("stroke-linejoin", lineJoinEnum[t2.lj || 2]), 1 === t2.lj && n2.setAttribute("stroke-miterlimit", t2.ml)), this.of = l2, this.ms = a2, this.ost = p2, this.maskId = h2, e2.msElem = n2; + } + }, extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData), extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData); + var buildShapeString = function(t2, e2, r2, i2) { + if (0 === e2) return ""; + var s2, a2 = t2.o, n2 = t2.i, o2 = t2.v, h2 = " M" + i2.applyToPointStringified(o2[0][0], o2[0][1]); + for (s2 = 1; s2 < e2; s2 += 1) h2 += " C" + i2.applyToPointStringified(a2[s2 - 1][0], a2[s2 - 1][1]) + " " + i2.applyToPointStringified(n2[s2][0], n2[s2][1]) + " " + i2.applyToPointStringified(o2[s2][0], o2[s2][1]); + return r2 && e2 && (h2 += " C" + i2.applyToPointStringified(a2[s2 - 1][0], a2[s2 - 1][1]) + " " + i2.applyToPointStringified(n2[0][0], n2[0][1]) + " " + i2.applyToPointStringified(o2[0][0], o2[0][1]), h2 += "z"), h2; + }, SVGElementsRenderer = function() { + var t2 = new Matrix(), e2 = new Matrix(); + function r2(t3, e3, r3) { + (r3 || e3.transform.op._mdf) && e3.transform.container.setAttribute("opacity", e3.transform.op.v), (r3 || e3.transform.mProps._mdf) && e3.transform.container.setAttribute("transform", e3.transform.mProps.v.to2dCSS()); + } + function i2() { + } + function s2(r3, i3, s3) { + var a3, n3, o3, h3, l2, p2, c2, f2, u2, d2, m2 = i3.styles.length, y2 = i3.lvl; + for (p2 = 0; p2 < m2; p2 += 1) { + if (h3 = i3.sh._mdf || s3, i3.styles[p2].lvl < y2) { + for (f2 = e2.reset(), u2 = y2 - i3.styles[p2].lvl, d2 = i3.transformers.length - 1; !h3 && u2 > 0; ) h3 = i3.transformers[d2].mProps._mdf || h3, u2 -= 1, d2 -= 1; + if (h3) for (u2 = y2 - i3.styles[p2].lvl, d2 = i3.transformers.length - 1; u2 > 0; ) f2.multiply(i3.transformers[d2].mProps.v), u2 -= 1, d2 -= 1; + } else f2 = t2; + if (n3 = (c2 = i3.sh.paths)._length, h3) { + for (o3 = "", a3 = 0; a3 < n3; a3 += 1) (l2 = c2.shapes[a3]) && l2._length && (o3 += buildShapeString(l2, l2._length, l2.c, f2)); + i3.caches[p2] = o3; + } else o3 = i3.caches[p2]; + i3.styles[p2].d += true === r3.hd ? "" : o3, i3.styles[p2]._mdf = h3 || i3.styles[p2]._mdf; + } + } + function a2(t3, e3, r3) { + var i3 = e3.style; + (e3.c._mdf || r3) && i3.pElem.setAttribute("fill", "rgb(" + bmFloor(e3.c.v[0]) + "," + bmFloor(e3.c.v[1]) + "," + bmFloor(e3.c.v[2]) + ")"), (e3.o._mdf || r3) && i3.pElem.setAttribute("fill-opacity", e3.o.v); + } + function n2(t3, e3, r3) { + o2(t3, e3, r3), h2(0, e3, r3); + } + function o2(t3, e3, r3) { + var i3, s3, a3, n3, o3, h3 = e3.gf, l2 = e3.g._hasOpacity, p2 = e3.s.v, c2 = e3.e.v; + if (e3.o._mdf || r3) { + var f2 = "gf" === t3.ty ? "fill-opacity" : "stroke-opacity"; + e3.style.pElem.setAttribute(f2, e3.o.v); + } + if (e3.s._mdf || r3) { + var u2 = 1 === t3.t ? "x1" : "cx", d2 = "x1" === u2 ? "y1" : "cy"; + h3.setAttribute(u2, p2[0]), h3.setAttribute(d2, p2[1]), l2 && !e3.g._collapsable && (e3.of.setAttribute(u2, p2[0]), e3.of.setAttribute(d2, p2[1])); + } + if (e3.g._cmdf || r3) { + i3 = e3.cst; + var m2 = e3.g.c; + for (a3 = i3.length, s3 = 0; s3 < a3; s3 += 1) (n3 = i3[s3]).setAttribute("offset", m2[4 * s3] + "%"), n3.setAttribute("stop-color", "rgb(" + m2[4 * s3 + 1] + "," + m2[4 * s3 + 2] + "," + m2[4 * s3 + 3] + ")"); + } + if (l2 && (e3.g._omdf || r3)) { + var y2 = e3.g.o; + for (a3 = (i3 = e3.g._collapsable ? e3.cst : e3.ost).length, s3 = 0; s3 < a3; s3 += 1) n3 = i3[s3], e3.g._collapsable || n3.setAttribute("offset", y2[2 * s3] + "%"), n3.setAttribute("stop-opacity", y2[2 * s3 + 1]); + } + if (1 === t3.t) (e3.e._mdf || r3) && (h3.setAttribute("x2", c2[0]), h3.setAttribute("y2", c2[1]), l2 && !e3.g._collapsable && (e3.of.setAttribute("x2", c2[0]), e3.of.setAttribute("y2", c2[1]))); + else if ((e3.s._mdf || e3.e._mdf || r3) && (o3 = Math.sqrt(Math.pow(p2[0] - c2[0], 2) + Math.pow(p2[1] - c2[1], 2)), h3.setAttribute("r", o3), l2 && !e3.g._collapsable && e3.of.setAttribute("r", o3)), e3.e._mdf || e3.h._mdf || e3.a._mdf || r3) { + o3 || (o3 = Math.sqrt(Math.pow(p2[0] - c2[0], 2) + Math.pow(p2[1] - c2[1], 2))); + var g2 = Math.atan2(c2[1] - p2[1], c2[0] - p2[0]), v2 = e3.h.v; + v2 >= 1 ? v2 = 0.99 : v2 <= -1 && (v2 = -0.99); + var b2 = o3 * v2, _2 = Math.cos(g2 + e3.a.v) * b2 + p2[0], P2 = Math.sin(g2 + e3.a.v) * b2 + p2[1]; + h3.setAttribute("fx", _2), h3.setAttribute("fy", P2), l2 && !e3.g._collapsable && (e3.of.setAttribute("fx", _2), e3.of.setAttribute("fy", P2)); + } + } + function h2(t3, e3, r3) { + var i3 = e3.style, s3 = e3.d; + s3 && (s3._mdf || r3) && s3.dashStr && (i3.pElem.setAttribute("stroke-dasharray", s3.dashStr), i3.pElem.setAttribute("stroke-dashoffset", s3.dashoffset[0])), e3.c && (e3.c._mdf || r3) && i3.pElem.setAttribute("stroke", "rgb(" + bmFloor(e3.c.v[0]) + "," + bmFloor(e3.c.v[1]) + "," + bmFloor(e3.c.v[2]) + ")"), (e3.o._mdf || r3) && i3.pElem.setAttribute("stroke-opacity", e3.o.v), (e3.w._mdf || r3) && (i3.pElem.setAttribute("stroke-width", e3.w.v), i3.msElem && i3.msElem.setAttribute("stroke-width", e3.w.v)); + } + return { createRenderFunction: function(t3) { + switch (t3.ty) { + case "fl": + return a2; + case "gf": + return o2; + case "gs": + return n2; + case "st": + return h2; + case "sh": + case "el": + case "rc": + case "sr": + return s2; + case "tr": + return r2; + case "no": + return i2; + default: + return null; + } + } }; + }(); + function SVGShapeElement(t2, e2, r2) { + this.shapes = [], this.shapesData = t2.shapes, this.stylesList = [], this.shapeModifiers = [], this.itemsData = [], this.processedElements = [], this.animatedContents = [], this.initElement(t2, e2, r2), this.prevViewData = []; + } + function LetterProps(t2, e2, r2, i2, s2, a2) { + this.o = t2, this.sw = e2, this.sc = r2, this.fc = i2, this.m = s2, this.p = a2, this._mdf = { o: true, sw: !!e2, sc: !!r2, fc: !!i2, m: true, p: true }; + } + function TextProperty(t2, e2) { + this._frameId = initialDefaultFrame, this.pv = "", this.v = "", this.kf = false, this._isFirstFrame = true, this._mdf = false, e2.d && e2.d.sid && (e2.d = t2.globalData.slotManager.getProp(e2.d)), this.data = e2, this.elem = t2, this.comp = this.elem.comp, this.keysIndex = 0, this.canResize = false, this.minimumFontSize = 1, this.effectsSequence = [], this.currentData = { ascent: 0, boxWidth: this.defaultBoxWidth, f: "", fStyle: "", fWeight: "", fc: "", j: "", justifyOffset: "", l: [], lh: 0, lineWidths: [], ls: "", of: "", s: "", sc: "", sw: 0, t: 0, tr: 0, sz: 0, ps: null, fillColorAnim: false, strokeColorAnim: false, strokeWidthAnim: false, yOffset: 0, finalSize: 0, finalText: [], finalLineHeight: 0, __complete: false }, this.copyData(this.currentData, this.data.d.k[0].s), this.searchProperty() || this.completeTextData(this.currentData); + } + extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement), SVGShapeElement.prototype.initSecondaryElement = function() { + }, SVGShapeElement.prototype.identityMatrix = new Matrix(), SVGShapeElement.prototype.buildExpressionInterface = function() { + }, SVGShapeElement.prototype.createContent = function() { + this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true), this.filterUniqueShapes(); + }, SVGShapeElement.prototype.filterUniqueShapes = function() { + var t2, e2, r2, i2, s2 = this.shapes.length, a2 = this.stylesList.length, n2 = [], o2 = false; + for (r2 = 0; r2 < a2; r2 += 1) { + for (i2 = this.stylesList[r2], o2 = false, n2.length = 0, t2 = 0; t2 < s2; t2 += 1) -1 !== (e2 = this.shapes[t2]).styles.indexOf(i2) && (n2.push(e2), o2 = e2._isAnimated || o2); + n2.length > 1 && o2 && this.setShapesAsAnimated(n2); + } + }, SVGShapeElement.prototype.setShapesAsAnimated = function(t2) { + var e2, r2 = t2.length; + for (e2 = 0; e2 < r2; e2 += 1) t2[e2].setAsAnimated(); + }, SVGShapeElement.prototype.createStyleElement = function(t2, e2) { + var r2, i2 = new SVGStyleData(t2, e2), s2 = i2.pElem; + return "st" === t2.ty ? r2 = new SVGStrokeStyleData(this, t2, i2) : "fl" === t2.ty ? r2 = new SVGFillStyleData(this, t2, i2) : "gf" === t2.ty || "gs" === t2.ty ? (r2 = new ("gf" === t2.ty ? SVGGradientFillStyleData : SVGGradientStrokeStyleData)(this, t2, i2), this.globalData.defs.appendChild(r2.gf), r2.maskId && (this.globalData.defs.appendChild(r2.ms), this.globalData.defs.appendChild(r2.of), s2.setAttribute("mask", "url(" + getLocationHref() + "#" + r2.maskId + ")"))) : "no" === t2.ty && (r2 = new SVGNoStyleData(this, t2, i2)), "st" !== t2.ty && "gs" !== t2.ty || (s2.setAttribute("stroke-linecap", lineCapEnum[t2.lc || 2]), s2.setAttribute("stroke-linejoin", lineJoinEnum[t2.lj || 2]), s2.setAttribute("fill-opacity", "0"), 1 === t2.lj && s2.setAttribute("stroke-miterlimit", t2.ml)), 2 === t2.r && s2.setAttribute("fill-rule", "evenodd"), t2.ln && s2.setAttribute("id", t2.ln), t2.cl && s2.setAttribute("class", t2.cl), t2.bm && (s2.style["mix-blend-mode"] = getBlendMode(t2.bm)), this.stylesList.push(i2), this.addToAnimatedContents(t2, r2), r2; + }, SVGShapeElement.prototype.createGroupElement = function(t2) { + var e2 = new ShapeGroupData(); + return t2.ln && e2.gr.setAttribute("id", t2.ln), t2.cl && e2.gr.setAttribute("class", t2.cl), t2.bm && (e2.gr.style["mix-blend-mode"] = getBlendMode(t2.bm)), e2; + }, SVGShapeElement.prototype.createTransformElement = function(t2, e2) { + var r2 = TransformPropertyFactory.getTransformProperty(this, t2, this), i2 = new SVGTransformData(r2, r2.o, e2); + return this.addToAnimatedContents(t2, i2), i2; + }, SVGShapeElement.prototype.createShapeElement = function(t2, e2, r2) { + var i2 = 4; + "rc" === t2.ty ? i2 = 5 : "el" === t2.ty ? i2 = 6 : "sr" === t2.ty && (i2 = 7); + var s2 = new SVGShapeData(e2, r2, ShapePropertyFactory.getShapeProp(this, t2, i2, this)); + return this.shapes.push(s2), this.addShapeToModifiers(s2), this.addToAnimatedContents(t2, s2), s2; + }, SVGShapeElement.prototype.addToAnimatedContents = function(t2, e2) { + for (var r2 = 0, i2 = this.animatedContents.length; r2 < i2; ) { + if (this.animatedContents[r2].element === e2) return; + r2 += 1; + } + this.animatedContents.push({ fn: SVGElementsRenderer.createRenderFunction(t2), element: e2, data: t2 }); + }, SVGShapeElement.prototype.setElementStyles = function(t2) { + var e2, r2 = t2.styles, i2 = this.stylesList.length; + for (e2 = 0; e2 < i2; e2 += 1) this.stylesList[e2].closed || r2.push(this.stylesList[e2]); + }, SVGShapeElement.prototype.reloadShapes = function() { + var t2; + this._isFirstFrame = true; + var e2 = this.itemsData.length; + for (t2 = 0; t2 < e2; t2 += 1) this.prevViewData[t2] = this.itemsData[t2]; + for (this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true), this.filterUniqueShapes(), e2 = this.dynamicProperties.length, t2 = 0; t2 < e2; t2 += 1) this.dynamicProperties[t2].getValue(); + this.renderModifiers(); + }, SVGShapeElement.prototype.searchShapes = function(t2, e2, r2, i2, s2, a2, n2) { + var o2, h2, l2, p2, c2, f2, u2 = [].concat(a2), d2 = t2.length - 1, m2 = [], y2 = []; + for (o2 = d2; o2 >= 0; o2 -= 1) { + if ((f2 = this.searchProcessedElement(t2[o2])) ? e2[o2] = r2[f2 - 1] : t2[o2]._render = n2, "fl" === t2[o2].ty || "st" === t2[o2].ty || "gf" === t2[o2].ty || "gs" === t2[o2].ty || "no" === t2[o2].ty) f2 ? e2[o2].style.closed = false : e2[o2] = this.createStyleElement(t2[o2], s2), t2[o2]._render && e2[o2].style.pElem.parentNode !== i2 && i2.appendChild(e2[o2].style.pElem), m2.push(e2[o2].style); + else if ("gr" === t2[o2].ty) { + if (f2) for (l2 = e2[o2].it.length, h2 = 0; h2 < l2; h2 += 1) e2[o2].prevViewData[h2] = e2[o2].it[h2]; + else e2[o2] = this.createGroupElement(t2[o2]); + this.searchShapes(t2[o2].it, e2[o2].it, e2[o2].prevViewData, e2[o2].gr, s2 + 1, u2, n2), t2[o2]._render && e2[o2].gr.parentNode !== i2 && i2.appendChild(e2[o2].gr); + } else "tr" === t2[o2].ty ? (f2 || (e2[o2] = this.createTransformElement(t2[o2], i2)), p2 = e2[o2].transform, u2.push(p2)) : "sh" === t2[o2].ty || "rc" === t2[o2].ty || "el" === t2[o2].ty || "sr" === t2[o2].ty ? (f2 || (e2[o2] = this.createShapeElement(t2[o2], u2, s2)), this.setElementStyles(e2[o2])) : "tm" === t2[o2].ty || "rd" === t2[o2].ty || "ms" === t2[o2].ty || "pb" === t2[o2].ty || "zz" === t2[o2].ty || "op" === t2[o2].ty ? (f2 ? (c2 = e2[o2]).closed = false : ((c2 = ShapeModifiers.getModifier(t2[o2].ty)).init(this, t2[o2]), e2[o2] = c2, this.shapeModifiers.push(c2)), y2.push(c2)) : "rp" === t2[o2].ty && (f2 ? (c2 = e2[o2]).closed = true : (c2 = ShapeModifiers.getModifier(t2[o2].ty), e2[o2] = c2, c2.init(this, t2, o2, e2), this.shapeModifiers.push(c2), n2 = false), y2.push(c2)); + this.addProcessedElement(t2[o2], o2 + 1); + } + for (d2 = m2.length, o2 = 0; o2 < d2; o2 += 1) m2[o2].closed = true; + for (d2 = y2.length, o2 = 0; o2 < d2; o2 += 1) y2[o2].closed = true; + }, SVGShapeElement.prototype.renderInnerContent = function() { + var t2; + this.renderModifiers(); + var e2 = this.stylesList.length; + for (t2 = 0; t2 < e2; t2 += 1) this.stylesList[t2].reset(); + for (this.renderShape(), t2 = 0; t2 < e2; t2 += 1) (this.stylesList[t2]._mdf || this._isFirstFrame) && (this.stylesList[t2].msElem && (this.stylesList[t2].msElem.setAttribute("d", this.stylesList[t2].d), this.stylesList[t2].d = "M0 0" + this.stylesList[t2].d), this.stylesList[t2].pElem.setAttribute("d", this.stylesList[t2].d || "M0 0")); + }, SVGShapeElement.prototype.renderShape = function() { + var t2, e2, r2 = this.animatedContents.length; + for (t2 = 0; t2 < r2; t2 += 1) e2 = this.animatedContents[t2], (this._isFirstFrame || e2.element._isAnimated) && true !== e2.data && e2.fn(e2.data, e2.element, this._isFirstFrame); + }, SVGShapeElement.prototype.destroy = function() { + this.destroyBaseElement(), this.shapesData = null, this.itemsData = null; + }, LetterProps.prototype.update = function(t2, e2, r2, i2, s2, a2) { + this._mdf.o = false, this._mdf.sw = false, this._mdf.sc = false, this._mdf.fc = false, this._mdf.m = false, this._mdf.p = false; + var n2 = false; + return this.o !== t2 && (this.o = t2, this._mdf.o = true, n2 = true), this.sw !== e2 && (this.sw = e2, this._mdf.sw = true, n2 = true), this.sc !== r2 && (this.sc = r2, this._mdf.sc = true, n2 = true), this.fc !== i2 && (this.fc = i2, this._mdf.fc = true, n2 = true), this.m !== s2 && (this.m = s2, this._mdf.m = true, n2 = true), !a2.length || this.p[0] === a2[0] && this.p[1] === a2[1] && this.p[4] === a2[4] && this.p[5] === a2[5] && this.p[12] === a2[12] && this.p[13] === a2[13] || (this.p = a2, this._mdf.p = true, n2 = true), n2; + }, TextProperty.prototype.defaultBoxWidth = [0, 0], TextProperty.prototype.copyData = function(t2, e2) { + for (var r2 in e2) Object.prototype.hasOwnProperty.call(e2, r2) && (t2[r2] = e2[r2]); + return t2; + }, TextProperty.prototype.setCurrentData = function(t2) { + t2.__complete || this.completeTextData(t2), this.currentData = t2, this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth, this._mdf = true; + }, TextProperty.prototype.searchProperty = function() { + return this.searchKeyframes(); + }, TextProperty.prototype.searchKeyframes = function() { + return this.kf = this.data.d.k.length > 1, this.kf && this.addEffect(this.getKeyframeValue.bind(this)), this.kf; + }, TextProperty.prototype.addEffect = function(t2) { + this.effectsSequence.push(t2), this.elem.addDynamicProperty(this); + }, TextProperty.prototype.getValue = function(t2) { + if (this.elem.globalData.frameId !== this.frameId && this.effectsSequence.length || t2) { + this.currentData.t = this.data.d.k[this.keysIndex].s.t; + var e2 = this.currentData, r2 = this.keysIndex; + if (this.lock) this.setCurrentData(this.currentData); + else { + var i2; + this.lock = true, this._mdf = false; + var s2 = this.effectsSequence.length, a2 = t2 || this.data.d.k[this.keysIndex].s; + for (i2 = 0; i2 < s2; i2 += 1) a2 = r2 !== this.keysIndex ? this.effectsSequence[i2](a2, a2.t) : this.effectsSequence[i2](this.currentData, a2.t); + e2 !== a2 && this.setCurrentData(a2), this.v = this.currentData, this.pv = this.v, this.lock = false, this.frameId = this.elem.globalData.frameId; + } + } + }, TextProperty.prototype.getKeyframeValue = function() { + for (var t2 = this.data.d.k, e2 = this.elem.comp.renderedFrame, r2 = 0, i2 = t2.length; r2 <= i2 - 1 && !(r2 === i2 - 1 || t2[r2 + 1].t > e2); ) r2 += 1; + return this.keysIndex !== r2 && (this.keysIndex = r2), this.data.d.k[this.keysIndex].s; + }, TextProperty.prototype.buildFinalText = function(t2) { + for (var e2, r2, i2 = [], s2 = 0, a2 = t2.length, n2 = false, o2 = false, h2 = ""; s2 < a2; ) n2 = o2, o2 = false, e2 = t2.charCodeAt(s2), h2 = t2.charAt(s2), FontManager.isCombinedCharacter(e2) ? n2 = true : e2 >= 55296 && e2 <= 56319 ? FontManager.isRegionalFlag(t2, s2) ? h2 = t2.substr(s2, 14) : (r2 = t2.charCodeAt(s2 + 1)) >= 56320 && r2 <= 57343 && (FontManager.isModifier(e2, r2) ? (h2 = t2.substr(s2, 2), n2 = true) : h2 = FontManager.isFlagEmoji(t2.substr(s2, 4)) ? t2.substr(s2, 4) : t2.substr(s2, 2)) : e2 > 56319 ? (r2 = t2.charCodeAt(s2 + 1), FontManager.isVariationSelector(e2) && (n2 = true)) : FontManager.isZeroWidthJoiner(e2) && (n2 = true, o2 = true), n2 ? (i2[i2.length - 1] += h2, n2 = false) : i2.push(h2), s2 += h2.length; + return i2; + }, TextProperty.prototype.completeTextData = function(t2) { + t2.__complete = true; + var e2, r2, i2, s2, a2, n2, o2, h2 = this.elem.globalData.fontManager, l2 = this.data, p2 = [], c2 = 0, f2 = l2.m.g, u2 = 0, d2 = 0, m2 = 0, y2 = [], g2 = 0, v2 = 0, b2 = h2.getFontByName(t2.f), _2 = 0, P2 = getFontProperties(b2); + t2.fWeight = P2.weight, t2.fStyle = P2.style, t2.finalSize = t2.s, t2.finalText = this.buildFinalText(t2.t), r2 = t2.finalText.length, t2.finalLineHeight = t2.lh; + var S2, E2 = t2.tr / 1e3 * t2.finalSize; + if (t2.sz) for (var x2, C2, A2 = true, w2 = t2.sz[0], k2 = t2.sz[1]; A2; ) { + x2 = 0, g2 = 0, r2 = (C2 = this.buildFinalText(t2.t)).length, E2 = t2.tr / 1e3 * t2.finalSize; + var T2 = -1; + for (e2 = 0; e2 < r2; e2 += 1) S2 = C2[e2].charCodeAt(0), i2 = false, " " === C2[e2] ? T2 = e2 : 13 !== S2 && 3 !== S2 || (g2 = 0, i2 = true, x2 += t2.finalLineHeight || 1.2 * t2.finalSize), h2.chars ? (o2 = h2.getCharData(C2[e2], b2.fStyle, b2.fFamily), _2 = i2 ? 0 : o2.w * t2.finalSize / 100) : _2 = h2.measureText(C2[e2], t2.f, t2.finalSize), g2 + _2 > w2 && " " !== C2[e2] ? (-1 === T2 ? r2 += 1 : e2 = T2, x2 += t2.finalLineHeight || 1.2 * t2.finalSize, C2.splice(e2, T2 === e2 ? 1 : 0, "\r"), T2 = -1, g2 = 0) : (g2 += _2, g2 += E2); + x2 += b2.ascent * t2.finalSize / 100, this.canResize && t2.finalSize > this.minimumFontSize && k2 < x2 ? (t2.finalSize -= 1, t2.finalLineHeight = t2.finalSize * t2.lh / t2.s) : (t2.finalText = C2, r2 = t2.finalText.length, A2 = false); + } + g2 = -E2, _2 = 0; + var M2, D = 0; + for (e2 = 0; e2 < r2; e2 += 1) if (i2 = false, 13 === (S2 = (M2 = t2.finalText[e2]).charCodeAt(0)) || 3 === S2 ? (D = 0, y2.push(g2), v2 = g2 > v2 ? g2 : v2, g2 = -2 * E2, s2 = "", i2 = true, m2 += 1) : s2 = M2, h2.chars ? (o2 = h2.getCharData(M2, b2.fStyle, h2.getFontByName(t2.f).fFamily), _2 = i2 ? 0 : o2.w * t2.finalSize / 100) : _2 = h2.measureText(s2, t2.f, t2.finalSize), " " === M2 ? D += _2 + E2 : (g2 += _2 + E2 + D, D = 0), p2.push({ l: _2, an: _2, add: u2, n: i2, anIndexes: [], val: s2, line: m2, animatorJustifyOffset: 0 }), 2 == f2) { + if (u2 += _2, "" === s2 || " " === s2 || e2 === r2 - 1) { + for ("" !== s2 && " " !== s2 || (u2 -= _2); d2 <= e2; ) p2[d2].an = u2, p2[d2].ind = c2, p2[d2].extra = _2, d2 += 1; + c2 += 1, u2 = 0; + } + } else if (3 == f2) { + if (u2 += _2, "" === s2 || e2 === r2 - 1) { + for ("" === s2 && (u2 -= _2); d2 <= e2; ) p2[d2].an = u2, p2[d2].ind = c2, p2[d2].extra = _2, d2 += 1; + u2 = 0, c2 += 1; + } + } else p2[c2].ind = c2, p2[c2].extra = 0, c2 += 1; + if (t2.l = p2, v2 = g2 > v2 ? g2 : v2, y2.push(g2), t2.sz) t2.boxWidth = t2.sz[0], t2.justifyOffset = 0; + else switch (t2.boxWidth = v2, t2.j) { + case 1: + t2.justifyOffset = -t2.boxWidth; + break; + case 2: + t2.justifyOffset = -t2.boxWidth / 2; + break; + default: + t2.justifyOffset = 0; + } + t2.lineWidths = y2; + var F, I2, R2, L2, V2 = l2.a; + n2 = V2.length; + var B = []; + for (a2 = 0; a2 < n2; a2 += 1) { + for ((F = V2[a2]).a.sc && (t2.strokeColorAnim = true), F.a.sw && (t2.strokeWidthAnim = true), (F.a.fc || F.a.fh || F.a.fs || F.a.fb) && (t2.fillColorAnim = true), L2 = 0, R2 = F.s.b, e2 = 0; e2 < r2; e2 += 1) (I2 = p2[e2]).anIndexes[a2] = L2, (1 == R2 && "" !== I2.val || 2 == R2 && "" !== I2.val && " " !== I2.val || 3 == R2 && (I2.n || " " == I2.val || e2 == r2 - 1) || 4 == R2 && (I2.n || e2 == r2 - 1)) && (1 === F.s.rn && B.push(L2), L2 += 1); + l2.a[a2].s.totalChars = L2; + var O, $2 = -1; + if (1 === F.s.rn) for (e2 = 0; e2 < r2; e2 += 1) $2 != (I2 = p2[e2]).anIndexes[a2] && ($2 = I2.anIndexes[a2], O = B.splice(Math.floor(Math.random() * B.length), 1)[0]), I2.anIndexes[a2] = O; + } + t2.yOffset = t2.finalLineHeight || 1.2 * t2.finalSize, t2.ls = t2.ls || 0, t2.ascent = b2.ascent * t2.finalSize / 100; + }, TextProperty.prototype.updateDocumentData = function(t2, e2) { + e2 = void 0 === e2 ? this.keysIndex : e2; + var r2 = this.copyData({}, this.data.d.k[e2].s); + r2 = this.copyData(r2, t2), this.data.d.k[e2].s = r2, this.recalculate(e2), this.setCurrentData(r2), this.elem.addDynamicProperty(this); + }, TextProperty.prototype.recalculate = function(t2) { + var e2 = this.data.d.k[t2].s; + e2.__complete = false, this.keysIndex = 0, this._isFirstFrame = true, this.getValue(e2); + }, TextProperty.prototype.canResizeFont = function(t2) { + this.canResize = t2, this.recalculate(this.keysIndex), this.elem.addDynamicProperty(this); + }, TextProperty.prototype.setMinimumFontSize = function(t2) { + this.minimumFontSize = Math.floor(t2) || 1, this.recalculate(this.keysIndex), this.elem.addDynamicProperty(this); + }; + var TextSelectorProp = function() { + var t2 = Math.max, e2 = Math.min, r2 = Math.floor; + function i2(t3, e3) { + this._currentTextLength = -1, this.k = false, this.data = e3, this.elem = t3, this.comp = t3.comp, this.finalS = 0, this.finalE = 0, this.initDynamicPropertyContainer(t3), this.s = PropertyFactory.getProp(t3, e3.s || { k: 0 }, 0, 0, this), this.e = "e" in e3 ? PropertyFactory.getProp(t3, e3.e, 0, 0, this) : { v: 100 }, this.o = PropertyFactory.getProp(t3, e3.o || { k: 0 }, 0, 0, this), this.xe = PropertyFactory.getProp(t3, e3.xe || { k: 0 }, 0, 0, this), this.ne = PropertyFactory.getProp(t3, e3.ne || { k: 0 }, 0, 0, this), this.sm = PropertyFactory.getProp(t3, e3.sm || { k: 100 }, 0, 0, this), this.a = PropertyFactory.getProp(t3, e3.a, 0, 0.01, this), this.dynamicProperties.length || this.getValue(); + } + return i2.prototype = { getMult: function(i3) { + this._currentTextLength !== this.elem.textProperty.currentData.l.length && this.getValue(); + var s2 = 0, a2 = 0, n2 = 1, o2 = 1; + this.ne.v > 0 ? s2 = this.ne.v / 100 : a2 = -this.ne.v / 100, this.xe.v > 0 ? n2 = 1 - this.xe.v / 100 : o2 = 1 + this.xe.v / 100; + var h2 = BezierFactory.getBezierEasing(s2, a2, n2, o2).get, l2 = 0, p2 = this.finalS, c2 = this.finalE, f2 = this.data.sh; + if (2 === f2) l2 = h2(l2 = c2 === p2 ? i3 >= c2 ? 1 : 0 : t2(0, e2(0.5 / (c2 - p2) + (i3 - p2) / (c2 - p2), 1))); + else if (3 === f2) l2 = h2(l2 = c2 === p2 ? i3 >= c2 ? 0 : 1 : 1 - t2(0, e2(0.5 / (c2 - p2) + (i3 - p2) / (c2 - p2), 1))); + else if (4 === f2) c2 === p2 ? l2 = 0 : (l2 = t2(0, e2(0.5 / (c2 - p2) + (i3 - p2) / (c2 - p2), 1))) < 0.5 ? l2 *= 2 : l2 = 1 - 2 * (l2 - 0.5), l2 = h2(l2); + else if (5 === f2) { + if (c2 === p2) l2 = 0; + else { + var u2 = c2 - p2, d2 = -u2 / 2 + (i3 = e2(t2(0, i3 + 0.5 - p2), c2 - p2)), m2 = u2 / 2; + l2 = Math.sqrt(1 - d2 * d2 / (m2 * m2)); + } + l2 = h2(l2); + } else 6 === f2 ? (c2 === p2 ? l2 = 0 : (i3 = e2(t2(0, i3 + 0.5 - p2), c2 - p2), l2 = (1 + Math.cos(Math.PI + 2 * Math.PI * i3 / (c2 - p2))) / 2), l2 = h2(l2)) : (i3 >= r2(p2) && (l2 = t2(0, e2(i3 - p2 < 0 ? e2(c2, 1) - (p2 - i3) : c2 - i3, 1))), l2 = h2(l2)); + if (100 !== this.sm.v) { + var y2 = 0.01 * this.sm.v; + 0 === y2 && (y2 = 1e-8); + var g2 = 0.5 - 0.5 * y2; + l2 < g2 ? l2 = 0 : (l2 = (l2 - g2) / y2) > 1 && (l2 = 1); + } + return l2 * this.a.v; + }, getValue: function(t3) { + this.iterateDynamicProperties(), this._mdf = t3 || this._mdf, this._currentTextLength = this.elem.textProperty.currentData.l.length || 0, t3 && 2 === this.data.r && (this.e.v = this._currentTextLength); + var e3 = 2 === this.data.r ? 1 : 100 / this.data.totalChars, r3 = this.o.v / e3, i3 = this.s.v / e3 + r3, s2 = this.e.v / e3 + r3; + if (i3 > s2) { + var a2 = i3; + i3 = s2, s2 = a2; + } + this.finalS = i3, this.finalE = s2; + } }, extendPrototype([DynamicPropertyContainer], i2), { getTextSelectorProp: function(t3, e3, r3) { + return new i2(t3, e3, r3); + } }; + }(); + function TextAnimatorDataProperty(t2, e2, r2) { + var i2 = { propType: false }, s2 = PropertyFactory.getProp, a2 = e2.a; + this.a = { r: a2.r ? s2(t2, a2.r, 0, degToRads, r2) : i2, rx: a2.rx ? s2(t2, a2.rx, 0, degToRads, r2) : i2, ry: a2.ry ? s2(t2, a2.ry, 0, degToRads, r2) : i2, sk: a2.sk ? s2(t2, a2.sk, 0, degToRads, r2) : i2, sa: a2.sa ? s2(t2, a2.sa, 0, degToRads, r2) : i2, s: a2.s ? s2(t2, a2.s, 1, 0.01, r2) : i2, a: a2.a ? s2(t2, a2.a, 1, 0, r2) : i2, o: a2.o ? s2(t2, a2.o, 0, 0.01, r2) : i2, p: a2.p ? s2(t2, a2.p, 1, 0, r2) : i2, sw: a2.sw ? s2(t2, a2.sw, 0, 0, r2) : i2, sc: a2.sc ? s2(t2, a2.sc, 1, 0, r2) : i2, fc: a2.fc ? s2(t2, a2.fc, 1, 0, r2) : i2, fh: a2.fh ? s2(t2, a2.fh, 0, 0, r2) : i2, fs: a2.fs ? s2(t2, a2.fs, 0, 0.01, r2) : i2, fb: a2.fb ? s2(t2, a2.fb, 0, 0.01, r2) : i2, t: a2.t ? s2(t2, a2.t, 0, 0, r2) : i2 }, this.s = TextSelectorProp.getTextSelectorProp(t2, e2.s, r2), this.s.t = e2.s.t; + } + function TextAnimatorProperty(t2, e2, r2) { + this._isFirstFrame = true, this._hasMaskedPath = false, this._frameId = -1, this._textData = t2, this._renderType = e2, this._elem = r2, this._animatorsData = createSizedArray(this._textData.a.length), this._pathData = {}, this._moreOptions = { alignment: {} }, this.renderedLetters = [], this.lettersChangedFlag = false, this.initDynamicPropertyContainer(r2); + } + function ITextElement() { + } + TextAnimatorProperty.prototype.searchProperties = function() { + var t2, e2, r2 = this._textData.a.length, i2 = PropertyFactory.getProp; + for (t2 = 0; t2 < r2; t2 += 1) e2 = this._textData.a[t2], this._animatorsData[t2] = new TextAnimatorDataProperty(this._elem, e2, this); + this._textData.p && "m" in this._textData.p ? (this._pathData = { a: i2(this._elem, this._textData.p.a, 0, 0, this), f: i2(this._elem, this._textData.p.f, 0, 0, this), l: i2(this._elem, this._textData.p.l, 0, 0, this), r: i2(this._elem, this._textData.p.r, 0, 0, this), p: i2(this._elem, this._textData.p.p, 0, 0, this), m: this._elem.maskManager.getMaskProperty(this._textData.p.m) }, this._hasMaskedPath = true) : this._hasMaskedPath = false, this._moreOptions.alignment = i2(this._elem, this._textData.m.a, 1, 0, this); + }, TextAnimatorProperty.prototype.getMeasures = function(t2, e2) { + if (this.lettersChangedFlag = e2, this._mdf || this._isFirstFrame || e2 || this._hasMaskedPath && this._pathData.m._mdf) { + this._isFirstFrame = false; + var r2, i2, s2, a2, n2, o2, h2, l2, p2, c2, f2, u2, d2, m2, y2, g2, v2, b2, _2, P2 = this._moreOptions.alignment.v, S2 = this._animatorsData, E2 = this._textData, x2 = this.mHelper, C2 = this._renderType, A2 = this.renderedLetters.length, w2 = t2.l; + if (this._hasMaskedPath) { + if (_2 = this._pathData.m, !this._pathData.n || this._pathData._mdf) { + var k2, T2 = _2.v; + for (this._pathData.r.v && (T2 = T2.reverse()), n2 = { tLength: 0, segments: [] }, a2 = T2._length - 1, g2 = 0, s2 = 0; s2 < a2; s2 += 1) k2 = bez.buildBezierData(T2.v[s2], T2.v[s2 + 1], [T2.o[s2][0] - T2.v[s2][0], T2.o[s2][1] - T2.v[s2][1]], [T2.i[s2 + 1][0] - T2.v[s2 + 1][0], T2.i[s2 + 1][1] - T2.v[s2 + 1][1]]), n2.tLength += k2.segmentLength, n2.segments.push(k2), g2 += k2.segmentLength; + s2 = a2, _2.v.c && (k2 = bez.buildBezierData(T2.v[s2], T2.v[0], [T2.o[s2][0] - T2.v[s2][0], T2.o[s2][1] - T2.v[s2][1]], [T2.i[0][0] - T2.v[0][0], T2.i[0][1] - T2.v[0][1]]), n2.tLength += k2.segmentLength, n2.segments.push(k2), g2 += k2.segmentLength), this._pathData.pi = n2; + } + if (n2 = this._pathData.pi, o2 = this._pathData.f.v, f2 = 0, c2 = 1, l2 = 0, p2 = true, m2 = n2.segments, o2 < 0 && _2.v.c) for (n2.tLength < Math.abs(o2) && (o2 = -Math.abs(o2) % n2.tLength), c2 = (d2 = m2[f2 = m2.length - 1].points).length - 1; o2 < 0; ) o2 += d2[c2].partialLength, (c2 -= 1) < 0 && (c2 = (d2 = m2[f2 -= 1].points).length - 1); + u2 = (d2 = m2[f2].points)[c2 - 1], y2 = (h2 = d2[c2]).partialLength; + } + a2 = w2.length, r2 = 0, i2 = 0; + var M2, D, F, I2, R2, L2 = 1.2 * t2.finalSize * 0.714, V2 = true; + F = S2.length; + var B, O, $2, z2, G, N2, j, H2, q, W, U, Y, J = -1, X = o2, K = f2, Z = c2, Q = -1, tt = "", et = this.defaultPropsArray; + if (2 === t2.j || 1 === t2.j) { + var rt = 0, it = 0, st = 2 === t2.j ? -0.5 : -1, at = 0, nt = true; + for (s2 = 0; s2 < a2; s2 += 1) if (w2[s2].n) { + for (rt && (rt += it); at < s2; ) w2[at].animatorJustifyOffset = rt, at += 1; + rt = 0, nt = true; + } else { + for (D = 0; D < F; D += 1) (M2 = S2[D].a).t.propType && (nt && 2 === t2.j && (it += M2.t.v * st), (R2 = S2[D].s.getMult(w2[s2].anIndexes[D], E2.a[D].s.totalChars)).length ? rt += M2.t.v * R2[0] * st : rt += M2.t.v * R2 * st); + nt = false; + } + for (rt && (rt += it); at < s2; ) w2[at].animatorJustifyOffset = rt, at += 1; + } + for (s2 = 0; s2 < a2; s2 += 1) { + if (x2.reset(), z2 = 1, w2[s2].n) r2 = 0, i2 += t2.yOffset, i2 += V2 ? 1 : 0, o2 = X, V2 = false, this._hasMaskedPath && (c2 = Z, u2 = (d2 = m2[f2 = K].points)[c2 - 1], y2 = (h2 = d2[c2]).partialLength, l2 = 0), tt = "", U = "", q = "", Y = "", et = this.defaultPropsArray; + else { + if (this._hasMaskedPath) { + if (Q !== w2[s2].line) { + switch (t2.j) { + case 1: + o2 += g2 - t2.lineWidths[w2[s2].line]; + break; + case 2: + o2 += (g2 - t2.lineWidths[w2[s2].line]) / 2; + } + Q = w2[s2].line; + } + J !== w2[s2].ind && (w2[J] && (o2 += w2[J].extra), o2 += w2[s2].an / 2, J = w2[s2].ind), o2 += P2[0] * w2[s2].an * 5e-3; + var ot = 0; + for (D = 0; D < F; D += 1) (M2 = S2[D].a).p.propType && ((R2 = S2[D].s.getMult(w2[s2].anIndexes[D], E2.a[D].s.totalChars)).length ? ot += M2.p.v[0] * R2[0] : ot += M2.p.v[0] * R2), M2.a.propType && ((R2 = S2[D].s.getMult(w2[s2].anIndexes[D], E2.a[D].s.totalChars)).length ? ot += M2.a.v[0] * R2[0] : ot += M2.a.v[0] * R2); + for (p2 = true, this._pathData.a.v && (o2 = 0.5 * w2[0].an + (g2 - this._pathData.f.v - 0.5 * w2[0].an - 0.5 * w2[w2.length - 1].an) * J / (a2 - 1), o2 += this._pathData.f.v); p2; ) l2 + y2 >= o2 + ot || !d2 ? (v2 = (o2 + ot - l2) / h2.partialLength, O = u2.point[0] + (h2.point[0] - u2.point[0]) * v2, $2 = u2.point[1] + (h2.point[1] - u2.point[1]) * v2, x2.translate(-P2[0] * w2[s2].an * 5e-3, -P2[1] * L2 * 0.01), p2 = false) : d2 && (l2 += h2.partialLength, (c2 += 1) >= d2.length && (c2 = 0, m2[f2 += 1] ? d2 = m2[f2].points : _2.v.c ? (c2 = 0, d2 = m2[f2 = 0].points) : (l2 -= h2.partialLength, d2 = null)), d2 && (u2 = h2, y2 = (h2 = d2[c2]).partialLength)); + B = w2[s2].an / 2 - w2[s2].add, x2.translate(-B, 0, 0); + } else B = w2[s2].an / 2 - w2[s2].add, x2.translate(-B, 0, 0), x2.translate(-P2[0] * w2[s2].an * 5e-3, -P2[1] * L2 * 0.01, 0); + for (D = 0; D < F; D += 1) (M2 = S2[D].a).t.propType && (R2 = S2[D].s.getMult(w2[s2].anIndexes[D], E2.a[D].s.totalChars), 0 === r2 && 0 === t2.j || (this._hasMaskedPath ? R2.length ? o2 += M2.t.v * R2[0] : o2 += M2.t.v * R2 : R2.length ? r2 += M2.t.v * R2[0] : r2 += M2.t.v * R2)); + for (t2.strokeWidthAnim && (N2 = t2.sw || 0), t2.strokeColorAnim && (G = t2.sc ? [t2.sc[0], t2.sc[1], t2.sc[2]] : [0, 0, 0]), t2.fillColorAnim && t2.fc && (j = [t2.fc[0], t2.fc[1], t2.fc[2]]), D = 0; D < F; D += 1) (M2 = S2[D].a).a.propType && ((R2 = S2[D].s.getMult(w2[s2].anIndexes[D], E2.a[D].s.totalChars)).length ? x2.translate(-M2.a.v[0] * R2[0], -M2.a.v[1] * R2[1], M2.a.v[2] * R2[2]) : x2.translate(-M2.a.v[0] * R2, -M2.a.v[1] * R2, M2.a.v[2] * R2)); + for (D = 0; D < F; D += 1) (M2 = S2[D].a).s.propType && ((R2 = S2[D].s.getMult(w2[s2].anIndexes[D], E2.a[D].s.totalChars)).length ? x2.scale(1 + (M2.s.v[0] - 1) * R2[0], 1 + (M2.s.v[1] - 1) * R2[1], 1) : x2.scale(1 + (M2.s.v[0] - 1) * R2, 1 + (M2.s.v[1] - 1) * R2, 1)); + for (D = 0; D < F; D += 1) { + if (M2 = S2[D].a, R2 = S2[D].s.getMult(w2[s2].anIndexes[D], E2.a[D].s.totalChars), M2.sk.propType && (R2.length ? x2.skewFromAxis(-M2.sk.v * R2[0], M2.sa.v * R2[1]) : x2.skewFromAxis(-M2.sk.v * R2, M2.sa.v * R2)), M2.r.propType && (R2.length ? x2.rotateZ(-M2.r.v * R2[2]) : x2.rotateZ(-M2.r.v * R2)), M2.ry.propType && (R2.length ? x2.rotateY(M2.ry.v * R2[1]) : x2.rotateY(M2.ry.v * R2)), M2.rx.propType && (R2.length ? x2.rotateX(M2.rx.v * R2[0]) : x2.rotateX(M2.rx.v * R2)), M2.o.propType && (R2.length ? z2 += (M2.o.v * R2[0] - z2) * R2[0] : z2 += (M2.o.v * R2 - z2) * R2), t2.strokeWidthAnim && M2.sw.propType && (R2.length ? N2 += M2.sw.v * R2[0] : N2 += M2.sw.v * R2), t2.strokeColorAnim && M2.sc.propType) for (H2 = 0; H2 < 3; H2 += 1) R2.length ? G[H2] += (M2.sc.v[H2] - G[H2]) * R2[0] : G[H2] += (M2.sc.v[H2] - G[H2]) * R2; + if (t2.fillColorAnim && t2.fc) { + if (M2.fc.propType) for (H2 = 0; H2 < 3; H2 += 1) R2.length ? j[H2] += (M2.fc.v[H2] - j[H2]) * R2[0] : j[H2] += (M2.fc.v[H2] - j[H2]) * R2; + M2.fh.propType && (j = R2.length ? addHueToRGB(j, M2.fh.v * R2[0]) : addHueToRGB(j, M2.fh.v * R2)), M2.fs.propType && (j = R2.length ? addSaturationToRGB(j, M2.fs.v * R2[0]) : addSaturationToRGB(j, M2.fs.v * R2)), M2.fb.propType && (j = R2.length ? addBrightnessToRGB(j, M2.fb.v * R2[0]) : addBrightnessToRGB(j, M2.fb.v * R2)); + } + } + for (D = 0; D < F; D += 1) (M2 = S2[D].a).p.propType && (R2 = S2[D].s.getMult(w2[s2].anIndexes[D], E2.a[D].s.totalChars), this._hasMaskedPath ? R2.length ? x2.translate(0, M2.p.v[1] * R2[0], -M2.p.v[2] * R2[1]) : x2.translate(0, M2.p.v[1] * R2, -M2.p.v[2] * R2) : R2.length ? x2.translate(M2.p.v[0] * R2[0], M2.p.v[1] * R2[1], -M2.p.v[2] * R2[2]) : x2.translate(M2.p.v[0] * R2, M2.p.v[1] * R2, -M2.p.v[2] * R2)); + if (t2.strokeWidthAnim && (q = N2 < 0 ? 0 : N2), t2.strokeColorAnim && (W = "rgb(" + Math.round(255 * G[0]) + "," + Math.round(255 * G[1]) + "," + Math.round(255 * G[2]) + ")"), t2.fillColorAnim && t2.fc && (U = "rgb(" + Math.round(255 * j[0]) + "," + Math.round(255 * j[1]) + "," + Math.round(255 * j[2]) + ")"), this._hasMaskedPath) { + if (x2.translate(0, -t2.ls), x2.translate(0, P2[1] * L2 * 0.01 + i2, 0), this._pathData.p.v) { + b2 = (h2.point[1] - u2.point[1]) / (h2.point[0] - u2.point[0]); + var ht = 180 * Math.atan(b2) / Math.PI; + h2.point[0] < u2.point[0] && (ht += 180), x2.rotate(-ht * Math.PI / 180); + } + x2.translate(O, $2, 0), o2 -= P2[0] * w2[s2].an * 5e-3, w2[s2 + 1] && J !== w2[s2 + 1].ind && (o2 += w2[s2].an / 2, o2 += 1e-3 * t2.tr * t2.finalSize); + } else { + switch (x2.translate(r2, i2, 0), t2.ps && x2.translate(t2.ps[0], t2.ps[1] + t2.ascent, 0), t2.j) { + case 1: + x2.translate(w2[s2].animatorJustifyOffset + t2.justifyOffset + (t2.boxWidth - t2.lineWidths[w2[s2].line]), 0, 0); + break; + case 2: + x2.translate(w2[s2].animatorJustifyOffset + t2.justifyOffset + (t2.boxWidth - t2.lineWidths[w2[s2].line]) / 2, 0, 0); + } + x2.translate(0, -t2.ls), x2.translate(B, 0, 0), x2.translate(P2[0] * w2[s2].an * 5e-3, P2[1] * L2 * 0.01, 0), r2 += w2[s2].l + 1e-3 * t2.tr * t2.finalSize; + } + "html" === C2 ? tt = x2.toCSS() : "svg" === C2 ? tt = x2.to2dCSS() : et = [x2.props[0], x2.props[1], x2.props[2], x2.props[3], x2.props[4], x2.props[5], x2.props[6], x2.props[7], x2.props[8], x2.props[9], x2.props[10], x2.props[11], x2.props[12], x2.props[13], x2.props[14], x2.props[15]], Y = z2; + } + A2 <= s2 ? (I2 = new LetterProps(Y, q, W, U, tt, et), this.renderedLetters.push(I2), A2 += 1, this.lettersChangedFlag = true) : (I2 = this.renderedLetters[s2], this.lettersChangedFlag = I2.update(Y, q, W, U, tt, et) || this.lettersChangedFlag); + } + } + }, TextAnimatorProperty.prototype.getValue = function() { + this._elem.globalData.frameId !== this._frameId && (this._frameId = this._elem.globalData.frameId, this.iterateDynamicProperties()); + }, TextAnimatorProperty.prototype.mHelper = new Matrix(), TextAnimatorProperty.prototype.defaultPropsArray = [], extendPrototype([DynamicPropertyContainer], TextAnimatorProperty), ITextElement.prototype.initElement = function(t2, e2, r2) { + this.lettersChangedFlag = true, this.initFrame(), this.initBaseData(t2, e2, r2), this.textProperty = new TextProperty(this, t2.t, this.dynamicProperties), this.textAnimator = new TextAnimatorProperty(t2.t, this.renderType, this), this.initTransform(t2, e2, r2), this.initHierarchy(), this.initRenderable(), this.initRendererElement(), this.createContainerElements(), this.createRenderableComponents(), this.createContent(), this.hide(), this.textAnimator.searchProperties(this.dynamicProperties); + }, ITextElement.prototype.prepareFrame = function(t2) { + this._mdf = false, this.prepareRenderableFrame(t2), this.prepareProperties(t2, this.isInRange); + }, ITextElement.prototype.createPathShape = function(t2, e2) { + var r2, i2, s2 = e2.length, a2 = ""; + for (r2 = 0; r2 < s2; r2 += 1) "sh" === e2[r2].ty && (i2 = e2[r2].ks.k, a2 += buildShapeString(i2, i2.i.length, true, t2)); + return a2; + }, ITextElement.prototype.updateDocumentData = function(t2, e2) { + this.textProperty.updateDocumentData(t2, e2); + }, ITextElement.prototype.canResizeFont = function(t2) { + this.textProperty.canResizeFont(t2); + }, ITextElement.prototype.setMinimumFontSize = function(t2) { + this.textProperty.setMinimumFontSize(t2); + }, ITextElement.prototype.applyTextPropertiesToMatrix = function(t2, e2, r2, i2, s2) { + switch (t2.ps && e2.translate(t2.ps[0], t2.ps[1] + t2.ascent, 0), e2.translate(0, -t2.ls, 0), t2.j) { + case 1: + e2.translate(t2.justifyOffset + (t2.boxWidth - t2.lineWidths[r2]), 0, 0); + break; + case 2: + e2.translate(t2.justifyOffset + (t2.boxWidth - t2.lineWidths[r2]) / 2, 0, 0); + } + e2.translate(i2, s2, 0); + }, ITextElement.prototype.buildColor = function(t2) { + return "rgb(" + Math.round(255 * t2[0]) + "," + Math.round(255 * t2[1]) + "," + Math.round(255 * t2[2]) + ")"; + }, ITextElement.prototype.emptyProp = new LetterProps(), ITextElement.prototype.destroy = function() { + }, ITextElement.prototype.validateText = function() { + (this.textProperty._mdf || this.textProperty._isFirstFrame) && (this.buildNewText(), this.textProperty._isFirstFrame = false, this.textProperty._mdf = false); + }; + var emptyShapeData = { shapes: [] }; + function SVGTextLottieElement(t2, e2, r2) { + this.textSpans = [], this.renderType = "svg", this.initElement(t2, e2, r2); + } + function ISolidElement(t2, e2, r2) { + this.initElement(t2, e2, r2); + } + function NullElement(t2, e2, r2) { + this.initFrame(), this.initBaseData(t2, e2, r2), this.initFrame(), this.initTransform(t2, e2, r2), this.initHierarchy(); + } + function SVGRendererBase() { + } + function ICompElement() { + } + function SVGCompElement(t2, e2, r2) { + this.layers = t2.layers, this.supports3d = true, this.completeLayers = false, this.pendingElements = [], this.elements = this.layers ? createSizedArray(this.layers.length) : [], this.initElement(t2, e2, r2), this.tm = t2.tm ? PropertyFactory.getProp(this, t2.tm, 0, e2.frameRate, this) : { _placeholder: true }; + } + function SVGRenderer(t2, e2) { + this.animationItem = t2, this.layers = null, this.renderedFrame = -1, this.svgElement = createNS("svg"); + var r2 = ""; + if (e2 && e2.title) { + var i2 = createNS("title"), s2 = createElementID(); + i2.setAttribute("id", s2), i2.textContent = e2.title, this.svgElement.appendChild(i2), r2 += s2; + } + if (e2 && e2.description) { + var a2 = createNS("desc"), n2 = createElementID(); + a2.setAttribute("id", n2), a2.textContent = e2.description, this.svgElement.appendChild(a2), r2 += " " + n2; + } + r2 && this.svgElement.setAttribute("aria-labelledby", r2); + var o2 = createNS("defs"); + this.svgElement.appendChild(o2); + var h2 = createNS("g"); + this.svgElement.appendChild(h2), this.layerElement = h2, this.renderConfig = { preserveAspectRatio: e2 && e2.preserveAspectRatio || "xMidYMid meet", imagePreserveAspectRatio: e2 && e2.imagePreserveAspectRatio || "xMidYMid slice", contentVisibility: e2 && e2.contentVisibility || "visible", progressiveLoad: e2 && e2.progressiveLoad || false, hideOnTransparent: !(e2 && false === e2.hideOnTransparent), viewBoxOnly: e2 && e2.viewBoxOnly || false, viewBoxSize: e2 && e2.viewBoxSize || false, className: e2 && e2.className || "", id: e2 && e2.id || "", focusable: e2 && e2.focusable, filterSize: { width: e2 && e2.filterSize && e2.filterSize.width || "100%", height: e2 && e2.filterSize && e2.filterSize.height || "100%", x: e2 && e2.filterSize && e2.filterSize.x || "0%", y: e2 && e2.filterSize && e2.filterSize.y || "0%" }, width: e2 && e2.width, height: e2 && e2.height, runExpressions: !e2 || void 0 === e2.runExpressions || e2.runExpressions }, this.globalData = { _mdf: false, frameNum: -1, defs: o2, renderConfig: this.renderConfig }, this.elements = [], this.pendingElements = [], this.destroyed = false, this.rendererType = "svg"; + } + function ShapeTransformManager() { + this.sequences = {}, this.sequenceList = [], this.transform_key_count = 0; + } + extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement), SVGTextLottieElement.prototype.createContent = function() { + this.data.singleShape && !this.globalData.fontManager.chars && (this.textContainer = createNS("text")); + }, SVGTextLottieElement.prototype.buildTextContents = function(t2) { + for (var e2 = 0, r2 = t2.length, i2 = [], s2 = ""; e2 < r2; ) t2[e2] === String.fromCharCode(13) || t2[e2] === String.fromCharCode(3) ? (i2.push(s2), s2 = "") : s2 += t2[e2], e2 += 1; + return i2.push(s2), i2; + }, SVGTextLottieElement.prototype.buildShapeData = function(t2, e2) { + if (t2.shapes && t2.shapes.length) { + var r2 = t2.shapes[0]; + if (r2.it) { + var i2 = r2.it[r2.it.length - 1]; + i2.s && (i2.s.k[0] = e2, i2.s.k[1] = e2); + } + } + return t2; + }, SVGTextLottieElement.prototype.buildNewText = function() { + var t2, e2; + this.addDynamicProperty(this); + var r2 = this.textProperty.currentData; + this.renderedLetters = createSizedArray(r2 ? r2.l.length : 0), r2.fc ? this.layerElement.setAttribute("fill", this.buildColor(r2.fc)) : this.layerElement.setAttribute("fill", "rgba(0,0,0,0)"), r2.sc && (this.layerElement.setAttribute("stroke", this.buildColor(r2.sc)), this.layerElement.setAttribute("stroke-width", r2.sw)), this.layerElement.setAttribute("font-size", r2.finalSize); + var i2 = this.globalData.fontManager.getFontByName(r2.f); + if (i2.fClass) this.layerElement.setAttribute("class", i2.fClass); + else { + this.layerElement.setAttribute("font-family", i2.fFamily); + var s2 = r2.fWeight, a2 = r2.fStyle; + this.layerElement.setAttribute("font-style", a2), this.layerElement.setAttribute("font-weight", s2); + } + this.layerElement.setAttribute("aria-label", r2.t); + var n2, o2 = r2.l || [], h2 = !!this.globalData.fontManager.chars; + e2 = o2.length; + var l2 = this.mHelper, p2 = this.data.singleShape, c2 = 0, f2 = 0, u2 = true, d2 = 1e-3 * r2.tr * r2.finalSize; + if (!p2 || h2 || r2.sz) { + var m2, y2 = this.textSpans.length; + for (t2 = 0; t2 < e2; t2 += 1) { + if (this.textSpans[t2] || (this.textSpans[t2] = { span: null, childSpan: null, glyph: null }), !h2 || !p2 || 0 === t2) { + if (n2 = y2 > t2 ? this.textSpans[t2].span : createNS(h2 ? "g" : "text"), y2 <= t2) { + if (n2.setAttribute("stroke-linecap", "butt"), n2.setAttribute("stroke-linejoin", "round"), n2.setAttribute("stroke-miterlimit", "4"), this.textSpans[t2].span = n2, h2) { + var g2 = createNS("g"); + n2.appendChild(g2), this.textSpans[t2].childSpan = g2; + } + this.textSpans[t2].span = n2, this.layerElement.appendChild(n2); + } + n2.style.display = "inherit"; + } + if (l2.reset(), p2 && (o2[t2].n && (c2 = -d2, f2 += r2.yOffset, f2 += u2 ? 1 : 0, u2 = false), this.applyTextPropertiesToMatrix(r2, l2, o2[t2].line, c2, f2), c2 += o2[t2].l || 0, c2 += d2), h2) { + var v2; + if (1 === (m2 = this.globalData.fontManager.getCharData(r2.finalText[t2], i2.fStyle, this.globalData.fontManager.getFontByName(r2.f).fFamily)).t) v2 = new SVGCompElement(m2.data, this.globalData, this); + else { + var b2 = emptyShapeData; + m2.data && m2.data.shapes && (b2 = this.buildShapeData(m2.data, r2.finalSize)), v2 = new SVGShapeElement(b2, this.globalData, this); + } + if (this.textSpans[t2].glyph) { + var _2 = this.textSpans[t2].glyph; + this.textSpans[t2].childSpan.removeChild(_2.layerElement), _2.destroy(); + } + this.textSpans[t2].glyph = v2, v2._debug = true, v2.prepareFrame(0), v2.renderFrame(), this.textSpans[t2].childSpan.appendChild(v2.layerElement), 1 === m2.t && this.textSpans[t2].childSpan.setAttribute("transform", "scale(" + r2.finalSize / 100 + "," + r2.finalSize / 100 + ")"); + } else p2 && n2.setAttribute("transform", "translate(" + l2.props[12] + "," + l2.props[13] + ")"), n2.textContent = o2[t2].val, n2.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + } + p2 && n2 && n2.setAttribute("d", ""); + } else { + var P2 = this.textContainer, S2 = "start"; + switch (r2.j) { + case 1: + S2 = "end"; + break; + case 2: + S2 = "middle"; + break; + default: + S2 = "start"; + } + P2.setAttribute("text-anchor", S2), P2.setAttribute("letter-spacing", d2); + var E2 = this.buildTextContents(r2.finalText); + for (e2 = E2.length, f2 = r2.ps ? r2.ps[1] + r2.ascent : 0, t2 = 0; t2 < e2; t2 += 1) (n2 = this.textSpans[t2].span || createNS("tspan")).textContent = E2[t2], n2.setAttribute("x", 0), n2.setAttribute("y", f2), n2.style.display = "inherit", P2.appendChild(n2), this.textSpans[t2] || (this.textSpans[t2] = { span: null, glyph: null }), this.textSpans[t2].span = n2, f2 += r2.finalLineHeight; + this.layerElement.appendChild(P2); + } + for (; t2 < this.textSpans.length; ) this.textSpans[t2].span.style.display = "none", t2 += 1; + this._sizeChanged = true; + }, SVGTextLottieElement.prototype.sourceRectAtTime = function() { + if (this.prepareFrame(this.comp.renderedFrame - this.data.st), this.renderInnerContent(), this._sizeChanged) { + this._sizeChanged = false; + var t2 = this.layerElement.getBBox(); + this.bbox = { top: t2.y, left: t2.x, width: t2.width, height: t2.height }; + } + return this.bbox; + }, SVGTextLottieElement.prototype.getValue = function() { + var t2, e2, r2 = this.textSpans.length; + for (this.renderedFrame = this.comp.renderedFrame, t2 = 0; t2 < r2; t2 += 1) (e2 = this.textSpans[t2].glyph) && (e2.prepareFrame(this.comp.renderedFrame - this.data.st), e2._mdf && (this._mdf = true)); + }, SVGTextLottieElement.prototype.renderInnerContent = function() { + if (this.validateText(), (!this.data.singleShape || this._mdf) && (this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag), this.lettersChangedFlag || this.textAnimator.lettersChangedFlag)) { + var t2, e2; + this._sizeChanged = true; + var r2, i2, s2, a2 = this.textAnimator.renderedLetters, n2 = this.textProperty.currentData.l; + for (e2 = n2.length, t2 = 0; t2 < e2; t2 += 1) n2[t2].n || (r2 = a2[t2], i2 = this.textSpans[t2].span, (s2 = this.textSpans[t2].glyph) && s2.renderFrame(), r2._mdf.m && i2.setAttribute("transform", r2.m), r2._mdf.o && i2.setAttribute("opacity", r2.o), r2._mdf.sw && i2.setAttribute("stroke-width", r2.sw), r2._mdf.sc && i2.setAttribute("stroke", r2.sc), r2._mdf.fc && i2.setAttribute("fill", r2.fc)); + } + }, extendPrototype([IImageElement], ISolidElement), ISolidElement.prototype.createContent = function() { + var t2 = createNS("rect"); + t2.setAttribute("width", this.data.sw), t2.setAttribute("height", this.data.sh), t2.setAttribute("fill", this.data.sc), this.layerElement.appendChild(t2); + }, NullElement.prototype.prepareFrame = function(t2) { + this.prepareProperties(t2, true); + }, NullElement.prototype.renderFrame = function() { + }, NullElement.prototype.getBaseElement = function() { + return null; + }, NullElement.prototype.destroy = function() { + }, NullElement.prototype.sourceRectAtTime = function() { + }, NullElement.prototype.hide = function() { + }, extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement), extendPrototype([BaseRenderer], SVGRendererBase), SVGRendererBase.prototype.createNull = function(t2) { + return new NullElement(t2, this.globalData, this); + }, SVGRendererBase.prototype.createShape = function(t2) { + return new SVGShapeElement(t2, this.globalData, this); + }, SVGRendererBase.prototype.createText = function(t2) { + return new SVGTextLottieElement(t2, this.globalData, this); + }, SVGRendererBase.prototype.createImage = function(t2) { + return new IImageElement(t2, this.globalData, this); + }, SVGRendererBase.prototype.createSolid = function(t2) { + return new ISolidElement(t2, this.globalData, this); + }, SVGRendererBase.prototype.configAnimation = function(t2) { + this.svgElement.setAttribute("xmlns", "http://www.w3.org/2000/svg"), this.svgElement.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"), this.renderConfig.viewBoxSize ? this.svgElement.setAttribute("viewBox", this.renderConfig.viewBoxSize) : this.svgElement.setAttribute("viewBox", "0 0 " + t2.w + " " + t2.h), this.renderConfig.viewBoxOnly || (this.svgElement.setAttribute("width", t2.w), this.svgElement.setAttribute("height", t2.h), this.svgElement.style.width = "100%", this.svgElement.style.height = "100%", this.svgElement.style.transform = "translate3d(0,0,0)", this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility), this.renderConfig.width && this.svgElement.setAttribute("width", this.renderConfig.width), this.renderConfig.height && this.svgElement.setAttribute("height", this.renderConfig.height), this.renderConfig.className && this.svgElement.setAttribute("class", this.renderConfig.className), this.renderConfig.id && this.svgElement.setAttribute("id", this.renderConfig.id), void 0 !== this.renderConfig.focusable && this.svgElement.setAttribute("focusable", this.renderConfig.focusable), this.svgElement.setAttribute("preserveAspectRatio", this.renderConfig.preserveAspectRatio), this.animationItem.wrapper.appendChild(this.svgElement); + var e2 = this.globalData.defs; + this.setupGlobalData(t2, e2), this.globalData.progressiveLoad = this.renderConfig.progressiveLoad, this.data = t2; + var r2 = createNS("clipPath"), i2 = createNS("rect"); + i2.setAttribute("width", t2.w), i2.setAttribute("height", t2.h), i2.setAttribute("x", 0), i2.setAttribute("y", 0); + var s2 = createElementID(); + r2.setAttribute("id", s2), r2.appendChild(i2), this.layerElement.setAttribute("clip-path", "url(" + getLocationHref() + "#" + s2 + ")"), e2.appendChild(r2), this.layers = t2.layers, this.elements = createSizedArray(t2.layers.length); + }, SVGRendererBase.prototype.destroy = function() { + var t2; + this.animationItem.wrapper && (this.animationItem.wrapper.innerText = ""), this.layerElement = null, this.globalData.defs = null; + var e2 = this.layers ? this.layers.length : 0; + for (t2 = 0; t2 < e2; t2 += 1) this.elements[t2] && this.elements[t2].destroy && this.elements[t2].destroy(); + this.elements.length = 0, this.destroyed = true, this.animationItem = null; + }, SVGRendererBase.prototype.updateContainerSize = function() { + }, SVGRendererBase.prototype.findIndexByInd = function(t2) { + var e2 = 0, r2 = this.layers.length; + for (e2 = 0; e2 < r2; e2 += 1) if (this.layers[e2].ind === t2) return e2; + return -1; + }, SVGRendererBase.prototype.buildItem = function(t2) { + var e2 = this.elements; + if (!e2[t2] && 99 !== this.layers[t2].ty) { + e2[t2] = true; + var r2 = this.createItem(this.layers[t2]); + if (e2[t2] = r2, getExpressionsPlugin() && (0 === this.layers[t2].ty && this.globalData.projectInterface.registerComposition(r2), r2.initExpressions()), this.appendElementInPos(r2, t2), this.layers[t2].tt) { + var i2 = "tp" in this.layers[t2] ? this.findIndexByInd(this.layers[t2].tp) : t2 - 1; + if (-1 === i2) return; + if (this.elements[i2] && true !== this.elements[i2]) { + var s2 = e2[i2].getMatte(this.layers[t2].tt); + r2.setMatte(s2); + } else this.buildItem(i2), this.addPendingElement(r2); + } + } + }, SVGRendererBase.prototype.checkPendingElements = function() { + for (; this.pendingElements.length; ) { + var t2 = this.pendingElements.pop(); + if (t2.checkParenting(), t2.data.tt) for (var e2 = 0, r2 = this.elements.length; e2 < r2; ) { + if (this.elements[e2] === t2) { + var i2 = "tp" in t2.data ? this.findIndexByInd(t2.data.tp) : e2 - 1, s2 = this.elements[i2].getMatte(this.layers[e2].tt); + t2.setMatte(s2); + break; + } + e2 += 1; + } + } + }, SVGRendererBase.prototype.renderFrame = function(t2) { + if (this.renderedFrame !== t2 && !this.destroyed) { + var e2; + null === t2 ? t2 = this.renderedFrame : this.renderedFrame = t2, this.globalData.frameNum = t2, this.globalData.frameId += 1, this.globalData.projectInterface.currentFrame = t2, this.globalData._mdf = false; + var r2 = this.layers.length; + for (this.completeLayers || this.checkLayers(t2), e2 = r2 - 1; e2 >= 0; e2 -= 1) (this.completeLayers || this.elements[e2]) && this.elements[e2].prepareFrame(t2 - this.layers[e2].st); + if (this.globalData._mdf) for (e2 = 0; e2 < r2; e2 += 1) (this.completeLayers || this.elements[e2]) && this.elements[e2].renderFrame(); + } + }, SVGRendererBase.prototype.appendElementInPos = function(t2, e2) { + var r2 = t2.getBaseElement(); + if (r2) { + for (var i2, s2 = 0; s2 < e2; ) this.elements[s2] && true !== this.elements[s2] && this.elements[s2].getBaseElement() && (i2 = this.elements[s2].getBaseElement()), s2 += 1; + i2 ? this.layerElement.insertBefore(r2, i2) : this.layerElement.appendChild(r2); + } + }, SVGRendererBase.prototype.hide = function() { + this.layerElement.style.display = "none"; + }, SVGRendererBase.prototype.show = function() { + this.layerElement.style.display = "block"; + }, extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement), ICompElement.prototype.initElement = function(t2, e2, r2) { + this.initFrame(), this.initBaseData(t2, e2, r2), this.initTransform(t2, e2, r2), this.initRenderable(), this.initHierarchy(), this.initRendererElement(), this.createContainerElements(), this.createRenderableComponents(), !this.data.xt && e2.progressiveLoad || this.buildAllItems(), this.hide(); + }, ICompElement.prototype.prepareFrame = function(t2) { + if (this._mdf = false, this.prepareRenderableFrame(t2), this.prepareProperties(t2, this.isInRange), this.isInRange || this.data.xt) { + if (this.tm._placeholder) this.renderedFrame = t2 / this.data.sr; + else { + var e2 = this.tm.v; + e2 === this.data.op && (e2 = this.data.op - 1), this.renderedFrame = e2; + } + var r2, i2 = this.elements.length; + for (this.completeLayers || this.checkLayers(this.renderedFrame), r2 = i2 - 1; r2 >= 0; r2 -= 1) (this.completeLayers || this.elements[r2]) && (this.elements[r2].prepareFrame(this.renderedFrame - this.layers[r2].st), this.elements[r2]._mdf && (this._mdf = true)); + } + }, ICompElement.prototype.renderInnerContent = function() { + var t2, e2 = this.layers.length; + for (t2 = 0; t2 < e2; t2 += 1) (this.completeLayers || this.elements[t2]) && this.elements[t2].renderFrame(); + }, ICompElement.prototype.setElements = function(t2) { + this.elements = t2; + }, ICompElement.prototype.getElements = function() { + return this.elements; + }, ICompElement.prototype.destroyElements = function() { + var t2, e2 = this.layers.length; + for (t2 = 0; t2 < e2; t2 += 1) this.elements[t2] && this.elements[t2].destroy(); + }, ICompElement.prototype.destroy = function() { + this.destroyElements(), this.destroyBaseElement(); + }, extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement), SVGCompElement.prototype.createComp = function(t2) { + return new SVGCompElement(t2, this.globalData, this); + }, extendPrototype([SVGRendererBase], SVGRenderer), SVGRenderer.prototype.createComp = function(t2) { + return new SVGCompElement(t2, this.globalData, this); + }, ShapeTransformManager.prototype = { addTransformSequence: function(t2) { + var e2, r2 = t2.length, i2 = "_"; + for (e2 = 0; e2 < r2; e2 += 1) i2 += t2[e2].transform.key + "_"; + var s2 = this.sequences[i2]; + return s2 || (s2 = { transforms: [].concat(t2), finalTransform: new Matrix(), _mdf: false }, this.sequences[i2] = s2, this.sequenceList.push(s2)), s2; + }, processSequence: function(t2, e2) { + for (var r2 = 0, i2 = t2.transforms.length, s2 = e2; r2 < i2 && !e2; ) { + if (t2.transforms[r2].transform.mProps._mdf) { + s2 = true; + break; + } + r2 += 1; + } + if (s2) for (t2.finalTransform.reset(), r2 = i2 - 1; r2 >= 0; r2 -= 1) t2.finalTransform.multiply(t2.transforms[r2].transform.mProps.v); + t2._mdf = s2; + }, processSequences: function(t2) { + var e2, r2 = this.sequenceList.length; + for (e2 = 0; e2 < r2; e2 += 1) this.processSequence(this.sequenceList[e2], t2); + }, getNewKey: function() { + return this.transform_key_count += 1, "_" + this.transform_key_count; + } }; + var lumaLoader = function() { + var t2 = "__lottie_element_luma_buffer", e2 = null, r2 = null, i2 = null; + function s2() { + var s3, a2, n2; + e2 || (s3 = createNS("svg"), a2 = createNS("filter"), n2 = createNS("feColorMatrix"), a2.setAttribute("id", t2), n2.setAttribute("type", "matrix"), n2.setAttribute("color-interpolation-filters", "sRGB"), n2.setAttribute("values", "0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"), a2.appendChild(n2), s3.appendChild(a2), s3.setAttribute("id", t2 + "_svg"), featureSupport.svgLumaHidden && (s3.style.display = "none"), i2 = s3, document.body.appendChild(i2), e2 = createTag("canvas"), (r2 = e2.getContext("2d")).filter = "url(#" + t2 + ")", r2.fillStyle = "rgba(0,0,0,0)", r2.fillRect(0, 0, 1, 1)); + } + return { load: s2, get: function(i3) { + return e2 || s2(), e2.width = i3.width, e2.height = i3.height, r2.filter = "url(#" + t2 + ")", e2; + } }; + }; + function createCanvas(t2, e2) { + if (featureSupport.offscreenCanvas) return new OffscreenCanvas(t2, e2); + var r2 = createTag("canvas"); + return r2.width = t2, r2.height = e2, r2; + } + var assetLoader = { loadLumaCanvas: lumaLoader.load, getLumaCanvas: lumaLoader.get, createCanvas }, registeredEffects = {}; + function CVEffects(t2) { + var e2, r2, i2 = t2.data.ef ? t2.data.ef.length : 0; + for (this.filters = [], e2 = 0; e2 < i2; e2 += 1) { + r2 = null; + var s2 = t2.data.ef[e2].ty; + registeredEffects[s2] && (r2 = new (0, registeredEffects[s2].effect)(t2.effectsManager.effectElements[e2], t2)), r2 && this.filters.push(r2); + } + this.filters.length && t2.addRenderableComponent(this); + } + function registerEffect(t2, e2) { + registeredEffects[t2] = { effect: e2 }; + } + function CVMaskElement(t2, e2) { + var r2; + this.data = t2, this.element = e2, this.masksProperties = this.data.masksProperties || [], this.viewData = createSizedArray(this.masksProperties.length); + var i2 = this.masksProperties.length, s2 = false; + for (r2 = 0; r2 < i2; r2 += 1) "n" !== this.masksProperties[r2].mode && (s2 = true), this.viewData[r2] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[r2], 3); + this.hasMasks = s2, s2 && this.element.addRenderableComponent(this); + } + function CVBaseElement() { + } + CVEffects.prototype.renderFrame = function(t2) { + var e2, r2 = this.filters.length; + for (e2 = 0; e2 < r2; e2 += 1) this.filters[e2].renderFrame(t2); + }, CVEffects.prototype.getEffects = function(t2) { + var e2, r2 = this.filters.length, i2 = []; + for (e2 = 0; e2 < r2; e2 += 1) this.filters[e2].type === t2 && i2.push(this.filters[e2]); + return i2; + }, CVMaskElement.prototype.renderFrame = function() { + if (this.hasMasks) { + var t2, e2, r2, i2, s2 = this.element.finalTransform.mat, a2 = this.element.canvasContext, n2 = this.masksProperties.length; + for (a2.beginPath(), t2 = 0; t2 < n2; t2 += 1) if ("n" !== this.masksProperties[t2].mode) { + var o2; + this.masksProperties[t2].inv && (a2.moveTo(0, 0), a2.lineTo(this.element.globalData.compSize.w, 0), a2.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h), a2.lineTo(0, this.element.globalData.compSize.h), a2.lineTo(0, 0)), i2 = this.viewData[t2].v, e2 = s2.applyToPointArray(i2.v[0][0], i2.v[0][1], 0), a2.moveTo(e2[0], e2[1]); + var h2 = i2._length; + for (o2 = 1; o2 < h2; o2 += 1) r2 = s2.applyToTriplePoints(i2.o[o2 - 1], i2.i[o2], i2.v[o2]), a2.bezierCurveTo(r2[0], r2[1], r2[2], r2[3], r2[4], r2[5]); + r2 = s2.applyToTriplePoints(i2.o[o2 - 1], i2.i[0], i2.v[0]), a2.bezierCurveTo(r2[0], r2[1], r2[2], r2[3], r2[4], r2[5]); + } + this.element.globalData.renderer.save(true), a2.clip(); + } + }, CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty, CVMaskElement.prototype.destroy = function() { + this.element = null; + }; + var operationsMap = { 1: "source-in", 2: "source-out", 3: "source-in", 4: "source-out" }; + function CVShapeData(t2, e2, r2, i2) { + this.styledShapes = [], this.tr = [0, 0, 0, 0, 0, 0]; + var s2, a2 = 4; + "rc" === e2.ty ? a2 = 5 : "el" === e2.ty ? a2 = 6 : "sr" === e2.ty && (a2 = 7), this.sh = ShapePropertyFactory.getShapeProp(t2, e2, a2, t2); + var n2, o2 = r2.length; + for (s2 = 0; s2 < o2; s2 += 1) r2[s2].closed || (n2 = { transforms: i2.addTransformSequence(r2[s2].transforms), trNodes: [] }, this.styledShapes.push(n2), r2[s2].elements.push(n2)); + } + function CVShapeElement(t2, e2, r2) { + this.shapes = [], this.shapesData = t2.shapes, this.stylesList = [], this.itemsData = [], this.prevViewData = [], this.shapeModifiers = [], this.processedElements = [], this.transformsManager = new ShapeTransformManager(), this.initElement(t2, e2, r2); + } + function CVTextElement(t2, e2, r2) { + this.textSpans = [], this.yOffset = 0, this.fillColorAnim = false, this.strokeColorAnim = false, this.strokeWidthAnim = false, this.stroke = false, this.fill = false, this.justifyOffset = 0, this.currentRender = null, this.renderType = "canvas", this.values = { fill: "rgba(0,0,0,0)", stroke: "rgba(0,0,0,0)", sWidth: 0, fValue: "" }, this.initElement(t2, e2, r2); + } + function CVImageElement(t2, e2, r2) { + this.assetData = e2.getAssetData(t2.refId), this.img = e2.imageLoader.getAsset(this.assetData), this.initElement(t2, e2, r2); + } + function CVSolidElement(t2, e2, r2) { + this.initElement(t2, e2, r2); + } + function CanvasRendererBase() { + } + function CanvasContext() { + this.opacity = -1, this.transform = createTypedArray("float32", 16), this.fillStyle = "", this.strokeStyle = "", this.lineWidth = "", this.lineCap = "", this.lineJoin = "", this.miterLimit = "", this.id = Math.random(); + } + function CVContextData() { + var t2; + for (this.stack = [], this.cArrPos = 0, this.cTr = new Matrix(), t2 = 0; t2 < 15; t2 += 1) { + var e2 = new CanvasContext(); + this.stack[t2] = e2; + } + this._length = 15, this.nativeContext = null, this.transformMat = new Matrix(), this.currentOpacity = 1, this.currentFillStyle = "", this.appliedFillStyle = "", this.currentStrokeStyle = "", this.appliedStrokeStyle = "", this.currentLineWidth = "", this.appliedLineWidth = "", this.currentLineCap = "", this.appliedLineCap = "", this.currentLineJoin = "", this.appliedLineJoin = "", this.appliedMiterLimit = "", this.currentMiterLimit = ""; + } + function CVCompElement(t2, e2, r2) { + this.completeLayers = false, this.layers = t2.layers, this.pendingElements = [], this.elements = createSizedArray(this.layers.length), this.initElement(t2, e2, r2), this.tm = t2.tm ? PropertyFactory.getProp(this, t2.tm, 0, e2.frameRate, this) : { _placeholder: true }; + } + function CanvasRenderer(t2, e2) { + this.animationItem = t2, this.renderConfig = { clearCanvas: !e2 || void 0 === e2.clearCanvas || e2.clearCanvas, context: e2 && e2.context || null, progressiveLoad: e2 && e2.progressiveLoad || false, preserveAspectRatio: e2 && e2.preserveAspectRatio || "xMidYMid meet", imagePreserveAspectRatio: e2 && e2.imagePreserveAspectRatio || "xMidYMid slice", contentVisibility: e2 && e2.contentVisibility || "visible", className: e2 && e2.className || "", id: e2 && e2.id || "", runExpressions: !e2 || void 0 === e2.runExpressions || e2.runExpressions }, this.renderConfig.dpr = e2 && e2.dpr || 1, this.animationItem.wrapper && (this.renderConfig.dpr = e2 && e2.dpr || window.devicePixelRatio || 1), this.renderedFrame = -1, this.globalData = { frameNum: -1, _mdf: false, renderConfig: this.renderConfig, currentGlobalAlpha: -1 }, this.contextData = new CVContextData(), this.elements = [], this.pendingElements = [], this.transformMat = new Matrix(), this.completeLayers = false, this.rendererType = "canvas", this.renderConfig.clearCanvas && (this.ctxTransform = this.contextData.transform.bind(this.contextData), this.ctxOpacity = this.contextData.opacity.bind(this.contextData), this.ctxFillStyle = this.contextData.fillStyle.bind(this.contextData), this.ctxStrokeStyle = this.contextData.strokeStyle.bind(this.contextData), this.ctxLineWidth = this.contextData.lineWidth.bind(this.contextData), this.ctxLineCap = this.contextData.lineCap.bind(this.contextData), this.ctxLineJoin = this.contextData.lineJoin.bind(this.contextData), this.ctxMiterLimit = this.contextData.miterLimit.bind(this.contextData), this.ctxFill = this.contextData.fill.bind(this.contextData), this.ctxFillRect = this.contextData.fillRect.bind(this.contextData), this.ctxStroke = this.contextData.stroke.bind(this.contextData), this.save = this.contextData.save.bind(this.contextData)); + } + function HBaseElement() { + } + function HSolidElement(t2, e2, r2) { + this.initElement(t2, e2, r2); + } + function HShapeElement(t2, e2, r2) { + this.shapes = [], this.shapesData = t2.shapes, this.stylesList = [], this.shapeModifiers = [], this.itemsData = [], this.processedElements = [], this.animatedContents = [], this.shapesContainer = createNS("g"), this.initElement(t2, e2, r2), this.prevViewData = [], this.currentBBox = { x: 999999, y: -999999, h: 0, w: 0 }; + } + function HTextElement(t2, e2, r2) { + this.textSpans = [], this.textPaths = [], this.currentBBox = { x: 999999, y: -999999, h: 0, w: 0 }, this.renderType = "svg", this.isMasked = false, this.initElement(t2, e2, r2); + } + function HCameraElement(t2, e2, r2) { + this.initFrame(), this.initBaseData(t2, e2, r2), this.initHierarchy(); + var i2 = PropertyFactory.getProp; + if (this.pe = i2(this, t2.pe, 0, 0, this), t2.ks.p.s ? (this.px = i2(this, t2.ks.p.x, 1, 0, this), this.py = i2(this, t2.ks.p.y, 1, 0, this), this.pz = i2(this, t2.ks.p.z, 1, 0, this)) : this.p = i2(this, t2.ks.p, 1, 0, this), t2.ks.a && (this.a = i2(this, t2.ks.a, 1, 0, this)), t2.ks.or.k.length && t2.ks.or.k[0].to) { + var s2, a2 = t2.ks.or.k.length; + for (s2 = 0; s2 < a2; s2 += 1) t2.ks.or.k[s2].to = null, t2.ks.or.k[s2].ti = null; + } + this.or = i2(this, t2.ks.or, 1, degToRads, this), this.or.sh = true, this.rx = i2(this, t2.ks.rx, 0, degToRads, this), this.ry = i2(this, t2.ks.ry, 0, degToRads, this), this.rz = i2(this, t2.ks.rz, 0, degToRads, this), this.mat = new Matrix(), this._prevMat = new Matrix(), this._isFirstFrame = true, this.finalTransform = { mProp: this }; + } + function HImageElement(t2, e2, r2) { + this.assetData = e2.getAssetData(t2.refId), this.initElement(t2, e2, r2); + } + function HybridRendererBase(t2, e2) { + this.animationItem = t2, this.layers = null, this.renderedFrame = -1, this.renderConfig = { className: e2 && e2.className || "", imagePreserveAspectRatio: e2 && e2.imagePreserveAspectRatio || "xMidYMid slice", hideOnTransparent: !(e2 && false === e2.hideOnTransparent), filterSize: { width: e2 && e2.filterSize && e2.filterSize.width || "400%", height: e2 && e2.filterSize && e2.filterSize.height || "400%", x: e2 && e2.filterSize && e2.filterSize.x || "-100%", y: e2 && e2.filterSize && e2.filterSize.y || "-100%" } }, this.globalData = { _mdf: false, frameNum: -1, renderConfig: this.renderConfig }, this.pendingElements = [], this.elements = [], this.threeDElements = [], this.destroyed = false, this.camera = null, this.supports3d = true, this.rendererType = "html"; + } + function HCompElement(t2, e2, r2) { + this.layers = t2.layers, this.supports3d = !t2.hasMask, this.completeLayers = false, this.pendingElements = [], this.elements = this.layers ? createSizedArray(this.layers.length) : [], this.initElement(t2, e2, r2), this.tm = t2.tm ? PropertyFactory.getProp(this, t2.tm, 0, e2.frameRate, this) : { _placeholder: true }; + } + function HybridRenderer(t2, e2) { + this.animationItem = t2, this.layers = null, this.renderedFrame = -1, this.renderConfig = { className: e2 && e2.className || "", imagePreserveAspectRatio: e2 && e2.imagePreserveAspectRatio || "xMidYMid slice", hideOnTransparent: !(e2 && false === e2.hideOnTransparent), filterSize: { width: e2 && e2.filterSize && e2.filterSize.width || "400%", height: e2 && e2.filterSize && e2.filterSize.height || "400%", x: e2 && e2.filterSize && e2.filterSize.x || "-100%", y: e2 && e2.filterSize && e2.filterSize.y || "-100%" }, runExpressions: !e2 || void 0 === e2.runExpressions || e2.runExpressions }, this.globalData = { _mdf: false, frameNum: -1, renderConfig: this.renderConfig }, this.pendingElements = [], this.elements = [], this.threeDElements = [], this.destroyed = false, this.camera = null, this.supports3d = true, this.rendererType = "html"; + } + CVBaseElement.prototype = { createElements: function() { + }, initRendererElement: function() { + }, createContainerElements: function() { + if (this.data.tt >= 1) { + this.buffers = []; + var t2 = this.globalData.canvasContext, e2 = assetLoader.createCanvas(t2.canvas.width, t2.canvas.height); + this.buffers.push(e2); + var r2 = assetLoader.createCanvas(t2.canvas.width, t2.canvas.height); + this.buffers.push(r2), this.data.tt >= 3 && !document._isProxy && assetLoader.loadLumaCanvas(); + } + this.canvasContext = this.globalData.canvasContext, this.transformCanvas = this.globalData.transformCanvas, this.renderableEffectsManager = new CVEffects(this), this.searchEffectTransforms(); + }, createContent: function() { + }, setBlendMode: function() { + var t2 = this.globalData; + if (t2.blendMode !== this.data.bm) { + t2.blendMode = this.data.bm; + var e2 = getBlendMode(this.data.bm); + t2.canvasContext.globalCompositeOperation = e2; + } + }, createRenderableComponents: function() { + this.maskManager = new CVMaskElement(this.data, this), this.transformEffects = this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT); + }, hideElement: function() { + this.hidden || this.isInRange && !this.isTransparent || (this.hidden = true); + }, showElement: function() { + this.isInRange && !this.isTransparent && (this.hidden = false, this._isFirstFrame = true, this.maskManager._isFirstFrame = true); + }, clearCanvas: function(t2) { + t2.clearRect(this.transformCanvas.tx, this.transformCanvas.ty, this.transformCanvas.w * this.transformCanvas.sx, this.transformCanvas.h * this.transformCanvas.sy); + }, prepareLayer: function() { + if (this.data.tt >= 1) { + var t2 = this.buffers[0].getContext("2d"); + this.clearCanvas(t2), t2.drawImage(this.canvasContext.canvas, 0, 0), this.currentTransform = this.canvasContext.getTransform(), this.canvasContext.setTransform(1, 0, 0, 1, 0, 0), this.clearCanvas(this.canvasContext), this.canvasContext.setTransform(this.currentTransform); + } + }, exitLayer: function() { + if (this.data.tt >= 1) { + var t2 = this.buffers[1], e2 = t2.getContext("2d"); + if (this.clearCanvas(e2), e2.drawImage(this.canvasContext.canvas, 0, 0), this.canvasContext.setTransform(1, 0, 0, 1, 0, 0), this.clearCanvas(this.canvasContext), this.canvasContext.setTransform(this.currentTransform), this.comp.getElementById("tp" in this.data ? this.data.tp : this.data.ind - 1).renderFrame(true), this.canvasContext.setTransform(1, 0, 0, 1, 0, 0), this.data.tt >= 3 && !document._isProxy) { + var r2 = assetLoader.getLumaCanvas(this.canvasContext.canvas); + r2.getContext("2d").drawImage(this.canvasContext.canvas, 0, 0), this.clearCanvas(this.canvasContext), this.canvasContext.drawImage(r2, 0, 0); + } + this.canvasContext.globalCompositeOperation = operationsMap[this.data.tt], this.canvasContext.drawImage(t2, 0, 0), this.canvasContext.globalCompositeOperation = "destination-over", this.canvasContext.drawImage(this.buffers[0], 0, 0), this.canvasContext.setTransform(this.currentTransform), this.canvasContext.globalCompositeOperation = "source-over"; + } + }, renderFrame: function(t2) { + if (!this.hidden && !this.data.hd && (1 !== this.data.td || t2)) { + this.renderTransform(), this.renderRenderable(), this.renderLocalTransform(), this.setBlendMode(); + var e2 = 0 === this.data.ty; + this.prepareLayer(), this.globalData.renderer.save(e2), this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props), this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity), this.renderInnerContent(), this.globalData.renderer.restore(e2), this.exitLayer(), this.maskManager.hasMasks && this.globalData.renderer.restore(true), this._isFirstFrame && (this._isFirstFrame = false); + } + }, destroy: function() { + this.canvasContext = null, this.data = null, this.globalData = null, this.maskManager.destroy(); + }, mHelper: new Matrix() }, CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement, CVBaseElement.prototype.show = CVBaseElement.prototype.showElement, CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated, extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement), CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement, CVShapeElement.prototype.transformHelper = { opacity: 1, _opMdf: false }, CVShapeElement.prototype.dashResetter = [], CVShapeElement.prototype.createContent = function() { + this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []); + }, CVShapeElement.prototype.createStyleElement = function(t2, e2) { + var r2 = { data: t2, type: t2.ty, preTransforms: this.transformsManager.addTransformSequence(e2), transforms: [], elements: [], closed: true === t2.hd }, i2 = {}; + if ("fl" === t2.ty || "st" === t2.ty ? (i2.c = PropertyFactory.getProp(this, t2.c, 1, 255, this), i2.c.k || (r2.co = "rgb(" + bmFloor(i2.c.v[0]) + "," + bmFloor(i2.c.v[1]) + "," + bmFloor(i2.c.v[2]) + ")")) : "gf" !== t2.ty && "gs" !== t2.ty || (i2.s = PropertyFactory.getProp(this, t2.s, 1, null, this), i2.e = PropertyFactory.getProp(this, t2.e, 1, null, this), i2.h = PropertyFactory.getProp(this, t2.h || { k: 0 }, 0, 0.01, this), i2.a = PropertyFactory.getProp(this, t2.a || { k: 0 }, 0, degToRads, this), i2.g = new GradientProperty(this, t2.g, this)), i2.o = PropertyFactory.getProp(this, t2.o, 0, 0.01, this), "st" === t2.ty || "gs" === t2.ty) { + if (r2.lc = lineCapEnum[t2.lc || 2], r2.lj = lineJoinEnum[t2.lj || 2], 1 == t2.lj && (r2.ml = t2.ml), i2.w = PropertyFactory.getProp(this, t2.w, 0, null, this), i2.w.k || (r2.wi = i2.w.v), t2.d) { + var s2 = new DashProperty(this, t2.d, "canvas", this); + i2.d = s2, i2.d.k || (r2.da = i2.d.dashArray, r2.do = i2.d.dashoffset[0]); + } + } else r2.r = 2 === t2.r ? "evenodd" : "nonzero"; + return this.stylesList.push(r2), i2.style = r2, i2; + }, CVShapeElement.prototype.createGroupElement = function() { + return { it: [], prevViewData: [] }; + }, CVShapeElement.prototype.createTransformElement = function(t2) { + return { transform: { opacity: 1, _opMdf: false, key: this.transformsManager.getNewKey(), op: PropertyFactory.getProp(this, t2.o, 0, 0.01, this), mProps: TransformPropertyFactory.getTransformProperty(this, t2, this) } }; + }, CVShapeElement.prototype.createShapeElement = function(t2) { + var e2 = new CVShapeData(this, t2, this.stylesList, this.transformsManager); + return this.shapes.push(e2), this.addShapeToModifiers(e2), e2; + }, CVShapeElement.prototype.reloadShapes = function() { + var t2; + this._isFirstFrame = true; + var e2 = this.itemsData.length; + for (t2 = 0; t2 < e2; t2 += 1) this.prevViewData[t2] = this.itemsData[t2]; + for (this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []), e2 = this.dynamicProperties.length, t2 = 0; t2 < e2; t2 += 1) this.dynamicProperties[t2].getValue(); + this.renderModifiers(), this.transformsManager.processSequences(this._isFirstFrame); + }, CVShapeElement.prototype.addTransformToStyleList = function(t2) { + var e2, r2 = this.stylesList.length; + for (e2 = 0; e2 < r2; e2 += 1) this.stylesList[e2].closed || this.stylesList[e2].transforms.push(t2); + }, CVShapeElement.prototype.removeTransformFromStyleList = function() { + var t2, e2 = this.stylesList.length; + for (t2 = 0; t2 < e2; t2 += 1) this.stylesList[t2].closed || this.stylesList[t2].transforms.pop(); + }, CVShapeElement.prototype.closeStyles = function(t2) { + var e2, r2 = t2.length; + for (e2 = 0; e2 < r2; e2 += 1) t2[e2].closed = true; + }, CVShapeElement.prototype.searchShapes = function(t2, e2, r2, i2, s2) { + var a2, n2, o2, h2, l2, p2, c2 = t2.length - 1, f2 = [], u2 = [], d2 = [].concat(s2); + for (a2 = c2; a2 >= 0; a2 -= 1) { + if ((h2 = this.searchProcessedElement(t2[a2])) ? e2[a2] = r2[h2 - 1] : t2[a2]._shouldRender = i2, "fl" === t2[a2].ty || "st" === t2[a2].ty || "gf" === t2[a2].ty || "gs" === t2[a2].ty) h2 ? e2[a2].style.closed = false : e2[a2] = this.createStyleElement(t2[a2], d2), f2.push(e2[a2].style); + else if ("gr" === t2[a2].ty) { + if (h2) for (o2 = e2[a2].it.length, n2 = 0; n2 < o2; n2 += 1) e2[a2].prevViewData[n2] = e2[a2].it[n2]; + else e2[a2] = this.createGroupElement(t2[a2]); + this.searchShapes(t2[a2].it, e2[a2].it, e2[a2].prevViewData, i2, d2); + } else "tr" === t2[a2].ty ? (h2 || (p2 = this.createTransformElement(t2[a2]), e2[a2] = p2), d2.push(e2[a2]), this.addTransformToStyleList(e2[a2])) : "sh" === t2[a2].ty || "rc" === t2[a2].ty || "el" === t2[a2].ty || "sr" === t2[a2].ty ? h2 || (e2[a2] = this.createShapeElement(t2[a2])) : "tm" === t2[a2].ty || "rd" === t2[a2].ty || "pb" === t2[a2].ty || "zz" === t2[a2].ty || "op" === t2[a2].ty ? (h2 ? (l2 = e2[a2]).closed = false : ((l2 = ShapeModifiers.getModifier(t2[a2].ty)).init(this, t2[a2]), e2[a2] = l2, this.shapeModifiers.push(l2)), u2.push(l2)) : "rp" === t2[a2].ty && (h2 ? (l2 = e2[a2]).closed = true : (l2 = ShapeModifiers.getModifier(t2[a2].ty), e2[a2] = l2, l2.init(this, t2, a2, e2), this.shapeModifiers.push(l2), i2 = false), u2.push(l2)); + this.addProcessedElement(t2[a2], a2 + 1); + } + for (this.removeTransformFromStyleList(), this.closeStyles(f2), c2 = u2.length, a2 = 0; a2 < c2; a2 += 1) u2[a2].closed = true; + }, CVShapeElement.prototype.renderInnerContent = function() { + this.transformHelper.opacity = 1, this.transformHelper._opMdf = false, this.renderModifiers(), this.transformsManager.processSequences(this._isFirstFrame), this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true); + }, CVShapeElement.prototype.renderShapeTransform = function(t2, e2) { + (t2._opMdf || e2.op._mdf || this._isFirstFrame) && (e2.opacity = t2.opacity, e2.opacity *= e2.op.v, e2._opMdf = true); + }, CVShapeElement.prototype.drawLayer = function() { + var t2, e2, r2, i2, s2, a2, n2, o2, h2, l2 = this.stylesList.length, p2 = this.globalData.renderer, c2 = this.globalData.canvasContext; + for (t2 = 0; t2 < l2; t2 += 1) if (("st" !== (o2 = (h2 = this.stylesList[t2]).type) && "gs" !== o2 || 0 !== h2.wi) && h2.data._shouldRender && 0 !== h2.coOp && 0 !== this.globalData.currentGlobalAlpha) { + for (p2.save(), a2 = h2.elements, "st" === o2 || "gs" === o2 ? (p2.ctxStrokeStyle("st" === o2 ? h2.co : h2.grd), p2.ctxLineWidth(h2.wi), p2.ctxLineCap(h2.lc), p2.ctxLineJoin(h2.lj), p2.ctxMiterLimit(h2.ml || 0)) : p2.ctxFillStyle("fl" === o2 ? h2.co : h2.grd), p2.ctxOpacity(h2.coOp), "st" !== o2 && "gs" !== o2 && c2.beginPath(), p2.ctxTransform(h2.preTransforms.finalTransform.props), r2 = a2.length, e2 = 0; e2 < r2; e2 += 1) { + for ("st" !== o2 && "gs" !== o2 || (c2.beginPath(), h2.da && (c2.setLineDash(h2.da), c2.lineDashOffset = h2.do)), s2 = (n2 = a2[e2].trNodes).length, i2 = 0; i2 < s2; i2 += 1) "m" === n2[i2].t ? c2.moveTo(n2[i2].p[0], n2[i2].p[1]) : "c" === n2[i2].t ? c2.bezierCurveTo(n2[i2].pts[0], n2[i2].pts[1], n2[i2].pts[2], n2[i2].pts[3], n2[i2].pts[4], n2[i2].pts[5]) : c2.closePath(); + "st" !== o2 && "gs" !== o2 || (p2.ctxStroke(), h2.da && c2.setLineDash(this.dashResetter)); + } + "st" !== o2 && "gs" !== o2 && this.globalData.renderer.ctxFill(h2.r), p2.restore(); + } + }, CVShapeElement.prototype.renderShape = function(t2, e2, r2, i2) { + var s2, a2; + for (a2 = t2, s2 = e2.length - 1; s2 >= 0; s2 -= 1) "tr" === e2[s2].ty ? (a2 = r2[s2].transform, this.renderShapeTransform(t2, a2)) : "sh" === e2[s2].ty || "el" === e2[s2].ty || "rc" === e2[s2].ty || "sr" === e2[s2].ty ? this.renderPath(e2[s2], r2[s2]) : "fl" === e2[s2].ty ? this.renderFill(e2[s2], r2[s2], a2) : "st" === e2[s2].ty ? this.renderStroke(e2[s2], r2[s2], a2) : "gf" === e2[s2].ty || "gs" === e2[s2].ty ? this.renderGradientFill(e2[s2], r2[s2], a2) : "gr" === e2[s2].ty ? this.renderShape(a2, e2[s2].it, r2[s2].it) : e2[s2].ty; + i2 && this.drawLayer(); + }, CVShapeElement.prototype.renderStyledShape = function(t2, e2) { + if (this._isFirstFrame || e2._mdf || t2.transforms._mdf) { + var r2, i2, s2, a2 = t2.trNodes, n2 = e2.paths, o2 = n2._length; + a2.length = 0; + var h2 = t2.transforms.finalTransform; + for (s2 = 0; s2 < o2; s2 += 1) { + var l2 = n2.shapes[s2]; + if (l2 && l2.v) { + for (i2 = l2._length, r2 = 1; r2 < i2; r2 += 1) 1 === r2 && a2.push({ t: "m", p: h2.applyToPointArray(l2.v[0][0], l2.v[0][1], 0) }), a2.push({ t: "c", pts: h2.applyToTriplePoints(l2.o[r2 - 1], l2.i[r2], l2.v[r2]) }); + 1 === i2 && a2.push({ t: "m", p: h2.applyToPointArray(l2.v[0][0], l2.v[0][1], 0) }), l2.c && i2 && (a2.push({ t: "c", pts: h2.applyToTriplePoints(l2.o[r2 - 1], l2.i[0], l2.v[0]) }), a2.push({ t: "z" })); + } + } + t2.trNodes = a2; + } + }, CVShapeElement.prototype.renderPath = function(t2, e2) { + if (true !== t2.hd && t2._shouldRender) { + var r2, i2 = e2.styledShapes.length; + for (r2 = 0; r2 < i2; r2 += 1) this.renderStyledShape(e2.styledShapes[r2], e2.sh); + } + }, CVShapeElement.prototype.renderFill = function(t2, e2, r2) { + var i2 = e2.style; + (e2.c._mdf || this._isFirstFrame) && (i2.co = "rgb(" + bmFloor(e2.c.v[0]) + "," + bmFloor(e2.c.v[1]) + "," + bmFloor(e2.c.v[2]) + ")"), (e2.o._mdf || r2._opMdf || this._isFirstFrame) && (i2.coOp = e2.o.v * r2.opacity); + }, CVShapeElement.prototype.renderGradientFill = function(t2, e2, r2) { + var i2, s2 = e2.style; + if (!s2.grd || e2.g._mdf || e2.s._mdf || e2.e._mdf || 1 !== t2.t && (e2.h._mdf || e2.a._mdf)) { + var a2, n2 = this.globalData.canvasContext, o2 = e2.s.v, h2 = e2.e.v; + if (1 === t2.t) i2 = n2.createLinearGradient(o2[0], o2[1], h2[0], h2[1]); + else { + var l2 = Math.sqrt(Math.pow(o2[0] - h2[0], 2) + Math.pow(o2[1] - h2[1], 2)), p2 = Math.atan2(h2[1] - o2[1], h2[0] - o2[0]), c2 = e2.h.v; + c2 >= 1 ? c2 = 0.99 : c2 <= -1 && (c2 = -0.99); + var f2 = l2 * c2, u2 = Math.cos(p2 + e2.a.v) * f2 + o2[0], d2 = Math.sin(p2 + e2.a.v) * f2 + o2[1]; + i2 = n2.createRadialGradient(u2, d2, 0, o2[0], o2[1], l2); + } + var m2 = t2.g.p, y2 = e2.g.c, g2 = 1; + for (a2 = 0; a2 < m2; a2 += 1) e2.g._hasOpacity && e2.g._collapsable && (g2 = e2.g.o[2 * a2 + 1]), i2.addColorStop(y2[4 * a2] / 100, "rgba(" + y2[4 * a2 + 1] + "," + y2[4 * a2 + 2] + "," + y2[4 * a2 + 3] + "," + g2 + ")"); + s2.grd = i2; + } + s2.coOp = e2.o.v * r2.opacity; + }, CVShapeElement.prototype.renderStroke = function(t2, e2, r2) { + var i2 = e2.style, s2 = e2.d; + s2 && (s2._mdf || this._isFirstFrame) && (i2.da = s2.dashArray, i2.do = s2.dashoffset[0]), (e2.c._mdf || this._isFirstFrame) && (i2.co = "rgb(" + bmFloor(e2.c.v[0]) + "," + bmFloor(e2.c.v[1]) + "," + bmFloor(e2.c.v[2]) + ")"), (e2.o._mdf || r2._opMdf || this._isFirstFrame) && (i2.coOp = e2.o.v * r2.opacity), (e2.w._mdf || this._isFirstFrame) && (i2.wi = e2.w.v); + }, CVShapeElement.prototype.destroy = function() { + this.shapesData = null, this.globalData = null, this.canvasContext = null, this.stylesList.length = 0, this.itemsData.length = 0; + }, extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement], CVTextElement), CVTextElement.prototype.tHelper = createTag("canvas").getContext("2d"), CVTextElement.prototype.buildNewText = function() { + var t2 = this.textProperty.currentData; + this.renderedLetters = createSizedArray(t2.l ? t2.l.length : 0); + var e2 = false; + t2.fc ? (e2 = true, this.values.fill = this.buildColor(t2.fc)) : this.values.fill = "rgba(0,0,0,0)", this.fill = e2; + var r2 = false; + t2.sc && (r2 = true, this.values.stroke = this.buildColor(t2.sc), this.values.sWidth = t2.sw); + var i2, s2, a2, n2, o2, h2, l2, p2, c2, f2, u2, d2, m2 = this.globalData.fontManager.getFontByName(t2.f), y2 = t2.l, g2 = this.mHelper; + this.stroke = r2, this.values.fValue = t2.finalSize + "px " + this.globalData.fontManager.getFontByName(t2.f).fFamily, s2 = t2.finalText.length; + var v2 = this.data.singleShape, b2 = 1e-3 * t2.tr * t2.finalSize, _2 = 0, P2 = 0, S2 = true, E2 = 0; + for (i2 = 0; i2 < s2; i2 += 1) { + n2 = (a2 = this.globalData.fontManager.getCharData(t2.finalText[i2], m2.fStyle, this.globalData.fontManager.getFontByName(t2.f).fFamily)) && a2.data || {}, g2.reset(), v2 && y2[i2].n && (_2 = -b2, P2 += t2.yOffset, P2 += S2 ? 1 : 0, S2 = false), c2 = (l2 = n2.shapes ? n2.shapes[0].it : []).length, g2.scale(t2.finalSize / 100, t2.finalSize / 100), v2 && this.applyTextPropertiesToMatrix(t2, g2, y2[i2].line, _2, P2), u2 = createSizedArray(c2 - 1); + var x2 = 0; + for (p2 = 0; p2 < c2; p2 += 1) if ("sh" === l2[p2].ty) { + for (h2 = l2[p2].ks.k.i.length, f2 = l2[p2].ks.k, d2 = [], o2 = 1; o2 < h2; o2 += 1) 1 === o2 && d2.push(g2.applyToX(f2.v[0][0], f2.v[0][1], 0), g2.applyToY(f2.v[0][0], f2.v[0][1], 0)), d2.push(g2.applyToX(f2.o[o2 - 1][0], f2.o[o2 - 1][1], 0), g2.applyToY(f2.o[o2 - 1][0], f2.o[o2 - 1][1], 0), g2.applyToX(f2.i[o2][0], f2.i[o2][1], 0), g2.applyToY(f2.i[o2][0], f2.i[o2][1], 0), g2.applyToX(f2.v[o2][0], f2.v[o2][1], 0), g2.applyToY(f2.v[o2][0], f2.v[o2][1], 0)); + d2.push(g2.applyToX(f2.o[o2 - 1][0], f2.o[o2 - 1][1], 0), g2.applyToY(f2.o[o2 - 1][0], f2.o[o2 - 1][1], 0), g2.applyToX(f2.i[0][0], f2.i[0][1], 0), g2.applyToY(f2.i[0][0], f2.i[0][1], 0), g2.applyToX(f2.v[0][0], f2.v[0][1], 0), g2.applyToY(f2.v[0][0], f2.v[0][1], 0)), u2[x2] = d2, x2 += 1; + } + v2 && (_2 += y2[i2].l, _2 += b2), this.textSpans[E2] ? this.textSpans[E2].elem = u2 : this.textSpans[E2] = { elem: u2 }, E2 += 1; + } + }, CVTextElement.prototype.renderInnerContent = function() { + var t2, e2, r2, i2, s2, a2; + this.validateText(), this.canvasContext.font = this.values.fValue, this.globalData.renderer.ctxLineCap("butt"), this.globalData.renderer.ctxLineJoin("miter"), this.globalData.renderer.ctxMiterLimit(4), this.data.singleShape || this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag); + var n2, o2 = this.textAnimator.renderedLetters, h2 = this.textProperty.currentData.l; + e2 = h2.length; + var l2, p2, c2 = null, f2 = null, u2 = null, d2 = this.globalData.renderer; + for (t2 = 0; t2 < e2; t2 += 1) if (!h2[t2].n) { + if ((n2 = o2[t2]) && (d2.save(), d2.ctxTransform(n2.p), d2.ctxOpacity(n2.o)), this.fill) { + for (n2 && n2.fc ? c2 !== n2.fc && (d2.ctxFillStyle(n2.fc), c2 = n2.fc) : c2 !== this.values.fill && (c2 = this.values.fill, d2.ctxFillStyle(this.values.fill)), i2 = (l2 = this.textSpans[t2].elem).length, this.globalData.canvasContext.beginPath(), r2 = 0; r2 < i2; r2 += 1) for (a2 = (p2 = l2[r2]).length, this.globalData.canvasContext.moveTo(p2[0], p2[1]), s2 = 2; s2 < a2; s2 += 6) this.globalData.canvasContext.bezierCurveTo(p2[s2], p2[s2 + 1], p2[s2 + 2], p2[s2 + 3], p2[s2 + 4], p2[s2 + 5]); + this.globalData.canvasContext.closePath(), d2.ctxFill(); + } + if (this.stroke) { + for (n2 && n2.sw ? u2 !== n2.sw && (u2 = n2.sw, d2.ctxLineWidth(n2.sw)) : u2 !== this.values.sWidth && (u2 = this.values.sWidth, d2.ctxLineWidth(this.values.sWidth)), n2 && n2.sc ? f2 !== n2.sc && (f2 = n2.sc, d2.ctxStrokeStyle(n2.sc)) : f2 !== this.values.stroke && (f2 = this.values.stroke, d2.ctxStrokeStyle(this.values.stroke)), i2 = (l2 = this.textSpans[t2].elem).length, this.globalData.canvasContext.beginPath(), r2 = 0; r2 < i2; r2 += 1) for (a2 = (p2 = l2[r2]).length, this.globalData.canvasContext.moveTo(p2[0], p2[1]), s2 = 2; s2 < a2; s2 += 6) this.globalData.canvasContext.bezierCurveTo(p2[s2], p2[s2 + 1], p2[s2 + 2], p2[s2 + 3], p2[s2 + 4], p2[s2 + 5]); + this.globalData.canvasContext.closePath(), d2.ctxStroke(); + } + n2 && this.globalData.renderer.restore(); + } + }, extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement), CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement, CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame, CVImageElement.prototype.createContent = function() { + if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) { + var t2 = createTag("canvas"); + t2.width = this.assetData.w, t2.height = this.assetData.h; + var e2, r2, i2 = t2.getContext("2d"), s2 = this.img.width, a2 = this.img.height, n2 = s2 / a2, o2 = this.assetData.w / this.assetData.h, h2 = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio; + n2 > o2 && "xMidYMid slice" === h2 || n2 < o2 && "xMidYMid slice" !== h2 ? e2 = (r2 = a2) * o2 : r2 = (e2 = s2) / o2, i2.drawImage(this.img, (s2 - e2) / 2, (a2 - r2) / 2, e2, r2, 0, 0, this.assetData.w, this.assetData.h), this.img = t2; + } + }, CVImageElement.prototype.renderInnerContent = function() { + this.canvasContext.drawImage(this.img, 0, 0); + }, CVImageElement.prototype.destroy = function() { + this.img = null; + }, extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement), CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement, CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame, CVSolidElement.prototype.renderInnerContent = function() { + this.globalData.renderer.ctxFillStyle(this.data.sc), this.globalData.renderer.ctxFillRect(0, 0, this.data.sw, this.data.sh); + }, extendPrototype([BaseRenderer], CanvasRendererBase), CanvasRendererBase.prototype.createShape = function(t2) { + return new CVShapeElement(t2, this.globalData, this); + }, CanvasRendererBase.prototype.createText = function(t2) { + return new CVTextElement(t2, this.globalData, this); + }, CanvasRendererBase.prototype.createImage = function(t2) { + return new CVImageElement(t2, this.globalData, this); + }, CanvasRendererBase.prototype.createSolid = function(t2) { + return new CVSolidElement(t2, this.globalData, this); + }, CanvasRendererBase.prototype.createNull = SVGRenderer.prototype.createNull, CanvasRendererBase.prototype.ctxTransform = function(t2) { + 1 === t2[0] && 0 === t2[1] && 0 === t2[4] && 1 === t2[5] && 0 === t2[12] && 0 === t2[13] || this.canvasContext.transform(t2[0], t2[1], t2[4], t2[5], t2[12], t2[13]); + }, CanvasRendererBase.prototype.ctxOpacity = function(t2) { + this.canvasContext.globalAlpha *= t2 < 0 ? 0 : t2; + }, CanvasRendererBase.prototype.ctxFillStyle = function(t2) { + this.canvasContext.fillStyle = t2; + }, CanvasRendererBase.prototype.ctxStrokeStyle = function(t2) { + this.canvasContext.strokeStyle = t2; + }, CanvasRendererBase.prototype.ctxLineWidth = function(t2) { + this.canvasContext.lineWidth = t2; + }, CanvasRendererBase.prototype.ctxLineCap = function(t2) { + this.canvasContext.lineCap = t2; + }, CanvasRendererBase.prototype.ctxLineJoin = function(t2) { + this.canvasContext.lineJoin = t2; + }, CanvasRendererBase.prototype.ctxMiterLimit = function(t2) { + this.canvasContext.miterLimit = t2; + }, CanvasRendererBase.prototype.ctxFill = function(t2) { + this.canvasContext.fill(t2); + }, CanvasRendererBase.prototype.ctxFillRect = function(t2, e2, r2, i2) { + this.canvasContext.fillRect(t2, e2, r2, i2); + }, CanvasRendererBase.prototype.ctxStroke = function() { + this.canvasContext.stroke(); + }, CanvasRendererBase.prototype.reset = function() { + this.renderConfig.clearCanvas ? this.contextData.reset() : this.canvasContext.restore(); + }, CanvasRendererBase.prototype.save = function() { + this.canvasContext.save(); + }, CanvasRendererBase.prototype.restore = function(t2) { + this.renderConfig.clearCanvas ? (t2 && (this.globalData.blendMode = "source-over"), this.contextData.restore(t2)) : this.canvasContext.restore(); + }, CanvasRendererBase.prototype.configAnimation = function(t2) { + if (this.animationItem.wrapper) { + this.animationItem.container = createTag("canvas"); + var e2 = this.animationItem.container.style; + e2.width = "100%", e2.height = "100%"; + var r2 = "0px 0px 0px"; + e2.transformOrigin = r2, e2.mozTransformOrigin = r2, e2.webkitTransformOrigin = r2, e2["-webkit-transform"] = r2, e2.contentVisibility = this.renderConfig.contentVisibility, this.animationItem.wrapper.appendChild(this.animationItem.container), this.canvasContext = this.animationItem.container.getContext("2d"), this.renderConfig.className && this.animationItem.container.setAttribute("class", this.renderConfig.className), this.renderConfig.id && this.animationItem.container.setAttribute("id", this.renderConfig.id); + } else this.canvasContext = this.renderConfig.context; + this.contextData.setContext(this.canvasContext), this.data = t2, this.layers = t2.layers, this.transformCanvas = { w: t2.w, h: t2.h, sx: 0, sy: 0, tx: 0, ty: 0 }, this.setupGlobalData(t2, document.body), this.globalData.canvasContext = this.canvasContext, this.globalData.renderer = this, this.globalData.isDashed = false, this.globalData.progressiveLoad = this.renderConfig.progressiveLoad, this.globalData.transformCanvas = this.transformCanvas, this.elements = createSizedArray(t2.layers.length), this.updateContainerSize(); + }, CanvasRendererBase.prototype.updateContainerSize = function(t2, e2) { + var r2, i2, s2, a2; + if (this.reset(), t2 ? (r2 = t2, i2 = e2, this.canvasContext.canvas.width = r2, this.canvasContext.canvas.height = i2) : (this.animationItem.wrapper && this.animationItem.container ? (r2 = this.animationItem.wrapper.offsetWidth, i2 = this.animationItem.wrapper.offsetHeight) : (r2 = this.canvasContext.canvas.width, i2 = this.canvasContext.canvas.height), this.canvasContext.canvas.width = r2 * this.renderConfig.dpr, this.canvasContext.canvas.height = i2 * this.renderConfig.dpr), -1 !== this.renderConfig.preserveAspectRatio.indexOf("meet") || -1 !== this.renderConfig.preserveAspectRatio.indexOf("slice")) { + var n2 = this.renderConfig.preserveAspectRatio.split(" "), o2 = n2[1] || "meet", h2 = n2[0] || "xMidYMid", l2 = h2.substr(0, 4), p2 = h2.substr(4); + s2 = r2 / i2, (a2 = this.transformCanvas.w / this.transformCanvas.h) > s2 && "meet" === o2 || a2 < s2 && "slice" === o2 ? (this.transformCanvas.sx = r2 / (this.transformCanvas.w / this.renderConfig.dpr), this.transformCanvas.sy = r2 / (this.transformCanvas.w / this.renderConfig.dpr)) : (this.transformCanvas.sx = i2 / (this.transformCanvas.h / this.renderConfig.dpr), this.transformCanvas.sy = i2 / (this.transformCanvas.h / this.renderConfig.dpr)), this.transformCanvas.tx = "xMid" === l2 && (a2 < s2 && "meet" === o2 || a2 > s2 && "slice" === o2) ? (r2 - this.transformCanvas.w * (i2 / this.transformCanvas.h)) / 2 * this.renderConfig.dpr : "xMax" === l2 && (a2 < s2 && "meet" === o2 || a2 > s2 && "slice" === o2) ? (r2 - this.transformCanvas.w * (i2 / this.transformCanvas.h)) * this.renderConfig.dpr : 0, this.transformCanvas.ty = "YMid" === p2 && (a2 > s2 && "meet" === o2 || a2 < s2 && "slice" === o2) ? (i2 - this.transformCanvas.h * (r2 / this.transformCanvas.w)) / 2 * this.renderConfig.dpr : "YMax" === p2 && (a2 > s2 && "meet" === o2 || a2 < s2 && "slice" === o2) ? (i2 - this.transformCanvas.h * (r2 / this.transformCanvas.w)) * this.renderConfig.dpr : 0; + } else "none" === this.renderConfig.preserveAspectRatio ? (this.transformCanvas.sx = r2 / (this.transformCanvas.w / this.renderConfig.dpr), this.transformCanvas.sy = i2 / (this.transformCanvas.h / this.renderConfig.dpr), this.transformCanvas.tx = 0, this.transformCanvas.ty = 0) : (this.transformCanvas.sx = this.renderConfig.dpr, this.transformCanvas.sy = this.renderConfig.dpr, this.transformCanvas.tx = 0, this.transformCanvas.ty = 0); + this.transformCanvas.props = [this.transformCanvas.sx, 0, 0, 0, 0, this.transformCanvas.sy, 0, 0, 0, 0, 1, 0, this.transformCanvas.tx, this.transformCanvas.ty, 0, 1], this.ctxTransform(this.transformCanvas.props), this.canvasContext.beginPath(), this.canvasContext.rect(0, 0, this.transformCanvas.w, this.transformCanvas.h), this.canvasContext.closePath(), this.canvasContext.clip(), this.renderFrame(this.renderedFrame, true); + }, CanvasRendererBase.prototype.destroy = function() { + var t2; + for (this.renderConfig.clearCanvas && this.animationItem.wrapper && (this.animationItem.wrapper.innerText = ""), t2 = (this.layers ? this.layers.length : 0) - 1; t2 >= 0; t2 -= 1) this.elements[t2] && this.elements[t2].destroy && this.elements[t2].destroy(); + this.elements.length = 0, this.globalData.canvasContext = null, this.animationItem.container = null, this.destroyed = true; + }, CanvasRendererBase.prototype.renderFrame = function(t2, e2) { + if ((this.renderedFrame !== t2 || true !== this.renderConfig.clearCanvas || e2) && !this.destroyed && -1 !== t2) { + var r2; + this.renderedFrame = t2, this.globalData.frameNum = t2 - this.animationItem._isFirstFrame, this.globalData.frameId += 1, this.globalData._mdf = !this.renderConfig.clearCanvas || e2, this.globalData.projectInterface.currentFrame = t2; + var i2 = this.layers.length; + for (this.completeLayers || this.checkLayers(t2), r2 = i2 - 1; r2 >= 0; r2 -= 1) (this.completeLayers || this.elements[r2]) && this.elements[r2].prepareFrame(t2 - this.layers[r2].st); + if (this.globalData._mdf) { + for (true === this.renderConfig.clearCanvas ? this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h) : this.save(), r2 = i2 - 1; r2 >= 0; r2 -= 1) (this.completeLayers || this.elements[r2]) && this.elements[r2].renderFrame(); + true !== this.renderConfig.clearCanvas && this.restore(); + } + } + }, CanvasRendererBase.prototype.buildItem = function(t2) { + var e2 = this.elements; + if (!e2[t2] && 99 !== this.layers[t2].ty) { + var r2 = this.createItem(this.layers[t2], this, this.globalData); + e2[t2] = r2, r2.initExpressions(); + } + }, CanvasRendererBase.prototype.checkPendingElements = function() { + for (; this.pendingElements.length; ) this.pendingElements.pop().checkParenting(); + }, CanvasRendererBase.prototype.hide = function() { + this.animationItem.container.style.display = "none"; + }, CanvasRendererBase.prototype.show = function() { + this.animationItem.container.style.display = "block"; + }, CVContextData.prototype.duplicate = function() { + var t2 = 2 * this._length, e2 = 0; + for (e2 = this._length; e2 < t2; e2 += 1) this.stack[e2] = new CanvasContext(); + this._length = t2; + }, CVContextData.prototype.reset = function() { + this.cArrPos = 0, this.cTr.reset(), this.stack[this.cArrPos].opacity = 1; + }, CVContextData.prototype.restore = function(t2) { + this.cArrPos -= 1; + var e2, r2 = this.stack[this.cArrPos], i2 = r2.transform, s2 = this.cTr.props; + for (e2 = 0; e2 < 16; e2 += 1) s2[e2] = i2[e2]; + if (t2) { + this.nativeContext.restore(); + var a2 = this.stack[this.cArrPos + 1]; + this.appliedFillStyle = a2.fillStyle, this.appliedStrokeStyle = a2.strokeStyle, this.appliedLineWidth = a2.lineWidth, this.appliedLineCap = a2.lineCap, this.appliedLineJoin = a2.lineJoin, this.appliedMiterLimit = a2.miterLimit; + } + this.nativeContext.setTransform(i2[0], i2[1], i2[4], i2[5], i2[12], i2[13]), (t2 || -1 !== r2.opacity && this.currentOpacity !== r2.opacity) && (this.nativeContext.globalAlpha = r2.opacity, this.currentOpacity = r2.opacity), this.currentFillStyle = r2.fillStyle, this.currentStrokeStyle = r2.strokeStyle, this.currentLineWidth = r2.lineWidth, this.currentLineCap = r2.lineCap, this.currentLineJoin = r2.lineJoin, this.currentMiterLimit = r2.miterLimit; + }, CVContextData.prototype.save = function(t2) { + t2 && this.nativeContext.save(); + var e2 = this.cTr.props; + this._length <= this.cArrPos && this.duplicate(); + var r2, i2 = this.stack[this.cArrPos]; + for (r2 = 0; r2 < 16; r2 += 1) i2.transform[r2] = e2[r2]; + this.cArrPos += 1; + var s2 = this.stack[this.cArrPos]; + s2.opacity = i2.opacity, s2.fillStyle = i2.fillStyle, s2.strokeStyle = i2.strokeStyle, s2.lineWidth = i2.lineWidth, s2.lineCap = i2.lineCap, s2.lineJoin = i2.lineJoin, s2.miterLimit = i2.miterLimit; + }, CVContextData.prototype.setOpacity = function(t2) { + this.stack[this.cArrPos].opacity = t2; + }, CVContextData.prototype.setContext = function(t2) { + this.nativeContext = t2; + }, CVContextData.prototype.fillStyle = function(t2) { + this.stack[this.cArrPos].fillStyle !== t2 && (this.currentFillStyle = t2, this.stack[this.cArrPos].fillStyle = t2); + }, CVContextData.prototype.strokeStyle = function(t2) { + this.stack[this.cArrPos].strokeStyle !== t2 && (this.currentStrokeStyle = t2, this.stack[this.cArrPos].strokeStyle = t2); + }, CVContextData.prototype.lineWidth = function(t2) { + this.stack[this.cArrPos].lineWidth !== t2 && (this.currentLineWidth = t2, this.stack[this.cArrPos].lineWidth = t2); + }, CVContextData.prototype.lineCap = function(t2) { + this.stack[this.cArrPos].lineCap !== t2 && (this.currentLineCap = t2, this.stack[this.cArrPos].lineCap = t2); + }, CVContextData.prototype.lineJoin = function(t2) { + this.stack[this.cArrPos].lineJoin !== t2 && (this.currentLineJoin = t2, this.stack[this.cArrPos].lineJoin = t2); + }, CVContextData.prototype.miterLimit = function(t2) { + this.stack[this.cArrPos].miterLimit !== t2 && (this.currentMiterLimit = t2, this.stack[this.cArrPos].miterLimit = t2); + }, CVContextData.prototype.transform = function(t2) { + this.transformMat.cloneFromProps(t2); + var e2 = this.cTr; + this.transformMat.multiply(e2), e2.cloneFromProps(this.transformMat.props); + var r2 = e2.props; + this.nativeContext.setTransform(r2[0], r2[1], r2[4], r2[5], r2[12], r2[13]); + }, CVContextData.prototype.opacity = function(t2) { + var e2 = this.stack[this.cArrPos].opacity; + e2 *= t2 < 0 ? 0 : t2, this.stack[this.cArrPos].opacity !== e2 && (this.currentOpacity !== t2 && (this.nativeContext.globalAlpha = t2, this.currentOpacity = t2), this.stack[this.cArrPos].opacity = e2); + }, CVContextData.prototype.fill = function(t2) { + this.appliedFillStyle !== this.currentFillStyle && (this.appliedFillStyle = this.currentFillStyle, this.nativeContext.fillStyle = this.appliedFillStyle), this.nativeContext.fill(t2); + }, CVContextData.prototype.fillRect = function(t2, e2, r2, i2) { + this.appliedFillStyle !== this.currentFillStyle && (this.appliedFillStyle = this.currentFillStyle, this.nativeContext.fillStyle = this.appliedFillStyle), this.nativeContext.fillRect(t2, e2, r2, i2); + }, CVContextData.prototype.stroke = function() { + this.appliedStrokeStyle !== this.currentStrokeStyle && (this.appliedStrokeStyle = this.currentStrokeStyle, this.nativeContext.strokeStyle = this.appliedStrokeStyle), this.appliedLineWidth !== this.currentLineWidth && (this.appliedLineWidth = this.currentLineWidth, this.nativeContext.lineWidth = this.appliedLineWidth), this.appliedLineCap !== this.currentLineCap && (this.appliedLineCap = this.currentLineCap, this.nativeContext.lineCap = this.appliedLineCap), this.appliedLineJoin !== this.currentLineJoin && (this.appliedLineJoin = this.currentLineJoin, this.nativeContext.lineJoin = this.appliedLineJoin), this.appliedMiterLimit !== this.currentMiterLimit && (this.appliedMiterLimit = this.currentMiterLimit, this.nativeContext.miterLimit = this.appliedMiterLimit), this.nativeContext.stroke(); + }, extendPrototype([CanvasRendererBase, ICompElement, CVBaseElement], CVCompElement), CVCompElement.prototype.renderInnerContent = function() { + var t2, e2 = this.canvasContext; + for (e2.beginPath(), e2.moveTo(0, 0), e2.lineTo(this.data.w, 0), e2.lineTo(this.data.w, this.data.h), e2.lineTo(0, this.data.h), e2.lineTo(0, 0), e2.clip(), t2 = this.layers.length - 1; t2 >= 0; t2 -= 1) (this.completeLayers || this.elements[t2]) && this.elements[t2].renderFrame(); + }, CVCompElement.prototype.destroy = function() { + var t2; + for (t2 = this.layers.length - 1; t2 >= 0; t2 -= 1) this.elements[t2] && this.elements[t2].destroy(); + this.layers = null, this.elements = null; + }, CVCompElement.prototype.createComp = function(t2) { + return new CVCompElement(t2, this.globalData, this); + }, extendPrototype([CanvasRendererBase], CanvasRenderer), CanvasRenderer.prototype.createComp = function(t2) { + return new CVCompElement(t2, this.globalData, this); + }, HBaseElement.prototype = { checkBlendMode: function() { + }, initRendererElement: function() { + this.baseElement = createTag(this.data.tg || "div"), this.data.hasMask ? (this.svgElement = createNS("svg"), this.layerElement = createNS("g"), this.maskedElement = this.layerElement, this.svgElement.appendChild(this.layerElement), this.baseElement.appendChild(this.svgElement)) : this.layerElement = this.baseElement, styleDiv(this.baseElement); + }, createContainerElements: function() { + this.renderableEffectsManager = new CVEffects(this), this.transformedElement = this.baseElement, this.maskedElement = this.layerElement, this.data.ln && this.layerElement.setAttribute("id", this.data.ln), this.data.cl && this.layerElement.setAttribute("class", this.data.cl), 0 !== this.data.bm && this.setBlendMode(); + }, renderElement: function() { + var t2 = this.transformedElement ? this.transformedElement.style : {}; + if (this.finalTransform._matMdf) { + var e2 = this.finalTransform.mat.toCSS(); + t2.transform = e2, t2.webkitTransform = e2; + } + this.finalTransform._opMdf && (t2.opacity = this.finalTransform.mProp.o.v); + }, renderFrame: function() { + this.data.hd || this.hidden || (this.renderTransform(), this.renderRenderable(), this.renderElement(), this.renderInnerContent(), this._isFirstFrame && (this._isFirstFrame = false)); + }, destroy: function() { + this.layerElement = null, this.transformedElement = null, this.matteElement && (this.matteElement = null), this.maskManager && (this.maskManager.destroy(), this.maskManager = null); + }, createRenderableComponents: function() { + this.maskManager = new MaskElement(this.data, this, this.globalData); + }, addEffects: function() { + }, setMatte: function() { + } }, HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement, HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy, HBaseElement.prototype.buildElementParenting = BaseRenderer.prototype.buildElementParenting, extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], HSolidElement), HSolidElement.prototype.createContent = function() { + var t2; + this.data.hasMask ? ((t2 = createNS("rect")).setAttribute("width", this.data.sw), t2.setAttribute("height", this.data.sh), t2.setAttribute("fill", this.data.sc), this.svgElement.setAttribute("width", this.data.sw), this.svgElement.setAttribute("height", this.data.sh)) : ((t2 = createTag("div")).style.width = this.data.sw + "px", t2.style.height = this.data.sh + "px", t2.style.backgroundColor = this.data.sc), this.layerElement.appendChild(t2); + }, extendPrototype([BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement, HierarchyElement, FrameElement, RenderableElement], HShapeElement), HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent, HShapeElement.prototype.createContent = function() { + var t2; + if (this.baseElement.style.fontSize = 0, this.data.hasMask) this.layerElement.appendChild(this.shapesContainer), t2 = this.svgElement; + else { + t2 = createNS("svg"); + var e2 = this.comp.data ? this.comp.data : this.globalData.compSize; + t2.setAttribute("width", e2.w), t2.setAttribute("height", e2.h), t2.appendChild(this.shapesContainer), this.layerElement.appendChild(t2); + } + this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.shapesContainer, 0, [], true), this.filterUniqueShapes(), this.shapeCont = t2; + }, HShapeElement.prototype.getTransformedPoint = function(t2, e2) { + var r2, i2 = t2.length; + for (r2 = 0; r2 < i2; r2 += 1) e2 = t2[r2].mProps.v.applyToPointArray(e2[0], e2[1], 0); + return e2; + }, HShapeElement.prototype.calculateShapeBoundingBox = function(t2, e2) { + var r2, i2, s2, a2, n2, o2 = t2.sh.v, h2 = t2.transformers, l2 = o2._length; + if (!(l2 <= 1)) { + for (r2 = 0; r2 < l2 - 1; r2 += 1) i2 = this.getTransformedPoint(h2, o2.v[r2]), s2 = this.getTransformedPoint(h2, o2.o[r2]), a2 = this.getTransformedPoint(h2, o2.i[r2 + 1]), n2 = this.getTransformedPoint(h2, o2.v[r2 + 1]), this.checkBounds(i2, s2, a2, n2, e2); + o2.c && (i2 = this.getTransformedPoint(h2, o2.v[r2]), s2 = this.getTransformedPoint(h2, o2.o[r2]), a2 = this.getTransformedPoint(h2, o2.i[0]), n2 = this.getTransformedPoint(h2, o2.v[0]), this.checkBounds(i2, s2, a2, n2, e2)); + } + }, HShapeElement.prototype.checkBounds = function(t2, e2, r2, i2, s2) { + this.getBoundsOfCurve(t2, e2, r2, i2); + var a2 = this.shapeBoundingBox; + s2.x = bmMin(a2.left, s2.x), s2.xMax = bmMax(a2.right, s2.xMax), s2.y = bmMin(a2.top, s2.y), s2.yMax = bmMax(a2.bottom, s2.yMax); + }, HShapeElement.prototype.shapeBoundingBox = { left: 0, right: 0, top: 0, bottom: 0 }, HShapeElement.prototype.tempBoundingBox = { x: 0, xMax: 0, y: 0, yMax: 0, width: 0, height: 0 }, HShapeElement.prototype.getBoundsOfCurve = function(t2, e2, r2, i2) { + for (var s2, a2, n2, o2, h2, l2, p2, c2 = [[t2[0], i2[0]], [t2[1], i2[1]]], f2 = 0; f2 < 2; ++f2) a2 = 6 * t2[f2] - 12 * e2[f2] + 6 * r2[f2], s2 = -3 * t2[f2] + 9 * e2[f2] - 9 * r2[f2] + 3 * i2[f2], n2 = 3 * e2[f2] - 3 * t2[f2], a2 |= 0, n2 |= 0, 0 == (s2 |= 0) && 0 === a2 || (0 === s2 ? (o2 = -n2 / a2) > 0 && o2 < 1 && c2[f2].push(this.calculateF(o2, t2, e2, r2, i2, f2)) : (h2 = a2 * a2 - 4 * n2 * s2) >= 0 && ((l2 = (-a2 + bmSqrt(h2)) / (2 * s2)) > 0 && l2 < 1 && c2[f2].push(this.calculateF(l2, t2, e2, r2, i2, f2)), (p2 = (-a2 - bmSqrt(h2)) / (2 * s2)) > 0 && p2 < 1 && c2[f2].push(this.calculateF(p2, t2, e2, r2, i2, f2)))); + this.shapeBoundingBox.left = bmMin.apply(null, c2[0]), this.shapeBoundingBox.top = bmMin.apply(null, c2[1]), this.shapeBoundingBox.right = bmMax.apply(null, c2[0]), this.shapeBoundingBox.bottom = bmMax.apply(null, c2[1]); + }, HShapeElement.prototype.calculateF = function(t2, e2, r2, i2, s2, a2) { + return bmPow(1 - t2, 3) * e2[a2] + 3 * bmPow(1 - t2, 2) * t2 * r2[a2] + 3 * (1 - t2) * bmPow(t2, 2) * i2[a2] + bmPow(t2, 3) * s2[a2]; + }, HShapeElement.prototype.calculateBoundingBox = function(t2, e2) { + var r2, i2 = t2.length; + for (r2 = 0; r2 < i2; r2 += 1) t2[r2] && t2[r2].sh ? this.calculateShapeBoundingBox(t2[r2], e2) : t2[r2] && t2[r2].it ? this.calculateBoundingBox(t2[r2].it, e2) : t2[r2] && t2[r2].style && t2[r2].w && this.expandStrokeBoundingBox(t2[r2].w, e2); + }, HShapeElement.prototype.expandStrokeBoundingBox = function(t2, e2) { + var r2 = 0; + if (t2.keyframes) { + for (var i2 = 0; i2 < t2.keyframes.length; i2 += 1) { + var s2 = t2.keyframes[i2].s; + s2 > r2 && (r2 = s2); + } + r2 *= t2.mult; + } else r2 = t2.v * t2.mult; + e2.x -= r2, e2.xMax += r2, e2.y -= r2, e2.yMax += r2; + }, HShapeElement.prototype.currentBoxContains = function(t2) { + return this.currentBBox.x <= t2.x && this.currentBBox.y <= t2.y && this.currentBBox.width + this.currentBBox.x >= t2.x + t2.width && this.currentBBox.height + this.currentBBox.y >= t2.y + t2.height; + }, HShapeElement.prototype.renderInnerContent = function() { + if (this._renderShapeFrame(), !this.hidden && (this._isFirstFrame || this._mdf)) { + var t2 = this.tempBoundingBox, e2 = 999999; + if (t2.x = e2, t2.xMax = -e2, t2.y = e2, t2.yMax = -e2, this.calculateBoundingBox(this.itemsData, t2), t2.width = t2.xMax < t2.x ? 0 : t2.xMax - t2.x, t2.height = t2.yMax < t2.y ? 0 : t2.yMax - t2.y, this.currentBoxContains(t2)) return; + var r2 = false; + if (this.currentBBox.w !== t2.width && (this.currentBBox.w = t2.width, this.shapeCont.setAttribute("width", t2.width), r2 = true), this.currentBBox.h !== t2.height && (this.currentBBox.h = t2.height, this.shapeCont.setAttribute("height", t2.height), r2 = true), r2 || this.currentBBox.x !== t2.x || this.currentBBox.y !== t2.y) { + this.currentBBox.w = t2.width, this.currentBBox.h = t2.height, this.currentBBox.x = t2.x, this.currentBBox.y = t2.y, this.shapeCont.setAttribute("viewBox", this.currentBBox.x + " " + this.currentBBox.y + " " + this.currentBBox.w + " " + this.currentBBox.h); + var i2 = this.shapeCont.style, s2 = "translate(" + this.currentBBox.x + "px," + this.currentBBox.y + "px)"; + i2.transform = s2, i2.webkitTransform = s2; + } + } + }, extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], HTextElement), HTextElement.prototype.createContent = function() { + if (this.isMasked = this.checkMasks(), this.isMasked) { + this.renderType = "svg", this.compW = this.comp.data.w, this.compH = this.comp.data.h, this.svgElement.setAttribute("width", this.compW), this.svgElement.setAttribute("height", this.compH); + var t2 = createNS("g"); + this.maskedElement.appendChild(t2), this.innerElem = t2; + } else this.renderType = "html", this.innerElem = this.layerElement; + this.checkParenting(); + }, HTextElement.prototype.buildNewText = function() { + var t2 = this.textProperty.currentData; + this.renderedLetters = createSizedArray(t2.l ? t2.l.length : 0); + var e2 = this.innerElem.style, r2 = t2.fc ? this.buildColor(t2.fc) : "rgba(0,0,0,0)"; + e2.fill = r2, e2.color = r2, t2.sc && (e2.stroke = this.buildColor(t2.sc), e2.strokeWidth = t2.sw + "px"); + var i2, s2, a2 = this.globalData.fontManager.getFontByName(t2.f); + if (!this.globalData.fontManager.chars) if (e2.fontSize = t2.finalSize + "px", e2.lineHeight = t2.finalSize + "px", a2.fClass) this.innerElem.className = a2.fClass; + else { + e2.fontFamily = a2.fFamily; + var n2 = t2.fWeight, o2 = t2.fStyle; + e2.fontStyle = o2, e2.fontWeight = n2; + } + var h2, l2, p2, c2 = t2.l; + s2 = c2.length; + var f2, u2 = this.mHelper, d2 = "", m2 = 0; + for (i2 = 0; i2 < s2; i2 += 1) { + if (this.globalData.fontManager.chars ? (this.textPaths[m2] ? h2 = this.textPaths[m2] : ((h2 = createNS("path")).setAttribute("stroke-linecap", lineCapEnum[1]), h2.setAttribute("stroke-linejoin", lineJoinEnum[2]), h2.setAttribute("stroke-miterlimit", "4")), this.isMasked || (this.textSpans[m2] ? p2 = (l2 = this.textSpans[m2]).children[0] : ((l2 = createTag("div")).style.lineHeight = 0, (p2 = createNS("svg")).appendChild(h2), styleDiv(l2)))) : this.isMasked ? h2 = this.textPaths[m2] ? this.textPaths[m2] : createNS("text") : this.textSpans[m2] ? (l2 = this.textSpans[m2], h2 = this.textPaths[m2]) : (styleDiv(l2 = createTag("span")), styleDiv(h2 = createTag("span")), l2.appendChild(h2)), this.globalData.fontManager.chars) { + var y2, g2 = this.globalData.fontManager.getCharData(t2.finalText[i2], a2.fStyle, this.globalData.fontManager.getFontByName(t2.f).fFamily); + if (y2 = g2 ? g2.data : null, u2.reset(), y2 && y2.shapes && y2.shapes.length && (f2 = y2.shapes[0].it, u2.scale(t2.finalSize / 100, t2.finalSize / 100), d2 = this.createPathShape(u2, f2), h2.setAttribute("d", d2)), this.isMasked) this.innerElem.appendChild(h2); + else { + if (this.innerElem.appendChild(l2), y2 && y2.shapes) { + document.body.appendChild(p2); + var v2 = p2.getBBox(); + p2.setAttribute("width", v2.width + 2), p2.setAttribute("height", v2.height + 2), p2.setAttribute("viewBox", v2.x - 1 + " " + (v2.y - 1) + " " + (v2.width + 2) + " " + (v2.height + 2)); + var b2 = p2.style, _2 = "translate(" + (v2.x - 1) + "px," + (v2.y - 1) + "px)"; + b2.transform = _2, b2.webkitTransform = _2, c2[i2].yOffset = v2.y - 1; + } else p2.setAttribute("width", 1), p2.setAttribute("height", 1); + l2.appendChild(p2); + } + } else if (h2.textContent = c2[i2].val, h2.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), this.isMasked) this.innerElem.appendChild(h2); + else { + this.innerElem.appendChild(l2); + var P2 = h2.style, S2 = "translate3d(0," + -t2.finalSize / 1.2 + "px,0)"; + P2.transform = S2, P2.webkitTransform = S2; + } + this.isMasked ? this.textSpans[m2] = h2 : this.textSpans[m2] = l2, this.textSpans[m2].style.display = "block", this.textPaths[m2] = h2, m2 += 1; + } + for (; m2 < this.textSpans.length; ) this.textSpans[m2].style.display = "none", m2 += 1; + }, HTextElement.prototype.renderInnerContent = function() { + var t2; + if (this.validateText(), this.data.singleShape) { + if (!this._isFirstFrame && !this.lettersChangedFlag) return; + if (this.isMasked && this.finalTransform._matMdf) { + this.svgElement.setAttribute("viewBox", -this.finalTransform.mProp.p.v[0] + " " + -this.finalTransform.mProp.p.v[1] + " " + this.compW + " " + this.compH), t2 = this.svgElement.style; + var e2 = "translate(" + -this.finalTransform.mProp.p.v[0] + "px," + -this.finalTransform.mProp.p.v[1] + "px)"; + t2.transform = e2, t2.webkitTransform = e2; + } + } + if (this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag), this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) { + var r2, i2, s2, a2, n2, o2 = 0, h2 = this.textAnimator.renderedLetters, l2 = this.textProperty.currentData.l; + for (i2 = l2.length, r2 = 0; r2 < i2; r2 += 1) l2[r2].n ? o2 += 1 : (a2 = this.textSpans[r2], n2 = this.textPaths[r2], s2 = h2[o2], o2 += 1, s2._mdf.m && (this.isMasked ? a2.setAttribute("transform", s2.m) : (a2.style.webkitTransform = s2.m, a2.style.transform = s2.m)), a2.style.opacity = s2.o, s2.sw && s2._mdf.sw && n2.setAttribute("stroke-width", s2.sw), s2.sc && s2._mdf.sc && n2.setAttribute("stroke", s2.sc), s2.fc && s2._mdf.fc && (n2.setAttribute("fill", s2.fc), n2.style.color = s2.fc)); + if (this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)) { + var p2 = this.innerElem.getBBox(); + if (this.currentBBox.w !== p2.width && (this.currentBBox.w = p2.width, this.svgElement.setAttribute("width", p2.width)), this.currentBBox.h !== p2.height && (this.currentBBox.h = p2.height, this.svgElement.setAttribute("height", p2.height)), this.currentBBox.w !== p2.width + 2 || this.currentBBox.h !== p2.height + 2 || this.currentBBox.x !== p2.x - 1 || this.currentBBox.y !== p2.y - 1) { + this.currentBBox.w = p2.width + 2, this.currentBBox.h = p2.height + 2, this.currentBBox.x = p2.x - 1, this.currentBBox.y = p2.y - 1, this.svgElement.setAttribute("viewBox", this.currentBBox.x + " " + this.currentBBox.y + " " + this.currentBBox.w + " " + this.currentBBox.h), t2 = this.svgElement.style; + var c2 = "translate(" + this.currentBBox.x + "px," + this.currentBBox.y + "px)"; + t2.transform = c2, t2.webkitTransform = c2; + } + } + } + }, extendPrototype([BaseElement, FrameElement, HierarchyElement], HCameraElement), HCameraElement.prototype.setup = function() { + var t2, e2, r2, i2, s2 = this.comp.threeDElements.length; + for (t2 = 0; t2 < s2; t2 += 1) if ("3d" === (e2 = this.comp.threeDElements[t2]).type) { + r2 = e2.perspectiveElem.style, i2 = e2.container.style; + var a2 = this.pe.v + "px", n2 = "0px 0px 0px", o2 = "matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)"; + r2.perspective = a2, r2.webkitPerspective = a2, i2.transformOrigin = n2, i2.mozTransformOrigin = n2, i2.webkitTransformOrigin = n2, r2.transform = o2, r2.webkitTransform = o2; + } + }, HCameraElement.prototype.createElements = function() { + }, HCameraElement.prototype.hide = function() { + }, HCameraElement.prototype.renderFrame = function() { + var t2, e2, r2 = this._isFirstFrame; + if (this.hierarchy) for (e2 = this.hierarchy.length, t2 = 0; t2 < e2; t2 += 1) r2 = this.hierarchy[t2].finalTransform.mProp._mdf || r2; + if (r2 || this.pe._mdf || this.p && this.p._mdf || this.px && (this.px._mdf || this.py._mdf || this.pz._mdf) || this.rx._mdf || this.ry._mdf || this.rz._mdf || this.or._mdf || this.a && this.a._mdf) { + if (this.mat.reset(), this.hierarchy) for (t2 = e2 = this.hierarchy.length - 1; t2 >= 0; t2 -= 1) { + var i2 = this.hierarchy[t2].finalTransform.mProp; + this.mat.translate(-i2.p.v[0], -i2.p.v[1], i2.p.v[2]), this.mat.rotateX(-i2.or.v[0]).rotateY(-i2.or.v[1]).rotateZ(i2.or.v[2]), this.mat.rotateX(-i2.rx.v).rotateY(-i2.ry.v).rotateZ(i2.rz.v), this.mat.scale(1 / i2.s.v[0], 1 / i2.s.v[1], 1 / i2.s.v[2]), this.mat.translate(i2.a.v[0], i2.a.v[1], i2.a.v[2]); + } + if (this.p ? this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2]) : this.mat.translate(-this.px.v, -this.py.v, this.pz.v), this.a) { + var s2; + s2 = this.p ? [this.p.v[0] - this.a.v[0], this.p.v[1] - this.a.v[1], this.p.v[2] - this.a.v[2]] : [this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2]]; + var a2 = Math.sqrt(Math.pow(s2[0], 2) + Math.pow(s2[1], 2) + Math.pow(s2[2], 2)), n2 = [s2[0] / a2, s2[1] / a2, s2[2] / a2], o2 = Math.sqrt(n2[2] * n2[2] + n2[0] * n2[0]), h2 = Math.atan2(n2[1], o2), l2 = Math.atan2(n2[0], -n2[2]); + this.mat.rotateY(l2).rotateX(-h2); + } + this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v), this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]), this.mat.translate(this.globalData.compSize.w / 2, this.globalData.compSize.h / 2, 0), this.mat.translate(0, 0, this.pe.v); + var p2 = !this._prevMat.equals(this.mat); + if ((p2 || this.pe._mdf) && this.comp.threeDElements) { + var c2, f2, u2; + for (e2 = this.comp.threeDElements.length, t2 = 0; t2 < e2; t2 += 1) if ("3d" === (c2 = this.comp.threeDElements[t2]).type) { + if (p2) { + var d2 = this.mat.toCSS(); + (u2 = c2.container.style).transform = d2, u2.webkitTransform = d2; + } + this.pe._mdf && ((f2 = c2.perspectiveElem.style).perspective = this.pe.v + "px", f2.webkitPerspective = this.pe.v + "px"); + } + this.mat.clone(this._prevMat); + } + } + this._isFirstFrame = false; + }, HCameraElement.prototype.prepareFrame = function(t2) { + this.prepareProperties(t2, true); + }, HCameraElement.prototype.destroy = function() { + }, HCameraElement.prototype.getBaseElement = function() { + return null; + }, extendPrototype([BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement, FrameElement, RenderableElement], HImageElement), HImageElement.prototype.createContent = function() { + var t2 = this.globalData.getAssetsPath(this.assetData), e2 = new Image(); + this.data.hasMask ? (this.imageElem = createNS("image"), this.imageElem.setAttribute("width", this.assetData.w + "px"), this.imageElem.setAttribute("height", this.assetData.h + "px"), this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink", "href", t2), this.layerElement.appendChild(this.imageElem), this.baseElement.setAttribute("width", this.assetData.w), this.baseElement.setAttribute("height", this.assetData.h)) : this.layerElement.appendChild(e2), e2.crossOrigin = "anonymous", e2.src = t2, this.data.ln && this.baseElement.setAttribute("id", this.data.ln); + }, extendPrototype([BaseRenderer], HybridRendererBase), HybridRendererBase.prototype.buildItem = SVGRenderer.prototype.buildItem, HybridRendererBase.prototype.checkPendingElements = function() { + for (; this.pendingElements.length; ) this.pendingElements.pop().checkParenting(); + }, HybridRendererBase.prototype.appendElementInPos = function(t2, e2) { + var r2 = t2.getBaseElement(); + if (r2) { + var i2 = this.layers[e2]; + if (i2.ddd && this.supports3d) this.addTo3dContainer(r2, e2); + else if (this.threeDElements) this.addTo3dContainer(r2, e2); + else { + for (var s2, a2, n2 = 0; n2 < e2; ) this.elements[n2] && true !== this.elements[n2] && this.elements[n2].getBaseElement && (a2 = this.elements[n2], s2 = (this.layers[n2].ddd ? this.getThreeDContainerByPos(n2) : a2.getBaseElement()) || s2), n2 += 1; + s2 ? i2.ddd && this.supports3d || this.layerElement.insertBefore(r2, s2) : i2.ddd && this.supports3d || this.layerElement.appendChild(r2); + } + } + }, HybridRendererBase.prototype.createShape = function(t2) { + return this.supports3d ? new HShapeElement(t2, this.globalData, this) : new SVGShapeElement(t2, this.globalData, this); + }, HybridRendererBase.prototype.createText = function(t2) { + return this.supports3d ? new HTextElement(t2, this.globalData, this) : new SVGTextLottieElement(t2, this.globalData, this); + }, HybridRendererBase.prototype.createCamera = function(t2) { + return this.camera = new HCameraElement(t2, this.globalData, this), this.camera; + }, HybridRendererBase.prototype.createImage = function(t2) { + return this.supports3d ? new HImageElement(t2, this.globalData, this) : new IImageElement(t2, this.globalData, this); + }, HybridRendererBase.prototype.createSolid = function(t2) { + return this.supports3d ? new HSolidElement(t2, this.globalData, this) : new ISolidElement(t2, this.globalData, this); + }, HybridRendererBase.prototype.createNull = SVGRenderer.prototype.createNull, HybridRendererBase.prototype.getThreeDContainerByPos = function(t2) { + for (var e2 = 0, r2 = this.threeDElements.length; e2 < r2; ) { + if (this.threeDElements[e2].startPos <= t2 && this.threeDElements[e2].endPos >= t2) return this.threeDElements[e2].perspectiveElem; + e2 += 1; + } + return null; + }, HybridRendererBase.prototype.createThreeDContainer = function(t2, e2) { + var r2, i2, s2 = createTag("div"); + styleDiv(s2); + var a2 = createTag("div"); + if (styleDiv(a2), "3d" === e2) { + (r2 = s2.style).width = this.globalData.compSize.w + "px", r2.height = this.globalData.compSize.h + "px"; + var n2 = "50% 50%"; + r2.webkitTransformOrigin = n2, r2.mozTransformOrigin = n2, r2.transformOrigin = n2; + var o2 = "matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)"; + (i2 = a2.style).transform = o2, i2.webkitTransform = o2; + } + s2.appendChild(a2); + var h2 = { container: a2, perspectiveElem: s2, startPos: t2, endPos: t2, type: e2 }; + return this.threeDElements.push(h2), h2; + }, HybridRendererBase.prototype.build3dContainers = function() { + var t2, e2, r2 = this.layers.length, i2 = ""; + for (t2 = 0; t2 < r2; t2 += 1) this.layers[t2].ddd && 3 !== this.layers[t2].ty ? ("3d" !== i2 && (i2 = "3d", e2 = this.createThreeDContainer(t2, "3d")), e2.endPos = Math.max(e2.endPos, t2)) : ("2d" !== i2 && (i2 = "2d", e2 = this.createThreeDContainer(t2, "2d")), e2.endPos = Math.max(e2.endPos, t2)); + for (t2 = (r2 = this.threeDElements.length) - 1; t2 >= 0; t2 -= 1) this.resizerElem.appendChild(this.threeDElements[t2].perspectiveElem); + }, HybridRendererBase.prototype.addTo3dContainer = function(t2, e2) { + for (var r2 = 0, i2 = this.threeDElements.length; r2 < i2; ) { + if (e2 <= this.threeDElements[r2].endPos) { + for (var s2, a2 = this.threeDElements[r2].startPos; a2 < e2; ) this.elements[a2] && this.elements[a2].getBaseElement && (s2 = this.elements[a2].getBaseElement()), a2 += 1; + s2 ? this.threeDElements[r2].container.insertBefore(t2, s2) : this.threeDElements[r2].container.appendChild(t2); + break; + } + r2 += 1; + } + }, HybridRendererBase.prototype.configAnimation = function(t2) { + var e2 = createTag("div"), r2 = this.animationItem.wrapper, i2 = e2.style; + i2.width = t2.w + "px", i2.height = t2.h + "px", this.resizerElem = e2, styleDiv(e2), i2.transformStyle = "flat", i2.mozTransformStyle = "flat", i2.webkitTransformStyle = "flat", this.renderConfig.className && e2.setAttribute("class", this.renderConfig.className), r2.appendChild(e2), i2.overflow = "hidden"; + var s2 = createNS("svg"); + s2.setAttribute("width", "1"), s2.setAttribute("height", "1"), styleDiv(s2), this.resizerElem.appendChild(s2); + var a2 = createNS("defs"); + s2.appendChild(a2), this.data = t2, this.setupGlobalData(t2, s2), this.globalData.defs = a2, this.layers = t2.layers, this.layerElement = this.resizerElem, this.build3dContainers(), this.updateContainerSize(); + }, HybridRendererBase.prototype.destroy = function() { + var t2; + this.animationItem.wrapper && (this.animationItem.wrapper.innerText = ""), this.animationItem.container = null, this.globalData.defs = null; + var e2 = this.layers ? this.layers.length : 0; + for (t2 = 0; t2 < e2; t2 += 1) this.elements[t2] && this.elements[t2].destroy && this.elements[t2].destroy(); + this.elements.length = 0, this.destroyed = true, this.animationItem = null; + }, HybridRendererBase.prototype.updateContainerSize = function() { + var t2, e2, r2, i2, s2 = this.animationItem.wrapper.offsetWidth, a2 = this.animationItem.wrapper.offsetHeight, n2 = s2 / a2; + this.globalData.compSize.w / this.globalData.compSize.h > n2 ? (t2 = s2 / this.globalData.compSize.w, e2 = s2 / this.globalData.compSize.w, r2 = 0, i2 = (a2 - this.globalData.compSize.h * (s2 / this.globalData.compSize.w)) / 2) : (t2 = a2 / this.globalData.compSize.h, e2 = a2 / this.globalData.compSize.h, r2 = (s2 - this.globalData.compSize.w * (a2 / this.globalData.compSize.h)) / 2, i2 = 0); + var o2 = this.resizerElem.style; + o2.webkitTransform = "matrix3d(" + t2 + ",0,0,0,0," + e2 + ",0,0,0,0,1,0," + r2 + "," + i2 + ",0,1)", o2.transform = o2.webkitTransform; + }, HybridRendererBase.prototype.renderFrame = SVGRenderer.prototype.renderFrame, HybridRendererBase.prototype.hide = function() { + this.resizerElem.style.display = "none"; + }, HybridRendererBase.prototype.show = function() { + this.resizerElem.style.display = "block"; + }, HybridRendererBase.prototype.initItems = function() { + if (this.buildAllItems(), this.camera) this.camera.setup(); + else { + var t2, e2 = this.globalData.compSize.w, r2 = this.globalData.compSize.h, i2 = this.threeDElements.length; + for (t2 = 0; t2 < i2; t2 += 1) { + var s2 = this.threeDElements[t2].perspectiveElem.style; + s2.webkitPerspective = Math.sqrt(Math.pow(e2, 2) + Math.pow(r2, 2)) + "px", s2.perspective = s2.webkitPerspective; + } + } + }, HybridRendererBase.prototype.searchExtraCompositions = function(t2) { + var e2, r2 = t2.length, i2 = createTag("div"); + for (e2 = 0; e2 < r2; e2 += 1) if (t2[e2].xt) { + var s2 = this.createComp(t2[e2], i2, this.globalData.comp, null); + s2.initExpressions(), this.globalData.projectInterface.registerComposition(s2); + } + }, extendPrototype([HybridRendererBase, ICompElement, HBaseElement], HCompElement), HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements, HCompElement.prototype.createContainerElements = function() { + this._createBaseContainerElements(), this.data.hasMask ? (this.svgElement.setAttribute("width", this.data.w), this.svgElement.setAttribute("height", this.data.h), this.transformedElement = this.baseElement) : this.transformedElement = this.layerElement; + }, HCompElement.prototype.addTo3dContainer = function(t2, e2) { + for (var r2, i2 = 0; i2 < e2; ) this.elements[i2] && this.elements[i2].getBaseElement && (r2 = this.elements[i2].getBaseElement()), i2 += 1; + r2 ? this.layerElement.insertBefore(t2, r2) : this.layerElement.appendChild(t2); + }, HCompElement.prototype.createComp = function(t2) { + return this.supports3d ? new HCompElement(t2, this.globalData, this) : new SVGCompElement(t2, this.globalData, this); + }, extendPrototype([HybridRendererBase], HybridRenderer), HybridRenderer.prototype.createComp = function(t2) { + return this.supports3d ? new HCompElement(t2, this.globalData, this) : new SVGCompElement(t2, this.globalData, this); + }; + var CompExpressionInterface = function(t2) { + function e2(e3) { + for (var r2 = 0, i2 = t2.layers.length; r2 < i2; ) { + if (t2.layers[r2].nm === e3 || t2.layers[r2].ind === e3) return t2.elements[r2].layerInterface; + r2 += 1; + } + return null; + } + return Object.defineProperty(e2, "_name", { value: t2.data.nm }), e2.layer = e2, e2.pixelAspect = 1, e2.height = t2.data.h || t2.globalData.compSize.h, e2.width = t2.data.w || t2.globalData.compSize.w, e2.pixelAspect = 1, e2.frameDuration = 1 / t2.globalData.frameRate, e2.displayStartTime = 0, e2.numLayers = t2.layers.length, e2; + }; + function _typeof$2(t2) { + return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t3) { + return typeof t3; + } : function(t3) { + return t3 && "function" == typeof Symbol && t3.constructor === Symbol && t3 !== Symbol.prototype ? "symbol" : typeof t3; + }, _typeof$2(t2); + } + function seedRandom(t2, e2) { + var r2 = this, i2 = 256, s2 = e2.pow(i2, 6), a2 = e2.pow(2, 52), n2 = 2 * a2, o2 = 255; + function h2(t3) { + var e3, r3 = t3.length, s3 = this, a3 = 0, n3 = s3.i = s3.j = 0, h3 = s3.S = []; + for (r3 || (t3 = [r3++]); a3 < i2; ) h3[a3] = a3++; + for (a3 = 0; a3 < i2; a3++) h3[a3] = h3[n3 = o2 & n3 + t3[a3 % r3] + (e3 = h3[a3])], h3[n3] = e3; + s3.g = function(t4) { + for (var e4, r4 = 0, a4 = s3.i, n4 = s3.j, h4 = s3.S; t4--; ) e4 = h4[a4 = o2 & a4 + 1], r4 = r4 * i2 + h4[o2 & (h4[a4] = h4[n4 = o2 & n4 + e4]) + (h4[n4] = e4)]; + return s3.i = a4, s3.j = n4, r4; + }; + } + function l2(t3, e3) { + return e3.i = t3.i, e3.j = t3.j, e3.S = t3.S.slice(), e3; + } + function p2(t3, e3) { + var r3, i3 = [], s3 = _typeof$2(t3); + if (e3 && "object" == s3) for (r3 in t3) try { + i3.push(p2(t3[r3], e3 - 1)); + } catch (t4) { + } + return i3.length ? i3 : "string" == s3 ? t3 : t3 + "\0"; + } + function c2(t3, e3) { + for (var r3, i3 = t3 + "", s3 = 0; s3 < i3.length; ) e3[o2 & s3] = o2 & (r3 ^= 19 * e3[o2 & s3]) + i3.charCodeAt(s3++); + return f2(e3); + } + function f2(t3) { + return String.fromCharCode.apply(0, t3); + } + e2.seedrandom = function(o3, u2, d2) { + var m2 = [], y2 = c2(p2((u2 = true === u2 ? { entropy: true } : u2 || {}).entropy ? [o3, f2(t2)] : null === o3 ? function() { + try { + var e3 = new Uint8Array(i2); + return (r2.crypto || r2.msCrypto).getRandomValues(e3), f2(e3); + } catch (e4) { + var s3 = r2.navigator, a3 = s3 && s3.plugins; + return [+/* @__PURE__ */ new Date(), r2, a3, r2.screen, f2(t2)]; + } + }() : o3, 3), m2), g2 = new h2(m2), v2 = function() { + for (var t3 = g2.g(6), e3 = s2, r3 = 0; t3 < a2; ) t3 = (t3 + r3) * i2, e3 *= i2, r3 = g2.g(1); + for (; t3 >= n2; ) t3 /= 2, e3 /= 2, r3 >>>= 1; + return (t3 + r3) / e3; + }; + return v2.int32 = function() { + return 0 | g2.g(4); + }, v2.quick = function() { + return g2.g(4) / 4294967296; + }, v2.double = v2, c2(f2(g2.S), t2), (u2.pass || d2 || function(t3, r3, i3, s3) { + return s3 && (s3.S && l2(s3, g2), t3.state = function() { + return l2(g2, {}); + }), i3 ? (e2.random = t3, r3) : t3; + })(v2, y2, "global" in u2 ? u2.global : this == e2, u2.state); + }, c2(e2.random(), t2); + } + function initialize$2(t2) { + seedRandom([], t2); + } + var propTypes = { SHAPE: "shape" }; + function _typeof$1(t2) { + return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t3) { + return typeof t3; + } : function(t3) { + return t3 && "function" == typeof Symbol && t3.constructor === Symbol && t3 !== Symbol.prototype ? "symbol" : typeof t3; + }, _typeof$1(t2); + } + var ExpressionManager = function() { + var ob = {}, Math = BMMath, window = null, document = null, XMLHttpRequest = null, fetch = null, frames = null, _lottieGlobal = {}; + function resetFrame() { + _lottieGlobal = {}; + } + function $bm_isInstanceOfArray(t2) { + return t2.constructor === Array || t2.constructor === Float32Array; + } + function isNumerable(t2, e2) { + return "number" === t2 || e2 instanceof Number || "boolean" === t2 || "string" === t2; + } + function $bm_neg(t2) { + var e2 = _typeof$1(t2); + if ("number" === e2 || t2 instanceof Number || "boolean" === e2) return -t2; + if ($bm_isInstanceOfArray(t2)) { + var r2, i2 = t2.length, s2 = []; + for (r2 = 0; r2 < i2; r2 += 1) s2[r2] = -t2[r2]; + return s2; + } + return t2.propType ? t2.v : -t2; + } + initialize$2(BMMath); + var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, "easeIn").get, easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, "easeOut").get, easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, "easeInOut").get; + function sum(t2, e2) { + var r2 = _typeof$1(t2), i2 = _typeof$1(e2); + if (isNumerable(r2, t2) && isNumerable(i2, e2) || "string" === r2 || "string" === i2) return t2 + e2; + if ($bm_isInstanceOfArray(t2) && isNumerable(i2, e2)) return (t2 = t2.slice(0))[0] += e2, t2; + if (isNumerable(r2, t2) && $bm_isInstanceOfArray(e2)) return (e2 = e2.slice(0))[0] = t2 + e2[0], e2; + if ($bm_isInstanceOfArray(t2) && $bm_isInstanceOfArray(e2)) { + for (var s2 = 0, a2 = t2.length, n2 = e2.length, o2 = []; s2 < a2 || s2 < n2; ) ("number" == typeof t2[s2] || t2[s2] instanceof Number) && ("number" == typeof e2[s2] || e2[s2] instanceof Number) ? o2[s2] = t2[s2] + e2[s2] : o2[s2] = void 0 === e2[s2] ? t2[s2] : t2[s2] || e2[s2], s2 += 1; + return o2; + } + return 0; + } + var add = sum; + function sub(t2, e2) { + var r2 = _typeof$1(t2), i2 = _typeof$1(e2); + if (isNumerable(r2, t2) && isNumerable(i2, e2)) return "string" === r2 && (t2 = parseInt(t2, 10)), "string" === i2 && (e2 = parseInt(e2, 10)), t2 - e2; + if ($bm_isInstanceOfArray(t2) && isNumerable(i2, e2)) return (t2 = t2.slice(0))[0] -= e2, t2; + if (isNumerable(r2, t2) && $bm_isInstanceOfArray(e2)) return (e2 = e2.slice(0))[0] = t2 - e2[0], e2; + if ($bm_isInstanceOfArray(t2) && $bm_isInstanceOfArray(e2)) { + for (var s2 = 0, a2 = t2.length, n2 = e2.length, o2 = []; s2 < a2 || s2 < n2; ) ("number" == typeof t2[s2] || t2[s2] instanceof Number) && ("number" == typeof e2[s2] || e2[s2] instanceof Number) ? o2[s2] = t2[s2] - e2[s2] : o2[s2] = void 0 === e2[s2] ? t2[s2] : t2[s2] || e2[s2], s2 += 1; + return o2; + } + return 0; + } + function mul(t2, e2) { + var r2, i2, s2, a2 = _typeof$1(t2), n2 = _typeof$1(e2); + if (isNumerable(a2, t2) && isNumerable(n2, e2)) return t2 * e2; + if ($bm_isInstanceOfArray(t2) && isNumerable(n2, e2)) { + for (s2 = t2.length, r2 = createTypedArray("float32", s2), i2 = 0; i2 < s2; i2 += 1) r2[i2] = t2[i2] * e2; + return r2; + } + if (isNumerable(a2, t2) && $bm_isInstanceOfArray(e2)) { + for (s2 = e2.length, r2 = createTypedArray("float32", s2), i2 = 0; i2 < s2; i2 += 1) r2[i2] = t2 * e2[i2]; + return r2; + } + return 0; + } + function div(t2, e2) { + var r2, i2, s2, a2 = _typeof$1(t2), n2 = _typeof$1(e2); + if (isNumerable(a2, t2) && isNumerable(n2, e2)) return t2 / e2; + if ($bm_isInstanceOfArray(t2) && isNumerable(n2, e2)) { + for (s2 = t2.length, r2 = createTypedArray("float32", s2), i2 = 0; i2 < s2; i2 += 1) r2[i2] = t2[i2] / e2; + return r2; + } + if (isNumerable(a2, t2) && $bm_isInstanceOfArray(e2)) { + for (s2 = e2.length, r2 = createTypedArray("float32", s2), i2 = 0; i2 < s2; i2 += 1) r2[i2] = t2 / e2[i2]; + return r2; + } + return 0; + } + function mod(t2, e2) { + return "string" == typeof t2 && (t2 = parseInt(t2, 10)), "string" == typeof e2 && (e2 = parseInt(e2, 10)), t2 % e2; + } + var $bm_sum = sum, $bm_sub = sub, $bm_mul = mul, $bm_div = div, $bm_mod = mod; + function clamp(t2, e2, r2) { + if (e2 > r2) { + var i2 = r2; + r2 = e2, e2 = i2; + } + return Math.min(Math.max(t2, e2), r2); + } + function radiansToDegrees(t2) { + return t2 / degToRads; + } + var radians_to_degrees = radiansToDegrees; + function degreesToRadians(t2) { + return t2 * degToRads; + } + var degrees_to_radians = radiansToDegrees, helperLengthArray = [0, 0, 0, 0, 0, 0]; + function length(t2, e2) { + if ("number" == typeof t2 || t2 instanceof Number) return e2 = e2 || 0, Math.abs(t2 - e2); + var r2; + e2 || (e2 = helperLengthArray); + var i2 = Math.min(t2.length, e2.length), s2 = 0; + for (r2 = 0; r2 < i2; r2 += 1) s2 += Math.pow(e2[r2] - t2[r2], 2); + return Math.sqrt(s2); + } + function normalize(t2) { + return div(t2, length(t2)); + } + function rgbToHsl(t2) { + var e2, r2, i2 = t2[0], s2 = t2[1], a2 = t2[2], n2 = Math.max(i2, s2, a2), o2 = Math.min(i2, s2, a2), h2 = (n2 + o2) / 2; + if (n2 === o2) e2 = 0, r2 = 0; + else { + var l2 = n2 - o2; + switch (r2 = h2 > 0.5 ? l2 / (2 - n2 - o2) : l2 / (n2 + o2), n2) { + case i2: + e2 = (s2 - a2) / l2 + (s2 < a2 ? 6 : 0); + break; + case s2: + e2 = (a2 - i2) / l2 + 2; + break; + case a2: + e2 = (i2 - s2) / l2 + 4; + } + e2 /= 6; + } + return [e2, r2, h2, t2[3]]; + } + function hue2rgb(t2, e2, r2) { + return r2 < 0 && (r2 += 1), r2 > 1 && (r2 -= 1), r2 < 1 / 6 ? t2 + 6 * (e2 - t2) * r2 : r2 < 0.5 ? e2 : r2 < 2 / 3 ? t2 + (e2 - t2) * (2 / 3 - r2) * 6 : t2; + } + function hslToRgb(t2) { + var e2, r2, i2, s2 = t2[0], a2 = t2[1], n2 = t2[2]; + if (0 === a2) e2 = n2, i2 = n2, r2 = n2; + else { + var o2 = n2 < 0.5 ? n2 * (1 + a2) : n2 + a2 - n2 * a2, h2 = 2 * n2 - o2; + e2 = hue2rgb(h2, o2, s2 + 1 / 3), r2 = hue2rgb(h2, o2, s2), i2 = hue2rgb(h2, o2, s2 - 1 / 3); + } + return [e2, r2, i2, t2[3]]; + } + function linear(t2, e2, r2, i2, s2) { + if (void 0 !== i2 && void 0 !== s2 || (i2 = e2, s2 = r2, e2 = 0, r2 = 1), r2 < e2) { + var a2 = r2; + r2 = e2, e2 = a2; + } + if (t2 <= e2) return i2; + if (t2 >= r2) return s2; + var n2, o2 = r2 === e2 ? 0 : (t2 - e2) / (r2 - e2); + if (!i2.length) return i2 + (s2 - i2) * o2; + var h2 = i2.length, l2 = createTypedArray("float32", h2); + for (n2 = 0; n2 < h2; n2 += 1) l2[n2] = i2[n2] + (s2[n2] - i2[n2]) * o2; + return l2; + } + function random(t2, e2) { + if (void 0 === e2 && (void 0 === t2 ? (t2 = 0, e2 = 1) : (e2 = t2, t2 = void 0)), e2.length) { + var r2, i2 = e2.length; + t2 || (t2 = createTypedArray("float32", i2)); + var s2 = createTypedArray("float32", i2), a2 = BMMath.random(); + for (r2 = 0; r2 < i2; r2 += 1) s2[r2] = t2[r2] + a2 * (e2[r2] - t2[r2]); + return s2; + } + return void 0 === t2 && (t2 = 0), t2 + BMMath.random() * (e2 - t2); + } + function createPath(t2, e2, r2, i2) { + var s2, a2 = t2.length, n2 = shapePool.newElement(); + n2.setPathData(!!i2, a2); + var o2, h2, l2 = [0, 0]; + for (s2 = 0; s2 < a2; s2 += 1) o2 = e2 && e2[s2] ? e2[s2] : l2, h2 = r2 && r2[s2] ? r2[s2] : l2, n2.setTripleAt(t2[s2][0], t2[s2][1], h2[0] + t2[s2][0], h2[1] + t2[s2][1], o2[0] + t2[s2][0], o2[1] + t2[s2][1], s2, true); + return n2; + } + function initiateExpression(elem, data, property) { + function noOp(t2) { + return t2; + } + if (!elem.globalData.renderConfig.runExpressions) return noOp; + var val = data.x, needsVelocity = /velocity(?![\w\d])/.test(val), _needsRandom = -1 !== val.indexOf("random"), elemType = elem.data.ty, transform, $bm_transform, content, effect, thisProperty = property; + thisProperty.valueAtTime = thisProperty.getValueAtTime, Object.defineProperty(thisProperty, "value", { get: function() { + return thisProperty.v; + } }), elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate, elem.comp.displayStartTime = 0; + var inPoint = elem.data.ip / elem.comp.globalData.frameRate, outPoint = elem.data.op / elem.comp.globalData.frameRate, width = elem.data.sw ? elem.data.sw : 0, height = elem.data.sh ? elem.data.sh : 0, name = elem.data.nm, loopIn, loop_in, loopOut, loop_out, smooth, toWorld, fromWorld, fromComp, toComp, fromCompToSurface, position, rotation, anchorPoint, scale, thisLayer, thisComp, mask, valueAtTime, velocityAtTime, scoped_bm_rt, expression_function = eval("[function _expression_function(){" + val + ";scoped_bm_rt=$bm_rt}]")[0], numKeys = property.kf ? data.k.length : 0, active = !this.data || true !== this.data.hd, wiggle = (function(t2, e2) { + var r2, i2, s2 = this.pv.length ? this.pv.length : 1, a2 = createTypedArray("float32", s2), n2 = Math.floor(5 * time); + for (r2 = 0, i2 = 0; r2 < n2; ) { + for (i2 = 0; i2 < s2; i2 += 1) a2[i2] += -e2 + 2 * e2 * BMMath.random(); + r2 += 1; + } + var o2 = 5 * time, h2 = o2 - Math.floor(o2), l2 = createTypedArray("float32", s2); + if (s2 > 1) { + for (i2 = 0; i2 < s2; i2 += 1) l2[i2] = this.pv[i2] + a2[i2] + (-e2 + 2 * e2 * BMMath.random()) * h2; + return l2; + } + return this.pv + a2[0] + (-e2 + 2 * e2 * BMMath.random()) * h2; + }).bind(this); + function loopInDuration(t2, e2) { + return loopIn(t2, e2, true); + } + function loopOutDuration(t2, e2) { + return loopOut(t2, e2, true); + } + thisProperty.loopIn && (loopIn = thisProperty.loopIn.bind(thisProperty), loop_in = loopIn), thisProperty.loopOut && (loopOut = thisProperty.loopOut.bind(thisProperty), loop_out = loopOut), thisProperty.smooth && (smooth = thisProperty.smooth.bind(thisProperty)), this.getValueAtTime && (valueAtTime = this.getValueAtTime.bind(this)), this.getVelocityAtTime && (velocityAtTime = this.getVelocityAtTime.bind(this)); + var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface), time, velocity, value, text, textIndex, textTotal, selectorValue; + function lookAt(t2, e2) { + var r2 = [e2[0] - t2[0], e2[1] - t2[1], e2[2] - t2[2]], i2 = Math.atan2(r2[0], Math.sqrt(r2[1] * r2[1] + r2[2] * r2[2])) / degToRads; + return [-Math.atan2(r2[1], r2[2]) / degToRads, i2, 0]; + } + function easeOut(t2, e2, r2, i2, s2) { + return applyEase(easeOutBez, t2, e2, r2, i2, s2); + } + function easeIn(t2, e2, r2, i2, s2) { + return applyEase(easeInBez, t2, e2, r2, i2, s2); + } + function ease(t2, e2, r2, i2, s2) { + return applyEase(easeInOutBez, t2, e2, r2, i2, s2); + } + function applyEase(t2, e2, r2, i2, s2, a2) { + void 0 === s2 ? (s2 = r2, a2 = i2) : e2 = (e2 - r2) / (i2 - r2), e2 > 1 ? e2 = 1 : e2 < 0 && (e2 = 0); + var n2 = t2(e2); + if ($bm_isInstanceOfArray(s2)) { + var o2, h2 = s2.length, l2 = createTypedArray("float32", h2); + for (o2 = 0; o2 < h2; o2 += 1) l2[o2] = (a2[o2] - s2[o2]) * n2 + s2[o2]; + return l2; + } + return (a2 - s2) * n2 + s2; + } + function nearestKey(t2) { + var e2, r2, i2, s2 = data.k.length; + if (data.k.length && "number" != typeof data.k[0]) if (r2 = -1, (t2 *= elem.comp.globalData.frameRate) < data.k[0].t) r2 = 1, i2 = data.k[0].t; + else { + for (e2 = 0; e2 < s2 - 1; e2 += 1) { + if (t2 === data.k[e2].t) { + r2 = e2 + 1, i2 = data.k[e2].t; + break; + } + if (t2 > data.k[e2].t && t2 < data.k[e2 + 1].t) { + t2 - data.k[e2].t > data.k[e2 + 1].t - t2 ? (r2 = e2 + 2, i2 = data.k[e2 + 1].t) : (r2 = e2 + 1, i2 = data.k[e2].t); + break; + } + } + -1 === r2 && (r2 = e2 + 1, i2 = data.k[e2].t); + } + else r2 = 0, i2 = 0; + var a2 = {}; + return a2.index = r2, a2.time = i2 / elem.comp.globalData.frameRate, a2; + } + function key(t2) { + var e2, r2, i2; + if (!data.k.length || "number" == typeof data.k[0]) throw new Error("The property has no keyframe at index " + t2); + t2 -= 1, e2 = { time: data.k[t2].t / elem.comp.globalData.frameRate, value: [] }; + var s2 = Object.prototype.hasOwnProperty.call(data.k[t2], "s") ? data.k[t2].s : data.k[t2 - 1].e; + for (i2 = s2.length, r2 = 0; r2 < i2; r2 += 1) e2[r2] = s2[r2], e2.value[r2] = s2[r2]; + return e2; + } + function framesToTime(t2, e2) { + return e2 || (e2 = elem.comp.globalData.frameRate), t2 / e2; + } + function timeToFrames(t2, e2) { + return t2 || 0 === t2 || (t2 = time), e2 || (e2 = elem.comp.globalData.frameRate), t2 * e2; + } + function seedRandom(t2) { + BMMath.seedrandom(randSeed + t2); + } + function sourceRectAtTime() { + return elem.sourceRectAtTime(); + } + function substring(t2, e2) { + return "string" == typeof value ? void 0 === e2 ? value.substring(t2) : value.substring(t2, e2) : ""; + } + function substr(t2, e2) { + return "string" == typeof value ? void 0 === e2 ? value.substr(t2) : value.substr(t2, e2) : ""; + } + function posterizeTime(t2) { + time = 0 === t2 ? 0 : Math.floor(time * t2) / t2, value = valueAtTime(time); + } + var index = elem.data.ind, hasParent = !(!elem.hierarchy || !elem.hierarchy.length), parent, randSeed = Math.floor(1e6 * Math.random()), globalData = elem.globalData; + function executeExpression(t2) { + return value = t2, this.frameExpressionId === elem.globalData.frameId && "textSelector" !== this.propType ? value : ("textSelector" === this.propType && (textIndex = this.textIndex, textTotal = this.textTotal, selectorValue = this.selectorValue), thisLayer || (text = elem.layerInterface.text, thisLayer = elem.layerInterface, thisComp = elem.comp.compInterface, toWorld = thisLayer.toWorld.bind(thisLayer), fromWorld = thisLayer.fromWorld.bind(thisLayer), fromComp = thisLayer.fromComp.bind(thisLayer), toComp = thisLayer.toComp.bind(thisLayer), mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null, fromCompToSurface = fromComp), transform || (transform = elem.layerInterface("ADBE Transform Group"), $bm_transform = transform, transform && (anchorPoint = transform.anchorPoint)), 4 !== elemType || content || (content = thisLayer("ADBE Root Vectors Group")), effect || (effect = thisLayer(4)), (hasParent = !(!elem.hierarchy || !elem.hierarchy.length)) && !parent && (parent = elem.hierarchy[0].layerInterface), time = this.comp.renderedFrame / this.comp.globalData.frameRate, _needsRandom && seedRandom(randSeed + time), needsVelocity && (velocity = velocityAtTime(time)), expression_function(), this.frameExpressionId = elem.globalData.frameId, scoped_bm_rt = scoped_bm_rt.propType === propTypes.SHAPE ? scoped_bm_rt.v : scoped_bm_rt); + } + return executeExpression.__preventDeadCodeRemoval = [$bm_transform, anchorPoint, time, velocity, inPoint, outPoint, width, height, name, loop_in, loop_out, smooth, toComp, fromCompToSurface, toWorld, fromWorld, mask, position, rotation, scale, thisComp, numKeys, active, wiggle, loopInDuration, loopOutDuration, comp, lookAt, easeOut, easeIn, ease, nearestKey, key, text, textIndex, textTotal, selectorValue, framesToTime, timeToFrames, sourceRectAtTime, substring, substr, posterizeTime, index, globalData], executeExpression; + } + return ob.initiateExpression = initiateExpression, ob.__preventDeadCodeRemoval = [window, document, XMLHttpRequest, fetch, frames, $bm_neg, add, $bm_sum, $bm_sub, $bm_mul, $bm_div, $bm_mod, clamp, radians_to_degrees, degreesToRadians, degrees_to_radians, normalize, rgbToHsl, hslToRgb, linear, random, createPath, _lottieGlobal], ob.resetFrame = resetFrame, ob; + }(), Expressions = function() { + var t2 = { initExpressions: function(t3) { + var e2 = 0, r2 = []; + t3.renderer.compInterface = CompExpressionInterface(t3.renderer), t3.renderer.globalData.projectInterface.registerComposition(t3.renderer), t3.renderer.globalData.pushExpression = function() { + e2 += 1; + }, t3.renderer.globalData.popExpression = function() { + 0 == (e2 -= 1) && function() { + var t4, e3 = r2.length; + for (t4 = 0; t4 < e3; t4 += 1) r2[t4].release(); + r2.length = 0; + }(); + }, t3.renderer.globalData.registerExpressionProperty = function(t4) { + -1 === r2.indexOf(t4) && r2.push(t4); + }; + } }; + return t2.resetFrame = ExpressionManager.resetFrame, t2; + }(), MaskManagerInterface = function() { + function t2(t3, e2) { + this._mask = t3, this._data = e2; + } + return Object.defineProperty(t2.prototype, "maskPath", { get: function() { + return this._mask.prop.k && this._mask.prop.getValue(), this._mask.prop; + } }), Object.defineProperty(t2.prototype, "maskOpacity", { get: function() { + return this._mask.op.k && this._mask.op.getValue(), 100 * this._mask.op.v; + } }), function(e2) { + var r2, i2 = createSizedArray(e2.viewData.length), s2 = e2.viewData.length; + for (r2 = 0; r2 < s2; r2 += 1) i2[r2] = new t2(e2.viewData[r2], e2.masksProperties[r2]); + return function(t3) { + for (r2 = 0; r2 < s2; ) { + if (e2.masksProperties[r2].nm === t3) return i2[r2]; + r2 += 1; + } + return null; + }; + }; + }(), ExpressionPropertyInterface = /* @__PURE__ */ function() { + var t2 = { pv: 0, v: 0, mult: 1 }, e2 = { pv: [0, 0, 0], v: [0, 0, 0], mult: 1 }; + function r2(t3, e3, r3) { + Object.defineProperty(t3, "velocity", { get: function() { + return e3.getVelocityAtTime(e3.comp.currentFrame); + } }), t3.numKeys = e3.keyframes ? e3.keyframes.length : 0, t3.key = function(i3) { + if (!t3.numKeys) return 0; + var s2 = ""; + s2 = "s" in e3.keyframes[i3 - 1] ? e3.keyframes[i3 - 1].s : "e" in e3.keyframes[i3 - 2] ? e3.keyframes[i3 - 2].e : e3.keyframes[i3 - 2].s; + var a2 = "unidimensional" === r3 ? new Number(s2) : Object.assign({}, s2); + return a2.time = e3.keyframes[i3 - 1].t / e3.elem.comp.globalData.frameRate, a2.value = "unidimensional" === r3 ? s2[0] : s2, a2; + }, t3.valueAtTime = e3.getValueAtTime, t3.speedAtTime = e3.getSpeedAtTime, t3.velocityAtTime = e3.getVelocityAtTime, t3.propertyGroup = e3.propertyGroup; + } + function i2() { + return t2; + } + return function(s2) { + return s2 ? "unidimensional" === s2.propType ? function(e3) { + e3 && "pv" in e3 || (e3 = t2); + var i3 = 1 / e3.mult, s3 = e3.pv * i3, a2 = new Number(s3); + return a2.value = s3, r2(a2, e3, "unidimensional"), function() { + return e3.k && e3.getValue(), s3 = e3.v * i3, a2.value !== s3 && ((a2 = new Number(s3)).value = s3, r2(a2, e3, "unidimensional")), a2; + }; + }(s2) : function(t3) { + t3 && "pv" in t3 || (t3 = e2); + var i3 = 1 / t3.mult, s3 = t3.data && t3.data.l || t3.pv.length, a2 = createTypedArray("float32", s3), n2 = createTypedArray("float32", s3); + return a2.value = n2, r2(a2, t3, "multidimensional"), function() { + t3.k && t3.getValue(); + for (var e3 = 0; e3 < s3; e3 += 1) n2[e3] = t3.v[e3] * i3, a2[e3] = n2[e3]; + return a2; + }; + }(s2) : i2; + }; + }(), TransformExpressionInterface = function(t2) { + function e2(t3) { + switch (t3) { + case "scale": + case "Scale": + case "ADBE Scale": + case 6: + return e2.scale; + case "rotation": + case "Rotation": + case "ADBE Rotation": + case "ADBE Rotate Z": + case 10: + return e2.rotation; + case "ADBE Rotate X": + return e2.xRotation; + case "ADBE Rotate Y": + return e2.yRotation; + case "position": + case "Position": + case "ADBE Position": + case 2: + return e2.position; + case "ADBE Position_0": + return e2.xPosition; + case "ADBE Position_1": + return e2.yPosition; + case "ADBE Position_2": + return e2.zPosition; + case "anchorPoint": + case "AnchorPoint": + case "Anchor Point": + case "ADBE AnchorPoint": + case 1: + return e2.anchorPoint; + case "opacity": + case "Opacity": + case 11: + return e2.opacity; + default: + return null; + } + } + var r2, i2, s2, a2; + return Object.defineProperty(e2, "rotation", { get: ExpressionPropertyInterface(t2.r || t2.rz) }), Object.defineProperty(e2, "zRotation", { get: ExpressionPropertyInterface(t2.rz || t2.r) }), Object.defineProperty(e2, "xRotation", { get: ExpressionPropertyInterface(t2.rx) }), Object.defineProperty(e2, "yRotation", { get: ExpressionPropertyInterface(t2.ry) }), Object.defineProperty(e2, "scale", { get: ExpressionPropertyInterface(t2.s) }), t2.p ? a2 = ExpressionPropertyInterface(t2.p) : (r2 = ExpressionPropertyInterface(t2.px), i2 = ExpressionPropertyInterface(t2.py), t2.pz && (s2 = ExpressionPropertyInterface(t2.pz))), Object.defineProperty(e2, "position", { get: function() { + return t2.p ? a2() : [r2(), i2(), s2 ? s2() : 0]; + } }), Object.defineProperty(e2, "xPosition", { get: ExpressionPropertyInterface(t2.px) }), Object.defineProperty(e2, "yPosition", { get: ExpressionPropertyInterface(t2.py) }), Object.defineProperty(e2, "zPosition", { get: ExpressionPropertyInterface(t2.pz) }), Object.defineProperty(e2, "anchorPoint", { get: ExpressionPropertyInterface(t2.a) }), Object.defineProperty(e2, "opacity", { get: ExpressionPropertyInterface(t2.o) }), Object.defineProperty(e2, "skew", { get: ExpressionPropertyInterface(t2.sk) }), Object.defineProperty(e2, "skewAxis", { get: ExpressionPropertyInterface(t2.sa) }), Object.defineProperty(e2, "orientation", { get: ExpressionPropertyInterface(t2.or) }), e2; + }, LayerExpressionInterface = /* @__PURE__ */ function() { + function t2(t3) { + var e3 = new Matrix(); + return void 0 !== t3 ? this._elem.finalTransform.mProp.getValueAtTime(t3).clone(e3) : this._elem.finalTransform.mProp.applyToMatrix(e3), e3; + } + function e2(t3, e3) { + var r3 = this.getMatrix(e3); + return r3.props[12] = 0, r3.props[13] = 0, r3.props[14] = 0, this.applyPoint(r3, t3); + } + function r2(t3, e3) { + var r3 = this.getMatrix(e3); + return this.applyPoint(r3, t3); + } + function i2(t3, e3) { + var r3 = this.getMatrix(e3); + return r3.props[12] = 0, r3.props[13] = 0, r3.props[14] = 0, this.invertPoint(r3, t3); + } + function s2(t3, e3) { + var r3 = this.getMatrix(e3); + return this.invertPoint(r3, t3); + } + function a2(t3, e3) { + if (this._elem.hierarchy && this._elem.hierarchy.length) { + var r3, i3 = this._elem.hierarchy.length; + for (r3 = 0; r3 < i3; r3 += 1) this._elem.hierarchy[r3].finalTransform.mProp.applyToMatrix(t3); + } + return t3.applyToPointArray(e3[0], e3[1], e3[2] || 0); + } + function n2(t3, e3) { + if (this._elem.hierarchy && this._elem.hierarchy.length) { + var r3, i3 = this._elem.hierarchy.length; + for (r3 = 0; r3 < i3; r3 += 1) this._elem.hierarchy[r3].finalTransform.mProp.applyToMatrix(t3); + } + return t3.inversePoint(e3); + } + function o2(t3) { + var e3 = new Matrix(); + if (e3.reset(), this._elem.finalTransform.mProp.applyToMatrix(e3), this._elem.hierarchy && this._elem.hierarchy.length) { + var r3, i3 = this._elem.hierarchy.length; + for (r3 = 0; r3 < i3; r3 += 1) this._elem.hierarchy[r3].finalTransform.mProp.applyToMatrix(e3); + return e3.inversePoint(t3); + } + return e3.inversePoint(t3); + } + function h2() { + return [1, 1, 1, 1]; + } + return function(l2) { + var p2; + function c2(t3) { + switch (t3) { + case "ADBE Root Vectors Group": + case "Contents": + case 2: + return c2.shapeInterface; + case 1: + case 6: + case "Transform": + case "transform": + case "ADBE Transform Group": + return p2; + case 4: + case "ADBE Effect Parade": + case "effects": + case "Effects": + return c2.effect; + case "ADBE Text Properties": + return c2.textInterface; + default: + return null; + } + } + c2.getMatrix = t2, c2.invertPoint = n2, c2.applyPoint = a2, c2.toWorld = r2, c2.toWorldVec = e2, c2.fromWorld = s2, c2.fromWorldVec = i2, c2.toComp = r2, c2.fromComp = o2, c2.sampleImage = h2, c2.sourceRectAtTime = l2.sourceRectAtTime.bind(l2), c2._elem = l2; + var f2 = getDescriptor(p2 = TransformExpressionInterface(l2.finalTransform.mProp), "anchorPoint"); + return Object.defineProperties(c2, { hasParent: { get: function() { + return l2.hierarchy.length; + } }, parent: { get: function() { + return l2.hierarchy[0].layerInterface; + } }, rotation: getDescriptor(p2, "rotation"), scale: getDescriptor(p2, "scale"), position: getDescriptor(p2, "position"), opacity: getDescriptor(p2, "opacity"), anchorPoint: f2, anchor_point: f2, transform: { get: function() { + return p2; + } }, active: { get: function() { + return l2.isInRange; + } } }), c2.startTime = l2.data.st, c2.index = l2.data.ind, c2.source = l2.data.refId, c2.height = 0 === l2.data.ty ? l2.data.h : 100, c2.width = 0 === l2.data.ty ? l2.data.w : 100, c2.inPoint = l2.data.ip / l2.comp.globalData.frameRate, c2.outPoint = l2.data.op / l2.comp.globalData.frameRate, c2._name = l2.data.nm, c2.registerMaskInterface = function(t3) { + c2.mask = new MaskManagerInterface(t3, l2); + }, c2.registerEffectsInterface = function(t3) { + c2.effect = t3; + }, c2; + }; + }(), propertyGroupFactory = function(t2, e2) { + return function(r2) { + return (r2 = void 0 === r2 ? 1 : r2) <= 0 ? t2 : e2(r2 - 1); + }; + }, PropertyInterface = function(t2, e2) { + var r2 = { _name: t2 }; + return function(t3) { + return (t3 = void 0 === t3 ? 1 : t3) <= 0 ? r2 : e2(t3 - 1); + }; + }, EffectsExpressionInterface = /* @__PURE__ */ function() { + var t2 = { createEffectsInterface: function(t3, r3) { + if (t3.effectsManager) { + var i2, s2 = [], a2 = t3.data.ef, n2 = t3.effectsManager.effectElements.length; + for (i2 = 0; i2 < n2; i2 += 1) s2.push(e2(a2[i2], t3.effectsManager.effectElements[i2], r3, t3)); + var o2 = t3.data.ef || [], h2 = function(t4) { + for (i2 = 0, n2 = o2.length; i2 < n2; ) { + if (t4 === o2[i2].nm || t4 === o2[i2].mn || t4 === o2[i2].ix) return s2[i2]; + i2 += 1; + } + return null; + }; + return Object.defineProperty(h2, "numProperties", { get: function() { + return o2.length; + } }), h2; + } + return null; + } }; + function e2(t3, i2, s2, a2) { + function n2(e3) { + for (var r3 = t3.ef, i3 = 0, s3 = r3.length; i3 < s3; ) { + if (e3 === r3[i3].nm || e3 === r3[i3].mn || e3 === r3[i3].ix) return 5 === r3[i3].ty ? l2[i3] : l2[i3](); + i3 += 1; + } + throw new Error(); + } + var o2, h2 = propertyGroupFactory(n2, s2), l2 = [], p2 = t3.ef.length; + for (o2 = 0; o2 < p2; o2 += 1) 5 === t3.ef[o2].ty ? l2.push(e2(t3.ef[o2], i2.effectElements[o2], i2.effectElements[o2].propertyGroup, a2)) : l2.push(r2(i2.effectElements[o2], t3.ef[o2].ty, a2, h2)); + return "ADBE Color Control" === t3.mn && Object.defineProperty(n2, "color", { get: function() { + return l2[0](); + } }), Object.defineProperties(n2, { numProperties: { get: function() { + return t3.np; + } }, _name: { value: t3.nm }, propertyGroup: { value: h2 } }), n2.enabled = 0 !== t3.en, n2.active = n2.enabled, n2; + } + function r2(t3, e3, r3, i2) { + var s2 = ExpressionPropertyInterface(t3.p); + return t3.p.setGroupProperty && t3.p.setGroupProperty(PropertyInterface("", i2)), function() { + return 10 === e3 ? r3.comp.compInterface(t3.p.v) : s2(); + }; + } + return t2; + }(), ShapePathInterface = function(t2, e2, r2) { + var i2 = e2.sh; + function s2(t3) { + return "Shape" === t3 || "shape" === t3 || "Path" === t3 || "path" === t3 || "ADBE Vector Shape" === t3 || 2 === t3 ? s2.path : null; + } + var a2 = propertyGroupFactory(s2, r2); + return i2.setGroupProperty(PropertyInterface("Path", a2)), Object.defineProperties(s2, { path: { get: function() { + return i2.k && i2.getValue(), i2; + } }, shape: { get: function() { + return i2.k && i2.getValue(), i2; + } }, _name: { value: t2.nm }, ix: { value: t2.ix }, propertyIndex: { value: t2.ix }, mn: { value: t2.mn }, propertyGroup: { value: r2 } }), s2; + }, ShapeExpressionInterface = /* @__PURE__ */ function() { + function t2(t3, n3, f2) { + var u2, d2 = [], m2 = t3 ? t3.length : 0; + for (u2 = 0; u2 < m2; u2 += 1) "gr" === t3[u2].ty ? d2.push(e2(t3[u2], n3[u2], f2)) : "fl" === t3[u2].ty ? d2.push(r2(t3[u2], n3[u2], f2)) : "st" === t3[u2].ty ? d2.push(s2(t3[u2], n3[u2], f2)) : "tm" === t3[u2].ty ? d2.push(a2(t3[u2], n3[u2], f2)) : "tr" === t3[u2].ty || ("el" === t3[u2].ty ? d2.push(o2(t3[u2], n3[u2], f2)) : "sr" === t3[u2].ty ? d2.push(h2(t3[u2], n3[u2], f2)) : "sh" === t3[u2].ty ? d2.push(ShapePathInterface(t3[u2], n3[u2], f2)) : "rc" === t3[u2].ty ? d2.push(l2(t3[u2], n3[u2], f2)) : "rd" === t3[u2].ty ? d2.push(p2(t3[u2], n3[u2], f2)) : "rp" === t3[u2].ty ? d2.push(c2(t3[u2], n3[u2], f2)) : "gf" === t3[u2].ty ? d2.push(i2(t3[u2], n3[u2], f2)) : d2.push((t3[u2], n3[u2], function() { + return null; + }))); + return d2; + } + function e2(e3, r3, i3) { + var s3 = function(t3) { + switch (t3) { + case "ADBE Vectors Group": + case "Contents": + case 2: + return s3.content; + default: + return s3.transform; + } + }; + s3.propertyGroup = propertyGroupFactory(s3, i3); + var a3 = function(e4, r4, i4) { + var s4, a4 = function(t3) { + for (var e5 = 0, r5 = s4.length; e5 < r5; ) { + if (s4[e5]._name === t3 || s4[e5].mn === t3 || s4[e5].propertyIndex === t3 || s4[e5].ix === t3 || s4[e5].ind === t3) return s4[e5]; + e5 += 1; + } + return "number" == typeof t3 ? s4[t3 - 1] : null; + }; + a4.propertyGroup = propertyGroupFactory(a4, i4), s4 = t2(e4.it, r4.it, a4.propertyGroup), a4.numProperties = s4.length; + var o4 = n2(e4.it[e4.it.length - 1], r4.it[r4.it.length - 1], a4.propertyGroup); + return a4.transform = o4, a4.propertyIndex = e4.cix, a4._name = e4.nm, a4; + }(e3, r3, s3.propertyGroup), o3 = n2(e3.it[e3.it.length - 1], r3.it[r3.it.length - 1], s3.propertyGroup); + return s3.content = a3, s3.transform = o3, Object.defineProperty(s3, "_name", { get: function() { + return e3.nm; + } }), s3.numProperties = e3.np, s3.propertyIndex = e3.ix, s3.nm = e3.nm, s3.mn = e3.mn, s3; + } + function r2(t3, e3, r3) { + function i3(t4) { + return "Color" === t4 || "color" === t4 ? i3.color : "Opacity" === t4 || "opacity" === t4 ? i3.opacity : null; + } + return Object.defineProperties(i3, { color: { get: ExpressionPropertyInterface(e3.c) }, opacity: { get: ExpressionPropertyInterface(e3.o) }, _name: { value: t3.nm }, mn: { value: t3.mn } }), e3.c.setGroupProperty(PropertyInterface("Color", r3)), e3.o.setGroupProperty(PropertyInterface("Opacity", r3)), i3; + } + function i2(t3, e3, r3) { + function i3(t4) { + return "Start Point" === t4 || "start point" === t4 ? i3.startPoint : "End Point" === t4 || "end point" === t4 ? i3.endPoint : "Opacity" === t4 || "opacity" === t4 ? i3.opacity : null; + } + return Object.defineProperties(i3, { startPoint: { get: ExpressionPropertyInterface(e3.s) }, endPoint: { get: ExpressionPropertyInterface(e3.e) }, opacity: { get: ExpressionPropertyInterface(e3.o) }, type: { get: function() { + return "a"; + } }, _name: { value: t3.nm }, mn: { value: t3.mn } }), e3.s.setGroupProperty(PropertyInterface("Start Point", r3)), e3.e.setGroupProperty(PropertyInterface("End Point", r3)), e3.o.setGroupProperty(PropertyInterface("Opacity", r3)), i3; + } + function s2(t3, e3, r3) { + var i3, s3 = propertyGroupFactory(l3, r3), a3 = propertyGroupFactory(h3, s3); + function n3(r4) { + Object.defineProperty(h3, t3.d[r4].nm, { get: ExpressionPropertyInterface(e3.d.dataProps[r4].p) }); + } + var o3 = t3.d ? t3.d.length : 0, h3 = {}; + for (i3 = 0; i3 < o3; i3 += 1) n3(i3), e3.d.dataProps[i3].p.setGroupProperty(a3); + function l3(t4) { + return "Color" === t4 || "color" === t4 ? l3.color : "Opacity" === t4 || "opacity" === t4 ? l3.opacity : "Stroke Width" === t4 || "stroke width" === t4 ? l3.strokeWidth : null; + } + return Object.defineProperties(l3, { color: { get: ExpressionPropertyInterface(e3.c) }, opacity: { get: ExpressionPropertyInterface(e3.o) }, strokeWidth: { get: ExpressionPropertyInterface(e3.w) }, dash: { get: function() { + return h3; + } }, _name: { value: t3.nm }, mn: { value: t3.mn } }), e3.c.setGroupProperty(PropertyInterface("Color", s3)), e3.o.setGroupProperty(PropertyInterface("Opacity", s3)), e3.w.setGroupProperty(PropertyInterface("Stroke Width", s3)), l3; + } + function a2(t3, e3, r3) { + function i3(e4) { + return e4 === t3.e.ix || "End" === e4 || "end" === e4 ? i3.end : e4 === t3.s.ix ? i3.start : e4 === t3.o.ix ? i3.offset : null; + } + var s3 = propertyGroupFactory(i3, r3); + return i3.propertyIndex = t3.ix, e3.s.setGroupProperty(PropertyInterface("Start", s3)), e3.e.setGroupProperty(PropertyInterface("End", s3)), e3.o.setGroupProperty(PropertyInterface("Offset", s3)), i3.propertyIndex = t3.ix, i3.propertyGroup = r3, Object.defineProperties(i3, { start: { get: ExpressionPropertyInterface(e3.s) }, end: { get: ExpressionPropertyInterface(e3.e) }, offset: { get: ExpressionPropertyInterface(e3.o) }, _name: { value: t3.nm } }), i3.mn = t3.mn, i3; + } + function n2(t3, e3, r3) { + function i3(e4) { + return t3.a.ix === e4 || "Anchor Point" === e4 ? i3.anchorPoint : t3.o.ix === e4 || "Opacity" === e4 ? i3.opacity : t3.p.ix === e4 || "Position" === e4 ? i3.position : t3.r.ix === e4 || "Rotation" === e4 || "ADBE Vector Rotation" === e4 ? i3.rotation : t3.s.ix === e4 || "Scale" === e4 ? i3.scale : t3.sk && t3.sk.ix === e4 || "Skew" === e4 ? i3.skew : t3.sa && t3.sa.ix === e4 || "Skew Axis" === e4 ? i3.skewAxis : null; + } + var s3 = propertyGroupFactory(i3, r3); + return e3.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity", s3)), e3.transform.mProps.p.setGroupProperty(PropertyInterface("Position", s3)), e3.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point", s3)), e3.transform.mProps.s.setGroupProperty(PropertyInterface("Scale", s3)), e3.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation", s3)), e3.transform.mProps.sk && (e3.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew", s3)), e3.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle", s3))), e3.transform.op.setGroupProperty(PropertyInterface("Opacity", s3)), Object.defineProperties(i3, { opacity: { get: ExpressionPropertyInterface(e3.transform.mProps.o) }, position: { get: ExpressionPropertyInterface(e3.transform.mProps.p) }, anchorPoint: { get: ExpressionPropertyInterface(e3.transform.mProps.a) }, scale: { get: ExpressionPropertyInterface(e3.transform.mProps.s) }, rotation: { get: ExpressionPropertyInterface(e3.transform.mProps.r) }, skew: { get: ExpressionPropertyInterface(e3.transform.mProps.sk) }, skewAxis: { get: ExpressionPropertyInterface(e3.transform.mProps.sa) }, _name: { value: t3.nm } }), i3.ty = "tr", i3.mn = t3.mn, i3.propertyGroup = r3, i3; + } + function o2(t3, e3, r3) { + function i3(e4) { + return t3.p.ix === e4 ? i3.position : t3.s.ix === e4 ? i3.size : null; + } + var s3 = propertyGroupFactory(i3, r3); + i3.propertyIndex = t3.ix; + var a3 = "tm" === e3.sh.ty ? e3.sh.prop : e3.sh; + return a3.s.setGroupProperty(PropertyInterface("Size", s3)), a3.p.setGroupProperty(PropertyInterface("Position", s3)), Object.defineProperties(i3, { size: { get: ExpressionPropertyInterface(a3.s) }, position: { get: ExpressionPropertyInterface(a3.p) }, _name: { value: t3.nm } }), i3.mn = t3.mn, i3; + } + function h2(t3, e3, r3) { + function i3(e4) { + return t3.p.ix === e4 ? i3.position : t3.r.ix === e4 ? i3.rotation : t3.pt.ix === e4 ? i3.points : t3.or.ix === e4 || "ADBE Vector Star Outer Radius" === e4 ? i3.outerRadius : t3.os.ix === e4 ? i3.outerRoundness : !t3.ir || t3.ir.ix !== e4 && "ADBE Vector Star Inner Radius" !== e4 ? t3.is && t3.is.ix === e4 ? i3.innerRoundness : null : i3.innerRadius; + } + var s3 = propertyGroupFactory(i3, r3), a3 = "tm" === e3.sh.ty ? e3.sh.prop : e3.sh; + return i3.propertyIndex = t3.ix, a3.or.setGroupProperty(PropertyInterface("Outer Radius", s3)), a3.os.setGroupProperty(PropertyInterface("Outer Roundness", s3)), a3.pt.setGroupProperty(PropertyInterface("Points", s3)), a3.p.setGroupProperty(PropertyInterface("Position", s3)), a3.r.setGroupProperty(PropertyInterface("Rotation", s3)), t3.ir && (a3.ir.setGroupProperty(PropertyInterface("Inner Radius", s3)), a3.is.setGroupProperty(PropertyInterface("Inner Roundness", s3))), Object.defineProperties(i3, { position: { get: ExpressionPropertyInterface(a3.p) }, rotation: { get: ExpressionPropertyInterface(a3.r) }, points: { get: ExpressionPropertyInterface(a3.pt) }, outerRadius: { get: ExpressionPropertyInterface(a3.or) }, outerRoundness: { get: ExpressionPropertyInterface(a3.os) }, innerRadius: { get: ExpressionPropertyInterface(a3.ir) }, innerRoundness: { get: ExpressionPropertyInterface(a3.is) }, _name: { value: t3.nm } }), i3.mn = t3.mn, i3; + } + function l2(t3, e3, r3) { + function i3(e4) { + return t3.p.ix === e4 ? i3.position : t3.r.ix === e4 ? i3.roundness : t3.s.ix === e4 || "Size" === e4 || "ADBE Vector Rect Size" === e4 ? i3.size : null; + } + var s3 = propertyGroupFactory(i3, r3), a3 = "tm" === e3.sh.ty ? e3.sh.prop : e3.sh; + return i3.propertyIndex = t3.ix, a3.p.setGroupProperty(PropertyInterface("Position", s3)), a3.s.setGroupProperty(PropertyInterface("Size", s3)), a3.r.setGroupProperty(PropertyInterface("Rotation", s3)), Object.defineProperties(i3, { position: { get: ExpressionPropertyInterface(a3.p) }, roundness: { get: ExpressionPropertyInterface(a3.r) }, size: { get: ExpressionPropertyInterface(a3.s) }, _name: { value: t3.nm } }), i3.mn = t3.mn, i3; + } + function p2(t3, e3, r3) { + function i3(e4) { + return t3.r.ix === e4 || "Round Corners 1" === e4 ? i3.radius : null; + } + var s3 = propertyGroupFactory(i3, r3), a3 = e3; + return i3.propertyIndex = t3.ix, a3.rd.setGroupProperty(PropertyInterface("Radius", s3)), Object.defineProperties(i3, { radius: { get: ExpressionPropertyInterface(a3.rd) }, _name: { value: t3.nm } }), i3.mn = t3.mn, i3; + } + function c2(t3, e3, r3) { + function i3(e4) { + return t3.c.ix === e4 || "Copies" === e4 ? i3.copies : t3.o.ix === e4 || "Offset" === e4 ? i3.offset : null; + } + var s3 = propertyGroupFactory(i3, r3), a3 = e3; + return i3.propertyIndex = t3.ix, a3.c.setGroupProperty(PropertyInterface("Copies", s3)), a3.o.setGroupProperty(PropertyInterface("Offset", s3)), Object.defineProperties(i3, { copies: { get: ExpressionPropertyInterface(a3.c) }, offset: { get: ExpressionPropertyInterface(a3.o) }, _name: { value: t3.nm } }), i3.mn = t3.mn, i3; + } + return function(e3, r3, i3) { + var s3; + function a3(t3) { + if ("number" == typeof t3) return 0 === (t3 = void 0 === t3 ? 1 : t3) ? i3 : s3[t3 - 1]; + for (var e4 = 0, r4 = s3.length; e4 < r4; ) { + if (s3[e4]._name === t3) return s3[e4]; + e4 += 1; + } + return null; + } + return a3.propertyGroup = propertyGroupFactory(a3, function() { + return i3; + }), s3 = t2(e3, r3, a3.propertyGroup), a3.numProperties = s3.length, a3._name = "Contents", a3; + }; + }(), TextExpressionInterface = function(t2) { + var e2; + function r2(t3) { + return "ADBE Text Document" === t3 ? r2.sourceText : null; + } + return Object.defineProperty(r2, "sourceText", { get: function() { + t2.textProperty.getValue(); + var r3 = t2.textProperty.currentData.t; + return e2 && r3 === e2.value || ((e2 = new String(r3)).value = r3 || new String(r3), Object.defineProperty(e2, "style", { get: function() { + return { fillColor: t2.textProperty.currentData.fc }; + } })), e2; + } }), r2; + }; + function _typeof(t2) { + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t3) { + return typeof t3; + } : function(t3) { + return t3 && "function" == typeof Symbol && t3.constructor === Symbol && t3 !== Symbol.prototype ? "symbol" : typeof t3; + }, _typeof(t2); + } + var FootageInterface = (dataInterfaceFactory = function(t2) { + function e2(t3) { + return "Outline" === t3 ? e2.outlineInterface() : null; + } + return e2._name = "Outline", e2.outlineInterface = function(t3) { + var e3 = "", r2 = t3.getFootageData(); + function i2(t4) { + if (r2[t4]) return e3 = t4, "object" === _typeof(r2 = r2[t4]) ? i2 : r2; + var s2 = t4.indexOf(e3); + if (-1 !== s2) { + var a2 = parseInt(t4.substr(s2 + e3.length), 10); + return "object" === _typeof(r2 = r2[a2]) ? i2 : r2; + } + return ""; + } + return function() { + return e3 = "", r2 = t3.getFootageData(), i2; + }; + }(t2), e2; + }, function(t2) { + function e2(t3) { + return "Data" === t3 ? e2.dataInterface : null; + } + return e2._name = "Data", e2.dataInterface = dataInterfaceFactory(t2), e2; + }), dataInterfaceFactory, interfaces = { layer: LayerExpressionInterface, effects: EffectsExpressionInterface, comp: CompExpressionInterface, shape: ShapeExpressionInterface, text: TextExpressionInterface, footage: FootageInterface }; + function getInterface(t2) { + return interfaces[t2] || null; + } + var expressionHelpers = { searchExpressions: function(t2, e2, r2) { + e2.x && (r2.k = true, r2.x = true, r2.initiateExpression = ExpressionManager.initiateExpression, r2.effectsSequence.push(r2.initiateExpression(t2, e2, r2).bind(r2))); + }, getSpeedAtTime: function(t2) { + var e2 = this.getValueAtTime(t2), r2 = this.getValueAtTime(t2 + -0.01), i2 = 0; + if (e2.length) { + var s2; + for (s2 = 0; s2 < e2.length; s2 += 1) i2 += Math.pow(r2[s2] - e2[s2], 2); + i2 = 100 * Math.sqrt(i2); + } else i2 = 0; + return i2; + }, getVelocityAtTime: function(t2) { + if (void 0 !== this.vel) return this.vel; + var e2, r2, i2 = -1e-3, s2 = this.getValueAtTime(t2), a2 = this.getValueAtTime(t2 + i2); + if (s2.length) for (e2 = createTypedArray("float32", s2.length), r2 = 0; r2 < s2.length; r2 += 1) e2[r2] = (a2[r2] - s2[r2]) / i2; + else e2 = (a2 - s2) / i2; + return e2; + }, getValueAtTime: function(t2) { + return t2 *= this.elem.globalData.frameRate, (t2 -= this.offsetTime) !== this._cachingAtTime.lastFrame && (this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < t2 ? this._cachingAtTime.lastIndex : 0, this._cachingAtTime.value = this.interpolateValue(t2, this._cachingAtTime), this._cachingAtTime.lastFrame = t2), this._cachingAtTime.value; + }, getStaticValueAtTime: function() { + return this.pv; + }, setGroupProperty: function(t2) { + this.propertyGroup = t2; + } }; + function addPropertyDecorator() { + function t2(t3, e3, r3) { + if (!this.k || !this.keyframes) return this.pv; + t3 = t3 ? t3.toLowerCase() : ""; + var i3, s3, a3, n3, o3, h3 = this.comp.renderedFrame, l3 = this.keyframes, p3 = l3[l3.length - 1].t; + if (h3 <= p3) return this.pv; + if (r3 ? s3 = p3 - (i3 = e3 ? Math.abs(p3 - this.elem.comp.globalData.frameRate * e3) : Math.max(0, p3 - this.elem.data.ip)) : ((!e3 || e3 > l3.length - 1) && (e3 = l3.length - 1), i3 = p3 - (s3 = l3[l3.length - 1 - e3].t)), "pingpong" === t3) { + if (Math.floor((h3 - s3) / i3) % 2 != 0) return this.getValueAtTime((i3 - (h3 - s3) % i3 + s3) / this.comp.globalData.frameRate, 0); + } else { + if ("offset" === t3) { + var c2 = this.getValueAtTime(s3 / this.comp.globalData.frameRate, 0), f2 = this.getValueAtTime(p3 / this.comp.globalData.frameRate, 0), u2 = this.getValueAtTime(((h3 - s3) % i3 + s3) / this.comp.globalData.frameRate, 0), d2 = Math.floor((h3 - s3) / i3); + if (this.pv.length) { + for (n3 = (o3 = new Array(c2.length)).length, a3 = 0; a3 < n3; a3 += 1) o3[a3] = (f2[a3] - c2[a3]) * d2 + u2[a3]; + return o3; + } + return (f2 - c2) * d2 + u2; + } + if ("continue" === t3) { + var m2 = this.getValueAtTime(p3 / this.comp.globalData.frameRate, 0), y2 = this.getValueAtTime((p3 - 1e-3) / this.comp.globalData.frameRate, 0); + if (this.pv.length) { + for (n3 = (o3 = new Array(m2.length)).length, a3 = 0; a3 < n3; a3 += 1) o3[a3] = m2[a3] + (m2[a3] - y2[a3]) * ((h3 - p3) / this.comp.globalData.frameRate) / 5e-4; + return o3; + } + return m2 + (h3 - p3) / 1e-3 * (m2 - y2); + } + } + return this.getValueAtTime(((h3 - s3) % i3 + s3) / this.comp.globalData.frameRate, 0); + } + function e2(t3, e3, r3) { + if (!this.k) return this.pv; + t3 = t3 ? t3.toLowerCase() : ""; + var i3, s3, a3, n3, o3, h3 = this.comp.renderedFrame, l3 = this.keyframes, p3 = l3[0].t; + if (h3 >= p3) return this.pv; + if (r3 ? s3 = p3 + (i3 = e3 ? Math.abs(this.elem.comp.globalData.frameRate * e3) : Math.max(0, this.elem.data.op - p3)) : ((!e3 || e3 > l3.length - 1) && (e3 = l3.length - 1), i3 = (s3 = l3[e3].t) - p3), "pingpong" === t3) { + if (Math.floor((p3 - h3) / i3) % 2 == 0) return this.getValueAtTime(((p3 - h3) % i3 + p3) / this.comp.globalData.frameRate, 0); + } else { + if ("offset" === t3) { + var c2 = this.getValueAtTime(p3 / this.comp.globalData.frameRate, 0), f2 = this.getValueAtTime(s3 / this.comp.globalData.frameRate, 0), u2 = this.getValueAtTime((i3 - (p3 - h3) % i3 + p3) / this.comp.globalData.frameRate, 0), d2 = Math.floor((p3 - h3) / i3) + 1; + if (this.pv.length) { + for (n3 = (o3 = new Array(c2.length)).length, a3 = 0; a3 < n3; a3 += 1) o3[a3] = u2[a3] - (f2[a3] - c2[a3]) * d2; + return o3; + } + return u2 - (f2 - c2) * d2; + } + if ("continue" === t3) { + var m2 = this.getValueAtTime(p3 / this.comp.globalData.frameRate, 0), y2 = this.getValueAtTime((p3 + 1e-3) / this.comp.globalData.frameRate, 0); + if (this.pv.length) { + for (n3 = (o3 = new Array(m2.length)).length, a3 = 0; a3 < n3; a3 += 1) o3[a3] = m2[a3] + (m2[a3] - y2[a3]) * (p3 - h3) / 1e-3; + return o3; + } + return m2 + (m2 - y2) * (p3 - h3) / 1e-3; + } + } + return this.getValueAtTime((i3 - ((p3 - h3) % i3 + p3)) / this.comp.globalData.frameRate, 0); + } + function r2(t3, e3) { + if (!this.k) return this.pv; + if (t3 = 0.5 * (t3 || 0.4), (e3 = Math.floor(e3 || 5)) <= 1) return this.pv; + var r3, i3, s3 = this.comp.renderedFrame / this.comp.globalData.frameRate, a3 = s3 - t3, n3 = e3 > 1 ? (s3 + t3 - a3) / (e3 - 1) : 1, o3 = 0, h3 = 0; + for (r3 = this.pv.length ? createTypedArray("float32", this.pv.length) : 0; o3 < e3; ) { + if (i3 = this.getValueAtTime(a3 + o3 * n3), this.pv.length) for (h3 = 0; h3 < this.pv.length; h3 += 1) r3[h3] += i3[h3]; + else r3 += i3; + o3 += 1; + } + if (this.pv.length) for (h3 = 0; h3 < this.pv.length; h3 += 1) r3[h3] /= e3; + else r3 /= e3; + return r3; + } + function i2(t3) { + this._transformCachingAtTime || (this._transformCachingAtTime = { v: new Matrix() }); + var e3 = this._transformCachingAtTime.v; + if (e3.cloneFromProps(this.pre.props), this.appliedTransformations < 1) { + var r3 = this.a.getValueAtTime(t3); + e3.translate(-r3[0] * this.a.mult, -r3[1] * this.a.mult, r3[2] * this.a.mult); + } + if (this.appliedTransformations < 2) { + var i3 = this.s.getValueAtTime(t3); + e3.scale(i3[0] * this.s.mult, i3[1] * this.s.mult, i3[2] * this.s.mult); + } + if (this.sk && this.appliedTransformations < 3) { + var s3 = this.sk.getValueAtTime(t3), a3 = this.sa.getValueAtTime(t3); + e3.skewFromAxis(-s3 * this.sk.mult, a3 * this.sa.mult); + } + if (this.r && this.appliedTransformations < 4) { + var n3 = this.r.getValueAtTime(t3); + e3.rotate(-n3 * this.r.mult); + } else if (!this.r && this.appliedTransformations < 4) { + var o3 = this.rz.getValueAtTime(t3), h3 = this.ry.getValueAtTime(t3), l3 = this.rx.getValueAtTime(t3), p3 = this.or.getValueAtTime(t3); + e3.rotateZ(-o3 * this.rz.mult).rotateY(h3 * this.ry.mult).rotateX(l3 * this.rx.mult).rotateZ(-p3[2] * this.or.mult).rotateY(p3[1] * this.or.mult).rotateX(p3[0] * this.or.mult); + } + if (this.data.p && this.data.p.s) { + var c2 = this.px.getValueAtTime(t3), f2 = this.py.getValueAtTime(t3); + if (this.data.p.z) { + var u2 = this.pz.getValueAtTime(t3); + e3.translate(c2 * this.px.mult, f2 * this.py.mult, -u2 * this.pz.mult); + } else e3.translate(c2 * this.px.mult, f2 * this.py.mult, 0); + } else { + var d2 = this.p.getValueAtTime(t3); + e3.translate(d2[0] * this.p.mult, d2[1] * this.p.mult, -d2[2] * this.p.mult); + } + return e3; + } + function s2() { + return this.v.clone(new Matrix()); + } + var a2 = TransformPropertyFactory.getTransformProperty; + TransformPropertyFactory.getTransformProperty = function(t3, e3, r3) { + var n3 = a2(t3, e3, r3); + return n3.dynamicProperties.length ? n3.getValueAtTime = i2.bind(n3) : n3.getValueAtTime = s2.bind(n3), n3.setGroupProperty = expressionHelpers.setGroupProperty, n3; + }; + var n2 = PropertyFactory.getProp; + PropertyFactory.getProp = function(i3, s3, a3, o3, h3) { + var l3 = n2(i3, s3, a3, o3, h3); + l3.kf ? l3.getValueAtTime = expressionHelpers.getValueAtTime.bind(l3) : l3.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(l3), l3.setGroupProperty = expressionHelpers.setGroupProperty, l3.loopOut = t2, l3.loopIn = e2, l3.smooth = r2, l3.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(l3), l3.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(l3), l3.numKeys = 1 === s3.a ? s3.k.length : 0, l3.propertyIndex = s3.ix; + var p3 = 0; + return 0 !== a3 && (p3 = createTypedArray("float32", 1 === s3.a ? s3.k[0].s.length : s3.k.length)), l3._cachingAtTime = { lastFrame: initialDefaultFrame, lastIndex: 0, value: p3 }, expressionHelpers.searchExpressions(i3, s3, l3), l3.k && h3.addDynamicProperty(l3), l3; + }; + var o2 = ShapePropertyFactory.getConstructorFunction(), h2 = ShapePropertyFactory.getKeyframedConstructorFunction(); + function l2() { + } + l2.prototype = { vertices: function(t3, e3) { + this.k && this.getValue(); + var r3, i3 = this.v; + void 0 !== e3 && (i3 = this.getValueAtTime(e3, 0)); + var s3 = i3._length, a3 = i3[t3], n3 = i3.v, o3 = createSizedArray(s3); + for (r3 = 0; r3 < s3; r3 += 1) o3[r3] = "i" === t3 || "o" === t3 ? [a3[r3][0] - n3[r3][0], a3[r3][1] - n3[r3][1]] : [a3[r3][0], a3[r3][1]]; + return o3; + }, points: function(t3) { + return this.vertices("v", t3); + }, inTangents: function(t3) { + return this.vertices("i", t3); + }, outTangents: function(t3) { + return this.vertices("o", t3); + }, isClosed: function() { + return this.v.c; + }, pointOnPath: function(t3, e3) { + var r3 = this.v; + void 0 !== e3 && (r3 = this.getValueAtTime(e3, 0)), this._segmentsLength || (this._segmentsLength = bez.getSegmentsLength(r3)); + for (var i3, s3 = this._segmentsLength, a3 = s3.lengths, n3 = s3.totalLength * t3, o3 = 0, h3 = a3.length, l3 = 0; o3 < h3; ) { + if (l3 + a3[o3].addedLength > n3) { + var p3 = o3, c2 = r3.c && o3 === h3 - 1 ? 0 : o3 + 1, f2 = (n3 - l3) / a3[o3].addedLength; + i3 = bez.getPointInSegment(r3.v[p3], r3.v[c2], r3.o[p3], r3.i[c2], f2, a3[o3]); + break; + } + l3 += a3[o3].addedLength, o3 += 1; + } + return i3 || (i3 = r3.c ? [r3.v[0][0], r3.v[0][1]] : [r3.v[r3._length - 1][0], r3.v[r3._length - 1][1]]), i3; + }, vectorOnPath: function(t3, e3, r3) { + 1 == t3 ? t3 = this.v.c : 0 == t3 && (t3 = 0.999); + var i3 = this.pointOnPath(t3, e3), s3 = this.pointOnPath(t3 + 1e-3, e3), a3 = s3[0] - i3[0], n3 = s3[1] - i3[1], o3 = Math.sqrt(Math.pow(a3, 2) + Math.pow(n3, 2)); + return 0 === o3 ? [0, 0] : "tangent" === r3 ? [a3 / o3, n3 / o3] : [-n3 / o3, a3 / o3]; + }, tangentOnPath: function(t3, e3) { + return this.vectorOnPath(t3, e3, "tangent"); + }, normalOnPath: function(t3, e3) { + return this.vectorOnPath(t3, e3, "normal"); + }, setGroupProperty: expressionHelpers.setGroupProperty, getValueAtTime: expressionHelpers.getStaticValueAtTime }, extendPrototype([l2], o2), extendPrototype([l2], h2), h2.prototype.getValueAtTime = function(t3) { + return this._cachingAtTime || (this._cachingAtTime = { shapeValue: shapePool.clone(this.pv), lastIndex: 0, lastTime: initialDefaultFrame }), t3 *= this.elem.globalData.frameRate, (t3 -= this.offsetTime) !== this._cachingAtTime.lastTime && (this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < t3 ? this._caching.lastIndex : 0, this._cachingAtTime.lastTime = t3, this.interpolateShape(t3, this._cachingAtTime.shapeValue, this._cachingAtTime)), this._cachingAtTime.shapeValue; + }, h2.prototype.initiateExpression = ExpressionManager.initiateExpression; + var p2 = ShapePropertyFactory.getShapeProp; + ShapePropertyFactory.getShapeProp = function(t3, e3, r3, i3, s3) { + var a3 = p2(t3, e3, r3, i3, s3); + return a3.propertyIndex = e3.ix, a3.lock = false, 3 === r3 ? expressionHelpers.searchExpressions(t3, e3.pt, a3) : 4 === r3 && expressionHelpers.searchExpressions(t3, e3.ks, a3), a3.k && t3.addDynamicProperty(a3), a3; + }; + } + function initialize$1() { + addPropertyDecorator(); + } + function addDecorator() { + TextProperty.prototype.getExpressionValue = function(t2, e2) { + var r2 = this.calculateExpression(e2); + if (t2.t !== r2) { + var i2 = {}; + return this.copyData(i2, t2), i2.t = r2.toString(), i2.__complete = false, i2; + } + return t2; + }, TextProperty.prototype.searchProperty = function() { + var t2 = this.searchKeyframes(), e2 = this.searchExpressions(); + return this.kf = t2 || e2, this.kf; + }, TextProperty.prototype.searchExpressions = function() { + return this.data.d.x ? (this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this), this.addEffect(this.getExpressionValue.bind(this)), true) : null; + }; + } + function initialize() { + addDecorator(); + } + function SVGComposableEffect() { + } + SVGComposableEffect.prototype = { createMergeNode: function(t2, e2) { + var r2, i2, s2 = createNS("feMerge"); + for (s2.setAttribute("result", t2), i2 = 0; i2 < e2.length; i2 += 1) (r2 = createNS("feMergeNode")).setAttribute("in", e2[i2]), s2.appendChild(r2), s2.appendChild(r2); + return s2; + } }; + var linearFilterValue = "0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0"; + function SVGTintFilter(t2, e2, r2, i2, s2) { + this.filterManager = e2; + var a2 = createNS("feColorMatrix"); + a2.setAttribute("type", "matrix"), a2.setAttribute("color-interpolation-filters", "linearRGB"), a2.setAttribute("values", linearFilterValue + " 1 0"), this.linearFilter = a2, a2.setAttribute("result", i2 + "_tint_1"), t2.appendChild(a2), (a2 = createNS("feColorMatrix")).setAttribute("type", "matrix"), a2.setAttribute("color-interpolation-filters", "sRGB"), a2.setAttribute("values", "1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"), a2.setAttribute("result", i2 + "_tint_2"), t2.appendChild(a2), this.matrixFilter = a2; + var n2 = this.createMergeNode(i2, [s2, i2 + "_tint_1", i2 + "_tint_2"]); + t2.appendChild(n2); + } + function SVGFillFilter(t2, e2, r2, i2) { + this.filterManager = e2; + var s2 = createNS("feColorMatrix"); + s2.setAttribute("type", "matrix"), s2.setAttribute("color-interpolation-filters", "sRGB"), s2.setAttribute("values", "1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"), s2.setAttribute("result", i2), t2.appendChild(s2), this.matrixFilter = s2; + } + function SVGStrokeEffect(t2, e2, r2) { + this.initialized = false, this.filterManager = e2, this.elem = r2, this.paths = []; + } + function SVGTritoneFilter(t2, e2, r2, i2) { + this.filterManager = e2; + var s2 = createNS("feColorMatrix"); + s2.setAttribute("type", "matrix"), s2.setAttribute("color-interpolation-filters", "linearRGB"), s2.setAttribute("values", "0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"), t2.appendChild(s2); + var a2 = createNS("feComponentTransfer"); + a2.setAttribute("color-interpolation-filters", "sRGB"), a2.setAttribute("result", i2), this.matrixFilter = a2; + var n2 = createNS("feFuncR"); + n2.setAttribute("type", "table"), a2.appendChild(n2), this.feFuncR = n2; + var o2 = createNS("feFuncG"); + o2.setAttribute("type", "table"), a2.appendChild(o2), this.feFuncG = o2; + var h2 = createNS("feFuncB"); + h2.setAttribute("type", "table"), a2.appendChild(h2), this.feFuncB = h2, t2.appendChild(a2); + } + function SVGProLevelsFilter(t2, e2, r2, i2) { + this.filterManager = e2; + var s2 = this.filterManager.effectElements, a2 = createNS("feComponentTransfer"); + (s2[10].p.k || 0 !== s2[10].p.v || s2[11].p.k || 1 !== s2[11].p.v || s2[12].p.k || 1 !== s2[12].p.v || s2[13].p.k || 0 !== s2[13].p.v || s2[14].p.k || 1 !== s2[14].p.v) && (this.feFuncR = this.createFeFunc("feFuncR", a2)), (s2[17].p.k || 0 !== s2[17].p.v || s2[18].p.k || 1 !== s2[18].p.v || s2[19].p.k || 1 !== s2[19].p.v || s2[20].p.k || 0 !== s2[20].p.v || s2[21].p.k || 1 !== s2[21].p.v) && (this.feFuncG = this.createFeFunc("feFuncG", a2)), (s2[24].p.k || 0 !== s2[24].p.v || s2[25].p.k || 1 !== s2[25].p.v || s2[26].p.k || 1 !== s2[26].p.v || s2[27].p.k || 0 !== s2[27].p.v || s2[28].p.k || 1 !== s2[28].p.v) && (this.feFuncB = this.createFeFunc("feFuncB", a2)), (s2[31].p.k || 0 !== s2[31].p.v || s2[32].p.k || 1 !== s2[32].p.v || s2[33].p.k || 1 !== s2[33].p.v || s2[34].p.k || 0 !== s2[34].p.v || s2[35].p.k || 1 !== s2[35].p.v) && (this.feFuncA = this.createFeFunc("feFuncA", a2)), (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) && (a2.setAttribute("color-interpolation-filters", "sRGB"), t2.appendChild(a2)), (s2[3].p.k || 0 !== s2[3].p.v || s2[4].p.k || 1 !== s2[4].p.v || s2[5].p.k || 1 !== s2[5].p.v || s2[6].p.k || 0 !== s2[6].p.v || s2[7].p.k || 1 !== s2[7].p.v) && ((a2 = createNS("feComponentTransfer")).setAttribute("color-interpolation-filters", "sRGB"), a2.setAttribute("result", i2), t2.appendChild(a2), this.feFuncRComposed = this.createFeFunc("feFuncR", a2), this.feFuncGComposed = this.createFeFunc("feFuncG", a2), this.feFuncBComposed = this.createFeFunc("feFuncB", a2)); + } + function SVGDropShadowEffect(t2, e2, r2, i2, s2) { + var a2 = e2.container.globalData.renderConfig.filterSize, n2 = e2.data.fs || a2; + t2.setAttribute("x", n2.x || a2.x), t2.setAttribute("y", n2.y || a2.y), t2.setAttribute("width", n2.width || a2.width), t2.setAttribute("height", n2.height || a2.height), this.filterManager = e2; + var o2 = createNS("feGaussianBlur"); + o2.setAttribute("in", "SourceAlpha"), o2.setAttribute("result", i2 + "_drop_shadow_1"), o2.setAttribute("stdDeviation", "0"), this.feGaussianBlur = o2, t2.appendChild(o2); + var h2 = createNS("feOffset"); + h2.setAttribute("dx", "25"), h2.setAttribute("dy", "0"), h2.setAttribute("in", i2 + "_drop_shadow_1"), h2.setAttribute("result", i2 + "_drop_shadow_2"), this.feOffset = h2, t2.appendChild(h2); + var l2 = createNS("feFlood"); + l2.setAttribute("flood-color", "#00ff00"), l2.setAttribute("flood-opacity", "1"), l2.setAttribute("result", i2 + "_drop_shadow_3"), this.feFlood = l2, t2.appendChild(l2); + var p2 = createNS("feComposite"); + p2.setAttribute("in", i2 + "_drop_shadow_3"), p2.setAttribute("in2", i2 + "_drop_shadow_2"), p2.setAttribute("operator", "in"), p2.setAttribute("result", i2 + "_drop_shadow_4"), t2.appendChild(p2); + var c2 = this.createMergeNode(i2, [i2 + "_drop_shadow_4", s2]); + t2.appendChild(c2); + } + extendPrototype([SVGComposableEffect], SVGTintFilter), SVGTintFilter.prototype.renderFrame = function(t2) { + if (t2 || this.filterManager._mdf) { + var e2 = this.filterManager.effectElements[0].p.v, r2 = this.filterManager.effectElements[1].p.v, i2 = this.filterManager.effectElements[2].p.v / 100; + this.linearFilter.setAttribute("values", linearFilterValue + " " + i2 + " 0"), this.matrixFilter.setAttribute("values", r2[0] - e2[0] + " 0 0 0 " + e2[0] + " " + (r2[1] - e2[1]) + " 0 0 0 " + e2[1] + " " + (r2[2] - e2[2]) + " 0 0 0 " + e2[2] + " 0 0 0 1 0"); + } + }, SVGFillFilter.prototype.renderFrame = function(t2) { + if (t2 || this.filterManager._mdf) { + var e2 = this.filterManager.effectElements[2].p.v, r2 = this.filterManager.effectElements[6].p.v; + this.matrixFilter.setAttribute("values", "0 0 0 0 " + e2[0] + " 0 0 0 0 " + e2[1] + " 0 0 0 0 " + e2[2] + " 0 0 0 " + r2 + " 0"); + } + }, SVGStrokeEffect.prototype.initialize = function() { + var t2, e2, r2, i2, s2 = this.elem.layerElement.children || this.elem.layerElement.childNodes; + for (1 === this.filterManager.effectElements[1].p.v ? (i2 = this.elem.maskManager.masksProperties.length, r2 = 0) : i2 = 1 + (r2 = this.filterManager.effectElements[0].p.v - 1), (e2 = createNS("g")).setAttribute("fill", "none"), e2.setAttribute("stroke-linecap", "round"), e2.setAttribute("stroke-dashoffset", 1); r2 < i2; r2 += 1) t2 = createNS("path"), e2.appendChild(t2), this.paths.push({ p: t2, m: r2 }); + if (3 === this.filterManager.effectElements[10].p.v) { + var a2 = createNS("mask"), n2 = createElementID(); + a2.setAttribute("id", n2), a2.setAttribute("mask-type", "alpha"), a2.appendChild(e2), this.elem.globalData.defs.appendChild(a2); + var o2 = createNS("g"); + for (o2.setAttribute("mask", "url(" + getLocationHref() + "#" + n2 + ")"); s2[0]; ) o2.appendChild(s2[0]); + this.elem.layerElement.appendChild(o2), this.masker = a2, e2.setAttribute("stroke", "#fff"); + } else if (1 === this.filterManager.effectElements[10].p.v || 2 === this.filterManager.effectElements[10].p.v) { + if (2 === this.filterManager.effectElements[10].p.v) for (s2 = this.elem.layerElement.children || this.elem.layerElement.childNodes; s2.length; ) this.elem.layerElement.removeChild(s2[0]); + this.elem.layerElement.appendChild(e2), this.elem.layerElement.removeAttribute("mask"), e2.setAttribute("stroke", "#fff"); + } + this.initialized = true, this.pathMasker = e2; + }, SVGStrokeEffect.prototype.renderFrame = function(t2) { + var e2; + this.initialized || this.initialize(); + var r2, i2, s2 = this.paths.length; + for (e2 = 0; e2 < s2; e2 += 1) if (-1 !== this.paths[e2].m && (r2 = this.elem.maskManager.viewData[this.paths[e2].m], i2 = this.paths[e2].p, (t2 || this.filterManager._mdf || r2.prop._mdf) && i2.setAttribute("d", r2.lastPath), t2 || this.filterManager.effectElements[9].p._mdf || this.filterManager.effectElements[4].p._mdf || this.filterManager.effectElements[7].p._mdf || this.filterManager.effectElements[8].p._mdf || r2.prop._mdf)) { + var a2; + if (0 !== this.filterManager.effectElements[7].p.v || 100 !== this.filterManager.effectElements[8].p.v) { + var n2 = 0.01 * Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v), o2 = 0.01 * Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v), h2 = i2.getTotalLength(); + a2 = "0 0 0 " + h2 * n2 + " "; + var l2, p2 = h2 * (o2 - n2), c2 = 1 + 2 * this.filterManager.effectElements[4].p.v * this.filterManager.effectElements[9].p.v * 0.01, f2 = Math.floor(p2 / c2); + for (l2 = 0; l2 < f2; l2 += 1) a2 += "1 " + 2 * this.filterManager.effectElements[4].p.v * this.filterManager.effectElements[9].p.v * 0.01 + " "; + a2 += "0 " + 10 * h2 + " 0 0"; + } else a2 = "1 " + 2 * this.filterManager.effectElements[4].p.v * this.filterManager.effectElements[9].p.v * 0.01; + i2.setAttribute("stroke-dasharray", a2); + } + if ((t2 || this.filterManager.effectElements[4].p._mdf) && this.pathMasker.setAttribute("stroke-width", 2 * this.filterManager.effectElements[4].p.v), (t2 || this.filterManager.effectElements[6].p._mdf) && this.pathMasker.setAttribute("opacity", this.filterManager.effectElements[6].p.v), (1 === this.filterManager.effectElements[10].p.v || 2 === this.filterManager.effectElements[10].p.v) && (t2 || this.filterManager.effectElements[3].p._mdf)) { + var u2 = this.filterManager.effectElements[3].p.v; + this.pathMasker.setAttribute("stroke", "rgb(" + bmFloor(255 * u2[0]) + "," + bmFloor(255 * u2[1]) + "," + bmFloor(255 * u2[2]) + ")"); + } + }, SVGTritoneFilter.prototype.renderFrame = function(t2) { + if (t2 || this.filterManager._mdf) { + var e2 = this.filterManager.effectElements[0].p.v, r2 = this.filterManager.effectElements[1].p.v, i2 = this.filterManager.effectElements[2].p.v, s2 = i2[0] + " " + r2[0] + " " + e2[0], a2 = i2[1] + " " + r2[1] + " " + e2[1], n2 = i2[2] + " " + r2[2] + " " + e2[2]; + this.feFuncR.setAttribute("tableValues", s2), this.feFuncG.setAttribute("tableValues", a2), this.feFuncB.setAttribute("tableValues", n2); + } + }, SVGProLevelsFilter.prototype.createFeFunc = function(t2, e2) { + var r2 = createNS(t2); + return r2.setAttribute("type", "table"), e2.appendChild(r2), r2; + }, SVGProLevelsFilter.prototype.getTableValue = function(t2, e2, r2, i2, s2) { + for (var a2, n2, o2 = 0, h2 = Math.min(t2, e2), l2 = Math.max(t2, e2), p2 = Array.call(null, { length: 256 }), c2 = 0, f2 = s2 - i2, u2 = e2 - t2; o2 <= 256; ) n2 = (a2 = o2 / 256) <= h2 ? u2 < 0 ? s2 : i2 : a2 >= l2 ? u2 < 0 ? i2 : s2 : i2 + f2 * Math.pow((a2 - t2) / u2, 1 / r2), p2[c2] = n2, c2 += 1, o2 += 256 / 255; + return p2.join(" "); + }, SVGProLevelsFilter.prototype.renderFrame = function(t2) { + if (t2 || this.filterManager._mdf) { + var e2, r2 = this.filterManager.effectElements; + this.feFuncRComposed && (t2 || r2[3].p._mdf || r2[4].p._mdf || r2[5].p._mdf || r2[6].p._mdf || r2[7].p._mdf) && (e2 = this.getTableValue(r2[3].p.v, r2[4].p.v, r2[5].p.v, r2[6].p.v, r2[7].p.v), this.feFuncRComposed.setAttribute("tableValues", e2), this.feFuncGComposed.setAttribute("tableValues", e2), this.feFuncBComposed.setAttribute("tableValues", e2)), this.feFuncR && (t2 || r2[10].p._mdf || r2[11].p._mdf || r2[12].p._mdf || r2[13].p._mdf || r2[14].p._mdf) && (e2 = this.getTableValue(r2[10].p.v, r2[11].p.v, r2[12].p.v, r2[13].p.v, r2[14].p.v), this.feFuncR.setAttribute("tableValues", e2)), this.feFuncG && (t2 || r2[17].p._mdf || r2[18].p._mdf || r2[19].p._mdf || r2[20].p._mdf || r2[21].p._mdf) && (e2 = this.getTableValue(r2[17].p.v, r2[18].p.v, r2[19].p.v, r2[20].p.v, r2[21].p.v), this.feFuncG.setAttribute("tableValues", e2)), this.feFuncB && (t2 || r2[24].p._mdf || r2[25].p._mdf || r2[26].p._mdf || r2[27].p._mdf || r2[28].p._mdf) && (e2 = this.getTableValue(r2[24].p.v, r2[25].p.v, r2[26].p.v, r2[27].p.v, r2[28].p.v), this.feFuncB.setAttribute("tableValues", e2)), this.feFuncA && (t2 || r2[31].p._mdf || r2[32].p._mdf || r2[33].p._mdf || r2[34].p._mdf || r2[35].p._mdf) && (e2 = this.getTableValue(r2[31].p.v, r2[32].p.v, r2[33].p.v, r2[34].p.v, r2[35].p.v), this.feFuncA.setAttribute("tableValues", e2)); + } + }, extendPrototype([SVGComposableEffect], SVGDropShadowEffect), SVGDropShadowEffect.prototype.renderFrame = function(t2) { + if (t2 || this.filterManager._mdf) { + if ((t2 || this.filterManager.effectElements[4].p._mdf) && this.feGaussianBlur.setAttribute("stdDeviation", this.filterManager.effectElements[4].p.v / 4), t2 || this.filterManager.effectElements[0].p._mdf) { + var e2 = this.filterManager.effectElements[0].p.v; + this.feFlood.setAttribute("flood-color", rgbToHex(Math.round(255 * e2[0]), Math.round(255 * e2[1]), Math.round(255 * e2[2]))); + } + if ((t2 || this.filterManager.effectElements[1].p._mdf) && this.feFlood.setAttribute("flood-opacity", this.filterManager.effectElements[1].p.v / 255), t2 || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) { + var r2 = this.filterManager.effectElements[3].p.v, i2 = (this.filterManager.effectElements[2].p.v - 90) * degToRads, s2 = r2 * Math.cos(i2), a2 = r2 * Math.sin(i2); + this.feOffset.setAttribute("dx", s2), this.feOffset.setAttribute("dy", a2); + } + } + }; + var _svgMatteSymbols = []; + function SVGMatte3Effect(t2, e2, r2) { + this.initialized = false, this.filterManager = e2, this.filterElem = t2, this.elem = r2, r2.matteElement = createNS("g"), r2.matteElement.appendChild(r2.layerElement), r2.matteElement.appendChild(r2.transformedElement), r2.baseElement = r2.matteElement; + } + function SVGGaussianBlurEffect(t2, e2, r2, i2) { + t2.setAttribute("x", "-100%"), t2.setAttribute("y", "-100%"), t2.setAttribute("width", "300%"), t2.setAttribute("height", "300%"), this.filterManager = e2; + var s2 = createNS("feGaussianBlur"); + s2.setAttribute("result", i2), t2.appendChild(s2), this.feGaussianBlur = s2; + } + function TransformEffect() { + } + function SVGTransformEffect(t2, e2) { + this.init(e2); + } + function CVTransformEffect(t2) { + this.init(t2); + } + return SVGMatte3Effect.prototype.findSymbol = function(t2) { + for (var e2 = 0, r2 = _svgMatteSymbols.length; e2 < r2; ) { + if (_svgMatteSymbols[e2] === t2) return _svgMatteSymbols[e2]; + e2 += 1; + } + return null; + }, SVGMatte3Effect.prototype.replaceInParent = function(t2, e2) { + var r2 = t2.layerElement.parentNode; + if (r2) { + for (var i2, s2 = r2.children, a2 = 0, n2 = s2.length; a2 < n2 && s2[a2] !== t2.layerElement; ) a2 += 1; + a2 <= n2 - 2 && (i2 = s2[a2 + 1]); + var o2 = createNS("use"); + o2.setAttribute("href", "#" + e2), i2 ? r2.insertBefore(o2, i2) : r2.appendChild(o2); + } + }, SVGMatte3Effect.prototype.setElementAsMask = function(t2, e2) { + if (!this.findSymbol(e2)) { + var r2 = createElementID(), i2 = createNS("mask"); + i2.setAttribute("id", e2.layerId), i2.setAttribute("mask-type", "alpha"), _svgMatteSymbols.push(e2); + var s2 = t2.globalData.defs; + s2.appendChild(i2); + var a2 = createNS("symbol"); + a2.setAttribute("id", r2), this.replaceInParent(e2, r2), a2.appendChild(e2.layerElement), s2.appendChild(a2); + var n2 = createNS("use"); + n2.setAttribute("href", "#" + r2), i2.appendChild(n2), e2.data.hd = false, e2.show(); + } + t2.setMatte(e2.layerId); + }, SVGMatte3Effect.prototype.initialize = function() { + for (var t2 = this.filterManager.effectElements[0].p.v, e2 = this.elem.comp.elements, r2 = 0, i2 = e2.length; r2 < i2; ) e2[r2] && e2[r2].data.ind === t2 && this.setElementAsMask(this.elem, e2[r2]), r2 += 1; + this.initialized = true; + }, SVGMatte3Effect.prototype.renderFrame = function() { + this.initialized || this.initialize(); + }, SVGGaussianBlurEffect.prototype.renderFrame = function(t2) { + if (t2 || this.filterManager._mdf) { + var e2 = 0.3 * this.filterManager.effectElements[0].p.v, r2 = this.filterManager.effectElements[1].p.v, i2 = 3 == r2 ? 0 : e2, s2 = 2 == r2 ? 0 : e2; + this.feGaussianBlur.setAttribute("stdDeviation", i2 + " " + s2); + var a2 = 1 == this.filterManager.effectElements[2].p.v ? "wrap" : "duplicate"; + this.feGaussianBlur.setAttribute("edgeMode", a2); + } + }, TransformEffect.prototype.init = function(t2) { + this.effectsManager = t2, this.type = effectTypes.TRANSFORM_EFFECT, this.matrix = new Matrix(), this.opacity = -1, this._mdf = false, this._opMdf = false; + }, TransformEffect.prototype.renderFrame = function(t2) { + if (this._opMdf = false, this._mdf = false, t2 || this.effectsManager._mdf) { + var e2 = this.effectsManager.effectElements, r2 = e2[0].p.v, i2 = e2[1].p.v, s2 = 1 === e2[2].p.v, a2 = e2[3].p.v, n2 = s2 ? a2 : e2[4].p.v, o2 = e2[5].p.v, h2 = e2[6].p.v, l2 = e2[7].p.v; + this.matrix.reset(), this.matrix.translate(-r2[0], -r2[1], r2[2]), this.matrix.scale(0.01 * n2, 0.01 * a2, 1), this.matrix.rotate(-l2 * degToRads), this.matrix.skewFromAxis(-o2 * degToRads, (h2 + 90) * degToRads), this.matrix.translate(i2[0], i2[1], 0), this._mdf = true, this.opacity !== e2[8].p.v && (this.opacity = e2[8].p.v, this._opMdf = true); + } + }, extendPrototype([TransformEffect], SVGTransformEffect), extendPrototype([TransformEffect], CVTransformEffect), registerRenderer("canvas", CanvasRenderer), registerRenderer("html", HybridRenderer), registerRenderer("svg", SVGRenderer), ShapeModifiers.registerModifier("tm", TrimModifier), ShapeModifiers.registerModifier("pb", PuckerAndBloatModifier), ShapeModifiers.registerModifier("rp", RepeaterModifier), ShapeModifiers.registerModifier("rd", RoundCornersModifier), ShapeModifiers.registerModifier("zz", ZigZagModifier), ShapeModifiers.registerModifier("op", OffsetPathModifier), setExpressionsPlugin(Expressions), setExpressionInterfaces(getInterface), initialize$1(), initialize(), registerEffect$1(20, SVGTintFilter, true), registerEffect$1(21, SVGFillFilter, true), registerEffect$1(22, SVGStrokeEffect, false), registerEffect$1(23, SVGTritoneFilter, true), registerEffect$1(24, SVGProLevelsFilter, true), registerEffect$1(25, SVGDropShadowEffect, true), registerEffect$1(28, SVGMatte3Effect, false), registerEffect$1(29, SVGGaussianBlurEffect, true), registerEffect$1(35, SVGTransformEffect, false), registerEffect(35, CVTransformEffect), lottie; + }, module.exports = factory()); +})(lottie$1, lottie$1.exports); +var lottie2 = lottie$1.exports; +var _templateObject$1; +var styles = r$3(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n * {\n box-sizing: border-box;\n }\n\n :host {\n --lottie-player-toolbar-height: 35px;\n --lottie-player-toolbar-background-color: transparent;\n --lottie-player-toolbar-icon-color: #999;\n --lottie-player-toolbar-icon-hover-color: #222;\n --lottie-player-toolbar-icon-active-color: #555;\n --lottie-player-seeker-track-color: #ccc;\n --lottie-player-seeker-thumb-color: rgba(0, 107, 120, 0.8);\n --lottie-player-seeker-display: block;\n\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .main {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n }\n\n .animation {\n width: 100%;\n height: 100%;\n display: flex;\n }\n .animation.controls {\n height: calc(100% - 35px);\n }\n\n .toolbar {\n display: flex;\n align-items: center;\n justify-items: center;\n background-color: var(--lottie-player-toolbar-background-color);\n margin: 0 5px;\n height: 35px;\n }\n\n .toolbar button {\n cursor: pointer;\n fill: var(--lottie-player-toolbar-icon-color);\n display: flex;\n background: none;\n border: 0;\n padding: 0;\n outline: none;\n height: 100%;\n }\n\n .toolbar button:hover {\n fill: var(--lottie-player-toolbar-icon-hover-color);\n }\n\n .toolbar button.active {\n fill: var(--lottie-player-toolbar-icon-active-color);\n }\n\n .toolbar button.active:hover {\n fill: var(--lottie-player-toolbar-icon-hover-color);\n }\n\n .toolbar button:focus {\n outline: 1px dotted var(--lottie-player-toolbar-icon-active-color);\n }\n\n .toolbar button svg {\n }\n\n .toolbar button.disabled svg {\n display: none;\n }\n\n .seeker {\n -webkit-appearance: none;\n width: 95%;\n outline: none;\n background-color: var(--lottie-player-toolbar-background-color);\n display: var(--lottie-player-seeker-display);\n }\n\n .seeker::-webkit-slider-runnable-track {\n width: 100%;\n height: 5px;\n cursor: pointer;\n background: var(--lottie-player-seeker-track-color);\n border-radius: 3px;\n }\n .seeker::-webkit-slider-thumb {\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background: var(--lottie-player-seeker-thumb-color);\n cursor: pointer;\n -webkit-appearance: none;\n margin-top: -5px;\n }\n .seeker:focus::-webkit-slider-runnable-track {\n background: #999;\n }\n .seeker::-moz-range-track {\n width: 100%;\n height: 5px;\n cursor: pointer;\n background: var(--lottie-player-seeker-track-color);\n border-radius: 3px;\n }\n .seeker::-moz-range-thumb {\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background: var(--lottie-player-seeker-thumb-color);\n cursor: pointer;\n }\n .seeker::-ms-track {\n width: 100%;\n height: 5px;\n cursor: pointer;\n background: transparent;\n border-color: transparent;\n color: transparent;\n }\n .seeker::-ms-fill-lower {\n background: var(--lottie-player-seeker-track-color);\n border-radius: 3px;\n }\n .seeker::-ms-fill-upper {\n background: var(--lottie-player-seeker-track-color);\n border-radius: 3px;\n }\n .seeker::-ms-thumb {\n border: 0;\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background: var(--lottie-player-seeker-thumb-color);\n cursor: pointer;\n }\n .seeker:focus::-ms-fill-lower {\n background: var(--lottie-player-seeker-track-color);\n }\n .seeker:focus::-ms-fill-upper {\n background: var(--lottie-player-seeker-track-color);\n }\n\n .error {\n display: flex;\n justify-content: center;\n height: 100%;\n align-items: center;\n }\n"]))); +var name2 = "@lottiefiles/lottie-player"; +var version = "2.0.12"; +var description = "Lottie animation and Telegram Sticker player web components."; +var main = "dist/lottie-player.js"; +var module2 = "dist/lottie-player.esm.js"; +var types = "dist/lottie-player.d.ts"; +var homepage = "https://lottiefiles.com/web-player"; +var repository = "https://github.com/LottieFiles/lottie-player.git"; +var bugs = "https://github.com/LottieFiles/lottie-player/issues"; +var author = "Jawish Hameed "; +var license = "MIT"; +var scripts2 = { start: "npm run cleanup && rollup -c --watch", build: "npm run cleanup && npm run build-lottie && npm run build-tgs", "build-with-coverage": "npm run cleanup && CODE_COVERAGE=true npm run build-lottie && CODE_COVERAGE=true npm run build-tgs", "build-lottie": "rollup -c ", "build-tgs": "rollup -c rollup-tgs.config.js", "watch-lottie": "npm run cleanup && rollup -c --watch", "watch-tgs": "npm run cleanup && rollup -c rollup-tgs.config.js --watch", cleanup: "shx rm -rf dist && shx mkdir dist", release: "semantic-release", lint: "eslint . --ext .ts,.tsx,.js", "lint:fix": "eslint . --ext .ts,.tsx,.js --fix", serve: "node ./cypress/pages/server.js -p 8000 &", "start-cypress": "yarn run cypress run && npx nyc report --reporter=text-summary", "run-tests": "yarn run build-with-coverage && yarn run serve && yarn run start-cypress", "postrun-tests": "kill $(lsof -t -i:8000)" }; +var dependencies = { "@types/pako": "^1.0.1", lit: "^2.1.2", "lottie-web": "^5.12.2", pako: "^2.0.4", "resize-observer-polyfill": "^1.5.1" }; +var devDependencies = { "@babel/core": "^7.11.0", "@babel/plugin-proposal-class-properties": "^7.10.4", "@babel/plugin-proposal-decorators": "^7.10.5", "@babel/preset-env": "^7.11.0", "@babel/preset-typescript": "^7.10.4", "@commitlint/cli": "^16.1.0", "@commitlint/config-conventional": "^16.0.0", "@cypress/code-coverage": "^3.9.12", "@istanbuljs/nyc-config-typescript": "^1.0.2", "@rollup/plugin-babel": "^5.1.0", "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^13.1.3", "@semantic-release/changelog": "^6.0.1", "@semantic-release/commit-analyzer": "^9.0.2", "@semantic-release/git": "^10.0.1", "@semantic-release/github": "^8.0.2", "@semantic-release/npm": "^9.0.0", "@semantic-release/release-notes-generator": "^10.0.3", "babel-eslint": "^10.1.0", "babel-plugin-istanbul": "^6.1.1", cypress: "^9.2.1", "cypress-real-events": "^1.6.0", eslint: "^7.27.0", "eslint-plugin-only-warn": "^1.0.2", fastify: "^3.25.3", "fastify-static": "^4.5.0", husky: ">=4", lerna: "^4.0.0", "lint-staged": "^12.3.2", "parcel-bundler": "^1.12.4", prettier: "^2.3.0", rollup: "^2.23.0", "rollup-plugin-copy": "^3.3.0", "rollup-plugin-filesize": "^9.0.2", "rollup-plugin-serve": "^1.0.3", "rollup-plugin-terser": "^7.0.2", "rollup-plugin-typescript2": "^0.31.1", "rollup-plugin-uglify": "^6.0.4", "rollup-plugin-visualizer": "^5.5.4", "semantic-release": "^19.0.2", shx: "^0.3.4", "source-map-support": "^0.5.21", "ts-node": "^10.4.0", typescript: "^4.5.5", "unicode-canonical-property-names-ecmascript": "^2.0.0" }; +var files = ["dist/"]; +var keywords = ["lottie", "animation", "lottiefiles", "web component", "component", "lit-element", "player", "telegram sticker", "tgs"]; +var browserslist = ["> 3%"]; +var publishConfig = { access: "public", provenance: true }; +var husky = { hooks: { "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", "pre-commit": "lint-staged" } }; +var nyc = { extends: "@istanbuljs/nyc-config-typescript", all: true }; +var packageManager = "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"; +var _package = { name: name2, version, description, main, module: module2, types, homepage, repository, bugs, author, license, scripts: scripts2, dependencies, devDependencies, files, keywords, browserslist, publishConfig, husky, "lint-staged": { "src/**/*.{css,scss,md}": ["prettier --write"], "src/**/*.{js,jsx,ts,tsx,json}": ["eslint . --ext .ts,.tsx,.js --fix"] }, nyc, packageManager }; +var _templateObject; +var _templateObject2; +var _templateObject3; +var _templateObject4; +var _templateObject5; +var PlayerState; +var PlayMode; +var PlayerEvents; +function parseSrc(t2) { + if ("object" == typeof t2) return t2; + try { + return JSON.parse(t2); + } catch (e2) { + return new URL(t2, window.location.href).toString(); + } +} +function isLottie(t2) { + return ["v", "ip", "op", "layers", "fr", "w", "h"].every((e2) => Object.prototype.hasOwnProperty.call(t2, e2)); +} +function fromURL(t2) { + return _fromURL.apply(this, arguments); +} +function _fromURL() { + return (_fromURL = _asyncToGenerator(function* (t2) { + if ("string" != typeof t2) throw new Error("The url value must be a string"); + var e2; + try { + var r2 = new URL(t2), i2 = yield fetch(r2.toString()); + e2 = yield i2.json(); + } catch (t3) { + throw new Error("An error occurred while trying to load the Lottie file from URL"); + } + return e2; + })).apply(this, arguments); +} +!function(t2) { + t2.Destroyed = "destroyed", t2.Error = "error", t2.Frozen = "frozen", t2.Loading = "loading", t2.Paused = "paused", t2.Playing = "playing", t2.Stopped = "stopped"; +}(PlayerState || (PlayerState = {})), function(t2) { + t2.Bounce = "bounce", t2.Normal = "normal"; +}(PlayMode || (PlayMode = {})), function(t2) { + t2.Complete = "complete", t2.Destroyed = "destroyed", t2.Error = "error", t2.Frame = "frame", t2.Freeze = "freeze", t2.Load = "load", t2.Loop = "loop", t2.Pause = "pause", t2.Play = "play", t2.Ready = "ready", t2.Rendered = "rendered", t2.Stop = "stop"; +}(PlayerEvents || (PlayerEvents = {})); +var LottiePlayer = class extends s { + constructor() { + super(...arguments), this.autoplay = false, this.background = "transparent", this.controls = false, this.currentState = PlayerState.Loading, this.description = "Lottie animation", this.direction = 1, this.disableCheck = false, this.disableShadowDOM = false, this.hover = false, this.intermission = 1, this.loop = false, this.mode = PlayMode.Normal, this.preserveAspectRatio = "xMidYMid meet", this.renderer = "svg", this.speed = 1, this._io = void 0, this._counter = 1, this._onVisibilityChange = () => { + true === document.hidden && this.currentState === PlayerState.Playing ? this.freeze() : this.currentState === PlayerState.Frozen && this.play(); + }; + } + load(t2) { + var e2 = this; + return _asyncToGenerator(function* () { + var r2 = { container: e2.container, loop: false, autoplay: false, renderer: e2.renderer, rendererSettings: Object.assign({ preserveAspectRatio: e2.preserveAspectRatio, clearCanvas: false, progressiveLoad: true, hideOnTransparent: true }, e2.viewBoxSize && { viewBoxSize: e2.viewBoxSize }) }; + try { + var i2 = parseSrc(t2), s2 = {}, a2 = "string" == typeof i2 ? "path" : "animationData"; + e2._lottie && e2._lottie.destroy(), e2.webworkers && lottie$1.exports.useWebWorker(true), e2._lottie = lottie$1.exports.loadAnimation(Object.assign(Object.assign({}, r2), { [a2]: i2 })), e2._attachEventListeners(), e2.disableCheck || ("path" === a2 ? (s2 = yield fromURL(i2), a2 = "animationData") : s2 = i2, isLottie(s2) || (e2.currentState = PlayerState.Error, e2.dispatchEvent(new CustomEvent(PlayerEvents.Error)))); + } catch (t3) { + e2.currentState = PlayerState.Error, e2.dispatchEvent(new CustomEvent(PlayerEvents.Error)); + } + })(); + } + getLottie() { + return this._lottie; + } + getVersions() { + return { lottieWebVersion: dependencies["lottie-web"], lottiePlayerVersion: version }; + } + play() { + this._lottie && (this._lottie.play(), this.currentState = PlayerState.Playing, this.dispatchEvent(new CustomEvent(PlayerEvents.Play))); + } + pause() { + this._lottie && (this._lottie.pause(), this.currentState = PlayerState.Paused, this.dispatchEvent(new CustomEvent(PlayerEvents.Pause))); + } + stop() { + this._lottie && (this._counter = 1, this._lottie.stop(), this.currentState = PlayerState.Stopped, this.dispatchEvent(new CustomEvent(PlayerEvents.Stop))); + } + destroy() { + this._lottie && (this._lottie.destroy(), this._lottie = null, this.currentState = PlayerState.Destroyed, this.dispatchEvent(new CustomEvent(PlayerEvents.Destroyed)), this.remove()); + } + seek(t2) { + if (this._lottie) { + var e2 = /^(\d+)(%?)$/.exec(t2.toString()); + if (e2) { + var r2 = "%" === e2[2] ? this._lottie.totalFrames * Number(e2[1]) / 100 : Number(e2[1]); + this.seeker = r2, this.currentState === PlayerState.Playing ? this._lottie.goToAndPlay(r2, true) : (this._lottie.goToAndStop(r2, true), this._lottie.pause()); + } + } + } + snapshot() { + var t2 = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0]; + if (this.shadowRoot) { + var e2 = this.shadowRoot.querySelector(".animation svg"), r2 = new XMLSerializer().serializeToString(e2); + if (t2) { + var i2 = document.createElement("a"); + i2.href = "data:image/svg+xml;charset=utf-8,".concat(encodeURIComponent(r2)), i2.download = "download_".concat(this.seeker, ".svg"), document.body.appendChild(i2), i2.click(), document.body.removeChild(i2); + } + return r2; + } + } + setSpeed() { + var t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1; + this._lottie && this._lottie.setSpeed(t2); + } + setDirection(t2) { + this._lottie && this._lottie.setDirection(t2); + } + setLooping(t2) { + this._lottie && (this.loop = t2, this._lottie.loop = t2); + } + togglePlay() { + return this.currentState === PlayerState.Playing ? this.pause() : this.play(); + } + toggleLooping() { + this.setLooping(!this.loop); + } + resize() { + this._lottie && this._lottie.resize(); + } + static get styles() { + return styles; + } + disconnectedCallback() { + this.isConnected || (this._io && (this._io.disconnect(), this._io = void 0), document.removeEventListener("visibilitychange", this._onVisibilityChange), this.destroy()); + } + render() { + var t2 = this.controls ? "main controls" : "main", e2 = this.controls ? "animation controls" : "animation"; + return $(_templateObject || (_templateObject = _taggedTemplateLiteral([' \n \n ', "\n \n ", "\n "])), t2, this.description, e2, this.background, this.currentState === PlayerState.Error ? $(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(['
⚠️
']))) : void 0, this.controls && !this.disableShadowDOM ? this.renderControls() : void 0); + } + createRenderRoot() { + return this.disableShadowDOM && (this.style.display = "block"), this.disableShadowDOM ? this : super.createRenderRoot(); + } + firstUpdated() { + "IntersectionObserver" in window && (this._io = new IntersectionObserver((t2) => { + t2[0].isIntersecting ? this.currentState === PlayerState.Frozen && this.play() : this.currentState === PlayerState.Playing && this.freeze(); + }), this._io.observe(this.container)), void 0 !== document.hidden && document.addEventListener("visibilitychange", this._onVisibilityChange), this.src && this.load(this.src), this.dispatchEvent(new CustomEvent(PlayerEvents.Rendered)); + } + renderControls() { + var t2 = this.currentState === PlayerState.Playing, e2 = this.currentState === PlayerState.Paused, r2 = this.currentState === PlayerState.Stopped; + return $(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(['\n \n \n ', '\n \n \n \n \n \n \n \n \n \n '])), this.togglePlay, t2 || e2 ? "active" : "", $(t2 ? _templateObject4 || (_templateObject4 = _taggedTemplateLiteral(['