Files
lifeRestart/public/libs/laya/min/laya.ui.min.js
Vick Scarlet 150c991648 Squashed commit of the following:
commit b421082374
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Fri Dec 31 20:26:20 2021 +0800

    update specialthanks

commit 765a69294b
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Tue Dec 14 19:10:03 2021 +0800

    fix ios goto

commit 8eb8c3ca72
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Tue Dec 14 19:03:37 2021 +0800

    add event grade

commit ab705dd46c
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Tue Dec 14 18:48:42 2021 +0800

    build version

commit a1e4232369
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Tue Dec 14 18:47:05 2021 +0800

    change talent replace before property allocate

commit f4d7b3ae3c
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Tue Dec 14 18:06:18 2021 +0800

    add event grade

commit 0567e40ddc
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Thu Dec 2 21:28:10 2021 +0800

    add particle

commit f17003925e
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Thu Dec 2 20:14:26 2021 +0800

    change ui

commit f8beda1d8f
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Thu Dec 2 19:08:30 2021 +0800

    change popup message ui

commit 915a2aa17d
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Thu Dec 2 18:34:29 2021 +0800

    new build

commit b5edabc104
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Thu Dec 2 18:18:46 2021 +0800

    add hint message

commit a143feadaf
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Thu Dec 2 17:57:31 2021 +0800

    fix copy bug

commit eab1975791
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Thu Dec 2 17:56:28 2021 +0800

    add save/load

commit acf9b92134
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Thu Dec 2 14:35:33 2021 +0800

    add theme switch

commit 488a6054ab
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Wed Dec 1 18:30:36 2021 +0800

    fix uiManager bug

commit f0317eaf14
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Wed Dec 1 16:07:03 2021 +0800

    add message popup

commit eb02d1ee6f
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Nov 28 21:22:54 2021 +0800

    change relocation

commit 60503eae47
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Nov 28 19:27:16 2021 +0800

    change ScaleButton -> Laya.runtime.ScaleButton

commit 52ef5909c1
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Nov 28 19:26:31 2021 +0800

    change ScaleButton -> Laya.runtime.ScaleButton

commit 0284f6aa71
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Nov 28 19:05:24 2021 +0800

    config webpack

commit 0e272ffd99
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Nov 28 13:17:41 2021 +0800

    add thanks

commit e1e2ab4701
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Nov 28 11:40:21 2021 +0800

    add light theme

commit 4f55c00f86
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sat Nov 27 22:27:39 2021 +0800

    fix bug

commit 1d07bdfc46
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sat Nov 27 21:48:47 2021 +0800

    daily update

commit 52d6a0ca8f
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Wed Nov 24 23:10:04 2021 +0800

    daily update

commit f8dd720d4d
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Wed Nov 24 19:08:13 2021 +0800

    daily update

commit d088c1a862
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Nov 21 21:41:46 2021 +0800

    remove useless

commit a711fcf3ed
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Tue Nov 16 00:53:05 2021 +0800

    add achievement popup
    add page adaptive
    add talent extends

commit 05e02de3db
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sat Nov 13 01:24:04 2021 +0800

    add github and discord

commit bff0109cc5
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sat Nov 13 00:30:01 2021 +0800

    add trajectory auto mode

commit 54c04f65c2
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Fri Nov 12 19:54:31 2021 +0800

    fix property judge negative number bug

commit 660739530b
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Fri Nov 12 19:48:58 2021 +0800

    update achievement

commit c94e9e7433
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Thu Nov 11 21:37:45 2021 +0800

    update daily

commit c06cd9ea62
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Tue Nov 9 00:08:05 2021 +0800

    update daily

commit 2666983f89
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Nov 7 23:00:22 2021 +0800

    add uiManager auto scan and load skin resource

commit 22fa5d755a
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Nov 7 22:17:04 2021 +0800

    update framework

commit f40698d63e
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Oct 31 00:13:22 2021 +0800

    add laya
2021-12-31 20:31:26 +08:00

1 line
124 KiB
JavaScript

