presenter 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,17 +6,35 @@ This library is still in development and its API may change at any time.
6
6
 
7
7
  ## Getting Started
8
8
 
9
- ### Installing Presenter.js
9
+ ### Quick Start
10
10
 
11
- Install Presenter.js via `npm`.
11
+ The simplest way to get started with a Presenter.js presentation is via
12
+ `npm create presenter`.
12
13
 
14
+ ```bash
15
+ $ npm create presenter
13
16
  ```
17
+
18
+ Running `npm create presenter` will prompt you to enter a project name and will
19
+ then create a new presentation with Presenter.js, written in TypeScript and
20
+ built with Webpack.
21
+
22
+ After creating the new presentation, `cd` into the directory and run
23
+ `npm run serve` to run the presentation. Edit `src/index.ts` to make changes
24
+ to your presentation.
25
+
26
+ ### Installing Presenter.js Manually
27
+
28
+ Presenter.js can also be installed manually via `npm`.
29
+
30
+ ```bash
14
31
  $ npm install presenter
15
32
  ```
16
33
 
17
34
  ### Sample Usage
18
35
 
19
- Create a presentation by specifying a list of slides, where each slide may contain objects and animations.
36
+ Create a presentation by specifying a list of slides, where each slide may
37
+ contain objects and animations.
20
38
 
