UNPKG

onairos

Version:

The Onairos Library is a collection of functions that enable Applications to connect and communicate data with Onairos Identities via User Authorization. Integration for developers is seamless, simple and effective for all applications. LLM SDK capabiliti

1 lines 807 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define("Onairos",["React","ReactDOM"],t):"object"==typeof exports?exports.Onairos=t(require("react"),require("react-dom")):e.Onairos=t(e.React,e.ReactDOM)}(this,(__WEBPACK_EXTERNAL_MODULE__156__,__WEBPACK_EXTERNAL_MODULE__318__)=>(()=>{var __webpack_modules__={51(e,t,r){!function(e,t,r){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=a(t),i=a(r);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function o(e){if(Array.isArray(e))return e}function l(e,t,r){return(t=y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,i,s,o=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(a=i.call(r)).done)&&(o.push(a.value),o.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw n}}return o}}function h(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach(function(t){l(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function d(e,t){if(null==e)return{};var r,a,n=u(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],t.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function u(e,t){if(null==e)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.includes(a))continue;r[a]=e[a]}return r}function f(e,t){return o(e)||c(e,t)||E(e,t)||h()}function g(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function y(e){var t=g(e,"string");return"symbol"==typeof t?t:t+""}function E(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}var A=["animationData","loop","autoplay","initialSegment","onComplete","onLoopComplete","onEnterFrame","onSegmentStart","onConfigReady","onDataReady","onDataFailed","onLoadedImages","onDOMLoaded","onDestroy","lottieRef","renderer","name","assetsPath","rendererSettings"],v=function(e,t){var a=e.animationData,s=e.loop,o=e.autoplay,l=e.initialSegment,c=e.onComplete,h=e.onLoopComplete,p=e.onEnterFrame,u=e.onSegmentStart,g=e.onConfigReady,y=e.onDataReady,E=e.onDataFailed,v=e.onLoadedImages,I=e.onDOMLoaded,x=e.onDestroy;e.lottieRef,e.renderer,e.name,e.assetsPath,e.rendererSettings;var C=d(e,A),k=f(r.useState(!1),2),S=k[0],w=k[1],b=r.useRef(),B=r.useRef(null),D=function(){var e;null===(e=b.current)||void 0===e||e.play()},P=function(){var e;null===(e=b.current)||void 0===e||e.stop()},M=function(){var e;null===(e=b.current)||void 0===e||e.pause()},Q=function(e){var t;null===(t=b.current)||void 0===t||t.setSpeed(e)},F=function(e,t){var r;null===(r=b.current)||void 0===r||r.goToAndPlay(e,t)},R=function(e,t){var r;null===(r=b.current)||void 0===r||r.goToAndStop(e,t)},T=function(e){var t;null===(t=b.current)||void 0===t||t.setDirection(e)},L=function(e,t){var r;null===(r=b.current)||void 0===r||r.playSegments(e,t)},N=function(e){var t;null===(t=b.current)||void 0===t||t.setSubframe(e)},O=function(e){var t;return null===(t=b.current)||void 0===t?void 0:t.getDuration(e)},G=function(){var e;null===(e=b.current)||void 0===e||e.destroy(),b.current=void 0},H=function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(B.current){null===(t=b.current)||void 0===t||t.destroy();var a=m(m(m({},e),r),{},{container:B.current});return b.current=n.default.loadAnimation(a),w(!!b.current),function(){var e;null===(e=b.current)||void 0===e||e.destroy(),b.current=void 0}}};return r.useEffect(function(){var e=H();return function(){return null==e?void 0:e()}},[a,s]),r.useEffect(function(){b.current&&(b.current.autoplay=!!o)},[o]),r.useEffect(function(){b.current&&(l?Array.isArray(l)&&l.length&&((b.current.currentRawFrame<l[0]||b.current.currentRawFrame>l[1])&&(b.current.currentRawFrame=l[0]),b.current.setSegment(l[0],l[1])):b.current.resetSegments(!0))},[l]),r.useEffect(function(){var e=[{name:"complete",handler:c},{name:"loopComplete",handler:h},{name:"enterFrame",handler:p},{name:"segmentStart",handler:u},{name:"config_ready",handler:g},{name:"data_ready",handler:y},{name:"data_failed",handler:E},{name:"loaded_images",handler:v},{name:"DOMLoaded",handler:I},{name:"destroy",handler:x}].filter(function(e){return null!=e.handler});if(e.length){var t=e.map(function(e){var t;return null===(t=b.current)||void 0===t||t.addEventListener(e.name,e.handler),function(){var t;null===(t=b.current)||void 0===t||t.removeEventListener(e.name,e.handler)}});return function(){t.forEach(function(e){return e()})}}},[c,h,p,u,g,y,E,v,I,x]),{View:i.default.createElement("div",m({style:t,ref:B},C)),play:D,stop:P,pause:M,setSpeed:Q,goToAndStop:R,goToAndPlay:F,setDirection:T,playSegments:L,setSubframe:N,getDuration:O,destroy:G,animationContainerRef:B,animationLoaded:S,animationItem:b.current}};function I(e){var t=e.getBoundingClientRect(),r=t.top,a=t.height;return(window.innerHeight-r)/(window.innerHeight+a)}function x(e,t,r){var a=e.getBoundingClientRect(),n=a.top;return{x:(t-a.left)/a.width,y:(r-n)/a.height}}var C=function(e){var t=e.wrapperRef,a=e.animationItem,n=e.mode,i=e.actions;r.useEffect(function(){var e=t.current;if(e&&a&&i.length){a.stop();var r=function(){var t=null,r=function(){var r=I(e),n=i.find(function(e){var t=e.visibility;return t&&r>=t[0]&&r<=t[1]});if(n){if("seek"===n.type&&n.visibility&&2===n.frames.length){var s=n.frames[0]+Math.ceil((r-n.visibility[0])/(n.visibility[1]-n.visibility[0])*n.frames[1]);a.goToAndStop(s-a.firstFrame-1,!0)}"loop"===n.type&&(null===t||t!==n.frames||a.isPaused)&&(a.playSegments(n.frames,!0),t=n.frames),"play"===n.type&&a.isPaused&&(a.resetSegments(!0),a.play()),"stop"===n.type&&a.goToAndStop(n.frames[0]-a.firstFrame-1,!0)}};return document.addEventListener("scroll",r),function(){document.removeEventListener("scroll",r)}},s=function(){var t=function(t,r){var n=t,s=r;if(-1!==n&&-1!==s){var o=x(e,n,s);n=o.x,s=o.y}var l=i.find(function(e){var t=e.position;return t&&Array.isArray(t.x)&&Array.isArray(t.y)?n>=t.x[0]&&n<=t.x[1]&&s>=t.y[0]&&s<=t.y[1]:!(!t||Number.isNaN(t.x)||Number.isNaN(t.y))&&n===t.x&&s===t.y});if(l){if("seek"===l.type&&l.position&&Array.isArray(l.position.x)&&Array.isArray(l.position.y)&&2===l.frames.length){var c=(n-l.position.x[0])/(l.position.x[1]-l.position.x[0]),h=(s-l.position.y[0])/(l.position.y[1]-l.position.y[0]);a.playSegments(l.frames,!0),a.goToAndStop(Math.ceil((c+h)/2*(l.frames[1]-l.frames[0])),!0)}"loop"===l.type&&a.playSegments(l.frames,!0),"play"===l.type&&(a.isPaused&&a.resetSegments(!1),a.playSegments(l.frames)),"stop"===l.type&&a.goToAndStop(l.frames[0],!0)}},r=function(e){t(e.clientX,e.clientY)},n=function(){t(-1,-1)};return e.addEventListener("mousemove",r),e.addEventListener("mouseout",n),function(){e.removeEventListener("mousemove",r),e.removeEventListener("mouseout",n)}};switch(n){case"scroll":return r();case"cursor":return s()}}},[n,a])},k=function(e){var t=e.actions,r=e.mode,a=e.lottieObj,n=a.animationItem,i=a.View,s=a.animationContainerRef;return C({actions:t,animationItem:n,mode:r,wrapperRef:s}),i},S=["style","interactivity"],w=function(e){var t,a,n,i=e.style,s=e.interactivity,o=d(e,S),l=v(o,i),c=l.View,h=l.play,p=l.stop,m=l.pause,u=l.setSpeed,f=l.goToAndStop,g=l.goToAndPlay,y=l.setDirection,E=l.playSegments,A=l.setSubframe,I=l.getDuration,x=l.destroy,C=l.animationContainerRef,w=l.animationLoaded,b=l.animationItem;return r.useEffect(function(){e.lottieRef&&(e.lottieRef.current={play:h,stop:p,pause:m,setSpeed:u,goToAndPlay:g,goToAndStop:f,setDirection:y,playSegments:E,setSubframe:A,getDuration:I,destroy:x,animationContainerRef:C,animationLoaded:w,animationItem:b})},[null===(t=e.lottieRef)||void 0===t?void 0:t.current]),k({lottieObj:{View:c,play:h,stop:p,pause:m,setSpeed:u,goToAndStop:f,goToAndPlay:g,setDirection:y,playSegments:E,setSubframe:A,getDuration:I,destroy:x,animationContainerRef:C,animationLoaded:w,animationItem:b},actions:null!==(a=null==s?void 0:s.actions)&&void 0!==a?a:[],mode:null!==(n=null==s?void 0:s.mode)&&void 0!==n?n:"scroll"})};Object.defineProperty(e,"LottiePlayer",{enumerable:!0,get:function(){return n.default}}),e.default=w,e.useLottie=v,e.useLottieInteractivity=k,Object.defineProperty(e,"__esModule",{value:!0})}(t,r(891),r(156))},891(module,exports,__webpack_require__){var factory;"undefined"!=typeof document&&"undefined"!=typeof navigator&&(factory=function(){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(e){_useWebWorker=!!e},getWebWorker=function(){return _useWebWorker},setLocationHref=function(e){locationHref=e},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var r,a,n=e.length;for(r=0;r<n;r+=1)for(var i in a=e[r].prototype)Object.prototype.hasOwnProperty.call(a,i)&&(t.prototype[i]=a[i])}function getDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)}function createProxyFunction(e){function t(){}return t.prototype=e,t}var audioControllerFactory=function(){function e(e){this.audios=[],this.audioFactory=e,this._volume=1,this._isMuted=!1}return e.prototype={addAudio:function(e){this.audios.push(e)},pause:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].pause()},resume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].resume()},setRate:function(e){var t,r=this.audios.length;for(t=0;t<r;t+=1)this.audios[t].setRate(e)},createAudio:function(e){return this.audioFactory?this.audioFactory(e):window.Howl?new window.Howl({src:[e]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(e){this.audioFactory=e},setVolume:function(e){this._volume=e,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].volume(this._volume*(this._isMuted?0:1))}},function(){return new e}}(),createTypedArray=function(){function e(e,t){var r,a=0,n=[];switch(e){case"int16":case"uint8c":r=1;break;default:r=1.1}for(a=0;a<t;a+=1)n.push(r);return n}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(t,r){return"float32"===t?new Float32Array(r):"int16"===t?new Int16Array(r):"uint8c"===t?new Uint8ClampedArray(r):e(t,r)}:e}();function createSizedArray(e){return Array.apply(null,{length:e})}function _typeof$6(e){return _typeof$6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$6(e)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_shouldRoundValues=!1,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface$1(){return{}}!function(){var e,t=["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=t.length;for(e=0;e<r;e+=1)BMMath[t[e]]=Math[t[e]]}(),BMMath.random=Math.random,BMMath.abs=function(e){if("object"===_typeof$6(e)&&e.length){var t,r=createSizedArray(e.length),a=e.length;for(t=0;t<a;t+=1)r[t]=Math.abs(e[t]);return r}return Math.abs(e)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(e){_shouldRoundValues=!!e}function bmRnd(e){return _shouldRoundValues?Math.round(e):e}function styleDiv(e){e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.display="block",e.style.transformOrigin="0 0",e.style.webkitTransformOrigin="0 0",e.style.backfaceVisibility="visible",e.style.webkitBackfaceVisibility="visible",e.style.transformStyle="preserve-3d",e.style.webkitTransformStyle="preserve-3d",e.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(e,t,r,a){this.type=e,this.currentTime=t,this.totalTime=r,this.direction=a<0?-1:1}function BMCompleteEvent(e,t){this.type=e,this.direction=t<0?-1:1}function BMCompleteLoopEvent(e,t,r,a){this.type=e,this.currentLoop=r,this.totalLoops=t,this.direction=a<0?-1:1}function BMSegmentStartEvent(e,t,r){this.type=e,this.firstFrame=t,this.totalFrames=r}function BMDestroyEvent(e,t){this.type=e,this.target=t}function BMRenderFrameErrorEvent(e,t){this.type="renderFrameError",this.nativeError=e,this.currentTime=t}function BMConfigErrorEvent(e){this.type="configError",this.nativeError=e}function BMAnimationConfigErrorEvent(e,t){this.type=e,this.nativeError=t}var createElementID=(_count=0,function(){return idPrefix$1+"__lottie_element_"+(_count+=1)}),_count;function HSVtoRGB(e,t,r){var a,n,i,s,o,l,c,h;switch(l=r*(1-t),c=r*(1-(o=6*e-(s=Math.floor(6*e)))*t),h=r*(1-(1-o)*t),s%6){case 0:a=r,n=h,i=l;break;case 1:a=c,n=r,i=l;break;case 2:a=l,n=r,i=h;break;case 3:a=l,n=c,i=r;break;case 4:a=h,n=l,i=r;break;case 5:a=r,n=l,i=c}return[a,n,i]}function RGBtoHSV(e,t,r){var a,n=Math.max(e,t,r),i=Math.min(e,t,r),s=n-i,o=0===n?0:s/n,l=n/255;switch(n){case i:a=0;break;case e:a=t-r+s*(t<r?6:0),a/=6*s;break;case t:a=r-e+2*s,a/=6*s;break;case r:a=e-t+4*s,a/=6*s}return[a,o,l]}function addSaturationToRGB(e,t){var r=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return r[1]+=t,r[1]>1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(e,t){var r=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return r[2]+=t,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(e,t){var r=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return r[0]+=t/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var e,t,r=[];for(e=0;e<256;e+=1)t=e.toString(16),r[e]=1===t.length?"0"+t:t;return function(e,t,a){return e<0&&(e=0),t<0&&(t=0),a<0&&(a=0),"#"+r[e]+r[t]+r[a]}}(),setSubframeEnabled=function(e){subframeEnabled=!!e},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(e){expressionsPlugin=e},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(e){expressionsInterfaces=e},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(e){defaultCurveSegments=e},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(e){idPrefix$1=e},getIdPrefix=function(){return idPrefix$1};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){return _typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$5(e)}var dataManager=function(){var e,t,r=1,a=[],n={onmessage:function(){},postMessage:function(t){e({data:t})}},i={postMessage:function(e){n.onmessage({data:e})}};function s(){t||(t=function(t){if(window.Worker&&window.Blob&&getWebWorker()){var r=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"}),a=URL.createObjectURL(r);return new Worker(a)}return e=t,n}(function(e){if(i.dataManager||(i.dataManager=function(){function e(n,i){var s,o,l,c,h,m,d=n.length;for(o=0;o<d;o+=1)if("ks"in(s=n[o])&&!s.completed){if(s.completed=!0,s.hasMask){var u=s.masksProperties;for(c=u.length,l=0;l<c;l+=1)if(u[l].pt.k.i)a(u[l].pt.k);else for(m=u[l].pt.k.length,h=0;h<m;h+=1)u[l].pt.k[h].s&&a(u[l].pt.k[h].s[0]),u[l].pt.k[h].e&&a(u[l].pt.k[h].e[0])}0===s.ty?(s.layers=t(s.refId,i),e(s.layers,i)):4===s.ty?r(s.shapes):5===s.ty&&p(s)}}function t(e,t){var r=function(e,t){for(var r=0,a=t.length;r<a;){if(t[r].id===e)return t[r];r+=1}return null}(e,t);return r?r.layers.__used?JSON.parse(JSON.stringify(r.layers)):(r.layers.__used=!0,r.layers):null}function r(e){var t,n,i;for(t=e.length-1;t>=0;t-=1)if("sh"===e[t].ty)if(e[t].ks.k.i)a(e[t].ks.k);else for(i=e[t].ks.k.length,n=0;n<i;n+=1)e[t].ks.k[n].s&&a(e[t].ks.k[n].s[0]),e[t].ks.k[n].e&&a(e[t].ks.k[n].e[0]);else"gr"===e[t].ty&&r(e[t].it)}function a(e){var t,r=e.i.length;for(t=0;t<r;t+=1)e.i[t][0]+=e.v[t][0],e.i[t][1]+=e.v[t][1],e.o[t][0]+=e.v[t][0],e.o[t][1]+=e.v[t][1]}function n(e,t){var r=t?t.split("."):[100,100,100];return e[0]>r[0]||!(r[0]>e[0])&&(e[1]>r[1]||!(r[1]>e[1])&&(e[2]>r[2]||!(r[2]>e[2])&&null))}var i,s=function(){var e=[4,4,14];function t(e){var t=e.t.d;e.t.d={k:[{s:t,t:0}]}}function r(e){var r,a=e.length;for(r=0;r<a;r+=1)5===e[r].ty&&t(e[r])}return function(t){if(n(e,t.v)&&(r(t.layers),t.assets)){var a,i=t.assets.length;for(a=0;a<i;a+=1)t.assets[a].layers&&r(t.assets[a].layers)}}}(),o=(i=[4,7,99],function(e){if(e.chars&&!n(i,e.v)){var t,a=e.chars.length;for(t=0;t<a;t+=1){var s=e.chars[t];s.data&&s.data.shapes&&(r(s.data.shapes),s.data.ip=0,s.data.op=99999,s.data.st=0,s.data.sr=1,s.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},e.chars[t].t||(s.data.shapes.push({ty:"no"}),s.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),l=function(){var e=[5,7,15];function t(e){var t=e.t.p;"number"==typeof t.a&&(t.a={a:0,k:t.a}),"number"==typeof t.p&&(t.p={a:0,k:t.p}),"number"==typeof t.r&&(t.r={a:0,k:t.r})}function r(e){var r,a=e.length;for(r=0;r<a;r+=1)5===e[r].ty&&t(e[r])}return function(t){if(n(e,t.v)&&(r(t.layers),t.assets)){var a,i=t.assets.length;for(a=0;a<i;a+=1)t.assets[a].layers&&r(t.assets[a].layers)}}}(),c=function(){var e=[4,1,9];function t(e){var r,a,n,i=e.length;for(r=0;r<i;r+=1)if("gr"===e[r].ty)t(e[r].it);else if("fl"===e[r].ty||"st"===e[r].ty)if(e[r].c.k&&e[r].c.k[0].i)for(n=e[r].c.k.length,a=0;a<n;a+=1)e[r].c.k[a].s&&(e[r].c.k[a].s[0]/=255,e[r].c.k[a].s[1]/=255,e[r].c.k[a].s[2]/=255,e[r].c.k[a].s[3]/=255),e[r].c.k[a].e&&(e[r].c.k[a].e[0]/=255,e[r].c.k[a].e[1]/=255,e[r].c.k[a].e[2]/=255,e[r].c.k[a].e[3]/=255);else e[r].c.k[0]/=255,e[r].c.k[1]/=255,e[r].c.k[2]/=255,e[r].c.k[3]/=255}function r(e){var r,a=e.length;for(r=0;r<a;r+=1)4===e[r].ty&&t(e[r].shapes)}return function(t){if(n(e,t.v)&&(r(t.layers),t.assets)){var a,i=t.assets.length;for(a=0;a<i;a+=1)t.assets[a].layers&&r(t.assets[a].layers)}}}(),h=function(){var e=[4,4,18];function t(e){var r,a,n;for(r=e.length-1;r>=0;r-=1)if("sh"===e[r].ty)if(e[r].ks.k.i)e[r].ks.k.c=e[r].closed;else for(n=e[r].ks.k.length,a=0;a<n;a+=1)e[r].ks.k[a].s&&(e[r].ks.k[a].s[0].c=e[r].closed),e[r].ks.k[a].e&&(e[r].ks.k[a].e[0].c=e[r].closed);else"gr"===e[r].ty&&t(e[r].it)}function r(e){var r,a,n,i,s,o,l=e.length;for(a=0;a<l;a+=1){if((r=e[a]).hasMask){var c=r.masksProperties;for(i=c.length,n=0;n<i;n+=1)if(c[n].pt.k.i)c[n].pt.k.c=c[n].cl;else for(o=c[n].pt.k.length,s=0;s<o;s+=1)c[n].pt.k[s].s&&(c[n].pt.k[s].s[0].c=c[n].cl),c[n].pt.k[s].e&&(c[n].pt.k[s].e[0].c=c[n].cl)}4===r.ty&&t(r.shapes)}}return function(t){if(n(e,t.v)&&(r(t.layers),t.assets)){var a,i=t.assets.length;for(a=0;a<i;a+=1)t.assets[a].layers&&r(t.assets[a].layers)}}}();function p(e){0===e.t.a.length&&e.t.p}var m={completeData:function(r){r.__complete||(c(r),s(r),o(r),l(r),h(r),e(r.layers,r.assets),function(r,a){if(r){var n=0,i=r.length;for(n=0;n<i;n+=1)1===r[n].t&&(r[n].data.layers=t(r[n].data.refId,a),e(r[n].data.layers,a))}}(r.chars,r.assets),r.__complete=!0)}};return m.checkColors=c,m.checkChars=o,m.checkPathProperties=l,m.checkShapes=h,m.completeLayers=e,m}()),i.assetLoader||(i.assetLoader=function(){function e(e){var t=e.getResponseHeader("content-type");return t&&"json"===e.responseType&&-1!==t.indexOf("json")||e.response&&"object"===_typeof$5(e.response)?e.response:e.response&&"string"==typeof e.response?JSON.parse(e.response):e.responseText?JSON.parse(e.responseText):null}return{load:function(t,r,a,n){var i,s=new XMLHttpRequest;try{s.responseType="json"}catch(e){}s.onreadystatechange=function(){if(4===s.readyState)if(200===s.status)i=e(s),a(i);else try{i=e(s),a(i)}catch(e){n&&n(e)}};try{s.open(["G","E","T"].join(""),t,!0)}catch(e){s.open(["G","E","T"].join(""),r+"/"+t,!0)}s.send()}}}()),"loadAnimation"===e.data.type)i.assetLoader.load(e.data.path,e.data.fullPath,function(t){i.dataManager.completeData(t),i.postMessage({id:e.data.id,payload:t,status:"success"})},function(){i.postMessage({id:e.data.id,status:"error"})});else if("complete"===e.data.type){var t=e.data.animation;i.dataManager.completeData(t),i.postMessage({id:e.data.id,payload:t,status:"success"})}else"loadData"===e.data.type&&i.assetLoader.load(e.data.path,e.data.fullPath,function(t){i.postMessage({id:e.data.id,payload:t,status:"success"})},function(){i.postMessage({id:e.data.id,status:"error"})})}),t.onmessage=function(e){var t=e.data,r=t.id,n=a[r];a[r]=null,"success"===t.status?n.onComplete(t.payload):n.onError&&n.onError()})}function o(e,t){var n="processId_"+(r+=1);return a[n]={onComplete:e,onError:t},n}return{loadAnimation:function(e,r,a){s();var n=o(r,a);t.postMessage({type:"loadAnimation",path:e,fullPath:window.location.origin+window.location.pathname,id:n})},loadData:function(e,r,a){s();var n=o(r,a);t.postMessage({type:"loadData",path:e,fullPath:window.location.origin+window.location.pathname,id:n})},completeAnimation:function(e,r,a){s();var n=o(r,a);t.postMessage({type:"complete",animation:e,id:n})}}}(),ImagePreloader=function(){var e=function(){var e=createTag("canvas");e.width=1,e.height=1;var t=e.getContext("2d");return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),e}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function a(e,t,r){var a="";if(e.e)a=e.p;else if(t){var n=e.p;-1!==n.indexOf("images/")&&(n=n.split("/")[1]),a=t+n}else a=r,a+=e.u?e.u:"",a+=e.p;return a}function n(e){var t=0,r=setInterval(function(){(e.getBBox().width||t>500)&&(this._imageLoaded(),clearInterval(r)),t+=1}.bind(this),50)}function i(e){var t={assetData:e},r=a(e,this.assetsPath,this.path);return dataManager.loadData(r,function(e){t.img=e,this._footageLoaded()}.bind(this),function(){t.img={},this._footageLoaded()}.bind(this)),t}function s(){this._imageLoaded=t.bind(this),this._footageLoaded=r.bind(this),this.testImageLoaded=n.bind(this),this.createFootageData=i.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return s.prototype={loadAssets:function(e,t){var r;this.imagesLoadedCb=t;var a=e.length;for(r=0;r<a;r+=1)e[r].layers||(e[r].t&&"seq"!==e[r].t?3===e[r].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(e[r]))):(this.totalImages+=1,this.images.push(this._createImageData(e[r]))))},setAssetsPath:function(e){this.assetsPath=e||""},setPath:function(e){this.path=e||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(e){for(var t=0,r=this.images.length;t<r;){if(this.images[t].assetData===e)return this.images[t].img;t+=1}return null},createImgData:function(t){var r=a(t,this.assetsPath,this.path),n=createTag("img");n.crossOrigin="anonymous",n.addEventListener("load",this._imageLoaded,!1),n.addEventListener("error",function(){i.img=e,this._imageLoaded()}.bind(this),!1),n.src=r;var i={img:n,assetData:t};return i},createImageData:function(t){var r=a(t,this.assetsPath,this.path),n=createNS("image");isSafari?this.testImageLoaded(n):n.addEventListener("load",this._imageLoaded,!1),n.addEventListener("error",function(){i.img=e,this._imageLoaded()}.bind(this),!1),n.setAttributeNS("http://www.w3.org/1999/xlink","href",r),this._elementHelper.append?this._elementHelper.append(n):this._elementHelper.appendChild(n);var i={img:n,assetData:t};return i},imageLoaded:t,footageLoaded:r,setCacheType:function(e,t){"svg"===e?(this._elementHelper=t,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},s}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(e,t){if(this._cbs[e])for(var r=this._cbs[e],a=0;a<r.length;a+=1)r[a](t)},addEventListener:function(e,t){return this._cbs[e]||(this._cbs[e]=[]),this._cbs[e].push(t),function(){this.removeEventListener(e,t)}.bind(this)},removeEventListener:function(e,t){if(t){if(this._cbs[e]){for(var r=0,a=this._cbs[e].length;r<a;)this._cbs[e][r]===t&&(this._cbs[e].splice(r,1),r-=1,a-=1),r+=1;this._cbs[e].length||(this._cbs[e]=null)}}else this._cbs[e]=null}};var markerParser=function(){function e(e){for(var t,r=e.split("\r\n"),a={},n=0,i=0;i<r.length;i+=1)2===(t=r[i].split(":")).length&&(a[t[0]]=t[1].trim(),n+=1);if(0===n)throw new Error;return a}return function(t){for(var r=[],a=0;a<t.length;a+=1){var n=t[a],i={time:n.tm,duration:n.dr};try{i.payload=JSON.parse(t[a].cm)}catch(r){try{i.payload=e(t[a].cm)}catch(e){i.payload={name:t[a].cm}}}r.push(i)}return r}}(),ProjectInterface=function(){function e(e){this.compositions.push(e)}return function(){function t(e){for(var t=0,r=this.compositions.length;t<r;){if(this.compositions[t].data&&this.compositions[t].data.nm===e)return this.compositions[t].prepareFrame&&this.compositions[t].data.xt&&this.compositions[t].prepareFrame(this.currentFrame),this.compositions[t].compInterface;t+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),renderers={},registerRenderer=function(e,t){renderers[e]=t};function getRenderer(e){return renderers[e]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var e in renderers)if(renderers[e])return e;return""}function _typeof$4(e){return _typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$4(e)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(e){(e.wrapper||e.container)&&(this.wrapper=e.wrapper||e.container);var t="svg";e.animType?t=e.animType:e.renderer&&(t=e.renderer);var r=getRenderer(t);this.renderer=new r(this,e.rendererSettings),this.imagePreloader.setCacheType(t,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=t,""===e.loop||null===e.loop||void 0===e.loop||!0===e.loop?this.loop=!0:!1===e.loop?this.loop=!1:this.loop=parseInt(e.loop,10),this.autoplay=!("autoplay"in e)||e.autoplay,this.name=e.name?e.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(e,"autoloadSegments")||e.autoloadSegments,this.assetsPath=e.assetsPath,this.initialSegment=e.initialSegment,e.audioFactory&&this.audioController.setAudioFactory(e.audioFactory),e.animationData?this.setupAnimation(e.animationData):e.path&&(-1!==e.path.lastIndexOf("\\")?this.path=e.path.substr(0,e.path.lastIndexOf("\\")+1):this.path=e.path.substr(0,e.path.lastIndexOf("/")+1),this.fileName=e.path.substr(e.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(e.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(e){dataManager.completeAnimation(e,this.configAnimation)},AnimationItem.prototype.setData=function(e,t){t&&"object"!==_typeof$4(t)&&(t=JSON.parse(t));var r={wrapper:e,animationData:t},a=e.attributes;r.path=a.getNamedItem("data-animation-path")?a.getNamedItem("data-animation-path").value:a.getNamedItem("data-bm-path")?a.getNamedItem("data-bm-path").value:a.getNamedItem("bm-path")?a.getNamedItem("bm-path").value:"",r.animType=a.getNamedItem("data-anim-type")?a.getNamedItem("data-anim-type").value:a.getNamedItem("data-bm-type")?a.getNamedItem("data-bm-type").value:a.getNamedItem("bm-type")?a.getNamedItem("bm-type").value:a.getNamedItem("data-bm-renderer")?a.getNamedItem("data-bm-renderer").value:a.getNamedItem("bm-renderer")?a.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var n=a.getNamedItem("data-anim-loop")?a.getNamedItem("data-anim-loop").value:a.getNamedItem("data-bm-loop")?a.getNamedItem("data-bm-loop").value:a.getNamedItem("bm-loop")?a.getNamedItem("bm-loop").value:"";"false"===n?r.loop=!1:"true"===n?r.loop=!0:""!==n&&(r.loop=parseInt(n,10));var i=a.getNamedItem("data-anim-autoplay")?a.getNamedItem("data-anim-autoplay").value:a.getNamedItem("data-bm-autoplay")?a.getNamedItem("data-bm-autoplay").value:!a.getNamedItem("bm-autoplay")||a.getNamedItem("bm-autoplay").value;r.autoplay="false"!==i,r.name=a.getNamedItem("data-name")?a.getNamedItem("data-name").value:a.getNamedItem("data-bm-name")?a.getNamedItem("data-bm-name").value:a.getNamedItem("bm-name")?a.getNamedItem("bm-name").value:"","false"===(a.getNamedItem("data-anim-prerender")?a.getNamedItem("data-anim-prerender").value:a.getNamedItem("data-bm-prerender")?a.getNamedItem("data-bm-prerender").value:a.getNamedItem("bm-prerender")?a.getNamedItem("bm-prerender").value:"")&&(r.prerender=!1),r.path?this.setParams(r):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(e){e.op>this.animationData.op&&(this.animationData.op=e.op,this.totalFrames=Math.floor(e.op-this.animationData.ip));var t,r,a=this.animationData.layers,n=a.length,i=e.layers,s=i.length;for(r=0;r<s;r+=1)for(t=0;t<n;){if(a[t].id===i[r].id){a[t]=i[r];break}t+=1}if((e.chars||e.fonts)&&(this.renderer.globalData.fontManager.addChars(e.chars),this.renderer.globalData.fontManager.addFonts(e.fonts,this.renderer.globalData.defs)),e.assets)for(n=e.assets.length,t=0;t<n;t+=1)this.animationData.assets.push(e.assets[t]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(e){this.animationData=e;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var e=this.animationData.segments;if(!e||0===e.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var t=e.shift();this.timeCompleted=t.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(e){if(this.renderer)try{this.animationData=e,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(e),e.assets||(e.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(e.assets),this.markers=markerParser(e.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(e){this.triggerConfigError(e)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(e,t){var r="number"==typeof e?e:void 0,a="number"==typeof t?t:void 0;this.renderer.updateContainerSize(r,a)},AnimationItem.prototype.setSubframe=function(e){this.isSubframeEnabled=!!e},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(e){this.triggerRenderFrameError(e)}},AnimationItem.prototype.play=function(e){e&&this.name!==e||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(e){e&&this.name!==e||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(e){e&&this.name!==e||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(e){e&&this.name!==e||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(e){for(var t,r=0;r<this.markers.length;r+=1)if((t=this.markers[r]).payload&&t.payload.name===e)return t;return null},AnimationItem.prototype.goToAndStop=function(e,t,r){if(!r||this.name===r){var a=Number(e);if(isNaN(a)){var n=this.getMarkerData(e);n&&this.goToAndStop(n.time,!0)}else t?this.setCurrentRawFrameValue(e):this.setCurrentRawFrameValue(e*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(e,t,r){if(!r||this.name===r){var a=Number(e);if(isNaN(a)){var n=this.getMarkerData(e);n&&(n.duration?this.playSegments([n.time,n.time+n.duration],!0):this.goToAndStop(n.time,!0))}else this.goToAndStop(a,t,r);this.play()}},AnimationItem.prototype.advanceTime=function(e){if(!0!==this.isPaused&&!1!==this.isLoaded){var t=this.currentRawFrame+e*this.frameModifier,r=!1;t>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?t>=this.totalFrames?(this.playCount+=1,this.checkSegments(t%this.totalFrames)||(this.setCurrentRawFrameValue(t%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(t):this.checkSegments(t>this.totalFrames?t%this.totalFrames:0)||(r=!0,t=this.totalFrames-1):t<0?this.checkSegments(t%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,t=0):(this.setCurrentRawFrameValue(this.totalFrames+t%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(t),r&&(this.setCurrentRawFrameValue(t),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(e,t){this.playCount=0,e[1]<e[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=e[0]-e[1],this.timeCompleted=this.totalFrames,this.firstFrame=e[1],this.setCurrentRawFrameValue(this.totalFrames-.001-t)):e[1]>e[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=e[1]-e[0],this.timeCompleted=this.totalFrames,this.firstFrame=e[0],this.setCurrentRawFrameValue(.001+t)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(e,t){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<e?r=e:this.currentRawFrame+this.firstFrame>t&&(r=t-e)),this.firstFrame=e,this.totalFrames=t-e,this.timeCompleted=this.totalFrames,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(e,t){if(t&&(this.segments.length=0),"object"===_typeof$4(e[0])){var r,a=e.length;for(r=0;r<a;r+=1)this.segments.push(e[r])}else this.segments.push(e);this.segments.length&&t&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(e){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),e&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(e){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),e),!0)},AnimationItem.prototype.destroy=function(e){e&&this.name!==e||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(e){this.currentRawFrame=e,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(e){this.playSpeed=e,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(e){this.playDirection=e<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(e){this.loop=e},AnimationItem.prototype.setVolume=function(e,t){t&&this.name!==t||this.audioController.setVolume(e)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(e){e&&this.name!==e||this.audioController.mute()},AnimationItem.prototype.unmute=function(e){e&&this.name!==e||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(e){var t="";if(e.e)t=e.p;else if(this.assetsPath){var r=e.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),t=this.assetsPath+r}else t=this.path,t+=e.u?e.u:"",t+=e.p;return t},AnimationItem.prototype.getAssetData=function(e){for(var t=0,r=this.assets.length;t<r;){if(e===this.assets[t].id)return this.assets[t];t+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(e){return e?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(e,t,r){try{this.renderer.getElementByPath(e).updateDocumentData(t,r)}catch(e){}},AnimationItem.prototype.trigger=function(e){if(this._cbs&&this._cbs[e])switch(e){case"enterFrame":this.triggerEvent(e,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(e,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(e,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(e,new BMCompleteEvent(e,this.frameMult));break;case"segmentStart":this.triggerEvent(e,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(e,new BMDestroyEvent(e,this));break;default:this.triggerEvent(e)}"enterFrame"===e&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===e&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult)),"complete"===e&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(e,this.frameMult)),"segmentStart"===e&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames)),"destroy"===e&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(e,this))},AnimationItem.prototype.triggerRenderFrameError=function(e){var t=new BMRenderFrameErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)},AnimationItem.prototype.triggerConfigError=function(e){var t=new BMConfigErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)};var animationManager=function(){var e={},t=[],r=0,a=0,n=0,i=!0,s=!1;function o(e){for(var r=0,n=e.target;r<a;)t[r].animation===n&&(t.splice(r,1),r-=1,a-=1,n.isPaused||h()),r+=1}function l(e,r){if(!e)return null;for(var n=0;n<a;){if(t[n].elem===e&&null!==t[n].elem)return t[n].animation;n+=1}var i=new AnimationItem;return p(i,e),i.setData(e,r),i}function c(){n+=1,u()}function h(){n-=1}function p(e,r){e.addEventListener("destroy",o),e.addEventListener("_active",c),e.addEventListener("_idle",h),t.push({elem:r,animation:e}),a+=1}function m(e){var o,l=e-r;for(o=0;o<a;o+=1)t[o].animation.advanceTime(l);r=e,n&&!s?window.requestAnimationFrame(m):i=!0}function d(e){r=e,window.requestAnimationFrame(m)}function u(){!s&&n&&i&&(window.requestAnimationFrame(d),i=!1)}return e.registerAnimation=l,e.loadAnimation=function(e){var t=new AnimationItem;return p(t,null),t.setParams(e),t},e.setSpeed=function(e,r){var n;for(n=0;n<a;n+=1)t[n].animation.setSpeed(e,r)},e.setDirection=function(e,r){var n;for(n=0;n<a;n+=1)t[n].animation.setDirection(e,r)},e.play=function(e){var r;for(r=0;r<a;r+=1)t[r].animation.play(e)},e.pause=function(e){var r;for(r=0;r<a;r+=1)t[r].animation.pause(e)},e.stop=function(e){var r;for(r=0;r<a;r+=1)t[r].animation.stop(e)},e.togglePause=function(e){var r;for(r=0;r<a;r+=1)t[r].animation.togglePause(e)},e.searchAnimations=function(e,t,r){var a,n=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),i=n.length;for(a=0;a<i;a+=1)r&&n[a].setAttribute("data-bm-type",r),l(n[a],e);if(t&&0===i){r||(r="svg");var s=document.getElementsByTagName("body")[0];s.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",r),s.appendChild(o),l(o,e)}},e.resize=function(){var e;for(e=0;e<a;e+=1)t[e].animation.resize()},e.goToAndStop=function(e,r,n){var i;for(i=0;i<a;i+=1)t[i].animation.goToAndStop(e,r,n)},e.destroy=function(e){var r;for(r=a-1;r>=0;r-=1)t[r].animation.destroy(e)},e.freeze=function(){s=!0},e.unfreeze=function(){s=!1,u()},e.setVolume=function(e,r){var n;for(n=0;n<a;n+=1)t[n].animation.setVolume(e,r)},e.mute=function(e){var r;for(r=0;r<a;r+=1)t[r].animation.mute(e)},e.unmute=function(e){var r;for(r=0;r<a;r+=1)t[r].animation.unmute(e)},e.getRegisteredAnimations=function(){var e,r=t.length,a=[];for(e=0;e<r;e+=1)a.push(t[e].animation);return a},e}(),BezierFactory=function(){var e={getBezierEasing:function(e,r,a,n,i){var s=i||("bez_"+e+"_"+r+"_"+a+"_"+n).replace(/\./g,"p");if(t[s])return t[s];var o=new h([e,r,a,n]);return t[s]=o,o}},t={},r=11,a=1/(r-1),n="function"==typeof Float32Array;function i(e,t){return 1-3*t+3*e}function s(e,t){return 3*t-6*e}function o(e){return 3*e}function l(e,t,r){return((i(t,r)*e+s(t,r))*e+o(t))*e}function c(e,t,r){return 3*i(t,r)*e*e+2*s(t,r)*e+o(t)}function h(e){this._p=e,this._mSampleValues=n?new Float32Array(r):new Array(r),this._precomputed=!1,this.get=this.get.bind(this)}return h.prototype={get:function(e){var t=this._p[0],r=this._p[1],a=this._p[2],n=this._p[3];return this._precomputed||this._precompute(),t===r&&a===n?e:0===e?0:1===e?1:l(this._getTForX(e),r,n)},_precompute:function(){var e=this._p[0],t=this._p[1],r=this._p[2],a=this._p[3];this._precomputed=!0,e===t&&r===a||this._calcSampleValues()},_calcSampleValues:function(){for(var e=this._p[0],t=this._p[2],n=0;n<r;++n)this._mSampleValues[n]=l(n*a,e,t)},_getTForX:function(e){for(var t=this._p[0],n=this._p[2],i=this._mSampleValues,s=0,o=1,h=r-1;o!==h&&i[o]<=e;++o)s+=a;var p=s+(e-i[--o])/(i[o+1]-i[o])*a,m=c(p,t,n);return m>=.001?function(e,t,r,a){for(var n=0;n<4;++n){var i=c(t,r,a);if(0===i)return t;t-=(l(t,r,a)-e)/i}return t}(e,p,t,n):0===m?p:function(e,t,r,a,n){var i,s,o=0;do{(i=l(s=t+(r-t)/2,a,n)-e)>0?r=s:t=s}while(Math.abs(i)>1e-7&&++o<10);return s}(e,s,s+a,t,n)}},e}(),pooling={double:function(e){return e.concat(createSizedArray(e.length))}},poolFactory=function(e,t,r){var a=0,n=e,i=createSizedArray(n);return{newElement:function(){return a?i[a-=1]:t()},release:function(e){a===n&&(i=pooling.double(i),n*=2),r&&r(e),i[a]=e,a+=1}}},bezierLengthPool=poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}),segmentsLengthPool=poolFactory(8,function(){return{lengths:[],totalLength:0}},function(e){var t,r=e.lengths.length;for(t=0;t<r;t+=1)bezierLengthPool.release(e.lengths[t]);e.lengths.length=0});function bezFunction(){var e=Math;function t(e,t,r,a,n,i){var s=e*a+t*n+r*i-n*a-i*e-r*t;return s>-.001&&s<.001}var r=function(e,t,r,a){var n,i,s,o,l,c,h=getDefaultCurveSegments(),p=0,m=[],d=[],u=bezierLengthPool.newElement();for(s=r.length,n=0;n<h;n+=1){for(l=n/(h-1),c=0,i=0;i<s;i+=1)o=bmPow(1-l,3)*e[i]+3*bmPow(1-l,2)*l*r[i]+3*(1-l)*bmPow(l,2)*a[i]+bmPow(l,3)*t[i],m[i]=o,null!==d[i]&&(c+=bmPow(m[i]-d[i],2)),d[i]=m[i];c&&(p+=c=bmSqrt(c)),u.percents[n]=l,u.lengths[n]=p}return u.addedLength=p,u};function a(e){this.segmentLength=0,this.points=new Array(e)}function n(e,t){this.partialLength=e,this.point=t}var i,s=(i={},function(e,r,s,o){var l=(e[0]+"_"+e[1]+"_"+r[0]+"_"+r[1]+"_"+s[0]+"_"+s[1]+"_"+o[0]+"_"+o[1]).replace(/\./g,"p");if(!i[l]){var c,h,p,m,d,u,f,g=getDefaultCurveSegments(),y=0,E=null;2===e.length&&(e[0]!==r[0]||e[1]!==r[1])&&t(e[0],e[1],r[0],r[1],e[0]+s[0],e[1]+s[1])&&t(e[0],e[1],r[0],r[1],r[0]+o[0],r[1]+o[1])&&(g=2);var A=new a(g);for(p=s.length,c=0;c<g;c+=1){for(f=createSizedArray(p),d=c/(g-1),u=0,h=0;h<p;h+=1)m=bmPow(1-d,3)*e[h]+3*bmPow(1-d,2)*d*(e[h]+s[h])+3*(1-d)*bmPow(d,2)*(r[h]+o[h])+bmPow(d,3)*r[h],f[h]=m,null!==E&&(u+=bmPow(f[h]-E[h],2));y+=u=bmSqrt(u),A.points[c]=new n(u,f),E=f}A.segmentLength=y,i[l]=A}return i[l]});function o(e,t){var r=t.percents,a=t.lengths,n=r.length,i=bmFloor((n-1)*e),s=e*t.addedLength,o=0;if(i===n-1||0===i||s===a[i])return r[i];for(var l=a[i]>s?-1:1,c=!0;c;)if(a[i]<=s&&a[i+1]>s?(o=(s-a[i])/(a[i+1]-a[i]),c=!1):i+=l,i<0||i>=n-1){if(i===n-1)return r[i];c=!1}return r[i]+(r[i+1]-r[i])*o}var l=createTypedArray("float32",8);return{getSegmentsLength:function(e){var t,a=segmentsLengthPool.newElement(),n=e.c,i=e.v,s=e.o,o=e.i,l=e._length,c=a.lengths,h=0;for(t=0;t<l-1;t+=1)c[t]=r(i[t],i[t+1],s[t],o[t+1]),h+=c[t].addedLength;return n&&l&&(c[t]=r(i[t],i[0],s[t],o[0]),h+=c[t].addedLength),a.totalLength=h,a},getNewSegment:function(t,r,a,n,i,s,c){i<0?i=0:i>1&&(i=1);var h,p=o(i,c),m=o(s=s>1?1:s,c),d=t.length,u=1-p,f=1-m,g=u*u*u,y=p*u*u*3,E=p*p*u*3,A=p*p*p,v=u*u*f,I=p*u*f+u*p*f+u*u*m,x=p*p*f+u*p*m+p*u*m,C=p*p*m,k=u*f*f,S=p*f*f+u*m*f+u*f*m,w=p*m*f+u*m*m+p*f*m,b=p*m*m,B=f*f*f,D=m*f*f+f*m*f+f*f*m,P=m*m*f+f*m*m+m*f*m,M=m*m*m;for(h=0;h<d;h+=1)l[4*h]=e.round(1e3*(g*t[h]