!function(n,g){g.un,g.uns;var s=g.static,h=g.class,o=g.getset,i=(g.__newvec,laya.display.Animation),l=laya.utils.Browser,p=laya.utils.ClassUtils,e=laya.filters.ColorFilter,r=laya.utils.Ease,a=laya.events.Event,c=(laya.events.EventDispatcher,laya.display.css.Font),_=laya.display.FrameAnimation,t=laya.display.Graphics,u=laya.utils.Handler,d=laya.net.HttpRequest,f=laya.display.Input,m=laya.net.Loader,y=laya.net.LocalStorage,v=(laya.display.Node,laya.maths.Point),C=laya.maths.Rectangle,b=laya.renders.Render,S=laya.display.Sprite,x=(laya.display.Stage,laya.display.Text),w=laya.resource.Texture,B=laya.utils.TimeLine,I=laya.utils.Tween,k=laya.utils.Utils,L=laya.utils.WeakObject;g.interface("laya.ui.IItem"),g.interface("laya.ui.ISelect"),g.interface("laya.ui.IRender"),g.interface("laya.ui.IComponent"),g.interface("laya.ui.IBox","IComponent");var M=(h(T,"laya.ui.LayoutStyle"),s(T,["EMPTY",function(){return this.EMPTY=new T}]),T);function T(){this.enable=!1,this.top=NaN,this.bottom=NaN,this.left=NaN,this.right=NaN,this.centerX=NaN,this.centerY=NaN,this.anchorX=NaN,this.anchorY=NaN}var z=(h(P,"laya.ui.Styles"),P.labelColor="#000000",P.buttonStateNum=3,P.scrollBarMinNum=15,P.scrollBarDelayTime=500,s(P,["defaultSizeGrid",function(){return this.defaultSizeGrid=[4,4,4,4,0]},"labelPadding",function(){return this.labelPadding=[2,2,2,2]},"inputLabelPadding",function(){return this.inputLabelPadding=[1,1,1,3]},"buttonLabelColors",function(){return this.buttonLabelColors=["#32556b","#32cc6b","#ff0000","#C0C0C0"]},"comboBoxItemColors",function(){return this.comboBoxItemColors=["#5e95b6","#ffffff","#000000","#8fa4b1","#ffffff"]}]),P);function P(){}var H=(h(D,"laya.ui.UIUtils"),D.fillArray=function(t,i,e){var s=t.concat();if(i)for(var n=i.split(","),h=0,o=Math.min(s.length,n.length);h<o;h++){var r=n[h];s[h]="true"==r||"false"!=r&&r,null!=e&&(s[h]=e(r))}return s},D.toColor=function(t){return k.toHexColor(t)},D.gray=function(t,i){(i=void 0===i?!0:i)?D.addFilter(t,D.grayFilter):D.clearFilter(t,e)},D.addFilter=function(t,i){var e=t.filters||[];e.push(i),t.filters=e},D.clearFilter=function(t,i){var e=t.filters;if(null!=e&&0<e.length){for(var s=e.length-1;-1<s;s--){var n=e[s];g.__typeof(n,i)&&e.splice(s,1)}t.filters=e}},D._getReplaceStr=function(t){return D.escapeSequence[t]},D.adptString=function(t){return t.replace(/\\(\w)/g,D._getReplaceStr)},D.getBindFun=function(t){var i,e=D._funMap.get(t);return null==e&&(i=(i='"'+t+'"').replace(/^"\${|}"$/g,"").replace(/\${/g,'"+').replace(/}/g,'+"'),e=g._runScript("(function(data){if(data==null)return;with(data){try{\nreturn "+i+"\n}catch(e){}}})"),D._funMap.set(t,e)),e},s(D,["grayFilter",function(){return this.grayFilter=new e([.3086,.6094,.082,0,0,.3086,.6094,.082,0,0,.3086,.6094,.082,0,0,0,0,0,1,0])},"escapeSequence",function(){return this.escapeSequence={"\\n":"\n","\\t":"\t"}},"_funMap",function(){return this._funMap=new L}]),D);function D(){}var A=(h(O,"UIConfig"),O.touchScrollEnable=!0,O.mouseWheelEnable=!0,O.showButtons=!0,O.popupBgColor="#000000",O.popupBgAlpha=.5,O.closeDialogOnSide=!0,O);function O(){}var N=function(i){function d(){this.autoCacheCmd=!0,this._width=0,this._height=0,this._source=null,this._sizeGrid=null,this._isChanged=!1,this._offset=null,d.__super.call(this)}h(d,"laya.ui.AutoBitmap",i);var t=d.prototype;return t.destroy=function(){i.prototype.destroy.call(this),this._source=null,this._sizeGrid=null,this._offset=null},t._setChanged=function(){this._isChanged||(this._isChanged=!0,g.timer.callLater(this,this.changeSource))},t.changeSource=function(){this._isChanged=!1;var t=this._source;if(t&&t.bitmap){var i=this.width,e=this.height,s=this._sizeGrid,n=t.sourceWidth,h=t.sourceHeight;if(!s||n===i&&h===e)this.clear(),this.drawTexture(t,this._offset?this._offset[0]:0,this._offset?this._offset[1]:0,i,e);else{t.$_GID||(t.$_GID=k.getGID());var o=t.$_GID+"."+i+"."+e+"."+s.join(".");if(k.isOKCmdList(L.I.get(o)))return void(this.cmds=L.I.get(o));this.clear();var r=s[0],a=s[1],l=s[2],c=s[3],u=s[4],_=!1;e==h&&(r=l=0),i<(c=i==n?a=0:c)+a&&(s=i,_=!0,i=c+a,this.save(),this.clipRect(0,0,s,e)),c&&r&&this.drawTexture(d.getTexture(t,0,0,c,r),0,0,c,r),a&&r&&this.drawTexture(d.getTexture(t,n-a,0,a,r),i-a,0,a,r),c&&l&&this.drawTexture(d.getTexture(t,0,h-l,c,l),0,e-l,c,l),a&&l&&this.drawTexture(d.getTexture(t,n-a,h-l,a,l),i-a,e-l,a,l),r&&this.drawBitmap(u,d.getTexture(t,c,0,n-c-a,r),c,0,i-c-a,r),l&&this.drawBitmap(u,d.getTexture(t,c,h-l,n-c-a,l),c,e-l,i-c-a,l),c&&this.drawBitmap(u,d.getTexture(t,0,r,c,h-r-l),0,r,c,e-r-l),a&&this.drawBitmap(u,d.getTexture(t,n-a,r,a,h-r-l),i-a,r,a,e-r-l),this.drawBitmap(u,d.getTexture(t,c,r,n-c-a,h-r-l),c,r,i-c-a,e-r-l),_&&this.restore(),this.autoCacheCmd&&!b.isConchApp&&L.I.set(o,this.cmds)}this._repaint()}},t.drawBitmap=function(t,i,e,s,n,h){void 0===h&&(h=0),(n=void 0===n?0:n)<.1||h<.1||(!t||i.width==n&&i.height==h?this.drawTexture(i,e,s,n,h):this.fillTexture(i,e,s,n,h))},t.clear=function(t){void 0===t&&(t=!0),i.prototype.clear.call(this,!1)},o(0,t,"sizeGrid",function(){return this._sizeGrid},function(t){this._sizeGrid=t,this._setChanged()}),o(0,t,"width",function(){return this._width||(this._source?this._source.sourceWidth:0)},function(t){this._width!=t&&(this._width=t,this._setChanged())}),o(0,t,"height",function(){return this._height||(this._source?this._source.sourceHeight:0)},function(t){this._height!=t&&(this._height=t,this._setChanged())}),o(0,t,"source",function(){return this._source},function(t){t?(this._source=t,this._setChanged()):(this._source=null,this.clear())}),d.getTexture=function(t,i,e,s,n){s<=0&&(s=1),n<=0&&(n=1),t.$_GID||(t.$_GID=k.getGID());var h=t.$_GID+"."+i+"."+e+"."+s+"."+n,o=L.I.get(h);return o&&o.source||(o=w.createFromTexture(t,i,e,s,n),L.I.set(h,o)),o},d}(t);h(Y,"laya.ui.UIEvent",a),Y.SHOW_TIP="showtip",Y.HIDE_TIP="hidetip";function Y(){Y.__super.call(this)}var G,X=function(i){function t(){this._comXml=null,this._dataSource=null,this._toolTip=null,this._tag=null,this._disabled=!1,this._gray=!1,this.layoutEnabled=!0,t.__super.call(this),this._layout=M.EMPTY,this.preinitialize(),this.createChildren(),this.initialize()}h(t,"laya.ui.Component",i);var e=t.prototype;return g.imps(e,{"laya.ui.IComponent":!0}),e.destroy=function(t){i.prototype.destroy.call(this,t=void 0===t?!0:t),this._dataSource=this._layout=null,this._tag=null,this._toolTip=null},e.preinitialize=function(){},e.createChildren=function(){},e.initialize=function(){},e.callLater=function(t,i){g.timer.callLater(this,t,i)},e.runCallLater=function(t){g.timer.runCallLater(this,t)},e.commitMeasure=function(){},e.changeSize=function(){this.event("resize"),this._layout.enable&&(this.resetLayoutX(),this.resetLayoutY())},e.getLayout=function(){return this._layout===M.EMPTY&&(this._layout=new M),this._layout},e._setLayoutEnabled=function(t){this._layout&&this._layout.enable!=t&&(this._layout.enable=t,this.on("added",this,this.onAdded),this.on("removed",this,this.onRemoved),this.parent&&this.onAdded())},e.onRemoved=function(){this.parent.off("resize",this,this.onCompResize)},e.onAdded=function(){this.parent.on("resize",this,this.onCompResize),this.resetLayoutX(),this.resetLayoutY()},e.onCompResize=function(){this._layout&&this._layout.enable&&(this.resetLayoutX(),this.resetLayoutY())},e.resetLayoutX=function(){var t,i=this._layout;isNaN(i.anchorX)||(this.pivotX=i.anchorX*this.width),!this.layoutEnabled||(t=this.parent)&&(isNaN(i.centerX)?isNaN(i.left)?isNaN(i.right)||(this.x=Math.round(t.width-this.displayWidth-i.right+this.pivotX*this.scaleX)):(this.x=Math.round(i.left+this.pivotX*this.scaleX),isNaN(i.right)||(this.width=(t._width-i.left-i.right)/(this.scaleX||.01))):this.x=Math.round(.5*(t.width-this.displayWidth)+i.centerX+this.pivotX*this.scaleX))},e.resetLayoutY=function(){var t,i=this._layout;isNaN(i.anchorY)||(this.pivotY=i.anchorY*this.height),!this.layoutEnabled||(t=this.parent)&&(isNaN(i.centerY)?isNaN(i.top)?isNaN(i.bottom)||(this.y=Math.round(t.height-this.displayHeight-i.bottom+this.pivotY*this.scaleY)):(this.y=Math.round(i.top+this.pivotY*this.scaleY),isNaN(i.bottom)||(this.height=(t._height-i.top-i.bottom)/(this.scaleY||.01))):this.y=Math.round(.5*(t.height-this.displayHeight)+i.centerY+this.pivotY*this.scaleY))},e.onMouseOver=function(t){g.stage.event("showtip",this._toolTip)},e.onMouseOut=function(t){g.stage.event("hidetip",this._toolTip)},e._childChanged=function(t){this.callLater(this.changeSize),i.prototype._childChanged.call(this,t)},o(0,e,"displayWidth",function(){return this.width*this.scaleX}),o(0,e,"width",function(){return this._width||this.measureWidth},function(t){this._width!=t&&(this._width=t,this.conchModel&&this.conchModel.size(this._width,this._height),this.callLater(this.changeSize),!this._layout.enable||isNaN(this._layout.centerX)&&isNaN(this._layout.right)&&isNaN(this._layout.anchorX)||this.resetLayoutX())}),o(0,e,"measureWidth",function(){var t=0;this.commitMeasure();for(var i=this.numChildren-1;-1<i;i--){var e=this.getChildAt(i);e.visible&&(t=Math.max(e.x+e.width*e.scaleX,t))}return t}),o(0,e,"displayHeight",function(){return this.height*this.scaleY}),o(0,e,"height",function(){return this._height||this.measureHeight},function(t){this._height!=t&&(this._height=t,this.conchModel&&this.conchModel.size(this._width,this._height),this.callLater(this.changeSize),!this._layout.enable||isNaN(this._layout.centerY)&&isNaN(this._layout.bottom)&&isNaN(this._layout.anchorY)||this.resetLayoutY())}),o(0,e,"dataSource",function(){return this._dataSource},function(t){for(var i in this._dataSource=t,this._dataSource)this.hasOwnProperty(i)&&"function"!=typeof this[i]&&(this[i]=this._dataSource[i])}),o(0,e,"scaleY",i.prototype._$get_scaleY,function(t){g.superGet(S,this,"scaleY")!=t&&(g.superSet(S,this,"scaleY",t),this.callLater(this.changeSize),this._layout.enable&&this.resetLayoutY())}),o(0,e,"measureHeight",function(){var t=0;this.commitMeasure();for(var i=this.numChildren-1;-1<i;i--){var e=this.getChildAt(i);e.visible&&(t=Math.max(e.y+e.height*e.scaleY,t))}return t}),o(0,e,"scaleX",i.prototype._$get_scaleX,function(t){g.superGet(S,this,"scaleX")!=t&&(g.superSet(S,this,"scaleX",t),this.callLater(this.changeSize),this._layout.enable&&this.resetLayoutX())}),o(0,e,"top",function(){return this._layout.top},function(t){t!=this._layout.top&&(this.getLayout().top=t,this._setLayoutEnabled(!0)),this.resetLayoutY()}),o(0,e,"bottom",function(){return this._layout.bottom},function(t){t!=this._layout.bottom&&(this.getLayout().bottom=t,this._setLayoutEnabled(!0)),this.resetLayoutY()}),o(0,e,"left",function(){return this._layout.left},function(t){t!=this._layout.left&&(this.getLayout().left=t,this._setLayoutEnabled(!0)),this.resetLayoutX()}),o(0,e,"right",function(){return this._layout.right},function(t){t!=this._layout.right&&(this.getLayout().right=t,this._setLayoutEnabled(!0)),this.resetLayoutX()}),o(0,e,"centerX",function(){return this._layout.centerX},function(t){t!=this._layout.centerX&&(this.getLayout().centerX=t,this._setLayoutEnabled(!0)),this.resetLayoutX()}),o(0,e,"centerY",function(){return this._layout.centerY},function(t){t!=this._layout.centerY&&(this.getLayout().centerY=t,this._setLayoutEnabled(!0)),this.resetLayoutY()}),o(0,e,"anchorX",function(){return this._layout.anchorX},function(t){t!=this._layout.anchorX&&(this.getLayout().anchorX=t,this._setLayoutEnabled(!0)),this.resetLayoutX()}),o(0,e,"anchorY",function(){return this._layout.anchorY},function(t){t!=this._layout.anchorY&&(this.getLayout().anchorY=t,this._setLayoutEnabled(!0)),this.resetLayoutY()}),o(0,e,"tag",function(){return this._tag},function(t){this._tag=t}),o(0,e,"toolTip",function(){return this._toolTip},function(t){this._toolTip!=t&&(null!=(this._toolTip=t)?(this.on("mouseover",this,this.onMouseOver),this.on("mouseout",this,this.onMouseOut)):(this.off("mouseover",this,this.onMouseOver),this.off("mouseout",this,this.onMouseOut)))}),o(0,e,"comXml",function(){return this._comXml},function(t){this._comXml=t}),o(0,e,"gray",function(){return this._gray},function(t){t!==this._gray&&(this._gray=t,H.gray(this,t))}),o(0,e,"disabled",function(){return this._disabled},function(t){t!==this._disabled&&(this.gray=this._disabled=t,this.mouseEnabled=!t)}),t}(S),E=function(){function t(){this.lockLayer=null,this.popupEffect=function(t){t.scale(1,1),I.from(t,{x:g.stage.width/2,y:g.stage.height/2,scaleX:0,scaleY:0},300,r.backOut,u.create(this,this.doOpen,[t]))},this.closeEffect=function(t,i){I.to(t,{x:g.stage.width/2,y:g.stage.height/2,scaleX:0,scaleY:0},300,r.strongOut,u.create(this,this.doClose,[t,i]))},t.__super.call(this),this.maskLayer=new S,this.popupEffectHandler=new u(this,this.popupEffect),this.closeEffectHandler=new u(this,this.closeEffect),this.mouseEnabled=this.maskLayer.mouseEnabled=!0,this.zOrder=1e3,g.stage.addChild(this),g.stage.on("resize",this,this._onResize),A.closeDialogOnSide&&this.maskLayer.on("click",this,this._closeOnSide),this._onResize(null)}h(t,"laya.ui.DialogManager",S);var i=t.prototype;return i._closeOnSide=function(){var t=this.getChildAt(this.numChildren-1);t instanceof laya.ui.Dialog&&t.close("side")},i.setLockView=function(t){this.lockLayer||(this.lockLayer=new V,this.lockLayer.mouseEnabled=!0,this.lockLayer.size(g.stage.width,g.stage.height)),this.lockLayer.removeChildren(),t&&(t.centerX=t.centerY=0,this.lockLayer.addChild(t))},i._onResize=function(t){var i=this.maskLayer.width=g.stage.width,e=this.maskLayer.height=g.stage.height;this.lockLayer&&this.lockLayer.size(i,e),this.maskLayer.graphics.clear(),this.maskLayer.graphics.drawRect(0,0,i,e,A.popupBgColor),this.maskLayer.alpha=A.popupBgAlpha;for(var s=this.numChildren-1;-1<s;s--){var n=this.getChildAt(s);n.popupCenter&&this._centerDialog(n)}},i._centerDialog=function(t){t.x=Math.round((g.stage.width-t.width>>1)+t.pivotX),t.y=Math.round((g.stage.height-t.height>>1)+t.pivotY)},i.open=function(t,i,e){void 0===e&&(e=!1),(i=void 0===i?!1:i)&&this._closeAll(),t.popupCenter&&this._centerDialog(t),this.addChild(t),(t.isModal||this._$P.hasZorder)&&this.timer.callLater(this,this._checkMask),e&&null!=t.popupEffect?t.popupEffect.runWith(t):this.doOpen(t),this.event("open")},i.doOpen=function(t){t.onOpened()},i.lock=function(t){this.lockLayer&&(t?this.addChild(this.lockLayer):this.lockLayer.removeSelf())},i.close=function(t,i,e){(e=void 0===e?!1:e)&&null!=t.closeEffect?t.closeEffect.runWith([t,i]):this.doClose(t,i),this.event("close")},i.doClose=function(t,i){t.removeSelf(),t.isModal&&this._checkMask(),t.closeHandler&&t.closeHandler.runWith(i),t.onClosed(i)},i.closeAll=function(){this._closeAll(),this.event("close")},i._closeAll=function(){for(var t=this.numChildren-1;-1<t;t--){var i=this.getChildAt(t);i&&null!=i.close&&this.doClose(i)}},i.getDialogsByGroup=function(t){for(var i=[],e=this.numChildren-1;-1<e;e--){var s=this.getChildAt(e);s&&s.group===t&&i.push(s)}return i},i.closeByGroup=function(t){for(var i=[],e=this.numChildren-1;-1<e;e--){var s=this.getChildAt(e);s&&s.group===t&&(s.close(),i.push(s))}return i},i._checkMask=function(){this.maskLayer.removeSelf();for(var t=this.numChildren-1;-1<t;t--){var i=this.getChildAt(t);if(i&&i.isModal)return void this.addChildAt(this.maskLayer,t)}},t}(),R=function(i){function e(t){this._bitmap=null,this._skin=null,this._group=null,e.__super.call(this),this.skin=t}h(e,"laya.ui.Image",i);var t=e.prototype;return t.destroy=function(t){void 0===t&&(t=!0),i.prototype.destroy.call(this,!0),this._bitmap&&this._bitmap.destroy(),this._bitmap=null},t.dispose=function(){this.destroy(!0),g.loader.clearRes(this._skin)},t.createChildren=function(){this.graphics=this._bitmap=new N,this._bitmap.autoCacheCmd=!1},t.setSource=function(t,i){t===this._skin&&i&&(this.source=i,this.onCompResize())},o(0,t,"source",function(){return this._bitmap.source},function(t){this._bitmap&&(this._bitmap.source=t,this.event("loaded"),this.repaint())}),o(0,t,"dataSource",i.prototype._$get_dataSource,function(t){"string"==typeof(this._dataSource=t)?this.skin=t:g.superSet(X,this,"dataSource",t)}),o(0,t,"measureHeight",function(){return this._bitmap.height}),o(0,t,"skin",function(){return this._skin},function(t){this._skin!=t&&((this._skin=t)?(t=m.getRes(t))?(this.source=t,this.onCompResize()):g.loader.load(this._skin,u.create(this,this.setSource,[this._skin]),null,"image",1,!0,this._group):this.source=null)}),o(0,t,"group",function(){return this._group},function(t){t&&this._skin&&m.setGroup(this._skin,t),this._group=t}),o(0,t,"sizeGrid",function(){return this._bitmap.sizeGrid?this._bitmap.sizeGrid.join(","):null},function(t){this._bitmap.sizeGrid=H.fillArray(z.defaultSizeGrid,t,Number)}),o(0,t,"measureWidth",function(){return this._bitmap.width}),o(0,t,"width",i.prototype._$get_width,function(t){g.superSet(X,this,"width",t),this._bitmap.width=0==t?1e-7:t}),o(0,t,"height",i.prototype._$get_height,function(t){g.superSet(X,this,"height",t),this._bitmap.height=0==t?1e-7:t}),e}(X),V=function(t){function i(){i.__super.call(this)}h(i,"laya.ui.Box",t);var e=i.prototype;return g.imps(e,{"laya.ui.IBox":!0}),o(0,e,"dataSource",t.prototype._$get_dataSource,function(t){for(var i in this._dataSource=t){var e=this.getChildByName(i);e?e.dataSource=t[i]:this.hasOwnProperty(i)&&"function"!=typeof this[i]&&(this[i]=t[i])}}),i}(X),W=function(i){function e(t,i){this.toggle=!1,this._bitmap=null,this._text=null,this._strokeColors=null,this._state=0,this._selected=!1,this._skin=null,this._autoSize=!0,this._sources=null,this._clickHandler=null,this._stateChanged=!1,e.__super.call(this),this._labelColors=z.buttonLabelColors,this._stateNum=z.buttonStateNum,void 0===i&&(i=""),this.skin=t,this.label=i}h(e,"laya.ui.Button",i);var t=e.prototype;return g.imps(t,{"laya.ui.ISelect":!0}),t.destroy=function(t){i.prototype.destroy.call(this,t=void 0===t?!0:t),this._bitmap&&this._bitmap.destroy(),this._text&&this._text.destroy(t),this._bitmap=null,this._text=null,this._clickHandler=null,this._labelColors=this._sources=this._strokeColors=null},t.createChildren=function(){this.graphics=this._bitmap=new N},t.createText=function(){this._text||(this._text=new x,this._text.overflow=x.HIDDEN,this._text.align="center",this._text.valign="middle",this._text.width=this._width,this._text.height=this._height)},t.initialize=function(){1!==this._mouseEnableState&&(this.mouseEnabled=!0,this._setBit(2,!0)),this._createListener("mouseover",this,this.onMouse,null,!1,!1),this._createListener("mouseout",this,this.onMouse,null,!1,!1),this._createListener("mousedown",this,this.onMouse,null,!1,!1),this._createListener("mouseup",this,this.onMouse,null,!1,!1),this._createListener("click",this,this.onMouse,null,!1,!1)},t.onMouse=function(t){if(!1!==this.toggle||!this._selected)return"click"===t.type?(this.toggle&&(this.selected=!this._selected),void(this._clickHandler&&this._clickHandler.run())):void(this._selected||(this.state=e.stateMap[t.type]))},t.changeClips=function(){var t=m.getRes(this._skin);if(t){var i=t.sourceWidth,e=t.sourceHeight/this._stateNum;t.$_GID||(t.$_GID=k.getGID());var s=t.$_GID+"-"+this._stateNum,n=L.I.get(s);if(n=!k.isOkTextureList(n)?null:n)this._sources=n;else{if(this._sources=[],1===this._stateNum)this._sources.push(t);else for(var h=0;h<this._stateNum;h++)this._sources.push(w.createFromTexture(t,0,e*h,i,e));L.I.set(s,this._sources)}this._autoSize?(this._bitmap.width=this._width||i,this._bitmap.height=this._height||e,this._text&&(this._text.width=this._bitmap.width,this._text.height=this._bitmap.height)):this._text&&(this._text.x=i)}else console.log("lose skin",this._skin)},t.changeState=function(){this._stateChanged=!1,this.runCallLater(this.changeClips);var t=this._state<this._stateNum?this._state:this._stateNum-1;this._sources&&(this._bitmap.source=this._sources[t]),this.label&&(this._text.color=this._labelColors[t],this._strokeColors&&(this._text.strokeColor=this._strokeColors[t]))},t._setStateChanged=function(){this._stateChanged||(this._stateChanged=!0,this.callLater(this.changeState))},o(0,t,"labelStrokeColor",function(){return this.createText(),this._text.strokeColor},function(t){this.createText(),this._text.strokeColor=t}),o(0,t,"measureHeight",function(){return this.runCallLater(this.changeClips),this._text?Math.max(this._bitmap.height,this._text.height):this._bitmap.height}),o(0,t,"skin",function(){return this._skin},function(t){this._skin!=t&&(this._skin=t,this.callLater(this.changeClips),this._setStateChanged())}),o(0,t,"state",function(){return this._state},function(t){this._state!=t&&(this._state=t,this._setStateChanged())}),o(0,t,"text",function(){return this.createText(),this._text}),o(0,t,"stateNum",function(){return this._stateNum},function(t){"string"==typeof t&&(t=parseInt(t)),this._stateNum!=t&&(this._stateNum=t<1?1:3<t?3:t,this.callLater(this.changeClips))}),o(0,t,"strokeColors",function(){return this._strokeColors?this._strokeColors.join(","):""},function(t){this._strokeColors=H.fillArray(z.buttonLabelColors,t,String),this._setStateChanged()}),o(0,t,"labelColors",function(){return this._labelColors.join(",")},function(t){this._labelColors=H.fillArray(z.buttonLabelColors,t,String),this._setStateChanged()}),o(0,t,"measureWidth",function(){return this.runCallLater(this.changeClips),this._autoSize?this._bitmap.width:(this.runCallLater(this.changeState),this._bitmap.width+(this._text?this._text.width:0))}),o(0,t,"label",function(){return this._text?this._text.text:null},function(t){(this._text||t)&&(this.createText(),this._text.text!=t&&(t&&!this._text.parent&&this.addChild(this._text),this._text.text=(t+"").replace(/\\n/g,"\n"),this._setStateChanged()))}),o(0,t,"selected",function(){return this._selected},function(t){this._selected!=t&&(this._selected=t,this.state=this._selected?2:0,this.event("change"))}),o(0,t,"labelPadding",function(){return this.createText(),this._text.padding.join(",")},function(t){this.createText(),this._text.padding=H.fillArray(z.labelPadding,t,Number)}),o(0,t,"labelSize",function(){return this.createText(),this._text.fontSize},function(t){this.createText(),this._text.fontSize=t}),o(0,t,"labelStroke",function(){return this.createText(),this._text.stroke},function(t){this.createText(),this._text.stroke=t}),o(0,t,"labelBold",function(){return this.createText(),this._text.bold},function(t){this.createText(),this._text.bold=t}),o(0,t,"labelFont",function(){return this.createText(),this._text.font},function(t){this.createText(),this._text.font=t}),o(0,t,"labelAlign",function(){return this.createText(),this._text.align},function(t){this.createText(),this._text.align=t}),o(0,t,"clickHandler",function(){return this._clickHandler},function(t){this._clickHandler=t}),o(0,t,"sizeGrid",function(){return this._bitmap.sizeGrid?this._bitmap.sizeGrid.join(","):null},function(t){this._bitmap.sizeGrid=H.fillArray(z.defaultSizeGrid,t,Number)}),o(0,t,"width",i.prototype._$get_width,function(t){g.superSet(X,this,"width",t),this._autoSize&&(this._bitmap.width=t,this._text&&(this._text.width=t))}),o(0,t,"height",i.prototype._$get_height,function(t){g.superSet(X,this,"height",t),this._autoSize&&(this._bitmap.height=t,this._text&&(this._text.height=t))}),o(0,t,"dataSource",i.prototype._$get_dataSource,function(t){"number"==typeof(this._dataSource=t)||"string"==typeof t?this.label=t+"":g.superSet(X,this,"dataSource",t)}),o(0,t,"iconOffset",function(){return this._bitmap._offset?this._bitmap._offset.join(","):null},function(t){this._bitmap._offset=t?H.fillArray([1,1],t,Number):[]}),s(e,["stateMap",function(){return this.stateMap={mouseup:0,mouseover:1,mousedown:2,mouseout:0}}]),e}(X),$=function(i){function s(t,i,e){this._sources=null,this._bitmap=null,this._skin=null,this._clipX=1,this._clipY=1,this._clipWidth=0,this._clipHeight=0,this._autoPlay=!1,this._interval=50,this._complete=null,this._isPlaying=!1,this._index=0,this._clipChanged=!1,this._group=null,this._toIndex=-1,s.__super.call(this),void 0===e&&(e=1),this._clipX=i=void 0===i?1:i,this._clipY=e,this.skin=t}h(s,"laya.ui.Clip",i);var t=s.prototype;return t.destroy=function(t){void 0===t&&(t=!0),i.prototype.destroy.call(this,!0),this._bitmap&&this._bitmap.destroy(),this._bitmap=null,this._sources=null},t.dispose=function(){this.destroy(!0),g.loader.clearRes(this._skin)},t.createChildren=function(){this.graphics=this._bitmap=new N},t._onDisplay=function(t){this._isPlaying?this._displayedInStage?this.play():this.stop():this._autoPlay&&this.play()},t.changeClip=function(){var t;this._clipChanged=!1,this._skin&&((t=m.getRes(this._skin))?this.loadComplete(this._skin,t):g.loader.load(this._skin,u.create(this,this.loadComplete,[this._skin])))},t.loadComplete=function(t,i){if(t===this._skin&&i){var e=this._clipWidth||Math.ceil(i.sourceWidth/this._clipX),s=this._clipHeight||Math.ceil(i.sourceHeight/this._clipY),n=this._skin+e+s,t=L.I.get(n);if(t=!k.isOkTextureList(t)?null:t)this._sources=t;else{this._sources=[];for(var h=0;h<this._clipY;h++)for(var o=0;o<this._clipX;o++)this._sources.push(w.createFromTexture(i,e*o,s*h,e,s));L.I.set(n,this._sources)}this.index=this._index,this.event("loaded"),this.onCompResize()}},t.play=function(t,i){void 0===t&&(t=0),void 0===i&&(i=-1),this._isPlaying=!0,this.index=t,this._toIndex=i,this._index++,g.timer.loop(this.interval,this,this._loop),this.on("display",this,this._onDisplay),this.on("undisplay",this,this._onDisplay)},t._loop=function(){this._style.visible&&this._sources&&(this._index++,-1<this._toIndex&&this._index>=this._toIndex?this.stop():this._index>=this._sources.length&&(this._index=0),this.index=this._index)},t.stop=function(){this._isPlaying=!1,g.timer.clear(this,this._loop),this.event("complete")},t._setClipChanged=function(){this._clipChanged||(this._clipChanged=!0,this.callLater(this.changeClip))},o(0,t,"interval",function(){return this._interval},function(t){this._interval!=t&&(this._interval=t,this._isPlaying&&this.play())}),o(0,t,"skin",function(){return this._skin},function(t){this._skin!=t&&((this._skin=t)?this._setClipChanged():this._bitmap.source=null)}),o(0,t,"sources",function(){return this._sources},function(t){this._sources=t,this.index=this._index,this.event("loaded")}),o(0,t,"clipX",function(){return this._clipX},function(t){this._clipX=t||1,this._setClipChanged()}),o(0,t,"clipY",function(){return this._clipY},function(t){this._clipY=t||1,this._setClipChanged()}),o(0,t,"total",function(){return this.runCallLater(this.changeClip),this._sources?this._sources.length:0}),o(0,t,"clipWidth",function(){return this._clipWidth},function(t){this._clipWidth=t,this._setClipChanged()}),o(0,t,"sizeGrid",function(){return this._bitmap.sizeGrid?this._bitmap.sizeGrid.join(","):null},function(t){this._bitmap.sizeGrid=H.fillArray(z.defaultSizeGrid,t,Number)}),o(0,t,"group",function(){return this._group},function(t){t&&this._skin&&m.setGroup(this._skin,t),this._group=t}),o(0,t,"clipHeight",function(){return this._clipHeight},function(t){this._clipHeight=t,this._setClipChanged()}),o(0,t,"width",i.prototype._$get_width,function(t){g.superSet(X,this,"width",t),this._bitmap.width=t}),o(0,t,"height",i.prototype._$get_height,function(t){g.superSet(X,this,"height",t),this._bitmap.height=t}),o(0,t,"measureWidth",function(){return this.runCallLater(this.changeClip),this._bitmap.width}),o(0,t,"measureHeight",function(){return this.runCallLater(this.changeClip),this._bitmap.height}),o(0,t,"index",function(){return this._index},function(t){this._index=t,this._bitmap&&this._sources&&(this._bitmap.source=this._sources[t]),this.event("change")}),o(0,t,"autoPlay",function(){return this._autoPlay},function(t){this._autoPlay!=t&&((this._autoPlay=t)?this.play():this.stop())}),o(0,t,"isPlaying",function(){return this._isPlaying},function(t){this._isPlaying=t}),o(0,t,"dataSource",i.prototype._$get_dataSource,function(t){"number"==typeof(this._dataSource=t)&&Math.floor(t)==t||"string"==typeof t?this.index=parseInt(t):g.superSet(X,this,"dataSource",t)}),o(0,t,"bitmap",function(){return this._bitmap}),s}(X),U=function(i){function t(){this.changeHandler=null,this._gridSize=11,this._bgColor="#ffffff",this._borderColor="#000000",this._inputColor="#000000",this._inputBgColor="#efefef",this._colorPanel=null,this._colorTiles=null,this._colorBlock=null,this._colorInput=null,this._colorButton=null,this._colors=[],this._selectedColor="#000000",this._panelChanged=!1,t.__super.call(this)}h(t,"laya.ui.ColorPicker",i);var e=t.prototype;return e.destroy=function(t){i.prototype.destroy.call(this,t=void 0===t?!0:t),this._colorPanel&&this._colorPanel.destroy(t),this._colorButton&&this._colorButton.destroy(t),this._colorPanel=null,this._colorTiles=null,this._colorBlock=null,this._colorInput=null,this._colorButton=null,this._colors=null,this.changeHandler=null},e.createChildren=function(){this.addChild(this._colorButton=new W),this._colorPanel=new V,this._colorPanel.size(230,166),this._colorPanel.addChild(this._colorTiles=new S),this._colorPanel.addChild(this._colorBlock=new S),this._colorPanel.addChild(this._colorInput=new f)},e.initialize=function(){this._colorButton.on("click",this,this.onColorButtonClick),this._colorBlock.pos(5,5),this._colorInput.pos(60,5),this._colorInput.size(60,20),this._colorInput.on("change",this,this.onColorInputChange),this._colorInput.on("keydown",this,this.onColorFieldKeyDown),this._colorTiles.pos(5,30),this._colorTiles.on("mousemove",this,this.onColorTilesMouseMove),this._colorTiles.on("click",this,this.onColorTilesClick),this._colorTiles.size(20*this._gridSize,12*this._gridSize),this._colorPanel.on("mousedown",this,this.onPanelMouseDown),this.bgColor=this._bgColor},e.onPanelMouseDown=function(t){t.stopPropagation()},e.changePanel=function(){this._panelChanged=!1;var t=this._colorPanel.graphics;t.clear(),t.drawRect(0,0,230,166,this._bgColor,this._borderColor),this.drawBlock(this._selectedColor),this._colorInput.borderColor=this._borderColor,this._colorInput.bgColor=this._inputBgColor,this._colorInput.color=this._inputColor,(t=this._colorTiles.graphics).clear();for(var i=[0,3355443,6710886,10066329,13421772,16777215,16711680,65280,255,16776960,65535,16711935],e=0;e<12;e++)for(var s=0;s<20;s++){var n=H.toColor(0===s?i[e]:1===s?0:51*(((3*e+s/6)%3<<0)+3*(e/6<<0))<<16|s%6*51<<8|(e<<0)%6*51);this._colors.push(n);var h=s*this._gridSize,o=e*this._gridSize;t.drawRect(h,o,this._gridSize,this._gridSize,n,"#000000")}},e.onColorButtonClick=function(t){this._colorPanel.parent?this.close():this.open()},e.open=function(){var t=this.localToGlobal(new v),i=t.x+this._colorPanel.width<=g.stage.width?t.x:g.stage.width-this._colorPanel.width,e=(e=t.y+this._colorButton.height)+this._colorPanel.height<=g.stage.height?e:t.y-this._colorPanel.height;this._colorPanel.pos(i,e),this._colorPanel.zOrder=1001,g._currentStage.addChild(this._colorPanel),g.stage.on("mousedown",this,this.removeColorBox)},e.close=function(){g.stage.off("mousedown",this,this.removeColorBox),this._colorPanel.removeSelf()},e.removeColorBox=function(t){this.close()},e.onColorFieldKeyDown=function(t){13==t.keyCode&&(this._colorInput.text?this.selectedColor=this._colorInput.text:this.selectedColor=null,this.close(),t.stopPropagation())},e.onColorInputChange=function(t){this._colorInput.text?this.drawBlock(this._colorInput.text):this.drawBlock("#FFFFFF")},e.onColorTilesClick=function(t){this.selectedColor=this.getColorByMouse(),this.close()},e.onColorTilesMouseMove=function(t){this._colorInput.focus=!1;var i=this.getColorByMouse();this._colorInput.text=i,this.drawBlock(i)},e.getColorByMouse=function(){var t=this._colorTiles.getMousePoint(),i=Math.floor(t.x/this._gridSize),t=Math.floor(t.y/this._gridSize);return this._colors[20*t+i]},e.drawBlock=function(t){var i=this._colorBlock.graphics;i.clear(),i.drawRect(0,0,50,20,t||"#ffffff",this._borderColor),t||i.drawLine(0,0,50,20,"#ff0000")},e.changeColor=function(){var t=this.graphics;t.clear();var i=this._selectedColor||"#000000";t.drawRect(0,0,this._colorButton.width,this._colorButton.height,i)},e._setPanelChanged=function(){this._panelChanged||(this._panelChanged=!0,this.callLater(this.changePanel))},o(0,e,"inputBgColor",function(){return this._inputBgColor},function(t){this._inputBgColor=t,this._setPanelChanged()}),o(0,e,"selectedColor",function(){return this._selectedColor},function(t){this._selectedColor!=t&&(this._selectedColor=this._colorInput.text=t,this.drawBlock(t),this.changeColor(),this.changeHandler&&this.changeHandler.runWith(this._selectedColor),this.event("change",a.EMPTY.setTo("change",this,this)))}),o(0,e,"skin",function(){return this._colorButton.skin},function(t){this._colorButton.skin=t,this.changeColor()}),o(0,e,"bgColor",function(){return this._bgColor},function(t){this._bgColor=t,this._setPanelChanged()}),o(0,e,"borderColor",function(){return this._borderColor},function(t){this._borderColor=t,this._setPanelChanged()}),o(0,e,"inputColor",function(){return this._inputColor},function(t){this._inputColor=t,this._setPanelChanged()}),t}(X),F=function(i){function e(t,i){this._visibleNum=6,this._button=null,this._list=null,this._isOpen=!1,this._itemSize=12,this._labels=[],this._selectedIndex=-1,this._selectHandler=null,this._itemHeight=NaN,this._listHeight=NaN,this._listChanged=!1,this._itemChanged=!1,this._scrollBarSkin=null,this._isCustomList=!1,this.itemRender=null,e.__super.call(this),this._itemColors=z.comboBoxItemColors,this.skin=t,this.labels=i}h(e,"laya.ui.ComboBox",i);var t=e.prototype;return t.destroy=function(t){i.prototype.destroy.call(this,t=void 0===t?!0:t),this._button&&this._button.destroy(t),this._list&&this._list.destroy(t),this._button=null,this._list=null,this._itemColors=null,this._labels=null,this._selectHandler=null},t.createChildren=function(){this.addChild(this._button=new W),this._button.text.align="left",this._button.labelPadding="0,0,0,5",this._button.on("mousedown",this,this.onButtonMouseDown)},t._createList=function(){this._list=new et,this._scrollBarSkin&&(this._list.vScrollBarSkin=this._scrollBarSkin),this._setListEvent(this._list)},t._setListEvent=function(t){this._list.selectEnable=!0,this._list.on("mousedown",this,this.onListDown),this._list.mouseHandler=u.create(this,this.onlistItemMouse,null,!1),this._list.scrollBar&&this._list.scrollBar.on("mousedown",this,this.onScrollBarDown)},t.onListDown=function(t){t.stopPropagation()},t.onScrollBarDown=function(t){t.stopPropagation()},t.onButtonMouseDown=function(t){this.callLater(this.switchTo,[!this._isOpen])},t.changeList=function(){this._listChanged=!1;var t=this.width-2,i=this._itemColors[2];this._itemHeight=this._itemSize+6,this._list.itemRender=this.itemRender||{type:"Box",child:[{type:"Label",props:{name:"label",x:1,padding:"3,3,3,3",width:t,height:this._itemHeight,fontSize:this._itemSize,color:i}}]},this._list.repeatY=this._visibleNum,this._list.refresh()},t.onlistItemMouse=function(t,i){var e=t.type;"mouseover"===e||"mouseout"===e?this._isCustomList||(!(t=this._list.getCell(i))||(t=t.getChildByName("label"))&&("mouseover"===e?(t.bgColor=this._itemColors[0],t.color=this._itemColors[1]):(t.bgColor=null,t.color=this._itemColors[2]))):"click"===e&&(this.selectedIndex=i,this.isOpen=!1)},t.switchTo=function(t){this.isOpen=t},t.changeOpen=function(){this.isOpen=!this._isOpen},t.changeItem=function(){var t;this._itemChanged=!1,this._listHeight=0<this._labels.length?Math.min(this._visibleNum,this._labels.length)*this._itemHeight:this._itemHeight,this._isCustomList||((t=this._list.graphics).clear(),t.drawRect(0,0,this.width-1,this._listHeight,this._itemColors[4],this._itemColors[3]));for(var i=this._list.array||[],e=i.length=0,s=this._labels.length;e<s;e++)i.push({label:this._labels[e]});this._list.height=this._listHeight,this._list.array=i},t.changeSelected=function(){this._button.label=this.selectedLabel},t._onStageMouseWheel=function(t){this._list&&!this._list.contains(t.target)&&this.removeList(null)},t.removeList=function(t){g.stage.off("mousedown",this,this.removeList),g.stage.off("mousewheel",this,this._onStageMouseWheel),this.isOpen=!1},o(0,t,"selectedIndex",function(){return this._selectedIndex},function(t){this._selectedIndex!=t&&(this._selectedIndex=t,0<this._labels.length?this.changeSelected():this.callLater(this.changeSelected),this.event("change",[a.EMPTY.setTo("change",this,this)]),this._selectHandler&&this._selectHandler.runWith(this._selectedIndex))}),o(0,t,"measureHeight",function(){return this._button.height}),o(0,t,"skin",function(){return this._button.skin},function(t){this._button.skin!=t&&(this._button.skin=t,this._listChanged=!0)}),o(0,t,"measureWidth",function(){return this._button.width}),o(0,t,"width",i.prototype._$get_width,function(t){g.superSet(X,this,"width",t),this._button.width=this._width,this._itemChanged=!0,this._listChanged=!0}),o(0,t,"selectedLabel",function(){return-1<this._selectedIndex&&this._selectedIndex<this._labels.length?this._labels[this._selectedIndex]:null},function(t){this.selectedIndex=this._labels.indexOf(t)}),o(0,t,"labels",function(){return this._labels.join(",")},function(t){0<this._labels.length&&(this.selectedIndex=-1),t?this._labels=t.split(","):this._labels.length=0,this._itemChanged=!0}),o(0,t,"height",i.prototype._$get_height,function(t){g.superSet(X,this,"height",t),this._button.height=this._height}),o(0,t,"selectHandler",function(){return this._selectHandler},function(t){this._selectHandler=t}),o(0,t,"visibleNum",function(){return this._visibleNum},function(t){this._visibleNum=t,this._listChanged=!0}),o(0,t,"labelBold",function(){return this._button.text.bold},function(t){this._button.text.bold=t}),o(0,t,"itemColors",function(){return String(this._itemColors)},function(t){this._itemColors=H.fillArray(this._itemColors,t,String),this._listChanged=!0}),o(0,t,"itemSize",function(){return this._itemSize},function(t){this._itemSize=t,this._listChanged=!0}),o(0,t,"scrollBar",function(){return this.list.scrollBar}),o(0,t,"isOpen",function(){return this._isOpen},function(t){var i;this._isOpen!=t&&(this._isOpen=t,this._button.selected=this._isOpen,this._isOpen?(this._list||this._createList(),this._listChanged&&!this._isCustomList&&this.changeList(),this._itemChanged&&this.changeItem(),t=(t=(i=this.localToGlobal(v.TEMP.setTo(0,0))).y+this._button.height)+this._listHeight<=g.stage.height?t:i.y-this._listHeight,this._list.pos(i.x,t),this._list.zOrder=1001,g._currentStage.addChild(this._list),g.stage.once("mousedown",this,this.removeList),g.stage.on("mousewheel",this,this._onStageMouseWheel),this._list.selectedIndex=this._selectedIndex):this._list&&this._list.removeSelf())}),o(0,t,"scrollBarSkin",function(){return this._scrollBarSkin},function(t){this._scrollBarSkin=t}),o(0,t,"sizeGrid",function(){return this._button.sizeGrid},function(t){this._button.sizeGrid=t}),o(0,t,"button",function(){return this._button}),o(0,t,"list",function(){return this._list||this._createList(),this._list},function(t){t&&(t.removeSelf(),this._isCustomList=!0,this._list=t,this._setListEvent(t),this._itemHeight=t.getCell(0).height+t.spaceY)}),o(0,t,"dataSource",i.prototype._$get_dataSource,function(t){"number"==typeof(this._dataSource=t)&&Math.floor(t)==t||"string"==typeof t?this.selectedIndex=parseInt(t):t instanceof Array?this.labels=t.join(","):g.superSet(X,this,"dataSource",t)}),o(0,t,"labelColors",function(){return this._button.labelColors},function(t){this._button.labelColors!=t&&(this._button.labelColors=t)}),o(0,t,"labelPadding",function(){return this._button.text.padding.join(",")},function(t){this._button.text.padding=H.fillArray(z.labelPadding,t,Number)}),o(0,t,"labelSize",function(){return this._button.text.fontSize},function(t){this._button.text.fontSize=t}),o(0,t,"labelFont",function(){return this._button.text.font},function(t){this._button.text.font=t}),o(0,t,"stateNum",function(){return this._button.stateNum},function(t){this._button.stateNum=t}),e}(X),j=function(i){function e(t){this.rollRatio=.95,this.changeHandler=null,this.scaleBar=!0,this.autoHide=!1,this.elasticDistance=0,this.elasticBackTime=500,this.upButton=null,this.downButton=null,this.slider=null,this._scrollSize=1,this._skin=null,this._thumbPercent=1,this._target=null,this._lastPoint=null,this._lastOffset=0,this._checkElastic=!1,this._isElastic=!1,this._value=NaN,this._hide=!1,this._clickOnly=!0,this._offsets=null,e.__super.call(this),this._showButtons=A.showButtons,this._touchScrollEnable=A.touchScrollEnable,this._mouseWheelEnable=A.mouseWheelEnable,this.skin=t,this.max=1}h(e,"laya.ui.ScrollBar",i);var t=e.prototype;return t.destroy=function(t){void 0===t&&(t=!0),this.stopScroll(),this.target=null,i.prototype.destroy.call(this,t),this.upButton&&this.upButton.destroy(t),this.downButton&&this.downButton.destroy(t),this.slider&&this.slider.destroy(t),this.upButton=this.downButton=null,this.slider=null,this.changeHandler=null,this._offsets=null},t.createChildren=function(){this.addChild(this.slider=new q),this.addChild(this.upButton=new W),this.addChild(this.downButton=new W)},t.initialize=function(){this.slider.showLabel=!1,this.slider.on("change",this,this.onSliderChange),this.slider.setSlider(0,0,0),this.upButton.on("mousedown",this,this.onButtonMouseDown),this.downButton.on("mousedown",this,this.onButtonMouseDown)},t.onSliderChange=function(){this._value!=this.slider.value&&(this.value=this.slider.value)},t.onButtonMouseDown=function(t){t=t.currentTarget===this.upButton;this.slide(t),g.timer.once(z.scrollBarDelayTime,this,this.startLoop,[t]),g.stage.once("mouseup",this,this.onStageMouseUp)},t.startLoop=function(t){g.timer.frameLoop(1,this,this.slide,[t])},t.slide=function(t){t?this.value-=this._scrollSize:this.value+=this._scrollSize},t.onStageMouseUp=function(t){g.timer.clear(this,this.startLoop),g.timer.clear(this,this.slide)},t.changeScrollBar=function(){this.upButton.visible=this._showButtons,this.downButton.visible=this._showButtons,this._showButtons&&(this.upButton.skin=this._skin.replace(".png","$up.png"),this.downButton.skin=this._skin.replace(".png","$down.png")),this.slider.isVertical?this.slider.y=this._showButtons?this.upButton.height:0:this.slider.x=this._showButtons?this.upButton.width:0,this.resetPositions(),this.repaint()},t.changeSize=function(){i.prototype.changeSize.call(this),this.repaint(),this.resetPositions(),this.event("change"),this.changeHandler&&this.changeHandler.runWith(this.value)},t.resetPositions=function(){this.slider.isVertical?this.slider.height=this.height-(this._showButtons?this.upButton.height+this.downButton.height:0):this.slider.width=this.width-(this._showButtons?this.upButton.width+this.downButton.width:0),this.resetButtonPosition()},t.resetButtonPosition=function(){this.slider.isVertical?this.downButton.y=this.slider.y+this.slider.height:this.downButton.x=this.slider.x+this.slider.width},t.setScroll=function(t,i,e){this.runCallLater(this.changeSize),this.slider.setSlider(t,i,e),this.slider.bar.visible=0<i,!this._hide&&this.autoHide&&(this.visible=!1)},t.onTargetMouseWheel=function(t){this.value-=t.delta*this._scrollSize,this.target=this._target},t.onTargetMouseDown=function(t){this._clickOnly=!0,this._lastOffset=0,this._checkElastic=!1,this._lastPoint||(this._lastPoint=new v),this._lastPoint.setTo(g.stage.mouseX,g.stage.mouseY),g.timer.clear(this,this.tweenMove),I.clearTween(this),g.stage.once("mouseup",this,this.onStageMouseUp2),g.stage.once("mouseout",this,this.onStageMouseUp2),g.timer.frameLoop(1,this,this.loop)},t.loop=function(){var t=g.stage.mouseY,i=g.stage.mouseX;if(this._lastOffset=this.isVertical?t-this._lastPoint.y:i-this._lastPoint.x,this._clickOnly){if(!(1<Math.abs(this._lastOffset*(this.isVertical?g.stage._canvasTransform.getScaleY():g.stage._canvasTransform.getScaleX()))))return;this._clickOnly=!1,this._offsets||(this._offsets=[]),this._offsets.length=0,this._target.mouseEnabled=!1,!this.hide&&this.autoHide&&(this.alpha=1,this.visible=!0),this.event("start")}this._offsets.push(this._lastOffset),this._lastPoint.x=i,this._lastPoint.y=t,0!==this._lastOffset&&(this._checkElastic||(0<this.elasticDistance?this._checkElastic||0==this._lastOffset||(0<this._lastOffset&&this._value<=this.min||this._lastOffset<0&&this._value>=this.max?(this._isElastic=!0,this._checkElastic=!0):this._isElastic=!1):this._checkElastic=!0),this._isElastic?this._value<=this.min?this.value-=this._lastOffset*Math.max(0,1-(this.min-this._value)/this.elasticDistance):this._value>=this.max&&(this.value-=this._lastOffset*Math.max(0,1-(this._value-this.max)/this.elasticDistance)):this.value-=this._lastOffset)},t.onStageMouseUp2=function(t){if(g.stage.off("mouseup",this,this.onStageMouseUp2),g.stage.off("mouseout",this,this.onStageMouseUp2),g.timer.clear(this,this.loop),!(this._clickOnly&&this._value>=this.min&&this._value<=this.max))if(this._target.mouseEnabled=!0,this._isElastic)this._value<this.min?I.to(this,{value:this.min},this.elasticBackTime,r.sineOut,u.create(this,this.elasticOver)):this._value>this.max&&I.to(this,{value:this.max},this.elasticBackTime,r.sineOut,u.create(this,this.elasticOver));else if(this._offsets){this._offsets.length<1&&(this._offsets[0]=this.isVertical?g.stage.mouseY-this._lastPoint.y:g.stage.mouseX-this._lastPoint.x);for(var i,e=0,s=Math.min(this._offsets.length,3),n=0;n<s;n++)e+=this._offsets[this._offsets.length-1-n];this._lastOffset=e/s,(e=Math.abs(this._lastOffset))<2?this.event("end"):(60<e&&(this._lastOffset=0<this._lastOffset?60:-60),i=Math.round(Math.abs(this.elasticDistance*(this._lastOffset/240))),g.timer.frameLoop(1,this,this.tweenMove,[i]))}},t.elasticOver=function(){this._isElastic=!1,!this.hide&&this.autoHide&&I.to(this,{alpha:0},500),this.event("end")},t.tweenMove=function(t){this._lastOffset*=this.rollRatio;var i=NaN;0<t&&(0<this._lastOffset&&this.value<=this.min?(this._isElastic=!0,i=.5*-(this.min-t-this.value),this._lastOffset>i&&(this._lastOffset=i)):this._lastOffset<0&&this.value>=this.max&&(this._isElastic=!0,i=.5*-(this.max+t-this.value),this._lastOffset<i&&(this._lastOffset=i))),this.value-=this._lastOffset,Math.abs(this._lastOffset)<1&&(g.timer.clear(this,this.tweenMove),this._isElastic?this._value<this.min?I.to(this,{value:this.min},this.elasticBackTime,r.sineOut,u.create(this,this.elasticOver)):this._value>this.max?I.to(this,{value:this.max},this.elasticBackTime,r.sineOut,u.create(this,this.elasticOver)):this.elasticOver():(this.event("end"),!this.hide&&this.autoHide&&I.to(this,{alpha:0},500)))},t.stopScroll=function(){this.onStageMouseUp2(null),g.timer.clear(this,this.tweenMove),I.clearTween(this)},o(0,t,"measureHeight",function(){return this.slider.isVertical?100:this.slider.height}),o(0,t,"skin",function(){return this._skin},function(t){this._skin!=t&&(this._skin=t,this.slider.skin=this._skin,this.callLater(this.changeScrollBar))}),o(0,t,"max",function(){return this.slider.max},function(t){this.slider.max=t}),o(0,t,"showButtons",function(){return this._showButtons},function(t){this._showButtons=t,this.callLater(this.changeScrollBar)}),o(0,t,"measureWidth",function(){return this.slider.isVertical?this.slider.width:100}),o(0,t,"min",function(){return this.slider.min},function(t){this.slider.min=t}),o(0,t,"value",function(){return this._value},function(t){t!==this._value&&(this._value=t,this._isElastic||(this.slider._value!=t&&(this.slider._value=t,this.slider.changeValue()),this._value=this.slider._value),this.event("change"),this.changeHandler&&this.changeHandler.runWith(this._value))}),o(0,t,"isVertical",function(){return this.slider.isVertical},function(t){this.slider.isVertical=t}),o(0,t,"sizeGrid",function(){return this.slider.sizeGrid},function(t){this.slider.sizeGrid=t}),o(0,t,"scrollSize",function(){return this._scrollSize},function(t){this._scrollSize=t}),o(0,t,"dataSource",i.prototype._$get_dataSource,function(t){"number"==typeof(this._dataSource=t)||"string"==typeof t?this.value=Number(t):g.superSet(X,this,"dataSource",t)}),o(0,t,"thumbPercent",function(){return this._thumbPercent},function(t){this.runCallLater(this.changeScrollBar),this.runCallLater(this.changeSize),this._thumbPercent=t=1<=t?.99:t,this.scaleBar&&(this.slider.isVertical?this.slider.bar.height=Math.max(this.slider.height*t,z.scrollBarMinNum):this.slider.bar.width=Math.max(this.slider.width*t,z.scrollBarMinNum))}),o(0,t,"target",function(){return this._target},function(t){this._target&&(this._target.off("mousewheel",this,this.onTargetMouseWheel),this._target.off("mousedown",this,this.onTargetMouseDown)),(this._target=t)&&(this._mouseWheelEnable&&this._target.on("mousewheel",this,this.onTargetMouseWheel),this._touchScrollEnable&&this._target.on("mousedown",this,this.onTargetMouseDown))}),o(0,t,"hide",function(){return this._hide},function(t){this._hide=t,this.visible=!t}),o(0,t,"touchScrollEnable",function(){return this._touchScrollEnable},function(t){this._touchScrollEnable=t,this.target=this._target}),o(0,t,"mouseWheelEnable",function(){return this._mouseWheelEnable},function(t){this._mouseWheelEnable=t,this.target=this._target}),o(0,t,"tick",function(){return this.slider.tick},function(t){this.slider.tick=t}),e}(X),q=function(i){function e(t){this.changeHandler=null,this.isVertical=!0,this.showLabel=!0,this._allowClickBack=!1,this._max=100,this._min=0,this._tick=1,this._value=0,this._skin=null,this._bg=null,this._progress=null,this._bar=null,this._tx=NaN,this._ty=NaN,this._maxMove=NaN,this._globalSacle=null,e.__super.call(this),this.skin=t}h(e,"laya.ui.Slider",i);var t=e.prototype;return t.destroy=function(t){i.prototype.destroy.call(this,t=void 0===t?!0:t),this._bg&&this._bg.destroy(t),this._bar&&this._bar.destroy(t),this._progress&&this._progress.destroy(t),this._bg=null,this._bar=null,this._progress=null,this.changeHandler=null},t.createChildren=function(){this.addChild(this._bg=new R),this.addChild(this._bar=new W)},t.initialize=function(){this._bar.on("mousedown",this,this.onBarMouseDown),this._bg.sizeGrid=this._bar.sizeGrid="4,4,4,4,0",this._progress&&(this._progress.sizeGrid=this._bar.sizeGrid),this.allowClickBack=!0},t.onBarMouseDown=function(t){this._globalSacle||(this._globalSacle=new v),this._globalSacle.setTo(this.globalScaleX||.01,this.globalScaleY||.01),this._maxMove=this.isVertical?this.height-this._bar.height:this.width-this._bar.width,this._tx=g.stage.mouseX,this._ty=g.stage.mouseY,g.stage.on("mousemove",this,this.mouseMove),g.stage.once("mouseup",this,this.mouseUp),g.stage.once("mouseout",this,this.mouseUp),this.showValueText()},t.showValueText=function(){var t;this.showLabel&&(t=laya.ui.Slider.label,this.addChild(t),t.textField.changeText(this._value+""),this.isVertical?(t.x=this._bar.x+20,t.y=.5*(this._bar.height-t.height)+this._bar.y):(t.y=this._bar.y-20,t.x=.5*(this._bar.width-t.width)+this._bar.x))},t.hideValueText=function(){laya.ui.Slider.label&&laya.ui.Slider.label.removeSelf()},t.mouseUp=function(t){g.stage.off("mousemove",this,this.mouseMove),g.stage.off("mouseup",this,this.mouseUp),g.stage.off("mouseout",this,this.mouseUp),this.sendChangeEvent("changed"),this.hideValueText()},t.mouseMove=function(t){var i=this._value;this.isVertical?(this._bar.y+=(g.stage.mouseY-this._ty)/this._globalSacle.y,this._bar.y>this._maxMove?this._bar.y=this._maxMove:this._bar.y<0&&(this._bar.y=0),this._value=this._bar.y/this._maxMove*(this._max-this._min)+this._min,this._progress&&(this._progress.height=this._bar.y+.5*this._bar.height)):(this._bar.x+=(g.stage.mouseX-this._tx)/this._globalSacle.x,this._bar.x>this._maxMove?this._bar.x=this._maxMove:this._bar.x<0&&(this._bar.x=0),this._value=this._bar.x/this._maxMove*(this._max-this._min)+this._min,this._progress&&(this._progress.width=this._bar.x+.5*this._bar.width)),this._tx=g.stage.mouseX,this._ty=g.stage.mouseY;var e=Math.pow(10,(this._tick+"").length-1);this._value=Math.round(Math.round(this._value/this._tick)*this._tick*e)/e,this._value!=i&&this.sendChangeEvent(),this.showValueText()},t.sendChangeEvent=function(t){this.event(t=void 0===t?"change":t),this.changeHandler&&this.changeHandler.runWith(this._value)},t.setBarPoint=function(){this.isVertical?this._bar.x=Math.round(.5*(this._bg.width-this._bar.width)):this._bar.y=Math.round(.5*(this._bg.height-this._bar.height))},t.changeSize=function(){i.prototype.changeSize.call(this),this.isVertical?this._bg.height=this.height:this._bg.width=this.width,this.setBarPoint(),this.changeValue()},t.setSlider=function(t,i,e){this._value=-1,this._min=t,this._max=t<i?i:t,this.value=e<t?t:i<e?i:e},t.changeValue=function(){var t=Math.pow(10,(this._tick+"").length-1);this._value=Math.round(Math.round(this._value/this._tick)*this._tick*t)/t,this._value=this._value>this._max?this._max:this._value<this._min?this._min:this._value;t=this._max-this._min;0===t&&(t=1),this.isVertical?(this._bar.y=(this._value-this._min)/t*(this.height-this._bar.height),this._progress&&(this._progress.height=this._bar.y+.5*this._bar.height)):(this._bar.x=(this._value-this._min)/t*(this.width-this._bar.width),this._progress&&(this._progress.width=this._bar.x+.5*this._bar.width))},t.onBgMouseDown=function(t){var i=this._bg.getMousePoint();this.isVertical?this.value=i.y/(this.height-this._bar.height)*(this._max-this._min)+this._min:this.value=i.x/(this.width-this._bar.width)*(this._max-this._min)+this._min},o(0,t,"measureHeight",function(){return Math.max(this._bg.height,this._bar.height)}),o(0,t,"skin",function(){return this._skin},function(t){this._skin!=t&&(this._skin=t,this._bg.skin=this._skin,this._bar.skin=this._skin.replace(".png","$bar.png"),t=this._skin.replace(".png","$progress.png"),m.getRes(t)&&(this._progress||(this.addChild(this._progress=new R),this._progress.sizeGrid=this._bar.sizeGrid,this.setChildIndex(this._progress,1)),this._progress.skin=t),this.setBarPoint(),this.callLater(this.changeValue))}),o(0,t,"allowClickBack",function(){return this._allowClickBack},function(t){this._allowClickBack!=t&&((this._allowClickBack=t)?this._bg.on("mousedown",this,this.onBgMouseDown):this._bg.off("mousedown",this,this.onBgMouseDown))}),o(0,t,"max",function(){return this._max},function(t){this._max!=t&&(this._max=t,this.callLater(this.changeValue))}),o(0,t,"measureWidth",function(){return Math.max(this._bg.width,this._bar.width)}),o(0,t,"tick",function(){return this._tick},function(t){this._tick!=t&&(this._tick=t,this.callLater(this.changeValue))}),o(0,t,"sizeGrid",function(){return this._bg.sizeGrid},function(t){this._bg.sizeGrid=t,this._bar.sizeGrid=t,this._progress&&(this._progress.sizeGrid=this._bar.sizeGrid)}),o(0,t,"min",function(){return this._min},function(t){this._min!=t&&(this._min=t,this.callLater(this.changeValue))}),o(0,t,"value",function(){return this._value},function(t){var i;this._value!=t&&(i=this._value,this._value=t,this.changeValue(),this._value!=i&&this.sendChangeEvent())}),o(0,t,"dataSource",i.prototype._$get_dataSource,function(t){"number"==typeof(this._dataSource=t)||"string"==typeof t?this.value=Number(t):g.superSet(X,this,"dataSource",t)}),o(0,t,"bar",function(){return this._bar}),s(e,["label",function(){return this.label=new J}]),e}(X),J=function(i){function e(t){this._tf=null,e.__super.call(this),void 0===t&&(t=""),c.defaultColor=z.labelColor,this.text=t}h(e,"laya.ui.Label",i);var t=e.prototype;return t.destroy=function(t){i.prototype.destroy.call(this,t=void 0===t?!0:t),this._tf=null},t.createChildren=function(){this.addChild(this._tf=new x)},t.changeText=function(t){this._tf.changeText(t)},o(0,t,"padding",function(){return this._tf.padding.join(",")},function(t){this._tf.padding=H.fillArray(z.labelPadding,t,Number)}),o(0,t,"bold",function(){return this._tf.bold},function(t){this._tf.bold=t}),o(0,t,"align",function(){return this._tf.align},function(t){this._tf.align=t}),o(0,t,"text",function(){return this._tf.text},function(t){this._tf.text!=t&&(t=t&&H.adptString(t+""),this._tf.text=t,this.event("change"),this._width&&this._height||this.onCompResize())}),o(0,t,"italic",function(){return this._tf.italic},function(t){this._tf.italic=t}),o(0,t,"wordWrap",function(){return this._tf.wordWrap},function(t){this._tf.wordWrap=t}),o(0,t,"font",function(){return this._tf.font},function(t){this._tf.font=t}),o(0,t,"dataSource",i.prototype._$get_dataSource,function(t){"number"==typeof(this._dataSource=t)||"string"==typeof t?this.text=t+"":g.superSet(X,this,"dataSource",t)}),o(0,t,"color",function(){return this._tf.color},function(t){this._tf.color=t}),o(0,t,"valign",function(){return this._tf.valign},function(t){this._tf.valign=t}),o(0,t,"leading",function(){return this._tf.leading},function(t){this._tf.leading=t}),o(0,t,"fontSize",function(){return this._tf.fontSize},function(t){this._tf.fontSize=t}),o(0,t,"bgColor",function(){return this._tf.bgColor},function(t){this._tf.bgColor=t}),o(0,t,"borderColor",function(){return this._tf.borderColor},function(t){this._tf.borderColor=t}),o(0,t,"stroke",function(){return this._tf.stroke},function(t){this._tf.stroke=t}),o(0,t,"strokeColor",function(){return this._tf.strokeColor},function(t){this._tf.strokeColor=t}),o(0,t,"textField",function(){return this._tf}),o(0,t,"measureWidth",function(){return this._tf.width}),o(0,t,"measureHeight",function(){return this._tf.height}),o(0,t,"width",function(){return this._width||this._tf.text?g.superGet(X,this,"width"):0},function(t){g.superSet(X,this,"width",t),this._tf.width=t}),o(0,t,"height",function(){return this._height||this._tf.text?g.superGet(X,this,"height"):0},function(t){g.superSet(X,this,"height",t),this._tf.height=t}),o(0,t,"overflow",function(){return this._tf.overflow},function(t){this._tf.overflow=t}),o(0,t,"underline",function(){return this._tf.underline},function(t){this._tf.underline=t}),o(0,t,"underlineColor",function(){return this._tf.underlineColor},function(t){this._tf.underlineColor=t}),e}(X),K=function(i){function e(t){this.changeHandler=null,this._bg=null,this._bar=null,this._skin=null,this._value=.5,e.__super.call(this),this.skin=t}h(e,"laya.ui.ProgressBar",i);var t=e.prototype;return t.destroy=function(t){i.prototype.destroy.call(this,t=void 0===t?!0:t),this._bg&&this._bg.destroy(t),this._bar&&this._bar.destroy(t),this._bg=this._bar=null,this.changeHandler=null},t.createChildren=function(){this.addChild(this._bg=new R),this.addChild(this._bar=new R),this._bar._bitmap.autoCacheCmd=!1},t.changeValue=function(){var t,i,e;this.sizeGrid?(e=this.sizeGrid.split(","),t=Number(e[3]),i=Number(e[1]),e=(this.width-t-i)*this._value,this._bar.width=t+i+e,this._bar.visible=this._bar.width>t+i):this._bar.width=this.width*this._value},o(0,t,"measureHeight",function(){return this._bg.height}),o(0,t,"skin",function(){return this._skin},function(t){this._skin!=t&&(this._skin=t,this._bg.skin=this._skin,this._bar.skin=this._skin.replace(".png","$bar.png"),this.callLater(this.changeValue))}),o(0,t,"measureWidth",function(){return this._bg.width}),o(0,t,"height",i.prototype._$get_height,function(t){g.superSet(X,this,"height",t),this._bg.height=this._height,this._bar.height=this._height}),o(0,t,"bar",function(){return this._bar}),o(0,t,"value",function(){return this._value},function(t){this._value!=t&&(this._value=t=1<t?1:t<0?0:t,this.callLater(this.changeValue),this.event("change"),this.changeHandler&&this.changeHandler.runWith(t))}),o(0,t,"bg",function(){return this._bg}),o(0,t,"sizeGrid",function(){return this._bg.sizeGrid},function(t){this._bg.sizeGrid=this._bar.sizeGrid=t}),o(0,t,"width",i.prototype._$get_width,function(t){g.superSet(X,this,"width",t),this._bg.width=this._width,this.callLater(this.changeValue)}),o(0,t,"dataSource",i.prototype._$get_dataSource,function(t){"number"==typeof(this._dataSource=t)||"string"==typeof t?this.value=Number(t):g.superSet(X,this,"dataSource",t)}),e}(X),Z=(function(){function i(){this._tipBox=null,this._tipText=null,this._defaultTipHandler=null,i.__super.call(this),this._tipBox=new X,this._tipBox.addChild(this._tipText=new x),this._tipText.x=this._tipText.y=5,this._tipText.color=i.tipTextColor,this._defaultTipHandler=this._showDefaultTip,g.stage.on("showtip",this,this._onStageShowTip),g.stage.on("hidetip",this,this._onStageHideTip),this.zOrder=1100}h(i,"laya.ui.TipManager",X);var t=i.prototype;t._onStageHideTip=function(t){g.timer.clear(this,this._showTip),this.closeAll(),this.removeSelf()},t._onStageShowTip=function(t){g.timer.once(i.tipDelay,this,this._showTip,[t],!0)},t._showTip=function(t){var i;"string"==typeof t?(i=String(t),Boolean(i)&&this._defaultTipHandler(i)):t instanceof laya.utils.Handler?t.run():"function"==typeof t&&t.apply(),g.stage.on("mousemove",this,this._onStageMouseMove),g.stage.on("mousedown",this,this._onStageMouseDown),this._onStageMouseMove(null)},t._onStageMouseDown=function(t){this.closeAll()},t._onStageMouseMove=function(t){this._showToStage(this,i.offsetX,i.offsetY)},t._showToStage=function(t,i,e){void 0===i&&(i=0),void 0===e&&(e=0);var s=t.getBounds();t.x=g.stage.mouseX+i,t.y=g.stage.mouseY+e,t.x+s.width>g.stage.width&&(t.x-=s.width+i),t.y+s.height>g.stage.height&&(t.y-=s.height+e)},t.closeAll=function(){g.timer.clear(this,this._showTip),g.stage.off("mousemove",this,this._onStageMouseMove),g.stage.off("mousedown",this,this._onStageMouseDown),this.removeChildren()},t.showDislayTip=function(t){this.addChild(t),this._showToStage(this),g._currentStage.addChild(this)},t._showDefaultTip=function(t){this._tipText.text=t;t=this._tipBox.graphics;t.clear(),t.drawRect(0,0,this._tipText.width+10,this._tipText.height+10,i.tipBackColor),this.addChild(this._tipBox),this._showToStage(this),g._currentStage.addChild(this)},o(0,t,"defaultTipHandler",function(){return this._defaultTipHandler},function(t){this._defaultTipHandler=t}),i.offsetX=10,i.offsetY=15,i.tipTextColor="#ffffff",i.tipBackColor="#111111",i.tipDelay=200}(),function(i){function e(t){this.advsListArr=[],this.resUrl="https://unioncdn.layabox.com/config/iconlist.json",this._data=[],this._resquestTime=36e4,this._appid=null,this._appCodeImgStr=null,this._playIndex=0,this._lunboTime=5e3,e.__super.call(this),this._http=new l.window.XMLHttpRequest,this.skin=t,this.init(),this.size(120,120)}h(e,"laya.ui.AdvImage",i);var t=e.prototype;t.init=function(){l.onMiniGame&&this.isSupportJump?(g.timer.loop(this._resquestTime,this,this.onGetAdvsListData),this.onGetAdvsListData(),this.initEvent()):this.visible=!1},t.initEvent=function(){this.on("click",this,this.onAdvsImgClick)},t.onAdvsImgClick=function(){this.getCurrentAppidObj()&&this.jumptoGame()},t.revertAdvsData=function(){this.advsListArr[this._playIndex]&&(this.visible=!0,this.skin=this.advsListArr[this._playIndex])},t.jumptoGame=function(){var t=this;l.onMiniGame&&this.isSupportJump&&wx.navigateToMiniProgram({appId:this._appid,path:"",extraData:"",envVersion:"release",success:function(){console.log("-------------跳转成功--------------")},fail:function(){console.log("-------------跳转失败--------------")},complete:function(){console.log("-------------跳转接口调用成功--------------"),t.updateAdvsInfo()}.bind(this)})},t.updateAdvsInfo=function(){this.visible=!1,this.onLunbo(),g.timer.loop(this._lunboTime,this,this.onLunbo)},t.onLunbo=function(){this._playIndex>=this.advsListArr.length-1?this._playIndex=0:this._playIndex+=1,this.visible=!0,this.revertAdvsData()},t.getCurrentAppidObj=function(){return this.advsListArr[this._playIndex]},t.onGetAdvsListData=function(){var i=this,t=this.randRange(1e4,1e6),t=this.resUrl+"?"+t;this._http.open("get",t,!0),this._http.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),this._http.responseType="text",this._http.onerror=function(t){i._onError(t)},this._http.onload=function(t){i._onLoad(t)},this._http.send(null)},t.randRange=function(t,i){return Math.floor(Math.random()*(i-t+1))+t},t._onError=function(t){this.error("Request failed Status:"+this._http.status+" text:"+this._http.statusText)},t._onLoad=function(t){var i=this._http,e=void 0!==i.status?i.status:200;200===e||204===e||0===e?this.complete():this.error("["+i.status+"]"+i.statusText+":"+i.responseURL)},t.error=function(t){this.event("error",t)},t.complete=function(){try{this._data=this._http.response||this._http.responseText,this._data=JSON.parse(this._data),this.advsListArr=this._data.list,this._appid=this._data.appid,this._appCodeImgStr=this._data.qrcode,this.updateAdvsInfo(),this.revertAdvsData()}catch(t){this.error(t.message)}},t.clear=function(){var t=this._http;t.onerror=t.onabort=t.onprogress=t.onload=null},t.destroy=function(t){void 0===t&&(t=!0),i.prototype.destroy.call(this,!0),g.timer.clear(this,this.onLunbo),g.timer.clear(this,this.onGetAdvsListData),this.clear()},o(0,t,"isSupportJump",function(){return!!l.onMiniGame&&"function"==typeof wx.navigateToMiniProgram})}(R),function(){var u;function f(){this._idMap=null,this._aniList=null,this._watchMap={},f.__super.call(this)}h(f,"laya.ui.View",V);var t=f.prototype;return t.createView=function(t){if(t.animations&&!this._idMap&&(this._idMap={}),f.createComp(t,this,this),t.animations){for(var i,e,s=[],n=t.animations,h=0,o=n.length,h=0;h<o;h++){switch(i=new _,e=n[h],i._setUp(this._idMap,e),(this[e.name]=i)._setControlNode(this),e.action){case 1:i.play(0,!1);break;case 2:i.play(0,!0)}s.push(i)}this._aniList=s}0<this._width&&null==t.props.hitTestPrior&&!this.mouseThrough&&(this.hitTestPrior=!0)},t.onEvent=function(t,i){},t.loadUI=function(t){t=f.uiMap[t];t&&this.createView(t)},t.destroy=function(t){void 0===t&&(t=!0),this._aniList&&(this._aniList.length=0),this._idMap=null,this._aniList=null,this._watchMap=null,laya.ui.Component.prototype.destroy.call(this,t)},t.changeData=function(t){var i=this._watchMap[t];if(i){console.log("change",t);for(var e=0,s=i.length;e<s;e++)i[e].exe(this)}},f._regs=function(){for(var t in f.uiClassMap)p.regClass(t,f.uiClassMap[t])},f.createComp=function(t,i,e,s){if(!(i=i||f.getCompInstance(t)))return console.warn("can not create:"+t.type),null;var n=t.child;if(n)for(var h=i instanceof laya.ui.List,o=0,r=n.length;o<r;o++){var a,l,c=n[o];!i.hasOwnProperty("itemRender")||"render"!=c.props.name&&"render"!==c.props.renderType?"Graphic"==c.type?p.addGraphicsToSprite(c,i):p.isDrawType(c.type)?p.addGraphicToSprite(c,i,!0):(h?(l=f.createComp(c,null,e,a=[]),a.length&&(l._$bindData=a)):l=f.createComp(c,null,e,s),"Script"==c.type?"owner"in l?l.owner=i:"target"in l&&(l.target=i):"mask"==c.props.renderType||"mask"==c.props.name?i.mask=l:l instanceof laya.display.Sprite&&i.addChild(l)):i.itemRender=c}var u,_=t.props;for(u in _){var d=_[u];f.eventDic[u]?d&&e&&i.on(u,e,e.onEvent,[d]):f.setCompValue(i,u,d,e,s)}return g.__typeof(i,"laya.ui.IItem")&&i.initItems(),t.compId&&e&&e._idMap&&(e._idMap[t.compId]=i),i},f.setCompValue=function(t,i,e,s,n){if("string"==typeof e&&-1<e.indexOf("${"))if(f._sheet||(f._sheet=p.getClass("laya.data.Table")),f._sheet){if(n)n.push(t,i,e);else if(s){-1==e.indexOf("].")&&(e=e.replace(".","[0]."));var h,o=new u(t,i,e);o.exe(s);for(var r=e.replace(/\[.*?\]\./g,".");null!=(h=f._parseWatchData.exec(r));){for(var a=h[1];null!=(l=f._parseKeyWord.exec(a));){var l=l[0],c=s._watchMap[l]||(s._watchMap[l]=[]);c.push(o),f._sheet.I.notifer.on(l,s,s.changeData,[l])}(c=s._watchMap[a]||(s._watchMap[a]=[])).push(o),f._sheet.I.notifer.on(a,s,s.changeData,[a])}}}else console.warn("Can not find class Sheet");else"var"===i&&s?s[e]=t:"onClick"==i?(n=g._runScript("(function(){"+e+"})"),t.on("click",s,n)):t[i]="true"===e||"false"!==e&&e},f.getCompInstance=function(t){var i=t.props?t.props.runtime:null,i=i?f.viewClassMap[i]||f.uiClassMap[i]||g.__classmap[i]:f.uiClassMap[t.type];return t.props&&t.props.hasOwnProperty("renderType")&&"instance"==t.props.renderType?i.instance:i?new i:null},f.regComponent=function(t,i){f.uiClassMap[t]=i,p.regClass(t,i)},f.regViewRuntime=function(t,i){f.viewClassMap[t]=i},f.uiMap={},f.viewClassMap={},f._sheet=null,s(f,["uiClassMap",function(){return this.uiClassMap={ViewStack:ut,LinkButton:W,TextArea:wt,ColorPicker:U,Box:V,Button:W,CheckBox:Q,Clip:$,ComboBox:F,Component:X,HScrollBar:st,HSlider:ot,Image:R,Label:J,List:et,Panel:ht,ProgressBar:K,Radio:lt,RadioGroup:Ct,ScrollBar:j,Slider:q,Tab:St,TextInput:ft,View:f,VScrollBar:_t,VSlider:gt,Tree:ct,HBox:yt,VBox:vt,Sprite:S,Animation:i,Text:x,FontClip:it}},"eventDic",function(){return this.eventDic={mousedown:!0,mouseup:!0,mousemove:!0,mouseover:!0,mouseout:!0,click:!0,doubleclick:!0,rightmousedown:!0,rightmouseup:!0,rightclick:!0}},"_parseWatchData",function(){return this._parseWatchData=/\${(.*?)}/g},"_parseKeyWord",function(){return this._parseKeyWord=/[a-zA-Z_][a-zA-Z0-9_]*(?:(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+)/g}]),f.__init$=function(){function t(t,i,e){this.comp=null,this.prop=null,this.value=null,this.comp=t,this.prop=i,this.value=e}f._regs(),h(t,""),t.prototype.exe=function(t){var i=H.getBindFun(this.value);this.comp[this.prop]=i.call(this,t)},u=t},f}()),Q=function(t){function e(t,i){e.__super.call(this,t,i=void 0===i?"":i)}h(e,"laya.ui.CheckBox",t);var i=e.prototype;return i.preinitialize=function(){laya.ui.Component.prototype.preinitialize.call(this),this.toggle=!0,this._autoSize=!1},i.initialize=function(){t.prototype.initialize.call(this),this.createText(),this._text.align="left",this._text.valign="top",this._text.width=0},o(0,i,"dataSource",t.prototype._$get_dataSource,function(t){"boolean"==typeof(this._dataSource=t)?this.selected=t:"string"==typeof t?this.selected="true"===t:g.superSet(W,this,"dataSource",t)}),e}(W),tt=function(){function t(){this._space=0,this._align="none",this._itemChanged=!1,t.__super.call(this)}h(t,"laya.ui.LayoutBox",V);var i=t.prototype;return i.addChild=function(t){return t.on("resize",this,this.onResize),this._setItemChanged(),laya.display.Node.prototype.addChild.call(this,t)},i.onResize=function(t){this._setItemChanged()},i.addChildAt=function(t,i){return t.on("resize",this,this.onResize),this._setItemChanged(),laya.display.Node.prototype.addChildAt.call(this,t,i)},i.removeChildAt=function(t){return this.getChildAt(t).off("resize",this,this.onResize),this._setItemChanged(),laya.display.Node.prototype.removeChildAt.call(this,t)},i.refresh=function(){this._setItemChanged()},i.changeItems=function(){this._itemChanged=!1},i.sortItem=function(t){t&&t.sort(function(t,i){return t.y-i.y})},i._setItemChanged=function(){this._itemChanged||(this._itemChanged=!0,this.callLater(this.changeItems))},o(0,i,"space",function(){return this._space},function(t){this._space=t,this._setItemChanged()}),o(0,i,"align",function(){return this._align},function(t){this._align=t,this._setItemChanged()}),t}(),it=function(i){function e(t,i){this._valueArr=null,this._indexMap=null,this._sheet=null,this._direction="horizontal",this._spaceX=0,this._spaceY=0,this._align="left",this._wordsW=0,this._wordsH=0,e.__super.call(this),t&&(this.skin=t),i&&(this.sheet=i)}h(e,"laya.ui.FontClip",i);var t=e.prototype;return t.createChildren=function(){this._bitmap=new N,this.on("loaded",this,this._onClipLoaded)},t._onClipLoaded=function(){this.callLater(this.changeValue)},t.changeValue=function(){var t;if(this._sources&&(this._valueArr&&(this.graphics.clear(!0),t=this._sources[0]))){var i="horizontal"===this._direction;i?(this._wordsW=this._valueArr.length*(t.sourceWidth+this.spaceX),this._wordsH=t.sourceHeight):(this._wordsW=t.sourceWidth,this._wordsH=(t.sourceHeight+this.spaceY)*this._valueArr.length);var e=0;if(this._width)switch(this._align){case"center":e=.5*(this._width-this._wordsW);break;case"right":e=this._width-this._wordsW;break;default:e=0}for(var s=0,n=this._valueArr.length;s<n;s++){var h=this._indexMap[this._valueArr.charAt(s)];this.sources[h]&&(t=this.sources[h],i?this.graphics.drawTexture(t,e+s*(t.sourceWidth+this.spaceX),0,t.sourceWidth,t.sourceHeight):this.graphics.drawTexture(t,0+e,s*(t.sourceHeight+this.spaceY),t.sourceWidth,t.sourceHeight))}this._width||(this.resetLayoutX(),this.callLater(this.changeSize)),this._height||(this.resetLayoutY(),this.callLater(this.changeSize))}},t.destroy=function(t){void 0===t&&(t=!0),this._valueArr=null,this._indexMap=null,this.graphics.clear(!0),this.removeSelf(),this.off("loaded",this,this._onClipLoaded),i.prototype.destroy.call(this,t)},o(0,t,"sheet",function(){return this._sheet},function(t){var i=(this._sheet=t+="").split(" ");this._clipX=String(i[0]).length,this.clipY=i.length,this._indexMap={};for(var e=0;e<this._clipY;e++)for(var s=i[e].split(""),n=0,h=s.length;n<h;n++)this._indexMap[s[n]]=e*this._clipX+n}),o(0,t,"height",i.prototype._$get_height,function(t){g.superSet($,this,"height",t),this.callLater(this.changeValue)}),o(0,t,"direction",function(){return this._direction},function(t){this._direction=t,this.callLater(this.changeValue)}),o(0,t,"value",function(){return this._valueArr||""},function(t){this._valueArr=t+="",this.callLater(this.changeValue)}),o(0,t,"width",i.prototype._$get_width,function(t){g.superSet($,this,"width",t),this.callLater(this.changeValue)}),o(0,t,"spaceX",function(){return this._spaceX},function(t){this._spaceX=t,"horizontal"===this._direction&&this.callLater(this.changeValue)}),o(0,t,"spaceY",function(){return this._spaceY},function(t){this._spaceY=t,"horizontal"!==this._direction&&this.callLater(this.changeValue)}),o(0,t,"align",function(){return this._align},function(t){this._align=t,this.callLater(this.changeValue)}),o(0,t,"measureWidth",function(){return this._wordsW}),o(0,t,"measureHeight",function(){return this._wordsH}),e}($),et=function(t){function i(){this.selectHandler=null,this.renderHandler=null,this.mouseHandler=null,this.selectEnable=!1,this.totalPage=0,this._content=null,this._scrollBar=null,this._itemRender=null,this._repeatX=0,this._repeatY=0,this._repeatX2=0,this._repeatY2=0,this._spaceX=0,this._spaceY=0,this._array=null,this._startIndex=0,this._selectedIndex=-1,this._page=0,this._isVertical=!0,this._cellSize=20,this._cellOffset=0,this._isMoved=!1,this.cacheContent=!1,this._createdLine=0,this._cellChanged=!1,this._cells=[],this._offset=new v,i.__super.call(this)}h(i,"laya.ui.List",t);var e=i.prototype;return g.imps(e,{"laya.ui.IRender":!0,"laya.ui.IItem":!0}),e.destroy=function(t){void 0===t&&(t=!0),this._content&&this._content.destroy(t),this._scrollBar&&this._scrollBar.destroy(t),laya.ui.Component.prototype.destroy.call(this,t),this._content=null,this._scrollBar=null,this._itemRender=null,this._cells=null,this._array=null,this.selectHandler=this.renderHandler=this.mouseHandler=null},e.createChildren=function(){this.addChild(this._content=new V)},e.onScrollStart=function(){this._$P.cacheAs||(this._$P.cacheAs=g.superGet(V,this,"cacheAs")),g.superSet(V,this,"cacheAs","none"),this._scrollBar.once("end",this,this.onScrollEnd)},e.onScrollEnd=function(){g.superSet(V,this,"cacheAs",this._$P.cacheAs)},e._removePreScrollBar=function(){var t=this.removeChildByName("scrollBar");t&&t.destroy(!0)},e.changeCells=function(){var t,i,e,s;this._cellChanged=!1,this._itemRender&&(this.scrollBar=this.getChildByName("scrollBar"),t=(s=this._getOneCell()).width+this._spaceX||1,i=s.height+this._spaceY||1,0<this._width&&(this._repeatX2=this._isVertical?Math.round(this._width/t):Math.ceil(this._width/t)),0<this._height&&(this._repeatY2=this._isVertical?Math.ceil(this._height/i):Math.round(this._height/i)),e=this._width||t*this.repeatX-this._spaceX,s=this._height||i*this.repeatY-this._spaceY,this._cellSize=this._isVertical?i:t,this._cellOffset=this._isVertical?i*Math.max(this._repeatY2,this._repeatY)-s-this._spaceY:t*Math.max(this._repeatX2,this._repeatX)-e-this._spaceX,this._isVertical&&this._scrollBar?this._scrollBar.height=s:!this._isVertical&&this._scrollBar&&(this._scrollBar.width=e),this.setContentSize(e,s),e=this._isVertical?this.repeatX:this.repeatY,s=(this._isVertical?this.repeatY:this.repeatX)+(this._scrollBar?1:0),this._createItems(0,e,s),this._createdLine=s,this._array&&(this.array=this._array,this.runCallLater(this.renderItems)))},e._getOneCell=function(){if(0===this._cells.length){var t=this.createItem();if(this._offset.setTo(t.x,t.y),this.cacheContent)return t;this._cells.push(t)}return this._cells[0]},e._createItems=function(t,i,e){var s=this._content,n=this._getOneCell(),h=n.width+this._spaceX,o=n.height+this._spaceY;if(this.cacheContent){var r=new V;r.cacheAsBitmap=!0,r.pos((this._isVertical?0:t)*h,(this._isVertical?t:0)*o),this._content.addChild(r),this._content.optimizeScrollRect=!0,s=r}else{for(var a=[],l=this._cells.length-1;-1<l;l--){var c=this._cells[l];c.removeSelf(),a.push(c)}this._cells.length=0}for(var u=t;u<e;u++)for(var _=0;_<i;_++)(n=a&&a.length?a.pop():this.createItem()).x=(this._isVertical?_:u)*h-s.x,n.y=(this._isVertical?u:_)*o-s.y,n.name="item"+(u*i+_),s.addChild(n),this.addCell(n)},e.createItem=function(){var t=[],i="function"==typeof this._itemRender?new this._itemRender:Z.createComp(this._itemRender,null,null,t);if(0==t.length&&i._watchMap){var e,s=i._watchMap;for(e in s)for(var n=s[e],h=0;h<n.length;h++){var o=n[h];t.push(o.comp,o.prop,o.value)}}return t.length&&(i._$bindData=t),i},e.addCell=function(t){t.on("click",this,this.onCellMouse),t.on("rightclick",this,this.onCellMouse),t.on("mouseover",this,this.onCellMouse),t.on("mouseout",this,this.onCellMouse),t.on("mousedown",this,this.onCellMouse),t.on("mouseup",this,this.onCellMouse),this._cells.push(t)},e.initItems=function(){if(!this._itemRender&&null!=this.getChildByName("item0")){this.repeatX=1;for(var t=0,t=0,i=0;i<1e4;i++){var e=this.getChildByName("item"+i);if(!e)break;this.addCell(e),t++}this.repeatY=t}},e.setContentSize=function(t,i){this._content.width=t,this._content.height=i,!this._scrollBar&&0==this._offset.x&&0==this._offset.y||(this._content.scrollRect||(this._content.scrollRect=new C),this._content.scrollRect.setTo(-this._offset.x,-this._offset.y,t,i),this._content.scrollRect=this._content.scrollRect),this.event("resize")},e.onCellMouse=function(t){"mousedown"===t.type&&(this._isMoved=!1);var i=t.currentTarget,e=this._startIndex+this._cells.indexOf(i);e<0||("click"===t.type||"rightclick"===t.type?this.selectEnable&&!this._isMoved?this.selectedIndex=e:this.changeCellState(i,!0,0):"mouseover"!==t.type&&"mouseout"!==t.type||this._selectedIndex===e||this.changeCellState(i,"mouseover"===t.type,0),this.mouseHandler&&this.mouseHandler.runWith([t,e]))},e.changeCellState=function(t,i,e){t=t.getChildByName("selectBox");t&&(this.selectEnable=!0,t.visible=i,t.index=e)},e.changeSize=function(){laya.ui.Component.prototype.changeSize.call(this),this.setContentSize(this.width,this.height),this._scrollBar&&this.callLater(this.onScrollBarChange)},e.onScrollBarChange=function(t){this.runCallLater(this.changeCells);var i=this._scrollBar.value,e=this._isVertical?this.repeatX:this.repeatY,s=this._isVertical?this.repeatY:this.repeatX,n=Math.floor(i/this._cellSize);if(this.cacheContent)this._createdLine-n<(a=s+1)&&(this._createItems(this._createdLine,e,this._createdLine+a),this.renderItems(this._createdLine*e,0),this._createdLine+=a);else{var h,o,r=n*e,a=0;r>this._startIndex?(a=r-this._startIndex,o=this._startIndex+e*(s+1),this._isMoved=h=!0):r<this._startIndex&&(a=this._startIndex-r,o=this._startIndex-1,this._isMoved=!(h=!1));for(var l=0;l<a;l++){var c,u=h?(c=this._cells.shift(),this._cells[this._cells.length]=c,o+l):(c=this._cells.pop(),this._cells.unshift(c),o-l),_=Math.floor(u/e)*this._cellSize;this._isVertical?c.y=_:c.x=_,this.renderItem(c,u)}this._startIndex=r,this.changeSelectStatus()}r=this._content.scrollRect;this._isVertical?(r.y=i-this._offset.y,r.x=-this._offset.x):(r.y=-this._offset.y,r.x=i-this._offset.x),this._content.scrollRect=r},e.posCell=function(t,i){var e;this._scrollBar&&(e=this._isVertical?this.repeatX:this.repeatY,this._isVertical?this.repeatY:this.repeatX,e=Math.floor(i/e)*this._cellSize,this._isVertical?t.y=e:t.x=e)},e.changeSelectStatus=function(){for(var t=0,i=this._cells.length;t<i;t++)this.changeCellState(this._cells[t],this._selectedIndex===this._startIndex+t,1)},e.renderItems=function(t,i){for(var e=t=void 0===t?0:t,s=(i=void 0===i?0:i)||this._cells.length;e<s;e++)this.renderItem(this._cells[e],this._startIndex+e);this.changeSelectStatus()},e.renderItem=function(t,i){this._array&&0<=i&&i<this._array.length?(t.visible=!0,t._$bindData?(t._dataSource=this._array[i],this._bindData(t,this._array[i])):t.dataSource=this._array[i],this.cacheContent||this.posCell(t,i),this.hasListener("render")&&this.event("render",[t,i]),this.renderHandler&&this.renderHandler.runWith([t,i])):(t.visible=!1,t.dataSource=null)},e._bindData=function(t,i){for(var e=t._$bindData,s=0,n=e.length;s<n;s++){var h=e[s++],o=e[s++],r=e[s],r=H.getBindFun(r);h[o]=r.call(this,i)}},e.refresh=function(){this.array=this._array},e.getItem=function(t){return-1<t&&t<this._array.length?this._array[t]:null},e.changeItem=function(t,i){-1<t&&t<this._array.length&&(this._array[t]=i,t>=this._startIndex&&t<this._startIndex+this._cells.length&&this.renderItem(this.getCell(t),t))},e.setItem=function(t,i){this.changeItem(t,i)},e.addItem=function(t){this._array.push(t),this.array=this._array},e.addItemAt=function(t,i){this._array.splice(i,0,t),this.array=this._array},e.deleteItem=function(t){this._array.splice(t,1),this.array=this._array},e.getCell=function(t){return this.runCallLater(this.changeCells),-1<t&&this._cells?this._cells[(t-this._startIndex)%this._cells.length]:null},e.scrollTo=function(t){var i;this._scrollBar?(i=this._isVertical?this.repeatX:this.repeatY,this._scrollBar.value=Math.floor(t/i)*this._cellSize):this.startIndex=t},e.tweenTo=function(t,i,e){var s;void 0===i&&(i=200),this._scrollBar?(s=this._isVertical?this.repeatX:this.repeatY,I.to(this._scrollBar,{value:Math.floor(t/s)*this._cellSize},i,null,e,0,!0)):(this.startIndex=t,e&&e.run())},e._setCellChanged=function(){this._cellChanged||(this._cellChanged=!0,this.callLater(this.changeCells))},e.commitMeasure=function(){this.runCallLater(this.changeCells)},o(0,e,"cacheAs",t.prototype._$get_cacheAs,function(t){g.superSet(V,this,"cacheAs",t),this._scrollBar&&(this._$P.cacheAs=null,"none"!==t?this._scrollBar.on("start",this,this.onScrollStart):this._scrollBar.off("start",this,this.onScrollStart))}),o(0,e,"content",function(){return this._content}),o(0,e,"height",t.prototype._$get_height,function(t){t!=this._height&&(g.superSet(V,this,"height",t),this._setCellChanged())}),o(0,e,"itemRender",function(){return this._itemRender},function(t){if(this._itemRender!=t){this._itemRender=t;for(var i=this._cells.length-1;-1<i;i--)this._cells[i].destroy();this._cells.length=0,this._setCellChanged()}}),o(0,e,"vScrollBarSkin",function(){return this._scrollBar?this._scrollBar.skin:null},function(t){this._removePreScrollBar();var i=new _t;i.name="scrollBar",i.right=0,t&&" "!=t&&(i.skin=t),this.scrollBar=i,this.addChild(i),this._setCellChanged()}),o(0,e,"page",function(){return this._page},function(t){this._page=t,this._array&&(this._page=0<t?t:0,this._page=this._page<this.totalPage?this._page:this.totalPage-1,this.startIndex=this._page*this.repeatX*this.repeatY)}),o(0,e,"hScrollBarSkin",function(){return this._scrollBar?this._scrollBar.skin:null},function(t){this._removePreScrollBar();var i=new st;i.name="scrollBar",i.bottom=0,t&&" "!=t&&(i.skin=t),this.scrollBar=i,this.addChild(i),this._setCellChanged()}),o(0,e,"repeatX",function(){return 0<this._repeatX?this._repeatX:0<this._repeatX2?this._repeatX2:1},function(t){this._repeatX=t,this._setCellChanged()}),o(0,e,"scrollBar",function(){return this._scrollBar},function(t){this._scrollBar!=t&&(this._scrollBar=t)&&(this._isVertical=this._scrollBar.isVertical,this.addChild(this._scrollBar),this._scrollBar.on("change",this,this.onScrollBarChange))}),o(0,e,"width",t.prototype._$get_width,function(t){t!=this._width&&(g.superSet(V,this,"width",t),this._setCellChanged())}),o(0,e,"repeatY",function(){return 0<this._repeatY?this._repeatY:0<this._repeatY2?this._repeatY2:1},function(t){this._repeatY=t,this._setCellChanged()}),o(0,e,"spaceX",function(){return this._spaceX},function(t){this._spaceX=t,this._setCellChanged()}),o(0,e,"spaceY",function(){return this._spaceY},function(t){this._spaceY=t,this._setCellChanged()}),o(0,e,"selectedIndex",function(){return this._selectedIndex},function(t){this._selectedIndex!=t&&(this._selectedIndex=t,this.changeSelectStatus(),this.event("change"),this.selectHandler&&this.selectHandler.runWith(t),this.startIndex=this._startIndex)}),o(0,e,"selectedItem",function(){return-1!=this._selectedIndex?this._array[this._selectedIndex]:null},function(t){this.selectedIndex=this._array.indexOf(t)}),o(0,e,"length",function(){return this._array?this._array.length:0}),o(0,e,"selection",function(){return this.getCell(this._selectedIndex)},function(t){this.selectedIndex=this._startIndex+this._cells.indexOf(t)}),o(0,e,"startIndex",function(){return this._startIndex},function(t){this._startIndex=0<t?t:0,this.callLater(this.renderItems)}),o(0,e,"array",function(){return this._array},function(t){this.runCallLater(this.changeCells),this._array=t||[];var i,e=this._array.length;this.totalPage=Math.ceil(e/(this.repeatX*this.repeatY)),this._selectedIndex=this._selectedIndex<e?this._selectedIndex:e-1,this.startIndex=this._startIndex,this._scrollBar&&(this._scrollBar.stopScroll(),i=this._isVertical?this.repeatX:this.repeatY,t=this._isVertical?this.repeatY:this.repeatX,i=Math.ceil(e/i),1<(0<this._cellOffset?this.totalPage+1:this.totalPage)?(this._scrollBar.scrollSize=this._cellSize,this._scrollBar.thumbPercent=t/i,this._scrollBar.setScroll(0,(i-t)*this._cellSize+this._cellOffset,this._scrollBar.value)):this._scrollBar.setScroll(0,0,0),this._scrollBar.target=this._content)}),o(0,e,"dataSource",t.prototype._$get_dataSource,function(t){"number"==typeof(this._dataSource=t)&&Math.floor(t)==t||"string"==typeof t?this.selectedIndex=parseInt(t):t instanceof Array?this.array=t:g.superSet(V,this,"dataSource",t)}),o(0,e,"cells",function(){return this.runCallLater(this.changeCells),this._cells}),i}(V),st=(h(nt,"laya.ui.HScrollBar",G=j),nt.prototype.initialize=function(){G.prototype.initialize.call(this),this.slider.isVertical=!1},nt);function nt(){nt.__super.call(this)}var ht=function(t){function i(){this._content=null,this._vScrollBar=null,this._hScrollBar=null,this._scrollChanged=!1,i.__super.call(this),this.width=this.height=100}h(i,"laya.ui.Panel",t);var e=i.prototype;return e.destroy=function(t){void 0===t&&(t=!0),laya.ui.Component.prototype.destroy.call(this,t),this._content&&this._content.destroy(t),this._vScrollBar&&this._vScrollBar.destroy(t),this._hScrollBar&&this._hScrollBar.destroy(t),this._vScrollBar=null,this._hScrollBar=null,this._content=null},e.destroyChildren=function(){this._content.destroyChildren()},e.createChildren=function(){laya.display.Node.prototype.addChild.call(this,this._content=new V)},e.addChild=function(t){return t.on("resize",this,this.onResize),this._setScrollChanged(),this._content.addChild(t)},e.onResize=function(){this._setScrollChanged()},e.addChildAt=function(t,i){return t.on("resize",this,this.onResize),this._setScrollChanged(),this._content.addChildAt(t,i)},e.removeChild=function(t){return t.off("resize",this,this.onResize),this._setScrollChanged(),this._content.removeChild(t)},e.removeChildAt=function(t){return this.getChildAt(t).off("resize",this,this.onResize),this._setScrollChanged(),this._content.removeChildAt(t)},e.removeChildren=function(t,i){return this._content.removeChildren(t=void 0===t?0:t,i=void 0===i?2147483647:i),this._setScrollChanged(),this},e.getChildAt=function(t){return this._content.getChildAt(t)},e.getChildByName=function(t){return this._content.getChildByName(t)},e.getChildIndex=function(t){return this._content.getChildIndex(t)},e.changeScroll=function(){this._scrollChanged=!1;var t=this.contentWidth||1,i=this.contentHeight||1,e=this._vScrollBar,s=this._hScrollBar,n=e&&i>this._height,h=s&&t>this._width,o=n?this._width-e.width:this._width,r=h?this._height-s.height:this._height;e&&(e.x=this._width-e.width,e.y=0,e.height=this._height-(h?s.height:0),e.scrollSize=Math.max(.033*this._height,1),e.thumbPercent=r/i,e.setScroll(0,i-r,e.value)),s&&(s.x=0,s.y=this._height-s.height,s.width=this._width-(n?e.width:0),s.scrollSize=Math.max(.033*this._width,1),s.thumbPercent=o/t,s.setScroll(0,t-o,s.value))},e.changeSize=function(){laya.ui.Component.prototype.changeSize.call(this),this.setContentSize(this._width,this._height)},e.setContentSize=function(t,i){var e=this._content;e.width=t,e.height=i,e.scrollRect||(e.scrollRect=new C),e.scrollRect.setTo(0,0,t,i),e.scrollRect=e.scrollRect},e.onScrollBarChange=function(t){var i,e=this._content.scrollRect;e&&(i=Math.round(t.value),t.isVertical?e.y=i:e.x=i,this._content.scrollRect=e)},e.scrollTo=function(t,i){void 0===t&&(t=0),void 0===i&&(i=0),this.vScrollBar&&(this.vScrollBar.value=i),this.hScrollBar&&(this.hScrollBar.value=t)},e.refresh=function(){this.changeScroll()},e.onScrollStart=function(){this._$P.cacheAs||(this._$P.cacheAs=g.superGet(V,this,"cacheAs")),g.superSet(V,this,"cacheAs","none"),this._hScrollBar&&this._hScrollBar.once("end",this,this.onScrollEnd),this._vScrollBar&&this._vScrollBar.once("end",this,this.onScrollEnd)},e.onScrollEnd=function(){g.superSet(V,this,"cacheAs",this._$P.cacheAs)},e._setScrollChanged=function(){this._scrollChanged||(this._scrollChanged=!0,this.callLater(this.changeScroll))},o(0,e,"numChildren",function(){return this._content.numChildren}),o(0,e,"hScrollBarSkin",function(){return this._hScrollBar?this._hScrollBar.skin:null},function(t){null==this._hScrollBar&&(laya.display.Node.prototype.addChild.call(this,this._hScrollBar=new st),this._hScrollBar.on("change",this,this.onScrollBarChange,[this._hScrollBar]),this._hScrollBar.target=this._content,this._setScrollChanged()),this._hScrollBar.skin=t}),o(0,e,"contentWidth",function(){for(var t=0,i=this._content.numChildren-1;-1<i;i--)var e=this._content.getChildAt(i),t=Math.max(e.x+e.width*e.scaleX,t);return t}),o(0,e,"contentHeight",function(){for(var t=0,i=this._content.numChildren-1;-1<i;i--)var e=this._content.getChildAt(i),t=Math.max(e.y+e.height*e.scaleY,t);return t}),o(0,e,"width",t.prototype._$get_width,function(t){g.superSet(V,this,"width",t),this._setScrollChanged()}),o(0,e,"hScrollBar",function(){return this._hScrollBar}),o(0,e,"content",function(){return this._content}),o(0,e,"height",t.prototype._$get_height,function(t){g.superSet(V,this,"height",t),this._setScrollChanged()}),o(0,e,"vScrollBarSkin",function(){return this._vScrollBar?this._vScrollBar.skin:null},function(t){null==this._vScrollBar&&(laya.display.Node.prototype.addChild.call(this,this._vScrollBar=new _t),this._vScrollBar.on("change",this,this.onScrollBarChange,[this._vScrollBar]),this._vScrollBar.target=this._content,this._setScrollChanged()),this._vScrollBar.skin=t}),o(0,e,"vScrollBar",function(){return this._vScrollBar}),o(0,e,"cacheAs",t.prototype._$get_cacheAs,function(t){g.superSet(V,this,"cacheAs",t),this._$P.cacheAs=null,"none"!==t?(this._hScrollBar&&this._hScrollBar.on("start",this,this.onScrollStart),this._vScrollBar&&this._vScrollBar.on("start",this,this.onScrollStart)):(this._hScrollBar&&this._hScrollBar.off("start",this,this.onScrollStart),this._vScrollBar&&this._vScrollBar.off("start",this,this.onScrollStart))}),i}(V),ot=(h(rt,"laya.ui.HSlider",q),rt);function rt(t){rt.__super.call(this,t),this.isVertical=!1}var at=function(t){function e(t,i){this.selectHandler=null,this._items=null,this._selectedIndex=-1,this._skin=null,this._direction="horizontal",this._space=0,this._labels=null,this._labelColors=null,this._labelFont=null,this._labelStrokeColor=null,this._strokeColors=null,this._labelStroke=NaN,this._labelSize=0,this._labelBold=!1,this._labelPadding=null,this._labelAlign=null,this._stateNum=0,this._labelChanged=!1,e.__super.call(this),this.skin=i,this.labels=t}h(e,"laya.ui.UIGroup",t);var i=e.prototype;return g.imps(i,{"laya.ui.IItem":!0}),i.preinitialize=function(){this.mouseEnabled=!0},i.destroy=function(t){void 0===t&&(t=!0),laya.ui.Component.prototype.destroy.call(this,t),this._items&&(this._items.length=0),this._items=null,this.selectHandler=null},i.addItem=function(t,i){void 0===i&&(i=!0);var e=t,s=this._items.length;return e.name="item"+s,this.addChild(e),this.initItems(),i&&0<s?(t=this._items[s-1],"horizontal"==this._direction?e.x=t.x+t.width+this._space:e.y=t.y+t.height+this._space):i&&(e.x=0,e.y=0),s},i.delItem=function(t,i){void 0===i&&(i=!0);var e=this._items.indexOf(t);if(-1!=e){var s=t;this.removeChild(s);for(var n=e+1,h=this._items.length;n<h;n++){var o=this._items[n];o.name="item"+(n-1),i&&("horizontal"==this._direction?o.x-=s.width+this._space:o.y-=s.height+this._space)}this.initItems(),-1<this._selectedIndex&&(e=0,e=this._selectedIndex<this._items.length?this._selectedIndex:this._selectedIndex-1,this._selectedIndex=-1,this.selectedIndex=e)}},i.initItems=function(){this._items||(this._items=[]);for(var t=this._items.length=0;t<1e4;t++){var i=this.getChildByName("item"+t);if(null==i)break;this._items.push(i),i.selected=t===this._selectedIndex,i.clickHandler=u.create(this,this.itemClick,[t],!1)}},i.itemClick=function(t){this.selectedIndex=t},i.setSelect=function(t,i){this._items&&-1<t&&t<this._items.length&&(this._items[t].selected=i)},i.createItem=function(t,i){return null},i.changeLabels=function(){if(this._labelChanged=!1,this._items)for(var t=0,i=0,e=this._items.length;i<e;i++){var s=this._items[i];this._skin&&(s.skin=this._skin),this._labelColors&&(s.labelColors=this._labelColors),this._labelSize&&(s.labelSize=this._labelSize),this._labelStroke&&(s.labelStroke=this._labelStroke),this._labelStrokeColor&&(s.labelStrokeColor=this._labelStrokeColor),this._strokeColors&&(s.strokeColors=this._strokeColors),this._labelBold&&(s.labelBold=this._labelBold),this._labelPadding&&(s.labelPadding=this._labelPadding),this._labelAlign&&(s.labelAlign=this._labelAlign),this._stateNum&&(s.stateNum=this._stateNum),this._labelFont&&(s.labelFont=this._labelFont),"horizontal"===this._direction?(s.y=0,s.x=t,t+=s.width+this._space):(s.x=0,s.y=t,t+=s.height+this._space)}this.changeSize()},i.commitMeasure=function(){this.runCallLater(this.changeLabels)},i._setLabelChanged=function(){this._labelChanged||(this._labelChanged=!0,this.callLater(this.changeLabels))},o(0,i,"labelStrokeColor",function(){return this._labelStrokeColor},function(t){this._labelStrokeColor!=t&&(this._labelStrokeColor=t,this._setLabelChanged())}),o(0,i,"skin",function(){return this._skin},function(t){this._skin!=t&&(this._skin=t,this._setLabelChanged())}),o(0,i,"selectedIndex",function(){return this._selectedIndex},function(t){this._selectedIndex!=t&&(this.setSelect(this._selectedIndex,!1),this._selectedIndex=t,this.setSelect(t,!0),this.event("change"),this.selectHandler&&this.selectHandler.runWith(this._selectedIndex))}),o(0,i,"labels",function(){return this._labels},function(t){if(this._labels!=t){if(this._labels=t,this.removeChildren(),this._setLabelChanged(),this._labels)for(var i=this._labels.split(","),e=0,s=i.length;e<s;e++){var n=this.createItem(this._skin,i[e]);n.name="item"+e,this.addChild(n)}this.initItems()}}),o(0,i,"strokeColors",function(){return this._strokeColors},function(t){this._strokeColors!=t&&(this._strokeColors=t,this._setLabelChanged())}),o(0,i,"labelColors",function(){return this._labelColors},function(t){this._labelColors!=t&&(this._labelColors=t,this._setLabelChanged())}),o(0,i,"labelStroke",function(){return this._labelStroke},function(t){this._labelStroke!=t&&(this._labelStroke=t,this._setLabelChanged())}),o(0,i,"labelSize",function(){return this._labelSize},function(t){this._labelSize!=t&&(this._labelSize=t,this._setLabelChanged())}),o(0,i,"stateNum",function(){return this._stateNum},function(t){this._stateNum!=t&&(this._stateNum=t,this._setLabelChanged())}),o(0,i,"labelBold",function(){return this._labelBold},function(t){this._labelBold!=t&&(this._labelBold=t,this._setLabelChanged())}),o(0,i,"labelFont",function(){return this._labelFont},function(t){this._labelFont!=t&&(this._labelFont=t,this._setLabelChanged())}),o(0,i,"labelPadding",function(){return this._labelPadding},function(t){this._labelPadding!=t&&(this._labelPadding=t,this._setLabelChanged())}),o(0,i,"direction",function(){return this._direction},function(t){this._direction=t,this._setLabelChanged()}),o(0,i,"space",function(){return this._space},function(t){this._space=t,this._setLabelChanged()}),o(0,i,"items",function(){return this._items}),o(0,i,"selection",function(){return-1<this._selectedIndex&&this._selectedIndex<this._items.length?this._items[this._selectedIndex]:null},function(t){this.selectedIndex=this._items.indexOf(t)}),o(0,i,"dataSource",t.prototype._$get_dataSource,function(t){"number"==typeof(this._dataSource=t)&&Math.floor(t)==t||"string"==typeof t?this.selectedIndex=parseInt(t):t instanceof Array?this.labels=t.join(","):g.superSet(V,this,"dataSource",t)}),e}(V),lt=function(i){function e(t,i){this._value=null,e.__super.call(this,t,i=void 0===i?"":i)}h(e,"laya.ui.Radio",i);var t=e.prototype;return t.destroy=function(t){i.prototype.destroy.call(this,t=void 0===t?!0:t),this._value=null},t.preinitialize=function(){laya.ui.Component.prototype.preinitialize.call(this),this.toggle=!1,this._autoSize=!1},t.initialize=function(){i.prototype.initialize.call(this),this.createText(),this._text.align="left",this._text.valign="top",this._text.width=0,this.on("click",this,this.onClick)},t.onClick=function(t){this.selected=!0},o(0,t,"value",function(){return null!=this._value?this._value:this.label},function(t){this._value=t}),e}(W),ct=function(t){function i(){this._list=null,this._source=null,this._renderHandler=null,this._spaceLeft=10,this._spaceBottom=0,this._keepStatus=!0,i.__super.call(this),this.width=this.height=200}h(i,"laya.ui.Tree",t);var e=i.prototype;return g.imps(e,{"laya.ui.IRender":!0}),e.destroy=function(t){void 0===t&&(t=!0),laya.ui.Component.prototype.destroy.call(this,t),this._list&&this._list.destroy(t),this._list=null,this._source=null,this._renderHandler=null},e.createChildren=function(){this.addChild(this._list=new et),this._list.renderHandler=u.create(this,this.renderItem,null,!1),this._list.repeatX=1,this._list.on("change",this,this.onListChange)},e.onListChange=function(t){this.event("change")},e.getArray=function(){var t,i,e=[];for(i in this._source)t=this._source[i],this.getParentOpenStatus(t)&&(t.x=this._spaceLeft*this.getDepth(t),e.push(t));return e},e.getDepth=function(t,i){return void 0===i&&(i=0),null==t.nodeParent?i:this.getDepth(t.nodeParent,i+1)},e.getParentOpenStatus=function(t){t=t.nodeParent;return null==t||!!t.isOpen&&(null==t.nodeParent||this.getParentOpenStatus(t))},e.renderItem=function(t,i){var e,s=t.dataSource;s&&(t.left=s.x,(e=t.getChildByName("arrow"))&&(s.hasChild?(e.visible=!0,e.index=s.isOpen?1:0,e.tag=i,e.off("click",this,this.onArrowClick),e.on("click",this,this.onArrowClick)):e.visible=!1),(e=t.getChildByName("folder"))&&(2==e.clipY?e.index=s.isDirectory?0:1:e.index=s.isDirectory?s.isOpen?1:0:2),this._renderHandler&&this._renderHandler.runWith([t,i]))},e.onArrowClick=function(t){t=t.currentTarget.tag;this._list.array[t].isOpen=!this._list.array[t].isOpen,this.event("open"),this._list.array=this.getArray()},e.setItemState=function(t,i){this._list.array[t]&&(this._list.array[t].isOpen=i,this._list.array=this.getArray())},e.fresh=function(){this._list.array=this.getArray(),this.repaint()},e.parseXml=function(t,i,e,s){var n=t.childNodes,h=n.length;if(!s){var o,r={},a=t.attributes;for(o in a){var l=(c=a[o]).nodeName,c=c.nodeValue;r[l]="true"==c||"false"!=c&&c}r.nodeParent=e,0<h&&(r.isDirectory=!0),r.hasChild=0<h,i.push(r)}for(var u=0;u<h;u++){var _=n[u];this.parseXml(_,i,r,!1)}},e.parseOpenStatus=function(t,i){for(var e=0,s=i.length;e<s;e++){var n=i[e];if(n.isDirectory)for(var h=0,o=t.length;h<o;h++){var r=t[h];if(r.isDirectory&&this.isSameParent(r,n)&&n.label==r.label){n.isOpen=r.isOpen;break}}}},e.isSameParent=function(t,i){return null==t.nodeParent&&null==i.nodeParent||null!=t.nodeParent&&null!=i.nodeParent&&(t.nodeParent.label==i.nodeParent.label&&this.isSameParent(t.nodeParent,i.nodeParent))},e.filter=function(t){var i;Boolean(t)?(this.getFilterSource(this._source,i=[],t),this._list.array=i):this._list.array=this.getArray()},e.getFilterSource=function(t,i,e){var s,n;for(n in e=e.toLocaleLowerCase(),t)!(s=t[n]).isDirectory&&-1<String(s.label).toLowerCase().indexOf(e)&&(s.x=0,i.push(s)),s.child&&0<s.child.length&&this.getFilterSource(s.child,i,e)},o(0,e,"spaceBottom",function(){return this._list.spaceY},function(t){this._list.spaceY=t}),o(0,e,"keepStatus",function(){return this._keepStatus},function(t){this._keepStatus=t}),o(0,e,"itemRender",function(){return this._list.itemRender},function(t){this._list.itemRender=t}),o(0,e,"array",function(){return this._list.array},function(t){this._keepStatus&&this._list.array&&t&&this.parseOpenStatus(this._list.array,t),this._source=t,this._list.array=this.getArray()}),o(0,e,"mouseHandler",function(){return this._list.mouseHandler},function(t){this._list.mouseHandler=t}),o(0,e,"dataSource",t.prototype._$get_dataSource,function(t){this._dataSource=t,g.superSet(V,this,"dataSource",t)}),o(0,e,"source",function(){return this._source}),o(0,e,"scrollBar",function(){return this._list.scrollBar}),o(0,e,"list",function(){return this._list}),o(0,e,"scrollBarSkin",function(){return this._list.vScrollBarSkin},function(t){this._list.vScrollBarSkin=t}),o(0,e,"renderHandler",function(){return this._renderHandler},function(t){this._renderHandler=t}),o(0,e,"selectedIndex",function(){return this._list.selectedIndex},function(t){this._list.selectedIndex=t}),o(0,e,"spaceLeft",function(){return this._spaceLeft},function(t){this._spaceLeft=t}),o(0,e,"selectedItem",function(){return this._list.selectedItem},function(t){this._list.selectedItem=t}),o(0,e,"width",t.prototype._$get_width,function(t){g.superSet(V,this,"width",t),this._list.width=t}),o(0,e,"height",t.prototype._$get_height,function(t){g.superSet(V,this,"height",t),this._list.height=t}),o(0,e,"xml",null,function(t){var i=[];this.parseXml(t.childNodes[0],i,null,!0),this.array=i}),o(0,e,"selectedPath",function(){return this._list.selectedItem?this._list.selectedItem.path:null}),i}(V),ut=function(t){function i(){this._items=null,this._selectedIndex=0,i.__super.call(this),this._setIndexHandler=u.create(this,this.setIndex,null,!1)}h(i,"laya.ui.ViewStack",t);var e=i.prototype;return g.imps(e,{"laya.ui.IItem":!0}),e.setItems=function(t){this.removeChildren();for(var i=0,e=0,s=t.length;e<s;e++){var n=t[e];n&&(n.name="item"+i,this.addChild(n),i++)}this.initItems()},e.addItem=function(t){t.name="item"+this._items.length,this.addChild(t),this.initItems()},e.initItems=function(){this._items=[];for(var t=0;t<1e4;t++){var i=this.getChildByName("item"+t);if(null==i)break;this._items.push(i),i.visible=t==this._selectedIndex}},e.setSelect=function(t,i){this._items&&-1<t&&t<this._items.length&&(this._items[t].visible=i)},e.setIndex=function(t){this.selectedIndex=t},o(0,e,"dataSource",t.prototype._$get_dataSource,function(t){if("number"==typeof(this._dataSource=t)&&Math.floor(t)==t||"string"==typeof t)this.selectedIndex=parseInt(t);else for(var i in this._dataSource)this.hasOwnProperty(i)&&(this[i]=this._dataSource[i])}),o(0,e,"selectedIndex",function(){return this._selectedIndex},function(t){this._selectedIndex!=t&&(this.setSelect(this._selectedIndex,!1),this._selectedIndex=t,this.setSelect(this._selectedIndex,!0))}),o(0,e,"selection",function(){return-1<this._selectedIndex&&this._selectedIndex<this._items.length?this._items[this._selectedIndex]:null},function(t){this.selectedIndex=this._items.indexOf(t)}),o(0,e,"items",function(){return this._items}),o(0,e,"setIndexHandler",function(){return this._setIndexHandler},function(t){this._setIndexHandler=t}),i}(V),_t=(h(dt,"laya.ui.VScrollBar",j),dt);function dt(){dt.__super.call(this)}var ft=function(i){function e(t){this._bg=null,this._skin=null,e.__super.call(this),this.text=t=void 0===t?"":t,this.skin=this.skin}h(e,"laya.ui.TextInput",i);var t=e.prototype;return t.preinitialize=function(){this.mouseEnabled=!0},t.destroy=function(t){i.prototype.destroy.call(this,t=void 0===t?!0:t),this._bg&&this._bg.destroy(),this._bg=null},t.createChildren=function(){this.addChild(this._tf=new f),this._tf.padding=z.inputLabelPadding,this._tf.on("input",this,this._onInput),this._tf.on("enter",this,this._onEnter),this._tf.on("blur",this,this._onBlur),this._tf.on("focus",this,this._onFocus)},t._onFocus=function(){this.event("focus",this)},t._onBlur=function(){this.event("blur",this)},t._onInput=function(){this.event("input",this)},t._onEnter=function(){this.event("enter",this)},t.initialize=function(){this.width=128,this.height=22},t.select=function(){this._tf.select()},t.setSelection=function(t,i){this._tf.setSelection(t,i)},o(0,t,"text",i.prototype._$get_text,function(t){this._tf.text!=t&&(this._tf.text=t+="",this.event("change"))}),o(0,t,"bg",function(){return this._bg},function(t){this.graphics=this._bg=t}),o(0,t,"inputElementYAdjuster",function(){return this._tf.inputElementYAdjuster},function(t){this._tf.inputElementYAdjuster=t}),o(0,t,"multiline",function(){return this._tf.multiline},function(t){this._tf.multiline=t}),o(0,t,"skin",function(){return this._skin},function(t){this._skin!=t&&(this._skin=t,this._bg||(this.graphics=this._bg=new N),this._bg.source=m.getRes(this._skin),this._width&&(this._bg.width=this._width),this._height&&(this._bg.height=this._height))}),o(0,t,"sizeGrid",function(){return this._bg&&this._bg.sizeGrid?this._bg.sizeGrid.join(","):null},function(t){this._bg||(this.graphics=this._bg=new N),this._bg.sizeGrid=H.fillArray(z.defaultSizeGrid,t,Number)}),o(0,t,"inputElementXAdjuster",function(){return this._tf.inputElementXAdjuster},function(t){this._tf.inputElementXAdjuster=t}),o(0,t,"width",i.prototype._$get_width,function(t){g.superSet(J,this,"width",t),this._bg&&(this._bg.width=t)}),o(0,t,"height",i.prototype._$get_height,function(t){g.superSet(J,this,"height",t),this._bg&&(this._bg.height=t)}),o(0,t,"editable",function(){return this._tf.editable},function(t){this._tf.editable=t}),o(0,t,"restrict",function(){return this._tf.restrict},function(t){this._tf.restrict=t}),o(0,t,"prompt",function(){return this._tf.prompt},function(t){this._tf.prompt=t}),o(0,t,"promptColor",function(){return this._tf.promptColor},function(t){this._tf.promptColor=t}),o(0,t,"maxChars",function(){return this._tf.maxChars},function(t){this._tf.maxChars=t}),o(0,t,"focus",function(){return this._tf.focus},function(t){this._tf.focus=t}),o(0,t,"type",function(){return this._tf.type},function(t){this._tf.type=t}),o(0,t,"asPassword",function(){return this._tf.asPassword},function(t){this._tf.asPassword=t}),e}(J),gt=(h(pt,"laya.ui.VSlider",q),pt);function pt(){pt.__super.call(this)}var mt=function(t){function s(){this.popupCenter=!0,this.closeHandler=null,this.popupEffect=null,this.closeEffect=null,this.group=null,this.isModal=!1,this._dragArea=null,s.__super.call(this)}h(s,"laya.ui.Dialog",t);var i=s.prototype;return i.initialize=function(){this.popupEffect=s.manager.popupEffectHandler,this.closeEffect=s.manager.closeEffectHandler,this._dealDragArea(),this.on("click",this,this._onClick)},i._dealDragArea=function(){var t=this.getChildByName("drag");t&&(this.dragArea=t.x+","+t.y+","+t.width+","+t.height,t.removeSelf())},i._onClick=function(t){var i=t.target;if(i)switch(i.name){case"close":case"cancel":case"sure":case"no":case"ok":case"yes":this.close(i.name)}},i.show=function(t,i){this._open(!1,t=void 0===t?!1:t,i=void 0===i?!0:i)},i.popup=function(t,i){this._open(!0,t=void 0===t?!1:t,i=void 0===i?!0:i)},i._open=function(t,i,e){s.manager.lock(!1),this.isModal=t,s.manager.open(this,i,e)},i.onOpened=function(){},i.close=function(t,i){s.manager.close(this,t,i=void 0===i?!0:i)},i.onClosed=function(t){},i._onMouseDown=function(t){var i=this.getMousePoint();this._dragArea.contains(i.x,i.y)?this.startDrag():this.stopDrag()},o(0,i,"dragArea",function(){return this._dragArea?this._dragArea.toString():null},function(t){t?(t=H.fillArray([0,0,0,0],t,Number),this._dragArea=new C(t[0],t[1],t[2],t[3]),this.on("mousedown",this,this._onMouseDown)):(this._dragArea=null,this.off("mousedown",this,this._onMouseDown))}),o(0,i,"isPopup",function(){return null!=this.parent}),o(0,i,"zOrder",t.prototype._$get_zOrder,function(t){g.superSet(Z,this,"zOrder",t),s.manager._checkMask()}),o(1,s,"manager",function(){return s._manager=s._manager||new E},function(t){s._manager=t}),s.setLockView=function(t){s.manager.setLockView(t)},s.lock=function(t){s.manager.lock(t)},s.closeAll=function(){s.manager.closeAll()},s.getDialogsByGroup=function(t){return s.manager.getDialogsByGroup(t)},s.closeByGroup=function(t){return s.manager.closeByGroup(t)},s.CLOSE="close",s.CANCEL="cancel",s.SURE="sure",s.NO="no",s.OK="ok",s.YES="yes",s._manager=null,s}(Z),yt=function(t){function i(){i.__super.call(this)}h(i,"laya.ui.HBox",t);var e=i.prototype;return e.sortItem=function(t){t&&t.sort(function(t,i){return t.x-i.x})},e.changeItems=function(){this._itemChanged=!1;for(var t=[],i=0,e=0,s=this.numChildren;e<s;e++){var n=this.getChildAt(e);n&&n.layoutEnabled&&(t.push(n),i=this._height||Math.max(i,n.height*n.scaleY))}this.sortItem(t);for(var h=0,e=0,s=t.length;e<s;e++)(n=t[e]).x=h,h+=n.width*n.scaleX+this._space,"top"==this._align?n.y=0:"middle"==this._align?n.y=.5*(i-n.height*n.scaleY):"bottom"==this._align&&(n.y=i-n.height*n.scaleY);this.changeSize()},o(0,e,"height",t.prototype._$get_height,function(t){this._height!=t&&(g.superSet(tt,this,"height",t),this.callLater(this.changeItems))}),i.NONE="none",i.TOP="top",i.MIDDLE="middle",i.BOTTOM="bottom",i}(tt),t=function(){var r,o;function a(t){this.gameStopHD=!1,this.iconImgTl=null,this._iconImage=null,this._moreBox=null,this._gameBox=null,this.screenType=0,this._moreGameDataUrl="https://abc.layabox.com/public/more/gamelist2.json",this._iconImageObj=null,this.clickCallBack=null,this.closeCallBack=null,this.isShow=!1,this.dinfo=null,this.ErrorUrlHttps="https://elastic.layabox.com/",this.tongjiType="bdm",void 0===t&&(t=0),a.__super.call(this),this.screenType=t,this.init()}h(a,"laya.ui.MoreGame",Z);var t=a.prototype;return t.getLocalDateString=function(t){t=this.getDateByTimestamp(t=void 0===t?0:t).toLocaleDateString();(l.onLimixiu||l.onMiniGame)&&(i=new Date,t=a.toLocaleDateString(i.getTime()));var i=new RegExp("/","g");return t=t.replace(i,"-")},t.getDateByTimestamp=function(t){return(t=void 0===t?0:t)&&""!=t?new Date(t):new Date},t.reportError=function(t,i,e){void 0===i&&(i=""),e=e||{};var s=Date.now(),s=new Date(s+0);e.date=s.toLocaleString(),"error"!=(e.etype=t)&&"statistics"!=t&&(t="statistics"),e.version="V0.0.1",e.gameId=10100,e.dinfo=this.dinfo,e.channel=-1e3,e.msg=i,e["@timestamp"]=s.toISOString(),e.user=this.getUserId(),e.openid=this.getOpenId();i=a.getDay(s);e.rdate=i,e.day=s.getDate()+"",e.hour=s.getHours()+"",e.minute=s.getMinutes()+"",e.gameurl=n.baseURI,e.regTime=0,"error"==t?this.sendLog(e,this.tongjiType+"error-"+i.substring(0,6)+"/"+t+"/",t):this.sendLog(e,this.tongjiType+"-"+i.substring(0,6)+"/"+t+"/",t)},t.getUserId=function(){var t=parseInt(y.getItem("layauserid")+"")||-1;return-1==t&&(t=this.randRange(0,1e9),y.setItem("layauserid",t+"")),t},t.getOpenId=function(){if(null==(t=y.getItem("openid"))||""==t){for(var t="",i=0;i<32;i++){var e=this.randRange(0,62);t+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".charAt(e)}y.setItem("openid",t)}return t},t.sendLog=function(t,i,e){var s=this,n=new d;n.on("error",this,function(t,i,e){e&&-1!=e.indexOf("[404]")&&(new d).send(s.ErrorUrlHttps+"garbage/"+i+"/",JSON.stringify(t),"post","text",["Content-Type","application/json"])},[t,e]),l.onBDMiniGame&&(t.gameurl=""),n.send(this.ErrorUrlHttps+i,JSON.stringify(t),"post","text",["Content-Type","application/json"])},t.initEvent=function(){this.on("click",this,this.onIconClick)},t.onStageResize=function(){var t=Math.min(g.stage.width/g.stage.designWidth,g.stage.height/g.stage.designHeight);g.stage.width<720&&(t=.9),this._moreBox&&this._moreBox.scale(t,t),this._gameBox&&this._gameBox.scale(t,t)},t.tada=function(t,i,e,s){void 0===e&&(e=1.1),void 0===s&&(s=1);var n=new B;return n.reset(),n.to(t,{scaleX:e,scaleY:e,rotation:3},.1*i).to(t,{scaleX:e,scaleY:e,rotation:-3},.1*i).to(t,{scaleX:e,scaleY:e,rotation:3},.1*i).to(t,{scaleX:e,scaleY:e,rotation:-3},.1*i).to(t,{scaleX:e,scaleY:e,rotation:3},.1*i).to(t,{scaleX:e,scaleY:e,rotation:-3},.1*i).to(t,{scaleX:e,scaleY:e,rotation:3},.1*i).to(t,{scaleX:e,scaleY:e,rotation:-3},.1*i).to(t,{scaleX:e,scaleY:e,rotation:3},.1*i).to(t,{scaleX:s,scaleY:s,rotation:0},.1*i),n.play(0),n},t.dispose=function(){this.removeEvent(),this.gameStopHD=!0,a._moreGameData=null,this._iconImageObj=null,this.clickCallBack=null,this.closeCallBack=null,this.iconImgTl&&(this.iconImgTl.offAll("complete"),this.iconImgTl=null),this._moreBox&&(this._moreBox.removeChildren(),this._moreBox=null),this._gameBox&&(this._gameBox.removeChildren(),this._gameBox=null),this._iconImage&&(this._iconImage.removeSelf(),this._iconImage=null)},t.onSetIconType=function(t){this.gameStopHD=!t,this.visible=t},t.checkIconImgHD=function(){this.iconImgTl?this.iconImgTl.play(0):this.iconImgTl=this.tada(this._iconImage,1200,1.1,.9),this.iconImgTl.on("complete",this,this.onTlComplete)},t.onTlComplete=function(){if(this.parent){if(this._iconImage.scale(.9,.9),this._iconImage.rotation=0,this.gameStopHD&&this.iconImgTl)return this.iconImgTl.offAll("complete"),void(this.iconImgTl=null);g.timer.once(1e3,this,this.onYanChiPlay)}else this.iconImgTl&&(this.iconImgTl.offAll(),this.iconImgTl=null)},t.onYanChiPlay=function(){this.parent&&this.iconImgTl?this.iconImgTl.play(0):this.iconImgTl&&(this.iconImgTl.offAll("complete"),this.iconImgTl=null)},t.removeEvent=function(){this.off("click",this,this.onIconClick)},t.onIconClick=function(){this.isShow=!0,null!=this.clickCallBack&&this.clickCallBack.run();var t=y.getItem("currentTime"),i=this.getLocalDateString();t!=i?(y.setItem("currentTime",i),this.reportError(a._moreGameData.statid1)):this.reportError(a._moreGameData.statid2),this.onResLoaded()},t.onResLoaded=function(){if(this._moreBox)this._moreBox.visible=!0;else{this._moreBox=new V,g.stage.addChild(this._moreBox),this._moreBox.zOrder=99999,this._moreBox.left=this._moreBox.right=this._moreBox.top=this._moreBox.bottom=0;var i=this.onCreateImage(a.onGetAtlasDanImgUrl("img_white_bg"),this._moreBox);i.top=i.left=i.right=i.bottom=0,i.sizeGrid="1,1,1,1,1";i=this.onCreateImage(a.onGetAtlasDanImgUrl("hengfengexian"),this._moreBox);i.left=i.right=0,i.y=132,i.alpha=.2;i=this.onCreateImage(a.onGetAtlasDanImgUrl("img_font_jingcai"),this._moreBox);i.on("click",this,this.onJiantouImgClick),this.isQMP()&&this.screenType?i.pos(15,70):i.pos(15,45);i=new et;this._moreBox.addChild(i),i.itemRender=r,i.selectEnable=!0,i.vScrollBarSkin="",i.scrollBar.autoHide=!0,i.scrollBar.elasticDistance=250,i.renderHandler=new u(this,this.onGameListRender);var t=a._moreGameData.marvellousGame.gameList,e=[];e.push(t[0]),e.push(t[1]);var s=this.RandomNumBoth(e.length,t.length-e.length,t.length);if(s){try{for(var n=0,h=s.length;n<h;n++){var o=s[n];e.push(t[o])}a._moreGameData.marvellousGame.gameList=[],a._moreGameData.marvellousGame.gameList=e,i.array=a._moreGameData.marvellousGame.gameList}catch(t){i.array=a._moreGameData.marvellousGame.gameList}this.screenType&&(i.spaceY=10,i.width=690,this.isQMP()?i.height=g.stage.height+130:i.height=1139,i.y=139,i.centerX=0),this.onStageResize()}else this.visible=!1}},t.RandomNumBoth=function(t,i,e){for(var s=[],n=t;n<e;n++)s.push(n);for(var h=[],o=s.length,n=0;n<o;n++){s.length;var r=Math.floor(Math.random()*s.length);if(h.push(s[r]),s.splice(r,1),s.length<=o-i)return h}return null},t.isQMP=function(){var t=!1,i=0,i="horizontal"==g.stage.screenMode?l.height%9:l.width%9;l.onAndroid&&0==i&&(e=0,e="horizontal"==g.stage.screenMode?l.width:l.height,-1!=[2280,2160,2244,3120,2248,2340,2310].indexOf(e)&&(t=!0));var i=/iPhone/gi.test(l.window.navigator.userAgent)&&375==Math.min(l.clientHeight,l.clientWidth)&&812==Math.max(l.clientHeight,l.clientWidth),e=414==Math.min(l.clientHeight,l.clientWidth)&&896==Math.max(l.clientHeight,l.clientWidth);return t=(l.onMiniGame||l.onBDMiniGame)&&!l.onAndroid&&(i||e)?!0:t},t.onDrawShapes=function(t,i,e,s){var n=e=void 0===e?5:e;(s=void 0===s?!1:s)&&(n=0);s=new S;return s.graphics.drawPath(0,0,[["moveTo",e,0],["lineTo",105,0],["arcTo",t,0,t,e,e],["lineTo",t,i],["arcTo",t,i+e,105,i+e,n],["lineTo",e,i+e],["arcTo",0,i+e,0,i,n],["lineTo",0,e],["arcTo",0,0,e,0,e],["closePath"]],{fillStyle:"#ff0000"}),s},t.onCreateMaskImg=function(t,i){var e=this.onCreateImage(a.onGetAtlasDanImgUrl("dayuan"),i),i=this.onCreateImage(t,e);i.pos(11,10);t=new S;return t.graphics.drawCircle(71,74,68,"#ff0000"),i.mask=t,e.scale(.7,.7),e},t.onGameListRender=function(t,i){var e=a._moreGameData.marvellousGame.gameList;i<0||i>e.length-1||(i=e[i],t.init(i,this.screenType,new u(this,this.onItemClickCallBack)))},t.onItemClickCallBack=function(i){var t,e,s,n=this;swan.navigateToMiniProgram&&(t=i.appKey,e=i.path,s=i.extendInfo,swan.navigateToMiniProgram({appKey:t,path:e,extraData:s,success:function(t){},fail:function(t){},complete:function(t){n.reportError(i.statid)}.bind(this)}))},t.onJiantouImgClick=function(t){this.isShow=!1,this._moreBox&&(this._moreBox.visible=!1),null!=this.closeCallBack&&this.closeCallBack.run()},t.onCreateLabel=function(t,i,e,s,n,h,o){void 0===e&&(e=24),void 0===s&&(s="#000000"),void 0===n&&(n=!1),void 0===h&&(h="center"),void 0===o&&(o=10);var r=new J;return r.text=t,r.font="Microsoft YaHei",r.fontSize=e,r.color=s,r.bold=!0,r.leading=o,r.valign="middle",r.align=h,r.wordWrap=n,i.addChild(r),r},t.onCreateImage=function(t,i){var e=new R;return e.skin=t,i.addChild(e),e},t.init=function(){var t=-1<l.window.navigator.userAgent.indexOf("SwanGame");this.visible=!1,t&&(this.dinfo=JSON.stringify(laya.bd.mini.BMiniAdapter.systemInfo),this.onGetAdvsListData())},t.randRange=function(t,i){return Math.floor(Math.random()*(i-t+1))+t},t.onGetAdvsListData=function(){var i=this,t=this.randRange(1e4,1e6),t=this._moreGameDataUrl+"?"+t;a._http.open("get",t,!0),a._http.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a._http.responseType="text",a._http.onerror=function(t){i._onError(t)},a._http.onload=function(t){i._onLoad(t)},a._http.send(null)},t._onError=function(t){this.error("Request failed Status:"+a._http.status+" text:"+a._http.statusText)},t._onLoad=function(t){var i=a._http,e=void 0!==i.status?i.status:200;200===e||204===e||0===e?this.complete():this.error("["+i.status+"]"+i.statusText+":"+i.responseURL)},t.error=function(t){this.event("error",t)},t.complete=function(){try{var t=a._http.response||a._http.responseText;a._moreGameData=JSON.parse(t),this.initUI()}catch(t){this.error(t.message)}},t.initUI=function(){a._moreGameData.isOpen&&this.screenType?(this._iconImage||(this._iconImage=new R,this.addChild(this._iconImage)),this._iconImage.skin=a.onGetImgSkinUrl(a._moreGameData.icon),this._iconImageObj&&(this._iconImage.size(this._iconImageObj.width,this._iconImageObj.height),this._iconImage.pivot(this._iconImageObj.width/2,this._iconImageObj.height/2),this._iconImage.pos(this._iconImageObj.width/2,this._iconImageObj.height/2)),this.visible=!0,this.initEvent(),this.gameStopHD=!1,this.checkIconImgHD()):this.visible=!1},t.setIconSize=function(t,i){this._iconImage&&(this._iconImage.size(t,i),this._iconImage.pivot(t/2,i/2),this._iconImage.pos(t/2,i/2)),this._iconImageObj={width:t,height:i}},a.toLocaleDateString=function(t){return a.getDateFormatStr(t,"/")},a.getDateFormatStr=function(t,i){void 0===i&&(i="yynndd");var e=new Date(t),s=e.getFullYear(),n=e.getMonth()+1,h=e.getDate(),o=e.getHours(),t=e.getMinutes(),e=e.getSeconds();switch(i){case"yynndd":return s.toString()+"年"+n.toString()+"月"+h.toString()+"日";case"/":return s.toString()+"/"+n.toString()+"/"+h.toString()}return s.toString()+"年"+n.toString()+"月"+h.toString()+"日"+o.toString()+"时"+t.toString()+"分"+e.toString()+"秒"},a.getDay=function(t){var i=t.getMonth()+1,e=t.getDate();return t.getFullYear()+""+(i<10?"0"+i:i)+(e<10?"0"+e:e)},a.onGetAtlasDanImgUrl=function(t){return a._moreGameData.imgPath+a._moreGameData.atlas+t+".png"},a.onGetImgSkinUrl=function(t){return a._moreGameData.imgPath+t},a.onGetIconImgSkinUrl=function(t){return a._moreGameData.iconPath+t},a._moreGameData=null,s(a,["_http",function(){return this._http=new l.window.XMLHttpRequest}]),a.__init$=function(){r=function(){function t(){this.titleLabel=null,this.gameListBox=null,t.__super.call(this)}h(t,"",V);var i=t.prototype;return i.init=function(t,i,e){if(this.titleLabel?this.titleLabel.text=t.title:(this.titleLabel=this.onCreateLabel(t.title,this,32,"#3d3939"),this.titleLabel.pos(8,0),this.titleLabel.size(162,50)),this.gameListBox)for(s=0,n=this.gameListBox._childs.length;s<n;s++)(h=this.gameListBox._childs[s]).init(t.gameList[s],i,e);else{this.gameListBox=new V,this.addChild(this.gameListBox);for(var s=0,n=t.gameList.length;s<n;s++){var h=new o;h.init(t.gameList[s],i,e),h.x=0+175*s,h.y=65,this.gameListBox.addChild(h)}}this.size(695,340),this.cacheAs="bitmap"},i.onCreateLabel=function(t,i,e,s,n){void 0===e&&(e=26),void 0===s&&(s="#000000"),void 0===n&&(n=!0);var h=new J;return h.text=t,h.font="Microsoft YaHei",h.fontSize=e,h.color=s,h.bold=n,h.leading=10,h.valign="middle",h.align="center",h.overflow="hidden",i.addChild(h),h},t}(),o=function(){function t(){this.kuangImg=null,this.iconNameLabel=null,this.iconImg=null,this.playImg=null,this.itemData=null,this.callBackHandler=null,t.__super.call(this)}h(t,"",V);var i=t.prototype;return i.MoveGameItem=function(){},i.initEvent=function(){this.on("click",this,this.onItemClick)},i.onItemClick=function(){null!=this.callBackHandler&&this.callBackHandler.runWith([this.itemData])},i.init=function(t,i,e){this.itemData=t,this.callBackHandler=e,this.kuangImg?this.kuangImg.skin=a.onGetAtlasDanImgUrl("dayuan"):this.kuangImg=this.onCreateImage(a.onGetAtlasDanImgUrl("dayuan"),this),this.iconImg?this.iconImg.skin=a.onGetIconImgSkinUrl(t.icon):(this.iconImg=this.onCreateImage(a.onGetIconImgSkinUrl(t.icon),this),(e=new S).graphics.drawCircle(71,74,68,"#ff0000"),this.iconImg.mask=e,this.iconImg.pos(13,10)),this.iconNameLabel?this.iconNameLabel.text=t.name:(this.iconNameLabel=this.onCreateLabel(t.name,this,28,"#3d3939"),this.iconNameLabel.pos(7,165)),this.playImg?this.playImg.skin=a.onGetAtlasDanImgUrl("img_play"):(this.playImg=this.onCreateImage(a.onGetAtlasDanImgUrl("img_play"),this),this.playImg.pos(12,210)),this.size(165,270),this.initEvent()},i.onCreateLabel=function(t,i,e,s,n){void 0===e&&(e=24),void 0===s&&(s="#000000"),void 0===n&&(n=!1);var h=new J;return h.text=t,h.font="Microsoft YaHei",h.fontSize=e,h.color=s,h.bold=n,h.leading=10,h.valign="middle",h.align="center",h.size(152,44),h.overflow="hidden",i.addChild(h),h},i.onCreateImage=function(t,i){var e=new R;return e.skin=t,i.addChild(e),e},t}()},a}(),vt=function(t){function i(){i.__super.call(this)}h(i,"laya.ui.VBox",t);var e=i.prototype;return e.changeItems=function(){this._itemChanged=!1;for(var t=[],i=0,e=0,s=this.numChildren;e<s;e++){var n=this.getChildAt(e);n&&n.layoutEnabled&&(t.push(n),i=this._width||Math.max(i,n.width*n.scaleX))}this.sortItem(t);for(var h=0,e=0,s=t.length;e<s;e++)(n=t[e]).y=h,h+=n.height*n.scaleY+this._space,"left"==this._align?n.x=0:"center"==this._align?n.x=.5*(i-n.width*n.scaleX):"right"==this._align&&(n.x=i-n.width*n.scaleX);this.changeSize()},o(0,e,"width",t.prototype._$get_width,function(t){this._width!=t&&(g.superSet(tt,this,"width",t),this.callLater(this.changeItems))}),i.NONE="none",i.LEFT="left",i.CENTER="center",i.RIGHT="right",i}(tt),Ct=(h(bt,"laya.ui.RadioGroup",at),bt.prototype.createItem=function(t,i){return new lt(t,i)},bt);function bt(){bt.__super.call(this)}var St=(h(xt,"laya.ui.Tab",at),xt.prototype.createItem=function(t,i){return new W(t,i)},xt);function xt(){xt.__super.call(this)}var wt=function(i){function e(t){this._vScrollBar=null,this._hScrollBar=null,e.__super.call(this,t=void 0===t?"":t)}h(e,"laya.ui.TextArea",i);var t=e.prototype;return t.destroy=function(t){i.prototype.destroy.call(this,t=void 0===t?!0:t),this._vScrollBar&&this._vScrollBar.destroy(),this._hScrollBar&&this._hScrollBar.destroy(),this._vScrollBar=null,this._hScrollBar=null},t.initialize=function(){this.width=180,this.height=150,this._tf.wordWrap=!0,this.multiline=!0},t.onVBarChanged=function(t){this._tf.scrollY!=this._vScrollBar.value&&(this._tf.scrollY=this._vScrollBar.value)},t.onHBarChanged=function(t){this._tf.scrollX!=this._hScrollBar.value&&(this._tf.scrollX=this._hScrollBar.value)},t.changeScroll=function(){var t=this._vScrollBar&&0<this._tf.maxScrollY,i=this._hScrollBar&&0<this._tf.maxScrollX,e=t?this._width-this._vScrollBar.width:this._width,s=i?this._height-this._hScrollBar.height:this._height,n=this._tf.padding||z.labelPadding;this._tf.width=e,this._tf.height=s,this._vScrollBar&&(this._vScrollBar.x=this._width-this._vScrollBar.width-n[2],this._vScrollBar.y=n[1],this._vScrollBar.height=this._height-(i?this._hScrollBar.height:0)-n[1]-n[3],this._vScrollBar.scrollSize=1,this._vScrollBar.thumbPercent=s/Math.max(this._tf.textHeight,s),this._vScrollBar.setScroll(1,this._tf.maxScrollY,this._tf.scrollY),this._vScrollBar.visible=t),this._hScrollBar&&(this._hScrollBar.x=n[0],this._hScrollBar.y=this._height-this._hScrollBar.height-n[3],this._hScrollBar.width=this._width-(t?this._vScrollBar.width:0)-n[0]-n[2],this._hScrollBar.scrollSize=Math.max(.033*e,1),this._hScrollBar.thumbPercent=e/Math.max(this._tf.textWidth,e),this._hScrollBar.setScroll(0,this.maxScrollX,this.scrollX),this._hScrollBar.visible=i)},t.scrollTo=function(t){this.commitMeasure(),this._tf.scrollY=t},o(0,t,"scrollY",function(){return this._tf.scrollY}),o(0,t,"width",i.prototype._$get_width,function(t){g.superSet(ft,this,"width",t),this.callLater(this.changeScroll)}),o(0,t,"hScrollBar",function(){return this._hScrollBar}),o(0,t,"height",i.prototype._$get_height,function(t){g.superSet(ft,this,"height",t),this.callLater(this.changeScroll)}),o(0,t,"maxScrollX",function(){return this._tf.maxScrollX}),o(0,t,"vScrollBarSkin",function(){return this._vScrollBar?this._vScrollBar.skin:null},function(t){null==this._vScrollBar&&(this.addChild(this._vScrollBar=new _t),this._vScrollBar.on("change",this,this.onVBarChanged),this._vScrollBar.target=this._tf,this.callLater(this.changeScroll)),this._vScrollBar.skin=t}),o(0,t,"hScrollBarSkin",function(){return this._hScrollBar?this._hScrollBar.skin:null},function(t){null==this._hScrollBar&&(this.addChild(this._hScrollBar=new st),this._hScrollBar.on("change",this,this.onHBarChanged),this._hScrollBar.mouseWheelEnable=!1,this._hScrollBar.target=this._tf,this.callLater(this.changeScroll)),this._hScrollBar.skin=t}),o(0,t,"vScrollBar",function(){return this._vScrollBar}),o(0,t,"maxScrollY",function(){return this._tf.maxScrollY}),o(0,t,"scrollX",function(){return this._tf.scrollX}),e}(ft);!function(){function t(){this._uiView=null,this.isCloseOther=!1,t.__super.call(this)}h(t,"laya.ui.AsynDialog",mt);var i=t.prototype;i.createView=function(t){this._uiView=t},i._open=function(t,i,e){this.isModal=t,this.isCloseOther=i,mt.manager.lock(!0),this._uiView?this.onCreated():this.onOpen()},i.onCreated=function(){this.createUI(),this.onOpen()},i.createUI=function(){laya.ui.View.prototype.createView.call(this,this._uiView),this._uiView=null,this._dealDragArea()},i.onOpen=function(){mt.manager.open(this,this.isCloseOther),mt.manager.lock(!1)},i.close=function(t,i){void 0===i&&(i=!0),mt.manager.close(this),this.onClose()},i.onClose=function(){},i.destroy=function(t){void 0===t&&(t=!0),laya.ui.View.prototype.destroy.call(this,t),this._uiView=null,this.onDestroy()},i.onDestroy=function(){}}();g.__init([Z,t])}((window,document),Laya),"function"==typeof define&&define.amd&&define("laya.core",["require","exports"],function(t,i){"use strict";for(var e in Object.defineProperty(i,"__esModule",{value:!0}),Laya){var s=Laya[e];s&&s.__isclass&&(i[e]=s)}});