/*! For license information please see main.js.LICENSE.txt */ (()=>{"use strict";var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};function e(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}var r=function(){return r=Object.assign||function(t){for(var e,r=1,i=arguments.length;r=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function n(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,n,a=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(i=a.next()).done;)o.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o}function a(t,e,r){if(r||2===arguments.length)for(var i,n=0,a=e.length;n0&&S.some((function(t){return e.adapter.containsEventTarget(t)}))?this.resetActivationState():(void 0!==t&&(S.push(t.target),this.registerDeactivationHandlers(t)),r.wasElementMadeActive=this.checkElementMadeActive(t),r.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){S=[],r.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(r.wasElementMadeActive=e.checkElementMadeActive(t),r.wasElementMadeActive&&e.animateActivation()),r.wasElementMadeActive||(e.activationState=e.defaultActivationState())}))))}}},n.prototype.checkElementMadeActive=function(t){return void 0===t||"keydown"!==t.type||this.adapter.isSurfaceActive()},n.prototype.animateActivation=function(){var t=this,e=n.strings,r=e.VAR_FG_TRANSLATE_START,i=e.VAR_FG_TRANSLATE_END,a=n.cssClasses,o=a.FG_DEACTIVATION,s=a.FG_ACTIVATION,c=n.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var u="",l="";if(!this.adapter.isUnbounded()){var d=this.getFgTranslationCoordinates(),p=d.startPoint,f=d.endPoint;u=p.x+"px, "+p.y+"px",l=f.x+"px, "+f.y+"px"}this.adapter.updateCssVariable(r,u),this.adapter.updateCssVariable(i,l),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(o),this.adapter.computeBoundingRect(),this.adapter.addClass(s),this.activationTimer=setTimeout((function(){t.activationTimerCallback()}),c)},n.prototype.getFgTranslationCoordinates=function(){var t,e=this.activationState,r=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?function(t,e,r){if(!t)return{x:0,y:0};var i,n,a=e.x,o=e.y,s=a+r.left,c=o+r.top;if("touchstart"===t.type){var u=t;i=u.changedTouches[0].pageX-s,n=u.changedTouches[0].pageY-c}else{var l=t;i=l.pageX-s,n=l.pageY-c}return{x:i,y:n}}(r,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2}).x-this.initialSize/2,y:t.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},n.prototype.runDeactivationUXLogicIfReady=function(){var t=this,e=n.cssClasses.FG_DEACTIVATION,r=this.activationState,i=r.hasDeactivationUXRun,a=r.isActivated;(i||!a)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(e),this.fgDeactivationRemovalTimer=setTimeout((function(){t.adapter.removeClass(e)}),m.FG_DEACTIVATION_MS))},n.prototype.rmBoundedActivationClasses=function(){var t=n.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},n.prototype.resetActivationState=function(){var t=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return t.previousActivationEvent=void 0}),n.numbers.TAP_DELAY_MS)},n.prototype.deactivateImpl=function(){var t=this,e=this.activationState;if(e.isActivated){var i=r({},e);e.isProgrammatic?(requestAnimationFrame((function(){t.animateDeactivation(i)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(i),t.resetActivationState()})))}},n.prototype.animateDeactivation=function(t){var e=t.wasActivatedByPointer,r=t.wasElementMadeActive;(e||r)&&this.runDeactivationUXLogicIfReady()},n.prototype.layoutInternal=function(){this.frame=this.adapter.computeBoundingRect();var t=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?t:Math.sqrt(Math.pow(this.frame.width,2)+Math.pow(this.frame.height,2))+n.numbers.PADDING;var e=Math.floor(t*n.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&e%2!=0?this.initialSize=e-1:this.initialSize=e,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},n.prototype.updateLayoutCssVars=function(){var t=n.strings,e=t.VAR_FG_SIZE,r=t.VAR_LEFT,i=t.VAR_TOP,a=t.VAR_FG_SCALE;this.adapter.updateCssVariable(e,this.initialSize+"px"),this.adapter.updateCssVariable(a,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(r,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(i,this.unboundedCoords.top+"px"))},n}(o),C=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return e.disabled=!1,e}return e(r,t),r.attachTo=function(t,e){void 0===e&&(e={isUnbounded:void 0});var i=new r(t);return void 0!==e.isUnbounded&&(i.unbounded=e.isUnbounded),i},r.createAdapter=function(t){return{addClass:function(e){return t.root.classList.add(e)},browserSupportsCssVars:function(){return function(t,e){void 0===e&&(e=!1);var r,i=window.CSS;if("boolean"==typeof h&&!e)return h;if(!i||"function"!=typeof i.supports)return!1;var n=i.supports("--css-vars","yes"),a=i.supports("(--css-vars: yes)")&&i.supports("color","#00000000");return r=n||a,e||(h=r),r}()},computeBoundingRect:function(){return t.root.getBoundingClientRect()},containsEventTarget:function(e){return t.root.contains(e)},deregisterDocumentInteractionHandler:function(t,e){return document.documentElement.removeEventListener(t,e,f())},deregisterInteractionHandler:function(e,r){return t.root.removeEventListener(e,r,f())},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return e=t.root,r=":active",(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,r);var e,r},isSurfaceDisabled:function(){return Boolean(t.disabled)},isUnbounded:function(){return Boolean(t.unbounded)},registerDocumentInteractionHandler:function(t,e){return document.documentElement.addEventListener(t,e,f())},registerInteractionHandler:function(e,r){return t.root.addEventListener(e,r,f())},registerResizeHandler:function(t){return window.addEventListener("resize",t)},removeClass:function(e){return t.root.classList.remove(e)},updateCssVariable:function(e,r){return t.root.style.setProperty(e,r)}}},Object.defineProperty(r.prototype,"unbounded",{get:function(){return Boolean(this.isUnbounded)},set:function(t){this.isUnbounded=Boolean(t),this.setUnbounded()},enumerable:!1,configurable:!0}),r.prototype.activate=function(){this.foundation.activate()},r.prototype.deactivate=function(){this.foundation.deactivate()},r.prototype.layout=function(){this.foundation.layout()},r.prototype.getDefaultFoundation=function(){return new b(r.createAdapter(this))},r.prototype.initialSyncWithDOM=function(){var t=this.root;this.isUnbounded="mdcRippleIsUnbounded"in t.dataset},r.prototype.setUnbounded=function(){this.foundation.setUnbounded(Boolean(this.isUnbounded))},r}(s),E={FIXED_CLASS:"mdc-top-app-bar--fixed",FIXED_SCROLLED_CLASS:"mdc-top-app-bar--fixed-scrolled",SHORT_CLASS:"mdc-top-app-bar--short",SHORT_COLLAPSED_CLASS:"mdc-top-app-bar--short-collapsed",SHORT_HAS_ACTION_ITEM_CLASS:"mdc-top-app-bar--short-has-action-item"},T={DEBOUNCE_THROTTLE_RESIZE_TIME_MS:100,MAX_TOP_APP_BAR_HEIGHT:128},I={ACTION_ITEM_SELECTOR:".mdc-top-app-bar__action-item",NAVIGATION_EVENT:"MDCTopAppBar:nav",NAVIGATION_ICON_SELECTOR:".mdc-top-app-bar__navigation-icon",ROOT_SELECTOR:".mdc-top-app-bar",TITLE_SELECTOR:".mdc-top-app-bar__title"},_=function(t){function i(e){return t.call(this,r(r({},i.defaultAdapter),e))||this}return e(i,t),Object.defineProperty(i,"strings",{get:function(){return I},enumerable:!1,configurable:!0}),Object.defineProperty(i,"cssClasses",{get:function(){return E},enumerable:!1,configurable:!0}),Object.defineProperty(i,"numbers",{get:function(){return T},enumerable:!1,configurable:!0}),Object.defineProperty(i,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},getTopAppBarHeight:function(){return 0},notifyNavigationIconClicked:function(){},getViewportScrollY:function(){return 0},getTotalActionItems:function(){return 0}}},enumerable:!1,configurable:!0}),i.prototype.handleTargetScroll=function(){},i.prototype.handleWindowResize=function(){},i.prototype.handleNavigationClick=function(){this.adapter.notifyNavigationIconClicked()},i}(o),O=function(t){function r(e){var r=t.call(this,e)||this;return r.wasDocked=!0,r.isDockedShowing=!0,r.currentAppBarOffsetTop=0,r.isCurrentlyBeingResized=!1,r.resizeThrottleId=0,r.resizeDebounceId=0,r.lastScrollPosition=r.adapter.getViewportScrollY(),r.topAppBarHeight=r.adapter.getTopAppBarHeight(),r}return e(r,t),r.prototype.destroy=function(){t.prototype.destroy.call(this),this.adapter.setStyle("top","")},r.prototype.handleTargetScroll=function(){var t=Math.max(this.adapter.getViewportScrollY(),0),e=t-this.lastScrollPosition;this.lastScrollPosition=t,this.isCurrentlyBeingResized||(this.currentAppBarOffsetTop-=e,this.currentAppBarOffsetTop>0?this.currentAppBarOffsetTop=0:Math.abs(this.currentAppBarOffsetTop)>this.topAppBarHeight&&(this.currentAppBarOffsetTop=-this.topAppBarHeight),this.moveTopAppBar())},r.prototype.handleWindowResize=function(){var t=this;this.resizeThrottleId||(this.resizeThrottleId=setTimeout((function(){t.resizeThrottleId=0,t.throttledResizeHandler()}),T.DEBOUNCE_THROTTLE_RESIZE_TIME_MS)),this.isCurrentlyBeingResized=!0,this.resizeDebounceId&&clearTimeout(this.resizeDebounceId),this.resizeDebounceId=setTimeout((function(){t.handleTargetScroll(),t.isCurrentlyBeingResized=!1,t.resizeDebounceId=0}),T.DEBOUNCE_THROTTLE_RESIZE_TIME_MS)},r.prototype.checkForUpdate=function(){var t=-this.topAppBarHeight,e=this.currentAppBarOffsetTop<0,r=this.currentAppBarOffsetTop>t,i=e&&r;if(i)this.wasDocked=!1;else{if(!this.wasDocked)return this.wasDocked=!0,!0;if(this.isDockedShowing!==r)return this.isDockedShowing=r,!0}return i},r.prototype.moveTopAppBar=function(){if(this.checkForUpdate()){var t=this.currentAppBarOffsetTop;Math.abs(t)>=this.topAppBarHeight&&(t=-T.MAX_TOP_APP_BAR_HEIGHT),this.adapter.setStyle("top",t+"px")}},r.prototype.throttledResizeHandler=function(){var t=this.adapter.getTopAppBarHeight();this.topAppBarHeight!==t&&(this.wasDocked=!1,this.currentAppBarOffsetTop-=this.topAppBarHeight-t,this.topAppBarHeight=t),this.handleTargetScroll()},r}(_),L=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return e.wasScrolled=!1,e}return e(r,t),r.prototype.handleTargetScroll=function(){this.adapter.getViewportScrollY()<=0?this.wasScrolled&&(this.adapter.removeClass(E.FIXED_SCROLLED_CLASS),this.wasScrolled=!1):this.wasScrolled||(this.adapter.addClass(E.FIXED_SCROLLED_CLASS),this.wasScrolled=!0)},r}(O),w=function(t){function r(e){var r=t.call(this,e)||this;return r.collapsed=!1,r.isAlwaysCollapsed=!1,r}return e(r,t),Object.defineProperty(r.prototype,"isCollapsed",{get:function(){return this.collapsed},enumerable:!1,configurable:!0}),r.prototype.init=function(){t.prototype.init.call(this),this.adapter.getTotalActionItems()>0&&this.adapter.addClass(E.SHORT_HAS_ACTION_ITEM_CLASS),this.setAlwaysCollapsed(this.adapter.hasClass(E.SHORT_COLLAPSED_CLASS))},r.prototype.setAlwaysCollapsed=function(t){this.isAlwaysCollapsed=!!t,this.isAlwaysCollapsed?this.collapse():this.maybeCollapseBar()},r.prototype.getAlwaysCollapsed=function(){return this.isAlwaysCollapsed},r.prototype.handleTargetScroll=function(){this.maybeCollapseBar()},r.prototype.maybeCollapseBar=function(){this.isAlwaysCollapsed||(this.adapter.getViewportScrollY()<=0?this.collapsed&&this.uncollapse():this.collapsed||this.collapse())},r.prototype.uncollapse=function(){this.adapter.removeClass(E.SHORT_COLLAPSED_CLASS),this.collapsed=!1},r.prototype.collapse=function(){this.adapter.addClass(E.SHORT_COLLAPSED_CLASS),this.collapsed=!0},r}(_),R=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.attachTo=function(t){return new r(t)},r.prototype.initialize=function(t){void 0===t&&(t=function(t){return C.attachTo(t)}),this.navIcon=this.root.querySelector(I.NAVIGATION_ICON_SELECTOR);var e=[].slice.call(this.root.querySelectorAll(I.ACTION_ITEM_SELECTOR));this.navIcon&&e.push(this.navIcon),this.iconRipples=e.map((function(e){var r=t(e);return r.unbounded=!0,r})),this.scrollTarget=window},r.prototype.initialSyncWithDOM=function(){this.handleNavigationClick=this.foundation.handleNavigationClick.bind(this.foundation),this.handleWindowResize=this.foundation.handleWindowResize.bind(this.foundation),this.handleTargetScroll=this.foundation.handleTargetScroll.bind(this.foundation),this.scrollTarget.addEventListener("scroll",this.handleTargetScroll),this.navIcon&&this.navIcon.addEventListener("click",this.handleNavigationClick);var t=this.root.classList.contains(E.FIXED_CLASS);this.root.classList.contains(E.SHORT_CLASS)||t||window.addEventListener("resize",this.handleWindowResize)},r.prototype.destroy=function(){var e,r;try{for(var n=i(this.iconRipples),a=n.next();!a.done;a=n.next())a.value.destroy()}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}this.scrollTarget.removeEventListener("scroll",this.handleTargetScroll),this.navIcon&&this.navIcon.removeEventListener("click",this.handleNavigationClick);var o=this.root.classList.contains(E.FIXED_CLASS);this.root.classList.contains(E.SHORT_CLASS)||o||window.removeEventListener("resize",this.handleWindowResize),t.prototype.destroy.call(this)},r.prototype.setScrollTarget=function(t){this.scrollTarget.removeEventListener("scroll",this.handleTargetScroll),this.scrollTarget=t,this.handleTargetScroll=this.foundation.handleTargetScroll.bind(this.foundation),this.scrollTarget.addEventListener("scroll",this.handleTargetScroll)},r.prototype.getDefaultFoundation=function(){var t=this,e={hasClass:function(e){return t.root.classList.contains(e)},addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},setStyle:function(e,r){return t.root.style.setProperty(e,r)},getTopAppBarHeight:function(){return t.root.clientHeight},notifyNavigationIconClicked:function(){return t.emit(I.NAVIGATION_EVENT,{})},getViewportScrollY:function(){var e=t.scrollTarget,r=t.scrollTarget;return void 0!==e.pageYOffset?e.pageYOffset:r.scrollTop},getTotalActionItems:function(){return t.root.querySelectorAll(I.ACTION_ITEM_SELECTOR).length}};return this.root.classList.contains(E.SHORT_CLASS)?new w(e):this.root.classList.contains(E.FIXED_CLASS)?new L(e):new O(e)},r}(s),D=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e};const B=function(){function t(t){this.element=document.createElement(t)}return t.prototype.addAttributes=function(t){for(var e=0,r=Object.keys(t);e0&&i.currentFix--})),window.addEventListener("mousemove",n),window.addEventListener("mouseup",(function(){r=null,window.removeEventListener("mousemove",n)}))}))}))},t.prototype.getGroup=function(t){var e=t.attributes.getNamedItem("data-id").value;return this.playSpace.querySelectorAll('.cel-image[data-id="'+e+'"]')},t.prototype.reset=function(){var t=this;this.playSpace.querySelectorAll(".cel-image").forEach((function(t){t.style.visibility="hidden",t.style.left="0",t.style.top="0"})),this.playset.cels.forEach((function(e){t.maxFixById[e.id]||(t.maxFixById[e.id]=0),t.maxFixById[e.id]