presenter 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/presenter-code.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.PresenterCode=n():t.PresenterCode=n()}(this,(()=>(()=>{"use strict";var t={d:(n,e)=>{for(var o in e)t.o(e,o)&&!t.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:e[o]})},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,{CodeBlock:()=>C});var e,o=function(){function t(t,n,e){this.origin=t,this.width=n,this.height=e}return t.fromElement=function(n){var e=n.getBBox();return new t({x:e.x,y:e.y},e.width,e.height)},t}(),r=function(){return r=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},r.apply(this,arguments)},i=function(){function t(t){this.props=r({position:{x:0,y:0},anchor:"topleft"},t),this.initialProps=r({},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 r({},void 0!==t?{mask:"url(#".concat(t,")")}:{})},t.prototype.additionalAttributes=function(){return{}},t.prototype.styles=function(){var t=this.props.opacity;return r({},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),e=n.x,r=n.y,i=this.anchorBoundingBox(new o({x:e,y:r},t.width,t.height));return{x:i.origin.x,y:i.origin.y}},t.prototype.generate=function(t){this.props=r({},this.initialProps),this._presentation=t;for(var n=this.createElement(),e=0,o=Object.entries(this.attributes());e<o.length;e++){var i=o[e],a=i[0],s=i[1];n.setAttribute(a,s)}for(var l=0,c=Object.entries(this.styles());l<c.length;l++){var u=c[l],p=u[0];s=u[1],n.style.setProperty(p,s)}this._children=this.children();for(var h=0,f=this._children;h<f.length;h++){var d=f[h];n.appendChild(d)}this._element=n;for(var g=0,y=Object.entries(this.additionalAttributes());g<y.length;g++){var m=y[g];a=m[0],s=m[1],n.setAttribute(a,s)}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,o){var i=this;return void 0===n&&(n={}),void 0===e&&(e=null),void 0===o&&(o=!0),function(a){if(null===i._presentation)throw new Error("Cannot animate object without presentation");var s=i.requiresChildrenUpdate(t);i.props=r(r({},i.props),t),s&&(i._children=i.children());var l=i.attributes(),c=i.styles(),u=i.additionalAttributes(),p=Object.fromEntries(Object.entries(l).filter((function(t){var n=t[0],e=t[1];return i._element.getAttribute(n)!==e}))),h=Object.fromEntries(Object.entries(c).filter((function(t){var n=t[0],e=t[1];return i._element.style.getPropertyValue(n)!==e}))),f=Object.fromEntries(Object.entries(u).filter((function(t){var n=t[0],e=t[1];return i._element.getAttribute(n)!==e})));a(r(r(r({animate:o,element:i.element(),attributes:r(r({},p),f),styles:h},null!==e?{delay:e}:{}),s?{children:i._children}:{}),{animationParams:r(r({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,o=t.y;return e<=1&&e>=-1&&(e*=n.boundingBox.width),o<=1&&o>=-1&&(o*=n.boundingBox.height),{x:e,y:o}},t.prototype.anchorBoundingBox=function(t){var n=this,e=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}}(),r=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 o({x:r,y:e},t.width,t.height)},t.prototype.computeRenderedBoundingBox=function(t,n){void 0===n&&(n=null);var e=this._presentation.computeRenderedBoundingBox(t,n);return new o({x:this.props.position.x,y:this.props.position.y},e.width,e.height)},t}(),a=(e=function(t,n){return e=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])},e(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 o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}),s=function(){return s=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},s.apply(this,arguments)},l=function(t){function n(n,e,o){return void 0===e&&(e={}),void 0===o&&(o=null),t.call(this,s({objects:n,position:{x:0,y:0},positioned:null===o?"position"in e:o,rotation:0,rotationOrigin:{x:0,y:0},scale:1,skewX:0,skewY:0},e))||this}return a(n,t),n.prototype.tagName=function(){return"g"},n.prototype.attributes=function(){return s({},t.prototype.attributes.call(this))},n.prototype.additionalAttributes=function(){var t=this.props,n=t.rotation,e=t.rotationOrigin,r=t.scale,i=t.skewX,a=t.skewY,s="rotate(".concat(n,", ").concat(e.x,", ").concat(e.y,")"),l="scale(".concat(r,")"),c="".concat(0!==i?"skewX(".concat(i,")"):""," ").concat(0!==a?"skewY(".concat(a,")"):"");if(!this.props.positioned){var u=this.positionInPresentation(this.props.position),p=u.x,h=u.y;return{transform:"translate(".concat(p,", ").concat(h,") ").concat(s," ").concat(l," ").concat(c)}}var f=this._presentation.computeRenderedBoundingBox(this.sizingElement());f.width*=r,f.height*=r;var d=this.positionInPresentation(this.props.position),g=d.x,y=d.y,m=this.anchorBoundingBox(new o({x:g,y},f.width,f.height)),v=m.origin.x-f.origin.x,b=m.origin.y-f.origin.y;return{transform:"translate(".concat(v,", ").concat(b,") ").concat(s," ").concat(l," ").concat(c)}},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}(i),c=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 o(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),u=function(){return u=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},u.apply(this,arguments)},p=function(t){function n(e,o){void 0===o&&(o={});var r=t.call(this,u({id:"mask-".concat(n.maskIndex++),objects:e},o))||this;return r.id=r.props.id,r}return c(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}(i),h=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 o(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),f=function(){return f=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},f.apply(this,arguments)},d=function(t){function n(n){return void 0===n&&(n={}),t.call(this,f({fill:"#000000",width:100,height:100,rounding:0,borderWidth:0,borderColor:"#000000",drawn:!0},n))||this}return h(n,t),n.prototype.tagName=function(){return"rect"},n.prototype.attributes=function(){var n=this.props,e=n.position,r=n.width,i=n.height,a=n.fill,s=n.rounding,l=n.borderWidth,c=n.borderColor,u=n.drawn,p=this.positionAttributes(new o(e,r,i)),h=p.x,d=p.y;return f(f(f(f({},t.prototype.attributes.call(this)),{fill:a,width:r.toString(),height:i.toString(),rx:s.toString(),x:h.toString(),y:d.toString()}),l>0?{"stroke-width":l.toString(),stroke:c}:{}),u?{}:{stroke:"none",fill:"none"})},n.prototype.animate=function(n,e,o,r){var i=this;void 0===e&&(e={}),void 0===o&&(o=null),void 0===r&&(r=!0);var a=n.drawn,s=function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]])}return e}(n,["drawn"]);return void 0===a?t.prototype.animate.call(this,s,e,o,r):function(n){var a,l,c;i.drawOn({drawDuration:null!==(a=e.duration)&&void 0!==a?a:1e3,fillDuration:null!==(l=e.fillDuration)&&void 0!==l?l:300,easing:null!==(c=e.easing)&&void 0!==c?c:"linear"})(n),Object.keys(s).length>0&&t.prototype.animate.call(i,s,e,o,r)(n)}},n.prototype.drawOn=function(t){var n=this;return void 0===t&&(t={}),function(e){var o,r,i,a=n.props,s=a.borderColor,l=a.borderWidth,c=a.fill;n.props.drawn=!0;var u,p=n.element();try{u=p.getTotalLength()}catch(t){u=0}var h=null!==(o=t.drawDuration)&&void 0!==o?o:1e3;p.setAttribute("stroke-dashoffset","".concat(u)),p.setAttribute("stroke-dasharray","".concat(u)),p.setAttribute("stroke",s),e({animate:!0,element:p,attributes:{"stroke-dashoffset":"0"},animationParams:{duration:h,easing:null!==(r=t.easing)&&void 0!==r?r:"linear"},updateCallback:function(){l>0&&p.setAttribute("stroke",s),p.setAttribute("fill",c)}}),"none"!==n.props.fill&&e({animate:!0,delay:h,element:p,attributes:{fill:n.props.fill,"stroke-dasharray":"none"},animationParams:{duration:null!==(i=t.fillDuration)&&void 0!==i?i:500,easing:"linear"}})}},n}(i);function g(t,n,e){void 0===n&&(n="1em"),void 0===e&&(e="start");for(var o=[],r=0,i=0,a=t;i<a.length;i++){var s=a[i];r++;var l=document.createElementNS("http://www.w3.org/2000/svg","tspan");if(l.setAttribute("x","0"),l.setAttribute("text-anchor",e),r>1&&l.setAttribute("dy",n),0===s.length||1===s.length&&""===s[0])l.appendChild(document.createTextNode(" ")),o.push(l);else if("string"!=typeof s){for(var c=0,u=s;c<u.length;c++){var p=u[c];if("string"==typeof p)l.appendChild(document.createTextNode(p));else{var h=p[0],f=p[1],d=document.createElementNS("http://www.w3.org/2000/svg","tspan");d.textContent=h;for(var g={fill:f.color,dy:f.dy,"text-decoration":f.textDecoration},y=0,m=Object.entries(g);y<m.length;y++){var v=m[y],b=v[0];void 0!==(C=v[1])&&d.setAttribute(b,C.toString())}var w={"font-family":f.fontFamily?'"'.concat(f.fontFamily,'"'):void 0,"font-size":f.fontSize,"font-weight":f.fontWeight,"font-style":f.fontStyle};!0===f.superscript?(w["baseline-shift"]="super",void 0===w["font-size"]&&(w["font-size"]="50%")):!0===f.subscript&&(w["baseline-shift"]="sub",void 0===w["font-size"]&&(w["font-size"]="50%")),!0===f.smallCaps&&(w["font-variant"]="small-caps");for(var O=0,x=Object.entries(w);O<x.length;O++){var C,_=x[O];b=_[0],void 0!==(C=_[1])&&d.style.setProperty(b,C.toString())}l.appendChild(d)}}o.push(l)}else l.appendChild(document.createTextNode(s)),o.push(l)}return o}var y=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 o(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),m=function(){return m=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},m.apply(this,arguments)},v=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,m({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 y(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,o=n.textDecoration;return m(m(m({},t.prototype.attributes.call(this)),"none"!==o?{"text-decoration":o}:{}),{fill:e})},n.prototype.additionalAttributes=function(){var n=this.computeRenderedBoundingBox(this.element(),this.childrenWithContentLength(this.contentLength())),e=this.positionAttributes(n),o=e.x,r=e.y;return this.isRichText()&&("center"===this.props.align?o+=n.width/2:"right"===this.props.align&&(o+=n.width)),r-=this.props.fontSize*this.props.baselineHeight,m(m({},t.prototype.additionalAttributes.call(this)),this.isRichText()?{transform:"translate(".concat(o.toString()," ").concat(r.toString(),")"),y:this.computeRenderedBoundingBox(this.element(),this.childrenWithContentLength(1)).height.toString()}:{x:o.toString(),y:(r+n.height).toString()})},n.prototype.styles=function(){var n=this.props,e=n.fontSize,o=n.fontFamily,r=n.fontStyle,i=n.fontWeight,a=n.ligatures,s=n.smallCaps;return m(m(m(m(m(m({},t.prototype.styles.call(this)),"normal"!==r?{"font-style":r}:{}),"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(o,'"'),"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 o="left"===this.props.align?"start":"center"===this.props.align?"middle":"end";if(null===t)return g(n,this.props.lineSpacing,o);for(var r=t,i=[],a=0,s=n;a<s.length;a++){var l=s[a];if("string"==typeof l)l.length<=r?(i.push(l),r-=l.length):(i.push(l.slice(0,r)),r=0);else{for(var c=[],u=0,p=l;u<p.length;u++){var h=p[u];if("string"==typeof h?h.length<=r?(c.push(h),r-=h.length):(c.push(h.slice(0,r)),r=0):h[0].length<=r?(c.push(h),r-=h[0].length):(c.push([h[0].slice(0,r),h[1]]),r=0),0===r)break}i.push(c)}if(0===r)break}return g(i,this.props.lineSpacing,o)},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,o,r){var i=this;void 0===e&&(e={}),void 0===o&&(o=null),void 0===r&&(r=!0);var a=n.length,s=function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]])}return e}(n,["length"]);return void 0===a?t.prototype.animate.call(this,s,e,o,r):function(n){var l;i.writeOn(a,null!==(l=e.duration)&&void 0!==l?l:1e3,r)(n),Object.keys(s).length>0&&t.prototype.animate.call(i,s,e,o,r)(n)}},n.prototype.writeOn=function(t,n,e){var o=this;void 0===t&&(t=null),void 0===n&&(n=1e3),void 0===e&&(e=!0);var r=null,i=null,a=null,s=function(e){var l;null===a&&(a=e),null===r&&(r=null!==(l=o.props.length)&&void 0!==l?l:o.contentLength()),null===i&&(i=null!=t?t:o.contentLength());var c=e-a,u=Math.min(c/n,1);o.props.length=Math.floor(r+(i-r)*u),o.regenerateChildren(),u<1&&requestAnimationFrame(s)};return function(n){return n({animate:e,animateCallback:function(){a=null,r=null,i=null,requestAnimationFrame(s)},updateCallback:function(){a=null,r=null,i=null,o.props.length=t,o.regenerateChildren()}})}},n.prototype.generateChildrenAndReposition=function(){for(var t=this.element(),n=0,e=Object.entries(this.attributes());n<e.length;n++){var o=e[n],r=o[0],i=o[1];t.setAttribute(r,i)}this.regenerateChildren();for(var a=0,s=Object.entries(this.additionalAttributes());a<s.length;a++){var l=s[a];r=l[0],i=l[1],t.setAttribute(r,i)}},n.prototype.animateContent=function(t,n){var e=this;void 0===n&&(n=1e3);var o=null,r=function(i){null===o&&(o=i);var a=i-o,s=Math.min(a/n,1);e.props.content=t(s),e.generateChildrenAndReposition(),s<1&&requestAnimationFrame(r)};return function(n){return n({animate:!0,animateCallback:function(){o=null,requestAnimationFrame(r)},updateCallback:function(){o=null,e.props.content=t(1),e.generateChildrenAndReposition()}})}},n}(i),b=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 o(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),w=function(){return w=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},w.apply(this,arguments)},O=function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]])}return e},x=function(t,n,e){if(e||2===arguments.length)for(var o,r=0,i=n.length;r<i;r++)!o&&r in n||(o||(o=Array.prototype.slice.call(n,0,r)),o[r]=n[r]);return t.concat(o||Array.prototype.slice.call(n))},C=function(t){function n(n){void 0===n&&(n={});var e,o=this,r=void 0===n.maskLines?"lineCount"in n&&null!==n.lineCount:n.maskLines,i=w({code:"",highlights:null,length:null,fontFamily:"Courier New",fontSize:130,textColor:"#ffffff",backgroundColor:"#000000",backgroundRounding:10,padding:15,lineSpacing:"1em",lineHeight:null!==(e=n.fontSize)&&void 0!==e?e:130,characterWidth:80,lineCount:null,colCount:null,maskLines:r,firstLine:1,unfocusedOpacity:1,lineNumbers:!1,firstLineNumber:1,lineNumberColor:"#d0d0d0",focusColor:"#4166a5",focusOpacity:0,focusRounding:10,focusLineStart:1,focusLineEnd:1,focusColStart:1,focusColEnd:1,focusPaddingX:0,focusPaddingY:0,focusOffsetX:0,focusOffsetY:0,position:{x:0,y:0},anchor:"topleft"},n);return(o=t.call(this,[],{positioned:!0})||this).codeBlockProps=i,o.initialCodeBlockProps=i,o}return b(n,t),n.prototype.createElement=function(){this.codeBlockProps=w({},this.initialCodeBlockProps);var e=n.getComponentProps(this.codeBlockProps),o=e.group,r=e.background,i=e.mask,a=e.maskFocus,s=e.focus,c=e.text,u=c.content,h=O(c,["content"]),f=e.lineNumbers,g=new d(r),y=null,m=null,b=null;this.codeBlockProps.maskLines&&(m=new d(i),b=new d(a),y=new p([m,b]));var C=new d(s),_=new v(u,h),k=null;if(null!==f){var j=f.content,P=O(f,["content"]);k=new v(j,P)}var S=new l(x([C,_],null!==k?[k]:[],!0),w({},null!==y?{mask:y.id}:{}));return this.props.objects=x(x([],null!==y?[y]:[],!0),[g,S],!1),this.props=w(w({},this.props),o),this.background=g,this.maskRect=m,this.maskFocusRect=b,this.focus=C,this.text=_,this.lineNumbers=k,t.prototype.createElement.call(this)},n.prototype.animate=function(e,o,r,i){var a=this;return void 0===o&&(o={}),void 0===r&&(r=null),void 0===i&&(i=!0),function(s){a.codeBlockProps=w(w({},a.codeBlockProps),e);var l=n.getComponentProps(a.codeBlockProps),c=l.group,u=l.background,p=l.mask,h=l.maskFocus,f=l.focus,d=l.text,g=d.content,y=O(d,["content"]),m=l.lineNumbers;t.prototype.animate.call(a,c,o,r,i)(s),a.background.animate(u,o,r,i)(s),a.focus.animate(f,o,r,i)(s),null!==a.maskRect&&(a.maskRect.animate(p,o,r,i)(s),a.maskFocusRect.animate(h,o,r,i)(s)),a.text.animate(w({content:g},y),o,r,i)(s),null!==m&&a.lineNumbers.animate(m,o,r,i)(s)}},n.prototype.set=function(t,n){return void 0===n&&(n=null),this.animate(t,{},n,!1)},n.getComponentProps=function(t){var e,o,r=t.padding,i=t.characterWidth,a=t.lineHeight,s=t.firstLine,l=t.unfocusedOpacity,c=t.lineNumbers,u=t.firstLineNumber,p=t.lineNumberColor,h=t.focusLineStart,f=t.focusLineEnd,d=t.focusColStart,g=t.focusColEnd,y=t.focusOffsetX,m=t.focusOffsetY,v=t.focusPaddingX,b=t.focusPaddingY,O=t.code.trimEnd(),x=O.split("\n").reduce((function(t,n){return Math.max(t,n.length)}),0),C=null!==(e=t.colCount)&&void 0!==e?e:x,_=n.buildTextContent(O,t.highlights),k=null!==(o=t.lineCount)&&void 0!==o?o:_.length,j=null,P=_.length.toString().length+3;c&&(j={content:Array.from({length:_.length},(function(t,n){return u+n})).map((function(t){return"".concat(t," ").padStart(P," ")})),fontFamily:t.fontFamily,fontSize:t.fontSize,lineSpacing:t.lineSpacing,color:p,position:{x:r,y:r-(s-1)*a},anchor:"topleft"});var S=c?P*i:0,A={width:i*C+2*r+S,height:a*k+2*r,rounding:t.backgroundRounding,fill:null===t.backgroundColor?"transparent":t.backgroundColor,position:{x:0,y:0},anchor:"topleft"},B={width:i*(g-d+1)+2*v,height:a*(f-h+1)+2*b,rounding:t.focusRounding,fill:t.focusColor,opacity:t.focusOpacity,position:{x:r+S+(d-1)*i-v+y,y:r-(s-1)*a+(h-1)*a-b+m},anchor:"topleft"};return{group:{position:t.position,anchor:t.anchor},background:w({},A),mask:w(w({},A),{fill:"rgb(255, 255, 255, ".concat(l,")")}),focus:w({},B),maskFocus:w(w({},B),{fill:"white"}),text:{content:_,length:t.length,fontFamily:t.fontFamily,fontSize:t.fontSize,lineSpacing:t.lineSpacing,color:t.textColor,position:{x:r+S,y:r-(s-1)*a},anchor:"topleft"},lineNumbers:j}},n.buildTextContent=function(t,n){if(null===n)return t.split("\n").map((function(t){return t}));for(var e=t.split("\n"),o=[],r=0,i=n;r<i.length;r++){for(var a=[],s=0,l=i[r];s<l.length;s++){var c=l[s];a.push([e[o.length].substring(c.start-1,c.end),{color:c.color,fontWeight:c.bold?"bold":"normal"}])}o.push(a)}return o},n.prototype.sizingElement=function(){if(!this.codeBlockProps.maskLines)return t.prototype.sizingElement.call(this);var n=this.element().cloneNode();return n.appendChild(this.background.element().cloneNode()),n},n.computePropsForText=function(t,n){var e=new v(Array(10).fill("H".repeat(10)),n);e.generate(t);var o=new v(Array(50).fill("H".repeat(50)),n);o.generate(t);var r=e.computeRenderedBoundingBox(e.element()),i=o.computeRenderedBoundingBox(o.element());return{lineHeight:(i.height-r.height)/40,characterWidth:(i.width-r.width)/40}},n}(l);return n})()));
|
|
1
|
+
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.PresenterCode=n():t.PresenterCode=n()}(this,(()=>(()=>{"use strict";var t={d:(n,e)=>{for(var o in e)t.o(e,o)&&!t.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:e[o]})},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,{CodeBlock:()=>C});var e,o=function(){function t(t,n,e){this.origin=t,this.width=n,this.height=e}return t.fromElement=function(n){var e=n.getBBox();return new t({x:e.x,y:e.y},e.width,e.height)},t}(),r=function(){return r=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},r.apply(this,arguments)},i=function(){function t(t){this.props=r({position:{x:0,y:0},anchor:"topleft"},t),this.initialProps=r({},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 r({},void 0!==t?{mask:"url(#".concat(t,")")}:{})},t.prototype.additionalAttributes=function(){return{}},t.prototype.styles=function(){var t=this.props.opacity;return r({},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),e=n.x,r=n.y,i=this.anchorBoundingBox(new o({x:e,y:r},t.width,t.height));return{x:i.origin.x,y:i.origin.y}},t.prototype.generate=function(t){this.props=r({},this.initialProps),this._presentation=t;for(var n=this.createElement(),e=0,o=Object.entries(this.attributes());e<o.length;e++){var i=o[e],a=i[0],s=i[1];n.setAttribute(a,s)}for(var l=0,c=Object.entries(this.styles());l<c.length;l++){var u=c[l],p=u[0];s=u[1],n.style.setProperty(p,s)}this._children=this.children();for(var h=0,f=this._children;h<f.length;h++){var d=f[h];n.appendChild(d)}this._element=n;for(var g=0,y=Object.entries(this.additionalAttributes());g<y.length;g++){var m=y[g];a=m[0],s=m[1],n.setAttribute(a,s)}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,o){var i=this;return void 0===n&&(n={}),void 0===e&&(e=null),void 0===o&&(o=!0),function(a){if(null===i._presentation)throw new Error("Cannot animate object without presentation");var s=i.requiresChildrenUpdate(t);i.props=r(r({},i.props),t),s&&(i._children=i.children());var l=i.attributes(),c=i.styles(),u=i.additionalAttributes(),p=Object.fromEntries(Object.entries(l).filter((function(t){var n=t[0],e=t[1];return i._element.getAttribute(n)!==e}))),h=Object.fromEntries(Object.entries(c).filter((function(t){var n=t[0],e=t[1];return i._element.style.getPropertyValue(n)!==e}))),f=Object.fromEntries(Object.entries(u).filter((function(t){var n=t[0],e=t[1];return i._element.getAttribute(n)!==e})));a(r(r(r({animate:o,element:i.element(),attributes:r(r({},p),f),styles:h},null!==e?{delay:e}:{}),s?{children:i._children}:{}),{animationParams:r(r({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,o=t.y;return e<=1&&e>=-1&&(e*=n.boundingBox.width),o<=1&&o>=-1&&(o*=n.boundingBox.height),{x:e,y:o}},t.prototype.anchorBoundingBox=function(t){var n=this,e=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}}(),r=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 o({x:r,y:e},t.width,t.height)},t.prototype.computeRenderedBoundingBox=function(t,n){void 0===n&&(n=null);var e=this._presentation.computeRenderedBoundingBox(t,n);return new o({x:this.props.position.x,y:this.props.position.y},e.width,e.height)},t}(),a=(e=function(t,n){return e=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])},e(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 o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}),s=function(){return s=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},s.apply(this,arguments)},l=function(t){function n(n,e,o){return void 0===e&&(e={}),void 0===o&&(o=null),t.call(this,s({objects:n,position:{x:0,y:0},positioned:null===o?"position"in e:o,rotation:0,rotationOrigin:{x:0,y:0},transformOrigin:null,scale:1,skewX:0,skewY:0},e))||this}return a(n,t),n.prototype.tagName=function(){return"g"},n.prototype.attributes=function(){var n=this.props.transformOrigin;return s(s({},t.prototype.attributes.call(this)),null!==n?{"transform-origin":"string"==typeof n?n:"".concat(n.x," ").concat(n.y)}:{})},n.prototype.additionalAttributes=function(){var t=this.props,n=t.rotation,e=t.rotationOrigin,r=t.scale,i=t.skewX,a=t.skewY,s="rotate(".concat(n,", ").concat(e.x,", ").concat(e.y,")"),l="scale(".concat(r,")"),c="".concat(0!==i?"skewX(".concat(i,")"):""," ").concat(0!==a?"skewY(".concat(a,")"):"");if(!this.props.positioned){var u=this.positionInPresentation(this.props.position),p=u.x,h=u.y;return{transform:"translate(".concat(p,", ").concat(h,") ").concat(s," ").concat(l," ").concat(c)}}var f=this._presentation.computeRenderedBoundingBox(this.sizingElement());f.width*=r,f.height*=r;var d=this.positionInPresentation(this.props.position),g=d.x,y=d.y,m=this.anchorBoundingBox(new o({x:g,y},f.width,f.height)),v=m.origin.x-f.origin.x,b=m.origin.y-f.origin.y;return{transform:"translate(".concat(v,", ").concat(b,") ").concat(s," ").concat(l," ").concat(c)}},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}(i),c=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 o(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),u=function(){return u=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},u.apply(this,arguments)},p=function(t){function n(e,o){void 0===o&&(o={});var r=t.call(this,u({id:"mask-".concat(n.maskIndex++),objects:e},o))||this;return r.id=r.props.id,r}return c(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}(i),h=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 o(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),f=function(){return f=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},f.apply(this,arguments)},d=function(t){function n(n){return void 0===n&&(n={}),t.call(this,f({fill:"#000000",width:100,height:100,rounding:0,borderWidth:0,borderColor:"#000000",drawn:!0},n))||this}return h(n,t),n.prototype.tagName=function(){return"rect"},n.prototype.attributes=function(){var n=this.props,e=n.position,r=n.width,i=n.height,a=n.fill,s=n.rounding,l=n.borderWidth,c=n.borderColor,u=n.drawn,p=this.positionAttributes(new o(e,r,i)),h=p.x,d=p.y;return f(f(f(f({},t.prototype.attributes.call(this)),{fill:a,width:r.toString(),height:i.toString(),rx:s.toString(),x:h.toString(),y:d.toString()}),l>0?{"stroke-width":l.toString(),stroke:c}:{}),u?{}:{stroke:"none",fill:"none"})},n.prototype.animate=function(n,e,o,r){var i=this;void 0===e&&(e={}),void 0===o&&(o=null),void 0===r&&(r=!0);var a=n.drawn,s=function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]])}return e}(n,["drawn"]);return void 0===a?t.prototype.animate.call(this,s,e,o,r):function(n){var a,l,c;i.drawOn({drawDuration:null!==(a=e.duration)&&void 0!==a?a:1e3,fillDuration:null!==(l=e.fillDuration)&&void 0!==l?l:300,easing:null!==(c=e.easing)&&void 0!==c?c:"linear"})(n),Object.keys(s).length>0&&t.prototype.animate.call(i,s,e,o,r)(n)}},n.prototype.drawOn=function(t){var n=this;return void 0===t&&(t={}),function(e){var o,r,i,a=n.props,s=a.borderColor,l=a.borderWidth,c=a.fill;n.props.drawn=!0;var u,p=n.element();try{u=p.getTotalLength()}catch(t){u=0}var h=null!==(o=t.drawDuration)&&void 0!==o?o:1e3;p.setAttribute("stroke-dashoffset","".concat(u)),p.setAttribute("stroke-dasharray","".concat(u)),p.setAttribute("stroke",s),e({animate:!0,element:p,attributes:{"stroke-dashoffset":"0"},animationParams:{duration:h,easing:null!==(r=t.easing)&&void 0!==r?r:"linear"},updateCallback:function(){l>0&&p.setAttribute("stroke",s),p.setAttribute("fill",c)}}),"none"!==n.props.fill&&e({animate:!0,delay:h,element:p,attributes:{fill:n.props.fill,"stroke-dasharray":"none"},animationParams:{duration:null!==(i=t.fillDuration)&&void 0!==i?i:500,easing:"linear"}})}},n}(i);function g(t,n,e){void 0===n&&(n="1em"),void 0===e&&(e="start");for(var o=[],r=0,i=0,a=t;i<a.length;i++){var s=a[i];r++;var l=document.createElementNS("http://www.w3.org/2000/svg","tspan");if(l.setAttribute("x","0"),l.setAttribute("text-anchor",e),r>1&&l.setAttribute("dy",n),0===s.length||1===s.length&&""===s[0])l.appendChild(document.createTextNode(" ")),o.push(l);else if("string"!=typeof s){for(var c=0,u=s;c<u.length;c++){var p=u[c];if("string"==typeof p)l.appendChild(document.createTextNode(p));else{var h=p[0],f=p[1],d=document.createElementNS("http://www.w3.org/2000/svg","tspan");d.textContent=h;for(var g={fill:f.color,dy:f.dy,"text-decoration":f.textDecoration},y=0,m=Object.entries(g);y<m.length;y++){var v=m[y],b=v[0];void 0!==(C=v[1])&&d.setAttribute(b,C.toString())}var w={"font-family":f.fontFamily?'"'.concat(f.fontFamily,'"'):void 0,"font-size":f.fontSize,"font-weight":f.fontWeight,"font-style":f.fontStyle};!0===f.superscript?(w["baseline-shift"]="super",void 0===w["font-size"]&&(w["font-size"]="50%")):!0===f.subscript&&(w["baseline-shift"]="sub",void 0===w["font-size"]&&(w["font-size"]="50%")),!0===f.smallCaps&&(w["font-variant"]="small-caps");for(var O=0,x=Object.entries(w);O<x.length;O++){var C,_=x[O];b=_[0],void 0!==(C=_[1])&&d.style.setProperty(b,C.toString())}l.appendChild(d)}}o.push(l)}else l.appendChild(document.createTextNode(s)),o.push(l)}return o}var y=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 o(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),m=function(){return m=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},m.apply(this,arguments)},v=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,m({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 y(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,o=n.textDecoration;return m(m(m({},t.prototype.attributes.call(this)),"none"!==o?{"text-decoration":o}:{}),{fill:e})},n.prototype.additionalAttributes=function(){var n=this.computeRenderedBoundingBox(this.element(),this.childrenWithContentLength(this.contentLength())),e=this.positionAttributes(n),o=e.x,r=e.y;return this.isRichText()&&("center"===this.props.align?o+=n.width/2:"right"===this.props.align&&(o+=n.width)),r-=this.props.fontSize*this.props.baselineHeight,m(m({},t.prototype.additionalAttributes.call(this)),this.isRichText()?{transform:"translate(".concat(o.toString()," ").concat(r.toString(),")"),y:this.computeRenderedBoundingBox(this.element(),this.childrenWithContentLength(1)).height.toString()}:{x:o.toString(),y:(r+n.height).toString()})},n.prototype.styles=function(){var n=this.props,e=n.fontSize,o=n.fontFamily,r=n.fontStyle,i=n.fontWeight,a=n.ligatures,s=n.smallCaps;return m(m(m(m(m(m({},t.prototype.styles.call(this)),"normal"!==r?{"font-style":r}:{}),"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(o,'"'),"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 o="left"===this.props.align?"start":"center"===this.props.align?"middle":"end";if(null===t)return g(n,this.props.lineSpacing,o);for(var r=t,i=[],a=0,s=n;a<s.length;a++){var l=s[a];if("string"==typeof l)l.length<=r?(i.push(l),r-=l.length):(i.push(l.slice(0,r)),r=0);else{for(var c=[],u=0,p=l;u<p.length;u++){var h=p[u];if("string"==typeof h?h.length<=r?(c.push(h),r-=h.length):(c.push(h.slice(0,r)),r=0):h[0].length<=r?(c.push(h),r-=h[0].length):(c.push([h[0].slice(0,r),h[1]]),r=0),0===r)break}i.push(c)}if(0===r)break}return g(i,this.props.lineSpacing,o)},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,o,r){var i=this;void 0===e&&(e={}),void 0===o&&(o=null),void 0===r&&(r=!0);var a=n.length,s=function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]])}return e}(n,["length"]);return void 0===a?t.prototype.animate.call(this,s,e,o,r):function(n){var l;i.writeOn(a,null!==(l=e.duration)&&void 0!==l?l:1e3,r)(n),Object.keys(s).length>0&&t.prototype.animate.call(i,s,e,o,r)(n)}},n.prototype.writeOn=function(t,n,e){var o=this;void 0===t&&(t=null),void 0===n&&(n=1e3),void 0===e&&(e=!0);var r=null,i=null,a=null,s=function(e){var l;null===a&&(a=e),null===r&&(r=null!==(l=o.props.length)&&void 0!==l?l:o.contentLength()),null===i&&(i=null!=t?t:o.contentLength());var c=e-a,u=Math.min(c/n,1);o.props.length=Math.floor(r+(i-r)*u),o.regenerateChildren(),u<1&&requestAnimationFrame(s)};return function(n){return n({animate:e,animateCallback:function(){a=null,r=null,i=null,requestAnimationFrame(s)},updateCallback:function(){a=null,r=null,i=null,o.props.length=t,o.regenerateChildren()}})}},n.prototype.generateChildrenAndReposition=function(){for(var t=this.element(),n=0,e=Object.entries(this.attributes());n<e.length;n++){var o=e[n],r=o[0],i=o[1];t.setAttribute(r,i)}this.regenerateChildren();for(var a=0,s=Object.entries(this.additionalAttributes());a<s.length;a++){var l=s[a];r=l[0],i=l[1],t.setAttribute(r,i)}},n.prototype.animateContent=function(t,n){var e=this;void 0===n&&(n=1e3);var o=null,r=function(i){null===o&&(o=i);var a=i-o,s=Math.min(a/n,1);e.props.content=t(s),e.generateChildrenAndReposition(),s<1&&requestAnimationFrame(r)};return function(n){return n({animate:!0,animateCallback:function(){o=null,requestAnimationFrame(r)},updateCallback:function(){o=null,e.props.content=t(1),e.generateChildrenAndReposition()}})}},n}(i),b=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 o(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),w=function(){return w=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},w.apply(this,arguments)},O=function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]])}return e},x=function(t,n,e){if(e||2===arguments.length)for(var o,r=0,i=n.length;r<i;r++)!o&&r in n||(o||(o=Array.prototype.slice.call(n,0,r)),o[r]=n[r]);return t.concat(o||Array.prototype.slice.call(n))},C=function(t){function n(n){void 0===n&&(n={});var e,o=this,r=void 0===n.maskLines?"lineCount"in n&&null!==n.lineCount:n.maskLines,i=w({code:"",highlights:null,length:null,fontFamily:"Courier New",fontSize:130,textColor:"#ffffff",backgroundColor:"#000000",backgroundRounding:10,padding:15,lineSpacing:"1em",lineHeight:null!==(e=n.fontSize)&&void 0!==e?e:130,characterWidth:80,lineCount:null,colCount:null,maskLines:r,firstLine:1,unfocusedOpacity:1,lineNumbers:!1,firstLineNumber:1,lineNumberColor:"#d0d0d0",focusColor:"#4166a5",focusOpacity:0,focusRounding:10,focusLineStart:1,focusLineEnd:1,focusColStart:1,focusColEnd:1,focusPaddingX:0,focusPaddingY:0,focusOffsetX:0,focusOffsetY:0,position:{x:0,y:0},anchor:"topleft"},n);return(o=t.call(this,[],{positioned:!0})||this).codeBlockProps=i,o.initialCodeBlockProps=i,o}return b(n,t),n.prototype.createElement=function(){this.codeBlockProps=w({},this.initialCodeBlockProps);var e=n.getComponentProps(this.codeBlockProps),o=e.group,r=e.background,i=e.mask,a=e.maskFocus,s=e.focus,c=e.text,u=c.content,h=O(c,["content"]),f=e.lineNumbers,g=new d(r),y=null,m=null,b=null;this.codeBlockProps.maskLines&&(m=new d(i),b=new d(a),y=new p([m,b]));var C=new d(s),_=new v(u,h),k=null;if(null!==f){var j=f.content,P=O(f,["content"]);k=new v(j,P)}var S=new l(x([C,_],null!==k?[k]:[],!0),w({},null!==y?{mask:y.id}:{}));return this.props.objects=x(x([],null!==y?[y]:[],!0),[g,S],!1),this.props=w(w({},this.props),o),this.background=g,this.maskRect=m,this.maskFocusRect=b,this.focus=C,this.text=_,this.lineNumbers=k,t.prototype.createElement.call(this)},n.prototype.animate=function(e,o,r,i){var a=this;return void 0===o&&(o={}),void 0===r&&(r=null),void 0===i&&(i=!0),function(s){a.codeBlockProps=w(w({},a.codeBlockProps),e);var l=n.getComponentProps(a.codeBlockProps),c=l.group,u=l.background,p=l.mask,h=l.maskFocus,f=l.focus,d=l.text,g=d.content,y=O(d,["content"]),m=l.lineNumbers;t.prototype.animate.call(a,c,o,r,i)(s),a.background.animate(u,o,r,i)(s),a.focus.animate(f,o,r,i)(s),null!==a.maskRect&&(a.maskRect.animate(p,o,r,i)(s),a.maskFocusRect.animate(h,o,r,i)(s)),a.text.animate(w({content:g},y),o,r,i)(s),null!==m&&a.lineNumbers.animate(m,o,r,i)(s)}},n.prototype.set=function(t,n){return void 0===n&&(n=null),this.animate(t,{},n,!1)},n.getComponentProps=function(t){var e,o,r=t.padding,i=t.characterWidth,a=t.lineHeight,s=t.firstLine,l=t.unfocusedOpacity,c=t.lineNumbers,u=t.firstLineNumber,p=t.lineNumberColor,h=t.focusLineStart,f=t.focusLineEnd,d=t.focusColStart,g=t.focusColEnd,y=t.focusOffsetX,m=t.focusOffsetY,v=t.focusPaddingX,b=t.focusPaddingY,O=t.code.trimEnd(),x=O.split("\n").reduce((function(t,n){return Math.max(t,n.length)}),0),C=null!==(e=t.colCount)&&void 0!==e?e:x,_=n.buildTextContent(O,t.highlights),k=null!==(o=t.lineCount)&&void 0!==o?o:_.length,j=null,P=_.length.toString().length+3;c&&(j={content:Array.from({length:_.length},(function(t,n){return u+n})).map((function(t){return"".concat(t," ").padStart(P," ")})),fontFamily:t.fontFamily,fontSize:t.fontSize,lineSpacing:t.lineSpacing,color:p,position:{x:r,y:r-(s-1)*a},anchor:"topleft"});var S=c?P*i:0,A={width:i*C+2*r+S,height:a*k+2*r,rounding:t.backgroundRounding,fill:null===t.backgroundColor?"transparent":t.backgroundColor,position:{x:0,y:0},anchor:"topleft"},B={width:i*(g-d+1)+2*v,height:a*(f-h+1)+2*b,rounding:t.focusRounding,fill:t.focusColor,opacity:t.focusOpacity,position:{x:r+S+(d-1)*i-v+y,y:r-(s-1)*a+(h-1)*a-b+m},anchor:"topleft"};return{group:{position:t.position,anchor:t.anchor},background:w({},A),mask:w(w({},A),{fill:"rgb(255, 255, 255, ".concat(l,")")}),focus:w({},B),maskFocus:w(w({},B),{fill:"white"}),text:{content:_,length:t.length,fontFamily:t.fontFamily,fontSize:t.fontSize,lineSpacing:t.lineSpacing,color:t.textColor,position:{x:r+S,y:r-(s-1)*a},anchor:"topleft"},lineNumbers:j}},n.buildTextContent=function(t,n){if(null===n)return t.split("\n").map((function(t){return t}));for(var e=t.split("\n"),o=[],r=0,i=n;r<i.length;r++){for(var a=[],s=0,l=i[r];s<l.length;s++){var c=l[s];a.push([e[o.length].substring(c.start-1,c.end),{color:c.color,fontWeight:c.bold?"bold":"normal"}])}o.push(a)}return o},n.prototype.sizingElement=function(){if(!this.codeBlockProps.maskLines)return t.prototype.sizingElement.call(this);var n=this.element().cloneNode();return n.appendChild(this.background.element().cloneNode()),n},n.computePropsForText=function(t,n){var e=new v(Array(10).fill("H".repeat(10)),n);e.generate(t);var o=new v(Array(50).fill("H".repeat(50)),n);o.generate(t);var r=e.computeRenderedBoundingBox(e.element()),i=o.computeRenderedBoundingBox(o.element());return{lineHeight:(i.height-r.height)/40,characterWidth:(i.width-r.width)/40}},n}(l);return n})()));
|
package/dist/presenter.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Presenter=n():t.Presenter=n()}(this,(()=>(()=>{"use strict";var t={d:(n,e)=>{for(var r in e)t.o(e,r)&&!t.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:e[r]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{Arrow:()=>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})()));
|
|
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&&r?{"stroke-linecap":i}:{})},n.prototype.animate=function(n,e,r,o){var i=this;return void 0===e&&(e={}),void 0===r&&(r=null),void 0===o&&(o=!0),function(a){var s=Ot(Ot({},i.props),n),l=s.drawn,u=s.linecap;l&&null!==u?i.element().setAttribute("stroke-linecap",u):l||i.element().setAttribute("stroke-linecap","butt"),t.prototype.animate.call(i,n,e,r,o)(a)}},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},transformOrigin:null,scale:1,skewX:0,skewY:0},e))||this}return Lt(n,t),n.prototype.tagName=function(){return"g"},n.prototype.attributes=function(){var n=this.props.transformOrigin;return Dt(Dt({},t.prototype.attributes.call(this)),null!==n?{"transform-origin":"string"==typeof n?n:"".concat(n.x," ").concat(n.y)}:{})},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})()));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ObjectProps, SlideObject } from "../presentation/object";
|
|
2
|
+
import { BuildFunction } from "../util/animation";
|
|
2
3
|
import { Position } from "../util/position";
|
|
3
4
|
export interface LineProps extends ObjectProps {
|
|
4
5
|
start: Position;
|
|
@@ -16,4 +17,5 @@ export declare class Line extends SlideObject<LineProps> {
|
|
|
16
17
|
constructor(props?: Partial<LineProps>);
|
|
17
18
|
tagName(): string;
|
|
18
19
|
attributes(): Partial<Record<string, string>>;
|
|
20
|
+
animate(props: Partial<LineProps>, animationParams?: anime.AnimeParams, delay?: number | null, animate?: boolean): BuildFunction;
|
|
19
21
|
}
|