parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var i=function(){function t(t,e,i){this.diameter=100,this.diameter2=0,this.thickness=6,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=null,this.progressCheck=null,this.diameter2=this.diameter/2,this.requestAnimationFrameMethod=i,this.container=t,this.progressCheck=e,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.canvas.style.width=this.diameter2+"px",this.canvas.style.height=this.diameter2+"px",this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}return t.prototype.setPlaying=function(t){var e=this.playing;this.playing=t,!e&&this.playing?this.animate():this.render()},t.prototype.animate=function(){var t=this.progress;this.progress=this.progressCheck(),t>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&this.requestAnimationFrameMethod.call(window,this.animate.bind(this))},t.prototype.render=function(){var t=this.playing?this.progress:0,e=this.diameter2-this.thickness,i=this.diameter2,s=this.diameter2;this.progressOffset+=.1*(1-this.progressOffset);var o=-Math.PI/2+t*(2*Math.PI),r=-Math.PI/2+this.progressOffset*(2*Math.PI);this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(i,s,e+4,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(i,s,e,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="rgba( 255, 255, 255, 0.2 )",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(i,s,e,r,o,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(i-14,s-14),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,10,28),this.context.fillRect(18,0,10,28)):(this.context.beginPath(),this.context.translate(4,0),this.context.moveTo(0,0),this.context.lineTo(24,14),this.context.lineTo(0,28),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},t.prototype.on=function(t,e){this.canvas.addEventListener(t,e,!1)},t.prototype.off=function(t,e){this.canvas.removeEventListener(t,e,!1)},t.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},t}();exports.Playback=i;var s=function(){function s(){var e=this;this.config={width:1920,height:1080,margin:.04,minScale:.2,maxScale:2,controls:!0,controlsTutorial:!0,controlsLayout:"bottom-right",controlsBackArrows:"faded",progress:!0,slideNumber:!1,showSlideNumber:"all",hashOneBasedIndex:!1,hash:!1,history:!1,keyboard:!0,keyboardCondition:null,overview:!0,disableLayout:!1,center:!0,touch:!0,loop:!1,rtl:!1,navigationMode:"default",shuffle:!1,fragments:!0,fragmentInURL:!1,embedded:!1,help:!0,pause:!0,showNotes:!1,autoPlayMedia:null,preloadIframes:null,autoSlide:0,autoSlideStoppable:!0,autoSlideMethod:null,defaultTiming:null,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,postMessage:!0,postMessageEvents:!1,focusBodyOnPageVisibilityChange:!0,transition:"slide",transitionSpeed:"default",backgroundTransition:"fade",parallaxBackgroundImage:"",parallaxBackgroundSize:"",parallaxBackgroundRepeat:"repeat",parallaxBackgroundPosition:"",parallaxBackgroundHorizontal:null,parallaxBackgroundVertical:null,pdfMaxPagesPerSlide:Number.POSITIVE_INFINITY,pdfSeparateFragments:!0,pdfPageHeightOffset:-1,viewDistance:3,display:"block",hideInactiveCursor:!0,hideCursorTime:5e3,dependencies:[]},this.initialized=!1,this.loaded=!1,this.overview=!1,this.overviewSlideWidth=null,this.overviewSlideHeight=null,this.hasNavigatedRight=!1,this.hasNavigatedDown=!1,this.state=[],this.scale=1,this.slidesTransform={layout:"",overview:""},this.dom={wrapper:void 0,slides:void 0,background:void 0,progress:void 0,progressbar:void 0,controls:void 0,slideNumber:void 0,speakerNotes:void 0,pauseOverlay:void 0,controlsLeft:void 0,controlsRight:void 0,controlsUp:void 0,controlsDown:void 0,controlsPrev:void 0,controlsNext:void 0,controlsRightArrow:void 0,controlsDownArrow:void 0,statusDiv:void 0,overlay:void 0},this.plugins={},this.asyncDependencies=[],this.features={transforms2d:!1,transforms3d:!1,requestAnimationFrameMethod:null,requestAnimationFrame:!1,canvas:!1,overviewTransitions:!1,zoom:!1},this.lastMouseWheelStep=0,this.cursorHidden=!1,this.eventsAreBound=!1,this.autoSlide=0,this.autoSlideStartTime=-1,this.autoSlidePaused=!1,this.touch={startX:0,startY:0,startCount:0,captured:!1,threshold:40},this.keyboardShortcuts={},this.registeredKeyBindings={},this.resume=function(){var t=e.dom.wrapper.classList.contains("paused");e.dom.wrapper.classList.remove("paused"),e.cueAutoSlide(),t&&e.dispatchEvent("resumed")},this.startEmbeddedMedia=function(t){var i=!!e.closestParent(t.target,"html"),s=!!e.closestParent(t.target,".present");i&&s&&(t.target.currentTime=0,t.target.play()),t.target.removeEventListener("loadeddata",e.startEmbeddedMedia)},this.startEmbeddedIframe=function(t){var i=t.target;if(i&&i.contentWindow){var s=!!e.closestParent(t.target,"html"),o=!!e.closestParent(t.target,".present");if(s&&o){var r=e.config.autoPlayMedia;"boolean"!=typeof r&&(r=i.hasAttribute("data-autoplay")||!!e.closestParent(i,".slide-background")),/youtube\.com\/embed\//.test(i.getAttribute("src"))&&r?i.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*"):/player\.vimeo\.com\//.test(i.getAttribute("src"))&&r?i.contentWindow.postMessage('{"method":"play"}',"*"):i.contentWindow.postMessage("slide:start","*")}}},this.onUserInput=function(){e.config.autoSlideStoppable&&e.pauseAutoSlide()},this.onDocumentCursorActive=function(){e.showCursor(),clearTimeout(e.cursorInactiveTimeout),e.cursorInactiveTimeout=setTimeout(function(){return e.hideCursor()},e.config.hideCursorTime)},this.onDocumentKeyPress=function(t){t.shiftKey&&63===t.charCode&&e.toggleHelp()},this.onDocumentKeyDown=function(i){if("function"==typeof e.config.keyboardCondition&&!1===e.config.keyboardCondition(i))return!0;var s=i.keyCode,o=e.autoSlidePaused;e.onUserInput();var r=document.activeElement&&"inherit"!==document.activeElement.contentEditable,n=document.activeElement&&document.activeElement.tagName&&/input|textarea/i.test(document.activeElement.tagName),a=document.activeElement&&document.activeElement.className&&/speaker-notes/i.test(document.activeElement.className),d=i.shiftKey&&32===i.keyCode,l=(i.metaKey||i.ctrlKey)&&37===s,c=(i.metaKey||i.ctrlKey)&&39===s,h=!d&&!l&&!c&&(i.shiftKey||i.altKey||i.ctrlKey||i.metaKey);if(!(r||n||a||h)){var u,p=[66,86,190,191];if("object"===t(e.config.keyboard))for(u in e.config.keyboard)"togglePause"===e.config.keyboard[u]&&p.push(parseInt(u,10));if(e.isPaused()&&-1===p.indexOf(s))return!1;var v=!1;if("object"===t(e.config.keyboard))for(u in e.config.keyboard)if(parseInt(u,10)===s){var g=e.config.keyboard[u];"function"==typeof g?g.apply(null,[i]):"string"==typeof g&&"function"==typeof window.Reveal[g]&&window.Reveal[g].call(),v=!0}if(!1===v)for(u in e.registeredKeyBindings)if(parseInt(u,10)===s){var f=e.registeredKeyBindings[u].callback;"function"==typeof f?f.apply(null,[i]):"string"==typeof f&&"function"==typeof window.Reveal[f]&&window.Reveal[f].call(),v=!0}!1===v&&(v=!0,80===s||33===s?e.navigatePrev():78===s||34===s?e.navigateNext():72===s||37===s?l?e.slide(0):e.isOverview()||"linear"!==e.config.navigationMode?e.navigateLeft():e.navigatePrev():76===s||39===s?c?e.slide(Number.MAX_VALUE):e.isOverview()||"linear"!==e.config.navigationMode?e.navigateRight():e.navigateNext():75===s||38===s?e.isOverview()||"linear"!==e.config.navigationMode?e.navigateUp():e.navigatePrev():74===s||40===s?e.isOverview()||"linear"!==e.config.navigationMode?e.navigateDown():e.navigateNext():36===s?e.slide(0):35===s?e.slide(Number.MAX_VALUE):32===s?(e.isOverview()&&e.deactivateOverview(),i.shiftKey?e.navigatePrev():e.navigateNext()):58===s||59===s||66===s||86===s||190===s||191===s?e.togglePause():70===s?e.enterFullscreen():65===s?e.config.autoSlideStoppable&&e.toggleAutoSlide(o):v=!1),v?i.preventDefault&&i.preventDefault():27!==s&&79!==s||!e.features.transforms3d||(e.dom.overlay?e.closeOverlay():e.toggleOverview(),i.preventDefault&&i.preventDefault()),e.cueAutoSlide()}},this.onTouchStart=function(t){if(e.isSwipePrevented(t.target))return!0;e.touch.startX=t.touches[0].clientX,e.touch.startY=t.touches[0].clientY,e.touch.startCount=t.touches.length},this.onTouchMove=function(t){if(e.isSwipePrevented(t.target))return!0;if(e.touch.captured)s.UA.match(/android/gi)&&t.preventDefault();else{e.onUserInput();var i=t.touches[0].clientX,o=t.touches[0].clientY;if(1===t.touches.length&&2!==e.touch.startCount){var r=i-e.touch.startX,n=o-e.touch.startY;r>e.touch.threshold&&Math.abs(r)>Math.abs(n)?(e.touch.captured=!0,e.navigateLeft()):r<-e.touch.threshold&&Math.abs(r)>Math.abs(n)?(e.touch.captured=!0,e.navigateRight()):n>e.touch.threshold?(e.touch.captured=!0,e.navigateUp()):n<-e.touch.threshold&&(e.touch.captured=!0,e.navigateDown()),e.config.embedded?(e.touch.captured||e.isVerticalSlide(e.currentSlide))&&t.preventDefault():t.preventDefault()}}},this.onTouchEnd=function(t){e.touch.captured=!1},this.onPointerDown=function(t){t.pointerType!==t.MSPOINTER_TYPE_TOUCH&&"touch"!==t.pointerType||(t.touches=[{clientX:t.clientX,clientY:t.clientY}],e.onTouchStart(t))},this.onPointerMove=function(t){t.pointerType!==t.MSPOINTER_TYPE_TOUCH&&"touch"!==t.pointerType||(t.touches=[{clientX:t.clientX,clientY:t.clientY}],e.onTouchMove(t))},this.onPointerUp=function(t){t.pointerType!==t.MSPOINTER_TYPE_TOUCH&&"touch"!==t.pointerType||(t.touches=[{clientX:t.clientX,clientY:t.clientY}],e.onTouchEnd(t))},this.onDocumentMouseScroll=function(t){if(Date.now()-e.lastMouseWheelStep>600){e.lastMouseWheelStep=Date.now();var i=t.detail||-t.wheelDelta;i>0?e.navigateNext():i<0&&e.navigatePrev()}},this.onProgressClicked=function(t){e.onUserInput(),t.preventDefault();var i=e.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR).length,o=Math.floor(t.clientX/e.dom.wrapper.offsetWidth*i);e.config.rtl&&(o=i-o),e.slide(o)},this.onNavigateLeftClicked=function(t){t.preventDefault(),e.onUserInput(),"linear"===e.config.navigationMode?e.navigatePrev():e.navigateLeft()},this.onNavigateRightClicked=function(t){t.preventDefault(),e.onUserInput(),"linear"===e.config.navigationMode?e.navigateNext():e.navigateRight()},this.onNavigateUpClicked=function(t){t.preventDefault(),e.onUserInput(),e.navigateUp()},this.onNavigateDownClicked=function(t){t.preventDefault(),e.onUserInput(),e.navigateDown()},this.onNavigatePrevClicked=function(t){t.preventDefault(),e.onUserInput(),e.navigatePrev()},this.onNavigateNextClicked=function(t){t.preventDefault(),e.onUserInput(),e.navigateNext()},this.onWindowHashChange=function(t){e.readURL()},this.onWindowResize=function(t){e.layout()},this.onPageVisibilityChange=function(t){!1===(document.webkitHidden||document.msHidden||document.hidden)&&document.activeElement!==document.body&&("function"==typeof document.activeElement.blur&&document.activeElement.blur(),document.body.focus())},this.onOverviewSlideClicked=function(t){if(e.eventsAreBound&&e.isOverview()){t.preventDefault();for(var i=t.target;i&&!i.nodeName.match(/section/gi);)i=i.parentNode;if(i&&!i.classList.contains("disabled")&&(e.deactivateOverview(),i.nodeName.match(/section/gi))){var s=parseInt(i.getAttribute("data-index-h"),10),o=parseInt(i.getAttribute("data-index-v"),10);e.slide(s,o)}}},this.onPreviewLinkClicked=function(t){if(t.currentTarget&&t.currentTarget.hasAttribute("href")){var i=t.currentTarget.getAttribute("href");i&&(e.showPreview(i),t.preventDefault())}},this.onAutoSlidePlayerClick=function(t){e.isLastSlide()&&!1===e.config.loop?(e.slide(0,0),e.resumeAutoSlide()):e.autoSlidePaused?e.resumeAutoSlide():e.pauseAutoSlide()}}return s.prototype.initialize=function(t){var e=this;if(!0!==this.initialized)if(this.initialized=!0,this.checkCapabilities(),this.features.transforms2d||this.features.transforms3d){this.dom.wrapper=document.querySelector(".reveal"),this.dom.slides=document.querySelector(".reveal .slides"),window.addEventListener("load",function(){return e.layout()},!1);var i=this.getQueryHash();i.dependencies&&delete i.dependencies,this.extend(this.config,t),this.extend(this.config,i),this.hideAddressBar(),this.load()}else{document.body.setAttribute("class","no-transforms");for(var s=this.toArray(document.getElementsByTagName("img")),o=this.toArray(document.getElementsByTagName("iframe")),r=s.concat(o),n=0,a=r.length;n1&&this.config.autoSlide&&this.config.autoSlideStoppable&&this.features.canvas&&this.features.requestAnimationFrame&&(this.autoSlidePlayer=new i(this.dom.wrapper,function(){return Math.min(Math.max((Date.now()-o.autoSlideStartTime)/o.autoSlide,0),1)},this.features.requestAnimationFrameMethod),this.autoSlidePlayer.on("click",this.onAutoSlidePlayerClick),this.autoSlidePaused=!1),!1===this.config.fragments&&this.dom.slides.querySelectorAll(".fragment").forEach(function(t){t.classList.add("visible"),t.classList.remove("current-fragment")});var a="none";this.config.slideNumber&&!this.isPrintingPDF()&&("all"===this.config.showSlideNumber?a="block":"speaker"===this.config.showSlideNumber&&this.isSpeakerNotes()&&(a="block")),this.dom.slideNumber.style.display=a,"default"!==this.config.navigationMode?this.dom.wrapper.setAttribute("data-navigation-mode",this.config.navigationMode):this.dom.wrapper.removeAttribute("data-navigation-mode"),"linear"===this.config.navigationMode?(this.keyboardShortcuts["→ , ↓ , SPACE , N , L , J"]="Next slide",this.keyboardShortcuts["← , ↑ , P , H , K"]="Previous slide"):(this.keyboardShortcuts["N , SPACE"]="Next slide",this.keyboardShortcuts.P="Previous slide",this.keyboardShortcuts["← , H"]="Navigate left",this.keyboardShortcuts["→ , L"]="Navigate right",this.keyboardShortcuts["↑ , K"]="Navigate up",this.keyboardShortcuts["↓ , J"]="Navigate down"),this.keyboardShortcuts["Home , ⌘/CTRL ←"]="First slide",this.keyboardShortcuts["End , ⌘/CTRL →"]="Last slide",this.keyboardShortcuts["B , ."]="Pause",this.keyboardShortcuts.F="Fullscreen",this.keyboardShortcuts["ESC, O"]="Slide overview",this.sync()}},s.prototype.addEventListeners=function(){var t=this;if(this.eventsAreBound=!0,window.addEventListener("hashchange",this.onWindowHashChange,!1),window.addEventListener("resize",this.onWindowResize,!1),this.config.touch&&("onpointerdown"in window?(this.dom.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.dom.wrapper.addEventListener("pointermove",this.onPointerMove,!1),this.dom.wrapper.addEventListener("pointerup",this.onPointerUp,!1)):window.navigator.msPointerEnabled?(this.dom.wrapper.addEventListener("MSPointerDown",this.onPointerDown,!1),this.dom.wrapper.addEventListener("MSPointerMove",this.onPointerMove,!1),this.dom.wrapper.addEventListener("MSPointerUp",this.onPointerUp,!1)):(this.dom.wrapper.addEventListener("touchstart",this.onTouchStart,!1),this.dom.wrapper.addEventListener("touchmove",this.onTouchMove,!1),this.dom.wrapper.addEventListener("touchend",this.onTouchEnd,!1))),this.config.keyboard&&(document.addEventListener("keydown",this.onDocumentKeyDown,!1),document.addEventListener("keypress",this.onDocumentKeyPress,!1)),this.config.progress&&this.dom.progress&&this.dom.progress.addEventListener("click",this.onProgressClicked,!1),this.dom.pauseOverlay.addEventListener("click",this.resume,!1),this.config.focusBodyOnPageVisibilityChange){var e=void 0;"hidden"in document?e="visibilitychange":"msHidden"in document?e="msvisibilitychange":"webkitHidden"in document&&(e="webkitvisibilitychange"),e&&document.addEventListener(e,this.onPageVisibilityChange,!1)}var i=["touchstart","click"];s.UA.match(/android/gi)&&(i=["touchstart"]),i.forEach(function(e){t.dom.controlsLeft.forEach(function(i){i.addEventListener(e,t.onNavigateLeftClicked,!1)}),t.dom.controlsRight.forEach(function(i){i.addEventListener(e,t.onNavigateRightClicked,!1)}),t.dom.controlsUp.forEach(function(i){i.addEventListener(e,t.onNavigateUpClicked,!1)}),t.dom.controlsDown.forEach(function(i){i.addEventListener(e,t.onNavigateDownClicked,!1)}),t.dom.controlsPrev.forEach(function(i){i.addEventListener(e,t.onNavigatePrevClicked,!1)}),t.dom.controlsNext.forEach(function(i){i.addEventListener(e,t.onNavigateNextClicked,!1)})})},s.prototype.removeEventListeners=function(){var t=this;this.eventsAreBound=!1,document.removeEventListener("keydown",this.onDocumentKeyDown,!1),document.removeEventListener("keypress",this.onDocumentKeyPress,!1),window.removeEventListener("hashchange",this.onWindowHashChange,!1),window.removeEventListener("resize",this.onWindowResize,!1),this.dom.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),this.dom.wrapper.removeEventListener("pointermove",this.onPointerMove,!1),this.dom.wrapper.removeEventListener("pointerup",this.onPointerUp,!1),this.dom.wrapper.removeEventListener("MSPointerDown",this.onPointerDown,!1),this.dom.wrapper.removeEventListener("MSPointerMove",this.onPointerMove,!1),this.dom.wrapper.removeEventListener("MSPointerUp",this.onPointerUp,!1),this.dom.wrapper.removeEventListener("touchstart",this.onTouchStart,!1),this.dom.wrapper.removeEventListener("touchmove",this.onTouchMove,!1),this.dom.wrapper.removeEventListener("touchend",this.onTouchEnd,!1),this.dom.pauseOverlay.removeEventListener("click",this.resume,!1),this.config.progress&&this.dom.progress&&this.dom.progress.removeEventListener("click",this.onProgressClicked,!1),["touchstart","click"].forEach(function(e){t.dom.controlsLeft.forEach(function(i){i.removeEventListener(e,t.onNavigateLeftClicked,!1)}),t.dom.controlsRight.forEach(function(i){i.removeEventListener(e,t.onNavigateRightClicked,!1)}),t.dom.controlsUp.forEach(function(i){i.removeEventListener(e,t.onNavigateUpClicked,!1)}),t.dom.controlsDown.forEach(function(i){i.removeEventListener(e,t.onNavigateDownClicked,!1)}),t.dom.controlsPrev.forEach(function(i){i.removeEventListener(e,t.onNavigatePrevClicked,!1)}),t.dom.controlsNext.forEach(function(i){i.removeEventListener(e,t.onNavigateNextClicked,!1)})})},s.prototype.registerPlugin=function(t,e){void 0===this.plugins[t]?(this.plugins[t]=e,this.loaded&&"function"==typeof e.init&&e.init()):console.warn('reveal.js: "'+t+'" plugin has already been registered')},s.prototype.layout=function(){if(this.dom.wrapper&&!this.isPrintingPDF()){if(!this.config.disableLayout){this.isMobileDevice&&document.documentElement.style.setProperty("--vh",.01*window.innerHeight+"px");var t=this.getComputedSlideSize(),e=this.scale;this.layoutSlideContents(this.config.width,this.config.height),this.dom.slides.style.width=t.width+"px",this.dom.slides.style.height=t.height+"px",this.scale=Math.min(t.presentationWidth/t.width,t.presentationHeight/t.height),this.scale=Math.max(this.scale,this.config.minScale),this.scale=Math.min(this.scale,this.config.maxScale),1===this.scale?(this.dom.slides.style.zoom="",this.dom.slides.style.left="",this.dom.slides.style.top="",this.dom.slides.style.bottom="",this.dom.slides.style.right="",this.transformSlides({layout:""})):this.scale>1&&this.features.zoom?(this.dom.slides.style.zoom=""+this.scale,this.dom.slides.style.left="",this.dom.slides.style.top="",this.dom.slides.style.bottom="",this.dom.slides.style.right="",this.transformSlides({layout:""})):(this.dom.slides.style.zoom="",this.dom.slides.style.left="50%",this.dom.slides.style.top="50%",this.dom.slides.style.bottom="auto",this.dom.slides.style.right="auto",this.transformSlides({layout:"translate(-50%, -50%) scale("+this.scale+")"}));for(var i=this.dom.wrapper.querySelectorAll(s.SLIDES_SELECTOR),o=0,r=i.length;o0&&t.load()});var s=t.slideBackgroundElement;if(s){s.style.display="block";var o=t.slideBackgroundContentElement;if(!1===s.hasAttribute("data-loaded")){s.setAttribute("data-loaded","true");var r=t.getAttribute("data-background-image"),n=t.getAttribute("data-background-video"),a=t.hasAttribute("data-background-video-loop"),d=t.hasAttribute("data-background-video-muted"),l=t.getAttribute("data-background-iframe");if(r)o.style.backgroundImage="url("+encodeURI(r)+")";else if(n&&!this.isSpeakerNotes()){var c=document.createElement("video");a&&c.setAttribute("loop",""),d&&(c.muted=!0),this.isMobileDevice&&(c.muted=!0,c.autoplay=!0,c.setAttribute("playsinline","")),n.split(",").forEach(function(t){c.innerHTML+=''}),o.appendChild(c)}else if(l&&!0!==e.excludeIframes){var h=document.createElement("iframe");h.setAttribute("allowfullscreen",""),h.setAttribute("mozallowfullscreen",""),h.setAttribute("webkitallowfullscreen",""),/autoplay=(1|true|yes)/gi.test(l)?h.setAttribute("data-src",l):h.setAttribute("src",l),h.style.width="100%",h.style.height="100%",h.style.maxHeight="100%",h.style.maxWidth="100%",o.appendChild(h)}}}},s.prototype.unloadSlide=function(t){t.style.display="none";var e=this.getSlideBackground(t);e&&(e.style.display="none"),t.querySelectorAll("video[data-lazy-loaded][src], audio[data-lazy-loaded][src], iframe[data-lazy-loaded][src]").forEach(function(t){t.setAttribute("data-src",t.getAttribute("src")),t.removeAttribute("src")}),t.querySelectorAll("video[data-lazy-loaded] source[src], audio source[src]").forEach(function(t){t.setAttribute("data-src",t.getAttribute("src")),t.removeAttribute("src")})},s.prototype.availableRoutes=function(){var t=this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR),e=this.dom.wrapper.querySelectorAll(s.VERTICAL_SLIDES_SELECTOR),i={left:this.indexh>0,right:this.indexh0,down:this.indexv1&&(i.left=!0,i.right=!0),e.length>1&&(i.up=!0,i.down=!0)),this.config.rtl){var o=i.left;i.left=i.right,i.right=o}return i},s.prototype.availableFragments=function(){if(this.currentSlide&&this.config.fragments){var t=this.currentSlide.querySelectorAll(".fragment"),e=this.currentSlide.querySelectorAll(".fragment:not(.visible)");return{prev:t.length-e.length>0,next:!!e.length}}return{prev:!1,next:!1}},s.prototype.getSlidePastCount=function(){var t=this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR),e=0;t:for(var i=0;i0){e+=this.currentSlide.querySelectorAll(".fragment.visible").length/i.length*.9}}return Math.min(e/(t-1),1)},s.prototype.isSpeakerNotes=function(){return!!window.location.search.match(/receiver/gi)},s.prototype.getIndices=function(t){var e,i=this.indexh,o=this.indexv;if(t){var r=this.isVerticalSlide(t),n=r?t.parentNode:t,a=this.toArray(this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR));i=Math.max(a.indexOf(n),0),o=void 0,r&&(o=Math.max(this.toArray(t.parentNode.querySelectorAll("section")).indexOf(t),0))}if(!t&&this.currentSlide&&this.currentSlide.querySelectorAll(".fragment").length>0){var d=this.currentSlide.querySelector(".current-fragment");e=d&&d.hasAttribute("data-fragment-index")?parseInt(d.getAttribute("data-fragment-index"),10):this.currentSlide.querySelectorAll(".fragment.visible").length-1}return{h:i,v:o,f:e}},s.prototype.getSlides=function(){return this.toArray(this.dom.wrapper.querySelectorAll(s.SLIDES_SELECTOR+":not(.stack)"))},s.prototype.getSlidesAttributes=function(){return this.getSlides().map(function(t){for(var e={},i=0;i"),this.dom.progressbar=this.dom.progress.querySelector("span"),this.dom.controls=this.createSingletonNode(this.dom.wrapper,"aside","controls",''),this.dom.slideNumber=this.createSingletonNode(this.dom.wrapper,"div","slide-number",""),this.dom.speakerNotes=this.createSingletonNode(this.dom.wrapper,"div","speaker-notes",null),this.dom.speakerNotes.setAttribute("data-prevent-swipe",""),this.dom.speakerNotes.setAttribute("tabindex","0"),this.dom.pauseOverlay=this.createSingletonNode(this.dom.wrapper,"div","pause-overlay",this.config.controls?'':null),this.dom.wrapper.setAttribute("role","application"),this.dom.controlsLeft=this.toArray(document.querySelectorAll(".navigate-left")),this.dom.controlsRight=this.toArray(document.querySelectorAll(".navigate-right")),this.dom.controlsUp=this.toArray(document.querySelectorAll(".navigate-up")),this.dom.controlsDown=this.toArray(document.querySelectorAll(".navigate-down")),this.dom.controlsPrev=this.toArray(document.querySelectorAll(".navigate-prev")),this.dom.controlsNext=this.toArray(document.querySelectorAll(".navigate-next")),this.dom.controlsRightArrow=this.dom.controls.querySelector(".navigate-right"),this.dom.controlsDownArrow=this.dom.controls.querySelector(".navigate-down"),this.dom.statusDiv=this.createStatusDiv()},s.prototype.createStatusDiv=function(){var t=document.getElementById("aria-status-div");return t||((t=document.createElement("div")).style.position="absolute",t.style.height="1px",t.style.width="1px",t.style.overflow="hidden",t.style.clip="rect( 1px, 1px, 1px, 1px )",t.setAttribute("id","aria-status-div"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),this.dom.wrapper.appendChild(t)),t},s.prototype.getStatusText=function(t){var e=this,i="";if(3===t.nodeType)i+=t.textContent;else if(1===t.nodeType){var s=t.getAttribute("aria-hidden"),o="none"===window.getComputedStyle(t).display;"true"===s||o||t.childNodes.forEach(function(t){i+=e.getStatusText(t)})}return i},s.prototype.setupPDF=function(){var t=this,e=this.getComputedSlideSize(window.innerWidth,window.innerHeight);e.height/=1+this.config.margin;var i=Math.floor(e.width*(1+this.config.margin)),o=Math.floor(e.height*(1+this.config.margin)),r=e.width,n=e.height;this.injectStyleSheet("@page{size:"+i+"px "+o+"px; margin: 0px;}"),this.injectStyleSheet(".reveal section>img, .reveal section>video, .reveal section>iframe{max-width: "+r+"px; max-height: "+n+"px}"),document.body.classList.add("print-pdf"),document.body.style.width=i+"px",document.body.style.height=o+"px",this.layoutSlideContents(r,n),this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR).forEach(function(t,e){t.setAttribute("data-index-h",""+e),t.classList.contains("stack")&&t.querySelectorAll("section").forEach(function(t,i){t.setAttribute("data-index-h",""+e),t.setAttribute("data-index-v",""+i)})}),this.dom.wrapper.querySelectorAll(s.SLIDES_SELECTOR).forEach(function(e){if(!1===e.classList.contains("stack")){var s=(i-r)/2,a=(o-n)/2,d=e.scrollHeight,l=Math.max(Math.ceil(d/o),1);(1===(l=Math.min(l,t.config.pdfMaxPagesPerSlide))&&t.config.center||e.classList.contains("center"))&&(a=Math.max((o-d)/2,0));var c=document.createElement("div");if(c.className="pdf-page",c.style.height=(o+t.config.pdfPageHeightOffset)*l+"px",e.parentNode.insertBefore(c,e),c.appendChild(e),e.style.left=s+"px",e.style.top=a+"px",e.style.width=r+"px",e.slideBackgroundElement&&c.insertBefore(e.slideBackgroundElement,e),t.config.showNotes){var h=t.getSlideNotes(e);if(h){var u="string"==typeof t.config.showNotes?t.config.showNotes:"inline",p=document.createElement("div");p.classList.add("speaker-notes"),p.classList.add("speaker-notes-pdf"),p.setAttribute("data-layout",u),p.innerHTML=h,"separate-page"===u?c.parentNode.insertBefore(p,c.nextSibling):(p.style.left="8px",p.style.bottom="8px",p.style.width=i-16+"px",c.appendChild(p))}}if(t.config.slideNumber&&/all|print/i.test(t.config.showSlideNumber)){var v=parseInt(e.getAttribute("data-index-h"),10)+1,g=parseInt(e.getAttribute("data-index-v"),10)+1,f=document.createElement("div");f.classList.add("slide-number"),f.classList.add("slide-number-pdf"),f.innerHTML=t.formatSlideNumber(v,".",g),c.appendChild(f)}if(t.config.pdfSeparateFragments){var m,y,b=t.sortFragments(c.querySelectorAll(".fragment"),!0);b.forEach(function(t){m&&m.forEach(function(t){t.classList.remove("current-fragment")}),t.forEach(function(t){t.classList.add("visible","current-fragment")});var e=c.cloneNode(!0);c.parentNode.insertBefore(e,(y||c).nextSibling),m=t,y=e}),b.forEach(function(t){t.forEach(function(t){t.classList.remove("visible","current-fragment")})})}else c.querySelectorAll(".fragment:not(.fade-out)").forEach(function(t){t.classList.add("visible")})}}),this.dispatchEvent("pdf-ready")},s.prototype.setupScrollPrevention=function(){var t=this;setInterval(function(){0===t.dom.wrapper.scrollTop&&0===t.dom.wrapper.scrollLeft||(t.dom.wrapper.scrollTop=0,t.dom.wrapper.scrollLeft=0)},1e3)},s.prototype.createSingletonNode=function(t,e,i,s){for(var o=t.querySelectorAll("."+i),r=0;r",'','',"",'
','
','','','Unable to load iframe. This is likely due to the site\'s policy (x-frame-options).',"","
"].join(""),this.dom.overlay.querySelector("iframe").addEventListener("load",function(t){e.dom.overlay.classList.add("loaded")},!1),this.dom.overlay.querySelector(".close").addEventListener("click",function(t){e.closeOverlay(),t.preventDefault()},!1),this.dom.overlay.querySelector(".external").addEventListener("click",function(t){e.closeOverlay()},!1),setTimeout(function(){e.dom.overlay.classList.add("visible")},1)},s.prototype.showHelp=function(){var t,i,s=this;if(this.config.help){this.closeOverlay(),this.dom.overlay=document.createElement("div"),this.dom.overlay.classList.add("overlay"),this.dom.overlay.classList.add("overlay-help"),this.dom.wrapper.appendChild(this.dom.overlay);var o='

Keyboard Shortcuts


';o+="";try{for(var r=e(Object.keys(this.keyboardShortcuts)),n=r.next();!n.done;n=r.next()){var a=n.value;o+=""}}catch(l){t={error:l}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}for(var d in this.registeredKeyBindings)this.registeredKeyBindings[d].key&&this.registeredKeyBindings[d].description&&(o+="");o+="
KEYACTION
"+a+""+this.keyboardShortcuts[a]+"
"+this.registeredKeyBindings[d].key+""+this.registeredKeyBindings[d].description+"
",this.dom.overlay.innerHTML=["
",'',"
",'
','
'+o+"
","
"].join(""),this.dom.overlay.querySelector(".close").addEventListener("click",function(t){s.closeOverlay(),t.preventDefault()},!1),setTimeout(function(){s.dom.overlay.classList.add("visible")},1)}},s.prototype.closeOverlay=function(){this.dom.overlay&&(this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.dom.overlay=null)},s.prototype.layoutSlideContents=function(t,e){var i=this;this.dom.slides.querySelectorAll("section > .stretch").forEach(function(s){var o=i.getRemainingHeight(s,e);if(/(img|video)/gi.test(s.nodeName)){var r=s,n=r.naturalWidth||r.videoWidth,a=r.naturalHeight||r.videoHeight,d=Math.min(t/n,o/a);s.style.width=n*d+"px",s.style.height=a*d+"px"}else s.style.width=t+"px",s.style.height=o+"px"})},s.prototype.getComputedSlideSize=function(t,e){var i={width:this.config.width,height:this.config.height,presentationWidth:t||this.dom.wrapper.offsetWidth,presentationHeight:e||this.dom.wrapper.offsetHeight};return i.presentationWidth-=i.presentationWidth*this.config.margin,i.presentationHeight-=i.presentationHeight*this.config.margin,"string"==typeof i.width&&/%$/.test(i.width)&&(i.width=parseInt(i.width,10)/100*i.presentationWidth),"string"==typeof i.height&&/%$/.test(i.height)&&(i.height=parseInt(i.height,10)/100*i.presentationHeight),i},s.prototype.setPreviousVerticalIndex=function(e,i){"object"===t(e)&&"function"==typeof e.setAttribute&&e.setAttribute("data-previous-indexv",""+i||"0")},s.prototype.getPreviousVerticalIndex=function(e){if("object"===t(e)&&"function"==typeof e.setAttribute&&e.classList.contains("stack")){var i=e.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(e.getAttribute(i)||"0",10)}return 0},s.prototype.activateOverview=function(){var t=this;if(this.config.overview&&!this.isOverview()){this.overview=!0,this.dom.wrapper.classList.add("overview"),this.dom.wrapper.classList.remove("overview-deactivating"),this.features.overviewTransitions&&setTimeout(function(){t.dom.wrapper.classList.add("overview-animated")},1),this.cancelAutoSlide(),this.dom.slides.appendChild(this.dom.background),this.dom.wrapper.querySelectorAll(s.SLIDES_SELECTOR).forEach(function(e){e.classList.contains("stack")||e.addEventListener("click",t.onOverviewSlideClicked,!0)});var e=this.getComputedSlideSize();this.overviewSlideWidth=e.width+70,this.overviewSlideHeight=e.height+70,this.config.rtl&&(this.overviewSlideWidth=-this.overviewSlideWidth),this.updateSlidesVisibility(),this.layoutOverview(),this.updateOverview(),this.layout(),this.dispatchEvent("overviewshown",{indexh:this.indexh,indexv:this.indexv,currentSlide:this.currentSlide})}},s.prototype.layoutOverview=function(){var t=this;this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR).forEach(function(e,i){e.setAttribute("data-index-h",""+i),t.transformElement(e,"translate3d("+i*t.overviewSlideWidth+"px, 0, 0)"),e.classList.contains("stack")&&e.querySelectorAll("section").forEach(function(e,s){e.setAttribute("data-index-h",""+i),e.setAttribute("data-index-v",""+s),t.transformElement(e,"translate3d(0, "+s*t.overviewSlideHeight+"px, 0)")})}),this.dom.background.childNodes.forEach(function(e,i){t.transformElement(e,"translate3d("+i*t.overviewSlideWidth+"px, 0, 0)"),e.querySelectorAll(".slide-background").forEach(function(e,i){t.transformElement(e,"translate3d(0, "+i*t.overviewSlideHeight+"px, 0)")})})},s.prototype.updateOverview=function(){var t=Math.min(window.innerWidth,window.innerHeight),e=Math.max(t/5,150)/t;this.transformSlides({overview:["scale("+e+")","translateX("+-this.indexh*this.overviewSlideWidth+"px)","translateY("+-this.indexv*this.overviewSlideHeight+"px)"].join(" ")})},s.prototype.deactivateOverview=function(){var t=this;this.config.overview&&(this.overview=!1,this.dom.wrapper.classList.remove("overview"),this.dom.wrapper.classList.remove("overview-animated"),this.dom.wrapper.classList.add("overview-deactivating"),setTimeout(function(){t.dom.wrapper.classList.remove("overview-deactivating")},1),this.dom.wrapper.appendChild(this.dom.background),this.dom.wrapper.querySelectorAll(s.SLIDES_SELECTOR).forEach(function(e){t.transformElement(e,""),e.removeEventListener("click",t.onOverviewSlideClicked,!0)}),this.dom.background.querySelectorAll(".slide-background").forEach(function(e){t.transformElement(e,"")}),this.transformSlides({overview:""}),this.slide(this.indexh,this.indexv),this.layout(),this.cueAutoSlide(),this.dispatchEvent("overviewhidden",{indexh:this.indexh,indexv:this.indexv,currentSlide:this.currentSlide}))},s.prototype.locationHash=function(){var t,e="/",i=this.currentSlide?this.currentSlide.getAttribute("id"):null;if(i&&(i=encodeURIComponent(i)),this.config.fragmentInURL&&(t=this.getIndices().f),"string"==typeof i&&i.length&&void 0===t)e="/"+i;else{var s=this.config.hashOneBasedIndex?1:0;(this.indexh>0||this.indexv>0||void 0!==t)&&(e+=this.indexh+s),(this.indexv>0||void 0!==t)&&(e+="/"+(this.indexv+s)),void 0!==t&&(e+="/"+t)}return e},s.prototype.isVerticalSlide=function(t){return(t=t||this.currentSlide)&&t.parentNode&&!!t.parentNode.nodeName.match(/section/i)},s.prototype.enterFullscreen=function(){var t=document.documentElement,e=t.requestFullscreen||t.webkitRequestFullscreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullscreen;e&&e.apply(t)},s.prototype.showCursor=function(){this.cursorHidden&&(this.cursorHidden=!1,this.dom.wrapper.style.cursor="")},s.prototype.hideCursor=function(){!1===this.cursorHidden&&(this.cursorHidden=!0,this.dom.wrapper.style.cursor="none")},s.prototype.pause=function(){if(this.config.pause){var t=this.dom.wrapper.classList.contains("paused");this.cancelAutoSlide(),this.dom.wrapper.classList.add("paused"),!1===t&&this.dispatchEvent("paused")}},s.prototype.resetVerticalSlides=function(){this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR).forEach(function(t){t.querySelectorAll("section").forEach(function(t,e){e>0&&(t.classList.remove("present"),t.classList.remove("past"),t.classList.add("future"),t.setAttribute("aria-hidden","true"))})})},s.prototype.sortAllFragments=function(){var t=this;this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR).forEach(function(e){var i=e.querySelectorAll("section");i.forEach(function(e,i){t.sortFragments(e.querySelectorAll(".fragment"))}),0===i.length&&t.sortFragments(e.querySelectorAll(".fragment"))})},s.prototype.updateSlides=function(t,e){var i=this.dom.wrapper.querySelectorAll(t),s=i.length,o=this.isPrintingPDF();if(s){this.config.loop&&(e%=s)<0&&(e=s+e),e=Math.max(Math.min(e,s-1),0);for(var r=0;re&&(n.classList.add(a?"past":"future"),this.config.fragments&&n.querySelectorAll(".fragment.visible").forEach(function(t){t.classList.remove("visible"),t.classList.remove("current-fragment")}))}i[e].classList.add("present"),i[e].removeAttribute("hidden"),i[e].removeAttribute("aria-hidden");var d=i[e].getAttribute("data-state");d&&(this.state=this.state.concat(d.split(" ")))}else e=0;return e},s.prototype.updateSlidesVisibility=function(){var t,e=this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR),i=e.length;if(i&&null!=this.indexh){var o=this.isOverview()?10:this.config.viewDistance;this.isMobileDevice&&(o=this.isOverview()?6:2),this.isPrintingPDF()&&(o=Number.MAX_VALUE);for(var r=0;rsection>section").length?this.dom.wrapper.classList.add("has-vertical-slides"):this.dom.wrapper.classList.remove("has-vertical-slides"),this.dom.wrapper.querySelectorAll(".slides>section").length>1?this.dom.wrapper.classList.add("has-horizontal-slides"):this.dom.wrapper.classList.remove("has-horizontal-slides")}},s.prototype.updateNotes=function(){this.config.showNotes&&this.dom.speakerNotes&&this.currentSlide&&!this.isPrintingPDF()&&(this.dom.speakerNotes.innerHTML=this.getSlideNotes()||'No notes on this slide.')},s.prototype.updateNotesVisibility=function(){this.config.showNotes&&this.hasNotes()?this.dom.wrapper.classList.add("show-notes"):this.dom.wrapper.classList.remove("show-notes")},s.prototype.hasNotes=function(){return this.dom.slides.querySelectorAll("[data-notes], aside.notes").length>0},s.prototype.updateProgress=function(){this.config.progress&&this.dom.progressbar&&(this.dom.progressbar.style.width=this.getProgress()*this.dom.wrapper.offsetWidth+"px")},s.prototype.updateSlideNumber=function(){if(this.config.slideNumber&&this.dom.slideNumber){var t=void 0,e="h.v";if("function"==typeof this.config.slideNumber)t=this.config.slideNumber();else switch("string"==typeof this.config.slideNumber&&(e=this.config.slideNumber),/c/.test(e)||1!==this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR).length||(e="c"),t=[],e){case"c":t.push(this.getSlidePastCount()+1);break;case"c/t":t.push(this.getSlidePastCount()+1,"/",this.getTotalSlides());break;case"h/v":t.push(this.indexh+1),this.isVerticalSlide()&&t.push("/",this.indexv+1);break;default:t.push(this.indexh+1),this.isVerticalSlide()&&t.push(".",this.indexv+1)}this.dom.slideNumber.innerHTML=this.formatSlideNumber(t[0],t[1],t[2])}},s.prototype.formatSlideNumber=function(t,e,i){var s="#"+this.locationHash();return"number"!=typeof i||isNaN(i)?''+t+"":''+t+''+e+''+i+""},s.prototype.updateControls=function(){var t=this.availableRoutes(),e=this.availableFragments();this.dom.controlsLeft.concat(this.dom.controlsRight).concat(this.dom.controlsUp).concat(this.dom.controlsDown).concat(this.dom.controlsPrev).concat(this.dom.controlsNext).forEach(function(t){t.classList.remove("enabled"),t.classList.remove("fragmented"),t.setAttribute("disabled","disabled")}),t.left&&this.dom.controlsLeft.forEach(function(t){t.classList.add("enabled"),t.removeAttribute("disabled")}),t.right&&this.dom.controlsRight.forEach(function(t){t.classList.add("enabled"),t.removeAttribute("disabled")}),t.up&&this.dom.controlsUp.forEach(function(t){t.classList.add("enabled"),t.removeAttribute("disabled")}),t.down&&this.dom.controlsDown.forEach(function(t){t.classList.add("enabled"),t.removeAttribute("disabled")}),(t.left||t.up)&&this.dom.controlsPrev.forEach(function(t){t.classList.add("enabled"),t.removeAttribute("disabled")}),(t.right||t.down)&&this.dom.controlsNext.forEach(function(t){t.classList.add("enabled"),t.removeAttribute("disabled")}),this.currentSlide&&(e.prev&&this.dom.controlsPrev.forEach(function(t){t.classList.add("fragmented","enabled"),t.removeAttribute("disabled")}),e.next&&this.dom.controlsNext.forEach(function(t){t.classList.add("fragmented","enabled"),t.removeAttribute("disabled")}),this.isVerticalSlide(this.currentSlide)?(e.prev&&this.dom.controlsUp.forEach(function(t){t.classList.add("fragmented","enabled"),t.removeAttribute("disabled")}),e.next&&this.dom.controlsDown.forEach(function(t){t.classList.add("fragmented","enabled"),t.removeAttribute("disabled")})):(e.prev&&this.dom.controlsLeft.forEach(function(t){t.classList.add("fragmented","enabled"),t.removeAttribute("disabled")}),e.next&&this.dom.controlsRight.forEach(function(t){t.classList.add("fragmented","enabled"),t.removeAttribute("disabled")}))),this.config.controlsTutorial&&(!this.hasNavigatedDown&&t.down?this.dom.controlsDownArrow.classList.add("highlight"):(this.dom.controlsDownArrow.classList.remove("highlight"),!this.hasNavigatedRight&&t.right&&0===this.indexv?this.dom.controlsRightArrow.classList.add("highlight"):this.dom.controlsRightArrow.classList.remove("highlight")))},s.prototype.updateBackground=function(t){var e=this;void 0===t&&(t=!1);var i=null,s=this.config.rtl?"future":"past",o=this.config.rtl?"past":"future";if(this.dom.background.childNodes.forEach(function(r,n){r.classList.remove("past"),r.classList.remove("present"),r.classList.remove("future"),ne.indexh?r.classList.add(o):(r.classList.add("present"),i=r),(t||n===e.indexh)&&r.querySelectorAll(".slide-background").forEach(function(t,s){t.classList.remove("past"),t.classList.remove("present"),t.classList.remove("future"),se.indexv?t.classList.add("future"):(t.classList.add("present"),n===e.indexh&&(i=t))})}),this.previousBackground&&this.stopEmbeddedContent(this.previousBackground),i){this.startEmbeddedContent(i);var r=i.querySelector(".slide-background-content");if(r){var n=r.style.backgroundImage||"";/\.gif/i.test(n)&&(r.style.backgroundImage="",window.getComputedStyle(r).opacity,r.style.backgroundImage=n)}var a=this.previousBackground?this.previousBackground.getAttribute("data-background-hash"):null,d=i.getAttribute("data-background-hash");d&&d===a&&i!==this.previousBackground&&this.dom.background.classList.add("no-transition"),this.previousBackground=i}this.currentSlide&&["has-light-background","has-dark-background"].forEach(function(t){e.currentSlide.classList.contains(t)?e.dom.wrapper.classList.add(t):e.dom.wrapper.classList.remove(t)}),setTimeout(function(){e.dom.background.classList.remove("no-transition")},1)},s.prototype.updateParallax=function(){if(this.config.parallaxBackgroundImage){var t=this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR),e=this.dom.wrapper.querySelectorAll(s.VERTICAL_SLIDES_SELECTOR),i=this.dom.background.style.backgroundSize.split(" "),o=void 0,r=void 0;1===i.length?o=r=parseInt(i[0],10):(o=parseInt(i[0],10),r=parseInt(i[1],10));var n,a=this.dom.background.offsetWidth,d=t.length;n=("number"==typeof this.config.parallaxBackgroundHorizontal?this.config.parallaxBackgroundHorizontal:d>1?(o-a)/(d-1):0)*this.indexh*-1;var l,c=this.dom.background.offsetHeight,h=e.length,u=void 0;u="number"==typeof this.config.parallaxBackgroundVertical?this.config.parallaxBackgroundVertical:(r-c)/(h-1),l=h>0?u*this.indexv:0,this.dom.background.style.backgroundPosition=n+"px "+-l+"px"}},s.prototype.shouldPreload=function(t){var e=this.config.preloadIframes;return"boolean"!=typeof e&&(e=t.hasAttribute("data-preload")),e},s.prototype.formatEmbeddedContent=function(){var t=this,e=function(e,i,s){t.dom.slides.querySelectorAll("iframe["+e+'*="'+i+'"]').forEach(function(t){var i=t.getAttribute(e);i&&-1===i.indexOf(s)&&t.setAttribute(e,i+(/\?/.test(i)?"&":"?")+s)})};e("src","youtube.com/embed/","enablejsapi=1"),e("data-src","youtube.com/embed/","enablejsapi=1"),e("src","player.vimeo.com/","api=1"),e("data-src","player.vimeo.com/","api=1")},s.prototype.startEmbeddedContent=function(t){var e=this;t&&!this.isSpeakerNotes()&&(t.querySelectorAll('img[src$=".gif"]').forEach(function(t){t.setAttribute("src",t.getAttribute("src"))}),t.querySelectorAll("video, audio").forEach(function(t){if(!e.closestParent(t,".fragment")||e.closestParent(t,".fragment.visible")){var i=e.config.autoPlayMedia;if("boolean"!=typeof i&&(i=t.hasAttribute("data-autoplay")||!!e.closestParent(t,".slide-background")),i&&"function"==typeof t.play)if(t.readyState>1)e.startEmbeddedMedia({target:t});else if(e.isMobileDevice){var s=t.play();s&&"function"==typeof s.catch&&!1===t.controls&&s.catch(function(){t.controls=!0,t.addEventListener("play",function(){t.controls=!1})})}else t.removeEventListener("loadeddata",e.startEmbeddedMedia),t.addEventListener("loadeddata",e.startEmbeddedMedia)}}),t.querySelectorAll("iframe[src]").forEach(function(t){e.closestParent(t,".fragment")&&!e.closestParent(t,".fragment.visible")||e.startEmbeddedIframe({target:t})}),t.querySelectorAll("iframe[data-src]").forEach(function(t){e.closestParent(t,".fragment")&&!e.closestParent(t,".fragment.visible")||t.getAttribute("src")!==t.getAttribute("data-src")&&(t.removeEventListener("load",e.startEmbeddedIframe),t.addEventListener("load",e.startEmbeddedIframe),t.setAttribute("src",t.getAttribute("data-src")))}))},s.prototype.stopEmbeddedContent=function(t,e){var i=this;e=this.extend({unloadIframes:!0},e||{}),t&&t.parentNode&&(t.querySelectorAll("video, audio").forEach(function(t){t.hasAttribute("data-ignore")||"function"!=typeof t.pause||(t.setAttribute("data-paused-by-reveal",""),t.pause())}),t.querySelectorAll("iframe").forEach(function(t){t.contentWindow&&t.contentWindow.postMessage("slide:stop","*"),t.removeEventListener("load",i.startEmbeddedIframe)}),t.querySelectorAll('iframe[src*="youtube.com/embed/"]').forEach(function(t){!t.hasAttribute("data-ignore")&&t.contentWindow&&"function"==typeof t.contentWindow.postMessage&&t.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),t.querySelectorAll('iframe[src*="player.vimeo.com/"]').forEach(function(t){!t.hasAttribute("data-ignore")&&t.contentWindow&&"function"==typeof t.contentWindow.postMessage&&t.contentWindow.postMessage('{"method":"pause"}',"*")}),!0===e.unloadIframes&&t.querySelectorAll("iframe[data-src]").forEach(function(t){t.setAttribute("src","about:blank"),t.removeAttribute("src")}))},s.prototype.readURL=function(){var t=window.location.hash,e=t.slice(2).split("/"),i=t.replace(/#|\//gi,"");if(!/^[0-9]*$/.test(e[0])&&i.length){var s=void 0;try{s=document.getElementById(decodeURIComponent(i))}catch(c){console.error(c)}var o=!!this.currentSlide&&this.currentSlide.getAttribute("id")===i;if(s){if(!o){var r=this.getIndices(s);this.slide(r.h,r.v)}}else this.slide(this.indexh||0,this.indexv||0)}else{var n=this.config.hashOneBasedIndex?1:0,a=parseInt(e[0],10)-n||0,d=parseInt(e[1],10)-n||0,l=void 0;this.config.fragmentInURL&&(l=parseInt(e[2],10),isNaN(l)&&(l=void 0)),a===this.indexh&&d===this.indexv&&void 0===l||this.slide(a,d,l)}},s.prototype.writeURL=function(t){var e=this;clearTimeout(this.writeURLTimeout),t?this.writeURLTimeout=setTimeout(function(){return e.writeURL()},t):this.currentSlide&&(this.config.history||!window.history?window.location.hash=this.locationHash():this.config.hash?window.history.replaceState(null,null,"#"+this.locationHash()):window.history.replaceState(null,null,window.location.pathname+window.location.search))},s.prototype.sortFragments=function(t,e){var i=this.toArray(t),s=[],o=[],r=[];i.forEach(function(t,e){if(t.hasAttribute("data-fragment-index")){var i=parseInt(t.getAttribute("data-fragment-index"),10);s[i]||(s[i]=[]),s[i].push(t)}else o.push([t])}),s=s.concat(o);var n=0;return s.forEach(function(t){t.forEach(function(t){r.push(t),t.setAttribute("data-fragment-index",""+n)}),n++}),!0===e?s:r},s.prototype.updateFragments=function(t,e){var i=this,s={shown:[],hidden:[]};if(this.currentSlide&&this.config.fragments&&(e=e||this.sortFragments(this.currentSlide.querySelectorAll(".fragment"))).length){if("number"!=typeof t){var o=this.sortFragments(this.currentSlide.querySelectorAll(".fragment.visible")).pop();o&&(t=parseInt(o.getAttribute("data-fragment-index")||"0",10))}e.forEach(function(e,o){e.hasAttribute("data-fragment-index")&&(o=parseInt(e.getAttribute("data-fragment-index"),10)),o<=t?(e.classList.contains("visible")||s.shown.push(e),e.classList.add("visible"),e.classList.remove("current-fragment"),i.dom.statusDiv.textContent=i.getStatusText(e),o===t&&(e.classList.add("current-fragment"),i.startEmbeddedContent(e))):(e.classList.contains("visible")&&s.hidden.push(e),e.classList.remove("visible"),e.classList.remove("current-fragment"))})}return s},s.prototype.cueAutoSlide=function(){var t=this;if(this.cancelAutoSlide(),this.currentSlide&&!1!==this.config.autoSlide){var e=this.currentSlide.querySelector(".current-fragment");e||(e=this.currentSlide.querySelector(".fragment"));var i=e?e.getAttribute("data-autoslide"):null,s=this.currentSlide.parentNode?this.currentSlide.parentNode.getAttribute("data-autoslide"):null,o=this.currentSlide.getAttribute("data-autoslide");this.autoSlide=i?parseInt(i,10):o?parseInt(o,10):s?parseInt(s,10):this.config.autoSlide,0===this.currentSlide.querySelectorAll(".fragment").length&&this.currentSlide.querySelectorAll("video, audio").forEach(function(e){e.hasAttribute("data-autoplay")&&t.autoSlide&&1e3*e.duration/e.playbackRate>t.autoSlide&&(t.autoSlide=1e3*e.duration/e.playbackRate+1e3)}),!this.autoSlide||this.autoSlidePaused||this.isPaused()||this.isOverview()||this.isLastSlide()&&!this.availableFragments().next&&!0!==this.config.loop||(this.autoSlideTimeout=setTimeout(function(){"function"==typeof t.config.autoSlideMethod?t.config.autoSlideMethod():t.navigateNext(),t.cueAutoSlide()},this.autoSlide),this.autoSlideStartTime=Date.now()),this.autoSlidePlayer&&this.autoSlidePlayer.setPlaying(-1!==this.autoSlideTimeout)}},s.prototype.cancelAutoSlide=function(){clearTimeout(this.autoSlideTimeout),this.autoSlideTimeout=-1},s.prototype.pauseAutoSlide=function(){this.autoSlide&&!this.autoSlidePaused&&(this.autoSlidePaused=!0,this.dispatchEvent("autoslidepaused"),clearTimeout(this.autoSlideTimeout),this.autoSlidePlayer&&this.autoSlidePlayer.setPlaying(!1))},s.prototype.resumeAutoSlide=function(){this.autoSlide&&this.autoSlidePaused&&(this.autoSlidePaused=!1,this.dispatchEvent("autoslideresumed"),this.cueAutoSlide())},s.prototype.isSwipePrevented=function(t){for(;t&&"function"==typeof t.hasAttribute;){if(t.hasAttribute("data-prevent-swipe"))return!0;t=t.parentNode}return!1},s.prototype.getQueryHash=function(){var t,i,s={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(t){return s[t.split("=").shift()]=t.split("=").pop()});try{for(var o=e(Object.keys(s)),r=o.next();!r.done;r=o.next()){var n=r.value,a=s[n];s[n]=this.deserialize(unescape(a))}}catch(d){t={error:d}}finally{try{r&&!r.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}return s},s.prototype.isLastSlide=function(){return!!this.currentSlide&&(!this.currentSlide.nextElementSibling&&(!this.isVerticalSlide(this.currentSlide)||!this.currentSlide.parentNode.nextElementSibling))},s.prototype.isLastVerticalSlide=function(){return!(!this.currentSlide||!this.isVerticalSlide(this.currentSlide))&&!this.currentSlide.nextElementSibling},s.VERSION="3.8.0",s.SLIDES_SELECTOR=".slides section",s.HORIZONTAL_SLIDES_SELECTOR=".slides>section",s.VERTICAL_SLIDES_SELECTOR=".slides>section.present>section",s.HOME_SLIDE_SELECTOR=".slides>section:first-of-type",s.UA=navigator.userAgent,s}(),o=new s;window.Reveal=o,exports.default=o; },{}],"cLXB":[function(require,module,exports) { "use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("../../libs/revealjs/revealjs"));exports.initPixiWatcher=function(){for(var e=[],r=0;r0?1:-1}),Number.isInteger||(Number.isInteger=function(n){return"number"==typeof n&&isFinite(n)&&Math.floor(n)===n}),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array),window.Uint8Array||(window.Uint8Array=Array),window.Int32Array||(window.Int32Array=Array); },{"es6-promise-polyfill":"aj4z","object-assign":"J4Nk"}],"nSZq":[function(require,module,exports) { var define; var e;!function(i){var o=/iPhone/i,d=/iPod/i,n=/iPad/i,t=/\bAndroid(?:.+)Mobile\b/i,r=/Android/i,a=/\bAndroid(?:.+)SD4930UR\b/i,p=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,b=/Windows Phone/i,l=/\bWindows(?:.+)ARM\b/i,s=/BlackBerry/i,u=/BB10/i,f=/Opera Mini/i,c=/\b(CriOS|Chrome)(?:.+)Mobile/i,v=/Mobile(?:.+)Firefox\b/i;function h(e,i){return e.test(i)}function w(e){var i=e||("undefined"!=typeof navigator?navigator.userAgent:""),w=i.split("[FBAN");void 0!==w[1]&&(i=w[0]),void 0!==(w=i.split("Twitter"))[1]&&(i=w[0]);var m={apple:{phone:h(o,i)&&!h(b,i),ipod:h(d,i),tablet:!h(o,i)&&h(n,i)&&!h(b,i),device:(h(o,i)||h(d,i)||h(n,i))&&!h(b,i)},amazon:{phone:h(a,i),tablet:!h(a,i)&&h(p,i),device:h(a,i)||h(p,i)},android:{phone:!h(b,i)&&h(a,i)||!h(b,i)&&h(t,i),tablet:!h(b,i)&&!h(a,i)&&!h(t,i)&&(h(p,i)||h(r,i)),device:!h(b,i)&&(h(a,i)||h(p,i)||h(t,i)||h(r,i))||h(/\bokhttp\b/i,i)},windows:{phone:h(b,i),tablet:h(l,i),device:h(b,i)||h(l,i)},other:{blackberry:h(s,i),blackberry10:h(u,i),opera:h(f,i),firefox:h(v,i),chrome:h(c,i),device:h(s,i)||h(u,i)||h(f,i)||h(v,i)||h(c,i)}};return m.any=m.apple.device||m.android.device||m.windows.device||m.other.device,m.phone=m.apple.phone||m.android.phone||m.windows.phone,m.tablet=m.apple.tablet||m.android.tablet||m.windows.tablet,m}"undefined"!=typeof module&&module.exports&&"undefined"==typeof window?module.exports=w:"undefined"!=typeof module&&module.exports&&"undefined"!=typeof window?(module.exports=w(),module.exports.isMobile=w):"function"==typeof e&&e.amd?e([],i.isMobile=w()):i.isMobile=w()}(this); },{}],"t4Uo":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"isMobile",{enumerable:!0,get:function(){return e.default}}),exports.settings=void 0;var e=t(require("ismobilejs"));function t(e){return e&&e.__esModule?e:{default:e}}function r(t){var r=!0;if(e.default.tablet||e.default.phone){if(r=!1,e.default.apple.device){var a=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(a)parseInt(a[1],10)>=11&&(r=!0)}if(e.default.android.device){var i=navigator.userAgent.match(/Android\s([0-9.]*)/);if(i)parseInt(i[1],10)>=7&&(r=!0)}}return r?t:4}function a(){return!e.default.apple.device}var i={MIPMAP_TEXTURES:1,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:r(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,forceFXAA:!1,autoDensity:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:33071,SCALE_MODE:1,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:e.default.apple.device?"highp":"mediump",CAN_UPLOAD_SAME_BUFFER:a(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};exports.settings=i; },{"ismobilejs":"nSZq"}],"JJlS":[function(require,module,exports) { "use strict";var e=Object.prototype.hasOwnProperty,t="~";function n(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,n,o,s,i){if("function"!=typeof o)throw new TypeError("The listener must be a function");var c=new r(o,s||e,i),f=t?t+n:n;return e._events[f]?e._events[f].fn?e._events[f]=[e._events[f],c]:e._events[f].push(c):(e._events[f]=c,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function i(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(t=!1)),i.prototype.eventNames=function(){var n,r,o=[];if(0===this._eventsCount)return o;for(r in n=this._events)e.call(n,r)&&o.push(t?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(n)):o},i.prototype.listeners=function(e){var n=t?t+e:e,r=this._events[n];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,s=r.length,i=new Array(s);o80*x){i=v=e[0],u=y=e[1];for(var Z=x;Zv&&(v=o),p>y&&(y=p);a=0!==(a=Math.max(v-i,y-u))?1/a:0}return r(s,c,x,i,u,a),c}function n(e,n,t,r,x){var i,u;if(x===D(e,n,t,r)>0)for(i=n;i=n;i-=r)u=A(i,e[i],e[i+1],u);return u&&w(u,u.next)&&(B(u),u=u.next),u}function t(e,n){if(!e)return e;n||(n=e);var t,r=e;do{if(t=!1,r.steiner||!w(r,r.next)&&0!==g(r.prev,r,r.next))r=r.next;else{if(B(r),(r=n=r.prev)===r.next)break;t=!0}}while(t||r!==n);return n}function r(e,n,f,y,o,p,a){if(e){!a&&p&&l(e,y,o,p);for(var h,s,c=e;e.prev!==e.next;)if(h=e.prev,s=e.next,p?i(e,y,o,p):x(e))n.push(h.i/f),n.push(e.i/f),n.push(s.i/f),B(e),e=s.next,c=s.next;else if((e=s)===c){a?1===a?r(e=u(t(e),n,f),n,f,y,o,p,2):2===a&&v(e,n,f,y,o,p):r(t(e),n,f,y,o,p,1);break}}}function x(e){var n=e.prev,t=e,r=e.next;if(g(n,t,r)>=0)return!1;for(var x=e.next.next;x!==e.prev;){if(Z(n.x,n.y,t.x,t.y,r.x,r.y,x.x,x.y)&&g(x.prev,x,x.next)>=0)return!1;x=x.next}return!0}function i(e,n,t,r){var x=e.prev,i=e,u=e.next;if(g(x,i,u)>=0)return!1;for(var v=x.xi.x?x.x>u.x?x.x:u.x:i.x>u.x?i.x:u.x,o=x.y>i.y?x.y>u.y?x.y:u.y:i.y>u.y?i.y:u.y,p=s(v,f,n,t,r),a=s(y,o,n,t,r),l=e.prevZ,h=e.nextZ;l&&l.z>=p&&h&&h.z<=a;){if(l!==e.prev&&l!==e.next&&Z(x.x,x.y,i.x,i.y,u.x,u.y,l.x,l.y)&&g(l.prev,l,l.next)>=0)return!1;if(l=l.prevZ,h!==e.prev&&h!==e.next&&Z(x.x,x.y,i.x,i.y,u.x,u.y,h.x,h.y)&&g(h.prev,h,h.next)>=0)return!1;h=h.nextZ}for(;l&&l.z>=p;){if(l!==e.prev&&l!==e.next&&Z(x.x,x.y,i.x,i.y,u.x,u.y,l.x,l.y)&&g(l.prev,l,l.next)>=0)return!1;l=l.prevZ}for(;h&&h.z<=a;){if(h!==e.prev&&h!==e.next&&Z(x.x,x.y,i.x,i.y,u.x,u.y,h.x,h.y)&&g(h.prev,h,h.next)>=0)return!1;h=h.nextZ}return!0}function u(e,n,r){var x=e;do{var i=x.prev,u=x.next.next;!w(i,u)&&M(i,x,x.next,u)&&k(i,u)&&k(u,i)&&(n.push(i.i/r),n.push(x.i/r),n.push(u.i/r),B(x),B(x.next),x=e=u),x=x.next}while(x!==e);return t(x)}function v(e,n,x,i,u,v){var f=e;do{for(var y=f.next.next;y!==f.prev;){if(f.i!==y.i&&d(f,y)){var o=q(f,y);return f=t(f,f.next),o=t(o,o.next),r(f,n,x,i,u,v),void r(o,n,x,i,u,v)}y=y.next}f=f.next}while(f!==e)}function f(e,r,x,i){var u,v,f,p=[];for(u=0,v=r.length;u=r.next.y&&r.next.y!==r.y){var v=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(v<=x&&v>u){if(u=v,v===x){if(i===r.y)return r;if(i===r.next.y)return r.next}t=r.x=r.x&&r.x>=o&&x!==r.x&&Z(it.x||r.x===t.x&&a(t,r)))&&(t=r,l=f)),r=r.next}while(r!==y);return t}function a(e,n){return g(e.prev,e,n.prev)<0&&g(n.next,e,e.next)<0}function l(e,n,t,r){var x=e;do{null===x.z&&(x.z=s(x.x,x.y,n,t,r)),x.prevZ=x.prev,x.nextZ=x.next,x=x.next}while(x!==e);x.prevZ.nextZ=null,x.prevZ=null,h(x)}function h(e){var n,t,r,x,i,u,v,f,y=1;do{for(t=e,e=null,i=null,u=0;t;){for(u++,r=t,v=0,n=0;n0||f>0&&r;)0!==v&&(0===f||!r||t.z<=r.z)?(x=t,t=t.nextZ,v--):(x=r,r=r.nextZ,f--),i?i.nextZ=x:e=x,x.prevZ=i,i=x;t=r}i.nextZ=null,y*=2}while(u>1);return e}function s(e,n,t,r,x){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-t)*x)|e<<8))|e<<4))|e<<2))|e<<1))|(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n=32767*(n-r)*x)|n<<8))|n<<4))|n<<2))|n<<1))<<1}function c(e){var n=e,t=e;do{(n.x=0&&(e-u)*(r-v)-(t-u)*(n-v)>=0&&(t-u)*(i-v)-(x-u)*(r-v)>=0}function d(e,n){return e.next.i!==n.i&&e.prev.i!==n.i&&!b(e,n)&&(k(e,n)&&k(n,e)&&j(e,n)&&(g(e.prev,e,n.prev)||g(e,n.prev,n))||w(e,n)&&g(e.prev,e,e.next)>0&&g(n.prev,n,n.next)>0)}function g(e,n,t){return(n.y-e.y)*(t.x-n.x)-(n.x-e.x)*(t.y-n.y)}function w(e,n){return e.x===n.x&&e.y===n.y}function M(e,n,t,r){var x=m(g(e,n,t)),i=m(g(e,n,r)),u=m(g(t,r,e)),v=m(g(t,r,n));return x!==i&&u!==v||(!(0!==x||!z(e,t,n))||(!(0!==i||!z(e,r,n))||(!(0!==u||!z(t,e,r))||!(0!==v||!z(t,n,r)))))}function z(e,n,t){return n.x<=Math.max(e.x,t.x)&&n.x>=Math.min(e.x,t.x)&&n.y<=Math.max(e.y,t.y)&&n.y>=Math.min(e.y,t.y)}function m(e){return e>0?1:e<0?-1:0}function b(e,n){var t=e;do{if(t.i!==e.i&&t.next.i!==e.i&&t.i!==n.i&&t.next.i!==n.i&&M(t,t.next,e,n))return!0;t=t.next}while(t!==e);return!1}function k(e,n){return g(e.prev,e,e.next)<0?g(e,n,e.next)>=0&&g(e,e.prev,n)>=0:g(e,n,e.prev)<0||g(e,e.next,n)<0}function j(e,n){var t=e,r=!1,x=(e.x+n.x)/2,i=(e.y+n.y)/2;do{t.y>i!=t.next.y>i&&t.next.y!==t.y&&x<(t.next.x-t.x)*(i-t.y)/(t.next.y-t.y)+t.x&&(r=!r),t=t.next}while(t!==e);return r}function q(e,n){var t=new C(e.i,e.x,e.y),r=new C(n.i,n.x,n.y),x=e.next,i=n.prev;return e.next=n,n.prev=e,t.next=x,x.prev=t,r.next=t,t.prev=r,i.next=r,r.prev=i,r}function A(e,n,t,r){var x=new C(e,n,t);return r?(x.next=r.next,x.prev=r,r.next.prev=x,r.next=x):(x.prev=x,x.next=x),x}function B(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function C(e,n,t){this.i=e,this.x=n,this.y=t,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function D(e,n,t,r){for(var x=0,i=n,u=t-r;i0&&(r+=e[x-1].length,t.holes.push(r))}return t}; },{}],"FIMm":[function(require,module,exports) { var global = arguments[3]; var define; var o,e=arguments[3];!function(n){var r="object"==typeof exports&&exports&&!exports.nodeType&&exports,t="object"==typeof module&&module&&!module.nodeType&&module,u="object"==typeof e&&e;u.global!==u&&u.window!==u&&u.self!==u||(n=u);var i,f,c=2147483647,l=36,s=1,p=26,a=38,d=700,h=72,v=128,g="-",w=/^xn--/,x=/[^\x20-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=l-s,b=Math.floor,j=String.fromCharCode;function A(o){throw RangeError(m[o])}function I(o,e){for(var n=o.length,r=[];n--;)r[n]=e(o[n]);return r}function E(o,e){var n=o.split("@"),r="";return n.length>1&&(r=n[0]+"@",o=n[1]),r+I((o=o.replace(y,".")).split("."),e).join(".")}function F(o){for(var e,n,r=[],t=0,u=o.length;t=55296&&e<=56319&&t65535&&(e+=j((o-=65536)>>>10&1023|55296),o=56320|1023&o),e+=j(o)}).join("")}function S(o,e){return o+22+75*(o<26)-((0!=e)<<5)}function T(o,e,n){var r=0;for(o=n?b(o/d):o>>1,o+=b(o/e);o>C*p>>1;r+=l)o=b(o/C);return b(r+(C+1)*o/(o+a))}function L(o){var e,n,r,t,u,i,f,a,d,w,x,y=[],m=o.length,C=0,j=v,I=h;for((n=o.lastIndexOf(g))<0&&(n=0),r=0;r=128&&A("not-basic"),y.push(o.charCodeAt(r));for(t=n>0?n+1:0;t=m&&A("invalid-input"),((a=(x=o.charCodeAt(t++))-48<10?x-22:x-65<26?x-65:x-97<26?x-97:l)>=l||a>b((c-C)/i))&&A("overflow"),C+=a*i,!(a<(d=f<=I?s:f>=I+p?p:f-I));f+=l)i>b(c/(w=l-d))&&A("overflow"),i*=w;I=T(C-u,e=y.length+1,0==u),b(C/e)>c-j&&A("overflow"),j+=b(C/e),C%=e,y.splice(C++,0,j)}return O(y)}function M(o){var e,n,r,t,u,i,f,a,d,w,x,y,m,C,I,E=[];for(y=(o=F(o)).length,e=v,n=0,u=h,i=0;i=e&&xb((c-n)/(m=r+1))&&A("overflow"),n+=(f-e)*m,e=f,i=0;ic&&A("overflow"),x==e){for(a=n,d=l;!(a<(w=d<=u?s:d>=u+p?p:d-u));d+=l)I=a-w,C=l-w,E.push(j(S(w+I%C,0))),a=b(I/C);E.push(j(S(a,0))),u=T(n,m,r==t),n=0,++r}++n,++e}return E.join("")}if(i={version:"1.3.2",ucs2:{decode:F,encode:O},decode:L,encode:M,toASCII:function(o){return E(o,function(o){return x.test(o)?"xn--"+M(o):o})},toUnicode:function(o){return E(o,function(o){return w.test(o)?L(o.slice(4).toLowerCase()):o})}},"function"==typeof o&&"object"==typeof o.amd&&o.amd)o("punycode",function(){return i});else if(r&&t)if(module.exports==r)t.exports=i;else for(f in i)i.hasOwnProperty(f)&&(r[f]=i[f]);else n.punycode=i}(this); },{}],"YsIc":[function(require,module,exports) { "use strict";module.exports={isString:function(n){return"string"==typeof n},isObject:function(n){return"object"==typeof n&&null!==n},isNull:function(n){return null===n},isNullOrUndefined:function(n){return null==n}}; },{}],"J6GP":[function(require,module,exports) { "use strict";function r(r,e){return Object.prototype.hasOwnProperty.call(r,e)}module.exports=function(t,n,o,a){n=n||"&",o=o||"=";var s={};if("string"!=typeof t||0===t.length)return s;var p=/\+/g;t=t.split(n);var u=1e3;a&&"number"==typeof a.maxKeys&&(u=a.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var i=0;i=0?(y=b.substr(0,d),l=b.substr(d+1)):(y=b,l=""),f=decodeURIComponent(y),v=decodeURIComponent(l),r(s,f)?e(s[f])?s[f].push(v):s[f]=[s[f],v]:s[f]=v}return s};var e=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)}; },{}],"bvhO":[function(require,module,exports) { "use strict";var n=function(n){switch(typeof n){case"string":return n;case"boolean":return n?"true":"false";case"number":return isFinite(n)?n:"";default:return""}};module.exports=function(o,u,c,a){return u=u||"&",c=c||"=",null===o&&(o=void 0),"object"==typeof o?r(t(o),function(t){var a=encodeURIComponent(n(t))+c;return e(o[t])?r(o[t],function(e){return a+encodeURIComponent(n(e))}).join(u):a+encodeURIComponent(n(o[t]))}).join(u):a?encodeURIComponent(n(a))+c+encodeURIComponent(n(o)):""};var e=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)};function r(n,e){if(n.map)return n.map(e);for(var r=[],t=0;t",'"',"`"," ","\r","\n","\t"],n=["{","}","|","\\","^","`"].concat(o),i=["'"].concat(n),l=["%","/","?",";","#"].concat(i),p=["/","?","#"],c=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=require("querystring");function b(t,e,a){if(t&&s.isObject(t)&&t instanceof h)return t;var r=new h;return r.parse(t,e,a),r}function q(t){return s.isString(t)&&(t=b(t)),t instanceof h?t.format():h.prototype.format.call(t)}function O(t,s){return b(t,!1,!0).resolve(s)}function d(t,s){return t?b(t,!1,!0).resolveObject(s):s}h.prototype.parse=function(h,a,o){if(!s.isString(h))throw new TypeError("Parameter 'url' must be a string, not "+typeof h);var n=h.indexOf("?"),b=-1!==n&&n127?z+="x":z+=$[H];if(!z.match(u)){var Z=R.slice(0,U),_=R.slice(U+1),E=$.match(f);E&&(Z.push(E[1]),_.unshift(E[2])),_.length&&(O="/"+_.join(".")+O),this.hostname=Z.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),N||(this.hostname=t.toASCII(this.hostname));var P=this.port?":"+this.port:"",T=this.hostname||"";this.host=T+P,this.href+=this.host,N&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==O[0]&&(O="/"+O))}if(!m[x])for(U=0,S=i.length;U0)&&a.host.split("@"))&&(a.auth=k.shift(),a.host=a.hostname=k.shift());return a.search=t.search,a.query=t.query,s.isNull(a.pathname)&&s.isNull(a.search)||(a.path=(a.pathname?a.pathname:"")+(a.search?a.search:"")),a.href=a.format(),a}if(!x.length)return a.pathname=null,a.search?a.path="/"+a.search:a.path=null,a.href=a.format(),a;for(var C=x.slice(-1)[0],I=(a.host||t.host||x.length>1)&&("."===C||".."===C)||""===C,w=0,U=x.length;U>=0;U--)"."===(C=x[U])?x.splice(U,1):".."===C?(x.splice(U,1),w++):w&&(x.splice(U,1),w--);if(!d&&!j)for(;w--;w)x.unshift("..");!d||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),I&&"/"!==x.join("/").substr(-1)&&x.push("");var k,N=""===x[0]||x[0]&&"/"===x[0].charAt(0);A&&(a.hostname=a.host=N?"":x.length?x.shift():"",(k=!!(a.host&&a.host.indexOf("@")>0)&&a.host.split("@"))&&(a.auth=k.shift(),a.host=a.hostname=k.shift()));return(d=d||a.host&&x.length)&&!N&&x.unshift(""),x.length?a.pathname=x.join("/"):(a.pathname=null,a.path=null),s.isNull(a.pathname)&&s.isNull(a.search)||(a.path=(a.pathname?a.pathname:"")+(a.search?a.search:"")),a.auth=t.auth||a.auth,a.slashes=a.slashes||t.slashes,a.href=a.format(),a},h.prototype.parseHost=function(){var t=this.host,s=a.exec(t);s&&(":"!==(s=s[0])&&(this.port=s.substr(1)),t=t.substr(0,t.length-s.length)),t&&(this.hostname=t)}; },{"punycode":"FIMm","./util":"YsIc","querystring":"fk5h"}],"LQBK":[function(require,module,exports) { "use strict";var E,_,T,A,R,N,S,O,P,I,L,M,D,U;Object.defineProperty(exports,"__esModule",{value:!0}),exports.WRAP_MODES=exports.TYPES=exports.TARGETS=exports.SCALE_MODES=exports.RENDERER_TYPE=exports.PRECISION=exports.MIPMAP_MODES=exports.MASK_TYPES=exports.GC_MODES=exports.FORMATS=exports.ENV=exports.DRAW_MODES=exports.BLEND_MODES=exports.ALPHA_MODES=void 0,exports.ENV=E,function(E){E[E.WEBGL_LEGACY=0]="WEBGL_LEGACY",E[E.WEBGL=1]="WEBGL",E[E.WEBGL2=2]="WEBGL2"}(E||(exports.ENV=E={})),exports.RENDERER_TYPE=_,function(E){E[E.UNKNOWN=0]="UNKNOWN",E[E.WEBGL=1]="WEBGL",E[E.CANVAS=2]="CANVAS"}(_||(exports.RENDERER_TYPE=_={})),exports.BLEND_MODES=T,function(E){E[E.NORMAL=0]="NORMAL",E[E.ADD=1]="ADD",E[E.MULTIPLY=2]="MULTIPLY",E[E.SCREEN=3]="SCREEN",E[E.OVERLAY=4]="OVERLAY",E[E.DARKEN=5]="DARKEN",E[E.LIGHTEN=6]="LIGHTEN",E[E.COLOR_DODGE=7]="COLOR_DODGE",E[E.COLOR_BURN=8]="COLOR_BURN",E[E.HARD_LIGHT=9]="HARD_LIGHT",E[E.SOFT_LIGHT=10]="SOFT_LIGHT",E[E.DIFFERENCE=11]="DIFFERENCE",E[E.EXCLUSION=12]="EXCLUSION",E[E.HUE=13]="HUE",E[E.SATURATION=14]="SATURATION",E[E.COLOR=15]="COLOR",E[E.LUMINOSITY=16]="LUMINOSITY",E[E.NORMAL_NPM=17]="NORMAL_NPM",E[E.ADD_NPM=18]="ADD_NPM",E[E.SCREEN_NPM=19]="SCREEN_NPM",E[E.NONE=20]="NONE",E[E.SRC_OVER=0]="SRC_OVER",E[E.SRC_IN=21]="SRC_IN",E[E.SRC_OUT=22]="SRC_OUT",E[E.SRC_ATOP=23]="SRC_ATOP",E[E.DST_OVER=24]="DST_OVER",E[E.DST_IN=25]="DST_IN",E[E.DST_OUT=26]="DST_OUT",E[E.DST_ATOP=27]="DST_ATOP",E[E.ERASE=26]="ERASE",E[E.SUBTRACT=28]="SUBTRACT",E[E.XOR=29]="XOR"}(T||(exports.BLEND_MODES=T={})),exports.DRAW_MODES=A,function(E){E[E.POINTS=0]="POINTS",E[E.LINES=1]="LINES",E[E.LINE_LOOP=2]="LINE_LOOP",E[E.LINE_STRIP=3]="LINE_STRIP",E[E.TRIANGLES=4]="TRIANGLES",E[E.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",E[E.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(A||(exports.DRAW_MODES=A={})),exports.FORMATS=R,function(E){E[E.RGBA=6408]="RGBA",E[E.RGB=6407]="RGB",E[E.ALPHA=6406]="ALPHA",E[E.LUMINANCE=6409]="LUMINANCE",E[E.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",E[E.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",E[E.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(R||(exports.FORMATS=R={})),exports.TARGETS=N,function(E){E[E.TEXTURE_2D=3553]="TEXTURE_2D",E[E.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",E[E.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",E[E.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",E[E.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",E[E.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",E[E.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",E[E.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",E[E.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(N||(exports.TARGETS=N={})),exports.TYPES=S,function(E){E[E.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",E[E.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",E[E.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",E[E.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",E[E.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",E[E.FLOAT=5126]="FLOAT",E[E.HALF_FLOAT=36193]="HALF_FLOAT"}(S||(exports.TYPES=S={})),exports.SCALE_MODES=O,function(E){E[E.NEAREST=0]="NEAREST",E[E.LINEAR=1]="LINEAR"}(O||(exports.SCALE_MODES=O={})),exports.WRAP_MODES=P,function(E){E[E.CLAMP=33071]="CLAMP",E[E.REPEAT=10497]="REPEAT",E[E.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(P||(exports.WRAP_MODES=P={})),exports.MIPMAP_MODES=I,function(E){E[E.OFF=0]="OFF",E[E.POW2=1]="POW2",E[E.ON=2]="ON"}(I||(exports.MIPMAP_MODES=I={})),exports.ALPHA_MODES=L,function(E){E[E.NPM=0]="NPM",E[E.UNPACK=1]="UNPACK",E[E.PMA=2]="PMA",E[E.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",E[E.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",E[E.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA"}(L||(exports.ALPHA_MODES=L={})),exports.GC_MODES=M,function(E){E[E.AUTO=0]="AUTO",E[E.MANUAL=1]="MANUAL"}(M||(exports.GC_MODES=M={})),exports.PRECISION=D,function(E){E.LOW="lowp",E.MEDIUM="mediump",E.HIGH="highp"}(D||(exports.PRECISION=D={})),exports.MASK_TYPES=U,function(E){E[E.NONE=0]="NONE",E[E.SCISSOR=1]="SCISSOR",E[E.STENCIL=2]="STENCIL",E[E.SPRITE=3]="SPRITE"}(U||(exports.MASK_TYPES=U={})); },{}],"G5Tu":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.clearTextureCache=T,exports.correctBlendMode=E,exports.createIndicesForQuads=D,exports.decomposeDataUri=J,exports.deprecation=G,exports.destroyTextureCache=S,exports.determineCrossOrigin=U,exports.getResolutionOfUrl=W,exports.hex2rgb=f,exports.hex2string=d,exports.isPow2=A,exports.isWebGLSupported=p,exports.log2=y,exports.nextPow2=N,exports.premultiplyRgba=w,exports.premultiplyTint=b,exports.premultiplyTintToRgba=m,exports.removeItems=_,exports.rgb2hex=x,exports.sayHello=l,exports.sign=M,exports.skipHello=u,exports.string2hex=g,exports.trimCanvas=B,exports.uid=O,Object.defineProperty(exports,"isMobile",{enumerable:!0,get:function(){return e.isMobile}}),Object.defineProperty(exports,"EventEmitter",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"earcut",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"url",{enumerable:!0,get:function(){return n.default}}),exports.premultiplyBlendMode=exports.TextureCache=exports.ProgramCache=exports.DATA_URI=exports.CanvasRenderTarget=exports.BaseTextureCache=void 0;var e=require("@pixi/settings"),t=i(require("eventemitter3")),r=i(require("earcut")),n=i(require("url")),o=require("@pixi/constants");function i(e){return e&&e.__esModule?e:{default:e}}e.settings.RETINA_PREFIX=/@([0-9\.]+)x/,e.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var a,s=!1,c="5.2.0";function u(){s=!0}function l(e){if(!s){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var t=["\n %c %c %c PixiJS "+c+" - ✰ "+e+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log.apply(console,t)}else window.console&&window.console.log("PixiJS "+c+" - "+e+" - http://www.pixijs.com/");s=!0}}function p(){return void 0===a&&(a=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:e.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!window.WebGLRenderingContext)return!1;var r=document.createElement("canvas"),n=r.getContext("webgl",t)||r.getContext("experimental-webgl",t),o=!(!n||!n.getContextAttributes().stencil);if(n){var i=n.getExtension("WEBGL_lose_context");i&&i.loseContext()}return n=null,o}catch(a){return!1}}()),a}function f(e,t){return(t=t||[])[0]=(e>>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(255&e)/255,t}function d(e){return e=e.toString(16),"#"+(e="000000".substr(0,6-e.length)+e)}function g(e){return"string"==typeof e&&"#"===e[0]&&(e=e.substr(1)),parseInt(e,16)}function x(e){return(255*e[0]<<16)+(255*e[1]<<8)+(255*e[2]|0)}function h(){for(var e=[],t=[],r=0;r<32;r++)e[r]=r,t[r]=r;e[o.BLEND_MODES.NORMAL_NPM]=o.BLEND_MODES.NORMAL,e[o.BLEND_MODES.ADD_NPM]=o.BLEND_MODES.ADD,e[o.BLEND_MODES.SCREEN_NPM]=o.BLEND_MODES.SCREEN,t[o.BLEND_MODES.NORMAL]=o.BLEND_MODES.NORMAL_NPM,t[o.BLEND_MODES.ADD]=o.BLEND_MODES.ADD_NPM,t[o.BLEND_MODES.SCREEN]=o.BLEND_MODES.SCREEN_NPM;var n=[];return n.push(t),n.push(e),n}var v=h();function E(e,t){return v[t?1:0][e]}function w(e,t,r,n){return r=r||new Float32Array(4),n||void 0===n?(r[0]=e[0]*t,r[1]=e[1]*t,r[2]=e[2]*t):(r[0]=e[0],r[1]=e[1],r[2]=e[2]),r[3]=t,r}function b(e,t){if(1===t)return(255*t<<24)+e;if(0===t)return 0;var r=e>>16&255,n=e>>8&255,o=255&e;return(255*t<<24)+((r=r*t+.5|0)<<16)+((n=n*t+.5|0)<<8)+(o=o*t+.5|0)}function m(e,t,r,n){return(r=r||new Float32Array(4))[0]=(e>>16&255)/255,r[1]=(e>>8&255)/255,r[2]=(255&e)/255,(n||void 0===n)&&(r[0]*=t,r[1]*=t,r[2]*=t),r[3]=t,r}function D(e,t){void 0===t&&(t=null);var r=6*e;if((t=t||new Uint16Array(r)).length!==r)throw new Error("Out buffer length is incorrect, got "+t.length+" and expected "+r);for(var n=0,o=0;n=o||0===r)){var i=o-(r=t+r>o?o-t:r);for(n=t;n>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1}function A(e){return!(e&e-1||!e)}function y(e){var t=(e>65535)<<4,r=((e>>>=t)>255)<<3;return t|=r,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1}var R={};exports.ProgramCache=R;var L=Object.create(null);exports.TextureCache=L;var P=Object.create(null);function S(){var e;for(e in L)L[e].destroy();for(e in P)P[e].destroy()}function T(){var e;for(e in L)delete L[e];for(e in P)delete P[e]}function B(e){var t,r,n,o=e.width,i=e.height,a=e.getContext("2d"),s=a.getImageData(0,0,o,i).data,c=s.length,u={top:null,left:null,right:null,bottom:null},l=null;for(t=0;t=0?f.S:f.N:2*Math.abs(i)<=Math.abs(t)?t>0?f.E:f.W:i>0?t>0?f.SE:f.SW:t>0?f.NE:f.NW},matrixAppendRotationInv:function(t,i,s,h){void 0===s&&(s=0),void 0===h&&(h=0);var o=y[f.inv(i)];o.tx=s,o.ty=h,t.append(o)}};exports.groupD8=f;var l=function(){function t(){this.worldTransform=new e,this.localTransform=new e,this.position=new i(this.onChange,this,0,0),this.scale=new i(this.onChange,this,1,1),this.pivot=new i(this.onChange,this,0,0),this.skew=new i(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return t.prototype.onChange=function(){this._localID++},t.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},t.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},t.prototype.updateTransform=function(t){var i=this.localTransform;if(this._localID!==this._currentLocalID&&(i.a=this._cx*this.scale.x,i.b=this._sx*this.scale.x,i.c=this._cy*this.scale.y,i.d=this._sy*this.scale.y,i.tx=this.position.x-(this.pivot.x*i.a+this.pivot.y*i.c),i.ty=this.position.y-(this.pivot.x*i.b+this.pivot.y*i.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var s=t.worldTransform,h=this.worldTransform;h.a=i.a*s.a+i.b*s.c,h.b=i.a*s.b+i.b*s.d,h.c=i.c*s.a+i.d*s.c,h.d=i.c*s.b+i.d*s.d,h.tx=i.tx*s.a+i.ty*s.c+s.tx,h.ty=i.tx*s.b+i.ty*s.d+s.ty,this._parentID=t._worldID,this._worldID++}},t.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())},enumerable:!0,configurable:!0}),t.IDENTITY=new t,t}();exports.Transform=l;var v=function(){function t(t,i,s,h){void 0===t&&(t=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===h&&(h=0),this.x=Number(t),this.y=Number(i),this.width=Number(s),this.height=Number(h),this.type=o.RECT}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(t,"EMPTY",{get:function(){return new t(0,0,0,0)},enumerable:!0,configurable:!0}),t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},t.prototype.copyTo=function(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t},t.prototype.contains=function(t,i){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t=this.y&&ii!=c>i&&t<(i-n)/(c-n)*(a-e)+e&&(s=!s)}return s},i}();exports.Polygon=w;var g=function(){function t(t,i,s,h,r){void 0===t&&(t=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===h&&(h=0),void 0===r&&(r=20),this.x=t,this.y=i,this.width=s,this.height=h,this.radius=r,this.type=o.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,i){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&i>=this.y&&i<=this.y+this.height){if(i>=this.y+this.radius&&i<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var s=t-(this.x+this.radius),h=i-(this.y+this.radius),o=this.radius*this.radius;if(s*s+h*h<=o)return!0;if((s=t-(this.x+this.width-this.radius))*s+h*h<=o)return!0;if(s*s+(h=i-(this.y+this.height-this.radius))*h<=o)return!0;if((s=t-(this.x+this.radius))*s+h*h<=o)return!0}return!1},t}();exports.RoundedRectangle=g; },{}],"nL3p":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DisplayObject=exports.Container=exports.Bounds=void 0;var t=require("@pixi/settings"),i=require("@pixi/math"),e=require("@pixi/utils");t.settings.SORTABLE_CHILDREN=!1;var s=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null};exports.Bounds=s,s.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},s.prototype.clear=function(){this.updateID++,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},s.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?i.Rectangle.EMPTY:((t=t||new i.Rectangle(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},s.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},s.prototype.addQuad=function(t){var i=this.minX,e=this.minY,s=this.maxX,n=this.maxY,r=t[0],o=t[1];i=rs?r:s,n=o>n?o:n,i=(r=t[2])s?r:s,n=o>n?o:n,i=(r=t[4])s?r:s,n=o>n?o:n,i=(r=t[6])s?r:s,n=o>n?o:n,this.minX=i,this.minY=e,this.maxX=s,this.maxY=n},s.prototype.addFrame=function(t,i,e,s,n){this.addFrameMatrix(t.worldTransform,i,e,s,n)},s.prototype.addFrameMatrix=function(t,i,e,s,n){var r=t.a,o=t.b,h=t.c,a=t.d,l=t.tx,d=t.ty,m=this.minX,p=this.minY,u=this.maxX,c=this.maxY,f=r*i+h*e+l,x=o*i+a*e+d;m=fu?f:u,c=x>c?x:c,m=(f=r*s+h*e+l)u?f:u,c=x>c?x:c,m=(f=r*i+h*n+l)u?f:u,c=x>c?x:c,m=(f=r*s+h*n+l)u?f:u,c=x>c?x:c,this.minX=m,this.minY=p,this.maxX=u,this.maxY=c},s.prototype.addVertexData=function(t,i,e){for(var s=this.minX,n=this.minY,r=this.maxX,o=this.maxY,h=i;hr?a:r,o=l>o?l:o}this.minX=s,this.minY=n,this.maxX=r,this.maxY=o},s.prototype.addVertices=function(t,i,e,s){this.addVerticesMatrix(t.worldTransform,i,e,s)},s.prototype.addVerticesMatrix=function(t,i,e,s,n,r){var o=t.a,h=t.b,a=t.c,l=t.d,d=t.tx,m=t.ty;n=n||0,r=r||0;for(var p=this.minX,u=this.minY,c=this.maxX,f=this.maxY,x=e;xs?t.maxX:s,this.maxY=t.maxY>n?t.maxY:n},s.prototype.addBoundsMask=function(t,i){var e=t.minX>i.minX?t.minX:i.minX,s=t.minY>i.minY?t.minY:i.minY,n=t.maxXa?n:a,this.maxY=r>l?r:l}},s.prototype.addBoundsMatrix=function(t,i){this.addFrameMatrix(i,t.minX,t.minY,t.maxX,t.maxY)},s.prototype.addBoundsArea=function(t,i){var e=t.minX>i.x?t.minX:i.x,s=t.minY>i.y?t.minY:i.y,n=t.maxXa?n:a,this.maxY=r>l?r:l}},s.prototype.pad=function(t,i){t=t||0,i=i||(0!==i?t:0),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=i,this.maxY+=i)},s.prototype.addFramePad=function(t,i,e,s,n,r){t-=n,i-=r,e+=n,s+=r,this.minX=this.minXe?this.maxX:e,this.minY=this.minYs?this.maxY:s};var n=function(t){function e(){t.call(this),this.tempDisplayObjectParent=null,this.transform=new i.Transform,this.alpha=1,this.visible=!0,this.renderable=!0,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new s,this._boundsID=0,this._lastBoundsID=-1,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={_tempDisplayObjectParent:{configurable:!0},x:{configurable:!0},y:{configurable:!0},worldTransform:{configurable:!0},localTransform:{configurable:!0},position:{configurable:!0},scale:{configurable:!0},pivot:{configurable:!0},skew:{configurable:!0},rotation:{configurable:!0},angle:{configurable:!0},zIndex:{configurable:!0},worldVisible:{configurable:!0},mask:{configurable:!0}};return e.mixin=function(t){for(var i=Object.keys(t),s=0;s1)for(var s=0;sthis.children.length)throw new Error(t+"addChildAt: The index "+i+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(i,0,t),this._boundsID++,this.onChildrenChange(i),t.emit("added",this),this.emit("childAdded",t,this,i),t},s.prototype.swapChildren=function(t,i){if(t!==i){var e=this.getChildIndex(t),s=this.getChildIndex(i);this.children[e]=i,this.children[s]=t,this.onChildrenChange(e=this.children.length)throw new Error("The index "+i+" supplied is out of bounds "+this.children.length);var s=this.getChildIndex(t);(0,e.removeItems)(this.children,s,1),this.children.splice(i,0,t),this.onChildrenChange(i)},s.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},s.prototype.removeChild=function(t){var i=arguments,s=arguments.length;if(s>1)for(var n=0;n0&&r<=n){e=this.children.splice(s,r);for(var o=0;o1&&this.children.sort(r),this.sortDirty=!1},s.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,i=this.children.length;t title : "+e.title+"
tabIndex: "+e.tabIndex},p.prototype.capHitArea=function(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0),e.x+e.width>this.renderer.width&&(e.width=this.renderer.width-e.x),e.y+e.height>this.renderer.height&&(e.height=this.renderer.height-e.y)},p.prototype.addChild=function(e){var t=this.pool.pop();t||((t=document.createElement("button")).style.width=n+"px",t.style.height=n+"px",t.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",t.style.position="absolute",t.style.zIndex=l,t.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?t.setAttribute("aria-live","off"):t.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute("aria-relevant","additions"):t.setAttribute("aria-relevant","text"),t.addEventListener("click",this._onClick.bind(this)),t.addEventListener("focus",this._onFocus.bind(this)),t.addEventListener("focusout",this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&null!==e.accessibleTitle?t.title=e.accessibleTitle:e.accessibleHint&&null!==e.accessibleHint||(t.title="displayObject "+e.tabIndex),e.accessibleHint&&null!==e.accessibleHint&&t.setAttribute("aria-label",e.accessibleHint),this.debug&&this.updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex},p.prototype._onClick=function(e){var t=this.renderer.plugins.interaction;t.dispatchEvent(e.target.displayObject,"click",t.eventData),t.dispatchEvent(e.target.displayObject,"pointertap",t.eventData),t.dispatchEvent(e.target.displayObject,"tap",t.eventData)},p.prototype._onFocus=function(e){e.target.getAttribute("aria-live","off")||e.target.setAttribute("aria-live","assertive");var t=this.renderer.plugins.interaction;t.dispatchEvent(e.target.displayObject,"mouseover",t.eventData)},p.prototype._onFocusOut=function(e){e.target.getAttribute("aria-live","off")||e.target.setAttribute("aria-live","polite");var t=this.renderer.plugins.interaction;t.dispatchEvent(e.target.displayObject,"mouseout",t.eventData)},p.prototype._onKeyDown=function(e){e.keyCode===s&&this.activate()},p.prototype._onMouseMove=function(e){0===e.movementX&&0===e.movementY||this.deactivate()},p.prototype.destroy=function(){this.destroyTouchHook(),this.div=null;for(var e=0;e8)throw new Error("max arguments reached");var h=this.name,a=this.items;this._aliasCount++;for(var m=0,p=a.length;m0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},t.prototype.add=function(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this},t.prototype.remove=function(t){var e=this.items.indexOf(t);return-1!==e&&(this.ensureNonAliasedItems(),this.items.splice(e,1)),this},t.prototype.contains=function(t){return-1!==this.items.indexOf(t)},t.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},t.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(t.prototype,"empty",{get:function(){return 0===this.items.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),t}();exports.Runner=t,Object.defineProperties(t.prototype,{dispatch:{value:t.prototype.emit},run:{value:t.prototype.emit}}); },{}],"F3Q6":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UPDATE_PRIORITY=exports.TickerPlugin=exports.Ticker=void 0;var t,e=require("@pixi/settings");e.settings.TARGET_FPMS=.06,exports.UPDATE_PRIORITY=t,function(t){t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY"}(t||(exports.UPDATE_PRIORITY=t={}));var i=function(){function t(t,e,i,s){void 0===e&&(e=null),void 0===i&&(i=0),void 0===s&&(s=!1),this.fn=t,this.context=e,this.priority=i,this.once=s,this.next=null,this.previous=null,this._destroyed=!1}return t.prototype.match=function(t,e){return void 0===e&&(e=null),this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(t){void 0===t&&(t=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.next;return this.next=t?null:e,this.previous=null,e},t}(),s=function(){function s(){var t=this;this._head=new i(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this.autoStart=!1,this.deltaTime=1,this.deltaMS=1/e.settings.TARGET_FPMS,this.elapsedMS=1/e.settings.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._protected=!1,this._lastFrame=-1,this._tick=function(e){t._requestId=null,t.started&&(t.update(e),t.started&&null===t._requestId&&t._head.next&&(t._requestId=requestAnimationFrame(t._tick)))}}return s.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},s.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},s.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},s.prototype.add=function(e,s,n){return void 0===n&&(n=t.NORMAL),this._addListener(new i(e,s,n))},s.prototype.addOnce=function(e,s,n){return void 0===n&&(n=t.NORMAL),this._addListener(new i(e,s,n,!0))},s.prototype._addListener=function(t){var e=this._head.next,i=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(i);break}i=e,e=e.next}t.previous||t.connect(i)}else t.connect(i);return this._startIfPossible(),this},s.prototype.remove=function(t,e){for(var i=this._head.next;i;)i=i.match(t,e)?i.destroy():i.next;return this._head.next||this._cancelIfNeeded(),this},s.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},s.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},s.prototype.destroy=function(){if(!this._protected){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}},s.prototype.update=function(t){var i;if(void 0===t&&(t=performance.now()),t>this.lastTime){if((i=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(i=this._maxElapsedMS),i*=this.speed,this._minElapsedMS){var s=t-this._lastFrame|0;if(s=0;--n){var o=c[n];if(o.test&&o.test(t,r))return new o(t,e)}return new l(t,e)}var p=function(t){function e(e,r){var i=r||{},n=i.width,o=i.height;if(!n||!o)throw new Error("BufferResource width or height invalid");t.call(this,n,o),this.data=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.upload=function(t,e,i){var n=t.gl;return n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===r.ALPHA_MODES.UNPACK),i.width===e.width&&i.height===e.height?n.texSubImage2D(e.target,0,0,0,e.width,e.height,e.format,e.type,this.data):(i.width=e.width,i.height=e.height,n.texImage2D(e.target,0,i.internalFormat,e.width,e.height,0,e.format,i.type,this.data)),!0},e.prototype.dispose=function(){this.data=null},e.test=function(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array},e}(a),f={scaleMode:r.SCALE_MODES.NEAREST,format:r.FORMATS.RGBA,alphaMode:r.ALPHA_MODES.NPM},v=function(t){function n(n,o){void 0===n&&(n=null),void 0===o&&(o=null),t.call(this);var s=(o=o||{}).alphaMode,h=o.mipmap,u=o.anisotropicLevel,l=o.scaleMode,c=o.width,p=o.height,f=o.wrapMode,v=o.format,_=o.type,g=o.target,y=o.resolution,m=o.resourceOptions;!n||n instanceof a||((n=d(n,m)).internal=!0),this.width=c||0,this.height=p||0,this.resolution=y||i.settings.RESOLUTION,this.mipmap=void 0!==h?h:i.settings.MIPMAP_TEXTURES,this.anisotropicLevel=void 0!==u?u:i.settings.ANISOTROPIC_LEVEL,this.wrapMode=f||i.settings.WRAP_MODE,this.scaleMode=void 0!==l?l:i.settings.SCALE_MODE,this.format=v||r.FORMATS.RGBA,this.type=_||r.TYPES.UNSIGNED_BYTE,this.target=g||r.TARGETS.TEXTURE_2D,this.alphaMode=void 0!==s?s:r.ALPHA_MODES.UNPACK,void 0!==o.premultiplyAlpha&&(this.premultiplyAlpha=o.premultiplyAlpha),this.uid=(0,e.uid)(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=c>0&&p>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.setResource(n)}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var o={realWidth:{configurable:!0},realHeight:{configurable:!0}};return o.realWidth.get=function(){return Math.ceil(this.width*this.resolution-1e-4)},o.realHeight.get=function(){return Math.ceil(this.height*this.resolution-1e-4)},n.prototype.setStyle=function(t,e){var r;return void 0!==t&&t!==this.scaleMode&&(this.scaleMode=t,r=!0),void 0!==e&&e!==this.mipmap&&(this.mipmap=e,r=!0),r&&this.dirtyStyleId++,this},n.prototype.setSize=function(t,e,r){return this.resolution=r||this.resolution,this.width=t,this.height=e,this._refreshPOT(),this.update(),this},n.prototype.setRealSize=function(t,e,r){return this.resolution=r||this.resolution,this.width=t/this.resolution,this.height=e/this.resolution,this._refreshPOT(),this.update(),this},n.prototype._refreshPOT=function(){this.isPowerOfTwo=(0,e.isPow2)(this.realWidth)&&(0,e.isPow2)(this.realHeight)},n.prototype.setResolution=function(t){var e=this.resolution;return e===t?this:(this.resolution=t,this.valid&&(this.width=this.width*e/t,this.height=this.height*e/t,this.emit("update",this)),this._refreshPOT(),this)},n.prototype.setResource=function(t){if(this.resource===t)return this;if(this.resource)throw new Error("Resource can be set only once");return t.bind(this),this.resource=t,this},n.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},n.prototype.onError=function(t){this.emit("error",this,t)},n.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete e.BaseTextureCache[this.cacheId],delete e.TextureCache[this.cacheId],this.cacheId=null),this.dispose(),n.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},n.prototype.dispose=function(){this.emit("dispose",this)},n.from=function(t,r,o){void 0===o&&(o=i.settings.STRICT_TEXTURE_CACHE);var s="string"==typeof t,a=null;s?a=t:(t._pixiId||(t._pixiId="pixiid_"+(0,e.uid)()),a=t._pixiId);var h=e.BaseTextureCache[a];if(s&&o&&!h)throw new Error('The cacheId "'+a+'" does not exist in BaseTextureCache.');return h||((h=new n(t,r)).cacheId=a,n.addToCache(h,a)),h},n.fromBuffer=function(t,e,i,o){t=t||new Float32Array(e*i*4);var s=new p(t,{width:e,height:i}),a=t instanceof Float32Array?r.TYPES.FLOAT:r.TYPES.UNSIGNED_BYTE;return new n(s,Object.assign(f,o||{width:e,height:i,type:a}))},n.addToCache=function(t,r){r&&(-1===t.textureCacheIds.indexOf(r)&&t.textureCacheIds.push(r),e.BaseTextureCache[r]&&console.warn("BaseTexture added to the cache with an id ["+r+"] that already had an entry"),e.BaseTextureCache[r]=t)},n.removeFromCache=function(t){if("string"==typeof t){var r=e.BaseTextureCache[t];if(r){var i=r.textureCacheIds.indexOf(t);return i>-1&&r.textureCacheIds.splice(i,1),delete e.BaseTextureCache[t],r}}else if(t&&t.textureCacheIds){for(var n=0;n]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;var x=function(t){function e(e,r){if(r=r||{},!(e instanceof HTMLVideoElement)){var i=document.createElement("video");i.setAttribute("preload","auto"),i.setAttribute("webkit-playsinline",""),i.setAttribute("playsinline",""),"string"==typeof e&&(e=[e]),t.crossOrigin(i,e[0].src||e[0],r.crossorigin);for(var n=0;n0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function(){return 3===this.source.readyState||4===this.source.readyState},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),!this._isAutoUpdating&&this.autoUpdate&&(n.Ticker.shared.add(this.update,this),this._isAutoUpdating=!0)},e.prototype._onPlayStop=function(){this._isAutoUpdating&&(n.Ticker.shared.remove(this.update,this),this._isAutoUpdating=!1)},e.prototype._onCanPlay=function(){var t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);var e=this.valid;this.resize(t.videoWidth,t.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()},e.prototype.dispose=function(){this._isAutoUpdating&&n.Ticker.shared.remove(this.update,this),this.source&&(this.source.removeEventListener("error",this._onError,!0),this.source.pause(),this.source.src="",this.source.load()),t.prototype.dispose.call(this)},r.autoUpdate.get=function(){return this._autoUpdate},r.autoUpdate.set=function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isAutoUpdating?(n.Ticker.shared.remove(this.update,this),this._isAutoUpdating=!1):this._autoUpdate&&!this._isAutoUpdating&&(n.Ticker.shared.add(this.update,this),this._isAutoUpdating=!0))},r.updateFPS.get=function(){return this._updateFPS},r.updateFPS.set=function(t){t!==this._updateFPS&&(this._updateFPS=t)},e.test=function(t,r){return t instanceof HTMLVideoElement||e.TYPES.indexOf(r)>-1},Object.defineProperties(e.prototype,r),e}(u);x.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"];var E=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.test=function(t){return!!window.createImageBitmap&&t instanceof ImageBitmap},e}(u);c.push(l,E,g,x,m,p,y,_);var T={INSTALLED:c,autoDetectResource:d,ArrayResource:_,BufferResource:p,CanvasResource:g,CubeResource:y,ImageResource:l,ImageBitmapResource:E,SVGResource:m,VideoResource:x,Resource:a,BaseImageResource:u};exports.resources=T;var b=function(t){this.renderer=t};exports.System=b,b.prototype.destroy=function(){this.renderer=null};var S=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.upload=function(t,e,i){var n=t.gl;return n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===r.ALPHA_MODES.UNPACK),i.width===e.width&&i.height===e.height?n.texSubImage2D(e.target,0,0,0,e.width,e.height,e.format,e.type,this.data):(i.width=e.width,i.height=e.height,n.texImage2D(e.target,0,n.DEPTH_COMPONENT16,e.width,e.height,0,e.format,e.type,this.data)),!0},e}(p),w=function(e,r){this.width=Math.ceil(e||100),this.height=Math.ceil(r||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new t.Runner("disposeFramebuffer",2)};exports.Framebuffer=w;var A={colorTexture:{configurable:!0}};A.colorTexture.get=function(){return this.colorTextures[0]},w.prototype.addColorTexture=function(t,e){return void 0===t&&(t=0),this.colorTextures[t]=e||new v(null,{scaleMode:0,resolution:1,mipmap:!1,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},w.prototype.addDepthTexture=function(t){return this.depthTexture=t||new v(new S(null,{width:this.width,height:this.height}),{scaleMode:0,resolution:1,width:this.width,height:this.height,mipmap:!1,format:r.FORMATS.DEPTH_COMPONENT,type:r.TYPES.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},w.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},w.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},w.prototype.resize=function(t,e){if(t=Math.ceil(t),e=Math.ceil(e),t!==this.width||e!==this.height){this.width=t,this.height=e,this.dirtyId++,this.dirtySize++;for(var r=0;r-1&&r.textureCacheIds.splice(i,1),delete e.TextureCache[t],r}}else if(t&&t.textureCacheIds){for(var n=0;nthis.baseTexture.width,s=r+n>this.baseTexture.height;if(o||s){var a=o&&s?"and":"or",h="X: "+e+" + "+i+" = "+(e+i)+" > "+this.baseTexture.width,u="Y: "+r+" + "+n+" = "+(r+n)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+h+" "+a+" "+u)}this.valid=i&&n&&this.baseTexture.valid,this.trim||this.rotate||(this.orig=t),this.valid&&this.updateUvs()},n.rotate.get=function(){return this._rotate},n.rotate.set=function(t){this._rotate=t,this.valid&&this.updateUvs()},n.width.get=function(){return this.orig.width},n.height.get=function(){return this.orig.height},Object.defineProperties(r.prototype,n),r}(e.EventEmitter);function P(){var t=document.createElement("canvas");t.width=16,t.height=16;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,16,16),new O(new v(new g(t)))}function M(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}exports.Texture=O,O.EMPTY=new O(new v),M(O.EMPTY),M(O.EMPTY.baseTexture),O.WHITE=P(),M(O.WHITE),M(O.WHITE.baseTexture);var D=function(t){function e(e,r){var i=null;if(!(e instanceof C)){var n=arguments[1],o=arguments[2],s=arguments[3],a=arguments[4];console.warn("Please use RenderTexture.create("+n+", "+o+") instead of the ctor directly."),i=arguments[0],r=null,e=new C({width:n,height:o,scaleMode:s,resolution:a})}t.call(this,e,r),this.legacyRenderer=i,this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.resize=function(t,e,r){void 0===r&&(r=!0),t=Math.ceil(t),e=Math.ceil(e),this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,r&&this.baseTexture.resize(t,e),this.updateUvs()},e.prototype.setResolution=function(t){var e=this.baseTexture;e.resolution!==t&&(e.setResolution(t),this.resize(e.width,e.height,!1))},e.create=function(t){return"number"==typeof t&&(t={width:t,height:arguments[1],scaleMode:arguments[2],resolution:arguments[3]}),new e(new C(t))},e}(O);exports.RenderTexture=D;var F=function(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0};exports.RenderTexturePool=F,F.prototype.createTexture=function(t,e){var r=new C(Object.assign({width:t,height:e,resolution:1},this.textureOptions));return new D(r)},F.prototype.getOptimalTexture=function(t,r,i){void 0===i&&(i=1);var n=F.SCREEN_KEY;t*=i,r*=i,this.enableFullScreen&&t===this._pixelsWidth&&r===this._pixelsHeight||(n=(65535&(t=(0,e.nextPow2)(t)))<<16|65535&(r=(0,e.nextPow2)(r))),this.texturePool[n]||(this.texturePool[n]=[]);var o=this.texturePool[n].pop();return o||(o=this.createTexture(t,r)),o.filterPoolKey=n,o.setResolution(i),o},F.prototype.getFilterTexture=function(t,e){var r=this.getOptimalTexture(t.width,t.height,e||t.resolution);return r.filterFrame=t.filterFrame,r},F.prototype.returnTexture=function(t){var e=t.filterPoolKey;t.filterFrame=null,this.texturePool[e].push(t)},F.prototype.returnFilterTexture=function(t){this.returnTexture(t)},F.prototype.clear=function(t){if(t=!1!==t)for(var e in this.texturePool){var r=this.texturePool[e];if(r)for(var i=0;i0&&t.height>0,r)for(var i=0;i1){for(var u=0;u=0;--i)t[i]=r[i]||null,t[i]&&(t[i]._batchLocation=i)},e.prototype.boundArray=function(t,e,r,i){for(var n=t.elements,o=t.ids,s=t.count,a=0,h=0;h=0&&l=r.ENV.WEBGL2&&(n=t.getContext("webgl2",e)),n)this.webGLVersion=2;else if(this.webGLVersion=1,!(n=t.getContext("webgl",e)||t.getContext("experimental-webgl",e)))throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),n},e.prototype.getExtensions=function(){var t=this.gl;1===this.webGLVersion?Object.assign(this.extensions,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBKIT_WEBGL_depth_texture"),loseContext:t.getExtension("WEBGL_lose_context"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,{anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),colorBufferFloat:t.getExtension("EXT_color_buffer_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear")})},e.prototype.handleContextLost=function(t){t.preventDefault()},e.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.run(this.gl)},e.prototype.destroy=function(){var t=this.renderer.view;t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},e.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},e.prototype.validateContext=function(t){t.getContextAttributes().stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")},Object.defineProperties(e.prototype,n),e}(b),et=function(t){function e(e){t.call(this,e),this.managedFramebuffers=[],this.unknownFramebuffer=new w(10,10)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={size:{configurable:!0}};return e.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new o.Rectangle,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),1===this.renderer.context.webGLVersion){var e=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;i.settings.PREFER_ENV===r.ENV.WEBGL_LEGACY&&(e=null,n=null),e?t.drawBuffers=function(t){return e.drawBuffersWEBGL(t)}:(this.hasMRT=!1,t.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}},e.prototype.bind=function(t,e){var r=this.gl;if(t){var i=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,r.bindFramebuffer(r.FRAMEBUFFER,i.framebuffer)),i.dirtyId!==t.dirtyId&&(i.dirtyId=t.dirtyId,i.dirtyFormat!==t.dirtyFormat?(i.dirtyFormat=t.dirtyFormat,this.updateFramebuffer(t)):i.dirtySize!==t.dirtySize&&(i.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(var n=0;n1&&e.drawBuffers(n),t.depthTexture)&&this.writeDepthTexture){var a=t.depthTexture;this.renderer.texture.bind(a,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,a._glTextures[this.CONTEXT_UID].texture,0)}r.stencil||!t.stencil&&!t.depth||(r.stencil=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,r.stencil),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.width,t.height),t.depthTexture||e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,r.stencil))},e.prototype.disposeFramebuffer=function(t,e){var r=t.glFramebuffers[this.CONTEXT_UID],i=this.gl;if(r){delete t.glFramebuffers[this.CONTEXT_UID];var n=this.managedFramebuffers.indexOf(t);n>=0&&this.managedFramebuffers.splice(n,1),t.disposeRunner.remove(this),e||(i.deleteFramebuffer(r.framebuffer),r.stencil&&i.deleteRenderbuffer(r.stencil))}},e.prototype.disposeAll=function(t){var e=this.managedFramebuffers;this.managedFramebuffers=[];for(var r=0;r=i.data.byteLength)e.bufferSubData(o,0,i.data);else{var s=i.static?e.STATIC_DRAW:e.DYNAMIC_DRAW;n.byteLength=i.data.byteLength,e.bufferData(o,i.data,s)}}}},e.prototype.checkCompatibility=function(t,e){var r=t.attributes,i=e.attributeData;for(var n in i)if(!r[n])throw new Error('shader and geometry incompatible, geometry missing the "'+n+'" attribute')},e.prototype.getSignature=function(t,e){var r=t.attributes,i=e.attributeData,n=["g",t.id];for(var o in r)i[o]&&n.push(o);return n.join("-")},e.prototype.initGeometryVao=function(t,e){this.checkCompatibility(t,e);var r=this.gl,i=this.CONTEXT_UID,n=this.getSignature(t,e),o=t.glVertexArrayObjects[this.CONTEXT_UID],s=o[n];if(s)return o[e.id]=s,s;var a=t.buffers,h=t.attributes,u={},l={};for(var c in a)u[c]=0,l[c]=0;for(var d in h)!h[d].size&&e.attributeData[d]?h[d].size=e.attributeData[d].size:h[d].size||console.warn("PIXI Geometry attribute '"+d+"' size cannot be determined (likely the bound shader does not have the attribute)"),u[h[d].buffer]+=h[d].size*it[h[d].type];for(var p in h){var f=h[p],v=f.size;void 0===f.stride&&(u[f.buffer]===v*it[f.type]?f.stride=0:f.stride=u[f.buffer]),void 0===f.start&&(f.start=l[f.buffer],l[f.buffer]+=v*it[f.type])}s=r.createVertexArray(),r.bindVertexArray(s);for(var _=0;_=r.ENV.WEBGL2&&(t=e.getContext("webgl2",{})),t||((t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}))?t.getExtension("WEBGL_draw_buffers"):t=null),dt=t}return dt}function ft(){if(!lt){lt=r.PRECISION.MEDIUM;var t=pt();if(t&&t.getShaderPrecisionFormat){var e=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT);lt=e.precision?r.PRECISION.HIGH:r.PRECISION.MEDIUM}}return lt}function vt(t,e,i){if("precision"!==t.substring(0,9)){var n=e;return e===r.PRECISION.HIGH&&i!==r.PRECISION.HIGH&&(n=r.PRECISION.MEDIUM),"precision "+n+" float;\n"+t}return i!==r.PRECISION.HIGH&&"precision highp"===t.substring(0,15)?t.replace("precision highp","precision mediump"):t}var _t={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function gt(t){return _t[t]}var yt=null,mt={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray"};function xt(t,e){if(!yt){var r=Object.keys(mt);yt={};for(var i=0;i0&&(e+="\nelse "),re.name?1:-1});for(var u=0;u0?this._useCurrent():t.disable(t.SCISSOR_TEST)},e.prototype._useCurrent=function(){var t=this.maskStack[this.maskStack.length-1]._scissorRect,e=this.renderer.renderTexture.current,r=this.renderer.projection,i=r.transform,n=r.sourceFrame,o=r.destinationFrame,s=e?e.resolution:this.renderer.resolution,a=(t.x-n.x)*s+o.x,h=(t.y-n.y)*s+o.y,u=t.width*s,l=t.height*s;i&&(a+=i.tx*s,h+=i.ty*s),e||(h=this.renderer.height-l-h),this.renderer.gl.scissor(a,h,u,l)},e}(te),re=function(t){function e(e){t.call(this,e),this.glConst=WebGLRenderingContext.STENCIL_TEST}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0},e.prototype.push=function(t){var e=t.maskObject,r=this.renderer.gl,i=t._stencilCounter;0===i&&(this.renderer.framebuffer.forceStencil(),r.enable(r.STENCIL_TEST)),t._stencilCounter++,r.colorMask(!1,!1,!1,!1),r.stencilFunc(r.EQUAL,i,this._getBitwiseMask()),r.stencilOp(r.KEEP,r.KEEP,r.INCR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,this._useCurrent()},e.prototype.pop=function(t){var e=this.renderer.gl;0===this.getStackLength()?(e.disable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),e.clearStencil(0)):(e.colorMask(!1,!1,!1,!1),e.stencilOp(e.KEEP,e.KEEP,e.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,this._useCurrent())},e.prototype._useCurrent=function(){var t=this.renderer.gl;t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.EQUAL,this.getStackLength(),this._getBitwiseMask()),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)},e.prototype._getBitwiseMask=function(){return(1<>=1,r++;this.stateId=t.data}for(var i=0;ithis.checkCountMax&&(this.checkCount=0,this.run())))},e.prototype.run=function(){for(var t=this.renderer.texture,e=t.managedTextures,r=!1,i=0;ithis.maxIdle&&(t.destroyTexture(n,!0),e[i]=null,r=!0)}if(r){for(var o=0,s=0;s=0;r--)this.unload(t.children[r])},e}(b),ge=function(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=6408,this.internalFormat=5121};exports.GLTexture=ge;var ye=function(t){function i(e){t.call(this,e),this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new v}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion;var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=e;for(var r=0;r=1:e.mipmap=0,2===this.webGLVersion||t.isPowerOfTwo?e.wrapMode=t.wrapMode:e.wrapMode=r.WRAP_MODES.CLAMP,t.resource&&t.resource.style(this.renderer,t,e)||this.setStyle(t,e),e.dirtyStyleId=t.dirtyStyleId)},i.prototype.setStyle=function(t,e){var i=this.gl;if(e.mipmap&&i.generateMipmap(t.target),i.texParameteri(t.target,i.TEXTURE_WRAP_S,e.wrapMode),i.texParameteri(t.target,i.TEXTURE_WRAP_T,e.wrapMode),e.mipmap){i.texParameteri(t.target,i.TEXTURE_MIN_FILTER,t.scaleMode?i.LINEAR_MIPMAP_LINEAR:i.NEAREST_MIPMAP_NEAREST);var n=this.renderer.context.extensions.anisotropicFiltering;if(n&&t.anisotropicLevel>0&&t.scaleMode===r.SCALE_MODES.LINEAR){var o=Math.min(t.anisotropicLevel,i.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT));i.texParameterf(t.target,n.TEXTURE_MAX_ANISOTROPY_EXT,o)}}else i.texParameteri(t.target,i.TEXTURE_MIN_FILTER,t.scaleMode?i.LINEAR:i.NEAREST);i.texParameteri(t.target,i.TEXTURE_MAG_FILTER,t.scaleMode?i.LINEAR:i.NEAREST)},i}(b),me={FilterSystem:Z,BatchSystem:$,ContextSystem:tt,FramebufferSystem:et,GeometrySystem:nt,MaskSystem:Jt,ScissorSystem:ee,StencilSystem:re,ProjectionSystem:ie,RenderTextureSystem:oe,ShaderSystem:he,StateSystem:ve,TextureGCSystem:_e,TextureSystem:ye};exports.systems=me;var xe=new o.Matrix,Ee=function(t){function n(n,a){t.call(this),(a=Object.assign({},i.settings.RENDER_OPTIONS,a)).roundPixels&&(i.settings.ROUND_PIXELS=a.roundPixels,(0,e.deprecation)("5.0.0","Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS",2)),this.options=a,this.type=r.RENDERER_TYPE.UNKNOWN,this.screen=new o.Rectangle(0,0,a.width,a.height),this.view=a.view||document.createElement("canvas"),this.resolution=a.resolution||i.settings.RESOLUTION,this.transparent=a.transparent,this.autoDensity=a.autoDensity||a.autoResize||!1,this.preserveDrawingBuffer=a.preserveDrawingBuffer,this.clearBeforeRender=a.clearBeforeRender,this._backgroundColor=0,this._backgroundColorRgba=[0,0,0,0],this._backgroundColorString="#000000",this.backgroundColor=a.backgroundColor||this._backgroundColor,this._tempDisplayObjectParent=new s.Container,this._lastObjectRendered=this._tempDisplayObjectParent,this.plugins={}}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var a={width:{configurable:!0},height:{configurable:!0},backgroundColor:{configurable:!0}};return n.prototype.initPlugins=function(t){for(var e in t)this.plugins[e]=new t[e](this)},a.width.get=function(){return this.view.width},a.height.get=function(){return this.view.height},n.prototype.resize=function(t,e){this.screen.width=t,this.screen.height=e,this.view.width=t*this.resolution,this.view.height=e*this.resolution,this.autoDensity&&(this.view.style.width=t+"px",this.view.style.height=e+"px")},n.prototype.generateTexture=function(t,e,r,i){0===(i=i||t.getLocalBounds()).width&&(i.width=1),0===i.height&&(i.height=1);var n=D.create(0|i.width,0|i.height,e,r);return xe.tx=-i.x,xe.ty=-i.y,this.render(t,n,!1,xe,!!t.parent),n},n.prototype.destroy=function(t){for(var e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null;t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.plugins=null,this.type=r.RENDERER_TYPE.UNKNOWN,this.view=null,this.screen=null,this.resolution=0,this.transparent=!1,this.autoDensity=!1,this.blendModes=null,this.options=null,this.preserveDrawingBuffer=!1,this.clearBeforeRender=!1,this._backgroundColor=0,this._backgroundColorRgba=null,this._backgroundColorString=null,this._tempDisplayObjectParent=null,this._lastObjectRendered=null},a.backgroundColor.get=function(){return this._backgroundColor},a.backgroundColor.set=function(t){this._backgroundColor=t,this._backgroundColorString=(0,e.hex2string)(t),(0,e.hex2rgb)(t,this._backgroundColorRgba)},Object.defineProperties(n.prototype,a),n}(e.EventEmitter);exports.AbstractRenderer=Ee;var Te=function(i){function n(s){void 0===s&&(s={}),i.call(this,"WebGL",s),s=this.options,this.type=r.RENDERER_TYPE.WEBGL,this.gl=null,this.CONTEXT_UID=0,this.runners={destroy:new t.Runner("destroy"),contextChange:new t.Runner("contextChange",1),reset:new t.Runner("reset"),update:new t.Runner("update"),postrender:new t.Runner("postrender"),prerender:new t.Runner("prerender"),resize:new t.Runner("resize",2)},this.globalUniforms=new K({projectionMatrix:new o.Matrix},!0),this.addSystem(Jt,"mask").addSystem(tt,"context").addSystem(ve,"state").addSystem(he,"shader").addSystem(ye,"texture").addSystem(nt,"geometry").addSystem(et,"framebuffer").addSystem(ee,"scissor").addSystem(re,"stencil").addSystem(ie,"projection").addSystem(_e,"textureGC").addSystem(Z,"filter").addSystem(oe,"renderTexture").addSystem($,"batch"),this.initPlugins(n.__plugins),s.context?this.context.initFromContext(s.context):this.context.initFromOptions({alpha:this.transparent,antialias:s.antialias,premultipliedAlpha:this.transparent&&"notMultiplied"!==this.transparent,stencil:!0,preserveDrawingBuffer:s.preserveDrawingBuffer,powerPreference:this.options.powerPreference}),this.renderingToScreen=!0,(0,e.sayHello)(2===this.context.webGLVersion?"WebGL 2":"WebGL 1"),this.resize(this.options.width,this.options.height)}return i&&(n.__proto__=i),n.prototype=Object.create(i&&i.prototype),n.prototype.constructor=n,n.create=function(t){if((0,e.isWebGLSupported)())return new n(t);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},n.prototype.addSystem=function(t,e){e||(e=t.name);var r=new t(this);if(this[e])throw new Error('Whoops! The name "'+e+'" is already in use');for(var i in this[e]=r,this.runners)this.runners[i].add(r);return this},n.prototype.render=function(t,e,r,i,n){if(this.renderingToScreen=!e,this.runners.prerender.run(),this.emit("prerender"),this.projection.transform=i,!this.context.isLost){if(e||(this._lastObjectRendered=t),!n){var o=t.parent;t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=o}this.renderTexture.bind(e),this.batch.currentRenderer.start(),(void 0!==r?r:this.clearBeforeRender)&&this.renderTexture.clear(),t.render(this),this.batch.currentRenderer.flush(),e&&e.baseTexture.update(),this.runners.postrender.run(),this.projection.transform=null,this.emit("postrender")}},n.prototype.resize=function(t,e){i.prototype.resize.call(this,t,e),this.runners.resize.run(t,e)},n.prototype.reset=function(){return this.runners.reset.run(),this},n.prototype.clear=function(){this.framebuffer.bind(),this.framebuffer.clear()},n.prototype.destroy=function(t){for(var e in this.runners.destroy.run(),this.runners)this.runners[e].destroy();i.prototype.destroy.call(this,t),this.gl=null},n.registerPlugin=function(t,e){n.__plugins=n.__plugins||{},n.__plugins[t]=e},n}(Ee);function be(t){return Te.create(t)}exports.Renderer=Te;var Se="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}";exports.defaultVertex=Se;var we="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n";exports.defaultFilterVertex=we;var Ae=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.from=function(t,r){return new e(new y(t,r))},e}(v);exports.CubeTexture=Ae;var Ce=function(){this.texArray=null,this.blend=0,this.type=r.DRAW_MODES.TRIANGLES,this.start=0,this.size=0,this.data=null};exports.BatchDrawCall=Ce;var Re=function(){this.elements=[],this.ids=[],this.count=0};exports.BatchTextureArray=Re,Re.prototype.clear=function(){for(var t=0;tthis.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)},n.prototype.buildTexturesAndDrawCalls=function(){var t=this._bufferedTextures,e=this.MAX_TEXTURES,r=n._textureArrayPool,i=this.renderer.batch,o=this._tempBoundTextures,s=this.renderer.textureGC.count,a=++v._globalBatch,h=0,u=r[0],l=0;i.copyBoundTextures(o,e);for(var c=0;c=e&&(i.boundArray(u,o,a,e),this.buildDrawCalls(u,l,c),l=c,u=r[++h],++a),d._batchEnabled=a,d.touched=s,u.elements[u.count++]=d)}u.count>0&&(i.boundArray(u,o,a,e),this.buildDrawCalls(u,l,this._bufferSize),++h,++a);for(var p=0;p0&&(e+="\nelse "),r=0;p--){var u=c[p],l=this.recursiveFindHit(t,u,i,n,a);if(l){if(!u.parent)continue;a=!1,l&&(t.target&&(n=!1),s=!0)}}return o&&(n&&!t.target&&!e.hitArea&&e.containsPoint&&e.containsPoint(r)&&(s=!0),e.interactive&&(s&&!t.target&&(t.target=e),i&&i(t,e,!!s))),s},c.prototype.findHit=function(t,e,i,n){this.recursiveFindHit(t,e,i,n,!1)};var p={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return"pointer"===this.cursor},set buttonMode(t){t?this.cursor="pointer":"pointer"===this.cursor&&(this.cursor=null)},cursor:null,get trackedPointers(){return void 0===this._trackedPointers&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};exports.interactiveTarget=p,i.DisplayObject.mixin(p);var u=1,l={target:null,data:{global:null}},v=function(t){function i(e,i){t.call(this),i=i||{},this.renderer=e,this.autoPreventDefault=void 0===i.autoPreventDefault||i.autoPreventDefault,this.interactionFrequency=i.interactionFrequency||10,this.mouse=new o,this.mouse.identifier=u,this.mouse.global.set(-999999),this.activeInteractionData={},this.activeInteractionData[u]=this.mouse,this.interactionDataPool=[],this.eventData=new s,this.interactionDOMElement=null,this.moveWhenInside=!1,this.eventsAdded=!1,this.mouseOverRenderer=!1,this.supportsTouchEvents="ontouchstart"in window,this.supportsPointerEvents=!!window.PointerEvent,this.onPointerUp=this.onPointerUp.bind(this),this.processPointerUp=this.processPointerUp.bind(this),this.onPointerCancel=this.onPointerCancel.bind(this),this.processPointerCancel=this.processPointerCancel.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.processPointerDown=this.processPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.processPointerMove=this.processPointerMove.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.processPointerOverOut=this.processPointerOverOut.bind(this),this.onPointerOver=this.onPointerOver.bind(this),this.cursorStyles={default:"inherit",pointer:"pointer"},this.currentCursorMode=null,this.cursor=null,this.resolution=1,this.delayedEvents=[],this.search=new c,this.setTargetElement(this.renderer.view,this.renderer.resolution)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.hitTest=function(t,e){return l.target=null,l.data.global=t,e||(e=this.renderer._lastObjectRendered),this.processInteractive(l,e,null,!0),l.target},i.prototype.setTargetElement=function(t,e){void 0===e&&(e=1),this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents()},i.prototype.addEvents=function(){this.interactionDOMElement&&(e.Ticker.system.add(this.update,this,e.UPDATE_PRIORITY.INTERACTION),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0)},i.prototype.removeEvents=function(){this.interactionDOMElement&&(e.Ticker.system.remove(this.update,this),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1)},i.prototype.update=function(t){if(this._deltaTime+=t,!(this._deltaTimethis.maxSegments&&(i=this.maxSegments),i}};exports.GRAPHICS_CURVES=n;var h=function(){this.reset()};exports.FillStyle=h,h.prototype.clone=function(){var t=new h;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t},h.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=t.Texture.WHITE,this.matrix=null,this.visible=!1},h.prototype.destroy=function(){this.texture=null,this.matrix=null};var a={build:function(t){t.points=t.shape.points.slice()},triangulate:function(t,e){var r=t.points,s=t.holes,n=e.points,h=e.indices;if(r.length>=6){for(var a=[],o=0;o196*v*v?(A=P-D,C=M-T,A/=E=Math.sqrt(A*A+C*C),C/=E,A*=v,C*=v,d.push(m-A*B,S-C*B),d.push(m+A*R,S+C*R),d.push(m-A*R*B,S-C*B),y++):(d.push(m+(j-m)*B,S+(k-S)*B),d.push(m-(j-m)*R,S-(k-S)*R))}}b=s[2*(f-2)],x=s[2*(f-2)+1],m=s[2*(f-1)],P=-(x-(S=s[2*(f-1)+1])),M=b-m,P/=E=Math.sqrt(P*P+M*M),M/=E,P*=v,M*=v,d.push(m-P*B,S-M*B),d.push(m+P*R,S+M*R);for(var N=i.indices,W=0;Wh?l:h,a=(u=r[p+1])o?u:o;r.push(n,a,h,a,h,o,n,o);for(var c=r.length/2,d=0;du*a}},x.arc=function(t,i,r,s,h,a,o,l,u){for(var p=o-a,c=n._segmentsCount(Math.abs(p)*h,40*Math.ceil(Math.abs(p)/e.PI_2)),d=p/(2*c),f=2*d,y=Math.cos(d),g=Math.sin(d),v=c-1,b=v%1/v,x=0;x<=v;++x){var m=d+a+f*(x+b*x),S=Math.cos(m),_=-Math.sin(m);u.push((y*S+g*_)*h+r,(y*-_+g*S)*h+s)}};var m=function(){};m.curveLength=function(t,e,i,r,s,n,h,a){for(var o=0,l=0,u=0,p=0,c=0,d=0,f=0,y=0,g=0,v=0,b=0,x=t,m=e,S=1;S<=10;++S)v=x-(y=(f=(d=(c=1-(l=S/10))*c)*c)*t+3*d*l*i+3*c*(u=l*l)*s+(p=u*l)*h),b=m-(g=f*e+3*d*l*r+3*c*u*n+p*a),x=y,m=g,o+=Math.sqrt(v*v+b*b);return o},m.curveTo=function(t,e,i,r,s,h,a){var o=a[a.length-2],l=a[a.length-1];a.length-=2;var u=n._segmentsCount(m.curveLength(o,l,t,e,i,r,s,h)),p=0,c=0,d=0,f=0,y=0;a.push(o,l);for(var g=1,v=0;g<=u;++g)d=(c=(p=1-(v=g/u))*p)*p,y=(f=v*v)*v,a.push(d*o+3*c*v*t+3*p*f*i+y*s,d*l+3*c*v*e+3*p*f*r+y*h)};var S=function(){};S.curveLength=function(t,e,i,r,s,n){var h=t-2*i+s,a=e-2*r+n,o=2*i-2*t,l=2*r-2*e,u=4*(h*h+a*a),p=4*(h*o+a*l),c=o*o+l*l,d=2*Math.sqrt(u+p+c),f=Math.sqrt(u),y=2*u*f,g=2*Math.sqrt(c),v=p/f;return(y*d+f*p*(d-g)+(4*c*u-p*p)*Math.log((2*f+v+d)/(v+g)))/(4*y)},S.curveTo=function(t,e,i,r,s){for(var h=s[s.length-2],a=s[s.length-1],o=n._segmentsCount(S.curveLength(h,a,t,e,i,r)),l=0,u=0,p=1;p<=o;++p){var c=p/o;l=h+(t-h)*c,u=a+(e-a)*c,s.push(l+(t+(i-t)*c-l)*c,u+(e+(r-e)*c-u)*c)}};var _=function(){this.reset()};_.prototype.begin=function(t,e,i){this.reset(),this.style=t,this.start=e,this.attribStart=i},_.prototype.end=function(t,e){this.attribSize=e-this.attribStart,this.size=t-this.start},_.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0};var w={};w[e.SHAPES.POLY]=a,w[e.SHAPES.CIRC]=o,w[e.SHAPES.ELIP]=o,w[e.SHAPES.RECT]=l,w[e.SHAPES.RREC]=u;var P=[],M=[],D={buildPoly:a,buildCircle:o,buildRectangle:l,buildRoundedRectangle:u,FILL_COMMANDS:w,BATCH_POOL:P,DRAW_CALL_POOL:M,buildLine:d,buildComplexPoly:g,bezierCurveTo:v,Star:b,ArcUtils:x,BezierUtils:m,QuadraticUtils:S,BatchPart:_};exports.graphicsUtils=D;var T=function(t,e,i,r){void 0===e&&(e=null),void 0===i&&(i=null),void 0===r&&(r=null),this.shape=t,this.lineStyle=i,this.fillStyle=e,this.matrix=r,this.type=t.type,this.points=[],this.holes=[]};exports.GraphicsData=T,T.prototype.clone=function(){return new T(this.shape,this.fillStyle,this.lineStyle,this.matrix)},T.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null};var A=new e.Point,C=new s.Bounds,E=function(n){function h(){n.call(this),this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.dirty=0,this.batchDirty=-1,this.cacheDirty=-1,this.clearDirty=0,this.drawCalls=[],this.batches=[],this.shapeIndex=0,this._bounds=new s.Bounds,this.boundsDirty=-1,this.boundsPadding=0,this.batchable=!1,this.indicesUint16=null,this.uvsFloat32=null,this.closePointEps=1e-4}n&&(h.__proto__=n),h.prototype=Object.create(n&&n.prototype),h.prototype.constructor=h;var o={bounds:{configurable:!0}};return o.bounds.get=function(){return this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},h.prototype.invalidate=function(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(var t=0;t0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},h.prototype.drawShape=function(t,e,i,r){var s=new T(t,e,i,r);return this.graphicsData.push(s),this.dirty++,this},h.prototype.drawHole=function(t,e){if(!this.graphicsData.length)return null;var i=new T(t,null,null,e),r=this.graphicsData[this.graphicsData.length-1];return i.lineStyle=r.lineStyle,r.holes.push(i),this.dirty++,this},h.prototype.destroy=function(t){n.prototype.destroy.call(this,t);for(var e=0;e0&&(s=(i=this.batches[this.batches.length-1]).style);for(var n=this.shapeIndex;n0&&(i=null)),i||((i=P.pop()||new _).begin(u,c,d),this.batches.push(i),s=u);var f=this.points.length/2;0===l?this.processFill(h):this.processLine(h);var y=this.points.length/2-f;this.addUvs(this.points,t,u.texture,f,y,u.matrix)}}}if(i){var g=this.indices.length,v=this.points.length/2;i.end(g,v),this.indicesUint16=new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}else this.batchable=!0}}else this.batchable=!0},h.prototype._compareStyles=function(t,e){return!(!t||!e)&&(t.texture.baseTexture===e.texture.baseTexture&&(t.color+t.alpha===e.color+e.alpha&&!!t.native==!!e.native))},h.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var t=0,e=this.graphicsData.length;t0&&((h=M.pop())||((h=new t.BatchDrawCall).textures=new t.BatchTextureArray),this.drawCalls.push(h)),h.start=c,h.size=0,h.textures.count=0,h.type=p),g.touched=1,g._batchEnabled=e,g._batchLocation=a,g.wrapMode=10497,h.textures.elements[h.textures.count++]=g,a++)),h.size+=f.size,c+=f.size,l=g._batchLocation,this.addColors(s,y.color,y.alpha,f.attribSize),this.addTextureIds(n,l,f.attribSize)}t.BaseTexture._globalBatch=e,this.packAttributes()},h.prototype.packAttributes=function(){for(var t=this.points,e=this.uvs,i=this.colors,r=this.textureIds,s=new ArrayBuffer(3*t.length*4),n=new Float32Array(s),h=new Uint32Array(s),a=0,o=0;o>16)+(65280&e)+((255&e)<<16),h=(0,i.premultiplyTint)(n,r);s-- >0;)t.push(h)},h.prototype.addTextureIds=function(t,e,i){for(;i-- >0;)t.push(e)},h.prototype.addUvs=function(t,e,i,r,s,n){for(var h=0,a=e.length,o=i.frame;h0&&e.alpha>0;return u?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:u},e)):this._lineStyle.reset(),this},n.prototype.startPoly=function(){if(this.currentPath){var t=this.currentPath.points,i=this.currentPath.points.length;i>2&&(this.drawShape(this.currentPath),this.currentPath=new e.Polygon,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[i-2],t[i-1]))}else this.currentPath=new e.Polygon,this.currentPath.closeStroke=!1},n.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},n.prototype.moveTo=function(t,e){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=e,this},n.prototype.lineTo=function(t,e){this.currentPath||this.moveTo(0,0);var i=this.currentPath.points,r=i[i.length-2],s=i[i.length-1];return r===t&&s===e||i.push(t,e),this},n.prototype._initCurve=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.currentPath?0===this.currentPath.points.length&&(this.currentPath.points=[t,e]):this.moveTo(t,e)},n.prototype.quadraticCurveTo=function(t,e,i,r){this._initCurve();var s=this.currentPath.points;return 0===s.length&&this.moveTo(0,0),S.curveTo(t,e,i,r,s),this},n.prototype.bezierCurveTo=function(t,e,i,r,s,n){return this._initCurve(),m.curveTo(t,e,i,r,s,n,this.currentPath.points),this},n.prototype.arcTo=function(t,e,i,r,s){this._initCurve(t,e);var n=this.currentPath.points,h=x.curveTo(t,e,i,r,s,n);if(h){var a=h.cx,o=h.cy,l=h.radius,u=h.startAngle,p=h.endAngle,c=h.anticlockwise;this.arc(a,o,l,u,p,c)}return this},n.prototype.arc=function(t,i,r,s,n,h){if(void 0===h&&(h=!1),s===n)return this;if(!h&&n<=s?n+=e.PI_2:h&&s<=n&&(s+=e.PI_2),0===n-s)return this;var a=t+Math.cos(s)*r,o=i+Math.sin(s)*r,l=this.geometry.closePointEps,u=this.currentPath?this.currentPath.points:null;if(u){var p=Math.abs(u[u.length-2]-a),c=Math.abs(u[u.length-1]-o);p0;return a?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:a},e)):this._fillStyle.reset(),this},n.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},n.prototype.drawRect=function(t,i,r,s){return this.drawShape(new e.Rectangle(t,i,r,s))},n.prototype.drawRoundedRect=function(t,i,r,s,n){return this.drawShape(new e.RoundedRectangle(t,i,r,s,n))},n.prototype.drawCircle=function(t,i,r){return this.drawShape(new e.Circle(t,i,r))},n.prototype.drawEllipse=function(t,i,r,s){return this.drawShape(new e.Ellipse(t,i,r,s))},n.prototype.drawPolygon=function(t){var i=arguments,r=t,s=!0;if(r.points&&(s=r.closeStroke,r=r.points),!Array.isArray(r)){r=new Array(arguments.length);for(var n=0;n>16&255)/255*s,n.tint[1]=(r>>8&255)/255*s,n.tint[2]=(255&r)/255*s,n.tint[3]=s,t.shader.bind(e),t.geometry.bind(i,e),t.state.set(this.state);for(var a=0,o=h.length;a>16)+(65280&n)+((255&n)<<16)}}},n.prototype.calculateVertices=function(){if(this._transformID!==this.transform._worldID){this._transformID=this.transform._worldID;for(var t=this.transform.worldTransform,e=t.a,i=t.b,r=t.c,s=t.d,n=t.tx,h=t.ty,a=this.geometry.points,o=this.vertexData,l=0,u=0;u=r&&n.x=s&&n.y>16)+(65280&t)+((255&t)<<16)},a.texture.get=function(){return this._texture},a.texture.set=function(t){this._texture!==t&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=t||i.Texture.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.valid?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))},Object.defineProperties(u.prototype,a),u}(s.Container);exports.Sprite=u; },{"@pixi/math":"oNQC","@pixi/utils":"G5Tu","@pixi/core":"p2j5","@pixi/constants":"LQBK","@pixi/display":"nL3p","@pixi/settings":"t4Uo"}],"T62s":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextStyle=exports.TextMetrics=exports.Text=exports.TEXT_GRADIENT=void 0;var t=require("@pixi/sprite"),e=require("@pixi/core"),i=require("@pixi/settings"),n=require("@pixi/math"),r=require("@pixi/utils"),o={LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1};exports.TEXT_GRADIENT=o;var s={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:o.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},a=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],h=function(t){this.styleID=0,this.reset(),u(this,t,t)};exports.TextStyle=h;var l={align:{configurable:!0},breakWords:{configurable:!0},dropShadow:{configurable:!0},dropShadowAlpha:{configurable:!0},dropShadowAngle:{configurable:!0},dropShadowBlur:{configurable:!0},dropShadowColor:{configurable:!0},dropShadowDistance:{configurable:!0},fill:{configurable:!0},fillGradientType:{configurable:!0},fillGradientStops:{configurable:!0},fontFamily:{configurable:!0},fontSize:{configurable:!0},fontStyle:{configurable:!0},fontVariant:{configurable:!0},fontWeight:{configurable:!0},letterSpacing:{configurable:!0},lineHeight:{configurable:!0},leading:{configurable:!0},lineJoin:{configurable:!0},miterLimit:{configurable:!0},padding:{configurable:!0},stroke:{configurable:!0},strokeThickness:{configurable:!0},textBaseline:{configurable:!0},trim:{configurable:!0},whiteSpace:{configurable:!0},wordWrap:{configurable:!0},wordWrapWidth:{configurable:!0}};function f(t){return"number"==typeof t?(0,r.hex2string)(t):("string"==typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function d(t){if(Array.isArray(t)){for(var e=0;e=0;i--){var n=e[i].trim();!/([\"\'])[^\'\"]+\1/.test(n)&&a.indexOf(n)<0&&(n='"'+n+'"'),e[i]=n}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},Object.defineProperties(h.prototype,l);var g=function(t,e,i,n,r,o,s,a,h){this.text=t,this.style=e,this.width=i,this.height=n,this.lines=r,this.lineWidths=o,this.lineHeight=s,this.maxLineWidth=a,this.fontProperties=h};exports.TextMetrics=g,g.measureText=function(t,e,i,n){void 0===n&&(n=g._canvas),i=null==i?e.wordWrap:i;var r=e.toFontString(),o=g.measureFont(r);0===o.fontSize&&(o.fontSize=e.fontSize,o.ascent=e.fontSize);var s=n.getContext("2d");s.font=r;for(var a=(i?g.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),h=new Array(a.length),l=0,f=0;fu)if(""!==o&&(s+=g.addLine(o),o="",r=0),g.canBreakWords(S,e.breakWords))for(var v=S.split(""),m=0;mu&&(s+=g.addLine(o),c=!1,o="",r=0),o+=b,r+=D}else{o.length>0&&(s+=g.addLine(o),o="",r=0);var W=_===p.length-1;s+=g.addLine(S,!W),c=!1,o="",r=0}else x+r>u&&(c=!1,s+=g.addLine(o),o="",r=0),(o.length>0||!g.isBreakingSpace(S)||c)&&(o+=S,r+=x)}return s+=g.addLine(o,!1)},g.addLine=function(t,e){return void 0===e&&(e=!0),t=g.trimRight(t),t=e?t+"\n":t},g.getFromCache=function(t,e,i,n){var r=i[t];if(void 0===r){var o=t.length*e;r=n.measureText(t).width+o,i[t]=r}return r},g.collapseSpaces=function(t){return"normal"===t||"pre-line"===t},g.collapseNewlines=function(t){return"normal"===t},g.trimRight=function(t){if("string"!=typeof t)return"";for(var e=t.length-1;e>=0;e--){var i=t[e];if(!g.isBreakingSpace(i))break;t=t.slice(0,-1)}return t},g.isNewline=function(t){return"string"==typeof t&&g._newlines.indexOf(t.charCodeAt(0))>=0},g.isBreakingSpace=function(t){return"string"==typeof t&&g._breakingSpaces.indexOf(t.charCodeAt(0))>=0},g.tokenize=function(t){var e=[],i="";if("string"!=typeof t)return e;for(var n=0;ns;--d){for(var _=0;_0};var u=function(t){var i=this;this.limiter=new n(e.settings.UPLOADS_PER_FRAME),this.renderer=t,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=function(){i.queue&&i.prepareItems()},this.registerFindHook(d),this.registerFindHook(f),this.registerFindHook(a),this.registerFindHook(h),this.registerFindHook(p),this.registerUploadHook(l),this.registerUploadHook(c)};function a(e,i){var r=!1;if(e&&e._textures&&e._textures.length)for(var s=0;s=0;r--)this.add(e.children[r]);return this},u.prototype.destroy=function(){this.ticking&&r.Ticker.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null};var x=function(e){function t(t){e.call(this,t),this.uploadHookHelper=this.renderer,this.registerFindHook(g),this.registerUploadHook(k),this.registerUploadHook(m)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(u);function k(e,i){return i instanceof t.BaseTexture&&(i._glTextures[e.CONTEXT_UID]||e.texture.bind(i),!0)}function m(e,t){if(!(t instanceof i.Graphics))return!1;var r=t.geometry;t.finishPoly(),r.updateBatches();for(var s=r.batches,o=0;o0||t.responseType===r.XHR_RESPONSE_TYPE.BUFFER)?i=f:i===T&&(i=p),(i/100|0)===O){if(this.xhrType===r.XHR_RESPONSE_TYPE.TEXT)this.data=e,this.type=r.TYPE.TEXT;else if(this.xhrType===r.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(e),this.type=r.TYPE.JSON}catch(o){return void this.abort("Error trying to parse loaded json: "+o)}else if(this.xhrType===r.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var s=new DOMParser;this.data=s.parseFromString(e,"text/xml")}else{var n=document.createElement("div");n.innerHTML=e,this.data=n}this.type=r.TYPE.XML}catch(o){return void this.abort("Error trying to parse loaded xml: "+o)}else this.data=t.response||e;this.complete()}else this.abort("["+t.status+"] "+t.statusText+": "+t.responseURL)},i._determineCrossOrigin=function(e,r){if(0===e.indexOf("data:"))return"";if(window.origin!==window.location.origin)return"anonymous";r=r||window.location,_||(_=document.createElement("a")),_.href=e;var i=!(e=(0,t.default)(_.href,{strictMode:!0})).port&&""===r.port||e.port===r.port,s=e.protocol?e.protocol+":":"";return e.host===r.hostname&&i&&s===r.protocol?"":"anonymous"},i._determineXhrType=function(){return r._xhrTypeMap[this.extension]||r.XHR_RESPONSE_TYPE.TEXT},i._determineLoadType=function(){return r._loadTypeMap[this.extension]||r.LOAD_TYPE.XHR},i._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var r=t.indexOf("/");e=t.substring(r+1,t.indexOf(";",r))}else{var i=t.indexOf("?"),s=t.indexOf("#"),n=Math.min(i>-1?i:t.length,s>-1?s:t.length);e=(t=t.substring(0,n)).substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},i._getMimeFromXhrType=function(t){switch(t){case r.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case r.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case r.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case r.XHR_RESPONSE_TYPE.JSON:return"application/json";case r.XHR_RESPONSE_TYPE.DEFAULT:case r.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},l(r,[{key:"isDataUrl",get:function(){return this._hasFlag(r.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(r.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(r.STATUS_FLAGS.LOADING)}}]),r}();function P(t,e,r){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=r)}function S(t){return t.toString().replace("object ","")}exports.Resource=m,m.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},m.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},m.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},m.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},m._loadTypeMap={gif:m.LOAD_TYPE.IMAGE,png:m.LOAD_TYPE.IMAGE,bmp:m.LOAD_TYPE.IMAGE,jpg:m.LOAD_TYPE.IMAGE,jpeg:m.LOAD_TYPE.IMAGE,tif:m.LOAD_TYPE.IMAGE,tiff:m.LOAD_TYPE.IMAGE,webp:m.LOAD_TYPE.IMAGE,tga:m.LOAD_TYPE.IMAGE,svg:m.LOAD_TYPE.IMAGE,"svg+xml":m.LOAD_TYPE.IMAGE,mp3:m.LOAD_TYPE.AUDIO,ogg:m.LOAD_TYPE.AUDIO,wav:m.LOAD_TYPE.AUDIO,mp4:m.LOAD_TYPE.VIDEO,webm:m.LOAD_TYPE.VIDEO},m._xhrTypeMap={xhtml:m.XHR_RESPONSE_TYPE.DOCUMENT,html:m.XHR_RESPONSE_TYPE.DOCUMENT,htm:m.XHR_RESPONSE_TYPE.DOCUMENT,xml:m.XHR_RESPONSE_TYPE.DOCUMENT,tmx:m.XHR_RESPONSE_TYPE.DOCUMENT,svg:m.XHR_RESPONSE_TYPE.DOCUMENT,tsx:m.XHR_RESPONSE_TYPE.DOCUMENT,gif:m.XHR_RESPONSE_TYPE.BLOB,png:m.XHR_RESPONSE_TYPE.BLOB,bmp:m.XHR_RESPONSE_TYPE.BLOB,jpg:m.XHR_RESPONSE_TYPE.BLOB,jpeg:m.XHR_RESPONSE_TYPE.BLOB,tif:m.XHR_RESPONSE_TYPE.BLOB,tiff:m.XHR_RESPONSE_TYPE.BLOB,webp:m.XHR_RESPONSE_TYPE.BLOB,tga:m.XHR_RESPONSE_TYPE.BLOB,json:m.XHR_RESPONSE_TYPE.JSON,text:m.XHR_RESPONSE_TYPE.TEXT,txt:m.XHR_RESPONSE_TYPE.TEXT,ttf:m.XHR_RESPONSE_TYPE.BUFFER,otf:m.XHR_RESPONSE_TYPE.BUFFER},m.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";var A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function b(t){for(var e="",r=0;r>2,s[1]=(3&i[0])<<4|i[1]>>4,s[2]=(15&i[1])<<2|i[2]>>6,s[3]=63&i[2],r-(t.length-1)){case 2:s[3]=64,s[2]=64;break;case 1:s[3]=64}for(var o=0;o16384&&(o=16384),this._properties=[!1,!0,!1,!1,!1],this._maxSize=e,this._batchSize=o,this._buffers=null,this._bufferUpdateIDs=[],this._updateID=0,this.interactiveChildren=!1,this.blendMode=t.BLEND_MODES.NORMAL,this.autoResize=s,this.roundPixels=!0,this.baseTexture=null,this.setProperties(r),this._tint=0,this.tintRgb=new Float32Array(4),this.tint=16777215}i&&(r.__proto__=i),r.prototype=Object.create(i&&i.prototype),r.prototype.constructor=r;var o={tint:{configurable:!0}};return r.prototype.setProperties=function(t){t&&(this._properties[0]="vertices"in t||"scale"in t?!!t.vertices||!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="tint"in t||"alpha"in t?!!t.tint||!!t.alpha:this._properties[4])},r.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},o.tint.get=function(){return this._tint},o.tint.set=function(t){this._tint=t,(0,e.hex2rgb)(t,this.tintRgb)},r.prototype.render=function(t){var e=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",function(){return e.onChildrenChange(0)})),t.batch.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},r.prototype.onChildrenChange=function(t){for(var e=Math.floor(t/this._batchSize);this._bufferUpdateIDs.lengthr&&!t.autoResize&&(a=r);var n=t._buffers;n||(n=t._buffers=this.generateBuffers(t));var h=i[0]._texture.baseTexture;this.renderer.state.setBlendMode((0,e.correctBlendMode)(t.blendMode,h.alphaMode));var u=s.gl,p=t.worldTransform.copyTo(this.tempMatrix);p.prepend(s.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=p.toArray(!0),this.shader.uniforms.uColor=(0,e.premultiplyRgba)(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,h.alphaMode),this.shader.uniforms.uSampler=h,this.renderer.shader.bind(this.shader);for(var d=!1,l=0,c=0;lo&&(f=o),c>=n.length&&n.push(this._generateOneMoreBuffer(t));var y=n[c];y.uploadDynamic(i,l,f);var v=t._bufferUpdateIDs[c]||0;(d=d||y._updateID0,p=h.alpha,d=p<1&&u?(0,e.premultiplyTint)(h._tintRGB,p):h._tintRGB+(255*p<<24);o[a]=d,o[a+s]=d,o[a+2*s]=d,o[a+3*s]=d,a+=4*s}},s.prototype.destroy=function(){i.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},s}(r.ObjectRenderer);exports.ParticleRenderer=u; },{"@pixi/constants":"LQBK","@pixi/utils":"G5Tu","@pixi/display":"nL3p","@pixi/core":"p2j5","@pixi/math":"oNQC"}],"LQzI":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SpritesheetLoader=exports.Spritesheet=void 0;var e=require("@pixi/math"),t=require("@pixi/core"),s=require("@pixi/utils"),r=require("@pixi/loaders"),i=function(e,t,s){void 0===s&&(s=null),this.baseTexture=e,this.textures={},this.animations={},this.data=t,this.resolution=this._updateResolution(s||(this.baseTexture.resource?this.baseTexture.resource.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null};exports.Spritesheet=i;var o={BATCH_SIZE:{configurable:!0}};o.BATCH_SIZE.get=function(){return 1e3},i.prototype._updateResolution=function(e){var t=this.data.meta.scale,r=(0,s.getResolutionOfUrl)(e,null);return null===r&&(r=void 0!==t?parseFloat(t):1),1!==r&&this.baseTexture.setResolution(r),r},i.prototype.parse=function(e){this._batchIndex=0,this._callback=e,this._frameKeys.length<=i.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()},i.prototype._processFrames=function(s){for(var r=s,o=i.BATCH_SIZE;r-s=i&&n.x=o&&n.y0&&n.x>l&&(++_,(0,a.removeItems)(o,1+d-_,1+b-d),b=d,d=-1,h.push(m),p=Math.max(p,m),x++,n.x=0,n.y+=t.lineHeight,f=null))}else h.push(c),p=Math.max(p,c),++x,++_,n.x=0,n.y+=t.lineHeight,f=null}var O=g.charAt(g.length-1);"\r"!==O&&"\n"!==O&&(/(?:\s)/.test(O)&&(c=m),h.push(c),p=Math.max(p,c));for(var E=[],I=0;I<=x;I++){var H=0;"right"===this._font.align?H=p-h[I]:"center"===this._font.align&&(H=(p-h[I])/2),E.push(H)}for(var L=o.length,B=this.tint,S=0;S=0?t:16777215,this.dirty=!0},o.align.get=function(){return this._font.align},o.align.set=function(t){this._font.align=t||"left",this.dirty=!0},o.anchor.get=function(){return this._anchor},o.anchor.set=function(t){"number"==typeof t?this._anchor.set(t):this._anchor.copyFrom(t)},o.font.get=function(){return this._font},o.font.set=function(t){t&&("string"==typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):s.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"==typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)},o.text.get=function(){return this._text},o.text.set=function(t){t=String(null==t?"":t),this._text!==t&&(this._text=t,this.dirty=!0)},o.maxWidth.get=function(){return this._maxWidth},o.maxWidth.set=function(t){this._maxWidth!==t&&(this._maxWidth=t,this.dirty=!0)},o.maxLineHeight.get=function(){return this.validate(),this._maxLineHeight},o.textWidth.get=function(){return this.validate(),this._textWidth},o.letterSpacing.get=function(){return this._letterSpacing},o.letterSpacing.set=function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.dirty=!0)},o.textHeight.get=function(){return this.validate(),this._textHeight},s.registerFont=function(e,r){var o={},h=e.getElementsByTagName("info")[0],g=e.getElementsByTagName("common")[0],u=e.getElementsByTagName("page"),l=(0,a.getResolutionOfUrl)(u[0].getAttribute("file"),n.settings.RESOLUTION),f={};o.font=h.getAttribute("face"),o.size=parseInt(h.getAttribute("size"),10),o.lineHeight=parseInt(g.getAttribute("lineHeight"),10)/l,o.chars={},r instanceof t.Texture&&(r=[r]);for(var c=0;c=i&&(e=t-o-1),u+=a=a.replace("%value%",r[e]),u+="\n"}return s=(s=s.replace("%blur%",u)).replace("%size%",t)}var u=function(t){function r(r,n,l,u,o){var a=i(o=o||5,r),h=s(o);t.call(this,a,h),this.horizontal=r,this.resolution=u||e.settings.RESOLUTION,this._quality=0,this.quality=l||4,this.blur=n||8}t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r;var n={blur:{configurable:!0},quality:{configurable:!0}};return r.prototype.apply=function(t,e,r,i){if(r?this.horizontal?this.uniforms.strength=1/r.width*(r.width/e.width):this.uniforms.strength=1/r.height*(r.height/e.height):this.horizontal?this.uniforms.strength=1/t.renderer.width*(t.renderer.width/e.width):this.uniforms.strength=1/t.renderer.height*(t.renderer.height/e.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,r,i);else{var n=t.getFilterTexture(),l=t.renderer,s=e,u=n;this.state.blend=!1,t.applyFilter(this,s,u,!1);for(var o=1;o 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n",o=function(o){function n(){var n={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};o.call(this,t.defaultFilterVertex,r,n),this.alpha=1}o&&(n.__proto__=o),n.prototype=Object.create(o&&o.prototype),n.prototype.constructor=n;var e={matrix:{configurable:!0},alpha:{configurable:!0}};return n.prototype._loadMatrix=function(t,r){void 0===r&&(r=!1);var o=t;r&&(this._multiply(o,this.uniforms.m,t),o=this._colorMatrix(o)),this.uniforms.m=o},n.prototype._multiply=function(t,r,o){return t[0]=r[0]*o[0]+r[1]*o[5]+r[2]*o[10]+r[3]*o[15],t[1]=r[0]*o[1]+r[1]*o[6]+r[2]*o[11]+r[3]*o[16],t[2]=r[0]*o[2]+r[1]*o[7]+r[2]*o[12]+r[3]*o[17],t[3]=r[0]*o[3]+r[1]*o[8]+r[2]*o[13]+r[3]*o[18],t[4]=r[0]*o[4]+r[1]*o[9]+r[2]*o[14]+r[3]*o[19]+r[4],t[5]=r[5]*o[0]+r[6]*o[5]+r[7]*o[10]+r[8]*o[15],t[6]=r[5]*o[1]+r[6]*o[6]+r[7]*o[11]+r[8]*o[16],t[7]=r[5]*o[2]+r[6]*o[7]+r[7]*o[12]+r[8]*o[17],t[8]=r[5]*o[3]+r[6]*o[8]+r[7]*o[13]+r[8]*o[18],t[9]=r[5]*o[4]+r[6]*o[9]+r[7]*o[14]+r[8]*o[19]+r[9],t[10]=r[10]*o[0]+r[11]*o[5]+r[12]*o[10]+r[13]*o[15],t[11]=r[10]*o[1]+r[11]*o[6]+r[12]*o[11]+r[13]*o[16],t[12]=r[10]*o[2]+r[11]*o[7]+r[12]*o[12]+r[13]*o[17],t[13]=r[10]*o[3]+r[11]*o[8]+r[12]*o[13]+r[13]*o[18],t[14]=r[10]*o[4]+r[11]*o[9]+r[12]*o[14]+r[13]*o[19]+r[14],t[15]=r[15]*o[0]+r[16]*o[5]+r[17]*o[10]+r[18]*o[15],t[16]=r[15]*o[1]+r[16]*o[6]+r[17]*o[11]+r[18]*o[16],t[17]=r[15]*o[2]+r[16]*o[7]+r[17]*o[12]+r[18]*o[17],t[18]=r[15]*o[3]+r[16]*o[8]+r[17]*o[13]+r[18]*o[18],t[19]=r[15]*o[4]+r[16]*o[9]+r[17]*o[14]+r[18]*o[19]+r[19],t},n.prototype._colorMatrix=function(t){var r=new Float32Array(t);return r[4]/=255,r[9]/=255,r[14]/=255,r[19]/=255,r},n.prototype.brightness=function(t,r){var o=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(o,r)},n.prototype.greyscale=function(t,r){var o=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(o,r)},n.prototype.blackAndWhite=function(t){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},n.prototype.hue=function(t,r){t=(t||0)/180*Math.PI;var o=Math.cos(t),n=Math.sin(t),e=1/3,a=(0,Math.sqrt)(e),i=[o+(1-o)*e,e*(1-o)-a*n,e*(1-o)+a*n,0,0,e*(1-o)+a*n,o+e*(1-o),e*(1-o)-a*n,0,0,e*(1-o)-a*n,e*(1-o)+a*n,o+e*(1-o),0,0,0,0,0,1,0];this._loadMatrix(i,r)},n.prototype.contrast=function(t,r){var o=(t||0)+1,n=-.5*(o-1),e=[o,0,0,0,n,0,o,0,0,n,0,0,o,0,n,0,0,0,1,0];this._loadMatrix(e,r)},n.prototype.saturate=function(t,r){void 0===t&&(t=0);var o=2*t/3+1,n=-.5*(o-1),e=[o,n,n,0,0,n,o,n,0,0,n,n,o,0,0,0,0,0,1,0];this._loadMatrix(e,r)},n.prototype.desaturate=function(){this.saturate(-1)},n.prototype.negative=function(t){this._loadMatrix([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t)},n.prototype.sepia=function(t){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},n.prototype.technicolor=function(t){this._loadMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},n.prototype.polaroid=function(t){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},n.prototype.toBGR=function(t){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},n.prototype.kodachrome=function(t){this._loadMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},n.prototype.browni=function(t){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},n.prototype.vintage=function(t){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},n.prototype.colorTone=function(t,r,o,n,e){var a=((o=o||16770432)>>16&255)/255,i=(o>>8&255)/255,l=(255&o)/255,u=((n=n||3375104)>>16&255)/255,p=(n>>8&255)/255,s=(255&n)/255,c=[.3,.59,.11,0,0,a,i,l,t=t||.2,0,u,p,s,r=r||.15,0,a-u,i-p,l-s,0,0];this._loadMatrix(c,e)},n.prototype.night=function(t,r){var o=[-2*(t=t||.1),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(o,r)},n.prototype.predator=function(t,r){var o=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(o,r)},n.prototype.lsd=function(t){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},n.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},e.matrix.get=function(){return this.uniforms.m},e.matrix.set=function(t){this.uniforms.m=t},e.alpha.get=function(){return this.uniforms.uAlpha},e.alpha.set=function(t){this.uniforms.uAlpha=t},Object.defineProperties(n.prototype,e),n}(t.Filter);exports.ColorMatrixFilter=o,o.prototype.grayscale=o.prototype.greyscale; },{"@pixi/core":"p2j5"}],"rpU2":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DisplacementFilter=void 0;var t=require("@pixi/core"),r=require("@pixi/math"),e="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n\tgl_Position = filterVertexPosition();\n\tvTextureCoord = filterTextureCoord();\n\tvFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;\n}\n",i="varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\nuniform mat2 rotation;\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform highp vec4 inputSize;\nuniform vec4 inputClamp;\n\nvoid main(void)\n{\n vec4 map = texture2D(mapSampler, vFilterCoord);\n\n map -= 0.5;\n map.xy = scale * inputSize.zw * (rotation * map.xy);\n\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));\n}\n",n=function(t){function n(n,o){var a=new r.Matrix;n.renderable=!1,t.call(this,e,i,{mapSampler:n._texture,filterMatrix:a,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])}),this.maskSprite=n,this.maskMatrix=a,null==o&&(o=20),this.scale=new r.Point(o,o)}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var o={map:{configurable:!0}};return n.prototype.apply=function(t,r,e,i){this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;var n=this.maskSprite.transform.worldTransform,o=Math.sqrt(n.a*n.a+n.b*n.b),a=Math.sqrt(n.c*n.c+n.d*n.d);0!==o&&0!==a&&(this.uniforms.rotation[0]=n.a/o,this.uniforms.rotation[1]=n.b/o,this.uniforms.rotation[2]=n.c/a,this.uniforms.rotation[3]=n.d/a),t.applyFilter(this,r,e,i)},o.map.get=function(){return this.uniforms.mapSampler},o.map.set=function(t){this.uniforms.mapSampler=t},Object.defineProperties(n.prototype,o),n}(t.Filter);exports.DisplacementFilter=n; },{"@pixi/core":"p2j5","@pixi/math":"oNQC"}],"zKIa":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FXAAFilter=void 0;var n=require("@pixi/core"),e="\nattribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\n\nuniform vec4 inputPixel;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvoid texcoords(vec2 fragCoord, vec2 inverseVP,\n out vec2 v_rgbNW, out vec2 v_rgbNE,\n out vec2 v_rgbSW, out vec2 v_rgbSE,\n out vec2 v_rgbM) {\n v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n gl_Position = filterVertexPosition();\n\n vFragCoord = aVertexPosition * outputFrame.zw;\n\n texcoords(vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}\n",r='varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\nuniform sampler2D uSampler;\nuniform highp vec4 inputPixel;\n\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n\n --\n\n From:\n https://github.com/mitsuhiko/webgl-meincraft\n\n Copyright (c) 2011 by Armin Ronacher.\n\n Some rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n\n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX 8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,\n vec2 v_rgbNW, vec2 v_rgbNE,\n vec2 v_rgbSW, vec2 v_rgbSE,\n vec2 v_rgbM) {\n vec4 color;\n vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n vec4 texColor = texture2D(tex, v_rgbM);\n vec3 rgbM = texColor.xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n mediump vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n\n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n\n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n vec4 color;\n\n color = fxaa(uSampler, vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n',o=function(n){function o(){n.call(this,e,r)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o}(n.Filter);exports.FXAAFilter=o; },{"@pixi/core":"p2j5"}],"nEkq":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.NoiseFilter=void 0;var e=require("@pixi/core"),o="precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float randomValue = rand(gl_FragCoord.xy * uSeed);\n float diff = (randomValue - 0.5) * uNoise;\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (color.a > 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n",r=function(r){function n(n,i){void 0===n&&(n=.5),void 0===i&&(i=Math.random()),r.call(this,e.defaultFilterVertex,o,{uNoise:0,uSeed:0}),this.noise=n,this.seed=i}r&&(n.__proto__=r),n.prototype=Object.create(r&&r.prototype),n.prototype.constructor=n;var i={noise:{configurable:!0},seed:{configurable:!0}};return i.noise.get=function(){return this.uniforms.uNoise},i.noise.set=function(e){this.uniforms.uNoise=e},i.seed.get=function(){return this.uniforms.uSeed},i.seed.set=function(e){this.uniforms.uSeed=e},Object.defineProperties(n.prototype,i),n}(e.Filter);exports.NoiseFilter=r; },{"@pixi/core":"p2j5"}],"fh0A":[function(require,module,exports) { "use strict";var t=require("@pixi/core"),a=require("@pixi/sprite"),e=require("@pixi/display"),i=require("@pixi/math"),s=require("@pixi/utils"),r=require("@pixi/settings"),n=new i.Matrix;e.DisplayObject.prototype._cacheAsBitmap=!1,e.DisplayObject.prototype._cacheData=!1;var h=function(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalHitTest=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.sprite=null};Object.defineProperties(e.DisplayObject.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){var a;this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._cacheData||(this._cacheData=new h),(a=this._cacheData).originalRender=this.render,a.originalRenderCanvas=this.renderCanvas,a.originalUpdateTransform=this.updateTransform,a.originalCalculateBounds=this.calculateBounds,a.originalGetLocalBounds=this.getLocalBounds,a.originalDestroy=this.destroy,a.originalContainsPoint=this.containsPoint,a.originalMask=this._mask,a.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((a=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.render=a.originalRender,this.renderCanvas=a.originalRenderCanvas,this.calculateBounds=a.originalCalculateBounds,this.getLocalBounds=a.originalGetLocalBounds,this.destroy=a.originalDestroy,this.updateTransform=a.originalUpdateTransform,this.containsPoint=a.originalContainsPoint,this._mask=a.originalMask,this.filterArea=a.originalFilterArea))}}}),e.DisplayObject.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))},e.DisplayObject.prototype._initCachedDisplayObject=function(e){if(!this._cacheData||!this._cacheData.sprite){var i=this.alpha;this.alpha=1,e.batch.flush();var h=this.getLocalBounds().clone();if(this.filters){var o=this.filters[0].padding;h.pad(o)}h.ceil(r.settings.RESOLUTION);var c=e.renderTexture.current,l=e.renderTexture.sourceFrame,d=e.projection.transform,p=t.RenderTexture.create(h.width,h.height),u="cacheAsBitmap_"+(0,s.uid)();this._cacheData.textureCacheId=u,t.BaseTexture.addToCache(p.baseTexture,u),t.Texture.addToCache(p,u);var _=n;_.tx=-h.x,_.ty=-h.y,this.transform.worldTransform.identity(),this.render=this._cacheData.originalRender,e.render(this,p,!0,_,!0),e.projection.transform=d,e.renderTexture.bind(c,l),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var D=new a.Sprite(p);D.transform.worldTransform=this.transform.worldTransform,D.anchor.x=-h.x/h.width,D.anchor.y=-h.y/h.height,D.alpha=i,D._bounds=this._bounds,this._cacheData.sprite=D,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=e._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=D.containsPoint.bind(D)}},e.DisplayObject.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))},e.DisplayObject.prototype._initCachedDisplayObjectCanvas=function(e){if(!this._cacheData||!this._cacheData.sprite){var i=this.getLocalBounds(),h=this.alpha;this.alpha=1;var o=e.context;i.ceil(r.settings.RESOLUTION);var c=t.RenderTexture.create(i.width,i.height),l="cacheAsBitmap_"+(0,s.uid)();this._cacheData.textureCacheId=l,t.BaseTexture.addToCache(c.baseTexture,l),t.Texture.addToCache(c,l);var d=n;this.transform.localTransform.copyTo(d),d.invert(),d.tx-=i.x,d.ty-=i.y,this.renderCanvas=this._cacheData.originalRenderCanvas,e.render(this,c,!0,d,!1),e.context=o,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var p=new a.Sprite(c);p.transform.worldTransform=this.transform.worldTransform,p.anchor.x=-i.x/i.width,p.anchor.y=-i.y/i.height,p.alpha=h,p._bounds=this._bounds,this._cacheData.sprite=p,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=e._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=p.containsPoint.bind(p)}},e.DisplayObject.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._lastBoundsID=this._boundsID},e.DisplayObject.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds()},e.DisplayObject.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,t.BaseTexture.removeFromCache(this._cacheData.textureCacheId),t.Texture.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},e.DisplayObject.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)}; },{"@pixi/core":"p2j5","@pixi/sprite":"ueA8","@pixi/display":"nL3p","@pixi/math":"oNQC","@pixi/utils":"G5Tu","@pixi/settings":"t4Uo"}],"CSWr":[function(require,module,exports) { "use strict";var e=require("@pixi/display");e.DisplayObject.prototype.name=null,e.Container.prototype.getChildByName=function(e){for(var i=0;i>16)+(65280&t)+((255&t)<<16),this._colorDirty=!0)},a.tint.get=function(){return this._tint},i.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var t=this.texture.baseTexture;(0,s.premultiplyTintToRgba)(this._tint,this._alpha,this.uniforms.uColor,t.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},Object.defineProperties(i.prototype,a),i}(t.Shader);exports.MeshMaterial=f;var p=function(e){function i(i,a,s){e.call(this);var n=new t.Buffer(i),o=new t.Buffer(a,!0),u=new t.Buffer(s,!0,!0);this.addAttribute("aVertexPosition",n,2,!1,r.TYPES.FLOAT).addAttribute("aTextureCoord",o,2,!1,r.TYPES.FLOAT).addIndex(u),this._updateId=-1}e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i;var a={vertexDirtyId:{configurable:!0}};return a.vertexDirtyId.get=function(){return this.buffers[0]._updateID},Object.defineProperties(i.prototype,a),i}(t.Geometry);exports.MeshGeometry=p; },{"@pixi/core":"p2j5","@pixi/math":"oNQC","@pixi/constants":"LQBK","@pixi/display":"nL3p","@pixi/settings":"t4Uo","@pixi/utils":"G5Tu"}],"kDGc":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SimpleRope=exports.SimplePlane=exports.SimpleMesh=exports.RopeGeometry=exports.PlaneGeometry=exports.NineSlicePlane=void 0;var t=require("@pixi/mesh"),e=require("@pixi/constants"),i=require("@pixi/core"),r=function(t){function e(e,i,r,h){void 0===e&&(e=100),void 0===i&&(i=100),void 0===r&&(r=10),void 0===h&&(h=10),t.call(this),this.segWidth=r,this.segHeight=h,this.width=e,this.height=i,this.build()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.build=function(){for(var t=this.segWidth*this.segHeight,e=[],i=[],r=[],h=this.segWidth-1,o=this.segHeight-1,s=this.width/h,a=this.height/o,n=0;n0){var g=a.x-t[p].x,f=a.y-t[p].y,c=Math.sqrt(g*g+f*f);a=t[p],s+=c/n}else s=p/(u-1);h[d]=s,h[d+1]=0,h[d+2]=s,h[d+3]=1}for(var l=0,_=0;_0?this.textureScale*this.width/2:this.width/2;r/=p,h/=p,r*=d,h*=d,o[u]=n.x+r,o[u+1]=n.y+h,o[u+2]=n.x-r,o[u+3]=n.y-h,i=n}this.buffers[0].update()}},e.prototype.update=function(){this.textureScale>0?this.build():this.updateVertices()},e}(t.MeshGeometry);exports.RopeGeometry=h;var o=function(i){function r(r,o,s){void 0===s&&(s=0);var a=new h(r.height,o,s),n=new t.MeshMaterial(r);s>0&&(r.baseTexture.wrapMode=e.WRAP_MODES.REPEAT),i.call(this,a,n),this.autoUpdate=!0}return i&&(r.__proto__=i),r.prototype=Object.create(i&&i.prototype),r.prototype.constructor=r,r.prototype._render=function(t){(this.autoUpdate||this.geometry.width!==this.shader.texture.height)&&(this.geometry.width=this.shader.texture.height,this.geometry.update()),i.prototype._render.call(this,t)},r}(t.Mesh);exports.SimpleRope=o;var s=function(e){function h(h,o,s){var a=new r(h.width,h.height,o,s),n=new t.MeshMaterial(i.Texture.WHITE);e.call(this,a,n),this.texture=h}e&&(h.__proto__=e),h.prototype=Object.create(e&&e.prototype),h.prototype.constructor=h;var o={texture:{configurable:!0}};return h.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this.geometry.width=this.shader.texture.width,this.geometry.height=this.shader.texture.height,this.geometry.build()},o.texture.set=function(t){this.shader.texture!==t&&(this.shader.texture=t,this._textureID=-1,t.baseTexture.valid?this.textureUpdated():t.once("update",this.textureUpdated,this))},o.texture.get=function(){return this.shader.texture},h.prototype._render=function(t){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),e.prototype._render.call(this,t)},Object.defineProperties(h.prototype,o),h}(t.Mesh);exports.SimplePlane=s;var a=function(e){function r(r,h,o,s,a){void 0===r&&(r=i.Texture.EMPTY);var n=new t.MeshGeometry(h,o,s);n.getBuffer("aVertexPosition").static=!1;var u=new t.MeshMaterial(r);e.call(this,n,u,null,a),this.autoUpdate=!0}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var h={vertices:{configurable:!0}};return h.vertices.get=function(){return this.geometry.getBuffer("aVertexPosition").data},h.vertices.set=function(t){this.geometry.getBuffer("aVertexPosition").data=t},r.prototype._render=function(t){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),e.prototype._render.call(this,t)},Object.defineProperties(r.prototype,h),r}(t.Mesh);exports.SimpleMesh=a;var n=10,u=function(t){function e(e,r,h,o,s){t.call(this,i.Texture.WHITE,4,4),this._origWidth=e.orig.width,this._origHeight=e.orig.height,this._width=this._origWidth,this._height=this._origHeight,this._leftWidth=void 0!==r?r:n,this._rightWidth=void 0!==o?o:n,this._topHeight=void 0!==h?h:n,this._bottomHeight=void 0!==s?s:n,this.texture=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={vertices:{configurable:!0},width:{configurable:!0},height:{configurable:!0},leftWidth:{configurable:!0},rightWidth:{configurable:!0},topHeight:{configurable:!0},bottomHeight:{configurable:!0}};return e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},r.vertices.get=function(){return this.geometry.getBuffer("aVertexPosition").data},r.vertices.set=function(t){this.geometry.getBuffer("aVertexPosition").data=t},e.prototype.updateHorizontalVertices=function(){var t=this.vertices,e=this._topHeight+this._bottomHeight,i=this._height>e?1:this._height/e;t[9]=t[11]=t[13]=t[15]=this._topHeight*i,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight*i,t[25]=t[27]=t[29]=t[31]=this._height},e.prototype.updateVerticalVertices=function(){var t=this.vertices,e=this._leftWidth+this._rightWidth,i=this._width>e?1:this._width/e;t[2]=t[10]=t[18]=t[26]=this._leftWidth*i,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth*i,t[6]=t[14]=t[22]=t[30]=this._width},r.width.get=function(){return this._width},r.width.set=function(t){this._width=t,this._refresh()},r.height.get=function(){return this._height},r.height.set=function(t){this._height=t,this._refresh()},r.leftWidth.get=function(){return this._leftWidth},r.leftWidth.set=function(t){this._leftWidth=t,this._refresh()},r.rightWidth.get=function(){return this._rightWidth},r.rightWidth.set=function(t){this._rightWidth=t,this._refresh()},r.topHeight.get=function(){return this._topHeight},r.topHeight.set=function(t){this._topHeight=t,this._refresh()},r.bottomHeight.get=function(){return this._bottomHeight},r.bottomHeight.set=function(t){this._bottomHeight=t,this._refresh()},e.prototype._refresh=function(){var t=this.texture,e=this.geometry.buffers[1].data;this._origWidth=t.orig.width,this._origHeight=t.orig.height;var i=1/this._origWidth,r=1/this._origHeight;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1,e[2]=e[10]=e[18]=e[26]=i*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-i*this._rightWidth,e[9]=e[11]=e[13]=e[15]=r*this._topHeight,e[17]=e[19]=e[21]=e[23]=1-r*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()},Object.defineProperties(e.prototype,r),e}(s);exports.NineSlicePlane=u; },{"@pixi/mesh":"Ihaq","@pixi/constants":"LQBK","@pixi/core":"p2j5"}],"GC82":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AnimatedSprite=void 0;var t=require("@pixi/core"),e=require("@pixi/sprite"),r=require("@pixi/ticker"),i=function(e){function i(r,i){e.call(this,r[0]instanceof t.Texture?r[0]:r[0].texture),this._textures=null,this._durations=null,this.textures=r,this._autoUpdate=!1!==i,this.animationSpeed=1,this.loop=!0,this.updateAnchor=!1,this.onComplete=null,this.onFrameChange=null,this.onLoop=null,this._currentTime=0,this.playing=!1}e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i;var s={totalFrames:{configurable:!0},textures:{configurable:!0},currentFrame:{configurable:!0}};return i.prototype.stop=function(){this.playing&&(this.playing=!1,this._autoUpdate&&r.Ticker.shared.remove(this.update,this))},i.prototype.play=function(){this.playing||(this.playing=!0,this._autoUpdate&&r.Ticker.shared.add(this.update,this,r.UPDATE_PRIORITY.HIGH))},i.prototype.gotoAndStop=function(t){this.stop();var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()},i.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture(),this.play()},i.prototype.update=function(t){var e=this.animationSpeed*t,r=this.currentFrame;if(null!==this._durations){var i=this._currentTime%1*this._durations[this.currentFrame];for(i+=e/60*1e3;i<0;)this._currentTime--,i+=this._durations[this.currentFrame];var s=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);i>=this._durations[this.currentFrame];)i-=this._durations[this.currentFrame]*s,this._currentTime+=s;this._currentTime+=i/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):r!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramer&&this.onLoop()),this.updateTexture())},i.prototype.updateTexture=function(){this._texture=this._textures[this.currentFrame],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame)},i.prototype.destroy=function(t){this.stop(),e.prototype.destroy.call(this,t),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},i.fromFrames=function(e){for(var r=[],s=0;s128)throw new Error("Only flag values between 1-128 are supported");var e=this.getFlagIndex(t),s=1<128)throw new Error("Flag at unsupported index");var s=this.getFlagIndex(e),a=1<=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},e=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,r=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});var i=n(require("./flags")),o=function(){function n(t,e){this._id=0,this._stateId=0,this._pixiObj=null,this._scene=null,this._tags=new Set,this.flags=new i.default,this.components=new Map,this.attributes=new Map,this.componentsToAdd=new Array,this._id=n.idCounter++,this._pixiObj=e,this._pixiObj.name=t}return Object.defineProperty(n.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pixiObj",{get:function(){return this._pixiObj},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scene",{get:function(){return this._scene},set:function(t){this._scene=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"rawAttributes",{get:function(){return this.attributes},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"rawComponents",{get:function(){return this.components},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tags",{get:function(){return new Set(this._tags)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isOnScene",{get:function(){return null!==this.scene},enumerable:!0,configurable:!0}),n.prototype.getAllFlags=function(){return this.flags.getAllFlags()},n.prototype.addComponent=function(t,e){if(void 0===e&&(e=!1),e){if(!this.isOnScene)throw new Error("This object hasn't been added to the scene yet");this.initComponent(t),t.onUpdate(this.scene.currentDelta,this.scene.currentAbsolute)}else this.componentsToAdd.push(t)},n.prototype.removeComponent=function(t){t.isRunning&&(t._isFinished=!0,t.onFinish()),t.onRemove(),t._lastUpdate=0,t.owner=null,this.components.delete(t.id),this.isOnScene&&this.scene._onComponentRemoved(t,this)},n.prototype.removeAllComponents=function(){var n,i;try{for(var o=t(this.components),r=o.next();!r.done;r=o.next()){var s=e(r.value,2)[1];this.removeComponent(s)}}catch(a){n={error:a}}finally{try{r&&!r.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},n.prototype.findComponentByName=function(n){var i,o;try{for(var r=t(this.components),s=r.next();!s.done;s=r.next()){var a=e(s.value,2)[1];if(a.name===n)return a}}catch(h){i={error:h}}finally{try{s&&!s.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return null},n.prototype.assignAttribute=function(t,e){if(this.attributes.has(t)){var n=this.attributes.get(t);this.attributes.set(t,e),this.isOnScene&&this.scene._onAttributeChanged(t,n,e,this)}else this.attributes.set(t,e),this.isOnScene&&this.scene._onAttributeAdded(t,e,this)},n.prototype.getAttribute=function(t){return this.attributes.get(t)},n.prototype.removeAttribute=function(t){if(this.attributes.has(t)){var e=this.attributes.get(t);return this.attributes.delete(t),this.isOnScene&&this.scene._onAttributeRemoved(t,e,this),!0}return!1},n.prototype.addTag=function(t){this._tags.add(t),this.isOnScene&&this.scene._onTagAdded(t,this)},n.prototype.removeTag=function(t){this._tags.has(t)&&(this._tags.delete(t),this.isOnScene&&this.scene._onTagRemoved(t,this))},n.prototype.hasTag=function(t){return this._tags.has(t)},n.prototype.setFlag=function(t){this.flags.setFlag(t),this.isOnScene&&this.scene._onFlagChanged(t,!0,this)},n.prototype.resetFlag=function(t){this.flags.resetFlag(t),this.isOnScene&&this.scene._onFlagChanged(t,!1,this)},n.prototype.hasFlag=function(t){return this.flags.hasFlag(t)},n.prototype.invertFlag=function(t){this.flags.invertFlag(t),this.isOnScene&&this.scene._onFlagChanged(t,this.flags.hasFlag(t),this)},Object.defineProperty(n.prototype,"stateId",{get:function(){return this._stateId},set:function(t){var e=this.stateId;this._stateId=t,this.isOnScene&&this.scene._onStateChanged(e,t,this)},enumerable:!0,configurable:!0}),n.prototype.onChildAdded=function(t){this.scene._onObjectAdded(t)},n.prototype.onChildRemoved=function(t){t.removeAllComponents(),this.scene._onObjectRemoved(t)},n.prototype.update=function(n,i){var o,r,s,a;this.initAllComponents();try{for(var h=t(this.components),u=h.next();!u.done;u=h.next()){var l=e(u.value,2)[1];if(l.isRunning)if(0===l.frequency)l.onUpdate(n,i),l._lastUpdate=i;else if(i-l._lastUpdate>=1e3/l.frequency){var c=0===l._lastUpdate?1e3/l.frequency:i-l._lastUpdate;l.onUpdate(c,i),l._lastUpdate=i}}}catch(y){o={error:y}}finally{try{u&&!u.done&&(r=h.return)&&r.call(h)}finally{if(o)throw o.error}}try{for(var p=t(this.pixiObj.children),d=p.next();!d.done;d=p.next()){var f=d.value;f&&f._proxy&&f._proxy.update(n,i)}}catch(g){s={error:g}}finally{try{d&&!d.done&&(a=p.return)&&a.call(p)}finally{if(s)throw s.error}}},n.prototype.initAllComponents=function(){var t=this;0!==this.componentsToAdd.length&&(this.componentsToAdd.forEach(function(e){return t.initComponent(e)}),this.componentsToAdd=[])},n.prototype.initComponent=function(t){if(!this.isOnScene)throw new Error("The object must be on the scene before its components are initialized");if(null!==t.owner)throw new Error("The component "+t.name+":"+t.id+" seems to already have a game object assigned!");t.owner=this.pixiObj,this.components.set(t.id,t),this.scene._onComponentAdded(t,this),t._isFinished=!1,t.onInit()},n.idCounter=0,n}();exports.default=o; },{"./flags":"rNXP"}],"Sn3S":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function o(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),r=this&&this.__read||function(t,r){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var o,n,i=e.call(t),p=[];try{for(;(void 0===r||r-- >0)&&!(o=i.next()).done;)p.push(o.value)}catch(a){n={error:a}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(n)throw n.error}}return p},e=this&&this.__spread||function(){for(var t=[],e=0;e=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var r={};if(null!=t)for(var e in t)Object.hasOwnProperty.call(t,e)&&(r[e]=t[e]);return r.default=t,r};Object.defineProperty(exports,"__esModule",{value:!0});var p=n(require("./game-object-proxy")),a=i(require("pixi.js")),y=function(r){function n(t){void 0===t&&(t="");var e=r.call(this)||this;return e._proxy=new p.default(t,e),e}return t(n,r),Object.defineProperty(n.prototype,"id",{get:function(){return this._proxy.id},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pixiObj",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scene",{get:function(){return this._proxy.scene},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentGameObject",{get:function(){return this.parent},enumerable:!0,configurable:!0}),n.prototype.asContainer=function(){return this},n.prototype.asParticleContainer=function(){throw new Error("Can't cast this object to particle container!")},n.prototype.asSprite=function(){throw new Error("Can't cast this object to sprite!")},n.prototype.asTilingSprite=function(){throw new Error("Can't cast this object to tiling sprite!")},n.prototype.asText=function(){throw new Error("Can't cast this object to text!")},n.prototype.asBitmapText=function(){throw new Error("Can't cast this object to bitmap text!")},n.prototype.asGraphics=function(){throw new Error("Can't cast this object to graphics")},n.prototype.asMesh=function(){throw new Error("Can't cast this object to mesh")},n.prototype.addChild=function(){for(var t,n,i=[],p=0;p=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},e=this&&this.__read||function(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var r,s,n=i.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(s)throw s.error}}return o},i=this&&this.__spread||function(){for(var t=[],i=0;i=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var n=t(require("./message")),i=function(){function t(){this.owner=null,this.scene=null,this.removeWhenFinished=!0,this._isFinished=!1,this._id=0,this._id=t.idCounter++,this.frequency=0,this._lastUpdate=0}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name||this.constructor.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRunning",{get:function(){return!this._isFinished},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isFinished",{get:function(){return this._isFinished},enumerable:!0,configurable:!0}),t.prototype.onInit=function(){},t.prototype.onMessage=function(e){},t.prototype.onUpdate=function(e,t){},t.prototype.onRemove=function(){},t.prototype.onFinish=function(){},t.prototype.subscribe=function(){for(var t,n,i=[],o=0;o=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},n=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,i=n.call(e),d=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)d.push(o.value)}catch(l){r={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return d},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var r=o(require("../engine/component")),i=require("../engine/constants"),d=function(o){function r(){var e=null!==o&&o.apply(this,arguments)||this;return e.debugElement=null,e.msgElement=null,e}return e(r,o),r.prototype.onInit=function(){this.initDebugWindow(),this.subscribe(i.Messages.ANY)},r.prototype.onMessage=function(e){if(-1===[i.Messages.COMPONENT_ADDED,i.Messages.COMPONENT_REMOVED,i.Messages.OBJECT_ADDED,i.Messages.OBJECT_REMOVED].indexOf(e.action)){var t=document.createElement("tr"),n=document.createElement("td"),o=document.createElement("td"),r=document.createElement("td"),d=document.createElement("td");n.style.color="black",o.style.color="red",r.style.color="blue",d.style.color="green",n.innerText=(this.scene.currentAbsolute/1e3).toFixed(2),o.innerText=e.action,r.innerText=e.component?e.component.name:"n/a",d.innerText=e.gameObject?e.gameObject.name:"n/a",t.appendChild(n),t.appendChild(o),t.appendChild(r),t.appendChild(d),this.msgElement.insertBefore(t,this.msgElement.childNodes[0])}e.action===i.Messages.OBJECT_ADDED?this.addGameObject(e.gameObject):e.action===i.Messages.COMPONENT_ADDED?this.addComponent(e.component,e.gameObject):e.action===i.Messages.COMPONENT_REMOVED?this.removeComponent(e.component,e.gameObject):e.action===i.Messages.OBJECT_REMOVED?document.getElementById("node_"+e.gameObject.id).remove():e.action===i.Messages.SCENE_CLEAR&&(this.debugElement.innerHTML="")},r.prototype.onUpdate=function(e,t){},r.prototype.addGameObject=function(e){var o,r,i,d,l=this.getObjectId(e),a=document.getElementById(l);if(!a){if(null!==e.pixiObj.parent){var c=document.createElement("ul");a=document.createElement("li"),c.appendChild(a),a.id=this.getObjectId(e);var s=document.getElementById(this.getObjectId(e.pixiObj.parent));null==s&&(this.addGameObject(e.parentGameObject),s=document.getElementById(this.getObjectId(e.pixiObj.parent))),s.appendChild(c)}else(a=document.createElement("li")).id=this.getObjectId(e),this.debugElement.childNodes[0].appendChild(a);var m=document.createElement("span");m.style.color="red",m.innerText=e.id+":"+e.name,a.appendChild(m);try{for(var u=t(["components"]),p=u.next();!p.done;p=u.next()){var y=p.value,h=document.createElement("ul");h.id=this.getObjectId(e)+"_"+y,a.appendChild(h)}}catch(b){o={error:b}}finally{try{p&&!p.done&&(r=u.return)&&r.call(u)}finally{if(o)throw o.error}}try{for(var g=t(e._proxy.rawComponents),f=g.next();!f.done;f=g.next()){var E=n(f.value,2)[1];this.addComponent(E,e)}}catch(O){i={error:O}}finally{try{f&&!f.done&&(d=g.return)&&d.call(g)}finally{if(i)throw i.error}}}},r.prototype.removeGameObject=function(e){document.getElementById(this.getObjectId(e)).remove()},r.prototype.addComponent=function(e,t){null===document.getElementById(this.getObjectId(t))&&this.addGameObject(t);var n=document.getElementById(this.getComponentSectionId(t)),o=document.createElement("li"),r=document.createElement("span");r.style.color="blue",o.id=this.getComponentId(e),n.appendChild(o),o.appendChild(r),r.innerText=e.name},r.prototype.removeComponent=function(e,t){document.getElementById(this.getComponentId(e)).remove()},r.prototype.getObjectId=function(e){return"node_"+e.id},r.prototype.getObjectInfoSectionId=function(e){return"node_"+e.id+"_info"},r.prototype.getComponentSectionId=function(e){return"node_"+e.id+"_components"},r.prototype.getComponentId=function(e){return"cmp_"+e.id},r.prototype.initDebugWindow=function(){var e=document.getElementById("debug");e||((e=document.createElement("div")).id="debug",e.style.width="500px",e.style.height="700px",e.style.overflow="scroll",e.style.cssFloat="left",e.style.backgroundColor="#FFF",e.style.fontFamily="'Courier New', monospace",document.getElementsByTagName("body")[0].appendChild(e)),e.innerHTML="";var t=document.createElement("ul");e.appendChild(t);var n=document.getElementById("debug_msg");if(!n){(n=document.createElement("div")).id="debug_msg",n.style.width="500px",n.style.height="700px",n.style.overflow="scroll",n.style.cssFloat="left",n.style.backgroundColor="#FFF",n.style.fontFamily="'Courier New', monospace";var o=document.createElement("table");n.appendChild(o),document.getElementsByTagName("body")[0].appendChild(n)}this.debugElement=e,this.msgElement=n.children[0]},r}(r.default);exports.default=d; },{"../engine/component":"pk3I","../engine/constants":"JhNs"}],"TQ1f":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(){return function(){}}();exports.QueryCondition=e,exports.queryConditionCheck=function(e,o){return!!e&&((void 0===o.ownerId||e.id===o.ownerId)&&((void 0===o.ownerName||e.name===o.ownerName)&&(!(void 0!==o.ownerTag&&!e.hasTag(o.ownerTag))&&((void 0===o.ownerState||e.stateId===o.ownerState)&&!(void 0!==o.ownerFlag&&!e.hasFlag(o.ownerFlag))))))}; },{}],"IfSq":[function(require,module,exports) { "use strict";var e=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},t=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,s,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)o.push(i.value)}catch(r){s={error:r}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(s)throw s.error}}return o},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var i=n(require("./message")),s=require("./constants"),a=require("./game-object"),o=require("../utils/lookup-map"),r=n(require("../components/debug-component")),c=require("../utils/query-condition"),l=function(){return function(){this.delay=0,this.time=0,this.action=null}}(),g=function(){function n(e,t,n){this.stage=null,this.componentNotifyDisabled=!1,this.name=e,this.subscribers=new o.LookupMap,this.gameObjects=new Map,this.initConfig(n),this.app=t,this.clearScene()}return Object.defineProperty(n.prototype,"currentDelta",{get:function(){return this._currentDelta},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"currentAbsolute",{get:function(){return this._currentAbsolute},enumerable:!0,configurable:!0}),n.prototype.invokeWithDelay=function(e,t){this.pendingInvocations.push({delay:e,time:0,action:t})},n.prototype.addGlobalComponent=function(e,t){void 0===t&&(t=!1),this.stage.addComponent(e,t)},n.prototype.findGlobalComponentByName=function(e){return this.stage.findComponentByName(e)},n.prototype.removeGlobalComponent=function(e){this.stage.removeComponent(e)},n.prototype.assignGlobalAttribute=function(e,t){this.stage.assignAttribute(e,t)},n.prototype.getGlobalAttribute=function(e){return this.stage.getAttribute(e)},n.prototype.removeGlobalAttribute=function(e){return this.stage.removeAttribute(e)},n.prototype.getObjectById=function(e){return this.gameObjects.has(e)?this.gameObjects.get(e):null},n.prototype.findObjectsByQuery=function(n){var i,s,a=[];try{for(var o=e(this.gameObjects),r=o.next();!r.done;r=o.next()){var l=t(r.value,2)[1];c.queryConditionCheck(l,n)&&a.push(l)}}catch(g){i={error:g}}finally{try{r&&!r.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}return a},n.prototype.findObjectsByName=function(e){if(!this.config.namesSearchEnabled)throw new Error("Searching by name is not enabled. See SceneConfig");return this.gameObjectNames.findAll(e)},n.prototype.findObjectByName=function(e){if(!this.config.namesSearchEnabled)throw new Error("Searching by name is not enabled. See SceneConfig");return this.gameObjectNames.findFirst(e)},n.prototype.findObjectsByTag=function(e){if(!this.config.tagsSearchEnabled)throw new Error("Searching by tag is not enabled. See SceneConfig");return this.gameObjectTags.findAll(e)},n.prototype.findObjectByTag=function(e){if(!this.config.tagsSearchEnabled)throw new Error("Searching by tag is not enabled. See SceneConfig");return this.gameObjectTags.findFirst(e)},n.prototype.findObjectsByFlag=function(e){if(!this.config.flagsSearchEnabled)throw new Error("Searching by flags is not enabled. See SceneConfig");return this.gameObjectFlags.findAll(e)},n.prototype.findObjectByFlag=function(e){if(!this.config.flagsSearchEnabled)throw new Error("Searching by flags is not enabled. See SceneConfig");return this.gameObjectFlags.findFirst(e)},n.prototype.findObjectsByState=function(e){if(!this.config.statesSearchEnabled)throw new Error("Searching by states is not enabled. See SceneConfig");return this.gameObjectStates.findAll(e)},n.prototype.findObjectByState=function(e){if(!this.config.statesSearchEnabled)throw new Error("Searching by states is not enabled. See SceneConfig");return this.gameObjectStates.findFirst(e)},n.prototype.sendMessage=function(e){this.subscribers.findAll(e.action).forEach(function(t){e.expired||null!=e.component&&e.component.id===t.id||t.onMessage(e)}),this.subscribers.findAll(s.Messages.ANY).forEach(function(t){return t.onMessage(e)})},n.prototype.clearSceneAsync=function(e){var t=this;this.invokeWithDelay(0,function(){return t.clearScene(e)})},n.prototype.clearScene=function(n){var c,l,g,h;if(this.updating)throw new Error("Scene can't be cleared during update. Use invokeWithDelay() instead!");this.sendMessage(new i.default(s.Messages.SCENE_CLEAR,null,null,this.name));try{for(var u=e(this.gameObjects),f=u.next();!f.done;f=u.next()){var b=t(f.value,2)[1];try{for(var d=(g=void 0,e(b._proxy.rawComponents)),p=d.next();!p.done;p=d.next()){var m=t(p.value,2)[1];m.isRunning&&(m._isFinished=!0,m.onFinish()),m.onRemove(),m.owner=null}}catch(O){g={error:O}}finally{try{p&&!p.done&&(h=d.return)&&h.call(d)}finally{if(g)throw g.error}}}}catch(E){c={error:E}}finally{try{f&&!f.done&&(l=u.return)&&l.call(u)}finally{if(c)throw c.error}}n&&this.initConfig(n),this.subscribers.clear(),this.config.namesSearchEnabled&&(this.gameObjectNames?this.gameObjectNames.clear():this.gameObjectNames=new o.LookupMap),this.config.statesSearchEnabled&&(this.gameObjectStates?this.gameObjectStates.clear():this.gameObjectStates=new o.LookupMap),this.config.tagsSearchEnabled&&(this.gameObjectTags?this.gameObjectTags.clear():this.gameObjectTags=new o.LookupMap),this.config.flagsSearchEnabled&&(this.gameObjectFlags?this.gameObjectFlags.clear():this.gameObjectFlags=new o.LookupMap),this.sceneCleared=!0,this.gameObjects.clear(),this.pendingInvocations=[],this._currentDelta=this._currentAbsolute=0;var y=new a.Container("stage");this.app.stage=y,y._proxy.scene=this,this.stage=y,this.config.debugEnabled&&this.addGlobalComponent(new r.default,!0),this._onObjectAdded(y._proxy)},n.prototype._update=function(e,t){this.sceneCleared&&(this.sceneCleared=!1),this._currentDelta=e,this._currentAbsolute=t,this.updating=!0,this.stage._proxy.update(e,t),this.updating=!1;for(var n=this.pendingInvocations.length;n--;){var i=this.pendingInvocations[n];if(i.time+=e,i.time>=i.delay&&(this.pendingInvocations.splice(n,1),i.action(),this.sceneCleared))break}},n.prototype._subscribeComponent=function(e,t){this.subscribers.insert(e,t)},n.prototype._unsubscribeComponent=function(e,t){this.subscribers.remove(e,t)},n.prototype._onObjectAdded=function(e){var t=this,n=e.pixiObj;this.config.namesSearchEnabled&&this.gameObjectNames.insert(n.name,n),this.config.flagsSearchEnabled&&e.getAllFlags().forEach(function(e){return t.gameObjectFlags.insert(e,n)}),this.config.tagsSearchEnabled&&e.tags.forEach(function(e){return t.gameObjectTags.insert(e,n)}),this.config.statesSearchEnabled&&this.gameObjectStates.insert(n.stateId,n),this.gameObjects.set(e.id,e.pixiObj),e.scene=this,this.componentNotifyDisabled=!0,e.initAllComponents(),this.componentNotifyDisabled=!1,this.sendMessage(new i.default(s.Messages.OBJECT_ADDED,null,n))},n.prototype._onObjectRemoved=function(e){var t=e.pixiObj;this.config.namesSearchEnabled&&this.gameObjectNames.remove(t.name,t),this.config.flagsSearchEnabled&&this.gameObjectFlags.removeItem(t),this.config.statesSearchEnabled&&this.gameObjectStates.removeItem(t),this.config.tagsSearchEnabled&&this.gameObjectTags.removeItem(t),this.gameObjects.delete(e.id),this.sendMessage(new i.default(s.Messages.OBJECT_REMOVED,null,t))},n.prototype._onComponentAdded=function(e,t){e.scene=this,this.componentNotifyDisabled||this.sendMessage(new i.default(s.Messages.COMPONENT_ADDED,e,t.pixiObj))},n.prototype._onComponentRemoved=function(e,t){this.subscribers.removeItem(e),this.sendMessage(new i.default(s.Messages.COMPONENT_REMOVED,e,t.pixiObj))},n.prototype._onStateChanged=function(e,t,n){if(this.config.statesSearchEnabled&&(this.gameObjectStates.remove(e,n.pixiObj),this.gameObjectStates.insert(t,n.pixiObj)),this.config.notifyStateChanges){var a={previous:e,current:t};this.sendMessage(new i.default(s.Messages.STATE_CHANGED,null,n.pixiObj,a))}},n.prototype._onAttributeAdded=function(e,t,n){if(this.config.notifyAttributeChanges){var a={key:e,type:s.Messages.ATTRIBUTE_ADDED,previousValue:null,currentValue:t};this.sendMessage(new i.default(s.Messages.ATTRIBUTE_ADDED,null,n.pixiObj,a))}},n.prototype._onAttributeChanged=function(e,t,n,a){if(this.config.notifyAttributeChanges){var o={key:e,type:s.Messages.ATTRIBUTE_CHANGED,previousValue:t,currentValue:n};this.sendMessage(new i.default(s.Messages.ATTRIBUTE_CHANGED,null,a.pixiObj,o))}},n.prototype._onAttributeRemoved=function(e,t,n){if(this.config.notifyAttributeChanges){var a={key:e,type:s.Messages.ATTRIBUTE_REMOVED,previousValue:t,currentValue:null};this.sendMessage(new i.default(s.Messages.ATTRIBUTE_REMOVED,null,n.pixiObj,a))}},n.prototype._onFlagChanged=function(e,t,n){if(this.config.flagsSearchEnabled&&(t?this.gameObjectFlags.insert(e,n.pixiObj):this.gameObjectFlags.remove(e,n.pixiObj)),this.config.notifyFlagChanges){var a={flag:e,isSet:t};this.sendMessage(new i.default(s.Messages.FLAG_CHANGED,null,n.pixiObj,a))}},n.prototype._onTagAdded=function(e,t){if(this.config.tagsSearchEnabled&&this.gameObjectTags.insert(e,t.pixiObj),this.config.notifyTagChanges){var n={tag:e,type:s.Messages.TAG_ADDED};this.sendMessage(new i.default(s.Messages.TAG_ADDED,null,t.pixiObj,n))}},n.prototype._onTagRemoved=function(e,t){if(this.config.tagsSearchEnabled&&this.gameObjectTags.remove(e,t.pixiObj),this.config.notifyTagChanges){var n={tag:e,type:s.Messages.TAG_REMOVED};this.sendMessage(new i.default(s.Messages.TAG_REMOVED,null,t.pixiObj,n))}},n.prototype.initConfig=function(e){this.config={flagsSearchEnabled:e&&e.flagsSearchEnabled,namesSearchEnabled:!e||void 0===e.namesSearchEnabled||e.namesSearchEnabled,tagsSearchEnabled:!e||void 0===e.tagsSearchEnabled||e.tagsSearchEnabled,statesSearchEnabled:e&&e.statesSearchEnabled,notifyAttributeChanges:e&&e.notifyAttributeChanges,notifyStateChanges:e&&e.notifyStateChanges,notifyFlagChanges:e&&e.notifyFlagChanges,notifyTagChanges:e&&e.notifyTagChanges,debugEnabled:e&&e.debugEnabled}},n}();exports.default=g; },{"./message":"lHSJ","./constants":"JhNs","./game-object":"Sn3S","../utils/lookup-map":"kihX","../components/debug-component":"owWq","../utils/query-condition":"TQ1f"}],"Vy0Z":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isMobileDevice=function(){return/(iphone|ipod|ipad|android)/gi.test(navigator.userAgent)},exports.isPdfPrint=function(){return window.location.search.match(/print-pdf/gi)},exports.resizeContainer=function(e,t,n){var i,r=!1;window.innerWidth/window.innerHeight>t/n?i=window.innerHeight/n:(i=window.innerWidth/t,r=!0);var o=function(){return setTimeout(function(){window.scrollTo(0,1)},10)};exports.isMobileDevice()&&(document.documentElement.style.setProperty("--vh",.01*window.innerHeight+"px"),window.addEventListener("load",o,!1),window.addEventListener("orientationchange",o,!1));var s="scale("+i+")",d=r?window.innerHeight/2-n/2:(i-1)*n/2;e.style.setProperty("position","absolute"),e.style.setProperty("MozTransform",s),e.style.setProperty("transform",s),e.style.setProperty("WebkitTransform",s),e.style.setProperty("top",d+"px"),e.style.setProperty("left",(i-1)*t/2+(window.innerWidth-t*i)/2+"px")}; },{}],"rHyk":[function(require,module,exports) { "use strict";var t=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var i={};if(null!=t)for(var e in t)Object.hasOwnProperty.call(t,e)&&(i[e]=t[e]);return i.default=t,i},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("pixi.js"));window.PIXI=e;var n=i(require("./scene")),s=require("../utils/functions"),r=function(){function t(t){var i=this;this.app=null,this.lastTime=0,this.gameTime=0,this.scene=null,this.ticker=null,this.resizeHandler=function(t){return s.resizeContainer(i.app.view,i.width,i.height)},this.options=t}return t.prototype.init=function(t,i,s,r,o,a){void 0===r&&(r=1),void 0===a&&(a=!0),this.width=i,this.height=s,this.resizeToScreen=a&&(!o||!o.debugEnabled),(o=o||{}).debugEnabled=o.debugEnabled||/[?&]debug/.test(location.search),this.app=new e.Application({width:i/r,height:s/r,view:t,resolution:r,transparent:!(!this.options||void 0===this.options.transparent)&&this.options.transparent,antialias:!this.options||void 0===this.options.antialias||this.options.antialias,backgroundColor:this.options&&void 0!==this.options.backgroundColor?this.options.backgroundColor:0}),this.scene=new n.default("default",this.app,o),this.resizeToScreen&&this.initResizeHandler(),this.ticker=this.app.ticker,this.ticker.autoStart=!1,this.ticker.stop(),this._running=!0,this.loop(performance.now())},Object.defineProperty(t.prototype,"running",{get:function(){return this._running},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this.app.destroy(!1),this._running=!1,this.resizeToScreen&&window.removeEventListener("resize",this.resizeHandler)},t.prototype.loop=function(t){var i=this,e=Math.min(t-this.lastTime,300);this.lastTime=t,this.gameTime+=e,this.scene._update(e,this.gameTime),this._running&&(this.ticker.update(this.gameTime),requestAnimationFrame(function(t){return i.loop(t)}))},t.prototype.initResizeHandler=function(){var t=this.width,i=this.height;s.resizeContainer(this.app.view,t,i),window.addEventListener("resize",this.resizeHandler)},t}();exports.default=r; },{"pixi.js":"wbEC","./scene":"IfSq","../utils/functions":"Vy0Z"}],"rjqD":[function(require,module,exports) { "use strict";var t=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],r=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},e=this&&this.__read||function(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var r,s,n=i.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(s)throw s.error}}return o},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e};Object.defineProperty(exports,"__esModule",{value:!0});var s,n=require("./game-object"),o=i(require("./component")),a=r(require("pixi.js"));!function(t){t[t.Graphics=0]="Graphics",t[t.Container=1]="Container",t[t.ParticleContainer=2]="ParticleContainer",t[t.Sprite=3]="Sprite",t[t.TilingSprite=4]="TilingSprite",t[t.Text=5]="Text",t[t.BitmapText=6]="BitmapText",t[t.Mesh=7]="Mesh"}(s||(s={}));var h=function(){return function(){}}(),l=function(){function i(t){this.type=s.Container,this.scene=t,this.clear()}return i.prototype.anchor=function(t,e){return"number"==typeof t?(this.anchorX=t,this.anchorY=null!=e?e:this.anchorX):(this.anchorX=t.x,this.anchorY=t.y),this},i.prototype.virtualAnchor=function(t,e){return"number"==typeof t?(this.virtAnchorX=t,this.virtAnchorY=null!=e?e:this.virtAnchorX):(this.virtAnchorX=t.x,this.virtAnchorY=t.y),this},i.prototype.relativePos=function(t,e){return"number"==typeof t?(this.relPosX=t,this.relPosY=null!=e?e:this.relPosX):(this.relPosX=t.x,this.relPosY=t.y),this},i.prototype.localPos=function(t,e){return"number"==typeof t?(this.locPosX=t,this.locPosY=null!=e?e:this.locPosX):(this.locPosX=t.x,this.locPosY=t.y),this},i.prototype.globalPos=function(t,e){return"number"==typeof t?(this.absPosX=t,this.absPosY=null!=e?e:this.absPosX):(this.absPosX=t.x,this.absPosY=t.y),this},i.prototype.scale=function(t,e){return"number"==typeof t?(this.scaleX=t,this.scaleY=null!=e?e:this.scaleX):(this.scaleX=t.x,this.scaleY=t.y),this},i.prototype.withAttribute=function(t,e){return this.attributes.set(t,e),this},i.prototype.withComponent=function(t){return t instanceof o.default?this.components.push(t):this.componentBuilders.push(t),this},i.prototype.withFlag=function(t){return this.flags.push(t),this},i.prototype.withState=function(t){return this.state=t,this},i.prototype.withTag=function(t){return this.tags.add(t),this},i.prototype.withParent=function(t){return this.parent=t,this},i.prototype.withChild=function(t){return this.children.push(t),this},i.prototype.asContainer=function(t){return void 0===t&&(t=""),this.type=s.Container,this.parameters={name:t},this},i.prototype.asGraphics=function(t){return void 0===t&&(t=""),this.type=s.Graphics,this.parameters={name:t},this},i.prototype.asParticleContainer=function(t){return void 0===t&&(t=""),this.type=s.ParticleContainer,this.parameters={name:t},this},i.prototype.asSprite=function(t,e){return void 0===e&&(e=""),this.type=s.Sprite,this.parameters={name:e,texture:t},this},i.prototype.asTilingSprite=function(t,e,i,r){return void 0===r&&(r=""),this.type=s.TilingSprite,this.parameters={name:r,texture:t,width:e,height:i},this},i.prototype.asText=function(t,e,i){return void 0===t&&(t=""),void 0===e&&(e=""),this.type=s.Text,this.parameters={name:t,text:e,fontStyle:i},this},i.prototype.asBitmapText=function(t,e,i,r,n){return void 0===t&&(t=""),void 0===e&&(e=""),this.type=s.BitmapText,this.parameters={name:t,text:e,fontName:i,fontSize:r,fontColor:n},this},i.prototype.asMesh=function(t,e,i){return void 0===t&&(t=""),this.type=s.Mesh,this.parameters={name:t,geometry:e,shader:i},this},i.prototype.buildInto=function(t,e){void 0===e&&(e=!0),this.existingObject=t;var i=this.build(e);return this.existingObject=null,i},i.prototype.build=function(i){var r,o,h,l,c,p,u,f,y,m,d;if(void 0===i&&(i=!0),null!==this.existingObject)d=this.existingObject;else switch(this.type){case s.Container:d=new n.Container(this.parameters.name);break;case s.Graphics:d=new n.Graphics(this.parameters.name);break;case s.ParticleContainer:d=new n.ParticleContainer(this.parameters.name);break;case s.Sprite:d=new n.Sprite(this.parameters.name,this.parameters.texture.clone());break;case s.TilingSprite:d=new n.TilingSprite(this.parameters.name,this.parameters.texture.clone(),this.parameters.width,this.parameters.height);break;case s.Text:(d=new n.Text(this.parameters.name,this.parameters.text)).style=this.parameters.fontStyle;break;case s.BitmapText:d=new n.BitmapText(this.parameters.name,this.parameters.text,this.parameters.fontName,this.parameters.fontSize,this.parameters.fontColor);break;case s.Mesh:d=new n.Mesh(this.parameters.name,this.parameters.geometry,this.parameters.shader)}try{for(var x=t(this.components),v=x.next();!v.done;v=x.next()){var b=v.value;d.addComponent(b)}}catch(q){r={error:q}}finally{try{v&&!v.done&&(o=x.return)&&o.call(x)}finally{if(r)throw r.error}}this.components=[];try{for(var P=t(this.componentBuilders),X=P.next();!X.done;X=P.next()){var Y=X.value;d.addComponent(Y())}}catch(z){h={error:z}}finally{try{X&&!X.done&&(l=P.return)&&l.call(P)}finally{if(h)throw h.error}}try{for(var g=t(this.attributes),w=g.next();!w.done;w=g.next()){var S=e(w.value,2),T=S[0],C=S[1];d.assignAttribute(T,C)}}catch(E){c={error:E}}finally{try{w&&!w.done&&(p=g.return)&&p.call(g)}finally{if(c)throw c.error}}try{for(var j=t(this.flags),O=j.next();!O.done;O=j.next()){var A=O.value;d.setFlag(A)}}catch(F){u={error:F}}finally{try{O&&!O.done&&(f=j.return)&&f.call(j)}finally{if(u)throw u.error}}null!==this.state&&(d.stateId=this.state),0!==this.tags.size&&this.tags.forEach(function(t){return d.addTag(t)});var _,M=d.pixiObj;(null!==this.scaleX&&(M.scale.x=this.scaleX),null!==this.scaleY&&(M.scale.y=this.scaleY),null!==this.relPosX)&&((_=new a.Point).x=this.relPosX*this.scene.app.screen.width/this.scene.stage.scale.x,M.position.x=M.toLocal(_).x,null!==this.scaleX&&(M.position.x*=this.scaleX));null!==this.relPosY&&((_=new a.Point).y=this.relPosY*this.scene.app.screen.height/this.scene.stage.scale.y,M.position.y=M.toLocal(_).y,null!==this.scaleY&&(M.position.y*=this.scaleY));(null!==this.locPosX&&(null!==this.relPosX?M.position.x+=this.locPosX:M.position.x=this.locPosX),null!==this.locPosY&&(null!==this.relPosY?M.position.y+=this.locPosY:M.position.y=this.locPosY),null!==this.absPosX)&&((_=new a.Point).x=this.absPosX,M.position.x=M.toLocal(_,this.scene.stage.pixiObj).x,null!==this.scaleX&&(M.position.x*=this.scaleX));null!==this.absPosY&&((_=new a.Point).y=this.absPosY,M.position.y=M.toLocal(_,this.scene.stage.pixiObj).y,null!==this.scaleY&&(M.position.y*=this.scaleY));if(null!==this.anchorX&&(M instanceof n.Sprite||M instanceof n.Text?M.anchor.x=this.anchorX:M.pivot.x=this.anchorX*M.width),null!==this.anchorY&&(M instanceof n.Sprite||M instanceof n.Text?M.anchor.y=this.anchorY:M.pivot.y=this.anchorY*M.height),null!==this.virtAnchorX){var B=this.virtAnchorX-(null===this.anchorX?0:this.anchorX);M.position.x-=B*M.width}if(null!==this.virtAnchorY){B=this.virtAnchorY-(null===this.anchorY?0:this.anchorY);M.position.y-=B*M.height}null!==this.parent&&this.parent.pixiObj.addChild(d.pixiObj);try{for(var k=t(this.children),G=k.next();!G.done;G=k.next()){var L=G.value.withParent(d).build(i);d.pixiObj.addChild(L.pixiObj)}}catch(I){y={error:I}}finally{try{G&&!G.done&&(m=k.return)&&m.call(k)}finally{if(y)throw y.error}}return i&&this.clear(),d},i.prototype.clear=function(){return this.locPosX=null,this.locPosY=null,this.anchorX=null,this.anchorY=null,this.relPosX=null,this.relPosY=null,this.absPosX=null,this.absPosY=null,this.scaleX=null,this.scaleY=null,this.components=[],this.componentBuilders=[],this.attributes=new Map,this.flags=[],this.state=null,this.tags=new Set,this.virtAnchorX=null,this.virtAnchorY=null,this.parent=null,this.children=[],this.existingObject=null,this.type=s.Container,this.parameters={name:""},this},i}();exports.default=l; },{"./game-object":"Sn3S","./component":"pk3I","pixi.js":"wbEC"}],"z9pI":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){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)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),e=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],i=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});var i=r(require("../engine/component")),n=require("../utils/query-condition"),a=1,s=2,u=3,o=4,h=5,c=6,p=7,m=8,l=9,y=10,d=11,f=12,P=13,g=14,v=15,b=16,k=17,x=18,q=19,N=20,A=21,I=22,w=23,C=function(){function t(){this.topNode=null,this.size=0,this.topNode=null,this.size=0}return t.prototype.push=function(t){this.topNode=t,this.size+=1},t.prototype.pop=function(){var t=this.topNode;return this.topNode=this.topNode.previous,this.size-=1,t},t.prototype.top=function(){return this.topNode},t}(),_=function(){function t(t,e,r,i){void 0===e&&(e=null),void 0===r&&(r=null),void 0===i&&(i=null),this.key=0,this.param1=null,this.param2=null,this.param3=null,this.param1A=null,this.param2A=null,this.param3A=null,this.cached=!1,this.next=null,this.previous=null,this.key=t,this.param1=e,this.param2=r,this.param3=i,this.param1A=null,this.param2A=null,this.param3A=null}return t.prototype.cacheParams=function(){this.cached||(null!=this.param1&&(this.param1A="function"==typeof this.param1?this.param1():this.param1),null!=this.param2&&(this.param2A="function"==typeof this.param2?this.param2():this.param2),null!=this.param3&&(this.param3A="function"==typeof this.param3?this.param3():this.param3),this.cached=!0)},t.prototype.getParam1=function(){return this.cached||this.cacheParams(),this.param1A},t.prototype.setParam1=function(t){this.param1A=t},t.prototype.getParam2=function(){return this.cached||this.cacheParams(),this.param2A},t.prototype.setParam2=function(t){this.param2A=t},t.prototype.getParam3=function(){return this.cached||this.cacheParams(),this.param3A},t.prototype.setParam3=function(t){this.param3A=t},t.prototype.resetCache=function(){this.param1A=this.param2A=this.param3A=null,this.cached=!1},t}(),S=function(r){function i(){var t=null!==r&&r.apply(this,arguments)||this;return t.scopeStack=new C,t.current=null,t.head=null,t.tail=null,t.tmpParam=null,t.tmpParam2=null,t}return t(i,r),i.prototype.beginRepeat=function(t){return this.enqueue(a,t,0===t),this},i.prototype.endRepeat=function(){return this.enqueue(s),this},i.prototype.execute=function(t){return this.enqueue(u,t),this},i.prototype.beginWhile=function(t){return this.enqueue(o,t),this},i.prototype.endWhile=function(){return this.enqueue(h),this},i.prototype.beginInterval=function(t){return this.enqueue(c,t),this},i.prototype.endInterval=function(){return this.enqueue(p),this},i.prototype.beginIf=function(t){return this.enqueue(m,t),this},i.prototype.else=function(){return this.enqueue(l),this},i.prototype.endIf=function(){return this.enqueue(y),this},i.prototype.addComponent=function(t,e){return void 0===e&&(e=null),this.enqueue(f,t,e),this},i.prototype.addComponentAndWait=function(t,e){return void 0===e&&(e=null),this.enqueue(P,t,e),this},i.prototype.addComponentsAndWait=function(t,e){return void 0===e&&(e=null),this.enqueue(w,t,e),this},i.prototype.waitTime=function(t){return this.enqueue(d,t),this},i.prototype.waitForFinish=function(t){return this.enqueue(g,t),this},i.prototype.waitUntil=function(t){return this.enqueue(v,t),this},i.prototype.waitFrames=function(t){return this.enqueue(b,t),this},i.prototype.waitForMessage=function(t){return this.enqueue(k,t),this},i.prototype.waitForMessageConditional=function(t,e){return this.enqueue(x,t,e),this},i.prototype.removeComponent=function(t,e){return void 0===e&&(e=null),this.enqueue(q,t,e),this},i.prototype.removeGameObjectsByQuery=function(t){return this.enqueue(N,t),this},i.prototype.removeGameObject=function(t){return this.enqueue(A,t),this},i.prototype.setState=function(t){return this.enqueue(I,t),this},i.prototype.onMessage=function(t){this.current&&(this.current.key===k&&this.current.param1===t.action||this.current.key===x&&this.current.param1===t.action&&n.queryConditionCheck(t.gameObject,this.current.param2))&&(this.tmpParam2=!0)},i.prototype.onUpdate=function(t,r){var i,n,C,_;if(null!==this.owner)if(null==this.current&&(this.current=this.dequeue()),null!=this.current)switch(this.current.key){case a:this.current.cacheParams(),this.scopeStack.push(this.current),this.gotoNextImmediately(t,r);break;case s:var S=this.scopeStack.pop();S.setParam1(S.getParam1()-1),!0===S.getParam2()||S.getParam1()>0?(this.current=S,this.onUpdate(t,r)):(S.resetCache(),this.gotoNextImmediately(t,r));break;case u:this.current.param1(this),this.gotoNextImmediately(t,r);break;case o:this.scopeStack.push(this.current),this.gotoNextImmediately(t,r);break;case h:var O=this.scopeStack.pop();O.param1()?(this.current=O,this.onUpdate(t,r)):this.gotoNextImmediately(t,r);break;case c:this.current.cached||this.current.cacheParams(),null==this.tmpParam?this.tmpParam=r:r-this.tmpParam>=this.current.getParam1()&&(this.tmpParam=null,this.current.resetCache(),this.scopeStack.push(this.current),this.gotoNextImmediately(t,r));break;case p:this.current=this.scopeStack.pop(),this.onUpdate(t,r);break;case m:if(this.current.param1()){this.gotoNextImmediately(t,r);break}for(var j=1;;)if(this.current=this.dequeue(),this.current.key===m&&j++,this.current.key===y&&j--,1===j&&this.current.key===l||0===j&&this.current.key===y){this.gotoNext();break}this.onUpdate(t,r);break;case l:for(var U=1;;)if(this.current=this.dequeue(),this.current.key===m&&U++,this.current.key===y&&U--,0===U&&this.current.key===y){this.gotoNext();break}this.onUpdate(t,r);break;case y:this.gotoNextImmediately(t,r);break;case d:this.current.cacheParams(),null==this.tmpParam&&(this.tmpParam=r),r-this.tmpParam>this.current.getParam1()&&(this.tmpParam=null,this.current.resetCache(),this.gotoNextImmediately(t,r));break;case f:(null!=this.current.getParam2()?this.current.getParam2():this.owner).addComponent(this.current.getParam1()),this.gotoNextImmediately(t,r);break;case P:if(!this.current.cached)this.current.cacheParams(),(null!=this.current.param2A?this.current.param2A:this.owner).addComponent(this.current.param1A);this.current.getParam1().isRunning||(this.tmpParam=null,this.current.resetCache(),this.gotoNextImmediately(t,r));break;case w:if(!this.current.cached){this.current.cacheParams();var F=null!=this.current.param2A?this.current.param2A:this.owner;try{for(var M=e(this.current.param1A),R=M.next();!R.done;R=M.next()){var z=R.value;F.addComponent(z)}}catch(Q){i={error:Q}}finally{try{R&&!R.done&&(n=M.return)&&n.call(M)}finally{if(i)throw i.error}}}this.current.getParam1().find(function(t){return t.isRunning})||(this.tmpParam=null,this.current.resetCache(),this.gotoNextImmediately(t,r));break;case g:this.current.cached||this.current.cacheParams(),this.current.getParam1().isRunning||(this.current.resetCache(),this.gotoNextImmediately(t,r));break;case v:this.current.param1()||this.gotoNextImmediately(t,r);break;case b:null==this.tmpParam&&(this.tmpParam=0),++this.tmpParam>this.current.param1&&(this.tmpParam=null,this.gotoNextImmediately(t,r));break;case k:case x:!0===this.tmpParam?!0===this.tmpParam2&&(this.unsubscribe(this.current.param1),this.tmpParam=this.tmpParam2=null,this.gotoNextImmediately(t,r)):(this.tmpParam=!0,this.tmpParam2=!1,this.subscribe(this.current.param1));break;case q:(null!=this.current.param2?this.current.param2:this.owner).removeComponentByClass(this.current.param1),this.gotoNextImmediately(t,r);break;case N:var W=this.scene.findObjectsByQuery(this.current.param1);try{for(var B=e(W),G=B.next();!G.done;G=B.next()){G.value.remove()}}catch(T){C={error:T}}finally{try{G&&!G.done&&(_=B.return)&&_.call(B)}finally{if(C)throw C.error}}this.gotoNextImmediately(t,r);break;case A:this.current.param1.remove(),this.gotoNextImmediately(t,r);break;case I:this.state=this.current.param1,this.gotoNextImmediately(t,r)}else this.finish()},i.prototype.enqueue=function(t,e,r,i){void 0===e&&(e=null),void 0===r&&(r=null),void 0===i&&(i=null);var n=new _(t,e,r,i);if(null!=this.current&&this.current!==this.head){var a=this.current.next;this.current.next=n,n.next=a,n.previous=this.current,a.previous=n}else null==this.head?this.head=this.tail=n:(this.tail.next=n,n.previous=this.tail,this.tail=n),null==this.current&&(this.current=this.head)},i.prototype.dequeue=function(){return null==this.current||null==this.current.next?null:(this.current=this.current.next,this.current)},i.prototype.gotoNext=function(){this.current=this.current.next},i.prototype.gotoNextImmediately=function(t,e){this.current=this.current.next,this.onUpdate(t,e)},i}(i.default);exports.default=S; },{"../engine/component":"pk3I","../utils/query-condition":"TQ1f"}],"OHJr":[function(require,module,exports) { "use strict";var n=this&&this.__extends||function(){var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e])})(t,e)};return function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),t=this&&this.__values||function(n){var t="function"==typeof Symbol&&Symbol.iterator,e=t&&n[t],o=0;if(e)return e.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&o>=n.length&&(n=void 0),{value:n&&n[o++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},e=this&&this.__read||function(n,t){var e="function"==typeof Symbol&&n[Symbol.iterator];if(!e)return n;var o,r,i=e.call(n),s=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(a){r={error:a}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(r)throw r.error}}return s},o=this&&this.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(exports,"__esModule",{value:!0});var r=o(require("../engine/component")),i=require("../utils/query-condition"),s=function(o){function r(n){var t=o.call(this)||this;return t.onInitFunc=null,t.onMessageHandlers=new Map,t.onMessageConditionalHandlers=new Map,t.onUpdateFunc=null,t.onRemoveFunc=null,t.onFinishFunc=null,t.timeout=0,t.firstRun=0,t._name=n,t}return n(r,o),Object.defineProperty(r.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),r.prototype.doOnInit=function(n){return this.onInitFunc=n,this},r.prototype.doOnMessage=function(n,t){return this.onMessageHandlers.set(n,{handler:t,onlyOnce:!1}),this},r.prototype.doOnMessageOnce=function(n,t){return this.onMessageHandlers.set(n,{handler:t,onlyOnce:!0}),this},r.prototype.doOnMessageConditional=function(n,t,e){return this.onMessageConditionalHandlers.has(n)||this.onMessageConditionalHandlers.set(n,new Set),this.onMessageConditionalHandlers.get(n).add({onlyOnce:!1,handler:e,condition:t}),this},r.prototype.doOnUpdate=function(n){return this.onUpdateFunc=n,this},r.prototype.doOnRemove=function(n){return this.onRemoveFunc=n,this},r.prototype.doOnFinish=function(n){return this.onFinishFunc=n,this},r.prototype.setFrequency=function(n){return this.frequency=n,this},r.prototype.setTimeout=function(n){return this.timeout=n,this},r.prototype.onInit=function(){var n,o,r,i;null!=this.onInitFunc&&this.onInitFunc(this);try{for(var s=t(this.onMessageHandlers),a=s.next();!a.done;a=s.next()){var u=e(a.value,1)[0];this.subscribe(u)}}catch(h){n={error:h}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}try{for(var l=t(this.onMessageConditionalHandlers),c=l.next();!c.done;c=l.next()){u=e(c.value,1)[0];this.subscribe(u)}}catch(d){r={error:d}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}},r.prototype.onMessage=function(n){var e,o;this.onMessageHandlers.has(n.action)&&((u=this.onMessageHandlers.get(n.action)).handler(this,n),u.onlyOnce&&(this.onMessageHandlers.delete(n.action),this.unsubscribe(n.action)));if(this.onMessageConditionalHandlers.has(n.action)){var r=this.onMessageConditionalHandlers.get(n.action);try{for(var s=t(r),a=s.next();!a.done;a=s.next()){var u=a.value;n.gameObject&&i.queryConditionCheck(n.gameObject,u.condition)&&u.handler(this,n)}}catch(l){e={error:l}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(e)throw e.error}}}},r.prototype.onUpdate=function(n,t){0===this.firstRun&&(this.firstRun=t),0!==this.timeout&&t-this.firstRun>=this.timeout?this.finish():null!=this.onUpdateFunc&&this.onUpdateFunc(this,n,t)},r.prototype.onRemove=function(){null!=this.onRemoveFunc&&this.onRemoveFunc(this)},r.prototype.onFinish=function(){null!=this.onFinishFunc&&this.onFinishFunc(this)},r}(r.default);exports.GenericComponent=s; },{"../engine/component":"pk3I","../utils/query-condition":"TQ1f"}],"X5E7":[function(require,module,exports) { "use strict";var e=this&&this.__extends||function(){var e=function(t,_){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var _ in t)t.hasOwnProperty(_)&&(e[_]=t[_])})(t,_)};return function(t,_){function E(){this.constructor=t}e(t,_),t.prototype=null===_?Object.create(_):(E.prototype=_.prototype,new E)}}(),t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var _,E=t(require("../engine/component"));!function(e){e[e.KEY_LEFT=37]="KEY_LEFT",e[e.KEY_UP=38]="KEY_UP",e[e.KEY_RIGHT=39]="KEY_RIGHT",e[e.KEY_DOWN=40]="KEY_DOWN",e[e.KEY_CTRL=17]="KEY_CTRL",e[e.KEY_ALT=18]="KEY_ALT",e[e.KEY_SPACE=32]="KEY_SPACE",e[e.KEY_SHIFT=16]="KEY_SHIFT",e[e.KEY_ENTER=13]="KEY_ENTER",e[e.KEY_A=65]="KEY_A",e[e.KEY_B=66]="KEY_B",e[e.KEY_C=67]="KEY_C",e[e.KEY_D=68]="KEY_D",e[e.KEY_E=69]="KEY_E",e[e.KEY_F=70]="KEY_F",e[e.KEY_G=71]="KEY_G",e[e.KEY_H=72]="KEY_H",e[e.KEY_I=73]="KEY_I",e[e.KEY_J=74]="KEY_J",e[e.KEY_K=75]="KEY_K",e[e.KEY_L=76]="KEY_L",e[e.KEY_M=77]="KEY_M",e[e.KEY_N=78]="KEY_N",e[e.KEY_O=79]="KEY_O",e[e.KEY_P=80]="KEY_P",e[e.KEY_Q=81]="KEY_Q",e[e.KEY_R=82]="KEY_R",e[e.KEY_S=83]="KEY_S",e[e.KEY_T=84]="KEY_T",e[e.KEY_U=85]="KEY_U",e[e.KEY_V=86]="KEY_V",e[e.KEY_W=87]="KEY_W",e[e.KEY_X=88]="KEY_X",e[e.KEY_Y=89]="KEY_Y",e[e.KEY_Z=90]="KEY_Z"}(_=exports.Keys||(exports.Keys={}));var K=function(t){function _(){var e=t.call(this)||this;return e.keys=new Set,e.onKeyDown=function(t){e.keys.add(t.keyCode)},e.onKeyUp=function(t){e.keys.delete(t.keyCode)},e._name=_.name,e}return e(_,t),_.prototype.onInit=function(){document.addEventListener("keyup",this.onKeyUp,!1),document.addEventListener("keydown",this.onKeyDown,!1)},_.prototype.onRemove=function(){document.removeEventListener("keyup",this.onKeyUp),document.removeEventListener("keydown",this.onKeyDown)},_.prototype.isKeyPressed=function(e){return this.keys.has(e)},_}(E.default);exports.KeyInputComponent=K; },{"../engine/component":"pk3I"}],"wnZQ":[function(require,module,exports) { "use strict";var e=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),t=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},n=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,s=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)a.push(r.value)}catch(o){i={error:o}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return a};Object.defineProperty(exports,"__esModule",{value:!0});var r,i=require("./key-input-component"),s=require("../engine/game-object");!function(e){e[e.UP=0]="UP",e[e.DOWN=1]="DOWN",e[e.RIGHT=2]="RIGHT",e[e.LEFT=3]="LEFT",e[e.X=4]="X",e[e.Y=5]="Y",e[e.A=6]="A",e[e.B=7]="B"}(r=exports.GamepadButtons||(exports.GamepadButtons={}));var a=function(a){function o(e){var t=a.call(this)||this;return t.pressedButtons=new Map,t.renderRequired=!1,t.pointerDown=function(e){var n=e.data.identifier,r=t.getPressedButton(t.getPos(e.data.originalEvent));null!=r&&(t.pressedButtons.set(n,r),t.renderRequired=!0)},t.pointerUp=function(e){var n=e.data.identifier;t.pressedButtons.delete(n),t.renderRequired=!0},t.pointerMove=function(e){var n=e.data.identifier,r=t.getPressedButton(t.getPos(e.data.originalEvent));null!==r?(t.pressedButtons.set(n,r),t.renderRequired=!0):(t.pressedButtons.delete(n),t.renderRequired=!0)},t._name=i.KeyInputComponent.name,t.keyMapper=e,t}return e(o,a),o.prototype.onInit=function(){this.gamePadRenderer=new s.Graphics("gamepad"),this.renderButtons()},o.prototype.renderButtons=function(){this.gamePadRenderer.clear();var e=this.scene.app.screen.width,t=this.scene.app.screen.height,n=.15*e,r=.85*e,i=.75*t,s=.14*t,a=s/1.8;if(!this.buttons){this.buttons=[new PIXI.Rectangle(n-a/2,i-a/2-a,a,a),new PIXI.Rectangle(n-a/2,i-a/2+a,a,a),new PIXI.Rectangle(n-a/2-a,i-a/2,a,a),new PIXI.Rectangle(n-a/2+a,i-a/2,a,a),new PIXI.Rectangle(r-a/2,i-a/2-a,a,a),new PIXI.Rectangle(r-a/2,i-a/2+a,a,a),new PIXI.Rectangle(r-a/2-a,i-a/2,a,a),new PIXI.Rectangle(r-a/2+a,i-a/2,a,a)];var o=1.3*a;this.buttonHitRects=[new PIXI.Rectangle(n-o/2,i-o/2-o,o,o),new PIXI.Rectangle(n-o/2,i-o/2+o,o,o),new PIXI.Rectangle(n-o/2-o,i-o/2,o,o),new PIXI.Rectangle(n-o/2+o,i-o/2,o,o),new PIXI.Rectangle(r-o/2,i-o/2-o,o,o),new PIXI.Rectangle(r-o/2,i-o/2+o,o,o),new PIXI.Rectangle(r-o/2-o,i-o/2,o,o),new PIXI.Rectangle(r-o/2+o,i-o/2,o,o)]}this.gamePadRenderer.beginFill(4473924,.5),this.gamePadRenderer.drawCircle(n,i,s),this.gamePadRenderer.drawRect(n-a/2,i-a/2,a,a),this.gamePadRenderer.beginFill(11184810,this.keys.has(this.keyMapper.KEY_UP)?.8:.5),this.gamePadRenderer.drawRect(this.buttons[0].x,this.buttons[0].y,this.buttons[0].width,this.buttons[0].height),this.gamePadRenderer.beginFill(11184810,this.keys.has(this.keyMapper.KEY_DOWN)?.8:.5),this.gamePadRenderer.drawRect(this.buttons[1].x,this.buttons[1].y,this.buttons[1].width,this.buttons[1].height),this.gamePadRenderer.beginFill(11184810,this.keys.has(this.keyMapper.KEY_LEFT)?.8:.5),this.gamePadRenderer.drawRect(this.buttons[2].x,this.buttons[2].y,this.buttons[2].width,this.buttons[2].height),this.gamePadRenderer.beginFill(11184810,this.keys.has(this.keyMapper.KEY_RIGHT)?.8:.5),this.gamePadRenderer.drawRect(this.buttons[3].x,this.buttons[3].y,this.buttons[3].width,this.buttons[3].height),this.gamePadRenderer.beginFill(11184810,.5),this.gamePadRenderer.drawPolygon([n,i-1.3*a,n+a/3,i-a/1.5,n-a/3,i-a/1.5]),this.gamePadRenderer.drawPolygon([n,i+1.3*a,n+a/3,i+a/1.5,n-a/3,i+a/1.5]),this.gamePadRenderer.drawPolygon([n+1.3*a,i,n+a/1.5,i-a/3,n+a/1.5,i+a/3]),this.gamePadRenderer.drawPolygon([n-1.3*a,i,n-a/1.5,i-a/3,n-a/1.5,i+a/3]),this.gamePadRenderer.beginFill(4473924,.5),this.gamePadRenderer.drawCircle(r,i,s),this.gamePadRenderer.beginFill(this.keyMapper.KEY_B?15328623:4473924,this.keys.has(this.keyMapper.KEY_B)?1:.2),this.gamePadRenderer.drawCircle(r,i-a,a/1.8),this.gamePadRenderer.beginFill(this.keyMapper.KEY_Y?15298415:4473924,this.keys.has(this.keyMapper.KEY_Y)?1:.2),this.gamePadRenderer.drawCircle(r,i+a,a/1.8),this.gamePadRenderer.beginFill(this.keyMapper.KEY_A?7334278:4473924,this.keys.has(this.keyMapper.KEY_A)?1:.2),this.gamePadRenderer.drawCircle(r-a,i,a/1.8),this.gamePadRenderer.beginFill(this.keyMapper.KEY_X?7303657:4473924,this.keys.has(this.keyMapper.KEY_X)?1:.2),this.gamePadRenderer.drawCircle(r+a,i,a/1.8),this.gamePadRenderer.endFill(),this.gamePadRenderer.on("touchstart",this.pointerDown),this.gamePadRenderer.on("touchend",this.pointerUp),this.gamePadRenderer.on("touchendoutside",this.pointerUp),this.gamePadRenderer.on("touchcancel",this.pointerUp),this.gamePadRenderer.on("touchmove",this.pointerMove),this.gamePadRenderer.interactive=!0,this.owner.asContainer().sortableChildren=!0,this.gamePadRenderer.zIndex=1e3,this.owner.asContainer().addChild(this.gamePadRenderer)},o.prototype.onRemove=function(){this.gamePadRenderer.removeListener("touchstart",this.pointerDown),this.gamePadRenderer.removeListener("touchend",this.pointerUp),this.gamePadRenderer.removeListener("touchendoutside",this.pointerUp),this.gamePadRenderer.removeListener("touchcancel",this.pointerUp),this.gamePadRenderer.removeListener("touchmove",this.pointerMove)},o.prototype.onUpdate=function(e,i){var s,a;this.keys.clear();try{for(var o=t(this.pressedButtons),h=o.next();!h.done;h=o.next()){var d=n(h.value,2)[1];d===r.UP&&this.keyMapper.KEY_UP&&this.keys.add(this.keyMapper.KEY_UP),d===r.DOWN&&this.keyMapper.KEY_DOWN&&this.keys.add(this.keyMapper.KEY_DOWN),d===r.LEFT&&this.keyMapper.KEY_LEFT&&this.keys.add(this.keyMapper.KEY_LEFT),d===r.RIGHT&&this.keyMapper.KEY_RIGHT&&this.keys.add(this.keyMapper.KEY_RIGHT),d===r.X&&this.keyMapper.KEY_X&&this.keys.add(this.keyMapper.KEY_X),d===r.Y&&this.keyMapper.KEY_Y&&this.keys.add(this.keyMapper.KEY_Y),d===r.A&&this.keyMapper.KEY_A&&this.keys.add(this.keyMapper.KEY_A),d===r.B&&this.keyMapper.KEY_B&&this.keys.add(this.keyMapper.KEY_B)}}catch(p){s={error:p}}finally{try{h&&!h.done&&(a=o.return)&&a.call(o)}finally{if(s)throw s.error}}this.renderRequired&&(this.renderButtons(),this.renderRequired=!1)},o.prototype.getPos=function(e){var t=this.scene.app.view.getBoundingClientRect(),n=this.scene.app.renderer.resolution,r=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY;return{posX:Math.round((r-t.left)/(t.right-t.left)*this.scene.app.view.width/n),posY:Math.round((i-t.top)/(t.bottom-t.top)*this.scene.app.view.height/n)}},o.prototype.getPressedButton=function(e){return this.buttonHitRects[0].contains(e.posX,e.posY)?r.UP:this.buttonHitRects[1].contains(e.posX,e.posY)?r.DOWN:this.buttonHitRects[2].contains(e.posX,e.posY)?r.LEFT:this.buttonHitRects[3].contains(e.posX,e.posY)?r.RIGHT:this.buttonHitRects[4].contains(e.posX,e.posY)?r.B:this.buttonHitRects[5].contains(e.posX,e.posY)?r.Y:this.buttonHitRects[6].contains(e.posX,e.posY)?r.A:this.buttonHitRects[7].contains(e.posX,e.posY)?r.X:null},o}(i.KeyInputComponent);exports.VirtualGamepadComponent=a; },{"./key-input-component":"X5E7","../engine/game-object":"Sn3S"}],"zbVQ":[function(require,module,exports) { "use strict";var e=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),t=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var o,s=n(require("../engine/component")),i=n(require("../engine/message"));!function(e){e.POINTER_TAP="pointer-tap",e.POINTER_DOWN="pointer-down",e.POINTER_OVER="pointer-over",e.POINTER_RELEASE="pointer-release"}(o=exports.PointerMessages||(exports.PointerMessages={}));var r=function(n){function s(e,t,s,i){void 0===e&&(e=!0),void 0===t&&(t=!1),void 0===s&&(s=!1),void 0===i&&(i=!1);var r=n.call(this)||this;return r.lastTouch=null,r.handleStart=function(e){e.preventDefault();var t=e instanceof TouchEvent;t&&1===e.changedTouches.length?r.lastTouch=e.changedTouches[0]:r.lastTouch=e,r.handlePointerDown&&r.sendMessage(o.POINTER_DOWN,{mousePos:r.getMousePos(r.scene.app.view,e,t),isTouch:t})},r.handleMove=function(e){e.preventDefault();var t=void 0!==e.changedTouches;r.sendMessage(o.POINTER_OVER,{mousePos:r.getMousePos(r.scene.app.view,e,t),isTouch:t})},r.handleEnd=function(e){var t,n;e.preventDefault();var s=e instanceof TouchEvent;null!=r.lastTouch&&(s&&1===e.changedTouches.length?(t=e.changedTouches[0].pageX,n=e.changedTouches[0].pageY):(t=e.pageX,n=e.pageY),Math.abs(r.lastTouch.pageX-t)<10&&Math.abs(r.lastTouch.pageY-n)<10&&(s||r.handleClick)?r.sendMessage(o.POINTER_TAP,{mousePos:r.getMousePos(r.scene.app.view,e,s),isTouch:s}):r.sendMessage(o.POINTER_RELEASE,{mousePos:r.getMousePos(r.scene.app.view,e,s),isTouch:s}))},r.handleClick=e,r.handlePointerDown=t,r.handlePointerOver=s,r.handlePointerRelease=i,r}return e(s,n),s.prototype.onInit=function(){this.lastTouch=null,this.messagesToSend=[];var e=this.scene.app.view;e.addEventListener("touchstart",this.handleStart,!1),e.addEventListener("touchend",this.handleEnd,!1),e.addEventListener("mousedown",this.handleStart,!1),(this.handlePointerRelease||this.handleClick)&&e.addEventListener("mouseup",this.handleEnd,!1),this.handlePointerOver&&(e.addEventListener("mousemove",this.handleMove,!1),e.addEventListener("touchmove",this.handleMove,!1))},s.prototype.onUpdate=function(e,n){var o,s;try{for(var i=t(this.messagesToSend),r=i.next();!r.done;r=i.next()){var a=r.value;this.scene.sendMessage(a)}}catch(h){o={error:h}}finally{try{r&&!r.done&&(s=i.return)&&s.call(i)}finally{if(o)throw o.error}}this.messagesToSend=[]},s.prototype.onFinish=function(){var e=this.scene.app.view;e.removeEventListener("touchstart",this.handleStart),e.removeEventListener("touchend",this.handleEnd),e.removeEventListener("mousedown",this.handleStart),(this.handlePointerRelease||this.handleClick)&&e.removeEventListener("mouseup",this.handleEnd),this.handlePointerOver&&(e.removeEventListener("mousemove",this.handleMove),e.removeEventListener("touchmove",this.handleMove))},s.prototype.sendMessage=function(e,t){void 0===t&&(t=null),this.messagesToSend.push(new i.default(e,this,this.owner,t))},s.prototype.getMousePos=function(e,t,n){var o=e.getBoundingClientRect(),s=this.scene.app.renderer.resolution,i=n?t.changedTouches[0].clientX:t.clientX,r=n?t.changedTouches[0].clientY:t.clientY;return{posX:Math.round((i-o.left)/(o.right-o.left)*this.scene.app.view.width/s),posY:Math.round((r-o.top)/(o.bottom-o.top)*this.scene.app.view.height/s)}},s}(s.default);exports.PointerInputComponent=r; },{"../engine/component":"pk3I","../engine/message":"lHSJ"}],"zNlD":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=function(){function t(t,e){this._x=t,this._y=null==e?this._x:e}return Object.defineProperty(t.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),t.prototype.add=function(e){return new t(this.x+e.x,this.y+e.y)},t.prototype.subtract=function(e){return new t(this.x-e.x,this.y-e.y)},t.prototype.multiply=function(e){return new t(e*this.x,e*this.y)},t.prototype.divide=function(e){return new t(this.x/e,this.y/e)},t.prototype.distance=function(e){return new t(this.x-e.x,this.y-e.y).magnitude()},t.prototype.squareDistance=function(e){return new t(this.x-e.x,this.y-e.y).magnitudeSquared()},t.prototype.manhattanDistance=function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},t.prototype.normalize=function(){var e=this.magnitude();return new t(this.x/e,this.y/e)},t.prototype.magnitudeSquared=function(){return this.dot(this)},t.prototype.magnitude=function(){return Math.sqrt(this.magnitudeSquared())},t.prototype.angle=function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.limit=function(e){var n=this.magnitudeSquared();return e=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(exports,"__esModule",{value:!0});var o=n(require("../../../libs/pixi-component")),r=function(){function t(t){this.pos=t,this.lastPos=t}return t.prototype.draw=function(t){t.lineStyle(0),t.beginFill(13977415),t.drawCircle(this.pos.x,this.pos.y,4),t.endFill()},t}(),i=function(){function t(){}return t.prototype.relax=function(t){},t.prototype.draw=function(t){},t}(),s=function(e){function n(t,n){var o=e.call(this)||this;return o.a=t,o.pos=n,o}return t(n,e),n.prototype.relax=function(t){this.a.pos=this.pos},n.prototype.draw=function(t){t.beginFill(16777215,.55),t.drawCircle(this.pos.x,this.pos.y,12),t.endFill()},n}(i),a=function(e){function n(t,n,o,r){var i=e.call(this)||this;return i.a=t,i.b=n,i.stiffness=o,i.distance=r||t.pos.distance(n.pos),i}return t(n,e),n.prototype.relax=function(t){var e=this.a.pos.subtract(this.b.pos),n=e.magnitudeSquared();e=e.multiply((this.distance*this.distance-n)/n*this.stiffness*t),this.a.pos=this.a.pos.add(e),this.b.pos=this.b.pos.subtract(e)},n.prototype.draw=function(t){t.lineStyle(1,13977415),t.moveTo(this.a.pos.x,this.a.pos.y),t.lineTo(this.b.pos.x,this.b.pos.y),t.endFill()},n}(i),c=function(){function t(){this.particles=[],this.constraints=[]}return t.prototype.pin=function(t,e){return e?(this.constraints.push(new s(this.particles[t],e)),this.constraints[this.constraints.length-1]):this.pin(t,this.particles[t].pos)},t}(),p=function(){function t(t,e){this.width=t,this.height=e,this.friction=.99,this.gravity=new o.Vector(0,.2),this.draggedEntity=null}return t.prototype.frame=function(t){var n,o,r,i;try{for(var s=e(this.composite.particles),a=s.next();!a.done;a=s.next()){var c=a.value,p=c.pos.subtract(c.lastPos).multiply(this.friction);c.lastPos=c.pos,c.pos=c.pos.add(this.gravity),c.pos=c.pos.add(p)}}catch(d){n={error:d}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}for(var l=1/t,u=0;u0){var w=u.composite.particles[d*s+y],g=u.composite.particles[d*s+(y-1)];u.composite.constraints.push(new a(w,g,l))}if(d>0){w=u.composite.particles[d*s+y],g=u.composite.particles[(d-1)*s+y];u.composite.constraints.push(new a(w,g,l))}}for(y=0;y0)&&!(n=e.next()).done;)a.push(n.value)}catch(h){i={error:h}}finally{try{n&&!n.done&&(o=e.return)&&o.call(e)}finally{if(i)throw i.error}}return a};Object.defineProperty(exports,"__esModule",{value:!0});var r=function(){function r(t){this.x=0,this.y=0,this.z=0,this.w=0,this.x=Math.floor(t)}return r.prototype.float=function(){return(this.next()>>>0)/4294967296},r.prototype.double=function(){var t;do{t=((this.next()>>>11)+(this.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},r.prototype.normalRadial=function(r,o,n){void 0===n&&(n=0);var i=t(this.nextNormal(),2),e=i[0],a=i[1];if(1===n)return r+o*e;var h=n/Math.sqrt(1+n*n);return r+o*(h*e+Math.sqrt(1-h*h)*a)},r.prototype.normal=function(t,r,o){return void 0===o&&(o=1),this.normalRadial((r-t)/2+t,(r-t)/7,o)},r.prototype.uniform=function(t,r){return void 0===t&&(t=0),void 0===r&&(r=1),t+(r-t)*this.float()},r.prototype.uniformInt=function(t,r){return t+Math.floor((r-t+1)*this.float())},r.prototype.nextNormal=function(){for(var t=0,r=0;0===t;)t=Math.random();for(;0===r;)r=Math.random();var o=Math.sqrt(-2*Math.log(t)),n=2*Math.PI*r;return[o*Math.cos(n),o*Math.sin(n)]},r.prototype.next=function(){var t=this.x^this.x<<11;return this.x=this.y,this.y=this.z,this.z=this.w,this.w^=this.w>>>19^t^t>>>8},r}();exports.default=r; },{}],"CqQC":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){var t=function(i,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var o in i)i.hasOwnProperty(o)&&(t[o]=i[o])})(i,o)};return function(i,o){function e(){this.constructor=i}t(i,o),i.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}}(),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var i={};if(null!=t)for(var o in t)Object.hasOwnProperty.call(t,o)&&(i[o]=t[o]);return i.default=t,i};Object.defineProperty(exports,"__esModule",{value:!0});var o=i(require("../../pixi-component")),e=function(i){function e(t,e,s,n){void 0===t&&(t="");var r=i.call(this,t)||this;if(!e.parts)throw new Error("Body.parts is undefined");return r.body=e,r.world=s,r.options={fillStyle:n&&n.fillStyle?n.fillStyle:437914367,strokeStyle:n&&n.strokeStyle?n.strokeStyle:15328879,strokeStyleWireframe:n&&n.strokeStyleWireframe?n.strokeStyleWireframe:11316396,strokeStyleAngle:n&&n.strokeStyleAngle?n.strokeStyleAngle:13978951,lineWidth:n&&n.lineWidth?n.lineWidth:1,showWireframes:!n||!n.showWireframes||n.showWireframes,showAngleIndicator:!n||!n.showAngleIndicator||n.showAngleIndicator,showAxes:!(!n||!n.showAxes)&&n.showAxes},r.createBodyPrimitive(),r.addComponent(new o.GenericComponent("MatterSync").doOnUpdate(function(t,i,o){r.body.isStatic||(r.rotation=r.body.angle),r.position.x=r.body.position.x,r.position.y=r.body.position.y})),r}return t(e,i),e.prototype.createBodyPrimitive=function(){var t,i=this.options.fillStyle,o=this.options.strokeStyle,e=this.options.strokeStyleAngle,s=this.options.strokeStyleWireframe;this.clear();for(var n=this.body.parts.length>1?1:0;nthis.maxObjects&&this.levelr;return h.xn&&(a?o=t:l&&(o=i)),o},h}();exports.QuadTree=o; },{}],"PDD1":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=function(){function t(t,r,e){this.x=0,this.y=0,this.z=0,this.x=t,this.y=r,this.z=e}return t.prototype.dot2=function(t,r){return this.x*t+this.y*r},t.prototype.dot3=function(t,r,e){return this.x*t+this.y*r+this.z*e},t}(),r=function(){function r(r){void 0===r&&(r=0),this.gradients=[new t(1,1,0),new t(-1,1,0),new t(1,-1,0),new t(-1,-1,0),new t(1,0,1),new t(-1,0,1),new t(1,0,-1),new t(-1,0,-1),new t(0,1,1),new t(0,-1,1),new t(0,1,-1),new t(0,-1,-1)],this.periods=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],this.perm=new Array(512),this.gradP=new Array(512),this.seed(r)}return r.prototype.seed=function(t){t>0&&t<1&&(t*=65536),(t=Math.floor(t))<256&&(t|=t<<8);for(var r=0;r<256;r++){var e=void 0;e=1&r?this.periods[r]^255&t:this.periods[r]^t>>8&255,this.perm[r]=this.perm[r+256]=e,this.gradP[r]=this.gradP[r+256]=this.gradients[e%12]}},r.prototype.fade=function(t){return t*t*t*(t*(6*t-15)+10)},r.prototype.lerp=function(t,r,e){return(1-e)*t+e*r},r.prototype.rawNoise=function(t,r){var e=Math.floor(t),i=Math.floor(r);t-=e,r-=i,e&=255,i&=255;var o=this.gradP[e+this.perm[i]].dot2(t,r),s=this.gradP[e+this.perm[i+1]].dot2(t,r-1),n=this.gradP[e+1+this.perm[i]].dot2(t-1,r),h=this.gradP[e+1+this.perm[i+1]].dot2(t-1,r-1),p=this.fade(t);return this.lerp(this.lerp(o,n,p),this.lerp(s,h,p),this.fade(r))},r.prototype.interpolatedNoise=function(t,r,e,i,o){for(var s=0,n=1/o,h=1,p=0;p1&&(s=1),s},r.prototype.renderNoise=function(t,r,e,i,o,s,n){for(var h=0;ht?(e.currentPointIndex=-1,void(e.targetLocation=r.start)):(-1===e.currentPointIndex&&(e.currentPointIndex=0),n.distance(r.end)>t?void(e.targetLocation=r.end):void(e.currentPointIndex===this.segments.length-1?e.targetLocation=n:(e.currentPointIndex=e.currentPointIndex+1,e.targetLocation=this.segments[e.currentPointIndex].end)))},t}();exports.Path=e; },{}],"T5R3":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=Object.prototype.hasOwnProperty;exports.has=function(r,n){return t.call(r,n)},exports.defaultCompare=function(t,r){return t=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},t=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var t={};if(null!=r)for(var e in r)Object.hasOwnProperty.call(r,e)&&(t[e]=r[e]);return t.default=r,t};Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("./struct-utils"));exports.indexOf=function(r,t,n){for(var o=n||e.defaultEquals,u=r.length,i=0;i=0;u--)if(o(r[u],t))return u;return-1},exports.contains=function(r,t,e){return exports.indexOf(r,t,e)>=0},exports.remove=function(r,t,e){var n=exports.indexOf(r,t,e);return!(n<0)&&(r.splice(n,1),!0)},exports.frequency=function(r,t,n){for(var o=n||e.defaultEquals,u=r.length,i=0,f=0;f=r.length||e<0||e>=r.length)return!1;var n=r[t];return r[t]=r[e],r[e]=n,!0},exports.toString=function(r){return"["+r.toString()+"]"},exports.forEach=function(t,e){var n,o;try{for(var u=r(t),i=u.next();!i.done;i=u.next()){if(!1===e(i.value))return}}catch(f){n={error:f}}finally{try{i&&!i.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}}; },{"./struct-utils":"T5R3"}],"QdN6":[function(require,module,exports) { "use strict";var t=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("./struct-utils")),n=t(require("./arrays")),s=function(){function t(){this.firstNode=null,this.lastNode=null,this.nElements=0}return t.prototype.add=function(t,n){if(e.isUndefined(n)&&(n=this.nElements),n<0||n>this.nElements||e.isUndefined(t))return!1;var s=this.createNode(t);if(0===this.nElements||null===this.lastNode)this.firstNode=s,this.lastNode=s;else if(n===this.nElements)this.lastNode.next=s,this.lastNode=s;else if(0===n)s.next=this.firstNode,this.firstNode=s;else{var i=this.nodeAtIndex(n-1);if(null===i)return!1;s.next=i.next,i.next=s}return this.nElements++,!0},t.prototype.first=function(){if(null!==this.firstNode)return this.firstNode.element},t.prototype.last=function(){if(null!==this.lastNode)return this.lastNode.element},t.prototype.elementAtIndex=function(t){var e=this.nodeAtIndex(t);if(null!==e)return e.element},t.prototype.indexOf=function(t,n){var s=n||e.defaultEquals;if(e.isUndefined(t))return-1;for(var i=this.firstNode,r=0;null!==i;){if(s(i.element,t))return r;r++,i=i.next}return-1},t.prototype.contains=function(t,e){return this.indexOf(t,e)>=0},t.prototype.remove=function(t,n){var s=n||e.defaultEquals;if(this.nElements<1||e.isUndefined(t))return!1;for(var i=null,r=this.firstNode;null!==r;){if(s(r.element,t))return null===i?(this.firstNode=r.next,r===this.lastNode&&(this.lastNode=null)):r===this.lastNode?(this.lastNode=i,i.next=r.next,r.next=null):(i.next=r.next,r.next=null),this.nElements--,!0;i=r,r=r.next}return!1},t.prototype.clear=function(){this.firstNode=null,this.lastNode=null,this.nElements=0},t.prototype.equals=function(n,s){var i=s||e.defaultEquals;return n instanceof t&&(this.size()===n.size()&&this.equalsAux(this.firstNode,n.firstNode,i))},t.prototype.removeElementAtIndex=function(t){if(!(t<0||t>=this.nElements||null===this.firstNode||null===this.lastNode)){var e;if(1===this.nElements)e=this.firstNode.element,this.firstNode=null,this.lastNode=null;else{var n=this.nodeAtIndex(t-1);null===n?(e=this.firstNode.element,this.firstNode=this.firstNode.next):n.next===this.lastNode&&(e=this.lastNode.element,this.lastNode=n),null!==n&&null!==n.next&&(e=n.next.element,n.next=n.next.next)}return this.nElements--,e}},t.prototype.forEach=function(t){for(var e=this.firstNode;null!==e&&!1!==t(e.element);)e=e.next},t.prototype.reverse=function(){for(var t=null,e=this.firstNode,n=null;null!==e;)n=e.next,e.next=t,t=e,e=n;n=this.firstNode,this.firstNode=this.lastNode,this.lastNode=n},t.prototype.toArray=function(){for(var t=[],e=this.firstNode;null!==e;)t.push(e.element),e=e.next;return t},t.prototype.size=function(){return this.nElements},t.prototype.isEmpty=function(){return this.nElements<=0},t.prototype.toString=function(){return n.toString(this.toArray())},t.prototype.equalsAux=function(t,e,n){for(;null!==t&&null!==e;){if(!n(t.element,e.element))return!1;t=t.next,e=e.next}return!0},t.prototype.nodeAtIndex=function(t){if(t<0||t>=this.nElements)return null;if(t===this.nElements-1)return this.lastNode;for(var e=this.firstNode,n=0;n0?this.data[0]:void 0},t.prototype.add=function(t){return!i.isUndefined(t)&&(this.data.push(t),this.siftUp(this.data.length-1),!0)},t.prototype.removeRoot=function(){if(this.data.length>0){var t=this.data[0];return this.data[0]=this.data[this.data.length-1],this.data.splice(this.data.length-1,1),this.data.length>0&&this.siftDown(0),t}},t.prototype.contains=function(t){var e=i.compareToEquals(this.compare);return a.contains(this.data,t,e)},t.prototype.size=function(){return this.data.length},t.prototype.isEmpty=function(){return this.data.length<=0},t.prototype.clear=function(){this.data.length=0},t.prototype.forEach=function(t){a.forEach(this.data,t)},t.prototype.leftChildIndex=function(t){return 2*t+1},t.prototype.rightChildIndex=function(t){return 2*t+2},t.prototype.parentIndex=function(t){return Math.floor((t-1)/2)},t.prototype.minIndex=function(t,i){return i>=this.data.length?t>=this.data.length?-1:t:this.compare(this.data[t],this.data[i])<=0?t:i},t.prototype.siftUp=function(t){for(var i=this.parentIndex(t);t>0&&this.compare(this.data[i],this.data[t])>0;)a.swap(this.data,i,t),t=i,i=this.parentIndex(t)},t.prototype.siftDown=function(t){for(var i=this.minIndex(this.leftChildIndex(t),this.rightChildIndex(t));i>=0&&this.compare(this.data[t],this.data[i])>0;)a.swap(this.data,i,t),t=i,i=this.minIndex(this.leftChildIndex(t),this.rightChildIndex(t))},t}();exports.default=e; },{"./struct-utils":"T5R3","./arrays":"M2yn"}],"HgNo":[function(require,module,exports) { "use strict";var t=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e},e=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});var r=t(require("./struct-utils")),o=e(require("./heap")),n=function(){function t(t){this.heap=new o.default(r.reverseCompareFunction(t))}return t.prototype.enqueue=function(t){return this.heap.add(t)},t.prototype.add=function(t){return this.heap.add(t)},t.prototype.dequeue=function(){if(0!==this.heap.size()){var t=this.heap.peek();return this.heap.removeRoot(),t}},t.prototype.peek=function(){return this.heap.peek()},t.prototype.contains=function(t){return this.heap.contains(t)},t.prototype.isEmpty=function(){return this.heap.isEmpty()},t.prototype.size=function(){return this.heap.size()},t.prototype.clear=function(){this.heap.clear()},t.prototype.forEach=function(t){this.heap.forEach(t)},t}();exports.default=n; },{"./struct-utils":"T5R3","./heap":"jJU8"}],"OhAG":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){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)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),e=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});var n=r(require("../structs/queue")),i=r(require("../structs/priority-queue")),a=function(){return function(){this.cameFrom=new Map,this.visited=new Set,this.pathFound=new Array}}();exports.PathFinderContext=a;var o=function(){return function(t,e){this.first=t,this.second=e}}(),s=function(){function t(){this.indexMapper=function(t,e){return t.y*e+t.x}}return t.prototype.calcPathFromSteps=function(t,e,r,n){var i=e,a=new Array;for(a.push(i);!i.equals(t);)i=r.get(this.indexMapper(i,n)),a.push(i);return a=a.reverse()},t}();exports.PathFinder=s;var u=function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return t(i,r),i.prototype.search=function(t,r,i,a){var o,s,u=new n.default;for(u.add(r),a.cameFrom.set(this.indexMapper(r,t.width),r);!u.isEmpty();){var d=u.peek();if(a.visited.add(this.indexMapper(d,t.width)),u.dequeue(),d.equals(i))return a.pathFound=this.calcPathFromSteps(r,i,a.cameFrom,t.width),!0;var h=t.getNeighbors(d);try{for(var p=(o=void 0,e(h)),c=p.next();!c.done;c=p.next()){var f=c.value;a.cameFrom.has(this.indexMapper(f,t.width))||(u.enqueue(f),a.cameFrom.set(this.indexMapper(f,t.width),d))}}catch(l){o={error:l}}finally{try{c&&!c.done&&(s=p.return)&&s.call(p)}finally{if(o)throw o.error}}}return!1},i}(s);exports.BreadthFirstSearch=u;var d=function(r){function n(){return null!==r&&r.apply(this,arguments)||this}return t(n,r),n.prototype.search=function(t,r,n,a){var s,u,d=new i.default(function(t,e){return t.second===e.second?0:t.second=this.width||t.y<0||t.y>=this.height},t.prototype.getElevation=function(t){var i=this.indexMapper(t);return this.elevations.has(i)?this.elevations.get(this.indexMapper(t)):this.defaultElevation},t.prototype.setElevation=function(t,i){this.elevations.set(this.indexMapper(t),i)},t.prototype.addObstruction=function(t){this.obstructions.add(this.indexMapper(t))},t.prototype.removeObstruction=function(t){this.obstructions.delete(this.indexMapper(t))},t.prototype.getCost=function(t,i){return this.elevations.has(this.indexMapper(t))?this.elevations.get(this.indexMapper(t)):this.defaultElevation},t.prototype.getNeighbors=function(t){var s=new Array;if(this.mapType===exports.MAP_TYPE_TILE){var e=new i.default(t.x-1,t.y),n=new i.default(t.x+1,t.y),h=new i.default(t.x,t.y-1),o=new i.default(t.x,t.y+1);this.isInside(e)&&!this.obstructions.has(this.indexMapper(e))&&s.push(e),this.isInside(n)&&!this.obstructions.has(this.indexMapper(n))&&s.push(n),this.isInside(h)&&!this.obstructions.has(this.indexMapper(h))&&s.push(h),this.isInside(o)&&!this.obstructions.has(this.indexMapper(o))&&s.push(o)}else if(this.mapType===exports.MAP_TYPE_OCTILE){var r=new i.default(t.x-1,t.y),p=new i.default(t.x+1,t.y),a=new i.default(t.x,t.y-1),u=new i.default(t.x,t.y+1),d=new i.default(t.x-1,t.y-1),x=new i.default(t.x+1,t.y+1),c=new i.default(t.x+1,t.y-1),l=new i.default(t.x-1,t.y+1);this.isInside(r)&&!this.obstructions.has(this.indexMapper(r))&&s.push(r),this.isInside(p)&&!this.obstructions.has(this.indexMapper(p))&&s.push(p),this.isInside(a)&&!this.obstructions.has(this.indexMapper(a))&&s.push(a),this.isInside(u)&&!this.obstructions.has(this.indexMapper(u))&&s.push(u),this.isInside(d)&&!this.obstructions.has(this.indexMapper(d))&&s.push(d),this.isInside(x)&&!this.obstructions.has(this.indexMapper(x))&&s.push(x),this.isInside(c)&&!this.obstructions.has(this.indexMapper(c))&&s.push(c),this.isInside(l)&&!this.obstructions.has(this.indexMapper(l))&&s.push(l)}return s},t.prototype.isInside=function(t){return 0<=t.x&&t.x0)&&!(n=o.next()).done;)a.push(n.value)}catch(l){i={error:l}}finally{try{n&&!n.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return a},e=this&&this.__spread||function(){for(var t=[],e=0;e=0&&h<=u.length&&u[h]++}var p=Math.max.apply(Math,e(u));for(r.beginFill(987120),s=0;s=i&&e.finish()}))}}(),a=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return e(t,n),t.prototype.generateNumber=function(e,n){return this.random.normal(e,n,1)},t}(o);exports.ExampleGaussSpread=a;var s=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return e(t,n),t.prototype.generateNumber=function(e,n){return this.random.uniform(e,n)},t}(o);exports.ExampleUniformSpread=s; },{"../../../libs/pixi-component":"rNDA","../../../libs/pixi-math":"hhCT"}],"mG0D":[function(require,module,exports) { var define; var global = arguments[3]; var e,t=arguments[3];!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof e&&e.amd)e([],n);else{("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).Matter=n()}}(function(){return function(){return function e(t,n,o){function i(s,a){if(!n[s]){if(!t[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(r)return r(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var d=n[s]={exports:{}};t[s][0].call(d.exports,function(e){return i(t[s][1][e]||e)},d,d.exports,e,t,n,o)}return n[s].exports}for(var r="function"==typeof require&&require,s=0;s0&&r.rotateAbout(s.position,n,e.position,s.position)}},o.setVelocity=function(e,t){e.positionPrev.x=e.position.x-t.x,e.positionPrev.y=e.position.y-t.y,e.velocity.x=t.x,e.velocity.y=t.y,e.speed=r.magnitude(e.velocity)},o.setAngularVelocity=function(e,t){e.anglePrev=e.angle-t,e.angularVelocity=t,e.angularSpeed=Math.abs(e.angularVelocity)},o.translate=function(e,t){o.setPosition(e,r.add(e.position,t))},o.rotate=function(e,t,n){if(n){var i=Math.cos(t),r=Math.sin(t),s=e.position.x-n.x,a=e.position.y-n.y;o.setPosition(e,{x:n.x+(s*i-a*r),y:n.y+(s*r+a*i)}),o.setAngle(e,e.angle+t)}else o.setAngle(e,e.angle+t)},o.scale=function(e,t,n,r){var s=0,a=0;r=r||e.position;for(var d=0;d0&&(s+=u.area,a+=u.inertia),u.position.x=r.x+(u.position.x-r.x)*t,u.position.y=r.y+(u.position.y-r.y)*n,l.update(u.bounds,u.vertices,e.velocity)}e.parts.length>1&&(e.area=s,e.isStatic||(o.setMass(e,e.density*s),o.setInertia(e,a))),e.circleRadius&&(t===n?e.circleRadius*=t:e.circleRadius=null)},o.update=function(e,t,n,o){var s=Math.pow(t*n*e.timeScale,2),a=1-e.frictionAir*n*e.timeScale,d=e.position.x-e.positionPrev.x,u=e.position.y-e.positionPrev.y;e.velocity.x=d*a*o+e.force.x/e.mass*s,e.velocity.y=u*a*o+e.force.y/e.mass*s,e.positionPrev.x=e.position.x,e.positionPrev.y=e.position.y,e.position.x+=e.velocity.x,e.position.y+=e.velocity.y,e.angularVelocity=(e.angle-e.anglePrev)*a*o+e.torque/e.inertia*s,e.anglePrev=e.angle,e.angle+=e.angularVelocity,e.speed=r.magnitude(e.velocity),e.angularSpeed=Math.abs(e.angularVelocity);for(var p=0;p0&&(m.position.x+=e.velocity.x,m.position.y+=e.velocity.y),0!==e.angularVelocity&&(i.rotate(m.vertices,e.angularVelocity,e.position),c.rotate(m.axes,e.angularVelocity),p>0&&r.rotateAbout(m.position,e.angularVelocity,e.position,m.position)),l.update(m.bounds,m.vertices,e.velocity)}},o.applyForce=function(e,t,n){e.force.x+=n.x,e.force.y+=n.y;var o=t.x-e.position.x,i=t.y-e.position.y;e.torque+=o*n.y-i*n.x},o._totalProperties=function(e){for(var t={mass:0,area:0,inertia:0,centre:{x:0,y:0}},n=1===e.parts.length?0:1;n1?1:0;u1?1:0;m0:0!=(e.mask&t.category)&&0!=(t.mask&e.category)}},{"../geometry/Bounds":26,"./Pair":7,"./SAT":11}],6:[function(e,t,n){var o={};t.exports=o;var i=e("./Pair"),r=e("./Detector"),s=e("../core/Common");o.create=function(e){var t={controller:o,detector:r.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return s.extend(t,e)},o.update=function(e,t,n,i){var r,s,a,l,c,d=n.world,u=e.buckets,p=!1;for(r=0;rd.bounds.max.x||m.bounds.max.yd.bounds.max.y)){var f=o._getRegion(e,m);if(!m.region||f.id!==m.region.id||i){m.region&&!i||(m.region=f);var v=o._regionUnion(f,m.region);for(s=v.startCol;s<=v.endCol;s++)for(a=v.startRow;a<=v.endRow;a++){l=u[c=o._getBucketId(s,a)];var y=s>=f.startCol&&s<=f.endCol&&a>=f.startRow&&a<=f.endRow,g=s>=m.region.startCol&&s<=m.region.endCol&&a>=m.region.startRow&&a<=m.region.endRow;!y&&g&&g&&l&&o._bucketRemoveBody(e,l,m),(m.region===f||y&&!g||i)&&(l||(l=o._createBucket(u,c)),o._bucketAddBody(e,l,m))}m.region=f,p=!0}}}p&&(e.pairsList=o._createActivePairsList(e))},o.clear=function(e){e.buckets={},e.pairs={},e.pairsList=[]},o._regionUnion=function(e,t){var n=Math.min(e.startCol,t.startCol),i=Math.max(e.endCol,t.endCol),r=Math.min(e.startRow,t.startRow),s=Math.max(e.endRow,t.endRow);return o._createRegion(n,i,r,s)},o._getRegion=function(e,t){var n=t.bounds,i=Math.floor(n.min.x/e.bucketWidth),r=Math.floor(n.max.x/e.bucketWidth),s=Math.floor(n.min.y/e.bucketHeight),a=Math.floor(n.max.y/e.bucketHeight);return o._createRegion(i,r,s,a)},o._createRegion=function(e,t,n,o){return{id:e+","+t+","+n+","+o,startCol:e,endCol:t,startRow:n,endRow:o}},o._getBucketId=function(e,t){return"C"+e+"R"+t},o._createBucket=function(e,t){return e[t]=[]},o._bucketAddBody=function(e,t,n){for(var o=0;o0?o.push(n):delete e.pairs[t[i]];return o}},{"../core/Common":14,"./Detector":5,"./Pair":7}],7:[function(e,t,n){var o={};t.exports=o;var i=e("./Contact");o.create=function(e,t){var n=e.bodyA,i=e.bodyB,r=e.parentA,s=e.parentB,a={id:o.id(n,i),bodyA:n,bodyB:i,contacts:{},activeContacts:[],separation:0,isActive:!0,isSensor:n.isSensor||i.isSensor,timeCreated:t,timeUpdated:t,inverseMass:r.inverseMass+s.inverseMass,friction:Math.min(r.friction,s.friction),frictionStatic:Math.max(r.frictionStatic,s.frictionStatic),restitution:Math.max(r.restitution,s.restitution),slop:Math.max(r.slop,s.slop)};return o.update(a,e,t),a},o.update=function(e,t,n){var r=e.contacts,s=t.supports,a=e.activeContacts,l=t.parentA,c=t.parentB;if(e.collision=t,e.inverseMass=l.inverseMass+c.inverseMass,e.friction=Math.min(l.friction,c.friction),e.frictionStatic=Math.max(l.frictionStatic,c.frictionStatic),e.restitution=Math.max(l.restitution,c.restitution),e.slop=Math.max(l.slop,c.slop),a.length=0,t.collided){for(var d=0;do._pairMaxIdleLife&&c.push(s);for(s=0;sm.friction*m.frictionStatic*E*n&&(F=T,L=s.clamp(m.friction*R*n,-F,F));var O=r.cross(A,g),q=r.cross(P,g),W=b/(v.inverseMass+y.inverseMass+v.inverseInertia*O*O+y.inverseInertia*q*q);if(V*=W,L*=W,I<0&&I*I>o._restingThresh*n)S.normalImpulse=0;else{var D=S.normalImpulse;S.normalImpulse=Math.min(S.normalImpulse+V,0),V=S.normalImpulse-D}if(_*_>o._restingThreshTangent*n)S.tangentImpulse=0;else{var N=S.tangentImpulse;S.tangentImpulse=s.clamp(S.tangentImpulse+L,-F,F),L=S.tangentImpulse-N}i.x=g.x*V+x.x*L,i.y=g.y*V+x.y*L,v.isStatic||v.isSleeping||(v.positionPrev.x+=i.x*v.inverseMass,v.positionPrev.y+=i.y*v.inverseMass,v.anglePrev+=r.cross(A,i)*v.inverseInertia),y.isStatic||y.isSleeping||(y.positionPrev.x-=i.x*y.inverseMass,y.positionPrev.y-=i.y*y.inverseMass,y.anglePrev-=r.cross(P,i)*y.inverseInertia)}}}}},{"../core/Common":14,"../geometry/Bounds":26,"../geometry/Vector":28,"../geometry/Vertices":29}],11:[function(e,t,n){var o={};t.exports=o;var i=e("../geometry/Vertices"),r=e("../geometry/Vector");o.collides=function(e,t,n){var s,a,l,c,d=!1;if(n){var u=e.parent,p=t.parent,m=u.speed*u.speed+u.angularSpeed*u.angularSpeed+p.speed*p.speed+p.angularSpeed*p.angularSpeed;d=n&&n.collided&&m<.2,c=n}else c={collided:!1,bodyA:e,bodyB:t};if(n&&d){var f=c.axisBody,v=f===e?t:e,y=[f.axes[n.axisNumber]];if(l=o._overlapAxes(f.vertices,v.vertices,y),c.reused=!0,l.overlap<=0)return c.collided=!1,c}else{if((s=o._overlapAxes(e.vertices,t.vertices,e.axes)).overlap<=0)return c.collided=!1,c;if((a=o._overlapAxes(t.vertices,e.vertices,t.axes)).overlap<=0)return c.collided=!1,c;s.overlapi?i=a:a=0?s.index-1:d.length-1],c.x=i.x-u.x,c.y=i.y-u.y,l=-r.dot(n,c),a=i,i=d[(s.index+1)%d.length],c.x=i.x-u.x,c.y=i.y-u.y,(o=-r.dot(n,c))0?1:.7),t.damping=t.damping||0,t.angularStiffness=t.angularStiffness||0,t.angleA=t.bodyA?t.bodyA.angle:t.angleA,t.angleB=t.bodyB?t.bodyB.angle:t.angleB,t.plugin={};var s={visible:!0,lineWidth:2,strokeStyle:"#ffffff",type:"line",anchors:!0};return 0===t.length&&t.stiffness>.1?(s.type="pin",s.anchors=!1):t.stiffness<.9&&(s.type="spring"),t.render=c.extend(s,t.render),t},o.preSolveAll=function(e){for(var t=0;t0&&(u.position.x+=c.x,u.position.y+=c.y),0!==c.angle&&(i.rotate(u.vertices,c.angle,n.position),l.rotate(u.axes,c.angle),d>0&&r.rotateAbout(u.position,c.angle,n.position,u.position)),a.update(u.bounds,u.vertices,n.velocity)}c.angle*=o._warming,c.x*=o._warming,c.y*=o._warming}}}},{"../core/Common":14,"../core/Sleeping":22,"../geometry/Axes":25,"../geometry/Bounds":26,"../geometry/Vector":28,"../geometry/Vertices":29}],13:[function(e,t,n){var o={};t.exports=o;var i=e("../geometry/Vertices"),r=e("../core/Sleeping"),s=e("../core/Mouse"),a=e("../core/Events"),l=e("../collision/Detector"),c=e("./Constraint"),d=e("../body/Composite"),u=e("../core/Common"),p=e("../geometry/Bounds");o.create=function(e,t){var n=(e?e.mouse:null)||(t?t.mouse:null);n||(e&&e.render&&e.render.canvas?n=s.create(e.render.canvas):t&&t.element?n=s.create(t.element):(n=s.create(),u.warn("MouseConstraint.create: options.mouse was undefined, options.element was undefined, may not function as expected")));var i={type:"mouseConstraint",mouse:n,element:null,body:null,constraint:c.create({label:"Mouse Constraint",pointA:n.position,pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,render:{strokeStyle:"#90EE90",lineWidth:3}}),collisionFilter:{category:1,mask:4294967295,group:0}},r=u.extend(i,t);return a.on(e,"beforeUpdate",function(){var t=d.allBodies(e.world);o.update(r,t),o._triggerEvents(r)}),r},o.update=function(e,t){var n=e.mouse,o=e.constraint,s=e.body;if(0===n.button){if(o.bodyB)r.set(o.bodyB,!1),o.pointA=n.position;else for(var c=0;c1?1:0;d0;t--){var n=Math.floor(o.random()*(t+1)),i=e[t];e[t]=e[n],e[n]=i}return e},o.choose=function(e){return e[Math.floor(o.random()*e.length)]},o.isElement=function(e){return"undefined"!=typeof HTMLElement?e instanceof HTMLElement:!!(e&&e.nodeType&&e.nodeName)},o.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},o.isFunction=function(e){return"function"==typeof e},o.isPlainObject=function(e){return"object"==typeof e&&e.constructor===Object},o.isString=function(e){return"[object String]"===toString.call(e)},o.clamp=function(e,t,n){return en?n:e},o.sign=function(e){return e<0?-1:1},o.now=function(){if(window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-o._nowStartTime},o.random=function(e,t){return t=void 0!==t?t:1,(e=void 0!==e?e:0)+n()*(t-e)};var n=function(){return o._seed=(9301*o._seed+49297)%233280,o._seed/233280};o.colorToNumber=function(e){return 3==(e=e.replace("#","")).length&&(e=e.charAt(0)+e.charAt(0)+e.charAt(1)+e.charAt(1)+e.charAt(2)+e.charAt(2)),parseInt(e,16)},o.logLevel=1,o.log=function(){console&&o.logLevel>0&&o.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},o.info=function(){console&&o.logLevel>0&&o.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},o.warn=function(){console&&o.logLevel>0&&o.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},o.nextId=function(){return o._nextId++},o.indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n0&&d.trigger(e,"collisionStart",{pairs:h.collisionStart}),s.preSolvePosition(h.list),i=0;i0&&d.trigger(e,"collisionActive",{pairs:h.collisionActive}),h.collisionEnd.length>0&&d.trigger(e,"collisionEnd",{pairs:h.collisionEnd}),o._bodiesClearForces(y),d.trigger(e,"afterUpdate",v),e},o.merge=function(e,t){if(m.extend(e,t),t.world){e.world=t.world,o.clear(e);for(var n=u.allBodies(e.world),i=0;ir?(i.warn("Plugin.register:",o.toString(t),"was upgraded to",o.toString(e)),o._registry[e.name]=e):n-1},o.isFor=function(e,t){var n=e.for&&o.dependencyParse(e.for);return!e.for||t.name===n.name&&o.versionSatisfies(t.version,n.range)},o.use=function(e,t){if(e.uses=(e.uses||[]).concat(t||[]),0!==e.uses.length){for(var n=o.dependencies(e),r=i.topologicalSort(n),s=[],a=0;a0&&i.info(s.join(" "))}else i.warn("Plugin.use:",o.toString(e),"does not specify any dependencies to install.")},o.dependencies=function(e,t){var n=o.dependencyParse(e),r=n.name;if(!(r in(t=t||{}))){e=o.resolve(e)||e,t[r]=i.map(e.uses||[],function(t){o.isPlugin(t)&&o.register(t);var r=o.dependencyParse(t),s=o.resolve(t);return s&&!o.versionSatisfies(s.version,r.range)?(i.warn("Plugin.dependencies:",o.toString(s),"does not satisfy",o.toString(r),"used by",o.toString(n)+"."),s._warned=!0,e._warned=!0):s||(i.warn("Plugin.dependencies:",o.toString(t),"used by",o.toString(n),"could not be resolved."),e._warned=!0),r.name});for(var s=0;s=i[2];if("^"===n.operator)return i[0]>0?s[0]===i[0]&&r.number>=n.number:i[1]>0?s[1]===i[1]&&s[2]>=i[2]:s[2]===i[2]}return e===t||"*"===e}},{"./Common":14}],21:[function(e,t,n){var o={};t.exports=o;var i=e("./Events"),r=e("./Engine"),s=e("./Common");!function(){var e,t,n;("undefined"!=typeof window&&(e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame,t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame),e)||(e=function(e){n=setTimeout(function(){e(s.now())},1e3/60)},t=function(){clearTimeout(n)});o.create=function(e){var t=s.extend({fps:60,correction:1,deltaSampleSize:60,counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:!1,enabled:!0},e);return t.delta=t.delta||1e3/t.fps,t.deltaMin=t.deltaMin||1e3/t.fps,t.deltaMax=t.deltaMax||1e3/(.5*t.fps),t.fps=1e3/t.delta,t},o.run=function(t,n){return void 0!==t.positionIterations&&(n=t,t=o.create()),function i(r){t.frameRequestId=e(i),r&&t.enabled&&o.tick(t,n,r)}(),t},o.tick=function(e,t,n){var o,s=t.timing,a=1,l={timestamp:s.timestamp};i.trigger(e,"beforeTick",l),i.trigger(t,"beforeTick",l),e.isFixed?o=e.delta:(o=n-e.timePrev||e.delta,e.timePrev=n,e.deltaHistory.push(o),e.deltaHistory=e.deltaHistory.slice(-e.deltaSampleSize),a=(o=(o=(o=Math.min.apply(null,e.deltaHistory))e.deltaMax?e.deltaMax:o)/e.delta,e.delta=o),0!==e.timeScalePrev&&(a*=s.timeScale/e.timeScalePrev),0===s.timeScale&&(a=0),e.timeScalePrev=s.timeScale,e.correction=a,e.frameCounter+=1,n-e.counterTimestamp>=1e3&&(e.fps=e.frameCounter*((n-e.counterTimestamp)/1e3),e.counterTimestamp=n,e.frameCounter=0),i.trigger(e,"tick",l),i.trigger(t,"tick",l),t.world.isModified&&t.render&&t.render.controller&&t.render.controller.clear&&t.render.controller.clear(t.render),i.trigger(e,"beforeUpdate",l),r.update(t,o,a),i.trigger(e,"afterUpdate",l),t.render&&t.render.controller&&(i.trigger(e,"beforeRender",l),i.trigger(t,"beforeRender",l),t.render.controller.world(t.render),i.trigger(e,"afterRender",l),i.trigger(t,"afterRender",l)),i.trigger(e,"afterTick",l),i.trigger(t,"afterTick",l)},o.stop=function(e){t(e.frameRequestId)},o.start=function(e,t){o.run(e,t)}}()},{"./Common":14,"./Engine":15,"./Events":16}],22:[function(e,t,n){var o={};t.exports=o;var i=e("./Events");o._motionWakeThreshold=.18,o._motionSleepThreshold=.08,o._minBias=.9,o.update=function(e,t){for(var n=t*t*t,i=0;i0&&r.motion=r.sleepThreshold&&o.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else o.set(r,!1)}},o.afterCollisions=function(e,t){for(var n=t*t*t,i=0;io._motionWakeThreshold*n&&o.set(c,!1)}}}},o.set=function(e,t){var n=e.isSleeping;t?(e.isSleeping=!0,e.sleepCounter=e.sleepThreshold,e.positionImpulse.x=0,e.positionImpulse.y=0,e.positionPrev.x=e.position.x,e.positionPrev.y=e.position.y,e.anglePrev=e.angle,e.speed=0,e.angularSpeed=0,e.motion=0,n||i.trigger(e,"sleepStart")):(e.isSleeping=!1,e.sleepCounter=0,n&&i.trigger(e,"sleepEnd"))}},{"./Events":16}],23:[function(e,t,n){var o={};t.exports=o;var i,r=e("../geometry/Vertices"),s=e("../core/Common"),a=e("../body/Body"),l=e("../geometry/Bounds"),c=e("../geometry/Vector");o.rectangle=function(e,t,n,o,i){i=i||{};var l={label:"Rectangle Body",position:{x:e,y:t},vertices:r.fromPath("L 0 0 L "+n+" 0 L "+n+" "+o+" L 0 "+o)};if(i.chamfer){var c=i.chamfer;l.vertices=r.chamfer(l.vertices,c.radius,c.quality,c.qualityMin,c.qualityMax),delete i.chamfer}return a.create(s.extend({},l,i))},o.trapezoid=function(e,t,n,o,i,l){l=l||{};var c,d=n*(i*=.5),u=d+(1-2*i)*n,p=u+d;c=i<.5?"L 0 0 L "+d+" "+-o+" L "+u+" "+-o+" L "+p+" 0":"L 0 0 L "+u+" "+-o+" L "+p+" 0";var m={label:"Trapezoid Body",position:{x:e,y:t},vertices:r.fromPath(c)};if(l.chamfer){var f=l.chamfer;m.vertices=r.chamfer(m.vertices,f.radius,f.quality,f.qualityMin,f.qualityMax),delete l.chamfer}return a.create(s.extend({},m,l))},o.circle=function(e,t,n,i,r){i=i||{};var a={label:"Circle Body",circleRadius:n};r=r||25;var l=Math.ceil(Math.max(10,Math.min(r,n)));return l%2==1&&(l+=1),o.polygon(e,t,l,n,s.extend({},a,i))},o.polygon=function(e,t,n,i,l){if(l=l||{},n<3)return o.circle(e,t,i,l);for(var c=2*Math.PI/n,d="",u=.5*c,p=0;p0&&r.area(A)1?(m=a.create(s.extend({parts:f.slice(0)},o)),a.setPosition(m,{x:e,y:t}),m):f[0]}},{"../body/Body":1,"../core/Common":14,"../geometry/Bounds":26,"../geometry/Vector":28,"../geometry/Vertices":29}],24:[function(e,t,n){var o={};t.exports=o;var i=e("../body/Composite"),r=e("../constraint/Constraint"),s=e("../core/Common"),a=e("../body/Body"),l=e("./Bodies");o.stack=function(e,t,n,o,r,s,l){for(var c,d=i.create({label:"Stack"}),u=e,p=t,m=0,f=0;fv&&(v=x),a.translate(g,{x:.5*h,y:.5*x}),u=g.bounds.max.x+r,i.addBody(d,g),c=g,m+=1}else u+=r}p+=v+s,u=e}return d},o.chain=function(e,t,n,o,a,l){for(var c=e.bodies,d=1;d0)for(c=0;c0&&(p=m[c-1+(l-1)*t],i.addConstraint(e,r.create(s.extend({bodyA:p,bodyB:u},a)))),o&&cp||s<(c=p-c)||s>n-1-c))return 1===u&&a.translate(d,{x:(s+(n%2==1?1:-1))*m,y:0}),l(e+(d?s*m:0)+s*r,o,s,c,d,u)})},o.newtonsCradle=function(e,t,n,o,s){for(var a=i.create({label:"Newtons Cradle"}),c=0;ce.max.x&&(e.max.x=i.x),i.xe.max.y&&(e.max.y=i.y),i.y0?e.max.x+=n.x:e.min.x+=n.x,n.y>0?e.max.y+=n.y:e.min.y+=n.y)},o.contains=function(e,t){return t.x>=e.min.x&&t.x<=e.max.x&&t.y>=e.min.y&&t.y<=e.max.y},o.overlaps=function(e,t){return e.min.x<=t.max.x&&e.max.x>=t.min.x&&e.max.y>=t.min.y&&e.min.y<=t.max.y},o.translate=function(e,t){e.min.x+=t.x,e.max.x+=t.x,e.min.y+=t.y,e.max.y+=t.y},o.shift=function(e,t){var n=e.max.x-e.min.x,o=e.max.y-e.min.y;e.min.x=t.x,e.max.x=t.x+n,e.min.y=t.y,e.max.y=t.y+o}},{}],27:[function(e,t,n){var o={};t.exports=o;e("../geometry/Bounds");var i=e("../core/Common");o.pathToVertices=function(e,t){"undefined"==typeof window||"SVGPathSeg"in window||i.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var n,r,s,a,l,c,d,u,p,m,f,v=[],y=0,g=0,x=0;t=t||15;var h=function(e,t,n){var o=n%2==1&&n>1;if(!p||e!=p.x||t!=p.y){p&&o?(m=p.x,f=p.y):(m=0,f=0);var i={x:m+e,y:f+t};!o&&p||(p=i),v.push(i),g=m+e,x=f+t}},b=function(e){var t=e.pathSegTypeAsLetter.toUpperCase();if("Z"!==t){switch(t){case"M":case"L":case"T":case"C":case"S":case"Q":g=e.x,x=e.y;break;case"H":g=e.x;break;case"V":x=e.y}h(g,x,e.pathSegType)}};for(o._svgPathToAbsolute(e),s=e.getTotalLength(),c=[],n=0;n0)return!1}return!0},o.scale=function(e,t,n,r){if(1===t&&1===n)return e;var s,a;r=r||o.centre(e);for(var l=0;l=0?l-1:e.length-1],d=e[l],u=e[(l+1)%e.length],p=t[l0&&(r|=2),3===r)return!1;return 0!==r||null},o.hull=function(e){var t,n,o=[],r=[];for((e=e.slice(0)).sort(function(e,t){var n=e.x-t.x;return 0!==n?n:e.y-t.y}),n=0;n=2&&i.cross3(r[r.length-2],r[r.length-1],t)<=0;)r.pop();r.push(t)}for(n=e.length-1;n>=0;n-=1){for(t=e[n];o.length>=2&&i.cross3(o[o.length-2],o[o.length-1],t)<=0;)o.pop();o.push(t)}return o.pop(),r.pop(),o.concat(r)}},{"../core/Common":14,"../geometry/Vector":28}],30:[function(e,t,n){var o=t.exports=e("../core/Matter");o.Body=e("../body/Body"),o.Composite=e("../body/Composite"),o.World=e("../body/World"),o.Contact=e("../collision/Contact"),o.Detector=e("../collision/Detector"),o.Grid=e("../collision/Grid"),o.Pairs=e("../collision/Pairs"),o.Pair=e("../collision/Pair"),o.Query=e("../collision/Query"),o.Resolver=e("../collision/Resolver"),o.SAT=e("../collision/SAT"),o.Constraint=e("../constraint/Constraint"),o.MouseConstraint=e("../constraint/MouseConstraint"),o.Common=e("../core/Common"),o.Engine=e("../core/Engine"),o.Events=e("../core/Events"),o.Mouse=e("../core/Mouse"),o.Runner=e("../core/Runner"),o.Sleeping=e("../core/Sleeping"),o.Plugin=e("../core/Plugin"),o.Bodies=e("../factory/Bodies"),o.Composites=e("../factory/Composites"),o.Axes=e("../geometry/Axes"),o.Bounds=e("../geometry/Bounds"),o.Svg=e("../geometry/Svg"),o.Vector=e("../geometry/Vector"),o.Vertices=e("../geometry/Vertices"),o.Render=e("../render/Render"),o.RenderPixi=e("../render/RenderPixi"),o.World.add=o.Composite.add,o.World.remove=o.Composite.remove,o.World.addComposite=o.Composite.addComposite,o.World.addBody=o.Composite.addBody,o.World.addConstraint=o.Composite.addConstraint,o.World.clear=o.Composite.clear,o.Engine.run=o.Runner.run},{"../body/Body":1,"../body/Composite":2,"../body/World":3,"../collision/Contact":4,"../collision/Detector":5,"../collision/Grid":6,"../collision/Pair":7,"../collision/Pairs":8,"../collision/Query":9,"../collision/Resolver":10,"../collision/SAT":11,"../constraint/Constraint":12,"../constraint/MouseConstraint":13,"../core/Common":14,"../core/Engine":15,"../core/Events":16,"../core/Matter":17,"../core/Metrics":18,"../core/Mouse":19,"../core/Plugin":20,"../core/Runner":21,"../core/Sleeping":22,"../factory/Bodies":23,"../factory/Composites":24,"../geometry/Axes":25,"../geometry/Bounds":26,"../geometry/Svg":27,"../geometry/Vector":28,"../geometry/Vertices":29,"../render/Render":31,"../render/RenderPixi":32}],31:[function(e,t,n){var o={};t.exports=o;var i=e("../core/Common"),r=e("../body/Composite"),s=e("../geometry/Bounds"),a=e("../core/Events"),l=e("../collision/Grid"),c=e("../geometry/Vector"),d=e("../core/Mouse");!function(){var e,t;"undefined"!=typeof window&&(e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(e){window.setTimeout(function(){e(i.now())},1e3/60)},t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame),o.create=function(e){var t={controller:o,engine:null,element:null,canvas:null,mouse:null,frameRequestId:null,options:{width:800,height:600,pixelRatio:1,background:"#18181d",wireframeBackground:"#0f0f13",hasBounds:!!e.bounds,enabled:!0,wireframes:!0,showSleeping:!0,showDebug:!1,showBroadphase:!1,showBounds:!1,showVelocity:!1,showCollisions:!1,showSeparations:!1,showAxes:!1,showPositions:!1,showAngleIndicator:!1,showIds:!1,showShadows:!1,showVertexNumbers:!1,showConvexHulls:!1,showInternalEdges:!1,showMousePosition:!1}},r=i.extend(t,e);return r.canvas&&(r.canvas.width=r.options.width||r.canvas.width,r.canvas.height=r.options.height||r.canvas.height),r.mouse=e.mouse,r.engine=e.engine,r.canvas=r.canvas||n(r.options.width,r.options.height),r.context=r.canvas.getContext("2d"),r.textures={},r.bounds=r.bounds||{min:{x:0,y:0},max:{x:r.canvas.width,y:r.canvas.height}},1!==r.options.pixelRatio&&o.setPixelRatio(r,r.options.pixelRatio),i.isElement(r.element)?r.element.appendChild(r.canvas):r.canvas.parentNode||i.log("Render.create: options.element was undefined, render.canvas was created but not appended","warn"),r},o.run=function(t){!function n(i){t.frameRequestId=e(n),o.world(t)}()},o.stop=function(e){t(e.frameRequestId)},o.setPixelRatio=function(e,t){var n=e.options,o=e.canvas;"auto"===t&&(t=u(o)),n.pixelRatio=t,o.setAttribute("data-pixel-ratio",t),o.width=n.width*t,o.height=n.height*t,o.style.width=n.width+"px",o.style.height=n.height+"px",e.context.scale(t,t)},o.lookAt=function(e,t,n,o){o=void 0===o||o,t=i.isArray(t)?t:[t],n=n||{x:0,y:0};for(var r={min:{x:1/0,y:1/0},max:{x:-1/0,y:-1/0}},s=0;sr.max.x&&(r.max.x=c.x),l.yr.max.y&&(r.max.y=c.y))}var u=r.max.x-r.min.x+2*n.x,p=r.max.y-r.min.y+2*n.y,m=e.canvas.height,f=e.canvas.width/m,v=u/p,y=1,g=1;v>f?g=v/f:y=f/v,e.options.hasBounds=!0,e.bounds.min.x=r.min.x,e.bounds.max.x=r.min.x+u*y,e.bounds.min.y=r.min.y,e.bounds.max.y=r.min.y+p*g,o&&(e.bounds.min.x+=.5*u-u*y*.5,e.bounds.max.x+=.5*u-u*y*.5,e.bounds.min.y+=.5*p-p*g*.5,e.bounds.max.y+=.5*p-p*g*.5),e.bounds.min.x-=n.x,e.bounds.max.x-=n.x,e.bounds.min.y-=n.y,e.bounds.max.y-=n.y,e.mouse&&(d.setScale(e.mouse,{x:(e.bounds.max.x-e.bounds.min.x)/e.canvas.width,y:(e.bounds.max.y-e.bounds.min.y)/e.canvas.height}),d.setOffset(e.mouse,e.bounds.min))},o.startViewTransform=function(e){var t=e.bounds.max.x-e.bounds.min.x,n=e.bounds.max.y-e.bounds.min.y,o=t/e.options.width,i=n/e.options.height;e.context.scale(1/o,1/i),e.context.translate(-e.bounds.min.x,-e.bounds.min.y)},o.endViewTransform=function(e){e.context.setTransform(e.options.pixelRatio,0,0,e.options.pixelRatio,0,0)},o.world=function(e){var t,n=e.engine,i=n.world,u=e.canvas,p=e.context,f=e.options,v=r.allBodies(i),y=r.allConstraints(i),g=f.wireframes?f.wireframeBackground:f.background,x=[],h=[],b={timestamp:n.timing.timestamp};if(a.trigger(e,"beforeRender",b),e.currentBackground!==g&&m(e,g),p.globalCompositeOperation="source-in",p.fillStyle="transparent",p.fillRect(0,0,u.width,u.height),p.globalCompositeOperation="source-over",f.hasBounds){for(t=0;t=500){var l="";s.timing&&(l+="fps: "+Math.round(s.timing.fps)+" "),e.debugString=l,e.debugTimestamp=o.timing.timestamp}if(e.debugString){n.font="12px Arial",a.wireframes?n.fillStyle="rgba(255,255,255,0.5)":n.fillStyle="rgba(0,0,0,0.5)";for(var c=e.debugString.split("\n"),d=0;d1?1:0;s1?1:0;a1?1:0;r1?1:0;a1?1:0;r1?1:0;r1?1:0;i0)){var d=o.activeContacts[0].vertex.x,u=o.activeContacts[0].vertex.y;2===o.activeContacts.length&&(d=(o.activeContacts[0].vertex.x+o.activeContacts[1].vertex.x)/2,u=(o.activeContacts[0].vertex.y+o.activeContacts[1].vertex.y)/2),i.bodyB===i.supports[0].body||!0===i.bodyA.isStatic?a.moveTo(d-8*i.normal.x,u-8*i.normal.y):a.moveTo(d+8*i.normal.x,u+8*i.normal.y),a.lineTo(d,u)}l.wireframes?a.strokeStyle="rgba(255,165,0,0.7)":a.strokeStyle="orange",a.lineWidth=1,a.stroke()},o.separations=function(e,t,n){var o,i,r,s,a,l=n,c=e.options;for(l.beginPath(),a=0;a1?1:0;p=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},t=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var n=t(require("../../../libs/pixi-component")),r=t(require("matter-js")),i=t(require("../../../libs/pixi-math")),o=require("../../../libs/pixi-component/components/generic-component"),a=function(){function t(e){var t=this;this.engine=new n.GameLoop,this.engine.init(e,e.clientWidth,e.clientHeight,1,null,!1),this.random=new i.Random(6489),this.mEngine=r.Engine.create(),this.mWorld=this.mEngine.world,this.runner=r.Runner.create(null),r.Events.on(this.mWorld,"afterAdd",function(e){t.addNewObject(e)}),this.initMatter();var a=r.Mouse.create(this.engine.app.view),l=r.MouseConstraint.create(this.mEngine,{mouse:a});a.scale.x=a.scale.y=this.engine.app.view.width/this.engine.app.view.getBoundingClientRect().width,r.World.add(this.mWorld,l),this.engine.scene.addGlobalComponent(new o.GenericComponent("").doOnUpdate(function(e,n,i){return r.Runner.tick(t.runner,t.mEngine,n)}))}return t.prototype.addNewObject=function(t){var n,r,o,a,l,s,d,c,h,f,u,b;if("body"===t.type)this.engine.app.stage.addChild(new i.MatterBody("matter_body_"+t.id,t,this.mWorld,{showAngleIndicator:!0}));else if("constraint"===t.type)this.engine.app.stage.addChild(new i.MatterConstraint("matter_constraint_"+t.id,t,this.mWorld));else if(t.object)if(t.object.length)try{for(var y=e(t.object),p=y.next();!p.done;p=y.next()){var m=p.value;this.addNewObject(m)}}catch(q){n={error:q}}finally{try{p&&!p.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}else{if(t.object.body&&this.engine.app.stage.addChild(new i.MatterBody("matter_body_"+t.object.body.id,t.object.body,this.mWorld,{showAngleIndicator:!0})),t.object.constraint&&this.engine.app.stage.addChild(new i.MatterConstraint("matter_constraint_"+t.object.constraint.id,t.object.constraint,this.mWorld)),t.object.bodies)try{for(var w=e(t.object.bodies),v=w.next();!v.done;v=w.next()){m=v.value;this.addNewObject(m)}}catch(B){o={error:B}}finally{try{v&&!v.done&&(a=w.return)&&a.call(w)}finally{if(o)throw o.error}}if(t.object.constraints)try{for(var g=e(t.object.constraints),j=g.next();!j.done;j=g.next()){var x=j.value;this.addNewObject(x)}}catch(R){l={error:R}}finally{try{j&&!j.done&&(s=g.return)&&s.call(g)}finally{if(l)throw l.error}}if(t.object.composites)try{for(var _=e(t.object.composites),O=_.next();!O.done;O=_.next()){var C=O.value;this.addNewObject(C)}}catch(S){d={error:S}}finally{try{O&&!O.done&&(c=_.return)&&c.call(_)}finally{if(d)throw d.error}}}if(t.bodies)try{for(var M=e(t.bodies),W=M.next();!W.done;W=M.next()){m=W.value;this.addNewObject(m)}}catch(A){h={error:A}}finally{try{W&&!W.done&&(f=M.return)&&f.call(M)}finally{if(h)throw h.error}}if(t.constraints)try{for(var N=e(t.constraints),E=N.next();!E.done;E=N.next()){x=E.value;this.addNewObject(x)}}catch(G){u={error:G}}finally{try{E&&!E.done&&(b=N.return)&&b.call(N)}finally{if(u)throw u.error}}},t}();exports.MatterBase=a; },{"../../../libs/pixi-component":"rNDA","matter-js":"mG0D","../../../libs/pixi-math":"hhCT","../../../libs/pixi-component/components/generic-component":"OHJr"}],"pvtl":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){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)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),e=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(exports,"__esModule",{value:!0});var r=require("./example-matter-base"),i=e(require("matter-js")),n=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r.prototype.initMatter=function(){i.World.add(this.mWorld,[i.Bodies.rectangle(200,100,60,60,{frictionAir:.001}),i.Bodies.rectangle(400,100,60,60,{frictionAir:.05}),i.Bodies.rectangle(600,100,60,60,{frictionAir:.1}),i.Bodies.rectangle(400,0,800,50,{isStatic:!0}),i.Bodies.rectangle(400,600,800,50,{isStatic:!0}),i.Bodies.rectangle(800,300,50,600,{isStatic:!0}),i.Bodies.rectangle(0,300,50,600,{isStatic:!0})])},r}(r.MatterBase);exports.ExampleMatterAirFriction=n; },{"./example-matter-base":"Hh49","matter-js":"mG0D"}],"uwCg":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){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)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),e=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(exports,"__esModule",{value:!0});var r=e(require("matter-js")),n=require("./example-matter-base"),i=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.initMatter=function(){var t=this,e=r.Body.nextGroup(!0),n=r.Composites.stack(160,290,15,1,0,0,function(t,n){return r.Bodies.rectangle(t-20,n,53,20,{collisionFilter:{group:e},chamfer:5,density:.005,frictionAir:.05,render:{fillStyle:"#575375"}})});r.Composites.chain(n,.3,0,-.3,0,{stiffness:1,length:0,render:{visible:!1}});var i=r.Composites.stack(250,50,6,3,0,0,function(e,n){return r.Bodies.rectangle(e,n,50,50,t.random.uniform(20,40))});r.World.add(this.mWorld,[n,i,r.Bodies.rectangle(30,490,220,380,{isStatic:!0,chamfer:{radius:20}}),r.Bodies.rectangle(770,490,220,380,{isStatic:!0,chamfer:{radius:20}}),r.Constraint.create({pointA:{x:140,y:300},bodyB:n.bodies[0],pointB:{x:-25,y:0},length:2,stiffness:.9}),r.Constraint.create({pointA:{x:660,y:300},bodyB:n.bodies[n.bodies.length-1],pointB:{x:25,y:0},length:2,stiffness:.9})])},n}(n.MatterBase);exports.ExampleMatterBridge=i; },{"matter-js":"mG0D","./example-matter-base":"Hh49"}],"ReYy":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){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)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),e=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(exports,"__esModule",{value:!0});var r=require("./example-matter-base"),i=e(require("matter-js")),o=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r.prototype.initMatter=function(){i.World.add(this.mWorld,[i.Bodies.rectangle(400,0,800,50,{isStatic:!0}),i.Bodies.rectangle(400,600,800,50,{isStatic:!0}),i.Bodies.rectangle(800,300,50,600,{isStatic:!0}),i.Bodies.rectangle(0,300,50,600,{isStatic:!0})]);var t=.9;i.World.add(this.mWorld,i.Composites.car(150,100,150*t,30*t,30*t)),t=.8,i.World.add(this.mWorld,i.Composites.car(350,300,150*t,30*t,30*t)),i.World.add(this.mWorld,[i.Bodies.rectangle(200,150,400,20,{isStatic:!0,angle:.06*Math.PI}),i.Bodies.rectangle(500,350,650,20,{isStatic:!0,angle:.06*-Math.PI}),i.Bodies.rectangle(300,560,600,20,{isStatic:!0,angle:.04*Math.PI})])},r}(r.MatterBase);exports.ExampleMatterCar=o; },{"./example-matter-base":"Hh49","matter-js":"mG0D"}],"YuYW":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(e,o)};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),e=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)Object.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e.default=t,e};Object.defineProperty(exports,"__esModule",{value:!0});var o=require("./example-matter-base"),i=e(require("matter-js")),n=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return t(o,e),o.prototype.initMatter=function(){var t=i.Body.nextGroup(!0),e=i.Composites.stack(100,50,8,1,10,10,function(e,o){return i.Bodies.rectangle(e,o,50,20,{collisionFilter:{group:t}})});i.Composites.chain(e,.5,0,-.5,0,{stiffness:.8,length:2,render:{type:"line"}}),i.Composite.add(e,i.Constraint.create({bodyB:e.bodies[0],pointB:{x:-25,y:0},pointA:{x:e.bodies[0].position.x,y:e.bodies[0].position.y},stiffness:.5})),t=i.Body.nextGroup(!0);var o=i.Composites.stack(350,50,10,1,10,10,function(e,o){return i.Bodies.circle(e,o,20,{collisionFilter:{group:t}})});i.Composites.chain(o,.5,0,-.5,0,{stiffness:.8,length:2,render:{type:"line"}}),i.Composite.add(o,i.Constraint.create({bodyB:o.bodies[0],pointB:{x:-20,y:0},pointA:{x:o.bodies[0].position.x,y:o.bodies[0].position.y},stiffness:.5})),t=i.Body.nextGroup(!0);var n=i.Composites.stack(600,50,13,1,10,10,function(e,o){return i.Bodies.rectangle(e-20,o,50,20,{collisionFilter:{group:t},chamfer:5})});i.Composites.chain(n,.3,0,-.3,0,{stiffness:1,length:0}),i.Composite.add(n,i.Constraint.create({bodyB:n.bodies[0],pointB:{x:-20,y:0},pointA:{x:n.bodies[0].position.x,y:n.bodies[0].position.y},stiffness:.5})),i.World.add(this.mWorld,[e,o,n,i.Bodies.rectangle(400,600,1200,50.5,{isStatic:!0})])},o}(o.MatterBase);exports.ExampleMatterChains=n; },{"./example-matter-base":"Hh49","matter-js":"mG0D"}],"vPGj":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){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)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),e=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(exports,"__esModule",{value:!0});var r=require("./example-matter-base"),i=e(require("matter-js")),o=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r.prototype.initMatter=function(){i.World.add(this.mWorld,[i.Bodies.rectangle(400,0,800,50,{isStatic:!0}),i.Bodies.rectangle(400,600,800,50,{isStatic:!0}),i.Bodies.rectangle(800,300,50,600,{isStatic:!0}),i.Bodies.rectangle(0,300,50,600,{isStatic:!0})]),i.World.add(this.mWorld,[i.Bodies.rectangle(300,180,700,20,{isStatic:!0,angle:.06*Math.PI}),i.Bodies.rectangle(300,70,40,40,{friction:.001})]),i.World.add(this.mWorld,[i.Bodies.rectangle(300,350,700,20,{isStatic:!0,angle:.06*Math.PI}),i.Bodies.rectangle(300,250,40,40,{friction:5e-4})]),i.World.add(this.mWorld,[i.Bodies.rectangle(300,520,700,20,{isStatic:!0,angle:.06*Math.PI}),i.Bodies.rectangle(300,430,40,40,{friction:0})])},r}(r.MatterBase);exports.ExampleMatterFriction=o; },{"./example-matter-base":"Hh49","matter-js":"mG0D"}],"Egez":[function(require,module,exports) { "use strict";var r=this&&this.__extends||function(){var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var e in t)t.hasOwnProperty(e)&&(r[e]=t[e])})(t,e)};return function(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),t=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var t={};if(null!=r)for(var e in r)Object.hasOwnProperty.call(r,e)&&(t[e]=r[e]);return t.default=r,t};Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./example-matter-base"),o=t(require("matter-js")),n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.initMatter=function(){var r=this,t=o.Composites.stack(20,20,10,5,0,0,function(t,e){var n=Math.round(r.random.uniform(1,8)),i=null;switch((n=3===n?4:n)>2&&r.random.uniform()>.7&&(i={radius:10}),Math.round(r.random.uniform(0,1))){case 0:return r.random.uniform()<.8?o.Bodies.rectangle(t,e,r.random.uniform(25,50),r.random.uniform(25,50),{chamfer:i}):o.Bodies.rectangle(t,e,r.random.uniform(80,120),r.random.uniform(25,30),{chamfer:i});case 1:return o.Bodies.polygon(t,e,n,r.random.uniform(25,50),{chamfer:i})}});o.World.add(this.mWorld,t),o.World.add(this.mWorld,[o.Bodies.rectangle(400,0,800,50,{isStatic:!0}),o.Bodies.rectangle(400,600,800,50,{isStatic:!0}),o.Bodies.rectangle(800,300,50,600,{isStatic:!0}),o.Bodies.rectangle(0,300,50,600,{isStatic:!0})])},e}(e.MatterBase);exports.ExampleMatterMixedShapes=n; },{"./example-matter-base":"Hh49","matter-js":"mG0D"}],"PqY5":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){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)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),e=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(exports,"__esModule",{value:!0});var r=require("./example-matter-base"),o=e(require("matter-js")),n=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r.prototype.initMatter=function(){var t=o.Composites.newtonsCradle(280,100,5,30,200);o.World.add(this.mWorld,t),o.Body.translate(t.bodies[0],{x:-180,y:-100}),t=o.Composites.newtonsCradle(280,380,7,20,140),o.World.add(this.mWorld,t),o.Body.translate(t.bodies[0],{x:-140,y:-100})},r}(r.MatterBase);exports.ExampleMatterNewtonCradle=n; },{"./example-matter-base":"Hh49","matter-js":"mG0D"}],"YEEc":[function(require,module,exports) { "use strict";var e=this&&this.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),t=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var n=r(require("../../../libs/pixi-component")),i=require("../../../libs/pixi-math"),o=function(){return function(e,r,o,a){this.engine=new n.GameLoop,this.engine.init(e,e.clientWidth,e.clientHeight,1,null,!1);var u=this.engine.scene;u.clearScene();for(var l=new PIXI.Rectangle(0,0,u.app.screen.width,u.app.screen.height),c=new i.QuadTree(l,o,a),s=new Array,h=0;hu.app.screen.width||h.x<0)&&(h.vx*=-1),(h.y>u.app.screen.height||h.y<0)&&(h.vy*=-1),c.insert(h)}}catch(p){i={error:p}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}})).withComponent(new n.GenericComponent("Renderer").doOnUpdate(function(e,r,n){var i,o,a=e.owner.asGraphics();a.clear(),a.beginFill(15298415);try{for(var u=t(s),l=u.next();!l.done;l=u.next()){var h=l.value;a.drawCircle(h.x,h.y,4)}}catch(p){i={error:p}}finally{try{l&&!l.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}a.endFill(),a.lineStyle(1,4694485),function e(t,r){null==r.topRight?t.drawRect(r.bounds.x,r.bounds.y,r.bounds.width,r.bounds.height):(e(t,r.topLeft),e(t,r.topRight),e(t,r.bottomLeft),e(t,r.bottomRight))}(a,c)})).asGraphics().withParent(u.stage).build()}}(),a=function(t){function r(e){return t.call(this,e,8,2,3)||this}return e(r,t),r}(o);exports.ExampleQuadTreeSmall=a;var u=function(t){function r(e){return t.call(this,e,20,5,4)||this}return e(r,t),r}(o);exports.ExampleQuadTreeMedium=u;var l=function(t){function r(e){return t.call(this,e,50,10,5)||this}return e(r,t),r}(o);exports.ExampleQuadTreeLarge=l;var c=function(t){function r(e){return t.call(this,e,100,2,10)||this}return e(r,t),r}(o);exports.ExampleQuadTreeUltraLarge=c; },{"../../../libs/pixi-component":"rNDA","../../../libs/pixi-math":"hhCT"}],"wGCg":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){var t=function(i,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(i,e)};return function(i,e){function n(){this.constructor=i}t(i,e),i.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var i={};if(null!=t)for(var e in t)Object.hasOwnProperty.call(t,e)&&(i[e]=t[e]);return i.default=t,i};Object.defineProperty(exports,"__esModule",{value:!0});var e,n=i(require("../../../libs/pixi-component"));!function(t){t[t.EULER_EXPLICIT=0]="EULER_EXPLICIT",t[t.EULER_IMPROVED=1]="EULER_IMPROVED",t[t.EULER_IMPLICIT=2]="EULER_IMPLICIT"}(e||(e={}));var o=function(i){function e(t,e,n){var o=i.call(this)||this;return o.color=t,o.velocity=e,o.acceleration=n,o}return t(e,i),e.prototype.onInit=function(){this.position=new n.Vector(this.owner.position.x,this.owner.position.y)},e.prototype.onUpdate=function(t,i){this.updateDynamics(.003*t),this.owner.position.set(this.position.x,this.position.y);var e=this.owner.asGraphics();e.clear(),e.beginFill(this.color),e.drawCircle(0,0,10),e.lineStyle(1,this.color),e.lineTo(this.velocity.x,this.velocity.y),this.owner.position.y>=this.scene.app.screen.height&&this.owner.remove()},e}(n.Component),r=function(i){function e(){return null!==i&&i.apply(this,arguments)||this}return t(e,i),e.prototype.updateDynamics=function(t){var i=this.velocity.clone();this.velocity=this.velocity.add(this.acceleration.multiply(t)),this.position=this.position.add(i.multiply(t))},e}(o),s=function(i){function e(){return null!==i&&i.apply(this,arguments)||this}return t(e,i),e.prototype.updateDynamics=function(t){var i=this.velocity.clone();this.velocity=this.velocity.add(this.acceleration.multiply(t)),this.position=this.position.add(i.add(this.velocity).multiply(.5*t))},e}(o),c=function(i){function e(){return null!==i&&i.apply(this,arguments)||this}return t(e,i),e.prototype.updateDynamics=function(t){this.velocity=this.velocity.add(this.acceleration.multiply(t)),this.position=this.position.add(this.velocity.multiply(t))},e}(o),a=function(i){function o(t){var e=i.call(this)||this;return e.frequency=.5,e.particleFreq=t,e}return t(o,i),o.prototype.onUpdate=function(t,i){this.createProjectile(16777215,0,e.EULER_EXPLICIT),this.createProjectile(16711680,1,e.EULER_EXPLICIT),this.createProjectile(65280,1,e.EULER_IMPROVED),this.createProjectile(65535,1,e.EULER_IMPLICIT)},o.prototype.createProjectile=function(t,i,o){var a,p=Math.sqrt(this.scene.app.screen.width)*Math.cos(this.owner.rotation)*4,l=Math.sqrt(this.scene.app.screen.width)*Math.sin(this.owner.rotation)*4,h=new n.Vector(p,l),u=new n.Vector(0,.75*Math.sqrt(this.scene.app.screen.height)),y=new n.Graphics;switch(y.pivot.set(1,1),y.alpha=i,o){case e.EULER_EXPLICIT:a=new r(t,h,u);break;case e.EULER_IMPLICIT:a=new c(t,h,u);break;case e.EULER_IMPROVED:a=new s(t,h,u)}a.frequency=this.particleFreq,new n.Builder(this.scene).localPos(this.owner.position.x,this.owner.position.y).withComponent(a).withParent(this.scene.stage).buildInto(y)},o}(n.Component),p=function(){return function(t){this.engine=new n.GameLoop,this.engine.init(t,t.clientWidth,t.clientHeight,1,null,!1);var i=new n.Graphics("emitter");i.beginFill(16711680),i.drawPolygon([0,0,40,0,40,20,0,20,0,0]),i.endFill(),i.pivot.set(i.width/2,i.height/2),i.position.set(.03*this.engine.scene.app.screen.width,.9*this.engine.scene.app.screen.height),i.rotation=-Math.PI/3,i.addComponent(new a(this.particleUpdateFreq())),this.engine.scene.stage.addChild(i)}}(),l=function(i){function e(){return null!==i&&i.apply(this,arguments)||this}return t(e,i),e.prototype.particleUpdateFreq=function(){return 60},e}(p);exports.ExampleDynamicBallistic60=l;var h=function(i){function e(){return null!==i&&i.apply(this,arguments)||this}return t(e,i),e.prototype.particleUpdateFreq=function(){return 20},e}(p);exports.ExampleDynamicBallistic20=h;var u=function(i){function e(){return null!==i&&i.apply(this,arguments)||this}return t(e,i),e.prototype.particleUpdateFreq=function(){return 5},e}(p);exports.ExampleDynamicBallistic5=u; },{"../../../libs/pixi-component":"rNDA"}],"UtFA":[function(require,module,exports) { "use strict";var e=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),t=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var i,n=t(require("../../../libs/pixi-component"));!function(e){e[e.EULER_EXPLICIT=0]="EULER_EXPLICIT",e[e.EULER_IMPROVED=1]="EULER_IMPROVED",e[e.EULER_IMPLICIT=2]="EULER_IMPLICIT"}(i||(i={}));var s=function(t){function i(e,i,n){var s=t.call(this)||this;return s.velocity=i,s.origin=n,s.color=e,s}return e(i,t),i.prototype.onInit=function(){this.position=new n.Vector(this.owner.position.x,this.owner.position.y)},i.prototype.onUpdate=function(e,t){this.acceleration=this.origin.subtract(this.position),this.updateDynamics(.001*e),this.owner.position.set(this.position.x,this.position.y);var i=this.owner.asGraphics();i.clear(),i.beginFill(this.color),i.drawCircle(0,0,10),i.lineStyle(1,this.color),i.lineTo(this.velocity.x,this.velocity.y)},i}(n.Component),r=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.prototype.updateDynamics=function(e){var t=this.velocity.clone();this.velocity=this.velocity.add(this.acceleration.multiply(e)),this.position=this.position.add(t.multiply(e)),console.log(this.velocity.x,this.velocity.y,this.position.x,this.position.y)},i}(s),o=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.prototype.updateDynamics=function(e){var t=this.velocity.clone();this.velocity=this.velocity.add(this.acceleration.multiply(e)),this.position=this.position.add(t.add(this.velocity).multiply(.5*e))},i}(s),c=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.prototype.updateDynamics=function(e){this.velocity=this.velocity.add(this.acceleration.multiply(e)),this.position=this.position.add(this.velocity.multiply(e))},i}(s),p=function(){function e(e){this.engine=new n.GameLoop,this.engine.init(e,e.clientWidth,e.clientHeight,1,null,!1);var t=new n.Graphics;t.beginFill(16777215),t.drawCircle(this.engine.scene.app.screen.width/2,this.engine.scene.app.screen.height/2,50),t.endFill(),t.lineStyle(2,5592405),t.arc(this.engine.scene.app.screen.width/2,this.engine.scene.app.screen.height/2,this.engine.scene.app.screen.height/5,0,2*Math.PI,!1),t.arc(this.engine.scene.app.screen.width/2,this.engine.scene.app.screen.height/2,this.engine.scene.app.screen.height/4,0,2*Math.PI,!1),t.arc(this.engine.scene.app.screen.width/2,this.engine.scene.app.screen.height/2,this.engine.scene.app.screen.height/3,0,2*Math.PI,!1),t.arc(this.engine.scene.app.screen.width/2,this.engine.scene.app.screen.height/2,this.engine.scene.app.screen.height/2,0,2*Math.PI,!1),this.engine.scene.stage.addChild(t),this.createProjectile(16711680,this.particleUpdateFreq(),i.EULER_EXPLICIT),this.createProjectile(65280,this.particleUpdateFreq(),i.EULER_IMPROVED),this.createProjectile(65535,this.particleUpdateFreq(),i.EULER_IMPLICIT)}return e.prototype.createProjectile=function(e,t,s){var p,h=this.engine.scene.app.screen.height*(.5-1/3),a=new n.Vector(0,h),l=new n.Vector(this.engine.scene.app.screen.width/2,this.engine.scene.app.screen.height/2),u=new n.Graphics;switch(u.endFill(),u.pivot.set(1,1),s){case i.EULER_EXPLICIT:p=new r(e,a,l);break;case i.EULER_IMPLICIT:p=new c(e,a,l);break;case i.EULER_IMPROVED:p=new o(e,a,l)}p.frequency=t,new n.Builder(this.engine.scene).localPos(this.engine.scene.app.screen.width/3,this.engine.scene.app.screen.height/2).withComponent(p).withParent(this.engine.scene.stage).buildInto(u)},e}(),h=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.prototype.particleUpdateFreq=function(){return 60},i}(p);exports.ExampleDynamicCircle60=h;var a=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.prototype.particleUpdateFreq=function(){return 20},i}(p);exports.ExampleDynamicCircle20=a;var l=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.prototype.particleUpdateFreq=function(){return 5},i}(p);exports.ExampleDynamicCircle5=l; },{"../../../libs/pixi-component":"rNDA"}],"TOlM":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){var t=function(i,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(i,e)};return function(i,e){function o(){this.constructor=i}t(i,e),i.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var i={};if(null!=t)for(var e in t)Object.hasOwnProperty.call(t,e)&&(i[e]=t[e]);return i.default=t,i};Object.defineProperty(exports,"__esModule",{value:!0});var e=i(require("../../../libs/pixi-component")),o=require("../../../libs/pixi-math/math/steering"),n="velocity",r="acceleration",s=1e3,a=function(i){function a(t,n){void 0===t&&(t=1),void 0===n&&(n=new e.Vector(0,0));var r=i.call(this)||this;return r.math=new o.SteeringMath,r.gameSpeed=t,r.initialVelocity=n,r}return t(a,i),a.prototype.onInit=function(){i.prototype.onInit.call(this),this.owner.assignAttribute(n,this.initialVelocity),this.owner.assignAttribute(r,new e.Vector(0,0))},Object.defineProperty(a.prototype,"velocity",{get:function(){return this.owner.getAttribute(n)},set:function(t){this.owner.assignAttribute(n,t)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"acceleration",{get:function(){return this.owner.getAttribute(r)},set:function(t){this.owner.assignAttribute(r,t)},enumerable:!0,configurable:!0}),a.prototype.onUpdate=function(t,i){var e=this.calcForce(t);if(null!=e){this.acceleration=e,this.acceleration=this.acceleration.limit(30),this.velocity=this.velocity.limit(s),this.applyVelocity(t,this.gameSpeed),this.applyPosition(t,this.gameSpeed);var o=Math.atan2(this.velocity.y,this.velocity.x);this.owner.rotation=o;var n=this.owner.getBounds(),r=new PIXI.Rectangle(0,0,this.scene.app.screen.width,this.scene.app.screen.height);n.rightr.right&&this.velocity.x>0&&(this.owner.position.x-=r.width+n.width),n.bottomr.bottom&&this.velocity.y>0&&(this.owner.position.y-=r.height+n.height)}},a.prototype.applyVelocity=function(t,i){this.velocity=this.velocity.add(this.acceleration.multiply(.001*t*i))},a.prototype.applyPosition=function(t,i){var e=this.velocity.multiply(.001*t*i);this.owner.position.x+=e.x,this.owner.position.y+=e.y},a}(e.Component);exports.SteeringComponent=a;var c=function(i){function o(t){var o=i.call(this,10,new e.Vector(100,25))||this;return o.target=t,o}return t(o,i),o.prototype.calcForce=function(t){var i=new e.Vector(this.target.position.x,this.target.position.y),o=new e.Vector(this.owner.position.x,this.owner.position.y),n=this.math.seek(i,o,this.velocity,s,null).limit(5);return i.distance(o)<1?(this.finish(),null):n},o}(a);exports.SeekSteering=c;var h=function(i){function o(t){var e=i.call(this,8)||this;return e.target=t,e}return t(o,i),o.prototype.calcForce=function(t){var i=new e.Vector(this.target.position.x,this.target.position.y),o=new e.Vector(this.owner.position.x,this.owner.position.y),r=this.target.getAttribute(n);return this.math.evade(i,o,30,this.velocity,r)},o}(a);exports.EvadeSteering=h;var p=function(i){function o(t){var e=i.call(this,10)||this;return e.target=t,e}return t(o,i),o.prototype.calcForce=function(t){var i=new e.Vector(this.target.position.x,this.target.position.y),o=new e.Vector(this.owner.position.x,this.owner.position.y),r=this.target.getAttribute(n);return this.math.pursuit(i,o,300,this.velocity,r)},o}(a);exports.PursuitSteering=p;var l=function(i){function o(t,o,n,r,s,a){var c=i.call(this,10,new e.Vector(1,1))||this;return c.wanderTarget=new e.Vector(0,0),c.angle=0,c.wanderDistance=t,c.wanderRadius=o,c.wanderJittering=n,c.boid=r,c.dot=s,c.circle=a,c}return t(o,i),o.prototype.onUpdate=function(t,e){i.prototype.onUpdate.call(this,t,e);var o=Math.atan2(this.acceleration.y,this.acceleration.x),n=Math.atan2(this.velocity.y,this.velocity.x);this.dot||(this.boid.rotation=n),this.dot&&this.dot.position.set(this.wanderDistance+Math.cos(o-n)*this.wanderRadius,Math.sin(o-n)*this.wanderRadius),this.circle&&this.circle.position.set(this.wanderDistance,0)},o.prototype.calcForce=function(t){var i=this.math.wander(this.velocity,this.wanderTarget,this.wanderRadius,this.wanderDistance,this.wanderJittering,t);return this.wanderTarget=i[1],i[0]},o}(a);exports.WanderSteering=l; },{"../../../libs/pixi-component":"rNDA","../../../libs/pixi-math/math/steering":"CEfC"}],"NRr7":[function(require,module,exports) { "use strict";var e=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(i[n]=e[n]);return i.default=e,i};Object.defineProperty(exports,"__esModule",{value:!0});var i=e(require("../../../libs/pixi-component")),n=require("./example-steering"),t=function(){return function(e){this.engine=new i.GameLoop,this.engine.init(e,e.clientWidth,e.clientHeight,1,null,!1);var t=this.engine.scene,r=new i.Graphics("TARGET");r.beginFill(15298415),r.drawCircle(0,0,40),r.endFill(),r.position.x=t.app.screen.width/2,r.position.y=t.app.screen.height/2,t.stage.addChild(r);var l=new i.Graphics("SEEK");l.beginFill(4694485),l.drawPolygon([-10,-10,-10,10,15,0]),l.endFill(),l.scale.set(3),t.stage.addChild(l),l.addComponent(new n.SeekSteering(r))}}();exports.ExampleSteeringSeek=t; },{"../../../libs/pixi-component":"rNDA","./example-steering":"TOlM"}],"ArOy":[function(require,module,exports) { "use strict";var e=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(i[n]=e[n]);return i.default=e,i};Object.defineProperty(exports,"__esModule",{value:!0});var i=e(require("../../../libs/pixi-component")),n=require("./example-steering"),t=function(){return function(e){this.engine=new i.GameLoop,this.engine.init(e,e.clientWidth,e.clientHeight,1,null,!1);var t=this.engine.scene,r=new i.Graphics("WANDER");r.beginFill(4694485),r.drawPolygon([-10,-10,-10,10,15,0]),r.endFill(),r.position.set(.7*t.app.screen.width,.8*t.app.screen.height),r.scale.set(2),r.addComponent(new n.WanderSteering(20,10,.1,r)),t.stage.addChild(r);var s=new i.Graphics("PURSUIT");s.beginFill(15732735),s.drawPolygon([-10,-10,-10,10,15,0]),s.endFill(),s.position.set(t.app.screen.width/4,t.app.screen.height/2),s.scale.set(3),t.stage.addChild(s),s.addComponent(new n.PursuitSteering(r))}}();exports.ExampleSteeringPursuit=t; },{"../../../libs/pixi-component":"rNDA","./example-steering":"TOlM"}],"JKCu":[function(require,module,exports) { "use strict";var e=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(i[n]=e[n]);return i.default=e,i};Object.defineProperty(exports,"__esModule",{value:!0});var i=e(require("../../../libs/pixi-component")),n=require("./example-steering"),t=function(){return function(e){this.engine=new i.GameLoop,this.engine.init(e,e.clientWidth,e.clientHeight,1,null,!1);var t=this.engine.scene,r=new i.Graphics("EVADE"),s=new i.Graphics("PURSUIT");r.beginFill(4694485),r.drawPolygon([-10,-10,-10,10,15,0]),r.endFill(),r.position.set(.7*t.app.screen.width,.8*t.app.screen.height),r.scale.set(2),r.addComponent(new n.EvadeSteering(s));var a=new i.Graphics("PURSUIT2");a.beginFill(15328623),a.drawPolygon([-10,-10,-10,10,15,0]),a.endFill(),a.position.set(.3*t.app.screen.width,.8*t.app.screen.height),a.scale.set(3),a.addComponent(new n.PursuitSteering(s)),s.beginFill(15732735),s.drawPolygon([-10,-10,-10,10,15,0]),s.endFill(),s.position.set(t.app.screen.width/4,t.app.screen.height/2),s.scale.set(3),t.stage.addChild(s),s.addComponent(new n.PursuitSteering(r)),t.stage.addChild(r),t.stage.addChild(a)}}();exports.ExampleSteeringEvade=t; },{"../../../libs/pixi-component":"rNDA","./example-steering":"TOlM"}],"v0o3":[function(require,module,exports) { "use strict";var e=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n.default=e,n};Object.defineProperty(exports,"__esModule",{value:!0});var n=e(require("../../../libs/pixi-component")),i=require("./example-steering"),r=function(){function e(e){this.engine=new n.GameLoop,this.engine.init(e,e.clientWidth,e.clientHeight,1,null,!1),this.createWander(100,50,.1,15328623),this.createWander(50,20,.5,4694485),this.createWander(0,50,.8,2778564),this.createWander(20,60,.9,6940065)}return e.prototype.createWander=function(e,r,t,a){var d=this.engine.scene,l=new n.Container("PARENT");d.app.stage.addChild(l);var s=new n.Graphics("CIRCLE");s.lineStyle(2,16711935),s.drawCircle(0,0,r),s.endFill(),l.addChild(s);var o=new n.Graphics("DOT");o.beginFill(16777215),o.drawCircle(0,0,10),o.endFill(),l.addChild(o);var c=new n.Graphics("WANDER");c.beginFill(a),c.drawPolygon([-10,-10,-10,10,15,0]),c.endFill(),c.scale.set(3),l.addChild(c),l.position.set(d.app.screen.width*Math.random(),d.app.screen.height*Math.random()),l.addComponent(new i.WanderSteering(e,r,t,c,o,s))},e}();exports.ExampleSteeringWander=r; },{"../../../libs/pixi-component":"rNDA","./example-steering":"TOlM"}],"MKsx":[function(require,module,exports) { "use strict";var e=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("../../../libs/pixi-component")),n=require("./example-steering"),a=function(){function e(e){this.objects=[],this.engine=new t.GameLoop,this.engine.init(e,e.clientWidth,e.clientHeight,1,null,!1);for(var n=0;n<100;n++)this.createRandomObject()}return e.prototype.createRandomObject=function(){var e=this.engine.scene,a=new t.Graphics;a.beginFill((Math.floor(255*Math.random())<<16)+(Math.floor(255*Math.random())<<8)+Math.floor(255*Math.random())),a.drawPolygon([-10,-10,-10,10,15,0]),a.endFill(),a.position.set(e.app.screen.width*Math.random(),e.app.screen.height*Math.random()),a.scale.set(1+3*Math.random());var o=0;if(Math.random()>.5&&0!==this.objects.length){var r=this.objects[Math.floor(Math.random()*(this.objects.length-1))];a.addComponent(new n.PursuitSteering(r)),o++}else if(Math.random()>.7&&0!==this.objects.length){r=this.objects[Math.floor(Math.random()*(this.objects.length-1))];a.addComponent(new n.EvadeSteering(r)),o++}Math.random()>.5&&(a.addComponent(new n.WanderSteering(100*Math.random(),50*Math.random(),Math.random(),a)),o++),0!==o&&(this.objects.push(a),e.stage.addChild(a))},e}();exports.ExampleSteeringMultiple=a; },{"../../../libs/pixi-component":"rNDA","./example-steering":"TOlM"}],"oDK5":[function(require,module,exports) { "use strict";var t=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var e=function(){function e(t){void 0===t&&(t=0),this.time=0,this.timeScale=1,this._systemTime=0,this._animatebles=[],this._clock=null,this.time=t,this._systemTime=.001*(new Date).getTime()}return e.prototype.advanceTime=function(t){t!=t&&(t=0);var e=.001*Date.now();if(t<0&&(t=e-this._systemTime),this._systemTime=e,1!==this.timeScale&&(t*=this.timeScale),0!==t){t<0?this.time-=t:this.time+=t;for(var i=0,n=0,l=this._animatebles.length;i0&&(this._animatebles[i-n]=s,this._animatebles[i]=null),s.advanceTime(t)):n++}if(n>0){for(l=this._animatebles.length;i=0&&(this._animatebles[e]=null,t.clock=null)},e.prototype.clear=function(){var e,i;try{for(var n=t(this._animatebles),l=n.next();!l.done;l=n.next()){var s=l.value;null!==s&&(s.clock=null)}}catch(o){e={error:o}}finally{try{l&&!l.done&&(i=n.return)&&i.call(n)}finally{if(e)throw e.error}}},Object.defineProperty(e.prototype,"clock",{get:function(){return this._clock},set:function(t){this._clock!==t&&(null!==this._clock&&this._clock.remove(this),this._clock=t,null!==this._clock&&this._clock.add(this))},enumerable:!0,configurable:!0}),e}();exports.WorldClock=e; },{}],"g7m0":[function(require,module,exports) { "use strict";var o=this&&this.__values||function(o){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&o[n],e=0;if(t)return t.call(o);if(o&&"number"==typeof o.length)return{next:function(){return o&&e>=o.length&&(o=void 0),{value:o&&o[e++],done:!o}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var n=function(){function n(){this.hashCode=n._hashCode++,this._isInPool=!1}return n._returnObject=function(o){var t=String(o.constructor),e=t in n._maxCountMap?n._maxCountMap[t]:n._defaultMaxCount,r=n._poolsMap[t]=n._poolsMap[t]||[];r.lengthe&&(u.length=e),n._maxCountMap[p]=e}else{n._defaultMaxCount=e;try{for(var a=o(Object.keys(n._poolsMap)),i=a.next();!i.done;i=a.next()){var u,p=i.value;(u=n._poolsMap[p]).length>e&&(u.length=e),p in n._maxCountMap&&(n._maxCountMap[p]=e)}}catch(s){r={error:s}}finally{try{i&&!i.done&&(l=a.return)&&l.call(a)}finally{if(r)throw r.error}}}},n.clearPool=function(t){var e,r;if(void 0===t&&(t=null),null!==t){var l=String(t);null!==(u=l in n._poolsMap?n._poolsMap[l]:null)&&u.length>0&&(u.length=0)}else try{for(var a=o(Object.keys(n._poolsMap)),i=a.next();!i.done;i=a.next()){var u,p=i.value;(u=n._poolsMap[p]).length=0}}catch(s){e={error:s}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}},n.borrowObject=function(o){var t=String(o),e=t in n._poolsMap?n._poolsMap[t]:null;if(null!==e&&e.length>0){var r=e.pop();return r._isInPool=!1,r}var l=new o;return l._onClear(),l},n.prototype.returnToPool=function(){this._onClear(),n._returnObject(this)},n._hashCode=0,n._defaultMaxCount=3e3,n._maxCountMap={},n._poolsMap={},n}();exports.BaseObject=n; },{}],"nj0d":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../core/base-object"),n=require("../core/dragonbones"),o=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return t(o,e),o.actionDataToInstance=function(t,e,a){t.type===n.ActionType.Play?e.type=o.FRAME_EVENT:e.type=t.type===n.ActionType.Frame?o.FRAME_EVENT:o.SOUND_EVENT,e.name=t.name,e.armature=a,e.actionData=t,e.data=t.data,null!==t.bone&&(e.bone=a.getBone(t.bone.name)),null!==t.slot&&(e.slot=a.getSlot(t.slot.name))},o.toString=function(){return"[class dragonBones.EventObject]"},o.prototype._onClear=function(){this.time=0,this.type="",this.name="",this.armature=null,this.bone=null,this.slot=null,this.animationState=null,this.actionData=null,this.data=null},o.START="start",o.LOOP_COMPLETE="loopComplete",o.COMPLETE="complete",o.FADE_IN="fadeIn",o.FADE_IN_COMPLETE="fadeInComplete",o.FADE_OUT="fadeOut",o.FADE_OUT_COMPLETE="fadeOutComplete",o.FRAME_EVENT="frameEvent",o.SOUND_EVENT="soundEvent",o}(e.BaseObject);exports.EventObject=o; },{"../core/base-object":"g7m0","../core/dragonbones":"o5u6"}],"o5u6":[function(require,module,exports) { "use strict";var e=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var t,n,o,r,i,a,s,l,u,f,p,c,m,d,y,h,g,x=require("../animation/world-clock"),v=require("../event/event-object");!function(e){e[e.WeigthBoneCount=0]="WeigthBoneCount",e[e.WeigthFloatOffset=1]="WeigthFloatOffset",e[e.WeigthBoneIndices=2]="WeigthBoneIndices",e[e.GeometryVertexCount=0]="GeometryVertexCount",e[e.GeometryTriangleCount=1]="GeometryTriangleCount",e[e.GeometryFloatOffset=2]="GeometryFloatOffset",e[e.GeometryWeightOffset=3]="GeometryWeightOffset",e[e.GeometryVertexIndices=4]="GeometryVertexIndices",e[e.TimelineScale=0]="TimelineScale",e[e.TimelineOffset=1]="TimelineOffset",e[e.TimelineKeyFrameCount=2]="TimelineKeyFrameCount",e[e.TimelineFrameValueCount=3]="TimelineFrameValueCount",e[e.TimelineFrameValueOffset=4]="TimelineFrameValueOffset",e[e.TimelineFrameOffset=5]="TimelineFrameOffset",e[e.FramePosition=0]="FramePosition",e[e.FrameTweenType=1]="FrameTweenType",e[e.FrameTweenEasingOrCurveSampleCount=2]="FrameTweenEasingOrCurveSampleCount",e[e.FrameCurveSamples=3]="FrameCurveSamples",e[e.DeformVertexOffset=0]="DeformVertexOffset",e[e.DeformCount=1]="DeformCount",e[e.DeformValueCount=2]="DeformValueCount",e[e.DeformValueOffset=3]="DeformValueOffset",e[e.DeformFloatOffset=4]="DeformFloatOffset"}(t=exports.BinaryOffset||(exports.BinaryOffset={})),function(e){e[e.Armature=0]="Armature",e[e.MovieClip=1]="MovieClip",e[e.Stage=2]="Stage"}(n=exports.ArmatureType||(exports.ArmatureType={})),function(e){e[e.Bone=0]="Bone",e[e.Surface=1]="Surface"}(o=exports.BoneType||(exports.BoneType={})),function(e){e[e.Image=0]="Image",e[e.Armature=1]="Armature",e[e.Mesh=2]="Mesh",e[e.BoundingBox=3]="BoundingBox",e[e.Path=4]="Path"}(r=exports.DisplayType||(exports.DisplayType={})),function(e){e[e.Rectangle=0]="Rectangle",e[e.Ellipse=1]="Ellipse",e[e.Polygon=2]="Polygon"}(i=exports.BoundingBoxType||(exports.BoundingBoxType={})),function(e){e[e.Play=0]="Play",e[e.Frame=10]="Frame",e[e.Sound=11]="Sound"}(a=exports.ActionType||(exports.ActionType={})),function(e){e[e.Normal=0]="Normal",e[e.Add=1]="Add",e[e.Alpha=2]="Alpha",e[e.Darken=3]="Darken",e[e.Difference=4]="Difference",e[e.Erase=5]="Erase",e[e.HardLight=6]="HardLight",e[e.Invert=7]="Invert",e[e.Layer=8]="Layer",e[e.Lighten=9]="Lighten",e[e.Multiply=10]="Multiply",e[e.Overlay=11]="Overlay",e[e.Screen=12]="Screen",e[e.Subtract=13]="Subtract"}(s=exports.BlendMode||(exports.BlendMode={})),function(e){e[e.None=0]="None",e[e.Line=1]="Line",e[e.Curve=2]="Curve",e[e.QuadIn=3]="QuadIn",e[e.QuadOut=4]="QuadOut",e[e.QuadInOut=5]="QuadInOut"}(l=exports.TweenType||(exports.TweenType={})),function(e){e[e.Action=0]="Action",e[e.ZOrder=1]="ZOrder",e[e.BoneAll=10]="BoneAll",e[e.BoneTranslate=11]="BoneTranslate",e[e.BoneRotate=12]="BoneRotate",e[e.BoneScale=13]="BoneScale",e[e.Surface=50]="Surface",e[e.BoneAlpha=60]="BoneAlpha",e[e.SlotDisplay=20]="SlotDisplay",e[e.SlotColor=21]="SlotColor",e[e.SlotDeform=22]="SlotDeform",e[e.SlotZIndex=23]="SlotZIndex",e[e.SlotAlpha=24]="SlotAlpha",e[e.IKConstraint=30]="IKConstraint",e[e.AnimationProgress=40]="AnimationProgress",e[e.AnimationWeight=41]="AnimationWeight",e[e.AnimationParameter=42]="AnimationParameter"}(u=exports.TimelineType||(exports.TimelineType={})),function(e){e[e.None=0]="None",e[e.Additive=1]="Additive",e[e.Override=2]="Override"}(f=exports.OffsetMode||(exports.OffsetMode={})),function(e){e[e.SameLayer=1]="SameLayer",e[e.SameGroup=2]="SameGroup",e[e.SameLayerAndGroup=3]="SameLayerAndGroup",e[e.All=4]="All",e[e.Single=5]="Single"}(p=exports.AnimationFadeOutMode||(exports.AnimationFadeOutMode={})),function(e){e[e.None=0]="None",e[e.E1D=1]="E1D"}(c=exports.AnimationBlendType||(exports.AnimationBlendType={})),function(e){e[e.Additive=0]="Additive",e[e.Override=1]="Override"}(m=exports.AnimationBlendMode||(exports.AnimationBlendMode={})),function(e){e[e.IK=0]="IK",e[e.Path=1]="Path"}(d=exports.ConstraintType||(exports.ConstraintType={})),function(e){e[e.Fixed=0]="Fixed",e[e.Percent=1]="Percent"}(y=exports.PositionMode||(exports.PositionMode={})),function(e){e[e.Length=0]="Length",e[e.Fixed=1]="Fixed",e[e.Percent=2]="Percent"}(h=exports.SpacingMode||(exports.SpacingMode={})),function(e){e[e.Tangent=0]="Tangent",e[e.Chain=1]="Chain",e[e.ChainScale=2]="ChainScale"}(g=exports.RotateMode||(exports.RotateMode={}));var T=function(){function t(e){this._clock=new x.WorldClock,this._events=[],this._objects=[],this._eventManager=null,this._eventManager=e,console.info("DragonBones: "+t.VERSION+"\nWebsite: http://dragonbones.com/\nSource and Demo: https://github.com/DragonBones/")}return t.prototype.advanceTime=function(t){var n,o;if(this._objects.length>0){try{for(var r=e(this._objects),i=r.next();!i.done;i=r.next()){i.value.returnToPool()}}catch(u){n={error:u}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}this._objects.length=0}if(this._clock.advanceTime(t),this._events.length>0){for(var a=0;a0?-Math.PI:Math.PI},t.prototype.toString=function(){return"[object dragonBones.Transform] x:"+this.x+" y:"+this.y+" skewX:"+180*this.skew/Math.PI+" skewY:"+180*this.rotation/Math.PI+" scaleX:"+this.scaleX+" scaleY:"+this.scaleY},t.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this.skew=t.skew,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this},t.prototype.identity=function(){return this.x=this.y=0,this.skew=this.rotation=0,this.scaleX=this.scaleY=1,this},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this.skew+=t.skew,this.rotation+=t.rotation,this.scaleX*=t.scaleX,this.scaleY*=t.scaleY,this},t.prototype.minus=function(t){return this.x-=t.x,this.y-=t.y,this.skew-=t.skew,this.rotation-=t.rotation,this.scaleX/=t.scaleX,this.scaleY/=t.scaleY,this},t.prototype.fromMatrix=function(s){var i=this.scaleX,a=this.scaleY,h=t.PI_Q;this.x=s.tx,this.y=s.ty,this.rotation=Math.atan(s.b/s.a);var o=Math.atan(-s.c/s.d);return this.scaleX=this.rotation>-h&&this.rotation-h&&o=0&&this.scaleX<0&&(this.scaleX=-this.scaleX,this.rotation=this.rotation-Math.PI),a>=0&&this.scaleY<0&&(this.scaleY=-this.scaleY,o-=Math.PI),this.skew=o-this.rotation,this},t.prototype.toMatrix=function(t){return 0===this.rotation?(t.a=1,t.b=0):(t.a=Math.cos(this.rotation),t.b=Math.sin(this.rotation)),0===this.skew?(t.c=-t.b,t.d=t.a):(t.c=-Math.sin(this.skew+this.rotation),t.d=Math.cos(this.skew+this.rotation)),1!==this.scaleX&&(t.a*=this.scaleX,t.b*=this.scaleX),1!==this.scaleY&&(t.c*=this.scaleY,t.d*=this.scaleY),t.tx=this.x,t.ty=this.y,this},t.PI=Math.PI,t.PI_D=2*Math.PI,t.PI_H=Math.PI/2,t.PI_Q=Math.PI/4,t.RAD_DEG=180/Math.PI,t.DEG_RAD=Math.PI/180,t}();exports.Transform=t; },{}],"Nh8j":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=function(){function t(t,i,h,e){void 0===t&&(t=0),void 0===i&&(i=0),void 0===h&&(h=0),void 0===e&&(e=0),this.x=t,this.y=i,this.width=h,this.height=e}return t.prototype.copyFrom=function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},t.prototype.clear=function(){this.x=this.y=0,this.width=this.height=0},t}();exports.Rectangle=t; },{}],"jRSw":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=function(){function t(t,o){void 0===t&&(t=0),void 0===o&&(o=0),this.x=t,this.y=o}return t.prototype.copyFrom=function(t){this.x=t.x,this.y=t.y},t.prototype.clear=function(){this.x=this.y=0},t}();exports.Point=t; },{}],"LGEI":[function(require,module,exports) { "use strict";var t=this&&this.__extends||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)n.hasOwnProperty(e)&&(t[e]=n[e])})(n,e)};return function(n,e){function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),n=this&&this.__values||function(t){var n="function"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../core/base-object"),r=require("../core/dragonbones"),o=require("../geom/transform"),i=require("../geom/point"),a=function(){function t(){this.weight=null}return t.prototype.clear=function(){this.isShared||null===this.weight||this.weight.returnToPool(),this.isShared=!1,this.inheritDeform=!1,this.offset=0,this.data=null,this.weight=null},t.prototype.shareFrom=function(t){this.isShared=!0,this.offset=t.offset,this.weight=t.weight},Object.defineProperty(t.prototype,"vertexCount",{get:function(){return this.data.intArray[this.offset+r.BinaryOffset.GeometryVertexCount]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"triangleCount",{get:function(){return this.data.intArray[this.offset+r.BinaryOffset.GeometryTriangleCount]},enumerable:!0,configurable:!0}),t}();exports.GeometryData=a;var s=function(n){function e(){var t=null!==n&&n.apply(this,arguments)||this;return t.transform=new o.Transform,t}return t(e,n),e.prototype._onClear=function(){this.name="",this.path="",this.transform.identity(),this.parent=null},e}(e.BaseObject);exports.DisplayData=s;var u=function(n){function e(){var t=null!==n&&n.apply(this,arguments)||this;return t.pivot=new i.Point,t}return t(e,n),e.toString=function(){return"[class dragonBones.ImageDisplayData]"},e.prototype._onClear=function(){n.prototype._onClear.call(this),this.type=r.DisplayType.Image,this.pivot.clear(),this.texture=null},e}(s);exports.ImageDisplayData=u;var l=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t.actions=[],t}return t(o,e),o.toString=function(){return"[class dragonBones.ArmatureDisplayData]"},o.prototype.addAction=function(t){this.actions.push(t)},o.prototype._onClear=function(){var t,o;e.prototype._onClear.call(this);try{for(var i=n(this.actions),a=i.next();!a.done;a=i.next()){a.value.returnToPool()}}catch(s){t={error:s}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(t)throw t.error}}this.type=r.DisplayType.Armature,this.inheritAnimation=!1,this.actions.length=0,this.armature=null},o}(s);exports.ArmatureDisplayData=l;var p=function(n){function e(){var t=null!==n&&n.apply(this,arguments)||this;return t.geometry=new a,t}return t(e,n),e.toString=function(){return"[class dragonBones.MeshDisplayData]"},e.prototype._onClear=function(){n.prototype._onClear.call(this),this.type=r.DisplayType.Mesh,this.geometry.clear(),this.texture=null},e}(s);exports.MeshDisplayData=p;var h=function(n){function e(){var t=null!==n&&n.apply(this,arguments)||this;return t.boundingBox=null,t}return t(e,n),e.toString=function(){return"[class dragonBones.BoundingBoxDisplayData]"},e.prototype._onClear=function(){n.prototype._onClear.call(this),null!==this.boundingBox&&this.boundingBox.returnToPool(),this.type=r.DisplayType.BoundingBox,this.boundingBox=null},e}(s);exports.BoundingBoxDisplayData=h;var c=function(n){function e(){var t=null!==n&&n.apply(this,arguments)||this;return t.geometry=new a,t.curveLengths=[],t}return t(e,n),e.toString=function(){return"[class dragonBones.PathDisplayData]"},e.prototype._onClear=function(){n.prototype._onClear.call(this),this.type=r.DisplayType.Path,this.closed=!1,this.constantSpeed=!1,this.geometry.clear(),this.curveLengths.length=0},e}(s);exports.PathDisplayData=c;var f=function(n){function e(){var t=null!==n&&n.apply(this,arguments)||this;return t.bones=[],t}return t(e,n),e.toString=function(){return"[class dragonBones.WeightData]"},e.prototype.addBone=function(t){this.bones.push(t)},e.prototype._onClear=function(){this.count=0,this.offset=0,this.bones.length=0},e}(e.BaseObject);exports.WeightData=f; },{"../core/base-object":"g7m0","../core/dragonbones":"o5u6","../geom/transform":"hJt8","../geom/point":"jRSw"}],"QVHz":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(){function e(e,t,i,l,r,s,f,h){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===l&&(l=1),void 0===r&&(r=0),void 0===s&&(s=0),void 0===f&&(f=0),void 0===h&&(h=0),this.alphaMultiplier=e,this.redMultiplier=t,this.greenMultiplier=i,this.blueMultiplier=l,this.alphaOffset=r,this.redOffset=s,this.greenOffset=f,this.blueOffset=h}return e.prototype.copyFrom=function(e){this.alphaMultiplier=e.alphaMultiplier,this.redMultiplier=e.redMultiplier,this.greenMultiplier=e.greenMultiplier,this.blueMultiplier=e.blueMultiplier,this.alphaOffset=e.alphaOffset,this.redOffset=e.redOffset,this.greenOffset=e.greenOffset,this.blueOffset=e.blueOffset},e.prototype.identity=function(){this.alphaMultiplier=this.redMultiplier=this.greenMultiplier=this.blueMultiplier=1,this.alphaOffset=this.redOffset=this.greenOffset=this.blueOffset=0},e}();exports.ColorTransform=e; },{}],"J3qo":[function(require,module,exports) { "use strict";var t=this&&this.__extends||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)n.hasOwnProperty(e)&&(t[e]=n[e])})(n,e)};return function(n,e){function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),n=this&&this.__values||function(t){var n="function"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../core/base-object"),r=require("../core/dragonbones"),o=require("../geom/transform"),a=require("../geom/rectangle"),s=require("./display-data"),i=require("../geom/color-transform"),l=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t.aabb=new a.Rectangle,t.animationNames=[],t.sortedBones=[],t.sortedSlots=[],t.defaultActions=[],t.actions=[],t.bones={},t.slots={},t.constraints={},t.skins={},t.animations={},t.canvas=null,t.userData=null,t}return t(o,e),o.toString=function(){return"[class dragonBones.ArmatureData]"},o.prototype.sortBones=function(){var t,e,r=this.sortedBones.length;if(!(r<=0)){var o=this.sortedBones.concat(),a=0,s=0;for(this.sortedBones.length=0;s=r&&(a=0),!(this.sortedBones.indexOf(i)>=0)){var l=!1;try{for(var h=(t=void 0,n(Object.keys(this.constraints))),u=h.next();!u.done;u=h.next()){var c=u.value,f=this.constraints[c];if(f.root===i&&this.sortedBones.indexOf(f.target)<0){l=!0;break}}}catch(y){t={error:y}}finally{try{u&&!u.done&&(e=h.return)&&e.call(h)}finally{if(t)throw t.error}}l||null!==i.parent&&this.sortedBones.indexOf(i.parent)<0||(this.sortedBones.push(i),s++)}}}},o.prototype.cacheFrames=function(t){var e,r;if(!(this.cacheFrameRate>0)){this.cacheFrameRate=t;try{for(var o=n(Object.keys(this.animations)),a=o.next();!a.done;a=o.next()){var s=a.value;this.animations[s].cacheFrames(this.cacheFrameRate)}}catch(i){e={error:i}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}}},o.prototype.setCacheFrame=function(t,n){var e=this.parent.cachedFrames,r=e.length;return e.length+=10,e[r]=t.a,e[r+1]=t.b,e[r+2]=t.c,e[r+3]=t.d,e[r+4]=t.tx,e[r+5]=t.ty,e[r+6]=n.rotation,e[r+7]=n.skew,e[r+8]=n.scaleX,e[r+9]=n.scaleY,r},o.prototype.getCacheFrame=function(t,n,e){var r=this.parent.cachedFrames;t.a=r[e],t.b=r[e+1],t.c=r[e+2],t.d=r[e+3],t.tx=r[e+4],t.ty=r[e+5],n.rotation=r[e+6],n.skew=r[e+7],n.scaleX=r[e+8],n.scaleY=r[e+9],n.x=t.tx,n.y=t.ty},o.prototype.addBone=function(t){t.name in this.bones?console.warn("Same bone: "+t.name):(this.bones[t.name]=t,this.sortedBones.push(t))},o.prototype.addSlot=function(t){t.name in this.slots?console.warn("Same slot: "+t.name):(this.slots[t.name]=t,this.sortedSlots.push(t))},o.prototype.addConstraint=function(t){t.name in this.constraints?console.warn("Same constraint: "+t.name):this.constraints[t.name]=t},o.prototype.addSkin=function(t){t.name in this.skins?console.warn("Same skin: "+t.name):(t.parent=this,this.skins[t.name]=t,null===this.defaultSkin&&(this.defaultSkin=t),"default"===t.name&&(this.defaultSkin=t))},o.prototype.addAnimation=function(t){t.name in this.animations?console.warn("Same animation: "+t.name):(t.parent=this,this.animations[t.name]=t,this.animationNames.push(t.name),null===this.defaultAnimation&&(this.defaultAnimation=t))},o.prototype.addAction=function(t,n){n?this.defaultActions.push(t):this.actions.push(t)},o.prototype.getBone=function(t){return t in this.bones?this.bones[t]:null},o.prototype.getSlot=function(t){return t in this.slots?this.slots[t]:null},o.prototype.getConstraint=function(t){return t in this.constraints?this.constraints[t]:null},o.prototype.getSkin=function(t){return t in this.skins?this.skins[t]:null},o.prototype.getMesh=function(t,n,e){var r=this.getSkin(t);return null===r?null:r.getDisplay(n,e)},o.prototype.getAnimation=function(t){return t in this.animations?this.animations[t]:null},o.prototype._onClear=function(){var t,e,o,a,s,i,l,h,u,c,f,y,p,d;try{for(var m=n(this.defaultActions),v=m.next();!v.done;v=m.next()){v.value.returnToPool()}}catch(P){t={error:P}}finally{try{v&&!v.done&&(e=m.return)&&e.call(m)}finally{if(t)throw t.error}}try{for(var g=n(this.actions),b=g.next();!b.done;b=g.next()){b.value.returnToPool()}}catch(C){o={error:C}}finally{try{b&&!b.done&&(a=g.return)&&a.call(g)}finally{if(o)throw o.error}}try{for(var x=n(Object.keys(this.bones)),S=x.next();!S.done;S=x.next()){var k=S.value;this.bones[k].returnToPool(),delete this.bones[k]}}catch(F){s={error:F}}finally{try{S&&!S.done&&(i=x.return)&&i.call(x)}finally{if(s)throw s.error}}try{for(var B=n(Object.keys(this.slots)),w=B.next();!w.done;w=B.next()){k=w.value;this.slots[k].returnToPool(),delete this.slots[k]}}catch(R){l={error:R}}finally{try{w&&!w.done&&(h=B.return)&&h.call(B)}finally{if(l)throw l.error}}try{for(var D=n(Object.keys(this.constraints)),O=D.next();!O.done;O=D.next()){k=O.value;this.constraints[k].returnToPool(),delete this.constraints[k]}}catch(q){u={error:q}}finally{try{O&&!O.done&&(c=D.return)&&c.call(D)}finally{if(u)throw u.error}}try{for(var T=n(Object.keys(this.skins)),_=T.next();!_.done;_=T.next()){k=_.value;this.skins[k].returnToPool(),delete this.skins[k]}}catch(M){f={error:M}}finally{try{_&&!_.done&&(y=T.return)&&y.call(T)}finally{if(f)throw f.error}}try{for(var A=n(Object.keys(this.animations)),j=A.next();!j.done;j=A.next()){k=j.value;this.animations[k].returnToPool(),delete this.animations[k]}}catch(N){p={error:N}}finally{try{j&&!j.done&&(d=A.return)&&d.call(A)}finally{if(p)throw p.error}}null!==this.canvas&&this.canvas.returnToPool(),null!==this.userData&&this.userData.returnToPool(),this.type=r.ArmatureType.Armature,this.frameRate=0,this.cacheFrameRate=0,this.scale=1,this.name="",this.aabb.clear(),this.animationNames.length=0,this.sortedBones.length=0,this.sortedSlots.length=0,this.defaultActions.length=0,this.actions.length=0,this.defaultSkin=null,this.defaultAnimation=null,this.canvas=null,this.userData=null,this.parent=null},o}(e.BaseObject);exports.ArmatureData=l;var h=function(n){function e(){var t=null!==n&&n.apply(this,arguments)||this;return t.transform=new o.Transform,t.userData=null,t}return t(e,n),e.toString=function(){return"[class dragonBones.BoneData]"},e.prototype._onClear=function(){null!==this.userData&&this.userData.returnToPool(),this.inheritTranslation=!1,this.inheritRotation=!1,this.inheritScale=!1,this.inheritReflection=!1,this.type=r.BoneType.Bone,this.length=0,this.alpha=1,this.name="",this.transform.identity(),this.userData=null,this.parent=null},e}(e.BaseObject);exports.BoneData=h;var u=function(n){function e(){var t=null!==n&&n.apply(this,arguments)||this;return t.geometry=new s.GeometryData,t}return t(e,n),e.toString=function(){return"[class dragonBones.SurfaceData]"},e.prototype._onClear=function(){n.prototype._onClear.call(this),this.type=r.BoneType.Surface,this.segmentX=0,this.segmentY=0,this.geometry.clear()},e}(h);exports.SurfaceData=u;var c=function(n){function e(){var t=null!==n&&n.apply(this,arguments)||this;return t.color=null,t.userData=null,t}return t(e,n),e.createColor=function(){return new i.ColorTransform},e.toString=function(){return"[class dragonBones.SlotData]"},e.prototype._onClear=function(){null!==this.userData&&this.userData.returnToPool(),this.blendMode=r.BlendMode.Normal,this.displayIndex=0,this.zOrder=0,this.zIndex=0,this.alpha=1,this.name="",this.color=null,this.userData=null,this.parent=null},e.DEFAULT_COLOR=new i.ColorTransform,e}(e.BaseObject);exports.SlotData=c; },{"../core/base-object":"g7m0","../core/dragonbones":"o5u6","../geom/transform":"hJt8","../geom/rectangle":"Nh8j","./display-data":"LGEI","../geom/color-transform":"QVHz"}],"a8z0":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function n(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),r=this&&this.__values||function(t){var r="function"==typeof Symbol&&Symbol.iterator,e=r&&t[r],n=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../core/base-object"),n=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.frameIndices=[],t.cachedFrames=[],t.armatureNames=[],t.armatures={},t.userData=null,t}return t(n,e),n.toString=function(){return"[class dragonBones.DragonBonesData]"},n.prototype.addArmature=function(t){t.name in this.armatures?console.warn("Same armature: "+t.name):(t.parent=this,this.armatures[t.name]=t,this.armatureNames.push(t.name))},n.prototype.getArmature=function(t){return t in this.armatures?this.armatures[t]:null},n.prototype._onClear=function(){var t,e;try{for(var n=r(Object.keys(this.armatures)),a=n.next();!a.done;a=n.next()){var o=a.value;this.armatures[o].returnToPool(),delete this.armatures[o]}}catch(s){t={error:s}}finally{try{a&&!a.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}null!==this.userData&&this.userData.returnToPool(),this.autoSearch=!1,this.frameRate=0,this.version="",this.name="",this.stage=null,this.frameIndices.length=0,this.cachedFrames.length=0,this.armatureNames.length=0,this.binary=null,this.intArray=null,this.floatArray=null,this.frameIntArray=null,this.frameFloatArray=null,this.frameArray=null,this.timelineArray=null,this.colorArray=null,this.userData=null},n}(e.BaseObject);exports.DragonBonesData=n; },{"../core/base-object":"g7m0"}],"xOsF":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function n(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),r=this&&this.__values||function(t){var r="function"==typeof Symbol&&Symbol.iterator,e=r&&t[r],n=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../core/base-object"),n=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.displays={},t}return t(n,e),n.toString=function(){return"[class dragonBones.SkinData]"},n.prototype.addDisplay=function(t,r){t in this.displays||(this.displays[t]=[]),null!==r&&(r.parent=this),this.displays[t].push(r)},n.prototype.getDisplay=function(t,e){var n,o,i=this.getDisplays(t);if(null!==i)try{for(var l=r(i),a=l.next();!a.done;a=l.next()){var s=a.value;if(null!==s&&s.name===e)return s}}catch(u){n={error:u}}finally{try{a&&!a.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}return null},n.prototype.getDisplays=function(t){return t in this.displays?this.displays[t]:null},n.prototype._onClear=function(){var t,e,n,o;try{for(var i=r(Object.keys(this.displays)),l=i.next();!l.done;l=i.next()){var a=l.value,s=this.displays[a];try{for(var u=(n=void 0,r(s)),y=u.next();!y.done;y=u.next()){var p=y.value;null!==p&&p.returnToPool()}}catch(c){n={error:c}}finally{try{y&&!y.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}delete this.displays[a]}}catch(f){t={error:f}}finally{try{l&&!l.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.name="",this.parent=null},n}(e.BaseObject);exports.SkinData=n; },{"../core/base-object":"g7m0"}],"cBaX":[function(require,module,exports) { "use strict";var e=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),t=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../core/base-object"),i=require("../core/dragonbones"),r=function(n){function r(){var e=null!==n&&n.apply(this,arguments)||this;return e.cachedFrames=[],e.boneTimelines={},e.slotTimelines={},e.constraintTimelines={},e.animationTimelines={},e.boneCachedFrameIndices={},e.slotCachedFrameIndices={},e.actionTimeline=null,e.zOrderTimeline=null,e}return e(r,n),r.toString=function(){return"[class dragonBones.AnimationData]"},r.prototype.cacheFrames=function(e){var n,i,r,o;if(!(this.cacheFrameRate>0)){this.cacheFrameRate=Math.max(Math.ceil(e*this.scale),1);var a=Math.ceil(this.cacheFrameRate*this.duration)+1;this.cachedFrames.length=a;for(var l=0,s=this.cacheFrames.length;lu&&(g=x,x=u,u=g),f>l&&(g=f,f=l,l=g),t.x=Math.floor(xl?u:l)-t.x),b>p&&(g=b,b=p,p=g),v>M&&(g=v,v=M,M=g),t.y=Math.floor(bM?p:M)-t.y)},t}();exports.Matrix=t; },{}],"Ezu9":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){var t=function(n,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var o in n)n.hasOwnProperty(o)&&(t[o]=n[o])})(n,o)};return function(n,o){function r(){this.constructor=n}t(n,o),n.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}();Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../core/base-object"),o=require("../core/dragonbones"),r=function(n){function o(){var t=null!==n&&n.apply(this,arguments)||this;return t.ints=[],t.floats=[],t.strings=[],t}return t(o,n),o.toString=function(){return"[class dragonBones.UserData]"},o.prototype.addInt=function(t){this.ints.push(t)},o.prototype.addFloat=function(t){this.floats.push(t)},o.prototype.addString=function(t){this.strings.push(t)},o.prototype.getInt=function(t){return void 0===t&&(t=0),t>=0&&t=0&&t=0&&tr&&(u|=n.Right),el&&(u|=n.Bottom),u},i.rectangleIntersectsSegment=function(t,e,o,r,l,u,a,s,h,c,p){void 0===h&&(h=null),void 0===c&&(c=null),void 0===p&&(p=null);var y=t>l&&tu&&el&&ou&&r=-e&&t<=e){var o=.5*this.height;if(n>=-o&&n<=o)return!0}return!1},i.prototype.intersectsSegment=function(t,n,e,o,r,l,u){void 0===r&&(r=null),void 0===l&&(l=null),void 0===u&&(u=null);var a=.5*this.width,s=.5*this.height;return i.rectangleIntersectsSegment(t,n,e,o,-a,-s,a,s,r,l,u)},i.prototype._onClear=function(){e.prototype._onClear.call(this),this.type=o.BoundingBoxType.Rectangle},i}(i);exports.RectangleBoundingBoxData=r;var l=function(n){function e(){return null!==n&&n.apply(this,arguments)||this}return t(e,n),e.toString=function(){return"[class dragonBones.EllipseData]"},e.ellipseIntersectsSegment=function(t,n,e,o,i,r,l,u,a,s,h){void 0===a&&(a=null),void 0===s&&(s=null),void 0===h&&(h=null);var c=l/u,p=c*c,y=e-t,f=(o*=c)-(n*=c),v=Math.sqrt(y*y+f*f),g=y/v,x=f/v,d=(i-t)*g+(r-n)*x,B=l*l,M=B-(t*t+n*n)+d*d,_=0;if(M>=0){var I=Math.sqrt(M),P=d-I,m=d+I,S=P<0?-1:P<=v?0:1,C=m<0?-1:m<=v?0:1,O=S*C;if(O<0)return-1;0===O&&(-1===S?(_=2,e=t+m*g,o=(n+m*x)/c,null!==a&&(a.x=e,a.y=o),null!==s&&(s.x=e,s.y=o),null!==h&&(h.x=Math.atan2(o/B*p,e/B),h.y=h.x+Math.PI)):1===C?(_=1,t+=P*g,n=(n+P*x)/c,null!==a&&(a.x=t,a.y=n),null!==s&&(s.x=t,s.y=n),null!==h&&(h.x=Math.atan2(n/B*p,t/B),h.y=h.x+Math.PI)):(_=3,null!==a&&(a.x=t+P*g,a.y=(n+P*x)/c,null!==h&&(h.x=Math.atan2(a.y/B*p,a.x/B))),null!==s&&(s.x=t+m*g,s.y=(n+m*x)/c,null!==h&&(h.y=Math.atan2(s.y/B*p,s.x/B)))))}return _},e.prototype.containsPoint=function(t,n){var e=.5*this.width;if(t>=-e&&t<=e){var o=.5*this.height;if(n>=-o&&n<=o)return n*=e/o,Math.sqrt(t*t+n*n)<=e}return!1},e.prototype.intersectsSegment=function(t,n,o,i,r,l,u){return void 0===r&&(r=null),void 0===l&&(l=null),void 0===u&&(u=null),e.ellipseIntersectsSegment(t,n,o,i,0,0,.5*this.width,.5*this.height,r,l,u)},e.prototype._onClear=function(){n.prototype._onClear.call(this),this.type=o.BoundingBoxType.Ellipse},e}(i);exports.EllipseBoundingBoxData=l;var u=function(n){function e(){var t=null!==n&&n.apply(this,arguments)||this;return t.vertices=[],t}return t(e,n),e.toString=function(){return"[class dragonBones.PolygonBoundingBoxData]"},e.polygonIntersectsSegment=function(t,n,e,o,i,r,l,u){void 0===r&&(r=null),void 0===l&&(l=null),void 0===u&&(u=null),t===e&&(t=e+1e-6),n===o&&(n=o+1e-6);for(var a=i.length,s=t-e,h=n-o,c=t*o-n*e,p=0,y=i[a-2],f=i[a-1],v=0,g=0,x=0,d=0,B=0,M=0,_=0;_=y&&b<=I||b>=I&&b<=y)&&(0===s||b>=t&&b<=e||b>=e&&b<=t)){var w=(c*S-h*C)/O;if((w>=f&&w<=P||w>=P&&w<=f)&&(0===h||w>=n&&w<=o||w>=o&&w<=n)){if(null===l){x=b,d=w,B=b,M=w,p++,null!==u&&(u.x=Math.atan2(P-f,I-y)-.5*Math.PI,u.y=u.x);break}var D=b-t;D<0&&(D=-D),0===p?(v=D,g=D,x=b,d=w,B=b,M=w,null!==u&&(u.x=Math.atan2(P-f,I-y)-.5*Math.PI,u.y=u.x)):(Dg&&(g=D,B=b,M=w,null!==u&&(u.y=Math.atan2(P-f,I-y)-.5*Math.PI))),p++}}y=I,f=P}return 1===p?(null!==r&&(r.x=x,r.y=d),null!==l&&(l.x=x,l.y=d),null!==u&&(u.y=u.x+Math.PI)):p>1&&(p++,null!==r&&(r.x=x,r.y=d),null!==l&&(l.x=B,l.y=M)),p},e.prototype.containsPoint=function(t,n){var e=!1;if(t>=this.x&&t<=this.width&&n>=this.y&&n<=this.height)for(var o=0,i=this.vertices.length,r=i-2;o=n||l=n){var a=this.vertices[r],s=this.vertices[o];(n-u)*(a-s)/(l-u)+s=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../core/base-object"),n=require("../geom/rectangle"),o=function(r){function n(){var t=null!==r&&r.apply(this,arguments)||this;return t.textures={},t}return t(n,r),n.prototype.copyFrom=function(t){var r,n,o,a;this.autoSearch=t.autoSearch,this.scale=t.scale,this.width=t.width,this.height=t.height,this.name=t.name,this.imagePath=t.imagePath;try{for(var i=e(Object.keys(this.textures)),s=i.next();!s.done;s=i.next()){var u=s.value;this.textures[u].returnToPool(),delete this.textures[u]}}catch(f){r={error:f}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}try{for(var l=e(Object.keys(t.textures)),h=l.next();!h.done;h=l.next()){u=h.value;var c=this.createTexture();c.copyFrom(t.textures[u]),this.textures[u]=c}}catch(p){o={error:p}}finally{try{h&&!h.done&&(a=l.return)&&a.call(l)}finally{if(o)throw o.error}}},n.prototype.addTexture=function(t){t.name in this.textures?console.warn("Same texture: "+t.name):(t.parent=this,this.textures[t.name]=t)},n.prototype.getTexture=function(t){return t in this.textures?this.textures[t]:null},n.prototype._onClear=function(){var t,r;try{for(var n=e(Object.keys(this.textures)),o=n.next();!o.done;o=n.next()){var a=o.value;this.textures[a].returnToPool(),delete this.textures[a]}}catch(i){t={error:i}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}this.autoSearch=!1,this.width=0,this.height=0,this.scale=1,this.name="",this.imagePath=""},n}(r.BaseObject);exports.TextureAtlasData=o;var a=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.region=new n.Rectangle,t.frame=null,t}return t(r,e),r.createRectangle=function(){return new n.Rectangle},r.prototype.copyFrom=function(t){this.rotated=t.rotated,this.name=t.name,this.region.copyFrom(t.region),this.parent=t.parent,null===this.frame&&null!==t.frame?this.frame=r.createRectangle():null!==this.frame&&null===t.frame&&(this.frame=null),null!==this.frame&&null!==t.frame&&this.frame.copyFrom(t.frame)},r.prototype._onClear=function(){this.rotated=!1,this.name="",this.region.clear(),this.parent=null,this.frame=null},r}(r.BaseObject);exports.TextureData=a; },{"../core/base-object":"g7m0","../geom/rectangle":"Nh8j"}],"ohoU":[function(require,module,exports) { "use strict";function e(r){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(r)}var r=this&&this.__extends||function(){var e=function(r,a){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var a in r)r.hasOwnProperty(a)&&(e[a]=r[a])})(r,a)};return function(r,a){function t(){this.constructor=r}e(r,a),r.prototype=null===a?Object.create(a):(t.prototype=a.prototype,new t)}}(),a=this&&this.__values||function(e){var r="function"==typeof Symbol&&Symbol.iterator,a=r&&e[r],t=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var t,i=require("./data-parser"),n=require("../model/armature-data"),s=require("../model/dragonbones-data"),o=require("../model/display-data"),l=require("../model/skin-data"),h=require("../model/animation-data"),_=require("../geom/matrix"),f=require("../geom/transform"),m=require("../geom/point"),y=require("../geom/color-transform"),u=require("../model/user-data"),A=require("../core/dragonbones"),p=require("../core/base-object"),c=require("../model/canvas-data"),T=require("../model/constraint-data"),g=require("../model/bounding-box-data"),D=require("../model/texture-atlas-data"),P=function(){return function(){this.frameStart=0,this.actions=[]}}();exports.ActionFrame=P,function(e){e[e.Step=0]="Step",e[e.Int=1]="Int",e[e.Float=2]="Float"}(t=exports.FrameValueType||(exports.FrameValueType={}));var E=function(E){function d(){var e=null!==E&&E.apply(this,arguments)||this;return e._rawTextureAtlasIndex=0,e._rawBones=[],e._data=null,e._armature=null,e._bone=null,e._geometry=null,e._slot=null,e._skin=null,e._mesh=null,e._animation=null,e._timeline=null,e._rawTextureAtlases=null,e._frameValueType=t.Step,e._defaultColorOffset=-1,e._prevClockwise=0,e._prevRotation=0,e._frameDefaultValue=0,e._frameValueScale=1,e._helpMatrixA=new _.Matrix,e._helpMatrixB=new _.Matrix,e._helpTransform=new f.Transform,e._helpColorTransform=new y.ColorTransform,e._helpPoint=new m.Point,e._helpArray=[],e._intArray=[],e._floatArray=[],e._frameIntArray=[],e._frameFloatArray=[],e._frameArray=[],e._timelineArray=[],e._colorArray=[],e._cacheRawMeshes=[],e._cacheMeshes=[],e._actionFrames=[],e._weightSlotPose={},e._weightBonePoses={},e._cacheBones={},e._slotChildActions={},e}return r(d,E),d._getBoolean=function(r,a,t){if(a in r){var i=r[a],n=e(i);if("boolean"===n)return i;if("string"!==n)return!!i;switch(i){case"0":case"NaN":case"":case"false":case"null":case"undefined":return!1;default:return!0}}return t},d._getNumber=function(e,r,a){if(r in e){var t=e[r];return null===t||"NaN"===t?a:+t||0}return a},d._getString=function(r,a,t){if(a in r){var i=r[a];return"string"===e(i)?i:String(i)}return t},d.getInstance=function(){return null===d._objectDataParserInstance&&(d._objectDataParserInstance=new d),d._objectDataParserInstance},d.prototype.parseDragonBonesData=function(e,r){var t,n;void 0===r&&(r=1),console.assert(null!=e,"Data error.");var o=d._getString(e,i.DataParser.VERSION,""),l=d._getString(e,i.DataParser.COMPATIBLE_VERSION,"");if(i.DataParser.DATA_VERSIONS.indexOf(o)>=0||i.DataParser.DATA_VERSIONS.indexOf(l)>=0){var h=p.BaseObject.borrowObject(s.DragonBonesData);if(h.version=o,h.name=d._getString(e,i.DataParser.NAME,""),h.frameRate=d._getNumber(e,i.DataParser.FRAME_RATE,24),0===h.frameRate&&(h.frameRate=24),i.DataParser.ARMATURE in e){this._data=h,this._parseArray(e);var _=e[i.DataParser.ARMATURE];try{for(var f=a(_),m=f.next();!m.done;m=f.next()){var y=m.value;h.addArmature(this._parseArmature(y,r))}}catch(u){t={error:u}}finally{try{m&&!m.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}this._data.binary||this._modifyArray(),i.DataParser.STAGE in e?h.stage=h.getArmature(d._getString(e,i.DataParser.STAGE,"")):h.armatureNames.length>0&&(h.stage=h.getArmature(h.armatureNames[0])),this._data=null}return i.DataParser.TEXTURE_ATLAS in e&&(this._rawTextureAtlases=e[i.DataParser.TEXTURE_ATLAS]),h}return console.assert(!1,"Nonsupport data version: "+o+"\nPlease convert DragonBones data to support version.\nRead more: https://github.com/DragonBones/Tools/"),null},d.prototype.parseTextureAtlasData=function(e,r,a){if(void 0===a&&(a=1),console.assert(void 0!==e),null===e){if(null===this._rawTextureAtlases||0===this._rawTextureAtlases.length)return!1;var t=this._rawTextureAtlases[this._rawTextureAtlasIndex++];return this.parseTextureAtlasData(t,r,a),this._rawTextureAtlasIndex>=this._rawTextureAtlases.length&&(this._rawTextureAtlasIndex=0,this._rawTextureAtlases=null),!0}if(r.width=d._getNumber(e,i.DataParser.WIDTH,0),r.height=d._getNumber(e,i.DataParser.HEIGHT,0),r.scale=1===a?1/d._getNumber(e,i.DataParser.SCALE,1):a,r.name=d._getString(e,i.DataParser.NAME,""),r.imagePath=d._getString(e,i.DataParser.IMAGE_PATH,""),i.DataParser.SUB_TEXTURE in e)for(var n=e[i.DataParser.SUB_TEXTURE],s=0,o=n.length;s0&&_>0&&(f.frame=D.TextureData.createRectangle(),f.frame.x=d._getNumber(l,i.DataParser.FRAME_X,0),f.frame.y=d._getNumber(l,i.DataParser.FRAME_Y,0),f.frame.width=h,f.frame.height=_),r.addTexture(f)}return!0},d.prototype._parseArmature=function(e,r){var t,s,o,l,h,_,f,m,y,u,T,g,D,P,E,v,S,O,b,B,N,F,I,R,w,M,x=p.BaseObject.borrowObject(n.ArmatureData);if(x.name=d._getString(e,i.DataParser.NAME,""),x.frameRate=d._getNumber(e,i.DataParser.FRAME_RATE,this._data.frameRate),x.scale=r,i.DataParser.TYPE in e&&"string"==typeof e[i.DataParser.TYPE]?x.type=i.DataParser._getArmatureType(e[i.DataParser.TYPE]):x.type=d._getNumber(e,i.DataParser.TYPE,A.ArmatureType.Armature),0===x.frameRate&&(x.frameRate=24),this._armature=x,i.DataParser.CANVAS in e){var C=e[i.DataParser.CANVAS],L=p.BaseObject.borrowObject(c.CanvasData);i.DataParser.COLOR in C?L.hasBackground=!0:L.hasBackground=!1,L.color=d._getNumber(C,i.DataParser.COLOR,0),L.x=d._getNumber(C,i.DataParser.X,0)*x.scale,L.y=d._getNumber(C,i.DataParser.Y,0)*x.scale,L.width=d._getNumber(C,i.DataParser.WIDTH,0)*x.scale,L.height=d._getNumber(C,i.DataParser.HEIGHT,0)*x.scale,x.canvas=L}if(i.DataParser.AABB in e){var V=e[i.DataParser.AABB];x.aabb.x=d._getNumber(V,i.DataParser.X,0)*x.scale,x.aabb.y=d._getNumber(V,i.DataParser.Y,0)*x.scale,x.aabb.width=d._getNumber(V,i.DataParser.WIDTH,0)*x.scale,x.aabb.height=d._getNumber(V,i.DataParser.HEIGHT,0)*x.scale}if(i.DataParser.BONE in e){var j=e[i.DataParser.BONE];try{for(var k=a(j),Y=k.next();!Y.done;Y=k.next()){var U=Y.value,G=d._getString(U,i.DataParser.PARENT,""),H=this._parseBone(U);if(G.length>0){var W=x.getBone(G);null!==W?H.parent=W:(G in this._cacheBones||(this._cacheBones[G]=[]),this._cacheBones[G].push(H))}if(H.name in this._cacheBones){try{for(var K=(o=void 0,a(this._cacheBones[H.name])),X=K.next();!X.done;X=K.next()){X.value.parent=H}}catch(Ve){o={error:Ve}}finally{try{X&&!X.done&&(l=K.return)&&l.call(K)}finally{if(o)throw o.error}}delete this._cacheBones[H.name]}x.addBone(H),this._rawBones.push(H)}}catch(je){t={error:je}}finally{try{Y&&!Y.done&&(s=k.return)&&s.call(k)}finally{if(t)throw t.error}}}if(i.DataParser.IK in e){var q=e[i.DataParser.IK];try{for(var Z=a(q),z=Z.next();!z.done;z=Z.next()){var Q=z.value;(_e=this._parseIKConstraint(Q))&&x.addConstraint(_e)}}catch(ke){h={error:ke}}finally{try{z&&!z.done&&(_=Z.return)&&_.call(Z)}finally{if(h)throw h.error}}}if(x.sortBones(),i.DataParser.SLOT in e){var J=0,$=e[i.DataParser.SLOT];try{for(var ee=a($),re=ee.next();!re.done;re=ee.next()){var ae=re.value;x.addSlot(this._parseSlot(ae,J++))}}catch(Ye){f={error:Ye}}finally{try{re&&!re.done&&(m=ee.return)&&m.call(ee)}finally{if(f)throw f.error}}}if(i.DataParser.SKIN in e){var te=e[i.DataParser.SKIN];try{for(var ie=a(te),ne=ie.next();!ne.done;ne=ie.next()){var se=ne.value;x.addSkin(this._parseSkin(se))}}catch(Ue){y={error:Ue}}finally{try{ne&&!ne.done&&(u=ie.return)&&u.call(ie)}finally{if(y)throw y.error}}}if(i.DataParser.PATH_CONSTRAINT in e){var oe=e[i.DataParser.PATH_CONSTRAINT];try{for(var le=a(oe),he=le.next();!he.done;he=le.next()){var _e,fe=he.value;(_e=this._parsePathConstraint(fe))&&x.addConstraint(_e)}}catch(Ge){T={error:Ge}}finally{try{he&&!he.done&&(g=le.return)&&g.call(le)}finally{if(T)throw T.error}}}for(var me=0,ye=this._cacheRawMeshes.length;me0&&null!==r.parent?(n.root=r.parent,n.bone=r):(n.root=r,n.bone=null),n},d.prototype._parsePathConstraint=function(e){var r,t,n=this._armature.getSlot(d._getString(e,i.DataParser.TARGET,""));if(null===n)return null;var s=this._armature.defaultSkin;if(null===s)return null;var l=s.getDisplay(n.name,d._getString(e,i.DataParser.TARGET_DISPLAY,n.name));if(null===l||!(l instanceof o.PathDisplayData))return null;var h=e[i.DataParser.BONES];if(null===h||0===h.length)return null;var _=p.BaseObject.borrowObject(T.PathConstraintData);_.name=d._getString(e,i.DataParser.NAME,""),_.type=A.ConstraintType.Path,_.pathSlot=n,_.pathDisplayData=l,_.target=n.parent,_.positionMode=i.DataParser._getPositionMode(d._getString(e,i.DataParser.POSITION_MODE,"")),_.spacingMode=i.DataParser._getSpacingMode(d._getString(e,i.DataParser.SPACING_MODE,"")),_.rotateMode=i.DataParser._getRotateMode(d._getString(e,i.DataParser.ROTATE_MODE,"")),_.position=d._getNumber(e,i.DataParser.POSITION,0),_.spacing=d._getNumber(e,i.DataParser.SPACING,0),_.rotateOffset=d._getNumber(e,i.DataParser.ROTATE_OFFSET,0),_.rotateMix=d._getNumber(e,i.DataParser.ROTATE_MIX,1),_.translateMix=d._getNumber(e,i.DataParser.TRANSLATE_MIX,1);try{for(var f=a(h),m=f.next();!m.done;m=f.next()){var y=m.value,u=this._armature.getBone(y);null!==u&&(_.AddBone(u),null===_.root&&(_.root=u))}}catch(c){r={error:c}}finally{try{m&&!m.done&&(t=f.return)&&t.call(f)}finally{if(r)throw r.error}}return _},d.prototype._parseSlot=function(e,r){var a=p.BaseObject.borrowObject(n.SlotData);return a.displayIndex=d._getNumber(e,i.DataParser.DISPLAY_INDEX,0),a.zOrder=r,a.zIndex=d._getNumber(e,i.DataParser.Z_INDEX,0),a.alpha=d._getNumber(e,i.DataParser.ALPHA,1),a.name=d._getString(e,i.DataParser.NAME,""),a.parent=this._armature.getBone(d._getString(e,i.DataParser.PARENT,"")),i.DataParser.BLEND_MODE in e&&"string"==typeof e[i.DataParser.BLEND_MODE]?a.blendMode=i.DataParser._getBlendMode(e[i.DataParser.BLEND_MODE]):a.blendMode=d._getNumber(e,i.DataParser.BLEND_MODE,A.BlendMode.Normal),i.DataParser.COLOR in e?(a.color=n.SlotData.createColor(),this._parseColorTransform(e[i.DataParser.COLOR],a.color)):a.color=n.SlotData.DEFAULT_COLOR,i.DataParser.ACTIONS in e&&(this._slotChildActions[a.name]=this._parseActionData(e[i.DataParser.ACTIONS],A.ActionType.Play,null,null)),a},d.prototype._parseSkin=function(e){var r,t,n,s,o=p.BaseObject.borrowObject(l.SkinData);if(o.name=d._getString(e,i.DataParser.NAME,i.DataParser.DEFAULT_NAME),0===o.name.length&&(o.name=i.DataParser.DEFAULT_NAME),i.DataParser.SLOT in e){var h=e[i.DataParser.SLOT];this._skin=o;try{for(var _=a(h),f=_.next();!f.done;f=_.next()){var m=f.value,y=d._getString(m,i.DataParser.NAME,""),u=this._armature.getSlot(y);if(null!==u){if(this._slot=u,i.DataParser.DISPLAY in m){var A=m[i.DataParser.DISPLAY];try{for(var c=(n=void 0,a(A)),T=c.next();!T.done;T=c.next()){var g=T.value;g?o.addDisplay(y,this._parseDisplay(g)):o.addDisplay(y,null)}}catch(D){n={error:D}}finally{try{T&&!T.done&&(s=c.return)&&s.call(c)}finally{if(n)throw n.error}}}this._slot=null}}}catch(P){r={error:P}}finally{try{f&&!f.done&&(t=_.return)&&t.call(_)}finally{if(r)throw r.error}}this._skin=null}return o},d.prototype._parseDisplay=function(e){var r,t,n,s,l=d._getString(e,i.DataParser.NAME,""),h=d._getString(e,i.DataParser.PATH,""),_=A.DisplayType.Image,f=null;switch(_=i.DataParser.TYPE in e&&"string"==typeof e[i.DataParser.TYPE]?i.DataParser._getDisplayType(e[i.DataParser.TYPE]):d._getNumber(e,i.DataParser.TYPE,_)){case A.DisplayType.Image:var m=f=p.BaseObject.borrowObject(o.ImageDisplayData);m.name=l,m.path=h.length>0?h:l,this._parsePivot(e,m);break;case A.DisplayType.Armature:var y=f=p.BaseObject.borrowObject(o.ArmatureDisplayData);if(y.name=l,y.path=h.length>0?h:l,y.inheritAnimation=!0,i.DataParser.ACTIONS in e){var u=this._parseActionData(e[i.DataParser.ACTIONS],A.ActionType.Play,null,null);try{for(var c=a(u),T=c.next();!T.done;T=c.next()){var g=T.value;y.addAction(g)}}catch(I){r={error:I}}finally{try{T&&!T.done&&(t=c.return)&&t.call(c)}finally{if(r)throw r.error}}}else if(this._slot.name in this._slotChildActions){var D=this._skin.getDisplays(this._slot.name);if(null===D?0===this._slot.displayIndex:this._slot.displayIndex===D.length){try{for(var P=a(this._slotChildActions[this._slot.name]),E=P.next();!E.done;E=P.next()){g=E.value;y.addAction(g)}}catch(R){n={error:R}}finally{try{E&&!E.done&&(s=P.return)&&s.call(P)}finally{if(n)throw n.error}}delete this._slotChildActions[this._slot.name]}}break;case A.DisplayType.Mesh:var v=f=p.BaseObject.borrowObject(o.MeshDisplayData);v.geometry.inheritDeform=d._getBoolean(e,i.DataParser.INHERIT_DEFORM,!0),v.name=l,v.path=h.length>0?h:l,i.DataParser.SHARE in e?(v.geometry.data=this._data,this._cacheRawMeshes.push(e),this._cacheMeshes.push(v)):this._parseMesh(e,v);break;case A.DisplayType.BoundingBox:var S=this._parseBoundingBox(e);if(null!==S){var O=f=p.BaseObject.borrowObject(o.BoundingBoxDisplayData);O.name=l,O.path=h.length>0?h:l,O.boundingBox=S}break;case A.DisplayType.Path:var b=e[i.DataParser.LENGTHS],B=f=p.BaseObject.borrowObject(o.PathDisplayData);B.closed=d._getBoolean(e,i.DataParser.CLOSED,!1),B.constantSpeed=d._getBoolean(e,i.DataParser.CONSTANT_SPEED,!1),B.name=l,B.path=h.length>0?h:l,B.curveLengths.length=b.length;for(var N=0,F=b.length;Nr.width&&(r.width=l),hr.height&&(r.height=h))}r.width-=r.x,r.height-=r.y}else console.warn("Data error.\n Please reexport DragonBones Data to fixed the bug.");return r},d.prototype._parseAnimation=function(e){var r,n,s,o,l,_,m,y,u,c,T,g,D,P,E,v,S=p.BaseObject.borrowObject(h.AnimationData);if(S.blendType=i.DataParser._getAnimationBlendType(d._getString(e,i.DataParser.BLEND_TYPE,"")),S.frameCount=d._getNumber(e,i.DataParser.DURATION,0),S.playTimes=d._getNumber(e,i.DataParser.PLAY_TIMES,1),S.duration=S.frameCount/this._armature.frameRate,S.fadeInTime=d._getNumber(e,i.DataParser.FADE_IN_TIME,0),S.scale=d._getNumber(e,i.DataParser.SCALE,1),S.name=d._getString(e,i.DataParser.NAME,i.DataParser.DEFAULT_NAME),0===S.name.length&&(S.name=i.DataParser.DEFAULT_NAME),S.frameIntOffset=this._frameIntArray.length,S.frameFloatOffset=this._frameFloatArray.length,S.frameOffset=this._frameArray.length,this._animation=S,i.DataParser.FRAME in e){var O=e[i.DataParser.FRAME],b=O.length;if(b>0)for(var B=0,N=0;B0&&(this._animation.actionTimeline=this._parseTimeline(null,this._actionFrames,"",A.TimelineType.Action,t.Step,0,this._parseActionFrame),this._actionFrames.length=0),i.DataParser.TIMELINE in e){I=e[i.DataParser.TIMELINE];try{for(var W=a(I),K=W.next();!K.done;K=W.next()){M=K.value;var X=d._getNumber(M,i.DataParser.TYPE,A.TimelineType.Action),q=d._getString(M,i.DataParser.NAME,""),Z=null;switch(X){case A.TimelineType.Action:break;case A.TimelineType.SlotDisplay:case A.TimelineType.SlotZIndex:case A.TimelineType.BoneAlpha:case A.TimelineType.SlotAlpha:case A.TimelineType.AnimationProgress:case A.TimelineType.AnimationWeight:if(X===A.TimelineType.SlotDisplay?(this._frameValueType=t.Step,this._frameValueScale=1):(this._frameValueType=t.Int,X===A.TimelineType.SlotZIndex?this._frameValueScale=1:X===A.TimelineType.AnimationProgress||X===A.TimelineType.AnimationWeight?this._frameValueScale=1e4:this._frameValueScale=100),X===A.TimelineType.BoneAlpha||X===A.TimelineType.SlotAlpha||X===A.TimelineType.AnimationWeight?this._frameDefaultValue=1:this._frameDefaultValue=0,X===A.TimelineType.AnimationProgress&&S.blendType!==A.AnimationBlendType.None){var z=Z=p.BaseObject.borrowObject(h.AnimationTimelineData);z.x=d._getNumber(M,i.DataParser.X,0),z.y=d._getNumber(M,i.DataParser.Y,0)}Z=this._parseTimeline(M,null,i.DataParser.FRAME,X,this._frameValueType,1,this._parseSingleValueFrame,Z);break;case A.TimelineType.BoneTranslate:case A.TimelineType.BoneRotate:case A.TimelineType.BoneScale:case A.TimelineType.IKConstraint:case A.TimelineType.AnimationParameter:X===A.TimelineType.IKConstraint||X===A.TimelineType.AnimationParameter?(this._frameValueType=t.Int,X===A.TimelineType.AnimationParameter?this._frameValueScale=1e4:this._frameValueScale=100):(X===A.TimelineType.BoneRotate?this._frameValueScale=f.Transform.DEG_RAD:this._frameValueScale=1,this._frameValueType=t.Float),X===A.TimelineType.BoneScale||X===A.TimelineType.IKConstraint?this._frameDefaultValue=1:this._frameDefaultValue=0,Z=this._parseTimeline(M,null,i.DataParser.FRAME,X,this._frameValueType,2,this._parseDoubleValueFrame);break;case A.TimelineType.ZOrder:break;case A.TimelineType.Surface:var Q=this._armature.getBone(q);if(null===Q)continue;this._geometry=Q.geometry,Z=this._parseTimeline(M,null,i.DataParser.FRAME,X,t.Float,0,this._parseDeformFrame),this._geometry=null;break;case A.TimelineType.SlotDeform:this._geometry=null;try{for(var J=(T=void 0,a(Object.keys(this._armature.skins))),$=J.next();!$.done;$=J.next()){j=$.value;var ee=this._armature.skins[j];try{for(var re=(D=void 0,a(Object.keys(ee.displays))),ae=re.next();!ae.done;ae=re.next()){var te=ae.value,ie=ee.displays[te];try{for(var ne=(E=void 0,a(ie)),se=ne.next();!se.done;se=ne.next()){var oe=se.value;if(null!==oe&&oe.name===q){this._geometry=oe.geometry;break}}}catch(me){E={error:me}}finally{try{se&&!se.done&&(v=ne.return)&&v.call(ne)}finally{if(E)throw E.error}}}}catch(ye){D={error:ye}}finally{try{ae&&!ae.done&&(P=re.return)&&P.call(re)}finally{if(D)throw D.error}}}}catch(ue){T={error:ue}}finally{try{$&&!$.done&&(g=J.return)&&g.call(J)}finally{if(T)throw T.error}}if(null===this._geometry)continue;Z=this._parseTimeline(M,null,i.DataParser.FRAME,X,t.Float,0,this._parseDeformFrame),this._geometry=null;break;case A.TimelineType.SlotColor:Z=this._parseTimeline(M,null,i.DataParser.FRAME,X,t.Int,1,this._parseSlotColorFrame)}if(null!==Z)switch(X){case A.TimelineType.Action:case A.TimelineType.ZOrder:break;case A.TimelineType.BoneTranslate:case A.TimelineType.BoneRotate:case A.TimelineType.BoneScale:case A.TimelineType.Surface:case A.TimelineType.BoneAlpha:this._animation.addBoneTimeline(q,Z);break;case A.TimelineType.SlotDisplay:case A.TimelineType.SlotColor:case A.TimelineType.SlotDeform:case A.TimelineType.SlotZIndex:case A.TimelineType.SlotAlpha:this._animation.addSlotTimeline(q,Z);break;case A.TimelineType.IKConstraint:this._animation.addConstraintTimeline(q,Z);break;case A.TimelineType.AnimationProgress:case A.TimelineType.AnimationWeight:case A.TimelineType.AnimationParameter:this._animation.addAnimationTimeline(q,Z)}}}catch(Ae){u={error:Ae}}finally{try{K&&!K.done&&(c=W.return)&&c.call(W)}finally{if(u)throw u.error}}}return this._animation=null,S},d.prototype._parseTimeline=function(e,r,a,n,s,o,l,_){if(void 0===_&&(_=null),null!==e&&a.length>0&&a in e&&(r=e[a]),null===r)return null;var f=r.length;if(0===f)return null;var m=this._frameIntArray.length,y=this._frameFloatArray.length,u=this._timelineArray.length;switch(null===_&&(_=p.BaseObject.borrowObject(h.TimelineData)),_.type=n,_.offset=u,this._frameValueType=s,this._timeline=_,this._timelineArray.length+=5+f,null!==e?(this._timelineArray[u+A.BinaryOffset.TimelineScale]=Math.round(100*d._getNumber(e,i.DataParser.SCALE,1)),this._timelineArray[u+A.BinaryOffset.TimelineOffset]=Math.round(100*d._getNumber(e,i.DataParser.OFFSET,0))):(this._timelineArray[u+A.BinaryOffset.TimelineScale]=100,this._timelineArray[u+A.BinaryOffset.TimelineOffset]=0),this._timelineArray[u+A.BinaryOffset.TimelineKeyFrameCount]=f,this._timelineArray[u+A.BinaryOffset.TimelineFrameValueCount]=o,this._frameValueType){case t.Step:this._timelineArray[u+A.BinaryOffset.TimelineFrameValueOffset]=0;break;case t.Int:this._timelineArray[u+A.BinaryOffset.TimelineFrameValueOffset]=m-this._animation.frameIntOffset;break;case t.Float:this._timelineArray[u+A.BinaryOffset.TimelineFrameValueOffset]=y-this._animation.frameFloatOffset}if(1===f)_.frameIndicesOffset=-1,this._timelineArray[u+A.BinaryOffset.TimelineFrameOffset+0]=l.call(this,r[0],0,0)-this._animation.frameOffset;else{var c=this._animation.frameCount+1,T=this._data.frameIndices,g=T.length;T.length+=c,_.frameIndicesOffset=g;for(var D=0,E=0,v=0,S=0;D0)if(i.DataParser.CURVE in e){var n=a+1;this._helpArray.length=n;var s=this._samplingEasingCurve(e[i.DataParser.CURVE],this._helpArray);this._frameArray.length+=2+this._helpArray.length,this._frameArray[t+A.BinaryOffset.FrameTweenType]=A.TweenType.Curve,this._frameArray[t+A.BinaryOffset.FrameTweenEasingOrCurveSampleCount]=s?n:-n;for(var o=0;o0){for(var s=this._armature.sortedSlots.length,o=new Array(s-n.length/2),l=new Array(s),h=0;h0?t>=this._prevRotation:t<=this._prevRotation)&&(this._prevClockwise=this._prevClockwise>0?this._prevClockwise-1:this._prevClockwise+1),t=this._prevRotation+t-this._prevRotation+f.Transform.PI_D*this._prevClockwise)),this._prevClockwise=d._getNumber(e,i.DataParser.TWEEN_ROTATE,0),this._prevRotation=t;var n=this._parseTweenFrame(e,r,a),s=this._frameFloatArray.length;return this._frameFloatArray.length+=6,this._frameFloatArray[s++]=this._helpTransform.x,this._frameFloatArray[s++]=this._helpTransform.y,this._frameFloatArray[s++]=t,this._frameFloatArray[s++]=this._helpTransform.skew,this._frameFloatArray[s++]=this._helpTransform.scaleX,this._frameFloatArray[s++]=this._helpTransform.scaleY,this._parseActionDataInFrame(e,r,this._bone,this._slot),n},d.prototype._parseBoneTranslateFrame=function(e,r,a){var t=this._parseTweenFrame(e,r,a),n=this._frameFloatArray.length;return this._frameFloatArray.length+=2,this._frameFloatArray[n++]=d._getNumber(e,i.DataParser.X,0),this._frameFloatArray[n++]=d._getNumber(e,i.DataParser.Y,0),t},d.prototype._parseBoneRotateFrame=function(e,r,a){var t=d._getNumber(e,i.DataParser.ROTATE,0)*f.Transform.DEG_RAD;0!==r&&(0===this._prevClockwise?t=this._prevRotation+f.Transform.normalizeRadian(t-this._prevRotation):((this._prevClockwise>0?t>=this._prevRotation:t<=this._prevRotation)&&(this._prevClockwise=this._prevClockwise>0?this._prevClockwise-1:this._prevClockwise+1),t=this._prevRotation+t-this._prevRotation+f.Transform.PI_D*this._prevClockwise)),this._prevClockwise=d._getNumber(e,i.DataParser.CLOCK_WISE,0),this._prevRotation=t;var n=this._parseTweenFrame(e,r,a),s=this._frameFloatArray.length;return this._frameFloatArray.length+=2,this._frameFloatArray[s++]=t,this._frameFloatArray[s++]=d._getNumber(e,i.DataParser.SKEW,0)*f.Transform.DEG_RAD,n},d.prototype._parseBoneScaleFrame=function(e,r,a){var t=this._parseTweenFrame(e,r,a),n=this._frameFloatArray.length;return this._frameFloatArray.length+=2,this._frameFloatArray[n++]=d._getNumber(e,i.DataParser.X,1),this._frameFloatArray[n++]=d._getNumber(e,i.DataParser.Y,1),t},d.prototype._parseSlotDisplayFrame=function(e,r,a){var t=this._parseFrame(e,r,a);return this._frameArray.length+=1,i.DataParser.VALUE in e?this._frameArray[t+1]=d._getNumber(e,i.DataParser.VALUE,0):this._frameArray[t+1]=d._getNumber(e,i.DataParser.DISPLAY_INDEX,0),this._parseActionDataInFrame(e,r,this._slot.parent,this._slot),t},d.prototype._parseSlotColorFrame=function(e,r,t){var n,s,o=this._parseTweenFrame(e,r,t),l=-1;if(i.DataParser.VALUE in e||i.DataParser.COLOR in e){var h=i.DataParser.VALUE in e?e[i.DataParser.VALUE]:e[i.DataParser.COLOR];try{for(var _=a(Object.keys(h)),f=_.next();!f.done;f=_.next()){f.value;this._parseColorTransform(h,this._helpColorTransform),l=this._colorArray.length,this._colorArray.length+=8,this._colorArray[l++]=Math.round(100*this._helpColorTransform.alphaMultiplier),this._colorArray[l++]=Math.round(100*this._helpColorTransform.redMultiplier),this._colorArray[l++]=Math.round(100*this._helpColorTransform.greenMultiplier),this._colorArray[l++]=Math.round(100*this._helpColorTransform.blueMultiplier),this._colorArray[l++]=Math.round(this._helpColorTransform.alphaOffset),this._colorArray[l++]=Math.round(this._helpColorTransform.redOffset),this._colorArray[l++]=Math.round(this._helpColorTransform.greenOffset),this._colorArray[l++]=Math.round(this._helpColorTransform.blueOffset),l-=8;break}}catch(y){n={error:y}}finally{try{f&&!f.done&&(s=_.return)&&s.call(_)}finally{if(n)throw n.error}}}l<0&&(this._defaultColorOffset<0&&(this._defaultColorOffset=l=this._colorArray.length,this._colorArray.length+=8,this._colorArray[l++]=100,this._colorArray[l++]=100,this._colorArray[l++]=100,this._colorArray[l++]=100,this._colorArray[l++]=0,this._colorArray[l++]=0,this._colorArray[l++]=0,this._colorArray[l++]=0),l=this._defaultColorOffset);var m=this._frameIntArray.length;return this._frameIntArray.length+=1,this._frameIntArray[m]=l,o},d.prototype._parseSlotDeformFrame=function(e,r,a){var t=this._frameFloatArray.length,n=this._parseTweenFrame(e,r,a),s=i.DataParser.VERTICES in e?e[i.DataParser.VERTICES]:null,o=d._getNumber(e,i.DataParser.OFFSET,0),l=this._intArray[this._mesh.geometry.offset+A.BinaryOffset.GeometryVertexCount],h=this._mesh.parent.name+"_"+this._slot.name+"_"+this._mesh.name,_=this._mesh.geometry.weight,f=0,m=0,y=0,u=0;if(null!==_){var p=this._weightSlotPose[h];this._helpMatrixA.copyFromArray(p,0),this._frameFloatArray.length+=2*_.count,y=_.offset+A.BinaryOffset.WeigthBoneIndices+_.bones.length}else this._frameFloatArray.length+=2*l;for(var c=0;c<2*l;c+=2)if(null===s?(f=0,m=0):(f=c=s.length?0:s[c-o],m=c+1=s.length?0:s[c+1-o]),null!==_){var T=this._weightBonePoses[h],g=this._intArray[y++];this._helpMatrixA.transformPoint(f,m,this._helpPoint,!0),f=this._helpPoint.x,m=this._helpPoint.y;for(var D=0;D=s.length?0:s[f-o],_=f+1=s.length?0:s[f+1-o]):(h=0,_=0),this._frameFloatArray[t+f]=h,this._frameFloatArray[t+f+1]=_}if(0===r){var m=this._frameIntArray.length;this._frameIntArray.length+=5,this._frameIntArray[m+A.BinaryOffset.DeformVertexOffset]=this._geometry.offset,this._frameIntArray[m+A.BinaryOffset.DeformCount]=this._frameFloatArray.length-t,this._frameIntArray[m+A.BinaryOffset.DeformValueCount]=this._frameFloatArray.length-t,this._frameIntArray[m+A.BinaryOffset.DeformValueOffset]=0,this._frameIntArray[m+A.BinaryOffset.DeformFloatOffset]=t-this._animation.frameFloatOffset,this._timelineArray[this._timeline.offset+A.BinaryOffset.TimelineFrameValueCount]=m-this._animation.frameIntOffset}return n},d.prototype._parseTransform=function(e,r,a){r.x=d._getNumber(e,i.DataParser.X,0)*a,r.y=d._getNumber(e,i.DataParser.Y,0)*a,i.DataParser.ROTATE in e||i.DataParser.SKEW in e?(r.rotation=f.Transform.normalizeRadian(d._getNumber(e,i.DataParser.ROTATE,0)*f.Transform.DEG_RAD),r.skew=f.Transform.normalizeRadian(d._getNumber(e,i.DataParser.SKEW,0)*f.Transform.DEG_RAD)):(i.DataParser.SKEW_X in e||i.DataParser.SKEW_Y in e)&&(r.rotation=f.Transform.normalizeRadian(d._getNumber(e,i.DataParser.SKEW_Y,0)*f.Transform.DEG_RAD),r.skew=f.Transform.normalizeRadian(d._getNumber(e,i.DataParser.SKEW_X,0)*f.Transform.DEG_RAD)-r.rotation),r.scaleX=d._getNumber(e,i.DataParser.SCALE_X,1),r.scaleY=d._getNumber(e,i.DataParser.SCALE_Y,1)},d.prototype._parseColorTransform=function(e,r){r.alphaMultiplier=.01*d._getNumber(e,i.DataParser.ALPHA_MULTIPLIER,100),r.redMultiplier=.01*d._getNumber(e,i.DataParser.RED_MULTIPLIER,100),r.greenMultiplier=.01*d._getNumber(e,i.DataParser.GREEN_MULTIPLIER,100),r.blueMultiplier=.01*d._getNumber(e,i.DataParser.BLUE_MULTIPLIER,100),r.alphaOffset=d._getNumber(e,i.DataParser.ALPHA_OFFSET,0),r.redOffset=d._getNumber(e,i.DataParser.RED_OFFSET,0),r.greenOffset=d._getNumber(e,i.DataParser.GREEN_OFFSET,0),r.blueOffset=d._getNumber(e,i.DataParser.BLUE_OFFSET,0)},d.prototype._parseGeometry=function(e,r){var a=e[i.DataParser.VERTICES],t=Math.floor(a.length/2),n=0,s=this._intArray.length,l=this._floatArray.length;r.offset=s,r.data=this._data,this._intArray.length+=4,this._intArray[s+A.BinaryOffset.GeometryVertexCount]=t,this._intArray[s+A.BinaryOffset.GeometryFloatOffset]=l,this._intArray[s+A.BinaryOffset.GeometryWeightOffset]=-1,this._floatArray.length+=2*t;for(var h=0,_=2*t;h<_;++h)this._floatArray[l+h]=a[h];if(i.DataParser.TRIANGLES in e){var f=e[i.DataParser.TRIANGLES];n=Math.floor(f.length/3),this._intArray.length+=3*n;for(h=0,_=3*n;h<_;++h)this._intArray[s+A.BinaryOffset.GeometryVertexIndices+h]=f[h]}if(this._intArray[s+A.BinaryOffset.GeometryTriangleCount]=n,i.DataParser.UVS in e){var m=e[i.DataParser.UVS],y=l+2*t;this._floatArray.length+=2*t;for(h=0,_=2*t;h<_;++h)this._floatArray[y+h]=m[h]}if(i.DataParser.WEIGHTS in e){var u=e[i.DataParser.WEIGHTS],c=Math.floor(u.length-t)/2,T=this._intArray.length,g=this._floatArray.length,D=0,P=this._armature.sortedBones,E=p.BaseObject.borrowObject(o.WeightData);if(E.count=c,E.offset=T,this._intArray.length+=2+D+t+c,this._intArray[T+A.BinaryOffset.WeigthFloatOffset]=g,i.DataParser.BONE_POSE in e){var d=e[i.DataParser.SLOT_POSE],v=e[i.DataParser.BONE_POSE],S=new Array;D=Math.floor(v.length/7),S.length=D;for(h=0;h=0&&t+61e-4;){var T=.5*(c+p);this._getCurvePoint(l,h,_,f,m,y,u,A,T,this._helpPoint),s-this._helpPoint.x>0?p=T:c=T}r[i]=this._helpPoint.y}return!0}for(t=0,i=0,n=r.length;i1e-4;){T=.5*(c+p);this._getCurvePoint(l,h,_,f,m,y,u,A,T,this._helpPoint),s-this._helpPoint.x>0?p=T:c=T}r[i]=this._helpPoint.y}return!1},d.prototype._parseActionDataInFrame=function(e,r,a,t){i.DataParser.EVENT in e&&this._mergeActionFrame(e[i.DataParser.EVENT],r,A.ActionType.Frame,a,t),i.DataParser.SOUND in e&&this._mergeActionFrame(e[i.DataParser.SOUND],r,A.ActionType.Sound,a,t),i.DataParser.ACTION in e&&this._mergeActionFrame(e[i.DataParser.ACTION],r,A.ActionType.Play,a,t),i.DataParser.EVENTS in e&&this._mergeActionFrame(e[i.DataParser.EVENTS],r,A.ActionType.Frame,a,t),i.DataParser.ACTIONS in e&&this._mergeActionFrame(e[i.DataParser.ACTIONS],r,A.ActionType.Play,a,t)},d.prototype._mergeActionFrame=function(e,r,t,i,n){var s,o,l,h,_=this._armature.actions.length,f=this._parseActionData(e,t,i,n),m=0,y=null;try{for(var u=a(f),A=u.next();!A.done;A=u.next()){var p=A.value;this._armature.addAction(p,!1)}}catch(E){s={error:E}}finally{try{A&&!A.done&&(o=u.return)&&o.call(u)}finally{if(s)throw s.error}}0===this._actionFrames.length&&((y=new P).frameStart=0,this._actionFrames.push(y),y=null);try{for(var c=a(this._actionFrames),T=c.next();!T.done;T=c.next()){var g=T.value;if(g.frameStart===r){y=g;break}if(g.frameStart>r)break;m++}}catch(d){l={error:d}}finally{try{T&&!T.done&&(h=c.return)&&h.call(c)}finally{if(l)throw l.error}}null===y&&((y=new P).frameStart=r,this._actionFrames.splice(m,0,y));for(var D=0;D=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var a=require("./object-data-parser"),t=require("../core/dragonbones"),i=require("../model/animation-data"),n=require("../core/base-object"),s=require("./data-parser"),o=require("../model/display-data"),f=function(f){function l(){return null!==f&&f.apply(this,arguments)||this}return e(l,f),l.getInstance=function(){return null===l._binaryDataParserInstance&&(l._binaryDataParserInstance=new l),l._binaryDataParserInstance},l.prototype.parseDragonBonesData=function(e,r){void 0===r&&(r=1),console.assert(null!=e&&e instanceof ArrayBuffer,"Data error.");var a=new Uint8Array(e,0,8);if(a[0]!=="D".charCodeAt(0)||a[1]!=="B".charCodeAt(0)||a[2]!=="D".charCodeAt(0)||a[3]!=="T".charCodeAt(0))return console.assert(!1,"Nonsupport data."),null;var t=new Uint32Array(e,8,1)[0],i=new Uint8Array(e,12,t),n=this._decodeUTF8(i),s=JSON.parse(n);return this._binaryOffset=12+t,this._binary=e,f.prototype.parseDragonBonesData.call(this,s,r)},l.prototype._parseAnimation=function(e){var o,f,l,y,_,m,h,c,u=n.BaseObject.borrowObject(i.AnimationData);u.blendType=s.DataParser._getAnimationBlendType(a.ObjectDataParser._getString(e,s.DataParser.BLEND_TYPE,"")),u.frameCount=a.ObjectDataParser._getNumber(e,s.DataParser.DURATION,0),u.playTimes=a.ObjectDataParser._getNumber(e,s.DataParser.PLAY_TIMES,1),u.duration=u.frameCount/this._armature.frameRate,u.fadeInTime=a.ObjectDataParser._getNumber(e,s.DataParser.FADE_IN_TIME,0),u.scale=a.ObjectDataParser._getNumber(e,s.DataParser.SCALE,1),u.name=a.ObjectDataParser._getString(e,s.DataParser.NAME,s.DataParser.DEFAULT_NAME),0===u.name.length&&(u.name=s.DataParser.DEFAULT_NAME);var T=e[s.DataParser.OFFSET];if(u.frameIntOffset=T[0],u.frameFloatOffset=T[1],u.frameOffset=T[2],this._animation=u,s.DataParser.ACTION in e&&(u.actionTimeline=this._parseBinaryTimeline(t.TimelineType.Action,e[s.DataParser.ACTION])),s.DataParser.Z_ORDER in e&&(u.zOrderTimeline=this._parseBinaryTimeline(t.TimelineType.ZOrder,e[s.DataParser.Z_ORDER])),s.DataParser.BONE in e){var p=e[s.DataParser.BONE];try{for(var d=r(Object.keys(p)),b=d.next();!b.done;b=d.next()){var O=p[w=b.value],A=this._armature.getBone(w);if(null!==A)for(var D=0,P=O.length;D=0){B=a.ObjectDataParser._getNumber(M,s.DataParser.TYPE,t.TimelineType.Action);var L=a.ObjectDataParser._getString(M,s.DataParser.NAME,"");g=null;if(B===t.TimelineType.AnimationProgress&&u.blendType!==t.AnimationBlendType.None){var x=g=n.BaseObject.borrowObject(i.AnimationTimelineData);x.x=a.ObjectDataParser._getNumber(M,s.DataParser.X,0),x.y=a.ObjectDataParser._getNumber(M,s.DataParser.Y,0)}switch(g=this._parseBinaryTimeline(B,E,g),B){case t.TimelineType.Action:case t.TimelineType.ZOrder:break;case t.TimelineType.BoneTranslate:case t.TimelineType.BoneRotate:case t.TimelineType.BoneScale:case t.TimelineType.Surface:case t.TimelineType.BoneAlpha:this._animation.addBoneTimeline(L,g);break;case t.TimelineType.SlotDisplay:case t.TimelineType.SlotColor:case t.TimelineType.SlotDeform:case t.TimelineType.SlotZIndex:case t.TimelineType.SlotAlpha:this._animation.addSlotTimeline(L,g);break;case t.TimelineType.IKConstraint:this._animation.addConstraintTimeline(L,g);break;case t.TimelineType.AnimationProgress:case t.TimelineType.AnimationWeight:case t.TimelineType.AnimationParameter:this._animation.addAnimationTimeline(L,g)}}}}catch(q){h={error:q}}finally{try{F&&!F.done&&(c=R.return)&&c.call(R)}finally{if(h)throw h.error}}}return this._animation=null,u},l.prototype._parseGeometry=function(e,r){r.offset=e[s.DataParser.OFFSET],r.data=this._data;var a=this._intArrayBuffer[r.offset+t.BinaryOffset.GeometryWeightOffset];if(a>=0){var i=n.BaseObject.borrowObject(o.WeightData),f=this._intArrayBuffer[r.offset+t.BinaryOffset.GeometryVertexCount],l=this._intArrayBuffer[a+t.BinaryOffset.WeigthBoneCount];i.offset=a;for(var y=0;y12?r[13]:0,y=new Uint16Array(this._binary,this._binaryOffset+r[0],a/Uint16Array.BYTES_PER_ELEMENT),_=new Float32Array(this._binary,this._binaryOffset+r[2],t/Float32Array.BYTES_PER_ELEMENT),m=new Int16Array(this._binary,this._binaryOffset+r[4],i/Int16Array.BYTES_PER_ELEMENT),h=new Float32Array(this._binary,this._binaryOffset+r[6],n/Float32Array.BYTES_PER_ELEMENT),c=new Int16Array(this._binary,this._binaryOffset+r[8],o/Int16Array.BYTES_PER_ELEMENT),u=new Uint16Array(this._binary,this._binaryOffset+r[10],f/Uint16Array.BYTES_PER_ELEMENT),T=l>0?new Uint16Array(this._binary,this._binaryOffset+r[12],l/Uint16Array.BYTES_PER_ELEMENT):y;this._data.binary=this._binary,this._data.intArray=this._intArrayBuffer=y,this._data.floatArray=_,this._data.frameIntArray=m,this._data.frameFloatArray=h,this._data.frameArray=this._frameArrayBuffer=c,this._data.timelineArray=this._timelineArrayBuffer=u,this._data.colorArray=T},l.prototype._inRange=function(e,r,a){return r<=e&&e<=a},l.prototype._decodeUTF8=function(e){for(var r,a=0,t="",i=0,n=0,s=0,o=0;e.length>a;){var f=e[a++];if(-1===f)r=0!==n?65533:-1;else if(0===n)this._inRange(f,0,127)?r=f:(this._inRange(f,194,223)?(n=1,o=128,i=f-192):this._inRange(f,224,239)?(n=2,o=2048,i=f-224):this._inRange(f,240,244)&&(n=3,o=65536,i=f-240),i*=Math.pow(64,n),r=null);else if(this._inRange(f,128,191))if(s+=1,i+=(f-128)*Math.pow(64,n-s),s!==n)r=null;else{var l=i,y=o;i=0,n=0,s=0,o=0,r=this._inRange(l,y,1114111)&&!this._inRange(l,55296,57343)?l:f}else i=0,n=0,s=0,o=0,a--,r=f;null!==r&&-1!==r&&(r<=65535?r>0&&(t+=String.fromCharCode(r)):(r-=65536,t+=String.fromCharCode(55296+(r>>10&1023)),t+=String.fromCharCode(56320+(1023&r))))}return t},l.prototype._parseBinaryTimeline=function(e,r,a){void 0===a&&(a=null);var s=null!==a?a:n.BaseObject.borrowObject(i.TimelineData);s.type=e,s.offset=r,this._timeline=s;var o=this._timelineArrayBuffer[s.offset+t.BinaryOffset.TimelineKeyFrameCount];if(1===o)s.frameIndicesOffset=-1;else{var f,l=this._animation.frameCount+1,y=this._data.frameIndices;f=y.length,y.length+=l,s.frameIndicesOffset=f;for(var _=0,m=0,h=0,c=0;_1){var e=Math.floor(this.currentTime*this._frameRate),r=this._frameIndices[this._timelineData.frameIndicesOffset+e];this._frameIndex!==r&&(this._frameIndex=r,this._frameOffset=this._animationData.frameOffset+this._timelineArray[this._timelineData.offset+i.BinaryOffset.TimelineFrameOffset+this._frameIndex],this._onArriveAtFrame())}else this._frameIndex<0&&(this._frameIndex=0,null!==this._timelineData&&(this._frameOffset=this._animationData.frameOffset+this._timelineArray[this._timelineData.offset+i.BinaryOffset.TimelineFrameOffset]),this._onArriveAtFrame());(this._isTween||this.dirty)&&this._onUpdateFrame()}},r.prototype.blend=function(t){},r.prototype._onClear=function(){this.dirty=!1,this.playState=-1,this.currentPlayTimes=0,this.currentTime=-1,this.target=null,this._isTween=!1,this._valueOffset=0,this._frameValueOffset=0,this._frameOffset=0,this._frameRate=0,this._frameCount=0,this._frameIndex=-1,this._frameRateR=0,this._position=0,this._duration=0,this._timeScale=1,this._timeOffset=0,this._animationData=null,this._timelineData=null,this._armature=null,this._animationState=null,this._actionTimeline=null,this._frameArray=null,this._valueArray=null,this._timelineArray=null,this._frameIndices=null},r.prototype._setCurrentTime=function(t){var e=this.playState,i=this.currentPlayTimes,r=this.currentTime;if(null!==this._actionTimeline&&this._frameCount<=1)this.playState=this._actionTimeline.playState>=0?1:-1,this.currentPlayTimes=1,this.currentTime=this._actionTimeline.currentTime;else if(null===this._actionTimeline||1!==this._timeScale||0!==this._timeOffset){var s=this._animationState.playTimes,a=s*this._duration;t*=this._timeScale,0!==this._timeOffset&&(t+=this._timeOffset*this._animationData.duration),s>0&&(t>=a||t<=-a)?(this.playState<=0&&3===this._animationState._playheadState&&(this.playState=1),this.currentPlayTimes=s,this.currentTime=t<0?0:1===this.playState?this._duration+1e-6:this._duration):(0!==this.playState&&3===this._animationState._playheadState&&(this.playState=0),t<0?(t=-t,this.currentPlayTimes=Math.floor(t/this._duration),this.currentTime=this._duration-t%this._duration):(this.currentPlayTimes=Math.floor(t/this._duration),this.currentTime=t%this._duration)),this.currentTime+=this._position}else this.playState=this._actionTimeline.playState,this.currentPlayTimes=this._actionTimeline.currentPlayTimes,this.currentTime=this._actionTimeline.currentTime;return(this.currentPlayTimes!==i||this.currentTime!==r)&&((e<0&&this.playState!==e||this.playState<=0&&this.currentPlayTimes!==i)&&(this._frameIndex=-1),!0)},r}(e.BaseObject);exports.TimelineState=r;var s=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r._getEasingValue=function(t,e,r){var s=e;switch(t){case i.TweenType.QuadIn:s=Math.pow(e,2);break;case i.TweenType.QuadOut:s=1-Math.pow(1-e,2);break;case i.TweenType.QuadInOut:s=.5*(1-Math.cos(e*Math.PI))}return(s-e)*r+e},r._getEasingCurveValue=function(t,e,i,r){if(t<=0)return 0;if(t>=1)return 1;var s=i>0,a=i+1,n=Math.floor(t*a),h=0,_=0;return s?(h=0===n?0:e[r+n-1],_=n===a-1?1e4:e[r+n]):(h=e[r+n-1],_=e[r+n]),1e-4*(h+(_-h)*(t*a-n))},r.prototype._onClear=function(){e.prototype._onClear.call(this),this._tweenType=i.TweenType.None,this._curveCount=0,this._framePosition=0,this._frameDurationR=0,this._tweenEasing=0,this._tweenProgress=0,this._valueScale=1},r.prototype._onArriveAtFrame=function(){if(this._frameCount>1&&(this._frameIndex!==this._frameCount-1||0===this._animationState.playTimes||this._animationState.currentPlayTimes0?1/e:0}else this.dirty=!0,this._isTween=!1},r.prototype._onUpdateFrame=function(){this._isTween&&(this.dirty=!0,this._tweenProgress=(this.currentTime-this._framePosition)*this._frameDurationR,this._tweenType===i.TweenType.Curve?this._tweenProgress=r._getEasingCurveValue(this._tweenProgress,this._frameArray,this._curveCount,this._frameOffset+i.BinaryOffset.FrameCurveSamples):this._tweenType!==i.TweenType.Line&&(this._tweenProgress=r._getEasingValue(this._tweenType,this._tweenProgress,this._tweenEasing)))},r}(r);exports.TweenTimelineState=s;var a=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t(i,e),i.prototype._onClear=function(){e.prototype._onClear.call(this),this._current=0,this._difference=0,this._result=0},i.prototype._onArriveAtFrame=function(){if(e.prototype._onArriveAtFrame.call(this),null!==this._timelineData){var t=this._valueScale,i=this._valueArray,r=this._valueOffset+this._frameValueOffset+this._frameIndex;if(this._isTween){var s=this._frameIndex===this._frameCount-1?this._valueOffset+this._frameValueOffset:r+1;1===t?(this._current=i[r],this._difference=i[s]-this._current):(this._current=i[r]*t,this._difference=i[s]*t-this._current)}else this._result=i[r]*t}else this._result=0},i.prototype._onUpdateFrame=function(){e.prototype._onUpdateFrame.call(this),this._isTween&&(this._result=this._current+this._difference*this._tweenProgress)},i}(s);exports.SingleValueTimelineState=a;var n=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t(i,e),i.prototype._onClear=function(){e.prototype._onClear.call(this),this._currentA=0,this._currentB=0,this._differenceA=0,this._differenceB=0,this._resultA=0,this._resultB=0},i.prototype._onArriveAtFrame=function(){if(e.prototype._onArriveAtFrame.call(this),null!==this._timelineData){var t=this._valueScale,i=this._valueArray,r=this._valueOffset+this._frameValueOffset+2*this._frameIndex;if(this._isTween){var s=this._frameIndex===this._frameCount-1?this._valueOffset+this._frameValueOffset:r+2;1===t?(this._currentA=i[r],this._currentB=i[r+1],this._differenceA=i[s]-this._currentA,this._differenceB=i[s+1]-this._currentB):(this._currentA=i[r]*t,this._currentB=i[r+1]*t,this._differenceA=i[s]*t-this._currentA,this._differenceB=i[s+1]*t-this._currentB)}else this._resultA=i[r]*t,this._resultB=i[r+1]*t}else this._resultA=0,this._resultB=0},i.prototype._onUpdateFrame=function(){e.prototype._onUpdateFrame.call(this),this._isTween&&(this._resultA=this._currentA+this._differenceA*this._tweenProgress,this._resultB=this._currentB+this._differenceB*this._tweenProgress)},i}(s);exports.DoubleValueTimelineState=n;var h=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t._rd=[],t}return t(i,e),i.prototype._onClear=function(){e.prototype._onClear.call(this),this._valueCount=0,this._rd.length=0},i.prototype._onArriveAtFrame=function(){e.prototype._onArriveAtFrame.call(this);var t=this._valueCount,i=this._rd;if(null!==this._timelineData){var r=this._valueScale,s=this._valueArray,a=this._valueOffset+this._frameValueOffset+this._frameIndex*t;if(this._isTween){var n=this._frameIndex===this._frameCount-1?this._valueOffset+this._frameValueOffset:a+t;if(1===r)for(var h=0;h0&&l.hasDBEventListener(a.EventObject.COMPLETE)&&((_=r.BaseObject.borrowObject(a.EventObject)).type=a.EventObject.COMPLETE,_.armature=this._armature,_.animationState=this._animationState)),this._frameCount>1){var m=this._timelineData,p=Math.floor(this.currentTime*this._frameRate),c=this._frameIndices[m.frameIndicesOffset+p];if(this._frameIndex!==c){var y=this._frameIndex;if(this._frameIndex=c,null!==this._timelineArray)if(this._frameOffset=this._animationData.frameOffset+this._timelineArray[m.offset+i.BinaryOffset.TimelineFrameOffset+this._frameIndex],h){if(y<0){var d=Math.floor(s*this._frameRate);y=this._frameIndices[m.frameIndicesOffset+d],this.currentPlayTimes===n&&y===c&&(y=-1)}for(;y>=0;){var O=this._animationData.frameOffset+this._timelineArray[m.offset+i.BinaryOffset.TimelineFrameOffset+y],v=this._frameArray[O]/this._frameRate;if(this._position<=v&&v<=this._position+this._duration&&this._onCrossFrame(y),null!==u&&0===y&&(this._armature._dragonBones.bufferEvent(u),u=null),y>0?y--:y=this._frameCount-1,y===c)break}}else{if(y<0){d=Math.floor(s*this._frameRate);y=this._frameIndices[m.frameIndicesOffset+d];O=this._animationData.frameOffset+this._timelineArray[m.offset+i.BinaryOffset.TimelineFrameOffset+y],v=this._frameArray[O]/this._frameRate;this.currentPlayTimes===n&&(s<=v?y>0?y--:y=this._frameCount-1:y===c&&(y=-1))}for(;y>=0;){y=0&&(this._frameArray[this._frameOffset+1]>0?this._armature._sortZOrder(this._frameArray,this._frameOffset+2):this._armature._sortZOrder(null,0))},i.prototype._onUpdateFrame=function(){},i}(e.TimelineState);exports.ZOrderTimelineState=o;var l=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t(i,e),i.toString=function(){return"[class dragonBones.BoneAllTimelineState]"},i.prototype.init=function(t,i,r){e.prototype.init.call(this,t,i,r),this._valueOffset=this._animationData.frameFloatOffset,this._valueCount=6,this._valueArray=this._animationData.parent.parent.frameFloatArray},i.prototype.fadeOut=function(){this.dirty=!1,this._rd[2]=n.Transform.normalizeRadian(this._rd[2]),this._rd[3]=n.Transform.normalizeRadian(this._rd[3])},i.prototype.blend=function(t){var e=this._armature.armatureData.scale,i=this._rd,r=this.target,a=r.target,n=r.blendWeight,s=a.animationPose;r.dirty>1?(s.x+=i[0]*n*e,s.y+=i[1]*n*e,s.rotation+=i[2]*n,s.skew+=i[3]*n,s.scaleX+=(i[4]-1)*n,s.scaleY+=(i[5]-1)*n):(s.x=i[0]*n*e,s.y=i[1]*n*e,s.rotation=i[2]*n,s.skew=i[3]*n,s.scaleX=(i[4]-1)*n+1,s.scaleY=(i[5]-1)*n+1),(t||this.dirty)&&(this.dirty=!1,a._transformDirty=!0)},i.prototype._onArriveAtFrame=function(){e.prototype._onArriveAtFrame.call(this),this._isTween&&this._frameIndex===this._frameCount-1&&(this._rd[2]=n.Transform.normalizeRadian(this._rd[2]),this._rd[3]=n.Transform.normalizeRadian(this._rd[3])),null===this._timelineData&&(this._rd[4]=1,this._rd[5]=1)},i}(e.MutilpleValueTimelineState);exports.BoneAllTimelineState=l;var f=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t(i,e),i.toString=function(){return"[class dragonBones.BoneTranslateTimelineState]"},i.prototype.init=function(t,i,r){e.prototype.init.call(this,t,i,r),this._valueOffset=this._animationData.frameFloatOffset,this._valueScale=this._armature.armatureData.scale,this._valueArray=this._animationData.parent.parent.frameFloatArray},i.prototype.blend=function(t){var e=this.target,i=e.target,r=e.blendWeight,a=i.animationPose;e.dirty>1?(a.x+=this._resultA*r,a.y+=this._resultB*r):1!==r?(a.x=this._resultA*r,a.y=this._resultB*r):(a.x=this._resultA,a.y=this._resultB),(t||this.dirty)&&(this.dirty=!1,i._transformDirty=!0)},i}(e.DoubleValueTimelineState);exports.BoneTranslateTimelineState=f;var h=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t(i,e),i.toString=function(){return"[class dragonBones.BoneRotateTimelineState]"},i.prototype.init=function(t,i,r){e.prototype.init.call(this,t,i,r),this._valueOffset=this._animationData.frameFloatOffset,this._valueArray=this._animationData.parent.parent.frameFloatArray},i.prototype.fadeOut=function(){this.dirty=!1,this._resultA=n.Transform.normalizeRadian(this._resultA),this._resultB=n.Transform.normalizeRadian(this._resultB)},i.prototype.blend=function(t){var e=this.target,i=e.target,r=e.blendWeight,a=i.animationPose;e.dirty>1?(a.rotation+=this._resultA*r,a.skew+=this._resultB*r):1!==r?(a.rotation=this._resultA*r,a.skew=this._resultB*r):(a.rotation=this._resultA,a.skew=this._resultB),(t||this.dirty)&&(this.dirty=!1,i._transformDirty=!0)},i.prototype._onArriveAtFrame=function(){e.prototype._onArriveAtFrame.call(this),this._isTween&&this._frameIndex===this._frameCount-1&&(this._differenceA=n.Transform.normalizeRadian(this._differenceA),this._differenceB=n.Transform.normalizeRadian(this._differenceB))},i}(e.DoubleValueTimelineState);exports.BoneRotateTimelineState=h;var u=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t(i,e),i.toString=function(){return"[class dragonBones.BoneScaleTimelineState]"},i.prototype.init=function(t,i,r){e.prototype.init.call(this,t,i,r),this._valueOffset=this._animationData.frameFloatOffset,this._valueArray=this._animationData.parent.parent.frameFloatArray},i.prototype.blend=function(t){var e=this.target,i=e.target,r=e.blendWeight,a=i.animationPose;e.dirty>1?(a.scaleX+=(this._resultA-1)*r,a.scaleY+=(this._resultB-1)*r):1!==r?(a.scaleX=(this._resultA-1)*r+1,a.scaleY=(this._resultB-1)*r+1):(a.scaleX=this._resultA,a.scaleY=this._resultB),(t||this.dirty)&&(this.dirty=!1,i._transformDirty=!0)},i.prototype._onArriveAtFrame=function(){e.prototype._onArriveAtFrame.call(this),null===this._timelineData&&(this._resultA=1,this._resultB=1)},i}(e.DoubleValueTimelineState);exports.BoneScaleTimelineState=u;var _=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r.toString=function(){return"[class dragonBones.SurfaceTimelineState]"},r.prototype.init=function(t,r,a){if(e.prototype.init.call(this,t,r,a),null!==this._timelineData){var n=this._animationData.parent.parent,s=n.frameIntArray,o=this._animationData.frameIntOffset+this._timelineArray[this._timelineData.offset+i.BinaryOffset.TimelineFrameValueCount];this._valueOffset=this._animationData.frameFloatOffset,this._valueCount=s[o+i.BinaryOffset.DeformValueCount],this._deformCount=s[o+i.BinaryOffset.DeformCount],this._deformOffset=s[o+i.BinaryOffset.DeformValueOffset],this._sameValueOffset=s[o+i.BinaryOffset.DeformFloatOffset]+this._animationData.frameFloatOffset,this._valueScale=this._armature.armatureData.scale,this._valueArray=n.frameFloatArray,this._rd.length=2*this._valueCount}else this._deformCount=this.target.target._deformVertices.length},r.prototype.blend=function(t){var e=this.target,i=e.target,r=e.blendWeight,a=i._deformVertices,n=this._valueArray;if(null!==n)for(var s=this._valueCount,o=this._deformOffset,l=this._sameValueOffset,f=this._rd,h=0;h1?a[h]+=u*r:a[h]=u*r}else if(1===e.dirty)for(h=0;h1?(i._alpha+=this._result*r,i._alpha>1&&(i._alpha=1)):i._alpha=this._result*r,(t||this.dirty)&&(this.dirty=!1,this._armature._alphaDirty=!0)},i.prototype._onArriveAtFrame=function(){e.prototype._onArriveAtFrame.call(this),null===this._timelineData&&(this._result=1)},i}(e.SingleValueTimelineState);exports.AlphaTimelineState=m;var p=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t(i,e),i.toString=function(){return"[class dragonBones.SlotDisplayTimelineState]"},i.prototype._onArriveAtFrame=function(){if(this.playState>=0){var t=this.target,e=null!==this._timelineData?this._frameArray[this._frameOffset+1]:t._slotData.displayIndex;t.displayIndex!==e&&t._setDisplayIndex(e,!0)}},i.prototype._onUpdateFrame=function(){},i}(e.TimelineState);exports.SlotDisplayTimelineState=p;var c=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t._current=[0,0,0,0,0,0,0,0],t._difference=[0,0,0,0,0,0,0,0],t._result=[0,0,0,0,0,0,0,0],t}return t(i,e),i.toString=function(){return"[class dragonBones.SlotColorTimelineState]"},i.prototype.fadeOut=function(){this._isTween=!1},i.prototype.update=function(t){if(e.prototype.update.call(this,t),this._isTween||this.dirty){var i=this.target,r=i._colorTransform;if(0!==this._animationState._fadeState||0!==this._animationState._subFadeState){if(r.alphaMultiplier!==this._result[0]||r.redMultiplier!==this._result[1]||r.greenMultiplier!==this._result[2]||r.blueMultiplier!==this._result[3]||r.alphaOffset!==this._result[4]||r.redOffset!==this._result[5]||r.greenOffset!==this._result[6]||r.blueOffset!==this._result[7]){var a=Math.pow(this._animationState._fadeProgress,4);r.alphaMultiplier+=(this._result[0]-r.alphaMultiplier)*a,r.redMultiplier+=(this._result[1]-r.redMultiplier)*a,r.greenMultiplier+=(this._result[2]-r.greenMultiplier)*a,r.blueMultiplier+=(this._result[3]-r.blueMultiplier)*a,r.alphaOffset+=(this._result[4]-r.alphaOffset)*a,r.redOffset+=(this._result[5]-r.redOffset)*a,r.greenOffset+=(this._result[6]-r.greenOffset)*a,r.blueOffset+=(this._result[7]-r.blueOffset)*a,i._colorDirty=!0}}else this.dirty&&(this.dirty=!1,r.alphaMultiplier===this._result[0]&&r.redMultiplier===this._result[1]&&r.greenMultiplier===this._result[2]&&r.blueMultiplier===this._result[3]&&r.alphaOffset===this._result[4]&&r.redOffset===this._result[5]&&r.greenOffset===this._result[6]&&r.blueOffset===this._result[7]||(r.alphaMultiplier=this._result[0],r.redMultiplier=this._result[1],r.greenMultiplier=this._result[2],r.blueMultiplier=this._result[3],r.alphaOffset=this._result[4],r.redOffset=this._result[5],r.greenOffset=this._result[6],r.blueOffset=this._result[7],i._colorDirty=!0))}},i.prototype._onArriveAtFrame=function(){if(e.prototype._onArriveAtFrame.call(this),null!==this._timelineData){var t=this._animationData.parent.parent,i=t.colorArray,r=t.frameIntArray,a=this._animationData.frameIntOffset+this._frameValueOffset+this._frameIndex,n=r[a];n<0&&(n+=65536),this._isTween?(this._current[0]=i[n++],this._current[1]=i[n++],this._current[2]=i[n++],this._current[3]=i[n++],this._current[4]=i[n++],this._current[5]=i[n++],this._current[6]=i[n++],this._current[7]=i[n++],(n=this._frameIndex===this._frameCount-1?r[this._animationData.frameIntOffset+this._frameValueOffset]:r[a+1])<0&&(n+=65536),this._difference[0]=i[n++]-this._current[0],this._difference[1]=i[n++]-this._current[1],this._difference[2]=i[n++]-this._current[2],this._difference[3]=i[n++]-this._current[3],this._difference[4]=i[n++]-this._current[4],this._difference[5]=i[n++]-this._current[5],this._difference[6]=i[n++]-this._current[6],this._difference[7]=i[n++]-this._current[7]):(this._result[0]=.01*i[n++],this._result[1]=.01*i[n++],this._result[2]=.01*i[n++],this._result[3]=.01*i[n++],this._result[4]=i[n++],this._result[5]=i[n++],this._result[6]=i[n++],this._result[7]=i[n++])}else{var s=this.target.slotData.color;this._result[0]=s.alphaMultiplier,this._result[1]=s.redMultiplier,this._result[2]=s.greenMultiplier,this._result[3]=s.blueMultiplier,this._result[4]=s.alphaOffset,this._result[5]=s.redOffset,this._result[6]=s.greenOffset,this._result[7]=s.blueOffset}},i.prototype._onUpdateFrame=function(){e.prototype._onUpdateFrame.call(this),this._isTween&&(this._result[0]=.01*(this._current[0]+this._difference[0]*this._tweenProgress),this._result[1]=.01*(this._current[1]+this._difference[1]*this._tweenProgress),this._result[2]=.01*(this._current[2]+this._difference[2]*this._tweenProgress),this._result[3]=.01*(this._current[3]+this._difference[3]*this._tweenProgress),this._result[4]=this._current[4]+this._difference[4]*this._tweenProgress,this._result[5]=this._current[5]+this._difference[5]*this._tweenProgress,this._result[6]=this._current[6]+this._difference[6]*this._tweenProgress,this._result[7]=this._current[7]+this._difference[7]*this._tweenProgress)},i}(e.TweenTimelineState);exports.SlotColorTimelineState=c;var y=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t(i,e),i.toString=function(){return"[class dragonBones.SlotZIndexTimelineState]"},i.prototype.init=function(t,i,r){e.prototype.init.call(this,t,i,r),this._valueOffset=this._animationData.frameIntOffset,this._valueArray=this._animationData.parent.parent.frameIntArray},i.prototype.blend=function(t){var e=this.target,i=e.target,r=e.blendWeight;e.dirty>1?i._zIndex+=this._result*r:i._zIndex=this._result*r,(t||this.dirty)&&(this.dirty=!1,this._armature._zIndexDirty=!0)},i.prototype._onArriveAtFrame=function(){if(e.prototype._onArriveAtFrame.call(this),null===this._timelineData){var t=this.target.target;this._result=t.slotData.zIndex}},i}(e.SingleValueTimelineState);exports.SlotZIndexTimelineState=y;var d=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r.toString=function(){return"[class dragonBones.DeformTimelineState]"},r.prototype.init=function(t,r,a){if(e.prototype.init.call(this,t,r,a),null!==this._timelineData){var n=this._animationData.frameIntOffset+this._timelineArray[this._timelineData.offset+i.BinaryOffset.TimelineFrameValueCount],s=this._animationData.parent.parent,o=s.frameIntArray,l=this.target.target;this.geometryOffset=o[n+i.BinaryOffset.DeformVertexOffset],this.geometryOffset<0&&(this.geometryOffset+=65536);for(var f=0,h=l.displayFrameCount;f1?a[h]+=u*r:a[h]=u*r}else if(1===e.dirty)for(h=0;h0,t._weight=this._currentB;else{var i=t._constraintData;t._bendPositive=i.bendPositive,t._weight=i.weight}t.invalidUpdate(),this.dirty=!1},i}(e.DoubleValueTimelineState);exports.IKConstraintTimelineState=O;var v=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t(i,e),i.toString=function(){return"[class dragonBones.AnimationProgressTimelineState]"},i.prototype.init=function(t,i,r){e.prototype.init.call(this,t,i,r),this._valueOffset=this._animationData.frameIntOffset,this._valueScale=1e-4,this._valueArray=this._animationData.parent.parent.frameIntArray},i.prototype._onUpdateFrame=function(){e.prototype._onUpdateFrame.call(this);var t=this.target;null!==t._parent&&(t.currentTime=this._result*t.totalTime),this.dirty=!1},i}(e.SingleValueTimelineState);exports.AnimationProgressTimelineState=v;var g=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t(i,e),i.toString=function(){return"[class dragonBones.AnimationWeightTimelineState]"},i.prototype.init=function(t,i,r){e.prototype.init.call(this,t,i,r),this._valueOffset=this._animationData.frameIntOffset,this._valueScale=1e-4,this._valueArray=this._animationData.parent.parent.frameIntArray},i.prototype._onUpdateFrame=function(){e.prototype._onUpdateFrame.call(this);var t=this.target;null!==t._parent&&(t.weight=this._result),this.dirty=!1},i}(e.SingleValueTimelineState);exports.AnimationWeightTimelineState=g;var A=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t(i,e),i.toString=function(){return"[class dragonBones.AnimationParametersTimelineState]"},i.prototype.init=function(t,i,r){e.prototype.init.call(this,t,i,r),this._valueOffset=this._animationData.frameIntOffset,this._valueScale=1e-4,this._valueArray=this._animationData.parent.parent.frameIntArray},i.prototype._onUpdateFrame=function(){e.prototype._onUpdateFrame.call(this);var t=this.target;null!==t._parent&&(t.parameterX=this._resultA,t.parameterY=this._resultB),this.dirty=!1},i}(e.DoubleValueTimelineState);exports.AnimationParametersTimelineState=A; },{"./base-timeline-state":"F8ww","../core/dragonbones":"o5u6","../core/base-object":"g7m0","../event/event-object":"nj0d","../geom/transform":"hJt8"}],"Hxif":[function(require,module,exports) { "use strict";var e=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),t=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var i=require("../core/base-object"),n=require("../core/dragonbones"),r=require("./timeline-state"),a=require("../event/event-object"),s=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.toString=function(){return"[class dragonBones.BlendState]"},i.prototype.update=function(e){var t=e.layer,i=e._weightResult;if(this.dirty>0){if(this.leftWeight>0){if(this.layer!==t){if(this.layerWeight>=this.leftWeight)return this.dirty++,this.layer=t,this.leftWeight=0,this.blendWeight=0,!1;this.layer=t,this.leftWeight-=this.layerWeight,this.layerWeight=0}return i*=this.leftWeight,this.dirty++,this.blendWeight=i,this.layerWeight+=this.blendWeight,!0}return!1}return this.dirty++,this.layer=t,this.leftWeight=1,this.blendWeight=i,this.layerWeight=i,!0},i.prototype.reset=function(){this.dirty=0,this.layer=0,this.leftWeight=0,this.layerWeight=0,this.blendWeight=0},i.prototype._onClear=function(){this.reset(),this.target=null},i.BONE_TRANSFORM="boneTransform",i.BONE_ALPHA="boneAlpha",i.SURFACE="surface",i.SLOT_DEFORM="slotDeform",i.SLOT_ALPHA="slotAlpha",i.SLOT_Z_INDEX="slotZIndex",i}(i.BaseObject);exports.BlendState=s;var l=function(l){function o(){var e=null!==l&&l.apply(this,arguments)||this;return e._actionTimeline=null,e._boneMask=[],e._boneTimelines=[],e._boneBlendTimelines=[],e._slotTimelines=[],e._slotBlendTimelines=[],e._constraintTimelines=[],e._animationTimelines=[],e._poseTimelines=[],e._zOrderTimeline=null,e}return e(o,l),o.toString=function(){return"[class dragonBones.AnimationState]"},Object.defineProperty(o.prototype,"isFadeIn",{get:function(){return this._fadeState<0},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isFadeOut",{get:function(){return this._fadeState>0},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isFadeComplete",{get:function(){return 0===this._fadeState},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isPlaying",{get:function(){return 0!=(2&this._playheadState)&&this._actionTimeline.playState<=0},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isCompleted",{get:function(){return this._actionTimeline.playState>0},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"currentPlayTimes",{get:function(){return this._actionTimeline.currentPlayTimes},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"totalTime",{get:function(){return this._duration},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"currentTime",{get:function(){return this._actionTimeline.currentTime},set:function(e){var i,n,r,a,s=this._actionTimeline.currentPlayTimes-(this._actionTimeline.playState>0?1:0);if((e<0||this._duration0&&s===this.playTimes-1&&e===this._duration&&null===this._parent&&(e=this._duration-1e-6),this._time!==e){this._time=e,this._actionTimeline.setCurrentTime(this._time),null!==this._zOrderTimeline&&(this._zOrderTimeline.playState=-1);try{for(var l=t(this._boneTimelines),o=l.next();!o.done;o=l.next()){o.value.playState=-1}}catch(m){i={error:m}}finally{try{o&&!o.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}try{for(var h=t(this._slotTimelines),u=h.next();!u.done;u=h.next()){u.value.playState=-1}}catch(c){r={error:c}}finally{try{u&&!u.done&&(a=h.return)&&a.call(h)}finally{if(r)throw r.error}}}},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"weight",{get:function(){return this._weight},set:function(e){var i,n,r,a,s,l;if(this._weight!==e){this._weight=e;try{for(var o=t(this._boneTimelines),h=o.next();!h.done;h=o.next()){h.value.dirty=!0}}catch(f){i={error:f}}finally{try{h&&!h.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}try{for(var u=t(this._boneBlendTimelines),m=u.next();!m.done;m=u.next()){m.value.dirty=!0}}catch(d){r={error:d}}finally{try{m&&!m.done&&(a=u.return)&&a.call(u)}finally{if(r)throw r.error}}try{for(var c=t(this._slotBlendTimelines),_=c.next();!_.done;_=c.next()){_.value.dirty=!0}}catch(y){s={error:y}}finally{try{_&&!_.done&&(l=c.return)&&l.call(c)}finally{if(s)throw s.error}}}},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"animationData",{get:function(){return this._animationData},enumerable:!0,configurable:!0}),o.prototype.init=function(e,t,n){if(null===this._armature){if(this._armature=e,this._animationData=t,this.resetToPose=n.resetToPose,this.additive=n.additive,this.displayControl=n.displayControl,this.actionEnabled=n.actionEnabled,this.blendType=t.blendType,this.layer=n.layer,this.playTimes=n.playTimes,this.timeScale=n.timeScale,this.fadeTotalTime=n.fadeInTime,this.autoFadeOutTime=n.autoFadeOutTime,this.name=n.name.length>0?n.name:n.animation,this.group=n.group,this._weight=n.weight,n.pauseFadeIn?this._playheadState=2:this._playheadState=3,n.duration<0?(this._position=0,this._duration=this._animationData.duration,0!==n.position?this.timeScale>=0?this._time=n.position:this._time=n.position-this._duration:this._time=0):(this._position=n.position,this._duration=n.duration,this._time=0),this.timeScale<0&&0===this._time&&(this._time=-1e-6),this.fadeTotalTime<=0&&(this._fadeProgress=.999999),n.boneMask.length>0){this._boneMask.length=n.boneMask.length;for(var a=0,s=this._boneMask.length;a0,o=!0,h=!0,u=this._time;if(this._weightResult=this._weight*this._fadeProgress,null!==this._parent&&(this._weightResult*=this._parent._weightResult),this._actionTimeline.playState<=0&&this._actionTimeline.update(u),0!==this._weight){if(l){var m=2*i;this._actionTimeline.currentTime=Math.floor(this._actionTimeline.currentTime*m)/m}if(null!==this._zOrderTimeline&&this._zOrderTimeline.playState<=0&&this._zOrderTimeline.update(u),l){var c=Math.floor(this._actionTimeline.currentTime*i);this._armature._cacheFrameIndex===c?(o=!1,h=!1):(this._armature._cacheFrameIndex=c,this._animationData.cachedFrames[c]?h=!1:this._animationData.cachedFrames[c]=!0)}if(o){var _=!1,f=null;if(h)for(var d=0,y=this._boneTimelines.length;d0){var v=100,g=100,O=null,S=null;for(d=0,y=this._animationTimelines.length;d=0?x0&&(this._subFadeState=0,this._poseTimelines.length>0)){try{for(var w=t(this._poseTimelines),j=w.next();!j.done;j=w.next()){var P=j.value,A=this._boneTimelines.indexOf(P);A>=0?(this._boneTimelines.splice(A,1),P.returnToPool()):(A=this._boneBlendTimelines.indexOf(P))>=0?(this._boneBlendTimelines.splice(A,1),P.returnToPool()):(A=this._slotTimelines.indexOf(P))>=0?(this._slotTimelines.splice(A,1),P.returnToPool()):(A=this._slotBlendTimelines.indexOf(P))>=0?(this._slotBlendTimelines.splice(A,1),P.returnToPool()):(A=this._constraintTimelines.indexOf(P))>=0&&(this._constraintTimelines.splice(A,1),P.returnToPool())}}catch(D){r={error:D}}finally{try{j&&!j.done&&(a=w.return)&&a.call(w)}finally{if(r)throw r.error}}this._poseTimelines.length=0}this._actionTimeline.playState>0&&this.autoFadeOutTime>=0&&this.fadeOut(this.autoFadeOutTime)}}},o.prototype.play=function(){this._playheadState=3},o.prototype.stop=function(){this._playheadState&=1},o.prototype.fadeOut=function(e,i){var n,r,a,s,l,o,h,u,m,c,_,f;if(void 0===i&&(i=!0),e<0&&(e=0),i&&(this._playheadState&=2),this._fadeState>0){if(e>this.fadeTotalTime-this._fadeTime)return}else{this._fadeState=1,this._subFadeState=-1,(e<=0||this._fadeProgress<=0)&&(this._fadeProgress=1e-6);try{for(var d=t(this._boneTimelines),y=d.next();!y.done;y=d.next()){(j=y.value).fadeOut()}}catch(P){n={error:P}}finally{try{y&&!y.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}try{for(var T=t(this._boneBlendTimelines),p=T.next();!p.done;p=T.next()){(j=p.value).fadeOut()}}catch(A){a={error:A}}finally{try{p&&!p.done&&(s=T.return)&&s.call(T)}finally{if(a)throw a.error}}try{for(var b=t(this._slotTimelines),v=b.next();!v.done;v=b.next()){(j=v.value).fadeOut()}}catch(D){l={error:D}}finally{try{v&&!v.done&&(o=b.return)&&o.call(b)}finally{if(l)throw l.error}}try{for(var g=t(this._slotBlendTimelines),O=g.next();!O.done;O=g.next()){(j=O.value).fadeOut()}}catch(k){h={error:k}}finally{try{O&&!O.done&&(u=g.return)&&u.call(g)}finally{if(h)throw h.error}}try{for(var S=t(this._constraintTimelines),B=S.next();!B.done;B=S.next()){(j=B.value).fadeOut()}}catch(F){m={error:F}}finally{try{B&&!B.done&&(c=S.return)&&c.call(S)}finally{if(m)throw m.error}}try{for(var x=t(this._animationTimelines),w=x.next();!w.done;w=x.next()){var j;(j=w.value).fadeOut(),j.target.fadeOut(999999,!0)}}catch(E){_={error:E}}finally{try{w&&!w.done&&(f=x.return)&&f.call(x)}finally{if(_)throw _.error}}}this.displayControl=!1,this.fadeTotalTime=this._fadeProgress>1e-6?e/this._fadeProgress:0,this._fadeTime=this.fadeTotalTime*(1-this._fadeProgress)},o.prototype.containsBoneMask=function(e){return 0===this._boneMask.length||this._boneMask.indexOf(e)>=0},o.prototype.addBoneMask=function(e,i){var n,r;void 0===i&&(i=!0);var a=this._armature.getBone(e);if(null!==a){if(this._boneMask.indexOf(e)<0&&this._boneMask.push(e),i)try{for(var s=t(this._armature.getBones()),l=s.next();!l.done;l=s.next()){var o=l.value;this._boneMask.indexOf(o.name)<0&&a.contains(o)&&this._boneMask.push(o.name)}}catch(h){n={error:h}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}this._timelineDirty=1}},o.prototype.removeBoneMask=function(e,i){var n,r,a,s;void 0===i&&(i=!0);var l=this._boneMask.indexOf(e);if(l>=0&&this._boneMask.splice(l,1),i){var o=this._armature.getBone(e);if(null!==o){var h=this._armature.getBones();if(this._boneMask.length>0)try{for(var u=t(h),m=u.next();!m.done;m=u.next()){var c=m.value,_=this._boneMask.indexOf(c.name);_>=0&&o.contains(c)&&this._boneMask.splice(_,1)}}catch(y){n={error:y}}finally{try{m&&!m.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}else try{for(var f=t(h),d=f.next();!d.done;d=f.next()){(c=d.value)!==o&&(o.contains(c)||this._boneMask.push(c.name))}}catch(T){a={error:T}}finally{try{d&&!d.done&&(s=f.return)&&s.call(f)}finally{if(a)throw a.error}}}}this._timelineDirty=1},o.prototype.removeAllBoneMask=function(){this._boneMask.length=0,this._timelineDirty=1},o.prototype.addState=function(e,a){var s,l;if(void 0===a&&(a=null),null!==a)try{for(var o=t(a),h=o.next();!h.done;h=o.next()){var u=h.value;switch(u.type){case n.TimelineType.AnimationProgress:if((c=i.BaseObject.borrowObject(r.AnimationProgressTimelineState)).target=e,c.init(this._armature,this,u),this._animationTimelines.push(c),this.blendType!==n.AnimationBlendType.None){var m=u;e.positionX=m.x,e.positionY=m.y,e.weight=0}e._parent=this,this.resetToPose=!1;break;case n.TimelineType.AnimationWeight:(c=i.BaseObject.borrowObject(r.AnimationWeightTimelineState)).target=e,c.init(this._armature,this,u),this._animationTimelines.push(c);break;case n.TimelineType.AnimationParameter:var c;(c=i.BaseObject.borrowObject(r.AnimationParametersTimelineState)).target=e,c.init(this._armature,this,u),this._animationTimelines.push(c)}}}catch(_){s={error:_}}finally{try{h&&!h.done&&(l=o.return)&&l.call(o)}finally{if(s)throw s.error}}null===e._parent&&(e._parent=this)},o.prototype.activeTimeline=function(){var e,i;try{for(var n=t(this._slotTimelines),r=n.next();!r.done;r=n.next()){var a=r.value;a.dirty=!0,a.currentTime=-1}}catch(s){e={error:s}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(e)throw e.error}}},o.prototype._onClear=function(){var e,i,r,a,s,l,o,h,u,m,c,_;try{for(var f=t(this._boneTimelines),d=f.next();!d.done;d=f.next()){(w=d.value).returnToPool()}}catch(P){e={error:P}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(e)throw e.error}}try{for(var y=t(this._boneBlendTimelines),T=y.next();!T.done;T=y.next()){(w=T.value).returnToPool()}}catch(A){r={error:A}}finally{try{T&&!T.done&&(a=y.return)&&a.call(y)}finally{if(r)throw r.error}}try{for(var p=t(this._slotTimelines),b=p.next();!b.done;b=p.next()){(w=b.value).returnToPool()}}catch(D){s={error:D}}finally{try{b&&!b.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}try{for(var v=t(this._slotBlendTimelines),g=v.next();!g.done;g=v.next()){(w=g.value).returnToPool()}}catch(k){o={error:k}}finally{try{g&&!g.done&&(h=v.return)&&h.call(v)}finally{if(o)throw o.error}}try{for(var O=t(this._constraintTimelines),S=O.next();!S.done;S=O.next()){(w=S.value).returnToPool()}}catch(F){u={error:F}}finally{try{S&&!S.done&&(m=O.return)&&m.call(O)}finally{if(u)throw u.error}}try{for(var B=t(this._animationTimelines),x=B.next();!x.done;x=B.next()){var w,j=(w=x.value).target;j._parent===this&&(j._fadeState=1,j._subFadeState=1,j._parent=null),w.returnToPool()}}catch(E){c={error:E}}finally{try{x&&!x.done&&(_=B.return)&&_.call(B)}finally{if(c)throw c.error}}null!==this._actionTimeline&&this._actionTimeline.returnToPool(),null!==this._zOrderTimeline&&this._zOrderTimeline.returnToPool(),this.actionEnabled=!1,this.additive=!1,this.displayControl=!1,this.resetToPose=!1,this.blendType=n.AnimationBlendType.None,this.playTimes=1,this.layer=0,this.timeScale=1,this._weight=1,this.parameterX=0,this.parameterY=0,this.positionX=0,this.positionY=0,this.autoFadeOutTime=0,this.fadeTotalTime=0,this.name="",this.group="",this._timelineDirty=2,this._playheadState=0,this._fadeState=-1,this._subFadeState=-1,this._position=0,this._duration=0,this._fadeTime=0,this._time=0,this._fadeProgress=0,this._weightResult=0,this._boneMask.length=0,this._boneTimelines.length=0,this._boneBlendTimelines.length=0,this._slotTimelines.length=0,this._slotBlendTimelines.length=0,this._constraintTimelines.length=0,this._animationTimelines.length=0,this._poseTimelines.length=0,this._animationData=null,this._armature=null,this._actionTimeline=null,this._zOrderTimeline=null,this._activeChildA=null,this._activeChildB=null,this._parent=null},o.prototype._updateTimelines=function(){var e,a,s,l;try{for(var o=t(this._armature._constraints),h=o.next();!h.done;h=o.next()){var u=h.value,m=this._animationData.getConstraintTimelines(u.name);if(null!==m)try{for(var c=(s=void 0,t(m)),_=c.next();!_.done;_=c.next()){var f=_.value;switch(f.type){case n.TimelineType.IKConstraint:(d=i.BaseObject.borrowObject(r.IKConstraintTimelineState)).target=u,d.init(this._armature,this,f),this._constraintTimelines.push(d)}}}catch(y){s={error:y}}finally{try{_&&!_.done&&(l=c.return)&&l.call(c)}finally{if(s)throw s.error}}else if(this.resetToPose){var d;(d=i.BaseObject.borrowObject(r.IKConstraintTimelineState)).target=u,d.init(this._armature,this,null),this._constraintTimelines.push(d),this._poseTimelines.push(d)}}}catch(T){e={error:T}}finally{try{h&&!h.done&&(a=o.return)&&a.call(o)}finally{if(e)throw e.error}}},o.prototype._updateBoneAndSlotTimelines=function(){var e,a,l,o,h,u,m,c,_,f,d,y,T,p,b,v,g,O,S,B,x,w,j,P,A={};try{for(var D=t(this._boneTimelines),k=D.next();!k.done;k=D.next()){(R=(Y=k.value).target.target.name)in A||(A[R]=[]),A[R].push(Y)}}catch(pe){e={error:pe}}finally{try{k&&!k.done&&(a=D.return)&&a.call(D)}finally{if(e)throw e.error}}try{for(var F=t(this._boneBlendTimelines),E=F.next();!E.done;E=F.next()){(R=(Y=E.value).target.target.name)in A||(A[R]=[]),A[R].push(Y)}}catch(be){l={error:be}}finally{try{E&&!E.done&&(o=F.return)&&o.call(F)}finally{if(l)throw l.error}}try{for(var M=t(this._armature.getBones()),C=M.next();!C.done;C=M.next()){var W=C.value,R=W.name;if(this.containsBoneMask(R))if(R in A)delete A[R];else{var I=this._animationData.getBoneTimelines(R),L=this._armature.animation.getBlendState(s.BONE_TRANSFORM,W.name,W);if(null!==I)try{for(var z=(m=void 0,t(I)),N=z.next();!N.done;N=z.next()){switch((oe=N.value).type){case n.TimelineType.BoneAll:(Y=i.BaseObject.borrowObject(r.BoneAllTimelineState)).target=L,Y.init(this._armature,this,oe),this._boneTimelines.push(Y);break;case n.TimelineType.BoneTranslate:(Y=i.BaseObject.borrowObject(r.BoneTranslateTimelineState)).target=L,Y.init(this._armature,this,oe),this._boneTimelines.push(Y);break;case n.TimelineType.BoneRotate:(Y=i.BaseObject.borrowObject(r.BoneRotateTimelineState)).target=L,Y.init(this._armature,this,oe),this._boneTimelines.push(Y);break;case n.TimelineType.BoneScale:(Y=i.BaseObject.borrowObject(r.BoneScaleTimelineState)).target=L,Y.init(this._armature,this,oe),this._boneTimelines.push(Y);break;case n.TimelineType.BoneAlpha:(Y=i.BaseObject.borrowObject(r.AlphaTimelineState)).target=this._armature.animation.getBlendState(s.BONE_ALPHA,W.name,W),Y.init(this._armature,this,oe),this._boneBlendTimelines.push(Y);break;case n.TimelineType.Surface:(Y=i.BaseObject.borrowObject(r.SurfaceTimelineState)).target=this._armature.animation.getBlendState(s.SURFACE,W.name,W),Y.init(this._armature,this,oe),this._boneBlendTimelines.push(Y)}}}catch(ve){m={error:ve}}finally{try{N&&!N.done&&(c=z.return)&&c.call(z)}finally{if(m)throw m.error}}else if(this.resetToPose){if(W._boneData.type===n.BoneType.Bone)(Y=i.BaseObject.borrowObject(r.BoneAllTimelineState)).target=L,Y.init(this._armature,this,null),this._boneTimelines.push(Y),this._poseTimelines.push(Y);else(Y=i.BaseObject.borrowObject(r.SurfaceTimelineState)).target=this._armature.animation.getBlendState(s.SURFACE,W.name,W),Y.init(this._armature,this,null),this._boneBlendTimelines.push(Y),this._poseTimelines.push(Y)}}}}catch(ge){h={error:ge}}finally{try{C&&!C.done&&(u=M.return)&&u.call(M)}finally{if(h)throw h.error}}try{for(var X=t(Object.keys(A)),Z=X.next();!Z.done;Z=X.next()){var U=Z.value;try{for(var q=(d=void 0,t(A[U])),H=q.next();!H.done;H=q.next()){var Y=H.value;(Te=this._boneTimelines.indexOf(Y))>=0&&(this._boneTimelines.splice(Te,1),Y.returnToPool()),(Te=this._boneBlendTimelines.indexOf(Y))>=0&&(this._boneBlendTimelines.splice(Te,1),Y.returnToPool())}}catch(Oe){d={error:Oe}}finally{try{H&&!H.done&&(y=q.return)&&y.call(q)}finally{if(d)throw d.error}}}}catch(Se){_={error:Se}}finally{try{Z&&!Z.done&&(f=X.return)&&f.call(X)}finally{if(_)throw _.error}}var K={},G=[];try{for(var V=t(this._slotTimelines),J=V.next();!J.done;J=V.next()){(R=(Y=J.value).target.name)in K||(K[R]=[]),K[R].push(Y)}}catch(Be){T={error:Be}}finally{try{J&&!J.done&&(p=V.return)&&p.call(V)}finally{if(T)throw T.error}}try{for(var Q=t(this._slotBlendTimelines),$=Q.next();!$.done;$=Q.next()){(R=(Y=$.value).target.target.name)in K||(K[R]=[]),K[R].push(Y)}}catch(xe){b={error:xe}}finally{try{$&&!$.done&&(v=Q.return)&&v.call(Q)}finally{if(b)throw b.error}}try{for(var ee=t(this._armature.getSlots()),te=ee.next();!te.done;te=ee.next()){var ie=te.value,ne=ie.parent.name;if(this.containsBoneMask(ne))if((R=ie.name)in K)delete K[R];else{var re=!1,ae=!1;if(G.length=0,null!==(I=this._animationData.getSlotTimelines(R)))try{for(var se=(S=void 0,t(I)),le=se.next();!le.done;le=se.next()){var oe;switch((oe=le.value).type){case n.TimelineType.SlotDisplay:(Y=i.BaseObject.borrowObject(r.SlotDisplayTimelineState)).target=ie,Y.init(this._armature,this,oe),this._slotTimelines.push(Y),re=!0;break;case n.TimelineType.SlotZIndex:(Y=i.BaseObject.borrowObject(r.SlotZIndexTimelineState)).target=this._armature.animation.getBlendState(s.SLOT_Z_INDEX,ie.name,ie),Y.init(this._armature,this,oe),this._slotBlendTimelines.push(Y);break;case n.TimelineType.SlotColor:(Y=i.BaseObject.borrowObject(r.SlotColorTimelineState)).target=ie,Y.init(this._armature,this,oe),this._slotTimelines.push(Y),ae=!0;break;case n.TimelineType.SlotDeform:(Y=i.BaseObject.borrowObject(r.DeformTimelineState)).target=this._armature.animation.getBlendState(s.SLOT_DEFORM,ie.name,ie),Y.init(this._armature,this,oe),null!==Y.target?(this._slotBlendTimelines.push(Y),G.push(Y.geometryOffset)):Y.returnToPool();break;case n.TimelineType.SlotAlpha:(Y=i.BaseObject.borrowObject(r.AlphaTimelineState)).target=this._armature.animation.getBlendState(s.SLOT_ALPHA,ie.name,ie),Y.init(this._armature,this,oe),this._slotBlendTimelines.push(Y)}}}catch(we){S={error:we}}finally{try{le&&!le.done&&(B=se.return)&&B.call(se)}finally{if(S)throw S.error}}if(this.resetToPose){if(!re)(Y=i.BaseObject.borrowObject(r.SlotDisplayTimelineState)).target=ie,Y.init(this._armature,this,null),this._slotTimelines.push(Y),this._poseTimelines.push(Y);if(!ae)(Y=i.BaseObject.borrowObject(r.SlotColorTimelineState)).target=ie,Y.init(this._armature,this,null),this._slotTimelines.push(Y),this._poseTimelines.push(Y);for(var he=0,ue=ie.displayFrameCount;he=0&&(this._slotTimelines.splice(Te,1),Y.returnToPool()),(Te=this._slotBlendTimelines.indexOf(Y))>=0&&(this._slotBlendTimelines.splice(Te,1),Y.returnToPool())}}catch(Pe){j={error:Pe}}finally{try{ye&&!ye.done&&(P=de.return)&&P.call(de)}finally{if(j)throw j.error}}}}catch(Ae){x={error:Ae}}finally{try{fe&&!fe.done&&(w=_e.return)&&w.call(_e)}finally{if(x)throw x.error}}},o.prototype._advanceFadeTime=function(e){var t=this._fadeState>0;if(this._subFadeState<0&&(this._subFadeState=0,null===this._parent&&this.actionEnabled)){var n=t?a.EventObject.FADE_OUT:a.EventObject.FADE_IN;if(this._armature.eventDispatcher.hasDBEventListener(n))(r=i.BaseObject.borrowObject(a.EventObject)).type=n,r.armature=this._armature,r.animationState=this,this._armature._dragonBones.bufferEvent(r)}if((e<0&&(e=-e),this._fadeTime+=e,this._fadeTime>=this.fadeTotalTime?(this._subFadeState=1,this._fadeProgress=t?0:1):this._fadeTime>0?this._fadeProgress=t?1-this._fadeTime/this.fadeTotalTime:this._fadeTime/this.fadeTotalTime:this._fadeProgress=t?1:0,this._subFadeState>0)&&(t||(this._playheadState|=1,this._fadeState=0),null===this._parent&&this.actionEnabled)){var r;n=t?a.EventObject.FADE_OUT_COMPLETE:a.EventObject.FADE_IN_COMPLETE;if(this._armature.eventDispatcher.hasDBEventListener(n))(r=i.BaseObject.borrowObject(a.EventObject)).type=n,r.armature=this._armature,r.animationState=this,this._armature._dragonBones.bufferEvent(r)}},o}(i.BaseObject);exports.AnimationState=l; },{"../core/base-object":"g7m0","../core/dragonbones":"o5u6","./timeline-state":"cOZR","../event/event-object":"nj0d"}],"PPJ2":[function(require,module,exports) { "use strict";var e=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../core/base-object"),i=require("../core/dragonbones"),n=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.boneMask=[],e}return e(n,t),n.toString=function(){return"[class dragonBones.AnimationConfig]"},n.prototype.clear=function(){this._onClear()},n.prototype.copyFrom=function(e){this.pauseFadeOut=e.pauseFadeOut,this.fadeOutMode=e.fadeOutMode,this.autoFadeOutTime=e.autoFadeOutTime,this.fadeOutTweenType=e.fadeOutTweenType,this.actionEnabled=e.actionEnabled,this.additive=e.additive,this.displayControl=e.displayControl,this.pauseFadeIn=e.pauseFadeIn,this.resetToPose=e.resetToPose,this.playTimes=e.playTimes,this.layer=e.layer,this.position=e.position,this.duration=e.duration,this.timeScale=e.timeScale,this.fadeInTime=e.fadeInTime,this.fadeOutTime=e.fadeOutTime,this.fadeInTweenType=e.fadeInTweenType,this.weight=e.weight,this.name=e.name,this.animation=e.animation,this.group=e.group,this.boneMask.length=e.boneMask.length;for(var t=0,i=this.boneMask.length;t=t.length&&(t=void 0),{value:t&&t[a++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../core/base-object"),a=require("./animation-state"),e=require("../model/animation-config"),o=require("../core/dragonbones"),r=function(r){function l(){var t=null!==r&&r.apply(this,arguments)||this;return t._animationNames=[],t._animationStates=[],t._animations={},t._blendStates={},t._animationConfig=null,t}return t(l,r),l.toString=function(){return"[class dragonBones.Animation]"},Object.defineProperty(l.prototype,"isPlaying",{get:function(){var t,n;try{for(var a=i(this._animationStates),e=a.next();!e.done;e=a.next()){if(e.value.isPlaying)return!0}}catch(o){t={error:o}}finally{try{e&&!e.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return!1},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"isCompleted",{get:function(){var t,n;try{for(var a=i(this._animationStates),e=a.next();!e.done;e=a.next()){if(!e.value.isCompleted)return!1}}catch(o){t={error:o}}finally{try{e&&!e.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return this._animationStates.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"lastAnimationName",{get:function(){return null!==this._lastAnimationState?this._lastAnimationState.name:""},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"animationNames",{get:function(){return this._animationNames},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"animations",{get:function(){return this._animations},set:function(t){var n,a,e,o;if(this._animations!==t){this._animationNames.length=0;try{for(var r=i(Object.keys(this._animations)),l=r.next();!l.done;l=r.next()){var s=l.value;delete this._animations[s]}}catch(f){n={error:f}}finally{try{l&&!l.done&&(a=r.return)&&a.call(r)}finally{if(n)throw n.error}}try{for(var m=i(Object.keys(t)),u=m.next();!u.done;u=m.next()){s=u.value;this._animationNames.push(s),this._animations[s]=t[s]}}catch(h){e={error:h}}finally{try{u&&!u.done&&(o=m.return)&&o.call(m)}finally{if(e)throw e.error}}}},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"animationConfig",{get:function(){return this._animationConfig.clear(),this._animationConfig},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"lastAnimationState",{get:function(){return this._lastAnimationState},enumerable:!0,configurable:!0}),l.prototype.init=function(t){null===this._armature&&(this._armature=t,this._animationConfig=n.BaseObject.borrowObject(e.AnimationConfig))},l.prototype.advanceTime=function(t){var n,a,e,o,r,l,s,m;t<0&&(t=-t),this._armature.inheritAnimation&&null!==this._armature._parent?this._inheritTimeScale=this._armature._parent._armature.animation._inheritTimeScale*this.timeScale:this._inheritTimeScale=this.timeScale,1!==this._inheritTimeScale&&(t*=this._inheritTimeScale);try{for(var u=i(Object.keys(this._blendStates)),f=u.next();!f.done;f=u.next()){var h=f.value,d=this._blendStates[h];try{for(var c=(e=void 0,i(Object.keys(d))),y=c.next();!y.done;y=c.next()){d[y.value].reset()}}catch(j){e={error:j}}finally{try{y&&!y.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}}}catch(F){n={error:F}}finally{try{f&&!f.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}var _=this._animationStates.length;if(1===_)if((P=this._animationStates[0])._fadeState>0&&P._subFadeState>0)this._armature._dragonBones.bufferObject(P),this._animationStates.length=0,this._lastAnimationState=null;else{var p=P.animationData,g=p.cacheFrameRate;if(this._animationDirty&&g>0){this._animationDirty=!1;try{for(var v=i(this._armature.getBones()),S=v.next();!S.done;S=v.next()){var b=S.value;b._cachedFrameIndices=p.getBoneCachedFrameIndices(b.name)}}catch(B){r={error:B}}finally{try{S&&!S.done&&(l=v.return)&&l.call(v)}finally{if(r)throw r.error}}try{for(var C=i(this._armature.getSlots()),O=C.next();!O.done;O=C.next()){var A=O.value;if(A.displayFrameCount>0){var x=A.getDisplayFrameAt(0).rawDisplayData;if(null!==x&&x.parent===this._armature.armatureData.defaultSkin){A._cachedFrameIndices=p.getSlotCachedFrameIndices(A.name);continue}}A._cachedFrameIndices=null}}catch(I){s={error:I}}finally{try{O&&!O.done&&(m=C.return)&&m.call(C)}finally{if(s)throw s.error}}}P.advanceTime(t,g)}else if(_>1){for(var T=0,w=0;T<_;++T){var P;(P=this._animationStates[T])._fadeState>0&&P._subFadeState>0?(w++,this._armature._dragonBones.bufferObject(P),this._animationDirty=!0,this._lastAnimationState===P&&(this._lastAnimationState=null)):(w>0&&(this._animationStates[T-w]=P),P.advanceTime(t,0)),T===_-1&&w>0&&(this._animationStates.length-=w,null===this._lastAnimationState&&this._animationStates.length>0&&(this._lastAnimationState=this._animationStates[this._animationStates.length-1]))}this._armature._cacheFrameIndex=-1}else this._armature._cacheFrameIndex=-1},l.prototype.reset=function(){var t,n;try{for(var a=i(this._animationStates),e=a.next();!e.done;e=a.next()){e.value.returnToPool()}}catch(o){t={error:o}}finally{try{e&&!e.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}this._animationDirty=!1,this._animationConfig.clear(),this._animationStates.length=0,this._lastAnimationState=null},l.prototype.stop=function(t){var n,a;if(void 0===t&&(t=null),null!==t)null!==(r=this.getState(t))&&r.stop();else try{for(var e=i(this._animationStates),o=e.next();!o.done;o=e.next()){var r;(r=o.value).stop()}}catch(l){n={error:l}}finally{try{o&&!o.done&&(a=e.return)&&a.call(e)}finally{if(n)throw n.error}}},l.prototype.playConfig=function(t){var e,r,l,s,m,u,f=t.animation;if(!(f in this._animations))return console.warn("Non-existent animation.\n","DragonBones name: "+this._armature.armatureData.parent.name,"Armature name: "+this._armature.name,"Animation name: "+f),null;var h=this._animations[f];if(t.fadeOutMode===o.AnimationFadeOutMode.Single)try{for(var d=i(this._animationStates),c=d.next();!c.done;c=d.next()){var y=c.value;if(y._fadeState<1&&y.layer===t.layer&&y.animationData===h)return y}}catch(F){e={error:F}}finally{try{c&&!c.done&&(r=d.return)&&r.call(d)}finally{if(e)throw e.error}}0===this._animationStates.length?t.fadeInTime=0:t.fadeInTime<0&&(t.fadeInTime=h.fadeInTime),t.fadeOutTime<0&&(t.fadeOutTime=t.fadeInTime),t.timeScale<=-100&&(t.timeScale=1/h.scale),h.frameCount>0?(t.position<0?(t.position%=h.duration,t.position=h.duration-t.position):t.position===h.duration?t.position-=1e-6:t.position>h.duration&&(t.position%=h.duration),t.duration>0&&t.position+t.duration>h.duration&&(t.duration=h.duration-t.position),t.playTimes<0&&(t.playTimes=h.playTimes)):(t.playTimes=1,t.position=0,t.duration>0&&(t.duration=0)),0===t.duration&&(t.duration=-1),this._fadeOut(t);var _=n.BaseObject.borrowObject(a.AnimationState);if(_.init(this._armature,h,t),this._animationDirty=!0,this._armature._cacheFrameIndex=-1,this._animationStates.length>0){for(var p=!1,g=0,v=this._animationStates.length;gthis._animationStates[g].layer){p=!0,this._animationStates.splice(g,0,_);break}if(g!==v-1&&_.layer>this._animationStates[g+1].layer){p=!0,this._animationStates.splice(g+1,0,_);break}}p||this._animationStates.push(_)}else this._animationStates.push(_);try{for(var S=i(this._armature.getSlots()),b=S.next();!b.done;b=S.next()){var C=b.value.childArmature;null!==C&&C.inheritAnimation&&C.animation.hasAnimation(f)&&null===C.animation.getState(f)&&C.animation.fadeIn(f)}}catch(B){l={error:B}}finally{try{b&&!b.done&&(s=S.return)&&s.call(S)}finally{if(l)throw l.error}}try{for(var O=i(Object.keys(h.animationTimelines)),A=O.next();!A.done;A=O.next()){var x=A.value,T=this.fadeIn(x,0,1,_.layer,"",o.AnimationFadeOutMode.Single);if(null!==T){var w=h.animationTimelines[x];T.actionEnabled=!1,T.resetToPose=!1,T.stop(),_.addState(T,w);var P=this._animationStates.indexOf(_),j=this._animationStates.indexOf(T);j0)this.playConfig(this._animationConfig);else if(null===this._lastAnimationState){var n=this._armature.armatureData.defaultAnimation;null!==n&&(this._animationConfig.animation=n.name,this.playConfig(this._animationConfig))}else this._lastAnimationState.isPlaying||this._lastAnimationState.isCompleted?(this._animationConfig.animation=this._lastAnimationState.name,this.playConfig(this._animationConfig)):this._lastAnimationState.play();return this._lastAnimationState},l.prototype.fadeIn=function(t,i,n,a,e,r){return void 0===i&&(i=-1),void 0===n&&(n=-1),void 0===a&&(a=0),void 0===e&&(e=null),void 0===r&&(r=o.AnimationFadeOutMode.SameLayerAndGroup),this._animationConfig.clear(),this._animationConfig.fadeOutMode=r,this._animationConfig.playTimes=n,this._animationConfig.layer=a,this._animationConfig.fadeInTime=i,this._animationConfig.animation=t,this._animationConfig.group=null!==e?e:"",this.playConfig(this._animationConfig)},l.prototype.gotoAndPlayByTime=function(t,i,n){return void 0===i&&(i=0),void 0===n&&(n=-1),this._animationConfig.clear(),this._animationConfig.resetToPose=!0,this._animationConfig.playTimes=n,this._animationConfig.position=i,this._animationConfig.fadeInTime=0,this._animationConfig.animation=t,this.playConfig(this._animationConfig)},l.prototype.gotoAndPlayByFrame=function(t,i,n){void 0===i&&(i=0),void 0===n&&(n=-1),this._animationConfig.clear(),this._animationConfig.resetToPose=!0,this._animationConfig.playTimes=n,this._animationConfig.fadeInTime=0,this._animationConfig.animation=t;var a=t in this._animations?this._animations[t]:null;return null!==a&&(this._animationConfig.position=a.frameCount>0?a.duration*i/a.frameCount:0),this.playConfig(this._animationConfig)},l.prototype.gotoAndPlayByProgress=function(t,i,n){void 0===i&&(i=0),void 0===n&&(n=-1),this._animationConfig.clear(),this._animationConfig.resetToPose=!0,this._animationConfig.playTimes=n,this._animationConfig.fadeInTime=0,this._animationConfig.animation=t;var a=t in this._animations?this._animations[t]:null;return null!==a&&(this._animationConfig.position=a.duration*(i>0?i:0)),this.playConfig(this._animationConfig)},l.prototype.gotoAndStopByTime=function(t,i){void 0===i&&(i=0);var n=this.gotoAndPlayByTime(t,i,1);return null!==n&&n.stop(),n},l.prototype.gotoAndStopByFrame=function(t,i){void 0===i&&(i=0);var n=this.gotoAndPlayByFrame(t,i,1);return null!==n&&n.stop(),n},l.prototype.gotoAndStopByProgress=function(t,i){void 0===i&&(i=0);var n=this.gotoAndPlayByProgress(t,i,1);return null!==n&&n.stop(),n},l.prototype.getBlendState=function(t,i,e){t in this._blendStates||(this._blendStates[t]={});var o=this._blendStates[t];i in o||((o[i]=n.BaseObject.borrowObject(a.BlendState)).target=e);return o[i]},l.prototype.getState=function(t,i){void 0===i&&(i=-1);for(var n=this._animationStates.length;n--;){var a=this._animationStates[n];if(a.name===t&&(i<0||a.layer===i))return a}return null},l.prototype.hasAnimation=function(t){return t in this._animations},l.prototype.getStates=function(){return this._animationStates},l.prototype._onClear=function(){var t,n,a,e,o,r,l,s;try{for(var m=i(this._animationStates),u=m.next();!u.done;u=m.next()){u.value.returnToPool()}}catch(v){t={error:v}}finally{try{u&&!u.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}try{for(var f=i(Object.keys(this._animations)),h=f.next();!h.done;h=f.next()){var d=h.value;delete this._animations[d]}}catch(S){a={error:S}}finally{try{h&&!h.done&&(e=f.return)&&e.call(f)}finally{if(a)throw a.error}}try{for(var c=i(Object.keys(this._blendStates)),y=c.next();!y.done;y=c.next()){d=y.value;var _=this._blendStates[d];try{for(var p=(l=void 0,i(Object.keys(_))),g=p.next();!g.done;g=p.next()){_[g.value].returnToPool()}}catch(b){l={error:b}}finally{try{g&&!g.done&&(s=p.return)&&s.call(p)}finally{if(l)throw l.error}}delete this._blendStates[d]}}catch(C){o={error:C}}finally{try{y&&!y.done&&(r=c.return)&&r.call(c)}finally{if(o)throw o.error}}null!==this._animationConfig&&this._animationConfig.returnToPool(),this.timeScale=1,this._animationDirty=!1,this._inheritTimeScale=1,this._animationNames.length=0,this._animationStates.length=0,this._armature=null,this._animationConfig=null,this._lastAnimationState=null},l.prototype._fadeOut=function(t){var n,a,e,r,l,s,m,u;switch(t.fadeOutMode){case o.AnimationFadeOutMode.SameLayer:try{for(var f=i(this._animationStates),h=f.next();!h.done;h=f.next()){null===(v=h.value)._parent&&(v.layer===t.layer&&v.fadeOut(t.fadeOutTime,t.pauseFadeOut))}}catch(S){n={error:S}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(n)throw n.error}}break;case o.AnimationFadeOutMode.SameGroup:try{for(var d=i(this._animationStates),c=d.next();!c.done;c=d.next()){null===(v=c.value)._parent&&(v.group===t.group&&v.fadeOut(t.fadeOutTime,t.pauseFadeOut))}}catch(b){e={error:b}}finally{try{c&&!c.done&&(r=d.return)&&r.call(d)}finally{if(e)throw e.error}}break;case o.AnimationFadeOutMode.SameLayerAndGroup:try{for(var y=i(this._animationStates),_=y.next();!_.done;_=y.next()){null===(v=_.value)._parent&&(v.layer===t.layer&&v.group===t.group&&v.fadeOut(t.fadeOutTime,t.pauseFadeOut))}}catch(C){l={error:C}}finally{try{_&&!_.done&&(s=y.return)&&s.call(y)}finally{if(l)throw l.error}}break;case o.AnimationFadeOutMode.All:try{for(var p=i(this._animationStates),g=p.next();!g.done;g=p.next()){var v;null===(v=g.value)._parent&&v.fadeOut(t.fadeOutTime,t.pauseFadeOut)}}catch(O){m={error:O}}finally{try{g&&!g.done&&(u=p.return)&&u.call(p)}finally{if(m)throw m.error}}break;case o.AnimationFadeOutMode.Single:}},l}(n.BaseObject);exports.Animation=r; },{"../core/base-object":"g7m0","./animation-state":"Hxif","../model/animation-config":"PPJ2","../core/dragonbones":"o5u6"}],"NyOa":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){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)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),e=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../core/base-object"),n=require("../core/dragonbones"),a=require("../animation/animation"),o=function(o){function i(){var t=null!==o&&o.apply(this,arguments)||this;return t._constraints=[],t._replaceTextureAtlasData=null,t._bones=[],t._slots=[],t._actions=[],t._animation=null,t._proxy=null,t._clock=null,t}return t(i,o),i.toString=function(){return"[class dragonBones.Armature]"},i._onSortSlots=function(t,e){return 1e3*t._zIndex+t._zOrder>1e3*e._zIndex+e._zOrder?1:-1},Object.defineProperty(i.prototype,"flipX",{get:function(){return this._flipX},set:function(t){this._flipX!==t&&(this._flipX=t,this.invalidUpdate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"flipY",{get:function(){return this._flipY},set:function(t){this._flipY!==t&&(this._flipY=t,this.invalidUpdate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cacheFrameRate",{get:function(){return this._armatureData.cacheFrameRate},set:function(t){var r,n;if(this._armatureData.cacheFrameRate!==t){this._armatureData.cacheFrames(t);try{for(var a=e(this._slots),o=a.next();!o.done;o=a.next()){var i=o.value.childArmature;null!==i&&(i.cacheFrameRate=t)}}catch(l){r={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"name",{get:function(){return this._armatureData.name},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"armatureData",{get:function(){return this._armatureData},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"animation",{get:function(){return this._animation},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"proxy",{get:function(){return this._proxy},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"eventDispatcher",{get:function(){return this._proxy},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"display",{get:function(){return this._display},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"replacedTexture",{get:function(){return this._replacedTexture},set:function(t){var r,n;if(this._replacedTexture!==t){null!==this._replaceTextureAtlasData&&(this._replaceTextureAtlasData.returnToPool(),this._replaceTextureAtlasData=null),this._replacedTexture=t;try{for(var a=e(this._slots),o=a.next();!o.done;o=a.next()){var i=o.value;i.invalidUpdate(),i.update(-1)}}catch(l){r={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"clock",{get:function(){return this._clock},set:function(t){var r,n;if(this._clock!==t){null!==this._clock&&this._clock.remove(this),this._clock=t,this._clock&&this._clock.add(this);try{for(var a=e(this._slots),o=a.next();!o.done;o=a.next()){var i=o.value.childArmature;null!==i&&(i.clock=this._clock)}}catch(l){r={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),i.prototype._sortZOrder=function(t,e){var r=this._armatureData.sortedSlots,n=null===t;if(this._zOrderDirty||!n){for(var a=0,o=r.length;a=o)){var l=r[i],s=this.getSlot(l.name);null!==s&&s._setZOrder(a)}}this._slotsDirty=!0,this._zOrderDirty=!n}},i.prototype._addBone=function(t){this._bones.indexOf(t)<0&&this._bones.push(t)},i.prototype._addSlot=function(t){this._slots.indexOf(t)<0&&this._slots.push(t)},i.prototype._addConstraint=function(t){this._constraints.indexOf(t)<0&&this._constraints.push(t)},i.prototype._bufferAction=function(t,e){this._actions.indexOf(t)<0&&(e?this._actions.push(t):this._actions.unshift(t))},i.prototype.dispose=function(){null!==this._armatureData&&(this._lockUpdate=!0,this._dragonBones.bufferObject(this))},i.prototype.init=function(t,e,n,o){null===this._armatureData&&(this._armatureData=t,this._animation=r.BaseObject.borrowObject(a.Animation),this._proxy=e,this._display=n,this._dragonBones=o,this._proxy.dbInit(this),this._animation.init(this),this._animation.animations=this._armatureData.animations)},i.prototype.advanceTime=function(t){var r,a,o,l,s,u,h,c;if(!this._lockUpdate)if(this._lockUpdate=!0,null!==this._armatureData)if(null!==this._armatureData.parent){var f=this._cacheFrameIndex;if(this._animation.advanceTime(t),this._slotsDirty||this._zIndexDirty){if(this._slots.sort(i._onSortSlots),this._zIndexDirty)for(var p=0,y=this._slots.length;p0){try{for(var m=e(this._actions),b=m.next();!b.done;b=m.next()){var g=b.value,D=g.actionData;if(null!==D)if(D.type===n.ActionType.Play)if(null!==g.slot)null!==(T=g.slot.childArmature)&&T.animation.fadeIn(D.name);else if(null!==g.bone)try{for(var O=(h=void 0,e(this.getSlots())),P=O.next();!P.done;P=O.next()){var w,T;if((w=P.value).parent===g.bone)null!==(T=w.childArmature)&&T.animation.fadeIn(D.name)}}catch(k){h={error:k}}finally{try{P&&!P.done&&(c=O.return)&&c.call(O)}finally{if(h)throw h.error}}else this._animation.fadeIn(D.name);g.returnToPool()}}catch(S){s={error:S}}finally{try{b&&!b.done&&(u=m.return)&&u.call(m)}finally{if(s)throw s.error}}this._actions.length=0}this._lockUpdate=!1,this._proxy.dbUpdate()}else console.warn("The armature data has been disposed.\nPlease make sure dispose armature before call factory.clear().");else console.warn("The armature has been disposed.")},i.prototype.invalidUpdate=function(t,r){var n,a,o,i,l,s;if(void 0===t&&(t=null),void 0===r&&(r=!1),null!==t&&t.length>0){if(null!==(p=this.getBone(t))&&(p.invalidUpdate(),r))try{for(var u=e(this._slots),h=u.next();!h.done;h=u.next()){(d=h.value).parent===p&&d.invalidUpdate()}}catch(v){n={error:v}}finally{try{h&&!h.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}}else{try{for(var c=e(this._bones),f=c.next();!f.done;f=c.next()){var p;(p=f.value).invalidUpdate()}}catch(x){o={error:x}}finally{try{f&&!f.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}if(r)try{for(var y=e(this._slots),_=y.next();!_.done;_=y.next()){var d;(d=_.value).invalidUpdate()}}catch(m){l={error:m}}finally{try{_&&!_.done&&(s=y.return)&&s.call(y)}finally{if(l)throw l.error}}}},i.prototype.containsPoint=function(t,r){var n,a;try{for(var o=e(this._slots),i=o.next();!i.done;i=o.next()){var l=i.value;if(l.containsPoint(t,r))return l}}catch(s){n={error:s}}finally{try{i&&!i.done&&(a=o.return)&&a.call(o)}finally{if(n)throw n.error}}return null},i.prototype.intersectsSegment=function(t,r,n,a,o,i,l){var s,u;void 0===o&&(o=null),void 0===i&&(i=null),void 0===l&&(l=null);var h=t===n,c=0,f=0,p=0,y=0,_=0,d=0,v=0,x=0,m=null,b=null;try{for(var g=e(this._slots),D=g.next();!D.done;D=g.next()){var O=D.value;if(O.intersectsSegment(t,r,n,a,o,i,l)>0){if(null===o&&null===i){m=O;break}var P;null!==o&&((P=h?o.y-r:o.x-t)<0&&(P=-P),(null===m||Pf)&&(f=P,_=i.x,d=i.y,b=O,null!==l&&(x=l.y)))}}}catch(w){s={error:w}}finally{try{D&&!D.done&&(u=g.return)&&u.call(g)}finally{if(s)throw s.error}}return null!==m&&null!==o&&(o.x=p,o.y=y,null!==l&&(l.x=v)),null!==b&&null!==i&&(i.x=_,i.y=d,null!==l&&(l.y=x)),m},i.prototype.getBone=function(t){var r,n;try{for(var a=e(this._bones),o=a.next();!o.done;o=a.next()){var i=o.value;if(i.name===t)return i}}catch(l){r={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return null},i.prototype.getBoneByDisplay=function(t){var e=this.getSlotByDisplay(t);return null!==e?e.parent:null},i.prototype.getSlot=function(t){var r,n;try{for(var a=e(this._slots),o=a.next();!o.done;o=a.next()){var i=o.value;if(i.name===t)return i}}catch(l){r={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return null},i.prototype.getSlotByDisplay=function(t){var r,n;if(null!==t)try{for(var a=e(this._slots),o=a.next();!o.done;o=a.next()){var i=o.value;if(i.display===t)return i}}catch(l){r={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return null},i.prototype.getBones=function(){return this._bones},i.prototype.getSlots=function(){return this._slots},i.prototype.getDisplay=function(){return this._display},i.prototype._onClear=function(){var t,r,n,a,o,i,l,s;null!==this._clock&&this._clock.remove(this);try{for(var u=e(this._bones),h=u.next();!h.done;h=u.next()){h.value.returnToPool()}}catch(v){t={error:v}}finally{try{h&&!h.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}try{for(var c=e(this._slots),f=c.next();!f.done;f=c.next()){f.value.returnToPool()}}catch(x){n={error:x}}finally{try{f&&!f.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}try{for(var p=e(this._constraints),y=p.next();!y.done;y=p.next()){y.value.returnToPool()}}catch(m){o={error:m}}finally{try{y&&!y.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}try{for(var _=e(this._actions),d=_.next();!d.done;d=_.next()){d.value.returnToPool()}}catch(b){l={error:b}}finally{try{d&&!d.done&&(s=_.return)&&s.call(_)}finally{if(l)throw l.error}}null!==this._animation&&this._animation.returnToPool(),null!==this._proxy&&this._proxy.dbClear(),null!==this._replaceTextureAtlasData&&this._replaceTextureAtlasData.returnToPool(),this.inheritAnimation=!0,this.userData=null,this._lockUpdate=!1,this._slotsDirty=!0,this._zOrderDirty=!1,this._zIndexDirty=!1,this._alphaDirty=!0,this._flipX=!1,this._flipY=!1,this._cacheFrameIndex=-1,this._alpha=1,this._globalAlpha=1,this._bones.length=0,this._slots.length=0,this._constraints.length=0,this._actions.length=0,this._armatureData=null,this._animation=null,this._proxy=null,this._display=null,this._replaceTextureAtlasData=null,this._replacedTexture=null,this._dragonBones=null,this._clock=null,this._parent=null},i}(r.BaseObject);exports.Armature=o; },{"../core/base-object":"g7m0","../core/dragonbones":"o5u6","../animation/animation":"Om7A"}],"ANhd":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function o(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../core/base-object"),e=require("../geom/matrix"),o=require("../geom/transform"),n=require("../geom/point"),i=function(r){function i(){var t=null!==r&&r.apply(this,arguments)||this;return t.globalTransformMatrix=new e.Matrix,t.global=new o.Transform,t.offset=new o.Transform,t}return t(i,r),Object.defineProperty(i.prototype,"armature",{get:function(){return this._armature},enumerable:!0,configurable:!0}),i.prototype.updateGlobalTransform=function(){this._globalDirty&&(this._globalDirty=!1,this.global.fromMatrix(this.globalTransformMatrix))},i.prototype._onClear=function(){this.globalTransformMatrix.identity(),this.global.identity(),this.offset.identity(),this.origin=null,this.userData=null,this._globalDirty=!1,this._alpha=1,this._globalAlpha=1,this._armature=null},i._helpMatrix=new e.Matrix,i._helpTransform=new o.Transform,i._helpPoint=new n.Point,i}(r.BaseObject);exports.TransformObject=i; },{"../core/base-object":"g7m0","../geom/matrix":"kTpB","../geom/transform":"hJt8","../geom/point":"jRSw"}],"joOP":[function(require,module,exports) { var global = arguments[3]; var t=arguments[3],r=this&&this.__extends||function(){var t=function(r,a){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var a in r)r.hasOwnProperty(a)&&(t[a]=r[a])})(r,a)};return function(r,a){function e(){this.constructor=r}t(r,a),r.prototype=null===a?Object.create(a):(e.prototype=a.prototype,new e)}}(),a=this&&this.__values||function(t){var r="function"==typeof Symbol&&Symbol.iterator,a=r&&t[r],e=0;if(a)return a.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./transform-object"),o=require("../core/dragonbones"),i=require("../geom/transform"),n=function(t){function e(){var r=null!==t&&t.apply(this,arguments)||this;return r.animationPose=new i.Transform,r}return r(e,t),e.toString=function(){return"[class dragonBones.Bone]"},Object.defineProperty(e.prototype,"boneData",{get:function(){return this._boneData},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible},set:function(t){var r,e;if(this._visible!==t){this._visible=t;try{for(var o=a(this._armature.getSlots()),i=o.next();!i.done;i=o.next()){var n=i.value;n.parent===this&&n._updateVisible()}}catch(s){r={error:s}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(r)throw r.error}}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._boneData.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),e.prototype._updateAlpha=function(){null!==this._parent?this._globalAlpha=this._alpha*this._parent._globalAlpha:this._globalAlpha=this._alpha*this._armature._globalAlpha},e.prototype.init=function(t,r){null===this._boneData&&(this._boneData=t,this._armature=r,this._alpha=this._boneData.alpha,null!==this._boneData.parent&&(this._parent=this._armature.getBone(this._boneData.parent.name)),this._armature._addBone(this),this.origin=this._boneData.transform)},e.prototype.update=function(t){var r,e,o,i;if(t>=0&&null!==this._cachedFrameIndices){var n=this._cachedFrameIndices[t];if(n>=0&&this._cachedFrameIndex===n)this._transformDirty=!1;else if(n>=0)this._transformDirty=!0,this._cachedFrameIndex=n;else{if(this._hasConstraint)try{for(var s=a(this._armature._constraints),l=s.next();!l.done;l=s.next()){(f=l.value)._root===this&&f.update()}}catch(y){r={error:y}}finally{try{l&&!l.done&&(e=s.return)&&e.call(s)}finally{if(r)throw r.error}}this._transformDirty||null!==this._parent&&this._parent._childrenTransformDirty?(this._transformDirty=!0,this._cachedFrameIndex=-1):this._cachedFrameIndex>=0?(this._transformDirty=!1,this._cachedFrameIndices[t]=this._cachedFrameIndex):(this._transformDirty=!0,this._cachedFrameIndex=-1)}}else{if(this._hasConstraint)try{for(var h=a(this._armature._constraints),c=h.next();!c.done;c=h.next()){var f;(f=c.value)._root===this&&f.update()}}catch(u){o={error:u}}finally{try{c&&!c.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}(this._transformDirty||null!==this._parent&&this._parent._childrenTransformDirty)&&(t=-1,this._transformDirty=!0,this._cachedFrameIndex=-1)}if(this._transformDirty)if(this._transformDirty=!1,this._childrenTransformDirty=!0,this._cachedFrameIndex<0){var _=t>=0;this._localDirty&&this._updateGlobalTransformMatrix(_),_&&null!==this._cachedFrameIndices&&(this._cachedFrameIndex=this._cachedFrameIndices[t]=this._armature._armatureData.setCacheFrame(this.globalTransformMatrix,this.global))}else this._armature._armatureData.getCacheFrame(this.globalTransformMatrix,this.global,this._cachedFrameIndex);else this._childrenTransformDirty&&(this._childrenTransformDirty=!1);this._localDirty=!0},e.prototype.updateByConstraint=function(){this._localDirty&&(this._localDirty=!1,(this._transformDirty||null!==this._parent&&this._parent._childrenTransformDirty)&&this._updateGlobalTransformMatrix(!0),this._transformDirty=!0)},e.prototype.invalidUpdate=function(){this._transformDirty=!0},e.prototype.contains=function(t){if(t===this)return!1;for(var r=t;r!==this&&null!==r;)r=r.parent;return r===this},e.prototype._onClear=function(){t.prototype._onClear.call(this),this.offsetMode=o.OffsetMode.Additive,this.animationPose.identity(),this._transformDirty=!1,this._childrenTransformDirty=!1,this._localDirty=!0,this._hasConstraint=!1,this._visible=!0,this._cachedFrameIndex=-1,this._boneData=null,this._parent=null,this._cachedFrameIndices=null},e.prototype._updateGlobalTransformMatrix=function(t){var r=this._boneData,a=this.global,e=this.globalTransformMatrix,i=this.origin,n=this.offset,s=this.animationPose,l=this._parent,h=this._armature.flipX,c=this._armature.flipY===o.DragonBones.yDown,f=null!==l,_=0;if(this.offsetMode===o.OffsetMode.Additive?null!==i?(a.x=i.x+n.x+s.x,a.scaleX=i.scaleX*n.scaleX*s.scaleX,a.scaleY=i.scaleY*n.scaleY*s.scaleY,o.DragonBones.yDown?(a.y=i.y+n.y+s.y,a.skew=i.skew+n.skew+s.skew,a.rotation=i.rotation+n.rotation+s.rotation):(a.y=i.y-n.y+s.y,a.skew=i.skew-n.skew+s.skew,a.rotation=i.rotation-n.rotation+s.rotation)):(a.copyFrom(n),o.DragonBones.yDown||(a.y=-a.y,a.skew=-a.skew,a.rotation=-a.rotation),a.add(s)):this.offsetMode===o.OffsetMode.None?null!==i?a.copyFrom(i).add(s):a.copyFrom(s):(f=!1,a.copyFrom(n),o.DragonBones.yDown||(a.y=-a.y,a.skew=-a.skew,a.rotation=-a.rotation)),f){var y=l._boneData.type===o.BoneType.Surface,u=y?l._bone:null,p=y?l._getGlobalTransformMatrix(a.x,a.y):l.globalTransformMatrix;if(!r.inheritScale||y&&null===u){if(r.inheritTranslation){var d=a.x,m=a.y;a.x=p.a*d+p.c*m+p.tx,a.y=p.b*d+p.d*m+p.ty}else h&&(a.x=-a.x),c&&(a.y=-a.y);r.inheritRotation?(l.updateGlobalTransform(),_=l.global.scaleX<0?a.rotation+l.global.rotation+Math.PI:a.rotation+l.global.rotation,p.a*p.d-p.b*p.c<0&&(_-=2*a.rotation,(h!==c||r.inheritReflection)&&(a.skew+=Math.PI),o.DragonBones.yDown||(a.skew=-a.skew)),a.rotation=_):(h||c)&&(h&&c?_=a.rotation+Math.PI:(_=h?Math.PI-a.rotation:-a.rotation,a.skew+=Math.PI),a.rotation=_),a.toMatrix(e)}else y?(r.inheritRotation&&(a.rotation+=l.global.rotation),u.updateGlobalTransform(),a.scaleX*=u.global.scaleX,a.scaleY*=u.global.scaleY,p.transformPoint(a.x,a.y,a),a.toMatrix(e),r.inheritTranslation?(a.x=e.tx,a.y=e.ty):(e.tx=a.x,e.ty=a.y)):(r.inheritRotation||(l.updateGlobalTransform(),_=h&&c?a.rotation-(l.global.rotation+Math.PI):h?a.rotation+l.global.rotation+Math.PI:c?a.rotation+l.global.rotation:a.rotation-l.global.rotation,a.rotation=_),a.toMatrix(e),e.concat(p),r.inheritTranslation?(a.x=e.tx,a.y=e.ty):(e.tx=a.x,e.ty=a.y),t?a.fromMatrix(e):this._globalDirty=!0)}else(h||c)&&(h&&(a.x=-a.x),c&&(a.y=-a.y),h&&c?_=a.rotation+Math.PI:(_=h?Math.PI-a.rotation:-a.rotation,a.skew+=Math.PI),a.rotation=_),a.toMatrix(e)},e}(e.TransformObject);exports.Bone=n; },{"./transform-object":"ANhd","../core/dragonbones":"o5u6","../geom/transform":"hJt8"}],"HrEs":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function i(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}}(),r=this&&this.__values||function(t){var r="function"==typeof Symbol&&Symbol.iterator,e=r&&t[r],i=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./bone"),i=require("../core/dragonbones"),a=function(e){function a(){var t=null!==e&&e.apply(this,arguments)||this;return t._vertices=[],t._deformVertices=[],t._hullCache=[],t._matrixCahce=[],t}return t(a,e),a.toString=function(){return"[class dragonBones.Surface]"},a.prototype._getGlobalTransformMatrix=function(t,r){var e=200,i=1e3;if(t<-i||i=e)return this.globalTransformMatrix;if(p[u=7*(2*(n*o+n+o+o+m)+((s=r>this._kX*(t+e)+d)?1:0))]>0)x.copyFromArray(p,u+1);else{var g=m*(l+2),b=this._hullCache[4],v=this._hullCache[5],T=this._hullCache[2]-(o-m)*b,C=this._hullCache[3]-(o-m)*v,D=this._vertices;s?this._getAffineTransform(-e,d+f,800,f,D[g+l+2],D[g+l+3],T+b,C+v,D[g],D[g+1],a._helpTransform,x,!0):this._getAffineTransform(-i,d,800,f,T,C,D[g],D[g+1],T+b,C+v,a._helpTransform,x,!1),p[u]=1,p[u+1]=x.a,p[u+2]=x.b,p[u+3]=x.c,p[u+4]=x.d,p[u+5]=x.tx,p[u+6]=x.ty}}else if(t>=e){if(r<-e||r>=e)return this.globalTransformMatrix;if(p[u=7*(2*(n*o+n+m)+((s=r>this._kX*(t-i)+d)?1:0))]>0)x.copyFromArray(p,u+1);else{g=(m+1)*(l+2)-2,b=this._hullCache[4],v=this._hullCache[5],T=this._hullCache[0]+m*b,C=this._hullCache[1]+m*v,D=this._vertices;s?this._getAffineTransform(i,d+f,800,f,T+b,C+v,D[g+l+2],D[g+l+3],T,C,a._helpTransform,x,!0):this._getAffineTransform(e,d,800,f,D[g],D[g+1],T,C,D[g+l+2],D[g+l+3],a._helpTransform,x,!1),p[u]=1,p[u+1]=x.a,p[u+2]=x.b,p[u+3]=x.c,p[u+4]=x.d,p[u+5]=x.tx,p[u+6]=x.ty}}else if(r<-e){if(t<-e||t>=e)return this.globalTransformMatrix;if(p[u=7*(2*(n*o+c)+((s=r>this._kY*(t-y-_)-i)?1:0))]>0)x.copyFromArray(p,u+1);else{g=2*c,b=this._hullCache[10],v=this._hullCache[11],T=this._hullCache[8]+c*b,C=this._hullCache[9]+c*v,D=this._vertices;s?this._getAffineTransform(y+_,-e,_,800,D[g+2],D[g+3],D[g],D[g+1],T+b,C+v,a._helpTransform,x,!0):this._getAffineTransform(y,-i,_,800,T,C,T+b,C+v,D[g],D[g+1],a._helpTransform,x,!1),p[u]=1,p[u+1]=x.a,p[u+2]=x.b,p[u+3]=x.c,p[u+4]=x.d,p[u+5]=x.tx,p[u+6]=x.ty}}else if(r>=e){if(t<-e||t>=e)return this.globalTransformMatrix;if(p[u=7*(2*(n*o+n+o+c)+((s=r>this._kY*(t-y-_)+e)?1:0))]>0)x.copyFromArray(p,u+1);else{g=o*(l+2)+2*c,b=this._hullCache[10],v=this._hullCache[11],T=this._hullCache[6]-(n-c)*b,C=this._hullCache[7]-(n-c)*v,D=this._vertices;s?this._getAffineTransform(y+_,i,_,800,T+b,C+v,T,C,D[g+2],D[g+3],a._helpTransform,x,!0):this._getAffineTransform(y,e,_,800,D[g],D[g+1],D[g+2],D[g+3],T,C,a._helpTransform,x,!1),p[u]=1,p[u+1]=x.a,p[u+2]=x.b,p[u+3]=x.c,p[u+4]=x.d,p[u+5]=x.tx,p[u+6]=x.ty}}else if(p[u=7*(2*(n*m+c)+((s=r>this._k*(t-y-_)+d)?1:0))]>0)x.copyFromArray(p,u+1);else{g=2*c+m*(l+2),D=this._vertices;s?this._getAffineTransform(y+_,d+f,_,f,D[g+l+4],D[g+l+5],D[g+l+2],D[g+l+3],D[g+2],D[g+3],a._helpTransform,x,!0):this._getAffineTransform(y,d,_,f,D[g],D[g+1],D[g+2],D[g+3],D[g+l+2],D[g+l+3],a._helpTransform,x,!1),p[u]=1,p[u+1]=x.a,p[u+2]=x.b,p[u+3]=x.c,p[u+4]=x.d,p[u+5]=x.tx,p[u+6]=x.ty}return x},a.prototype.init=function(t,r){if(null===this._boneData){e.prototype.init.call(this,t,r);var a=t.segmentX,s=t.segmentY,h=this._armature.armatureData.parent.intArray[t.geometry.offset+i.BinaryOffset.GeometryVertexCount];this._dX=400/a,this._dY=400/s,this._k=-this._dY/this._dX,this._kX=-this._dY/800,this._kY=-800/this._dX,this._vertices.length=2*h,this._deformVertices.length=2*h,this._matrixCahce.length=2*(a*s+2*a+2*s)*7,this._hullCache.length=10;for(var n=0;n<2*h;++n)this._deformVertices[n]=0;null!==this._parent&&(this._parent.boneData.type===i.BoneType.Bone?this._bone=this._parent:this._bone=this._parent._bone)}},a.prototype.update=function(t){var e,i,s,h;if(t>=0&&null!==this._cachedFrameIndices){var n=this._cachedFrameIndices[t];if(n>=0&&this._cachedFrameIndex===n)this._transformDirty=!1;else if(n>=0)this._transformDirty=!0,this._cachedFrameIndex=n;else{if(this._hasConstraint)try{for(var o=r(this._armature._constraints),l=o.next();!l.done;l=o.next()){(c=l.value)._root===this&&c.update()}}catch(g){e={error:g}}finally{try{l&&!l.done&&(i=o.return)&&i.call(o)}finally{if(e)throw e.error}}this._transformDirty||null!==this._parent&&this._parent._childrenTransformDirty?(this._transformDirty=!0,this._cachedFrameIndex=-1):this._cachedFrameIndex>=0?(this._transformDirty=!1,this._cachedFrameIndices[t]=this._cachedFrameIndex):(this._transformDirty=!0,this._cachedFrameIndex=-1)}}else{if(this._hasConstraint)try{for(var _=r(this._armature._constraints),f=_.next();!f.done;f=_.next()){var c;(c=f.value)._root===this&&c.update()}}catch(b){s={error:b}}finally{try{f&&!f.done&&(h=_.return)&&h.call(_)}finally{if(s)throw s.error}}(this._transformDirty||null!==this._parent&&this._parent._childrenTransformDirty)&&(t=-1,this._transformDirty=!0,this._cachedFrameIndex=-1)}if(this._transformDirty){this._transformDirty=!1,this._childrenTransformDirty=!0;for(var m=0,u=this._matrixCahce.length;m=0;this._localDirty&&this._updateGlobalTransformMatrix(y),y&&null!==this._cachedFrameIndices&&(this._cachedFrameIndex=this._cachedFrameIndices[t]=this._armature._armatureData.setCacheFrame(this.globalTransformMatrix,this.global))}else this._armature._armatureData.getCacheFrame(this.globalTransformMatrix,this.global,this._cachedFrameIndex);var d=2*this.global.x,p=2*this.global.y,x=a._helpPoint;this.globalTransformMatrix.transformPoint(1e3,-200,x),this._hullCache[0]=x.x,this._hullCache[1]=x.y,this._hullCache[2]=d-x.x,this._hullCache[3]=p-x.y,this.globalTransformMatrix.transformPoint(0,this._dY,x,!0),this._hullCache[4]=x.x,this._hullCache[5]=x.y,this.globalTransformMatrix.transformPoint(200,1e3,x),this._hullCache[6]=x.x,this._hullCache[7]=x.y,this._hullCache[8]=d-x.x,this._hullCache[9]=p-x.y,this.globalTransformMatrix.transformPoint(this._dX,0,x,!0),this._hullCache[10]=x.x,this._hullCache[11]=x.y}else this._childrenTransformDirty&&(this._childrenTransformDirty=!1);this._localDirty=!0},a.prototype._onClear=function(){e.prototype._onClear.call(this),this._dX=0,this._dY=0,this._k=0,this._kX=0,this._kY=0,this._vertices.length=0,this._deformVertices.length=0,this._matrixCahce.length=0,this._hullCache.length=0,this._bone=null},a.prototype._updateGlobalTransformMatrix=function(t){var r=2*this._boneData.segmentX,e=this._vertices.length-2,i=this._vertices[0],a=this._vertices[1],s=this._vertices[r],h=this._vertices[r+1],n=this._vertices[e],o=this._vertices[e+1],l=this._vertices[e-r],_=this._vertices[e-r+1],f=i+.5*(n-i),c=a+.5*(o-a),m=f+.5*(s+.5*(l-s)-f),u=c+.5*(h+.5*(_-h)-c),y=s+.5*(n-s),d=h+.5*(o-h),p=l+.5*(n-l),x=_+.5*(o-_);this._getAffineTransform(0,0,200,200,m,u,y,d,p,x,this.global,this.globalTransformMatrix,!1),this._globalDirty=!1},a.prototype._getAffineTransform=function(t,r,e,i,a,s,h,n,o,l,_,f,c){var m=h-a,u=n-s,y=o-a,d=l-s;_.rotation=Math.atan2(u,m),_.skew=Math.atan2(d,y)-.5*Math.PI-_.rotation,c&&(_.rotation+=Math.PI),_.scaleX=Math.sqrt(m*m+u*u)/e,_.scaleY=Math.sqrt(y*y+d*d)/i,_.toMatrix(f),_.x=f.tx=a-(f.a*t+f.c*r),_.y=f.ty=s-(f.b*t+f.d*r)},a.prototype._updateVertices=function(){var t=this._armature.armatureData.parent,r=this._boneData.geometry,e=t.intArray,a=t.floatArray,s=e[r.offset+i.BinaryOffset.GeometryVertexCount],h=e[r.offset+i.BinaryOffset.GeometryFloatOffset],n=this._vertices,o=this._deformVertices;if(null!==this._parent)if(this._parent._boneData.type===i.BoneType.Surface)for(var l=0,_=s;l<_;++l){var f=a[h+(y=2*l)]+o[y],c=a[h+y+1]+o[y+1],m=this._parent._getGlobalTransformMatrix(f,c);n[y]=m.a*f+m.c*c+m.tx,n[y+1]=m.b*f+m.d*c+m.ty}else{var u=this._parent.globalTransformMatrix;for(l=0,_=s;l<_;++l){f=a[h+(y=2*l)]+o[y],c=a[h+y+1]+o[y+1];n[y]=u.a*f+u.c*c+u.tx,n[y+1]=u.b*f+u.d*c+u.ty}}else for(l=0,_=s;l<_;++l){var y;n[y=2*l]=a[h+y]+o[y],n[y+1]=a[h+y+1]+o[y+1]}},a}(e.Bone);exports.Surface=a; },{"./bone":"joOP","../core/dragonbones":"o5u6"}],"op53":[function(require,module,exports) { var global = arguments[3]; var t=arguments[3],a=this&&this.__extends||function(){var t=function(a,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var e in a)a.hasOwnProperty(e)&&(t[e]=a[e])})(a,e)};return function(a,e){function r(){this.constructor=a}t(a,e),a.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../core/base-object"),r=require("../core/dragonbones"),o=require("../geom/matrix"),i=require("../geom/transform"),n=require("../geom/point"),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return this._constraintData.name},enumerable:!0,configurable:!0}),e.prototype._onClear=function(){this._armature=null,this._target=null,this._root=null,this._bone=null},e._helpMatrix=new o.Matrix,e._helpTransform=new i.Transform,e._helpPoint=new n.Point,e}(e.BaseObject);exports.Constraint=s;var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.toString=function(){return"[class dragonBones.IKConstraint]"},e.prototype.init=function(t,a){if(null===this._constraintData){this._constraintData=t,this._armature=a,this._target=this._armature.getBone(this._constraintData.target.name),this._root=this._armature.getBone(this._constraintData.root.name),this._bone=null!==this._constraintData.bone?this._armature.getBone(this._constraintData.bone.name):null;var e=this._constraintData;this._scaleEnabled=e.scaleEnabled,this._bendPositive=e.bendPositive,this._weight=e.weight,this._root._hasConstraint=!0}},e.prototype.update=function(){this._root.updateByConstraint(),null!==this._bone?(this._bone.updateByConstraint(),this._computeB()):this._computeA()},e.prototype.invalidUpdate=function(){this._root.invalidUpdate(),null!==this._bone&&this._bone.invalidUpdate()},e.prototype._onClear=function(){t.prototype._onClear.call(this),this._scaleEnabled=!1,this._bendPositive=!1,this._weight=1,this._constraintData=null},e.prototype._computeA=function(){var t=this._target.global,a=this._root.global,e=this._root.globalTransformMatrix,r=Math.atan2(t.y-a.y,t.x-a.x);a.scaleX<0&&(r+=Math.PI),a.rotation+=i.Transform.normalizeRadian(r-a.rotation)*this._weight,a.toMatrix(e)},e.prototype._computeB=function(){var t=this._bone._boneData.length,a=this._root,e=this._target.global,r=a.global,o=this._bone.global,n=this._bone.globalTransformMatrix,s=n.a*t,h=n.b*t,l=s*s+h*h,_=Math.sqrt(l),f=o.x-r.x,p=o.y-r.y,c=f*f+p*p,u=Math.sqrt(c),g=o.rotation,y=r.rotation,m=Math.atan2(p,f),b=(f=e.x-r.x)*f+(p=e.y-r.y)*p,v=Math.sqrt(b),d=0;if(_+u<=v||v+_<=u||v+u<=_)d=Math.atan2(e.y-r.y,e.x-r.x),_+u<=v||u<_&&(d+=Math.PI);else{var M=(c-l+b)/(2*b),x=Math.sqrt(c-M*M*b)/v,D=r.x+f*M,C=r.y+p*M,P=-p*x,B=f*x,T=!1,O=a.parent;if(null!==O){var V=O.globalTransformMatrix;T=V.a*V.d-V.b*V.c<0}T!==this._bendPositive?(o.x=D-P,o.y=C-B):(o.x=D+P,o.y=C+B),d=Math.atan2(o.y-r.y,o.x-r.x)}var q=i.Transform.normalizeRadian(d-m);r.rotation=y+q*this._weight,r.toMatrix(a.globalTransformMatrix);var w=m+q*this._weight;o.x=r.x+Math.cos(w)*u,o.y=r.y+Math.sin(w)*u;var G=Math.atan2(e.y-o.y,e.x-o.x);o.scaleX<0&&(G+=Math.PI),o.rotation=r.rotation+g-y+i.Transform.normalizeRadian(G-q-g)*this._weight,o.toMatrix(n)},e}(s);exports.IKConstraint=h;var l=function(t){function e(){var a=null!==t&&t.apply(this,arguments)||this;return a._bones=[],a._spaces=[],a._positions=[],a._curves=[],a._boneLengths=[],a._pathGlobalVertices=[],a._segments=[10],a}return a(e,t),e.toString=function(){return"[class dragonBones.PathConstraint]"},e.prototype.init=function(t,a){this._constraintData=t,this._armature=a;var e=t;this.pathOffset=e.pathDisplayData.geometry.offset,this.position=e.position,this.spacing=e.spacing,this.rotateOffset=e.rotateOffset,this.rotateMix=e.rotateMix,this.translateMix=e.translateMix,this._root=this._armature.getBone(e.root.name),this._target=this._armature.getBone(e.target.name),this._pathSlot=this._armature.getSlot(e.pathSlot.name);for(var o=0,i=e.bones.length;o0?i.Transform.DEG_RAD:-i.Transform.DEG_RAD;for(var T=this.rotateMix,O=this.translateMix,V=(y=0,3);y0){var R=w.a,L=w.b,j=w.c,z=w.d,E=void 0,U=void 0,k=void 0;if(E=f?D[V-1]:Math.atan2(S,G),E-=Math.atan2(L,R),x){U=Math.cos(E),k=Math.sin(E);var F=q._boneData.length;P+=(F*(U*R-k*L)-G)*T,B+=(F*(k*R+U*L)-S)*T}else E+=C;E>i.Transform.PI?E-=i.Transform.PI_D:E<-i.Transform.PI&&(E+=i.Transform.PI_D),E*=T,U=Math.cos(E),k=Math.sin(E),w.a=U*R-k*L,w.b=k*R+U*L,w.c=U*j-k*z,w.d=k*j+U*z}q.global.fromMatrix(w)}this.dirty=!1}}},e.prototype.invalidUpdate=function(){},e.prototype._onClear=function(){t.prototype._onClear.call(this),this.dirty=!1,this.pathOffset=0,this.position=0,this.spacing=0,this.rotateOffset=0,this.rotateMix=1,this.translateMix=1,this._pathSlot=null,this._bones.length=0,this._spaces.length=0,this._positions.length=0,this._curves.length=0,this._boneLengths.length=0,this._pathGlobalVertices.length=0},e.prototype._updatePathVertices=function(t){var a=this._armature,e=a.armatureData.parent,o=a.armatureData.scale,i=e.intArray,n=e.floatArray,s=t.offset,h=i[s+r.BinaryOffset.GeometryVertexCount],l=i[s+r.BinaryOffset.GeometryFloatOffset];this._pathGlobalVertices.length=2*h;var _=t.weight;if(null!==_)for(var f=this._pathSlot._geometryBones,p=_.bones.length,c=_.offset,u=i[c+r.BinaryOffset.WeigthFloatOffset],g=c+r.BinaryOffset.WeigthBoneIndices+p,y=(P=0,0);Pg)continue}for(;;K++){if(!(L>(z=y[K]))){if(0===K)L/=z;else L=(L-(E=y[K-1]))/(z-E);break}}if(K!==c){c=K;var j=6*K;for(P=_[j],B=_[j+1],T=_[j+2],O=_[j+3],V=_[j+4],q=_[j+5],M=2*(m=.03*(P-2*T+V))+(v=.006*(3*(T-V)-P+(w=_[j+6]))),x=2*(b=.03*(B-2*O+q))+(d=.006*(3*(O-q)-B+(G=_[j+7]))),D=.3*(T-P)+m+.16666667*v,C=.3*(O-B)+b+.16666667*d,I=Math.sqrt(D*D+C*C),A[0]=I,j=1;j<8;j++)D+=M,C+=x,M+=v,x+=d,I+=Math.sqrt(D*D+C*C),A[j]=I;D+=M,C+=x,I+=Math.sqrt(D*D+C*C),A[8]=I,D+=M+v,C+=x+d,I+=Math.sqrt(D*D+C*C),A[9]=I,R=0}for(L*=I;;R++){var z;if(!(L>(z=A[R]))){var E;if(0===R)L/=z;else L=R+(L-(E=A[R-1]))/(z-E);break}}this.addCurvePosition(.1*L,P,B,T,O,V,q,w,G,s,F,e)}}else{var U=t.curveLengths;if(g=U[p-=l?1:2],o&&(u*=g),i)for(var k=0;kg)continue}for(var W=0;;K++){var X=U[K];if(!(u>X)){if(0===K)W=u/X;else{var H=U[K-1];W=(u-H)/(X-H)}break}}K!==c&&(c=K,l&&K===p?(this._computeVertices(f-4,4,0,_),this._computeVertices(0,4,4,_)):this._computeVertices(6*K+2,8,0,_)),this.addCurvePosition(W,_[0],_[1],_[2],_[3],_[4],_[5],_[6],_[7],s,F,e)}}},e.prototype.addCurvePosition=function(t,a,e,r,o,i,n,s,h,l,_,f){if(0===t)return l[_]=a,l[_+1]=e,void(l[_+2]=0);if(1===t)return l[_]=s,l[_+1]=h,void(l[_+2]=0);var p=1-t,c=p*p,u=t*t,g=c*p,y=c*t*3,m=p*u*3,b=t*u,v=g*a+y*r+m*i+b*s,d=g*e+y*o+m*n+b*h;l[_]=v,l[_+1]=d,l[_+2]=f?Math.atan2(d-(g*e+y*o+m*n),v-(g*a+y*r+m*i)):0},e}(s);exports.PathConstraint=l; },{"../core/base-object":"g7m0","../core/dragonbones":"o5u6","../geom/matrix":"kTpB","../geom/transform":"hJt8","../geom/point":"jRSw"}],"Eo50":[function(require,module,exports) { "use strict";var t=this&&this.__values||function(t){var a="function"==typeof Symbol&&Symbol.iterator,e=a&&t[a],r=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var a=require("../parser/object-data-parser"),e=require("../parser/binary-data-parser"),r=require("../core/dragonbones"),n=require("../armature/armature"),l=require("../core/base-object"),i=require("../armature/bone"),o=require("../armature/surface"),s=require("../armature/constraint"),u=require("../event/event-object"),p=function(){return function(){this.dataName="",this.textureAtlasName="",this.skin=null}}();exports.BuildArmaturePackage=p;var y=function(){function y(t){void 0===t&&(t=null),this._dragonBonesDataMap={},this._textureAtlasDataMap={},this._dragonBones=null,this._dataParser=null,this.autoSearch=!1,null===y._objectParser&&(y._objectParser=new a.ObjectDataParser),null===y._binaryParser&&(y._binaryParser=new e.BinaryDataParser),this._dataParser=null!==t?t:y._objectParser}return Object.defineProperty(y.prototype,"clock",{get:function(){return this._dragonBones.clock},enumerable:!0,configurable:!0}),Object.defineProperty(y.prototype,"dragonBones",{get:function(){return this._dragonBones},enumerable:!0,configurable:!0}),y.prototype.parseDragonBonesData=function(t,a,e){void 0===a&&(a=null),void 0===e&&(e=1);for(var r=t instanceof ArrayBuffer?y._binaryParser:this._dataParser,n=r.parseDragonBonesData(t,e);;){var l=this._buildTextureAtlasData(null,null);if(!r.parseTextureAtlasData(null,l,e)){l.returnToPool();break}this.addTextureAtlasData(l,a)}return null!==n&&this.addDragonBonesData(n,a),n},y.prototype.parseTextureAtlasData=function(t,a,e,r){void 0===e&&(e=null),void 0===r&&(r=1);var n=this._buildTextureAtlasData(null,null);return this._dataParser.parseTextureAtlasData(t,n,r),this._buildTextureAtlasData(n,a||null),this.addTextureAtlasData(n,e),n},y.prototype.updateTextureAtlases=function(t,a){var e=this.getTextureAtlasData(a);if(null!==e)for(var r=0,n=e.length;r=0)){var f=e.getDisplays(y.name);if(null!==f||(null!==s&&e!==s&&(f=s.getDisplays(y.name)),null!==f)){y.displayFrameCount=f.length;for(var c=0,d=y.displayFrameCount;c0&&e in this._dragonBonesDataMap&&(y=(p=this._dragonBonesDataMap[e]).getArmature(r)),null===y&&(0===e.length||this.autoSearch))try{for(var f=t(Object.keys(this._dragonBonesDataMap)),c=f.next();!c.done;c=f.next()){var d=c.value;if(p=this._dragonBonesDataMap[d],(0===e.length||p.autoSearch)&&null!==(y=p.getArmature(r))){e=d;break}}}catch(x){i={error:x}}finally{try{c&&!c.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}if(null!==y){if(a.dataName=e,a.textureAtlasName=l,a.data=p,a.armature=y,a.skin=null,n.length>0&&(a.skin=y.getSkin(n),null===a.skin&&this.autoSearch))try{for(var h=t(Object.keys(this._dragonBonesDataMap)),v=h.next();!v.done;v=h.next()){d=v.value;var D=this._dragonBonesDataMap[d].getArmature(n);if(null!==D){a.skin=D.defaultSkin;break}}}catch(g){s={error:g}}finally{try{v&&!v.done&&(u=h.return)&&u.call(h)}finally{if(s)throw s.error}}return null===a.skin&&(a.skin=y.defaultSkin),!0}return!1},y.prototype._buildBones=function(a,e){var n,s;try{for(var u=t(a.armature.sortedBones),p=u.next();!p.done;p=u.next()){var y=p.value;l.BaseObject.borrowObject(y.type===r.BoneType.Bone?i.Bone:o.Surface).init(y,e)}}catch(f){n={error:f}}finally{try{p&&!p.done&&(s=u.return)&&s.call(u)}finally{if(n)throw n.error}}},y.prototype._buildSlots=function(a,e){var r,n,l,i,o,s,u=a.skin,p=a.armature.defaultSkin;if(null!==u&&null!==p){var y={};try{for(var f=t(Object.keys(p.displays)),c=f.next();!c.done;c=f.next()){var d=c.value,h=p.getDisplays(d);y[d]=h}}catch(j){r={error:j}}finally{try{c&&!c.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}if(u!==p)try{for(var v=t(Object.keys(u.displays)),D=v.next();!D.done;D=v.next()){d=D.value,h=u.getDisplays(d);y[d]=h}}catch(T){l={error:T}}finally{try{D&&!D.done&&(i=v.return)&&i.call(v)}finally{if(l)throw l.error}}try{for(var x=t(a.armature.sortedSlots),g=x.next();!g.done;g=x.next()){var m=g.value,_=m.name in y?y[m.name]:null,b=this._buildSlot(a,m,e);if(null!==_){b.displayFrameCount=_.length;for(var A=0,B=b.displayFrameCount;A0){var M=this._getTextureData(a.textureAtlasName,k.path);b.replaceTextureData(M,A)}var w=this._getSlotDisplay(a,k,b);b.replaceDisplay(w,A)}else b.replaceDisplay(null)}}b._setDisplayIndex(m.displayIndex,!0)}}catch(S){o={error:S}}finally{try{g&&!g.done&&(s=x.return)&&s.call(x)}finally{if(o)throw o.error}}}},y.prototype._buildConstraints=function(a,e){var n,i,o=a.armature.constraints;try{for(var u=t(Object.keys(o)),p=u.next();!p.done;p=u.next()){var y=o[p.value];switch(y.type){case r.ConstraintType.IK:var f=l.BaseObject.borrowObject(s.IKConstraint);f.init(y,e),e._addConstraint(f);break;case r.ConstraintType.Path:var c=l.BaseObject.borrowObject(s.PathConstraint);c.init(y,e),e._addConstraint(c);break;default:var d=l.BaseObject.borrowObject(s.IKConstraint);d.init(y,e),e._addConstraint(d)}}}catch(h){n={error:h}}finally{try{p&&!p.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}},y.prototype._buildChildArmature=function(t,a,e){return this.buildArmature(e.path,null!==t?t.dataName:"","",null!==t?t.textureAtlasName:"")},y.prototype._getSlotDisplay=function(a,e,n){var i,o,s=null!==a?a.dataName:e.parent.parent.parent.name,p=null;switch(e.type){case r.DisplayType.Image:var y=e;null===y.texture&&(y.texture=this._getTextureData(s,e.path)),p=n.rawDisplay;break;case r.DisplayType.Mesh:var f=e;null===f.texture&&(f.texture=this._getTextureData(s,f.path)),p=this._isSupportMesh()?n.meshDisplay:n.rawDisplay;break;case r.DisplayType.Armature:var c=e,d=this._buildChildArmature(a,n,c);if(null!==d){if(d.inheritAnimation=c.inheritAnimation,!d.inheritAnimation){var h=c.actions.length>0?c.actions:d.armatureData.defaultActions;if(h.length>0)try{for(var v=t(h),D=v.next();!D.done;D=v.next()){var x=D.value,g=l.BaseObject.borrowObject(u.EventObject);u.EventObject.actionDataToInstance(x,g,n.armature),g.slot=n,n.armature._bufferAction(g,!1)}}catch(m){i={error:m}}finally{try{D&&!D.done&&(o=v.return)&&o.call(v)}finally{if(i)throw i.error}}else d.animation.play()}c.armature=d.armatureData}p=d;break;case r.DisplayType.BoundingBox:}return p},y._objectParser=null,y._binaryParser=null,y}();exports.BaseFactory=y; },{"../parser/object-data-parser":"ohoU","../parser/binary-data-parser":"ATSV","../core/dragonbones":"o5u6","../armature/armature":"NyOa","../core/base-object":"g7m0","../armature/bone":"joOP","../armature/surface":"HrEs","../armature/constraint":"op53","../event/event-object":"nj0d"}],"eoB2":[function(require,module,exports) { "use strict";var e=this&&this.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./core/dragonbones"),r=function(r){function i(){var e=null!==r&&r.apply(this,arguments)||this;return e.debugDraw=!1,e._debugDraw=!1,e._armature=null,e._debugDrawer=null,e}return e(i,r),i.prototype.dbInit=function(e){this._armature=e},i.prototype.dbClear=function(){null!==this._debugDrawer&&this._debugDrawer.destroy({children:!0,texture:!0,baseTexture:!0}),this._armature=null,this._debugDrawer=null,r.prototype.destroy.call(this)},i.prototype.dbUpdate=function(){var e=t.DragonBones.debugDraw||this.debugDraw;if(e||this._debugDraw)if(this._debugDraw=e,this._debugDraw){if(null===this._debugDrawer){this._debugDrawer=new PIXI.Sprite(PIXI.Texture.EMPTY);var r=new PIXI.Graphics;this._debugDrawer.addChild(r)}this.addChild(this._debugDrawer);var i=this._debugDrawer.getChildAt(0);i.clear();for(var a=this._armature.getBones(),n=0,o=a.length;n0},i.prototype.addDBEventListener=function(e,t,r){this.addListener(e,t,r)},i.prototype.removeDBEventListener=function(e,t,r){this.removeListener(e,t,r)},Object.defineProperty(i.prototype,"armature",{get:function(){return this._armature},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"animation",{get:function(){return this._armature.animation},enumerable:!0,configurable:!0}),i}(PIXI.Sprite);exports.PixiArmatureDisplay=r; },{"./core/dragonbones":"o5u6"}],"vnlY":[function(require,module,exports) { "use strict";var e=this&&this.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),t=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var r=require("./model/texture-atlas-data"),n=require("./core/base-object"),o=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return e.renderTexture=null,e}return e(r,t),r.toString=function(){return"[class dragonBones.PixiTextureData]"},r.prototype._onClear=function(){t.prototype._onClear.call(this),null!==this.renderTexture&&this.renderTexture.destroy(!1),this.renderTexture=null},r}(r.TextureData);exports.PixiTextureData=o;var i=function(r){function i(){var e=null!==r&&r.apply(this,arguments)||this;return e._renderTexture=null,e}return e(i,r),i.toString=function(){return"[class dragonBones.PixiTextureAtlasData]"},Object.defineProperty(i.prototype,"renderTexture",{get:function(){return this._renderTexture},set:function(e){var r,n,o,i;if(this._renderTexture!==e)if(this._renderTexture=e,null!==this._renderTexture)try{for(var u=t(Object.keys(this.textures)),a=u.next();!a.done;a=u.next()){var l=a.value;(x=this.textures[l]).renderTexture=new PIXI.Texture(this._renderTexture,new PIXI.Rectangle(x.region.x,x.region.y,x.region.width,x.region.height),new PIXI.Rectangle(x.region.x,x.region.y,x.region.width,x.region.height),new PIXI.Rectangle(0,0,x.region.width,x.region.height),x.rotated)}}catch(h){r={error:h}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}else try{for(var s=t(Object.keys(this.textures)),c=s.next();!c.done;c=s.next()){var x;l=c.value;(x=this.textures[l]).renderTexture=null}}catch(f){o={error:f}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}},enumerable:!0,configurable:!0}),i.prototype.createTexture=function(){return n.BaseObject.borrowObject(o)},i.prototype._onClear=function(){r.prototype._onClear.call(this),this._renderTexture,this._renderTexture=null},i}(r.TextureAtlasData);exports.PixiTextureAtlasData=i; },{"./model/texture-atlas-data":"NAu9","./core/base-object":"g7m0"}],"iY2v":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){var t=function(i,a){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var a in i)i.hasOwnProperty(a)&&(t[a]=i[a])})(i,a)};return function(i,a){function e(){this.constructor=i}t(i,a),i.prototype=null===a?Object.create(a):(e.prototype=a.prototype,new e)}}(),i=this&&this.__values||function(t){var i="function"==typeof Symbol&&Symbol.iterator,a=i&&t[i],e=0;if(a)return a.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var a=require("../core/base-object"),e=require("./armature"),r=require("../core/dragonbones"),s=require("./transform-object"),l=require("../geom/color-transform"),n=require("../event/event-object"),o=require("../geom/matrix"),h=function(i){function a(){var t=null!==i&&i.apply(this,arguments)||this;return t.deformVertices=[],t}return t(a,i),a.toString=function(){return"[class dragonBones.DisplayFrame]"},a.prototype.updateDeformVertices=function(){if(null!==this.rawDisplayData&&0===this.deformVertices.length){var t;if(this.rawDisplayData.type===r.DisplayType.Mesh)t=this.rawDisplayData.geometry;else{if(this.rawDisplayData.type!==r.DisplayType.Path)return;t=this.rawDisplayData.geometry}var i=0;i=null!==t.weight?2*t.weight.count:2*t.data.intArray[t.offset+r.BinaryOffset.GeometryVertexCount],this.deformVertices.length=i;for(var a=0,e=this.deformVertices.length;at){for(e=i-1;e=0&&null!==this._cachedFrameIndices){var e=this._cachedFrameIndices[t];e>=0&&this._cachedFrameIndex===e?this._transformDirty=!1:e>=0?(this._transformDirty=!0,this._cachedFrameIndex=e):this._transformDirty||this._parent._childrenTransformDirty?(this._transformDirty=!0,this._cachedFrameIndex=-1):this._cachedFrameIndex>=0?(this._transformDirty=!1,this._cachedFrameIndices[t]=this._cachedFrameIndex):(this._transformDirty=!0,this._cachedFrameIndex=-1)}else(this._transformDirty||this._parent._childrenTransformDirty)&&(t=-1,this._transformDirty=!0,this._cachedFrameIndex=-1);if(this._transformDirty){if(this._cachedFrameIndex<0){var s=t>=0;this._updateGlobalTransformMatrix(s),s&&null!==this._cachedFrameIndices&&(this._cachedFrameIndex=this._cachedFrameIndices[t]=this._armature._armatureData.setCacheFrame(this.globalTransformMatrix,this.global))}else this._armature._armatureData.getCacheFrame(this.globalTransformMatrix,this.global,this._cachedFrameIndex);this._updateTransform(),this._transformDirty=!1}}},p.prototype.invalidUpdate=function(){this._displayDataDirty=!0,this._displayDirty=!0,this._transformDirty=!0},p.prototype.updateTransformAndMatrix=function(){this._transformDirty&&(this._updateGlobalTransformMatrix(!1),this._transformDirty=!1)},p.prototype.replaceRawDisplayData=function(t,i){if(void 0===i&&(i=-1),i<0)i=this._displayIndex<0?0:this._displayIndex;else if(i>=this._displayFrames.length)return;var a=this._displayFrames[i];if(a.rawDisplayData!==t){if(a.deformVertices.length=0,a.rawDisplayData=t,null===a.rawDisplayData){var e=this._armature._armatureData.defaultSkin;if(null!==e){var r=e.getDisplays(this._slotData.name);null!==r&&i=this._displayFrames.length)return;var a=this._displayFrames[i];a.displayData!==t&&a.rawDisplayData!==t&&(a.displayData=t,i===this._displayIndex&&(this._displayDataDirty=!0))},p.prototype.replaceTextureData=function(t,i){if(void 0===i&&(i=-1),i<0)i=this._displayIndex<0?0:this._displayIndex;else if(i>=this._displayFrames.length)return;var a=this._displayFrames[i];a.textureData!==t&&(a.textureData=t,i===this._displayIndex&&(this._displayDataDirty=!0))},p.prototype.replaceDisplay=function(t,i){if(void 0===i&&(i=-1),i<0)i=this._displayIndex<0?0:this._displayIndex;else if(i>=this._displayFrames.length)return;var a=this._displayFrames[i];if(a.display!==t){var r=a.display;a.display=t,null===r||r===this._rawDisplay||r===this._meshDisplay||this._hasDisplay(r)||r instanceof e.Armature||this._disposeDisplay(r,!0),null===t||t===this._rawDisplay||t===this._meshDisplay||this._hasDisplay(r)||t instanceof e.Armature||this._initDisplay(t,!0),i===this._displayIndex&&(this._displayDirty=!0)}},p.prototype.containsPoint=function(t,i){return null!==this._boundingBoxData&&(this.updateTransformAndMatrix(),p._helpMatrix.copyFrom(this.globalTransformMatrix),p._helpMatrix.invert(),p._helpMatrix.transformPoint(t,i,p._helpPoint),this._boundingBoxData.containsPoint(p._helpPoint.x,p._helpPoint.y))},p.prototype.intersectsSegment=function(t,i,a,e,r,s,l){if(void 0===r&&(r=null),void 0===s&&(s=null),void 0===l&&(l=null),null===this._boundingBoxData)return 0;this.updateTransformAndMatrix(),p._helpMatrix.copyFrom(this.globalTransformMatrix),p._helpMatrix.invert(),p._helpMatrix.transformPoint(t,i,p._helpPoint),t=p._helpPoint.x,i=p._helpPoint.y,p._helpMatrix.transformPoint(a,e,p._helpPoint),a=p._helpPoint.x,e=p._helpPoint.y;var n=this._boundingBoxData.intersectsSegment(t,i,a,e,r,s,l);return n>0&&(1===n||2===n?null!==r?(this.globalTransformMatrix.transformPoint(r.x,r.y,r),null!==s&&(s.x=r.x,s.y=r.y)):null!==s&&this.globalTransformMatrix.transformPoint(s.x,s.y,s):(null!==r&&this.globalTransformMatrix.transformPoint(r.x,r.y,r),null!==s&&this.globalTransformMatrix.transformPoint(s.x,s.y,s)),null!==l&&(this.globalTransformMatrix.transformPoint(Math.cos(l.x),Math.sin(l.x),p._helpPoint,!0),l.x=Math.atan2(p._helpPoint.y,p._helpPoint.x),this.globalTransformMatrix.transformPoint(Math.cos(l.y),Math.sin(l.y),p._helpPoint,!0),l.y=Math.atan2(p._helpPoint.y,p._helpPoint.x))),n},p.prototype.getDisplayFrameAt=function(t){return this._displayFrames[t]},p.prototype.getDisplay=function(){return this._display},p.prototype.setDisplay=function(t){this.display=t},p.prototype._onClear=function(){var t,a,l,n;s.prototype._onClear.call(this);var o=[];try{for(var h=i(this._displayFrames),p=h.next();!p.done;p=h.next()){var y=p.value,_=y.display;_!==this._rawDisplay&&_!==this._meshDisplay&&o.indexOf(_)<0&&o.push(_),y.returnToPool()}}catch(m){t={error:m}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(t)throw t.error}}try{for(var u=i(o),d=u.next();!d.done;d=u.next()){var D=d.value;D instanceof e.Armature?D.dispose():this._disposeDisplay(D,!0)}}catch(c){l={error:c}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(l)throw l.error}}null!==this._meshDisplay&&this._meshDisplay!==this._rawDisplay&&this._disposeDisplay(this._meshDisplay,!1),null!==this._rawDisplay&&this._disposeDisplay(this._rawDisplay,!1),this.displayController=null,this._displayDataDirty=!1,this._displayDirty=!1,this._geometryDirty=!1,this._textureDirty=!1,this._visibleDirty=!1,this._blendModeDirty=!1,this._zOrderDirty=!1,this._colorDirty=!1,this._verticesDirty=!1,this._transformDirty=!1,this._visible=!0,this._blendMode=r.BlendMode.Normal,this._displayIndex=-1,this._animationDisplayIndex=-1,this._zOrder=0,this._zIndex=0,this._cachedFrameIndex=-1,this._pivotX=0,this._pivotY=0,this._localMatrix.identity(),this._colorTransform.identity(),this._displayFrames.length=0,this._geometryBones.length=0,this._slotData=null,this._displayFrame=null,this._geometryData=null,this._boundingBoxData=null,this._textureData=null,this._rawDisplay=null,this._meshDisplay=null,this._display=null,this._childArmature=null,this._parent=null,this._cachedFrameIndices=null},p.prototype._hasDisplay=function(t){var a,e;try{for(var r=i(this._displayFrames),s=r.next();!s.done;s=r.next()){if(s.value.display===t)return!0}}catch(l){a={error:l}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return!1},p.prototype._updateDisplayData=function(){var t=this._displayFrame,i=this._geometryData,a=this._textureData,e=null,s=null;if(this._displayFrame=null,this._geometryData=null,this._boundingBoxData=null,this._textureData=null,this._displayIndex>=0&&this._displayIndex0)try{for(var _=i(p),u=_.next();!u.done;u=_.next()){var d=u.value,D=a.BaseObject.borrowObject(n.EventObject);n.EventObject.actionDataToInstance(d,D,this._armature),D.slot=this,this._armature._bufferAction(D,!1)}}catch(m){t={error:m}}finally{try{u&&!u.done&&(s=_.return)&&s.call(_)}finally{if(t)throw t.error}}else this._childArmature.animation.play()}}},p.prototype._updateGlobalTransformMatrix=function(t){var i=this._parent._boneData.type===r.BoneType.Bone?this._parent.globalTransformMatrix:this._parent._getGlobalTransformMatrix(this.global.x,this.global.y);this.globalTransformMatrix.copyFrom(this._localMatrix),this.globalTransformMatrix.concat(i),t?this.global.fromMatrix(this.globalTransformMatrix):this._globalDirty=!0},p}(s.TransformObject);exports.Slot=p; },{"../core/base-object":"g7m0","./armature":"NyOa","../core/dragonbones":"o5u6","./transform-object":"ANhd","../geom/color-transform":"QVHz","../event/event-object":"nj0d","../geom/matrix":"kTpB"}],"rwIk":[function(require,module,exports) { "use strict";var e=this&&this.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function a(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(a.prototype=r.prototype,new a)}}();Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./armature/slot"),r=require("./core/dragonbones"),a=require("./pixi-texture-atlas-data"),i=require("./core/base-object"),s=function(t){function s(){return null!==t&&t.apply(this,arguments)||this}return e(s,t),s.toString=function(){return"[class dragonBones.PixiSlot]"},s.prototype._updateVisible=function(){this._renderDisplay.visible=this._parent.visible&&this._visible},s.prototype._onClear=function(){t.prototype._onClear.call(this),this._textureScale=1,this._renderDisplay=null,this._updateTransform="3"===PIXI.VERSION[0]?this._updateTransformV3:this._updateTransformV4},s.prototype._initDisplay=function(e,t){},s.prototype._disposeDisplay=function(e,t){t||e.destroy()},s.prototype._onUpdateDisplay=function(){this._renderDisplay=this._display?this._display:this._rawDisplay},s.prototype._addDisplay=function(){this._armature.display.addChild(this._renderDisplay)},s.prototype._replaceDisplay=function(e){var t=this._armature.display,r=e;t.addChild(this._renderDisplay),t.swapChildren(this._renderDisplay,r),t.removeChild(r),this._textureScale=1},s.prototype._removeDisplay=function(){this._renderDisplay.parent.removeChild(this._renderDisplay)},s.prototype._updateZOrder=function(){var e=this._armature.display;e.getChildIndex(this._renderDisplay)!==this._zOrder&&e.addChildAt(this._renderDisplay,this._zOrder)},s.prototype._updateBlendMode=function(){if(this._renderDisplay instanceof PIXI.Sprite)switch(this._blendMode){case r.BlendMode.Normal:this._renderDisplay.blendMode=PIXI.BLEND_MODES.NORMAL;break;case r.BlendMode.Add:this._renderDisplay.blendMode=PIXI.BLEND_MODES.ADD;break;case r.BlendMode.Darken:this._renderDisplay.blendMode=PIXI.BLEND_MODES.DARKEN;break;case r.BlendMode.Difference:this._renderDisplay.blendMode=PIXI.BLEND_MODES.DIFFERENCE;break;case r.BlendMode.HardLight:this._renderDisplay.blendMode=PIXI.BLEND_MODES.HARD_LIGHT;break;case r.BlendMode.Lighten:this._renderDisplay.blendMode=PIXI.BLEND_MODES.LIGHTEN;break;case r.BlendMode.Multiply:this._renderDisplay.blendMode=PIXI.BLEND_MODES.MULTIPLY;break;case r.BlendMode.Overlay:this._renderDisplay.blendMode=PIXI.BLEND_MODES.OVERLAY;break;case r.BlendMode.Screen:this._renderDisplay.blendMode=PIXI.BLEND_MODES.SCREEN}},s.prototype._updateColor=function(){var e=this._colorTransform.alphaMultiplier*this._globalAlpha;if(this._renderDisplay.alpha=e,this._renderDisplay instanceof PIXI.Sprite||this._renderDisplay instanceof PIXI.SimpleMesh){var t=(Math.round(255*this._colorTransform.redMultiplier)<<16)+(Math.round(255*this._colorTransform.greenMultiplier)<<8)+Math.round(255*this._colorTransform.blueMultiplier);this._renderDisplay.tint=t}},s.prototype._updateFrame=function(){var e=this._textureData;if(this._displayIndex>=0&&null!==this._display&&null!==e){var t=e.parent;null!==this._armature.replacedTexture&&(null===this._armature._replaceTextureAtlasData?((t=i.BaseObject.borrowObject(a.PixiTextureAtlasData)).copyFrom(e.parent),t.renderTexture=this._armature.replacedTexture,this._armature._replaceTextureAtlasData=t):t=this._armature._replaceTextureAtlasData,e=t.getTexture(e.name));var s=e.renderTexture;if(null!==s){if(null!==this._geometryData){var o=this._geometryData.data,n=o.intArray,l=o.floatArray,p=n[this._geometryData.offset+r.BinaryOffset.GeometryVertexCount],d=n[this._geometryData.offset+r.BinaryOffset.GeometryTriangleCount],_=n[this._geometryData.offset+r.BinaryOffset.GeometryFloatOffset];_<0&&(_+=65536);for(var h=_+2*p,y=this._armature._armatureData.scale,f=this._renderDisplay,u=new Float32Array(2*p),c=new Float32Array(2*p),D=new Uint16Array(3*d),m=0,v=2*p;m0&&i.inheritDeform,n=this._renderDisplay;if(null!==s){var l=(I=i.data).intArray,p=I.floatArray,d=l[i.offset+r.BinaryOffset.GeometryVertexCount],_=l[s.offset+r.BinaryOffset.WeigthFloatOffset];_<0&&(_+=65536);for(var h=0,y=0,f=s.offset+r.BinaryOffset.WeigthBoneIndices+a.length,u=_,c=0;h=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n};Object.defineProperty(exports,"__esModule",{value:!0});var t=n(require("../../../libs/pixi-component")),a=require("../../../libs/dragonbones/pixi-factory"),r=["dead","freeze","hit","normalAttack","run","skillAttack1","steady","stun","uniqueAttack","win"],o=function(){function n(e){this.engine=new t.GameLoop({transparent:!0}),this.engine.init(e,e.clientWidth,e.clientHeight,1,null,!1),this.loadResources()}return n.prototype.loadResources=function(){var n,o,i=this,s={loadType:PIXI.LoaderResource.LOAD_TYPE.XHR,xhrType:PIXI.LoaderResource.XHR_RESPONSE_TYPE.BUFFER},l=["./assets/lab04/dragonbones/Demon_ske.json","./assets/lab04/dragonbones/Demon_tex.json","./assets/lab04/dragonbones/Demon_tex.png"];try{for(var p=e(l),d=p.next();!d.done;d=p.next()){var u=d.value;u.indexOf("dbbin")>0?this.engine.app.loader.add(u,u,s):this.engine.app.loader.add(u,u)}}catch(c){n={error:c}}finally{try{d&&!d.done&&(o=p.return)&&o.call(p)}finally{if(n)throw n.error}}this.engine.app.loader.once("complete",function(e){var n=a.PixiFactory.factory;n.parseDragonBonesData(i.engine.app.loader.resources[l[0]].data),n.parseTextureAtlasData(i.engine.app.loader.resources[l[1]].data,i.engine.app.loader.resources[l[2]].texture);var o=n.buildArmatureDisplay("Demon","Demon");o.position.set(i.engine.app.view.width/2,i.engine.app.view.height/2),o.pivot.set(0,-i.engine.app.view.height/2),o.scale.set(i.engine.app.view.height/700);var s=-1;i.engine.scene.addGlobalComponent(new t.GenericComponent("animator").doOnUpdate(function(){o.animation.isPlaying||(s=(s+1)%r.length,o.animation.play(r[s],1))})),i.engine.scene.stage.addChild(o)}),this.engine.app.loader.load()},n}();exports.ExampleDragonBones=o; },{"../../../libs/pixi-component":"rNDA","../../../libs/dragonbones/pixi-factory":"AdaF"}],"KeDU":[function(require,module,exports) { "use strict";var e=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(i[n]=e[n]);return i.default=e,i};Object.defineProperty(exports,"__esModule",{value:!0});var i=e(require("pixi.js")),n=e(require("../../../libs/pixi-component")),t=function(){return function(e){var t=this;this.engine=new n.GameLoop({transparent:!0}),this.engine.init(e,e.clientWidth,e.clientHeight,1,null,!1),this.engine.app.loader.add("./assets/lab02/warrior.json").load(function(){var e=t.engine.app.loader.resources["./assets/lab02/warrior.json"].spritesheet,n=new i.AnimatedSprite(e.animations.warrior);n.animationSpeed=.167,n.loop=!0,n.play(),n.scale.set(.5),n.position.set(t.engine.app.screen.width/2,t.engine.app.screen.height/2),n.anchor.set(.5),t.engine.scene.stage.addChild(n)})}}();exports.ExampleSpritePixi=t; },{"pixi.js":"wbEC","../../../libs/pixi-component":"rNDA"}],"TWc8":[function(require,module,exports) { "use strict";var e=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n};Object.defineProperty(exports,"__esModule",{value:!0});var n=e(require("pixi.js")),t=e(require("../../../libs/pixi-component")),i="./assets/lab04/sprites/mario.png",r=function(){return function(e){var r=this;this.engine=new t.GameLoop({transparent:!0}),this.engine.init(e,e.clientWidth,e.clientHeight,1,null,!1),this.engine.app.loader.add(i).load(function(){var e=r.engine.app.loader.resources[i].texture,a=0;new t.Builder(r.engine.scene).asSprite(e).withParent(r.engine.scene.stage).localPos(r.engine.app.view.width/2,r.engine.app.view.height/2).anchor(.5).withComponent(new t.GenericComponent("animator").setFrequency(10).doOnUpdate(function(t,i,r){t.owner.asSprite().texture.frame=new n.Rectangle(e.width/5*(a++%5),0,e.width/5,e.height)})).build()})}}();exports.ExampleSpriteCustom=r; },{"pixi.js":"wbEC","../../../libs/pixi-component":"rNDA"}],"gTJI":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../lectures/pixi-examples-setup"),r=require("./example-verlet"),a=require("./example-distribution"),n=require("./example-distribution-spread"),t=require("./example-matter-airfriction"),i=require("./example-matter-bridge"),m=require("./example-matter-car"),l=require("./example-matter-chains"),u=require("./example-matter-friction"),p=require("./example-matter-mixed.shapes"),c=require("./example-matter-newton-cradle"),x=require("./example-quadtree"),o=require("./example-dynamics-ballistic"),f=require("./example-dynamics-circle"),E=require("./example-steering-seek"),s=require("./example-steering-pursuit"),y=require("./example-steering-evade"),d=require("./example-steering-wander"),w=require("./example-steering-multiple"),g=require("./example-dragonbones"),S=require("./example-sprite-pixi"),q=require("./example-sprite-custom");e.initPixiWatcher({name:"ExampleVerlet",factory:function(e){return new r.ExampleVerlet(e)}},{name:"ExampleGauss",factory:function(e){return new a.ExampleGauss(e)}},{name:"ExampleUniform",factory:function(e){return new a.ExampleUniform(e)}},{name:"ExampleGaussSpread",factory:function(e){return new n.ExampleGaussSpread(e)}},{name:"ExampleUniformSpread",factory:function(e){return new n.ExampleUniformSpread(e)}},{name:"ExampleMatterAirFriction",factory:function(e){return new t.ExampleMatterAirFriction(e)}},{name:"ExampleMatterNewtonCradle",factory:function(e){return new c.ExampleMatterNewtonCradle(e)}},{name:"ExampleMatterBridge",factory:function(e){return new i.ExampleMatterBridge(e)}},{name:"ExampleMatterCar",factory:function(e){return new m.ExampleMatterCar(e)}},{name:"ExampleMatterChains",factory:function(e){return new l.ExampleMatterChains(e)}},{name:"ExampleMatterFriction",factory:function(e){return new u.ExampleMatterFriction(e)}},{name:"ExampleMatterMixedShapes",factory:function(e){return new p.ExampleMatterMixedShapes(e)}},{name:"ExampleQuadTreeSmall",factory:function(e){return new x.ExampleQuadTreeSmall(e)}},{name:"ExampleQuadTreeMedium",factory:function(e){return new x.ExampleQuadTreeMedium(e)}},{name:"ExampleQuadTreeLarge",factory:function(e){return new x.ExampleQuadTreeLarge(e)}},{name:"ExampleQuadTreeUltraLarge",factory:function(e){return new x.ExampleQuadTreeUltraLarge(e)}},{name:"ExampleDynamicBallistic60",factory:function(e){return new o.ExampleDynamicBallistic60(e)}},{name:"ExampleDynamicBallistic20",factory:function(e){return new o.ExampleDynamicBallistic20(e)}},{name:"ExampleDynamicBallistic5",factory:function(e){return new o.ExampleDynamicBallistic5(e)}},{name:"ExampleDynamicCircle60",factory:function(e){return new f.ExampleDynamicCircle60(e)}},{name:"ExampleDynamicCircle20",factory:function(e){return new f.ExampleDynamicCircle20(e)}},{name:"ExampleDynamicCircle5",factory:function(e){return new f.ExampleDynamicCircle5(e)}},{name:"ExampleSteeringSeek",factory:function(e){return new E.ExampleSteeringSeek(e)}},{name:"ExampleSteeringPursuit",factory:function(e){return new s.ExampleSteeringPursuit(e)}},{name:"ExampleSteeringEvade",factory:function(e){return new y.ExampleSteeringEvade(e)}},{name:"ExampleSteeringWander",factory:function(e){return new d.ExampleSteeringWander(e)}},{name:"ExampleSteeringMultiple",factory:function(e){return new w.ExampleSteeringMultiple(e)}},{name:"ExampleDragonBones",factory:function(e){return new g.ExampleDragonBones(e)}},{name:"ExampleSpritePixi",factory:function(e){return new S.ExampleSpritePixi(e)}},{name:"ExampleSpriteCustom",factory:function(e){return new q.ExampleSpriteCustom(e)}}); },{"../../lectures/pixi-examples-setup":"cLXB","./example-verlet":"ptAM","./example-distribution":"abXP","./example-distribution-spread":"HdLE","./example-matter-airfriction":"pvtl","./example-matter-bridge":"uwCg","./example-matter-car":"ReYy","./example-matter-chains":"YuYW","./example-matter-friction":"vPGj","./example-matter-mixed.shapes":"Egez","./example-matter-newton-cradle":"PqY5","./example-quadtree":"YEEc","./example-dynamics-ballistic":"wGCg","./example-dynamics-circle":"UtFA","./example-steering-seek":"NRr7","./example-steering-pursuit":"ArOy","./example-steering-evade":"JKCu","./example-steering-wander":"v0o3","./example-steering-multiple":"MKsx","./example-dragonbones":"KZMn","./example-sprite-pixi":"KeDU","./example-sprite-custom":"TWc8"}]},{},["gTJI"], null)