presenter 0.5.1 → 0.5.3
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/dist/354.js +2 -0
- package/dist/354.js.LICENSE.txt +20 -0
- package/dist/418.js +2 -0
- package/dist/418.js.LICENSE.txt +1 -0
- package/dist/661.js +1 -0
- package/dist/jest.config.d.ts +13 -0
- package/dist/presenter-code.js +1 -0
- package/dist/presenter-export.js +2 -0
- package/dist/presenter-export.js.LICENSE.txt +313 -0
- package/dist/presenter-morph.js +1 -0
- package/dist/presenter.js +1 -0
- package/dist/src/code/codeBlock.d.ts +108 -0
- package/dist/src/code/index.d.ts +1 -0
- package/dist/src/export/index.d.ts +24 -0
- package/dist/src/export/util.d.ts +4 -0
- package/dist/src/index.d.ts +25 -0
- package/dist/src/library/bullets.d.ts +15 -0
- package/dist/src/library/mainTitle.d.ts +4 -0
- package/dist/src/library/slideTitle.d.ts +4 -0
- package/dist/src/morph/index.d.ts +34 -0
- package/dist/src/objects/arrow.d.ts +62 -0
- package/dist/src/objects/circle.d.ts +24 -0
- package/dist/src/objects/grid.d.ts +17 -0
- package/dist/src/objects/group.d.ts +28 -0
- package/dist/src/objects/iframe.d.ts +16 -0
- package/dist/src/objects/image.d.ts +20 -0
- package/dist/src/objects/line.d.ts +19 -0
- package/dist/src/objects/mask.d.ts +13 -0
- package/dist/src/objects/paragraph.d.ts +21 -0
- package/dist/src/objects/path.d.ts +29 -0
- package/dist/src/objects/polygon.d.ts +13 -0
- package/dist/src/objects/rectangle.d.ts +26 -0
- package/dist/src/objects/screenCapture.d.ts +17 -0
- package/dist/src/objects/text.d.ts +67 -0
- package/dist/src/objects/text.test.d.ts +1 -0
- package/dist/src/objects/vectorGraphic.d.ts +48 -0
- package/dist/src/presentation/object.d.ts +132 -0
- package/dist/src/presentation/presentation.d.ts +153 -0
- package/dist/src/presentation/presentation.test.d.ts +1 -0
- package/dist/src/presentation/slide.d.ts +43 -0
- package/dist/src/presentation/storage.d.ts +9 -0
- package/dist/src/util/animation.d.ts +60 -0
- package/dist/src/util/easing.d.ts +12 -0
- package/dist/src/util/easing.test.d.ts +1 -0
- package/dist/src/util/position.d.ts +11 -0
- package/dist/src/util/richText.d.ts +19 -0
- package/dist/webpack.config.d.ts +70 -0
- package/package.json +2 -2
|
@@ -0,0 +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:()=>Mt,BoundingBox:()=>e,Bullets:()=>gn,Circle:()=>Bt,Grid:()=>zt,Group:()=>Nt,IFrame:()=>qt,Image:()=>Gt,Line:()=>xt,MainTitle:()=>wn,Mask:()=>Xt,Paragraph:()=>Zt,Path:()=>_t,Polygon:()=>Pt,Presentation:()=>a,Rectangle:()=>cn,ScreenCapture:()=>tn,Slide:()=>gt,SlideObject:()=>bt,SlideTitle:()=>Sn,Text:()=>sn,VectorGraphic:()=>hn,animateStateChange:()=>ht,anime:()=>st,clamp:()=>jn,easeCubic:()=>Cn,easeLinear:()=>_n,generateTextNodes:()=>rn,performAnimation:()=>pt,preserveLeadingSpaces:()=>en,skipAnimation:()=>ft});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="presenterState";function o(t){var n=t.presentationState.currentSlide,e=t.slides[n],o=null!==e?e.animationIndex:0;localStorage.setItem(r,JSON.stringify({title:t.title,slide:n,animation:o,timestamp:Date.now()}))}var i=function(){return i=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},i.apply(this,arguments)},a=function(){function t(t,n,r,o){void 0===o&&(o={});var a=this;if(null===this.element)throw new Error("Presentation cannot be mounted to null element.");if(0===n.length)throw new Error("Presentation requires at least one slide");this.title=t,this.element=r,this.slides=n,this.options=i({width:3840,height:2160,backgroundColor:"#ffffff",fonts:[],stateCacheTTL:15},o),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,this.background=null,this.additionalElementContainer=null,this.textCommand={active:!1,command:""},this.slideCleanupHandlers=[],this.shortcuts={s:{slideIndex:0,animationIndex:0},c:{slideIndex:null,animationIndex:0},e:{slideIndex:n.length-1,animationIndex:n[n.length-1].animations.length}};for(var s=0;s<n.length;s++)this.shortcuts[(s+1).toString()]={slideIndex:s,animationIndex:0};n.forEach((function(t,n){t.props.shortcuts.forEach((function(t){var e="string"==typeof t?t:t[0],r="string"==typeof t?0:t[1];a.shortcuts[e]={slideIndex:n,animationIndex:r}}))}))}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="transparent",this.svg.style.cursor="none",this.setupKeyboardCommands(),this.shadow=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.shadow.style.visibility="hidden",this.background=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.background.style.backgroundColor=this.options.backgroundColor,this.additionalElementContainer=document.createElement("div"),this.additionalElementContainer.style.width="100%",this.additionalElementContainer.style.height="100%",this.additionalElementContainer.style.position="absolute",[this.svg,this.shadow,this.background].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.navigatorContainer=document.createElement("div"),this.navigatorContainer.style.position="absolute",this.navigatorContainer.style.height="100%",this.navigatorContainer.style.width="200px",this.navigatorContainer.style.backgroundColor="#e6e6e6",this.navigatorContainer.style.overflow="scroll",this.navigatorContainer.style.display="none",this.slides.forEach((function(n,e){var r=document.createElement("button");r.style.display="block",r.style.margin="10px",r.style.padding="10px",r.style.width="calc(100% - 20px)",r.style.textAlign="left",r.style.backgroundColor="transparent",r.style.border="none",r.style.cursor="pointer",r.innerHTML="".concat(e+1),null!==n.props.title&&(r.innerHTML+=": ".concat(n.props.title)),r.addEventListener("click",(function(){t.navigatorContainer.style.display="none",t.renderSlide(e)})),t.navigatorContainer.appendChild(r)})),this.container.appendChild(this.shadow),this.container.appendChild(this.background),this.container.appendChild(this.additionalElementContainer),this.container.appendChild(this.svg),this.container.appendChild(this.navigatorContainer),this.element.appendChild(this.container),function(t,n){var e,o=localStorage.getItem(r);if(null===o)return!1;if(null===n)return localStorage.removeItem(r),!1;try{e=JSON.parse(o)}catch(t){return localStorage.removeItem(r),!1}var i=e.title,a=e.slide,s=e.animation,l=e.timestamp;if(i!==t.title)return localStorage.removeItem(r),!1;if(Date.now()-l>6e4*n)return localStorage.removeItem(r),!1;a>t.slides.length-1&&(a=t.slides.length-1);var u=t.slides[a];return void 0===u?(localStorage.removeItem(r),!1):(s>u.animations.length&&(s=u.animations.length),t.renderSlide(a,s),!0)}(this,this.options.stateCacheTTL)||this.renderSlide(0)},t.prototype.renderSlide=function(t,n){void 0===n&&(n=0);var e=this.slides[t];void 0!==e&&(this.presentationState.currentSlide=t,e.render(this,"last"===n?e.animations.length:n),o(this))},t.prototype.setupKeyboardCommands=function(){var t=this,n=this.isFullBodyPresentation()?document.body:this.container;n.addEventListener("keyup",this.handleKeyboardEvent.bind(this)),n.addEventListener("mousemove",(function(){t.svg.style.cursor="auto"}))},t.prototype.handleKeyboardEvent=function(t){if("Escape"!==t.key){if("ArrowRight"===t.key||" "===t.key)return this.resetTextCommand(),void this.next(!t.shiftKey);if("ArrowLeft"===t.key)return this.resetTextCommand(),void this.previous(!t.shiftKey);if(this.textCommand.active){if("Enter"===t.key){var n=this.textCommand.command;this.resetTextCommand();var e=this.shortcuts[n];if(void 0===e)return;var r=this.slides[this.presentationState.currentSlide];this.shortcuts.b={slideIndex:this.presentationState.currentSlide,animationIndex:r.animationIndex};var o=null!==e.slideIndex?e.slideIndex:this.presentationState.currentSlide;return void this.renderSlide(o,e.animationIndex)}"Backspace"===t.key?this.textCommand.command=this.textCommand.command.slice(0,-1):this.textCommand.command+=t.key}else if("g"===t.key)this.textCommand.active=!0,this.textCommand.command="";else if("`"===t.key){var i="block"===this.navigatorContainer.style.display;this.navigatorContainer.style.display=i?"none":"block"}}else this.resetTextCommand()},t.prototype.resetTextCommand=function(){this.textCommand.active=!1,this.textCommand.command=""},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){return n=this,e=void 0,i=function(){var n;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(l){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,l])}}}(this,(function(e){switch(e.label){case 0:return this.svg.style.cursor="none",void 0===(n=this.slides[this.presentationState.currentSlide])?[2]:t?[4,n.nextAnimation()]:[3,2];case 1:if(e.sent())return o(this),[2];e.label=2;case 2:return this.renderSlide(this.presentationState.currentSlide+1),[2]}}))},new((r=void 0)||(r=Promise))((function(t,o){function a(t){try{l(i.next(t))}catch(t){o(t)}}function s(t){try{l(i.throw(t))}catch(t){o(t)}}function l(n){var e;n.done?t(n.value):(e=n.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}l((i=i.apply(n,e||[])).next())}));var n,e,r,i},t.prototype.previous=function(t){this.svg.style.cursor="none";var n=this.presentationState.currentSlide,e=this.slides[n];t&&e.animationIndex>0?this.renderSlide(n,e.animationIndex-1):t&&0===this.presentationState.currentSlide||this.renderSlide(n-1,t?"last":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}(),s={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},l={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},u=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],c={CSS:{},springs:{}};function p(t,n,e){return Math.min(Math.max(t,n),e)}function f(t,n){return t.indexOf(n)>-1}function h(t,n){return t.apply(null,n)}var d={arr:function(t){return Array.isArray(t)},obj:function(t){return f(Object.prototype.toString.call(t),"Object")},pth:function(t){return d.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||d.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 d.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 d.hex(t)||d.rgb(t)||d.hsl(t)},key:function(t){return!s.hasOwnProperty(t)&&!l.hasOwnProperty(t)&&"targets"!==t&&"keyframes"!==t}};function y(t){var n=/\(([^)]+)\)/.exec(t);return n?n[1].split(",").map((function(t){return parseFloat(t)})):[]}function v(t,n){var e=y(t),r=p(d.und(e[0])?1:e[0],.1,100),o=p(d.und(e[1])?100:e[1],.1,100),i=p(d.und(e[2])?10:e[2],.1,100),a=p(d.und(e[3])?0:e[3],.1,100),s=Math.sqrt(o/r),l=i/(2*Math.sqrt(o*r)),u=l<1?s*Math.sqrt(1-l*l):0,f=l<1?(l*s-a)/u:-a+s;function h(t){var e=n?n*t/1e3:t;return e=l<1?Math.exp(-e*l*s)*(1*Math.cos(u*e)+f*Math.sin(u*e)):(1+f*e)*Math.exp(-e*s),0===t||1===t?t:1-e}return n?h:function(){var n=c.springs[t];if(n)return n;for(var e=1/6,r=0,o=0;;)if(1===h(r+=e)){if(++o>=16)break}else o=0;var i=r*e*1e3;return c.springs[t]=i,i}}function g(t){return void 0===t&&(t=10),function(n){return Math.ceil(p(n,1e-6,1)*t)*(1/t)}}var m,b,w=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 l=0;l<11;++l)s[l]=o(l*t,n,r);return function(l){return n===e&&r===a||0===l||1===l?l:o(function(e){for(var a=0,l=1;10!==l&&s[l]<=e;++l)a+=t;--l;var u=a+(e-s[l])/(s[l+1]-s[l])*t,c=i(u,n,r);return c>=.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,u,n,r):0===c?u:function(t,n,e,r,i){var a,s,l=0;do{(a=o(s=n+(e-n)/2,r,i)-t)>0?e=s:n=s}while(Math.abs(a)>1e-7&&++l<10);return s}(e,a,a+t,n,r)}(l),e,a)}}}}(),O=(m={linear:function(){return function(t){return t}}},b={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=p(t,1,10),r=p(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){b[t]=function(){return function(t){return Math.pow(t,n+2)}}})),Object.keys(b).forEach((function(t){var n=b[t];m["easeIn"+t]=n,m["easeOut"+t]=function(t,e){return function(r){return 1-n(t,e)(1-r)}},m["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}},m["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}}})),m);function x(t,n){if(d.fnc(t))return t;var e=t.split("(")[0],r=O[e],o=y(t);switch(e){case"spring":return v(t,n);case"cubicBezier":return h(w,o);case"steps":return h(g,o);default:return h(r,o)}}function S(t){try{return document.querySelectorAll(t)}catch(t){return}}function j(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 _(t){return t.reduce((function(t,n){return t.concat(d.arr(n)?_(n):n)}),[])}function C(t){return d.arr(t)?t:(d.str(t)&&(t=S(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function k(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 A(t,n){var e=P(t);for(var r in t)e[r]=n.hasOwnProperty(r)?n[r]:t[r];return e}function E(t,n){var e=P(t);for(var r in n)e[r]=d.und(t[r])?n[r]:t[r];return e}function M(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 I(t,n){return d.fnc(t)?t(n.target,n.id,n.total):t}function T(t,n){return t.getAttribute(n)}function B(t,n,e){if(k([e,"deg","rad","turn"],M(n)))return n;var r=c.CSS[n+e];if(!d.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 c.CSS[n+e]=s,s}function L(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?B(t,o,e):o}}function D(t,n){return d.dom(t)&&!d.inp(t)&&(!d.nil(T(t,n))||d.svg(t)&&t[n])?"attribute":d.dom(t)&&k(u,n)?"transform":d.dom(t)&&"transform"!==n&&L(t,n)?"css":null!=t[n]?"object":void 0}function N(t){if(d.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 F(t,n,e,r){switch(D(t,n)){case"transform":return function(t,n,e,r){var o=f(n,"scale")?1:0+function(t){return f(t,"translate")||"perspective"===t?"px":f(t,"rotate")||f(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?B(t,i,r):i}(t,n,r,e);case"css":return L(t,n,e);case"attribute":return T(t,n);default:return t[n]||0}}function z(t,n){var e=/^(\*=|\+=|-=)/.exec(t);if(!e)return t;var r=M(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 H(t,n){if(d.col(t))return function(t){return d.rgb(t)?(e=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(n=t))?"rgba("+e[1]+",1)":n:d.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):d.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,l=o[4]||1;function u(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 c=s<.5?s*(1+a):s+a-s*a,p=2*s-c;n=u(p,c,i+1/3),e=u(p,c,i),r=u(p,c,i-1/3)}return"rgba("+255*n+","+255*e+","+255*r+","+l+")"}(t):void 0;var n,e}(t);if(/\s/g.test(t))return t;var e=M(t),r=e?t.substr(0,t.length-e.length):t;return n?r+n:r}function W(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}function q(t){for(var n,e=t.points,r=0,o=0;o<e.numberOfItems;o++){var i=e.getItem(o);o>0&&(r+=W(n,i)),n=i}return r}function R(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return function(t){return 2*Math.PI*T(t,"r")}(t);case"rect":return function(t){return 2*T(t,"width")+2*T(t,"height")}(t);case"line":return function(t){return W({x:T(t,"x1"),y:T(t,"y1")},{x:T(t,"x2"),y:T(t,"y2")})}(t);case"polyline":return q(t);case"polygon":return function(t){var n=t.points;return q(t)+W(n.getItem(n.numberOfItems-1),n.getItem(0))}(t)}}function V(t,n){var e=n||{},r=e.el||function(t){for(var n=t.parentNode;d.svg(n)&&d.svg(n.parentNode);)n=n.parentNode;return n}(t),o=r.getBoundingClientRect(),i=T(r,"viewBox"),a=o.width,s=o.height,l=e.viewBox||(i?i.split(" "):[0,0,a,s]);return{el:r,viewBox:l,x:l[0]/1,y:l[1]/1,w:a,h:s,vW:l[2],vH:l[3]}}function G(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=V(t.el,t.svg),i=r(),a=r(-1),s=r(1),l=e?1:o.w/o.vW,u=e?1:o.h/o.vH;switch(t.property){case"x":return(i.x-o.x)*l;case"y":return(i.y-o.y)*u;case"angle":return 180*Math.atan2(s.y-a.y,s.x-a.x)/Math.PI}}function Y(t,n){var e=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,r=H(d.pth(t)?t.totalLength:t,n)+"";return{original:r,numbers:r.match(e)?r.match(e).map(Number):[0],strings:d.str(t)||n?r.split(e):[]}}function K(t){return j(t?_(d.arr(t)?t.map(C):C(t)):[],(function(t,n,e){return e.indexOf(t)===n}))}function X(t){var n=K(t);return n.map((function(t,e){return{target:t,id:e,total:n.length,transforms:{list:N(t)}}}))}function $(t,n){var e=P(n);if(/^spring/.test(e.easing)&&(e.duration=v(e.easing)),d.arr(t)){var r=t.length;2!==r||d.obj(t[0])?d.fnc(n.duration)||(e.duration=n.duration/r):t={value:t}}var o=d.arr(t)?t:[t];return o.map((function(t,e){var r=d.obj(t)&&!d.pth(t)?t:{value:t};return d.und(r.delay)&&(r.delay=e?0:n.delay),d.und(r.endDelay)&&(r.endDelay=e===o.length-1?n.endDelay:0),r})).map((function(t){return E(t,e)}))}var U={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 Z(t,n){X(t).forEach((function(t){for(var e in n){var r=I(n[e],t),o=t.target,i=M(r),a=F(o,e,i,t),s=z(H(r,i||M(a)),a),l=D(o,e);U[l](o,e,s,t.transforms,!0)}}))}function Q(t,n){return j(_(t.map((function(t){return n.map((function(n){return function(t,n){var e=D(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=I(t[r],n);d.arr(o)&&1===(o=o.map((function(t){return I(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=d.arr(i)?i[1]:i,s=M(a),l=F(n.target,t.name,s,n),u=e?e.to.original:l,c=d.arr(i)?i[0]:u,p=M(c)||M(l),f=s||p;return d.und(a)&&(a=u),o.from=Y(c,f),o.to=Y(z(a,c),f),o.start=e?e.end:0,o.end=o.start+o.delay+o.duration+o.endDelay,o.easing=x(o.easing,o.duration),o.isPath=d.pth(i),o.isPathTargetInsideSVG=o.isPath&&d.svg(n.target),o.isColor=d.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!d.und(t)}))}function J(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 tt=0,nt=[],et=function(){var t;function n(e){for(var r=nt.length,o=0;o<r;){var i=nt[o];i.paused?(nt.splice(o,1),r--):(i.tick(e),o++)}t=o>0?requestAnimationFrame(n):void 0}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",(function(){ot.suspendWhenDocumentHidden&&(rt()?t=cancelAnimationFrame(t):(nt.forEach((function(t){return t._onDocumentVisibility()})),et()))})),function(){t||rt()&&ot.suspendWhenDocumentHidden||!(nt.length>0)||(t=requestAnimationFrame(n))}}();function rt(){return!!document&&document.hidden}function ot(t){void 0===t&&(t={});var n,e=0,r=0,o=0,i=0,a=null;function u(t){var n=window.Promise&&new Promise((function(t){return a=t}));return t.finished=n,n}var c=function(t){var n=A(s,t),e=A(l,t),r=function(t,n){var e=[],r=n.keyframes;for(var o in r&&(n=E(function(t){for(var n=j(_(t.map((function(t){return Object.keys(t)}))),(function(t){return d.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)d.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)d.key(o)&&e.push({name:o,tweens:$(n[o],t)});return e}(e,t),o=X(t.targets),i=Q(o,r),a=J(i,e),u=tt;return tt++,E(n,{id:u,children:[],animatables:o,animations:i,duration:a.duration,delay:a.delay,endDelay:a.endDelay})}(t);function f(){var t=c.direction;"alternate"!==t&&(c.direction="normal"!==t?"normal":"reverse"),c.reversed=!c.reversed,n.forEach((function(t){return t.reversed=c.reversed}))}function h(t){return c.reversed?c.duration-t:t}function y(){e=0,r=h(c.currentTime)*(1/ot.speed)}function v(t,n){n&&n.seek(t-n.timelineOffset)}function g(t){for(var n=0,e=c.animations,r=e.length;n<r;){var o=e[n],i=o.animatable,a=o.tweens,s=a.length-1,l=a[s];s&&(l=j(a,(function(n){return t<n.end}))[0]||l);for(var u=p(t-l.start-l.delay,0,l.duration)/l.duration,f=isNaN(u)?1:l.easing(u),h=l.to.strings,d=l.round,y=[],v=l.to.numbers.length,g=void 0,m=0;m<v;m++){var b=void 0,w=l.to.numbers[m],O=l.from.numbers[m]||0;b=l.isPath?G(l.value,f*w,l.isPathTargetInsideSVG):O+f*(w-O),d&&(l.isColor&&m>2||(b=Math.round(b*d)/d)),y.push(b)}var x=h.length;if(x){g=h[0];for(var S=0;S<x;S++){h[S];var _=h[S+1],C=y[S];isNaN(C)||(g+=_?C+_:C+" ")}}else g=y[0];U[o.type](i.target,o.property,g,i.transforms),o.currentValue=g,n++}}function m(t){c[t]&&!c.passThrough&&c[t](c)}function b(t){var s=c.duration,l=c.delay,d=s-c.endDelay,y=h(t);c.progress=p(y/s*100,0,100),c.reversePlayback=y<c.currentTime,n&&function(t){if(c.reversePlayback)for(var e=i;e--;)v(t,n[e]);else for(var r=0;r<i;r++)v(t,n[r])}(y),!c.began&&c.currentTime>0&&(c.began=!0,m("begin")),!c.loopBegan&&c.currentTime>0&&(c.loopBegan=!0,m("loopBegin")),y<=l&&0!==c.currentTime&&g(0),(y>=d&&c.currentTime!==s||!s)&&g(s),y>l&&y<d?(c.changeBegan||(c.changeBegan=!0,c.changeCompleted=!1,m("changeBegin")),m("change"),g(y)):c.changeBegan&&(c.changeCompleted=!0,c.changeBegan=!1,m("changeComplete")),c.currentTime=p(y,0,s),c.began&&m("update"),t>=s&&(r=0,c.remaining&&!0!==c.remaining&&c.remaining--,c.remaining?(e=o,m("loopComplete"),c.loopBegan=!1,"alternate"===c.direction&&f()):(c.paused=!0,c.completed||(c.completed=!0,m("loopComplete"),m("complete"),!c.passThrough&&"Promise"in window&&(a(),u(c)))))}return u(c),c.reset=function(){var t=c.direction;c.passThrough=!1,c.currentTime=0,c.progress=0,c.paused=!0,c.began=!1,c.loopBegan=!1,c.changeBegan=!1,c.completed=!1,c.changeCompleted=!1,c.reversePlayback=!1,c.reversed="reverse"===t,c.remaining=c.loop,n=c.children;for(var e=i=n.length;e--;)c.children[e].reset();(c.reversed&&!0!==c.loop||"alternate"===t&&1===c.loop)&&c.remaining++,g(c.reversed?c.duration:0)},c._onDocumentVisibility=y,c.set=function(t,n){return Z(t,n),c},c.tick=function(t){o=t,e||(e=o),b((o+(r-e))*ot.speed)},c.seek=function(t){b(h(t))},c.pause=function(){c.paused=!0,y()},c.play=function(){c.paused&&(c.completed&&c.reset(),c.paused=!1,nt.push(c),y(),et())},c.reverse=function(){f(),c.completed=!c.reversed,y()},c.restart=function(){c.reset(),c.play()},c.remove=function(t){at(K(t),c)},c.reset(),c.autoplay&&c.play(),c}function it(t,n){for(var e=n.length;e--;)k(t,n[e].animatable.target)&&n.splice(e,1)}function at(t,n){var e=n.animations,r=n.children;it(t,e);for(var o=r.length;o--;){var i=r[o],a=i.animations;it(t,a),a.length||i.children.length||r.splice(o,1)}e.length||r.length||n.pause()}ot.version="3.2.1",ot.speed=1,ot.suspendWhenDocumentHidden=!0,ot.running=nt,ot.remove=function(t){for(var n=K(t),e=nt.length;e--;)at(n,nt[e])},ot.get=F,ot.set=Z,ot.convertPx=B,ot.path=function(t,n){var e=d.str(t)?S(t)[0]:t,r=n||100;return function(t){return{property:t,el:e,svg:V(e),totalLength:R(e)*(r/100)}}},ot.setDashoffset=function(t){var n=R(t);return t.setAttribute("stroke-dasharray",n),n},ot.stagger=function(t,n){void 0===n&&(n={});var e=n.direction||"normal",r=n.easing?x(n.easing):null,o=n.grid,i=n.axis,a=n.from||0,s="first"===a,l="center"===a,u="last"===a,c=d.arr(t),p=c?parseFloat(t[0]):parseFloat(t),f=c?parseFloat(t[1]):0,h=M(c?t[1]:t)||0,y=n.start||0+(c?p:0),v=[],g=0;return function(t,n,d){if(s&&(a=0),l&&(a=(d-1)/2),u&&(a=d-1),!v.length){for(var m=0;m<d;m++){if(o){var b=l?(o[0]-1)/2:a%o[0],w=l?(o[1]-1)/2:Math.floor(a/o[0]),O=b-m%o[0],x=w-Math.floor(m/o[0]),S=Math.sqrt(O*O+x*x);"x"===i&&(S=-O),"y"===i&&(S=-x),v.push(S)}else v.push(Math.abs(a-m));g=Math.max.apply(Math,v)}r&&(v=v.map((function(t){return r(t/g)*g}))),"reverse"===e&&(v=v.map((function(t){return i?t<0?-1*t:-t:Math.abs(g-t)})))}return y+(c?(f-p)/g:p)*(Math.round(100*v[n])/100)+h}},ot.timeline=function(t){void 0===t&&(t={});var n=ot(t);return n.duration=0,n.add=function(e,r){var o=nt.indexOf(n),i=n.children;function a(t){t.passThrough=!0}o>-1&&nt.splice(o,1);for(var s=0;s<i.length;s++)a(i[s]);var u=E(e,A(l,t));u.targets=u.targets||t.targets;var c=n.duration;u.autoplay=!1,u.direction=n.direction,u.timelineOffset=d.und(r)?c:z(r,c),a(n),n.seek(u.timelineOffset);var p=ot(u);a(p),i.push(p);var f=J(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},ot.easing=x,ot.penner=O,ot.random=function(t,n){return Math.floor(Math.random()*(n-t+1))+t};const st=ot;var 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)},ut=function(t,n,e,r){return new(e||(e=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,s)}l((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(l){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,l])}}},pt=function(t){return ut(void 0,void 0,void 0,(function(){var n,e,r,o,i,a,s;return ct(this,(function(l){switch(l.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)return ft(t),[2,"continue"];if(void 0!==t.animateCallback&&t.animateCallback(),void 0!==t.element&&(st(lt(lt(lt({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,l.label=1;case 1:return e<r.length?(o=r[e],[5,n(o)]):[3,4];case 2:l.sent(),l.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))},ft=function(t){return ut(void 0,void 0,void 0,(function(){var n,e,r,o,i,a,s,l,u,c,p,f,h,d,y;return ct(this,(function(v){for(Array.isArray(t)||(t=[t]),n=0,e=t;n<e.length;n++)if((r=e[n]).updateCallback&&r.updateCallback(),o=r.element){if(r.attributes)for(i=0,a=Object.entries(r.attributes);i<a.length;i++)s=a[i],p=s[0],f=s[1],o.setAttribute(p,f);if(r.styles)for(l=0,u=Object.entries(r.styles);l<u.length;l++)c=u[l],p=c[0],f=c[1],o.style[p]=f;if(r.children)for(o.innerHTML="",h=0,d=r.children;h<d.length;h++)y=d[h],o.appendChild(y)}return[2]}))}))};function ht(t,n,e){void 0===e&&(e=500);var r=Object.keys(n),o=null,i=null;function a(s){null===o&&(o=s),null===i&&(i=lt({},t.state));for(var l=s-o,u=Math.min(l/e,1),c=0,p=r;c<p.length;c++){var f=p[c];if("number"==typeof n[f]){var h=i[f],d=n[f];t.state[f]=h+u*(d-h)}else 1==u&&(t.state[f]=n[f])}u<1&&requestAnimationFrame(a)}return function(e){return e({animate:!0,animateCallback:function(){o=null,i=null,requestAnimationFrame(a)},updateCallback:function(){for(var e=0,o=r;e<o.length;e++){var i=o[e];t.state[i]=n[i]}}})}}var dt,yt=function(){return yt=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},yt.apply(this,arguments)},vt=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(l){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,l])}}},gt=function(){function t(t,n,e){void 0===n&&(n=[]),void 0===e&&(e={}),this.objects=t.filter((function(t){return null!==t})),this.animations=n,this.animationIndex=0,this.keyBuilds="last",this.props=yt({additionalElement:null,shortcuts:[],title:null},e)}return t.prototype.render=function(t,n){void 0===n&&(n=0),this.animationIndex=n;for(var e=0,r=t.slideCleanupHandlers;e<r.length;e++)(0,r[e])();if(t.slideCleanupHandlers=[],this.objects.forEach((function(n){n.generate(t)})),t.additionalElementContainer.innerHTML="",null!==this.props.additionalElement){var o="function"==typeof this.props.additionalElement?this.props.additionalElement():this.props.additionalElement;o.style.width="100%",o.style.height="auto",t.additionalElementContainer.appendChild(o)}for(var i=0;i<this.animationIndex;i++){var a=this.animations[i];if(a)if(Array.isArray(a))for(var s=0,l=a;s<l.length;s++){var u=l[s];"number"!=typeof u&&u(ft)}else a(ft)}t.svg.innerHTML="",this.objects.forEach((function(n){t.svg.appendChild(n.element())}))},t.prototype.nextAnimation=function(){return t=this,n=void 0,r=function(){var t,n,e,r,o;return vt(this,(function(i){switch(i.label){case 0:if(!(t=this.animations[this.animationIndex]))return[3,7];if(!Array.isArray(t))return[3,5];n=function(t){return vt(this,(function(n){switch(n.label){case 0:return"number"!=typeof t?[3,2]:[4,new Promise((function(n){return setTimeout(n,t)}))];case 1:return n.sent(),[2,"continue"];case 2:return t(pt),[2]}}))},e=0,r=t,i.label=1;case 1:return e<r.length?(o=r[e],[5,n(o)]):[3,4];case 2:i.sent(),i.label=3;case 3:return e++,[3,1];case 4:return[3,6];case 5:t(pt),i.label=6;case 6:return this.animationIndex++,[2,!0];case 7:return[2,!1]}}))},new((e=void 0)||(e=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,s)}l((r=r.apply(t,n||[])).next())}));var t,n,e,r},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}(),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)},bt=function(){function t(t){this.props=mt({position:{x:0,y:0},anchor:"topleft"},t),this.initialProps=mt({},this.props),this._element=null,this._presentation=null,this._children=[]}return t.prototype.tagName=function(){return"g"},t.prototype.attributes=function(){var t=this.props.mask;return mt({},void 0!==t?{mask:"url(#".concat(t,")")}:{})},t.prototype.additionalAttributes=function(){return{}},t.prototype.styles=function(){var t=this.props.opacity;return mt({},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=mt({},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,l=Object.entries(this.styles());s<l.length;s++){var u=l[s],c=u[0];a=u[1],n.style.setProperty(c,a)}this._children=this.children();for(var p=0,f=this._children;p<f.length;p++){var h=f[p];n.appendChild(h)}this._element=n;for(var d=0,y=Object.entries(this.additionalAttributes());d<y.length;d++){var v=y[d];i=v[0],a=v[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.animate=function(t,n,e,r){var o=this;return void 0===n&&(n={}),void 0===e&&(e=null),void 0===r&&(r=!0),function(i){if(null===o._presentation)throw new Error("Cannot animate object without presentation");var a=o.requiresChildrenUpdate(t);o.props=mt(mt({},o.props),t),a&&(o._children=o.children());var s=o.attributes(),l=o.styles(),u=o.additionalAttributes(),c=Object.fromEntries(Object.entries(s).filter((function(t){var n=t[0],e=t[1];return o._element.getAttribute(n)!==e}))),p=Object.fromEntries(Object.entries(l).filter((function(t){var n=t[0],e=t[1];return o._element.style.getPropertyValue(n)!==e}))),f=Object.fromEntries(Object.entries(u).filter((function(t){var n=t[0],e=t[1];return o._element.getAttribute(n)!==e})));i(mt(mt(mt({animate:r,element:o.element(),attributes:mt(mt({},c),f),styles:p},null!==e?{delay:e}:{}),a?{children:o._children}:{}),{animationParams:mt(mt({duration:500,easing:"linear"},n),"cubic"===n.easing?{easing:"cubicBezier(0.42, 0, 0.58, 1)"}:{})}))}},t.prototype.set=function(t,n){return void 0===n&&(n=null),this.animate(t,{},n,!1)},t.prototype.move=function(t,n){return void 0===n&&(n={}),this.animate({position:t},n)},t.prototype.fadeIn=function(t){return void 0===t&&(t={}),this.animate({opacity:1},t)},t.prototype.fadeOut=function(t){return void 0===t&&(t={}),this.animate({opacity:0},t)},t.prototype.show=function(){return this.set({opacity:1})},t.prototype.hide=function(){return this.set({opacity:0})},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}(),wt=(dt=function(t,n){return dt=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])},dt(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}dt(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}),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)},xt=function(t){function n(n){return void 0===n&&(n={}),t.call(this,Ot({start:{x:0,y:0},end:{x:100,y:100},color:"#000000",width:10,linecap:null,drawn:!0},n))||this}return wt(n,t),n.prototype.tagName=function(){return"line"},n.prototype.attributes=function(){var n=this.props,e=n.color,r=n.drawn,o=n.width,i=n.linecap,a=this.positionInPresentation(this.props.start),s=this.positionInPresentation(this.props.end),l=a.x.toString(),u=a.y.toString(),c=s.x.toString(),p=s.y.toString();return r||(c=l,p=u),Ot(Ot(Ot({},t.prototype.attributes.call(this)),{x1:l,y1:u,x2:c,y2:p,stroke:e,"stroke-width":o.toString()}),null!==i?{"stroke-linecap":i}:{})},n}(bt),St=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)},_t=function(t){function n(n){return void 0===n&&(n={}),t.call(this,jt({points:[],color:"#000000",fill:"none",width:10,linecap:null,drawn:!0},n))||this}return St(n,t),n.prototype.tagName=function(){return"path"},n.prototype.attributes=function(){var n=this,e=this.props,r=e.color,o=e.drawn,i=e.fill,a=e.width,s=e.linecap,l=this.props.points.map((function(t){return n.positionInPresentation(t)})).map((function(t,n){var e=0===n?"M":"L",r=t.x,o=t.y;return"".concat(e," ").concat(r," ").concat(o)})).join(" ");return jt(jt(jt({},t.prototype.attributes.call(this)),{d:l,fill:o?i:"none",stroke:r,"stroke-width":o?a.toString():"0"}),null!==s?{"stroke-linecap":s}:{})},n.prototype.animate=function(n,e,r,o){var i=this;void 0===e&&(e={}),void 0===r&&(r=null),void 0===o&&(o=!0);var a=n.drawn,s=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}(n,["drawn"]);return void 0===a?t.prototype.animate.call(this,s,e,r,o):function(n){var a,l,u;i.drawOn({drawDuration:null!==(a=e.duration)&&void 0!==a?a:1e3,fillDuration:null!==(l=e.fillDuration)&&void 0!==l?l:300,easing:null!==(u=e.easing)&&void 0!==u?u:"linear"})(n),Object.keys(s).length>0&&t.prototype.animate.call(i,s,e,r,o)(n)}},n.prototype.drawOn=function(t){var n=this;return void 0===t&&(t={}),function(e){var r,o,i,a;n.props.drawn=!0;var s=n.element(),l=s.getTotalLength(),u=null!==(r=t.drawDuration)&&void 0!==r?r:1e3;s.setAttribute("stroke-dashoffset","".concat(l)),s.setAttribute("stroke-dasharray","".concat(l)),s.setAttribute("stroke-width","".concat(n.props.width)),e({animate:!0,element:s,attributes:{"stroke-dashoffset":"0"},animationParams:{duration:u,easing:null!==(o=t.easing)&&void 0!==o?o:"linear"}}),"none"!==n.props.fill&&e({animate:!0,delay:u,element:s,attributes:{fill:n.props.fill,"stroke-dasharray":"none"},animationParams:{duration:null!==(i=t.fillDuration)&&void 0!==i?i:1e3,easing:null!==(a=t.easing)&&void 0!==a?a:"linear"}})}},n}(bt),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)}}(),kt=function(){return kt=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},kt.apply(this,arguments)},Pt=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,kt({points:n,fill:"#000000",borderWidth:0,borderColor:"#000000"},e))||this}return Ct(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 kt(kt(kt({},t.prototype.attributes.call(this)),{points:a,fill:r}),o>0?{"stroke-width":o.toString(),stroke:i}:{})},n}(bt),At=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)},Mt=function(t){function n(n){void 0===n&&(n={});var e,r,o,i=this,a=null!==(e=n.width)&&void 0!==e?e:10,s=null!==(r=n.arrowSize)&&void 0!==r?r:4*a,l=null!==(o=n.opacity)&&void 0!==o?o:!1===n.drawn?0:1;return(i=t.call(this,Et({start:{x:0,y:0},end:{x:100,y:100},color:"#000000",width:a,arrowSize:s,opacity:l,filledHead:!0,doubledHead:!1,drawn:!0,padStart:{x:0,y:0},padEnd:{x:0,y:0}},n))||this).line=null,i.arrowhead=null,i}return At(n,t),n.prototype.tagName=function(){return"g"},n.prototype.calculateShapes=function(t){var n,e,r,o,i=t.arrowSize,a=t.drawn,s=t.doubledHead,l=t.filledHead,u=t.growFromCenter,c=this.positionInPresentation(t.start),p=this.positionInPresentation(t.end);c.x+=null!==(n=t.padStart.x)&&void 0!==n?n:0,c.y+=null!==(e=t.padStart.y)&&void 0!==e?e:0,p.x+=null!==(r=t.padEnd.x)&&void 0!==r?r:0,p.y+=null!==(o=t.padEnd.y)&&void 0!==o?o:0;var f=Math.atan2(p.y-c.y,p.x-c.x),h={x:(c.x+p.x)/2,y:(c.y+p.y)/2},d=u?h:c,y=a?p:{x:d.x+i*Math.cos(f),y:d.y+i*Math.sin(f)},v=l?Math.PI/6:Math.PI/4.5,g={x:y.x-i*Math.cos(f-v),y:y.y-i*Math.sin(f-v)},m={x:y.x-i*Math.cos(f+v),y:y.y-i*Math.sin(f+v)},b=t.filledHead?2*i/3:0,w=a?{x:p.x-b*Math.cos(f),y:p.y-b*Math.sin(f)}:{x:d.x+.8*i*Math.cos(f),y:d.y+.8*i*Math.sin(f)},O=[];if(s){var x=a?c:d,S={x:x.x+i*Math.cos(f-v),y:x.y+i*Math.sin(f-v)},j={x:x.x+i*Math.cos(f+v),y:x.y+i*Math.sin(f+v)};O.push(S,x,j),l&&(c={x:c.x+b*Math.cos(f),y:c.y+b*Math.sin(f)})}return{line:{start:!a&&u?{x:d.x+b*Math.cos(f),y:d.y+b*Math.sin(f)}:c,end:w},arrowhead:[g,y,m],doubledArrowhead:O}},n.prototype.children=function(){var t=this.props,n=t.color,e=t.width,r=t.filledHead,o=t.doubledHead,i=this.calculateShapes(this.props);return this.line=new xt({start:i.line.start,end:i.line.end,color:n,width:e}),this.line.generate(this._presentation),this.arrowhead=r?new Pt(i.arrowhead,{fill:n,borderWidth:0,borderColor:n}):new _t({points:i.arrowhead,color:n,width:e}),this.arrowhead.generate(this._presentation),o&&(this.doubledArrowhead=r?new Pt(i.doubledArrowhead,{fill:n,borderWidth:0,borderColor:n}):new _t({points:i.doubledArrowhead,color:n,width:e}),this.doubledArrowhead.generate(this._presentation)),function(t,n,e){if(e||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return t.concat(r||Array.prototype.slice.call(n))}([this.line.element(),this.arrowhead.element()],this.doubledArrowhead?[this.doubledArrowhead.element()]:[],!0)},n.prototype.animate=function(n,e,r,o){var i=this;void 0===e&&(e={}),void 0===r&&(r=null),void 0===o&&(o=!0);var a=n.start,s=n.end,l=n.drawn,u=n.color,c=n.width,p=n.arrowSize,f=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}(n,["start","end","drawn","color","width","arrowSize"]),h=Object.fromEntries(Object.entries({start:a,end:s,drawn:l,color:u,width:c,arrowSize:p}).filter((function(t){return t[0],void 0!==t[1]})));return function(n){l&&!("opacity"in f)&&0===i.props.opacity&&i.set({opacity:1})(n),0!==Object.keys(f).length&&t.prototype.animate.call(i,f,e,r,o)(n),0!==Object.keys(h).length&&i.animateArrow(h,e,r,o)(n)}},n.prototype.draw=function(t){return void 0===t&&(t={}),this.animate({drawn:!0},t)},n.prototype.animateArrow=function(t,n,e,r){var o=this;void 0===n&&(n={}),void 0===e&&(e=null),void 0===r&&(r=!0);var i=Et(Et({},this.props),t),a=this.calculateShapes(i);return function(e){var r=o.line.animate(Et(Et({start:a.line.start,end:a.line.end},t.color?{color:t.color}:{}),t.width?{width:t.width}:{}),n),i=o.arrowhead.animate(Et({points:a.arrowhead},t.color?{fill:t.color}:{}),n),s=o.doubledArrowhead?o.doubledArrowhead.animate(Et({points:a.doubledArrowhead},t.color?{fill:t.color}:{}),n):function(){};r(e),i(e),s(e)}},n}(bt),It=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)}}(),Tt=function(){return Tt=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},Tt.apply(this,arguments)},Bt=function(t){function n(n){return void 0===n&&(n={}),t.call(this,Tt({fill:"#000000",radius:100,borderWidth:0,borderColor:"#000000",drawn:!0},n))||this}return It(n,t),n.prototype.tagName=function(){return"circle"},n.prototype.attributes=function(){var n=this.props,r=n.drawn,o=n.position,i=n.radius,a=n.fill,s=n.borderWidth,l=n.borderColor,u=this.positionAttributes(new e(o,2*i,2*i)),c=u.x,p=u.y;return Tt(Tt(Tt(Tt({},t.prototype.attributes.call(this)),{fill:a,r:i.toString(),cx:(c+i).toString(),cy:(p+i).toString()}),s>0?{"stroke-width":s.toString(),stroke:l}:{}),r?{}:{stroke:"none",fill:"none"})},n.prototype.animate=function(n,e,r,o){var i=this;void 0===e&&(e={}),void 0===r&&(r=null),void 0===o&&(o=!0);var a=n.drawn,s=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}(n,["drawn"]);return void 0===a?t.prototype.animate.call(this,s,e,r,o):function(n){var a,l,u;i.drawOn({drawDuration:null!==(a=e.duration)&&void 0!==a?a:1e3,fillDuration:null!==(l=e.fillDuration)&&void 0!==l?l:300,easing:null!==(u=e.easing)&&void 0!==u?u:"linear"})(n),Object.keys(s).length>0&&t.prototype.animate.call(i,s,e,r,o)(n)}},n.prototype.drawOn=function(t){var n=this;return void 0===t&&(t={}),function(e){var r,o,i,a=n.props,s=a.borderColor,l=a.borderWidth,u=a.fill;n.props.drawn=!0;var c,p=n.element();try{c=p.getTotalLength()}catch(t){c=0}var f=null!==(r=t.drawDuration)&&void 0!==r?r:1e3;p.setAttribute("stroke-dashoffset","".concat(.25*c)),p.setAttribute("stroke-dasharray","0, ".concat(c)),p.setAttribute("stroke",s),e({animate:!0,element:p,attributes:{"stroke-dasharray":"".concat(c,", 0")},animationParams:{duration:f,easing:null!==(o=t.easing)&&void 0!==o?o:"linear"},updateCallback:function(){l>0&&p.setAttribute("stroke",s),p.setAttribute("fill",u)}}),"none"!==n.props.fill&&e({animate:!0,delay:f,element:p,attributes:{fill:n.props.fill,"stroke-dashoffset":"none","stroke-dasharray":"none"},animationParams:{duration:null!==(i=t.fillDuration)&&void 0!==i?i:500,easing:"linear"}})}},n}(bt),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)}}(),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)},Nt=function(t){function n(n,e,r){return void 0===e&&(e={}),void 0===r&&(r=null),t.call(this,Dt({objects:n,position:{x:0,y:0},positioned:null===r?"position"in e:r,rotation:0,rotationOrigin:{x:0,y:0},scale:1,skewX:0,skewY:0},e))||this}return Lt(n,t),n.prototype.tagName=function(){return"g"},n.prototype.attributes=function(){return Dt({},t.prototype.attributes.call(this))},n.prototype.additionalAttributes=function(){var t=this.props,n=t.rotation,r=t.rotationOrigin,o=t.scale,i=t.skewX,a=t.skewY,s="rotate(".concat(n,", ").concat(r.x,", ").concat(r.y,")"),l="scale(".concat(o,")"),u="".concat(0!==i?"skewX(".concat(i,")"):""," ").concat(0!==a?"skewY(".concat(a,")"):"");if(!this.props.positioned){var c=this.positionInPresentation(this.props.position),p=c.x,f=c.y;return{transform:"translate(".concat(p,", ").concat(f,") ").concat(s," ").concat(l," ").concat(u)}}var h=this._presentation.computeRenderedBoundingBox(this.sizingElement());h.width*=o,h.height*=o;var d=this.positionInPresentation(this.props.position),y=d.x,v=d.y,g=this.anchorBoundingBox(new e({x:y,y:v},h.width,h.height)),m=g.origin.x-h.origin.x,b=g.origin.y-h.origin.y;return{transform:"translate(".concat(m,", ").concat(b,") ").concat(s," ").concat(l," ").concat(u)}},n.prototype.sizingElement=function(){return this._element},n.prototype.children=function(){var t=this;return this.props.objects.map((function(n){return n.generate(t._presentation),n._element}))},n}(bt),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)}}(),zt=function(t){function n(n){var e=this,r=n.rows,o=void 0===r?1:r,i=n.cols,a=void 0===i?1:i,s=n.spacing,l=void 0===s?{x:0,y:0}:s,u=n.origin,c=void 0===u?{x:0,y:0}:u,p=n.objects,f=void 0===p?function(){return null}:p,h=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}(n,["rows","cols","spacing","origin","objects"]);void 0===l.x&&(l.x=0),void 0===l.y&&(l.y=0);for(var d=[],y=0;y<o;y++){for(var v=[],g=0;g<a;g++){var m=f(y,g);null!==m&&(m.props.position.x=c.x+l.x*g,m.props.position.y=c.y+l.y*y),v.push(m)}d.push(v)}return e=t.call(this,function(t,n,e){if(e||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return t.concat(r||Array.prototype.slice.call(n))}([],d.flat().filter((function(t){return null!==t})),!0),h)||this,e.objects=d,e}return Ft(n,t),n}(Nt),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)}}(),Wt=function(){return Wt=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},Wt.apply(this,arguments)},qt=function(t){function n(n){return void 0===n&&(n={}),t.call(this,Wt({url:"https://wikipedia.org/",width:2500,height:1500,scale:3,backgroundColor:"#ffffff",pointerEvents:"auto"},n))||this}return Ht(n,t),n.prototype.tagName=function(){return"foreignObject"},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,l=a.y;return Wt(Wt({},t.prototype.attributes.call(this)),{x:s.toString(),y:l.toString(),width:o.toString(),height:i.toString()})},n.prototype.styles=function(){return Wt(Wt(Wt({},t.prototype.styles.call(this)),{"background-color":this.props.backgroundColor,"pointer-events":this.props.pointerEvents}),0===this.props.opacity?{"pointer-events":"none"}:{})},n.prototype.children=function(){var t=document.createElement("iframe");t.src=this.props.url;var n=(100/this.props.scale).toFixed(2)+"%";return t.style.width=n,t.style.height=n,t.style.transform="scale(".concat(this.props.scale,")"),t.style.transformOrigin="top left",[t]},n}(bt),Rt=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)}}(),Vt=function(){return Vt=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},Vt.apply(this,arguments)},Gt=function(t){function n(e,r){return void 0===r&&(r={}),n.prefetch(e),t.call(this,Vt({href:e,width:100,height:100,rounding:0},r))||this}return Rt(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)),l=s.x,u=s.y;return Vt(Vt({},t.prototype.attributes.call(this)),{href:o,width:i.toString(),height:a.toString(),x:l.toString(),y:u.toString()})},n.prototype.styles=function(){var n=this.props.rounding;return Vt(Vt({},t.prototype.styles.call(this)),0!==n?{"clip-path":"inset(0px round ".concat(n,"px)")}:{})},n.prefetch=function(t){var n=function(){var n=document.createElement("img");n.src=t,n.style.display="none",document.body.appendChild(n),n.addEventListener("load",(function(){n.remove()}))};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",n):n()},n}(bt),Yt=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)}}(),Kt=function(){return Kt=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},Kt.apply(this,arguments)},Xt=function(t){function n(e,r){void 0===r&&(r={});var o=t.call(this,Kt({id:"mask-".concat(n.maskIndex++),objects:e},r))||this;return o.id=o.props.id,o}return Yt(n,t),n.prototype.tagName=function(){return"mask"},n.prototype.attributes=function(){return{id:this.id}},n.prototype.children=function(){var t=this;return this.props.objects.map((function(n){return n.generate(t._presentation),n._element}))},n.maskIndex=0,n}(bt),$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)}}(),Ut=function(){return Ut=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},Ut.apply(this,arguments)},Zt=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,Ut({content:n,width:1e3,height:1e3,fontSize:100,fontFamily:"Arial",fontStyle:"normal",fontWeight:"normal",align:"left",lineHeight:null,color:"#000000"},e))||this}return $t(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 Ut(Ut({},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,n=t.content,e=t.fontStyle,r=t.fontWeight,o=t.align,i=t.lineHeight,a=document.createElement("div"),s=Ut(Ut(Ut(Ut(Ut({"font-family":'"'.concat(this.props.fontFamily,'"'),"font-size":"".concat(this.props.fontSize,"px")},"normal"!==e?{"font-style":e}:{}),"normal"!==r?{"font-weight":r.toString()}:{}),"left"!==o?{"text-align":o}:{}),null!==i?{"line-height":i.toString()}:{}),{color:this.props.color}),l=0,u=Object.entries(s);l<u.length;l++){var c=u[l],p=c[0],f=c[1];void 0!==f&&a.style.setProperty(p,f.toString())}if("string"==typeof n)a.textContent=n;else for(var h=0,d=n;h<d.length;h++){var y=d[h],v=document.createElement("p");v.textContent=y,a.appendChild(v)}return[a]},n.prototype.additionalAttributes=function(){var n=this.computeRenderedBoundingBox(this.element(),this._children),e=this.positionAttributes(n),r=e.x,o=e.y;return Ut(Ut({},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}(bt),Qt=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)},tn=function(t){function n(n){void 0===n&&(n={});var e=t.call(this,Jt({width:null,height:null,scale:1,align:"left"},n))||this;return e.videoElement=null,e}return Qt(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,i=this._presentation.options.width,a=this._presentation.options.height;return Jt(Jt({},t.prototype.attributes.call(this)),{x:e.x.toString(),y:e.y.toString(),width:(null===r?i:r).toString(),height:(null===o?a:o).toString()})},n.prototype.styles=function(){var n=this.props.align;return Jt(Jt({},t.prototype.styles.call(this)),{"text-align":n})},n.prototype.children=function(){var t=this,n=this.props,e=n.scale,r=n.align,o=document.createElement("video");return this.videoElement=o,o.autoplay=!0,o.style.transform="scale(".concat(e,")"),o.style.transformOrigin="left"===r?"top left":"center"===r?"top center":"top right",navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"window"},audio:!1}).then((function(n){n.getVideoTracks()[0].onended=function(){o.style.display="none"},o.srcObject=n,o.play(),t._presentation.slideCleanupHandlers.push((function(){o.srcObject.getTracks().forEach((function(t){return t.stop()})),o.style.display="none",o.srcObject=null}))})).catch((function(t){console.error("Could not start screen capture -",t)})),[o]},n}(bt);function nn(t){return t.replace(/^\s+/g,(function(t){return t.replace(/ /g," ")}))}function en(t){if("string"==typeof t)return nn(t);for(var n=[],e=0,r=t;e<r.length;e++){var o=r[e];if("string"!=typeof o)if(0!==o.length){var i=Array.from(o),a=i[0];i[0]="string"==typeof a?nn(a):[nn(a[0]),i[0][1]],n.push(i)}else n.push(o);else n.push(nn(o))}return n}function rn(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 l=document.createElementNS("http://www.w3.org/2000/svg","tspan");if(l.setAttribute("x","0"),l.setAttribute("text-anchor",e),o>1&&l.setAttribute("dy",n),0===s.length||1===s.length&&""===s[0])l.appendChild(document.createTextNode(" ")),r.push(l);else if("string"!=typeof s){for(var u=0,c=s;u<c.length;u++){var p=c[u];if("string"==typeof p)l.appendChild(document.createTextNode(p));else{var f=p[0],h=p[1],d=document.createElementNS("http://www.w3.org/2000/svg","tspan");d.textContent=f;for(var y={fill:h.color,dy:h.dy,"text-decoration":h.textDecoration},v=0,g=Object.entries(y);v<g.length;v++){var m=g[v],b=m[0];void 0!==(S=m[1])&&d.setAttribute(b,S.toString())}var w={"font-family":h.fontFamily?'"'.concat(h.fontFamily,'"'):void 0,"font-size":h.fontSize,"font-weight":h.fontWeight,"font-style":h.fontStyle};!0===h.superscript?(w["baseline-shift"]="super",void 0===w["font-size"]&&(w["font-size"]="50%")):!0===h.subscript&&(w["baseline-shift"]="sub",void 0===w["font-size"]&&(w["font-size"]="50%")),!0===h.smallCaps&&(w["font-variant"]="small-caps");for(var O=0,x=Object.entries(w);O<x.length;O++){var S,j=x[O];b=j[0],void 0!==(S=j[1])&&d.style.setProperty(b,S.toString())}l.appendChild(d)}}r.push(l)}else l.appendChild(document.createTextNode(s)),r.push(l)}return r}var on=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)}}(),an=function(){return an=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},an.apply(this,arguments)},sn=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,an({content:n,color:"#000000",fontSize:150,fontStyle:"normal",fontWeight:"normal",fontFamily:"Arial",baselineHeight:.22,dominantBaseline:"ideographic",textDecoration:"none",smallCaps:!1,length:null,align:"left",lineSpacing:"1em",ligatures:null},e))||this}return on(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 an(an(an({},t.prototype.attributes.call(this)),"none"!==r?{"text-decoration":r}:{}),{fill:e})},n.prototype.additionalAttributes=function(){var n=this.computeRenderedBoundingBox(this.element(),this.childrenWithContentLength(this.contentLength())),e=this.positionAttributes(n),r=e.x,o=e.y;return this.isRichText()&&("center"===this.props.align?r+=n.width/2:"right"===this.props.align&&(r+=n.width)),o-=this.props.fontSize*this.props.baselineHeight,an(an({},t.prototype.additionalAttributes.call(this)),this.isRichText()?{transform:"translate(".concat(r.toString()," ").concat(o.toString(),")"),y:this.computeRenderedBoundingBox(this.element(),this.childrenWithContentLength(1)).height.toString()}:{x:r.toString(),y:(o+n.height).toString()})},n.prototype.styles=function(){var n=this.props,e=n.fontSize,r=n.fontFamily,o=n.fontStyle,i=n.fontWeight,a=n.ligatures,s=n.smallCaps;return an(an(an(an(an(an({},t.prototype.styles.call(this)),"normal"!==o?{"font-style":o}:{}),"normal"!==i?{"font-weight":i.toString()}:{}),null!==a?{"font-variant-ligatures":a}:{}),!0===s?{"font-variant":"small-caps"}:{}),{"font-size":"".concat(e,"px"),"font-family":'"'.concat(r,'"'),"white-space":"pre"})},n.prototype.children=function(){var t,n=null!==(t=this.props.length)&&void 0!==t?t:this.contentLength();return this.childrenWithContentLength(n)},n.prototype.requiresChildrenUpdate=function(t){return"content"in t&&t.content!==this.props.content||"length"in t&&t.length!==this.props.length},n.prototype.contentLength=function(t){if(void 0===t&&(t=null),"string"==typeof this.props.content)return this.props.content.length;var n=this.props.content;return null!==t&&(n=n.slice(0,t)),n.reduce((function(t,n){return"string"==typeof n?t+n.length:t+n.reduce((function(t,n){return t+("string"==typeof n?n:n[0]).length}),0)}),0)},n.prototype.childrenWithContentLength=function(t){var n=this.props.content;if("string"==typeof n){var e=null===t?n:n.slice(0,t);return[document.createTextNode(e)]}var r="left"===this.props.align?"start":"center"===this.props.align?"middle":"end";if(null===t)return rn(n,this.props.lineSpacing,r);for(var o=t,i=[],a=0,s=n;a<s.length;a++){var l=s[a];if("string"==typeof l)l.length<=o?(i.push(l),o-=l.length):(i.push(l.slice(0,o)),o=0);else{for(var u=[],c=0,p=l;c<p.length;c++){var f=p[c];if("string"==typeof f?f.length<=o?(u.push(f),o-=f.length):(u.push(f.slice(0,o)),o=0):f[0].length<=o?(u.push(f),o-=f[0].length):(u.push([f[0].slice(0,o),f[1]]),o=0),0===o)break}i.push(u)}if(0===o)break}return rn(i,this.props.lineSpacing,r)},n.prototype.regenerateChildren=function(){this._children=this.children(),this._element.innerHTML="";for(var t=0,n=this._children;t<n.length;t++){var e=n[t];this._element.appendChild(e)}},n.prototype.animate=function(n,e,r,o){var i=this;void 0===e&&(e={}),void 0===r&&(r=null),void 0===o&&(o=!0);var a=n.length,s=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}(n,["length"]);return void 0===a?t.prototype.animate.call(this,s,e,r,o):function(n){var l;i.writeOn(a,null!==(l=e.duration)&&void 0!==l?l:1e3,o)(n),Object.keys(s).length>0&&t.prototype.animate.call(i,s,e,r,o)(n)}},n.prototype.writeOn=function(t,n,e){var r=this;void 0===t&&(t=null),void 0===n&&(n=1e3),void 0===e&&(e=!0);var o=null,i=null,a=null,s=function(e){var l;null===a&&(a=e),null===o&&(o=null!==(l=r.props.length)&&void 0!==l?l:r.contentLength()),null===i&&(i=null!=t?t:r.contentLength());var u=e-a,c=Math.min(u/n,1);r.props.length=Math.floor(o+(i-o)*c),r.regenerateChildren(),c<1&&requestAnimationFrame(s)};return function(n){return n({animate:e,animateCallback:function(){a=null,o=null,i=null,requestAnimationFrame(s)},updateCallback:function(){a=null,o=null,i=null,r.props.length=t,r.regenerateChildren()}})}},n.prototype.generateChildrenAndReposition=function(){for(var t=this.element(),n=0,e=Object.entries(this.attributes());n<e.length;n++){var r=e[n],o=r[0],i=r[1];t.setAttribute(o,i)}this.regenerateChildren();for(var a=0,s=Object.entries(this.additionalAttributes());a<s.length;a++){var l=s[a];o=l[0],i=l[1],t.setAttribute(o,i)}},n.prototype.animateContent=function(t,n){var e=this;void 0===n&&(n=1e3);var r=null,o=function(i){null===r&&(r=i);var a=i-r,s=Math.min(a/n,1);e.props.content=t(s),e.generateChildrenAndReposition(),s<1&&requestAnimationFrame(o)};return function(n){return n({animate:!0,animateCallback:function(){r=null,requestAnimationFrame(o)},updateCallback:function(){r=null,e.props.content=t(1),e.generateChildrenAndReposition()}})}},n}(bt),ln=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)}}(),un=function(){return un=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},un.apply(this,arguments)},cn=function(t){function n(n){return void 0===n&&(n={}),t.call(this,un({fill:"#000000",width:100,height:100,rounding:0,borderWidth:0,borderColor:"#000000",drawn:!0},n))||this}return ln(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,l=n.borderWidth,u=n.borderColor,c=n.drawn,p=this.positionAttributes(new e(r,o,i)),f=p.x,h=p.y;return un(un(un(un({},t.prototype.attributes.call(this)),{fill:a,width:o.toString(),height:i.toString(),rx:s.toString(),x:f.toString(),y:h.toString()}),l>0?{"stroke-width":l.toString(),stroke:u}:{}),c?{}:{stroke:"none",fill:"none"})},n.prototype.animate=function(n,e,r,o){var i=this;void 0===e&&(e={}),void 0===r&&(r=null),void 0===o&&(o=!0);var a=n.drawn,s=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}(n,["drawn"]);return void 0===a?t.prototype.animate.call(this,s,e,r,o):function(n){var a,l,u;i.drawOn({drawDuration:null!==(a=e.duration)&&void 0!==a?a:1e3,fillDuration:null!==(l=e.fillDuration)&&void 0!==l?l:300,easing:null!==(u=e.easing)&&void 0!==u?u:"linear"})(n),Object.keys(s).length>0&&t.prototype.animate.call(i,s,e,r,o)(n)}},n.prototype.drawOn=function(t){var n=this;return void 0===t&&(t={}),function(e){var r,o,i,a=n.props,s=a.borderColor,l=a.borderWidth,u=a.fill;n.props.drawn=!0;var c,p=n.element();try{c=p.getTotalLength()}catch(t){c=0}var f=null!==(r=t.drawDuration)&&void 0!==r?r:1e3;p.setAttribute("stroke-dashoffset","".concat(c)),p.setAttribute("stroke-dasharray","".concat(c)),p.setAttribute("stroke",s),e({animate:!0,element:p,attributes:{"stroke-dashoffset":"0"},animationParams:{duration:f,easing:null!==(o=t.easing)&&void 0!==o?o:"linear"},updateCallback:function(){l>0&&p.setAttribute("stroke",s),p.setAttribute("fill",u)}}),"none"!==n.props.fill&&e({animate:!0,delay:f,element:p,attributes:{fill:n.props.fill,"stroke-dasharray":"none"},animationParams:{duration:null!==(i=t.fillDuration)&&void 0!==i?i:500,easing:"linear"}})}},n}(bt),pn=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)}}(),fn=function(){return fn=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},fn.apply(this,arguments)},hn=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,fn({svg:n,width:100,height:100},e))||this}return pn(n,t),n.svgNode=function(t){return(new DOMParser).parseFromString(t,"image/svg+xml").documentElement},n.prototype.tagName=function(){return"svg"},n.prototype.createElement=function(){var t=this.constructor.svgNode(this.props.svg);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,l=a.y;return fn(fn({},t.prototype.attributes.call(this)),{width:o.toString(),height:i.toString(),x:s.toString(),y:l.toString()})},n.prototype.children=function(){return this.parsedChildren},n.prototype.animatePath=function(t,n,e,r){var o=this;return void 0===e&&(e=500),void 0===r&&(r=!0),function(i){var a,s=o.element().querySelector(t);i(fn(fn({animate:r,element:s},n),{animationParams:fn({duration:e,easing:"linear"},null!==(a=n.animationParams)&&void 0!==a?a:{})}))}},n.prototype.setPath=function(t,n){return this.animatePath(t,n,0,!1)},n.prototype.drawOn=function(t,n){var e=this;void 0===n&&(n={});var r=fn({color:"#000000",strokeWidth:5,fill:!0,fillColor:null,drawDuration:1e3,fillDuration:1e3,easing:"linear",endWithoutStroke:!0},n),o=r.color,i=r.strokeWidth,a=r.fill,s=r.fillColor,l=r.drawDuration,u=r.fillDuration,c=r.easing,p=r.endWithoutStroke;return function(r){var f,h=e.element().querySelector(t);if(!h)throw new Error("Path element with selector ".concat(t," not found"));var d=null!==(f=n.pathLength)&&void 0!==f?f:h.getTotalLength();h.setAttribute("stroke-dashoffset","".concat(d)),h.setAttribute("stroke-dasharray","".concat(d)),h.setAttribute("stroke-width","".concat(i)),h.setAttribute("stroke",o),r({animate:!0,element:h,attributes:{"stroke-dashoffset":"0"},animationParams:{duration:l,easing:c}}),a&&r({animate:!0,delay:l,element:h,attributes:fn({fill:null!=s?s:o,"stroke-dasharray":"none"},p?{"stroke-width":"0"}:{}),animationParams:{duration:u,easing:c}})}},n}(bt),dn=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)}}(),yn=function(){return yn=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},yn.apply(this,arguments)},vn=function(t,n,e){if(e||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return t.concat(r||Array.prototype.slice.call(n))},gn=function(t){function n(n,e,r){var o,i,a;void 0===e&&(e={}),void 0===r&&(r={});var s=yn({showBullets:!0,bulletSize:35,bulletColor:"#000000",lineSpacing:90,bulletOffset:75,textOffset:75},e),l=s.showBullets,u=s.bulletSize,c=s.bulletColor,p=s.lineSpacing,f=s.bulletOffset,h=s.textOffset,d=null!==(o=r.fontSize)&&void 0!==o?o:150,y=null!==(i=e.lineHeight)&&void 0!==i?i:d,v=null!==(a=e.bulletVerticalOffset)&&void 0!==a?a:y/3,g=0,m=n.map((function(t){var n=t instanceof Array,e=new Bt({radius:u,fill:c,position:{x:0,y:v},anchor:"topleft"}),o=new sn(t,yn({position:{x:2*u+h,y:0},anchor:"topleft",fontSize:d},r)),i=new Nt(vn(vn([],l?[e]:[],!0),[o],!1),{position:{x:0,y:g}}),a=n?t.length:1;return g+=a*y+p,i}));return t.call(this,m,yn({position:{x:f,y:.6},anchor:"left"},e))||this}return dn(n,t),n}(Nt),mn=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)}}(),bn=function(){return bn=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},bn.apply(this,arguments)},wn=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,n,bn({position:{x:.5,y:.5},anchor:"center",fontSize:250,fontWeight:700},e))||this}return mn(n,t),n}(sn),On=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)}}(),xn=function(){return xn=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},xn.apply(this,arguments)},Sn=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,n,xn({position:{x:.02,y:.04},anchor:"topleft",fontSize:200,fontWeight:700},e))||this}return On(n,t),n}(sn);function jn(t,n,e){return Math.min(Math.max(t,n),e)}function _n(t){return jn(t,0,1)}function Cn(t){var n=jn(t,0,1);return Math.pow(n,2)*(3-2*n)}return n})()));
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Group, GroupProps } from "../objects/group";
|
|
2
|
+
import { Rectangle, RectangleProps } from "../objects/rectangle";
|
|
3
|
+
import { Text, TextContent, TextProps } from "../objects/text";
|
|
4
|
+
import { Anchor } from "../presentation/object";
|
|
5
|
+
import { Presentation } from "../presentation/presentation";
|
|
6
|
+
import { BuildFunction } from "../util/animation";
|
|
7
|
+
import { Position } from "../util/position";
|
|
8
|
+
/**
|
|
9
|
+
* Region for syntax highlighting.
|
|
10
|
+
*
|
|
11
|
+
* The `presenter-syntax-highlight` script can be used to generate a list of
|
|
12
|
+
* highlight regions for each line of code. This allows code to be
|
|
13
|
+
* syntax-highlighted on the slide.
|
|
14
|
+
*/
|
|
15
|
+
export interface CodeHighlightRegion {
|
|
16
|
+
start: number;
|
|
17
|
+
end: number;
|
|
18
|
+
color: string;
|
|
19
|
+
bold: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface CodeBlockProps {
|
|
22
|
+
code: string;
|
|
23
|
+
highlights: CodeHighlightRegion[][] | null;
|
|
24
|
+
length: number | null;
|
|
25
|
+
fontFamily: string;
|
|
26
|
+
fontSize: number;
|
|
27
|
+
textColor: string;
|
|
28
|
+
backgroundColor: string | null;
|
|
29
|
+
backgroundRounding: number;
|
|
30
|
+
padding: number;
|
|
31
|
+
lineSpacing: string;
|
|
32
|
+
lineHeight: number;
|
|
33
|
+
characterWidth: number;
|
|
34
|
+
lineCount: number | null;
|
|
35
|
+
colCount: number | null;
|
|
36
|
+
maskLines: boolean;
|
|
37
|
+
firstLine: number;
|
|
38
|
+
unfocusedOpacity: number;
|
|
39
|
+
lineNumbers: boolean;
|
|
40
|
+
firstLineNumber: number;
|
|
41
|
+
lineNumberColor: string;
|
|
42
|
+
focusColor: string;
|
|
43
|
+
focusOpacity: number;
|
|
44
|
+
focusRounding: number;
|
|
45
|
+
focusLineStart: number;
|
|
46
|
+
focusLineEnd: number;
|
|
47
|
+
focusColStart: number;
|
|
48
|
+
focusColEnd: number;
|
|
49
|
+
focusPaddingX: number;
|
|
50
|
+
focusOffsetX: number;
|
|
51
|
+
focusPaddingY: number;
|
|
52
|
+
focusOffsetY: number;
|
|
53
|
+
position: Position;
|
|
54
|
+
anchor: Anchor;
|
|
55
|
+
}
|
|
56
|
+
export declare class CodeBlock extends Group {
|
|
57
|
+
initialCodeBlockProps: CodeBlockProps;
|
|
58
|
+
codeBlockProps: CodeBlockProps;
|
|
59
|
+
background: Rectangle;
|
|
60
|
+
maskRect: Rectangle | null;
|
|
61
|
+
maskFocusRect: Rectangle | null;
|
|
62
|
+
codeContentGroup: Group;
|
|
63
|
+
focus: Rectangle;
|
|
64
|
+
text: Text;
|
|
65
|
+
lineNumbers: Text | null;
|
|
66
|
+
constructor(props?: Partial<CodeBlockProps>);
|
|
67
|
+
createElement(): SVGElement;
|
|
68
|
+
/**
|
|
69
|
+
* Animation of code block. Since a code block is made up of multiple
|
|
70
|
+
* elements (background, focus, text), we animate each element separately.
|
|
71
|
+
*/
|
|
72
|
+
animate(props: Partial<CodeBlockProps>, animationParams?: anime.AnimeParams, delay?: number | null, animate?: boolean): BuildFunction;
|
|
73
|
+
set(props: Partial<CodeBlockProps>, delay?: number | null): BuildFunction;
|
|
74
|
+
/**
|
|
75
|
+
* Given properties for the entire code block, compute properties for individual text elements.
|
|
76
|
+
*/
|
|
77
|
+
static getComponentProps(props: CodeBlockProps): {
|
|
78
|
+
group: Partial<GroupProps>;
|
|
79
|
+
background: Partial<RectangleProps>;
|
|
80
|
+
mask: Partial<RectangleProps>;
|
|
81
|
+
maskFocus: Partial<RectangleProps>;
|
|
82
|
+
focus: Partial<RectangleProps>;
|
|
83
|
+
text: Partial<TextProps>;
|
|
84
|
+
lineNumbers: Partial<TextProps> | null;
|
|
85
|
+
};
|
|
86
|
+
static buildTextContent(code: string, highlights: CodeHighlightRegion[][] | null): TextContent;
|
|
87
|
+
/**
|
|
88
|
+
* When code block is masked, we don't want to include the full text in
|
|
89
|
+
* the bounding box calculation. Instead, we want to use just visible
|
|
90
|
+
* background rectangle.
|
|
91
|
+
*/
|
|
92
|
+
sizingElement(): SVGGraphicsElement;
|
|
93
|
+
/**
|
|
94
|
+
* Given text properties, calculates the character width and line height for the font at that size.
|
|
95
|
+
* Can be pre-computed, then be used as input to a new CodeBlock.
|
|
96
|
+
*
|
|
97
|
+
* Sample usage in a presentation to determine text properties:
|
|
98
|
+
*
|
|
99
|
+
* console.log(CodeBlock.computePropsForText(presentation, {
|
|
100
|
+
* fontFamily: "Menlo",
|
|
101
|
+
* fontSize: 130,
|
|
102
|
+
* }));
|
|
103
|
+
*/
|
|
104
|
+
static computePropsForText(presentation: Presentation, textProps: Partial<TextProps>): {
|
|
105
|
+
lineHeight: number;
|
|
106
|
+
characterWidth: number;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./codeBlock";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "svg2pdf.js";
|
|
2
|
+
import { Presentation } from "../presentation/presentation";
|
|
3
|
+
/**
|
|
4
|
+
* Renders the SVG content of a single slide of a presentation to a PNG image.
|
|
5
|
+
*/
|
|
6
|
+
export declare function renderCurrentSlide(presentation: Presentation, filename: string): Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* Renders the SVG content of all slides in a presentation as PNG images.
|
|
9
|
+
*/
|
|
10
|
+
export declare function renderPresentationAsImages(presentation: Presentation): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Renders whole slide container (background, additional element canvas, svg)
|
|
13
|
+
* and sends to a server endpoint.
|
|
14
|
+
*
|
|
15
|
+
* When rendering all componenst of the slide container, the server endpoint
|
|
16
|
+
* is requried to perform additional image compositing to generate the
|
|
17
|
+
* render.
|
|
18
|
+
*/
|
|
19
|
+
export declare function exportCurrentSlideContainer(presentation: Presentation, filename: string, serverEndpoint: string): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Exports the whole slide content of all slides and sends to a server endpoint.
|
|
22
|
+
*/
|
|
23
|
+
export declare function exportAllSlides(presentation: Presentation, serverEndpoint: string): Promise<void>;
|
|
24
|
+
export declare function exportToPDF(presentation: Presentation, promptForConfirmation?: boolean): Promise<void>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export * from "./presentation/presentation";
|
|
2
|
+
export * from "./presentation/slide";
|
|
3
|
+
export * from "./presentation/object";
|
|
4
|
+
export * from "./objects/arrow";
|
|
5
|
+
export * from "./objects/circle";
|
|
6
|
+
export * from "./objects/grid";
|
|
7
|
+
export * from "./objects/group";
|
|
8
|
+
export * from "./objects/iframe";
|
|
9
|
+
export * from "./objects/image";
|
|
10
|
+
export * from "./objects/line";
|
|
11
|
+
export * from "./objects/mask";
|
|
12
|
+
export * from "./objects/paragraph";
|
|
13
|
+
export * from "./objects/polygon";
|
|
14
|
+
export * from "./objects/path";
|
|
15
|
+
export * from "./objects/screenCapture";
|
|
16
|
+
export * from "./objects/text";
|
|
17
|
+
export * from "./objects/rectangle";
|
|
18
|
+
export * from "./objects/vectorGraphic";
|
|
19
|
+
export * from "./library/bullets";
|
|
20
|
+
export * from "./library/mainTitle";
|
|
21
|
+
export * from "./library/slideTitle";
|
|
22
|
+
export * from "./util/animation";
|
|
23
|
+
export * from "./util/easing";
|
|
24
|
+
export * from "./util/position";
|
|
25
|
+
export * from "./util/richText";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Group, GroupProps } from "../objects/group";
|
|
2
|
+
import { TextContent, TextProps } from "../objects/text";
|
|
3
|
+
export interface BulletsProps extends GroupProps {
|
|
4
|
+
showBullets: boolean;
|
|
5
|
+
bulletSize: number;
|
|
6
|
+
bulletColor: string;
|
|
7
|
+
lineSpacing: number;
|
|
8
|
+
lineHeight: number | null;
|
|
9
|
+
bulletOffset: number;
|
|
10
|
+
textOffset: number;
|
|
11
|
+
bulletVerticalOffset: number;
|
|
12
|
+
}
|
|
13
|
+
export declare class Bullets extends Group {
|
|
14
|
+
constructor(items: TextContent[], props?: Partial<BulletsProps>, textProps?: Partial<TextProps>);
|
|
15
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { BuildFunction } from "../util/animation";
|
|
2
|
+
export interface MorphParams {
|
|
3
|
+
duration: number;
|
|
4
|
+
/**
|
|
5
|
+
* For smooth morph, we can define a maximum size for segments to use in
|
|
6
|
+
* interpolated animation. Lower values result in smoother animations, but
|
|
7
|
+
* are potentially less performant.
|
|
8
|
+
*
|
|
9
|
+
* Default is 10.
|
|
10
|
+
*/
|
|
11
|
+
maxSegmentLength: number;
|
|
12
|
+
/**
|
|
13
|
+
* For simple morph, easing is meant to be a string.
|
|
14
|
+
* For smooth morph, easing is meant to be a function over [0, 1].
|
|
15
|
+
*/
|
|
16
|
+
easing: string | ((value: number) => number);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Generates an animation that morphs one path into another, given a path
|
|
20
|
+
* interpolation function that computes intermediate path values.
|
|
21
|
+
*/
|
|
22
|
+
export declare function morphPath(sourceElement: Element | (() => Element), targetPath: string, pathInterpolator: (source: string, target: string) => (t: number) => string, morphParams: Partial<MorphParams>): BuildFunction;
|
|
23
|
+
/**
|
|
24
|
+
* Smoothly morphs one path into another. Attempts to intelligently
|
|
25
|
+
* interpolate between shapes smoothly, even if shapes don't correspond to
|
|
26
|
+
* each other closely or don't have the same number of points.
|
|
27
|
+
*/
|
|
28
|
+
export declare function morphPathSmooth(sourceElement: Element | (() => Element), targetPath: string, morphParams?: Partial<MorphParams>): BuildFunction;
|
|
29
|
+
/**
|
|
30
|
+
* Simply morphs one path into another. Points are translated directly, and
|
|
31
|
+
* both paths must have the same number of points for the animation to look
|
|
32
|
+
* correct. Works best if two paths correspond to each other closely.
|
|
33
|
+
*/
|
|
34
|
+
export declare function morphPathSimple(sourceElement: Element | (() => Element), targetPath: string, morphParams?: Partial<MorphParams>): BuildFunction;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ObjectProps, SlideObject } from "../presentation/object";
|
|
2
|
+
import { BuildFunction } from "../util/animation";
|
|
3
|
+
import { Position } from "../util/position";
|
|
4
|
+
import { Line } from "./line";
|
|
5
|
+
import { Path } from "./path";
|
|
6
|
+
import { Polygon } from "./polygon";
|
|
7
|
+
export interface ArrowProps extends ObjectProps {
|
|
8
|
+
start: Position;
|
|
9
|
+
end: Position;
|
|
10
|
+
color: string;
|
|
11
|
+
width: number;
|
|
12
|
+
arrowSize: number;
|
|
13
|
+
filledHead: boolean;
|
|
14
|
+
doubledHead: boolean;
|
|
15
|
+
growFromCenter: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Property describing whether the arrow has been fully drawn.
|
|
18
|
+
* If an arrow hasn't been drawn, it can be animated to draw in.
|
|
19
|
+
*/
|
|
20
|
+
drawn: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The start and end points can have "padding".
|
|
23
|
+
* This is equivalent to adding (x, y) values to the start and end points.
|
|
24
|
+
*
|
|
25
|
+
* This can be useful when drawing an arrow from an object at a particular
|
|
26
|
+
* location. The arrow's start/end point can match the object's, with some
|
|
27
|
+
* added padding so that the arrow doesn't overlap the object.
|
|
28
|
+
*
|
|
29
|
+
* It can also be useful if multiple arrows start or end at the same place,
|
|
30
|
+
* and you want to adjust their endpoints slightly to avoid overlap.
|
|
31
|
+
*/
|
|
32
|
+
padStart: Partial<Position>;
|
|
33
|
+
padEnd: Partial<Position>;
|
|
34
|
+
}
|
|
35
|
+
export declare class Arrow extends SlideObject<ArrowProps> {
|
|
36
|
+
line: Line | null;
|
|
37
|
+
arrowhead: Polygon | Path | null;
|
|
38
|
+
doubledArrowhead: Polygon | Path | null;
|
|
39
|
+
constructor(props?: Partial<ArrowProps>);
|
|
40
|
+
tagName(): string;
|
|
41
|
+
/**
|
|
42
|
+
* Computes coordinates for the line and arrowhead of the arrow.
|
|
43
|
+
*/
|
|
44
|
+
calculateShapes(props: ArrowProps): {
|
|
45
|
+
line: {
|
|
46
|
+
start: Position;
|
|
47
|
+
end: {
|
|
48
|
+
x: number;
|
|
49
|
+
y: number;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
arrowhead: Position[];
|
|
53
|
+
doubledArrowhead: Position[];
|
|
54
|
+
};
|
|
55
|
+
children(): Node[];
|
|
56
|
+
animate(props: Partial<ArrowProps>, animationParams?: anime.AnimeParams, delay?: number | null, animate?: boolean): BuildFunction;
|
|
57
|
+
draw(animationParams?: anime.AnimeParams): BuildFunction;
|
|
58
|
+
/**
|
|
59
|
+
* Returns animations for changes in arrowhead.
|
|
60
|
+
*/
|
|
61
|
+
animateArrow(arrowProps: Partial<ArrowProps>, animationParams?: anime.AnimeParams, delay?: number | null, animate?: boolean): BuildFunction;
|
|
62
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ObjectProps, SlideObject } from "../presentation/object";
|
|
2
|
+
import { BuildFunction } from "../util/animation";
|
|
3
|
+
export interface CircleProps extends ObjectProps {
|
|
4
|
+
fill: string;
|
|
5
|
+
radius: number;
|
|
6
|
+
borderWidth: number;
|
|
7
|
+
borderColor: string;
|
|
8
|
+
drawn: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface PathDrawOnProps {
|
|
11
|
+
drawDuration: number;
|
|
12
|
+
fillDuration: number;
|
|
13
|
+
easing: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class Circle extends SlideObject<CircleProps> {
|
|
16
|
+
constructor(props?: Partial<CircleProps>);
|
|
17
|
+
tagName(): string;
|
|
18
|
+
attributes(): Partial<Record<string, string>>;
|
|
19
|
+
animate(props: Partial<CircleProps>, animationParams?: anime.AnimeParams & {
|
|
20
|
+
fillDuration?: number;
|
|
21
|
+
}, delay?: number | null, animate?: boolean): BuildFunction;
|
|
22
|
+
drawOn(props?: Partial<PathDrawOnProps>): BuildFunction;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A grid of identical or similar objects.
|
|
3
|
+
*/
|
|
4
|
+
import { SlideObject } from "../presentation/object";
|
|
5
|
+
import { Position } from "../util/position";
|
|
6
|
+
import { Group, GroupProps } from "./group";
|
|
7
|
+
export interface GridProps extends Omit<GroupProps, "objects"> {
|
|
8
|
+
origin: Position;
|
|
9
|
+
spacing: Partial<Position>;
|
|
10
|
+
rows: number;
|
|
11
|
+
cols: number;
|
|
12
|
+
objects: (row: number, col: number) => SlideObject<any> | null;
|
|
13
|
+
}
|
|
14
|
+
export declare class Grid extends Group {
|
|
15
|
+
objects: (SlideObject<any> | null)[][];
|
|
16
|
+
constructor(props: Partial<GridProps>);
|
|
17
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ObjectProps, SlideObject } from "../presentation/object";
|
|
2
|
+
import { Position } from "../util/position";
|
|
3
|
+
export interface GroupProps extends ObjectProps {
|
|
4
|
+
/**
|
|
5
|
+
* A positioned group places the group's anchor at a particular coordinate.
|
|
6
|
+
* A non-positioned group uses the position as an offset for its children.
|
|
7
|
+
*/
|
|
8
|
+
positioned: boolean;
|
|
9
|
+
objects: SlideObject<any>[];
|
|
10
|
+
rotation: number;
|
|
11
|
+
rotationOrigin: Position;
|
|
12
|
+
scale: number;
|
|
13
|
+
skewX: number;
|
|
14
|
+
skewY: number;
|
|
15
|
+
}
|
|
16
|
+
export declare class Group extends SlideObject<GroupProps> {
|
|
17
|
+
constructor(objects: SlideObject<any>[], props?: Partial<GroupProps>, positioned?: boolean | null);
|
|
18
|
+
tagName(): string;
|
|
19
|
+
attributes(): Partial<Record<string, string>>;
|
|
20
|
+
additionalAttributes(): Partial<Record<string, string>>;
|
|
21
|
+
/**
|
|
22
|
+
* Returns the element to be used for computing the bounding box of the group.
|
|
23
|
+
* Allows overriding so that sometimes we can use custom rules for determining
|
|
24
|
+
* a group's bounding box.
|
|
25
|
+
*/
|
|
26
|
+
sizingElement(): SVGGraphicsElement;
|
|
27
|
+
children(): Node[];
|
|
28
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ObjectProps, SlideObject } from "../presentation/object";
|
|
2
|
+
export interface IFrameProps extends ObjectProps {
|
|
3
|
+
url: string;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
backgroundColor: string;
|
|
7
|
+
pointerEvents: string;
|
|
8
|
+
scale: number;
|
|
9
|
+
}
|
|
10
|
+
export declare class IFrame extends SlideObject<IFrameProps> {
|
|
11
|
+
constructor(props?: Partial<IFrameProps>);
|
|
12
|
+
tagName(): string;
|
|
13
|
+
attributes(): Partial<Record<string, string>>;
|
|
14
|
+
styles(): Partial<Record<string, string>>;
|
|
15
|
+
children(): Node[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ObjectProps, SlideObject } from "../presentation/object";
|
|
2
|
+
export interface ImageProps extends ObjectProps {
|
|
3
|
+
href: string;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
rounding: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class Image extends SlideObject<ImageProps> {
|
|
9
|
+
constructor(href: string, props?: Partial<ImageProps>);
|
|
10
|
+
tagName(): string;
|
|
11
|
+
attributes(): Partial<Record<string, string>>;
|
|
12
|
+
styles(): Partial<Record<string, string>>;
|
|
13
|
+
/**
|
|
14
|
+
* By default, browsers might not fetch an image until the image element is
|
|
15
|
+
* added to the DOM. Pre-fetching them when the image object is created
|
|
16
|
+
* means the image will be fetched before the slide is rendered, so there's
|
|
17
|
+
* no delay between the slide appearing and the image loading.
|
|
18
|
+
*/
|
|
19
|
+
static prefetch(href: string): void;
|
|
20
|
+
}
|