@lottiefiles/lottie-player 2.0.0 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lottie-player.esm.js","sources":["../node_modules/tslib/tslib.es6.js","../node_modules/@lit/reactive-element/css-tag.js","../node_modules/@lit/reactive-element/reactive-element.js","../node_modules/lit-html/lit-html.js","../node_modules/lit-element/lit-element.js","../node_modules/@lit/reactive-element/decorators/custom-element.js","../node_modules/@lit/reactive-element/decorators/property.js","../node_modules/@lit/reactive-element/decorators/state.js","../node_modules/@lit/reactive-element/decorators/base.js","../node_modules/@lit/reactive-element/decorators/event-options.js","../node_modules/@lit/reactive-element/decorators/query.js","../node_modules/@lit/reactive-element/decorators/query-all.js","../node_modules/@lit/reactive-element/decorators/query-async.js","../node_modules/@lit/reactive-element/decorators/query-assigned-elements.js","../node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js","../node_modules/lottie-web/build/player/lottie.js","../src/lottie-player.styles.ts","../src/versions.ts","../src/lottie-player.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,e=Symbol(),n=new Map;class s{constructor(t,n){if(this._$cssResult$=!0,n!==e)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t}get styleSheet(){let e=n.get(this.cssText);return t&&void 0===e&&(n.set(this.cssText,e=new CSSStyleSheet),e.replaceSync(this.cssText)),e}toString(){return this.cssText}}const o=t=>new s(\"string\"==typeof t?t:t+\"\",e),r=(t,...n)=>{const o=1===t.length?t[0]:n.reduce(((e,n,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(n)+t[s+1]),t[0]);return new s(o,e)},i=(e,n)=>{t?e.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((t=>{const n=document.createElement(\"style\"),s=window.litNonce;void 0!==s&&n.setAttribute(\"nonce\",s),n.textContent=t.cssText,e.appendChild(n)}))},S=t?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const n of t.cssRules)e+=n.cssText;return o(e)})(t):t;export{s as CSSResult,i as adoptStyles,r as css,S as getCompatibleStyle,t as supportsAdoptingStyleSheets,o as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as i}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var s;const e=window.trustedTypes,r=e?e.emptyScript:\"\",h=window.reactiveElementPolyfillSupport,o={toAttribute(t,i){switch(i){case Boolean:t=t?r:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},n=(t,i)=>i!==t&&(i==i||t==t),l={attribute:!0,type:String,converter:o,reflect:!1,hasChanged:n};class a extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var i;null!==(i=this.l)&&void 0!==i||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const e=this._$Eh(s,i);void 0!==e&&(this._$Eu.set(e,s),t.push(e))})),t}static createProperty(t,i=l){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=\"symbol\"==typeof t?Symbol():\"__\"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,i,s){return{get(){return this[i]},set(e){const r=this[t];this[i]=e,this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||l}static finalize(){if(this.hasOwnProperty(\"finalized\"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty(\"properties\")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(i){const s=[];if(Array.isArray(i)){const e=new Set(i.flat(1/0).reverse());for(const i of e)s.unshift(t(i))}else void 0!==i&&s.push(t(i));return s}static _$Eh(t,i){const s=i.attribute;return!1===s?void 0:\"string\"==typeof s?s:\"string\"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,s;(null!==(i=this._$Eg)&&void 0!==i?i:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var i;null===(i=this._$Eg)||void 0===i||i.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Et.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const s=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return i(s,this.constructor.elementStyles),s}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,s){this._$AK(t,s)}_$ES(t,i,s=l){var e,r;const h=this.constructor._$Eh(t,s);if(void 0!==h&&!0===s.reflect){const n=(null!==(r=null===(e=s.converter)||void 0===e?void 0:e.toAttribute)&&void 0!==r?r:o.toAttribute)(i,s.type);this._$Ei=t,null==n?this.removeAttribute(h):this.setAttribute(h,n),this._$Ei=null}}_$AK(t,i){var s,e,r;const h=this.constructor,n=h._$Eu.get(t);if(void 0!==n&&this._$Ei!==n){const t=h.getPropertyOptions(n),l=t.converter,a=null!==(r=null!==(e=null===(s=l)||void 0===s?void 0:s.fromAttribute)&&void 0!==e?e:\"function\"==typeof l?l:null)&&void 0!==r?r:o.fromAttribute;this._$Ei=n,this[n]=a(i,t.type),this._$Ei=null}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||n)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===s.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,s))):e=!1),!this.isUpdatePending&&e&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,i)=>this[i]=t)),this._$Et=void 0);let i=!1;const s=this._$AL;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this._$EU()}catch(t){throw i=!1,this._$EU(),t}i&&this._$AE(s)}willUpdate(t){}_$AE(t){var i;null===(i=this._$Eg)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$E_&&(this._$E_.forEach(((t,i)=>this._$ES(i,this[i],t))),this._$E_=void 0),this._$EU()}updated(t){}firstUpdated(t){}}a.finalized=!0,a.elementProperties=new Map,a.elementStyles=[],a.shadowRootOptions={mode:\"open\"},null==h||h({ReactiveElement:a}),(null!==(s=globalThis.reactiveElementVersions)&&void 0!==s?s:globalThis.reactiveElementVersions=[]).push(\"1.2.1\");export{a as ReactiveElement,o as defaultConverter,n as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar t;const i=globalThis.trustedTypes,s=i?i.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,e=`lit$${(Math.random()+\"\").slice(9)}$`,o=\"?\"+e,n=`<${o}>`,l=document,h=(t=\"\")=>l.createComment(t),r=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,d=Array.isArray,u=t=>{var i;return d(t)||\"function\"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])},c=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,v=/-->/g,a=/>/g,f=/>|[ \t\\n\f\\r](?:([^\\s\"'>=/]+)([ \t\\n\f\\r]*=[ \t\\n\f\\r]*(?:[^ \t\\n\f\\r\"'`<>=]|(\"|')|))|$)/g,_=/'/g,m=/\"/g,g=/^(?:script|style|textarea)$/i,p=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),$=p(1),y=p(2),b=Symbol.for(\"lit-noChange\"),w=Symbol.for(\"lit-nothing\"),T=new WeakMap,x=(t,i,s)=>{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new N(i.insertBefore(h(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l},A=l.createTreeWalker(l,129,null,!1),C=(t,i)=>{const o=t.length-1,l=[];let h,r=2===i?\"<svg>\":\"\",d=c;for(let i=0;i<o;i++){const s=t[i];let o,u,p=-1,$=0;for(;$<s.length&&(d.lastIndex=$,u=d.exec(s),null!==u);)$=d.lastIndex,d===c?\"!--\"===u[1]?d=v:void 0!==u[1]?d=a:void 0!==u[2]?(g.test(u[2])&&(h=RegExp(\"</\"+u[2],\"g\")),d=f):void 0!==u[3]&&(d=f):d===f?\">\"===u[0]?(d=null!=h?h:c,p=-1):void 0===u[1]?p=-2:(p=d.lastIndex-u[2].length,o=u[1],d=void 0===u[3]?f:'\"'===u[3]?m:_):d===m||d===_?d=f:d===v||d===a?d=c:(d=f,h=void 0);const y=d===f&&t[i+1].startsWith(\"/>\")?\" \":\"\";r+=d===c?s+n:p>=0?(l.push(o),s.slice(0,p)+\"$lit$\"+s.slice(p)+e+y):s+e+(-2===p?(l.push(void 0),i):y)}const u=r+(t[o]||\"<?>\")+(2===i?\"</svg>\":\"\");if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return[void 0!==s?s.createHTML(u):u,l]};class E{constructor({strings:t,_$litType$:s},n){let l;this.parts=[];let r=0,d=0;const u=t.length-1,c=this.parts,[v,a]=C(t,s);if(this.el=E.createElement(v,n),A.currentNode=this.el.content,2===s){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(l=A.nextNode())&&c.length<u;){if(1===l.nodeType){if(l.hasAttributes()){const t=[];for(const i of l.getAttributeNames())if(i.endsWith(\"$lit$\")||i.startsWith(e)){const s=a[d++];if(t.push(i),void 0!==s){const t=l.getAttribute(s.toLowerCase()+\"$lit$\").split(e),i=/([.?@])?(.*)/.exec(s);c.push({type:1,index:r,name:i[2],strings:t,ctor:\".\"===i[1]?M:\"?\"===i[1]?H:\"@\"===i[1]?I:S})}else c.push({type:6,index:r})}for(const i of t)l.removeAttribute(i)}if(g.test(l.tagName)){const t=l.textContent.split(e),s=t.length-1;if(s>0){l.textContent=i?i.emptyScript:\"\";for(let i=0;i<s;i++)l.append(t[i],h()),A.nextNode(),c.push({type:2,index:++r});l.append(t[s],h())}}}else if(8===l.nodeType)if(l.data===o)c.push({type:2,index:r});else{let t=-1;for(;-1!==(t=l.data.indexOf(e,t+1));)c.push({type:7,index:r}),t+=e.length-1}r++}}static createElement(t,i){const s=l.createElement(\"template\");return s.innerHTML=t,s}}function P(t,i,s=t,e){var o,n,l,h;if(i===b)return i;let d=void 0!==e?null===(o=s._$Cl)||void 0===o?void 0:o[e]:s._$Cu;const u=r(i)?void 0:i._$litDirective$;return(null==d?void 0:d.constructor)!==u&&(null===(n=null==d?void 0:d._$AO)||void 0===n||n.call(d,!1),void 0===u?d=void 0:(d=new u(t),d._$AT(t,s,e)),void 0!==e?(null!==(l=(h=s)._$Cl)&&void 0!==l?l:h._$Cl=[])[e]=d:s._$Cu=d),void 0!==d&&(i=P(t,d._$AS(t,i.values),d,e)),i}class V{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:s},parts:e}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:l).importNode(s,!0);A.currentNode=o;let n=A.nextNode(),h=0,r=0,d=e[0];for(;void 0!==d;){if(h===d.index){let i;2===d.type?i=new N(n,n.nextSibling,this,t):1===d.type?i=new d.ctor(n,d.name,d.strings,this,t):6===d.type&&(i=new L(n,this,t)),this.v.push(i),d=e[++r]}h!==(null==d?void 0:d.index)&&(n=A.nextNode(),h++)}return o}m(t){let i=0;for(const s of this.v)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class N{constructor(t,i,s,e){var o;this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cg=null===(o=null==e?void 0:e.isConnected)||void 0===o||o}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=P(this,t,i),r(t)?t===w||null==t||\"\"===t?(this._$AH!==w&&this._$AR(),this._$AH=w):t!==this._$AH&&t!==b&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):u(t)?this.A(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==w&&r(this._$AH)?this._$AA.nextSibling.data=t:this.S(l.createTextNode(t)),this._$AH=t}T(t){var i;const{values:s,_$litType$:e}=t,o=\"number\"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=E.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.m(s);else{const t=new V(o,this),i=t.p(this.options);t.m(s),this.S(i),this._$AH=t}}_$AC(t){let i=T.get(t.strings);return void 0===i&&T.set(t.strings,i=new E(t)),i}A(t){d(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const o of t)e===i.length?i.push(s=new N(this.M(h()),this.M(h()),this,this.options)):s=i[e],s._$AI(o),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class S{constructor(t,i,s,e,o){this.type=1,this._$AH=w,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=o,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=w}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=P(this,t,i,0),n=!r(t)||t!==this._$AH&&t!==b,n&&(this._$AH=t);else{const e=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=P(this,e[s+l],i,l),h===b&&(h=this._$AH[l]),n||(n=!r(h)||h!==this._$AH[l]),h===w?t=w:t!==w&&(t+=(null!=h?h:\"\")+o[l+1]),this._$AH[l]=h}n&&!e&&this.k(t)}k(t){t===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:\"\")}}class M extends S{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===w?void 0:t}}const k=i?i.emptyScript:\"\";class H extends S{constructor(){super(...arguments),this.type=4}k(t){t&&t!==w?this.element.setAttribute(this.name,k):this.element.removeAttribute(this.name)}}class I extends S{constructor(t,i,s,e,o){super(t,i,s,e,o),this.type=5}_$AI(t,i=this){var s;if((t=null!==(s=P(this,t,i,0))&&void 0!==s?s:w)===b)return;const e=this._$AH,o=t===w&&e!==w||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==w&&(e===w||o);o&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,s;\"function\"==typeof this._$AH?this._$AH.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class L{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){P(this,t)}}const R={P:\"$lit$\",V:e,L:o,I:1,N:C,R:V,D:u,j:P,H:N,O:S,F:H,B:I,W:M,Z:L},z=window.litHtmlPolyfillSupport;null==z||z(E,N),(null!==(t=globalThis.litHtmlVersions)&&void 0!==t?t:globalThis.litHtmlVersions=[]).push(\"2.1.2\");export{R as _$LH,$ as html,b as noChange,w as nothing,x as render,y as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as i}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var l,o;const r=t;class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=e(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return i}}s.finalized=!0,s._$litElement$=!0,null===(l=globalThis.litElementHydrateSupport)||void 0===l||l.call(globalThis,{LitElement:s});const n=globalThis.litElementPolyfillSupport;null==n||n({LitElement:s});const h={_$AK:(t,e,i)=>{t._$AK(e,i)},_$AL:t=>t._$AL};(null!==(o=globalThis.litElementVersions)&&void 0!==o?o:globalThis.litElementVersions=[]).push(\"3.1.2\");export{s as LitElement,r as UpdatingElement,h as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst n=n=>e=>\"function\"==typeof e?((n,e)=>(window.customElements.define(n,e),e))(n,e):((n,e)=>{const{kind:t,elements:i}=e;return{kind:t,elements:i,finisher(e){window.customElements.define(n,e)}}})(n,e);export{n as customElement};\n//# sourceMappingURL=custom-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst i=(i,e)=>\"method\"===e.kind&&e.descriptor&&!(\"value\"in e.descriptor)?{...e,finisher(n){n.createProperty(e.key,i)}}:{kind:\"field\",key:Symbol(),placement:\"own\",descriptor:{},originalKey:e.key,initializer(){\"function\"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(n){n.createProperty(e.key,i)}};function e(e){return(n,t)=>void 0!==t?((i,e,n)=>{e.constructor.createProperty(n,i)})(e,n,t):i(e,n)}export{e as property};\n//# sourceMappingURL=property.js.map\n","import{property as r}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function t(t){return r({...t,state:!0})}export{t as state};\n//# sourceMappingURL=state.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=(e,t,o)=>{Object.defineProperty(t,o,e)},t=(e,t)=>({kind:\"method\",placement:\"prototype\",key:t.key,descriptor:e}),o=({finisher:e,descriptor:t})=>(o,n)=>{var r;if(void 0===n){const n=null!==(r=o.originalKey)&&void 0!==r?r:o.key,i=null!=t?{kind:\"method\",placement:\"prototype\",key:n,descriptor:t(o.key)}:{...o,key:n};return null!=e&&(i.finisher=function(t){e(t,n)}),i}{const r=o.constructor;void 0!==t&&Object.defineProperty(o,n,t(n)),null==e||e(r,n)}};export{o as decorateProperty,e as legacyPrototypeMethod,t as standardPrototypeMethod};\n//# sourceMappingURL=base.js.map\n","import{decorateProperty as r}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function e(e){return r({finisher:(r,t)=>{Object.assign(r.prototype[t],e)}})}export{e as eventOptions};\n//# sourceMappingURL=event-options.js.map\n","import{decorateProperty as o}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function i(i,n){return o({descriptor:o=>{const t={get(){var o,n;return null!==(n=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(i))&&void 0!==n?n:null},enumerable:!0,configurable:!0};if(n){const n=\"symbol\"==typeof o?Symbol():\"__\"+o;t.get=function(){var o,t;return void 0===this[n]&&(this[n]=null!==(t=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(i))&&void 0!==t?t:null),this[n]}}return t}})}export{i as query};\n//# sourceMappingURL=query.js.map\n","import{decorateProperty as r}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function e(e){return r({descriptor:r=>({get(){var r,o;return null!==(o=null===(r=this.renderRoot)||void 0===r?void 0:r.querySelectorAll(e))&&void 0!==o?o:[]},enumerable:!0,configurable:!0})})}export{e as queryAll};\n//# sourceMappingURL=query-all.js.map\n","import{decorateProperty as r}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nfunction e(e){return r({descriptor:r=>({async get(){var r;return await this.updateComplete,null===(r=this.renderRoot)||void 0===r?void 0:r.querySelector(e)},enumerable:!0,configurable:!0})})}export{e as queryAsync};\n//# sourceMappingURL=query-async.js.map\n","import{decorateProperty as o}from\"./base.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var n;const e=null!=(null===(n=window.HTMLSlotElement)||void 0===n?void 0:n.prototype.assignedElements)?(o,n)=>o.assignedElements(n):(o,n)=>o.assignedNodes(n).filter((o=>o.nodeType===Node.ELEMENT_NODE));function l(n){const{slot:l,selector:t}=null!=n?n:{};return o({descriptor:o=>({get(){var o;const r=\"slot\"+(l?`[name=${l}]`:\":not([name])\"),i=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(r),s=null!=i?e(i,n):[];return t?s.filter((o=>o.matches(t))):s},enumerable:!0,configurable:!0})})}export{l as queryAssignedElements};\n//# sourceMappingURL=query-assigned-elements.js.map\n","import{decorateProperty as e}from\"./base.js\";import{queryAssignedElements as t}from\"./query-assigned-elements.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function o(o,n,r){let l,s=o;return\"object\"==typeof o?(s=o.slot,l=o):l={flatten:n},r?t({slot:s,flatten:n,selector:r}):e({descriptor:e=>({get(){var e,t;const o=\"slot\"+(s?`[name=${s}]`:\":not([name])\"),n=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(o);return null!==(t=null==n?void 0:n.assignedNodes(l))&&void 0!==t?t:[]},enumerable:!0,configurable:!0})})}export{o as queryAssignedNodes};\n//# sourceMappingURL=query-assigned-nodes.js.map\n","(typeof navigator !== \"undefined\") && (function (global, factory) {\r\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\r\n typeof define === 'function' && define.amd ? define(factory) :\r\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lottie = factory());\r\n})(this, (function () { 'use strict';\r\n\r\n var svgNS = 'http://www.w3.org/2000/svg';\r\n var locationHref = '';\r\n var _useWebWorker = false;\r\n var initialDefaultFrame = -999999;\r\n\r\n var setWebWorker = function setWebWorker(flag) {\r\n _useWebWorker = !!flag;\r\n };\r\n\r\n var getWebWorker = function getWebWorker() {\r\n return _useWebWorker;\r\n };\r\n\r\n var setLocationHref = function setLocationHref(value) {\r\n locationHref = value;\r\n };\r\n\r\n var getLocationHref = function getLocationHref() {\r\n return locationHref;\r\n };\r\n\r\n function createTag(type) {\r\n // return {appendChild:function(){},setAttribute:function(){},style:{}}\r\n return document.createElement(type);\r\n }\r\n\r\n function extendPrototype(sources, destination) {\r\n var i;\r\n var len = sources.length;\r\n var sourcePrototype;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n sourcePrototype = sources[i].prototype;\r\n\r\n for (var attr in sourcePrototype) {\r\n if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];\r\n }\r\n }\r\n }\r\n\r\n function getDescriptor(object, prop) {\r\n return Object.getOwnPropertyDescriptor(object, prop);\r\n }\r\n\r\n function createProxyFunction(prototype) {\r\n function ProxyFunction() {}\r\n\r\n ProxyFunction.prototype = prototype;\r\n return ProxyFunction;\r\n }\r\n\r\n // import Howl from '../../3rd_party/howler';\r\n var audioControllerFactory = function () {\r\n function AudioController(audioFactory) {\r\n this.audios = [];\r\n this.audioFactory = audioFactory;\r\n this._volume = 1;\r\n this._isMuted = false;\r\n }\r\n\r\n AudioController.prototype = {\r\n addAudio: function addAudio(audio) {\r\n this.audios.push(audio);\r\n },\r\n pause: function pause() {\r\n var i;\r\n var len = this.audios.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.audios[i].pause();\r\n }\r\n },\r\n resume: function resume() {\r\n var i;\r\n var len = this.audios.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.audios[i].resume();\r\n }\r\n },\r\n setRate: function setRate(rateValue) {\r\n var i;\r\n var len = this.audios.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.audios[i].setRate(rateValue);\r\n }\r\n },\r\n createAudio: function createAudio(assetPath) {\r\n if (this.audioFactory) {\r\n return this.audioFactory(assetPath);\r\n }\r\n\r\n if (window.Howl) {\r\n return new window.Howl({\r\n src: [assetPath]\r\n });\r\n }\r\n\r\n return {\r\n isPlaying: false,\r\n play: function play() {\r\n this.isPlaying = true;\r\n },\r\n seek: function seek() {\r\n this.isPlaying = false;\r\n },\r\n playing: function playing() {},\r\n rate: function rate() {},\r\n setVolume: function setVolume() {}\r\n };\r\n },\r\n setAudioFactory: function setAudioFactory(audioFactory) {\r\n this.audioFactory = audioFactory;\r\n },\r\n setVolume: function setVolume(value) {\r\n this._volume = value;\r\n\r\n this._updateVolume();\r\n },\r\n mute: function mute() {\r\n this._isMuted = true;\r\n\r\n this._updateVolume();\r\n },\r\n unmute: function unmute() {\r\n this._isMuted = false;\r\n\r\n this._updateVolume();\r\n },\r\n getVolume: function getVolume() {\r\n return this._volume;\r\n },\r\n _updateVolume: function _updateVolume() {\r\n var i;\r\n var len = this.audios.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));\r\n }\r\n }\r\n };\r\n return function () {\r\n return new AudioController();\r\n };\r\n }();\r\n\r\n var createTypedArray = function () {\r\n function createRegularArray(type, len) {\r\n var i = 0;\r\n var arr = [];\r\n var value;\r\n\r\n switch (type) {\r\n case 'int16':\r\n case 'uint8c':\r\n value = 1;\r\n break;\r\n\r\n default:\r\n value = 1.1;\r\n break;\r\n }\r\n\r\n for (i = 0; i < len; i += 1) {\r\n arr.push(value);\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n function createTypedArrayFactory(type, len) {\r\n if (type === 'float32') {\r\n return new Float32Array(len);\r\n }\r\n\r\n if (type === 'int16') {\r\n return new Int16Array(len);\r\n }\r\n\r\n if (type === 'uint8c') {\r\n return new Uint8ClampedArray(len);\r\n }\r\n\r\n return createRegularArray(type, len);\r\n }\r\n\r\n if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {\r\n return createTypedArrayFactory;\r\n }\r\n\r\n return createRegularArray;\r\n }();\r\n\r\n function createSizedArray(len) {\r\n return Array.apply(null, {\r\n length: len\r\n });\r\n }\r\n\r\n function _typeof$6(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$6 = function _typeof(obj) { return typeof obj; }; } else { _typeof$6 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$6(obj); }\r\n var subframeEnabled = true;\r\n var expressionsPlugin = null;\r\n var expressionsInterfaces = null;\r\n var idPrefix$1 = '';\r\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\r\n var _shouldRoundValues = false;\r\n var bmPow = Math.pow;\r\n var bmSqrt = Math.sqrt;\r\n var bmFloor = Math.floor;\r\n var bmMax = Math.max;\r\n var bmMin = Math.min;\r\n var BMMath = {};\r\n\r\n (function () {\r\n var propertyNames = ['abs', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atanh', 'atan2', 'ceil', 'cbrt', 'expm1', 'clz32', 'cos', 'cosh', 'exp', 'floor', 'fround', 'hypot', 'imul', 'log', 'log1p', 'log2', 'log10', 'max', 'min', 'pow', 'random', 'round', 'sign', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc', 'E', 'LN10', 'LN2', 'LOG10E', 'LOG2E', 'PI', 'SQRT1_2', 'SQRT2'];\r\n var i;\r\n var len = propertyNames.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n BMMath[propertyNames[i]] = Math[propertyNames[i]];\r\n }\r\n })();\r\n\r\n function ProjectInterface$1() {\r\n return {};\r\n }\r\n\r\n BMMath.random = Math.random;\r\n\r\n BMMath.abs = function (val) {\r\n var tOfVal = _typeof$6(val);\r\n\r\n if (tOfVal === 'object' && val.length) {\r\n var absArr = createSizedArray(val.length);\r\n var i;\r\n var len = val.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n absArr[i] = Math.abs(val[i]);\r\n }\r\n\r\n return absArr;\r\n }\r\n\r\n return Math.abs(val);\r\n };\r\n\r\n var defaultCurveSegments = 150;\r\n var degToRads = Math.PI / 180;\r\n var roundCorner = 0.5519;\r\n\r\n function roundValues(flag) {\r\n _shouldRoundValues = !!flag;\r\n }\r\n\r\n function bmRnd(value) {\r\n if (_shouldRoundValues) {\r\n return Math.round(value);\r\n }\r\n\r\n return value;\r\n }\r\n\r\n function styleDiv(element) {\r\n element.style.position = 'absolute';\r\n element.style.top = 0;\r\n element.style.left = 0;\r\n element.style.display = 'block';\r\n element.style.transformOrigin = '0 0';\r\n element.style.webkitTransformOrigin = '0 0';\r\n element.style.backfaceVisibility = 'visible';\r\n element.style.webkitBackfaceVisibility = 'visible';\r\n element.style.transformStyle = 'preserve-3d';\r\n element.style.webkitTransformStyle = 'preserve-3d';\r\n element.style.mozTransformStyle = 'preserve-3d';\r\n }\r\n\r\n function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {\r\n this.type = type;\r\n this.currentTime = currentTime;\r\n this.totalTime = totalTime;\r\n this.direction = frameMultiplier < 0 ? -1 : 1;\r\n }\r\n\r\n function BMCompleteEvent(type, frameMultiplier) {\r\n this.type = type;\r\n this.direction = frameMultiplier < 0 ? -1 : 1;\r\n }\r\n\r\n function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {\r\n this.type = type;\r\n this.currentLoop = currentLoop;\r\n this.totalLoops = totalLoops;\r\n this.direction = frameMultiplier < 0 ? -1 : 1;\r\n }\r\n\r\n function BMSegmentStartEvent(type, firstFrame, totalFrames) {\r\n this.type = type;\r\n this.firstFrame = firstFrame;\r\n this.totalFrames = totalFrames;\r\n }\r\n\r\n function BMDestroyEvent(type, target) {\r\n this.type = type;\r\n this.target = target;\r\n }\r\n\r\n function BMRenderFrameErrorEvent(nativeError, currentTime) {\r\n this.type = 'renderFrameError';\r\n this.nativeError = nativeError;\r\n this.currentTime = currentTime;\r\n }\r\n\r\n function BMConfigErrorEvent(nativeError) {\r\n this.type = 'configError';\r\n this.nativeError = nativeError;\r\n }\r\n\r\n function BMAnimationConfigErrorEvent(type, nativeError) {\r\n this.type = type;\r\n this.nativeError = nativeError;\r\n }\r\n\r\n var createElementID = function () {\r\n var _count = 0;\r\n return function createID() {\r\n _count += 1;\r\n return idPrefix$1 + '__lottie_element_' + _count;\r\n };\r\n }();\r\n\r\n function HSVtoRGB(h, s, v) {\r\n var r;\r\n var g;\r\n var b;\r\n var i;\r\n var f;\r\n var p;\r\n var q;\r\n var t;\r\n i = Math.floor(h * 6);\r\n f = h * 6 - i;\r\n p = v * (1 - s);\r\n q = v * (1 - f * s);\r\n t = v * (1 - (1 - f) * s);\r\n\r\n switch (i % 6) {\r\n case 0:\r\n r = v;\r\n g = t;\r\n b = p;\r\n break;\r\n\r\n case 1:\r\n r = q;\r\n g = v;\r\n b = p;\r\n break;\r\n\r\n case 2:\r\n r = p;\r\n g = v;\r\n b = t;\r\n break;\r\n\r\n case 3:\r\n r = p;\r\n g = q;\r\n b = v;\r\n break;\r\n\r\n case 4:\r\n r = t;\r\n g = p;\r\n b = v;\r\n break;\r\n\r\n case 5:\r\n r = v;\r\n g = p;\r\n b = q;\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n\r\n return [r, g, b];\r\n }\r\n\r\n function RGBtoHSV(r, g, b) {\r\n var max = Math.max(r, g, b);\r\n var min = Math.min(r, g, b);\r\n var d = max - min;\r\n var h;\r\n var s = max === 0 ? 0 : d / max;\r\n var v = max / 255;\r\n\r\n switch (max) {\r\n case min:\r\n h = 0;\r\n break;\r\n\r\n case r:\r\n h = g - b + d * (g < b ? 6 : 0);\r\n h /= 6 * d;\r\n break;\r\n\r\n case g:\r\n h = b - r + d * 2;\r\n h /= 6 * d;\r\n break;\r\n\r\n case b:\r\n h = r - g + d * 4;\r\n h /= 6 * d;\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n\r\n return [h, s, v];\r\n }\r\n\r\n function addSaturationToRGB(color, offset) {\r\n var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\r\n hsv[1] += offset;\r\n\r\n if (hsv[1] > 1) {\r\n hsv[1] = 1;\r\n } else if (hsv[1] <= 0) {\r\n hsv[1] = 0;\r\n }\r\n\r\n return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\r\n }\r\n\r\n function addBrightnessToRGB(color, offset) {\r\n var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\r\n hsv[2] += offset;\r\n\r\n if (hsv[2] > 1) {\r\n hsv[2] = 1;\r\n } else if (hsv[2] < 0) {\r\n hsv[2] = 0;\r\n }\r\n\r\n return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\r\n }\r\n\r\n function addHueToRGB(color, offset) {\r\n var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\r\n hsv[0] += offset / 360;\r\n\r\n if (hsv[0] > 1) {\r\n hsv[0] -= 1;\r\n } else if (hsv[0] < 0) {\r\n hsv[0] += 1;\r\n }\r\n\r\n return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\r\n }\r\n\r\n var rgbToHex = function () {\r\n var colorMap = [];\r\n var i;\r\n var hex;\r\n\r\n for (i = 0; i < 256; i += 1) {\r\n hex = i.toString(16);\r\n colorMap[i] = hex.length === 1 ? '0' + hex : hex;\r\n }\r\n\r\n return function (r, g, b) {\r\n if (r < 0) {\r\n r = 0;\r\n }\r\n\r\n if (g < 0) {\r\n g = 0;\r\n }\r\n\r\n if (b < 0) {\r\n b = 0;\r\n }\r\n\r\n return '#' + colorMap[r] + colorMap[g] + colorMap[b];\r\n };\r\n }();\r\n\r\n var setSubframeEnabled = function setSubframeEnabled(flag) {\r\n subframeEnabled = !!flag;\r\n };\r\n\r\n var getSubframeEnabled = function getSubframeEnabled() {\r\n return subframeEnabled;\r\n };\r\n\r\n var setExpressionsPlugin = function setExpressionsPlugin(value) {\r\n expressionsPlugin = value;\r\n };\r\n\r\n var getExpressionsPlugin = function getExpressionsPlugin() {\r\n return expressionsPlugin;\r\n };\r\n\r\n var setExpressionInterfaces = function setExpressionInterfaces(value) {\r\n expressionsInterfaces = value;\r\n };\r\n\r\n var getExpressionInterfaces = function getExpressionInterfaces() {\r\n return expressionsInterfaces;\r\n };\r\n\r\n var setDefaultCurveSegments = function setDefaultCurveSegments(value) {\r\n defaultCurveSegments = value;\r\n };\r\n\r\n var getDefaultCurveSegments = function getDefaultCurveSegments() {\r\n return defaultCurveSegments;\r\n };\r\n\r\n var setIdPrefix = function setIdPrefix(value) {\r\n idPrefix$1 = value;\r\n };\r\n\r\n var getIdPrefix = function getIdPrefix() {\r\n return idPrefix$1;\r\n };\r\n\r\n function createNS(type) {\r\n // return {appendChild:function(){},setAttribute:function(){},style:{}}\r\n return document.createElementNS(svgNS, type);\r\n }\r\n\r\n function _typeof$5(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$5 = function _typeof(obj) { return typeof obj; }; } else { _typeof$5 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$5(obj); }\r\n\r\n var dataManager = function () {\r\n var _counterId = 1;\r\n var processes = [];\r\n var workerFn;\r\n var workerInstance;\r\n var workerProxy = {\r\n onmessage: function onmessage() {},\r\n postMessage: function postMessage(path) {\r\n workerFn({\r\n data: path\r\n });\r\n }\r\n };\r\n var _workerSelf = {\r\n postMessage: function postMessage(data) {\r\n workerProxy.onmessage({\r\n data: data\r\n });\r\n }\r\n };\r\n\r\n function createWorker(fn) {\r\n if (window.Worker && window.Blob && getWebWorker()) {\r\n var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], {\r\n type: 'text/javascript'\r\n }); // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });\r\n\r\n var url = URL.createObjectURL(blob);\r\n return new Worker(url);\r\n }\r\n\r\n workerFn = fn;\r\n return workerProxy;\r\n }\r\n\r\n function setupWorker() {\r\n if (!workerInstance) {\r\n workerInstance = createWorker(function workerStart(e) {\r\n function dataFunctionManager() {\r\n function completeLayers(layers, comps) {\r\n var layerData;\r\n var i;\r\n var len = layers.length;\r\n var j;\r\n var jLen;\r\n var k;\r\n var kLen;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n layerData = layers[i];\r\n\r\n if ('ks' in layerData && !layerData.completed) {\r\n layerData.completed = true;\r\n\r\n if (layerData.hasMask) {\r\n var maskProps = layerData.masksProperties;\r\n jLen = maskProps.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n if (maskProps[j].pt.k.i) {\r\n convertPathsToAbsoluteValues(maskProps[j].pt.k);\r\n } else {\r\n kLen = maskProps[j].pt.k.length;\r\n\r\n for (k = 0; k < kLen; k += 1) {\r\n if (maskProps[j].pt.k[k].s) {\r\n convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);\r\n }\r\n\r\n if (maskProps[j].pt.k[k].e) {\r\n convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (layerData.ty === 0) {\r\n layerData.layers = findCompLayers(layerData.refId, comps);\r\n completeLayers(layerData.layers, comps);\r\n } else if (layerData.ty === 4) {\r\n completeShapes(layerData.shapes);\r\n } else if (layerData.ty === 5) {\r\n completeText(layerData);\r\n }\r\n }\r\n }\r\n }\r\n\r\n function completeChars(chars, assets) {\r\n if (chars) {\r\n var i = 0;\r\n var len = chars.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (chars[i].t === 1) {\r\n // var compData = findComp(chars[i].data.refId, assets);\r\n chars[i].data.layers = findCompLayers(chars[i].data.refId, assets); // chars[i].data.ip = 0;\r\n // chars[i].data.op = 99999;\r\n // chars[i].data.st = 0;\r\n // chars[i].data.sr = 1;\r\n // chars[i].w = compData.w;\r\n // chars[i].data.ks = {\r\n // a: { k: [0, 0, 0], a: 0 },\r\n // p: { k: [0, -compData.h, 0], a: 0 },\r\n // r: { k: 0, a: 0 },\r\n // s: { k: [100, 100], a: 0 },\r\n // o: { k: 100, a: 0 },\r\n // };\r\n\r\n completeLayers(chars[i].data.layers, assets);\r\n }\r\n }\r\n }\r\n }\r\n\r\n function findComp(id, comps) {\r\n var i = 0;\r\n var len = comps.length;\r\n\r\n while (i < len) {\r\n if (comps[i].id === id) {\r\n return comps[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n function findCompLayers(id, comps) {\r\n var comp = findComp(id, comps);\r\n\r\n if (comp) {\r\n if (!comp.layers.__used) {\r\n comp.layers.__used = true;\r\n return comp.layers;\r\n }\r\n\r\n return JSON.parse(JSON.stringify(comp.layers));\r\n }\r\n\r\n return null;\r\n }\r\n\r\n function completeShapes(arr) {\r\n var i;\r\n var len = arr.length;\r\n var j;\r\n var jLen;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (arr[i].ty === 'sh') {\r\n if (arr[i].ks.k.i) {\r\n convertPathsToAbsoluteValues(arr[i].ks.k);\r\n } else {\r\n jLen = arr[i].ks.k.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n if (arr[i].ks.k[j].s) {\r\n convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);\r\n }\r\n\r\n if (arr[i].ks.k[j].e) {\r\n convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);\r\n }\r\n }\r\n }\r\n } else if (arr[i].ty === 'gr') {\r\n completeShapes(arr[i].it);\r\n }\r\n }\r\n }\r\n\r\n function convertPathsToAbsoluteValues(path) {\r\n var i;\r\n var len = path.i.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n path.i[i][0] += path.v[i][0];\r\n path.i[i][1] += path.v[i][1];\r\n path.o[i][0] += path.v[i][0];\r\n path.o[i][1] += path.v[i][1];\r\n }\r\n }\r\n\r\n function checkVersion(minimum, animVersionString) {\r\n var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];\r\n\r\n if (minimum[0] > animVersion[0]) {\r\n return true;\r\n }\r\n\r\n if (animVersion[0] > minimum[0]) {\r\n return false;\r\n }\r\n\r\n if (minimum[1] > animVersion[1]) {\r\n return true;\r\n }\r\n\r\n if (animVersion[1] > minimum[1]) {\r\n return false;\r\n }\r\n\r\n if (minimum[2] > animVersion[2]) {\r\n return true;\r\n }\r\n\r\n if (animVersion[2] > minimum[2]) {\r\n return false;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var checkText = function () {\r\n var minimumVersion = [4, 4, 14];\r\n\r\n function updateTextLayer(textLayer) {\r\n var documentData = textLayer.t.d;\r\n textLayer.t.d = {\r\n k: [{\r\n s: documentData,\r\n t: 0\r\n }]\r\n };\r\n }\r\n\r\n function iterateLayers(layers) {\r\n var i;\r\n var len = layers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (layers[i].ty === 5) {\r\n updateTextLayer(layers[i]);\r\n }\r\n }\r\n }\r\n\r\n return function (animationData) {\r\n if (checkVersion(minimumVersion, animationData.v)) {\r\n iterateLayers(animationData.layers);\r\n\r\n if (animationData.assets) {\r\n var i;\r\n var len = animationData.assets.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (animationData.assets[i].layers) {\r\n iterateLayers(animationData.assets[i].layers);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n }();\r\n\r\n var checkChars = function () {\r\n var minimumVersion = [4, 7, 99];\r\n return function (animationData) {\r\n if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {\r\n var i;\r\n var len = animationData.chars.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n var charData = animationData.chars[i];\r\n\r\n if (charData.data && charData.data.shapes) {\r\n completeShapes(charData.data.shapes);\r\n charData.data.ip = 0;\r\n charData.data.op = 99999;\r\n charData.data.st = 0;\r\n charData.data.sr = 1;\r\n charData.data.ks = {\r\n p: {\r\n k: [0, 0],\r\n a: 0\r\n },\r\n s: {\r\n k: [100, 100],\r\n a: 0\r\n },\r\n a: {\r\n k: [0, 0],\r\n a: 0\r\n },\r\n r: {\r\n k: 0,\r\n a: 0\r\n },\r\n o: {\r\n k: 100,\r\n a: 0\r\n }\r\n };\r\n\r\n if (!animationData.chars[i].t) {\r\n charData.data.shapes.push({\r\n ty: 'no'\r\n });\r\n charData.data.shapes[0].it.push({\r\n p: {\r\n k: [0, 0],\r\n a: 0\r\n },\r\n s: {\r\n k: [100, 100],\r\n a: 0\r\n },\r\n a: {\r\n k: [0, 0],\r\n a: 0\r\n },\r\n r: {\r\n k: 0,\r\n a: 0\r\n },\r\n o: {\r\n k: 100,\r\n a: 0\r\n },\r\n sk: {\r\n k: 0,\r\n a: 0\r\n },\r\n sa: {\r\n k: 0,\r\n a: 0\r\n },\r\n ty: 'tr'\r\n });\r\n }\r\n }\r\n }\r\n }\r\n };\r\n }();\r\n\r\n var checkPathProperties = function () {\r\n var minimumVersion = [5, 7, 15];\r\n\r\n function updateTextLayer(textLayer) {\r\n var pathData = textLayer.t.p;\r\n\r\n if (typeof pathData.a === 'number') {\r\n pathData.a = {\r\n a: 0,\r\n k: pathData.a\r\n };\r\n }\r\n\r\n if (typeof pathData.p === 'number') {\r\n pathData.p = {\r\n a: 0,\r\n k: pathData.p\r\n };\r\n }\r\n\r\n if (typeof pathData.r === 'number') {\r\n pathData.r = {\r\n a: 0,\r\n k: pathData.r\r\n };\r\n }\r\n }\r\n\r\n function iterateLayers(layers) {\r\n var i;\r\n var len = layers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (layers[i].ty === 5) {\r\n updateTextLayer(layers[i]);\r\n }\r\n }\r\n }\r\n\r\n return function (animationData) {\r\n if (checkVersion(minimumVersion, animationData.v)) {\r\n iterateLayers(animationData.layers);\r\n\r\n if (animationData.assets) {\r\n var i;\r\n var len = animationData.assets.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (animationData.assets[i].layers) {\r\n iterateLayers(animationData.assets[i].layers);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n }();\r\n\r\n var checkColors = function () {\r\n var minimumVersion = [4, 1, 9];\r\n\r\n function iterateShapes(shapes) {\r\n var i;\r\n var len = shapes.length;\r\n var j;\r\n var jLen;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (shapes[i].ty === 'gr') {\r\n iterateShapes(shapes[i].it);\r\n } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {\r\n if (shapes[i].c.k && shapes[i].c.k[0].i) {\r\n jLen = shapes[i].c.k.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n if (shapes[i].c.k[j].s) {\r\n shapes[i].c.k[j].s[0] /= 255;\r\n shapes[i].c.k[j].s[1] /= 255;\r\n shapes[i].c.k[j].s[2] /= 255;\r\n shapes[i].c.k[j].s[3] /= 255;\r\n }\r\n\r\n if (shapes[i].c.k[j].e) {\r\n shapes[i].c.k[j].e[0] /= 255;\r\n shapes[i].c.k[j].e[1] /= 255;\r\n shapes[i].c.k[j].e[2] /= 255;\r\n shapes[i].c.k[j].e[3] /= 255;\r\n }\r\n }\r\n } else {\r\n shapes[i].c.k[0] /= 255;\r\n shapes[i].c.k[1] /= 255;\r\n shapes[i].c.k[2] /= 255;\r\n shapes[i].c.k[3] /= 255;\r\n }\r\n }\r\n }\r\n }\r\n\r\n function iterateLayers(layers) {\r\n var i;\r\n var len = layers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (layers[i].ty === 4) {\r\n iterateShapes(layers[i].shapes);\r\n }\r\n }\r\n }\r\n\r\n return function (animationData) {\r\n if (checkVersion(minimumVersion, animationData.v)) {\r\n iterateLayers(animationData.layers);\r\n\r\n if (animationData.assets) {\r\n var i;\r\n var len = animationData.assets.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (animationData.assets[i].layers) {\r\n iterateLayers(animationData.assets[i].layers);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n }();\r\n\r\n var checkShapes = function () {\r\n var minimumVersion = [4, 4, 18];\r\n\r\n function completeClosingShapes(arr) {\r\n var i;\r\n var len = arr.length;\r\n var j;\r\n var jLen;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (arr[i].ty === 'sh') {\r\n if (arr[i].ks.k.i) {\r\n arr[i].ks.k.c = arr[i].closed;\r\n } else {\r\n jLen = arr[i].ks.k.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n if (arr[i].ks.k[j].s) {\r\n arr[i].ks.k[j].s[0].c = arr[i].closed;\r\n }\r\n\r\n if (arr[i].ks.k[j].e) {\r\n arr[i].ks.k[j].e[0].c = arr[i].closed;\r\n }\r\n }\r\n }\r\n } else if (arr[i].ty === 'gr') {\r\n completeClosingShapes(arr[i].it);\r\n }\r\n }\r\n }\r\n\r\n function iterateLayers(layers) {\r\n var layerData;\r\n var i;\r\n var len = layers.length;\r\n var j;\r\n var jLen;\r\n var k;\r\n var kLen;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n layerData = layers[i];\r\n\r\n if (layerData.hasMask) {\r\n var maskProps = layerData.masksProperties;\r\n jLen = maskProps.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n if (maskProps[j].pt.k.i) {\r\n maskProps[j].pt.k.c = maskProps[j].cl;\r\n } else {\r\n kLen = maskProps[j].pt.k.length;\r\n\r\n for (k = 0; k < kLen; k += 1) {\r\n if (maskProps[j].pt.k[k].s) {\r\n maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;\r\n }\r\n\r\n if (maskProps[j].pt.k[k].e) {\r\n maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (layerData.ty === 4) {\r\n completeClosingShapes(layerData.shapes);\r\n }\r\n }\r\n }\r\n\r\n return function (animationData) {\r\n if (checkVersion(minimumVersion, animationData.v)) {\r\n iterateLayers(animationData.layers);\r\n\r\n if (animationData.assets) {\r\n var i;\r\n var len = animationData.assets.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (animationData.assets[i].layers) {\r\n iterateLayers(animationData.assets[i].layers);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n }();\r\n\r\n function completeData(animationData) {\r\n if (animationData.__complete) {\r\n return;\r\n }\r\n\r\n checkColors(animationData);\r\n checkText(animationData);\r\n checkChars(animationData);\r\n checkPathProperties(animationData);\r\n checkShapes(animationData);\r\n completeLayers(animationData.layers, animationData.assets);\r\n completeChars(animationData.chars, animationData.assets);\r\n animationData.__complete = true;\r\n }\r\n\r\n function completeText(data) {\r\n if (data.t.a.length === 0 && !('m' in data.t.p)) {// data.singleShape = true;\r\n }\r\n }\r\n\r\n var moduleOb = {};\r\n moduleOb.completeData = completeData;\r\n moduleOb.checkColors = checkColors;\r\n moduleOb.checkChars = checkChars;\r\n moduleOb.checkPathProperties = checkPathProperties;\r\n moduleOb.checkShapes = checkShapes;\r\n moduleOb.completeLayers = completeLayers;\r\n return moduleOb;\r\n }\r\n\r\n if (!_workerSelf.dataManager) {\r\n _workerSelf.dataManager = dataFunctionManager();\r\n }\r\n\r\n if (!_workerSelf.assetLoader) {\r\n _workerSelf.assetLoader = function () {\r\n function formatResponse(xhr) {\r\n // using typeof doubles the time of execution of this method,\r\n // so if available, it's better to use the header to validate the type\r\n var contentTypeHeader = xhr.getResponseHeader('content-type');\r\n\r\n if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {\r\n return xhr.response;\r\n }\r\n\r\n if (xhr.response && _typeof$5(xhr.response) === 'object') {\r\n return xhr.response;\r\n }\r\n\r\n if (xhr.response && typeof xhr.response === 'string') {\r\n return JSON.parse(xhr.response);\r\n }\r\n\r\n if (xhr.responseText) {\r\n return JSON.parse(xhr.responseText);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n function loadAsset(path, fullPath, callback, errorCallback) {\r\n var response;\r\n var xhr = new XMLHttpRequest(); // set responseType after calling open or IE will break.\r\n\r\n try {\r\n // This crashes on Android WebView prior to KitKat\r\n xhr.responseType = 'json';\r\n } catch (err) {} // eslint-disable-line no-empty\r\n\r\n\r\n xhr.onreadystatechange = function () {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 200) {\r\n response = formatResponse(xhr);\r\n callback(response);\r\n } else {\r\n try {\r\n response = formatResponse(xhr);\r\n callback(response);\r\n } catch (err) {\r\n if (errorCallback) {\r\n errorCallback(err);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n try {\r\n // Hack to workaround banner validation\r\n xhr.open(['G', 'E', 'T'].join(''), path, true);\r\n } catch (error) {\r\n // Hack to workaround banner validation\r\n xhr.open(['G', 'E', 'T'].join(''), fullPath + '/' + path, true);\r\n }\r\n\r\n xhr.send();\r\n }\r\n\r\n return {\r\n load: loadAsset\r\n };\r\n }();\r\n }\r\n\r\n if (e.data.type === 'loadAnimation') {\r\n _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {\r\n _workerSelf.dataManager.completeData(data);\r\n\r\n _workerSelf.postMessage({\r\n id: e.data.id,\r\n payload: data,\r\n status: 'success'\r\n });\r\n }, function () {\r\n _workerSelf.postMessage({\r\n id: e.data.id,\r\n status: 'error'\r\n });\r\n });\r\n } else if (e.data.type === 'complete') {\r\n var animation = e.data.animation;\r\n\r\n _workerSelf.dataManager.completeData(animation);\r\n\r\n _workerSelf.postMessage({\r\n id: e.data.id,\r\n payload: animation,\r\n status: 'success'\r\n });\r\n } else if (e.data.type === 'loadData') {\r\n _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {\r\n _workerSelf.postMessage({\r\n id: e.data.id,\r\n payload: data,\r\n status: 'success'\r\n });\r\n }, function () {\r\n _workerSelf.postMessage({\r\n id: e.data.id,\r\n status: 'error'\r\n });\r\n });\r\n }\r\n });\r\n\r\n workerInstance.onmessage = function (event) {\r\n var data = event.data;\r\n var id = data.id;\r\n var process = processes[id];\r\n processes[id] = null;\r\n\r\n if (data.status === 'success') {\r\n process.onComplete(data.payload);\r\n } else if (process.onError) {\r\n process.onError();\r\n }\r\n };\r\n }\r\n }\r\n\r\n function createProcess(onComplete, onError) {\r\n _counterId += 1;\r\n var id = 'processId_' + _counterId;\r\n processes[id] = {\r\n onComplete: onComplete,\r\n onError: onError\r\n };\r\n return id;\r\n }\r\n\r\n function loadAnimation(path, onComplete, onError) {\r\n setupWorker();\r\n var processId = createProcess(onComplete, onError);\r\n workerInstance.postMessage({\r\n type: 'loadAnimation',\r\n path: path,\r\n fullPath: window.location.origin + window.location.pathname,\r\n id: processId\r\n });\r\n }\r\n\r\n function loadData(path, onComplete, onError) {\r\n setupWorker();\r\n var processId = createProcess(onComplete, onError);\r\n workerInstance.postMessage({\r\n type: 'loadData',\r\n path: path,\r\n fullPath: window.location.origin + window.location.pathname,\r\n id: processId\r\n });\r\n }\r\n\r\n function completeAnimation(anim, onComplete, onError) {\r\n setupWorker();\r\n var processId = createProcess(onComplete, onError);\r\n workerInstance.postMessage({\r\n type: 'complete',\r\n animation: anim,\r\n id: processId\r\n });\r\n }\r\n\r\n return {\r\n loadAnimation: loadAnimation,\r\n loadData: loadData,\r\n completeAnimation: completeAnimation\r\n };\r\n }();\r\n\r\n var ImagePreloader = function () {\r\n var proxyImage = function () {\r\n var canvas = createTag('canvas');\r\n canvas.width = 1;\r\n canvas.height = 1;\r\n var ctx = canvas.getContext('2d');\r\n ctx.fillStyle = 'rgba(0,0,0,0)';\r\n ctx.fillRect(0, 0, 1, 1);\r\n return canvas;\r\n }();\r\n\r\n function imageLoaded() {\r\n this.loadedAssets += 1;\r\n\r\n if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {\r\n if (this.imagesLoadedCb) {\r\n this.imagesLoadedCb(null);\r\n }\r\n }\r\n }\r\n\r\n function footageLoaded() {\r\n this.loadedFootagesCount += 1;\r\n\r\n if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {\r\n if (this.imagesLoadedCb) {\r\n this.imagesLoadedCb(null);\r\n }\r\n }\r\n }\r\n\r\n function getAssetsPath(assetData, assetsPath, originalPath) {\r\n var path = '';\r\n\r\n if (assetData.e) {\r\n path = assetData.p;\r\n } else if (assetsPath) {\r\n var imagePath = assetData.p;\r\n\r\n if (imagePath.indexOf('images/') !== -1) {\r\n imagePath = imagePath.split('/')[1];\r\n }\r\n\r\n path = assetsPath + imagePath;\r\n } else {\r\n path = originalPath;\r\n path += assetData.u ? assetData.u : '';\r\n path += assetData.p;\r\n }\r\n\r\n return path;\r\n }\r\n\r\n function testImageLoaded(img) {\r\n var _count = 0;\r\n var intervalId = setInterval(function () {\r\n var box = img.getBBox();\r\n\r\n if (box.width || _count > 500) {\r\n this._imageLoaded();\r\n\r\n clearInterval(intervalId);\r\n }\r\n\r\n _count += 1;\r\n }.bind(this), 50);\r\n }\r\n\r\n function createImageData(assetData) {\r\n var path = getAssetsPath(assetData, this.assetsPath, this.path);\r\n var img = createNS('image');\r\n\r\n if (isSafari) {\r\n this.testImageLoaded(img);\r\n } else {\r\n img.addEventListener('load', this._imageLoaded, false);\r\n }\r\n\r\n img.addEventListener('error', function () {\r\n ob.img = proxyImage;\r\n\r\n this._imageLoaded();\r\n }.bind(this), false);\r\n img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);\r\n\r\n if (this._elementHelper.append) {\r\n this._elementHelper.append(img);\r\n } else {\r\n this._elementHelper.appendChild(img);\r\n }\r\n\r\n var ob = {\r\n img: img,\r\n assetData: assetData\r\n };\r\n return ob;\r\n }\r\n\r\n function createImgData(assetData) {\r\n var path = getAssetsPath(assetData, this.assetsPath, this.path);\r\n var img = createTag('img');\r\n img.crossOrigin = 'anonymous';\r\n img.addEventListener('load', this._imageLoaded, false);\r\n img.addEventListener('error', function () {\r\n ob.img = proxyImage;\r\n\r\n this._imageLoaded();\r\n }.bind(this), false);\r\n img.src = path;\r\n var ob = {\r\n img: img,\r\n assetData: assetData\r\n };\r\n return ob;\r\n }\r\n\r\n function createFootageData(data) {\r\n var ob = {\r\n assetData: data\r\n };\r\n var path = getAssetsPath(data, this.assetsPath, this.path);\r\n dataManager.loadData(path, function (footageData) {\r\n ob.img = footageData;\r\n\r\n this._footageLoaded();\r\n }.bind(this), function () {\r\n ob.img = {};\r\n\r\n this._footageLoaded();\r\n }.bind(this));\r\n return ob;\r\n }\r\n\r\n function loadAssets(assets, cb) {\r\n this.imagesLoadedCb = cb;\r\n var i;\r\n var len = assets.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (!assets[i].layers) {\r\n if (!assets[i].t || assets[i].t === 'seq') {\r\n this.totalImages += 1;\r\n this.images.push(this._createImageData(assets[i]));\r\n } else if (assets[i].t === 3) {\r\n this.totalFootages += 1;\r\n this.images.push(this.createFootageData(assets[i]));\r\n }\r\n }\r\n }\r\n }\r\n\r\n function setPath(path) {\r\n this.path = path || '';\r\n }\r\n\r\n function setAssetsPath(path) {\r\n this.assetsPath = path || '';\r\n }\r\n\r\n function getAsset(assetData) {\r\n var i = 0;\r\n var len = this.images.length;\r\n\r\n while (i < len) {\r\n if (this.images[i].assetData === assetData) {\r\n return this.images[i].img;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n function destroy() {\r\n this.imagesLoadedCb = null;\r\n this.images.length = 0;\r\n }\r\n\r\n function loadedImages() {\r\n return this.totalImages === this.loadedAssets;\r\n }\r\n\r\n function loadedFootages() {\r\n return this.totalFootages === this.loadedFootagesCount;\r\n }\r\n\r\n function setCacheType(type, elementHelper) {\r\n if (type === 'svg') {\r\n this._elementHelper = elementHelper;\r\n this._createImageData = this.createImageData.bind(this);\r\n } else {\r\n this._createImageData = this.createImgData.bind(this);\r\n }\r\n }\r\n\r\n function ImagePreloaderFactory() {\r\n this._imageLoaded = imageLoaded.bind(this);\r\n this._footageLoaded = footageLoaded.bind(this);\r\n this.testImageLoaded = testImageLoaded.bind(this);\r\n this.createFootageData = createFootageData.bind(this);\r\n this.assetsPath = '';\r\n this.path = '';\r\n this.totalImages = 0;\r\n this.totalFootages = 0;\r\n this.loadedAssets = 0;\r\n this.loadedFootagesCount = 0;\r\n this.imagesLoadedCb = null;\r\n this.images = [];\r\n }\r\n\r\n ImagePreloaderFactory.prototype = {\r\n loadAssets: loadAssets,\r\n setAssetsPath: setAssetsPath,\r\n setPath: setPath,\r\n loadedImages: loadedImages,\r\n loadedFootages: loadedFootages,\r\n destroy: destroy,\r\n getAsset: getAsset,\r\n createImgData: createImgData,\r\n createImageData: createImageData,\r\n imageLoaded: imageLoaded,\r\n footageLoaded: footageLoaded,\r\n setCacheType: setCacheType\r\n };\r\n return ImagePreloaderFactory;\r\n }();\r\n\r\n function BaseEvent() {}\r\n\r\n BaseEvent.prototype = {\r\n triggerEvent: function triggerEvent(eventName, args) {\r\n if (this._cbs[eventName]) {\r\n var callbacks = this._cbs[eventName];\r\n\r\n for (var i = 0; i < callbacks.length; i += 1) {\r\n callbacks[i](args);\r\n }\r\n }\r\n },\r\n addEventListener: function addEventListener(eventName, callback) {\r\n if (!this._cbs[eventName]) {\r\n this._cbs[eventName] = [];\r\n }\r\n\r\n this._cbs[eventName].push(callback);\r\n\r\n return function () {\r\n this.removeEventListener(eventName, callback);\r\n }.bind(this);\r\n },\r\n removeEventListener: function removeEventListener(eventName, callback) {\r\n if (!callback) {\r\n this._cbs[eventName] = null;\r\n } else if (this._cbs[eventName]) {\r\n var i = 0;\r\n var len = this._cbs[eventName].length;\r\n\r\n while (i < len) {\r\n if (this._cbs[eventName][i] === callback) {\r\n this._cbs[eventName].splice(i, 1);\r\n\r\n i -= 1;\r\n len -= 1;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n if (!this._cbs[eventName].length) {\r\n this._cbs[eventName] = null;\r\n }\r\n }\r\n }\r\n };\r\n\r\n var markerParser = function () {\r\n function parsePayloadLines(payload) {\r\n var lines = payload.split('\\r\\n');\r\n var keys = {};\r\n var line;\r\n var keysCount = 0;\r\n\r\n for (var i = 0; i < lines.length; i += 1) {\r\n line = lines[i].split(':');\r\n\r\n if (line.length === 2) {\r\n keys[line[0]] = line[1].trim();\r\n keysCount += 1;\r\n }\r\n }\r\n\r\n if (keysCount === 0) {\r\n throw new Error();\r\n }\r\n\r\n return keys;\r\n }\r\n\r\n return function (_markers) {\r\n var markers = [];\r\n\r\n for (var i = 0; i < _markers.length; i += 1) {\r\n var _marker = _markers[i];\r\n var markerData = {\r\n time: _marker.tm,\r\n duration: _marker.dr\r\n };\r\n\r\n try {\r\n markerData.payload = JSON.parse(_markers[i].cm);\r\n } catch (_) {\r\n try {\r\n markerData.payload = parsePayloadLines(_markers[i].cm);\r\n } catch (__) {\r\n markerData.payload = {\r\n name: _markers[i].cm\r\n };\r\n }\r\n }\r\n\r\n markers.push(markerData);\r\n }\r\n\r\n return markers;\r\n };\r\n }();\r\n\r\n var ProjectInterface = function () {\r\n function registerComposition(comp) {\r\n this.compositions.push(comp);\r\n }\r\n\r\n return function () {\r\n function _thisProjectFunction(name) {\r\n var i = 0;\r\n var len = this.compositions.length;\r\n\r\n while (i < len) {\r\n if (this.compositions[i].data && this.compositions[i].data.nm === name) {\r\n if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {\r\n this.compositions[i].prepareFrame(this.currentFrame);\r\n }\r\n\r\n return this.compositions[i].compInterface;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n _thisProjectFunction.compositions = [];\r\n _thisProjectFunction.currentFrame = 0;\r\n _thisProjectFunction.registerComposition = registerComposition;\r\n return _thisProjectFunction;\r\n };\r\n }();\r\n\r\n var renderers = {};\r\n\r\n var registerRenderer = function registerRenderer(key, value) {\r\n renderers[key] = value;\r\n };\r\n\r\n function getRenderer(key) {\r\n return renderers[key];\r\n }\r\n\r\n function _typeof$4(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$4 = function _typeof(obj) { return typeof obj; }; } else { _typeof$4 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$4(obj); }\r\n\r\n var AnimationItem = function AnimationItem() {\r\n this._cbs = [];\r\n this.name = '';\r\n this.path = '';\r\n this.isLoaded = false;\r\n this.currentFrame = 0;\r\n this.currentRawFrame = 0;\r\n this.firstFrame = 0;\r\n this.totalFrames = 0;\r\n this.frameRate = 0;\r\n this.frameMult = 0;\r\n this.playSpeed = 1;\r\n this.playDirection = 1;\r\n this.playCount = 0;\r\n this.animationData = {};\r\n this.assets = [];\r\n this.isPaused = true;\r\n this.autoplay = false;\r\n this.loop = true;\r\n this.renderer = null;\r\n this.animationID = createElementID();\r\n this.assetsPath = '';\r\n this.timeCompleted = 0;\r\n this.segmentPos = 0;\r\n this.isSubframeEnabled = getSubframeEnabled();\r\n this.segments = [];\r\n this._idle = true;\r\n this._completedLoop = false;\r\n this.projectInterface = ProjectInterface();\r\n this.imagePreloader = new ImagePreloader();\r\n this.audioController = audioControllerFactory();\r\n this.markers = [];\r\n this.configAnimation = this.configAnimation.bind(this);\r\n this.onSetupError = this.onSetupError.bind(this);\r\n this.onSegmentComplete = this.onSegmentComplete.bind(this);\r\n this.drawnFrameEvent = new BMEnterFrameEvent('drawnFrame', 0, 0, 0);\r\n };\r\n\r\n extendPrototype([BaseEvent], AnimationItem);\r\n\r\n AnimationItem.prototype.setParams = function (params) {\r\n if (params.wrapper || params.container) {\r\n this.wrapper = params.wrapper || params.container;\r\n }\r\n\r\n var animType = 'svg';\r\n\r\n if (params.animType) {\r\n animType = params.animType;\r\n } else if (params.renderer) {\r\n animType = params.renderer;\r\n }\r\n\r\n var RendererClass = getRenderer(animType);\r\n this.renderer = new RendererClass(this, params.rendererSettings);\r\n this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);\r\n this.renderer.setProjectInterface(this.projectInterface);\r\n this.animType = animType;\r\n\r\n if (params.loop === '' || params.loop === null || params.loop === undefined || params.loop === true) {\r\n this.loop = true;\r\n } else if (params.loop === false) {\r\n this.loop = false;\r\n } else {\r\n this.loop = parseInt(params.loop, 10);\r\n }\r\n\r\n this.autoplay = 'autoplay' in params ? params.autoplay : true;\r\n this.name = params.name ? params.name : '';\r\n this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;\r\n this.assetsPath = params.assetsPath;\r\n this.initialSegment = params.initialSegment;\r\n\r\n if (params.audioFactory) {\r\n this.audioController.setAudioFactory(params.audioFactory);\r\n }\r\n\r\n if (params.animationData) {\r\n this.setupAnimation(params.animationData);\r\n } else if (params.path) {\r\n if (params.path.lastIndexOf('\\\\') !== -1) {\r\n this.path = params.path.substr(0, params.path.lastIndexOf('\\\\') + 1);\r\n } else {\r\n this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);\r\n }\r\n\r\n this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);\r\n this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));\r\n dataManager.loadAnimation(params.path, this.configAnimation, this.onSetupError);\r\n }\r\n };\r\n\r\n AnimationItem.prototype.onSetupError = function () {\r\n this.trigger('data_failed');\r\n };\r\n\r\n AnimationItem.prototype.setupAnimation = function (data) {\r\n dataManager.completeAnimation(data, this.configAnimation);\r\n };\r\n\r\n AnimationItem.prototype.setData = function (wrapper, animationData) {\r\n if (animationData) {\r\n if (_typeof$4(animationData) !== 'object') {\r\n animationData = JSON.parse(animationData);\r\n }\r\n }\r\n\r\n var params = {\r\n wrapper: wrapper,\r\n animationData: animationData\r\n };\r\n var wrapperAttributes = wrapper.attributes;\r\n params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-animation-path').value : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-path').value : wrapperAttributes.getNamedItem('bm-path') ? wrapperAttributes.getNamedItem('bm-path').value : '';\r\n params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-anim-type').value : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-type').value : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('bm-type').value : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-renderer').value : wrapperAttributes.getNamedItem('bm-renderer') ? wrapperAttributes.getNamedItem('bm-renderer').value : 'canvas';\r\n var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-anim-loop').value : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-loop').value : wrapperAttributes.getNamedItem('bm-loop') ? wrapperAttributes.getNamedItem('bm-loop').value : '';\r\n\r\n if (loop === 'false') {\r\n params.loop = false;\r\n } else if (loop === 'true') {\r\n params.loop = true;\r\n } else if (loop !== '') {\r\n params.loop = parseInt(loop, 10);\r\n }\r\n\r\n var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-anim-autoplay').value : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-autoplay').value : wrapperAttributes.getNamedItem('bm-autoplay') ? wrapperAttributes.getNamedItem('bm-autoplay').value : true;\r\n params.autoplay = autoplay !== 'false';\r\n params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-name').value : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-name').value : wrapperAttributes.getNamedItem('bm-name') ? wrapperAttributes.getNamedItem('bm-name').value : '';\r\n var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-anim-prerender').value : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary\r\n ? wrapperAttributes.getNamedItem('data-bm-prerender').value : wrapperAttributes.getNamedItem('bm-prerender') ? wrapperAttributes.getNamedItem('bm-prerender').value : '';\r\n\r\n if (prerender === 'false') {\r\n params.prerender = false;\r\n }\r\n\r\n this.setParams(params);\r\n };\r\n\r\n AnimationItem.prototype.includeLayers = function (data) {\r\n if (data.op > this.animationData.op) {\r\n this.animationData.op = data.op;\r\n this.totalFrames = Math.floor(data.op - this.animationData.ip);\r\n }\r\n\r\n var layers = this.animationData.layers;\r\n var i;\r\n var len = layers.length;\r\n var newLayers = data.layers;\r\n var j;\r\n var jLen = newLayers.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n i = 0;\r\n\r\n while (i < len) {\r\n if (layers[i].id === newLayers[j].id) {\r\n layers[i] = newLayers[j];\r\n break;\r\n }\r\n\r\n i += 1;\r\n }\r\n }\r\n\r\n if (data.chars || data.fonts) {\r\n this.renderer.globalData.fontManager.addChars(data.chars);\r\n this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);\r\n }\r\n\r\n if (data.assets) {\r\n len = data.assets.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.animationData.assets.push(data.assets[i]);\r\n }\r\n }\r\n\r\n this.animationData.__complete = false;\r\n dataManager.completeAnimation(this.animationData, this.onSegmentComplete);\r\n };\r\n\r\n AnimationItem.prototype.onSegmentComplete = function (data) {\r\n this.animationData = data;\r\n var expressionsPlugin = getExpressionsPlugin();\r\n\r\n if (expressionsPlugin) {\r\n expressionsPlugin.initExpressions(this);\r\n }\r\n\r\n this.loadNextSegment();\r\n };\r\n\r\n AnimationItem.prototype.loadNextSegment = function () {\r\n var segments = this.animationData.segments;\r\n\r\n if (!segments || segments.length === 0 || !this.autoloadSegments) {\r\n this.trigger('data_ready');\r\n this.timeCompleted = this.totalFrames;\r\n return;\r\n }\r\n\r\n var segment = segments.shift();\r\n this.timeCompleted = segment.time * this.frameRate;\r\n var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';\r\n this.segmentPos += 1;\r\n dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {\r\n this.trigger('data_failed');\r\n }.bind(this));\r\n };\r\n\r\n AnimationItem.prototype.loadSegments = function () {\r\n var segments = this.animationData.segments;\r\n\r\n if (!segments) {\r\n this.timeCompleted = this.totalFrames;\r\n }\r\n\r\n this.loadNextSegment();\r\n };\r\n\r\n AnimationItem.prototype.imagesLoaded = function () {\r\n this.trigger('loaded_images');\r\n this.checkLoaded();\r\n };\r\n\r\n AnimationItem.prototype.preloadImages = function () {\r\n this.imagePreloader.setAssetsPath(this.assetsPath);\r\n this.imagePreloader.setPath(this.path);\r\n this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));\r\n };\r\n\r\n AnimationItem.prototype.configAnimation = function (animData) {\r\n if (!this.renderer) {\r\n return;\r\n }\r\n\r\n try {\r\n this.animationData = animData;\r\n\r\n if (this.initialSegment) {\r\n this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);\r\n this.firstFrame = Math.round(this.initialSegment[0]);\r\n } else {\r\n this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);\r\n this.firstFrame = Math.round(this.animationData.ip);\r\n }\r\n\r\n this.renderer.configAnimation(animData);\r\n\r\n if (!animData.assets) {\r\n animData.assets = [];\r\n }\r\n\r\n this.assets = this.animationData.assets;\r\n this.frameRate = this.animationData.fr;\r\n this.frameMult = this.animationData.fr / 1000;\r\n this.renderer.searchExtraCompositions(animData.assets);\r\n this.markers = markerParser(animData.markers || []);\r\n this.trigger('config_ready');\r\n this.preloadImages();\r\n this.loadSegments();\r\n this.updaFrameModifier();\r\n this.waitForFontsLoaded();\r\n\r\n if (this.isPaused) {\r\n this.audioController.pause();\r\n }\r\n } catch (error) {\r\n this.triggerConfigError(error);\r\n }\r\n };\r\n\r\n AnimationItem.prototype.waitForFontsLoaded = function () {\r\n if (!this.renderer) {\r\n return;\r\n }\r\n\r\n if (this.renderer.globalData.fontManager.isLoaded) {\r\n this.checkLoaded();\r\n } else {\r\n setTimeout(this.waitForFontsLoaded.bind(this), 20);\r\n }\r\n };\r\n\r\n AnimationItem.prototype.checkLoaded = function () {\r\n if (!this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas') && this.imagePreloader.loadedFootages()) {\r\n this.isLoaded = true;\r\n var expressionsPlugin = getExpressionsPlugin();\r\n\r\n if (expressionsPlugin) {\r\n expressionsPlugin.initExpressions(this);\r\n }\r\n\r\n this.renderer.initItems();\r\n setTimeout(function () {\r\n this.trigger('DOMLoaded');\r\n }.bind(this), 0);\r\n this.gotoFrame();\r\n\r\n if (this.autoplay) {\r\n this.play();\r\n }\r\n }\r\n };\r\n\r\n AnimationItem.prototype.resize = function (width, height) {\r\n // Adding this validation for backwards compatibility in case an event object was being passed down\r\n var _width = typeof width === 'number' ? width : undefined;\r\n\r\n var _height = typeof height === 'number' ? height : undefined;\r\n\r\n this.renderer.updateContainerSize(_width, _height);\r\n };\r\n\r\n AnimationItem.prototype.setSubframe = function (flag) {\r\n this.isSubframeEnabled = !!flag;\r\n };\r\n\r\n AnimationItem.prototype.gotoFrame = function () {\r\n this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise\r\n\r\n if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {\r\n this.currentFrame = this.timeCompleted;\r\n }\r\n\r\n this.trigger('enterFrame');\r\n this.renderFrame();\r\n this.trigger('drawnFrame');\r\n };\r\n\r\n AnimationItem.prototype.renderFrame = function () {\r\n if (this.isLoaded === false || !this.renderer) {\r\n return;\r\n }\r\n\r\n try {\r\n this.renderer.renderFrame(this.currentFrame + this.firstFrame);\r\n } catch (error) {\r\n this.triggerRenderFrameError(error);\r\n }\r\n };\r\n\r\n AnimationItem.prototype.play = function (name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n\r\n if (this.isPaused === true) {\r\n this.isPaused = false;\r\n this.trigger('_pause');\r\n this.audioController.resume();\r\n\r\n if (this._idle) {\r\n this._idle = false;\r\n this.trigger('_active');\r\n }\r\n }\r\n };\r\n\r\n AnimationItem.prototype.pause = function (name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n\r\n if (this.isPaused === false) {\r\n this.isPaused = true;\r\n this.trigger('_play');\r\n this._idle = true;\r\n this.trigger('_idle');\r\n this.audioController.pause();\r\n }\r\n };\r\n\r\n AnimationItem.prototype.togglePause = function (name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n\r\n if (this.isPaused === true) {\r\n this.play();\r\n } else {\r\n this.pause();\r\n }\r\n };\r\n\r\n AnimationItem.prototype.stop = function (name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n\r\n this.pause();\r\n this.playCount = 0;\r\n this._completedLoop = false;\r\n this.setCurrentRawFrameValue(0);\r\n };\r\n\r\n AnimationItem.prototype.getMarkerData = function (markerName) {\r\n var marker;\r\n\r\n for (var i = 0; i < this.markers.length; i += 1) {\r\n marker = this.markers[i];\r\n\r\n if (marker.payload && marker.payload.name === markerName) {\r\n return marker;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n\r\n var numValue = Number(value);\r\n\r\n if (isNaN(numValue)) {\r\n var marker = this.getMarkerData(value);\r\n\r\n if (marker) {\r\n this.goToAndStop(marker.time, true);\r\n }\r\n } else if (isFrame) {\r\n this.setCurrentRawFrameValue(value);\r\n } else {\r\n this.setCurrentRawFrameValue(value * this.frameModifier);\r\n }\r\n\r\n this.pause();\r\n };\r\n\r\n AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n\r\n var numValue = Number(value);\r\n\r\n if (isNaN(numValue)) {\r\n var marker = this.getMarkerData(value);\r\n\r\n if (marker) {\r\n if (!marker.duration) {\r\n this.goToAndStop(marker.time, true);\r\n } else {\r\n this.playSegments([marker.time, marker.time + marker.duration], true);\r\n }\r\n }\r\n } else {\r\n this.goToAndStop(numValue, isFrame, name);\r\n }\r\n\r\n this.play();\r\n };\r\n\r\n AnimationItem.prototype.advanceTime = function (value) {\r\n if (this.isPaused === true || this.isLoaded === false) {\r\n return;\r\n }\r\n\r\n var nextValue = this.currentRawFrame + value * this.frameModifier;\r\n var _isComplete = false; // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.\r\n // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.\r\n\r\n if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {\r\n if (!this.loop || this.playCount === this.loop) {\r\n if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {\r\n _isComplete = true;\r\n nextValue = this.totalFrames - 1;\r\n }\r\n } else if (nextValue >= this.totalFrames) {\r\n this.playCount += 1;\r\n\r\n if (!this.checkSegments(nextValue % this.totalFrames)) {\r\n this.setCurrentRawFrameValue(nextValue % this.totalFrames);\r\n this._completedLoop = true;\r\n this.trigger('loopComplete');\r\n }\r\n } else {\r\n this.setCurrentRawFrameValue(nextValue);\r\n }\r\n } else if (nextValue < 0) {\r\n if (!this.checkSegments(nextValue % this.totalFrames)) {\r\n if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) {\r\n // eslint-disable-line no-plusplus\r\n this.setCurrentRawFrameValue(this.totalFrames + nextValue % this.totalFrames);\r\n\r\n if (!this._completedLoop) {\r\n this._completedLoop = true;\r\n } else {\r\n this.trigger('loopComplete');\r\n }\r\n } else {\r\n _isComplete = true;\r\n nextValue = 0;\r\n }\r\n }\r\n } else {\r\n this.setCurrentRawFrameValue(nextValue);\r\n }\r\n\r\n if (_isComplete) {\r\n this.setCurrentRawFrameValue(nextValue);\r\n this.pause();\r\n this.trigger('complete');\r\n }\r\n };\r\n\r\n AnimationItem.prototype.adjustSegment = function (arr, offset) {\r\n this.playCount = 0;\r\n\r\n if (arr[1] < arr[0]) {\r\n if (this.frameModifier > 0) {\r\n if (this.playSpeed < 0) {\r\n this.setSpeed(-this.playSpeed);\r\n } else {\r\n this.setDirection(-1);\r\n }\r\n }\r\n\r\n this.totalFrames = arr[0] - arr[1];\r\n this.timeCompleted = this.totalFrames;\r\n this.firstFrame = arr[1];\r\n this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);\r\n } else if (arr[1] > arr[0]) {\r\n if (this.frameModifier < 0) {\r\n if (this.playSpeed < 0) {\r\n this.setSpeed(-this.playSpeed);\r\n } else {\r\n this.setDirection(1);\r\n }\r\n }\r\n\r\n this.totalFrames = arr[1] - arr[0];\r\n this.timeCompleted = this.totalFrames;\r\n this.firstFrame = arr[0];\r\n this.setCurrentRawFrameValue(0.001 + offset);\r\n }\r\n\r\n this.trigger('segmentStart');\r\n };\r\n\r\n AnimationItem.prototype.setSegment = function (init, end) {\r\n var pendingFrame = -1;\r\n\r\n if (this.isPaused) {\r\n if (this.currentRawFrame + this.firstFrame < init) {\r\n pendingFrame = init;\r\n } else if (this.currentRawFrame + this.firstFrame > end) {\r\n pendingFrame = end - init;\r\n }\r\n }\r\n\r\n this.firstFrame = init;\r\n this.totalFrames = end - init;\r\n this.timeCompleted = this.totalFrames;\r\n\r\n if (pendingFrame !== -1) {\r\n this.goToAndStop(pendingFrame, true);\r\n }\r\n };\r\n\r\n AnimationItem.prototype.playSegments = function (arr, forceFlag) {\r\n if (forceFlag) {\r\n this.segments.length = 0;\r\n }\r\n\r\n if (_typeof$4(arr[0]) === 'object') {\r\n var i;\r\n var len = arr.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.segments.push(arr[i]);\r\n }\r\n } else {\r\n this.segments.push(arr);\r\n }\r\n\r\n if (this.segments.length && forceFlag) {\r\n this.adjustSegment(this.segments.shift(), 0);\r\n }\r\n\r\n if (this.isPaused) {\r\n this.play();\r\n }\r\n };\r\n\r\n AnimationItem.prototype.resetSegments = function (forceFlag) {\r\n this.segments.length = 0;\r\n this.segments.push([this.animationData.ip, this.animationData.op]);\r\n\r\n if (forceFlag) {\r\n this.checkSegments(0);\r\n }\r\n };\r\n\r\n AnimationItem.prototype.checkSegments = function (offset) {\r\n if (this.segments.length) {\r\n this.adjustSegment(this.segments.shift(), offset);\r\n return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n AnimationItem.prototype.destroy = function (name) {\r\n if (name && this.name !== name || !this.renderer) {\r\n return;\r\n }\r\n\r\n this.renderer.destroy();\r\n this.imagePreloader.destroy();\r\n this.trigger('destroy');\r\n this._cbs = null;\r\n this.onEnterFrame = null;\r\n this.onLoopComplete = null;\r\n this.onComplete = null;\r\n this.onSegmentStart = null;\r\n this.onDestroy = null;\r\n this.renderer = null;\r\n this.renderer = null;\r\n this.imagePreloader = null;\r\n this.projectInterface = null;\r\n };\r\n\r\n AnimationItem.prototype.setCurrentRawFrameValue = function (value) {\r\n this.currentRawFrame = value;\r\n this.gotoFrame();\r\n };\r\n\r\n AnimationItem.prototype.setSpeed = function (val) {\r\n this.playSpeed = val;\r\n this.updaFrameModifier();\r\n };\r\n\r\n AnimationItem.prototype.setDirection = function (val) {\r\n this.playDirection = val < 0 ? -1 : 1;\r\n this.updaFrameModifier();\r\n };\r\n\r\n AnimationItem.prototype.setVolume = function (val, name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n\r\n this.audioController.setVolume(val);\r\n };\r\n\r\n AnimationItem.prototype.getVolume = function () {\r\n return this.audioController.getVolume();\r\n };\r\n\r\n AnimationItem.prototype.mute = function (name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n\r\n this.audioController.mute();\r\n };\r\n\r\n AnimationItem.prototype.unmute = function (name) {\r\n if (name && this.name !== name) {\r\n return;\r\n }\r\n\r\n this.audioController.unmute();\r\n };\r\n\r\n AnimationItem.prototype.updaFrameModifier = function () {\r\n this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;\r\n this.audioController.setRate(this.playSpeed * this.playDirection);\r\n };\r\n\r\n AnimationItem.prototype.getPath = function () {\r\n return this.path;\r\n };\r\n\r\n AnimationItem.prototype.getAssetsPath = function (assetData) {\r\n var path = '';\r\n\r\n if (assetData.e) {\r\n path = assetData.p;\r\n } else if (this.assetsPath) {\r\n var imagePath = assetData.p;\r\n\r\n if (imagePath.indexOf('images/') !== -1) {\r\n imagePath = imagePath.split('/')[1];\r\n }\r\n\r\n path = this.assetsPath + imagePath;\r\n } else {\r\n path = this.path;\r\n path += assetData.u ? assetData.u : '';\r\n path += assetData.p;\r\n }\r\n\r\n return path;\r\n };\r\n\r\n AnimationItem.prototype.getAssetData = function (id) {\r\n var i = 0;\r\n var len = this.assets.length;\r\n\r\n while (i < len) {\r\n if (id === this.assets[i].id) {\r\n return this.assets[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null;\r\n };\r\n\r\n AnimationItem.prototype.hide = function () {\r\n this.renderer.hide();\r\n };\r\n\r\n AnimationItem.prototype.show = function () {\r\n this.renderer.show();\r\n };\r\n\r\n AnimationItem.prototype.getDuration = function (isFrame) {\r\n return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;\r\n };\r\n\r\n AnimationItem.prototype.updateDocumentData = function (path, documentData, index) {\r\n try {\r\n var element = this.renderer.getElementByPath(path);\r\n element.updateDocumentData(documentData, index);\r\n } catch (error) {// TODO: decide how to handle catch case\r\n }\r\n };\r\n\r\n AnimationItem.prototype.trigger = function (name) {\r\n if (this._cbs && this._cbs[name]) {\r\n switch (name) {\r\n case 'enterFrame':\r\n this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));\r\n break;\r\n\r\n case 'drawnFrame':\r\n this.drawnFrameEvent.currentTime = this.currentFrame;\r\n this.drawnFrameEvent.totalTime = this.totalFrames;\r\n this.drawnFrameEvent.direction = this.frameModifier;\r\n this.triggerEvent(name, this.drawnFrameEvent);\r\n break;\r\n\r\n case 'loopComplete':\r\n this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));\r\n break;\r\n\r\n case 'complete':\r\n this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));\r\n break;\r\n\r\n case 'segmentStart':\r\n this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));\r\n break;\r\n\r\n case 'destroy':\r\n this.triggerEvent(name, new BMDestroyEvent(name, this));\r\n break;\r\n\r\n default:\r\n this.triggerEvent(name);\r\n }\r\n }\r\n\r\n if (name === 'enterFrame' && this.onEnterFrame) {\r\n this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));\r\n }\r\n\r\n if (name === 'loopComplete' && this.onLoopComplete) {\r\n this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));\r\n }\r\n\r\n if (name === 'complete' && this.onComplete) {\r\n this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));\r\n }\r\n\r\n if (name === 'segmentStart' && this.onSegmentStart) {\r\n this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));\r\n }\r\n\r\n if (name === 'destroy' && this.onDestroy) {\r\n this.onDestroy.call(this, new BMDestroyEvent(name, this));\r\n }\r\n };\r\n\r\n AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {\r\n var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);\r\n this.triggerEvent('error', error);\r\n\r\n if (this.onError) {\r\n this.onError.call(this, error);\r\n }\r\n };\r\n\r\n AnimationItem.prototype.triggerConfigError = function (nativeError) {\r\n var error = new BMConfigErrorEvent(nativeError, this.currentFrame);\r\n this.triggerEvent('error', error);\r\n\r\n if (this.onError) {\r\n this.onError.call(this, error);\r\n }\r\n };\r\n\r\n var animationManager = function () {\r\n var moduleOb = {};\r\n var registeredAnimations = [];\r\n var initTime = 0;\r\n var len = 0;\r\n var playingAnimationsNum = 0;\r\n var _stopped = true;\r\n var _isFrozen = false;\r\n\r\n function removeElement(ev) {\r\n var i = 0;\r\n var animItem = ev.target;\r\n\r\n while (i < len) {\r\n if (registeredAnimations[i].animation === animItem) {\r\n registeredAnimations.splice(i, 1);\r\n i -= 1;\r\n len -= 1;\r\n\r\n if (!animItem.isPaused) {\r\n subtractPlayingCount();\r\n }\r\n }\r\n\r\n i += 1;\r\n }\r\n }\r\n\r\n function registerAnimation(element, animationData) {\r\n if (!element) {\r\n return null;\r\n }\r\n\r\n var i = 0;\r\n\r\n while (i < len) {\r\n if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {\r\n return registeredAnimations[i].animation;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n var animItem = new AnimationItem();\r\n setupAnimation(animItem, element);\r\n animItem.setData(element, animationData);\r\n return animItem;\r\n }\r\n\r\n function getRegisteredAnimations() {\r\n var i;\r\n var lenAnims = registeredAnimations.length;\r\n var animations = [];\r\n\r\n for (i = 0; i < lenAnims; i += 1) {\r\n animations.push(registeredAnimations[i].animation);\r\n }\r\n\r\n return animations;\r\n }\r\n\r\n function addPlayingCount() {\r\n playingAnimationsNum += 1;\r\n activate();\r\n }\r\n\r\n function subtractPlayingCount() {\r\n playingAnimationsNum -= 1;\r\n }\r\n\r\n function setupAnimation(animItem, element) {\r\n animItem.addEventListener('destroy', removeElement);\r\n animItem.addEventListener('_active', addPlayingCount);\r\n animItem.addEventListener('_idle', subtractPlayingCount);\r\n registeredAnimations.push({\r\n elem: element,\r\n animation: animItem\r\n });\r\n len += 1;\r\n }\r\n\r\n function loadAnimation(params) {\r\n var animItem = new AnimationItem();\r\n setupAnimation(animItem, null);\r\n animItem.setParams(params);\r\n return animItem;\r\n }\r\n\r\n function setSpeed(val, animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.setSpeed(val, animation);\r\n }\r\n }\r\n\r\n function setDirection(val, animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.setDirection(val, animation);\r\n }\r\n }\r\n\r\n function play(animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.play(animation);\r\n }\r\n }\r\n\r\n function resume(nowTime) {\r\n var elapsedTime = nowTime - initTime;\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.advanceTime(elapsedTime);\r\n }\r\n\r\n initTime = nowTime;\r\n\r\n if (playingAnimationsNum && !_isFrozen) {\r\n window.requestAnimationFrame(resume);\r\n } else {\r\n _stopped = true;\r\n }\r\n }\r\n\r\n function first(nowTime) {\r\n initTime = nowTime;\r\n window.requestAnimationFrame(resume);\r\n }\r\n\r\n function pause(animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.pause(animation);\r\n }\r\n }\r\n\r\n function goToAndStop(value, isFrame, animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);\r\n }\r\n }\r\n\r\n function stop(animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.stop(animation);\r\n }\r\n }\r\n\r\n function togglePause(animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.togglePause(animation);\r\n }\r\n }\r\n\r\n function destroy(animation) {\r\n var i;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n registeredAnimations[i].animation.destroy(animation);\r\n }\r\n }\r\n\r\n function searchAnimations(animationData, standalone, renderer) {\r\n var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')), [].slice.call(document.getElementsByClassName('bodymovin')));\r\n var i;\r\n var lenAnims = animElements.length;\r\n\r\n for (i = 0; i < lenAnims; i += 1) {\r\n if (renderer) {\r\n animElements[i].setAttribute('data-bm-type', renderer);\r\n }\r\n\r\n registerAnimation(animElements[i], animationData);\r\n }\r\n\r\n if (standalone && lenAnims === 0) {\r\n if (!renderer) {\r\n renderer = 'svg';\r\n }\r\n\r\n var body = document.getElementsByTagName('body')[0];\r\n body.innerText = '';\r\n var div = createTag('div');\r\n div.style.width = '100%';\r\n div.style.height = '100%';\r\n div.setAttribute('data-bm-type', renderer);\r\n body.appendChild(div);\r\n registerAnimation(div, animationData);\r\n }\r\n }\r\n\r\n function resize() {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.resize();\r\n }\r\n }\r\n\r\n function activate() {\r\n if (!_isFrozen && playingAnimationsNum) {\r\n if (_stopped) {\r\n window.requestAnimationFrame(first);\r\n _stopped = false;\r\n }\r\n }\r\n }\r\n\r\n function freeze() {\r\n _isFrozen = true;\r\n }\r\n\r\n function unfreeze() {\r\n _isFrozen = false;\r\n activate();\r\n }\r\n\r\n function setVolume(val, animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.setVolume(val, animation);\r\n }\r\n }\r\n\r\n function mute(animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.mute(animation);\r\n }\r\n }\r\n\r\n function unmute(animation) {\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registeredAnimations[i].animation.unmute(animation);\r\n }\r\n }\r\n\r\n moduleOb.registerAnimation = registerAnimation;\r\n moduleOb.loadAnimation = loadAnimation;\r\n moduleOb.setSpeed = setSpeed;\r\n moduleOb.setDirection = setDirection;\r\n moduleOb.play = play;\r\n moduleOb.pause = pause;\r\n moduleOb.stop = stop;\r\n moduleOb.togglePause = togglePause;\r\n moduleOb.searchAnimations = searchAnimations;\r\n moduleOb.resize = resize; // moduleOb.start = start;\r\n\r\n moduleOb.goToAndStop = goToAndStop;\r\n moduleOb.destroy = destroy;\r\n moduleOb.freeze = freeze;\r\n moduleOb.unfreeze = unfreeze;\r\n moduleOb.setVolume = setVolume;\r\n moduleOb.mute = mute;\r\n moduleOb.unmute = unmute;\r\n moduleOb.getRegisteredAnimations = getRegisteredAnimations;\r\n return moduleOb;\r\n }();\r\n\r\n /* eslint-disable */\r\n var BezierFactory = function () {\r\n /**\r\n * BezierEasing - use bezier curve for transition easing function\r\n * by Gaëtan Renaudeau 2014 - 2015 – MIT License\r\n *\r\n * Credits: is based on Firefox's nsSMILKeySpline.cpp\r\n * Usage:\r\n * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])\r\n * spline.get(x) => returns the easing value | x must be in [0, 1] range\r\n *\r\n */\r\n var ob = {};\r\n ob.getBezierEasing = getBezierEasing;\r\n var beziers = {};\r\n\r\n function getBezierEasing(a, b, c, d, nm) {\r\n var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\\./g, 'p');\r\n\r\n if (beziers[str]) {\r\n return beziers[str];\r\n }\r\n\r\n var bezEasing = new BezierEasing([a, b, c, d]);\r\n beziers[str] = bezEasing;\r\n return bezEasing;\r\n } // These values are established by empiricism with tests (tradeoff: performance VS precision)\r\n\r\n\r\n var NEWTON_ITERATIONS = 4;\r\n var NEWTON_MIN_SLOPE = 0.001;\r\n var SUBDIVISION_PRECISION = 0.0000001;\r\n var SUBDIVISION_MAX_ITERATIONS = 10;\r\n var kSplineTableSize = 11;\r\n var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\r\n var float32ArraySupported = typeof Float32Array === 'function';\r\n\r\n function A(aA1, aA2) {\r\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\r\n }\r\n\r\n function B(aA1, aA2) {\r\n return 3.0 * aA2 - 6.0 * aA1;\r\n }\r\n\r\n function C(aA1) {\r\n return 3.0 * aA1;\r\n } // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\r\n\r\n\r\n function calcBezier(aT, aA1, aA2) {\r\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\r\n } // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\r\n\r\n\r\n function getSlope(aT, aA1, aA2) {\r\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\r\n }\r\n\r\n function binarySubdivide(aX, aA, aB, mX1, mX2) {\r\n var currentX,\r\n currentT,\r\n i = 0;\r\n\r\n do {\r\n currentT = aA + (aB - aA) / 2.0;\r\n currentX = calcBezier(currentT, mX1, mX2) - aX;\r\n\r\n if (currentX > 0.0) {\r\n aB = currentT;\r\n } else {\r\n aA = currentT;\r\n }\r\n } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\r\n\r\n return currentT;\r\n }\r\n\r\n function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\r\n for (var i = 0; i < NEWTON_ITERATIONS; ++i) {\r\n var currentSlope = getSlope(aGuessT, mX1, mX2);\r\n if (currentSlope === 0.0) return aGuessT;\r\n var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\r\n aGuessT -= currentX / currentSlope;\r\n }\r\n\r\n return aGuessT;\r\n }\r\n /**\r\n * points is an array of [ mX1, mY1, mX2, mY2 ]\r\n */\r\n\r\n\r\n function BezierEasing(points) {\r\n this._p = points;\r\n this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\r\n this._precomputed = false;\r\n this.get = this.get.bind(this);\r\n }\r\n\r\n BezierEasing.prototype = {\r\n get: function get(x) {\r\n var mX1 = this._p[0],\r\n mY1 = this._p[1],\r\n mX2 = this._p[2],\r\n mY2 = this._p[3];\r\n if (!this._precomputed) this._precompute();\r\n if (mX1 === mY1 && mX2 === mY2) return x; // linear\r\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\r\n\r\n if (x === 0) return 0;\r\n if (x === 1) return 1;\r\n return calcBezier(this._getTForX(x), mY1, mY2);\r\n },\r\n // Private part\r\n _precompute: function _precompute() {\r\n var mX1 = this._p[0],\r\n mY1 = this._p[1],\r\n mX2 = this._p[2],\r\n mY2 = this._p[3];\r\n this._precomputed = true;\r\n\r\n if (mX1 !== mY1 || mX2 !== mY2) {\r\n this._calcSampleValues();\r\n }\r\n },\r\n _calcSampleValues: function _calcSampleValues() {\r\n var mX1 = this._p[0],\r\n mX2 = this._p[2];\r\n\r\n for (var i = 0; i < kSplineTableSize; ++i) {\r\n this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\r\n }\r\n },\r\n\r\n /**\r\n * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.\r\n */\r\n _getTForX: function _getTForX(aX) {\r\n var mX1 = this._p[0],\r\n mX2 = this._p[2],\r\n mSampleValues = this._mSampleValues;\r\n var intervalStart = 0.0;\r\n var currentSample = 1;\r\n var lastSample = kSplineTableSize - 1;\r\n\r\n for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {\r\n intervalStart += kSampleStepSize;\r\n }\r\n\r\n --currentSample; // Interpolate to provide an initial guess for t\r\n\r\n var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);\r\n var guessForT = intervalStart + dist * kSampleStepSize;\r\n var initialSlope = getSlope(guessForT, mX1, mX2);\r\n\r\n if (initialSlope >= NEWTON_MIN_SLOPE) {\r\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\r\n }\r\n\r\n if (initialSlope === 0.0) {\r\n return guessForT;\r\n }\r\n\r\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\r\n }\r\n };\r\n return ob;\r\n }();\r\n\r\n var pooling = function () {\r\n function _double(arr) {\r\n return arr.concat(createSizedArray(arr.length));\r\n }\r\n\r\n return {\r\n \"double\": _double\r\n };\r\n }();\r\n\r\n var poolFactory = function () {\r\n return function (initialLength, _create, _release) {\r\n var _length = 0;\r\n var _maxLength = initialLength;\r\n var pool = createSizedArray(_maxLength);\r\n var ob = {\r\n newElement: newElement,\r\n release: release\r\n };\r\n\r\n function newElement() {\r\n var element;\r\n\r\n if (_length) {\r\n _length -= 1;\r\n element = pool[_length];\r\n } else {\r\n element = _create();\r\n }\r\n\r\n return element;\r\n }\r\n\r\n function release(element) {\r\n if (_length === _maxLength) {\r\n pool = pooling[\"double\"](pool);\r\n _maxLength *= 2;\r\n }\r\n\r\n if (_release) {\r\n _release(element);\r\n }\r\n\r\n pool[_length] = element;\r\n _length += 1;\r\n }\r\n\r\n return ob;\r\n };\r\n }();\r\n\r\n var bezierLengthPool = function () {\r\n function create() {\r\n return {\r\n addedLength: 0,\r\n percents: createTypedArray('float32', getDefaultCurveSegments()),\r\n lengths: createTypedArray('float32', getDefaultCurveSegments())\r\n };\r\n }\r\n\r\n return poolFactory(8, create);\r\n }();\r\n\r\n var segmentsLengthPool = function () {\r\n function create() {\r\n return {\r\n lengths: [],\r\n totalLength: 0\r\n };\r\n }\r\n\r\n function release(element) {\r\n var i;\r\n var len = element.lengths.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n bezierLengthPool.release(element.lengths[i]);\r\n }\r\n\r\n element.lengths.length = 0;\r\n }\r\n\r\n return poolFactory(8, create, release);\r\n }();\r\n\r\n function bezFunction() {\r\n var math = Math;\r\n\r\n function pointOnLine2D(x1, y1, x2, y2, x3, y3) {\r\n var det1 = x1 * y2 + y1 * x3 + x2 * y3 - x3 * y2 - y3 * x1 - x2 * y1;\r\n return det1 > -0.001 && det1 < 0.001;\r\n }\r\n\r\n function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {\r\n if (z1 === 0 && z2 === 0 && z3 === 0) {\r\n return pointOnLine2D(x1, y1, x2, y2, x3, y3);\r\n }\r\n\r\n var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));\r\n var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));\r\n var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));\r\n var diffDist;\r\n\r\n if (dist1 > dist2) {\r\n if (dist1 > dist3) {\r\n diffDist = dist1 - dist2 - dist3;\r\n } else {\r\n diffDist = dist3 - dist2 - dist1;\r\n }\r\n } else if (dist3 > dist2) {\r\n diffDist = dist3 - dist2 - dist1;\r\n } else {\r\n diffDist = dist2 - dist1 - dist3;\r\n }\r\n\r\n return diffDist > -0.0001 && diffDist < 0.0001;\r\n }\r\n\r\n var getBezierLength = function () {\r\n return function (pt1, pt2, pt3, pt4) {\r\n var curveSegments = getDefaultCurveSegments();\r\n var k;\r\n var i;\r\n var len;\r\n var ptCoord;\r\n var perc;\r\n var addedLength = 0;\r\n var ptDistance;\r\n var point = [];\r\n var lastPoint = [];\r\n var lengthData = bezierLengthPool.newElement();\r\n len = pt3.length;\r\n\r\n for (k = 0; k < curveSegments; k += 1) {\r\n perc = k / (curveSegments - 1);\r\n ptDistance = 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];\r\n point[i] = ptCoord;\r\n\r\n if (lastPoint[i] !== null) {\r\n ptDistance += bmPow(point[i] - lastPoint[i], 2);\r\n }\r\n\r\n lastPoint[i] = point[i];\r\n }\r\n\r\n if (ptDistance) {\r\n ptDistance = bmSqrt(ptDistance);\r\n addedLength += ptDistance;\r\n }\r\n\r\n lengthData.percents[k] = perc;\r\n lengthData.lengths[k] = addedLength;\r\n }\r\n\r\n lengthData.addedLength = addedLength;\r\n return lengthData;\r\n };\r\n }();\r\n\r\n function getSegmentsLength(shapeData) {\r\n var segmentsLength = segmentsLengthPool.newElement();\r\n var closed = shapeData.c;\r\n var pathV = shapeData.v;\r\n var pathO = shapeData.o;\r\n var pathI = shapeData.i;\r\n var i;\r\n var len = shapeData._length;\r\n var lengths = segmentsLength.lengths;\r\n var totalLength = 0;\r\n\r\n for (i = 0; i < len - 1; i += 1) {\r\n lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);\r\n totalLength += lengths[i].addedLength;\r\n }\r\n\r\n if (closed && len) {\r\n lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);\r\n totalLength += lengths[i].addedLength;\r\n }\r\n\r\n segmentsLength.totalLength = totalLength;\r\n return segmentsLength;\r\n }\r\n\r\n function BezierData(length) {\r\n this.segmentLength = 0;\r\n this.points = new Array(length);\r\n }\r\n\r\n function PointData(partial, point) {\r\n this.partialLength = partial;\r\n this.point = point;\r\n }\r\n\r\n var buildBezierData = function () {\r\n var storedData = {};\r\n return function (pt1, pt2, pt3, pt4) {\r\n var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\\./g, 'p');\r\n\r\n if (!storedData[bezierName]) {\r\n var curveSegments = getDefaultCurveSegments();\r\n var k;\r\n var i;\r\n var len;\r\n var ptCoord;\r\n var perc;\r\n var addedLength = 0;\r\n var ptDistance;\r\n var point;\r\n var lastPoint = null;\r\n\r\n if (pt1.length === 2 && (pt1[0] !== pt2[0] || pt1[1] !== pt2[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt1[0] + pt3[0], pt1[1] + pt3[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt2[0] + pt4[0], pt2[1] + pt4[1])) {\r\n curveSegments = 2;\r\n }\r\n\r\n var bezierData = new BezierData(curveSegments);\r\n len = pt3.length;\r\n\r\n for (k = 0; k < curveSegments; k += 1) {\r\n point = createSizedArray(len);\r\n perc = k / (curveSegments - 1);\r\n ptDistance = 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];\r\n point[i] = ptCoord;\r\n\r\n if (lastPoint !== null) {\r\n ptDistance += bmPow(point[i] - lastPoint[i], 2);\r\n }\r\n }\r\n\r\n ptDistance = bmSqrt(ptDistance);\r\n addedLength += ptDistance;\r\n bezierData.points[k] = new PointData(ptDistance, point);\r\n lastPoint = point;\r\n }\r\n\r\n bezierData.segmentLength = addedLength;\r\n storedData[bezierName] = bezierData;\r\n }\r\n\r\n return storedData[bezierName];\r\n };\r\n }();\r\n\r\n function getDistancePerc(perc, bezierData) {\r\n var percents = bezierData.percents;\r\n var lengths = bezierData.lengths;\r\n var len = percents.length;\r\n var initPos = bmFloor((len - 1) * perc);\r\n var lengthPos = perc * bezierData.addedLength;\r\n var lPerc = 0;\r\n\r\n if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {\r\n return percents[initPos];\r\n }\r\n\r\n var dir = lengths[initPos] > lengthPos ? -1 : 1;\r\n var flag = true;\r\n\r\n while (flag) {\r\n if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {\r\n lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);\r\n flag = false;\r\n } else {\r\n initPos += dir;\r\n }\r\n\r\n if (initPos < 0 || initPos >= len - 1) {\r\n // FIX for TypedArrays that don't store floating point values with enough accuracy\r\n if (initPos === len - 1) {\r\n return percents[initPos];\r\n }\r\n\r\n flag = false;\r\n }\r\n }\r\n\r\n return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;\r\n }\r\n\r\n function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {\r\n var t1 = getDistancePerc(percent, bezierData);\r\n var u1 = 1 - t1;\r\n var ptX = math.round((u1 * u1 * u1 * pt1[0] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[0] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[0] + t1 * t1 * t1 * pt2[0]) * 1000) / 1000;\r\n var ptY = math.round((u1 * u1 * u1 * pt1[1] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[1] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[1] + t1 * t1 * t1 * pt2[1]) * 1000) / 1000;\r\n return [ptX, ptY];\r\n }\r\n\r\n var bezierSegmentPoints = createTypedArray('float32', 8);\r\n\r\n function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {\r\n if (startPerc < 0) {\r\n startPerc = 0;\r\n } else if (startPerc > 1) {\r\n startPerc = 1;\r\n }\r\n\r\n var t0 = getDistancePerc(startPerc, bezierData);\r\n endPerc = endPerc > 1 ? 1 : endPerc;\r\n var t1 = getDistancePerc(endPerc, bezierData);\r\n var i;\r\n var len = pt1.length;\r\n var u0 = 1 - t0;\r\n var u1 = 1 - t1;\r\n var u0u0u0 = u0 * u0 * u0;\r\n var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase\r\n\r\n var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase\r\n\r\n var t0t0t0 = t0 * t0 * t0; //\r\n\r\n var u0u0u1 = u0 * u0 * u1;\r\n var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase\r\n\r\n var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase\r\n\r\n var t0t0t1 = t0 * t0 * t1; //\r\n\r\n var u0u1u1 = u0 * u1 * u1;\r\n var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase\r\n\r\n var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase\r\n\r\n var t0t1t1 = t0 * t1 * t1; //\r\n\r\n var u1u1u1 = u1 * u1 * u1;\r\n var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase\r\n\r\n var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase\r\n\r\n var t1t1t1 = t1 * t1 * t1;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\r\n\r\n bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\r\n\r\n bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\r\n\r\n bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\r\n }\r\n\r\n return bezierSegmentPoints;\r\n }\r\n\r\n return {\r\n getSegmentsLength: getSegmentsLength,\r\n getNewSegment: getNewSegment,\r\n getPointInSegment: getPointInSegment,\r\n buildBezierData: buildBezierData,\r\n pointOnLine2D: pointOnLine2D,\r\n pointOnLine3D: pointOnLine3D\r\n };\r\n }\r\n\r\n var bez = bezFunction();\r\n\r\n var PropertyFactory = function () {\r\n var initFrame = initialDefaultFrame;\r\n var mathAbs = Math.abs;\r\n\r\n function interpolateValue(frameNum, caching) {\r\n var offsetTime = this.offsetTime;\r\n var newValue;\r\n\r\n if (this.propType === 'multidimensional') {\r\n newValue = createTypedArray('float32', this.pv.length);\r\n }\r\n\r\n var iterationIndex = caching.lastIndex;\r\n var i = iterationIndex;\r\n var len = this.keyframes.length - 1;\r\n var flag = true;\r\n var keyData;\r\n var nextKeyData;\r\n var keyframeMetadata;\r\n\r\n while (flag) {\r\n keyData = this.keyframes[i];\r\n nextKeyData = this.keyframes[i + 1];\r\n\r\n if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {\r\n if (keyData.h) {\r\n keyData = nextKeyData;\r\n }\r\n\r\n iterationIndex = 0;\r\n break;\r\n }\r\n\r\n if (nextKeyData.t - offsetTime > frameNum) {\r\n iterationIndex = i;\r\n break;\r\n }\r\n\r\n if (i < len - 1) {\r\n i += 1;\r\n } else {\r\n iterationIndex = 0;\r\n flag = false;\r\n }\r\n }\r\n\r\n keyframeMetadata = this.keyframesMetadata[i] || {};\r\n var k;\r\n var kLen;\r\n var perc;\r\n var jLen;\r\n var j;\r\n var fnc;\r\n var nextKeyTime = nextKeyData.t - offsetTime;\r\n var keyTime = keyData.t - offsetTime;\r\n var endValue;\r\n\r\n if (keyData.to) {\r\n if (!keyframeMetadata.bezierData) {\r\n keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);\r\n }\r\n\r\n var bezierData = keyframeMetadata.bezierData;\r\n\r\n if (frameNum >= nextKeyTime || frameNum < keyTime) {\r\n var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;\r\n kLen = bezierData.points[ind].point.length;\r\n\r\n for (k = 0; k < kLen; k += 1) {\r\n newValue[k] = bezierData.points[ind].point[k];\r\n } // caching._lastKeyframeIndex = -1;\r\n\r\n } else {\r\n if (keyframeMetadata.__fnct) {\r\n fnc = keyframeMetadata.__fnct;\r\n } else {\r\n fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;\r\n keyframeMetadata.__fnct = fnc;\r\n }\r\n\r\n perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));\r\n var distanceInLine = bezierData.segmentLength * perc;\r\n var segmentPerc;\r\n var addedLength = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastAddedLength : 0;\r\n j = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastPoint : 0;\r\n flag = true;\r\n jLen = bezierData.points.length;\r\n\r\n while (flag) {\r\n addedLength += bezierData.points[j].partialLength;\r\n\r\n if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {\r\n kLen = bezierData.points[j].point.length;\r\n\r\n for (k = 0; k < kLen; k += 1) {\r\n newValue[k] = bezierData.points[j].point[k];\r\n }\r\n\r\n break;\r\n } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {\r\n segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;\r\n kLen = bezierData.points[j].point.length;\r\n\r\n for (k = 0; k < kLen; k += 1) {\r\n newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;\r\n }\r\n\r\n break;\r\n }\r\n\r\n if (j < jLen - 1) {\r\n j += 1;\r\n } else {\r\n flag = false;\r\n }\r\n }\r\n\r\n caching._lastPoint = j;\r\n caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;\r\n caching._lastKeyframeIndex = i;\r\n }\r\n } else {\r\n var outX;\r\n var outY;\r\n var inX;\r\n var inY;\r\n var keyValue;\r\n len = keyData.s.length;\r\n endValue = nextKeyData.s || keyData.e;\r\n\r\n if (this.sh && keyData.h !== 1) {\r\n if (frameNum >= nextKeyTime) {\r\n newValue[0] = endValue[0];\r\n newValue[1] = endValue[1];\r\n newValue[2] = endValue[2];\r\n } else if (frameNum <= keyTime) {\r\n newValue[0] = keyData.s[0];\r\n newValue[1] = keyData.s[1];\r\n newValue[2] = keyData.s[2];\r\n } else {\r\n var quatStart = createQuaternion(keyData.s);\r\n var quatEnd = createQuaternion(endValue);\r\n var time = (frameNum - keyTime) / (nextKeyTime - keyTime);\r\n quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));\r\n }\r\n } else {\r\n for (i = 0; i < len; i += 1) {\r\n if (keyData.h !== 1) {\r\n if (frameNum >= nextKeyTime) {\r\n perc = 1;\r\n } else if (frameNum < keyTime) {\r\n perc = 0;\r\n } else {\r\n if (keyData.o.x.constructor === Array) {\r\n if (!keyframeMetadata.__fnct) {\r\n keyframeMetadata.__fnct = [];\r\n }\r\n\r\n if (!keyframeMetadata.__fnct[i]) {\r\n outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];\r\n outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];\r\n inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];\r\n inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];\r\n fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;\r\n keyframeMetadata.__fnct[i] = fnc;\r\n } else {\r\n fnc = keyframeMetadata.__fnct[i];\r\n }\r\n } else if (!keyframeMetadata.__fnct) {\r\n outX = keyData.o.x;\r\n outY = keyData.o.y;\r\n inX = keyData.i.x;\r\n inY = keyData.i.y;\r\n fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;\r\n keyData.keyframeMetadata = fnc;\r\n } else {\r\n fnc = keyframeMetadata.__fnct;\r\n }\r\n\r\n perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));\r\n }\r\n }\r\n\r\n endValue = nextKeyData.s || keyData.e;\r\n keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;\r\n\r\n if (this.propType === 'multidimensional') {\r\n newValue[i] = keyValue;\r\n } else {\r\n newValue = keyValue;\r\n }\r\n }\r\n }\r\n }\r\n\r\n caching.lastIndex = iterationIndex;\r\n return newValue;\r\n } // based on @Toji's https://github.com/toji/gl-matrix/\r\n\r\n\r\n function slerp(a, b, t) {\r\n var out = [];\r\n var ax = a[0];\r\n var ay = a[1];\r\n var az = a[2];\r\n var aw = a[3];\r\n var bx = b[0];\r\n var by = b[1];\r\n var bz = b[2];\r\n var bw = b[3];\r\n var omega;\r\n var cosom;\r\n var sinom;\r\n var scale0;\r\n var scale1;\r\n cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n if (cosom < 0.0) {\r\n cosom = -cosom;\r\n bx = -bx;\r\n by = -by;\r\n bz = -bz;\r\n bw = -bw;\r\n }\r\n\r\n if (1.0 - cosom > 0.000001) {\r\n omega = Math.acos(cosom);\r\n sinom = Math.sin(omega);\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n } else {\r\n scale0 = 1.0 - t;\r\n scale1 = t;\r\n }\r\n\r\n out[0] = scale0 * ax + scale1 * bx;\r\n out[1] = scale0 * ay + scale1 * by;\r\n out[2] = scale0 * az + scale1 * bz;\r\n out[3] = scale0 * aw + scale1 * bw;\r\n return out;\r\n }\r\n\r\n function quaternionToEuler(out, quat) {\r\n var qx = quat[0];\r\n var qy = quat[1];\r\n var qz = quat[2];\r\n var qw = quat[3];\r\n var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);\r\n var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);\r\n var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);\r\n out[0] = heading / degToRads;\r\n out[1] = attitude / degToRads;\r\n out[2] = bank / degToRads;\r\n }\r\n\r\n function createQuaternion(values) {\r\n var heading = values[0] * degToRads;\r\n var attitude = values[1] * degToRads;\r\n var bank = values[2] * degToRads;\r\n var c1 = Math.cos(heading / 2);\r\n var c2 = Math.cos(attitude / 2);\r\n var c3 = Math.cos(bank / 2);\r\n var s1 = Math.sin(heading / 2);\r\n var s2 = Math.sin(attitude / 2);\r\n var s3 = Math.sin(bank / 2);\r\n var w = c1 * c2 * c3 - s1 * s2 * s3;\r\n var x = s1 * s2 * c3 + c1 * c2 * s3;\r\n var y = s1 * c2 * c3 + c1 * s2 * s3;\r\n var z = c1 * s2 * c3 - s1 * c2 * s3;\r\n return [x, y, z, w];\r\n }\r\n\r\n function getValueAtCurrentTime() {\r\n var frameNum = this.comp.renderedFrame - this.offsetTime;\r\n var initTime = this.keyframes[0].t - this.offsetTime;\r\n var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;\r\n\r\n if (!(frameNum === this._caching.lastFrame || this._caching.lastFrame !== initFrame && (this._caching.lastFrame >= endTime && frameNum >= endTime || this._caching.lastFrame < initTime && frameNum < initTime))) {\r\n if (this._caching.lastFrame >= frameNum) {\r\n this._caching._lastKeyframeIndex = -1;\r\n this._caching.lastIndex = 0;\r\n }\r\n\r\n var renderResult = this.interpolateValue(frameNum, this._caching);\r\n this.pv = renderResult;\r\n }\r\n\r\n this._caching.lastFrame = frameNum;\r\n return this.pv;\r\n }\r\n\r\n function setVValue(val) {\r\n var multipliedValue;\r\n\r\n if (this.propType === 'unidimensional') {\r\n multipliedValue = val * this.mult;\r\n\r\n if (mathAbs(this.v - multipliedValue) > 0.00001) {\r\n this.v = multipliedValue;\r\n this._mdf = true;\r\n }\r\n } else {\r\n var i = 0;\r\n var len = this.v.length;\r\n\r\n while (i < len) {\r\n multipliedValue = val[i] * this.mult;\r\n\r\n if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {\r\n this.v[i] = multipliedValue;\r\n this._mdf = true;\r\n }\r\n\r\n i += 1;\r\n }\r\n }\r\n }\r\n\r\n function processEffectsSequence() {\r\n if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {\r\n return;\r\n }\r\n\r\n if (this.lock) {\r\n this.setVValue(this.pv);\r\n return;\r\n }\r\n\r\n this.lock = true;\r\n this._mdf = this._isFirstFrame;\r\n var i;\r\n var len = this.effectsSequence.length;\r\n var finalValue = this.kf ? this.pv : this.data.k;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n finalValue = this.effectsSequence[i](finalValue);\r\n }\r\n\r\n this.setVValue(finalValue);\r\n this._isFirstFrame = false;\r\n this.lock = false;\r\n this.frameId = this.elem.globalData.frameId;\r\n }\r\n\r\n function addEffect(effectFunction) {\r\n this.effectsSequence.push(effectFunction);\r\n this.container.addDynamicProperty(this);\r\n }\r\n\r\n function ValueProperty(elem, data, mult, container) {\r\n this.propType = 'unidimensional';\r\n this.mult = mult || 1;\r\n this.data = data;\r\n this.v = mult ? data.k * mult : data.k;\r\n this.pv = data.k;\r\n this._mdf = false;\r\n this.elem = elem;\r\n this.container = container;\r\n this.comp = elem.comp;\r\n this.k = false;\r\n this.kf = false;\r\n this.vel = 0;\r\n this.effectsSequence = [];\r\n this._isFirstFrame = true;\r\n this.getValue = processEffectsSequence;\r\n this.setVValue = setVValue;\r\n this.addEffect = addEffect;\r\n }\r\n\r\n function MultiDimensionalProperty(elem, data, mult, container) {\r\n this.propType = 'multidimensional';\r\n this.mult = mult || 1;\r\n this.data = data;\r\n this._mdf = false;\r\n this.elem = elem;\r\n this.container = container;\r\n this.comp = elem.comp;\r\n this.k = false;\r\n this.kf = false;\r\n this.frameId = -1;\r\n var i;\r\n var len = data.k.length;\r\n this.v = createTypedArray('float32', len);\r\n this.pv = createTypedArray('float32', len);\r\n this.vel = createTypedArray('float32', len);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.v[i] = data.k[i] * this.mult;\r\n this.pv[i] = data.k[i];\r\n }\r\n\r\n this._isFirstFrame = true;\r\n this.effectsSequence = [];\r\n this.getValue = processEffectsSequence;\r\n this.setVValue = setVValue;\r\n this.addEffect = addEffect;\r\n }\r\n\r\n function KeyframedValueProperty(elem, data, mult, container) {\r\n this.propType = 'unidimensional';\r\n this.keyframes = data.k;\r\n this.keyframesMetadata = [];\r\n this.offsetTime = elem.data.st;\r\n this.frameId = -1;\r\n this._caching = {\r\n lastFrame: initFrame,\r\n lastIndex: 0,\r\n value: 0,\r\n _lastKeyframeIndex: -1\r\n };\r\n this.k = true;\r\n this.kf = true;\r\n this.data = data;\r\n this.mult = mult || 1;\r\n this.elem = elem;\r\n this.container = container;\r\n this.comp = elem.comp;\r\n this.v = initFrame;\r\n this.pv = initFrame;\r\n this._isFirstFrame = true;\r\n this.getValue = processEffectsSequence;\r\n this.setVValue = setVValue;\r\n this.interpolateValue = interpolateValue;\r\n this.effectsSequence = [getValueAtCurrentTime.bind(this)];\r\n this.addEffect = addEffect;\r\n }\r\n\r\n function KeyframedMultidimensionalProperty(elem, data, mult, container) {\r\n this.propType = 'multidimensional';\r\n var i;\r\n var len = data.k.length;\r\n var s;\r\n var e;\r\n var to;\r\n var ti;\r\n\r\n for (i = 0; i < len - 1; i += 1) {\r\n if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {\r\n s = data.k[i].s;\r\n e = data.k[i + 1].s;\r\n to = data.k[i].to;\r\n ti = data.k[i].ti;\r\n\r\n if (s.length === 2 && !(s[0] === e[0] && s[1] === e[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], s[0] + to[0], s[1] + to[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], e[0] + ti[0], e[1] + ti[1]) || s.length === 3 && !(s[0] === e[0] && s[1] === e[1] && s[2] === e[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], s[0] + to[0], s[1] + to[1], s[2] + to[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], e[0] + ti[0], e[1] + ti[1], e[2] + ti[2])) {\r\n data.k[i].to = null;\r\n data.k[i].ti = null;\r\n }\r\n\r\n if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {\r\n if (s.length === 2 || s[2] === e[2] && to[2] === 0 && ti[2] === 0) {\r\n data.k[i].to = null;\r\n data.k[i].ti = null;\r\n }\r\n }\r\n }\r\n }\r\n\r\n this.effectsSequence = [getValueAtCurrentTime.bind(this)];\r\n this.data = data;\r\n this.keyframes = data.k;\r\n this.keyframesMetadata = [];\r\n this.offsetTime = elem.data.st;\r\n this.k = true;\r\n this.kf = true;\r\n this._isFirstFrame = true;\r\n this.mult = mult || 1;\r\n this.elem = elem;\r\n this.container = container;\r\n this.comp = elem.comp;\r\n this.getValue = processEffectsSequence;\r\n this.setVValue = setVValue;\r\n this.interpolateValue = interpolateValue;\r\n this.frameId = -1;\r\n var arrLen = data.k[0].s.length;\r\n this.v = createTypedArray('float32', arrLen);\r\n this.pv = createTypedArray('float32', arrLen);\r\n\r\n for (i = 0; i < arrLen; i += 1) {\r\n this.v[i] = initFrame;\r\n this.pv[i] = initFrame;\r\n }\r\n\r\n this._caching = {\r\n lastFrame: initFrame,\r\n lastIndex: 0,\r\n value: createTypedArray('float32', arrLen)\r\n };\r\n this.addEffect = addEffect;\r\n }\r\n\r\n function getProp(elem, data, type, mult, container) {\r\n var p;\r\n\r\n if (!data.k.length) {\r\n p = new ValueProperty(elem, data, mult, container);\r\n } else if (typeof data.k[0] === 'number') {\r\n p = new MultiDimensionalProperty(elem, data, mult, container);\r\n } else {\r\n switch (type) {\r\n case 0:\r\n p = new KeyframedValueProperty(elem, data, mult, container);\r\n break;\r\n\r\n case 1:\r\n p = new KeyframedMultidimensionalProperty(elem, data, mult, container);\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n if (p.effectsSequence.length) {\r\n container.addDynamicProperty(p);\r\n }\r\n\r\n return p;\r\n }\r\n\r\n var ob = {\r\n getProp: getProp\r\n };\r\n return ob;\r\n }();\r\n\r\n function DynamicPropertyContainer() {}\r\n\r\n DynamicPropertyContainer.prototype = {\r\n addDynamicProperty: function addDynamicProperty(prop) {\r\n if (this.dynamicProperties.indexOf(prop) === -1) {\r\n this.dynamicProperties.push(prop);\r\n this.container.addDynamicProperty(this);\r\n this._isAnimated = true;\r\n }\r\n },\r\n iterateDynamicProperties: function iterateDynamicProperties() {\r\n this._mdf = false;\r\n var i;\r\n var len = this.dynamicProperties.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.dynamicProperties[i].getValue();\r\n\r\n if (this.dynamicProperties[i]._mdf) {\r\n this._mdf = true;\r\n }\r\n }\r\n },\r\n initDynamicPropertyContainer: function initDynamicPropertyContainer(container) {\r\n this.container = container;\r\n this.dynamicProperties = [];\r\n this._mdf = false;\r\n this._isAnimated = false;\r\n }\r\n };\r\n\r\n var pointPool = function () {\r\n function create() {\r\n return createTypedArray('float32', 2);\r\n }\r\n\r\n return poolFactory(8, create);\r\n }();\r\n\r\n function ShapePath() {\r\n this.c = false;\r\n this._length = 0;\r\n this._maxLength = 8;\r\n this.v = createSizedArray(this._maxLength);\r\n this.o = createSizedArray(this._maxLength);\r\n this.i = createSizedArray(this._maxLength);\r\n }\r\n\r\n ShapePath.prototype.setPathData = function (closed, len) {\r\n this.c = closed;\r\n this.setLength(len);\r\n var i = 0;\r\n\r\n while (i < len) {\r\n this.v[i] = pointPool.newElement();\r\n this.o[i] = pointPool.newElement();\r\n this.i[i] = pointPool.newElement();\r\n i += 1;\r\n }\r\n };\r\n\r\n ShapePath.prototype.setLength = function (len) {\r\n while (this._maxLength < len) {\r\n this.doubleArrayLength();\r\n }\r\n\r\n this._length = len;\r\n };\r\n\r\n ShapePath.prototype.doubleArrayLength = function () {\r\n this.v = this.v.concat(createSizedArray(this._maxLength));\r\n this.i = this.i.concat(createSizedArray(this._maxLength));\r\n this.o = this.o.concat(createSizedArray(this._maxLength));\r\n this._maxLength *= 2;\r\n };\r\n\r\n ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {\r\n var arr;\r\n this._length = Math.max(this._length, pos + 1);\r\n\r\n if (this._length >= this._maxLength) {\r\n this.doubleArrayLength();\r\n }\r\n\r\n switch (type) {\r\n case 'v':\r\n arr = this.v;\r\n break;\r\n\r\n case 'i':\r\n arr = this.i;\r\n break;\r\n\r\n case 'o':\r\n arr = this.o;\r\n break;\r\n\r\n default:\r\n arr = [];\r\n break;\r\n }\r\n\r\n if (!arr[pos] || arr[pos] && !replace) {\r\n arr[pos] = pointPool.newElement();\r\n }\r\n\r\n arr[pos][0] = x;\r\n arr[pos][1] = y;\r\n };\r\n\r\n ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {\r\n this.setXYAt(vX, vY, 'v', pos, replace);\r\n this.setXYAt(oX, oY, 'o', pos, replace);\r\n this.setXYAt(iX, iY, 'i', pos, replace);\r\n };\r\n\r\n ShapePath.prototype.reverse = function () {\r\n var newPath = new ShapePath();\r\n newPath.setPathData(this.c, this._length);\r\n var vertices = this.v;\r\n var outPoints = this.o;\r\n var inPoints = this.i;\r\n var init = 0;\r\n\r\n if (this.c) {\r\n newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);\r\n init = 1;\r\n }\r\n\r\n var cnt = this._length - 1;\r\n var len = this._length;\r\n var i;\r\n\r\n for (i = init; i < len; i += 1) {\r\n newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);\r\n cnt -= 1;\r\n }\r\n\r\n return newPath;\r\n };\r\n\r\n ShapePath.prototype.length = function () {\r\n return this._length;\r\n };\r\n\r\n var shapePool = function () {\r\n function create() {\r\n return new ShapePath();\r\n }\r\n\r\n function release(shapePath) {\r\n var len = shapePath._length;\r\n var i;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n pointPool.release(shapePath.v[i]);\r\n pointPool.release(shapePath.i[i]);\r\n pointPool.release(shapePath.o[i]);\r\n shapePath.v[i] = null;\r\n shapePath.i[i] = null;\r\n shapePath.o[i] = null;\r\n }\r\n\r\n shapePath._length = 0;\r\n shapePath.c = false;\r\n }\r\n\r\n function clone(shape) {\r\n var cloned = factory.newElement();\r\n var i;\r\n var len = shape._length === undefined ? shape.v.length : shape._length;\r\n cloned.setLength(len);\r\n cloned.c = shape.c;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n cloned.setTripleAt(shape.v[i][0], shape.v[i][1], shape.o[i][0], shape.o[i][1], shape.i[i][0], shape.i[i][1], i);\r\n }\r\n\r\n return cloned;\r\n }\r\n\r\n var factory = poolFactory(4, create, release);\r\n factory.clone = clone;\r\n return factory;\r\n }();\r\n\r\n function ShapeCollection() {\r\n this._length = 0;\r\n this._maxLength = 4;\r\n this.shapes = createSizedArray(this._maxLength);\r\n }\r\n\r\n ShapeCollection.prototype.addShape = function (shapeData) {\r\n if (this._length === this._maxLength) {\r\n this.shapes = this.shapes.concat(createSizedArray(this._maxLength));\r\n this._maxLength *= 2;\r\n }\r\n\r\n this.shapes[this._length] = shapeData;\r\n this._length += 1;\r\n };\r\n\r\n ShapeCollection.prototype.releaseShapes = function () {\r\n var i;\r\n\r\n for (i = 0; i < this._length; i += 1) {\r\n shapePool.release(this.shapes[i]);\r\n }\r\n\r\n this._length = 0;\r\n };\r\n\r\n var shapeCollectionPool = function () {\r\n var ob = {\r\n newShapeCollection: newShapeCollection,\r\n release: release\r\n };\r\n var _length = 0;\r\n var _maxLength = 4;\r\n var pool = createSizedArray(_maxLength);\r\n\r\n function newShapeCollection() {\r\n var shapeCollection;\r\n\r\n if (_length) {\r\n _length -= 1;\r\n shapeCollection = pool[_length];\r\n } else {\r\n shapeCollection = new ShapeCollection();\r\n }\r\n\r\n return shapeCollection;\r\n }\r\n\r\n function release(shapeCollection) {\r\n var i;\r\n var len = shapeCollection._length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n shapePool.release(shapeCollection.shapes[i]);\r\n }\r\n\r\n shapeCollection._length = 0;\r\n\r\n if (_length === _maxLength) {\r\n pool = pooling[\"double\"](pool);\r\n _maxLength *= 2;\r\n }\r\n\r\n pool[_length] = shapeCollection;\r\n _length += 1;\r\n }\r\n\r\n return ob;\r\n }();\r\n\r\n var ShapePropertyFactory = function () {\r\n var initFrame = -999999;\r\n\r\n function interpolateShape(frameNum, previousValue, caching) {\r\n var iterationIndex = caching.lastIndex;\r\n var keyPropS;\r\n var keyPropE;\r\n var isHold;\r\n var j;\r\n var k;\r\n var jLen;\r\n var kLen;\r\n var perc;\r\n var vertexValue;\r\n var kf = this.keyframes;\r\n\r\n if (frameNum < kf[0].t - this.offsetTime) {\r\n keyPropS = kf[0].s[0];\r\n isHold = true;\r\n iterationIndex = 0;\r\n } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {\r\n keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];\r\n /* if(kf[kf.length - 1].s){\r\n keyPropS = kf[kf.length - 1].s[0];\r\n }else{\r\n keyPropS = kf[kf.length - 2].e[0];\r\n } */\r\n\r\n isHold = true;\r\n } else {\r\n var i = iterationIndex;\r\n var len = kf.length - 1;\r\n var flag = true;\r\n var keyData;\r\n var nextKeyData;\r\n var keyframeMetadata;\r\n\r\n while (flag) {\r\n keyData = kf[i];\r\n nextKeyData = kf[i + 1];\r\n\r\n if (nextKeyData.t - this.offsetTime > frameNum) {\r\n break;\r\n }\r\n\r\n if (i < len - 1) {\r\n i += 1;\r\n } else {\r\n flag = false;\r\n }\r\n }\r\n\r\n keyframeMetadata = this.keyframesMetadata[i] || {};\r\n isHold = keyData.h === 1;\r\n iterationIndex = i;\r\n\r\n if (!isHold) {\r\n if (frameNum >= nextKeyData.t - this.offsetTime) {\r\n perc = 1;\r\n } else if (frameNum < keyData.t - this.offsetTime) {\r\n perc = 0;\r\n } else {\r\n var fnc;\r\n\r\n if (keyframeMetadata.__fnct) {\r\n fnc = keyframeMetadata.__fnct;\r\n } else {\r\n fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;\r\n keyframeMetadata.__fnct = fnc;\r\n }\r\n\r\n perc = fnc((frameNum - (keyData.t - this.offsetTime)) / (nextKeyData.t - this.offsetTime - (keyData.t - this.offsetTime)));\r\n }\r\n\r\n keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];\r\n }\r\n\r\n keyPropS = keyData.s[0];\r\n }\r\n\r\n jLen = previousValue._length;\r\n kLen = keyPropS.i[0].length;\r\n caching.lastIndex = iterationIndex;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n for (k = 0; k < kLen; k += 1) {\r\n vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;\r\n previousValue.i[j][k] = vertexValue;\r\n vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;\r\n previousValue.o[j][k] = vertexValue;\r\n vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;\r\n previousValue.v[j][k] = vertexValue;\r\n }\r\n }\r\n }\r\n\r\n function interpolateShapeCurrentTime() {\r\n var frameNum = this.comp.renderedFrame - this.offsetTime;\r\n var initTime = this.keyframes[0].t - this.offsetTime;\r\n var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;\r\n var lastFrame = this._caching.lastFrame;\r\n\r\n if (!(lastFrame !== initFrame && (lastFrame < initTime && frameNum < initTime || lastFrame > endTime && frameNum > endTime))) {\r\n /// /\r\n this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;\r\n this.interpolateShape(frameNum, this.pv, this._caching); /// /\r\n }\r\n\r\n this._caching.lastFrame = frameNum;\r\n return this.pv;\r\n }\r\n\r\n function resetShape() {\r\n this.paths = this.localShapeCollection;\r\n }\r\n\r\n function shapesEqual(shape1, shape2) {\r\n if (shape1._length !== shape2._length || shape1.c !== shape2.c) {\r\n return false;\r\n }\r\n\r\n var i;\r\n var len = shape1._length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (shape1.v[i][0] !== shape2.v[i][0] || shape1.v[i][1] !== shape2.v[i][1] || shape1.o[i][0] !== shape2.o[i][0] || shape1.o[i][1] !== shape2.o[i][1] || shape1.i[i][0] !== shape2.i[i][0] || shape1.i[i][1] !== shape2.i[i][1]) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n function setVValue(newPath) {\r\n if (!shapesEqual(this.v, newPath)) {\r\n this.v = shapePool.clone(newPath);\r\n this.localShapeCollection.releaseShapes();\r\n this.localShapeCollection.addShape(this.v);\r\n this._mdf = true;\r\n this.paths = this.localShapeCollection;\r\n }\r\n }\r\n\r\n function processEffectsSequence() {\r\n if (this.elem.globalData.frameId === this.frameId) {\r\n return;\r\n }\r\n\r\n if (!this.effectsSequence.length) {\r\n this._mdf = false;\r\n return;\r\n }\r\n\r\n if (this.lock) {\r\n this.setVValue(this.pv);\r\n return;\r\n }\r\n\r\n this.lock = true;\r\n this._mdf = false;\r\n var finalValue;\r\n\r\n if (this.kf) {\r\n finalValue = this.pv;\r\n } else if (this.data.ks) {\r\n finalValue = this.data.ks.k;\r\n } else {\r\n finalValue = this.data.pt.k;\r\n }\r\n\r\n var i;\r\n var len = this.effectsSequence.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n finalValue = this.effectsSequence[i](finalValue);\r\n }\r\n\r\n this.setVValue(finalValue);\r\n this.lock = false;\r\n this.frameId = this.elem.globalData.frameId;\r\n }\r\n\r\n function ShapeProperty(elem, data, type) {\r\n this.propType = 'shape';\r\n this.comp = elem.comp;\r\n this.container = elem;\r\n this.elem = elem;\r\n this.data = data;\r\n this.k = false;\r\n this.kf = false;\r\n this._mdf = false;\r\n var pathData = type === 3 ? data.pt.k : data.ks.k;\r\n this.v = shapePool.clone(pathData);\r\n this.pv = shapePool.clone(this.v);\r\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n this.paths = this.localShapeCollection;\r\n this.paths.addShape(this.v);\r\n this.reset = resetShape;\r\n this.effectsSequence = [];\r\n }\r\n\r\n function addEffect(effectFunction) {\r\n this.effectsSequence.push(effectFunction);\r\n this.container.addDynamicProperty(this);\r\n }\r\n\r\n ShapeProperty.prototype.interpolateShape = interpolateShape;\r\n ShapeProperty.prototype.getValue = processEffectsSequence;\r\n ShapeProperty.prototype.setVValue = setVValue;\r\n ShapeProperty.prototype.addEffect = addEffect;\r\n\r\n function KeyframedShapeProperty(elem, data, type) {\r\n this.propType = 'shape';\r\n this.comp = elem.comp;\r\n this.elem = elem;\r\n this.container = elem;\r\n this.offsetTime = elem.data.st;\r\n this.keyframes = type === 3 ? data.pt.k : data.ks.k;\r\n this.keyframesMetadata = [];\r\n this.k = true;\r\n this.kf = true;\r\n var len = this.keyframes[0].s[0].i.length;\r\n this.v = shapePool.newElement();\r\n this.v.setPathData(this.keyframes[0].s[0].c, len);\r\n this.pv = shapePool.clone(this.v);\r\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n this.paths = this.localShapeCollection;\r\n this.paths.addShape(this.v);\r\n this.lastFrame = initFrame;\r\n this.reset = resetShape;\r\n this._caching = {\r\n lastFrame: initFrame,\r\n lastIndex: 0\r\n };\r\n this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];\r\n }\r\n\r\n KeyframedShapeProperty.prototype.getValue = processEffectsSequence;\r\n KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;\r\n KeyframedShapeProperty.prototype.setVValue = setVValue;\r\n KeyframedShapeProperty.prototype.addEffect = addEffect;\r\n\r\n var EllShapeProperty = function () {\r\n var cPoint = roundCorner;\r\n\r\n function EllShapePropertyFactory(elem, data) {\r\n this.v = shapePool.newElement();\r\n this.v.setPathData(true, 4);\r\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n this.paths = this.localShapeCollection;\r\n this.localShapeCollection.addShape(this.v);\r\n this.d = data.d;\r\n this.elem = elem;\r\n this.comp = elem.comp;\r\n this.frameId = -1;\r\n this.initDynamicPropertyContainer(elem);\r\n this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\r\n this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);\r\n\r\n if (this.dynamicProperties.length) {\r\n this.k = true;\r\n } else {\r\n this.k = false;\r\n this.convertEllToPath();\r\n }\r\n }\r\n\r\n EllShapePropertyFactory.prototype = {\r\n reset: resetShape,\r\n getValue: function getValue() {\r\n if (this.elem.globalData.frameId === this.frameId) {\r\n return;\r\n }\r\n\r\n this.frameId = this.elem.globalData.frameId;\r\n this.iterateDynamicProperties();\r\n\r\n if (this._mdf) {\r\n this.convertEllToPath();\r\n }\r\n },\r\n convertEllToPath: function convertEllToPath() {\r\n var p0 = this.p.v[0];\r\n var p1 = this.p.v[1];\r\n var s0 = this.s.v[0] / 2;\r\n var s1 = this.s.v[1] / 2;\r\n\r\n var _cw = this.d !== 3;\r\n\r\n var _v = this.v;\r\n _v.v[0][0] = p0;\r\n _v.v[0][1] = p1 - s1;\r\n _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;\r\n _v.v[1][1] = p1;\r\n _v.v[2][0] = p0;\r\n _v.v[2][1] = p1 + s1;\r\n _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;\r\n _v.v[3][1] = p1;\r\n _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;\r\n _v.i[0][1] = p1 - s1;\r\n _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;\r\n _v.i[1][1] = p1 - s1 * cPoint;\r\n _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;\r\n _v.i[2][1] = p1 + s1;\r\n _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;\r\n _v.i[3][1] = p1 + s1 * cPoint;\r\n _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;\r\n _v.o[0][1] = p1 - s1;\r\n _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;\r\n _v.o[1][1] = p1 + s1 * cPoint;\r\n _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;\r\n _v.o[2][1] = p1 + s1;\r\n _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;\r\n _v.o[3][1] = p1 - s1 * cPoint;\r\n }\r\n };\r\n extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);\r\n return EllShapePropertyFactory;\r\n }();\r\n\r\n var StarShapeProperty = function () {\r\n function StarShapePropertyFactory(elem, data) {\r\n this.v = shapePool.newElement();\r\n this.v.setPathData(true, 0);\r\n this.elem = elem;\r\n this.comp = elem.comp;\r\n this.data = data;\r\n this.frameId = -1;\r\n this.d = data.d;\r\n this.initDynamicPropertyContainer(elem);\r\n\r\n if (data.sy === 1) {\r\n this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);\r\n this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);\r\n this.convertToPath = this.convertStarToPath;\r\n } else {\r\n this.convertToPath = this.convertPolygonToPath;\r\n }\r\n\r\n this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);\r\n this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\r\n this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);\r\n this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);\r\n this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);\r\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n this.localShapeCollection.addShape(this.v);\r\n this.paths = this.localShapeCollection;\r\n\r\n if (this.dynamicProperties.length) {\r\n this.k = true;\r\n } else {\r\n this.k = false;\r\n this.convertToPath();\r\n }\r\n }\r\n\r\n StarShapePropertyFactory.prototype = {\r\n reset: resetShape,\r\n getValue: function getValue() {\r\n if (this.elem.globalData.frameId === this.frameId) {\r\n return;\r\n }\r\n\r\n this.frameId = this.elem.globalData.frameId;\r\n this.iterateDynamicProperties();\r\n\r\n if (this._mdf) {\r\n this.convertToPath();\r\n }\r\n },\r\n convertStarToPath: function convertStarToPath() {\r\n var numPts = Math.floor(this.pt.v) * 2;\r\n var angle = Math.PI * 2 / numPts;\r\n /* this.v.v.length = numPts;\r\n this.v.i.length = numPts;\r\n this.v.o.length = numPts; */\r\n\r\n var longFlag = true;\r\n var longRad = this.or.v;\r\n var shortRad = this.ir.v;\r\n var longRound = this.os.v;\r\n var shortRound = this.is.v;\r\n var longPerimSegment = 2 * Math.PI * longRad / (numPts * 2);\r\n var shortPerimSegment = 2 * Math.PI * shortRad / (numPts * 2);\r\n var i;\r\n var rad;\r\n var roundness;\r\n var perimSegment;\r\n var currentAng = -Math.PI / 2;\r\n currentAng += this.r.v;\r\n var dir = this.data.d === 3 ? -1 : 1;\r\n this.v._length = 0;\r\n\r\n for (i = 0; i < numPts; i += 1) {\r\n rad = longFlag ? longRad : shortRad;\r\n roundness = longFlag ? longRound : shortRound;\r\n perimSegment = longFlag ? longPerimSegment : shortPerimSegment;\r\n var x = rad * Math.cos(currentAng);\r\n var y = rad * Math.sin(currentAng);\r\n var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);\r\n var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);\r\n x += +this.p.v[0];\r\n y += +this.p.v[1];\r\n this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true);\r\n /* this.v.v[i] = [x,y];\r\n this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];\r\n this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];\r\n this.v._length = numPts; */\r\n\r\n longFlag = !longFlag;\r\n currentAng += angle * dir;\r\n }\r\n },\r\n convertPolygonToPath: function convertPolygonToPath() {\r\n var numPts = Math.floor(this.pt.v);\r\n var angle = Math.PI * 2 / numPts;\r\n var rad = this.or.v;\r\n var roundness = this.os.v;\r\n var perimSegment = 2 * Math.PI * rad / (numPts * 4);\r\n var i;\r\n var currentAng = -Math.PI * 0.5;\r\n var dir = this.data.d === 3 ? -1 : 1;\r\n currentAng += this.r.v;\r\n this.v._length = 0;\r\n\r\n for (i = 0; i < numPts; i += 1) {\r\n var x = rad * Math.cos(currentAng);\r\n var y = rad * Math.sin(currentAng);\r\n var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);\r\n var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);\r\n x += +this.p.v[0];\r\n y += +this.p.v[1];\r\n this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true);\r\n currentAng += angle * dir;\r\n }\r\n\r\n this.paths.length = 0;\r\n this.paths[0] = this.v;\r\n }\r\n };\r\n extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);\r\n return StarShapePropertyFactory;\r\n }();\r\n\r\n var RectShapeProperty = function () {\r\n function RectShapePropertyFactory(elem, data) {\r\n this.v = shapePool.newElement();\r\n this.v.c = true;\r\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\r\n this.localShapeCollection.addShape(this.v);\r\n this.paths = this.localShapeCollection;\r\n this.elem = elem;\r\n this.comp = elem.comp;\r\n this.frameId = -1;\r\n this.d = data.d;\r\n this.initDynamicPropertyContainer(elem);\r\n this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\r\n this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);\r\n this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);\r\n\r\n if (this.dynamicProperties.length) {\r\n this.k = true;\r\n } else {\r\n this.k = false;\r\n this.convertRectToPath();\r\n }\r\n }\r\n\r\n RectShapePropertyFactory.prototype = {\r\n convertRectToPath: function convertRectToPath() {\r\n var p0 = this.p.v[0];\r\n var p1 = this.p.v[1];\r\n var v0 = this.s.v[0] / 2;\r\n var v1 = this.s.v[1] / 2;\r\n var round = bmMin(v0, v1, this.r.v);\r\n var cPoint = round * (1 - roundCorner);\r\n this.v._length = 0;\r\n\r\n if (this.d === 2 || this.d === 1) {\r\n this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);\r\n this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);\r\n\r\n if (round !== 0) {\r\n this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);\r\n this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);\r\n this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);\r\n this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);\r\n this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);\r\n this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);\r\n } else {\r\n this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);\r\n this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);\r\n }\r\n } else {\r\n this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);\r\n\r\n if (round !== 0) {\r\n this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);\r\n this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);\r\n this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);\r\n this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);\r\n this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);\r\n this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);\r\n this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);\r\n } else {\r\n this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);\r\n this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);\r\n this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);\r\n }\r\n }\r\n },\r\n getValue: function getValue() {\r\n if (this.elem.globalData.frameId === this.frameId) {\r\n return;\r\n }\r\n\r\n this.frameId = this.elem.globalData.frameId;\r\n this.iterateDynamicProperties();\r\n\r\n if (this._mdf) {\r\n this.convertRectToPath();\r\n }\r\n },\r\n reset: resetShape\r\n };\r\n extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);\r\n return RectShapePropertyFactory;\r\n }();\r\n\r\n function getShapeProp(elem, data, type) {\r\n var prop;\r\n\r\n if (type === 3 || type === 4) {\r\n var dataProp = type === 3 ? data.pt : data.ks;\r\n var keys = dataProp.k;\r\n\r\n if (keys.length) {\r\n prop = new KeyframedShapeProperty(elem, data, type);\r\n } else {\r\n prop = new ShapeProperty(elem, data, type);\r\n }\r\n } else if (type === 5) {\r\n prop = new RectShapeProperty(elem, data);\r\n } else if (type === 6) {\r\n prop = new EllShapeProperty(elem, data);\r\n } else if (type === 7) {\r\n prop = new StarShapeProperty(elem, data);\r\n }\r\n\r\n if (prop.k) {\r\n elem.addDynamicProperty(prop);\r\n }\r\n\r\n return prop;\r\n }\r\n\r\n function getConstructorFunction() {\r\n return ShapeProperty;\r\n }\r\n\r\n function getKeyframedConstructorFunction() {\r\n return KeyframedShapeProperty;\r\n }\r\n\r\n var ob = {};\r\n ob.getShapeProp = getShapeProp;\r\n ob.getConstructorFunction = getConstructorFunction;\r\n ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;\r\n return ob;\r\n }();\r\n\r\n /*!\r\n Transformation Matrix v2.0\r\n (c) Epistemex 2014-2015\r\n www.epistemex.com\r\n By Ken Fyrstenberg\r\n Contributions by leeoniya.\r\n License: MIT, header required.\r\n */\r\n\r\n /**\r\n * 2D transformation matrix object initialized with identity matrix.\r\n *\r\n * The matrix can synchronize a canvas context by supplying the context\r\n * as an argument, or later apply current absolute transform to an\r\n * existing context.\r\n *\r\n * All values are handled as floating point values.\r\n *\r\n * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix\r\n * @prop {number} a - scale x\r\n * @prop {number} b - shear y\r\n * @prop {number} c - shear x\r\n * @prop {number} d - scale y\r\n * @prop {number} e - translate x\r\n * @prop {number} f - translate y\r\n * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context\r\n * @constructor\r\n */\r\n\r\n var Matrix = function () {\r\n var _cos = Math.cos;\r\n var _sin = Math.sin;\r\n var _tan = Math.tan;\r\n var _rnd = Math.round;\r\n\r\n function reset() {\r\n this.props[0] = 1;\r\n this.props[1] = 0;\r\n this.props[2] = 0;\r\n this.props[3] = 0;\r\n this.props[4] = 0;\r\n this.props[5] = 1;\r\n this.props[6] = 0;\r\n this.props[7] = 0;\r\n this.props[8] = 0;\r\n this.props[9] = 0;\r\n this.props[10] = 1;\r\n this.props[11] = 0;\r\n this.props[12] = 0;\r\n this.props[13] = 0;\r\n this.props[14] = 0;\r\n this.props[15] = 1;\r\n return this;\r\n }\r\n\r\n function rotate(angle) {\r\n if (angle === 0) {\r\n return this;\r\n }\r\n\r\n var mCos = _cos(angle);\r\n\r\n var mSin = _sin(angle);\r\n\r\n return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n }\r\n\r\n function rotateX(angle) {\r\n if (angle === 0) {\r\n return this;\r\n }\r\n\r\n var mCos = _cos(angle);\r\n\r\n var mSin = _sin(angle);\r\n\r\n return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);\r\n }\r\n\r\n function rotateY(angle) {\r\n if (angle === 0) {\r\n return this;\r\n }\r\n\r\n var mCos = _cos(angle);\r\n\r\n var mSin = _sin(angle);\r\n\r\n return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);\r\n }\r\n\r\n function rotateZ(angle) {\r\n if (angle === 0) {\r\n return this;\r\n }\r\n\r\n var mCos = _cos(angle);\r\n\r\n var mSin = _sin(angle);\r\n\r\n return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n }\r\n\r\n function shear(sx, sy) {\r\n return this._t(1, sy, sx, 1, 0, 0);\r\n }\r\n\r\n function skew(ax, ay) {\r\n return this.shear(_tan(ax), _tan(ay));\r\n }\r\n\r\n function skewFromAxis(ax, angle) {\r\n var mCos = _cos(angle);\r\n\r\n var mSin = _sin(angle);\r\n\r\n return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);\r\n }\r\n\r\n function scale(sx, sy, sz) {\r\n if (!sz && sz !== 0) {\r\n sz = 1;\r\n }\r\n\r\n if (sx === 1 && sy === 1 && sz === 1) {\r\n return this;\r\n }\r\n\r\n return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);\r\n }\r\n\r\n function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {\r\n this.props[0] = a;\r\n this.props[1] = b;\r\n this.props[2] = c;\r\n this.props[3] = d;\r\n this.props[4] = e;\r\n this.props[5] = f;\r\n this.props[6] = g;\r\n this.props[7] = h;\r\n this.props[8] = i;\r\n this.props[9] = j;\r\n this.props[10] = k;\r\n this.props[11] = l;\r\n this.props[12] = m;\r\n this.props[13] = n;\r\n this.props[14] = o;\r\n this.props[15] = p;\r\n return this;\r\n }\r\n\r\n function translate(tx, ty, tz) {\r\n tz = tz || 0;\r\n\r\n if (tx !== 0 || ty !== 0 || tz !== 0) {\r\n return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {\r\n var _p = this.props;\r\n\r\n if (a2 === 1 && b2 === 0 && c2 === 0 && d2 === 0 && e2 === 0 && f2 === 1 && g2 === 0 && h2 === 0 && i2 === 0 && j2 === 0 && k2 === 1 && l2 === 0) {\r\n // NOTE: commenting this condition because TurboFan deoptimizes code when present\r\n // if(m2 !== 0 || n2 !== 0 || o2 !== 0){\r\n _p[12] = _p[12] * a2 + _p[15] * m2;\r\n _p[13] = _p[13] * f2 + _p[15] * n2;\r\n _p[14] = _p[14] * k2 + _p[15] * o2;\r\n _p[15] *= p2; // }\r\n\r\n this._identityCalculated = false;\r\n return this;\r\n }\r\n\r\n var a1 = _p[0];\r\n var b1 = _p[1];\r\n var c1 = _p[2];\r\n var d1 = _p[3];\r\n var e1 = _p[4];\r\n var f1 = _p[5];\r\n var g1 = _p[6];\r\n var h1 = _p[7];\r\n var i1 = _p[8];\r\n var j1 = _p[9];\r\n var k1 = _p[10];\r\n var l1 = _p[11];\r\n var m1 = _p[12];\r\n var n1 = _p[13];\r\n var o1 = _p[14];\r\n var p1 = _p[15];\r\n /* matrix order (canvas compatible):\r\n * ace\r\n * bdf\r\n * 001\r\n */\r\n\r\n _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;\r\n _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;\r\n _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;\r\n _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;\r\n _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;\r\n _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;\r\n _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;\r\n _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;\r\n _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;\r\n _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;\r\n _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;\r\n _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;\r\n _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;\r\n _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;\r\n _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;\r\n _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;\r\n this._identityCalculated = false;\r\n return this;\r\n }\r\n\r\n function isIdentity() {\r\n if (!this._identityCalculated) {\r\n this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0 || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0 || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0 || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1);\r\n this._identityCalculated = true;\r\n }\r\n\r\n return this._identity;\r\n }\r\n\r\n function equals(matr) {\r\n var i = 0;\r\n\r\n while (i < 16) {\r\n if (matr.props[i] !== this.props[i]) {\r\n return false;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n function clone(matr) {\r\n var i;\r\n\r\n for (i = 0; i < 16; i += 1) {\r\n matr.props[i] = this.props[i];\r\n }\r\n\r\n return matr;\r\n }\r\n\r\n function cloneFromProps(props) {\r\n var i;\r\n\r\n for (i = 0; i < 16; i += 1) {\r\n this.props[i] = props[i];\r\n }\r\n }\r\n\r\n function applyToPoint(x, y, z) {\r\n return {\r\n x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],\r\n y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],\r\n z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]\r\n };\r\n /* return {\r\n x: x * me.a + y * me.c + me.e,\r\n y: x * me.b + y * me.d + me.f\r\n }; */\r\n }\r\n\r\n function applyToX(x, y, z) {\r\n return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];\r\n }\r\n\r\n function applyToY(x, y, z) {\r\n return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];\r\n }\r\n\r\n function applyToZ(x, y, z) {\r\n return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];\r\n }\r\n\r\n function getInverseMatrix() {\r\n var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];\r\n var a = this.props[5] / determinant;\r\n var b = -this.props[1] / determinant;\r\n var c = -this.props[4] / determinant;\r\n var d = this.props[0] / determinant;\r\n var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;\r\n var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;\r\n var inverseMatrix = new Matrix();\r\n inverseMatrix.props[0] = a;\r\n inverseMatrix.props[1] = b;\r\n inverseMatrix.props[4] = c;\r\n inverseMatrix.props[5] = d;\r\n inverseMatrix.props[12] = e;\r\n inverseMatrix.props[13] = f;\r\n return inverseMatrix;\r\n }\r\n\r\n function inversePoint(pt) {\r\n var inverseMatrix = this.getInverseMatrix();\r\n return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);\r\n }\r\n\r\n function inversePoints(pts) {\r\n var i;\r\n var len = pts.length;\r\n var retPts = [];\r\n\r\n for (i = 0; i < len; i += 1) {\r\n retPts[i] = inversePoint(pts[i]);\r\n }\r\n\r\n return retPts;\r\n }\r\n\r\n function applyToTriplePoints(pt1, pt2, pt3) {\r\n var arr = createTypedArray('float32', 6);\r\n\r\n if (this.isIdentity()) {\r\n arr[0] = pt1[0];\r\n arr[1] = pt1[1];\r\n arr[2] = pt2[0];\r\n arr[3] = pt2[1];\r\n arr[4] = pt3[0];\r\n arr[5] = pt3[1];\r\n } else {\r\n var p0 = this.props[0];\r\n var p1 = this.props[1];\r\n var p4 = this.props[4];\r\n var p5 = this.props[5];\r\n var p12 = this.props[12];\r\n var p13 = this.props[13];\r\n arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;\r\n arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;\r\n arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;\r\n arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;\r\n arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;\r\n arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n function applyToPointArray(x, y, z) {\r\n var arr;\r\n\r\n if (this.isIdentity()) {\r\n arr = [x, y, z];\r\n } else {\r\n arr = [x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12], x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13], x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]];\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n function applyToPointStringified(x, y) {\r\n if (this.isIdentity()) {\r\n return x + ',' + y;\r\n }\r\n\r\n var _p = this.props;\r\n return Math.round((x * _p[0] + y * _p[4] + _p[12]) * 100) / 100 + ',' + Math.round((x * _p[1] + y * _p[5] + _p[13]) * 100) / 100;\r\n }\r\n\r\n function toCSS() {\r\n // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed.\r\n\r\n /* if(this.isIdentity()) {\r\n return '';\r\n } */\r\n var i = 0;\r\n var props = this.props;\r\n var cssValue = 'matrix3d(';\r\n var v = 10000;\r\n\r\n while (i < 16) {\r\n cssValue += _rnd(props[i] * v) / v;\r\n cssValue += i === 15 ? ')' : ',';\r\n i += 1;\r\n }\r\n\r\n return cssValue;\r\n }\r\n\r\n function roundMatrixProperty(val) {\r\n var v = 10000;\r\n\r\n if (val < 0.000001 && val > 0 || val > -0.000001 && val < 0) {\r\n return _rnd(val * v) / v;\r\n }\r\n\r\n return val;\r\n }\r\n\r\n function to2dCSS() {\r\n // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed.\r\n\r\n /* if(this.isIdentity()) {\r\n return '';\r\n } */\r\n var props = this.props;\r\n\r\n var _a = roundMatrixProperty(props[0]);\r\n\r\n var _b = roundMatrixProperty(props[1]);\r\n\r\n var _c = roundMatrixProperty(props[4]);\r\n\r\n var _d = roundMatrixProperty(props[5]);\r\n\r\n var _e = roundMatrixProperty(props[12]);\r\n\r\n var _f = roundMatrixProperty(props[13]);\r\n\r\n return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';\r\n }\r\n\r\n return function () {\r\n this.reset = reset;\r\n this.rotate = rotate;\r\n this.rotateX = rotateX;\r\n this.rotateY = rotateY;\r\n this.rotateZ = rotateZ;\r\n this.skew = skew;\r\n this.skewFromAxis = skewFromAxis;\r\n this.shear = shear;\r\n this.scale = scale;\r\n this.setTransform = setTransform;\r\n this.translate = translate;\r\n this.transform = transform;\r\n this.applyToPoint = applyToPoint;\r\n this.applyToX = applyToX;\r\n this.applyToY = applyToY;\r\n this.applyToZ = applyToZ;\r\n this.applyToPointArray = applyToPointArray;\r\n this.applyToTriplePoints = applyToTriplePoints;\r\n this.applyToPointStringified = applyToPointStringified;\r\n this.toCSS = toCSS;\r\n this.to2dCSS = to2dCSS;\r\n this.clone = clone;\r\n this.cloneFromProps = cloneFromProps;\r\n this.equals = equals;\r\n this.inversePoints = inversePoints;\r\n this.inversePoint = inversePoint;\r\n this.getInverseMatrix = getInverseMatrix;\r\n this._t = this.transform;\r\n this.isIdentity = isIdentity;\r\n this._identity = true;\r\n this._identityCalculated = false;\r\n this.props = createTypedArray('float32', 16);\r\n this.reset();\r\n };\r\n }();\r\n\r\n function _typeof$3(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$3(obj); }\r\n var lottie = {};\r\n var standalone = '__[STANDALONE]__';\r\n var animationData = '__[ANIMATIONDATA]__';\r\n var renderer = '';\r\n\r\n function setLocation(href) {\r\n setLocationHref(href);\r\n }\r\n\r\n function searchAnimations() {\r\n if (standalone === true) {\r\n animationManager.searchAnimations(animationData, standalone, renderer);\r\n } else {\r\n animationManager.searchAnimations();\r\n }\r\n }\r\n\r\n function setSubframeRendering(flag) {\r\n setSubframeEnabled(flag);\r\n }\r\n\r\n function setPrefix(prefix) {\r\n setIdPrefix(prefix);\r\n }\r\n\r\n function loadAnimation(params) {\r\n if (standalone === true) {\r\n params.animationData = JSON.parse(animationData);\r\n }\r\n\r\n return animationManager.loadAnimation(params);\r\n }\r\n\r\n function setQuality(value) {\r\n if (typeof value === 'string') {\r\n switch (value) {\r\n case 'high':\r\n setDefaultCurveSegments(200);\r\n break;\r\n\r\n default:\r\n case 'medium':\r\n setDefaultCurveSegments(50);\r\n break;\r\n\r\n case 'low':\r\n setDefaultCurveSegments(10);\r\n break;\r\n }\r\n } else if (!isNaN(value) && value > 1) {\r\n setDefaultCurveSegments(value);\r\n }\r\n\r\n if (getDefaultCurveSegments() >= 50) {\r\n roundValues(false);\r\n } else {\r\n roundValues(true);\r\n }\r\n }\r\n\r\n function inBrowser() {\r\n return typeof navigator !== 'undefined';\r\n }\r\n\r\n function installPlugin(type, plugin) {\r\n if (type === 'expressions') {\r\n setExpressionsPlugin(plugin);\r\n }\r\n }\r\n\r\n function getFactory(name) {\r\n switch (name) {\r\n case 'propertyFactory':\r\n return PropertyFactory;\r\n\r\n case 'shapePropertyFactory':\r\n return ShapePropertyFactory;\r\n\r\n case 'matrix':\r\n return Matrix;\r\n\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n lottie.play = animationManager.play;\r\n lottie.pause = animationManager.pause;\r\n lottie.setLocationHref = setLocation;\r\n lottie.togglePause = animationManager.togglePause;\r\n lottie.setSpeed = animationManager.setSpeed;\r\n lottie.setDirection = animationManager.setDirection;\r\n lottie.stop = animationManager.stop;\r\n lottie.searchAnimations = searchAnimations;\r\n lottie.registerAnimation = animationManager.registerAnimation;\r\n lottie.loadAnimation = loadAnimation;\r\n lottie.setSubframeRendering = setSubframeRendering;\r\n lottie.resize = animationManager.resize; // lottie.start = start;\r\n\r\n lottie.goToAndStop = animationManager.goToAndStop;\r\n lottie.destroy = animationManager.destroy;\r\n lottie.setQuality = setQuality;\r\n lottie.inBrowser = inBrowser;\r\n lottie.installPlugin = installPlugin;\r\n lottie.freeze = animationManager.freeze;\r\n lottie.unfreeze = animationManager.unfreeze;\r\n lottie.setVolume = animationManager.setVolume;\r\n lottie.mute = animationManager.mute;\r\n lottie.unmute = animationManager.unmute;\r\n lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;\r\n lottie.useWebWorker = setWebWorker;\r\n lottie.setIDPrefix = setPrefix;\r\n lottie.__getFactory = getFactory;\r\n lottie.version = '5.10.0';\r\n\r\n function checkReady() {\r\n if (document.readyState === 'complete') {\r\n clearInterval(readyStateCheckInterval);\r\n searchAnimations();\r\n }\r\n }\r\n\r\n function getQueryVariable(variable) {\r\n var vars = queryString.split('&');\r\n\r\n for (var i = 0; i < vars.length; i += 1) {\r\n var pair = vars[i].split('=');\r\n\r\n if (decodeURIComponent(pair[0]) == variable) {\r\n // eslint-disable-line eqeqeq\r\n return decodeURIComponent(pair[1]);\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var queryString = '';\r\n\r\n if (standalone) {\r\n var scripts = document.getElementsByTagName('script');\r\n var index = scripts.length - 1;\r\n var myScript = scripts[index] || {\r\n src: ''\r\n };\r\n queryString = myScript.src ? myScript.src.replace(/^[^\\?]+\\??/, '') : ''; // eslint-disable-line no-useless-escape\r\n\r\n renderer = getQueryVariable('renderer');\r\n }\r\n\r\n var readyStateCheckInterval = setInterval(checkReady, 100); // this adds bodymovin to the window object for backwards compatibility\r\n\r\n try {\r\n if (!((typeof exports === \"undefined\" ? \"undefined\" : _typeof$3(exports)) === 'object' && typeof module !== 'undefined') && !(typeof define === 'function' && define.amd) // eslint-disable-line no-undef\r\n ) {\r\n window.bodymovin = lottie;\r\n }\r\n } catch (err) {//\r\n }\r\n\r\n var ShapeModifiers = function () {\r\n var ob = {};\r\n var modifiers = {};\r\n ob.registerModifier = registerModifier;\r\n ob.getModifier = getModifier;\r\n\r\n function registerModifier(nm, factory) {\r\n if (!modifiers[nm]) {\r\n modifiers[nm] = factory;\r\n }\r\n }\r\n\r\n function getModifier(nm, elem, data) {\r\n return new modifiers[nm](elem, data);\r\n }\r\n\r\n return ob;\r\n }();\r\n\r\n function ShapeModifier() {}\r\n\r\n ShapeModifier.prototype.initModifierProperties = function () {};\r\n\r\n ShapeModifier.prototype.addShapeToModifier = function () {};\r\n\r\n ShapeModifier.prototype.addShape = function (data) {\r\n if (!this.closed) {\r\n // Adding shape to dynamic properties. It covers the case where a shape has no effects applied, to reset it's _mdf state on every tick.\r\n data.sh.container.addDynamicProperty(data.sh);\r\n var shapeData = {\r\n shape: data.sh,\r\n data: data,\r\n localShapeCollection: shapeCollectionPool.newShapeCollection()\r\n };\r\n this.shapes.push(shapeData);\r\n this.addShapeToModifier(shapeData);\r\n\r\n if (this._isAnimated) {\r\n data.setAsAnimated();\r\n }\r\n }\r\n };\r\n\r\n ShapeModifier.prototype.init = function (elem, data) {\r\n this.shapes = [];\r\n this.elem = elem;\r\n this.initDynamicPropertyContainer(elem);\r\n this.initModifierProperties(elem, data);\r\n this.frameId = initialDefaultFrame;\r\n this.closed = false;\r\n this.k = false;\r\n\r\n if (this.dynamicProperties.length) {\r\n this.k = true;\r\n } else {\r\n this.getValue(true);\r\n }\r\n };\r\n\r\n ShapeModifier.prototype.processKeys = function () {\r\n if (this.elem.globalData.frameId === this.frameId) {\r\n return;\r\n }\r\n\r\n this.frameId = this.elem.globalData.frameId;\r\n this.iterateDynamicProperties();\r\n };\r\n\r\n extendPrototype([DynamicPropertyContainer], ShapeModifier);\r\n\r\n function TrimModifier() {}\r\n\r\n extendPrototype([ShapeModifier], TrimModifier);\r\n\r\n TrimModifier.prototype.initModifierProperties = function (elem, data) {\r\n this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);\r\n this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);\r\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);\r\n this.sValue = 0;\r\n this.eValue = 0;\r\n this.getValue = this.processKeys;\r\n this.m = data.m;\r\n this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;\r\n };\r\n\r\n TrimModifier.prototype.addShapeToModifier = function (shapeData) {\r\n shapeData.pathsData = [];\r\n };\r\n\r\n TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {\r\n var segments = [];\r\n\r\n if (e <= 1) {\r\n segments.push({\r\n s: s,\r\n e: e\r\n });\r\n } else if (s >= 1) {\r\n segments.push({\r\n s: s - 1,\r\n e: e - 1\r\n });\r\n } else {\r\n segments.push({\r\n s: s,\r\n e: 1\r\n });\r\n segments.push({\r\n s: 0,\r\n e: e - 1\r\n });\r\n }\r\n\r\n var shapeSegments = [];\r\n var i;\r\n var len = segments.length;\r\n var segmentOb;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n segmentOb = segments[i];\r\n\r\n if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {\r\n var shapeS;\r\n var shapeE;\r\n\r\n if (segmentOb.s * totalModifierLength <= addedLength) {\r\n shapeS = 0;\r\n } else {\r\n shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;\r\n }\r\n\r\n if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {\r\n shapeE = 1;\r\n } else {\r\n shapeE = (segmentOb.e * totalModifierLength - addedLength) / shapeLength;\r\n }\r\n\r\n shapeSegments.push([shapeS, shapeE]);\r\n }\r\n }\r\n\r\n if (!shapeSegments.length) {\r\n shapeSegments.push([0, 0]);\r\n }\r\n\r\n return shapeSegments;\r\n };\r\n\r\n TrimModifier.prototype.releasePathsData = function (pathsData) {\r\n var i;\r\n var len = pathsData.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n segmentsLengthPool.release(pathsData[i]);\r\n }\r\n\r\n pathsData.length = 0;\r\n return pathsData;\r\n };\r\n\r\n TrimModifier.prototype.processShapes = function (_isFirstFrame) {\r\n var s;\r\n var e;\r\n\r\n if (this._mdf || _isFirstFrame) {\r\n var o = this.o.v % 360 / 360;\r\n\r\n if (o < 0) {\r\n o += 1;\r\n }\r\n\r\n if (this.s.v > 1) {\r\n s = 1 + o;\r\n } else if (this.s.v < 0) {\r\n s = 0 + o;\r\n } else {\r\n s = this.s.v + o;\r\n }\r\n\r\n if (this.e.v > 1) {\r\n e = 1 + o;\r\n } else if (this.e.v < 0) {\r\n e = 0 + o;\r\n } else {\r\n e = this.e.v + o;\r\n }\r\n\r\n if (s > e) {\r\n var _s = s;\r\n s = e;\r\n e = _s;\r\n }\r\n\r\n s = Math.round(s * 10000) * 0.0001;\r\n e = Math.round(e * 10000) * 0.0001;\r\n this.sValue = s;\r\n this.eValue = e;\r\n } else {\r\n s = this.sValue;\r\n e = this.eValue;\r\n }\r\n\r\n var shapePaths;\r\n var i;\r\n var len = this.shapes.length;\r\n var j;\r\n var jLen;\r\n var pathsData;\r\n var pathData;\r\n var totalShapeLength;\r\n var totalModifierLength = 0;\r\n\r\n if (e === s) {\r\n for (i = 0; i < len; i += 1) {\r\n this.shapes[i].localShapeCollection.releaseShapes();\r\n this.shapes[i].shape._mdf = true;\r\n this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;\r\n\r\n if (this._mdf) {\r\n this.shapes[i].pathsData.length = 0;\r\n }\r\n }\r\n } else if (!(e === 1 && s === 0 || e === 0 && s === 1)) {\r\n var segments = [];\r\n var shapeData;\r\n var localShapeCollection;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n shapeData = this.shapes[i]; // if shape hasn't changed and trim properties haven't changed, cached previous path can be used\r\n\r\n if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {\r\n shapeData.shape.paths = shapeData.localShapeCollection;\r\n } else {\r\n shapePaths = shapeData.shape.paths;\r\n jLen = shapePaths._length;\r\n totalShapeLength = 0;\r\n\r\n if (!shapeData.shape._mdf && shapeData.pathsData.length) {\r\n totalShapeLength = shapeData.totalShapeLength;\r\n } else {\r\n pathsData = this.releasePathsData(shapeData.pathsData);\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n pathData = bez.getSegmentsLength(shapePaths.shapes[j]);\r\n pathsData.push(pathData);\r\n totalShapeLength += pathData.totalLength;\r\n }\r\n\r\n shapeData.totalShapeLength = totalShapeLength;\r\n shapeData.pathsData = pathsData;\r\n }\r\n\r\n totalModifierLength += totalShapeLength;\r\n shapeData.shape._mdf = true;\r\n }\r\n }\r\n\r\n var shapeS = s;\r\n var shapeE = e;\r\n var addedLength = 0;\r\n var edges;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n shapeData = this.shapes[i];\r\n\r\n if (shapeData.shape._mdf) {\r\n localShapeCollection = shapeData.localShapeCollection;\r\n localShapeCollection.releaseShapes(); // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group\r\n\r\n if (this.m === 2 && len > 1) {\r\n edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);\r\n addedLength += shapeData.totalShapeLength;\r\n } else {\r\n edges = [[shapeS, shapeE]];\r\n }\r\n\r\n jLen = edges.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n shapeS = edges[j][0];\r\n shapeE = edges[j][1];\r\n segments.length = 0;\r\n\r\n if (shapeE <= 1) {\r\n segments.push({\r\n s: shapeData.totalShapeLength * shapeS,\r\n e: shapeData.totalShapeLength * shapeE\r\n });\r\n } else if (shapeS >= 1) {\r\n segments.push({\r\n s: shapeData.totalShapeLength * (shapeS - 1),\r\n e: shapeData.totalShapeLength * (shapeE - 1)\r\n });\r\n } else {\r\n segments.push({\r\n s: shapeData.totalShapeLength * shapeS,\r\n e: shapeData.totalShapeLength\r\n });\r\n segments.push({\r\n s: 0,\r\n e: shapeData.totalShapeLength * (shapeE - 1)\r\n });\r\n }\r\n\r\n var newShapesData = this.addShapes(shapeData, segments[0]);\r\n\r\n if (segments[0].s !== segments[0].e) {\r\n if (segments.length > 1) {\r\n var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];\r\n\r\n if (lastShapeInCollection.c) {\r\n var lastShape = newShapesData.pop();\r\n this.addPaths(newShapesData, localShapeCollection);\r\n newShapesData = this.addShapes(shapeData, segments[1], lastShape);\r\n } else {\r\n this.addPaths(newShapesData, localShapeCollection);\r\n newShapesData = this.addShapes(shapeData, segments[1]);\r\n }\r\n }\r\n\r\n this.addPaths(newShapesData, localShapeCollection);\r\n }\r\n }\r\n\r\n shapeData.shape.paths = localShapeCollection;\r\n }\r\n }\r\n } else if (this._mdf) {\r\n for (i = 0; i < len; i += 1) {\r\n // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.\r\n // Don't remove this even if it's losing cached info.\r\n this.shapes[i].pathsData.length = 0;\r\n this.shapes[i].shape._mdf = true;\r\n }\r\n }\r\n };\r\n\r\n TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {\r\n var i;\r\n var len = newPaths.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n localShapeCollection.addShape(newPaths[i]);\r\n }\r\n };\r\n\r\n TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {\r\n shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);\r\n shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);\r\n\r\n if (newShape) {\r\n shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);\r\n }\r\n\r\n shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);\r\n };\r\n\r\n TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {\r\n shapePath.setXYAt(points[1], points[5], 'o', pos);\r\n shapePath.setXYAt(points[2], points[6], 'i', pos + 1);\r\n\r\n if (newShape) {\r\n shapePath.setXYAt(points[0], points[4], 'v', pos);\r\n }\r\n\r\n shapePath.setXYAt(points[3], points[7], 'v', pos + 1);\r\n };\r\n\r\n TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {\r\n var pathsData = shapeData.pathsData;\r\n var shapePaths = shapeData.shape.paths.shapes;\r\n var i;\r\n var len = shapeData.shape.paths._length;\r\n var j;\r\n var jLen;\r\n var addedLength = 0;\r\n var currentLengthData;\r\n var segmentCount;\r\n var lengths;\r\n var segment;\r\n var shapes = [];\r\n var initPos;\r\n var newShape = true;\r\n\r\n if (!shapePath) {\r\n shapePath = shapePool.newElement();\r\n segmentCount = 0;\r\n initPos = 0;\r\n } else {\r\n segmentCount = shapePath._length;\r\n initPos = shapePath._length;\r\n }\r\n\r\n shapes.push(shapePath);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n lengths = pathsData[i].lengths;\r\n shapePath.c = shapePaths[i].c;\r\n jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;\r\n\r\n for (j = 1; j < jLen; j += 1) {\r\n currentLengthData = lengths[j - 1];\r\n\r\n if (addedLength + currentLengthData.addedLength < shapeSegment.s) {\r\n addedLength += currentLengthData.addedLength;\r\n shapePath.c = false;\r\n } else if (addedLength > shapeSegment.e) {\r\n shapePath.c = false;\r\n break;\r\n } else {\r\n if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {\r\n this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);\r\n newShape = false;\r\n } else {\r\n segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[j], shapePaths[i].o[j - 1], shapePaths[i].i[j], (shapeSegment.s - addedLength) / currentLengthData.addedLength, (shapeSegment.e - addedLength) / currentLengthData.addedLength, lengths[j - 1]);\r\n this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);\r\n\r\n newShape = false;\r\n shapePath.c = false;\r\n }\r\n\r\n addedLength += currentLengthData.addedLength;\r\n segmentCount += 1;\r\n }\r\n }\r\n\r\n if (shapePaths[i].c && lengths.length) {\r\n currentLengthData = lengths[j - 1];\r\n\r\n if (addedLength <= shapeSegment.e) {\r\n var segmentLength = lengths[j - 1].addedLength;\r\n\r\n if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {\r\n this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);\r\n newShape = false;\r\n } else {\r\n segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[0], shapePaths[i].o[j - 1], shapePaths[i].i[0], (shapeSegment.s - addedLength) / segmentLength, (shapeSegment.e - addedLength) / segmentLength, lengths[j - 1]);\r\n this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);\r\n\r\n newShape = false;\r\n shapePath.c = false;\r\n }\r\n } else {\r\n shapePath.c = false;\r\n }\r\n\r\n addedLength += currentLengthData.addedLength;\r\n segmentCount += 1;\r\n }\r\n\r\n if (shapePath._length) {\r\n shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);\r\n shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);\r\n }\r\n\r\n if (addedLength > shapeSegment.e) {\r\n break;\r\n }\r\n\r\n if (i < len - 1) {\r\n shapePath = shapePool.newElement();\r\n newShape = true;\r\n shapes.push(shapePath);\r\n segmentCount = 0;\r\n }\r\n }\r\n\r\n return shapes;\r\n };\r\n\r\n function PuckerAndBloatModifier() {}\r\n\r\n extendPrototype([ShapeModifier], PuckerAndBloatModifier);\r\n\r\n PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {\r\n this.getValue = this.processKeys;\r\n this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);\r\n this._isAnimated = !!this.amount.effectsSequence.length;\r\n };\r\n\r\n PuckerAndBloatModifier.prototype.processPath = function (path, amount) {\r\n var percent = amount / 100;\r\n var centerPoint = [0, 0];\r\n var pathLength = path._length;\r\n var i = 0;\r\n\r\n for (i = 0; i < pathLength; i += 1) {\r\n centerPoint[0] += path.v[i][0];\r\n centerPoint[1] += path.v[i][1];\r\n }\r\n\r\n centerPoint[0] /= pathLength;\r\n centerPoint[1] /= pathLength;\r\n var clonedPath = shapePool.newElement();\r\n clonedPath.c = path.c;\r\n var vX;\r\n var vY;\r\n var oX;\r\n var oY;\r\n var iX;\r\n var iY;\r\n\r\n for (i = 0; i < pathLength; i += 1) {\r\n vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;\r\n vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;\r\n oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;\r\n oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;\r\n iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;\r\n iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;\r\n clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);\r\n }\r\n\r\n return clonedPath;\r\n };\r\n\r\n PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {\r\n var shapePaths;\r\n var i;\r\n var len = this.shapes.length;\r\n var j;\r\n var jLen;\r\n var amount = this.amount.v;\r\n\r\n if (amount !== 0) {\r\n var shapeData;\r\n var localShapeCollection;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n shapeData = this.shapes[i];\r\n localShapeCollection = shapeData.localShapeCollection;\r\n\r\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\r\n localShapeCollection.releaseShapes();\r\n shapeData.shape._mdf = true;\r\n shapePaths = shapeData.shape.paths.shapes;\r\n jLen = shapeData.shape.paths._length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n localShapeCollection.addShape(this.processPath(shapePaths[j], amount));\r\n }\r\n }\r\n\r\n shapeData.shape.paths = shapeData.localShapeCollection;\r\n }\r\n }\r\n\r\n if (!this.dynamicProperties.length) {\r\n this._mdf = false;\r\n }\r\n };\r\n\r\n var TransformPropertyFactory = function () {\r\n var defaultVector = [0, 0];\r\n\r\n function applyToMatrix(mat) {\r\n var _mdf = this._mdf;\r\n this.iterateDynamicProperties();\r\n this._mdf = this._mdf || _mdf;\r\n\r\n if (this.a) {\r\n mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\r\n }\r\n\r\n if (this.s) {\r\n mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\r\n }\r\n\r\n if (this.sk) {\r\n mat.skewFromAxis(-this.sk.v, this.sa.v);\r\n }\r\n\r\n if (this.r) {\r\n mat.rotate(-this.r.v);\r\n } else {\r\n mat.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);\r\n }\r\n\r\n if (this.data.p.s) {\r\n if (this.data.p.z) {\r\n mat.translate(this.px.v, this.py.v, -this.pz.v);\r\n } else {\r\n mat.translate(this.px.v, this.py.v, 0);\r\n }\r\n } else {\r\n mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);\r\n }\r\n }\r\n\r\n function processKeys(forceRender) {\r\n if (this.elem.globalData.frameId === this.frameId) {\r\n return;\r\n }\r\n\r\n if (this._isDirty) {\r\n this.precalculateMatrix();\r\n this._isDirty = false;\r\n }\r\n\r\n this.iterateDynamicProperties();\r\n\r\n if (this._mdf || forceRender) {\r\n var frameRate;\r\n this.v.cloneFromProps(this.pre.props);\r\n\r\n if (this.appliedTransformations < 1) {\r\n this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\r\n }\r\n\r\n if (this.appliedTransformations < 2) {\r\n this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\r\n }\r\n\r\n if (this.sk && this.appliedTransformations < 3) {\r\n this.v.skewFromAxis(-this.sk.v, this.sa.v);\r\n }\r\n\r\n if (this.r && this.appliedTransformations < 4) {\r\n this.v.rotate(-this.r.v);\r\n } else if (!this.r && this.appliedTransformations < 4) {\r\n this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);\r\n }\r\n\r\n if (this.autoOriented) {\r\n var v1;\r\n var v2;\r\n frameRate = this.elem.globalData.frameRate;\r\n\r\n if (this.p && this.p.keyframes && this.p.getValueAtTime) {\r\n if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {\r\n v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);\r\n v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);\r\n } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {\r\n v1 = this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length - 1].t / frameRate, 0);\r\n v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);\r\n } else {\r\n v1 = this.p.pv;\r\n v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);\r\n }\r\n } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {\r\n v1 = [];\r\n v2 = [];\r\n var px = this.px;\r\n var py = this.py;\r\n\r\n if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {\r\n v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);\r\n v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);\r\n v2[0] = px.getValueAtTime(px.keyframes[0].t / frameRate, 0);\r\n v2[1] = py.getValueAtTime(py.keyframes[0].t / frameRate, 0);\r\n } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {\r\n v1[0] = px.getValueAtTime(px.keyframes[px.keyframes.length - 1].t / frameRate, 0);\r\n v1[1] = py.getValueAtTime(py.keyframes[py.keyframes.length - 1].t / frameRate, 0);\r\n v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);\r\n v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);\r\n } else {\r\n v1 = [px.pv, py.pv];\r\n v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);\r\n v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);\r\n }\r\n } else {\r\n v2 = defaultVector;\r\n v1 = v2;\r\n }\r\n\r\n this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));\r\n }\r\n\r\n if (this.data.p && this.data.p.s) {\r\n if (this.data.p.z) {\r\n this.v.translate(this.px.v, this.py.v, -this.pz.v);\r\n } else {\r\n this.v.translate(this.px.v, this.py.v, 0);\r\n }\r\n } else {\r\n this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);\r\n }\r\n }\r\n\r\n this.frameId = this.elem.globalData.frameId;\r\n }\r\n\r\n function precalculateMatrix() {\r\n if (!this.a.k) {\r\n this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\r\n this.appliedTransformations = 1;\r\n } else {\r\n return;\r\n }\r\n\r\n if (!this.s.effectsSequence.length) {\r\n this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\r\n this.appliedTransformations = 2;\r\n } else {\r\n return;\r\n }\r\n\r\n if (this.sk) {\r\n if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {\r\n this.pre.skewFromAxis(-this.sk.v, this.sa.v);\r\n this.appliedTransformations = 3;\r\n } else {\r\n return;\r\n }\r\n }\r\n\r\n if (this.r) {\r\n if (!this.r.effectsSequence.length) {\r\n this.pre.rotate(-this.r.v);\r\n this.appliedTransformations = 4;\r\n }\r\n } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {\r\n this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);\r\n this.appliedTransformations = 4;\r\n }\r\n }\r\n\r\n function autoOrient() {//\r\n // var prevP = this.getValueAtTime();\r\n }\r\n\r\n function addDynamicProperty(prop) {\r\n this._addDynamicProperty(prop);\r\n\r\n this.elem.addDynamicProperty(prop);\r\n this._isDirty = true;\r\n }\r\n\r\n function TransformProperty(elem, data, container) {\r\n this.elem = elem;\r\n this.frameId = -1;\r\n this.propType = 'transform';\r\n this.data = data;\r\n this.v = new Matrix(); // Precalculated matrix with non animated properties\r\n\r\n this.pre = new Matrix();\r\n this.appliedTransformations = 0;\r\n this.initDynamicPropertyContainer(container || elem);\r\n\r\n if (data.p && data.p.s) {\r\n this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);\r\n this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);\r\n\r\n if (data.p.z) {\r\n this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);\r\n }\r\n } else {\r\n this.p = PropertyFactory.getProp(elem, data.p || {\r\n k: [0, 0, 0]\r\n }, 1, 0, this);\r\n }\r\n\r\n if (data.rx) {\r\n this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);\r\n this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);\r\n this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);\r\n\r\n if (data.or.k[0].ti) {\r\n var i;\r\n var len = data.or.k.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n data.or.k[i].to = null;\r\n data.or.k[i].ti = null;\r\n }\r\n }\r\n\r\n this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this); // sh Indicates it needs to be capped between -180 and 180\r\n\r\n this.or.sh = true;\r\n } else {\r\n this.r = PropertyFactory.getProp(elem, data.r || {\r\n k: 0\r\n }, 0, degToRads, this);\r\n }\r\n\r\n if (data.sk) {\r\n this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);\r\n this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);\r\n }\r\n\r\n this.a = PropertyFactory.getProp(elem, data.a || {\r\n k: [0, 0, 0]\r\n }, 1, 0, this);\r\n this.s = PropertyFactory.getProp(elem, data.s || {\r\n k: [100, 100, 100]\r\n }, 1, 0.01, this); // Opacity is not part of the transform properties, that's why it won't use this.dynamicProperties. That way transforms won't get updated if opacity changes.\r\n\r\n if (data.o) {\r\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);\r\n } else {\r\n this.o = {\r\n _mdf: false,\r\n v: 1\r\n };\r\n }\r\n\r\n this._isDirty = true;\r\n\r\n if (!this.dynamicProperties.length) {\r\n this.getValue(true);\r\n }\r\n }\r\n\r\n TransformProperty.prototype = {\r\n applyToMatrix: applyToMatrix,\r\n getValue: processKeys,\r\n precalculateMatrix: precalculateMatrix,\r\n autoOrient: autoOrient\r\n };\r\n extendPrototype([DynamicPropertyContainer], TransformProperty);\r\n TransformProperty.prototype.addDynamicProperty = addDynamicProperty;\r\n TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;\r\n\r\n function getTransformProperty(elem, data, container) {\r\n return new TransformProperty(elem, data, container);\r\n }\r\n\r\n return {\r\n getTransformProperty: getTransformProperty\r\n };\r\n }();\r\n\r\n function RepeaterModifier() {}\r\n\r\n extendPrototype([ShapeModifier], RepeaterModifier);\r\n\r\n RepeaterModifier.prototype.initModifierProperties = function (elem, data) {\r\n this.getValue = this.processKeys;\r\n this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);\r\n this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);\r\n this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);\r\n this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);\r\n this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);\r\n this.data = data;\r\n\r\n if (!this.dynamicProperties.length) {\r\n this.getValue(true);\r\n }\r\n\r\n this._isAnimated = !!this.dynamicProperties.length;\r\n this.pMatrix = new Matrix();\r\n this.rMatrix = new Matrix();\r\n this.sMatrix = new Matrix();\r\n this.tMatrix = new Matrix();\r\n this.matrix = new Matrix();\r\n };\r\n\r\n RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {\r\n var dir = inv ? -1 : 1;\r\n var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);\r\n var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);\r\n pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);\r\n rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);\r\n rMatrix.rotate(-transform.r.v * dir * perc);\r\n rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);\r\n sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);\r\n sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);\r\n sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);\r\n };\r\n\r\n RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {\r\n this.elem = elem;\r\n this.arr = arr;\r\n this.pos = pos;\r\n this.elemsData = elemsData;\r\n this._currentCopies = 0;\r\n this._elements = [];\r\n this._groups = [];\r\n this.frameId = -1;\r\n this.initDynamicPropertyContainer(elem);\r\n this.initModifierProperties(elem, arr[pos]);\r\n\r\n while (pos > 0) {\r\n pos -= 1; // this._elements.unshift(arr.splice(pos,1)[0]);\r\n\r\n this._elements.unshift(arr[pos]);\r\n }\r\n\r\n if (this.dynamicProperties.length) {\r\n this.k = true;\r\n } else {\r\n this.getValue(true);\r\n }\r\n };\r\n\r\n RepeaterModifier.prototype.resetElements = function (elements) {\r\n var i;\r\n var len = elements.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n elements[i]._processed = false;\r\n\r\n if (elements[i].ty === 'gr') {\r\n this.resetElements(elements[i].it);\r\n }\r\n }\r\n };\r\n\r\n RepeaterModifier.prototype.cloneElements = function (elements) {\r\n var newElements = JSON.parse(JSON.stringify(elements));\r\n this.resetElements(newElements);\r\n return newElements;\r\n };\r\n\r\n RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {\r\n var i;\r\n var len = elements.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n elements[i]._render = renderFlag;\r\n\r\n if (elements[i].ty === 'gr') {\r\n this.changeGroupRender(elements[i].it, renderFlag);\r\n }\r\n }\r\n };\r\n\r\n RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {\r\n var items;\r\n var itemsTransform;\r\n var i;\r\n var dir;\r\n var cont;\r\n var hasReloaded = false;\r\n\r\n if (this._mdf || _isFirstFrame) {\r\n var copies = Math.ceil(this.c.v);\r\n\r\n if (this._groups.length < copies) {\r\n while (this._groups.length < copies) {\r\n var group = {\r\n it: this.cloneElements(this._elements),\r\n ty: 'gr'\r\n };\r\n group.it.push({\r\n a: {\r\n a: 0,\r\n ix: 1,\r\n k: [0, 0]\r\n },\r\n nm: 'Transform',\r\n o: {\r\n a: 0,\r\n ix: 7,\r\n k: 100\r\n },\r\n p: {\r\n a: 0,\r\n ix: 2,\r\n k: [0, 0]\r\n },\r\n r: {\r\n a: 1,\r\n ix: 6,\r\n k: [{\r\n s: 0,\r\n e: 0,\r\n t: 0\r\n }, {\r\n s: 0,\r\n e: 0,\r\n t: 1\r\n }]\r\n },\r\n s: {\r\n a: 0,\r\n ix: 3,\r\n k: [100, 100]\r\n },\r\n sa: {\r\n a: 0,\r\n ix: 5,\r\n k: 0\r\n },\r\n sk: {\r\n a: 0,\r\n ix: 4,\r\n k: 0\r\n },\r\n ty: 'tr'\r\n });\r\n this.arr.splice(0, 0, group);\r\n\r\n this._groups.splice(0, 0, group);\r\n\r\n this._currentCopies += 1;\r\n }\r\n\r\n this.elem.reloadShapes();\r\n hasReloaded = true;\r\n }\r\n\r\n cont = 0;\r\n var renderFlag;\r\n\r\n for (i = 0; i <= this._groups.length - 1; i += 1) {\r\n renderFlag = cont < copies;\r\n this._groups[i]._render = renderFlag;\r\n this.changeGroupRender(this._groups[i].it, renderFlag);\r\n\r\n if (!renderFlag) {\r\n var elems = this.elemsData[i].it;\r\n var transformData = elems[elems.length - 1];\r\n\r\n if (transformData.transform.op.v !== 0) {\r\n transformData.transform.op._mdf = true;\r\n transformData.transform.op.v = 0;\r\n } else {\r\n transformData.transform.op._mdf = false;\r\n }\r\n }\r\n\r\n cont += 1;\r\n }\r\n\r\n this._currentCopies = copies; /// /\r\n\r\n var offset = this.o.v;\r\n var offsetModulo = offset % 1;\r\n var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);\r\n var pProps = this.pMatrix.props;\r\n var rProps = this.rMatrix.props;\r\n var sProps = this.sMatrix.props;\r\n this.pMatrix.reset();\r\n this.rMatrix.reset();\r\n this.sMatrix.reset();\r\n this.tMatrix.reset();\r\n this.matrix.reset();\r\n var iteration = 0;\r\n\r\n if (offset > 0) {\r\n while (iteration < roundOffset) {\r\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);\r\n iteration += 1;\r\n }\r\n\r\n if (offsetModulo) {\r\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);\r\n iteration += offsetModulo;\r\n }\r\n } else if (offset < 0) {\r\n while (iteration > roundOffset) {\r\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);\r\n iteration -= 1;\r\n }\r\n\r\n if (offsetModulo) {\r\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);\r\n iteration -= offsetModulo;\r\n }\r\n }\r\n\r\n i = this.data.m === 1 ? 0 : this._currentCopies - 1;\r\n dir = this.data.m === 1 ? 1 : -1;\r\n cont = this._currentCopies;\r\n var j;\r\n var jLen;\r\n\r\n while (cont) {\r\n items = this.elemsData[i].it;\r\n itemsTransform = items[items.length - 1].transform.mProps.v.props;\r\n jLen = itemsTransform.length;\r\n items[items.length - 1].transform.mProps._mdf = true;\r\n items[items.length - 1].transform.op._mdf = true;\r\n items[items.length - 1].transform.op.v = this._currentCopies === 1 ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));\r\n\r\n if (iteration !== 0) {\r\n if (i !== 0 && dir === 1 || i !== this._currentCopies - 1 && dir === -1) {\r\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);\r\n }\r\n\r\n this.matrix.transform(rProps[0], rProps[1], rProps[2], rProps[3], rProps[4], rProps[5], rProps[6], rProps[7], rProps[8], rProps[9], rProps[10], rProps[11], rProps[12], rProps[13], rProps[14], rProps[15]);\r\n this.matrix.transform(sProps[0], sProps[1], sProps[2], sProps[3], sProps[4], sProps[5], sProps[6], sProps[7], sProps[8], sProps[9], sProps[10], sProps[11], sProps[12], sProps[13], sProps[14], sProps[15]);\r\n this.matrix.transform(pProps[0], pProps[1], pProps[2], pProps[3], pProps[4], pProps[5], pProps[6], pProps[7], pProps[8], pProps[9], pProps[10], pProps[11], pProps[12], pProps[13], pProps[14], pProps[15]);\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n itemsTransform[j] = this.matrix.props[j];\r\n }\r\n\r\n this.matrix.reset();\r\n } else {\r\n this.matrix.reset();\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n itemsTransform[j] = this.matrix.props[j];\r\n }\r\n }\r\n\r\n iteration += 1;\r\n cont -= 1;\r\n i += dir;\r\n }\r\n } else {\r\n cont = this._currentCopies;\r\n i = 0;\r\n dir = 1;\r\n\r\n while (cont) {\r\n items = this.elemsData[i].it;\r\n itemsTransform = items[items.length - 1].transform.mProps.v.props;\r\n items[items.length - 1].transform.mProps._mdf = false;\r\n items[items.length - 1].transform.op._mdf = false;\r\n cont -= 1;\r\n i += dir;\r\n }\r\n }\r\n\r\n return hasReloaded;\r\n };\r\n\r\n RepeaterModifier.prototype.addShape = function () {};\r\n\r\n function RoundCornersModifier() {}\r\n\r\n extendPrototype([ShapeModifier], RoundCornersModifier);\r\n\r\n RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {\r\n this.getValue = this.processKeys;\r\n this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);\r\n this._isAnimated = !!this.rd.effectsSequence.length;\r\n };\r\n\r\n RoundCornersModifier.prototype.processPath = function (path, round) {\r\n var clonedPath = shapePool.newElement();\r\n clonedPath.c = path.c;\r\n var i;\r\n var len = path._length;\r\n var currentV;\r\n var currentI;\r\n var currentO;\r\n var closerV;\r\n var distance;\r\n var newPosPerc;\r\n var index = 0;\r\n var vX;\r\n var vY;\r\n var oX;\r\n var oY;\r\n var iX;\r\n var iY;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n currentV = path.v[i];\r\n currentO = path.o[i];\r\n currentI = path.i[i];\r\n\r\n if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {\r\n if ((i === 0 || i === len - 1) && !path.c) {\r\n clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);\r\n /* clonedPath.v[index] = currentV;\r\n clonedPath.o[index] = currentO;\r\n clonedPath.i[index] = currentI; */\r\n\r\n index += 1;\r\n } else {\r\n if (i === 0) {\r\n closerV = path.v[len - 1];\r\n } else {\r\n closerV = path.v[i - 1];\r\n }\r\n\r\n distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));\r\n newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;\r\n iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;\r\n vX = iX;\r\n iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;\r\n vY = iY;\r\n oX = vX - (vX - currentV[0]) * roundCorner;\r\n oY = vY - (vY - currentV[1]) * roundCorner;\r\n clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);\r\n index += 1;\r\n\r\n if (i === len - 1) {\r\n closerV = path.v[0];\r\n } else {\r\n closerV = path.v[i + 1];\r\n }\r\n\r\n distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));\r\n newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;\r\n oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;\r\n vX = oX;\r\n oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;\r\n vY = oY;\r\n iX = vX - (vX - currentV[0]) * roundCorner;\r\n iY = vY - (vY - currentV[1]) * roundCorner;\r\n clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);\r\n index += 1;\r\n }\r\n } else {\r\n clonedPath.setTripleAt(path.v[i][0], path.v[i][1], path.o[i][0], path.o[i][1], path.i[i][0], path.i[i][1], index);\r\n index += 1;\r\n }\r\n }\r\n\r\n return clonedPath;\r\n };\r\n\r\n RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {\r\n var shapePaths;\r\n var i;\r\n var len = this.shapes.length;\r\n var j;\r\n var jLen;\r\n var rd = this.rd.v;\r\n\r\n if (rd !== 0) {\r\n var shapeData;\r\n var localShapeCollection;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n shapeData = this.shapes[i];\r\n localShapeCollection = shapeData.localShapeCollection;\r\n\r\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\r\n localShapeCollection.releaseShapes();\r\n shapeData.shape._mdf = true;\r\n shapePaths = shapeData.shape.paths.shapes;\r\n jLen = shapeData.shape.paths._length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n localShapeCollection.addShape(this.processPath(shapePaths[j], rd));\r\n }\r\n }\r\n\r\n shapeData.shape.paths = shapeData.localShapeCollection;\r\n }\r\n }\r\n\r\n if (!this.dynamicProperties.length) {\r\n this._mdf = false;\r\n }\r\n };\r\n\r\n function floatEqual(a, b) {\r\n return Math.abs(a - b) * 100000 <= Math.min(Math.abs(a), Math.abs(b));\r\n }\r\n\r\n function floatZero(f) {\r\n return Math.abs(f) <= 0.00001;\r\n }\r\n\r\n function lerp(p0, p1, amount) {\r\n return p0 * (1 - amount) + p1 * amount;\r\n }\r\n\r\n function lerpPoint(p0, p1, amount) {\r\n return [lerp(p0[0], p1[0], amount), lerp(p0[1], p1[1], amount)];\r\n }\r\n\r\n function quadRoots(a, b, c) {\r\n // no root\r\n if (a === 0) return [];\r\n var s = b * b - 4 * a * c; // Complex roots\r\n\r\n if (s < 0) return [];\r\n var singleRoot = -b / (2 * a); // 1 root\r\n\r\n if (s === 0) return [singleRoot];\r\n var delta = Math.sqrt(s) / (2 * a); // 2 roots\r\n\r\n return [singleRoot - delta, singleRoot + delta];\r\n }\r\n\r\n function polynomialCoefficients(p0, p1, p2, p3) {\r\n return [-p0 + 3 * p1 - 3 * p2 + p3, 3 * p0 - 6 * p1 + 3 * p2, -3 * p0 + 3 * p1, p0];\r\n }\r\n\r\n function singlePoint(p) {\r\n return new PolynomialBezier(p, p, p, p, false);\r\n }\r\n\r\n function PolynomialBezier(p0, p1, p2, p3, linearize) {\r\n if (linearize && pointEqual(p0, p1)) {\r\n p1 = lerpPoint(p0, p3, 1 / 3);\r\n }\r\n\r\n if (linearize && pointEqual(p2, p3)) {\r\n p2 = lerpPoint(p0, p3, 2 / 3);\r\n }\r\n\r\n var coeffx = polynomialCoefficients(p0[0], p1[0], p2[0], p3[0]);\r\n var coeffy = polynomialCoefficients(p0[1], p1[1], p2[1], p3[1]);\r\n this.a = [coeffx[0], coeffy[0]];\r\n this.b = [coeffx[1], coeffy[1]];\r\n this.c = [coeffx[2], coeffy[2]];\r\n this.d = [coeffx[3], coeffy[3]];\r\n this.points = [p0, p1, p2, p3];\r\n }\r\n\r\n PolynomialBezier.prototype.point = function (t) {\r\n return [((this.a[0] * t + this.b[0]) * t + this.c[0]) * t + this.d[0], ((this.a[1] * t + this.b[1]) * t + this.c[1]) * t + this.d[1]];\r\n };\r\n\r\n PolynomialBezier.prototype.derivative = function (t) {\r\n return [(3 * t * this.a[0] + 2 * this.b[0]) * t + this.c[0], (3 * t * this.a[1] + 2 * this.b[1]) * t + this.c[1]];\r\n };\r\n\r\n PolynomialBezier.prototype.tangentAngle = function (t) {\r\n var p = this.derivative(t);\r\n return Math.atan2(p[1], p[0]);\r\n };\r\n\r\n PolynomialBezier.prototype.normalAngle = function (t) {\r\n var p = this.derivative(t);\r\n return Math.atan2(p[0], p[1]);\r\n };\r\n\r\n PolynomialBezier.prototype.inflectionPoints = function () {\r\n var denom = this.a[1] * this.b[0] - this.a[0] * this.b[1];\r\n if (floatZero(denom)) return [];\r\n var tcusp = -0.5 * (this.a[1] * this.c[0] - this.a[0] * this.c[1]) / denom;\r\n var square = tcusp * tcusp - 1 / 3 * (this.b[1] * this.c[0] - this.b[0] * this.c[1]) / denom;\r\n if (square < 0) return [];\r\n var root = Math.sqrt(square);\r\n\r\n if (floatZero(root)) {\r\n if (root > 0 && root < 1) return [tcusp];\r\n return [];\r\n }\r\n\r\n return [tcusp - root, tcusp + root].filter(function (r) {\r\n return r > 0 && r < 1;\r\n });\r\n };\r\n\r\n PolynomialBezier.prototype.split = function (t) {\r\n if (t <= 0) return [singlePoint(this.points[0]), this];\r\n if (t >= 1) return [this, singlePoint(this.points[this.points.length - 1])];\r\n var p10 = lerpPoint(this.points[0], this.points[1], t);\r\n var p11 = lerpPoint(this.points[1], this.points[2], t);\r\n var p12 = lerpPoint(this.points[2], this.points[3], t);\r\n var p20 = lerpPoint(p10, p11, t);\r\n var p21 = lerpPoint(p11, p12, t);\r\n var p3 = lerpPoint(p20, p21, t);\r\n return [new PolynomialBezier(this.points[0], p10, p20, p3, true), new PolynomialBezier(p3, p21, p12, this.points[3], true)];\r\n };\r\n\r\n function extrema(bez, comp) {\r\n var min = bez.points[0][comp];\r\n var max = bez.points[bez.points.length - 1][comp];\r\n\r\n if (min > max) {\r\n var e = max;\r\n max = min;\r\n min = e;\r\n } // Derivative roots to find min/max\r\n\r\n\r\n var f = quadRoots(3 * bez.a[comp], 2 * bez.b[comp], bez.c[comp]);\r\n\r\n for (var i = 0; i < f.length; i += 1) {\r\n if (f[i] > 0 && f[i] < 1) {\r\n var val = bez.point(f[i])[comp];\r\n if (val < min) min = val;else if (val > max) max = val;\r\n }\r\n }\r\n\r\n return {\r\n min: min,\r\n max: max\r\n };\r\n }\r\n\r\n PolynomialBezier.prototype.bounds = function () {\r\n return {\r\n x: extrema(this, 0),\r\n y: extrema(this, 1)\r\n };\r\n };\r\n\r\n PolynomialBezier.prototype.boundingBox = function () {\r\n var bounds = this.bounds();\r\n return {\r\n left: bounds.x.min,\r\n right: bounds.x.max,\r\n top: bounds.y.min,\r\n bottom: bounds.y.max,\r\n width: bounds.x.max - bounds.x.min,\r\n height: bounds.y.max - bounds.y.min,\r\n cx: (bounds.x.max + bounds.x.min) / 2,\r\n cy: (bounds.y.max + bounds.y.min) / 2\r\n };\r\n };\r\n\r\n function intersectData(bez, t1, t2) {\r\n var box = bez.boundingBox();\r\n return {\r\n cx: box.cx,\r\n cy: box.cy,\r\n width: box.width,\r\n height: box.height,\r\n bez: bez,\r\n t: (t1 + t2) / 2,\r\n t1: t1,\r\n t2: t2\r\n };\r\n }\r\n\r\n function splitData(data) {\r\n var split = data.bez.split(0.5);\r\n return [intersectData(split[0], data.t1, data.t), intersectData(split[1], data.t, data.t2)];\r\n }\r\n\r\n function boxIntersect(b1, b2) {\r\n return Math.abs(b1.cx - b2.cx) * 2 < b1.width + b2.width && Math.abs(b1.cy - b2.cy) * 2 < b1.height + b2.height;\r\n }\r\n\r\n function intersectsImpl(d1, d2, depth, tolerance, intersections, maxRecursion) {\r\n if (!boxIntersect(d1, d2)) return;\r\n\r\n if (depth >= maxRecursion || d1.width <= tolerance && d1.height <= tolerance && d2.width <= tolerance && d2.height <= tolerance) {\r\n intersections.push([d1.t, d2.t]);\r\n return;\r\n }\r\n\r\n var d1s = splitData(d1);\r\n var d2s = splitData(d2);\r\n intersectsImpl(d1s[0], d2s[0], depth + 1, tolerance, intersections, maxRecursion);\r\n intersectsImpl(d1s[0], d2s[1], depth + 1, tolerance, intersections, maxRecursion);\r\n intersectsImpl(d1s[1], d2s[0], depth + 1, tolerance, intersections, maxRecursion);\r\n intersectsImpl(d1s[1], d2s[1], depth + 1, tolerance, intersections, maxRecursion);\r\n }\r\n\r\n PolynomialBezier.prototype.intersections = function (other, tolerance, maxRecursion) {\r\n if (tolerance === undefined) tolerance = 2;\r\n if (maxRecursion === undefined) maxRecursion = 7;\r\n var intersections = [];\r\n intersectsImpl(intersectData(this, 0, 1), intersectData(other, 0, 1), 0, tolerance, intersections, maxRecursion);\r\n return intersections;\r\n };\r\n\r\n PolynomialBezier.shapeSegment = function (shapePath, index) {\r\n var nextIndex = (index + 1) % shapePath.length();\r\n return new PolynomialBezier(shapePath.v[index], shapePath.o[index], shapePath.i[nextIndex], shapePath.v[nextIndex], true);\r\n };\r\n\r\n PolynomialBezier.shapeSegmentInverted = function (shapePath, index) {\r\n var nextIndex = (index + 1) % shapePath.length();\r\n return new PolynomialBezier(shapePath.v[nextIndex], shapePath.i[nextIndex], shapePath.o[index], shapePath.v[index], true);\r\n };\r\n\r\n function crossProduct(a, b) {\r\n return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\r\n }\r\n\r\n function lineIntersection(start1, end1, start2, end2) {\r\n var v1 = [start1[0], start1[1], 1];\r\n var v2 = [end1[0], end1[1], 1];\r\n var v3 = [start2[0], start2[1], 1];\r\n var v4 = [end2[0], end2[1], 1];\r\n var r = crossProduct(crossProduct(v1, v2), crossProduct(v3, v4));\r\n if (floatZero(r[2])) return null;\r\n return [r[0] / r[2], r[1] / r[2]];\r\n }\r\n\r\n function polarOffset(p, angle, length) {\r\n return [p[0] + Math.cos(angle) * length, p[1] - Math.sin(angle) * length];\r\n }\r\n\r\n function pointDistance(p1, p2) {\r\n return Math.hypot(p1[0] - p2[0], p1[1] - p2[1]);\r\n }\r\n\r\n function pointEqual(p1, p2) {\r\n return floatEqual(p1[0], p2[0]) && floatEqual(p1[1], p2[1]);\r\n }\r\n\r\n function ZigZagModifier() {}\r\n\r\n extendPrototype([ShapeModifier], ZigZagModifier);\r\n\r\n ZigZagModifier.prototype.initModifierProperties = function (elem, data) {\r\n this.getValue = this.processKeys;\r\n this.amplitude = PropertyFactory.getProp(elem, data.s, 0, null, this);\r\n this.frequency = PropertyFactory.getProp(elem, data.r, 0, null, this);\r\n this.pointsType = PropertyFactory.getProp(elem, data.pt, 0, null, this);\r\n this._isAnimated = this.amplitude.effectsSequence.length !== 0 || this.frequency.effectsSequence.length !== 0 || this.pointsType.effectsSequence.length !== 0;\r\n };\r\n\r\n function setPoint(outputBezier, point, angle, direction, amplitude, outAmplitude, inAmplitude) {\r\n var angO = angle - Math.PI / 2;\r\n var angI = angle + Math.PI / 2;\r\n var px = point[0] + Math.cos(angle) * direction * amplitude;\r\n var py = point[1] - Math.sin(angle) * direction * amplitude;\r\n outputBezier.setTripleAt(px, py, px + Math.cos(angO) * outAmplitude, py - Math.sin(angO) * outAmplitude, px + Math.cos(angI) * inAmplitude, py - Math.sin(angI) * inAmplitude, outputBezier.length());\r\n }\r\n\r\n function getPerpendicularVector(pt1, pt2) {\r\n var vector = [pt2[0] - pt1[0], pt2[1] - pt1[1]];\r\n var rot = -Math.PI * 0.5;\r\n var rotatedVector = [Math.cos(rot) * vector[0] - Math.sin(rot) * vector[1], Math.sin(rot) * vector[0] + Math.cos(rot) * vector[1]];\r\n return rotatedVector;\r\n }\r\n\r\n function getProjectingAngle(path, cur) {\r\n var prevIndex = cur === 0 ? path.length() - 1 : cur - 1;\r\n var nextIndex = (cur + 1) % path.length();\r\n var prevPoint = path.v[prevIndex];\r\n var nextPoint = path.v[nextIndex];\r\n var pVector = getPerpendicularVector(prevPoint, nextPoint);\r\n return Math.atan2(0, 1) - Math.atan2(pVector[1], pVector[0]);\r\n }\r\n\r\n function zigZagCorner(outputBezier, path, cur, amplitude, frequency, pointType, direction) {\r\n var angle = getProjectingAngle(path, cur);\r\n var point = path.v[cur % path._length];\r\n var prevPoint = path.v[cur === 0 ? path._length - 1 : cur - 1];\r\n var nextPoint = path.v[(cur + 1) % path._length];\r\n var prevDist = pointType === 2 ? Math.sqrt(Math.pow(point[0] - prevPoint[0], 2) + Math.pow(point[1] - prevPoint[1], 2)) : 0;\r\n var nextDist = pointType === 2 ? Math.sqrt(Math.pow(point[0] - nextPoint[0], 2) + Math.pow(point[1] - nextPoint[1], 2)) : 0;\r\n setPoint(outputBezier, path.v[cur % path._length], angle, direction, amplitude, nextDist / ((frequency + 1) * 2), prevDist / ((frequency + 1) * 2), pointType);\r\n }\r\n\r\n function zigZagSegment(outputBezier, segment, amplitude, frequency, pointType, direction) {\r\n for (var i = 0; i < frequency; i += 1) {\r\n var t = (i + 1) / (frequency + 1);\r\n var dist = pointType === 2 ? Math.sqrt(Math.pow(segment.points[3][0] - segment.points[0][0], 2) + Math.pow(segment.points[3][1] - segment.points[0][1], 2)) : 0;\r\n var angle = segment.normalAngle(t);\r\n var point = segment.point(t);\r\n setPoint(outputBezier, point, angle, direction, amplitude, dist / ((frequency + 1) * 2), dist / ((frequency + 1) * 2), pointType);\r\n direction = -direction;\r\n }\r\n\r\n return direction;\r\n }\r\n\r\n ZigZagModifier.prototype.processPath = function (path, amplitude, frequency, pointType) {\r\n var count = path._length;\r\n var clonedPath = shapePool.newElement();\r\n clonedPath.c = path.c;\r\n\r\n if (!path.c) {\r\n count -= 1;\r\n }\r\n\r\n if (count === 0) return clonedPath;\r\n var direction = -1;\r\n var segment = PolynomialBezier.shapeSegment(path, 0);\r\n zigZagCorner(clonedPath, path, 0, amplitude, frequency, pointType, direction);\r\n\r\n for (var i = 0; i < count; i += 1) {\r\n direction = zigZagSegment(clonedPath, segment, amplitude, frequency, pointType, -direction);\r\n\r\n if (i === count - 1 && !path.c) {\r\n segment = null;\r\n } else {\r\n segment = PolynomialBezier.shapeSegment(path, (i + 1) % count);\r\n }\r\n\r\n zigZagCorner(clonedPath, path, i + 1, amplitude, frequency, pointType, direction);\r\n }\r\n\r\n return clonedPath;\r\n };\r\n\r\n ZigZagModifier.prototype.processShapes = function (_isFirstFrame) {\r\n var shapePaths;\r\n var i;\r\n var len = this.shapes.length;\r\n var j;\r\n var jLen;\r\n var amplitude = this.amplitude.v;\r\n var frequency = Math.max(0, Math.round(this.frequency.v));\r\n var pointType = this.pointsType.v;\r\n\r\n if (amplitude !== 0) {\r\n var shapeData;\r\n var localShapeCollection;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n shapeData = this.shapes[i];\r\n localShapeCollection = shapeData.localShapeCollection;\r\n\r\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\r\n localShapeCollection.releaseShapes();\r\n shapeData.shape._mdf = true;\r\n shapePaths = shapeData.shape.paths.shapes;\r\n jLen = shapeData.shape.paths._length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n localShapeCollection.addShape(this.processPath(shapePaths[j], amplitude, frequency, pointType));\r\n }\r\n }\r\n\r\n shapeData.shape.paths = shapeData.localShapeCollection;\r\n }\r\n }\r\n\r\n if (!this.dynamicProperties.length) {\r\n this._mdf = false;\r\n }\r\n };\r\n\r\n function linearOffset(p1, p2, amount) {\r\n var angle = Math.atan2(p2[0] - p1[0], p2[1] - p1[1]);\r\n return [polarOffset(p1, angle, amount), polarOffset(p2, angle, amount)];\r\n }\r\n\r\n function offsetSegment(segment, amount) {\r\n var p0;\r\n var p1a;\r\n var p1b;\r\n var p2b;\r\n var p2a;\r\n var p3;\r\n var e;\r\n e = linearOffset(segment.points[0], segment.points[1], amount);\r\n p0 = e[0];\r\n p1a = e[1];\r\n e = linearOffset(segment.points[1], segment.points[2], amount);\r\n p1b = e[0];\r\n p2b = e[1];\r\n e = linearOffset(segment.points[2], segment.points[3], amount);\r\n p2a = e[0];\r\n p3 = e[1];\r\n var p1 = lineIntersection(p0, p1a, p1b, p2b);\r\n if (p1 === null) p1 = p1a;\r\n var p2 = lineIntersection(p2a, p3, p1b, p2b);\r\n if (p2 === null) p2 = p2a;\r\n return new PolynomialBezier(p0, p1, p2, p3);\r\n }\r\n\r\n function joinLines(outputBezier, seg1, seg2, lineJoin, miterLimit) {\r\n var p0 = seg1.points[3];\r\n var p1 = seg2.points[0]; // Bevel\r\n\r\n if (lineJoin === 3) return p0; // Connected, they don't need a joint\r\n\r\n if (pointEqual(p0, p1)) return p0; // Round\r\n\r\n if (lineJoin === 2) {\r\n var angleOut = -seg1.tangentAngle(1);\r\n var angleIn = -seg2.tangentAngle(0) + Math.PI;\r\n var center = lineIntersection(p0, polarOffset(p0, angleOut + Math.PI / 2, 100), p1, polarOffset(p1, angleOut + Math.PI / 2, 100));\r\n var radius = center ? pointDistance(center, p0) : pointDistance(p0, p1) / 2;\r\n var tan = polarOffset(p0, angleOut, 2 * radius * roundCorner);\r\n outputBezier.setXYAt(tan[0], tan[1], 'o', outputBezier.length() - 1);\r\n tan = polarOffset(p1, angleIn, 2 * radius * roundCorner);\r\n outputBezier.setTripleAt(p1[0], p1[1], p1[0], p1[1], tan[0], tan[1], outputBezier.length());\r\n return p1;\r\n } // Miter\r\n\r\n\r\n var t0 = pointEqual(p0, seg1.points[2]) ? seg1.points[0] : seg1.points[2];\r\n var t1 = pointEqual(p1, seg2.points[1]) ? seg2.points[3] : seg2.points[1];\r\n var intersection = lineIntersection(t0, p0, p1, t1);\r\n\r\n if (intersection && pointDistance(intersection, p0) < miterLimit) {\r\n outputBezier.setTripleAt(intersection[0], intersection[1], intersection[0], intersection[1], intersection[0], intersection[1], outputBezier.length());\r\n return intersection;\r\n }\r\n\r\n return p0;\r\n }\r\n\r\n function getIntersection(a, b) {\r\n var intersect = a.intersections(b);\r\n if (intersect.length && floatEqual(intersect[0][0], 1)) intersect.shift();\r\n if (intersect.length) return intersect[0];\r\n return null;\r\n }\r\n\r\n function pruneSegmentIntersection(a, b) {\r\n var outa = a.slice();\r\n var outb = b.slice();\r\n var intersect = getIntersection(a[a.length - 1], b[0]);\r\n\r\n if (intersect) {\r\n outa[a.length - 1] = a[a.length - 1].split(intersect[0])[0];\r\n outb[0] = b[0].split(intersect[1])[1];\r\n }\r\n\r\n if (a.length > 1 && b.length > 1) {\r\n intersect = getIntersection(a[0], b[b.length - 1]);\r\n\r\n if (intersect) {\r\n return [[a[0].split(intersect[0])[0]], [b[b.length - 1].split(intersect[1])[1]]];\r\n }\r\n }\r\n\r\n return [outa, outb];\r\n }\r\n\r\n function pruneIntersections(segments) {\r\n var e;\r\n\r\n for (var i = 1; i < segments.length; i += 1) {\r\n e = pruneSegmentIntersection(segments[i - 1], segments[i]);\r\n segments[i - 1] = e[0];\r\n segments[i] = e[1];\r\n }\r\n\r\n if (segments.length > 1) {\r\n e = pruneSegmentIntersection(segments[segments.length - 1], segments[0]);\r\n segments[segments.length - 1] = e[0];\r\n segments[0] = e[1];\r\n }\r\n\r\n return segments;\r\n }\r\n\r\n function offsetSegmentSplit(segment, amount) {\r\n /*\r\n We split each bezier segment into smaller pieces based\r\n on inflection points, this ensures the control point\r\n polygon is convex.\r\n (A cubic bezier can have none, one, or two inflection points)\r\n */\r\n var flex = segment.inflectionPoints();\r\n var left;\r\n var right;\r\n var split;\r\n var mid;\r\n\r\n if (flex.length === 0) {\r\n return [offsetSegment(segment, amount)];\r\n }\r\n\r\n if (flex.length === 1 || floatEqual(flex[1], 1)) {\r\n split = segment.split(flex[0]);\r\n left = split[0];\r\n right = split[1];\r\n return [offsetSegment(left, amount), offsetSegment(right, amount)];\r\n }\r\n\r\n split = segment.split(flex[0]);\r\n left = split[0];\r\n var t = (flex[1] - flex[0]) / (1 - flex[0]);\r\n split = split[1].split(t);\r\n mid = split[0];\r\n right = split[1];\r\n return [offsetSegment(left, amount), offsetSegment(mid, amount), offsetSegment(right, amount)];\r\n }\r\n\r\n function OffsetPathModifier() {}\r\n\r\n extendPrototype([ShapeModifier], OffsetPathModifier);\r\n\r\n OffsetPathModifier.prototype.initModifierProperties = function (elem, data) {\r\n this.getValue = this.processKeys;\r\n this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);\r\n this.miterLimit = PropertyFactory.getProp(elem, data.ml, 0, null, this);\r\n this.lineJoin = data.lj;\r\n this._isAnimated = this.amount.effectsSequence.length !== 0;\r\n };\r\n\r\n OffsetPathModifier.prototype.processPath = function (inputBezier, amount, lineJoin, miterLimit) {\r\n var outputBezier = shapePool.newElement();\r\n outputBezier.c = inputBezier.c;\r\n var count = inputBezier.length();\r\n\r\n if (!inputBezier.c) {\r\n count -= 1;\r\n }\r\n\r\n var i;\r\n var j;\r\n var segment;\r\n var multiSegments = [];\r\n\r\n for (i = 0; i < count; i += 1) {\r\n segment = PolynomialBezier.shapeSegment(inputBezier, i);\r\n multiSegments.push(offsetSegmentSplit(segment, amount));\r\n }\r\n\r\n if (!inputBezier.c) {\r\n for (i = count - 1; i >= 0; i -= 1) {\r\n segment = PolynomialBezier.shapeSegmentInverted(inputBezier, i);\r\n multiSegments.push(offsetSegmentSplit(segment, amount));\r\n }\r\n }\r\n\r\n multiSegments = pruneIntersections(multiSegments); // Add bezier segments to the output and apply line joints\r\n\r\n var lastPoint = null;\r\n var lastSeg = null;\r\n\r\n for (i = 0; i < multiSegments.length; i += 1) {\r\n var multiSegment = multiSegments[i];\r\n if (lastSeg) lastPoint = joinLines(outputBezier, lastSeg, multiSegment[0], lineJoin, miterLimit);\r\n lastSeg = multiSegment[multiSegment.length - 1];\r\n\r\n for (j = 0; j < multiSegment.length; j += 1) {\r\n segment = multiSegment[j];\r\n\r\n if (lastPoint && pointEqual(segment.points[0], lastPoint)) {\r\n outputBezier.setXYAt(segment.points[1][0], segment.points[1][1], 'o', outputBezier.length() - 1);\r\n } else {\r\n outputBezier.setTripleAt(segment.points[0][0], segment.points[0][1], segment.points[1][0], segment.points[1][1], segment.points[0][0], segment.points[0][1], outputBezier.length());\r\n }\r\n\r\n outputBezier.setTripleAt(segment.points[3][0], segment.points[3][1], segment.points[3][0], segment.points[3][1], segment.points[2][0], segment.points[2][1], outputBezier.length());\r\n lastPoint = segment.points[3];\r\n }\r\n }\r\n\r\n if (multiSegments.length) joinLines(outputBezier, lastSeg, multiSegments[0][0], lineJoin, miterLimit);\r\n return outputBezier;\r\n };\r\n\r\n OffsetPathModifier.prototype.processShapes = function (_isFirstFrame) {\r\n var shapePaths;\r\n var i;\r\n var len = this.shapes.length;\r\n var j;\r\n var jLen;\r\n var amount = this.amount.v;\r\n var miterLimit = this.miterLimit.v;\r\n var lineJoin = this.lineJoin;\r\n\r\n if (amount !== 0) {\r\n var shapeData;\r\n var localShapeCollection;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n shapeData = this.shapes[i];\r\n localShapeCollection = shapeData.localShapeCollection;\r\n\r\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\r\n localShapeCollection.releaseShapes();\r\n shapeData.shape._mdf = true;\r\n shapePaths = shapeData.shape.paths.shapes;\r\n jLen = shapeData.shape.paths._length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n localShapeCollection.addShape(this.processPath(shapePaths[j], amount, lineJoin, miterLimit));\r\n }\r\n }\r\n\r\n shapeData.shape.paths = shapeData.localShapeCollection;\r\n }\r\n }\r\n\r\n if (!this.dynamicProperties.length) {\r\n this._mdf = false;\r\n }\r\n };\r\n\r\n function getFontProperties(fontData) {\r\n var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];\r\n var fWeight = 'normal';\r\n var fStyle = 'normal';\r\n var len = styles.length;\r\n var styleName;\r\n\r\n for (var i = 0; i < len; i += 1) {\r\n styleName = styles[i].toLowerCase();\r\n\r\n switch (styleName) {\r\n case 'italic':\r\n fStyle = 'italic';\r\n break;\r\n\r\n case 'bold':\r\n fWeight = '700';\r\n break;\r\n\r\n case 'black':\r\n fWeight = '900';\r\n break;\r\n\r\n case 'medium':\r\n fWeight = '500';\r\n break;\r\n\r\n case 'regular':\r\n case 'normal':\r\n fWeight = '400';\r\n break;\r\n\r\n case 'light':\r\n case 'thin':\r\n fWeight = '200';\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n return {\r\n style: fStyle,\r\n weight: fontData.fWeight || fWeight\r\n };\r\n }\r\n\r\n var FontManager = function () {\r\n var maxWaitingTime = 5000;\r\n var emptyChar = {\r\n w: 0,\r\n size: 0,\r\n shapes: [],\r\n data: {\r\n shapes: []\r\n }\r\n };\r\n var combinedCharacters = []; // Hindi characters\r\n\r\n combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);\r\n var surrogateModifiers = ['d83cdffb', 'd83cdffc', 'd83cdffd', 'd83cdffe', 'd83cdfff'];\r\n var zeroWidthJoiner = [65039, 8205];\r\n\r\n function trimFontOptions(font) {\r\n var familyArray = font.split(',');\r\n var i;\r\n var len = familyArray.length;\r\n var enabledFamilies = [];\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {\r\n enabledFamilies.push(familyArray[i]);\r\n }\r\n }\r\n\r\n return enabledFamilies.join(',');\r\n }\r\n\r\n function setUpNode(font, family) {\r\n var parentNode = createTag('span'); // Node is invisible to screen readers.\r\n\r\n parentNode.setAttribute('aria-hidden', true);\r\n parentNode.style.fontFamily = family;\r\n var node = createTag('span'); // Characters that vary significantly among different fonts\r\n\r\n node.innerText = 'giItT1WQy@!-/#'; // Visible - so we can measure it - but not on the screen\r\n\r\n parentNode.style.position = 'absolute';\r\n parentNode.style.left = '-10000px';\r\n parentNode.style.top = '-10000px'; // Large font size makes even subtle changes obvious\r\n\r\n parentNode.style.fontSize = '300px'; // Reset any font properties\r\n\r\n parentNode.style.fontVariant = 'normal';\r\n parentNode.style.fontStyle = 'normal';\r\n parentNode.style.fontWeight = 'normal';\r\n parentNode.style.letterSpacing = '0';\r\n parentNode.appendChild(node);\r\n document.body.appendChild(parentNode); // Remember width with no applied web font\r\n\r\n var width = node.offsetWidth;\r\n node.style.fontFamily = trimFontOptions(font) + ', ' + family;\r\n return {\r\n node: node,\r\n w: width,\r\n parent: parentNode\r\n };\r\n }\r\n\r\n function checkLoadedFonts() {\r\n var i;\r\n var len = this.fonts.length;\r\n var node;\r\n var w;\r\n var loadedCount = len;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.fonts[i].loaded) {\r\n loadedCount -= 1;\r\n } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {\r\n this.fonts[i].loaded = true;\r\n } else {\r\n node = this.fonts[i].monoCase.node;\r\n w = this.fonts[i].monoCase.w;\r\n\r\n if (node.offsetWidth !== w) {\r\n loadedCount -= 1;\r\n this.fonts[i].loaded = true;\r\n } else {\r\n node = this.fonts[i].sansCase.node;\r\n w = this.fonts[i].sansCase.w;\r\n\r\n if (node.offsetWidth !== w) {\r\n loadedCount -= 1;\r\n this.fonts[i].loaded = true;\r\n }\r\n }\r\n\r\n if (this.fonts[i].loaded) {\r\n this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);\r\n this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);\r\n }\r\n }\r\n }\r\n\r\n if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {\r\n setTimeout(this.checkLoadedFontsBinded, 20);\r\n } else {\r\n setTimeout(this.setIsLoadedBinded, 10);\r\n }\r\n }\r\n\r\n function createHelper(fontData, def) {\r\n var engine = document.body && def ? 'svg' : 'canvas';\r\n var helper;\r\n var fontProps = getFontProperties(fontData);\r\n\r\n if (engine === 'svg') {\r\n var tHelper = createNS('text');\r\n tHelper.style.fontSize = '100px'; // tHelper.style.fontFamily = fontData.fFamily;\r\n\r\n tHelper.setAttribute('font-family', fontData.fFamily);\r\n tHelper.setAttribute('font-style', fontProps.style);\r\n tHelper.setAttribute('font-weight', fontProps.weight);\r\n tHelper.textContent = '1';\r\n\r\n if (fontData.fClass) {\r\n tHelper.style.fontFamily = 'inherit';\r\n tHelper.setAttribute('class', fontData.fClass);\r\n } else {\r\n tHelper.style.fontFamily = fontData.fFamily;\r\n }\r\n\r\n def.appendChild(tHelper);\r\n helper = tHelper;\r\n } else {\r\n var tCanvasHelper = new OffscreenCanvas(500, 500).getContext('2d');\r\n tCanvasHelper.font = fontProps.style + ' ' + fontProps.weight + ' 100px ' + fontData.fFamily;\r\n helper = tCanvasHelper;\r\n }\r\n\r\n function measure(text) {\r\n if (engine === 'svg') {\r\n helper.textContent = text;\r\n return helper.getComputedTextLength();\r\n }\r\n\r\n return helper.measureText(text).width;\r\n }\r\n\r\n return {\r\n measureText: measure\r\n };\r\n }\r\n\r\n function addFonts(fontData, defs) {\r\n if (!fontData) {\r\n this.isLoaded = true;\r\n return;\r\n }\r\n\r\n if (this.chars) {\r\n this.isLoaded = true;\r\n this.fonts = fontData.list;\r\n return;\r\n }\r\n\r\n if (!document.body) {\r\n this.isLoaded = true;\r\n fontData.list.forEach(function (data) {\r\n data.helper = createHelper(data);\r\n data.cache = {};\r\n });\r\n this.fonts = fontData.list;\r\n return;\r\n }\r\n\r\n var fontArr = fontData.list;\r\n var i;\r\n var len = fontArr.length;\r\n var _pendingFonts = len;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n var shouldLoadFont = true;\r\n var loadedSelector;\r\n var j;\r\n fontArr[i].loaded = false;\r\n fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');\r\n fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');\r\n\r\n if (!fontArr[i].fPath) {\r\n fontArr[i].loaded = true;\r\n _pendingFonts -= 1;\r\n } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {\r\n loadedSelector = document.querySelectorAll('style[f-forigin=\"p\"][f-family=\"' + fontArr[i].fFamily + '\"], style[f-origin=\"3\"][f-family=\"' + fontArr[i].fFamily + '\"]');\r\n\r\n if (loadedSelector.length > 0) {\r\n shouldLoadFont = false;\r\n }\r\n\r\n if (shouldLoadFont) {\r\n var s = createTag('style');\r\n s.setAttribute('f-forigin', fontArr[i].fOrigin);\r\n s.setAttribute('f-origin', fontArr[i].origin);\r\n s.setAttribute('f-family', fontArr[i].fFamily);\r\n s.type = 'text/css';\r\n s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + \"; font-style: normal; src: url('\" + fontArr[i].fPath + \"');}\";\r\n defs.appendChild(s);\r\n }\r\n } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {\r\n loadedSelector = document.querySelectorAll('link[f-forigin=\"g\"], link[f-origin=\"1\"]');\r\n\r\n for (j = 0; j < loadedSelector.length; j += 1) {\r\n if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {\r\n // Font is already loaded\r\n shouldLoadFont = false;\r\n }\r\n }\r\n\r\n if (shouldLoadFont) {\r\n var l = createTag('link');\r\n l.setAttribute('f-forigin', fontArr[i].fOrigin);\r\n l.setAttribute('f-origin', fontArr[i].origin);\r\n l.type = 'text/css';\r\n l.rel = 'stylesheet';\r\n l.href = fontArr[i].fPath;\r\n document.body.appendChild(l);\r\n }\r\n } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {\r\n loadedSelector = document.querySelectorAll('script[f-forigin=\"t\"], script[f-origin=\"2\"]');\r\n\r\n for (j = 0; j < loadedSelector.length; j += 1) {\r\n if (fontArr[i].fPath === loadedSelector[j].src) {\r\n // Font is already loaded\r\n shouldLoadFont = false;\r\n }\r\n }\r\n\r\n if (shouldLoadFont) {\r\n var sc = createTag('link');\r\n sc.setAttribute('f-forigin', fontArr[i].fOrigin);\r\n sc.setAttribute('f-origin', fontArr[i].origin);\r\n sc.setAttribute('rel', 'stylesheet');\r\n sc.setAttribute('href', fontArr[i].fPath);\r\n defs.appendChild(sc);\r\n }\r\n }\r\n\r\n fontArr[i].helper = createHelper(fontArr[i], defs);\r\n fontArr[i].cache = {};\r\n this.fonts.push(fontArr[i]);\r\n }\r\n\r\n if (_pendingFonts === 0) {\r\n this.isLoaded = true;\r\n } else {\r\n // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.\r\n // Adding this timeout seems to fix it\r\n setTimeout(this.checkLoadedFonts.bind(this), 100);\r\n }\r\n }\r\n\r\n function addChars(chars) {\r\n if (!chars) {\r\n return;\r\n }\r\n\r\n if (!this.chars) {\r\n this.chars = [];\r\n }\r\n\r\n var i;\r\n var len = chars.length;\r\n var j;\r\n var jLen = this.chars.length;\r\n var found;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n j = 0;\r\n found = false;\r\n\r\n while (j < jLen) {\r\n if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {\r\n found = true;\r\n }\r\n\r\n j += 1;\r\n }\r\n\r\n if (!found) {\r\n this.chars.push(chars[i]);\r\n jLen += 1;\r\n }\r\n }\r\n }\r\n\r\n function getCharData(_char, style, font) {\r\n var i = 0;\r\n var len = this.chars.length;\r\n\r\n while (i < len) {\r\n if (this.chars[i].ch === _char && this.chars[i].style === style && this.chars[i].fFamily === font) {\r\n return this.chars[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n if ((typeof _char === 'string' && _char.charCodeAt(0) !== 13 || !_char) && console && console.warn // eslint-disable-line no-console\r\n && !this._warned) {\r\n this._warned = true;\r\n console.warn('Missing character from exported characters list: ', _char, style, font); // eslint-disable-line no-console\r\n }\r\n\r\n return emptyChar;\r\n }\r\n\r\n function measureText(_char2, fontName, size) {\r\n var fontData = this.getFontByName(fontName);\r\n\r\n var index = _char2.charCodeAt(0);\r\n\r\n if (!fontData.cache[index + 1]) {\r\n var tHelper = fontData.helper;\r\n\r\n if (_char2 === ' ') {\r\n var doubleSize = tHelper.measureText('|' + _char2 + '|');\r\n var singleSize = tHelper.measureText('||');\r\n fontData.cache[index + 1] = (doubleSize - singleSize) / 100;\r\n } else {\r\n fontData.cache[index + 1] = tHelper.measureText(_char2) / 100;\r\n }\r\n }\r\n\r\n return fontData.cache[index + 1] * size;\r\n }\r\n\r\n function getFontByName(name) {\r\n var i = 0;\r\n var len = this.fonts.length;\r\n\r\n while (i < len) {\r\n if (this.fonts[i].fName === name) {\r\n return this.fonts[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return this.fonts[0];\r\n }\r\n\r\n function isModifier(firstCharCode, secondCharCode) {\r\n var sum = firstCharCode.toString(16) + secondCharCode.toString(16);\r\n return surrogateModifiers.indexOf(sum) !== -1;\r\n }\r\n\r\n function isZeroWidthJoiner(firstCharCode, secondCharCode) {\r\n if (!secondCharCode) {\r\n return firstCharCode === zeroWidthJoiner[1];\r\n }\r\n\r\n return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];\r\n }\r\n\r\n function isCombinedCharacter(_char3) {\r\n return combinedCharacters.indexOf(_char3) !== -1;\r\n }\r\n\r\n function setIsLoaded() {\r\n this.isLoaded = true;\r\n }\r\n\r\n var Font = function Font() {\r\n this.fonts = [];\r\n this.chars = null;\r\n this.typekitLoaded = 0;\r\n this.isLoaded = false;\r\n this._warned = false;\r\n this.initTime = Date.now();\r\n this.setIsLoadedBinded = this.setIsLoaded.bind(this);\r\n this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);\r\n };\r\n\r\n Font.isModifier = isModifier;\r\n Font.isZeroWidthJoiner = isZeroWidthJoiner;\r\n Font.isCombinedCharacter = isCombinedCharacter;\r\n var fontPrototype = {\r\n addChars: addChars,\r\n addFonts: addFonts,\r\n getCharData: getCharData,\r\n getFontByName: getFontByName,\r\n measureText: measureText,\r\n checkLoadedFonts: checkLoadedFonts,\r\n setIsLoaded: setIsLoaded\r\n };\r\n Font.prototype = fontPrototype;\r\n return Font;\r\n }();\r\n\r\n function RenderableElement() {}\r\n\r\n RenderableElement.prototype = {\r\n initRenderable: function initRenderable() {\r\n // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange\r\n this.isInRange = false; // layer's display state\r\n\r\n this.hidden = false; // If layer's transparency equals 0, it can be hidden\r\n\r\n this.isTransparent = false; // list of animated components\r\n\r\n this.renderableComponents = [];\r\n },\r\n addRenderableComponent: function addRenderableComponent(component) {\r\n if (this.renderableComponents.indexOf(component) === -1) {\r\n this.renderableComponents.push(component);\r\n }\r\n },\r\n removeRenderableComponent: function removeRenderableComponent(component) {\r\n if (this.renderableComponents.indexOf(component) !== -1) {\r\n this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);\r\n }\r\n },\r\n prepareRenderableFrame: function prepareRenderableFrame(num) {\r\n this.checkLayerLimits(num);\r\n },\r\n checkTransparency: function checkTransparency() {\r\n if (this.finalTransform.mProp.o.v <= 0) {\r\n if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {\r\n this.isTransparent = true;\r\n this.hide();\r\n }\r\n } else if (this.isTransparent) {\r\n this.isTransparent = false;\r\n this.show();\r\n }\r\n },\r\n\r\n /**\r\n * @function\r\n * Initializes frame related properties.\r\n *\r\n * @param {number} num\r\n * current frame number in Layer's time\r\n *\r\n */\r\n checkLayerLimits: function checkLayerLimits(num) {\r\n if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {\r\n if (this.isInRange !== true) {\r\n this.globalData._mdf = true;\r\n this._mdf = true;\r\n this.isInRange = true;\r\n this.show();\r\n }\r\n } else if (this.isInRange !== false) {\r\n this.globalData._mdf = true;\r\n this.isInRange = false;\r\n this.hide();\r\n }\r\n },\r\n renderRenderable: function renderRenderable() {\r\n var i;\r\n var len = this.renderableComponents.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.renderableComponents[i].renderFrame(this._isFirstFrame);\r\n }\r\n /* this.maskManager.renderFrame(this.finalTransform.mat);\r\n this.renderableEffectsManager.renderFrame(this._isFirstFrame); */\r\n\r\n },\r\n sourceRectAtTime: function sourceRectAtTime() {\r\n return {\r\n top: 0,\r\n left: 0,\r\n width: 100,\r\n height: 100\r\n };\r\n },\r\n getLayerSize: function getLayerSize() {\r\n if (this.data.ty === 5) {\r\n return {\r\n w: this.data.textData.width,\r\n h: this.data.textData.height\r\n };\r\n }\r\n\r\n return {\r\n w: this.data.width,\r\n h: this.data.height\r\n };\r\n }\r\n };\r\n\r\n var getBlendMode = function () {\r\n var blendModeEnums = {\r\n 0: 'source-over',\r\n 1: 'multiply',\r\n 2: 'screen',\r\n 3: 'overlay',\r\n 4: 'darken',\r\n 5: 'lighten',\r\n 6: 'color-dodge',\r\n 7: 'color-burn',\r\n 8: 'hard-light',\r\n 9: 'soft-light',\r\n 10: 'difference',\r\n 11: 'exclusion',\r\n 12: 'hue',\r\n 13: 'saturation',\r\n 14: 'color',\r\n 15: 'luminosity'\r\n };\r\n return function (mode) {\r\n return blendModeEnums[mode] || '';\r\n };\r\n }();\r\n\r\n function SliderEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n }\r\n\r\n function AngleEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n }\r\n\r\n function ColorEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);\r\n }\r\n\r\n function PointEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);\r\n }\r\n\r\n function LayerIndexEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n }\r\n\r\n function MaskIndexEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n }\r\n\r\n function CheckboxEffect(data, elem, container) {\r\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\r\n }\r\n\r\n function NoValueEffect() {\r\n this.p = {};\r\n }\r\n\r\n function EffectsManager(data, element) {\r\n var effects = data.ef || [];\r\n this.effectElements = [];\r\n var i;\r\n var len = effects.length;\r\n var effectItem;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n effectItem = new GroupEffect(effects[i], element);\r\n this.effectElements.push(effectItem);\r\n }\r\n }\r\n\r\n function GroupEffect(data, element) {\r\n this.init(data, element);\r\n }\r\n\r\n extendPrototype([DynamicPropertyContainer], GroupEffect);\r\n GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;\r\n\r\n GroupEffect.prototype.init = function (data, element) {\r\n this.data = data;\r\n this.effectElements = [];\r\n this.initDynamicPropertyContainer(element);\r\n var i;\r\n var len = this.data.ef.length;\r\n var eff;\r\n var effects = this.data.ef;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n eff = null;\r\n\r\n switch (effects[i].ty) {\r\n case 0:\r\n eff = new SliderEffect(effects[i], element, this);\r\n break;\r\n\r\n case 1:\r\n eff = new AngleEffect(effects[i], element, this);\r\n break;\r\n\r\n case 2:\r\n eff = new ColorEffect(effects[i], element, this);\r\n break;\r\n\r\n case 3:\r\n eff = new PointEffect(effects[i], element, this);\r\n break;\r\n\r\n case 4:\r\n case 7:\r\n eff = new CheckboxEffect(effects[i], element, this);\r\n break;\r\n\r\n case 10:\r\n eff = new LayerIndexEffect(effects[i], element, this);\r\n break;\r\n\r\n case 11:\r\n eff = new MaskIndexEffect(effects[i], element, this);\r\n break;\r\n\r\n case 5:\r\n eff = new EffectsManager(effects[i], element, this);\r\n break;\r\n // case 6:\r\n\r\n default:\r\n eff = new NoValueEffect(effects[i], element, this);\r\n break;\r\n }\r\n\r\n if (eff) {\r\n this.effectElements.push(eff);\r\n }\r\n }\r\n };\r\n\r\n function BaseElement() {}\r\n\r\n BaseElement.prototype = {\r\n checkMasks: function checkMasks() {\r\n if (!this.data.hasMask) {\r\n return false;\r\n }\r\n\r\n var i = 0;\r\n var len = this.data.masksProperties.length;\r\n\r\n while (i < len) {\r\n if (this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false) {\r\n return true;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return false;\r\n },\r\n initExpressions: function initExpressions() {\r\n var expressionsInterfaces = getExpressionInterfaces();\r\n\r\n if (!expressionsInterfaces) {\r\n return;\r\n }\r\n\r\n var LayerExpressionInterface = expressionsInterfaces('layer');\r\n var EffectsExpressionInterface = expressionsInterfaces('effects');\r\n var ShapeExpressionInterface = expressionsInterfaces('shape');\r\n var TextExpressionInterface = expressionsInterfaces('text');\r\n var CompExpressionInterface = expressionsInterfaces('comp');\r\n this.layerInterface = LayerExpressionInterface(this);\r\n\r\n if (this.data.hasMask && this.maskManager) {\r\n this.layerInterface.registerMaskInterface(this.maskManager);\r\n }\r\n\r\n var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);\r\n this.layerInterface.registerEffectsInterface(effectsInterface);\r\n\r\n if (this.data.ty === 0 || this.data.xt) {\r\n this.compInterface = CompExpressionInterface(this);\r\n } else if (this.data.ty === 4) {\r\n this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);\r\n this.layerInterface.content = this.layerInterface.shapeInterface;\r\n } else if (this.data.ty === 5) {\r\n this.layerInterface.textInterface = TextExpressionInterface(this);\r\n this.layerInterface.text = this.layerInterface.textInterface;\r\n }\r\n },\r\n setBlendMode: function setBlendMode() {\r\n var blendModeValue = getBlendMode(this.data.bm);\r\n var elem = this.baseElement || this.layerElement;\r\n elem.style['mix-blend-mode'] = blendModeValue;\r\n },\r\n initBaseData: function initBaseData(data, globalData, comp) {\r\n this.globalData = globalData;\r\n this.comp = comp;\r\n this.data = data;\r\n this.layerId = createElementID(); // Stretch factor for old animations missing this property.\r\n\r\n if (!this.data.sr) {\r\n this.data.sr = 1;\r\n } // effects manager\r\n\r\n\r\n this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);\r\n },\r\n getType: function getType() {\r\n return this.type;\r\n },\r\n sourceRectAtTime: function sourceRectAtTime() {}\r\n };\r\n\r\n /**\r\n * @file\r\n * Handles element's layer frame update.\r\n * Checks layer in point and out point\r\n *\r\n */\r\n function FrameElement() {}\r\n\r\n FrameElement.prototype = {\r\n /**\r\n * @function\r\n * Initializes frame related properties.\r\n *\r\n */\r\n initFrame: function initFrame() {\r\n // set to true when inpoint is rendered\r\n this._isFirstFrame = false; // list of animated properties\r\n\r\n this.dynamicProperties = []; // If layer has been modified in current tick this will be true\r\n\r\n this._mdf = false;\r\n },\r\n\r\n /**\r\n * @function\r\n * Calculates all dynamic values\r\n *\r\n * @param {number} num\r\n * current frame number in Layer's time\r\n * @param {boolean} isVisible\r\n * if layers is currently in range\r\n *\r\n */\r\n prepareProperties: function prepareProperties(num, isVisible) {\r\n var i;\r\n var len = this.dynamicProperties.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (isVisible || this._isParent && this.dynamicProperties[i].propType === 'transform') {\r\n this.dynamicProperties[i].getValue();\r\n\r\n if (this.dynamicProperties[i]._mdf) {\r\n this.globalData._mdf = true;\r\n this._mdf = true;\r\n }\r\n }\r\n }\r\n },\r\n addDynamicProperty: function addDynamicProperty(prop) {\r\n if (this.dynamicProperties.indexOf(prop) === -1) {\r\n this.dynamicProperties.push(prop);\r\n }\r\n }\r\n };\r\n\r\n function FootageElement(data, globalData, comp) {\r\n this.initFrame();\r\n this.initRenderable();\r\n this.assetData = globalData.getAssetData(data.refId);\r\n this.footageData = globalData.imageLoader.getAsset(this.assetData);\r\n this.initBaseData(data, globalData, comp);\r\n }\r\n\r\n FootageElement.prototype.prepareFrame = function () {};\r\n\r\n extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);\r\n\r\n FootageElement.prototype.getBaseElement = function () {\r\n return null;\r\n };\r\n\r\n FootageElement.prototype.renderFrame = function () {};\r\n\r\n FootageElement.prototype.destroy = function () {};\r\n\r\n FootageElement.prototype.initExpressions = function () {\r\n var expressionsInterfaces = getExpressionInterfaces();\r\n\r\n if (!expressionsInterfaces) {\r\n return;\r\n }\r\n\r\n var FootageInterface = expressionsInterfaces('footage');\r\n this.layerInterface = FootageInterface(this);\r\n };\r\n\r\n FootageElement.prototype.getFootageData = function () {\r\n return this.footageData;\r\n };\r\n\r\n function AudioElement(data, globalData, comp) {\r\n this.initFrame();\r\n this.initRenderable();\r\n this.assetData = globalData.getAssetData(data.refId);\r\n this.initBaseData(data, globalData, comp);\r\n this._isPlaying = false;\r\n this._canPlay = false;\r\n var assetPath = this.globalData.getAssetsPath(this.assetData);\r\n this.audio = this.globalData.audioController.createAudio(assetPath);\r\n this._currentTime = 0;\r\n this.globalData.audioController.addAudio(this);\r\n this._volumeMultiplier = 1;\r\n this._volume = 1;\r\n this._previousVolume = null;\r\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\r\n _placeholder: true\r\n };\r\n this.lv = PropertyFactory.getProp(this, data.au && data.au.lv ? data.au.lv : {\r\n k: [100]\r\n }, 1, 0.01, this);\r\n }\r\n\r\n AudioElement.prototype.prepareFrame = function (num) {\r\n this.prepareRenderableFrame(num, true);\r\n this.prepareProperties(num, true);\r\n\r\n if (!this.tm._placeholder) {\r\n var timeRemapped = this.tm.v;\r\n this._currentTime = timeRemapped;\r\n } else {\r\n this._currentTime = num / this.data.sr;\r\n }\r\n\r\n this._volume = this.lv.v[0];\r\n var totalVolume = this._volume * this._volumeMultiplier;\r\n\r\n if (this._previousVolume !== totalVolume) {\r\n this._previousVolume = totalVolume;\r\n this.audio.volume(totalVolume);\r\n }\r\n };\r\n\r\n extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);\r\n\r\n AudioElement.prototype.renderFrame = function () {\r\n if (this.isInRange && this._canPlay) {\r\n if (!this._isPlaying) {\r\n this.audio.play();\r\n this.audio.seek(this._currentTime / this.globalData.frameRate);\r\n this._isPlaying = true;\r\n } else if (!this.audio.playing() || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1) {\r\n this.audio.seek(this._currentTime / this.globalData.frameRate);\r\n }\r\n }\r\n };\r\n\r\n AudioElement.prototype.show = function () {// this.audio.play()\r\n };\r\n\r\n AudioElement.prototype.hide = function () {\r\n this.audio.pause();\r\n this._isPlaying = false;\r\n };\r\n\r\n AudioElement.prototype.pause = function () {\r\n this.audio.pause();\r\n this._isPlaying = false;\r\n this._canPlay = false;\r\n };\r\n\r\n AudioElement.prototype.resume = function () {\r\n this._canPlay = true;\r\n };\r\n\r\n AudioElement.prototype.setRate = function (rateValue) {\r\n this.audio.rate(rateValue);\r\n };\r\n\r\n AudioElement.prototype.volume = function (volumeValue) {\r\n this._volumeMultiplier = volumeValue;\r\n this._previousVolume = volumeValue * this._volume;\r\n this.audio.volume(this._previousVolume);\r\n };\r\n\r\n AudioElement.prototype.getBaseElement = function () {\r\n return null;\r\n };\r\n\r\n AudioElement.prototype.destroy = function () {};\r\n\r\n AudioElement.prototype.sourceRectAtTime = function () {};\r\n\r\n AudioElement.prototype.initExpressions = function () {};\r\n\r\n function BaseRenderer() {}\r\n\r\n BaseRenderer.prototype.checkLayers = function (num) {\r\n var i;\r\n var len = this.layers.length;\r\n var data;\r\n this.completeLayers = true;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (!this.elements[i]) {\r\n data = this.layers[i];\r\n\r\n if (data.ip - data.st <= num - this.layers[i].st && data.op - data.st > num - this.layers[i].st) {\r\n this.buildItem(i);\r\n }\r\n }\r\n\r\n this.completeLayers = this.elements[i] ? this.completeLayers : false;\r\n }\r\n\r\n this.checkPendingElements();\r\n };\r\n\r\n BaseRenderer.prototype.createItem = function (layer) {\r\n switch (layer.ty) {\r\n case 2:\r\n return this.createImage(layer);\r\n\r\n case 0:\r\n return this.createComp(layer);\r\n\r\n case 1:\r\n return this.createSolid(layer);\r\n\r\n case 3:\r\n return this.createNull(layer);\r\n\r\n case 4:\r\n return this.createShape(layer);\r\n\r\n case 5:\r\n return this.createText(layer);\r\n\r\n case 6:\r\n return this.createAudio(layer);\r\n\r\n case 13:\r\n return this.createCamera(layer);\r\n\r\n case 15:\r\n return this.createFootage(layer);\r\n\r\n default:\r\n return this.createNull(layer);\r\n }\r\n };\r\n\r\n BaseRenderer.prototype.createCamera = function () {\r\n throw new Error('You\\'re using a 3d camera. Try the html renderer.');\r\n };\r\n\r\n BaseRenderer.prototype.createAudio = function (data) {\r\n return new AudioElement(data, this.globalData, this);\r\n };\r\n\r\n BaseRenderer.prototype.createFootage = function (data) {\r\n return new FootageElement(data, this.globalData, this);\r\n };\r\n\r\n BaseRenderer.prototype.buildAllItems = function () {\r\n var i;\r\n var len = this.layers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.buildItem(i);\r\n }\r\n\r\n this.checkPendingElements();\r\n };\r\n\r\n BaseRenderer.prototype.includeLayers = function (newLayers) {\r\n this.completeLayers = false;\r\n var i;\r\n var len = newLayers.length;\r\n var j;\r\n var jLen = this.layers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n j = 0;\r\n\r\n while (j < jLen) {\r\n if (this.layers[j].id === newLayers[i].id) {\r\n this.layers[j] = newLayers[i];\r\n break;\r\n }\r\n\r\n j += 1;\r\n }\r\n }\r\n };\r\n\r\n BaseRenderer.prototype.setProjectInterface = function (pInterface) {\r\n this.globalData.projectInterface = pInterface;\r\n };\r\n\r\n BaseRenderer.prototype.initItems = function () {\r\n if (!this.globalData.progressiveLoad) {\r\n this.buildAllItems();\r\n }\r\n };\r\n\r\n BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {\r\n var elements = this.elements;\r\n var layers = this.layers;\r\n var i = 0;\r\n var len = layers.length;\r\n\r\n while (i < len) {\r\n if (layers[i].ind == parentName) {\r\n // eslint-disable-line eqeqeq\r\n if (!elements[i] || elements[i] === true) {\r\n this.buildItem(i);\r\n this.addPendingElement(element);\r\n } else {\r\n hierarchy.push(elements[i]);\r\n elements[i].setAsParent();\r\n\r\n if (layers[i].parent !== undefined) {\r\n this.buildElementParenting(element, layers[i].parent, hierarchy);\r\n } else {\r\n element.setHierarchy(hierarchy);\r\n }\r\n }\r\n }\r\n\r\n i += 1;\r\n }\r\n };\r\n\r\n BaseRenderer.prototype.addPendingElement = function (element) {\r\n this.pendingElements.push(element);\r\n };\r\n\r\n BaseRenderer.prototype.searchExtraCompositions = function (assets) {\r\n var i;\r\n var len = assets.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (assets[i].xt) {\r\n var comp = this.createComp(assets[i]);\r\n comp.initExpressions();\r\n this.globalData.projectInterface.registerComposition(comp);\r\n }\r\n }\r\n };\r\n\r\n BaseRenderer.prototype.getElementByPath = function (path) {\r\n var pathValue = path.shift();\r\n var element;\r\n\r\n if (typeof pathValue === 'number') {\r\n element = this.elements[pathValue];\r\n } else {\r\n var i;\r\n var len = this.elements.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.elements[i].data.nm === pathValue) {\r\n element = this.elements[i];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (path.length === 0) {\r\n return element;\r\n }\r\n\r\n return element.getElementByPath(path);\r\n };\r\n\r\n BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {\r\n this.globalData.fontManager = new FontManager();\r\n this.globalData.fontManager.addChars(animData.chars);\r\n this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);\r\n this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);\r\n this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);\r\n this.globalData.imageLoader = this.animationItem.imagePreloader;\r\n this.globalData.audioController = this.animationItem.audioController;\r\n this.globalData.frameId = 0;\r\n this.globalData.frameRate = animData.fr;\r\n this.globalData.nm = animData.nm;\r\n this.globalData.compSize = {\r\n w: animData.w,\r\n h: animData.h\r\n };\r\n };\r\n\r\n function TransformElement() {}\r\n\r\n TransformElement.prototype = {\r\n initTransform: function initTransform() {\r\n this.finalTransform = {\r\n mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : {\r\n o: 0\r\n },\r\n _matMdf: false,\r\n _opMdf: false,\r\n mat: new Matrix()\r\n };\r\n\r\n if (this.data.ao) {\r\n this.finalTransform.mProp.autoOriented = true;\r\n } // TODO: check TYPE 11: Guided elements\r\n\r\n\r\n if (this.data.ty !== 11) {// this.createElements();\r\n }\r\n },\r\n renderTransform: function renderTransform() {\r\n this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;\r\n this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;\r\n\r\n if (this.hierarchy) {\r\n var mat;\r\n var finalMat = this.finalTransform.mat;\r\n var i = 0;\r\n var len = this.hierarchy.length; // Checking if any of the transformation matrices in the hierarchy chain has changed.\r\n\r\n if (!this.finalTransform._matMdf) {\r\n while (i < len) {\r\n if (this.hierarchy[i].finalTransform.mProp._mdf) {\r\n this.finalTransform._matMdf = true;\r\n break;\r\n }\r\n\r\n i += 1;\r\n }\r\n }\r\n\r\n if (this.finalTransform._matMdf) {\r\n mat = this.finalTransform.mProp.v.props;\r\n finalMat.cloneFromProps(mat);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n mat = this.hierarchy[i].finalTransform.mProp.v.props;\r\n finalMat.transform(mat[0], mat[1], mat[2], mat[3], mat[4], mat[5], mat[6], mat[7], mat[8], mat[9], mat[10], mat[11], mat[12], mat[13], mat[14], mat[15]);\r\n }\r\n }\r\n }\r\n },\r\n globalToLocal: function globalToLocal(pt) {\r\n var transforms = [];\r\n transforms.push(this.finalTransform);\r\n var flag = true;\r\n var comp = this.comp;\r\n\r\n while (flag) {\r\n if (comp.finalTransform) {\r\n if (comp.data.hasMask) {\r\n transforms.splice(0, 0, comp.finalTransform);\r\n }\r\n\r\n comp = comp.comp;\r\n } else {\r\n flag = false;\r\n }\r\n }\r\n\r\n var i;\r\n var len = transforms.length;\r\n var ptNew;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ptNew = transforms[i].mat.applyToPointArray(0, 0, 0); // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);\r\n\r\n pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];\r\n }\r\n\r\n return pt;\r\n },\r\n mHelper: new Matrix()\r\n };\r\n\r\n function MaskElement(data, element, globalData) {\r\n this.data = data;\r\n this.element = element;\r\n this.globalData = globalData;\r\n this.storedData = [];\r\n this.masksProperties = this.data.masksProperties || [];\r\n this.maskElement = null;\r\n var defs = this.globalData.defs;\r\n var i;\r\n var len = this.masksProperties ? this.masksProperties.length : 0;\r\n this.viewData = createSizedArray(len);\r\n this.solidPath = '';\r\n var path;\r\n var properties = this.masksProperties;\r\n var count = 0;\r\n var currentMasks = [];\r\n var j;\r\n var jLen;\r\n var layerId = createElementID();\r\n var rect;\r\n var expansor;\r\n var feMorph;\r\n var x;\r\n var maskType = 'clipPath';\r\n var maskRef = 'clip-path';\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (properties[i].mode !== 'a' && properties[i].mode !== 'n' || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {\r\n maskType = 'mask';\r\n maskRef = 'mask';\r\n }\r\n\r\n if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {\r\n rect = createNS('rect');\r\n rect.setAttribute('fill', '#ffffff');\r\n rect.setAttribute('width', this.element.comp.data.w || 0);\r\n rect.setAttribute('height', this.element.comp.data.h || 0);\r\n currentMasks.push(rect);\r\n } else {\r\n rect = null;\r\n }\r\n\r\n path = createNS('path');\r\n\r\n if (properties[i].mode === 'n') {\r\n // TODO move this to a factory or to a constructor\r\n this.viewData[i] = {\r\n op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),\r\n prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),\r\n elem: path,\r\n lastPath: ''\r\n };\r\n defs.appendChild(path);\r\n } else {\r\n count += 1;\r\n path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');\r\n path.setAttribute('clip-rule', 'nonzero');\r\n var filterID;\r\n\r\n if (properties[i].x.k !== 0) {\r\n maskType = 'mask';\r\n maskRef = 'mask';\r\n x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);\r\n filterID = createElementID();\r\n expansor = createNS('filter');\r\n expansor.setAttribute('id', filterID);\r\n feMorph = createNS('feMorphology');\r\n feMorph.setAttribute('operator', 'erode');\r\n feMorph.setAttribute('in', 'SourceGraphic');\r\n feMorph.setAttribute('radius', '0');\r\n expansor.appendChild(feMorph);\r\n defs.appendChild(expansor);\r\n path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');\r\n } else {\r\n feMorph = null;\r\n x = null;\r\n } // TODO move this to a factory or to a constructor\r\n\r\n\r\n this.storedData[i] = {\r\n elem: path,\r\n x: x,\r\n expan: feMorph,\r\n lastPath: '',\r\n lastOperator: '',\r\n filterId: filterID,\r\n lastRadius: 0\r\n };\r\n\r\n if (properties[i].mode === 'i') {\r\n jLen = currentMasks.length;\r\n var g = createNS('g');\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n g.appendChild(currentMasks[j]);\r\n }\r\n\r\n var mask = createNS('mask');\r\n mask.setAttribute('mask-type', 'alpha');\r\n mask.setAttribute('id', layerId + '_' + count);\r\n mask.appendChild(path);\r\n defs.appendChild(mask);\r\n g.setAttribute('mask', 'url(' + getLocationHref() + '#' + layerId + '_' + count + ')');\r\n currentMasks.length = 0;\r\n currentMasks.push(g);\r\n } else {\r\n currentMasks.push(path);\r\n }\r\n\r\n if (properties[i].inv && !this.solidPath) {\r\n this.solidPath = this.createLayerSolidPath();\r\n } // TODO move this to a factory or to a constructor\r\n\r\n\r\n this.viewData[i] = {\r\n elem: path,\r\n lastPath: '',\r\n op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),\r\n prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),\r\n invRect: rect\r\n };\r\n\r\n if (!this.viewData[i].prop.k) {\r\n this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);\r\n }\r\n }\r\n }\r\n\r\n this.maskElement = createNS(maskType);\r\n len = currentMasks.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.maskElement.appendChild(currentMasks[i]);\r\n }\r\n\r\n if (count > 0) {\r\n this.maskElement.setAttribute('id', layerId);\r\n this.element.maskedElement.setAttribute(maskRef, 'url(' + getLocationHref() + '#' + layerId + ')');\r\n defs.appendChild(this.maskElement);\r\n }\r\n\r\n if (this.viewData.length) {\r\n this.element.addRenderableComponent(this);\r\n }\r\n }\r\n\r\n MaskElement.prototype.getMaskProperty = function (pos) {\r\n return this.viewData[pos].prop;\r\n };\r\n\r\n MaskElement.prototype.renderFrame = function (isFirstFrame) {\r\n var finalMat = this.element.finalTransform.mat;\r\n var i;\r\n var len = this.masksProperties.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.viewData[i].prop._mdf || isFirstFrame) {\r\n this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);\r\n }\r\n\r\n if (this.viewData[i].op._mdf || isFirstFrame) {\r\n this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);\r\n }\r\n\r\n if (this.masksProperties[i].mode !== 'n') {\r\n if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {\r\n this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());\r\n }\r\n\r\n if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {\r\n var feMorph = this.storedData[i].expan;\r\n\r\n if (this.storedData[i].x.v < 0) {\r\n if (this.storedData[i].lastOperator !== 'erode') {\r\n this.storedData[i].lastOperator = 'erode';\r\n this.storedData[i].elem.setAttribute('filter', 'url(' + getLocationHref() + '#' + this.storedData[i].filterId + ')');\r\n }\r\n\r\n feMorph.setAttribute('radius', -this.storedData[i].x.v);\r\n } else {\r\n if (this.storedData[i].lastOperator !== 'dilate') {\r\n this.storedData[i].lastOperator = 'dilate';\r\n this.storedData[i].elem.setAttribute('filter', null);\r\n }\r\n\r\n this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n MaskElement.prototype.getMaskelement = function () {\r\n return this.maskElement;\r\n };\r\n\r\n MaskElement.prototype.createLayerSolidPath = function () {\r\n var path = 'M0,0 ';\r\n path += ' h' + this.globalData.compSize.w;\r\n path += ' v' + this.globalData.compSize.h;\r\n path += ' h-' + this.globalData.compSize.w;\r\n path += ' v-' + this.globalData.compSize.h + ' ';\r\n return path;\r\n };\r\n\r\n MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {\r\n var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];\r\n var i;\r\n var len;\r\n len = pathNodes._length;\r\n\r\n for (i = 1; i < len; i += 1) {\r\n // pathString += \" C\"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + \" \"+pathNodes.i[i][0]+','+pathNodes.i[i][1] + \" \"+pathNodes.v[i][0]+','+pathNodes.v[i][1];\r\n pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[i][0] + ',' + pathNodes.i[i][1] + ' ' + pathNodes.v[i][0] + ',' + pathNodes.v[i][1];\r\n } // pathString += \" C\"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + \" \"+pathNodes.i[0][0]+','+pathNodes.i[0][1] + \" \"+pathNodes.v[0][0]+','+pathNodes.v[0][1];\r\n\r\n\r\n if (pathNodes.c && len > 1) {\r\n pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[0][0] + ',' + pathNodes.i[0][1] + ' ' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];\r\n } // pathNodes.__renderedString = pathString;\r\n\r\n\r\n if (viewData.lastPath !== pathString) {\r\n var pathShapeValue = '';\r\n\r\n if (viewData.elem) {\r\n if (pathNodes.c) {\r\n pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;\r\n }\r\n\r\n viewData.elem.setAttribute('d', pathShapeValue);\r\n }\r\n\r\n viewData.lastPath = pathString;\r\n }\r\n };\r\n\r\n MaskElement.prototype.destroy = function () {\r\n this.element = null;\r\n this.globalData = null;\r\n this.maskElement = null;\r\n this.data = null;\r\n this.masksProperties = null;\r\n };\r\n\r\n var filtersFactory = function () {\r\n var ob = {};\r\n ob.createFilter = createFilter;\r\n ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;\r\n\r\n function createFilter(filId, skipCoordinates) {\r\n var fil = createNS('filter');\r\n fil.setAttribute('id', filId);\r\n\r\n if (skipCoordinates !== true) {\r\n fil.setAttribute('filterUnits', 'objectBoundingBox');\r\n fil.setAttribute('x', '0%');\r\n fil.setAttribute('y', '0%');\r\n fil.setAttribute('width', '100%');\r\n fil.setAttribute('height', '100%');\r\n }\r\n\r\n return fil;\r\n }\r\n\r\n function createAlphaToLuminanceFilter() {\r\n var feColorMatrix = createNS('feColorMatrix');\r\n feColorMatrix.setAttribute('type', 'matrix');\r\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\r\n feColorMatrix.setAttribute('values', '0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1');\r\n return feColorMatrix;\r\n }\r\n\r\n return ob;\r\n }();\r\n\r\n var featureSupport = function () {\r\n var ob = {\r\n maskType: true\r\n };\r\n\r\n if (/MSIE 10/i.test(navigator.userAgent) || /MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent) || /Edge\\/\\d./i.test(navigator.userAgent)) {\r\n ob.maskType = false;\r\n }\r\n\r\n return ob;\r\n }();\r\n\r\n var registeredEffects = {};\r\n var idPrefix = 'filter_result_';\r\n\r\n function SVGEffects(elem) {\r\n var i;\r\n var source = 'SourceGraphic';\r\n var len = elem.data.ef ? elem.data.ef.length : 0;\r\n var filId = createElementID();\r\n var fil = filtersFactory.createFilter(filId, true);\r\n var count = 0;\r\n this.filters = [];\r\n var filterManager;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n filterManager = null;\r\n var type = elem.data.ef[i].ty;\r\n\r\n if (registeredEffects[type]) {\r\n var Effect = registeredEffects[type].effect;\r\n filterManager = new Effect(fil, elem.effectsManager.effectElements[i], elem, idPrefix + count, source);\r\n source = idPrefix + count;\r\n\r\n if (registeredEffects[type].countsAsEffect) {\r\n count += 1;\r\n }\r\n }\r\n\r\n if (filterManager) {\r\n this.filters.push(filterManager);\r\n }\r\n }\r\n\r\n if (count) {\r\n elem.globalData.defs.appendChild(fil);\r\n elem.layerElement.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');\r\n }\r\n\r\n if (this.filters.length) {\r\n elem.addRenderableComponent(this);\r\n }\r\n }\r\n\r\n SVGEffects.prototype.renderFrame = function (_isFirstFrame) {\r\n var i;\r\n var len = this.filters.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.filters[i].renderFrame(_isFirstFrame);\r\n }\r\n };\r\n\r\n function registerEffect(id, effect, countsAsEffect) {\r\n registeredEffects[id] = {\r\n effect: effect,\r\n countsAsEffect: countsAsEffect\r\n };\r\n }\r\n\r\n function SVGBaseElement() {}\r\n\r\n SVGBaseElement.prototype = {\r\n initRendererElement: function initRendererElement() {\r\n this.layerElement = createNS('g');\r\n },\r\n createContainerElements: function createContainerElements() {\r\n this.matteElement = createNS('g');\r\n this.transformedElement = this.layerElement;\r\n this.maskedElement = this.layerElement;\r\n this._sizeChanged = false;\r\n var layerElementParent = null; // If this layer acts as a mask for the following layer\r\n\r\n if (this.data.td) {\r\n this.matteMasks = {};\r\n var symbolElement = createNS('symbol');\r\n symbolElement.setAttribute('id', this.layerId);\r\n var gg = createNS('g');\r\n gg.appendChild(this.layerElement);\r\n symbolElement.appendChild(gg);\r\n layerElementParent = gg;\r\n this.globalData.defs.appendChild(symbolElement);\r\n } else if (this.data.tt) {\r\n this.matteElement.appendChild(this.layerElement);\r\n layerElementParent = this.matteElement;\r\n this.baseElement = this.matteElement;\r\n } else {\r\n this.baseElement = this.layerElement;\r\n }\r\n\r\n if (this.data.ln) {\r\n this.layerElement.setAttribute('id', this.data.ln);\r\n }\r\n\r\n if (this.data.cl) {\r\n this.layerElement.setAttribute('class', this.data.cl);\r\n } // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped\r\n\r\n\r\n if (this.data.ty === 0 && !this.data.hd) {\r\n var cp = createNS('clipPath');\r\n var pt = createNS('path');\r\n pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');\r\n var clipId = createElementID();\r\n cp.setAttribute('id', clipId);\r\n cp.appendChild(pt);\r\n this.globalData.defs.appendChild(cp);\r\n\r\n if (this.checkMasks()) {\r\n var cpGroup = createNS('g');\r\n cpGroup.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');\r\n cpGroup.appendChild(this.layerElement);\r\n this.transformedElement = cpGroup;\r\n\r\n if (layerElementParent) {\r\n layerElementParent.appendChild(this.transformedElement);\r\n } else {\r\n this.baseElement = this.transformedElement;\r\n }\r\n } else {\r\n this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');\r\n }\r\n }\r\n\r\n if (this.data.bm !== 0) {\r\n this.setBlendMode();\r\n }\r\n },\r\n renderElement: function renderElement() {\r\n if (this.finalTransform._matMdf) {\r\n this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());\r\n }\r\n\r\n if (this.finalTransform._opMdf) {\r\n this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);\r\n }\r\n },\r\n destroyBaseElement: function destroyBaseElement() {\r\n this.layerElement = null;\r\n this.matteElement = null;\r\n this.maskManager.destroy();\r\n },\r\n getBaseElement: function getBaseElement() {\r\n if (this.data.hd) {\r\n return null;\r\n }\r\n\r\n return this.baseElement;\r\n },\r\n createRenderableComponents: function createRenderableComponents() {\r\n this.maskManager = new MaskElement(this.data, this, this.globalData);\r\n this.renderableEffectsManager = new SVGEffects(this);\r\n },\r\n getMatte: function getMatte(matteType) {\r\n if (!this.matteMasks[matteType]) {\r\n var id = this.layerId + '_' + matteType;\r\n var filId;\r\n var fil;\r\n var useElement;\r\n var gg;\r\n\r\n if (matteType === 1 || matteType === 3) {\r\n var masker = createNS('mask');\r\n masker.setAttribute('id', id);\r\n masker.setAttribute('mask-type', matteType === 3 ? 'luminance' : 'alpha');\r\n useElement = createNS('use');\r\n useElement.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '#' + this.layerId);\r\n masker.appendChild(useElement);\r\n this.globalData.defs.appendChild(masker);\r\n\r\n if (!featureSupport.maskType && matteType === 1) {\r\n masker.setAttribute('mask-type', 'luminance');\r\n filId = createElementID();\r\n fil = filtersFactory.createFilter(filId);\r\n this.globalData.defs.appendChild(fil);\r\n fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());\r\n gg = createNS('g');\r\n gg.appendChild(useElement);\r\n masker.appendChild(gg);\r\n gg.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');\r\n }\r\n } else if (matteType === 2) {\r\n var maskGroup = createNS('mask');\r\n maskGroup.setAttribute('id', id);\r\n maskGroup.setAttribute('mask-type', 'alpha');\r\n var maskGrouper = createNS('g');\r\n maskGroup.appendChild(maskGrouper);\r\n filId = createElementID();\r\n fil = filtersFactory.createFilter(filId); /// /\r\n\r\n var feCTr = createNS('feComponentTransfer');\r\n feCTr.setAttribute('in', 'SourceGraphic');\r\n fil.appendChild(feCTr);\r\n var feFunc = createNS('feFuncA');\r\n feFunc.setAttribute('type', 'table');\r\n feFunc.setAttribute('tableValues', '1.0 0.0');\r\n feCTr.appendChild(feFunc); /// /\r\n\r\n this.globalData.defs.appendChild(fil);\r\n var alphaRect = createNS('rect');\r\n alphaRect.setAttribute('width', this.comp.data.w);\r\n alphaRect.setAttribute('height', this.comp.data.h);\r\n alphaRect.setAttribute('x', '0');\r\n alphaRect.setAttribute('y', '0');\r\n alphaRect.setAttribute('fill', '#ffffff');\r\n alphaRect.setAttribute('opacity', '0');\r\n maskGrouper.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');\r\n maskGrouper.appendChild(alphaRect);\r\n useElement = createNS('use');\r\n useElement.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '#' + this.layerId);\r\n maskGrouper.appendChild(useElement);\r\n\r\n if (!featureSupport.maskType) {\r\n maskGroup.setAttribute('mask-type', 'luminance');\r\n fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());\r\n gg = createNS('g');\r\n maskGrouper.appendChild(alphaRect);\r\n gg.appendChild(this.layerElement);\r\n maskGrouper.appendChild(gg);\r\n }\r\n\r\n this.globalData.defs.appendChild(maskGroup);\r\n }\r\n\r\n this.matteMasks[matteType] = id;\r\n }\r\n\r\n return this.matteMasks[matteType];\r\n },\r\n setMatte: function setMatte(id) {\r\n if (!this.matteElement) {\r\n return;\r\n }\r\n\r\n this.matteElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');\r\n }\r\n };\r\n\r\n /**\r\n * @file\r\n * Handles AE's layer parenting property.\r\n *\r\n */\r\n function HierarchyElement() {}\r\n\r\n HierarchyElement.prototype = {\r\n /**\r\n * @function\r\n * Initializes hierarchy properties\r\n *\r\n */\r\n initHierarchy: function initHierarchy() {\r\n // element's parent list\r\n this.hierarchy = []; // if element is parent of another layer _isParent will be true\r\n\r\n this._isParent = false;\r\n this.checkParenting();\r\n },\r\n\r\n /**\r\n * @function\r\n * Sets layer's hierarchy.\r\n * @param {array} hierarch\r\n * layer's parent list\r\n *\r\n */\r\n setHierarchy: function setHierarchy(hierarchy) {\r\n this.hierarchy = hierarchy;\r\n },\r\n\r\n /**\r\n * @function\r\n * Sets layer as parent.\r\n *\r\n */\r\n setAsParent: function setAsParent() {\r\n this._isParent = true;\r\n },\r\n\r\n /**\r\n * @function\r\n * Searches layer's parenting chain\r\n *\r\n */\r\n checkParenting: function checkParenting() {\r\n if (this.data.parent !== undefined) {\r\n this.comp.buildElementParenting(this, this.data.parent, []);\r\n }\r\n }\r\n };\r\n\r\n function RenderableDOMElement() {}\r\n\r\n (function () {\r\n var _prototype = {\r\n initElement: function initElement(data, globalData, comp) {\r\n this.initFrame();\r\n this.initBaseData(data, globalData, comp);\r\n this.initTransform(data, globalData, comp);\r\n this.initHierarchy();\r\n this.initRenderable();\r\n this.initRendererElement();\r\n this.createContainerElements();\r\n this.createRenderableComponents();\r\n this.createContent();\r\n this.hide();\r\n },\r\n hide: function hide() {\r\n // console.log('HIDE', this);\r\n if (!this.hidden && (!this.isInRange || this.isTransparent)) {\r\n var elem = this.baseElement || this.layerElement;\r\n elem.style.display = 'none';\r\n this.hidden = true;\r\n }\r\n },\r\n show: function show() {\r\n // console.log('SHOW', this);\r\n if (this.isInRange && !this.isTransparent) {\r\n if (!this.data.hd) {\r\n var elem = this.baseElement || this.layerElement;\r\n elem.style.display = 'block';\r\n }\r\n\r\n this.hidden = false;\r\n this._isFirstFrame = true;\r\n }\r\n },\r\n renderFrame: function renderFrame() {\r\n // If it is exported as hidden (data.hd === true) no need to render\r\n // If it is not visible no need to render\r\n if (this.data.hd || this.hidden) {\r\n return;\r\n }\r\n\r\n this.renderTransform();\r\n this.renderRenderable();\r\n this.renderElement();\r\n this.renderInnerContent();\r\n\r\n if (this._isFirstFrame) {\r\n this._isFirstFrame = false;\r\n }\r\n },\r\n renderInnerContent: function renderInnerContent() {},\r\n prepareFrame: function prepareFrame(num) {\r\n this._mdf = false;\r\n this.prepareRenderableFrame(num);\r\n this.prepareProperties(num, this.isInRange);\r\n this.checkTransparency();\r\n },\r\n destroy: function destroy() {\r\n this.innerElem = null;\r\n this.destroyBaseElement();\r\n }\r\n };\r\n extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);\r\n })();\r\n\r\n function IImageElement(data, globalData, comp) {\r\n this.assetData = globalData.getAssetData(data.refId);\r\n this.initElement(data, globalData, comp);\r\n this.sourceRect = {\r\n top: 0,\r\n left: 0,\r\n width: this.assetData.w,\r\n height: this.assetData.h\r\n };\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);\r\n\r\n IImageElement.prototype.createContent = function () {\r\n var assetPath = this.globalData.getAssetsPath(this.assetData);\r\n this.innerElem = createNS('image');\r\n this.innerElem.setAttribute('width', this.assetData.w + 'px');\r\n this.innerElem.setAttribute('height', this.assetData.h + 'px');\r\n this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);\r\n this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);\r\n this.layerElement.appendChild(this.innerElem);\r\n };\r\n\r\n IImageElement.prototype.sourceRectAtTime = function () {\r\n return this.sourceRect;\r\n };\r\n\r\n function ProcessedElement(element, position) {\r\n this.elem = element;\r\n this.pos = position;\r\n }\r\n\r\n function IShapeElement() {}\r\n\r\n IShapeElement.prototype = {\r\n addShapeToModifiers: function addShapeToModifiers(data) {\r\n var i;\r\n var len = this.shapeModifiers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.shapeModifiers[i].addShape(data);\r\n }\r\n },\r\n isShapeInAnimatedModifiers: function isShapeInAnimatedModifiers(data) {\r\n var i = 0;\r\n var len = this.shapeModifiers.length;\r\n\r\n while (i < len) {\r\n if (this.shapeModifiers[i].isAnimatedWithShape(data)) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n renderModifiers: function renderModifiers() {\r\n if (!this.shapeModifiers.length) {\r\n return;\r\n }\r\n\r\n var i;\r\n var len = this.shapes.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.shapes[i].sh.reset();\r\n }\r\n\r\n len = this.shapeModifiers.length;\r\n var shouldBreakProcess;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame); // workaround to fix cases where a repeater resets the shape so the following processes get called twice\r\n // TODO: find a better solution for this\r\n\r\n if (shouldBreakProcess) {\r\n break;\r\n }\r\n }\r\n },\r\n searchProcessedElement: function searchProcessedElement(elem) {\r\n var elements = this.processedElements;\r\n var i = 0;\r\n var len = elements.length;\r\n\r\n while (i < len) {\r\n if (elements[i].elem === elem) {\r\n return elements[i].pos;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return 0;\r\n },\r\n addProcessedElement: function addProcessedElement(elem, pos) {\r\n var elements = this.processedElements;\r\n var i = elements.length;\r\n\r\n while (i) {\r\n i -= 1;\r\n\r\n if (elements[i].elem === elem) {\r\n elements[i].pos = pos;\r\n return;\r\n }\r\n }\r\n\r\n elements.push(new ProcessedElement(elem, pos));\r\n },\r\n prepareFrame: function prepareFrame(num) {\r\n this.prepareRenderableFrame(num);\r\n this.prepareProperties(num, this.isInRange);\r\n }\r\n };\r\n\r\n var lineCapEnum = {\r\n 1: 'butt',\r\n 2: 'round',\r\n 3: 'square'\r\n };\r\n var lineJoinEnum = {\r\n 1: 'miter',\r\n 2: 'round',\r\n 3: 'bevel'\r\n };\r\n\r\n function SVGShapeData(transformers, level, shape) {\r\n this.caches = [];\r\n this.styles = [];\r\n this.transformers = transformers;\r\n this.lStr = '';\r\n this.sh = shape;\r\n this.lvl = level; // TODO find if there are some cases where _isAnimated can be false.\r\n // For now, since shapes add up with other shapes. They have to be calculated every time.\r\n // One way of finding out is checking if all styles associated to this shape depend only of this shape\r\n\r\n this._isAnimated = !!shape.k; // TODO: commenting this for now since all shapes are animated\r\n\r\n var i = 0;\r\n var len = transformers.length;\r\n\r\n while (i < len) {\r\n if (transformers[i].mProps.dynamicProperties.length) {\r\n this._isAnimated = true;\r\n break;\r\n }\r\n\r\n i += 1;\r\n }\r\n }\r\n\r\n SVGShapeData.prototype.setAsAnimated = function () {\r\n this._isAnimated = true;\r\n };\r\n\r\n function SVGStyleData(data, level) {\r\n this.data = data;\r\n this.type = data.ty;\r\n this.d = '';\r\n this.lvl = level;\r\n this._mdf = false;\r\n this.closed = data.hd === true;\r\n this.pElem = createNS('path');\r\n this.msElem = null;\r\n }\r\n\r\n SVGStyleData.prototype.reset = function () {\r\n this.d = '';\r\n this._mdf = false;\r\n };\r\n\r\n function DashProperty(elem, data, renderer, container) {\r\n this.elem = elem;\r\n this.frameId = -1;\r\n this.dataProps = createSizedArray(data.length);\r\n this.renderer = renderer;\r\n this.k = false;\r\n this.dashStr = '';\r\n this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);\r\n this.dashoffset = createTypedArray('float32', 1);\r\n this.initDynamicPropertyContainer(container);\r\n var i;\r\n var len = data.length || 0;\r\n var prop;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);\r\n this.k = prop.k || this.k;\r\n this.dataProps[i] = {\r\n n: data[i].n,\r\n p: prop\r\n };\r\n }\r\n\r\n if (!this.k) {\r\n this.getValue(true);\r\n }\r\n\r\n this._isAnimated = this.k;\r\n }\r\n\r\n DashProperty.prototype.getValue = function (forceRender) {\r\n if (this.elem.globalData.frameId === this.frameId && !forceRender) {\r\n return;\r\n }\r\n\r\n this.frameId = this.elem.globalData.frameId;\r\n this.iterateDynamicProperties();\r\n this._mdf = this._mdf || forceRender;\r\n\r\n if (this._mdf) {\r\n var i = 0;\r\n var len = this.dataProps.length;\r\n\r\n if (this.renderer === 'svg') {\r\n this.dashStr = '';\r\n }\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.dataProps[i].n !== 'o') {\r\n if (this.renderer === 'svg') {\r\n this.dashStr += ' ' + this.dataProps[i].p.v;\r\n } else {\r\n this.dashArray[i] = this.dataProps[i].p.v;\r\n }\r\n } else {\r\n this.dashoffset[0] = this.dataProps[i].p.v;\r\n }\r\n }\r\n }\r\n };\r\n\r\n extendPrototype([DynamicPropertyContainer], DashProperty);\r\n\r\n function SVGStrokeStyleData(elem, data, styleOb) {\r\n this.initDynamicPropertyContainer(elem);\r\n this.getValue = this.iterateDynamicProperties;\r\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\r\n this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);\r\n this.d = new DashProperty(elem, data.d || {}, 'svg', this);\r\n this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);\r\n this.style = styleOb;\r\n this._isAnimated = !!this._isAnimated;\r\n }\r\n\r\n extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);\r\n\r\n function SVGFillStyleData(elem, data, styleOb) {\r\n this.initDynamicPropertyContainer(elem);\r\n this.getValue = this.iterateDynamicProperties;\r\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\r\n this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);\r\n this.style = styleOb;\r\n }\r\n\r\n extendPrototype([DynamicPropertyContainer], SVGFillStyleData);\r\n\r\n function SVGNoStyleData(elem, data, styleOb) {\r\n this.initDynamicPropertyContainer(elem);\r\n this.getValue = this.iterateDynamicProperties;\r\n this.style = styleOb;\r\n }\r\n\r\n extendPrototype([DynamicPropertyContainer], SVGNoStyleData);\r\n\r\n function GradientProperty(elem, data, container) {\r\n this.data = data;\r\n this.c = createTypedArray('uint8c', data.p * 4);\r\n var cLength = data.k.k[0].s ? data.k.k[0].s.length - data.p * 4 : data.k.k.length - data.p * 4;\r\n this.o = createTypedArray('float32', cLength);\r\n this._cmdf = false;\r\n this._omdf = false;\r\n this._collapsable = this.checkCollapsable();\r\n this._hasOpacity = cLength;\r\n this.initDynamicPropertyContainer(container);\r\n this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);\r\n this.k = this.prop.k;\r\n this.getValue(true);\r\n }\r\n\r\n GradientProperty.prototype.comparePoints = function (values, points) {\r\n var i = 0;\r\n var len = this.o.length / 2;\r\n var diff;\r\n\r\n while (i < len) {\r\n diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);\r\n\r\n if (diff > 0.01) {\r\n return false;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n GradientProperty.prototype.checkCollapsable = function () {\r\n if (this.o.length / 2 !== this.c.length / 4) {\r\n return false;\r\n }\r\n\r\n if (this.data.k.k[0].s) {\r\n var i = 0;\r\n var len = this.data.k.k.length;\r\n\r\n while (i < len) {\r\n if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {\r\n return false;\r\n }\r\n\r\n i += 1;\r\n }\r\n } else if (!this.comparePoints(this.data.k.k, this.data.p)) {\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n GradientProperty.prototype.getValue = function (forceRender) {\r\n this.prop.getValue();\r\n this._mdf = false;\r\n this._cmdf = false;\r\n this._omdf = false;\r\n\r\n if (this.prop._mdf || forceRender) {\r\n var i;\r\n var len = this.data.p * 4;\r\n var mult;\r\n var val;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n mult = i % 4 === 0 ? 100 : 255;\r\n val = Math.round(this.prop.v[i] * mult);\r\n\r\n if (this.c[i] !== val) {\r\n this.c[i] = val;\r\n this._cmdf = !forceRender;\r\n }\r\n }\r\n\r\n if (this.o.length) {\r\n len = this.prop.v.length;\r\n\r\n for (i = this.data.p * 4; i < len; i += 1) {\r\n mult = i % 2 === 0 ? 100 : 1;\r\n val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];\r\n\r\n if (this.o[i - this.data.p * 4] !== val) {\r\n this.o[i - this.data.p * 4] = val;\r\n this._omdf = !forceRender;\r\n }\r\n }\r\n }\r\n\r\n this._mdf = !forceRender;\r\n }\r\n };\r\n\r\n extendPrototype([DynamicPropertyContainer], GradientProperty);\r\n\r\n function SVGGradientFillStyleData(elem, data, styleOb) {\r\n this.initDynamicPropertyContainer(elem);\r\n this.getValue = this.iterateDynamicProperties;\r\n this.initGradientData(elem, data, styleOb);\r\n }\r\n\r\n SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {\r\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\r\n this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);\r\n this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);\r\n this.h = PropertyFactory.getProp(elem, data.h || {\r\n k: 0\r\n }, 0, 0.01, this);\r\n this.a = PropertyFactory.getProp(elem, data.a || {\r\n k: 0\r\n }, 0, degToRads, this);\r\n this.g = new GradientProperty(elem, data.g, this);\r\n this.style = styleOb;\r\n this.stops = [];\r\n this.setGradientData(styleOb.pElem, data);\r\n this.setGradientOpacity(data, styleOb);\r\n this._isAnimated = !!this._isAnimated;\r\n };\r\n\r\n SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {\r\n var gradientId = createElementID();\r\n var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');\r\n gfill.setAttribute('id', gradientId);\r\n gfill.setAttribute('spreadMethod', 'pad');\r\n gfill.setAttribute('gradientUnits', 'userSpaceOnUse');\r\n var stops = [];\r\n var stop;\r\n var j;\r\n var jLen;\r\n jLen = data.g.p * 4;\r\n\r\n for (j = 0; j < jLen; j += 4) {\r\n stop = createNS('stop');\r\n gfill.appendChild(stop);\r\n stops.push(stop);\r\n }\r\n\r\n pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + gradientId + ')');\r\n this.gf = gfill;\r\n this.cst = stops;\r\n };\r\n\r\n SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {\r\n if (this.g._hasOpacity && !this.g._collapsable) {\r\n var stop;\r\n var j;\r\n var jLen;\r\n var mask = createNS('mask');\r\n var maskElement = createNS('path');\r\n mask.appendChild(maskElement);\r\n var opacityId = createElementID();\r\n var maskId = createElementID();\r\n mask.setAttribute('id', maskId);\r\n var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');\r\n opFill.setAttribute('id', opacityId);\r\n opFill.setAttribute('spreadMethod', 'pad');\r\n opFill.setAttribute('gradientUnits', 'userSpaceOnUse');\r\n jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;\r\n var stops = this.stops;\r\n\r\n for (j = data.g.p * 4; j < jLen; j += 2) {\r\n stop = createNS('stop');\r\n stop.setAttribute('stop-color', 'rgb(255,255,255)');\r\n opFill.appendChild(stop);\r\n stops.push(stop);\r\n }\r\n\r\n maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + opacityId + ')');\r\n\r\n if (data.ty === 'gs') {\r\n maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);\r\n maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);\r\n\r\n if (data.lj === 1) {\r\n maskElement.setAttribute('stroke-miterlimit', data.ml);\r\n }\r\n }\r\n\r\n this.of = opFill;\r\n this.ms = mask;\r\n this.ost = stops;\r\n this.maskId = maskId;\r\n styleOb.msElem = maskElement;\r\n }\r\n };\r\n\r\n extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);\r\n\r\n function SVGGradientStrokeStyleData(elem, data, styleOb) {\r\n this.initDynamicPropertyContainer(elem);\r\n this.getValue = this.iterateDynamicProperties;\r\n this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);\r\n this.d = new DashProperty(elem, data.d || {}, 'svg', this);\r\n this.initGradientData(elem, data, styleOb);\r\n this._isAnimated = !!this._isAnimated;\r\n }\r\n\r\n extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);\r\n\r\n function ShapeGroupData() {\r\n this.it = [];\r\n this.prevViewData = [];\r\n this.gr = createNS('g');\r\n }\r\n\r\n function SVGTransformData(mProps, op, container) {\r\n this.transform = {\r\n mProps: mProps,\r\n op: op,\r\n container: container\r\n };\r\n this.elements = [];\r\n this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;\r\n }\r\n\r\n var buildShapeString = function buildShapeString(pathNodes, length, closed, mat) {\r\n if (length === 0) {\r\n return '';\r\n }\r\n\r\n var _o = pathNodes.o;\r\n var _i = pathNodes.i;\r\n var _v = pathNodes.v;\r\n var i;\r\n var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);\r\n\r\n for (i = 1; i < length; i += 1) {\r\n shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[i][0], _i[i][1]) + ' ' + mat.applyToPointStringified(_v[i][0], _v[i][1]);\r\n }\r\n\r\n if (closed && length) {\r\n shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[0][0], _i[0][1]) + ' ' + mat.applyToPointStringified(_v[0][0], _v[0][1]);\r\n shapeString += 'z';\r\n }\r\n\r\n return shapeString;\r\n };\r\n\r\n var SVGElementsRenderer = function () {\r\n var _identityMatrix = new Matrix();\r\n\r\n var _matrixHelper = new Matrix();\r\n\r\n var ob = {\r\n createRenderFunction: createRenderFunction\r\n };\r\n\r\n function createRenderFunction(data) {\r\n switch (data.ty) {\r\n case 'fl':\r\n return renderFill;\r\n\r\n case 'gf':\r\n return renderGradient;\r\n\r\n case 'gs':\r\n return renderGradientStroke;\r\n\r\n case 'st':\r\n return renderStroke;\r\n\r\n case 'sh':\r\n case 'el':\r\n case 'rc':\r\n case 'sr':\r\n return renderPath;\r\n\r\n case 'tr':\r\n return renderContentTransform;\r\n\r\n case 'no':\r\n return renderNoop;\r\n\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n function renderContentTransform(styleData, itemData, isFirstFrame) {\r\n if (isFirstFrame || itemData.transform.op._mdf) {\r\n itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);\r\n }\r\n\r\n if (isFirstFrame || itemData.transform.mProps._mdf) {\r\n itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());\r\n }\r\n }\r\n\r\n function renderNoop() {}\r\n\r\n function renderPath(styleData, itemData, isFirstFrame) {\r\n var j;\r\n var jLen;\r\n var pathStringTransformed;\r\n var redraw;\r\n var pathNodes;\r\n var l;\r\n var lLen = itemData.styles.length;\r\n var lvl = itemData.lvl;\r\n var paths;\r\n var mat;\r\n var props;\r\n var iterations;\r\n var k;\r\n\r\n for (l = 0; l < lLen; l += 1) {\r\n redraw = itemData.sh._mdf || isFirstFrame;\r\n\r\n if (itemData.styles[l].lvl < lvl) {\r\n mat = _matrixHelper.reset();\r\n iterations = lvl - itemData.styles[l].lvl;\r\n k = itemData.transformers.length - 1;\r\n\r\n while (!redraw && iterations > 0) {\r\n redraw = itemData.transformers[k].mProps._mdf || redraw;\r\n iterations -= 1;\r\n k -= 1;\r\n }\r\n\r\n if (redraw) {\r\n iterations = lvl - itemData.styles[l].lvl;\r\n k = itemData.transformers.length - 1;\r\n\r\n while (iterations > 0) {\r\n props = itemData.transformers[k].mProps.v.props;\r\n mat.transform(props[0], props[1], props[2], props[3], props[4], props[5], props[6], props[7], props[8], props[9], props[10], props[11], props[12], props[13], props[14], props[15]);\r\n iterations -= 1;\r\n k -= 1;\r\n }\r\n }\r\n } else {\r\n mat = _identityMatrix;\r\n }\r\n\r\n paths = itemData.sh.paths;\r\n jLen = paths._length;\r\n\r\n if (redraw) {\r\n pathStringTransformed = '';\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n pathNodes = paths.shapes[j];\r\n\r\n if (pathNodes && pathNodes._length) {\r\n pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);\r\n }\r\n }\r\n\r\n itemData.caches[l] = pathStringTransformed;\r\n } else {\r\n pathStringTransformed = itemData.caches[l];\r\n }\r\n\r\n itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;\r\n itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;\r\n }\r\n }\r\n\r\n function renderFill(styleData, itemData, isFirstFrame) {\r\n var styleElem = itemData.style;\r\n\r\n if (itemData.c._mdf || isFirstFrame) {\r\n styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');\r\n }\r\n\r\n if (itemData.o._mdf || isFirstFrame) {\r\n styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);\r\n }\r\n }\r\n\r\n function renderGradientStroke(styleData, itemData, isFirstFrame) {\r\n renderGradient(styleData, itemData, isFirstFrame);\r\n renderStroke(styleData, itemData, isFirstFrame);\r\n }\r\n\r\n function renderGradient(styleData, itemData, isFirstFrame) {\r\n var gfill = itemData.gf;\r\n var hasOpacity = itemData.g._hasOpacity;\r\n var pt1 = itemData.s.v;\r\n var pt2 = itemData.e.v;\r\n\r\n if (itemData.o._mdf || isFirstFrame) {\r\n var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';\r\n itemData.style.pElem.setAttribute(attr, itemData.o.v);\r\n }\r\n\r\n if (itemData.s._mdf || isFirstFrame) {\r\n var attr1 = styleData.t === 1 ? 'x1' : 'cx';\r\n var attr2 = attr1 === 'x1' ? 'y1' : 'cy';\r\n gfill.setAttribute(attr1, pt1[0]);\r\n gfill.setAttribute(attr2, pt1[1]);\r\n\r\n if (hasOpacity && !itemData.g._collapsable) {\r\n itemData.of.setAttribute(attr1, pt1[0]);\r\n itemData.of.setAttribute(attr2, pt1[1]);\r\n }\r\n }\r\n\r\n var stops;\r\n var i;\r\n var len;\r\n var stop;\r\n\r\n if (itemData.g._cmdf || isFirstFrame) {\r\n stops = itemData.cst;\r\n var cValues = itemData.g.c;\r\n len = stops.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n stop = stops[i];\r\n stop.setAttribute('offset', cValues[i * 4] + '%');\r\n stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');\r\n }\r\n }\r\n\r\n if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {\r\n var oValues = itemData.g.o;\r\n\r\n if (itemData.g._collapsable) {\r\n stops = itemData.cst;\r\n } else {\r\n stops = itemData.ost;\r\n }\r\n\r\n len = stops.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n stop = stops[i];\r\n\r\n if (!itemData.g._collapsable) {\r\n stop.setAttribute('offset', oValues[i * 2] + '%');\r\n }\r\n\r\n stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);\r\n }\r\n }\r\n\r\n if (styleData.t === 1) {\r\n if (itemData.e._mdf || isFirstFrame) {\r\n gfill.setAttribute('x2', pt2[0]);\r\n gfill.setAttribute('y2', pt2[1]);\r\n\r\n if (hasOpacity && !itemData.g._collapsable) {\r\n itemData.of.setAttribute('x2', pt2[0]);\r\n itemData.of.setAttribute('y2', pt2[1]);\r\n }\r\n }\r\n } else {\r\n var rad;\r\n\r\n if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {\r\n rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\r\n gfill.setAttribute('r', rad);\r\n\r\n if (hasOpacity && !itemData.g._collapsable) {\r\n itemData.of.setAttribute('r', rad);\r\n }\r\n }\r\n\r\n if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {\r\n if (!rad) {\r\n rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\r\n }\r\n\r\n var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);\r\n var percent = itemData.h.v;\r\n\r\n if (percent >= 1) {\r\n percent = 0.99;\r\n } else if (percent <= -1) {\r\n percent = -0.99;\r\n }\r\n\r\n var dist = rad * percent;\r\n var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];\r\n var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];\r\n gfill.setAttribute('fx', x);\r\n gfill.setAttribute('fy', y);\r\n\r\n if (hasOpacity && !itemData.g._collapsable) {\r\n itemData.of.setAttribute('fx', x);\r\n itemData.of.setAttribute('fy', y);\r\n }\r\n } // gfill.setAttribute('fy','200');\r\n\r\n }\r\n }\r\n\r\n function renderStroke(styleData, itemData, isFirstFrame) {\r\n var styleElem = itemData.style;\r\n var d = itemData.d;\r\n\r\n if (d && (d._mdf || isFirstFrame) && d.dashStr) {\r\n styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);\r\n styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);\r\n }\r\n\r\n if (itemData.c && (itemData.c._mdf || isFirstFrame)) {\r\n styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');\r\n }\r\n\r\n if (itemData.o._mdf || isFirstFrame) {\r\n styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);\r\n }\r\n\r\n if (itemData.w._mdf || isFirstFrame) {\r\n styleElem.pElem.setAttribute('stroke-width', itemData.w.v);\r\n\r\n if (styleElem.msElem) {\r\n styleElem.msElem.setAttribute('stroke-width', itemData.w.v);\r\n }\r\n }\r\n }\r\n\r\n return ob;\r\n }();\r\n\r\n function SVGShapeElement(data, globalData, comp) {\r\n // List of drawable elements\r\n this.shapes = []; // Full shape data\r\n\r\n this.shapesData = data.shapes; // List of styles that will be applied to shapes\r\n\r\n this.stylesList = []; // List of modifiers that will be applied to shapes\r\n\r\n this.shapeModifiers = []; // List of items in shape tree\r\n\r\n this.itemsData = []; // List of items in previous shape tree\r\n\r\n this.processedElements = []; // List of animated components\r\n\r\n this.animatedContents = [];\r\n this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\r\n // List of elements that have been created\r\n\r\n this.prevViewData = []; // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);\r\n\r\n SVGShapeElement.prototype.initSecondaryElement = function () {};\r\n\r\n SVGShapeElement.prototype.identityMatrix = new Matrix();\r\n\r\n SVGShapeElement.prototype.buildExpressionInterface = function () {};\r\n\r\n SVGShapeElement.prototype.createContent = function () {\r\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);\r\n this.filterUniqueShapes();\r\n };\r\n /*\r\n This method searches for multiple shapes that affect a single element and one of them is animated\r\n */\r\n\r\n\r\n SVGShapeElement.prototype.filterUniqueShapes = function () {\r\n var i;\r\n var len = this.shapes.length;\r\n var shape;\r\n var j;\r\n var jLen = this.stylesList.length;\r\n var style;\r\n var tempShapes = [];\r\n var areAnimated = false;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n style = this.stylesList[j];\r\n areAnimated = false;\r\n tempShapes.length = 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n shape = this.shapes[i];\r\n\r\n if (shape.styles.indexOf(style) !== -1) {\r\n tempShapes.push(shape);\r\n areAnimated = shape._isAnimated || areAnimated;\r\n }\r\n }\r\n\r\n if (tempShapes.length > 1 && areAnimated) {\r\n this.setShapesAsAnimated(tempShapes);\r\n }\r\n }\r\n };\r\n\r\n SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {\r\n var i;\r\n var len = shapes.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n shapes[i].setAsAnimated();\r\n }\r\n };\r\n\r\n SVGShapeElement.prototype.createStyleElement = function (data, level) {\r\n // TODO: prevent drawing of hidden styles\r\n var elementData;\r\n var styleOb = new SVGStyleData(data, level);\r\n var pathElement = styleOb.pElem;\r\n\r\n if (data.ty === 'st') {\r\n elementData = new SVGStrokeStyleData(this, data, styleOb);\r\n } else if (data.ty === 'fl') {\r\n elementData = new SVGFillStyleData(this, data, styleOb);\r\n } else if (data.ty === 'gf' || data.ty === 'gs') {\r\n var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;\r\n elementData = new GradientConstructor(this, data, styleOb);\r\n this.globalData.defs.appendChild(elementData.gf);\r\n\r\n if (elementData.maskId) {\r\n this.globalData.defs.appendChild(elementData.ms);\r\n this.globalData.defs.appendChild(elementData.of);\r\n pathElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + elementData.maskId + ')');\r\n }\r\n } else if (data.ty === 'no') {\r\n elementData = new SVGNoStyleData(this, data, styleOb);\r\n }\r\n\r\n if (data.ty === 'st' || data.ty === 'gs') {\r\n pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);\r\n pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);\r\n pathElement.setAttribute('fill-opacity', '0');\r\n\r\n if (data.lj === 1) {\r\n pathElement.setAttribute('stroke-miterlimit', data.ml);\r\n }\r\n }\r\n\r\n if (data.r === 2) {\r\n pathElement.setAttribute('fill-rule', 'evenodd');\r\n }\r\n\r\n if (data.ln) {\r\n pathElement.setAttribute('id', data.ln);\r\n }\r\n\r\n if (data.cl) {\r\n pathElement.setAttribute('class', data.cl);\r\n }\r\n\r\n if (data.bm) {\r\n pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);\r\n }\r\n\r\n this.stylesList.push(styleOb);\r\n this.addToAnimatedContents(data, elementData);\r\n return elementData;\r\n };\r\n\r\n SVGShapeElement.prototype.createGroupElement = function (data) {\r\n var elementData = new ShapeGroupData();\r\n\r\n if (data.ln) {\r\n elementData.gr.setAttribute('id', data.ln);\r\n }\r\n\r\n if (data.cl) {\r\n elementData.gr.setAttribute('class', data.cl);\r\n }\r\n\r\n if (data.bm) {\r\n elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);\r\n }\r\n\r\n return elementData;\r\n };\r\n\r\n SVGShapeElement.prototype.createTransformElement = function (data, container) {\r\n var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);\r\n var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);\r\n this.addToAnimatedContents(data, elementData);\r\n return elementData;\r\n };\r\n\r\n SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {\r\n var ty = 4;\r\n\r\n if (data.ty === 'rc') {\r\n ty = 5;\r\n } else if (data.ty === 'el') {\r\n ty = 6;\r\n } else if (data.ty === 'sr') {\r\n ty = 7;\r\n }\r\n\r\n var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);\r\n var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);\r\n this.shapes.push(elementData);\r\n this.addShapeToModifiers(elementData);\r\n this.addToAnimatedContents(data, elementData);\r\n return elementData;\r\n };\r\n\r\n SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {\r\n var i = 0;\r\n var len = this.animatedContents.length;\r\n\r\n while (i < len) {\r\n if (this.animatedContents[i].element === element) {\r\n return;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n this.animatedContents.push({\r\n fn: SVGElementsRenderer.createRenderFunction(data),\r\n element: element,\r\n data: data\r\n });\r\n };\r\n\r\n SVGShapeElement.prototype.setElementStyles = function (elementData) {\r\n var arr = elementData.styles;\r\n var j;\r\n var jLen = this.stylesList.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n if (!this.stylesList[j].closed) {\r\n arr.push(this.stylesList[j]);\r\n }\r\n }\r\n };\r\n\r\n SVGShapeElement.prototype.reloadShapes = function () {\r\n this._isFirstFrame = true;\r\n var i;\r\n var len = this.itemsData.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.prevViewData[i] = this.itemsData[i];\r\n }\r\n\r\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);\r\n this.filterUniqueShapes();\r\n len = this.dynamicProperties.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.dynamicProperties[i].getValue();\r\n }\r\n\r\n this.renderModifiers();\r\n };\r\n\r\n SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {\r\n var ownTransformers = [].concat(transformers);\r\n var i;\r\n var len = arr.length - 1;\r\n var j;\r\n var jLen;\r\n var ownStyles = [];\r\n var ownModifiers = [];\r\n var currentTransform;\r\n var modifier;\r\n var processedPos;\r\n\r\n for (i = len; i >= 0; i -= 1) {\r\n processedPos = this.searchProcessedElement(arr[i]);\r\n\r\n if (!processedPos) {\r\n arr[i]._render = render;\r\n } else {\r\n itemsData[i] = prevViewData[processedPos - 1];\r\n }\r\n\r\n if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs' || arr[i].ty === 'no') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createStyleElement(arr[i], level);\r\n } else {\r\n itemsData[i].style.closed = false;\r\n }\r\n\r\n if (arr[i]._render) {\r\n if (itemsData[i].style.pElem.parentNode !== container) {\r\n container.appendChild(itemsData[i].style.pElem);\r\n }\r\n }\r\n\r\n ownStyles.push(itemsData[i].style);\r\n } else if (arr[i].ty === 'gr') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createGroupElement(arr[i]);\r\n } else {\r\n jLen = itemsData[i].it.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n itemsData[i].prevViewData[j] = itemsData[i].it[j];\r\n }\r\n }\r\n\r\n this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);\r\n\r\n if (arr[i]._render) {\r\n if (itemsData[i].gr.parentNode !== container) {\r\n container.appendChild(itemsData[i].gr);\r\n }\r\n }\r\n } else if (arr[i].ty === 'tr') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createTransformElement(arr[i], container);\r\n }\r\n\r\n currentTransform = itemsData[i].transform;\r\n ownTransformers.push(currentTransform);\r\n } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);\r\n }\r\n\r\n this.setElementStyles(itemsData[i]);\r\n } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb' || arr[i].ty === 'zz' || arr[i].ty === 'op') {\r\n if (!processedPos) {\r\n modifier = ShapeModifiers.getModifier(arr[i].ty);\r\n modifier.init(this, arr[i]);\r\n itemsData[i] = modifier;\r\n this.shapeModifiers.push(modifier);\r\n } else {\r\n modifier = itemsData[i];\r\n modifier.closed = false;\r\n }\r\n\r\n ownModifiers.push(modifier);\r\n } else if (arr[i].ty === 'rp') {\r\n if (!processedPos) {\r\n modifier = ShapeModifiers.getModifier(arr[i].ty);\r\n itemsData[i] = modifier;\r\n modifier.init(this, arr, i, itemsData);\r\n this.shapeModifiers.push(modifier);\r\n render = false;\r\n } else {\r\n modifier = itemsData[i];\r\n modifier.closed = true;\r\n }\r\n\r\n ownModifiers.push(modifier);\r\n }\r\n\r\n this.addProcessedElement(arr[i], i + 1);\r\n }\r\n\r\n len = ownStyles.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ownStyles[i].closed = true;\r\n }\r\n\r\n len = ownModifiers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ownModifiers[i].closed = true;\r\n }\r\n };\r\n\r\n SVGShapeElement.prototype.renderInnerContent = function () {\r\n this.renderModifiers();\r\n var i;\r\n var len = this.stylesList.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.stylesList[i].reset();\r\n }\r\n\r\n this.renderShape();\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.stylesList[i]._mdf || this._isFirstFrame) {\r\n if (this.stylesList[i].msElem) {\r\n this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d); // Adding M0 0 fixes same mask bug on all browsers\r\n\r\n this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;\r\n }\r\n\r\n this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');\r\n }\r\n }\r\n };\r\n\r\n SVGShapeElement.prototype.renderShape = function () {\r\n var i;\r\n var len = this.animatedContents.length;\r\n var animatedContent;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n animatedContent = this.animatedContents[i];\r\n\r\n if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {\r\n animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);\r\n }\r\n }\r\n };\r\n\r\n SVGShapeElement.prototype.destroy = function () {\r\n this.destroyBaseElement();\r\n this.shapesData = null;\r\n this.itemsData = null;\r\n };\r\n\r\n function LetterProps(o, sw, sc, fc, m, p) {\r\n this.o = o;\r\n this.sw = sw;\r\n this.sc = sc;\r\n this.fc = fc;\r\n this.m = m;\r\n this.p = p;\r\n this._mdf = {\r\n o: true,\r\n sw: !!sw,\r\n sc: !!sc,\r\n fc: !!fc,\r\n m: true,\r\n p: true\r\n };\r\n }\r\n\r\n LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {\r\n this._mdf.o = false;\r\n this._mdf.sw = false;\r\n this._mdf.sc = false;\r\n this._mdf.fc = false;\r\n this._mdf.m = false;\r\n this._mdf.p = false;\r\n var updated = false;\r\n\r\n if (this.o !== o) {\r\n this.o = o;\r\n this._mdf.o = true;\r\n updated = true;\r\n }\r\n\r\n if (this.sw !== sw) {\r\n this.sw = sw;\r\n this._mdf.sw = true;\r\n updated = true;\r\n }\r\n\r\n if (this.sc !== sc) {\r\n this.sc = sc;\r\n this._mdf.sc = true;\r\n updated = true;\r\n }\r\n\r\n if (this.fc !== fc) {\r\n this.fc = fc;\r\n this._mdf.fc = true;\r\n updated = true;\r\n }\r\n\r\n if (this.m !== m) {\r\n this.m = m;\r\n this._mdf.m = true;\r\n updated = true;\r\n }\r\n\r\n if (p.length && (this.p[0] !== p[0] || this.p[1] !== p[1] || this.p[4] !== p[4] || this.p[5] !== p[5] || this.p[12] !== p[12] || this.p[13] !== p[13])) {\r\n this.p = p;\r\n this._mdf.p = true;\r\n updated = true;\r\n }\r\n\r\n return updated;\r\n };\r\n\r\n function TextProperty(elem, data) {\r\n this._frameId = initialDefaultFrame;\r\n this.pv = '';\r\n this.v = '';\r\n this.kf = false;\r\n this._isFirstFrame = true;\r\n this._mdf = false;\r\n this.data = data;\r\n this.elem = elem;\r\n this.comp = this.elem.comp;\r\n this.keysIndex = 0;\r\n this.canResize = false;\r\n this.minimumFontSize = 1;\r\n this.effectsSequence = [];\r\n this.currentData = {\r\n ascent: 0,\r\n boxWidth: this.defaultBoxWidth,\r\n f: '',\r\n fStyle: '',\r\n fWeight: '',\r\n fc: '',\r\n j: '',\r\n justifyOffset: '',\r\n l: [],\r\n lh: 0,\r\n lineWidths: [],\r\n ls: '',\r\n of: '',\r\n s: '',\r\n sc: '',\r\n sw: 0,\r\n t: 0,\r\n tr: 0,\r\n sz: 0,\r\n ps: null,\r\n fillColorAnim: false,\r\n strokeColorAnim: false,\r\n strokeWidthAnim: false,\r\n yOffset: 0,\r\n finalSize: 0,\r\n finalText: [],\r\n finalLineHeight: 0,\r\n __complete: false\r\n };\r\n this.copyData(this.currentData, this.data.d.k[0].s);\r\n\r\n if (!this.searchProperty()) {\r\n this.completeTextData(this.currentData);\r\n }\r\n }\r\n\r\n TextProperty.prototype.defaultBoxWidth = [0, 0];\r\n\r\n TextProperty.prototype.copyData = function (obj, data) {\r\n for (var s in data) {\r\n if (Object.prototype.hasOwnProperty.call(data, s)) {\r\n obj[s] = data[s];\r\n }\r\n }\r\n\r\n return obj;\r\n };\r\n\r\n TextProperty.prototype.setCurrentData = function (data) {\r\n if (!data.__complete) {\r\n this.completeTextData(data);\r\n }\r\n\r\n this.currentData = data;\r\n this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;\r\n this._mdf = true;\r\n };\r\n\r\n TextProperty.prototype.searchProperty = function () {\r\n return this.searchKeyframes();\r\n };\r\n\r\n TextProperty.prototype.searchKeyframes = function () {\r\n this.kf = this.data.d.k.length > 1;\r\n\r\n if (this.kf) {\r\n this.addEffect(this.getKeyframeValue.bind(this));\r\n }\r\n\r\n return this.kf;\r\n };\r\n\r\n TextProperty.prototype.addEffect = function (effectFunction) {\r\n this.effectsSequence.push(effectFunction);\r\n this.elem.addDynamicProperty(this);\r\n };\r\n\r\n TextProperty.prototype.getValue = function (_finalValue) {\r\n if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {\r\n return;\r\n }\r\n\r\n this.currentData.t = this.data.d.k[this.keysIndex].s.t;\r\n var currentValue = this.currentData;\r\n var currentIndex = this.keysIndex;\r\n\r\n if (this.lock) {\r\n this.setCurrentData(this.currentData);\r\n return;\r\n }\r\n\r\n this.lock = true;\r\n this._mdf = false;\r\n var i;\r\n var len = this.effectsSequence.length;\r\n var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n // Checking if index changed to prevent creating a new object every time the expression updates.\r\n if (currentIndex !== this.keysIndex) {\r\n finalValue = this.effectsSequence[i](finalValue, finalValue.t);\r\n } else {\r\n finalValue = this.effectsSequence[i](this.currentData, finalValue.t);\r\n }\r\n }\r\n\r\n if (currentValue !== finalValue) {\r\n this.setCurrentData(finalValue);\r\n }\r\n\r\n this.v = this.currentData;\r\n this.pv = this.v;\r\n this.lock = false;\r\n this.frameId = this.elem.globalData.frameId;\r\n };\r\n\r\n TextProperty.prototype.getKeyframeValue = function () {\r\n var textKeys = this.data.d.k;\r\n var frameNum = this.elem.comp.renderedFrame;\r\n var i = 0;\r\n var len = textKeys.length;\r\n\r\n while (i <= len - 1) {\r\n if (i === len - 1 || textKeys[i + 1].t > frameNum) {\r\n break;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n if (this.keysIndex !== i) {\r\n this.keysIndex = i;\r\n }\r\n\r\n return this.data.d.k[this.keysIndex].s;\r\n };\r\n\r\n TextProperty.prototype.buildFinalText = function (text) {\r\n var charactersArray = [];\r\n var i = 0;\r\n var len = text.length;\r\n var charCode;\r\n var secondCharCode;\r\n var shouldCombine = false;\r\n\r\n while (i < len) {\r\n charCode = text.charCodeAt(i);\r\n\r\n if (FontManager.isCombinedCharacter(charCode)) {\r\n charactersArray[charactersArray.length - 1] += text.charAt(i);\r\n } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {\r\n secondCharCode = text.charCodeAt(i + 1);\r\n\r\n if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {\r\n if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {\r\n charactersArray[charactersArray.length - 1] += text.substr(i, 2);\r\n shouldCombine = false;\r\n } else {\r\n charactersArray.push(text.substr(i, 2));\r\n }\r\n\r\n i += 1;\r\n } else {\r\n charactersArray.push(text.charAt(i));\r\n }\r\n } else if (charCode > 0xDBFF) {\r\n secondCharCode = text.charCodeAt(i + 1);\r\n\r\n if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {\r\n shouldCombine = true;\r\n charactersArray[charactersArray.length - 1] += text.substr(i, 2);\r\n i += 1;\r\n } else {\r\n charactersArray.push(text.charAt(i));\r\n }\r\n } else if (FontManager.isZeroWidthJoiner(charCode)) {\r\n charactersArray[charactersArray.length - 1] += text.charAt(i);\r\n shouldCombine = true;\r\n } else {\r\n charactersArray.push(text.charAt(i));\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return charactersArray;\r\n };\r\n\r\n TextProperty.prototype.completeTextData = function (documentData) {\r\n documentData.__complete = true;\r\n var fontManager = this.elem.globalData.fontManager;\r\n var data = this.data;\r\n var letters = [];\r\n var i;\r\n var len;\r\n var newLineFlag;\r\n var index = 0;\r\n var val;\r\n var anchorGrouping = data.m.g;\r\n var currentSize = 0;\r\n var currentPos = 0;\r\n var currentLine = 0;\r\n var lineWidths = [];\r\n var lineWidth = 0;\r\n var maxLineWidth = 0;\r\n var j;\r\n var jLen;\r\n var fontData = fontManager.getFontByName(documentData.f);\r\n var charData;\r\n var cLength = 0;\r\n var fontProps = getFontProperties(fontData);\r\n documentData.fWeight = fontProps.weight;\r\n documentData.fStyle = fontProps.style;\r\n documentData.finalSize = documentData.s;\r\n documentData.finalText = this.buildFinalText(documentData.t);\r\n len = documentData.finalText.length;\r\n documentData.finalLineHeight = documentData.lh;\r\n var trackingOffset = documentData.tr / 1000 * documentData.finalSize;\r\n var charCode;\r\n\r\n if (documentData.sz) {\r\n var flag = true;\r\n var boxWidth = documentData.sz[0];\r\n var boxHeight = documentData.sz[1];\r\n var currentHeight;\r\n var finalText;\r\n\r\n while (flag) {\r\n finalText = this.buildFinalText(documentData.t);\r\n currentHeight = 0;\r\n lineWidth = 0;\r\n len = finalText.length;\r\n trackingOffset = documentData.tr / 1000 * documentData.finalSize;\r\n var lastSpaceIndex = -1;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n charCode = finalText[i].charCodeAt(0);\r\n newLineFlag = false;\r\n\r\n if (finalText[i] === ' ') {\r\n lastSpaceIndex = i;\r\n } else if (charCode === 13 || charCode === 3) {\r\n lineWidth = 0;\r\n newLineFlag = true;\r\n currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;\r\n }\r\n\r\n if (fontManager.chars) {\r\n charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);\r\n cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;\r\n } else {\r\n // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;\r\n cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);\r\n }\r\n\r\n if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {\r\n if (lastSpaceIndex === -1) {\r\n len += 1;\r\n } else {\r\n i = lastSpaceIndex;\r\n }\r\n\r\n currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;\r\n finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\\r'); // finalText = finalText.substr(0,i) + \"\\r\" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);\r\n\r\n lastSpaceIndex = -1;\r\n lineWidth = 0;\r\n } else {\r\n lineWidth += cLength;\r\n lineWidth += trackingOffset;\r\n }\r\n }\r\n\r\n currentHeight += fontData.ascent * documentData.finalSize / 100;\r\n\r\n if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {\r\n documentData.finalSize -= 1;\r\n documentData.finalLineHeight = documentData.finalSize * documentData.lh / documentData.s;\r\n } else {\r\n documentData.finalText = finalText;\r\n len = documentData.finalText.length;\r\n flag = false;\r\n }\r\n }\r\n }\r\n\r\n lineWidth = -trackingOffset;\r\n cLength = 0;\r\n var uncollapsedSpaces = 0;\r\n var currentChar;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n newLineFlag = false;\r\n currentChar = documentData.finalText[i];\r\n charCode = currentChar.charCodeAt(0);\r\n\r\n if (charCode === 13 || charCode === 3) {\r\n uncollapsedSpaces = 0;\r\n lineWidths.push(lineWidth);\r\n maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;\r\n lineWidth = -2 * trackingOffset;\r\n val = '';\r\n newLineFlag = true;\r\n currentLine += 1;\r\n } else {\r\n val = currentChar;\r\n }\r\n\r\n if (fontManager.chars) {\r\n charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);\r\n cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;\r\n } else {\r\n // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);\r\n // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;\r\n cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);\r\n } //\r\n\r\n\r\n if (currentChar === ' ') {\r\n uncollapsedSpaces += cLength + trackingOffset;\r\n } else {\r\n lineWidth += cLength + trackingOffset + uncollapsedSpaces;\r\n uncollapsedSpaces = 0;\r\n }\r\n\r\n letters.push({\r\n l: cLength,\r\n an: cLength,\r\n add: currentSize,\r\n n: newLineFlag,\r\n anIndexes: [],\r\n val: val,\r\n line: currentLine,\r\n animatorJustifyOffset: 0\r\n });\r\n\r\n if (anchorGrouping == 2) {\r\n // eslint-disable-line eqeqeq\r\n currentSize += cLength;\r\n\r\n if (val === '' || val === ' ' || i === len - 1) {\r\n if (val === '' || val === ' ') {\r\n currentSize -= cLength;\r\n }\r\n\r\n while (currentPos <= i) {\r\n letters[currentPos].an = currentSize;\r\n letters[currentPos].ind = index;\r\n letters[currentPos].extra = cLength;\r\n currentPos += 1;\r\n }\r\n\r\n index += 1;\r\n currentSize = 0;\r\n }\r\n } else if (anchorGrouping == 3) {\r\n // eslint-disable-line eqeqeq\r\n currentSize += cLength;\r\n\r\n if (val === '' || i === len - 1) {\r\n if (val === '') {\r\n currentSize -= cLength;\r\n }\r\n\r\n while (currentPos <= i) {\r\n letters[currentPos].an = currentSize;\r\n letters[currentPos].ind = index;\r\n letters[currentPos].extra = cLength;\r\n currentPos += 1;\r\n }\r\n\r\n currentSize = 0;\r\n index += 1;\r\n }\r\n } else {\r\n letters[index].ind = index;\r\n letters[index].extra = 0;\r\n index += 1;\r\n }\r\n }\r\n\r\n documentData.l = letters;\r\n maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;\r\n lineWidths.push(lineWidth);\r\n\r\n if (documentData.sz) {\r\n documentData.boxWidth = documentData.sz[0];\r\n documentData.justifyOffset = 0;\r\n } else {\r\n documentData.boxWidth = maxLineWidth;\r\n\r\n switch (documentData.j) {\r\n case 1:\r\n documentData.justifyOffset = -documentData.boxWidth;\r\n break;\r\n\r\n case 2:\r\n documentData.justifyOffset = -documentData.boxWidth / 2;\r\n break;\r\n\r\n default:\r\n documentData.justifyOffset = 0;\r\n }\r\n }\r\n\r\n documentData.lineWidths = lineWidths;\r\n var animators = data.a;\r\n var animatorData;\r\n var letterData;\r\n jLen = animators.length;\r\n var based;\r\n var ind;\r\n var indexes = [];\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorData = animators[j];\r\n\r\n if (animatorData.a.sc) {\r\n documentData.strokeColorAnim = true;\r\n }\r\n\r\n if (animatorData.a.sw) {\r\n documentData.strokeWidthAnim = true;\r\n }\r\n\r\n if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {\r\n documentData.fillColorAnim = true;\r\n }\r\n\r\n ind = 0;\r\n based = animatorData.s.b;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n letterData = letters[i];\r\n letterData.anIndexes[j] = ind;\r\n\r\n if (based == 1 && letterData.val !== '' || based == 2 && letterData.val !== '' && letterData.val !== ' ' || based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1) || based == 4 && (letterData.n || i == len - 1)) {\r\n // eslint-disable-line eqeqeq\r\n if (animatorData.s.rn === 1) {\r\n indexes.push(ind);\r\n }\r\n\r\n ind += 1;\r\n }\r\n }\r\n\r\n data.a[j].s.totalChars = ind;\r\n var currentInd = -1;\r\n var newInd;\r\n\r\n if (animatorData.s.rn === 1) {\r\n for (i = 0; i < len; i += 1) {\r\n letterData = letters[i];\r\n\r\n if (currentInd != letterData.anIndexes[j]) {\r\n // eslint-disable-line eqeqeq\r\n currentInd = letterData.anIndexes[j];\r\n newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];\r\n }\r\n\r\n letterData.anIndexes[j] = newInd;\r\n }\r\n }\r\n }\r\n\r\n documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;\r\n documentData.ls = documentData.ls || 0;\r\n documentData.ascent = fontData.ascent * documentData.finalSize / 100;\r\n };\r\n\r\n TextProperty.prototype.updateDocumentData = function (newData, index) {\r\n index = index === undefined ? this.keysIndex : index;\r\n var dData = this.copyData({}, this.data.d.k[index].s);\r\n dData = this.copyData(dData, newData);\r\n this.data.d.k[index].s = dData;\r\n this.recalculate(index);\r\n this.elem.addDynamicProperty(this);\r\n };\r\n\r\n TextProperty.prototype.recalculate = function (index) {\r\n var dData = this.data.d.k[index].s;\r\n dData.__complete = false;\r\n this.keysIndex = 0;\r\n this._isFirstFrame = true;\r\n this.getValue(dData);\r\n };\r\n\r\n TextProperty.prototype.canResizeFont = function (_canResize) {\r\n this.canResize = _canResize;\r\n this.recalculate(this.keysIndex);\r\n this.elem.addDynamicProperty(this);\r\n };\r\n\r\n TextProperty.prototype.setMinimumFontSize = function (_fontValue) {\r\n this.minimumFontSize = Math.floor(_fontValue) || 1;\r\n this.recalculate(this.keysIndex);\r\n this.elem.addDynamicProperty(this);\r\n };\r\n\r\n var TextSelectorProp = function () {\r\n var max = Math.max;\r\n var min = Math.min;\r\n var floor = Math.floor;\r\n\r\n function TextSelectorPropFactory(elem, data) {\r\n this._currentTextLength = -1;\r\n this.k = false;\r\n this.data = data;\r\n this.elem = elem;\r\n this.comp = elem.comp;\r\n this.finalS = 0;\r\n this.finalE = 0;\r\n this.initDynamicPropertyContainer(elem);\r\n this.s = PropertyFactory.getProp(elem, data.s || {\r\n k: 0\r\n }, 0, 0, this);\r\n\r\n if ('e' in data) {\r\n this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);\r\n } else {\r\n this.e = {\r\n v: 100\r\n };\r\n }\r\n\r\n this.o = PropertyFactory.getProp(elem, data.o || {\r\n k: 0\r\n }, 0, 0, this);\r\n this.xe = PropertyFactory.getProp(elem, data.xe || {\r\n k: 0\r\n }, 0, 0, this);\r\n this.ne = PropertyFactory.getProp(elem, data.ne || {\r\n k: 0\r\n }, 0, 0, this);\r\n this.sm = PropertyFactory.getProp(elem, data.sm || {\r\n k: 100\r\n }, 0, 0, this);\r\n this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);\r\n\r\n if (!this.dynamicProperties.length) {\r\n this.getValue();\r\n }\r\n }\r\n\r\n TextSelectorPropFactory.prototype = {\r\n getMult: function getMult(ind) {\r\n if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {\r\n this.getValue();\r\n }\r\n\r\n var x1 = 0;\r\n var y1 = 0;\r\n var x2 = 1;\r\n var y2 = 1;\r\n\r\n if (this.ne.v > 0) {\r\n x1 = this.ne.v / 100.0;\r\n } else {\r\n y1 = -this.ne.v / 100.0;\r\n }\r\n\r\n if (this.xe.v > 0) {\r\n x2 = 1.0 - this.xe.v / 100.0;\r\n } else {\r\n y2 = 1.0 + this.xe.v / 100.0;\r\n }\r\n\r\n var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;\r\n var mult = 0;\r\n var s = this.finalS;\r\n var e = this.finalE;\r\n var type = this.data.sh;\r\n\r\n if (type === 2) {\r\n if (e === s) {\r\n mult = ind >= e ? 1 : 0;\r\n } else {\r\n mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\r\n }\r\n\r\n mult = easer(mult);\r\n } else if (type === 3) {\r\n if (e === s) {\r\n mult = ind >= e ? 0 : 1;\r\n } else {\r\n mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\r\n }\r\n\r\n mult = easer(mult);\r\n } else if (type === 4) {\r\n if (e === s) {\r\n mult = 0;\r\n } else {\r\n mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\r\n\r\n if (mult < 0.5) {\r\n mult *= 2;\r\n } else {\r\n mult = 1 - 2 * (mult - 0.5);\r\n }\r\n }\r\n\r\n mult = easer(mult);\r\n } else if (type === 5) {\r\n if (e === s) {\r\n mult = 0;\r\n } else {\r\n var tot = e - s;\r\n /* ind += 0.5;\r\n mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */\r\n\r\n ind = min(max(0, ind + 0.5 - s), e - s);\r\n var x = -tot / 2 + ind;\r\n var a = tot / 2;\r\n mult = Math.sqrt(1 - x * x / (a * a));\r\n }\r\n\r\n mult = easer(mult);\r\n } else if (type === 6) {\r\n if (e === s) {\r\n mult = 0;\r\n } else {\r\n ind = min(max(0, ind + 0.5 - s), e - s);\r\n mult = (1 + Math.cos(Math.PI + Math.PI * 2 * ind / (e - s))) / 2; // eslint-disable-line\r\n }\r\n\r\n mult = easer(mult);\r\n } else {\r\n if (ind >= floor(s)) {\r\n if (ind - s < 0) {\r\n mult = max(0, min(min(e, 1) - (s - ind), 1));\r\n } else {\r\n mult = max(0, min(e - ind, 1));\r\n }\r\n }\r\n\r\n mult = easer(mult);\r\n } // Smoothness implementation.\r\n // The smoothness represents a reduced range of the original [0; 1] range.\r\n // if smoothness is 25%, the new range will be [0.375; 0.625]\r\n // Steps are:\r\n // - find the lower value of the new range (threshold)\r\n // - if multiplier is smaller than that value, floor it to 0\r\n // - if it is larger,\r\n // - subtract the threshold\r\n // - divide it by the smoothness (this will return the range to [0; 1])\r\n // Note: If it doesn't work on some scenarios, consider applying it before the easer.\r\n\r\n\r\n if (this.sm.v !== 100) {\r\n var smoothness = this.sm.v * 0.01;\r\n\r\n if (smoothness === 0) {\r\n smoothness = 0.00000001;\r\n }\r\n\r\n var threshold = 0.5 - smoothness * 0.5;\r\n\r\n if (mult < threshold) {\r\n mult = 0;\r\n } else {\r\n mult = (mult - threshold) / smoothness;\r\n\r\n if (mult > 1) {\r\n mult = 1;\r\n }\r\n }\r\n }\r\n\r\n return mult * this.a.v;\r\n },\r\n getValue: function getValue(newCharsFlag) {\r\n this.iterateDynamicProperties();\r\n this._mdf = newCharsFlag || this._mdf;\r\n this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;\r\n\r\n if (newCharsFlag && this.data.r === 2) {\r\n this.e.v = this._currentTextLength;\r\n }\r\n\r\n var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;\r\n var o = this.o.v / divisor;\r\n var s = this.s.v / divisor + o;\r\n var e = this.e.v / divisor + o;\r\n\r\n if (s > e) {\r\n var _s = s;\r\n s = e;\r\n e = _s;\r\n }\r\n\r\n this.finalS = s;\r\n this.finalE = e;\r\n }\r\n };\r\n extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);\r\n\r\n function getTextSelectorProp(elem, data, arr) {\r\n return new TextSelectorPropFactory(elem, data, arr);\r\n }\r\n\r\n return {\r\n getTextSelectorProp: getTextSelectorProp\r\n };\r\n }();\r\n\r\n function TextAnimatorDataProperty(elem, animatorProps, container) {\r\n var defaultData = {\r\n propType: false\r\n };\r\n var getProp = PropertyFactory.getProp;\r\n var textAnimatorAnimatables = animatorProps.a;\r\n this.a = {\r\n r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,\r\n rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,\r\n ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,\r\n sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,\r\n sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,\r\n s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,\r\n a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,\r\n o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,\r\n p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,\r\n sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,\r\n sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,\r\n fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,\r\n fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,\r\n fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,\r\n fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,\r\n t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData\r\n };\r\n this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);\r\n this.s.t = animatorProps.s.t;\r\n }\r\n\r\n function TextAnimatorProperty(textData, renderType, elem) {\r\n this._isFirstFrame = true;\r\n this._hasMaskedPath = false;\r\n this._frameId = -1;\r\n this._textData = textData;\r\n this._renderType = renderType;\r\n this._elem = elem;\r\n this._animatorsData = createSizedArray(this._textData.a.length);\r\n this._pathData = {};\r\n this._moreOptions = {\r\n alignment: {}\r\n };\r\n this.renderedLetters = [];\r\n this.lettersChangedFlag = false;\r\n this.initDynamicPropertyContainer(elem);\r\n }\r\n\r\n TextAnimatorProperty.prototype.searchProperties = function () {\r\n var i;\r\n var len = this._textData.a.length;\r\n var animatorProps;\r\n var getProp = PropertyFactory.getProp;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n animatorProps = this._textData.a[i];\r\n this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);\r\n }\r\n\r\n if (this._textData.p && 'm' in this._textData.p) {\r\n this._pathData = {\r\n a: getProp(this._elem, this._textData.p.a, 0, 0, this),\r\n f: getProp(this._elem, this._textData.p.f, 0, 0, this),\r\n l: getProp(this._elem, this._textData.p.l, 0, 0, this),\r\n r: getProp(this._elem, this._textData.p.r, 0, 0, this),\r\n p: getProp(this._elem, this._textData.p.p, 0, 0, this),\r\n m: this._elem.maskManager.getMaskProperty(this._textData.p.m)\r\n };\r\n this._hasMaskedPath = true;\r\n } else {\r\n this._hasMaskedPath = false;\r\n }\r\n\r\n this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);\r\n };\r\n\r\n TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {\r\n this.lettersChangedFlag = lettersChangedFlag;\r\n\r\n if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {\r\n return;\r\n }\r\n\r\n this._isFirstFrame = false;\r\n var alignment = this._moreOptions.alignment.v;\r\n var animators = this._animatorsData;\r\n var textData = this._textData;\r\n var matrixHelper = this.mHelper;\r\n var renderType = this._renderType;\r\n var renderedLettersCount = this.renderedLetters.length;\r\n var xPos;\r\n var yPos;\r\n var i;\r\n var len;\r\n var letters = documentData.l;\r\n var pathInfo;\r\n var currentLength;\r\n var currentPoint;\r\n var segmentLength;\r\n var flag;\r\n var pointInd;\r\n var segmentInd;\r\n var prevPoint;\r\n var points;\r\n var segments;\r\n var partialLength;\r\n var totalLength;\r\n var perc;\r\n var tanAngle;\r\n var mask;\r\n\r\n if (this._hasMaskedPath) {\r\n mask = this._pathData.m;\r\n\r\n if (!this._pathData.n || this._pathData._mdf) {\r\n var paths = mask.v;\r\n\r\n if (this._pathData.r.v) {\r\n paths = paths.reverse();\r\n } // TODO: release bezier data cached from previous pathInfo: this._pathData.pi\r\n\r\n\r\n pathInfo = {\r\n tLength: 0,\r\n segments: []\r\n };\r\n len = paths._length - 1;\r\n var bezierData;\r\n totalLength = 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n bezierData = bez.buildBezierData(paths.v[i], paths.v[i + 1], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);\r\n pathInfo.tLength += bezierData.segmentLength;\r\n pathInfo.segments.push(bezierData);\r\n totalLength += bezierData.segmentLength;\r\n }\r\n\r\n i = len;\r\n\r\n if (mask.v.c) {\r\n bezierData = bez.buildBezierData(paths.v[i], paths.v[0], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);\r\n pathInfo.tLength += bezierData.segmentLength;\r\n pathInfo.segments.push(bezierData);\r\n totalLength += bezierData.segmentLength;\r\n }\r\n\r\n this._pathData.pi = pathInfo;\r\n }\r\n\r\n pathInfo = this._pathData.pi;\r\n currentLength = this._pathData.f.v;\r\n segmentInd = 0;\r\n pointInd = 1;\r\n segmentLength = 0;\r\n flag = true;\r\n segments = pathInfo.segments;\r\n\r\n if (currentLength < 0 && mask.v.c) {\r\n if (pathInfo.tLength < Math.abs(currentLength)) {\r\n currentLength = -Math.abs(currentLength) % pathInfo.tLength;\r\n }\r\n\r\n segmentInd = segments.length - 1;\r\n points = segments[segmentInd].points;\r\n pointInd = points.length - 1;\r\n\r\n while (currentLength < 0) {\r\n currentLength += points[pointInd].partialLength;\r\n pointInd -= 1;\r\n\r\n if (pointInd < 0) {\r\n segmentInd -= 1;\r\n points = segments[segmentInd].points;\r\n pointInd = points.length - 1;\r\n }\r\n }\r\n }\r\n\r\n points = segments[segmentInd].points;\r\n prevPoint = points[pointInd - 1];\r\n currentPoint = points[pointInd];\r\n partialLength = currentPoint.partialLength;\r\n }\r\n\r\n len = letters.length;\r\n xPos = 0;\r\n yPos = 0;\r\n var yOff = documentData.finalSize * 1.2 * 0.714;\r\n var firstLine = true;\r\n var animatorProps;\r\n var animatorSelector;\r\n var j;\r\n var jLen;\r\n var letterValue;\r\n jLen = animators.length;\r\n var mult;\r\n var ind = -1;\r\n var offf;\r\n var xPathPos;\r\n var yPathPos;\r\n var initPathPos = currentLength;\r\n var initSegmentInd = segmentInd;\r\n var initPointInd = pointInd;\r\n var currentLine = -1;\r\n var elemOpacity;\r\n var sc;\r\n var sw;\r\n var fc;\r\n var k;\r\n var letterSw;\r\n var letterSc;\r\n var letterFc;\r\n var letterM = '';\r\n var letterP = this.defaultPropsArray;\r\n var letterO; //\r\n\r\n if (documentData.j === 2 || documentData.j === 1) {\r\n var animatorJustifyOffset = 0;\r\n var animatorFirstCharOffset = 0;\r\n var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;\r\n var lastIndex = 0;\r\n var isNewLine = true;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (letters[i].n) {\r\n if (animatorJustifyOffset) {\r\n animatorJustifyOffset += animatorFirstCharOffset;\r\n }\r\n\r\n while (lastIndex < i) {\r\n letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;\r\n lastIndex += 1;\r\n }\r\n\r\n animatorJustifyOffset = 0;\r\n isNewLine = true;\r\n } else {\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n\r\n if (animatorProps.t.propType) {\r\n if (isNewLine && documentData.j === 2) {\r\n animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;\r\n }\r\n\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n if (mult.length) {\r\n animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;\r\n } else {\r\n animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;\r\n }\r\n }\r\n }\r\n\r\n isNewLine = false;\r\n }\r\n }\r\n\r\n if (animatorJustifyOffset) {\r\n animatorJustifyOffset += animatorFirstCharOffset;\r\n }\r\n\r\n while (lastIndex < i) {\r\n letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;\r\n lastIndex += 1;\r\n }\r\n } //\r\n\r\n\r\n for (i = 0; i < len; i += 1) {\r\n matrixHelper.reset();\r\n elemOpacity = 1;\r\n\r\n if (letters[i].n) {\r\n xPos = 0;\r\n yPos += documentData.yOffset;\r\n yPos += firstLine ? 1 : 0;\r\n currentLength = initPathPos;\r\n firstLine = false;\r\n\r\n if (this._hasMaskedPath) {\r\n segmentInd = initSegmentInd;\r\n pointInd = initPointInd;\r\n points = segments[segmentInd].points;\r\n prevPoint = points[pointInd - 1];\r\n currentPoint = points[pointInd];\r\n partialLength = currentPoint.partialLength;\r\n segmentLength = 0;\r\n }\r\n\r\n letterM = '';\r\n letterFc = '';\r\n letterSw = '';\r\n letterO = '';\r\n letterP = this.defaultPropsArray;\r\n } else {\r\n if (this._hasMaskedPath) {\r\n if (currentLine !== letters[i].line) {\r\n switch (documentData.j) {\r\n case 1:\r\n currentLength += totalLength - documentData.lineWidths[letters[i].line];\r\n break;\r\n\r\n case 2:\r\n currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n\r\n currentLine = letters[i].line;\r\n }\r\n\r\n if (ind !== letters[i].ind) {\r\n if (letters[ind]) {\r\n currentLength += letters[ind].extra;\r\n }\r\n\r\n currentLength += letters[i].an / 2;\r\n ind = letters[i].ind;\r\n }\r\n\r\n currentLength += alignment[0] * letters[i].an * 0.005;\r\n var animatorOffset = 0;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n\r\n if (animatorProps.p.propType) {\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n if (mult.length) {\r\n animatorOffset += animatorProps.p.v[0] * mult[0];\r\n } else {\r\n animatorOffset += animatorProps.p.v[0] * mult;\r\n }\r\n }\r\n\r\n if (animatorProps.a.propType) {\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n if (mult.length) {\r\n animatorOffset += animatorProps.a.v[0] * mult[0];\r\n } else {\r\n animatorOffset += animatorProps.a.v[0] * mult;\r\n }\r\n }\r\n }\r\n\r\n flag = true; // Force alignment only works with a single line for now\r\n\r\n if (this._pathData.a.v) {\r\n currentLength = letters[0].an * 0.5 + (totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind / (len - 1);\r\n currentLength += this._pathData.f.v;\r\n }\r\n\r\n while (flag) {\r\n if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {\r\n perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;\r\n xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;\r\n yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;\r\n matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -(alignment[1] * yOff) * 0.01);\r\n flag = false;\r\n } else if (points) {\r\n segmentLength += currentPoint.partialLength;\r\n pointInd += 1;\r\n\r\n if (pointInd >= points.length) {\r\n pointInd = 0;\r\n segmentInd += 1;\r\n\r\n if (!segments[segmentInd]) {\r\n if (mask.v.c) {\r\n pointInd = 0;\r\n segmentInd = 0;\r\n points = segments[segmentInd].points;\r\n } else {\r\n segmentLength -= currentPoint.partialLength;\r\n points = null;\r\n }\r\n } else {\r\n points = segments[segmentInd].points;\r\n }\r\n }\r\n\r\n if (points) {\r\n prevPoint = currentPoint;\r\n currentPoint = points[pointInd];\r\n partialLength = currentPoint.partialLength;\r\n }\r\n }\r\n }\r\n\r\n offf = letters[i].an / 2 - letters[i].add;\r\n matrixHelper.translate(-offf, 0, 0);\r\n } else {\r\n offf = letters[i].an / 2 - letters[i].add;\r\n matrixHelper.translate(-offf, 0, 0); // Grouping alignment\r\n\r\n matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -alignment[1] * yOff * 0.01, 0);\r\n }\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n\r\n if (animatorProps.t.propType) {\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean \"isNewLine\"\r\n\r\n if (xPos !== 0 || documentData.j !== 0) {\r\n if (this._hasMaskedPath) {\r\n if (mult.length) {\r\n currentLength += animatorProps.t.v * mult[0];\r\n } else {\r\n currentLength += animatorProps.t.v * mult;\r\n }\r\n } else if (mult.length) {\r\n xPos += animatorProps.t.v * mult[0];\r\n } else {\r\n xPos += animatorProps.t.v * mult;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (documentData.strokeWidthAnim) {\r\n sw = documentData.sw || 0;\r\n }\r\n\r\n if (documentData.strokeColorAnim) {\r\n if (documentData.sc) {\r\n sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];\r\n } else {\r\n sc = [0, 0, 0];\r\n }\r\n }\r\n\r\n if (documentData.fillColorAnim && documentData.fc) {\r\n fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];\r\n }\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n\r\n if (animatorProps.a.propType) {\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n if (mult.length) {\r\n matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);\r\n } else {\r\n matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);\r\n }\r\n }\r\n }\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n\r\n if (animatorProps.s.propType) {\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n if (mult.length) {\r\n matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult[0], 1 + (animatorProps.s.v[1] - 1) * mult[1], 1);\r\n } else {\r\n matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult, 1 + (animatorProps.s.v[1] - 1) * mult, 1);\r\n }\r\n }\r\n }\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n if (animatorProps.sk.propType) {\r\n if (mult.length) {\r\n matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);\r\n } else {\r\n matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);\r\n }\r\n }\r\n\r\n if (animatorProps.r.propType) {\r\n if (mult.length) {\r\n matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);\r\n } else {\r\n matrixHelper.rotateZ(-animatorProps.r.v * mult);\r\n }\r\n }\r\n\r\n if (animatorProps.ry.propType) {\r\n if (mult.length) {\r\n matrixHelper.rotateY(animatorProps.ry.v * mult[1]);\r\n } else {\r\n matrixHelper.rotateY(animatorProps.ry.v * mult);\r\n }\r\n }\r\n\r\n if (animatorProps.rx.propType) {\r\n if (mult.length) {\r\n matrixHelper.rotateX(animatorProps.rx.v * mult[0]);\r\n } else {\r\n matrixHelper.rotateX(animatorProps.rx.v * mult);\r\n }\r\n }\r\n\r\n if (animatorProps.o.propType) {\r\n if (mult.length) {\r\n elemOpacity += (animatorProps.o.v * mult[0] - elemOpacity) * mult[0];\r\n } else {\r\n elemOpacity += (animatorProps.o.v * mult - elemOpacity) * mult;\r\n }\r\n }\r\n\r\n if (documentData.strokeWidthAnim && animatorProps.sw.propType) {\r\n if (mult.length) {\r\n sw += animatorProps.sw.v * mult[0];\r\n } else {\r\n sw += animatorProps.sw.v * mult;\r\n }\r\n }\r\n\r\n if (documentData.strokeColorAnim && animatorProps.sc.propType) {\r\n for (k = 0; k < 3; k += 1) {\r\n if (mult.length) {\r\n sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];\r\n } else {\r\n sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;\r\n }\r\n }\r\n }\r\n\r\n if (documentData.fillColorAnim && documentData.fc) {\r\n if (animatorProps.fc.propType) {\r\n for (k = 0; k < 3; k += 1) {\r\n if (mult.length) {\r\n fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];\r\n } else {\r\n fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;\r\n }\r\n }\r\n }\r\n\r\n if (animatorProps.fh.propType) {\r\n if (mult.length) {\r\n fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);\r\n } else {\r\n fc = addHueToRGB(fc, animatorProps.fh.v * mult);\r\n }\r\n }\r\n\r\n if (animatorProps.fs.propType) {\r\n if (mult.length) {\r\n fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);\r\n } else {\r\n fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);\r\n }\r\n }\r\n\r\n if (animatorProps.fb.propType) {\r\n if (mult.length) {\r\n fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);\r\n } else {\r\n fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);\r\n }\r\n }\r\n }\r\n }\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n animatorProps = animators[j].a;\r\n\r\n if (animatorProps.p.propType) {\r\n animatorSelector = animators[j].s;\r\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\r\n\r\n if (this._hasMaskedPath) {\r\n if (mult.length) {\r\n matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);\r\n } else {\r\n matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);\r\n }\r\n } else if (mult.length) {\r\n matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);\r\n } else {\r\n matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);\r\n }\r\n }\r\n }\r\n\r\n if (documentData.strokeWidthAnim) {\r\n letterSw = sw < 0 ? 0 : sw;\r\n }\r\n\r\n if (documentData.strokeColorAnim) {\r\n letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';\r\n }\r\n\r\n if (documentData.fillColorAnim && documentData.fc) {\r\n letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';\r\n }\r\n\r\n if (this._hasMaskedPath) {\r\n matrixHelper.translate(0, -documentData.ls);\r\n matrixHelper.translate(0, alignment[1] * yOff * 0.01 + yPos, 0);\r\n\r\n if (this._pathData.p.v) {\r\n tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);\r\n var rot = Math.atan(tanAngle) * 180 / Math.PI;\r\n\r\n if (currentPoint.point[0] < prevPoint.point[0]) {\r\n rot += 180;\r\n }\r\n\r\n matrixHelper.rotate(-rot * Math.PI / 180);\r\n }\r\n\r\n matrixHelper.translate(xPathPos, yPathPos, 0);\r\n currentLength -= alignment[0] * letters[i].an * 0.005;\r\n\r\n if (letters[i + 1] && ind !== letters[i + 1].ind) {\r\n currentLength += letters[i].an / 2;\r\n currentLength += documentData.tr * 0.001 * documentData.finalSize;\r\n }\r\n } else {\r\n matrixHelper.translate(xPos, yPos, 0);\r\n\r\n if (documentData.ps) {\r\n // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);\r\n matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);\r\n }\r\n\r\n switch (documentData.j) {\r\n case 1:\r\n matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);\r\n break;\r\n\r\n case 2:\r\n matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n\r\n matrixHelper.translate(0, -documentData.ls);\r\n matrixHelper.translate(offf, 0, 0);\r\n matrixHelper.translate(alignment[0] * letters[i].an * 0.005, alignment[1] * yOff * 0.01, 0);\r\n xPos += letters[i].l + documentData.tr * 0.001 * documentData.finalSize;\r\n }\r\n\r\n if (renderType === 'html') {\r\n letterM = matrixHelper.toCSS();\r\n } else if (renderType === 'svg') {\r\n letterM = matrixHelper.to2dCSS();\r\n } else {\r\n letterP = [matrixHelper.props[0], matrixHelper.props[1], matrixHelper.props[2], matrixHelper.props[3], matrixHelper.props[4], matrixHelper.props[5], matrixHelper.props[6], matrixHelper.props[7], matrixHelper.props[8], matrixHelper.props[9], matrixHelper.props[10], matrixHelper.props[11], matrixHelper.props[12], matrixHelper.props[13], matrixHelper.props[14], matrixHelper.props[15]];\r\n }\r\n\r\n letterO = elemOpacity;\r\n }\r\n\r\n if (renderedLettersCount <= i) {\r\n letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);\r\n this.renderedLetters.push(letterValue);\r\n renderedLettersCount += 1;\r\n this.lettersChangedFlag = true;\r\n } else {\r\n letterValue = this.renderedLetters[i];\r\n this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;\r\n }\r\n }\r\n };\r\n\r\n TextAnimatorProperty.prototype.getValue = function () {\r\n if (this._elem.globalData.frameId === this._frameId) {\r\n return;\r\n }\r\n\r\n this._frameId = this._elem.globalData.frameId;\r\n this.iterateDynamicProperties();\r\n };\r\n\r\n TextAnimatorProperty.prototype.mHelper = new Matrix();\r\n TextAnimatorProperty.prototype.defaultPropsArray = [];\r\n extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);\r\n\r\n function ITextElement() {}\r\n\r\n ITextElement.prototype.initElement = function (data, globalData, comp) {\r\n this.lettersChangedFlag = true;\r\n this.initFrame();\r\n this.initBaseData(data, globalData, comp);\r\n this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);\r\n this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);\r\n this.initTransform(data, globalData, comp);\r\n this.initHierarchy();\r\n this.initRenderable();\r\n this.initRendererElement();\r\n this.createContainerElements();\r\n this.createRenderableComponents();\r\n this.createContent();\r\n this.hide();\r\n this.textAnimator.searchProperties(this.dynamicProperties);\r\n };\r\n\r\n ITextElement.prototype.prepareFrame = function (num) {\r\n this._mdf = false;\r\n this.prepareRenderableFrame(num);\r\n this.prepareProperties(num, this.isInRange);\r\n\r\n if (this.textProperty._mdf || this.textProperty._isFirstFrame) {\r\n this.buildNewText();\r\n this.textProperty._isFirstFrame = false;\r\n this.textProperty._mdf = false;\r\n }\r\n };\r\n\r\n ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {\r\n var j;\r\n var jLen = shapes.length;\r\n var pathNodes;\r\n var shapeStr = '';\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n if (shapes[j].ty === 'sh') {\r\n pathNodes = shapes[j].ks.k;\r\n shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);\r\n }\r\n }\r\n\r\n return shapeStr;\r\n };\r\n\r\n ITextElement.prototype.updateDocumentData = function (newData, index) {\r\n this.textProperty.updateDocumentData(newData, index);\r\n };\r\n\r\n ITextElement.prototype.canResizeFont = function (_canResize) {\r\n this.textProperty.canResizeFont(_canResize);\r\n };\r\n\r\n ITextElement.prototype.setMinimumFontSize = function (_fontSize) {\r\n this.textProperty.setMinimumFontSize(_fontSize);\r\n };\r\n\r\n ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {\r\n if (documentData.ps) {\r\n matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);\r\n }\r\n\r\n matrixHelper.translate(0, -documentData.ls, 0);\r\n\r\n switch (documentData.j) {\r\n case 1:\r\n matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);\r\n break;\r\n\r\n case 2:\r\n matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n\r\n matrixHelper.translate(xPos, yPos, 0);\r\n };\r\n\r\n ITextElement.prototype.buildColor = function (colorData) {\r\n return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';\r\n };\r\n\r\n ITextElement.prototype.emptyProp = new LetterProps();\r\n\r\n ITextElement.prototype.destroy = function () {};\r\n\r\n var emptyShapeData = {\r\n shapes: []\r\n };\r\n\r\n function SVGTextLottieElement(data, globalData, comp) {\r\n this.textSpans = [];\r\n this.renderType = 'svg';\r\n this.initElement(data, globalData, comp);\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);\r\n\r\n SVGTextLottieElement.prototype.createContent = function () {\r\n if (this.data.singleShape && !this.globalData.fontManager.chars) {\r\n this.textContainer = createNS('text');\r\n }\r\n };\r\n\r\n SVGTextLottieElement.prototype.buildTextContents = function (textArray) {\r\n var i = 0;\r\n var len = textArray.length;\r\n var textContents = [];\r\n var currentTextContent = '';\r\n\r\n while (i < len) {\r\n if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {\r\n textContents.push(currentTextContent);\r\n currentTextContent = '';\r\n } else {\r\n currentTextContent += textArray[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n textContents.push(currentTextContent);\r\n return textContents;\r\n };\r\n\r\n SVGTextLottieElement.prototype.buildShapeData = function (data, scale) {\r\n // data should probably be cloned to apply scale separately to each instance of a text on different layers\r\n // but since text internal content gets only rendered once and then it's never rerendered,\r\n // it's probably safe not to clone data and reuse always the same instance even if the object is mutated.\r\n // Avoiding cloning is preferred since cloning each character shape data is expensive\r\n if (data.shapes && data.shapes.length) {\r\n var shape = data.shapes[0];\r\n\r\n if (shape.it) {\r\n var shapeItem = shape.it[shape.it.length - 1];\r\n\r\n if (shapeItem.s) {\r\n shapeItem.s.k[0] = scale;\r\n shapeItem.s.k[1] = scale;\r\n }\r\n }\r\n }\r\n\r\n return data;\r\n };\r\n\r\n SVGTextLottieElement.prototype.buildNewText = function () {\r\n this.addDynamicProperty(this);\r\n var i;\r\n var len;\r\n var documentData = this.textProperty.currentData;\r\n this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);\r\n\r\n if (documentData.fc) {\r\n this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));\r\n } else {\r\n this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');\r\n }\r\n\r\n if (documentData.sc) {\r\n this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));\r\n this.layerElement.setAttribute('stroke-width', documentData.sw);\r\n }\r\n\r\n this.layerElement.setAttribute('font-size', documentData.finalSize);\r\n var fontData = this.globalData.fontManager.getFontByName(documentData.f);\r\n\r\n if (fontData.fClass) {\r\n this.layerElement.setAttribute('class', fontData.fClass);\r\n } else {\r\n this.layerElement.setAttribute('font-family', fontData.fFamily);\r\n var fWeight = documentData.fWeight;\r\n var fStyle = documentData.fStyle;\r\n this.layerElement.setAttribute('font-style', fStyle);\r\n this.layerElement.setAttribute('font-weight', fWeight);\r\n }\r\n\r\n this.layerElement.setAttribute('aria-label', documentData.t);\r\n var letters = documentData.l || [];\r\n var usesGlyphs = !!this.globalData.fontManager.chars;\r\n len = letters.length;\r\n var tSpan;\r\n var matrixHelper = this.mHelper;\r\n var shapeStr = '';\r\n var singleShape = this.data.singleShape;\r\n var xPos = 0;\r\n var yPos = 0;\r\n var firstLine = true;\r\n var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;\r\n\r\n if (singleShape && !usesGlyphs && !documentData.sz) {\r\n var tElement = this.textContainer;\r\n var justify = 'start';\r\n\r\n switch (documentData.j) {\r\n case 1:\r\n justify = 'end';\r\n break;\r\n\r\n case 2:\r\n justify = 'middle';\r\n break;\r\n\r\n default:\r\n justify = 'start';\r\n break;\r\n }\r\n\r\n tElement.setAttribute('text-anchor', justify);\r\n tElement.setAttribute('letter-spacing', trackingOffset);\r\n var textContent = this.buildTextContents(documentData.finalText);\r\n len = textContent.length;\r\n yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n tSpan = this.textSpans[i].span || createNS('tspan');\r\n tSpan.textContent = textContent[i];\r\n tSpan.setAttribute('x', 0);\r\n tSpan.setAttribute('y', yPos);\r\n tSpan.style.display = 'inherit';\r\n tElement.appendChild(tSpan);\r\n\r\n if (!this.textSpans[i]) {\r\n this.textSpans[i] = {\r\n span: null,\r\n glyph: null\r\n };\r\n }\r\n\r\n this.textSpans[i].span = tSpan;\r\n yPos += documentData.finalLineHeight;\r\n }\r\n\r\n this.layerElement.appendChild(tElement);\r\n } else {\r\n var cachedSpansLength = this.textSpans.length;\r\n var charData;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (!this.textSpans[i]) {\r\n this.textSpans[i] = {\r\n span: null,\r\n childSpan: null,\r\n glyph: null\r\n };\r\n }\r\n\r\n if (!usesGlyphs || !singleShape || i === 0) {\r\n tSpan = cachedSpansLength > i ? this.textSpans[i].span : createNS(usesGlyphs ? 'g' : 'text');\r\n\r\n if (cachedSpansLength <= i) {\r\n tSpan.setAttribute('stroke-linecap', 'butt');\r\n tSpan.setAttribute('stroke-linejoin', 'round');\r\n tSpan.setAttribute('stroke-miterlimit', '4');\r\n this.textSpans[i].span = tSpan;\r\n\r\n if (usesGlyphs) {\r\n var childSpan = createNS('g');\r\n tSpan.appendChild(childSpan);\r\n this.textSpans[i].childSpan = childSpan;\r\n }\r\n\r\n this.textSpans[i].span = tSpan;\r\n this.layerElement.appendChild(tSpan);\r\n }\r\n\r\n tSpan.style.display = 'inherit';\r\n }\r\n\r\n matrixHelper.reset();\r\n\r\n if (singleShape) {\r\n if (letters[i].n) {\r\n xPos = -trackingOffset;\r\n yPos += documentData.yOffset;\r\n yPos += firstLine ? 1 : 0;\r\n firstLine = false;\r\n }\r\n\r\n this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);\r\n xPos += letters[i].l || 0; // xPos += letters[i].val === ' ' ? 0 : trackingOffset;\r\n\r\n xPos += trackingOffset;\r\n }\r\n\r\n if (usesGlyphs) {\r\n charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\r\n var glyphElement; // t === 1 means the character has been replaced with an animated shaped\r\n\r\n if (charData.t === 1) {\r\n glyphElement = new SVGCompElement(charData.data, this.globalData, this);\r\n } else {\r\n var data = emptyShapeData;\r\n\r\n if (charData.data && charData.data.shapes) {\r\n data = this.buildShapeData(charData.data, documentData.finalSize);\r\n }\r\n\r\n glyphElement = new SVGShapeElement(data, this.globalData, this);\r\n }\r\n\r\n if (this.textSpans[i].glyph) {\r\n var glyph = this.textSpans[i].glyph;\r\n this.textSpans[i].childSpan.removeChild(glyph.layerElement);\r\n glyph.destroy();\r\n }\r\n\r\n this.textSpans[i].glyph = glyphElement;\r\n glyphElement._debug = true;\r\n glyphElement.prepareFrame(0);\r\n glyphElement.renderFrame();\r\n this.textSpans[i].childSpan.appendChild(glyphElement.layerElement); // when using animated shapes, the layer will be scaled instead of replacing the internal scale\r\n // this might have issues with strokes and might need a different solution\r\n\r\n if (charData.t === 1) {\r\n this.textSpans[i].childSpan.setAttribute('transform', 'scale(' + documentData.finalSize / 100 + ',' + documentData.finalSize / 100 + ')');\r\n }\r\n } else {\r\n if (singleShape) {\r\n tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');\r\n }\r\n\r\n tSpan.textContent = letters[i].val;\r\n tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\r\n } //\r\n\r\n }\r\n\r\n if (singleShape && tSpan) {\r\n tSpan.setAttribute('d', shapeStr);\r\n }\r\n }\r\n\r\n while (i < this.textSpans.length) {\r\n this.textSpans[i].span.style.display = 'none';\r\n i += 1;\r\n }\r\n\r\n this._sizeChanged = true;\r\n };\r\n\r\n SVGTextLottieElement.prototype.sourceRectAtTime = function () {\r\n this.prepareFrame(this.comp.renderedFrame - this.data.st);\r\n this.renderInnerContent();\r\n\r\n if (this._sizeChanged) {\r\n this._sizeChanged = false;\r\n var textBox = this.layerElement.getBBox();\r\n this.bbox = {\r\n top: textBox.y,\r\n left: textBox.x,\r\n width: textBox.width,\r\n height: textBox.height\r\n };\r\n }\r\n\r\n return this.bbox;\r\n };\r\n\r\n SVGTextLottieElement.prototype.getValue = function () {\r\n var i;\r\n var len = this.textSpans.length;\r\n var glyphElement;\r\n this.renderedFrame = this.comp.renderedFrame;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n glyphElement = this.textSpans[i].glyph;\r\n\r\n if (glyphElement) {\r\n glyphElement.prepareFrame(this.comp.renderedFrame - this.data.st);\r\n\r\n if (glyphElement._mdf) {\r\n this._mdf = true;\r\n }\r\n }\r\n }\r\n };\r\n\r\n SVGTextLottieElement.prototype.renderInnerContent = function () {\r\n if (!this.data.singleShape || this._mdf) {\r\n this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\r\n\r\n if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {\r\n this._sizeChanged = true;\r\n var i;\r\n var len;\r\n var renderedLetters = this.textAnimator.renderedLetters;\r\n var letters = this.textProperty.currentData.l;\r\n len = letters.length;\r\n var renderedLetter;\r\n var textSpan;\r\n var glyphElement;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (!letters[i].n) {\r\n renderedLetter = renderedLetters[i];\r\n textSpan = this.textSpans[i].span;\r\n glyphElement = this.textSpans[i].glyph;\r\n\r\n if (glyphElement) {\r\n glyphElement.renderFrame();\r\n }\r\n\r\n if (renderedLetter._mdf.m) {\r\n textSpan.setAttribute('transform', renderedLetter.m);\r\n }\r\n\r\n if (renderedLetter._mdf.o) {\r\n textSpan.setAttribute('opacity', renderedLetter.o);\r\n }\r\n\r\n if (renderedLetter._mdf.sw) {\r\n textSpan.setAttribute('stroke-width', renderedLetter.sw);\r\n }\r\n\r\n if (renderedLetter._mdf.sc) {\r\n textSpan.setAttribute('stroke', renderedLetter.sc);\r\n }\r\n\r\n if (renderedLetter._mdf.fc) {\r\n textSpan.setAttribute('fill', renderedLetter.fc);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n function ISolidElement(data, globalData, comp) {\r\n this.initElement(data, globalData, comp);\r\n }\r\n\r\n extendPrototype([IImageElement], ISolidElement);\r\n\r\n ISolidElement.prototype.createContent = function () {\r\n var rect = createNS('rect'); /// /rect.style.width = this.data.sw;\r\n /// /rect.style.height = this.data.sh;\r\n /// /rect.style.fill = this.data.sc;\r\n\r\n rect.setAttribute('width', this.data.sw);\r\n rect.setAttribute('height', this.data.sh);\r\n rect.setAttribute('fill', this.data.sc);\r\n this.layerElement.appendChild(rect);\r\n };\r\n\r\n function NullElement(data, globalData, comp) {\r\n this.initFrame();\r\n this.initBaseData(data, globalData, comp);\r\n this.initFrame();\r\n this.initTransform(data, globalData, comp);\r\n this.initHierarchy();\r\n }\r\n\r\n NullElement.prototype.prepareFrame = function (num) {\r\n this.prepareProperties(num, true);\r\n };\r\n\r\n NullElement.prototype.renderFrame = function () {};\r\n\r\n NullElement.prototype.getBaseElement = function () {\r\n return null;\r\n };\r\n\r\n NullElement.prototype.destroy = function () {};\r\n\r\n NullElement.prototype.sourceRectAtTime = function () {};\r\n\r\n NullElement.prototype.hide = function () {};\r\n\r\n extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);\r\n\r\n function SVGRendererBase() {}\r\n\r\n extendPrototype([BaseRenderer], SVGRendererBase);\r\n\r\n SVGRendererBase.prototype.createNull = function (data) {\r\n return new NullElement(data, this.globalData, this);\r\n };\r\n\r\n SVGRendererBase.prototype.createShape = function (data) {\r\n return new SVGShapeElement(data, this.globalData, this);\r\n };\r\n\r\n SVGRendererBase.prototype.createText = function (data) {\r\n return new SVGTextLottieElement(data, this.globalData, this);\r\n };\r\n\r\n SVGRendererBase.prototype.createImage = function (data) {\r\n return new IImageElement(data, this.globalData, this);\r\n };\r\n\r\n SVGRendererBase.prototype.createSolid = function (data) {\r\n return new ISolidElement(data, this.globalData, this);\r\n };\r\n\r\n SVGRendererBase.prototype.configAnimation = function (animData) {\r\n this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\r\n this.svgElement.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\r\n\r\n if (this.renderConfig.viewBoxSize) {\r\n this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);\r\n } else {\r\n this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);\r\n }\r\n\r\n if (!this.renderConfig.viewBoxOnly) {\r\n this.svgElement.setAttribute('width', animData.w);\r\n this.svgElement.setAttribute('height', animData.h);\r\n this.svgElement.style.width = '100%';\r\n this.svgElement.style.height = '100%';\r\n this.svgElement.style.transform = 'translate3d(0,0,0)';\r\n this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;\r\n }\r\n\r\n if (this.renderConfig.width) {\r\n this.svgElement.setAttribute('width', this.renderConfig.width);\r\n }\r\n\r\n if (this.renderConfig.height) {\r\n this.svgElement.setAttribute('height', this.renderConfig.height);\r\n }\r\n\r\n if (this.renderConfig.className) {\r\n this.svgElement.setAttribute('class', this.renderConfig.className);\r\n }\r\n\r\n if (this.renderConfig.id) {\r\n this.svgElement.setAttribute('id', this.renderConfig.id);\r\n }\r\n\r\n if (this.renderConfig.focusable !== undefined) {\r\n this.svgElement.setAttribute('focusable', this.renderConfig.focusable);\r\n }\r\n\r\n this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio); // this.layerElement.style.transform = 'translate3d(0,0,0)';\r\n // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = \"0px 0px 0px\";\r\n\r\n this.animationItem.wrapper.appendChild(this.svgElement); // Mask animation\r\n\r\n var defs = this.globalData.defs;\r\n this.setupGlobalData(animData, defs);\r\n this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;\r\n this.data = animData;\r\n var maskElement = createNS('clipPath');\r\n var rect = createNS('rect');\r\n rect.setAttribute('width', animData.w);\r\n rect.setAttribute('height', animData.h);\r\n rect.setAttribute('x', 0);\r\n rect.setAttribute('y', 0);\r\n var maskId = createElementID();\r\n maskElement.setAttribute('id', maskId);\r\n maskElement.appendChild(rect);\r\n this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + maskId + ')');\r\n defs.appendChild(maskElement);\r\n this.layers = animData.layers;\r\n this.elements = createSizedArray(animData.layers.length);\r\n };\r\n\r\n SVGRendererBase.prototype.destroy = function () {\r\n if (this.animationItem.wrapper) {\r\n this.animationItem.wrapper.innerText = '';\r\n }\r\n\r\n this.layerElement = null;\r\n this.globalData.defs = null;\r\n var i;\r\n var len = this.layers ? this.layers.length : 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.elements[i]) {\r\n this.elements[i].destroy();\r\n }\r\n }\r\n\r\n this.elements.length = 0;\r\n this.destroyed = true;\r\n this.animationItem = null;\r\n };\r\n\r\n SVGRendererBase.prototype.updateContainerSize = function () {};\r\n\r\n SVGRendererBase.prototype.findIndexByInd = function (ind) {\r\n var i = 0;\r\n var len = this.layers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.layers[i].ind === ind) {\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n };\r\n\r\n SVGRendererBase.prototype.buildItem = function (pos) {\r\n var elements = this.elements;\r\n\r\n if (elements[pos] || this.layers[pos].ty === 99) {\r\n return;\r\n }\r\n\r\n elements[pos] = true;\r\n var element = this.createItem(this.layers[pos]);\r\n elements[pos] = element;\r\n\r\n if (getExpressionsPlugin()) {\r\n if (this.layers[pos].ty === 0) {\r\n this.globalData.projectInterface.registerComposition(element);\r\n }\r\n\r\n element.initExpressions();\r\n }\r\n\r\n this.appendElementInPos(element, pos);\r\n\r\n if (this.layers[pos].tt) {\r\n var elementIndex = 'tp' in this.layers[pos] ? this.findIndexByInd(this.layers[pos].tp) : pos - 1;\r\n\r\n if (elementIndex === -1) {\r\n return;\r\n }\r\n\r\n if (!this.elements[elementIndex] || this.elements[elementIndex] === true) {\r\n this.buildItem(elementIndex);\r\n this.addPendingElement(element);\r\n } else {\r\n var matteElement = elements[elementIndex];\r\n var matteMask = matteElement.getMatte(this.layers[pos].tt);\r\n element.setMatte(matteMask);\r\n }\r\n }\r\n };\r\n\r\n SVGRendererBase.prototype.checkPendingElements = function () {\r\n while (this.pendingElements.length) {\r\n var element = this.pendingElements.pop();\r\n element.checkParenting();\r\n\r\n if (element.data.tt) {\r\n var i = 0;\r\n var len = this.elements.length;\r\n\r\n while (i < len) {\r\n if (this.elements[i] === element) {\r\n var elementIndex = 'tp' in element.data ? this.findIndexByInd(element.data.tp) : i - 1;\r\n var matteElement = this.elements[elementIndex];\r\n var matteMask = matteElement.getMatte(this.layers[i].tt);\r\n element.setMatte(matteMask);\r\n break;\r\n }\r\n\r\n i += 1;\r\n }\r\n }\r\n }\r\n };\r\n\r\n SVGRendererBase.prototype.renderFrame = function (num) {\r\n if (this.renderedFrame === num || this.destroyed) {\r\n return;\r\n }\r\n\r\n if (num === null) {\r\n num = this.renderedFrame;\r\n } else {\r\n this.renderedFrame = num;\r\n } // console.log('-------');\r\n // console.log('FRAME ',num);\r\n\r\n\r\n this.globalData.frameNum = num;\r\n this.globalData.frameId += 1;\r\n this.globalData.projectInterface.currentFrame = num;\r\n this.globalData._mdf = false;\r\n var i;\r\n var len = this.layers.length;\r\n\r\n if (!this.completeLayers) {\r\n this.checkLayers(num);\r\n }\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].prepareFrame(num - this.layers[i].st);\r\n }\r\n }\r\n\r\n if (this.globalData._mdf) {\r\n for (i = 0; i < len; i += 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].renderFrame();\r\n }\r\n }\r\n }\r\n };\r\n\r\n SVGRendererBase.prototype.appendElementInPos = function (element, pos) {\r\n var newElement = element.getBaseElement();\r\n\r\n if (!newElement) {\r\n return;\r\n }\r\n\r\n var i = 0;\r\n var nextElement;\r\n\r\n while (i < pos) {\r\n if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {\r\n nextElement = this.elements[i].getBaseElement();\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n if (nextElement) {\r\n this.layerElement.insertBefore(newElement, nextElement);\r\n } else {\r\n this.layerElement.appendChild(newElement);\r\n }\r\n };\r\n\r\n SVGRendererBase.prototype.hide = function () {\r\n this.layerElement.style.display = 'none';\r\n };\r\n\r\n SVGRendererBase.prototype.show = function () {\r\n this.layerElement.style.display = 'block';\r\n };\r\n\r\n function ICompElement() {}\r\n\r\n extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);\r\n\r\n ICompElement.prototype.initElement = function (data, globalData, comp) {\r\n this.initFrame();\r\n this.initBaseData(data, globalData, comp);\r\n this.initTransform(data, globalData, comp);\r\n this.initRenderable();\r\n this.initHierarchy();\r\n this.initRendererElement();\r\n this.createContainerElements();\r\n this.createRenderableComponents();\r\n\r\n if (this.data.xt || !globalData.progressiveLoad) {\r\n this.buildAllItems();\r\n }\r\n\r\n this.hide();\r\n };\r\n /* ICompElement.prototype.hide = function(){\r\n if(!this.hidden){\r\n this.hideElement();\r\n var i,len = this.elements.length;\r\n for( i = 0; i < len; i+=1 ){\r\n if(this.elements[i]){\r\n this.elements[i].hide();\r\n }\r\n }\r\n }\r\n }; */\r\n\r\n\r\n ICompElement.prototype.prepareFrame = function (num) {\r\n this._mdf = false;\r\n this.prepareRenderableFrame(num);\r\n this.prepareProperties(num, this.isInRange);\r\n\r\n if (!this.isInRange && !this.data.xt) {\r\n return;\r\n }\r\n\r\n if (!this.tm._placeholder) {\r\n var timeRemapped = this.tm.v;\r\n\r\n if (timeRemapped === this.data.op) {\r\n timeRemapped = this.data.op - 1;\r\n }\r\n\r\n this.renderedFrame = timeRemapped;\r\n } else {\r\n this.renderedFrame = num / this.data.sr;\r\n }\r\n\r\n var i;\r\n var len = this.elements.length;\r\n\r\n if (!this.completeLayers) {\r\n this.checkLayers(this.renderedFrame);\r\n } // This iteration needs to be backwards because of how expressions connect between each other\r\n\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);\r\n\r\n if (this.elements[i]._mdf) {\r\n this._mdf = true;\r\n }\r\n }\r\n }\r\n };\r\n\r\n ICompElement.prototype.renderInnerContent = function () {\r\n var i;\r\n var len = this.layers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].renderFrame();\r\n }\r\n }\r\n };\r\n\r\n ICompElement.prototype.setElements = function (elems) {\r\n this.elements = elems;\r\n };\r\n\r\n ICompElement.prototype.getElements = function () {\r\n return this.elements;\r\n };\r\n\r\n ICompElement.prototype.destroyElements = function () {\r\n var i;\r\n var len = this.layers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.elements[i]) {\r\n this.elements[i].destroy();\r\n }\r\n }\r\n };\r\n\r\n ICompElement.prototype.destroy = function () {\r\n this.destroyElements();\r\n this.destroyBaseElement();\r\n };\r\n\r\n function SVGCompElement(data, globalData, comp) {\r\n this.layers = data.layers;\r\n this.supports3d = true;\r\n this.completeLayers = false;\r\n this.pendingElements = [];\r\n this.elements = this.layers ? createSizedArray(this.layers.length) : [];\r\n this.initElement(data, globalData, comp);\r\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\r\n _placeholder: true\r\n };\r\n }\r\n\r\n extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement);\r\n\r\n SVGCompElement.prototype.createComp = function (data) {\r\n return new SVGCompElement(data, this.globalData, this);\r\n };\r\n\r\n function SVGRenderer(animationItem, config) {\r\n this.animationItem = animationItem;\r\n this.layers = null;\r\n this.renderedFrame = -1;\r\n this.svgElement = createNS('svg');\r\n var ariaLabel = '';\r\n\r\n if (config && config.title) {\r\n var titleElement = createNS('title');\r\n var titleId = createElementID();\r\n titleElement.setAttribute('id', titleId);\r\n titleElement.textContent = config.title;\r\n this.svgElement.appendChild(titleElement);\r\n ariaLabel += titleId;\r\n }\r\n\r\n if (config && config.description) {\r\n var descElement = createNS('desc');\r\n var descId = createElementID();\r\n descElement.setAttribute('id', descId);\r\n descElement.textContent = config.description;\r\n this.svgElement.appendChild(descElement);\r\n ariaLabel += ' ' + descId;\r\n }\r\n\r\n if (ariaLabel) {\r\n this.svgElement.setAttribute('aria-labelledby', ariaLabel);\r\n }\r\n\r\n var defs = createNS('defs');\r\n this.svgElement.appendChild(defs);\r\n var maskElement = createNS('g');\r\n this.svgElement.appendChild(maskElement);\r\n this.layerElement = maskElement;\r\n this.renderConfig = {\r\n preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',\r\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\r\n contentVisibility: config && config.contentVisibility || 'visible',\r\n progressiveLoad: config && config.progressiveLoad || false,\r\n hideOnTransparent: !(config && config.hideOnTransparent === false),\r\n viewBoxOnly: config && config.viewBoxOnly || false,\r\n viewBoxSize: config && config.viewBoxSize || false,\r\n className: config && config.className || '',\r\n id: config && config.id || '',\r\n focusable: config && config.focusable,\r\n filterSize: {\r\n width: config && config.filterSize && config.filterSize.width || '100%',\r\n height: config && config.filterSize && config.filterSize.height || '100%',\r\n x: config && config.filterSize && config.filterSize.x || '0%',\r\n y: config && config.filterSize && config.filterSize.y || '0%'\r\n },\r\n width: config && config.width,\r\n height: config && config.height,\r\n runExpressions: !config || config.runExpressions === undefined || config.runExpressions\r\n };\r\n this.globalData = {\r\n _mdf: false,\r\n frameNum: -1,\r\n defs: defs,\r\n renderConfig: this.renderConfig\r\n };\r\n this.elements = [];\r\n this.pendingElements = [];\r\n this.destroyed = false;\r\n this.rendererType = 'svg';\r\n }\r\n\r\n extendPrototype([SVGRendererBase], SVGRenderer);\r\n\r\n SVGRenderer.prototype.createComp = function (data) {\r\n return new SVGCompElement(data, this.globalData, this);\r\n };\r\n\r\n function CVContextData() {\r\n this.saved = [];\r\n this.cArrPos = 0;\r\n this.cTr = new Matrix();\r\n this.cO = 1;\r\n var i;\r\n var len = 15;\r\n this.savedOp = createTypedArray('float32', len);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.saved[i] = createTypedArray('float32', 16);\r\n }\r\n\r\n this._length = len;\r\n }\r\n\r\n CVContextData.prototype.duplicate = function () {\r\n var newLength = this._length * 2;\r\n var currentSavedOp = this.savedOp;\r\n this.savedOp = createTypedArray('float32', newLength);\r\n this.savedOp.set(currentSavedOp);\r\n var i = 0;\r\n\r\n for (i = this._length; i < newLength; i += 1) {\r\n this.saved[i] = createTypedArray('float32', 16);\r\n }\r\n\r\n this._length = newLength;\r\n };\r\n\r\n CVContextData.prototype.reset = function () {\r\n this.cArrPos = 0;\r\n this.cTr.reset();\r\n this.cO = 1;\r\n };\r\n\r\n function ShapeTransformManager() {\r\n this.sequences = {};\r\n this.sequenceList = [];\r\n this.transform_key_count = 0;\r\n }\r\n\r\n ShapeTransformManager.prototype = {\r\n addTransformSequence: function addTransformSequence(transforms) {\r\n var i;\r\n var len = transforms.length;\r\n var key = '_';\r\n\r\n for (i = 0; i < len; i += 1) {\r\n key += transforms[i].transform.key + '_';\r\n }\r\n\r\n var sequence = this.sequences[key];\r\n\r\n if (!sequence) {\r\n sequence = {\r\n transforms: [].concat(transforms),\r\n finalTransform: new Matrix(),\r\n _mdf: false\r\n };\r\n this.sequences[key] = sequence;\r\n this.sequenceList.push(sequence);\r\n }\r\n\r\n return sequence;\r\n },\r\n processSequence: function processSequence(sequence, isFirstFrame) {\r\n var i = 0;\r\n var len = sequence.transforms.length;\r\n var _mdf = isFirstFrame;\r\n\r\n while (i < len && !isFirstFrame) {\r\n if (sequence.transforms[i].transform.mProps._mdf) {\r\n _mdf = true;\r\n break;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n if (_mdf) {\r\n var props;\r\n sequence.finalTransform.reset();\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n props = sequence.transforms[i].transform.mProps.v.props;\r\n sequence.finalTransform.transform(props[0], props[1], props[2], props[3], props[4], props[5], props[6], props[7], props[8], props[9], props[10], props[11], props[12], props[13], props[14], props[15]);\r\n }\r\n }\r\n\r\n sequence._mdf = _mdf;\r\n },\r\n processSequences: function processSequences(isFirstFrame) {\r\n var i;\r\n var len = this.sequenceList.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.processSequence(this.sequenceList[i], isFirstFrame);\r\n }\r\n },\r\n getNewKey: function getNewKey() {\r\n this.transform_key_count += 1;\r\n return '_' + this.transform_key_count;\r\n }\r\n };\r\n\r\n function CVEffects() {}\r\n\r\n CVEffects.prototype.renderFrame = function () {};\r\n\r\n function CVMaskElement(data, element) {\r\n this.data = data;\r\n this.element = element;\r\n this.masksProperties = this.data.masksProperties || [];\r\n this.viewData = createSizedArray(this.masksProperties.length);\r\n var i;\r\n var len = this.masksProperties.length;\r\n var hasMasks = false;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.masksProperties[i].mode !== 'n') {\r\n hasMasks = true;\r\n }\r\n\r\n this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3);\r\n }\r\n\r\n this.hasMasks = hasMasks;\r\n\r\n if (hasMasks) {\r\n this.element.addRenderableComponent(this);\r\n }\r\n }\r\n\r\n CVMaskElement.prototype.renderFrame = function () {\r\n if (!this.hasMasks) {\r\n return;\r\n }\r\n\r\n var transform = this.element.finalTransform.mat;\r\n var ctx = this.element.canvasContext;\r\n var i;\r\n var len = this.masksProperties.length;\r\n var pt;\r\n var pts;\r\n var data;\r\n ctx.beginPath();\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.masksProperties[i].mode !== 'n') {\r\n if (this.masksProperties[i].inv) {\r\n ctx.moveTo(0, 0);\r\n ctx.lineTo(this.element.globalData.compSize.w, 0);\r\n ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h);\r\n ctx.lineTo(0, this.element.globalData.compSize.h);\r\n ctx.lineTo(0, 0);\r\n }\r\n\r\n data = this.viewData[i].v;\r\n pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0);\r\n ctx.moveTo(pt[0], pt[1]);\r\n var j;\r\n var jLen = data._length;\r\n\r\n for (j = 1; j < jLen; j += 1) {\r\n pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]);\r\n ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);\r\n }\r\n\r\n pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]);\r\n ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);\r\n }\r\n }\r\n\r\n this.element.globalData.renderer.save(true);\r\n ctx.clip();\r\n };\r\n\r\n CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty;\r\n\r\n CVMaskElement.prototype.destroy = function () {\r\n this.element = null;\r\n };\r\n\r\n function CVBaseElement() {}\r\n\r\n CVBaseElement.prototype = {\r\n createElements: function createElements() {},\r\n initRendererElement: function initRendererElement() {},\r\n createContainerElements: function createContainerElements() {\r\n this.canvasContext = this.globalData.canvasContext;\r\n this.renderableEffectsManager = new CVEffects(this);\r\n },\r\n createContent: function createContent() {},\r\n setBlendMode: function setBlendMode() {\r\n var globalData = this.globalData;\r\n\r\n if (globalData.blendMode !== this.data.bm) {\r\n globalData.blendMode = this.data.bm;\r\n var blendModeValue = getBlendMode(this.data.bm);\r\n globalData.canvasContext.globalCompositeOperation = blendModeValue;\r\n }\r\n },\r\n createRenderableComponents: function createRenderableComponents() {\r\n this.maskManager = new CVMaskElement(this.data, this);\r\n },\r\n hideElement: function hideElement() {\r\n if (!this.hidden && (!this.isInRange || this.isTransparent)) {\r\n this.hidden = true;\r\n }\r\n },\r\n showElement: function showElement() {\r\n if (this.isInRange && !this.isTransparent) {\r\n this.hidden = false;\r\n this._isFirstFrame = true;\r\n this.maskManager._isFirstFrame = true;\r\n }\r\n },\r\n renderFrame: function renderFrame() {\r\n if (this.hidden || this.data.hd) {\r\n return;\r\n }\r\n\r\n this.renderTransform();\r\n this.renderRenderable();\r\n this.setBlendMode();\r\n var forceRealStack = this.data.ty === 0;\r\n this.globalData.renderer.save(forceRealStack);\r\n this.globalData.renderer.ctxTransform(this.finalTransform.mat.props);\r\n this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v);\r\n this.renderInnerContent();\r\n this.globalData.renderer.restore(forceRealStack);\r\n\r\n if (this.maskManager.hasMasks) {\r\n this.globalData.renderer.restore(true);\r\n }\r\n\r\n if (this._isFirstFrame) {\r\n this._isFirstFrame = false;\r\n }\r\n },\r\n destroy: function destroy() {\r\n this.canvasContext = null;\r\n this.data = null;\r\n this.globalData = null;\r\n this.maskManager.destroy();\r\n },\r\n mHelper: new Matrix()\r\n };\r\n CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;\r\n CVBaseElement.prototype.show = CVBaseElement.prototype.showElement;\r\n\r\n function CVShapeData(element, data, styles, transformsManager) {\r\n this.styledShapes = [];\r\n this.tr = [0, 0, 0, 0, 0, 0];\r\n var ty = 4;\r\n\r\n if (data.ty === 'rc') {\r\n ty = 5;\r\n } else if (data.ty === 'el') {\r\n ty = 6;\r\n } else if (data.ty === 'sr') {\r\n ty = 7;\r\n }\r\n\r\n this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element);\r\n var i;\r\n var len = styles.length;\r\n var styledShape;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (!styles[i].closed) {\r\n styledShape = {\r\n transforms: transformsManager.addTransformSequence(styles[i].transforms),\r\n trNodes: []\r\n };\r\n this.styledShapes.push(styledShape);\r\n styles[i].elements.push(styledShape);\r\n }\r\n }\r\n }\r\n\r\n CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;\r\n\r\n function CVShapeElement(data, globalData, comp) {\r\n this.shapes = [];\r\n this.shapesData = data.shapes;\r\n this.stylesList = [];\r\n this.itemsData = [];\r\n this.prevViewData = [];\r\n this.shapeModifiers = [];\r\n this.processedElements = [];\r\n this.transformsManager = new ShapeTransformManager();\r\n this.initElement(data, globalData, comp);\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement);\r\n CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement;\r\n CVShapeElement.prototype.transformHelper = {\r\n opacity: 1,\r\n _opMdf: false\r\n };\r\n CVShapeElement.prototype.dashResetter = [];\r\n\r\n CVShapeElement.prototype.createContent = function () {\r\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);\r\n };\r\n\r\n CVShapeElement.prototype.createStyleElement = function (data, transforms) {\r\n var styleElem = {\r\n data: data,\r\n type: data.ty,\r\n preTransforms: this.transformsManager.addTransformSequence(transforms),\r\n transforms: [],\r\n elements: [],\r\n closed: data.hd === true\r\n };\r\n var elementData = {};\r\n\r\n if (data.ty === 'fl' || data.ty === 'st') {\r\n elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this);\r\n\r\n if (!elementData.c.k) {\r\n styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')';\r\n }\r\n } else if (data.ty === 'gf' || data.ty === 'gs') {\r\n elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this);\r\n elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this);\r\n elementData.h = PropertyFactory.getProp(this, data.h || {\r\n k: 0\r\n }, 0, 0.01, this);\r\n elementData.a = PropertyFactory.getProp(this, data.a || {\r\n k: 0\r\n }, 0, degToRads, this);\r\n elementData.g = new GradientProperty(this, data.g, this);\r\n }\r\n\r\n elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this);\r\n\r\n if (data.ty === 'st' || data.ty === 'gs') {\r\n styleElem.lc = lineCapEnum[data.lc || 2];\r\n styleElem.lj = lineJoinEnum[data.lj || 2];\r\n\r\n if (data.lj == 1) {\r\n // eslint-disable-line eqeqeq\r\n styleElem.ml = data.ml;\r\n }\r\n\r\n elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this);\r\n\r\n if (!elementData.w.k) {\r\n styleElem.wi = elementData.w.v;\r\n }\r\n\r\n if (data.d) {\r\n var d = new DashProperty(this, data.d, 'canvas', this);\r\n elementData.d = d;\r\n\r\n if (!elementData.d.k) {\r\n styleElem.da = elementData.d.dashArray;\r\n styleElem[\"do\"] = elementData.d.dashoffset[0];\r\n }\r\n }\r\n } else {\r\n styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero';\r\n }\r\n\r\n this.stylesList.push(styleElem);\r\n elementData.style = styleElem;\r\n return elementData;\r\n };\r\n\r\n CVShapeElement.prototype.createGroupElement = function () {\r\n var elementData = {\r\n it: [],\r\n prevViewData: []\r\n };\r\n return elementData;\r\n };\r\n\r\n CVShapeElement.prototype.createTransformElement = function (data) {\r\n var elementData = {\r\n transform: {\r\n opacity: 1,\r\n _opMdf: false,\r\n key: this.transformsManager.getNewKey(),\r\n op: PropertyFactory.getProp(this, data.o, 0, 0.01, this),\r\n mProps: TransformPropertyFactory.getTransformProperty(this, data, this)\r\n }\r\n };\r\n return elementData;\r\n };\r\n\r\n CVShapeElement.prototype.createShapeElement = function (data) {\r\n var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager);\r\n this.shapes.push(elementData);\r\n this.addShapeToModifiers(elementData);\r\n return elementData;\r\n };\r\n\r\n CVShapeElement.prototype.reloadShapes = function () {\r\n this._isFirstFrame = true;\r\n var i;\r\n var len = this.itemsData.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.prevViewData[i] = this.itemsData[i];\r\n }\r\n\r\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);\r\n len = this.dynamicProperties.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.dynamicProperties[i].getValue();\r\n }\r\n\r\n this.renderModifiers();\r\n this.transformsManager.processSequences(this._isFirstFrame);\r\n };\r\n\r\n CVShapeElement.prototype.addTransformToStyleList = function (transform) {\r\n var i;\r\n var len = this.stylesList.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (!this.stylesList[i].closed) {\r\n this.stylesList[i].transforms.push(transform);\r\n }\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.removeTransformFromStyleList = function () {\r\n var i;\r\n var len = this.stylesList.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (!this.stylesList[i].closed) {\r\n this.stylesList[i].transforms.pop();\r\n }\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.closeStyles = function (styles) {\r\n var i;\r\n var len = styles.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n styles[i].closed = true;\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) {\r\n var i;\r\n var len = arr.length - 1;\r\n var j;\r\n var jLen;\r\n var ownStyles = [];\r\n var ownModifiers = [];\r\n var processedPos;\r\n var modifier;\r\n var currentTransform;\r\n var ownTransforms = [].concat(transforms);\r\n\r\n for (i = len; i >= 0; i -= 1) {\r\n processedPos = this.searchProcessedElement(arr[i]);\r\n\r\n if (!processedPos) {\r\n arr[i]._shouldRender = shouldRender;\r\n } else {\r\n itemsData[i] = prevViewData[processedPos - 1];\r\n }\r\n\r\n if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createStyleElement(arr[i], ownTransforms);\r\n } else {\r\n itemsData[i].style.closed = false;\r\n }\r\n\r\n ownStyles.push(itemsData[i].style);\r\n } else if (arr[i].ty === 'gr') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createGroupElement(arr[i]);\r\n } else {\r\n jLen = itemsData[i].it.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n itemsData[i].prevViewData[j] = itemsData[i].it[j];\r\n }\r\n }\r\n\r\n this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms);\r\n } else if (arr[i].ty === 'tr') {\r\n if (!processedPos) {\r\n currentTransform = this.createTransformElement(arr[i]);\r\n itemsData[i] = currentTransform;\r\n }\r\n\r\n ownTransforms.push(itemsData[i]);\r\n this.addTransformToStyleList(itemsData[i]);\r\n } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {\r\n if (!processedPos) {\r\n itemsData[i] = this.createShapeElement(arr[i]);\r\n }\r\n } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb' || arr[i].ty === 'zz' || arr[i].ty === 'op') {\r\n if (!processedPos) {\r\n modifier = ShapeModifiers.getModifier(arr[i].ty);\r\n modifier.init(this, arr[i]);\r\n itemsData[i] = modifier;\r\n this.shapeModifiers.push(modifier);\r\n } else {\r\n modifier = itemsData[i];\r\n modifier.closed = false;\r\n }\r\n\r\n ownModifiers.push(modifier);\r\n } else if (arr[i].ty === 'rp') {\r\n if (!processedPos) {\r\n modifier = ShapeModifiers.getModifier(arr[i].ty);\r\n itemsData[i] = modifier;\r\n modifier.init(this, arr, i, itemsData);\r\n this.shapeModifiers.push(modifier);\r\n shouldRender = false;\r\n } else {\r\n modifier = itemsData[i];\r\n modifier.closed = true;\r\n }\r\n\r\n ownModifiers.push(modifier);\r\n }\r\n\r\n this.addProcessedElement(arr[i], i + 1);\r\n }\r\n\r\n this.removeTransformFromStyleList();\r\n this.closeStyles(ownStyles);\r\n len = ownModifiers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ownModifiers[i].closed = true;\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.renderInnerContent = function () {\r\n this.transformHelper.opacity = 1;\r\n this.transformHelper._opMdf = false;\r\n this.renderModifiers();\r\n this.transformsManager.processSequences(this._isFirstFrame);\r\n this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true);\r\n };\r\n\r\n CVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) {\r\n if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {\r\n groupTransform.opacity = parentTransform.opacity;\r\n groupTransform.opacity *= groupTransform.op.v;\r\n groupTransform._opMdf = true;\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.drawLayer = function () {\r\n var i;\r\n var len = this.stylesList.length;\r\n var j;\r\n var jLen;\r\n var k;\r\n var kLen;\r\n var elems;\r\n var nodes;\r\n var renderer = this.globalData.renderer;\r\n var ctx = this.globalData.canvasContext;\r\n var type;\r\n var currentStyle;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n currentStyle = this.stylesList[i];\r\n type = currentStyle.type; // Skipping style when\r\n // Stroke width equals 0\r\n // style should not be rendered (extra unused repeaters)\r\n // current opacity equals 0\r\n // global opacity equals 0\r\n\r\n if (!((type === 'st' || type === 'gs') && currentStyle.wi === 0 || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) {\r\n renderer.save();\r\n elems = currentStyle.elements;\r\n\r\n if (type === 'st' || type === 'gs') {\r\n ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd;\r\n ctx.lineWidth = currentStyle.wi;\r\n ctx.lineCap = currentStyle.lc;\r\n ctx.lineJoin = currentStyle.lj;\r\n ctx.miterLimit = currentStyle.ml || 0;\r\n } else {\r\n ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd;\r\n }\r\n\r\n renderer.ctxOpacity(currentStyle.coOp);\r\n\r\n if (type !== 'st' && type !== 'gs') {\r\n ctx.beginPath();\r\n }\r\n\r\n renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props);\r\n jLen = elems.length;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n if (type === 'st' || type === 'gs') {\r\n ctx.beginPath();\r\n\r\n if (currentStyle.da) {\r\n ctx.setLineDash(currentStyle.da);\r\n ctx.lineDashOffset = currentStyle[\"do\"];\r\n }\r\n }\r\n\r\n nodes = elems[j].trNodes;\r\n kLen = nodes.length;\r\n\r\n for (k = 0; k < kLen; k += 1) {\r\n if (nodes[k].t === 'm') {\r\n ctx.moveTo(nodes[k].p[0], nodes[k].p[1]);\r\n } else if (nodes[k].t === 'c') {\r\n ctx.bezierCurveTo(nodes[k].pts[0], nodes[k].pts[1], nodes[k].pts[2], nodes[k].pts[3], nodes[k].pts[4], nodes[k].pts[5]);\r\n } else {\r\n ctx.closePath();\r\n }\r\n }\r\n\r\n if (type === 'st' || type === 'gs') {\r\n ctx.stroke();\r\n\r\n if (currentStyle.da) {\r\n ctx.setLineDash(this.dashResetter);\r\n }\r\n }\r\n }\r\n\r\n if (type !== 'st' && type !== 'gs') {\r\n ctx.fill(currentStyle.r);\r\n }\r\n\r\n renderer.restore();\r\n }\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) {\r\n var i;\r\n var len = items.length - 1;\r\n var groupTransform;\r\n groupTransform = parentTransform;\r\n\r\n for (i = len; i >= 0; i -= 1) {\r\n if (items[i].ty === 'tr') {\r\n groupTransform = data[i].transform;\r\n this.renderShapeTransform(parentTransform, groupTransform);\r\n } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') {\r\n this.renderPath(items[i], data[i]);\r\n } else if (items[i].ty === 'fl') {\r\n this.renderFill(items[i], data[i], groupTransform);\r\n } else if (items[i].ty === 'st') {\r\n this.renderStroke(items[i], data[i], groupTransform);\r\n } else if (items[i].ty === 'gf' || items[i].ty === 'gs') {\r\n this.renderGradientFill(items[i], data[i], groupTransform);\r\n } else if (items[i].ty === 'gr') {\r\n this.renderShape(groupTransform, items[i].it, data[i].it);\r\n } else if (items[i].ty === 'tm') {//\r\n }\r\n }\r\n\r\n if (isMain) {\r\n this.drawLayer();\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.renderStyledShape = function (styledShape, shape) {\r\n if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) {\r\n var shapeNodes = styledShape.trNodes;\r\n var paths = shape.paths;\r\n var i;\r\n var len;\r\n var j;\r\n var jLen = paths._length;\r\n shapeNodes.length = 0;\r\n var groupTransformMat = styledShape.transforms.finalTransform;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n var pathNodes = paths.shapes[j];\r\n\r\n if (pathNodes && pathNodes.v) {\r\n len = pathNodes._length;\r\n\r\n for (i = 1; i < len; i += 1) {\r\n if (i === 1) {\r\n shapeNodes.push({\r\n t: 'm',\r\n p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)\r\n });\r\n }\r\n\r\n shapeNodes.push({\r\n t: 'c',\r\n pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i])\r\n });\r\n }\r\n\r\n if (len === 1) {\r\n shapeNodes.push({\r\n t: 'm',\r\n p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)\r\n });\r\n }\r\n\r\n if (pathNodes.c && len) {\r\n shapeNodes.push({\r\n t: 'c',\r\n pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0])\r\n });\r\n shapeNodes.push({\r\n t: 'z'\r\n });\r\n }\r\n }\r\n }\r\n\r\n styledShape.trNodes = shapeNodes;\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.renderPath = function (pathData, itemData) {\r\n if (pathData.hd !== true && pathData._shouldRender) {\r\n var i;\r\n var len = itemData.styledShapes.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.renderStyledShape(itemData.styledShapes[i], itemData.sh);\r\n }\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) {\r\n var styleElem = itemData.style;\r\n\r\n if (itemData.c._mdf || this._isFirstFrame) {\r\n styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';\r\n }\r\n\r\n if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {\r\n styleElem.coOp = itemData.o.v * groupTransform.opacity;\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) {\r\n var styleElem = itemData.style;\r\n var grd;\r\n\r\n if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf)) {\r\n var ctx = this.globalData.canvasContext;\r\n var pt1 = itemData.s.v;\r\n var pt2 = itemData.e.v;\r\n\r\n if (styleData.t === 1) {\r\n grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]);\r\n } else {\r\n var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\r\n var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);\r\n var percent = itemData.h.v;\r\n\r\n if (percent >= 1) {\r\n percent = 0.99;\r\n } else if (percent <= -1) {\r\n percent = -0.99;\r\n }\r\n\r\n var dist = rad * percent;\r\n var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];\r\n var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];\r\n grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad);\r\n }\r\n\r\n var i;\r\n var len = styleData.g.p;\r\n var cValues = itemData.g.c;\r\n var opacity = 1;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (itemData.g._hasOpacity && itemData.g._collapsable) {\r\n opacity = itemData.g.o[i * 2 + 1];\r\n }\r\n\r\n grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')');\r\n }\r\n\r\n styleElem.grd = grd;\r\n }\r\n\r\n styleElem.coOp = itemData.o.v * groupTransform.opacity;\r\n };\r\n\r\n CVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) {\r\n var styleElem = itemData.style;\r\n var d = itemData.d;\r\n\r\n if (d && (d._mdf || this._isFirstFrame)) {\r\n styleElem.da = d.dashArray;\r\n styleElem[\"do\"] = d.dashoffset[0];\r\n }\r\n\r\n if (itemData.c._mdf || this._isFirstFrame) {\r\n styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';\r\n }\r\n\r\n if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {\r\n styleElem.coOp = itemData.o.v * groupTransform.opacity;\r\n }\r\n\r\n if (itemData.w._mdf || this._isFirstFrame) {\r\n styleElem.wi = itemData.w.v;\r\n }\r\n };\r\n\r\n CVShapeElement.prototype.destroy = function () {\r\n this.shapesData = null;\r\n this.globalData = null;\r\n this.canvasContext = null;\r\n this.stylesList.length = 0;\r\n this.itemsData.length = 0;\r\n };\r\n\r\n function CVTextElement(data, globalData, comp) {\r\n this.textSpans = [];\r\n this.yOffset = 0;\r\n this.fillColorAnim = false;\r\n this.strokeColorAnim = false;\r\n this.strokeWidthAnim = false;\r\n this.stroke = false;\r\n this.fill = false;\r\n this.justifyOffset = 0;\r\n this.currentRender = null;\r\n this.renderType = 'canvas';\r\n this.values = {\r\n fill: 'rgba(0,0,0,0)',\r\n stroke: 'rgba(0,0,0,0)',\r\n sWidth: 0,\r\n fValue: ''\r\n };\r\n this.initElement(data, globalData, comp);\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement], CVTextElement);\r\n CVTextElement.prototype.tHelper = createTag('canvas').getContext('2d');\r\n\r\n CVTextElement.prototype.buildNewText = function () {\r\n var documentData = this.textProperty.currentData;\r\n this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);\r\n var hasFill = false;\r\n\r\n if (documentData.fc) {\r\n hasFill = true;\r\n this.values.fill = this.buildColor(documentData.fc);\r\n } else {\r\n this.values.fill = 'rgba(0,0,0,0)';\r\n }\r\n\r\n this.fill = hasFill;\r\n var hasStroke = false;\r\n\r\n if (documentData.sc) {\r\n hasStroke = true;\r\n this.values.stroke = this.buildColor(documentData.sc);\r\n this.values.sWidth = documentData.sw;\r\n }\r\n\r\n var fontData = this.globalData.fontManager.getFontByName(documentData.f);\r\n var i;\r\n var len;\r\n var letters = documentData.l;\r\n var matrixHelper = this.mHelper;\r\n this.stroke = hasStroke;\r\n this.values.fValue = documentData.finalSize + 'px ' + this.globalData.fontManager.getFontByName(documentData.f).fFamily;\r\n len = documentData.finalText.length; // this.tHelper.font = this.values.fValue;\r\n\r\n var charData;\r\n var shapeData;\r\n var k;\r\n var kLen;\r\n var shapes;\r\n var j;\r\n var jLen;\r\n var pathNodes;\r\n var commands;\r\n var pathArr;\r\n var singleShape = this.data.singleShape;\r\n var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;\r\n var xPos = 0;\r\n var yPos = 0;\r\n var firstLine = true;\r\n var cnt = 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\r\n shapeData = charData && charData.data || {};\r\n matrixHelper.reset();\r\n\r\n if (singleShape && letters[i].n) {\r\n xPos = -trackingOffset;\r\n yPos += documentData.yOffset;\r\n yPos += firstLine ? 1 : 0;\r\n firstLine = false;\r\n }\r\n\r\n shapes = shapeData.shapes ? shapeData.shapes[0].it : [];\r\n jLen = shapes.length;\r\n matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);\r\n\r\n if (singleShape) {\r\n this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);\r\n }\r\n\r\n commands = createSizedArray(jLen - 1);\r\n var commandsCounter = 0;\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n if (shapes[j].ty === 'sh') {\r\n kLen = shapes[j].ks.k.i.length;\r\n pathNodes = shapes[j].ks.k;\r\n pathArr = [];\r\n\r\n for (k = 1; k < kLen; k += 1) {\r\n if (k === 1) {\r\n pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));\r\n }\r\n\r\n pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToY(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToX(pathNodes.v[k][0], pathNodes.v[k][1], 0), matrixHelper.applyToY(pathNodes.v[k][0], pathNodes.v[k][1], 0));\r\n }\r\n\r\n pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToY(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));\r\n commands[commandsCounter] = pathArr;\r\n commandsCounter += 1;\r\n }\r\n }\r\n\r\n if (singleShape) {\r\n xPos += letters[i].l;\r\n xPos += trackingOffset;\r\n }\r\n\r\n if (this.textSpans[cnt]) {\r\n this.textSpans[cnt].elem = commands;\r\n } else {\r\n this.textSpans[cnt] = {\r\n elem: commands\r\n };\r\n }\r\n\r\n cnt += 1;\r\n }\r\n };\r\n\r\n CVTextElement.prototype.renderInnerContent = function () {\r\n var ctx = this.canvasContext;\r\n ctx.font = this.values.fValue;\r\n ctx.lineCap = 'butt';\r\n ctx.lineJoin = 'miter';\r\n ctx.miterLimit = 4;\r\n\r\n if (!this.data.singleShape) {\r\n this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\r\n }\r\n\r\n var i;\r\n var len;\r\n var j;\r\n var jLen;\r\n var k;\r\n var kLen;\r\n var renderedLetters = this.textAnimator.renderedLetters;\r\n var letters = this.textProperty.currentData.l;\r\n len = letters.length;\r\n var renderedLetter;\r\n var lastFill = null;\r\n var lastStroke = null;\r\n var lastStrokeW = null;\r\n var commands;\r\n var pathArr;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (!letters[i].n) {\r\n renderedLetter = renderedLetters[i];\r\n\r\n if (renderedLetter) {\r\n this.globalData.renderer.save();\r\n this.globalData.renderer.ctxTransform(renderedLetter.p);\r\n this.globalData.renderer.ctxOpacity(renderedLetter.o);\r\n }\r\n\r\n if (this.fill) {\r\n if (renderedLetter && renderedLetter.fc) {\r\n if (lastFill !== renderedLetter.fc) {\r\n lastFill = renderedLetter.fc;\r\n ctx.fillStyle = renderedLetter.fc;\r\n }\r\n } else if (lastFill !== this.values.fill) {\r\n lastFill = this.values.fill;\r\n ctx.fillStyle = this.values.fill;\r\n }\r\n\r\n commands = this.textSpans[i].elem;\r\n jLen = commands.length;\r\n this.globalData.canvasContext.beginPath();\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n pathArr = commands[j];\r\n kLen = pathArr.length;\r\n this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);\r\n\r\n for (k = 2; k < kLen; k += 6) {\r\n this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);\r\n }\r\n }\r\n\r\n this.globalData.canvasContext.closePath();\r\n this.globalData.canvasContext.fill(); /// ctx.fillText(this.textSpans[i].val,0,0);\r\n }\r\n\r\n if (this.stroke) {\r\n if (renderedLetter && renderedLetter.sw) {\r\n if (lastStrokeW !== renderedLetter.sw) {\r\n lastStrokeW = renderedLetter.sw;\r\n ctx.lineWidth = renderedLetter.sw;\r\n }\r\n } else if (lastStrokeW !== this.values.sWidth) {\r\n lastStrokeW = this.values.sWidth;\r\n ctx.lineWidth = this.values.sWidth;\r\n }\r\n\r\n if (renderedLetter && renderedLetter.sc) {\r\n if (lastStroke !== renderedLetter.sc) {\r\n lastStroke = renderedLetter.sc;\r\n ctx.strokeStyle = renderedLetter.sc;\r\n }\r\n } else if (lastStroke !== this.values.stroke) {\r\n lastStroke = this.values.stroke;\r\n ctx.strokeStyle = this.values.stroke;\r\n }\r\n\r\n commands = this.textSpans[i].elem;\r\n jLen = commands.length;\r\n this.globalData.canvasContext.beginPath();\r\n\r\n for (j = 0; j < jLen; j += 1) {\r\n pathArr = commands[j];\r\n kLen = pathArr.length;\r\n this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);\r\n\r\n for (k = 2; k < kLen; k += 6) {\r\n this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);\r\n }\r\n }\r\n\r\n this.globalData.canvasContext.closePath();\r\n this.globalData.canvasContext.stroke(); /// ctx.strokeText(letters[i].val,0,0);\r\n }\r\n\r\n if (renderedLetter) {\r\n this.globalData.renderer.restore();\r\n }\r\n }\r\n }\r\n };\r\n\r\n function CVImageElement(data, globalData, comp) {\r\n this.assetData = globalData.getAssetData(data.refId);\r\n this.img = globalData.imageLoader.getAsset(this.assetData);\r\n this.initElement(data, globalData, comp);\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement);\r\n CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement;\r\n CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;\r\n\r\n CVImageElement.prototype.createContent = function () {\r\n if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) {\r\n var canvas = createTag('canvas');\r\n canvas.width = this.assetData.w;\r\n canvas.height = this.assetData.h;\r\n var ctx = canvas.getContext('2d');\r\n var imgW = this.img.width;\r\n var imgH = this.img.height;\r\n var imgRel = imgW / imgH;\r\n var canvasRel = this.assetData.w / this.assetData.h;\r\n var widthCrop;\r\n var heightCrop;\r\n var par = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio;\r\n\r\n if (imgRel > canvasRel && par === 'xMidYMid slice' || imgRel < canvasRel && par !== 'xMidYMid slice') {\r\n heightCrop = imgH;\r\n widthCrop = heightCrop * canvasRel;\r\n } else {\r\n widthCrop = imgW;\r\n heightCrop = widthCrop / canvasRel;\r\n }\r\n\r\n ctx.drawImage(this.img, (imgW - widthCrop) / 2, (imgH - heightCrop) / 2, widthCrop, heightCrop, 0, 0, this.assetData.w, this.assetData.h);\r\n this.img = canvas;\r\n }\r\n };\r\n\r\n CVImageElement.prototype.renderInnerContent = function () {\r\n this.canvasContext.drawImage(this.img, 0, 0);\r\n };\r\n\r\n CVImageElement.prototype.destroy = function () {\r\n this.img = null;\r\n };\r\n\r\n function CVSolidElement(data, globalData, comp) {\r\n this.initElement(data, globalData, comp);\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);\r\n CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;\r\n CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;\r\n\r\n CVSolidElement.prototype.renderInnerContent = function () {\r\n var ctx = this.canvasContext;\r\n ctx.fillStyle = this.data.sc;\r\n ctx.fillRect(0, 0, this.data.sw, this.data.sh); //\r\n };\r\n\r\n function CanvasRendererBase(animationItem, config) {\r\n this.animationItem = animationItem;\r\n this.renderConfig = {\r\n clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,\r\n context: config && config.context || null,\r\n progressiveLoad: config && config.progressiveLoad || false,\r\n preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',\r\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\r\n contentVisibility: config && config.contentVisibility || 'visible',\r\n className: config && config.className || '',\r\n id: config && config.id || ''\r\n };\r\n this.renderConfig.dpr = config && config.dpr || 1;\r\n\r\n if (this.animationItem.wrapper) {\r\n this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;\r\n }\r\n\r\n this.renderedFrame = -1;\r\n this.globalData = {\r\n frameNum: -1,\r\n _mdf: false,\r\n renderConfig: this.renderConfig,\r\n currentGlobalAlpha: -1\r\n };\r\n this.contextData = new CVContextData();\r\n this.elements = [];\r\n this.pendingElements = [];\r\n this.transformMat = new Matrix();\r\n this.completeLayers = false;\r\n this.rendererType = 'canvas';\r\n }\r\n\r\n extendPrototype([BaseRenderer], CanvasRendererBase);\r\n\r\n CanvasRendererBase.prototype.createShape = function (data) {\r\n return new CVShapeElement(data, this.globalData, this);\r\n };\r\n\r\n CanvasRendererBase.prototype.createText = function (data) {\r\n return new CVTextElement(data, this.globalData, this);\r\n };\r\n\r\n CanvasRendererBase.prototype.createImage = function (data) {\r\n return new CVImageElement(data, this.globalData, this);\r\n };\r\n\r\n CanvasRendererBase.prototype.createSolid = function (data) {\r\n return new CVSolidElement(data, this.globalData, this);\r\n };\r\n\r\n CanvasRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;\r\n\r\n CanvasRendererBase.prototype.ctxTransform = function (props) {\r\n if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) {\r\n return;\r\n }\r\n\r\n if (!this.renderConfig.clearCanvas) {\r\n this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]);\r\n return;\r\n }\r\n\r\n this.transformMat.cloneFromProps(props);\r\n var cProps = this.contextData.cTr.props;\r\n this.transformMat.transform(cProps[0], cProps[1], cProps[2], cProps[3], cProps[4], cProps[5], cProps[6], cProps[7], cProps[8], cProps[9], cProps[10], cProps[11], cProps[12], cProps[13], cProps[14], cProps[15]); // this.contextData.cTr.transform(props[0],props[1],props[2],props[3],props[4],props[5],props[6],props[7],props[8],props[9],props[10],props[11],props[12],props[13],props[14],props[15]);\r\n\r\n this.contextData.cTr.cloneFromProps(this.transformMat.props);\r\n var trProps = this.contextData.cTr.props;\r\n this.canvasContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]);\r\n };\r\n\r\n CanvasRendererBase.prototype.ctxOpacity = function (op) {\r\n /* if(op === 1){\r\n return;\r\n } */\r\n if (!this.renderConfig.clearCanvas) {\r\n this.canvasContext.globalAlpha *= op < 0 ? 0 : op;\r\n this.globalData.currentGlobalAlpha = this.contextData.cO;\r\n return;\r\n }\r\n\r\n this.contextData.cO *= op < 0 ? 0 : op;\r\n\r\n if (this.globalData.currentGlobalAlpha !== this.contextData.cO) {\r\n this.canvasContext.globalAlpha = this.contextData.cO;\r\n this.globalData.currentGlobalAlpha = this.contextData.cO;\r\n }\r\n };\r\n\r\n CanvasRendererBase.prototype.reset = function () {\r\n if (!this.renderConfig.clearCanvas) {\r\n this.canvasContext.restore();\r\n return;\r\n }\r\n\r\n this.contextData.reset();\r\n };\r\n\r\n CanvasRendererBase.prototype.save = function (actionFlag) {\r\n if (!this.renderConfig.clearCanvas) {\r\n this.canvasContext.save();\r\n return;\r\n }\r\n\r\n if (actionFlag) {\r\n this.canvasContext.save();\r\n }\r\n\r\n var props = this.contextData.cTr.props;\r\n\r\n if (this.contextData._length <= this.contextData.cArrPos) {\r\n this.contextData.duplicate();\r\n }\r\n\r\n var i;\r\n var arr = this.contextData.saved[this.contextData.cArrPos];\r\n\r\n for (i = 0; i < 16; i += 1) {\r\n arr[i] = props[i];\r\n }\r\n\r\n this.contextData.savedOp[this.contextData.cArrPos] = this.contextData.cO;\r\n this.contextData.cArrPos += 1;\r\n };\r\n\r\n CanvasRendererBase.prototype.restore = function (actionFlag) {\r\n if (!this.renderConfig.clearCanvas) {\r\n this.canvasContext.restore();\r\n return;\r\n }\r\n\r\n if (actionFlag) {\r\n this.canvasContext.restore();\r\n this.globalData.blendMode = 'source-over';\r\n }\r\n\r\n this.contextData.cArrPos -= 1;\r\n var popped = this.contextData.saved[this.contextData.cArrPos];\r\n var i;\r\n var arr = this.contextData.cTr.props;\r\n\r\n for (i = 0; i < 16; i += 1) {\r\n arr[i] = popped[i];\r\n }\r\n\r\n this.canvasContext.setTransform(popped[0], popped[1], popped[4], popped[5], popped[12], popped[13]);\r\n popped = this.contextData.savedOp[this.contextData.cArrPos];\r\n this.contextData.cO = popped;\r\n\r\n if (this.globalData.currentGlobalAlpha !== popped) {\r\n this.canvasContext.globalAlpha = popped;\r\n this.globalData.currentGlobalAlpha = popped;\r\n }\r\n };\r\n\r\n CanvasRendererBase.prototype.configAnimation = function (animData) {\r\n if (this.animationItem.wrapper) {\r\n this.animationItem.container = createTag('canvas');\r\n var containerStyle = this.animationItem.container.style;\r\n containerStyle.width = '100%';\r\n containerStyle.height = '100%';\r\n var origin = '0px 0px 0px';\r\n containerStyle.transformOrigin = origin;\r\n containerStyle.mozTransformOrigin = origin;\r\n containerStyle.webkitTransformOrigin = origin;\r\n containerStyle['-webkit-transform'] = origin;\r\n containerStyle.contentVisibility = this.renderConfig.contentVisibility;\r\n this.animationItem.wrapper.appendChild(this.animationItem.container);\r\n this.canvasContext = this.animationItem.container.getContext('2d');\r\n\r\n if (this.renderConfig.className) {\r\n this.animationItem.container.setAttribute('class', this.renderConfig.className);\r\n }\r\n\r\n if (this.renderConfig.id) {\r\n this.animationItem.container.setAttribute('id', this.renderConfig.id);\r\n }\r\n } else {\r\n this.canvasContext = this.renderConfig.context;\r\n }\r\n\r\n this.data = animData;\r\n this.layers = animData.layers;\r\n this.transformCanvas = {\r\n w: animData.w,\r\n h: animData.h,\r\n sx: 0,\r\n sy: 0,\r\n tx: 0,\r\n ty: 0\r\n };\r\n this.setupGlobalData(animData, document.body);\r\n this.globalData.canvasContext = this.canvasContext;\r\n this.globalData.renderer = this;\r\n this.globalData.isDashed = false;\r\n this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;\r\n this.globalData.transformCanvas = this.transformCanvas;\r\n this.elements = createSizedArray(animData.layers.length);\r\n this.updateContainerSize();\r\n };\r\n\r\n CanvasRendererBase.prototype.updateContainerSize = function (width, height) {\r\n this.reset();\r\n var elementWidth;\r\n var elementHeight;\r\n\r\n if (width) {\r\n elementWidth = width;\r\n elementHeight = height;\r\n this.canvasContext.canvas.width = elementWidth;\r\n this.canvasContext.canvas.height = elementHeight;\r\n } else {\r\n if (this.animationItem.wrapper && this.animationItem.container) {\r\n elementWidth = this.animationItem.wrapper.offsetWidth;\r\n elementHeight = this.animationItem.wrapper.offsetHeight;\r\n } else {\r\n elementWidth = this.canvasContext.canvas.width;\r\n elementHeight = this.canvasContext.canvas.height;\r\n }\r\n\r\n this.canvasContext.canvas.width = elementWidth * this.renderConfig.dpr;\r\n this.canvasContext.canvas.height = elementHeight * this.renderConfig.dpr;\r\n }\r\n\r\n var elementRel;\r\n var animationRel;\r\n\r\n if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) {\r\n var par = this.renderConfig.preserveAspectRatio.split(' ');\r\n var fillType = par[1] || 'meet';\r\n var pos = par[0] || 'xMidYMid';\r\n var xPos = pos.substr(0, 4);\r\n var yPos = pos.substr(4);\r\n elementRel = elementWidth / elementHeight;\r\n animationRel = this.transformCanvas.w / this.transformCanvas.h;\r\n\r\n if (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice') {\r\n this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\r\n this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\r\n } else {\r\n this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\r\n this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\r\n }\r\n\r\n if (xPos === 'xMid' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {\r\n this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2 * this.renderConfig.dpr;\r\n } else if (xPos === 'xMax' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {\r\n this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr;\r\n } else {\r\n this.transformCanvas.tx = 0;\r\n }\r\n\r\n if (yPos === 'YMid' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {\r\n this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2 * this.renderConfig.dpr;\r\n } else if (yPos === 'YMax' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {\r\n this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) * this.renderConfig.dpr;\r\n } else {\r\n this.transformCanvas.ty = 0;\r\n }\r\n } else if (this.renderConfig.preserveAspectRatio === 'none') {\r\n this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\r\n this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\r\n this.transformCanvas.tx = 0;\r\n this.transformCanvas.ty = 0;\r\n } else {\r\n this.transformCanvas.sx = this.renderConfig.dpr;\r\n this.transformCanvas.sy = this.renderConfig.dpr;\r\n this.transformCanvas.tx = 0;\r\n this.transformCanvas.ty = 0;\r\n }\r\n\r\n this.transformCanvas.props = [this.transformCanvas.sx, 0, 0, 0, 0, this.transformCanvas.sy, 0, 0, 0, 0, 1, 0, this.transformCanvas.tx, this.transformCanvas.ty, 0, 1];\r\n /* var i, len = this.elements.length;\r\n for(i=0;i<len;i+=1){\r\n if(this.elements[i] && this.elements[i].data.ty === 0){\r\n this.elements[i].resize(this.globalData.transformCanvas);\r\n }\r\n } */\r\n\r\n this.ctxTransform(this.transformCanvas.props);\r\n this.canvasContext.beginPath();\r\n this.canvasContext.rect(0, 0, this.transformCanvas.w, this.transformCanvas.h);\r\n this.canvasContext.closePath();\r\n this.canvasContext.clip();\r\n this.renderFrame(this.renderedFrame, true);\r\n };\r\n\r\n CanvasRendererBase.prototype.destroy = function () {\r\n if (this.renderConfig.clearCanvas && this.animationItem.wrapper) {\r\n this.animationItem.wrapper.innerText = '';\r\n }\r\n\r\n var i;\r\n var len = this.layers ? this.layers.length : 0;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (this.elements[i]) {\r\n this.elements[i].destroy();\r\n }\r\n }\r\n\r\n this.elements.length = 0;\r\n this.globalData.canvasContext = null;\r\n this.animationItem.container = null;\r\n this.destroyed = true;\r\n };\r\n\r\n CanvasRendererBase.prototype.renderFrame = function (num, forceRender) {\r\n if (this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender || this.destroyed || num === -1) {\r\n return;\r\n }\r\n\r\n this.renderedFrame = num;\r\n this.globalData.frameNum = num - this.animationItem._isFirstFrame;\r\n this.globalData.frameId += 1;\r\n this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;\r\n this.globalData.projectInterface.currentFrame = num; // console.log('--------');\r\n // console.log('NEW: ',num);\r\n\r\n var i;\r\n var len = this.layers.length;\r\n\r\n if (!this.completeLayers) {\r\n this.checkLayers(num);\r\n }\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].prepareFrame(num - this.layers[i].st);\r\n }\r\n }\r\n\r\n if (this.globalData._mdf) {\r\n if (this.renderConfig.clearCanvas === true) {\r\n this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);\r\n } else {\r\n this.save();\r\n }\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].renderFrame();\r\n }\r\n }\r\n\r\n if (this.renderConfig.clearCanvas !== true) {\r\n this.restore();\r\n }\r\n }\r\n };\r\n\r\n CanvasRendererBase.prototype.buildItem = function (pos) {\r\n var elements = this.elements;\r\n\r\n if (elements[pos] || this.layers[pos].ty === 99) {\r\n return;\r\n }\r\n\r\n var element = this.createItem(this.layers[pos], this, this.globalData);\r\n elements[pos] = element;\r\n element.initExpressions();\r\n /* if(this.layers[pos].ty === 0){\r\n element.resize(this.globalData.transformCanvas);\r\n } */\r\n };\r\n\r\n CanvasRendererBase.prototype.checkPendingElements = function () {\r\n while (this.pendingElements.length) {\r\n var element = this.pendingElements.pop();\r\n element.checkParenting();\r\n }\r\n };\r\n\r\n CanvasRendererBase.prototype.hide = function () {\r\n this.animationItem.container.style.display = 'none';\r\n };\r\n\r\n CanvasRendererBase.prototype.show = function () {\r\n this.animationItem.container.style.display = 'block';\r\n };\r\n\r\n function CVCompElement(data, globalData, comp) {\r\n this.completeLayers = false;\r\n this.layers = data.layers;\r\n this.pendingElements = [];\r\n this.elements = createSizedArray(this.layers.length);\r\n this.initElement(data, globalData, comp);\r\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\r\n _placeholder: true\r\n };\r\n }\r\n\r\n extendPrototype([CanvasRendererBase, ICompElement, CVBaseElement], CVCompElement);\r\n\r\n CVCompElement.prototype.renderInnerContent = function () {\r\n var ctx = this.canvasContext;\r\n ctx.beginPath();\r\n ctx.moveTo(0, 0);\r\n ctx.lineTo(this.data.w, 0);\r\n ctx.lineTo(this.data.w, this.data.h);\r\n ctx.lineTo(0, this.data.h);\r\n ctx.lineTo(0, 0);\r\n ctx.clip();\r\n var i;\r\n var len = this.layers.length;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (this.completeLayers || this.elements[i]) {\r\n this.elements[i].renderFrame();\r\n }\r\n }\r\n };\r\n\r\n CVCompElement.prototype.destroy = function () {\r\n var i;\r\n var len = this.layers.length;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n if (this.elements[i]) {\r\n this.elements[i].destroy();\r\n }\r\n }\r\n\r\n this.layers = null;\r\n this.elements = null;\r\n };\r\n\r\n CVCompElement.prototype.createComp = function (data) {\r\n return new CVCompElement(data, this.globalData, this);\r\n };\r\n\r\n function CanvasRenderer(animationItem, config) {\r\n this.animationItem = animationItem;\r\n this.renderConfig = {\r\n clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,\r\n context: config && config.context || null,\r\n progressiveLoad: config && config.progressiveLoad || false,\r\n preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',\r\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\r\n contentVisibility: config && config.contentVisibility || 'visible',\r\n className: config && config.className || '',\r\n id: config && config.id || '',\r\n runExpressions: !config || config.runExpressions === undefined || config.runExpressions\r\n };\r\n this.renderConfig.dpr = config && config.dpr || 1;\r\n\r\n if (this.animationItem.wrapper) {\r\n this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;\r\n }\r\n\r\n this.renderedFrame = -1;\r\n this.globalData = {\r\n frameNum: -1,\r\n _mdf: false,\r\n renderConfig: this.renderConfig,\r\n currentGlobalAlpha: -1\r\n };\r\n this.contextData = new CVContextData();\r\n this.elements = [];\r\n this.pendingElements = [];\r\n this.transformMat = new Matrix();\r\n this.completeLayers = false;\r\n this.rendererType = 'canvas';\r\n }\r\n\r\n extendPrototype([CanvasRendererBase], CanvasRenderer);\r\n\r\n CanvasRenderer.prototype.createComp = function (data) {\r\n return new CVCompElement(data, this.globalData, this);\r\n };\r\n\r\n function HBaseElement() {}\r\n\r\n HBaseElement.prototype = {\r\n checkBlendMode: function checkBlendMode() {},\r\n initRendererElement: function initRendererElement() {\r\n this.baseElement = createTag(this.data.tg || 'div');\r\n\r\n if (this.data.hasMask) {\r\n this.svgElement = createNS('svg');\r\n this.layerElement = createNS('g');\r\n this.maskedElement = this.layerElement;\r\n this.svgElement.appendChild(this.layerElement);\r\n this.baseElement.appendChild(this.svgElement);\r\n } else {\r\n this.layerElement = this.baseElement;\r\n }\r\n\r\n styleDiv(this.baseElement);\r\n },\r\n createContainerElements: function createContainerElements() {\r\n this.renderableEffectsManager = new CVEffects(this);\r\n this.transformedElement = this.baseElement;\r\n this.maskedElement = this.layerElement;\r\n\r\n if (this.data.ln) {\r\n this.layerElement.setAttribute('id', this.data.ln);\r\n }\r\n\r\n if (this.data.cl) {\r\n this.layerElement.setAttribute('class', this.data.cl);\r\n }\r\n\r\n if (this.data.bm !== 0) {\r\n this.setBlendMode();\r\n }\r\n },\r\n renderElement: function renderElement() {\r\n var transformedElementStyle = this.transformedElement ? this.transformedElement.style : {};\r\n\r\n if (this.finalTransform._matMdf) {\r\n var matrixValue = this.finalTransform.mat.toCSS();\r\n transformedElementStyle.transform = matrixValue;\r\n transformedElementStyle.webkitTransform = matrixValue;\r\n }\r\n\r\n if (this.finalTransform._opMdf) {\r\n transformedElementStyle.opacity = this.finalTransform.mProp.o.v;\r\n }\r\n },\r\n renderFrame: function renderFrame() {\r\n // If it is exported as hidden (data.hd === true) no need to render\r\n // If it is not visible no need to render\r\n if (this.data.hd || this.hidden) {\r\n return;\r\n }\r\n\r\n this.renderTransform();\r\n this.renderRenderable();\r\n this.renderElement();\r\n this.renderInnerContent();\r\n\r\n if (this._isFirstFrame) {\r\n this._isFirstFrame = false;\r\n }\r\n },\r\n destroy: function destroy() {\r\n this.layerElement = null;\r\n this.transformedElement = null;\r\n\r\n if (this.matteElement) {\r\n this.matteElement = null;\r\n }\r\n\r\n if (this.maskManager) {\r\n this.maskManager.destroy();\r\n this.maskManager = null;\r\n }\r\n },\r\n createRenderableComponents: function createRenderableComponents() {\r\n this.maskManager = new MaskElement(this.data, this, this.globalData);\r\n },\r\n addEffects: function addEffects() {},\r\n setMatte: function setMatte() {}\r\n };\r\n HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement;\r\n HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy;\r\n HBaseElement.prototype.buildElementParenting = BaseRenderer.prototype.buildElementParenting;\r\n\r\n function HSolidElement(data, globalData, comp) {\r\n this.initElement(data, globalData, comp);\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], HSolidElement);\r\n\r\n HSolidElement.prototype.createContent = function () {\r\n var rect;\r\n\r\n if (this.data.hasMask) {\r\n rect = createNS('rect');\r\n rect.setAttribute('width', this.data.sw);\r\n rect.setAttribute('height', this.data.sh);\r\n rect.setAttribute('fill', this.data.sc);\r\n this.svgElement.setAttribute('width', this.data.sw);\r\n this.svgElement.setAttribute('height', this.data.sh);\r\n } else {\r\n rect = createTag('div');\r\n rect.style.width = this.data.sw + 'px';\r\n rect.style.height = this.data.sh + 'px';\r\n rect.style.backgroundColor = this.data.sc;\r\n }\r\n\r\n this.layerElement.appendChild(rect);\r\n };\r\n\r\n function HShapeElement(data, globalData, comp) {\r\n // List of drawable elements\r\n this.shapes = []; // Full shape data\r\n\r\n this.shapesData = data.shapes; // List of styles that will be applied to shapes\r\n\r\n this.stylesList = []; // List of modifiers that will be applied to shapes\r\n\r\n this.shapeModifiers = []; // List of items in shape tree\r\n\r\n this.itemsData = []; // List of items in previous shape tree\r\n\r\n this.processedElements = []; // List of animated components\r\n\r\n this.animatedContents = [];\r\n this.shapesContainer = createNS('g');\r\n this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\r\n // List of elements that have been created\r\n\r\n this.prevViewData = [];\r\n this.currentBBox = {\r\n x: 999999,\r\n y: -999999,\r\n h: 0,\r\n w: 0\r\n };\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement, HierarchyElement, FrameElement, RenderableElement], HShapeElement);\r\n HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent;\r\n\r\n HShapeElement.prototype.createContent = function () {\r\n var cont;\r\n this.baseElement.style.fontSize = 0;\r\n\r\n if (this.data.hasMask) {\r\n this.layerElement.appendChild(this.shapesContainer);\r\n cont = this.svgElement;\r\n } else {\r\n cont = createNS('svg');\r\n var size = this.comp.data ? this.comp.data : this.globalData.compSize;\r\n cont.setAttribute('width', size.w);\r\n cont.setAttribute('height', size.h);\r\n cont.appendChild(this.shapesContainer);\r\n this.layerElement.appendChild(cont);\r\n }\r\n\r\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.shapesContainer, 0, [], true);\r\n this.filterUniqueShapes();\r\n this.shapeCont = cont;\r\n };\r\n\r\n HShapeElement.prototype.getTransformedPoint = function (transformers, point) {\r\n var i;\r\n var len = transformers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n point = transformers[i].mProps.v.applyToPointArray(point[0], point[1], 0);\r\n }\r\n\r\n return point;\r\n };\r\n\r\n HShapeElement.prototype.calculateShapeBoundingBox = function (item, boundingBox) {\r\n var shape = item.sh.v;\r\n var transformers = item.transformers;\r\n var i;\r\n var len = shape._length;\r\n var vPoint;\r\n var oPoint;\r\n var nextIPoint;\r\n var nextVPoint;\r\n\r\n if (len <= 1) {\r\n return;\r\n }\r\n\r\n for (i = 0; i < len - 1; i += 1) {\r\n vPoint = this.getTransformedPoint(transformers, shape.v[i]);\r\n oPoint = this.getTransformedPoint(transformers, shape.o[i]);\r\n nextIPoint = this.getTransformedPoint(transformers, shape.i[i + 1]);\r\n nextVPoint = this.getTransformedPoint(transformers, shape.v[i + 1]);\r\n this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);\r\n }\r\n\r\n if (shape.c) {\r\n vPoint = this.getTransformedPoint(transformers, shape.v[i]);\r\n oPoint = this.getTransformedPoint(transformers, shape.o[i]);\r\n nextIPoint = this.getTransformedPoint(transformers, shape.i[0]);\r\n nextVPoint = this.getTransformedPoint(transformers, shape.v[0]);\r\n this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);\r\n }\r\n };\r\n\r\n HShapeElement.prototype.checkBounds = function (vPoint, oPoint, nextIPoint, nextVPoint, boundingBox) {\r\n this.getBoundsOfCurve(vPoint, oPoint, nextIPoint, nextVPoint);\r\n var bounds = this.shapeBoundingBox;\r\n boundingBox.x = bmMin(bounds.left, boundingBox.x);\r\n boundingBox.xMax = bmMax(bounds.right, boundingBox.xMax);\r\n boundingBox.y = bmMin(bounds.top, boundingBox.y);\r\n boundingBox.yMax = bmMax(bounds.bottom, boundingBox.yMax);\r\n };\r\n\r\n HShapeElement.prototype.shapeBoundingBox = {\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n };\r\n HShapeElement.prototype.tempBoundingBox = {\r\n x: 0,\r\n xMax: 0,\r\n y: 0,\r\n yMax: 0,\r\n width: 0,\r\n height: 0\r\n };\r\n\r\n HShapeElement.prototype.getBoundsOfCurve = function (p0, p1, p2, p3) {\r\n var bounds = [[p0[0], p3[0]], [p0[1], p3[1]]];\r\n\r\n for (var a, b, c, t, b2ac, t1, t2, i = 0; i < 2; ++i) {\r\n // eslint-disable-line no-plusplus\r\n b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];\r\n a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];\r\n c = 3 * p1[i] - 3 * p0[i];\r\n b |= 0; // eslint-disable-line no-bitwise\r\n\r\n a |= 0; // eslint-disable-line no-bitwise\r\n\r\n c |= 0; // eslint-disable-line no-bitwise\r\n\r\n if (a === 0 && b === 0) {//\r\n } else if (a === 0) {\r\n t = -c / b;\r\n\r\n if (t > 0 && t < 1) {\r\n bounds[i].push(this.calculateF(t, p0, p1, p2, p3, i));\r\n }\r\n } else {\r\n b2ac = b * b - 4 * c * a;\r\n\r\n if (b2ac >= 0) {\r\n t1 = (-b + bmSqrt(b2ac)) / (2 * a);\r\n if (t1 > 0 && t1 < 1) bounds[i].push(this.calculateF(t1, p0, p1, p2, p3, i));\r\n t2 = (-b - bmSqrt(b2ac)) / (2 * a);\r\n if (t2 > 0 && t2 < 1) bounds[i].push(this.calculateF(t2, p0, p1, p2, p3, i));\r\n }\r\n }\r\n }\r\n\r\n this.shapeBoundingBox.left = bmMin.apply(null, bounds[0]);\r\n this.shapeBoundingBox.top = bmMin.apply(null, bounds[1]);\r\n this.shapeBoundingBox.right = bmMax.apply(null, bounds[0]);\r\n this.shapeBoundingBox.bottom = bmMax.apply(null, bounds[1]);\r\n };\r\n\r\n HShapeElement.prototype.calculateF = function (t, p0, p1, p2, p3, i) {\r\n return bmPow(1 - t, 3) * p0[i] + 3 * bmPow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * bmPow(t, 2) * p2[i] + bmPow(t, 3) * p3[i];\r\n };\r\n\r\n HShapeElement.prototype.calculateBoundingBox = function (itemsData, boundingBox) {\r\n var i;\r\n var len = itemsData.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (itemsData[i] && itemsData[i].sh) {\r\n this.calculateShapeBoundingBox(itemsData[i], boundingBox);\r\n } else if (itemsData[i] && itemsData[i].it) {\r\n this.calculateBoundingBox(itemsData[i].it, boundingBox);\r\n } else if (itemsData[i] && itemsData[i].style && itemsData[i].w) {\r\n this.expandStrokeBoundingBox(itemsData[i].w, boundingBox);\r\n }\r\n }\r\n };\r\n\r\n HShapeElement.prototype.expandStrokeBoundingBox = function (widthProperty, boundingBox) {\r\n var width = 0;\r\n\r\n if (widthProperty.keyframes) {\r\n for (var i = 0; i < widthProperty.keyframes.length; i += 1) {\r\n var kfw = widthProperty.keyframes[i].s;\r\n\r\n if (kfw > width) {\r\n width = kfw;\r\n }\r\n }\r\n\r\n width *= widthProperty.mult;\r\n } else {\r\n width = widthProperty.v * widthProperty.mult;\r\n }\r\n\r\n boundingBox.x -= width;\r\n boundingBox.xMax += width;\r\n boundingBox.y -= width;\r\n boundingBox.yMax += width;\r\n };\r\n\r\n HShapeElement.prototype.currentBoxContains = function (box) {\r\n return this.currentBBox.x <= box.x && this.currentBBox.y <= box.y && this.currentBBox.width + this.currentBBox.x >= box.x + box.width && this.currentBBox.height + this.currentBBox.y >= box.y + box.height;\r\n };\r\n\r\n HShapeElement.prototype.renderInnerContent = function () {\r\n this._renderShapeFrame();\r\n\r\n if (!this.hidden && (this._isFirstFrame || this._mdf)) {\r\n var tempBoundingBox = this.tempBoundingBox;\r\n var max = 999999;\r\n tempBoundingBox.x = max;\r\n tempBoundingBox.xMax = -max;\r\n tempBoundingBox.y = max;\r\n tempBoundingBox.yMax = -max;\r\n this.calculateBoundingBox(this.itemsData, tempBoundingBox);\r\n tempBoundingBox.width = tempBoundingBox.xMax < tempBoundingBox.x ? 0 : tempBoundingBox.xMax - tempBoundingBox.x;\r\n tempBoundingBox.height = tempBoundingBox.yMax < tempBoundingBox.y ? 0 : tempBoundingBox.yMax - tempBoundingBox.y; // var tempBoundingBox = this.shapeCont.getBBox();\r\n\r\n if (this.currentBoxContains(tempBoundingBox)) {\r\n return;\r\n }\r\n\r\n var changed = false;\r\n\r\n if (this.currentBBox.w !== tempBoundingBox.width) {\r\n this.currentBBox.w = tempBoundingBox.width;\r\n this.shapeCont.setAttribute('width', tempBoundingBox.width);\r\n changed = true;\r\n }\r\n\r\n if (this.currentBBox.h !== tempBoundingBox.height) {\r\n this.currentBBox.h = tempBoundingBox.height;\r\n this.shapeCont.setAttribute('height', tempBoundingBox.height);\r\n changed = true;\r\n }\r\n\r\n if (changed || this.currentBBox.x !== tempBoundingBox.x || this.currentBBox.y !== tempBoundingBox.y) {\r\n this.currentBBox.w = tempBoundingBox.width;\r\n this.currentBBox.h = tempBoundingBox.height;\r\n this.currentBBox.x = tempBoundingBox.x;\r\n this.currentBBox.y = tempBoundingBox.y;\r\n this.shapeCont.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);\r\n var shapeStyle = this.shapeCont.style;\r\n var shapeTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';\r\n shapeStyle.transform = shapeTransform;\r\n shapeStyle.webkitTransform = shapeTransform;\r\n }\r\n }\r\n };\r\n\r\n function HTextElement(data, globalData, comp) {\r\n this.textSpans = [];\r\n this.textPaths = [];\r\n this.currentBBox = {\r\n x: 999999,\r\n y: -999999,\r\n h: 0,\r\n w: 0\r\n };\r\n this.renderType = 'svg';\r\n this.isMasked = false;\r\n this.initElement(data, globalData, comp);\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], HTextElement);\r\n\r\n HTextElement.prototype.createContent = function () {\r\n this.isMasked = this.checkMasks();\r\n\r\n if (this.isMasked) {\r\n this.renderType = 'svg';\r\n this.compW = this.comp.data.w;\r\n this.compH = this.comp.data.h;\r\n this.svgElement.setAttribute('width', this.compW);\r\n this.svgElement.setAttribute('height', this.compH);\r\n var g = createNS('g');\r\n this.maskedElement.appendChild(g);\r\n this.innerElem = g;\r\n } else {\r\n this.renderType = 'html';\r\n this.innerElem = this.layerElement;\r\n }\r\n\r\n this.checkParenting();\r\n };\r\n\r\n HTextElement.prototype.buildNewText = function () {\r\n var documentData = this.textProperty.currentData;\r\n this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);\r\n var innerElemStyle = this.innerElem.style;\r\n var textColor = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)';\r\n innerElemStyle.fill = textColor;\r\n innerElemStyle.color = textColor;\r\n\r\n if (documentData.sc) {\r\n innerElemStyle.stroke = this.buildColor(documentData.sc);\r\n innerElemStyle.strokeWidth = documentData.sw + 'px';\r\n }\r\n\r\n var fontData = this.globalData.fontManager.getFontByName(documentData.f);\r\n\r\n if (!this.globalData.fontManager.chars) {\r\n innerElemStyle.fontSize = documentData.finalSize + 'px';\r\n innerElemStyle.lineHeight = documentData.finalSize + 'px';\r\n\r\n if (fontData.fClass) {\r\n this.innerElem.className = fontData.fClass;\r\n } else {\r\n innerElemStyle.fontFamily = fontData.fFamily;\r\n var fWeight = documentData.fWeight;\r\n var fStyle = documentData.fStyle;\r\n innerElemStyle.fontStyle = fStyle;\r\n innerElemStyle.fontWeight = fWeight;\r\n }\r\n }\r\n\r\n var i;\r\n var len;\r\n var letters = documentData.l;\r\n len = letters.length;\r\n var tSpan;\r\n var tParent;\r\n var tCont;\r\n var matrixHelper = this.mHelper;\r\n var shapes;\r\n var shapeStr = '';\r\n var cnt = 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.globalData.fontManager.chars) {\r\n if (!this.textPaths[cnt]) {\r\n tSpan = createNS('path');\r\n tSpan.setAttribute('stroke-linecap', lineCapEnum[1]);\r\n tSpan.setAttribute('stroke-linejoin', lineJoinEnum[2]);\r\n tSpan.setAttribute('stroke-miterlimit', '4');\r\n } else {\r\n tSpan = this.textPaths[cnt];\r\n }\r\n\r\n if (!this.isMasked) {\r\n if (this.textSpans[cnt]) {\r\n tParent = this.textSpans[cnt];\r\n tCont = tParent.children[0];\r\n } else {\r\n tParent = createTag('div');\r\n tParent.style.lineHeight = 0;\r\n tCont = createNS('svg');\r\n tCont.appendChild(tSpan);\r\n styleDiv(tParent);\r\n }\r\n }\r\n } else if (!this.isMasked) {\r\n if (this.textSpans[cnt]) {\r\n tParent = this.textSpans[cnt];\r\n tSpan = this.textPaths[cnt];\r\n } else {\r\n tParent = createTag('span');\r\n styleDiv(tParent);\r\n tSpan = createTag('span');\r\n styleDiv(tSpan);\r\n tParent.appendChild(tSpan);\r\n }\r\n } else {\r\n tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : createNS('text');\r\n } // tSpan.setAttribute('visibility', 'hidden');\r\n\r\n\r\n if (this.globalData.fontManager.chars) {\r\n var charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\r\n var shapeData;\r\n\r\n if (charData) {\r\n shapeData = charData.data;\r\n } else {\r\n shapeData = null;\r\n }\r\n\r\n matrixHelper.reset();\r\n\r\n if (shapeData && shapeData.shapes && shapeData.shapes.length) {\r\n shapes = shapeData.shapes[0].it;\r\n matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);\r\n shapeStr = this.createPathShape(matrixHelper, shapes);\r\n tSpan.setAttribute('d', shapeStr);\r\n }\r\n\r\n if (!this.isMasked) {\r\n this.innerElem.appendChild(tParent);\r\n\r\n if (shapeData && shapeData.shapes) {\r\n // document.body.appendChild is needed to get exact measure of shape\r\n document.body.appendChild(tCont);\r\n var boundingBox = tCont.getBBox();\r\n tCont.setAttribute('width', boundingBox.width + 2);\r\n tCont.setAttribute('height', boundingBox.height + 2);\r\n tCont.setAttribute('viewBox', boundingBox.x - 1 + ' ' + (boundingBox.y - 1) + ' ' + (boundingBox.width + 2) + ' ' + (boundingBox.height + 2));\r\n var tContStyle = tCont.style;\r\n var tContTranslation = 'translate(' + (boundingBox.x - 1) + 'px,' + (boundingBox.y - 1) + 'px)';\r\n tContStyle.transform = tContTranslation;\r\n tContStyle.webkitTransform = tContTranslation;\r\n letters[i].yOffset = boundingBox.y - 1;\r\n } else {\r\n tCont.setAttribute('width', 1);\r\n tCont.setAttribute('height', 1);\r\n }\r\n\r\n tParent.appendChild(tCont);\r\n } else {\r\n this.innerElem.appendChild(tSpan);\r\n }\r\n } else {\r\n tSpan.textContent = letters[i].val;\r\n tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\r\n\r\n if (!this.isMasked) {\r\n this.innerElem.appendChild(tParent); //\r\n\r\n var tStyle = tSpan.style;\r\n var tSpanTranslation = 'translate3d(0,' + -documentData.finalSize / 1.2 + 'px,0)';\r\n tStyle.transform = tSpanTranslation;\r\n tStyle.webkitTransform = tSpanTranslation;\r\n } else {\r\n this.innerElem.appendChild(tSpan);\r\n }\r\n } //\r\n\r\n\r\n if (!this.isMasked) {\r\n this.textSpans[cnt] = tParent;\r\n } else {\r\n this.textSpans[cnt] = tSpan;\r\n }\r\n\r\n this.textSpans[cnt].style.display = 'block';\r\n this.textPaths[cnt] = tSpan;\r\n cnt += 1;\r\n }\r\n\r\n while (cnt < this.textSpans.length) {\r\n this.textSpans[cnt].style.display = 'none';\r\n cnt += 1;\r\n }\r\n };\r\n\r\n HTextElement.prototype.renderInnerContent = function () {\r\n var svgStyle;\r\n\r\n if (this.data.singleShape) {\r\n if (!this._isFirstFrame && !this.lettersChangedFlag) {\r\n return;\r\n }\r\n\r\n if (this.isMasked && this.finalTransform._matMdf) {\r\n // Todo Benchmark if using this is better than getBBox\r\n this.svgElement.setAttribute('viewBox', -this.finalTransform.mProp.p.v[0] + ' ' + -this.finalTransform.mProp.p.v[1] + ' ' + this.compW + ' ' + this.compH);\r\n svgStyle = this.svgElement.style;\r\n var translation = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)';\r\n svgStyle.transform = translation;\r\n svgStyle.webkitTransform = translation;\r\n }\r\n }\r\n\r\n this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\r\n\r\n if (!this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag) {\r\n return;\r\n }\r\n\r\n var i;\r\n var len;\r\n var count = 0;\r\n var renderedLetters = this.textAnimator.renderedLetters;\r\n var letters = this.textProperty.currentData.l;\r\n len = letters.length;\r\n var renderedLetter;\r\n var textSpan;\r\n var textPath;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (letters[i].n) {\r\n count += 1;\r\n } else {\r\n textSpan = this.textSpans[i];\r\n textPath = this.textPaths[i];\r\n renderedLetter = renderedLetters[count];\r\n count += 1;\r\n\r\n if (renderedLetter._mdf.m) {\r\n if (!this.isMasked) {\r\n textSpan.style.webkitTransform = renderedLetter.m;\r\n textSpan.style.transform = renderedLetter.m;\r\n } else {\r\n textSpan.setAttribute('transform', renderedLetter.m);\r\n }\r\n } /// /textSpan.setAttribute('opacity',renderedLetter.o);\r\n\r\n\r\n textSpan.style.opacity = renderedLetter.o;\r\n\r\n if (renderedLetter.sw && renderedLetter._mdf.sw) {\r\n textPath.setAttribute('stroke-width', renderedLetter.sw);\r\n }\r\n\r\n if (renderedLetter.sc && renderedLetter._mdf.sc) {\r\n textPath.setAttribute('stroke', renderedLetter.sc);\r\n }\r\n\r\n if (renderedLetter.fc && renderedLetter._mdf.fc) {\r\n textPath.setAttribute('fill', renderedLetter.fc);\r\n textPath.style.color = renderedLetter.fc;\r\n }\r\n }\r\n }\r\n\r\n if (this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)) {\r\n var boundingBox = this.innerElem.getBBox();\r\n\r\n if (this.currentBBox.w !== boundingBox.width) {\r\n this.currentBBox.w = boundingBox.width;\r\n this.svgElement.setAttribute('width', boundingBox.width);\r\n }\r\n\r\n if (this.currentBBox.h !== boundingBox.height) {\r\n this.currentBBox.h = boundingBox.height;\r\n this.svgElement.setAttribute('height', boundingBox.height);\r\n }\r\n\r\n var margin = 1;\r\n\r\n if (this.currentBBox.w !== boundingBox.width + margin * 2 || this.currentBBox.h !== boundingBox.height + margin * 2 || this.currentBBox.x !== boundingBox.x - margin || this.currentBBox.y !== boundingBox.y - margin) {\r\n this.currentBBox.w = boundingBox.width + margin * 2;\r\n this.currentBBox.h = boundingBox.height + margin * 2;\r\n this.currentBBox.x = boundingBox.x - margin;\r\n this.currentBBox.y = boundingBox.y - margin;\r\n this.svgElement.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);\r\n svgStyle = this.svgElement.style;\r\n var svgTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';\r\n svgStyle.transform = svgTransform;\r\n svgStyle.webkitTransform = svgTransform;\r\n }\r\n }\r\n };\r\n\r\n function HCameraElement(data, globalData, comp) {\r\n this.initFrame();\r\n this.initBaseData(data, globalData, comp);\r\n this.initHierarchy();\r\n var getProp = PropertyFactory.getProp;\r\n this.pe = getProp(this, data.pe, 0, 0, this);\r\n\r\n if (data.ks.p.s) {\r\n this.px = getProp(this, data.ks.p.x, 1, 0, this);\r\n this.py = getProp(this, data.ks.p.y, 1, 0, this);\r\n this.pz = getProp(this, data.ks.p.z, 1, 0, this);\r\n } else {\r\n this.p = getProp(this, data.ks.p, 1, 0, this);\r\n }\r\n\r\n if (data.ks.a) {\r\n this.a = getProp(this, data.ks.a, 1, 0, this);\r\n }\r\n\r\n if (data.ks.or.k.length && data.ks.or.k[0].to) {\r\n var i;\r\n var len = data.ks.or.k.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n data.ks.or.k[i].to = null;\r\n data.ks.or.k[i].ti = null;\r\n }\r\n }\r\n\r\n this.or = getProp(this, data.ks.or, 1, degToRads, this);\r\n this.or.sh = true;\r\n this.rx = getProp(this, data.ks.rx, 0, degToRads, this);\r\n this.ry = getProp(this, data.ks.ry, 0, degToRads, this);\r\n this.rz = getProp(this, data.ks.rz, 0, degToRads, this);\r\n this.mat = new Matrix();\r\n this._prevMat = new Matrix();\r\n this._isFirstFrame = true; // TODO: find a better way to make the HCamera element to be compatible with the LayerInterface and TransformInterface.\r\n\r\n this.finalTransform = {\r\n mProp: this\r\n };\r\n }\r\n\r\n extendPrototype([BaseElement, FrameElement, HierarchyElement], HCameraElement);\r\n\r\n HCameraElement.prototype.setup = function () {\r\n var i;\r\n var len = this.comp.threeDElements.length;\r\n var comp;\r\n var perspectiveStyle;\r\n var containerStyle;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n // [perspectiveElem,container]\r\n comp = this.comp.threeDElements[i];\r\n\r\n if (comp.type === '3d') {\r\n perspectiveStyle = comp.perspectiveElem.style;\r\n containerStyle = comp.container.style;\r\n var perspective = this.pe.v + 'px';\r\n var origin = '0px 0px 0px';\r\n var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';\r\n perspectiveStyle.perspective = perspective;\r\n perspectiveStyle.webkitPerspective = perspective;\r\n containerStyle.transformOrigin = origin;\r\n containerStyle.mozTransformOrigin = origin;\r\n containerStyle.webkitTransformOrigin = origin;\r\n perspectiveStyle.transform = matrix;\r\n perspectiveStyle.webkitTransform = matrix;\r\n }\r\n }\r\n };\r\n\r\n HCameraElement.prototype.createElements = function () {};\r\n\r\n HCameraElement.prototype.hide = function () {};\r\n\r\n HCameraElement.prototype.renderFrame = function () {\r\n var _mdf = this._isFirstFrame;\r\n var i;\r\n var len;\r\n\r\n if (this.hierarchy) {\r\n len = this.hierarchy.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n _mdf = this.hierarchy[i].finalTransform.mProp._mdf || _mdf;\r\n }\r\n }\r\n\r\n if (_mdf || this.pe._mdf || this.p && this.p._mdf || this.px && (this.px._mdf || this.py._mdf || this.pz._mdf) || this.rx._mdf || this.ry._mdf || this.rz._mdf || this.or._mdf || this.a && this.a._mdf) {\r\n this.mat.reset();\r\n\r\n if (this.hierarchy) {\r\n len = this.hierarchy.length - 1;\r\n\r\n for (i = len; i >= 0; i -= 1) {\r\n var mTransf = this.hierarchy[i].finalTransform.mProp;\r\n this.mat.translate(-mTransf.p.v[0], -mTransf.p.v[1], mTransf.p.v[2]);\r\n this.mat.rotateX(-mTransf.or.v[0]).rotateY(-mTransf.or.v[1]).rotateZ(mTransf.or.v[2]);\r\n this.mat.rotateX(-mTransf.rx.v).rotateY(-mTransf.ry.v).rotateZ(mTransf.rz.v);\r\n this.mat.scale(1 / mTransf.s.v[0], 1 / mTransf.s.v[1], 1 / mTransf.s.v[2]);\r\n this.mat.translate(mTransf.a.v[0], mTransf.a.v[1], mTransf.a.v[2]);\r\n }\r\n }\r\n\r\n if (this.p) {\r\n this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2]);\r\n } else {\r\n this.mat.translate(-this.px.v, -this.py.v, this.pz.v);\r\n }\r\n\r\n if (this.a) {\r\n var diffVector;\r\n\r\n if (this.p) {\r\n diffVector = [this.p.v[0] - this.a.v[0], this.p.v[1] - this.a.v[1], this.p.v[2] - this.a.v[2]];\r\n } else {\r\n diffVector = [this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2]];\r\n }\r\n\r\n var mag = Math.sqrt(Math.pow(diffVector[0], 2) + Math.pow(diffVector[1], 2) + Math.pow(diffVector[2], 2)); // var lookDir = getNormalizedPoint(getDiffVector(this.a.v,this.p.v));\r\n\r\n var lookDir = [diffVector[0] / mag, diffVector[1] / mag, diffVector[2] / mag];\r\n var lookLengthOnXZ = Math.sqrt(lookDir[2] * lookDir[2] + lookDir[0] * lookDir[0]);\r\n var mRotationX = Math.atan2(lookDir[1], lookLengthOnXZ);\r\n var mRotationY = Math.atan2(lookDir[0], -lookDir[2]);\r\n this.mat.rotateY(mRotationY).rotateX(-mRotationX);\r\n }\r\n\r\n this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v);\r\n this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]);\r\n this.mat.translate(this.globalData.compSize.w / 2, this.globalData.compSize.h / 2, 0);\r\n this.mat.translate(0, 0, this.pe.v);\r\n var hasMatrixChanged = !this._prevMat.equals(this.mat);\r\n\r\n if ((hasMatrixChanged || this.pe._mdf) && this.comp.threeDElements) {\r\n len = this.comp.threeDElements.length;\r\n var comp;\r\n var perspectiveStyle;\r\n var containerStyle;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n comp = this.comp.threeDElements[i];\r\n\r\n if (comp.type === '3d') {\r\n if (hasMatrixChanged) {\r\n var matValue = this.mat.toCSS();\r\n containerStyle = comp.container.style;\r\n containerStyle.transform = matValue;\r\n containerStyle.webkitTransform = matValue;\r\n }\r\n\r\n if (this.pe._mdf) {\r\n perspectiveStyle = comp.perspectiveElem.style;\r\n perspectiveStyle.perspective = this.pe.v + 'px';\r\n perspectiveStyle.webkitPerspective = this.pe.v + 'px';\r\n }\r\n }\r\n }\r\n\r\n this.mat.clone(this._prevMat);\r\n }\r\n }\r\n\r\n this._isFirstFrame = false;\r\n };\r\n\r\n HCameraElement.prototype.prepareFrame = function (num) {\r\n this.prepareProperties(num, true);\r\n };\r\n\r\n HCameraElement.prototype.destroy = function () {};\r\n\r\n HCameraElement.prototype.getBaseElement = function () {\r\n return null;\r\n };\r\n\r\n function HImageElement(data, globalData, comp) {\r\n this.assetData = globalData.getAssetData(data.refId);\r\n this.initElement(data, globalData, comp);\r\n }\r\n\r\n extendPrototype([BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement, FrameElement, RenderableElement], HImageElement);\r\n\r\n HImageElement.prototype.createContent = function () {\r\n var assetPath = this.globalData.getAssetsPath(this.assetData);\r\n var img = new Image();\r\n\r\n if (this.data.hasMask) {\r\n this.imageElem = createNS('image');\r\n this.imageElem.setAttribute('width', this.assetData.w + 'px');\r\n this.imageElem.setAttribute('height', this.assetData.h + 'px');\r\n this.imageElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);\r\n this.layerElement.appendChild(this.imageElem);\r\n this.baseElement.setAttribute('width', this.assetData.w);\r\n this.baseElement.setAttribute('height', this.assetData.h);\r\n } else {\r\n this.layerElement.appendChild(img);\r\n }\r\n\r\n img.crossOrigin = 'anonymous';\r\n img.src = assetPath;\r\n\r\n if (this.data.ln) {\r\n this.baseElement.setAttribute('id', this.data.ln);\r\n }\r\n };\r\n\r\n function HybridRendererBase(animationItem, config) {\r\n this.animationItem = animationItem;\r\n this.layers = null;\r\n this.renderedFrame = -1;\r\n this.renderConfig = {\r\n className: config && config.className || '',\r\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\r\n hideOnTransparent: !(config && config.hideOnTransparent === false),\r\n filterSize: {\r\n width: config && config.filterSize && config.filterSize.width || '400%',\r\n height: config && config.filterSize && config.filterSize.height || '400%',\r\n x: config && config.filterSize && config.filterSize.x || '-100%',\r\n y: config && config.filterSize && config.filterSize.y || '-100%'\r\n }\r\n };\r\n this.globalData = {\r\n _mdf: false,\r\n frameNum: -1,\r\n renderConfig: this.renderConfig\r\n };\r\n this.pendingElements = [];\r\n this.elements = [];\r\n this.threeDElements = [];\r\n this.destroyed = false;\r\n this.camera = null;\r\n this.supports3d = true;\r\n this.rendererType = 'html';\r\n }\r\n\r\n extendPrototype([BaseRenderer], HybridRendererBase);\r\n HybridRendererBase.prototype.buildItem = SVGRenderer.prototype.buildItem;\r\n\r\n HybridRendererBase.prototype.checkPendingElements = function () {\r\n while (this.pendingElements.length) {\r\n var element = this.pendingElements.pop();\r\n element.checkParenting();\r\n }\r\n };\r\n\r\n HybridRendererBase.prototype.appendElementInPos = function (element, pos) {\r\n var newDOMElement = element.getBaseElement();\r\n\r\n if (!newDOMElement) {\r\n return;\r\n }\r\n\r\n var layer = this.layers[pos];\r\n\r\n if (!layer.ddd || !this.supports3d) {\r\n if (this.threeDElements) {\r\n this.addTo3dContainer(newDOMElement, pos);\r\n } else {\r\n var i = 0;\r\n var nextDOMElement;\r\n var nextLayer;\r\n var tmpDOMElement;\r\n\r\n while (i < pos) {\r\n if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement) {\r\n nextLayer = this.elements[i];\r\n tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement();\r\n nextDOMElement = tmpDOMElement || nextDOMElement;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n if (nextDOMElement) {\r\n if (!layer.ddd || !this.supports3d) {\r\n this.layerElement.insertBefore(newDOMElement, nextDOMElement);\r\n }\r\n } else if (!layer.ddd || !this.supports3d) {\r\n this.layerElement.appendChild(newDOMElement);\r\n }\r\n }\r\n } else {\r\n this.addTo3dContainer(newDOMElement, pos);\r\n }\r\n };\r\n\r\n HybridRendererBase.prototype.createShape = function (data) {\r\n if (!this.supports3d) {\r\n return new SVGShapeElement(data, this.globalData, this);\r\n }\r\n\r\n return new HShapeElement(data, this.globalData, this);\r\n };\r\n\r\n HybridRendererBase.prototype.createText = function (data) {\r\n if (!this.supports3d) {\r\n return new SVGTextLottieElement(data, this.globalData, this);\r\n }\r\n\r\n return new HTextElement(data, this.globalData, this);\r\n };\r\n\r\n HybridRendererBase.prototype.createCamera = function (data) {\r\n this.camera = new HCameraElement(data, this.globalData, this);\r\n return this.camera;\r\n };\r\n\r\n HybridRendererBase.prototype.createImage = function (data) {\r\n if (!this.supports3d) {\r\n return new IImageElement(data, this.globalData, this);\r\n }\r\n\r\n return new HImageElement(data, this.globalData, this);\r\n };\r\n\r\n HybridRendererBase.prototype.createSolid = function (data) {\r\n if (!this.supports3d) {\r\n return new ISolidElement(data, this.globalData, this);\r\n }\r\n\r\n return new HSolidElement(data, this.globalData, this);\r\n };\r\n\r\n HybridRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;\r\n\r\n HybridRendererBase.prototype.getThreeDContainerByPos = function (pos) {\r\n var i = 0;\r\n var len = this.threeDElements.length;\r\n\r\n while (i < len) {\r\n if (this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) {\r\n return this.threeDElements[i].perspectiveElem;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null;\r\n };\r\n\r\n HybridRendererBase.prototype.createThreeDContainer = function (pos, type) {\r\n var perspectiveElem = createTag('div');\r\n var style;\r\n var containerStyle;\r\n styleDiv(perspectiveElem);\r\n var container = createTag('div');\r\n styleDiv(container);\r\n\r\n if (type === '3d') {\r\n style = perspectiveElem.style;\r\n style.width = this.globalData.compSize.w + 'px';\r\n style.height = this.globalData.compSize.h + 'px';\r\n var center = '50% 50%';\r\n style.webkitTransformOrigin = center;\r\n style.mozTransformOrigin = center;\r\n style.transformOrigin = center;\r\n containerStyle = container.style;\r\n var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';\r\n containerStyle.transform = matrix;\r\n containerStyle.webkitTransform = matrix;\r\n }\r\n\r\n perspectiveElem.appendChild(container); // this.resizerElem.appendChild(perspectiveElem);\r\n\r\n var threeDContainerData = {\r\n container: container,\r\n perspectiveElem: perspectiveElem,\r\n startPos: pos,\r\n endPos: pos,\r\n type: type\r\n };\r\n this.threeDElements.push(threeDContainerData);\r\n return threeDContainerData;\r\n };\r\n\r\n HybridRendererBase.prototype.build3dContainers = function () {\r\n var i;\r\n var len = this.layers.length;\r\n var lastThreeDContainerData;\r\n var currentContainer = '';\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.layers[i].ddd && this.layers[i].ty !== 3) {\r\n if (currentContainer !== '3d') {\r\n currentContainer = '3d';\r\n lastThreeDContainerData = this.createThreeDContainer(i, '3d');\r\n }\r\n\r\n lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);\r\n } else {\r\n if (currentContainer !== '2d') {\r\n currentContainer = '2d';\r\n lastThreeDContainerData = this.createThreeDContainer(i, '2d');\r\n }\r\n\r\n lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);\r\n }\r\n }\r\n\r\n len = this.threeDElements.length;\r\n\r\n for (i = len - 1; i >= 0; i -= 1) {\r\n this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem);\r\n }\r\n };\r\n\r\n HybridRendererBase.prototype.addTo3dContainer = function (elem, pos) {\r\n var i = 0;\r\n var len = this.threeDElements.length;\r\n\r\n while (i < len) {\r\n if (pos <= this.threeDElements[i].endPos) {\r\n var j = this.threeDElements[i].startPos;\r\n var nextElement;\r\n\r\n while (j < pos) {\r\n if (this.elements[j] && this.elements[j].getBaseElement) {\r\n nextElement = this.elements[j].getBaseElement();\r\n }\r\n\r\n j += 1;\r\n }\r\n\r\n if (nextElement) {\r\n this.threeDElements[i].container.insertBefore(elem, nextElement);\r\n } else {\r\n this.threeDElements[i].container.appendChild(elem);\r\n }\r\n\r\n break;\r\n }\r\n\r\n i += 1;\r\n }\r\n };\r\n\r\n HybridRendererBase.prototype.configAnimation = function (animData) {\r\n var resizerElem = createTag('div');\r\n var wrapper = this.animationItem.wrapper;\r\n var style = resizerElem.style;\r\n style.width = animData.w + 'px';\r\n style.height = animData.h + 'px';\r\n this.resizerElem = resizerElem;\r\n styleDiv(resizerElem);\r\n style.transformStyle = 'flat';\r\n style.mozTransformStyle = 'flat';\r\n style.webkitTransformStyle = 'flat';\r\n\r\n if (this.renderConfig.className) {\r\n resizerElem.setAttribute('class', this.renderConfig.className);\r\n }\r\n\r\n wrapper.appendChild(resizerElem);\r\n style.overflow = 'hidden';\r\n var svg = createNS('svg');\r\n svg.setAttribute('width', '1');\r\n svg.setAttribute('height', '1');\r\n styleDiv(svg);\r\n this.resizerElem.appendChild(svg);\r\n var defs = createNS('defs');\r\n svg.appendChild(defs);\r\n this.data = animData; // Mask animation\r\n\r\n this.setupGlobalData(animData, svg);\r\n this.globalData.defs = defs;\r\n this.layers = animData.layers;\r\n this.layerElement = this.resizerElem;\r\n this.build3dContainers();\r\n this.updateContainerSize();\r\n };\r\n\r\n HybridRendererBase.prototype.destroy = function () {\r\n if (this.animationItem.wrapper) {\r\n this.animationItem.wrapper.innerText = '';\r\n }\r\n\r\n this.animationItem.container = null;\r\n this.globalData.defs = null;\r\n var i;\r\n var len = this.layers ? this.layers.length : 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this.elements[i].destroy();\r\n }\r\n\r\n this.elements.length = 0;\r\n this.destroyed = true;\r\n this.animationItem = null;\r\n };\r\n\r\n HybridRendererBase.prototype.updateContainerSize = function () {\r\n var elementWidth = this.animationItem.wrapper.offsetWidth;\r\n var elementHeight = this.animationItem.wrapper.offsetHeight;\r\n var elementRel = elementWidth / elementHeight;\r\n var animationRel = this.globalData.compSize.w / this.globalData.compSize.h;\r\n var sx;\r\n var sy;\r\n var tx;\r\n var ty;\r\n\r\n if (animationRel > elementRel) {\r\n sx = elementWidth / this.globalData.compSize.w;\r\n sy = elementWidth / this.globalData.compSize.w;\r\n tx = 0;\r\n ty = (elementHeight - this.globalData.compSize.h * (elementWidth / this.globalData.compSize.w)) / 2;\r\n } else {\r\n sx = elementHeight / this.globalData.compSize.h;\r\n sy = elementHeight / this.globalData.compSize.h;\r\n tx = (elementWidth - this.globalData.compSize.w * (elementHeight / this.globalData.compSize.h)) / 2;\r\n ty = 0;\r\n }\r\n\r\n var style = this.resizerElem.style;\r\n style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,' + sy + ',0,0,0,0,1,0,' + tx + ',' + ty + ',0,1)';\r\n style.transform = style.webkitTransform;\r\n };\r\n\r\n HybridRendererBase.prototype.renderFrame = SVGRenderer.prototype.renderFrame;\r\n\r\n HybridRendererBase.prototype.hide = function () {\r\n this.resizerElem.style.display = 'none';\r\n };\r\n\r\n HybridRendererBase.prototype.show = function () {\r\n this.resizerElem.style.display = 'block';\r\n };\r\n\r\n HybridRendererBase.prototype.initItems = function () {\r\n this.buildAllItems();\r\n\r\n if (this.camera) {\r\n this.camera.setup();\r\n } else {\r\n var cWidth = this.globalData.compSize.w;\r\n var cHeight = this.globalData.compSize.h;\r\n var i;\r\n var len = this.threeDElements.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n var style = this.threeDElements[i].perspectiveElem.style;\r\n style.webkitPerspective = Math.sqrt(Math.pow(cWidth, 2) + Math.pow(cHeight, 2)) + 'px';\r\n style.perspective = style.webkitPerspective;\r\n }\r\n }\r\n };\r\n\r\n HybridRendererBase.prototype.searchExtraCompositions = function (assets) {\r\n var i;\r\n var len = assets.length;\r\n var floatingContainer = createTag('div');\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (assets[i].xt) {\r\n var comp = this.createComp(assets[i], floatingContainer, this.globalData.comp, null);\r\n comp.initExpressions();\r\n this.globalData.projectInterface.registerComposition(comp);\r\n }\r\n }\r\n };\r\n\r\n function HCompElement(data, globalData, comp) {\r\n this.layers = data.layers;\r\n this.supports3d = !data.hasMask;\r\n this.completeLayers = false;\r\n this.pendingElements = [];\r\n this.elements = this.layers ? createSizedArray(this.layers.length) : [];\r\n this.initElement(data, globalData, comp);\r\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\r\n _placeholder: true\r\n };\r\n }\r\n\r\n extendPrototype([HybridRendererBase, ICompElement, HBaseElement], HCompElement);\r\n HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements;\r\n\r\n HCompElement.prototype.createContainerElements = function () {\r\n this._createBaseContainerElements(); // divElement.style.clip = 'rect(0px, '+this.data.w+'px, '+this.data.h+'px, 0px)';\r\n\r\n\r\n if (this.data.hasMask) {\r\n this.svgElement.setAttribute('width', this.data.w);\r\n this.svgElement.setAttribute('height', this.data.h);\r\n this.transformedElement = this.baseElement;\r\n } else {\r\n this.transformedElement = this.layerElement;\r\n }\r\n };\r\n\r\n HCompElement.prototype.addTo3dContainer = function (elem, pos) {\r\n var j = 0;\r\n var nextElement;\r\n\r\n while (j < pos) {\r\n if (this.elements[j] && this.elements[j].getBaseElement) {\r\n nextElement = this.elements[j].getBaseElement();\r\n }\r\n\r\n j += 1;\r\n }\r\n\r\n if (nextElement) {\r\n this.layerElement.insertBefore(elem, nextElement);\r\n } else {\r\n this.layerElement.appendChild(elem);\r\n }\r\n };\r\n\r\n HCompElement.prototype.createComp = function (data) {\r\n if (!this.supports3d) {\r\n return new SVGCompElement(data, this.globalData, this);\r\n }\r\n\r\n return new HCompElement(data, this.globalData, this);\r\n };\r\n\r\n function HybridRenderer(animationItem, config) {\r\n this.animationItem = animationItem;\r\n this.layers = null;\r\n this.renderedFrame = -1;\r\n this.renderConfig = {\r\n className: config && config.className || '',\r\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\r\n hideOnTransparent: !(config && config.hideOnTransparent === false),\r\n filterSize: {\r\n width: config && config.filterSize && config.filterSize.width || '400%',\r\n height: config && config.filterSize && config.filterSize.height || '400%',\r\n x: config && config.filterSize && config.filterSize.x || '-100%',\r\n y: config && config.filterSize && config.filterSize.y || '-100%'\r\n },\r\n runExpressions: !config || config.runExpressions === undefined || config.runExpressions\r\n };\r\n this.globalData = {\r\n _mdf: false,\r\n frameNum: -1,\r\n renderConfig: this.renderConfig\r\n };\r\n this.pendingElements = [];\r\n this.elements = [];\r\n this.threeDElements = [];\r\n this.destroyed = false;\r\n this.camera = null;\r\n this.supports3d = true;\r\n this.rendererType = 'html';\r\n }\r\n\r\n extendPrototype([HybridRendererBase], HybridRenderer);\r\n\r\n HybridRenderer.prototype.createComp = function (data) {\r\n if (!this.supports3d) {\r\n return new SVGCompElement(data, this.globalData, this);\r\n }\r\n\r\n return new HCompElement(data, this.globalData, this);\r\n };\r\n\r\n var CompExpressionInterface = function () {\r\n return function (comp) {\r\n function _thisLayerFunction(name) {\r\n var i = 0;\r\n var len = comp.layers.length;\r\n\r\n while (i < len) {\r\n if (comp.layers[i].nm === name || comp.layers[i].ind === name) {\r\n return comp.elements[i].layerInterface;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null; // return {active:false};\r\n }\r\n\r\n Object.defineProperty(_thisLayerFunction, '_name', {\r\n value: comp.data.nm\r\n });\r\n _thisLayerFunction.layer = _thisLayerFunction;\r\n _thisLayerFunction.pixelAspect = 1;\r\n _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;\r\n _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;\r\n _thisLayerFunction.pixelAspect = 1;\r\n _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;\r\n _thisLayerFunction.displayStartTime = 0;\r\n _thisLayerFunction.numLayers = comp.layers.length;\r\n return _thisLayerFunction;\r\n };\r\n }();\r\n\r\n var Expressions = function () {\r\n var ob = {};\r\n ob.initExpressions = initExpressions;\r\n\r\n function initExpressions(animation) {\r\n var stackCount = 0;\r\n var registers = [];\r\n\r\n function pushExpression() {\r\n stackCount += 1;\r\n }\r\n\r\n function popExpression() {\r\n stackCount -= 1;\r\n\r\n if (stackCount === 0) {\r\n releaseInstances();\r\n }\r\n }\r\n\r\n function registerExpressionProperty(expression) {\r\n if (registers.indexOf(expression) === -1) {\r\n registers.push(expression);\r\n }\r\n }\r\n\r\n function releaseInstances() {\r\n var i;\r\n var len = registers.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n registers[i].release();\r\n }\r\n\r\n registers.length = 0;\r\n }\r\n\r\n animation.renderer.compInterface = CompExpressionInterface(animation.renderer);\r\n animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);\r\n animation.renderer.globalData.pushExpression = pushExpression;\r\n animation.renderer.globalData.popExpression = popExpression;\r\n animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;\r\n }\r\n\r\n return ob;\r\n }();\r\n\r\n var MaskManagerInterface = function () {\r\n function MaskInterface(mask, data) {\r\n this._mask = mask;\r\n this._data = data;\r\n }\r\n\r\n Object.defineProperty(MaskInterface.prototype, 'maskPath', {\r\n get: function get() {\r\n if (this._mask.prop.k) {\r\n this._mask.prop.getValue();\r\n }\r\n\r\n return this._mask.prop;\r\n }\r\n });\r\n Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {\r\n get: function get() {\r\n if (this._mask.op.k) {\r\n this._mask.op.getValue();\r\n }\r\n\r\n return this._mask.op.v * 100;\r\n }\r\n });\r\n\r\n var MaskManager = function MaskManager(maskManager) {\r\n var _masksInterfaces = createSizedArray(maskManager.viewData.length);\r\n\r\n var i;\r\n var len = maskManager.viewData.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);\r\n }\r\n\r\n var maskFunction = function maskFunction(name) {\r\n i = 0;\r\n\r\n while (i < len) {\r\n if (maskManager.masksProperties[i].nm === name) {\r\n return _masksInterfaces[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null;\r\n };\r\n\r\n return maskFunction;\r\n };\r\n\r\n return MaskManager;\r\n }();\r\n\r\n var ExpressionPropertyInterface = function () {\r\n var defaultUnidimensionalValue = {\r\n pv: 0,\r\n v: 0,\r\n mult: 1\r\n };\r\n var defaultMultidimensionalValue = {\r\n pv: [0, 0, 0],\r\n v: [0, 0, 0],\r\n mult: 1\r\n };\r\n\r\n function completeProperty(expressionValue, property, type) {\r\n Object.defineProperty(expressionValue, 'velocity', {\r\n get: function get() {\r\n return property.getVelocityAtTime(property.comp.currentFrame);\r\n }\r\n });\r\n expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;\r\n\r\n expressionValue.key = function (pos) {\r\n if (!expressionValue.numKeys) {\r\n return 0;\r\n }\r\n\r\n var value = '';\r\n\r\n if ('s' in property.keyframes[pos - 1]) {\r\n value = property.keyframes[pos - 1].s;\r\n } else if ('e' in property.keyframes[pos - 2]) {\r\n value = property.keyframes[pos - 2].e;\r\n } else {\r\n value = property.keyframes[pos - 2].s;\r\n }\r\n\r\n var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers\r\n\r\n valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;\r\n valueProp.value = type === 'unidimensional' ? value[0] : value;\r\n return valueProp;\r\n };\r\n\r\n expressionValue.valueAtTime = property.getValueAtTime;\r\n expressionValue.speedAtTime = property.getSpeedAtTime;\r\n expressionValue.velocityAtTime = property.getVelocityAtTime;\r\n expressionValue.propertyGroup = property.propertyGroup;\r\n }\r\n\r\n function UnidimensionalPropertyInterface(property) {\r\n if (!property || !('pv' in property)) {\r\n property = defaultUnidimensionalValue;\r\n }\r\n\r\n var mult = 1 / property.mult;\r\n var val = property.pv * mult;\r\n var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers\r\n\r\n expressionValue.value = val;\r\n completeProperty(expressionValue, property, 'unidimensional');\r\n return function () {\r\n if (property.k) {\r\n property.getValue();\r\n }\r\n\r\n val = property.v * mult;\r\n\r\n if (expressionValue.value !== val) {\r\n expressionValue = new Number(val); // eslint-disable-line no-new-wrappers\r\n\r\n expressionValue.value = val;\r\n completeProperty(expressionValue, property, 'unidimensional');\r\n }\r\n\r\n return expressionValue;\r\n };\r\n }\r\n\r\n function MultidimensionalPropertyInterface(property) {\r\n if (!property || !('pv' in property)) {\r\n property = defaultMultidimensionalValue;\r\n }\r\n\r\n var mult = 1 / property.mult;\r\n var len = property.data && property.data.l || property.pv.length;\r\n var expressionValue = createTypedArray('float32', len);\r\n var arrValue = createTypedArray('float32', len);\r\n expressionValue.value = arrValue;\r\n completeProperty(expressionValue, property, 'multidimensional');\r\n return function () {\r\n if (property.k) {\r\n property.getValue();\r\n }\r\n\r\n for (var i = 0; i < len; i += 1) {\r\n arrValue[i] = property.v[i] * mult;\r\n expressionValue[i] = arrValue[i];\r\n }\r\n\r\n return expressionValue;\r\n };\r\n } // TODO: try to avoid using this getter\r\n\r\n\r\n function defaultGetter() {\r\n return defaultUnidimensionalValue;\r\n }\r\n\r\n return function (property) {\r\n if (!property) {\r\n return defaultGetter;\r\n }\r\n\r\n if (property.propType === 'unidimensional') {\r\n return UnidimensionalPropertyInterface(property);\r\n }\r\n\r\n return MultidimensionalPropertyInterface(property);\r\n };\r\n }();\r\n\r\n var TransformExpressionInterface = function () {\r\n return function (transform) {\r\n function _thisFunction(name) {\r\n switch (name) {\r\n case 'scale':\r\n case 'Scale':\r\n case 'ADBE Scale':\r\n case 6:\r\n return _thisFunction.scale;\r\n\r\n case 'rotation':\r\n case 'Rotation':\r\n case 'ADBE Rotation':\r\n case 'ADBE Rotate Z':\r\n case 10:\r\n return _thisFunction.rotation;\r\n\r\n case 'ADBE Rotate X':\r\n return _thisFunction.xRotation;\r\n\r\n case 'ADBE Rotate Y':\r\n return _thisFunction.yRotation;\r\n\r\n case 'position':\r\n case 'Position':\r\n case 'ADBE Position':\r\n case 2:\r\n return _thisFunction.position;\r\n\r\n case 'ADBE Position_0':\r\n return _thisFunction.xPosition;\r\n\r\n case 'ADBE Position_1':\r\n return _thisFunction.yPosition;\r\n\r\n case 'ADBE Position_2':\r\n return _thisFunction.zPosition;\r\n\r\n case 'anchorPoint':\r\n case 'AnchorPoint':\r\n case 'Anchor Point':\r\n case 'ADBE AnchorPoint':\r\n case 1:\r\n return _thisFunction.anchorPoint;\r\n\r\n case 'opacity':\r\n case 'Opacity':\r\n case 11:\r\n return _thisFunction.opacity;\r\n\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n Object.defineProperty(_thisFunction, 'rotation', {\r\n get: ExpressionPropertyInterface(transform.r || transform.rz)\r\n });\r\n Object.defineProperty(_thisFunction, 'zRotation', {\r\n get: ExpressionPropertyInterface(transform.rz || transform.r)\r\n });\r\n Object.defineProperty(_thisFunction, 'xRotation', {\r\n get: ExpressionPropertyInterface(transform.rx)\r\n });\r\n Object.defineProperty(_thisFunction, 'yRotation', {\r\n get: ExpressionPropertyInterface(transform.ry)\r\n });\r\n Object.defineProperty(_thisFunction, 'scale', {\r\n get: ExpressionPropertyInterface(transform.s)\r\n });\r\n\r\n var _px;\r\n\r\n var _py;\r\n\r\n var _pz;\r\n\r\n var _transformFactory;\r\n\r\n if (transform.p) {\r\n _transformFactory = ExpressionPropertyInterface(transform.p);\r\n } else {\r\n _px = ExpressionPropertyInterface(transform.px);\r\n _py = ExpressionPropertyInterface(transform.py);\r\n\r\n if (transform.pz) {\r\n _pz = ExpressionPropertyInterface(transform.pz);\r\n }\r\n }\r\n\r\n Object.defineProperty(_thisFunction, 'position', {\r\n get: function get() {\r\n if (transform.p) {\r\n return _transformFactory();\r\n }\r\n\r\n return [_px(), _py(), _pz ? _pz() : 0];\r\n }\r\n });\r\n Object.defineProperty(_thisFunction, 'xPosition', {\r\n get: ExpressionPropertyInterface(transform.px)\r\n });\r\n Object.defineProperty(_thisFunction, 'yPosition', {\r\n get: ExpressionPropertyInterface(transform.py)\r\n });\r\n Object.defineProperty(_thisFunction, 'zPosition', {\r\n get: ExpressionPropertyInterface(transform.pz)\r\n });\r\n Object.defineProperty(_thisFunction, 'anchorPoint', {\r\n get: ExpressionPropertyInterface(transform.a)\r\n });\r\n Object.defineProperty(_thisFunction, 'opacity', {\r\n get: ExpressionPropertyInterface(transform.o)\r\n });\r\n Object.defineProperty(_thisFunction, 'skew', {\r\n get: ExpressionPropertyInterface(transform.sk)\r\n });\r\n Object.defineProperty(_thisFunction, 'skewAxis', {\r\n get: ExpressionPropertyInterface(transform.sa)\r\n });\r\n Object.defineProperty(_thisFunction, 'orientation', {\r\n get: ExpressionPropertyInterface(transform.or)\r\n });\r\n return _thisFunction;\r\n };\r\n }();\r\n\r\n var LayerExpressionInterface = function () {\r\n function getMatrix(time) {\r\n var toWorldMat = new Matrix();\r\n\r\n if (time !== undefined) {\r\n var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);\r\n\r\n propMatrix.clone(toWorldMat);\r\n } else {\r\n var transformMat = this._elem.finalTransform.mProp;\r\n transformMat.applyToMatrix(toWorldMat);\r\n }\r\n\r\n return toWorldMat;\r\n }\r\n\r\n function toWorldVec(arr, time) {\r\n var toWorldMat = this.getMatrix(time);\r\n toWorldMat.props[12] = 0;\r\n toWorldMat.props[13] = 0;\r\n toWorldMat.props[14] = 0;\r\n return this.applyPoint(toWorldMat, arr);\r\n }\r\n\r\n function toWorld(arr, time) {\r\n var toWorldMat = this.getMatrix(time);\r\n return this.applyPoint(toWorldMat, arr);\r\n }\r\n\r\n function fromWorldVec(arr, time) {\r\n var toWorldMat = this.getMatrix(time);\r\n toWorldMat.props[12] = 0;\r\n toWorldMat.props[13] = 0;\r\n toWorldMat.props[14] = 0;\r\n return this.invertPoint(toWorldMat, arr);\r\n }\r\n\r\n function fromWorld(arr, time) {\r\n var toWorldMat = this.getMatrix(time);\r\n return this.invertPoint(toWorldMat, arr);\r\n }\r\n\r\n function applyPoint(matrix, arr) {\r\n if (this._elem.hierarchy && this._elem.hierarchy.length) {\r\n var i;\r\n var len = this._elem.hierarchy.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);\r\n }\r\n }\r\n\r\n return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);\r\n }\r\n\r\n function invertPoint(matrix, arr) {\r\n if (this._elem.hierarchy && this._elem.hierarchy.length) {\r\n var i;\r\n var len = this._elem.hierarchy.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);\r\n }\r\n }\r\n\r\n return matrix.inversePoint(arr);\r\n }\r\n\r\n function fromComp(arr) {\r\n var toWorldMat = new Matrix();\r\n toWorldMat.reset();\r\n\r\n this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);\r\n\r\n if (this._elem.hierarchy && this._elem.hierarchy.length) {\r\n var i;\r\n var len = this._elem.hierarchy.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);\r\n }\r\n\r\n return toWorldMat.inversePoint(arr);\r\n }\r\n\r\n return toWorldMat.inversePoint(arr);\r\n }\r\n\r\n function sampleImage() {\r\n return [1, 1, 1, 1];\r\n }\r\n\r\n return function (elem) {\r\n var transformInterface;\r\n\r\n function _registerMaskInterface(maskManager) {\r\n _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);\r\n }\r\n\r\n function _registerEffectsInterface(effects) {\r\n _thisLayerFunction.effect = effects;\r\n }\r\n\r\n function _thisLayerFunction(name) {\r\n switch (name) {\r\n case 'ADBE Root Vectors Group':\r\n case 'Contents':\r\n case 2:\r\n return _thisLayerFunction.shapeInterface;\r\n\r\n case 1:\r\n case 6:\r\n case 'Transform':\r\n case 'transform':\r\n case 'ADBE Transform Group':\r\n return transformInterface;\r\n\r\n case 4:\r\n case 'ADBE Effect Parade':\r\n case 'effects':\r\n case 'Effects':\r\n return _thisLayerFunction.effect;\r\n\r\n case 'ADBE Text Properties':\r\n return _thisLayerFunction.textInterface;\r\n\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n _thisLayerFunction.getMatrix = getMatrix;\r\n _thisLayerFunction.invertPoint = invertPoint;\r\n _thisLayerFunction.applyPoint = applyPoint;\r\n _thisLayerFunction.toWorld = toWorld;\r\n _thisLayerFunction.toWorldVec = toWorldVec;\r\n _thisLayerFunction.fromWorld = fromWorld;\r\n _thisLayerFunction.fromWorldVec = fromWorldVec;\r\n _thisLayerFunction.toComp = toWorld;\r\n _thisLayerFunction.fromComp = fromComp;\r\n _thisLayerFunction.sampleImage = sampleImage;\r\n _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);\r\n _thisLayerFunction._elem = elem;\r\n transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);\r\n var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');\r\n Object.defineProperties(_thisLayerFunction, {\r\n hasParent: {\r\n get: function get() {\r\n return elem.hierarchy.length;\r\n }\r\n },\r\n parent: {\r\n get: function get() {\r\n return elem.hierarchy[0].layerInterface;\r\n }\r\n },\r\n rotation: getDescriptor(transformInterface, 'rotation'),\r\n scale: getDescriptor(transformInterface, 'scale'),\r\n position: getDescriptor(transformInterface, 'position'),\r\n opacity: getDescriptor(transformInterface, 'opacity'),\r\n anchorPoint: anchorPointDescriptor,\r\n anchor_point: anchorPointDescriptor,\r\n transform: {\r\n get: function get() {\r\n return transformInterface;\r\n }\r\n },\r\n active: {\r\n get: function get() {\r\n return elem.isInRange;\r\n }\r\n }\r\n });\r\n _thisLayerFunction.startTime = elem.data.st;\r\n _thisLayerFunction.index = elem.data.ind;\r\n _thisLayerFunction.source = elem.data.refId;\r\n _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;\r\n _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;\r\n _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;\r\n _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;\r\n _thisLayerFunction._name = elem.data.nm;\r\n _thisLayerFunction.registerMaskInterface = _registerMaskInterface;\r\n _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;\r\n return _thisLayerFunction;\r\n };\r\n }();\r\n\r\n var propertyGroupFactory = function () {\r\n return function (interfaceFunction, parentPropertyGroup) {\r\n return function (val) {\r\n val = val === undefined ? 1 : val;\r\n\r\n if (val <= 0) {\r\n return interfaceFunction;\r\n }\r\n\r\n return parentPropertyGroup(val - 1);\r\n };\r\n };\r\n }();\r\n\r\n var PropertyInterface = function () {\r\n return function (propertyName, propertyGroup) {\r\n var interfaceFunction = {\r\n _name: propertyName\r\n };\r\n\r\n function _propertyGroup(val) {\r\n val = val === undefined ? 1 : val;\r\n\r\n if (val <= 0) {\r\n return interfaceFunction;\r\n }\r\n\r\n return propertyGroup(val - 1);\r\n }\r\n\r\n return _propertyGroup;\r\n };\r\n }();\r\n\r\n var EffectsExpressionInterface = function () {\r\n var ob = {\r\n createEffectsInterface: createEffectsInterface\r\n };\r\n\r\n function createEffectsInterface(elem, propertyGroup) {\r\n if (elem.effectsManager) {\r\n var effectElements = [];\r\n var effectsData = elem.data.ef;\r\n var i;\r\n var len = elem.effectsManager.effectElements.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));\r\n }\r\n\r\n var effects = elem.data.ef || [];\r\n\r\n var groupInterface = function groupInterface(name) {\r\n i = 0;\r\n len = effects.length;\r\n\r\n while (i < len) {\r\n if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {\r\n return effectElements[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null;\r\n };\r\n\r\n Object.defineProperty(groupInterface, 'numProperties', {\r\n get: function get() {\r\n return effects.length;\r\n }\r\n });\r\n return groupInterface;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n function createGroupInterface(data, elements, propertyGroup, elem) {\r\n function groupInterface(name) {\r\n var effects = data.ef;\r\n var i = 0;\r\n var len = effects.length;\r\n\r\n while (i < len) {\r\n if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {\r\n if (effects[i].ty === 5) {\r\n return effectElements[i];\r\n }\r\n\r\n return effectElements[i]();\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n throw new Error();\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);\r\n\r\n var effectElements = [];\r\n var i;\r\n var len = data.ef.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (data.ef[i].ty === 5) {\r\n effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));\r\n } else {\r\n effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));\r\n }\r\n }\r\n\r\n if (data.mn === 'ADBE Color Control') {\r\n Object.defineProperty(groupInterface, 'color', {\r\n get: function get() {\r\n return effectElements[0]();\r\n }\r\n });\r\n }\r\n\r\n Object.defineProperties(groupInterface, {\r\n numProperties: {\r\n get: function get() {\r\n return data.np;\r\n }\r\n },\r\n _name: {\r\n value: data.nm\r\n },\r\n propertyGroup: {\r\n value: _propertyGroup\r\n }\r\n });\r\n groupInterface.enabled = data.en !== 0;\r\n groupInterface.active = groupInterface.enabled;\r\n return groupInterface;\r\n }\r\n\r\n function createValueInterface(element, type, elem, propertyGroup) {\r\n var expressionProperty = ExpressionPropertyInterface(element.p);\r\n\r\n function interfaceFunction() {\r\n if (type === 10) {\r\n return elem.comp.compInterface(element.p.v);\r\n }\r\n\r\n return expressionProperty();\r\n }\r\n\r\n if (element.p.setGroupProperty) {\r\n element.p.setGroupProperty(PropertyInterface('', propertyGroup));\r\n }\r\n\r\n return interfaceFunction;\r\n }\r\n\r\n return ob;\r\n }();\r\n\r\n var ShapePathInterface = function () {\r\n return function pathInterfaceFactory(shape, view, propertyGroup) {\r\n var prop = view.sh;\r\n\r\n function interfaceFunction(val) {\r\n if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) {\r\n return interfaceFunction.path;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n prop.setGroupProperty(PropertyInterface('Path', _propertyGroup));\r\n Object.defineProperties(interfaceFunction, {\r\n path: {\r\n get: function get() {\r\n if (prop.k) {\r\n prop.getValue();\r\n }\r\n\r\n return prop;\r\n }\r\n },\r\n shape: {\r\n get: function get() {\r\n if (prop.k) {\r\n prop.getValue();\r\n }\r\n\r\n return prop;\r\n }\r\n },\r\n _name: {\r\n value: shape.nm\r\n },\r\n ix: {\r\n value: shape.ix\r\n },\r\n propertyIndex: {\r\n value: shape.ix\r\n },\r\n mn: {\r\n value: shape.mn\r\n },\r\n propertyGroup: {\r\n value: propertyGroup\r\n }\r\n });\r\n return interfaceFunction;\r\n };\r\n }();\r\n\r\n var ShapeExpressionInterface = function () {\r\n function iterateElements(shapes, view, propertyGroup) {\r\n var arr = [];\r\n var i;\r\n var len = shapes ? shapes.length : 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (shapes[i].ty === 'gr') {\r\n arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'fl') {\r\n arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'st') {\r\n arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'tm') {\r\n arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'tr') {// arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));\r\n } else if (shapes[i].ty === 'el') {\r\n arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'sr') {\r\n arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'sh') {\r\n arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'rc') {\r\n arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'rd') {\r\n arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'rp') {\r\n arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else if (shapes[i].ty === 'gf') {\r\n arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n } else {\r\n arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));\r\n }\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n function contentsInterfaceFactory(shape, view, propertyGroup) {\r\n var interfaces;\r\n\r\n var interfaceFunction = function _interfaceFunction(value) {\r\n var i = 0;\r\n var len = interfaces.length;\r\n\r\n while (i < len) {\r\n if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {\r\n return interfaces[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n if (typeof value === 'number') {\r\n return interfaces[value - 1];\r\n }\r\n\r\n return null;\r\n };\r\n\r\n interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);\r\n interfaceFunction.numProperties = interfaces.length;\r\n var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);\r\n interfaceFunction.transform = transformInterface;\r\n interfaceFunction.propertyIndex = shape.cix;\r\n interfaceFunction._name = shape.nm;\r\n return interfaceFunction;\r\n }\r\n\r\n function groupInterfaceFactory(shape, view, propertyGroup) {\r\n var interfaceFunction = function _interfaceFunction(value) {\r\n switch (value) {\r\n case 'ADBE Vectors Group':\r\n case 'Contents':\r\n case 2:\r\n return interfaceFunction.content;\r\n // Not necessary for now. Keeping them here in case a new case appears\r\n // case 'ADBE Vector Transform Group':\r\n // case 3:\r\n\r\n default:\r\n return interfaceFunction.transform;\r\n }\r\n };\r\n\r\n interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);\r\n var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);\r\n interfaceFunction.content = content;\r\n interfaceFunction.transform = transformInterface;\r\n Object.defineProperty(interfaceFunction, '_name', {\r\n get: function get() {\r\n return shape.nm;\r\n }\r\n }); // interfaceFunction.content = interfaceFunction;\r\n\r\n interfaceFunction.numProperties = shape.np;\r\n interfaceFunction.propertyIndex = shape.ix;\r\n interfaceFunction.nm = shape.nm;\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n function fillInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(val) {\r\n if (val === 'Color' || val === 'color') {\r\n return interfaceFunction.color;\r\n }\r\n\r\n if (val === 'Opacity' || val === 'opacity') {\r\n return interfaceFunction.opacity;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n Object.defineProperties(interfaceFunction, {\r\n color: {\r\n get: ExpressionPropertyInterface(view.c)\r\n },\r\n opacity: {\r\n get: ExpressionPropertyInterface(view.o)\r\n },\r\n _name: {\r\n value: shape.nm\r\n },\r\n mn: {\r\n value: shape.mn\r\n }\r\n });\r\n view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));\r\n view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));\r\n return interfaceFunction;\r\n }\r\n\r\n function gradientFillInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(val) {\r\n if (val === 'Start Point' || val === 'start point') {\r\n return interfaceFunction.startPoint;\r\n }\r\n\r\n if (val === 'End Point' || val === 'end point') {\r\n return interfaceFunction.endPoint;\r\n }\r\n\r\n if (val === 'Opacity' || val === 'opacity') {\r\n return interfaceFunction.opacity;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n Object.defineProperties(interfaceFunction, {\r\n startPoint: {\r\n get: ExpressionPropertyInterface(view.s)\r\n },\r\n endPoint: {\r\n get: ExpressionPropertyInterface(view.e)\r\n },\r\n opacity: {\r\n get: ExpressionPropertyInterface(view.o)\r\n },\r\n type: {\r\n get: function get() {\r\n return 'a';\r\n }\r\n },\r\n _name: {\r\n value: shape.nm\r\n },\r\n mn: {\r\n value: shape.mn\r\n }\r\n });\r\n view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));\r\n view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));\r\n view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));\r\n return interfaceFunction;\r\n }\r\n\r\n function defaultInterfaceFactory() {\r\n function interfaceFunction() {\r\n return null;\r\n }\r\n\r\n return interfaceFunction;\r\n }\r\n\r\n function strokeInterfaceFactory(shape, view, propertyGroup) {\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);\r\n\r\n function addPropertyToDashOb(i) {\r\n Object.defineProperty(dashOb, shape.d[i].nm, {\r\n get: ExpressionPropertyInterface(view.d.dataProps[i].p)\r\n });\r\n }\r\n\r\n var i;\r\n var len = shape.d ? shape.d.length : 0;\r\n var dashOb = {};\r\n\r\n for (i = 0; i < len; i += 1) {\r\n addPropertyToDashOb(i);\r\n view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);\r\n }\r\n\r\n function interfaceFunction(val) {\r\n if (val === 'Color' || val === 'color') {\r\n return interfaceFunction.color;\r\n }\r\n\r\n if (val === 'Opacity' || val === 'opacity') {\r\n return interfaceFunction.opacity;\r\n }\r\n\r\n if (val === 'Stroke Width' || val === 'stroke width') {\r\n return interfaceFunction.strokeWidth;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n Object.defineProperties(interfaceFunction, {\r\n color: {\r\n get: ExpressionPropertyInterface(view.c)\r\n },\r\n opacity: {\r\n get: ExpressionPropertyInterface(view.o)\r\n },\r\n strokeWidth: {\r\n get: ExpressionPropertyInterface(view.w)\r\n },\r\n dash: {\r\n get: function get() {\r\n return dashOb;\r\n }\r\n },\r\n _name: {\r\n value: shape.nm\r\n },\r\n mn: {\r\n value: shape.mn\r\n }\r\n });\r\n view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));\r\n view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\r\n view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));\r\n return interfaceFunction;\r\n }\r\n\r\n function trimInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(val) {\r\n if (val === shape.e.ix || val === 'End' || val === 'end') {\r\n return interfaceFunction.end;\r\n }\r\n\r\n if (val === shape.s.ix) {\r\n return interfaceFunction.start;\r\n }\r\n\r\n if (val === shape.o.ix) {\r\n return interfaceFunction.offset;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n interfaceFunction.propertyIndex = shape.ix;\r\n view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));\r\n view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));\r\n view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));\r\n interfaceFunction.propertyIndex = shape.ix;\r\n interfaceFunction.propertyGroup = propertyGroup;\r\n Object.defineProperties(interfaceFunction, {\r\n start: {\r\n get: ExpressionPropertyInterface(view.s)\r\n },\r\n end: {\r\n get: ExpressionPropertyInterface(view.e)\r\n },\r\n offset: {\r\n get: ExpressionPropertyInterface(view.o)\r\n },\r\n _name: {\r\n value: shape.nm\r\n }\r\n });\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n function transformInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(value) {\r\n if (shape.a.ix === value || value === 'Anchor Point') {\r\n return interfaceFunction.anchorPoint;\r\n }\r\n\r\n if (shape.o.ix === value || value === 'Opacity') {\r\n return interfaceFunction.opacity;\r\n }\r\n\r\n if (shape.p.ix === value || value === 'Position') {\r\n return interfaceFunction.position;\r\n }\r\n\r\n if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {\r\n return interfaceFunction.rotation;\r\n }\r\n\r\n if (shape.s.ix === value || value === 'Scale') {\r\n return interfaceFunction.scale;\r\n }\r\n\r\n if (shape.sk && shape.sk.ix === value || value === 'Skew') {\r\n return interfaceFunction.skew;\r\n }\r\n\r\n if (shape.sa && shape.sa.ix === value || value === 'Skew Axis') {\r\n return interfaceFunction.skewAxis;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\r\n view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\r\n view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));\r\n view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));\r\n view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\r\n\r\n if (view.transform.mProps.sk) {\r\n view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));\r\n view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));\r\n }\r\n\r\n view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\r\n Object.defineProperties(interfaceFunction, {\r\n opacity: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.o)\r\n },\r\n position: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.p)\r\n },\r\n anchorPoint: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.a)\r\n },\r\n scale: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.s)\r\n },\r\n rotation: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.r)\r\n },\r\n skew: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.sk)\r\n },\r\n skewAxis: {\r\n get: ExpressionPropertyInterface(view.transform.mProps.sa)\r\n },\r\n _name: {\r\n value: shape.nm\r\n }\r\n });\r\n interfaceFunction.ty = 'tr';\r\n interfaceFunction.mn = shape.mn;\r\n interfaceFunction.propertyGroup = propertyGroup;\r\n return interfaceFunction;\r\n }\r\n\r\n function ellipseInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(value) {\r\n if (shape.p.ix === value) {\r\n return interfaceFunction.position;\r\n }\r\n\r\n if (shape.s.ix === value) {\r\n return interfaceFunction.size;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n interfaceFunction.propertyIndex = shape.ix;\r\n var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\r\n prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));\r\n prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\r\n Object.defineProperties(interfaceFunction, {\r\n size: {\r\n get: ExpressionPropertyInterface(prop.s)\r\n },\r\n position: {\r\n get: ExpressionPropertyInterface(prop.p)\r\n },\r\n _name: {\r\n value: shape.nm\r\n }\r\n });\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n function starInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(value) {\r\n if (shape.p.ix === value) {\r\n return interfaceFunction.position;\r\n }\r\n\r\n if (shape.r.ix === value) {\r\n return interfaceFunction.rotation;\r\n }\r\n\r\n if (shape.pt.ix === value) {\r\n return interfaceFunction.points;\r\n }\r\n\r\n if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {\r\n return interfaceFunction.outerRadius;\r\n }\r\n\r\n if (shape.os.ix === value) {\r\n return interfaceFunction.outerRoundness;\r\n }\r\n\r\n if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {\r\n return interfaceFunction.innerRadius;\r\n }\r\n\r\n if (shape.is && shape.is.ix === value) {\r\n return interfaceFunction.innerRoundness;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\r\n interfaceFunction.propertyIndex = shape.ix;\r\n prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));\r\n prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));\r\n prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));\r\n prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\r\n prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\r\n\r\n if (shape.ir) {\r\n prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));\r\n prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));\r\n }\r\n\r\n Object.defineProperties(interfaceFunction, {\r\n position: {\r\n get: ExpressionPropertyInterface(prop.p)\r\n },\r\n rotation: {\r\n get: ExpressionPropertyInterface(prop.r)\r\n },\r\n points: {\r\n get: ExpressionPropertyInterface(prop.pt)\r\n },\r\n outerRadius: {\r\n get: ExpressionPropertyInterface(prop.or)\r\n },\r\n outerRoundness: {\r\n get: ExpressionPropertyInterface(prop.os)\r\n },\r\n innerRadius: {\r\n get: ExpressionPropertyInterface(prop.ir)\r\n },\r\n innerRoundness: {\r\n get: ExpressionPropertyInterface(prop.is)\r\n },\r\n _name: {\r\n value: shape.nm\r\n }\r\n });\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n function rectInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(value) {\r\n if (shape.p.ix === value) {\r\n return interfaceFunction.position;\r\n }\r\n\r\n if (shape.r.ix === value) {\r\n return interfaceFunction.roundness;\r\n }\r\n\r\n if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {\r\n return interfaceFunction.size;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\r\n interfaceFunction.propertyIndex = shape.ix;\r\n prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\r\n prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));\r\n prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\r\n Object.defineProperties(interfaceFunction, {\r\n position: {\r\n get: ExpressionPropertyInterface(prop.p)\r\n },\r\n roundness: {\r\n get: ExpressionPropertyInterface(prop.r)\r\n },\r\n size: {\r\n get: ExpressionPropertyInterface(prop.s)\r\n },\r\n _name: {\r\n value: shape.nm\r\n }\r\n });\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n function roundedInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(value) {\r\n if (shape.r.ix === value || value === 'Round Corners 1') {\r\n return interfaceFunction.radius;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n var prop = view;\r\n interfaceFunction.propertyIndex = shape.ix;\r\n prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));\r\n Object.defineProperties(interfaceFunction, {\r\n radius: {\r\n get: ExpressionPropertyInterface(prop.rd)\r\n },\r\n _name: {\r\n value: shape.nm\r\n }\r\n });\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n function repeaterInterfaceFactory(shape, view, propertyGroup) {\r\n function interfaceFunction(value) {\r\n if (shape.c.ix === value || value === 'Copies') {\r\n return interfaceFunction.copies;\r\n }\r\n\r\n if (shape.o.ix === value || value === 'Offset') {\r\n return interfaceFunction.offset;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\r\n\r\n var prop = view;\r\n interfaceFunction.propertyIndex = shape.ix;\r\n prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));\r\n prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));\r\n Object.defineProperties(interfaceFunction, {\r\n copies: {\r\n get: ExpressionPropertyInterface(prop.c)\r\n },\r\n offset: {\r\n get: ExpressionPropertyInterface(prop.o)\r\n },\r\n _name: {\r\n value: shape.nm\r\n }\r\n });\r\n interfaceFunction.mn = shape.mn;\r\n return interfaceFunction;\r\n }\r\n\r\n return function (shapes, view, propertyGroup) {\r\n var interfaces;\r\n\r\n function _interfaceFunction(value) {\r\n if (typeof value === 'number') {\r\n value = value === undefined ? 1 : value;\r\n\r\n if (value === 0) {\r\n return propertyGroup;\r\n }\r\n\r\n return interfaces[value - 1];\r\n }\r\n\r\n var i = 0;\r\n var len = interfaces.length;\r\n\r\n while (i < len) {\r\n if (interfaces[i]._name === value) {\r\n return interfaces[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n function parentGroupWrapper() {\r\n return propertyGroup;\r\n }\r\n\r\n _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);\r\n interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);\r\n _interfaceFunction.numProperties = interfaces.length;\r\n _interfaceFunction._name = 'Contents';\r\n return _interfaceFunction;\r\n };\r\n }();\r\n\r\n var TextExpressionInterface = function () {\r\n return function (elem) {\r\n var _prevValue;\r\n\r\n var _sourceText;\r\n\r\n function _thisLayerFunction(name) {\r\n switch (name) {\r\n case 'ADBE Text Document':\r\n return _thisLayerFunction.sourceText;\r\n\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n Object.defineProperty(_thisLayerFunction, 'sourceText', {\r\n get: function get() {\r\n elem.textProperty.getValue();\r\n var stringValue = elem.textProperty.currentData.t;\r\n\r\n if (stringValue !== _prevValue) {\r\n elem.textProperty.currentData.t = _prevValue;\r\n _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers\r\n // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive\r\n\r\n _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers\r\n }\r\n\r\n return _sourceText;\r\n }\r\n });\r\n return _thisLayerFunction;\r\n };\r\n }();\r\n\r\n function _typeof$2(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$2(obj); }\r\n\r\n var FootageInterface = function () {\r\n var outlineInterfaceFactory = function outlineInterfaceFactory(elem) {\r\n var currentPropertyName = '';\r\n var currentProperty = elem.getFootageData();\r\n\r\n function init() {\r\n currentPropertyName = '';\r\n currentProperty = elem.getFootageData();\r\n return searchProperty;\r\n }\r\n\r\n function searchProperty(value) {\r\n if (currentProperty[value]) {\r\n currentPropertyName = value;\r\n currentProperty = currentProperty[value];\r\n\r\n if (_typeof$2(currentProperty) === 'object') {\r\n return searchProperty;\r\n }\r\n\r\n return currentProperty;\r\n }\r\n\r\n var propertyNameIndex = value.indexOf(currentPropertyName);\r\n\r\n if (propertyNameIndex !== -1) {\r\n var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);\r\n currentProperty = currentProperty[index];\r\n\r\n if (_typeof$2(currentProperty) === 'object') {\r\n return searchProperty;\r\n }\r\n\r\n return currentProperty;\r\n }\r\n\r\n return '';\r\n }\r\n\r\n return init;\r\n };\r\n\r\n var dataInterfaceFactory = function dataInterfaceFactory(elem) {\r\n function interfaceFunction(value) {\r\n if (value === 'Outline') {\r\n return interfaceFunction.outlineInterface();\r\n }\r\n\r\n return null;\r\n }\r\n\r\n interfaceFunction._name = 'Outline';\r\n interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);\r\n return interfaceFunction;\r\n };\r\n\r\n return function (elem) {\r\n function _interfaceFunction(value) {\r\n if (value === 'Data') {\r\n return _interfaceFunction.dataInterface;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n _interfaceFunction._name = 'Data';\r\n _interfaceFunction.dataInterface = dataInterfaceFactory(elem);\r\n return _interfaceFunction;\r\n };\r\n }();\r\n\r\n var interfaces = {\r\n layer: LayerExpressionInterface,\r\n effects: EffectsExpressionInterface,\r\n comp: CompExpressionInterface,\r\n shape: ShapeExpressionInterface,\r\n text: TextExpressionInterface,\r\n footage: FootageInterface\r\n };\r\n\r\n function getInterface(type) {\r\n return interfaces[type] || null;\r\n }\r\n\r\n function _typeof$1(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$1(obj); }\r\n\r\n /* eslint-disable */\r\n\r\n /*\r\n Copyright 2014 David Bau.\r\n\r\n Permission is hereby granted, free of charge, to any person obtaining\r\n a copy of this software and associated documentation files (the\r\n \"Software\"), to deal in the Software without restriction, including\r\n without limitation the rights to use, copy, modify, merge, publish,\r\n distribute, sublicense, and/or sell copies of the Software, and to\r\n permit persons to whom the Software is furnished to do so, subject to\r\n the following conditions:\r\n\r\n The above copyright notice and this permission notice shall be\r\n included in all copies or substantial portions of the Software.\r\n\r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n */\r\n function seedRandom(pool, math) {\r\n //\r\n // The following constants are related to IEEE 754 limits.\r\n //\r\n var global = this,\r\n width = 256,\r\n // each RC4 output is 0 <= x < 256\r\n chunks = 6,\r\n // at least six RC4 outputs for each double\r\n digits = 52,\r\n // there are 52 significant digits in a double\r\n rngname = 'random',\r\n // rngname: name for Math.random and Math.seedrandom\r\n startdenom = math.pow(width, chunks),\r\n significance = math.pow(2, digits),\r\n overflow = significance * 2,\r\n mask = width - 1,\r\n nodecrypto; // node.js crypto module, initialized at the bottom.\r\n //\r\n // seedrandom()\r\n // This is the seedrandom function described above.\r\n //\r\n\r\n function seedrandom(seed, options, callback) {\r\n var key = [];\r\n options = options === true ? {\r\n entropy: true\r\n } : options || {}; // Flatten the seed string or build one from local entropy if needed.\r\n\r\n var shortseed = mixkey(flatten(options.entropy ? [seed, tostring(pool)] : seed === null ? autoseed() : seed, 3), key); // Use the seed to initialize an ARC4 generator.\r\n\r\n var arc4 = new ARC4(key); // This function returns a random double in [0, 1) that contains\r\n // randomness in every bit of the mantissa of the IEEE 754 value.\r\n\r\n var prng = function prng() {\r\n var n = arc4.g(chunks),\r\n // Start with a numerator n < 2 ^ 48\r\n d = startdenom,\r\n // and denominator d = 2 ^ 48.\r\n x = 0; // and no 'extra last byte'.\r\n\r\n while (n < significance) {\r\n // Fill up all significant digits by\r\n n = (n + x) * width; // shifting numerator and\r\n\r\n d *= width; // denominator and generating a\r\n\r\n x = arc4.g(1); // new least-significant-byte.\r\n }\r\n\r\n while (n >= overflow) {\r\n // To avoid rounding up, before adding\r\n n /= 2; // last byte, shift everything\r\n\r\n d /= 2; // right using integer math until\r\n\r\n x >>>= 1; // we have exactly the desired bits.\r\n }\r\n\r\n return (n + x) / d; // Form the number within [0, 1).\r\n };\r\n\r\n prng.int32 = function () {\r\n return arc4.g(4) | 0;\r\n };\r\n\r\n prng.quick = function () {\r\n return arc4.g(4) / 0x100000000;\r\n };\r\n\r\n prng[\"double\"] = prng; // Mix the randomness into accumulated entropy.\r\n\r\n mixkey(tostring(arc4.S), pool); // Calling convention: what to return as a function of prng, seed, is_math.\r\n\r\n return (options.pass || callback || function (prng, seed, is_math_call, state) {\r\n if (state) {\r\n // Load the arc4 state from the given state if it has an S array.\r\n if (state.S) {\r\n copy(state, arc4);\r\n } // Only provide the .state method if requested via options.state.\r\n\r\n\r\n prng.state = function () {\r\n return copy(arc4, {});\r\n };\r\n } // If called as a method of Math (Math.seedrandom()), mutate\r\n // Math.random because that is how seedrandom.js has worked since v1.0.\r\n\r\n\r\n if (is_math_call) {\r\n math[rngname] = prng;\r\n return seed;\r\n } // Otherwise, it is a newer calling convention, so return the\r\n // prng directly.\r\n else return prng;\r\n })(prng, shortseed, 'global' in options ? options.global : this == math, options.state);\r\n }\r\n\r\n math['seed' + rngname] = seedrandom; //\r\n // ARC4\r\n //\r\n // An ARC4 implementation. The constructor takes a key in the form of\r\n // an array of at most (width) integers that should be 0 <= x < (width).\r\n //\r\n // The g(count) method returns a pseudorandom integer that concatenates\r\n // the next (count) outputs from ARC4. Its return value is a number x\r\n // that is in the range 0 <= x < (width ^ count).\r\n //\r\n\r\n function ARC4(key) {\r\n var t,\r\n keylen = key.length,\r\n me = this,\r\n i = 0,\r\n j = me.i = me.j = 0,\r\n s = me.S = []; // The empty key [] is treated as [0].\r\n\r\n if (!keylen) {\r\n key = [keylen++];\r\n } // Set up S using the standard key scheduling algorithm.\r\n\r\n\r\n while (i < width) {\r\n s[i] = i++;\r\n }\r\n\r\n for (i = 0; i < width; i++) {\r\n s[i] = s[j = mask & j + key[i % keylen] + (t = s[i])];\r\n s[j] = t;\r\n } // The \"g\" method returns the next (count) outputs as one number.\r\n\r\n\r\n me.g = function (count) {\r\n // Using instance members instead of closure state nearly doubles speed.\r\n var t,\r\n r = 0,\r\n i = me.i,\r\n j = me.j,\r\n s = me.S;\r\n\r\n while (count--) {\r\n t = s[i = mask & i + 1];\r\n r = r * width + s[mask & (s[i] = s[j = mask & j + t]) + (s[j] = t)];\r\n }\r\n\r\n me.i = i;\r\n me.j = j;\r\n return r; // For robust unpredictability, the function call below automatically\r\n // discards an initial batch of values. This is called RC4-drop[256].\r\n // See http://google.com/search?q=rsa+fluhrer+response&btnI\r\n };\r\n } //\r\n // copy()\r\n // Copies internal state of ARC4 to or from a plain object.\r\n //\r\n\r\n\r\n function copy(f, t) {\r\n t.i = f.i;\r\n t.j = f.j;\r\n t.S = f.S.slice();\r\n return t;\r\n } //\r\n // flatten()\r\n // Converts an object tree to nested arrays of strings.\r\n //\r\n\r\n\r\n function flatten(obj, depth) {\r\n var result = [],\r\n typ = _typeof$1(obj),\r\n prop;\r\n\r\n if (depth && typ == 'object') {\r\n for (prop in obj) {\r\n try {\r\n result.push(flatten(obj[prop], depth - 1));\r\n } catch (e) {}\r\n }\r\n }\r\n\r\n return result.length ? result : typ == 'string' ? obj : obj + '\\0';\r\n } //\r\n // mixkey()\r\n // Mixes a string seed into a key that is an array of integers, and\r\n // returns a shortened string seed that is equivalent to the result key.\r\n //\r\n\r\n\r\n function mixkey(seed, key) {\r\n var stringseed = seed + '',\r\n smear,\r\n j = 0;\r\n\r\n while (j < stringseed.length) {\r\n key[mask & j] = mask & (smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++);\r\n }\r\n\r\n return tostring(key);\r\n } //\r\n // autoseed()\r\n // Returns an object for autoseeding, using window.crypto and Node crypto\r\n // module if available.\r\n //\r\n\r\n\r\n function autoseed() {\r\n try {\r\n if (nodecrypto) {\r\n return tostring(nodecrypto.randomBytes(width));\r\n }\r\n\r\n var out = new Uint8Array(width);\r\n (global.crypto || global.msCrypto).getRandomValues(out);\r\n return tostring(out);\r\n } catch (e) {\r\n var browser = global.navigator,\r\n plugins = browser && browser.plugins;\r\n return [+new Date(), global, plugins, global.screen, tostring(pool)];\r\n }\r\n } //\r\n // tostring()\r\n // Converts an array of charcodes to a string\r\n //\r\n\r\n\r\n function tostring(a) {\r\n return String.fromCharCode.apply(0, a);\r\n } //\r\n // When seedrandom.js is loaded, we immediately mix a few bits\r\n // from the built-in RNG into the entropy pool. Because we do\r\n // not want to interfere with deterministic PRNG state later,\r\n // seedrandom will not call math.random on its own again after\r\n // initialization.\r\n //\r\n\r\n\r\n mixkey(math.random(), pool); //\r\n // Nodejs and AMD support: export the implementation as a module using\r\n // either convention.\r\n //\r\n // End anonymous scope, and pass initial values.\r\n }\r\n\r\n ;\r\n\r\n function initialize$2(BMMath) {\r\n seedRandom([], BMMath);\r\n }\r\n\r\n var propTypes = {\r\n SHAPE: 'shape'\r\n };\r\n\r\n function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\r\n\r\n var ExpressionManager = function () {\r\n 'use strict';\r\n\r\n var ob = {};\r\n var Math = BMMath;\r\n var window = null;\r\n var document = null;\r\n var XMLHttpRequest = null;\r\n var fetch = null;\r\n var frames = null;\r\n initialize$2(BMMath);\r\n\r\n function $bm_isInstanceOfArray(arr) {\r\n return arr.constructor === Array || arr.constructor === Float32Array;\r\n }\r\n\r\n function isNumerable(tOfV, v) {\r\n return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number;\r\n }\r\n\r\n function $bm_neg(a) {\r\n var tOfA = _typeof(a);\r\n\r\n if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) {\r\n return -a;\r\n }\r\n\r\n if ($bm_isInstanceOfArray(a)) {\r\n var i;\r\n var lenA = a.length;\r\n var retArr = [];\r\n\r\n for (i = 0; i < lenA; i += 1) {\r\n retArr[i] = -a[i];\r\n }\r\n\r\n return retArr;\r\n }\r\n\r\n if (a.propType) {\r\n return a.v;\r\n }\r\n\r\n return -a;\r\n }\r\n\r\n var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;\r\n var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;\r\n var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;\r\n\r\n function sum(a, b) {\r\n var tOfA = _typeof(a);\r\n\r\n var tOfB = _typeof(b);\r\n\r\n if (tOfA === 'string' || tOfB === 'string') {\r\n return a + b;\r\n }\r\n\r\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\r\n return a + b;\r\n }\r\n\r\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\r\n a = a.slice(0);\r\n a[0] += b;\r\n return a;\r\n }\r\n\r\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\r\n b = b.slice(0);\r\n b[0] = a + b[0];\r\n return b;\r\n }\r\n\r\n if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {\r\n var i = 0;\r\n var lenA = a.length;\r\n var lenB = b.length;\r\n var retArr = [];\r\n\r\n while (i < lenA || i < lenB) {\r\n if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {\r\n retArr[i] = a[i] + b[i];\r\n } else {\r\n retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return retArr;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n var add = sum;\r\n\r\n function sub(a, b) {\r\n var tOfA = _typeof(a);\r\n\r\n var tOfB = _typeof(b);\r\n\r\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\r\n if (tOfA === 'string') {\r\n a = parseInt(a, 10);\r\n }\r\n\r\n if (tOfB === 'string') {\r\n b = parseInt(b, 10);\r\n }\r\n\r\n return a - b;\r\n }\r\n\r\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\r\n a = a.slice(0);\r\n a[0] -= b;\r\n return a;\r\n }\r\n\r\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\r\n b = b.slice(0);\r\n b[0] = a - b[0];\r\n return b;\r\n }\r\n\r\n if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {\r\n var i = 0;\r\n var lenA = a.length;\r\n var lenB = b.length;\r\n var retArr = [];\r\n\r\n while (i < lenA || i < lenB) {\r\n if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {\r\n retArr[i] = a[i] - b[i];\r\n } else {\r\n retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return retArr;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n function mul(a, b) {\r\n var tOfA = _typeof(a);\r\n\r\n var tOfB = _typeof(b);\r\n\r\n var arr;\r\n\r\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\r\n return a * b;\r\n }\r\n\r\n var i;\r\n var len;\r\n\r\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\r\n len = a.length;\r\n arr = createTypedArray('float32', len);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n arr[i] = a[i] * b;\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\r\n len = b.length;\r\n arr = createTypedArray('float32', len);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n arr[i] = a * b[i];\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n function div(a, b) {\r\n var tOfA = _typeof(a);\r\n\r\n var tOfB = _typeof(b);\r\n\r\n var arr;\r\n\r\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\r\n return a / b;\r\n }\r\n\r\n var i;\r\n var len;\r\n\r\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\r\n len = a.length;\r\n arr = createTypedArray('float32', len);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n arr[i] = a[i] / b;\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\r\n len = b.length;\r\n arr = createTypedArray('float32', len);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n arr[i] = a / b[i];\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n function mod(a, b) {\r\n if (typeof a === 'string') {\r\n a = parseInt(a, 10);\r\n }\r\n\r\n if (typeof b === 'string') {\r\n b = parseInt(b, 10);\r\n }\r\n\r\n return a % b;\r\n }\r\n\r\n var $bm_sum = sum;\r\n var $bm_sub = sub;\r\n var $bm_mul = mul;\r\n var $bm_div = div;\r\n var $bm_mod = mod;\r\n\r\n function clamp(num, min, max) {\r\n if (min > max) {\r\n var mm = max;\r\n max = min;\r\n min = mm;\r\n }\r\n\r\n return Math.min(Math.max(num, min), max);\r\n }\r\n\r\n function radiansToDegrees(val) {\r\n return val / degToRads;\r\n }\r\n\r\n var radians_to_degrees = radiansToDegrees;\r\n\r\n function degreesToRadians(val) {\r\n return val * degToRads;\r\n }\r\n\r\n var degrees_to_radians = radiansToDegrees;\r\n var helperLengthArray = [0, 0, 0, 0, 0, 0];\r\n\r\n function length(arr1, arr2) {\r\n if (typeof arr1 === 'number' || arr1 instanceof Number) {\r\n arr2 = arr2 || 0;\r\n return Math.abs(arr1 - arr2);\r\n }\r\n\r\n if (!arr2) {\r\n arr2 = helperLengthArray;\r\n }\r\n\r\n var i;\r\n var len = Math.min(arr1.length, arr2.length);\r\n var addedLength = 0;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n addedLength += Math.pow(arr2[i] - arr1[i], 2);\r\n }\r\n\r\n return Math.sqrt(addedLength);\r\n }\r\n\r\n function normalize(vec) {\r\n return div(vec, length(vec));\r\n }\r\n\r\n function rgbToHsl(val) {\r\n var r = val[0];\r\n var g = val[1];\r\n var b = val[2];\r\n var max = Math.max(r, g, b);\r\n var min = Math.min(r, g, b);\r\n var h;\r\n var s;\r\n var l = (max + min) / 2;\r\n\r\n if (max === min) {\r\n h = 0; // achromatic\r\n\r\n s = 0; // achromatic\r\n } else {\r\n var d = max - min;\r\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\r\n\r\n switch (max) {\r\n case r:\r\n h = (g - b) / d + (g < b ? 6 : 0);\r\n break;\r\n\r\n case g:\r\n h = (b - r) / d + 2;\r\n break;\r\n\r\n case b:\r\n h = (r - g) / d + 4;\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n\r\n h /= 6;\r\n }\r\n\r\n return [h, s, l, val[3]];\r\n }\r\n\r\n function hue2rgb(p, q, t) {\r\n if (t < 0) t += 1;\r\n if (t > 1) t -= 1;\r\n if (t < 1 / 6) return p + (q - p) * 6 * t;\r\n if (t < 1 / 2) return q;\r\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\r\n return p;\r\n }\r\n\r\n function hslToRgb(val) {\r\n var h = val[0];\r\n var s = val[1];\r\n var l = val[2];\r\n var r;\r\n var g;\r\n var b;\r\n\r\n if (s === 0) {\r\n r = l; // achromatic\r\n\r\n b = l; // achromatic\r\n\r\n g = l; // achromatic\r\n } else {\r\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\r\n var p = 2 * l - q;\r\n r = hue2rgb(p, q, h + 1 / 3);\r\n g = hue2rgb(p, q, h);\r\n b = hue2rgb(p, q, h - 1 / 3);\r\n }\r\n\r\n return [r, g, b, val[3]];\r\n }\r\n\r\n function linear(t, tMin, tMax, value1, value2) {\r\n if (value1 === undefined || value2 === undefined) {\r\n value1 = tMin;\r\n value2 = tMax;\r\n tMin = 0;\r\n tMax = 1;\r\n }\r\n\r\n if (tMax < tMin) {\r\n var _tMin = tMax;\r\n tMax = tMin;\r\n tMin = _tMin;\r\n }\r\n\r\n if (t <= tMin) {\r\n return value1;\r\n }\r\n\r\n if (t >= tMax) {\r\n return value2;\r\n }\r\n\r\n var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);\r\n\r\n if (!value1.length) {\r\n return value1 + (value2 - value1) * perc;\r\n }\r\n\r\n var i;\r\n var len = value1.length;\r\n var arr = createTypedArray('float32', len);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n arr[i] = value1[i] + (value2[i] - value1[i]) * perc;\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n function random(min, max) {\r\n if (max === undefined) {\r\n if (min === undefined) {\r\n min = 0;\r\n max = 1;\r\n } else {\r\n max = min;\r\n min = undefined;\r\n }\r\n }\r\n\r\n if (max.length) {\r\n var i;\r\n var len = max.length;\r\n\r\n if (!min) {\r\n min = createTypedArray('float32', len);\r\n }\r\n\r\n var arr = createTypedArray('float32', len);\r\n var rnd = BMMath.random();\r\n\r\n for (i = 0; i < len; i += 1) {\r\n arr[i] = min[i] + rnd * (max[i] - min[i]);\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n if (min === undefined) {\r\n min = 0;\r\n }\r\n\r\n var rndm = BMMath.random();\r\n return min + rndm * (max - min);\r\n }\r\n\r\n function createPath(points, inTangents, outTangents, closed) {\r\n var i;\r\n var len = points.length;\r\n var path = shapePool.newElement();\r\n path.setPathData(!!closed, len);\r\n var arrPlaceholder = [0, 0];\r\n var inVertexPoint;\r\n var outVertexPoint;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n inVertexPoint = inTangents && inTangents[i] ? inTangents[i] : arrPlaceholder;\r\n outVertexPoint = outTangents && outTangents[i] ? outTangents[i] : arrPlaceholder;\r\n path.setTripleAt(points[i][0], points[i][1], outVertexPoint[0] + points[i][0], outVertexPoint[1] + points[i][1], inVertexPoint[0] + points[i][0], inVertexPoint[1] + points[i][1], i, true);\r\n }\r\n\r\n return path;\r\n }\r\n\r\n function initiateExpression(elem, data, property) {\r\n // Bail out if we don't want expressions\r\n function noOp(_value) {\r\n return _value;\r\n }\r\n\r\n if (!elem.globalData.renderConfig.runExpressions) {\r\n return noOp;\r\n }\r\n\r\n var val = data.x;\r\n var needsVelocity = /velocity(?![\\w\\d])/.test(val);\r\n\r\n var _needsRandom = val.indexOf('random') !== -1;\r\n\r\n var elemType = elem.data.ty;\r\n var transform;\r\n var $bm_transform;\r\n var content;\r\n var effect;\r\n var thisProperty = property;\r\n thisProperty.valueAtTime = thisProperty.getValueAtTime;\r\n Object.defineProperty(thisProperty, 'value', {\r\n get: function get() {\r\n return thisProperty.v;\r\n }\r\n });\r\n elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;\r\n elem.comp.displayStartTime = 0;\r\n var inPoint = elem.data.ip / elem.comp.globalData.frameRate;\r\n var outPoint = elem.data.op / elem.comp.globalData.frameRate;\r\n var width = elem.data.sw ? elem.data.sw : 0;\r\n var height = elem.data.sh ? elem.data.sh : 0;\r\n var name = elem.data.nm;\r\n var loopIn;\r\n var loop_in;\r\n var loopOut;\r\n var loop_out;\r\n var smooth;\r\n var toWorld;\r\n var fromWorld;\r\n var fromComp;\r\n var toComp;\r\n var fromCompToSurface;\r\n var position;\r\n var rotation;\r\n var anchorPoint;\r\n var scale;\r\n var thisLayer;\r\n var thisComp;\r\n var mask;\r\n var valueAtTime;\r\n var velocityAtTime;\r\n var scoped_bm_rt; // val = val.replace(/(\\\\?\"|')((http)(s)?(:\\/))?\\/.*?(\\\\?\"|')/g, \"\\\"\\\"\"); // deter potential network calls\r\n\r\n var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval\r\n\r\n var numKeys = property.kf ? data.k.length : 0;\r\n var active = !this.data || this.data.hd !== true;\r\n\r\n var wiggle = function wiggle(freq, amp) {\r\n var iWiggle;\r\n var j;\r\n var lenWiggle = this.pv.length ? this.pv.length : 1;\r\n var addedAmps = createTypedArray('float32', lenWiggle);\r\n freq = 5;\r\n var iterations = Math.floor(time * freq);\r\n iWiggle = 0;\r\n j = 0;\r\n\r\n while (iWiggle < iterations) {\r\n // var rnd = BMMath.random();\r\n for (j = 0; j < lenWiggle; j += 1) {\r\n addedAmps[j] += -amp + amp * 2 * BMMath.random(); // addedAmps[j] += -amp + amp*2*rnd;\r\n }\r\n\r\n iWiggle += 1;\r\n } // var rnd2 = BMMath.random();\r\n\r\n\r\n var periods = time * freq;\r\n var perc = periods - Math.floor(periods);\r\n var arr = createTypedArray('float32', lenWiggle);\r\n\r\n if (lenWiggle > 1) {\r\n for (j = 0; j < lenWiggle; j += 1) {\r\n arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc; // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;\r\n // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;\r\n }.bind(this);\r\n\r\n if (thisProperty.loopIn) {\r\n loopIn = thisProperty.loopIn.bind(thisProperty);\r\n loop_in = loopIn;\r\n }\r\n\r\n if (thisProperty.loopOut) {\r\n loopOut = thisProperty.loopOut.bind(thisProperty);\r\n loop_out = loopOut;\r\n }\r\n\r\n if (thisProperty.smooth) {\r\n smooth = thisProperty.smooth.bind(thisProperty);\r\n }\r\n\r\n function loopInDuration(type, duration) {\r\n return loopIn(type, duration, true);\r\n }\r\n\r\n function loopOutDuration(type, duration) {\r\n return loopOut(type, duration, true);\r\n }\r\n\r\n if (this.getValueAtTime) {\r\n valueAtTime = this.getValueAtTime.bind(this);\r\n }\r\n\r\n if (this.getVelocityAtTime) {\r\n velocityAtTime = this.getVelocityAtTime.bind(this);\r\n }\r\n\r\n var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);\r\n\r\n function lookAt(elem1, elem2) {\r\n var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];\r\n var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;\r\n var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;\r\n return [yaw, pitch, 0];\r\n }\r\n\r\n function easeOut(t, tMin, tMax, val1, val2) {\r\n return applyEase(easeOutBez, t, tMin, tMax, val1, val2);\r\n }\r\n\r\n function easeIn(t, tMin, tMax, val1, val2) {\r\n return applyEase(easeInBez, t, tMin, tMax, val1, val2);\r\n }\r\n\r\n function ease(t, tMin, tMax, val1, val2) {\r\n return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);\r\n }\r\n\r\n function applyEase(fn, t, tMin, tMax, val1, val2) {\r\n if (val1 === undefined) {\r\n val1 = tMin;\r\n val2 = tMax;\r\n } else {\r\n t = (t - tMin) / (tMax - tMin);\r\n }\r\n\r\n if (t > 1) {\r\n t = 1;\r\n } else if (t < 0) {\r\n t = 0;\r\n }\r\n\r\n var mult = fn(t);\r\n\r\n if ($bm_isInstanceOfArray(val1)) {\r\n var iKey;\r\n var lenKey = val1.length;\r\n var arr = createTypedArray('float32', lenKey);\r\n\r\n for (iKey = 0; iKey < lenKey; iKey += 1) {\r\n arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];\r\n }\r\n\r\n return arr;\r\n }\r\n\r\n return (val2 - val1) * mult + val1;\r\n }\r\n\r\n function nearestKey(time) {\r\n var iKey;\r\n var lenKey = data.k.length;\r\n var index;\r\n var keyTime;\r\n\r\n if (!data.k.length || typeof data.k[0] === 'number') {\r\n index = 0;\r\n keyTime = 0;\r\n } else {\r\n index = -1;\r\n time *= elem.comp.globalData.frameRate;\r\n\r\n if (time < data.k[0].t) {\r\n index = 1;\r\n keyTime = data.k[0].t;\r\n } else {\r\n for (iKey = 0; iKey < lenKey - 1; iKey += 1) {\r\n if (time === data.k[iKey].t) {\r\n index = iKey + 1;\r\n keyTime = data.k[iKey].t;\r\n break;\r\n } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {\r\n if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {\r\n index = iKey + 2;\r\n keyTime = data.k[iKey + 1].t;\r\n } else {\r\n index = iKey + 1;\r\n keyTime = data.k[iKey].t;\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n if (index === -1) {\r\n index = iKey + 1;\r\n keyTime = data.k[iKey].t;\r\n }\r\n }\r\n }\r\n\r\n var obKey = {};\r\n obKey.index = index;\r\n obKey.time = keyTime / elem.comp.globalData.frameRate;\r\n return obKey;\r\n }\r\n\r\n function key(ind) {\r\n var obKey;\r\n var iKey;\r\n var lenKey;\r\n\r\n if (!data.k.length || typeof data.k[0] === 'number') {\r\n throw new Error('The property has no keyframe at index ' + ind);\r\n }\r\n\r\n ind -= 1;\r\n obKey = {\r\n time: data.k[ind].t / elem.comp.globalData.frameRate,\r\n value: []\r\n };\r\n var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;\r\n lenKey = arr.length;\r\n\r\n for (iKey = 0; iKey < lenKey; iKey += 1) {\r\n obKey[iKey] = arr[iKey];\r\n obKey.value[iKey] = arr[iKey];\r\n }\r\n\r\n return obKey;\r\n }\r\n\r\n function framesToTime(fr, fps) {\r\n if (!fps) {\r\n fps = elem.comp.globalData.frameRate;\r\n }\r\n\r\n return fr / fps;\r\n }\r\n\r\n function timeToFrames(t, fps) {\r\n if (!t && t !== 0) {\r\n t = time;\r\n }\r\n\r\n if (!fps) {\r\n fps = elem.comp.globalData.frameRate;\r\n }\r\n\r\n return t * fps;\r\n }\r\n\r\n function seedRandom(seed) {\r\n BMMath.seedrandom(randSeed + seed);\r\n }\r\n\r\n function sourceRectAtTime() {\r\n return elem.sourceRectAtTime();\r\n }\r\n\r\n function substring(init, end) {\r\n if (typeof value === 'string') {\r\n if (end === undefined) {\r\n return value.substring(init);\r\n }\r\n\r\n return value.substring(init, end);\r\n }\r\n\r\n return '';\r\n }\r\n\r\n function substr(init, end) {\r\n if (typeof value === 'string') {\r\n if (end === undefined) {\r\n return value.substr(init);\r\n }\r\n\r\n return value.substr(init, end);\r\n }\r\n\r\n return '';\r\n }\r\n\r\n function posterizeTime(framesPerSecond) {\r\n time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;\r\n value = valueAtTime(time);\r\n }\r\n\r\n var time;\r\n var velocity;\r\n var value;\r\n var text;\r\n var textIndex;\r\n var textTotal;\r\n var selectorValue;\r\n var index = elem.data.ind;\r\n var hasParent = !!(elem.hierarchy && elem.hierarchy.length);\r\n var parent;\r\n var randSeed = Math.floor(Math.random() * 1000000);\r\n var globalData = elem.globalData;\r\n\r\n function executeExpression(_value) {\r\n // globalData.pushExpression();\r\n value = _value;\r\n\r\n if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {\r\n return value;\r\n }\r\n\r\n if (this.propType === 'textSelector') {\r\n textIndex = this.textIndex;\r\n textTotal = this.textTotal;\r\n selectorValue = this.selectorValue;\r\n }\r\n\r\n if (!thisLayer) {\r\n text = elem.layerInterface.text;\r\n thisLayer = elem.layerInterface;\r\n thisComp = elem.comp.compInterface;\r\n toWorld = thisLayer.toWorld.bind(thisLayer);\r\n fromWorld = thisLayer.fromWorld.bind(thisLayer);\r\n fromComp = thisLayer.fromComp.bind(thisLayer);\r\n toComp = thisLayer.toComp.bind(thisLayer);\r\n mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;\r\n fromCompToSurface = fromComp;\r\n }\r\n\r\n if (!transform) {\r\n transform = elem.layerInterface('ADBE Transform Group');\r\n $bm_transform = transform;\r\n\r\n if (transform) {\r\n anchorPoint = transform.anchorPoint;\r\n /* position = transform.position;\r\n rotation = transform.rotation;\r\n scale = transform.scale; */\r\n }\r\n }\r\n\r\n if (elemType === 4 && !content) {\r\n content = thisLayer('ADBE Root Vectors Group');\r\n }\r\n\r\n if (!effect) {\r\n effect = thisLayer(4);\r\n }\r\n\r\n hasParent = !!(elem.hierarchy && elem.hierarchy.length);\r\n\r\n if (hasParent && !parent) {\r\n parent = elem.hierarchy[0].layerInterface;\r\n }\r\n\r\n time = this.comp.renderedFrame / this.comp.globalData.frameRate;\r\n\r\n if (_needsRandom) {\r\n seedRandom(randSeed + time);\r\n }\r\n\r\n if (needsVelocity) {\r\n velocity = velocityAtTime(time);\r\n }\r\n\r\n expression_function();\r\n this.frameExpressionId = elem.globalData.frameId; // TODO: Check if it's possible to return on ShapeInterface the .v value\r\n // Changed this to a ternary operation because Rollup failed compiling it correctly\r\n\r\n scoped_bm_rt = scoped_bm_rt.propType === propTypes.SHAPE ? scoped_bm_rt.v : scoped_bm_rt;\r\n return scoped_bm_rt;\r\n } // Bundlers will see these as dead code and unless we reference them\r\n\r\n\r\n executeExpression.__preventDeadCodeRemoval = [$bm_transform, anchorPoint, time, velocity, inPoint, outPoint, width, height, name, loop_in, loop_out, smooth, toComp, fromCompToSurface, toWorld, fromWorld, mask, position, rotation, scale, thisComp, numKeys, active, wiggle, loopInDuration, loopOutDuration, comp, lookAt, easeOut, easeIn, ease, nearestKey, key, text, textIndex, textTotal, selectorValue, framesToTime, timeToFrames, sourceRectAtTime, substring, substr, posterizeTime, index, globalData];\r\n return executeExpression;\r\n }\r\n\r\n ob.initiateExpression = initiateExpression;\r\n ob.__preventDeadCodeRemoval = [window, document, XMLHttpRequest, fetch, frames, $bm_neg, add, $bm_sum, $bm_sub, $bm_mul, $bm_div, $bm_mod, clamp, radians_to_degrees, degreesToRadians, degrees_to_radians, normalize, rgbToHsl, hslToRgb, linear, random, createPath];\r\n return ob;\r\n }();\r\n\r\n var expressionHelpers = function () {\r\n function searchExpressions(elem, data, prop) {\r\n if (data.x) {\r\n prop.k = true;\r\n prop.x = true;\r\n prop.initiateExpression = ExpressionManager.initiateExpression;\r\n prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop));\r\n }\r\n }\r\n\r\n function getValueAtTime(frameNum) {\r\n frameNum *= this.elem.globalData.frameRate;\r\n frameNum -= this.offsetTime;\r\n\r\n if (frameNum !== this._cachingAtTime.lastFrame) {\r\n this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;\r\n this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);\r\n this._cachingAtTime.lastFrame = frameNum;\r\n }\r\n\r\n return this._cachingAtTime.value;\r\n }\r\n\r\n function getSpeedAtTime(frameNum) {\r\n var delta = -0.01;\r\n var v1 = this.getValueAtTime(frameNum);\r\n var v2 = this.getValueAtTime(frameNum + delta);\r\n var speed = 0;\r\n\r\n if (v1.length) {\r\n var i;\r\n\r\n for (i = 0; i < v1.length; i += 1) {\r\n speed += Math.pow(v2[i] - v1[i], 2);\r\n }\r\n\r\n speed = Math.sqrt(speed) * 100;\r\n } else {\r\n speed = 0;\r\n }\r\n\r\n return speed;\r\n }\r\n\r\n function getVelocityAtTime(frameNum) {\r\n if (this.vel !== undefined) {\r\n return this.vel;\r\n }\r\n\r\n var delta = -0.001; // frameNum += this.elem.data.st;\r\n\r\n var v1 = this.getValueAtTime(frameNum);\r\n var v2 = this.getValueAtTime(frameNum + delta);\r\n var velocity;\r\n\r\n if (v1.length) {\r\n velocity = createTypedArray('float32', v1.length);\r\n var i;\r\n\r\n for (i = 0; i < v1.length; i += 1) {\r\n // removing frameRate\r\n // if needed, don't add it here\r\n // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);\r\n velocity[i] = (v2[i] - v1[i]) / delta;\r\n }\r\n } else {\r\n velocity = (v2 - v1) / delta;\r\n }\r\n\r\n return velocity;\r\n }\r\n\r\n function getStaticValueAtTime() {\r\n return this.pv;\r\n }\r\n\r\n function setGroupProperty(propertyGroup) {\r\n this.propertyGroup = propertyGroup;\r\n }\r\n\r\n return {\r\n searchExpressions: searchExpressions,\r\n getSpeedAtTime: getSpeedAtTime,\r\n getVelocityAtTime: getVelocityAtTime,\r\n getValueAtTime: getValueAtTime,\r\n getStaticValueAtTime: getStaticValueAtTime,\r\n setGroupProperty: setGroupProperty\r\n };\r\n }();\r\n\r\n function addPropertyDecorator() {\r\n function loopOut(type, duration, durationFlag) {\r\n if (!this.k || !this.keyframes) {\r\n return this.pv;\r\n }\r\n\r\n type = type ? type.toLowerCase() : '';\r\n var currentFrame = this.comp.renderedFrame;\r\n var keyframes = this.keyframes;\r\n var lastKeyFrame = keyframes[keyframes.length - 1].t;\r\n\r\n if (currentFrame <= lastKeyFrame) {\r\n return this.pv;\r\n }\r\n\r\n var cycleDuration;\r\n var firstKeyFrame;\r\n\r\n if (!durationFlag) {\r\n if (!duration || duration > keyframes.length - 1) {\r\n duration = keyframes.length - 1;\r\n }\r\n\r\n firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;\r\n cycleDuration = lastKeyFrame - firstKeyFrame;\r\n } else {\r\n if (!duration) {\r\n cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip);\r\n } else {\r\n cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration);\r\n }\r\n\r\n firstKeyFrame = lastKeyFrame - cycleDuration;\r\n }\r\n\r\n var i;\r\n var len;\r\n var ret;\r\n\r\n if (type === 'pingpong') {\r\n var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);\r\n\r\n if (iterations % 2 !== 0) {\r\n return this.getValueAtTime((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n }\r\n } else if (type === 'offset') {\r\n var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\r\n var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\r\n var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n\r\n var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);\r\n\r\n if (this.pv.length) {\r\n ret = new Array(initV.length);\r\n len = ret.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ret[i] = (endV[i] - initV[i]) * repeats + current[i];\r\n }\r\n\r\n return ret;\r\n }\r\n\r\n return (endV - initV) * repeats + current;\r\n } else if (type === 'continue') {\r\n var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\r\n var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);\r\n\r\n if (this.pv.length) {\r\n ret = new Array(lastValue.length);\r\n len = ret.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line\r\n }\r\n\r\n return ret;\r\n }\r\n\r\n return lastValue + (lastValue - nextLastValue) * ((currentFrame - lastKeyFrame) / 0.001);\r\n }\r\n\r\n return this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n }\r\n\r\n function loopIn(type, duration, durationFlag) {\r\n if (!this.k) {\r\n return this.pv;\r\n }\r\n\r\n type = type ? type.toLowerCase() : '';\r\n var currentFrame = this.comp.renderedFrame;\r\n var keyframes = this.keyframes;\r\n var firstKeyFrame = keyframes[0].t;\r\n\r\n if (currentFrame >= firstKeyFrame) {\r\n return this.pv;\r\n }\r\n\r\n var cycleDuration;\r\n var lastKeyFrame;\r\n\r\n if (!durationFlag) {\r\n if (!duration || duration > keyframes.length - 1) {\r\n duration = keyframes.length - 1;\r\n }\r\n\r\n lastKeyFrame = keyframes[duration].t;\r\n cycleDuration = lastKeyFrame - firstKeyFrame;\r\n } else {\r\n if (!duration) {\r\n cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame);\r\n } else {\r\n cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration);\r\n }\r\n\r\n lastKeyFrame = firstKeyFrame + cycleDuration;\r\n }\r\n\r\n var i;\r\n var len;\r\n var ret;\r\n\r\n if (type === 'pingpong') {\r\n var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration);\r\n\r\n if (iterations % 2 === 0) {\r\n return this.getValueAtTime(((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n }\r\n } else if (type === 'offset') {\r\n var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\r\n var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\r\n var current = this.getValueAtTime((cycleDuration - (firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0);\r\n var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1;\r\n\r\n if (this.pv.length) {\r\n ret = new Array(initV.length);\r\n len = ret.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ret[i] = current[i] - (endV[i] - initV[i]) * repeats;\r\n }\r\n\r\n return ret;\r\n }\r\n\r\n return current - (endV - initV) * repeats;\r\n } else if (type === 'continue') {\r\n var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\r\n var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);\r\n\r\n if (this.pv.length) {\r\n ret = new Array(firstValue.length);\r\n len = ret.length;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n ret[i] = firstValue[i] + (firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame) / 0.001;\r\n }\r\n\r\n return ret;\r\n }\r\n\r\n return firstValue + (firstValue - nextFirstValue) * (firstKeyFrame - currentFrame) / 0.001;\r\n }\r\n\r\n return this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line\r\n }\r\n\r\n function smooth(width, samples) {\r\n if (!this.k) {\r\n return this.pv;\r\n }\r\n\r\n width = (width || 0.4) * 0.5;\r\n samples = Math.floor(samples || 5);\r\n\r\n if (samples <= 1) {\r\n return this.pv;\r\n }\r\n\r\n var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;\r\n var initFrame = currentTime - width;\r\n var endFrame = currentTime + width;\r\n var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;\r\n var i = 0;\r\n var j = 0;\r\n var value;\r\n\r\n if (this.pv.length) {\r\n value = createTypedArray('float32', this.pv.length);\r\n } else {\r\n value = 0;\r\n }\r\n\r\n var sampleValue;\r\n\r\n while (i < samples) {\r\n sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);\r\n\r\n if (this.pv.length) {\r\n for (j = 0; j < this.pv.length; j += 1) {\r\n value[j] += sampleValue[j];\r\n }\r\n } else {\r\n value += sampleValue;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n if (this.pv.length) {\r\n for (j = 0; j < this.pv.length; j += 1) {\r\n value[j] /= samples;\r\n }\r\n } else {\r\n value /= samples;\r\n }\r\n\r\n return value;\r\n }\r\n\r\n function getTransformValueAtTime(time) {\r\n if (!this._transformCachingAtTime) {\r\n this._transformCachingAtTime = {\r\n v: new Matrix()\r\n };\r\n } /// /\r\n\r\n\r\n var matrix = this._transformCachingAtTime.v;\r\n matrix.cloneFromProps(this.pre.props);\r\n\r\n if (this.appliedTransformations < 1) {\r\n var anchor = this.a.getValueAtTime(time);\r\n matrix.translate(-anchor[0] * this.a.mult, -anchor[1] * this.a.mult, anchor[2] * this.a.mult);\r\n }\r\n\r\n if (this.appliedTransformations < 2) {\r\n var scale = this.s.getValueAtTime(time);\r\n matrix.scale(scale[0] * this.s.mult, scale[1] * this.s.mult, scale[2] * this.s.mult);\r\n }\r\n\r\n if (this.sk && this.appliedTransformations < 3) {\r\n var skew = this.sk.getValueAtTime(time);\r\n var skewAxis = this.sa.getValueAtTime(time);\r\n matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult);\r\n }\r\n\r\n if (this.r && this.appliedTransformations < 4) {\r\n var rotation = this.r.getValueAtTime(time);\r\n matrix.rotate(-rotation * this.r.mult);\r\n } else if (!this.r && this.appliedTransformations < 4) {\r\n var rotationZ = this.rz.getValueAtTime(time);\r\n var rotationY = this.ry.getValueAtTime(time);\r\n var rotationX = this.rx.getValueAtTime(time);\r\n var orientation = this.or.getValueAtTime(time);\r\n matrix.rotateZ(-rotationZ * this.rz.mult).rotateY(rotationY * this.ry.mult).rotateX(rotationX * this.rx.mult).rotateZ(-orientation[2] * this.or.mult).rotateY(orientation[1] * this.or.mult).rotateX(orientation[0] * this.or.mult);\r\n }\r\n\r\n if (this.data.p && this.data.p.s) {\r\n var positionX = this.px.getValueAtTime(time);\r\n var positionY = this.py.getValueAtTime(time);\r\n\r\n if (this.data.p.z) {\r\n var positionZ = this.pz.getValueAtTime(time);\r\n matrix.translate(positionX * this.px.mult, positionY * this.py.mult, -positionZ * this.pz.mult);\r\n } else {\r\n matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0);\r\n }\r\n } else {\r\n var position = this.p.getValueAtTime(time);\r\n matrix.translate(position[0] * this.p.mult, position[1] * this.p.mult, -position[2] * this.p.mult);\r\n }\r\n\r\n return matrix; /// /\r\n }\r\n\r\n function getTransformStaticValueAtTime() {\r\n return this.v.clone(new Matrix());\r\n }\r\n\r\n var getTransformProperty = TransformPropertyFactory.getTransformProperty;\r\n\r\n TransformPropertyFactory.getTransformProperty = function (elem, data, container) {\r\n var prop = getTransformProperty(elem, data, container);\r\n\r\n if (prop.dynamicProperties.length) {\r\n prop.getValueAtTime = getTransformValueAtTime.bind(prop);\r\n } else {\r\n prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);\r\n }\r\n\r\n prop.setGroupProperty = expressionHelpers.setGroupProperty;\r\n return prop;\r\n };\r\n\r\n var propertyGetProp = PropertyFactory.getProp;\r\n\r\n PropertyFactory.getProp = function (elem, data, type, mult, container) {\r\n var prop = propertyGetProp(elem, data, type, mult, container); // prop.getVelocityAtTime = getVelocityAtTime;\r\n // prop.loopOut = loopOut;\r\n // prop.loopIn = loopIn;\r\n\r\n if (prop.kf) {\r\n prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);\r\n } else {\r\n prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);\r\n }\r\n\r\n prop.setGroupProperty = expressionHelpers.setGroupProperty;\r\n prop.loopOut = loopOut;\r\n prop.loopIn = loopIn;\r\n prop.smooth = smooth;\r\n prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);\r\n prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);\r\n prop.numKeys = data.a === 1 ? data.k.length : 0;\r\n prop.propertyIndex = data.ix;\r\n var value = 0;\r\n\r\n if (type !== 0) {\r\n value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length);\r\n }\r\n\r\n prop._cachingAtTime = {\r\n lastFrame: initialDefaultFrame,\r\n lastIndex: 0,\r\n value: value\r\n };\r\n expressionHelpers.searchExpressions(elem, data, prop);\r\n\r\n if (prop.k) {\r\n container.addDynamicProperty(prop);\r\n }\r\n\r\n return prop;\r\n };\r\n\r\n function getShapeValueAtTime(frameNum) {\r\n // For now this caching object is created only when needed instead of creating it when the shape is initialized.\r\n if (!this._cachingAtTime) {\r\n this._cachingAtTime = {\r\n shapeValue: shapePool.clone(this.pv),\r\n lastIndex: 0,\r\n lastTime: initialDefaultFrame\r\n };\r\n }\r\n\r\n frameNum *= this.elem.globalData.frameRate;\r\n frameNum -= this.offsetTime;\r\n\r\n if (frameNum !== this._cachingAtTime.lastTime) {\r\n this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;\r\n this._cachingAtTime.lastTime = frameNum;\r\n this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);\r\n }\r\n\r\n return this._cachingAtTime.shapeValue;\r\n }\r\n\r\n var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();\r\n var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();\r\n\r\n function ShapeExpressions() {}\r\n\r\n ShapeExpressions.prototype = {\r\n vertices: function vertices(prop, time) {\r\n if (this.k) {\r\n this.getValue();\r\n }\r\n\r\n var shapePath = this.v;\r\n\r\n if (time !== undefined) {\r\n shapePath = this.getValueAtTime(time, 0);\r\n }\r\n\r\n var i;\r\n var len = shapePath._length;\r\n var vertices = shapePath[prop];\r\n var points = shapePath.v;\r\n var arr = createSizedArray(len);\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (prop === 'i' || prop === 'o') {\r\n arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];\r\n } else {\r\n arr[i] = [vertices[i][0], vertices[i][1]];\r\n }\r\n }\r\n\r\n return arr;\r\n },\r\n points: function points(time) {\r\n return this.vertices('v', time);\r\n },\r\n inTangents: function inTangents(time) {\r\n return this.vertices('i', time);\r\n },\r\n outTangents: function outTangents(time) {\r\n return this.vertices('o', time);\r\n },\r\n isClosed: function isClosed() {\r\n return this.v.c;\r\n },\r\n pointOnPath: function pointOnPath(perc, time) {\r\n var shapePath = this.v;\r\n\r\n if (time !== undefined) {\r\n shapePath = this.getValueAtTime(time, 0);\r\n }\r\n\r\n if (!this._segmentsLength) {\r\n this._segmentsLength = bez.getSegmentsLength(shapePath);\r\n }\r\n\r\n var segmentsLength = this._segmentsLength;\r\n var lengths = segmentsLength.lengths;\r\n var lengthPos = segmentsLength.totalLength * perc;\r\n var i = 0;\r\n var len = lengths.length;\r\n var accumulatedLength = 0;\r\n var pt;\r\n\r\n while (i < len) {\r\n if (accumulatedLength + lengths[i].addedLength > lengthPos) {\r\n var initIndex = i;\r\n var endIndex = shapePath.c && i === len - 1 ? 0 : i + 1;\r\n var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength;\r\n pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);\r\n break;\r\n } else {\r\n accumulatedLength += lengths[i].addedLength;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n if (!pt) {\r\n pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]];\r\n }\r\n\r\n return pt;\r\n },\r\n vectorOnPath: function vectorOnPath(perc, time, vectorType) {\r\n // perc doesn't use triple equality because it can be a Number object as well as a primitive.\r\n if (perc == 1) {\r\n // eslint-disable-line eqeqeq\r\n perc = this.v.c;\r\n } else if (perc == 0) {\r\n // eslint-disable-line eqeqeq\r\n perc = 0.999;\r\n }\r\n\r\n var pt1 = this.pointOnPath(perc, time);\r\n var pt2 = this.pointOnPath(perc + 0.001, time);\r\n var xLength = pt2[0] - pt1[0];\r\n var yLength = pt2[1] - pt1[1];\r\n var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2));\r\n\r\n if (magnitude === 0) {\r\n return [0, 0];\r\n }\r\n\r\n var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude];\r\n return unitVector;\r\n },\r\n tangentOnPath: function tangentOnPath(perc, time) {\r\n return this.vectorOnPath(perc, time, 'tangent');\r\n },\r\n normalOnPath: function normalOnPath(perc, time) {\r\n return this.vectorOnPath(perc, time, 'normal');\r\n },\r\n setGroupProperty: expressionHelpers.setGroupProperty,\r\n getValueAtTime: expressionHelpers.getStaticValueAtTime\r\n };\r\n extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);\r\n extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);\r\n KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;\r\n KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;\r\n var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;\r\n\r\n ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) {\r\n var prop = propertyGetShapeProp(elem, data, type, arr, trims);\r\n prop.propertyIndex = data.ix;\r\n prop.lock = false;\r\n\r\n if (type === 3) {\r\n expressionHelpers.searchExpressions(elem, data.pt, prop);\r\n } else if (type === 4) {\r\n expressionHelpers.searchExpressions(elem, data.ks, prop);\r\n }\r\n\r\n if (prop.k) {\r\n elem.addDynamicProperty(prop);\r\n }\r\n\r\n return prop;\r\n };\r\n }\r\n\r\n function initialize$1() {\r\n addPropertyDecorator();\r\n }\r\n\r\n function addDecorator() {\r\n function searchExpressions() {\r\n if (this.data.d.x) {\r\n this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);\r\n this.addEffect(this.getExpressionValue.bind(this));\r\n return true;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n TextProperty.prototype.getExpressionValue = function (currentValue, text) {\r\n var newValue = this.calculateExpression(text);\r\n\r\n if (currentValue.t !== newValue) {\r\n var newData = {};\r\n this.copyData(newData, currentValue);\r\n newData.t = newValue.toString();\r\n newData.__complete = false;\r\n return newData;\r\n }\r\n\r\n return currentValue;\r\n };\r\n\r\n TextProperty.prototype.searchProperty = function () {\r\n var isKeyframed = this.searchKeyframes();\r\n var hasExpressions = this.searchExpressions();\r\n this.kf = isKeyframed || hasExpressions;\r\n return this.kf;\r\n };\r\n\r\n TextProperty.prototype.searchExpressions = searchExpressions;\r\n }\r\n\r\n function initialize() {\r\n addDecorator();\r\n }\r\n\r\n function SVGComposableEffect() {}\r\n\r\n SVGComposableEffect.prototype = {\r\n createMergeNode: function createMergeNode(resultId, ins) {\r\n var feMerge = createNS('feMerge');\r\n feMerge.setAttribute('result', resultId);\r\n var feMergeNode;\r\n var i;\r\n\r\n for (i = 0; i < ins.length; i += 1) {\r\n feMergeNode = createNS('feMergeNode');\r\n feMergeNode.setAttribute('in', ins[i]);\r\n feMerge.appendChild(feMergeNode);\r\n feMerge.appendChild(feMergeNode);\r\n }\r\n\r\n return feMerge;\r\n }\r\n };\r\n\r\n function SVGTintFilter(filter, filterManager, elem, id, source) {\r\n this.filterManager = filterManager;\r\n var feColorMatrix = createNS('feColorMatrix');\r\n feColorMatrix.setAttribute('type', 'matrix');\r\n feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');\r\n feColorMatrix.setAttribute('values', '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0');\r\n feColorMatrix.setAttribute('result', id + '_tint_1');\r\n filter.appendChild(feColorMatrix);\r\n feColorMatrix = createNS('feColorMatrix');\r\n feColorMatrix.setAttribute('type', 'matrix');\r\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\r\n feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');\r\n feColorMatrix.setAttribute('result', id + '_tint_2');\r\n filter.appendChild(feColorMatrix);\r\n this.matrixFilter = feColorMatrix;\r\n var feMerge = this.createMergeNode(id, [source, id + '_tint_1', id + '_tint_2']);\r\n filter.appendChild(feMerge);\r\n }\r\n\r\n extendPrototype([SVGComposableEffect], SVGTintFilter);\r\n\r\n SVGTintFilter.prototype.renderFrame = function (forceRender) {\r\n if (forceRender || this.filterManager._mdf) {\r\n var colorBlack = this.filterManager.effectElements[0].p.v;\r\n var colorWhite = this.filterManager.effectElements[1].p.v;\r\n var opacity = this.filterManager.effectElements[2].p.v / 100;\r\n this.matrixFilter.setAttribute('values', colorWhite[0] - colorBlack[0] + ' 0 0 0 ' + colorBlack[0] + ' ' + (colorWhite[1] - colorBlack[1]) + ' 0 0 0 ' + colorBlack[1] + ' ' + (colorWhite[2] - colorBlack[2]) + ' 0 0 0 ' + colorBlack[2] + ' 0 0 0 ' + opacity + ' 0');\r\n }\r\n };\r\n\r\n function SVGFillFilter(filter, filterManager, elem, id) {\r\n this.filterManager = filterManager;\r\n var feColorMatrix = createNS('feColorMatrix');\r\n feColorMatrix.setAttribute('type', 'matrix');\r\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\r\n feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');\r\n feColorMatrix.setAttribute('result', id);\r\n filter.appendChild(feColorMatrix);\r\n this.matrixFilter = feColorMatrix;\r\n }\r\n\r\n SVGFillFilter.prototype.renderFrame = function (forceRender) {\r\n if (forceRender || this.filterManager._mdf) {\r\n var color = this.filterManager.effectElements[2].p.v;\r\n var opacity = this.filterManager.effectElements[6].p.v;\r\n this.matrixFilter.setAttribute('values', '0 0 0 0 ' + color[0] + ' 0 0 0 0 ' + color[1] + ' 0 0 0 0 ' + color[2] + ' 0 0 0 ' + opacity + ' 0');\r\n }\r\n };\r\n\r\n function SVGStrokeEffect(fil, filterManager, elem) {\r\n this.initialized = false;\r\n this.filterManager = filterManager;\r\n this.elem = elem;\r\n this.paths = [];\r\n }\r\n\r\n SVGStrokeEffect.prototype.initialize = function () {\r\n var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;\r\n var path;\r\n var groupPath;\r\n var i;\r\n var len;\r\n\r\n if (this.filterManager.effectElements[1].p.v === 1) {\r\n len = this.elem.maskManager.masksProperties.length;\r\n i = 0;\r\n } else {\r\n i = this.filterManager.effectElements[0].p.v - 1;\r\n len = i + 1;\r\n }\r\n\r\n groupPath = createNS('g');\r\n groupPath.setAttribute('fill', 'none');\r\n groupPath.setAttribute('stroke-linecap', 'round');\r\n groupPath.setAttribute('stroke-dashoffset', 1);\r\n\r\n for (i; i < len; i += 1) {\r\n path = createNS('path');\r\n groupPath.appendChild(path);\r\n this.paths.push({\r\n p: path,\r\n m: i\r\n });\r\n }\r\n\r\n if (this.filterManager.effectElements[10].p.v === 3) {\r\n var mask = createNS('mask');\r\n var id = createElementID();\r\n mask.setAttribute('id', id);\r\n mask.setAttribute('mask-type', 'alpha');\r\n mask.appendChild(groupPath);\r\n this.elem.globalData.defs.appendChild(mask);\r\n var g = createNS('g');\r\n g.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');\r\n\r\n while (elemChildren[0]) {\r\n g.appendChild(elemChildren[0]);\r\n }\r\n\r\n this.elem.layerElement.appendChild(g);\r\n this.masker = mask;\r\n groupPath.setAttribute('stroke', '#fff');\r\n } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {\r\n if (this.filterManager.effectElements[10].p.v === 2) {\r\n elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;\r\n\r\n while (elemChildren.length) {\r\n this.elem.layerElement.removeChild(elemChildren[0]);\r\n }\r\n }\r\n\r\n this.elem.layerElement.appendChild(groupPath);\r\n this.elem.layerElement.removeAttribute('mask');\r\n groupPath.setAttribute('stroke', '#fff');\r\n }\r\n\r\n this.initialized = true;\r\n this.pathMasker = groupPath;\r\n };\r\n\r\n SVGStrokeEffect.prototype.renderFrame = function (forceRender) {\r\n if (!this.initialized) {\r\n this.initialize();\r\n }\r\n\r\n var i;\r\n var len = this.paths.length;\r\n var mask;\r\n var path;\r\n\r\n for (i = 0; i < len; i += 1) {\r\n if (this.paths[i].m !== -1) {\r\n mask = this.elem.maskManager.viewData[this.paths[i].m];\r\n path = this.paths[i].p;\r\n\r\n if (forceRender || this.filterManager._mdf || mask.prop._mdf) {\r\n path.setAttribute('d', mask.lastPath);\r\n }\r\n\r\n if (forceRender || this.filterManager.effectElements[9].p._mdf || this.filterManager.effectElements[4].p._mdf || this.filterManager.effectElements[7].p._mdf || this.filterManager.effectElements[8].p._mdf || mask.prop._mdf) {\r\n var dasharrayValue;\r\n\r\n if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {\r\n var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;\r\n var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;\r\n var l = path.getTotalLength();\r\n dasharrayValue = '0 0 0 ' + l * s + ' ';\r\n var lineLength = l * (e - s);\r\n var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;\r\n var units = Math.floor(lineLength / segment);\r\n var j;\r\n\r\n for (j = 0; j < units; j += 1) {\r\n dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';\r\n }\r\n\r\n dasharrayValue += '0 ' + l * 10 + ' 0 0';\r\n } else {\r\n dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;\r\n }\r\n\r\n path.setAttribute('stroke-dasharray', dasharrayValue);\r\n }\r\n }\r\n }\r\n\r\n if (forceRender || this.filterManager.effectElements[4].p._mdf) {\r\n this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);\r\n }\r\n\r\n if (forceRender || this.filterManager.effectElements[6].p._mdf) {\r\n this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);\r\n }\r\n\r\n if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {\r\n if (forceRender || this.filterManager.effectElements[3].p._mdf) {\r\n var color = this.filterManager.effectElements[3].p.v;\r\n this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');\r\n }\r\n }\r\n };\r\n\r\n function SVGTritoneFilter(filter, filterManager, elem, id) {\r\n this.filterManager = filterManager;\r\n var feColorMatrix = createNS('feColorMatrix');\r\n feColorMatrix.setAttribute('type', 'matrix');\r\n feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');\r\n feColorMatrix.setAttribute('values', '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0');\r\n filter.appendChild(feColorMatrix);\r\n var feComponentTransfer = createNS('feComponentTransfer');\r\n feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\r\n feComponentTransfer.setAttribute('result', id);\r\n this.matrixFilter = feComponentTransfer;\r\n var feFuncR = createNS('feFuncR');\r\n feFuncR.setAttribute('type', 'table');\r\n feComponentTransfer.appendChild(feFuncR);\r\n this.feFuncR = feFuncR;\r\n var feFuncG = createNS('feFuncG');\r\n feFuncG.setAttribute('type', 'table');\r\n feComponentTransfer.appendChild(feFuncG);\r\n this.feFuncG = feFuncG;\r\n var feFuncB = createNS('feFuncB');\r\n feFuncB.setAttribute('type', 'table');\r\n feComponentTransfer.appendChild(feFuncB);\r\n this.feFuncB = feFuncB;\r\n filter.appendChild(feComponentTransfer);\r\n }\r\n\r\n SVGTritoneFilter.prototype.renderFrame = function (forceRender) {\r\n if (forceRender || this.filterManager._mdf) {\r\n var color1 = this.filterManager.effectElements[0].p.v;\r\n var color2 = this.filterManager.effectElements[1].p.v;\r\n var color3 = this.filterManager.effectElements[2].p.v;\r\n var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];\r\n var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];\r\n var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];\r\n this.feFuncR.setAttribute('tableValues', tableR);\r\n this.feFuncG.setAttribute('tableValues', tableG);\r\n this.feFuncB.setAttribute('tableValues', tableB);\r\n }\r\n };\r\n\r\n function SVGProLevelsFilter(filter, filterManager, elem, id) {\r\n this.filterManager = filterManager;\r\n var effectElements = this.filterManager.effectElements;\r\n var feComponentTransfer = createNS('feComponentTransfer'); // Red\r\n\r\n if (effectElements[10].p.k || effectElements[10].p.v !== 0 || effectElements[11].p.k || effectElements[11].p.v !== 1 || effectElements[12].p.k || effectElements[12].p.v !== 1 || effectElements[13].p.k || effectElements[13].p.v !== 0 || effectElements[14].p.k || effectElements[14].p.v !== 1) {\r\n this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);\r\n } // Green\r\n\r\n\r\n if (effectElements[17].p.k || effectElements[17].p.v !== 0 || effectElements[18].p.k || effectElements[18].p.v !== 1 || effectElements[19].p.k || effectElements[19].p.v !== 1 || effectElements[20].p.k || effectElements[20].p.v !== 0 || effectElements[21].p.k || effectElements[21].p.v !== 1) {\r\n this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);\r\n } // Blue\r\n\r\n\r\n if (effectElements[24].p.k || effectElements[24].p.v !== 0 || effectElements[25].p.k || effectElements[25].p.v !== 1 || effectElements[26].p.k || effectElements[26].p.v !== 1 || effectElements[27].p.k || effectElements[27].p.v !== 0 || effectElements[28].p.k || effectElements[28].p.v !== 1) {\r\n this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);\r\n } // Alpha\r\n\r\n\r\n if (effectElements[31].p.k || effectElements[31].p.v !== 0 || effectElements[32].p.k || effectElements[32].p.v !== 1 || effectElements[33].p.k || effectElements[33].p.v !== 1 || effectElements[34].p.k || effectElements[34].p.v !== 0 || effectElements[35].p.k || effectElements[35].p.v !== 1) {\r\n this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);\r\n } // RGB\r\n\r\n\r\n if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {\r\n feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\r\n filter.appendChild(feComponentTransfer);\r\n }\r\n\r\n if (effectElements[3].p.k || effectElements[3].p.v !== 0 || effectElements[4].p.k || effectElements[4].p.v !== 1 || effectElements[5].p.k || effectElements[5].p.v !== 1 || effectElements[6].p.k || effectElements[6].p.v !== 0 || effectElements[7].p.k || effectElements[7].p.v !== 1) {\r\n feComponentTransfer = createNS('feComponentTransfer');\r\n feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\r\n feComponentTransfer.setAttribute('result', id);\r\n filter.appendChild(feComponentTransfer);\r\n this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);\r\n this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);\r\n this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);\r\n }\r\n }\r\n\r\n SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {\r\n var feFunc = createNS(type);\r\n feFunc.setAttribute('type', 'table');\r\n feComponentTransfer.appendChild(feFunc);\r\n return feFunc;\r\n };\r\n\r\n SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {\r\n var cnt = 0;\r\n var segments = 256;\r\n var perc;\r\n var min = Math.min(inputBlack, inputWhite);\r\n var max = Math.max(inputBlack, inputWhite);\r\n var table = Array.call(null, {\r\n length: segments\r\n });\r\n var colorValue;\r\n var pos = 0;\r\n var outputDelta = outputWhite - outputBlack;\r\n var inputDelta = inputWhite - inputBlack;\r\n\r\n while (cnt <= 256) {\r\n perc = cnt / 256;\r\n\r\n if (perc <= min) {\r\n colorValue = inputDelta < 0 ? outputWhite : outputBlack;\r\n } else if (perc >= max) {\r\n colorValue = inputDelta < 0 ? outputBlack : outputWhite;\r\n } else {\r\n colorValue = outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma);\r\n }\r\n\r\n table[pos] = colorValue;\r\n pos += 1;\r\n cnt += 256 / (segments - 1);\r\n }\r\n\r\n return table.join(' ');\r\n };\r\n\r\n SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {\r\n if (forceRender || this.filterManager._mdf) {\r\n var val;\r\n var effectElements = this.filterManager.effectElements;\r\n\r\n if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {\r\n val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);\r\n this.feFuncRComposed.setAttribute('tableValues', val);\r\n this.feFuncGComposed.setAttribute('tableValues', val);\r\n this.feFuncBComposed.setAttribute('tableValues', val);\r\n }\r\n\r\n if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {\r\n val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);\r\n this.feFuncR.setAttribute('tableValues', val);\r\n }\r\n\r\n if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {\r\n val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);\r\n this.feFuncG.setAttribute('tableValues', val);\r\n }\r\n\r\n if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {\r\n val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);\r\n this.feFuncB.setAttribute('tableValues', val);\r\n }\r\n\r\n if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {\r\n val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);\r\n this.feFuncA.setAttribute('tableValues', val);\r\n }\r\n }\r\n };\r\n\r\n function SVGDropShadowEffect(filter, filterManager, elem, id, source) {\r\n var globalFilterSize = filterManager.container.globalData.renderConfig.filterSize;\r\n var filterSize = filterManager.data.fs || globalFilterSize;\r\n filter.setAttribute('x', filterSize.x || globalFilterSize.x);\r\n filter.setAttribute('y', filterSize.y || globalFilterSize.y);\r\n filter.setAttribute('width', filterSize.width || globalFilterSize.width);\r\n filter.setAttribute('height', filterSize.height || globalFilterSize.height);\r\n this.filterManager = filterManager;\r\n var feGaussianBlur = createNS('feGaussianBlur');\r\n feGaussianBlur.setAttribute('in', 'SourceAlpha');\r\n feGaussianBlur.setAttribute('result', id + '_drop_shadow_1');\r\n feGaussianBlur.setAttribute('stdDeviation', '0');\r\n this.feGaussianBlur = feGaussianBlur;\r\n filter.appendChild(feGaussianBlur);\r\n var feOffset = createNS('feOffset');\r\n feOffset.setAttribute('dx', '25');\r\n feOffset.setAttribute('dy', '0');\r\n feOffset.setAttribute('in', id + '_drop_shadow_1');\r\n feOffset.setAttribute('result', id + '_drop_shadow_2');\r\n this.feOffset = feOffset;\r\n filter.appendChild(feOffset);\r\n var feFlood = createNS('feFlood');\r\n feFlood.setAttribute('flood-color', '#00ff00');\r\n feFlood.setAttribute('flood-opacity', '1');\r\n feFlood.setAttribute('result', id + '_drop_shadow_3');\r\n this.feFlood = feFlood;\r\n filter.appendChild(feFlood);\r\n var feComposite = createNS('feComposite');\r\n feComposite.setAttribute('in', id + '_drop_shadow_3');\r\n feComposite.setAttribute('in2', id + '_drop_shadow_2');\r\n feComposite.setAttribute('operator', 'in');\r\n feComposite.setAttribute('result', id + '_drop_shadow_4');\r\n filter.appendChild(feComposite);\r\n var feMerge = this.createMergeNode(id, [id + '_drop_shadow_4', source]);\r\n filter.appendChild(feMerge); //\r\n }\r\n\r\n extendPrototype([SVGComposableEffect], SVGDropShadowEffect);\r\n\r\n SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {\r\n if (forceRender || this.filterManager._mdf) {\r\n if (forceRender || this.filterManager.effectElements[4].p._mdf) {\r\n this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);\r\n }\r\n\r\n if (forceRender || this.filterManager.effectElements[0].p._mdf) {\r\n var col = this.filterManager.effectElements[0].p.v;\r\n this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));\r\n }\r\n\r\n if (forceRender || this.filterManager.effectElements[1].p._mdf) {\r\n this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);\r\n }\r\n\r\n if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {\r\n var distance = this.filterManager.effectElements[3].p.v;\r\n var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;\r\n var x = distance * Math.cos(angle);\r\n var y = distance * Math.sin(angle);\r\n this.feOffset.setAttribute('dx', x);\r\n this.feOffset.setAttribute('dy', y);\r\n }\r\n }\r\n };\r\n\r\n var _svgMatteSymbols = [];\r\n\r\n function SVGMatte3Effect(filterElem, filterManager, elem) {\r\n this.initialized = false;\r\n this.filterManager = filterManager;\r\n this.filterElem = filterElem;\r\n this.elem = elem;\r\n elem.matteElement = createNS('g');\r\n elem.matteElement.appendChild(elem.layerElement);\r\n elem.matteElement.appendChild(elem.transformedElement);\r\n elem.baseElement = elem.matteElement;\r\n }\r\n\r\n SVGMatte3Effect.prototype.findSymbol = function (mask) {\r\n var i = 0;\r\n var len = _svgMatteSymbols.length;\r\n\r\n while (i < len) {\r\n if (_svgMatteSymbols[i] === mask) {\r\n return _svgMatteSymbols[i];\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n return null;\r\n };\r\n\r\n SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {\r\n var parentNode = mask.layerElement.parentNode;\r\n\r\n if (!parentNode) {\r\n return;\r\n }\r\n\r\n var children = parentNode.children;\r\n var i = 0;\r\n var len = children.length;\r\n\r\n while (i < len) {\r\n if (children[i] === mask.layerElement) {\r\n break;\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n var nextChild;\r\n\r\n if (i <= len - 2) {\r\n nextChild = children[i + 1];\r\n }\r\n\r\n var useElem = createNS('use');\r\n useElem.setAttribute('href', '#' + symbolId);\r\n\r\n if (nextChild) {\r\n parentNode.insertBefore(useElem, nextChild);\r\n } else {\r\n parentNode.appendChild(useElem);\r\n }\r\n };\r\n\r\n SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {\r\n if (!this.findSymbol(mask)) {\r\n var symbolId = createElementID();\r\n var masker = createNS('mask');\r\n masker.setAttribute('id', mask.layerId);\r\n masker.setAttribute('mask-type', 'alpha');\r\n\r\n _svgMatteSymbols.push(mask);\r\n\r\n var defs = elem.globalData.defs;\r\n defs.appendChild(masker);\r\n var symbol = createNS('symbol');\r\n symbol.setAttribute('id', symbolId);\r\n this.replaceInParent(mask, symbolId);\r\n symbol.appendChild(mask.layerElement);\r\n defs.appendChild(symbol);\r\n var useElem = createNS('use');\r\n useElem.setAttribute('href', '#' + symbolId);\r\n masker.appendChild(useElem);\r\n mask.data.hd = false;\r\n mask.show();\r\n }\r\n\r\n elem.setMatte(mask.layerId);\r\n };\r\n\r\n SVGMatte3Effect.prototype.initialize = function () {\r\n var ind = this.filterManager.effectElements[0].p.v;\r\n var elements = this.elem.comp.elements;\r\n var i = 0;\r\n var len = elements.length;\r\n\r\n while (i < len) {\r\n if (elements[i] && elements[i].data.ind === ind) {\r\n this.setElementAsMask(this.elem, elements[i]);\r\n }\r\n\r\n i += 1;\r\n }\r\n\r\n this.initialized = true;\r\n };\r\n\r\n SVGMatte3Effect.prototype.renderFrame = function () {\r\n if (!this.initialized) {\r\n this.initialize();\r\n }\r\n };\r\n\r\n function SVGGaussianBlurEffect(filter, filterManager, elem, id) {\r\n // Outset the filter region by 100% on all sides to accommodate blur expansion.\r\n filter.setAttribute('x', '-100%');\r\n filter.setAttribute('y', '-100%');\r\n filter.setAttribute('width', '300%');\r\n filter.setAttribute('height', '300%');\r\n this.filterManager = filterManager;\r\n var feGaussianBlur = createNS('feGaussianBlur');\r\n feGaussianBlur.setAttribute('result', id);\r\n filter.appendChild(feGaussianBlur);\r\n this.feGaussianBlur = feGaussianBlur;\r\n }\r\n\r\n SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {\r\n if (forceRender || this.filterManager._mdf) {\r\n // Empirical value, matching AE's blur appearance.\r\n var kBlurrinessToSigma = 0.3;\r\n var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma; // Dimensions mapping:\r\n //\r\n // 1 -> horizontal & vertical\r\n // 2 -> horizontal only\r\n // 3 -> vertical only\r\n //\r\n\r\n var dimensions = this.filterManager.effectElements[1].p.v;\r\n var sigmaX = dimensions == 3 ? 0 : sigma; // eslint-disable-line eqeqeq\r\n\r\n var sigmaY = dimensions == 2 ? 0 : sigma; // eslint-disable-line eqeqeq\r\n\r\n this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY); // Repeat edges mapping:\r\n //\r\n // 0 -> off -> duplicate\r\n // 1 -> on -> wrap\r\n\r\n var edgeMode = this.filterManager.effectElements[2].p.v == 1 ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq\r\n\r\n this.feGaussianBlur.setAttribute('edgeMode', edgeMode);\r\n }\r\n };\r\n\r\n registerRenderer('canvas', CanvasRenderer);\r\n registerRenderer('html', HybridRenderer);\r\n registerRenderer('svg', SVGRenderer); // Registering shape modifiers\r\n\r\n ShapeModifiers.registerModifier('tm', TrimModifier);\r\n ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);\r\n ShapeModifiers.registerModifier('rp', RepeaterModifier);\r\n ShapeModifiers.registerModifier('rd', RoundCornersModifier);\r\n ShapeModifiers.registerModifier('zz', ZigZagModifier);\r\n ShapeModifiers.registerModifier('op', OffsetPathModifier); // Registering expression plugin\r\n\r\n setExpressionsPlugin(Expressions);\r\n setExpressionInterfaces(getInterface);\r\n initialize$1();\r\n initialize(); // Registering svg effects\r\n\r\n registerEffect(20, SVGTintFilter, true);\r\n registerEffect(21, SVGFillFilter, true);\r\n registerEffect(22, SVGStrokeEffect, false);\r\n registerEffect(23, SVGTritoneFilter, true);\r\n registerEffect(24, SVGProLevelsFilter, true);\r\n registerEffect(25, SVGDropShadowEffect, true);\r\n registerEffect(28, SVGMatte3Effect, false);\r\n registerEffect(29, SVGGaussianBlurEffect, true);\r\n\r\n return lottie;\r\n\r\n}));\r\n","/**\n * Copyright 2021 Design Barn Inc.\n */\n\nimport { css } from \"lit\";\n\nexport default css`\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`;\n","export const LOTTIE_PLAYER_VERSION = \"2.0.2\"; \nexport const LOTTIE_WEB_VERSION = \"^5.10.0\";\n","// eslint-disable-next-line header/header\nimport { LitElement, html } from \"lit\";\nimport { customElement, property, query } from \"lit/decorators.js\";\nimport { TemplateResult } from \"lit/html.js\";\nimport * as lottie from \"lottie-web/build/player/lottie\";\n\nimport styles from \"./lottie-player.styles\";\nimport { LOTTIE_PLAYER_VERSION, LOTTIE_WEB_VERSION } from \"./versions\";\n\n// import ResizeObserver from \"resize-observer-polyfill\";\n\n// Define valid player states\nexport enum PlayerState {\n Destroyed = \"destroyed\",\n Error = \"error\",\n Frozen = \"frozen\",\n Loading = \"loading\",\n Paused = \"paused\",\n Playing = \"playing\",\n Stopped = \"stopped\",\n}\n\n// Define play modes\nexport enum PlayMode {\n Bounce = \"bounce\",\n Normal = \"normal\",\n}\n\n// Define player events\nexport enum PlayerEvents {\n Complete = \"complete\",\n Destroyed = \"destroyed\",\n Error = \"error\",\n Frame = \"frame\",\n Freeze = \"freeze\",\n Load = \"load\",\n Loop = \"loop\",\n Pause = \"pause\",\n Play = \"play\",\n Ready = \"ready\",\n Rendered = \"rendered\",\n Stop = \"stop\",\n}\n\nexport interface Versions {\n lottiePlayerVersion: string;\n lottieWebVersion: string;\n}\n\n/**\n * Parse a resource into a JSON object or a URL string\n */\nexport function parseSrc(src: string | object): string | object {\n if (typeof src === \"object\") {\n return src;\n }\n\n try {\n return JSON.parse(src);\n } catch (e) {\n // Try construct an absolute URL from the src URL\n const srcUrl: URL = new URL(src, window.location.href);\n\n return srcUrl.toString();\n }\n}\n\nfunction isLottie(json: Record<string, any>): boolean {\n const mandatory: string[] = [\"v\", \"ip\", \"op\", \"layers\", \"fr\", \"w\", \"h\"];\n\n return mandatory.every((field: string) =>\n Object.prototype.hasOwnProperty.call(json, field)\n );\n}\n\nasync function fromURL(url: string): Promise<Record<string, any>> {\n if (typeof url !== \"string\") {\n throw new Error(`The url value must be a string`);\n }\n\n let json;\n\n try {\n // Try construct an absolute URL from the src URL\n const srcUrl: URL = new URL(url);\n\n // Fetch the JSON file from the URL\n const result: any = await fetch(srcUrl.toString());\n\n json = await result.json();\n } catch (err) {\n throw new Error(\n `An error occurred while trying to load the Lottie file from URL`\n );\n }\n\n return json;\n}\n/**\n * LottiePlayer web component class\n *\n * @export\n * @class LottiePlayer\n * @extends {LitElement}\n */\n@customElement(\"lottie-player\")\nexport class LottiePlayer extends LitElement {\n /**\n * Autoplay animation on load.\n */\n @property({ type: Boolean })\n public autoplay: boolean = false;\n\n /**\n * Background color.\n */\n @property({ type: String, reflect: true })\n public background?: string = \"transparent\";\n\n /**\n * Show controls.\n */\n @property({ type: Boolean })\n public controls: boolean = false;\n\n /**\n * Number of times to loop animation.\n */\n @property({ type: Number })\n public count?: number;\n\n /**\n * Player state.\n */\n @property({ type: String })\n public currentState: PlayerState = PlayerState.Loading;\n\n /**\n * Animation description for screen readers.\n */\n @property({ type: String })\n public description: string = \"Lottie animation\";\n\n /**\n * Direction of animation.\n */\n @property({ type: Number })\n public direction: number = 1;\n\n /**\n * Disable checking if the Lottie is valid before loading\n */\n @property({ type: Boolean })\n public disableCheck?: boolean = false;\n\n /**\n * Disable using shadow dom as the root\n */\n @property({ type: Boolean })\n public disableShadowDOM: boolean = false;\n\n /**\n * Whether to play on mouse hover\n */\n @property({ type: Boolean })\n public hover: boolean = false;\n\n /**\n * Intermission\n */\n @property()\n public intermission: number = 1;\n\n /**\n * Whether to loop animation.\n */\n @property({ type: Boolean, reflect: true })\n public loop: boolean = false;\n\n /**\n * Play mode.\n */\n @property()\n public mode: PlayMode = PlayMode.Normal;\n\n /**\n * Aspect ratio to pass to lottie-web.\n */\n @property({ type: String })\n public preserveAspectRatio: string = \"xMidYMid meet\";\n\n /**\n * Renderer to use.\n */\n @property({ type: String })\n public renderer: \"svg\" = \"svg\";\n\n /**\n * Viewbox size for renderer settings\n */\n @property({ type: String })\n public viewBoxSize?: string;\n\n /**\n * seeker\n */\n\n @property()\n public seeker: any;\n\n /**\n * Animation speed.\n */\n @property({ type: Number })\n public speed: number = 1;\n\n /**\n * Bodymovin JSON data or URL to JSON.\n */\n @property({ type: String })\n public src?: string;\n\n /**\n * Enable web workers\n */\n @property({ type: Boolean })\n public webworkers?: boolean;\n\n /**\n * Animation container.\n */\n @query(\".animation\")\n protected container!: HTMLElement;\n\n private _io: IntersectionObserver | undefined = undefined;\n\n // private _ro: ResizeObserver | undefined = undefined;\n private _lottie?: any;\n\n private _prevState?: any;\n\n private _counter: number = 1;\n\n /**\n * Configure and initialize lottie-web player instance.\n */\n public async load(src: string | object) {\n const options: any = {\n container: this.container,\n loop: false,\n autoplay: false,\n renderer: this.renderer,\n rendererSettings: {\n preserveAspectRatio: this.preserveAspectRatio,\n clearCanvas: false,\n progressiveLoad: true,\n hideOnTransparent: true,\n ...(this.viewBoxSize && { viewBoxSize: this.viewBoxSize }),\n },\n };\n\n // Load the resource information\n try {\n const srcParsed = parseSrc(src);\n let jsonData = {};\n let srcAttrib = typeof srcParsed === \"string\" ? \"path\" : \"animationData\";\n\n // Clear previous animation, if any\n if (this._lottie) {\n this._lottie.destroy();\n }\n\n if (this.webworkers) {\n lottie.useWebWorker(true);\n }\n\n // Initialize lottie player and load animation\n this._lottie = lottie.loadAnimation({\n ...options,\n\n [srcAttrib]: srcParsed,\n });\n\n // Attach the event listeners before we check the requested json file for errors\n this._attachEventListeners();\n\n if (!this.disableCheck) {\n // Fetch resource if src is a remote URL\n if (srcAttrib === \"path\") {\n jsonData = await fromURL(srcParsed as string);\n srcAttrib = \"animationData\";\n } else {\n jsonData = srcParsed;\n }\n\n if (!isLottie(jsonData)) {\n this.currentState = PlayerState.Error;\n this.dispatchEvent(new CustomEvent(PlayerEvents.Error));\n }\n }\n } catch (err) {\n this.currentState = PlayerState.Error;\n this.dispatchEvent(new CustomEvent(PlayerEvents.Error));\n }\n }\n\n /**\n * Returns the lottie-web instance used in the component.\n */\n public getLottie(): any {\n return this._lottie;\n }\n\n /**\n * Returns the lottie-web version and this player's version\n */\n public getVersions(): Versions {\n return {\n lottieWebVersion: LOTTIE_WEB_VERSION,\n lottiePlayerVersion: LOTTIE_PLAYER_VERSION,\n };\n }\n\n /**\n * Start playing animation.\n */\n public play() {\n if (!this._lottie) {\n return;\n }\n\n this._lottie.play();\n this.currentState = PlayerState.Playing;\n\n this.dispatchEvent(new CustomEvent(PlayerEvents.Play));\n }\n\n /**\n * Pause animation play.\n */\n public pause(): void {\n if (!this._lottie) {\n return;\n }\n\n this._lottie.pause();\n this.currentState = PlayerState.Paused;\n\n this.dispatchEvent(new CustomEvent(PlayerEvents.Pause));\n }\n\n /**\n * Stops animation play.\n */\n public stop(): void {\n if (!this._lottie) {\n return;\n }\n\n this._counter = 1;\n this._lottie.stop();\n this.currentState = PlayerState.Stopped;\n\n this.dispatchEvent(new CustomEvent(PlayerEvents.Stop));\n }\n\n /**\n * Destroy animation and lottie-player element.\n */\n public destroy(): void {\n if (!this._lottie) {\n return;\n }\n\n this._lottie.destroy();\n this._lottie = null;\n this.currentState = PlayerState.Destroyed;\n this.dispatchEvent(new CustomEvent(PlayerEvents.Destroyed));\n this.remove();\n }\n\n /**\n * Seek to a given frame.\n */\n public seek(value: number | string): void {\n if (!this._lottie) {\n return;\n }\n\n // Extract frame number from either number or percentage value\n const matches = /^(\\d+)(%?)$/.exec(value.toString());\n\n if (!matches) {\n return;\n }\n\n // Calculate and set the frame number\n const frame =\n matches[2] === \"%\"\n ? (this._lottie.totalFrames * Number(matches[1])) / 100\n : Number(matches[1]);\n\n // Set seeker to new frame number\n this.seeker = frame;\n\n // Send lottie player to the new frame\n if (this.currentState === PlayerState.Playing) {\n this._lottie.goToAndPlay(frame, true);\n } else {\n this._lottie.goToAndStop(frame, true);\n this._lottie.pause();\n }\n }\n\n /**\n * Snapshot the current frame as SVG.\n *\n * If 'download' argument is boolean true, then a download is triggered in browser.\n */\n public snapshot(download: boolean = true): string | void {\n if (!this.shadowRoot) return;\n\n // Get SVG element and serialize markup\n const svgElement = this.shadowRoot.querySelector(\".animation svg\") as Node;\n const data = new XMLSerializer().serializeToString(svgElement);\n\n // Trigger file download\n if (download) {\n const element = document.createElement(\"a\");\n\n element.href = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(\n data\n )}`;\n element.download = `download_${this.seeker}.svg`;\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n }\n\n return data;\n }\n\n /**\n * Sets animation play speed.\n *\n * @param value Playback speed.\n */\n public setSpeed(value = 1): void {\n if (!this._lottie) {\n return;\n }\n\n this._lottie.setSpeed(value);\n }\n\n /**\n * Animation play direction.\n *\n * @param value Direction values.\n */\n public setDirection(value: number): void {\n if (!this._lottie) {\n return;\n }\n\n this._lottie.setDirection(value);\n }\n\n /**\n * Sets the looping of the animation.\n *\n * @param value Whether to enable looping. Boolean true enables looping.\n */\n public setLooping(value: boolean): void {\n if (this._lottie) {\n this.loop = value;\n this._lottie.loop = value;\n }\n }\n\n /**\n * Toggle playing state.\n */\n public togglePlay(): void {\n return this.currentState === PlayerState.Playing\n ? this.pause()\n : this.play();\n }\n\n /**\n * Toggles animation looping.\n */\n public toggleLooping(): void {\n this.setLooping(!this.loop);\n }\n\n /**\n * Resize animation.\n */\n public resize() {\n if (!this._lottie) {\n return;\n }\n\n this._lottie.resize();\n }\n\n /**\n * Returns the styles for the component.\n */\n static get styles() {\n return styles;\n }\n\n /**\n * Cleanup on component destroy.\n */\n public disconnectedCallback(): void {\n // Don't clean up if node is still connected to the context (i.e. this is a move).\n if (this.isConnected) return;\n\n // Remove intersection observer for detecting component being out-of-view.\n if (this._io) {\n this._io.disconnect();\n this._io = undefined;\n }\n\n // Remove resize observer for detecting resize/reflow events affecting element.\n // if (this._ro) {\n // this._ro.disconnect();\n // this._ro = undefined;\n // }\n\n // Remove the attached Visibility API's change event listener.\n document.removeEventListener(\"visibilitychange\", () =>\n this._onVisibilityChange()\n );\n\n // Destroy the animation instance and element\n this.destroy();\n }\n\n public render(): TemplateResult | void {\n const className: string = this.controls ? \"main controls\" : \"main\";\n const animationClass: string = this.controls\n ? \"animation controls\"\n : \"animation\";\n\n return html` <div\n id=\"animation-container\"\n class=${className}\n lang=\"en\"\n aria-label=${this.description}\n role=\"img\"\n >\n <div\n id=\"animation\"\n class=${animationClass}\n style=\"background:${this.background};\"\n >\n ${this.currentState === PlayerState.Error\n ? html`<div class=\"error\">⚠️</div>`\n : undefined}\n </div>\n ${this.controls && !this.disableShadowDOM\n ? this.renderControls()\n : undefined}\n </div>`;\n }\n\n protected createRenderRoot(): Element | ShadowRoot {\n if (this.disableShadowDOM) this.style.display = \"block\";\n\n return this.disableShadowDOM ? this : super.createRenderRoot();\n }\n\n /**\n * Initialize everything on component first render.\n */\n protected firstUpdated(): void {\n // Add intersection observer for detecting component being out-of-view.\n if (\"IntersectionObserver\" in window) {\n this._io = new IntersectionObserver(\n (entries: IntersectionObserverEntry[]) => {\n if (entries[0].isIntersecting) {\n if (this.currentState === PlayerState.Frozen) {\n this.play();\n }\n } else if (this.currentState === PlayerState.Playing) {\n this.freeze();\n }\n }\n );\n\n this._io.observe(this.container);\n }\n\n // Add listener for Visibility API's change event.\n if (typeof document.hidden !== \"undefined\") {\n document.addEventListener(\"visibilitychange\", () =>\n this._onVisibilityChange()\n );\n }\n\n // Setup lottie player\n if (this.src) {\n this.load(this.src);\n }\n this.dispatchEvent(new CustomEvent(PlayerEvents.Rendered));\n }\n\n protected renderControls(): TemplateResult {\n const isPlaying: boolean = this.currentState === PlayerState.Playing;\n const isPaused: boolean = this.currentState === PlayerState.Paused;\n const isStopped: boolean = this.currentState === PlayerState.Stopped;\n\n return html`\n <div\n id=\"lottie-controls\"\n aria-label=\"lottie-animation-controls\"\n class=\"toolbar\"\n >\n <button\n id=\"lottie-play-button\"\n @click=${this.togglePlay}\n class=${isPlaying || isPaused ? \"active\" : \"\"}\n style=\"align-items:center;\"\n tabindex=\"0\"\n aria-label=\"play-pause\"\n >\n ${isPlaying\n ? html`<svg\n width=\"24\"\n height=\"24\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path\n d=\"M14.016 5.016H18v13.969h-3.984V5.016zM6 18.984V5.015h3.984v13.969H6z\"\n />\n </svg>`\n : html`<svg\n width=\"24\"\n height=\"24\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M8.016 5.016L18.985 12 8.016 18.984V5.015z\" />\n </svg>`}\n </button>\n <button\n id=\"lottie-stop-button\"\n @click=${this.stop}\n class=${isStopped ? \"active\" : \"\"}\n style=\"align-items:center;\"\n tabindex=\"0\"\n aria-label=\"stop\"\n >\n <svg width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M6 6h12v12H6V6z\" />\n </svg>\n </button>\n <input\n id=\"lottie-seeker-input\"\n class=\"seeker\"\n type=\"range\"\n min=\"0\"\n step=\"1\"\n max=\"100\"\n .value=${this.seeker}\n @input=${this._handleSeekChange}\n @mousedown=${() => {\n this._prevState = this.currentState;\n this.freeze();\n }}\n @mouseup=${() => {\n this._prevState === PlayerState.Playing && this.play();\n }}\n aria-valuemin=\"1\"\n aria-valuemax=\"100\"\n role=\"slider\"\n aria-valuenow=${this.seeker}\n tabindex=\"0\"\n aria-label=\"lottie-seek-input\"\n />\n <button\n id=\"lottie-loop-toggle\"\n @click=${this.toggleLooping}\n class=${this.loop ? \"active\" : \"\"}\n style=\"align-items:center;\"\n tabindex=\"0\"\n aria-label=\"loop-toggle\"\n >\n <svg width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n <path\n d=\"M17.016 17.016v-4.031h1.969v6h-12v3l-3.984-3.984 3.984-3.984v3h10.031zM6.984 6.984v4.031H5.015v-6h12v-3l3.984 3.984-3.984 3.984v-3H6.984z\"\n />\n </svg>\n </button>\n </div>\n `;\n }\n\n /**\n * Handle visibility change events.\n */\n private _onVisibilityChange(): void {\n if (document.hidden === true && this.currentState === PlayerState.Playing) {\n this.freeze();\n } else if (this.currentState === PlayerState.Frozen) {\n this.play();\n }\n }\n\n /**\n * Handles click and drag actions on the progress track.\n */\n private _handleSeekChange(e: any): void {\n if (!this._lottie || isNaN(e.target.value)) {\n return;\n }\n\n const frame: number = (e.target.value / 100) * this._lottie.totalFrames;\n\n this.seek(frame);\n }\n\n private _attachEventListeners(): void {\n this._lottie.addEventListener(\"enterFrame\", () => {\n this.seeker =\n (this._lottie.currentFrame / this._lottie.totalFrames) * 100;\n\n this.dispatchEvent(\n new CustomEvent(PlayerEvents.Frame, {\n detail: {\n frame: this._lottie.currentFrame,\n seeker: this.seeker,\n },\n })\n );\n });\n\n // Handle animation play complete\n this._lottie.addEventListener(\"complete\", () => {\n if (this.currentState !== PlayerState.Playing) {\n this.dispatchEvent(new CustomEvent(PlayerEvents.Complete));\n\n return;\n }\n\n if (!this.loop || (this.count && this._counter >= this.count)) {\n this.dispatchEvent(new CustomEvent(PlayerEvents.Complete));\n\n if (this.mode === PlayMode.Bounce) {\n if (this._lottie.currentFrame === 0) {\n return;\n }\n } else {\n return;\n }\n }\n\n if (this.mode === PlayMode.Bounce) {\n if (this.count) {\n this._counter += 0.5;\n }\n\n setTimeout(() => {\n this.dispatchEvent(new CustomEvent(PlayerEvents.Loop));\n\n if (this.currentState === PlayerState.Playing) {\n this._lottie.setDirection(this._lottie.playDirection * -1);\n this._lottie.play();\n }\n }, this.intermission);\n } else {\n if (this.count) {\n this._counter += 1;\n }\n\n window.setTimeout(() => {\n this.dispatchEvent(new CustomEvent(PlayerEvents.Loop));\n\n if (this.currentState === PlayerState.Playing) {\n if (this.direction === -1) {\n // Prevents flickering\n this.seek(\"99%\");\n this.play();\n } else {\n this._lottie.stop();\n this._lottie.play();\n }\n }\n }, this.intermission);\n }\n });\n\n // Handle lottie-web ready event\n this._lottie.addEventListener(\"DOMLoaded\", () => {\n // Set initial playback speed and direction\n this.setSpeed(this.speed);\n this.setDirection(this.direction);\n\n // Start playing if autoplay is enabled\n if (this.autoplay) {\n if (this.direction === -1) this.seek(\"100%\");\n this.play();\n }\n\n this.dispatchEvent(new CustomEvent(PlayerEvents.Ready));\n });\n\n // Handle animation data load complete\n this._lottie.addEventListener(\"data_ready\", () => {\n this.dispatchEvent(new CustomEvent(PlayerEvents.Load));\n });\n\n // Set error state when animation load fail event triggers\n this._lottie.addEventListener(\"data_failed\", () => {\n this.currentState = PlayerState.Error;\n\n this.dispatchEvent(new CustomEvent(PlayerEvents.Error));\n });\n\n // Set handlers to auto play animation on hover if enabled\n this.container.addEventListener(\"mouseenter\", () => {\n if (this.hover && this.currentState !== PlayerState.Playing) {\n this.play();\n }\n });\n this.container.addEventListener(\"mouseleave\", () => {\n if (this.hover && this.currentState === PlayerState.Playing) {\n this.stop();\n }\n });\n }\n\n /**\n * Freeze animation play.\n * This internal state pauses animation and is used to differentiate between\n * user requested pauses and component instigated pauses.\n */\n private freeze(): void {\n if (!this._lottie) {\n return;\n }\n\n this._lottie.pause();\n this.currentState = PlayerState.Frozen;\n\n this.dispatchEvent(new CustomEvent(PlayerEvents.Freeze));\n }\n}\n"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","__extends","TypeError","String","__","constructor","create","__assign","assign","t","s","i","n","arguments","length","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","__decorate","decorators","target","key","desc","c","r","getOwnPropertyDescriptor","Reflect","decorate","defineProperty","__param","paramIndex","decorator","__metadata","metadataKey","metadataValue","metadata","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","rejected","result","done","then","__generator","body","f","y","g","_","label","sent","trys","ops","verb","Symbol","iterator","v","op","pop","push","__createBinding","o","m","k","k2","undefined","enumerable","get","__exportStar","__values","__read","ar","error","__spread","concat","__spreadArrays","il","a","j","jl","__spreadArray","to","from","pack","l","slice","__await","__asyncGenerator","asyncIterator","q","resume","fulfill","settle","shift","__asyncDelegator","__asyncValues","__makeTemplateObject","cooked","raw","__setModuleDefault","__importStar","mod","__esModule","__importDefault","default","__classPrivateFieldGet","receiver","state","kind","has","__classPrivateFieldSet","set","supportsAdoptingStyleSheets","window","ShadowRoot","ShadyCSS","nativeShadow","Document","CSSStyleSheet","constructionToken","styleSheetCache","Map","CSSResult","cssText","safeToken","_$cssResult$","Error","styleSheet","replaceSync","toString","unsafeCSS","css","strings","values","reduce","acc","idx","adoptStyles","renderRoot","styles","adoptedStyleSheets","map","forEach","style","document","createElement","nonce","litNonce","setAttribute","textContent","appendChild","getCompatibleStyle","sheet","rule","cssRules","trustedTypes","emptyStringForBooleanAttribute","emptyScript","polyfillSupport","reactiveElementPolyfillSupport","defaultConverter","toAttribute","type","Boolean","JSON","stringify","fromAttribute","fromValue","Number","parse","notEqual","old","defaultPropertyDeclaration","attribute","converter","reflect","hasChanged","ReactiveElement","HTMLElement","_initialize","initializer","_initializers","observedAttributes","finalize","attributes","elementProperties","attr","__attributeNameForProperty","__attributeToPropertyMap","name","options","noAccessor","descriptor","getPropertyDescriptor","oldValue","requestUpdate","configurable","finalized","superCtor","getPrototypeOf","props","properties","propKeys","getOwnPropertyNames","createProperty","elementStyles","finalizeStyles","isArray","Set","flat","Infinity","reverse","unshift","toLowerCase","__updatePromise","res","enableUpdating","_$changedProperties","__saveInstanceProperties","addController","controller","__controllers","isConnected","hostConnected","removeController","splice","_v","__instanceProperties","createRenderRoot","shadowRoot","attachShadow","shadowRootOptions","connectedCallback","_requestedUpdate","disconnectedCallback","hostDisconnected","attributeChangedCallback","_old","_$attributeToProperty","__propertyToAttribute","attrValue","__reflectingProperty","removeAttribute","ctor","propName","getPropertyOptions","shouldRequestUpdate","__reflectingProperties","isUpdatePending","__enqueueUpdate","async","scheduleUpdate","performUpdate","hasUpdated","shouldUpdate","changedProperties","willUpdate","hostUpdate","update","__markUpdated","_$didUpdate","_changedProperties","hostUpdated","firstUpdated","updated","updateComplete","getUpdateComplete","mode","globalThis","reactiveElementVersions","policy","createPolicy","createHTML","marker","Math","random","markerMatch","nodeMarker","createMarker","createComment","isPrimitive","isIterable","textEndRegex","commentEndRegex","comment2EndRegex","tagEndRegex","singleQuoteAttrEndRegex","doubleQuoteAttrEndRegex","rawTextElement","tag","_$litType$","html","svg","noChange","for","nothing","templateCache","WeakMap","render","container","partOwnerNode","renderBefore","part","_$litPart$","endNode","ChildPart","insertBefore","_$setValue","walker","createTreeWalker","getTemplateHtml","rawTextEndRegex","attrNames","regex","attrName","match","attrNameEndIndex","lastIndex","exec","test","RegExp","end","startsWith","htmlResult","Template","node","nodeIndex","attrNameIndex","partCount","parts","el","currentNode","content","svgElement","firstChild","remove","append","childNodes","nextNode","nodeType","hasAttributes","attrsToRemove","getAttributeNames","endsWith","realName","statics","getAttribute","split","index","PropertyPart","BooleanAttributePart","EventPart","AttributePart","tagName","data","_options","innerHTML","resolveDirective","attributeIndex","parent","currentDirective","__directives","__directive","nextDirectiveConstructor","_$litDirective$","_$AO","_$initialize","_$resolve","TemplateInstance","template","_$template","_$parent","parentNode","_$isConnected","_clone","fragment","creationScope","importNode","partIndex","templatePart","nextSibling","ElementPart","_parts","_update","startNode","_$startNode","_$endNode","__isConnected","_$committedValue","_$clear","_commitText","_commitTemplateResult","_commitNode","_commitIterable","_insert","ref","createTextNode","_$getTemplate","h","instance","itemPart","itemParts","item","start","_$notifyConnectionChanged","setConnected","element","fill","directiveParent","valueIndex","noCommit","change","_commitValue","newListener","oldListener","shouldRemoveListener","capture","once","passive","shouldAddListener","removeEventListener","addEventListener","handleEvent","event","host","_$LH","_boundAttributeSuffix","_marker","_markerMatch","_HTML_RESULT","_getTemplateHtml","_TemplateInstance","_isIterable","_resolveDirective","_ChildPart","_AttributePart","_BooleanAttributePart","_EventPart","_PropertyPart","_ElementPart","litHtmlPolyfillSupport","litHtmlVersions","UpdatingElement","LitElement","super","renderOptions","__childPart","_$litElement$","litElementHydrateSupport","litElementPolyfillSupport","_$LE","litElementVersions","customElement","classOrDescriptor","clazz","customElements","define","elements","finisher","standardProperty","placement","originalKey","property","protoOrDescriptor","proto","legacyPrototypeMethod","standardPrototypeMethod","decorateProperty","_ref","info","eventOptions","query","selector","cache","querySelector","queryAll","_name","querySelectorAll","queryAsync","slotAssignedElements","HTMLSlotElement","assignedElements","slot","opts","assignedNodes","filter","Node","ELEMENT_NODE","queryAssignedElements","slotSelector","slotEl","matches","queryAssignedNodes","slotOrOptions","flatten","assignedNodesOptions","factory","navigator","svgNS","locationHref","_useWebWorker","initialDefaultFrame","setWebWorker","flag","getWebWorker","setLocationHref","getLocationHref","createTag","extendPrototype","sources","destination","sourcePrototype","len","getDescriptor","object","prop","createProxyFunction","ProxyFunction","audioControllerFactory","AudioController","audioFactory","audios","_volume","_isMuted","addAudio","audio","pause","setRate","rateValue","createAudio","assetPath","Howl","src","isPlaying","play","seek","playing","rate","setVolume","setAudioFactory","_updateVolume","mute","unmute","getVolume","volume","createTypedArray","createRegularArray","arr","Uint8ClampedArray","Float32Array","Int16Array","createSizedArray","_typeof$6","obj","subframeEnabled","expressionsPlugin","expressionsInterfaces","idPrefix$1","isSafari","userAgent","_shouldRoundValues","bmPow","pow","bmSqrt","sqrt","bmFloor","floor","bmMax","max","bmMin","min","BMMath","ProjectInterface$1","propertyNames","abs","val","absArr","defaultCurveSegments","degToRads","PI","roundCorner","roundValues","bmRnd","round","styleDiv","position","top","left","display","transformOrigin","webkitTransformOrigin","backfaceVisibility","webkitBackfaceVisibility","transformStyle","webkitTransformStyle","mozTransformStyle","BMEnterFrameEvent","currentTime","totalTime","frameMultiplier","direction","BMCompleteEvent","BMCompleteLoopEvent","totalLoops","currentLoop","BMSegmentStartEvent","firstFrame","totalFrames","BMDestroyEvent","BMRenderFrameErrorEvent","nativeError","BMConfigErrorEvent","BMAnimationConfigErrorEvent","createElementID","_count","HSVtoRGB","RGBtoHSV","addSaturationToRGB","color","offset","hsv","addBrightnessToRGB","addHueToRGB","rgbToHex","hex","colorMap","setSubframeEnabled","getSubframeEnabled","setExpressionsPlugin","getExpressionsPlugin","setExpressionInterfaces","getExpressionInterfaces","setDefaultCurveSegments","getDefaultCurveSegments","setIdPrefix","getIdPrefix","createNS","createElementNS","_typeof$5","dataManager","workerFn","workerInstance","_counterId","processes","workerProxy","onmessage","postMessage","path","_workerSelf","setupWorker","fn","Worker","Blob","blob","url","URL","createObjectURL","createWorker","completeLayers","layers","comps","layerData","jLen","kLen","completed","hasMask","maskProps","masksProperties","pt","convertPathsToAbsoluteValues","ty","findCompLayers","refId","completeShapes","shapes","completeText","id","comp","findComp","__used","ks","it","checkVersion","minimum","animVersionString","animVersion","minimumVersion","checkText","iterateLayers","textLayer","documentData","animationData","assets","checkChars","chars","charData","ip","st","sr","sk","sa","checkPathProperties","pathData","checkColors","iterateShapes","checkShapes","completeClosingShapes","closed","cl","moduleOb","__complete","completeChars","dataFunctionManager","assetLoader","formatResponse","xhr","contentTypeHeader","getResponseHeader","responseType","response","responseText","load","fullPath","callback","errorCallback","XMLHttpRequest","err","onreadystatechange","readyState","status","open","join","send","completeData","payload","animation","process","onComplete","onError","createProcess","loadAnimation","processId","location","origin","pathname","loadData","completeAnimation","anim","ImagePreloader","proxyImage","canvas","width","height","ctx","getContext","fillStyle","fillRect","imageLoaded","loadedAssets","totalImages","loadedFootagesCount","totalFootages","imagesLoadedCb","footageLoaded","getAssetsPath","assetData","assetsPath","originalPath","imagePath","u","testImageLoaded","img","intervalId","setInterval","getBBox","_imageLoaded","clearInterval","bind","createFootageData","ob","footageData","_footageLoaded","ImagePreloaderFactory","images","loadAssets","cb","_createImageData","setAssetsPath","setPath","loadedImages","loadedFootages","destroy","getAsset","createImgData","crossOrigin","createImageData","setAttributeNS","_elementHelper","setCacheType","elementHelper","BaseEvent","triggerEvent","eventName","args","_cbs","callbacks","markerParser","parsePayloadLines","line","lines","keys","keysCount","trim","_markers","markers","markerData","time","tm","duration","dr","cm","ProjectInterface","registerComposition","compositions","_thisProjectFunction","nm","prepareFrame","xt","currentFrame","compInterface","renderers","registerRenderer","getRenderer","_typeof$4","AnimationItem","isLoaded","currentRawFrame","frameRate","frameMult","playSpeed","playDirection","playCount","isPaused","autoplay","loop","renderer","animationID","timeCompleted","segmentPos","isSubframeEnabled","segments","_idle","_completedLoop","projectInterface","imagePreloader","audioController","configAnimation","onSetupError","onSegmentComplete","drawnFrameEvent","setParams","params","wrapper","animType","RendererClass","rendererSettings","globalData","defs","setProjectInterface","parseInt","autoloadSegments","initialSegment","setupAnimation","lastIndexOf","substr","fileName","trigger","setData","wrapperAttributes","getNamedItem","prerender","includeLayers","newLayers","fonts","fontManager","addChars","addFonts","initExpressions","loadNextSegment","segment","segmentPath","loadSegments","imagesLoaded","checkLoaded","preloadImages","animData","fr","searchExtraCompositions","updaFrameModifier","waitForFontsLoaded","triggerConfigError","setTimeout","rendererType","initItems","gotoFrame","resize","_width","_height","updateContainerSize","setSubframe","renderFrame","triggerRenderFrameError","togglePause","stop","setCurrentRawFrameValue","getMarkerData","markerName","goToAndStop","isFrame","numValue","isNaN","frameModifier","goToAndPlay","playSegments","advanceTime","nextValue","_isComplete","checkSegments","adjustSegment","setSpeed","setDirection","setSegment","init","pendingFrame","forceFlag","resetSegments","onEnterFrame","onLoopComplete","onSegmentStart","onDestroy","getPath","getAssetData","hide","show","getDuration","updateDocumentData","getElementByPath","animationManager","registeredAnimations","initTime","playingAnimationsNum","_stopped","_isFrozen","removeElement","ev","animItem","subtractPlayingCount","registerAnimation","elem","addPlayingCount","activate","nowTime","elapsedTime","requestAnimationFrame","first","searchAnimations","standalone","animElements","getElementsByClassName","lenAnims","getElementsByTagName","innerText","div","freeze","unfreeze","getRegisteredAnimations","animations","BezierFactory","str","replace","beziers","bezEasing","BezierEasing","kSampleStepSize","float32ArraySupported","A","aA1","aA2","B","C","calcBezier","aT","getSlope","points","_p","_mSampleValues","_precomputed","x","mX1","mY1","mX2","mY2","_precompute","_getTForX","_calcSampleValues","aX","mSampleValues","intervalStart","currentSample","kSplineTableSize","guessForT","initialSlope","aGuessT","currentSlope","newtonRaphsonIterate","aA","aB","currentX","currentT","binarySubdivide","pooling","double","poolFactory","initialLength","_create","_release","_length","_maxLength","pool","newElement","release","bezierLengthPool","addedLength","percents","lengths","segmentsLengthPool","totalLength","bezFunction","math","pointOnLine2D","x1","y1","x2","y2","x3","y3","det1","getBezierLength","pt1","pt2","pt3","pt4","ptCoord","perc","ptDistance","curveSegments","point","lastPoint","lengthData","BezierData","segmentLength","PointData","partial","partialLength","storedData","buildBezierData","bezierName","bezierData","getDistancePerc","initPos","lengthPos","lPerc","dir","bezierSegmentPoints","getSegmentsLength","shapeData","segmentsLength","pathV","pathO","pathI","getNewSegment","startPerc","endPerc","t0","t1","u0","u1","u0u0u0","t0u0u0_3","t0t0u0_3","t0t0t0","u0u0u1","t0u0u1_3","t0t0u1_3","t0t0t1","u0u1u1","t0u1u1_3","t0t1u1_3","t0t1t1","u1u1u1","t1u1u1_3","t1t1u1_3","t1t1t1","getPointInSegment","percent","pointOnLine3D","z1","z2","z3","diffDist","dist1","dist2","dist3","bez","PropertyFactory","initFrame","mathAbs","interpolateValue","frameNum","caching","newValue","offsetTime","propType","pv","keyData","nextKeyData","keyframeMetadata","fnc","iterationIndex","keyframes","keyframesMetadata","endValue","out","quat","qx","qy","qz","qw","heading","attitude","bank","nextKeyTime","keyTime","ti","ind","__fnct","getBezierEasing","segmentPerc","distanceInLine","lastFrame","_lastKeyframeIndex","_lastAddedLength","_lastPoint","outX","outY","inX","inY","keyValue","sh","quatStart","createQuaternion","quatEnd","omega","cosom","sinom","scale0","scale1","ax","ay","az","aw","bx","by","bz","bw","acos","sin","slerp","atan2","asin","c1","cos","c2","c3","s1","s2","s3","getValueAtCurrentTime","renderedFrame","endTime","_caching","renderResult","setVValue","multipliedValue","mult","_mdf","processEffectsSequence","frameId","effectsSequence","lock","_isFirstFrame","finalValue","kf","addEffect","effectFunction","addDynamicProperty","ValueProperty","vel","getValue","MultiDimensionalProperty","KeyframedValueProperty","KeyframedMultidimensionalProperty","arrLen","getProp","DynamicPropertyContainer","dynamicProperties","_isAnimated","iterateDynamicProperties","initDynamicPropertyContainer","pointPool","ShapePath","setPathData","setLength","doubleArrayLength","setXYAt","pos","setTripleAt","vX","vY","oX","oY","iX","iY","newPath","vertices","outPoints","inPoints","cnt","shapePool","shapePath","clone","shape","cloned","ShapeCollection","addShape","releaseShapes","shapeCollectionPool","newShapeCollection","shapeCollection","ShapePropertyFactory","interpolateShape","previousValue","keyPropS","keyPropE","isHold","vertexValue","interpolateShapeCurrentTime","resetShape","paths","localShapeCollection","shape1","shape2","shapesEqual","ShapeProperty","reset","KeyframedShapeProperty","EllShapeProperty","cPoint","EllShapePropertyFactory","convertEllToPath","p0","p1","s0","_cw","StarShapeProperty","StarShapePropertyFactory","sy","ir","is","convertToPath","convertStarToPath","convertPolygonToPath","or","os","rad","roundness","perimSegment","numPts","angle","longFlag","longRad","shortRad","longRound","shortRound","longPerimSegment","shortPerimSegment","currentAng","ox","oy","RectShapeProperty","RectShapePropertyFactory","convertRectToPath","v0","v1","Matrix","_cos","_sin","_tan","tan","_rnd","rotate","mCos","mSin","_t","rotateX","rotateY","rotateZ","shear","sx","skew","skewFromAxis","scale","sz","setTransform","translate","tx","tz","transform","a2","b2","d2","e2","f2","g2","h2","i2","j2","l2","m2","n2","o2","p2","_identityCalculated","a1","b1","d1","e1","f1","g1","h1","i1","j1","k1","l1","m1","n1","o1","isIdentity","_identity","equals","matr","cloneFromProps","applyToPoint","z","applyToX","applyToY","applyToZ","getInverseMatrix","determinant","inverseMatrix","inversePoint","applyToPointArray","inversePoints","pts","retPts","applyToTriplePoints","p4","p5","p12","p13","applyToPointStringified","toCSS","cssValue","roundMatrixProperty","to2dCSS","_typeof$3","lottie","setLocation","href","setSubframeRendering","setPrefix","prefix","setQuality","inBrowser","installPlugin","plugin","getFactory","checkReady","readyStateCheckInterval","getQueryVariable","variable","vars","queryString","pair","decodeURIComponent","useWebWorker","setIDPrefix","__getFactory","version","scripts","myScript","exports","bodymovin","ShapeModifiers","modifiers","registerModifier","getModifier","ShapeModifier","TrimModifier","PuckerAndBloatModifier","initModifierProperties","addShapeToModifier","setAsAnimated","processKeys","sValue","eValue","pathsData","calculateShapeEdges","shapeLength","totalModifierLength","segmentOb","shapeSegments","shapeS","shapeE","releasePathsData","processShapes","shapePaths","_s","totalShapeLength","edges","newShapesData","addShapes","lastShape","addPaths","newPaths","addSegment","newShape","addSegmentFromArray","shapeSegment","currentLengthData","segmentCount","amount","processPath","centerPoint","pathLength","clonedPath","TransformPropertyFactory","defaultVector","TransformProperty","pre","appliedTransformations","px","py","pz","rx","ry","rz","_isDirty","applyToMatrix","mat","forceRender","precalculateMatrix","autoOriented","v2","getValueAtTime","autoOrient","_addDynamicProperty","getTransformProperty","RepeaterModifier","RoundCornersModifier","floatEqual","floatZero","lerp","lerpPoint","quadRoots","singleRoot","delta","polynomialCoefficients","p3","singlePoint","PolynomialBezier","linearize","pointEqual","coeffx","coeffy","extrema","intersectData","t2","box","boundingBox","cx","cy","splitData","boxIntersect","intersectsImpl","depth","tolerance","intersections","maxRecursion","d1s","d2s","crossProduct","lineIntersection","start1","end1","start2","end2","v3","v4","polarOffset","pointDistance","hypot","ZigZagModifier","setPoint","outputBezier","amplitude","outAmplitude","inAmplitude","angO","angI","getPerpendicularVector","vector","rot","getProjectingAngle","cur","prevIndex","nextIndex","pVector","zigZagCorner","frequency","pointType","prevPoint","nextPoint","prevDist","nextDist","zigZagSegment","dist","normalAngle","linearOffset","offsetSegment","p1a","p1b","p2b","p2a","joinLines","seg1","seg2","lineJoin","miterLimit","angleOut","tangentAngle","angleIn","center","radius","intersection","getIntersection","intersect","pruneSegmentIntersection","outa","outb","pruneIntersections","offsetSegmentSplit","right","mid","flex","inflectionPoints","OffsetPathModifier","getFontProperties","fontData","fStyle","fWeight","weight","tr","so","eo","pMatrix","rMatrix","sMatrix","tMatrix","matrix","applyTransforms","inv","scaleX","scaleY","elemsData","_currentCopies","_elements","_groups","resetElements","_processed","cloneElements","newElements","changeGroupRender","renderFlag","_render","items","itemsTransform","cont","hasReloaded","copies","ceil","group","ix","reloadShapes","elems","transformData","offsetModulo","roundOffset","pProps","rProps","sProps","iteration","mProps","rd","currentV","currentI","currentO","closerV","distance","newPosPerc","derivative","denom","tcusp","square","root","p10","p11","p20","p21","bounds","bottom","other","shapeSegmentInverted","pointsType","count","ml","lj","inputBezier","multiSegments","lastSeg","multiSegment","FontManager","emptyChar","w","size","combinedCharacters","surrogateModifiers","zeroWidthJoiner","setUpNode","font","family","fontFamily","fontSize","fontVariant","fontStyle","fontWeight","letterSpacing","offsetWidth","familyArray","enabledFamilies","trimFontOptions","createHelper","def","helper","engine","fontProps","tHelper","fFamily","fClass","tCanvasHelper","OffscreenCanvas","measureText","text","getComputedTextLength","Font","typekitLoaded","_warned","Date","now","setIsLoadedBinded","setIsLoaded","checkLoadedFontsBinded","checkLoadedFonts","isModifier","firstCharCode","secondCharCode","sum","isZeroWidthJoiner","isCombinedCharacter","_char3","fontPrototype","found","ch","list","fontArr","_pendingFonts","loadedSelector","shouldLoadFont","loaded","monoCase","sansCase","fPath","fOrigin","rel","sc","getCharData","_char","charCodeAt","console","warn","getFontByName","fName","_char2","fontName","doubleSize","singleSize","loadedCount","removeChild","RenderableElement","initRenderable","isInRange","hidden","isTransparent","renderableComponents","addRenderableComponent","component","removeRenderableComponent","prepareRenderableFrame","num","checkLayerLimits","checkTransparency","finalTransform","mProp","renderConfig","hideOnTransparent","renderRenderable","sourceRectAtTime","getLayerSize","textData","getBlendMode","blendModeEnums","SliderEffect","AngleEffect","ColorEffect","PointEffect","LayerIndexEffect","MaskIndexEffect","CheckboxEffect","NoValueEffect","EffectsManager","effects","ef","effectElements","effectItem","GroupEffect","BaseElement","FrameElement","FootageElement","imageLoader","initBaseData","AudioElement","_isPlaying","_canPlay","_currentTime","_volumeMultiplier","_previousVolume","_placeholder","lv","au","BaseRenderer","TransformElement","MaskElement","maskElement","viewData","solidPath","rect","expansor","feMorph","currentMasks","layerId","maskType","maskRef","getShapeProp","lastPath","filterID","expan","lastOperator","filterId","lastRadius","mask","createLayerSolidPath","invRect","drawPath","maskedElement","eff","checkMasks","LayerExpressionInterface","EffectsExpressionInterface","ShapeExpressionInterface","TextExpressionInterface","CompExpressionInterface","layerInterface","maskManager","registerMaskInterface","effectsInterface","createEffectsInterface","registerEffectsInterface","shapeInterface","shapesData","itemsData","textInterface","setBlendMode","blendModeValue","bm","baseElement","layerElement","effectsManager","getType","prepareProperties","isVisible","_isParent","getBaseElement","FootageInterface","getFootageData","timeRemapped","totalVolume","volumeValue","checkLayers","buildItem","checkPendingElements","createItem","layer","createImage","createComp","createSolid","createNull","createShape","createText","createCamera","createFootage","buildAllItems","pInterface","progressiveLoad","buildElementParenting","parentName","hierarchy","setAsParent","setHierarchy","addPendingElement","pendingElements","pathValue","setupGlobalData","fontsContainer","animationItem","compSize","initTransform","_matMdf","_opMdf","ao","renderTransform","finalMat","globalToLocal","transforms","ptNew","mHelper","getMaskProperty","isFirstFrame","getMaskelement","pathNodes","pathString","pathShapeValue","filtersFactory","filId","skipCoordinates","fil","feColorMatrix","featureSupport","registeredEffects","idPrefix","SVGEffects","filterManager","source","createFilter","filters","Effect","effect","countsAsEffect","registerEffect","SVGBaseElement","HierarchyElement","RenderableDOMElement","IImageElement","initElement","sourceRect","ProcessedElement","IShapeElement","initRendererElement","createContainerElements","matteElement","transformedElement","_sizeChanged","layerElementParent","td","matteMasks","symbolElement","gg","tt","ln","hd","cp","clipId","cpGroup","renderElement","destroyBaseElement","createRenderableComponents","renderableEffectsManager","getMatte","matteType","useElement","masker","createAlphaToLuminanceFilter","maskGroup","maskGrouper","feCTr","feFunc","alphaRect","setMatte","initHierarchy","checkParenting","createContent","renderInnerContent","innerElem","pr","imagePreserveAspectRatio","addShapeToModifiers","shapeModifiers","isShapeInAnimatedModifiers","isAnimatedWithShape","renderModifiers","searchProcessedElement","processedElements","addProcessedElement","lineCapEnum","lineJoinEnum","SVGShapeData","transformers","level","caches","lStr","lvl","SVGStyleData","pElem","msElem","DashProperty","dataProps","dashStr","dashArray","dashoffset","SVGStrokeStyleData","styleOb","SVGFillStyleData","SVGNoStyleData","GradientProperty","cLength","_cmdf","_omdf","_collapsable","checkCollapsable","_hasOpacity","SVGGradientFillStyleData","initGradientData","SVGGradientStrokeStyleData","ShapeGroupData","prevViewData","gr","SVGTransformData","comparePoints","stops","setGradientData","setGradientOpacity","pathElement","gradientId","gfill","gf","cst","opacityId","maskId","opFill","lc","of","ms","ost","buildShapeString","_o","_i","shapeString","SVGElementsRenderer","_identityMatrix","_matrixHelper","renderContentTransform","styleData","itemData","renderNoop","renderPath","pathStringTransformed","redraw","iterations","lLen","renderFill","styleElem","renderGradientStroke","renderGradient","renderStroke","hasOpacity","attr1","attr2","cValues","oValues","ang","createRenderFunction","SVGShapeElement","stylesList","animatedContents","LetterProps","sw","fc","TextProperty","_frameId","keysIndex","canResize","minimumFontSize","currentData","ascent","boxWidth","defaultBoxWidth","justifyOffset","lh","lineWidths","ls","ps","fillColorAnim","strokeColorAnim","strokeWidthAnim","yOffset","finalSize","finalText","finalLineHeight","copyData","searchProperty","completeTextData","initSecondaryElement","identityMatrix","buildExpressionInterface","searchShapes","filterUniqueShapes","tempShapes","areAnimated","setShapesAsAnimated","createStyleElement","elementData","addToAnimatedContents","createGroupElement","createTransformElement","transformProperty","createShapeElement","ownTransformers","setElementStyles","currentTransform","modifier","processedPos","ownStyles","ownModifiers","renderShape","animatedContent","setCurrentData","searchKeyframes","getKeyframeValue","_finalValue","currentValue","currentIndex","textKeys","buildFinalText","charCode","charactersArray","shouldCombine","charAt","newLineFlag","letters","anchorGrouping","currentSize","currentPos","currentLine","lineWidth","maxLineWidth","trackingOffset","currentHeight","boxHeight","lastSpaceIndex","currentChar","uncollapsedSpaces","an","add","anIndexes","animatorJustifyOffset","extra","animatorData","letterData","based","animators","indexes","fh","fs","fb","rn","totalChars","newInd","currentInd","newData","dData","recalculate","canResizeFont","_canResize","setMinimumFontSize","_fontValue","TextSelectorProp","TextSelectorPropFactory","_currentTextLength","finalS","finalE","xe","ne","sm","getMult","textProperty","easer","tot","smoothness","threshold","newCharsFlag","divisor","getTextSelectorProp","TextAnimatorDataProperty","animatorProps","defaultData","textAnimatorAnimatables","TextAnimatorProperty","renderType","_hasMaskedPath","_textData","_renderType","_elem","_animatorsData","_pathData","_moreOptions","alignment","renderedLetters","lettersChangedFlag","ITextElement","searchProperties","getMeasures","xPos","yPos","pathInfo","currentLength","currentPoint","pointInd","segmentInd","tanAngle","matrixHelper","renderedLettersCount","tLength","pi","letterValue","yOff","firstLine","offf","xPathPos","yPathPos","elemOpacity","letterSw","letterSc","letterFc","letterO","initPathPos","initSegmentInd","initPointInd","letterM","letterP","defaultPropsArray","animatorFirstCharOffset","justifyOffsetMult","isNewLine","animatorOffset","atan","textAnimator","buildNewText","createPathShape","shapeStr","_fontSize","applyTextPropertiesToMatrix","lineNumber","buildColor","colorData","emptyProp","emptyShapeData","SVGTextLottieElement","textSpans","ISolidElement","NullElement","SVGRendererBase","ICompElement","SVGCompElement","supports3d","SVGRenderer","config","ariaLabel","title","titleElement","titleId","description","descElement","descId","preserveAspectRatio","contentVisibility","viewBoxOnly","viewBoxSize","className","focusable","filterSize","runExpressions","destroyed","CVContextData","saved","cArrPos","cTr","cO","savedOp","ShapeTransformManager","sequences","sequenceList","transform_key_count","CVEffects","CVMaskElement","hasMasks","CVBaseElement","CVShapeData","transformsManager","styledShapes","styledShape","addTransformSequence","trNodes","CVShapeElement","CVTextElement","stroke","currentRender","sWidth","fValue","CVImageElement","CVSolidElement","CanvasRendererBase","clearCanvas","context","dpr","devicePixelRatio","currentGlobalAlpha","contextData","transformMat","CVCompElement","CanvasRenderer","HBaseElement","HSolidElement","HShapeElement","shapesContainer","currentBBox","HTextElement","textPaths","isMasked","HCameraElement","pe","_prevMat","HImageElement","HybridRendererBase","threeDElements","camera","HCompElement","HybridRenderer","singleShape","textContainer","buildTextContents","textArray","textContents","currentTextContent","fromCharCode","buildShapeData","shapeItem","tSpan","usesGlyphs","cachedSpansLength","span","childSpan","glyph","glyphElement","_debug","tElement","justify","textBox","bbox","renderedLetter","textSpan","findIndexByInd","appendElementInPos","elementIndex","tp","matteMask","nextElement","setElements","getElements","destroyElements","duplicate","newLength","currentSavedOp","sequence","processSequence","processSequences","getNewKey","canvasContext","beginPath","moveTo","lineTo","bezierCurveTo","save","clip","createElements","blendMode","globalCompositeOperation","hideElement","showElement","forceRealStack","ctxTransform","ctxOpacity","restore","transformHelper","opacity","dashResetter","preTransforms","co","wi","da","addTransformToStyleList","removeTransformFromStyleList","closeStyles","shouldRender","ownTransforms","_shouldRender","renderShapeTransform","parentTransform","groupTransform","drawLayer","nodes","currentStyle","coOp","strokeStyle","grd","lineCap","setLineDash","lineDashOffset","closePath","isMain","renderGradientFill","renderStyledShape","shapeNodes","groupTransformMat","createLinearGradient","createRadialGradient","addColorStop","hasFill","hasStroke","commands","pathArr","commandsCounter","lastFill","lastStroke","lastStrokeW","widthCrop","heightCrop","imgW","imgH","imgRel","canvasRel","par","drawImage","cProps","trProps","globalAlpha","actionFlag","popped","containerStyle","mozTransformOrigin","transformCanvas","isDashed","elementWidth","elementHeight","elementRel","animationRel","offsetHeight","fillType","clearRect","checkBlendMode","tg","transformedElementStyle","matrixValue","webkitTransform","addEffects","backgroundColor","_renderShapeFrame","shapeCont","getTransformedPoint","calculateShapeBoundingBox","vPoint","oPoint","nextIPoint","nextVPoint","checkBounds","getBoundsOfCurve","shapeBoundingBox","xMax","yMax","tempBoundingBox","b2ac","calculateF","calculateBoundingBox","expandStrokeBoundingBox","widthProperty","kfw","currentBoxContains","changed","shapeStyle","shapeTransform","compW","compH","innerElemStyle","textColor","strokeWidth","lineHeight","tParent","tCont","children","tContStyle","tContTranslation","tStyle","tSpanTranslation","svgStyle","translation","textPath","margin","svgTransform","setup","perspectiveStyle","perspectiveElem","perspective","webkitPerspective","mTransf","diffVector","mag","lookDir","lookLengthOnXZ","mRotationX","mRotationY","hasMatrixChanged","matValue","Image","imageElem","newDOMElement","ddd","addTo3dContainer","nextDOMElement","nextLayer","getThreeDContainerByPos","startPos","endPos","createThreeDContainer","threeDContainerData","build3dContainers","lastThreeDContainerData","currentContainer","resizerElem","overflow","cWidth","cHeight","floatingContainer","_createBaseContainerElements","_thisLayerFunction","pixelAspect","frameDuration","displayStartTime","numLayers","Expressions","stackCount","registers","pushExpression","popExpression","releaseInstances","registerExpressionProperty","expression","MaskManagerInterface","MaskInterface","_mask","_data","_masksInterfaces","ExpressionPropertyInterface","defaultUnidimensionalValue","defaultMultidimensionalValue","completeProperty","expressionValue","getVelocityAtTime","numKeys","valueProp","valueAtTime","speedAtTime","getSpeedAtTime","velocityAtTime","propertyGroup","defaultGetter","UnidimensionalPropertyInterface","arrValue","MultidimensionalPropertyInterface","TransformExpressionInterface","_thisFunction","rotation","xRotation","yRotation","xPosition","yPosition","zPosition","anchorPoint","_px","_py","_pz","_transformFactory","getMatrix","toWorldMat","toWorldVec","applyPoint","toWorld","fromWorldVec","invertPoint","fromWorld","fromComp","sampleImage","transformInterface","toComp","anchorPointDescriptor","defineProperties","hasParent","anchor_point","active","startTime","inPoint","outPoint","propertyGroupFactory","interfaceFunction","parentPropertyGroup","PropertyInterface","propertyName","effectsData","createGroupInterface","groupInterface","mn","_propertyGroup","createValueInterface","numProperties","np","enabled","en","expressionProperty","setGroupProperty","ShapePathInterface","view","propertyIndex","iterateElements","groupInterfaceFactory","fillInterfaceFactory","strokeInterfaceFactory","trimInterfaceFactory","ellipseInterfaceFactory","starInterfaceFactory","rectInterfaceFactory","roundedInterfaceFactory","repeaterInterfaceFactory","gradientFillInterfaceFactory","interfaces","transformInterfaceFactory","cix","contentsInterfaceFactory","startPoint","endPoint","_dashPropertyGroup","dashOb","addPropertyToDashOb","dash","skewAxis","outerRadius","outerRoundness","innerRoundness","innerRadius","_interfaceFunction","_prevValue","_sourceText","sourceText","stringValue","_typeof$2","dataInterfaceFactory","outlineInterface","currentPropertyName","currentProperty","propertyNameIndex","outlineInterfaceFactory","dataInterface","footage","getInterface","_typeof$1","seedRandom","global","startdenom","significance","ARC4","keylen","me","S","copy","typ","mixkey","seed","smear","stringseed","tostring","shortseed","entropy","Uint8Array","crypto","msCrypto","getRandomValues","browser","plugins","screen","autoseed","arc4","prng","int32","quick","pass","is_math_call","initialize$2","propTypes","SHAPE","_typeof","ExpressionManager","fetch","frames","$bm_isInstanceOfArray","isNumerable","tOfV","$bm_neg","tOfA","lenA","retArr","easeInBez","easeOutBez","easeInOutBez","tOfB","lenB","sub","mul","$bm_sum","$bm_sub","$bm_mul","$bm_div","$bm_mod","clamp","mm","radiansToDegrees","radians_to_degrees","degreesToRadians","degrees_to_radians","helperLengthArray","arr1","arr2","normalize","vec","rgbToHsl","hue2rgb","hslToRgb","linear","tMin","tMax","value1","value2","_tMin","rnd","createPath","inTangents","outTangents","inVertexPoint","outVertexPoint","arrPlaceholder","initiateExpression","noOp","_value","needsVelocity","_needsRandom","elemType","$bm_transform","thisProperty","loopIn","loop_in","loopOut","loop_out","smooth","fromCompToSurface","thisLayer","thisComp","scoped_bm_rt","expression_function","eval","wiggle","freq","amp","iWiggle","lenWiggle","addedAmps","periods","loopInDuration","loopOutDuration","velocity","textIndex","textTotal","selectorValue","lookAt","elem1","elem2","fVec","pitch","easeOut","val1","val2","applyEase","easeIn","ease","iKey","lenKey","nearestKey","obKey","framesToTime","fps","timeToFrames","seedrandom","randSeed","substring","posterizeTime","framesPerSecond","executeExpression","frameExpressionId","__preventDeadCodeRemoval","expressionHelpers","searchExpressions","speed","_cachingAtTime","getStaticValueAtTime","addPropertyDecorator","durationFlag","cycleDuration","firstKeyFrame","ret","lastKeyFrame","initV","endV","current","repeats","lastValue","nextLastValue","firstValue","nextFirstValue","samples","sampleValue","sampleFrequency","getTransformValueAtTime","_transformCachingAtTime","anchor","rotationZ","rotationY","rotationX","orientation","positionX","positionY","positionZ","getTransformStaticValueAtTime","propertyGetProp","ShapePropertyConstructorFunction","getConstructorFunction","KeyframedShapePropertyConstructorFunction","getKeyframedConstructorFunction","ShapeExpressions","isClosed","pointOnPath","_segmentsLength","accumulatedLength","initIndex","endIndex","vectorOnPath","vectorType","xLength","yLength","magnitude","tangentOnPath","normalOnPath","shapeValue","lastTime","propertyGetShapeProp","trims","initialize$1","addDecorator","getExpressionValue","calculateExpression","isKeyframed","hasExpressions","initialize","SVGComposableEffect","SVGTintFilter","matrixFilter","feMerge","createMergeNode","SVGFillFilter","SVGStrokeEffect","initialized","SVGTritoneFilter","feComponentTransfer","feFuncR","feFuncG","feFuncB","SVGProLevelsFilter","createFeFunc","feFuncA","feFuncRComposed","feFuncGComposed","feFuncBComposed","SVGDropShadowEffect","globalFilterSize","feGaussianBlur","feOffset","feFlood","feComposite","resultId","ins","feMergeNode","colorBlack","colorWhite","groupPath","elemChildren","pathMasker","dasharrayValue","getTotalLength","lineLength","units","color1","color2","color3","tableR","tableG","tableB","getTableValue","inputBlack","inputWhite","gamma","outputBlack","outputWhite","colorValue","table","outputDelta","inputDelta","col","_svgMatteSymbols","SVGMatte3Effect","filterElem","SVGGaussianBlurEffect","findSymbol","replaceInParent","symbolId","nextChild","useElem","setElementAsMask","symbol","sigma","dimensions","sigmaX","sigmaY","edgeMode","module","LOTTIE_PLAYER_VERSION","LOTTIE_WEB_VERSION","PlayerState","PlayMode","PlayerEvents","parseSrc","isLottie","json","every","field","fromURL","srcUrl","LottiePlayer","Loading","Normal","_this","srcParsed","jsonData","srcAttrib","_lottie","webworkers","_attachEventListeners","disableCheck","currentState","dispatchEvent","CustomEvent","getLottie","getVersions","lottieWebVersion","lottiePlayerVersion","Playing","Play","Paused","Pause","_counter","Stopped","Stop","Destroyed","frame","seeker","snapshot","download","XMLSerializer","serializeToString","encodeURIComponent","click","setLooping","togglePlay","toggleLooping","_io","disconnect","_onVisibilityChange","controls","animationClass","background","disableShadowDOM","renderControls","IntersectionObserver","entries","isIntersecting","Frozen","observe","Rendered","isStopped","_handleSeekChange","_prevState","Frame","detail","Complete","Bounce","Loop","intermission","Ready","Load","hover","Freeze"],"mappings":";;;;;;;;;;;;;;gFAgBA,IAAIA,eAAgB,SAASC,EAAGC,UAC5BF,eAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,OAAU,IAAIK,KAAKL,EAAOC,OAAOK,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,KACzFP,eAAcC,EAAGC,IAGrB,SAASS,UAAUV,EAAGC,MACR,mBAANA,GAA0B,OAANA,EAC3B,MAAM,IAAIU,UAAU,uBAAyBC,OAAOX,GAAK,0CAEpDY,SAAYC,YAAcd,EADnCD,eAAcC,EAAGC,GAEjBD,EAAEO,UAAkB,OAANN,EAAaC,OAAOa,OAAOd,IAAMY,EAAGN,UAAYN,EAAEM,UAAW,IAAIM,GAG5E,IAAIG,QAAW,kBAClBA,QAAWd,OAAOe,QAAU,SAAkBC,OACrC,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,QAEvC,IAAId,KADTa,EAAIG,UAAUF,GACOlB,OAAOK,UAA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