21
39
  ```javascript
22
40
  import { Presentation, Slide, Text } from "presenter";
@@ -0,0 +1 @@
1
+ export let Presenter: {};
package/dist/presenter.js CHANGED
@@ -1 +1 @@
1
- !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Presenter=n():t.Presenter=n()}(this,(()=>(()=>{"use strict";var t={d:(n,e)=>{for(var r in e)t.o(e,r)&&!t.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:e[r]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{Arrow:()=>St,BoundingBox:()=>e,Group:()=>Pt,Image:()=>At,Line:()=>vt,Paragraph:()=>It,Polygon:()=>wt,Presentation:()=>o,Rectangle:()=>Wt,Slide:()=>ht,SlideObject:()=>dt,Text:()=>Ft,VectorGraphic:()=>Rt,createSpacePreservingTextNode:()=>kt,generateTextNodes:()=>Tt,performAnimation:()=>lt,skipAnimation:()=>pt});var e=function(){function t(t,n,e){this.origin=t,this.width=n,this.height=e}return t.fromElement=function(n){var e=n.getBBox();return new t({x:e.x,y:e.y},e.width,e.height)},t}(),r=function(){return r=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},r.apply(this,arguments)},o=function(){function t(t,n,o,i){if(void 0===i&&(i={}),null===this.element)throw new Error("Presentation cannot be mounted to null element.");this.title=t,this.element=o,this.slides=n,this.options=r({width:3840,height:2160,backgroundColor:"#ffffff"},i),this.presentationState={currentSlide:0},this.boundingBox=new e({x:0,y:0},this.options.width,this.options.height),this.container=null,this.svg=null,this.shadow=null}return t.prototype.present=function(){var t=this;this.container=document.createElement("div"),this.container.style.width="100%",this.container.style.aspectRatio="".concat(this.options.width," / ").concat(this.options.height),this.container.style.position="relative",this.container.style.top="50%",this.container.style.transform="translateY(-50%)",this.container.style.marginLeft="auto",this.container.style.marginRight="auto",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.backgroundColor=this.options.backgroundColor,this.svg.style.cursor="none",this.setupKeyboardCommands(),this.shadow=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.shadow.style.visibility="hidden",[this.svg,this.shadow].forEach((function(n){n.setAttribute("width","100%"),n.setAttribute("viewBox","0 0 ".concat(t.options.width," ").concat(t.options.height)),n.style.position="absolute"})),this.isFullBodyPresentation()&&(document.title=this.title,document.documentElement.style.height="100%",document.body.style.height="100%",document.body.style.width="100%",document.body.style.margin="0",document.body.style.backgroundColor="#000000",window.matchMedia("(min-aspect-ratio: ".concat(this.options.width," / ").concat(this.options.height,")")).addEventListener("change",this.updateSVGContainerSize.bind(this)),this.updateSVGContainerSize()),this.container.appendChild(this.shadow),this.container.appendChild(this.svg),this.element.appendChild(this.container),this.presentationState.currentSlide=0;var n=this.slides[this.presentationState.currentSlide];void 0!==n&&n.render(this)},t.prototype.setupKeyboardCommands=function(){var t=this,n=this.isFullBodyPresentation()?document.body:this.svg;n.addEventListener("keyup",(function(n){"ArrowRight"===n.key||" "===n.key?t.next(!n.shiftKey):"ArrowLeft"===n.key&&t.previous(!n.shiftKey)})),n.addEventListener("mousemove",(function(n){t.svg.style.cursor="auto"}))},t.prototype.updateSVGContainerSize=function(){window.innerHeight/window.innerWidth>this.options.height/this.options.width?(this.container.style.width="100%",this.container.style.height="auto"):(this.container.style.width="auto",this.container.style.height="100%")},t.prototype.next=function(t){this.svg.style.cursor="none";var n=this.slides[this.presentationState.currentSlide];if(!(void 0===n||t&&n.nextAnimation(this))){this.presentationState.currentSlide++;var e=this.slides[this.presentationState.currentSlide];if(void 0===e)return;e.render(this)}},t.prototype.previous=function(t){this.svg.style.cursor="none";var n=this.slides[this.presentationState.currentSlide];if(void 0!==n){if(t&&n.animationIndex>0)n.render(this,n.animationIndex-1);else if(!t||0!==this.presentationState.currentSlide){this.presentationState.currentSlide>0&&this.presentationState.currentSlide--;var e=this.slides[this.presentationState.currentSlide];void 0!==e&&e.render(this,t?e.animations.length:0)}}else{this.presentationState.currentSlide=this.slides.length-1;var r=this.slides[this.presentationState.currentSlide];if(void 0===r)return;r.render(this,t?r.animations.length:0)}},t.prototype.isFullBodyPresentation=function(){return this.element===document.body},t.prototype.computeRenderedBoundingBox=function(t,n){if(void 0===n&&(n=null),null===n&&this.svg.contains(t))return e.fromElement(t);var r=t.cloneNode(!0);if(null!==n){r.innerHTML="";for(var o=0,i=n;o<i.length;o++){var a=i[o];r.appendChild(a.cloneNode(!0))}}this.shadow.appendChild(r);var s=e.fromElement(r);return this.shadow.removeChild(r),s},t}(),i={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},a={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},s=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],u={CSS:{},springs:{}};function c(t,n,e){return Math.min(Math.max(t,n),e)}function l(t,n){return t.indexOf(n)>-1}function p(t,n){return t.apply(null,n)}var h={arr:function(t){return Array.isArray(t)},obj:function(t){return l(Object.prototype.toString.call(t),"Object")},pth:function(t){return h.obj(t)&&t.hasOwnProperty("totalLength")},svg:function(t){return t instanceof SVGElement},inp:function(t){return t instanceof HTMLInputElement},dom:function(t){return t.nodeType||h.svg(t)},str:function(t){return"string"==typeof t},fnc:function(t){return"function"==typeof t},und:function(t){return void 0===t},nil:function(t){return h.und(t)||null===t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},hsl:function(t){return/^hsl/.test(t)},col:function(t){return h.hex(t)||h.rgb(t)||h.hsl(t)},key:function(t){return!i.hasOwnProperty(t)&&!a.hasOwnProperty(t)&&"targets"!==t&&"keyframes"!==t}};function f(t){var n=/\(([^)]+)\)/.exec(t);return n?n[1].split(",").map((function(t){return parseFloat(t)})):[]}function d(t,n){var e=f(t),r=c(h.und(e[0])?1:e[0],.1,100),o=c(h.und(e[1])?100:e[1],.1,100),i=c(h.und(e[2])?10:e[2],.1,100),a=c(h.und(e[3])?0:e[3],.1,100),s=Math.sqrt(o/r),l=i/(2*Math.sqrt(o*r)),p=l<1?s*Math.sqrt(1-l*l):0,d=l<1?(l*s-a)/p:-a+s;function y(t){var e=n?n*t/1e3:t;return e=l<1?Math.exp(-e*l*s)*(1*Math.cos(p*e)+d*Math.sin(p*e)):(1+d*e)*Math.exp(-e*s),0===t||1===t?t:1-e}return n?y:function(){var n=u.springs[t];if(n)return n;for(var e=1/6,r=0,o=0;;)if(1===y(r+=e)){if(++o>=16)break}else o=0;var i=r*e*1e3;return u.springs[t]=i,i}}function y(t){return void 0===t&&(t=10),function(n){return Math.ceil(c(n,1e-6,1)*t)*(1/t)}}var g,v,m=function(){var t=.1;function n(t,n){return 1-3*n+3*t}function e(t,n){return 3*n-6*t}function r(t){return 3*t}function o(t,o,i){return((n(o,i)*t+e(o,i))*t+r(o))*t}function i(t,o,i){return 3*n(o,i)*t*t+2*e(o,i)*t+r(o)}return function(n,e,r,a){if(0<=n&&n<=1&&0<=r&&r<=1){var s=new Float32Array(11);if(n!==e||r!==a)for(var u=0;u<11;++u)s[u]=o(u*t,n,r);return function(u){return n===e&&r===a||0===u||1===u?u:o(function(e){for(var a=0,u=1;10!==u&&s[u]<=e;++u)a+=t;--u;var c=a+(e-s[u])/(s[u+1]-s[u])*t,l=i(c,n,r);return l>=.001?function(t,n,e,r){for(var a=0;a<4;++a){var s=i(n,e,r);if(0===s)return n;n-=(o(n,e,r)-t)/s}return n}(e,c,n,r):0===l?c:function(t,n,e,r,i){var a,s,u=0;do{(a=o(s=n+(e-n)/2,r,i)-t)>0?e=s:n=s}while(Math.abs(a)>1e-7&&++u<10);return s}(e,a,a+t,n,r)}(u),e,a)}}}}(),b=(g={linear:function(){return function(t){return t}}},v={Sine:function(){return function(t){return 1-Math.cos(t*Math.PI/2)}},Expo:function(){return function(t){return t?Math.pow(2,10*t-10):0}},Circ:function(){return function(t){return 1-Math.sqrt(1-t*t)}},Back:function(){return function(t){return t*t*(3*t-2)}},Bounce:function(){return function(t){for(var n,e=4;t<((n=Math.pow(2,--e))-1)/11;);return 1/Math.pow(4,3-e)-7.5625*Math.pow((3*n-2)/22-t,2)}},Elastic:function(t,n){void 0===t&&(t=1),void 0===n&&(n=.5);var e=c(t,1,10),r=c(n,.1,2);return function(t){return 0===t||1===t?t:-e*Math.pow(2,10*(t-1))*Math.sin((t-1-r/(2*Math.PI)*Math.asin(1/e))*(2*Math.PI)/r)}}},["Quad","Cubic","Quart","Quint"].forEach((function(t,n){v[t]=function(){return function(t){return Math.pow(t,n+2)}}})),Object.keys(v).forEach((function(t){var n=v[t];g["easeIn"+t]=n,g["easeOut"+t]=function(t,e){return function(r){return 1-n(t,e)(1-r)}},g["easeInOut"+t]=function(t,e){return function(r){return r<.5?n(t,e)(2*r)/2:1-n(t,e)(-2*r+2)/2}},g["easeOutIn"+t]=function(t,e){return function(r){return r<.5?(1-n(t,e)(1-2*r))/2:(n(t,e)(2*r-1)+1)/2}}})),g);function w(t,n){if(h.fnc(t))return t;var e=t.split("(")[0],r=b[e],o=f(t);switch(e){case"spring":return d(t,n);case"cubicBezier":return p(m,o);case"steps":return p(y,o);default:return p(r,o)}}function x(t){try{return document.querySelectorAll(t)}catch(t){return}}function O(t,n){for(var e=t.length,r=arguments.length>=2?arguments[1]:void 0,o=[],i=0;i<e;i++)if(i in t){var a=t[i];n.call(r,a,i,t)&&o.push(a)}return o}function S(t){return t.reduce((function(t,n){return t.concat(h.arr(n)?S(n):n)}),[])}function _(t){return h.arr(t)?t:(h.str(t)&&(t=x(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function j(t,n){return t.some((function(t){return t===n}))}function P(t){var n={};for(var e in t)n[e]=t[e];return n}function C(t,n){var e=P(t);for(var r in t)e[r]=n.hasOwnProperty(r)?n[r]:t[r];return e}function M(t,n){var e=P(t);for(var r in n)e[r]=h.und(t[r])?n[r]:t[r];return e}function A(t){var n=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t);if(n)return n[1]}function E(t,n){return h.fnc(t)?t(n.target,n.id,n.total):t}function B(t,n){return t.getAttribute(n)}function I(t,n,e){if(j([e,"deg","rad","turn"],A(n)))return n;var r=u.CSS[n+e];if(!h.und(r))return r;var o=document.createElement(t.tagName),i=t.parentNode&&t.parentNode!==document?t.parentNode:document.body;i.appendChild(o),o.style.position="absolute",o.style.width=100+e;var a=100/o.offsetWidth;i.removeChild(o);var s=a*parseFloat(n);return u.CSS[n+e]=s,s}function k(t,n,e){if(n in t.style){var r=n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=t.style[n]||getComputedStyle(t).getPropertyValue(r)||"0";return e?I(t,o,e):o}}function T(t,n){return h.dom(t)&&!h.inp(t)&&(!h.nil(B(t,n))||h.svg(t)&&t[n])?"attribute":h.dom(t)&&j(s,n)?"transform":h.dom(t)&&"transform"!==n&&k(t,n)?"css":null!=t[n]?"object":void 0}function N(t){if(h.dom(t)){for(var n,e=t.style.transform||"",r=/(\w+)\(([^)]*)\)/g,o=new Map;n=r.exec(e);)o.set(n[1],n[2]);return o}}function D(t,n,e,r){switch(T(t,n)){case"transform":return function(t,n,e,r){var o=l(n,"scale")?1:0+function(t){return l(t,"translate")||"perspective"===t?"px":l(t,"rotate")||l(t,"skew")?"deg":void 0}(n),i=N(t).get(n)||o;return e&&(e.transforms.list.set(n,i),e.transforms.last=n),r?I(t,i,r):i}(t,n,r,e);case"css":return k(t,n,e);case"attribute":return B(t,n);default:return t[n]||0}}function F(t,n){var e=/^(\*=|\+=|-=)/.exec(t);if(!e)return t;var r=A(t)||0,o=parseFloat(n),i=parseFloat(t.replace(e[0],""));switch(e[0][0]){case"+":return o+i+r;case"-":return o-i+r;case"*":return o*i+r}}function L(t,n){if(h.col(t))return function(t){return h.rgb(t)?(e=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(n=t))?"rgba("+e[1]+",1)":n:h.hex(t)?function(t){var n=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,n,e,r){return n+n+e+e+r+r})),e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return"rgba("+parseInt(e[1],16)+","+parseInt(e[2],16)+","+parseInt(e[3],16)+",1)"}(t):h.hsl(t)?function(t){var n,e,r,o=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t),i=parseInt(o[1],10)/360,a=parseInt(o[2],10)/100,s=parseInt(o[3],10)/100,u=o[4]||1;function c(t,n,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(n-t)*e:e<.5?n:e<2/3?t+(n-t)*(2/3-e)*6:t}if(0==a)n=e=r=s;else{var l=s<.5?s*(1+a):s+a-s*a,p=2*s-l;n=c(p,l,i+1/3),e=c(p,l,i),r=c(p,l,i-1/3)}return"rgba("+255*n+","+255*e+","+255*r+","+u+")"}(t):void 0;var n,e}(t);if(/\s/g.test(t))return t;var e=A(t),r=e?t.substr(0,t.length-e.length):t;return n?r+n:r}function z(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}function W(t){for(var n,e=t.points,r=0,o=0;o<e.numberOfItems;o++){var i=e.getItem(o);o>0&&(r+=z(n,i)),n=i}return r}function H(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return function(t){return 2*Math.PI*B(t,"r")}(t);case"rect":return function(t){return 2*B(t,"width")+2*B(t,"height")}(t);case"line":return function(t){return z({x:B(t,"x1"),y:B(t,"y1")},{x:B(t,"x2"),y:B(t,"y2")})}(t);case"polyline":return W(t);case"polygon":return function(t){var n=t.points;return W(t)+z(n.getItem(n.numberOfItems-1),n.getItem(0))}(t)}}function q(t,n){var e=n||{},r=e.el||function(t){for(var n=t.parentNode;h.svg(n)&&h.svg(n.parentNode);)n=n.parentNode;return n}(t),o=r.getBoundingClientRect(),i=B(r,"viewBox"),a=o.width,s=o.height,u=e.viewBox||(i?i.split(" "):[0,0,a,s]);return{el:r,viewBox:u,x:u[0]/1,y:u[1]/1,w:a,h:s,vW:u[2],vH:u[3]}}function R(t,n,e){function r(e){void 0===e&&(e=0);var r=n+e>=1?n+e:0;return t.el.getPointAtLength(r)}var o=q(t.el,t.svg),i=r(),a=r(-1),s=r(1),u=e?1:o.w/o.vW,c=e?1:o.h/o.vH;switch(t.property){case"x":return(i.x-o.x)*u;case"y":return(i.y-o.y)*c;case"angle":return 180*Math.atan2(s.y-a.y,s.x-a.x)/Math.PI}}function V(t,n){var e=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,r=L(h.pth(t)?t.totalLength:t,n)+"";return{original:r,numbers:r.match(e)?r.match(e).map(Number):[0],strings:h.str(t)||n?r.split(e):[]}}function G(t){return O(t?S(h.arr(t)?t.map(_):_(t)):[],(function(t,n,e){return e.indexOf(t)===n}))}function $(t){var n=G(t);return n.map((function(t,e){return{target:t,id:e,total:n.length,transforms:{list:N(t)}}}))}function Y(t,n){var e=P(n);if(/^spring/.test(e.easing)&&(e.duration=d(e.easing)),h.arr(t)){var r=t.length;2!==r||h.obj(t[0])?h.fnc(n.duration)||(e.duration=n.duration/r):t={value:t}}var o=h.arr(t)?t:[t];return o.map((function(t,e){var r=h.obj(t)&&!h.pth(t)?t:{value:t};return h.und(r.delay)&&(r.delay=e?0:n.delay),h.und(r.endDelay)&&(r.endDelay=e===o.length-1?n.endDelay:0),r})).map((function(t){return M(t,e)}))}var K={css:function(t,n,e){return t.style[n]=e},attribute:function(t,n,e){return t.setAttribute(n,e)},object:function(t,n,e){return t[n]=e},transform:function(t,n,e,r,o){if(r.list.set(n,e),n===r.last||o){var i="";r.list.forEach((function(t,n){i+=n+"("+t+") "})),t.style.transform=i}}};function U(t,n){$(t).forEach((function(t){for(var e in n){var r=E(n[e],t),o=t.target,i=A(r),a=D(o,e,i,t),s=F(L(r,i||A(a)),a),u=T(o,e);K[u](o,e,s,t.transforms,!0)}}))}function X(t,n){return O(S(t.map((function(t){return n.map((function(n){return function(t,n){var e=T(t.target,n.name);if(e){var r=function(t,n){var e;return t.tweens.map((function(r){var o=function(t,n){var e={};for(var r in t){var o=E(t[r],n);h.arr(o)&&1===(o=o.map((function(t){return E(t,n)}))).length&&(o=o[0]),e[r]=o}return e.duration=parseFloat(e.duration),e.delay=parseFloat(e.delay),e}(r,n),i=o.value,a=h.arr(i)?i[1]:i,s=A(a),u=D(n.target,t.name,s,n),c=e?e.to.original:u,l=h.arr(i)?i[0]:c,p=A(l)||A(u),f=s||p;return h.und(a)&&(a=c),o.from=V(l,f),o.to=V(F(a,l),f),o.start=e?e.end:0,o.end=o.start+o.delay+o.duration+o.endDelay,o.easing=w(o.easing,o.duration),o.isPath=h.pth(i),o.isPathTargetInsideSVG=o.isPath&&h.svg(n.target),o.isColor=h.col(o.from.original),o.isColor&&(o.round=1),e=o,o}))}(n,t),o=r[r.length-1];return{type:e,property:n.name,animatable:t,tweens:r,duration:o.end,delay:r[0].delay,endDelay:o.endDelay}}}(t,n)}))}))),(function(t){return!h.und(t)}))}function Z(t,n){var e=t.length,r=function(t){return t.timelineOffset?t.timelineOffset:0},o={};return o.duration=e?Math.max.apply(Math,t.map((function(t){return r(t)+t.duration}))):n.duration,o.delay=e?Math.min.apply(Math,t.map((function(t){return r(t)+t.delay}))):n.delay,o.endDelay=e?o.duration-Math.max.apply(Math,t.map((function(t){return r(t)+t.duration-t.endDelay}))):n.endDelay,o}var Q=0,J=[],tt=function(){var t;function n(e){for(var r=J.length,o=0;o<r;){var i=J[o];i.paused?(J.splice(o,1),r--):(i.tick(e),o++)}t=o>0?requestAnimationFrame(n):void 0}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",(function(){et.suspendWhenDocumentHidden&&(nt()?t=cancelAnimationFrame(t):(J.forEach((function(t){return t._onDocumentVisibility()})),tt()))})),function(){t||nt()&&et.suspendWhenDocumentHidden||!(J.length>0)||(t=requestAnimationFrame(n))}}();function nt(){return!!document&&document.hidden}function et(t){void 0===t&&(t={});var n,e=0,r=0,o=0,s=0,u=null;function l(t){var n=window.Promise&&new Promise((function(t){return u=t}));return t.finished=n,n}var p=function(t){var n=C(i,t),e=C(a,t),r=function(t,n){var e=[],r=n.keyframes;for(var o in r&&(n=M(function(t){for(var n=O(S(t.map((function(t){return Object.keys(t)}))),(function(t){return h.key(t)})).reduce((function(t,n){return t.indexOf(n)<0&&t.push(n),t}),[]),e={},r=function(r){var o=n[r];e[o]=t.map((function(t){var n={};for(var e in t)h.key(e)?e==o&&(n.value=t[e]):n[e]=t[e];return n}))},o=0;o<n.length;o++)r(o);return e}(r),n)),n)h.key(o)&&e.push({name:o,tweens:Y(n[o],t)});return e}(e,t),o=$(t.targets),s=X(o,r),u=Z(s,e),c=Q;return Q++,M(n,{id:c,children:[],animatables:o,animations:s,duration:u.duration,delay:u.delay,endDelay:u.endDelay})}(t);function f(){var t=p.direction;"alternate"!==t&&(p.direction="normal"!==t?"normal":"reverse"),p.reversed=!p.reversed,n.forEach((function(t){return t.reversed=p.reversed}))}function d(t){return p.reversed?p.duration-t:t}function y(){e=0,r=d(p.currentTime)*(1/et.speed)}function g(t,n){n&&n.seek(t-n.timelineOffset)}function v(t){for(var n=0,e=p.animations,r=e.length;n<r;){var o=e[n],i=o.animatable,a=o.tweens,s=a.length-1,u=a[s];s&&(u=O(a,(function(n){return t<n.end}))[0]||u);for(var l=c(t-u.start-u.delay,0,u.duration)/u.duration,h=isNaN(l)?1:u.easing(l),f=u.to.strings,d=u.round,y=[],g=u.to.numbers.length,v=void 0,m=0;m<g;m++){var b=void 0,w=u.to.numbers[m],x=u.from.numbers[m]||0;b=u.isPath?R(u.value,h*w,u.isPathTargetInsideSVG):x+h*(w-x),d&&(u.isColor&&m>2||(b=Math.round(b*d)/d)),y.push(b)}var S=f.length;if(S){v=f[0];for(var _=0;_<S;_++){f[_];var j=f[_+1],P=y[_];isNaN(P)||(v+=j?P+j:P+" ")}}else v=y[0];K[o.type](i.target,o.property,v,i.transforms),o.currentValue=v,n++}}function m(t){p[t]&&!p.passThrough&&p[t](p)}function b(t){var i=p.duration,a=p.delay,h=i-p.endDelay,y=d(t);p.progress=c(y/i*100,0,100),p.reversePlayback=y<p.currentTime,n&&function(t){if(p.reversePlayback)for(var e=s;e--;)g(t,n[e]);else for(var r=0;r<s;r++)g(t,n[r])}(y),!p.began&&p.currentTime>0&&(p.began=!0,m("begin")),!p.loopBegan&&p.currentTime>0&&(p.loopBegan=!0,m("loopBegin")),y<=a&&0!==p.currentTime&&v(0),(y>=h&&p.currentTime!==i||!i)&&v(i),y>a&&y<h?(p.changeBegan||(p.changeBegan=!0,p.changeCompleted=!1,m("changeBegin")),m("change"),v(y)):p.changeBegan&&(p.changeCompleted=!0,p.changeBegan=!1,m("changeComplete")),p.currentTime=c(y,0,i),p.began&&m("update"),t>=i&&(r=0,p.remaining&&!0!==p.remaining&&p.remaining--,p.remaining?(e=o,m("loopComplete"),p.loopBegan=!1,"alternate"===p.direction&&f()):(p.paused=!0,p.completed||(p.completed=!0,m("loopComplete"),m("complete"),!p.passThrough&&"Promise"in window&&(u(),l(p)))))}return l(p),p.reset=function(){var t=p.direction;p.passThrough=!1,p.currentTime=0,p.progress=0,p.paused=!0,p.began=!1,p.loopBegan=!1,p.changeBegan=!1,p.completed=!1,p.changeCompleted=!1,p.reversePlayback=!1,p.reversed="reverse"===t,p.remaining=p.loop,n=p.children;for(var e=s=n.length;e--;)p.children[e].reset();(p.reversed&&!0!==p.loop||"alternate"===t&&1===p.loop)&&p.remaining++,v(p.reversed?p.duration:0)},p._onDocumentVisibility=y,p.set=function(t,n){return U(t,n),p},p.tick=function(t){o=t,e||(e=o),b((o+(r-e))*et.speed)},p.seek=function(t){b(d(t))},p.pause=function(){p.paused=!0,y()},p.play=function(){p.paused&&(p.completed&&p.reset(),p.paused=!1,J.push(p),y(),tt())},p.reverse=function(){f(),p.completed=!p.reversed,y()},p.restart=function(){p.reset(),p.play()},p.remove=function(t){ot(G(t),p)},p.reset(),p.autoplay&&p.play(),p}function rt(t,n){for(var e=n.length;e--;)j(t,n[e].animatable.target)&&n.splice(e,1)}function ot(t,n){var e=n.animations,r=n.children;rt(t,e);for(var o=r.length;o--;){var i=r[o],a=i.animations;rt(t,a),a.length||i.children.length||r.splice(o,1)}e.length||r.length||n.pause()}et.version="3.2.1",et.speed=1,et.suspendWhenDocumentHidden=!0,et.running=J,et.remove=function(t){for(var n=G(t),e=J.length;e--;)ot(n,J[e])},et.get=D,et.set=U,et.convertPx=I,et.path=function(t,n){var e=h.str(t)?x(t)[0]:t,r=n||100;return function(t){return{property:t,el:e,svg:q(e),totalLength:H(e)*(r/100)}}},et.setDashoffset=function(t){var n=H(t);return t.setAttribute("stroke-dasharray",n),n},et.stagger=function(t,n){void 0===n&&(n={});var e=n.direction||"normal",r=n.easing?w(n.easing):null,o=n.grid,i=n.axis,a=n.from||0,s="first"===a,u="center"===a,c="last"===a,l=h.arr(t),p=l?parseFloat(t[0]):parseFloat(t),f=l?parseFloat(t[1]):0,d=A(l?t[1]:t)||0,y=n.start||0+(l?p:0),g=[],v=0;return function(t,n,h){if(s&&(a=0),u&&(a=(h-1)/2),c&&(a=h-1),!g.length){for(var m=0;m<h;m++){if(o){var b=u?(o[0]-1)/2:a%o[0],w=u?(o[1]-1)/2:Math.floor(a/o[0]),x=b-m%o[0],O=w-Math.floor(m/o[0]),S=Math.sqrt(x*x+O*O);"x"===i&&(S=-x),"y"===i&&(S=-O),g.push(S)}else g.push(Math.abs(a-m));v=Math.max.apply(Math,g)}r&&(g=g.map((function(t){return r(t/v)*v}))),"reverse"===e&&(g=g.map((function(t){return i?t<0?-1*t:-t:Math.abs(v-t)})))}return y+(l?(f-p)/v:p)*(Math.round(100*g[n])/100)+d}},et.timeline=function(t){void 0===t&&(t={});var n=et(t);return n.duration=0,n.add=function(e,r){var o=J.indexOf(n),i=n.children;function s(t){t.passThrough=!0}o>-1&&J.splice(o,1);for(var u=0;u<i.length;u++)s(i[u]);var c=M(e,C(a,t));c.targets=c.targets||t.targets;var l=n.duration;c.autoplay=!1,c.direction=n.direction,c.timelineOffset=h.und(r)?l:F(r,l),s(n),n.seek(c.timelineOffset);var p=et(c);s(p),i.push(p);var f=Z(i,t);return n.delay=f.delay,n.endDelay=f.endDelay,n.duration=f.duration,n.seek(0),n.reset(),n.autoplay&&n.play(),n},n},et.easing=w,et.penner=b,et.random=function(t,n){return Math.floor(Math.random()*(n-t+1))+t};const it=et;var at,st=function(){return st=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},st.apply(this,arguments)},ut=function(t,n,e,r){return new(e||(e=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,s)}u((r=r.apply(t,n||[])).next())}))},ct=function(t,n){var e,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(e=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=n.call(t,i)}catch(t){s=[6,t],r=0}finally{e=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}},lt=function(t){return ut(void 0,void 0,void 0,(function(){var n,e,r,o,i,a,s;return ct(this,(function(u){switch(u.label){case 0:Array.isArray(t)||(t=[t]),n=function(t){var n,e,r;return ct(this,(function(o){switch(o.label){case 0:return void 0===t.delay?[3,2]:[4,new Promise((function(n){return setTimeout(n,t.delay)}))];case 1:o.sent(),o.label=2;case 2:if(!1===t.animate&&pt(t),void 0!==t.element&&(it(st(st(st({targets:t.element},null!==(i=t.attributes)&&void 0!==i?i:{}),null!==(a=t.styles)&&void 0!==a?a:{}),null!==(s=t.animationParams)&&void 0!==s?s:{})),t.children))for(t.element.innerHTML="",n=0,e=t.children;n<e.length;n++)r=e[n],t.element.appendChild(r);return[2]}}))},e=0,r=t,u.label=1;case 1:return e<r.length?(o=r[e],[5,n(o)]):[3,4];case 2:u.sent(),u.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))},pt=function(t){return ut(void 0,void 0,void 0,(function(){var n,e,r,o,i,a,s,u,c,l,p,h,f,d,y;return ct(this,(function(g){for(Array.isArray(t)||(t=[t]),n=0,e=t;n<e.length;n++)if(r=e[n],o=r.element){if(r.attributes)for(i=0,a=Object.entries(r.attributes);i<a.length;i++)s=a[i],p=s[0],h=s[1],o.setAttribute(p,h);if(r.styles)for(u=0,c=Object.entries(r.styles);u<c.length;u++)l=c[u],p=l[0],h=l[1],o.style[p]=h;if(r.children)for(o.innerHTML="",f=0,d=r.children;f<d.length;f++)y=d[f],o.appendChild(y)}return[2]}))}))},ht=function(){function t(t,n){void 0===n&&(n=[]),this.objects=t.filter((function(t){return null!==t})),this.animations=n,this.animationIndex=0,this.debugAnimation=null}return t.prototype.render=function(t,n){if(void 0===n&&(n=0),this.animationIndex=n,this.objects.forEach((function(n){n.generate(t)})),null===this.debugAnimation||t.svg.innerHTML)for(e=0;e<this.animationIndex;e++)(r=this.animations[e])&&r(pt);else{for(var e=0;e<=this.debugAnimation;e++){var r;(r=this.animations[e])&&r(pt)}this.animationIndex=this.debugAnimation+1}t.svg.innerHTML="",this.objects.forEach((function(n){t.svg.appendChild(n.element())}))},t.prototype.nextAnimation=function(t){var n=this.animations[this.animationIndex];return!!n&&(n(lt),this.animationIndex++,!0)},t.prototype.sleep=function(t){return n=this,e=void 0,o=function(){return function(t,n){var e,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(e=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=n.call(t,i)}catch(t){s=[6,t],r=0}finally{e=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}(this,(function(n){return[2,new Promise((function(n){return setTimeout(n,t)}))]}))},new((r=void 0)||(r=Promise))((function(t,i){function a(t){try{u(o.next(t))}catch(t){i(t)}}function s(t){try{u(o.throw(t))}catch(t){i(t)}}function u(n){var e;n.done?t(n.value):(e=n.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((o=o.apply(n,e||[])).next())}));var n,e,r,o},t}(),ft=function(){return ft=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},ft.apply(this,arguments)},dt=function(){function t(t){this.props=ft({position:{x:0,y:0},anchor:"topleft"},t),this.initialProps=ft({},this.props),this._element=null,this._presentation=null,this._children=[]}return t.prototype.tagName=function(){return"g"},t.prototype.attributes=function(){return{}},t.prototype.additionalAttributes=function(){return{}},t.prototype.styles=function(){var t=this.props.opacity;return ft({},void 0!==t?{opacity:t.toString()}:{})},t.prototype.children=function(){return[]},t.prototype.requiresChildrenUpdate=function(t){return!1},t.prototype.positionAttributes=function(t){if(null===this._presentation)throw new Error("Cannot compute object position attributes without presentation");var n=this.positionInPresentation(t.origin),r=n.x,o=n.y,i=this.anchorBoundingBox(new e({x:r,y:o},t.width,t.height));return{x:i.origin.x,y:i.origin.y}},t.prototype.generate=function(t){this.props=ft({},this.initialProps),this._presentation=t;for(var n=this.createElement(),e=0,r=Object.entries(this.attributes());e<r.length;e++){var o=r[e],i=o[0],a=o[1];n.setAttribute(i,a)}for(var s=0,u=Object.entries(this.styles());s<u.length;s++){var c=u[s],l=c[0];a=c[1],n.style.setProperty(l,a)}this._children=this.children();for(var p=0,h=this._children;p<h.length;p++){var f=h[p];n.appendChild(f)}this._element=n;for(var d=0,y=Object.entries(this.additionalAttributes());d<y.length;d++){var g=y[d];i=g[0],a=g[1],n.setAttribute(i,a)}return n},t.prototype.createElement=function(){return document.createElementNS("http://www.w3.org/2000/svg",this.tagName())},t.prototype.element=function(){if(null===this._element)throw new Error("Element not yet generated");return this._element},t.prototype.animation=function(t,n,e,r){var o=this;if(void 0===n&&(n={}),void 0===e&&(e=null),void 0===r&&(r=!0),null===this._presentation)throw new Error("Cannot animate object without presentation");var i=this.requiresChildrenUpdate(t);this.props=ft(ft({},this.props),t),i&&(this._children=this.children());var a=this.attributes(),s=this.styles(),u=this.additionalAttributes(),c=Object.fromEntries(Object.entries(a).filter((function(t){var n=t[0],e=t[1];return o._element.getAttribute(n)!==e}))),l=Object.fromEntries(Object.entries(s).filter((function(t){var n=t[0],e=t[1];return o._element.style.getPropertyValue(n)!==e}))),p=Object.fromEntries(Object.entries(u).filter((function(t){var n=t[0],e=t[1];return o._element.getAttribute(n)!==e})));return ft(ft(ft({animate:r,element:this.element(),attributes:ft(ft({},c),p),styles:l},null!==e?{delay:e}:{}),i?{children:this._children}:{}),{animationParams:ft(ft({duration:500,easing:"linear"},n),"cubic"===n.easing?{easing:"cubicBezier(0.42, 0, 0.58, 1)"}:{})})},t.prototype.update=function(t,n){return void 0===n&&(n=null),this.animation(t,{},n,!1)},t.prototype.animate=function(t,n){var e=this;return void 0===n&&(n={}),function(r){r(e.animation(t,n))}},t.prototype.set=function(t){var n=this;return function(e){e(n.update(t))}},t.prototype.move=function(t,n){return void 0===n&&(n={}),this.animate({position:t},n)},t.prototype.positionInPresentation=function(t){var n=this._presentation,e=t.x,r=t.y;return e<=1&&e>=-1&&(e*=n.boundingBox.width),r<=1&&r>=-1&&(r*=n.boundingBox.height),{x:e,y:r}},t.prototype.anchorBoundingBox=function(t){var n=this,r=function(){switch(n.props.anchor){case"topleft":case"top":case"topright":return t.origin.y;case"left":case"center":case"right":return t.origin.y-t.height/2;case"bottomleft":case"bottom":case"bottomright":return t.origin.y-t.height}}(),o=function(){switch(n.props.anchor){case"topleft":case"left":case"bottomleft":return t.origin.x;case"top":case"center":case"bottom":return t.origin.x-t.width/2;case"topright":case"right":case"bottomright":return t.origin.x-t.width}}();return new e({x:o,y:r},t.width,t.height)},t.prototype.computeRenderedBoundingBox=function(t,n){void 0===n&&(n=null);var r=this._presentation.computeRenderedBoundingBox(t,n);return new e({x:this.props.position.x,y:this.props.position.y},r.width,r.height)},t}(),yt=(at=function(t,n){return at=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},at(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}at(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}),gt=function(){return gt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},gt.apply(this,arguments)},vt=function(t){function n(n){return void 0===n&&(n={}),t.call(this,gt({start:{x:0,y:0},end:{x:100,y:100},color:"#000000",width:10},n))||this}return yt(n,t),n.prototype.tagName=function(){return"line"},n.prototype.attributes=function(){var n=this.props,e=n.color,r=n.width,o=this.positionInPresentation(this.props.start),i=this.positionInPresentation(this.props.end);return gt(gt({},t.prototype.attributes.call(this)),{x1:o.x.toString(),y1:o.y.toString(),x2:i.x.toString(),y2:i.y.toString(),stroke:e,"stroke-width":r.toString()})},n}(dt),mt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),bt=function(){return bt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},bt.apply(this,arguments)},wt=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,bt({points:n,fill:"#000000",borderWidth:0,borderColor:"#000000"},e))||this}return mt(n,t),n.prototype.tagName=function(){return"polygon"},n.prototype.attributes=function(){var n=this.props,e=n.points,r=n.fill,o=n.borderWidth,i=n.borderColor,a=e.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ");return bt(bt(bt({},t.prototype.attributes.call(this)),{points:a,fill:r}),o>0?{"stroke-width":o.toString(),stroke:i}:{})},n}(dt),xt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ot=function(){return Ot=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Ot.apply(this,arguments)},St=function(t){function n(n){void 0===n&&(n={});var e,r,o=this,i=null!==(e=n.width)&&void 0!==e?e:10,a=null!==(r=n.arrowSize)&&void 0!==r?r:4*i;return(o=t.call(this,Ot({start:{x:0,y:0},end:{x:100,y:100},color:"#000000",width:i,arrowSize:a},n))||this).line=null,o.arrowhead=null,o}return xt(n,t),n.prototype.tagName=function(){return"g"},n.prototype.calculateShapes=function(t){t.width;var n=t.arrowSize,e=this.positionInPresentation(t.start),r=this.positionInPresentation(t.end),o=Math.atan2(r.y-e.y,r.x-e.x);return{line:{start:e,end:{x:r.x-n/2*Math.cos(o),y:r.y-n/2*Math.sin(o)}},arrowhead:[{x:r.x-n*Math.cos(o-Math.PI/6),y:r.y-n*Math.sin(o-Math.PI/6)},r,{x:r.x-n*Math.cos(o+Math.PI/6),y:r.y-n*Math.sin(o+Math.PI/6)}]}},n.prototype.children=function(){var t=this.props,n=t.color,e=t.width,r=(t.arrowSize,this.positionInPresentation(this.props.start)),o=this.positionInPresentation(this.props.end),i=(Math.atan2(o.y-r.y,o.x-r.x),this.calculateShapes(this.props));return this.line=new vt({start:i.line.start,end:i.line.end,color:n,width:e}),this.line.generate(this._presentation),this.arrowhead=new wt(i.arrowhead,{fill:n,borderWidth:0,borderColor:n}),this.arrowhead.generate(this._presentation),[this.line.element(),this.arrowhead.element()]},n.prototype.animations=function(t,n){void 0===n&&(n={});var e=Ot(Ot({},this.props),t),r=this.calculateShapes(e);return[this.line.animation(Ot(Ot({start:r.line.start,end:r.line.end},t.color?{color:t.color}:{}),t.width?{width:t.width}:{}),n),this.arrowhead.animation(Ot({points:r.arrowhead},t.color?{fill:t.color}:{}),n)]},n}(dt),_t=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),jt=function(){return jt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},jt.apply(this,arguments)},Pt=function(t){function n(n,e,r){return void 0===e&&(e={}),void 0===r&&(r=null),t.call(this,jt({objects:n,position:{x:0,y:0},positioned:null===r?"position"in e:r},e))||this}return _t(n,t),n.prototype.tagName=function(){return"g"},n.prototype.attributes=function(){return jt({},t.prototype.attributes.call(this))},n.prototype.additionalAttributes=function(){if(!this.props.positioned){var t=this.positionInPresentation(this.props.position),n=t.x,r=t.y;return{transform:"translate(".concat(n,", ").concat(r,")")}}var o=this._presentation.computeRenderedBoundingBox(this._element),i=this.positionInPresentation(this.props.position),a=i.x,s=i.y,u=this.anchorBoundingBox(new e({x:a,y:s},o.width,o.height)),c=u.origin.x-o.origin.x,l=u.origin.y-o.origin.y;return{transform:"translate(".concat(c,", ").concat(l,")")}},n.prototype.children=function(){var t=this;return this.props.objects.map((function(n){return n.generate(t._presentation),n._element}))},n}(dt),Ct=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Mt=function(){return Mt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Mt.apply(this,arguments)},At=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,Mt({href:n,width:100,height:100},e))||this}return Ct(n,t),n.prototype.tagName=function(){return"image"},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.href,i=n.width,a=n.height,s=this.positionAttributes(new e(r,i,a)),u=s.x,c=s.y;return Mt(Mt({},t.prototype.attributes.call(this)),{href:o,width:i.toString(),height:a.toString(),x:u.toString(),y:c.toString()})},n}(dt),Et=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Bt=function(){return Bt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Bt.apply(this,arguments)},It=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,Bt({content:n,width:1e3,height:1e3,fontSize:100,fontFamily:"Arial",color:"#000000"},e))||this}return Et(n,t),n.prototype.tagName=function(){return"foreignObject"},n.prototype.attributes=function(){var n=this.props,e=n.position,r=n.width,o=n.height;return Bt(Bt({},t.prototype.attributes.call(this)),{x:e.x.toString(),y:e.y.toString(),width:r.toString(),height:o.toString()})},n.prototype.children=function(){for(var t=this.props.content,n=document.createElement("div"),e={"font-family":'"'.concat(this.props.fontFamily,'"'),"font-size":"".concat(this.props.fontSize,"px"),color:this.props.color},r=0,o=Object.entries(e);r<o.length;r++){var i=o[r],a=i[0],s=i[1];console.log([a,s]),void 0!==s&&n.style.setProperty(a,s.toString())}if("string"==typeof t)n.textContent=t;else for(var u=0,c=t;u<c.length;u++){var l=c[u],p=document.createElement("p");p.textContent=l,n.appendChild(p)}return[n]},n.prototype.additionalAttributes=function(){var n=this.computeRenderedBoundingBox(this.element(),this._children),e=this.positionAttributes(n),r=e.x,o=e.y;return Bt(Bt({},t.prototype.additionalAttributes.call(this)),{x:r.toString(),y:o.toString()})},n.prototype.requiresChildrenUpdate=function(t){return"content"in t&&t.content!==this.props.content},n}(dt);function kt(t){return document.createTextNode(t.replace(/\s/g," "))}function Tt(t,n,e){void 0===n&&(n="1em"),void 0===e&&(e="start");for(var r=[],o=0,i=0,a=t;i<a.length;i++){var s=a[i];o++;var u=document.createElementNS("http://www.w3.org/2000/svg","tspan");if(u.setAttribute("x","0"),u.setAttribute("text-anchor",e),o>1&&u.setAttribute("dy",n),0===s.length||1===s.length&&""===s[0])u.appendChild(kt(" ")),r.push(u);else if("string"!=typeof s){for(var c=0,l=s;c<l.length;c++){var p=l[c];if("string"==typeof p)u.appendChild(kt(p));else{var h=p[0],f=p[1],d=document.createElementNS("http://www.w3.org/2000/svg","tspan");d.textContent=h;for(var y={fill:f.color,dy:f.dy,"text-decoration":f.textDecoration},g=0,v=Object.entries(y);g<v.length;g++){var m=v[g],b=m[0];void 0!==(S=m[1])&&d.setAttribute(b,S.toString())}for(var w={"font-family":f.fontFamily?'"'.concat(f.fontFamily,'"'):void 0,"font-size":f.fontSize,"font-weight":f.fontWeight,"font-style":f.fontStyle},x=0,O=Object.entries(w);x<O.length;x++){var S,_=O[x];b=_[0],void 0!==(S=_[1])&&d.style.setProperty(b,S.toString())}u.appendChild(d)}}r.push(u)}else u.appendChild(kt(s)),r.push(u)}return r}var Nt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Dt=function(){return Dt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Dt.apply(this,arguments)},Ft=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,Dt({content:n,color:"#000000",fontSize:150,fontStyle:"normal",fontWeight:"normal",fontFamily:"Arial",dominantBaseline:"ideographic",textDecoration:"none",align:"left",lineSpacing:"1em"},e))||this}return Nt(n,t),n.prototype.isRichText=function(){return"string"!=typeof this.props.content},n.prototype.tagName=function(){return"text"},n.prototype.attributes=function(){var n=this.props,e=n.color,r=n.textDecoration;return Dt(Dt(Dt({},t.prototype.attributes.call(this)),"none"!==r?{"text-decoration":r}:{}),{fill:e})},n.prototype.additionalAttributes=function(){var n=this.computeRenderedBoundingBox(this.element(),this._children),e=this.positionAttributes(n),r=e.x,o=e.y;return Dt(Dt(Dt({},t.prototype.additionalAttributes.call(this)),this.isRichText()?{transform:"translate(".concat(r.toString()," ").concat(o.toString(),")"),y:"1em"}:{x:r.toString(),y:(o+n.height).toString()}),{"dominant-baseline":this.props.dominantBaseline})},n.prototype.styles=function(){var n=this.props,e=n.fontSize,r=n.fontFamily,o=n.fontStyle,i=n.fontWeight;return Dt(Dt(Dt(Dt({},t.prototype.styles.call(this)),"normal"!==o?{"font-style":o}:{}),"normal"!==i?{"font-weight":i.toString()}:{}),{"font-size":"".concat(e,"px"),"font-family":'"'.concat(r,'"')})},n.prototype.children=function(){var t=this.props.content;if("string"==typeof t)return[kt(t)];var n="left"===this.props.align?"start":"center"===this.props.align?"middle":"end";return Tt(t,this.props.lineSpacing,n)},n.prototype.requiresChildrenUpdate=function(t){return"content"in t&&t.content!==this.props.content},n}(dt),Lt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),zt=function(){return zt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},zt.apply(this,arguments)},Wt=function(t){function n(n){return void 0===n&&(n={}),t.call(this,zt({fill:"#000000",width:100,height:100,rounding:0,borderWidth:0,borderColor:"#000000"},n))||this}return Lt(n,t),n.prototype.tagName=function(){return"rect"},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.width,i=n.height,a=n.fill,s=n.rounding,u=n.borderWidth,c=n.borderColor,l=this.positionAttributes(new e(r,o,i)),p=l.x,h=l.y;return zt(zt(zt({},t.prototype.attributes.call(this)),{fill:a,width:o.toString(),height:i.toString(),rx:s.toString(),x:p.toString(),y:h.toString()}),u>0?{"stroke-width":u.toString(),stroke:c}:{})},n}(dt),Ht=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),qt=function(){return qt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},qt.apply(this,arguments)},Rt=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,qt({svg:n,width:100,height:100},e))||this}return Ht(n,t),n.prototype.tagName=function(){return"svg"},n.prototype.createElement=function(){var t=(new DOMParser).parseFromString(this.props.svg,"image/svg+xml").documentElement;return this.parsedChildren=Array.from(t.childNodes),t.innerHTML="",t},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.width,i=n.height,a=this.positionAttributes(new e(r,o,i)),s=a.x,u=a.y;return qt(qt({},t.prototype.attributes.call(this)),{width:o.toString(),height:i.toString(),x:s.toString(),y:u.toString()})},n.prototype.children=function(){return this.parsedChildren},n}(dt);return n})()));
1
+ !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Presenter=n():t.Presenter=n()}(this,(()=>(()=>{"use strict";var t={d:(n,e)=>{for(var r in e)t.o(e,r)&&!t.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:e[r]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{Arrow:()=>St,BoundingBox:()=>e,Group:()=>Pt,Image:()=>At,Line:()=>vt,Paragraph:()=>kt,Polygon:()=>wt,Presentation:()=>o,Rectangle:()=>zt,Slide:()=>ht,SlideObject:()=>dt,Text:()=>Dt,VectorGraphic:()=>qt,anime:()=>it,generateTextNodes:()=>It,performAnimation:()=>lt,skipAnimation:()=>pt});var e=function(){function t(t,n,e){this.origin=t,this.width=n,this.height=e}return t.fromElement=function(n){var e=n.getBBox();return new t({x:e.x,y:e.y},e.width,e.height)},t}(),r=function(){return r=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},r.apply(this,arguments)},o=function(){function t(t,n,o,i){if(void 0===i&&(i={}),null===this.element)throw new Error("Presentation cannot be mounted to null element.");this.title=t,this.element=o,this.slides=n,this.options=r({width:3840,height:2160,backgroundColor:"#ffffff"},i),this.presentationState={currentSlide:0},this.boundingBox=new e({x:0,y:0},this.options.width,this.options.height),this.container=null,this.svg=null,this.shadow=null}return t.prototype.present=function(){var t=this;this.container=document.createElement("div"),this.container.style.width="100%",this.container.style.aspectRatio="".concat(this.options.width," / ").concat(this.options.height),this.container.style.position="relative",this.container.style.top="50%",this.container.style.transform="translateY(-50%)",this.container.style.marginLeft="auto",this.container.style.marginRight="auto",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.backgroundColor=this.options.backgroundColor,this.svg.style.cursor="none",this.setupKeyboardCommands(),this.shadow=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.shadow.style.visibility="hidden",[this.svg,this.shadow].forEach((function(n){n.setAttribute("width","100%"),n.setAttribute("viewBox","0 0 ".concat(t.options.width," ").concat(t.options.height)),n.style.position="absolute"})),this.isFullBodyPresentation()&&(document.title=this.title,document.documentElement.style.height="100%",document.body.style.height="100%",document.body.style.width="100%",document.body.style.margin="0",document.body.style.backgroundColor="#000000",window.matchMedia("(min-aspect-ratio: ".concat(this.options.width," / ").concat(this.options.height,")")).addEventListener("change",this.updateSVGContainerSize.bind(this)),this.updateSVGContainerSize()),this.container.appendChild(this.shadow),this.container.appendChild(this.svg),this.element.appendChild(this.container),this.presentationState.currentSlide=0;var n=this.slides[this.presentationState.currentSlide];void 0!==n&&n.render(this)},t.prototype.setupKeyboardCommands=function(){var t=this,n=this.isFullBodyPresentation()?document.body:this.svg;n.addEventListener("keyup",(function(n){"ArrowRight"===n.key||" "===n.key?t.next(!n.shiftKey):"ArrowLeft"===n.key&&t.previous(!n.shiftKey)})),n.addEventListener("mousemove",(function(n){t.svg.style.cursor="auto"}))},t.prototype.updateSVGContainerSize=function(){window.innerHeight/window.innerWidth>this.options.height/this.options.width?(this.container.style.width="100%",this.container.style.height="auto"):(this.container.style.width="auto",this.container.style.height="100%")},t.prototype.next=function(t){this.svg.style.cursor="none";var n=this.slides[this.presentationState.currentSlide];if(!(void 0===n||t&&n.nextAnimation(this))){this.presentationState.currentSlide++;var e=this.slides[this.presentationState.currentSlide];if(void 0===e)return;e.render(this)}},t.prototype.previous=function(t){this.svg.style.cursor="none";var n=this.slides[this.presentationState.currentSlide];if(void 0!==n){if(t&&n.animationIndex>0)n.render(this,n.animationIndex-1);else if(!t||0!==this.presentationState.currentSlide){this.presentationState.currentSlide>0&&this.presentationState.currentSlide--;var e=this.slides[this.presentationState.currentSlide];void 0!==e&&e.render(this,t?e.animations.length:0)}}else{this.presentationState.currentSlide=this.slides.length-1;var r=this.slides[this.presentationState.currentSlide];if(void 0===r)return;r.render(this,t?r.animations.length:0)}},t.prototype.isFullBodyPresentation=function(){return this.element===document.body},t.prototype.computeRenderedBoundingBox=function(t,n){if(void 0===n&&(n=null),null===n&&this.svg.contains(t))return e.fromElement(t);var r=t.cloneNode(!0);if(null!==n){r.innerHTML="";for(var o=0,i=n;o<i.length;o++){var a=i[o];r.appendChild(a.cloneNode(!0))}}this.shadow.appendChild(r);var s=e.fromElement(r);return this.shadow.removeChild(r),s},t}(),i={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},a={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},s=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],u={CSS:{},springs:{}};function c(t,n,e){return Math.min(Math.max(t,n),e)}function l(t,n){return t.indexOf(n)>-1}function p(t,n){return t.apply(null,n)}var h={arr:function(t){return Array.isArray(t)},obj:function(t){return l(Object.prototype.toString.call(t),"Object")},pth:function(t){return h.obj(t)&&t.hasOwnProperty("totalLength")},svg:function(t){return t instanceof SVGElement},inp:function(t){return t instanceof HTMLInputElement},dom:function(t){return t.nodeType||h.svg(t)},str:function(t){return"string"==typeof t},fnc:function(t){return"function"==typeof t},und:function(t){return void 0===t},nil:function(t){return h.und(t)||null===t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},hsl:function(t){return/^hsl/.test(t)},col:function(t){return h.hex(t)||h.rgb(t)||h.hsl(t)},key:function(t){return!i.hasOwnProperty(t)&&!a.hasOwnProperty(t)&&"targets"!==t&&"keyframes"!==t}};function f(t){var n=/\(([^)]+)\)/.exec(t);return n?n[1].split(",").map((function(t){return parseFloat(t)})):[]}function d(t,n){var e=f(t),r=c(h.und(e[0])?1:e[0],.1,100),o=c(h.und(e[1])?100:e[1],.1,100),i=c(h.und(e[2])?10:e[2],.1,100),a=c(h.und(e[3])?0:e[3],.1,100),s=Math.sqrt(o/r),l=i/(2*Math.sqrt(o*r)),p=l<1?s*Math.sqrt(1-l*l):0,d=l<1?(l*s-a)/p:-a+s;function y(t){var e=n?n*t/1e3:t;return e=l<1?Math.exp(-e*l*s)*(1*Math.cos(p*e)+d*Math.sin(p*e)):(1+d*e)*Math.exp(-e*s),0===t||1===t?t:1-e}return n?y:function(){var n=u.springs[t];if(n)return n;for(var e=1/6,r=0,o=0;;)if(1===y(r+=e)){if(++o>=16)break}else o=0;var i=r*e*1e3;return u.springs[t]=i,i}}function y(t){return void 0===t&&(t=10),function(n){return Math.ceil(c(n,1e-6,1)*t)*(1/t)}}var g,v,m=function(){var t=.1;function n(t,n){return 1-3*n+3*t}function e(t,n){return 3*n-6*t}function r(t){return 3*t}function o(t,o,i){return((n(o,i)*t+e(o,i))*t+r(o))*t}function i(t,o,i){return 3*n(o,i)*t*t+2*e(o,i)*t+r(o)}return function(n,e,r,a){if(0<=n&&n<=1&&0<=r&&r<=1){var s=new Float32Array(11);if(n!==e||r!==a)for(var u=0;u<11;++u)s[u]=o(u*t,n,r);return function(u){return n===e&&r===a||0===u||1===u?u:o(function(e){for(var a=0,u=1;10!==u&&s[u]<=e;++u)a+=t;--u;var c=a+(e-s[u])/(s[u+1]-s[u])*t,l=i(c,n,r);return l>=.001?function(t,n,e,r){for(var a=0;a<4;++a){var s=i(n,e,r);if(0===s)return n;n-=(o(n,e,r)-t)/s}return n}(e,c,n,r):0===l?c:function(t,n,e,r,i){var a,s,u=0;do{(a=o(s=n+(e-n)/2,r,i)-t)>0?e=s:n=s}while(Math.abs(a)>1e-7&&++u<10);return s}(e,a,a+t,n,r)}(u),e,a)}}}}(),b=(g={linear:function(){return function(t){return t}}},v={Sine:function(){return function(t){return 1-Math.cos(t*Math.PI/2)}},Expo:function(){return function(t){return t?Math.pow(2,10*t-10):0}},Circ:function(){return function(t){return 1-Math.sqrt(1-t*t)}},Back:function(){return function(t){return t*t*(3*t-2)}},Bounce:function(){return function(t){for(var n,e=4;t<((n=Math.pow(2,--e))-1)/11;);return 1/Math.pow(4,3-e)-7.5625*Math.pow((3*n-2)/22-t,2)}},Elastic:function(t,n){void 0===t&&(t=1),void 0===n&&(n=.5);var e=c(t,1,10),r=c(n,.1,2);return function(t){return 0===t||1===t?t:-e*Math.pow(2,10*(t-1))*Math.sin((t-1-r/(2*Math.PI)*Math.asin(1/e))*(2*Math.PI)/r)}}},["Quad","Cubic","Quart","Quint"].forEach((function(t,n){v[t]=function(){return function(t){return Math.pow(t,n+2)}}})),Object.keys(v).forEach((function(t){var n=v[t];g["easeIn"+t]=n,g["easeOut"+t]=function(t,e){return function(r){return 1-n(t,e)(1-r)}},g["easeInOut"+t]=function(t,e){return function(r){return r<.5?n(t,e)(2*r)/2:1-n(t,e)(-2*r+2)/2}},g["easeOutIn"+t]=function(t,e){return function(r){return r<.5?(1-n(t,e)(1-2*r))/2:(n(t,e)(2*r-1)+1)/2}}})),g);function w(t,n){if(h.fnc(t))return t;var e=t.split("(")[0],r=b[e],o=f(t);switch(e){case"spring":return d(t,n);case"cubicBezier":return p(m,o);case"steps":return p(y,o);default:return p(r,o)}}function x(t){try{return document.querySelectorAll(t)}catch(t){return}}function O(t,n){for(var e=t.length,r=arguments.length>=2?arguments[1]:void 0,o=[],i=0;i<e;i++)if(i in t){var a=t[i];n.call(r,a,i,t)&&o.push(a)}return o}function S(t){return t.reduce((function(t,n){return t.concat(h.arr(n)?S(n):n)}),[])}function _(t){return h.arr(t)?t:(h.str(t)&&(t=x(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function j(t,n){return t.some((function(t){return t===n}))}function P(t){var n={};for(var e in t)n[e]=t[e];return n}function C(t,n){var e=P(t);for(var r in t)e[r]=n.hasOwnProperty(r)?n[r]:t[r];return e}function M(t,n){var e=P(t);for(var r in n)e[r]=h.und(t[r])?n[r]:t[r];return e}function A(t){var n=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t);if(n)return n[1]}function B(t,n){return h.fnc(t)?t(n.target,n.id,n.total):t}function E(t,n){return t.getAttribute(n)}function k(t,n,e){if(j([e,"deg","rad","turn"],A(n)))return n;var r=u.CSS[n+e];if(!h.und(r))return r;var o=document.createElement(t.tagName),i=t.parentNode&&t.parentNode!==document?t.parentNode:document.body;i.appendChild(o),o.style.position="absolute",o.style.width=100+e;var a=100/o.offsetWidth;i.removeChild(o);var s=a*parseFloat(n);return u.CSS[n+e]=s,s}function I(t,n,e){if(n in t.style){var r=n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=t.style[n]||getComputedStyle(t).getPropertyValue(r)||"0";return e?k(t,o,e):o}}function T(t,n){return h.dom(t)&&!h.inp(t)&&(!h.nil(E(t,n))||h.svg(t)&&t[n])?"attribute":h.dom(t)&&j(s,n)?"transform":h.dom(t)&&"transform"!==n&&I(t,n)?"css":null!=t[n]?"object":void 0}function N(t){if(h.dom(t)){for(var n,e=t.style.transform||"",r=/(\w+)\(([^)]*)\)/g,o=new Map;n=r.exec(e);)o.set(n[1],n[2]);return o}}function D(t,n,e,r){switch(T(t,n)){case"transform":return function(t,n,e,r){var o=l(n,"scale")?1:0+function(t){return l(t,"translate")||"perspective"===t?"px":l(t,"rotate")||l(t,"skew")?"deg":void 0}(n),i=N(t).get(n)||o;return e&&(e.transforms.list.set(n,i),e.transforms.last=n),r?k(t,i,r):i}(t,n,r,e);case"css":return I(t,n,e);case"attribute":return E(t,n);default:return t[n]||0}}function F(t,n){var e=/^(\*=|\+=|-=)/.exec(t);if(!e)return t;var r=A(t)||0,o=parseFloat(n),i=parseFloat(t.replace(e[0],""));switch(e[0][0]){case"+":return o+i+r;case"-":return o-i+r;case"*":return o*i+r}}function L(t,n){if(h.col(t))return function(t){return h.rgb(t)?(e=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(n=t))?"rgba("+e[1]+",1)":n:h.hex(t)?function(t){var n=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,n,e,r){return n+n+e+e+r+r})),e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return"rgba("+parseInt(e[1],16)+","+parseInt(e[2],16)+","+parseInt(e[3],16)+",1)"}(t):h.hsl(t)?function(t){var n,e,r,o=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t),i=parseInt(o[1],10)/360,a=parseInt(o[2],10)/100,s=parseInt(o[3],10)/100,u=o[4]||1;function c(t,n,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(n-t)*e:e<.5?n:e<2/3?t+(n-t)*(2/3-e)*6:t}if(0==a)n=e=r=s;else{var l=s<.5?s*(1+a):s+a-s*a,p=2*s-l;n=c(p,l,i+1/3),e=c(p,l,i),r=c(p,l,i-1/3)}return"rgba("+255*n+","+255*e+","+255*r+","+u+")"}(t):void 0;var n,e}(t);if(/\s/g.test(t))return t;var e=A(t),r=e?t.substr(0,t.length-e.length):t;return n?r+n:r}function z(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}function W(t){for(var n,e=t.points,r=0,o=0;o<e.numberOfItems;o++){var i=e.getItem(o);o>0&&(r+=z(n,i)),n=i}return r}function H(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return function(t){return 2*Math.PI*E(t,"r")}(t);case"rect":return function(t){return 2*E(t,"width")+2*E(t,"height")}(t);case"line":return function(t){return z({x:E(t,"x1"),y:E(t,"y1")},{x:E(t,"x2"),y:E(t,"y2")})}(t);case"polyline":return W(t);case"polygon":return function(t){var n=t.points;return W(t)+z(n.getItem(n.numberOfItems-1),n.getItem(0))}(t)}}function q(t,n){var e=n||{},r=e.el||function(t){for(var n=t.parentNode;h.svg(n)&&h.svg(n.parentNode);)n=n.parentNode;return n}(t),o=r.getBoundingClientRect(),i=E(r,"viewBox"),a=o.width,s=o.height,u=e.viewBox||(i?i.split(" "):[0,0,a,s]);return{el:r,viewBox:u,x:u[0]/1,y:u[1]/1,w:a,h:s,vW:u[2],vH:u[3]}}function R(t,n,e){function r(e){void 0===e&&(e=0);var r=n+e>=1?n+e:0;return t.el.getPointAtLength(r)}var o=q(t.el,t.svg),i=r(),a=r(-1),s=r(1),u=e?1:o.w/o.vW,c=e?1:o.h/o.vH;switch(t.property){case"x":return(i.x-o.x)*u;case"y":return(i.y-o.y)*c;case"angle":return 180*Math.atan2(s.y-a.y,s.x-a.x)/Math.PI}}function V(t,n){var e=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,r=L(h.pth(t)?t.totalLength:t,n)+"";return{original:r,numbers:r.match(e)?r.match(e).map(Number):[0],strings:h.str(t)||n?r.split(e):[]}}function G(t){return O(t?S(h.arr(t)?t.map(_):_(t)):[],(function(t,n,e){return e.indexOf(t)===n}))}function $(t){var n=G(t);return n.map((function(t,e){return{target:t,id:e,total:n.length,transforms:{list:N(t)}}}))}function K(t,n){var e=P(n);if(/^spring/.test(e.easing)&&(e.duration=d(e.easing)),h.arr(t)){var r=t.length;2!==r||h.obj(t[0])?h.fnc(n.duration)||(e.duration=n.duration/r):t={value:t}}var o=h.arr(t)?t:[t];return o.map((function(t,e){var r=h.obj(t)&&!h.pth(t)?t:{value:t};return h.und(r.delay)&&(r.delay=e?0:n.delay),h.und(r.endDelay)&&(r.endDelay=e===o.length-1?n.endDelay:0),r})).map((function(t){return M(t,e)}))}var Y={css:function(t,n,e){return t.style[n]=e},attribute:function(t,n,e){return t.setAttribute(n,e)},object:function(t,n,e){return t[n]=e},transform:function(t,n,e,r,o){if(r.list.set(n,e),n===r.last||o){var i="";r.list.forEach((function(t,n){i+=n+"("+t+") "})),t.style.transform=i}}};function U(t,n){$(t).forEach((function(t){for(var e in n){var r=B(n[e],t),o=t.target,i=A(r),a=D(o,e,i,t),s=F(L(r,i||A(a)),a),u=T(o,e);Y[u](o,e,s,t.transforms,!0)}}))}function X(t,n){return O(S(t.map((function(t){return n.map((function(n){return function(t,n){var e=T(t.target,n.name);if(e){var r=function(t,n){var e;return t.tweens.map((function(r){var o=function(t,n){var e={};for(var r in t){var o=B(t[r],n);h.arr(o)&&1===(o=o.map((function(t){return B(t,n)}))).length&&(o=o[0]),e[r]=o}return e.duration=parseFloat(e.duration),e.delay=parseFloat(e.delay),e}(r,n),i=o.value,a=h.arr(i)?i[1]:i,s=A(a),u=D(n.target,t.name,s,n),c=e?e.to.original:u,l=h.arr(i)?i[0]:c,p=A(l)||A(u),f=s||p;return h.und(a)&&(a=c),o.from=V(l,f),o.to=V(F(a,l),f),o.start=e?e.end:0,o.end=o.start+o.delay+o.duration+o.endDelay,o.easing=w(o.easing,o.duration),o.isPath=h.pth(i),o.isPathTargetInsideSVG=o.isPath&&h.svg(n.target),o.isColor=h.col(o.from.original),o.isColor&&(o.round=1),e=o,o}))}(n,t),o=r[r.length-1];return{type:e,property:n.name,animatable:t,tweens:r,duration:o.end,delay:r[0].delay,endDelay:o.endDelay}}}(t,n)}))}))),(function(t){return!h.und(t)}))}function Z(t,n){var e=t.length,r=function(t){return t.timelineOffset?t.timelineOffset:0},o={};return o.duration=e?Math.max.apply(Math,t.map((function(t){return r(t)+t.duration}))):n.duration,o.delay=e?Math.min.apply(Math,t.map((function(t){return r(t)+t.delay}))):n.delay,o.endDelay=e?o.duration-Math.max.apply(Math,t.map((function(t){return r(t)+t.duration-t.endDelay}))):n.endDelay,o}var Q=0,J=[],tt=function(){var t;function n(e){for(var r=J.length,o=0;o<r;){var i=J[o];i.paused?(J.splice(o,1),r--):(i.tick(e),o++)}t=o>0?requestAnimationFrame(n):void 0}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",(function(){et.suspendWhenDocumentHidden&&(nt()?t=cancelAnimationFrame(t):(J.forEach((function(t){return t._onDocumentVisibility()})),tt()))})),function(){t||nt()&&et.suspendWhenDocumentHidden||!(J.length>0)||(t=requestAnimationFrame(n))}}();function nt(){return!!document&&document.hidden}function et(t){void 0===t&&(t={});var n,e=0,r=0,o=0,s=0,u=null;function l(t){var n=window.Promise&&new Promise((function(t){return u=t}));return t.finished=n,n}var p=function(t){var n=C(i,t),e=C(a,t),r=function(t,n){var e=[],r=n.keyframes;for(var o in r&&(n=M(function(t){for(var n=O(S(t.map((function(t){return Object.keys(t)}))),(function(t){return h.key(t)})).reduce((function(t,n){return t.indexOf(n)<0&&t.push(n),t}),[]),e={},r=function(r){var o=n[r];e[o]=t.map((function(t){var n={};for(var e in t)h.key(e)?e==o&&(n.value=t[e]):n[e]=t[e];return n}))},o=0;o<n.length;o++)r(o);return e}(r),n)),n)h.key(o)&&e.push({name:o,tweens:K(n[o],t)});return e}(e,t),o=$(t.targets),s=X(o,r),u=Z(s,e),c=Q;return Q++,M(n,{id:c,children:[],animatables:o,animations:s,duration:u.duration,delay:u.delay,endDelay:u.endDelay})}(t);function f(){var t=p.direction;"alternate"!==t&&(p.direction="normal"!==t?"normal":"reverse"),p.reversed=!p.reversed,n.forEach((function(t){return t.reversed=p.reversed}))}function d(t){return p.reversed?p.duration-t:t}function y(){e=0,r=d(p.currentTime)*(1/et.speed)}function g(t,n){n&&n.seek(t-n.timelineOffset)}function v(t){for(var n=0,e=p.animations,r=e.length;n<r;){var o=e[n],i=o.animatable,a=o.tweens,s=a.length-1,u=a[s];s&&(u=O(a,(function(n){return t<n.end}))[0]||u);for(var l=c(t-u.start-u.delay,0,u.duration)/u.duration,h=isNaN(l)?1:u.easing(l),f=u.to.strings,d=u.round,y=[],g=u.to.numbers.length,v=void 0,m=0;m<g;m++){var b=void 0,w=u.to.numbers[m],x=u.from.numbers[m]||0;b=u.isPath?R(u.value,h*w,u.isPathTargetInsideSVG):x+h*(w-x),d&&(u.isColor&&m>2||(b=Math.round(b*d)/d)),y.push(b)}var S=f.length;if(S){v=f[0];for(var _=0;_<S;_++){f[_];var j=f[_+1],P=y[_];isNaN(P)||(v+=j?P+j:P+" ")}}else v=y[0];Y[o.type](i.target,o.property,v,i.transforms),o.currentValue=v,n++}}function m(t){p[t]&&!p.passThrough&&p[t](p)}function b(t){var i=p.duration,a=p.delay,h=i-p.endDelay,y=d(t);p.progress=c(y/i*100,0,100),p.reversePlayback=y<p.currentTime,n&&function(t){if(p.reversePlayback)for(var e=s;e--;)g(t,n[e]);else for(var r=0;r<s;r++)g(t,n[r])}(y),!p.began&&p.currentTime>0&&(p.began=!0,m("begin")),!p.loopBegan&&p.currentTime>0&&(p.loopBegan=!0,m("loopBegin")),y<=a&&0!==p.currentTime&&v(0),(y>=h&&p.currentTime!==i||!i)&&v(i),y>a&&y<h?(p.changeBegan||(p.changeBegan=!0,p.changeCompleted=!1,m("changeBegin")),m("change"),v(y)):p.changeBegan&&(p.changeCompleted=!0,p.changeBegan=!1,m("changeComplete")),p.currentTime=c(y,0,i),p.began&&m("update"),t>=i&&(r=0,p.remaining&&!0!==p.remaining&&p.remaining--,p.remaining?(e=o,m("loopComplete"),p.loopBegan=!1,"alternate"===p.direction&&f()):(p.paused=!0,p.completed||(p.completed=!0,m("loopComplete"),m("complete"),!p.passThrough&&"Promise"in window&&(u(),l(p)))))}return l(p),p.reset=function(){var t=p.direction;p.passThrough=!1,p.currentTime=0,p.progress=0,p.paused=!0,p.began=!1,p.loopBegan=!1,p.changeBegan=!1,p.completed=!1,p.changeCompleted=!1,p.reversePlayback=!1,p.reversed="reverse"===t,p.remaining=p.loop,n=p.children;for(var e=s=n.length;e--;)p.children[e].reset();(p.reversed&&!0!==p.loop||"alternate"===t&&1===p.loop)&&p.remaining++,v(p.reversed?p.duration:0)},p._onDocumentVisibility=y,p.set=function(t,n){return U(t,n),p},p.tick=function(t){o=t,e||(e=o),b((o+(r-e))*et.speed)},p.seek=function(t){b(d(t))},p.pause=function(){p.paused=!0,y()},p.play=function(){p.paused&&(p.completed&&p.reset(),p.paused=!1,J.push(p),y(),tt())},p.reverse=function(){f(),p.completed=!p.reversed,y()},p.restart=function(){p.reset(),p.play()},p.remove=function(t){ot(G(t),p)},p.reset(),p.autoplay&&p.play(),p}function rt(t,n){for(var e=n.length;e--;)j(t,n[e].animatable.target)&&n.splice(e,1)}function ot(t,n){var e=n.animations,r=n.children;rt(t,e);for(var o=r.length;o--;){var i=r[o],a=i.animations;rt(t,a),a.length||i.children.length||r.splice(o,1)}e.length||r.length||n.pause()}et.version="3.2.1",et.speed=1,et.suspendWhenDocumentHidden=!0,et.running=J,et.remove=function(t){for(var n=G(t),e=J.length;e--;)ot(n,J[e])},et.get=D,et.set=U,et.convertPx=k,et.path=function(t,n){var e=h.str(t)?x(t)[0]:t,r=n||100;return function(t){return{property:t,el:e,svg:q(e),totalLength:H(e)*(r/100)}}},et.setDashoffset=function(t){var n=H(t);return t.setAttribute("stroke-dasharray",n),n},et.stagger=function(t,n){void 0===n&&(n={});var e=n.direction||"normal",r=n.easing?w(n.easing):null,o=n.grid,i=n.axis,a=n.from||0,s="first"===a,u="center"===a,c="last"===a,l=h.arr(t),p=l?parseFloat(t[0]):parseFloat(t),f=l?parseFloat(t[1]):0,d=A(l?t[1]:t)||0,y=n.start||0+(l?p:0),g=[],v=0;return function(t,n,h){if(s&&(a=0),u&&(a=(h-1)/2),c&&(a=h-1),!g.length){for(var m=0;m<h;m++){if(o){var b=u?(o[0]-1)/2:a%o[0],w=u?(o[1]-1)/2:Math.floor(a/o[0]),x=b-m%o[0],O=w-Math.floor(m/o[0]),S=Math.sqrt(x*x+O*O);"x"===i&&(S=-x),"y"===i&&(S=-O),g.push(S)}else g.push(Math.abs(a-m));v=Math.max.apply(Math,g)}r&&(g=g.map((function(t){return r(t/v)*v}))),"reverse"===e&&(g=g.map((function(t){return i?t<0?-1*t:-t:Math.abs(v-t)})))}return y+(l?(f-p)/v:p)*(Math.round(100*g[n])/100)+d}},et.timeline=function(t){void 0===t&&(t={});var n=et(t);return n.duration=0,n.add=function(e,r){var o=J.indexOf(n),i=n.children;function s(t){t.passThrough=!0}o>-1&&J.splice(o,1);for(var u=0;u<i.length;u++)s(i[u]);var c=M(e,C(a,t));c.targets=c.targets||t.targets;var l=n.duration;c.autoplay=!1,c.direction=n.direction,c.timelineOffset=h.und(r)?l:F(r,l),s(n),n.seek(c.timelineOffset);var p=et(c);s(p),i.push(p);var f=Z(i,t);return n.delay=f.delay,n.endDelay=f.endDelay,n.duration=f.duration,n.seek(0),n.reset(),n.autoplay&&n.play(),n},n},et.easing=w,et.penner=b,et.random=function(t,n){return Math.floor(Math.random()*(n-t+1))+t};const it=et;var at,st=function(){return st=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},st.apply(this,arguments)},ut=function(t,n,e,r){return new(e||(e=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,s)}u((r=r.apply(t,n||[])).next())}))},ct=function(t,n){var e,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(e=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=n.call(t,i)}catch(t){s=[6,t],r=0}finally{e=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}},lt=function(t){return ut(void 0,void 0,void 0,(function(){var n,e,r,o,i,a,s;return ct(this,(function(u){switch(u.label){case 0:Array.isArray(t)||(t=[t]),n=function(t){var n,e,r;return ct(this,(function(o){switch(o.label){case 0:return void 0===t.delay?[3,2]:[4,new Promise((function(n){return setTimeout(n,t.delay)}))];case 1:o.sent(),o.label=2;case 2:if(!1===t.animate&&pt(t),void 0!==t.element&&(it(st(st(st({targets:t.element},null!==(i=t.attributes)&&void 0!==i?i:{}),null!==(a=t.styles)&&void 0!==a?a:{}),null!==(s=t.animationParams)&&void 0!==s?s:{})),t.children))for(t.element.innerHTML="",n=0,e=t.children;n<e.length;n++)r=e[n],t.element.appendChild(r);return[2]}}))},e=0,r=t,u.label=1;case 1:return e<r.length?(o=r[e],[5,n(o)]):[3,4];case 2:u.sent(),u.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))},pt=function(t){return ut(void 0,void 0,void 0,(function(){var n,e,r,o,i,a,s,u,c,l,p,h,f,d,y;return ct(this,(function(g){for(Array.isArray(t)||(t=[t]),n=0,e=t;n<e.length;n++)if(r=e[n],o=r.element){if(r.attributes)for(i=0,a=Object.entries(r.attributes);i<a.length;i++)s=a[i],p=s[0],h=s[1],o.setAttribute(p,h);if(r.styles)for(u=0,c=Object.entries(r.styles);u<c.length;u++)l=c[u],p=l[0],h=l[1],o.style[p]=h;if(r.children)for(o.innerHTML="",f=0,d=r.children;f<d.length;f++)y=d[f],o.appendChild(y)}return[2]}))}))},ht=function(){function t(t,n){void 0===n&&(n=[]),this.objects=t.filter((function(t){return null!==t})),this.animations=n,this.animationIndex=0,this.debugAnimation=null,this.keyBuilds=null}return t.prototype.render=function(t,n){if(void 0===n&&(n=0),this.animationIndex=n,this.objects.forEach((function(n){n.generate(t)})),null===this.debugAnimation||t.svg.innerHTML)for(e=0;e<this.animationIndex;e++)(r=this.animations[e])&&r(pt);else{for(var e=0;e<=this.debugAnimation;e++){var r;(r=this.animations[e])&&r(pt)}this.animationIndex=this.debugAnimation+1}t.svg.innerHTML="",this.objects.forEach((function(n){t.svg.appendChild(n.element())}))},t.prototype.nextAnimation=function(t){var n=this.animations[this.animationIndex];return!!n&&(n(lt),this.animationIndex++,!0)},t.prototype.getKeyBuilds=function(){var t=this;return"first"===this.keyBuilds?[0]:"last"===this.keyBuilds?[this.animations.length]:"all"===this.keyBuilds?Array.from({length:this.animations.length+1},(function(t,n){return n})):"none"===this.keyBuilds?[]:Array.isArray(this.keyBuilds)?this.keyBuilds.filter((function(n){return n>=0&&n<=t.animations.length})):[0]},t}(),ft=function(){return ft=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},ft.apply(this,arguments)},dt=function(){function t(t){this.props=ft({position:{x:0,y:0},anchor:"topleft"},t),this.initialProps=ft({},this.props),this._element=null,this._presentation=null,this._children=[]}return t.prototype.tagName=function(){return"g"},t.prototype.attributes=function(){return{}},t.prototype.additionalAttributes=function(){return{}},t.prototype.styles=function(){var t=this.props.opacity;return ft({},void 0!==t?{opacity:t.toString()}:{})},t.prototype.children=function(){return[]},t.prototype.requiresChildrenUpdate=function(t){return!1},t.prototype.positionAttributes=function(t){if(null===this._presentation)throw new Error("Cannot compute object position attributes without presentation");var n=this.positionInPresentation(t.origin),r=n.x,o=n.y,i=this.anchorBoundingBox(new e({x:r,y:o},t.width,t.height));return{x:i.origin.x,y:i.origin.y}},t.prototype.generate=function(t){this.props=ft({},this.initialProps),this._presentation=t;for(var n=this.createElement(),e=0,r=Object.entries(this.attributes());e<r.length;e++){var o=r[e],i=o[0],a=o[1];n.setAttribute(i,a)}for(var s=0,u=Object.entries(this.styles());s<u.length;s++){var c=u[s],l=c[0];a=c[1],n.style.setProperty(l,a)}this._children=this.children();for(var p=0,h=this._children;p<h.length;p++){var f=h[p];n.appendChild(f)}this._element=n;for(var d=0,y=Object.entries(this.additionalAttributes());d<y.length;d++){var g=y[d];i=g[0],a=g[1],n.setAttribute(i,a)}return n},t.prototype.createElement=function(){return document.createElementNS("http://www.w3.org/2000/svg",this.tagName())},t.prototype.element=function(){if(null===this._element)throw new Error("Element not yet generated");return this._element},t.prototype.animation=function(t,n,e,r){var o=this;if(void 0===n&&(n={}),void 0===e&&(e=null),void 0===r&&(r=!0),null===this._presentation)throw new Error("Cannot animate object without presentation");var i=this.requiresChildrenUpdate(t);this.props=ft(ft({},this.props),t),i&&(this._children=this.children());var a=this.attributes(),s=this.styles(),u=this.additionalAttributes(),c=Object.fromEntries(Object.entries(a).filter((function(t){var n=t[0],e=t[1];return o._element.getAttribute(n)!==e}))),l=Object.fromEntries(Object.entries(s).filter((function(t){var n=t[0],e=t[1];return o._element.style.getPropertyValue(n)!==e}))),p=Object.fromEntries(Object.entries(u).filter((function(t){var n=t[0],e=t[1];return o._element.getAttribute(n)!==e})));return ft(ft(ft({animate:r,element:this.element(),attributes:ft(ft({},c),p),styles:l},null!==e?{delay:e}:{}),i?{children:this._children}:{}),{animationParams:ft(ft({duration:500,easing:"linear"},n),"cubic"===n.easing?{easing:"cubicBezier(0.42, 0, 0.58, 1)"}:{})})},t.prototype.update=function(t,n){return void 0===n&&(n=null),this.animation(t,{},n,!1)},t.prototype.animate=function(t,n){var e=this;return void 0===n&&(n={}),function(r){r(e.animation(t,n))}},t.prototype.set=function(t){var n=this;return function(e){e(n.update(t))}},t.prototype.move=function(t,n){return void 0===n&&(n={}),this.animate({position:t},n)},t.prototype.positionInPresentation=function(t){var n=this._presentation,e=t.x,r=t.y;return e<=1&&e>=-1&&(e*=n.boundingBox.width),r<=1&&r>=-1&&(r*=n.boundingBox.height),{x:e,y:r}},t.prototype.anchorBoundingBox=function(t){var n=this,r=function(){switch(n.props.anchor){case"topleft":case"top":case"topright":return t.origin.y;case"left":case"center":case"right":return t.origin.y-t.height/2;case"bottomleft":case"bottom":case"bottomright":return t.origin.y-t.height}}(),o=function(){switch(n.props.anchor){case"topleft":case"left":case"bottomleft":return t.origin.x;case"top":case"center":case"bottom":return t.origin.x-t.width/2;case"topright":case"right":case"bottomright":return t.origin.x-t.width}}();return new e({x:o,y:r},t.width,t.height)},t.prototype.computeRenderedBoundingBox=function(t,n){void 0===n&&(n=null);var r=this._presentation.computeRenderedBoundingBox(t,n);return new e({x:this.props.position.x,y:this.props.position.y},r.width,r.height)},t}(),yt=(at=function(t,n){return at=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},at(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}at(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}),gt=function(){return gt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},gt.apply(this,arguments)},vt=function(t){function n(n){return void 0===n&&(n={}),t.call(this,gt({start:{x:0,y:0},end:{x:100,y:100},color:"#000000",width:10},n))||this}return yt(n,t),n.prototype.tagName=function(){return"line"},n.prototype.attributes=function(){var n=this.props,e=n.color,r=n.width,o=this.positionInPresentation(this.props.start),i=this.positionInPresentation(this.props.end);return gt(gt({},t.prototype.attributes.call(this)),{x1:o.x.toString(),y1:o.y.toString(),x2:i.x.toString(),y2:i.y.toString(),stroke:e,"stroke-width":r.toString()})},n}(dt),mt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),bt=function(){return bt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},bt.apply(this,arguments)},wt=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,bt({points:n,fill:"#000000",borderWidth:0,borderColor:"#000000"},e))||this}return mt(n,t),n.prototype.tagName=function(){return"polygon"},n.prototype.attributes=function(){var n=this.props,e=n.points,r=n.fill,o=n.borderWidth,i=n.borderColor,a=e.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ");return bt(bt(bt({},t.prototype.attributes.call(this)),{points:a,fill:r}),o>0?{"stroke-width":o.toString(),stroke:i}:{})},n}(dt),xt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ot=function(){return Ot=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Ot.apply(this,arguments)},St=function(t){function n(n){void 0===n&&(n={});var e,r,o=this,i=null!==(e=n.width)&&void 0!==e?e:10,a=null!==(r=n.arrowSize)&&void 0!==r?r:4*i;return(o=t.call(this,Ot({start:{x:0,y:0},end:{x:100,y:100},color:"#000000",width:i,arrowSize:a},n))||this).line=null,o.arrowhead=null,o}return xt(n,t),n.prototype.tagName=function(){return"g"},n.prototype.calculateShapes=function(t){t.width;var n=t.arrowSize,e=this.positionInPresentation(t.start),r=this.positionInPresentation(t.end),o=Math.atan2(r.y-e.y,r.x-e.x);return{line:{start:e,end:{x:r.x-n/2*Math.cos(o),y:r.y-n/2*Math.sin(o)}},arrowhead:[{x:r.x-n*Math.cos(o-Math.PI/6),y:r.y-n*Math.sin(o-Math.PI/6)},r,{x:r.x-n*Math.cos(o+Math.PI/6),y:r.y-n*Math.sin(o+Math.PI/6)}]}},n.prototype.children=function(){var t=this.props,n=t.color,e=t.width,r=(t.arrowSize,this.positionInPresentation(this.props.start)),o=this.positionInPresentation(this.props.end),i=(Math.atan2(o.y-r.y,o.x-r.x),this.calculateShapes(this.props));return this.line=new vt({start:i.line.start,end:i.line.end,color:n,width:e}),this.line.generate(this._presentation),this.arrowhead=new wt(i.arrowhead,{fill:n,borderWidth:0,borderColor:n}),this.arrowhead.generate(this._presentation),[this.line.element(),this.arrowhead.element()]},n.prototype.animations=function(t,n){void 0===n&&(n={});var e=Ot(Ot({},this.props),t),r=this.calculateShapes(e);return[this.line.animation(Ot(Ot({start:r.line.start,end:r.line.end},t.color?{color:t.color}:{}),t.width?{width:t.width}:{}),n),this.arrowhead.animation(Ot({points:r.arrowhead},t.color?{fill:t.color}:{}),n)]},n}(dt),_t=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),jt=function(){return jt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},jt.apply(this,arguments)},Pt=function(t){function n(n,e,r){return void 0===e&&(e={}),void 0===r&&(r=null),t.call(this,jt({objects:n,position:{x:0,y:0},positioned:null===r?"position"in e:r},e))||this}return _t(n,t),n.prototype.tagName=function(){return"g"},n.prototype.attributes=function(){return jt({},t.prototype.attributes.call(this))},n.prototype.additionalAttributes=function(){if(!this.props.positioned){var t=this.positionInPresentation(this.props.position),n=t.x,r=t.y;return{transform:"translate(".concat(n,", ").concat(r,")")}}var o=this._presentation.computeRenderedBoundingBox(this._element),i=this.positionInPresentation(this.props.position),a=i.x,s=i.y,u=this.anchorBoundingBox(new e({x:a,y:s},o.width,o.height)),c=u.origin.x-o.origin.x,l=u.origin.y-o.origin.y;return{transform:"translate(".concat(c,", ").concat(l,")")}},n.prototype.children=function(){var t=this;return this.props.objects.map((function(n){return n.generate(t._presentation),n._element}))},n}(dt),Ct=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Mt=function(){return Mt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Mt.apply(this,arguments)},At=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,Mt({href:n,width:100,height:100},e))||this}return Ct(n,t),n.prototype.tagName=function(){return"image"},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.href,i=n.width,a=n.height,s=this.positionAttributes(new e(r,i,a)),u=s.x,c=s.y;return Mt(Mt({},t.prototype.attributes.call(this)),{href:o,width:i.toString(),height:a.toString(),x:u.toString(),y:c.toString()})},n}(dt),Bt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Et=function(){return Et=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Et.apply(this,arguments)},kt=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,Et({content:n,width:1e3,height:1e3,fontSize:100,fontFamily:"Arial",color:"#000000"},e))||this}return Bt(n,t),n.prototype.tagName=function(){return"foreignObject"},n.prototype.attributes=function(){var n=this.props,e=n.position,r=n.width,o=n.height;return Et(Et({},t.prototype.attributes.call(this)),{x:e.x.toString(),y:e.y.toString(),width:r.toString(),height:o.toString()})},n.prototype.children=function(){for(var t=this.props.content,n=document.createElement("div"),e={"font-family":'"'.concat(this.props.fontFamily,'"'),"font-size":"".concat(this.props.fontSize,"px"),color:this.props.color},r=0,o=Object.entries(e);r<o.length;r++){var i=o[r],a=i[0],s=i[1];console.log([a,s]),void 0!==s&&n.style.setProperty(a,s.toString())}if("string"==typeof t)n.textContent=t;else for(var u=0,c=t;u<c.length;u++){var l=c[u],p=document.createElement("p");p.textContent=l,n.appendChild(p)}return[n]},n.prototype.additionalAttributes=function(){var n=this.computeRenderedBoundingBox(this.element(),this._children),e=this.positionAttributes(n),r=e.x,o=e.y;return Et(Et({},t.prototype.additionalAttributes.call(this)),{x:r.toString(),y:o.toString()})},n.prototype.requiresChildrenUpdate=function(t){return"content"in t&&t.content!==this.props.content},n}(dt);function It(t,n,e){void 0===n&&(n="1em"),void 0===e&&(e="start");for(var r=[],o=0,i=0,a=t;i<a.length;i++){var s=a[i];o++;var u=document.createElementNS("http://www.w3.org/2000/svg","tspan");if(u.setAttribute("x","0"),u.setAttribute("text-anchor",e),o>1&&u.setAttribute("dy",n),0===s.length||1===s.length&&""===s[0])u.appendChild(document.createTextNode(" ")),r.push(u);else if("string"!=typeof s){for(var c=0,l=s;c<l.length;c++){var p=l[c];if("string"==typeof p)u.appendChild(document.createTextNode(p));else{var h=p[0],f=p[1],d=document.createElementNS("http://www.w3.org/2000/svg","tspan");d.textContent=h;for(var y={fill:f.color,dy:f.dy,"text-decoration":f.textDecoration},g=0,v=Object.entries(y);g<v.length;g++){var m=v[g],b=m[0];void 0!==(S=m[1])&&d.setAttribute(b,S.toString())}for(var w={"font-family":f.fontFamily?'"'.concat(f.fontFamily,'"'):void 0,"font-size":f.fontSize,"font-weight":f.fontWeight,"font-style":f.fontStyle},x=0,O=Object.entries(w);x<O.length;x++){var S,_=O[x];b=_[0],void 0!==(S=_[1])&&d.style.setProperty(b,S.toString())}u.appendChild(d)}}r.push(u)}else u.appendChild(document.createTextNode(s)),r.push(u)}return r}var Tt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Nt=function(){return Nt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Nt.apply(this,arguments)},Dt=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,Nt({content:n,color:"#000000",fontSize:150,fontStyle:"normal",fontWeight:"normal",fontFamily:"Arial",dominantBaseline:"ideographic",textDecoration:"none",align:"left",lineSpacing:"1em"},e))||this}return Tt(n,t),n.prototype.isRichText=function(){return"string"!=typeof this.props.content},n.prototype.tagName=function(){return"text"},n.prototype.attributes=function(){var n=this.props,e=n.color,r=n.textDecoration;return Nt(Nt(Nt({},t.prototype.attributes.call(this)),"none"!==r?{"text-decoration":r}:{}),{fill:e})},n.prototype.additionalAttributes=function(){var n=this.computeRenderedBoundingBox(this.element(),this._children),e=this.positionAttributes(n),r=e.x,o=e.y;return Nt(Nt(Nt({},t.prototype.additionalAttributes.call(this)),this.isRichText()?{transform:"translate(".concat(r.toString()," ").concat(o.toString(),")"),y:"1em"}:{x:r.toString(),y:(o+n.height).toString()}),{"dominant-baseline":this.props.dominantBaseline})},n.prototype.styles=function(){var n=this.props,e=n.fontSize,r=n.fontFamily,o=n.fontStyle,i=n.fontWeight;return Nt(Nt(Nt(Nt({},t.prototype.styles.call(this)),"normal"!==o?{"font-style":o}:{}),"normal"!==i?{"font-weight":i.toString()}:{}),{"font-size":"".concat(e,"px"),"font-family":'"'.concat(r,'"'),"white-space":"pre"})},n.prototype.children=function(){var t=this.props.content;if("string"==typeof t)return[document.createTextNode(t)];var n="left"===this.props.align?"start":"center"===this.props.align?"middle":"end";return It(t,this.props.lineSpacing,n)},n.prototype.requiresChildrenUpdate=function(t){return"content"in t&&t.content!==this.props.content},n}(dt),Ft=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Lt=function(){return Lt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Lt.apply(this,arguments)},zt=function(t){function n(n){return void 0===n&&(n={}),t.call(this,Lt({fill:"#000000",width:100,height:100,rounding:0,borderWidth:0,borderColor:"#000000"},n))||this}return Ft(n,t),n.prototype.tagName=function(){return"rect"},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.width,i=n.height,a=n.fill,s=n.rounding,u=n.borderWidth,c=n.borderColor,l=this.positionAttributes(new e(r,o,i)),p=l.x,h=l.y;return Lt(Lt(Lt({},t.prototype.attributes.call(this)),{fill:a,width:o.toString(),height:i.toString(),rx:s.toString(),x:p.toString(),y:h.toString()}),u>0?{"stroke-width":u.toString(),stroke:c}:{})},n}(dt),Wt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ht=function(){return Ht=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Ht.apply(this,arguments)},qt=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,Ht({svg:n,width:100,height:100},e))||this}return Wt(n,t),n.prototype.tagName=function(){return"svg"},n.prototype.createElement=function(){var t=(new DOMParser).parseFromString(this.props.svg,"image/svg+xml").documentElement;return this.parsedChildren=Array.from(t.childNodes),t.innerHTML="",t},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.width,i=n.height,a=this.positionAttributes(new e(r,o,i)),s=a.x,u=a.y;return Ht(Ht({},t.prototype.attributes.call(this)),{width:o.toString(),height:i.toString(),x:s.toString(),y:u.toString()})},n.prototype.children=function(){return this.parsedChildren},n}(dt);return n})()));
@@ -13,11 +13,18 @@ export declare class Slide {
13
13
  * to debug a specific animation.
14
14
  */
15
15
  debugAnimation: number | null;
16
+ /**
17
+ * Property used by the presenter-export package to note which
18
+ * animations of the slide are meant to be exported.
19
+ * "first", "last", "all", and "none" are special-cased values,
20
+ * otherwise it can be an animationIndex in [0, animations.length].
21
+ */
22
+ keyBuilds: "first" | "last" | "all" | "none" | number[] | null;
16
23
  constructor(objects: SlideObject<any>[], animations?: BuildFunction[]);
17
24
  render(presentation: Presentation, animationIndex?: number): void;
18
25
  nextAnimation(presentation: Presentation): boolean;
19
26
  /**
20
- * Sleep for a specified number of milliseconds in an animation.
27
+ * Returns the build indices that are meant to be exported.
21
28
  */
22
- sleep(ms: number): Promise<unknown>;
29
+ getKeyBuilds(): number[];
23
30
  }
@@ -1,4 +1,5 @@
1
1
  import anime from "animejs/lib/anime.es.js";
2
+ export { anime };
2
3
  /**
3
4
  * Data needed to process an animation.
4
5
  */
@@ -8,10 +8,6 @@ export interface RichTextProps {
8
8
  dy?: number;
9
9
  }
10
10
  export type RichTextSpan = string | [string, RichTextProps];
11
- /**
12
- * Creates a text node with spaces replaced by non-breaking spaces.
13
- */
14
- export declare function createSpacePreservingTextNode(text: string): Text;
15
11
  /**
16
12
  * Given rich text configuration, returns the corresponding tspan nodes.
17
13
  */
@@ -17,6 +17,6 @@ export namespace module {
17
17
  let rules: {
18
18
  test: RegExp;
19
19
  use: string;
20
- exclude: RegExp;
20
+ exclude: RegExp[];
21
21
  }[];
22
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "presenter",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "A JavaScript presentation library",
5
5
  "main": "dist/presenter.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -19,6 +19,7 @@
19
19
  "url": "https://github.com/brianyu28/presenter/issues"
20
20
  },
21
21
  "homepage": "https://github.com/brianyu28/presenter#readme",
22
+ "license": "GPL-3.0-or-later",
22
23
  "files": [
23
24
  "./dist/"
24
25
  ],