tubao
Version:
Tubao建立在Egret白鹭引擎上并且提供了众多API工具箱可以直接使用,让游戏研发过程变的轻松简单。
4 lines • 120 kB
JavaScript
var __reflect=this&&this.__reflect||function(t,e,n){t.__class__=e,n?n.push(e):n=[e],t.__types__=t.__types__?n.concat(t.__types__):n},__extends=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);n.prototype=e.prototype,t.prototype=new n},__awaiter=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,r){function a(t){try{u(o.next(t))}catch(e){r(e)}}function s(t){try{u(o["throw"](t))}catch(e){r(e)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((o=o.apply(t,e||[])).next())})},__generator=this&&this.__generator||function(t,e){function n(t){return function(e){return o([t,e])}}function o(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,r&&(a=r[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(r,n[1])).done)return a;switch(r=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,r=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(o){n=[6,o],r=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,r,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),"throw":n(1),"return":n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},tubao;!function(t){var e;!function(e){var n=function(e){function n(t){var n=e.call(this)||this;return n.uiLayer=void 0,n.onOpen=!1,n.openPanelState=!1,n.percentHeight=100,n.percentWidth=100,n.uiLayer=t,n}return __extends(n,e),n.prototype.initPanel=function(){},n.prototype.open=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.uiLayer&&(egret.Tween.removeTweens(this),this.alpha=1,this.scaleX=1,this.scaleY=1,this.uiLayer.addChild(this),t.Effect.Popup.Resuit(this,1),this.onOpen=!0,this.openPanelState||this.initPanel(),this.openPanelState=!0)},n.prototype.close=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.uiLayer&&this.onOpen&&(egret.Tween.removeTweens(this),this.onOpen=!1,egret.Tween.get(this).to({alpha:0,scaleX:.8,scaleY:.8},500,egret.Ease.backOut).call(function(){t.uiLayer.removeChild(t)},this))},n}(eui.Component);e.panel=n,__reflect(n.prototype,"tubao.base.panel")}(e=t.base||(t.base={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){var n=function(n){function o(){var e=n.call(this,t.layer.LayerManager.UI_Message)||this;return e.skinName="tubaoDisplayObjectEditorSkin",t.utils.dragDisplauy(e.panel,e.gro,e.closeBtn),e.zuoBiaoX.type=egret.TextFieldType.INPUT,e.zuoBiaoY.type=egret.TextFieldType.INPUT,e.zuoBiaoX.addEventListener(egret.FocusEvent.FOCUS_OUT,e.zuoBiaoXfocusOut,e),e.zuoBiaoY.addEventListener(egret.FocusEvent.FOCUS_OUT,e.zuoBiaoYfocusOut,e),e.maoDianX.addEventListener(egret.FocusEvent.FOCUS_OUT,e.maoDianXfocusOut,e),e.maoDianY.addEventListener(egret.FocusEvent.FOCUS_OUT,e.maoDianYfocusOut,e),e.alphaHslider.addEventListener(egret.Event.CHANGE,e.alphaHsliderChange,e),e.rotationHslider.addEventListener(egret.Event.CHANGE,e.rotationHsliderChange,e),e.scaleHslider.addEventListener(egret.Event.CHANGE,e.scaleHsliderChange,e),e.visibleSelect.addEventListener(egret.Event.CHANGE,e.visibleSelectClick,e),e.maodian=new eui.Image,e.maodian.source="tubaoDisplayObjectEditorPanel_13_png",e.maodian.anchorOffsetX=9,e.maodian.anchorOffsetY=9,t.utils.dragDisplauy(e.maodian),e.maodian.addEventListener(egret.TouchEvent.TOUCH_MOVE,e.maodianMove,e),e}return __extends(o,n),o.prototype.analyDisplay=function(){this.verDisplay()||(this.zuoBiaoX.text=String(this.display.x),this.zuoBiaoY.text=String(this.display.y),this.maoDianX.text=String(this.display.anchorOffsetX),this.maoDianY.text=String(this.display.anchorOffsetY),this.display.parent.addChild(this.maodian),this.maodian.x=this.display.x,this.maodian.y=this.display.y,this.alphaHslider.value=e.tran.alphaH(this.display.alpha),this.rotationHslider.value=e.tran.rotationH(this.display.rotation),this.scaleHslider.value=e.tran.scaleH(this.display.scaleX),this.visibleSelect.selected=e.tran.visible(this.display,this.display.visible),t.utils.dragDisplauy(this.display),this.display.addEventListener(egret.TouchEvent.TOUCH_MOVE,this.displayMove,this))},o.prototype.huanYuanFun=function(){this.alphaHslider.value=e.tran.alphaH(1),this.rotationHslider.value=e.tran.rotationH(0),this.scaleHslider.value=e.tran.scaleH(1),this.visibleSelect.selected=e.tran.visible(this.display,!0)},o.prototype.maodianMove=function(t){this.maoDianX.text=String(this.display.anchorOffsetX),this.maoDianY.text=String(this.display.anchorOffsetY),this.display.anchorOffsetX=this.maodian.x-this.display.x,this.display.anchorOffsetY=this.maodian.y-this.display.y},o.prototype.displayMove=function(t){this.zuoBiaoX.text=String(this.display.x),this.zuoBiaoY.text=String(this.display.y),this.maodian.x=this.display.x,this.maodian.y=this.display.y},o.prototype.visibleSelectClick=function(){this.verDisplay()||(this.display.visible=e.tran.visible(this.display,this.visibleSelect.selected))},o.prototype.alphaHsliderChange=function(t){this.verDisplay()||(this.display.alpha=e.tran.alphaP(this.alphaHslider.value))},o.prototype.rotationHsliderChange=function(t){this.verDisplay()||(this.display.rotation=e.tran.rotationP(this.rotationHslider.value))},o.prototype.scaleHsliderChange=function(t){this.verDisplay()||(this.display.scaleX=e.tran.scaleP(this.scaleHslider.value),this.display.scaleY=e.tran.scaleP(this.scaleHslider.value))},o.prototype.maoDianXfocusOut=function(){this.verDisplay()||(this.display.anchorOffsetX=0/0!=Number(this.maoDianX.text)?Number(this.maoDianX.text):0)},o.prototype.maoDianYfocusOut=function(){this.verDisplay()||(this.display.anchorOffsetY=0/0!=Number(this.maoDianY.text)?Number(this.maoDianY.text):0)},o.prototype.zuoBiaoXfocusOut=function(){this.verDisplay()||(this.display.x=0/0!=Number(this.zuoBiaoX.text)?Number(this.zuoBiaoX.text):0)},o.prototype.zuoBiaoYfocusOut=function(){this.verDisplay()||(this.display.y=0/0!=Number(this.zuoBiaoY.text)?Number(this.zuoBiaoY.text):0)},o.prototype.verDisplay=function(){return this.display?!1:(new t.base.popup("basics01_png","并没有足够指定要被解析的显示对象~"),!0)},o}(t.base.panel);e.tubaoDisplayObjectEditorBase=n,__reflect(n.prototype,"tubao.editor.tubaoDisplayObjectEditorBase")}(e=t.editor||(t.editor={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(){function e(){var t=this;this._cache={},this._loadingCache=new Array,setInterval(function(){t.dealSoundTimer()},6e4)}return e.prototype.dealSoundTimer=function(){for(var e=egret.getTimer(),n=Object.keys(this._cache),o=0,i=n.length;i>o;o++){var r=n[o];this.checkCanClear(r)&&e-this._cache[r]>=t.manager.CLEAR_TIME&&(delete this._cache[r],RES.destroyRes(r))}},e.prototype.getSound=function(t){var e=RES.getRes(t);if(e)this._cache[t]&&(this._cache[t]=egret.getTimer());else{if(-1!=this._loadingCache.indexOf(t))return null;this._loadingCache.push(t),RES.getResAsync(t,this.onResourceLoadComplete,this)}return e},e.prototype.onResourceLoadComplete=function(t,e){var n=this._loadingCache.indexOf(e);-1!=n&&(this._loadingCache.splice(n,1),this._cache[e]=egret.getTimer(),this.loadedPlay(e))},e.prototype.loadedPlay=function(t){},e.prototype.checkCanClear=function(t){return!0},e}();t.BaseSound=e,__reflect(e.prototype,"tubao.sound.BaseSound")}(e=t.sound||(t.sound={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(t){function e(){var e=t.call(this)||this;return e.percentWidth=100,e.percentHeight=100,e.touchEnabled=!0,e.touchThrough=!0,e}return __extends(e,t),e}(eui.UILayer);t.layer=e,__reflect(e.prototype,"tubao.layer.layer")}(e=t.layer||(t.layer={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(t){function e(){var e=t.call(this)||this;return e._textfiled=new egret.TextField,e.addChild(e._textfiled),e}return __extends(e,t),Object.defineProperty(e.prototype,"text",{get:function(){return this._textfiled.text},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"twidth",{get:function(){return this._textfiled.width},set:function(t){this._textfiled.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"theight",{get:function(){return this._textfiled.height},set:function(t){this._textfiled.height=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textWidth",{get:function(){return this._textfiled.textWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textHeight",{get:function(){return this._textfiled.textHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textFlow",{get:function(){return this._textfiled.textFlow},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textAlign",{get:function(){return this._textfiled.textAlign},set:function(t){this._textfiled.textAlign=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._textfiled.size},set:function(t){this._textfiled.size=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textColor",{get:function(){return this._textfiled.textColor},set:function(t){this._textfiled.textColor=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stroke",{get:function(){return this._textfiled.stroke},set:function(t){this._textfiled.stroke=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strokeColor",{get:function(){return this._textfiled.strokeColor},set:function(t){this._textfiled.strokeColor=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lineSpacing",{get:function(){return this._textfiled.lineSpacing},set:function(t){this._textfiled.lineSpacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bold",{get:function(){return this._textfiled.bold},set:function(t){this._textfiled.bold=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"italic",{get:function(){return this._textfiled.italic},set:function(t){this._textfiled.italic=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontFamily",{get:function(){return this._textfiled.fontFamily},set:function(t){this._textfiled.fontFamily=t},enumerable:!0,configurable:!0}),e}(egret.DisplayObjectContainer);t.richTextFiledBase=e,__reflect(e.prototype,"tubao.fields.richTextFiledBase")}(e=t.fields||(t.fields={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(e){function n(){var n=e.call(this)||this;return n.vessel1=new eui.Group,n.vessel2=new eui.Group,n.bitmap1=new eui.Image,n.bitmap2=new eui.Image,n.bitmap3=new eui.Image,n.isDown=!1,n.skinName="paintSkin",n.arg={brushAlpha:.6,color:16711680,size:30,blurX:.3,blurY:.3,bitmap:null,brush:t.brush.sprite,brushArg:{cmd:1,width:1,height:2,bitmap:"head_png"}},n.addEventListener(egret.TouchEvent.TOUCH_BEGIN,n.onTouchBegin,n),n.addEventListener(egret.TouchEvent.TOUCH_END,n.onTouchEend,n),n}return __extends(n,e),n.prototype.onTouchBegin=function(t){this.beginTouch(t.stageX,t.stageY)},n.prototype.beginTouch=function(t,e){this.addEventListener(egret.TouchEvent.TOUCH_MOVE,this.onTouchMove,this),this.isDown=!0,this.oldX=t,this.oldY=e,this.blurFliter=new egret.BlurFilter(this.arg.blurX*this.arg.size,this.arg.blurY*this.arg.size),this.vessel0.filters=[this.blurFliter],this.arg.bitmap?(this.bitmap2.source=this.arg.bitmap,this.bitmap2.mask=this.bitmap1,this.bitmap2.visible=!0):(this.bitmap2.mask=null,this.bitmap2.visible=!1)},n.prototype.onTouchEend=function(t){this.touchEnd()},n.prototype.touchEnd=function(){this.removeEventListener(egret.TouchEvent.TOUCH_MOVE,this.onTouchMove,this.bitmap2),this.isDown=!1,this.oldX=null},n.prototype.onTouchMove=function(t){this.moveTouch(t.stageX,t.stageY)},n.prototype.moveTouch=function(t,e){for(var n=t-this.oldX,o=e-this.oldY,i=Math.sqrt(n*n+o*o),r=i*this.arg.brushAlpha,a=0;r>a;a++){var s=n/r*(a+1)+this.oldX,u=o/r*(a+1)+this.oldY;this.vessel0.addChild(this.move(s,u,this.arg.brush))}this.oldX=t,this.oldY=e;var l=this.getTexture(0,0,this.width,this.height,this.vessel1);this.bitmap1.texture=l;var c=this.getTexture(0,0,this.width,this.height,this.vessel2);this.bitmap3.texture=c,this.clearmc(this.vessel0)},n.prototype.move=function(e,n,o){var i=t.getBrush(o);return i.init(this.arg),i.x=e,i.y=n,i.x-=i.width/2,i.y-=i.height/2,i},n.prototype.clearmc=function(t){for(;t.numChildren>0;)t.removeChildAt(0);return t},n.prototype.getTexture=function(t,e,n,o,i){var r=new egret.RenderTexture,a=new egret.Rectangle(t,e,n,o);return r.drawToTexture(i,a),r},n}(eui.Component);t.paint=e,__reflect(e.prototype,"tubao.paint.paint")}(e=t.paint||(t.paint={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(e){function n(t,n){void 0===n&&(n=!0);var o=e.call(this)||this;return o.skeleton={},o.initYes=!1,o.dbDataList={},o._flip=!1,o._scale=void 0,o.dbFactory=new dragonBones.EgretFactory,o.dbFactory.clock.timeScale=.7,t&&n&&o.lodin(t),o}return __extends(n,e),n.prototype.thisDBSlotReplaceOutsideDBSlot=function(t,e,n,o,i,r){var a=this;i&&i.display&&i.display.texture&&(i.display.visible=!1),RES.getResAsync(t+"_ske_json",function(s){RES.getResAsync(t+"_tex_json",function(u){RES.getResAsync(t+"_tex_png",function(l){a.dbDataList[s.name]||(a.dbDataList[s.name]=!0,a.dbFactory.parseDragonBonesData(s),a.dbFactory.parseTextureAtlasData(u,l)),a.dbFactory.replaceSlotDisplay(t,e,n,o,i,r),i.clothId=o,i.display.name=n,a.initYes=!0,i.display.visible=!0},a)},a)},this)},n.prototype.lodin=function(e){var n=this;RES.getResAsync(e+"_ske_json",function(o){RES.getResAsync(e+"_tex_json",function(i){RES.getResAsync(e+"_tex_png",function(e){n.dbBonesData=n.dbFactory.parseDragonBonesData(o),n.dbtexureData=n.dbFactory.parseTextureAtlasData(i,e),n.dbFactory.addDragonBonesData(n.dbBonesData),n.dbFactory.addTextureAtlasData(n.dbtexureData);for(var r in n.dbBonesData.armatureNames){var a=n.dbBonesData.armatureNames[r];n.skeleton[a]=n.dbFactory.buildArmature(a),n.dbFactory.clock.add(n.skeleton[a])}n.initYes=!0;var s=new t.dbEvent(t.dbEvent.lodingOver);n.dispatchEvent(s)},n)},n)},this)},n.prototype.flipSkeleton=function(t,e){var n=this.nameGetSkeleton(t).display;e?n.scaleX=-Math.abs(n.scaleX):n.scaleX=Math.abs(n.scaleX)},Object.defineProperty(n.prototype,"flip",{get:function(){return this._flip},set:function(t){if(t)for(var e in this.skeleton)this.skeleton[e].display.scaleX=-Math.abs(this.skeleton[e].display.scaleX);else for(var e in this.skeleton)this.skeleton[e].display.scaleX=Math.abs(this.skeleton[e].display.scaleX);this._flip=t},enumerable:!0,configurable:!0}),n.prototype.speedSkeleton=function(t,e){var n=this.nameGetSkeleton(t).animation;n.timeScale=e},Object.defineProperty(n.prototype,"speed",{set:function(t){for(var e in this.skeleton)this.skeleton[e].animation.timeScale=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scale",{get:function(){return this._scale},set:function(t){for(var e in this.skeleton)this._scale=t,this.scaleSetSkeletonName(e,t)},enumerable:!0,configurable:!0}),n.prototype.scaleSetSkeletonName=function(t,e){var n=this.nameGetSkeleton(t).display;n.scaleX?n.scaleX=e:n.scaleX=-e,n.scaleY?n.scaleY=e:n.scaleY=-e},n.prototype.skeletonVisible=function(t,e){this.nameGetSkeleton(t).display.visible=e},n.prototype.displaySkeleton=function(t){var e=this.nameGetSkeleton(t).display;return e},n.prototype.displaySlot=function(t,e){return this.nameGetSlot(t,e).display},n.prototype.displayBone=function(t,e){return this.nameGetBone(t,e).offset},n.prototype.nameGetSlot=function(t,e){var n=this.nameGetSkeleton(t),o=n.getSlot(e);return o},n.prototype.nameGetBone=function(t,e){var n=this.nameGetSkeleton(t),o=n.getBone(e);return o||console.log(e+"-骨节不存在于-"+n.name+"-骨架上"),o},n.prototype.nameGetSkeleton=function(t){return void 0==this.skeleton[t]&&(this.dbBonesData?console.error(t+"-骨架不存在于-"+this.dbBonesData.name+"-数据节点上"):console.error(t+"-骨架不存在于数据节点上")),this.skeleton[t]},n}(eui.Component);t.DBbasice=e,__reflect(e.prototype,"tubao.DB.DBbasice")}(e=t.DB||(t.DB={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){function e(t){function e(){t.removeEventListener(egret.TouchEvent.TOUCH_BEGIN,n,this),t.removeEventListener(egret.TouchEvent.TOUCH_END,i,this),t.removeEventListener(egret.Event.REMOVED,e,this)}function n(e){s=!0,u.x=e.stageX-t.x,u.y=e.stageY-t.y,t.stage.addEventListener(egret.TouchEvent.TOUCH_MOVE,o,this)}function o(e){if(s){t.x=e.stageX-u.x,t.y=e.stageY-u.y;for(var n in l)l[n].x=e.stageX-u.x+c[n],l[n].y=e.stageY-u.y+h[n]}}function i(e){s=!1,t.stage.removeEventListener(egret.TouchEvent.TOUCH_MOVE,o,this)}for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];var s=!1,u=new egret.Point,l=[],c=[],h=[];l=r;for(var f in r)l[f]=r[f],c[f]=r[f].x-t.x,h[f]=r[f].y-t.y;t.addEventListener(egret.TouchEvent.TOUCH_BEGIN,n,this),t.addEventListener(egret.TouchEvent.TOUCH_END,i,this),t.addEventListener(egret.Event.REMOVED,e,this)}t.dragDisplauy=e;var n=function(t){function e(){var e=t.call(this)||this;return e._touchStatus=!1,e._distance=new egret.Point,e.addEventListener(egret.TouchEvent.TOUCH_BEGIN,e.mouseDown,e),e.addEventListener(egret.TouchEvent.TOUCH_END,e.mouseUp,e),e.addEventListener(egret.Event.REMOVED,e.removed,e),e}return __extends(e,t),e.prototype.removed=function(){this.removeEventListener(egret.TouchEvent.TOUCH_BEGIN,this.mouseDown,this),this.removeEventListener(egret.TouchEvent.TOUCH_END,this.mouseUp,this),this.removeEventListener(egret.Event.REMOVED,this.removed,this)},e.prototype.mouseDown=function(t){this._touchStatus=!0,this._distance.x=t.stageX-this.x,this._distance.y=t.stageY-this.y,this.stage.addEventListener(egret.TouchEvent.TOUCH_MOVE,this.mouseMove,this)},e.prototype.mouseMove=function(t){this._touchStatus&&(this.x=t.stageX-this._distance.x,this.y=t.stageY-this._distance.y)},e.prototype.mouseUp=function(t){this._touchStatus=!1,this.stage.removeEventListener(egret.TouchEvent.TOUCH_MOVE,this.mouseMove,this)},e}(eui.Component);t.drag=n,__reflect(n.prototype,"tubao.utils.drag")}(e=t.utils||(t.utils={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){}(e=t.Appli||(t.Appli={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e;!function(t){function e(t,e,n){var o=t.flashFilter;if(!o){var i=e,r=1,a=35,s=35,u=2,l=3;o=new egret.GlowFilter(i,r,a,s,u,l),t.filters=[o],t.flashFilter=o}egret.Tween.get(o).to({alpha:0},n).to({alpha:1},n).call(this.startFlash,this,[t,e,n])}function n(t){var e=t.flashFilter;e&&(egret.Tween.removeTweens(e),t.filters=null,delete t.flashFilter)}function o(t,e,n){var o,i=e,r=1,a=35,s=35,u=2,l=3;o=new egret.GlowFilter(i,r,a,s,u,l),t.filters=[o],egret.Tween.get(o).to({alpha:0},n).to({alpha:1},n).to({alpha:0},n).call(function(){egret.Tween.removeTweens(t)})}t.startFlash=e,t.stopFlash=n,t.startFlashOne=o}(e=t.flash||(t.flash={}))}(e=t.Effect||(t.Effect={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){function n(e){var n=t.stage;switch(e){case 1:n.scaleMode=egret.StageScaleMode.FIXED_HEIGHT;break;case 2:n.scaleMode=egret.StageScaleMode.FIXED_NARROW;break;case 3:n.scaleMode=egret.StageScaleMode.FIXED_WIDE;break;case 4:n.scaleMode=egret.StageScaleMode.FIXED_WIDTH;break;case 5:n.scaleMode=egret.StageScaleMode.NO_BORDER;break;case 6:n.scaleMode=egret.StageScaleMode.NO_SCALE;break;case 7:n.scaleMode=egret.StageScaleMode.SHOW_ALL;break;case 8:n.scaleMode=egret.StageScaleMode.EXACT_FIT}}function o(e){var n=t.stage;switch(e){case 1:n.orientation=egret.OrientationMode.LANDSCAPE;break;case 2:n.orientation=egret.OrientationMode.LANDSCAPE_FLIPPED;break;case 3:n.orientation=egret.OrientationMode.PORTRAIT;break;case 4:n.orientation=egret.OrientationMode.AUTO}}e.suoFang=n,e.xuanZuan=o}(e=t.model||(t.model={}))}(tubao||(tubao={}));var tubao;!function(t){var e=function(t){function e(){var e=t.call(this)||this,n=16776960,o=.5,i=20,r=20,a=2,s=3,u=!1,l=!1;return e.glowFilter=new egret.GlowFilter(n,o,i,r,a,s,u,l),e.Red=new eui.Image,e.Red.source="ltian_6_png",e.addChild(e.Red),e.onOffRed(!1),e}return __extends(e,t),e.prototype.onOffRed=function(t){this.Red.visible=t,t?(this.glowFilter.alpha=1,this.filters=[this.glowFilter]):(this.glowFilter.alpha=0,this.filters=[])},e}(eui.Button);t.RedPioxyImg=e,__reflect(e.prototype,"tubao.RedPioxyImg")}(tubao||(tubao={}));var tubao;!function(t){var e=function(){function t(){}return t.init=function(){this._configs=new Array,this._groups={},RES.addEventListener(RES.ResourceEvent.GROUP_COMPLETE,this.onResourceLoadComplete,this),RES.addEventListener(RES.ResourceEvent.GROUP_PROGRESS,this.onResourceLoadProgress,this),RES.addEventListener(RES.ResourceEvent.GROUP_LOAD_ERROR,this.onResourceLoadError,this),RES.addEventListener(RES.ResourceEvent.ITEM_LOAD_ERROR,this.onResourceItemLoadError,this)},t.addConfig=function(t,e){this._configs.push([t,e])},t.loadConfig=function(t,e){this._onConfigComplete=t,this._onConfigCompleteTarget=e,this.loadNextConfig()},t.loadNextConfig=function(){if(0==this._configs.length)return this._onConfigComplete.call(this._onConfigCompleteTarget),this._onConfigComplete=null,void(this._onConfigCompleteTarget=null);var t=this._configs.shift();RES.addEventListener(RES.ResourceEvent.CONFIG_COMPLETE,this.onConfigCompleteHandle,this),RES.loadConfig(t[0],t[1])},t.onConfigCompleteHandle=function(t){RES.removeEventListener(RES.ResourceEvent.CONFIG_COMPLETE,this.onConfigCompleteHandle,this),this.loadNextConfig()},t.loadGroup=function(t,e,n,o){this._groups[t]=[e,n,o],RES.loadGroup(t)},t.loadGroups=function(t,e,n,o,i){RES.createGroup(t,e,!0),this.loadGroup(t,n,o,i)},t.pilfererLoadGroup=function(t,e){void 0===e&&(e=null);var n="pilferer_"+t;e||(e=[t]),RES.createGroup(n,e,!0),RES.loadGroup(n,-1)},t.onResourceLoadComplete=function(t){var e=t.groupName;if(this._groups[e]){var n=this._groups[e][0],o=this._groups[e][2];null!=n&&n.apply(o,[e]),this._groups[e]=null,delete this._groups[e]}},t.onResourceLoadProgress=function(t){var e=t.groupName;if(this._groups[e]){var n=this._groups[e][1],o=this._groups[e][2];null!=n&&n.call(o,t.itemsLoaded,t.itemsTotal)}},t.onResourceLoadError=function(t){console.warn(t.groupName+"资源组有资源加载失败"),this.onResourceLoadComplete(t)},t.onResourceItemLoadError=function(t){console.warn(t.resItem.url+"资源加载失败"),this._itemLoadErrorFunction&&this._itemLoadErrorFunction(t)},t.loadResource=function(t,e,n,o,i){void 0===t&&(t=[]),void 0===e&&(e=[]),void 0===n&&(n=null),void 0===o&&(o=null),void 0===i&&(i=null);var r=t.concat(e),a="loadGroup"+this._groupIndex++;RES.createGroup(a,r,!0),this._groups[a]=[n,o,i],RES.loadGroup(a)},t.createGroup=function(t,e){RES.createGroup(t,e,!0)},t.createResource=function(t,e,n){var o={name:t,type:e,url:n};RES.$addResourceData(o)},t.getFileRealPath=function(t){var e=RES.getResourceInfo(t);return e.root+e.url},t._groupIndex=0,t}();t.res=e,__reflect(e.prototype,"tubao.res")}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){var n=function(){function e(t){var e=this;this.replace="*",this.labJson={},RES.getResAsync("vocabulary_json",function(n){e.charMapDoc=e.buildMap(n.data),e.replace=t},this)}return e.prototype.buildMap=function(t){for(var e=new Map,n=0,o=t;n<o.length;n++)for(var i=o[n],r=e,a=0;a<i.length;a++){var s=i.charAt(a),u=r.get(s);if(u){if(r=r.get(s),r.get("laster")===!0)break}else{var l=new Map;a==i.length-1&&l.set("laster",!0),r.set(s,l),r=r.get(s)}}return e},e.prototype.charPlayVer=function(t,e){for(var n=this.charMapDoc,o=!1,i=0,r="",a=e;a<t.length;a++){var s=t.charAt(a);if(n=n.get(s),!n)break;i++,r+=s,n.get("laster")===!0&&(o=!0)}return 2>i&&(o=!1),{flag:o,sensitiveWord:r}},e.prototype.disposeEn=function(e){for(var n=e.text.replace(/[\u2000-\u2FFF \uFF00-\uFFFF]+/g,""),o=0;o<n.length;o++){var i=this.charPlayVer(n,o);if(i.flag){var r=new RegExp(i.sensitiveWord,"g");return e.text=e.text.replace(r,""),t.Appli.hint.send('发现违规词语"'+i.sensitiveWord+'"已删除~',"#FF4040"),!1}}return!0},e.prototype.dispose=function(e){for(var n=e.text.replace(/[0-9 A-Z a-z \u0000-\u0FFF \u2000-\u2FFF \uFF00-\uFFFF]+/g,""),o=0;o<n.length;o++){var i=this.charPlayVer(n,o);if(i.flag){var r=new RegExp(i.sensitiveWord,"g");return e.text=e.text.replace(r,""),t.Appli.hint.send('发现违规词语"'+i.sensitiveWord+'"已删除~',"#FF4040",!0),!1}}return!0},e.prototype.addEventDoNoChar=function(t){var e=this;this.labJson[t.hashCode]||(this.labJson[t.hashCode]=!0,t.addEventListener(egret.Event.CHANGE,function(){e.dispose(t),e.disposeEn(t)},this),t.addEventListener(egret.Event.FOCUS_IN,function(){e.dispose(t),e.disposeEn(t)},this),t.addEventListener(egret.Event.FOCUS_OUT,function(){e.dispose(t),e.disposeEn(t)},this),t.addEventListener(egret.TouchEvent.TOUCH_MOVE,function(){e.dispose(t),e.disposeEn(t)},this),t.addEventListener(egret.TouchEvent.TOUCH_BEGIN,function(){e.dispose(t),e.disposeEn(t)},this),t.addEventListener(egret.TouchEvent.TOUCH_TAP,function(){e.dispose(t),e.disposeEn(t)},this),t.addEventListener(egret.TouchEvent.TOUCH_END,function(){e.dispose(t),e.disposeEn(t)},this))},e}();e.sensitive=n,__reflect(n.prototype,"tubao.sensitive.sensitive")}(e=t.sensitive||(t.sensitive={}))}(tubao||(tubao={}));var tubao;!function(t){var e=function(){function t(){this.time=new Date,this.tim=new egret.Timer(1e3),this.tim.addEventListener(egret.TimerEvent.TIMER,this.timerAddS,this)}return t.prototype.SetTimer=function(t){this.time=new Date(t),this.tim.start()},t.prototype.timerAddS=function(){this.time.setSeconds(this.time.getSeconds()+1)},t.prototype.clock=function(t,e,n){var o=this;setInterval(function(){var i=o.time,r=(i.getDate(),i.getHours()),a=i.getMinutes(),s=i.getSeconds();10>r&&(r="0"+r),10>a&&(a="0"+a),10>s&&(s="0"+s),e.text=""+t+r+":"+a+":"+s+n},1e3,this)},t}();t.sysTimer=e,__reflect(e.prototype,"tubao.sysTimer")}(tubao||(tubao={}));var tubao;!function(t){var e=function(t){function e(){var e=t.call(this)||this;return e.addEventListener(eui.UIEvent.CHANGE,e.changeHandler,e),e}return __extends(e,t),e.prototype.changeHandler=function(t){var e=t.target.selected;e?this.alpha=1:this.alpha=.6},e}(eui.ToggleSwitch);t.toggleTubao=e,__reflect(e.prototype,"tubao.toggleTubao")}(tubao||(tubao={}));var tubao;!function(t){function e(e,n,o){t.device.isChannel?(wx.setClipboardData({data:e}),new t.base.popup("basics01_png","链接地址已经复制到了剪贴板,在浏览器中粘贴就可以访问了。")):window.open(e,n,o)}function n(){location.reload()}function o(){if("windows"==t.device.DeviceOs&&"web"==egret.Capabilities.runtimeType){var e=window.document.location.hostname;("localhost"==e||"127.0.0.1"==e||"192.168"==e.substring(0,7))&&window.close()}}var i=function(e){function n(){var n=e.call(this)||this;return setInterval(function(){t.runTime?t.runTime+=1e3:t.runTime=1e3},1e3),t.stage=egret.MainContext.instance.stage,t.height=t.stage.stageHeight,t.width=t.stage.stageWidth,t.stage.addEventListener(egret.Event.RESIZE,n.setTubaoReat,n),t.res.init(),t.sound.manager.init(),t.layer.sceneManager.register(100,new t.layer.scene),t.layer.sceneManager.runScene(100),n.miniGamePlay(),n}return __extends(n,e),n.prototype.miniGamePlay=function(){switch(egret.Capabilities.runtimeType){case egret.RuntimeType.WEB:break;case egret.RuntimeType.RUNTIME2:break;case egret.RuntimeType.WXGAME:break;case egret.RuntimeType.QQGAME:qq.showShareMenu({showShareItems:["qq","qzone","wechatFriends","wechatMoment"]}),qq.updateShareMenu({withShareTicket:!0});break;case egret.RuntimeType.TTGAME:break;case egret.RuntimeType.KSGAME:break;case egret.RuntimeType.QGAME:}},n.prototype.setTubaoReat=function(e){t.height=t.stage.stageHeight,t.width=t.stage.stageWidth},n}(egret.DisplayObjectContainer);t.tubaoInit=i,__reflect(i.prototype,"tubao.tubaoInit"),t.open=e,t.reload=n,t.security=o}(tubao||(tubao={})),window.tubao=tubao;var tubao;!function(t){var e=function(t){function e(){var e=t.call(this)||this;return e.shurutai=!1,e.defaultText="默认的文本内容",e.defaultColor=13414817,e.convenColor=2493952,e.addEventListener(egret.FocusEvent.FOCUS_IN,e.focusIn,e),e.addEventListener(egret.FocusEvent.FOCUS_OUT,e.focusOut,e),e.addEventListener(egret.Event.CHANGE,e.change,e),e.addEventListener(egret.TouchEvent.TOUCH_TAP,e.touchTap,e),e}return __extends(e,t),e.prototype.change=function(){this.verValColorTool()},e.prototype.touchTap=function(){this.text==this.defaultText&&(this.text=""),this.shurutai=!0,this.setFocus()},e.prototype.focusIn=function(){this.verValTool(),this.verValColorTool()},e.prototype.focusOut=function(){this.shurutai=!1,this.verValTool(),this.verValColorTool()},e.prototype.nono=function(){""==this.text&&(this.text=this.defaultText),this.verValTool(),this.verValColorTool()},e.prototype.verValTool=function(){""==this.text&&0==this.shurutai&&(this.text=this.defaultText)},e.prototype.verValColorTool=function(){this.text==this.defaultText?this.textColor=this.defaultColor:this.textColor=this.convenColor},e}(eui.Label);t.tubaoLabel=e,__reflect(e.prototype,"tubao.tubaoLabel")}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(){function t(){}return t.prototype.getAsset=function(t,e,n){function o(o){e.call(n,o,t)}if(RES.hasRes(t)){var i=RES.getRes(t);i?o(i):RES.getResAsync(t,o,this)}else RES.getResByUrl(t,o,this,RES.ResourceItem.TYPE_IMAGE)},t}();t.asset=e,__reflect(e.prototype,"tubao.adapter.asset",["eui.IAssetAdapter"])}(e=t.adapter||(t.adapter={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(){function t(){}return t.prototype.getTheme=function(t,e,n,o){function i(t){e.call(o,t)}function r(e){e.resItem.url==t&&(RES.removeEventListener(RES.ResourceEvent.ITEM_LOAD_ERROR,r,null),n.call(o))}var a=this;if("undefined"!=typeof generateEUI)egret.callLater(function(){e.call(o,generateEUI)},this);else if("undefined"!=typeof generateEUI2)RES.getResByUrl("resource/gameEui.json",function(t,n){window.JSONParseClass.setData(t),egret.callLater(function(){e.call(o,generateEUI2)},a)},this,RES.ResourceItem.TYPE_JSON);else if("undefined"!=typeof generateJSON)if(t.indexOf(".exml")>-1){var s=t.split("/");s.pop();var u=s.join("/")+"_EUI.json";generateJSON.paths[t]?egret.callLater(function(){e.call(o,generateJSON.paths[t])},this):RES.getResByUrl(u,function(n){window.JSONParseClass.setData(n),egret.callLater(function(){e.call(o,generateJSON.paths[t])},a)},this,RES.ResourceItem.TYPE_JSON)}else egret.callLater(function(){e.call(o,generateJSON)},this);else RES.addEventListener(RES.ResourceEvent.ITEM_LOAD_ERROR,r,null),RES.getResByUrl(t,i,this,RES.ResourceItem.TYPE_TEXT)},t}();t.theme=e,__reflect(e.prototype,"tubao.adapter.theme",["eui.IThemeAdapter"])}(e=t.adapter||(t.adapter={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e;!function(t){function e(t,e,n){return t.length<=e||t.length>=n?!1:!0}function n(t){var e=/[`\'[\]·%&{}"|“”‘’]/im;return e.test(t)?!1:!0}function o(t){return/.*[\u4e00-\u9fa5]+.*$/.test(t)?!1:!0}function i(t,e){var n=t.x,o=t.y;t.x=e.x,t.y=e.y,e.x=n,e.y=o}function r(t,e){for(var n=String(t),o="",i=e-n.length,r=0;i>r;r++)o+="0";return o+=n}function a(t){var e=/^\d+(\.\d+)?$/,n=/^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/;return e.test(t)||n.test(t)?!0:!1}function s(t){if(!t)return null;var e=Math.floor(Math.random()*t.length);return t[e]}function u(t,e){return Math.floor(l(t,e+1))}function l(t,e){t=Math.min(t,e),e=Math.max(t,e);var n=e-t;return t+Math.random()*n}function c(t,e){return Math.floor(Math.random()*(e-t+1)+t)}function h(t){var e=0;for(var n in t)e++;return e}function f(t){for(var e=[],n=t.slice(0),o=0;o<t.length;o++)e.push(p(n).maxNum),n.splice(p(n).index,1);return e}function p(t){for(var e=-(1/0),n=-1,o=0;o<t.length;o++)t[o]>e&&(e=t[o],n=o);return{maxNum:e,index:n}}function g(t){for(var e=[],n=t.concat(),o=0;o<t.length;o++)e.push(d(n).minNum),n.splice(d(n).index,1);return e}function d(t){for(var e=1/0,n=-1,o=0;o<t.length;o++)t[o]<e&&(e=t[o],n=o);
return{minNum:e,index:n}}function v(t,e,n){var o=n,i=o.getPixels(t,e,1,1),r=65536*i[0]+256*i[1]+i[2];return[i[0],i[1],i[2],r]}t.charLengthCheck=e,t.onExpecialChar=n,t.onChinaStr=o,t.DisLocationExchange=i,t.fill=r,t.isNumber=a,t.randomArray=s,t.limitInteger=u,t.limit=l,t.randomFrom=c,t.getJsonLength=h,t.arrSortMaxToMin=f,t.arrMaxNum=p,t.arrSortMinToMax=g,t.arrMinNum=d,t.getColorRGB=v}(e=t.algo||(t.algo={}))}(e=t.algo||(t.algo={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e;!function(t){var e=function(t){function e(e,n,o){return void 0===n&&(n=!1),void 0===o&&(o=!1),t.call(this,e,n,o)||this}return __extends(e,t),e.clickNoGotoPix="点了一个无效位置",e}(egret.Event);t.astarEvent=e,__reflect(e.prototype,"tubao.algo.astar.astarEvent");var n=function(){function t(t,e){this.walkable=!0,this.costMultiplier=1,this.x=t,this.y=e}return t}();t.Node=n,__reflect(n.prototype,"tubao.algo.astar.Node");var o=function(){function t(t,e){this._numCols=t,this._numRows=e,this._nodes=[];for(var o=0;t>o;o++){this._nodes[o]=[];for(var i=0;e>i;i++)this._nodes[o][i]=new n(o,i)}}return t.prototype.getNode=function(t,e){return this._nodes[t][e]},t.prototype.setEndNode=function(t,e){this._endNode=this._nodes[t][e]},t.prototype.setStartNode=function(t,e){this._startNode=this._nodes[t][e]},t.prototype.setWalkable=function(t,e,n){this._nodes[t][e].walkable=n},Object.defineProperty(t.prototype,"endNode",{get:function(){return this._endNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numCols",{get:function(){return this._numCols},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numRows",{get:function(){return this._numRows},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"startNode",{get:function(){return this._startNode},enumerable:!0,configurable:!0}),t}();t.Grid=o,__reflect(o.prototype,"tubao.algo.astar.Grid");var i=function(t){function n(){var e=t.call(this)||this;return e._straightCost=1,e._diagCost=Math.SQRT2,e._heuristic=e.diagonal,e}return __extends(n,t),n.prototype.findPath=function(t){return this._grid=t,this._open=[],this._closed=[],this._startNode=this._grid.startNode,this._endNode=this._grid.endNode,this._startNode.g=0,this._startNode.h=this._heuristic(this._startNode),this._startNode.f=this._startNode.g+this._startNode.h,this.search()},n.prototype.search=function(){for(var t=this._startNode;t!=this._endNode;){for(var n=Math.max(0,t.x-1),o=Math.min(this._grid.numCols-1,t.x+1),i=Math.max(0,t.y-1),r=Math.min(this._grid.numRows-1,t.y+1),a=n;o>=a;a++)for(var s=i;r>=s;s++){var u=this._grid.getNode(a,s);if(u!=t&&u.walkable&&this._grid.getNode(t.x,u.y).walkable&&this._grid.getNode(u.x,t.y).walkable){var l=this._straightCost;t.x!=u.x&&t.y!=u.y&&(l=this._diagCost);var c=t.g+l*u.costMultiplier,h=this._heuristic(u),f=c+h;this.isOpen(u)||this.isClosed(u)?u.f>f&&(u.f=f,u.g=c,u.h=h,u.parent=t):(u.f=f,u.g=c,u.h=h,u.parent=t,this._open.push(u))}}for(var p=0;p<this._open.length;p++);if(this._closed.push(t),0==this._open.length){console.log("AStar >> no path found");var g=new e(e.clickNoGotoPix);return this.dispatchEvent(g),!1}for(var d=this._open.length,v=0;d>v;v++)for(var y=v+1;d>y;y++)if(this._open[v].f>this._open[y].f){var b=this._open[v];this._open[v]=this._open[y],this._open[y]=b}t=this._open.shift()}return this.buildPath(),!0},n.prototype.buildPath=function(){this._path=new Array;var t=this._endNode;for(this._path.push(t);t!=this._startNode;)t=t.parent,this._path.unshift(t)},Object.defineProperty(n.prototype,"path",{get:function(){return this._path},enumerable:!0,configurable:!0}),n.prototype.isOpen=function(t){for(var e=0;e<this._open.length;e++)if(this._open[e]==t)return!0;return!1},n.prototype.isClosed=function(t){for(var e=0;e<this._closed.length;e++)if(this._closed[e]==t)return!0;return!1},n.prototype.manhattan=function(t){return Math.abs(t.x-this._endNode.x)*this._straightCost+Math.abs(t.y+this._endNode.y)*this._straightCost},n.prototype.euclidian=function(t){var e=t.x-this._endNode.x,n=t.y-this._endNode.y;return Math.sqrt(e*e+n*n)*this._straightCost},n.prototype.diagonal=function(t){var e=Math.abs(t.x-this._endNode.x),n=Math.abs(t.y-this._endNode.y),o=Math.min(e,n),i=e+n;return this._diagCost*o+this._straightCost*(i-2*o)},Object.defineProperty(n.prototype,"visited",{get:function(){return this._closed.concat(this._open)},enumerable:!0,configurable:!0}),n}(egret.EventDispatcher);t.AStar=i,__reflect(i.prototype,"tubao.algo.astar.AStar")}(e=t.astar||(t.astar={}))}(e=t.algo||(t.algo={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(){function t(){}return t.ab2str=function(t){return String.fromCharCode.apply(null,new Uint16Array(t))},t.str2ab=function(t){for(var e=new ArrayBuffer(2*t.length),n=new Uint16Array(e),o=0,i=t.length;i>o;o++)n[o]=t.charCodeAt(o);return e},t}();t.bit=e,__reflect(e.prototype,"tubao.algo.bit")}(e=t.algo||(t.algo={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(){function t(){}return t.hsl=function(t,e,n){var o=this.hslToRgb(t,e,n),i=65536*o.red+256*o.green+o.blue;return i},t.hslToRgb=function(t,e,n){var o,i,r;if(0==e)o=i=r=n;else{var a,s;a=.5>n?n*(1+e):n+e-n*e,s=2*n-a,o=this.hue2rgb(s,a,t+1/3),i=this.hue2rgb(s,a,t),r=this.hue2rgb(s,a,t-1/3)}return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*r)}},t.hue2rgb=function(t,e,n){return 0>n&&(n+=1),n>1&&(n-=1),1/6>n?t+6*(e-t)*n:.5>n?e:2/3>n?t+(e-t)*(2/3-n)*6:t},t.hsv=function(t,e,n){var o=this.hsvtorgb(t,e,n),i=65536*o[0]+256*o[1]+o[2];return i},t.hsvtorgb=function(t,e,n){e/=100,n/=100;var o,i,r,a=Math.floor(t/60)%6,s=t/60-a,u=n*(1-e),l=n*(1-s*e),c=n*(1-(1-s)*e);switch(a){case 0:o=n,i=c,r=u;break;case 1:o=l,i=n,r=u;break;case 2:o=u,i=n,r=c;break;case 3:o=u,i=l,r=n;break;case 4:o=c,i=u,r=n;break;case 5:o=n,i=u,r=l}return[Math.round(255*o),Math.round(255*i),Math.round(255*r)]},t.hexTorgb=function(t){return t=t.replace("#",""),t=t.trim(),parseInt(t.substring(0,2),16)+","+parseInt(t.substring(2,4),16)+","+parseInt(t.substring(4,6),16)},t.rgbToHex=function(t,e,n){return this.toHex(t)+this.toHex(e)+this.toHex(n)},t.toHex=function(t){return t=parseInt(t,10),isNaN(t)?"00":(t=Math.max(0,Math.min(t,255)),"0123456789ABCDEF".charAt((t-t%16)/16)+"0123456789ABCDEF".charAt(t%16))},t.RgbToCmyk=function(t,e,n){if(0==t&&0==e&&0==n)return[0,0,0,1];var o=1-t/255,i=1-e/255,r=1-n/255,a=Math.min(o,Math.min(i,r)),s=(o-a)/(1-a),u=(i-a)/(1-a),l=(r-a)/(1-a);return s.toFixed(4)+","+u.toFixed(4)+","+l.toFixed(4)+","+a.toFixed(4)},t.cmyk2rgb=function(t,e,n,o){var i=Number(t),r=Number(e),a=Number(n),s=Number(o);i>0?i=i:r>0?r=r:a>0?a=a:s>0&&(s=s);var u=1-Math.min(1,i*(1-s)+s),l=1-Math.min(1,r*(1-s)+s),c=1-Math.min(1,a*(1-s)+s);return u=Math.round(255*u),l=Math.round(255*l),c=Math.round(255*c),u+","+l+","+c},t.hsv2rgb=function(t,e,n){var o=Number(t),i=Number(e),r=Number(n),a=Math.floor(6*o),s=6*o-a,u=r*(1-i),l=r*(1-s*i),c=r*(1-(1-s)*i),h=0,f=0,p=0;switch(a%6){case 0:h=r,f=c,p=u;break;case 1:h=l,f=r,p=u;break;case 2:h=u,f=r,p=c;break;case 3:h=u,f=l,p=r;break;case 4:h=c,f=u,p=r;break;case 5:h=r,f=u,p=l}return Math.floor(255*h)+","+Math.floor(255*f)+","+Math.floor(255*p)},t.rgb2hsv=function(t,e,n){var o,i,r=Number(t)/255,a=Number(e)/255,s=Number(n)/255,u=Math.max(r,a,s),l=Math.min(r,a,s),c=u,h=u-l;if(i=0==u?0:h/u,u==l)o=0;else{switch(u){case r:o=(a-s)/h+(s>a?6:0);break;case a:o=(s-r)/h+2;break;case s:o=(r-a)/h+4}o/=6}return o.toFixed(4)+","+i.toFixed(4)+","+c.toFixed(4)},t}();t.color=e,__reflect(e.prototype,"tubao.algo.color")}(e=t.algo||(t.algo={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){function n(e){if(e&&!(e.numChildren<=1)){for(var n=[],o=0;o<e.numChildren;o++)n[o]=e.getChildAt(o).y;for(var i=t.algo.algo.arrSortMinToMax(n),r=0;r<i.length;r++)for(var a=0;a<e.numChildren;a++)e.getChildAt(a).y==i[r]&&e.setChildIndex(e.getChildAt(a),r)}}e.disSort=n}(e=t.algo||(t.algo={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e;!function(t){function e(t,e,o,i,r){void 0===r&&(r=a.eight);var s=(Math.abs(o-t/2),Math.abs(i-e/2),t>o?t-o:o-t),u=e>i?e-i:i-e,l=Math.sqrt(s*s+u*u),c=Math.atan2(i-e,o-t),h=180*c/Math.PI,f=n(h,r);return{dire:f,vr:h,angleSpeed:c,distance:l,gapWidth:s,gapHeight:u}}function n(t,e){switch(e){case a.four:return o(t);case a.eight:return i(t)}}function o(t){return 45>=t&&t>=-45?r.right:135>=t&&t>=46?r.front:-45>=t&&t>=-135?r.rear:-135>=t||t>=135?r.left:void 0}function i(t){return 20>=t&&t>=-20?r.right:110>=t&&t>=70?r.front:-170>=t||t>=170?r.left:-70>=t&&t>=-110?r.rear:70>t&&t>20?r.frontRight:170>t&&t>110?r.frontLeft:-110>t&&t>-170?r.rearLeft:-20>t&&t>-70?r.rearRight:void 0}var r;!function(t){t[t.front=0]="front",t[t.frontLeft=1]="frontLeft",t[t.frontRight=2]="frontRight",t[t.rear=3]="rear",t[t.rearLeft=4]="rearLeft",t[t.rearRight=5]="rearRight",t[t.left=6]="left",t[t.right=7]="right"}(r=t.direction||(t.direction={}));var a;!function(t){t[t.four=0]="four",t[t.eight=1]="eight"}(a=t.vrType||(t.vrType={})),t.movePoint=e,t.getDirection=n,t.getDirectionFor=o,t.getDirectionEight=i}(e=t.moveMath||(t.moveMath={}))}(e=t.algo||(t.algo={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(){function t(){}return t.randomString=function(t){for(var e="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",n=e.length,o="",i=0;t>i;i++)o+=e.charAt(Math.floor(Math.random()*n));return o},t.randomStringu=function(t){for(var e="㐀㐁㐂㐃㐄㐅㐆㐇㐈㐉㐐㐑㐒㐓㐔㐕㐖㐗㐘㐙㐠㐡㐢㐣㐤㐥㐦㐧㐨㐩㐰㐱㐲㐳㐴㐵㐶㐷㐸㐹㑀㑁㑂㑃㑄㑅㑆㑇㑈㑉㑐㑑㑒㑓㑔㑕㑖㑗㑘㑙㑠㑡㑢㑣㑤㑥㑦㑧㑨㑩㑰㑱㑲㑳㑴㑵㑶㑷㑸㑹㒀㒁㒂㒃㒄㒅㒆㒇㒈㒉㒐㒑㒒㒓㒔㒕㒖㒗㒘㒙㔀㔁㔂㔃㔄㔅㔆㔇㔈㔉㔐㔑㔒㔓㔔㔕㔖㔗㔘㔙㔠㔡㔢㔣㔤㔥㔦㔧㔨㔩㔰㔱㔲㔳㔴㔵㔶㔷㔸㔹㕀㕁㕂㕃㕄㕅㕆㕇㕈㕉㕐㕑㕒㕓㕔㕕㕖㕗㕘㕙㕠㕡㕢㕣㕤㕥㕦㕧㕨㕩㕰㕱㕲㕳㕴㕵㕶㕷㕸㕹㖀㖁㖂㖃㖄㖅㖆㖇㖈㖉㖐㖑㖒㖓㖔㖕㖖㖗㖘㖙㘀㘁㘂㘃㘄㘅㘆㘇㘈㘉㘐㘑㘒㘓㘔㘕㘖㘗㘘㘙㘠㘡㘢㘣㘤㘥㘦㘧㘨㘩㘰㘱㘲㘳㘴㘵㘶㘷㘸㘹㙀㙁㙂㙃㙄㙅㙆㙇㙈㙉㙐㙑㙒㙓㙔㙕㙖㙗㙘㙙㙠㙡㙢㙣㙤㙥㙦㙧㙨㙩㙰㙱㙲㙳㙴㙵㙶㙷㙸㙹㚀㚁㚂㚃㚄㚅㚆㚇㚈㚉㚐㚑㚒㚓㚔㚕㚖㚗㚘㚙㜀㜁㜂㜃㜄㜅㜆㜇㜈㜉㜐㜑㜒㜓㜔㜕㜖㜗㜘㜙㜠㜡㜢㜣㜤㜥㜦㜧㜨㜩㜰㜱㜲㜳㜴㜵㜶㜷㜸㜹㝀㝁㝂㝃㝄㝅㝆㝇㝈㝉㝐㝑㝒㝓㝔㝕㝖㝗㝘㝙㝠㝡㝢㝣㝤㝥㝦㝧㝨㝩㝰㝱㝲㝳㝴㝵㝶㝷㝸㝹㞀㞁㞂㞃㞄㞅㞆㞇㞈㞉㞐㞑㞒㞓㞔㞕㞖㞗㞘㞙㠀㠁㠂㠃㠄㠅㠆㠇㠈㠉㠐㠑㠒㠓㠔㠕㠖㠗㠘㠙㠠㠡㠢㠣㠤㠥㠦㠧㠨㠩㠰㠱㠲㠳㠴㠵㠶㠷㠸㠹㡀㡁㡂㡃㡄㡅㡆㡇㡈㡉㡐㡑㡒㡓㡔㡕㡖㡗㡘㡙㡠㡡㡢㡣㡤㡥㡦㡧㡨㡩㡰㡱㡲㡳㡴㡵㡶㡷㡸㡹㢀㢁㢂㢃㢄㢅㢆㢇㢈㢉㢐㢑㢒㢓㢔㢕㢖㢗㢘㢙㤀㤁㤂㤃㤄㤅㤆㤇㤈㤉㤐㤑㤒㤓㤔㤕㤖㤗㤘㤙㤠㤡㤢㤣㤤㤥㤦㤧㤨㤩㤰㤱㤲㤳㤴㤵㤶㤷㤸㤹㥀㥁㥂㥃㥄㥅㥆㥇㥈㥉㥐㥑㥒㥓㥔㥕㥖㥗㥘㥙㥠㥡㥢㥣㥤㥥㥦㥧㥨㥩㥰㥱㥲㥳㥴㥵㥶㥷㥸㥹㦀㦁㦂㦃㦄㦅㦆㦇㦈㦉㦐㦑㦒㦓㦔㦕㦖㦗㦘㦙䀀䀁䀂䀃䀄䀅䀆䀇䀈䀉䀐䀑䀒䀓䀔䀕䀖䀗䀘䀙䀠䀡䀢䀣䀤䀥䀦䀧䀨䀩䀰䀱䀲䀳䀴䀵䀶䀷䀸䀹䁀䁁䁂䁃䁄䁅䁆䁇䁈䁉䁐䁑䁒䁓䁔䁕䁖䁗䁘䁙䁠䁡䁢䁣䁤䁥䁦䁧䁨䁩䁰䁱䁲䁳䁴䁵䁶䁷䁸䁹䂀䂁䂂䂃䂄䂅䂆䂇䂈䂉䂐䂑䂒䂓䂔䂕䂖䂗䂘䂙䄀䄁䄂䄃䄄䄅䄆䄇䄈䄉䄐䄑䄒䄓䄔䄕䄖䄗䄘䄙䄠䄡䄢䄣䄤䄥䄦䄧䄨䄩䄰䄱䄲䄳䄴䄵䄶䄷䄸䄹䅀䅁䅂䅃䅄䅅䅆䅇䅈䅉䅐䅑䅒䅓䅔䅕䅖䅗䅘䅙䅠䅡䅢䅣䅤䅥䅦䅧䅨䅩䅰䅱䅲䅳䅴䅵䅶䅷䅸䅹䆀䆁䆂䆃䆄䆅䆆䆇䆈䆉䆐䆑䆒䆓䆔䆕䆖䆗䆘䆙䈀䈁䈂䈃䈄䈅䈆䈇䈈䈉䈐䈑䈒䈓䈔䈕䈖䈗䈘䈙䈠䈡䈢䈣䈤䈥䈦䈧䈨䈩䈰䈱䈲䈳䈴䈵䈶䈷䈸䈹䉀䉁䉂䉃䉄䉅䉆䉇䉈䉉䉐䉑䉒䉓䉔䉕䉖䉗䉘䉙䉠䉡䉢䉣䉤䉥䉦䉧䉨䉩䉰䉱䉲䉳䉴䉵䉶䉷䉸䉹䊀䊁䊂䊃䊄䊅䊆䊇䊈䊉䊐䊑䊒䊓䊔䊕䊖䊗䊘䊙䌀䌁䌂䌃䌄䌅䌆䌇䌈䌉䌐䌑䌒䌓䌔䌕䌖䌗䌘䌙䌠䌡䌢䌣䌤䌥䌦䌧䌨䌩䌰䌱䌲䌳䌴䌵䌶䌷䌸䌹䍀䍁䍂䍃䍄䍅䍆䍇䍈䍉䍐䍑䍒䍓䍔䍕䍖䍗䍘䍙䍠䍡䍢䍣䍤䍥䍦䍧䍨䍩䍰䍱䍲䍳䍴䍵䍶䍷䍸䍹䎀䎁䎂䎃䎄䎅䎆䎇䎈䎉䎐䎑䎒䎓䎔䎕䎖䎗䎘䎙䐀䐁䐂䐃䐄䐅䐆䐇䐈䐉䐐䐑䐒䐓䐔䐕䐖䐗䐘䐙䐠䐡䐢䐣䐤䐥䐦䐧䐨䐩䐰䐱䐲䐳䐴䐵䐶䐷䐸䐹䑀䑁䑂䑃䑄䑅䑆䑇䑈䑉䑐䑑䑒䑓䑔䑕䑖䑗䑘䑙䑠䑡䑢䑣䑤䑥䑦䑧䑨䑩䑰䑱䑲䑳䑴䑵䑶䑷䑸䑹䒀䒁䒂䒃䒄䒅䒆䒇䒈䒉䒐䒑䒒䒓䒔䒕䒖䒗䒘䒙䔀䔁䔂䔃䔄䔅䔆䔇䔈䔉䔐䔑䔒䔓䔔䔕䔖䔗䔘䔙䔠䔡䔢䔣䔤䔥䔦䔧䔨䔩䔰䔱䔲䔳䔴䔵䔶䔷䔸䔹䕀䕁䕂䕃䕄䕅䕆䕇䕈䕉䕐䕑䕒䕓䕔䕕䕖䕗䕘䕙䕠䕡䕢䕣䕤䕥䕦䕧䕨䕩䕰䕱䕲䕳䕴䕵䕶䕷䕸䕹䖀䖁䖂䖃䖄䖅䖆䖇䖈䖉䖐䖑䖒䖓䖔䖕䖖䖗䖘䖙䘀䘁䘂䘃䘄䘅䘆䘇䘈䘉䘐䘑䘒䘓䘔䘕䘖䘗䘘䘙䘠䘡䘢䘣䘤䘥䘦䘧䘨䘩䘰䘱䘲䘳䘴䘵䘶䘷䘸䘹䙀䙁䙂䙃䙄䙅䙆䙇䙈䙉䙐䙑䙒䙓䙔䙕䙖䙗䙘䙙䙠䙡䙢䙣䙤䙥䙦䙧䙨䙩䙰䙱䙲䙳䙴䙵䙶䙷䙸䙹䚀䚁䚂䚃䚄䚅䚆䚇䚈䚉䚐䚑䚒䚓䚔䚕䚖䚗䚘䚙䜀䜁䜂䜃䜄䜅䜆䜇䜈䜉䜐䜑䜒䜓䜔䜕䜖䜗䜘䜙䜠䜡䜢䜣䜤䜥䜦䜧䜨䜩䜰䜱䜲䜳䜴䜵䜶䜷䜸䜹䝀䝁䝂䝃䝄䝅䝆䝇䝈䝉䝐䝑䝒䝓䝔䝕䝖䝗䝘䝙䝠䝡䝢䝣䝤䝥䝦䝧䝨䝩䝰䝱䝲䝳䝴䝵䝶䝷䝸䝹䞀䞁䞂䞃䞄䞅䞆䞇䞈䞉䞐䞑䞒䞓䞔䞕䞖䞗䞘䞙䠀䠁䠂䠃䠄䠅䠆䠇䠈䠉䠐䠑䠒䠓䠔䠕䠖䠗䠘䠙䠠䠡䠢䠣䠤䠥䠦䠧䠨䠩䠰䠱䠲䠳䠴䠵䠶䠷䠸䠹䡀䡁䡂䡃䡄䡅䡆䡇䡈䡉䡐䡑䡒䡓䡔䡕䡖䡗䡘䡙䡠䡡䡢䡣䡤䡥䡦䡧䡨䡩䡰䡱䡲䡳䡴䡵䡶䡷䡸䡹䢀䢁䢂䢃䢄䢅䢆䢇䢈䢉䢐䢑䢒䢓䢔䢕䢖䢗䢘䢙䤀䤁䤂䤃䤄䤅䤆䤇䤈䤉䤐䤑䤒䤓䤔䤕䤖䤗䤘䤙䤠䤡䤢䤣䤤䤥䤦䤧䤨䤩䤰䤱䤲䤳䤴䤵䤶䤷䤸䤹䥀䥁䥂䥃䥄䥅䥆䥇䥈䥉䥐䥑䥒䥓䥔䥕䥖䥗䥘䥙䥠䥡䥢䥣䥤䥥䥦䥧䥨䥩䥰䥱䥲䥳䥴䥵䥶䥷䥸䥹䦀䦁䦂䦃䦄䦅䦆䦇䦈䦉䦐䦑䦒䦓䦔䦕䦖䦗䦘䦙倀倁倂倃倄倅倆倇倈倉倐們倒倓倔倕倖倗倘候倠倡倢倣値倥倦倧倨倩倰倱倲倳倴倵倶倷倸倹偀偁偂偃偄偅偆假偈偉偐偑偒偓偔偕偖偗偘偙偠偡偢偣偤健偦偧偨偩偰偱偲偳側偵偶偷偸偹傀傁傂傃傄傅傆傇傈傉傐傑傒傓傔傕傖傗傘備儀儁儂儃億儅儆儇儈儉儐儑儒儓儔儕儖儗儘儙儠儡儢儣儤儥儦儧儨儩儰儱儲儳儴儵儶儷儸儹兀允兂元兄充兆兇先光児兑兒兓兔兕兖兗兘兙兠兡兢兣兤入兦內全兩兰共兲关兴兵其具典兹冀冁冂冃冄内円冇冈冉冐冑冒冓冔冕冖冗冘写刀刁刂刃刄刅分切刈刉刐刑划刓刔刕刖列刘则删刡刢刣判別刦刧刨利到刱刲刳刴刵制刷券刹剀剁剂剃剄剅剆則剈剉剐剑剒剓剔剕剖剗剘剙剠剡剢剣剤剥剦剧剨剩剰剱割剳剴創剶剷剸剹劀劁劂劃劄劅劆劇劈劉劐劑劒劓劔劕劖劗劘劙匀匁匂匃匄包匆匇匈匉匐匑匒匓匔匕化北匘匙匠匡匢匣匤匥匦匧匨匩匰匱匲匳匴匵匶匷匸匹區十卂千卄卅卆升午卉卐卑卒卓協单卖南単卙占卡卢卣卤卥卦卧卨卩印危卲即却卵卶卷卸卹厀厁厂厃厄厅历厇厈厉厐厑厒厓厔厕厖厗厘厙吀吁吂吃各吅吆吇合吉吐向吒吓吔吕吖吗吘吙吠吡吢吣吤吥否吧吨吩吰吱吲吳吴吵吶吷吸吹呀呁呂呃呄呅呆呇呈呉呐呑呒呓呔呕呖呗员呙呠呡呢呣呤呥呦呧周呩呰呱呲味呴呵呶呷呸呹咀咁咂咃咄咅咆咇咈咉咐咑咒咓咔咕咖咗咘咙唀唁唂唃唄唅唆唇唈唉唐唑唒唓唔唕唖唗唘唙唠唡唢唣唤唥唦唧唨唩唰唱唲唳唴唵唶唷唸唹啀啁啂啃啄啅商啇啈啉啐啑啒啓啔啕啖啗啘啙啠啡啢啣啤啥啦啧啨啩啰啱啲啳啴啵啶啷啸啹喀喁喂喃善喅喆喇喈喉喐喑喒喓喔喕喖喗喘喙嘀嘁嘂嘃嘄嘅嘆嘇嘈嘉嘐嘑嘒嘓嘔嘕嘖嘗嘘嘙嘠嘡嘢嘣嘤嘥嘦嘧嘨嘩嘰嘱嘲嘳嘴嘵嘶嘷嘸嘹噀噁噂噃噄噅噆噇噈噉噐噑噒噓噔噕噖噗噘噙噠噡噢噣噤噥噦噧器噩噰噱噲噳噴噵噶噷噸噹嚀嚁嚂嚃嚄嚅嚆嚇嚈嚉嚐嚑嚒嚓嚔嚕嚖嚗嚘嚙圀圁圂圃圄圅圆圇圈圉圐圑園圓圔圕圖圗團圙圠圡圢圣圤圥圦圧在圩地圱圲圳圴圵圶圷圸圹址坁坂坃坄坅坆均坈坉坐坑坒坓坔坕坖块坘坙坠坡坢坣坤坥坦坧坨坩坰坱坲坳坴坵坶坷坸坹垀垁垂垃垄垅垆垇垈垉垐垑垒垓垔垕垖垗垘垙堀堁堂堃堄堅堆堇堈堉堐堑堒堓堔堕堖堗堘堙堠堡堢堣堤堥堦堧堨堩堰報堲堳場堵堶堷堸堹塀塁塂塃塄塅塆塇塈塉塐塑塒塓塔塕塖塗塘塙塠塡塢塣塤塥塦塧塨塩塰塱塲塳塴塵塶塷塸塹墀墁墂境墄墅墆墇墈墉墐墑墒墓墔墕墖増墘墙夀夁夂夃处夅夆备夈変夐夑夒夓夔夕外夗夘夙夠夡夢夣夤夥夦大夨天夰失夲夳头夵夶夷夸夹奀奁奂奃奄奅奆奇奈奉奐契奒奓奔奕奖套奘奙奠奡奢奣奤奥奦奧奨奩奰奱奲女奴奵奶奷奸她妀妁如妃妄妅妆妇妈妉妐妑妒妓妔妕妖妗妘妙怀态怂怃怄怅怆怇怈怉怐怑怒怓怔怕怖怗怘怙怠怡怢怣怤急怦性怨怩怰怱怲怳怴怵怶怷怸怹恀恁恂恃恄恅恆恇恈恉恐恑恒恓恔恕恖恗恘恙恠恡恢恣恤恥恦恧恨恩恰恱恲恳恴恵恶恷恸恹悀悁悂悃悄悅悆悇悈悉悐悑悒悓悔悕悖悗悘悙愀愁愂愃愄愅愆愇愈愉愐愑愒愓愔愕愖愗愘愙愠愡愢愣愤愥愦愧愨愩愰愱愲愳愴愵愶愷愸愹慀慁慂慃慄慅慆慇慈慉慐慑慒慓慔慕慖慗慘慙慠慡慢慣慤慥慦慧慨慩慰慱慲慳慴慵慶慷慸慹憀憁憂憃憄憅憆憇憈憉憐憑憒憓憔憕憖憗憘憙戀戁戂戃戄戅戆戇戈戉成我戒戓戔戕或戗战戙戠戡戢戣戤戥戦戧戨戩戰戱戲戳戴戵戶户戸戹所扁扂扃扄扅扆扇扈扉扐扑扒打扔払扖扗托扙扠扡扢扣扤扥扦执扨扩扰扱扲扳扴扵扶扷扸批技抁抂抃抄抅抆抇抈抉抐抑抒抓抔投抖抗折抙挀持挂挃挄挅挆指挈按挐挑挒挓挔挕挖挗挘挙挠挡挢挣挤挥挦挧挨挩挰挱挲挳挴挵挶挷挸挹捀捁捂捃捄捅捆捇捈捉捐捑捒捓捔捕捖捗捘捙捠捡换捣捤捥捦捧捨捩捰捱捲捳捴捵捶捷捸捹掀掁掂掃掄掅掆掇授掉掐掑排掓掔掕掖掗掘掙搀搁搂搃搄搅搆搇搈搉搐搑搒搓搔搕搖搗搘搙搠搡搢搣搤搥搦搧搨搩搰搱搲搳搴搵搶搷搸搹摀摁摂摃摄摅摆摇摈摉摐摑摒摓摔摕摖摗摘摙摠摡摢摣摤摥摦摧摨摩摰摱摲摳摴摵摶摷摸摹撀撁撂撃撄撅撆撇撈撉撐撑撒撓撔撕撖撗撘撙攀攁攂攃攄攅攆攇攈攉攐攑攒攓攔攕攖攗攘攙攠攡攢攣攤攥攦攧攨攩攰攱攲攳攴攵收攷攸改敀敁敂敃敄故敆敇效敉敐救敒敓敔敕敖敗敘教敠敡敢散敤敥敦敧敨敩数敱敲敳整敵敶敷數敹斀斁斂斃斄斅斆文斈斉斐斑斒斓斔斕斖斗斘料昀昁昂昃昄昅昆昇昈昉昐昑昒易昔昕昖昗昘昙映昡昢昣昤春昦昧昨昩昰昱昲昳昴昵昶昷昸昹晀晁時晃晄晅晆晇晈晉晐晑晒晓晔晕晖晗晘晙晠晡晢晣晤晥晦晧晨晩晰晱晲晳晴晵晶晷晸晹暀暁暂暃暄暅暆暇暈暉暐暑暒暓暔暕暖暗暘暙最朁朂會朄朅朆朇月有朐朑朒朓朔朕朖朗朘朙朠朡朢朣朤朥朦朧木朩朰朱朲朳朴朵朶朷朸朹杀杁杂权杄杅杆杇杈杉材村杒杓杔杕杖杗杘杙杠条杢杣杤来杦杧杨杩杰東杲杳杴杵杶杷杸杹枀极枂枃构枅枆枇枈枉析枑枒枓枔枕枖林枘枙栀栁栂栃栄栅栆标栈栉栐树栒栓栔栕栖栗栘栙栠校栢栣栤栥栦栧栨栩栰栱栲栳栴栵栶样核根桀桁桂桃桄桅框桇案桉桐桑桒桓桔桕桖桗桘桙桠桡桢档桤桥桦桧桨桩桰桱桲桳桴桵桶桷桸桹梀梁梂梃梄梅梆梇梈梉梐梑梒梓梔梕梖梗梘梙椀椁椂",n=e.length,o="",i=0;t>i;i++)o+=e.charAt(Math.floor(Math.random()*n));return o},t.TimerSet=function(t){void 0===t&&(t=0);var e=new Date,n=e.getFullYear(),o=e.getMonth()+1,t=e.getDate()+t;return n+"-"+o+"-"+t},t.timerPricise=function(){var t=new Date,e=t.getFullYear(),n=t.getMonth()+1,o=t.getDate(),i=t.getHours(),r=t.getMinutes(),a=t.getSeconds();return e+"-"+n+"-"+o+" "+i+":"+r+":"+a},t.timerPricisehmg=function(t){var e=new Date(t),n=e.getDate(),o=e.getHours(),i=e.getMinutes();return n+"-"+o+":"+i},t.timerRough=function(){var t=new Date,e=t.getFullYear(),n=t.getMonth()+1,o=t.getDate()+o;return e+"-"+n+"-"+o},t.ver=function(t){return null==t?!1:""==t?!1:this.patrn.test(t)?!1:!0},t.chaosArr=function(t){return t.sort(this.randomNumber)},t.randomNumber=function(){return.5-Math.random()},t.scoueRandom=function(t,e){return Math.floor(Math.random()*(t-e-1)+e+1)},t.odds=function(t){return this.scoueRandom(1,100)<=t?!0:!1},t.IsNumber=function(t){return isNaN(t)?!1:!0},t.IsMuiti=function(t,e){for(var n=!1,o=0;o<e.length;o++)e[o]==t&&(n=!0);return n},t.InNumber=function(t,e){return this.IsNumber(t)?this.IsMuiti(t,e):!1},t.NumberScope=function(t,e,n){return t>=e&&n>=t?!0:!1},t.ArrayAccord=function(t,e,n){for(var o=0;o<t.length;o++)if(!this.NumberScope(t[o],e,n))return!1;return!0},t.StringAccord=function(t,e,n){return this.isString(t)&&t.length>e&&t.length<n?!0:!1},t.isString=function(t){return"string"==typeof t?!0:!1},t.swap=function(t,e){var n=t;t=e,e=n},t.enumGetArrExclude=function(t,e){var n=[];for(var o in t)isNaN(Number(o))||o!=e&&n.push(Number(o));return n},t.enumGetArrKey=function(t){var e=[];for(var n in t)isNaN(Number(n))&&e.push(n);return e},t.enumGetArrValue=function(t){var e=[];for(var n in t)isNaN(Number(n))||e.push(Number(n));return e},t.enumGetOneValue=function(t){t||console.log("返回随机枚举是空的"+t);var e=this.enumGetArrValue(t),n=this.returnArrOneVal(e);return n},t.returnArrOneVal=function(t){var e=this.scoueRandom(0,t.length-1);return t[e]},t.patrn=/[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/im,t}();t.tool=e,__reflect(e.prototype,"tubao.algo.tool")}(e=t.algo||(t.algo={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(){function t(){this.delta=2654435769}return t.getInstance=function(){return t.instance||(t.instance=new t),this.instance},t.prototype.toUint8Array=function(t,e){var n=t.length,o=n<<2;if(e){var i=t[n-1];if(o-=4,o-3>i||i>o)return null;o=i}for(var r=new Uint8Array(o),a=0;o>a;++a)r[a]=t[a>>2]>>((3&a)<<3);return r},t.prototype.toUint32Array=function(t,e){var n=t.length,o=n>>2;0!==(3&n)&&++o;var i;e?(i=new Uint32Array(o+1),i[o]=n):i=new Uint32Array(o);for(var r=0;n>r;++r)i[r>>2]|=t[r]<<((3&r)<<3);return i},t.prototype.mx=function(t,e,n,o,i,r){return(n>>>5^e<<2)+(e>>>3^n<<4)^(t^e)+(r[3&o^i]^n)},t.prototype.fixk=function(t){if(t.length<16){var e=new Uint8Array(16);e.set(t),t=e}return t},t.prototype.encryptUint32Array=function(t,e){var n,o,i,r,a,s,u=t.length,l=u-1;for(o=t[l],i=0,s=0|Math.floor(6+52/u);s>0;--s){for(i+=this.delta,r=i>>>2&3,a=0;l>a;++a)n=t[a+1],o=t[a]+=this.mx(i,n,o,a,r,e);n=t[0],o=t[l]+=this.mx(i,n,o,a,r,e)}return t},t.prototype.decryptUint32Array=function(t,e){var n,o,i,r,a,s,u=t.length,l=u-1;for(n=t[0],s=Math.floor(6+52/u),i=s*this.delta;0!==i;i-=this.delta){for(r=i>>>2&3,a=l;a>0;--a)o=t[a-1],n=t[a]-=this.mx(i,n,o,a,r,e);o=t[l],n=t[0]-=this.mx(i,n,o,a,r,e)}return t},t.prototype.toBytes=function(t){for(var e=t.length,n=new Uint8Array(3*e),o=0,i=0;e>i;i++){var r=t.charCodeAt(i);if(128>r)n[o++]=r;else if(2048>r)n[o++]=192|r>>6,n[o++]=128|63&r;else{if(!(55296>r||r>57343)){if(e>i+1){var a=t.charCodeAt(i+1);if(56320>r&&a>=56320&&57343>=a){var s=((1023&r)<<10|1023&a)+65536;n[o++]=240|s>>18,n[o++]=128|s>>12&63,n[o++]=128|s>>6&63,n[o++]=128|63&s,i++;continue}}throw new Error("Malformed string")}n[o++]=224|r>>12,n[o++]=128|r>>6&63,n[o++]=128|63&r}}return n.subarray(0,o)},t.prototype.toShortString=function(t,e){for(var n=new Uint16Array(e),o=0,i=0,r=t.length;e>o&&r>i;o++){var a=t[i++];switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n[o]=a;break;case 12:case 13:if(!(r>i))throw new Error("Unfinished UTF-8 octet sequence");n[o]=(31&a)<<6|63&t[i++];break;case 14:if(!(r>i+1))throw new Error("Unfinished UTF-8 octet sequence");n[o]=(15&a)<<12|(63&t[i++])<<6|63&t[i++];break;case 15:if(!(r>i+2))throw new Error("Unfinished UTF-8 octet sequence");var s=((7&a)<<18|(63&t[i++])<<12|(63&t[i++])<<6|63&t[i++])-65536;if(!(s>=0&&1048575>=s))throw new Error("Character outside valid Unicode range: 0x"+s.toString(16));n[o++]=s>>10&1023|55296,n[o]=1023&s|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+a.toString(16))}}return e>o&&(n=n.subarray(0,o)),String.fromCharCode.apply(String,n)},t.prototype.toLongString=function(t,e){for(var n=[],o=new Uint16Array(65535),i=0,r=0,a=t.length;e>i&&a>r;i++){var s=t[r++];switch(s>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o[i]=s;break;case 12:case 13:if(!(a>r))throw new Error("Unfinished UTF-8 octet sequence");o[i]=(31&s)<<6|63&t[r++];break;case 14:if(!(a>r+1))throw new Error("Unfinished UTF-8 octet sequence");o[i]=(15&s)<<12|(63&t[r++])<<6|63&t[r++];break;case 15:if(!(a>r+2))throw new Error("Unfinished UTF-8 octet sequence");var u=((7&s)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++])-65536;if(!(u>=0&&1048575>=u))throw new Error("Character outside valid Unicode range: 0x"+u.toString(16));o[i++]=u>>10&1023|55296,o[i]=1023&u|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+s.toString(16))}if(i>=65534){var l=i+1;n.push(String.fromCharCode.apply(String,o.subarray(0,l))),e-=l,i=-1}}return i>0&&n.push(String.fromCharCode.apply(String,o.subarray(0,i))),n.join("")},t.prototype.toString=function(t){var e=t.length;return 0===e?"":1e5>e?this.toShortString(t,e):this.toLongString(t,e)},t.prototype.encrypt=function(t,e){return"string"==typeof t&&(t=this.toBytes(t)),"string"==typeof e&&(e=this.toBytes(e)),void 0===t||null===t||0===t.length?t:this.toUint8Array(this.encryptUint32Array(this.toUint32Array(t,!0),this.toUint32Array(this.fixk(e),!1)),!1)},t.prototype.encryptToString=function(t,e){return this.encrypt(t,e).toString("base64")},t.prototype.decrypt=function(t,e){return"string"==typeof t&&(t=t.toString()),"string"==typeof e&&(e=this.toBytes(e)),void 0===t||null===t||0===t.length?t:this.toUint8Array(this.decryptUint32Array(this.toUint32Array(t,!1),this.toUint32Array(this.fixk(e),!1)),!0)},t.prototype.decryptToString=function(t,e){return this.toString(this.decrypt(t,e))},t}();t.xxtea=e,__reflect(e.prototype,"tubao.algo.xxtea")}(e=t.algo||(t.algo={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){var n=function(e){function n(){var t=e.call(this)||this;return t.addEventListener(egret.TouchEvent.TOUCH_TAP,t.buttonResult,t),t}return __extends(n,e),n.prototype.buttonResult=function(e){t.Effect.button.button(this,1)},n}(eui.Component);e.buttonCore=n,__reflect(n.prototype,"tubao.base.buttonCore")}(e=t.base||(t.base={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(){function t(){}return t.EVENT_JOY_START="event_joy_start",t.EVENT_JOY_END="event_joy_end",t.EVENT_JOY_CHANGE="event_joy_change",t.EVENT_INIT_COMPLETE="event_init_complete",t}();t.joyStickEvent=e,__reflect(e.prototype,"tubao.joyStick.joyStickEvent");var n=function(){function t(){}return t.TYPE_FOUR=4,t.TYPE_EIGHT=8,t}();t.joyStickType=n,__reflect(n.prototype,"tubao.joyStick.joyStickType");var o=function(t){function o(e,n,o,i){var r=t.call(this)||this;return r._minAlpha=.2,r._maxAlpha=.5,r._angle=0,r._bgRadius=0,r._joyRadius=0,r._touchID=0,r._isSkinFlag=!1,r._type=e,i?(r._isSkinFlag=!0,r.once(egret.Event.COMPLETE,function(){r._isSkinFlag=!1,r.childrenCreated()},r)):n&&o&&(r._joybg=new eui.Image(n),r._joyStick=new eui.Image(o)),r}return __extends(o,t),o.prototype.childrenCreated=function(){t.prototype.childrenCreated.call(this),this._isSkinFlag||(this._joybg.parent||this.addChild(this._joybg),this._joyStick.parent||this.addChild(this._joyStick),this.width=this._joybg.width,this.height=this._joybg.height,this._bgRadius=this._joybg.texture.textureWidth/2,this._joyRadius=this._joyStick.texture.textureWidth/2,this._joyStick.anchorOffsetX=this._joyStick.texture.textureWidth/2,this._joyStick.anchorOffsetY=this._joyStick.texture.textureHeight/2,this._initJoyPoint=new egret.Point(this.width/2,this.height/2),this._joyStick.x=this._initJoyPoint.x,this._joyStick.y=this._initJoyPoint.y,this.alpha=this._minAlpha,this.touchEnabled=!0,this.addEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onTouchBegin,this),this.dispatchEvent(new egret.Event(e.EVENT_INIT_COMPLETE)))},o.prototype.onTouchBegin=function(t){var n=this;this.showJoy(function(){n._mouseX=t.stageX,n._mouseY=t.stageY,n.stage.addEventListener(egret.TouchEvent.TOUCH_MOVE,n.onTouchMove,n),n.stage.addEventListener(egret.TouchEvent.TOUCH_END,n.onTouchEnd,n),n.dispatchEvent(new egret.Event(e.EVENT_JOY_START))})},o.prototype.onTouchMove=function(t){if(0==this._touchID&&(this._touchID=t.touchPointID),t.touchPointID==this._touchID){var o=t.stageX-this._mouseX,i=t.stageY-this._mouseY,r=this._joyStick.x,a=this._joyStick.y;o=r+o,i=a+i;var s,u=o-this._initJoyPoint.x,l=this._initJoyPoint.y-i,c=0==u?0:l/u,h=Math.atan(c);0>u?l>=0?(this._angle=h/Math.PI*180+180,s=2):(this._angle=h/Math.PI*180+180,s=3):l>=0?(this._angle=h/Math.PI*180,s=1):(this._angle=h/Math.PI*180+360,s=4),this._type==n.TYPE_FOUR&&(this._angle>=0&&this._angle<45?this._angle=0:this._angle>=45&&this._angle<90?this._angle=90:this._angle>=90&&this._angle<135?this._angle=90:this._angle>=135&&this._angle<180?this._angle=180:this._angle>=180&&this._angle<225?this._angle=180:this._angle>=225&&this._angle<270?this._angle=270:this._angle>=270&&this._angle<315?this._angle=270:this._angle>=315&&this._angle<360&&(this._angle=0));var f=Math.sqrt(u*u+l*l)+this._joyRadius;if(f>this._bgRadius)switch(f=this._bgRadius-this._joyRadius,o=Math.abs(Math.cos(h)*f),i=Math.abs(Math.sin(h)*f),s){case 1:o+=this._initJoyPoint.x,i=this._initJoyPoint.y-i;break;case 2:o=this._initJoyPoint.x-o,i=this._initJoyPoint.y-i;break;case 3:o=this._initJoyPoint.x-o,i+=this._initJoyPoint.y;break;case 4:o+=this._initJoyPoint.x,i+=this._initJoyPoint.y}this._joyStick.x=o,this._joyStick.y=i,this._mouseX=t.stageX,this._mouseY=t.stageY,this.dispatchEventWith(e.EVENT_JOY_CHANGE,!1,{angle:this._angle})}},o.prototype.onTouchEnd=function(t){var n=this;this._touchID=0,this.endJoy(function(){n.stage.removeEventListener(egret.TouchEvent.TOUCH_MOVE,n.onTouchMove,n),n.stage.removeEventListener(egret.TouchEvent.TOUCH_END,n.onTouchEnd,n),n.dispatchEvent(new egret.Event(e.EVENT_JOY_END))})},o.prototype.showJoy=function(t){egret.Tween.get(this).to({alpha:this._maxAlpha},100).call(function(){t()},this)},o.prototype.endJoy=function(t){var e=this;egret.Tween.get(this._joyStick).to({x:this._initJoyPoint.x,y:this._initJoyPoint.y},100).call(function(){egret.Tween.get(e).to({alpha:e._minAlpha},100).call(function(){t()},e)},this)},o.prototype.getAngle=function(){return this._angle},o.prototype.destroy=function(){this.stage.removeEventListener(egret.TouchEvent.TOUCH_MOVE,this.onTouchMove,this),this.stage.removeEventListener(egret.TouchEvent.TOUCH_END,this.onTouchEnd,this),egret.Tween.removeTweens(this),egret.Tween.removeTweens(this._joyStick)},o}(eui.Component);t.JoyStickComponent=o,__reflect(o.prototype,"tubao.joyStick.JoyStickComponent")}(e=t.joyStick||(t.joyStick={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){var n=function(t){function e(e,n,o){var i=t.call(this)||this;return i.skinName="tubao.base.hintBoxSkin",i.View=n,i.word.text=e,i.word.textColor=o,i.timer=new egret.Timer(4e3),i.timer.addEventListener(egret.TimerEvent.TIMER,function(){i.timer.stop(),egret.Tween.get(i).to({alpha:0},2e3).call(function(){i.View.ClearAll()},i)},i),i.timer.start(),i.horizontalCenter=0,i}return __extends(e,t),e}(eui.Component);__reflect(n.prototype,"hintBox");var o=function(e){function o(){var n=e.call(this,t.layer.LayerManager.UI_Message)||this;return n.timer=new egret.Timer(4e3),n.pool=[],n.skinName="tubao.base.hintSkin",n.touchEnabled=!1,n.zhu.visible=!1,n.timer.addEventListener(egret.TimerEvent.TIMER,function(){n.timer.stop(),egret.Tween.get(n.zhu).to({alpha:0},2e3).call(function(){n.close()})},n),n}return __extends(o,e),o.prototype.send=function(e,o,i){if(void 0===o&&(o="#502007"),void 0===i&&(i=!1),this.open(),t.Effect.Popup.Resuit(this,1),i)this.word.text=e,this.word.textColor=o,this.timer.start(),this.zhu.visible=!0,this.zhu.alpha=1;else{var r=new n(e,this,o);this.addChild(r),0==this.pool.length?r.y=57:r.y=5+this.pool[this.pool.length-1].y+this.pool[this.pool.length-1].height,this.pool.push(r)}this.open()},o.prototype.ClearAll=function(){for(var t=!0,e=0;e<this.pool.length;e++)0!=this.pool[e].alpha&&(t=!1);if(t){for(var e=0;e<this.pool.length;e++)this.removeChild(this.pool[e]),this.pool[e].timer.removeEventListener(egret.TimerEvent.TIMER,function(){},this),this.pool[e]=null;this.pool=[],this.close()}},o}(e.panel);e.hint=o,__reflect(o.prototype,"tubao.base.hint")}(e=t.base||(t.base={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){var n=function(e){function n(n){var o=e.call(this,t.layer.LayerManager.UI_Message)||this;return o.skinName="tubao.base.noticeSkin",n.length<0?o:(o.Word.text=n,o.btn.addEventListener(egret.TouchEvent.TOUCH_TAP,o.close,o),o.open(),o)}return __extends(n,e),n.prototype.close=function(){e.prototype.close.call(this),this.btn.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.close,this)},n}(e.panel);e.notice=n,__reflect(n.prototype,"tubao.base.notice")}(e=t.base||(t.base={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){var n=function(e){function n(n,o){void 0===o&&(o=!0);var i=e.call(this,t.layer.LayerManager.UI_Popup)||this;return i.skinName="tubao.base.paperSkin",i.closePanel=o,i.img.source=n,o&&i.img.addEventListener(egret.TouchEvent.TOUCH_TAP,i.close,i),t.utils.dragDisplauy(i.img),i.open(),i}return __extends(n,e),n.prototype.close=function(){e.prototype.close.call(this),this.closePanel&&this.img.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.close,this)},n}(e.panel);e.paper=n,__reflect(n.prototype,"tubao.base.paper")}(e=t.base||(t.base={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){var n=function(e){function n(n,o,i,r){void 0===r&&(r=void 0);var a=e.call(this,t.layer.LayerManager.UI_Message)||this;return a.skinName="tubao.base.plotSkin",a.word.text=i,a.fun=r,a.img.source=n,a.img.scaleX=o,a.img.scaleY=o,a.closeBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,a.close,a),a.open(),a}return __extends(n,e),n.prototype.close=function(){e.prototype.close.call(this),this.closeBtn.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.close,this),this.fun&&this.fun()},n}(e.panel);e.plot=n,__reflect(n.prototype,"tubao.base.plot")}(e=t.base||(t.base={}))}(tubao||(tubao={}));var tubao;!function(t){function e(t){var e=[.3,.6,0,0,0,.3,.6,0,0,0,.3,.6,0,0,0,0,0,0,1,0];t.filters=[new egret.ColorMatrixFilter(e)]}var n=function(t){function e(){var e=t.call(this)||this;return e.colorMatrix=[.3,.6,0,0,0,.3,.6,0,0,0,.3,.6,0,0,0,0,0,0,1,0],e.colorFlilter=new egret.ColorMatrixFilter(e.colorMatrix),e}return __extends(e,t),Object.defineProperty(e.prototype,"gray",{set:function(t){t?(this.filters=null,this.touchEnabled=!0,this.alpha=1):(this.filters=[this.colorFlilter],this.touchEnabled=!1,this.alpha=.5)},enumerable:!0,configurable:!0}),e}(eui.Image);t.grayImg=n,__reflect(n.prototype,"tubao.grayImg"),t.gray=e}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){var n=function(e){function n(n,o,i){void 0===i&&(i=void 0);var r=e.call(this)||this;return r.skinName="tubao.base.popupSkin",r.word.text=o,null==RES.getRes(n)?r.ico.source=n:(r.ico.source=n,RES.getResAsync(n,function(t){r.ico.source=t},r)),r.percentHeight=100,r.percentWidth=100,t.Effect.Popup.Resuit(r,2),t.layer.LayerManager.UI_Message.addChild(r),r.fun=i,r.closeBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,r.close,r),r}return __extends(n,e),n.prototype.close=function(){this.fun&&this.fun(),this.closeBtn.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.close,this),t.layer.LayerManager.UI_Message.removeChild(this),t.sound.manager.playEffect("A8_mp3")},n}(t.utils.drag);e.popup=n,__reflect(n.prototype,"tubao.base.popup")}(e=t.base||(t.base={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){var n=function(e){function n(){var n=e.call(this,t.layer.LayerManager.UI_MainUp)||this;return n.skinName="tubao.base.sceneHintSkin",n}return __extends(n,e),n.prototype.send=function(t){var e=this;"no"!=t&&(this.open(),this.sceneName.visible=!0,this.sceneName.text="-"+t+"-",this.sceneName.alpha=.5,this.sceneName.y=160,egret.Tween.get(this.sceneName).to({alpha:1,y:190},300).to({alpha:1},3e3).to({alpha:0,y:160},2e3).call(function(){e.close()}))},n}(e.panel);e.sceneHint=n,__reflect(n.prototype,"tubao.base.sceneHint")}(e=t.base||(t.base={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){var n=function(e){function n(n,o,i,r,a){void 0===a&&(a=null);var s=e.call(this,t.layer.LayerManager.UI_Message)||this;return s.qingdingjiemianannweizhihuhuan=!0,s.skinName="tubao.base.selectSkin",t.Effect.Popup.Resuit(s,1),s.word.text=o,RES.getResAsync(n,function(t){s.ico.source=t},s),s.fun0=r,s.fun1=a,s.thisObject=i,s.qingdingjiemianannweizhihuhuan&&t.algo.algo.DisLocationExchange(s.closeBtn0,s.closeBtn1),s.closeBtn0.addEventListener(egret.TouchEvent.TOUCH_TAP,s.closePage0,s),s.closeBtn1.addEventListener(egret.TouchEvent.TOUCH_TAP,s.closePage1,s),t.utils.dragDisplauy(s),s.open(),s}return __extends(n,e),n.prototype.closePage0=function(){this.close(),this.fun0.call(this.thisObject)},n.prototype.closePage1=function(){this.close(),this.fun1&&this.fun1.call(this.thisObject)},n}(e.panel);e.select=n,__reflect(n.prototype,"tubao.base.select")}(e=t.base||(t.base={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){var n=function(e){function n(n,o,i,r,a,s){var u=e.call(this,t.layer.LayerManager.UI_Message)||this;return u.skinName="tubao.base.selectSSkin",t.Effect.Popup.Resuit(u,1),u.word.text=o,u.ico.source=n,u.thisObject=i,u.fun0=r,u.fun1=a,u.fun2=s,u.closeBtn0.addEventListener(egret.TouchEvent.TOUCH_TAP,u.closePage0,u),u.closeBtn1.addEventListener(egret.TouchEvent.TOUCH_TAP,u.closePage1,u),u.closeBtn2.addEventListener(egret.TouchEvent.TOUCH_TAP,u.closePage2,u),u.open(),u}return __extends(n,e),n.prototype.closePage0=function(){this.close(),this.fun0.call(this.thisObject)},n.prototype.closePage1=function(){this.close(),this.fun1.call(this.thisObject)},n.prototype.closePage2=function(){this.close(),this.fun2.call(this.thisObject)},n}(e.panel);e.selectS=n,__reflect(n.prototype,"tubao.base.selectS")}(e=t.base||(t.base={}))}(tubao||(tubao={}));var tubao;!function(t){var e=function(t){function e(e,n,o){var i=t.call(this)||this;return i.size=5,i.bgColor=o,i.borderColor=6710886,i.borderSize=0,i.cornerRadius=9,i.halfSize=Math.round(i.size/2),i.graphics.beginFill(i.bgColor),i.graphics.lineStyle(i.borderSize,i.borderColor),i.graphics.drawCircle(i.halfSize,i.halfSize,i.halfSize),i.graphics.endFill(),i.x=e,i.y=n,i
}return __extends(e,t),e}(egret.Shape);t.dot=e,__reflect(e.prototype,"tubao.dot")}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(t){function e(e,n,o){return void 0===n&&(n=!1),void 0===o&&(o=!1),t.call(this,e,n,o)||this}return __extends(e,t),e.lodingOver="加载完成",e}(egret.Event);t.dbEvent=e,__reflect(e.prototype,"tubao.DB.dbEvent")}(e=t.DB||(t.DB={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.AnGroup={},e.bqStatic=!0,e}return __extends(e,t),e.prototype.setSlotImgInTime=function(t,e,n,o,i,r,a,s,u){var l=this;if(void 0===n&&(n=0),void 0===u&&(u=!0),this.nameGetSlot(t,e))if(n){var c=this.nameGetSlot(t,e),h=new egret.Bitmap(c.display.texture),f=c.offset;this.setSlotImg(t,e,o,i,r,a,s,u),this.bqStatic=!1,setTimeout(function(){l.setSlotImg(t,e,h.texture,f.x,f.y,f.rotation,s,u),l.bqStatic=!0},n,this)}else this.setSlotImg(t,e,o,i,r,a,s,u)},e.prototype.setSlotImg=function(t,e,n,o,i,r,a,s){return void 0===s&&(s=!0),__awaiter(this,void 0,void 0,function(){var u,l;return __generator(this,function(c){switch(c.label){case 0:return(u=this.nameGetSlot(t,e))?(l=new egret.Bitmap,"string"!=typeof n?[3,2]:[4,this.reqData(n,s)]):[2];case 1:return c.sent(),l.texture=RES.getRes(n),[3,3];case 2:l.texture=n,c.label=3;case 3:return l.anchorOffsetX=l.width/2,l.anchorOffsetY=l.height/2,l.visible=a,u.offset.x=o,u.offset.y=i,u.offset.rotation=r,u.display=l,[2]}})})},e.prototype.reqData=function(t,e){var n=this;return void 0===e&&(e=!0),new Promise(function(o){e?RES.getResAsync(t,function(){o(!0)},n):RES.getResByUrl(t,function(){o(!0)},n)})},e.prototype.anGropuPlay=function(t,e,n){var o=this;void 0===n&&(n=null),this.AnGroup[t]||(this.AnGroup[t]=[]),this.AnGroup[t]=this.AnGroup[t].concat(e);var i=this.nameGetSkeleton(t);this.anPlay(t,n),i.eventDispatcher.addDBEventListener(dragonBones.EventObject.COMPLETE,function(){console.log("动画播放完成。"),o.anPlay(t,n)},this)},e.prototype.anPlay=function(t,e){void 0===e&&(e=null);var n=this.nameGetSkeleton(t),o=this.AnGroup[t].shift();o?"string"==typeof o?n.animation.gotoAndPlayByFrame(o,1,1):"object"==typeof o&&n.animation.gotoAndPlayByFrame(o[0],1,o[1]):(n.eventDispatcher.addDBEventListener(dragonBones.EventObject.COMPLETE,function(){},this),e&&e())},e.prototype.anControl=function(t,e,n,o){if(void 0===o&&(o=null),!e)return void console.error("未定义动画名不能播放动画。anControl");var i=this.nameGetSkeleton(t),r=typeof n;"boolean"==r?n?i.animation.play(e):i.animation.stop(e):"number"==r&&(null==o?i.animation.stop(e):i.animation.gotoAndPlayByFrame(e,n,o))},e.prototype.mixAnPlay=function(t,e,n){void 0===n&&(n=null);var o=this.nameGetSkeleton(t),i=o.animation.fadeIn(e.anName,e.fadeInTime,e.playTimes,0,e.group);if(e.mask)for(var r in e.mask)i.addBoneMask(e.mask[r]);return i},e.prototype.mixAnPlayArr=function(t,e,n){void 0===n&&(n=null);this.nameGetSkeleton(t);for(var o in e)this.mixAnPlay(t,e[o],n)},e.prototype.setDBSlotIndex=function(t,e,n){var o=this.nameGetSlot(t,e);return o.displayList.length<n&&(console.log("插槽"+o.name+"的索引index位置"+n+"设置越界了,默认索引到第一个!"),n=0),o.displayIndex=n},e}(t.DBbasice);t.DBuse=e,__reflect(e.prototype,"tubao.DB.DBuse")}(e=t.DB||(t.DB={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(e){function n(){var t=e.call(this)||this;return t.pool=[],t.skinName="tubao.list.downListSkin",t.img_cf.addEventListener(egret.TouchEvent.TOUCH_TAP,function(){t["switch"]()},t),t["switch"](),t.init(),t}return __extends(n,e),n.prototype.AddBox=function(e,n){var o=this,i=new t.downListNape(e,n);i.y=26*this.pool.length,i.width=this.width,this.btn_Pool.addChild(i),this.pool.push(i),i.addEventListener(egret.TouchEvent.TOUCH_TAP,function(t){o.present=i.nur,o.lab_dq.text=i.lab_nr.text,o["switch"](),o.chufa(i)},this)},n.prototype.ClearAll=function(){for(var t=0;t<this.pool.length;t++)this.pool[t].removeEventListener(egret.TouchEvent.TOUCH_TAP,function(){},this),this.btn_Pool.removeChild(this.pool[t]),this.pool[t]=null;this.pool=[]},n.prototype.delList=function(t){for(var e in this.pool)this.pool[e].nur==t&&(this.btn_Pool.removeChild(this.pool[e]),this.pool[e].removeEventListener(egret.TouchEvent.TOUCH_TAP,function(){},this),this.pool.splice(Number(e),1));for(var e in this.pool)this.pool[e].y=26*Number(e)},n.prototype["switch"]=function(){this.gdst.visible?(this.gdst.visible=!1,this.gdst.height=0):(this.gdst.visible=!0,this.gdst.height=300)},n.prototype.selectOne=function(){this.pool.length<=0||(this.present=this.pool[0].nur,this.lab_dq.text=this.pool[0].lab_nr.text)},n.prototype.lineIDSelect=function(t,e){this.present=t,this.lab_dq.text=t+"("+e+")"},n.prototype.chufa=function(t){},n.prototype.init=function(){},n}(eui.Component);t.downList=e,__reflect(e.prototype,"tubao.list.downList")}(e=t.list||(t.list={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(t){function e(e,n){var o=t.call(this)||this;return o.nur=null,o.Name=null,o.skinName="tubao.list.downListNapeSkin",o.nur=e,o.Name=n,o.lab_nr.text=n+"("+e+")",o}return __extends(e,t),e}(eui.Component);t.downListNape=e,__reflect(e.prototype,"tubao.list.downListNape")}(e=t.list||(t.list={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(){function t(){}return t.prototype.alphaH=function(t){return void 0!=t?10*t:1},t.prototype.alphaP=function(t){return void 0!=t?t/10:1},t.prototype.rotationH=function(t){return void 0!=t?t:0},t.prototype.rotationP=function(t){return void 0!=t?t:0},t.prototype.scaleH=function(t){return void 0!=t?10*t:1},t.prototype.scaleP=function(t){return void 0!=t?t/10:1},t.prototype.visible=function(t,e){return e?(t.blendMode=egret.BlendMode.NORMAL,t.visibleTu=!0):(t.blendMode=egret.BlendMode.ERASE,t.visibleTu=!1),!0},t}();t.translation=e,__reflect(e.prototype,"tubao.editor.translation"),t.tran=new e}(e=t.editor||(t.editor={}))}(tubao||(tubao={}));var tubao;!function(t){var e=function(t){function e(){var e=t.call(this)||this;return e.instantly=0,e.timer=new egret.Timer(100),e.timer.addEventListener(egret.TimerEvent.TIMER,e.timerStep,e),e.addEventListener(egret.TouchEvent.TOUCH_TAP,e.touchTap,e),e}return __extends(e,t),e.prototype.timerStep=function(){this._allWord.length>this.instantly-1?(this.text=this._allWord.substring(0,this.instantly),this.instantly++):this.timer.stop()},e.prototype.touchTap=function(){this.timer.stop(),this.text=this._allWord},Object.defineProperty(e.prototype,"allWord",{get:function(){return this._allWord},set:function(t){this._allWord=t,this.instantly=0,this.timer.start()},enumerable:!0,configurable:!0}),e}(eui.Label);t.charStep=e,__reflect(e.prototype,"tubao.charStep")}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(t){function e(){var e=t.call(this)||this;return e.huanYuanBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,e.huanYuanFun,e),e.shanCuBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,e.shanCuFun,e),e}return __extends(e,t),e.prototype.shanCuFun=function(){this.display.parent.removeChild(this.display)},e.prototype.huanYuanFun=function(){t.prototype.huanYuanFun.call(this),this.display.visible=!0,this.display.alpha=1,this.display.rotation=0,this.display.scaleX=1,this.display.scaleY=1,this.display.anchorOffsetX=0,this.display.anchorOffsetY=0},e.prototype.openDisplay=function(t){this.display=t,this.analyDisplay()},e.prototype.open=function(e){t.prototype.open.call(this),this.display=e,this.analyDisplay()},e}(t.tubaoDisplayObjectEditorBase);t.tubaoDisplayObjectEditor=e,__reflect(e.prototype,"tubao.editor.tubaoDisplayObjectEditor")}(e=t.editor||(t.editor={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){var n;!function(e){function n(e,n,o,i,r,a){if(void 0===n&&(n=1),void 0===o&&(o="A7_mp3"),void 0===i&&(i=function(){}),void 0===r&&(r=null),void 0===a&&(a=!0),e){switch(a&&(e.touchEnabled=!1),n){case 1:e.anchorOffsetX=e.width/2,e.anchorOffsetY=e.height/2,e.x+=e.width/2,e.y+=e.height/2,e.scaleX=.5,e.scaleY=.5,egret.Tween.get(e).to({scaleX:1,scaleY:1},300,egret.Ease.backOut).call(function(){e.anchorOffsetX=0,e.anchorOffsetY=0,e.x-=e.width/2,e.y-=e.height/2,a&&(e.touchEnabled=!0)}).call(i,r);break;case 2:e.alpha=0,e.scaleX=.5,e.scaleY=.5,egret.Tween.get(e).to({alpha:1,scaleX:1,scaleY:1},300,egret.Ease.elasticOut).call(function(){e.touchEnabled=!0});break;case 3:e.scaleX=.5,e.scaleY=.5,egret.Tween.get(e).to({scaleX:1,scaleY:1},300,egret.Ease.elasticOut).call(function(){e.touchEnabled=!0});break;case 4:egret.Tween.get(e).to({scaleX:1,scaleY:1,alpha:1},300,egret.Ease.elasticOut).call(function(){e.touchEnabled=!0});break;case 5:egret.Tween.get(e).to({alpha:0},2e3,egret.Ease.elasticOut).call(function(){e.touchEnabled=!0});break;case 6:e.scaleX=.8,e.scaleY=.8,egret.Tween.get(e).to({scaleX:1,scaleY:1},300,egret.Ease.backOut).call(function(){e.touchEnabled=!0})}t.sound.manager.playEffect(o)}}e.button=n}(n=e.button||(e.button={}))}(e=t.Effect||(t.Effect={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){function n(t){if(!t.filters)return 16777215;if(0==t.filters.length)return 16777215;var e=t.filters[0],n=255*e.matrix[0],o=255*e.matrix[6],i=255*e.matrix[12],r=n<<16|o<<8|i;return r}function o(t,e){if(void 0===e&&(e=null),!e)return void(t.filters=[]);var n=r(e);i(t,n.red,n.green,n.blue)}function i(t,e,n,o){var i=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];i[0]=e/255,i[6]=n/255,i[12]=o/255,t.filters=[new egret.ColorMatrixFilter(i)]}function r(t){var e={red:-1,green:-1,blue:-1};return e.blue=t%256,e.green=Math.floor(t/256)%256,e.red=Math.floor(t/256/256),e}function a(e,n,o){var i=r(n);i.red+=o,i.red<0&&(i.red=0),i.red>255&&(i.red=255),i.green+=o,i.green<0&&(i.green=0),i.green>255&&(i.green=255),i.blue+=o,i.blue<0&&(i.blue=0),i.blue>255&&(i.blue=255),t.Effect.separateSetColor(e,i.red,i.green,i.blue)}e.getColor=n,e.setColor=o,e.separateSetColor=i,e.spliceColor=r,e.controlColorSetColor=a}(e=t.Effect||(t.Effect={}))}(tubao||(tubao={}));var DebugPlatform=function(){function t(){}return t.prototype.setStorage=function(t,e){return""},t.prototype.getStorage=function(t){return t},t.prototype.lodinFont=function(){},t.prototype.getUserInfo=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,{nickName:"username"}]})})},t.prototype.login=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},t}();__reflect(DebugPlatform.prototype,"DebugPlatform",["Platform"]),window.platform||(window.platform=new DebugPlatform);var tubao;!function(t){var e;!function(e){var n;!function(e){function n(e,n){if(void 0===n&&(n=1),e){switch(e.visible=!0,e.alpha=0,e.scaleX=.5,e.scaleY=.5,n){case 1:egret.Tween.get(e).to({alpha:1,scaleX:1,scaleY:1},300,egret.Ease.backOut);break;case 2:egret.Tween.get(e).to({alpha:1,scaleX:1,scaleY:1},300,egret.Ease.elasticOut)}t.sound.manager.playEffect("A7_mp3")}}function o(e,n){function o(){egret.Tween.removeTweens(e),e.visible=!1,t.sound.manager.playEffect("A8_mp3")}if(void 0===n&&(n=1),e)switch(n){case 1:egret.Tween.get(e).to({alpha:0,scaleX:.8,scaleY:.8},500,egret.Ease.backOut).call(o,this);break;case 2:egret.Tween.get(e).to({alpha:.8,scaleX:.8,scaleY:.8},150,egret.Ease.backIn).call(o,this)}}e.Resuit=n,e.Close=o}(n=e.Popup||(e.Popup={}))}(e=t.Effect||(t.Effect={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){var n;!function(e){function n(e){function n(t){_++,_==s&&o.removeChild(a)}var o=t.stage,i=t.width,r=t.height,a=new eui.Group;a.width=i,a.height=r,o.addChild(a);for(var s=40,u=5,l=s/u,c=0;s>c;c++){var h=i/u,f=r/l,p=c%u*h,g=Math.floor(c/u)*f,d=new egret.RenderTexture,v=(d.drawToTexture(o,new egret.Rectangle(p,g,h,f)),new egret.Bitmap);switch(v.texture=d,v.anchorOffsetX=h/2,v.anchorOffsetY=f/2,v.x=p+h/2,v.y=g+f/2,a.addChild(v),5==e&&(e=Math.ceil(4*Math.random())),e){case 1:var y=egret.Tween.get(v);y.to({scaleX:0,scaleY:0,alpha:0,rotation:359},800,egret.Ease.circIn).call(n,this);break;case 2:var b=-i;c%2||(b=2*i);var y=egret.Tween.get(v);y.to({x:b,alpha:0},800,egret.Ease.circIn).call(n,this);break;case 3:var y=egret.Tween.get(v);y.to({scaleX:.2,scaleY:1,alpha:0,blurFliter:0},800,egret.Ease.backInOut).call(n,this);break;case 4:var y=egret.Tween.get(v);y.to({alpha:0},900,egret.Ease.circIn).call(n,this);break;default:var y=egret.Tween.get(v);y.to({scaleX:1,scaleY:0,alpha:0},800,egret.Ease.circIn).call(n,this)}}var _=0}e.MovieStart=n}(n=e.Scene||(e.Scene={}))}(e=t.Effect||(t.Effect={}))}(tubao||(tubao={}));var BaseController=function(t){function e(){var e=t.call(this)||this;return e._messages={},e}return __extends(e,t),e.prototype.registerFunc=function(t,e,n){this._messages[t]=[e,n]},e.prototype.applyFunc=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var o=this._messages[t];return o?o[0].apply(o[1],e):(console.warn("消息"+t+"不存在侦听"),null)},e.prototype.applyControllerFunc=function(t,e){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];return tubao.mvc.manager.controller.applyFunc.apply(tubao.mvc.manager.controller,arguments)},e.prototype.setModel=function(t){this._model=t},e.prototype.getModel=function(){return this._model},e.prototype.getControllerModel=function(t){return tubao.mvc.manager.controller.getControllerModel(t)},e.prototype.registerView=function(t,e,n){var o=new t(this,n);return tubao.mvc.manager.view.register(e,o),o},e.prototype.openView=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];(o=tubao.mvc.manager.view).open.apply(o,[t].concat(e));var o},e.prototype.closeView=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];(o=tubao.mvc.manager.view).close.apply(o,[t].concat(e));var o},e}(egret.EventDispatcher);__reflect(BaseController.prototype,"BaseController"),window.BaseController=BaseController;var BaseModel=function(){function t(t){this._controller=t,this._controller.setModel(this)}return t}();__reflect(BaseModel.prototype,"BaseModel"),window.BaseModel=BaseModel;var BaseProxy=function(){function t(t){this._controller=t}return t.prototype.applyFunc=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this._controller.applyFunc.apply(this._controller,arguments)},t.prototype.applyControllerFunc=function(t,e){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];return this._controller.applyControllerFunc.apply(this._controller,arguments)},t}();__reflect(BaseProxy.prototype,"BaseProxy");var tubao;!function(t){var e;!function(t){var e;!function(t){var e=function(){function t(){}return t.clear=function(){this._modules={}},t.register=function(t,e){this.isExists(t)||(this._modules[t]=e)},t.unregister=function(t){this.isExists(t)&&(this._modules[t]=null,delete this._modules[t])},t.isExists=function(t){return null!=this._modules[t]},t.applyFunc=function(t,e){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var i=this._modules[t];if(i){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];return i.applyFunc.apply(i,r)}return console.warn("模块"+t+"不存在"),null},t.getControllerModel=function(t){var e=this._modules[t];return e?e.getModel():null},t._modules={},t}();t.controller=e,__reflect(e.prototype,"tubao.mvc.manager.controller")}(e=t.manager||(t.manager={}))}(e=t.mvc||(t.mvc={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e;!function(t){var e=function(){function t(){}return t.clear=function(){this.closeAll(),this._views={}},t.register=function(t,e){null!=e&&(this._views[t]||(this._views[t]=e))},t.unregister=function(t){this._views[t]&&(this._views[t]=null,delete this._views[t])},t.destroy=function(t,e){void 0===e&&(e=null);var n=this.getView(t);n&&(this.unregister(t),n.destroy(),n=null),this.register(t,e)},t.open=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var o=this.getView(t);return null==o?void console.warn("UI_"+t+"不存在"):o.isShow()?(o.open.apply(o,e),o):(o.isInit()?(o.addToParent(),o.open.apply(o,e)):o.loadResource(function(){o.setVisible(!1),o.addToParent()}.bind(this),function(){o.initUI(),o.initData(),o.open.apply(o,e),o.setVisible(!0)}.bind(this)),this._opens.push(t),o)},t.close=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(this.isShow(t)){var o=this.getView(t);if(null!=o){var i=this._opens.indexOf(t);i>=0&&this._opens.splice(i,1),o.removeFromParent(),o.close.apply(o,e)}}},t.closeView=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var o=Object.keys(this._views),i=0,r=o.length;r>i;i++){var a=parseInt(o[i]);if(this._views[a]==t)return void this.close(a,e)}},t.getView=function(t){return this._views[t]},t.closeAll=function(){for(;this._opens.length;)this.close(this._opens[0])},t.currOpenNum=function(){return this._opens.length},t.isShow=function(t){return-1!=this._opens.indexOf(t)},t._views={},t._opens=[],t}();t.view=e,__reflect(e.prototype,"tubao.mvc.manager.view")}(e=t.manager||(t.manager={}))}(e=t.mvc||(t.mvc={}))}(tubao||(tubao={}));var BaseEuiView=function(t){function e(e,n){var o=t.call(this)||this;return o._resources=null,o._controller=e,o._myParent=n,o._isInit=!1,o.percentHeight=100,o.percentWidth=100,o}return __extends(e,t),Object.defineProperty(e.prototype,"myParent",{get:function(){return this._myParent},enumerable:!0,configurable:!0}),e.prototype.setResources=function(t){this._resources=t},e.prototype.isInit=function(){return this._isInit},e.prototype.applyFunc=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this._controller.applyFunc.apply(this._controller,arguments)},e.prototype.applyControllerFunc=function(t,e){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];return this._controller.applyControllerFunc.apply(this._controller,arguments)},e.prototype.isShow=function(){return null!=this.stage&&this.visible},e.prototype.addToParent=function(){this._myParent.addChild(this)},e.prototype.removeFromParent=function(){null==this.parent&&this.parent.removeChild(this)},e.prototype.initUI=function(){this._isInit=!0},e.prototype.initData=function(){},e.prototype.destroy=function(){this._controller=null,this._myParent=null,this._resources=null},e.prototype.open=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},e.prototype.close=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},e.prototype.loadResource=function(t,e){this._resources&&this._resources.length>0?(tubao.res.loadResource(this._resources,[],t,null,this),this.once(eui.UIEvent.CREATION_COMPLETE,e,this)):(t(),e())},e.prototype.setVisible=function(t){this.visible=t},e}(eui.Component);__reflect(BaseEuiView.prototype,"BaseEuiView",["IBaseView"]),window.BaseEuiView=BaseEuiView;var BaseSpriteView=function(t){function e(e,n){var o=t.call(this)||this;return o._resources=null,o._controller=e,o._myParent=n,o._isInit=!1,tubao.stage.addEventListener(egret.Event.RESIZE,o.onResize,o),o}return __extends(e,t),e.prototype.setResources=function(t){this._resources=t},Object.defineProperty(e.prototype,"myParent",{get:function(){return this._myParent},enumerable:!0,configurable:!0}),e.prototype.isInit=function(){return this._isInit},e.prototype.applyFunc=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this._controller.applyFunc.apply(this._controller,arguments)},e.prototype.applyControllerFunc=function(t,e){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];return this._controller.applyControllerFunc.apply(this._controller,arguments)},e.prototype.isShow=function(){return null!=this.stage&&this.visible},e.prototype.addToParent=function(){this._myParent.addChild(this)},e.prototype.removeFromParent=function(){null==this.parent&&this.parent.removeChild(this)},e.prototype.initUI=function(){this._isInit=!0},e.prototype.initData=function(){},e.prototype.open=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},e.prototype.close=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},e.prototype.destroy=function(){this._controller=null,this._myParent=null,this._resources=null},e.prototype.onResize=function(){},e.prototype.loadResource=function(t,e){this._resources&&this._resources.length>0?tubao.res.loadResource(this._resources,[],function(){t(),e()},null,this):(t(),e())},e.prototype.setVisible=function(t){this.visible=t},e}(egret.DisplayObjectContainer);__reflect(BaseSpriteView.prototype,"BaseSpriteView",["IBaseView"]),window.BaseSpriteView=BaseSpriteView;var tubao;!function(t){var e=function(){function t(){}return Object.defineProperty(t,"isHtml5",{get:function(){return egret.Capabilities.runtimeType==egret.RuntimeType.WEB},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isNative",{get:function(){return egret.Capabilities.runtimeType==egret.RuntimeType.NATIVE},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isChannel",{get:function(){return this.isWxGame||this.isQQGame||this.isTTGame||this.isQGame||this.isKSGame?!0:!1},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isWxGame",{get:function(){return egret.Capabilities.runtimeType==egret.RuntimeType.WXGAME},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isQQGame",{get:function(){return egret.Capabilities.runtimeType==egret.RuntimeType.QQGAME},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isTTGame",{get:function(){return egret.Capabilities.runtimeType==egret.RuntimeType.TTGAME},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isKSGame",{get:function(){return egret.Capabilities.runtimeType==egret.RuntimeType.KSGAME},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isQGame",{get:function(){return egret.Capabilities.runtimeType==egret.RuntimeType.QGAME},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isMobile",{get:function(){return egret.Capabilities.isMobile},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isPC",{get:function(){return!egret.Capabilities.isMobile},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isQQBrowser",{get:function(){return this.isHtml5&&-1!=navigator.userAgent.indexOf("MQQBrowser")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isIEBrowser",{get:function(){return this.isHtml5&&-1!=navigator.userAgent.indexOf("MSIE")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isFirefoxBrowser",{get:function(){return this.isHtml5&&-1!=navigator.userAgent.indexOf("Firefox")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isChromeBrowser",{get:function(){return this.isHtml5&&-1!=navigator.userAgent.indexOf("Chrome")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isSafariBrowser",{get:function(){return this.isHtml5&&-1!=navigator.userAgent.indexOf("Safari")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isOperaBrowser",{get:function(){return this.isHtml5&&-1!=navigator.userAgent.indexOf("Opera")},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DeviceOs",{get:function(){var t,e="";return t=this.isHtml5?navigator.userAgent.toLowerCase():egret.Capabilities.os.toLowerCase(),-1!=t.indexOf("ipod")||-1!=t.indexOf("iphone")||-1!=t.indexOf("ipad")||-1!=t.indexOf("macintosh")||-1!=t.indexOf("ios")?e="ios":-1!=t.indexOf("windows")?e="windows":-1!=t.indexOf("android")?e="android":-1!=t.indexOf("symbian")?e="symbian":-1!=t.indexOf("linux")&&(e="linux"),e},enumerable:!0,configurable:!0}),t}();t.device=e,__reflect(e.prototype,"tubao.device")}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.paintData=[],e.paintIndex=-1,e.texturePool=[],e}return __extends(e,t),e.prototype.onTouchBegin=function(e){t.prototype.onTouchBegin.call(this,e),this.paintIndex++,this.paintData.push({date:Number(new Date),list:[[e.stageX,e.stageY]],arg:this.arg}),console.log(this.paintIndex)},e.prototype.onTouchMove=function(e){t.prototype.onTouchMove.call(this,e),this.paintData[this.paintIndex].list.push([e.stageX,e.stageY])},e.prototype.verData=function(t){for(var e in t){this.arg=t[e].arg,this.beginTouch(t[e].list[0][0],t[e].list[0][1]);for(var n in t[e].list)this.moveTouch(t[e].list[n][0],t[e].list[n][1]);this.touchEnd()}this.paintData=t},e.prototype.touchEnd=function(){t.prototype.touchEnd.call(this),this.texturePool[this.paintIndex]=this.bitmap3.texture},e.prototype.revocation=function(){return this.paintIndex-1<0?void console.log("没有可撤销步骤了"):(this.paintIndex--,this.bitmap3.texture=this.texturePool[this.paintIndex],void console.log(this.paintIndex,this.texturePool.length))},e.prototype.reform=function(){return this.texturePool.length>this.paintIndex+1?(this.paintIndex++,this.bitmap3.texture=this.texturePool[this.paintIndex],void console.log(this.paintIndex,this.texturePool.length)):void console.log("没有可重做步骤了")},e}(t.paint);t.history=e,__reflect(e.prototype,"tubao.paint.history")}(e=t.paint||(t.paint={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){function e(e){switch(e){case n.sprite:return new t.sprite;case n.img:return new t.img}}var n;!function(t){t[t.sprite=1]="sprite",t[t.img=2]="img"}(n=t.brush||(t.brush={})),t.getBrush=e}(e=t.paint||(t.paint={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.init=function(t){switch(this.arg=t,this.graphics.beginFill(this.arg.color),this.arg.brushArg.cmd){case 1:this.graphics.drawCircle(0,0,this.arg.size);break;case 2:this.graphics.drawEllipse(0,0,this.arg.brushArg.width*this.arg.size,this.arg.brushArg.height*this.arg.size);break;case 3:this.graphics.drawRect(0,0,this.arg.brushArg.width*this.arg.size,this.arg.brushArg.height*this.arg.size);break;case 4:this.graphics.drawRoundRect(0,0,this.arg.brushArg.width*this.arg.size,this.arg.brushArg.height*this.arg.size,.2*this.arg.size,.2*this.arg.size)}this.graphics.endFill()},e}(egret.Sprite);t.sprite=e,__reflect(e.prototype,"tubao.paint.sprite");var n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.init=function(t){this.arg=t,this.source=RES.getRes(this.arg.brushArg.bitmap),this.width=this.arg.brushArg.width,this.height=this.arg.brushArg.height},e}(eui.Image);t.img=n,__reflect(n.prototype,"tubao.paint.img")}(e=t.paint||(t.paint={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(t){function e(e){var n=t.call(this)||this;return RES.getResAsync(e,function(t){n.texture=t},n),n}return __extends(e,t),e.prototype.initialize=function(t){return this},e.prototype.reset=function(){return this.texture=null,this},e}(egret.Bitmap);t.EmojiBitmap=e,__reflect(e.prototype,"tubao.fields.EmojiBitmap")}(e=t.fields||(t.fields={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(){function t(t,e,n){this.value=t,this.offx=e,this.offy=n}return t}();t.EmojiConfig=e,__reflect(e.prototype,"tubao.fields.EmojiConfig")}(e=t.fields||(t.fields={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(){function e(t,e){void 0===e&&(e=-1),this._symbolBegin="[",this._symbolEnd="]",this._config=t,this._match=this.getMatchChar(e),this._pool=[];for(var n=0,o=this._config.value;n<o.length;n++){var i=o[n];i.symbol=""+this._symbolBegin+i.key+this._symbolEnd}}return e.prototype.getMatchChar=function(t){for(var e="";t;)t--,e+=" ";return e},Object.defineProperty(e.prototype,"offX",{get:function(){return this._config.offx},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"offY",{get:function(){return this._config.offy},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"match",{get:function(){return this._match},enumerable:!0,configurable:!0}),e.prototype.getSymbol=function(t){for(var e=0,n=this._config.value;e<n.length;e++){var o=n[e];if(o.key==t)return o.symbol}},e.prototype.search=function(t){for(var e=-1,n=0,o=this._config.value;n<o.length;n++){var i=o[n],r=t.indexOf(i.symbol);r>=0&&(e=-1==e?r:Math.min(r,e))}return e},e.prototype.parser=function(t){for(var e=[];;){var n=this.search(t);if(-1==n)break;var o=t.indexOf(this._symbolEnd,n),i=t.substring(n,o+1),r=i.substring(1,i.length-1);t=t.replace(i,this._match),e.push({key:parseInt(r),symbol:i,index:n})}return{result:t,emojis:e}},e.prototype.getConfig=function(t){for(var e=0,n=this._config.value;e<n.length;e++){var o=n[e];if(o.key==t)return o}return console.log("根据key:"+t+"获取配置失败,因为key不存在"),null},e.prototype.fromEmoji=function(e){var n=this.getConfig(e);if(this._pool.length)return this._pool.pop().initialize(n.res);var o=new t.EmojiBitmap(n.res);return o},e.prototype.toEmoji=function(t){t.reset(),t.parent&&t.parent.removeChild(t),this._pool.push(t)},e}();t.EmojiPlugin=e,__reflect(e.prototype,"tubao.fields.EmojiPlugin")}(e=t.fields||(t.fields={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){var n=function(){function e(){var e=this;this.objectNum=[];var n=new egret.TextField;t.layer.LayerManager.UI_Message.addChild(n),n.y=150,n.height=300,n.size=15,n.textColor=4095,n.touchEnabled=!1,n.bold=!0,n.background=!0,n.backgroundColor=16777215;var o=egret.$hashCount;setInterval(function(){var t=egret.$hashCount,i=t-o;o=t,console.log(i),n.text+="\n"+i,e.objectNum.push(i)},1e3),setInterval(function(){n.text="对象创建数量:"},1e4)}return e}();e.secondNewObject=n,__reflect(n.prototype,"tubao.deBug.secondNewObject");var o=function(){function e(){this.huan=[egret.Ease.arguments],this.huanString=[egret.Ease.arguments];var e=0;for(var n in egret.Ease){var o=new egret.TextField;t.layer.LayerManager.UI_Message.addChild(o),o.x=20,o.y=20*e,o.size=15,o.textColor=4095,o.touchEnabled=!1,o.bold=!0,o.background=!0,o.backgroundColor=16777215,o.text=n+"-------------------------------------------";var i=new eui.Image(RES.getRes("basics01_png"));i.x=100,i.width=20,i.height=20,i.y=20*e,t.layer.LayerManager.UI_Message.addChild(i),egret.Tween.get(i,{loop:!0}).to({x:500},1e3,egret.Ease[n]).to({alpha:0},1e3,egret.Ease[n]),e++}}return e}();e.huanDong=o,__reflect(o.prototype,"tubao.deBug.huanDong")}(e=t.deBug||(t.deBug={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(t){function e(e){var n=t.call(this)||this;return n._emojisMcs=[],n._emojiplugin=e,n}return __extends(e,t),Object.defineProperty(e.prototype,"text",{set:function(t){this._matchWidth=egret.sys.measureText(this._emojiplugin.match,this.fontFamily,this.size,this.bold,this.italic),this._richText=this._emojiplugin.parser(t),this._textfiled.text=this._richText.result,egret.callLater(this.updateEmojis,this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textFlow",{set:function(t){this._matchWidth=egret.sys.measureText(this._emojiplugin.match,this.fontFamily,this.size,this.bold,this.italic),this._richText={result:"",emojis:[]};for(var e=0,n=0,o=t;n<o.length;n++){var i=o[n],r=this._emojiplugin.parser(i.text);i.text=r.result,this._richText.result+=r.result;for(var a=0,s=r.emojis;a<s.length;a++){var u=s[a];u.index+=e,this._richText.emojis.push(u)}e+=i.text.length}this._textfiled.textFlow=t,egret.callLater(this.updateEmojis,this)},enumerable:!0,configurable:!0}),e.prototype.clearEmojis=function(){for(;this._emojisMcs.length;){var t=this._emojisMcs.pop();this._emojiplugin.toEmoji(t.emoji)}},e.prototype.updateEmojis=function(){var t=this,e=t._textfiled,n=t._emojiplugin,o=t._emojisMcs,i=t.fontFamily,r=t.size,a=t.bold,s=t.italic;t.clearEmojis();for(var u=e.$getLinesArr(),l=n.match.length/2>>0,c=(e.textHeight+e.lineSpacing)/e.numLines,h=0,f=t._richText.emojis;h<f.length;h++){var p=f[h],g=n.fromEmoji(p.key);t.addChild(g);for(var d=t._richText.result.substring(0,p.index+l),v=0,y=0,b=0;b<u.length;b++){if(u[b].elements[0])var _=u[b].elements[0].text.length;else var _=0;if(d.length<y+_){v=b;break}y+=_}g.y=Math.round(v*c+n.offY),d=d.substring(y,d.length),g.x=Math.round(egret.sys.measureText(d,i,r,a,s)+n.offX-t._matchWidth/2),o.push({key:p.key,emoji:g})}},e}(t.richTextFiledBase);t.RichTextField=e,__reflect(e.prototype,"tubao.fields.RichTextField")}(e=t.fields||(t.fields={}))}(tubao||(tubao={}));
var tubao;!function(t){var e=function(){function t(){}return t.getFormatBySecond=function(t,e){void 0===e&&(e=1);var n="";switch(e){case 1:n=this.getFormatBySecond1(t);break;case 2:n=this.getFormatBySecond2(t);break;case 3:n=this.getFormatBySecond3(t);break;case 4:n=this.getFormatBySecond4(t);break;case 5:n=this.getFormatBySecond5(t);break;case 6:n=this.getFormatBySecond6(t)}return n},t.getFormatBySecond1=function(t){void 0===t&&(t=0);var e,n=Math.floor(t/3600);e=0==n?"00":10>n?"0"+n:""+n;var o,i,r=Math.floor((t-3600*n)/60),a=Math.floor((t-3600*n)%60);return o=0==r?"00":10>r?"0"+r:""+r,i=0==a?"00":10>a?"0"+a:""+a,e+":"+o+":"+i},t.getFormatBySecond3=function(t){void 0===t&&(t=0);var e,n,o=Math.floor(t/3600),i=Math.floor((t-3600*o)/60),r=Math.floor((t-3600*o)%60);return e=0==i?"00":10>i?"0"+i:""+i,n=0==r?"00":10>r?"0"+r:""+r,e+":"+n},t.getFormatBySecond2=function(t){var e=new Date(t),n=e.getFullYear(),o=e.getMonth()+1,i=e.getDate(),r=e.getHours(),a=e.getMinutes(),s=e.getSeconds();return n+"-"+o+"-"+i+" "+r+":"+a+":"+s},t.getFormatBySecond4=function(t){var e=Math.floor(t/3600);return e>0?e>24?Math.floor(e/24)+"天前":e+"小时前":Math.floor(t/60)+"分钟前"},t.getFormatBySecond5=function(t){var e=86400,n=3600,o=60,i=Math.floor(t/e),r=Math.floor(t%e/n),a=Math.floor((t-r*n)/o),s=Math.floor((t-r*n)%o),u="",l="",c="",h="";return t>0?0==i?(u="",0==r?(l="",0==a?(c="",h=0==s?"":10>s?"0"+s+"秒":""+s+"秒"):(c=""+a+"分",h=0==s?"":10>s?"0"+s+"秒":""+s+"秒",c+h)):(l=r+"小时",0==a?(c="",h=0==s?"":10>s?"0"+s+"秒":""+s+"秒"):(c=10>a?"0"+a+"分":""+a+"分",l+c))):(u=i+"天",l=0==r?"":10>r?"0"+r+"小时":""+r+"小时",u+l):""},t.getFormatBySecond6=function(t){void 0===t&&(t=0);var e,n,o=Math.floor(t/3600),i=Math.floor((t-3600*o)/60);return e=0==o?"00":10>o?"0"+o:""+o,n=0==i?"00":10>i?"0"+i:""+i,e+":"+n},t.getDay=function(t){var e=new Date(t);return e.getDay()},t.isSameDate=function(t,e){var n=new Date(t),o=new Date(e);return n.getFullYear()==o.getFullYear()&&n.getMonth()==o.getMonth()&&n.getDate()==o.getDate()},t.format=function(t,e){void 0===e&&(e="yyyy-MM-dd hh:mm:ss");var n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),S:t.getMilliseconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));for(var o in n)new RegExp("("+o+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?n[o]:("00"+n[o]).substr((""+n[o]).length)));return e},t.dateDifference=function(t,e){var n=Math.abs(e-t);return Math.ceil(n/864e5)},t}();t.date=e,__reflect(e.prototype,"tubao.date")}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(){function e(){}return e.Game_Bg=new t.layer,e.Game_Main=new t.layer,e.UI_MainUp=new t.layer,e.UI_MainDown=new t.layer,e.UI_MainReght=new t.layer,e.UI_Popup=new t.layer,e.UI_Message=new t.layer,e.UI_GetMessage=new t.layer,e.UI_Talk=new t.layer,e.UI_Loading=new t.layer,e.UI_playGame=new t.layer,e}();t.LayerManager=e,__reflect(e.prototype,"tubao.layer.LayerManager")}(e=t.layer||(t.layer={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){var n=function(){function n(){this._layers=[]}return n.prototype.onEnter=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.addLayer(e.LayerManager.Game_Bg),this.addLayer(e.LayerManager.Game_Main),this.addLayer(e.LayerManager.UI_MainUp),this.addLayer(e.LayerManager.UI_MainReght),this.addLayer(e.LayerManager.UI_MainDown),this.addLayer(e.LayerManager.UI_Popup),this.addLayer(e.LayerManager.UI_Talk),this.addLayer(e.LayerManager.UI_playGame),this.addLayer(e.LayerManager.UI_Loading),this.addLayer(e.LayerManager.UI_Message),this.addLayer(e.LayerManager.UI_GetMessage)},n.prototype.onExit=function(){t.mvc.manager.view.closeAll(),this.removeAllLayer()},n.prototype.addLayer=function(e){t.stage.addChild(e),this._layers.push(e)},n.prototype.addLayerAt=function(e,n){t.stage.addChildAt(e,n),this._layers.push(e)},n.prototype.removeLayer=function(e){t.stage.removeChild(e),this._layers.splice(this._layers.indexOf(e),1)},n.prototype.layerRemoveAllChild=function(t){t.removeChildren()},n.prototype.removeAllLayer=function(){for(;this._layers.length;){var t=this._layers[0];this.layerRemoveAllChild(t),this.removeLayer(t)}},n}();e.scene=n,__reflect(n.prototype,"tubao.layer.scene")}(e=t.layer||(t.layer={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(){function t(){}return t.clear=function(){var t=this._scenes[this._currScene];t&&(t.onExit(),this._currScene=void 0),this._scenes={}},t.register=function(t,e){this._scenes[t]=e},t.runScene=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var o=this._scenes[t];if(!o)return void console.log("场景"+t+"不存在");var i=this._scenes[this._currScene];i&&i.onExit(),o.onEnter.apply(o,e),this._currScene=t},t.getCurrScene=function(){return this._currScene},t._scenes={},t}();t.sceneManager=e,__reflect(e.prototype,"tubao.layer.sceneManager")}(e=t.layer||(t.layer={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){function n(t,n){return void 0===n&&(n=null),n?n?Number(egret.localStorage.setItem(String("Rabbit_"+e.label+"_"+t),String(n))):(console.error("缓存数据写入错误,key:"+t+",Str:"+n),Number(egret.localStorage.setItem(String("Rabbit_"+e.label+"_"+t),String(0)))):egret.localStorage.getItem(String("Rabbit_"+e.label+"_"+t))?Number(egret.localStorage.getItem(String("Rabbit_"+e.label+"_"+t))):0}function o(t){var e=egret.localStorage.getItem(t);return e?e:""}function i(t,e){return egret.localStorage.setItem(t,e)}function r(e,n,o){if(t.device.isChannel)platform.setStorage(e,n);else{var i=new Date;i.setUTCMinutes(i.getUTCMinutes()+o),document.cookie=e+"="+n+"; expires="+i.toUTCString()}}function a(e){t.device.isChannel?platform.setStorage(e,""):document.cookie=e+"=true; expires=Sat, 27 Nov 2010 10:39:38 GMT"}function s(e){if(t.device.isChannel)return""==platform.getStorage(e)?!1:platform.getStorage(e);for(var n=e+"=",o=document.cookie.split(";"),i=0;i<o.length;i++){var r=o[i].trim();if(0==r.indexOf(n))return r.substring(n.length,r.length)}return!1}function u(t){var e=s(t);return e?e:0}e.label="Rabbit",e.LocalStorageNum=n,e.getLocal=o,e.setLocal=i,e.setCookie=r,e.delCookie=a,e.getCookie=s,e.getCookieNum=u}(e=t.cookie||(t.cookie={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(t){function e(){var e=t.call(this)||this;return e._currBg="",e}return __extends(e,t),e.prototype.stop=function(){this._currSoundChannel&&this._currSoundChannel.stop(),this._currSoundChannel=null,this._currSound=null,this._currBg="",this._pausePosition=null},e.prototype.play=function(t){if(this._currBg!=t){this.stop(),this._currBg=t;var e=this.getSound(t);e&&this.playSound(e)}},e.prototype.pause=function(){this._currSoundChannel&&(this._pausePosition=this._currSoundChannel.position,this._currSoundChannel.stop())},e.prototype.resume=function(){this._currSoundChannel&&this._pausePosition&&(this._currSound.play(this._pausePosition),this._pausePosition=null)},e.prototype.playSound=function(t){this._currSound=t,this._currSoundChannel=this._currSound.play(),this._currSoundChannel.volume=this._volume},e.prototype.setVolume=function(t){this._volume=t,this._currSoundChannel&&(this._currSoundChannel.volume=this._volume)},e.prototype.loadedPlay=function(t){this._currBg==t&&this.playSound(RES.getRes(t))},e.prototype.checkCanClear=function(t){return this._currBg!=t},e}(t.BaseSound);t.bg=e,__reflect(e.prototype,"tubao.sound.bg",["tubao.sound.ISoundBg"])}(e=t.sound||(t.sound={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){var n=function(){function e(){this._audio=window.wx.createInnerAudioContext(),this._currBg=""}return e.prototype.stop=function(){this._audio.stop(),this._currBg=""},e.prototype.play=function(e){this._currBg!=e&&(this.stop(),this._currBg=e,this._audio.src=t.res.getFileRealPath(this._currBg),this._audio.loop=!0,this._audio.volume=this._volume,this._audio.startTime=0,this._audio.play())},e.prototype.pause=function(){0!=this._currBg.length&&this._audio.pause()},e.prototype.resume=function(){0!=this._currBg.length&&this._audio.play()},e.prototype.setVolume=function(t){this._volume=t,this._audio&&(this._audio.volume=this._volume)},e}();e.bgWx=n,__reflect(n.prototype,"tubao.sound.bgWx",["tubao.sound.ISoundBg"])}(e=t.sound||(t.sound={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(t){function e(){var e=t.call(this)||this;return e._soundLoops={},e._soundChannels={},e}return __extends(e,t),e.prototype.play=function(t,e){var n=this.getSound(t);n?this.playSound(t,n,e):this._soundLoops[t]=e},e.prototype.playSound=function(t,e,n){var o=e.play(0,n);o.volume=this._volume,o.name=t,o.addEventListener(egret.Event.SOUND_COMPLETE,this.onPlayComplete,this),this._soundChannels[o.name]=o},e.prototype.onPlayComplete=function(t){var e=t.currentTarget;this.destroyChannel(e)},e.prototype.destroyChannel=function(t){t.stop(),t.removeEventListener(egret.Event.SOUND_COMPLETE,this.onPlayComplete,this),delete this._soundChannels[t.name]},e.prototype.stop=function(t){var e=this._soundChannels[t];e&&this.destroyChannel(e)},e.prototype.setVolume=function(t){this._volume=t},e.prototype.loadedPlay=function(t){this.playSound(t,RES.getRes(t),this._soundLoops[t]),delete this._soundLoops[t]},e}(t.BaseSound);t.effect=e,__reflect(e.prototype,"tubao.sound.effect",["tubao.sound.ISoundEffect"])}(e=t.sound||(t.sound={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){var n=function(){function n(){var t=this;this._wx=window.wx,this._cache={},setInterval(function(){t.dealSoundTimer()},6e4)}return n.prototype.dealSoundTimer=function(){for(var t=egret.getTimer(),n=Object.keys(this._cache),o=0,i=n.length;i>o;o++){var r=n[o];if(this.checkCanClear(r)){var a=this._cache[r];t-a.useTime>=e.manager.CLEAR_TIME&&(a.destroy(),delete this._cache[r])}}},n.prototype.checkCanClear=function(t){return!0},n.prototype.getAudio=function(e){var n=this._cache[e];return n||(n=this._wx.createInnerAudioContext(),n.src=t.res.getFileRealPath(e),this._cache[e]=n),n.useTime=egret.getTimer(),n},n.prototype.play=function(t,e){var n=this.getAudio(t);n.loop=0==e?!0:!1,n.volume=this._volume,n.startTime=0,n.play()},n.prototype.stop=function(t){var e=this._cache[t];e&&e.stop()},n.prototype.setVolume=function(t){this._volume=t},n}();e.effectWx=n,__reflect(n.prototype,"tubao.sound.effectWx",["tubao.sound.ISoundEffect"])}(e=t.sound||(t.sound={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){var n=function(){function n(){}return n.init=function(){t.device.isWxGame?(this.bg=new e.bgWx,this.effect=new e.effectWx):(this.bg=new e.bg,this.effect=new e.effect),this.bg.setVolume(this.bgVolume),this.effect.setVolume(this.effectVolume),this.setDefaultSwitchState()},n.setDefaultSwitchState=function(){var t=egret.localStorage.getItem(this.LocalStorageKey_Bg);t?this.bgOn="1"==t:this.bgOn=!0;var e=egret.localStorage.getItem(this.LocalStorageKey_Effect);e?this.effectOn="1"==e:this.effectOn=!0,console.log("背景音乐:",this.bgOn),console.log("音效:",this.effectOn)},n.playEffect=function(t,e){void 0===e&&(e=1),this.effectOn&&this.effect.play(t,e)},n.stopEffect=function(t){this.effect.stop(t)},n.playBg=function(t){this.currBg=t,this.bgOn&&this.bg.play(t)},n.stopBg=function(){this.bg.stop()},n.pauseBg=function(){this.bgOn&&this.bg.pause()},n.resumeBg=function(){this.bgOn&&this.bg.resume()},n.setEffectOn=function(t){this.effectOn=t,egret.localStorage.setItem(this.LocalStorageKey_Effect,t?"1":"0")},n.setBgOn=function(t){this.bgOn=t,egret.localStorage.setItem(this.LocalStorageKey_Bg,t?"1":"0"),this.bgOn?this.currBg&&this.playBg(this.currBg):this.stopBg()},n.setBgVolume=function(t){t=Math.min(t,1),t=Math.max(t,0),this.bgVolume=t,this.bg.setVolume(this.bgVolume)},n.getBgVolume=function(){return this.bgVolume},n.setEffectVolume=function(t){t=Math.min(t,1),t=Math.max(t,0),this.effectVolume=t,this.effect.setVolume(this.effectVolume)},n.getEffectVolume=function(){return this.effectVolume},Object.defineProperty(n,"bgIsOn",{get:function(){return this.bgOn},enumerable:!0,configurable:!0}),Object.defineProperty(n,"effectIsOn",{get:function(){return this.effectOn},enumerable:!0,configurable:!0}),n.CLEAR_TIME=18e4,n.LocalStorageKey_Bg="bgMusicFlag",n.LocalStorageKey_Effect="effectMusicFlag",n.bgVolume=.5,n.effectVolume=.5,n}();e.manager=n,__reflect(n.prototype,"tubao.sound.manager")}(e=t.sound||(t.sound={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){function n(t){t.addEventListener(egret.TouchEvent.TOUCH_TAP,function(){o(t)},this)}function o(t){t.parent.setChildIndex(t,t.parent.numChildren-1)}function i(e){var n=t.layer.LayerManager.UI_Popup.height/2,o=t.layer.LayerManager.UI_Popup.width/2,i=e.height/2,r=e.width/2;e.x=Math.round(o-r),e.y=Math.round(n-i)}e.disPlayUpTop=n,e.displayMomentPoix=i}(e=t.utils||(t.utils={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){function e(t,e){if(e)for(var n in t.items)t.items[n].props={loop:!0};t.play()}t.playAnimation=e}(e=t.utils||(t.utils={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){function e(t,e,n){var o=0,i=0,r=0,a=0;e.addEventListener(egret.TouchEvent.TOUCH_BEGIN,function(t){o=t.stageX,i=t.stageY},this),e.addEventListener(egret.TouchEvent.TOUCH_END,function(t){r=t.stageX,a=t.stageY},this),e.addEventListener(egret.TouchEvent.TOUCH_TAP,function(){o==r&&i==a&&n.call(t)},this)}t.verTrigger=e}(e=t.utils||(t.utils={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){function e(t,e,n){var o=setInterval(function(){t&&(n.call(e),clearInterval(o))},30)}t.wait=e}(e=t.utils||(t.utils={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(e){var n=function(n){function o(){var e=n.call(this,t.layer.LayerManager.UI_Popup)||this;return e.videoBuffer=!0,e.video=new egret.Video,e.inPlay=!1,e.skinName="tubao.module.videoSkin",e.video.fullscreen=!1,e.videoGroup.addChild(e.video),e.tiaoguo.addEventListener(egret.TouchEvent.TOUCH_TAP,e.videoPlayOver,e),e.video.addEventListener(egret.Event.COMPLETE,e.lodingEnd,e),e.video.addEventListener(egret.Event.ENDED,e.videoPlayOver,e),e.visible=!1,e.alpha=0,e}return __extends(o,n),o.prototype.lodingEnd=function(){var n=Math.round(t.height/4*3),o=Math.round(n/this.video.height*this.video.width);this.videoGroup.width=this.video.width=o,this.videoGroup.height=this.video.height=n,this.videoBuffer?egret.Tween.get(this).to({alpha:1},2e3).call(this.bofangKaiShi,this):this.bofangKaiShi();var i=new e.videoEvent(e.videoEvent.videoPlay);i.name=this.name,this.dispatchEvent(i),this.inPlay=!0},o.prototype.videoPlayOver=function(){this.videoBuffer?egret.Tween.get(this).to({alpha:0},2e3).call(this.bofangWanCheng,this):this.bofangWanCheng()},o.prototype.addOneVideo=function(e){return this.open(),t.device.isChannel?(new t.base.popup("basics01_png","小程序环境没有播放视频能力~"),void this.bofangWanCheng()):(this.visible=!0,this.alpha=0,this.vname=e,this.video.load("resource/chief/senior/video/"+e+".mp4"),void(this.video.poster="resource/chief/senior/video/"+e+".jpg"))},o.prototype.bofangKaiShi=function(){this.alpha=1,this.visible=!0,this.video.play(1),this.video.volume=t.sound.manager.getBgVolume(),t.sound.manager.setBgVolume(0)},o.prototype.bofangWanCheng=function(){this.alpha=0,this.visible=!1,this.video.pause(),t.sound.manager.setBgVolume(1);var n=new e.videoEvent(e.videoEvent.videoEnd);n.name=this.name,this.dispatchEvent(n),this.inPlay=!1,this.close()},o}(t.base.panel);e.video=n,__reflect(n.prototype,"tubao.video.video")}(e=t.video||(t.video={}))}(tubao||(tubao={}));var tubao;!function(t){var e;!function(t){var e=function(t){function e(e,n,o){return void 0===n&&(n=!1),void 0===o&&(o=!1),t.call(this,e,n,o)||this}return __extends(e,t),e.videoPlay="播放开始",e.videoEnd="播放结束",e}(egret.Event);t.videoEvent=e,__reflect(e.prototype,"tubao.video.videoEvent")}(e=t.video||(t.video={}))}(tubao||(tubao={}));