<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">window.__require=function t(e,n,o){function i(r,s){if(!n[r]){if(!e[r]){var c=r.split("/");if(c=c[c.length-1],!e[c]){var l="function"==typeof __require&amp;&amp;__require;if(!s&amp;&amp;l)return l(c,!0);if(a)return a(c,!0);throw new Error("Cannot find module '"+r+"'")}r=c}var h=n[r]={exports:{}};e[r][0].call(h.exports,function(t){return i(e[r][1][t]||t)},h,h.exports,t,e,n,o)}return n[r].exports}for(var a="function"==typeof __require&amp;&amp;__require,r=0;r&lt;o.length;r++)i(o[r]);return i}({AdManager:[function(t,e,n){"use strict";cc._RF.push(e,"ac37fS7uu9NlLwL6Lj5VLtW","AdManager");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r},r=this&amp;&amp;this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,a){function r(t){try{c(o.next(t))}catch(e){a(e)}}function s(t){try{c(o.throw(t))}catch(e){a(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,s)}c((o=o.apply(t,e||[])).next())})},s=this&amp;&amp;this.__generator||function(t,e){var n,o,i,a,r={label:0,sent:function(){if(1&amp;i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&amp;&amp;(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return c([t,e])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&amp;&amp;(i=2&amp;a[0]?o.return:a[0]?o.throw||((i=o.return)&amp;&amp;i.call(o),0):o.next)&amp;&amp;!(i=i.call(o,a[1])).done)return i;switch(o=0,i&amp;&amp;(a=[2&amp;a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(i=(i=r.trys).length&gt;0&amp;&amp;i[i.length-1])&amp;&amp;(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&amp;&amp;(!i||a[1]&gt;i[0]&amp;&amp;a[1]&lt;i[3])){r.label=a[1];break}if(6===a[0]&amp;&amp;r.label&lt;i[1]){r.label=i[1],i=a;break}if(i&amp;&amp;r.label&lt;i[2]){r.label=i[2],r.ops.push(a);break}i[2]&amp;&amp;r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(s){a=[6,s],o=0}finally{n=i=0}if(5&amp;a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(n,"__esModule",{value:!0});var c=t("../Helper/CocosHelper"),l=t("../Helper/SessionStorageHelper"),h=cc._decorator,u=h.ccclass,d=(h.property,function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.isSwitchTab=!1,e}var n;return i(e,t),n=e,e.getInstance=function(){return n.instance||(n.instance=new n),n.instance},e.prototype.requestAds=function(){var t=this;"undefined"!=typeof YYGGames&amp;&amp;YYGGames.showInterstitial({beforeShowAd:function(){n.isAdRunnning=!0,t.MuteSound(),cc.game.pause()},afterShowAd:function(){t.onAdComplete()}})},e.prototype.isAdRunningOrNot=function(){return n.isAdRunnning},e.prototype.requestRewardAds=function(t){return r(this,void 0,void 0,function(){var e=this;return s(this,function(){return[2,new Promise(function(o){if("undefined"!=typeof YYGGames){var i=YYGGames.rewardReady;if(console.log("YYGGames.canShowReward(); =",i),0==i)return console.log("REWARD AD IS YET NOT READY"),c.default.getInstance().ShowRewardFailedPopup(0),void o(!1);var a=e;YYGGames.showReward({beforeShowAd:function(){n.isAdRunnning=!0,a.MuteSound(),cc.game.pause()},afterShowAd:function(){a.onAdComplete()},rewardComplete:function(){if(t){var e=t.name;l.default.getInstace().setItem(e,"true"),n.AdString.push(e),cc.game.emit("AdManager.rewardComplete",t),t.removeFromParent()}o(!0)},rewardDismissed:function(){c.default.getInstance().ShowRewardFailedPopup(1),o(!1)}})}else console.log("sdk not init"),c.default.getInstance().ShowRewardFailedPopup(0),o(!1)})]})})},e.prototype.onAdComplete=function(){n.isAdRunnning=!1,0==n.getInstance().isSwitchTab&amp;&amp;c.default.getInstance().gameResume()},e.prototype.MuteSound=function(){cc.audioEngine.pauseMusic(),cc.audioEngine.pauseAllEffects()},e.prototype.StartSound=function(){n.getInstance().isSwitchTab||(cc.audioEngine.resumeMusic(),cc.audioEngine.resumeAllEffects())},e.isAdRunnning=!1,e.AdString=[],n=a([u],e)}(cc.Component));n.default=d,cc._RF.pop()},{"../Helper/CocosHelper":"CocosHelper","../Helper/SessionStorageHelper":"SessionStorageHelper"}],AngleManager:[function(t,e,n){"use strict";cc._RF.push(e,"d1821kstsFKso9++/RemGn9","AngleManager");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r};Object.defineProperty(n,"__esModule",{value:!0});var r=cc._decorator,s=r.ccclass,c=r.property,l=function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.rotation=0,e.canMove=!1,e.pickNode=null,e.StartAction=null,e.EndAction=null,e}return i(e,t),e.prototype.onLoad=function(){},e.prototype.start=function(){this.node.on(cc.Node.EventType.TOUCH_START,this.TouchStart,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this.TouchMove,this),this.node.on(cc.Node.EventType.TOUCH_END,this.TouchEnd,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this.TouchEnd,this)},e.prototype.TouchStart=function(t){var e=t.getLocation();if(this.pickNode.children[0].getBoundingBoxToWorld().contains(e)&amp;&amp;255==this.pickNode.children[0].opacity){this.canMove=!0;var n=this.node.parent.convertToWorldSpaceAR(this.node.position),o=t.getLocation();this.rotation=this.node.parent.angle-this.angle(n.x,n.y,o.x,o.y),this.StartAction.emit([])}},e.prototype.TouchMove=function(t){if(this.canMove){t.getLocation();var e=this.node.parent.convertToWorldSpaceAR(this.node.position),n=t.getLocation();this.node.angle=this.angle(e.x,e.y,n.x,n.y)}},e.prototype.TouchEnd=function(){this.canMove&amp;&amp;(this.Rotationreturn(),this.canMove=!1)},e.prototype.getDistance=function(t,e,n,o){var i=n-t,a=o-e;return Math.sqrt(a*a+i*i)},e.prototype.angle=function(t,e,n,o){var i=o-e,a=n-t,r=Math.atan2(i,a);return(r*=180/Math.PI)&lt;0&amp;&amp;(r=360+r),r},e.prototype.Rotationreturn=function(){var t=Math.abs(this.node.angle);this.EndAction&amp;&amp;this.EndAction.emit([t])},a([c(cc.Node)],e.prototype,"pickNode",void 0),a([c(cc.Component.EventHandler)],e.prototype,"StartAction",void 0),a([c(cc.Component.EventHandler)],e.prototype,"EndAction",void 0),a([s],e)}(cc.Component);n.default=l,cc._RF.pop()},{}],AudioManager:[function(t,e,n){"use strict";cc._RF.push(e,"01e24rMIL5Iw7+Axy3d/ibd","AudioManager");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r};Object.defineProperty(n,"__esModule",{value:!0});var r=t("../Promotion/AdManager"),s=cc._decorator.ccclass,c=function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.audioClipList=new Map,e.audioPlayingList=[],e.vocalaudioPlayingList=[],e.isMute=!1,e.volume=1,e}var n;return i(e,t),n=e,e.getInstance=function(){return n.instance||(n.instance=new n,n.instance.init()),n.instance},e.prototype.init=function(){this.schedule(this.garbageCollector,30,1/0,0);var t=this;cc.loader.loadResDir("Sound",function(e,n){for(var o=0;o&lt;n.length;o++)n[o]instanceof cc.AudioClip&amp;&amp;t.add(n[o].name,n[o])})},e.prototype.add=function(t,e){this.audioClipList.has(t)||this.audioClipList.set(t,e)},e.prototype.addAll=function(t){for(var e="",n=0,o=t;n&lt;o.length;n++){var i=o[n];e=i.name,this.audioClipList.has(e)||this.audioClipList.set(e,i)}},e.prototype.get=function(t){var e=this.audioClipList.get(t);if(e)return e},e.prototype.remove=function(t){this.audioClipList.get(t)&amp;&amp;this.audioClipList.delete(t)},e.prototype.removeAll=function(){this.stopAll(),this.audioClipList.clear()},e.prototype.play=function(t,e,n,o){if(void 0===e&amp;&amp;(e=!1),void 0===n&amp;&amp;(n=this.volume),void 0===o&amp;&amp;(o=!1),!this.isMute&amp;&amp;!r.default.getInstance().isAdRunningOrNot()&amp;&amp;0!=cc.audioEngine.getEffectsVolume()){var i=this.audioClipList.get(t);if(o&amp;&amp;this.stopAllVocal(),e&amp;&amp;this.stop(t),i){var a=cc.audioEngine.play(i,e,cc.audioEngine.getMusicVolume()),s={audioId:a,audioName:t,audioVolume:1};return this.audioPlayingList.push(s),o&amp;&amp;this.vocalaudioPlayingList.push(s),cc.audioEngine.getDuration(a)}}},e.prototype.playVocal=function(t){if(!this.isMute&amp;&amp;!r.default.getInstance().isAdRunningOrNot()&amp;&amp;0!=cc.audioEngine.getEffectsVolume()){var e=this.audioClipList.get(t);if(e){this.stopAllVocal();var n=cc.audioEngine.play(e,!1,cc.audioEngine.getEffectsVolume()),o={audioId:n,audioName:t,audioVolume:1};return this.vocalaudioPlayingList.push(o),cc.audioEngine.getDuration(n)}}},e.prototype.playMusic=function(t,e){void 0===e&amp;&amp;(e=!0);var n=this.audioClipList.get(t);n&amp;&amp;cc.audioEngine.playMusic(n,e)},e.prototype.stop=function(t){for(var e=-1,n="",o=0,i=this.audioPlayingList;o&lt;i.length;o++){var a=i[o];e=a.audioId,n=a.audioName,t.includes(n)&amp;&amp;cc.audioEngine.stop(e)}},e.prototype.stopAllVocal=function(){for(var t=-1,e=0,n=this.vocalaudioPlayingList;e&lt;n.length;e++){var o=n[e];t=o.audioId,o.audioName,cc.audioEngine.stop(t)}this.vocalaudioPlayingList.splice(0,this.vocalaudioPlayingList.length)},e.prototype.stopAll=function(){cc.audioEngine.stopAllEffects(),this.audioPlayingList=[]},e.prototype.pause=function(t){for(var e=-1,n=0,o=this.audioPlayingList;n&lt;o.length;n++){var i=o[n];if(e=i.audioId,i.audioName===t&amp;&amp;cc.audioEngine.getState(e)===cc.audioEngine.AudioState.PLAYING){cc.audioEngine.pause(e);break}}},e.prototype.isPlaying=function(t){for(var e=-1,n=0,o=this.audioPlayingList;n&lt;o.length;n++){var i=o[n];if(e=i.audioId,i.audioName===t&amp;&amp;cc.audioEngine.getState(e)===cc.audioEngine.AudioState.PLAYING)return!0}return!1},e.prototype.pauseAll=function(){cc.audioEngine.pauseAll()},e.prototype.resume=function(t){for(var e=-1,n=0,o=this.audioPlayingList;n&lt;o.length;n++){var i=o[n];if(e=i.audioId,i.audioName===t&amp;&amp;cc.audioEngine.getState(e)===cc.audioEngine.AudioState.PAUSED){cc.audioEngine.resume(e);break}}},e.prototype.isPause=function(t){for(var e=-1,n=0,o=this.audioPlayingList;n&lt;o.length;n++){var i=o[n];if(e=i.audioId,i.audioName===t&amp;&amp;cc.audioEngine.getState(e)===cc.audioEngine.AudioState.PAUSED)return!0}return!1},e.prototype.resumeAll=function(){cc.audioEngine.resumeAll()},e.prototype.setVolume=function(t,e){for(var n=-1,o=0,i=this.audioPlayingList;o&lt;i.length;o++){var a=i[o];if(n=a.audioId,a.audioName===t){cc.audioEngine.setVolume(n,e),a.audioVolume=e;break}}},e.prototype.setAllVolume=function(t){for(var e=-1,n=0,o=this.audioPlayingList;n&lt;o.length;n++){var i=o[n];e=i.audioId,cc.audioEngine.setVolume(e,t),i.audioVolume=t}},e.prototype.mute=function(){this.setAllMute(0),this.isMute=!0},e.prototype.unMute=function(){this.setAllMute(1),this.isMute=!1},e.prototype.setAllMute=function(t){for(var e=-1,n=0,o=this.audioPlayingList;n&lt;o.length;n++)e=o[n].audioId,cc.audioEngine.setVolume(e,t)},e.prototype.garbageCollector=function(){for(var t=null,e=this.audioPlayingList.length-1;e&gt;=0;e--)switch(t=this.audioPlayingList[e],cc.audioEngine.getState(t.audioId)){case cc.audioEngine.AudioState.STOPPED:case cc.audioEngine.AudioState.ERROR:this.audioPlayingList.splice(e,1)}},n=a([s],e)}(cc.Component);n.default=c,cc._RF.pop()},{"../Promotion/AdManager":"AdManager"}],AutoScroll:[function(t,e,n){"use strict";cc._RF.push(e,"44f32E+qDFEYJFW6TWHlG9R","AutoScroll");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r};Object.defineProperty(n,"__esModule",{value:!0});var r=cc._decorator,s=r.ccclass,c=r.property,l=function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.isAuto=!0,e.time=3,e}return i(e,t),e.prototype.onLoad=function(){},e.prototype.start=function(){var t=this,e=this.node.getComponent(cc.ScrollView);e&amp;&amp;(e.vertical?(e.scrollToBottom(this.time,!1),cc.tween(e).delay(this.time).call(function(){e.scrollToTop(t.time,!1)}).start()):(e.scrollToRight(this.time,!1),cc.tween(e).delay(this.time).call(function(){e.scrollToLeft(t.time,!1)}).start()))},a([c()],e.prototype,"isAuto",void 0),a([c()],e.prototype,"time",void 0),a([s],e)}(cc.Component);n.default=l,cc._RF.pop()},{}],CanvasManager:[function(t,e,n){"use strict";cc._RF.push(e,"824d41Si+hEBYdhvFNgPqtb","CanvasManager");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r};Object.defineProperty(n,"__esModule",{value:!0});var r=t("./CocosHelper"),s=t("./GlobalData"),c=t("./HelperTools"),l=t("./UserDrawing"),h=cc._decorator,u=h.ccclass,d=(h.property,function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.canvasdata=null,e.PatternData=[],e.DefaultData=null,e.FillData=null,e.CanvasWidth=0,e.CanvasHeight=0,e.IsEraseData=!1,e.userDrawingObj=null,e.filterdata=null,e.DefaultImage=null,e.OriginalData=null,e.SelectedPatternData=null,e.sframe=null,e.texture=null,e.defaulturl=null,e.TextureUserCanvas=null,e.TextureUserContext=null,e.DefaultTextureUserCanvas=null,e.DefaultTextureUserContext=null,e.GradientCanvas=null,e.GradientContext=null,e.GradientImageData=null,e.isDefault=!1,e.UndoData=[],e.MaskImageData=null,e.maskframe=null,e.masktexture=null,e.StickerImage=null,e.PatternColorData=null,e.PatternImage=null,e.selectedPData=null,e.isMultiColorOn=!1,e.colors=["red","orange","yellow","lime","green","teal","blue","purple"],e.StartGradientIndex=0,e.isGradientEnable=!1,e}return i(e,t),e.prototype.initWithData=function(t,e){this.CanvasWidth=t.width,this.CanvasHeight=t.height;var n=document.createElement("canvas"),o=n.getContext("2d");n.width=this.CanvasWidth,n.height=this.CanvasHeight,this.MaskUserCanvas=document.createElement("canvas"),this.MaskUserContext=this.MaskUserCanvas.getContext("2d"),this.MaskUserCanvas.width=this.CanvasWidth,this.MaskUserCanvas.height=this.CanvasHeight,this.MaskUserContext.fillRect(0,0,this.CanvasWidth,this.CanvasHeight),this.MaskImageData=this.MaskUserContext.getImageData(0,0,this.CanvasWidth,this.CanvasHeight),this.StickerCanvas=document.createElement("canvas"),this.StickerContext=this.StickerCanvas.getContext("2d"),this.StickerCanvas.width=this.CanvasWidth,this.StickerCanvas.height=this.CanvasHeight,this.isGradientEnable&amp;&amp;(this.GradientCanvas=document.createElement("canvas"),this.GradientContext=this.GradientCanvas.getContext("2d"),this.GradientCanvas.width=800,this.GradientCanvas.height=504),this.canvasdata={UserCanvas:n,UserContext:o,DrawNode:t,CanvasWidth:this.CanvasWidth,CanvasHeight:this.CanvasHeight,ID:0},this.userDrawingObj=e,this.DefaultImage=new Image,this.sframe=new cc.SpriteFrame,this.texture=new cc.Texture2D,this.maskframe=new cc.SpriteFrame,this.masktexture=new cc.Texture2D,this.TextureUserCanvas=document.createElement("canvas"),this.TextureUserContext=n.getContext("2d"),this.DefaultTextureUserCanvas=document.createElement("canvas"),this.DefaultTextureUserContext=n.getContext("2d"),this.gradient()},e.prototype.gradient=function(){if(this.isGradientEnable){for(var t=[],e=0;e&lt;this.colors.length;e++)t.push(e);r.shuffleArray(t);var n=this.canvasdata.DrawNode.getContentSize();this.GradientContext.clearRect(0,0,n.width,n.height);var o=this.GradientContext.createLinearGradient(0,0,n.width,n.height);for(e=0;e&lt;this.colors.length;e++)o.addColorStop(e/this.colors.length,this.colors[t[e]]);this.GradientContext.fillStyle=o,this.GradientContext.fillRect(0,0,n.width,n.height),this.GradientImageData=this.GradientContext.getImageData(0,0,n.width,n.height),this.StartGradientIndex=0}},e.prototype.updateGradient=function(){this.isGradientEnable&amp;&amp;this.isMultiColorOn&amp;&amp;this.gradient()},e.prototype.UpdateTexture=function(){var t=this.getCanvasData();this.texture.initWithData(this.OriginalData,cc.Texture2D.PixelFormat.RGBA8888,this.CanvasWidth,this.CanvasHeight),this.sframe.setTexture(this.texture),t.DrawNode.getComponent(cc.Sprite).spriteFrame=this.sframe},e.prototype.setImageData=function(t){null!=t&amp;&amp;(this.getCanvasData().UserContext.putImageData(t,0,0),this.UpdateTexture())},e.prototype.setEraseOn=function(t){this.IsEraseData=t},e.prototype.getImageData=function(){var t=this.getCanvasData();return null==t?null:t.UserContext.getImageData(0,0,t.CanvasWidth,t.CanvasHeight)},e.prototype.getCanvasData=function(){return this.canvasdata},e.prototype.resetTexture=function(){this.OriginalData=this.DefaultData,this.UpdateTexture()},e.prototype.clearPicture=function(){null!=this.DefaultData&amp;&amp;(this.DefaultTextureUserContext.putImageData(this.DefaultData,0,0),this.OriginalData=this.DefaultTextureUserContext.getImageData(0,0,this.CanvasWidth,this.CanvasHeight),this.OriginalData=this.filterData(this.OriginalData),this.UpdateTexture(),this.UndoData.splice(0,this.UndoData.length))},e.prototype.FillTexture=function(t){for(var e=this.getPatternDataUsingIndex(t),n=this.OriginalData,o=(n.width,n.data),i=0;i&lt;o.length;i+=4)o[i+0]=e.data[i],o[i+1]=e.data[i+1],o[i+2]=e.data[i+2],o[i+3]=e.data[i+3];this.UpdateTexture()},e.prototype.LoadTexture=function(t,e,n,o){var i=this;void 0===o&amp;&amp;(o=!1);var a=s.getImageElement(t);if(a)this.ActionAfterLoaded(a,t,e,n,o);else{var r=new Image;r.onload=function(){i.ActionAfterLoaded(r,t,e,n,o)},r.src=t,0==e&amp;&amp;(this.defaulturl=t,this.userDrawingObj.StartDrawingAfterLoading())}},e.prototype.ActionAfterLoaded=function(t,e,n,o,i){void 0===i&amp;&amp;(i=!1),this.TextureUserContext.clearRect(0,0,this.CanvasWidth,this.CanvasHeight);var a=t.width,r=t.height;if(o&amp;&amp;(a=this.CanvasWidth,r=this.CanvasHeight),100==n&amp;&amp;(this.PatternImage=t,this.UpdatePatternWithColor(this.userDrawingObj.selectedFillColor)),this.TextureUserCanvas.width=a,this.TextureUserCanvas.height=r,0==n&amp;&amp;(this.DefaultTextureUserCanvas.width=a,this.DefaultTextureUserCanvas.height=r),i)this.TextureUserContext.drawImage(t,0,0,this.CanvasWidth,this.CanvasHeight),0==n&amp;&amp;this.DefaultTextureUserContext.drawImage(t,a/2-t.width/2,r/2-t.height/2);else if(o){var s=this.TextureUserContext.createPattern(t,"repeat");this.TextureUserContext.rect(0,0,this.TextureUserCanvas.width,this.TextureUserCanvas.height),this.TextureUserContext.fillStyle=s,this.TextureUserContext.fill()}else this.TextureUserContext.drawImage(t,a/2-t.width/2,r/2-t.height/2),0==n&amp;&amp;this.DefaultTextureUserContext.drawImage(t,a/2-t.width/2,r/2-t.height/2);if(0==n)if(this.DefaultImage=t,this.isDefault=!0,this.userDrawingObj.SceneType===l.SCENE_TYPE.FILL||this.userDrawingObj.SceneType===l.SCENE_TYPE.FILL_AND_DRAWING){var c=this.filterData(this.TextureUserContext.getImageData(0,0,a,r));this.PatternData.push({PatternData:c,Image:t,ID:n}),this.DefaultData=this.DefaultTextureUserContext.getImageData(0,0,a,r),this.FillData=this.filterData(this.TextureUserContext.getImageData(0,0,a,r)),this.userDrawingObj.SceneType!=l.SCENE_TYPE.FILL&amp;&amp;this.userDrawingObj.SceneType!=l.SCENE_TYPE.FILL_AND_DRAWING||this.userDrawingObj.initFloodFill(this.FillData),this.OriginalData=c,this.setImageData(c),this.DefaultTextureUserContext.putImageData(this.OriginalData,0,0)}else c=this.TextureUserContext.getImageData(0,0,a,r),this.PatternData.push({PatternData:c,Image:t,ID:n}),this.OriginalData=c,this.setImageData(c),this.FillData=this.DefaultTextureUserContext.getImageData(0,0,a,r),this.userDrawingObj.initFloodFill(this.FillData),this.DefaultTextureUserContext.putImageData(this.OriginalData,0,0),this.DefaultData=this.DefaultTextureUserContext.getImageData(0,0,a,r);else this.PatternData.push({PatternData:this.TextureUserContext.getImageData(0,0,a,r),Image:t,ID:n})},e.prototype.LoadEmptyTexture=function(t){this.isDefault=!1,this.TextureUserContext.clearRect(0,0,this.CanvasWidth,this.CanvasHeight);var e=this.CanvasWidth,n=this.CanvasHeight;this.TextureUserCanvas.width=e,this.TextureUserCanvas.height=n,this.DefaultTextureUserCanvas.width=e,this.DefaultTextureUserCanvas.height=n;var o=this.TextureUserContext.getImageData(0,0,e,n);this.PatternData.push({PatternData:o,Image:null,ID:t}),this.OriginalData=o;for(var i=0;i&lt;this.OriginalData.data.length;i+=4)this.OriginalData.data[i]=0,this.OriginalData.data[i+1]=0,this.OriginalData.data[i+2]=0,this.OriginalData.data[i+3]=0;this.setImageData(o),this.FillData=this.DefaultTextureUserContext.getImageData(0,0,e,n),this.userDrawingObj.initFloodFill(this.FillData),this.DefaultTextureUserContext.putImageData(this.OriginalData,0,0),this.DefaultData=this.DefaultTextureUserContext.getImageData(0,0,e,n),this.userDrawingObj.StartDrawingAfterLoading()},e.prototype.filterData=function(t){if(this.userDrawingObj.SceneType===l.SCENE_TYPE.FILL||this.userDrawingObj.SceneType===l.SCENE_TYPE.FILL_AND_DRAWING){for(var e=t,n=t.data,o=0;o&lt;n.length;o+=4)n[o]&lt;80&amp;&amp;n[o+1]&lt;80&amp;&amp;n[o+2]&lt;80?(n[o+0]=0,n[o+1]=0,n[o+2]=0,n[o+3]=255):(n[o+0]=255,n[o+1]=255,n[o+2]=255,n[o+3]=255);return e}return t},e.prototype.getPatternData=function(){return this.SelectedPatternData},e.prototype.setPatternData=function(t){if(null==this.PatternData)return this.userDrawingObj.setPatternIndex(this.userDrawingObj.selectedPattern),null;for(var e=0;e&lt;this.PatternData.length;e++)if(this.PatternData[e].ID==t)return this.SelectedPatternData=this.PatternData[e].PatternData,this.selectedPData=this.SelectedPatternData.data,this.SelectedPatternData},e.prototype.getPatternDataUsingIndex=function(t){if(null==this.PatternData)return null;for(var e=0;e&lt;this.PatternData.length;e++)if(this.PatternData[e].ID==t)return this.PatternData[e].PatternData;return null},e.prototype.UpdatePatternDrawingFloodFill=function(t){null==this.SelectedPatternData&amp;&amp;(this.SelectedPatternData=this.getPatternDataUsingIndex(t),this.SelectedPatternData&amp;&amp;(this.selectedPData=this.SelectedPatternData.data)),cc.game.emit("EnableUndo");var e,n=this.OriginalData,o=n.width,i=n.data,a=n.height,r=this.userDrawingObj.isEnableColor;r&amp;&amp;(e=this.userDrawingObj.selectedFillColor);for(var s=this.userDrawingObj.floodfillcolor.ColorMatrix,c=0;c&lt;o;c++)for(var h=0;h&lt;a;h++)if(s[c][h]){var u=4*(h*o+c);this.isGradientEnable&amp;&amp;this.isMultiColorOn?(i[u]=this.GradientImageData[u],i[u+1]=this.GradientImageData[u+1],i[u+2]=this.GradientImageData[u+2],i[u+3]=this.GradientImageData[u+3]):this.userDrawingObj.isEnablePatternWithColor?(i[u]=this.PatternColorData[u],i[u+1]=this.PatternColorData[u+1],i[u+2]=this.PatternColorData[u+2],i[u+3]=this.PatternColorData[u+3]):r?(i[u]=e.r,i[u+1]=e.g,i[u+2]=e.b,i[u+3]=255):(i[u]=this.selectedPData[u],i[u+1]=this.selectedPData[u+1],i[u+2]=this.selectedPData[u+2],i[u+3]=this.selectedPData[u+3])}this.userDrawingObj.SceneType!=l.SCENE_TYPE.DRAWING?this.UpdateContext():this.setImageData(this.OriginalData)},e.prototype.UpdatePatternDrawingUsingPosition=function(t,e,n,o,i,a){if(null!=this.OriginalData&amp;&amp;!(n&gt;i||o&gt;a)){if(this.IsEraseData){for(var r=this.OriginalData,s=r.width,c=r.data,l=n;l&lt;i;l++)for(var h=o;h&lt;a;h++)if(!(h&lt;0||l&lt;0||h&gt;a||l&gt;i)){var u=4*(h*s+l);e.data&amp;&amp;e.data[u+3]&amp;&amp;e.data[u+3]&gt;0&amp;&amp;(c[u]=0,c[u+1]=0,c[u+2]=0,c[u+3]=0)}}else if(this.isGradientEnable&amp;&amp;this.isMultiColorOn){if(null==this.GradientImageData)return;var d=this.OriginalData;for(s=d.width,c=d.data,l=n;l&lt;i;l++)for(h=o;h&lt;a;h++)h&lt;0||l&lt;0||h&gt;a||l&gt;i||(u=4*(h*s+l),e.data&amp;&amp;e.data[u+3]&amp;&amp;e.data[u+3]&gt;0&amp;&amp;(c[u]=this.GradientImageData[u],c[u+1]=this.GradientImageData[u+1],c[u+2]=this.GradientImageData[u+2],c[u+3]=this.GradientImageData[u+3]))}else if(this.userDrawingObj.isEnablePatternWithColor){if(null==this.PatternColorData)return;var p=this.OriginalData;for(s=p.width,c=p.data,l=n;l&lt;i;l++)for(h=o;h&lt;a;h++)h&lt;0||l&lt;0||h&gt;a||l&gt;i||(u=4*(h*s+l),e.data&amp;&amp;e.data[u+3]&amp;&amp;e.data[u+3]&gt;0&amp;&amp;(c[u]=this.PatternColorData[u],c[u+1]=this.PatternColorData[u+1],c[u+2]=this.PatternColorData[u+2],c[u+3]=this.PatternColorData[u+3]))}else if(this.userDrawingObj.isEnableColor){var f=this.userDrawingObj.selectedFillColor,g=this.OriginalData;for(s=g.width,c=g.data,l=n;l&lt;i;l++)for(h=o;h&lt;a;h++)h&lt;0||l&lt;0||h&gt;a||l&gt;i||(u=4*(h*s+l),e.data&amp;&amp;e.data[u+3]&amp;&amp;e.data[u+3]&gt;0&amp;&amp;(c[u]=f.r,c[u+1]=f.g,c[u+2]=f.b,c[u+3]=255))}else{if(null==this.SelectedPatternData)return void this.setPatternData(this.userDrawingObj.selectedPattern);var v=this.OriginalData,y=(s=v.width,c=v.data,e.data);for(l=n;l&lt;i;l++)for(h=o;h&lt;a;h++)h&lt;0||l&lt;0||h&gt;a||l&gt;i||y[3+(u=4*(h*s+l))]&amp;&amp;this.selectedPData[u+3]&amp;&amp;(c[u]=this.selectedPData[u],c[u+1]=this.selectedPData[u+1],c[u+2]=this.selectedPData[u+2],c[u+3]=this.selectedPData[u+3])}this.UpdateTexture()}},e.prototype.UpdatePatternDrawingInBoundry=function(t,e,n,o,i,a){if(null!=this.OriginalData&amp;&amp;null!=this.GradientImageData){if(this.isGradientEnable&amp;&amp;this.isMultiColorOn){var r=this.OriginalData,s=r.width,c=r.data,l=this.GradientImageData.data;if(null==(g=e.data))return;for(var h=n;h&lt;i;h++)for(var u=o;u&lt;a;u++)h&gt;i||u&gt;a||h&lt;0||u&lt;0||g[3+(y=4*(u*s+h))]&gt;0&amp;&amp;l[y+3]&gt;0&amp;&amp;this.checkValue(h,u)&amp;&amp;(c[y]=l[y],c[y+1]=l[y+1],c[y+2]=l[y+2],c[y+3]=255)}else if(this.userDrawingObj.isEnableColor&amp;&amp;!this.userDrawingObj.isEnablePatternWithColor){var d=this.userDrawingObj.selectedFillColor,p=this.OriginalData;if(s=p.width,c=p.data,null==(g=e.data))return;for(h=n;h&lt;i;h++)for(u=o;u&lt;a;u++)h&gt;i||u&gt;a||h&lt;0||u&lt;0||g[3+(y=4*(u*s+h))]&gt;0&amp;&amp;this.checkValue(h,u)&amp;&amp;(c[y]=d.r,c[y+1]=d.g,c[y+2]=d.b,c[y+3]=255)}else if(this.userDrawingObj.isEnableColor&amp;&amp;this.userDrawingObj.isEnablePatternWithColor){d=this.userDrawingObj.selectedFillColor;var f=this.OriginalData;if(s=f.width,c=f.data,null==s)return;if(null==c)return;if(null==this.PatternColorData)return;if(null==(g=e.data))return;for(h=n;h&lt;i;h++)for(u=o;u&lt;a;u++)h&gt;i||u&gt;a||h&lt;0||u&lt;0||g[3+(y=4*(u*s+h))]&gt;0&amp;&amp;this.checkValue(h,u)&amp;&amp;(c[y]=this.PatternColorData[y],c[y+1]=this.PatternColorData[y+1],c[y+2]=this.PatternColorData[y+2],c[y+3]=this.PatternColorData[y+3])}else{var g,v=this.OriginalData;if(s=v.width,c=v.data,null==(g=e.data))return;if(null==this.selectedPData)return;for(h=n;h&lt;i;h++)for(u=o;u&lt;a;u++){var y;h&gt;i||u&gt;a||h&lt;0||u&lt;0||g[3+(y=4*(u*s+h))]&gt;0&amp;&amp;this.checkValue(h,u)&amp;&amp;(c[y]=this.selectedPData[y],c[y+1]=this.selectedPData[y+1],c[y+2]=this.selectedPData[y+2],c[y+3]=this.selectedPData[y+3])}}this.UpdateTexture()}},e.prototype.setSticker=function(t){for(var e=0;e&lt;s.GlobalData.data.flags.StickerPath.length;e++)if(s.GlobalData.data.flags.StickerPath[e].name==t){this.StickerImage=s.GlobalData.data.flags.StickerPath[e].img;break}},e.prototype.AddSticker=function(t,e,n){void 0===n&amp;&amp;(n=1),this.StickerImage&amp;&amp;(this.StickerContext.putImageData(this.OriginalData,0,0),this.StickerContext.drawImage(this.StickerImage,t-this.StickerImage.width*n/2,e-this.StickerImage.height*n/2,this.StickerImage.width*n,this.StickerImage.height*n),this.UpdateSticker(this.StickerContext.getImageData(0,0,this.CanvasWidth,this.CanvasHeight),t,e,this.StickerImage.width*n,this.StickerImage.height*n))},e.prototype.UpdateSticker=function(t,e,n,o,i){if(this.userDrawingObj.SceneType==l.SCENE_TYPE.FILL_AND_DRAWING){this.userDrawingObj.floodfillcolor.modifiedPixelsIndex;for(var a=this.OriginalData,r=a.width,s=a.data,c=t.data,h=parseInt((o/2).toFixed(0)),u=parseInt((i/2).toFixed(0)),d=e-h;d&lt;e+o;d++)if(!(d&lt;0||d&gt;=this.CanvasWidth))for(var p=n-u;p&lt;n+i;p++)if(!(p&lt;0||p&gt;=this.CanvasHeight)){var f=4*(p*r+d);this.checkValue(d,p)&amp;&amp;(s[f]=c[f],s[f+1]=c[f+1],s[f+2]=c[f+2],s[f+3]=c[f+3])}}else{var g=this.OriginalData;for(r=g.width,s=g.data,c=t.data,d=0;d&lt;s.length;d+=4)s[f=d]=c[f],s[f+1]=c[f+1],s[f+2]=c[f+2],s[f+3]=c[f+3]}this.UpdateContext()},e.prototype.UpdateContext=function(){this.setImageData(this.OriginalData),this.UndoData.push({data:this.getCanvasData().UserContext.getImageData(0,0,this.CanvasWidth,this.CanvasHeight)}),cc.game.emit("Enable.Undo")},e.prototype.checkValue=function(t,e){return this.userDrawingObj.floodfillcolor.ColorMatrix[t][e]},e.prototype.getDrawingPixels=function(){var t=0;if(this.isDefault){if(null==(n=this.TextureUserContext.getImageData(0,0,this.CanvasWidth,this.CanvasHeight)))return 1;for(var e=0;e&lt;n.data.length;e+=4)n.data[e+3]&amp;&amp;n.data[e+3]&gt;0&amp;&amp;t++}else{var n;if(null==(n=this.OriginalData))return 1;for(e=0;e&lt;n.data.length;e+=4)n.data[e+3]&amp;&amp;n.data[e+3]&gt;0&amp;&amp;t++}return t},e.prototype.getTotalPixels=function(t){var e=0,n=this.getPatternDataUsingIndex(t);if(null==n)return 1;for(var o=0;o&lt;n.data.length;o+=4)n.data[o+3]&amp;&amp;n.data[o+3]&gt;0&amp;&amp;e++;return e},e.prototype.getDrawingPercentage=function(t){void 0===t&amp;&amp;(t=1);var e=this.getTotalPixels(t),n=this.getDrawingPixels();return this.isDefault?e/n*100:n/e*100},e.prototype.UpdatePatternWithColor=function(t){if(this.PatternImage&amp;&amp;t&amp;&amp;null!=t.r&amp;&amp;null!=t.g&amp;&amp;null!=t.b){var e=document.createElement("canvas"),n=e.getContext("2d");e.width=this.CanvasWidth,e.height=this.CanvasHeight,n.fillStyle=c.rgbToHex(t.r,t.g,t.b),n.fillRect(0,0,this.CanvasWidth,this.CanvasHeight),n.drawImage(this.PatternImage,0,0),this.PatternColorData=n.getImageData(0,0,this.CanvasWidth,this.CanvasHeight).data}},e.prototype.UpdatePatternWithColorCode=function(t,e){var n=null;if(null!=this.PatternData){for(var o=0;o&lt;this.PatternData.length;o++)if(this.PatternData[o].ID==t){n=this.PatternData[o];break}if(null!=n&amp;&amp;null!=n.Image&amp;&amp;e&amp;&amp;null!=e.r&amp;&amp;null!=e.g&amp;&amp;null!=e.b){var i=document.createElement("canvas"),a=i.getContext("2d");i.width=this.CanvasWidth,i.height=this.CanvasHeight,a.fillStyle=c.rgbToHex(e.r,e.g,e.b),a.fillRect(0,0,this.CanvasWidth,this.CanvasHeight),a.globalCompositeOperation="destination-in",a.drawImage(n.Image,0,0),n.PatternData=a.getImageData(0,0,this.CanvasWidth,this.CanvasHeight)}}},a([u],e)}(cc.Component));n.default=d,cc._RF.pop()},{"./CocosHelper":"CocosHelper","./GlobalData":"GlobalData","./HelperTools":"HelperTools","./UserDrawing":"UserDrawing"}],CharacterConfig:[function(t,e,n){"use strict";cc._RF.push(e,"078ae1RJXlOpaZlBumFqzZa","CharacterConfig");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r};Object.defineProperty(n,"__esModule",{value:!0});var r=cc._decorator,s=r.ccclass,c=r.property,l=function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.IdleAnimationName="",e.HangAnimationName="",e.SittingAnimationName="",e.sittingY=0,e.StandingY=0,e}return i(e,t),e.prototype.onLoad=function(){},e.prototype.start=function(){},a([c],e.prototype,"IdleAnimationName",void 0),a([c],e.prototype,"HangAnimationName",void 0),a([c],e.prototype,"SittingAnimationName",void 0),a([c],e.prototype,"sittingY",void 0),a([c],e.prototype,"StandingY",void 0),a([s],e)}(cc.Component);n.default=l,cc._RF.pop()},{}],CharacterHelper:[function(t,e,n){"use strict";cc._RF.push(e,"fb609GeReFLzonWl5luGp7j","CharacterHelper");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r};Object.defineProperty(n,"__esModule",{value:!0});var r=t("./AudioManager"),s=t("./CharacterConfig"),c=t("./HelperTools"),l=cc._decorator,h=l.ccclass,u=l.property,d=function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.isEnable=!0,e.RectNode=null,e.MoveNode=null,e.DestinationNode=null,e.canMove=!1,e.Rect=null,e}return i(e,t),e.prototype.onLoad=function(){this.Rect=this.RectNode.getBoundingBoxToWorld()},e.prototype.start=function(){this.OnEvent()},e.prototype.OffEvent=function(){this.node.off(cc.Node.EventType.TOUCH_START,this.TouchStart,this),this.node.off(cc.Node.EventType.TOUCH_MOVE,this.TouchMove,this),this.node.off(cc.Node.EventType.TOUCH_END,this.TouchEnd,this),this.node.off(cc.Node.EventType.TOUCH_CANCEL,this.TouchEnd,this)},e.prototype.OnEvent=function(){this.node.on(cc.Node.EventType.TOUCH_START,this.TouchStart,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this.TouchMove,this),this.node.on(cc.Node.EventType.TOUCH_END,this.TouchEnd,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this.TouchEnd,this)},e.prototype.TouchStart=function(t){if(t.getLocation(),0==this.canMove)for(var e=this.node.childrenCount-1;e&gt;=0;e--){var n=this.node.children[e];if(n&amp;&amp;n.active){var o=!1;if(r.default.getInstance().play("sfx26001016"),n.childrenCount&gt;0?n.children[0].getBoundingBoxToWorld().contains(t.getLocation())&amp;&amp;(o=!0):n.getBoundingBoxToWorld().contains(t.getLocation())&amp;&amp;(o=!0),o){this.MoveNode=n,this.MoveNode.zIndex=2,cc.Tween.stopAllByTarget(this.MoveNode),this.PlayHangingAnimation(this.MoveNode);break}}}},e.prototype.TouchMove=function(t){var e=t.getLocation();this.MoveNode&amp;&amp;(this.MoveNode.position=cc.v3(this.MoveNode.parent.convertToNodeSpaceAR(e)))},e.prototype.TouchEnd=function(t){var e=this;if(this.MoveNode){var n=this.MoveNode;if(this.Rect.contains(t.getLocation())){var o=n.getComponent(s.default).sittingY;this.MoveNode.zIndex=0,r.default.getInstance().play("sfx26001019"),cc.tween(n).to(.2,{position:cc.v3(this.MoveNode.x,o)}).call(function(){e.PlaySittingAnimation(n),n.x&lt;300&amp;&amp;255==n.opacity&amp;&amp;(cc.game.emit("CharacterEntry"),n.opacity=254)}).start()}else o=n.getComponent(s.default).StandingY,this.MoveNode.zIndex=1,r.default.getInstance().play("sfx26001019"),cc.tween(n).to(.2,{position:cc.v3(this.MoveNode.x,o)}).call(function(){e.StandingIdleAnimation(n),n.x&lt;300&amp;&amp;255==n.opacity&amp;&amp;(cc.game.emit("CharacterEntry"),n.opacity=254)}).start();this.MoveNode=null}this.canMove=!1,this.MoveNode=null},e.prototype.update=function(){},e.prototype.PlayHangingAnimation=function(t){c.setAnimation(t,t.getComponent(s.default).HangAnimationName,!0)},e.prototype.StandingIdleAnimation=function(t){c.setAnimation(t,t.getComponent(s.default).IdleAnimationName,!0)},e.prototype.PlaySittingAnimation=function(t){c.setAnimation(t,t.getComponent(s.default).SittingAnimationName,!0)},e.Tag=1e3,a([u],e.prototype,"isEnable",void 0),a([u(cc.Node)],e.prototype,"RectNode",void 0),a([h],e)}(cc.Component);n.default=d,cc._RF.pop()},{"./AudioManager":"AudioManager","./CharacterConfig":"CharacterConfig","./HelperTools":"HelperTools"}],CocosHelper:[function(t,e,n){"use strict";cc._RF.push(e,"7f9c3QfZo5Cbp1EblnOZWF3","CocosHelper");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r},r=this&amp;&amp;this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,a){function r(t){try{c(o.next(t))}catch(e){a(e)}}function s(t){try{c(o.throw(t))}catch(e){a(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,s)}c((o=o.apply(t,e||[])).next())})},s=this&amp;&amp;this.__generator||function(t,e){var n,o,i,a,r={label:0,sent:function(){if(1&amp;i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&amp;&amp;(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return c([t,e])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&amp;&amp;(i=2&amp;a[0]?o.return:a[0]?o.throw||((i=o.return)&amp;&amp;i.call(o),0):o.next)&amp;&amp;!(i=i.call(o,a[1])).done)return i;switch(o=0,i&amp;&amp;(a=[2&amp;a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(i=(i=r.trys).length&gt;0&amp;&amp;i[i.length-1])&amp;&amp;(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&amp;&amp;(!i||a[1]&gt;i[0]&amp;&amp;a[1]&lt;i[3])){r.label=a[1];break}if(6===a[0]&amp;&amp;r.label&lt;i[1]){r.label=i[1],i=a;break}if(i&amp;&amp;r.label&lt;i[2]){r.label=i[2],r.ops.push(a);break}i[2]&amp;&amp;r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(s){a=[6,s],o=0}finally{n=i=0}if(5&amp;a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(n,"__esModule",{value:!0}),n.getRegionDragon=n.getTextureHeightDragon=n.getTextureWidthDragon=n.getTextureSizeDragon=n.getTextureSize=n.getRegion=n.PrintAllRegion=n.getSpineAnimationDuration=n.PrintAllAnimationNames=n.ShowSlotSpine=n.HideSlotSpine=n.PrintAllSlotSpine=n.getAnimationDuration=n.getAnimationList=n.getSlot=n.PrintAllSlot=n.ShowSlot=n.HideSlot=n.shuffleArray=n.getRandomFloat=n.getRandomNumber=n.Padding=void 0;var c=t("../Promotion/AdManager"),l=cc._decorator,h=l.ccclass,u=(l.property,function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.prefab=[],e.isSwitchTab=!1,e.ItemIndex=[],e.isLevelDone=[!1,!1,!1,!1,!1],e.LoadedTexture=[],e.Canvas=null,e.Context=null,e.tempUserTexture=null,e}var n;return i(e,t),n=e,e.getInstance=function(){return n.instance||(n.instance=new n,n.instance.registerEvent()),n.instance},e.prototype.registerEvent=function(){cc.game.on(cc.game.EVENT_SHOW,n.instance.gameResume,n.instance),cc.game.on(cc.game.EVENT_HIDE,n.instance.gamePause,n.instance),this.Canvas=document.createElement("canvas"),this.Context=this.Canvas.getContext("2d"),this.tempUserTexture=new cc.Texture2D},e.prototype.reShuffleArray=function(){d(this.ItemIndex)},e.prototype.gameResume=function(){c.default.getInstance().isSwitchTab=!1,c.default.getInstance().isAdRunningOrNot()?(cc.game.pause(),c.default.getInstance().MuteSound()):(cc.game.resume(),c.default.getInstance().StartSound())},e.prototype.gamePause=function(){cc.game.pause(),c.default.getInstance().isSwitchTab=!0,c.default.getInstance().MuteSound(),console.log("Game Pause")},e.prototype.ShowRewardFailedPopup=function(t){cc.find("Canvas/RewardFailPopup")&amp;&amp;cc.game.emit("RewarFailed.Open",t)},e.prototype.LoadTexture=function(t,e,n,o){return r(this,void 0,void 0,function(){var i,a,c=this;return s(this,function(){return o&amp;&amp;(this.Canvas.width=e.width,this.Canvas.height=e.height,i=new Image,a=g(t,n),i.onload=function(){return r(c,void 0,void 0,function(){return s(this,function(){return this.Context.clearRect(0,0,e.width,e.height),this.Context.drawImage(i,a.x,a.y),this.tempUserTexture=new cc.Texture2D,this.tempUserTexture.initWithElement(this.Canvas),this.LoadedTexture.push({key:o,value:this.tempUserTexture}),[2]})})},i.src=o),[2]})})},e.prototype.UpdateTexture=function(t,e,n,o){this.Canvas.width=e.width,this.Canvas.height=e.height;var i=g(t,n);return this.Context.clearRect(0,0,e.width,e.height),this.Context.putImageData(o,i.x,i.y),this.tempUserTexture=new cc.Texture2D,this.tempUserTexture.initWithElement(this.Canvas),this.tempUserTexture},e.prototype.LoadTextureAsync=function(t,e,n){return r(this,void 0,void 0,function(){var o;return s(this,function(i){switch(i.label){case 0:console.time("start"),o=0,i.label=1;case 1:return o&lt;n.length?null!=this.getTexture(n[o].value)?[3,3]:[4,this.LoadTexture(t,e,n[o].slotname,n[o].value)]:[3,4];case 2:i.sent(),i.label=3;case 3:return o++,[3,1];case 4:return console.timeEnd("start"),console.log("Load All"),[2]}})})},e.prototype.getTexture=function(t){for(var e=0;e&lt;this.LoadedTexture.length;e++)if(this.LoadedTexture[e].key==t)return this.LoadedTexture[e].value;return null},e.prototype.loadTexture=function(t,e,n){return r(this,void 0,void 0,function(){return s(this,function(o){switch(o.label){case 0:return null!=this.getTexture(n.value)?[3,2]:[4,this.LoadTexture(t,e,n.slotname,n.value)];case 1:o.sent(),o.label=2;case 2:return[2]}})})},n=a([h],e)}(cc.Component));function d(t){for(var e=t.length-1;e&gt;0;e--){var n=Math.floor(Math.random()*(e+1)),o=t[e];t[e]=t[n],t[n]=o}}function p(t){return t.dragonAtlasAsset.texture.width}function f(t){return t.dragonAtlasAsset.texture.height}function g(t,e){return t.armature().getSlot(e)._displayData.texture.region}n.default=u,n.Padding=function(t,e){for(;t.length!=e;)t="0"+t;return t},n.getRandomNumber=function(t,e){return Math.floor(Math.random()*(e-t+1))+t},n.getRandomFloat=function(t,e){return Math.random()*(e-t)+t},n.shuffleArray=d,n.HideSlot=function(t,e){var n=t.armature();n.getSlots().forEach(function(t){t.name==e&amp;&amp;(n.getSlot(e).offset.scaleX=0,n.getSlot(e).invalidUpdate())})},n.ShowSlot=function(t,e){var n=t.armature();n.getSlots().forEach(function(t){t.name==e&amp;&amp;(n.getSlot(e).offset.scaleX=1,n.getSlot(e).invalidUpdate())})},n.PrintAllSlot=function(t){t.armature().getSlots().forEach(function(t){console.log(t.name)})},n.getSlot=function(t){return t.armature().getSlot(name)},n.getAnimationList=function(t){for(var e=[],n=t.getAnimationNames(t.armatureName),o=0;o&lt;n.length;o++)e.push(n[o]);return e},n.getAnimationDuration=function(t,e){var n=0;if(t.armature().animation.animations[e]&amp;&amp;(n=t.armature().animation.animations[e].duration),n)return n},n.PrintAllSlotSpine=function(t){t.skeletonData.skeletonJson.slots.forEach(function(t){console.log(t.name)})},n.HideSlotSpine=function(t,e){var n=t.findSlot(e);n&amp;&amp;(n.color=cc.color(n.color.r,n.color.g,n.color.b,0))},n.ShowSlotSpine=function(t,e){var n=t.findSlot(e);n&amp;&amp;(n.color=cc.color(n.color.r,n.color.g,n.color.b,1))},n.PrintAllAnimationNames=function(t){t.skeletonData._skeletonCache.animations.forEach(function(t){console.log(t.name)})},n.getSpineAnimationDuration=function(t,e){for(var n=t.skeletonData._skeletonCache.animations,o=0;o&lt;n.length;o++){var i=n[o];if(e===i.name)return i.duration}return 0},n.PrintAllRegion=function(t){t.skeletonData._atlasCache.regions.forEach(function(t){console.log(t.name)})},n.getRegion=function(t,e){var n=null;return t.skeletonData._atlasCache.regions.forEach(function(t){t.name==e&amp;&amp;(n=cc.rect(t.x,t.y,t.width,t.height))}),n},n.getTextureSize=function(t){return cc.size(t.skeletonData.textures[0].width,t.skeletonData.textures[0].height)},n.getTextureSizeDragon=function(t){return cc.size(p(t),f(t))},n.getTextureWidthDragon=p,n.getTextureHeightDragon=f,n.getRegionDragon=g,cc._RF.pop()},{"../Promotion/AdManager":"AdManager"}],DragonHelper:[function(t,e,n){"use strict";cc._RF.push(e,"1be92NwuLVDGosJtCj2JoyX","DragonHelper");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r},r=this&amp;&amp;this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,a){function r(t){try{c(o.next(t))}catch(e){a(e)}}function s(t){try{c(o.throw(t))}catch(e){a(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,s)}c((o=o.apply(t,e||[])).next())})},s=this&amp;&amp;this.__generator||function(t,e){var n,o,i,a,r={label:0,sent:function(){if(1&amp;i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&amp;&amp;(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return c([t,e])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&amp;&amp;(i=2&amp;a[0]?o.return:a[0]?o.throw||((i=o.return)&amp;&amp;i.call(o),0):o.next)&amp;&amp;!(i=i.call(o,a[1])).done)return i;switch(o=0,i&amp;&amp;(a=[2&amp;a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(i=(i=r.trys).length&gt;0&amp;&amp;i[i.length-1])&amp;&amp;(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&amp;&amp;(!i||a[1]&gt;i[0]&amp;&amp;a[1]&lt;i[3])){r.label=a[1];break}if(6===a[0]&amp;&amp;r.label&lt;i[1]){r.label=i[1],i=a;break}if(i&amp;&amp;r.label&lt;i[2]){r.label=i[2],r.ops.push(a);break}i[2]&amp;&amp;r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(s){a=[6,s],o=0}finally{n=i=0}if(5&amp;a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(n,"__esModule",{value:!0});var c=t("./CocosHelper"),l=t("./HelperTools"),h=cc._decorator,u=h.ccclass,d=h.property,p=function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.DrawingTexture=null,e.nativeURL=[],e.CharacterObject=null,e.OriginalTextureSize=null,e}return i(e,t),e.prototype.onLoad=function(){this.CharacterObject=this.node.getComponent(dragonBones.ArmatureDisplay),this.OriginalTextureSize=c.getTextureSizeDragon(this.CharacterObject),c.PrintAllSlot(this.CharacterObject),this.DrawingTexture&amp;&amp;this.loadNativeURL(this.DrawingTexture),"DressUp"!=cc.director.getScene().name&amp;&amp;this.resetCharacter()},e.prototype.resetCharacter=function(){c.HideSlot(this.CharacterObject,"hair"),c.HideSlot(this.CharacterObject,"glasses"),c.HideSlot(this.CharacterObject,"shoes01"),c.HideSlot(this.CharacterObject,"leg01"),c.HideSlot(this.CharacterObject,"leg02"),c.HideSlot(this.CharacterObject,"leg03"),c.HideSlot(this.CharacterObject,"shoes02"),c.HideSlot(this.CharacterObject,"shoes03"),c.HideSlot(this.CharacterObject,"shoes04"),c.HideSlot(this.CharacterObject,"hat"),c.HideSlot(this.CharacterObject,"dress")},e.prototype.setTexture=function(t,e){return r(this,void 0,void 0,function(){var n,o;return s(this,function(i){switch(i.label){case 0:return null!=e?[3,2]:[4,l.Delay(.5)];case 1:return i.sent(),c.HideSlot(this.CharacterObject,t),[3,7];case 2:return null!=(n=c.default.getInstance().getTexture(e))?[3,5]:[4,c.default.getInstance().loadTexture(this.CharacterObject,this.OriginalTextureSize,this.getURLFromURL(e))];case 3:return i.sent(),[4,l.Delay(.5)];case 4:return i.sent(),o=c.default.getInstance().getTexture(e),this.CharacterObject.armature().getSlot(t)._displayData.texture.spriteFrame.setTexture(o),c.ShowSlot(this.CharacterObject,t),[3,7];case 5:return[4,l.Delay(.5)];case 6:i.sent(),this.CharacterObject.armature().getSlot(t)._displayData.texture.spriteFrame.setTexture(n),c.ShowSlot(this.CharacterObject,t),i.label=7;case 7:return[2]}})})},e.prototype.setTextureWithData=function(t,e){return r(this,void 0,void 0,function(){var n;return s(this,function(){return n=c.default.getInstance().UpdateTexture(this.CharacterObject,this.OriginalTextureSize,t,e),this.CharacterObject.armature().getSlot(t)._displayData.texture.spriteFrame.setTexture(n),c.ShowSlot(this.CharacterObject,t),[2]})})},e.prototype.start=function(){c.default.getInstance().LoadTextureAsync(this.CharacterObject,this.OriginalTextureSize,this.nativeURL)},e.prototype.loadTextureWithURL=function(t){var e=this;t.children.forEach(function(t){return r(e,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,c.default.getInstance().loadTexture(this.CharacterObject,this.OriginalTextureSize,this.getURLFromURL(this.getURL(t)))];case 1:return e.sent(),[2]}})})})},e.prototype.playanimation=function(t,e){this.CharacterObject.playAnimation(t,e)},e.prototype.loadNativeURL=function(t){var e=this;t.children.forEach(function(t){t.childrenCount&gt;0?e.loadNativeURL(t):t.getComponent(cc.Sprite)&amp;&amp;e.nativeURL.push({key:t.parent.name+t.name,slotname:t.parent.name,value:t.getComponent(cc.Sprite).spriteFrame.getTexture().nativeUrl})})},e.prototype.getURL=function(t){if(null==t)return null;for(var e=0;e&lt;this.nativeURL.length;e++)if(this.nativeURL[e].key==t.parent.name+t.name)return this.nativeURL[e].value;return null},e.prototype.getURLFromURL=function(t){for(var e=0;e&lt;this.nativeURL.length;e++)if(this.nativeURL[e].value==t)return this.nativeURL[e];return null},a([d(cc.Node)],e.prototype,"DrawingTexture",void 0),a([u],e)}(cc.Component);n.default=p,cc._RF.pop()},{"./CocosHelper":"CocosHelper","./HelperTools":"HelperTools"}],DrawingManager:[function(t,e,n){"use strict";cc._RF.push(e,"23ba8JpANtF+Lc+pQqAAVEi","DrawingManager");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r};Object.defineProperty(n,"__esModule",{value:!0}),n.DRAWING_TYPE=void 0;var r,s=t("./CanvasManager"),c=cc._decorator,l=c.ccclass;c.property,function(t){t[t.NONE=0]="NONE",t[t.DRAWING=1]="DRAWING",t[t.FILL=2]="FILL",t[t.STICKER=3]="STICKER"}(r=n.DRAWING_TYPE||(n.DRAWING_TYPE={}));var h=function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.TextureSize=cc.Size.ZERO,e.DrawingType=r.DRAWING,e.SelectedColorID=0,e.DrawNode=null,e.CanvasManagerObj=null,e}return i(e,t),e.prototype.initWithData=function(t){this.TextureSize=t.getContentSize(),this.DrawNode=t,this.CanvasManagerObj=new s.default,this.CanvasManagerObj.initWithData(t)},e.prototype.loadTextureFrame=function(t,e,n){this.CanvasManagerObj.LoadTexture(t,e,n)},e.prototype.resetTextureFrame=function(t){this.CanvasManagerObj.resetTexture(t)},e.prototype.clearAll=function(){this.CanvasManagerObj.clearAll()},e.prototype.setEraseOn=function(t){this.CanvasManagerObj.setEraseOn(t)},e.prototype.updateCanvas=function(t,e){this.CanvasManagerObj.UpdatePatternDrawing(t,e)},e.prototype.getPercentage=function(t){return this.CanvasManagerObj.getDrawingPercentage(t)},e.prototype.getImageData=function(){return this.CanvasManagerObj.getImageData()},a([l],e)}(cc.Component);n.default=h,cc._RF.pop()},{"./CanvasManager":"CanvasManager"}],FloodFill:[function(t,e,n){"use strict";cc._RF.push(e,"21697Hu31lOfrYox3z04ZVQ","FloodFill"),Object.defineProperty(n,"__esModule",{value:!0});var o=t("./colorUtils"),i=function(){function t(t,e){this.collectModifiedPixels=!1,this.modifiedPixelsCount=0,this.modifiedPixels=new Set,this.isEnabledPattern=!1,this._tolerance=0,this._queue=[],this.modifiedPixelsIndex=[],this.ColorMatrix=[],this.imageData=t,this.PatternimageData=e,this.isSameColor=o.isSameColor,this.setColorAtPixel=o.setColorAtPixel,this.getColorAtPixel=o.getColorAtPixel;for(var n=this.imageData,i=n.width,a=n.height,r=0;r&lt;i;r++){this.ColorMatrix[r]=[];for(var s=0;s&lt;a;s++)this.ColorMatrix[r][s]=!1}}return t.prototype.fill=function(t,e,n,o){if(this._newColor=t,this._replacedColor=this.getColorAtPixel(this.imageData,e,n),!(this._replacedColor.r&lt;1&amp;&amp;this._replacedColor.g&lt;1&amp;&amp;this._replacedColor.b&lt;1||(this._tolerance=o,this.modifiedPixelsCount=0,this.isSameColor(this._replacedColor,this._newColor,this._tolerance)))){for(var i=this.imageData,a=i.width,r=i.height,s=0;s&lt;a;s++){this.ColorMatrix[s]=[];for(var c=0;c&lt;r;c++)this.ColorMatrix[s][c]=!1}this.addToQueue([e,e,n,-1]),this.fillQueue(),this.modifiedPixelsCount=1}},t.prototype.isMatchedColor=function(t,e,n){return this._replacedColor=this.getColorAtPixel(this.imageData,e,n),!!this.isSameColor(this._replacedColor,t,this._tolerance)},t.prototype.addToQueue=function(t){this._queue.push(t)},t.prototype.popFromQueue=function(){return this._queue.length?this._queue.pop():null},t.prototype.isValidTarget=function(t){if(null!==t){var e=this.getColorAtPixel(this.imageData,t.x,t.y);return this.isSameColor(this._replacedColor,e,this._tolerance)}},t.prototype.fillLineAt=function(t,e){if(!this.isValidTarget({x:t,y:e}))return[-1,-1];this.setPixelColor(this._newColor,{x:t,y:e});for(var n=t,o=t,i=this.getPixelNeighbour("left",n,e);i&amp;&amp;this.isValidTarget(i);)this.setPixelColor(this._newColor,i),n=i.x,i=this.getPixelNeighbour("left",n,e);for(i=this.getPixelNeighbour("right",o,e);i&amp;&amp;this.isValidTarget(i);)this.setPixelColor(this._newColor,i),o=i.x,i=this.getPixelNeighbour("right",o,e);return[n,o]},t.prototype.fillQueue=function(){for(var t=this.popFromQueue();t;){for(var e=t[0],n=t[1],o=t[2],i=t[3],a=e;-1!==a&amp;&amp;a&lt;=n;){var r=this.fillLineAt(a,o),s=r[0],c=r[1];-1!==s&amp;&amp;(s&gt;=e&amp;&amp;c&lt;=n&amp;&amp;-1!==i?(i&lt;o&amp;&amp;o+1&lt;this.imageData.height&amp;&amp;this.addToQueue([s,c,o+1,o]),i&gt;o&amp;&amp;o&gt;0&amp;&amp;this.addToQueue([s,c,o-1,o])):(o&gt;0&amp;&amp;this.addToQueue([s,c,o-1,o]),o+1&lt;this.imageData.height&amp;&amp;this.addToQueue([s,c,o+1,o]))),-1===c&amp;&amp;a&lt;=n?a+=1:a=c+1}t=this.popFromQueue()}},t.prototype.setPixelColor=function(t,e){this.setColorAtPixel(this.imageData,t,e.x,e.y),this.ColorMatrix[e.x][e.y]=!0},t.prototype.getPixelNeighbour=function(t,e,n){var o;switch(e|=0,n|=0,t){case"right":o={x:e+1|0,y:n};break;case"left":o={x:e-1|0,y:n}}return o.x&gt;=0&amp;&amp;o.x&lt;this.imageData.width?o:null},t}();n.default=i,cc._RF.pop()},{"./colorUtils":"colorUtils"}],GlobalData:[function(t,e,n){"use strict";cc._RF.push(e,"7998d0FU05M7ZicmkTqWazx","GlobalData");var o=this&amp;&amp;this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,a){function r(t){try{c(o.next(t))}catch(e){a(e)}}function s(t){try{c(o.throw(t))}catch(e){a(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,s)}c((o=o.apply(t,e||[])).next())})},i=this&amp;&amp;this.__generator||function(t,e){var n,o,i,a,r={label:0,sent:function(){if(1&amp;i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&amp;&amp;(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return c([t,e])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&amp;&amp;(i=2&amp;a[0]?o.return:a[0]?o.throw||((i=o.return)&amp;&amp;i.call(o),0):o.next)&amp;&amp;!(i=i.call(o,a[1])).done)return i;switch(o=0,i&amp;&amp;(a=[2&amp;a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(i=(i=r.trys).length&gt;0&amp;&amp;i[i.length-1])&amp;&amp;(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&amp;&amp;(!i||a[1]&gt;i[0]&amp;&amp;a[1]&lt;i[3])){r.label=a[1];break}if(6===a[0]&amp;&amp;r.label&lt;i[1]){r.label=i[1],i=a;break}if(i&amp;&amp;r.label&lt;i[2]){r.label=i[2],r.ops.push(a);break}i[2]&amp;&amp;r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(s){a=[6,s],o=0}finally{n=i=0}if(5&amp;a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};function a(t,e){for(var o=0;o&lt;n.GlobalData.data.flags.StickerPath.length;o++)if(n.GlobalData.data.flags.StickerPath[o].nativeurl==t){n.GlobalData.data.flags.StickerPath[o].img=e;break}}function r(t){return new Promise(function(e){var n=new Image;n.onload=function(){e(n)},n.src=t})}Object.defineProperty(n,"__esModule",{value:!0}),n.LoadImage=n.LoadTextures=n.getImageElement=n.checkStickerExist=n.UpdateSticker=n.LoadSticker=n.GlobalData=void 0,n.GlobalData={data:{flags:{StickerPath:[],PatternData:[],TextureData:[],PlayArea:[]},relatedThumbNo:0}},n.LoadSticker=function(t,e){return o(this,void 0,void 0,function(){var n;return i(this,function(o){switch(o.label){case 0:return null==t?[3,2]:this.checkStickerExist(t,e)?[2]:[4,r(t)];case 1:n=o.sent(),a(t,n),o.label=2;case 2:return[2]}})})},n.UpdateSticker=a,n.checkStickerExist=function(t){for(var e=0;e&lt;n.GlobalData.data.flags.StickerPath.length;e++)if(null!=n.GlobalData.data.flags.StickerPath[e].img&amp;&amp;n.GlobalData.data.flags.StickerPath[e].nativeurl==t)return n.GlobalData.data.flags.StickerPath[e].img,!0;return!1},n.getImageElement=function(t){for(var e=0;e&lt;n.GlobalData.data.flags.StickerPath.length;e++)if(null!=n.GlobalData.data.flags.StickerPath[e].img&amp;&amp;n.GlobalData.data.flags.StickerPath[e].nativeurl==t)return n.GlobalData.data.flags.StickerPath[e].img;for(e=0;e&lt;n.GlobalData.data.flags.TextureData.length;e++)if(null!=n.GlobalData.data.flags.TextureData[e].img&amp;&amp;n.GlobalData.data.flags.TextureData[e].nativeurl==t)return n.GlobalData.data.flags.TextureData[e].img;return null},n.LoadTextures=function(t){return o(this,void 0,void 0,function(){var e,o;return i(this,function(i){switch(i.label){case 0:for(e=0;e&lt;t.length;e++)n.GlobalData.data.flags.TextureData.push({name:t[e].name,nativeurl:t[e].getComponent(cc.Sprite).spriteFrame.getTexture().nativeUrl,img:null});e=0,i.label=1;case 1:return e&lt;t.length?[4,r(n.GlobalData.data.flags.TextureData[e].nativeurl)]:[3,4];case 2:o=i.sent(),n.GlobalData.data.flags.TextureData[e].img=o,i.label=3;case 3:return e++,[3,1];case 4:return[2]}})})},n.LoadImage=r,cc._RF.pop()},{}],HairColorPicker:[function(t,e,n){"use strict";cc._RF.push(e,"ff27ejV9aREo7ZMkuwKN9Or","HairColorPicker");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r};Object.defineProperty(n,"__esModule",{value:!0});var r=cc._decorator,s=r.ccclass,c=r.property,l=function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.wheel=null,e.event=null,e.ang=0,e.angStart=0,e.isStart=!1,e.canvasSize=cc.size(800,504),e.offset=null,e.angXY=function(t){var n=e.wheel.getContentSize();t=cc.v2(t.x+e.canvasSize.width/2,t.y+e.canvasSize.height/2);var o=n.width/2,i=t.y+e.offset.y-e.node.getBoundingBoxToWorld().yMax+.7*o,a=t.x-e.offset.x-e.node.getBoundingBoxToWorld().xMin+.7*o,r=Math.atan2(i,a);return a&lt;=10&amp;&amp;a&gt;=-10&amp;&amp;i&gt;=-10&amp;&amp;i&lt;=10?null:r},e}return i(e,t),e.prototype.onLoad=function(){},e.prototype.start=function(){this.node.on(cc.Node.EventType.TOUCH_START,this.touchStart,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this.touchMove,this),this.node.on(cc.Node.EventType.TOUCH_END,this.touchEnd,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this.touchEnd,this)},e.prototype.touchStart=function(t){this.offset=cc.v2(this.node.position);var e=cc.find("Canvas").convertToNodeSpaceAR(t.getLocation());this.isStart=!0,this.angStart=this.angXY(e)-this.ang},e.prototype.touchMove=function(t){var e=cc.find("Canvas").convertToNodeSpaceAR(t.getLocation());if(this.isStart){var n=this.angXY(e);n&amp;&amp;(this.ang=n-this.angStart,this.wheel.angle=this.get360Angle(cc.misc.radiansToDegrees(this.ang)))}},e.prototype.touchEnd=function(){this.isStart=!1;var t=Math.floor(this.get360Angle(cc.misc.radiansToDegrees(this.ang))),e=t%30;this.wheel.angle=e&lt;15?t-e:t+(30-e),this.UpdateBrush()},e.prototype.get360Angle=function(t){return this.to_positive_angle(t)},e.prototype.to_positive_angle=function(t){for(t%=360;t&lt;0;)t+=360;return t},e.prototype.UpdateBrush=function(){var t=Math.abs(this.wheel.angle);this.event&amp;&amp;this.event.emit([t])},a([c(cc.Node)],e.prototype,"wheel",void 0),a([c(cc.Component.EventHandler)],e.prototype,"event",void 0),a([s],e)}(cc.Component);n.default=l,cc._RF.pop()},{}],HelperTools:[function(t,e,n){"use strict";cc._RF.push(e,"13812UirHdE9JGkYgNum3bN","HelperTools");var o=this&amp;&amp;this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,a){function r(t){try{c(o.next(t))}catch(e){a(e)}}function s(t){try{c(o.throw(t))}catch(e){a(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,s)}c((o=o.apply(t,e||[])).next())})},i=this&amp;&amp;this.__generator||function(t,e){var n,o,i,a,r={label:0,sent:function(){if(1&amp;i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&amp;&amp;(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return c([t,e])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&amp;&amp;(i=2&amp;a[0]?o.return:a[0]?o.throw||((i=o.return)&amp;&amp;i.call(o),0):o.next)&amp;&amp;!(i=i.call(o,a[1])).done)return i;switch(o=0,i&amp;&amp;(a=[2&amp;a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(i=(i=r.trys).length&gt;0&amp;&amp;i[i.length-1])&amp;&amp;(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&amp;&amp;(!i||a[1]&gt;i[0]&amp;&amp;a[1]&lt;i[3])){r.label=a[1];break}if(6===a[0]&amp;&amp;r.label&lt;i[1]){r.label=i[1],i=a;break}if(i&amp;&amp;r.label&lt;i[2]){r.label=i[2],r.ops.push(a);break}i[2]&amp;&amp;r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(s){a=[6,s],o=0}finally{n=i=0}if(5&amp;a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(n,"__esModule",{value:!0}),n.preloadScene=n.addAnimation=n.setAnimation=n.ScalePopEffect=n.stopParticle=n.resetParticle=n.EnableSpriteComponent=n.DisableSpriteComponent=n.getWorldPosition=n.Jumpto=n.capturePhoto=n.rgbToHex=n.hexToRgb=n.ManageButton=n.addButtonEvent=n.setTexture=n.ScrollAction=n.distanceBetween2Points=n.animateProgressTo=n.NumberArray=n.RegisterDeviceFullScreen=n.RequestDeviceFullScreen=n.GetURLParameter=n.StringFormat=n.UItools=n.RoundDown=n.RoundUp=n.BeautifyNumber=n.Pad=n.Shuffle=n.SkippableDelay=n.DelayForAd=n.Delay=n.AsyncTask=n.GetRandomFloat=n.GetRandomInterger=void 0;var a=t("../Promotion/AdManager"),r=t("./AudioManager");function s(t){return void 0===t&amp;&amp;(t=1),o(this,void 0,void 0,function(){return i(this,function(){return[2,new Promise(function(e){setTimeout(function(){e()},1e3*t)})]})})}function c(){cc.view.enableAutoFullScreen(!0)}function l(t){var e=t.toString(16);return 1==e.length?"0"+e:e}n.GetRandomInterger=function(t,e){return Math.floor(Math.random()*(e-t+1))+t},n.GetRandomFloat=function(t,e){return Math.random()*(e-t)+t},n.AsyncTask=function(t){return o(this,void 0,void 0,function(){return i(this,function(){return[2,new Promise(function(e){t(e)})]})})},n.Delay=s,n.DelayForAd=function(t){return void 0===t&amp;&amp;(t=1),o(this,void 0,void 0,function(){var e,n=this;return i(this,function(){return e=!1,cc.tween(cc.director.getScene()).delay(t).call(function(){e=!0}).start(),[2,new Promise(function(r){setTimeout(function(){return o(n,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return a.default.getInstance().isAdRunningOrNot()||a.default.getInstance().isSwitchTab||0==e?[4,s(1)]:[3,2];case 1:return t.sent(),[3,0];case 2:return r(),[2]}})})},1e3*t)})]})})},n.SkippableDelay=function(t,e){return void 0===t&amp;&amp;(t=1),o(this,void 0,void 0,function(){var n=this;return i(this,function(){return t&lt;=0?[2]:[2,new Promise(function(r){setTimeout(function(){return o(n,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return a.default.getInstance().isAdRunningOrNot()||a.default.getInstance().isSwitchTab?[4,s(1)]:[3,2];case 1:return t.sent(),[3,0];case 2:return r(),[2]}})})},1e3*t),e&amp;&amp;cc.game.on(e,function(){r()})})]})})},n.Shuffle=function(t){if(null==t)return t;for(var e,n,o=t.length;0!==o;)n=Math.floor(Math.random()*o),e=t[o-=1],t[o]=t[n],t[n]=e;return t},n.Pad=function(t,e){var n="000000000"+t;return n.substr(n.length-e)},n.BeautifyNumber=function(t,e){return 0===t?t.toFixed(e):Number.isInteger(t)?t.toFixed(0):e?t.toFixed(e):t.toString()},n.RoundUp=function(t,e){void 0===e&amp;&amp;(e=2);var n=Math.pow(10,e);return Math.ceil(t*n)/n},n.RoundDown=function(t,e){void 0===e&amp;&amp;(e=2);var n=Math.pow(10,e);return Math.floor(t*n)/n},n.UItools={ChangeButtonSpriteFrame:function(t,e,n){t.normalSprite=e.getSpriteFrame(n.normalSprite),t.pressedSprite=e.getSpriteFrame(n.pressedSprite),t.hoverSprite=e.getSpriteFrame(n.hoverSprite),t.disabledSprite=e.getSpriteFrame(n.disabledSprite)}},n.StringFormat=function(t){for(var e=[],n=1;n&lt;arguments.length;n++)e[n-1]=arguments[n];return t.replace(/{(\d+)}/g,function(t,n){return e[n]||""})},n.GetURLParameter=function(t){var e,n,o=new RegExp("[?|&amp;]"+t+"=([^&amp;;]+?)(&amp;|#|;|$)").exec(location.search);return o&amp;&amp;(e=(o||[,""])[1].replace(/\+/g,"%20"),n=decodeURIComponent(e)),n||null},n.RequestDeviceFullScreen=c,n.RegisterDeviceFullScreen=function(){cc.sys.isMobile&amp;&amp;document.getElementById("GameCanvas").addEventListener("touchend",function(){c()},!1)},n.NumberArray=function(t,e,n,o){var i,a=[],r=!1;if((n||o)&amp;&amp;(r=!0,n||(n=""),o||(o="")),e&lt;t)for(i=t;i&gt;=e;i--)r?a.push(n+i.toString()+o):a.push(i);else for(i=t;i&lt;=e;i++)r?a.push(n+i.toString()+o):a.push(i);return a},n.animateProgressTo=function(t,e,n){void 0===n&amp;&amp;(n=1);var o=0;cc.tween(t).to(n,{fillRange:e},{progress:function(e,n,i,a){return o=cc.misc.lerp(e,n,a),t.fillRange=o,o}}).start()},n.distanceBetween2Points=function(t,e){var n=e.x-t.x,o=e.y-t.y;return Math.sqrt(Math.pow(n,2)+Math.pow(o,2))},n.ScrollAction=function(t){t.scrollToBottom(0,!1),cc.tween(t).delay(.2).call(function(){t.scrollToTop(2,!1)}).start()},n.setTexture=function(t,e){t.getComponent(cc.Sprite).spriteFrame=e.getComponent(cc.Sprite).spriteFrame},n.addButtonEvent=function(t,e,n,o,i,a){void 0===i&amp;&amp;(i=!0),void 0===a&amp;&amp;(a=cc.Button.Transition.SCALE),t.addComponent(cc.Button);var r=new cc.Component.EventHandler;r.target=e,r.component=n,r.handler=o,r.customEventData="";var s=t.getComponent(cc.Button);s.clickEvents.push(r),s.transition=a,s.enableAutoGrayEffect=i},n.ManageButton=function(t){t.parent.children.forEach(function(t){t.getComponent(cc.Button).interactable=!0}),t.getComponent(cc.Button).interactable=!1},n.hexToRgb=function(t){var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return cc.color(parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16))},n.rgbToHex=function(t,e,n){return"#"+l(t)+l(e)+l(n)},n.capturePhoto=function(t){var e=new cc.Node;e.parent=cc.director.getScene();var n=e.addComponent(cc.Camera);e.position=new cc.Vec3(400,252,0),n.cullingMask=4294967295;var o=new cc.RenderTexture;o.initWithSize(800,504,cc.RenderTexture.DepthStencilFormat.RB_FMT_S8),n.targetTexture=o,n.render();var i=o.readPixels(),a=document.createElement("canvas"),r=a.getContext("2d"),s=a.width=o.width,c=a.height=o.height;a.width=o.width,a.height=o.height;for(var l=4*s,h=0;h&lt;c;h++){for(var u=c-1-h,d=r.createImageData(s,1),p=u*s*4,f=0;f&lt;l;f++)d.data[f]=i[p+f];r.putImageData(d,0,h)}r.getImageData(0,0,800,504);var g=a.toDataURL("image/png"),v=document.createElement("img");v.src=g,v.onload=function(){r.clearRect(0,0,800,504),r.drawImage(v,0,0);var e=new cc.Texture2D,n=new cc.SpriteFrame;e.initWithData(r.getImageData(0,0,800,504),cc.Texture2D.PixelFormat.RGBA8888,800,504),n.setTexture(e),t.getComponent(cc.Sprite).spriteFrame=n}},n.Jumpto=function(t,e,n,o){void 0===o&amp;&amp;(o=.3),cc.Tween.stopAllByTarget(t),t.stopAllActions(),t.runAction(cc.jumpTo(o,cc.v2(n),200,.5))},n.getWorldPosition=function(t){return t?t.parent.convertToWorldSpaceAR(t.position):cc.Vec3.ZERO},n.DisableSpriteComponent=function(t){t&amp;&amp;t.getComponent(cc.Sprite)&amp;&amp;(t.getComponent(cc.Sprite).enabled=!1)},n.EnableSpriteComponent=function(t){t&amp;&amp;t.getComponent(cc.Sprite)&amp;&amp;(t.getComponent(cc.Sprite).enabled=!0)},n.resetParticle=function(t){t&amp;&amp;t.getComponent(cc.ParticleSystem)&amp;&amp;(t.active=!0,t.getComponent(cc.ParticleSystem).resetSystem())},n.stopParticle=function(t){t&amp;&amp;t.getComponent(cc.ParticleSystem)&amp;&amp;t.getComponent(cc.ParticleSystem).stopSystem()},n.ScalePopEffect=function(t,e){t.active=!0,t.scale=0,cc.tween(t).delay(e).call(function(){r.default.getInstance().play("17901001")}).to(.2,{scale:1},{easing:cc.easing.bounceOut}).start()},n.setAnimation=function(t,e,n){void 0===n&amp;&amp;(n=!0),t&amp;&amp;t.getComponent(sp.Skeleton)&amp;&amp;t.getComponent(sp.Skeleton).setAnimation(0,e,n)},n.addAnimation=function(t,e,n){void 0===n&amp;&amp;(n=!0),t&amp;&amp;t.getComponent(sp.Skeleton)&amp;&amp;t.getComponent(sp.Skeleton).addAnimation(0,e,n)},n.preloadScene=function t(e){var n=e,o=n.shift();cc.director.preloadScene(o,function(){console.log("Next scene preloaded",o),n.length&gt;0?t(n):console.log("loaded all")})},cc._RF.pop()},{"../Promotion/AdManager":"AdManager","./AudioManager":"AudioManager"}],MainScene:[function(t,e,n){"use strict";cc._RF.push(e,"8cad0L3GmlHCo0VFO4CHdRa","MainScene");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r},r=this&amp;&amp;this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,a){function r(t){try{c(o.next(t))}catch(e){a(e)}}function s(t){try{c(o.throw(t))}catch(e){a(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,s)}c((o=o.apply(t,e||[])).next())})},s=this&amp;&amp;this.__generator||function(t,e){var n,o,i,a,r={label:0,sent:function(){if(1&amp;i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&amp;&amp;(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return c([t,e])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&amp;&amp;(i=2&amp;a[0]?o.return:a[0]?o.throw||((i=o.return)&amp;&amp;i.call(o),0):o.next)&amp;&amp;!(i=i.call(o,a[1])).done)return i;switch(o=0,i&amp;&amp;(a=[2&amp;a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(i=(i=r.trys).length&gt;0&amp;&amp;i[i.length-1])&amp;&amp;(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&amp;&amp;(!i||a[1]&gt;i[0]&amp;&amp;a[1]&lt;i[3])){r.label=a[1];break}if(6===a[0]&amp;&amp;r.label&lt;i[1]){r.label=i[1],i=a;break}if(i&amp;&amp;r.label&lt;i[2]){r.label=i[2],r.ops.push(a);break}i[2]&amp;&amp;r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(s){a=[6,s],o=0}finally{n=i=0}if(5&amp;a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(n,"__esModule",{value:!0});var c=t("../../../Script/Helper/AudioManager"),l=t("../../../Script/Helper/CocosHelper"),h=t("../../../Script/Helper/HelperTools"),u=t("../../../Script/Promotion/AdManager"),d=cc._decorator,p=d.ccclass,f=(d.property,function(t){function e(){return null!==t&amp;&amp;t.apply(this,arguments)||this}return i(e,t),e.prototype.onLoad=function(){cc.debug.setDisplayStats(!1),l.default.getInstance(),c.default.getInstance(),c.default.getInstance().add("bgm",cc.find("Canvas/SafeArea/Music").getComponent(cc.AudioSource).clip)},e.prototype.start=function(){h.preloadScene(["PlayArea"]),c.default.getInstance().playMusic("bgm",!0)},e.prototype.PlayBtnClick=function(t){return r(this,void 0,void 0,function(){var e;return s(this,function(n){switch(n.label){case 0:return e=t.target,c.default.getInstance().play("click"),e.getComponent(cc.Button).interactable=!1,u.default.getInstance().requestAds(),[4,h.Delay(.3)];case 1:return n.sent(),cc.director.loadScene("PlayArea"),[2]}})})},e.prototype.SoundOnClick=function(){c.default.getInstance().play("click"),cc.audioEngine.setEffectsVolume(0),cc.audioEngine.setMusicVolume(0),cc.find("SafeArea/SoundOn",this.node).active=!1,cc.find("SafeArea/SoundOff",this.node).active=!0},e.prototype.SoundOffClick=function(){cc.audioEngine.setEffectsVolume(1),cc.audioEngine.setMusicVolume(1),cc.find("SafeArea/SoundOff",this.node).active=!1,cc.find("SafeArea/SoundOn",this.node).active=!0},a([p],e)}(cc.Component));n.default=f,cc._RF.pop()},{"../../../Script/Helper/AudioManager":"AudioManager","../../../Script/Helper/CocosHelper":"CocosHelper","../../../Script/Helper/HelperTools":"HelperTools","../../../Script/Promotion/AdManager":"AdManager"}],NodeMover:[function(t,e,n){"use strict";cc._RF.push(e,"ecc95VSO2VMV5OJnFIvVxzD","NodeMover");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r};Object.defineProperty(n,"__esModule",{value:!0});var r=t("./AudioManager"),s=cc._decorator,c=s.ccclass,l=s.property,h=function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.intersect=null,e.progress=null,e}var n;return i(e,t),n=e,e.prototype.onLoad=function(){},e.prototype.start=function(){},e.prototype.RegisterEvents=function(){var t=this;this.node.on(cc.Node.EventType.TOUCH_START,function(){r.default.getInstance().play("sfx26009004");var t=cc.find("Canvas/SafeArea/Page4/Page1/Tab/finger_1");t&amp;&amp;(t.active=!1)},this),this.node.on(cc.Node.EventType.TOUCH_MOVE,function(e){var n=e.getLocation();n.x&lt;514&amp;&amp;n.x&gt;284&amp;&amp;(t.node.position=cc.v3(t.node.parent.convertToNodeSpaceAR(e.getLocation()).x,t.node.position.y)),n.y&lt;229&amp;&amp;n.y&gt;130&amp;&amp;(t.node.position=cc.v3(t.node.position.x,t.node.parent.convertToNodeSpaceAR(e.getLocation()).y)),t.node.children[0].opacity&lt;255?(t.node.children[0].opacity+=1,t.progress.fillRange=t.node.children[0].opacity/255):t.deRegisterEvents()},this)},e.prototype.deRegisterEvents=function(){cc.tween(this.progress.node.parent).by(.5,{position:cc.v3(0,400)},{easing:cc.easing.backIn}).start(),cc.game.emit("PhotoWaterCleaningDone"),this.node.removeComponent(n)},a([l(cc.Node)],e.prototype,"intersect",void 0),a([l(cc.Sprite)],e.prototype,"progress",void 0),n=a([c],e)}(cc.Component);n.default=h,cc._RF.pop()},{"./AudioManager":"AudioManager"}],Page1:[function(t,e,n){"use strict";cc._RF.push(e,"cef44Rzlo1H5LRPaObAde46","Page1");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r},r=this&amp;&amp;this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,a){function r(t){try{c(o.next(t))}catch(e){a(e)}}function s(t){try{c(o.throw(t))}catch(e){a(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,s)}c((o=o.apply(t,e||[])).next())})},s=this&amp;&amp;this.__generator||function(t,e){var n,o,i,a,r={label:0,sent:function(){if(1&amp;i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&amp;&amp;(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return c([t,e])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&amp;&amp;(i=2&amp;a[0]?o.return:a[0]?o.throw||((i=o.return)&amp;&amp;i.call(o),0):o.next)&amp;&amp;!(i=i.call(o,a[1])).done)return i;switch(o=0,i&amp;&amp;(a=[2&amp;a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(i=(i=r.trys).length&gt;0&amp;&amp;i[i.length-1])&amp;&amp;(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&amp;&amp;(!i||a[1]&gt;i[0]&amp;&amp;a[1]&lt;i[3])){r.label=a[1];break}if(6===a[0]&amp;&amp;r.label&lt;i[1]){r.label=i[1],i=a;break}if(i&amp;&amp;r.label&lt;i[2]){r.label=i[2],r.ops.push(a);break}i[2]&amp;&amp;r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(s){a=[6,s],o=0}finally{n=i=0}if(5&amp;a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(n,"__esModule",{value:!0});var c=t("../../../Script/Helper/AudioManager"),l=t("../../../Script/Helper/HelperTools"),h=t("../../../Script/Promotion/AdManager"),u=cc._decorator,d=u.ccclass,p=u.property,f=function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.PanelItems=null,e.ClickItems=null,e.SetItems=null,e.Loader=null,e.SelectedNode=null,e.SetNode1=null,e.Pos1=null,e.Pos2=null,e.Camera=null,e.page1=null,e.page2=null,e.Frame=null,e.Default=null,e.Colortoll=null,e.HairSprite1=null,e.Nname=null,e.Body=null,e.IstoolDone=[],e}return i(e,t),e.prototype.onLoad=function(){var t=this;cc.debug.setDisplayStats(!1),this.PanelItems.children.forEach(function(e){"1"==e.name?l.addButtonEvent(e,t.node,"Page1","MainPanelClick2",!1,NaN):l.addButtonEvent(e,t.node,"Page1","MainPanelClick1",!1,NaN)}),this.ClickItems.children.forEach(function(e){e.children.forEach(function(e){"1"==e.parent.name?l.addButtonEvent(e,t.node,"Page1","SubPanelClick2",!1,NaN):l.addButtonEvent(e,t.node,"Page1","SubPanelClick1",!1,NaN)})})},e.prototype.start=function(){for(var t=0;t&lt;=27;t++)this.IstoolDone[t]=!1;this.SelectedNode=this.PanelItems.getChildByName("1"),this.Camera=cc.find("SafeArea/Camera",this.node),this.page1=cc.find("Page1"),this.Body=this.SetItems.getChildByName("Body"),this.SetNode1=this.SetItems.getChildByName("1").getChildByName("0")},e.prototype.MainPanelClick1=function(t){var e=this,n=t.target;this.SelectedNode=n,c.default.getInstance().play("click"),n.parent.children.forEach(function(t){t.getChildByName("Select").active=!1}),this.ClickItems.children.forEach(function(t){t.active=!1,"Set"==t.name&amp;&amp;(t.active=!0)}),n.getChildByName("Select").active=!0;for(var o=0;o&lt;this.ClickItems.getChildByName("Set").children.length;o++){var i=this.ClickItems.getChildByName("Set").children[o];i.active=!1,i.getChildByName("0")&amp;&amp;this.Loader.getChildByName(n.name).getChildByName("0")?n.name&amp;&amp;(i.getChildByName("0").getComponent(cc.Sprite).spriteFrame=this.Loader.getChildByName(n.name).getChildByName(i.name).getComponent(cc.Sprite).spriteFrame,i.active=!0):i.getChildByName("0")||this.Loader.getChildByName(n.name).getChildByName(i.name)&amp;&amp;(i.getChildByName(i.name).getComponent(cc.Sprite).spriteFrame=this.Loader.getChildByName(n.name).getChildByName(i.name).getComponent(cc.Sprite).spriteFrame,i.active=!0)}if(this.Loader.getChildByName(n.name).getChildByName("0")){var a=!1;this.SetItems.getChildByName(this.SelectedNode.name).children.forEach(function(t){1==t.active?(cc.find("Set/0",e.ClickItems).getChildByName("Selected").active=!1,cc.find("Set/"+t.name,e.ClickItems).getChildByName("Selected").active=!0,a=!0):cc.find("Set/"+t.name,e.ClickItems).getChildByName("Selected").active=!1}),0==a&amp;&amp;(cc.find("Set/0",this.ClickItems).getChildByName("Selected").active=!0),this.AddNodeActive(0)}},e.prototype.SubPanelClick1=function(t){return r(this,void 0,void 0,function(){var e,n;return s(this,function(o){switch(o.label){case 0:return e=t.target,c.default.getInstance().play("gachaRare"),e.getChildByName("Ads")?[4,h.default.getInstance().requestRewardAds(e.getChildByName("Ads"))]:[3,2];case 1:if(!(n=o.sent()))return[2];n&amp;&amp;e.parent.children[9].active&amp;&amp;cc.find("SafeArea/Loader/"+this.SelectedNode.name+"/"+e.name,this.node).getChildByName("Ads")&amp;&amp;cc.find("SafeArea/Loader/"+this.SelectedNode.name+"/"+e.name,this.node).getChildByName("Ads").removeFromParent(),o.label=2;case 2:return this.SetNode1=e,e.parent.children.forEach(function(t){t.getChildByName("Selected").active=!1}),e.getChildByName("Selected").active=!0,this.BackGroundFalseAction(),this.SetItems.getChildByName(this.SelectedNode.name).children.forEach(function(t){t.active=!1}),"13"!=this.SelectedNode.name&amp;&amp;"19"!=this.SelectedNode.name&amp;&amp;"24"!=this.SelectedNode.name||this.SetItems.getChildByName(this.SelectedNode.name+"A").children.forEach(function(t){t.active=!1}),"0"==e.name&amp;&amp;e.parent.children[9].active?this.SetItems.getChildByName(this.SelectedNode.name).getChildByName(e.name)&amp;&amp;(this.SetItems.getChildByName(this.SelectedNode.name).getChildByName(e.name).active=!0):e.parent.children[9].active&amp;&amp;(this.SetItems.getChildByName(this.SelectedNode.name).getChildByName(e.name)&amp;&amp;(this.SetItems.getChildByName(this.SelectedNode.name).getChildByName(e.name).active=!0),"13"!=this.SelectedNode.name&amp;&amp;"19"!=this.SelectedNode.name&amp;&amp;"24"!=this.SelectedNode.name||this.SetItems.getChildByName(this.SelectedNode.name+"A").getChildByName(e.name)&amp;&amp;(this.SetItems.getChildByName(this.SelectedNode.name+"A").getChildByName(e.name).active=!0)),this.IstoolDone[Number(this.SelectedNode.name)-1]=!0,this.ToolDoneAction(),[2]}})})},e.prototype.MainPanelClick2=function(t){var e=t.target;c.default.getInstance().play("click"),e.parent.children.forEach(function(t){t.getChildByName("Select").active=!1}),e.getChildByName("Select").active=!0,this.ClickItems.children.forEach(function(t){t.active=!1}),this.ClickItems.getChildByName(e.name).active=!0},e.prototype.SubPanelClick2=function(t){var e=t.target;c.default.getInstance().play("gachaRare"),e.parent.children.forEach(function(t){t.getChildByName("Selected").active=!1}),e.getChildByName("Selected").active=!0;var n=this.SetItems.getChildByName("1");if("1"==e.parent.name)switch(this.IstoolDone[Number(this.SelectedNode.name)-1]=!0,e.name){case"0":this.DefaultColor(),n.color=cc.color(255,255,255,255),this.Body.color=cc.color(255,255,255,255),this.HandColor(255,255,255,255);break;case"1":this.DefaultColor(),n.color=cc.color(255,240,235,255),this.Body.color=cc.color(255,240,235,255),this.HandColor(255,240,235,255);break;case"2":this.DefaultColor(),n.color=cc.color(250,234,223,255),this.Body.color=cc.color(250,234,223,255),this.HandColor(250,234,223,255);break;case"3":this.DefaultColor(),n.color=cc.color(245,219,204,255),this.Body.color=cc.color(245,219,204,255),this.HandColor(245,219,204,255);break;case"4":this.DefaultColor(),n.color=cc.color(218,183,164,255),this.Body.color=cc.color(218,183,164,255),this.HandColor(218,183,164,255);break;case"5":this.DefaultColor(),n.color=cc.color(164,154,147,255),this.Body.color=cc.color(164,154,147,255),this.HandColor(164,154,147,255);break;case"6":this.DefaultColor(),n.color=cc.color(192,212,248,255),this.Body.color=cc.color(192,212,248,255),this.HandColor(192,212,248,255)}},e.prototype.CameraClickAction=function(t){var e=t.target;c.default.getInstance().play("gacha"),e.getComponent(cc.Button).interactable=!1,cc.tween(this.node).delay(1).call(function(){e.getComponent(cc.Button).interactable=!0}).start(),e.scale=.5,cc.Tween.stopAllByTarget(this.Camera),this.node.active=!1,this.node.parent.getChildByName("Page2").active=!0;var n=cc.find("Canvas/SafeArea/Page2/SafeArea/Frame");this.SetItems.parent=n},e.prototype.Effect1ClickAction=function(){var t=this.SetItems.parent;c.default.getInstance().play("gacha");var e=cc.find("Canvas/SafeArea/Page2/SafeArea/Frame");1==t.scaleX?(t.scaleX=-1,e.scaleX=-1):-1==t.scaleX&amp;&amp;(t.scaleX=1,e.scaleX=1)},e.prototype.RemoveClickAction=function(){this.node.getChildByName("SafeArea").getChildByName("Popup").active=!0,c.default.getInstance().play("gacha")},e.prototype.RemoveDoneAction=function(){this.SetItems.children.forEach(function(t){t.children.forEach(function(t){"0"==t.name?t.active=!0:t.active=!1})}),this.ClickItems.children.forEach(function(t){t.children.forEach(function(t){"0"==t.name?t.getChildByName("Selected").active=!0:t.getChildByName("Selected").active=!1})}),this.SetItems.getChildByName("1").color=cc.color(255,255,255,255),this.SetItems.getChildByName("Body").color=cc.color(255,255,255,255),this.node.getChildByName("SafeArea").getChildByName("Popup").active=!1,this.DefaultColor()},e.prototype.RemoveCloseAction=function(){this.node.getChildByName("SafeArea").getChildByName("Popup").active=!1},e.prototype.DefaultColor=function(){this.SetItems.getChildByName("1").color=cc.color(255,255,255,255),this.Body.color=cc.color(255,255,255,255),this.SetItems.getChildByName("21").children.forEach(function(t){t.color=cc.color(255,255,255,255)}),this.SetItems.getChildByName("22").children.forEach(function(t){t.color=cc.color(255,255,255,255)})},e.prototype.ToolDoneAction=function(){var t=this,e=0;this.IstoolDone.forEach(function(n){1==n&amp;&amp;20==++e&amp;&amp;(t.CameraAction(),t.Camera.active=!0)})},e.prototype.CameraAction=function(){cc.tween(this.Camera).repeatForever(cc.tween(this.Camera).to(.3,{scale:1.2}).to(.3,{scale:1}).to(.3,{scale:1.2}).to(.3,{scale:1}).start()).start()},e.prototype.AddNodeActive=function(t){var e=this,n=cc.find("SafeArea/Ads",this.node);this.AddelementFalse(),this.SelectedNode&amp;&amp;0==t&amp;&amp;cc.find("SafeArea/Loader/"+this.SelectedNode.name,this.node).children.forEach(function(t){if(t.getChildByName("Ads")){var o=cc.find("SafeArea/PanelArea/SelectedItems/Set",e.node).getChildByName(t.name),i=cc.instantiate(n);i.setPosition(22,-26,0),o.addChild(i)}})},e.prototype.AddelementFalse=function(){cc.find("SafeArea/PanelArea/SelectedItems/Set",this.node).children.forEach(function(t){t.getChildByName("Ads")&amp;&amp;t.getChildByName("Ads").removeFromParent()})},e.prototype.BackGroundFalseAction=function(){var t=this.SelectedNode.name;if("25"==t||"26"==t||"27"==t)for(var e=25;e&lt;=27;e++)this.SetItems.getChildByName(e.toString()).children.forEach(function(t){t.active=!1})},e.prototype.HandColor=function(t,e,n,o){this.SetItems.getChildByName("21").children.forEach(function(i){"3"!=i.name&amp;&amp;"7"!=i.name&amp;&amp;(i.color=cc.color(t,e,n,o))}),this.SetItems.getChildByName("22").children.forEach(function(i){"3"!=i.name&amp;&amp;"9"!=i.name&amp;&amp;(i.color=cc.color(t,e,n,o))})},a([p(cc.Node)],e.prototype,"PanelItems",void 0),a([p(cc.Node)],e.prototype,"ClickItems",void 0),a([p(cc.Node)],e.prototype,"SetItems",void 0),a([p(cc.Node)],e.prototype,"Loader",void 0),a([d],e)}(cc.Component);n.default=f,cc._RF.pop()},{"../../../Script/Helper/AudioManager":"AudioManager","../../../Script/Helper/HelperTools":"HelperTools","../../../Script/Promotion/AdManager":"AdManager"}],Page2:[function(t,e,n){"use strict";cc._RF.push(e,"37dfeekzyZDHKGPGqc3p55c","Page2");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r},r=this&amp;&amp;this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,a){function r(t){try{c(o.next(t))}catch(e){a(e)}}function s(t){try{c(o.throw(t))}catch(e){a(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,s)}c((o=o.apply(t,e||[])).next())})},s=this&amp;&amp;this.__generator||function(t,e){var n,o,i,a,r={label:0,sent:function(){if(1&amp;i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&amp;&amp;(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return c([t,e])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&amp;&amp;(i=2&amp;a[0]?o.return:a[0]?o.throw||((i=o.return)&amp;&amp;i.call(o),0):o.next)&amp;&amp;!(i=i.call(o,a[1])).done)return i;switch(o=0,i&amp;&amp;(a=[2&amp;a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(i=(i=r.trys).length&gt;0&amp;&amp;i[i.length-1])&amp;&amp;(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&amp;&amp;(!i||a[1]&gt;i[0]&amp;&amp;a[1]&lt;i[3])){r.label=a[1];break}if(6===a[0]&amp;&amp;r.label&lt;i[1]){r.label=i[1],i=a;break}if(i&amp;&amp;r.label&lt;i[2]){r.label=i[2],r.ops.push(a);break}i[2]&amp;&amp;r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(s){a=[6,s],o=0}finally{n=i=0}if(5&amp;a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(n,"__esModule",{value:!0});var c=t("../../../Script/Helper/AudioManager"),l=t("../../../Script/Helper/HelperTools"),h=t("../../../Script/Promotion/AdManager"),u=cc._decorator,d=u.ccclass,p=u.property,f=function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.ColorP=null,e.progress=null,e.Done=null,e.ItemParent1=null,e.ItemParent2=null,e}return i(e,t),e.prototype.onLoad=function(){},e.prototype.start=function(){this.ItemParent1=cc.find("SafeArea/OtherItems1",this.node),this.ItemParent2=cc.find("SafeArea/OtherItems2",this.node),this.Done=this.ItemParent2.getChildByName("Done")},e.prototype.ScrollBtnClick=function(t){var e=t.target;c.default.getInstance().play("click"),this.BtnHintClose(),e.getChildByName("Select").active=!0,this.ColorP.children.forEach(function(t){t.active=!1}),this.ColorP.getChildByName(e.name).active=!0},e.prototype.Effect1ClickAction=function(){c.default.getInstance().play("gacha");var t=cc.find("SafeArea/Frame",this.node);1==t.scaleX?t.scaleX=-1:-1==t.scaleX&amp;&amp;(t.scaleX=1)},e.prototype.PhotoClick=function(t){var e=this,n=t.target;n.getComponent(cc.Button).interactable=!1,c.default.getInstance().play("gacha");var o=this.node.getComponent(cc.Animation).play("EffectA").duration;cc.tween(n).delay(o).call(function(){e.ItemParent2.active=!0,e.DoneBtnEffect()}).start()},e.prototype.BtnHintClose=function(){cc.find("Scroll/view/content",this.ItemParent2).children.forEach(function(t){t.getChildByName("Select").active=!1})},e.prototype.SliderAction=function(){var t=this.progress.getChildByName("Background").getComponent(cc.Sprite);t.fillRange=this.progress.getComponent(cc.Slider).progress,0==t.fillRange?this.ColorP.opacity=0:this.ColorP.opacity=70+185*this.progress.getComponent(cc.Slider).progress},e.prototype.CompleteDoneAction=function(t){return r(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return t.target.getComponent(cc.Button).interactable=!1,c.default.getInstance().play("click"),this.ItemParent1.parent.getChildByName("Frame").position=cc.v3(0,-15,0),cc.find("SafeArea/Colors",this.node).position=cc.v3(0,130,0),h.default.getInstance().requestAds(),[4,l.Delay(.3)];case 1:return e.sent(),cc.find("SafeArea/CameraNode",this.node).active=!0,this.ItemParent1.active=!1,this.ItemParent2.active=!1,cc.find("Canvas/promotion").position=cc.v3(0,0,0),cc.find("Canvas/logo").active=!1,cc.find("Canvas/more").active=!1,this.Done.active=!1,[2]}})})},e.prototype.DoneBtnEffect=function(){cc.tween(this.Done).repeatForever(cc.tween(this.Done).to(.3,{scale:.65}).to(.3,{scale:.55}).to(.3,{scale:.65}).to(.3,{scale:.55}).start()).start()},a([p(cc.Node)],e.prototype,"ColorP",void 0),a([p(cc.Node)],e.prototype,"progress",void 0),a([d],e)}(cc.Component);n.default=f,cc._RF.pop()},{"../../../Script/Helper/AudioManager":"AudioManager","../../../Script/Helper/HelperTools":"HelperTools","../../../Script/Promotion/AdManager":"AdManager"}],ParticleManager:[function(t,e,n){"use strict";cc._RF.push(e,"14b2f7ZngNNM6x56fqjI/aq","ParticleManager");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r};Object.defineProperty(n,"__esModule",{value:!0});var r=cc._decorator,s=r.ccclass,c=r.property,l=function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.Particle=null,e.time=.1,e.Times=2,e}return i(e,t),e.prototype.onLoad=function(){},e.prototype.start=function(){var t=this,e=cc.tween(this.node).delay(this.time).call(function(){t.Particle.resetSystem()});cc.tween(this.node).repeat(this.Times,e).start()},a([c(cc.ParticleSystem)],e.prototype,"Particle",void 0),a([c],e.prototype,"time",void 0),a([c()],e.prototype,"Times",void 0),a([s],e)}(cc.Component);n.default=l,cc._RF.pop()},{}],PixelIntersect:[function(t,e,n){"use strict";cc._RF.push(e,"75554kWglFLTpbg+cFLFrgr","PixelIntersect");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r};Object.defineProperty(n,"__esModule",{value:!0}),n.rgbToHex=n.hexToRgb=void 0;var r=cc._decorator,s=r.ccclass,c=(r.property,function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.nativeUrl=null,e.OrigionalTexture=null,e.OrigionalCanvas=null,e.OrigionalSpriteFrame=null,e.OrigionalContext=null,e.OrigionalImgData=null,e.image=null,e.imageData=null,e.Stack=[],e.HueValue=0,e.isGradient=!1,e.color=[],e.OriginalImageData=null,e}return i(e,t),e.prototype.onLoad=function(){var t=this;this.nativeUrl=this.node.getComponent(cc.Sprite).spriteFrame.getTexture().nativeUrl,this.content=this.node.getContentSize(),this.image=new Image,this.OrigionalSpriteFrame=new cc.SpriteFrame,this.OrigionalTexture=new cc.Texture2D,this.OrigionalCanvas=document.createElement("canvas"),this.OrigionalContext=this.OrigionalCanvas.getContext("2d"),this.image.onload=function(){t.OrigionalCanvas.width=t.image.width,t.OrigionalCanvas.height=t.image.height,t.OrigionalContext.drawImage(t.image,0,0),t.imageData=t.OrigionalContext.getImageData(0,0,t.image.width,t.image.height),t.OriginalImageData=t.OrigionalContext.getImageData(0,0,t.image.width,t.image.height)},this.image.src=this.nativeUrl},e.prototype.start=function(){},e.prototype.resetHair=function(){if(null!=this.OrigionalContext&amp;&amp;null!=this.OriginalImageData){this.OrigionalContext.clearRect(0,0,this.OrigionalCanvas.width,this.OrigionalCanvas.height),this.OrigionalContext.putImageData(this.OriginalImageData,0,0);var t=this.OrigionalContext.getImageData(0,0,this.OrigionalCanvas.width,this.OrigionalCanvas.height);return this.getFrame(t)}},e.prototype.isIntersect=function(t,e){var n=cc.v2(t+this.content.width/2,this.content.height-(e+this.content.height/2));if(t=parseInt(n.x.toFixed(0)),e=parseInt(n.y.toFixed(0)),null==this.imageData)return!1;var o=this.imageData,i=o.width,a=(o.height,o.data),r=4*(e*i+t);return!(a.length&lt;=r||!(a[r+3]&amp;&amp;a[r+3]&gt;0))},e.prototype.UpdateCanvas=function(t,e){this.OrigionalContext.clearRect(0,0,this.OrigionalCanvas.width,this.OrigionalCanvas.height),this.isGradient=!1,this.HueValue=e,this.OrigionalContext.globalCompositeOperation="source-over",this.OrigionalContext.drawImage(t,0,0),this.OrigionalContext.globalCompositeOperation="hue",this.OrigionalContext.fillStyle="hsl("+e+",100%, 50%)",this.OrigionalContext.fillRect(0,0,this.OrigionalCanvas.width,this.OrigionalCanvas.height),this.OrigionalContext.globalCompositeOperation="destination-in",this.OrigionalContext.drawImage(t,0,0),this.OrigionalContext.globalCompositeOperation="source-over";var n=this.OrigionalContext.getImageData(0,0,t.width,t.height);return this.getFrame(n)},e.prototype.UpdateGradientCanvas=function(t,e){this.OrigionalContext.clearRect(0,0,this.OrigionalCanvas.width,this.OrigionalCanvas.height),this.isGradient=!0,this.color=e,this.OrigionalContext.globalCompositeOperation="source-over",this.OrigionalContext.drawImage(t,0,0),this.OrigionalContext.globalCompositeOperation="hue";var n=this.OrigionalContext.createLinearGradient(0,0,t.width,150),o=[];o.push(.5),o.push(0),o.push(1);for(var i=0;i&lt;e.length;i++)n.addColorStop(o[i],l(e[i].r,e[i].g,e[i].b));this.OrigionalContext.fillStyle=n,this.OrigionalContext.fillRect(0,0,t.width,t.height),this.OrigionalContext.globalCompositeOperation="destination-in",this.OrigionalContext.drawImage(t,0,0),this.OrigionalContext.globalCompositeOperation="source-over";var a=this.OrigionalContext.getImageData(0,0,t.width,t.height);return this.getFrame(a)},e.prototype.getFrame=function(t){var e=new cc.SpriteFrame,n=new cc.Texture2D;return n.initWithData(t,cc.Texture2D.PixelFormat.RGBA8888,this.OrigionalCanvas.width,this.OrigionalCanvas.height),e.setTexture(n),e},e.prototype.setSpriteFrame=function(t,e){var n=this,o=this.getStack(this.nativeUrl,e);o&amp;&amp;(t.spriteFrame=o);var i=new Image;i.onload=function(){n.OrigionalCanvas.width=i.width,n.OrigionalCanvas.height=i.height;var o=n.UpdateCanvas(i,e);t.spriteFrame=o,n.addToStack(n.nativeUrl,e,o,n.OrigionalContext.getImageData(0,0,i.width,i.height))},i.src=this.nativeUrl},e.prototype.setSpriteFrameWithGradient=function(t,e){var n=this,o=new Image;o.onload=function(){n.OrigionalCanvas.width=o.width,n.OrigionalCanvas.height=o.height;var i=n.UpdateGradientCanvas(o,e);t.spriteFrame=i,n.addToStack(n.nativeUrl,-1,i,n.OrigionalContext.getImageData(0,0,o.width,o.height))},o.src=this.nativeUrl},e.prototype.addToStack=function(t,e,n,o){this.Stack.push({url:t,spriteframe:n,HueValue:e,ImageData:o})},e.prototype.getStack=function(t,e){for(var n=0;n&lt;this.Stack.length;n++)if(this.Stack[n].url==t&amp;&amp;this.Stack[n].HueValue==e)return this.Stack[n].spriteframe;return null},e.prototype.getLastState=function(){return this.isGradient?this.color:this.HueValue},e.prototype.isGradientColor=function(){return this.isGradient},a([s],e)}(cc.Component));function l(t,e,n){return"#"+h(t)+h(e)+h(n)}function h(t){var e=t.toString(16);return 1==e.length?"0"+e:e}n.default=c,n.hexToRgb=function(t){var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return cc.color(parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16))},n.rgbToHex=l,cc._RF.pop()},{}],Promotion:[function(t,e,n){"use strict";cc._RF.push(e,"c363esmtuVBDJcSkzRVx80v","Promotion");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r},r=this&amp;&amp;this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,a){function r(t){try{c(o.next(t))}catch(e){a(e)}}function s(t){try{c(o.throw(t))}catch(e){a(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,s)}c((o=o.apply(t,e||[])).next())})},s=this&amp;&amp;this.__generator||function(t,e){var n,o,i,a,r={label:0,sent:function(){if(1&amp;i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&amp;&amp;(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return c([t,e])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&amp;&amp;(i=2&amp;a[0]?o.return:a[0]?o.throw||((i=o.return)&amp;&amp;i.call(o),0):o.next)&amp;&amp;!(i=i.call(o,a[1])).done)return i;switch(o=0,i&amp;&amp;(a=[2&amp;a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(i=(i=r.trys).length&gt;0&amp;&amp;i[i.length-1])&amp;&amp;(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&amp;&amp;(!i||a[1]&gt;i[0]&amp;&amp;a[1]&lt;i[3])){r.label=a[1];break}if(6===a[0]&amp;&amp;r.label&lt;i[1]){r.label=i[1],i=a;break}if(i&amp;&amp;r.label&lt;i[2]){r.label=i[2],r.ops.push(a);break}i[2]&amp;&amp;r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(s){a=[6,s],o=0}finally{n=i=0}if(5&amp;a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(n,"__esModule",{value:!0});var c=t("../Helper/AudioManager"),l=t("../Helper/CocosHelper"),h=t("../Helper/GlobalData"),u=t("../Helper/HelperTools"),d=t("../Helper/SessionStorageHelper"),p=t("./AdManager"),f=cc._decorator,g=f.ccclass,v=(f.property,function(t){function e(){return null!==t&amp;&amp;t.apply(this,arguments)||this}var n;return i(e,t),n=e,e.prototype.start=function(){n.self=this;var t=this;"promoBack"==t.node.name&amp;&amp;this.setPromoThumb();var e="game";"MainScene"==cc.director.getScene().name&amp;&amp;(e="mainscreen"),this.node.on(cc.Node.EventType.TOUCH_END,function(){YYGGames&amp;&amp;("promoBack"==t.node.name?255==t.node.parent.opacity&amp;&amp;YYGGames.navigate("gameoverscene","relatedgames",YYGGames.forgames[h.GlobalData.data.relatedThumbNo].id):t.node.parent&amp;&amp;"promotion"==t.node.parent.name?YYGGames.navigate("gameover",t.node.name):YYGGames.navigate(e,t.node.name))},this)},e.prototype.setPromoThumb=function(){var t=this;if("undefined"!=typeof YYGGames&amp;&amp;YYGGames.forgames.length&gt;0){h.GlobalData.data.relatedThumbNo=l.getRandomNumber(0,YYGGames.forgames.length-1);var e=this,n=YYGGames.forgames[h.GlobalData.data.relatedThumbNo].thumb;cc.assetManager.loadRemote(n,function(n,o){cc.find("tex",t.node)&amp;&amp;(e.node.parent.opacity=255,cc.find("tex",t.node).getComponent(cc.Sprite).spriteFrame=new cc.SpriteFrame(o))})}},e.prototype.onReplayClick=function(t){return r(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return c.default.getInstance().play("button"),t.target.getComponent(cc.Button).interactable=!1,d.default.getInstace().removeAllKeys(),p.default.getInstance().requestAds(),[4,u.Delay(.3)];case 1:return e.sent(),cc.director.loadScene("MainScene"),[2]}})})},e.self=null,n=a([g],e)}(cc.Component));n.default=v,cc._RF.pop()},{"../Helper/AudioManager":"AudioManager","../Helper/CocosHelper":"CocosHelper","../Helper/GlobalData":"GlobalData","../Helper/HelperTools":"HelperTools","../Helper/SessionStorageHelper":"SessionStorageHelper","./AdManager":"AdManager"}],RewardFailed:[function(t,e,n){"use strict";cc._RF.push(e,"de049FllctHALvm/i+bzPTu","RewardFailed");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r};Object.defineProperty(n,"__esModule",{value:!0});var r=cc._decorator,s=r.ccclass,c=(r.property,function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.safeArea=null,e}return i(e,t),e.prototype.onLoad=function(){},e.prototype.start=function(){cc.game.on("RewarFailed.Open",this.OpenRewardFailed,this),cc.game.on("RewarFailed.Close",this.CloseRewardFailed,this),this.safeArea=this.node.children[0],cc.find("Failclose",this.safeArea).on(cc.Node.EventType.TOUCH_START,this.rewardCloseAction,this)},e.prototype.rewardCloseAction=function(){this.CloseRewardFailed()},e.prototype.OpenRewardFailed=function(t){this.safeArea.active=!0,0==t?(cc.find("SafeArea/Failpopup/pop1",this.node).active=!0,cc.find("SafeArea/Failpopup/pop2",this.node).active=!1):(cc.find("SafeArea/Failpopup/pop1",this.node).active=!1,cc.find("SafeArea/Failpopup/pop2",this.node).active=!0)},e.prototype.CloseRewardFailed=function(){this.safeArea&amp;&amp;(this.safeArea.active=!1)},a([s],e)}(cc.Component));n.default=c,cc._RF.pop()},{}],Scaler:[function(t,e,n){"use strict";cc._RF.push(e,"06c21oIzxxC3Ii0nc5OGek6","Scaler");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r};Object.defineProperty(n,"__esModule",{value:!0});var r=cc._decorator,s=r.ccclass,c=r.property,l=function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.Zoom=null,e.Delete=null,e.Minscale=.5,e.Maxscale=1.5,e.rotation=0,e.canMove=!1,e}return i(e,t),e.prototype.onLoad=function(){},e.prototype.start=function(){this.node.on(cc.Node.EventType.TOUCH_START,this.TouchStart,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this.TouchMove,this),this.node.on(cc.Node.EventType.TOUCH_END,this.TouchEnd,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this.TouchEnd,this)},e.prototype.TouchStart=function(t){var e=t.getLocation();if(this.Zoom.getBoundingBoxToWorld().contains(e)){this.canMove=!0,this.node.opacity=254;var n=this.node.parent.convertToWorldSpaceAR(this.node.position),o=t.getLocation();this.rotation=this.node.parent.angle-this.angle(n.x,n.y,o.x,o.y)}else this.Delete.getBoundingBoxToWorld().contains(e)&amp;&amp;this.node.parent.removeFromParent()},e.prototype.TouchMove=function(t){if(this.canMove){var e=t.getLocation(),n=this.node.parent.convertToWorldSpaceAR(this.node.position),o=t.getLocation();this.node.parent.angle=this.rotation+this.angle(n.x,n.y,o.x,o.y);var i=this.getDistance(n.x,n.y,e.x,e.y)/100;i&gt;this.Minscale&amp;&amp;i&lt;this.Maxscale&amp;&amp;(this.node.parent.scale=i)}},e.prototype.TouchEnd=function(){this.canMove=!1,this.node.opacity=255},e.prototype.getDistance=function(t,e,n,o){var i=n-t,a=o-e;return Math.sqrt(a*a+i*i)},e.prototype.angle=function(t,e,n,o){var i=o-e,a=n-t,r=Math.atan2(i,a);return(r*=180/Math.PI)&lt;0&amp;&amp;(r=360+r),r},e.prototype.update=function(){this.Delete.angle=-this.node.parent.angle,this.Delete.scale=this.node.scale&gt;1?1-this.node.scale:this.node.scale+(1-this.node.scale),this.Zoom.scale=this.node.scale&gt;1?1-this.node.scale:this.node.scale+(1-this.node.scale)},e.prototype.showFrame=function(){this.node.active=!0},e.prototype.hideFrame=function(){this.node.active=!1},a([c(cc.Node)],e.prototype,"Zoom",void 0),a([c(cc.Node)],e.prototype,"Delete",void 0),a([c],e.prototype,"Minscale",void 0),a([c],e.prototype,"Maxscale",void 0),a([s],e)}(cc.Component);n.default=l,cc._RF.pop()},{}],SessionStorageHelper:[function(t,e,n){"use strict";cc._RF.push(e,"53cd3d1si5Lmoi+9Wy1x3L/","SessionStorageHelper");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r};Object.defineProperty(n,"__esModule",{value:!0});var r=cc._decorator,s=r.ccclass,c=(r.property,function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.Items=[],e}var n;return i(e,t),n=e,e.getInstace=function(){return null==n.instance&amp;&amp;(n.instance=new n),n.instance},e.prototype.setItem=function(t,e){for(var n=!1,o=0;o&lt;this.Items.length;o++)if(this.Items[o].Key==t){n=!0,this.Items[o].Value=e;break}0==n&amp;&amp;this.Items.push({Key:t,Value:e})},e.prototype.getItem=function(t){for(var e=0;e&lt;this.Items.length;e++)if(this.Items[e].Key==t)return this.Items[e].Value},e.prototype.removeItem=function(t){for(var e=0;e&lt;this.Items.length;e++)if(this.Items[e].Key==t){this.Items.splice(e,1);break}},e.prototype.removeAllKeys=function(){this.Items.splice(0,this.Items.length)},e.instance=null,n=a([s],e)}(cc.Component));n.default=c,cc._RF.pop()},{}],SpineHelper:[function(t,e,n){"use strict";cc._RF.push(e,"fde95czI4BDfostmW9ymarY","SpineHelper");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r};Object.defineProperty(n,"__esModule",{value:!0}),n.removeAttchment=n.ChangeAttchment=void 0;var r=t("./CocosHelper"),s=cc._decorator,c=s.ccclass,l=s.property,h=function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.Texture=null,e.Skeleton=null,e.OriginalTextureSize=null,e.Canvas=null,e.Context=null,e}return i(e,t),e.prototype.onLoad=function(){this.Skeleton=this.node.getComponent(sp.Skeleton),this.OriginalTextureSize=r.getTextureSize(this.Skeleton),this.Canvas=document.createElement("canvas"),this.Context=this.Canvas.getContext("2d"),this.Canvas.width=this.OriginalTextureSize.width,this.Canvas.height=this.OriginalTextureSize.height;var t=new cc.Texture2D,e=new cc.SpriteFrame,n=new Image,o=this;console.log(this.Skeleton),r.PrintAllRegion(this.Skeleton);var i=this.Skeleton.getAttachment("glasses","colthes/glasses/cloth000");console.log(i.region.renderObject),n.onload=function(){o.Context.drawImage(n,0,0),t.initWithData(o.Context.getImageData(0,0,o.OriginalTextureSize.width,o.OriginalTextureSize.height),cc.Texture2D.PixelFormat.RGBA8888,o.OriginalTextureSize.width,o.OriginalTextureSize.height),e.setTexture(t),o.Skeleton.skeletonData.textures[0].nativeUrl=o.Canvas.toDataURL("image/png")},n.src=this.Skeleton.skeletonData.textures[0].nativeUrl},e.prototype.start=function(){},e.prototype.ChangeTexture=function(t,e){var n=r.getRegion(this.Skeleton,t),o=(r.getTextureSize(this.Skeleton),new Image),i=this,a=new cc.Texture2D;o.onload=function(){i.Context.drawImage(o,n.x,n.y),a.initWithData(i.Context.getImageData(0,0,i.OriginalTextureSize.width,i.OriginalTextureSize.height),cc.Texture2D.PixelFormat.RGBA8888,i.OriginalTextureSize.width,i.OriginalTextureSize.height),i.Skeleton.skeletonData.textures[0]=a,console.log(i.Canvas.toDataURL())},o.src=e},a([l(cc.SpriteFrame)],e.prototype,"Texture",void 0),a([c],e)}(cc.Component);n.default=h,n.ChangeAttchment=function(t,e,n,o){var i=t.getAttachment(n,o),a=t.findSlot(e);a&amp;&amp;i&amp;&amp;a.setAttachment(i)},n.removeAttchment=function(t,e){var n=t.findSlot(e);n&amp;&amp;n.setAttachment(null)},cc._RF.pop()},{"./CocosHelper":"CocosHelper"}],StickerHelper:[function(t,e,n){"use strict";cc._RF.push(e,"b2071SGriVE6Ixq58m+AMJd","StickerHelper");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r};Object.defineProperty(n,"__esModule",{value:!0});var r=cc._decorator,s=r.ccclass,c=r.property,l=function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.isEnable=!0,e.scalerNode=null,e.MoveNode=null,e.Minscale=.5,e.Maxscale=1.5,e.rotation=0,e.canMove=!1,e.Zoom=null,e.Delete=null,e.DestinationNode=null,e}var n;return i(e,t),n=e,e.prototype.onLoad=function(){this.Zoom=cc.find("Zoom",this.scalerNode),this.Delete=cc.find("Delete",this.scalerNode)},e.prototype.start=function(){this.OnEvent()},e.prototype.OffEvent=function(){cc.find("Canvas").off(cc.Node.EventType.TOUCH_START,this.TouchStart,this),cc.find("Canvas").off(cc.Node.EventType.TOUCH_MOVE,this.TouchMove,this),cc.find("Canvas").off(cc.Node.EventType.TOUCH_END,this.TouchEnd,this),cc.find("Canvas").off(cc.Node.EventType.TOUCH_CANCEL,this.TouchEnd,this)},e.prototype.OnEvent=function(){cc.find("Canvas").on(cc.Node.EventType.TOUCH_START,this.TouchStart,this),cc.find("Canvas").on(cc.Node.EventType.TOUCH_MOVE,this.TouchMove,this),cc.find("Canvas").on(cc.Node.EventType.TOUCH_END,this.TouchEnd,this),cc.find("Canvas").on(cc.Node.EventType.TOUCH_CANCEL,this.TouchEnd,this)},e.prototype.TouchStart=function(t){var e=t.getLocation();if(this.DestinationNode)if(this.Zoom&amp;&amp;this.Zoom.getBoundingBoxToWorld().contains(e)){this.canMove=!0;var o=this.DestinationNode.parent.convertToWorldSpaceAR(this.DestinationNode.position),i=t.getLocation();this.rotation=this.DestinationNode.angle-this.angle(o.x,o.y,i.x,i.y)}else this.Delete.getBoundingBoxToWorld().contains(e)&amp;&amp;(this.DestinationNode.removeFromParent(),this.hideFrame(),this.DestinationNode=null);if(0==this.canMove)for(var a=n.Tag;a&gt;=1e3;a--){var r=cc.find(a.toString(),this.node);if(r&amp;&amp;r.getBoundingBoxToWorld().contains(t.getLocation())){this.MoveNode=r,this.DestinationNode=this.MoveNode,this.MoveNode=r,this.MoveNode.zIndex=1,this.MoveNode.parent=cc.find("Canvas/StickersMove"),this.showFrame();break}}},e.prototype.TouchMove=function(t){var e=t.getLocation();if(this.canMove&amp;&amp;this.DestinationNode){var n=this.DestinationNode.parent.convertToWorldSpaceAR(this.DestinationNode.position);this.DestinationNode.angle=this.rotation+this.angle(n.x,n.y,e.x,e.y);var o=this.getDistance(n.x,n.y,e.x,e.y)/100;o&gt;this.Minscale&amp;&amp;o&lt;this.Maxscale&amp;&amp;(this.DestinationNode.scale=o)}else this.MoveNode&amp;&amp;(this.MoveNode.position=cc.v3(cc.find("Canvas/StickersMove").convertToNodeSpaceAR(e)))},e.prototype.TouchEnd=function(){var t=this;null===this.MoveNode&amp;&amp;0==this.canMove&amp;&amp;this.hideFrame(),this.MoveNode&amp;&amp;(this.MoveNode.zIndex=0,this.MoveNode.name=n.Tag.toString(),this.MoveNode.parent=this.node,this.MoveNode=null,n.Tag++),this.canMove=!1,this.MoveNode=null,cc.find("Canvas/StickersMove").childrenCount&gt;0&amp;&amp;cc.find("Canvas/StickersMove").children.forEach(function(e){e.parent=t.node})},e.prototype.updateIndex=function(t){t.name=n.Tag.toString(),n.Tag++,this.showFrame(),this.DestinationNode=t},e.prototype.getDistance=function(t,e,n,o){var i=n-t,a=o-e;return Math.sqrt(a*a+i*i)},e.prototype.angle=function(t,e,n,o){var i=o-e,a=n-t,r=Math.atan2(i,a);return(r*=180/Math.PI)&lt;0&amp;&amp;(r=360+r),r},e.prototype.update=function(){if(this.DestinationNode&amp;&amp;(this.scalerNode.position=this.DestinationNode.position),this.DestinationNode){var t=this.scalerNode.scale&gt;1?1-(this.scalerNode.scale-1):this.DestinationNode.scale+(1-this.scalerNode.scale);this.Delete.scale=t,this.Zoom.scale=t,this.scalerNode.scale=this.DestinationNode.scale,this.scalerNode.angle=this.DestinationNode.angle,this.Delete.angle=-this.scalerNode.angle}},e.prototype.showFrame=function(){this.scalerNode.active=!0},e.prototype.hideFrame=function(){this.scalerNode.active=!1,this.DestinationNode=null},e.Tag=1e3,a([c],e.prototype,"isEnable",void 0),a([c(cc.Node)],e.prototype,"scalerNode",void 0),a([c],e.prototype,"Minscale",void 0),a([c],e.prototype,"Maxscale",void 0),n=a([s],e)}(cc.Component);n.default=l,cc._RF.pop()},{}],ToolMoveMaster:[function(t,e,n){"use strict";cc._RF.push(e,"0c396lhNe1MmoAVPVZlMw1M","ToolMoveMaster");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r},r=this&amp;&amp;this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,a){function r(t){try{c(o.next(t))}catch(e){a(e)}}function s(t){try{c(o.throw(t))}catch(e){a(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,s)}c((o=o.apply(t,e||[])).next())})},s=this&amp;&amp;this.__generator||function(t,e){var n,o,i,a,r={label:0,sent:function(){if(1&amp;i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&amp;&amp;(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return c([t,e])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&amp;&amp;(i=2&amp;a[0]?o.return:a[0]?o.throw||((i=o.return)&amp;&amp;i.call(o),0):o.next)&amp;&amp;!(i=i.call(o,a[1])).done)return i;switch(o=0,i&amp;&amp;(a=[2&amp;a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(i=(i=r.trys).length&gt;0&amp;&amp;i[i.length-1])&amp;&amp;(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&amp;&amp;(!i||a[1]&gt;i[0]&amp;&amp;a[1]&lt;i[3])){r.label=a[1];break}if(6===a[0]&amp;&amp;r.label&lt;i[1]){r.label=i[1],i=a;break}if(i&amp;&amp;r.label&lt;i[2]){r.label=i[2],r.ops.push(a);break}i[2]&amp;&amp;r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(s){a=[6,s],o=0}finally{n=i=0}if(5&amp;a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(n,"__esModule",{value:!0});var c=t("../Promotion/AdManager"),l=t("./AudioManager"),h=t("./UserDrawing"),u=cc._decorator,d=u.ccclass,p=u.property,f=function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.isDrawingOn=!1,e.isSelfNodeMove=!0,e.isTouchActive=!0,e.ToolEndMoveTime=.5,e.ToolID=0,e.BeganAction=null,e.MoveAction=null,e.EndAction=null,e.isSelf=!1,e.MoveItem=null,e.isDrawingEnable=!1,e.drawing=[],e.destinationNode=null,e.ForceDisableDrawing=!1,e.isPositionChanged=!1,e.initPosition=null,e.MoveinitPosition=null,e.DefaultinitPosition=null,e.DestinitPosition=null,e.TapinitPosition=null,e.isTapObject=!1,e.isExitTool=!1,e.isSwipe=!1,e.BeganPoint=1e4,e.startX=0,e.startY=0,e.dist=0,e.threshold=50,e.allowedTime=500,e.elapsedTime=0,e.startTime=0,e.restraint=100,e.swipedir="none",e.distance=function(t,e,n,o){return Math.hypot(n-t,o-e)},e.TapSound="",e.SwipeSound="",e}return i(e,t),Object.defineProperty(e.prototype,"typenode",{get:function(){return this.isSelfNodeMove},set:function(t){this.isSelfNodeMove=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"moveitem",{get:function(){return this.MoveItem},set:function(t){this.MoveItem=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this.isDrawingEnable},set:function(t){this.isDrawingEnable=t,this.setType(t)},enumerable:!1,configurable:!0}),e.prototype.setType=function(t){this.isDrawingOn=t},Object.defineProperty(e.prototype,"drawing1",{get:function(){return this.drawing},set:function(t){this.drawing=t},enumerable:!1,configurable:!0}),e.prototype.onLoad=function(){this.initPosition=this.node.position,this.DefaultinitPosition=this.node.position,this.MoveItem&amp;&amp;(this.MoveinitPosition=this.MoveItem.position),this.registerEvents()},e.prototype.start=function(){},e.prototype.registerEvents=function(){this.node.on(cc.Node.EventType.TOUCH_START,this.TouchStart,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this.TouchMove,this),this.node.on(cc.Node.EventType.TOUCH_END,this.TouchEnd,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this.TouchEnd,this)},e.prototype.UpdateInitPosition=function(){this.initPosition=this.node.position,this.DefaultinitPosition=this.node.position,this.MoveItem&amp;&amp;(this.MoveinitPosition=this.MoveItem.position)},e.prototype.SwipeAction=function(t){if(l.default.getInstance().play(this.SwipeSound),this.node.getChildByName("Ads"))this.ShowAds(this.node);else{if(this.drawing)for(var e=0;e&lt;this.drawing.length;e++)this.drawing[e].setActiveDrawing(!0);this.MoveItem?(this.node.opacity=0,this.MoveItem.opacity=255,this.MoveItem.active=!0,this.MoveItem.position=cc.v3(this.MoveItem.parent.convertToNodeSpaceAR(t.getLocation())),this.TapinitPosition=this.MoveItem.position,this.MoveinitPosition=this.MoveItem.position):(this.node.opacity=255,this.node.active=!0,this.node.position=cc.v3(this.node.parent.convertToNodeSpaceAR(t.getLocation())),this.TapinitPosition=this.node.position,this.MoveinitPosition=this.node.position),cc.Tween.stopAllByTarget(this.node),this.BeganAction&amp;&amp;this.BeganAction.emit([this.node,this.ToolID,t.getLocation(),this.MoveItem,this.destinationNode]),"content"==this.node.parent.name&amp;&amp;this.node.parent.parent.parent&amp;&amp;this.node.parent.parent.parent.getComponent(cc.ScrollView)&amp;&amp;(this.node.parent.parent.parent.getComponent(cc.ScrollView).enabled=!1)}},e.prototype.TouchStart=function(t){if(this.isTouchActive&amp;&amp;this.node.active&amp;&amp;255==this.node.opacity){if(this.isPositionChanged=!0,this.isTapObject=!0,this.isSwipe=!1,this.BeganPoint=t.getLocationX(),this.dist=0,this.swipedir="none",this.startX=t.getLocationX(),this.startY=t.getLocationY(),this.startTime=(new Date).getTime(),this.drawing&amp;&amp;!this.ForceDisableDrawing)for(var e=0;e&lt;this.drawing.length;e++)this.drawing[e].setActiveDrawing(!0),this.drawing[e].touchStart(t);"content"!=this.node.parent.name?(this.SwipeAction(t),l.default.getInstance().play(this.TapSound)):this.isSwipe=!0}},e.prototype.TouchMove=function(t){if(0!=this.isTapObject&amp;&amp;this.isTouchActive&amp;&amp;this.isTouchActive){if(this.isSwipe){var e=t.getLocationX()-this.startX,n=t.getLocationY()-this.startY;if((new Date).getTime()-this.startTime&lt;=this.allowedTime&amp;&amp;(Math.abs(e)&gt;=this.threshold&amp;&amp;Math.abs(n)&lt;=this.restraint?this.swipedir=e&lt;0?"left":"right":Math.abs(n)&gt;=this.threshold&amp;&amp;Math.abs(e)&lt;=this.restraint&amp;&amp;(this.swipedir=n&lt;0?"up":"down")),"left"==this.swipedir)this.isSwipe=!1,this.SwipeAction(t);else{if("right"!=this.swipedir)return;this.isSwipe=!1,this.SwipeAction(t)}}if(this.MoveItem?this.MoveItem.position=cc.v3(this.MoveItem.parent.convertToNodeSpaceAR(t.getLocation())):this.node.position=cc.v3(this.node.parent.convertToNodeSpaceAR(t.getLocation())),this.MoveAction&amp;&amp;this.MoveAction.emit([this.node,this.ToolID,t.getLocation(),this.MoveItem]),this.drawing&amp;&amp;!this.ForceDisableDrawing)for(var o=0;o&lt;this.drawing.length;o++)this.drawing[o].touchMove(t)}},e.prototype.TouchEnd=function(t){var e=this;if(0!=this.isTapObject&amp;&amp;this.isTouchActive)if(this.node.getChildByName("Ads")){var n=t.getLocationX()-this.startX,o=t.getLocationY()-this.startY;n&lt;50&amp;&amp;o&lt;50&amp;&amp;this.ShowAds(this.node)}else{if(this.destinationNode&amp;&amp;this.destinationNode.getBoundingBoxToWorld().contains(t.getLocation())&amp;&amp;(this.destinationNode.active=!0,this.MoveItem.active=!1,this.isTapObject=!1,this.isTouchActive=!1),this.isSwipe)if(n=t.getLocationX()-this.startX,o=t.getLocationY()-this.startY,(new Date).getTime()-this.startTime&lt;=this.allowedTime&amp;&amp;(Math.abs(n)&gt;=this.threshold&amp;&amp;Math.abs(o)&lt;=this.restraint?this.swipedir=n&lt;0?"left":"right":Math.abs(o)&gt;=this.threshold&amp;&amp;Math.abs(n)&lt;=this.restraint&amp;&amp;(this.swipedir=o&lt;0?"up":"down")),"left"==this.swipedir)this.isSwipe=!1,this.SwipeAction(t);else{if("right"!=this.swipedir)return;this.isSwipe=!1,this.SwipeAction(t)}if(this.drawing)for(var i=0;i&lt;this.drawing.length;i++)this.drawing[i].setActiveDrawing(!1);if(this.isTapObject=!1,"content"==this.node.parent.name&amp;&amp;this.node.parent.parent.parent&amp;&amp;this.node.parent.parent.parent.getComponent(cc.ScrollView)&amp;&amp;(this.node.parent.parent.parent.getComponent(cc.ScrollView).enabled=!0),this.isTouchActive&amp;&amp;this.isPositionChanged){this.isPositionChanged=!1;var a=this.MoveItem,r=this.MoveinitPosition;null==a&amp;&amp;(a=this.node,r=this.DefaultinitPosition),cc.tween(a).to(this.getTime(a.position,r),{position:r}).call(function(){e.MoveItem?(e.MoveItem.active=!1,e.MoveinitPosition&amp;&amp;(e.MoveItem.position=e.DefaultinitPosition)):e.DefaultinitPosition&amp;&amp;(e.node.position=e.DefaultinitPosition),e.node.active=!0,e.node.opacity=255}).start()}this.EndAction&amp;&amp;this.EndAction.emit([this.node,this.ToolID,t.getLocation(),this.MoveItem,this.destinationNode])}},e.prototype.ToolEnd=function(){var t=this,e=this.MoveItem,n=this.MoveinitPosition;null==e&amp;&amp;(e=this.node,n=this.DefaultinitPosition),cc.tween(e).to(this.getTime(e.position,n),{position:n}).call(function(){t.MoveItem?(t.MoveItem.active=!1,t.MoveinitPosition&amp;&amp;(t.MoveItem.position=t.DefaultinitPosition)):t.DefaultinitPosition&amp;&amp;(t.node.position=t.DefaultinitPosition),t.node.active=!0,t.node.opacity=255}).start()},e.prototype.getTime=function(){return.2},e.prototype.ShowAds=function(t){return r(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return t&amp;&amp;t.getChildByName("Ads")?(this.resetComponent(),[4,c.default.getInstance().requestRewardAds(t.getChildByName("Ads"))]):[3,2];case 1:return e.sent()&amp;&amp;t.removeComponent(cc.Button),[2];case 2:return[2]}})})},e.prototype.UpdateOffset=function(t){if(this.drawing)for(var e=0;e&lt;this.drawing.length;e++)this.drawing[e].setDrawingOffset(t.width,t.height)},e.prototype.UpdateBrushSize=function(t){if(this.drawing)for(var e=0;e&lt;this.drawing.length;e++)this.drawing[e].setBrushSize(t)},e.prototype.resetComponent=function(){this.MoveItem&amp;&amp;(this.MoveItem.active=!1,cc.Tween.stopAllByTarget(this.MoveItem)),cc.Tween.stopAllByTarget(this.node),this.isTapObject=!1,this.node.opacity=255,this.node.active=!0,this.node.position=this.DefaultinitPosition,this.MoveItem&amp;&amp;(this.MoveItem.position=this.MoveinitPosition),this.isTouchActive=!0},e.prototype.isToolReset=function(){var t=this;cc.tween(this.MoveItem).to(this.ToolEndMoveTime,{position:this.DefaultinitPosition}).call(function(){t.isTapObject=!1,t.node.opacity=255,t.node.active=!0,t.node.position=t.DefaultinitPosition,t.isTouchActive=!1}).start()},e.prototype.setActive=function(t){t?(this.node.opacity=255,this.isTouchActive=!0):(this.node.opacity=254,this.isTouchActive=!1)},e.prototype.ToolDoneAction=function(){if(this.drawing.length&gt;0)for(var t=0;t&lt;this.drawing.length;t++)this.drawing[t].isErase?this.drawing[t].clearPicture():this.drawing[t].FillFullTexture()},e.prototype.resetTexture=function(){if(this.drawing.length&gt;0)for(var t=0;t&lt;this.drawing.length;t++)this.drawing[t].resetPicture()},e.prototype.isToolDone=function(){if(this.drawing.length&gt;0){for(var t=!0,e=0;e&lt;this.drawing.length;e++)if(this.drawing[e].isErase){if(this.drawing[e].getDrawingPercentage()&gt;10){t=!1;break}}else if(this.drawing[e].getDrawingPercentage()&lt;90){t=!1;break}return t}return!1},a([p()],e.prototype,"isTouchActive",void 0),a([p()],e.prototype,"ToolEndMoveTime",void 0),a([p({type:cc.Integer})],e.prototype,"ToolID",void 0),a([p(cc.Component.EventHandler)],e.prototype,"BeganAction",void 0),a([p(cc.Component.EventHandler)],e.prototype,"MoveAction",void 0),a([p(cc.Component.EventHandler)],e.prototype,"EndAction",void 0),a([p({visible:!1})],e.prototype,"isSelf",void 0),a([p({displayName:"Move Node"})],e.prototype,"typenode",null),a([p({type:cc.Node,visible:!1})],e.prototype,"MoveItem",void 0),a([p({type:cc.Node,visible:function(){return this.isSelfNodeMove},displayName:"MoveItem"})],e.prototype,"moveitem",null),a([p({visible:!1})],e.prototype,"isDrawingEnable",void 0),a([p({displayName:"isEnable Drawing"})],e.prototype,"type",null),a([p({type:h.default,visible:!1})],e.prototype,"drawing",void 0),a([p({type:h.default,visible:function(){return this.isDrawingOn},displayName:"Item"})],e.prototype,"drawing1",null),a([p(cc.Node)],e.prototype,"destinationNode",void 0),a([p],e.prototype,"ForceDisableDrawing",void 0),a([d],e)}(cc.Component);n.default=f,cc._RF.pop()},{"../Promotion/AdManager":"AdManager","./AudioManager":"AudioManager","./UserDrawing":"UserDrawing"}],UserDrawing:[function(t,e,n){"use strict";cc._RF.push(e,"7423cdpXoxPF6EiCt9QdLYC","UserDrawing");var o,i=this&amp;&amp;this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&amp;&amp;(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&amp;&amp;this.__decorate||function(t,e,n,o){var i,a=arguments.length,r=a&lt;3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&amp;&amp;"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s&gt;=0;s--)(i=t[s])&amp;&amp;(r=(a&lt;3?i(r):a&gt;3?i(e,n,r):i(e,n))||r);return a&gt;3&amp;&amp;r&amp;&amp;Object.defineProperty(e,n,r),r};Object.defineProperty(n,"__esModule",{value:!0}),n.SCENE_TYPE=n.DRAWING_TYPE=void 0;var r,s,c=t("../FloodFill/FloodFill"),l=t("./AudioManager"),h=t("./CanvasManager"),u=t("./CocosHelper"),d=t("./GlobalData"),p=cc._decorator,f=p.ccclass,g=p.property;(function(t){t[t.NONE=0]="NONE",t[t.DRAWING=1]="DRAWING",t[t.FILL=2]="FILL",t[t.STICKER=3]="STICKER"})(r=n.DRAWING_TYPE||(n.DRAWING_TYPE={})),function(t){t[t.FILL=1]="FILL",t[t.DRAWING=2]="DRAWING",t[t.FILL_AND_DRAWING=3]="FILL_AND_DRAWING"}(s=n.SCENE_TYPE||(n.SCENE_TYPE={}));var v=function(t){function e(){var e=null!==t&amp;&amp;t.apply(this,arguments)||this;return e.isActiveDrawing=!0,e.brush=null,e.brushsize=30,e.isErase=!1,e.isRepeatPattern=!1,e.DrawingOffset=cc.v2(0,0),e.DrawingTexture=[],e.DefaultTexture=null,e.OutLineNode=null,e.selectedPattern=0,e.DrawingType=r.DRAWING,e.SceneType=s.DRAWING,e.DrawingPercentage=90,e.ErasePercentage=10,e.Stickers=null,e.isEnableColor=!0,e.isEnablePatternWithColor=!0,e.MoveTool=null,e.EraseMoveTool=null,e.floodfillcolor=null,e.BeganPoint=cc.Vec3.ZERO,e.startx=0,e.starty=0,e.imageData=null,e.Maxx=0,e.Maxy=0,e.Minx=1e3,e.Miny=1e3,e.DefaultTextureIndex=0,e.TextureSize=cc.Size.ZERO,e.SelectedColorID=0,e.CanvasManagerObj=null,e.selectedFillColor=cc.Color.RED,e.isPickColor=!1,e.StickerScale=1,e.BunchURL=[],e.isUpdateDrawing=!1,e}return i(e,t),e.prototype.onLoad=function(){var t=this;this.init(),this.TextureSize=this.node.getContentSize(),this.DrawNode=this.node,this.CanvasManagerObj=new h.default,this.CanvasManagerObj.initWithData(this.node,this),this.Stickers&amp;&amp;this.Stickers.children.forEach(function(e){d.GlobalData.data.flags.StickerPath.push({name:e.name,nativeurl:e.getComponent(cc.Sprite).spriteFrame.getTexture().nativeUrl,img:null}),d.LoadSticker(e.getComponent(cc.Sprite).spriteFrame.getTexture().nativeUrl,t.CanvasManagerObj.StickerImage)}),this.DefaultTexture instanceof cc.SpriteFrame?(this.CanvasManagerObj.LoadTexture(this.DefaultTexture.getTexture().nativeUrl,0,this.isRepeatPattern),this.node.getComponent(cc.Sprite).spriteFrame=this.DefaultTexture):this.CanvasManagerObj.LoadEmptyTexture(0);for(var e=0;e&lt;this.DrawingTexture.length;e++)this.CanvasManagerObj.LoadTexture(this.DrawingTexture[e].getTexture().nativeUrl,e+1,this.isRepeatPattern);this.setEraseOn(this.isErase),this.setPatternIndex(this.selectedPattern)},e.prototype.start=function(){this.setPatternIndex(this.selectedPattern)},e.prototype.init=function(){this.DrawNode=this.node,this.UserCanvas=document.createElement("canvas"),this.UserContext=this.UserCanvas.getContext("2d"),this.UserCanvas.width=this.node.width,this.UserCanvas.height=this.node.height,this.CanvasWidth=this.node.width,this.CanvasHeight=this.node.height,this.UserContext.clearRect(0,0,this.CanvasWidth,this.CanvasHeight),this.BrushImage=new Image,this.BrushImage.onload=function(){},this.BrushImage.src=this.brush.getTexture().nativeUrl},e.prototype.StartDrawingAfterLoading=function(){this.setActiveDrawing(this.isActiveDrawing)},e.prototype.initFloodFill=function(t){this.floodfillcolor=new c.default(t,null)},e.prototype.UpdateMinMax=function(t){this.startx=Math.floor(t.x),this.starty=Math.floor(t.y),this.Minx&gt;this.startx&amp;&amp;(this.Minx=this.startx),this.Maxx&lt;this.startx+this.brushsize&amp;&amp;(this.Maxx=this.startx+this.brushsize),this.Miny&gt;this.starty&amp;&amp;(this.Miny=this.starty),this.Maxy&lt;this.starty+this.brushsize&amp;&amp;(this.Maxy=this.starty+this.brushsize)},e.prototype.touchStart=function(t){if(this.DrawingType!=r.NONE){if(this.MoveTool&amp;&amp;t.getLocationY()&lt;150)return this.MoveTool.position=cc.v3(4545455,455454),void(this.EraseMoveTool&amp;&amp;(this.EraseMoveTool.position=cc.v3(4545455,455454)));var e=t.getLocation();if(this.BeganPoint=cc.v3(e),this.DrawingType!=r.FILL){if(this.DrawingType==r.STICKER){var n=this.DrawNode.convertToNodeSpaceAR(t.getLocation()),o=this.DrawNode.getContentSize();return n=cc.v2(n.x+o.width/2,o.height-(n.y+o.height/2)),this.floodfillcolor.fill(this.getRandomColor(),Math.floor(n.x),Math.floor(n.y),0),l.default.getInstance().play("particle1"),void this.CanvasManagerObj.AddSticker(Math.floor(n.x),Math.floor(n.y),this.StickerScale)}this.floodfillcolor&amp;&amp;this.SceneType!=s.DRAWING&amp;&amp;(n=this.DrawNode.convertToNodeSpaceAR(t.getLocation()),o=this.DrawNode.getContentSize(),n=cc.v2(n.x+o.width/2,o.height-(n.y+o.height/2)),this.floodfillcolor.fill(this.getRandomColor(),Math.floor(n.x),Math.floor(n.y),0)),0==this.isEnableColor&amp;&amp;0==this.isEnablePatternWithColor&amp;&amp;this.setPatternIndex(this.selectedPattern),this.CanvasManagerObj.updateGradient();var i=t.getPreviousLocation();this.isErase?(e.x=e.x,i.x=i.x,e.y=e.y,i.y=i.y):(e.x=e.x-this.DrawingOffset.x,i.x=i.x-this.DrawingOffset.x,e.y=e.y-this.DrawingOffset.y,i.y=i.y-this.DrawingOffset.y);var a=this.DrawNode.convertToNodeSpaceAR(e),c=this.DrawNode.getContentSize();e=cc.v2(a.x+c.width*this.node.getAnchorPoint().x,c.height-(a.y+c.height*this.node.getAnchorPoint().y));var h=this.DrawNode.convertToNodeSpaceAR(i);i=cc.v2(h.x+c.width*this.node.getAnchorPoint().x,c.height-(h.y+c.height*this.node.getAnchorPoint().y));var u=cc.v2(e.x-this.brushsize/2,e.y-this.brushsize/2);0==this.brushsize?this.UserContext.drawImage(this.BrushImage,u.x,u.y):this.UserContext.drawImage(this.BrushImage,u.x,u.y,this.brushsize,this.brushsize),this.UpdateMinMax(u),this.isUpdateDrawing=!0,this.imageData=this.getImageData(),this.imageData&amp;&amp;(this.SceneType==s.FILL_AND_DRAWING?this.CanvasManagerObj.UpdatePatternDrawingInBoundry(this.selectedPattern,this.imageData,this.Minx,this.Miny,this.Maxx,this.Maxy):this.CanvasManagerObj.UpdatePatternDrawingUsingPosition(this.selectedPattern,this.imageData,this.Minx,this.Miny,this.Maxx,this.Maxy)),!this.isErase&amp;&amp;this.MoveTool?this.MoveTool.position=cc.v3(this.MoveTool.parent.convertToNodeSpaceAR(t.getLocation())):this.isErase&amp;&amp;this.EraseMoveTool&amp;&amp;(this.EraseMoveTool.position=cc.v3(this.EraseMoveTool.parent.convertToNodeSpaceAR(t.getLocation()))),this.UserContext.clearRect(0,0,this.CanvasWidth,this.CanvasHeight),this.Minx=this.Maxx,this.Miny=this.Maxy,this.Maxx=0,this.Maxy=0}}},e.prototype.touchMove=function(t){if(this.DrawingType==r.DRAWING){var e=t.getLocation(),n=t.getPreviousLocation();this.isErase?(e.x=e.x,n.x=n.x,e.y=e.y,n.y=n.y):(e.x=e.x-this.DrawingOffset.x,n.x=n.x-this.DrawingOffset.x,e.y=e.y-this.DrawingOffset.y,n.y=n.y-this.DrawingOffset.y);var o=this.DrawNode.convertToNodeSpaceAR(e),i=this.DrawNode.getContentSize();e=cc.v2(o.x+i.width*this.node.getAnchorPoint().x,i.height-(o.y+i.height*this.node.getAnchorPoint().y));var a=this.DrawNode.convertToNodeSpaceAR(n);n=cc.v2(a.x+i.width*this.node.getAnchorPoint().x,i.height-(a.y+i.height*this.node.getAnchorPoint().y));for(var c=Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2)),l=0;l&lt;c;l+=3){var h=n.x-e.x,u=n.y-e.y,d=l/c,p=cc.v2(e.x+h*d,e.y+u*d);p=cc.v2(p.x-this.brushsize/2,p.y-this.brushsize/2),0==this.brushsize?this.UserContext.drawImage(this.BrushImage,p.x,p.y):this.UserContext.drawImage(this.BrushImage,p.x,p.y,this.brushsize,this.brushsize),this.UpdateMinMax(p)}!this.isErase&amp;&amp;this.MoveTool?this.MoveTool.position=cc.v3(this.MoveTool.parent.convertToNodeSpaceAR(t.getLocation())):this.isErase&amp;&amp;this.EraseMoveTool&amp;&amp;(this.EraseMoveTool.position=cc.v3(this.EraseMoveTool.parent.convertToNodeSpaceAR(t.getLocation()))),this.isUpdateDrawing=!0,this.imageData=this.getImageData(),this.SceneType==s.FILL_AND_DRAWING?(this.CanvasManagerObj.UpdatePatternDrawingInBoundry(this.selectedPattern,this.imageData,this.Minx,this.Miny,this.Maxx,this.Maxy),this.UserContext.clearRect(0,0,this.CanvasWidth,this.CanvasHeight),this.Minx=this.CanvasWidth,this.Miny=this.CanvasHeight,this.Maxx=0,this.Maxy=0):this.isUpdateDrawing=!0}},e.prototype.TouchEnd=function(t){if(this.Minx=this.CanvasWidth,this.Miny=this.CanvasHeight,this.Maxx=0,this.Maxy=0,this.HideTools(),this.DrawingType===r.DRAWING&amp;&amp;this.CanvasManagerObj.UpdateContext(),this.DrawingType==r.FILL&amp;&amp;!(Math.abs(this.BeganPoint.x-t.getLocationX())&gt;10||Math.abs(this.BeganPoint.y-t.getLocationY())&gt;10)){var e=this.DrawNode.convertToNodeSpaceAR(t.getLocation()),n=this.DrawNode.getContentSize();e=cc.v2(e.x+n.width/2,n.height-(e.y+n.height/2)),this.FillPointAt(Math.floor(e.x),Math.floor(e.y),this.getRandomColor())}},e.prototype.HideTools=function(){this.MoveTool&amp;&amp;(this.MoveTool.position=cc.v3(56565,565656)),this.EraseMoveTool&amp;&amp;(this.EraseMoveTool.position=cc.v3(56565,565656))},e.prototype.setMultiColor=function(t){this.CanvasManagerObj.isMultiColorOn=t},e.prototype.FillPointAt=function(t,e,n){t&lt;0||e&lt;0||t&gt;=this.DrawNode.width||e&gt;=this.DrawNode.height||this.floodfillcolor&amp;&amp;(this.floodfillcolor.isEnabledPattern=!1,this.floodfillcolor.fill(n,t,e,0),this.floodfillcolor.modifiedPixelsCount&gt;0&amp;&amp;(l.default.getInstance().play("Color fill tap"),this.CanvasManagerObj.UpdatePatternDrawingFloodFill(this.selectedPattern,this.floodfillcolor.modifiedPixelsIndex,this.floodfillcolor._newColor)))},e.prototype.setFillColor=function(t,e){this.isEnablePatternWithColor==e&amp;&amp;this.selectedFillColor.r==t.r&amp;&amp;this.selectedFillColor.g==t.g&amp;&amp;this.selectedFillColor.b==t.b||(this.selectedFillColor=t,this.isEnableColor=!0,this.isEnablePatternWithColor=e,this.isEnablePatternWithColor&amp;&amp;this.CanvasManagerObj.UpdatePatternWithColor(this.selectedFillColor))},e.prototype.setActiveDrawing=function(t){this.isActiveDrawing=t,this.isActiveDrawing?(cc.find("Canvas").on(cc.Node.EventType.TOUCH_MOVE,this.touchMove,this),cc.find("Canvas").on(cc.Node.EventType.TOUCH_START,this.touchStart,this),cc.find("Canvas").on(cc.Node.EventType.TOUCH_END,this.TouchEnd,this),cc.find("Canvas").on(cc.Node.EventType.TOUCH_CANCEL,this.TouchEnd,this)):(cc.find("Canvas").off(cc.Node.EventType.TOUCH_MOVE,this.touchMove,this),cc.find("Canvas").off(cc.Node.EventType.TOUCH_START,this.touchStart,this),cc.find("Canvas").off(cc.Node.EventType.TOUCH_END,this.TouchEnd,this),cc.find("Canvas").off(cc.Node.EventType.TOUCH_CANCEL,this.TouchEnd,this),this.HideTools())},e.prototype.UndoItems=function(){if(this.CanvasManagerObj.UndoData.length&gt;0){if(l.default.getInstance().play("eraser"),this.CanvasManagerObj.UndoData.splice(this.CanvasManagerObj.UndoData.length-1,1),0==this.CanvasManagerObj.UndoData.length)this.CanvasManagerObj.clearPicture();else{var t=this.CanvasManagerObj.UndoData.length-1,e=this.CanvasManagerObj.UndoData[t].data;this.CanvasManagerObj.OriginalData=e,this.CanvasManagerObj.setImageData(e)}return this.CanvasManagerObj.UndoData.length&gt;0}return!1},e.prototype.clearPicture=function(){this.CanvasManagerObj&amp;&amp;this.CanvasManagerObj.clearPicture()},e.prototype.FillFullTexture=function(){this.CanvasManagerObj.FillTexture(this.selectedPattern)},e.prototype.resetPicture=function(){this.CanvasManagerObj.resetTexture()},e.prototype.setDrawingOffset=function(t,e){this.DrawingOffset=cc.v2(t,e)},e.prototype.getImageData=function(){return this.UserContext.getImageData(0,0,this.CanvasWidth,this.CanvasHeight)},e.prototype.setBrushSize=function(t){this.brushsize=t},e.prototype.setEraseOn=function(t){this.CanvasManagerObj.setEraseOn(t),this.isErase=t},e.prototype.setPatternIndex=function(t){-1!=t&amp;&amp;(t&gt;this.DrawingTexture.length?alert("Index must spriteframe Range"):(this.isEnableColor=!1,this.selectedPattern=t,this.CanvasManagerObj.setPatternData(this.selectedPattern)))},e.prototype.getDrawingPercentage=function(){return this.CanvasManagerObj.getDrawingPercentage(this.selectedPattern)},e.prototype.isToolDone=function(){var t=this.getDrawingPercentage();if(this.isErase){if(t&lt;=this.ErasePercentage)return!0}else if(t&gt;=this.DrawingPercentage)return!0;return!1},e.prototype.getRandomColor=function(){return cc.color(u.getRandomNumber(10,255),u.getRandomNumber(10,255),u.getRandomNumber(10,255))},e.prototype.setSticker=function(t){this.CanvasManagerObj.setSticker(t)},e.prototype.addSticker=function(t,e){this.addSticker(t,e)},e.prototype.update=function(){this.SceneType!=s.FILL_AND_DRAWING&amp;&amp;this.isUpdateDrawing&amp;&amp;(this.isUpdateDrawing=!1,this.imageData=this.getImageData(),this.CanvasManagerObj.UpdatePatternDrawingUsingPosition(this.selectedPattern,this.imageData,this.Minx,this.Miny,this.Maxx,this.Maxy),this.UserContext.clearRect(0,0,this.CanvasWidth,this.CanvasHeight),this.Minx=this.CanvasWidth,this.Miny=this.CanvasHeight,this.Maxx=0,this.Maxy=0)},e.prototype.UpdatePatternColor=function(t,e){void 0===e&amp;&amp;(e=-1),"Lips"==this.node.name?this.CanvasManagerObj.UpdatePatternWithColorCode(1,t):-1==e?this.CanvasManagerObj.UpdatePatternWithColorCode(this.selectedPattern,t):this.CanvasManagerObj.UpdatePatternWithColorCode(e,t)},e.prototype.UpdateAllPatternColor=function(t){for(var e=0;e&lt;this.DrawingTexture.length;e++)this.CanvasManagerObj.UpdatePatternWithColorCode(e+1,t)},a([g()],e.prototype,"isActiveDrawing",void 0),a([g(cc.SpriteFrame)],e.prototype,"brush",void 0),a([g()],e.prototype,"brushsize",void 0),a([g()],e.prototype,"isErase",void 0),a([g()],e.prototype,"isRepeatPattern",void 0),a([g(cc.Vec2)],e.prototype,"DrawingOffset",void 0),a([g([cc.SpriteFrame])],e.prototype,"DrawingTexture",void 0),a([g(cc.SpriteFrame)],e.prototype,"DefaultTexture",void 0),a([g(cc.Node)],e.prototype,"OutLineNode",void 0),a([g()],e.prototype,"selectedPattern",void 0),a([g({type:cc.Enum(r)})],e.prototype,"DrawingType",void 0),a([g({type:cc.Enum(s)})],e.prototype,"SceneType",void 0),a([g()],e.prototype,"DrawingPercentage",void 0),a([g()],e.prototype,"ErasePercentage",void 0),a([g(cc.Node)],e.prototype,"Stickers",void 0),a([g()],e.prototype,"isEnableColor",void 0),a([g()],e.prototype,"isEnablePatternWithColor",void 0),a([g(cc.Node)],e.prototype,"MoveTool",void 0),a([g(cc.Node)],e.prototype,"EraseMoveTool",void 0),a([f],e)}(cc.Component);n.default=v,cc._RF.pop()},{"../FloodFill/FloodFill":"FloodFill","./AudioManager":"AudioManager","./CanvasManager":"CanvasManager","./CocosHelper":"CocosHelper","./GlobalData":"GlobalData"}],colorUtils:[function(t,e,n){"use strict";cc._RF.push(e,"4b109XahIhBcoA+LxKbA2kV","colorUtils"),Object.defineProperty(n,"__esModule",{value:!0}),n.isSameColor=n.setColorAtPixel=n.getColorAtPixel=void 0,n.getColorAtPixel=function(t,e,n){var o=t.width,i=t.data,a=4*(n*o+e);if(void 0===i[a+3])throw new Error("Invalid pixel coordinates: x="+e+"; y="+n);return cc.color(i[a],i[a+1],i[a+2],i[a+3])},n.setColorAtPixel=function(t,e,n,o){var i=t.width,a=t.data,r=4*(o*i+n);a[r+0]=255&amp;e.r,a[r+1]=255&amp;e.g,a[r+2]=255&amp;e.b,a[r+3]=255&amp;e.a},n.isSameColor=function(t,e,n){return void 0===n&amp;&amp;(n=0),!(Math.abs(t.r-e.r)&gt;n||Math.abs(t.g-e.g)&gt;n||Math.abs(t.b-e.b)&gt;n||Math.abs(t.a-e.a)&gt;n)},cc._RF.pop()},{}],floodindex:[function(t,e,n){"use strict";cc._RF.push(e,"590adKl+eFM06PQVg6fojU9","floodindex"),Object.defineProperty(n,"__esModule",{value:!0}),n.getColorAtPixel=n.setColorAtPixel=n.isSameColor=void 0;var o=t("./FloodFill"),i=t("./colorUtils");Object.defineProperty(n,"isSameColor",{enumerable:!0,get:function(){return i.isSameColor}}),Object.defineProperty(n,"setColorAtPixel",{enumerable:!0,get:function(){return i.setColorAtPixel}}),Object.defineProperty(n,"getColorAtPixel",{enumerable:!0,get:function(){return i.getColorAtPixel}}),n.default=o.default,cc._RF.pop()},{"./FloodFill":"FloodFill","./colorUtils":"colorUtils"}]},{},["MainScene","Page1","Page2","FloodFill","colorUtils","floodindex","AngleManager","AudioManager","AutoScroll","CanvasManager","CharacterConfig","CharacterHelper","CocosHelper","DragonHelper","DrawingManager","GlobalData","HairColorPicker","HelperTools","NodeMover","ParticleManager","PixelIntersect","Scaler","SessionStorageHelper","SpineHelper","StickerHelper","ToolMoveMaster","UserDrawing","AdManager","Promotion","RewardFailed"]);</pre></body></html>