diff --git a/assets/main/index.0df91.js b/assets/main/index.0df91.js index e9f4aa5..be85ab5 100644 --- a/assets/main/index.0df91.js +++ b/assets/main/index.0df91.js @@ -1 +1,22139 @@ -window.__require=function t(e,o,n){function a(r,c){if(!o[r]){if(!e[r]){var s=r.split("/");if(s=s[s.length-1],!e[s]){var l="function"==typeof __require&&__require;if(!c&&l)return l(s,!0);if(i)return i(s,!0);throw new Error("Cannot find module '"+r+"'")}r=s}var u=o[r]={exports:{}};e[r][0].call(u.exports,function(t){return a(e[r][1][t]||t)},u,u.exports,t,e,o,n)}return o[r].exports}for(var i="function"==typeof __require&&__require,r=0;rnull==t,s=Symbol("encodeFragmentIdentifier");function l(t){switch(t.arrayFormat){case"index":return e=>(o,n)=>{const a=o.length;return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?o:null===n?[...o,[d(e,t),"[",a,"]"].join("")]:[...o,[d(e,t),"[",d(a,t),"]=",d(n,t)].join("")]};case"bracket":return e=>(o,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?o:null===n?[...o,[d(e,t),"[]"].join("")]:[...o,[d(e,t),"[]=",d(n,t)].join("")];case"colon-list-separator":return e=>(o,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?o:null===n?[...o,[d(e,t),":list="].join("")]:[...o,[d(e,t),":list=",d(n,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e="bracket-separator"===t.arrayFormat?"[]=":"=";return o=>(n,a)=>void 0===a||t.skipNull&&null===a||t.skipEmptyString&&""===a?n:(a=null===a?"":a,0===n.length?[[d(o,t),e,d(a,t)].join("")]:[[n,d(a,t)].join(t.arrayFormatSeparator)])}default:return e=>(o,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?o:null===n?[...o,d(e,t)]:[...o,[d(e,t),"=",d(n,t)].join("")]}}function u(t){let e;switch(t.arrayFormat){case"index":return(t,o,n)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===n[t]&&(n[t]={}),n[t][e[1]]=o):n[t]=o};case"bracket":return(t,o,n)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],o):n[t]=[o]:n[t]=o};case"colon-list-separator":return(t,o,n)=>{e=/(:list)$/.exec(t),t=t.replace(/:list$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],o):n[t]=[o]:n[t]=o};case"comma":case"separator":return(e,o,n)=>{const a="string"==typeof o&&o.includes(t.arrayFormatSeparator),i="string"==typeof o&&!a&&h(o,t).includes(t.arrayFormatSeparator);o=i?h(o,t):o;const r=a||i?o.split(t.arrayFormatSeparator).map(e=>h(e,t)):null===o?o:h(o,t);n[e]=r};case"bracket-separator":return(e,o,n)=>{const a=/(\[\])$/.test(e);if(e=e.replace(/\[\]$/,""),!a)return void(n[e]=o?h(o,t):o);const i=null===o?[]:o.split(t.arrayFormatSeparator).map(e=>h(e,t));void 0!==n[e]?n[e]=[].concat(n[e],i):n[e]=i};default:return(t,e,o)=>{void 0!==o[t]?o[t]=[].concat(o[t],e):o[t]=e}}}function p(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function d(t,e){return e.encode?e.strict?n(t):encodeURIComponent(t):t}function h(t,e){return e.decode?a(t):t}function f(t){return Array.isArray(t)?t.sort():"object"==typeof t?f(Object.keys(t)).sort((t,e)=>Number(t)-Number(e)).map(e=>t[e]):t}function m(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function g(t){let e="";const o=t.indexOf("#");return-1!==o&&(e=t.slice(o)),e}function y(t){const e=(t=m(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function v(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function b(t,e){p((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const o=u(e),n=Object.create(null);if("string"!=typeof t)return n;if(!(t=t.trim().replace(/^[?#&]/,"")))return n;for(const a of t.split("&")){if(""===a)continue;let[t,r]=i(e.decode?a.replace(/\+/g," "):a,"=");r=void 0===r?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?r:h(r,e),o(h(t,e),r,n)}for(const a of Object.keys(n)){const t=n[a];if("object"==typeof t&&null!==t)for(const o of Object.keys(t))t[o]=v(t[o],e);else n[a]=v(t,e)}return!1===e.sort?n:(!0===e.sort?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce((t,e)=>{const o=n[e];return Boolean(o)&&"object"==typeof o&&!Array.isArray(o)?t[e]=f(o):t[e]=o,t},Object.create(null))}o.extract=y,o.parse=b,o.stringify=(t,e)=>{if(!t)return"";p((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const o=o=>e.skipNull&&c(t[o])||e.skipEmptyString&&""===t[o],n=l(e),a={};for(const r of Object.keys(t))o(r)||(a[r]=t[r]);const i=Object.keys(a);return!1!==e.sort&&i.sort(e.sort),i.map(o=>{const a=t[o];return void 0===a?"":null===a?d(o,e):Array.isArray(a)?0===a.length&&"bracket-separator"===e.arrayFormat?d(o,e)+"[]":a.reduce(n(o),[]).join("&"):d(o,e)+"="+d(a,e)}).filter(t=>t.length>0).join("&")},o.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);const[o,n]=i(t,"#");return Object.assign({url:o.split("?")[0]||"",query:b(y(t),e)},e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:h(n,e)}:{})},o.stringifyUrl=(t,e)=>{e=Object.assign({encode:!0,strict:!0,[s]:!0},e);const n=m(t.url).split("?")[0]||"",a=o.extract(t.url),i=o.parse(a,{sort:!1}),r=Object.assign(i,t.query);let c=o.stringify(r,e);c&&(c=`?${c}`);let l=g(t.url);return t.fragmentIdentifier&&(l=`#${e[s]?d(t.fragmentIdentifier,e):t.fragmentIdentifier}`),`${n}${c}${l}`},o.pick=(t,e,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[s]:!1},n);const{url:a,query:i,fragmentIdentifier:c}=o.parseUrl(t,n);return o.stringifyUrl({url:a,query:r(i,e),fragmentIdentifier:c},n)},o.exclude=(t,e,n)=>{const a=Array.isArray(e)?t=>!e.includes(t):(t,o)=>!e(t,o);return o.pick(t,a,n)}},{"decode-uri-component":1,"filter-obj":2,"split-on-first":4,"strict-uri-encode":5}],4:[function(t,e){"use strict";e.exports=(t,e)=>{if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];const o=t.indexOf(e);return-1===o?[t]:[t.slice(0,o),t.slice(o+e.length)]}},{}],5:[function(t,e){"use strict";e.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)},{}],ApiTool:[function(t,e,o){"use strict";cc._RF.push(e,"b8fa1Acz1tD5ZSWCVi3x62F","ApiTool");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(o,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),Object.defineProperty(e,"instance",{get:function(){return this._instance||(this._instance=new e),this._instance},enumerable:!1,configurable:!0}),e._instance=null,e.avatar="",e.dailyAllNumber=0,e.dailywinNumber=0,e}(cc.Component);o.default=i,cc._RF.pop()},{}],BulletPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"36bd1+aRohPD6vyVZmmE1za","BulletPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=t("../../script/manager/data-manager"),s=t("../../script/tools/str-utils"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.speed=0,e.contentLabel=null,e.header=null,e.border=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setupData=function(t){if(t){var e=t.content;if(e||(e="\u96c4\u8d77"),t.region&&1==t.type)e=t.region+t.content;else if(2==t.type)if(c.default.rankUserInfo)(o=c.default.rankUserInfo.fail)&&0!=o||(o=1),e=s.default.formatStr(t.content,o);else{var o=r.default.randomNum(1,50);e=s.default.formatStr(t.content,o)}this.contentLabel.string=e,1==t.state?this.contentLabel.node.color=new cc.Color(255,246,0):this.contentLabel.node.color=new cc.Color(255,255,255),r.default.setAvatar(this.header,t.avatar),t.isSelf?this.border.active=!0:this.border.active=!1}},i([p({type:cc.Label,tooltip:"\u5185\u5bb9"})],e.prototype,"contentLabel",void 0),i([p({type:cc.Node,tooltip:"\u5934\u50cf"})],e.prototype,"header",void 0),i([p({type:cc.Node,tooltip:"\u8fb9\u6846"})],e.prototype,"border",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/manager/data-manager":"data-manager","../../script/tools/str-utils":"str-utils"}],CcJsFunc:[function(t,e,o){"use strict";cc._RF.push(e,"3f1d9y5Ey5CfqFDLJVTW6yo","CcJsFunc"),Object.defineProperty(o,"__esModule",{value:!0});var n=t("../effect/player-head-atlas"),a=t("./native/audio"),i=t("./sdk"),r=function(){function t(){}return t.shuffle=function(t){for(var e=t.length-1;e>=0;e--){var o=Math.floor(Math.random()*(e+1)),n=t[o];t[o]=t[e],t[e]=n}return t},t.addClickAudio=function(){a.default.playAudioMusic("audio/sound/clickBlock.mp3",!1),i.default.vibrateShort()},t.addbtnTouchStartScale=function(t,e){t.on("touchstart",function(){this.addClickAudio(),cc.tween(t).to(.1,{scale:.9}).start(),e&&e()},this)},t.addbtnTouchEndScale=function(t,e){t.on("touchend",function(o){cc.tween(t).to(.1,{scale:1}).start(),e&&(t.stopAllActions(),t.scale=1,e(o))},this)},t.addbtnTouchCancelScale=function(t,e){t.on("touchcancel",function(){cc.tween(t).to(.1,{scale:1}).start(),e&&e()},this)},t.addTargetTouchUpInside=function(t,e){t.on("touchstart",function(){this.addClickAudio(),cc.tween(t).to(.1,{scale:.9}).start()},this),t.on("touchcancel",function(){cc.tween(t).to(.1,{scale:1}).start()},this),t.on("touchend",function(o){cc.tween(t).to(.1,{scale:1}).start(),e&&(t.stopAllActions(),t.scale=1,e(o))},this)},t.addbtnTouchOriginStartScale=function(t,e){var o=.9,n=.9;t.scaleX<0&&(o=-o),t.scaleY<0&&(n=-n),t.on("touchstart",function(){this.addClickAudio(),cc.tween(t).to(.1,{scaleX:o,scaleY:n}).start(),e&&e()},this)},t.addbtnTouchOriginEndScale=function(t,e){var o=1,n=1;t.scaleX<0&&(o=-o),t.scaleY<0&&(n=-n),t.on("touchend",function(a){cc.tween(t).to(.1,{scaleX:o,scaleY:n}).start(),e&&(t.stopAllActions(),t.scaleX=o,t.scaleY=n,e(a))},this)},t.addbtnTouchOriginCancelScale=function(t,e){var o=1,n=1;t.scaleX<0&&(o=-o),t.scaleY<0&&(n=-n),t.on("touchcancel",function(){cc.tween(t).to(.1,{scaleX:o,scaleY:n}).start(),e&&e()},this)},t.setAnimation=function(t,e,o,n,a){var i=new cc.Node,r=(i.addComponent(cc.Sprite),i.addComponent(cc.Animation));return cc.loader.loadRes(t,cc.SpriteAtlas,function(t,i){if(e)for(var c=[],s=0;s=t.length?(o._loadResIndex=0,e()):o.loadResSpriteFrame(t,e)):cc.loader.loadRes(n,cc.SpriteFrame,function(a,i){a?cc.error("SpriteFrame\u52a0\u8f7d\u9519\u8bef, \u8282\u70b9\u540d: , url: "+n):(o._spriteFrameCache[n]=i,o._loadResIndex++,o._loadResIndex>=t.length?(o._loadResIndex=0,e()):o.loadResSpriteFrame(t,e))})},t.getUrlSpriteFrame=function(t){return this._spriteFrameCache[t]||!1},t.sliceURL=function(t){return/.+(?=\.png)/i.exec(t)[0].slice(10)},t.playFontAnimation=function(t,e,o,n){var a={num:e},i=t.getComponent(cc.Label);cc.tween(t).to(.05,{scale:1.3}).to(.05,{scale:1}).to(.05,{scale:1.3}).to(.05,{scale:1}).repeat(10).start(),i.string=a.num+"";var r=o-e<10?.3:(o-e)/10*.3;r>1&&(r=1),cc.tween(a).to(r,{num:o},{progress:function(t,e,o,a){return i.string=n?n+Math.ceil(t+(e-t)*a)+"":Math.ceil(t+(e-t)*a)+"",t+(e-t)*a}}).call(function(){t.stopAllActions(),t.scale=1}).start()},t.loadWxHeadImgSpriteFrame=function(t,e,o,n,a,i){var r=this;o=o||function(){},this._spriteFrameCache||(this._spriteFrameCache={});var c=t.getComponent(cc.Sprite);c.pp_url=e;var s=this._spriteFrameCache[e];if(s)return c.spriteFrame=s,void o();n&&(c.spriteFrame=null);var l={url:e};cc.loader.load(l,function(t,n){if(t)cc.error("SpriteFrame\u52a0\u8f7d\u9519\u8bef, \u8282\u70b9\u540d: "+c.node.name+", url: "+e);else{var a=new cc.SpriteFrame(n);i instanceof Array&&(a.insetTop=i[0]||0,a.insetBottom=i[1]||0,a.insetLeft=i[2]||0,a.insetRight=i[3]||0),r._spriteFrameCache[e]=a,c.pp_url===e&&(c.spriteFrame=a,o())}})},t.changeWXHeadImgSize=function(t,e){for(var o=t.split("/"),n="",a=0;a=e||t<0?"Jan":e[t]},t.ifHaveNode=function(t,e,o){return t||(t=cc.instantiate(e),o.addChild(t)),t},t.setAvatar=function(t,e,o){var a=this;if(t){var r=t.getComponent(cc.Sprite);if(!e||0==e.length){var c="rank/rank_icon_default.png";return i.default.isPlatform(i.Platform.wx)&&(c="rank/rank_icon_default_wx.png"),void cc.loader.loadRes(c,cc.SpriteFrame,function(t,e){t?console.log("avatar err = "+t):r.spriteFrame=e})}cc.assetManager.loadRemote(e,{ext:".head"},function(e,i){if(o){var c=n.default.instance;cc.isValid(a)&&cc.isValid(t)&&cc.isValid(r)&&(r.spriteFrame=new cc.SpriteFrame(i),o&&!cc.sys.isNative&&c.packToDynamicAtlas(o,r,r.spriteFrame))}else i.packable=!1,r.spriteFrame=new cc.SpriteFrame(i)})}else console.log("setAvatar node \u4e3a\u7a7a")},t.removeAvatar=function(t){t&&t.length&&n.default.instance.deleteInnerTextureByPath(t)},t.setAvatarHolder=function(t,e,o){if(t){var n=t.getComponent(cc.Sprite);if(!e||0==e.length){var a="rank/rank_icon_default.png";return i.default.isPlatform(i.Platform.wx)&&(a="rank/rank_icon_default_wx.png"),o&&(a=o),void cc.loader.loadRes(a,cc.SpriteFrame,function(t,e){t?console.log("avatar err = "+t):n.spriteFrame=e})}}else console.log("setAvatar node \u4e3a\u7a7a")},t}();o.default=r,cc._RF.pop()},{"../effect/player-head-atlas":"player-head-atlas","./native/audio":"audio","./sdk":"sdk"}],CoinEmitterByTime:[function(t,e,o){"use strict";cc._RF.push(e,"d2234O7oOZOV7MTLWcEx96i","CoinEmitterByTime");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("./CoinEmitter"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tickTime=0,e.countMinPerTick=0,e.countMaxPerTick=0,e._timePassed=0,e._timeTick=0,e._timeEnd=0,e}return a(e,t),e.prototype.fire=function(t,e,o){void 0===e&&(e=!1),this._timePassed=0,this._timeEnd=t,this._rndCur=0,this.newNode(e),this._cb=o},e.prototype.update=function(t){if(this._rndCur-a;){var s=o*(n+=.016666666666666666)*Math.sin(e)-this.G*n*n/2;i=s,c.push(s)}var l=new r.YPathCacheData(o,e,c);this._cachePaths.push(l),this._rndCur++}if(this._timePassed+=t,!(this._timePassed>=this._timeEnd)&&(this._timeTick+=t,this._timeTick>=this.tickTime)){this._timeTick=0;for(var u=this.randomInt(this.countMinPerTick,this.countMaxPerTick),p=0;p=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0}),o.CoinEmitter=o.YPathCacheData=void 0;var r=cc._decorator.ccclass,c=cc._decorator.property,s=cc._decorator.menu,l=function(t,e,o){this.v0=t,this.angle=e,this.path=o};o.YPathCacheData=l;var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.G=18e3,e.v0Min=11e3,e.v0Max=21e3,e.angleMin=20,e.angleMax=28,e.scaleStepMin=.065,e.scaleStepMax=.085,e.coinCount=50,e.xMoveStepMin=-18,e.xMoveStepMax=18,e.rotationStepMin=-1.3,e.rotationStepMax=1.3,e.bornOffsetXMin=1,e.bornOffsetXMax=-1,e.bornOffsetYMin=-10,e.bornOffsetYMax=0,e.bornScacle=.5,e.prefab=null,e._coinPool=new cc.NodePool,e._cachePaths=[],e._rndPathCount=100,e._rndCur=0,e._numFlying=0,e}return a(e,t),e.prototype.onLoad=function(){if(!(this._coinPool.size()>=70))for(var t=0;t<70;t++){var e=cc.instantiate(this.prefab);e&&this._coinPool.put(e)}},e.prototype.newNode=function(t){if(void 0===t&&(t=!1),t&&(this._coinPool.clear(),!(this._coinPool.size()>=70)))for(var e=0;e<70;e++){var o=cc.instantiate(this.prefab);o&&this._coinPool.put(o)}},e.prototype.fire=function(t,e,o){void 0===e&&(e=!1),console.log("push=>4"),this.newNode(e),t=t||this.coinCount,this._numFlying=t,this._cb=o;for(var n=0;n=this._rndPathCount)){for(var t=.017453293*this.randomInRange(this.angleMin,this.angleMax),e=this.randomInRange(this.v0Min,this.v0Max),o=0,n=2*cc.visibleRect.height,a=0,i=[];a>-n;){var r=e*(o+=.016666666666666666)*Math.sin(t)-this.G*o*o/2;a=r,i.push(r)}var c=new l(e,t,i);this._cachePaths.push(c),this._rndCur++}},e.prototype._resetNode=function(t){t.scale=0,t.angle=0,t.setPosition(0,0),t.stopAllActions(),this._coinPool.put(t),this._numFlying--,this._numFlying<=0&&this._cb&&this._cb()},e.prototype._runCoin=function(t){var e=this;t.getComponent(cc.Animation).play("",this.randomInRange(0,.7));var o=this.randomInArray(this._cachePaths).path;t.x=this.randomInRange(this.bornOffsetXMin,this.bornOffsetXMax),t.y=this.randomInRange(this.bornOffsetYMin,this.bornOffsetYMax);var n;n=t.x<=0?this.randomInRange(this.xMoveStepMin,0):this.randomInRange(0,this.xMoveStepMax);var a=this.randomInRange(this.rotationStepMin,this.rotationStepMax),i=this.randomInRange(this.scaleStepMin,this.scaleStepMax);t.scale=this.bornScacle;var r=0,c=function(){var s=o[r];r++,t.y=s,t.x+=n,t.scale+=i,t.angle+=a,r>=o.length&&(e._resetNode(t),e.unschedule(c))};this.schedule(c,1/60)},e.prototype.randomInRange=function(t,e){return t+(e-t)*Math.random()},e.prototype.randomInArray=function(t){return t[this.randomInt(0,t.length)]},e.prototype.randomInt=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t},i([c({type:cc.Integer,tooltip:"\u91cd\u529b\u52a0\u901f\u5ea6"})],e.prototype,"G",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5c0f\u521d\u901f\u5ea6"})],e.prototype,"v0Min",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5927\u521d\u901f\u5ea6"})],e.prototype,"v0Max",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5c0f\u89d2\u5ea6"})],e.prototype,"angleMin",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5927\u89d2\u5ea6"})],e.prototype,"angleMax",void 0),i([c({type:cc.Float,tooltip:"\u6700\u5c0f\u6bcf\u5e27\u7f29\u653e\u589e\u52a0"})],e.prototype,"scaleStepMin",void 0),i([c({type:cc.Float,tooltip:"\u6700\u5927\u6bcf\u5e27\u7f29\u653e\u589e\u52a0"})],e.prototype,"scaleStepMax",void 0),i([c({type:cc.Integer,tooltip:"\u91d1\u5e01\u6570\u91cf"})],e.prototype,"coinCount",void 0),i([c({type:cc.Integer,tooltip:"x\u8f74\u6bcf\u5e27\u6700\u5c0f\u504f\u79fb"})],e.prototype,"xMoveStepMin",void 0),i([c({type:cc.Integer,tooltip:"x\u8f74\u6bcf\u5e27\u6700\u5927\u504f\u79fb"})],e.prototype,"xMoveStepMax",void 0),i([c(cc.Integer)],e.prototype,"rotationStepMin",void 0),i([c(cc.Integer)],e.prototype,"rotationStepMax",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5c0f\u521d\u59cbx\u504f\u79fb"})],e.prototype,"bornOffsetXMin",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5927\u521d\u59cbx\u504f\u79fb"})],e.prototype,"bornOffsetXMax",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5c0f\u521d\u59cby\u504f\u79fb"})],e.prototype,"bornOffsetYMin",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5927\u521d\u59cby\u504f\u79fb"})],e.prototype,"bornOffsetYMax",void 0),i([c({type:cc.Float,tooltip:"\u521d\u59cb\u7f29\u653e"})],e.prototype,"bornScacle",void 0),i([c(cc.Prefab)],e.prototype,"prefab",void 0),i([r,s("gameModules/common/CoinEmitter")],e)}(cc.Component);o.CoinEmitter=u,cc._RF.pop()},{}],DateManager:[function(t,e,o){"use strict";cc._RF.push(e,"5f103B5zARLaI+1jRcCObQr","DateManager"),Object.defineProperty(o,"__esModule",{value:!0});var n=cc._decorator,a=(n.ccclass,n.property,t("../common/enumConfig")),i=function(){function t(){this.cutType=a.CALENDAR.MONTH;var t=new Date,e=t.getFullYear(),o=t.getMonth(),n=t.getDate();this.nowDate=new Date(e,o,n),this.selDate=new Date(e,o,n)}return t.getInstance=function(){return this.instance||(this.instance=new t),this.instance},t.prototype.isNowMonth=function(t){return this.nowDate.getFullYear()===this.selDate.getFullYear()&&this.nowDate.getMonth()===t},t.prototype.isNowDay=function(t){if(this.nowDate.getFullYear()===this.selDate.getFullYear()&&this.nowDate.getMonth()===this.selDate.getMonth()){if(this.nowDate.getDate()===t)return!0}else if(this.selDate.getDate()==t)return!0;return!1},t.prototype.isOldDay=function(t){if(this.selDate.getFullYear()==this.nowDate.getFullYear()){if(this.nowDate.getMonth()==this.selDate.getMonth()){if(t=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.closeBtn=null,e}return a(e,t),e.prototype.start=function(){c.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this))},e.prototype.closeBtnFunc=function(){this.node.active=!1,cc.game.emit("showPop",{popName:"todayRankPop",showPopData:{}})},e.prototype.showPop=function(){this.node.active=!0,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),r.default.getPersonalInfo(function(t){if(t&&t.data){var e=t.data.daily_count;s.default.updateFirendCount(e)}})},i([p(cc.Node)],e.prototype,"popNode",void 0),i([p(cc.Node)],e.prototype,"closeBtn",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs"}],FriendSubContextView:[function(t,e,o){"use strict";cc._RF.push(e,"ea1df8KK9tCd5m1ulIYJEp0","FriendSubContextView");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]1334||cc.winSize.height/cc.winSize.width>2)&&(this.globalData.isFullScreen=!0),console.log("isFullScreen",this.globalData.isFullScreen)},t.setGameType=function(e){t.getInstance().gameType=e},t.blacksInfo={blockCurCount:0,blockAllCount:0},t}();o.default=i,cc._RF.pop()},{"../common/enumConfig":"enumConfig"}],PersonalPop:[function(t,e,o){"use strict";cc._RF.push(e,"23eb4oYlzpNJ74t7y6B9QZ/","PersonalPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/sdk"),u=t("../common/spine"),p=t("../common/util"),d=t("../manager/data-manager"),h=t("../manager/DateManager"),f=cc._decorator,m=f.ccclass,g=f.property,y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.nickName=null,e.registerLabel=null,e.dailyName=null,e.topicName=null,e.dailyCount=null,e.topicCount=null,e.idLabel=null,e.joinName=null,e.joinTime=null,e.failLabel=null,e.failCount=null,e.sheepNameLabel=null,e.spNode=null,e.headerImage=null,e.closeBtn=null,e.saveBtn=null,e}return a(e,t),e.prototype.start=function(){c.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this)),c.default.addTargetTouchUpInside(this.saveBtn,this.saveBtnFunc.bind(this)),l.default.isPlatform(l.Platform.wx)||l.default.isPlatform(l.Platform.tt)?this.saveBtn.active=!0:this.saveBtn.active=!1,this.saveBtn.active=!1},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.saveBtnFunc=function(){},e.prototype.showPop=function(){this.node.active=!0;var t=this;this.joinTime.node.active=!1,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),r.default.getPersonalInfo(function(e){e&&e.data&&t.setupSubviews(e.data)})},e.prototype.setupSubviews=function(t){if(this.nickName.string=t.nick_name||"",this.idLabel.string="ID:"+t.uid,t.register_time){var e=(f=h.default.getInstance().formatTs(t.register_time))[0]+"\u5e74"+f[1]+"\u6708"+f[2]+"\u65e5";this.registerLabel.string="\u4e8e"+e+"\u8bde\u751f\n\u8fc4\u4eca\u4e3a\u6b62\u6311\u6218 "+t.challenge+" \u6b21"}else this.registerLabel.string="";this.dailyCount.string=t.daily_count,this.topicCount.string=t.topic_count;var o="",n="",a="";if(1==t.today_state){o="sheep/Sheeps",n="skin_00",a="Jump2";for(var i=s.default.getSheepClothesData(),r=0;r=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0}),o.PoolManager=void 0;var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.prefab=[],e.prefabMap={},e.poolMap={},e}var o;return a(e,t),o=e,e.prototype.onLoad=function(){o.instance=this;for(var t=0;t0?o.active=!0:(o=cc.instantiate(this.prefab[e])).active=!0,o}console.log("\u9884\u5236\u4f53\u4e0d\u5b58\u5728\u6216\u672a\u52a0\u8f7d\uff08\u672a\u62d6\u62fd\uff09")},e.prototype.put=function(t){t.active=!1,this.poolMap[t.name+"Pool"].put(t)},i([s(cc.Prefab)],e.prototype,"prefab",void 0),o=i([c],e)}(cc.Component);o.PoolManager=l,cc._RF.pop()},{}],PrivacyPolicy:[function(t,e,o){"use strict";cc._RF.push(e,"83b1cbmnjRKCqtOVxg1KAz1","PrivacyPolicy");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.label=null,e.text="hello",e}return a(e,t),e.prototype.start=function(){},i([s(cc.Node)],e.prototype,"label",void 0),i([s],e.prototype,"text",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],PrivacyUserPop:[function(t,e,o){"use strict";cc._RF.push(e,"2a225F7jMhPWpqoKwvcsBGP","PrivacyUserPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.privacyNode=null,e.userNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.privacyCloseBtnFunc=function(){this.node.active=!1},e.prototype.userCloseBtnFunc=function(){this.node.active=!1},e.prototype.showPop=function(t){this.node.active=!0,this.userNode.active=!1,this.privacyNode.active=!1,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),"user"==t.type?this.userNode.active=!0:this.privacyNode.active=!0},i([s(cc.Node)],e.prototype,"popNode",void 0),i([s(cc.Node)],e.prototype,"privacyNode",void 0),i([s(cc.Node)],e.prototype,"userNode",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],ScrollMsg:[function(t,e,o){"use strict";cc._RF.push(e,"0e6eb07gOpDPqlpg49sZaei","ScrollMsg");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r,c=cc._decorator,s=c.ccclass,l=c.property;(function(t){t[t.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",t[t.RIGHT_TO_LEFT=2]="RIGHT_TO_LEFT"})(r||(r={}));var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.label=null,e.maskNode=null,e.m_speed=100,e.m_xLeftEnd=0,e.m_xRightEnd=0,e.m_yPos=0,e.m_direction=r.LEFT_TO_RIGHT,e}return a(e,t),e.prototype.start=function(){},e.prototype.showMsg=function(t){this.label.string=t.msg,this.m_xRightEnd=this.node.x+this.maskNode.node.width*this.maskNode.node.anchorX,this.m_xLeftEnd=this.node.x-this.maskNode.node.width*this.maskNode.node.anchorX;var e,o=this.label.node.getContentSize();e=this.m_direction===r.LEFT_TO_RIGHT?this.m_xLeftEnd-o.width:this.m_xRightEnd,this.label.node.x=e,this.label.node.y=this.m_yPos},e.prototype.update=function(t){if(this.m_direction===r.LEFT_TO_RIGHT){var e=this.label.node.getContentSize();this.label.node.x>=this.m_xRightEnd&&(this.label.node.x=this.m_xLeftEnd-e.width),this.label.node.x+=this.m_speed*t}else e=this.label.node.getContentSize(),this.label.node.x<=this.m_xLeftEnd-e.width&&(this.label.node.x=this.m_xRightEnd),this.label.node.x-=this.m_speed*t},i([l(cc.Label)],e.prototype,"label",void 0),i([l(cc.Mask)],e.prototype,"maskNode",void 0),i([l({tooltip:"\u6bcf\u79d2\u79fb\u52a8\u591a\u5c11\u50cf\u7d20"})],e.prototype,"m_speed",void 0),i([l({tooltip:"\u6587\u5b57\u6eda\u52a8\u7684\u65b9\u5411\uff0c1\u662f\u4ece\u5de6\u5230\u53f3\uff0c2\u662f\u4ece\u53f3\u5230\u5de6"})],e.prototype,"m_direction",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{}],SpriteWithMaskAssembler:[function(t,e,o){"use strict";cc._RF.push(e,"6b309k9JDND+5aP2ebiAdxw","SpriteWithMaskAssembler");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(o,"__esModule",{value:!0}),o.getSpriteWithMaskAssembler=void 0,o.getSpriteWithMaskAssembler=function(){var t=cc.gfx;return new(function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return a(o,e),Object.defineProperty(o.prototype,"floatsPerVert",{get:function(){return 7},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"colorOffset",{get:function(){return 6},enumerable:!1,configurable:!0}),o.prototype.getVfmt=function(){return o.vfmtPosTowUvColor},o.prototype.getBuffer=function(){if(!o.meshBuffer){var t=cc.renderer._handle;t._SpriteWithMaskBuffer&&console.error("\u7adf\u7136\u5df2\u7ecf\u5b58\u5728 _SpriteWithMaskBuffer \u5bf9\u8c61\u4e86, \u8fd9\u53ef\u80fd\u662f\u4e2a\u4e25\u91cd\u7684 bug!"),o.meshBuffer=t.getBuffer("mesh",this.getVfmt())}return o.meshBuffer},o.prototype.updateRenderData=function(t){this.packToDynamicAtlas(t,t._spriteFrame),t._vertsDirty&&(this.updateUVs(t),this.updateVerts(t),t._vertsDirty=!1)},o.prototype.updateUVs=function(t){for(var e=t._spriteFrame.uv,n=this.uvOffset,a=this.floatsPerVert,i=this._renderData.vDatas[0],r=0;r<4;r++){var c=2*r,s=a*r+n;i[s]=e[c],i[s+1]=e[c+1],i[s+2]=o.uv2[c],i[s+3]=o.uv2[c+1]}},o.prototype.updateVerts=function(t){var e,o,n,a,i=t.node,r=i.width,c=i.height,s=i.anchorX*r,l=i.anchorY*c;if(t.trim)e=-s,o=-l,n=r-s,a=c-l;else{var u=t.spriteFrame,p=u._originalSize.width,d=u._originalSize.height,h=u._rect.width,f=u._rect.height,m=u._offset,g=r/p,y=c/d,v=m.x+(p-h)/2,b=m.x-(p-h)/2;e=v*g-s,o=(m.y+(d-f)/2)*y-l,n=r+b*g-s,a=c+(m.y-(d-f)/2)*y-l}var _=this._local;_[0]=e,_[1]=o,_[2]=n,_[3]=a,this.updateWorldVerts(t)},o.vfmtPosTowUvColor=new t.VertexFormat([{name:t.ATTR_POSITION,type:t.ATTR_TYPE_FLOAT32,num:2},{name:t.ATTR_UV0,type:t.ATTR_TYPE_FLOAT32,num:4},{name:t.ATTR_COLOR,type:t.ATTR_TYPE_UINT8,num:4,normalize:!0}]),o.uv2=[0,1,1,1,0,0,1,0],o}(cc.Assembler2D))},cc._RF.pop()},{}],SpriteWithMask:[function(t,e,o){"use strict";cc._RF.push(e,"16615oSi4lB+Y7u7Tdx2332","SpriteWithMask");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0}),o.SpriteWithMask=void 0;var r=t("./SpriteWithMaskAssembler"),c=cc._decorator,s=c.ccclass,l=(c.property,c.menu),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.onLoad=function(){var e;null===(e=t.prototype.onLoad)||void 0===e||e.call(this),this.type,cc.Sprite.Type.SIMPLE},e.prototype._resetAssembler=function(){this.setVertsDirty(),this._assembler=r.getSpriteWithMaskAssembler(),this._assembler.init(this)},i([s(),l("2D/SpriteWithMask")],e)}(cc.Sprite);o.SpriteWithMask=u,cc._RF.pop()},{"./SpriteWithMaskAssembler":"SpriteWithMaskAssembler"}],TodayRankPop:[function(t,e,o){"use strict";cc._RF.push(e,"3c9ecBLnyBEtad8HHAyJf0H","TodayRankPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.closeBtn=null,e.friendBtn=null,e.shareBtn=null,e}return a(e,t),e.prototype.start=function(){c.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this)),c.default.addTargetTouchUpInside(this.friendBtn,this.friendBtnFunc.bind(this)),c.default.addTargetTouchUpInside(this.shareBtn,this.shareBtnFunc.bind(this))},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.friendBtnFunc=function(){this.node.active=!1,console.log("\u597d\u53cb\u6392\u884c\u699c"),cc.game.emit("showPop",{popName:"friendRankPop",showPopData:{}})},e.prototype.shareBtnFunc=function(){console.log("\u5206\u4eab\u670b\u53cb\u5708")},e.prototype.showPop=function(){this.node.active=!0,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),r.default.getUserRankInfo(function(t){if(0==t.err_code&&t.data&&t.data.user){var e=t.data.user.fail,o=t.data.user.state;1==o?s.default.updateTodayCount(o,"win"):s.default.updateTodayCount(e,"fail")}},function(){console.log("###### fail ######"),s.default.updateTodayCount(0,"fail")})},i([p(cc.Node)],e.prototype,"popNode",void 0),i([p(cc.Node)],e.prototype,"closeBtn",void 0),i([p(cc.Node)],e.prototype,"friendBtn",void 0),i([p(cc.Node)],e.prototype,"shareBtn",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs"}],TodaySubContextView:[function(t,e,o){"use strict";cc._RF.push(e,"6f5a44uIwZLR54OKfk5cZc9","TodaySubContextView");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=1063?qg.login().then(function(e){console.log(e),e.data.token?(console.log("\u5f53\u524d\u7528\u6237\u4fe1\u606f: "+JSON.stringify(e)),e.data&&l.default.post({url:"/sheep/v1/user/login_vivos",data:{token:e.data.token},success:function(e){if(t(),console.log("login_vivos res: ",JSON.stringify(e)),0==e.err_code&&e.data){console.log("res.data.uid: ",e.data.uid);var o=c.default.getUserData();o.userID=e.data.uid+"",o.openid=e.data.openid,o.token=e.data.token,c.default.saveUserData(o),u.default.user.uid=Number(o.userID),console.log("userData: ",o.userID)}},fail:function(){t()}})):t()},function(e){console.log("\u767b\u5f55\u5931\u8d25"+JSON.stringify(e)),t()}):t()})},e.requestUserInfo=function(){return i(this,void 0,Promise,function(){return r(this,function(){return[2,new Promise(function(t){l.default.get({url:"/sheep/v1/game/user_info",params:{uid:c.default.getUserData().userID},success:function(e){t(),console.log("user_info res: ",JSON.stringify(e)),0==e.err_code&&e.data&&(u.default.user.uid=e.data.uid,u.default.user.avatar=e.data.avatar,u.default.user.gender=e.data.gender,u.default.user.openId=e.data.openId,cc.game.emit(s.EMITKEY.USERINFOSUCCESS))},fail:function(){t()}})})]})})},e.requestRankUserInfo=function(){return i(this,void 0,Promise,function(){return r(this,function(){return[2,new Promise(function(t){l.default.get({url:"/sheep/v1/game/user_rank_info",params:{uid:c.default.getUserData().userID},success:function(e){t(),console.log("\u83b7\u53d6\u6392\u884c\u7528\u6237\u4fe1\u606f ### = ",JSON.stringify(e)),0==e.err_code&&e.data&&e.data.user&&(u.default.rankUserInfo=e.data.user,u.default.region=e.data.region,console.log("\u83b7\u53d6\u6392\u884c\u7528\u6237\u4fe1\u606f rankUserInfo ### = ",JSON.stringify(u.default.rankUserInfo)),cc.game.emit(s.EMITKEY.RANKUSERINFOSUCCESS))},fail:function(e){console.log("\u83b7\u53d6\u6392\u884c\u7528\u6237\u4fe1\u606f err = ",e),t()}})})]})})},e.getUserRankInfo=function(t,e){l.default.get({url:"/sheep/v1/game/user_rank_info",params:{uid:c.default.getUserData().userID},success:function(o){0==o.err_code?t&&t(o):(console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25"),e&&e())},fail:function(){e&&e()}})},e.getBulletData=function(t){l.default.get({url:"/sheep/v1/game/get_bullet",success:function(e){0==e.err_code?t&&t(e.data):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")}})},e.getRankInfoData=function(t){l.default.get({url:"/sheep/v1/game/rank_info",success:function(e){0==e.err_code?t&&t(e):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")},fail:function(){}})},e.getStageInfoData=function(t){l.default.get({url:"/sheep/v1/game/rank_stage_info",success:function(e){console.log("state_info result = "+JSON.stringify(e)),0==e.err_code?t&&t(e):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")},fail:function(){}})},e.gameOver=function(t,e){l.default.get({url:"/sheep/v1/game/game_over",params:t,success:function(t){console.log("game_over result = "+JSON.stringify(t)),0==t.err_code&&e&&e(t)}})},e.getTopicData=function(t){return i(this,void 0,Promise,function(){return r(this,function(){return[2,new Promise(function(e){l.default.get({url:"/sheep/v1/game/get_topic",params:{uid:c.default.getUserData().userID},success:function(o){e(),console.log("get_topic ### = ",JSON.stringify(o)),0==o.err_code&&(u.default.topicModel=o.data,t&&t(o),cc.game.emit(s.EMITKEY.TOPICACCOUNT))},fail:function(){e()}})})]})})},e.joinTopic=function(t,e){l.default.get({url:"/sheep/v1/game/topic_join",params:t,success:function(t){console.log("topic_join ### = ",JSON.stringify(t)),0==t.err_code&&e&&e(t)},fail:function(t){console.log("topic_join err = ",t)}})},e.topicGameOver=function(t,e){l.default.get({url:"/sheep/v1/game/topic_game_over",params:t,success:function(t){console.log("game_over result = "+JSON.stringify(t)),0==t.err_code&&e&&e(t)}})},e.topicRankInfo=function(t){return i(this,void 0,Promise,function(){return r(this,function(){return[2,new Promise(function(e){l.default.get({url:"/sheep/v1/game/topic_rank",params:{},success:function(o){e(),0==o.err_code&&(u.default.topicRankInfo=o.data,t&&t(o),cc.game.emit(s.EMITKEY.TOPICRANKINFO))},fail:function(){e()}})})]})})},e.getTopicUserInfo=function(t,e){l.default.get({url:"/sheep/v1/game/topic_user_info",params:{uid:t},success:function(t){0==t.err_code?e&&e(t):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")},fail:function(){}})},e.getMatchResult=function(t,e){l.default.get({url:"/sheep/v1/game/topic_match_info",params:{type:t,uid:c.default.getUserData().userID},success:function(t){0==t.err_code?e&&e(t):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")},fail:function(){}})},e.updateUserSkin=function(t,e){l.default.get({url:"/sheep/v1/game/update_user_skin",params:{skin:t},success:function(t){0==t.err_code?e&&e(t):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")},fail:function(){}})},e.getPersonalInfo=function(t){l.default.get({url:"/sheep/v1/game/personal_info",params:{},success:function(e){0==e.err_code?t&&t(e):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")},fail:function(){}})},e}(cc.Component);o.default=p,cc._RF.pop()},{"../../script/manager/data-manager":"data-manager","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/sdk":"sdk"}],audio:[function(t,e,o){"use strict";cc._RF.push(e,"3d3f9s4k+9DLLd0qVZ7eBqp","audio"),Object.defineProperty(o,"__esModule",{value:!0});var n=t("../../manager/GameManager"),a=t("../dataTs"),i=t("../enumConfig"),r=function(){function t(){}return t.updateAudioStatus=function(){this._playingMusicName&&this.playAudioMusic(this._playingMusicName,!0)},t.playBGM=function(){if(this.setupData=a.default.getUserSetupData(),console.log(this.setupData.musicStatus),this.setupData.musicStatus<0)cc.audioEngine.stopAll();else{var e="audio/music/game_cycle.mp3";n.default.getInstance().gameType==i.GAMETYPE.GAMEMAIN?e="audio/music/main_music.mp3":n.default.getInstance().gameType==i.GAMETYPE.GAMEDAILY?e="audio/music/game_cycle.mp3":n.default.getInstance().gameType==i.GAMETYPE.GAMETOMB?e="audio/music/game_cycle.mp3":n.default.getInstance().gameType==i.GAMETYPE.GAMETOPIC&&(e="audio/music/game_cycle.mp3"),console.log("\u97f3\u4e50 ###### = ",e),console.log("gameType ###### = ",n.default.getInstance().gameType),t.playAudioMusic(e,!0)}},t.playAudioMusic=function(t,e){this.setupData=a.default.getUserSetupData();var o=this,n=null;this._bgMusicClip||(this._bgMusicClip={}),this._audioClip||(this._audioClip={}),this._playingMusicName||(this._playingMusicName=""),this.setupData.musicStatus<0&&e?cc.audioEngine.stopAll():this.setupData.effectStatus<0&&!e||(e?(this._playingMusicName==t&&console.log("\u540c\u4e00\u4e2a\u97f3\u4e50"),cc.audioEngine.stopAll(),n=!!this._bgMusicClip&&this._bgMusicClip[t],this._playingMusicName=t):n=!!this._audioClip&&this._audioClip[t],n?e?cc.audioEngine.playMusic(n,e):cc.audioEngine.playEffect(n,!1):o.loadPlayAudioEngine(t,e,function(t){var n=null;e?o._playingMusicName==t&&(n=o._bgMusicClip[t],cc.audioEngine.playMusic(n,e)):(n=o._audioClip[t],cc.audioEngine.playEffect(n,!1))}))},t.resumeAllAudio=function(e){var o=this._playingMusicName,n=!!this._bgMusicClip&&this._bgMusicClip[o];n?(cc.audioEngine.stopAll(),cc.audioEngine.play(n,!0,1)):e&&t.playAudioMusic(e,!0)},t.loadPlayAudioEngine=function(t,e,o){o=o||function(){};var n=this;cc.loader.loadRes(t,function(a,i){a||(e?n._bgMusicClip[t]=i:n._audioClip[t]=i,o(t))})},t.audioLocalName="audioLocal",t._bgMusicClip={},t._playingMusicName="",t._audioClip={},t.setupData=null,t}();o.default=r,cc._RF.pop()},{"../../manager/GameManager":"GameManager","../dataTs":"dataTs","../enumConfig":"enumConfig"}],blockArea:[function(t,e,o){"use strict";cc._RF.push(e,"abca32Q32NKQIkl20gPemwL","blockArea");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.blockEditorPrefab=null,e}return a(e,t),e.prototype.start=function(){},i([s(cc.Prefab)],e.prototype,"blockEditorPrefab",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],blockEditorPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"5c0a1NoiWZPf7dwBgQqTPdJ","blockEditorPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.layerNumber=null,e.blockImg=null,e.moldTypeText=null,e.rolNum=0,e.rowNum=0,e.layerIndex=0,e.moldType=0,e.deleteCallback=null,e}return a(e,t),e.prototype.start=function(){this.node.on(cc.Node.EventType.TOUCH_END,this.deleteBlock,this)},e.prototype.setBlockLayerNum=function(t,e,o,n,a){this.rolNum=t,this.rowNum=e,this.layerIndex=o,this.moldType=n,2==this.moldType?this.moldTypeText.active=!0:this.moldTypeText.active=!1,this.deleteCallback=a,this.layerNumber.node.active=!0,this.layerNumber.string=""+this.layerIndex},e.prototype.setBlockImgType=function(t,e){if(this.moldType=e,2==this.moldType?this.moldTypeText.active=!0:this.moldTypeText.active=!1,0==t)this.blockImg.active=!1;else{this.blockImg.active=!0;var o="block/block_"+t+".png";r.default.changeSpriteFrame(this.blockImg,o)}},e.prototype.deleteBlock=function(){this.deleteCallback&&this.deleteCallback(this.rolNum,this.rowNum,this.layerIndex)},i([l(cc.Label)],e.prototype,"layerNumber",void 0),i([l(cc.Node)],e.prototype,"blockImg",void 0),i([l(cc.Node)],e.prototype,"moldTypeText",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc"}],blockPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"163e04v/WJMCIjkhalOEqNm","blockPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=t("../../script/common/enumConfig"),s=t("../../script/common/native/audio"),l=t("../../script/common/sdk"),u=t("../../script/common/util"),p=t("../../script/manager/data-manager"),d=t("../../script/manager/GameManager"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.blockImgBg=null,e.blockImg=null,e.blackMaskNode=null,e.rollAreaNode=null,e.rollContent=null,e.rollBlockNode=null,e.isShowLight=!1,e.isChoosed=!1,e.cardDataObj=null,e.newScale=1,e.touchCallback=null,e.isRotating=!1,e.circleCenter=cc.v2(0,0),e.circleRadius=0,e.circleRadiusMax=250,e.circleRadiusMin=250,e.addCircleLength=3,e.subCircleLength=-10,e.nowMoveInTimes=0,e.moveInTimes=15,e.rotationTimes=80,e.radian=0,e.radianMin=0,e.radianAdd=0,e.addRadianOnce=0,e.rotateParentComp=null,e.rotateOldPosition=null,e.touchCancelCallback=null,e}return a(e,t),e.prototype.onLoad=function(){},e.prototype.start=function(){this.node.on("touchstart",this.touchStart,this),this.node.on("touchend",this.touchEnd,this),this.node.on("touchcancel",this.touchCancel,this)},e.prototype.addBlockNode=function(t,e,o){this.isChoosed=!0,this.isShowLight=!0,this.blackMaskNode.active=!1,this.cardDataObj=t,this.touchCallback=e,this.touchCancelCallback=o||function(){},this.newScale=this.node.scale;var n=this.getBlockName(this.cardDataObj.type);r.default.changeSpriteFrame(this.blockImg,n),2==this.cardDataObj.moldType&&(this.blockImg.active=!1)},e.prototype.getBlockName=function(t){var e="block/block_"+t+".png";return p.default.topicModel&&d.default.getInstance().gameType==c.GAMETYPE.GAMETOPIC&&(1==p.default.topicModel.id?e="block/zombie/block_"+t+".png":2==p.default.topicModel.id?e="block/werewolf/block_"+t+".png":3==p.default.topicModel.id?e="block/man/block_"+t+".png":4==p.default.topicModel.id?e="block/autumn/block_"+t+".png":5==p.default.topicModel.id?e="block/teacher/block_"+t+".png":6==p.default.topicModel.id?e="block/autumn/block_"+t+".png":7==p.default.topicModel.id&&(e="block/teacher/block_"+t+".png")),e},e.prototype.getType=function(){return this.cardDataObj.type},e.prototype.getCardObj=function(){var t=!0;return this.isShowLight&&!this.isChoosed||(t=!1),{cardDataObj:this.cardDataObj,isCanMove:t}},e.prototype.updateBlockNodeData=function(t,e,o){this.isChoosed=!0,this.isShowLight=!0,this.blackMaskNode.active=!1,this.cardDataObj=t,this.touchCallback=e,this.newScale=this.node.scale,this.touchCancelCallback=o||function(){}},e.prototype.touchStart=function(t){t.stopPropagation(),this.isShowLight&&!this.isChoosed&&(l.default.vibrateShort(),this.newScale=this.node.scale,cc.game.emit(c.EMITKEY.SHOWMASKLAYER,2),s.default.playAudioMusic("audio/sound/clickBlock.mp3",!1),cc.tween(this.node).to(.1,{scale:1.4*this.newScale}).start(),this.node.setSiblingIndex(1e4))},e.prototype.touchEnd=function(t){t.stopPropagation(),this.isShowLight&&!this.isChoosed&&(cc.game.emit(c.EMITKEY.HIDEMASKLAYER,1),this.touchCallback&&this.touchCallback(this))},e.prototype.touchCancel=function(t){t.stopPropagation(),this.isShowLight&&!this.isChoosed&&(cc.game.emit(c.EMITKEY.HIDEMASKLAYER,6),cc.tween(this.node).to(.1,{scale:this.newScale}).start(),this.touchCancelCallback&&this.touchCancelCallback())},e.prototype.playRandomBlockAnimate=function(){if(2==this.cardDataObj.moldType&&this.isShowLight){var t=this;s.default.playAudioMusic("audio/sound/blockRandom.mp3",!1);var e=this.cardDataObj.type;this.rollAreaNode.active=!0;for(var o=[],n=[],a=0;a<12;a++){var i=u.default.rnd(1,8);o.push(i)}o.push(e);var c=u.default.rnd(1,8);o.push(c);var l=.5*(12*this.rollBlockNode.height+200);this.rollContent.y=l,this.rollContent.scale=.5;for(var p=0;pthis.rotationTimes+this.moveInTimes)return this.unschedule(this.circleMove),void this.moveOldPosition();this.circleRadius0?n>=0?Math.atan(i):2*Math.PI-Math.atan(i):n>=0?Math.PI-Math.atan(i):Math.PI+Math.atan(i)}else a=n>0?Math.PI/2:-Math.PI/2;return 180*a/Math.PI},i([m(cc.Node)],e.prototype,"blockImgBg",void 0),i([m(cc.Node)],e.prototype,"blockImg",void 0),i([m(cc.Node)],e.prototype,"blackMaskNode",void 0),i([m(cc.Node)],e.prototype,"rollAreaNode",void 0),i([m(cc.Node)],e.prototype,"rollContent",void 0),i([m(cc.Node)],e.prototype,"rollBlockNode",void 0),i([m(cc.Node)],e.prototype,"isShowLight",void 0),i([f],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/common/enumConfig":"enumConfig","../../script/common/native/audio":"audio","../../script/common/sdk":"sdk","../../script/common/util":"util","../../script/manager/GameManager":"GameManager","../../script/manager/data-manager":"data-manager"}],brickPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"713faAfsa9BN4dPx/ixKnJX","brickPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../itemSub/brickSubPrefab"),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.content=null,e.brickSubPrefab=null,e.base_title_label=null,e.parentNode=null,e.nodeData=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setNodeData=function(t,e){for(var o in this.parentNode=e,this.nodeData=t,this.base_title_label.string="- "+this.nodeData.name+" -",this.nodeData.brickArr){var n=cc.instantiate(this.brickSubPrefab);n.getComponent(l.default).setNodeData(this.nodeData.brickArr[o],this),this.content.addChild(n)}},e.prototype.refreshNode=function(t,e){this.parentNode=e,this.nodeData=t;var o=this.content.children;for(var n in o)o[n].getComponent(l.default).setNodeData(this.nodeData.brickArr[n],this)},i([s(cc.Node)],e.prototype,"content",void 0),i([s(cc.Prefab)],e.prototype,"brickSubPrefab",void 0),i([s(cc.Label)],e.prototype,"base_title_label",void 0),i([c],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../itemSub/brickSubPrefab":"brickSubPrefab"}],brickSubPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"d9565mv5uxJ9q8a8EOWqngx","brickSubPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=t("../../script/manager/GameManager"),s=cc._decorator,l=s.ccclass,u=s.property,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.imgContent=null,e.imgContentSub=null,e.imgLock=null,e.nodeData=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.node,this.clickNodeAction.bind(this))},e.prototype.clickNodeAction=function(){r.default.addClickAudio()},e.prototype.rewardNodeData=function(t){this.imgLock.active=!1,this.imgContent.active=!0;var e="block/block_"+t+".png";r.default.changeSpriteFrame(this.imgContentSub,e),this.imgContent.getChildByName("mark").active=!1},e.prototype.setNodeData=function(t){this.nodeData=t;var e="block/block_"+t.itemId+".png";r.default.changeSpriteFrame(this.imgContentSub,e),1==t.unlock?(this.imgContent.active=!0,this.imgLock.active=!1):(this.imgContent.active=!1,this.imgLock.active=!0),c.default.getInstance().collectionMark.brickNum==t.itemId?(this.imgContent.getChildByName("mark").active=!0,c.default.getInstance().collectionMark.brickNum=0):this.imgContent.getChildByName("mark").active=!1},i([u(cc.Node)],e.prototype,"imgContent",void 0),i([u(cc.Node)],e.prototype,"imgContentSub",void 0),i([u(cc.Node)],e.prototype,"imgLock",void 0),i([l],e)}(cc.Component);o.default=p,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/manager/GameManager":"GameManager"}],brickSv:[function(t,e,o){"use strict";cc._RF.push(e,"0fd69rlRCBO6pXp78mPsOUw","brickSv");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../../common/dataTs"),u=t("../../../pre/item/brickPrefab"),p=t("../../../i18n/i18n"),d=t("../../../i18n/gd_language"),h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.content=null,e.brickPrefab=null,e.pictureData=null,e.dataArray=[],e}return a(e,t),e.prototype.start=function(){for(var t in this.content.removeAllChildren(),this.parserData(),this.dataArray){var e=cc.instantiate(this.brickPrefab);e.getComponent(u.default).setNodeData(this.dataArray[t],this),this.content.addChild(e)}},e.prototype.onEnable=function(){this.dataArray.length>0&&this.refreshSubNode()},e.prototype.parserData=function(){this.pictureData=l.default.getPictureData();var t=l.default.gameConfigData.baseConfigData.pictureData.brickMaxNum,e=this.pictureData.brickNum;e>=t&&(e=t);var o=[];this.dataArray=[];for(var n=0;ne-1?0:1;if(o.push({itemId:n+1,unlock:a}),o.length>=5||n==t-1){for(var i=5-o.length,r=0;r=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../../script/manager/data-manager"),s=t("../tools/str-utils"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.bgSprite=null,e.descNode=null,e.clickBtn=null,e.failSF=null,e.winSF=null,e.showData=null,e.callback=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.clickBtn,this.clickBtnFunc.bind(this))},e.prototype.clickBtnFunc=function(){if(this.callback){var t=this.showData.data;this.callback(t)}},e.prototype.showSubData=function(t,e){this.showData=t,this.callback=e;var o=t.data,n=o.content;if(c.default.region&&1==o.type)n=c.default.region+o.content;else if(2==o.type&&c.default.rankUserInfo){var a=c.default.rankUserInfo.fail;a&&0!=a||(a=1),n=s.default.formatStr(o.content,a)}this.descNode.getComponent(cc.Label).string=n,1==t.type?(this.bgSprite.spriteFrame=this.winSF,this.descNode.color=new cc.Color(0,0,0)):(this.bgSprite.spriteFrame=this.failSF,this.descNode.color=new cc.Color(255,255,255))},i([p(cc.Sprite)],e.prototype,"bgSprite",void 0),i([p(cc.Node)],e.prototype,"descNode",void 0),i([p(cc.Node)],e.prototype,"clickBtn",void 0),i([p(cc.SpriteFrame)],e.prototype,"failSF",void 0),i([p(cc.SpriteFrame)],e.prototype,"winSF",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../../script/manager/data-manager":"data-manager","../common/CcJsFunc":"CcJsFunc","../tools/str-utils":"str-utils"}],"bullet-screen-pop":[function(t,e,o){"use strict";cc._RF.push(e,"a8b16hoKXVDjrSvCkcW6JEW","bullet-screen-pop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/enumConfig"),l=t("../common/sdk"),u=t("../manager/GameManager"),p=t("../../script/manager/data-manager"),d=t("../sub/bullet-item"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.popNode=null,e.closeBtn=null,e.contentNode=null,e.buttleItemNode=null,e.bulletsWin=[],e.bulletsFail=[],e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.mask,this.maskFunc.bind(this)),r.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this)),this.buttleItemNode.active=!1},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.maskFunc=function(){this.node.active=!1},e.prototype.showPop=function(){this.node.active=!0,this.bulletsWin=p.default.bulletsWin,this.bulletsFail=p.default.bulletsFail,p.default.rankUserInfo&&1==p.default.rankUserInfo.state?this.setupSubviews(this.bulletsWin,1):this.setupSubviews(this.bulletsFail,2)},e.prototype.setupSubviews=function(t,e){var o=this;this.contentNode.removeAllChildren();for(var n=0;n=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/api/api-sheep"),c=t("../../script/common/CcJsFunc"),s=t("../../script/common/enumConfig"),l=t("../../script/manager/PoolManager"),u=t("../../script/manager/data-manager"),p=t("../../pre/effect/BulletPrefab"),d=cc._decorator,h=d.ccclass,f=(d.property,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.bulletsCurrent=[],e.bulletsArray=[],e.timer=0,e}return a(e,t),e.prototype.start=function(){cc.game.on(s.EMITKEY.RANKUSERINFOSUCCESS,this.rankUserInfoFunc,this),cc.game.on(s.EMITKEY.BULLETSEND,this.bulletSendFunc,this),this.schedule(this.requestBulletData,60,1e4,1)},e.prototype.bulletSendFunc=function(t){for(var e={},o=0;o\u5f39\u5e55"),this.setDataInfo(e)):(console.log("\u7f13\u5b58\u6570\u636e\u8fc7\u671f->\u5f39\u5e55"),r.default.getBulletData(function(e){e&&(t.setDataInfo(e),u.default.setBulletData(e))}))},e.prototype.setDataInfo=function(t){this.bulletsCurrent=t,this.showBullets()},e.prototype.spawnBullets=function(){for(var t=this,e=this,o=this.randomBullet(),n=0;n=3&&(this.timer=0,this.showBullets())},e.prototype.showBullets=function(){0!=this.bulletsArray.length&&4!=this.bulletsArray.length||(console.log("\u518d\u6b21\u521b\u5efa\u5f39\u5e55 ### "+this.bulletsArray.length),this.spawnBullets())},i([h],e)}(cc.Component));o.default=f,cc._RF.pop()},{"../../pre/effect/BulletPrefab":"BulletPrefab","../../script/api/api-sheep":"api-sheep","../../script/common/CcJsFunc":"CcJsFunc","../../script/common/enumConfig":"enumConfig","../../script/manager/PoolManager":"PoolManager","../../script/manager/data-manager":"data-manager"}],"calendar-item":[function(t,e,o){"use strict";cc._RF.push(e,"312273bidZPd4yxEMIojF1F","calendar-item");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../../common/dataTs"),u=t("../../common/enumConfig"),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.imgEnd=null,e.imgStart=null,e.imgWin=null,e.descNode=null,e.nodeData=null,e.parentNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setNodeData=function(t){this.nodeData=t,this.descNode.getComponent(cc.Label).string=String(t.day),this.show(t.type)},e.prototype.getNodeData=function(){return this.nodeData},e.prototype.isWin=function(){var t=this.nodeData.date.split("-");if(t.length>=3){var e=""+t[0]+t[1],o=""+t[0]+t[1]+t[2],n=l.default.getUserData().dailyData,a=this.nodeData.type==u.CALENDARITEM.ITEMOLD||this.nodeData.type==u.CALENDARITEM.ITEMNOW;if(n&&n[e]&&n[e][o]&&n[e][o].isWin&&a)return!0}return!1},e.prototype.show=function(t){void 0===t&&(t=u.CALENDARITEM.ITEMFUTURE),this.showBackground(t),this.isWin()&&(this.imgEnd.active=!1,this.imgStart.active=!1,this.imgWin.active=!0,this.descNode.color=(new cc.Color).fromHEX("58BF3A"))},e.prototype.showBackground=function(t){switch(this.imgEnd.active=!1,this.imgStart.active=!1,this.imgWin.active=!1,this.descNode.active=!0,this.descNode.color=(new cc.Color).fromHEX("#661C1C"),t){case u.CALENDARITEM.ITEMLAST:this.descNode.active=!1;break;case u.CALENDARITEM.ITEMOLD:this.imgEnd.active=!0;break;case u.CALENDARITEM.ITEMNOW:this.imgEnd.active=!0,this.imgStart.active=!0,this.descNode.color=(new cc.Color).fromHEX("#FFFFFF");break;case u.CALENDARITEM.ITEMFUTURE:this.descNode.color=(new cc.Color).fromHEX("#BBADAD");break;case u.CALENDARITEM.ITEMNEXT:this.descNode.active=!1,this.descNode.color=(new cc.Color).fromHEX("#BBADAD");break;case u.CALENDARITEM.ITEMNOR:this.imgEnd.active=!0,this.imgStart.active=!1,this.imgWin.active=!1;break;case u.CALENDARITEM.ITEMSELE:this.imgEnd.active=!1,this.imgStart.active=!0,this.imgWin.active=!1,this.descNode.color=(new cc.Color).fromHEX("#FFFFFF");break;case u.CALENDARITEM.ITEMSUC:this.imgEnd.active=!1,this.imgStart.active=!1,this.imgWin.active=!0,this.descNode.color=(new cc.Color).fromHEX("58BF3A")}},i([s(cc.Node)],e.prototype,"imgEnd",void 0),i([s(cc.Node)],e.prototype,"imgStart",void 0),i([s(cc.Node)],e.prototype,"imgWin",void 0),i([s(cc.Node)],e.prototype,"descNode",void 0),i([c],e)}(cc.Component);o.default=p,cc._RF.pop()},{"../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig"}],"cat-house-progress":[function(t,e,o){"use strict";cc._RF.push(e,"a832bZG8ctCkbykfAYO9amD","cat-house-progress");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../common/CcJsFunc"),c=t("../../common/dataTs"),s=t("../../common/enumConfig"),l=t("../../common/spine"),u=t("../../main/houseLayer"),p=t("../../main/mainCultivateLayer"),d=t("../../pop/unlock-build-pop"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainCultivateLayer=null,e.mainUILayer=null,e.houseLayer=null,e.progressMain=null,e.progressNode=null,e.receiveNode=null,e.newCatNode=null,e.titleLabel=null,e.progressBar=null,e.progressLabel=null,e.boxNode=null,e.boxMark=null,e.clawSpine=null,e}return a(e,t),e.prototype.start=function(){cc.game.on(s.EMITKEY.MAINUPDATEUI,this.updateSubUI,this),cc.game.on(s.EMITKEY.UPDATETABBARSEND,this.updateTabbar,this),r.default.addbtnTouchStartScale(this.node),r.default.addbtnTouchEndScale(this.node,this.catProgressFunc.bind(this)),r.default.addbtnTouchCancelScale(this.node),this.updateSubUI()},e.prototype.updateSubUI=function(){var t=this;if(this.updateProgress(),1==c.default.currentHouseUnlockAll()&&(c.default.haveNewHouseUnlock()?this.boxMark.active=!0:this.boxMark.active=!1,"1"==cc.sys.localStorage.getItem("unlockNewHouse")?this.unlockNewHouseFunc():this.receiveBox()),this.clawSpine.active=!1,!cc.sys.localStorage.getItem("unlockClawCache")){var e=c.default.getUserData();e.fish>=2&&e.playLevelId<10&&(this.clawSpine.active=!0,this.clawSpine.getComponent(l.default).play("6Pa",0,function(){t.clawSpine.active=!1}),cc.sys.localStorage.setItem("unlockClawCache",1))}},e.prototype.updateTabbar=function(t){t==s.MAINPAGE.PAGEMAIN&&(this.clawSpine.active=!1)},e.prototype.catProgressFunc=function(){if("1"==cc.sys.localStorage.getItem("unlockNewHouse"))return c.default.haveNewHouseUnlock()?(this.mainCultivateLayer.getComponent(p.default).unlockNewHouse(),void cc.sys.localStorage.setItem("unlockNewHouse","0")):(console.log("\u623f\u5c4b\u5df2\u5168\u90e8\u89e3\u9501"),void cc.game.emit("showMainTips","Waiting for new houses to be built!"));if(1==c.default.currentHouseUnlockAll())return c.default.getHourseUnlockData(),this.mainUILayer.getChildByName("unlock-build-pop").getComponent(d.default).showGetRemoveProp(),this.unlockNewHouseFunc(),void cc.sys.localStorage.setItem("unlockNewHouse","1");cc.game.emit(s.EMITKEY.UPDATETABBARRECEIVE,1);var t=c.default.getHourseUnlockData();t&&(t.length<=4?this.houseLayer.getComponent(u.default).moveWithRoomId(s.ROOMTYPE.ROOMONE):4=e[e.length-1][0].fish),this.titleLabel.string="\u732b\u5c4b"+e.length;var o=e[e.length-1],n=0;for(var a in o)o[a].unlock&&n++;this.progressLabel.string=n+"/"+o.length,this.progressBar.getComponent(cc.Sprite).fillRange=n/o.length}else this.boxMark.active=!1},e.prototype.receiveBox=function(){this.progressNode.active=!1,this.newCatNode.active=!1,this.receiveNode.active=!0},e.prototype.unlockNewHouseFunc=function(){this.progressMain.active=!1,this.newCatNode.active=!0,c.default.haveNewHouseUnlock()?this.newCatNode.getComponent(cc.Label).string="\u89e3\u9501\u65b0\u623f\u5c4b":this.newCatNode.getComponent(cc.Label).string="\u5df2\u5168\u90e8\u89e3\u9501"},i([m(cc.Node)],e.prototype,"mainCultivateLayer",void 0),i([m(cc.Node)],e.prototype,"mainUILayer",void 0),i([m(cc.Node)],e.prototype,"houseLayer",void 0),i([m(cc.Node)],e.prototype,"progressMain",void 0),i([m(cc.Node)],e.prototype,"progressNode",void 0),i([m(cc.Node)],e.prototype,"receiveNode",void 0),i([m(cc.Node)],e.prototype,"newCatNode",void 0),i([m(cc.Label)],e.prototype,"titleLabel",void 0),i([m(cc.Node)],e.prototype,"progressBar",void 0),i([m(cc.Label)],e.prototype,"progressLabel",void 0),i([m(cc.Node)],e.prototype,"boxNode",void 0),i([m(cc.Node)],e.prototype,"boxMark",void 0),i([m(cc.Node)],e.prototype,"clawSpine",void 0),i([f],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../common/CcJsFunc":"CcJsFunc","../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig","../../common/spine":"spine","../../main/houseLayer":"houseLayer","../../main/mainCultivateLayer":"mainCultivateLayer","../../pop/unlock-build-pop":"unlock-build-pop"}],catClawPrefabs:[function(t,e,o){"use strict";cc._RF.push(e,"d608do4PQpDxZoRa+u6of6d","catClawPrefabs");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/spine"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.catClaw=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.playClawAnimation=function(){var t=this;t.node.active=!0,this.node.scale=.8,this.catClaw.getComponent(r.default).play("6Pa",0,function(){t.node.active=!1})},i([l(cc.Node)],e.prototype,"catClaw",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/spine":"spine"}],catNode:[function(t,e,o){"use strict";cc._RF.push(e,"576facriHVLQ5wzTbqa6xlT","catNode");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/dataTs"),c=t("../common/spine"),s=cc._decorator,l=s.ccclass,u=(s.property,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.catId=0,e.parentComp=null,e.touchStartPoint=null,e.touchEndPoint=null,e.distance=0,e.unlockClothingBg=null,e.unlockClothing=null,e}return a(e,t),e.prototype.start=function(){this.node.on("touchend",this.touchEndFunc,this),this.node.on("touchstart",this.touchStartFunc,this),this.node.on("touchmove",this.touchMoveFunc,this),this.node.on("touchcancel",this.touchCancelFunc,this);var t=this.node.parent;this.unlockClothingBg=t.getChildByName("unlockClothingBg"),this.unlockClothing=t.getChildByName("unlockClothing"),cc.tween(this.unlockClothingBg).by(10,{angle:360}).repeatForever().start()},e.prototype.setCatData=function(t,e){this.catId=t,this.parentComp=e,this.updateSkin()},e.prototype.playClothesAnimation=function(t){void 0===t&&(t=!1),this.unlockClothingBg.active=t,this.unlockClothing.active=t},e.prototype.updateSkin=function(t){void 0===t&&(t=!1);var e="cat_"+this.catId,o=r.default.getUserData().catClothesData[e];for(var n in o)1==o[n].isWear&&this.setCatSpine(o[n].clothesID,o[n].clothRank,t)},e.prototype.setCatSpine=function(t,e,o){void 0===o&&(o=!1);var n=this,a="Model"+(this.catId<10?"0"+this.catId:this.catId+"");this.node.getComponent(c.default).loadNewSpine(a,function(){var a=t%1e3,i=a<10?"0"+a:a+"";n.node.getComponent(c.default).setNewSkin(i),o?n.node.getComponent(c.default).play("2_SkinChange1",1,function(){n.node.getComponent(c.default).play("1_Standby1",0)}):n.node.getComponent(c.default).play("1_Standby1",0);var r=1;r=e<2?0:1;for(var s=["Collar2","Collar1"],l=0;l=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/ApiTool"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/spine"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.popNode=null,e.titleLabel=null,e.allLabel=null,e.numLabel=null,e.sheepSP=null,e.bgFlashSP=null,e.headerNode=null,e}return a(e,t),e.prototype.start=function(){c.default.addbtnTouchEndScale(this.maskNode,this.maskNodeFunc.bind(this))},e.prototype.maskNodeFunc=function(){this.node.active=!1},e.prototype.showPop=function(){var t=this;this.node.active=!0,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),cc.tween(this.bgFlashSP).to(0,{scale:0}).to(.1,{scale:1}).call(function(){t.bgFlashSP.getComponent(l.default).loadSpine("sheep/UI",function(){t.bgFlashSP.getComponent(l.default).play("4Ray2",0)})}).start();for(var e="sheep/Sheeps",o="skin_00",n=s.default.getSheepClothesData(),a=0;a=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../pre/main/blockPrefab"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/enumConfig"),u=t("../common/native/audio"),p=t("../manager/GameManager"),d=t("./crushArea"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.blockPrefab=null,e.blockArea=null,e.crushAreaNode=null,e.gameTopNode=null,e.moveOutArea=null,e.cookieGetParticle=null,e.crushAreaArgs=null,e.levelID=0,e.nowLevelBlockObj={},e.parentComp=null,e.blockTypeArr=[],e.minBlockNum=8,e.blockMaxWidth=120,e.blockMaxHeight=135,e.cookieBlockType=0,e.scaleRate=1,e}return a(e,t),e.prototype.onLoad=function(){},e.prototype.onDestroy=function(){console.log("chessboard \u9000\u51fa\u7a0b\u5e8f ######")},e.prototype.start=function(){console.log("start ###")},e.prototype.onEnable=function(){console.log("onEnable ###")},e.prototype.init=function(t,e){this.node.scale=1,console.log("init ###### ",t.widthNum,t.heightNum,this.node.scale),this.parentComp=e,this.nowLevelData=t,this.blockArea.removeAllChildren(),this.levelID=t.levelID,this.createBlockTypeObj(),this.rewardBlockInit(t,!1),this.initBlockNodeLayer(!0),cc.game.emit(l.EMITKEY.SHOWMASKLAYER,3),this.refreshIndex()},e.prototype.initNextLevelMap=function(t,e){this.node.scale=1,console.log("init ###### ",t.widthNum,t.heightNum,this.node.scale),this.parentComp=e,this.nowLevelData=t,this.blockArea.x=cc.winSize.width,this.blockArea.removeAllChildren(),this.createBlockTypeObj(),this.rewardBlockInit(t,!0),this.initBlockNodeLayer(!1),cc.game.emit(l.EMITKEY.SHOWMASKLAYER,3),this.refreshIndex(),cc.tween(this.blockArea).to(1,{x:-360,y:0},{easing:cc.easing.quadOut}).call(function(){cc.game.emit(l.EMITKEY.HIDEMASKLAYER,11)},this).start()},e.prototype.rewardBlockInit=function(t,e){if(s.default.gameConfigData.baseConfigData){this.cookieBlockType=0;var o=s.default.getUserData().playLevelId,n=s.default.gameConfigData.baseConfigData.cookieRewardLevel;if(e&&o>=n&&o%2!=0){var a=this.getCookieLevelData();console.log("\u997c\u5e72\u7c7b\u578b\u4e3a",a.type);var i=s.default.getCookieRewardData();console.log("cookieData",JSON.stringify(i)),this.cookieBlockType=a.type}}},e.prototype.getCookieLevelData=function(){var t=this.blockTypeArr.concat(),e=this.sortAndGroup(t),o=c.default.shuffle(e);console.log("blockArr",t),console.log("randomArr",o);var n=[];30<=t.length&&t.length<=72&&n.push(3),36<=t.length&&t.length<=93&&n.push(6),60<=t.length&&t.length<=105&&n.push(9),54<=t.length&&t.length<=99&&n.push(12),69<=t.length&&t.length<=114&&n.push(15),114<=t.length&&t.length<=147&&n.push(21),console.log("countArr",n);var a=[];for(var i in n)for(var r in e)if(n[i]==e[r].length){a.push(n[i]);break}console.log("canArr",a);var s=a[Math.floor(Math.random()*a.length)];for(var l in console.log("count",s),o)if(s==o[l].length)return{count:s,type:o[l][0]};return{count:0,type:0}},e.prototype.sortAndGroup=function(t){var e,o=[];t.sort(function(t,e){return t-e});for(var n=0;n block ",this.blockTypeArr.length),this.blockTypeArr=c.default.shuffle(this.blockTypeArr),p.default.blacksInfo.blockCurCount=this.blockTypeArr.length,p.default.blacksInfo.blockAllCount=this.blockTypeArr.length,console.log("blockCurCount = "+p.default.blacksInfo.blockCurCount+" blockAllCount = "+p.default.blacksInfo.blockAllCount)},e.prototype.initBlockNodeLayer=function(t){p.default.getInstance().cookieDict.cookieCurCount=0;var e=this.nowLevelData.levelData;for(var o in e)for(var n in e[o])t?this.addBlockFunc(e[o][n],cc.winSize.height):this.addBlockFunc(e[o][n],0);t?this.playInitBlockAnimate():this.noPlayAnimate()},e.prototype.checkGameWin=function(){for(var t in this.nowLevelBlockObj)for(var e in this.nowLevelBlockObj[t])for(var o in this.nowLevelBlockObj[t][e])return!1;return!0},e.prototype.noPlayAnimate=function(){for(var t in this.nowLevelBlockObj)for(var e in this.nowLevelBlockObj[t])for(var o in this.nowLevelBlockObj[t][e]){var n=this.checkIsShow(t,Number(o),Number(e)),a=this.nowLevelBlockObj[t][e][o].getComponent(r.default),i=this.node.width/this.nowLevelData.widthNum/this.blockMaxWidth;i*=this.scaleRate,a.setStatus(n,i),a.isChoosed=!1,a.playRandomBlockAnimate()}},e.prototype.playInitBlockAnimate=function(){cc.tween(this.node).delay(.3).call(function(){u.default.playAudioMusic("audio/sound/levelInit.mp3",!1)}).start();var t=1e4,e=0,o=0;for(var n in this.nowLevelBlockObj)for(var a in this.nowLevelBlockObj[n])for(var i in this.nowLevelBlockObj[n][a])o++,Number(i)e&&(e=Number(a));var c=function(n){var a=function(a){var i=function(i){var c=.02*(Number(i)-t)+.02*(e-Number(a)),u=s.nowLevelBlockObj[n][a][i].getComponent(r.default);cc.tween(u.node).delay(c).by(.8,{y:-cc.winSize.height}).by(.1,{y:-5}).by(.1,{y:8}).by(.1,{y:-3}).call(function(){o--;var t=this.checkIsShow(n,Number(i),Number(a)),e=this.nowLevelBlockObj[n][a][i].getComponent(r.default),c=this.node.width/this.nowLevelData.widthNum/this.blockMaxWidth;c*=this.scaleRate,e.setStatus(t,c),e.isChoosed=!1,e.playRandomBlockAnimate(),0==o&&cc.game.emit(l.EMITKEY.HIDEMASKLAYER,3)},s).start()};for(var c in s.nowLevelBlockObj[n][a])i(c)};for(var i in s.nowLevelBlockObj[n])a(i)},s=this;for(var n in this.nowLevelBlockObj)c(n)},e.prototype.refreshIndex=function(){for(var t in this.nowLevelBlockObj)for(var e in this.nowLevelBlockObj[t])for(var o in this.nowLevelBlockObj[t][e])this.nowLevelBlockObj[t][e][o].setSiblingIndex(1e4)},e.prototype.refreshMask=function(){var t=0;for(var e in this.nowLevelBlockObj)for(var o in this.nowLevelBlockObj[e])for(var n in this.nowLevelBlockObj[e][o]){t++;var a=this.checkIsShow(e,Number(n),Number(o)),i=this.node.width/this.nowLevelData.widthNum/this.blockMaxWidth;i*=this.scaleRate,this.nowLevelBlockObj[e][o][n].getComponent(r.default).setStatus(a,i)}p.default.blacksInfo.blockCurCount=t},e.prototype.updateBlockArea=function(){var t=[];for(var e in cc.game.emit(l.EMITKEY.SHOWMASKLAYER,4),this.nowLevelBlockObj)for(var o in this.nowLevelBlockObj[e])for(var n in this.nowLevelBlockObj[e][o]){var a=this.nowLevelBlockObj[e][o][n].getComponent(r.default);t.push(a.cardDataObj.type)}if(!((t=c.default.shuffle(t)).length<1)){for(var e in this.nowLevelBlockObj)for(var o in this.nowLevelBlockObj[e])for(var n in this.nowLevelBlockObj[e][o]){a=this.nowLevelBlockObj[e][o][n].getComponent(r.default);var i=this.nowLevelData.widthNum*this.minBlockNum,s=this.node.width/i,u=this.node.width/this.nowLevelData.widthNum,p=a.cardDataObj.rolNum*s+u/2,d=u/this.blockMaxWidth;d*=this.scaleRate;var h=-(a.cardDataObj.rowNum*s+d*this.blockMaxHeight/2),f=cc.v3(p,h,0);a.beginRotate(this,t.pop(),f)}return!0}cc.game.emit(l.EMITKEY.HIDEMASKLAYER,4)},e.prototype.checkIsShow=function(t,e,o){var n=this.nowLevelBlockObj;for(var a in n)if(Number(a)>Number(t)){var i=e-this.minBlockNum,r=e+this.minBlockNum,c=o-this.minBlockNum,s=o+this.minBlockNum;for(var l in n[a])for(var u in n[a][l])if(Number(u)>i&&Number(u)c&&Number(l)=7)){this.crushAreaNode.setSiblingIndex(10),this.crushAreaArgs&&this.crushAreaArgs.setSiblingIndex(10);var e=t.cardDataObj;this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum]&&delete this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum],this.parentComp.crushBlockNode(t),t.comeParent="chessboard",this.refreshMask()}},e.prototype.addBlockFunc=function(t,e){var o=cc.instantiate(this.blockPrefab);this.blockArea.addChild(o);var n=this.nowLevelData.widthNum*this.minBlockNum,a=this.node.width/n,i=this.node.width/this.nowLevelData.widthNum,c=i/this.blockMaxWidth;c*=this.scaleRate,o.scale=c;var s=t.rolNum*a+i/2,l=-(t.rowNum*a+c*this.blockMaxHeight/2);if(o.x=s,o.y=l+e,0==t.type){var u=this.blockTypeArr.pop();t.type=u}this.cookieBlockType==t.type?t.cookie=1:t.cookie=0,t.cookieType=this.cookieBlockType,o.getComponent(r.default).addBlockNode(t,this.removeCardNode.bind(this),this.refreshIndex.bind(this)),this.addBlockDataObj(o,t)},e.prototype.cancelAddBlockFunc=function(t){t.node.setSiblingIndex(1e3);var e=t.node,o=e.convertToWorldSpaceAR(cc.v2(0,0)),n=this.blockArea.convertToNodeSpaceAR(o);e.removeFromParent(!1),e.x=n.x,e.y=n.y,this.blockArea.addChild(e);var a=this.nowLevelData.widthNum*this.minBlockNum,i=this.node.width/a,c=this.node.width/this.nowLevelData.widthNum,s=t.cardDataObj.rolNum*i+c/2,u=c/this.blockMaxWidth;u*=this.scaleRate;var p=-(t.cardDataObj.rowNum*i+u*this.blockMaxHeight/2);e.stopAllActions(),cc.tween(e).to(.15,{x:s,y:p,scale:u}).call(function(){t.isChoosed=!1,cc.game.emit(l.EMITKEY.HIDEMASKLAYER,2)},this).start(),e.getComponent(r.default).updateBlockNodeData(t.cardDataObj,this.removeCardNode.bind(this),this.refreshIndex.bind(this)),this.addBlockDataObj(e,t.cardDataObj),this.refreshMask(),this.refreshIndex()},e.prototype.addBlockDataObj=function(t,e){this.nowLevelBlockObj[e.layerNum]?this.nowLevelBlockObj[e.layerNum][e.rowNum]?this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum]=t:(this.nowLevelBlockObj[e.layerNum][e.rowNum]={},this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum]=t):(this.nowLevelBlockObj[e.layerNum]={},this.nowLevelBlockObj[e.layerNum][e.rowNum]={},this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum]=t)},i([m(cc.Prefab)],e.prototype,"blockPrefab",void 0),i([m(cc.Node)],e.prototype,"blockArea",void 0),i([m(cc.Node)],e.prototype,"crushAreaNode",void 0),i([m(cc.Node)],e.prototype,"gameTopNode",void 0),i([m(cc.Node)],e.prototype,"moveOutArea",void 0),i([m(cc.Prefab)],e.prototype,"cookieGetParticle",void 0),i([m(cc.Node)],e.prototype,"crushAreaArgs",void 0),i([f],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../pre/main/blockPrefab":"blockPrefab","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/audio":"audio","../manager/GameManager":"GameManager","./crushArea":"crushArea"}],clothesPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"33fd5tSoKRCfKE6RQ1fb4nf","clothesPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=t("../../script/common/dataTs"),s=t("../../script/common/spine"),l=t("../../script/manager/GameManager"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.titleBanner_1=null,e.lvLabel_1=null,e.titleLabel_1=null,e.titleBanner_2=null,e.titleLabel_2=null,e.titleBanner_3=null,e.lockNode=null,e.selectNode=null,e.catNode=null,e.clothId=0,e.clothData=null,e.isClicked=!1,e.catId=0,e.parentComp=null,e}return a(e,t),e.prototype.start=function(){this.node.on("touchend",this.dressCloth,this)},e.prototype.setClothNodeData=function(t,e,o,n){if(this.clothData=t,this.parentComp=e,c.default.getUserData(),this.isClicked=!1,this.titleBanner_1.active=!1,this.titleBanner_2.active=!1,this.titleBanner_3.active=!1,this.lockNode.active=!1,this.catNode.active=!1,this.selectNode.active=!1,this.clothId=t.clothesID,l.default.getInstance().collectionMark.catSkinNum==this.clothData.clothesID?(this.node.getChildByName("mark").active=!0,l.default.getInstance().collectionMark.catSkinNum=0):this.node.getChildByName("mark").active=!1,"level"==t.unlockType){var a=!1;for(var i in n)if(this.clothData.clothesID==n[i].clothesID){a=!0;break}if(a)for(var i in n)this.clothData.clothesID==n[i].clothesID&&(this.titleBanner_1.active=!0,this.isClicked=!0,this.titleLabel_1.string=t.name,this.lvLabel_1.string="Lv"+n[i].clothRank,this.catNode.active=!0,this.selectNode.active=n[i].isWear,this.setCatSpine(o,n[i].clothRank),0==this.clothData.skin?this.lvLabel_1.node.active=!1:this.lvLabel_1.node.active=!0,2==this.clothData.skin&&n[i].clothRank<3&&(this.titleBanner_1.active=!1,this.titleBanner_2.active=!0,this.titleLabel_2.string="\u5b8c\u6210\u6311\u6218\u89e3\u9501"));else this.titleBanner_2.active=!1,this.titleLabel_2.string=t.unlockNum+"\u5173\u89e3\u9501",this.lockNode.active=!0,this.clothData.skin<1e4&&(this.catNode.active=!0,this.titleBanner_1.active=!1,this.lockNode.active=!1,1==this.clothData.skin?(this.titleBanner_3.active=!0,this.setCatSpine(o,1)):2==this.clothData.skin?(this.titleBanner_2.active=!0,this.titleLabel_2.string="\u5b8c\u6210\u6311\u6218\u89e3\u9501",this.setCatSpine(o,0)):this.setCatSpine(o,1))}else t.unlockType},e.prototype.setCatSpine=function(t,e){var o=this;this.catId=t;var n="Model"+(this.catId<10?"0"+this.catId:this.catId+"");this.catNode.getComponent(s.default).loadNewSpine(n,function(){var t=o.clothId%1e3,n=t<10?"0"+t:t+"";o.clothData.skin<1e4&&o.catNode.getComponent(s.default).setNewSkin(n);var a="Skin/"+n+"_"+e;console.log(n+" "+a),o.catNode.getComponent(s.default).play(a,0)})},e.prototype.dressCloth=function(){r.default.addClickAudio(),this.isClicked?(console.log("\u9009\u62e9\u8863\u670d\uff1a",this.clothId),this.parentComp.dressCloth(this.clothId)):console.log("\u4e0d\u80fd\u88ab\u70b9\u51fb")},i([d(cc.Node)],e.prototype,"titleBanner_1",void 0),i([d(cc.Label)],e.prototype,"lvLabel_1",void 0),i([d(cc.Label)],e.prototype,"titleLabel_1",void 0),i([d(cc.Node)],e.prototype,"titleBanner_2",void 0),i([d(cc.Label)],e.prototype,"titleLabel_2",void 0),i([d(cc.Node)],e.prototype,"titleBanner_3",void 0),i([d(cc.Node)],e.prototype,"lockNode",void 0),i([d(cc.Node)],e.prototype,"selectNode",void 0),i([d(cc.Node)],e.prototype,"catNode",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/common/dataTs":"dataTs","../../script/common/spine":"spine","../../script/manager/GameManager":"GameManager"}],collectPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"0d875oEXn5LZ7yyzkAjxqlu","collectPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../itemSub/collectSubPrefab"),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.content=null,e.collectSubPrefab=null,e.base_title_label=null,e.nodeData=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setNodeData=function(t){this.nodeData=t;var e=this.nodeData.catArr.length;for(var o in this.node.height=130+e/3*305,this.base_title_label.string="- "+this.nodeData.name+" -",this.nodeData.catArr){var n=cc.instantiate(this.collectSubPrefab);n.getComponent(l.default).setNodeData(this.nodeData.catArr[o],this),this.content.addChild(n)}},e.prototype.refreshNode=function(t){this.nodeData=t;var e=this.content.children;for(var o in e)e[o].getComponent(l.default).setNodeData(this.nodeData.catArr[o],this)},i([s(cc.Node)],e.prototype,"content",void 0),i([s(cc.Prefab)],e.prototype,"collectSubPrefab",void 0),i([s(cc.Label)],e.prototype,"base_title_label",void 0),i([c],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../itemSub/collectSubPrefab":"collectSubPrefab"}],collectSubPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"57acahslq1PzajDPXaUCYWO","collectSubPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=t("../../script/common/spine"),s=t("../../script/common/dataTs"),l=t("../../script/manager/GameManager"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.imgContent=null,e.tabLabel=null,e.imgTab=null,e.catNode=null,e.unlocking=null,e.imgLock=null,e.nodeData=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.node,this.clickNodeAction.bind(this))},e.prototype.clickNodeAction=function(){r.default.addClickAudio()},e.prototype.setNodeData=function(t){var e=this;this.nodeData=t,this.tabLabel.string=this.nodeData.name;var o=s.default.getUserData().catClothesData["cat_"+e.nodeData.modelID],n=!1;for(var a in o)if(this.nodeData.clothesID==o[a].clothesID){n=!0;break}if(s.default.getUserData().playLevelId,n?(this.imgContent.active=!0,this.imgLock.active=!1):(this.imgContent.active=!1,this.imgLock.active=!0),!(this.nodeData.unlockNum>=1e4)){0==this.nodeData.skin?this.tabLabel.getComponent(cc.LabelOutline).color=(new cc.Color).fromHEX("#4482CE"):1==this.nodeData.skin?this.tabLabel.getComponent(cc.LabelOutline).color=(new cc.Color).fromHEX("#A648D7"):2==this.nodeData.skin&&(this.tabLabel.getComponent(cc.LabelOutline).color=(new cc.Color).fromHEX("#D5A618"));var i="rewardIcon/Tab"+(t.skin+1)+".png";r.default.changeSpriteFrame(this.imgTab,i);var u=this.nodeData.clothesID%1e3,p=this.nodeData.modelID,d="Model"+(p<10?"0"+p:p+"");if(!o)return e.imgContent.active=!1,void(e.imgLock.active=!0);this.catNode.getComponent(c.default).loadNewSpine(d,function(){var t=u<10?"0"+u:u+"";e.catNode.getComponent(c.default).setNewSkin(t);for(var n=0;n=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../../common/dataTs"),u=t("../../../pre/item/collectPrefab"),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.content=null,e.collectPrefab=null,e.collectData=null,e.dataArray=[],e}return a(e,t),e.prototype.start=function(){this.parserData(),this.content.removeAllChildren();for(var t=0;t0&&this.refreshSubNode()},e.prototype.refreshSubNode=function(){this.parserData();var t=this.content.children;for(var e in t)t[e].getComponent(u.default).refreshNode(this.dataArray[e],this)},e.prototype.parserData=function(){var t=[];for(var e in this.collectData=l.default.gameConfigData.baseConfigData.catClothesData,this.collectData)for(var o in this.collectData[e])this.collectData[e][o].modelID<1e4&&t.push(this.collectData[e][o]);for(var n=0,a=0;an&&(n=c);for(a=0;a<=n;a++)this.dataArray[a]={name:"",catArr:[]};for(var i=[],r=0;r=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cookieTrailing=null,e.imageNode=null,e.labelNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showData=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),0==t?(this.imageNode.angle=0,this.labelNode.active=!1,this.cookieTrailing.active=!1,r.default.changeSpriteFrame(this.imageNode,"block/cookie/cookie_icon_fly.png")):1==t?(this.imageNode.angle=-12,this.labelNode.active=!0,this.labelNode.getComponent(cc.Label).string="x"+e,this.cookieTrailing.active=!1,r.default.changeSpriteFrame(this.imageNode,"block/cookie/cookie_icon_fly.png")):2==t&&(this.imageNode.angle=0,this.labelNode.active=!1,this.cookieTrailing.active=!1,r.default.changeSpriteFrame(this.imageNode,"rewardIcon/base_icon_ribbon.png"))},i([l(cc.Node)],e.prototype,"cookieTrailing",void 0),i([l(cc.Node)],e.prototype,"imageNode",void 0),i([l(cc.Node)],e.prototype,"labelNode",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc"}],cookieRewardNode:[function(t,e,o){"use strict";cc._RF.push(e,"69fe22S909JKoELNPl5QSbH","cookieRewardNode");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.imageNode=null,e.labelNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showData=function(t){var e="rewardIcon/"+t.rewardType+".png",o=0;this.imageNode.y=0,"reward_fish"==t.rewardType?o=0:"prop_random"==t.rewardType?(o=60,this.imageNode.y=5):"prop_remove"==t.rewardType&&(e="rewardIcon/prop_remove.png",o=0,this.imageNode.y=15),this.imageNode.angle=o,r.default.changeSpriteFrame(this.imageNode,e),this.labelNode.getComponent(cc.Label).string=t.rewardCount+""},i([l(cc.Node)],e.prototype,"imageNode",void 0),i([l(cc.Node)],e.prototype,"labelNode",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc"}],crushArea:[function(t,e,o){"use strict";cc._RF.push(e,"aa009UiZ8pDtasKgVM+bH6Y","crushArea");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/enumConfig"),c=t("../common/native/audio"),s=t("../common/util"),l=t("../manager/GameManager"),u=t("./chessboard"),p=t("./moveOutArea"),d=cc._decorator,h=d.ccclass,f=d.property,m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.gametopUI=null,e.moveOutArea=null,e.chessboardNode=null,e.particlePrefab=null,e.rewardEmitter=null,e.rewardEmitterNode=null,e.ribbonBoxPrefab=null,e.ribbonBox=null,e.crushAreaArgs=null,e.dailySF=null,e.topicSF=null,e.crushArray=[],e.blockMaxWidth=120,e.newScale=.8,e.moveSpeed=2e3,e.cancelArray=[],e.failNumber=7,e.gameOverStatus=!1,e.particleNode1=null,e.particleNode2=null,e.particleNode3=null,e.parentComp=null,e}return a(e,t),e.prototype.onLoad=function(){},e.prototype.start=function(){},e.prototype.initCrushArea=function(t){this.node.removeAllChildren(),this.parentComp=t,this.particleNode1=null,this.particleNode2=null,this.particleNode3=null,this.rewardEmitterNode=null,this.ribbonBox=null,this.crushArray=[],this.cancelArray=[],this.gameOverStatus=!1,this.node.opacity=0,cc.tween(this.node).to(.4,{opacity:255}).start(),l.default.getInstance().gameType==r.GAMETYPE.GAMETOPIC?(this.getComponent(cc.Sprite).spriteFrame=this.topicSF,this.crushAreaArgs&&(this.crushAreaArgs.active=!1)):(this.getComponent(cc.Sprite).spriteFrame=this.dailySF,this.crushAreaArgs&&(this.crushAreaArgs.active=!0))},e.prototype.hideCrushArea=function(){cc.tween(this.node).to(.4,{opacity:0}).start()},e.prototype.addCrushAreaCardNode=function(t){var e=t.node.convertToWorldSpaceAR(cc.v2(0,0)),o=this.node.convertToNodeSpaceAR(e);t.node.removeFromParent(!1),t.node.x=o.x,t.node.y=o.y,t.isChoosed=!0,this.node.addChild(t.node),this.addNewBlockNode(t),this.getCrushBlockNum()>=7&&cc.game.emit(r.EMITKEY.SHOWMASKLAYER,5)},e.prototype.getCrushBlockNum=function(){for(var t=this.crushArray.length,e=0;e=e.failNumber){for(var t=!0,n=0;n=0;e--)if(this.crushArray[e].cardDataObj.type==t.cardDataObj.type)return e+1;return this.crushArray.length},e.prototype.moveOutBlock=function(){if(this.crushArray.length<1)return!1;this.node.setSiblingIndex(10),this.crushAreaArgs&&this.crushAreaArgs.setSiblingIndex(10),this.moveOutArea.setSiblingIndex(9),cc.game.emit(r.EMITKEY.SHOWMASKLAYER,1),this.cancelArray=[];for(var t=[],e=0;e=3));e++);return t.length<1&&cc.game.emit(r.EMITKEY.HIDEMASKLAYER,5),this.moveOutArea.getComponent(p.default).addThreeOutBlock(t),this.updateNewPosition(),!0},e.prototype.cancelOneStep=function(){if(this.cancelArray.length>0){cc.game.emit(r.EMITKEY.SHOWMASKLAYER,6);for(var t=this.cancelArray.pop(),e=0;e8)){var n=.5*(e+t),a=this.GetTangent(t),r=this.GetTangent(e);if(!(i.angle(a,r)<=.1&&0!=o)){this.recursiveSamples(t,n,o+1);var c=this.samples[this.samples.length-1].location,s=this.GetLocation(n);this.length+=i.distance(c,s),this.samples.push(this.createSample(this.Length,n,s)),this.recursiveSamples(n,e,o+1)}}},t.prototype.computeSamples=function(){this.samples.length=0,this.length=0,this.samples.push(this.createSample(0,0)),this.recursiveSamples(0,1,0);var t=this.samples[this.samples.length-1].location,e=this.GetLocation(1);this.length+=i.distance(t,e),this.samples.push(this.createSample(this.Length,1))},t.prototype.createSample=function(t,e,o){return o||(o=this.GetLocation(e)),new n.CurveSample(o,this.GetTangent(e),this.GetUp(e),this.GetScale(e),t,e,this)},t.prototype.GetSample=function(t){if(t<0||t>1)throw new Error("Time must be between 0 and 1 (was "+t+").");for(var e=this.samples[0],o=null,a=!1,i=0,r=this.samples;i=t){o=c,a=!0;break}e=c}if(!a)throw new Error("Can't find curve samples.");var s=o===e?0:(t-e.timeInCurve)/(o.timeInCurve-e.timeInCurve);return n.CurveSample.Lerp(e,o,s)},t.prototype.GetSampleAtDistance=function(t){if(t<0||t>this.Length)throw new Error("Distance must be positive and less than curve length. Length = "+this.Length+", given distance was "+t+".");for(var e=this.samples[0],o=null,a=!1,i=0,r=this.samples;i=t){o=c,a=!0;break}e=c}if(!a)throw new Error("Can't find curve sample.");var s=o===e?0:(t-e.distanceInCurve)/(o.distanceInCurve-e.distanceInCurve);return n.CurveSample.Lerp(e,o,s)},t.prototype.GetProjectionSample=function(){return console.assert(!1,"Not implement"),null},t}();o.CubicBezierCurve=c,cc._RF.pop()},{"./curve-sample":"curve-sample","./typed-event":"typed-event"}],"curve-sample":[function(t,e,o){"use strict";cc._RF.push(e,"fcdcepeqV5GO5ejTxbhKhyO","curve-sample"),Object.defineProperty(o,"__esModule",{value:!0}),o.CurveSample=void 0;var n=t("./mesh-vertex"),a=cc.Quat,i=cc.Vec2,r=cc.Vec3,c=t("./export-helper"),s=cc.misc,l=function(){function t(t,e,o,n,i,r,c){this.location=t,this.tangent=e,this.up=o,this.scale=n,this.distanceInCurve=i,this.timeInCurve=r,this.curve=c,this.rotation=new a}return Object.defineProperty(t.prototype,"Rotation",{get:function(){var t=Object.freeze(new a);if(this.rotation===t){var e=this.up;this.rotation=new a,a.fromViewUp(this.rotation,this.tangent,e)}return this.rotation},enumerable:!1,configurable:!0}),t.prototype.equals=function(t){return this.location.equals(t.location)&&this.tangent.equals(t.tangent)&&this.up.equals(t.up)&&this.scale.equals(t.scale)&&c.math.equals(this.distanceInCurve,t.distanceInCurve)&&c.math.equals(this.timeInCurve,t.timeInCurve)},t.Lerp=function(e,o,n){var a=new r;r.lerp(a,e.location,o.location,n);var c=new r;r.lerp(c,e.tangent,o.tangent,n).normalize();var l=new r;r.lerp(l,e.up,o.up,n);var u=new i;return i.lerp(u,e.scale,o.scale,n),new t(a,c,l,u,s.lerp(e.distanceInCurve,o.distanceInCurve,n),s.lerp(e.timeInCurve,o.timeInCurve,n),e.curve)},t.prototype.getBent=function(t){var e=new n.MeshVertex(t.position,t.normal,t.uv),o=new r(0,e.position.y*this.scale.y,e.position.z*this.scale.x);o.x=0;var i=a.fromEuler(new a,0,s.degreesToRadians(-90),0),c=a.multiply(new a,this.Rotation,i);return r.transformQuat(o,o,c),r.add(o,o,this.location),e},t}();o.CurveSample=l,cc._RF.pop()},{"./export-helper":"export-helper","./mesh-vertex":"mesh-vertex"}],"daily-challenge":[function(t,e,o){"use strict";cc._RF.push(e,"d96aesUCApI06hXg7ZujIsy","daily-challenge");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../../common/CcJsFunc"),u=t("./calendar-item"),p=t("../../common/enumConfig"),d=t("../../manager/DateManager"),h=t("../../game/gameLayer"),f=t("../../common/dataTs"),m=t("../../game/gameUiLayer"),g=t("../../common/spine"),y=t("../../utils/uma/uma-sdk"),v=t("../../manager/GameManager"),b=t("../../manager/report-common"),_=t("../../../i18n/i18n"),N=t("../../../i18n/gd_language"),C=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.gameLayer=null,e.mainLayer=null,e.baseContent=null,e.baseContentBg=null,e.scrollView=null,e.bottomMask=null,e.calendarItem=null,e.previousBtn=null,e.titleLabel=null,e.nextBtn=null,e.spineLevel1=null,e.spineLevel2=null,e.spineLevel3=null,e.progressBarOne=null,e.progressBarTwo=null,e.progressBarThree=null,e.catFootBegin=null,e.catFootThree=null,e.catFootTen=null,e.catFootThirty=null,e.content=null,e.bottomView=null,e.playBtn=null,e.playImg=null,e.playLabel=null,e.progressPoint=null,e.progressLabel=null,e.winLabel=null,e.userData=null,e.dataArray=[],e.curArray=[],e.year=null,e.month=null,e.day=null,e.catArr=[],e.clickTime=0,e.clickMiniTime=0,e.isNoWin=!1,e.beginButtonDuration=0,e}return a(e,t),e.prototype.onEnable=function(){this.catArr=[],this.catArr.push(this.spineLevel1),this.catArr.push(this.spineLevel2),this.catArr.push(this.spineLevel3),this.setupData()},e.prototype.update=function(t){this.beginButtonDuration+=t},e.prototype.start=function(){l.default.addbtnTouchStartScale(this.playBtn),l.default.addbtnTouchEndScale(this.playBtn,this.playBtnTouchEnd.bind(this)),l.default.addbtnTouchCancelScale(this.playBtn),l.default.addbtnTouchStartScale(this.previousBtn),l.default.addbtnTouchEndScale(this.previousBtn,this.previousBtnTouchEnd.bind(this)),l.default.addbtnTouchCancelScale(this.previousBtn),l.default.addbtnTouchOriginStartScale(this.nextBtn),l.default.addbtnTouchOriginEndScale(this.nextBtn,this.nextBtnTouchEnd.bind(this)),l.default.addbtnTouchOriginCancelScale(this.nextBtn),this.clickTime=(new Date).getTime(),this.clickMiniTime=1e3,cc.winSize.height<1334&&(this.node.scale=.8)},e.prototype.setupData=function(){this.year=d.default.getInstance().selDate.getFullYear(),this.month=d.default.getInstance().selDate.getMonth()+1,this.initData()},e.prototype.playBtnTouchEnd=function(){if(this.beginButtonDuration<=1)console.log("\u4e0d\u80fd\u8fde\u7eed\u70b9\u51fb");else{this.beginButtonDuration=0;var t=d.default.format(p.CALENDARNAMES[4],d.default.getInstance().selDate).split("-");if(!(t.length<3)){console.log(t[0]+"\u5e74"+t[1]+"\u6708"+t[2]+"\u65e5");var e=Number(t[2]),o=null;if(f.default.getUserData().playLevelId<=50){if(!(o=f.default.getGameConfigData().baseConfigData.dailyData.easyGame.simple))return void console.log("monthData sample\u914d\u7f6e\u8868\u65e0\u6570\u636e")}else{var n=d.default.format(p.CALENDARNAMES[5],d.default.getInstance().selDate);if(!(o=f.default.getGameConfigData().baseConfigData.dailyData.monthData[n]))return void console.log("monthData \u914d\u7f6e\u8868\u65e0\u6570\u636e")}console.log("monthData = "+JSON.stringify(o));var a=o.levelID+e-1;console.log("index = "+a+" day = "+e),0!=this.isNoWin?this.dailyBeginGame(o,a,e):cc.game.emit("showMainTips",_.default.instance.trans(N.GDLanguage.level_new_tomorrow))}}},e.prototype.dailyBeginGame=function(t,e,o){console.log("levelID = "+e);var n=this;n.userData=f.default.getUserData(),console.log("\u7528\u6237\u6570\u636e:",n.userData),f.default.getLevelByNumber(e,function(e){if(console.log("\u5173\u5361\u6570\u636e:",e),n.gameLayer.activeInHierarchy)console.log("\u5df2\u7ecf\u6253\u5f00 mainLayer 2");else if(e.length<1)cc.game.emit("showMainTips",_.default.instance.trans(N.GDLanguage.level_inadequate));else if(f.default.isHaveLove())if(d.default.getInstance().isOldDay(o))console.log("\u770b\u89c6\u9891###");else{if(n.gameLayer.activeInHierarchy)return void console.log("\u5df2\u7ecf\u6253\u5f00 mainLayer 2");n.showGameAction(t,e,o)}else console.log("\u7231\u5fc3\u4e0d\u8db3"),cc.game.emit("showMainTips",_.default.instance.trans(N.GDLanguage.life_inadequate)),cc.game.emit("showPop",{popName:"getLovePop",showPopData:{popCallbackCollect:null,getLoveTime:0}})})},e.prototype.showGameAction=function(t,e,o){var n=this;cc.game.emit(p.EMITKEY.SHOWTRANSITLAYER,function(a){n.gameLayer.activeInHierarchy?console.log("\u5df2\u7ecf\u6253\u5f00 daily"):(console.log("\u53ef\u4ee5\u6253\u5f00\u4e86 daily"),n.gameLayer.getComponent(h.default).initLevelLayer(e),n.gameLayer.getChildByName("gameUiLayer").getComponent(m.default).setTimeByLevel(t,o),n.node.active=!1,a(),v.default.getInstance().tabbarIsDaily=!1)})},e.prototype.previousBtnTouchEnd=function(){this.changeMonth("last"),this.initData(this.year,this.month)},e.prototype.nextBtnTouchEnd=function(){this.changeMonth("next"),this.initData(this.year,this.month)},e.prototype.changeMonth=function(t){var e=d.default.getInstance().selDate,o=d.default.getInstance().cutType;switch(t){case"last":var n=d.default.lastDate(e,o);d.default.getInstance().selDate=d.default.cloneDate(n);break;case"next":var a=d.default.nextDate(e,o);d.default.getInstance().selDate=d.default.cloneDate(a)}this.year=d.default.getInstance().selDate.getFullYear(),this.month=d.default.getInstance().selDate.getMonth()+1,this.day=d.default.getInstance().selDate.getDay(),this.initData(this.year,this.month),y.default.trackEvent("daily_month"),b.default.reportTACommon("daily_month",{}),b.default.reportTACommon("daily_click",{action:"\u5207\u6362\u6708\u4efd"})},e.prototype.initData=function(t,e){if(void 0===t&&(t=this.year),void 0===e&&(e=this.month),this.titleLabel.string="- "+l.default.getMonthShorthand(e-1)+"/"+t+" -",this.dataArray=[],this.content.removeAllChildren(),this.createLastMonth(t,e),this.createNowMonth(t,e),this.createNextMonth(t,e),cc.winSize.height,console.log(this.dataArray.length),v.default.getInstance().globalData.isFullScreen){this.bottomMask.active=!1;var o=104*Math.ceil(this.dataArray.length/7),n=o-416;this.scrollView.height=o,this.baseContent.height=980+n}else this.bottomMask.active=!0;this.showLastSelDate(),this.updatePlayState(),this.updateSubUI(),this.showActionFunc()},e.prototype.showLastSelDate=function(){if(this.curArray.length){for(var t=0,e=this.curArray;t=0&&(o=this.curArray[n],this.isNoWin=!o.getComponent(u.default).isWin(),!this.isNoWin);n--);if(this.isNoWin){o.getComponent(u.default).show(p.CALENDARITEM.ITEMSELE);var a=o.getComponent(u.default).getNodeData();if(a&&a.date){var i=a.date.split("-");if(i.length<3)return;var r=Number(i[0]),c=Number(i[1]),s=Number(i[2]);this.updatePlayBtn(c,s),d.default.getInstance().selDate=new Date(r,c-1,s)}}else console.log("\u8bf7\u7b49\u5f85\u660e\u5929\u6e38\u73a9\u65b0\u5173\u5361######")}},e.prototype.showActionFunc=function(){var t=Number(f.default.getGameConfigData().baseConfigData.dailyData.originMonth);console.log("originMonthNum = "+t);var e=Number(d.default.format(p.CALENDARNAMES[5],d.default.getInstance().nowDate));console.log("nowMonthNum = "+e);var o=Number(d.default.format(p.CALENDARNAMES[5],d.default.getInstance().selDate));console.log("selMonthNum = "+o),this.previousBtn.active=!(o<=t),this.nextBtn.active=!(o>=e)},e.prototype.updatePlayState=function(){var t=d.default.format(p.CALENDARNAMES[3],d.default.getInstance().selDate).split("-");if(!(t.length<2)){var e=Number(t[0]),o=Number(t[1]);this.updatePlayBtn(e,o)}},e.prototype.updatePlayBtn=function(t,e){d.default.getInstance().isOldDay(e)?this.playImg.active=!0:this.playImg.active=!1;var o="Play "+t+"/"+e;0==this.isNoWin&&(o="Tomorrow",this.playImg.active=!1),this.playLabel.getComponent(cc.Label).string=o},e.prototype.updateSubUI=function(){var t=d.default.format(p.CALENDARNAMES[4],d.default.getInstance().selDate).split("-");if(!(t.length<2)){var e=Number(t[0]),o=Number(t[1]),n=new Date(e,o,0).getDate();n<=0&&(n=30);var a=f.default.getUserData().dailyData,i=d.default.format(p.CALENDARNAMES[5],d.default.getInstance().selDate),r=f.default.getGameConfigData().baseConfigData.dailyData.monthData[i];if(r){if(console.log("monthData = "+JSON.stringify(r)),a&&(a[i]||(console.log("dailyData[monthKey] \u4e3a\u7a7a\uff0c\u521d\u59cb\u5316\u6570\u636e##### "),a[i]={},(l=f.default.getUserData()).dailyData=a,f.default.saveUserData(l))),console.log("dailyData ##### ",JSON.stringify(a),i),a&&a[i]){var c=0;for(var s in a[i])a[i][s]&&a[i][s].isWin&&c++;if(this.catFootThree.active=!1,this.catFootTen.active=!1,this.catFootThirty.active=!1,this.progressBarOne.progress=0,this.progressBarTwo.progress=0,this.progressBarThree.progress=0,this.progressPoint.active=!0,c>0){if(c<=3?(this.catFootThree.active=!(c<3),this.progressBarOne.progress=c/3,this.progressPoint.x=166/3*c-250):c<=10?(this.catFootThree.active=!0,this.catFootTen.active=!(c>3&&c<10),this.progressBarOne.progress=1,this.progressBarTwo.progress=(c-3)/7,this.progressPoint.x=16.6*(c-3)-250+192.5):(this.catFootThree.active=!0,this.catFootTen.active=!0,this.catFootThirty.active=!(c>20&&c=3&&(this.catArr[0].parent.getChildByName("bg-gray").active=!1,this.catArr[0].parent.getChildByName("bg-green").active=!0),c>=10&&(this.catArr[1].parent.getChildByName("bg-gray").active=!1,this.catArr[1].parent.getChildByName("bg-green").active=!0),c>=n&&(this.catArr[2].parent.getChildByName("bg-gray").active=!1,this.catArr[2].parent.getChildByName("bg-green").active=!0)}}else console.log("monthData \u914d\u7f6e\u8868\u65e0\u6570\u636e")}},e.prototype.createLastMonth=function(t,e,o,n){void 0===o&&(o=!0),void 0===n&&(n=255),e-=1;var a=new Date(t,e,0),i=a.getDate(),r=a.getDay();if(r<7)for(var c=r;c>0;c--){var s=cc.instantiate(this.calendarItem);s.parent=this.content,s.opacity=n,this.dataArray.push(s);var l=i-c,d=t+"-"+(e<10?"0"+e:e)+"-"+(l<10?"0"+l:l),h={day:l,type:p.CALENDARITEM.ITEMLAST,date:d};s.getComponent(u.default).setNodeData(h,this)}},e.prototype.createNowMonth=function(t,e,o,n){void 0===o&&(o=!0),void 0===n&&(n=255);var a=new Date(t,e,0).getDate();d.default.getInstance().isNowMonth(e-1),this.curArray=[];for(var i=function(a){var i=cc.instantiate(r.calendarItem);i.parent=r.content,i.opacity=n,r.dataArray.push(i);var c=!1,s=p.CALENDARITEM.ITEMFUTURE;d.default.getInstance().isNowDay(a)?(r.curArray.push(i),c=!0,s=p.CALENDARITEM.ITEMNOW):d.default.getInstance().isOldDay(a)?(r.curArray.push(i),c=!0,s=p.CALENDARITEM.ITEMOLD):d.default.getInstance().isFutureDay(a)&&(s=p.CALENDARITEM.ITEMFUTURE);var l=t+"-"+(e<10?"0"+e:e)+"-"+(a<10?"0"+a:a),h={day:a,type:s,date:l};i.getComponent(u.default).setNodeData(h,r),o&&c&&i.on(cc.Node.EventType.TOUCH_END,function(){var o=l.split("-");if(console.log(o),o.length>=3){var n=""+o[0]+o[1],r=""+o[0]+o[1]+o[2],c=f.default.getUserData().dailyData;if(c&&c[n]&&c[n][r]&&c[n][r].isWin)return void console.log("\u672c\u5173\u5df2\u5b8c\u6210")}y.default.trackEvent("daily_date",{otherDate:l}),b.default.reportTACommon("daily_date",{}),b.default.reportTACommon("daily_click",{action:"\u5207\u6362\u65e5\u671f"});for(var s=0,h=this.curArray;s11&&(e=11),e<=0&&(e=1),e},e.isUpgradeNum=function(t){return console.log("fail = "+t),10==t||20==t||60==t||100==t||140==t||180==t||260==t||340==t||500==t||800==t},e.todayIsWin=function(){var t=c.default.format(r.CALENDARNAMES[7],c.default.getInstance().nowDate).split("-");if(t.length>=3){var e=""+t[0]+t[1],o=""+t[0]+t[1]+t[2],n=i.default.getUserData().dailyData;if(n&&n[e]&&n[e][o]&&n[e][o].isWin)return 1;if(n&&n[e]&&n[e][o]&&!n[e][o].isWin)return 0}return-1},e.checkExpireData=function(t){-1==e.todayIsWin()&&(i.default.removeItem(t),console.log("\u672c\u5730\u7f13\u5b58\u8fc7\u671f\u6570\u636e ###### cacheName = ",t)),i.default.isPlatform(i.GDPlatform.web)&&i.default.removeItem(t)},e.getTAUserInfo=function(){e.checkExpireData(r.STORAGEKEY.TAUSERINFO);var t=s.default.getInstance().reportProperty,o=t.challenge_count,n=t.cancel_use+t.random_use+t.remove_use,a=t.resurrection_ad_frequency,c=t.resurrection_ad_frequency+t.cancel_ad+t.random_ad+t.remove_ad,l=0;s.default.blacksInfo.blockAllCount>0&&(l=s.default.blacksInfo.blockCurCount/s.default.blacksInfo.blockAllCount);var u=i.default.getItem(r.STORAGEKEY.TAUSERINFO);u||(u={change_num:0,prop_num:0,resurgence_num:0,ad_num:0,block_ratio:l}),u.change_num+=o,u.prop_num+=n,u.resurgence_num+=a,u.ad_num+=c,u.block_ratio=l.toFixed(2),i.default.setItem(r.STORAGEKEY.TAUSERINFO,u),u||(u={});var p="\u6bcf\u65e5\u6311\u6218";return s.default.getInstance().gameType==r.GAMETYPE.GAMEDAILY?p="\u6bcf\u65e5\u6311\u6218":s.default.getInstance().gameType==r.GAMETYPE.GAMETOPIC&&(p="\u8bdd\u9898\u6311\u6218"),u.game_type=p,u},e.getGameLevelData=function(){var t=this.gameLevelCacheName();return e.checkExpireData(t),i.default.getItem(t)},e.setGameLevelData=function(t){var e=this.gameLevelCacheName();i.default.setItem(e,t,30*this.cacheTime)},e.gameLevelCacheName=function(){return s.default.getInstance().gameType==r.GAMETYPE.GAMELEVEL?r.STORAGEKEY.GAMEDAILYLEVELDATA:s.default.getInstance().gameType==r.GAMETYPE.GAMEDAILY?r.STORAGEKEY.GAMEDAILYLEVELDATA:s.default.getInstance().gameType==r.GAMETYPE.GAMETOPIC?r.STORAGEKEY.GAMETOPICLEVELDATA:r.STORAGEKEY.GAMEDAILYLEVELDATA},e.getRankData=function(){return e.checkExpireData(r.STORAGEKEY.RANKDATA),i.default.getItem(r.STORAGEKEY.RANKDATA)},e.setRankData=function(t){i.default.setItem(r.STORAGEKEY.RANKDATA,t,10*this.cacheTime)},e.getBulletData=function(){return e.checkExpireData(r.STORAGEKEY.BULLETDATA),i.default.getItem(r.STORAGEKEY.BULLETDATA)},e.setBulletData=function(t){i.default.setItem(r.STORAGEKEY.BULLETDATA,t,60*this.cacheTime)},e.getStageData=function(){return e.checkExpireData(r.STORAGEKEY.STAGEDATA),i.default.getItem(r.STORAGEKEY.STAGEDATA)},e.setStageData=function(t){i.default.setItem(r.STORAGEKEY.STAGEDATA,t,30*this.cacheTime)},e.getMatchResultData=function(){var t=i.default.getItem(r.STORAGEKEY.TOPICMATCHRECORD);return t&&t[c.default.format(r.CALENDARNAMES[7],c.default.getInstance().nowDate)]?(console.log("\u4eca\u65e5\u5df2\u8c03\u7528\u8d5b\u51b5\u63a5\u53e3 ###### "),!0):(console.log("\u4eca\u65e5\u672a\u8c03\u7528\u8d5b\u51b5\u63a5\u53e3 ###### "),!1)},e.setMatchResultData=function(){var t=c.default.format(r.CALENDARNAMES[7],c.default.getInstance().nowDate),e=i.default.getItem(r.STORAGEKEY.TOPICMATCHRECORD);e||(e={}),e[t]=!0,i.default.setItem(r.STORAGEKEY.TOPICMATCHRECORD,e)},e.getPropData=function(){var t=i.default.getItem(r.STORAGEKEY.PROPGAMEDATA);return t&&c.default.format(r.CALENDARNAMES[7],c.default.getInstance().nowDate)==t.time||(t=this.defaultPropData()),t},e.setPropData=function(t){return t||(t=this.defaultPropData()),i.default.setItem(r.STORAGEKEY.PROPGAMEDATA,t),t},e.defaultPropData=function(){return{time:c.default.format(r.CALENDARNAMES[7],c.default.getInstance().nowDate),daily:{prop_remove:2,prop_cancel:2,prop_random:2},topic:{prop_remove:2,prop_cancel:2,prop_random:2}}},e.user={uid:0,levelNum:0,openId:"",zoneId:1,unionId:"",gender:0,token:"",avatar:"",nickName:"",agreement:!1,deviceId:"",note:"",like_count:0,skinName:"",skinId:101,inviteCode:"",serverName:"",serverId:"",channel:"",userId:""},e.rankUserInfo=null,e.region=null,e.cacheTime=60,e.topicModel=null,e.topicRankInfo=null,e.bulletsWin=[{content:"\u7ec8\u4e8e\u6392\u4e0a\u4e86",mid:1,type:0},{content:"\u8f7b\u677e\u901a\u8fc7~",mid:2,type:0},{content:"\u4eca\u5929\u592a\u7b80\u5355",mid:3,type:0},{content:"\u7f8a\u4e86\u4e2a\u7f8a",mid:4,type:0},{content:"\u96c4\u8d77\uff01",mid:5,type:1},{content:"\u52a0\u6cb9\uff01",mid:6,type:1},{content:"yyds",mid:7,type:1},{content:"666",mid:8,type:1},{content:"\u51b2\u9e2d",mid:9,type:1},{content:"\u51b2\u51b2\u51b2",mid:10,type:1},{content:"\u5389\u5bb3\u4e86",mid:11,type:1}],e.bulletsFail=[{content:"\u96c4\u8d77\uff01",mid:12,type:1},{content:"\u52a0\u6cb9\uff01",mid:13,type:1},{content:"yyds",mid:14,type:1},{content:"666",mid:15,type:1},{content:"\u51b2\u9e2d",mid:16,type:1},{content:"\u51b2\u51b2\u51b2",mid:17,type:1},{content:"\u5389\u5bb3\u4e86",mid:18,type:1},{content:"\u8fc7\u4e0d\u53bb\u554a\uff01",mid:19,type:0},{content:"\u4eca\u5929\u592a\u96be\u4e86",mid:20,type:0},{content:"\u96be\u54ed\u4e86",mid:21,type:0},{content:"\u8bd5\u4e86 {0} \u6b21\u4e86",mid:22,type:2}],e}(cc.Component);o.default=l,cc._RF.pop()},{"../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","./DateManager":"DateManager","./GameManager":"GameManager"}],"data-type":[function(t,e,o){"use strict";cc._RF.push(e,"8cbe9Sgf2lHObO7pL4MBQTS","data-type"),Object.defineProperty(o,"__esModule",{value:!0}),o.ENV=void 0,function(t){t.local="local",t.beta="beta",t.online="online",t.onlineWx="onlineWx",t.leiTing="leiTing",t.onlineOppo="onlineOppo",t.onlineVivo="onlineVivo"}(o.ENV||(o.ENV={})),cc._RF.pop()},{}],dataModel:[function(t,e,o){"use strict";cc._RF.push(e,"f787b1iWeJMv6XB6Y+Z4lEb","dataModel"),Object.defineProperty(o,"__esModule",{value:!0}),cc._RF.pop()},{}],dataTs:[function(t,e,o){"use strict";cc._RF.push(e,"2b52b5mP0hOv4ijR3rDmmai","dataTs"),Object.defineProperty(o,"__esModule",{value:!0}),o.GDPlatform=void 0;var n,a=t("../manager/GameManager"),i=t("../manager/report-common"),r=t("./CcJsFunc"),c=t("./enumConfig"),s=t("./native/native-bridge"),l=t("./native/native-def"),u=t("./sdk");(function(t){t[t.android=0]="android",t[t.ios=1]="ios",t[t.wx=2]="wx",t[t.tt=3]="tt",t[t.web=4]="web",t[t.oppo=5]="oppo",t[t.vivo=6]="vivo"})(n=o.GDPlatform||(o.GDPlatform={}));var p=function(){function t(){}return t.GetVedioID=function(){return u.default.isPlatform(u.Platform.wx)?this.WXVedioID:u.default.isPlatform(u.Platform.tt)?this.TTVedioID:u.default.isPlatform(u.Platform.android)?this.AndroidVedioID:u.default.isPlatform(u.Platform.oppo)?this.OppoVedioID:u.default.isPlatform(u.Platform.vivo)?this.VivoVedioID:""},t.getGameConfigData=function(){return this.gameConfigData},t.initData=function(e){var o=this,n=this;if(cc.sys.localStorage.getItem(this.localKeyName))r=this.getUserData(),console.log("[PUSH] \u7528\u6237\u6570\u636e ###### ",JSON.stringify(r));else{this.registerUserData();var a=this.getUserData().userID;if(s.default.callNative(l.NativeFun.publicParamsInfo,{userId:a}),i.default.reportTACommon("register",{}),s.default.deviceInfo){console.log("AF af_register\u6253\u70b9");var r=t.getUserData(),c={androidid:s.default.deviceInfo.androidId,chennal:"310001",gameCode:"59",userId:r.userID,type:3};s.default.leitingReport("af_register",c),console.log("AF af_character\u6253\u70b9");var u={androidid:s.default.deviceInfo.androidId,chennal:"310001",gameCode:"59",userId:r.userID,type:3,roleId:s.default.deviceInfo.gaid,serviceName:"\u6d77\u5916\u6d4b\u8bd5\u670d",serviceId:"1"};s.default.leitingReport("af_character",u)}}var p=2;this.loadJsonData("data/levelConfigData",function(t){o.gameConfigData.levelConfigData=t,0==--p&&(e(),n.adaptCacheData())}),this.loadJsonData("data/baseConfigData",function(t){o.gameConfigData.baseConfigData=t,0==--p&&(e(),n.adaptCacheData())})},t.registerUserData=function(){if(!cc.sys.localStorage.getItem(this.localKeyName)){this.gameUserLocalData=this.registerData,u.default.isPlatform(u.Platform.android)?s.default.loginInfo&&s.default.loginInfo.userId?this.gameUserLocalData.userData.userID=s.default.loginInfo.userId:this.gameUserLocalData.userData.userID=r.default.randomCharNum():u.default.isPlatform(u.Platform.tt)?this.gameUserLocalData.userData.userID="":u.default.isPlatform(u.Platform.wx)?this.gameUserLocalData.userData.userID="":u.default.isPlatform(u.Platform.web)?(this.gameUserLocalData.userData.userID="100001",this.gameUserLocalData.userData.token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTAwMjA0MDIsIm5iZiI6MTY1ODkxODIwMiwiaWF0IjoxNjU4OTE2NDAyLCJqdGkiOiJDTTpjYXRfbWF0Y2g6bHQxMjM0NTYiLCJvcGVuX2lkIjoiIiwidWlkIjoxMDAwMDEsImRlYnVnIjoiIiwibGFuZyI6IiJ9.NQZAWBLYtq6hBff9YjNcaI2Soa6Z5vwbIU7YnjP1KBQ"):u.default.isPlatform(u.Platform.oppo)?this.gameUserLocalData.userData.userID="":u.default.isPlatform(u.Platform.vivo)?this.gameUserLocalData.userData.userID="":this.gameUserLocalData.userData.userID=r.default.randomCharNum(),this.gameUserLocalData.userData.registerTime=Date.now()+"";var t=JSON.stringify(this.gameUserLocalData);cc.sys.localStorage.setItem(this.localKeyName,t),console.log("[PUSH] \u6ce8\u518c\u7528\u6237 ###### "+t),a.default.getInstance().register=!0}},t.removeUserData=function(){cc.sys.localStorage.getItem(this.localKeyName)&&(cc.sys.localStorage.clear(),console.log("\u79fb\u9664\u672c\u5730\u7f13\u5b58 ### "))},t.isLogin=function(){var e=t.getUserData().userID,o=t.getUserData().token;return!!(e&&e.length&&o&&o.length)},t.adaptCacheData=function(){console.log("\u9002\u914d\u8001\u7528\u6237\u6570\u636e ###### ");var e=this.getUserData(),o=t.getSprintRewardData();console.log("sprintRewardData ### ",JSON.stringify(o)),1==o.isGameEd&&t.resetSprintReward(o);var n=e.unlockHouseUserData;for(var a in n)for(var i in n[a]){var r=n[a][i];if(!r.fish){var c=this.gameConfigData.baseConfigData.unlockHouseDataArray;if(c)for(var s in c)for(var l in c[s]){var u=c[s][l];if(r.unlockID==u.unlockID){r.fish=u.fish;break}}}}this.saveUserData(e),this.removeOldCacheData(e)},t.removeOldCacheData=function(t){t||(t=this.getUserData()),t.userID&&""!=t.userID&&"1"!=t.userID||(this.removeUserData(),this.registerUserData())},t.saveUserData=function(t){this.gameUserLocalData.userData=t;var e=JSON.stringify(this.gameUserLocalData);cc.sys.localStorage.setItem(this.localKeyName,e)},t.getUserData=function(){var t=cc.sys.localStorage.getItem(this.localKeyName);return this.gameUserLocalData=JSON.parse(t),this.gameUserLocalData.userData},t.getPictureData=function(){var t=cc.sys.localStorage.getItem(this.localKeyName);return this.gameUserLocalData=JSON.parse(t),this.gameUserLocalData.pictureData},t.savePictureData=function(t){this.gameUserLocalData.pictureData=t;var e=JSON.stringify(this.gameUserLocalData);cc.sys.localStorage.setItem(this.localKeyName,e)},t.getUserSetupData=function(){var t=cc.sys.localStorage.getItem(this.localKeyName);return this.gameUserLocalData=JSON.parse(t),this.gameUserLocalData.setUpData},t.saveUserSetupData=function(t){this.gameUserLocalData.setUpData=t;var e=JSON.stringify(this.gameUserLocalData);cc.sys.localStorage.setItem(this.localKeyName,e)},t.updateFirendCount=function(t){console.log("count = ",t);var e={moonCount:t};u.default.rankScoreUpdate(c.ShownType.friendRank,JSON.stringify(e),c.RefreshType.add)},t.updateTodayCount=function(t,e){var o={moonCount:t,state:e};console.log("rankData = ",o),u.default.rankScoreUpdate(c.ShownType.todayRank,JSON.stringify(o),c.RefreshType.add)},t.getDailyWinCount=function(){var e=t.getUserData();if(e.dailyData){var o=0;for(var n in e.dailyData)for(var a in e.dailyData[n])e.dailyData[n][a]&&e.dailyData[n][a].isWin&&o++;return o}return 0},t.getDailyData=function(e,o){var n=t.getUserData();if(n.dailyData[e])return n.dailyData[e][o]},t.saveDailyData=function(e,o,n){var a=t.getUserData();a.dailyData[e]?a.dailyData[e][o]=n:(a.dailyData[e]={},a.dailyData[e][o]=n),t.saveUserData(a)},t.gameLevelWin=function(t,e){e||(console.log("\u83b7\u53d6\u521a\u5b8c\u6210\u5173\u5361\u7684\u5956\u52b1\u6570\u636e, \u968f\u673a\u83b7\u53d6\u586b\u5145 ###"),e=this.getRewardBoxData(this.gameUserLocalData.userData.playLevelId)),console.log("winRewardObj ### ",JSON.stringify(e));var o=Number(e.everLevelRewardObj.coin),n=Number(e.everLevelRewardObj.fish);a.default.getInstance().gameType==c.GAMETYPE.GAMELEVEL?(o=Number(o),n=Number(n),this.gameUserLocalData.userData.playLevelId++):a.default.getInstance().gameType==c.GAMETYPE.GAMEDAILY&&(o=2*Number(o),n=2*Number(n)),this.gameUserLocalData.userData.coin+=o,this.gameUserLocalData.userData.fish+=n;var r=this.gameUserLocalData.userData.coin,s=o;if(i.default.reportTACommon("coin_get",{item_id:0,item_name:"\u91d1\u5e01",change_num:s,num_before:r-s,num_after:r,action:"\u5173\u5361\u80dc\u5229\u5956\u52b1",reason:"\u5173\u5361\u80dc\u5229\u83b7\u5f97\u91d1\u5e01",gold_num:r}),a.default.getInstance().moneyDict.coin=o+=Number(a.default.getInstance().moneyDict.coin),a.default.getInstance().moneyDict.fish=n+=Number(a.default.getInstance().moneyDict.fish),console.log("moneyDict = "+JSON.stringify(a.default.getInstance().moneyDict)),e.levelNewNum==e.levelNumMax){console.log("\u6dfb\u52a0\u5b9d\u7bb1\u5956\u52b1");for(var l=0;l=5&&(o.fish-=5,i[r].clothRank+=1,this.saveUserData(o),!0)}else console.log("\u6682\u65e0\u89e3\u9501\u732b")},t.updateCatData=function(){var e=this.gameConfigData.baseConfigData.catClothesData,o=this.gameUserLocalData.userData.playLevelId;for(var n in e)for(var a in e[n])if("level"==e[n][a].unlockType&&o>e[n][a].unlockNum){var i=this.gameUserLocalData.userData.catClothesData,r=!1;for(var c in i[n])i[n][c].clothesID==e[n][a].clothesID&&(r=!0);if(!r){var s={clothesID:e[n][a].clothesID,clothRank:1,isWear:!1};i[n].push(s),t.saveUserData(this.gameUserLocalData.userData)}}},t.updateLoveTime=function(){if(0==this.gameUserLocalData.userData.loveGetTime)return 0;var t=this.gameConfigData.baseConfigData.loveNumMax,e=this.gameUserLocalData.userData.loveGetTime,o=6e4*this.gameConfigData.baseConfigData.getLoveTime,n=Number(Date.now())-e,a=Math.floor(n/o),i=0;return a>=1?(this.gameUserLocalData.userData.love+=a,this.gameUserLocalData.userData.love>=t?(this.gameUserLocalData.userData.love=t,this.gameUserLocalData.userData.loveGetTime=0):(this.gameUserLocalData.userData.loveGetTime+=a*o,i=o-(n-a*o)),this.saveUserData(this.gameUserLocalData.userData)):i=o-(n-a*o),i},t.addLoveToMax=function(){var t=this.gameConfigData.baseConfigData.loveNumMax;this.gameUserLocalData.userData.love=e&&(this.gameUserLocalData.userData.loveGetTime=0),this.gameUserLocalData.userData.love>=5&&(this.gameUserLocalData.userData.love=5),this.saveUserData(this.gameUserLocalData.userData)},t.subLoveCount=function(t){if(this.gameUserLocalData.userData.love(o=a.default.getInstance().gameType==c.GAMETYPE.GAMELEVEL?r.dailyLevel:a.default.getInstance().gameType==c.GAMETYPE.GAMEDAILY?r.dailyLevel:a.default.getInstance().gameType==c.GAMETYPE.GAMETOPIC?r.topicLevel:r.dailyLevel).length)return console.log("\u6ca1\u6709\u5173\u5361"),void e(i);var s=o[t-1];console.log("modelLevelIdArray => ",s);for(var l=s.length,u=0,p=0;p=l){for(var o=0;o=c&&(o.bgNum=c),o.brickNum>=s&&(o.brickNum=s),this.savePictureData(o),a.default.getInstance().collectionMark.tabbarCollection=!0,Number(n.wallpaper)>0&&(a.default.getInstance().collectionMark.bgNum=o.bgNum),Number(n.brick)>0&&(a.default.getInstance().collectionMark.brickNum=o.brickNum)}return n},t.getCollectionUnlockData=function(){for(var t=this.getUserData().playLevelId-1,e=this.gameConfigData.baseConfigData.rewardCollection,o={buildNewNum:1,buildNumMax:10,buildObj:null},n=null,a=0,i=0;ia[i]&&(e.levelNewNum=t-a[i],e.levelNumMax=a[i+1]-a[i]);return e},t.getClothesData=function(e,o){for(var n=t.getGameConfigData().baseConfigData.catClothesData["cat_"+e],a=0;a=1?(console.log("\u91cd\u7f6e\u5012\u8ba1\u65f6 = "+i),t.pastTime=Date.now(),this.resetSprintReward(t),a.default.getInstance().sprintMark=!1,cc.game.emit(c.EMITKEY.MAINUPDATEUI)):r=o-(n-i*o),r},t.resetSprintReward=function(t){a.default.getInstance().gameType==c.GAMETYPE.GAMELEVEL&&(t?console.log("\u6d3b\u52a8\u7ed3\u675f\u4e2d\u65ad\u8fde\u80dc ######"):(t=this.getSprintRewardData(),console.log("\u666e\u901a\u73a9\u6cd5\u4e2d\u65ad\u8fde\u80dc ######")),t.winNum=0,t.winBox=0,t.rewardProgress=0,t.isGameEd=0,this.setSprintRewardData(t))},t.getCookieRewardData=function(){if(cc.sys.localStorage.getItem(c.STORAGEKEY.COOKIECOLLECTIONKEY)){var t=cc.sys.localStorage.getItem(c.STORAGEKEY.COOKIECOLLECTIONKEY);return JSON.parse(t)}var e={cookieNum:0,pastTime:Date.now(),progress:0},o=JSON.stringify(e);return cc.sys.localStorage.setItem(c.STORAGEKEY.COOKIECOLLECTIONKEY,o),e},t.setCookieRewardData=function(t){var e=JSON.stringify(t);cc.sys.localStorage.setItem(c.STORAGEKEY.COOKIECOLLECTIONKEY,e)},t.updateCookieRewardTime=function(){var t=this.getCookieRewardData(),e=t.pastTime,o=1e3*this.gameConfigData.baseConfigData.cookieRewardTime,n=Number(Date.now())-e,a=Math.floor(n/o),i=0;return a>=1?(console.log("\u91cd\u7f6e\u5012\u8ba1\u65f6 = "+a),t.pastTime=Date.now(),t.cookieNum=0,t.progress=0,this.setCookieRewardData(t),cc.game.emit(c.EMITKEY.MAINUPDATEUI)):i=o-(n-a*o),i},t.setItem=function(t,e,o){(!o||o<=0)&&(o=-1);var n={data:e,time:Date.now(),expire:1e3*o},a=JSON.stringify(n);cc.sys.localStorage.setItem(t,a)},t.getItem=function(t){var e=cc.sys.localStorage.getItem(t);if(e){var o=JSON.parse(e);if(o&&o.time&&o.expire){if(!(o.expire>0&&Date.now()>o.time+o.expire))return o.data;localStorage.removeItem(t)}}},t.removeItem=function(t){cc.sys.localStorage.removeItem(t)},t.getSheepClothesData=function(){var e=cc.sys.localStorage.getItem(c.STORAGEKEY.SHEEPCLOTHESDATA),o=t.gameConfigData.baseConfigData;if(!e)return o&&o.sheepClothesData&&this.setSheepClothesData(o.sheepClothesData),console.log("\u672c\u5730\u6ca1\u6709\u7f8a\u76ae\u80a4\u6570\u636e\uff0c\u8fdb\u884c\u7f13\u5b58 ###### "),o.sheepClothesData;var n=JSON.parse(e);if(o.sheepClothesData.length>n.length)for(var a=0;a=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../game/chessboard"),c=t("../game/crushArea"),s=t("../game/moveOutArea"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainLayer=null,e.chessboard=null,e.crushArea=null,e.moveOutArea=null,e.uiLayer=null,e.levelDataArray=null,e.gameIsWin=!1,e.popCallbackCollect=null,e.userData=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.initLevelLayer=function(t){this.levelDataArray=t;var e=t[0];this.gameIsWin=!1,this.chessboard.getComponent(r.default).init(e,this),this.crushArea.getComponent(c.default).initCrushArea(this),this.moveOutArea.getComponent(s.default).initMoveOutArea(this),this.node.active=!0,this.popCallbackCollect={continueCallBack:this.playNextLevel.bind(this),returnMainCallBack:this.showMainLayer.bind(this),rebornGameCallBack:this.rebornGameFunc.bind(this),giveUpCallBack:this.giveUpFunc.bind(this),restartCallBack:this.restartNowLevel.bind(this)}},e.prototype.hideLayer=function(){this.node.active=!1},e.prototype.playNextLevel=function(){},e.prototype.restartNowLevel=function(){},e.prototype.showSetUpLayer=function(){},e.prototype.showMainLayer=function(){},e.prototype.gameWinFunc=function(){},e.prototype.gameOverFunc=function(){console.log("\u6e38\u620f\u5931\u8d25",this.levelDataArray);var t={popName:"failPop",showPopData:{popCallbackCollect:this.popCallbackCollect}};cc.game.emit("showPop",t)},e.prototype.giveUpFunc=function(){cc.game.emit("closeAllPop")},e.prototype.rebornGameFunc=function(){console.log("\u8fd9\u91cc\u6709\u4e2a\u770b\u89c6\u9891"),cc.game.emit("closeAllPop"),this.crushArea.getComponent(c.default).rebornGameFunc()},e.prototype.crushBlockNode=function(t){this.crushArea.getComponent("crushArea").addCrushAreaCardNode(t);var e=this.chessboard.getComponent(r.default).checkGameWin(),o=this.moveOutArea.getComponent(s.default).checkGameWin();e&&o&&(console.log("\u6e38\u620f\u80dc\u5229\uff01"),this.gameIsWin=!0)},e.prototype.crushAnimateCallback=function(){this.gameIsWin&&this.gameWinFunc()},i([p(cc.Node)],e.prototype,"mainLayer",void 0),i([p(cc.Node)],e.prototype,"chessboard",void 0),i([p(cc.Node)],e.prototype,"crushArea",void 0),i([p(cc.Node)],e.prototype,"moveOutArea",void 0),i([p(cc.Node)],e.prototype,"uiLayer",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../game/chessboard":"chessboard","../game/crushArea":"crushArea","../game/moveOutArea":"moveOutArea"}],editorGameUiLayer:[function(t,e,o){"use strict";cc._RF.push(e,"74ee14/EMlALpPmiwWxivjL","editorGameUiLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../game/chessboard"),s=t("../game/crushArea"),l=t("./editorGameLayer"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.removeBtn=null,e.cancelBtn=null,e.randomBtn=null,e.setUpBtn=null,e.moveOutArea=null,e.chessboardNode=null,e.crushArea=null,e.paddingHeight=70,e.userData=null,e.isMoving=!1,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchStartScale(this.removeBtn),r.default.addbtnTouchEndScale(this.removeBtn,this.removeEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.removeBtn),r.default.addbtnTouchStartScale(this.cancelBtn),r.default.addbtnTouchEndScale(this.cancelBtn,this.cancelEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.cancelBtn),r.default.addbtnTouchStartScale(this.randomBtn),r.default.addbtnTouchEndScale(this.randomBtn,this.randomEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.randomBtn),r.default.addbtnTouchStartScale(this.setUpBtn),r.default.addbtnTouchEndScale(this.setUpBtn,this.setUpEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.setUpBtn)},e.prototype.initGameUi=function(){this.isMoving=!1;var t=this.removeBtn.height+this.paddingHeight,e=-(cc.winSize.height/2+this.removeBtn.height/2);this.removeBtn.y=e,this.cancelBtn.y=e,this.randomBtn.y=e,cc.tween(this.removeBtn).by(.4,{y:t}).start(),cc.tween(this.cancelBtn).by(.4,{y:t}).start(),cc.tween(this.randomBtn).by(.4,{y:t}).start()},e.prototype.removeGameUiBtn=function(){var t=this;this.isMoving=!0,this.removeBtn.height,this.paddingHeight;var e=-(cc.winSize.height/2+this.removeBtn.height/2);cc.tween(this.removeBtn).to(.4,{y:e}).start(),cc.tween(this.cancelBtn).to(.4,{y:e}).start(),cc.tween(this.randomBtn).to(.4,{y:e}).call(function(){t.isMoving=!1},this).start()},e.prototype.setUpEndFunc=function(){this.node.parent.getComponent(l.default).hideLayer()},e.prototype.removeEndFunc=function(){this.crushArea.getComponent(s.default).moveOutBlock()},e.prototype.cancelEndFunc=function(){this.crushArea.getComponent(s.default).cancelOneStep()},e.prototype.randomEndFunc=function(){this.chessboardNode.getComponent(c.default).updateBlockArea()},i([d(cc.Node)],e.prototype,"removeBtn",void 0),i([d(cc.Node)],e.prototype,"cancelBtn",void 0),i([d(cc.Node)],e.prototype,"randomBtn",void 0),i([d(cc.Node)],e.prototype,"setUpBtn",void 0),i([d(cc.Node)],e.prototype,"moveOutArea",void 0),i([d(cc.Node)],e.prototype,"chessboardNode",void 0),i([d(cc.Node)],e.prototype,"crushArea",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../game/chessboard":"chessboard","../game/crushArea":"crushArea","./editorGameLayer":"editorGameLayer"}],editorPopCommon:[function(t,e,o){"use strict";cc._RF.push(e,"ff5d494wMpLzo5RKnYVG0uZ","editorPopCommon");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=(r.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.start=function(){this.node.on(cc.Node.EventType.TOUCH_START,this.starFunc,this),this.node.on(cc.Node.EventType.TOUCH_END,this.endFunc,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this.moveFunc,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this.cancelFunc,this),this.node.on(cc.Node.EventType.MOUSE_DOWN,this.mouseDown,this),this.node.on(cc.Node.EventType.MOUSE_ENTER,this.mouseEnter,this),this.node.on(cc.Node.EventType.MOUSE_MOVE,this.mouseMove,this),this.node.on(cc.Node.EventType.MOUSE_LEAVE,this.mouseLeave,this)},e.prototype.starFunc=function(t){t.stopPropagation()},e.prototype.endFunc=function(t){t.stopPropagation()},e.prototype.moveFunc=function(t){t.stopPropagation()},e.prototype.cancelFunc=function(t){t.stopPropagation()},e.prototype.mouseDown=function(t){t.stopPropagation()},e.prototype.mouseEnter=function(t){t.stopPropagation()},e.prototype.mouseMove=function(t){t.stopPropagation()},e.prototype.mouseLeave=function(t){t.stopPropagation()},i([c],e)}(cc.Component));o.default=s,cc._RF.pop()},{}],editorTips:[function(t,e,o){"use strict";cc._RF.push(e,"fd10fv9y+ZEtaYplTuo+/L4","editorTips");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tipsLabel=null,e}return a(e,t),e.prototype.start=function(){cc.game.on("showTips",this.showTips,this)},e.prototype.showTips=function(t){this.tipsLabel.node.active=!0,this.tipsLabel.string=t+"",cc.tween(this.tipsLabel.node).delay(1.5).call(function(){this.tipsLabel.node.active=!1},this).start()},i([s(cc.Label)],e.prototype,"tipsLabel",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],enumConfig:[function(t,e,o){"use strict";cc._RF.push(e,"4c6b3ttKLVHnrBFJtUOvdja","enumConfig"),Object.defineProperty(o,"__esModule",{value:!0}),o.RefreshType=o.ShownType=o.MODULETYPE=o.LangEnum=o.STORAGEKEY=o.EMITKEY=o.GAMEBLOCK=o.GAMEOVER=o.WEEK=o.CALENDAR=o.DAYTYPE=o.CALENDARNAMES=o.CALENDARITEM=o.ROOMTYPE=o.MAINPAGE=o.GAMETYPE=o.GAMEENV=void 0,function(t){t[t.ENVDEVELOP=1]="ENVDEVELOP",t[t.ENVTRAIL=2]="ENVTRAIL",t[t.ENVRELEASE=3]="ENVRELEASE"}(o.GAMEENV||(o.GAMEENV={})),function(t){t[t.GAMEMAIN=0]="GAMEMAIN",t[t.GAMETOMB=1]="GAMETOMB",t[t.GAMELEVEL=2]="GAMELEVEL",t[t.GAMEDAILY=3]="GAMEDAILY",t[t.GAMETOPIC=4]="GAMETOPIC"}(o.GAMETYPE||(o.GAMETYPE={})),function(t){t[t.PAGERANK=0]="PAGERANK",t[t.PAGEHOUSE=1]="PAGEHOUSE",t[t.PAGEMAIN=2]="PAGEMAIN",t[t.PAGEDAILY=3]="PAGEDAILY",t[t.PAGECOLLECT=4]="PAGECOLLECT"}(o.MAINPAGE||(o.MAINPAGE={})),function(t){t[t.ROOMONE=1]="ROOMONE",t[t.ROOMTWO=2]="ROOMTWO",t[t.ROOMTHREE=3]="ROOMTHREE"}(o.ROOMTYPE||(o.ROOMTYPE={})),function(t){t[t.ITEMLAST=1]="ITEMLAST",t[t.ITEMOLD=2]="ITEMOLD",t[t.ITEMNOW=3]="ITEMNOW",t[t.ITEMFUTURE=4]="ITEMFUTURE",t[t.ITEMNEXT=5]="ITEMNEXT",t[t.ITEMNOR=6]="ITEMNOR",t[t.ITEMSELE=7]="ITEMSELE",t[t.ITEMSUC=8]="ITEMSUC"}(o.CALENDARITEM||(o.CALENDARITEM={})),o.CALENDARNAMES=["yyyy\u5e74","yyyy\u5e74mm\u6708","yyyy\u5e74mm\u6708dd\u65e5","m-d","yyyy-m-d","yyyymm","yyyymmdd","yyyy-mm-dd","yyyy-mm-dd hh:mm:ss","hh:mm:ss"],function(t){t[t.TODAY=0]="TODAY",t[t.YESTERDAY=1]="YESTERDAY",t[t.TOMORROW=2]="TOMORROW",t[t.NONE=3]="NONE"}(o.DAYTYPE||(o.DAYTYPE={})),function(t){t[t.YEAR=0]="YEAR",t[t.MONTH=1]="MONTH",t[t.DAY=2]="DAY",t[t.WEEK=3]="WEEK"}(o.CALENDAR||(o.CALENDAR={})),function(t){t[t.SUN=0]="SUN",t[t.MON=1]="MON",t[t.TUE=2]="TUE",t[t.WED=3]="WED",t[t.THU=4]="THU",t[t.FEI=5]="FEI",t[t.SAT=6]="SAT"}(o.WEEK||(o.WEEK={})),function(t){t[t.NONE=0]="NONE",t[t.LEVELWIN=1]="LEVELWIN",t[t.LEVELFAIL=2]="LEVELFAIL",t[t.DAILYWIN=3]="DAILYWIN",t[t.DAILYFAIL=4]="DAILYFAIL"}(o.GAMEOVER||(o.GAMEOVER={})),function(t){t[t.NONE=0]="NONE",t[t.BLOCKCOOKIE=1]="BLOCKCOOKIE",t[t.BLOCKGOLD=2]="BLOCKGOLD"}(o.GAMEBLOCK||(o.GAMEBLOCK={})),function(t){t.MAINUPDATEUI="MAINUPDATEUI",t.UPDATETABBARRECEIVE="UPDATETABBARRECEIVE",t.UPDATETABBARSEND="UPDATETABBARSEND",t.SHOWMASKLAYER="SHOWMASKLAYER",t.HIDEMASKLAYER="HIDEMASKLAYER",t.UPDATEPICTURE="UPDATEPICTURE",t.SHOWMAINTIPS="showMainTips",t.SHOWTRANSITLAYER="showTransitLayer",t.RESTARTNOWLEVEL="restartNowLevel",t.SHOWMAINLAYER="showMainLayer",t.SHOWPOP="showPop",t.CLOSEALLPOP="closeAllPop",t.UPDATEPOPDATA="UPDATEPOPDATA",t.TTSTARTRECORD="TTSTARTRECORD",t.TTSTOPRECORD="TTSTOPRECORD",t.TTSHARERECORD="TTSHARERECORD",t.UPDATERANKDATA="UPDATERANKDATA",t.SHOWUSERNODE="SHOWUSERNODE",t.USERINFOSUCCESS="USERINFOSUCCESS",t.RANKUSERINFOSUCCESS="RANKUSERINFOSUCCESS",t.BULLETSEND="BULLETSEND",t.BULLETSTATE="BULLETSTATE",t.GAMEOVERRESTART="GAMEOVERRESTART",t.GAMEOVERSUCCESS="GAMEOVERSUCCESS",t.BEGINGAME="BEGINGAME",t.SHOWMODULE="SHOWMODULE",t.TOPICACCOUNT="TOPICACCOUNT",t.TOPICRANKINFO="TOPICRANKINFO",t.TOPICPOSITION="TOPICPOSITION",t.CHANGESHEEPCLOTHES="CHANGESHEEPCLOTHES"}(o.EMITKEY||(o.EMITKEY={})),function(t){t.GAMEUSERLOCALDATA="gameUserLocalData",t.SPRINTREWARDKEY="SPRINTREWARDKEY",t.COOKIECOLLECTIONKEY="COOKIECOLLECTIONKEY",t.BULLETSWITCH="BULLETSWITCH",t.TAUSERINFO="TAUSERINFO",t.RANKDATA="RANKDATA",t.BULLETDATA="BULLETDATA",t.STAGEDATA="STAGEDATA",t.GAMEDAILYLEVELDATA="GAMEDAILYLEVELDATA",t.GAMETOPICLEVELDATA="GAMETOPICLEVELDATA",t.SHEEPCLOTHESDATA="SHEEPCLOTHESDATA",t.TOPICMATCHRECORD="TOPICMATCHRECORD",t.PROPGAMEDATA="PROPGAMEDATA",t.GAMELOADING="GAMELOADING"}(o.STORAGEKEY||(o.STORAGEKEY={})),function(t){t.zhCN="zh",t.enUS="en"}(o.LangEnum||(o.LangEnum={})),function(t){t[t.COMMON=0]="COMMON",t[t.TOPIC=1]="TOPIC"}(o.MODULETYPE||(o.MODULETYPE={})),function(t){t.friendRank="friendRank",t.todayRank="todayRank"}(o.ShownType||(o.ShownType={})),(o.RefreshType||(o.RefreshType={})).add="add",cc._RF.pop()},{}],"export-helper":[function(t,e,o){"use strict";cc._RF.push(e,"c00e4AjhHVJqoY4uheCWzQM","export-helper"),Object.defineProperty(o,"__esModule",{value:!0}),o.math=void 0;var n=cc.EPSILON,a=function(){function t(){}return t.approx=function(t,e,o){return o=o||n,Math.abs(t-e)<=o},t.lerp=function(t,e,o){return t+(e-t)*o},t.equals=function(t,e){return Math.abs(t-e)<=n*Math.max(1,Math.abs(t),Math.abs(e))},t}();o.math=a,cc._RF.pop()},{}],export:[function(t,e){"use strict";cc._RF.push(e,"aff89des1lECqfQBjTG1TrU","export"),cc._RF.pop()},{}],failPop:[function(t,e,o){"use strict";cc._RF.push(e,"015c33YCudGR46pDyw1Hejz","failPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../common/dataTs"),u=t("../common/enumConfig"),p=t("../common/native/share"),d=t("../common/native/tt-sdk"),h=t("../common/sdk"),f=t("../common/spine"),m=t("../manager/GameManager"),g=t("../manager/report-common"),y=t("../../script/manager/data-manager"),v=t("../utils/uma/uma-sdk"),b=t("../api/api-sheep"),_=cc._decorator,N=_.ccclass,C=_.property,w=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.fainNode=null,e.descLabel=null,e.failNumLabel=null,e.restartNode=null,e.backNode=null,e.tombNode=null,e.tombBubble=null,e.tombDesc=null,e.tombParticle=null,e.rankNode=null,e.rankPreLabel=null,e.rankNumLabel=null,e.rankLastLabel=null,e.shareNode=null,e.shareBtn=null,e.noShareBtn=null,e.shareCloseBtn=null,e.bottomShareBtn=null,e.rebornGameCallBack=null,e.giveUpCallBack=null,e.failNodeNum=400,e.popCallbackCollect=null,e.userData=null,e.showPopData=null,e.rankUserData=null,e.type=0,e}return a(e,t),e.prototype.start=function(){cc.game.on(u.EMITKEY.GAMEOVERSUCCESS,this.requestUserData.bind(this)),this.popCallbackCollect={buyCallBack:this.buyCallBackFunc.bind(this),freeCallBack:this.freeCallBackFunc.bind(this),exitCallBack:this.exitCallBackFunc.bind(this)},s.default.addTargetTouchUpInside(this.restartNode,this.restartNodeFunc.bind(this)),s.default.addTargetTouchUpInside(this.backNode,this.backNodeFunc.bind(this)),s.default.addbtnTouchStartScale(this.shareBtn),s.default.addbtnTouchEndScale(this.shareBtn,this.shareBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.shareBtn),s.default.addbtnTouchStartScale(this.noShareBtn),s.default.addbtnTouchEndScale(this.noShareBtn,this.noShareBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.noShareBtn),s.default.addbtnTouchStartScale(this.shareCloseBtn),s.default.addbtnTouchEndScale(this.shareCloseBtn,this.shareCloseBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.shareCloseBtn),s.default.addTargetTouchUpInside(this.bottomShareBtn,this.bottomShareBtnFunc.bind(this))},e.prototype.restartNodeFunc=function(){cc.game.emit(u.EMITKEY.RESTARTNOWLEVEL)},e.prototype.backNodeFunc=function(){cc.game.emit(u.EMITKEY.SHOWMAINLAYER)},e.prototype.bottomShareBtnFunc=function(){this.shareNode.active=!0,this.shareNode.stopAllActions(),cc.tween(this.shareNode).set({scale:0,opacity:0}).delay(1).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start()},e.prototype.shareBtnFunc=function(){var t=this;l.default.isPlatform(l.GDPlatform.tt)?d.default.shareTemplate(function(e){e&&(t.shareNode.active=!1,t.showButton())}):l.default.isPlatform(l.GDPlatform.wx)?p.default.shareMethod({success:function(){},fail:function(){},complete:function(){}}):this.node.active=!1},e.prototype.noShareBtnFunc=function(){this.shareNode.active=!1,this.showButton()},e.prototype.shareCloseBtnFunc=function(){this.shareNode.active=!1,this.showButton()},e.prototype.showFailPop=function(t){this.node.active=!0,this.showPopData=t,t.popCallbackCollect&&(this.rebornGameCallBack=t.popCallbackCollect.rebornGameCallBack,this.giveUpCallBack=t.popCallbackCollect.giveUpCallBack),this.restartNode.active=!1,this.backNode.active=!1,this.tombNode.active=!1,this.rankNode.active=!1,this.tombParticle.active=!1,this.shareNode.active=!1,this.bottomShareBtn.active=!1;var e=t.failType;this.failNumLabel.string="",console.log("failType = "+e),1==e?console.log("\u590d\u6d3b ###### "):2==e&&console.log("\u91cd\u65b0\u6311\u6218 ###### "),this.playShowAnimate()},e.prototype.requestUserData=function(){var t=this;if(this.failNumLabel.string="",m.default.getInstance().gameType==u.GAMETYPE.GAMEDAILY)b.default.getUserRankInfo(function(e){if(0==e.err_code&&e.data&&e.data.user){t.rankUserData=e.data.user;var o=e.data.user.fail;o&&0!=o||(o=1),t.failNumLabel.string="\u4eca\u65e5\u5df2\u6311\u6218 "+o+" \u6b21"}});else if(m.default.getInstance().gameType==u.GAMETYPE.GAMETOPIC){var e=l.default.getUserData().userID;b.default.getTopicUserInfo(e,function(e){if(0==e.err_code&&e.data&&e.data.user){t.rankUserData=e.data.user;var o=e.data.user.fail;o&&0!=o||(o=1),t.failNumLabel.string="\u4eca\u65e5\u5df2\u6311\u6218 "+o+" \u6b21"}})}},e.prototype.getTeamName=function(){var t=y.default.topicModel.name.split("#");return t.length>=2?1==y.default.topicModel.info.type?t[0]:t[1]:""},e.prototype.exitCallBackFunc=function(){},e.prototype.buyCallBackFunc=function(t,e){if(console.log("type = "+t),this.userData=l.default.getUserData(),this.userData.coin>=e){if(this.userData.coin-=e,m.default.getInstance().reportProperty.resurrection_coin_cost+=e,m.default.getInstance().levelWinDict.coin+=e,l.default.saveUserData(this.userData),m.default.getInstance().coinNum+=30,this.showTipPop(t),4==t&&m.default.getInstance().gameType==u.GAMETYPE.GAMELEVEL){console.log("\u5e38\u89c4\u5173\u5361\u590d\u6d3b\u8d2d\u4e70");var o=e+"";v.default.trackEvent("game_life_buy",{coinNum:o,c_coinNum:Number(o)})}}else cc.game.emit("showMainTips",c.default.instance.trans(r.GDLanguage.coin_inadequate))},e.prototype.freeCallBackFunc=function(t){var e=this;this.type=t;var o=l.default.GetVedioID();h.default.watchAdVideo({id:o,success:function(){e.watchSuc(1)},fail:function(){console.log("\u5931\u8d25")},nofit:function(){e.shareTTAction()}})},e.prototype.watchSuc=function(t){if(this.showTipPop(),cc.game.emit(u.EMITKEY.CLOSEALLPOP),m.default.getInstance().reportProperty.resurrection_ad_frequency++,4==this.type){m.default.getInstance().sheepMark.resurgenceCount++,console.log("\u590d\u6d3b\u770b\u89c6\u9891");var e=y.default.getTAUserInfo();1==t?g.default.reportTACommon("game_life_ad",e):2==t&&g.default.reportTACommon("game_life_share",e)}},e.prototype.shareTTAction=function(){var t=this;if(h.default.isPlatform(h.Platform.wx)){var e=l.default.GetVedioID(),o=l.default.getUserData().openid;h.default.share(o,e,function(){t.shareCbMethod()},function(){cc.game.emit(u.EMITKEY.SHOWMAINTIPS,"\u5206\u4eab\u5931\u8d25\uff0c\u8bf7\u5206\u4eab\u5fae\u4fe1\u7fa4\u4e0e\u597d\u53cbPK")})}else if(h.default.isPlatform(h.Platform.tt)){var n={popName:"shareNodePop",showPopData:{type:2,shareCb:this.shareCbMethod.bind(this)}};cc.game.emit("showPop",n)}},e.prototype.shareCbMethod=function(){console.log("\u5206\u4eab\u6210\u529f ######"),this.watchSuc(2)},e.prototype.showTipPop=function(){this.rebornGameCallBack&&this.rebornGameCallBack(),cc.game.emit("showMainTips",c.default.instance.trans(r.GDLanguage.game_continue))},e.prototype.playShowAnimate=function(){var t=this;this.fainNode.y=0,cc.tween(this.fainNode).to(.8,{y:this.failNodeNum},{easing:cc.easing.cubicOut}).call(function(){},this).delay(.1).call(function(){t.showPopData&&2==t.showPopData.failType?t.showRestartNode():m.default.getInstance().sheepMark.resurgenceCount>=1?t.showRestartNode():t.showPropPop(4)}).start()},e.prototype.showRestartNode=function(){console.log("\u91cd\u65b0\u6311\u6218");var t=y.default.getTAUserInfo();g.default.reportTACommon("game_over",t),cc.game.emit(u.EMITKEY.GAMEOVERRESTART),this.tombNode.active=!0,this.rankUserData?this.showFailTomb(this.rankUserData.fail):this.showFailTomb(1)},e.prototype.setupDescMethods=function(t){var e=["12345\uff0c\u4e0a\u5c71\u6253\u8001\u864e\uff0c\u8981\u60f3\u8fc7\u6b64\u5173\uff0c\u5c31\u8981\u809d\u809d\u809d","\u4eba\u751f\u5f97\u610f\u987b\u5c3d\u6b22\uff0c\u4e0d\u8fc7\u6b64\u5173\u5fc3\u4e0d\u7518\uff01","\u6211\u53ea\u662f\u4e3a\u4e86\u5792\u575f\u5934\uff0c\u5e76\u4e0d\u662f\u8981\u8fc7\u5173\uff01","\u4e3a\u6211\u7701\u4e89\u5149\uff0c\u5fc5\u987b\u62ff\u4e0b","\u4ee5\u6211\u7684\u667a\u6167\u62ff\u4e0b\u5b83\uff0c\u5e94\u8be5\u4e0d\u6210\u95ee\u9898","\u5931\u8d25\u662f\u6210\u529f\u4e4b\u6bcd\uff0c\u7f8a\u513f\u5b50\u8fd8\u5728\u7b49\u7740\u4f60\uff01","\u4e0d\u591f\uff01\u8fd8\u4e0d\u591f\uff01\u6211\u8fd8\u80fd\u518d\u809d100\u56de\u5408","\u6211\u90fd\u6b7b\u8fd9\u4e48\u591a\u6b21\u5566\uff0c\u65f6\u95f4\u8fc7\u7684\u771f\u5feb\uff01","\u9769\u547d\u5c1a\u672a\u6210\u529f\uff0c\u540c\u5fd7\u4ecd\u9700\u52aa\u529b\uff01","\u5dee\u4e00\u70b9\u5c31\u8fc7\u4e86\uff0c\u4f60\u8bf4\u6c14\u4eba\u4e0d\uff01","\u4f60\u786e\u5b9a\u8fd9\u4e48\u6c14\u4eba\u7684\u6e38\u620f\uff0c\u4e0d\u53bb\u6c14\u6c14\u670b\u53cb\uff1f","\u53c8\u5931\u8d25\u4e86\uff0c\u592a\u96be\u4e86","\u53c8\u53c8\u53c8\u5931\u8d25\u4e86\uff0c\u518d\u8bd5\u6700\u540e\u4e00\u6b21","\u53c8\u53c8\u53c8\u53c8\u53c8\u5931\u8d25\u4e86\uff0c\u8981\u4e0d\u653e\u5f03\u5427","\u53c8\u53c8\u53c8\u53c8\u53c8\u53c8\u5931\u8d25\u4e86\uff0c\u8fc7\u4e0d\u53bb\u5c31\u4e0d\u7761\u89c9\u4e86","**\u7b56\u5212\u786e\u5b9a\u8fd9\u662f\u53ef\u4ee5\u8fc7\u7684\u4e48\uff1f","*************\u7b56\u5212\uff0c******\u6bcd\uff01","\u653e\u5f03\u5427\uff0c\u4f55\u82e6\u4e3a\u96be\u81ea\u5df1\u5462","\u4e2d\u56fd\u4eba\u4e0d\u6b3a\u8d1f\u4e2d\u56fd\u4eba\uff0c\u7b56\u5212\u4f60*****","\u6d3b\u7740\u4e0d\u597d\u4e48\uff0c\u975e\u5f97\u8981\u6c14\u6b7b\u81ea\u5df1\u4e48\uff1f","\u751f\u5f53\u4f5c\u7f8a\u6770\uff0c\u6b7b\u4ea6\u4e3a\u7891\u96c4\uff01","\u6ee1\u773c\u5192\u91d1\u661f\uff0c\u6211\u7891\u4eae\u6676\u6676\uff01","\u5f53\u4e0d\u4e86\u7f8a\uff0c\u6211\u4e5f\u8981\u505a\u6211\u670b\u53cb\u5708\u6700\u4eae\u7684\u7891\uff01\u8036\uff01","\u8fd8\u5dee\u4e00\u70b9\uff1f\u6211\u4fe1\u4f60\u4e2a\u9b3c\uff0c\u4f60\u4e2a\u7cdf\u8001\u5934\u5b50***\uff01","\u554a\uff01\u554a\uff01\u554a\uff01\u554a\uff01\u554a\uff01wwwwww\uff01","\u6ca1\u4e8b\uff0c\u4ed6\u4eec\u4e5f\u8fc7\u4e0d\u4e86\uff01","\u4f60\u7ed9\u6211\u7b49\u7740\uff0c\u6211\u8ba9\u6211\u4e03\u5927\u59d1\u516b\u5927\u59e8\u90fd\u6765\uff0c\u6211\u5c31\u4e0d\u4fe1\u4e86\uff01"],o=["\u65e2\u7136\u9009\u62e9\u4e86\uff0c\u5c31\u9700\u8981\u65e0\u6761\u4ef6\u7684\u8fc7\u5173","\u7f8a\u7f8a\u4e91\u68af\uff0c\u6211\u6765\u4e86\uff01","\u6211\u4e5f\u8981\u7f8a\uff5e\u7f8a\uff5e\u7f8a\uff5e","\u4e3a\u4e86\u9635\u8425\u800c\u6218\uff0c\u8d25\u800c\u4e0d\u9981(nei)\uff01","\u5373\u4f7f\u7f8a\u7fa4\u6ca1\u6709\u6211\uff0c\u57fa\u5730\u4e5f\u9700\u8981\u6211\u53bb\u5efa\u8bbe\uff01","\u4e00\u6b21\u5c31\u597d\uff0c\u8ba9\u6211\u5f53\u7f8a\u53bb\u4ee3\u8868\u4ee3\u8868\u5427\uff01","\u4e24\u519b\u5bf9\u5792\u5c31\u662f\u5e72\uff0c\u4e0d\u80fd\u6002\uff0ccome\uff5eon\uff5e\u5317\u9f3b\uff01","\u4e0d\u80fd\u6da8\u4e86\u5bf9\u9762\u6c14\u52bf\uff0c\u706d\u4e86\u81ea\u5df1\u5a01\u98ce\uff01","\u5bf9\u9762\u662f\u4e2a\u5c41\uff01\u518d\u6765\u4e00\u6b21\uff0c\u6211\u4e0d\u80fd\u5f53\u5c41\uff01","\u5f53\u7f8a\u6211\u4e0d\u884c\uff0c\u5632\u8bbd\u5bf9\u65b9\u6211\u884c\uff01","\u91cd\u5728\u53c2\u4e0e\uff0c\u8f93\u8d62\u4e0d\u91cd\u8981\uff0c\u4e48\uff1f\u4e0d\u80fd\u8f93\uff01","\u4e0d\u4e89\u9992\u5934\u84b8\u53e3\u6c14\uff0c\u5144\u5f1f\u4eec\u7b49\u7740\u6211\uff01","\u8bf4\u670d\u81ea\u5df1\u518d\u6765\u4e00\u6b21\uff0c\u8bf4\u670d\u5bf9\u9762\u653e\u5f03\uff01","\u6211\u611f\u89c9\u6211\u5df2\u7ecf\u5c3d\u529b\u4e86\uff0c\u5144\u5f1f\u4eec\u52a0\u6cb9\uff01","\u8fd9\u4e5f\u592a\u96be\u4e86\uff0c\u7f8a\u961f\u8fdb\u5165\u592a\u7a7a\uff0c\u5c31\u5dee\u6211\u4e86\uff01","\u7f8a\u7f8a\u8fd9\u4e48\u53ef\u7231\uff0c\u7b56\u5212\u662f\u4e2a*****x\uff01","\u5173\u5361\u597d\u96be\uff01\u7b56\u5212\u597d\u574f\uff01\u4f46\u662f\u6211\u597d\u559c\u6b22\u554a\uff01\u54c8\u54c8\uff5e","\u4e0d\u96be\u4e0d\u80fd\u51f8\u663e\u6211\u7684\u667a\u6167\uff0c\u518d\u6765\u4e00\u6b21\uff01","\u4e0d\u96be\u4e0d\u80fd\u51f8\u663e\u6211\u7684\u667a\u6167\uff0c\u518d\u6765\u4e00\u6b21\uff01","\u4e0d\u96be\u4e0d\u80fd\u51f8\u663e\u6211\u7684\u667a\u6167\uff0c\u518d\u6765\u4e00\u6b21\uff01"];if(1<=t&&t<=8){var n=1;return 1==t?n=s.default.randomNum(0,5):2==t?n=s.default.randomNum(2,8):3==t?n=s.default.randomNum(3,10):4==t?n=s.default.randomNum(4,12):5==t?n=s.default.randomNum(8,14):6==t?n=s.default.randomNum(10,16):7==t?n=s.default.randomNum(14,18):8==t?n=s.default.randomNum(15,20):9==t?n=s.default.randomNum(15,21):10==t?n=s.default.randomNum(15,22):11==t&&(n=s.default.randomNum(15,27)),m.default.getInstance().gameType==u.GAMETYPE.GAMEDAILY?(n>=e.length&&(n=e.length-1),e[n]):m.default.getInstance().gameType==u.GAMETYPE.GAMETOPIC?(n>=o.length&&(n=o.length-1),o[n]):""}},e.prototype.showFailTomb=function(t){this.tombBubble.scale=0,cc.tween(this.tombBubble).to(.3,{scale:1},{easing:cc.easing.backOut}).start();var e=y.default.getDeadNum(t),o="Dead"+e;if(this.tombNode.getComponent(f.default).play(o,0),this.tombDesc.string=this.setupDescMethods(e),this.rankNode.active=!0,cc.tween(this.rankNode).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start(),this.rankPreLabel.string="",this.rankLastLabel.string="",this.rankNumLabel.string="",m.default.getInstance().gameType==u.GAMETYPE.GAMEDAILY){this.rankPreLabel.string="\u60a8\u6240\u5728\u5730\u533a\u4f9d\u7136\u662f\u7b2c ",this.rankLastLabel.string=" \u540d";var n=m.default.getInstance().rankInfo.user.index;this.rankNumLabel.string=n+""}else m.default.getInstance().gameType==u.GAMETYPE.GAMETOPIC&&(this.rankPreLabel.string=this.getTeamName()+"\u7f8a\u961f\u5df2\u6709 ",this.rankLastLabel.string=" \u7f8a",y.default.topicRankInfo&&y.default.topicModel&&(1==y.default.topicModel.info.type?this.rankNumLabel.string=y.default.topicRankInfo.tomb?y.default.topicRankInfo.tomb.length+"":"0":this.rankNumLabel.string=y.default.topicRankInfo.taoist?y.default.topicRankInfo.taoist.length+"":"0"));y.default.isUpgradeNum(t+1)?(this.tombParticle.active=!0,this.tombParticle.getComponent(cc.ParticleSystem).resetSystem(),this.shareNode.active=!0,cc.tween(this.shareNode).set({scale:0,opacity:0}).delay(1).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start()):this.showButton()},e.prototype.showButton=function(){var t=this;this.restartNode.activeInHierarchy&&this.backNode.activeInHierarchy&&this.bottomShareBtn.activeInHierarchy?console.log("\u5df2\u5c55\u793ashow button"):(this.restartNode.scale=0,this.backNode.scale=0,this.bottomShareBtn.scale=0,this.restartNode.active=!0,this.backNode.active=!0,this.bottomShareBtn.active=!0,setTimeout(function(){cc.tween(t.restartNode).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start(),cc.tween(t.backNode).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start(),cc.tween(t.bottomShareBtn).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start()},1e3))},e.prototype.hideFailPop=function(){this.node.active=!1},e.prototype.continueFunc=function(){this.showPropPop(4)},e.prototype.giveUpFunc=function(){this.giveUpCallBack&&this.giveUpCallBack()},e.prototype.showPropPop=function(t){var e={popName:"getPropPop",showPopData:{popCallbackCollect:this.popCallbackCollect,popType:t,coinNum:m.default.getInstance().coinNum}};cc.game.emit("showPop",e)},i([C(cc.Node)],e.prototype,"fainNode",void 0),i([C(cc.Label)],e.prototype,"descLabel",void 0),i([C(cc.Label)],e.prototype,"failNumLabel",void 0),i([C({type:cc.Node,tooltip:"\u91cd\u65b0\u6311\u6218"})],e.prototype,"restartNode",void 0),i([C({type:cc.Node,tooltip:"\u8fd4\u56de\u7f8a\u7fa4"})],e.prototype,"backNode",void 0),i([C({type:cc.Node,tooltip:"\u5893\u7891spine"})],e.prototype,"tombNode",void 0),i([C({type:cc.Node,tooltip:"\u5893\u7891\u6c14\u6ce1"})],e.prototype,"tombBubble",void 0),i([C({type:cc.Label,tooltip:"\u5893\u7891\u63cf\u8ff0"})],e.prototype,"tombDesc",void 0),i([C({type:cc.Node,tooltip:"\u5893\u7891\u7c92\u5b50"})],e.prototype,"tombParticle",void 0),i([C({type:cc.Node,tooltip:"\u6392\u540dbase"})],e.prototype,"rankNode",void 0),i([C({type:cc.Label,tooltip:"\u6392\u540d"})],e.prototype,"rankPreLabel",void 0),i([C({type:cc.Label,tooltip:"\u6392\u540d"})],e.prototype,"rankNumLabel",void 0),i([C({type:cc.Label,tooltip:"\u6392\u540d"})],e.prototype,"rankLastLabel",void 0),i([C(cc.Node)],e.prototype,"shareNode",void 0),i([C(cc.Node)],e.prototype,"shareBtn",void 0),i([C(cc.Node)],e.prototype,"noShareBtn",void 0),i([C(cc.Node)],e.prototype,"shareCloseBtn",void 0),i([C({type:cc.Node,tooltip:"\u5e95\u90e8\u5206\u4eab\u6309\u94ae"})],e.prototype,"bottomShareBtn",void 0),i([N],e)}(cc.Component);o.default=w,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../../script/manager/data-manager":"data-manager","../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/share":"share","../common/native/tt-sdk":"tt-sdk","../common/sdk":"sdk","../common/spine":"spine","../manager/GameManager":"GameManager","../manager/report-common":"report-common","../utils/uma/uma-sdk":"uma-sdk"}],"flying-item-pop-coin":[function(t,e,o){"use strict";cc._RF.push(e,"f8882Kqr8ZNno3Bla7FeEvc","flying-item-pop-coin");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/enumConfig"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.tipsFontLabel=null,e}return a(e,t),e.prototype.start=function(){this.popNode.active=!1,cc.game.on(r.EMITKEY.SHOWMAINTIPS,this.showTips,this)},e.prototype.showTips=function(t){var e=this;this.popNode.stopAllActions(),this.popNode.active=!0,this.tipsFontLabel.string=t+"",this.popNode.y=-100,cc.tween(this.popNode).set({opacity:255}).to(.3,{y:0}).delay(1).to(.3,{opacity:0}).call(function(){e.popNode.active=!1},this).start()},i([l(cc.Node)],e.prototype,"popNode",void 0),i([l(cc.Label)],e.prototype,"tipsFontLabel",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../common/enumConfig":"enumConfig"}],"game-top-ui":[function(t,e,o){"use strict";cc._RF.push(e,"011b2otLrtL36irPwLg72Hm","game-top-ui");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cookieNode=null,e.cookieImg=null,e.cookieNum=null,e.cookiePrefab=null,e.cookieTrailing=null,e.cookieCurCount=0,e.cookieAllCount=0,e.goldBlockCoinCount=0,e.ribbonBoxCount=0,e}return a(e,t),e.prototype.start=function(){},i([s(cc.Node)],e.prototype,"cookieNode",void 0),i([s(cc.Node)],e.prototype,"cookieImg",void 0),i([s(cc.Node)],e.prototype,"cookieNum",void 0),i([s(cc.Prefab)],e.prototype,"cookiePrefab",void 0),i([s(cc.Prefab)],e.prototype,"cookieTrailing",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],gameLayer:[function(t,e,o){"use strict";cc._RF.push(e,"4f0043pQOFO24XT2d3lGc3T","gameLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/native/audio"),l=t("../main/mainLayer"),u=t("./chessboard"),p=t("./crushArea"),d=t("./gameUiLayer"),h=t("./moveOutArea"),f=t("../common/spine"),m=t("../common/enumConfig"),g=t("../manager/GameManager"),y=t("../manager/DateManager"),v=t("../utils/uma/uma-sdk"),b=t("../../i18n/i18n"),_=t("../../i18n/gd_language"),N=t("../common/native/native-bridge"),C=t("../manager/report-common"),w=t("../manager/data-manager"),P=t("../api/api-sheep"),k=cc._decorator,S=k.ccclass,D=k.property,A=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainLayer=null,e.bgLayer=null,e.chessboard=null,e.crushArea=null,e.moveOutArea=null,e.uiLayer=null,e.gameTopUi=null,e.gameWin=null,e.gameNext=null,e.levelDataArray=null,e.gameIsWin=!1,e.popCallbackCollect=null,e.userData=null,e.playLevelNum=0,e.gameIsStop=!1,e.chessY=0,e.beginBGM=!1,e.timer=0,e.countdown=0,e}return a(e,t),e.prototype.onEnable=function(){cc.audioEngine.setMusicVolume(1),cc.game.setFrameRate(60),this.countdown=0,g.default.getInstance().playGameCount++;var t=y.default.format(m.CALENDARNAMES[6],new Date);g.default.getInstance().gameBeginDate=t},e.prototype.update=function(t){this.timer+=t,this.timer>=1&&0==this.gameIsStop&&(this.timer=0,this.countdown++)},e.prototype.start=function(){cc.game.on(m.EMITKEY.RESTARTNOWLEVEL,this.restartNowLevel,this),cc.game.on(m.EMITKEY.SHOWMAINLAYER,this.showMainLayer,this),cc.game.on(m.EMITKEY.GAMEOVERRESTART,this.gameOverRestartFunc,this),r.default.addbtnTouchStartScale(this.gameWin),r.default.addbtnTouchEndScale(this.gameWin,this.gameWinFunc.bind(this)),r.default.addbtnTouchCancelScale(this.gameWin),r.default.addbtnTouchStartScale(this.gameNext),r.default.addbtnTouchEndScale(this.gameNext,this.gameNextFunc.bind(this)),r.default.addbtnTouchCancelScale(this.gameNext),cc.sys.isBrowser?(this.gameWin.active=!0,this.gameNext.active=!0):(this.gameWin.active=!1,this.gameNext.active=!1)},e.prototype.onDisable=function(){this.chessY=0},e.prototype.adaptScreen=function(){var t=this;setTimeout(function(){g.default.getInstance().globalData.isFullScreen&&0==t.chessY&&t.chessboard.y>400&&(t.chessboard.y-=100,t.chessY=t.chessboard.y)},200),setTimeout(function(){t.onPointIsContains()},100),g.default.getInstance().gameType==m.GAMETYPE.GAMEDAILY?(this.bgLayer.color=new cc.Color(195,254,139),this.bgLayer.getChildByName("glassSP").getComponent(f.default).play("2Grass",0)):g.default.getInstance().gameType==m.GAMETYPE.GAMETOPIC&&(this.bgLayer.color=new cc.Color(65,167,143),this.bgLayer.getChildByName("glassSP").getComponent(f.default).play("2Grass2",0))},e.prototype.onPointIsContains=function(){this.chessboard.getBoundingBoxToWorld();for(var t=r.default.getWorldPosition(this.moveOutArea),e=this.chessboard.getBoundingBoxToWorld();e.contains(t);){if(this.chessboard.scale-=.05,this.chessboard.scale<.5){console.log("\u8d85\u51fa\u6700\u5c0fscale \u9000\u51fa ###### ");break}e=this.chessboard.getBoundingBoxToWorld(),console.log("\u6211\u5728\u8282\u70b9\u7684\u5185\u90e8 ###### ")}console.log("\u6211\u5728\u8282\u70b9\u7684\u5916\u90e8 ###### ",this.chessboard.scale)},e.prototype.gameNextFunc=function(){if(this.playLevelNum=3&&(t=Number(n[2]))}c.default.getLevelByID(t,function(t){if(t.length<1)return cc.game.emit("showMainTips",b.default.instance.trans(_.GDLanguage.level_inadequate)),void e.showMainLayer(m.GAMEOVER.NONE);cc.game.emit("closeAllPop"),e.initLevelLayer(t)})},e.prototype.playNumberfunc=function(){if(this.levelDataArray.length<1)this.showMainLayer(m.GAMEOVER.NONE);else{cc.game.emit("closeAllPop"),g.default.getInstance().gameType==m.GAMETYPE.GAMEDAILY?this.uiLayer.getComponent(d.default).recoverTime(1):g.default.getInstance().gameType==m.GAMETYPE.GAMETOPIC&&this.uiLayer.getComponent(d.default).recoverTime(1);var t=w.default.getGameLevelData();t?(console.log("\u83b7\u53d6\u5173\u5361\u7f13\u5b58\u6570\u636e ###### "),this.initLevelLayer(t)):this.initLevelLayer(this.levelDataArray)}},e.prototype.showSetUpLayer=function(){console.log("\u6253\u5f00\u8bbe\u7f6e\u9875\u9762");var t={popName:"setupPop",showPopData:{popCallbackCollect:this.popCallbackCollect,setupType:2}};cc.game.emit("showPop",t),this.gameIsStopFunc(!0)},e.prototype.showMainLayer=function(t){void 0===t&&(t=m.GAMEOVER.NONE),console.log("\u6253\u5f00\u4e3b\u9875\u9762 = "+t);var e=this;cc.game.emit(m.EMITKEY.SHOWTRANSITLAYER,function(o){console.log("\u53ef\u4ee5\u6253\u5f00\u4e86 gamelayer"),cc.game.emit("closeAllPop"),e.gameIsStopFunc(!0),e.mainLayer.getComponent(l.default).showMainLayer(t),e.node.active=!1,o()})},e.prototype.gameOverFunc=function(t){void 0===t&&(t=1),this.gameOverState(2),console.log("\u6e38\u620f\u5931\u8d25 failType = ",t);var e={popName:"failPop",showPopData:{popCallbackCollect:this.popCallbackCollect,failType:t}};cc.game.emit("showPop",e),this.gameIsStopFunc(!0)},e.prototype.gameOverState=function(t){g.default.getInstance().game_over=t,1==t&&this.reportData(t)},e.prototype.gameOverRestartFunc=function(){this.reportData(2)},e.prototype.reportData=function(t){var e=this,o=1;for(var n in g.default.getInstance().sheepMark){var a=g.default.getInstance().sheepMark[n];if(Number(a)>0){o=2;break}}for(var i=c.default.getSheepClothesData(),r=1,s=0;s=t){var e=c.default.getSprintRewardData();e.winNum+=1,e.rewardProgress<3?(e.rewardProgress+=1,3==e.rewardProgress&&(e.winBox+=1)):e.rewardProgress=1,e.isGameEd=0,c.default.setSprintRewardData(e);var o=[3,6,9,12,15,25,50,100];for(var n in o)if(e.winNum==o[n]){var a="richroad_level"+e.winNum,i=c.default.getUserData().playLevelId+"",r={levelNum:i,c_levelNum:Number(i)};v.default.trackEvent(a,r),console.log("\u8fde\u80dc ########",a,r);break}}this.userData=c.default.getUserData(),console.log("\u6e38\u620f\u83b7\u80dc\uff0c\u5173\u5361\u4e3a\uff1a",this.levelDataArray,this.userData.playLevelId);var s={af_level:this.userData.playLevelId};N.default.leitingReport("af_levels_achieved",s);var l=[10,20,30,40,50,60,70,80,90,100,120,150,200];for(var n in l)if(this.userData.playLevelId==l[n]){var u={af_level:this.userData.playLevelId};N.default.leitingReport("af_level"+this.userData.playLevelId,u),console.log("af_level"+this.userData.playLevelId);break}this.crushArea.getComponent(p.default).hideCrushArea(),this.uiLayer.getComponent(d.default).removeGameUiBtn();var h=c.default.getRewardBoxData(this.userData.playLevelId),f=this.userData.playLevelId>=5;c.default.gameLevelWin(f,h);var y=c.default.getCollectionUnlockData();console.log("unlockObj:",y);var b={popName:"winPop",showPopData:{popCallbackCollect:this.popCallbackCollect,winRewardObj:h,unlockObj:y,time:this.countdown}};cc.game.emit(m.EMITKEY.SHOWPOP,b),this.gameIsStopFunc(!0)}else g.default.getInstance().gameType==m.GAMETYPE.GAMEDAILY?(this.userData=c.default.getUserData(),h=c.default.getRewardBoxData(this.userData.playLevelId),c.default.gameLevelWin(!0,h),y=c.default.getCollectionUnlockData(),b={popName:"winPop",showPopData:{popCallbackCollect:this.popCallbackCollect,winRewardObj:h,unlockObj:y,time:this.countdown}},cc.game.emit(m.EMITKEY.SHOWPOP,b),this.crushArea.getComponent(p.default).hideCrushArea(),this.uiLayer.getComponent(d.default).removeGameUiBtn(),this.gameIsStopFunc(!0),this.updateTodayWin(!0)):g.default.getInstance().gameType==m.GAMETYPE.GAMETOPIC&&(b={popName:"winPop",showPopData:{popCallbackCollect:this.popCallbackCollect,time:this.countdown}},cc.game.emit(m.EMITKEY.SHOWPOP,b),this.crushArea.getComponent(p.default).hideCrushArea(),this.uiLayer.getComponent(d.default).removeGameUiBtn(),this.gameIsStopFunc(!0))},e.prototype.updateTodayWin=function(t){if(console.log("isWin = ",t),0!=this.checkIsTodayWin()){var e=y.default.format(m.CALENDARNAMES[5],new Date),o=y.default.format(m.CALENDARNAMES[6],new Date),n=c.default.getDailyData(e,o);n?n.isWin=t:n={dailyID:o,isWin:t,unLimitVideo:0,sheepNum:-1},c.default.saveDailyData(e,o,n)}else console.log("checkIsTodayWin update cache ######## false")},e.prototype.giveUpFunc=function(t){void 0===t&&(t=0),g.default.getInstance().gameType==m.GAMETYPE.GAMELEVEL&&(c.default.getSprintRewardData().winNum>0&&cc.game.emit("showPop",{popName:"sprintRewardPop",showPopData:{popCallbackCollect:null,popType:2}}),g.default.getInstance().cookieDict.cookieCurCount>0&&cc.game.emit("showPop",{popName:"loseCookiePop",showPopData:{popCallbackCollect:null,popType:0}}));var e={popName:"loseLovePop",showPopData:{popCallbackCollect:this.popCallbackCollect,popType:t}};cc.game.emit("showPop",e),this.gameIsStopFunc(!0)},e.prototype.rebornGameFunc=function(){console.log("\u8fd9\u91cc\u6709\u4e2a\u770b\u89c6\u9891"),cc.game.emit("closeAllPop"),this.gameIsStopFunc(!1),g.default.getInstance().gameType==m.GAMETYPE.GAMEDAILY&&this.uiLayer.getComponent(d.default).recoverTime(),this.crushArea.getComponent(p.default).rebornGameFunc()},e.prototype.crushBlockNode=function(t){this.crushArea.getComponent("crushArea").addCrushAreaCardNode(t);var e=this.chessboard.getComponent(u.default).checkGameWin(),o=this.moveOutArea.getComponent(h.default).checkGameWin();e&&o&&(console.log("\u6e38\u620f\u80dc\u5229\uff01"),this.gameIsWin=!0,this.gameIsStopFunc(!0))},e.prototype.crushAnimateCallback=function(){this.gameIsWin&&(this.playLevelNum=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/enumConfig"),l=t("../common/native/audio"),u=t("../common/sdk"),p=t("../manager/DateManager"),d=t("../manager/GameManager"),h=t("./chessboard"),f=t("./crushArea"),m=t("./gameLayer"),g=t("../../pre/item/prop-prefab"),y=t("../utils/uma/uma-sdk"),v=t("../manager/report-common"),b=t("../../i18n/i18n"),_=t("../../i18n/gd_language"),N=t("../manager/data-manager"),C=cc._decorator,w=C.ccclass,P=C.property,k=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.removeBtn=null,e.removeBg1=null,e.removeMask=null,e.removeNumLabel=null,e.removeVedio=null,e.cancelBtn=null,e.cancelBg1=null,e.cancelMask=null,e.cancelNumLabel=null,e.cancelVedio=null,e.randomBtn=null,e.randomBg1=null,e.randomMask=null,e.randomNumLabel=null,e.randomVedio=null,e.setUpBtn=null,e.moveOutArea=null,e.chessboardNode=null,e.crushArea=null,e.levelNode=null,e.levelNumLabel=null,e.stageOneNode=null,e.stageTwoNode=null,e.maskStage=null,e.propPrefab=null,e.paddingHeight=25,e.userData=null,e.isMoving=!1,e.timer=0,e.countdownOrogin=0,e.countdown=0,e.countdownAdd=60,e.gameIsStop=!1,e.popCallbackCollect=null,e.getPropType=0,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchStartScale(this.removeBtn),r.default.addbtnTouchEndScale(this.removeBtn,this.removeEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.removeBtn),r.default.addbtnTouchStartScale(this.cancelBtn),r.default.addbtnTouchEndScale(this.cancelBtn,this.cancelEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.cancelBtn),r.default.addbtnTouchStartScale(this.randomBtn),r.default.addbtnTouchEndScale(this.randomBtn,this.randomEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.randomBtn),r.default.addbtnTouchStartScale(this.setUpBtn),r.default.addbtnTouchEndScale(this.setUpBtn,this.setUpEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.setUpBtn),this.popCallbackCollect={buyCallBack:this.buyCallBackFunc.bind(this),freeCallBack:this.freeCallBackFunc.bind(this),exitCallBack:this.exitCallBackFunc.bind(this)}},e.prototype.exitCallBackFunc=function(){this.gameIsStopFunc(!1)},e.prototype.setTimeByLevel=function(t,e){var o=t.timeArray;if(e>o.length)cc.game.emit("showMainTips",b.default.instance.trans(_.GDLanguage.level_inadequate));else{var n=o[e-1];this.countdown=n,this.countdownOrogin=n,console.log("countdowm = "+n),this.updateTime(this.countdown)}},e.prototype.update=function(t){d.default.getInstance().gameType==s.GAMETYPE.GAMEDAILY&&0==this.gameIsStop&&(this.timer+=t,this.timer>=1&&(this.timer=0,this.countdown--,this.updateTime(this.countdown)))},e.prototype.updateTime=function(){},e.prototype.gameIsWin=function(){if(d.default.getInstance().gameType==s.GAMETYPE.GAMELEVEL){if(d.default.getInstance().levelWinDict.remove>0){var t=d.default.getInstance().levelWinDict.remove+"";y.default.trackEvent("game_finish_skill_1",{num:t,c_num:Number(t)})}if(d.default.getInstance().levelWinDict.cancel>0){var e=d.default.getInstance().levelWinDict.cancel+"";y.default.trackEvent("game_finish_skill_2",{num:e,c_num:Number(e)})}if(d.default.getInstance().levelWinDict.random>0){var o=d.default.getInstance().levelWinDict.random+"";y.default.trackEvent("game_finish_skill_3",{num:o,c_num:Number(o)})}}else{var n=this.countdown<=0?0:this.countdown,a=n+"";d.default.getInstance().reportProperty.dailyWin_time_remaining=n,y.default.trackEvent("daily_finishtime",{remainTime:a,c_remainTime:Number(a)})}},e.prototype.gameIsStopFunc=function(t){this.gameIsStop=t},e.prototype.recoverTime=function(t){void 0===t&&(t=0),this.countdown<=0&&(this.countdown=this.countdownAdd),1==t&&(this.countdown=this.countdownOrogin),this.updateTime(this.countdown)},e.prototype.initGameUi=function(t){for(var e in this.userData=c.default.getUserData(),this.userData.prop_cancel=0,this.userData.prop_random=0,this.userData.prop_remove=0,c.default.saveUserData(this.userData),d.default.getInstance().sheepMark)d.default.getInstance().sheepMark[e]=0;this.isMoving=!1;var o=this.removeBtn.height+this.paddingHeight,n=-(cc.winSize.height/2+this.removeBtn.height/2);this.removeBtn.y=n,this.cancelBtn.y=n,this.randomBtn.y=n,cc.tween(this.removeBtn).by(.4,{y:o}).start(),cc.tween(this.cancelBtn).by(.4,{y:o}).start(),cc.tween(this.randomBtn).by(.4,{y:o}).start(),this.setGameLayerUiData(),t.length>1?(this.stageTwoNode.active=!0,this.stageOneNode.active=!1):(this.stageTwoNode.active=!1,this.stageOneNode.active=!1)},e.prototype.setLevelStage=function(t){if(0==t?this.stageOneNode.active=!1:1==t&&(this.stageOneNode.active=!0),this.levelNode.active=!0,d.default.getInstance().gameType==s.GAMETYPE.GAMEDAILY){if(p.default.format(s.CALENDARNAMES[4],p.default.getInstance().selDate).split("-").length<3)return;this.levelNumLabel.string="\u6bcf\u65e5\u4e00\u5173"}else this.levelNode.active=!0},e.prototype.setGameLayerUiData=function(){this.userData=c.default.getUserData(),p.default.format(s.CALENDARNAMES[4],p.default.getInstance().selDate).split("-").length<3||(this.levelNumLabel.string="\u6bcf\u65e5\u4e00\u5173",this.userData.prop_remove>=1?(this.removeNumLabel.string=""+this.userData.prop_remove,this.removeNumLabel.node.active=!0,this.removeBg1.active=!0,this.removeVedio.active=!1,this.removeMask.active=!1):(this.removeNumLabel.node.active=!1,this.removeVedio.active=!0,d.default.getInstance().sheepMark.propRemoveCount>=1?(this.removeMask.active=!0,this.removeBg1.active=!1):(this.removeMask.active=!1,this.removeBg1.active=!0)),this.userData.prop_cancel>=1?(this.cancelNumLabel.string=""+this.userData.prop_cancel,this.cancelNumLabel.node.active=!0,this.cancelBg1.active=!0,this.cancelVedio.active=!1,this.cancelMask.active=!1):(this.cancelNumLabel.node.active=!1,this.cancelVedio.active=!0,d.default.getInstance().sheepMark.propCancelCount>=1?(this.cancelMask.active=!0,this.cancelBg1.active=!1):(this.cancelMask.active=!1,this.cancelBg1.active=!0)),this.userData.prop_random>=1?(this.randomNumLabel.string=""+this.userData.prop_random,this.randomNumLabel.node.active=!0,this.randomBg1.active=!0,this.randomVedio.active=!1,this.randomMask.active=!1):(this.randomNumLabel.node.active=!1,this.randomVedio.active=!0,d.default.getInstance().sheepMark.propRandomCount>=1?(this.randomMask.active=!0,this.randomBg1.active=!1):(this.randomMask.active=!1,this.randomBg1.active=!0)))},e.prototype.removeGameUiBtn=function(){var t=this;console.log("\u79fb\u9664\u6309\u94ae ###### "),this.isMoving=!0,this.removeBtn.height,this.paddingHeight;var e=-(cc.winSize.height/2+this.removeBtn.height);cc.tween(this.removeBtn).to(.4,{y:e}).start(),cc.tween(this.cancelBtn).to(.4,{y:e}).start(),cc.tween(this.randomBtn).to(.4,{y:e}).call(function(){t.isMoving=!1},this).start()},e.prototype.setUpEndFunc=function(){this.node.parent.getComponent(m.default).showSetUpLayer()},e.prototype.removeEndFunc=function(){if(!this.isMoving)if(this.removeMask.activeInHierarchy)cc.game.emit(s.EMITKEY.SHOWMAINTIPS,"\u6bcf\u5173\u53ea\u80fd\u4f7f\u7528\u4e00\u6b21\u54e6");else if(this.userData.prop_remove>=1){if(this.crushArea.getComponent(f.default).moveOutBlock()){l.default.playAudioMusic("audio/sound/moveOut.mp3",!1),this.userData.prop_remove--,d.default.getInstance().reportProperty.remove_use++,d.default.getInstance().sheepMark.propRemoveCount++,0==d.default.getInstance().reportProperty.remove_ad&&console.log("\u4f7f\u7528\u521d\u59cb\u9053\u5177 ###### propRemove");var t=N.default.getTAUserInfo();t.item_name="\u79fb\u51fa\u9053\u5177",v.default.reportTACommon("prop_initial",t),c.default.saveUserData(this.userData),this.setGameLayerUiData(),d.default.getInstance().levelWinDict.remove+=1;var e=this.userData.prop_remove-1;e<0&&(e=0)}}else console.log("\u79fb\u51fa\u9053\u5177\u4e0d\u8db3"),this.showPropPop(1,60)},e.prototype.cancelEndFunc=function(){if(this.cancelMask.activeInHierarchy)cc.game.emit(s.EMITKEY.SHOWMAINTIPS,"\u6bcf\u5173\u53ea\u80fd\u4f7f\u7528\u4e00\u6b21\u54e6");else if(this.userData.prop_cancel>=1){if(this.crushArea.getComponent(f.default).cancelOneStep()){l.default.playAudioMusic("audio/sound/moveOut.mp3",!1),this.userData.prop_cancel--,d.default.getInstance().reportProperty.cancel_use++,d.default.getInstance().sheepMark.propCancelCount++,0==d.default.getInstance().reportProperty.cancel_ad&&console.log("\u4f7f\u7528\u521d\u59cb\u9053\u5177 ###### propCancel");var t=N.default.getTAUserInfo();t.item_name="\u64a4\u9500\u9053\u5177",v.default.reportTACommon("prop_initial",t),c.default.saveUserData(this.userData),this.setGameLayerUiData(),d.default.getInstance().levelWinDict.cancel+=1;var e=this.userData.prop_cancel-1;e<0&&(e=0)}}else console.log("\u64a4\u9500\u9053\u5177\u4e0d\u8db3"),this.showPropPop(2,20)},e.prototype.randomEndFunc=function(){if(!this.isMoving)if(this.randomMask.activeInHierarchy)cc.game.emit(s.EMITKEY.SHOWMAINTIPS,"\u6bcf\u5173\u53ea\u80fd\u4f7f\u7528\u4e00\u6b21\u54e6");else if(this.userData.prop_random>=1){var t=this.chessboardNode.getComponent(h.default).updateBlockArea();if(console.log("isOk ###### ",t),t){l.default.playAudioMusic("audio/sound/random.mp3",!1),this.userData.prop_random--,d.default.getInstance().reportProperty.random_use++,d.default.getInstance().sheepMark.propRandomCount++,0==d.default.getInstance().reportProperty.random_ad&&console.log("\u4f7f\u7528\u521d\u59cb\u9053\u5177 ###### propRandom");var e=N.default.getTAUserInfo();e.item_name="\u6d17\u724c\u9053\u5177",v.default.reportTACommon("prop_initial",e),c.default.saveUserData(this.userData),this.setGameLayerUiData(),d.default.getInstance().levelWinDict.random+=1;var o=this.userData.prop_random-1;o<0&&(o=0)}}else console.log("\u6d17\u724c\u9053\u5177\u4e0d\u8db3"),this.showPropPop(3,10)},e.prototype.buyCallBackFunc=function(t,e){if(console.log("coin = "+e),this.userData=c.default.getUserData(),this.userData.coin>=e){if(this.userData.coin-=e,d.default.getInstance().levelWinDict.coin+=e,this.showTipPop(t,1),d.default.getInstance().gameType==s.GAMETYPE.GAMELEVEL){var o=e+"";y.default.trackEvent("game_skill_buy",{coinNum:o,c_coinNum:Number(o)})}this.userData.coin}else cc.game.emit("showMainTips",b.default.instance.trans(_.GDLanguage.coin_inadequate))},e.prototype.freeCallBackFunc=function(t){var e=this;if(this.getPropType=t,console.log("type = "+t),u.default.isPlatform(u.Platform.wx)){var o=N.default.getPropData(),n=0;if(d.default.getInstance().gameType==s.GAMETYPE.GAMEDAILY?1==t?n=o.daily.prop_remove:2==t?n=o.daily.prop_cancel:3==t&&(n=o.daily.prop_random):d.default.getInstance().gameType==s.GAMETYPE.GAMETOPIC&&(1==t?n=o.topic.prop_remove:2==t?n=o.topic.prop_cancel:3==t&&(n=o.topic.prop_random)),n>0)return void e.shareTTAction(t);if("shareValue"==u.default.wxValue)return void e.shareTTAction(t)}var a=c.default.GetVedioID();u.default.watchAdVideo({id:a,success:function(){console.log("\u6210\u529f sdk"),cc.game.emit(s.EMITKEY.CLOSEALLPOP),e.showTipPop(t,2),d.default.getInstance().gameType==s.GAMETYPE.GAMELEVEL&&y.default.trackEvent("game_skill_ad")},fail:function(t){console.log("\u5931\u8d25 ###### = ",t),e.gameIsStopFunc(!1)},nofit:function(){e.shareTTAction(t)}})},e.prototype.shareTTAction=function(t){var e=this;if(u.default.isPlatform(u.Platform.wx)){var o=c.default.GetVedioID(),n=c.default.getUserData().openid;u.default.share(n,o,function(){e.shareCbMethod(),e.updateShareCount(t)},function(){cc.game.emit(s.EMITKEY.SHOWMAINTIPS,"\u5206\u4eab\u5931\u8d25\uff0c\u8bf7\u5206\u4eab\u5fae\u4fe1\u7fa4\u4e0e\u597d\u53cbPK")})}else if(u.default.isPlatform(u.Platform.tt)){var a={popName:"shareNodePop",showPopData:{type:2,shareCb:this.shareCbMethod.bind(this)}};cc.game.emit("showPop",a)}},e.prototype.updateShareCount=function(t){var e=N.default.getPropData();d.default.getInstance().gameType==s.GAMETYPE.GAMEDAILY?1==t?e.daily.prop_remove--:2==t?e.daily.prop_cancel--:3==t&&e.daily.prop_random--:d.default.getInstance().gameType==s.GAMETYPE.GAMETOPIC&&(1==t?e.topic.prop_remove--:2==t?e.topic.prop_cancel--:3==t&&e.topic.prop_random--),N.default.setPropData(e)},e.prototype.shareCbMethod=function(){console.log("\u5206\u4eab\u6210\u529f ######"),cc.game.emit(s.EMITKEY.CLOSEALLPOP),this.showTipPop(this.getPropType,3)},e.prototype.showTipPop=function(t,e){var o="",n=null,a="";1==t?(o=b.default.instance.trans(_.GDLanguage.props_remove_claim),n=this.removeBtn,a="\u79fb\u51fa\u9053\u5177",this.userData.prop_remove=1,this.userData.prop_remove,1==e?d.default.getInstance().reportProperty.remove_buy++:2==e&&d.default.getInstance().reportProperty.remove_ad++):2==t?(o=b.default.instance.trans(_.GDLanguage.props_cancel_claim),n=this.cancelBtn,a="\u64a4\u9500\u9053\u5177",this.userData.prop_cancel=1,this.userData.prop_cancel,1==e?d.default.getInstance().reportProperty.cancel_buy++:2==e&&d.default.getInstance().reportProperty.cancel_ad++):3==t&&(o=b.default.instance.trans(_.GDLanguage.props_random_claim),n=this.randomBtn,a="\u6d17\u724c\u9053\u5177",this.userData.prop_random=1,this.userData.prop_random,1==e?d.default.getInstance().reportProperty.random_buy++:2==e&&d.default.getInstance().reportProperty.random_ad++);var i="\u6bcf\u65e5\u6311\u6218";d.default.getInstance().gameType==s.GAMETYPE.GAMEDAILY?i="\u6bcf\u65e5\u6311\u6218":d.default.getInstance().gameType==s.GAMETYPE.GAMETOPIC&&(i="\u8bdd\u9898\u6311\u6218"),2==e?v.default.reportTACommon("game_skill_ad",{item_name:a,game_type:i}):3==e&&v.default.reportTACommon("game_skill_share",{item_name:a,game_type:i}),c.default.saveUserData(this.userData),this.setGameLayerUiData(),cc.game.emit("showMainTips",o);var r=cc.instantiate(this.propPrefab);r.getComponent(g.default).showWithType(t,n,this.movePropFunc.bind(this)),this.node.addChild(r),this.node.setSiblingIndex(20)},e.prototype.movePropFunc=function(){this.gameIsStopFunc(!1)},e.prototype.showPropPop=function(t,e){this.gameIsStopFunc(!0);var o={popName:"getPropPop",showPopData:{popCallbackCollect:this.popCallbackCollect,popType:t,coinNum:e}};cc.game.emit("showPop",o)},i([P(cc.Node)],e.prototype,"removeBtn",void 0),i([P(cc.Node)],e.prototype,"removeBg1",void 0),i([P(cc.Node)],e.prototype,"removeMask",void 0),i([P(cc.Label)],e.prototype,"removeNumLabel",void 0),i([P(cc.Node)],e.prototype,"removeVedio",void 0),i([P(cc.Node)],e.prototype,"cancelBtn",void 0),i([P(cc.Node)],e.prototype,"cancelBg1",void 0),i([P(cc.Node)],e.prototype,"cancelMask",void 0),i([P(cc.Label)],e.prototype,"cancelNumLabel",void 0),i([P(cc.Node)],e.prototype,"cancelVedio",void 0),i([P(cc.Node)],e.prototype,"randomBtn",void 0),i([P(cc.Node)],e.prototype,"randomBg1",void 0),i([P(cc.Node)],e.prototype,"randomMask",void 0),i([P(cc.Label)],e.prototype,"randomNumLabel",void 0),i([P(cc.Node)],e.prototype,"randomVedio",void 0),i([P(cc.Node)],e.prototype,"setUpBtn",void 0),i([P(cc.Node)],e.prototype,"moveOutArea",void 0),i([P(cc.Node)],e.prototype,"chessboardNode",void 0),i([P(cc.Node)],e.prototype,"crushArea",void 0),i([P(cc.Node)],e.prototype,"levelNode",void 0),i([P(cc.Label)],e.prototype,"levelNumLabel",void 0),i([P(cc.Node)],e.prototype,"stageOneNode",void 0),i([P(cc.Node)],e.prototype,"stageTwoNode",void 0),i([P(cc.Node)],e.prototype,"maskStage",void 0),i([P(cc.Prefab)],e.prototype,"propPrefab",void 0),i([w],e)}(cc.Component);o.default=k,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../../pre/item/prop-prefab":"prop-prefab","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/sdk":"sdk","../manager/DateManager":"DateManager","../manager/GameManager":"GameManager","../manager/data-manager":"data-manager","../manager/report-common":"report-common","../utils/uma/uma-sdk":"uma-sdk","./chessboard":"chessboard","./crushArea":"crushArea","./gameLayer":"gameLayer"}],gd_language:[function(t,e,o){"use strict";cc._RF.push(e,"82e75ge7rlLCb24BwrY9eZO","gd_language"),Object.defineProperty(o,"__esModule",{value:!0}),o.GDLanguage=void 0,function(t){t.main_screen="1",t.leaderboard="2",t.daily_challenge="3",t.collect="4",t.level_1="5",t.coin_more="6",t.claim_level="7",t.life_more="8",t.life_countdown="9",t.life_more_play="10",t.life_full="11",t.life_1="12",t.unlock_all="13",t.set_up="14",t.set_up_sound_effect="15",t.set_up_music="16",t.set_up_shock="17",t.set_up_contact_service="18",t.set_up_id="19",t.set_up_share="20",t.game_version="21",t.fully="22",t.upgrade_coin="23",t.coin_inadequate="24",t.upgrade="25",t.daily_play="26",t.daily_start="27",t.win_frequency="28",t.collect_title="29",t.wallpaper="30",t.wallpaper_dinner="31",t.wallpaper_lighthouse="32",t.wallpaper_lazy_time="33",t.wallpaper_waiting_alone="34",t.wallpaper_meteor_shower="35",t.wallpaper_quiet_night="36",t.wallpaper_road="37",t.wallpaper_snow="38",t.wallpaper_starry="39",t.wallpaper_commuter_road="40",t.wallpaper_moon="41",t.wallpaper_stay_tuned="42",t.block_bricks="43",t.block_remove="44",t.block_cancel="45",t.block_random="46",t.props_get="47",t.props_buy="48",t.props_free="49",t.chest_level_treasure="50",t.chest_journey="51",t.continue="52",t.pop_claim="53",t.playing_continue="54",t.version_view="55",t.not_enough_space="56",t.time_over="57",t.give_up="58",t.pop_sure="59",t.life_lose="60",t.props_remove_claim="61",t.draw_back="62",t.withdraw="63",t.put_recent="64",t.props_disrupt="65",t.shuffle_unused="66",t.revive_remove="67",t.challenge_unlocked_level="68",t.pop_restart="69",t.pop_quit="70",t.life_run_out="71",t.streak_award="72",t.streak_lose="73",t.challenge_pass="74",t.function_1="75",t.home_return="76",t.pop_player="77",t.life_more_2="78",t.full_1="79",t.pop_stacked="80",t.not_unlocked="81",t.level_new_tomorrow="82",t.level_inadequate="83",t.life_inadequate="84",t.video_see="85",t.map_over="86",t.props_remove_inadequate="87",t.props_cancel_inadequate="88",t.props_random_inadequate="89",t.props_random_claim="90",t.share_fail="91",t.coin_claim_play="92",t.life_full_play="93",t.sprint_level_3="94",t.game_continue="95",t.life_full_already="96",t.tomorrow_play="97",t.more_time="98",t.life_lose_ed="99",t.lose_cookies="100",t.resurrection="101",t.collect_cookie="102",t.ok_title="103",t.wallpaper_harbour="104",t.wallpaper_lamp="105",t.props_cancel_claim="106"}(o.GDLanguage||(o.GDLanguage={})),cc._RF.pop()},{}],getLovePop:[function(t,e,o){"use strict";cc._RF.push(e,"ed619JcknNAHJiwu50VgegD","getLovePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../common/dataTs"),u=t("../common/util"),p=t("../utils/uma/uma-sdk"),d=cc._decorator,h=d.ccclass,f=d.property,m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.getLoveBtn=null,e.closeBtn=null,e.titleLabel=null,e.getLoveDescLabel=null,e.getLoveTimeLabel=null,e.descLabel=null,e.receiveLabel=null,e.popNode=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){s.default.addbtnTouchStartScale(this.getLoveBtn),s.default.addbtnTouchEndScale(this.getLoveBtn,this.getLoveFunc.bind(this)),s.default.addbtnTouchCancelScale(this.getLoveBtn),s.default.addbtnTouchStartScale(this.closeBtn),s.default.addbtnTouchEndScale(this.closeBtn,this.hideGetLovePop.bind(this)),s.default.addbtnTouchCancelScale(this.closeBtn),this.titleLabel.string=c.default.instance.trans(r.GDLanguage.life_more),this.getLoveDescLabel.string=c.default.instance.trans(r.GDLanguage.life_countdown),this.descLabel.string=c.default.instance.trans(r.GDLanguage.life_more_play),this.receiveLabel.string=c.default.instance.trans(r.GDLanguage.life_1)},e.prototype.showGetLovePop=function(t){this.node.active=!0,this.showPopData=t,console.log("\u83b7\u5f97\u7231\u5fc3\u5f39\u7a97",this.showPopData),cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start();var e=l.default.updateLoveTime();if(0==e)this.getLoveTimeLabel.string="play";else{var o=u.default.formatTime(e),n=o[2]<10?"0"+o[2]:o[2]+"",a=o[3]<10?"0"+o[3]:o[3]+"";this.getLoveTimeLabel.string=n+":"+a}},e.prototype.getLoveFunc=function(){},e.prototype.hideGetLovePop=function(){this.node.active=!1,p.default.trackEvent("life_refuse")},i([f(cc.Node)],e.prototype,"getLoveBtn",void 0),i([f(cc.Node)],e.prototype,"closeBtn",void 0),i([f(cc.Label)],e.prototype,"titleLabel",void 0),i([f(cc.Label)],e.prototype,"getLoveDescLabel",void 0),i([f(cc.Label)],e.prototype,"getLoveTimeLabel",void 0),i([f(cc.Label)],e.prototype,"descLabel",void 0),i([f(cc.Label)],e.prototype,"receiveLabel",void 0),i([f(cc.Node)],e.prototype,"popNode",void 0),i([h],e)}(cc.Component);o.default=m,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/util":"util","../utils/uma/uma-sdk":"uma-sdk"}],getPropPop:[function(t,e,o){"use strict";cc._RF.push(e,"5d202skrZlNSY1om5DswGw5","getPropPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../common/dataTs"),u=t("../common/enumConfig"),p=t("../common/sdk"),d=t("../manager/data-manager"),h=t("../manager/GameManager"),f=t("../manager/report-common"),m=cc._decorator,g=m.ccclass,y=m.property,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.closeBtn=null,e.freePropBtn=null,e.popNode=null,e.titleLabel=null,e.descLabel=null,e.buyLabel=null,e.freeLabel=null,e.freeDescLabel=null,e.propImage=null,e.noBlockBtn=null,e.noWhiteBtn=null,e.beginBtn=null,e.freeBtnVideo=null,e.beginBtnVideo=null,e.timeNode=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){s.default.addbtnTouchEndScale(this.mask,this.maskBtnFunc.bind(this)),s.default.addbtnTouchStartScale(this.closeBtn),s.default.addbtnTouchEndScale(this.closeBtn,this.closeBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.closeBtn),s.default.addbtnTouchStartScale(this.noBlockBtn),s.default.addbtnTouchEndScale(this.noBlockBtn,this.noBlockBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.noBlockBtn),s.default.addbtnTouchStartScale(this.noWhiteBtn),s.default.addbtnTouchEndScale(this.noWhiteBtn,this.noWhiteBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.noWhiteBtn),s.default.addbtnTouchStartScale(this.freePropBtn),s.default.addbtnTouchEndScale(this.freePropBtn,this.freePropBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.freePropBtn),s.default.addbtnTouchStartScale(this.beginBtn),s.default.addbtnTouchEndScale(this.beginBtn,this.beginBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.beginBtn)},e.prototype.maskBtnFunc=function(){4!=this.showPopData.popType&&5!=this.showPopData.popType&&(this.node.active=!1)},e.prototype.closeBtnFunc=function(){this.node.active=!1,this.showPopData&&this.showPopData.popCallbackCollect&&this.showPopData.popCallbackCollect.exitCallBack()},e.prototype.noBlockBtnFunc=function(){this.node.active=!1,4==this.showPopData.popType?cc.game.emit("showPop",{popName:"failPop",showPopData:{popCallbackCollect:null,failType:2}}):5==this.showPopData.popType&&cc.game.emit(u.EMITKEY.SHOWMAINLAYER)},e.prototype.noWhiteBtnFunc=function(){this.node.active=!1,4!=this.showPopData.popType&&5!=this.showPopData.popType||cc.game.emit(u.EMITKEY.SHOWMAINLAYER)},e.prototype.freePropBtnFunc=function(){console.log("beginBtnFunc ### unLimitVideo = "+h.default.getInstance().unLimitVideo),4==this.showPopData.popType&&h.default.getInstance().sheepMark.resurgenceCount>=1?cc.game.emit(u.EMITKEY.SHOWMAINTIPS,"\u65e0\u590d\u6d3b\u673a\u4f1a"):(this.showPopData&&this.showPopData.popCallbackCollect&&this.showPopData.popCallbackCollect.freeCallBack(this.showPopData.popType),this.updateWxUI())},e.prototype.beginBtnFunc=function(){if(console.log("beginBtnFunc ### unLimitVideo = "+h.default.getInstance().unLimitVideo),h.default.getInstance().unLimitVideo)return cc.game.emit(u.EMITKEY.RESTARTNOWLEVEL),f.default.reportTACommon("challenge_again",{}),void(this.node.active=!1);if(6==this.showPopData.popType)return this.showPopData&&this.showPopData.popCallbackCollect&&this.showPopData.popCallbackCollect.freeCallBack(this.showPopData.popType),void(this.node.active=!1);var t=this,e=l.default.GetVedioID();p.default.watchAdVideo({id:e,success:function(){cc.game.emit(u.EMITKEY.RESTARTNOWLEVEL),f.default.reportTACommon("challenge_again",{}),t.node.active=!1},fail:function(){console.log("\u5931\u8d25")},nofit:function(){t.shareTTAction()}})},e.prototype.shareTTAction=function(){var t=this;if(p.default.isPlatform(p.Platform.wx)){var e=l.default.GetVedioID(),o=l.default.getUserData().openid;p.default.share(o,e,function(){t.shareCbMethod()},function(){cc.game.emit(u.EMITKEY.SHOWMAINTIPS,"\u5206\u4eab\u5931\u8d25\uff0c\u8bf7\u5206\u4eab\u5fae\u4fe1\u7fa4\u4e0e\u597d\u53cbPK")})}else if(p.default.isPlatform(p.Platform.tt)){var n={popName:"shareNodePop",showPopData:{type:2,shareCb:this.shareCbMethod.bind(this)}};cc.game.emit("showPop",n)}},e.prototype.shareCbMethod=function(){console.log("\u5206\u4eab\u6210\u529f ######"),cc.game.emit(u.EMITKEY.RESTARTNOWLEVEL),f.default.reportTACommon("challenge_again_share",{}),this.node.active=!1},e.prototype.showGetPropPop=function(t){this.node.active=!0,this.showPopData=t,this.noBlockBtn.active=!1,this.noWhiteBtn.active=!0,this.closeBtn.active=!0,this.freePropBtn.active=!0,this.beginBtn.active=!1,this.beginBtnVideo.active=!0,this.noWhiteBtn.getChildByName("label").getComponent(cc.Label).string="\u4e0d,\u8c22\u8c22",cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start();var e=t.popType,o="",n="",a="Buy props";if(this.freeLabel.string="\u83b7\u5f97",this.updateWxUI(),1==e)o="rewardIcon/prop_remove.png",a="\u79fb\u51fa\u9053\u5177",n=c.default.instance.trans(r.GDLanguage.draw_back),(i=1-h.default.getInstance().sheepMark.propRemoveCount)<0&&(i=0),this.freeDescLabel.string="("+i+"/1)";else if(2==e)o="rewardIcon/prop_cancel.png",a="\u64a4\u56de\u9053\u5177",n=c.default.instance.trans(r.GDLanguage.put_recent),(i=1-h.default.getInstance().sheepMark.propCancelCount)<0&&(i=0),this.freeDescLabel.string="("+i+"/1)";else if(3==e)o="rewardIcon/prop_random.png",a="\u6d17\u724c\u9053\u5177",n=c.default.instance.trans(r.GDLanguage.shuffle_unused),(i=1-h.default.getInstance().sheepMark.propRandomCount)<0&&(i=0),this.freeDescLabel.string="("+i+"/1)";else if(4==e){var i;o="rewardIcon/prop_life_remove.png",a="\u590d\u6d3b\u5417?",n="\u590d\u6d3b\u5e76\u4f7f\u7528\u79fb\u51fa\u9053\u5177",this.noBlockBtn.active=!0,this.noWhiteBtn.active=!1,this.closeBtn.active=!1,this.freeLabel.string="\u590d\u6d3b",console.log(h.default.getInstance().sheepMark.resurgenceCount),(i=1-h.default.getInstance().sheepMark.resurgenceCount)<0&&(i=0),this.freeDescLabel.string="("+i+"/1)"}else 5==e?(a="\u518d\u6b21\u6311\u6218",this.closeBtn.active=!1,this.freeDescLabel.string="",this.freeLabel.string="\u91cd\u65b0\u6311\u6218",this.noWhiteBtn.getChildByName("label").getComponent(cc.Label).string="\u8fd4\u56de\u7f8a\u7fa4",n="\u89c2\u770b\u89c6\u9891\uff0c\u4ee5\u83b7\u5f971\u6b21\n\u989d\u5916\u7684\u6311\u6218\u673a\u4f1a\u3002",o="rewardIcon/prop_life_one.png",this.freePropBtn.active=!1,this.beginBtn.active=!0,h.default.getInstance().unLimitVideo?(this.beginBtnVideo.active=!1,n="\u5df2\u83b7\u5f97\u65e0\u9650\u6b21\u6570\u6311\u6218\n\u8d76\u7d27\u8bd5\u8bd5\u5427",o="rewardIcon/prop_nolimit.png"):this.beginBtnVideo.active=!0):6==e&&(a="\u518d\u6b21\u6311\u6218",this.freeDescLabel.string="",this.freeLabel.string="\u6311\u6218\u4e00\u6b21",this.noWhiteBtn.getChildByName("label").getComponent(cc.Label).string="\u4e0d,\u8c22\u8c22",n="\u89c2\u770b\u89c6\u9891\uff0c\u4ee5\u83b7\u5f971\u6b21\n\u989d\u5916\u7684\u6311\u6218\u673a\u4f1a\u3002",o="rewardIcon/prop_life_one.png",this.freePropBtn.active=!1,this.beginBtn.active=!0);s.default.changeSpriteFrame(this.propImage,o),this.descLabel.string=n,this.titleLabel.string=a},e.prototype.updateWxUI=function(){var t=this.showPopData.popType;if(l.default.isPlatform(l.GDPlatform.wx)){var e=d.default.getPropData();console.log("propData = ",e);var o=0;h.default.getInstance().gameType==u.GAMETYPE.GAMEDAILY?1==t?o=e.daily.prop_remove:2==t?o=e.daily.prop_cancel:3==t&&(o=e.daily.prop_random):h.default.getInstance().gameType==u.GAMETYPE.GAMETOPIC&&(1==t?o=e.topic.prop_remove:2==t?o=e.topic.prop_cancel:3==t&&(o=e.topic.prop_random)),o>0?s.default.changeSpriteFrame(this.freeBtnVideo,"rewardIcon/reward_share_black.png"):"shareValue"==p.default.wxValue?s.default.changeSpriteFrame(this.freeBtnVideo,"rewardIcon/reward_share_black.png"):s.default.changeSpriteFrame(this.freeBtnVideo,"rewardIcon/reward_video_block.png"),d.default.setPropData(e)}},i([y(cc.Node)],e.prototype,"mask",void 0),i([y(cc.Node)],e.prototype,"closeBtn",void 0),i([y(cc.Node)],e.prototype,"freePropBtn",void 0),i([y(cc.Node)],e.prototype,"popNode",void 0),i([y(cc.Label)],e.prototype,"titleLabel",void 0),i([y(cc.Label)],e.prototype,"descLabel",void 0),i([y(cc.Label)],e.prototype,"buyLabel",void 0),i([y(cc.Label)],e.prototype,"freeLabel",void 0),i([y(cc.Label)],e.prototype,"freeDescLabel",void 0),i([y(cc.Node)],e.prototype,"propImage",void 0),i([y(cc.Node)],e.prototype,"noBlockBtn",void 0),i([y(cc.Node)],e.prototype,"noWhiteBtn",void 0),i([y(cc.Node)],e.prototype,"beginBtn",void 0),i([y(cc.Node)],e.prototype,"freeBtnVideo",void 0),i([y(cc.Node)],e.prototype,"beginBtnVideo",void 0),i([y(cc.Node)],e.prototype,"timeNode",void 0),i([g],e)}(cc.Component);o.default=v,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/sdk":"sdk","../manager/GameManager":"GameManager","../manager/data-manager":"data-manager","../manager/report-common":"report-common"}],giftLayerAnimate:[function(t,e,o){"use strict";cc._RF.push(e,"fb227UOAFRM+a9fREJ/Svyr","giftLayerAnimate");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../../pre/itemSub/brickSubPrefab"),l=t("../../pre/itemSub/wallpaperSubPrefab"),u=t("../../pre/main/rewardPrefab"),p=t("../common/CcJsFunc"),d=t("../common/dataTs"),h=t("../common/native/audio"),f=t("../common/spine"),m=cc._decorator,g=m.ccclass,y=m.property,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.lightBg=null,e.titleNode=null,e.gift1Node=null,e.gift2Node=null,e.getBtn=null,e.getBtnLabel=null,e.giftBg=null,e.rewardPrefab=null,e.brickSubPrefab=null,e.wallpaperSubPrefab=null,e.rewardNodeArray=[],e.rewardData=null,e.collectionItem=null,e.ribbonBoxData=null,e.btnCb=null,e.collectionCb=null,e.ribbonCb=null,e}return a(e,t),e.prototype.start=function(){p.default.addbtnTouchStartScale(this.getBtn),p.default.addbtnTouchEndScale(this.getBtn,this.btnEndFunc.bind(this)),p.default.addbtnTouchCancelScale(this.getBtn),this.getBtnLabel.string=c.default.instance.trans(r.GDLanguage.pop_claim)},e.prototype.showRewardLayer=function(t,e,o,n,a,i){if(this.rewardData=t,this.collectionItem=e,this.ribbonBoxData=o,this.node.active=!0,this.titleNode.active=!1,this.gift1Node.active=!1,this.giftBg.active=!1,this.lightBg.active=!1,this.getBtn.scale=0,this.rewardNodeArray=[],this.btnCb=n,this.collectionCb=a,this.ribbonCb=i,t){console.log("\u91d1\u5e01\u5956\u52b1",JSON.stringify(t));for(var r=0;r<2;r++)(g=cc.instantiate(this.rewardPrefab)).x=0,g.y=0,g.scale=0,g.getComponent(u.default).setRewardNode(this.rewardData[r]),this.rewardNodeArray.push(g),this.node.addChild(g);this.playGift1Anim()}else if(e){console.log("\u6536\u85cf\u5956\u52b1");var c=e.wallpaper,p=e.brick,h=d.default.getPictureData();if(c>0){var f=cc.instantiate(this.wallpaperSubPrefab);f.x=0,f.y=0,f.scale=0,f.getComponent(l.default).rewardNodeData(h.bgNum),this.rewardNodeArray.push(f),this.node.addChild(f)}if(p>0){var m=cc.instantiate(this.brickSubPrefab);m.x=0,m.y=0,m.scale=0,m.getComponent(s.default).rewardNodeData(h.brickNum),this.rewardNodeArray.push(m),this.node.addChild(m)}this.playGift2Anim()}else if(o){for(console.log("Ribbon\u5956\u52b1",JSON.stringify(o)),r=0;r0&&cc.tween(this.rewardNodeArray[0]).to(.1,{scale:1.4,y:200}).to(.1,{scale:1}).to(.1,{scale:1.2}).to(.1,{scale:1}).call(function(){t.playAnimationFloat(t.rewardNodeArray[0],10),cc.tween(t.getBtn).to(.1,{scale:1.3}).to(.1,{scale:1}).start()}).start(),this.collectionItem.brick>0&&cc.tween(this.rewardNodeArray[0]).to(.1,{scale:1.4,y:200}).to(.1,{scale:1}).to(.1,{scale:1.2}).to(.1,{scale:1}).call(function(){t.playAnimationFloat(t.rewardNodeArray[0],10),cc.tween(t.getBtn).to(.1,{scale:1.3}).to(.1,{scale:1}).start()}).start()},e.prototype.playRibbonAnimationNode=function(){var t=this;if(console.log(this.rewardNodeArray.length),this.rewardNodeArray.length>=4)for(var e=function(e){cc.tween(o.rewardNodeArray[e]).delay(.1).to(.1,{scale:1,x:e%2*240-120,y:250+-200*Math.floor(e/2)}).to(.1,{scale:.8}).to(.1,{scale:1}).to(.1,{scale:.8}).call(function(){t.playAnimationFloat(t.rewardNodeArray[e],10),cc.tween(t.getBtn).to(.1,{scale:1.3}).to(.1,{scale:1}).start()}).start()},o=this,n=0;n=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../common/enumConfig"),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainCultivateLayer=null,e.wardrobeLayer=null,e.touchStartPoint=null,e.pointLength=0,e.scaleCoef=.05*.05,e.touchNum=0,e.maxScale=1,e.moveBigScale=1.5,e.disLength=50,e.oldPosit=null,e.oldScale=1,e.changeClothes=null,e}return a(e,t),e.prototype.start=function(){this.node.on("touchstart",this.touchStartFunc,this),this.node.on("touchmove",this.touchMoveFunc,this),this.node.on("touchend",this.touchEndFunc,this),this.node.on("touchcancel",this.touchCancelFunc,this),this.changeClothes=this.wardrobeLayer.getChildByName("changeClothes")},e.prototype.moveWithRoomId=function(t){var e=this.node.width*this.node.scale/2-cc.winSize.width/2,o=0;t==l.ROOMTYPE.ROOMONE?o=0:t==l.ROOMTYPE.ROOMTWO?o=-e:t==l.ROOMTYPE.ROOMTHREE&&(o=e),cc.tween(this.node).to(.3,{x:o,y:0}).start()},e.prototype.toBigMiddle=function(t){this.oldPosit=this.node.position,this.oldScale=this.node.scale;var e=t.convertToWorldSpaceAR(cc.v2(0,0)),o=cc.winSize.width/2-e.x,n=cc.winSize.height/2-this.disLength-e.y,a=(this.node.x+o)*this.moveBigScale,i=(this.node.y+n)*this.moveBigScale;cc.tween(this.node).to(.3,{x:a,y:i,scale:this.moveBigScale},{easing:cc.easing.cubicOut}).start()},e.prototype.toMinDefault=function(){this.oldPosit&&cc.tween(this.node).to(.2,{x:this.oldPosit.x,y:this.oldPosit.y,scale:this.oldScale}).start(),this.oldPosit=null},e.prototype.touchStartFunc=function(t){var e=t.getLocation();this.touchStartPoint=e,this.pointLength=0,this.touchNum++},e.prototype.touchMoveFunc=function(t){if(this.changeClothes.activeInHierarchy)console.log("changeClothes \u5b58\u5728\u4e0d\u8d70\u6ed1\u52a8\u903b\u8f91");else if(1==t.getTouches().length)this.moveActionFunc(t.getLocation()),this.touchStartPoint=t.getLocation();else if(2==t.getTouches().length){this.touchStartPoint=t.getLocation();var e=t.getTouches()[0].getLocation(),o=t.getTouches()[1].getLocation();if(0==this.pointLength)this.pointLength=e.sub(o).mag();else{var n=e.sub(o).mag(),a=n-this.pointLength,i=Math.abs(a);0!=a&&i>1&&(this.scaleNode(a),this.pointLength=n)}}},e.prototype.touchEndFunc=function(){this.touchNum--,this.pointLength=0},e.prototype.touchCancelFunc=function(){this.touchNum--},e.prototype.scaleNode=function(t){var e=null;if(t>0){var o=this.maxScale;this.node.scaleo?o:e)}else{var n=1;this.node.x<0&&(n=-1);var a=this.node.width*this.node.scale/2;a1&&(e=(e=this.node.scale+this.scaleCoef*t)<1?1:e)}null!=e&&(this.node.scale=e)},e.prototype.moveActionFunc=function(t){var e=t.x-this.touchStartPoint.x,o=t.y-this.touchStartPoint.y;this.node.x=this.node.x+e,this.node.y=this.node.y+o;var n=this.node.width*this.node.scale/2-cc.winSize.width/2,a=this.node.height*this.node.scale/2-cc.winSize.height/2;this.node.x<-n&&(this.node.x=-n),this.node.x>n&&(this.node.x=n),this.node.y<-a&&(this.node.y=-a),this.node.y>a&&(this.node.y=a)},i([s(cc.Node)],e.prototype,"mainCultivateLayer",void 0),i([s(cc.Node)],e.prototype,"wardrobeLayer",void 0),i([c],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../common/enumConfig":"enumConfig"}],http:[function(t,e,o){"use strict";cc._RF.push(e,"0c9d6/yg2FJlZ/64VA6Vfe9","http");var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,o=1,n=arguments.length;o0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0&&(d.timeout=p),d.onreadystatechange=function(){if(4==d.readyState)if(d.status>=200&&d.status<400){var t={},n="";try{t=JSON.parse(d.responseText)}catch(a){n=a}""==n?e&&e(t):o&&o(n)}else o&&o("status: "+d.status)},d.open(r,s,!0),i&&d.setRequestHeader("Content-Type",i),d.send(l),d.ontimeout=function(){o&&o("request timeout"),console.log("%c>> %c\u8fde\u63a5\u8d85\u65f6 %c<<","color:red","color:purple","color:red")},d.onerror=function(t){console.warn("request error",t),o&&o(t)}}catch(h){console.warn("request err",h),o&&o(h)}},t.request=function(t){this.requestBeforeFunc&&(t=this.requestBeforeFunc(t)),t.header=t.header?n(n({},t.baseParams),t.header):t.baseParams,cc.sys.platform==cc.sys.WECHAT_GAME?this.wxRequest(t):this.h5Request(t)},t.requestSync=function(t){var e=this;return new Promise(function(o,a){var i=t.success,r=t.fail;try{e.request(n(n({},t),{success:function(t){i&&i(t),o(t)},fail:function(t){r&&r(t),a(t)}}))}catch(c){r&&r(c),a(c)}})},t.requestBeforeFunc=null,t}();o.default=s,cc._RF.pop()},{"query-string":3}],i18n:[function(t,e,o){"use strict";cc._RF.push(e,"1f5a5kEJdNJPatq/K4Gvl0i","i18n");var n=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},a=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]-1)this._langCode=t;else{var e=t.indexOf("_");if(e>0){var o=t.substring(0,e);l.indexOf(o)>-1&&(this._langCode=o)}else this._langCode=t}console.log("\u5b9e\u9645\u4f7f\u7528\u8bed\u8a00\u7801\uff1a",this._langCode),r.default.langCode=this._langCode,this._langMap={}},t.prototype.init=function(){return n(this,void 0,Promise,function(){var t=this;return a(this,function(){return this.getLanguageCode(),[2,new Promise(function(e){cc.assetManager.loadBundle(cc.resources.name,function(o,n){o||n.load("data/gd_language",cc.JsonAsset,function(o,a){if(!o){var i=a.json;for(var r in i){var c=i[r];t._langMap[r]=c[t.langCode]&&c[t.langCode].length>0?c[t.langCode]:c[t._landCodeDefault]}n.release("data/gd_language",cc.JsonAsset),e()}})})})]})})},t.prototype.trans=function(t){for(var e=[],o=1;o0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/dataTs"),c=t("../common/enumConfig"),s=t("../manager/DateManager"),l=t("../public/network-tool"),u=cc._decorator,p=u.ccclass,d=(u.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.start=function(){var t=s.default.format(c.CALENDARNAMES[8],new Date);console.log("monthKey = ",t)},e.prototype.insertAllMap=function(){var t=[];r.default.loadJsonData("data/map_ids",function(e){t=e,console.log("maps = "+e.length);for(var o=0;o",t.data.map_id);var e=t.data.map_id,o=t.data.map_data;l.default.setLevelMapData(e,o)}})})},i([p],e)}(cc.Component));o.default=d,cc._RF.pop()},{"../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../manager/DateManager":"DateManager","../public/network-tool":"network-tool"}],loadLayer:[function(t,e,o){"use strict";cc._RF.push(e,"4d645A+CV5DRYYMx0geEXPK","loadLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,o=1,n=arguments.length;o=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},c=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},s=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]this.progressAll&&(this.loadProgressBar.progress=1,this.loadNum>=this.loadOverNum&&!this.sceneLoadEd&&(console.log("PUSH=>\u52a0\u8f7d\u6210\u529f update"),this.getInfoMainScene()))},e.prototype.start=function(){if(cc.game.on(f.NativeEvent.LeitingGetDeviceInfo,this.leitingGetDeviceInfo,this),cc.game.on(f.NativeEvent.LeitingLoginInfo,this.onLeitingLoginInfo,this),cc.game.on(f.NativeEvent.LeitingLoginErr,this.onLeitingLoginErr,this),this.bgLayer.getChildByName("sp").getComponent(y.default).play("2Grass",0),this.isNeedLogin()){this.descNode.active=!0;var t=cc.sys.localStorage.getItem("gameloading");console.log("loading = ",t),t?(this.beginNode.active=!1,this.arrowBgBase.active=!1,this.userNodeBase.active=!1,this.loginStatusEd=!0):(this.beginNode.active=!0,this.arrowBgBase.active=!0,this.userNodeBase.active=!0)}else this.descNode.active=!1;b.default.getInstance().initData(),this.loadNum=0,this.loadMainScene(),m.default.init(),this.loadCfg(),v.default.instance.init(2048,2048,100),N.registerHeadImgLoader(),u.default.addbtnTouchOriginEndScale(this.userNode,this.userNodeFunc.bind(this)),u.default.addbtnTouchOriginEndScale(this.privacyNode,this.privacyNodeFunc.bind(this)),u.default.addbtnTouchOriginEndScale(this.chooseBg,this.chooseBgFunc.bind(this)),u.default.addbtnTouchOriginEndScale(this.beginNode,this.beginNodeFunc.bind(this)),this.tipsNode.active=!1},e.prototype.userNodeFunc=function(){console.log("\u7528\u6237\u534f\u8bae")},e.prototype.privacyNodeFunc=function(){console.log("\u9690\u79c1\u653f\u7b56")},e.prototype.chooseBgFunc=function(){this.chooseNode.active=!this.chooseNode.active,console.log("\u9009\u62e9 = ",this.chooseNode.activeInHierarchy)},e.prototype.beginNodeFunc=function(){var t=this;if(console.log("\u5f00\u59cb\u6e38\u620f = ",this.chooseNode.activeInHierarchy),!this.chooseNode.activeInHierarchy)return this.tipsNode.active=!0,void setTimeout(function(){t.tipsNode.active=!1},2e3);cc.sys.localStorage.setItem("gameloading","gameloading"),this.loginStatusEd=!0,this.loadCfg()},e.prototype.leitingGetDeviceInfo=function(){var t=p.default.getUserData();if(t&&t.userID&&t.userID.length>0&&d.default.callNative(h.NativeFun.publicParamsInfo,{userId:t.userID}),d.default.deviceInfo){var e={androidid:d.default.deviceInfo.androidId,chennal:"310001",gameCode:"59"};d.default.leitingReport("af_before_login",e)}},e.prototype.onLeitingLoginInfo=function(){this.loginStatusEd=!0,this.loadJson(),_.default.reportTACommon("login",{login_type:"\u6b63\u5e38\u767b\u5f55"}),d.default.loginInfo&&(d.default.loginInfo.userId,d.default.media);var t={};if(d.default.deviceInfo){var e=p.default.getUserData();t={androidid:d.default.deviceInfo.androidId,chennal:"310001",gameCode:"59",userId:e.userID,type:2,roldId:d.default.deviceInfo.gaid}}var o={};d.default.loginInfo&&(e=p.default.getUserData(),o={loginType:"1",chennal:d.default.loginInfo.channelNo,gameCode:"59",userId:e.userID,type:2,serviceName:"\u6d77\u5916\u6d4b\u8bd5\u670d",serviceId:"1",loginMode:"1",playLevelId:e.playLevelId});var n=i(i({},t),o);d.default.leitingReport("af_login",n)},e.prototype.onLeitingLoginErr=function(){this.loginStatusEd=!0,this.loadJson()},e.prototype.loadCfg=function(){return c(this,void 0,Promise,function(){return s(this,function(t){switch(t.label){case 0:return[4,l.default.instance.init()];case 1:return t.sent(),this.isNeedLogin()?this.loginStatusEd&&this.loadJson():this.loadJson(),[2]}})})},e.prototype.isNeedLogin=function(){return!!(g.default.isPlatform(g.Platform.android)||g.default.isPlatform(g.Platform.oppo)||g.default.isPlatform(g.Platform.vivo))},e.prototype.loadJson=function(){var t=this;p.default.initData(function(){console.log("JSON\u52a0\u8f7d\u5b8c\u6210");var e=p.default.getUserData();C.default.setUserid(e.userID);var o=p.default.getHourseUnlockData(),n=0;if(o.length){var a=o[o.length-1];for(var i in a)if(!a[i].unlock){n=a[i].unlockID;break}}for(var r in n||o.length,e.dailyData)for(var c in e.dailyData[r])e.dailyData[r][c].isWin;t.loadScene()}),_.default.initTA()},e.prototype.loadMainScene=function(){var t=this;cc.director.preloadScene("game",function(){},function(){console.log("PUSH=>\u4e3b\u573a\u666f\u52a0\u8f7d\u5b8c\u6210"),t.loadScene()})},e.prototype.loadScene=function(){this.loadNum+=1,console.log("PUSH=>",this.loadNum),this.loadNum>=this.loadOverNum&&this.progressCurrent>=this.progressAll&&!this.sceneLoadEd&&(console.log("PUSH=>loadScene\u52a0\u8f7d\u6210\u529f"),this.getInfoMainScene())},e.prototype.getInfoMainScene=function(){this.sceneLoadEd=!0,_.default.reportTACommon("app_start",{step:"\u542f\u52a8"}),cc.director.loadScene("game",function(){console.log("PUSH=>\u8fdb\u5165\u4e3b\u573a\u666f")})},r([k(cc.Node)],e.prototype,"bgLayer",void 0),r([k(cc.ProgressBar)],e.prototype,"loadProgressBar",void 0),r([k(cc.Node)],e.prototype,"descNode",void 0),r([k(cc.Node)],e.prototype,"userNode",void 0),r([k(cc.Node)],e.prototype,"privacyNode",void 0),r([k(cc.Node)],e.prototype,"chooseNode",void 0),r([k(cc.Node)],e.prototype,"chooseBg",void 0),r([k(cc.Node)],e.prototype,"beginNode",void 0),r([k(cc.Node)],e.prototype,"tipsNode",void 0),r([k(cc.Node)],e.prototype,"arrowBgBase",void 0),r([k(cc.Node)],e.prototype,"userNodeBase",void 0),r([P],e)}(cc.Component);o.default=S,cc._RF.pop()},{"../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/native/native-bridge":"native-bridge","../common/native/native-def":"native-def","../common/native/native-event":"native-event","../common/native/share":"share","../common/sdk":"sdk","../common/spine":"spine","../effect/player-head-atlas":"player-head-atlas","../manager/GameManager":"GameManager","../manager/report-common":"report-common","../tools/register-head-image":"register-head-image","../utils/uma/uma-sdk":"uma-sdk"}],loseCookiePop:[function(t,e,o){"use strict";cc._RF.push(e,"8756cpkvkBHlIyfdBoS6jSg","loseCookiePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../manager/GameManager"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainLayer=null,e.popNode=null,e.titleLabel=null,e.descLabel=null,e.numLabel=null,e.exitLabel=null,e.restartLabel=null,e.mainLabel=null,e.restartBtn=null,e.closeBtn=null,e.mainMenuBtn=null,e.exitBtn=null,e.heartNode=null,e.cookieNumLabel=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){cc.game.on("blowupHeartAnim",this.blowupHeartAnimFunc,this),s.default.addbtnTouchStartScale(this.closeBtn),s.default.addbtnTouchEndScale(this.closeBtn,this.hideLoseLovePop.bind(this)),s.default.addbtnTouchCancelScale(this.closeBtn),s.default.addbtnTouchStartScale(this.restartBtn),s.default.addbtnTouchEndScale(this.restartBtn,this.restartFunc.bind(this)),s.default.addbtnTouchCancelScale(this.restartBtn),s.default.addbtnTouchStartScale(this.mainMenuBtn),s.default.addbtnTouchEndScale(this.mainMenuBtn,this.returnMainMenuFunc.bind(this)),s.default.addbtnTouchCancelScale(this.mainMenuBtn),s.default.addbtnTouchStartScale(this.exitBtn),s.default.addbtnTouchEndScale(this.exitBtn,this.exitBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.exitBtn),this.setupFonts()},e.prototype.setupFonts=function(){this.titleLabel.string=c.default.instance.trans(r.GDLanguage.pop_sure),this.restartLabel.string=c.default.instance.trans(r.GDLanguage.pop_restart),this.exitLabel.string=c.default.instance.trans(r.GDLanguage.pop_quit),this.mainLabel.string=c.default.instance.trans(r.GDLanguage.main_screen),this.descLabel.string=c.default.instance.trans(r.GDLanguage.lose_cookies)},e.prototype.blowupHeartAnimFunc=function(t){0==t?this.node.active=!1:1==t&&cc.tween(this.heartNode).to(.2,{scale:1.2}).to(.1,{scale:1}).start()},e.prototype.showPop=function(t){this.node.active=!0,this.showPopData=t,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),this.restartBtn.active=!1,this.mainMenuBtn.active=!1,this.exitBtn.active=!1,0==this.showPopData.popType?(this.restartBtn.active=!0,this.mainMenuBtn.active=!0,this.popNode.height=700):1==this.showPopData.popType&&(this.exitBtn.active=!0,this.popNode.height=600),this.cookieNumLabel.getComponent(cc.Label).string="x"+l.default.getInstance().cookieDict.cookieCurCount},e.prototype.hideLoseLovePop=function(){this.node.active=!1,cc.game.emit("blowupHeartAnim",0)},e.prototype.restartFunc=function(){this.exitBtnFunc()},e.prototype.returnMainMenuFunc=function(){this.exitBtnFunc()},e.prototype.exitBtnFunc=function(){this.node.active=!1,cc.game.emit("blowupHeartAnim",1)},i([d(cc.Node)],e.prototype,"mainLayer",void 0),i([d(cc.Node)],e.prototype,"popNode",void 0),i([d(cc.Label)],e.prototype,"titleLabel",void 0),i([d(cc.Label)],e.prototype,"descLabel",void 0),i([d(cc.Label)],e.prototype,"numLabel",void 0),i([d(cc.Label)],e.prototype,"exitLabel",void 0),i([d(cc.Label)],e.prototype,"restartLabel",void 0),i([d(cc.Label)],e.prototype,"mainLabel",void 0),i([d(cc.Node)],e.prototype,"restartBtn",void 0),i([d(cc.Node)],e.prototype,"closeBtn",void 0),i([d(cc.Node)],e.prototype,"mainMenuBtn",void 0),i([d(cc.Node)],e.prototype,"exitBtn",void 0),i([d(cc.Node)],e.prototype,"heartNode",void 0),i([d(cc.Node)],e.prototype,"cookieNumLabel",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../manager/GameManager":"GameManager"}],loseLovePop:[function(t,e,o){"use strict";cc._RF.push(e,"86deeGjM+dBbIIFyxI9LHFp","loseLovePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/enumConfig"),s=t("../manager/data-manager"),l=t("../manager/report-common"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.popNode=null,e.titleNode=null,e.titleLabel=null,e.descNode=null,e.closeBtn=null,e.giveupBtn=null,e.noGiveupBtn=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.mask,this.hideLoseLovePop.bind(this)),r.default.addbtnTouchStartScale(this.closeBtn),r.default.addbtnTouchEndScale(this.closeBtn,this.hideLoseLovePop.bind(this)),r.default.addbtnTouchCancelScale(this.closeBtn),r.default.addbtnTouchStartScale(this.giveupBtn),r.default.addbtnTouchEndScale(this.giveupBtn,this.giveupBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.giveupBtn),r.default.addbtnTouchStartScale(this.noGiveupBtn),r.default.addbtnTouchEndScale(this.noGiveupBtn,this.noGiveupBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.noGiveupBtn)},e.prototype.showLoseLovePop=function(t){this.node.active=!0,this.showPopData=t,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),0==this.showPopData.popType?(this.popNode.height=715,this.descNode.active=!0):1==this.showPopData.popType&&(this.popNode.height=601,this.descNode.active=!1)},e.prototype.hideLoseLovePop=function(){this.node.active=!1},e.prototype.giveupBtnFunc=function(){console.log("\u6253\u5f00\u4e3b\u9875\u9762"),cc.game.emit(c.EMITKEY.SHOWMAINLAYER);var t=s.default.getTAUserInfo();l.default.reportTACommon("game_give_up",t)},e.prototype.noGiveupBtnFunc=function(){this.node.active=!1},i([d(cc.Node)],e.prototype,"mask",void 0),i([d(cc.Node)],e.prototype,"popNode",void 0),i([d(cc.Node)],e.prototype,"titleNode",void 0),i([d(cc.Label)],e.prototype,"titleLabel",void 0),i([d(cc.Node)],e.prototype,"descNode",void 0),i([d(cc.Node)],e.prototype,"closeBtn",void 0),i([d(cc.Node)],e.prototype,"giveupBtn",void 0),i([d(cc.Node)],e.prototype,"noGiveupBtn",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/enumConfig":"enumConfig","../manager/data-manager":"data-manager","../manager/report-common":"report-common"}],"main-cookie-reward":[function(t,e,o){"use strict";cc._RF.push(e,"98ef1B9rVlIgINOcS1NN8Sh","main-cookie-reward");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../../pre/main/cookiePrefab"),c=t("../../common/CcJsFunc"),s=t("../../common/dataTs"),l=t("../../common/enumConfig"),u=t("../../common/spine"),p=t("../../common/util"),d=t("../../manager/GameManager"),h=t("../../manager/report-common"),f=cc._decorator,m=f.ccclass,g=f.property,y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.clickBtn=null,e.cookieImg=null,e.progressBar=null,e.progressLabel=null,e.rewardImage=null,e.rewardNumLabel=null,e.clockSpine=null,e.timeLabel=null,e.cookiePrefab=null,e.startNode=null,e.updateTime=0,e.progressOld=0,e.progressNew=0,e.isUpdate=!1,e.rewardData=null,e.cookieNum=0,e.rewardCallback=null,e}return a(e,t),e.prototype.update=function(t){this.updateTime+=t,this.updateTime>=1&&(this.updateTime-=1,this.updateTimeNum()),this.isUpdate&&(this.progressOld+=15*t,this.progressOld0?this.timeLabel.string=o[0]+"d"+o[1]+"h":o[1]>0?this.timeLabel.string=o[1]+"h"+o[2]+"m":o[2]>0?this.timeLabel.string=o[2]+"m"+o[3]+"s":o[3]>0&&(this.timeLabel.string=o[2]+"m"+o[3]+"s")}}},e.prototype.start=function(){this.clockSpine.getComponent(u.default).play("5Clock1",0),this.updateSubViewFunc(),this.updateTimeNum()},e.prototype.updateSubViewFunc=function(){var t=s.default.gameConfigData.baseConfigData.cookieReward;console.log("cookieReward",JSON.stringify(t));var e=s.default.getCookieRewardData();console.log("cookieData",JSON.stringify(e)),console.log("cookieDict",JSON.stringify(d.default.getInstance().cookieDict)),this.progressNew=e.cookieNum,this.progressOld=e.cookieNum-d.default.getInstance().cookieDict.cookie,this.progressOld<0&&(this.progressOld=0);var o=e.progress;o>=3&&(o=0,e.progress=o,s.default.setCookieRewardData(e)),this.rewardData=t[o],console.log("rewardData",JSON.stringify(this.rewardData));var n=e.cookieNum;n>=this.rewardData.cookieNum&&(n=this.rewardData.cookieNum),this.progressLabel.string=n+"/"+this.rewardData.cookieNum,this.rewardNumLabel.string=this.rewardData.rewardCount+"",this.progressBar.progress=this.progressOld/this.rewardData.cookieNum;var a="rewardIcon/"+this.rewardData.rewardType+".png";c.default.changeSpriteFrame(this.rewardImage,a),d.default.getInstance().cookieDict.cookie=0,d.default.getInstance().cookieDict.cookieCurCount=0,console.log("\u6e05\u7a7acookieDict",d.default.getInstance().cookieDict),this.cookieNum=n},e.prototype.checkProgressFunc=function(){if(this.cookieNum>=this.rewardData.cookieNum){this.getRewardFunc();var t=s.default.getCookieRewardData();t.progress+=1,t.progress>3&&(t.progress=0),t.cookieNum>this.rewardData.cookieNum?(console.log("\u591a\u7684\u997c\u5e72\u8ba1\u5165\u4e0b\u4e00\u5956\u52b1",t.cookieNum-this.rewardData.cookieNum),t.cookieNum=t.cookieNum-this.rewardData.cookieNum,d.default.getInstance().cookieDict.cookie=t.cookieNum):t.cookieNum=0,s.default.setCookieRewardData(t),this.updateSubViewFunc(),this.isUpdate=!0}else cc.game.emit(l.EMITKEY.HIDEMASKLAYER)},e.prototype.callbackFunc=function(){console.log("\u5956\u52b1\u64ad\u653e\u6210\u529f ######"),cc.game.emit(l.EMITKEY.HIDEMASKLAYER),cc.game.emit(l.EMITKEY.MAINUPDATEUI)},e.prototype.rewardCallbackFunc=function(){this.rewardCallback&&this.rewardCallback()},e.prototype.getRewardFunc=function(){console.log("\u9886\u53d6\u5956\u52b1",JSON.stringify(this.rewardData));var t=s.default.getUserData(),e=this.rewardData.rewardType;if("reward_fish"==e)t.fish+=this.rewardData.rewardCount;else{t[e]+=this.rewardData.rewardCount;var o,n=0,a="";"prop_remove"==e?(n=1,a="\u79fb\u51fa\u9053\u5177"):"prop_cancel"==e?(n=2,a="\u64a4\u9500\u9053\u5177"):"prop_random"==e&&(n=3,a="\u6d17\u724c\u9053\u5177"),o=t[e],h.default.reportTACommon("item_get",{item_id:n,item_type:"\u6d88\u8017\u9053\u5177",item_name:a,change_num:1,num_before:o-1,num_after:o,action:"\u997c\u5e72\u6d3b\u52a8\u5f00\u542f\u5b9d\u7bb1",reason:"\u5b9d\u7bb1\u83b7\u5f97\u9053\u5177"})}s.default.saveUserData(t);var i={popName:"showRewardPop",showPopData:{popCallbackCollect:null,rewardData:this.rewardData,startNode:this.rewardImage,endNode:this.startNode,popType:1,callback:this.callbackFunc.bind(this),rewardCallback:this.rewardCallbackFunc.bind(this)}};cc.game.emit("showPop",i)},e.prototype.checkCookie=function(t,e){if(this.rewardCallback=e,console.log("cookieDict",d.default.getInstance().cookieDict),d.default.getInstance().cookieDict.cookie<=0)return console.log("cookie <= 0 ######"),void(t&&t());var o=this,n=c.default.getWorldPosition(this.startNode),a=c.default.getNodePosition(this.node,n),i=c.default.getWorldPosition(this.cookieImg),s=c.default.getNodePosition(this.node,i),u=cc.instantiate(this.cookiePrefab);this.node.addChild(u),u.getComponent(r.default).showData(1,d.default.getInstance().cookieDict.cookie),u.position=cc.v3(a),u.scale=0,cc.tween(u).to(.2,{scale:1.2}).to(.2,{scale:1}).delay(.2).to(.3,{position:cc.v3(a.x+10,a.y-10)}).to(.3,{position:cc.v3(a.x-12,a.y-12)}).to(.5,{position:cc.v3(s)}).call(function(){u.destroy(),cc.tween(o.cookieImg).to(.1,{scale:1.2}).to(.1,{scale:1}).call(function(){t&&t(),o.updateSubViewFunc(),cc.game.emit(l.EMITKEY.HIDEMASKLAYER),o.isUpdate=!0}).start()}).start()},i([g(cc.Node)],e.prototype,"clickBtn",void 0),i([g(cc.Node)],e.prototype,"cookieImg",void 0),i([g(cc.ProgressBar)],e.prototype,"progressBar",void 0),i([g(cc.Label)],e.prototype,"progressLabel",void 0),i([g(cc.Node)],e.prototype,"rewardImage",void 0),i([g(cc.Label)],e.prototype,"rewardNumLabel",void 0),i([g(cc.Node)],e.prototype,"clockSpine",void 0),i([g(cc.Label)],e.prototype,"timeLabel",void 0),i([g(cc.Prefab)],e.prototype,"cookiePrefab",void 0),i([g(cc.Node)],e.prototype,"startNode",void 0),i([m],e)}(cc.Component);o.default=y,cc._RF.pop()},{"../../../pre/main/cookiePrefab":"cookiePrefab","../../common/CcJsFunc":"CcJsFunc","../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig","../../common/spine":"spine","../../common/util":"util","../../manager/GameManager":"GameManager","../../manager/report-common":"report-common"}],"main-rank":[function(t,e,o){"use strict";cc._RF.push(e,"9b6efOXGmVLpb6Xc/L4u6Jt","main-rank");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]\u83b7\u53d6\u7528\u6237\u4fe1\u606f\u6210\u529f = ",g.default.rankUserInfo),t.label=2;case 2:return console.log("PUSH=>\u8bf7\u6c42\u7f51\u7edc\u6570\u636e ######"),this.getStageInfo(),this.getRankInfo(),[2]}})})},e.prototype.orderby=function(t,e){if(t.length<=1)return t;for(var o=Math.floor(t.length/2),n=t.splice(o,1)[0],a=[],i=[],r=0,c=t;r0||o[i].fail_score\u821e\u53f0"),t.setInfoData(e)):(console.log("\u7f13\u5b58\u6570\u636e\u8fc7\u671f->\u821e\u53f0"),l.default.getStageInfoData(function(e){t.setInfoData(e),g.default.setStageData(e)}))},e.prototype.setInfoData=function(t){this.stageInfo=t.data,this.setStageInfo()},e.prototype.getRankInfo=function(){f.default.getInstance().game_over>0&&f.default.getInstance().playGameCount<2&&p.default.removeItem(d.STORAGEKEY.RANKDATA);var t=this,e=g.default.getRankData();e?(console.log("\u4f7f\u7528\u672c\u5730\u7f13\u5b58\u6570\u636e->\u6392\u884c\u699c\u6570\u636e"),t.setRankData(e)):(console.log("\u672c\u5730\u7f13\u5b58\u6570\u636e\u4e0d\u5b58\u5728\u6216\u5df2\u8fc7\u671f->\u6392\u884c\u699c\u6570\u636e"),l.default.getRankInfoData(function(e){t.setRankData(e),g.default.setRankData(e)}))},e.prototype.setRankData=function(t){this.setSubViewData(t.data.list),f.default.getInstance().rankInfo=t.data,this.mainUILayer.getComponent(y.default).showBottomRankNode(t.data.user)},e.prototype.setStageInfo=function(){var t=this.stageInfo;this.capSp.active=!1,this.sunglassesSp.active=!1,this.hairSp.active=!1,this.catNodeIcon.opacity=0,this.sunNodeIcon.opacity=0,this.hairNodeIcon.opacity=0,this.catNodeIconWoman.opacity=0,this.sunNodeIconWoman.opacity=0,this.hairNodeIconWoman.opacity=0,t.firstWin&&t.firstWin.nick_name&&t.firstWin.nick_name.length&&(this.capSp.active=!0,console.log("info.firstWin.gender = "+t.firstWin.gender),0==t.firstWin.gender?(this.catNodeIcon.opacity=255,u.default.setAvatar(this.catNodeIcon,t.firstWin.avatar)):(this.catNodeIconWoman.opacity=255,u.default.setAvatar(this.catNodeIconWoman,t.firstWin.avatar))),t.iqWin&&t.iqWin.nick_name&&t.iqWin.nick_name.length?(this.sunglassesSp.active=!0,this.sunglassesSp.getComponent(h.default).play("Stage1",0),console.log("info.iqWin.gender = "+t.iqWin.gender),0==t.iqWin.gender?(this.sunNodeIcon.opacity=255,u.default.setAvatar(this.sunNodeIcon,t.iqWin.avatar)):(this.sunNodeIconWoman.opacity=255,u.default.setAvatar(this.sunNodeIconWoman,t.iqWin.avatar))):(this.sunglassesSp.active=!0,this.sunglassesSp.getComponent(h.default).play("Stage0",0)),t.timeWin&&t.timeWin.nick_name&&t.timeWin.nick_name.length&&(this.hairSp.active=!0,console.log("info.firstWin.gender = "+t.firstWin.gender),0==t.timeWin.gender?(this.hairNodeIcon.opacity=255,u.default.setAvatar(this.hairNodeIcon,t.timeWin.avatar)):(this.hairNodeIconWoman.opacity=255,u.default.setAvatar(this.hairNodeIconWoman,t.timeWin.avatar)))},e.prototype.onDisable=function(){this.node.stopAllActions()},e.prototype.setSubViewData=function(t){var e=this;void 0===t&&(t=[]);var o=this,n=p.default.getUserData().userID,a=!1;for(var i in t)if((l=(_=t[i]).result)&&l.length){var r=JSON.parse(l);for(var c in r)if(r[c].uid==Number(n)){a=!0;break}}if(0==a){var s=g.default.rankUserInfo;if(s&&s.region&&s.region.length)for(var i in t){var l=(_=t[i]).result;if(s.region==_.name){if(l&&l.length){var u=[];(r=JSON.parse(l)).length>=36&&(r[18]=s);for(var h=0;h=0||(o=o.slice(0,o.length-1),o+=this.IsUpper(a)?a.toLowerCase():a.toUpperCase(),t.indexOf(o)>=0)))return!1}return!0},e.prototype.IsUpper=function(t){return t===t.toUpperCase()},i([P({type:cc.Node,tooltip:"mainUILayer"})],e.prototype,"mainUILayer",void 0),i([P({type:cc.Node,tooltip:"\u80cc\u666fspine"})],e.prototype,"bgSp",void 0),i([P({type:cc.Node,tooltip:"\u5e3d\u5b50\u7f8aspine"})],e.prototype,"capSp",void 0),i([P({type:cc.Node,tooltip:"\u58a8\u955c\u7f8aspine"})],e.prototype,"sunglassesSp",void 0),i([P({type:cc.Node,tooltip:"\u957f\u53d1\u7f8aspine"})],e.prototype,"hairSp",void 0),i([P({type:cc.Prefab,tooltip:"\u7f8a\u7fa4"})],e.prototype,"sheepFlock",void 0),i([P({type:cc.Node,tooltip:"\u5b9a\u4f4d\u6309\u94ae"})],e.prototype,"positionNode",void 0),i([P({type:cc.Node,tooltip:"\u5b9a\u4f4d\u6309\u94ae\u5934\u50cf"})],e.prototype,"positionNodeIcon",void 0),i([P({type:cc.Node,tooltip:"\u5b9a\u4f4d\u6309\u94ae\u56fe\u6807"})],e.prototype,"positionNodeCycle",void 0),i([P({type:cc.Node,tooltip:"\u8dd1\u9a6c\u706f"})],e.prototype,"scrollMsg",void 0),i([P({type:cc.Node,tooltip:"\u5934\u50cf"})],e.prototype,"iconNode",void 0),i([w],e)}(cc.Component);o.default=k,cc._RF.pop()},{"../api/ApiTool":"ApiTool","../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/spine":"spine","../manager/GameManager":"GameManager","../manager/data-manager":"data-manager","../manager/report-common":"report-common","../module/ScrollMsg":"ScrollMsg","../module/sheep-flock":"sheep-flock","./mainUiLayer":"mainUiLayer"}],"main-tabbar":[function(t,e,o){"use strict";cc._RF.push(e,"66a40jaUH5JALG1+2y2R2kp","main-tabbar");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../common/dataTs"),u=t("../common/enumConfig"),p=t("../manager/GameManager"),d=t("../manager/report-common"),h=t("../utils/uma/uma-sdk"),f=cc._decorator,m=f.ccclass,g=f.property,y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainPage=null,e.pageMain=null,e.pageDaily=null,e.pageCollect=null,e.tabbarMain=null,e.tabbarDaily=null,e.tabbarCollect=null,e.pageContent=null,e.tabbarArr=[],e.updateTime=0,e}return a(e,t),e.prototype.update=function(t){this.updateTime+=t,this.updateTime},e.prototype.start=function(){cc.game.on(u.EMITKEY.MAINUPDATEUI,this.setMainLayerData,this),cc.game.on(u.EMITKEY.UPDATETABBARRECEIVE,this.updateTabbar,this),this.pageContent=this.mainPage.getChildByName("pageContent"),s.default.addbtnTouchEndScale(this.tabbarCollect,this.tabbarAction.bind(this,0)),s.default.addbtnTouchEndScale(this.tabbarMain,this.tabbarAction.bind(this,1)),s.default.addbtnTouchEndScale(this.tabbarDaily,this.tabbarAction.bind(this,2)),this.tabbarArr.push(this.tabbarCollect),this.tabbarArr.push(this.tabbarMain),this.tabbarArr.push(this.tabbarDaily),this.pageCollect.x=0,this.pageMain.x=750,this.pageDaily.x=1500,this.updateTabbar(1,!1),this.setMainLayerData(),this.setupFonts()},e.prototype.setupFonts=function(){var t=c.default.instance.trans(r.GDLanguage.collect);this.tabbarCollect.getChildByName("icon-label").getComponent(cc.Label).string=t;var e=c.default.instance.trans(r.GDLanguage.main_screen);this.tabbarMain.getChildByName("icon-label").getComponent(cc.Label).string=e;var o=c.default.instance.trans(r.GDLanguage.daily_challenge);this.tabbarDaily.getChildByName("icon-label").getComponent(cc.Label).string=o},e.prototype.onEnable=function(){this.setMainLayerData()},e.prototype.setMainLayerData=function(){var t=p.default.getInstance().collectionMark;0==t.bgNum&&0==t.brickNum&&(p.default.getInstance().collectionMark.tabbarCollection=!1),p.default.getInstance().collectionMark.tabbarCollection?this.tabbarCollect.getChildByName("icon-mark").active=!0:this.tabbarCollect.getChildByName("icon-mark").active=!1},e.prototype.tabbarAction=function(t){s.default.addClickAudio(),this.updateTabbar(t),t!=u.MAINPAGE.PAGEDAILY?p.default.getInstance().tabbarIsDaily&&(console.log("\u70b9\u51fb\u4e86\u6bcf\u65e5\u6311\u6218\uff0c\u6ca1\u73a9"),h.default.trackEvent("daily_return"),d.default.reportTACommon("daily_return",{})):p.default.getInstance().tabbarIsDaily=!0},e.prototype.updateTabbar=function(t,e){void 0===e&&(e=!0);var o=this;if(2==t&&l.default.getUserData().playLevelId<14)cc.game.emit("showPop",{popName:"nothingPop",showPopData:{popCallbackCollect:null,popType:3}});else{for(var n in p.default.getInstance().mainPage=t,this.tabbarArr){var a=this.tabbarArr[n];t==Number(n)?(a.getChildByName("bg-icon-nor").active=!1,a.getChildByName("bg-icon-sel").active=!0,a.getChildByName("icon-nor").active=!1,a.getChildByName("icon-sel").active=!0):(a.getChildByName("bg-icon-nor").active=!0,a.getChildByName("bg-icon-sel").active=!1,a.getChildByName("icon-nor").active=!0,a.getChildByName("icon-sel").active=!1)}var i=e?.3:0,r=0,c=null;switch(t){case 0:r=0,c=this.pageCollect;break;case 1:r=-750,c=this.pageMain;break;case 2:r=-1500,c=this.pageDaily}c&&(c.active=!0),this.pageContent.stopAllActions(),cc.tween(this.pageContent).to(i,{x:r}).call(function(){o.hideOtherNode(c)}).start(),cc.game.emit(u.EMITKEY.UPDATETABBARSEND,t),this.setMainLayerData()}},e.prototype.hideOtherNode=function(t){var e=this.mainPage.getChildByName("pageContent").children;for(var o in e)t&&t!=e[o]&&(e[o].active=!1)},i([g(cc.Node)],e.prototype,"mainPage",void 0),i([g(cc.Node)],e.prototype,"pageMain",void 0),i([g(cc.Node)],e.prototype,"pageDaily",void 0),i([g(cc.Node)],e.prototype,"pageCollect",void 0),i([g(cc.Node)],e.prototype,"tabbarMain",void 0),i([g(cc.Node)],e.prototype,"tabbarDaily",void 0),i([g(cc.Node)],e.prototype,"tabbarCollect",void 0),i([m],e)}(cc.Component);o.default=y,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../manager/GameManager":"GameManager","../manager/report-common":"report-common","../utils/uma/uma-sdk":"uma-sdk"}],mainCanvas:[function(t,e,o){"use strict";cc._RF.push(e,"53853D2Qg1AFKoc4UUFQ6nI","mainCanvas");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r,c,s=t("../common/enumConfig"),l=t("../common/native/audio"),u=t("../common/native/tt-sdk"),p=t("../common/sdk"),d=t("../manager/GameManager"),h=t("../manager/report-common"),f=cc._decorator,m=f.ccclass,g=f.property;(function(t){t[t.ready=0]="ready",t[t.recording=1]="recording",t[t.stop=2]="stop",t[t.pause=3]="pause"})(r||(r={})),function(t){t[t.RestartRecord=0]="RestartRecord",t[t.ShareMessage=1]="ShareMessage"}(c||(c={}));var y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainLayer=null,e.gameLayer=null,e.status=r.ready,e.recordFinishAction=c.RestartRecord,e.timer=0,e}return a(e,t),e.prototype.start=function(){var t=this;this.mainLayer.active=!0,this.gameLayer.active=!1,cc.game.on(s.EMITKEY.TTSTARTRECORD,this.beginRecordFunc,this),cc.game.on(s.EMITKEY.TTSTOPRECORD,this.stopRecordFunc,this),cc.game.on(s.EMITKEY.TTSHARERECORD,this.shareRecordFunc,this),this.ttRewardInit(),this.scheduleOnce(function(){t.beginRecord()},2),p.default.setOnShow(function(){console.log("on Show"),l.default.playBGM()}),p.default.setOnHide(function(){console.log("on Hide"),l.default.playBGM()})},e.prototype.beginRecordFunc=function(){this.status!=r.recording&&this.beginRecord()},e.prototype.stopRecordFunc=function(){this.stopRecord()},e.prototype.ttRewardInit=function(){if(cc.sys.platform==cc.sys.BYTEDANCE_GAME){var t=tt.getGameRecorderManager();t.onStart(this.recordStart.bind(this)),t.onStop(this.recordStop.bind(this)),t.onPause(this.recordPause.bind(this)),t.onResume(this.recordResume.bind(this))}},e.prototype.beginRecord=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&(console.log("beginRecord ###### "),d.default.getInstance().videoDuration=0,u.default.recorderStart())},e.prototype.stopRecord=function(){u.default.recorderStop()},e.prototype.recordStart=function(){console.log("record start"),d.default.getInstance().videoDuration=0,this.status=r.recording,this.initStatus()},e.prototype.recordStop=function(t){console.log("record stop",t.videoPath),u.default.setVideoPath(t.videoPath),d.default.getInstance().videoPath=t.videoPath,this.status=r.stop,this.initStatus()},e.prototype.recordPause=function(){console.log("record pause"),this.status=r.pause,this.initStatus()},e.prototype.recordResume=function(){console.log("record resume"),this.status=r.recording,this.initStatus()},e.prototype.update=function(t){this.timer+=t,d.default.getInstance().bulletTime+=t,this.status==r.recording&&(d.default.getInstance().videoDuration+=t),this.timer>=1&&(this.timer=0,this.status==r.recording&&this.initStatus())},e.prototype.initStatus=function(){if(d.default.getInstance().videoDuration>=300){u.default.recorderStop();var t=this;this.scheduleOnce(function(){t.beginRecord()},2)}if(d.default.getInstance().videoDuration<1)switch(this.status){case r.ready:console.log("\u5f55\u5236 ###### ");break;case r.recording:console.log("\u5f55\u5236\u4e2d...... ###### ");break;case r.pause:console.log("\u6682\u505c\u5f55\u5236...... ###### ");break;case r.stop:console.log("\u5f55\u5236...... ###### ")}},e.prototype.recordBtnAction=function(){switch(console.log("video tip status:",this.status,r[this.status]),this.status){case r.ready:d.default.getInstance().videoDuration=0,u.default.recorderStart();break;case r.recording:u.default.recorderPause();break;case r.pause:u.default.recorderResume();break;case r.stop:u.default.recorderStart(),this.status=r.recording,d.default.getInstance().videoDuration=0}this.initStatus()},e.prototype.shareRecordFunc=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&(h.default.reportTACommon("share_click",{}),d.default.getInstance().videoDuration<3?cc.game.emit(s.EMITKEY.SHOWMAINTIPS,"\u5f55\u5c4f\u5c0f\u4e8e3s\uff0c\u65e0\u6cd5\u5206\u4eab"):(u.default.recorderStop(),this.showPop()))},e.prototype.showPop=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&(console.log("\u6211\u8981\u70ab\u8000 = ",d.default.getInstance().videoPath),d.default.getInstance().videoPath&&0!=d.default.getInstance().videoPath.length?u.default.shareAppMessage({url:d.default.getInstance().videoPath,success:function(){u.default.recorderStart()},fail:function(){u.default.recorderStart()}}):u.default.recorderStart())},i([g(cc.Node)],e.prototype,"mainLayer",void 0),i([g(cc.Node)],e.prototype,"gameLayer",void 0),i([m],e)}(cc.Component);o.default=y,cc._RF.pop()},{"../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/native/tt-sdk":"tt-sdk","../common/sdk":"sdk","../manager/GameManager":"GameManager","../manager/report-common":"report-common"}],mainCultivateLayer:[function(t,e,o){"use strict";cc._RF.push(e,"a504aoDOgxNhZMyOCq1oDJZ","mainCultivateLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../pre/main/catClawPrefabs"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/enumConfig"),u=t("../common/native/audio"),p=t("../common/spine"),d=t("../manager/GameManager"),h=t("../utils/uma/uma-sdk"),f=t("./catNode"),m=t("./houseLayer"),g=t("./upgrade-tip"),y=t("./wardrobeLayer"),v=cc._decorator,b=v.ccclass,_=v.property,N=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainUILayer=null,e.wholeBuildHouse=null,e.wardrobeLayer=null,e.houseLayer=null,e.topUiLayer=null,e.particlePrefab=null,e.upgradeTip=null,e.clawPrefab=null,e.clawNode=null,e.catObj=null,e.upgradeArr=[],e.popCallbackCollect=null,e.isShowHouse=!1,e}return a(e,t),e.prototype.start=function(){window.xuxu=this,this.node.on("touchstart",this.touchStartFunc,this),this.node.on("touchend",this.hideWardrobelLayer,this),cc.game.on(l.EMITKEY.UPDATETABBARSEND,this.updateTabbar,this),this.initMainCultivateLayer(),this.popCallbackCollect={playGameCallBack:this.playGameFunc.bind(this)}},e.prototype.playGameFunc=function(){},e.prototype.updateTabbar=function(t){t==l.MAINPAGE.PAGEHOUSE?(this.showUpgrade(),this.isShowHouse=!0):this.hideUpgrade()},e.prototype.initMainCultivateLayer=function(){this.nextRoomIsUnloack(),this.clawNode=cc.instantiate(this.clawPrefab),this.wholeBuildHouse.addChild(this.clawNode),this.clawNode.active=!1},e.prototype.setClawNodeWithNode=function(t){if(cc.isValid(this.clawNode))if(t){var e=c.default.getWorldPosition(t),o=c.default.getNodePosition(this.wholeBuildHouse,e);this.clawNode.position=cc.v3(o.x,o.y,0),this.clawNode.getComponent(r.default).playClawAnimation()}else this.clawNode.active=!1;else console.log("\u732b\u722a\u5b50\u5df2\u91ca\u653e ###### ")},e.prototype.unlockNewHouse=function(){this.nextRoomIsUnloack(!0),cc.game.emit(l.EMITKEY.MAINUPDATEUI)},e.prototype.updateLayout=function(){this.catObj={};var t=s.default.getGameConfigData().baseConfigData.unlockHouseDataArray;for(var e in t)for(var o in t[e]){var n=t[e][o];this.setBuildStatus(n,!1,!1)}var a=s.default.getUserData().unlockHouseUserData;for(var e in a)for(var o in a[e])(n=a[e][o]).unlock?this.setBuildStatus(n,!0,!1):n.show&&this.addUpgradeTip(n)},e.prototype.addUpgradeTip=function(t){var e="house_"+t.house,o="room_"+t.room,n="mask_room_"+t.room,a="";"cat"==t.buildType?a=t.buildType:"build"==t.buildType?a=t.buildType+"_"+t.buildid:"skin"==t.buildType&&(a="cat");var i=this.wholeBuildHouse.getChildByName(e),r=i.getChildByName(o),c=i.getChildByName(n),s=r.getChildByName(a),u=s.getChildByName("lock"),p=(s.getChildByName("unLock"),u.getChildByName("lockImg"));c.active=!1;var h=cc.instantiate(this.upgradeTip),f=p.convertToWorldSpaceAR(cc.v2(0,0)),m=i.convertToNodeSpaceAR(f);h.x=m.x,h.y=m.y+p.height/2,"build"==t.buildType&&1==t.house&&1==t.room&&1==t.buildid&&(h.x+=50,h.y+=50),"build"==t.buildType&&3==t.house&&2==t.room&&2==t.buildid&&(h.y+=50),"skin"==t.buildType&&3==t.house&&2==t.room&&9==t.buildid&&(h.y-=50),"build"==t.buildType&&3==t.house&&3==t.room?1==t.buildid?h.x-=70:2==t.buildid?(h.x+=50,h.y+=50):3==t.buildid?h.x+=50:10==t.buildid&&(h.x-=50,h.y-=50):"skin"==t.buildType&&3==t.house&&3==t.room&&10==t.buildid&&(h.x-=50,h.y-=50),i.addChild(h),h.getComponent(g.default).showPoint(t,this,!0),this.upgradeArr.push(h),d.default.getInstance().mainPage!=l.MAINPAGE.PAGEHOUSE&&(h.active=!1)},e.prototype.clickUpgradePoint=function(t){for(var e in this.upgradeArr)this.upgradeArr[e].getComponent(g.default).showPoint();t.getComponent(g.default).showFish()},e.prototype.clickUpgradeFish=function(t,e){for(var o in console.log("houseData = "+JSON.stringify(t)),this.upgradeArr)this.upgradeArr[o].getComponent(g.default).showPoint();var n=s.default.getUserData(),a=n.unlockHouseUserData;if(n.fish>=t.fish){for(var i in a)for(var r in a[i])t.unlockID==a[i][r].unlockID&&(a[i][r].unlock=!0),a[i][r].show=!0;var c=!1;if(a.length){var u=a[a.length-1];for(var o in u)u[o].unlock||(c=!0)}if(n.fish-=t.fish,n.unlockHouseUserData=a,"cat"==t.buildType||"skin"==t.buildType){var p={clothesID:t.clothesID,clothRank:t.clothesID%1e3==0?3:1,isWear:t.clothesID%1e3==0},f=n.catClothesData,m="cat_"+t.buildid;f[m]?f[m].push(p):(console.log("userCldata clKey\u4e3a\u7a7a\uff0c\u9700\u8981\u521d\u59cb\u5316\u6570\u7ec4 ### "),f[m]=[],f[m].push(p)),d.default.getInstance().collectionMark.tabbarCollection=!0,"cat"==t.buildType?d.default.getInstance().collectionMark.catNum=t.clothesID:(d.default.getInstance().collectionMark.catNum=t.clothesID,d.default.getInstance().collectionMark.catSkinNum=t.clothesID)}s.default.saveUserData(n),e.getComponent(g.default).hide(),cc.game.emit(l.EMITKEY.SHOWMASKLAYER,7),this.playFlyFishAnimation(t,e.node),c||(console.log("\u5237\u65b0\u89e3\u9501\u6c14\u6ce1"),this.updateLayout());var y=t.unlockID+"";h.default.trackEvent("house_unlock",{houseID:y}),cc.isValid(this.clawNode)&&(console.log("\u91ca\u653e\u732b\u722a\u5b50 ###### "),this.clawNode.destroy())}else{var v={popName:"nothingPop",showPopData:{popCallbackCollect:this.popCallbackCollect,popType:0}};cc.game.emit("showPop",v)}},e.prototype.playFlyFishAnimation=function(t){var e="house_"+t.house,o="room_"+t.room,n="mask_room_"+t.room,a="";"cat"==t.buildType?a=t.buildType:"build"==t.buildType?a=t.buildType+"_"+t.buildid:"skin"==t.buildType&&(a="cat");var i=this.wholeBuildHouse.getChildByName(e),r=i.getChildByName(o),c=i.getChildByName(n),s=r.getChildByName(a),l=s.getChildByName("lock");s.getChildByName("unLock"),l.getChildByName("lockImg"),c.active=!1},e.prototype.flyUnlockFishFunc=function(t,e){this.removeFunc(this.upgradeArr,e),this.setBuildStatus(t,!0,!0),cc.game.emit(l.EMITKEY.MAINUPDATEUI)},e.prototype.indexOfFunc=function(t,e){for(var o=0;o-1&&t.splice(o,1)},e.prototype.nextRoomIsUnloack=function(t){void 0===t&&(t=!1);var e=s.default.getHourseUnlockData(t);e&&(console.log("unlockData ### = "+JSON.stringify(e)),0==this.upgradeArr.length&&(this.updateLayout(),e.length<=4?this.houseLayer.getComponent(m.default).moveWithRoomId(l.ROOMTYPE.ROOMONE):4=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../api/api-sheep"),l=t("../common/dataTs"),u=t("../common/enumConfig"),p=t("../common/native/audio"),d=t("../common/sdk"),h=t("../game/gameLayer"),f=t("../manager/data-manager"),m=t("../manager/DateManager"),g=t("../manager/GameManager"),y=cc._decorator,v=y.ccclass,b=y.property,_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.gameLayer=null,e.commonUIPrefab=null,e.commonUI=null,e.topicUIPrefab=null,e.topicUI=null,e}return a(e,t),e.prototype.start=function(){cc.game.on(u.EMITKEY.BEGINGAME,this.beginGameFunc,this),cc.game.on(u.EMITKEY.SHOWMODULE,this.showModuleFunc,this),this.setupSubviews(),this.updateSubUI(),d.default.isPlatform(d.Platform.web)||this.preLoadVedio(),this.requestData()},e.prototype.requestData=function(){l.default.isLogin()&&this.requestMatchResult()},e.prototype.requestMatchResult=function(){if(!f.default.getMatchResultData()){f.default.setMatchResultData();var t=this;setTimeout(function(){s.default.getMatchResult(2,function(e){t.showMatch(e)})},1e3)}},e.prototype.showMatch=function(t){if(t&&t.data&&t.data.topic&&t.data.topic.id>0&&t.data.topic.info&&t.data.topic.info.uid>0){var e={popName:"topicLastWinPop",showPopData:t.data};cc.game.emit("showPop",e)}},e.prototype.onEnable=function(){this.updateSubUI()},e.prototype.beginGameFunc=function(){this.beginGame()},e.prototype.showModuleFunc=function(t){switch(void 0===t&&(t=u.MODULETYPE.COMMON),t){case u.MODULETYPE.COMMON:this.commonUI.active=!0,this.topicUI.active=!1;break;case u.MODULETYPE.TOPIC:this.commonUI.active=!1,this.topicUI.active=!0}},e.prototype.setupSubviews=function(){this.topicUI=cc.instantiate(this.topicUIPrefab),this.topicUI.active=!1,this.node.addChild(this.topicUI),this.commonUI=cc.instantiate(this.commonUIPrefab),this.commonUI.active=!0,this.node.addChild(this.commonUI)},e.prototype.updateSubUI=function(){this.node.active=!0,this.gameLayer.active=!1,this.playMainBgMusic(),cc.game.emit(u.EMITKEY.MAINUPDATEUI)},e.prototype.showMainLayer=function(t){void 0===t&&(t=u.GAMEOVER.NONE),cc.game.emit(u.EMITKEY.TTSTOPRECORD),cc.game.emit(u.EMITKEY.TTSTARTRECORD),console.log("\u56de\u5230\u4e3b\u9875\u9762 = "+t),this.node.active=!0,this.gameLayer.active=!1,this.updateRewardData(t),this.playMainBgMusic(),cc.game.emit(u.EMITKEY.MAINUPDATEUI),g.default.getInstance().gameType==u.GAMETYPE.GAMEDAILY?cc.game.emit(u.EMITKEY.UPDATETABBARRECEIVE,2):cc.game.emit(u.EMITKEY.UPDATETABBARRECEIVE,1)},e.prototype.preLoadVedio=function(){var t=l.default.GetVedioID();d.default.preloadVideoAd(t,function(){console.log("\u9884\u52a0\u8f7d\u89c6\u9891\u6210\u529f")},function(){console.log("\u9884\u52a0\u8f7d\u89c6\u9891\u5931\u8d25")},function(){},!0)},e.prototype.updateRewardData=function(t){switch(t){case u.GAMEOVER.LEVELFAIL:g.default.getInstance().gameType==u.GAMETYPE.GAMELEVEL&&l.default.resetSprintReward()}},e.prototype.playMainBgMusic=function(){p.default.playBGM()},e.prototype.beginGame=function(){cc.game.emit(u.EMITKEY.TTSTARTRECORD);var t=this,e=0,o=m.default.format(u.CALENDARNAMES[4],new Date);if(o){var n=o.split("-");n.length>=3&&(e=Number(n[2]))}l.default.getLevelByID(e,function(o){console.log("\u5173\u5361\u6570\u636e:",e,o),t.gameLayer.activeInHierarchy?console.log("\u5df2\u7ecf\u6253\u5f00 mainLayer 1"):o.length<1?cc.game.emit("showMainTips",c.default.instance.trans(r.GDLanguage.level_inadequate)):(t.beginGameData(o),f.default.setGameLevelData(o))})},e.prototype.beginGameData=function(t){var e=this;cc.game.emit(u.EMITKEY.SHOWTRANSITLAYER,function(o){e.gameLayer.activeInHierarchy?console.log("\u5df2\u7ecf\u6253\u5f00 mainLayer 2"):(console.log("\u53ef\u4ee5\u6253\u5f00\u4e86 mainLayer"),e.gameLayer.getComponent(h.default).initLevelLayer(t),e.node.active=!1,o())})},i([b({type:cc.Node,tooltip:"\u6e38\u620f\u8282\u70b9"})],e.prototype,"gameLayer",void 0),i([b({type:cc.Prefab,tooltip:"common\u9875\u9762\u8282\u70b9"})],e.prototype,"commonUIPrefab",void 0),i([b({type:cc.Prefab,tooltip:"topic\u8282\u70b9"})],e.prototype,"topicUIPrefab",void 0),i([v],e)}(cc.Component);o.default=_,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../api/api-sheep":"api-sheep","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/sdk":"sdk","../game/gameLayer":"gameLayer","../manager/DateManager":"DateManager","../manager/GameManager":"GameManager","../manager/data-manager":"data-manager"}],mainUiLayer:[function(t,e,o){"use strict";cc._RF.push(e,"4db0ejDPE9I06u2DuGNxPAb","mainUiLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=1&&(this.updateTime=0,this.updateTimeFunc())},e.prototype.updateTimeFunc=function(){var t=f.default.format(p.CALENDARNAMES[8],new Date).split(" ");if(!(t.length<2)){var e=t[1].split(":");if(!(e.length<3)){var o=3600*(24-Number(e[0])-1)+60*(60-Number(e[1])-1)+(60-Number(e[2]));if(this.timeNode.activeInHierarchy){var n=u.default.formatTime(1e3*o),a=(n[1]<10?"0"+n[1]:n[1])+":"+(n[2]<10?"0"+n[2]:n[2])+":"+(n[3]<10?"0"+n[3]:n[3])+" \u91cd\u7f6e";this.timeLabel.string=a}this.setMainLayerData()}}},e.prototype.onEnable=function(){this.topicBtn.getChildByName("tag_icon").active=!v.default.getMatchResultData(),h.default.getInstance().collectionMark.topicClothesNum>0?this.collectBtn.getChildByName("tag_icon").active=!0:this.collectBtn.getChildByName("tag_icon").active=!1},e.prototype.start=function(){cc.game.on(p.EMITKEY.MAINUPDATEUI,this.setMainLayerData,this),cc.game.on(p.EMITKEY.RANKUSERINFOSUCCESS,this.rankUserInfoFunc,this),cc.game.on(p.EMITKEY.BULLETSTATE,this.bulletStateFunc,this),this.bulletStateFunc(),s.default.addTargetTouchUpInside(this.setupBtn,this.setupTouchEnd.bind(this)),s.default.addTargetTouchUpInside(this.rankBtn,this.rankBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.ttRankBtn,this.rankBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.beginBtn,this.beginBtnEnd.bind(this)),s.default.addTargetTouchUpInside(this.focusBtn,this.focusBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.childBtn,this.childBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.deskBtn,this.deskBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.bulletBtn,this.bulletBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.collectBtn,this.collectBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.topicBtn,this.topicBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.friendBtn,this.friendBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.meBtn,this.meBtnFunc.bind(this)),l.default.isLogin()?(this.bulletBtn.active=!0,this.meBtn.active=!0):(this.bulletBtn.active=!1,this.meBtn.active=!1),this.childBtn.active=!1,this.deskBtn.active=!1,this.focusBtn.active=!1,y.default.isSupportFocusDouYin()&&(this.focusBtn.active=!0),this.setMainLayerData(),this.updateTimeFunc(),this.popCallbackCollect={freeCallBack:this.freeCallBackFunc.bind(this),exitCallBack:this.exitCallBackFunc.bind(this)},this.bottomRankNode.active=!1,this.requestData(),l.default.isPlatform(l.GDPlatform.wx)||l.default.isPlatform(l.GDPlatform.web)?(this.friendBtn.active=!0,this.rankBtn.active=!0):(this.friendBtn.active=!1,this.rankBtn.active=!1),l.default.isPlatform(l.GDPlatform.tt)||l.default.isPlatform(l.GDPlatform.oppo)||l.default.isPlatform(l.GDPlatform.vivo)?this.ttRankBtn.active=!0:this.ttRankBtn.active=!1},e.prototype.meBtnFunc=function(){console.log("\u4e2a\u4eba\u8d44\u6599"),cc.game.emit("showPop",{popName:"personalPop",showPopData:{}})},e.prototype.friendBtnFunc=function(){console.log("\u670b\u53cb\u5708"),cc.game.emit("showPop",{popName:"todayRankPop",showPopData:{}})},e.prototype.beginBtnEnd=function(){console.log("\u5f00\u59cb\u6e38\u620f"),this.beginTouchEnd(1)},e.prototype.topicBtnFunc=function(){console.log("\u4eca\u65e5\u8bdd\u9898"),this.beginTouchEnd(2)},e.prototype.collectBtnFunc=function(){console.log("\u6536\u85cf");var t={popName:"topicCollectPop",showPopData:{topicClothesNum:h.default.getInstance().collectionMark.topicClothesNum,changeClothesCb:this.changeClothesFunc.bind(this)}};cc.game.emit("showPop",t),this.collectBtn.getChildByName("tag_icon").active=!1,h.default.getInstance().collectionMark.topicClothesNum=0},e.prototype.changeClothesFunc=function(t){g.default.updateUserSkin(t,function(){}),setTimeout(function(){cc.game.emit(p.EMITKEY.CHANGESHEEPCLOTHES)},1e3)},e.prototype.bulletStateFunc=function(){var t=l.default.getItem(p.STORAGEKEY.BULLETSWITCH);if(!t)return console.log("bullet = "+t),void l.default.setItem(p.STORAGEKEY.BULLETSWITCH,1);this.bulletNode.opacity=1==t?255:0},e.prototype.rankUserInfoFunc=function(){l.default.isLogin()?(this.bulletBtn.active=!0,this.meBtn.active=!0):(this.bulletBtn.active=!1,this.meBtn.active=!1)},e.prototype.bulletBtnFunc=function(){h.default.getInstance().bulletTime<=0?cc.game.emit(p.EMITKEY.SHOWMAINTIPS,"\u4e00\u5206\u949f\u53ea\u80fd\u53d1\u4e00\u6761\u5f39\u5e55\u54e6~"):(console.log("\u53d1\u5f39\u5e55"),cc.game.emit("showPop",{popName:"bulletScreenPop",showPopData:{}}))},e.prototype.focusBtnFunc=function(){console.log("\u5173\u6ce8"),y.default.focusDouYin()},e.prototype.childBtnFunc=function(){console.log("\u8f6c\u8df3"),y.default.gameBox()},e.prototype.deskBtnFunc=function(){console.log("\u684c\u9762"),y.default.addShortcut()},e.prototype.requestData=function(){l.default.isLogin()&&g.default.requestUserInfo()},e.prototype.exitCallBackFunc=function(){},e.prototype.showBottomRankNode=function(t){t.index?(this.bottomRankNode.active=!0,this.bottomRankNode.getChildByName("rank").getComponent(cc.Label).string="\u7b2c"+t.index+"\u540d"):this.bottomRankNode.active=!1},e.prototype.freeCallBackFunc=function(){console.log("\u89c2\u770b\u5e7f\u544a ###### ");var t=this,e=l.default.GetVedioID();m.default.watchAdVideo({id:e,success:function(){console.log("\u6210\u529f sdk"),t.beginTouchCallbackFunc()},fail:function(){console.log("\u5931\u8d25")},nofit:function(){t.shareTTAction()}})},e.prototype.shareTTAction=function(){var t=this;if(m.default.isPlatform(m.Platform.wx)){var e=l.default.GetVedioID(),o=l.default.getUserData().openid;m.default.share(o,e,function(){t.shareCbMethod()},function(){cc.game.emit(p.EMITKEY.SHOWMAINTIPS,"\u5206\u4eab\u5931\u8d25\uff0c\u8bf7\u5206\u4eab\u5fae\u4fe1\u7fa4\u4e0e\u597d\u53cbPK")})}else if(m.default.isPlatform(m.Platform.tt)){var n={popName:"shareNodePop",showPopData:{type:2,shareCb:this.shareCbMethod.bind(this)}};cc.game.emit("showPop",n)}},e.prototype.shareCbMethod=function(){console.log("\u5206\u4eab\u6210\u529f ######"),this.beginTouchCallbackFunc()},e.prototype.rankBtnFunc=function(){console.log("\u6392\u884c\u699c"),cc.game.emit("showPop",{popName:"sheepRankPop",showPopData:{popCallbackCollect:null}})},e.prototype.setMainLayerData=function(){this.timeNode.active=!1;var t=v.default.todayIsWin();-1==t?this.levelNumLabel.string="\u52a0\u5165\u7f8a\u7fa4":0==t?this.levelNumLabel.string="\u518d\u6b21\u6311\u6218":1==t&&(this.levelNumLabel.string="\u5df2\u52a0\u5165\u7f8a\u7fa4",this.timeNode.active=!0)},e.prototype.setupTouchEnd=function(){console.log("\u6253\u5f00\u8bbe\u7f6e\u5f39\u7a97"),cc.game.emit("showPop",{popName:"setupPop",showPopData:{popCallbackCollect:null,setupType:1}})},e.prototype.beginTouchEnd=function(t){return r(this,void 0,Promise,function(){var e,o;return c(this,function(n){switch(n.label){case 0:return m.default.isPlatform(m.Platform.tt)?0!=l.default.isLogin()?[3,5]:[4,g.default.ttLogin()]:[3,6];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,g.default.getUserInfo()];case 3:return n.sent(),[3,5];case 4:return e=n.sent(),cc.warn("\u83b7\u53d6\u7528\u6237\u4fe1\u606f\u5931\u8d25\uff0c\u53ef\u80fd\u7528\u6237\u62d2\u7edd\u6388\u6743",e),[3,5];case 5:return[3,17];case 6:return m.default.isPlatform(m.Platform.wx)?0!=l.default.isLogin()?[3,11]:[4,g.default.wxLogin()]:[3,12];case 7:n.sent(),n.label=8;case 8:return n.trys.push([8,10,,11]),[4,g.default.getWxUserInfo()];case 9:return n.sent(),[3,11];case 10:return o=n.sent(),cc.warn("\u83b7\u53d6\u7528\u6237\u4fe1\u606f\u5931\u8d25\uff0c\u53ef\u80fd\u7528\u6237\u62d2\u7edd\u6388\u6743",o),[3,11];case 11:return[3,17];case 12:return m.default.isPlatform(m.Platform.oppo)?0!=l.default.isLogin()?[3,14]:[4,g.default.oppoLogin()]:[3,15];case 13:n.sent(),n.label=14;case 14:return[3,17];case 15:return m.default.isPlatform(m.Platform.vivo)?0!=l.default.isLogin()?[3,17]:[4,g.default.vivoLogin()]:[3,17];case 16:n.sent(),n.label=17;case 17:return console.log("\u767b\u5f55\u6210\u529f\uff0c\u6216\u8005\u5df2\u767b\u5f55 ###### "),1!=t?[3,18]:(this.beginGameStatus(),[3,20]);case 18:return 2!=t?[3,20]:[4,g.default.getTopicData(function(){})];case 19:n.sent(),d.default.reportTACommon("game_start",{type:"\u8bdd\u9898\u6311\u6218"}),v.default.topicModel&&v.default.topicModel.info&&0!=v.default.topicModel.info.type?this.enterTopicGame():(this.showChoosePop(0),console.log("\u52a0\u5165\u8bdd\u9898")),n.label=20;case 20:return[2]}})})},e.prototype.showChoosePop=function(t){var e={popName:"topicChoosePop",showPopData:{type:t,chooseCallback:this.chooseCallbackFunc.bind(this)}};cc.game.emit("showPop",e)},e.prototype.chooseCallbackFunc=function(){var t=this;this.enterTopicGame(),setTimeout(function(){t.showTeamPop()},1500)},e.prototype.enterTopicGame=function(){d.default.reportTACommon("topic_join_ad",{}),cc.game.emit(p.EMITKEY.SHOWTRANSITLAYER,function(){cc.game.emit(p.EMITKEY.SHOWMODULE,p.MODULETYPE.TOPIC)})},e.prototype.showTeamPop=function(){cc.game.emit("showPop",{popName:"topicJoinedPop",showPopData:{}})},e.prototype.beginGameStatus=function(){var t=v.default.todayIsWin();if(h.default.getInstance().todayState=t,console.log("state = ",t),d.default.reportTACommon("game_start",{type:"\u6bcf\u65e5\u6311\u6218"}),h.default.getInstance().unLimitVideo=!0,-1==t)this.gotoGame();else if(0==t)this.videoGotoGame();else if(1==t)return void cc.game.emit(p.EMITKEY.SHOWMAINTIPS,"\u6bcf\u65e5\u4e00\u5173,\u4eca\u5929\u5df2\u6311\u6218\u6210\u529f")},e.prototype.gotoGame=function(){var t={popName:"nothingPop",showPopData:{beginTouchCallback:this.beginTouchCallbackFunc.bind(this),popType:0}};cc.game.emit("showPop",t)},e.prototype.videoGotoGame=function(){var t=f.default.format(p.CALENDARNAMES[5],new Date),e=f.default.format(p.CALENDARNAMES[6],new Date),o=l.default.getDailyData(t,e),n=0;if(o&&o.unLimitVideo&&(n=o.unLimitVideo),n>=3||h.default.getInstance().unLimitVideo)h.default.getInstance().unLimitVideo=!0,this.beginTouchCallbackFunc(),console.log("\u514d\u5e7f\u544a ###### = "+n);else{h.default.getInstance().unLimitVideo=!1;var a={popName:"noLimitPop",showPopData:{playVideoFunc:this.playVideoFunc.bind(this),noPlayVideoFunc:this.noPlayVideoFunc.bind(this),videoCount:n}};cc.game.emit(p.EMITKEY.SHOWPOP,a),console.log("\u4e0d\u514d\u5e7f\u544a ###### = "+n)}},e.prototype.playVideoFunc=function(){console.log("\u89c2\u770b\u5e7f\u544a");var t=this,e=l.default.GetVedioID();m.default.watchAdVideo({id:e,success:function(){console.log("\u6210\u529f sdk");var e=f.default.format(p.CALENDARNAMES[5],new Date),o=f.default.format(p.CALENDARNAMES[6],new Date),n=l.default.getDailyData(e,o),a=1;n?(a=Number(n.unLimitVideo)+1,n.unLimitVideo=a,a>=3&&d.default.reportTACommon("unlimited_challenges_ad",{})):n={dailyID:o,isWin:!1,unLimitVideo:a,sheepNum:-1},l.default.saveDailyData(e,o,n),a>=3?(h.default.getInstance().unLimitVideo=!0,t.beginTouchCallbackFunc(),cc.game.emit(p.EMITKEY.CLOSEALLPOP)):t.videoGotoGame()},fail:function(){console.log("\u5931\u8d25")},nofit:function(){t.shareTTAction()}})},e.prototype.noPlayVideoFunc=function(){var t={popName:"getPropPop",showPopData:{popCallbackCollect:this.popCallbackCollect,popType:6}};cc.game.emit(p.EMITKEY.SHOWPOP,t)},e.prototype.beginTouchCallbackFunc=function(){this.beginButtonDuration>=1?(this.beginButtonDuration=0,h.default.setGameType(p.GAMETYPE.GAMEDAILY),b.default.playBGM(),cc.game.emit(p.EMITKEY.BEGINGAME)):console.log("\u4e0d\u80fd\u8fde\u7eed\u70b9\u51fb")},i([C({type:cc.Node,tooltip:"\u5f00\u59cb\u6e38\u620f"})],e.prototype,"beginBtn",void 0),i([C(cc.Node)],e.prototype,"setupBtn",void 0),i([C({type:cc.Node,tooltip:"wx\u6392\u884c\u699c"})],e.prototype,"rankBtn",void 0),i([C({type:cc.Node,tooltip:"\u4e2a\u4eba\u8d44\u6599"})],e.prototype,"meBtn",void 0),i([C({type:cc.Node,tooltip:"\u5173\u6ce8\u6296\u97f3\u53f7"})],e.prototype,"focusBtn",void 0),i([C({type:cc.Node,tooltip:"\u6258\u513f\u6240"})],e.prototype,"childBtn",void 0),i([C({type:cc.Node,tooltip:"\u6dfb\u52a0\u5230\u684c\u9762"})],e.prototype,"deskBtn",void 0),i([C(cc.Node)],e.prototype,"timeNode",void 0),i([C(cc.Label)],e.prototype,"timeLabel",void 0),i([C(cc.Node)],e.prototype,"bottomRankNode",void 0),i([C(cc.Label)],e.prototype,"levelNumLabel",void 0),i([C({type:cc.Node,tooltip:"\u5f39\u5e55\u9875\u9762"})],e.prototype,"bulletNode",void 0),i([C({type:cc.Node,tooltip:"\u5f39\u5e55"})],e.prototype,"bulletBtn",void 0),i([C({type:cc.Node,tooltip:"\u6362\u88c5"})],e.prototype,"collectBtn",void 0),i([C({type:cc.Node,tooltip:"\u4eca\u65e5\u8bdd\u9898\u9875\u9762"})],e.prototype,"topicBtn",void 0),i([C({type:cc.Node,tooltip:"\u597d\u53cb\u6392\u884c\u699c"})],e.prototype,"friendBtn",void 0),i([C({type:cc.Node,tooltip:"tt\u6392\u884c\u699c"})],e.prototype,"ttRankBtn",void 0),i([N],e)}(cc.Component);o.default=w,cc._RF.pop()},{"../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/native/tt-sdk":"tt-sdk","../common/sdk":"sdk","../common/util":"util","../manager/DateManager":"DateManager","../manager/GameManager":"GameManager","../manager/data-manager":"data-manager","../manager/report-common":"report-common"}],mapArea:[function(t,e,o){"use strict";cc._RF.push(e,"67f71SJOXZGlKQEcc+5J3rk","mapArea");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.blackLine=null,e.widthNum=0,e.heightNum=0,e.minBlockNum=0,e}return a(e,t),e.prototype.start=function(){},e.prototype.refreshMap=function(t,e,o){this.widthNum=t,this.heightNum=e,this.minBlockNum=o,this.node.removeAllChildren();var n=this.widthNum*this.minBlockNum,a=this.heightNum*this.minBlockNum,i=this.node.width/n;this.node.height=i*a;for(var r=0;r<=n;r++){var c=r*i,s=0,l=0;l=r%(this.minBlockNum/2)==0?1:0,r%this.minBlockNum==0&&(l=2),this.addBlackLine(c,s,l,!0)}for(var u=0;u<=a;u++)c=0,s=-u*i,l=0,l=u%(this.minBlockNum/2)==0?1:0,u%this.minBlockNum==0&&(l=2),this.addBlackLine(c,s,l,!1)},e.prototype.addBlackLine=function(t,e,o,n){var a=cc.instantiate(this.blackLine);2==o?(a.height=6,a.opacity=50):1==o?(a.height=4,a.opacity=40):(a.height=2,a.opacity=20),n?(a.angle=-90,a.width=this.node.height):(a.angle=0,a.width=this.node.width),a.x=t,a.y=e,this.node.addChild(a)},i([s(cc.Prefab)],e.prototype,"blackLine",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],mapEditor:[function(t,e,o){"use strict";cc._RF.push(e,"d6b62YDoXJBjYP9NnAI8e6T","mapEditor");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../pre/mapEditor/blockEditorPrefab"),c=t("../common/config"),s=t("../common/key-map"),l=t("./mapArea"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mapArea=null,e.blockArea=null,e.blockEditorNode=null,e.blockEditorPrefab=null,e.widthNum=0,e.heightNum=0,e.moveBlockType=0,e.moldType=1,e.levelID=0,e.blockNodeObj={},e.isDeleteBlock=!1,e.minBlockNum=8,e.blockMaxWidth=120,e.blockMaxHeight=135,e.moveMinBlockNum=1,e.newLevelDataObj=null,e}return a(e,t),e.prototype.start=function(){window.xuxu=this,cc.game.on("refreshMapSizeData",this.refreshMapSizeData,this),cc.game.on("setBlockTypeData",this.setBlockTypeData,this),cc.game.on("initLevelData",this.initLevelData,this),this.node.on(cc.Node.EventType.MOUSE_DOWN,this.mouseDown,this),this.node.on(cc.Node.EventType.MOUSE_ENTER,this.mouseEnter,this),this.node.on(cc.Node.EventType.MOUSE_MOVE,this.mouseMove,this),this.node.on(cc.Node.EventType.MOUSE_LEAVE,this.mouseLeave,this),s.default.onKeyDownWithMeta("a",this.changeMouseStatus.bind(this)),s.default.onKeyDownWithMeta("1",this.changeBlockVoid.bind(this)),s.default.onKeyDownWithMeta("2",this.changeBlockType.bind(this)),s.default.onKeyDownWithMeta("3",this.changeRandomBlockType.bind(this)),s.default.onKeyDownWithMeta("4",this.changeMoveMinBlockNum.bind(this)),s.default.onKeyDownWithMeta("z",this.changeMouseStatus.bind(this)),s.default.onKeyDownWithMeta("x",this.changeBlockVoid.bind(this)),s.default.onKeyDownWithMeta("c",this.changeRandomBlockType.bind(this)),s.default.onKeyDownWithMeta("v",this.changeMoveMinBlockNum.bind(this))},e.prototype.initLevelData=function(t){console.log("\u65b0\u5730\u56fe\u6570\u636e\uff1a",t),this.newLevelDataObj=t.newLevelData,this.levelID=this.newLevelDataObj.levelKey,this.setLevelMapData()},e.prototype.setBlockTypeData=function(t){if(!this.newLevelDataObj)return!1;this.newLevelDataObj.blockTypeData=t,console.log("\u8bbe\u7f6e\u5173\u5361\u56fe\u5757\u6570\u636e\uff1a",t)},e.prototype.refreshMapSizeData=function(t){if(!this.newLevelDataObj)return!1;this.newLevelDataObj.widthNum=t.width,this.newLevelDataObj.heightNum=t.height,this.setLevelMapData()},e.prototype.setLevelMapData=function(){this.initLevelAllBlock(),this.mapArea.getComponent(l.default).refreshMap(this.newLevelDataObj.widthNum,this.newLevelDataObj.heightNum,this.minBlockNum)},e.prototype.mouseDown=function(t){if(!this.newLevelDataObj||this.isDeleteBlock)return!1;var e=t.getLocation(),o=this.node.convertToNodeSpaceAR(e),n=this.getMouseBlockPoint(o),a=this.getMouseBlockArea(n);this.clickAddMapBlockNode(a),console.log("lineObj:",a.rolNum,a.rowNum)},e.prototype.mouseEnter=function(t){if(!this.newLevelDataObj||this.isDeleteBlock)return!1;this.blockEditorNode.active=!0;var e=t.getLocation(),o=this.node.convertToNodeSpaceAR(e);this.blockEditorNode.x=o.x,this.blockEditorNode.y=o.y;var n=this.node.width/this.newLevelDataObj.widthNum;this.blockEditorNode.scale=n/this.blockMaxWidth,this.blockEditorNode.getComponent(r.default).setBlockImgType(this.moveBlockType,this.moldType)},e.prototype.mouseMove=function(t){if(!this.newLevelDataObj||this.isDeleteBlock)return!1;var e=t.getLocation(),o=this.node.convertToNodeSpaceAR(e),n=this.getMouseBlockPoint(o);this.blockEditorNode.x=n.x,this.blockEditorNode.y=n.y},e.prototype.mouseLeave=function(){if(!this.newLevelDataObj||this.isDeleteBlock)return!1;this.blockEditorNode.active=!1},e.prototype.getMouseBlockArea=function(t){var e=this.newLevelDataObj.widthNum*this.minBlockNum,o=(this.heightNum,this.minBlockNum,this.node.width/e);return{rolNum:Math.floor(t.x/o),rowNum:Math.floor(Math.abs(t.y)/o)}},e.prototype.getMouseBlockPoint=function(t){var e=this.newLevelDataObj.widthNum*this.minBlockNum,o=(this.heightNum,this.minBlockNum,this.node.width/e*this.moveMinBlockNum),n=Math.floor(t.x/o)*o,a=-Math.floor(Math.abs(t.y)/o)*o;return cc.v2(n,a)},e.prototype.clickAddMapBlockNode=function(t){var e=this.getBlockLayerIndex(t),o={id:e+"-"+t.rolNum+"-"+t.rowNum,type:this.moveBlockType,rolNum:t.rolNum,rowNum:t.rowNum,layerNum:e,moldType:this.moldType,blockNode:null};this.newLevelDataObj.levelData[e]?this.newLevelDataObj.levelData[e].push(o):(this.newLevelDataObj.levelData[e]=[],this.newLevelDataObj.levelData[e].push(o)),console.log("\u6dfb\u52a0\u5b8c\u6570\u636e\uff1a",this.newLevelDataObj.levelData),this.addBlockEditorNode(t.rolNum,t.rowNum,e,this.moveBlockType,this.moldType)},e.prototype.initLevelAllBlock=function(){this.blockNodeObj={},this.blockArea.removeAllChildren();var t=this.newLevelDataObj.levelData;for(var e in t)for(var o in t[e])this.addBlockEditorNode(t[e][o].rolNum,t[e][o].rowNum,t[e][o].layerNum,t[e][o].type,t[e][o].moldType)},e.prototype.addBlockEditorNode=function(t,e,o,n,a){var i=cc.instantiate(this.blockEditorPrefab),c=this.newLevelDataObj.widthNum*this.minBlockNum,s=this.node.width/c,l=t*s,u=-e*s,p=this.node.width/this.newLevelDataObj.widthNum;i.scale=p/this.blockMaxWidth,i.x=l,i.y=u,i.getComponent(r.default).setBlockImgType(n,this.moldType),i.getComponent(r.default).setBlockLayerNum(t,e,o,a,this.deleteBlock.bind(this));var d=t+"-"+e+"-"+o;this.blockNodeObj[d]=i,this.blockArea.addChild(i),cc.game.emit("setBlockNum")},e.prototype.deleteBlock=function(t,e,o){if(this.isDeleteBlock){var n=t+"-"+e+"-"+o;this.blockNodeObj[n]&&(this.blockNodeObj[n].destroy(),delete this.blockNodeObj[n]);var a=this.newLevelDataObj.levelData;if(a[o])for(var i=0;ir&&u.rolNums&&u.rowNumo&&(o=u.layerNum+1)}return o},e.prototype.changeMoveMinBlockNum=function(){1==this.moveMinBlockNum?this.moveMinBlockNum=4:this.moveMinBlockNum=1},e.prototype.changeRandomBlockType=function(){this.moldType=2,this.moveBlockType=0,this.blockEditorNode.getComponent(r.default).setBlockImgType(this.moveBlockType,this.moldType)},e.prototype.changeBlockVoid=function(){this.moldType=1,this.moveBlockType=0,this.blockEditorNode.getComponent(r.default).setBlockImgType(this.moveBlockType,this.moldType)},e.prototype.changeBlockType=function(){this.moveBlockType++,this.moldType=1,this.moveBlockType>c.default.blockTypeConfig[c.default.blockTypeConfig.length-1]&&(this.moveBlockType=0),this.blockEditorNode.getComponent(r.default).setBlockImgType(this.moveBlockType,this.moldType)},e.prototype.changeMouseStatus=function(){if(console.log("command+a"),this.isDeleteBlock){console.log("this.isDeleteBlock",this.isDeleteBlock),this.isDeleteBlock=!1,this.blockEditorNode.active=!0;var t=this.node.width/this.newLevelDataObj.widthNum;this.blockEditorNode.scale=t/this.blockMaxWidth}else console.log("this.isDeleteBlock",this.isDeleteBlock),this.isDeleteBlock=!0,this.blockEditorNode.active=!1},i([d(cc.Node)],e.prototype,"mapArea",void 0),i([d(cc.Node)],e.prototype,"blockArea",void 0),i([d(cc.Node)],e.prototype,"blockEditorNode",void 0),i([d(cc.Prefab)],e.prototype,"blockEditorPrefab",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../../pre/mapEditor/blockEditorPrefab":"blockEditorPrefab","../common/config":"config","../common/key-map":"key-map","./mapArea":"mapArea"}],maskLayer:[function(t,e,o){"use strict";cc._RF.push(e,"5fe07xHyi5IB5UwR8crAg1t","maskLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("./enumConfig"),c=cc._decorator,s=c.ccclass,l=(c.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.start=function(){this.node.active=!1,cc.game.on(r.EMITKEY.SHOWMASKLAYER,this.showMaskLayer,this),cc.game.on(r.EMITKEY.HIDEMASKLAYER,this.hideMaskLayer,this),this.node.on(cc.Node.EventType.TOUCH_START,this.starFunc,this),this.node.on(cc.Node.EventType.TOUCH_END,this.endFunc,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this.moveFunc,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this.cancelFunc,this)},e.prototype.showMaskLayer=function(){this.node.active=!0},e.prototype.hideMaskLayer=function(){this.node.active=!1},e.prototype.starFunc=function(t){t.stopPropagation()},e.prototype.endFunc=function(t){t.stopPropagation()},e.prototype.moveFunc=function(t){t.stopPropagation()},e.prototype.cancelFunc=function(t){t.stopPropagation()},i([s],e)}(cc.Component));o.default=l,cc._RF.pop()},{"./enumConfig":"enumConfig"}],mask:[function(t,e,o){"use strict";cc._RF.push(e,"29fbe5db7JFWJL2hqkjASq4","mask");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=(r.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.start=function(){this.node.on(cc.Node.EventType.TOUCH_START,this.starFunc,this),this.node.on(cc.Node.EventType.TOUCH_END,this.endFunc,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this.moveFunc,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this.cancelFunc,this)},e.prototype.starFunc=function(t){t.stopPropagation()},e.prototype.endFunc=function(t){t.stopPropagation()},e.prototype.moveFunc=function(t){t.stopPropagation()},e.prototype.cancelFunc=function(t){t.stopPropagation()},i([c],e)}(cc.Component));o.default=s,cc._RF.pop()},{}],"mesh-vertex":[function(t,e,o){"use strict";cc._RF.push(e,"a29abOYIg9Li5/yGTvFnVbF","mesh-vertex"),Object.defineProperty(o,"__esModule",{value:!0}),o.MeshVertex=void 0;o.MeshVertex=function(t,e,o){this.position=t,this.normal=e,this.uv=o},cc._RF.pop()},{}],moveOutArea:[function(t,e,o){"use strict";cc._RF.push(e,"f88d3tXmpFFjbC+QpZh+Ueh","moveOutArea");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/enumConfig"),c=t("./crushArea"),s=cc._decorator,l=s.ccclass,u=s.property,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.crushAreaNode=null,e.crushAreaArgs=null,e.blockMaxWidth=120,e.parentComp=null,e.newScale=.8,e.newAddY=8,e.moveOutObj={1:[],2:[],3:[]},e}return a(e,t),e.prototype.start=function(){},e.prototype.initMoveOutArea=function(t){this.node.removeAllChildren(),this.parentComp=t,this.moveOutObj={1:[],2:[],3:[]}},e.prototype.addThreeOutBlock=function(t){for(var e=0;e0)return!1;return!0},e.prototype.updateBlockPosStatus=function(){for(var t in this.moveOutObj)for(var e=Number(t)*this.blockMaxWidth*this.newScale-this.blockMaxWidth*this.newScale/2,o=function(o){var a=n.moveOutObj[t][o],i=o*n.newAddY;o=7)){this.crushAreaNode.setSiblingIndex(10),this.crushAreaArgs.setSiblingIndex(10);var e=1;for(var o in this.moveOutObj)for(var n=0;n=0?console.log("\u7ebf\u4e0a\u73af\u5883\u505c\u6b62\u6d4b\u8bd5 ###### "):t.post({url:"/admin/game_map/upsert",data:{map_id:e,map_data:o},success:function(t){0==t.err_code?console.log("\u4fdd\u5b58\u5730\u56fe\uff1a",e,t):console.log("\u4fdd\u5b58\u5730\u56fe\u5931\u8d25:",e,t)}})},t.get=function(t){return a.default.get(n({host:this.host,baseParams:{}},t))},t.post=function(t){return a.default.post(n({host:this.host,baseParams:{}},t))},t.GETURL=function(t){return a.default.get(n({baseParams:{}},t))},t.POSTURL=function(t){return a.default.post(n({baseParams:{}},t))},t.GET=function(t,e,o){void 0===e&&(e={});var n="";Object.keys(e).forEach(function(t){n+=t+"="+encodeURIComponent(e[t])+"&"}),""!==n&&(t=t+"?"+(n=n.substr(0,n.lastIndexOf("&"))));var a=cc.loader.getXMLHttpRequest();a.open("GET",t,!0),a.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),a.onreadystatechange=function(){if(4===a.readyState){var t=a.responseText;a.status>=200&&a.status<300?(a.statusText,o(!0,t)):o(!1,t)}},a.timeout=this.TimeOut,a.send()},t.POST=function(t,e,o){void 0===e&&(e={});var n=cc.loader.getXMLHttpRequest(),a="";Object.keys(e).forEach(function(t){a+=t+"="+encodeURIComponent(e[t])+"&"}),""!==a&&(a=a.substr(0,a.lastIndexOf("&"))),n.open("POST",t,!0),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.onreadystatechange=function(){if(4===n.readyState){var t=n.responseText;n.status>=200&&n.status<300?(n.statusText,o(!0,t)):o(!1,t)}},n.send(a)},t.host=c.host,t.TimeOut=200,t}();o.default=s,cc._RF.pop()},{"../common/http":"http","./data-env":"data-env","./data-type":"data-type"}],newLevelPop:[function(t,e,o){"use strict";cc._RF.push(e,"da3caVMFQ5HlYmVp5lat/E1","newLevelPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../common/config"),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inputLevelNum=null,e.closeNode=null,e}return a(e,t),e.prototype.start=function(){this.closeNode.on(cc.Node.EventType.TOUCH_END,this.closeFunc,this)},e.prototype.showNewLevelPop=function(){this.node.active=!0,this.inputLevelNum.string=""},e.prototype.newLevelFunc=function(){var t=Number(this.inputLevelNum.string);t>0?(this.node.active=!1,this.emitNewLevel(t),console.log("\u8bbe\u7f6e\u5173\u5361\u6570",this.inputLevelNum.string)):console.log("error:\u4e66\u5199\u9519\u8bef")},e.prototype.emitNewLevel=function(t){var e=cc.instantiate(l.default.baseMapObj);e.levelKey=t;var o={newLevelData:e};cc.game.emit("initLevelData",o)},e.prototype.closeFunc=function(){this.node.active=!1},i([s({type:cc.EditBox,tooltip:"\u8f93\u5165\u5bf9\u5e94\u5173\u5361\u6570"})],e.prototype,"inputLevelNum",void 0),i([s(cc.Node)],e.prototype,"closeNode",void 0),i([c],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../common/config":"config"}],nextLevelPop:[function(t,e,o){"use strict";cc._RF.push(e,"b49fdZpjJtCJY67qY7JG6Ry","nextLevelPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.fainNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showPop=function(){var t=this;this.maskNode.opacity=0,this.node.active=!0,cc.tween(this.maskNode).to(0,{opacity:0}).to(.2,{opacity:178}).start();var e=cc.winSize.width;this.fainNode.x=e,this.fainNode.y=100,cc.tween(this.fainNode).to(1,{x:0,y:100},{easing:cc.easing.cubicOut}).delay(1).call(function(){cc.tween(t.maskNode).to(.8,{opacity:0}).start()}).to(1,{x:-e,y:100},{easing:cc.easing.quadOut}).call(function(){t.node.active=!1}).start()},i([s(cc.Node)],e.prototype,"maskNode",void 0),i([s(cc.Node)],e.prototype,"fainNode",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],noLimitPop:[function(t,e,o){"use strict";cc._RF.push(e,"86b2eck/b9Nv5kDApWcxh9L","noLimitPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/enumConfig"),s=cc._decorator,l=s.ccclass,u=s.property,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.popNode=null,e.closeBtn=null,e.videoBtn=null,e.noVideoBtn=null,e.limitVideoLabel=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){cc.game.on(c.EMITKEY.UPDATEPOPDATA,this.updatePopDataFunc,this),r.default.addbtnTouchEndScale(this.mask,this.closeBtnFunc.bind(this)),r.default.addbtnTouchStartScale(this.closeBtn),r.default.addbtnTouchEndScale(this.closeBtn,this.closeBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.closeBtn),r.default.addbtnTouchStartScale(this.videoBtn),r.default.addbtnTouchEndScale(this.videoBtn,this.videoBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.videoBtn),r.default.addbtnTouchStartScale(this.noVideoBtn),r.default.addbtnTouchEndScale(this.noVideoBtn,this.noVideoBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.noVideoBtn)},e.prototype.updatePopDataFunc=function(){},e.prototype.closeBtnFunc=function(){this.node.active=!1,this.showPopData&&this.showPopData.noPlayVideoFunc&&this.showPopData.noPlayVideoFunc()},e.prototype.noVideoBtnFunc=function(){this.node.active=!1,this.showPopData&&this.showPopData.noPlayVideoFunc&&this.showPopData.noPlayVideoFunc()},e.prototype.videoBtnFunc=function(){this.node.active=!1,this.showPopData&&this.showPopData.playVideoFunc&&this.showPopData.playVideoFunc()},e.prototype.showNoLimitPop=function(t){this.node.active=!0,this.showPopData=t,this.limitVideoLabel.string=t.videoCount+"/3",cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start()},i([u(cc.Node)],e.prototype,"mask",void 0),i([u(cc.Node)],e.prototype,"popNode",void 0),i([u(cc.Node)],e.prototype,"closeBtn",void 0),i([u(cc.Node)],e.prototype,"videoBtn",void 0),i([u(cc.Node)],e.prototype,"noVideoBtn",void 0),i([u(cc.Label)],e.prototype,"limitVideoLabel",void 0),i([l],e)}(cc.Component);o.default=p,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/enumConfig":"enumConfig"}],nothingPop:[function(t,e,o){"use strict";cc._RF.push(e,"f9f03C5IqJPgrwEd50J+8g+","nothingPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/enumConfig"),s=t("../manager/DateManager"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.popNode=null,e.closeBtn=null,e.goBtn=null,e.titleLabel=null,e.descLabel=null,e.goLabel=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.mask,this.closeBtnFunc.bind(this)),r.default.addbtnTouchStartScale(this.closeBtn),r.default.addbtnTouchEndScale(this.closeBtn,this.closeBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.closeBtn),r.default.addbtnTouchStartScale(this.goBtn),r.default.addbtnTouchEndScale(this.goBtn,this.goBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.goBtn)},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.goBtnFunc=function(){this.showPopData&&this.showPopData.beginTouchCallback&&this.showPopData.beginTouchCallback(),this.closeBtnFunc()},e.prototype.showNothingPop=function(t){this.node.active=!0,this.showPopData=t,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start();var e=s.default.format(c.CALENDARNAMES[4],new Date);if(e){var o=e.split("-");o.length>=3&&(this.titleLabel.string=o[1]+"\u6708"+o[2]+"\u65e5")}},i([p(cc.Node)],e.prototype,"mask",void 0),i([p(cc.Node)],e.prototype,"popNode",void 0),i([p(cc.Node)],e.prototype,"closeBtn",void 0),i([p(cc.Node)],e.prototype,"goBtn",void 0),i([p(cc.Label)],e.prototype,"titleLabel",void 0),i([p(cc.Label)],e.prototype,"descLabel",void 0),i([p(cc.Label)],e.prototype,"goLabel",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/enumConfig":"enumConfig","../manager/DateManager":"DateManager"}],"page-house":[function(t,e,o){"use strict";cc._RF.push(e,"c7dfaR+FBhOv4WArlgOZb10","page-house");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../common/CcJsFunc"),c=t("../../common/dataTs"),s=t("../../common/enumConfig"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.showMain=null,e}return a(e,t),e.prototype.start=function(){cc.game.on(s.EMITKEY.MAINUPDATEUI,this.updateSubUI,this),r.default.addbtnTouchStartScale(this.showMain),r.default.addbtnTouchEndScale(this.showMain,this.showMainFunc.bind(this)),r.default.addbtnTouchCancelScale(this.showMain),this.updateSubUI()},e.prototype.updateSubUI=function(){console.log("page-house MAINUPDATEUI"),1==c.default.currentHouseUnlockAll()?this.showMain.getChildByName("mark").active=!0:this.showMain.getChildByName("mark").active=!1},e.prototype.showMainFunc=function(){cc.game.emit(s.EMITKEY.UPDATETABBARRECEIVE,1)},i([p(cc.Node)],e.prototype,"showMain",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../../common/CcJsFunc":"CcJsFunc","../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig"}],"page-main":[function(t,e,o){"use strict";cc._RF.push(e,"df8f95zulFCI6iyRCXBRejZ","page-main");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../../i18n/gd_language"),c=t("../../../i18n/i18n"),s=t("../../common/CcJsFunc"),l=t("../../common/dataTs"),u=t("../../common/enumConfig"),p=t("../../common/sdk"),d=t("../../common/spine"),h=t("../../common/util"),f=t("../../manager/GameManager"),m=cc._decorator,g=m.ccclass,y=m.property,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainLayer=null,e.nextBtn=null,e.sprintReward=null,e.sprintWinLabel=null,e.sprintWinLabelShadow=null,e.sprintTimeLabel=null,e.cookieReward=null,e.updateTime=0,e.popCallbackCollect=null,e}return a(e,t),e.prototype.update=function(t){this.updateTime+=t,this.updateTime>=1&&(this.updateTime-=1,this.updateTimeNum())},e.prototype.updateTimeNum=function(){if(!(l.default.getUserData().playLevelId<3)){var t=l.default.updateSprintRewardTime();if(0==t)console.log("\u5df2\u6ee1"),this.sprintTimeLabel.string="End";else{var e=h.default.formatTime(t);e[0]>0?this.sprintTimeLabel.string=e[0]+"d "+e[1]+"h":e[1]>0?this.sprintTimeLabel.string=e[1]+"h "+e[2]+"m":e[2]>0?this.sprintTimeLabel.string=e[2]+"m "+e[3]+"s":e[3]>0&&(this.sprintTimeLabel.string=e[2]+"m "+e[3]+"s")}}},e.prototype.start=function(){cc.game.on(u.EMITKEY.MAINUPDATEUI,this.updateUiDataFunc,this),f.default.getInstance().gameEnv==u.GAMEENV.ENVRELEASE?(this.nextBtn.active=!1,cc.sys.isBrowser&&(this.nextBtn.active=!0),p.default.isPlatform(p.Platform.ios)&&(this.nextBtn.active=!0)):this.nextBtn.active=!0,s.default.addbtnTouchStartScale(this.nextBtn),s.default.addbtnTouchEndScale(this.nextBtn,this.nextBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.nextBtn),s.default.addbtnTouchStartScale(this.sprintReward),s.default.addbtnTouchEndScale(this.sprintReward,this.sprintRewardFunc.bind(this)),s.default.addbtnTouchCancelScale(this.sprintReward);var t=this.cookieReward.getChildByName("click-btn");s.default.addbtnTouchEndScale(t,this.cookieRewardFunc.bind(this)),this.updateTimeNum(),this.updateUiDataFunc(),this.popCallbackCollect={playGameCallBack:this.playGameCallBackFunc.bind(this)}},e.prototype.playGameCallBackFunc=function(){},e.prototype.cookieRewardFunc=function(){var t={popName:"nothingPop",showPopData:{popCallbackCollect:this.popCallbackCollect,popType:4}};cc.game.emit("showPop",t)},e.prototype.updateUiDataFunc=function(){console.log("page-main MAINUPDATEUI");var t=l.default.getSprintRewardData();this.sprintWinLabel.string=t.winNum+"",this.sprintWinLabelShadow.string=t.winNum+"",this.sprintReward.getChildByName("mark").active=f.default.getInstance().sprintMark,this.sprintReward.getComponent(d.default).play("4Icon_RichRoad1",0,function(){console.log("4Icon_RichRoad1 ######")}),l.default.getUserData().playLevelId=e){var o=l.default.getSprintRewardData();o.winNum+=1,o.rewardProgress<3?(o.rewardProgress+=1,3==o.rewardProgress&&(o.winBox+=1)):o.rewardProgress=1,l.default.setSprintRewardData(o)}if(l.default.getSprintRewardData().rewardProgress>=3){var n=l.default.getSprintRewardData().winBox,a=l.default.getUserData(),i=n>5?5:n,r=12;i>1&&(r+=11*(i-1)),a.coin+=r,a.prop_remove+=1,l.default.saveUserData(a)}cc.game.emit(u.EMITKEY.MAINUPDATEUI)},e.prototype.sprintRewardFunc=function(){console.log("\u51b2\u523a\u5956\u52b1");var t=l.default.gameConfigData.baseConfigData.sprintRewardLevel;l.default.getUserData().playLevelId>=t?cc.game.emit("showPop",{popName:"sprintRewardPop",showPopData:{popCallbackCollect:null,popType:0}}):cc.game.emit("showMainTips",c.default.instance.trans(r.GDLanguage.challenge_unlocked_level,3))},i([y(cc.Node)],e.prototype,"mainLayer",void 0),i([y(cc.Node)],e.prototype,"nextBtn",void 0),i([y(cc.Node)],e.prototype,"sprintReward",void 0),i([y(cc.Label)],e.prototype,"sprintWinLabel",void 0),i([y(cc.Label)],e.prototype,"sprintWinLabelShadow",void 0),i([y(cc.Label)],e.prototype,"sprintTimeLabel",void 0),i([y(cc.Node)],e.prototype,"cookieReward",void 0),i([g],e)}(cc.Component);o.default=v,cc._RF.pop()},{"../../../i18n/gd_language":"gd_language","../../../i18n/i18n":"i18n","../../common/CcJsFunc":"CcJsFunc","../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig","../../common/sdk":"sdk","../../common/spine":"spine","../../common/util":"util","../../manager/GameManager":"GameManager"}],picturePop:[function(t,e,o){"use strict";cc._RF.push(e,"e955bv+WvlGDIiibEKuUWDZ","picturePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../common/CcJsFunc"),s=t("../manager/GameManager"),l=t("../../i18n/i18n"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.wallpaperBtn=null,e.brickBtn=null,e.wallpaperSv=null,e.brickSv=null,e.topUIBtnArr=[],e.contentSvArr=[],e}return a(e,t),e.prototype.hideRankPop=function(){this.node.active=!1},e.prototype.onLoad=function(){},e.prototype.onEnable=function(){this.updateMarkClot()},e.prototype.updateMarkClot=function(){var t=s.default.getInstance().collectionMark;this.wallpaperBtn.getChildByName("mark").active=t.bgNum>0,this.brickBtn.getChildByName("mark").active=t.brickNum>0},e.prototype.start=function(){c.default.addbtnTouchStartScale(this.wallpaperBtn),c.default.addbtnTouchEndScale(this.wallpaperBtn,this.topUIButtonAction.bind(this,"wallpaper",0)),c.default.addbtnTouchCancelScale(this.wallpaperBtn),c.default.addbtnTouchStartScale(this.brickBtn),c.default.addbtnTouchEndScale(this.brickBtn,this.topUIButtonAction.bind(this,"brick",1)),c.default.addbtnTouchCancelScale(this.brickBtn),this.setupSubNode(),this.wallpaperBtn.getChildByName("label").getComponent(cc.Label).string=l.default.instance.trans(r.GDLanguage.wallpaper),this.brickBtn.getChildByName("label").getComponent(cc.Label).string=l.default.instance.trans(r.GDLanguage.block_bricks)},e.prototype.setupSubNode=function(){for(var t=0;t=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/enumConfig"),c=t("../pop/bullet-screen-pop"),s=t("../pop/challengeSucPop"),l=t("../pop/failPop"),u=t("../pop/FriendRankPop"),p=t("../pop/getPropPop"),d=t("../pop/loseLovePop"),h=t("../pop/nextLevelPop"),f=t("../pop/noLimitPop"),m=t("../pop/nothingPop"),g=t("../pop/PersonalPop"),y=t("../pop/setupPop"),v=t("../pop/shareNodePop"),b=t("../pop/sheep-rank-pop"),_=t("../pop/show-daily-pop"),N=t("../pop/stagePop"),C=t("../pop/TodayRankPop"),w=t("../pop/topicChoosePop"),P=t("../pop/topicCollectPop"),k=t("../pop/topicJoinedPop"),S=t("../pop/topicLastWinPop"),D=t("../pop/topicNewPop"),A=t("../pop/winPop"),T=cc._decorator,O=T.ccclass,I=T.property,E=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.showDailyPrefab=null,e.showDailyPop=null,e.setupPopPrefab=null,e.setupPop=null,e.getPropPopPrefab=null,e.getPropPop=null,e.nothingPopPrefab=null,e.nothingPop=null,e.failPopPrefab=null,e.failPop=null,e.loseLovePopPrefab=null,e.loseLovePop=null,e.winPopPrefab=null,e.winPop=null,e.noLimitPopPrefab=null,e.noLimitPop=null,e.sheepRankPopPrefab=null,e.sheepRankPop=null,e.stagePopPrefab=null,e.stagePop=null,e.bulletScreenPopPrefab=null,e.bulletScreenPop=null,e.nextLevelPopPrefab=null,e.nextLevelPop=null,e.shareNodePopPrefab=null,e.shareNodePop=null,e.topicChoosePopPrefab=null,e.topicChoosePop=null,e.topicCollectPopPrefab=null,e.topicCollectPop=null,e.topicLastWinPopPrefab=null,e.topicLastWinPop=null,e.topicNewPopPrefab=null,e.topicNewPop=null,e.todayRankPopPrefab=null,e.todayRankPop=null,e.firendRankPopPrefab=null,e.firendRankPop=null,e.personalPopPrefab=null,e.personalPop=null,e.topicJoinedPopPrefab=null,e.topicJoinedPop=null,e.challengeSucPopPrefab=null,e.challengeSucPop=null,e.showPopArray=[],e}return a(e,t),e.prototype.start=function(){cc.game.on(r.EMITKEY.SHOWPOP,this.showPop,this),cc.game.on(r.EMITKEY.CLOSEALLPOP,this.closeAllPop,this),this.initPop(),this.closeAllPop()},e.prototype.initPop=function(){this.todayRankPop=this.ifHaveNode(this.todayRankPop,this.todayRankPopPrefab)},e.prototype.showPop=function(t){var e=t.popName,o=t.showPopData;"winPop"==e?(this.winPop=this.ifHaveNode(this.winPop,this.winPopPrefab),this.winPop.getComponent(A.default).showWinPop(o)):"failPop"==e?(this.failPop=this.ifHaveNode(this.failPop,this.failPopPrefab),this.failPop.getComponent(l.default).showFailPop(o)):"loseLovePop"==e?(this.loseLovePop=this.ifHaveNode(this.loseLovePop,this.loseLovePopPrefab),this.loseLovePop.getComponent(d.default).showLoseLovePop(o)):"setupPop"==e?(this.setupPop=this.ifHaveNode(this.setupPop,this.setupPopPrefab),this.setupPop.getComponent(y.default).showSetupPop(o)):"getPropPop"==e?(this.getPropPop=this.ifHaveNode(this.getPropPop,this.getPropPopPrefab),this.getPropPop.getComponent(p.default).showGetPropPop(o)):"nothingPop"==e?(this.nothingPop=this.ifHaveNode(this.nothingPop,this.nothingPopPrefab),this.nothingPop.getComponent(m.default).showNothingPop(o)):"showDailyPop"==e?(this.showDailyPop=this.ifHaveNode(this.showDailyPop,this.showDailyPrefab),this.showDailyPop.getComponent(_.default).showPop(o)):"noLimitPop"==e?(this.noLimitPop=this.ifHaveNode(this.noLimitPop,this.noLimitPopPrefab),this.noLimitPop.getComponent(f.default).showNoLimitPop(o)):"sheepRankPop"==e?(this.sheepRankPop=this.ifHaveNode(this.sheepRankPop,this.sheepRankPopPrefab),this.sheepRankPop.getComponent(b.default).sheepRankPop(o)):"stagePop"==e?(this.stagePop=this.ifHaveNode(this.stagePop,this.stagePopPrefab),this.stagePop.getComponent(N.default).showPop(o)):"bulletScreenPop"==e?(this.bulletScreenPop=this.ifHaveNode(this.bulletScreenPop,this.bulletScreenPopPrefab),this.bulletScreenPop.getComponent(c.default).showPop(o)):"nextLevelPop"==e?(this.nextLevelPop=this.ifHaveNode(this.nextLevelPop,this.nextLevelPopPrefab),this.nextLevelPop.getComponent(h.default).showPop(o)):"shareNodePop"==e?(this.shareNodePop=this.ifHaveNode(this.shareNodePop,this.shareNodePopPrefab),this.shareNodePop.getComponent(v.default).showPop(o)):"topicChoosePop"==e?(this.topicChoosePop=this.ifHaveNode(this.topicChoosePop,this.topicChoosePopPrefab),this.topicChoosePop.getComponent(w.default).showPop(o)):"topicCollectPop"==e?(this.topicCollectPop=this.ifHaveNode(this.topicCollectPop,this.topicCollectPopPrefab),this.topicCollectPop.getComponent(P.default).showPop(o)):"topicLastWinPop"==e?(this.topicLastWinPop=this.ifHaveNode(this.topicLastWinPop,this.topicLastWinPopPrefab),this.topicLastWinPop.getComponent(S.default).showPop(o)):"topicNewPop"==e?(this.topicNewPop=this.ifHaveNode(this.topicNewPop,this.topicNewPopPrefab),this.topicNewPop.getComponent(D.default).showPop(o)):"friendRankPop"==e?(this.firendRankPop=this.ifHaveNode(this.firendRankPop,this.firendRankPopPrefab),this.firendRankPop.getComponent(u.default).showPop(o)):"todayRankPop"==e?(this.todayRankPop=this.ifHaveNode(this.todayRankPop,this.todayRankPopPrefab),this.todayRankPop.getComponent(C.default).showPop(o)):"personalPop"==e?(this.personalPop=this.ifHaveNode(this.personalPop,this.personalPopPrefab),this.personalPop.getComponent(g.default).showPop(o)):"topicJoinedPop"==e?(this.topicJoinedPop=this.ifHaveNode(this.topicJoinedPop,this.topicJoinedPopPrefab),this.topicJoinedPop.getComponent(k.default).showPop(o)):"challengeSucPop"==e&&(this.challengeSucPop=this.ifHaveNode(this.challengeSucPop,this.challengeSucPopPrefab),this.challengeSucPop.getComponent(s.default).showPop(o))},e.prototype.ifHaveNode=function(t,e){return t||(t=cc.instantiate(e),this.node.addChild(t)),t.setSiblingIndex(-1),t},e.prototype.closeAllPop=function(){var t=this.node.children;for(var e in t){var o=t[e];o.setSiblingIndex(0),o.active=!1}},i([I({type:cc.Prefab,tooltip:"\u6bcf\u65e5\u6311\u6218\u83b7\u53d6\u793c\u5305"})],e.prototype,"showDailyPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u8bbe\u7f6e\u9875\u9762"})],e.prototype,"setupPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u83b7\u53d6\u9053\u5177\u9875\u9762"})],e.prototype,"getPropPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u4e00\u4e9b\u901a\u7528\u9875\u9762"})],e.prototype,"nothingPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u5931\u8d25\u9875\u9762"})],e.prototype,"failPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u653e\u5f03\u6311\u6218\u754c\u9762"})],e.prototype,"loseLovePopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u80dc\u5229\u754c\u9762"})],e.prototype,"winPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u65e0\u9650\u751f\u547d\u9875\u9762"})],e.prototype,"noLimitPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u6392\u884c\u5f39\u6846\u9875\u9762"})],e.prototype,"sheepRankPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u821e\u53f0\u5f39\u6846\u9875\u9762"})],e.prototype,"stagePopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u5f39\u5e55\u5f39\u6846\u9875\u9762"})],e.prototype,"bulletScreenPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u4e0b\u4e00\u7b49\u7ea7\u63d0\u793a"})],e.prototype,"nextLevelPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u5206\u4eab\u5f39\u6846"})],e.prototype,"shareNodePopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u9009\u62e9\u7f8a\u961f"})],e.prototype,"topicChoosePopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u6536\u85cf\u9875\u9762"})],e.prototype,"topicCollectPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u6628\u65e5\u83b7\u80dc\u9875\u9762"})],e.prototype,"topicLastWinPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u6628\u65e5\u83b7\u80dc\u9875\u9762\u5956\u52b1\u5f39\u6846"})],e.prototype,"topicNewPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u4eca\u65e5\u670b\u53cb\u5708"})],e.prototype,"todayRankPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u597d\u53cb\u6392\u884c\u699c"})],e.prototype,"firendRankPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u4e2a\u4eba\u8d44\u6599"})],e.prototype,"personalPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u961f\u4f0d\u5206\u914d\u5f39\u7a97"})],e.prototype,"topicJoinedPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"wx\u83b7\u80dc\u5f39\u6846"})],e.prototype,"challengeSucPopPrefab",void 0),i([O],e)}(cc.Component);o.default=E,cc._RF.pop()},{"../common/enumConfig":"enumConfig","../pop/FriendRankPop":"FriendRankPop","../pop/PersonalPop":"PersonalPop","../pop/TodayRankPop":"TodayRankPop","../pop/bullet-screen-pop":"bullet-screen-pop","../pop/challengeSucPop":"challengeSucPop","../pop/failPop":"failPop","../pop/getPropPop":"getPropPop","../pop/loseLovePop":"loseLovePop","../pop/nextLevelPop":"nextLevelPop","../pop/noLimitPop":"noLimitPop","../pop/nothingPop":"nothingPop","../pop/setupPop":"setupPop","../pop/shareNodePop":"shareNodePop","../pop/sheep-rank-pop":"sheep-rank-pop","../pop/show-daily-pop":"show-daily-pop","../pop/stagePop":"stagePop","../pop/topicChoosePop":"topicChoosePop","../pop/topicCollectPop":"topicCollectPop","../pop/topicJoinedPop":"topicJoinedPop","../pop/topicLastWinPop":"topicLastWinPop","../pop/topicNewPop":"topicNewPop","../pop/winPop":"winPop"}],"prop-prefab":[function(t,e,o){"use strict";cc._RF.push(e,"78621mmfFZP3p0KRuVUnueB","prop-prefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=t("../../script/common/native/audio"),s=cc._decorator,l=s.ccclass,u=s.property,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.propImage=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showWithType=function(t,e,o){var n="",a=e.position;1==t?n="rewardIcon/prop_remove.png":2==t?n="rewardIcon/prop_cancel.png":3==t&&(n="rewardIcon/prop_random.png"),r.default.changeSpriteFrame(this.propImage,n);var i=this;cc.tween(this.node).to(.1,{scale:1.1}).to(.1,{scale:1}).to(.1,{scale:.9}).to(.1,{scale:.9}).to(.1,{angle:10}).to(.1,{angle:-10}).to(.1,{angle:10}).to(.1,{angle:-10}).to(.1,{angle:0}).to(.3,{position:a,scale:0}).call(function(){i.node.destroy(),cc.tween(e).to(.1,{scale:1.5}).to(.1,{scale:1}).start(),c.default.playAudioMusic("audio/sound/pop-fly-end.mp3",!1),o&&o()}).start()},i([u(cc.Node)],e.prototype,"propImage",void 0),i([l],e)}(cc.Component);o.default=p,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/common/native/audio":"audio"}],"register-head-image":[function(t,e,o){"use strict";function n(t,e,o){var n=new Image;function a(){n.removeEventListener("load",a),n.removeEventListener("error",i),o&&o(null,n)}function i(){n.removeEventListener("load",a),n.removeEventListener("error",i),o&&o(new Error(t))}return"file:"!==window.location.protocol&&(n.crossOrigin="anonymous"),n.addEventListener("load",a),n.addEventListener("error",i),n.src=t,n}cc._RF.push(e,"8f94axQML9NUKBkQZXk81kh","register-head-image"),Object.defineProperty(o,"__esModule",{value:!0}),o.registerHeadImgLoader=o.headImgExt=void 0,o.headImgExt=".head",o.registerHeadImgLoader=function(){cc.assetManager.downloader.register(o.headImgExt,function(t,e,o){o(null,t)}),cc.assetManager.parser.register(o.headImgExt,n),cc.assetManager.factory.register(o.headImgExt,function(t,e,o,n){var a=null,i=null;try{(a=new cc.Texture2D)._uuid=t,a._nativeUrl=t,a._nativeAsset=e}catch(r){i=r}n&&n(i,a)})},cc._RF.pop()},{}],"report-common":[function(t,e,o){"use strict";cc._RF.push(e,"cdaf1e/eKZNDKb4XXuwbreu","report-common");var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,o=1,n=arguments.length;o=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=100?80:t>=50?50:t>=30?30:t>=20?20:t>=10?10:5},i([d({type:l.CoinEmitter,tooltip:"\u53d1\u5c04\u5668 \u63a7\u5236\u8282\u70b9"})],e.prototype,"coinEmitter",void 0),i([d({type:[cc.Prefab],tooltip:"\u53d1\u5c04\u5668\u9884\u5236\u4f53"})],e.prototype,"prefabList",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"./CoinEmitter":"CoinEmitter"}],rewardPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"a121afwuuhFa6IKfrPvi+zw","rewardPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.icon=null,e.rewardNum=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setRewardNode=function(t){var e="rewardIcon/"+t.propType+".png";r.default.changeSpriteFrame(this.icon,e),this.rewardNum.string=""+t.num},i([l(cc.Node)],e.prototype,"icon",void 0),i([l(cc.Label)],e.prototype,"rewardNum",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc"}],saveAsPop:[function(t,e,o){"use strict";cc._RF.push(e,"79458xlXgdFfJ/BI3F5BmEK","saveAsPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inputLevelNum=null,e.closeNode=null,e}return a(e,t),e.prototype.start=function(){this.closeNode.on(cc.Node.EventType.TOUCH_END,this.closeFunc,this)},e.prototype.showSaveAsPop=function(){this.node.active=!0,this.inputLevelNum.string=""},e.prototype.selectLevelFunc=function(){var t=Number(this.inputLevelNum.string);t>0?(this.node.active=!1,this.emitSelectLevel(t),console.log("\u8bbe\u7f6e\u5173\u5361\u6570",this.inputLevelNum.string)):console.log("error:\u4e66\u5199\u9519\u8bef")},e.prototype.emitSelectLevel=function(t){cc.game.emit("saveAsNewMap",t)},e.prototype.closeFunc=function(){this.node.active=!1},i([s({type:cc.EditBox,tooltip:"\u8f93\u5165\u53e6\u5b58\u4e3a\u5173\u5361\u6570"})],e.prototype,"inputLevelNum",void 0),i([s(cc.Node)],e.prototype,"closeNode",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],sdk:[function(t,e,o){"use strict";cc._RF.push(e,"e267eKhDStMpaYZFC42eefy","sdk");var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,o=1,n=arguments.length;o0&&(a=n.getRangeAt(0)),document.body.appendChild(o),o.select(),o.selectionStart=0,o.selectionEnd=e.length;var s=!1;try{s=document.execCommand("copy")}catch(l){cc.warn("[sdk] copy to clipboard err",l)}document.body.removeChild(o),a&&(n.removeAllRanges(),n.addRange(a)),s?cc.log("h5 copy to clipboard success"):cc.log("h5 copy to clipboard failed")}},t.chooseImage=function(){this.isPlatform(i.wx)?cc.log("---wxChooseImage---"):cc.sys.platform==cc.sys.BYTEDANCE_GAME?cc.log("---ttChooseImage---"):cc.sys.isBrowser&&cc.log("---h5ChooseImage---")},t.preloadVideoAd=function(t,e,o,n,a){var r=this;void 0===a&&(a=!0),cc.log("[sdk] video ad",t);var c=t;if(console.log("cc.sys.os:",cc.sys.os),console.log("adID:",c),console.log("this.videoAdMap:",this.videoAdMap),""!=c){var s=null;if(this.videoAdMap[c]){if(!a)return console.log("[video ad] \u4f7f\u7528\u5df2\u6709\u56de\u8c03\u65b9\u6cd5"),this.videoAdMap[c];var l=this.videoAdMap[c],u=l.video,d=l.close,h=l.error;u.offClose(d),u.offError(h),s=u,console.log("[video ad] \u6e05\u7a7a\u56de\u8c03\u65b9\u6cd5")}else console.log("\u521b\u5efa\u5b9e\u529b"),this.isPlatform(i.wx)?s=wx.createRewardedVideoAd({adUnitId:c,multiton:!0}):this.isPlatform(i.tt)?s=tt.createRewardedVideoAd({adUnitId:c,multiton:!0}):this.isPlatform(i.oppo)?s=qg.createRewardedVideoAd({adUnitId:c}):this.isPlatform(i.vivo)&&(s=ad.createRewardedVideoAd({adUnitId:c}));var f=function(t){t&&t.isEnded||void 0===t?(console.log("\u6b63\u5e38\u64ad\u653e\u7ed3\u675f\uff0c\u53ef\u4ee5\u4e0b\u53d1\u6e38\u620f\u5956\u52b1 ++++"),e&&e(),r.isPlatform(i.wx)&&r.reportRewardBehavior(4,c,s)):(cc.game.emit("showMainTips","\u4e2d\u9014\u9000\u51fa\uff0c\u4e0d\u4e0b\u53d1\u6e38\u620f\u5956\u52b1"),console.log("\u64ad\u653e\u4e2d\u9014\u9000\u51fa\uff0c\u4e0d\u4e0b\u53d1\u6e38\u620f\u5956\u52b1 ----"),o&&o("quit","\u4e2d\u9014\u9000\u51fa"),r.isPlatform(i.wx)&&r.reportRewardBehavior(3,c,s)),p.default.playBGM(),r._canShowRewardedVideoAd=!0},m=function(t){1004==t.errCode||1005==t.errCode||1006==t.errCode?n&&n("no-fit","\u6ca1\u6709\u5408\u9002\u7684\u5e7f\u544a"):o&&o(t.errCode,t.errMsg),r.reportRewardBehavior(5,c,s),console.log("\u6ca1\u6709\u5408\u9002\u7684\u5e7f\u544a = ",t.errCode,t.errMsg),cc.game.emit("showMainTips","\u5e7f\u544a\u62c9\u53d6\u5931\u8d25",t.errCode),p.default.playBGM(),r._canShowRewardedVideoAd=!0};if(null!=s&&null!=s)return s.onClose(f),s.onError(m),this.isPlatform(i.wx)&&s.onLoad(function(t){t&&(1==t.shareValue?r.wxValue="shareValue":1==t.rewardValue?r.wxValue="rewardValue":r.wxValue=""),console.log("\u6fc0\u52b1\u89c6\u9891 \u5e7f\u544a\u52a0\u8f7d\u6210\u529f = ",t,"wxValue = ",r.wxValue)}),cc.log("[video ad] \u6ce8\u518c\u65b0\u7684\u56de\u8c03\u65b9\u6cd5"),this.videoAdMap[c]={video:s,close:f,error:m},this.videoAdMap[c]}},t.share=function(t,e,o,n){var a=this;this.isPlatform(i.wx)?h.default.shareMethod({success:function(){o&&o()},fail:function(){n&&n()},complete:function(){if(a.videoAdMap[e]){var o=a.videoAdMap[e].video;a.reportShareBehavior(t,e,o)}}}):o&&o()},t.createCanvas=function(){if(this.isPlatform(i.wx)){var t=canvas.toTempFilePathSync({x:0,y:0,width:cc.winSize.width,height:cc.winSize.height,destWidth:cc.winSize.width,destHeight:cc.winSize.height,fileType:"png",quality:"1.0"});this.wxSave(t)}else if(this.isPlatform(i.tt)){var e=canvas.toTempFilePathSync({x:0,y:0,width:cc.winSize.width,height:cc.winSize.height,destWidth:cc.winSize.width,destHeight:cc.winSize.height});tt.shareAppMessage({imageUrl:e})}},t.wxSave=function(t){wx.authorize({scope:"scope.writePhotosAlbum",success:function(){wx.saveImageToPhotosAlbum({filePath:t,success:function(){wx.showToast({title:"\u622a\u56fe\u5df2\u4fdd\u5b58\u81f3\u76f8\u518c,\u5feb\u5feb\u5206\u4eab\u5230\u670b\u53cb\u5708\u5427",icon:"none",image:"",duration:1500})},fail:function(){}})},fail:function(){var e={title:"\u5fae\u4fe1\u6388\u6743",content:"\u4fdd\u5b58\u5230\u76f8\u518c\u9700\u8981\u60a8\u7684\u6388\u6743\uff0c\u8bf7\u7ed9\u4e88\u6211\u4eec\u6388\u6743",showCancel:!0,canelColor:"#666",confirmText:"\u53bb\u6388\u6743",confirmColor:"#666",success:function(e){1==e.confirm&&wx.openSetting({success:function(){wx.saveImageToPhotosAlbum({filePath:t,success:function(){wx.showToast({title:"\u622a\u56fe\u5df2\u4fdd\u5b58\u81f3\u76f8\u518c,\u5feb\u5feb\u5206\u4eab\u5230\u670b\u53cb\u5708\u5427",icon:"none",image:"",duration:1500})},fail:function(){}})}})}};wx.showModal(e)}})},t.reportRewardBehavior=function(t,e,o){o.reportShareBehavior({operation:t,currentShow:0,strategy:1,adunit:e,scenelD:1,shareValue:0,rewardValue:1})},t.reportShareBehavior=function(t,e,o){o.reportShareBehavior({operation:6,inviteUser:t,strategy:1,adunit:e,scenelD:1,shareValue:1,rewardValue:0})},t.watchAdVideo=function(t){var e=this,o=t.id,n=t.tag,a=t.success,r=t.fail,c=t.nofit;if(0!=this._canShowRewardedVideoAd)if(cc.log("[sdk] watch ad video",n),cc.sys.isBrowser)a&&a();else{if(""!=o){if(this.isPlatform(i.android))l.default.showRewardVideoAd(o,a,r);else if(this.isPlatform(i.wx)){var s=this.preloadVideoAd(o,a,r,c,!0).video;s.show().then(function(){return s.show(),e.reportRewardBehavior(1,o,s),!0}).catch(function(t){if(console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u5931\u8d25",t),console.log("\u5e7f\u544a\u7ec4\u4ef6\u51fa\u73b0\u95ee\u9898",t),s.load().then(function(){console.log("\u624b\u52a8\u52a0\u8f7d\u6210\u529f"),s.show()}),"can't invoke load() while video-ad is showed"!=t.errMsg)return r&&r(t),!1;console.warn("[sdk] can't invoke load() while video-ad is showed, ignore operation.")})}else if(this.isPlatform(i.tt)){console.log("[\u5b57\u8282sdk]");var u=this.preloadVideoAd(o,a,r,c,!0).video;u.show().then(function(){return console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u6210\u529f"),!0}).catch(function(t){if(console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u5931\u8d25",t),console.log("\u5e7f\u544a\u7ec4\u4ef6\u51fa\u73b0\u95ee\u9898",t),u.load().then(function(){console.log("\u624b\u52a8\u52a0\u8f7d\u6210\u529f"),u.show()}),"can't invoke load() while video-ad is showed"!=t.errMsg)return r&&r(t),!1;console.warn("[sdk] can't invoke load() while video-ad is showed, ignore operation.")})}else if(this.isPlatform(i.oppo)){console.log("[oppo sdk]");var p=this.preloadVideoAd(o,a,r,c,!0).video;p.show().then(function(){return console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u6210\u529f"),!0}).catch(function(t){if(console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u5931\u8d25",t),console.log("\u5e7f\u544a\u7ec4\u4ef6\u51fa\u73b0\u95ee\u9898",t),p.load().then(function(){console.log("\u624b\u52a8\u52a0\u8f7d\u6210\u529f"),p.show()}),"can't invoke load() while video-ad is showed"!=t.errMsg)return r&&r(t),!1;console.warn("[sdk] can't invoke load() while video-ad is showed, ignore operation.")})}else if(this.isPlatform(i.vivo)){console.log("[vivo sdk]");var d=this.preloadVideoAd(o,a,r,c,!0).video;d.show().then(function(){return console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u6210\u529f"),!0}).catch(function(t){if(console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u5931\u8d25",t),console.log("\u5e7f\u544a\u7ec4\u4ef6\u51fa\u73b0\u95ee\u9898",t),d.load().then(function(){console.log("\u624b\u52a8\u52a0\u8f7d\u6210\u529f"),d.show()}),"can't invoke load() while video-ad is showed"!=t.errMsg)return r&&r(t),!1;console.warn("[sdk] can't invoke load() while video-ad is showed, ignore operation.")})}return!0}a&&a()}},t.showInterstitialAd=function(t){this.isPlatform(i.wx)?r.default.showInterstitialAd():cc.sys.platform==cc.sys.BYTEDANCE_GAME?c.default.showInterstitialAd():this.isPlatform(i.android)&&l.default.showInterstitialAd(t.tag)},t.showFullScreenAd=function(t){this.isPlatform(i.android)&&l.default.showFullScreenAd(t)},t.showBigImageAd=function(t){this.isPlatform(i.android)&&l.default.showBigImageAd(t)},t.hideBigImageAd=function(t){this.isPlatform(i.android)&&l.default.hideBigImageAd(t)},t.showBannerAd=function(){this.isPlatform(i.wx)?r.default.showBannerAd():cc.sys.platform==cc.sys.BYTEDANCE_GAME&&c.default.showBannerAd()},t.hideBannerAd=function(){this.isPlatform(i.wx)?r.default.hideBannerAd():cc.sys.platform==cc.sys.BYTEDANCE_GAME&&c.default.hideBannerAd()},t.showToast=function(t){this.isPlatform(i.wx)?r.default.showToast(t):(cc.sys.platform,cc.sys.BYTEDANCE_GAME)},t.getDeviceId=function(){return""},t.uploadFile=function(t){var e=this.host;cc.sys.platform==cc.sys.BYTEDANCE_GAME&&tt.uploadFile({url:e+t.url,filePath:t.file,name:"image_file",formData:t.data,success:t.success,fail:t.fail,complete:t.complete})},t.on=function(t,e,o){return cc.systemEvent.on(t,e,o)},t.once=function(t,e,o){return cc.systemEvent.once(t,e,o)},t.off=function(t,e,o){return cc.systemEvent.off(t,e,o)},t.targetOff=function(t){return cc.systemEvent.targetOff(t)},t.createAuthorizeBtn=function(t,e){var o=t.getBoundingBoxToWorld(),n=cc.view.getFrameSize(),a=cc.winSize,i=o.xMin/a.width*n.width,r=(a.height-o.yMax)/a.height*n.height,c=o.width/a.width*n.width,s=o.height/a.height*n.height,l=this.createUserInfoButton({type:"text",text:" ",style:{left:i,top:r,width:c,height:s,lineHeight:0,backgroundColor:"",color:"#ffffff",textAlign:"center",fontSize:16,borderRadius:4}});return l.onTap(function(t){t.iv||t.signature?e(!0):e(!1)}),l},t.rankScoreUpdate=function(t,e,o){this.isPlatform(i.wx)&&r.default.wxRankScoreUpdate(t,e,o)},t.rankScoreRemove=function(t){this.isPlatform(i.wx)&&r.default.wxRankScoreRemove(t)},t.showSubContext=function(t,e,o,n){this.isPlatform(i.wx)&&r.default.wxShowSubContext(t,e,o,n)},t.getAppVersion=function(){return""},t.isPlatform=function(t){switch(t){case i.android:return!(!cc.sys.isNative||cc.sys.os!=cc.sys.OS_ANDROID);case i.ios:return!(!cc.sys.isNative||cc.sys.os!=cc.sys.OS_IOS);case i.wx:return cc.sys.platform==cc.sys.WECHAT_GAME;case i.tt:return cc.sys.platform==cc.sys.BYTEDANCE_GAME;case i.oppo:return cc.sys.platform==cc.sys.OPPO_GAME;case i.vivo:return cc.sys.platform==cc.sys.VIVO_GAME;case i.web:return cc.sys.isBrowser}return!1},t.getPlatform=function(){return cc.sys.isNative&&cc.sys.os==cc.sys.OS_ANDROID?i.android:cc.sys.isNative&&cc.sys.os==cc.sys.OS_IOS?i.ios:cc.sys.platform==cc.sys.WECHAT_GAME?i.wx:i.web},t.createUserInfoButton=function(t){return wx.createUserInfoButton?wx.createUserInfoButton(t):(cc.log("[sdk] createUserInfoButton"),null)},t._shareNum=0,t._shareCount=0,t._canShowRewardedVideoAd=!0,t.host=f.host,t.wxValue="",t.videoAdMap={},t}();o.default=m,m.checkUpdateManager(),cc._RF.pop()},{"../public/data-env":"data-env","./enumConfig":"enumConfig","./http":"http","./native/android-sdk":"android-sdk","./native/audio":"audio","./native/share":"share","./native/tt-sdk":"tt-sdk","./native/wx-sdk":"wx-sdk"}],selectLevelPop:[function(t,e,o){"use strict";cc._RF.push(e,"20c37kr4K9IaaKo8NFkM2dj","selectLevelPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/dataTs"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inputLevelNum=null,e.closeNode=null,e}return a(e,t),e.prototype.start=function(){this.closeNode.on(cc.Node.EventType.TOUCH_END,this.closeFunc,this)},e.prototype.showSelectLevelPop=function(){this.node.active=!0,this.inputLevelNum.string=""},e.prototype.selectLevelFunc=function(){var t=Number(this.inputLevelNum.string);t>0?(this.node.active=!1,this.emitSelectLevel(t),console.log("\u8bbe\u7f6e\u5173\u5361\u6570",this.inputLevelNum.string)):console.log("error:\u4e66\u5199\u9519\u8bef")},e.prototype.emitSelectLevel=function(t){r.default.getLevelMapData(t,function(t){if(console.log("data:",t),t){var e={newLevelData:t};cc.game.emit("initLevelData",e)}else console.log("error:\u627e\u4e0d\u5230\u5bf9\u5e94\u5173\u5361")})},e.prototype.closeFunc=function(){this.node.active=!1},i([l({type:cc.EditBox,tooltip:"\u8f93\u5165\u5bf9\u5e94\u5173\u5361\u6570"})],e.prototype,"inputLevelNum",void 0),i([l(cc.Node)],e.prototype,"closeNode",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../common/dataTs":"dataTs"}],setBloackNumPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"adc65qZJIVBEbnAGo5PKVIz","setBloackNumPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.blockImg=null,e.typeID=null,e.inputBlockNum=null,e.blockType=0,e.parentCallbackFunc=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.initBlockNumNode=function(t,e,o){this.blockType=t,this.parentCallbackFunc=o;var n=e[t];n&&(this.inputBlockNum.string=""+n);var a="block/block_"+t+".png";r.default.changeSpriteFrame(this.blockImg,a)},e.prototype.setBlockNumFun=function(){var t=Number(this.inputBlockNum.string);this.parentCallbackFunc(this.blockType,t)},i([l(cc.Node)],e.prototype,"blockImg",void 0),i([l(cc.Label)],e.prototype,"typeID",void 0),i([l({type:cc.EditBox,tooltip:"\u5757\u7684\u4f7f\u7528\u7ec4\u6570"})],e.prototype,"inputBlockNum",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc"}],setBlockNumPop:[function(t,e,o){"use strict";cc._RF.push(e,"223a5iixK9JDqi/hb6BvmvY","setBlockNumPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../pre/mapEditor/setBloackNumPrefab"),c=t("../common/config"),s=cc._decorator,l=s.ccclass,u=s.property,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.setBlockNumPrefab=null,e.closeNode=null,e.blockContent=null,e.groupNumLabel=null,e.blockTypeConfig=c.default.blockTypeConfig,e.blockDataObj={},e.newScale=.5,e.blockPreWidth=60,e.blockPreHeight=110,e.groupMax=0,e.hengNum=10,e}return a(e,t),e.prototype.start=function(){this.closeNode.on(cc.Node.EventType.TOUCH_END,this.closeFunc,this)},e.prototype.showSetBlockPop=function(t,e){for(var o in console.log("groupMax = ",t),this.node.active=!0,this.blockDataObj=e,this.groupMax=t,this.updateGroupNum(),this.blockContent.removeAllChildren(),this.blockTypeConfig)this.addSetBlockNumNode(o,this.blockTypeConfig[o],e);this.blockContent.height=(Math.ceil(this.blockTypeConfig.length/this.hengNum)+1)*this.blockPreHeight},e.prototype.addSetBlockNumNode=function(t,e,o){var n=cc.instantiate(this.setBlockNumPrefab),a=this.blockPreWidth/2+t%this.hengNum*(this.blockPreWidth+5)-this.blockContent.width/2,i=this.blockPreHeight/2+Math.floor(t/this.hengNum)*(this.blockPreHeight+40);n.x=a,n.y=-i,n.scale=this.newScale,n.getComponent(r.default).initBlockNumNode(e,o,this.chileSetBlockNum.bind(this)),this.blockContent.addChild(n)},e.prototype.chileSetBlockNum=function(t,e){e?this.blockDataObj[t]=e:delete this.blockDataObj[t],this.updateGroupNum()},e.prototype.updateGroupNum=function(){var t=0;for(var e in this.blockDataObj)t+=this.blockDataObj[e];this.groupNumLabel.string="\u7ec4\u6570\uff1a"+t+"/"+this.groupMax},e.prototype.closeFunc=function(){this.node.active=!1},e.prototype.confirmFunc=function(){var t=0;for(var e in this.blockDataObj)t+=this.blockDataObj[e];t==this.groupMax?(console.log("\u914d\u7f6e\u65e0\u8bef"),cc.game.emit("showTips","\u914d\u7f6e\u6210\u529f"),this.node.active=!1,cc.game.emit("setBlockTypeData",this.blockDataObj)):(console.log("\u914d\u7f6e\u6709\u9519"),cc.game.emit("showTips","\u914d\u7f6e\u6709\u9519"))},i([u(cc.Prefab)],e.prototype,"setBlockNumPrefab",void 0),i([u(cc.Node)],e.prototype,"closeNode",void 0),i([u(cc.Node)],e.prototype,"blockContent",void 0),i([u(cc.Label)],e.prototype,"groupNumLabel",void 0),i([l],e)}(cc.Component);o.default=p,cc._RF.pop()},{"../../pre/mapEditor/setBloackNumPrefab":"setBloackNumPrefab","../common/config":"config"}],setupPop:[function(t,e,o){"use strict";cc._RF.push(e,"71b23kHj7xHS5zCkm73iIBG","setupPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../common/dataTs"),u=t("../common/enumConfig"),p=t("../common/native/audio"),d=t("../common/native/wx-sdk"),h=t("../common/sdk"),f=t("../manager/GameManager"),m=t("../manager/report-common"),g=t("../utils/uma/uma-sdk"),y=cc._decorator,v=y.ccclass,b=y.property,_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.popNode=null,e.userIdLabel=null,e.titleLabel=null,e.soundLabel=null,e.musicLabel=null,e.shakeLabel=null,e.backLabel=null,e.closeBtn=null,e.returnMainBtn=null,e.shareBtn=null,e.shareVideo=null,e.shareLabel=null,e.effectBtn=null,e.effectBg=null,e.musicBtn=null,e.musicBg=null,e.shockBtn=null,e.shockBg=null,e.bulletBtn=null,e.bulletBg=null,e.whiteCycle=null,e.greenCycle=null,e.userNode=null,e.privacyNode=null,e.showPopData=null,e.setupData=null,e.whiteBtnX=27,e}return a(e,t),e.prototype.start=function(){this.effectBtn.on("touchend",this.setEffectFunc,this),this.musicBtn.on("touchend",this.setMusicFunc,this),this.shockBtn.on("touchend",this.setShockFunc,this),this.bulletBtn.on("touchend",this.setBulletFunc,this),s.default.addbtnTouchEndScale(this.mask,this.hideSetupPop.bind(this)),s.default.addbtnTouchStartScale(this.closeBtn),s.default.addbtnTouchEndScale(this.closeBtn,this.hideSetupPop.bind(this)),s.default.addbtnTouchCancelScale(this.closeBtn),s.default.addbtnTouchStartScale(this.returnMainBtn),s.default.addbtnTouchEndScale(this.returnMainBtn,this.returnMainFunc.bind(this)),s.default.addbtnTouchCancelScale(this.returnMainBtn),s.default.addbtnTouchStartScale(this.shareBtn),s.default.addbtnTouchEndScale(this.shareBtn,this.shareBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.shareBtn),s.default.addTargetTouchUpInside(this.userNode,this.userNodeFunc.bind(this)),s.default.addTargetTouchUpInside(this.privacyNode,this.privacyNodeFunc.bind(this)),this.setupFonts(),h.default.isPlatform(h.Platform.oppo)||h.default.isPlatform(h.Platform.vivo)?(this.userNode.active=!0,this.privacyNode.active=!0):(this.userNode.active=!1,this.privacyNode.active=!1)},e.prototype.userNodeFunc=function(){console.log("\u7528\u6237\u534f\u8bae"),cc.sys.openURL("https://www.52shenbian.com/yinsi/yinsi.html")},e.prototype.privacyNodeFunc=function(){console.log("\u9690\u79c1\u653f\u7b56"),cc.sys.openURL("https://www.52shenbian.com/yinsi/fuwu.html")},e.prototype.setupFonts=function(){this.titleLabel.string=c.default.instance.trans(r.GDLanguage.set_up),this.soundLabel.string=c.default.instance.trans(r.GDLanguage.set_up_sound_effect),this.musicLabel.string=c.default.instance.trans(r.GDLanguage.set_up_music),this.shakeLabel.string=c.default.instance.trans(r.GDLanguage.set_up_shock);var t=l.default.getItem(u.STORAGEKEY.BULLETSWITCH);console.log("bullet = "+t),-1==t?(this.bulletBg.stopAllActions(),cc.tween(this.bulletBg).to(.2,{opacity:0}).start()):(this.bulletBg.stopAllActions(),cc.tween(this.bulletBg).delay(.1).to(.2,{opacity:255}).start())},e.prototype.showSetupPop=function(t){this.node.active=!0,this.showPopData=t,this.returnMainBtn.active=!1,this.shareBtn.active=!1;var e=l.default.getUserData();e.userID.length?(this.userIdLabel.string="UID: "+e.userID,this.userIdLabel.node.active=!0):this.userIdLabel.node.active=!1,2==t.setupType?this.returnMainBtn.active=!0:1==t.setupType&&(this.shareBtn.active=!0,l.default.isPlatform(l.GDPlatform.wx)?(this.shareLabel.getComponent(cc.Label).string="\u5b98\u65b9\u5fae\u535a",s.default.changeSpriteFrame(this.shareVideo,"rewardIcon/reward_weibo_icon.png")):(l.default.isPlatform(l.GDPlatform.oppo)||l.default.isPlatform(l.GDPlatform.oppo))&&(this.shareBtn.active=!1)),cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),this.setSetupStatus()},e.prototype.hideSetupPop=function(){this.showPopData&&this.showPopData.popCallbackCollect&&this.showPopData.popCallbackCollect.resumeCallBack(),this.node.active=!1},e.prototype.setSetupStatus=function(){this.setupData=l.default.getUserSetupData(),1==this.setupData.effectStatus?this.effectBg.opacity=255:this.effectBg.opacity=0,1==this.setupData.musicStatus?this.musicBg.opacity=255:this.musicBg.opacity=0,1==this.setupData.shockStatus?this.shockBg.opacity=255:this.shockBg.opacity=0},e.prototype.setEffectFunc=function(){1==this.setupData.effectStatus?(this.effectBg.stopAllActions(),cc.tween(this.effectBg).to(.2,{opacity:0}).start()):(this.effectBg.stopAllActions(),cc.tween(this.effectBg).delay(.1).to(.2,{opacity:255}).start()),this.setupData.effectStatus=-this.setupData.effectStatus,l.default.saveUserSetupData(this.setupData),p.default.playBGM()},e.prototype.setMusicFunc=function(){1==this.setupData.musicStatus?(this.musicBg.stopAllActions(),cc.tween(this.musicBg).to(.2,{opacity:0}).start()):(this.musicBg.stopAllActions(),cc.tween(this.musicBg).delay(.1).to(.2,{opacity:255}).start()),this.setupData.musicStatus=-this.setupData.musicStatus,l.default.saveUserSetupData(this.setupData),p.default.playBGM(),1==this.setupData.musicStatus?p.default.playBGM():m.default.reportTACommon("music_close",{})},e.prototype.setShockFunc=function(){1==this.setupData.shockStatus?(this.shockBg.stopAllActions(),cc.tween(this.shockBg).to(.2,{opacity:0}).start()):(this.shockBg.stopAllActions(),cc.tween(this.shockBg).delay(.1).to(.2,{opacity:255}).start()),this.setupData.shockStatus=-this.setupData.shockStatus,l.default.saveUserSetupData(this.setupData)},e.prototype.setBulletFunc=function(){var t=l.default.getItem(u.STORAGEKEY.BULLETSWITCH);console.log("bullet = "+t),1==t?(this.bulletBg.stopAllActions(),cc.tween(this.bulletBg).to(.2,{opacity:0}).start()):(t=-1,this.bulletBg.stopAllActions(),cc.tween(this.bulletBg).delay(.1).to(.2,{opacity:255}).start()),t=-t,l.default.setItem(u.STORAGEKEY.BULLETSWITCH,t),cc.game.emit(u.EMITKEY.BULLETSTATE)},e.prototype.shareBtnFunc=function(){l.default.isPlatform(l.GDPlatform.tt)?cc.game.emit(u.EMITKEY.TTSHARERECORD):l.default.isPlatform(l.GDPlatform.wx)&&d.default.weiBoJump()},e.prototype.returnMainFunc=function(){if(f.default.getInstance().gameType==u.GAMETYPE.GAMELEVEL){if(l.default.getSprintRewardData().winNum>0){var t={popName:"sprintRewardPop",showPopData:{popCallbackCollect:null,popType:1}};cc.game.emit("showPop",t)}f.default.getInstance().cookieDict.cookieCurCount>0&&(t={popName:"loseCookiePop",showPopData:{popCallbackCollect:null,popType:1}},cc.game.emit("showPop",t))}var e=0==f.default.getInstance().sheepMark.resurgenceCount?0:1;console.log("\u5c55\u793a\u5931\u53bb\u7231\u5fc3\u5f39\u6846");var o={popName:"loseLovePop",showPopData:{popCallbackCollect:null,popType:e}};cc.game.emit("showPop",o),this.node.active=!1},e.prototype.contactFunc=function(){console.log("\u8054\u7cfb\u5ba2\u670d"),g.default.trackEvent("setting_service")},i([b(cc.Node)],e.prototype,"mask",void 0),i([b(cc.Node)],e.prototype,"popNode",void 0),i([b(cc.Label)],e.prototype,"userIdLabel",void 0),i([b(cc.Label)],e.prototype,"titleLabel",void 0),i([b(cc.Label)],e.prototype,"soundLabel",void 0),i([b(cc.Label)],e.prototype,"musicLabel",void 0),i([b(cc.Label)],e.prototype,"shakeLabel",void 0),i([b(cc.Label)],e.prototype,"backLabel",void 0),i([b(cc.Node)],e.prototype,"closeBtn",void 0),i([b(cc.Node)],e.prototype,"returnMainBtn",void 0),i([b(cc.Node)],e.prototype,"shareBtn",void 0),i([b(cc.Node)],e.prototype,"shareVideo",void 0),i([b(cc.Node)],e.prototype,"shareLabel",void 0),i([b(cc.Node)],e.prototype,"effectBtn",void 0),i([b(cc.Node)],e.prototype,"effectBg",void 0),i([b(cc.Node)],e.prototype,"musicBtn",void 0),i([b(cc.Node)],e.prototype,"musicBg",void 0),i([b(cc.Node)],e.prototype,"shockBtn",void 0),i([b(cc.Node)],e.prototype,"shockBg",void 0),i([b(cc.Node)],e.prototype,"bulletBtn",void 0),i([b(cc.Node)],e.prototype,"bulletBg",void 0),i([b(cc.SpriteFrame)],e.prototype,"whiteCycle",void 0),i([b(cc.SpriteFrame)],e.prototype,"greenCycle",void 0),i([b(cc.Node)],e.prototype,"userNode",void 0),i([b(cc.Node)],e.prototype,"privacyNode",void 0),i([v],e)}(cc.Component);o.default=_,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/native/wx-sdk":"wx-sdk","../common/sdk":"sdk","../manager/GameManager":"GameManager","../manager/report-common":"report-common","../utils/uma/uma-sdk":"uma-sdk"}],shareNodePop:[function(t,e,o){"use strict";cc._RF.push(e,"a0bd2kRDllJoo/euhMYhvFy","shareNodePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/enumConfig"),l=t("../common/native/share"),u=t("../common/native/tt-sdk"),p=cc._decorator,d=p.ccclass,h=p.property,f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.shareNodeVideo=null,e.shareNodeUrl=null,e.closeVideoBtn=null,e.shareVideoBtn=null,e.exitVideoBtn=null,e.closeUrlBtn=null,e.shareUrlBtn=null,e.exitUrlBtn=null,e.popData=null,e}return a(e,t),e.prototype.start=function(){r.default.addTargetTouchUpInside(this.closeVideoBtn,this.closeVideoBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.shareVideoBtn,this.shareVideoBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.exitVideoBtn,this.exitVideoBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.closeUrlBtn,this.closeUrlBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.shareUrlBtn,this.shareUrlBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.exitUrlBtn,this.exitUrlBtnFunc.bind(this))},e.prototype.closeVideoBtnFunc=function(){this.node.active=!1},e.prototype.shareVideoBtnFunc=function(){cc.game.emit(s.EMITKEY.TTSHARERECORD)},e.prototype.exitVideoBtnFunc=function(){this.node.active=!1},e.prototype.closeUrlBtnFunc=function(){this.node.active=!1},e.prototype.shareUrlBtnFunc=function(){var t=this,e=this;c.default.isPlatform(c.GDPlatform.tt)?u.default.shareTemplate(function(o){console.log("shareTemplate = ",o),o&&(e.node.active=!1),t.popData&&t.popData.shareCb&&(e.popData.shareCb(o),e.node.active=!1)}):c.default.isPlatform(c.GDPlatform.wx)?l.default.shareMethod({success:function(){},fail:function(){},complete:function(){}}):this.node.active=!1},e.prototype.exitUrlBtnFunc=function(){this.node.active=!1},e.prototype.showPop=function(t){this.popData=t,this.shareNodeVideo.active=!1,this.shareNodeUrl.active=!1,this.node.active=!0,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),c.default.isPlatform(c.GDPlatform.tt)?1==t.type?this.shareNodeVideo.active=!0:2==t.type&&(this.shareNodeUrl.active=!0):(c.default.isPlatform(c.GDPlatform.wx),this.shareNodeUrl.active=!0)},i([h(cc.Node)],e.prototype,"popNode",void 0),i([h(cc.Node)],e.prototype,"shareNodeVideo",void 0),i([h(cc.Node)],e.prototype,"shareNodeUrl",void 0),i([h(cc.Node)],e.prototype,"closeVideoBtn",void 0),i([h(cc.Node)],e.prototype,"shareVideoBtn",void 0),i([h(cc.Node)],e.prototype,"exitVideoBtn",void 0),i([h(cc.Node)],e.prototype,"closeUrlBtn",void 0),i([h(cc.Node)],e.prototype,"shareUrlBtn",void 0),i([h(cc.Node)],e.prototype,"exitUrlBtn",void 0),i([d],e)}(cc.Component);o.default=f,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/share":"share","../common/native/tt-sdk":"tt-sdk"}],share:[function(t,e,o){"use strict";cc._RF.push(e,"cc74eL1jO5JXILJM8B5nOu3","share"),Object.defineProperty(o,"__esModule",{value:!0}),o.ShareType=void 0;var n=t("../sdk");(function(t){t.share="share",t.addFriend="addFriend",t.getReward="getReward"})(o.ShareType||(o.ShareType={}));var a=function(){function t(){}return t.init=function(){n.default.setOnShow(function(){}),n.default.setOnShow(function(){});var t=this.getShareParams(),e={title:t.title,imageUrl:t.imageUrl,query:"1"};n.default.setOnShareAppMessage(e)},t.getRewardShare=function(t){var e=this.getShareParams(),o={title:e.title,imageUrl:e.imageUrl,success:function(e){console.log("Share","success",e),e&&(t.success(),console.log("\u5206\u4eab\u6210\u529f"))},fail:function(e){console.log("Share","success",e),e&&(t.fail(),console.log("\u5206\u4eab\u5931\u8d25"))},query:"2",validate:!0};this.initiativeShare(o,!0)},t.shareMethod=function(t){var e=t.success,o=t.fail,n=t.complete,a=this.getShareParams();this.initiativeShare({title:a.title,imageUrl:a.imageUrl,success:function(t){console.log("\u5206\u4eab success = ",t),e&&e(t)},fail:function(t){console.log("\u5206\u4eab fail = ",t),o&&o(t)},complete:function(t){console.log("\u5206\u4eab complete = ",t),n&&n(t)},validate:!0},!0)},t.initiativeShare=function(t,e){if(n.default.isPlatform(n.Platform.web))return t.success&&t.success(!0),void(t.complete&&t.complete(!1));var o=!1,a=(new Date).getTime(),i=!0;1==t.validate?e?(console.log("\u5206\u4eab 111"),n.default.setOnShowOnce(function(){i?(o=(new Date).getTime()-a>=2500,console.log("\u5206\u4eab 222 result = ",o,"startTime = ",a),0==o?(t.fail&&t.fail(!0),t.complete&&t.complete(!1),console.log("\u5206\u4eab 333")):(a=(new Date).getTime(),console.log("\u5206\u4eab 444 result = ",o,"startTime = ",a),i=!1,t.success&&t.success(!0),t.complete&&t.complete(!0))):console.log("\u591a\u6b21\u8fdb\u5165\u540e\u53f0 ###### ")})):(console.log("\u5206\u4eab 555"),n.default.setOnShow(function(){0==(o=(new Date).getTime()-a>=2500)?(t.fail&&t.fail(!0),t.complete&&t.complete(!1)):(t.success&&t.success(!0),t.complete&&t.complete(!0))})):(t.success(!0),t.complete&&t.complete(!0));var r="";t.query&&(r=t.query),wx.shareAppMessage({title:t.title,imageUrl:t.imageUrl,query:r})},t.getShareParams=function(){var t=[{title:"\u6700\u65b0\u51fa\u7089\u5168\u56fd\u7701\u4efd\u667a\u529b\u6392\u884c\uff01",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_1.jpg"},{title:"\u5e26\u85aa\u4e0a\u5395\u6240\u7684\u65f6\u5019\u90fd\u5728\u73a9\u5565\uff1f",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_2.jpg"},{title:"\u636e\u8bf4\u901a\u5173\u7684\u90fd\u80fd\u8fbe\u5230\u7231\u56e0\u65af\u5766\u7684IQ\uff01",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_3.jpg"},{title:"\u6562\u4e0d\u6562\u7761\u89c9\u524d\u73a9\u8fd9\u4e2a\u6e38\u620f\uff1f",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_4.jpg"},{title:"\u4ec0\u4e48\u80fd\u963b\u6b62\u6211\u7761\u89c9\uff1f\u5c31\u662f\u8fd9\u5934\u7f8a\uff01\uff01",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_5.jpg"},{title:"\u667a\u529b\u4e0d\u591f\uff0c\u5c31\u4e0d\u8981\u6765\u6311\u6218\u8fd9\u4e2a\u6e38\u620f\u4e86\uff01",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_6.jpg"},{title:"\u6562\u4e0d\u6562\u6765\u6d4b\u7b97\u4e0b\u4f60\u7684\u667a\u5546\u591f\u4e0d\u591f\uff1f",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_7.jpg"},{title:"\u636e\u8bf4\u53ea\u67090.01%\u7684\u4eba\u53ef\u4ee5\u901a\u5173\uff01\u73bb\u7483\u5fc3\u52ff\u8fdb\uff01",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_8.jpg"}];return t[Math.floor(Math.random()*t.length)]},t.shareId=0,t.parsedId="",t}();o.default=a,cc._RF.pop()},{"../sdk":"sdk"}],"sheep-card":[function(t,e,o){"use strict";cc._RF.push(e,"a4c42prjHtESYEMJNr5MQAH","sheep-card");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.redbgNode=null,e.bluebgNode=null,e.graybgNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setupData=function(t){this.redbgNode.active=!1,this.bluebgNode.active=!1,this.graybgNode.active=!1;var e=null,o=!1;if(1==t.type?(this.redbgNode.active=!0,e=this.redbgNode,o=!0):2==t.type?(this.bluebgNode.active=!0,e=this.bluebgNode):3==t.type&&(this.graybgNode.active=!0,e=this.graybgNode),e){var n=e.getChildByName("num-label").getComponent(cc.Label),a=e.getChildByName("count-label").getComponent(cc.Label),i=e.getChildByName("name-label").getComponent(cc.Label);if(n.string="\u7b2c "+t.num+" \u540d",a.string=t.item.win_score+" \u7f8a",i.string=t.item.name+"\u7f8a\u961f",o){var r=e.getChildByName("flash_1"),c=e.getChildByName("flash_2");this.playAnimationFloat(r,255),this.playAnimationFloat(c,-255)}}},e.prototype.playAnimationFloat=function(t,e){var o=this;cc.tween(t).delay(.5).by(.1,{opacity:e}).call(function(){o.playAnimationFloat(t,-e)}).start()},i([s(cc.Node)],e.prototype,"redbgNode",void 0),i([s(cc.Node)],e.prototype,"bluebgNode",void 0),i([s(cc.Node)],e.prototype,"graybgNode",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],"sheep-flock-icon":[function(t,e,o){"use strict";cc._RF.push(e,"a441bXbKtZDx6Z6u1Z9IX7r","sheep-flock-icon");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.iconHeader=null,e.purpleNode=null,e.blueNode=null,e.regionNode=null,e.cityNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showData=function(t){var e=this;t?(this.node.stopAllActions(),this.node.active=!0,cc.tween(this.node).delay(3).call(function(){e.node.active=!1},this).start(),0==t.gender?(this.purpleNode.active=!1,this.blueNode.active=!0):1==t.gender?(this.purpleNode.active=!1,this.blueNode.active=!0):(this.purpleNode.active=!0,this.blueNode.active=!1),t.nick_name?this.regionNode.getComponent(cc.Label).string=t.nick_name:this.regionNode.getComponent(cc.Label).string="",t.city?this.cityNode.getComponent(cc.Label).string=t.city:this.cityNode.getComponent(cc.Label).string="",r.default.setAvatar(this.iconHeader,t.avatar)):this.node.active=!1},i([l(cc.Node)],e.prototype,"iconHeader",void 0),i([l(cc.Node)],e.prototype,"purpleNode",void 0),i([l(cc.Node)],e.prototype,"blueNode",void 0),i([l(cc.Node)],e.prototype,"regionNode",void 0),i([l(cc.Node)],e.prototype,"cityNode",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc"}],"sheep-flock":[function(t,e,o){"use strict";cc._RF.push(e,"9c2fby18nZLPpABsAs/z6CS","sheep-flock");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__spreadArrays||function(){for(var t=0,e=0,o=arguments.length;e0&&"null"!=t.item.result){this.node.addChild(this.sheepIconNode),this.sheepIconNode.zIndex=200,this.sheepIconNode.active=!1;var c=JSON.parse(t.item.result);r=this.bubbleSort(c);var u=s.default.getUserData().userID;for(var d in r)Number(u)==r[d].uid&&(this.userRankInfo=r[d])}var h=t.item.all_score;h>36&&(h=36),h<=0&&(h=0);for(var m=0;mn[c+1].state?(e=[n[c+1],n[c]],n[c]=e[0],n[c+1]=e[1]):n[c].state==n[c+1].state&&n[c].fail=t.length)){var o=cc.instantiate(this.sheepNode);this.node.addChild(o),this.sheepNodeArr.push(o);var n=0;e<6?(n=6,this.radius=100):e<18?(n=12,this.radius=200):(n=18,this.radius=300);var a=this.angle/180*Math.PI,i=this.radius*Math.cos(a),r=this.radius*Math.sin(a),l=0;e0)for(var b in this.clothesData)if(this.clothesData[b].clothesId==u.skin){h="sheep/"+this.clothesData[b].spName,f=this.clothesData[b].spSkin;break}1!=u.state&&(h="sheep/Dead1"),this.setUpSheepNode(o,h,u,f);var _=o.getChildByName("clickNode");_.on(cc.Node.EventType.TOUCH_END,function(){if(console.log(_.parent.getPosition().x,_.parent.getPosition().y),this.sheepIconNode){var o=t[e];this.sheepIconNode.x=_.parent.getPosition().x,this.sheepIconNode.y=_.parent.getPosition().y+20,this.sheepIconNode.getComponent(m.default).showData(o)}},this)}},e.prototype.setUpSheepNode=function(t,e,o,n){t.getChildByName("flashSp").opacity=0,t.getChildByName("sheepSp").getComponent(u.default).loadSpine(e,function(){var a="Jump2";"sheep/Dead1"==e?(o.fail||(o.fail=1),a="Dead"+h.default.getDeadNum(o.fail),t.getChildByName("sheepSp").getComponent(u.default).play(a,0)):(t.getChildByName("sheepSp").getComponent(u.default).setNewSkin(n),t.getChildByName("sheepSp").getComponent(u.default).play(a,0))})},i([v({type:cc.Node,tooltip:"\u7f8a"})],e.prototype,"sheepSp",void 0),i([v({type:cc.Node,tooltip:"\u540d\u6b21\u724c\u5b50"})],e.prototype,"sheepCard",void 0),i([v({type:cc.Node,tooltip:"\u5361\u7247"})],e.prototype,"sheepIcon",void 0),i([v({type:cc.Node,tooltip:"\u7537\u5934\u50cf"})],e.prototype,"manSheepHeader",void 0),i([v({type:cc.Node,tooltip:"\u5973\u5934\u50cf"})],e.prototype,"womanSheepheader",void 0),i([y],e)}(cc.Component);o.default=b,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/common/dataTs":"dataTs","../../script/common/enumConfig":"enumConfig","../../script/common/spine":"spine","../../script/manager/DateManager":"DateManager","../../script/manager/GameManager":"GameManager","../../script/manager/data-manager":"data-manager","./sheep-card":"sheep-card","./sheep-flock-icon":"sheep-flock-icon"}],"sheep-rank-pop":[function(t,e,o){"use strict";cc._RF.push(e,"4f1e6q1O4ZIM6jxip+/6cgl","sheep-rank-pop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../manager/GameManager"),l=t("./popSub/sheepRankItem"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.sheepRankItem=null,e.rankItem=null,e.contentView=null,e.closeBtn=null,e.bottomNode=null,e}return a(e,t),e.prototype.start=function(){c.default.addbtnTouchStartScale(this.closeBtn),c.default.addbtnTouchEndScale(this.closeBtn,this.closeBtnFunc.bind(this)),c.default.addbtnTouchCancelScale(this.closeBtn)},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.sheepRankPop=function(){this.node.active=!0,this.requestData()},e.prototype.requestData=function(){if(cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),this.rankItem||(this.rankItem=cc.instantiate(this.sheepRankItem)),this.contentView.removeAllChildren(),this.bottomNode.active=!1,s.default.getInstance().rankInfo)this.setSubViews(s.default.getInstance().rankInfo);else{var t=this;r.default.getRankInfoData(function(e){t.setSubViews(e.data)})}},e.prototype.setSubViews=function(t){for(var e=0;e=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.imgNode=null,e.labelNode=null,e.numNode=null,e.nameNode=null,e.countNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setupData=function(t){var e=t.index+1;this.numNode.getComponent(cc.Label).string=e+"",this.nameNode.getComponent(cc.Label).string=t.name,this.countNode.getComponent(cc.Label).string=t.win_score+"";var o=null,n=null,a=null,i=null,r=null,c=null,s=this.imgNode.children;for(var l in s){var u=s[l];"text-black"==u.name||"text-sheep-black"==u.name?u.active=!0:u.active=!1,"num-yellow"==u.name?o=u:"num-sliver"==u.name?n=u:"num-orange"==u.name?a=u:"num-blue"==u.name?i=u:"num-black"==u.name||("img-yellow"==u.name?r=u:"img-white"==u.name?c=u:u.name)}c.active=!0,1==e?(o.active=!0,r.active=!0,c.active=!1):2==e?n.active=!0:3==e?a.active=!0:i.active=!0},e.prototype.setBottomData=function(t){this.numNode.getComponent(cc.Label).string=t.index+"",this.nameNode.getComponent(cc.Label).string=t.item.name,this.countNode.getComponent(cc.Label).string=t.item.win_score+""},i([s(cc.Node)],e.prototype,"imgNode",void 0),i([s(cc.Node)],e.prototype,"labelNode",void 0),i([s(cc.Node)],e.prototype,"numNode",void 0),i([s(cc.Node)],e.prototype,"nameNode",void 0),i([s(cc.Node)],e.prototype,"countNode",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],"show-daily-pop":[function(t,e,o){"use strict";cc._RF.push(e,"3a139KaoTJPZKuR6HDW3cfD","show-daily-pop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../../pre/main/rewardPrefab"),l=t("../../script/common/CcJsFunc"),u=t("../../script/common/native/audio"),p=t("../../script/common/spine"),d=cc._decorator,h=d.ccclass,f=d.property,m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.titleSpine=null,e.boxSpine=null,e.flashNode=null,e.receiveBtn=null,e.receiveLabel=null,e.rewardPrefab=null,e.popData=null,e.rewardNodeArray=[],e.rewardDataArray=[],e}return a(e,t),e.prototype.start=function(){l.default.addbtnTouchStartScale(this.receiveBtn),l.default.addbtnTouchEndScale(this.receiveBtn,this.receiveBtnFunc.bind(this)),l.default.addbtnTouchCancelScale(this.receiveBtn)},e.prototype.receiveBtnFunc=function(){this.node.active=!1,this.receiveBtn.stopAllActions();for(var t=0;t=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../../pre/main/cookieRewardNode"),l=t("../../script/common/CcJsFunc"),u=t("../../script/common/enumConfig"),p=t("../../script/common/native/audio"),d=t("../../script/common/spine"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.cookieRewardLayer=null,e.cookieTitleSpine=null,e.cookieRewardNode=null,e.cookieFlashNode=null,e.cookieImageNode=null,e.cookieNumNode=null,e.cookieReceiveBtn=null,e.cookiePropEndNode=null,e.receiveLabel=null,e.popData=null,e}return a(e,t),e.prototype.start=function(){l.default.addbtnTouchStartScale(this.cookieReceiveBtn),l.default.addbtnTouchEndScale(this.cookieReceiveBtn,this.receiveBtnFunc.bind(this)),l.default.addbtnTouchCancelScale(this.cookieReceiveBtn),this.receiveLabel.string=c.default.instance.trans(r.GDLanguage.pop_claim)},e.prototype.receiveBtnFunc=function(){var t=this;this.maskNode.active=!1,this.cookieTitleSpine.active=!1,this.cookieFlashNode.active=!1,this.cookieReceiveBtn.active=!1;var e=this.cookiePropEndNode,o=l.default.getWorldPosition(e),n=l.default.getNodePosition(this.node,o);cc.tween(this.cookieRewardNode).to(.1,{angle:5}).to(.1,{angle:-5}).to(.1,{angle:5}).to(.1,{angle:-5}).to(.3,{position:cc.v3(n.x,n.y,0),scale:.3}).call(function(){t.node.active=!1,t.popData&&t.popData.rewardCallback&&t.popData.rewardCallback(),cc.tween(e).to(.2,{scale:1.2}).to(.2,{scale:1}).start()}).start()},e.prototype.showPop=function(t){this.popData=t,this.cookieRewardLayer.active=!1,1==t.popType&&(this.node.active=!0,this.maskNode.active=!0,this.cookieRewardLayer.active=!0,this.cookieRewardLayer.position=cc.v3(0,0,0),this.cookieRewardNode.scale=1,this.cookieTitleSpine.active=!0,this.cookieReceiveBtn.active=!0,this.showCookieRewardPopData(t.rewardData,t.startNode,t.endNode))},e.prototype.showCookieRewardPopData=function(t,e,o){console.log("\u9886\u53d6\u5956\u52b1",JSON.stringify(t));var n=this;n.cookieFlashNode.active=!1,p.default.playAudioMusic("audio/sound/Words1.mp3",!1),n.cookieTitleSpine.getComponent(d.default).play("Award1_Words1",1);var a=l.default.getWorldPosition(e),i=l.default.getNodePosition(this.node,a),r=l.default.getWorldPosition(o),c=l.default.getNodePosition(this.node,r);this.cookieRewardNode.getComponent(s.default).showData(t),this.cookieRewardNode.position=cc.v3(i),this.cookieReceiveBtn.scale=0,this.cookieRewardNode.scale=.5,cc.tween(this.cookieRewardNode).to(.3,{position:cc.v3(i.x+10,i.y-400),scale:.7}).to(.3,{position:cc.v3(i.x-100,i.y-500)}).to(.2,{position:cc.v3(c),scale:1}).call(function(){n.cookieFlashNode.active=!0,cc.tween(n.cookieFlashNode).by(5,{angle:360}).repeatForever().start(),cc.tween(n.cookieReceiveBtn).to(.3,{scale:1}).start(),n.popData&&n.popData.callback?n.popData.callback():cc.game.emit(u.EMITKEY.HIDEMASKLAYER)}).start()},i([m(cc.Node)],e.prototype,"maskNode",void 0),i([m(cc.Node)],e.prototype,"cookieRewardLayer",void 0),i([m(cc.Node)],e.prototype,"cookieTitleSpine",void 0),i([m(cc.Node)],e.prototype,"cookieRewardNode",void 0),i([m(cc.Node)],e.prototype,"cookieFlashNode",void 0),i([m(cc.Node)],e.prototype,"cookieImageNode",void 0),i([m(cc.Node)],e.prototype,"cookieNumNode",void 0),i([m(cc.Node)],e.prototype,"cookieReceiveBtn",void 0),i([m(cc.Node)],e.prototype,"cookiePropEndNode",void 0),i([m(cc.Label)],e.prototype,"receiveLabel",void 0),i([f],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../../pre/main/cookieRewardNode":"cookieRewardNode","../../script/common/CcJsFunc":"CcJsFunc","../../script/common/enumConfig":"enumConfig","../../script/common/native/audio":"audio","../../script/common/spine":"spine"}],"snake-ctrl-point":[function(t,e,o){"use strict";cc._RF.push(e,"97d1cS+taxBnYxM87Oc/vw1","snake-ctrl-point");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator.ccclass,c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.size=20,e.isDragging=!1,e.sprite=null,e.onEditStart=null,e.onEditEnd=null,e}return a(e,t),e.prototype.onLoad=function(){this.node.on(cc.Node.EventType.TOUCH_START,this.onTouchStart,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this.onTouchMove,this),this.node.on(cc.Node.EventType.TOUCH_END,this.onTouchEnd,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this.onTouchEnd,this),this.node.addComponent(cc.BlockInputEvents)},e.prototype.start=function(){this.idle()},e.prototype.setEditCallback=function(t,e){this.onEditStart=t,this.onEditEnd=e},e.prototype.onTouchStart=function(){this.selected(),this.isDragging=!0,this.onEditStart&&this.onEditStart()},e.prototype.onTouchMove=function(t){if(0!=this.isDragging){var e=t.getDelta(),o=e.x,n=e.y;this.node.setPosition(this.node.position.x+o,this.node.position.y+n)}},e.prototype.onTouchEnd=function(){this.idle(),this.isDragging=!1,this.onEditEnd&&this.onEditEnd()},e.prototype.idle=function(){this.node.stopAllActions(),cc.tween(this.node).to(.1,{scale:1,opacity:255}).to(.5,{scale:1.01,opacity:200},{easing:cc.easing.backInOut}).union().repeatForever().start()},e.prototype.selected=function(){this.node.stopAllActions(),cc.tween(this.node).to(.1,{scale:1,opacity:255}).to(.5,{scale:1.4,opacity:100},{easing:cc.easing.backInOut}).union().repeatForever().start()},e.prototype.getSpriteFrameByColor=function(t){for(var e=new Uint8Array(16),o=0;o<2;o++)for(var n=0;n<2;n++)e[8*o+4*n]=t.r,e[8*o+4*n+1]=t.g,e[8*o+4*n+2]=t.b,e[8*o+4*n+3]=t.a;var a=new cc.Texture2D;return a.initWithData(e,cc.Texture2D.PixelFormat.RGBA8888,2,2),new cc.SpriteFrame(a)},i([r],e)}(cc.Component);o.default=c,cc._RF.pop()},{}],"snake-sprite-assembler":[function(t,e,o){"use strict";cc._RF.push(e,"f7fady81S5KDZYrZVIIiQPn","snake-sprite-assembler");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(o,"__esModule",{value:!0}),o.SplineSpriteAssembler=void 0;for(var i=t("../bezier/curve-sample"),r=cc.Vec3,c=t("../bezier/export-helper"),s=cc.Mat4,l=[],u=0;u<4;u++)l.push(new r);var p=[];for(u=0;u<4;u++)p.push({u:0,v:1});var d=new r,h=Math.floor(65535/4),f=new Array,m=new Array,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._renderData=null,e.verticesCount=0,e.indicesCount=0,e}return a(e,t),e.prototype.init=function(e){t.prototype.init.call(this,e),this._renderData=new cc.RenderData,this._renderData.init(this),this._renderData.createFlexData(0,4,6,this.getVfmt()),this._updateIndices()},e.prototype._updateIndices=function(){for(var t=this._renderData.iDatas[0],e=0,o=0,n=t.length;eh&&(console.warn("Spline("+t.name+")\u7684\u56db\u8fb9\u5f62\u6570\u91cf("+D+")\u8d85\u8fc7\u4e86\u5141\u8bb8\u7684\u6700\u5927\u503c("+h+"), \u81ea\u52a8\u622a\u65ad, Spline \u66f2\u7ebf\u4f1a\u663e\u793a\u4e0d\u5b8c\u6574"),f.length=h),this.verticesCount=4*D,this.indicesCount=6*D;var A=t.node.width,T=t.node.getWorldMatrix(new s),O=.5*A,I=this._renderData._flexBuffer;I.reserve(this.verticesCount,this.indicesCount)&&this._updateIndices(),I.used(this.verticesCount,this.indicesCount);var E=this._renderData.vDatas[0],L=this._renderData.uintVDatas[0],M=0,B=null===(e=t.spriteFrame)||void 0===e?void 0:e.uvSliced,R=m[m.length-1],F=R>n.height?1:n.height/R,j=R*F,x=j-u;x0?c.math.lerp(B[12].v,B[8].v,o/a):B[8].v;if(R=x)return 0==U&&(U=Math.floor((x-a)/g)*g+a),c.math.lerp(B[8].v,B[0].v,(o-U)/(j-U));var i=(o-a)/g%1;return i=e(i),c.math.lerp(B[8].v,B[4].v,i)},Y=function(t){return t<.001?1:t},J=function(t){return t>.9999?0:t},W=0,V=f.length-1;W>2,s=i._vData;n.length+c>s.length?s.set(n.subarray(0,s.length-c),c):s.set(n,c);for(var l=i._iData,u=r.vertexOffset,p=r.indiceOffset,d=0,h=a.length;d=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.spine=null,e._frameEventMap={},e._loop=!1,e._times=1,e._playingName="",e._playingNameQueue=[],e}return a(e,t),e.prototype.onLoad=function(){this.init()},e.prototype.init=function(){this.spine&&(this.spine.setCompleteListener(this.completeFunc.bind(this)),this.spine.setStartListener(this.startFunc.bind(this)),this.spine.setEventListener(this.frameEventFunc.bind(this)))},e.prototype.completeFunc=function(t){if(!this._loop)if(this._playingNameQueue.length>0){if(t.animation.name==this._playingNameQueue[this._playingNameQueue.length-1]){if(this._times--,0==this._times)return void(this._completeCb&&this._completeCb(t.animation.name));this.playQueue(this._playingNameQueue,this._times,this._completeCb)}}else{if(this._times--,0==this._times)return void(this._completeCb&&this._completeCb(t.animation.name));this.play(this._playingName,this._times,this._completeCb)}},e.prototype.startFunc=function(t){this._startCb&&this._startCb(t.animation.name)},e.prototype.frameEventFunc=function(t,e){this._frameEventMap[e.data.name]&&this._frameEventMap[e.data.name](e.data.name)},e.prototype.setCompleteCb=function(t){this._completeCb=t},e.prototype.setStartCb=function(t){this._startCb=t},e.prototype.setFrameEventCb=function(t,e){t?e?this._frameEventMap[t]=e:delete this._frameEventMap[t]:this._frameEventMap={}},e.prototype.setNewSkin=function(t){this.spine.setSkin(t)},e.prototype.play=function(t,e,o){void 0===e&&(e=1),cc.isValid(this)&&cc.isValid(this.node)&&(this.spine.clearTracks(),this.spine.setToSetupPose(),this._playingName=t,this._loop=0==e,this._times=e,this._completeCb=o,this._playingNameQueue.length=0,this.spine.setAnimation(0,this._playingName,this._loop))},e.prototype.playQueue=function(t,e,o){if(void 0===e&&(e=1),cc.isValid(this)&&cc.isValid(this.node)&&0!=t.length)if(this._completeCb=o,this.spine.clearTracks(),this.spine.setToSetupPose(),1==t.length)this.play(t[0],e);else{this._loop=0==e,this._times=e,this._playingNameQueue=t.concat(),this.spine.setAnimation(0,t[0],!1);for(var n=1;n=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0}),o.SplineSprite=o.SplineSpriteVert=void 0;var r=t("../bezier/spline"),c=t("../bezier/spline-node"),s=t("../snake-ctrl-point"),l=t("./snake-sprite-assembler"),u=(cc.Sprite,cc.Node),p=(cc.Node.EventType,cc.assetManager),d=(cc.Color,cc._decorator),h=d.ccclass,f=d.property,m=d.menu;o.SplineSpriteVert=function(t){this.vertices=t};var g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.showDebugInfo=!1,e.editMode=!1,e.mCtrlNodeRoot=null,e.mSplineDirty=!0,e.lockHeadAndTail=!0,e.mSpline=new r.Spline,e.curveSampleList=new Array,e.splineVerticesCache=null,e}return a(e,t),Object.defineProperty(e.prototype,"ShowDebugInfo",{get:function(){return this.showDebugInfo},enumerable:!1,configurable:!0}),e.prototype.setSplineDirty=function(){this.mSplineDirty=!0},e.prototype.onLoad=function(){var e;null===(e=t.prototype.onLoad)||void 0===e||e.call(this),this.initRootCtrlNode(),this.setSplineDirty(),this.mCtrlNodeRoot.active=!1},e.prototype.start=function(){var e;null===(e=t.prototype.start)||void 0===e||e.call(this)},e.prototype.onEnable=function(){t.prototype.onEnable.call(this)},e.prototype.setCtrlPosList=function(t){if(this.spriteFrame){try{this.mCtrlNodeRoot&&this.mCtrlNodeRoot.isValid&&(this.mCtrlNodeRoot.removeAllChildren(),this.mSpline.RemoveAllNode())}catch(i){cc.warn("setCtrlPosList err",i)}try{for(var e=0;e0){var t=this.mCtrlNodeRoot.children[0].children[0];return cc.v2(t.position.normalize())}return cc.v2()},e.prototype.lockHeadAndTailCtrlNode=function(t){this.lockHeadAndTail=t},e.prototype.setEditMode=function(t){if(this.editMode=t,this.mCtrlNodeRoot.active=t,t)for(var e=this.mCtrlNodeRoot.children.length,o=0;o0)for(var e=0;e1)throw new Error("Time must be between 0 and 1. Given time was "+t);return Math.floor(t*(this.curves.length-1))},t.prototype.RefreshCurves=function(){this.curves.length=0;for(var t=0;tthis.Length)throw new Error("Distance must be between 0 and spline length ("+this._length+"). Given distance was "+t);for(var e=0,o=this.curves;ea&&ta))return n.GetSampleAtDistance(t);t-=a}throw new Error("Something went wrong with GetSampleAtDistance.")},t.prototype.AddNode=function(t){if(this.nodes.push(t),1!==this.nodes.length){var e=this.nodes[this.nodes.length-2],o=new a.CubicBezierCurve(e,t);o.Changed.on(this.UpdateAfterCurveChanged),this.curves.push(o)}this.RaiseNodeListChanged(new l(new Array(t))),this.UpdateAfterCurveChanged(),this.updateLoopBinding()},t.prototype.InsertNode=function(t,e){if(0===t)throw new Error("Can't insert a node at index 0.");var o=this.nodes[t];this.nodes.splice(t,0,e),this.curves[t-1].ConnectEnd(e);var n=new a.CubicBezierCurve(e,o);n.Changed.on(this.UpdateAfterCurveChanged),this.curves.splice(t,0,n),this.RaiseNodeListChanged(new c([e],t)),this.UpdateAfterCurveChanged(),this.updateLoopBinding()},t.prototype.RemoveAllNode=function(){for(var t=0;t=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../../i18n/gd_language"),c=t("../../../i18n/i18n"),s=t("../../common/CcJsFunc"),l=t("../../common/dataTs"),u=t("../../common/native/audio"),p=t("../../common/spine"),d=t("../../manager/GameManager"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.spineBox=null,e.bgCoin=null,e.bgCoinLabel=null,e.bgProp=null,e.bgPropLabel=null,e.reveiceBtn=null,e.reveiceBtnLabel=null,e.spineProgress=null,e.particleNode=null,e.labelNode=null,e.lastLabel=null,e.callback=null,e}return a(e,t),e.prototype.start=function(){s.default.addbtnTouchStartScale(this.reveiceBtn),s.default.addbtnTouchEndScale(this.reveiceBtn,this.reveiceBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.reveiceBtn),this.reveiceBtnLabel.string=c.default.instance.trans(r.GDLanguage.pop_claim)},e.prototype.reveiceBtnFunc=function(){this.node.active=!1,l.default.getSprintRewardData().rewardProgress>=3&&this.callback&&this.callback()},e.prototype.showProgress=function(t){var e=this;this.spineBox.active=!1,this.bgCoin.active=!1,this.bgProp.active=!1,this.reveiceBtn.active=!1,this.node.active=!0,this.maskNode.opacity=0,this.maskNode.active=!0,this.callback=t,e.spineProgress.active=!1,e.particleNode.active=!1,console.log("\u51b2\u523a\u5956\u52b1 = "+JSON.stringify(l.default.getSprintRewardData()));var o=l.default.getSprintRewardData(),n=o.rewardProgress,a=o.winBox,i=o.winNum;if(n<=0&&(n=1),l.default.getSprintRewardData().rewardProgress>=3){var r=l.default.getUserData(),c=a>5?5:a,u=12;c>1&&(u+=11*(c-1)),r.coin+=u;var p=l.default.gameConfigData.baseConfigData.rewardBox[Math.floor(3*Math.random())];if(p&&p.length>=2){console.log(JSON.stringify(p));var d="rewardIcon/"+p[1].propType+".png";s.default.changeSpriteFrame(this.bgProp,d),"prop_remove"==p[1].propType?(r.prop_remove++,r.prop_remove):"prop_cancel"==p[1].propType?(r.prop_cancel++,r.prop_cancel):"prop_random"==p[1].propType&&(r.prop_random++,r.prop_random)}l.default.saveUserData(r),this.bgCoinLabel.string="x"+u}var h=a;i<=3&&(h=0);var f=3*h;n>=3&&a>0&&(f=3*(a-1));var m=this.labelNode.children;for(var g in m)f+=1,m[g].getComponent(cc.Label).string=f+"",g=3&&t.playBoxAnim(),t.spineProgress.getComponent(p.default).play(n,0,function(){})})},e.prototype.getSpineName=function(){var t=l.default.getSprintRewardData(),e=t.winBox,o=t.rewardProgress,n=e<=0?1:e+1;n=n>=5?5:n,o>=3&&n>1&&n<5&&(n-=1);var a="3RichRoad"+n+"_"+(o<=0?1:o>=3?3:o);return 0==o&&(a="3RichRoad0_0"),a},e.prototype.playBoxAnim=function(){d.default.getInstance().sprintMark=!0;var t=this;if(l.default.getSprintRewardData().rewardProgress<3)return this.maskNode.active=!1,void(this.callback&&this.callback());this.maskNode.opacity=220,t.spineBox.active=!0,this.spineBox.getComponent(p.default).setFrameEventCb("Open1",function(){u.default.playAudioMusic("audio/sound/Open1.mp3",!1)}),this.spineBox.getComponent(p.default).setFrameEventCb("Eff_Sheen1",function(){t.bgCoin.active=!0,t.bgProp.active=!0}),this.spineBox.getComponent(p.default).play("Ref1_Open4",1,function(){t.reveiceBtn.active=!0,cc.tween(t.reveiceBtn).to(.1,{scale:1.3}).to(.1,{scale:1}).start()})},i([m(cc.Node)],e.prototype,"maskNode",void 0),i([m(cc.Node)],e.prototype,"spineBox",void 0),i([m(cc.Node)],e.prototype,"bgCoin",void 0),i([m(cc.Label)],e.prototype,"bgCoinLabel",void 0),i([m(cc.Node)],e.prototype,"bgProp",void 0),i([m(cc.Label)],e.prototype,"bgPropLabel",void 0),i([m(cc.Node)],e.prototype,"reveiceBtn",void 0),i([m(cc.Label)],e.prototype,"reveiceBtnLabel",void 0),i([m(cc.Node)],e.prototype,"spineProgress",void 0),i([m(cc.Node)],e.prototype,"particleNode",void 0),i([m(cc.Node)],e.prototype,"labelNode",void 0),i([f],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../../i18n/gd_language":"gd_language","../../../i18n/i18n":"i18n","../../common/CcJsFunc":"CcJsFunc","../../common/dataTs":"dataTs","../../common/native/audio":"audio","../../common/spine":"spine","../../manager/GameManager":"GameManager"}],sprintRewardPop:[function(t,e,o){"use strict";cc._RF.push(e,"28f4dgUbolNKYJgMwFcV4Es","sprintRewardPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../common/dataTs"),u=t("../common/enumConfig"),p=t("../common/spine"),d=t("../common/util"),h=t("../manager/GameManager"),f=cc._decorator,m=f.ccclass,g=f.property,y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.closeBtn=null,e.titleLabel=null,e.spineNode=null,e.timeSpineNode=null,e.descLabel=null,e.playBtn=null,e.timeLabel=null,e.exitBtn=null,e.resetBtn=null,e.mainBtn=null,e.playLabel=null,e.exitLabel=null,e.restartLabel=null,e.mainLabel=null,e.firstLabel=null,e.secondLabel=null,e.threeLabel=null,e.particleNode=null,e.showPopData=null,e.updateTime=0,e}return a(e,t),e.prototype.update=function(t){this.updateTime+=t,this.updateTime>=1&&(this.updateTime-=1,this.updateTimeNum())},e.prototype.updateTimeNum=function(){var t=l.default.updateSprintRewardTime();if(0==t)console.log("\u5df2\u6ee1"),this.timeLabel.string="End";else{var e=d.default.formatTime(t);e[0]>0?this.timeLabel.string=e[0]+"d"+e[1]+"h":e[1]>0?this.timeLabel.string=e[1]+"h"+e[2]+"m":e[2]>0?this.timeLabel.string=e[2]+"m"+e[3]+"s":e[3]>0&&(this.timeLabel.string=e[2]+"m"+e[3]+"s")}},e.prototype.start=function(){s.default.addbtnTouchStartScale(this.closeBtn),s.default.addbtnTouchEndScale(this.closeBtn,this.closeBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.closeBtn),s.default.addbtnTouchStartScale(this.playBtn),s.default.addbtnTouchEndScale(this.playBtn,this.playBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.playBtn),s.default.addbtnTouchStartScale(this.exitBtn),s.default.addbtnTouchEndScale(this.exitBtn,this.exitBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.exitBtn),s.default.addbtnTouchStartScale(this.resetBtn),s.default.addbtnTouchEndScale(this.resetBtn,this.resetBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.resetBtn),s.default.addbtnTouchStartScale(this.mainBtn),s.default.addbtnTouchEndScale(this.mainBtn,this.mainBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.mainBtn),this.updateTimeNum(),this.setupFonts()},e.prototype.setupFonts=function(){this.playLabel.string=c.default.instance.trans(r.GDLanguage.daily_start),this.restartLabel.string=c.default.instance.trans(r.GDLanguage.pop_restart),this.exitLabel.string=c.default.instance.trans(r.GDLanguage.pop_quit),this.mainLabel.string=c.default.instance.trans(r.GDLanguage.main_screen)},e.prototype.resetBtnFunc=function(){this.node.active=!1,this.exitBtnFunc()},e.prototype.mainBtnFunc=function(){this.exitBtnFunc()},e.prototype.exitBtnFunc=function(){this.node.active=!1,cc.game.emit("blowupHeartAnim",1)},e.prototype.closeBtnFunc=function(){this.node.active=!1,cc.game.emit("blowupHeartAnim",0)},e.prototype.playBtnFunc=function(){console.log("\u53bb\u73a9\u6e38\u620f"),this.node.active=!1},e.prototype.showPop=function(t){var e=this;this.node.active=!0,this.firstLabel.node.scale=1,this.secondLabel.node.scale=1,this.showPopData=t,this.playBtn.active=!1,this.mainBtn.active=!1,this.exitBtn.active=!1,this.resetBtn.active=!1;var o=this.node.getChildByName("mask");o.opacity=0,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),this.titleLabel.string=c.default.instance.trans(r.GDLanguage.level_1,l.default.getUserData().playLevelId),this.timeSpineNode.getComponent(p.default).play("5Clock1",0);var n=l.default.getSprintRewardData();console.log("\u51b2\u523a\u5956\u52b1 = "+JSON.stringify(n));var a=n.winBox,i=n.rewardProgress,s=3*a;i>=3&&a>0?(s=3*(a-1),this.firstLabel.string=s+2+"",this.secondLabel.string=s+3+"",this.threeLabel.string=s+4+""):(this.firstLabel.string=s+1+"",this.secondLabel.string=s+2+"",this.threeLabel.string=s+3+""),this.firstLabel.node.active=!0,this.secondLabel.node.active=!0,this.threeLabel.node.active=!0,1==i||(2==i?e.firstLabel.node.active=!1:3==i&&(e.firstLabel.node.active=!1));var d={spineName:"2RichRoad0_0",standBy:!0};d=i<=0?this.getSpineNameWithStaydBy(!0):this.getSpineNameWithStaydBy(!h.default.getInstance().sprintMark);var f=c.default.instance.trans(r.GDLanguage.streak_award);0==this.showPopData.popType?(this.popNode.height=600,this.playBtn.active=!0,o.opacity=178):1==this.showPopData.popType?(this.popNode.height=600,this.exitBtn.active=!0,d=this.getSpineNameWithStaydBy(!0),f=c.default.instance.trans(r.GDLanguage.streak_lose)):2==this.showPopData.popType&&(this.popNode.height=700,this.resetBtn.active=!0,this.mainBtn.active=!0,d=this.getSpineNameWithStaydBy(!0),f=c.default.instance.trans(r.GDLanguage.streak_lose)),this.descLabel.string=f,this.spineNode.getComponent(p.default).setFrameEventCb("NoShow1",function(t){console.log("NoShow1 = "+t),e.updateProgressLabel(i)}),this.spineNode.getComponent(p.default).setFrameEventCb("Open2",function(t){console.log("Open2 = "+t),e.particleNode.getComponent(cc.ParticleSystem).resetSystem(),e.particleNode.getChildByName("Star0").getComponent(cc.ParticleSystem).resetSystem(),e.particleNode.getChildByName("Star1").getComponent(cc.ParticleSystem).resetSystem()});var m=d.spineName,g=d.standBy;console.log("spineDict",m,g),g?(e.updateProgressLabel(i),this.spineNode.getComponent(p.default).play(m,0,function(){})):this.spineNode.getComponent(p.default).play(m,1,function(){m+="_1",console.log("\u5f85\u673a "+m),e.spineNode.getComponent(p.default).play(m,0,function(){})}),h.default.getInstance().sprintMark=!1,0==this.showPopData.popType&&cc.game.emit(u.EMITKEY.MAINUPDATEUI)},e.prototype.updateProgressLabel=function(t){1==t?this.firstLabel.node.active=!1:2==t?this.secondLabel.node.active=!1:3==t&&(this.secondLabel.node.active=!1)},e.prototype.getSpineNameWithStaydBy=function(t){var e=l.default.getSprintRewardData(),o=e.winBox,n=e.rewardProgress,a=o<=0?1:o+1;a=a>=5?5:a,n>=3&&a>1&&a<=5&&(a-=1);var i=n<=0?1:n>=3?3:n,r="2RichRoad"+a+"_"+(t?i+"_1":i);return 0==n&&(r="2RichRoad0_0"),{spineName:r,standBy:t}},i([g(cc.Node)],e.prototype,"popNode",void 0),i([g(cc.Node)],e.prototype,"closeBtn",void 0),i([g(cc.Label)],e.prototype,"titleLabel",void 0),i([g(cc.Node)],e.prototype,"spineNode",void 0),i([g(cc.Node)],e.prototype,"timeSpineNode",void 0),i([g(cc.Label)],e.prototype,"descLabel",void 0),i([g(cc.Node)],e.prototype,"playBtn",void 0),i([g(cc.Label)],e.prototype,"timeLabel",void 0),i([g(cc.Node)],e.prototype,"exitBtn",void 0),i([g(cc.Node)],e.prototype,"resetBtn",void 0),i([g(cc.Node)],e.prototype,"mainBtn",void 0),i([g(cc.Label)],e.prototype,"playLabel",void 0),i([g(cc.Label)],e.prototype,"exitLabel",void 0),i([g(cc.Label)],e.prototype,"restartLabel",void 0),i([g(cc.Label)],e.prototype,"mainLabel",void 0),i([g(cc.Label)],e.prototype,"firstLabel",void 0),i([g(cc.Label)],e.prototype,"secondLabel",void 0),i([g(cc.Label)],e.prototype,"threeLabel",void 0),i([g(cc.Node)],e.prototype,"particleNode",void 0),i([m],e)}(cc.Component);o.default=y,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/spine":"spine","../common/util":"util","../manager/GameManager":"GameManager"}],stagePop:[function(t,e,o){"use strict";cc._RF.push(e,"7537cBSDCRLP5ZtoGd5R7fy","stagePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/spine"),s=t("../common/util"),l=t("../manager/DateManager"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.popNode=null,e.closeBtn=null,e.titleLabel=null,e.spNode=null,e.headerNode=null,e.manNode=null,e.womanNode=null,e.userName=null,e.userAddress=null,e.topTimeLabel=null,e.lTimeLabel=null,e.timeLabel=null,e.rTimeLabel=null,e.noKingNode=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.mask,this.closeBtnFunc.bind(this)),r.default.addbtnTouchStartScale(this.closeBtn),r.default.addbtnTouchEndScale(this.closeBtn,this.closeBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.closeBtn)},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.showPop=function(t){var e=this;this.node.active=!0,this.showPopData=t;var o=t.idx;cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start();var n="",a="",i="",r="",s="",u="",p="default";1==o?(n="\u5168\u56fd\u9886\u5934\u7f8a",i="\u4e8e\u6628\u65e5",r="\u9996\u4e2a\u901a\u5173",s="sheep/Alpaca01",u="animation"):2==o?(n="\u673a\u667a\u7267\u7f8a\u72ac",a="\u4e8e\u6628\u65e5\u5728\u4e0d\u4f7f\u7528\u9053\u5177\u548c\u590d\u6d3b\u7684\u60c5",i="\u51b5\u4e0b\u4ec5\u7528",r="\u901a\u5173",s="sheep/DJ1",u="Jump2",p="00"):3==o&&(n="\u79cb\u540d\u5c71\u7f8a\u795e",i="\u4e8e\u6628\u65e5\u4ec5\u7528",r="\u901a\u5173",s="sheep/Alpaca02",u="animation"),this.spNode.getComponent(c.default).loadSpine(s,function(){e.spNode.getComponent(c.default).setNewSkin(p),e.spNode.getComponent(c.default).play(u,0)}),this.titleLabel.string=n,this.topTimeLabel.string=a,this.lTimeLabel.string=i,this.rTimeLabel.string=r;var d=this.showPopData.stageInfo;if(1==o&&d.firstWin&&d.firstWin.nick_name&&d.firstWin.nick_name.length){console.log(JSON.stringify(d.firstWin));var h=this.getTimeDate(d.firstWin.ts),f=l.default.getInstance().formatTs(d.firstWin.ts);this.timeLabel.string=f[3]+":"+f[4]+":"+f[5],this.updateInfo(d.firstWin)}this.noKingNode.active=!1,2==o&&d.iqWin&&d.iqWin.nick_name&&d.iqWin.nick_name.length?(console.log(JSON.stringify(d.iqWin)),h=this.getTimeDate(d.iqWin.time),this.timeLabel.string=h[1]+"\u5206"+h[2]+"\u79d2",this.updateInfo(d.iqWin)):2==o&&(this.noKingNode.active=!0,this.titleLabel.string="\u6700\u5f3a\u738b\u8005",console.log("\u6700\u5f3a\u738b\u8005")),3==o&&d.timeWin&&d.timeWin.nick_name&&d.timeWin.nick_name.length&&(console.log(JSON.stringify(d.timeWin)),h=this.getTimeDate(d.timeWin.time),this.timeLabel.string=h[1]+"\u5206"+h[2]+"\u79d2",this.updateInfo(d.timeWin))},e.prototype.updateInfo=function(t){r.default.setAvatar(this.headerNode,t.avatar),this.userName.getComponent(cc.Label).string=t.nick_name,this.userAddress.getComponent(cc.Label).string=t.city,0==t.gender?this.manNode.active=!0:this.manNode.active=!1},e.prototype.getTimeDate=function(t){var e=s.default.countdownTime(t);return[e[0]<10?"0"+e[0]:e[0]+"",e[1]<10?"0"+e[1]:e[1]+"",e[2]<10?"0"+e[2]:e[2]+""]},i([d(cc.Node)],e.prototype,"mask",void 0),i([d(cc.Node)],e.prototype,"popNode",void 0),i([d(cc.Node)],e.prototype,"closeBtn",void 0),i([d(cc.Label)],e.prototype,"titleLabel",void 0),i([d(cc.Node)],e.prototype,"spNode",void 0),i([d(cc.Node)],e.prototype,"headerNode",void 0),i([d(cc.Node)],e.prototype,"manNode",void 0),i([d(cc.Node)],e.prototype,"womanNode",void 0),i([d(cc.Label)],e.prototype,"userName",void 0),i([d(cc.Label)],e.prototype,"userAddress",void 0),i([d(cc.Label)],e.prototype,"topTimeLabel",void 0),i([d(cc.Label)],e.prototype,"lTimeLabel",void 0),i([d(cc.Label)],e.prototype,"timeLabel",void 0),i([d(cc.Label)],e.prototype,"rTimeLabel",void 0),i([d({type:cc.Node,tooltip:"\u6700\u5f3a\u738b\u8005"})],e.prototype,"noKingNode",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/spine":"spine","../common/util":"util","../manager/DateManager":"DateManager"}],"str-utils":[function(t,e,o){"use strict";cc._RF.push(e,"622d8ysQvVFXaRZmKMfNXEC","str-utils"),Object.defineProperty(o,"__esModule",{value:!0});var n=function(){function t(){}return t.formatStr=function(t){for(var e=[],o=1;o0)for(var n=0;n>6|192,63&r|128):String.fromCharCode(r>>12|224,r>>6&63|128,63&r|128),null!==c&&(n>18&63,o=a>>12&63,n=a>>6&63,a&=63,u[s++]=i.charAt(e)+i.charAt(o)+i.charAt(n)+i.charAt(a),c=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../pre/main/flying-item-pop-coin"),c=t("../activity/main/main-cookie-reward"),s=t("../common/dataTs"),l=t("../common/enumConfig"),u=t("../manager/GameManager"),p=cc._decorator,d=p.ccclass,h=p.property,f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.coinNumLabel=null,e.flyCoinNode=null,e.topCoinNode=null,e.cookieReward=null,e.moneyData=null,e}return a(e,t),e.prototype.start=function(){cc.game.on(l.EMITKEY.MAINUPDATEUI,this.setMainLayerData,this),this.setMainLayerData()},e.prototype.setMainLayerData=function(){console.log("topUiLayer MAINUPDATEUI");var t=s.default.getUserData();u.default.getInstance().moneyDict,u.default.getInstance().cookieDict,this.coinNumLabel.string=t.coin+"",this.checkCoinOrFish()},e.prototype.getFlyTime=function(t,e,o){var n=o;return Math.sqrt((n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y))/t},e.prototype.updatenNumberAnim=function(t,e,o){var n={num:e},a=t.getComponent(cc.Label);a.string=n.num+"",console.log((o-e)/10);var i=o-e<10?.3:(o-e)/10*.3;i>1&&(i=1),cc.tween(n).to(i,{num:o},{progress:function(t,e,o,n){return a.string=Math.ceil(t+(e-t)*n)+"",t+(e-t)*n}}).start()},e.prototype.checkCoinOrFish=function(){console.log("checkCoinOrFish moneyDict",u.default.getInstance().moneyDict),console.log("checkCoinOrFish cookieDict",u.default.getInstance().cookieDict),this.moneyData=u.default.getInstance().moneyDict;var t=this.moneyData.coin,e=(this.moneyData.fish,u.default.getInstance().cookieDict.cookie),o=s.default.getUserData();this.coinNumLabel.string=o.coin-t+"",t>0?this.flyCoinFunc():e>0&&this.flyCookieFunc()},e.prototype.flyCoinFunc=function(){console.log("flyCoinFunc"),cc.game.emit(l.EMITKEY.SHOWMASKLAYER,7);var t=this,e={firstCallBack:function(){console.log("\u91d1\u5e01\u5f00\u59cb\u98de\u884c");var e=u.default.getInstance().moneyDict.coin,o=s.default.getUserData();t.updatenNumberAnim(t.coinNumLabel.node,o.coin-e,o.coin)},callBack:function(){console.log("\u91d1\u5e01\u98de\u884c\u7ed3\u675f"),u.default.getInstance().moneyDict.coin=0,t.flyCoinNode.active=!1,cc.game.emit(l.EMITKEY.HIDEMASKLAYER,12),u.default.getInstance().cookieDict.cookie>0&&t.flyCookieFunc()}};this.flyCoinNode.active=!0,this.flyCoinNode.getComponent(r.default).flyTo(this.topCoinNode,e)},e.prototype.flyCookieFunc=function(){s.default.getUserData().playLevelId<17||(console.log("flyCookieFunc"),cc.game.emit(l.EMITKEY.SHOWMASKLAYER,7),this.cookieReward.getComponent(c.default).checkCookie(function(){cc.game.emit(l.EMITKEY.HIDEMASKLAYER,12),console.log("\u83b7\u53d6\u997c\u5e72\u52a8\u753b\u5b8c\u6bd5 ###")}))},e.prototype.getWorldPosition=function(t){return t.convertToWorldSpaceAR(cc.v2(0,0))},e.prototype.getNodePosition=function(t,e){return t.convertToNodeSpaceAR(e)},i([h(cc.Label)],e.prototype,"coinNumLabel",void 0),i([h(cc.Node)],e.prototype,"flyCoinNode",void 0),i([h(cc.Node)],e.prototype,"topCoinNode",void 0),i([h(cc.Node)],e.prototype,"cookieReward",void 0),i([d],e)}(cc.Component);o.default=f,cc._RF.pop()},{"../../pre/main/flying-item-pop-coin":"flying-item-pop-coin","../activity/main/main-cookie-reward":"main-cookie-reward","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../manager/GameManager":"GameManager"}],"topic-card-node":[function(t,e,o){"use strict";cc._RF.push(e,"1be56R1zVlJqa9MONuCRdDg","topic-card-node");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.iconHeader=null,e.purpleNode=null,e.blueNode=null,e.nickNameNode=null,e.cityNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showData=function(t){var e=this;t?(this.node.stopAllActions(),this.node.active=!0,cc.tween(this.node).delay(3).call(function(){e.node.active=!1},this).start(),t.gender?1==t.gender?(this.purpleNode.active=!1,this.blueNode.active=!0):2==t.gender?(this.purpleNode.active=!0,this.blueNode.active=!1):(this.purpleNode.active=!1,this.blueNode.active=!0):(this.purpleNode.active=!1,this.blueNode.active=!0),t.nick_name?this.nickNameNode.getComponent(cc.Label).string=t.nick_name:this.nickNameNode.getComponent(cc.Label).string="",t.city?this.cityNode.getComponent(cc.Label).string=t.city:this.cityNode.getComponent(cc.Label).string="",r.default.setAvatar(this.iconHeader,t.avatar)):this.node.active=!1},i([l(cc.Node)],e.prototype,"iconHeader",void 0),i([l(cc.Node)],e.prototype,"purpleNode",void 0),i([l(cc.Node)],e.prototype,"blueNode",void 0),i([l(cc.Node)],e.prototype,"nickNameNode",void 0),i([l(cc.Node)],e.prototype,"cityNode",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../../script/common/CcJsFunc":"CcJsFunc"}],"topic-header-node":[function(t,e,o){"use strict";cc._RF.push(e,"bf959UaKZ5L25ZRO1LSyISJ","topic-header-node");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../../script/api/api-sheep"),c=t("../../../script/common/CcJsFunc"),s=t("../../../script/common/dataTs"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.manHeader=null,e.womanHeader=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showData=function(t){var e=this;if(this.womanHeader.opacity=0,this.manHeader.opacity=255,t==s.default.getUserData().userID)r.default.getTopicUserInfo(t,function(t){0==t.err_code&&t.data&&t.data.user&&c.default.setAvatar(e.manHeader,t.data.user.avatar)});else{var o="localHeader/header_"+c.default.randomNum(1,200);c.default.changeSpriteFrame(this.manHeader,o)}},i([p(cc.Node)],e.prototype,"manHeader",void 0),i([p(cc.Node)],e.prototype,"womanHeader",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../../../script/api/api-sheep":"api-sheep","../../../script/common/CcJsFunc":"CcJsFunc","../../../script/common/dataTs":"dataTs"}],"topic-rank":[function(t,e,o){"use strict";cc._RF.push(e,"e59f1N9al1CCKpf6SOs72TQ","topic-rank");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=2&&(e=2);var o=this.userIdx>4?100*(this.userIdx-5):0;cc.tween(this.node).to(e,{y:this.contentY-o},{easing:cc.easing.cubicOut}).call(function(){if(t.scrollToPosition=!1,t.curSheepNode)if(1==h.default.getInstance().game_over)h.default.getInstance().game_over=0,t.curSheepNode.getComponent(m.default).playFlashAnimation();else{var e=t.curSheepNode.getComponent(m.default).getUserID();s.default.getTopicUserInfo(e,function(e){0==e.err_code&&e.data&&e.data.user&&t.showCardNode(t.curSheepNode.x,t.curSheepNode.y+150,e.data.user)})}},this).start()},e.prototype.onEnable=function(){this.requestData()},e.prototype.onDisable=function(){if(this.topicRankModel){var t={a_team_win:this.topicRankModel.tomb.length,b_team_win:this.topicRankModel.taoist.length,a_team_fail:this.topicRankModel.tomb_fail_member,b_team_fail:this.topicRankModel.taoist_fail_member};b.default.reportTACommon("topic_team",t)}},e.prototype.requestData=function(){return r(this,void 0,void 0,function(){var t;return c(this,function(e){switch(e.label){case 0:return t=this,h.default.getInstance().game_over>0?[4,s.default.getTopicData(function(){})]:[3,2];case 1:e.sent(),e.label=2;case 2:return[4,s.default.topicRankInfo(function(e){t.topicRankModel=e.data})];case 3:return e.sent(),d.default.topicModel&&d.default.topicModel.info&&0!=d.default.topicModel.info.type||s.default.getTopicData(function(){}),this.setupSubviews(),[2]}})})},e.prototype.setupSubviews=function(){var t=this,e=this;if(this.topicRankModel){var o=this.topicRankModel.tomb,n=this.topicRankModel.taoist;o||(o=[]),n||(n=[]);var a;a=o.length>=n.length?o.length:n.length;var i=(cc.winSize.height-cc.winSize.width)/2;if(this.node.height=cc.winSize.height+100*Math.floor(a/3),this.node.height<1.5*cc.winSize.height&&(this.node.height=1.5*cc.winSize.height),this.marginH=(this.node.height-cc.winSize.height)/2,this.node.y=this.marginH,this.contentY=this.node.y,console.log("\u6392\u884c\u699c\u9ad8\u5ea6 = ",this.node.height,i,this.marginH),this.setupSheep(o,n),this.tombDeadLabel.string=d.default.topicRankInfo.tomb_fail_member,this.taoistDeadLabel.string=d.default.topicRankInfo.taoist_fail_member,setTimeout(function(){if(t.tombScrollMsg&&t.toaistScrollMsg){var a="\u4eca\u65e5\u6311\u6218 "+(d.default.topicRankInfo.tomb_fail_member+o.length)+" \u7f8a\uff0c\u901a\u5173 "+o.length+" \u7f8a";e.tombScrollMsg.getComponent(f.default).showMsg({msg:a});var i="\u4eca\u65e5\u6311\u6218 "+(d.default.topicRankInfo.taoist_fail_member+n.length)+" \u7f8a\uff0c\u901a\u5173 "+n.length+" \u7f8a";e.toaistScrollMsg.getComponent(f.default).showMsg({msg:i})}},1e3),1==h.default.getInstance().game_over){var r=o.length>=500||n.length>=500?2:1;setTimeout(function(){t.scrollToPosition=!0,t.topicPositionFunc()},1e3*r)}}},e.prototype.setAnimationSub=function(t,e){this.BGSP.getComponent(p.default).play("Stage2",0),this.spotSP.getComponent(p.default).play("0Spotlight",0);var o;o=t.length>=e.length?"sheep/DJ1":"sheep/DJ2",1==d.default.topicModel.id?this.playDJAnimation(o,"The01","Jump2"):2==d.default.topicModel.id?this.playDJAnimation(o,"The02","Jump2"):3==d.default.topicModel.id?this.playDJAnimation(o,"The03","Jump2"):this.playDJAnimation(o,"00","Jump2");var n=d.default.getJudgeAnimation(d.default.topicModel.id,!0,!1);this.playTombAnimation(n.spName,n.anim);var a=d.default.getJudgeAnimation(d.default.topicModel.id,!1,!0);this.playTaoistAnimation(a.spName,a.anim)},e.prototype.playDJAnimation=function(t,e,o){var n=this;this.DJSP.zIndex=10,this.DJSP.getComponent(p.default).loadSpine(t,function(){n.DJSP.getComponent(p.default).setNewSkin(e),n.DJSP.getComponent(p.default).play(o,0)})},e.prototype.playTombAnimation=function(t,e){var o=this;this.tombSP.getComponent(p.default).loadSpine(t,function(){o.tombSP.getComponent(p.default).play(e,0)})},e.prototype.playTaoistAnimation=function(t,e){var o=this;this.toaistSP.getComponent(p.default).loadSpine(t,function(){o.toaistSP.getComponent(p.default).play(e,0)})},e.prototype.setupSheep=function(t,e){var o=this;for(var n in this.sheepArray)this.sheepArray[n].destroy();this.sheepArray=[],this.userID=u.default.getUserData().userID;for(var a=function(n){setTimeout(function(){o.createSheepNode(n,t,e,!0)},1*n)},i=0;i300)){var a=this,i=cc.instantiate(this.sheepNode);i.opacity=0,this.sheepNodeBase.addChild(i),this.sheepArray.push(i);var r=Math.floor(t/3),c=Math.floor(t%3),s=-this.marginH-cc.winSize.height/2+550+90*r,l=0,u=n?1:-1;l=r%2==0?-cc.winSize.width/2+100*c+100:-cc.winSize.width/2+100*c+80,l*=u,i.x=l,i.y=s,i.scaleX=n?1:-1,i.setSiblingIndex(3*r);var p;(p=n?e[t]:o[t])==this.userID&&(this.userIdx=r,this.curSheepNode=i,1==h.default.getInstance().game_over&&this.curSheepNode&&(this.curSheepNode.active=!1),console.log("\u627e\u5230\u4e86\u7528\u6237id ###### taoistData ",p,r)),i.getComponent(m.default).showData(p,n,function(t){a.showCardNode(i.x,i.y+150,t)});var d=cc.instantiate(this.headerNode);d.opacity=0,d.x=l,d.y=s,this.headerNodeBase.addChild(d),this.sheepArray.push(d),d.getComponent(g.default).showData(p)}},e.prototype.showCardNode=function(t,e,o){var n=this;this.cardNode.stopAllActions(),this.cardNode.x=t,this.cardNode.y=e,this.cardNode.getComponent(y.default).showData(o),cc.tween(this.cardNode).to(0,{opacity:255}).delay(2).call(function(){n.cardNode.opacity=0}).start()},e.prototype.moveActionFunc=function(t){this.node.height=this.marginH?this.node.y=this.marginH:this.node.y<=-this.marginH&&(this.node.y=-this.marginH),this.isMoving=!0)},e.prototype.moveActionEndFunc=function(){this.isMoving=!1},e.prototype.update=function(){(this.isMoving||this.scrollToPosition)&&this.showOrHide()},e.prototype.showOrHide=function(){for(var t=0;t=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../../script/api/api-sheep"),c=t("../../../script/common/CcJsFunc"),s=t("../../../script/common/dataTs"),l=t("../../../script/common/spine"),u=t("../../../script/manager/data-manager"),p=cc._decorator,d=p.ccclass,h=p.property,f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.flashNode=null,e.sheepSp=null,e.clickNode=null,e.userID=0,e.clickCallback=null,e.userData=null,e}return a(e,t),e.prototype.start=function(){c.default.addTargetTouchUpInside(this.clickNode,this.clickNodeFunc.bind(this))},e.prototype.clickNodeFunc=function(){var t=this;this.userData?t.clickCallback&&t.clickCallback(this.userData):r.default.getTopicUserInfo(this.userID,function(e){0==e.err_code&&e.data&&e.data.user&&(t.userData=e.data.user,t.clickCallback&&t.clickCallback(e.data.user))})},e.prototype.getUserID=function(){return this.userID},e.prototype.playFlashAnimation=function(){var t=this;this.node.active=!0,this.sheepSp.getComponent(l.default).play("Drop1",1,function(){t.flashNode.active=!0,t.flashNode.getComponent(l.default).play("3Ray1",1,function(){t.flashNode.active=!1,s.default.isPlatform(s.GDPlatform.tt)&&t.showSharePop()}),t.sheepSp.getComponent(l.default).play("Jump3",0)})},e.prototype.showSharePop=function(){cc.game.emit("showPop",{popName:"shareNodePop",showPopData:{type:1}})},e.prototype.showData=function(t,e,o){if(this.userID=t,this.clickCallback=o,u.default.topicModel)if(e){var n=u.default.getTopicAnimation(u.default.topicModel.id,!0,!1);this.playTomb(n.spName,n.skin,"Jump3")}else n=u.default.getTopicAnimation(u.default.topicModel.id,!1,!0),this.playTaoist(n.spName,n.skin,"Jump3")},e.prototype.playTomb=function(t,e,o){var n=this;this.sheepSp.getComponent(l.default).loadSpine(t,function(){n.sheepSp.getComponent(l.default).setNewSkin(e),n.sheepSp.getComponent(l.default).play(o,0)})},e.prototype.playTaoist=function(t,e,o){var n=this;this.sheepSp.getComponent(l.default).loadSpine(t,function(){n.sheepSp.getComponent(l.default).setNewSkin(e),n.sheepSp.getComponent(l.default).play(o,0)})},i([h(cc.Node)],e.prototype,"flashNode",void 0),i([h(cc.Node)],e.prototype,"sheepSp",void 0),i([h(cc.Node)],e.prototype,"clickNode",void 0),i([d],e)}(cc.Component);o.default=f,cc._RF.pop()},{"../../../script/api/api-sheep":"api-sheep","../../../script/common/CcJsFunc":"CcJsFunc","../../../script/common/dataTs":"dataTs","../../../script/common/spine":"spine","../../../script/manager/data-manager":"data-manager"}],"topic-ui-layer":[function(t,e,o){"use strict";cc._RF.push(e,"41174iuu2NIQJJDkdlO9Oyh","topic-ui-layer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../common/CcJsFunc"),c=t("../../common/enumConfig"),s=t("../../common/native/audio"),l=t("../../common/util"),u=t("../../manager/data-manager"),p=t("../../manager/DateManager"),d=t("../../manager/GameManager"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pointBtn=null,e.settingBtn=null,e.backBtn=null,e.playBtn=null,e.locationBtn=null,e.timeNode=null,e.timeLabel=null,e.tombLabel=null,e.taoistLabel=null,e.tombNumLabel=null,e.taoistNumLabel=null,e.vsProgress=null,e.beginButtonDuration=0,e.updateTime=0,e}return a(e,t),e.prototype.start=function(){cc.game.on(c.EMITKEY.TOPICACCOUNT,this.topicAccountFunc,this),cc.game.on(c.EMITKEY.TOPICRANKINFO,this.topicRankInfoFunc,this),r.default.addTargetTouchUpInside(this.pointBtn,this.pointBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.settingBtn,this.settingBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.backBtn,this.backBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.playBtn,this.playBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.locationBtn,this.locationBtnFunc.bind(this)),this.updateTimeFunc()},e.prototype.onEnable=function(){this.topicAccountFunc(),this.topicRankInfoFunc()},e.prototype.topicAccountFunc=function(){if(console.log("TOPICACCOUNT \u901a\u77e5 = ",JSON.stringify(u.default.topicModel)),u.default.topicModel){this.timeNode.active=!1;var t=u.default.topicModel.name.split("#");t.length<2||(this.tombLabel.string=t[0],this.taoistLabel.string=t[1])}},e.prototype.topicRankInfoFunc=function(){if(console.log("TOPICRANKINFO \u901a\u77e5 ######"),u.default.topicRankInfo){var t=u.default.topicRankInfo.tomb,e=u.default.topicRankInfo.taoist;if(t||(t=[]),e||(e=[]),console.log("topicRankInfoFunc ",t.length,"---",e.length),this.tombNumLabel.string=t.length+"\u7f8a",this.taoistNumLabel.string=e.length+"\u7f8a",t.length==e.length?(this.tombLabel.fontSize=90,this.taoistLabel.fontSize=90):t.length>e.length?(this.tombLabel.fontSize=90,this.taoistLabel.fontSize=60):(this.tombLabel.fontSize=60,this.taoistLabel.fontSize=90),0==t.length&&0==e.length)this.vsProgress.fillStart=.5;else if(0==t.length)this.vsProgress.fillStart=0;else if(0==e.length)this.vsProgress.fillStart=1;else if(t.length>0&&e.length>0){var o=t.length/(t.length+e.length);this.vsProgress.fillStart=o}this.locationBtn.active=!1;var n=this.playBtn.getChildByName("label").getComponent(cc.Label),a=this.isWin();console.log("winNum ###### = ",a),1==a?(n.string="\u5df2\u52a0\u5165\u7f8a\u7fa4",this.timeNode.active=!0,this.locationBtn.active=!0):n.string=0==a?"\u518d\u6b21\u6311\u6218":"\u52a0\u5165\u7f8a\u7fa4"}},e.prototype.isWin=function(){if(u.default.topicModel&&u.default.topicModel.info){if(1==u.default.topicModel.info.state)return 1;if(2==u.default.topicModel.info.state)return 0}return-1},e.prototype.pointBtnFunc=function(){console.log("\u63d0\u793a"),this.showChoosePop(1)},e.prototype.settingBtnFunc=function(){console.log("\u8bbe\u7f6e"),cc.game.emit("showPop",{popName:"setupPop",showPopData:{}})},e.prototype.backBtnFunc=function(){console.log("\u8fd4\u56de"),cc.game.emit(c.EMITKEY.SHOWTRANSITLAYER,function(){cc.game.emit(c.EMITKEY.SHOWMODULE,c.MODULETYPE.COMMON)})},e.prototype.playBtnFunc=function(){console.log("\u5f00\u59cb\u6e38\u620f"),this.chooseCallbackFunc()},e.prototype.showChoosePop=function(t){var e={popName:"topicChoosePop",showPopData:{type:t,chooseCallback:this.chooseCallbackFunc.bind(this)}};cc.game.emit("showPop",e)},e.prototype.chooseCallbackFunc=function(){if(this.beginButtonDuration>=1){this.beginButtonDuration=0;var t=this.isWin();if(console.log("winNum ###### = ",t),1==t)return void cc.game.emit(c.EMITKEY.SHOWMAINTIPS,"\u6bcf\u65e5\u4e00\u5173\uff0c\u4eca\u5929\u5df2\u6311\u6218\u6210\u529f");d.default.setGameType(c.GAMETYPE.GAMETOPIC),s.default.playBGM(),cc.game.emit(c.EMITKEY.BEGINGAME)}else console.log("\u4e0d\u80fd\u8fde\u7eed\u70b9\u51fb")},e.prototype.locationBtnFunc=function(){console.log("\u5b9a\u4f4d"),cc.game.emit(c.EMITKEY.TOPICPOSITION)},e.prototype.update=function(t){this.beginButtonDuration+=t,this.updateTime+=t,this.updateTime>=1&&(this.updateTime=0,this.updateTimeFunc())},e.prototype.updateTimeFunc=function(){var t=p.default.format(c.CALENDARNAMES[8],new Date).split(" ");if(!(t.length<2)){var e=t[1].split(":");if(!(e.length<3)){var o=3600*(24-Number(e[0])-1)+60*(60-Number(e[1])-1)+(60-Number(e[2]));if(this.timeNode.activeInHierarchy){var n=l.default.formatTime(1e3*o),a=(n[1]<10?"0"+n[1]:n[1])+":"+(n[2]<10?"0"+n[2]:n[2])+":"+(n[3]<10?"0"+n[3]:n[3])+" \u91cd\u7f6e";this.timeLabel.string=a}}}},i([m({type:cc.Node,tooltip:"\u63d0\u793a"})],e.prototype,"pointBtn",void 0),i([m({type:cc.Node,tooltip:"\u8bbe\u7f6e"})],e.prototype,"settingBtn",void 0),i([m({type:cc.Node,tooltip:"\u8fd4\u56de"})],e.prototype,"backBtn",void 0),i([m({type:cc.Node,tooltip:"\u5f00\u59cb\u6e38\u620f"})],e.prototype,"playBtn",void 0),i([m({type:cc.Node,tooltip:"\u5b9a\u4f4d"})],e.prototype,"locationBtn",void 0),i([m({type:cc.Node,tooltip:"\u5012\u8ba1\u65f6"})],e.prototype,"timeNode",void 0),i([m({type:cc.Label,tooltip:"\u5012\u8ba1\u65f6"})],e.prototype,"timeLabel",void 0),i([m({type:cc.Label,tooltip:"\u50f5\u5c38"})],e.prototype,"tombLabel",void 0),i([m({type:cc.Label,tooltip:"\u9053\u58eb"})],e.prototype,"taoistLabel",void 0),i([m({type:cc.Label,tooltip:"\u50f5\u5c38\u6570\u91cf"})],e.prototype,"tombNumLabel",void 0),i([m({type:cc.Label,tooltip:"\u9053\u58eb\u6570\u91cf"})],e.prototype,"taoistNumLabel",void 0),i([m({type:cc.Sprite,tooltip:"vs\u8fdb\u5ea6"})],e.prototype,"vsProgress",void 0),i([f],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../common/CcJsFunc":"CcJsFunc","../../common/enumConfig":"enumConfig","../../common/native/audio":"audio","../../common/util":"util","../../manager/DateManager":"DateManager","../../manager/GameManager":"GameManager","../../manager/data-manager":"data-manager"}],"topic-ui":[function(t,e,o){"use strict";cc._RF.push(e,"8fa33VO+JBKg6ZJbHIXKnoL","topic-ui");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../common/dataTs"),c=t("../../common/enumConfig"),s=t("../../common/native/audio"),l=t("../../manager/GameManager"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.rankNode=null,e.uiLayer=null,e.beginBGM=!1,e}return a(e,t),e.prototype.onEnable=function(){l.default.setGameType(c.GAMETYPE.GAMETOMB),this.playGameBgMusic()},e.prototype.start=function(){},e.prototype.playGameBgMusic=function(){if(r.default.getUserSetupData().musicStatus<0)cc.audioEngine.stopAll();else if(0==this.beginBGM){var t=this;cc.loader.loadRes("audio/music/game_begin.mp3",function(e,o){var n=cc.audioEngine.playMusic(o,!1);cc.audioEngine.getCurrentTime(n),cc.audioEngine.getDuration(n),cc.audioEngine.setFinishCallback(n,function(){t.beginBGM=!0,console.log("\u64ad\u653e\u5b8c\u6210\u8fdb\u573a\u97f3\u4e50 ###### "),t.playBg()})})}else this.playBg()},e.prototype.playBg=function(){s.default.playBGM()},i([d({type:cc.Node,tooltip:"\u6392\u884c\u699c"})],e.prototype,"rankNode",void 0),i([d({type:cc.Node,tooltip:"UI"})],e.prototype,"uiLayer",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig","../../common/native/audio":"audio","../../manager/GameManager":"GameManager"}],topicChoosePop:[function(t,e,o){"use strict";cc._RF.push(e,"db225EuZZ1H86t8bfP+ErU1","topicChoosePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/enumConfig"),u=t("../common/sdk"),p=t("../common/spine"),d=t("../common/util"),h=t("../manager/data-manager"),f=t("../manager/DateManager"),m=cc._decorator,g=m.ccclass,y=m.property,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.titleNode=null,e.closeBtn=null,e.yellowNode=null,e.redNode=null,e.yellowBtn=null,e.redBtn=null,e.timeNode=null,e.chooseBtn=null,e.chooseVideo=null,e.chooseLabel=null,e.noChooseBtn=null,e.giveupBtn=null,e.tombName=null,e.taoistName=null,e.tombSP=null,e.taoistSP=null,e.timeLabel=null,e.popData=null,e.topicType=0,e.updateTime=0,e}return a(e,t),e.prototype.start=function(){c.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this)),c.default.addTargetTouchUpInside(this.yellowNode,this.yellowNodeFunc.bind(this)),c.default.addTargetTouchUpInside(this.redNode,this.redNodeFunc.bind(this)),c.default.addTargetTouchUpInside(this.chooseBtn,this.chooseBtnFunc.bind(this)),c.default.addTargetTouchUpInside(this.giveupBtn,this.giveupBtnFunc.bind(this))},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.yellowNodeFunc=function(){this.topicType=1,console.log("topicType = ",this.topicType),this.popData&&1==this.popData.type||this.exchangeUI(!0)},e.prototype.redNodeFunc=function(){this.topicType=2,console.log("topicType = ",this.topicType),this.popData&&1==this.popData.type||this.exchangeUI(!1)},e.prototype.exchangeUI=function(t,e){if(void 0===e&&(e=!1),this.noChooseBtn.active=!1,h.default.topicModel&&h.default.topicModel.name){var o=h.default.topicModel.name.split("#");if(!(o.length<2))if(this.yellowBtn.active=!0,this.redBtn.active=!0,t){this.chooseLabel.string="\u52a0\u5165"+o[0]+"\u7f8a",this.yellowNode.getChildByName("choose").active=!0,this.redNode.getChildByName("choose").active=!1,this.yellowBtn.getChildByName("name").color=(new cc.Color).fromHEX("#FBE547"),this.redBtn.getChildByName("name").color=(new cc.Color).fromHEX("#FFFFFF"),this.redBtn.getChildByName("name").getComponent(cc.Label).string="\u9009\u62e9",this.redBtn.active=!e;var n=e?"\u5df2\u52a0\u5165":"\u5df2\u9009\u62e9";this.yellowBtn.getChildByName("name").getComponent(cc.Label).string=n}else this.chooseLabel.string="\u52a0\u5165"+o[1]+"\u7f8a",this.yellowNode.getChildByName("choose").active=!1,this.redNode.getChildByName("choose").active=!0,this.yellowBtn.getChildByName("name").color=(new cc.Color).fromHEX("#FFFFFF"),this.redBtn.getChildByName("name").color=(new cc.Color).fromHEX("#FBE547"),this.yellowBtn.getChildByName("name").getComponent(cc.Label).string="\u9009\u62e9",this.yellowBtn.active=!e,n=e?"\u5df2\u52a0\u5165":"\u5df2\u9009\u62e9",this.redBtn.getChildByName("name").getComponent(cc.Label).string=n}},e.prototype.chooseBtnFunc=function(){if(0==this.topicType){if(this.yellowBtn.stopAllActions(),this.redBtn.stopAllActions(),cc.tween(this.yellowBtn).to(.2,{scale:1.5}).to(.2,{scale:1}).start(),cc.tween(this.redBtn).to(.2,{scale:1.5}).to(.2,{scale:1}).start(),!h.default.topicModel)return void cc.game.emit(l.EMITKEY.SHOWMAINTIPS,"\u8bf7\u9009\u62e9\u4f60\u7684\u9635\u8425");h.default.topicModel.tombh.default.topicModel.taoist?this.topicType=2:this.topicType=c.default.randomNum(1,2)}if(1!=h.default.todayIsWin()){var t=this;if(u.default.isPlatform(u.Platform.wx)){var e=s.default.GetVedioID(),o=s.default.getUserData().openid;u.default.share(o,e,function(){t.addTopicMethod()},function(){cc.game.emit(l.EMITKEY.SHOWMAINTIPS,"\u5206\u4eab\u5931\u8d25\uff0c\u8bf7\u5206\u4eab\u5fae\u4fe1\u7fa4\u4e0e\u597d\u53cbPK")})}else u.default.watchAdVideo({id:s.default.GetVedioID(),success:function(){console.log("\u89c6\u9891\u64ad\u653e\u6210\u529f ###### "),t.addTopicMethod()},fail:function(){console.log("\u5931\u8d25")},nofit:function(){}})}else this.addTopicMethod()},e.prototype.addTopicMethod=function(){this.requestData(),this.node.active=!1,this.popData&&this.popData.chooseCallback&&this.popData.chooseCallback()},e.prototype.requestData=function(){var t={type:this.topicType};console.log("\u52a0\u5165\u8bdd\u9898\u53c2\u6570 = ",t),r.default.joinTopic(t,function(){console.log("\u52a0\u5165\u8bdd\u9898\u6210\u529f ######")})},e.prototype.giveupBtnFunc=function(){this.node.active=!1},e.prototype.showPop=function(t){this.node.active=!0,this.popData=t,this.topicType=0,this.yellowBtn.active=!0,this.redBtn.active=!0;var e=h.default.todayIsWin();if(this.chooseVideo.active=1!=e,s.default.isPlatform(s.GDPlatform.wx)&&c.default.changeSpriteFrame(this.chooseVideo,"rewardIcon/reward_share_white.png"),h.default.topicModel&&h.default.topicModel.name){var o=h.default.topicModel.name.split("#");o.length>=2&&(this.tombName.string=o[0],this.taoistName.string=o[1]);var n=h.default.getTopicAnimation(h.default.topicModel.id,!0,!1);this.playTomb(n.spName,n.skin,"Jump1");var a=h.default.getTopicAnimation(h.default.topicModel.id,!1,!0);this.playTaoist(a.spName,a.skin,"Jump1")}this.yellowNode.getChildByName("choose").active=!1,this.redNode.getChildByName("choose").active=!1,this.yellowBtn.getChildByName("name").color=(new cc.Color).fromHEX("#FFFFFF"),this.redBtn.getChildByName("name").color=(new cc.Color).fromHEX("#FFFFFF"),this.noChooseBtn.active=!1,this.chooseLabel.string="\u52a0\u5165\u5bf9\u6297",cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),0==t.type?(this.chooseBtn.active=!0,this.giveupBtn.active=!0,this.yellowBtn.getChildByName("name").getComponent(cc.Label).string="\u9009\u62e9",this.redBtn.getChildByName("name").getComponent(cc.Label).string="\u9009\u62e9",this.titleNode.getComponent(cc.Label).string="\u9009\u62e9\u7f8a\u961f"):1==t.type&&(this.chooseBtn.active=!1,this.giveupBtn.active=!1,this.titleNode.getComponent(cc.Label).string="\u4eca\u65e5\u8bdd\u9898",h.default.topicModel&&h.default.topicModel.info&&(1==h.default.topicModel.info.type?this.exchangeUI(!0,!0):this.exchangeUI(!1,!0))),this.updateTimeFunc()},e.prototype.playTomb=function(t,e,o){var n=this;this.tombSP.getComponent(p.default).loadSpine(t,function(){n.tombSP.getComponent(p.default).setNewSkin(e),n.tombSP.getComponent(p.default).play(o,0)})},e.prototype.playTaoist=function(t,e,o){var n=this;this.taoistSP.getComponent(p.default).loadSpine(t,function(){n.taoistSP.getComponent(p.default).setNewSkin(e),n.taoistSP.getComponent(p.default).play(o,0)})},e.prototype.update=function(t){this.updateTime+=t,this.updateTime>=1&&(this.updateTime=0,this.updateTimeFunc())},e.prototype.updateTimeFunc=function(){var t=f.default.format(l.CALENDARNAMES[8],new Date).split(" ");if(!(t.length<2)){var e=t[1].split(":");if(!(e.length<3)){var o=3600*(24-Number(e[0])-1)+60*(60-Number(e[1])-1)+(60-Number(e[2]));if(this.timeNode.activeInHierarchy){var n=d.default.formatTime(1e3*o),a=(n[1]<10?"0"+n[1]:n[1])+" \u5c0f\u65f6 "+(n[2]<10?"0"+n[2]:n[2])+" \u5206 "+(n[3]<10?"0"+n[3]:n[3])+" \u79d2";this.timeLabel.string=a}}}},i([y({type:cc.Node,tooltip:"\u5f39\u6846"})],e.prototype,"popNode",void 0),i([y({type:cc.Node,tooltip:"\u6807\u9898"})],e.prototype,"titleNode",void 0),i([y({type:cc.Node,tooltip:"\u5173\u95ed\u6309\u94ae"})],e.prototype,"closeBtn",void 0),i([y({type:cc.Node,tooltip:"\u7f8abase"})],e.prototype,"yellowNode",void 0),i([y({type:cc.Node,tooltip:"\u7f8abase"})],e.prototype,"redNode",void 0),i([y({type:cc.Node,tooltip:"\u9009\u62e9"})],e.prototype,"yellowBtn",void 0),i([y({type:cc.Node,tooltip:"\u9009\u62e9"})],e.prototype,"redBtn",void 0),i([y({type:cc.Node,tooltip:"\u5269\u4f59\u65f6\u95f4"})],e.prototype,"timeNode",void 0),i([y({type:cc.Node,tooltip:"\u9009\u62e9"})],e.prototype,"chooseBtn",void 0),i([y({type:cc.Node,tooltip:"\u89c6\u9891"})],e.prototype,"chooseVideo",void 0),i([y({type:cc.Label,tooltip:"\u63cf\u8ff0"})],e.prototype,"chooseLabel",void 0),i([y({type:cc.Node,tooltip:"\u672a\u9009\u62e9"})],e.prototype,"noChooseBtn",void 0),i([y({type:cc.Node,tooltip:"\u653e\u5f03"})],e.prototype,"giveupBtn",void 0),i([y({type:cc.Label,tooltip:"\u9635\u8425\u540d\u5b57"})],e.prototype,"tombName",void 0),i([y({type:cc.Label,tooltip:"\u9635\u8425\u540d\u5b57"})],e.prototype,"taoistName",void 0),i([y({type:cc.Node,tooltip:"\u9635\u8425\u52a8\u753b"})],e.prototype,"tombSP",void 0),i([y({type:cc.Node,tooltip:"\u9635\u8425\u52a8\u753b"})],e.prototype,"taoistSP",void 0),i([y({type:cc.Label,tooltip:"\u5012\u8ba1\u65f6"})],e.prototype,"timeLabel",void 0),i([g],e)}(cc.Component);o.default=v,cc._RF.pop()},{"../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/sdk":"sdk","../common/spine":"spine","../common/util":"util","../manager/DateManager":"DateManager","../manager/data-manager":"data-manager"}],topicCollectPop:[function(t,e,o){"use strict";cc._RF.push(e,"9626bbOFCpLgLU2U6ganUyA","topicCollectPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__spreadArrays||function(){for(var t=0,e=0,o=arguments.length;e0){for(var e in t)this.clothesId==t[e].clothesId?(t[e].dressing=!0,this.popData&&this.popData.changeClothesCb&&this.popData.changeClothesCb(this.clothesId)):t[e].dressing=!1;s.default.setSheepClothesData(t),this.setupSubViews(this.curIdx)}},e.prototype.subCloseBtnFunc=function(){this.subPop.active=!1},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.previousBtnFunc=function(){this.curIdx--,this.curIdx<1&&(this.curIdx=1),this.setupSubViews(this.curIdx)},e.prototype.sureBtnFunc=function(){this.node.active=!1},e.prototype.nextBtnFunc=function(){this.curIdx++,this.curIdx>this.allIdx&&(this.curIdx=this.allIdx),this.setupSubViews(this.curIdx)},e.prototype.showPop=function(t){this.node.active=!0,this.popData=t,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),this.sheepCommonNode.active=!1,this.dressingNode.active=!1,this.subPop.active=!1,this.setupSubViews(this.curIdx)},e.prototype.setupSubViews=function(t){for(var e in t<1&&(t=1),this.dataArray)(a=this.dataArray[e]).destroy();for(var e in this.labelArray)(a=this.labelArray[e]).destroy();this.dataArray=[],this.labelArray=[];var o=s.default.getSheepClothesData();o=this.bubbleSort(o),o=this.bubbleIdSort(o),this.allIdx=Math.ceil(o.length/12),this.indexLabel.string=this.curIdx+" / "+this.allIdx;for(var n=0;n=12*(t-1)&&n<12*t){var a,i=o[n];(a=cc.instantiate(this.sheepCommonNode)).active=!0,this.sheepCommonBaseNode.addChild(a),this.dataArray.push(a);var r=cc.instantiate(this.dressingNode);r.active=!0,this.dressingBaseNode.addChild(r),this.labelArray.push(r),c.default.addbtnTouchEndScale(a,this.itemBtnFunc.bind(this,i)),this.updateItem(a,r,i)}},e.prototype.itemBtnFunc=function(t){var e=this;console.log(t),this.clothesId=t.clothesId,this.subPop.active=!0,cc.tween(this.subPop).set({scale:.8,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start();var o="sheep/"+t.spName;this.subSheep.getComponent(l.default).loadSpine(o,function(){e.subSheep.getComponent(l.default).setNewSkin(t.spSkin),t.unlock?e.subSheep.getComponent(l.default).play("Jump1",0):e.subSheep.getComponent(l.default).play("Unlock1",0)}),t.unlock?(this.luckBtn.active=!1,this.changeBtn.active=!0,this.titleLabel.string=t.name):(this.luckBtn.active=!0,this.changeBtn.active=!1,this.titleLabel.string="???"),this.contentTeam.string=this.getName(t.clothesId),this.contentDesc.string="\u5728\u8bdd\u9898\u6218 \u4e2d\uff0c\u52a0\u5165"+t.name+"\u9635\u8425\u5e76\u83b7\u80dc\u540e\u83b7\u5f97\u3002"},e.prototype.getName=function(t){return this.contentDesc.node.active=!0,this.contentTeam.node.active=!0,this.contentDefault.node.active=!1,8==t||9==t?"\u50f5\u5c38vs\u9053\u58eb":10==t||11==t?"\u72fc\u4ebavs\u5438\u8840\u9b3c":12==t||13==t?"\u9ed1\u7f8avs\u767d\u7f8a":41==t||42==t?"\u4e94\u4ec1vs\u83b2\u84c9":43==t||44==t?"\u5b66\u751fvs\u8001\u5e08":45==t||46==t?"\u5ae6\u5a25vs\u7389\u5154":47==t||48==t?"\u5b66\u7ae5vs\u592b\u5b50":(this.contentDesc.node.active=!1,this.contentTeam.node.active=!1,this.contentDefault.node.active=!0,this.contentDefault.string=1==t?"\u9ed8\u8ba4\u88c5\u626e\u3002\u6211\u53ea\u662f\u4e00\u53ea\u5b64\u72ec\u7684\u7f8e\u7f8a\u7f8a\u3002":"\u5e38\u89c4\u6a21\u5f0f\u901a\u5173\uff0c\u6216\u8bdd\u9898PK\u4e2d\u6240\u9009\u9635\u8425\u83b7\u80dc\u540e\u83b7\u5f97\u3002","")},e.prototype.bubbleSort=function(t){for(var e,o=r(t),n=0,a=o.length;no[i+1].clothesId&&(e=[o[i+1],o[i]],o[i]=e[0],o[i+1]=e[1]);return o},e.prototype.updateItem=function(t,e,o){var n=t.getChildByName("new"),a=t.getChildByName("SP"),i=t.getChildByName("choose");e.opacity=0,this.popData&&this.popData.topicClothesNum==o.clothesId?n.active=!0:n.active=!1;var r="sheep/"+o.spName;a.getComponent(l.default).loadSpine(r,function(){a.getComponent(l.default).setNewSkin(o.spSkin),o.unlock?o.dressing?(i.active=!0,e.opacity=255,a.getComponent(l.default).play("Jump1",0)):i.active=!1:(a.getComponent(l.default).play("Unlock1",0),i.active=!1)})},i([d(cc.Node)],e.prototype,"popNode",void 0),i([d(cc.Node)],e.prototype,"closeBtn",void 0),i([d(cc.Node)],e.prototype,"sheepCommonBaseNode",void 0),i([d(cc.Node)],e.prototype,"sheepCommonNode",void 0),i([d(cc.Node)],e.prototype,"dressingBaseNode",void 0),i([d(cc.Node)],e.prototype,"dressingNode",void 0),i([d(cc.Node)],e.prototype,"previousBtn",void 0),i([d(cc.Node)],e.prototype,"sureBtn",void 0),i([d(cc.Node)],e.prototype,"nextBtn",void 0),i([d(cc.Label)],e.prototype,"indexLabel",void 0),i([d(cc.Node)],e.prototype,"subPop",void 0),i([d(cc.Node)],e.prototype,"subSheep",void 0),i([d(cc.Label)],e.prototype,"titleLabel",void 0),i([d(cc.Label)],e.prototype,"contentDesc",void 0),i([d(cc.Label)],e.prototype,"contentTeam",void 0),i([d(cc.Label)],e.prototype,"contentDefault",void 0),i([d(cc.Node)],e.prototype,"luckBtn",void 0),i([d(cc.Node)],e.prototype,"changeBtn",void 0),i([d(cc.Node)],e.prototype,"subCloseBtn",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/spine":"spine"}],topicJoinedPop:[function(t,e,o){"use strict";cc._RF.push(e,"90ef543uIxHfKnKA811WqDS","topicJoinedPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/spine"),u=t("../manager/data-manager"),p=cc._decorator,d=p.ccclass,h=p.property,f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.titleLabel=null,e.tombNode=null,e.taoistNode=null,e.tombLabel=null,e.taoistLabel=null,e.teamLabel=null,e.closeBtn=null,e.sureBtn=null,e.tombSP=null,e.taoistSP=null,e}return a(e,t),e.prototype.start=function(){c.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this)),c.default.addTargetTouchUpInside(this.sureBtn,this.sureBtnBtn.bind(this))},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.sureBtnBtn=function(){this.node.active=!1},e.prototype.showPop=function(){var t=this;this.node.active=!0,this.tombNode.active=!1,this.taoistNode.active=!1,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),this.updateUI(0);var e=u.default.getTopicAnimation(u.default.topicModel.id,!0,!1);this.playTomb(e.spName,e.skin,"Jump1");var o=u.default.getTopicAnimation(u.default.topicModel.id,!1,!0);this.playTaoist(o.spName,o.skin,"Jump1"),r.default.getTopicUserInfo(s.default.getUserData().userID,function(e){if(0==e.err_code&&e.data&&e.data.user){var o=e.data.user.type;1==o?t.tombNode.active=!0:2==o&&(t.taoistNode.active=!0),t.updateUI(o)}})},e.prototype.updateUI=function(t){var e=u.default.topicModel.name.split("#");e.length<2||(this.tombLabel.string=e[0]+"\u7f8a",this.taoistLabel.string=e[1]+"\u7f8a",this.teamLabel.string="",1==t?this.teamLabel.string=e[0]+"\u7f8a\u961f":2==t&&(this.teamLabel.string=e[1]+"\u7f8a\u961f"))},e.prototype.playTomb=function(t,e,o){var n=this;this.tombSP.getComponent(l.default).loadSpine(t,function(){n.tombSP.getComponent(l.default).setNewSkin(e),n.tombSP.getComponent(l.default).play(o,0)})},e.prototype.playTaoist=function(t,e,o){var n=this;this.taoistSP.getComponent(l.default).loadSpine(t,function(){n.taoistSP.getComponent(l.default).setNewSkin(e),n.taoistSP.getComponent(l.default).play(o,0)})},i([h(cc.Node)],e.prototype,"popNode",void 0),i([h(cc.Label)],e.prototype,"titleLabel",void 0),i([h(cc.Node)],e.prototype,"tombNode",void 0),i([h(cc.Node)],e.prototype,"taoistNode",void 0),i([h(cc.Label)],e.prototype,"tombLabel",void 0),i([h(cc.Label)],e.prototype,"taoistLabel",void 0),i([h(cc.Label)],e.prototype,"teamLabel",void 0),i([h(cc.Node)],e.prototype,"closeBtn",void 0),i([h(cc.Node)],e.prototype,"sureBtn",void 0),i([h(cc.Node)],e.prototype,"tombSP",void 0),i([h(cc.Node)],e.prototype,"taoistSP",void 0),i([d],e)}(cc.Component);o.default=f,cc._RF.pop()},{"../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/spine":"spine","../manager/data-manager":"data-manager"}],topicLastWinPop:[function(t,e,o){"use strict";cc._RF.push(e,"74b18J+qNBMbqeSpfyEZqtg","topicLastWinPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/spine"),s=t("../manager/data-manager"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.closeBtn=null,e.tombSign=null,e.taoistSign=null,e.tombNode=null,e.taoistNode=null,e.nameLabel=null,e.tombLabel=null,e.taoistLabel=null,e.tombNumLabel=null,e.taoistNumLabel=null,e.bottomNumLabel=null,e.tombProgress=null,e.taoistProgress=null,e.tombSP=null,e.taoistSP=null,e.popData=null,e.teamIsWIn=!1,e}return a(e,t),e.prototype.start=function(){r.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this))},e.prototype.closeBtnFunc=function(){if(this.node.active=!1,this.teamIsWIn){var t={popName:"topicNewPop",showPopData:{type:1,data:this.popData}};cc.game.emit("showPop",t)}},e.prototype.showPop=function(t){this.node.active=!0,this.popData=t,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),t&&this.setupData(t)},e.prototype.setupData=function(t){var e=t.tomb,o=t.taoist,n=t.tomb_fail_member,a=t.taoist_fail_member,i=e.length,r=o.length,c=t.topic.name.split("#"),l=i+r+n+a,u=i+r,p=0,d=0;i==r?this.nameLabel.string="\u8d5b\u51b5":i>r?(1==t.topic.info.type&&(this.teamIsWIn=!0),this.tombSign.active=!0,this.taoistSign.active=!1,this.nameLabel.string=c[0]+"\u7f8a\u961f\u83b7\u80dc\uff01"):(2==t.topic.info.type&&(this.teamIsWIn=!0),this.tombSign.active=!1,this.taoistSign.active=!0,this.nameLabel.string=c[1]+"\u7f8a\u961f\u83b7\u80dc\uff01"),0!=u&&(p=i/u*300,d=r/u*300),p<50&&(p=50),d<50&&(d=50),cc.tween(this.tombProgress).to(0,{height:50}).to(1.5,{height:p}).start(),cc.tween(this.taoistProgress).to(0,{height:50}).to(1.5,{height:d}).start(),this.tombNumLabel.string=i+"\u7f8a",this.taoistNumLabel.string=r+"\u7f8a",this.tombLabel.string=c[0]+"\u7f8a\u961f",this.taoistLabel.string=c[1]+"\u7f8a\u961f",this.bottomNumLabel.string=l+"",1==t.topic.info.type?(this.tombNode.active=!0,this.taoistNode.active=!1):(this.tombNode.active=!1,this.taoistNode.active=!0);var h=s.default.getTopicAnimation(t.topic.id,!0,!1);this.playTomb(h.spName,h.skin,"Jump3");var f=s.default.getTopicAnimation(t.topic.id,!1,!0);this.playTaoist(f.spName,f.skin,"Jump3")},e.prototype.playTomb=function(t,e,o){var n=this;this.tombSP.getComponent(c.default).loadSpine(t,function(){n.tombSP.getComponent(c.default).setNewSkin(e),n.tombSP.getComponent(c.default).play(o,0)})},e.prototype.playTaoist=function(t,e,o){var n=this;this.taoistSP.getComponent(c.default).loadSpine(t,function(){n.taoistSP.getComponent(c.default).setNewSkin(e),n.taoistSP.getComponent(c.default).play(o,0)})},i([p({type:cc.Node,tooltip:"\u5f39\u6846"})],e.prototype,"popNode",void 0),i([p({type:cc.Node,tooltip:"\u5173\u95ed\u6309\u94ae"})],e.prototype,"closeBtn",void 0),i([p(cc.Node)],e.prototype,"tombSign",void 0),i([p(cc.Node)],e.prototype,"taoistSign",void 0),i([p(cc.Node)],e.prototype,"tombNode",void 0),i([p(cc.Node)],e.prototype,"taoistNode",void 0),i([p({type:cc.Label,tooltip:"\u7f8a\u961f"})],e.prototype,"nameLabel",void 0),i([p({type:cc.Label,tooltip:"\u50f5\u5c38"})],e.prototype,"tombLabel",void 0),i([p({type:cc.Label,tooltip:"\u9053\u58eb"})],e.prototype,"taoistLabel",void 0),i([p({type:cc.Label,tooltip:"\u50f5\u5c38\u6570\u91cf"})],e.prototype,"tombNumLabel",void 0),i([p({type:cc.Label,tooltip:"\u9053\u58eb\u6570\u91cf"})],e.prototype,"taoistNumLabel",void 0),i([p({type:cc.Label,tooltip:"\u603b\u4eba\u6570"})],e.prototype,"bottomNumLabel",void 0),i([p(cc.Node)],e.prototype,"tombProgress",void 0),i([p(cc.Node)],e.prototype,"taoistProgress",void 0),i([p(cc.Node)],e.prototype,"tombSP",void 0),i([p(cc.Node)],e.prototype,"taoistSP",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/spine":"spine","../manager/data-manager":"data-manager"}],topicNewPop:[function(t,e,o){"use strict";cc._RF.push(e,"9383fTm8p9NuLEys6rFPQBI","topicNewPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/spine"),l=t("../manager/GameManager"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.popNode=null,e.nameLabel=null,e.bgFlashSP=null,e.sheepSP=null,e.winLabel=null,e.descLabel=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.maskNode,this.maskNodeFunc.bind(this))},e.prototype.maskNodeFunc=function(){this.node.active=!1},e.prototype.showPop=function(t){var e=this;this.node.active=!0,cc.tween(this.bgFlashSP).to(0,{scale:0}).to(.1,{scale:1}).call(function(){e.bgFlashSP.getComponent(s.default).loadSpine("sheep/UI",function(){e.bgFlashSP.getComponent(s.default).play("4Ray2",0)})}).start(),1==t.type?this.receiveSheepClothes():2==t.type&&this.showSheep(t.data)},e.prototype.showSheep=function(t){var e=this;cc.tween(this.sheepSP).to(0,{scale:0}).to(.2,{scale:1}).call(function(){e.sheepSP.getComponent(s.default).loadSpine("sheep/"+t.spName,function(){e.sheepSP.getComponent(s.default).setNewSkin(t.spSkin),e.sheepSP.getComponent(s.default).play("Jump1",0)})}).start(),this.nameLabel.string=t.name,this.winLabel.string="",this.descLabel.string=""},e.prototype.receiveSheepClothes=function(){var t=this,e=c.default.getSheepClothesData(),o=!1,n="skin_00",a="\u7f8a";e=r.default.shuffle(e);for(var i=0;i=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/enumConfig"),c=t("../common/native/audio"),s=t("../common/spine"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.sheepSp=null,e.playing=!1,e.animCallBack=null,e}return a(e,t),e.prototype.start=function(){cc.game.on(r.EMITKEY.SHOWTRANSITLAYER,this.playTransitionLayerAnim,this)},e.prototype.playTransitionLayerAnim=function(t){if(!this.playing){var e=this;this.playing=!0,this.animCallBack=t,this.sheepSp.active=!0,c.default.playAudioMusic("audio/sound/transitFont.mp3",!1),this.sheepSp.getComponent(s.default).setFrameEventCb("Turnarounds",function(t){console.log("\u4e13\u573a\u52a8\u753b ### ",t),e.animCallBack(e.playAnimOpen.bind(e))}),this.sheepSp.getComponent(s.default).play("Interlude",1,function(){e.playing=!1,e.sheepSp.active=!1,console.log("\u4e13\u573a\u52a8\u753b end ###")})}},e.prototype.playAnimOpen=function(){console.log("\u8f6c\u573a\u52a8\u753b\u5207\u6362 ### ")},i([p(cc.Node)],e.prototype,"sheepSp",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/spine":"spine"}],"tt-sdk":[function(t,e,o){"use strict";cc._RF.push(e,"0d66ayRO/dGya2ZzHsK5JHr","tt-sdk"),Object.defineProperty(o,"__esModule",{value:!0});var n=function(){function t(){}return t.init=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&tt.showShareMenu({success:function(){console.log("[tt] \u5df2\u6210\u529f\u663e\u793a\u8f6c\u53d1\u6309\u94ae")},fail:function(t){console.log("[tt] showShareMenu \u8c03\u7528\u5931\u8d25",t.errMsg)},complete:function(){console.log("[tt] showShareMenu \u8c03\u7528\u5b8c\u6210")}})},t.vibrateShort=function(){tt.vibrateShort({})},t.vibrateLong=function(){tt.vibrateLong({})},t.login=function(){tt.login({success:function(t){console.log("[tt] \u767b\u5f55\u6210\u529f",t)},fail:function(t){console.log("[tt] \u767b\u5f55\u5931\u8d25",t)}})},t.checkSession=function(){tt.checkSession({success:function(){console.log("[tt] session \u672a\u8fc7\u671f")},fail:function(){console.log("[tt] session \u5df2\u8fc7\u671f\uff0c\u9700\u8981\u91cd\u65b0\u767b\u5f55"),this.login()}})},t.getSetting=function(){tt.checkSession({success:function(t){console.log("[tt] -------------getSetting \u83b7\u53d6\u7528\u6237\u5f53\u524d\u7684\u6388\u6743\u72b6\u6001\u6210\u529f-----------",t),t.errMsg},fail:function(t){console.log("[tt] -------------getSetting \u83b7\u53d6\u7528\u6237\u5f53\u524d\u7684\u6388\u6743\u72b6\u6001\u5931\u8d25-----------",t)}})},t.openSetting=function(){tt.openSetting({success:function(t){console.log("[tt] -------------openSetting success-----------",t)},complete:function(t){console.log("[tt] -------------openSetting complete-----------",t)},fail:function(t){console.log("[tt] -------------openSetting fail-----------",t)}})},t.authorize=function(){tt.authorize({scope:"scope.userInfo",success:function(t){console.log("[tt] authorize success",t)},complete:function(t){console.log("[tt] authorize complete",t)},fail:function(t){console.log("[tt] authorize fail",t)}})},t.recorderStart=function(){if(cc.sys.platform==cc.sys.BYTEDANCE_GAME)try{console.log("\u5f00\u59cb\u5f55\u5c4f ###### "),tt.getGameRecorderManager().start({duration:300})}catch(t){cc.warn(t)}},t.recorderStop=function(){if(cc.sys.platform==cc.sys.BYTEDANCE_GAME){console.log("\u5f55\u5c4f\u7ed3\u675fstop ###### ");try{tt.getGameRecorderManager().stop()}catch(t){cc.warn(t)}}},t.recorderPause=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&(console.log("\u5f55\u5c4f\u7ed3\u675fpause ###### "),tt.getGameRecorderManager().pause())},t.recorderResume=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&(console.log("\u5f55\u5c4f\u7ed3\u675fresume ###### "),tt.getGameRecorderManager().resume())},t.setVideoPath=function(t){this.videoPath=t},t.shareTemplate=function(t){cc.sys.platform==cc.sys.BYTEDANCE_GAME?tt.shareAppMessage({templateId:"gf33jlfc0h1k415a7o",query:"",success:function(){console.log("\u5206\u4eab\u6210\u529f"),t(!0)},fail:function(){console.log("\u5206\u4eab\u5931\u8d25"),t(!1)}}):t(!0)},t.shareAppMessage=function(t){var e=t.success,o=t.fail,n=t.url;console.log("[tt] [sdk][tt] share app message",n),n||(n=this.videoPath);try{tt.shareAppMessage({channel:"video",query:"",templateId:"",title:"\u7f8a\u4e86\u4e2a\u7f8a",desc:"\u770b\u770b\u5927\u5bb6\u90fd\u559c\u6b22\u4ec0\u4e48\u7f8a",extra:{videoPath:n,videoTopics:["\u7f8a\u4e86\u4e2a\u7f8a"]},success:function(){e&&e(),console.log("[tt] \u5206\u4eab\u89c6\u9891\u6210\u529f")},fail:function(t){o&&o(),console.log("[tt] \u5206\u4eab\u89c6\u9891\u5931\u8d25",t)}})}catch(a){cc.warn("share app message err",a)}},t.rewardVideoAd=function(t){var e=this;this.onRewardVideoAdSuccess=t.success,this.onRewardVideoAdFail=t.fail,this.rewardAd?this.rewardAd.show():(this.rewardAd=tt.createRewardedVideoAd({adUnitId:t.id}),this.rewardAd.onLoad(function(){e.rewardAd.show()}),this.rewardAd.onError(function(t){e.onRewardVideoAdFail&&e.onRewardVideoAdFail(),cc.warn("tt reward video ad error",t)}),this.rewardAd.onClose(function(t){t.isEnded&&e.onRewardVideoAdSuccess&&e.onRewardVideoAdSuccess(),e.onRewardVideoAdFail&&e.onRewardVideoAdFail()}))},t.setClipboardData=function(t){tt.setClipboardData({data:t,success:function(){tt.getClipboardData({success:function(t){console.log("tt get clipboard data:",t.data)}})}})},t.showBannerAd=function(t){var e=this;this.onRewardBannerAdSuccess=t.success,this.onRewardBannerAdFail=t.fail,this.bannerAd?this.bannerAd.show():(this.bannerAd=tt.createBannerAd({adUnitId:t.id,adIntervals:30,style:{left:0,top:cc.winSize.height,width:300}}),this.bannerAd.onLoad(function(){e.bannerAd.show()}),this.bannerAd.onError(function(t){e.onRewardBannerAdFail&&e.onRewardBannerAdFail(),cc.warn("tt reward video ad error",t)}))},t.hideBannerAd=function(){this.bannerAd&&this.bannerAd.hide()},t.showInterstitialAd=function(){},t.showRewardVideoAd=function(){},t.focusDouYin=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&tt.openAwemeUserProfile({success:function(t){console.log(t)}})},t.isSupportFocusDouYin=function(){if(cc.sys.platform!=cc.sys.BYTEDANCE_GAME)return!1;for(var t=tt.getSystemInfoSync(),e=t.system,o=t.SDKVersion,n=t.version,a=t.appName,i=(e.split(" "),n.split(".")),r=0;r-1&&t.listeners.splice(o,1)},this.emit=function(e){if(t.listeners.forEach(function(t){return t(e)}),t.listenersOncer.length>0){var o=t.listenersOncer;t.listenersOncer=[],o.forEach(function(t){return t(e)})}},this.pipe=function(e){return t.on(function(t){return e.emit(t)})}},cc._RF.pop()},{}],uiControler:[function(t,e,o){"use strict";cc._RF.push(e,"81349GiDV5P+4W7p0Ox2i/o","uiControler");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("./mapEditor"),c=t("./newLevelPop"),s=t("./selectLevelPop"),l=t("./setBlockNumPop"),u=t("../common/config"),p=t("../common/dataTs"),d=t("./editorGameLayer"),h=t("./saveAsPop"),f=cc._decorator,m=f.ccclass,g=f.property,y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mapEditorNode=null,e.setBlockNumPop=null,e.selectLevelPop=null,e.newLevelPop=null,e.saveAsPop=null,e.editorGameLayer=null,e.levelNumLabel=null,e.blockNumLabel=null,e}return a(e,t),e.prototype.onLoad=function(){},e.prototype.start=function(){cc.game.on("initLevelData",this.initLevelData,this),cc.game.on("setBlockNum",this.showBlockNum,this),cc.game.on("saveAsNewMap",this.saveAsNewMap,this)},e.prototype.selectLevelFun=function(){console.log("\u7f16\u8f91\u5173\u5361"),this.selectLevelPop.getComponent(s.default).showSelectLevelPop()},e.prototype.newLevelFun=function(){console.log("\u65b0\u5efa\u5173\u5361"),this.newLevelPop.getComponent(c.default).showNewLevelPop()},e.prototype.chooseMapSizeFun=function(t,e){cc.game.emit("refreshMapSizeData",u.default.mapType[e])},e.prototype.saveAsShowLayer=function(){console.log("\u53e6\u5b58\u4e3a\u5173\u5361"),this.saveAsPop.getComponent(h.default).showSaveAsPop()},e.prototype.saveLevelMapFun=function(){console.log("\u4fdd\u5b58\u5173\u5361");var t=this.mapEditorNode.getComponent(r.default).levelID,e=this.mapEditorNode.getComponent(r.default).newLevelDataObj;this.checkMapIsRight(e)?p.default.setLevelMapData(t,e):console.log("\u5173\u5361\u914d\u7f6e\u9519\u8bef")},e.prototype.checkMapIsRight=function(t){var e=0,o=0,n=t,a=n.levelData;for(var i in a)for(var r in a[i])0==a[i][r].type?e++:o++;if(console.log("blockNum:",e),console.log("blockTypeNum:",o),e%3!=0)return console.log("\u7a7a\u767d\u5757\u4e0d\u662f3\u7684\u500d\u6570"),cc.game.emit("showTips","\u7a7a\u767d\u5757\u4e0d\u662f3\u7684\u500d\u6570"),!1;if(o%3!=0)return console.log("\u7c7b\u578b\u5757\u4e0d\u662f3\u7684\u500d\u6570"),cc.game.emit("showTips","\u7c7b\u578b\u5757\u4e0d\u662f3\u7684\u500d\u6570"),!1;var c=n.blockTypeData,s=0;for(var i in c)s+=c[i];return console.log("typeNum:",s),s==e/3||(console.log("\u5757\u7c7b\u578b\u8bbe\u7f6e\u6570\u91cf\u9519\u8bef"),cc.game.emit("showTips","\u5757\u7c7b\u578b\u8bbe\u7f6e\u6570\u91cf\u9519\u8bef"),!1)},e.prototype.saveAsNewMap=function(t){var e=this.mapEditorNode.getComponent(r.default).newLevelDataObj;e.levelKey=t,p.default.setLevelMapData(t,e);var o={newLevelData:e};cc.game.emit("initLevelData",o)},e.prototype.setBlockTypeFun=function(){console.log("\u8bbe\u7f6e\u672c\u5173\u7684\u56fe\u5757\u7c7b\u578b\u6570\u91cf");var t=0,e=this.mapEditorNode.getComponent(r.default).newLevelDataObj,o=e.levelData;for(var n in o)for(var a in o[n])0==o[n][a].type&&t++;var i=e.blockTypeData;t%3==0?this.setBlockNumPop.getComponent(l.default).showSetBlockPop(t/3,i):(console.log("error:\u5757\u6570\u91cf\u4e0d\u80fd\u88ab\u6574\u9664"),cc.game.emit("showTips","error:\u5757\u6570\u91cf\u4e0d\u80fd\u88ab\u6574\u9664"),this.setBlockNumPop.getComponent(l.default).showSetBlockPop(0,i))},e.prototype.selectNewBlockTypeFun=function(){console.log("\u9009\u62e9\u5373\u5c06\u6446\u653e\u7684\u56fe\u5757\u7c7b\u578b")},e.prototype.testPlayFun=function(){console.log("\u8bd5\u73a9\u672c\u5173\u5361"),this.mapEditorNode.getComponent(r.default).levelID;var t=cc.instantiate(this.mapEditorNode.getComponent(r.default).newLevelDataObj);console.log("data:",t);var e=[t];this.editorGameLayer.getComponent(d.default).initLevelLayer(e)},e.prototype.backOffFun=function(){console.log("\u56de\u9000\u7ec4\u5757")},e.prototype.initLevelData=function(t){this.levelNumLabel.string="\u5f53\u524d\u5173\u5361ID\uff1a"+t.newLevelData.levelKey},e.prototype.showBlockNum=function(){if(!this.mapEditorNode.getComponent(r.default).newLevelDataObj)return!1;var t=this.getAllBlockNum();this.blockNumLabel.string=""+t},e.prototype.getAllBlockNum=function(){var t=0,e=this.mapEditorNode.getComponent(r.default).newLevelDataObj.levelData;for(var o in e)t+=e[o].length;return t},i([g(cc.Node)],e.prototype,"mapEditorNode",void 0),i([g(cc.Node)],e.prototype,"setBlockNumPop",void 0),i([g(cc.Node)],e.prototype,"selectLevelPop",void 0),i([g(cc.Node)],e.prototype,"newLevelPop",void 0),i([g(cc.Node)],e.prototype,"saveAsPop",void 0),i([g(cc.Node)],e.prototype,"editorGameLayer",void 0),i([g(cc.Label)],e.prototype,"levelNumLabel",void 0),i([g(cc.Label)],e.prototype,"blockNumLabel",void 0),i([m],e)}(cc.Component);o.default=y,cc._RF.pop()},{"../common/config":"config","../common/dataTs":"dataTs","./editorGameLayer":"editorGameLayer","./mapEditor":"mapEditor","./newLevelPop":"newLevelPop","./saveAsPop":"saveAsPop","./selectLevelPop":"selectLevelPop","./setBlockNumPop":"setBlockNumPop"}],"uma-sdk":[function(t,e,o){"use strict";cc._RF.push(e,"31ca3gDt7FFSYn5bPlPkMAx","uma-sdk");var n=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var a=t("../../common/dataTs"),i=t("../../common/enumConfig"),r=t("../../common/sdk"),c=t("../../manager/DateManager"),s=cc._decorator,l=s.ccclass,u=(s.property,function(){function t(){}return t.setUserid=function(){r.default.isPlatform(r.Platform.wx)},t.trackEvent=function(t,e){void 0===e&&(e=null);var o=a.default.getUserData();e||(e={});var n=Number(a.default.getUserData().registerTime),s=c.default.format(i.CALENDARNAMES[6],new Date(n));e.time=s,e.c_time=Number(s),e.uid=o.userID;var l=JSON.stringify(e);e.data=l,r.default.isPlatform(r.Platform.wx)},n([l],t)}());o.default=u,cc._RF.pop()},{"../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig","../../common/sdk":"sdk","../../manager/DateManager":"DateManager"}],"unlock-build-pop":[function(t,e,o){"use strict";cc._RF.push(e,"23d5cnrWYpLtbx08aY5sAOq","unlock-build-pop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/native/audio"),l=t("../common/spine"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainCultivateLayer=null,e.flightNode=null,e.spriteNode=null,e.spineTitle=null,e.spineAnim=null,e.receiveBtn=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchStartScale(this.receiveBtn,this.receiveBtnFunc.bind(this)),r.default.addbtnTouchEndScale(this.receiveBtn,this.receiveBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.receiveBtn,this.receiveBtnFunc.bind(this))},e.prototype.hideDefault=function(){this.flightNode.active=!1,this.spriteNode.active=!1,this.spineTitle.active=!1,this.spineAnim.active=!1,this.receiveBtn.active=!1},e.prototype.showGetRemoveProp=function(){this.node.active=!0,this.hideDefault(),this.playRemoveAnim()},e.prototype.playRemoveAnim=function(){var t=this,e=this;this.spineAnim.active=!0,this.spineAnim.getComponent(l.default).setFrameEventCb("Open1",function(){console.log("1"),s.default.playAudioMusic("audio/sound/Open2.mp3",!1)}),this.spineAnim.getComponent(l.default).setFrameEventCb("Eff_Sheen1",function(){e.spineTitle.active=!0,console.log("2"),s.default.playAudioMusic("audio/sound/Words2.mp3",!1),e.spineTitle.getComponent(l.default).play("Award1_Words1",1),t.spineAnim.getComponent(l.default).setFrameEventCb("Treasure1",function(){console.log("3"),e.flightNode.active=!0,t.spriteNode.active=!0,e.receiveBtn.active=!0,e.flightNode.scale=0,e.spriteNode.scale=0,e.receiveBtn.scale=0,cc.tween(e.flightNode).to(.3,{scale:.8}).call(function(){cc.tween(e.flightNode).by(5,{angle:360}).repeatForever().start()},e).start(),cc.tween(e.spriteNode).to(.1,{scale:1.4}).to(.1,{scale:1}).to(.1,{scale:1.2}).to(.1,{scale:1}).call(function(){cc.tween(e.receiveBtn).to(.1,{scale:1.3}).to(.1,{scale:1}).start()}).start()})}),this.spineAnim.getComponent(l.default).play("Ref1_Open3",1,function(){console.log("4")});var o=c.default.getUserData();o.prop_remove+=2,c.default.saveUserData(o)},e.prototype.receiveBtnFunc=function(){this.node.active=!1},i([d(cc.Node)],e.prototype,"mainCultivateLayer",void 0),i([d(cc.Node)],e.prototype,"flightNode",void 0),i([d(cc.Node)],e.prototype,"spriteNode",void 0),i([d(cc.Node)],e.prototype,"spineTitle",void 0),i([d(cc.Node)],e.prototype,"spineAnim",void 0),i([d(cc.Node)],e.prototype,"receiveBtn",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/native/audio":"audio","../common/spine":"spine"}],"unlock-build":[function(t,e,o){"use strict";cc._RF.push(e,"b4509jR79lK778pfI4KU2y8","unlock-build");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/dataTs"),c=t("../common/native/audio"),s=t("../common/spine"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.catContent=null,e.unlockBuildBtn=null,e.lightBg=null,e.ribbonNode=null,e.catNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.playCatAnimation=function(t){void 0===t&&(t=1);var e=this;this.hideDefault(),this.catContent.active=!0,e.catContent.scale=1;var o=r.default.getGameConfigData().baseConfigData.catClothesData["cat_"+t];o&&o.length&&(e.ribbonNode.getComponent(cc.Label).string=o[0].name),this.unlockBuildBtn.active=!0,e.unlockBuildBtn.getComponent(s.default).setFrameEventCb("Cat1",function(){console.log("Cat1 frame ######"),c.default.playAudioMusic("audio/sound/Open2.mp3",!1),e.lightBg.active=!0,e.ribbonNode.active=!0,e.catNode.active=!0,cc.tween(e.lightBg).by(5,{angle:360}).repeatForever().start(),e.catContent.scale=0,cc.tween(e.catContent).to(.1,{scale:1.1}).to(.1,{scale:1}).start(),e.setCatSpine(t),cc.tween(e.catContent).delay(2).to(.2,{scale:1.2}).to(.3,{scale:0},{easing:cc.easing.cubicIn}).call(function(){e.node.active=!1}).start()}),this.unlockBuildBtn.getComponent(s.default).play("3UnlockCat1",1,function(){console.log("3UnlockCat1 \u64ad\u653e\u5b8c\u6210")})},e.prototype.setCatSpine=function(t){var e=this,o="Model"+(t<10?"0"+t:t+"");this.catNode.getComponent(s.default).loadNewSpine(o,function(){e.catNode.getComponent(s.default).setNewSkin("00"),e.catNode.getComponent(s.default).play("2_Action1",1,function(){e.catNode.getComponent(s.default).play("1_Standby1",0)})})},e.prototype.hideDefault=function(){this.unlockBuildBtn.active=!1,this.lightBg.active=!1,this.ribbonNode.active=!1,this.catNode.active=!1},i([p(cc.Node)],e.prototype,"catContent",void 0),i([p(cc.Node)],e.prototype,"unlockBuildBtn",void 0),i([p(cc.Node)],e.prototype,"lightBg",void 0),i([p(cc.Node)],e.prototype,"ribbonNode",void 0),i([p(cc.Node)],e.prototype,"catNode",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../common/dataTs":"dataTs","../common/native/audio":"audio","../common/spine":"spine"}],"upgrade-tip":[function(t,e,o){"use strict";cc._RF.push(e,"fc6e6B31jVAnbLpM0OJ9CQp","upgrade-tip");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("./mainCultivateLayer"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.iconFish=null,e.iconPoint=null,e.iconNode=null,e.fishNode=null,e.arrowNode=null,e.mainCultivateLayer=null,e.houseData=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.iconPoint,this.iconPointEndFunc.bind(this)),r.default.addbtnTouchEndScale(this.iconFish,this.iconFishEndFunc.bind(this))},e.prototype.iconPointEndFunc=function(t){t.stopPropagation(),this.mainCultivateLayer&&this.mainCultivateLayer.getComponent(s.default).clickUpgradePoint(this)},e.prototype.iconFishEndFunc=function(t){t.stopPropagation(),this.mainCultivateLayer&&this.mainCultivateLayer.getComponent(s.default).clickUpgradeFish(this.houseData,this)},e.prototype.showPoint=function(t,e,o){void 0===t&&(t=this.houseData),void 0===e&&(e=this.mainCultivateLayer),void 0===o&&(o=!1),this.mainCultivateLayer=e,this.houseData=t,this.iconPoint.active=!0,this.iconFish.active=!1,this.fishNode.getComponent(cc.Label).string="x"+t.fish,c.default.getUserData().fish>=t.fish?this.arrowNode.active=!0:this.arrowNode.active=!1,o&&(this.iconPoint.scale=0,cc.tween(this.iconPoint).delay(.1).to(.5,{scale:1}).start());var n="rewardIcon/Unlock_Hammer.png";"cat"==t.buildType?(n="rewardIcon/Unlock_Cat.png",r.default.changeSpriteFrame(this.iconNode,n)):"skin"==t.buildType?(n="rewardIcon/Unlock_Clothing.png",r.default.changeSpriteFrame(this.iconNode,n)):1==t.buildid?(n="rewardIcon/Unlock_Brush.png",r.default.changeSpriteFrame(this.iconNode,n)):r.default.changeSpriteFrame(this.iconNode,n)},e.prototype.showFish=function(){console.log(JSON.stringify(this.houseData)),this.iconPoint.active=!1,this.iconFish.active=!0,this.iconFish.scale=0,cc.tween(this.iconFish).to(.3,{scale:1}).start()},e.prototype.show=function(){this.node.active=!0,this.iconPoint.active=!0,this.iconFish.active=!1,this.iconPoint.scale=0,cc.tween(this.iconPoint).delay(.1).to(.5,{scale:1}).start()},e.prototype.hide=function(){this.node.active=!1},i([p(cc.Node)],e.prototype,"iconFish",void 0),i([p(cc.Node)],e.prototype,"iconPoint",void 0),i([p(cc.Node)],e.prototype,"iconNode",void 0),i([p(cc.Node)],e.prototype,"fishNode",void 0),i([p(cc.Node)],e.prototype,"arrowNode",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","./mainCultivateLayer":"mainCultivateLayer"}],upgradePop:[function(t,e,o){"use strict";cc._RF.push(e,"56493C1WJVBQJG8pH7F9E9g","upgradePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/enumConfig"),l=t("../common/native/audio"),u=t("../common/spine"),p=t("../utils/uma/uma-sdk"),d=cc._decorator,h=d.ccclass,f=d.property,m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.coinNum=null,e.catNode=null,e.closeBtn=null,e.upgradeBtn=null,e.popNode=null,e.catId=0,e.clothId=0,e.callBack=null,e.popCallbackCollect=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchStartScale(this.closeBtn),r.default.addbtnTouchEndScale(this.closeBtn,this.hideUpgradePop.bind(this)),r.default.addbtnTouchCancelScale(this.closeBtn),r.default.addbtnTouchStartScale(this.upgradeBtn),r.default.addbtnTouchEndScale(this.upgradeBtn,this.upgradeFunc.bind(this)),r.default.addbtnTouchCancelScale(this.upgradeBtn),this.popCallbackCollect={playGameCallBack:this.playGameFunc.bind(this)}},e.prototype.playGameFunc=function(){},e.prototype.showUpgradePop=function(t,e){this.node.active=!0,this.catId=t,this.callBack=e,c.default.getGameConfigData().baseConfigData.catClothesData;for(var o=c.default.getUserData().catClothesData["cat_"+this.catId],n=0;n=o&&e>=n&&t<=o+a&&e<=n+i?1:0},pointLength:function(t,e){var o=e.x-t.x,n=e.y-t.y;return o*o+n*n},join:function(t,e){void 0===e&&(e=",");var o=[],n=0;for(var a in t)o[n]=t[a],n++;return o.join(e)},concat:function(){var t={};for(var e in arguments)for(var o in arguments[e])t[o]=arguments[e][o];return t},toArray:function(t,e){var o=[];if(e)for(var n in t)o.push(n,t[n]);else for(var n in t)o.push(t[n]);return o},valueArray:function(t,e){var o=[];for(var n in t)o.push(t[n][e]);return o},getObjectLen:function(t){var e=0;for(var o in t)e++;return e},formatTime:function(t){var e=[0,0,0,0,0];return e[4]=t%1e3,e[3]=Math.floor(t/1e3),e[3]>=60&&(e[2]=Math.floor(e[3]/60),e[3]=e[3]%60,e[2]>=60&&(e[1]=Math.floor(e[2]/60),e[2]=e[2]%60,e[1]>=24&&(e[0]=Math.floor(e[1]/24),e[1]=e[1]%24))),e},countdownTime:function(t){var e=[0,0,0];return e[0]=Math.floor(t/3600),e[1]=Math.floor(t%3600/60),e[2]=Math.floor(t%60),e},getTime:function(t,e,o){var n="",a="",i=new Date(t);switch(1==o?(n+=i.getFullYear()+"/",n+=this.fixLength(i.getMonth()+1,2)+"/",n+=this.fixLength(i.getDate(),2)):2==o?(n+=i.getFullYear()+"-",n+=this.fixLength(i.getMonth()+1,2)+"-",n+=this.fixLength(i.getDate(),2)):(n+=i.getFullYear()+"\u5e74",n+=this.fixLength(i.getMonth()+1,2)+"\u6708",n+=this.fixLength(i.getDate(),2)+"\u65e5"),a+=this.fixLength(i.getHours(),2)+":",a+=this.fixLength(i.getMinutes(),2)+":",a+=this.fixLength(i.getSeconds(),2),e){case 1:return n;case 2:return n+" "+a;default:return a}},rnd:function(t,e){return null==e&&(t=0),t+Math.floor(Math.random()*(e-t+1))},rndArray:function(t){for(var e=t.concat(),o=[];e.length>0;)o.push(e.splice(this.rnd(e.length-1),1)[0]);return o},inArray:function(t,e){for(var o in e)if(t==e[o])return o;return-1},countArray:function(t,e,o){var n=0;for(var a in t)e==t[a]&&n++;return o&&(n=t.length-n),n},fixLength:function(t,e,o,n){for(t+="",arguments.length<3&&(o=0),arguments.length<4&&(n="0");t.lengthe&&(t=0==o?t.slice(-e):t.slice(0,e)),t},fixNumber:function(t,e,o){var n=Math.pow(10,e);return Math[o]?Math[o](t*n)/n:Math.round(t*n)/n},formatNumber:function(t,e,o){if(!isNaN(t)&&(arguments.length<2&&(e=1),arguments.length<3&&(o=-1),o>-1&&(t=parseFloat(t).toFixed(o)),1==e)){var n=t.toString().split("."),a=n[0],i="";for(void 0!==n[1]&&(i="."+n[1]),n=[];a.length>3;)n.unshift(a.slice(-3)),a=a.slice(0,a.length-3);a.length>0&&n.unshift(a),t=n.join()+i}return t},fixValue:function(t,e,o,n){return t=Math[n]?Math[n](t):Math.round(t),null!=e&&to&&(t=o),t},isInt:function(t,e,o){var n=parseInt(t);return n==t?null!=e&&no?0:1:0},unsignInt:function(t,e){return t<=0?0:Math[e]?Math[e](t):Math.round(t)},getKey:function(t,e){for(var o in t)if(t[o]==e)return o},getGrid:function(t,e,o,n){for(var a=[],i=0;i255?e+=2:e++;return e},simpleSplit:function(t,e){var o=[];return-1==t.indexOf(e)?(o[0]=t,o[1]=""):(o[0]=t.slice(0,t.indexOf(e)),o[1]=t.slice(t.indexOf(e)+1)),o},getSum:function(t){var e=0;for(var o in t)e+=t[o];return e},getAverage:function(t){var e=0,o=0;for(var n in t)e+=t[n],o++;return e/o},parseToObject:function(t,e,o,n){n=n||".";var a=e.split(n),i=a.pop(),r=t;for(var c in a)r=r[a[c]];return null!=o&&(r[i]=o),r[i]},multicall:function(t,e){var o=e;switch(o.length){case 0:t();break;case 1:t(o[0]);break;case 2:t(o[0],o[1]);break;case 3:t(o[0],o[1],o[2]);break;case 4:t(o[0],o[1],o[2],o[3]);break;case 5:t(o[0],o[1],o[2],o[3],o[4]);break;case 6:t(o[0],o[1],o[2],o[3],o[4],o[5]);break;case 7:t(o[0],o[1],o[2],o[3],o[4],o[5],o[6]);break;case 8:t(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7]);break;case 9:t(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8]);break;case 10:t(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8],o[9])}},getPointAlpha:function(t,e,o){var n=window.document.createElement("canvas"),a=n.getContext("2d");return n.width=1,n.height=1,a.drawImage(t,e,o,1,1,0,0,1,1),a.getImageData(0,0,1,1).data[3]},ajax:function(t,e,o,n){e=e||"",n=n||"GET";var a=new window.XMLHttpRequest;a.onreadystatechange=function(){4==a.readyState&&200==a.status&&o(a.responseText)},a.open(n,t,!0),a.send(e)},getQueryString:function(t){var e=new RegExp("(^|&)"+t+"=([^&]*)(&|$)","i"),o=window.location.search.substr(1).match(e);return null!=o?unescape(o[2]):null},delayCallbackOnce:function(t,e){cc.director.getScheduler().schedule(t,this._defaultTimerTarget,0,0,e,!1)}};o.default=n,cc._RF.pop()},{}],wallpaperPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"5ccb7gpTcZNy6oxSxO1hXsJ","wallpaperPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../../pre/itemSub/wallpaperSubPrefab"),u=t("../../script/common/dataTs"),p=t("../../script/common/enumConfig"),d=t("../../script/pop/popSub/wallpaperSv"),h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.content=null,e.wallpaperSubPrefab=null,e.base_title_label=null,e.parentNode=null,e.nodeData=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setNodeData=function(t,e){for(var o in this.parentNode=e,this.nodeData=t,u.default.langCode==p.LangEnum.zhCN&&"- Coming soon -"==this.nodeData.titleName?this.base_title_label.string="- \u656c\u8bf7\u671f\u5f85 -":this.base_title_label.string=this.nodeData.titleName,this.nodeData.bgArray){var n=cc.instantiate(this.wallpaperSubPrefab);n.getComponent(l.default).setNodeData(this.nodeData.bgArray[o],this),this.content.addChild(n)}},e.prototype.refreshNode=function(t,e){this.parentNode=e,this.nodeData=t;var o=this.content.children;for(var n in o)o[n].getComponent(l.default).setNodeData(this.nodeData.bgArray[n],this)},e.prototype.refreshSubNode=function(){this.parentNode.getComponent(d.default).refreshSubNode()},i([s(cc.Node)],e.prototype,"content",void 0),i([s(cc.Prefab)],e.prototype,"wallpaperSubPrefab",void 0),i([s(cc.Label)],e.prototype,"base_title_label",void 0),i([c],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../../pre/itemSub/wallpaperSubPrefab":"wallpaperSubPrefab","../../script/common/dataTs":"dataTs","../../script/common/enumConfig":"enumConfig","../../script/pop/popSub/wallpaperSv":"wallpaperSv"}],wallpaperSubPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"f4535mVxXNAALqaewBHYpME","wallpaperSubPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../../script/common/dataTs"),u=t("../../script/common/CcJsFunc"),p=t("../item/wallpaperPrefab"),d=t("../../script/manager/GameManager"),h=t("../../script/utils/uma/uma-sdk"),f=t("../../script/common/enumConfig"),m=t("../../script/manager/report-common"),g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.imgContent=null,e.imgLabel=null,e.imgBorder=null,e.imgLock=null,e.parentNode=null,e.userData=null,e.nodeData=null,e.levelNum=null,e.pictureData=null,e.isReward=!1,e}return a(e,t),e.prototype.start=function(){u.default.addbtnTouchEndScale(this.node,this.clickNodeAction.bind(this))},e.prototype.rewardNodeData=function(t,e){void 0===e&&(e=!0),this.isReward=e,this.imgLock.active=!1,this.imgContent.active=!0,this.imgBorder.active=!1;var o="pictureIcon/GameBgicon"+t+".png";u.default.changeSpriteFrame(this.imgContent,o),this.imgBorder.getChildByName("mark").active=!1,this.imgLabel.node.active=!1},e.prototype.setNodeData=function(t,e){this.isReward=!1,this.parentNode=e,this.nodeData=t,this.userData=l.default.getUserData(),this.levelNum=this.userData.playLevelId,this.pictureData=l.default.getPictureData(),l.default.langCode==f.LangEnum.zhCN?this.imgLabel.string=this.nodeData.name:this.imgLabel.string=this.nodeData.en_name;var o="pictureIcon/GameBgicon"+this.nodeData.bgID+".png";u.default.changeSpriteFrame(this.imgContent,o),this.levelNum>this.nodeData.unlockNum?(this.imgLock.active=!1,this.imgContent.active=!0,this.imgBorder.active=!1,this.pictureData.bgNum==this.nodeData.bgID?this.imgBorder.active=!0:this.imgBorder.active=!1):(this.imgLock.active=!0,this.imgContent.active=!1,this.imgBorder.active=!1),d.default.getInstance().collectionMark.bgNum==t.bgID?(this.imgBorder.getChildByName("mark").active=!0,d.default.getInstance().collectionMark.bgNum=0):this.imgBorder.getChildByName("mark").active=!1},e.prototype.clickNodeAction=function(){if(u.default.addClickAudio(),this.levelNum>=this.nodeData.unlockNum&&!this.isReward){this.pictureData.bgNum!=this.nodeData.bgID&&m.default.reportTACommon("collar_bg",{bg_before:this.pictureData.bgNum,bg_after:this.nodeData.bgID}),this.imgBorder.active=!0,this.pictureData.bgNum=this.nodeData.bgID,l.default.savePictureData(this.pictureData),this.parentNode.getComponent(p.default).refreshSubNode(),this.imgBorder.getChildByName("mark").active=!1;var t=this.nodeData.bgID+"";h.default.trackEvent("collar_bg",{ID:t,c_ID:Number(t)}),cc.game.emit(f.EMITKEY.UPDATEPICTURE)}},i([s(cc.Node)],e.prototype,"imgContent",void 0),i([s(cc.Label)],e.prototype,"imgLabel",void 0),i([s(cc.Node)],e.prototype,"imgBorder",void 0),i([s(cc.Node)],e.prototype,"imgLock",void 0),i([c],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/common/dataTs":"dataTs","../../script/common/enumConfig":"enumConfig","../../script/manager/GameManager":"GameManager","../../script/manager/report-common":"report-common","../../script/utils/uma/uma-sdk":"uma-sdk","../item/wallpaperPrefab":"wallpaperPrefab"}],wallpaperSv:[function(t,e,o){"use strict";cc._RF.push(e,"e1a4baQrCVBT5Hpjf/VGnTF","wallpaperSv");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../common/dataTs"),c=t("../../../pre/item/wallpaperPrefab"),s=t("../../../i18n/i18n"),l=t("../../../i18n/gd_language"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.content=null,e.wallpaperPrefab=null,e.dataArray=[],e.i18nArray=[],e}return a(e,t),e.prototype.start=function(){this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_commuter_road)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_starry)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_lamp)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_harbour)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_snow)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_dinner)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_moon)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_lazy_time)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_waiting_alone)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_lighthouse)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_meteor_shower)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_harbour)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_lamp)),this.content.removeAllChildren(),this.dataArray=r.default.gameConfigData.baseConfigData.bgData;var t=0;for(var e in this.dataArray)for(var o in this.dataArray[e].bgArray)t0&&this.refreshSubNode()},e.prototype.refreshSubNode=function(){var t=this.content.children;for(var e in t){var o=this.dataArray[e];t[e].getComponent(c.default).refreshNode(o,this)}},i([d(cc.Node)],e.prototype,"content",void 0),i([d(cc.Prefab)],e.prototype,"wallpaperPrefab",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../../../i18n/gd_language":"gd_language","../../../i18n/i18n":"i18n","../../../pre/item/wallpaperPrefab":"wallpaperPrefab","../../common/dataTs":"dataTs"}],wardrobeLayer:[function(t,e,o){"use strict";cc._RF.push(e,"4448eEzJr1BMqSaSIx1uqZX","wardrobeLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../pre/main/clothesPrefab"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/enumConfig"),u=t("../pop/upgradePop"),p=t("../utils/uma/uma-sdk"),d=t("./mainCultivateLayer"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainCultivateLayer=null,e.changeClothesNode=null,e.scrollContent=null,e.clothesPrefab=null,e.btnLayer=null,e.ribbonNode=null,e.ribbonLabel=null,e.rankBtn=null,e.levelLabel1=null,e.levelLabel2=null,e.upgradePop=null,e.challengeBtn=null,e.clothPadding=20,e.catId=0,e.clothNodeArray=[],e.cultivateComp=null,e.isShowing=!1,e}return a(e,t),e.prototype.start=function(){c.default.addbtnTouchStartScale(this.rankBtn),c.default.addbtnTouchEndScale(this.rankBtn,this.rankFunc.bind(this)),c.default.addbtnTouchCancelScale(this.rankBtn),c.default.addbtnTouchStartScale(this.challengeBtn),c.default.addbtnTouchEndScale(this.challengeBtn,this.challengeBtnFunc.bind(this)),c.default.addbtnTouchCancelScale(this.challengeBtn)},e.prototype.showWardrobelLayer=function(t,e){var o=this;console.log("catId = ",t),this.isShowing||(this.isShowing=!0,this.cultivateComp=e,this.catId=t,this.scrollContent.removeAllChildren(),this.changeClothesNode.active=!0,this.changeClothesNode.y=-cc.winSize.height/2,this.initCatClothesNode(),cc.tween(this.changeClothesNode).by(.3,{y:350},{easing:cc.easing.cubicOut}).start(),this.cultivateComp.houseToBigMiddle(this.catId),cc.tween(this.changeClothesNode).delay(.3).call(function(){o.showBtnLayer(!0)},this).start())},e.prototype.hideWardrobelLayer=function(){var t=this;0!=this.catId&&(this.catId=0,this.isShowing=!1,this.changeClothesNode.stopAllActions(),cc.tween(this.changeClothesNode).to(.2,{y:-cc.winSize.height/2}).call(function(){t.changeClothesNode.active=!1},this).start(),this.hideBtnLayer())},e.prototype.showBtnLayer=function(t){this.btnLayer.active=!0;for(var e=s.default.getUserData().catClothesData["cat_"+this.catId],o=0;o=3?(this.rankBtn.active=!1,this.challengeBtn.active=!1):(2==n.skin?(this.challengeBtn.active=!0,this.rankBtn.active=!1):(this.challengeBtn.active=!1,this.rankBtn.active=!0),this.levelLabel1.string=e[o].clothRank+"",this.levelLabel2.string=e[o].clothRank+1+"")}t&&(cc.tween(this.ribbonNode).set({scale:0}).to(.3,{scale:1},{easing:cc.easing.backOut}).start(),cc.tween(this.rankBtn).set({scale:0}).delay(.15).to(.3,{scale:1},{easing:cc.easing.cubicOut}).start())},e.prototype.hideBtnLayer=function(){this.btnLayer.active=!1},e.prototype.rankFunc=function(t){t.stopPropagation(),cc.log("\u6253\u5f00\u5347\u7ea7\u5f39\u7a97"),this.upgradePop.getComponent(u.default).showUpgradePop(this.catId,this.popCallbackFunc.bind(this))},e.prototype.challengeBtnFunc=function(){this.hideWardrobelLayer(),this.mainCultivateLayer.getComponent(d.default).houseToMinDefault(),cc.game.emit(l.EMITKEY.UPDATETABBARRECEIVE,2)},e.prototype.popCallbackFunc=function(t){void 0===t&&(t=!1),this.cultivateComp.refreshCatCloth(this.catId,t,t),this.refreshClothSelect(),this.showBtnLayer(!1)},e.prototype.initCatClothesNode=function(){var t=s.default.getGameConfigData().baseConfigData.catClothesData,e=s.default.getUserData().catClothesData;console.log("baseConfig catClothesData = ",t),console.log("userData userClothesData = ",e),this.clothNodeArray=[];for(var o="cat_"+this.catId,n=t[o],a=0;a=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/enumConfig"),u=t("../common/spine"),p=t("../common/util"),d=t("../manager/data-manager"),h=t("../manager/DateManager"),f=t("../manager/GameManager"),m=t("../manager/report-common"),g=cc._decorator,y=g.ccclass,v=g.property,b=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.titleNode=null,e.barefootNode=null,e.barefootTitle=null,e.barefootDesc=null,e.sheepSp=null,e.sheepFlagSp=null,e.winDescNode=null,e.backBtn=null,e.shareNode=null,e.shareBtn=null,e.noShareBtn=null,e.shareCloseBtn=null,e.timeNode=null,e.flashSp=null,e}return a(e,t),e.prototype.start=function(){c.default.addbtnTouchStartScale(this.backBtn),c.default.addbtnTouchEndScale(this.backBtn,this.backBtnFunc.bind(this)),c.default.addbtnTouchCancelScale(this.backBtn),c.default.addbtnTouchStartScale(this.shareBtn),c.default.addbtnTouchEndScale(this.shareBtn,this.shareBtnFunc.bind(this)),c.default.addbtnTouchCancelScale(this.shareBtn),c.default.addbtnTouchStartScale(this.noShareBtn),c.default.addbtnTouchEndScale(this.noShareBtn,this.noShareBtnFunc.bind(this)),c.default.addbtnTouchCancelScale(this.noShareBtn),c.default.addbtnTouchStartScale(this.shareCloseBtn),c.default.addbtnTouchEndScale(this.shareCloseBtn,this.shareCloseBtnFunc.bind(this)),c.default.addbtnTouchCancelScale(this.shareCloseBtn)},e.prototype.shareBtnFunc=function(){cc.game.emit(l.EMITKEY.TTSHARERECORD)},e.prototype.noShareBtnFunc=function(){this.shareNode.active=!1,this.showBackBtn()},e.prototype.shareCloseBtnFunc=function(){this.shareNode.active=!1,this.showBackBtn()},e.prototype.backBtnFunc=function(){cc.game.emit(l.EMITKEY.SHOWMAINLAYER)},e.prototype.showBackBtn=function(){cc.tween(this.backBtn).delay(.5).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start()},e.prototype.showWinPop=function(t){var e=this;this.node.active=!0,this.backBtn.scale=0,this.shareNode.scale=0;var o=d.default.getTAUserInfo();m.default.reportTACommon("game_finish",o),this.titleNode.getComponent(cc.Label).string=h.default.getDateString();var n=p.default.countdownTime(t.time),a=n[1]<10?"0"+n[1]:n[1]+"",i=n[2]<10?"0"+n[2]:n[2]+"";if(this.timeNode.getComponent(cc.Label).string="\u901a\u5173\u7528\u65f6"+a+"\u5206"+i+"\u79d2",f.default.getInstance().gameType==l.GAMETYPE.GAMEDAILY)this.barefootDesc.getComponent(cc.Label).string="\u52a0\u5165\u7f8a\u7fa4",r.default.getRankInfoData(function(t){d.default.setRankData(t),f.default.getInstance().rankInfo=t.data;var o=12;f.default.getInstance().rankInfo&&(o=f.default.getInstance().rankInfo.user.index);var n="\u60a8\u6240\u5728\u7684\u5730\u533a\u4e3a\u7b2c "+o+" \u540d";e.winDescNode.getComponent(cc.RichText).string=n});else if(f.default.getInstance().gameType==l.GAMETYPE.GAMETOPIC){this.barefootDesc.getComponent(cc.Label).string="\u52a0\u5165"+this.getTeamName();var c="";d.default.topicRankInfo&&d.default.topicModel&&(c=1==d.default.topicModel.info.type?d.default.topicRankInfo.tomb?d.default.topicRankInfo.tomb.length+"":"0":d.default.topicRankInfo.taoist?d.default.topicRankInfo.taoist.length+"":"0");var s=""+this.getTeamName()+"\u7f8a\u961f\u5df2\u6709 "+c+" \u7f8a";e.winDescNode.getComponent(cc.RichText).string=s}this.playBareFoot(),e.sheepSp.getComponent(u.default).play("Finish1",1,function(){e.sheepSp.getComponent(u.default).play("Finish2",0)}),e.flashSp.active=!1,cc.tween(e.sheepFlagSp).to(0,{scale:0}).delay(1).call(function(){e.playDescSp()}).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start()},e.prototype.playDescSp=function(){var t=this;if(f.default.getInstance().gameType==l.GAMETYPE.GAMEDAILY){var e=s.default.getSheepClothesData(),o=!1,n="sheep/Sheeps",a="skin_00",i=null;e=c.default.shuffle(e);for(var r=0;r=2?1==d.default.topicModel.info.type?t[0]:t[1]:""},e.prototype.showShareNode=function(){this.shareNode.active=!0,cc.tween(this.shareNode).delay(.5).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start()},e.prototype.playBareFoot=function(){var t=this;this.barefootNode.active=!0,cc.tween(this.barefootNode).to(0,{scale:0}).to(.1,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).call(function(){cc.tween(t.barefootTitle).to(.1,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).call(function(){cc.tween(t.barefootDesc).to(.1,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start()},t).start()},this).start()},i([v(cc.Node)],e.prototype,"titleNode",void 0),i([v(cc.Node)],e.prototype,"barefootNode",void 0),i([v(cc.Node)],e.prototype,"barefootTitle",void 0),i([v(cc.Node)],e.prototype,"barefootDesc",void 0),i([v(cc.Node)],e.prototype,"sheepSp",void 0),i([v(cc.Node)],e.prototype,"sheepFlagSp",void 0),i([v(cc.Node)],e.prototype,"winDescNode",void 0),i([v(cc.Node)],e.prototype,"backBtn",void 0),i([v(cc.Node)],e.prototype,"shareNode",void 0),i([v(cc.Node)],e.prototype,"shareBtn",void 0),i([v(cc.Node)],e.prototype,"noShareBtn",void 0),i([v(cc.Node)],e.prototype,"shareCloseBtn",void 0),i([v(cc.Node)],e.prototype,"timeNode",void 0),i([v({type:cc.Node,tooltip:"flash\u52a8\u753b"})],e.prototype,"flashSp",void 0),i([y],e)}(cc.Component);o.default=b,cc._RF.pop()},{"../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/spine":"spine","../common/util":"util","../manager/DateManager":"DateManager","../manager/GameManager":"GameManager","../manager/data-manager":"data-manager","../manager/report-common":"report-common"}],"wx-sdk":[function(t,e,o){"use strict";cc._RF.push(e,"dbb360ys3xP25Wexckd5YGf","wx-sdk");var n=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},a=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]n.first||o.second>n.second||o.third>n.third)},t.isWxVersionLower=function(t){if(cc.sys.platform!=cc.sys.WECHAT_GAME&&cc.sys.platform!=cc.sys.WECHAT_GAME_SUB)return!0;var e=wx.getSystemInfoSync().SDKVersion,o=!1;return this.isVersionLower(e,t)&&(o=!0),cc.log("[sdk] is wx version lower",e,t,o),o},t.isWxVersionHigher=function(t){return!this.isWxVersionLower(t)},t.wxRankScoreUpdate=function(t,e,o){cc.sys.platform==cc.sys.WECHAT_GAME&&wx.getOpenDataContext().postMessage({cmd:"update-"+t,type:o,score:e})},t.wxRankScoreRemove=function(t){cc.sys.platform==cc.sys.WECHAT_GAME&&wx.getOpenDataContext().postMessage({cmd:"remove-"+t,score:0})},t.wxShowSubContext=function(t,e,o,n){cc.sys.platform==cc.sys.WECHAT_GAME&&wx.getOpenDataContext().postMessage({cmd:"show-"+t,setData:e,w:o,h:n})},t.onShareAppMessage=function(t){wx.showShareMenu({withShareTicket:!0}),wx.onShareAppMessage(function(){return{title:t.title,imageUrl:t.imageUrl,query:t.query}}),wx.onShareTimeline(function(){return{title:"\u7f8a\u4e86\u4e2a\u7f8a",imageUrl:"",query:"a=1&b=2"}})},t.onShareAppMessageQuery=function(){return wx.getEnterOptionsSync().query},t.wxShare=function(t,e){if(cc.sys.platform==cc.sys.WECHAT_GAME){var o=cc.winSize;e||(e=canvas.toTempFilePathSync({destHeight:o.width/5*4})),wx.shareAppMessage({title:t,imageUrl:e})}},t.wxShareWithCallBack=function(t){if(t.tag,cc.sys.isBrowser)return t.success&&t.success("local"),void(t.complete&&t.complete("local"));if(cc.sys.platform!=cc.sys.WECHAT_GAME)return t.success&&t.success("local"),void(t.complete&&t.complete("local"));null==t.validate&&(t.validate=!0),this._beforeOnHideAction=1;var e=!1,o=!1,n=!1,a=function(e){o||(console.log("\u6784\u5efa success"),t.success&&t.success(e),o=!0)},r=function(e){t.complete&&t.complete(e)},c=Date.now();this.setOnShow(function(){Date.now()-c<1e3*i.SHARE_CALLBACK_TIME&&(e=!0)}),this.setOnShow(function(){return!(!e||o)&&(t.validate&&Date.now()-c<1e3*i.SHARE_CALLBACK_TIME?void(Math.random()-1&&this.onShowFunction.splice(e,1)},t.setOnShowOnce=function(t){t&&this.onShowOnceFunction.push(t)},t.setOffShowOnce=function(t){var e=this.onShowOnceFunction.indexOf(t);e>-1&&this.onShowOnceFunction.splice(e,1)},t.setOnHide=function(t){t&&this.onHideFunction.push(t)},t.setOffHide=function(t){var e=this.onHideFunction.indexOf(t);e>-1&&this.onHideFunction.splice(e,1)},t.setOnHideOnce=function(t){t&&this.onHideOnceFunction.push(t)},t.setOffHideOnce=function(t){var e=this.onHideOnceFunction.indexOf(t);e>-1&&this.onHideOnceFunction.splice(e,1)},t.getAppVersion=function(){if(cc.sys.platform==cc.sys.WECHAT_GAME&&wx.getAccountInfoSync){var t=wx.getAccountInfoSync();return cc.log("[sdk] accountInfo:",t),t.miniProgram.version||""}return""},t.setClipboardData=function(t){wx.setClipboardData({data:t,success:function(){wx.getClipboardData({success:function(t){cc.log("wx get clipboard data:",t.data)}})}})},t.showToast=function(t){wx.showToast(t)},t.showBannerAd=function(){},t.hideBannerAd=function(){},t.showInterstitialAd=function(){},t.showRewardVideoAd=function(t,e,o){if(wx){var n=!1,a=wx.createRewardedVideoAd({adUnitId:t});a.onClose(function(t){0==n&&(n=!0,t&&t.isEnded||void 0===t?e():o(!1,"\u89c2\u770b\u5931\u8d25"))}),a.onError(function(t){0==n&&(n=!0,o(!1,t.errMsg))}),a.load().then(function(){a.show()}).catch(function(){o(!1,"\u5e7f\u544a\u62c9\u53d6\u5931\u8d25")})}else o(!1,"wx undefined")},t.onShowFunction=[],t.onHideFunction=[],t.onShowOnceFunction=[],t.onHideOnceFunction=[],t.gameIconAd=null,t.gameIconAdShown=!1,t}();o.default=r,r.init(),cc._RF.pop()},{"../sdk":"sdk"}]},{},["gd_language","i18n","BulletPrefab","brickPrefab","collectPrefab","prop-prefab","wallpaperPrefab","brickSubPrefab","collectSubPrefab","wallpaperSubPrefab","blockPrefab","catClawPrefabs","clothesPrefab","cookiePrefab","cookieRewardNode","flying-item-pop-coin","flying-item-pop-fish","rewardPrefab","blockEditorPrefab","setBloackNumPrefab","topic-card-node","topic-header-node","topic-sheep-node","PrivacyPolicy","calendar-item","daily-challenge","cat-house-progress","main-cookie-reward","topic-rank","topic-ui-layer","topic-ui","ApiTool","api-sheep","fontTipsLayer","transitionsLayer","CcJsFunc","ad","config","dataModel","dataTs","enumConfig","http","key-map","mask","maskLayer","android-sdk","audio","native-bridge","native-def","native-event","share","tt-sdk","wx-sdk","sdk","spine","util","CoinEmitter","CoinEmitterByTime","SpriteWithMask","SpriteWithMaskAssembler","cubic-bezier-curve","curve-sample","export-helper","export","mesh-vertex","spline-node","spline","typed-event","player-head-atlas","reward-emitter","snake-ctrl-point","snake-sprite-assembler","spline-sprite","chessboard","crushArea","game-top-ui","gameLayer","gameUiLayer","moveOutArea","loadCanvas","loadLayer","catNode","houseLayer","main-rank","main-tabbar","mainCanvas","mainCultivateLayer","mainLayer","mainUiLayer","page-house","page-main","topUiLayer","upgrade-tip","wardrobeLayer","DateManager","GameManager","PoolManager","data-manager","popManager","report-common","blockArea","editorGameLayer","editorGameUiLayer","editorPopCommon","editorTips","mapArea","mapEditor","newLevelPop","saveAsPop","selectLevelPop","setBlockNumPop","uiControler","ScrollMsg","bullet-screen","sheep-card","sheep-flock-icon","sheep-flock","FriendRankPop","PersonalPop","PrivacyUserPop","TodayRankPop","bullet-screen-pop","challengeSucPop","failPop","getLovePop","getPropPop","giftLayerAnimate","loseCookiePop","loseLovePop","nextLevelPop","noLimitPop","nothingPop","picturePop","brickSv","collectSv","sheepRankItem","sprintRewardBar","wallpaperSv","setupPop","shareNodePop","sheep-rank-pop","show-daily-pop","show-reward-pop","sprintRewardPop","stagePop","topicChoosePop","topicCollectPop","topicJoinedPop","topicLastWinPop","topicNewPop","unlock-build-pop","unlock-build","upgradePop","winPop","data-env","data-type","network-tool","thinkingdata.mg.cocoscreator.min","FriendSubContextView","TodaySubContextView","bullet-item","register-head-image","str-utils","uma-sdk"]); +window.__require = function t(e, o, n) { + function a(r, c) { + if (!o[r]) { + if (!e[r]) { + var s = r.split("/"); + if (s = s[s.length - 1], !e[s]) { + var l = "function" == typeof __require && __require; + if (!c && l) return l(s, !0); + if (i) return i(s, !0); + throw new Error("Cannot find module '" + r + "'") + } + r = s + } + var u = o[r] = { + exports: {} + }; + e[r][0].call(u.exports, function(t) { + return a(e[r][1][t] || t) + }, u, u.exports, t, e, o, n) + } + return o[r].exports + } + for (var i = "function" == typeof __require && __require, r = 0; r < n.length; r++) a(n[r]); + return a +}({ + 1: [ + function(t, e) { + "use strict"; + var o = new RegExp("%[a-f0-9]{2}", "gi"), + n = new RegExp("(%[a-f0-9]{2})+", "gi"); + + function a(t, e) { + try { + return decodeURIComponent(t.join("")) + } catch (i) {} + if (1 === t.length) return t; + e = e || 1; + var o = t.slice(0, e), + n = t.slice(e); + return Array.prototype.concat.call([], a(o), a(n)) + } + + function i(t) { + try { + return decodeURIComponent(t) + } catch (i) { + for (var e = t.match(o), n = 1; n < e.length; n++) e = (t = a(e, n).join("")).match(o); + return t + } + } + + function r(t) { + for (var e = { + "%FE%FF": "��", + "%FF%FE": "��" + }, o = n.exec(t); o;) { + try { + e[o[0]] = decodeURIComponent(o[0]) + } catch (l) { + var a = i(o[0]); + a !== o[0] && (e[o[0]] = a) + } + o = n.exec(t) + } + e["%C2"] = "�"; + for (var r = Object.keys(e), c = 0; c < r.length; c++) { + var s = r[c]; + t = t.replace(new RegExp(s, "g"), e[s]) + } + return t + } + e.exports = function(t) { + if ("string" != typeof t) throw new TypeError("Expected `encodedURI` to be of type `string`, got `" + typeof t + "`"); + try { + return t = t.replace(/\+/g, " "), decodeURIComponent(t) + } catch (e) { + return r(t) + } + } + }, {} + ], + 2: [ + function(t, e) { + "use strict"; + e.exports = function(t, e) { + for (var o = {}, n = Object.keys(t), a = Array.isArray(e), i = 0; i < n.length; i++) { + var r = n[i], + c = t[r]; + (a ? -1 !== e.indexOf(r) : e(r, c, t)) && (o[r] = c) + } + return o + } + }, {} + ], + 3: [ + function(t, e, o) { + "use strict"; + const n = t("strict-uri-encode"), + a = t("decode-uri-component"), + i = t("split-on-first"), + r = t("filter-obj"), + c = t => null == t, + s = Symbol("encodeFragmentIdentifier"); + + function l(t) { + switch (t.arrayFormat) { + case "index": + return e => (o, n) => { + const a = o.length; + return void 0 === n || t.skipNull && null === n || t.skipEmptyString && "" === n ? o : null === n ? [...o, [d(e, t), "[", a, "]"].join("")] : [...o, [d(e, t), "[", d(a, t), "]=", d(n, t)].join("")] + }; + case "bracket": + return e => (o, n) => void 0 === n || t.skipNull && null === n || t.skipEmptyString && "" === n ? o : null === n ? [...o, [d(e, t), "[]"].join("")] : [...o, [d(e, t), "[]=", d(n, t)].join("")]; + case "colon-list-separator": + return e => (o, n) => void 0 === n || t.skipNull && null === n || t.skipEmptyString && "" === n ? o : null === n ? [...o, [d(e, t), ":list="].join("")] : [...o, [d(e, t), ":list=", d(n, t)].join("")]; + case "comma": + case "separator": + case "bracket-separator": + { + const e = "bracket-separator" === t.arrayFormat ? "[]=" : "="; + return o => (n, a) => void 0 === a || t.skipNull && null === a || t.skipEmptyString && "" === a ? n : (a = null === a ? "" : a, 0 === n.length ? [ + [d(o, t), e, d(a, t)].join("") + ] : [ + [n, d(a, t)].join(t.arrayFormatSeparator) + ]) + } + default: + return e => (o, n) => void 0 === n || t.skipNull && null === n || t.skipEmptyString && "" === n ? o : null === n ? [...o, d(e, t)] : [...o, [d(e, t), "=", d(n, t)].join("")] + } + } + + function u(t) { + let e; + switch (t.arrayFormat) { + case "index": + return (t, o, n) => { + e = /\[(\d*)\]$/.exec(t), t = t.replace(/\[\d*\]$/, ""), e ? (void 0 === n[t] && (n[t] = {}), n[t][e[1]] = o) : n[t] = o + }; + case "bracket": + return (t, o, n) => { + e = /(\[\])$/.exec(t), t = t.replace(/\[\]$/, ""), e ? void 0 !== n[t] ? n[t] = [].concat(n[t], o) : n[t] = [o] : n[t] = o + }; + case "colon-list-separator": + return (t, o, n) => { + e = /(:list)$/.exec(t), t = t.replace(/:list$/, ""), e ? void 0 !== n[t] ? n[t] = [].concat(n[t], o) : n[t] = [o] : n[t] = o + }; + case "comma": + case "separator": + return (e, o, n) => { + const a = "string" == typeof o && o.includes(t.arrayFormatSeparator), + i = "string" == typeof o && !a && h(o, t).includes(t.arrayFormatSeparator); + o = i ? h(o, t) : o; + const r = a || i ? o.split(t.arrayFormatSeparator).map(e => h(e, t)) : null === o ? o : h(o, t); + n[e] = r + }; + case "bracket-separator": + return (e, o, n) => { + const a = /(\[\])$/.test(e); + if (e = e.replace(/\[\]$/, ""), !a) return void(n[e] = o ? h(o, t) : o); + const i = null === o ? [] : o.split(t.arrayFormatSeparator).map(e => h(e, t)); + void 0 !== n[e] ? n[e] = [].concat(n[e], i) : n[e] = i + }; + default: + return (t, e, o) => { + void 0 !== o[t] ? o[t] = [].concat(o[t], e) : o[t] = e + } + } + } + + function p(t) { + if ("string" != typeof t || 1 !== t.length) throw new TypeError("arrayFormatSeparator must be single character string") + } + + function d(t, e) { + return e.encode ? e.strict ? n(t) : encodeURIComponent(t) : t + } + + function h(t, e) { + return e.decode ? a(t) : t + } + + function f(t) { + return Array.isArray(t) ? t.sort() : "object" == typeof t ? f(Object.keys(t)).sort((t, e) => Number(t) - Number(e)).map(e => t[e]) : t + } + + function m(t) { + const e = t.indexOf("#"); + return -1 !== e && (t = t.slice(0, e)), t + } + + function g(t) { + let e = ""; + const o = t.indexOf("#"); + return -1 !== o && (e = t.slice(o)), e + } + + function y(t) { + const e = (t = m(t)).indexOf("?"); + return -1 === e ? "" : t.slice(e + 1) + } + + function v(t, e) { + return e.parseNumbers && !Number.isNaN(Number(t)) && "string" == typeof t && "" !== t.trim() ? t = Number(t) : !e.parseBooleans || null === t || "true" !== t.toLowerCase() && "false" !== t.toLowerCase() || (t = "true" === t.toLowerCase()), t + } + + function b(t, e) { + p((e = Object.assign({ + decode: !0, + sort: !0, + arrayFormat: "none", + arrayFormatSeparator: ",", + parseNumbers: !1, + parseBooleans: !1 + }, e)).arrayFormatSeparator); + const o = u(e), + n = Object.create(null); + if ("string" != typeof t) return n; + if (!(t = t.trim().replace(/^[?#&]/, ""))) return n; + for (const a of t.split("&")) { + if ("" === a) continue; + let [t, r] = i(e.decode ? a.replace(/\+/g, " ") : a, "="); + r = void 0 === r ? null : ["comma", "separator", "bracket-separator"].includes(e.arrayFormat) ? r : h(r, e), o(h(t, e), r, n) + } + for (const a of Object.keys(n)) { + const t = n[a]; + if ("object" == typeof t && null !== t) + for (const o of Object.keys(t)) t[o] = v(t[o], e); + else n[a] = v(t, e) + } + return !1 === e.sort ? n : (!0 === e.sort ? Object.keys(n).sort() : Object.keys(n).sort(e.sort)).reduce((t, e) => { + const o = n[e]; + return Boolean(o) && "object" == typeof o && !Array.isArray(o) ? t[e] = f(o) : t[e] = o, t + }, Object.create(null)) + } + o.extract = y, o.parse = b, o.stringify = (t, e) => { + if (!t) return ""; + p((e = Object.assign({ + encode: !0, + strict: !0, + arrayFormat: "none", + arrayFormatSeparator: "," + }, e)).arrayFormatSeparator); + const o = o => e.skipNull && c(t[o]) || e.skipEmptyString && "" === t[o], + n = l(e), + a = {}; + for (const r of Object.keys(t)) o(r) || (a[r] = t[r]); + const i = Object.keys(a); + return !1 !== e.sort && i.sort(e.sort), i.map(o => { + const a = t[o]; + return void 0 === a ? "" : null === a ? d(o, e) : Array.isArray(a) ? 0 === a.length && "bracket-separator" === e.arrayFormat ? d(o, e) + "[]" : a.reduce(n(o), []).join("&") : d(o, e) + "=" + d(a, e) + }).filter(t => t.length > 0).join("&") + }, o.parseUrl = (t, e) => { + e = Object.assign({ + decode: !0 + }, e); + const [o, n] = i(t, "#"); + return Object.assign({ + url: o.split("?")[0] || "", + query: b(y(t), e) + }, e && e.parseFragmentIdentifier && n ? { + fragmentIdentifier: h(n, e) + } : {}) + }, o.stringifyUrl = (t, e) => { + e = Object.assign({ + encode: !0, + strict: !0, + [s]: !0 + }, e); + const n = m(t.url).split("?")[0] || "", + a = o.extract(t.url), + i = o.parse(a, { + sort: !1 + }), + r = Object.assign(i, t.query); + let c = o.stringify(r, e); + c && (c = `?${c}`); + let l = g(t.url); + return t.fragmentIdentifier && (l = `#${e[s]?d(t.fragmentIdentifier,e):t.fragmentIdentifier}`), `${n}${c}${l}` + }, o.pick = (t, e, n) => { + n = Object.assign({ + parseFragmentIdentifier: !0, + [s]: !1 + }, n); + const { + url: a, + query: i, + fragmentIdentifier: c + } = o.parseUrl(t, n); + return o.stringifyUrl({ + url: a, + query: r(i, e), + fragmentIdentifier: c + }, n) + }, o.exclude = (t, e, n) => { + const a = Array.isArray(e) ? t => !e.includes(t) : (t, o) => !e(t, o); + return o.pick(t, a, n) + } + }, { + "decode-uri-component": 1, + "filter-obj": 2, + "split-on-first": 4, + "strict-uri-encode": 5 + } + ], + 4: [ + function(t, e) { + "use strict"; + e.exports = (t, e) => { + if ("string" != typeof t || "string" != typeof e) throw new TypeError("Expected the arguments to be of type `string`"); + if ("" === e) return [t]; + const o = t.indexOf(e); + return -1 === o ? [t] : [t.slice(0, o), t.slice(o + e.length)] + } + }, {} + ], + 5: [ + function(t, e) { + "use strict"; + e.exports = t => encodeURIComponent(t).replace(/[!'()*]/g, t => `%${t.charCodeAt(0).toString(16).toUpperCase()}`) + }, {} + ], + ApiTool: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "b8fa1Acz1tD5ZSWCVi3x62F", "ApiTool"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }); + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var i = function(t) { + function e() { + return null !== t && t.apply(this, arguments) || this + } + return a(e, t), Object.defineProperty(e, "instance", { + get: function() { + return this._instance || (this._instance = new e), this._instance + }, + enumerable: !1, + configurable: !0 + }), e._instance = null, e.avatar = "", e.dailyAllNumber = 0, e.dailywinNumber = 0, e + }(cc.Component); + o.default = i, cc._RF.pop() + }, {} + ], + BulletPrefab: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "36bd1+aRohPD6vyVZmmE1za", "BulletPrefab"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../script/common/CcJsFunc"), + c = t("../../script/manager/data-manager"), + s = t("../../script/tools/str-utils"), + l = cc._decorator, + u = l.ccclass, + p = l.property, + d = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.speed = 0, e.contentLabel = null, e.header = null, e.border = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.setupData = function(t) { + if (t) { + var e = t.content; + if (e || (e = "雄起"), t.region && 1 == t.type) e = t.region + t.content; + else if (2 == t.type) + if (c.default.rankUserInfo)(o = c.default.rankUserInfo.fail) && 0 != o || (o = 1), e = s.default.formatStr(t.content, o); + else { + var o = r.default.randomNum(1, 50); + e = s.default.formatStr(t.content, o) + } + this.contentLabel.string = e, 1 == t.state ? this.contentLabel.node.color = new cc.Color(255, 246, 0) : this.contentLabel.node.color = new cc.Color(255, 255, 255), r.default.setAvatar(this.header, t.avatar), t.isSelf ? this.border.active = !0 : this.border.active = !1 + } + }, i([p({ + type: cc.Label, + tooltip: "内容" + })], e.prototype, "contentLabel", void 0), i([p({ + type: cc.Node, + tooltip: "头像" + })], e.prototype, "header", void 0), i([p({ + type: cc.Node, + tooltip: "边框" + })], e.prototype, "border", void 0), i([u], e) + }(cc.Component); + o.default = d, cc._RF.pop() + }, { + "../../script/common/CcJsFunc": "CcJsFunc", + "../../script/manager/data-manager": "data-manager", + "../../script/tools/str-utils": "str-utils" + } + ], + CcJsFunc: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "3f1d9y5Ey5CfqFDLJVTW6yo", "CcJsFunc"), Object.defineProperty(o, "__esModule", { + value: !0 + }); + var n = t("../effect/player-head-atlas"), + a = t("./native/audio"), + i = t("./sdk"), + r = function() { + function t() {} + return t.shuffle = function(t) { + for (var e = t.length - 1; e >= 0; e--) { + var o = Math.floor(Math.random() * (e + 1)), + n = t[o]; + t[o] = t[e], t[e] = n + } + return t + }, t.addClickAudio = function() { + a.default.playAudioMusic("audio/sound/clickBlock.mp3", !1), i.default.vibrateShort() + }, t.addbtnTouchStartScale = function(t, e) { + t.on("touchstart", function() { + this.addClickAudio(), cc.tween(t).to(.1, { + scale: .9 + }).start(), e && e() + }, this) + }, t.addbtnTouchEndScale = function(t, e) { + t.on("touchend", function(o) { + cc.tween(t).to(.1, { + scale: 1 + }).start(), e && (t.stopAllActions(), t.scale = 1, e(o)) + }, this) + }, t.addbtnTouchCancelScale = function(t, e) { + t.on("touchcancel", function() { + cc.tween(t).to(.1, { + scale: 1 + }).start(), e && e() + }, this) + }, t.addTargetTouchUpInside = function(t, e) { + t.on("touchstart", function() { + this.addClickAudio(), cc.tween(t).to(.1, { + scale: .9 + }).start() + }, this), t.on("touchcancel", function() { + cc.tween(t).to(.1, { + scale: 1 + }).start() + }, this), t.on("touchend", function(o) { + cc.tween(t).to(.1, { + scale: 1 + }).start(), e && (t.stopAllActions(), t.scale = 1, e(o)) + }, this) + }, t.addbtnTouchOriginStartScale = function(t, e) { + var o = .9, + n = .9; + t.scaleX < 0 && (o = -o), t.scaleY < 0 && (n = -n), t.on("touchstart", function() { + this.addClickAudio(), cc.tween(t).to(.1, { + scaleX: o, + scaleY: n + }).start(), e && e() + }, this) + }, t.addbtnTouchOriginEndScale = function(t, e) { + var o = 1, + n = 1; + t.scaleX < 0 && (o = -o), t.scaleY < 0 && (n = -n), t.on("touchend", function(a) { + cc.tween(t).to(.1, { + scaleX: o, + scaleY: n + }).start(), e && (t.stopAllActions(), t.scaleX = o, t.scaleY = n, e(a)) + }, this) + }, t.addbtnTouchOriginCancelScale = function(t, e) { + var o = 1, + n = 1; + t.scaleX < 0 && (o = -o), t.scaleY < 0 && (n = -n), t.on("touchcancel", function() { + cc.tween(t).to(.1, { + scaleX: o, + scaleY: n + }).start(), e && e() + }, this) + }, t.setAnimation = function(t, e, o, n, a) { + var i = new cc.Node, + r = (i.addComponent(cc.Sprite), i.addComponent(cc.Animation)); + return cc.loader.loadRes(t, cc.SpriteAtlas, function(t, i) { + if (e) + for (var c = [], s = 0; s < e.length; s++) c.push(i.getSpriteFrame(e[s])); + else i.getSpriteFrames(); + var l = cc.AnimationClip.createWithSpriteFrames(null, o); + l.name = n, 0 == a ? l.wrapMode = cc.WrapMode.Loop : 1 == a && (l.wrapMode = cc.WrapMode.Normal), r.addClip(l), r.play(n) + }), i + }, t.changeSpriteFrame = function(t, e, o, n, a) { + var i = this; + o = o || function() {}, this._spriteFrameCache || (this._spriteFrameCache = {}); + var r = t.getComponent(cc.Sprite); + r.pp_url = e; + var c = this._spriteFrameCache[e]; + if (c) return r.spriteFrame = c, void o(); + n && (r.spriteFrame = null), cc.loader.loadRes(e, cc.SpriteFrame, function(t, n) { + t ? cc.error("SpriteFrame加载错误, 节点名: " + r.node.name + ", url: " + e) : (a && (i._spriteFrameCache[e] = n), r.pp_url === e && (r.spriteFrame = n, o())) + }) + }, t.loadResSpriteFrame = function(t, e) { + var o = this; + e = e || function() {}, this._spriteFrameCache || (this._spriteFrameCache = {}), this._loadResIndex || (this._loadResIndex = 0); + var n = t[this._loadResIndex]; + this._spriteFrameCache[n] ? (o._loadResIndex++, o._loadResIndex >= t.length ? (o._loadResIndex = 0, e()) : o.loadResSpriteFrame(t, e)) : cc.loader.loadRes(n, cc.SpriteFrame, function(a, i) { + a ? cc.error("SpriteFrame加载错误, 节点名: , url: " + n) : (o._spriteFrameCache[n] = i, o._loadResIndex++, o._loadResIndex >= t.length ? (o._loadResIndex = 0, e()) : o.loadResSpriteFrame(t, e)) + }) + }, t.getUrlSpriteFrame = function(t) { + return this._spriteFrameCache[t] || !1 + }, t.sliceURL = function(t) { + return /.+(?=\.png)/i.exec(t)[0].slice(10) + }, t.playFontAnimation = function(t, e, o, n) { + var a = { + num: e + }, + i = t.getComponent(cc.Label); + cc.tween(t).to(.05, { + scale: 1.3 + }).to(.05, { + scale: 1 + }).to(.05, { + scale: 1.3 + }).to(.05, { + scale: 1 + }).repeat(10).start(), i.string = a.num + ""; + var r = o - e < 10 ? .3 : (o - e) / 10 * .3; + r > 1 && (r = 1), cc.tween(a).to(r, { + num: o + }, { + progress: function(t, e, o, a) { + return i.string = n ? n + Math.ceil(t + (e - t) * a) + "" : Math.ceil(t + (e - t) * a) + "", t + (e - t) * a + } + }).call(function() { + t.stopAllActions(), t.scale = 1 + }).start() + }, t.loadWxHeadImgSpriteFrame = function(t, e, o, n, a, i) { + var r = this; + o = o || function() {}, this._spriteFrameCache || (this._spriteFrameCache = {}); + var c = t.getComponent(cc.Sprite); + c.pp_url = e; + var s = this._spriteFrameCache[e]; + if (s) return c.spriteFrame = s, void o(); + n && (c.spriteFrame = null); + var l = { + url: e + }; + cc.loader.load(l, function(t, n) { + if (t) cc.error("SpriteFrame加载错误, 节点名: " + c.node.name + ", url: " + e); + else { + var a = new cc.SpriteFrame(n); + i instanceof Array && (a.insetTop = i[0] || 0, a.insetBottom = i[1] || 0, a.insetLeft = i[2] || 0, a.insetRight = i[3] || 0), r._spriteFrameCache[e] = a, c.pp_url === e && (c.spriteFrame = a, o()) + } + }) + }, t.changeWXHeadImgSize = function(t, e) { + for (var o = t.split("/"), n = "", a = 0; a < o.length - 1; a++) n += o[a] + "/"; + return n + e + }, t.preLoader = function(t, e) { + for (var o = [], n = 0; n < t.length; n++) o.push(cc.url.raw("resources/" + t[n])); + cc.loader.load(o, function(t, o) { + if (t) + for (var n = 0; n < t.length; n++) console.log("cc.js.preLoader Error: url [" + t[n] + "]: " + o.getError(t[n])); + e && e() + }) + }, t.setProgressBar = function(t, e, o) { + t.getComponent("progressBar").setProgressVal(e, o) + }, t.randomNum = function(t, e) { + return Math.round(Math.random() * (e - t) + t) + }, t.randomCharNum = function(t) { + void 0 === t && (t = 16); + for (var e = [ + [], + [], + [] + ], o = 0; o < 10; o++) e[0].push(o); + for (o = 0; o < 26; o++) e[1].push(String.fromCharCode(97 + o)); + for (o = 0; o < 26; o++) e[2].push(String.fromCharCode(65 + o)); + var n = ""; + for (o = 0; o < t; o++) { + var a = e[this.randomNum(0, 2)]; + n += a[this.randomNum(0, a.length - 1)] + } + return n + }, t.getWorldPosition = function(t) { + return t.convertToWorldSpaceAR(cc.v2(0, 0)) + }, t.getNodePosition = function(t, e) { + return t.convertToNodeSpaceAR(e) + }, t.getMonthShorthand = function(t) { + var e = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + return t >= e || t < 0 ? "Jan" : e[t] + }, t.ifHaveNode = function(t, e, o) { + return t || (t = cc.instantiate(e), o.addChild(t)), t + }, t.setAvatar = function(t, e, o) { + var a = this; + if (t) { + var r = t.getComponent(cc.Sprite); + if (!e || 0 == e.length) { + var c = "rank/rank_icon_default.png"; + return i.default.isPlatform(i.Platform.wx) && (c = "rank/rank_icon_default_wx.png"), void cc.loader.loadRes(c, cc.SpriteFrame, function(t, e) { + t ? console.log("avatar err = " + t) : r.spriteFrame = e + }) + } + cc.assetManager.loadRemote(e, { + ext: ".head" + }, function(e, i) { + if (o) { + var c = n.default.instance; + cc.isValid(a) && cc.isValid(t) && cc.isValid(r) && (r.spriteFrame = new cc.SpriteFrame(i), o && !cc.sys.isNative && c.packToDynamicAtlas(o, r, r.spriteFrame)) + } else i.packable = !1, r.spriteFrame = new cc.SpriteFrame(i) + }) + } else console.log("setAvatar node 为空") + }, t.removeAvatar = function(t) { + t && t.length && n.default.instance.deleteInnerTextureByPath(t) + }, t.setAvatarHolder = function(t, e, o) { + if (t) { + var n = t.getComponent(cc.Sprite); + if (!e || 0 == e.length) { + var a = "rank/rank_icon_default.png"; + return i.default.isPlatform(i.Platform.wx) && (a = "rank/rank_icon_default_wx.png"), o && (a = o), void cc.loader.loadRes(a, cc.SpriteFrame, function(t, e) { + t ? console.log("avatar err = " + t) : n.spriteFrame = e + }) + } + } else console.log("setAvatar node 为空") + }, t + }(); + o.default = r, cc._RF.pop() + }, { + "../effect/player-head-atlas": "player-head-atlas", + "./native/audio": "audio", + "./sdk": "sdk" + } + ], + CoinEmitterByTime: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "d2234O7oOZOV7MTLWcEx96i", "CoinEmitterByTime"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("./CoinEmitter"), + c = cc._decorator, + s = c.ccclass, + l = c.property, + u = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.tickTime = 0, e.countMinPerTick = 0, e.countMaxPerTick = 0, e._timePassed = 0, e._timeTick = 0, e._timeEnd = 0, e + } + return a(e, t), e.prototype.fire = function(t, e, o) { + void 0 === e && (e = !1), this._timePassed = 0, this._timeEnd = t, this._rndCur = 0, this.newNode(e), this._cb = o + }, e.prototype.update = function(t) { + if (this._rndCur < this._rndPathCount) { + for (var e = .017453293 * this.randomInRange(this.angleMin, this.angleMax), o = this.randomInRange(this.v0Min, this.v0Max), n = 0, a = 2 * cc.visibleRect.height, i = 0, c = []; i > -a;) { + var s = o * (n += .016666666666666666) * Math.sin(e) - this.G * n * n / 2; + i = s, c.push(s) + } + var l = new r.YPathCacheData(o, e, c); + this._cachePaths.push(l), this._rndCur++ + } + if (this._timePassed += t, !(this._timePassed >= this._timeEnd) && (this._timeTick += t, this._timeTick >= this.tickTime)) { + this._timeTick = 0; + for (var u = this.randomInt(this.countMinPerTick, this.countMaxPerTick), p = 0; p < u; p++) this.fireOne() + } + }, e.prototype.fireOne = function() { + var t = this._coinPool.get(); + t || (t = cc.instantiate(this.prefab)), t && (t.parent = this.node, this._runCoin(t)) + }, e.prototype._resetNode = function(t) { + t.scale = 0, t.angle = 0, t.setPosition(0, 0), t.stopAllActions(), this._coinPool.put(t), this._numFlying--, this._numFlying <= 0 && (this._cb && this._cb(), this._coinPool.clear()) + }, i([l({ + type: cc.Float, + tooltip: "发射间隔" + })], e.prototype, "tickTime", void 0), i([l({ + type: cc.Integer, + tooltip: "每次最少数量" + })], e.prototype, "countMinPerTick", void 0), i([l({ + type: cc.Integer, + tooltip: "每次最多数量" + })], e.prototype, "countMaxPerTick", void 0), i([s], e) + }(r.CoinEmitter); + o.default = u, cc._RF.pop() + }, { + "./CoinEmitter": "CoinEmitter" + } + ], + CoinEmitter: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "41348Csc6hCtbd7Gx/Kabw/", "CoinEmitter"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }), o.CoinEmitter = o.YPathCacheData = void 0; + var r = cc._decorator.ccclass, + c = cc._decorator.property, + s = cc._decorator.menu, + l = function(t, e, o) { + this.v0 = t, this.angle = e, this.path = o + }; + o.YPathCacheData = l; + var u = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.G = 18e3, e.v0Min = 11e3, e.v0Max = 21e3, e.angleMin = 20, e.angleMax = 28, e.scaleStepMin = .065, e.scaleStepMax = .085, e.coinCount = 50, e.xMoveStepMin = -18, e.xMoveStepMax = 18, e.rotationStepMin = -1.3, e.rotationStepMax = 1.3, e.bornOffsetXMin = 1, e.bornOffsetXMax = -1, e.bornOffsetYMin = -10, e.bornOffsetYMax = 0, e.bornScacle = .5, e.prefab = null, e._coinPool = new cc.NodePool, e._cachePaths = [], e._rndPathCount = 100, e._rndCur = 0, e._numFlying = 0, e + } + return a(e, t), e.prototype.onLoad = function() { + if (!(this._coinPool.size() >= 70)) + for (var t = 0; t < 70; t++) { + var e = cc.instantiate(this.prefab); + e && this._coinPool.put(e) + } + }, e.prototype.newNode = function(t) { + if (void 0 === t && (t = !1), t && (this._coinPool.clear(), !(this._coinPool.size() >= 70))) + for (var e = 0; e < 70; e++) { + var o = cc.instantiate(this.prefab); + o && this._coinPool.put(o) + } + }, e.prototype.fire = function(t, e, o) { + void 0 === e && (e = !1), console.log("push=>4"), this.newNode(e), t = t || this.coinCount, this._numFlying = t, this._cb = o; + for (var n = 0; n < t; n++) { + var a = this._coinPool.get(); + a || (a = cc.instantiate(this.prefab)), a && (a.parent = this.node, this._runCoin(a)) + } + }, e.prototype.update = function() { + if (!(this._rndCur >= this._rndPathCount)) { + for (var t = .017453293 * this.randomInRange(this.angleMin, this.angleMax), e = this.randomInRange(this.v0Min, this.v0Max), o = 0, n = 2 * cc.visibleRect.height, a = 0, i = []; a > -n;) { + var r = e * (o += .016666666666666666) * Math.sin(t) - this.G * o * o / 2; + a = r, i.push(r) + } + var c = new l(e, t, i); + this._cachePaths.push(c), this._rndCur++ + } + }, e.prototype._resetNode = function(t) { + t.scale = 0, t.angle = 0, t.setPosition(0, 0), t.stopAllActions(), this._coinPool.put(t), this._numFlying--, this._numFlying <= 0 && this._cb && this._cb() + }, e.prototype._runCoin = function(t) { + var e = this; + t.getComponent(cc.Animation).play("", this.randomInRange(0, .7)); + var o = this.randomInArray(this._cachePaths).path; + t.x = this.randomInRange(this.bornOffsetXMin, this.bornOffsetXMax), t.y = this.randomInRange(this.bornOffsetYMin, this.bornOffsetYMax); + var n; + n = t.x <= 0 ? this.randomInRange(this.xMoveStepMin, 0) : this.randomInRange(0, this.xMoveStepMax); + var a = this.randomInRange(this.rotationStepMin, this.rotationStepMax), + i = this.randomInRange(this.scaleStepMin, this.scaleStepMax); + t.scale = this.bornScacle; + var r = 0, + c = function() { + var s = o[r]; + r++, t.y = s, t.x += n, t.scale += i, t.angle += a, r >= o.length && (e._resetNode(t), e.unschedule(c)) + }; + this.schedule(c, 1 / 60) + }, e.prototype.randomInRange = function(t, e) { + return t + (e - t) * Math.random() + }, e.prototype.randomInArray = function(t) { + return t[this.randomInt(0, t.length)] + }, e.prototype.randomInt = function(t, e) { + return t = Math.ceil(t), e = Math.floor(e), Math.floor(Math.random() * (e - t)) + t + }, i([c({ + type: cc.Integer, + tooltip: "重力加速度" + })], e.prototype, "G", void 0), i([c({ + type: cc.Integer, + tooltip: "最小初速度" + })], e.prototype, "v0Min", void 0), i([c({ + type: cc.Integer, + tooltip: "最大初速度" + })], e.prototype, "v0Max", void 0), i([c({ + type: cc.Integer, + tooltip: "最小角度" + })], e.prototype, "angleMin", void 0), i([c({ + type: cc.Integer, + tooltip: "最大角度" + })], e.prototype, "angleMax", void 0), i([c({ + type: cc.Float, + tooltip: "最小每帧缩放增加" + })], e.prototype, "scaleStepMin", void 0), i([c({ + type: cc.Float, + tooltip: "最大每帧缩放增加" + })], e.prototype, "scaleStepMax", void 0), i([c({ + type: cc.Integer, + tooltip: "金币数量" + })], e.prototype, "coinCount", void 0), i([c({ + type: cc.Integer, + tooltip: "x轴每帧最小偏移" + })], e.prototype, "xMoveStepMin", void 0), i([c({ + type: cc.Integer, + tooltip: "x轴每帧最大偏移" + })], e.prototype, "xMoveStepMax", void 0), i([c(cc.Integer)], e.prototype, "rotationStepMin", void 0), i([c(cc.Integer)], e.prototype, "rotationStepMax", void 0), i([c({ + type: cc.Integer, + tooltip: "最小初始x偏移" + })], e.prototype, "bornOffsetXMin", void 0), i([c({ + type: cc.Integer, + tooltip: "最大初始x偏移" + })], e.prototype, "bornOffsetXMax", void 0), i([c({ + type: cc.Integer, + tooltip: "最小初始y偏移" + })], e.prototype, "bornOffsetYMin", void 0), i([c({ + type: cc.Integer, + tooltip: "最大初始y偏移" + })], e.prototype, "bornOffsetYMax", void 0), i([c({ + type: cc.Float, + tooltip: "初始缩放" + })], e.prototype, "bornScacle", void 0), i([c(cc.Prefab)], e.prototype, "prefab", void 0), i([r, s("gameModules/common/CoinEmitter")], e) + }(cc.Component); + o.CoinEmitter = u, cc._RF.pop() + }, {} + ], + DateManager: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "5f103B5zARLaI+1jRcCObQr", "DateManager"), Object.defineProperty(o, "__esModule", { + value: !0 + }); + var n = cc._decorator, + a = (n.ccclass, n.property, t("../common/enumConfig")), + i = function() { + function t() { + this.cutType = a.CALENDAR.MONTH; + var t = new Date, + e = t.getFullYear(), + o = t.getMonth(), + n = t.getDate(); + this.nowDate = new Date(e, o, n), this.selDate = new Date(e, o, n) + } + return t.getInstance = function() { + return this.instance || (this.instance = new t), this.instance + }, t.prototype.isNowMonth = function(t) { + return this.nowDate.getFullYear() === this.selDate.getFullYear() && this.nowDate.getMonth() === t + }, t.prototype.isNowDay = function(t) { + if (this.nowDate.getFullYear() === this.selDate.getFullYear() && this.nowDate.getMonth() === this.selDate.getMonth()) { + if (this.nowDate.getDate() === t) return !0 + } else if (this.selDate.getDate() == t) return !0; + return !1 + }, t.prototype.isOldDay = function(t) { + if (this.selDate.getFullYear() == this.nowDate.getFullYear()) { + if (this.nowDate.getMonth() == this.selDate.getMonth()) { + if (t < this.nowDate.getDate()) return !0 + } else if (this.selDate.getMonth() < this.nowDate.getMonth()) return !0 + } else if (this.selDate.getFullYear() < this.nowDate.getFullYear()) return !0; + return !1 + }, t.prototype.isFutureDay = function(t) { + if (this.nowDate.getFullYear() == this.selDate.getFullYear()) { + if (this.nowDate.getDate() < t) return !0; + if (this.nowDate.getMonth() == this.selDate.getMonth()) { + if (this.nowDate.getDate() < t) return !0 + } else if (this.nowDate.getMonth() < this.selDate.getMonth()) return !0 + } else if (this.nowDate.getFullYear() <= this.selDate.getFullYear()) return !0; + return !1 + }, t.prototype.isSel = function(t, e, o) { + return this.selDate.getFullYear() === t && this.selDate.getMonth() === e && this.selDate.getDate() === o + }, t.isLeapYear = function(t) { + return 29 === new Date(t, 1, 29).getDate() + }, t.cloneDate = function(t) { + return new Date(t.valueOf()) + }, t.nextDate = function(t, e) { + void 0 === e && (e = a.CALENDAR.DAY); + var o = t.getFullYear(), + n = t.getMonth(), + i = t.getDate(); + switch (e) { + case a.CALENDAR.YEAR: + o++, i <= (t = new Date(o, n + 1, 0)).getDate() && (t = new Date(o, n, i)); + break; + case a.CALENDAR.MONTH: + n++, i <= (t = new Date(o, n + 1, 0)).getDate() && (t = new Date(o, n, i)); + break; + case a.CALENDAR.DAY: + t = new Date(t.setDate(i + 1)); + break; + case a.CALENDAR.WEEK: + t = new Date(t.setDate(i + 7)) + } + return t + }, t.lastDate = function(t, e) { + void 0 === e && (e = a.CALENDAR.DAY); + var o = t.getFullYear(), + n = t.getMonth(), + i = t.getDate(); + switch (e) { + case a.CALENDAR.YEAR: + o--, i <= (t = new Date(o, n + 1, 0)).getDate() && (t = new Date(o, n, i)); + break; + case a.CALENDAR.MONTH: + n--, t = new Date(o, n + 1, 0); + break; + case a.CALENDAR.DAY: + t = new Date(t.setDate(i - 1)); + break; + case a.CALENDAR.WEEK: + t = new Date(t.setDate(i - 7)) + } + return t + }, t.showAloneChildByName = function(t, e) { + for (var o = 0, n = e.children; o < n.length; o++) { + var a = n[o]; + a.active = !1, a.name === t && (a.active = !0) + } + }, t.format = function(t, e) { + void 0 === t && (t = "yyyy-mm-dd"); + var o = e, + n = { + "M+": o.getMonth() + 1, + "d+": o.getDate(), + "h+": o.getHours(), + "m+": o.getMinutes(), + "s+": o.getSeconds(), + "q+": Math.floor((o.getMonth() + 3) / 3), + S: o.getMilliseconds() + }; + for (var a in /(y+)/i.test(t) && (t = t.replace(RegExp.$1, (o.getFullYear() + "").substr(4 - RegExp.$1.length))), n) new RegExp("(" + a + ")", "i").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? n[a] : ("00" + n[a]).substr(("" + n[a]).length))); + return t + }, t.getDateString = function(e) { + void 0 === e && (e = !1); + var o = t.format(a.CALENDARNAMES[4], new Date).split("-"); + return o.length < 3 ? "" : e ? "- " + o[0] + "年" + o[1] + "月" + o[2] + "日 -" : "- " + o[1] + "月" + o[2] + "日 -" + }, t.prototype.dateToUnix = function(t) { + var e = t.split(" ", 2), + o = (e[0] ? e[0] : "").split("-", 3), + n = (e[1] ? e[1] : "").split(":", 3); + return new Date(parseInt(o[0], 10) || null, (parseInt(o[1], 10) || 1) - 1, parseInt(o[2], 10) || null, parseInt(n[0], 10) || null, parseInt(n[1], 10) || null, parseInt(n[2], 10) || null).getTime() / 1e3 + }, t.prototype.changeTime = function(t) { + return new Date(t.format("YYYY-MM-DD HH:mm:ss")).getTime() + }, t.prototype.formatTs = function(t) { + var e = new Date(1e3 * parseInt(t)); + return [e.getFullYear(), e.getMonth() + 1 < 10 ? "0" + (e.getMonth() + 1) : e.getMonth() + 1, e.getDate() < 10 ? "0" + e.getDate() : e.getDate(), e.getHours() < 10 ? "0" + e.getHours() : e.getHours(), e.getMinutes() < 10 ? "0" + e.getMinutes() : e.getMinutes(), e.getSeconds() < 10 ? "0" + e.getSeconds() : e.getSeconds()] + }, t.prototype.formatDate = function(t, e) { + if (t) { + switch (e || (e = "yyyy-MM-dd HH:mm:ss"), typeof t) { + case "string": + t = new Date(Number(t)); + break; + case "number": + t = new Date(t) + } + if (t instanceof Date) { + var o = { + yyyy: t.getFullYear(), + M: t.getMonth() + 1, + d: t.getDate(), + H: t.getHours(), + m: t.getMinutes(), + s: t.getSeconds(), + MM: ("" + (t.getMonth() + 101)).substring(1), + dd: ("" + (t.getMonth() + 100)).substring(1), + HH: ("" + (t.getMonth() + 100)).substring(1), + mm: ("" + (t.getMonth() + 100)).substring(1), + ss: ("" + (t.getMonth() + 100)).substring(1) + }; + return e.replace(/(yyyy|MM?|dd?|HH?|ss?|mm?)/g, function() { + return o[arguments[0]] + }) + } + } + }, t + }(); + o.default = i, cc._RF.pop() + }, { + "../common/enumConfig": "enumConfig" + } + ], + FriendRankPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "4213beT0KVE5b2bFg6XH/hw", "FriendRankPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../api/api-sheep"), + c = t("../common/CcJsFunc"), + s = t("../common/dataTs"), + l = cc._decorator, + u = l.ccclass, + p = l.property, + d = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.popNode = null, e.closeBtn = null, e + } + return a(e, t), e.prototype.start = function() { + c.default.addTargetTouchUpInside(this.closeBtn, this.closeBtnFunc.bind(this)) + }, e.prototype.closeBtnFunc = function() { + this.node.active = !1, cc.game.emit("showPop", { + popName: "todayRankPop", + showPopData: {} + }) + }, e.prototype.showPop = function() { + this.node.active = !0, cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(), r.default.getPersonalInfo(function(t) { + if (t && t.data) { + var e = t.data.daily_count; + s.default.updateFirendCount(e) + } + }) + }, i([p(cc.Node)], e.prototype, "popNode", void 0), i([p(cc.Node)], e.prototype, "closeBtn", void 0), i([u], e) + }(cc.Component); + o.default = d, cc._RF.pop() + }, { + "../api/api-sheep": "api-sheep", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs" + } + ], + FriendSubContextView: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "ea1df8KK9tCd5m1ulIYJEp0", "FriendSubContextView"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }, + r = this && this.__awaiter || function(t, e, o, n) { + return new(o || (o = Promise))(function(a, i) { + function r(t) { + try { + s(n.next(t)) + } catch (e) { + i(e) + } + } + + function c(t) { + try { + s(n.throw(t)) + } catch (e) { + i(e) + } + } + + function s(t) { + var e; + t.done ? a(t.value) : (e = t.value, e instanceof o ? e : new o(function(t) { + t(e) + })).then(r, c) + } + s((n = n.apply(t, e || [])).next()) + }) + }, + c = this && this.__generator || function(t, e) { + var o, n, a, i, r = { + label: 0, + sent: function() { + if (1 & a[0]) throw a[1]; + return a[1] + }, + trys: [], + ops: [] + }; + return i = { + next: c(0), + throw :c(1), + return :c(2) + }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { + return this + }), i; + + function c(t) { + return function(e) { + return s([t, e]) + } + } + + function s(i) { + if (o) throw new TypeError("Generator is already executing."); + for (; r;) try { + if (o = 1, n && (a = 2 & i[0] ? n.return : i[0] ? n.throw || ((a = n.return) && a.call(n), 0) : n.next) && !(a = a.call(n, i[1])).done) return a; + switch (n = 0, a && (i = [2 & i[0], a.value]), i[0]) { + case 0: + case 1: + a = i; + break; + case 4: + return r.label++, { + value: i[1], + done: !1 + }; + case 5: + r.label++, n = i[1], i = [0]; + continue; + case 7: + i = r.ops.pop(), r.trys.pop(); + continue; + default: + if (!(a = (a = r.trys).length > 0 && a[a.length - 1]) && (6 === i[0] || 2 === i[0])) { + r = 0; + continue + } + if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { + r.label = i[1]; + break + } + if (6 === i[0] && r.label < a[1]) { + r.label = a[1], a = i; + break + } + if (a && r.label < a[2]) { + r.label = a[2], r.ops.push(i); + break + } + a[2] && r.ops.pop(), r.trys.pop(); + continue + } + i = e.call(t, r) + } catch (c) { + i = [6, c], n = 0 + } finally { + o = a = 0 + } + if (5 & i[0]) throw i[1]; + return { + value: i[0] ? i[1] : void 0, + done: !0 + } + } + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var s = t("../common/enumConfig"), + l = cc._decorator, + u = l.ccclass, + p = l.property, + d = (l.menu, function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.subContextView = null, e + } + return a(e, t), e.prototype.onEnable = function() { + var t = this; + setTimeout(function() { + t.changeViewType(s.ShownType.friendRank) + }, 100) + }, e.prototype.start = function() {}, e.prototype.changeViewType = function() { + return r(this, void 0, Promise, function() { + var t; + return c(this, function() { + return cc.sys.platform != cc.sys.WECHAT_GAME ? [2] : ((t = this.node).width, t.height, this.subContextView.updateSubContextViewport(), [2]) + }) + }) + }, i([p({ + type: cc.SubContextView, + tooltip: "子域视图节点,没有则添加组件到本身" + })], e.prototype, "subContextView", void 0), i([u], e) + }(cc.Component)); + o.default = d, cc._RF.pop() + }, { + "../common/enumConfig": "enumConfig" + } + ], + GameManager: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "b5f13tOjPRM3rnhWE1kAMLK", "GameManager"), Object.defineProperty(o, "__esModule", { + value: !0 + }); + var n = cc._decorator, + a = (n.ccclass, n.property, t("../common/enumConfig")), + i = function() { + function t() { + this.register = !1, this.globalData = { + isFullScreen: !1, + device: "" + }, this.moneyDict = { + coin: 0, + fish: 0 + }, this.cookieDict = { + cookie: 0, + cookieCurCount: 0, + goldCoinCount: 0, + ribbonBoxCount: 0 + }, this.levelWinDict = { + coin: 0, + remove: 0, + cancel: 0, + random: 0 + }, this.dailyDict = { + receiveBox: !1 + }, this.coinNum = 60, this.collectionMark = { + tabbarCollection: !1, + bgNum: 0, + brickNum: 0, + catNum: 0, + catSkinNum: 0, + topicClothesNum: 0 + }, this.sheepMark = { + resurgenceCount: 0, + propRemoveCount: 0, + propCancelCount: 0, + propRandomCount: 0 + }, this.unLimitVideo = !1, this.todayState = -1, this.gameBeginDate = null, this.gameEndDate = null, this.reportProperty = { + cancel_buy: 0, + random_buy: 0, + random_ad: 0, + random_use: 0, + remove_buy: 0, + remove_ad: 0, + resurrection_coin_cost: 0, + resurrection_ad_frequency: 0, + cancel_ad: 0, + cancel_use: 0, + remove_use: 0, + dailyWin_time_remaining: 0, + challenge_count: 0 + }, this.tabbarIsDaily = !1, this.sprintMark = !1, this.videoPath = "", this.videoDuration = 0, this.game_over = 0, this.rankInfo = null, this.bulletTime = 0, this.playGameCount = 0, this.gameEnv = a.GAMEENV.ENVRELEASE, this.gameType = a.GAMETYPE.GAMELEVEL, this.mainPage = a.MAINPAGE.PAGEMAIN + } + return t.getInstance = function() { + return this.instance || (this.instance = new t), this.instance + }, t.prototype.initData = function() { + console.log("systemInfo", cc.winSize), (cc.winSize.height > 1334 || cc.winSize.height / cc.winSize.width > 2) && (this.globalData.isFullScreen = !0), console.log("isFullScreen", this.globalData.isFullScreen) + }, t.setGameType = function(e) { + t.getInstance().gameType = e + }, t.blacksInfo = { + blockCurCount: 0, + blockAllCount: 0 + }, t + }(); + o.default = i, cc._RF.pop() + }, { + "../common/enumConfig": "enumConfig" + } + ], + PersonalPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "23eb4oYlzpNJ74t7y6B9QZ/", "PersonalPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../api/api-sheep"), + c = t("../common/CcJsFunc"), + s = t("../common/dataTs"), + l = t("../common/sdk"), + u = t("../common/spine"), + p = t("../common/util"), + d = t("../manager/data-manager"), + h = t("../manager/DateManager"), + f = cc._decorator, + m = f.ccclass, + g = f.property, + y = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.popNode = null, e.nickName = null, e.registerLabel = null, e.dailyName = null, e.topicName = null, e.dailyCount = null, e.topicCount = null, e.idLabel = null, e.joinName = null, e.joinTime = null, e.failLabel = null, e.failCount = null, e.sheepNameLabel = null, e.spNode = null, e.headerImage = null, e.closeBtn = null, e.saveBtn = null, e + } + return a(e, t), e.prototype.start = function() { + c.default.addTargetTouchUpInside(this.closeBtn, this.closeBtnFunc.bind(this)), c.default.addTargetTouchUpInside(this.saveBtn, this.saveBtnFunc.bind(this)), l.default.isPlatform(l.Platform.wx) || l.default.isPlatform(l.Platform.tt) ? this.saveBtn.active = !0 : this.saveBtn.active = !1, this.saveBtn.active = !1 + }, e.prototype.closeBtnFunc = function() { + this.node.active = !1 + }, e.prototype.saveBtnFunc = function() {}, e.prototype.showPop = function() { + this.node.active = !0; + var t = this; + this.joinTime.node.active = !1, cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(), r.default.getPersonalInfo(function(e) { + e && e.data && t.setupSubviews(e.data) + }) + }, e.prototype.setupSubviews = function(t) { + if (this.nickName.string = t.nick_name || "", this.idLabel.string = "ID:" + t.uid, t.register_time) { + var e = (f = h.default.getInstance().formatTs(t.register_time))[0] + "年" + f[1] + "月" + f[2] + "日"; + this.registerLabel.string = "于" + e + "诞生\n迄今为止挑战 " + t.challenge + " 次" + } else this.registerLabel.string = ""; + this.dailyCount.string = t.daily_count, this.topicCount.string = t.topic_count; + var o = "", + n = "", + a = ""; + if (1 == t.today_state) { + o = "sheep/Sheeps", n = "skin_00", a = "Jump2"; + for (var i = s.default.getSheepClothesData(), r = 0; r < i.length; r++) { + var l = i[r]; + if (l.dressing) { + o = "sheep/" + l.spName, n = l.spSkin; + break + } + } + this.sheepNameLabel.node.color = (new cc.Color).fromHEX("#FBE14D"), this.sheepNameLabel.string = "已加入羊群", this.failLabel.node.active = !0, this.failCount.string = ""; + var f, m = "于" + (f = h.default.getInstance().formatTs(t.today_ts))[3] + "时" + f[4] + "分,", + g = p.default.formatTime(1e3 * t.today_time), + y = g[2] < 10 ? "0" + g[2] : g[2], + v = g[3] < 10 ? "0" + g[3] : g[3]; + this.joinTime.string = m + "耗时" + y + "分" + v + "秒", this.joinTime.node.active = !1 + } else { + o = "sheep/Dead1", n = "default"; + var b = d.default.getDeadNum(t.today_fail_count); + a = "Dead" + b, this.sheepNameLabel.node.color = (new cc.Color).fromHEX("#FFFFFF"), this.sheepNameLabel.string = "未加入羊群", this.joinTime.string = "", this.failLabel.node.active = !0, this.failCount.string = t.today_fail_count + "" + } + var _ = this; + this.spNode.getComponent(u.default).loadSpine(o, function() { + _.spNode.getComponent(u.default).setNewSkin(n), _.spNode.getComponent(u.default).play(a, 0) + }), c.default.setAvatar(this.headerImage, t.avatar) + }, i([g(cc.Node)], e.prototype, "popNode", void 0), i([g(cc.Label)], e.prototype, "nickName", void 0), i([g(cc.Label)], e.prototype, "registerLabel", void 0), i([g(cc.Label)], e.prototype, "dailyName", void 0), i([g(cc.Label)], e.prototype, "topicName", void 0), i([g(cc.Label)], e.prototype, "dailyCount", void 0), i([g(cc.Label)], e.prototype, "topicCount", void 0), i([g(cc.Label)], e.prototype, "idLabel", void 0), i([g(cc.Label)], e.prototype, "joinName", void 0), i([g(cc.Label)], e.prototype, "joinTime", void 0), i([g(cc.Label)], e.prototype, "failLabel", void 0), i([g(cc.Label)], e.prototype, "failCount", void 0), i([g(cc.Label)], e.prototype, "sheepNameLabel", void 0), i([g(cc.Node)], e.prototype, "spNode", void 0), i([g(cc.Node)], e.prototype, "headerImage", void 0), i([g(cc.Node)], e.prototype, "closeBtn", void 0), i([g(cc.Node)], e.prototype, "saveBtn", void 0), i([m], e) + }(cc.Component); + o.default = y, cc._RF.pop() + }, { + "../api/api-sheep": "api-sheep", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/sdk": "sdk", + "../common/spine": "spine", + "../common/util": "util", + "../manager/DateManager": "DateManager", + "../manager/data-manager": "data-manager" + } + ], + PoolManager: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "fa6ed2YIVxN45t8qifYPswb", "PoolManager"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }), o.PoolManager = void 0; + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.prefab = [], e.prefabMap = {}, e.poolMap = {}, e + } + var o; + return a(e, t), o = e, e.prototype.onLoad = function() { + o.instance = this; + for (var t = 0; t < this.prefab.length; t++) this.prefabMap[this.prefab[t].name] = t, this.poolMap[this.prefab[t].name + "Pool"] = new cc.NodePool; + for (var e in this.prefabMap) cc.log(e + this.prefabMap[e]) + }, e.prototype.get = function(t) { + var e = this.prefabMap[t]; + if (null != e) { + var o = this.poolMap[t + "Pool"].get(); + return this.poolMap[t + "Pool"].size() > 0 ? o.active = !0 : (o = cc.instantiate(this.prefab[e])).active = !0, o + } + console.log("预制体不存在或未加载(未拖拽)") + }, e.prototype.put = function(t) { + t.active = !1, this.poolMap[t.name + "Pool"].put(t) + }, i([s(cc.Prefab)], e.prototype, "prefab", void 0), o = i([c], e) + }(cc.Component); + o.PoolManager = l, cc._RF.pop() + }, {} + ], + PrivacyPolicy: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "83b1cbmnjRKCqtOVxg1KAz1", "PrivacyPolicy"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.label = null, e.text = "hello", e + } + return a(e, t), e.prototype.start = function() {}, i([s(cc.Node)], e.prototype, "label", void 0), i([s], e.prototype, "text", void 0), i([c], e) + }(cc.Component); + o.default = l, cc._RF.pop() + }, {} + ], + PrivacyUserPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "2a225F7jMhPWpqoKwvcsBGP", "PrivacyUserPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.popNode = null, e.privacyNode = null, e.userNode = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.privacyCloseBtnFunc = function() { + this.node.active = !1 + }, e.prototype.userCloseBtnFunc = function() { + this.node.active = !1 + }, e.prototype.showPop = function(t) { + this.node.active = !0, this.userNode.active = !1, this.privacyNode.active = !1, cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(), "user" == t.type ? this.userNode.active = !0 : this.privacyNode.active = !0 + }, i([s(cc.Node)], e.prototype, "popNode", void 0), i([s(cc.Node)], e.prototype, "privacyNode", void 0), i([s(cc.Node)], e.prototype, "userNode", void 0), i([c], e) + }(cc.Component); + o.default = l, cc._RF.pop() + }, {} + ], + ScrollMsg: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "0e6eb07gOpDPqlpg49sZaei", "ScrollMsg"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r, c = cc._decorator, + s = c.ccclass, + l = c.property; + (function(t) { + t[t.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", t[t.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT" + })(r || (r = {})); + var u = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.label = null, e.maskNode = null, e.m_speed = 100, e.m_xLeftEnd = 0, e.m_xRightEnd = 0, e.m_yPos = 0, e.m_direction = r.LEFT_TO_RIGHT, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.showMsg = function(t) { + this.label.string = t.msg, this.m_xRightEnd = this.node.x + this.maskNode.node.width * this.maskNode.node.anchorX, this.m_xLeftEnd = this.node.x - this.maskNode.node.width * this.maskNode.node.anchorX; + var e, o = this.label.node.getContentSize(); + e = this.m_direction === r.LEFT_TO_RIGHT ? this.m_xLeftEnd - o.width : this.m_xRightEnd, this.label.node.x = e, this.label.node.y = this.m_yPos + }, e.prototype.update = function(t) { + if (this.m_direction === r.LEFT_TO_RIGHT) { + var e = this.label.node.getContentSize(); + this.label.node.x >= this.m_xRightEnd && (this.label.node.x = this.m_xLeftEnd - e.width), this.label.node.x += this.m_speed * t + } else e = this.label.node.getContentSize(), this.label.node.x <= this.m_xLeftEnd - e.width && (this.label.node.x = this.m_xRightEnd), this.label.node.x -= this.m_speed * t + }, i([l(cc.Label)], e.prototype, "label", void 0), i([l(cc.Mask)], e.prototype, "maskNode", void 0), i([l({ + tooltip: "每秒移动多少像素" + })], e.prototype, "m_speed", void 0), i([l({ + tooltip: "文字滚动的方向,1是从左到右,2是从右到左" + })], e.prototype, "m_direction", void 0), i([s], e) + }(cc.Component); + o.default = u, cc._RF.pop() + }, {} + ], + SpriteWithMaskAssembler: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "6b309k9JDND+5aP2ebiAdxw", "SpriteWithMaskAssembler"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }); + Object.defineProperty(o, "__esModule", { + value: !0 + }), o.getSpriteWithMaskAssembler = void 0, o.getSpriteWithMaskAssembler = function() { + var t = cc.gfx; + return new(function(e) { + function o() { + return null !== e && e.apply(this, arguments) || this + } + return a(o, e), Object.defineProperty(o.prototype, "floatsPerVert", { + get: function() { + return 7 + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(o.prototype, "colorOffset", { + get: function() { + return 6 + }, + enumerable: !1, + configurable: !0 + }), o.prototype.getVfmt = function() { + return o.vfmtPosTowUvColor + }, o.prototype.getBuffer = function() { + if (!o.meshBuffer) { + var t = cc.renderer._handle; + t._SpriteWithMaskBuffer && console.error("竟然已经存在 _SpriteWithMaskBuffer 对象了, 这可能是个严重的 bug!"), o.meshBuffer = t.getBuffer("mesh", this.getVfmt()) + } + return o.meshBuffer + }, o.prototype.updateRenderData = function(t) { + this.packToDynamicAtlas(t, t._spriteFrame), t._vertsDirty && (this.updateUVs(t), this.updateVerts(t), t._vertsDirty = !1) + }, o.prototype.updateUVs = function(t) { + for (var e = t._spriteFrame.uv, n = this.uvOffset, a = this.floatsPerVert, i = this._renderData.vDatas[0], r = 0; r < 4; r++) { + var c = 2 * r, + s = a * r + n; + i[s] = e[c], i[s + 1] = e[c + 1], i[s + 2] = o.uv2[c], i[s + 3] = o.uv2[c + 1] + } + }, o.prototype.updateVerts = function(t) { + var e, o, n, a, i = t.node, + r = i.width, + c = i.height, + s = i.anchorX * r, + l = i.anchorY * c; + if (t.trim) e = -s, o = -l, n = r - s, a = c - l; + else { + var u = t.spriteFrame, + p = u._originalSize.width, + d = u._originalSize.height, + h = u._rect.width, + f = u._rect.height, + m = u._offset, + g = r / p, + y = c / d, + v = m.x + (p - h) / 2, + b = m.x - (p - h) / 2; + e = v * g - s, o = (m.y + (d - f) / 2) * y - l, n = r + b * g - s, a = c + (m.y - (d - f) / 2) * y - l + } + var _ = this._local; + _[0] = e, _[1] = o, _[2] = n, _[3] = a, this.updateWorldVerts(t) + }, o.vfmtPosTowUvColor = new t.VertexFormat([{ + name: t.ATTR_POSITION, + type: t.ATTR_TYPE_FLOAT32, + num: 2 + }, { + name: t.ATTR_UV0, + type: t.ATTR_TYPE_FLOAT32, + num: 4 + }, { + name: t.ATTR_COLOR, + type: t.ATTR_TYPE_UINT8, + num: 4, + normalize: !0 + }]), o.uv2 = [0, 1, 1, 1, 0, 0, 1, 0], o + }(cc.Assembler2D)) + }, cc._RF.pop() + }, {} + ], + SpriteWithMask: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "16615oSi4lB+Y7u7Tdx2332", "SpriteWithMask"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }), o.SpriteWithMask = void 0; + var r = t("./SpriteWithMaskAssembler"), + c = cc._decorator, + s = c.ccclass, + l = (c.property, c.menu), + u = function(t) { + function e() { + return null !== t && t.apply(this, arguments) || this + } + return a(e, t), e.prototype.onLoad = function() { + var e; + null === (e = t.prototype.onLoad) || void 0 === e || e.call(this), this.type, cc.Sprite.Type.SIMPLE + }, e.prototype._resetAssembler = function() { + this.setVertsDirty(), this._assembler = r.getSpriteWithMaskAssembler(), this._assembler.init(this) + }, i([s(), l("2D/SpriteWithMask")], e) + }(cc.Sprite); + o.SpriteWithMask = u, cc._RF.pop() + }, { + "./SpriteWithMaskAssembler": "SpriteWithMaskAssembler" + } + ], + TodayRankPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "3c9ecBLnyBEtad8HHAyJf0H", "TodayRankPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../api/api-sheep"), + c = t("../common/CcJsFunc"), + s = t("../common/dataTs"), + l = cc._decorator, + u = l.ccclass, + p = l.property, + d = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.popNode = null, e.closeBtn = null, e.friendBtn = null, e.shareBtn = null, e + } + return a(e, t), e.prototype.start = function() { + c.default.addTargetTouchUpInside(this.closeBtn, this.closeBtnFunc.bind(this)), c.default.addTargetTouchUpInside(this.friendBtn, this.friendBtnFunc.bind(this)), c.default.addTargetTouchUpInside(this.shareBtn, this.shareBtnFunc.bind(this)) + }, e.prototype.closeBtnFunc = function() { + this.node.active = !1 + }, e.prototype.friendBtnFunc = function() { + this.node.active = !1, console.log("好友排行榜"), cc.game.emit("showPop", { + popName: "friendRankPop", + showPopData: {} + }) + }, e.prototype.shareBtnFunc = function() { + console.log("分享朋友圈") + }, e.prototype.showPop = function() { + this.node.active = !0, cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(), r.default.getUserRankInfo(function(t) { + if (0 == t.err_code && t.data && t.data.user) { + var e = t.data.user.fail, + o = t.data.user.state; + 1 == o ? s.default.updateTodayCount(o, "win") : s.default.updateTodayCount(e, "fail") + } + }, function() { + console.log("###### fail ######"), s.default.updateTodayCount(0, "fail") + }) + }, i([p(cc.Node)], e.prototype, "popNode", void 0), i([p(cc.Node)], e.prototype, "closeBtn", void 0), i([p(cc.Node)], e.prototype, "friendBtn", void 0), i([p(cc.Node)], e.prototype, "shareBtn", void 0), i([u], e) + }(cc.Component); + o.default = d, cc._RF.pop() + }, { + "../api/api-sheep": "api-sheep", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs" + } + ], + TodaySubContextView: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "6f5a44uIwZLR54OKfk5cZc9", "TodaySubContextView"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }, + r = this && this.__awaiter || function(t, e, o, n) { + return new(o || (o = Promise))(function(a, i) { + function r(t) { + try { + s(n.next(t)) + } catch (e) { + i(e) + } + } + + function c(t) { + try { + s(n.throw(t)) + } catch (e) { + i(e) + } + } + + function s(t) { + var e; + t.done ? a(t.value) : (e = t.value, e instanceof o ? e : new o(function(t) { + t(e) + })).then(r, c) + } + s((n = n.apply(t, e || [])).next()) + }) + }, + c = this && this.__generator || function(t, e) { + var o, n, a, i, r = { + label: 0, + sent: function() { + if (1 & a[0]) throw a[1]; + return a[1] + }, + trys: [], + ops: [] + }; + return i = { + next: c(0), + throw :c(1), + return :c(2) + }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { + return this + }), i; + + function c(t) { + return function(e) { + return s([t, e]) + } + } + + function s(i) { + if (o) throw new TypeError("Generator is already executing."); + for (; r;) try { + if (o = 1, n && (a = 2 & i[0] ? n.return : i[0] ? n.throw || ((a = n.return) && a.call(n), 0) : n.next) && !(a = a.call(n, i[1])).done) return a; + switch (n = 0, a && (i = [2 & i[0], a.value]), i[0]) { + case 0: + case 1: + a = i; + break; + case 4: + return r.label++, { + value: i[1], + done: !1 + }; + case 5: + r.label++, n = i[1], i = [0]; + continue; + case 7: + i = r.ops.pop(), r.trys.pop(); + continue; + default: + if (!(a = (a = r.trys).length > 0 && a[a.length - 1]) && (6 === i[0] || 2 === i[0])) { + r = 0; + continue + } + if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { + r.label = i[1]; + break + } + if (6 === i[0] && r.label < a[1]) { + r.label = a[1], a = i; + break + } + if (a && r.label < a[2]) { + r.label = a[2], r.ops.push(i); + break + } + a[2] && r.ops.pop(), r.trys.pop(); + continue + } + i = e.call(t, r) + } catch (c) { + i = [6, c], n = 0 + } finally { + o = a = 0 + } + if (5 & i[0]) throw i[1]; + return { + value: i[0] ? i[1] : void 0, + done: !0 + } + } + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var s = t("../common/enumConfig"), + l = cc._decorator, + u = l.ccclass, + p = l.property, + d = (l.menu, function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.subContextView = null, e + } + return a(e, t), e.prototype.onEnable = function() { + var t = this; + setTimeout(function() { + t.changeViewType(s.ShownType.todayRank) + }, 100) + }, e.prototype.start = function() {}, e.prototype.changeViewType = function() { + return r(this, void 0, Promise, function() { + var t; + return c(this, function() { + return cc.sys.platform != cc.sys.WECHAT_GAME ? [2] : ((t = this.node).width, t.height, this.subContextView.updateSubContextViewport(), [2]) + }) + }) + }, i([p({ + type: cc.SubContextView, + tooltip: "子域视图节点,没有则添加组件到本身" + })], e.prototype, "subContextView", void 0), i([u], e) + }(cc.Component)); + o.default = d, cc._RF.pop() + }, { + "../common/enumConfig": "enumConfig" + } + ], + ad: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "a30241BP59D1qFtYJSnt/BB", "ad"); + var n, a, i = this && this.__assign || function() { + return (i = Object.assign || function(t) { + for (var e, o = 1, n = arguments.length; o < n; o++) + for (var a in e = arguments[o]) Object.prototype.hasOwnProperty.call(e, a) && (t[a] = e[a]); + return t + }).apply(this, arguments) + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }), o.AdType = o.AdTag = void 0, + function(t) { + t[t.NONE = 0] = "NONE", t[t.RewardVideo = 1] = "RewardVideo" + }(a = o.AdTag || (o.AdTag = {})), + function(t) { + t[t.RewardVideo = 0] = "RewardVideo", t[t.FullScreenVideo = 1] = "FullScreenVideo", t[t.Interstitial = 2] = "Interstitial", t[t.BigImage = 3] = "BigImage" + }(o.AdType || (o.AdType = {})); + var r = function() { + function t() {} + return t.getAdByTag = function(t) { + console.log("[sdk] get ad by tag", t, typeof t, c[t]); + var e = c[t], + o = ""; + switch (cc.sys.platform) { + case cc.sys.WECHAT_GAME: + o = e.wxAdID; + break; + case cc.sys.BYTEDANCE_GAME: + o = e.ttAdID + } + return i(i({}, c[t]), { + adID: o + }) + }, t.getRandomShareImgUrl = function() { + return "https://www.52shenbian.com/jigsawRes/resources/sharingGraph/chigua" + (Math.floor(5 * Math.random()) + 1) + ".jpg" + }, t + }(); + o.default = r; + var c = ((n = {})[a.RewardVideo] = { + title: "欢迎来到月之村", + url: r.getRandomShareImgUrl(), + wxAdID: "adunit-51694ea44cfcc656", + ttAdID: "" + }, n); + cc._RF.pop() + }, {} + ], + "android-sdk": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "edf737yBMxG3b6BBsVJzu1A", "android-sdk"), Object.defineProperty(o, "__esModule", { + value: !0 + }), o.getCashOutParams = void 0; + var n = t("../sdk"), + a = t("./native-bridge"), + i = t("./native-def"); + o.getCashOutParams = function() { + try { + return null + } catch (t) { + return null + } + }; + var r = function() { + function t() {} + return t.vibrateShort = function(t) { + void 0 === t && (t = n.VibrateType.Light), jsb.reflection.callStaticMethod("org/cocos2dx/javascript/CocosUtils", "Vibrate", "(I)V", t) + }, t.vibrateLong = function(t) { + void 0 === t && (t = n.VibrateType.Long), jsb.reflection.callStaticMethod("org/cocos2dx/javascript/CocosUtils", "Vibrate", "(I)V", t) + }, t.showBannerAd = function() {}, t.hideBannerAd = function() {}, t.showInterstitialAd = function(t) { + jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "showInterstitial", "(Ljava/lang/String;)V", t) + }, t.showRewardVideoAd = function(t, e, o) { + a.default.callNative(i.NativeFun.showRewardVideoAd), this.adCallback(t, e, o) + }, t.showFullScreenAd = function(t) { + var e = t.success, + o = t.fail, + n = t.tag; + cc.sys.os == cc.sys.OS_ANDROID && (jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "showFullScreenAd", "(Ljava/lang/String;)V", n), this.adCallback(n, e, o)) + }, t.showBigImageAd = function(t) { + var e = t.success, + o = t.fail, + n = t.tag; + cc.sys.os == cc.sys.OS_ANDROID && (jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "showBigImage", "(Ljava/lang/String;)V", n), this.adCallback(n, e, o)) + }, t.hideBigImageAd = function(t) { + var e = t.tag; + cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "hideBigImage", "(Ljava/lang/String;)V", e) + }, t.adCallback = function(t, e, o) { + cc.game.once("ad-reward-video-native-callback", function(t, n) { + console.log("=== ad-reward-video-native-callback full screen ===", t, n), n ? e && e() : o && o() + }, this) + }, t + }(); + o.default = r, cc._RF.pop() + }, { + "../sdk": "sdk", + "./native-bridge": "native-bridge", + "./native-def": "native-def" + } + ], + "api-sheep": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "21e18xyzLdONJh79eiw/cac", "api-sheep"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__awaiter || function(t, e, o, n) { + return new(o || (o = Promise))(function(a, i) { + function r(t) { + try { + s(n.next(t)) + } catch (e) { + i(e) + } + } + + function c(t) { + try { + s(n.throw(t)) + } catch (e) { + i(e) + } + } + + function s(t) { + var e; + t.done ? a(t.value) : (e = t.value, e instanceof o ? e : new o(function(t) { + t(e) + })).then(r, c) + } + s((n = n.apply(t, e || [])).next()) + }) + }, + r = this && this.__generator || function(t, e) { + var o, n, a, i, r = { + label: 0, + sent: function() { + if (1 & a[0]) throw a[1]; + return a[1] + }, + trys: [], + ops: [] + }; + return i = { + next: c(0), + throw :c(1), + return :c(2) + }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { + return this + }), i; + + function c(t) { + return function(e) { + return s([t, e]) + } + } + + function s(i) { + if (o) throw new TypeError("Generator is already executing."); + for (; r;) try { + if (o = 1, n && (a = 2 & i[0] ? n.return : i[0] ? n.throw || ((a = n.return) && a.call(n), 0) : n.next) && !(a = a.call(n, i[1])).done) return a; + switch (n = 0, a && (i = [2 & i[0], a.value]), i[0]) { + case 0: + case 1: + a = i; + break; + case 4: + return r.label++, { + value: i[1], + done: !1 + }; + case 5: + r.label++, n = i[1], i = [0]; + continue; + case 7: + i = r.ops.pop(), r.trys.pop(); + continue; + default: + if (!(a = (a = r.trys).length > 0 && a[a.length - 1]) && (6 === i[0] || 2 === i[0])) { + r = 0; + continue + } + if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { + r.label = i[1]; + break + } + if (6 === i[0] && r.label < a[1]) { + r.label = a[1], a = i; + break + } + if (a && r.label < a[2]) { + r.label = a[2], r.ops.push(i); + break + } + a[2] && r.ops.pop(), r.trys.pop(); + continue + } + i = e.call(t, r) + } catch (c) { + i = [6, c], n = 0 + } finally { + o = a = 0 + } + if (5 & i[0]) throw i[1]; + return { + value: i[0] ? i[1] : void 0, + done: !0 + } + } + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var c = t("../common/dataTs"), + s = t("../common/enumConfig"), + l = t("../common/sdk"), + u = t("../../script/manager/data-manager"), + p = function(t) { + function e() { + return null !== t && t.apply(this, arguments) || this + } + return a(e, t), e.ttLogin = function() { + if (console.log("[api] tt login"), l.default.isPlatform(l.Platform.tt)) return new Promise(function(t) { + tt.login({ + success: function(e) { + console.log("login 调用成功 code = " + e.code + " annoymousCode = " + e.anonymousCode), l.default.post({ + url: "/sheep/v1/user/login_tt", + data: { + code: e.code, + anonymous_code: e.anonymousCode + }, + success: function(e) { + if (t(), console.log("login_tt res: ", JSON.stringify(e)), 0 == e.err_code && e.data) { + console.log("res.data.uid: ", e.data.uid); + var o = c.default.getUserData(); + o.userID = e.data.uid + "", o.openid = e.data.openid, o.token = e.data.token, c.default.saveUserData(o), u.default.user.uid = Number(o.userID); + var n = c.default.getUserData(); + console.log("userData: ", n.userID) + } + }, + fail: function() { + t() + } + }) + }, + fail: function(e) { + console.log("登录失败: ", e), t() + } + }) + }) + }, e.getUserInfo = function() { + return i(this, void 0, Promise, function() { + return r(this, function() { + return [2, new Promise(function(t, e) { + tt.getUserInfo({ + withCredentials: !0, + success: function(o) { + console.log("getUserInfo 调用成功 " + o.userInfo), console.log("getUserInfo 调用成功 " + JSON.stringify(o)); + var n = o.userInfo, + a = n.nickName, + i = n.avatarUrl, + r = n.gender; + u.default.user.avatar = i, u.default.user.nickName = a, u.default.user.gender = r, console.log(i, a, r), l.default.post({ + url: "/sheep/v1/game/update_user", + data: { + nick_name: a, + avatar: i, + gender: r + }, + success: function(e) { + t(), console.log("update_user res: ", JSON.stringify(e)) + }, + fail: function() { + e() + } + }) + }, + fail: function() { + console.log("getUserInfo 调用失败"), t() + } + }) + })] + }) + }) + }, e.wxLogin = function() { + if (console.log("[api] wx login"), l.default.isPlatform(l.Platform.wx)) return new Promise(function(t) { + wx.login({ + success: function(e) { + console.log("login 调用成功 code = " + e.code), l.default.post({ + url: "/sheep/v1/user/login_wx", + data: { + code: e.code + }, + success: function(e) { + if (t(), console.log("login_wx res: ", JSON.stringify(e)), 0 == e.err_code && e.data) { + console.log("res.data.uid: ", e.data.uid); + var o = c.default.getUserData(); + o.userID = e.data.uid + "", o.openid = e.data.openid, o.token = e.data.token, c.default.saveUserData(o), u.default.user.uid = Number(o.userID); + var n = c.default.getUserData(); + console.log("userData: ", n.userID) + } + }, + fail: function() { + t() + } + }) + }, + fail: function(e) { + console.log("登录失败: ", e), t() + } + }) + }) + }, e.getWxUserInfo = function() { + return i(this, void 0, Promise, function() { + return r(this, function() { + return [2, new Promise(function(t, e) { + wx.getUserProfile({ + desc: "用于完善个人资料", + success: function(o) { + console.log("getUserInfo 调用成功 " + o.userInfo), console.log("getUserInfo 调用成功 " + JSON.stringify(o)); + var n = o.userInfo, + a = n.nickName, + i = n.avatarUrl, + r = n.gender; + u.default.user.avatar = i, u.default.user.nickName = a, u.default.user.gender = r, console.log(i, a, r), l.default.post({ + url: "/sheep/v1/game/update_user", + data: { + nick_name: a, + avatar: i, + gender: r + }, + success: function(e) { + t(), console.log("update_user res: ", JSON.stringify(e)) + }, + fail: function() { + e() + } + }) + }, + fail: function(e) { + console.log("getUserInfo 调用失败", e), t() + } + }) + })] + }) + }) + }, e.oppoLogin = function() { + if (console.log("[api] oppo login"), l.default.isPlatform(l.Platform.oppo)) return new Promise(function(t) { + qg.login({ + success: function(e) { + t(); + var o = JSON.stringify(e); + console.log(o), e.data && l.default.post({ + url: "/sheep/v1/user/login_oppo", + data: { + uid: e.data.uid, + nick_name: e.data.nickName, + avatar: e.data.avatar, + sex: 1 + }, + success: function(e) { + if (t(), console.log("login_oppo res: ", JSON.stringify(e)), 0 == e.err_code && e.data) { + console.log("res.data.uid: ", e.data.uid); + var o = c.default.getUserData(); + o.userID = e.data.uid + "", o.openid = e.data.openid, o.token = e.data.token, c.default.saveUserData(o), u.default.user.uid = Number(o.userID), console.log("userData: ", o.userID) + } + }, + fail: function() { + t() + } + }) + }, + fail: function(e) { + t(), console.log(JSON.stringify(e)) + } + }) + }) + }, e.vivoLogin = function() { + if (console.log("[api] vivo login"), l.default.isPlatform(l.Platform.vivo)) return new Promise(function(t) { + qg.getSystemInfoSync().platformVersionCode >= 1063 ? qg.login().then(function(e) { + console.log(e), e.data.token ? (console.log("当前用户信息: " + JSON.stringify(e)), e.data && l.default.post({ + url: "/sheep/v1/user/login_vivos", + data: { + token: e.data.token + }, + success: function(e) { + if (t(), console.log("login_vivos res: ", JSON.stringify(e)), 0 == e.err_code && e.data) { + console.log("res.data.uid: ", e.data.uid); + var o = c.default.getUserData(); + o.userID = e.data.uid + "", o.openid = e.data.openid, o.token = e.data.token, c.default.saveUserData(o), u.default.user.uid = Number(o.userID), console.log("userData: ", o.userID) + } + }, + fail: function() { + t() + } + })) : t() + }, function(e) { + console.log("登录失败" + JSON.stringify(e)), t() + }) : t() + }) + }, e.requestUserInfo = function() { + return i(this, void 0, Promise, function() { + return r(this, function() { + return [2, new Promise(function(t) { + l.default.get({ + url: "/sheep/v1/game/user_info", + params: { + uid: c.default.getUserData().userID + }, + success: function(e) { + t(), console.log("user_info res: ", JSON.stringify(e)), 0 == e.err_code && e.data && (u.default.user.uid = e.data.uid, u.default.user.avatar = e.data.avatar, u.default.user.gender = e.data.gender, u.default.user.openId = e.data.openId, cc.game.emit(s.EMITKEY.USERINFOSUCCESS)) + }, + fail: function() { + t() + } + }) + })] + }) + }) + }, e.requestRankUserInfo = function() { + return i(this, void 0, Promise, function() { + return r(this, function() { + return [2, new Promise(function(t) { + l.default.get({ + url: "/sheep/v1/game/user_rank_info", + params: { + uid: c.default.getUserData().userID + }, + success: function(e) { + t(), console.log("获取排行用户信息 ### = ", JSON.stringify(e)), 0 == e.err_code && e.data && e.data.user && (u.default.rankUserInfo = e.data.user, u.default.region = e.data.region, console.log("获取排行用户信息 rankUserInfo ### = ", JSON.stringify(u.default.rankUserInfo)), cc.game.emit(s.EMITKEY.RANKUSERINFOSUCCESS)) + }, + fail: function(e) { + console.log("获取排行用户信息 err = ", e), t() + } + }) + })] + }) + }) + }, e.getUserRankInfo = function(t, e) { + l.default.get({ + url: "/sheep/v1/game/user_rank_info", + params: { + uid: c.default.getUserData().userID + }, + success: function(o) { + 0 == o.err_code ? t && t(o) : (console.log("读取数据失败"), e && e()) + }, + fail: function() { + e && e() + } + }) + }, e.getBulletData = function(t) { + l.default.get({ + url: "/sheep/v1/game/get_bullet", + success: function(e) { + 0 == e.err_code ? t && t(e.data) : console.log("读取数据失败") + } + }) + }, e.getRankInfoData = function(t) { + l.default.get({ + url: "/sheep/v1/game/rank_info", + success: function(e) { + 0 == e.err_code ? t && t(e) : console.log("读取数据失败") + }, + fail: function() {} + }) + }, e.getStageInfoData = function(t) { + l.default.get({ + url: "/sheep/v1/game/rank_stage_info", + success: function(e) { + console.log("state_info result = " + JSON.stringify(e)), 0 == e.err_code ? t && t(e) : console.log("读取数据失败") + }, + fail: function() {} + }) + }, e.gameOver = function(t, e) { + l.default.get({ + url: "/sheep/v1/game/game_over", + params: t, + success: function(t) { + console.log("game_over result = " + JSON.stringify(t)), 0 == t.err_code && e && e(t) + } + }) + }, e.getTopicData = function(t) { + return i(this, void 0, Promise, function() { + return r(this, function() { + return [2, new Promise(function(e) { + l.default.get({ + url: "/sheep/v1/game/get_topic", + params: { + uid: c.default.getUserData().userID + }, + success: function(o) { + e(), console.log("get_topic ### = ", JSON.stringify(o)), 0 == o.err_code && (u.default.topicModel = o.data, t && t(o), cc.game.emit(s.EMITKEY.TOPICACCOUNT)) + }, + fail: function() { + e() + } + }) + })] + }) + }) + }, e.joinTopic = function(t, e) { + l.default.get({ + url: "/sheep/v1/game/topic_join", + params: t, + success: function(t) { + console.log("topic_join ### = ", JSON.stringify(t)), 0 == t.err_code && e && e(t) + }, + fail: function(t) { + console.log("topic_join err = ", t) + } + }) + }, e.topicGameOver = function(t, e) { + l.default.get({ + url: "/sheep/v1/game/topic_game_over", + params: t, + success: function(t) { + console.log("game_over result = " + JSON.stringify(t)), 0 == t.err_code && e && e(t) + } + }) + }, e.topicRankInfo = function(t) { + return i(this, void 0, Promise, function() { + return r(this, function() { + return [2, new Promise(function(e) { + l.default.get({ + url: "/sheep/v1/game/topic_rank", + params: {}, + success: function(o) { + e(), 0 == o.err_code && (u.default.topicRankInfo = o.data, t && t(o), cc.game.emit(s.EMITKEY.TOPICRANKINFO)) + }, + fail: function() { + e() + } + }) + })] + }) + }) + }, e.getTopicUserInfo = function(t, e) { + l.default.get({ + url: "/sheep/v1/game/topic_user_info", + params: { + uid: t + }, + success: function(t) { + 0 == t.err_code ? e && e(t) : console.log("读取数据失败") + }, + fail: function() {} + }) + }, e.getMatchResult = function(t, e) { + l.default.get({ + url: "/sheep/v1/game/topic_match_info", + params: { + type: t, + uid: c.default.getUserData().userID + }, + success: function(t) { + 0 == t.err_code ? e && e(t) : console.log("读取数据失败") + }, + fail: function() {} + }) + }, e.updateUserSkin = function(t, e) { + l.default.get({ + url: "/sheep/v1/game/update_user_skin", + params: { + skin: t + }, + success: function(t) { + 0 == t.err_code ? e && e(t) : console.log("读取数据失败") + }, + fail: function() {} + }) + }, e.getPersonalInfo = function(t) { + l.default.get({ + url: "/sheep/v1/game/personal_info", + params: {}, + success: function(e) { + 0 == e.err_code ? t && t(e) : console.log("读取数据失败") + }, + fail: function() {} + }) + }, e + }(cc.Component); + o.default = p, cc._RF.pop() + }, { + "../../script/manager/data-manager": "data-manager", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../common/sdk": "sdk" + } + ], + audio: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "3d3f9s4k+9DLLd0qVZ7eBqp", "audio"), Object.defineProperty(o, "__esModule", { + value: !0 + }); + var n = t("../../manager/GameManager"), + a = t("../dataTs"), + i = t("../enumConfig"), + r = function() { + function t() {} + return t.updateAudioStatus = function() { + this._playingMusicName && this.playAudioMusic(this._playingMusicName, !0) + }, t.playBGM = function() { + if (this.setupData = a.default.getUserSetupData(), console.log(this.setupData.musicStatus), this.setupData.musicStatus < 0) cc.audioEngine.stopAll(); + else { + var e = "audio/music/game_cycle.mp3"; + n.default.getInstance().gameType == i.GAMETYPE.GAMEMAIN ? e = "audio/music/main_music.mp3" : n.default.getInstance().gameType == i.GAMETYPE.GAMEDAILY ? e = "audio/music/game_cycle.mp3" : n.default.getInstance().gameType == i.GAMETYPE.GAMETOMB ? e = "audio/music/game_cycle.mp3" : n.default.getInstance().gameType == i.GAMETYPE.GAMETOPIC && (e = "audio/music/game_cycle.mp3"), console.log("音乐 ###### = ", e), console.log("gameType ###### = ", n.default.getInstance().gameType), t.playAudioMusic(e, !0) + } + }, t.playAudioMusic = function(t, e) { + this.setupData = a.default.getUserSetupData(); + var o = this, + n = null; + this._bgMusicClip || (this._bgMusicClip = {}), this._audioClip || (this._audioClip = {}), this._playingMusicName || (this._playingMusicName = ""), this.setupData.musicStatus < 0 && e ? cc.audioEngine.stopAll() : this.setupData.effectStatus < 0 && !e || (e ? (this._playingMusicName == t && console.log("同一个音乐"), cc.audioEngine.stopAll(), n = !!this._bgMusicClip && this._bgMusicClip[t], this._playingMusicName = t) : n = !!this._audioClip && this._audioClip[t], n ? e ? cc.audioEngine.playMusic(n, e) : cc.audioEngine.playEffect(n, !1) : o.loadPlayAudioEngine(t, e, function(t) { + var n = null; + e ? o._playingMusicName == t && (n = o._bgMusicClip[t], cc.audioEngine.playMusic(n, e)) : (n = o._audioClip[t], cc.audioEngine.playEffect(n, !1)) + })) + }, t.resumeAllAudio = function(e) { + var o = this._playingMusicName, + n = !!this._bgMusicClip && this._bgMusicClip[o]; + n ? (cc.audioEngine.stopAll(), cc.audioEngine.play(n, !0, 1)) : e && t.playAudioMusic(e, !0) + }, t.loadPlayAudioEngine = function(t, e, o) { + o = o || function() {}; + var n = this; + cc.loader.loadRes(t, function(a, i) { + a || (e ? n._bgMusicClip[t] = i : n._audioClip[t] = i, o(t)) + }) + }, t.audioLocalName = "audioLocal", t._bgMusicClip = {}, t._playingMusicName = "", t._audioClip = {}, t.setupData = null, t + }(); + o.default = r, cc._RF.pop() + }, { + "../../manager/GameManager": "GameManager", + "../dataTs": "dataTs", + "../enumConfig": "enumConfig" + } + ], + blockArea: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "abca32Q32NKQIkl20gPemwL", "blockArea"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.blockEditorPrefab = null, e + } + return a(e, t), e.prototype.start = function() {}, i([s(cc.Prefab)], e.prototype, "blockEditorPrefab", void 0), i([c], e) + }(cc.Component); + o.default = l, cc._RF.pop() + }, {} + ], + blockEditorPrefab: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "5c0a1NoiWZPf7dwBgQqTPdJ", "blockEditorPrefab"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../script/common/CcJsFunc"), + c = cc._decorator, + s = c.ccclass, + l = c.property, + u = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.layerNumber = null, e.blockImg = null, e.moldTypeText = null, e.rolNum = 0, e.rowNum = 0, e.layerIndex = 0, e.moldType = 0, e.deleteCallback = null, e + } + return a(e, t), e.prototype.start = function() { + this.node.on(cc.Node.EventType.TOUCH_END, this.deleteBlock, this) + }, e.prototype.setBlockLayerNum = function(t, e, o, n, a) { + this.rolNum = t, this.rowNum = e, this.layerIndex = o, this.moldType = n, 2 == this.moldType ? this.moldTypeText.active = !0 : this.moldTypeText.active = !1, this.deleteCallback = a, this.layerNumber.node.active = !0, this.layerNumber.string = "" + this.layerIndex + }, e.prototype.setBlockImgType = function(t, e) { + if (this.moldType = e, 2 == this.moldType ? this.moldTypeText.active = !0 : this.moldTypeText.active = !1, 0 == t) this.blockImg.active = !1; + else { + this.blockImg.active = !0; + var o = "block/block_" + t + ".png"; + r.default.changeSpriteFrame(this.blockImg, o) + } + }, e.prototype.deleteBlock = function() { + this.deleteCallback && this.deleteCallback(this.rolNum, this.rowNum, this.layerIndex) + }, i([l(cc.Label)], e.prototype, "layerNumber", void 0), i([l(cc.Node)], e.prototype, "blockImg", void 0), i([l(cc.Node)], e.prototype, "moldTypeText", void 0), i([s], e) + }(cc.Component); + o.default = u, cc._RF.pop() + }, { + "../../script/common/CcJsFunc": "CcJsFunc" + } + ], + blockPrefab: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "163e04v/WJMCIjkhalOEqNm", "blockPrefab"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../script/common/CcJsFunc"), + c = t("../../script/common/enumConfig"), + s = t("../../script/common/native/audio"), + l = t("../../script/common/sdk"), + u = t("../../script/common/util"), + p = t("../../script/manager/data-manager"), + d = t("../../script/manager/GameManager"), + h = cc._decorator, + f = h.ccclass, + m = h.property, + g = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.blockImgBg = null, e.blockImg = null, e.blackMaskNode = null, e.rollAreaNode = null, e.rollContent = null, e.rollBlockNode = null, e.isShowLight = !1, e.isChoosed = !1, e.cardDataObj = null, e.newScale = 1, e.touchCallback = null, e.isRotating = !1, e.circleCenter = cc.v2(0, 0), e.circleRadius = 0, e.circleRadiusMax = 250, e.circleRadiusMin = 250, e.addCircleLength = 3, e.subCircleLength = -10, e.nowMoveInTimes = 0, e.moveInTimes = 15, e.rotationTimes = 80, e.radian = 0, e.radianMin = 0, e.radianAdd = 0, e.addRadianOnce = 0, e.rotateParentComp = null, e.rotateOldPosition = null, e.touchCancelCallback = null, e + } + return a(e, t), e.prototype.onLoad = function() {}, e.prototype.start = function() { + this.node.on("touchstart", this.touchStart, this), this.node.on("touchend", this.touchEnd, this), this.node.on("touchcancel", this.touchCancel, this) + }, e.prototype.addBlockNode = function(t, e, o) { + this.isChoosed = !0, this.isShowLight = !0, this.blackMaskNode.active = !1, this.cardDataObj = t, this.touchCallback = e, this.touchCancelCallback = o || function() {}, this.newScale = this.node.scale; + var n = this.getBlockName(this.cardDataObj.type); + r.default.changeSpriteFrame(this.blockImg, n), 2 == this.cardDataObj.moldType && (this.blockImg.active = !1) + }, e.prototype.getBlockName = function(t) { + var e = "block/block_" + t + ".png"; + return p.default.topicModel && d.default.getInstance().gameType == c.GAMETYPE.GAMETOPIC && (1 == p.default.topicModel.id ? e = "block/zombie/block_" + t + ".png" : 2 == p.default.topicModel.id ? e = "block/werewolf/block_" + t + ".png" : 3 == p.default.topicModel.id ? e = "block/man/block_" + t + ".png" : 4 == p.default.topicModel.id ? e = "block/autumn/block_" + t + ".png" : 5 == p.default.topicModel.id ? e = "block/teacher/block_" + t + ".png" : 6 == p.default.topicModel.id ? e = "block/autumn/block_" + t + ".png" : 7 == p.default.topicModel.id && (e = "block/teacher/block_" + t + ".png")), e + }, e.prototype.getType = function() { + return this.cardDataObj.type + }, e.prototype.getCardObj = function() { + var t = !0; + return this.isShowLight && !this.isChoosed || (t = !1), { + cardDataObj: this.cardDataObj, + isCanMove: t + } + }, e.prototype.updateBlockNodeData = function(t, e, o) { + this.isChoosed = !0, this.isShowLight = !0, this.blackMaskNode.active = !1, this.cardDataObj = t, this.touchCallback = e, this.newScale = this.node.scale, this.touchCancelCallback = o || function() {} + }, e.prototype.touchStart = function(t) { + t.stopPropagation(), this.isShowLight && !this.isChoosed && (l.default.vibrateShort(), this.newScale = this.node.scale, cc.game.emit(c.EMITKEY.SHOWMASKLAYER, 2), s.default.playAudioMusic("audio/sound/clickBlock.mp3", !1), cc.tween(this.node).to(.1, { + scale: 1.4 * this.newScale + }).start(), this.node.setSiblingIndex(1e4)) + }, e.prototype.touchEnd = function(t) { + t.stopPropagation(), this.isShowLight && !this.isChoosed && (cc.game.emit(c.EMITKEY.HIDEMASKLAYER, 1), this.touchCallback && this.touchCallback(this)) + }, e.prototype.touchCancel = function(t) { + t.stopPropagation(), this.isShowLight && !this.isChoosed && (cc.game.emit(c.EMITKEY.HIDEMASKLAYER, 6), cc.tween(this.node).to(.1, { + scale: this.newScale + }).start(), this.touchCancelCallback && this.touchCancelCallback()) + }, e.prototype.playRandomBlockAnimate = function() { + if (2 == this.cardDataObj.moldType && this.isShowLight) { + var t = this; + s.default.playAudioMusic("audio/sound/blockRandom.mp3", !1); + var e = this.cardDataObj.type; + this.rollAreaNode.active = !0; + for (var o = [], n = [], a = 0; a < 12; a++) { + var i = u.default.rnd(1, 8); + o.push(i) + } + o.push(e); + var c = u.default.rnd(1, 8); + o.push(c); + var l = .5 * (12 * this.rollBlockNode.height + 200); + this.rollContent.y = l, this.rollContent.scale = .5; + for (var p = 0; p < o.length; p++) { + var d = (p - 12) * this.rollBlockNode.height, + h = cc.instantiate(this.rollBlockNode); + h.active = !0, h.x = 0, h.y = d; + var f = this.getBlockName(o[p]); + r.default.changeSpriteFrame(h, f), n.push(h), this.rollContent.addChild(h) + } + cc.tween(this.rollContent).to(1, { + y: -7 + }, { + easing: cc.easing.cubicOut + }).call(function() { + cc.tween(this.rollContent).to(.4, { + scale: 1 + }).call(function() { + t.blockImg.active = !0, t.rollAreaNode.active = !1; + for (var e = 0; e < n.length; e++) n[e].destroy() + }, this).start() + }, this).start() + } + }, e.prototype.setStatus = function(t, e) { + var o = this; + this.node.scale = e, this.isShowLight != t && (this.isShowLight = t, this.blackMaskNode.stopAllActions(), this.isShowLight ? (this.blackMaskNode.opacity = 255, this.blockImg.active = !0, cc.tween(this.blackMaskNode).to(.2, { + opacity: 0 + }).call(function() { + o.blackMaskNode.active = !1 + }).start()) : (this.blackMaskNode.opacity = 0, this.blackMaskNode.active = !0, 2 == this.cardDataObj.moldType && cc.tween(this.blockImg).set({ + opacity: 255 + }).to(.2, { + opacity: 0 + }).call(function() { + this.blockImg.opacity = 255, this.blockImg.active = !1 + }, this).start(), cc.tween(this.blackMaskNode).to(.3, { + opacity: 255 + }).start())) + }, e.prototype.beginRotate = function(t, e, o) { + var n = this; + if (!this.isRotating) { + this.nowMoveInTimes = 0, this.isRotating = !0, this.isChoosed = !0, this.rotateParentComp = t, this.rotateOldPosition = o; + var a = cc.v2(cc.winSize.width, cc.winSize.height / 2); + this.circleCenter = t.node.convertToNodeSpaceAR(a), this.initRotationData(), this.schedule(this.circleMove, .01), cc.tween(this.node).delay(.5).call(function() { + n.cardDataObj.type = e; + var t = n.getBlockName(n.cardDataObj.type); + r.default.changeSpriteFrame(n.blockImg, t) + }, this).start() + } + }, e.prototype.initRotationData = function() { + var t = this.getPointAngle(this.circleCenter, this.rotateOldPosition), + e = u.default.rnd(-90, 90); + this.radian = t * Math.PI / 180, this.radianMin = (t + e) * Math.PI / 180, this.radianAdd = (this.radianMin - this.radian) / this.moveInTimes; + var o = u.default.pointLength(this.circleCenter, this.rotateOldPosition), + n = Math.sqrt(o), + a = Math.ceil(100 * Math.random()) + 70; + this.circleRadius = n, this.circleRadiusMax = 250, this.circleRadiusMin = a, this.subCircleLength = -(n - this.circleRadiusMin) / this.moveInTimes, this.addCircleLength = (this.circleRadiusMax - this.circleRadiusMin) / this.rotationTimes * 1; + var i = (720 - e - 30) / this.rotationTimes; + this.addRadianOnce = i * Math.PI / 180 + }, e.prototype.moveOldPosition = function() { + var t = this; + cc.tween(this.node).to(.1, { + x: this.rotateOldPosition.x, + y: this.rotateOldPosition.y + }).call(function() { + t.isRotating = !1, t.isChoosed = !1, cc.game.emit(c.EMITKEY.HIDEMASKLAYER, 7) + }, this).start() + }, e.prototype.circleMove = function() { + if (this.nowMoveInTimes += 1, this.nowMoveInTimes <= this.moveInTimes) this.circleRadius += this.subCircleLength, this.radian += this.radianAdd; + else { + if (this.nowMoveInTimes > this.rotationTimes + this.moveInTimes) return this.unschedule(this.circleMove), void this.moveOldPosition(); + this.circleRadius < this.circleRadiusMax && (this.circleRadius += this.addCircleLength), this.radian += this.addRadianOnce + } + var t = this.circleRadius * Math.cos(this.radian) + this.circleCenter.x, + e = this.circleRadius * Math.sin(this.radian) + this.circleCenter.y; + this.node.x = t, this.node.y = e + }, e.prototype.getPointAngle = function(t, e) { + var o = e.x - t.x, + n = e.y - t.y, + a = 0; + if (0 != o) { + var i = Math.abs(n / o); + a = o > 0 ? n >= 0 ? Math.atan(i) : 2 * Math.PI - Math.atan(i) : n >= 0 ? Math.PI - Math.atan(i) : Math.PI + Math.atan(i) + } else a = n > 0 ? Math.PI / 2 : -Math.PI / 2; + return 180 * a / Math.PI + }, i([m(cc.Node)], e.prototype, "blockImgBg", void 0), i([m(cc.Node)], e.prototype, "blockImg", void 0), i([m(cc.Node)], e.prototype, "blackMaskNode", void 0), i([m(cc.Node)], e.prototype, "rollAreaNode", void 0), i([m(cc.Node)], e.prototype, "rollContent", void 0), i([m(cc.Node)], e.prototype, "rollBlockNode", void 0), i([m(cc.Node)], e.prototype, "isShowLight", void 0), i([f], e) + }(cc.Component); + o.default = g, cc._RF.pop() + }, { + "../../script/common/CcJsFunc": "CcJsFunc", + "../../script/common/enumConfig": "enumConfig", + "../../script/common/native/audio": "audio", + "../../script/common/sdk": "sdk", + "../../script/common/util": "util", + "../../script/manager/GameManager": "GameManager", + "../../script/manager/data-manager": "data-manager" + } + ], + brickPrefab: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "713faAfsa9BN4dPx/ixKnJX", "brickPrefab"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = t("../itemSub/brickSubPrefab"), + u = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.content = null, e.brickSubPrefab = null, e.base_title_label = null, e.parentNode = null, e.nodeData = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.setNodeData = function(t, e) { + for (var o in this.parentNode = e, this.nodeData = t, this.base_title_label.string = "- " + this.nodeData.name + " -", this.nodeData.brickArr) { + var n = cc.instantiate(this.brickSubPrefab); + n.getComponent(l.default).setNodeData(this.nodeData.brickArr[o], this), this.content.addChild(n) + } + }, e.prototype.refreshNode = function(t, e) { + this.parentNode = e, this.nodeData = t; + var o = this.content.children; + for (var n in o) o[n].getComponent(l.default).setNodeData(this.nodeData.brickArr[n], this) + }, i([s(cc.Node)], e.prototype, "content", void 0), i([s(cc.Prefab)], e.prototype, "brickSubPrefab", void 0), i([s(cc.Label)], e.prototype, "base_title_label", void 0), i([c], e) + }(cc.Component); + o.default = u, cc._RF.pop() + }, { + "../itemSub/brickSubPrefab": "brickSubPrefab" + } + ], + brickSubPrefab: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "d9565mv5uxJ9q8a8EOWqngx", "brickSubPrefab"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../script/common/CcJsFunc"), + c = t("../../script/manager/GameManager"), + s = cc._decorator, + l = s.ccclass, + u = s.property, + p = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.imgContent = null, e.imgContentSub = null, e.imgLock = null, e.nodeData = null, e + } + return a(e, t), e.prototype.start = function() { + r.default.addbtnTouchEndScale(this.node, this.clickNodeAction.bind(this)) + }, e.prototype.clickNodeAction = function() { + r.default.addClickAudio() + }, e.prototype.rewardNodeData = function(t) { + this.imgLock.active = !1, this.imgContent.active = !0; + var e = "block/block_" + t + ".png"; + r.default.changeSpriteFrame(this.imgContentSub, e), this.imgContent.getChildByName("mark").active = !1 + }, e.prototype.setNodeData = function(t) { + this.nodeData = t; + var e = "block/block_" + t.itemId + ".png"; + r.default.changeSpriteFrame(this.imgContentSub, e), 1 == t.unlock ? (this.imgContent.active = !0, this.imgLock.active = !1) : (this.imgContent.active = !1, this.imgLock.active = !0), c.default.getInstance().collectionMark.brickNum == t.itemId ? (this.imgContent.getChildByName("mark").active = !0, c.default.getInstance().collectionMark.brickNum = 0) : this.imgContent.getChildByName("mark").active = !1 + }, i([u(cc.Node)], e.prototype, "imgContent", void 0), i([u(cc.Node)], e.prototype, "imgContentSub", void 0), i([u(cc.Node)], e.prototype, "imgLock", void 0), i([l], e) + }(cc.Component); + o.default = p, cc._RF.pop() + }, { + "../../script/common/CcJsFunc": "CcJsFunc", + "../../script/manager/GameManager": "GameManager" + } + ], + brickSv: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "0fd69rlRCBO6pXp78mPsOUw", "brickSv"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = t("../../common/dataTs"), + u = t("../../../pre/item/brickPrefab"), + p = t("../../../i18n/i18n"), + d = t("../../../i18n/gd_language"), + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.content = null, e.brickPrefab = null, e.pictureData = null, e.dataArray = [], e + } + return a(e, t), e.prototype.start = function() { + for (var t in this.content.removeAllChildren(), this.parserData(), this.dataArray) { + var e = cc.instantiate(this.brickPrefab); + e.getComponent(u.default).setNodeData(this.dataArray[t], this), this.content.addChild(e) + } + }, e.prototype.onEnable = function() { + this.dataArray.length > 0 && this.refreshSubNode() + }, e.prototype.parserData = function() { + this.pictureData = l.default.getPictureData(); + var t = l.default.gameConfigData.baseConfigData.pictureData.brickMaxNum, + e = this.pictureData.brickNum; + e >= t && (e = t); + var o = []; + this.dataArray = []; + for (var n = 0; n < t; n++) { + var a = n > e - 1 ? 0 : 1; + if (o.push({ + itemId: n + 1, + unlock: a + }), o.length >= 5 || n == t - 1) { + for (var i = 5 - o.length, r = 0; r < i; r++) o.push({ + itemId: 1, + unlock: 0 + }); + this.dataArray.push({ + name: this.dataArray.length + 1, + brickArr: o + }), o = [] + } + } + for (o = [], r = 0; r < 5; r++) o.push({ + itemId: 1, + unlock: 0 + }); + var c = p.default.instance.trans(d.GDLanguage.wallpaper_stay_tuned); + this.dataArray.push({ + name: c, + brickArr: o + }) + }, e.prototype.refreshSubNode = function() { + this.parserData(); + var t = this.content.children; + for (var e in t) t[e].getComponent(u.default).refreshNode(this.dataArray[e], this) + }, i([s(cc.Node)], e.prototype, "content", void 0), i([s(cc.Prefab)], e.prototype, "brickPrefab", void 0), i([c], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "../../../i18n/gd_language": "gd_language", + "../../../i18n/i18n": "i18n", + "../../../pre/item/brickPrefab": "brickPrefab", + "../../common/dataTs": "dataTs" + } + ], + "bullet-item": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "0f585dZZAJMXphXW81v5ZMV", "bullet-item"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/CcJsFunc"), + c = t("../../script/manager/data-manager"), + s = t("../tools/str-utils"), + l = cc._decorator, + u = l.ccclass, + p = l.property, + d = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.bgSprite = null, e.descNode = null, e.clickBtn = null, e.failSF = null, e.winSF = null, e.showData = null, e.callback = null, e + } + return a(e, t), e.prototype.start = function() { + r.default.addbtnTouchEndScale(this.clickBtn, this.clickBtnFunc.bind(this)) + }, e.prototype.clickBtnFunc = function() { + if (this.callback) { + var t = this.showData.data; + this.callback(t) + } + }, e.prototype.showSubData = function(t, e) { + this.showData = t, this.callback = e; + var o = t.data, + n = o.content; + if (c.default.region && 1 == o.type) n = c.default.region + o.content; + else if (2 == o.type && c.default.rankUserInfo) { + var a = c.default.rankUserInfo.fail; + a && 0 != a || (a = 1), n = s.default.formatStr(o.content, a) + } + this.descNode.getComponent(cc.Label).string = n, 1 == t.type ? (this.bgSprite.spriteFrame = this.winSF, this.descNode.color = new cc.Color(0, 0, 0)) : (this.bgSprite.spriteFrame = this.failSF, this.descNode.color = new cc.Color(255, 255, 255)) + }, i([p(cc.Sprite)], e.prototype, "bgSprite", void 0), i([p(cc.Node)], e.prototype, "descNode", void 0), i([p(cc.Node)], e.prototype, "clickBtn", void 0), i([p(cc.SpriteFrame)], e.prototype, "failSF", void 0), i([p(cc.SpriteFrame)], e.prototype, "winSF", void 0), i([u], e) + }(cc.Component); + o.default = d, cc._RF.pop() + }, { + "../../script/manager/data-manager": "data-manager", + "../common/CcJsFunc": "CcJsFunc", + "../tools/str-utils": "str-utils" + } + ], + "bullet-screen-pop": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "a8b16hoKXVDjrSvCkcW6JEW", "bullet-screen-pop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/CcJsFunc"), + c = t("../common/dataTs"), + s = t("../common/enumConfig"), + l = t("../common/sdk"), + u = t("../manager/GameManager"), + p = t("../../script/manager/data-manager"), + d = t("../sub/bullet-item"), + h = cc._decorator, + f = h.ccclass, + m = h.property, + g = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mask = null, e.popNode = null, e.closeBtn = null, e.contentNode = null, e.buttleItemNode = null, e.bulletsWin = [], e.bulletsFail = [], e + } + return a(e, t), e.prototype.start = function() { + r.default.addbtnTouchEndScale(this.mask, this.maskFunc.bind(this)), r.default.addTargetTouchUpInside(this.closeBtn, this.closeBtnFunc.bind(this)), this.buttleItemNode.active = !1 + }, e.prototype.closeBtnFunc = function() { + this.node.active = !1 + }, e.prototype.maskFunc = function() { + this.node.active = !1 + }, e.prototype.showPop = function() { + this.node.active = !0, this.bulletsWin = p.default.bulletsWin, this.bulletsFail = p.default.bulletsFail, p.default.rankUserInfo && 1 == p.default.rankUserInfo.state ? this.setupSubviews(this.bulletsWin, 1) : this.setupSubviews(this.bulletsFail, 2) + }, e.prototype.setupSubviews = function(t, e) { + var o = this; + this.contentNode.removeAllChildren(); + for (var n = 0; n < t.length; n++) { + var a = t[n], + i = cc.instantiate(this.buttleItemNode); + i.active = !0, this.contentNode.addChild(i); + var r = { + data: a, + type: e + }; + i.getComponent(d.default).showSubData(r, function(t) { + o.node.active = !1, console.log("弹幕 = " + JSON.stringify(t)), o.sendBulletMsg(t), cc.game.emit(s.EMITKEY.BULLETSEND, t.mid) + }) + } + }, e.prototype.sendBulletMsg = function(t) { + t && (u.default.getInstance().bulletTime = -60, l.default.post({ + url: "/sheep/v1/game/bullet_send", + data: { + uid: c.default.getUserData().userID, + mid: t.mid + }, + success: function(t) { + console.log("bullet_send res: ", JSON.stringify(t)) + }, + fail: function() {} + })) + }, i([m(cc.Node)], e.prototype, "mask", void 0), i([m(cc.Node)], e.prototype, "popNode", void 0), i([m(cc.Node)], e.prototype, "closeBtn", void 0), i([m(cc.Node)], e.prototype, "contentNode", void 0), i([m(cc.Node)], e.prototype, "buttleItemNode", void 0), i([f], e) + }(cc.Component); + o.default = g, cc._RF.pop() + }, { + "../../script/manager/data-manager": "data-manager", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../common/sdk": "sdk", + "../manager/GameManager": "GameManager", + "../sub/bullet-item": "bullet-item" + } + ], + "bullet-screen": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "01bb9cdc4ROcLtEHfsN7AZR", "bullet-screen"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../script/api/api-sheep"), + c = t("../../script/common/CcJsFunc"), + s = t("../../script/common/enumConfig"), + l = t("../../script/manager/PoolManager"), + u = t("../../script/manager/data-manager"), + p = t("../../pre/effect/BulletPrefab"), + d = cc._decorator, + h = d.ccclass, + f = (d.property, function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.bulletsCurrent = [], e.bulletsArray = [], e.timer = 0, e + } + return a(e, t), e.prototype.start = function() { + cc.game.on(s.EMITKEY.RANKUSERINFOSUCCESS, this.rankUserInfoFunc, this), cc.game.on(s.EMITKEY.BULLETSEND, this.bulletSendFunc, this), this.schedule(this.requestBulletData, 60, 1e4, 1) + }, e.prototype.bulletSendFunc = function(t) { + for (var e = {}, o = 0; o < u.default.bulletsWin.length; o++) + if (t == (n = u.default.bulletsWin[o]).mid) { + e.content = n.content, e.type = n.type; + break + } + if (!e.content) + for (o = 0; o < u.default.bulletsFail.length; o++) { + var n; + if (t == (n = u.default.bulletsFail[o]).mid) { + e.content = n.content, e.type = n.type; + break + } + } + u.default.user && (e.avatar = u.default.user.avatar), u.default.rankUserInfo && (e.state = u.default.rankUserInfo.state), e.isSelf = 1, u.default.region && (e.region = u.default.region), console.log("mid = " + t, JSON.stringify(e)), this.createBullet(e) + }, e.prototype.rankUserInfoFunc = function() { + u.default.rankUserInfo && u.default.rankUserInfo.state + }, e.prototype.requestBulletData = function() { + var t = this, + e = u.default.getBulletData(); + e ? (console.log("使用缓存数据->弹幕"), this.setDataInfo(e)) : (console.log("缓存数据过期->弹幕"), r.default.getBulletData(function(e) { + e && (t.setDataInfo(e), u.default.setBulletData(e)) + })) + }, e.prototype.setDataInfo = function(t) { + this.bulletsCurrent = t, this.showBullets() + }, e.prototype.spawnBullets = function() { + for (var t = this, e = this, o = this.randomBullet(), n = 0; n < o; n++) setTimeout(function() { + var o = t.randomContent(); + o && o.content && e.createBullet(o) + }, 2e3 * n) + }, e.prototype.createBullet = function(t) { + var e = l.PoolManager.instance.get("BulletPrefab"); + e.x = this.node.width / 2 + 200, e.getComponent(p.default).setupData(t), e.getComponent(p.default).speed = 100, e.y = this.randomStartPosY(), this.bulletsArray.push(e), this.node.addChild(e) + }, e.prototype.randomRGB = function(t, e, o) { + return new cc.Color(t, e, o) + }, e.prototype.randomColor = function() { + var t = Math.round(255 * Math.random()), + e = Math.round(255 * Math.random()), + o = Math.round(255 * Math.random()); + return new cc.Color(t, e, o) + }, e.prototype.randomBullet = function() { + var t = Math.round(c.default.randomNum(3, 10)); + return this.bulletsCurrent.length < 10 && (t = Math.round(c.default.randomNum(1, 3))), t + }, e.prototype.randomContent = function() { + if (this.bulletsCurrent && 0 != this.bulletsCurrent.length) { + for (var t = Math.round(Math.random() * (this.bulletsCurrent.length - 1)), e = this.bulletsCurrent[t], o = 0; o < u.default.bulletsWin.length; o++) { + var n = u.default.bulletsWin[o]; + if (e.mid == n.mid) { + e.content = n.content, e.type = n.type; + break + } + } + if (!e.content) + for (o = 0; o < u.default.bulletsFail.length; o++) + if (n = u.default.bulletsFail[o], e.mid == n.mid) { + e.content = n.content, e.type = n.type; + break + } + return e + } + }, e.prototype.randomSpeed = function() { + return Math.round(100 * Math.random()) + 100 + }, e.prototype.randomStartPosY = function() { + var t = this.node.height; + return Math.round(Math.random() * t * .8) - .4 * t + }, e.prototype.update = function(t) { + this.timer += t; + for (var e = [], o = 0; o < this.bulletsArray.length; o++) this.bulletsArray[o].x -= t * this.bulletsArray[o].getComponent(p.default).speed, this.bulletsArray[o].x <= -(this.node.width + this.bulletsArray[o].width) && (l.PoolManager.instance.put(this.bulletsArray[o]), e.push(o)); + for (o = 0; o < e.length; o++) this.bulletsArray.splice(e[o], 1); + this.timer >= 3 && (this.timer = 0, this.showBullets()) + }, e.prototype.showBullets = function() { + 0 != this.bulletsArray.length && 4 != this.bulletsArray.length || (console.log("再次创建弹幕 ### " + this.bulletsArray.length), this.spawnBullets()) + }, i([h], e) + }(cc.Component)); + o.default = f, cc._RF.pop() + }, { + "../../pre/effect/BulletPrefab": "BulletPrefab", + "../../script/api/api-sheep": "api-sheep", + "../../script/common/CcJsFunc": "CcJsFunc", + "../../script/common/enumConfig": "enumConfig", + "../../script/manager/PoolManager": "PoolManager", + "../../script/manager/data-manager": "data-manager" + } + ], + "calendar-item": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "312273bidZPd4yxEMIojF1F", "calendar-item"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = t("../../common/dataTs"), + u = t("../../common/enumConfig"), + p = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.imgEnd = null, e.imgStart = null, e.imgWin = null, e.descNode = null, e.nodeData = null, e.parentNode = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.setNodeData = function(t) { + this.nodeData = t, this.descNode.getComponent(cc.Label).string = String(t.day), this.show(t.type) + }, e.prototype.getNodeData = function() { + return this.nodeData + }, e.prototype.isWin = function() { + var t = this.nodeData.date.split("-"); + if (t.length >= 3) { + var e = "" + t[0] + t[1], + o = "" + t[0] + t[1] + t[2], + n = l.default.getUserData().dailyData, + a = this.nodeData.type == u.CALENDARITEM.ITEMOLD || this.nodeData.type == u.CALENDARITEM.ITEMNOW; + if (n && n[e] && n[e][o] && n[e][o].isWin && a) return !0 + } + return !1 + }, e.prototype.show = function(t) { + void 0 === t && (t = u.CALENDARITEM.ITEMFUTURE), this.showBackground(t), this.isWin() && (this.imgEnd.active = !1, this.imgStart.active = !1, this.imgWin.active = !0, this.descNode.color = (new cc.Color).fromHEX("58BF3A")) + }, e.prototype.showBackground = function(t) { + switch (this.imgEnd.active = !1, this.imgStart.active = !1, this.imgWin.active = !1, this.descNode.active = !0, this.descNode.color = (new cc.Color).fromHEX("#661C1C"), t) { + case u.CALENDARITEM.ITEMLAST: + this.descNode.active = !1; + break; + case u.CALENDARITEM.ITEMOLD: + this.imgEnd.active = !0; + break; + case u.CALENDARITEM.ITEMNOW: + this.imgEnd.active = !0, this.imgStart.active = !0, this.descNode.color = (new cc.Color).fromHEX("#FFFFFF"); + break; + case u.CALENDARITEM.ITEMFUTURE: + this.descNode.color = (new cc.Color).fromHEX("#BBADAD"); + break; + case u.CALENDARITEM.ITEMNEXT: + this.descNode.active = !1, this.descNode.color = (new cc.Color).fromHEX("#BBADAD"); + break; + case u.CALENDARITEM.ITEMNOR: + this.imgEnd.active = !0, this.imgStart.active = !1, this.imgWin.active = !1; + break; + case u.CALENDARITEM.ITEMSELE: + this.imgEnd.active = !1, this.imgStart.active = !0, this.imgWin.active = !1, this.descNode.color = (new cc.Color).fromHEX("#FFFFFF"); + break; + case u.CALENDARITEM.ITEMSUC: + this.imgEnd.active = !1, this.imgStart.active = !1, this.imgWin.active = !0, this.descNode.color = (new cc.Color).fromHEX("58BF3A") + } + }, i([s(cc.Node)], e.prototype, "imgEnd", void 0), i([s(cc.Node)], e.prototype, "imgStart", void 0), i([s(cc.Node)], e.prototype, "imgWin", void 0), i([s(cc.Node)], e.prototype, "descNode", void 0), i([c], e) + }(cc.Component); + o.default = p, cc._RF.pop() + }, { + "../../common/dataTs": "dataTs", + "../../common/enumConfig": "enumConfig" + } + ], + "cat-house-progress": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "a832bZG8ctCkbykfAYO9amD", "cat-house-progress"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../common/CcJsFunc"), + c = t("../../common/dataTs"), + s = t("../../common/enumConfig"), + l = t("../../common/spine"), + u = t("../../main/houseLayer"), + p = t("../../main/mainCultivateLayer"), + d = t("../../pop/unlock-build-pop"), + h = cc._decorator, + f = h.ccclass, + m = h.property, + g = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mainCultivateLayer = null, e.mainUILayer = null, e.houseLayer = null, e.progressMain = null, e.progressNode = null, e.receiveNode = null, e.newCatNode = null, e.titleLabel = null, e.progressBar = null, e.progressLabel = null, e.boxNode = null, e.boxMark = null, e.clawSpine = null, e + } + return a(e, t), e.prototype.start = function() { + cc.game.on(s.EMITKEY.MAINUPDATEUI, this.updateSubUI, this), cc.game.on(s.EMITKEY.UPDATETABBARSEND, this.updateTabbar, this), r.default.addbtnTouchStartScale(this.node), r.default.addbtnTouchEndScale(this.node, this.catProgressFunc.bind(this)), r.default.addbtnTouchCancelScale(this.node), this.updateSubUI() + }, e.prototype.updateSubUI = function() { + var t = this; + if (this.updateProgress(), 1 == c.default.currentHouseUnlockAll() && (c.default.haveNewHouseUnlock() ? this.boxMark.active = !0 : this.boxMark.active = !1, "1" == cc.sys.localStorage.getItem("unlockNewHouse") ? this.unlockNewHouseFunc() : this.receiveBox()), this.clawSpine.active = !1, !cc.sys.localStorage.getItem("unlockClawCache")) { + var e = c.default.getUserData(); + e.fish >= 2 && e.playLevelId < 10 && (this.clawSpine.active = !0, this.clawSpine.getComponent(l.default).play("6Pa", 0, function() { + t.clawSpine.active = !1 + }), cc.sys.localStorage.setItem("unlockClawCache", 1)) + } + }, e.prototype.updateTabbar = function(t) { + t == s.MAINPAGE.PAGEMAIN && (this.clawSpine.active = !1) + }, e.prototype.catProgressFunc = function() { + if ("1" == cc.sys.localStorage.getItem("unlockNewHouse")) return c.default.haveNewHouseUnlock() ? (this.mainCultivateLayer.getComponent(p.default).unlockNewHouse(), void cc.sys.localStorage.setItem("unlockNewHouse", "0")) : (console.log("房屋已全部解锁"), void cc.game.emit("showMainTips", "Waiting for new houses to be built!")); + if (1 == c.default.currentHouseUnlockAll()) return c.default.getHourseUnlockData(), this.mainUILayer.getChildByName("unlock-build-pop").getComponent(d.default).showGetRemoveProp(), this.unlockNewHouseFunc(), void cc.sys.localStorage.setItem("unlockNewHouse", "1"); + cc.game.emit(s.EMITKEY.UPDATETABBARRECEIVE, 1); + var t = c.default.getHourseUnlockData(); + t && (t.length <= 4 ? this.houseLayer.getComponent(u.default).moveWithRoomId(s.ROOMTYPE.ROOMONE) : 4 < t.length && t.length < 8 ? this.houseLayer.getComponent(u.default).moveWithRoomId(s.ROOMTYPE.ROOMTWO) : 8 <= t.length && t.length < 11 && this.houseLayer.getComponent(u.default).moveWithRoomId(s.ROOMTYPE.ROOMTHREE)), this.updateSubUI() + }, e.prototype.updateProgress = function() { + this.receiveNode.active = !1, this.newCatNode.active = !1, this.progressMain.active = !0, this.progressNode.active = !0; + var t = c.default.getUserData().fish, + e = c.default.getHourseUnlockData(); + if (e && e.length) { + e[e.length - 1] && e[e.length - 1].length && (this.boxMark.active = t >= e[e.length - 1][0].fish), this.titleLabel.string = "猫屋" + e.length; + var o = e[e.length - 1], + n = 0; + for (var a in o) o[a].unlock && n++; + this.progressLabel.string = n + "/" + o.length, this.progressBar.getComponent(cc.Sprite).fillRange = n / o.length + } else this.boxMark.active = !1 + }, e.prototype.receiveBox = function() { + this.progressNode.active = !1, this.newCatNode.active = !1, this.receiveNode.active = !0 + }, e.prototype.unlockNewHouseFunc = function() { + this.progressMain.active = !1, this.newCatNode.active = !0, c.default.haveNewHouseUnlock() ? this.newCatNode.getComponent(cc.Label).string = "解锁新房屋" : this.newCatNode.getComponent(cc.Label).string = "已全部解锁" + }, i([m(cc.Node)], e.prototype, "mainCultivateLayer", void 0), i([m(cc.Node)], e.prototype, "mainUILayer", void 0), i([m(cc.Node)], e.prototype, "houseLayer", void 0), i([m(cc.Node)], e.prototype, "progressMain", void 0), i([m(cc.Node)], e.prototype, "progressNode", void 0), i([m(cc.Node)], e.prototype, "receiveNode", void 0), i([m(cc.Node)], e.prototype, "newCatNode", void 0), i([m(cc.Label)], e.prototype, "titleLabel", void 0), i([m(cc.Node)], e.prototype, "progressBar", void 0), i([m(cc.Label)], e.prototype, "progressLabel", void 0), i([m(cc.Node)], e.prototype, "boxNode", void 0), i([m(cc.Node)], e.prototype, "boxMark", void 0), i([m(cc.Node)], e.prototype, "clawSpine", void 0), i([f], e) + }(cc.Component); + o.default = g, cc._RF.pop() + }, { + "../../common/CcJsFunc": "CcJsFunc", + "../../common/dataTs": "dataTs", + "../../common/enumConfig": "enumConfig", + "../../common/spine": "spine", + "../../main/houseLayer": "houseLayer", + "../../main/mainCultivateLayer": "mainCultivateLayer", + "../../pop/unlock-build-pop": "unlock-build-pop" + } + ], + catClawPrefabs: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "d608do4PQpDxZoRa+u6of6d", "catClawPrefabs"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../script/common/spine"), + c = cc._decorator, + s = c.ccclass, + l = c.property, + u = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.catClaw = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.playClawAnimation = function() { + var t = this; + t.node.active = !0, this.node.scale = .8, this.catClaw.getComponent(r.default).play("6Pa", 0, function() { + t.node.active = !1 + }) + }, i([l(cc.Node)], e.prototype, "catClaw", void 0), i([s], e) + }(cc.Component); + o.default = u, cc._RF.pop() + }, { + "../../script/common/spine": "spine" + } + ], + catNode: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "576facriHVLQ5wzTbqa6xlT", "catNode"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/dataTs"), + c = t("../common/spine"), + s = cc._decorator, + l = s.ccclass, + u = (s.property, function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.catId = 0, e.parentComp = null, e.touchStartPoint = null, e.touchEndPoint = null, e.distance = 0, e.unlockClothingBg = null, e.unlockClothing = null, e + } + return a(e, t), e.prototype.start = function() { + this.node.on("touchend", this.touchEndFunc, this), this.node.on("touchstart", this.touchStartFunc, this), this.node.on("touchmove", this.touchMoveFunc, this), this.node.on("touchcancel", this.touchCancelFunc, this); + var t = this.node.parent; + this.unlockClothingBg = t.getChildByName("unlockClothingBg"), this.unlockClothing = t.getChildByName("unlockClothing"), cc.tween(this.unlockClothingBg).by(10, { + angle: 360 + }).repeatForever().start() + }, e.prototype.setCatData = function(t, e) { + this.catId = t, this.parentComp = e, this.updateSkin() + }, e.prototype.playClothesAnimation = function(t) { + void 0 === t && (t = !1), this.unlockClothingBg.active = t, this.unlockClothing.active = t + }, e.prototype.updateSkin = function(t) { + void 0 === t && (t = !1); + var e = "cat_" + this.catId, + o = r.default.getUserData().catClothesData[e]; + for (var n in o) 1 == o[n].isWear && this.setCatSpine(o[n].clothesID, o[n].clothRank, t) + }, e.prototype.setCatSpine = function(t, e, o) { + void 0 === o && (o = !1); + var n = this, + a = "Model" + (this.catId < 10 ? "0" + this.catId : this.catId + ""); + this.node.getComponent(c.default).loadNewSpine(a, function() { + var a = t % 1e3, + i = a < 10 ? "0" + a : a + ""; + n.node.getComponent(c.default).setNewSkin(i), o ? n.node.getComponent(c.default).play("2_SkinChange1", 1, function() { + n.node.getComponent(c.default).play("1_Standby1", 0) + }) : n.node.getComponent(c.default).play("1_Standby1", 0); + var r = 1; + r = e < 2 ? 0 : 1; + for (var s = ["Collar2", "Collar1"], l = 0; l < s.length; l++) n.node.getComponent("spine").spine.getAttachment(s[l], s[l]) && (n.node.getComponent("spine").spine.getAttachment(s[l], s[l]).color.a = r); + r = e < 3 ? 0 : 1; + var u = ["Body1", "Arm_L1", "Arm_R1", "Cloak1"]; + for (l = 0; l < u.length; l++) n.node.getComponent("spine").spine.getAttachment(u[l], u[l]) && (n.node.getComponent("spine").spine.getAttachment(u[l], u[l]).color.a = r) + }) + }, e.prototype.touchEndFunc = function(t) { + t.stopPropagation(), this.touchEndPoint = t.getLocation(), this.distance = this.touchStartPoint.sub(this.touchEndPoint).mag(), this.distance < 10 && (this.parentComp ? this.parentComp.touchCatFunc(this.catId) : console.log("parentComp = null")), this.playClothesAnimation(!1) + }, e.prototype.touchStartFunc = function(t) { + this.touchStartPoint = t.getLocation() + }, e.prototype.touchMoveFunc = function() {}, e.prototype.touchCancelFunc = function() {}, i([l], e) + }(cc.Component)); + o.default = u, cc._RF.pop() + }, { + "../common/dataTs": "dataTs", + "../common/spine": "spine" + } + ], + challengeSucPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "37c28V2pHFLK67RfzN7DCzx", "challengeSucPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../api/ApiTool"), + c = t("../common/CcJsFunc"), + s = t("../common/dataTs"), + l = t("../common/spine"), + u = cc._decorator, + p = u.ccclass, + d = u.property, + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.maskNode = null, e.popNode = null, e.titleLabel = null, e.allLabel = null, e.numLabel = null, e.sheepSP = null, e.bgFlashSP = null, e.headerNode = null, e + } + return a(e, t), e.prototype.start = function() { + c.default.addbtnTouchEndScale(this.maskNode, this.maskNodeFunc.bind(this)) + }, e.prototype.maskNodeFunc = function() { + this.node.active = !1 + }, e.prototype.showPop = function() { + var t = this; + this.node.active = !0, cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(), cc.tween(this.bgFlashSP).to(0, { + scale: 0 + }).to(.1, { + scale: 1 + }).call(function() { + t.bgFlashSP.getComponent(l.default).loadSpine("sheep/UI", function() { + t.bgFlashSP.getComponent(l.default).play("4Ray2", 0) + }) + }).start(); + for (var e = "sheep/Sheeps", o = "skin_00", n = s.default.getSheepClothesData(), a = 0; a < n.length; a++) { + var i = n[a]; + if (i.dressing) { + e = "sheep/" + i.spName, o = i.spSkin; + break + } + } + cc.tween(this.sheepSP).to(0, { + scale: 0 + }).to(.2, { + scale: 1 + }).call(function() { + t.sheepSP.getComponent(l.default).loadSpine(e, function() { + t.sheepSP.getComponent(l.default).setNewSkin(o), t.sheepSP.getComponent(l.default).play("Jump1", 0) + }) + }).start(), r.default.dailyAllNumber, r.default.dailywinNumber, this.allLabel.string = "全国挑战1羊", this.numLabel.string = " 1 ", c.default.setAvatar(this.headerNode, r.default.avatar) + }, i([d(cc.Node)], e.prototype, "maskNode", void 0), i([d(cc.Node)], e.prototype, "popNode", void 0), i([d(cc.Label)], e.prototype, "titleLabel", void 0), i([d(cc.Label)], e.prototype, "allLabel", void 0), i([d(cc.Label)], e.prototype, "numLabel", void 0), i([d(cc.Node)], e.prototype, "sheepSP", void 0), i([d(cc.Node)], e.prototype, "bgFlashSP", void 0), i([d(cc.Node)], e.prototype, "headerNode", void 0), i([p], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "../api/ApiTool": "ApiTool", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/spine": "spine" + } + ], + chessboard: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "209706/F/ZKrrywgXpITLxQ", "chessboard"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../pre/main/blockPrefab"), + c = t("../common/CcJsFunc"), + s = t("../common/dataTs"), + l = t("../common/enumConfig"), + u = t("../common/native/audio"), + p = t("../manager/GameManager"), + d = t("./crushArea"), + h = cc._decorator, + f = h.ccclass, + m = h.property, + g = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.blockPrefab = null, e.blockArea = null, e.crushAreaNode = null, e.gameTopNode = null, e.moveOutArea = null, e.cookieGetParticle = null, e.crushAreaArgs = null, e.levelID = 0, e.nowLevelBlockObj = {}, e.parentComp = null, e.blockTypeArr = [], e.minBlockNum = 8, e.blockMaxWidth = 120, e.blockMaxHeight = 135, e.cookieBlockType = 0, e.scaleRate = 1, e + } + return a(e, t), e.prototype.onLoad = function() {}, e.prototype.onDestroy = function() { + console.log("chessboard 退出程序 ######") + }, e.prototype.start = function() { + console.log("start ###") + }, e.prototype.onEnable = function() { + console.log("onEnable ###") + }, e.prototype.init = function(t, e) { + this.node.scale = 1, console.log("init ###### ", t.widthNum, t.heightNum, this.node.scale), this.parentComp = e, this.nowLevelData = t, this.blockArea.removeAllChildren(), this.levelID = t.levelID, this.createBlockTypeObj(), this.rewardBlockInit(t, !1), this.initBlockNodeLayer(!0), cc.game.emit(l.EMITKEY.SHOWMASKLAYER, 3), this.refreshIndex() + }, e.prototype.initNextLevelMap = function(t, e) { + this.node.scale = 1, console.log("init ###### ", t.widthNum, t.heightNum, this.node.scale), this.parentComp = e, this.nowLevelData = t, this.blockArea.x = cc.winSize.width, this.blockArea.removeAllChildren(), this.createBlockTypeObj(), this.rewardBlockInit(t, !0), this.initBlockNodeLayer(!1), cc.game.emit(l.EMITKEY.SHOWMASKLAYER, 3), this.refreshIndex(), cc.tween(this.blockArea).to(1, { + x: -360, + y: 0 + }, { + easing: cc.easing.quadOut + }).call(function() { + cc.game.emit(l.EMITKEY.HIDEMASKLAYER, 11) + }, this).start() + }, e.prototype.rewardBlockInit = function(t, e) { + if (s.default.gameConfigData.baseConfigData) { + this.cookieBlockType = 0; + var o = s.default.getUserData().playLevelId, + n = s.default.gameConfigData.baseConfigData.cookieRewardLevel; + if (e && o >= n && o % 2 != 0) { + var a = this.getCookieLevelData(); + console.log("饼干类型为", a.type); + var i = s.default.getCookieRewardData(); + console.log("cookieData", JSON.stringify(i)), this.cookieBlockType = a.type + } + } + }, e.prototype.getCookieLevelData = function() { + var t = this.blockTypeArr.concat(), + e = this.sortAndGroup(t), + o = c.default.shuffle(e); + console.log("blockArr", t), console.log("randomArr", o); + var n = []; + 30 <= t.length && t.length <= 72 && n.push(3), 36 <= t.length && t.length <= 93 && n.push(6), 60 <= t.length && t.length <= 105 && n.push(9), 54 <= t.length && t.length <= 99 && n.push(12), 69 <= t.length && t.length <= 114 && n.push(15), 114 <= t.length && t.length <= 147 && n.push(21), console.log("countArr", n); + var a = []; + for (var i in n) + for (var r in e) + if (n[i] == e[r].length) { + a.push(n[i]); + break + } + console.log("canArr", a); + var s = a[Math.floor(Math.random() * a.length)]; + for (var l in console.log("count", s), o) + if (s == o[l].length) return { + count: s, + type: o[l][0] + }; + return { + count: 0, + type: 0 + } + }, e.prototype.sortAndGroup = function(t) { + var e, o = []; + t.sort(function(t, e) { + return t - e + }); + for (var n = 0; n < t.length; n++) t[n - 1] !== t[n] && (e = [], o.push(e)), e.push(t[n]); + return o + }, e.prototype.createBlockTypeObj = function() { + var t = this.nowLevelData.blockTypeData; + for (var e in this.blockTypeArr = [], this.nowLevelBlockObj = {}, t) + for (var o = 3 * t[e], n = 0; n < o; n++) this.blockTypeArr.push(e); + console.log("PUSH=> block ", this.blockTypeArr.length), this.blockTypeArr = c.default.shuffle(this.blockTypeArr), p.default.blacksInfo.blockCurCount = this.blockTypeArr.length, p.default.blacksInfo.blockAllCount = this.blockTypeArr.length, console.log("blockCurCount = " + p.default.blacksInfo.blockCurCount + " blockAllCount = " + p.default.blacksInfo.blockAllCount) + }, e.prototype.initBlockNodeLayer = function(t) { + p.default.getInstance().cookieDict.cookieCurCount = 0; + var e = this.nowLevelData.levelData; + for (var o in e) + for (var n in e[o]) t ? this.addBlockFunc(e[o][n], cc.winSize.height) : this.addBlockFunc(e[o][n], 0); + t ? this.playInitBlockAnimate() : this.noPlayAnimate() + }, e.prototype.checkGameWin = function() { + for (var t in this.nowLevelBlockObj) + for (var e in this.nowLevelBlockObj[t]) + for (var o in this.nowLevelBlockObj[t][e]) return !1; + return !0 + }, e.prototype.noPlayAnimate = function() { + for (var t in this.nowLevelBlockObj) + for (var e in this.nowLevelBlockObj[t]) + for (var o in this.nowLevelBlockObj[t][e]) { + var n = this.checkIsShow(t, Number(o), Number(e)), + a = this.nowLevelBlockObj[t][e][o].getComponent(r.default), + i = this.node.width / this.nowLevelData.widthNum / this.blockMaxWidth; + i *= this.scaleRate, a.setStatus(n, i), a.isChoosed = !1, a.playRandomBlockAnimate() + } + }, e.prototype.playInitBlockAnimate = function() { + cc.tween(this.node).delay(.3).call(function() { + u.default.playAudioMusic("audio/sound/levelInit.mp3", !1) + }).start(); + var t = 1e4, + e = 0, + o = 0; + for (var n in this.nowLevelBlockObj) + for (var a in this.nowLevelBlockObj[n]) + for (var i in this.nowLevelBlockObj[n][a]) o++, Number(i) < t && (t = Number(i)), Number(a) > e && (e = Number(a)); + var c = function(n) { + var a = function(a) { + var i = function(i) { + var c = .02 * (Number(i) - t) + .02 * (e - Number(a)), + u = s.nowLevelBlockObj[n][a][i].getComponent(r.default); + cc.tween(u.node).delay(c).by(.8, { + y: -cc.winSize.height + }).by(.1, { + y: -5 + }).by(.1, { + y: 8 + }).by(.1, { + y: -3 + }).call(function() { + o--; + var t = this.checkIsShow(n, Number(i), Number(a)), + e = this.nowLevelBlockObj[n][a][i].getComponent(r.default), + c = this.node.width / this.nowLevelData.widthNum / this.blockMaxWidth; + c *= this.scaleRate, e.setStatus(t, c), e.isChoosed = !1, e.playRandomBlockAnimate(), 0 == o && cc.game.emit(l.EMITKEY.HIDEMASKLAYER, 3) + }, s).start() + }; + for (var c in s.nowLevelBlockObj[n][a]) i(c) + }; + for (var i in s.nowLevelBlockObj[n]) a(i) + }, + s = this; + for (var n in this.nowLevelBlockObj) c(n) + }, e.prototype.refreshIndex = function() { + for (var t in this.nowLevelBlockObj) + for (var e in this.nowLevelBlockObj[t]) + for (var o in this.nowLevelBlockObj[t][e]) this.nowLevelBlockObj[t][e][o].setSiblingIndex(1e4) + }, e.prototype.refreshMask = function() { + var t = 0; + for (var e in this.nowLevelBlockObj) + for (var o in this.nowLevelBlockObj[e]) + for (var n in this.nowLevelBlockObj[e][o]) { + t++; + var a = this.checkIsShow(e, Number(n), Number(o)), + i = this.node.width / this.nowLevelData.widthNum / this.blockMaxWidth; + i *= this.scaleRate, this.nowLevelBlockObj[e][o][n].getComponent(r.default).setStatus(a, i) + } + p.default.blacksInfo.blockCurCount = t + }, e.prototype.updateBlockArea = function() { + var t = []; + for (var e in cc.game.emit(l.EMITKEY.SHOWMASKLAYER, 4), this.nowLevelBlockObj) + for (var o in this.nowLevelBlockObj[e]) + for (var n in this.nowLevelBlockObj[e][o]) { + var a = this.nowLevelBlockObj[e][o][n].getComponent(r.default); + t.push(a.cardDataObj.type) + } + if (!((t = c.default.shuffle(t)).length < 1)) { + for (var e in this.nowLevelBlockObj) + for (var o in this.nowLevelBlockObj[e]) + for (var n in this.nowLevelBlockObj[e][o]) { + a = this.nowLevelBlockObj[e][o][n].getComponent(r.default); + var i = this.nowLevelData.widthNum * this.minBlockNum, + s = this.node.width / i, + u = this.node.width / this.nowLevelData.widthNum, + p = a.cardDataObj.rolNum * s + u / 2, + d = u / this.blockMaxWidth; + d *= this.scaleRate; + var h = -(a.cardDataObj.rowNum * s + d * this.blockMaxHeight / 2), + f = cc.v3(p, h, 0); + a.beginRotate(this, t.pop(), f) + } + return !0 + } + cc.game.emit(l.EMITKEY.HIDEMASKLAYER, 4) + }, e.prototype.checkIsShow = function(t, e, o) { + var n = this.nowLevelBlockObj; + for (var a in n) + if (Number(a) > Number(t)) { + var i = e - this.minBlockNum, + r = e + this.minBlockNum, + c = o - this.minBlockNum, + s = o + this.minBlockNum; + for (var l in n[a]) + for (var u in n[a][l]) + if (Number(u) > i && Number(u) < r && Number(l) > c && Number(l) < s) return !1 + } + return !0 + }, e.prototype.removeCardNode = function(t) { + if (!(this.crushAreaNode.getComponent(d.default).getCrushBlockNum() >= 7)) { + this.crushAreaNode.setSiblingIndex(10), this.crushAreaArgs && this.crushAreaArgs.setSiblingIndex(10); + var e = t.cardDataObj; + this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum] && delete this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum], this.parentComp.crushBlockNode(t), t.comeParent = "chessboard", this.refreshMask() + } + }, e.prototype.addBlockFunc = function(t, e) { + var o = cc.instantiate(this.blockPrefab); + this.blockArea.addChild(o); + var n = this.nowLevelData.widthNum * this.minBlockNum, + a = this.node.width / n, + i = this.node.width / this.nowLevelData.widthNum, + c = i / this.blockMaxWidth; + c *= this.scaleRate, o.scale = c; + var s = t.rolNum * a + i / 2, + l = -(t.rowNum * a + c * this.blockMaxHeight / 2); + if (o.x = s, o.y = l + e, 0 == t.type) { + var u = this.blockTypeArr.pop(); + t.type = u + } + this.cookieBlockType == t.type ? t.cookie = 1 : t.cookie = 0, t.cookieType = this.cookieBlockType, o.getComponent(r.default).addBlockNode(t, this.removeCardNode.bind(this), this.refreshIndex.bind(this)), this.addBlockDataObj(o, t) + }, e.prototype.cancelAddBlockFunc = function(t) { + t.node.setSiblingIndex(1e3); + var e = t.node, + o = e.convertToWorldSpaceAR(cc.v2(0, 0)), + n = this.blockArea.convertToNodeSpaceAR(o); + e.removeFromParent(!1), e.x = n.x, e.y = n.y, this.blockArea.addChild(e); + var a = this.nowLevelData.widthNum * this.minBlockNum, + i = this.node.width / a, + c = this.node.width / this.nowLevelData.widthNum, + s = t.cardDataObj.rolNum * i + c / 2, + u = c / this.blockMaxWidth; + u *= this.scaleRate; + var p = -(t.cardDataObj.rowNum * i + u * this.blockMaxHeight / 2); + e.stopAllActions(), cc.tween(e).to(.15, { + x: s, + y: p, + scale: u + }).call(function() { + t.isChoosed = !1, cc.game.emit(l.EMITKEY.HIDEMASKLAYER, 2) + }, this).start(), e.getComponent(r.default).updateBlockNodeData(t.cardDataObj, this.removeCardNode.bind(this), this.refreshIndex.bind(this)), this.addBlockDataObj(e, t.cardDataObj), this.refreshMask(), this.refreshIndex() + }, e.prototype.addBlockDataObj = function(t, e) { + this.nowLevelBlockObj[e.layerNum] ? this.nowLevelBlockObj[e.layerNum][e.rowNum] ? this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum] = t : (this.nowLevelBlockObj[e.layerNum][e.rowNum] = {}, this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum] = t) : (this.nowLevelBlockObj[e.layerNum] = {}, this.nowLevelBlockObj[e.layerNum][e.rowNum] = {}, this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum] = t) + }, i([m(cc.Prefab)], e.prototype, "blockPrefab", void 0), i([m(cc.Node)], e.prototype, "blockArea", void 0), i([m(cc.Node)], e.prototype, "crushAreaNode", void 0), i([m(cc.Node)], e.prototype, "gameTopNode", void 0), i([m(cc.Node)], e.prototype, "moveOutArea", void 0), i([m(cc.Prefab)], e.prototype, "cookieGetParticle", void 0), i([m(cc.Node)], e.prototype, "crushAreaArgs", void 0), i([f], e) + }(cc.Component); + o.default = g, cc._RF.pop() + }, { + "../../pre/main/blockPrefab": "blockPrefab", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../common/native/audio": "audio", + "../manager/GameManager": "GameManager", + "./crushArea": "crushArea" + } + ], + clothesPrefab: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "33fd5tSoKRCfKE6RQ1fb4nf", "clothesPrefab"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../script/common/CcJsFunc"), + c = t("../../script/common/dataTs"), + s = t("../../script/common/spine"), + l = t("../../script/manager/GameManager"), + u = cc._decorator, + p = u.ccclass, + d = u.property, + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.titleBanner_1 = null, e.lvLabel_1 = null, e.titleLabel_1 = null, e.titleBanner_2 = null, e.titleLabel_2 = null, e.titleBanner_3 = null, e.lockNode = null, e.selectNode = null, e.catNode = null, e.clothId = 0, e.clothData = null, e.isClicked = !1, e.catId = 0, e.parentComp = null, e + } + return a(e, t), e.prototype.start = function() { + this.node.on("touchend", this.dressCloth, this) + }, e.prototype.setClothNodeData = function(t, e, o, n) { + if (this.clothData = t, this.parentComp = e, c.default.getUserData(), this.isClicked = !1, this.titleBanner_1.active = !1, this.titleBanner_2.active = !1, this.titleBanner_3.active = !1, this.lockNode.active = !1, this.catNode.active = !1, this.selectNode.active = !1, this.clothId = t.clothesID, l.default.getInstance().collectionMark.catSkinNum == this.clothData.clothesID ? (this.node.getChildByName("mark").active = !0, l.default.getInstance().collectionMark.catSkinNum = 0) : this.node.getChildByName("mark").active = !1, "level" == t.unlockType) { + var a = !1; + for (var i in n) + if (this.clothData.clothesID == n[i].clothesID) { + a = !0; + break + } + if (a) + for (var i in n) this.clothData.clothesID == n[i].clothesID && (this.titleBanner_1.active = !0, this.isClicked = !0, this.titleLabel_1.string = t.name, this.lvLabel_1.string = "Lv" + n[i].clothRank, this.catNode.active = !0, this.selectNode.active = n[i].isWear, this.setCatSpine(o, n[i].clothRank), 0 == this.clothData.skin ? this.lvLabel_1.node.active = !1 : this.lvLabel_1.node.active = !0, 2 == this.clothData.skin && n[i].clothRank < 3 && (this.titleBanner_1.active = !1, this.titleBanner_2.active = !0, this.titleLabel_2.string = "完成挑战解锁")); + else this.titleBanner_2.active = !1, this.titleLabel_2.string = t.unlockNum + "关解锁", this.lockNode.active = !0, this.clothData.skin < 1e4 && (this.catNode.active = !0, this.titleBanner_1.active = !1, this.lockNode.active = !1, 1 == this.clothData.skin ? (this.titleBanner_3.active = !0, this.setCatSpine(o, 1)) : 2 == this.clothData.skin ? (this.titleBanner_2.active = !0, this.titleLabel_2.string = "完成挑战解锁", this.setCatSpine(o, 0)) : this.setCatSpine(o, 1)) + } else t.unlockType + }, e.prototype.setCatSpine = function(t, e) { + var o = this; + this.catId = t; + var n = "Model" + (this.catId < 10 ? "0" + this.catId : this.catId + ""); + this.catNode.getComponent(s.default).loadNewSpine(n, function() { + var t = o.clothId % 1e3, + n = t < 10 ? "0" + t : t + ""; + o.clothData.skin < 1e4 && o.catNode.getComponent(s.default).setNewSkin(n); + var a = "Skin/" + n + "_" + e; + console.log(n + " " + a), o.catNode.getComponent(s.default).play(a, 0) + }) + }, e.prototype.dressCloth = function() { + r.default.addClickAudio(), this.isClicked ? (console.log("选择衣服:", this.clothId), this.parentComp.dressCloth(this.clothId)) : console.log("不能被点击") + }, i([d(cc.Node)], e.prototype, "titleBanner_1", void 0), i([d(cc.Label)], e.prototype, "lvLabel_1", void 0), i([d(cc.Label)], e.prototype, "titleLabel_1", void 0), i([d(cc.Node)], e.prototype, "titleBanner_2", void 0), i([d(cc.Label)], e.prototype, "titleLabel_2", void 0), i([d(cc.Node)], e.prototype, "titleBanner_3", void 0), i([d(cc.Node)], e.prototype, "lockNode", void 0), i([d(cc.Node)], e.prototype, "selectNode", void 0), i([d(cc.Node)], e.prototype, "catNode", void 0), i([p], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "../../script/common/CcJsFunc": "CcJsFunc", + "../../script/common/dataTs": "dataTs", + "../../script/common/spine": "spine", + "../../script/manager/GameManager": "GameManager" + } + ], + collectPrefab: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "0d875oEXn5LZ7yyzkAjxqlu", "collectPrefab"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = t("../itemSub/collectSubPrefab"), + u = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.content = null, e.collectSubPrefab = null, e.base_title_label = null, e.nodeData = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.setNodeData = function(t) { + this.nodeData = t; + var e = this.nodeData.catArr.length; + for (var o in this.node.height = 130 + e / 3 * 305, this.base_title_label.string = "- " + this.nodeData.name + " -", this.nodeData.catArr) { + var n = cc.instantiate(this.collectSubPrefab); + n.getComponent(l.default).setNodeData(this.nodeData.catArr[o], this), this.content.addChild(n) + } + }, e.prototype.refreshNode = function(t) { + this.nodeData = t; + var e = this.content.children; + for (var o in e) e[o].getComponent(l.default).setNodeData(this.nodeData.catArr[o], this) + }, i([s(cc.Node)], e.prototype, "content", void 0), i([s(cc.Prefab)], e.prototype, "collectSubPrefab", void 0), i([s(cc.Label)], e.prototype, "base_title_label", void 0), i([c], e) + }(cc.Component); + o.default = u, cc._RF.pop() + }, { + "../itemSub/collectSubPrefab": "collectSubPrefab" + } + ], + collectSubPrefab: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "57acahslq1PzajDPXaUCYWO", "collectSubPrefab"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../script/common/CcJsFunc"), + c = t("../../script/common/spine"), + s = t("../../script/common/dataTs"), + l = t("../../script/manager/GameManager"), + u = cc._decorator, + p = u.ccclass, + d = u.property, + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.imgContent = null, e.tabLabel = null, e.imgTab = null, e.catNode = null, e.unlocking = null, e.imgLock = null, e.nodeData = null, e + } + return a(e, t), e.prototype.start = function() { + r.default.addbtnTouchEndScale(this.node, this.clickNodeAction.bind(this)) + }, e.prototype.clickNodeAction = function() { + r.default.addClickAudio() + }, e.prototype.setNodeData = function(t) { + var e = this; + this.nodeData = t, this.tabLabel.string = this.nodeData.name; + var o = s.default.getUserData().catClothesData["cat_" + e.nodeData.modelID], + n = !1; + for (var a in o) + if (this.nodeData.clothesID == o[a].clothesID) { + n = !0; + break + } + if (s.default.getUserData().playLevelId, n ? (this.imgContent.active = !0, this.imgLock.active = !1) : (this.imgContent.active = !1, this.imgLock.active = !0), !(this.nodeData.unlockNum >= 1e4)) { + 0 == this.nodeData.skin ? this.tabLabel.getComponent(cc.LabelOutline).color = (new cc.Color).fromHEX("#4482CE") : 1 == this.nodeData.skin ? this.tabLabel.getComponent(cc.LabelOutline).color = (new cc.Color).fromHEX("#A648D7") : 2 == this.nodeData.skin && (this.tabLabel.getComponent(cc.LabelOutline).color = (new cc.Color).fromHEX("#D5A618")); + var i = "rewardIcon/Tab" + (t.skin + 1) + ".png"; + r.default.changeSpriteFrame(this.imgTab, i); + var u = this.nodeData.clothesID % 1e3, + p = this.nodeData.modelID, + d = "Model" + (p < 10 ? "0" + p : p + ""); + if (!o) return e.imgContent.active = !1, void(e.imgLock.active = !0); + this.catNode.getComponent(c.default).loadNewSpine(d, function() { + var t = u < 10 ? "0" + u : u + ""; + e.catNode.getComponent(c.default).setNewSkin(t); + for (var n = 0; n < o.length; n++) { + var a = o[n]; + if (a.clothesID == e.nodeData.clothesID) { + var i = e.nodeData.skin; + if (i < 1e4) { + var r = "Skin/" + (i < 10 ? "0" + i : i + "") + "_" + a.clothRank; + e.catNode.getComponent(c.default).play(r, 0) + } + break + } + } + }), l.default.getInstance().collectionMark.catNum == t.clothesID ? (this.imgContent.getChildByName("mark").active = !0, l.default.getInstance().collectionMark.catNum = 0) : this.imgContent.getChildByName("mark").active = !1 + } + }, i([d(cc.Node)], e.prototype, "imgContent", void 0), i([d(cc.Label)], e.prototype, "tabLabel", void 0), i([d(cc.Node)], e.prototype, "imgTab", void 0), i([d(cc.Node)], e.prototype, "catNode", void 0), i([d(cc.Node)], e.prototype, "unlocking", void 0), i([d(cc.Node)], e.prototype, "imgLock", void 0), i([p], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "../../script/common/CcJsFunc": "CcJsFunc", + "../../script/common/dataTs": "dataTs", + "../../script/common/spine": "spine", + "../../script/manager/GameManager": "GameManager" + } + ], + collectSv: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "f3673ZyHCpFtbKp/M6ZObGH", "collectSv"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = t("../../common/dataTs"), + u = t("../../../pre/item/collectPrefab"), + p = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.content = null, e.collectPrefab = null, e.collectData = null, e.dataArray = [], e + } + return a(e, t), e.prototype.start = function() { + this.parserData(), this.content.removeAllChildren(); + for (var t = 0; t < this.dataArray.length; t++) { + var e = cc.instantiate(this.collectPrefab); + e.getComponent(u.default).setNodeData(this.dataArray[t], this), this.content.addChild(e) + } + }, e.prototype.onEnable = function() { + this.dataArray.length > 0 && this.refreshSubNode() + }, e.prototype.refreshSubNode = function() { + this.parserData(); + var t = this.content.children; + for (var e in t) t[e].getComponent(u.default).refreshNode(this.dataArray[e], this) + }, e.prototype.parserData = function() { + var t = []; + for (var e in this.collectData = l.default.gameConfigData.baseConfigData.catClothesData, this.collectData) + for (var o in this.collectData[e]) this.collectData[e][o].modelID < 1e4 && t.push(this.collectData[e][o]); + for (var n = 0, a = 0; a < t.length; a++)(c = t[a].roomID) > n && (n = c); + for (a = 0; a <= n; a++) this.dataArray[a] = { + name: "", + catArr: [] + }; + for (var i = [], r = 0; r < t.length; r++) { + var c = t[r].roomID; + this.dataArray[c - 1].name = "房间" + c, this.dataArray[c - 1].catArr.push(t[r]) + } + for (i = [], a = 0; a < 3; a++) i.push({ + name: "格格", + clothesID: 7e3, + unlockType: "level", + unlockNum: 1e4, + skin: 1 + }); + this.dataArray[this.dataArray.length - 1].name = "敬请期待", this.dataArray[this.dataArray.length - 1].catArr = i, console.log(this.dataArray.length) + }, i([s(cc.Node)], e.prototype, "content", void 0), i([s(cc.Prefab)], e.prototype, "collectPrefab", void 0), i([c], e) + }(cc.Component); + o.default = p, cc._RF.pop() + }, { + "../../../pre/item/collectPrefab": "collectPrefab", + "../../common/dataTs": "dataTs" + } + ], + config: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "09960YHWTBJybJ2atehqivt", "config"), Object.defineProperty(o, "__esModule", { + value: !0 + }), o.default = { + blockTypeConfig: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], + mapType: { + 6: { + width: 6, + height: 7 + }, + 7: { + width: 7, + height: 9 + }, + 8: { + width: 8, + height: 10 + }, + 9: { + width: 9, + height: 11 + }, + 10: { + width: 10, + height: 12 + } + }, + baseMapObj: { + widthNum: 8, + heightNum: 10, + levelKey: 1, + blockTypeData: {}, + levelData: { + 1: [] + } + } + }, cc._RF.pop() + }, {} + ], + cookiePrefab: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "30474i2SThKzpM59arL/dte", "cookiePrefab"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../script/common/CcJsFunc"), + c = cc._decorator, + s = c.ccclass, + l = c.property, + u = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.cookieTrailing = null, e.imageNode = null, e.labelNode = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.showData = function(t, e) { + void 0 === t && (t = 0), void 0 === e && (e = 0), 0 == t ? (this.imageNode.angle = 0, this.labelNode.active = !1, this.cookieTrailing.active = !1, r.default.changeSpriteFrame(this.imageNode, "block/cookie/cookie_icon_fly.png")) : 1 == t ? (this.imageNode.angle = -12, this.labelNode.active = !0, this.labelNode.getComponent(cc.Label).string = "x" + e, this.cookieTrailing.active = !1, r.default.changeSpriteFrame(this.imageNode, "block/cookie/cookie_icon_fly.png")) : 2 == t && (this.imageNode.angle = 0, this.labelNode.active = !1, this.cookieTrailing.active = !1, r.default.changeSpriteFrame(this.imageNode, "rewardIcon/base_icon_ribbon.png")) + }, i([l(cc.Node)], e.prototype, "cookieTrailing", void 0), i([l(cc.Node)], e.prototype, "imageNode", void 0), i([l(cc.Node)], e.prototype, "labelNode", void 0), i([s], e) + }(cc.Component); + o.default = u, cc._RF.pop() + }, { + "../../script/common/CcJsFunc": "CcJsFunc" + } + ], + cookieRewardNode: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "69fe22S909JKoELNPl5QSbH", "cookieRewardNode"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../script/common/CcJsFunc"), + c = cc._decorator, + s = c.ccclass, + l = c.property, + u = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.imageNode = null, e.labelNode = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.showData = function(t) { + var e = "rewardIcon/" + t.rewardType + ".png", + o = 0; + this.imageNode.y = 0, "reward_fish" == t.rewardType ? o = 0 : "prop_random" == t.rewardType ? (o = 60, this.imageNode.y = 5) : "prop_remove" == t.rewardType && (e = "rewardIcon/prop_remove.png", o = 0, this.imageNode.y = 15), this.imageNode.angle = o, r.default.changeSpriteFrame(this.imageNode, e), this.labelNode.getComponent(cc.Label).string = t.rewardCount + "" + }, i([l(cc.Node)], e.prototype, "imageNode", void 0), i([l(cc.Node)], e.prototype, "labelNode", void 0), i([s], e) + }(cc.Component); + o.default = u, cc._RF.pop() + }, { + "../../script/common/CcJsFunc": "CcJsFunc" + } + ], + crushArea: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "aa009UiZ8pDtasKgVM+bH6Y", "crushArea"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/enumConfig"), + c = t("../common/native/audio"), + s = t("../common/util"), + l = t("../manager/GameManager"), + u = t("./chessboard"), + p = t("./moveOutArea"), + d = cc._decorator, + h = d.ccclass, + f = d.property, + m = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.gametopUI = null, e.moveOutArea = null, e.chessboardNode = null, e.particlePrefab = null, e.rewardEmitter = null, e.rewardEmitterNode = null, e.ribbonBoxPrefab = null, e.ribbonBox = null, e.crushAreaArgs = null, e.dailySF = null, e.topicSF = null, e.crushArray = [], e.blockMaxWidth = 120, e.newScale = .8, e.moveSpeed = 2e3, e.cancelArray = [], e.failNumber = 7, e.gameOverStatus = !1, e.particleNode1 = null, e.particleNode2 = null, e.particleNode3 = null, e.parentComp = null, e + } + return a(e, t), e.prototype.onLoad = function() {}, e.prototype.start = function() {}, e.prototype.initCrushArea = function(t) { + this.node.removeAllChildren(), this.parentComp = t, this.particleNode1 = null, this.particleNode2 = null, this.particleNode3 = null, this.rewardEmitterNode = null, this.ribbonBox = null, this.crushArray = [], this.cancelArray = [], this.gameOverStatus = !1, this.node.opacity = 0, cc.tween(this.node).to(.4, { + opacity: 255 + }).start(), l.default.getInstance().gameType == r.GAMETYPE.GAMETOPIC ? (this.getComponent(cc.Sprite).spriteFrame = this.topicSF, this.crushAreaArgs && (this.crushAreaArgs.active = !1)) : (this.getComponent(cc.Sprite).spriteFrame = this.dailySF, this.crushAreaArgs && (this.crushAreaArgs.active = !0)) + }, e.prototype.hideCrushArea = function() { + cc.tween(this.node).to(.4, { + opacity: 0 + }).start() + }, e.prototype.addCrushAreaCardNode = function(t) { + var e = t.node.convertToWorldSpaceAR(cc.v2(0, 0)), + o = this.node.convertToNodeSpaceAR(e); + t.node.removeFromParent(!1), t.node.x = o.x, t.node.y = o.y, t.isChoosed = !0, this.node.addChild(t.node), this.addNewBlockNode(t), this.getCrushBlockNum() >= 7 && cc.game.emit(r.EMITKEY.SHOWMASKLAYER, 5) + }, e.prototype.getCrushBlockNum = function() { + for (var t = this.crushArray.length, e = 0; e < this.crushArray.length - 2; e++) { + var o = this.crushArray[e + 2].cardDataObj.type, + n = (this.crushArray[e + 2].node, this.crushArray[e + 1].cardDataObj.type), + a = (this.crushArray[e + 1].node, this.crushArray[e].cardDataObj.type); + this.crushArray[e].node, o == a && n == a && (t -= 3) + } + return t + }, e.prototype.addNewBlockNode = function(t) { + t.isReady = !1; + var e = this.getNewPosit(t); + this.crushArray.splice(e, 0, t), this.cancelArray.push(t); + var o = t.cardDataObj.layerNum + "-" + t.cardDataObj.rolNum + "-" + t.cardDataObj.rowNum; + t.blockID = o, this.updateNewPosition() + }, e.prototype.isCrushBlock = function() { + for (var t = 0; t < this.crushArray.length - 2; t++) { + var e = this.crushArray[t + 2].cardDataObj.type, + o = this.crushArray[t + 2].node, + n = this.crushArray[t + 1].cardDataObj.type, + a = this.crushArray[t + 1].node, + i = this.crushArray[t].cardDataObj.type, + r = this.crushArray[t].node; + if (e == i && n == i && this.crushArray[t + 2].isReady && this.crushArray[t + 1].isReady && this.crushArray[t + 0].isReady) return c.default.playAudioMusic("audio/sound/crush.mp3", !1), cc.tween(o).to(.1, { + scale: 0 + }).call(function() { + this.crushArray.length < 1 && this.parentComp.crushAnimateCallback(), this.particleNode1 || (this.particleNode1 = cc.instantiate(this.particlePrefab), this.node.addChild(this.particleNode1)), this.particleNode1.setSiblingIndex(100), this.particleNode1.position = o.position, this.particleNode1.getComponent(cc.ParticleSystem).resetSystem(), o.destroy() + }, this).start(), cc.tween(a).to(.1, { + scale: 0 + }).call(function() { + this.particleNode2 || (this.particleNode2 = cc.instantiate(this.particlePrefab), this.node.addChild(this.particleNode2)), this.particleNode2.setSiblingIndex(100), this.particleNode2.position = a.position, this.particleNode2.getComponent(cc.ParticleSystem).resetSystem(), a.destroy() + }, this).start(), cc.tween(r).to(.1, { + scale: 0 + }).call(function() { + this.particleNode3 || (this.particleNode3 = cc.instantiate(this.particlePrefab), this.node.addChild(this.particleNode3)), this.particleNode3.setSiblingIndex(100), this.particleNode3.position = r.position, this.particleNode3.getComponent(cc.ParticleSystem).resetSystem(), r.destroy() + }, this).start(), this.crushArray.splice(t, 3), this.cancelArray = [], this.updateNewPosition(), !0 + } + return !1 + }, e.prototype.updateNewPosition = function() { + for (var t, e = this, o = function() { + t = a * n.blockMaxWidth * n.newScale + n.blockMaxWidth * n.newScale / 2, n.crushArray[a].node.stopAllActions(); + var o = n.crushArray[a], + i = n.getMoveTime(o.node.position, { + x: t, + y: 0 + }); + o.node.x == t && 0 == o.node.y || cc.tween(o.node).to(i, { + x: t + 14, + y: 8, + scale: n.newScale + }).call(function() { + if (o.isReady = !0, !e.isCrushBlock() && e.crushArray.length >= e.failNumber) { + for (var t = !0, n = 0; n < e.crushArray.length; n++) e.crushArray[n].isReady || (t = !1); + t && e.gameOverFunc() + } + }, n).start() + }, n = this, a = 0; a < this.crushArray.length; a++) o() + }, e.prototype.gameOverFunc = function() { + this.gameOverStatus || (this.gameOverStatus = !0, cc.game.emit(r.EMITKEY.HIDEMASKLAYER, 10), this.parentComp.gameOverFunc()) + }, e.prototype.rebornGameFunc = function() { + this.gameOverStatus = !1, this.moveOutBlock() + }, e.prototype.getNewPosit = function(t) { + for (var e = this.crushArray.length - 1; e >= 0; e--) + if (this.crushArray[e].cardDataObj.type == t.cardDataObj.type) return e + 1; + return this.crushArray.length + }, e.prototype.moveOutBlock = function() { + if (this.crushArray.length < 1) return !1; + this.node.setSiblingIndex(10), this.crushAreaArgs && this.crushAreaArgs.setSiblingIndex(10), this.moveOutArea.setSiblingIndex(9), cc.game.emit(r.EMITKEY.SHOWMASKLAYER, 1), this.cancelArray = []; + for (var t = [], e = 0; e < this.crushArray.length && !(this.crushArray[e].isReady && (t.push(this.crushArray.splice(e, 1)[0]), e--, t.length >= 3)); e++); + return t.length < 1 && cc.game.emit(r.EMITKEY.HIDEMASKLAYER, 5), this.moveOutArea.getComponent(p.default).addThreeOutBlock(t), this.updateNewPosition(), !0 + }, e.prototype.cancelOneStep = function() { + if (this.cancelArray.length > 0) { + cc.game.emit(r.EMITKEY.SHOWMASKLAYER, 6); + for (var t = this.cancelArray.pop(), e = 0; e < this.crushArray.length; e++) this.crushArray[e].cardDataObj.layerNum == t.cardDataObj.layerNum && this.crushArray[e].cardDataObj.rolNum == t.cardDataObj.rolNum && this.crushArray[e].cardDataObj.rowNum == t.cardDataObj.rowNum && this.crushArray.splice(e, 1); + return "moveOutArea" == t.comeParent && (this.moveOutArea.getComponent(p.default).cancelAddBlockFunc(t), this.moveOutArea.setSiblingIndex(10)), "chessboard" == t.comeParent && (this.chessboardNode.getComponent(u.default).cancelAddBlockFunc(t), this.chessboardNode.setSiblingIndex(10)), this.updateNewPosition(), !0 + } + return !1 + }, e.prototype.getMoveTime = function(t, e) { + var o = s.default.pointLength(t, e); + return Math.sqrt(o) / this.moveSpeed + }, i([f(cc.Node)], e.prototype, "gametopUI", void 0), i([f(cc.Node)], e.prototype, "moveOutArea", void 0), i([f(cc.Node)], e.prototype, "chessboardNode", void 0), i([f(cc.Prefab)], e.prototype, "particlePrefab", void 0), i([f(cc.Prefab)], e.prototype, "rewardEmitter", void 0), i([f(cc.Prefab)], e.prototype, "ribbonBoxPrefab", void 0), i([f(cc.Node)], e.prototype, "crushAreaArgs", void 0), i([f({ + type: cc.SpriteFrame, + tooltip: "每日挑战" + })], e.prototype, "dailySF", void 0), i([f({ + type: cc.SpriteFrame, + tooltip: "话题" + })], e.prototype, "topicSF", void 0), i([h], e) + }(cc.Component); + o.default = m, cc._RF.pop() + }, { + "../common/enumConfig": "enumConfig", + "../common/native/audio": "audio", + "../common/util": "util", + "../manager/GameManager": "GameManager", + "./chessboard": "chessboard", + "./moveOutArea": "moveOutArea" + } + ], + "cubic-bezier-curve": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "1d0f1p1wcNIAKRIU+Hz/9CF", "cubic-bezier-curve"), Object.defineProperty(o, "__esModule", { + value: !0 + }), o.CubicBezierCurve = void 0; + var n = t("./curve-sample"), + a = t("./typed-event"), + i = cc.Vec3, + r = cc.Vec2, + c = function() { + function t(t, e) { + this.samples = new Array, this.length = 0, this.Changed = new a.TypedEvent, this.n1 = t, this.n2 = e, t.changed.on(this.computeSamples), e.changed.on(this.computeSamples), this.computeSamples() + } + return Object.defineProperty(t.prototype, "Length", { + get: function() { + return this.length + }, + enumerable: !1, + configurable: !0 + }), t.prototype.ConnectStart = function(t) { + this.n1.changed.off(this.computeSamples), this.n1 = t, t.changed.on(this.computeSamples), this.computeSamples() + }, t.prototype.ConnectEnd = function(t) { + this.n2.changed.off(this.computeSamples), this.n2 = t, t.changed.on(this.computeSamples), this.computeSamples() + }, t.prototype.GetInverseDirection = function() { + return i.scaleAndAdd(new i, i.negate(new i, this.n2.Direction), this.n2.Position, 2) + }, t.prototype.GetLocation = function(t) { + var e = 1 - t, + o = e * e, + n = t * t, + a = i.multiplyScalar(new i, this.n1.Position, o * e), + r = i.multiplyScalar(new i, this.n1.Direction, 3 * o * t), + c = this.GetInverseDirection(); + i.multiplyScalar(c, c, 3 * e * n); + var s = i.multiplyScalar(new i, this.n2.Position, n * t); + return i.add(a, a, r), i.add(a, a, c), i.add(a, a, s), a + }, t.prototype.GetTangent = function(t) { + var e = 1 - t, + o = e * e, + n = t * t, + a = i.multiplyScalar(new i, this.n1.Position, -o), + r = i.multiplyScalar(new i, this.n1.Direction, 3 * o - 2 * e), + c = i.multiplyScalar(new i, this.GetInverseDirection(), -3 * n + 2 * t), + s = i.multiplyScalar(new i, this.n2.Position, n); + return i.add(a, a, r), i.add(a, a, c), i.add(a, a, s), a.normalize() + }, t.prototype.GetUp = function(t) { + return i.lerp(new i, this.n1.Up, this.n2.Up, t) + }, t.prototype.GetScale = function(t) { + return r.lerp(new r, this.n1.Scale, this.n2.Scale, t) + }, t.prototype.GetRoll = function() { + return console.assert(!1), 0 + }, t.prototype.recursiveSamples = function(t, e, o) { + if (!(o > 8)) { + var n = .5 * (e + t), + a = this.GetTangent(t), + r = this.GetTangent(e); + if (!(i.angle(a, r) <= .1 && 0 != o)) { + this.recursiveSamples(t, n, o + 1); + var c = this.samples[this.samples.length - 1].location, + s = this.GetLocation(n); + this.length += i.distance(c, s), this.samples.push(this.createSample(this.Length, n, s)), this.recursiveSamples(n, e, o + 1) + } + } + }, t.prototype.computeSamples = function() { + this.samples.length = 0, this.length = 0, this.samples.push(this.createSample(0, 0)), this.recursiveSamples(0, 1, 0); + var t = this.samples[this.samples.length - 1].location, + e = this.GetLocation(1); + this.length += i.distance(t, e), this.samples.push(this.createSample(this.Length, 1)) + }, t.prototype.createSample = function(t, e, o) { + return o || (o = this.GetLocation(e)), new n.CurveSample(o, this.GetTangent(e), this.GetUp(e), this.GetScale(e), t, e, this) + }, t.prototype.GetSample = function(t) { + if (t < 0 || t > 1) throw new Error("Time must be between 0 and 1 (was " + t + ")."); + for (var e = this.samples[0], o = null, a = !1, i = 0, r = this.samples; i < r.length; i++) { + var c = r[i]; + if (c.timeInCurve >= t) { + o = c, a = !0; + break + } + e = c + } + if (!a) throw new Error("Can't find curve samples."); + var s = o === e ? 0 : (t - e.timeInCurve) / (o.timeInCurve - e.timeInCurve); + return n.CurveSample.Lerp(e, o, s) + }, t.prototype.GetSampleAtDistance = function(t) { + if (t < 0 || t > this.Length) throw new Error("Distance must be positive and less than curve length. Length = " + this.Length + ", given distance was " + t + "."); + for (var e = this.samples[0], o = null, a = !1, i = 0, r = this.samples; i < r.length; i++) { + var c = r[i]; + if (c.distanceInCurve >= t) { + o = c, a = !0; + break + } + e = c + } + if (!a) throw new Error("Can't find curve sample."); + var s = o === e ? 0 : (t - e.distanceInCurve) / (o.distanceInCurve - e.distanceInCurve); + return n.CurveSample.Lerp(e, o, s) + }, t.prototype.GetProjectionSample = function() { + return console.assert(!1, "Not implement"), null + }, t + }(); + o.CubicBezierCurve = c, cc._RF.pop() + }, { + "./curve-sample": "curve-sample", + "./typed-event": "typed-event" + } + ], + "curve-sample": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "fcdcepeqV5GO5ejTxbhKhyO", "curve-sample"), Object.defineProperty(o, "__esModule", { + value: !0 + }), o.CurveSample = void 0; + var n = t("./mesh-vertex"), + a = cc.Quat, + i = cc.Vec2, + r = cc.Vec3, + c = t("./export-helper"), + s = cc.misc, + l = function() { + function t(t, e, o, n, i, r, c) { + this.location = t, this.tangent = e, this.up = o, this.scale = n, this.distanceInCurve = i, this.timeInCurve = r, this.curve = c, this.rotation = new a + } + return Object.defineProperty(t.prototype, "Rotation", { + get: function() { + var t = Object.freeze(new a); + if (this.rotation === t) { + var e = this.up; + this.rotation = new a, a.fromViewUp(this.rotation, this.tangent, e) + } + return this.rotation + }, + enumerable: !1, + configurable: !0 + }), t.prototype.equals = function(t) { + return this.location.equals(t.location) && this.tangent.equals(t.tangent) && this.up.equals(t.up) && this.scale.equals(t.scale) && c.math.equals(this.distanceInCurve, t.distanceInCurve) && c.math.equals(this.timeInCurve, t.timeInCurve) + }, t.Lerp = function(e, o, n) { + var a = new r; + r.lerp(a, e.location, o.location, n); + var c = new r; + r.lerp(c, e.tangent, o.tangent, n).normalize(); + var l = new r; + r.lerp(l, e.up, o.up, n); + var u = new i; + return i.lerp(u, e.scale, o.scale, n), new t(a, c, l, u, s.lerp(e.distanceInCurve, o.distanceInCurve, n), s.lerp(e.timeInCurve, o.timeInCurve, n), e.curve) + }, t.prototype.getBent = function(t) { + var e = new n.MeshVertex(t.position, t.normal, t.uv), + o = new r(0, e.position.y * this.scale.y, e.position.z * this.scale.x); + o.x = 0; + var i = a.fromEuler(new a, 0, s.degreesToRadians(-90), 0), + c = a.multiply(new a, this.Rotation, i); + return r.transformQuat(o, o, c), r.add(o, o, this.location), e + }, t + }(); + o.CurveSample = l, cc._RF.pop() + }, { + "./export-helper": "export-helper", + "./mesh-vertex": "mesh-vertex" + } + ], + "daily-challenge": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "d96aesUCApI06hXg7ZujIsy", "daily-challenge"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = t("../../common/CcJsFunc"), + u = t("./calendar-item"), + p = t("../../common/enumConfig"), + d = t("../../manager/DateManager"), + h = t("../../game/gameLayer"), + f = t("../../common/dataTs"), + m = t("../../game/gameUiLayer"), + g = t("../../common/spine"), + y = t("../../utils/uma/uma-sdk"), + v = t("../../manager/GameManager"), + b = t("../../manager/report-common"), + _ = t("../../../i18n/i18n"), + N = t("../../../i18n/gd_language"), + C = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.gameLayer = null, e.mainLayer = null, e.baseContent = null, e.baseContentBg = null, e.scrollView = null, e.bottomMask = null, e.calendarItem = null, e.previousBtn = null, e.titleLabel = null, e.nextBtn = null, e.spineLevel1 = null, e.spineLevel2 = null, e.spineLevel3 = null, e.progressBarOne = null, e.progressBarTwo = null, e.progressBarThree = null, e.catFootBegin = null, e.catFootThree = null, e.catFootTen = null, e.catFootThirty = null, e.content = null, e.bottomView = null, e.playBtn = null, e.playImg = null, e.playLabel = null, e.progressPoint = null, e.progressLabel = null, e.winLabel = null, e.userData = null, e.dataArray = [], e.curArray = [], e.year = null, e.month = null, e.day = null, e.catArr = [], e.clickTime = 0, e.clickMiniTime = 0, e.isNoWin = !1, e.beginButtonDuration = 0, e + } + return a(e, t), e.prototype.onEnable = function() { + this.catArr = [], this.catArr.push(this.spineLevel1), this.catArr.push(this.spineLevel2), this.catArr.push(this.spineLevel3), this.setupData() + }, e.prototype.update = function(t) { + this.beginButtonDuration += t + }, e.prototype.start = function() { + l.default.addbtnTouchStartScale(this.playBtn), l.default.addbtnTouchEndScale(this.playBtn, this.playBtnTouchEnd.bind(this)), l.default.addbtnTouchCancelScale(this.playBtn), l.default.addbtnTouchStartScale(this.previousBtn), l.default.addbtnTouchEndScale(this.previousBtn, this.previousBtnTouchEnd.bind(this)), l.default.addbtnTouchCancelScale(this.previousBtn), l.default.addbtnTouchOriginStartScale(this.nextBtn), l.default.addbtnTouchOriginEndScale(this.nextBtn, this.nextBtnTouchEnd.bind(this)), l.default.addbtnTouchOriginCancelScale(this.nextBtn), this.clickTime = (new Date).getTime(), this.clickMiniTime = 1e3, cc.winSize.height < 1334 && (this.node.scale = .8) + }, e.prototype.setupData = function() { + this.year = d.default.getInstance().selDate.getFullYear(), this.month = d.default.getInstance().selDate.getMonth() + 1, this.initData() + }, e.prototype.playBtnTouchEnd = function() { + if (this.beginButtonDuration <= 1) console.log("不能连续点击"); + else { + this.beginButtonDuration = 0; + var t = d.default.format(p.CALENDARNAMES[4], d.default.getInstance().selDate).split("-"); + if (!(t.length < 3)) { + console.log(t[0] + "年" + t[1] + "月" + t[2] + "日"); + var e = Number(t[2]), + o = null; + if (f.default.getUserData().playLevelId <= 50) { + if (!(o = f.default.getGameConfigData().baseConfigData.dailyData.easyGame.simple)) return void console.log("monthData sample配置表无数据") + } else { + var n = d.default.format(p.CALENDARNAMES[5], d.default.getInstance().selDate); + if (!(o = f.default.getGameConfigData().baseConfigData.dailyData.monthData[n])) return void console.log("monthData 配置表无数据") + } + console.log("monthData = " + JSON.stringify(o)); + var a = o.levelID + e - 1; + console.log("index = " + a + " day = " + e), 0 != this.isNoWin ? this.dailyBeginGame(o, a, e) : cc.game.emit("showMainTips", _.default.instance.trans(N.GDLanguage.level_new_tomorrow)) + } + } + }, e.prototype.dailyBeginGame = function(t, e, o) { + console.log("levelID = " + e); + var n = this; + n.userData = f.default.getUserData(), console.log("用户数据:", n.userData), f.default.getLevelByNumber(e, function(e) { + if (console.log("关卡数据:", e), n.gameLayer.activeInHierarchy) console.log("已经打开 mainLayer 2"); + else if (e.length < 1) cc.game.emit("showMainTips", _.default.instance.trans(N.GDLanguage.level_inadequate)); + else if (f.default.isHaveLove()) + if (d.default.getInstance().isOldDay(o)) console.log("看视频###"); + else { + if (n.gameLayer.activeInHierarchy) return void console.log("已经打开 mainLayer 2"); + n.showGameAction(t, e, o) + } else console.log("爱心不足"), cc.game.emit("showMainTips", _.default.instance.trans(N.GDLanguage.life_inadequate)), cc.game.emit("showPop", { + popName: "getLovePop", + showPopData: { + popCallbackCollect: null, + getLoveTime: 0 + } + }) + }) + }, e.prototype.showGameAction = function(t, e, o) { + var n = this; + cc.game.emit(p.EMITKEY.SHOWTRANSITLAYER, function(a) { + n.gameLayer.activeInHierarchy ? console.log("已经打开 daily") : (console.log("可以打开了 daily"), n.gameLayer.getComponent(h.default).initLevelLayer(e), n.gameLayer.getChildByName("gameUiLayer").getComponent(m.default).setTimeByLevel(t, o), n.node.active = !1, a(), v.default.getInstance().tabbarIsDaily = !1) + }) + }, e.prototype.previousBtnTouchEnd = function() { + this.changeMonth("last"), this.initData(this.year, this.month) + }, e.prototype.nextBtnTouchEnd = function() { + this.changeMonth("next"), this.initData(this.year, this.month) + }, e.prototype.changeMonth = function(t) { + var e = d.default.getInstance().selDate, + o = d.default.getInstance().cutType; + switch (t) { + case "last": + var n = d.default.lastDate(e, o); + d.default.getInstance().selDate = d.default.cloneDate(n); + break; + case "next": + var a = d.default.nextDate(e, o); + d.default.getInstance().selDate = d.default.cloneDate(a) + } + this.year = d.default.getInstance().selDate.getFullYear(), this.month = d.default.getInstance().selDate.getMonth() + 1, this.day = d.default.getInstance().selDate.getDay(), this.initData(this.year, this.month), y.default.trackEvent("daily_month"), b.default.reportTACommon("daily_month", {}), b.default.reportTACommon("daily_click", { + action: "切换月份" + }) + }, e.prototype.initData = function(t, e) { + if (void 0 === t && (t = this.year), void 0 === e && (e = this.month), this.titleLabel.string = "- " + l.default.getMonthShorthand(e - 1) + "/" + t + " -", this.dataArray = [], this.content.removeAllChildren(), this.createLastMonth(t, e), this.createNowMonth(t, e), this.createNextMonth(t, e), cc.winSize.height, console.log(this.dataArray.length), v.default.getInstance().globalData.isFullScreen) { + this.bottomMask.active = !1; + var o = 104 * Math.ceil(this.dataArray.length / 7), + n = o - 416; + this.scrollView.height = o, this.baseContent.height = 980 + n + } else this.bottomMask.active = !0; + this.showLastSelDate(), this.updatePlayState(), this.updateSubUI(), this.showActionFunc() + }, e.prototype.showLastSelDate = function() { + if (this.curArray.length) { + for (var t = 0, e = this.curArray; t < e.length; t++)(s = e[t]).getComponent(u.default).show(p.CALENDARITEM.ITEMNOR); + var o = null; + this.isNoWin = !1; + for (var n = this.curArray.length - 1; n >= 0 && (o = this.curArray[n], this.isNoWin = !o.getComponent(u.default).isWin(), !this.isNoWin); n--); + if (this.isNoWin) { + o.getComponent(u.default).show(p.CALENDARITEM.ITEMSELE); + var a = o.getComponent(u.default).getNodeData(); + if (a && a.date) { + var i = a.date.split("-"); + if (i.length < 3) return; + var r = Number(i[0]), + c = Number(i[1]), + s = Number(i[2]); + this.updatePlayBtn(c, s), d.default.getInstance().selDate = new Date(r, c - 1, s) + } + } else console.log("请等待明天游玩新关卡######") + } + }, e.prototype.showActionFunc = function() { + var t = Number(f.default.getGameConfigData().baseConfigData.dailyData.originMonth); + console.log("originMonthNum = " + t); + var e = Number(d.default.format(p.CALENDARNAMES[5], d.default.getInstance().nowDate)); + console.log("nowMonthNum = " + e); + var o = Number(d.default.format(p.CALENDARNAMES[5], d.default.getInstance().selDate)); + console.log("selMonthNum = " + o), this.previousBtn.active = !(o <= t), this.nextBtn.active = !(o >= e) + }, e.prototype.updatePlayState = function() { + var t = d.default.format(p.CALENDARNAMES[3], d.default.getInstance().selDate).split("-"); + if (!(t.length < 2)) { + var e = Number(t[0]), + o = Number(t[1]); + this.updatePlayBtn(e, o) + } + }, e.prototype.updatePlayBtn = function(t, e) { + d.default.getInstance().isOldDay(e) ? this.playImg.active = !0 : this.playImg.active = !1; + var o = "Play " + t + "/" + e; + 0 == this.isNoWin && (o = "Tomorrow", this.playImg.active = !1), this.playLabel.getComponent(cc.Label).string = o + }, e.prototype.updateSubUI = function() { + var t = d.default.format(p.CALENDARNAMES[4], d.default.getInstance().selDate).split("-"); + if (!(t.length < 2)) { + var e = Number(t[0]), + o = Number(t[1]), + n = new Date(e, o, 0).getDate(); + n <= 0 && (n = 30); + var a = f.default.getUserData().dailyData, + i = d.default.format(p.CALENDARNAMES[5], d.default.getInstance().selDate), + r = f.default.getGameConfigData().baseConfigData.dailyData.monthData[i]; + if (r) { + if (console.log("monthData = " + JSON.stringify(r)), a && (a[i] || (console.log("dailyData[monthKey] 为空,初始化数据##### "), a[i] = {}, (l = f.default.getUserData()).dailyData = a, f.default.saveUserData(l))), console.log("dailyData ##### ", JSON.stringify(a), i), a && a[i]) { + var c = 0; + for (var s in a[i]) a[i][s] && a[i][s].isWin && c++; + if (this.catFootThree.active = !1, this.catFootTen.active = !1, this.catFootThirty.active = !1, this.progressBarOne.progress = 0, this.progressBarTwo.progress = 0, this.progressBarThree.progress = 0, this.progressPoint.active = !0, c > 0) { + if (c <= 3 ? (this.catFootThree.active = !(c < 3), this.progressBarOne.progress = c / 3, this.progressPoint.x = 166 / 3 * c - 250) : c <= 10 ? (this.catFootThree.active = !0, this.catFootTen.active = !(c > 3 && c < 10), this.progressBarOne.progress = 1, this.progressBarTwo.progress = (c - 3) / 7, this.progressPoint.x = 16.6 * (c - 3) - 250 + 192.5) : (this.catFootThree.active = !0, this.catFootTen.active = !0, this.catFootThirty.active = !(c > 20 && c < n), this.progressBarOne.progress = 1, this.progressBarTwo.progress = 1, this.progressBarThree.progress = (c - 10) / (n - 10), this.progressPoint.x = 166 / n * (c - 10) - 250 + 358.5), (3 == c || 10 == c || c == n) && (this.progressPoint.active = !1, v.default.getInstance().dailyDict.receiveBox)) { + v.default.getInstance().dailyDict.receiveBox = !1; + var l = f.default.getUserData(), + u = 1; + 3 == c ? (u = 1, l.prop_random += 3) : 10 == c ? (u = 2, l.prop_cancel += 3) : l.prop_remove += 3, f.default.saveUserData(l), this.scheduleOnce(function() { + var t = { + popName: "showDailyPop", + showPopData: { + popName: "daily", + popType: u, + popCallbackCollect: null + } + }; + cc.game.emit("showPop", t) + }, 1.5) + } + } else this.progressPoint.x = -250; + for (var s in this.progressLabel.string = "" + c, this.winLabel.string = "WIN " + n, console.log("monthKey = " + i + " index = " + c), this.spineLevel1.getComponent(g.default).play("4Daily_Open1_1", 0), this.spineLevel2.getComponent(g.default).play("4Daily_Open2_1", 0), this.spineLevel3.getComponent(g.default).play("4Daily_Open3_1", 0), this.catArr) { + var h = this.catArr[s]; + h.parent.getChildByName("bg-gray").active = !0, h.parent.getChildByName("bg-green").active = !1 + } + c >= 3 && (this.catArr[0].parent.getChildByName("bg-gray").active = !1, this.catArr[0].parent.getChildByName("bg-green").active = !0), c >= 10 && (this.catArr[1].parent.getChildByName("bg-gray").active = !1, this.catArr[1].parent.getChildByName("bg-green").active = !0), c >= n && (this.catArr[2].parent.getChildByName("bg-gray").active = !1, this.catArr[2].parent.getChildByName("bg-green").active = !0) + } + } else console.log("monthData 配置表无数据") + } + }, e.prototype.createLastMonth = function(t, e, o, n) { + void 0 === o && (o = !0), void 0 === n && (n = 255), e -= 1; + var a = new Date(t, e, 0), + i = a.getDate(), + r = a.getDay(); + if (r < 7) + for (var c = r; c > 0; c--) { + var s = cc.instantiate(this.calendarItem); + s.parent = this.content, s.opacity = n, this.dataArray.push(s); + var l = i - c, + d = t + "-" + (e < 10 ? "0" + e : e) + "-" + (l < 10 ? "0" + l : l), + h = { + day: l, + type: p.CALENDARITEM.ITEMLAST, + date: d + }; + s.getComponent(u.default).setNodeData(h, this) + } + }, e.prototype.createNowMonth = function(t, e, o, n) { + void 0 === o && (o = !0), void 0 === n && (n = 255); + var a = new Date(t, e, 0).getDate(); + d.default.getInstance().isNowMonth(e - 1), this.curArray = []; + for (var i = function(a) { + var i = cc.instantiate(r.calendarItem); + i.parent = r.content, i.opacity = n, r.dataArray.push(i); + var c = !1, + s = p.CALENDARITEM.ITEMFUTURE; + d.default.getInstance().isNowDay(a) ? (r.curArray.push(i), c = !0, s = p.CALENDARITEM.ITEMNOW) : d.default.getInstance().isOldDay(a) ? (r.curArray.push(i), c = !0, s = p.CALENDARITEM.ITEMOLD) : d.default.getInstance().isFutureDay(a) && (s = p.CALENDARITEM.ITEMFUTURE); + var l = t + "-" + (e < 10 ? "0" + e : e) + "-" + (a < 10 ? "0" + a : a), + h = { + day: a, + type: s, + date: l + }; + i.getComponent(u.default).setNodeData(h, r), o && c && i.on(cc.Node.EventType.TOUCH_END, function() { + var o = l.split("-"); + if (console.log(o), o.length >= 3) { + var n = "" + o[0] + o[1], + r = "" + o[0] + o[1] + o[2], + c = f.default.getUserData().dailyData; + if (c && c[n] && c[n][r] && c[n][r].isWin) return void console.log("本关已完成") + } + y.default.trackEvent("daily_date", { + otherDate: l + }), b.default.reportTACommon("daily_date", {}), b.default.reportTACommon("daily_click", { + action: "切换日期" + }); + for (var s = 0, h = this.curArray; s < h.length; s++) h[s].getComponent(u.default).show(p.CALENDARITEM.ITEMNOR); + i.getComponent(u.default).show(p.CALENDARITEM.ITEMSELE), d.default.getInstance().selDate = new Date(t, e - 1, a), this.updatePlayState() + }, r) + }, r = this, c = 1; c < a + 1; c++) i(c) + }, e.prototype.createNextMonth = function(t, e, o, n) { + void 0 === o && (o = !0), void 0 === n && (n = 255); + var a = new Date(t, e, 1).getDay(); + if (e += 1, 1 != a) { + 0 == a && (a = 7); + for (var i = 1; i < 9 - a; i++) { + var r = cc.instantiate(this.calendarItem); + r.parent = this.content, r.opacity = n, this.dataArray.push(r); + var c = t + "-" + (e < 10 ? "0" + e : e) + "-" + (i < 10 ? "0" + i : i), + s = { + day: i, + type: p.CALENDARITEM.ITEMNEXT, + date: c + }; + r.getComponent(u.default).setNodeData(s, this) + } + } + }, i([s(cc.Node)], e.prototype, "gameLayer", void 0), i([s(cc.Node)], e.prototype, "mainLayer", void 0), i([s(cc.Node)], e.prototype, "baseContent", void 0), i([s(cc.Node)], e.prototype, "baseContentBg", void 0), i([s(cc.Node)], e.prototype, "scrollView", void 0), i([s(cc.Node)], e.prototype, "bottomMask", void 0), i([s(cc.Prefab)], e.prototype, "calendarItem", void 0), i([s(cc.Node)], e.prototype, "previousBtn", void 0), i([s(cc.Label)], e.prototype, "titleLabel", void 0), i([s(cc.Node)], e.prototype, "nextBtn", void 0), i([s(cc.Node)], e.prototype, "spineLevel1", void 0), i([s(cc.Node)], e.prototype, "spineLevel2", void 0), i([s(cc.Node)], e.prototype, "spineLevel3", void 0), i([s(cc.ProgressBar)], e.prototype, "progressBarOne", void 0), i([s(cc.ProgressBar)], e.prototype, "progressBarTwo", void 0), i([s(cc.ProgressBar)], e.prototype, "progressBarThree", void 0), i([s(cc.Node)], e.prototype, "catFootBegin", void 0), i([s(cc.Node)], e.prototype, "catFootThree", void 0), i([s(cc.Node)], e.prototype, "catFootTen", void 0), i([s(cc.Node)], e.prototype, "catFootThirty", void 0), i([s(cc.Node)], e.prototype, "content", void 0), i([s(cc.Node)], e.prototype, "bottomView", void 0), i([s(cc.Node)], e.prototype, "playBtn", void 0), i([s(cc.Node)], e.prototype, "playImg", void 0), i([s(cc.Node)], e.prototype, "playLabel", void 0), i([s(cc.Node)], e.prototype, "progressPoint", void 0), i([s(cc.Label)], e.prototype, "progressLabel", void 0), i([s(cc.Label)], e.prototype, "winLabel", void 0), i([c], e) + }(cc.Component); + o.default = C, cc._RF.pop() + }, { + "../../../i18n/gd_language": "gd_language", + "../../../i18n/i18n": "i18n", + "../../common/CcJsFunc": "CcJsFunc", + "../../common/dataTs": "dataTs", + "../../common/enumConfig": "enumConfig", + "../../common/spine": "spine", + "../../game/gameLayer": "gameLayer", + "../../game/gameUiLayer": "gameUiLayer", + "../../manager/DateManager": "DateManager", + "../../manager/GameManager": "GameManager", + "../../manager/report-common": "report-common", + "../../utils/uma/uma-sdk": "uma-sdk", + "./calendar-item": "calendar-item" + } + ], + "data-env": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "2af60/iE7lNdKoauwbjspyW", "data-env"), Object.defineProperty(o, "__esModule", { + value: !0 + }), o.getLocalEnvConfig = o.getEnvConfig = void 0; + var n = t("./data-type"), + a = n.ENV.online, + i = { + local: { + evn: n.ENV.local, + host: "http://192.168.31.86:8080", + reportPrefix: "local_" + }, + beta: { + evn: n.ENV.beta, + host: "http://192.144.195.86", + reportPrefix: "beta_" + }, + online: { + evn: n.ENV.online, + host: "https://cat-match.easygame2021.com", + reportPrefix: "sheep_" + }, + onlineWx: { + evn: n.ENV.onlineWx, + host: "https://cat-match.easygame2021.com", + reportPrefix: "sheep_wx_" + }, + leiTing: { + evn: n.ENV.leiTing, + host: "http://maowgameos1.leiting.com:8080", + reportPrefix: "" + }, + onlineOppo: { + evn: n.ENV.onlineOppo, + host: "https://cat-match.easygame2021.com", + reportPrefix: "sheep_oppo_" + }, + onlineVivo: { + evn: n.ENV.onlineVivo, + host: "https://cat-match.easygame2021.com", + reportPrefix: "sheep_vivo_" + } + }; + o.getEnvConfig = function() { + return i[a] + }, o.getLocalEnvConfig = function(t) { + return i[t] + }, cc._RF.pop() + }, { + "./data-type": "data-type" + } + ], + "data-manager": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "ce18c9/oWBJEKOpZDT7wYKF", "data-manager"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }); + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var i = t("../common/dataTs"), + r = t("../common/enumConfig"), + c = t("./DateManager"), + s = t("./GameManager"), + l = function(t) { + function e() { + return null !== t && t.apply(this, arguments) || this + } + return a(e, t), e.getTopicAnimation = function(t, e, o) { + var n = "The01A"; + return e ? 1 == t ? n = "The01A" : 2 == t ? n = "The02A" : 3 == t ? n = "The03A" : 4 == t ? n = "The04A" : 5 == t ? n = "The05A" : 6 == t ? n = "The06A" : 7 == t && (n = "The07A") : o && (1 == t ? n = "The01B" : 2 == t ? n = "The02B" : 3 == t ? n = "The03B" : 4 == t ? n = "The04B" : 5 == t ? n = "The05B" : 6 == t ? n = "The06B" : 7 == t && (n = "The07B")), { + spName: "sheep/ThemeSheeps", + skin: n + } + }, e.getJudgeAnimation = function(t, e, o) { + var n = "1Dead1_1"; + return e ? n = "1Dead" + t + "_1" : o && (n = "1Dead" + t + "_2"), { + spName: "sheep/Theme", + anim: n + } + }, e.getDeadNum = function(t) { + var e = 1; + return (e = t < 10 ? 1 : t < 20 ? 2 : t < 60 ? 3 : t < 100 ? 4 : t < 2140 ? 5 : t < 3800 ? 6 : t < 5260 ? 7 : t < 8e3 ? 8 : t < 15e3 ? 9 : t < 2e4 ? 10 : 11) > 11 && (e = 11), e <= 0 && (e = 1), e + }, e.isUpgradeNum = function(t) { + return console.log("fail = " + t), 10 == t || 20 == t || 60 == t || 100 == t || 140 == t || 180 == t || 260 == t || 340 == t || 500 == t || 800 == t + }, e.todayIsWin = function() { + var t = c.default.format(r.CALENDARNAMES[7], c.default.getInstance().nowDate).split("-"); + if (t.length >= 3) { + var e = "" + t[0] + t[1], + o = "" + t[0] + t[1] + t[2], + n = i.default.getUserData().dailyData; + if (n && n[e] && n[e][o] && n[e][o].isWin) return 1; + if (n && n[e] && n[e][o] && !n[e][o].isWin) return 0 + } + return -1 + }, e.checkExpireData = function(t) { + -1 == e.todayIsWin() && (i.default.removeItem(t), console.log("本地缓存过期数据 ###### cacheName = ", t)), i.default.isPlatform(i.GDPlatform.web) && i.default.removeItem(t) + }, e.getTAUserInfo = function() { + e.checkExpireData(r.STORAGEKEY.TAUSERINFO); + var t = s.default.getInstance().reportProperty, + o = t.challenge_count, + n = t.cancel_use + t.random_use + t.remove_use, + a = t.resurrection_ad_frequency, + c = t.resurrection_ad_frequency + t.cancel_ad + t.random_ad + t.remove_ad, + l = 0; + s.default.blacksInfo.blockAllCount > 0 && (l = s.default.blacksInfo.blockCurCount / s.default.blacksInfo.blockAllCount); + var u = i.default.getItem(r.STORAGEKEY.TAUSERINFO); + u || (u = { + change_num: 0, + prop_num: 0, + resurgence_num: 0, + ad_num: 0, + block_ratio: l + }), u.change_num += o, u.prop_num += n, u.resurgence_num += a, u.ad_num += c, u.block_ratio = l.toFixed(2), i.default.setItem(r.STORAGEKEY.TAUSERINFO, u), u || (u = {}); + var p = "每日挑战"; + return s.default.getInstance().gameType == r.GAMETYPE.GAMEDAILY ? p = "每日挑战" : s.default.getInstance().gameType == r.GAMETYPE.GAMETOPIC && (p = "话题挑战"), u.game_type = p, u + }, e.getGameLevelData = function() { + var t = this.gameLevelCacheName(); + return e.checkExpireData(t), i.default.getItem(t) + }, e.setGameLevelData = function(t) { + var e = this.gameLevelCacheName(); + i.default.setItem(e, t, 30 * this.cacheTime) + }, e.gameLevelCacheName = function() { + return s.default.getInstance().gameType == r.GAMETYPE.GAMELEVEL ? r.STORAGEKEY.GAMEDAILYLEVELDATA : s.default.getInstance().gameType == r.GAMETYPE.GAMEDAILY ? r.STORAGEKEY.GAMEDAILYLEVELDATA : s.default.getInstance().gameType == r.GAMETYPE.GAMETOPIC ? r.STORAGEKEY.GAMETOPICLEVELDATA : r.STORAGEKEY.GAMEDAILYLEVELDATA + }, e.getRankData = function() { + return e.checkExpireData(r.STORAGEKEY.RANKDATA), i.default.getItem(r.STORAGEKEY.RANKDATA) + }, e.setRankData = function(t) { + i.default.setItem(r.STORAGEKEY.RANKDATA, t, 10 * this.cacheTime) + }, e.getBulletData = function() { + return e.checkExpireData(r.STORAGEKEY.BULLETDATA), i.default.getItem(r.STORAGEKEY.BULLETDATA) + }, e.setBulletData = function(t) { + i.default.setItem(r.STORAGEKEY.BULLETDATA, t, 60 * this.cacheTime) + }, e.getStageData = function() { + return e.checkExpireData(r.STORAGEKEY.STAGEDATA), i.default.getItem(r.STORAGEKEY.STAGEDATA) + }, e.setStageData = function(t) { + i.default.setItem(r.STORAGEKEY.STAGEDATA, t, 30 * this.cacheTime) + }, e.getMatchResultData = function() { + var t = i.default.getItem(r.STORAGEKEY.TOPICMATCHRECORD); + return t && t[c.default.format(r.CALENDARNAMES[7], c.default.getInstance().nowDate)] ? (console.log("今日已调用赛况接口 ###### "), !0) : (console.log("今日未调用赛况接口 ###### "), !1) + }, e.setMatchResultData = function() { + var t = c.default.format(r.CALENDARNAMES[7], c.default.getInstance().nowDate), + e = i.default.getItem(r.STORAGEKEY.TOPICMATCHRECORD); + e || (e = {}), e[t] = !0, i.default.setItem(r.STORAGEKEY.TOPICMATCHRECORD, e) + }, e.getPropData = function() { + var t = i.default.getItem(r.STORAGEKEY.PROPGAMEDATA); + return t && c.default.format(r.CALENDARNAMES[7], c.default.getInstance().nowDate) == t.time || (t = this.defaultPropData()), t + }, e.setPropData = function(t) { + return t || (t = this.defaultPropData()), i.default.setItem(r.STORAGEKEY.PROPGAMEDATA, t), t + }, e.defaultPropData = function() { + return { + time: c.default.format(r.CALENDARNAMES[7], c.default.getInstance().nowDate), + daily: { + prop_remove: 2, + prop_cancel: 2, + prop_random: 2 + }, + topic: { + prop_remove: 2, + prop_cancel: 2, + prop_random: 2 + } + } + }, e.user = { + uid: 0, + levelNum: 0, + openId: "", + zoneId: 1, + unionId: "", + gender: 0, + token: "", + avatar: "", + nickName: "", + agreement: !1, + deviceId: "", + note: "", + like_count: 0, + skinName: "", + skinId: 101, + inviteCode: "", + serverName: "", + serverId: "", + channel: "", + userId: "" + }, e.rankUserInfo = null, e.region = null, e.cacheTime = 60, e.topicModel = null, e.topicRankInfo = null, e.bulletsWin = [{ + content: "终于排上了", + mid: 1, + type: 0 + }, { + content: "轻松通过~", + mid: 2, + type: 0 + }, { + content: "今天太简单", + mid: 3, + type: 0 + }, { + content: "羊了个羊", + mid: 4, + type: 0 + }, { + content: "雄起!", + mid: 5, + type: 1 + }, { + content: "加油!", + mid: 6, + type: 1 + }, { + content: "yyds", + mid: 7, + type: 1 + }, { + content: "666", + mid: 8, + type: 1 + }, { + content: "冲鸭", + mid: 9, + type: 1 + }, { + content: "冲冲冲", + mid: 10, + type: 1 + }, { + content: "厉害了", + mid: 11, + type: 1 + }], e.bulletsFail = [{ + content: "雄起!", + mid: 12, + type: 1 + }, { + content: "加油!", + mid: 13, + type: 1 + }, { + content: "yyds", + mid: 14, + type: 1 + }, { + content: "666", + mid: 15, + type: 1 + }, { + content: "冲鸭", + mid: 16, + type: 1 + }, { + content: "冲冲冲", + mid: 17, + type: 1 + }, { + content: "厉害了", + mid: 18, + type: 1 + }, { + content: "过不去啊!", + mid: 19, + type: 0 + }, { + content: "今天太难了", + mid: 20, + type: 0 + }, { + content: "难哭了", + mid: 21, + type: 0 + }, { + content: "试了 {0} 次了", + mid: 22, + type: 2 + }], e + }(cc.Component); + o.default = l, cc._RF.pop() + }, { + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "./DateManager": "DateManager", + "./GameManager": "GameManager" + } + ], + "data-type": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "8cbe9Sgf2lHObO7pL4MBQTS", "data-type"), Object.defineProperty(o, "__esModule", { + value: !0 + }), o.ENV = void 0, + function(t) { + t.local = "local", t.beta = "beta", t.online = "online", t.onlineWx = "onlineWx", t.leiTing = "leiTing", t.onlineOppo = "onlineOppo", t.onlineVivo = "onlineVivo" + }(o.ENV || (o.ENV = {})), cc._RF.pop() + }, {} + ], + dataModel: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "f787b1iWeJMv6XB6Y+Z4lEb", "dataModel"), Object.defineProperty(o, "__esModule", { + value: !0 + }), cc._RF.pop() + }, {} + ], + dataTs: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "2b52b5mP0hOv4ijR3rDmmai", "dataTs"), Object.defineProperty(o, "__esModule", { + value: !0 + }), o.GDPlatform = void 0; + var n, a = t("../manager/GameManager"), + i = t("../manager/report-common"), + r = t("./CcJsFunc"), + c = t("./enumConfig"), + s = t("./native/native-bridge"), + l = t("./native/native-def"), + u = t("./sdk"); + (function(t) { + t[t.android = 0] = "android", t[t.ios = 1] = "ios", t[t.wx = 2] = "wx", t[t.tt = 3] = "tt", t[t.web = 4] = "web", t[t.oppo = 5] = "oppo", t[t.vivo = 6] = "vivo" + })(n = o.GDPlatform || (o.GDPlatform = {})); + var p = function() { + function t() {} + return t.GetVedioID = function() { + return u.default.isPlatform(u.Platform.wx) ? this.WXVedioID : u.default.isPlatform(u.Platform.tt) ? this.TTVedioID : u.default.isPlatform(u.Platform.android) ? this.AndroidVedioID : u.default.isPlatform(u.Platform.oppo) ? this.OppoVedioID : u.default.isPlatform(u.Platform.vivo) ? this.VivoVedioID : "" + }, t.getGameConfigData = function() { + return this.gameConfigData + }, t.initData = function(e) { + var o = this, + n = this; + if (cc.sys.localStorage.getItem(this.localKeyName)) r = this.getUserData(), console.log("[PUSH] 用户数据 ###### ", JSON.stringify(r)); + else { + this.registerUserData(); + var a = this.getUserData().userID; + if (s.default.callNative(l.NativeFun.publicParamsInfo, { + userId: a + }), i.default.reportTACommon("register", {}), s.default.deviceInfo) { + console.log("AF af_register打点"); + var r = t.getUserData(), + c = { + androidid: s.default.deviceInfo.androidId, + chennal: "310001", + gameCode: "59", + userId: r.userID, + type: 3 + }; + s.default.leitingReport("af_register", c), console.log("AF af_character打点"); + var u = { + androidid: s.default.deviceInfo.androidId, + chennal: "310001", + gameCode: "59", + userId: r.userID, + type: 3, + roleId: s.default.deviceInfo.gaid, + serviceName: "海外测试服", + serviceId: "1" + }; + s.default.leitingReport("af_character", u) + } + } + var p = 2; + this.loadJsonData("data/levelConfigData", function(t) { + o.gameConfigData.levelConfigData = t, 0 == --p && (e(), n.adaptCacheData()) + }), this.loadJsonData("data/baseConfigData", function(t) { + o.gameConfigData.baseConfigData = t, 0 == --p && (e(), n.adaptCacheData()) + }) + }, t.registerUserData = function() { + if (!cc.sys.localStorage.getItem(this.localKeyName)) { + this.gameUserLocalData = this.registerData, u.default.isPlatform(u.Platform.android) ? s.default.loginInfo && s.default.loginInfo.userId ? this.gameUserLocalData.userData.userID = s.default.loginInfo.userId : this.gameUserLocalData.userData.userID = r.default.randomCharNum() : u.default.isPlatform(u.Platform.tt) ? this.gameUserLocalData.userData.userID = "" : u.default.isPlatform(u.Platform.wx) ? this.gameUserLocalData.userData.userID = "" : u.default.isPlatform(u.Platform.web) ? (this.gameUserLocalData.userData.userID = "100001", this.gameUserLocalData.userData.token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTAwMjA0MDIsIm5iZiI6MTY1ODkxODIwMiwiaWF0IjoxNjU4OTE2NDAyLCJqdGkiOiJDTTpjYXRfbWF0Y2g6bHQxMjM0NTYiLCJvcGVuX2lkIjoiIiwidWlkIjoxMDAwMDEsImRlYnVnIjoiIiwibGFuZyI6IiJ9.NQZAWBLYtq6hBff9YjNcaI2Soa6Z5vwbIU7YnjP1KBQ") : u.default.isPlatform(u.Platform.oppo) ? this.gameUserLocalData.userData.userID = "" : u.default.isPlatform(u.Platform.vivo) ? this.gameUserLocalData.userData.userID = "" : this.gameUserLocalData.userData.userID = r.default.randomCharNum(), this.gameUserLocalData.userData.registerTime = Date.now() + ""; + var t = JSON.stringify(this.gameUserLocalData); + cc.sys.localStorage.setItem(this.localKeyName, t), console.log("[PUSH] 注册用户 ###### " + t), a.default.getInstance().register = !0 + } + }, t.removeUserData = function() { + cc.sys.localStorage.getItem(this.localKeyName) && (cc.sys.localStorage.clear(), console.log("移除本地缓存 ### ")) + }, t.isLogin = function() { + var e = t.getUserData().userID, + o = t.getUserData().token; + return !!(e && e.length && o && o.length) + }, t.adaptCacheData = function() { + console.log("适配老用户数据 ###### "); + var e = this.getUserData(), + o = t.getSprintRewardData(); + console.log("sprintRewardData ### ", JSON.stringify(o)), 1 == o.isGameEd && t.resetSprintReward(o); + var n = e.unlockHouseUserData; + for (var a in n) + for (var i in n[a]) { + var r = n[a][i]; + if (!r.fish) { + var c = this.gameConfigData.baseConfigData.unlockHouseDataArray; + if (c) + for (var s in c) + for (var l in c[s]) { + var u = c[s][l]; + if (r.unlockID == u.unlockID) { + r.fish = u.fish; + break + } + } + } + } + this.saveUserData(e), this.removeOldCacheData(e) + }, t.removeOldCacheData = function(t) { + t || (t = this.getUserData()), t.userID && "" != t.userID && "1" != t.userID || (this.removeUserData(), this.registerUserData()) + }, t.saveUserData = function(t) { + this.gameUserLocalData.userData = t; + var e = JSON.stringify(this.gameUserLocalData); + cc.sys.localStorage.setItem(this.localKeyName, e) + }, t.getUserData = function() { + var t = cc.sys.localStorage.getItem(this.localKeyName); + return this.gameUserLocalData = JSON.parse(t), this.gameUserLocalData.userData + }, t.getPictureData = function() { + var t = cc.sys.localStorage.getItem(this.localKeyName); + return this.gameUserLocalData = JSON.parse(t), this.gameUserLocalData.pictureData + }, t.savePictureData = function(t) { + this.gameUserLocalData.pictureData = t; + var e = JSON.stringify(this.gameUserLocalData); + cc.sys.localStorage.setItem(this.localKeyName, e) + }, t.getUserSetupData = function() { + var t = cc.sys.localStorage.getItem(this.localKeyName); + return this.gameUserLocalData = JSON.parse(t), this.gameUserLocalData.setUpData + }, t.saveUserSetupData = function(t) { + this.gameUserLocalData.setUpData = t; + var e = JSON.stringify(this.gameUserLocalData); + cc.sys.localStorage.setItem(this.localKeyName, e) + }, t.updateFirendCount = function(t) { + console.log("count = ", t); + var e = { + moonCount: t + }; + u.default.rankScoreUpdate(c.ShownType.friendRank, JSON.stringify(e), c.RefreshType.add) + }, t.updateTodayCount = function(t, e) { + var o = { + moonCount: t, + state: e + }; + console.log("rankData = ", o), u.default.rankScoreUpdate(c.ShownType.todayRank, JSON.stringify(o), c.RefreshType.add) + }, t.getDailyWinCount = function() { + var e = t.getUserData(); + if (e.dailyData) { + var o = 0; + for (var n in e.dailyData) + for (var a in e.dailyData[n]) e.dailyData[n][a] && e.dailyData[n][a].isWin && o++; + return o + } + return 0 + }, t.getDailyData = function(e, o) { + var n = t.getUserData(); + if (n.dailyData[e]) return n.dailyData[e][o] + }, t.saveDailyData = function(e, o, n) { + var a = t.getUserData(); + a.dailyData[e] ? a.dailyData[e][o] = n : (a.dailyData[e] = {}, a.dailyData[e][o] = n), t.saveUserData(a) + }, t.gameLevelWin = function(t, e) { + e || (console.log("获取刚完成关卡的奖励数据, 随机获取填充 ###"), e = this.getRewardBoxData(this.gameUserLocalData.userData.playLevelId)), console.log("winRewardObj ### ", JSON.stringify(e)); + var o = Number(e.everLevelRewardObj.coin), + n = Number(e.everLevelRewardObj.fish); + a.default.getInstance().gameType == c.GAMETYPE.GAMELEVEL ? (o = Number(o), n = Number(n), this.gameUserLocalData.userData.playLevelId++) : a.default.getInstance().gameType == c.GAMETYPE.GAMEDAILY && (o = 2 * Number(o), n = 2 * Number(n)), this.gameUserLocalData.userData.coin += o, this.gameUserLocalData.userData.fish += n; + var r = this.gameUserLocalData.userData.coin, + s = o; + if (i.default.reportTACommon("coin_get", { + item_id: 0, + item_name: "金币", + change_num: s, + num_before: r - s, + num_after: r, + action: "关卡胜利奖励", + reason: "关卡胜利获得金币", + gold_num: r + }), a.default.getInstance().moneyDict.coin = o += Number(a.default.getInstance().moneyDict.coin), a.default.getInstance().moneyDict.fish = n += Number(a.default.getInstance().moneyDict.fish), console.log("moneyDict = " + JSON.stringify(a.default.getInstance().moneyDict)), e.levelNewNum == e.levelNumMax) { + console.log("添加宝箱奖励"); + for (var l = 0; l < e.boxReward.length; l++) { + var u = e.boxReward[l].propType; + "reward_coin" == u ? (this.gameUserLocalData.userData.coin += e.boxReward[l].num, this.gameUserLocalData.userData.coin, e.boxReward[l].num) : (this.gameUserLocalData.userData[u] += e.boxReward[l].num, this.gameUserLocalData.userData[u]) + } + } + this.addLoveCount(1) + }, t.upgradeClothesLevel = function(t, e) { + var o = this.getUserData(), + n = o.catClothesData, + a = "cat_" + t; + if (n[a]) { + for (var i = n[a], r = 0; r < i.length; r++) + if (i[r].clothesID == e) return o.fish >= 5 && (o.fish -= 5, i[r].clothRank += 1, this.saveUserData(o), !0) + } else console.log("暂无解锁猫") + }, t.updateCatData = function() { + var e = this.gameConfigData.baseConfigData.catClothesData, + o = this.gameUserLocalData.userData.playLevelId; + for (var n in e) + for (var a in e[n]) + if ("level" == e[n][a].unlockType && o > e[n][a].unlockNum) { + var i = this.gameUserLocalData.userData.catClothesData, + r = !1; + for (var c in i[n]) i[n][c].clothesID == e[n][a].clothesID && (r = !0); + if (!r) { + var s = { + clothesID: e[n][a].clothesID, + clothRank: 1, + isWear: !1 + }; + i[n].push(s), t.saveUserData(this.gameUserLocalData.userData) + } + } + }, t.updateLoveTime = function() { + if (0 == this.gameUserLocalData.userData.loveGetTime) return 0; + var t = this.gameConfigData.baseConfigData.loveNumMax, + e = this.gameUserLocalData.userData.loveGetTime, + o = 6e4 * this.gameConfigData.baseConfigData.getLoveTime, + n = Number(Date.now()) - e, + a = Math.floor(n / o), + i = 0; + return a >= 1 ? (this.gameUserLocalData.userData.love += a, this.gameUserLocalData.userData.love >= t ? (this.gameUserLocalData.userData.love = t, this.gameUserLocalData.userData.loveGetTime = 0) : (this.gameUserLocalData.userData.loveGetTime += a * o, i = o - (n - a * o)), this.saveUserData(this.gameUserLocalData.userData)) : i = o - (n - a * o), i + }, t.addLoveToMax = function() { + var t = this.gameConfigData.baseConfigData.loveNumMax; + this.gameUserLocalData.userData.love < t ? (this.gameUserLocalData.userData.love = t, this.gameUserLocalData.userData.loveGetTime = 0, this.saveUserData(this.gameUserLocalData.userData)) : console.log("已经是满的了") + }, t.addLoveCount = function(t) { + var e = this.gameConfigData.baseConfigData.loveNumMax; + this.gameUserLocalData.userData.love += t, this.gameUserLocalData.userData.love >= e && (this.gameUserLocalData.userData.loveGetTime = 0), this.gameUserLocalData.userData.love >= 5 && (this.gameUserLocalData.userData.love = 5), this.saveUserData(this.gameUserLocalData.userData) + }, t.subLoveCount = function(t) { + if (this.gameUserLocalData.userData.love < t) return console.log("爱心数量不足"), !1; + this.gameUserLocalData.userData.love -= t; + var e = this.gameConfigData.baseConfigData.loveNumMax; + return this.gameUserLocalData.userData.love < e && 0 == this.gameUserLocalData.userData.loveGetTime && (this.gameUserLocalData.userData.loveGetTime = Date.now()), this.gameUserLocalData.userData.love <= 0 && (this.gameUserLocalData.userData.love = 0), this.saveUserData(this.gameUserLocalData.userData), !0 + }, t.isHaveLove = function() { + return !(this.gameUserLocalData.userData.love <= 0) + }, t.getLevelByID = function(t, e) { + var o, n = [], + i = [], + r = this.gameConfigData.levelConfigData; + if (t > (o = a.default.getInstance().gameType == c.GAMETYPE.GAMELEVEL ? r.dailyLevel : a.default.getInstance().gameType == c.GAMETYPE.GAMEDAILY ? r.dailyLevel : a.default.getInstance().gameType == c.GAMETYPE.GAMETOPIC ? r.topicLevel : r.dailyLevel).length) return console.log("没有关卡"), void e(i); + var s = o[t - 1]; + console.log("modelLevelIdArray => ", s); + for (var l = s.length, u = 0, p = 0; p < l; p++) this.getLevelMapData(s[p], function(t) { + if (n.push(t), (u += 1) >= l) { + for (var o = 0; o < l; o++) + for (var a = s[o], r = 0; r < l; r++) n[r].levelKey == a && i.push(n[r]); + e(i) + } + }) + }, t.getLevelByNumber = function(t, e) { + var o = []; + this.getLevelMapData(t, function(t) { + o.push(t), e(o) + }) + }, t.currentHouseUnlockAll = function() { + var e = t.getHourseUnlockData(); + if (e) { + var o = e[e.length - 1], + n = !1; + for (var a in o) o[a].unlock || (n = !0); + if (!n) return !0 + } + return !1 + }, t.haveNewHouseUnlock = function() { + return this.getHourseUnlockData().length != this.gameConfigData.baseConfigData.unlockHouseDataArray.length + }, t.getHourseUnlockData = function(t) { + void 0 === t && (t = !1); + var e = this.getUserData(), + o = e.unlockHouseUserData, + n = this.gameConfigData.baseConfigData.unlockHouseDataArray, + a = !1; + if (0 == o.length) a = !1; + else + for (var i in o) + for (var r in o[i]) o[i][r].unlock || (a = !0); + return !a && o.length < n.length && (t || 0 == o.length) && o.push(n[o.length]), e.unlockHouseUserData = o, this.saveUserData(e), e.unlockHouseUserData + }, t.checkCollectionData = function() { + var t = this.gameConfigData.baseConfigData.rewardCollection, + e = this.getUserData(), + o = this.getPictureData(), + n = null; + for (var i in t) { + var r = t[i]; + if (e.playLevelId - 1 == r.levelNum) { + n = r; + break + } + } + if (n) { + var c = this.gameConfigData.baseConfigData.pictureData.bgMaxNum, + s = this.gameConfigData.baseConfigData.pictureData.brickMaxNum; + o.bgNum += Number(n.wallpaper), o.brickNum += Number(n.brick), o.bgNum >= c && (o.bgNum = c), o.brickNum >= s && (o.brickNum = s), this.savePictureData(o), a.default.getInstance().collectionMark.tabbarCollection = !0, Number(n.wallpaper) > 0 && (a.default.getInstance().collectionMark.bgNum = o.bgNum), Number(n.brick) > 0 && (a.default.getInstance().collectionMark.brickNum = o.brickNum) + } + return n + }, t.getCollectionUnlockData = function() { + for (var t = this.getUserData().playLevelId - 1, e = this.gameConfigData.baseConfigData.rewardCollection, o = { + buildNewNum: 1, + buildNumMax: 10, + buildObj: null + }, n = null, a = 0, i = 0; i < e.length; i++) { + if (t <= e[i].levelNum) { + n = e[i]; + break + } + a++ + } + var r = e[0]; + if (t <= r.levelNum) o.buildNewNum = t, o.buildNumMax = r.levelNum, o.buildObj = r, console.log("getCollectionUnlockData = " + JSON.stringify(o)); + else if (n) { + var c = e[a - 1].levelNum, + s = e[a].levelNum; + o.buildNewNum = t - c, o.buildNumMax = s - c, o.buildObj = n, console.log("getCollectionUnlockData = " + JSON.stringify(o)) + } + return o + }, t.getRewardBoxData = function(t) { + var e = { + levelNewNum: 0, + levelNumMax: 10, + everLevelRewardObj: null, + boxReward: null + }; + e.everLevelRewardObj = this.gameConfigData.baseConfigData.everLevelReward; + var o = this.gameConfigData.baseConfigData.rewardBox, + n = Math.floor(3 * Math.random()); + e.boxReward = o[n]; + for (var a = this.gameConfigData.baseConfigData.rewardBoxArray, i = 0; i < a.length; i++) t > a[i] && (e.levelNewNum = t - a[i], e.levelNumMax = a[i + 1] - a[i]); + return e + }, t.getClothesData = function(e, o) { + for (var n = t.getGameConfigData().baseConfigData.catClothesData["cat_" + e], a = 0; a < n.length; a++) + if (n[a].clothesID == o) return n[a]; + return null + }, t.getSprintRewardData = function() { + if (cc.sys.localStorage.getItem(c.STORAGEKEY.SPRINTREWARDKEY)) { + var t = cc.sys.localStorage.getItem(c.STORAGEKEY.SPRINTREWARDKEY); + return JSON.parse(t) + } + var e = { + winNum: 0, + rewardProgress: 0, + winBox: 0, + pastTime: Date.now(), + isGameEd: 0 + }, + o = JSON.stringify(e); + return cc.sys.localStorage.setItem(c.STORAGEKEY.SPRINTREWARDKEY, o), e + }, t.setSprintRewardData = function(t) { + var e = JSON.stringify(t); + cc.sys.localStorage.setItem(c.STORAGEKEY.SPRINTREWARDKEY, e) + }, t.updateSprintRewardTime = function() { + var t = this.getSprintRewardData(), + e = t.pastTime, + o = 1e3 * this.gameConfigData.baseConfigData.sprintRewardTime, + n = Number(Date.now()) - e, + i = Math.floor(n / o), + r = 0; + return i >= 1 ? (console.log("重置倒计时 = " + i), t.pastTime = Date.now(), this.resetSprintReward(t), a.default.getInstance().sprintMark = !1, cc.game.emit(c.EMITKEY.MAINUPDATEUI)) : r = o - (n - i * o), r + }, t.resetSprintReward = function(t) { + a.default.getInstance().gameType == c.GAMETYPE.GAMELEVEL && (t ? console.log("活动结束中断连胜 ######") : (t = this.getSprintRewardData(), console.log("普通玩法中断连胜 ######")), t.winNum = 0, t.winBox = 0, t.rewardProgress = 0, t.isGameEd = 0, this.setSprintRewardData(t)) + }, t.getCookieRewardData = function() { + if (cc.sys.localStorage.getItem(c.STORAGEKEY.COOKIECOLLECTIONKEY)) { + var t = cc.sys.localStorage.getItem(c.STORAGEKEY.COOKIECOLLECTIONKEY); + return JSON.parse(t) + } + var e = { + cookieNum: 0, + pastTime: Date.now(), + progress: 0 + }, + o = JSON.stringify(e); + return cc.sys.localStorage.setItem(c.STORAGEKEY.COOKIECOLLECTIONKEY, o), e + }, t.setCookieRewardData = function(t) { + var e = JSON.stringify(t); + cc.sys.localStorage.setItem(c.STORAGEKEY.COOKIECOLLECTIONKEY, e) + }, t.updateCookieRewardTime = function() { + var t = this.getCookieRewardData(), + e = t.pastTime, + o = 1e3 * this.gameConfigData.baseConfigData.cookieRewardTime, + n = Number(Date.now()) - e, + a = Math.floor(n / o), + i = 0; + return a >= 1 ? (console.log("重置倒计时 = " + a), t.pastTime = Date.now(), t.cookieNum = 0, t.progress = 0, this.setCookieRewardData(t), cc.game.emit(c.EMITKEY.MAINUPDATEUI)) : i = o - (n - a * o), i + }, t.setItem = function(t, e, o) { + (!o || o <= 0) && (o = -1); + var n = { + data: e, + time: Date.now(), + expire: 1e3 * o + }, + a = JSON.stringify(n); + cc.sys.localStorage.setItem(t, a) + }, t.getItem = function(t) { + var e = cc.sys.localStorage.getItem(t); + if (e) { + var o = JSON.parse(e); + if (o && o.time && o.expire) { + if (!(o.expire > 0 && Date.now() > o.time + o.expire)) return o.data; + localStorage.removeItem(t) + } + } + }, t.removeItem = function(t) { + cc.sys.localStorage.removeItem(t) + }, t.getSheepClothesData = function() { + var e = cc.sys.localStorage.getItem(c.STORAGEKEY.SHEEPCLOTHESDATA), + o = t.gameConfigData.baseConfigData; + if (!e) return o && o.sheepClothesData && this.setSheepClothesData(o.sheepClothesData), console.log("本地没有羊皮肤数据,进行缓存 ###### "), o.sheepClothesData; + var n = JSON.parse(e); + if (o.sheepClothesData.length > n.length) + for (var a = 0; a < o.sheepClothesData.length; a++) { + for (var i = o.sheepClothesData[a], r = !1, s = 0; s < n.length; s++) + if ("Sheeps" == (l = n[s]).spName && (console.log("skin = ", l.spSkin.indexOf("skin_")), l.spSkin.indexOf("skin_") < 0 && (l.spSkin = "skin_" + l.spSkin)), i.clothesId == l.clothesId) { + r = !0; + break + } + 0 == r && n.push(i) + } else if (o.sheepClothesData.length == n.length) + for (a = 0; a < o.sheepClothesData.length; a++) + for (i = o.sheepClothesData[a], s = 0; s < n.length; s++) { + var l = n[s]; + i.clothesId == l.clothesId && (l.name = i.name) + } + return this.setSheepClothesData(n), n + }, t.setSheepClothesData = function(t) { + var e = JSON.stringify(t); + cc.sys.localStorage.setItem(c.STORAGEKEY.SHEEPCLOTHESDATA, e) + }, t.setLevelMapData = function(t, e) { + console.log("mapData:", e); + var o = JSON.stringify(e); + console.log("data:", o), u.default.post({ + url: "/admin/game_map/upsert", + data: { + map_id: t, + map_data: o + }, + success: function(e) { + 0 == e.err_code ? (cc.game.emit("showTips", "保存地图成功"), console.log("保存地图:", t, e)) : cc.game.emit("showTips", "保存地图失败") + } + }) + }, t.getLevelMapData = function(t, e) { + u.default.get({ + url: "/sheep/v1/game/map_info", + params: { + map_id: t + }, + success: function(o) { + if (0 == o.err_code) { + cc.game.emit("showTips", "读取成功"), console.log("地图数据:", t, o); + var n = o.data.map_data, + a = JSON.parse(n); + e(a) + } else cc.game.emit("showTips", "读取地图失败"), console.log("读取地图失败") + } + }) + }, t.getOriginLevelMapData = function(t, e) { + u.default.get({ + url: "/sheep/v1/game/map_info", + params: { + map_id: t + }, + success: function(t) { + 0 == t.err_code ? e(t) : console.log("读取地图失败") + } + }) + }, t.getAllLevelMapData = function(t) { + u.default.get({ + url: "/admin/game_map/page", + params: {}, + success: function(e) { + if (0 == e.err_code) { + cc.game.emit("showTips", "读取成功"), console.log("地图数据:", e); + for (var o = e.data, n = 0; n < o.length; n++) o[n].map_id <= 100 && console.log("mapId:", o[n].map_id); + t(o) + } else cc.game.emit("showTips", "读取地图失败"), console.log("读取地图失败") + } + }) + }, t.copy = function(t) { + var e = JSON.stringify(t); + return JSON.parse(e) + }, t.loadJsonData = function(t, e) { + cc.assetManager.loadBundle(cc.resources.name, function(o, n) { + o || n.load(t, cc.JsonAsset, function(t, o) { + if (!t) { + var n = o.json; + e(n) + } + }) + }) + }, t.isPlatform = function(t) { + switch (t) { + case n.android: + return !(!cc.sys.isNative || cc.sys.os != cc.sys.OS_ANDROID); + case n.ios: + return !(!cc.sys.isNative || cc.sys.os != cc.sys.OS_IOS); + case n.wx: + return cc.sys.platform == cc.sys.WECHAT_GAME; + case n.tt: + return cc.sys.platform == cc.sys.BYTEDANCE_GAME; + case n.oppo: + return cc.sys.platform == cc.sys.OPPO_GAME; + case n.vivo: + return cc.sys.platform == cc.sys.VIVO_GAME; + case n.web: + return cc.sys.isBrowser + } + return !1 + }, t.localKeyName = "gameUserLocalData", t.VERSION = "1_0_1", t.GAMEVERSION = "", t.WXVedioID = "adunit-e64f338bb42a2cf3", t.TTVedioID = "2h8vke2e0oo3771fk4", t.AndroidVedioID = "", t.OppoVedioID = "", t.VivoVedioID = "", t.langCode = c.LangEnum.zhCN, t.gameConfigData = { + baseConfigData: null, + levelConfigData: null + }, t.gameUserLocalData = { + userData: { + userID: "", + openid: "", + playLevelId: 1, + coin: 0, + love: 5, + fish: 0, + loveGetTime: 0, + registerTime: "", + token: "", + prop_remove: 2, + prop_cancel: 2, + prop_random: 2, + unlockHouseUserData: [], + catClothesData: {}, + dailyData: {} + }, + setUpData: { + effectStatus: 1, + musicStatus: 1, + shockStatus: 1 + }, + pictureData: { + bgNum: 1, + brickNum: 15 + } + }, t.registerData = { + userData: { + userID: "", + openid: "", + playLevelId: 1, + coin: 0, + love: 5, + fish: 0, + loveGetTime: 0, + registerTime: "", + token: "", + prop_remove: 2, + prop_cancel: 2, + prop_random: 2, + unlockHouseUserData: [], + catClothesData: { + cat_1: [] + }, + dailyData: {} + }, + setUpData: { + effectStatus: 1, + musicStatus: 1, + shockStatus: 1 + }, + pictureData: { + bgNum: 1, + brickNum: 15 + } + }, t + }(); + o.default = p, cc._RF.pop() + }, { + "../manager/GameManager": "GameManager", + "../manager/report-common": "report-common", + "./CcJsFunc": "CcJsFunc", + "./enumConfig": "enumConfig", + "./native/native-bridge": "native-bridge", + "./native/native-def": "native-def", + "./sdk": "sdk" + } + ], + editorGameLayer: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "78513skn4pKeoASzaMTH+ai", "editorGameLayer"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../game/chessboard"), + c = t("../game/crushArea"), + s = t("../game/moveOutArea"), + l = cc._decorator, + u = l.ccclass, + p = l.property, + d = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mainLayer = null, e.chessboard = null, e.crushArea = null, e.moveOutArea = null, e.uiLayer = null, e.levelDataArray = null, e.gameIsWin = !1, e.popCallbackCollect = null, e.userData = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.initLevelLayer = function(t) { + this.levelDataArray = t; + var e = t[0]; + this.gameIsWin = !1, this.chessboard.getComponent(r.default).init(e, this), this.crushArea.getComponent(c.default).initCrushArea(this), this.moveOutArea.getComponent(s.default).initMoveOutArea(this), this.node.active = !0, this.popCallbackCollect = { + continueCallBack: this.playNextLevel.bind(this), + returnMainCallBack: this.showMainLayer.bind(this), + rebornGameCallBack: this.rebornGameFunc.bind(this), + giveUpCallBack: this.giveUpFunc.bind(this), + restartCallBack: this.restartNowLevel.bind(this) + } + }, e.prototype.hideLayer = function() { + this.node.active = !1 + }, e.prototype.playNextLevel = function() {}, e.prototype.restartNowLevel = function() {}, e.prototype.showSetUpLayer = function() {}, e.prototype.showMainLayer = function() {}, e.prototype.gameWinFunc = function() {}, e.prototype.gameOverFunc = function() { + console.log("游戏失败", this.levelDataArray); + var t = { + popName: "failPop", + showPopData: { + popCallbackCollect: this.popCallbackCollect + } + }; + cc.game.emit("showPop", t) + }, e.prototype.giveUpFunc = function() { + cc.game.emit("closeAllPop") + }, e.prototype.rebornGameFunc = function() { + console.log("这里有个看视频"), cc.game.emit("closeAllPop"), this.crushArea.getComponent(c.default).rebornGameFunc() + }, e.prototype.crushBlockNode = function(t) { + this.crushArea.getComponent("crushArea").addCrushAreaCardNode(t); + var e = this.chessboard.getComponent(r.default).checkGameWin(), + o = this.moveOutArea.getComponent(s.default).checkGameWin(); + e && o && (console.log("游戏胜利!"), this.gameIsWin = !0) + }, e.prototype.crushAnimateCallback = function() { + this.gameIsWin && this.gameWinFunc() + }, i([p(cc.Node)], e.prototype, "mainLayer", void 0), i([p(cc.Node)], e.prototype, "chessboard", void 0), i([p(cc.Node)], e.prototype, "crushArea", void 0), i([p(cc.Node)], e.prototype, "moveOutArea", void 0), i([p(cc.Node)], e.prototype, "uiLayer", void 0), i([u], e) + }(cc.Component); + o.default = d, cc._RF.pop() + }, { + "../game/chessboard": "chessboard", + "../game/crushArea": "crushArea", + "../game/moveOutArea": "moveOutArea" + } + ], + editorGameUiLayer: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "74ee14/EMlALpPmiwWxivjL", "editorGameUiLayer"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/CcJsFunc"), + c = t("../game/chessboard"), + s = t("../game/crushArea"), + l = t("./editorGameLayer"), + u = cc._decorator, + p = u.ccclass, + d = u.property, + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.removeBtn = null, e.cancelBtn = null, e.randomBtn = null, e.setUpBtn = null, e.moveOutArea = null, e.chessboardNode = null, e.crushArea = null, e.paddingHeight = 70, e.userData = null, e.isMoving = !1, e + } + return a(e, t), e.prototype.start = function() { + r.default.addbtnTouchStartScale(this.removeBtn), r.default.addbtnTouchEndScale(this.removeBtn, this.removeEndFunc.bind(this)), r.default.addbtnTouchCancelScale(this.removeBtn), r.default.addbtnTouchStartScale(this.cancelBtn), r.default.addbtnTouchEndScale(this.cancelBtn, this.cancelEndFunc.bind(this)), r.default.addbtnTouchCancelScale(this.cancelBtn), r.default.addbtnTouchStartScale(this.randomBtn), r.default.addbtnTouchEndScale(this.randomBtn, this.randomEndFunc.bind(this)), r.default.addbtnTouchCancelScale(this.randomBtn), r.default.addbtnTouchStartScale(this.setUpBtn), r.default.addbtnTouchEndScale(this.setUpBtn, this.setUpEndFunc.bind(this)), r.default.addbtnTouchCancelScale(this.setUpBtn) + }, e.prototype.initGameUi = function() { + this.isMoving = !1; + var t = this.removeBtn.height + this.paddingHeight, + e = -(cc.winSize.height / 2 + this.removeBtn.height / 2); + this.removeBtn.y = e, this.cancelBtn.y = e, this.randomBtn.y = e, cc.tween(this.removeBtn).by(.4, { + y: t + }).start(), cc.tween(this.cancelBtn).by(.4, { + y: t + }).start(), cc.tween(this.randomBtn).by(.4, { + y: t + }).start() + }, e.prototype.removeGameUiBtn = function() { + var t = this; + this.isMoving = !0, this.removeBtn.height, this.paddingHeight; + var e = -(cc.winSize.height / 2 + this.removeBtn.height / 2); + cc.tween(this.removeBtn).to(.4, { + y: e + }).start(), cc.tween(this.cancelBtn).to(.4, { + y: e + }).start(), cc.tween(this.randomBtn).to(.4, { + y: e + }).call(function() { + t.isMoving = !1 + }, this).start() + }, e.prototype.setUpEndFunc = function() { + this.node.parent.getComponent(l.default).hideLayer() + }, e.prototype.removeEndFunc = function() { + this.crushArea.getComponent(s.default).moveOutBlock() + }, e.prototype.cancelEndFunc = function() { + this.crushArea.getComponent(s.default).cancelOneStep() + }, e.prototype.randomEndFunc = function() { + this.chessboardNode.getComponent(c.default).updateBlockArea() + }, i([d(cc.Node)], e.prototype, "removeBtn", void 0), i([d(cc.Node)], e.prototype, "cancelBtn", void 0), i([d(cc.Node)], e.prototype, "randomBtn", void 0), i([d(cc.Node)], e.prototype, "setUpBtn", void 0), i([d(cc.Node)], e.prototype, "moveOutArea", void 0), i([d(cc.Node)], e.prototype, "chessboardNode", void 0), i([d(cc.Node)], e.prototype, "crushArea", void 0), i([p], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "../common/CcJsFunc": "CcJsFunc", + "../game/chessboard": "chessboard", + "../game/crushArea": "crushArea", + "./editorGameLayer": "editorGameLayer" + } + ], + editorPopCommon: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "ff5d494wMpLzo5RKnYVG0uZ", "editorPopCommon"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = (r.property, function(t) { + function e() { + return null !== t && t.apply(this, arguments) || this + } + return a(e, t), e.prototype.start = function() { + this.node.on(cc.Node.EventType.TOUCH_START, this.starFunc, this), this.node.on(cc.Node.EventType.TOUCH_END, this.endFunc, this), this.node.on(cc.Node.EventType.TOUCH_MOVE, this.moveFunc, this), this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.cancelFunc, this), this.node.on(cc.Node.EventType.MOUSE_DOWN, this.mouseDown, this), this.node.on(cc.Node.EventType.MOUSE_ENTER, this.mouseEnter, this), this.node.on(cc.Node.EventType.MOUSE_MOVE, this.mouseMove, this), this.node.on(cc.Node.EventType.MOUSE_LEAVE, this.mouseLeave, this) + }, e.prototype.starFunc = function(t) { + t.stopPropagation() + }, e.prototype.endFunc = function(t) { + t.stopPropagation() + }, e.prototype.moveFunc = function(t) { + t.stopPropagation() + }, e.prototype.cancelFunc = function(t) { + t.stopPropagation() + }, e.prototype.mouseDown = function(t) { + t.stopPropagation() + }, e.prototype.mouseEnter = function(t) { + t.stopPropagation() + }, e.prototype.mouseMove = function(t) { + t.stopPropagation() + }, e.prototype.mouseLeave = function(t) { + t.stopPropagation() + }, i([c], e) + }(cc.Component)); + o.default = s, cc._RF.pop() + }, {} + ], + editorTips: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "fd10fv9y+ZEtaYplTuo+/L4", "editorTips"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.tipsLabel = null, e + } + return a(e, t), e.prototype.start = function() { + cc.game.on("showTips", this.showTips, this) + }, e.prototype.showTips = function(t) { + this.tipsLabel.node.active = !0, this.tipsLabel.string = t + "", cc.tween(this.tipsLabel.node).delay(1.5).call(function() { + this.tipsLabel.node.active = !1 + }, this).start() + }, i([s(cc.Label)], e.prototype, "tipsLabel", void 0), i([c], e) + }(cc.Component); + o.default = l, cc._RF.pop() + }, {} + ], + enumConfig: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "4c6b3ttKLVHnrBFJtUOvdja", "enumConfig"), Object.defineProperty(o, "__esModule", { + value: !0 + }), o.RefreshType = o.ShownType = o.MODULETYPE = o.LangEnum = o.STORAGEKEY = o.EMITKEY = o.GAMEBLOCK = o.GAMEOVER = o.WEEK = o.CALENDAR = o.DAYTYPE = o.CALENDARNAMES = o.CALENDARITEM = o.ROOMTYPE = o.MAINPAGE = o.GAMETYPE = o.GAMEENV = void 0, + function(t) { + t[t.ENVDEVELOP = 1] = "ENVDEVELOP", t[t.ENVTRAIL = 2] = "ENVTRAIL", t[t.ENVRELEASE = 3] = "ENVRELEASE" + }(o.GAMEENV || (o.GAMEENV = {})), + function(t) { + t[t.GAMEMAIN = 0] = "GAMEMAIN", t[t.GAMETOMB = 1] = "GAMETOMB", t[t.GAMELEVEL = 2] = "GAMELEVEL", t[t.GAMEDAILY = 3] = "GAMEDAILY", t[t.GAMETOPIC = 4] = "GAMETOPIC" + }(o.GAMETYPE || (o.GAMETYPE = {})), + function(t) { + t[t.PAGERANK = 0] = "PAGERANK", t[t.PAGEHOUSE = 1] = "PAGEHOUSE", t[t.PAGEMAIN = 2] = "PAGEMAIN", t[t.PAGEDAILY = 3] = "PAGEDAILY", t[t.PAGECOLLECT = 4] = "PAGECOLLECT" + }(o.MAINPAGE || (o.MAINPAGE = {})), + function(t) { + t[t.ROOMONE = 1] = "ROOMONE", t[t.ROOMTWO = 2] = "ROOMTWO", t[t.ROOMTHREE = 3] = "ROOMTHREE" + }(o.ROOMTYPE || (o.ROOMTYPE = {})), + function(t) { + t[t.ITEMLAST = 1] = "ITEMLAST", t[t.ITEMOLD = 2] = "ITEMOLD", t[t.ITEMNOW = 3] = "ITEMNOW", t[t.ITEMFUTURE = 4] = "ITEMFUTURE", t[t.ITEMNEXT = 5] = "ITEMNEXT", t[t.ITEMNOR = 6] = "ITEMNOR", t[t.ITEMSELE = 7] = "ITEMSELE", t[t.ITEMSUC = 8] = "ITEMSUC" + }(o.CALENDARITEM || (o.CALENDARITEM = {})), o.CALENDARNAMES = ["yyyy年", "yyyy年mm月", "yyyy年mm月dd日", "m-d", "yyyy-m-d", "yyyymm", "yyyymmdd", "yyyy-mm-dd", "yyyy-mm-dd hh:mm:ss", "hh:mm:ss"], + function(t) { + t[t.TODAY = 0] = "TODAY", t[t.YESTERDAY = 1] = "YESTERDAY", t[t.TOMORROW = 2] = "TOMORROW", t[t.NONE = 3] = "NONE" + }(o.DAYTYPE || (o.DAYTYPE = {})), + function(t) { + t[t.YEAR = 0] = "YEAR", t[t.MONTH = 1] = "MONTH", t[t.DAY = 2] = "DAY", t[t.WEEK = 3] = "WEEK" + }(o.CALENDAR || (o.CALENDAR = {})), + function(t) { + t[t.SUN = 0] = "SUN", t[t.MON = 1] = "MON", t[t.TUE = 2] = "TUE", t[t.WED = 3] = "WED", t[t.THU = 4] = "THU", t[t.FEI = 5] = "FEI", t[t.SAT = 6] = "SAT" + }(o.WEEK || (o.WEEK = {})), + function(t) { + t[t.NONE = 0] = "NONE", t[t.LEVELWIN = 1] = "LEVELWIN", t[t.LEVELFAIL = 2] = "LEVELFAIL", t[t.DAILYWIN = 3] = "DAILYWIN", t[t.DAILYFAIL = 4] = "DAILYFAIL" + }(o.GAMEOVER || (o.GAMEOVER = {})), + function(t) { + t[t.NONE = 0] = "NONE", t[t.BLOCKCOOKIE = 1] = "BLOCKCOOKIE", t[t.BLOCKGOLD = 2] = "BLOCKGOLD" + }(o.GAMEBLOCK || (o.GAMEBLOCK = {})), + function(t) { + t.MAINUPDATEUI = "MAINUPDATEUI", t.UPDATETABBARRECEIVE = "UPDATETABBARRECEIVE", t.UPDATETABBARSEND = "UPDATETABBARSEND", t.SHOWMASKLAYER = "SHOWMASKLAYER", t.HIDEMASKLAYER = "HIDEMASKLAYER", t.UPDATEPICTURE = "UPDATEPICTURE", t.SHOWMAINTIPS = "showMainTips", t.SHOWTRANSITLAYER = "showTransitLayer", t.RESTARTNOWLEVEL = "restartNowLevel", t.SHOWMAINLAYER = "showMainLayer", t.SHOWPOP = "showPop", t.CLOSEALLPOP = "closeAllPop", t.UPDATEPOPDATA = "UPDATEPOPDATA", t.TTSTARTRECORD = "TTSTARTRECORD", t.TTSTOPRECORD = "TTSTOPRECORD", t.TTSHARERECORD = "TTSHARERECORD", t.UPDATERANKDATA = "UPDATERANKDATA", t.SHOWUSERNODE = "SHOWUSERNODE", t.USERINFOSUCCESS = "USERINFOSUCCESS", t.RANKUSERINFOSUCCESS = "RANKUSERINFOSUCCESS", t.BULLETSEND = "BULLETSEND", t.BULLETSTATE = "BULLETSTATE", t.GAMEOVERRESTART = "GAMEOVERRESTART", t.GAMEOVERSUCCESS = "GAMEOVERSUCCESS", t.BEGINGAME = "BEGINGAME", t.SHOWMODULE = "SHOWMODULE", t.TOPICACCOUNT = "TOPICACCOUNT", t.TOPICRANKINFO = "TOPICRANKINFO", t.TOPICPOSITION = "TOPICPOSITION", t.CHANGESHEEPCLOTHES = "CHANGESHEEPCLOTHES" + }(o.EMITKEY || (o.EMITKEY = {})), + function(t) { + t.GAMEUSERLOCALDATA = "gameUserLocalData", t.SPRINTREWARDKEY = "SPRINTREWARDKEY", t.COOKIECOLLECTIONKEY = "COOKIECOLLECTIONKEY", t.BULLETSWITCH = "BULLETSWITCH", t.TAUSERINFO = "TAUSERINFO", t.RANKDATA = "RANKDATA", t.BULLETDATA = "BULLETDATA", t.STAGEDATA = "STAGEDATA", t.GAMEDAILYLEVELDATA = "GAMEDAILYLEVELDATA", t.GAMETOPICLEVELDATA = "GAMETOPICLEVELDATA", t.SHEEPCLOTHESDATA = "SHEEPCLOTHESDATA", t.TOPICMATCHRECORD = "TOPICMATCHRECORD", t.PROPGAMEDATA = "PROPGAMEDATA", t.GAMELOADING = "GAMELOADING" + }(o.STORAGEKEY || (o.STORAGEKEY = {})), + function(t) { + t.zhCN = "zh", t.enUS = "en" + }(o.LangEnum || (o.LangEnum = {})), + function(t) { + t[t.COMMON = 0] = "COMMON", t[t.TOPIC = 1] = "TOPIC" + }(o.MODULETYPE || (o.MODULETYPE = {})), + function(t) { + t.friendRank = "friendRank", t.todayRank = "todayRank" + }(o.ShownType || (o.ShownType = {})), (o.RefreshType || (o.RefreshType = {})).add = "add", cc._RF.pop() + }, {} + ], + "export-helper": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "c00e4AjhHVJqoY4uheCWzQM", "export-helper"), Object.defineProperty(o, "__esModule", { + value: !0 + }), o.math = void 0; + var n = cc.EPSILON, + a = function() { + function t() {} + return t.approx = function(t, e, o) { + return o = o || n, Math.abs(t - e) <= o + }, t.lerp = function(t, e, o) { + return t + (e - t) * o + }, t.equals = function(t, e) { + return Math.abs(t - e) <= n * Math.max(1, Math.abs(t), Math.abs(e)) + }, t + }(); + o.math = a, cc._RF.pop() + }, {} + ], + export: [ + function(t, e) { + "use strict"; + cc._RF.push(e, "aff89des1lECqfQBjTG1TrU", "export"), cc._RF.pop() + }, {} + ], + failPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "015c33YCudGR46pDyw1Hejz", "failPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../i18n/gd_language"), + c = t("../../i18n/i18n"), + s = t("../common/CcJsFunc"), + l = t("../common/dataTs"), + u = t("../common/enumConfig"), + p = t("../common/native/share"), + d = t("../common/native/tt-sdk"), + h = t("../common/sdk"), + f = t("../common/spine"), + m = t("../manager/GameManager"), + g = t("../manager/report-common"), + y = t("../../script/manager/data-manager"), + v = t("../utils/uma/uma-sdk"), + b = t("../api/api-sheep"), + _ = cc._decorator, + N = _.ccclass, + C = _.property, + w = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.fainNode = null, e.descLabel = null, e.failNumLabel = null, e.restartNode = null, e.backNode = null, e.tombNode = null, e.tombBubble = null, e.tombDesc = null, e.tombParticle = null, e.rankNode = null, e.rankPreLabel = null, e.rankNumLabel = null, e.rankLastLabel = null, e.shareNode = null, e.shareBtn = null, e.noShareBtn = null, e.shareCloseBtn = null, e.bottomShareBtn = null, e.rebornGameCallBack = null, e.giveUpCallBack = null, e.failNodeNum = 400, e.popCallbackCollect = null, e.userData = null, e.showPopData = null, e.rankUserData = null, e.type = 0, e + } + return a(e, t), e.prototype.start = function() { + cc.game.on(u.EMITKEY.GAMEOVERSUCCESS, this.requestUserData.bind(this)), this.popCallbackCollect = { + buyCallBack: this.buyCallBackFunc.bind(this), + freeCallBack: this.freeCallBackFunc.bind(this), + exitCallBack: this.exitCallBackFunc.bind(this) + }, s.default.addTargetTouchUpInside(this.restartNode, this.restartNodeFunc.bind(this)), s.default.addTargetTouchUpInside(this.backNode, this.backNodeFunc.bind(this)), s.default.addbtnTouchStartScale(this.shareBtn), s.default.addbtnTouchEndScale(this.shareBtn, this.shareBtnFunc.bind(this)), s.default.addbtnTouchCancelScale(this.shareBtn), s.default.addbtnTouchStartScale(this.noShareBtn), s.default.addbtnTouchEndScale(this.noShareBtn, this.noShareBtnFunc.bind(this)), s.default.addbtnTouchCancelScale(this.noShareBtn), s.default.addbtnTouchStartScale(this.shareCloseBtn), s.default.addbtnTouchEndScale(this.shareCloseBtn, this.shareCloseBtnFunc.bind(this)), s.default.addbtnTouchCancelScale(this.shareCloseBtn), s.default.addTargetTouchUpInside(this.bottomShareBtn, this.bottomShareBtnFunc.bind(this)) + }, e.prototype.restartNodeFunc = function() { + cc.game.emit(u.EMITKEY.RESTARTNOWLEVEL) + }, e.prototype.backNodeFunc = function() { + cc.game.emit(u.EMITKEY.SHOWMAINLAYER) + }, e.prototype.bottomShareBtnFunc = function() { + this.shareNode.active = !0, this.shareNode.stopAllActions(), cc.tween(this.shareNode).set({ + scale: 0, + opacity: 0 + }).delay(1).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start() + }, e.prototype.shareBtnFunc = function() { + var t = this; + l.default.isPlatform(l.GDPlatform.tt) ? d.default.shareTemplate(function(e) { + e && (t.shareNode.active = !1, t.showButton()) + }) : l.default.isPlatform(l.GDPlatform.wx) ? p.default.shareMethod({ + success: function() {}, + fail: function() {}, + complete: function() {} + }) : this.node.active = !1 + }, e.prototype.noShareBtnFunc = function() { + this.shareNode.active = !1, this.showButton() + }, e.prototype.shareCloseBtnFunc = function() { + this.shareNode.active = !1, this.showButton() + }, e.prototype.showFailPop = function(t) { + this.node.active = !0, this.showPopData = t, t.popCallbackCollect && (this.rebornGameCallBack = t.popCallbackCollect.rebornGameCallBack, this.giveUpCallBack = t.popCallbackCollect.giveUpCallBack), this.restartNode.active = !1, this.backNode.active = !1, this.tombNode.active = !1, this.rankNode.active = !1, this.tombParticle.active = !1, this.shareNode.active = !1, this.bottomShareBtn.active = !1; + var e = t.failType; + this.failNumLabel.string = "", console.log("failType = " + e), 1 == e ? console.log("复活 ###### ") : 2 == e && console.log("重新挑战 ###### "), this.playShowAnimate() + }, e.prototype.requestUserData = function() { + var t = this; + if (this.failNumLabel.string = "", m.default.getInstance().gameType == u.GAMETYPE.GAMEDAILY) b.default.getUserRankInfo(function(e) { + if (0 == e.err_code && e.data && e.data.user) { + t.rankUserData = e.data.user; + var o = e.data.user.fail; + o && 0 != o || (o = 1), t.failNumLabel.string = "今日已挑战 " + o + " 次" + } + }); + else if (m.default.getInstance().gameType == u.GAMETYPE.GAMETOPIC) { + var e = l.default.getUserData().userID; + b.default.getTopicUserInfo(e, function(e) { + if (0 == e.err_code && e.data && e.data.user) { + t.rankUserData = e.data.user; + var o = e.data.user.fail; + o && 0 != o || (o = 1), t.failNumLabel.string = "今日已挑战 " + o + " 次" + } + }) + } + }, e.prototype.getTeamName = function() { + var t = y.default.topicModel.name.split("#"); + return t.length >= 2 ? 1 == y.default.topicModel.info.type ? t[0] : t[1] : "" + }, e.prototype.exitCallBackFunc = function() {}, e.prototype.buyCallBackFunc = function(t, e) { + if (console.log("type = " + t), this.userData = l.default.getUserData(), this.userData.coin >= e) { + if (this.userData.coin -= e, m.default.getInstance().reportProperty.resurrection_coin_cost += e, m.default.getInstance().levelWinDict.coin += e, l.default.saveUserData(this.userData), m.default.getInstance().coinNum += 30, this.showTipPop(t), 4 == t && m.default.getInstance().gameType == u.GAMETYPE.GAMELEVEL) { + console.log("常规关卡复活购买"); + var o = e + ""; + v.default.trackEvent("game_life_buy", { + coinNum: o, + c_coinNum: Number(o) + }) + } + } else cc.game.emit("showMainTips", c.default.instance.trans(r.GDLanguage.coin_inadequate)) + }, e.prototype.freeCallBackFunc = function(t) { + var e = this; + this.type = t; + var o = l.default.GetVedioID(); + h.default.watchAdVideo({ + id: o, + success: function() { + e.watchSuc(1) + }, + fail: function() { + console.log("失败") + }, + nofit: function() { + e.shareTTAction() + } + }) + }, e.prototype.watchSuc = function(t) { + if (this.showTipPop(), cc.game.emit(u.EMITKEY.CLOSEALLPOP), m.default.getInstance().reportProperty.resurrection_ad_frequency++, 4 == this.type) { + m.default.getInstance().sheepMark.resurgenceCount++, console.log("复活看视频"); + var e = y.default.getTAUserInfo(); + 1 == t ? g.default.reportTACommon("game_life_ad", e) : 2 == t && g.default.reportTACommon("game_life_share", e) + } + }, e.prototype.shareTTAction = function() { + var t = this; + if (h.default.isPlatform(h.Platform.wx)) { + var e = l.default.GetVedioID(), + o = l.default.getUserData().openid; + h.default.share(o, e, function() { + t.shareCbMethod() + }, function() { + cc.game.emit(u.EMITKEY.SHOWMAINTIPS, "分享失败,请分享微信群与好友PK") + }) + } else if (h.default.isPlatform(h.Platform.tt)) { + var n = { + popName: "shareNodePop", + showPopData: { + type: 2, + shareCb: this.shareCbMethod.bind(this) + } + }; + cc.game.emit("showPop", n) + } + }, e.prototype.shareCbMethod = function() { + console.log("分享成功 ######"), this.watchSuc(2) + }, e.prototype.showTipPop = function() { + this.rebornGameCallBack && this.rebornGameCallBack(), cc.game.emit("showMainTips", c.default.instance.trans(r.GDLanguage.game_continue)) + }, e.prototype.playShowAnimate = function() { + var t = this; + this.fainNode.y = 0, cc.tween(this.fainNode).to(.8, { + y: this.failNodeNum + }, { + easing: cc.easing.cubicOut + }).call(function() {}, this).delay(.1).call(function() { + t.showPopData && 2 == t.showPopData.failType ? t.showRestartNode() : m.default.getInstance().sheepMark.resurgenceCount >= 1 ? t.showRestartNode() : t.showPropPop(4) + }).start() + }, e.prototype.showRestartNode = function() { + console.log("重新挑战"); + var t = y.default.getTAUserInfo(); + g.default.reportTACommon("game_over", t), cc.game.emit(u.EMITKEY.GAMEOVERRESTART), this.tombNode.active = !0, this.rankUserData ? this.showFailTomb(this.rankUserData.fail) : this.showFailTomb(1) + }, e.prototype.setupDescMethods = function(t) { + var e = ["12345,上山打老虎,要想过此关,就要肝肝肝", "人生得意须尽欢,不过此关心不甘!", "我只是为了垒坟头,并不是要过关!", "为我省争光,必须拿下", "以我的智慧拿下它,应该不成问题", "失败是成功之母,羊儿子还在等着你!", "不够!还不够!我还能再肝100回合", "我都死这么多次啦,时间过的真快!", "革命尚未成功,同志仍需努力!", "差一点就过了,你说气人不!", "你确定这么气人的游戏,不去气气朋友?", "又失败了,太难了", "又又又失败了,再试最后一次", "又又又又又失败了,要不放弃吧", "又又又又又又失败了,过不去就不睡觉了", "**策划确定这是可以过的么?", "*************策划,******母!", "放弃吧,何苦为难自己呢", "中国人不欺负中国人,策划你*****", "活着不好么,非得要气死自己么?", "生当作羊杰,死亦为碑雄!", "满眼冒金星,我碑亮晶晶!", "当不了羊,我也要做我朋友圈最亮的碑!耶!", "还差一点?我信你个鬼,你个糟老头子***!", "啊!啊!啊!啊!啊!wwwwww!", "没事,他们也过不了!", "你给我等着,我让我七大姑八大姨都来,我就不信了!"], + o = ["既然选择了,就需要无条件的过关", "羊羊云梯,我来了!", "我也要羊~羊~羊~", "为了阵营而战,败而不馁(nei)!", "即使羊群没有我,基地也需要我去建设!", "一次就好,让我当羊去代表代表吧!", "两军对垒就是干,不能怂,come~on~北鼻!", "不能涨了对面气势,灭了自己威风!", "对面是个屁!再来一次,我不能当屁!", "当羊我不行,嘲讽对方我行!", "重在参与,输赢不重要,么?不能输!", "不争馒头蒸口气,兄弟们等着我!", "说服自己再来一次,说服对面放弃!", "我感觉我已经尽力了,兄弟们加油!", "这也太难了,羊队进入太空,就差我了!", "羊羊这么可爱,策划是个*****x!", "关卡好难!策划好坏!但是我好喜欢啊!哈哈~", "不难不能凸显我的智慧,再来一次!", "不难不能凸显我的智慧,再来一次!", "不难不能凸显我的智慧,再来一次!"]; + if (1 <= t && t <= 8) { + var n = 1; + return 1 == t ? n = s.default.randomNum(0, 5) : 2 == t ? n = s.default.randomNum(2, 8) : 3 == t ? n = s.default.randomNum(3, 10) : 4 == t ? n = s.default.randomNum(4, 12) : 5 == t ? n = s.default.randomNum(8, 14) : 6 == t ? n = s.default.randomNum(10, 16) : 7 == t ? n = s.default.randomNum(14, 18) : 8 == t ? n = s.default.randomNum(15, 20) : 9 == t ? n = s.default.randomNum(15, 21) : 10 == t ? n = s.default.randomNum(15, 22) : 11 == t && (n = s.default.randomNum(15, 27)), m.default.getInstance().gameType == u.GAMETYPE.GAMEDAILY ? (n >= e.length && (n = e.length - 1), e[n]) : m.default.getInstance().gameType == u.GAMETYPE.GAMETOPIC ? (n >= o.length && (n = o.length - 1), o[n]) : "" + } + }, e.prototype.showFailTomb = function(t) { + this.tombBubble.scale = 0, cc.tween(this.tombBubble).to(.3, { + scale: 1 + }, { + easing: cc.easing.backOut + }).start(); + var e = y.default.getDeadNum(t), + o = "Dead" + e; + if (this.tombNode.getComponent(f.default).play(o, 0), this.tombDesc.string = this.setupDescMethods(e), this.rankNode.active = !0, cc.tween(this.rankNode).to(.2, { + scale: 1.1 + }).to(.1, { + scale: .9 + }).to(.1, { + scale: 1 + }).start(), this.rankPreLabel.string = "", this.rankLastLabel.string = "", this.rankNumLabel.string = "", m.default.getInstance().gameType == u.GAMETYPE.GAMEDAILY) { + this.rankPreLabel.string = "您所在地区依然是第 ", this.rankLastLabel.string = " 名"; + var n = m.default.getInstance().rankInfo.user.index; + this.rankNumLabel.string = n + "" + } else m.default.getInstance().gameType == u.GAMETYPE.GAMETOPIC && (this.rankPreLabel.string = this.getTeamName() + "羊队已有 ", this.rankLastLabel.string = " 羊", y.default.topicRankInfo && y.default.topicModel && (1 == y.default.topicModel.info.type ? this.rankNumLabel.string = y.default.topicRankInfo.tomb ? y.default.topicRankInfo.tomb.length + "" : "0" : this.rankNumLabel.string = y.default.topicRankInfo.taoist ? y.default.topicRankInfo.taoist.length + "" : "0")); + y.default.isUpgradeNum(t + 1) ? (this.tombParticle.active = !0, this.tombParticle.getComponent(cc.ParticleSystem).resetSystem(), this.shareNode.active = !0, cc.tween(this.shareNode).set({ + scale: 0, + opacity: 0 + }).delay(1).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start()) : this.showButton() + }, e.prototype.showButton = function() { + var t = this; + this.restartNode.activeInHierarchy && this.backNode.activeInHierarchy && this.bottomShareBtn.activeInHierarchy ? console.log("已展示show button") : (this.restartNode.scale = 0, this.backNode.scale = 0, this.bottomShareBtn.scale = 0, this.restartNode.active = !0, this.backNode.active = !0, this.bottomShareBtn.active = !0, setTimeout(function() { + cc.tween(t.restartNode).to(.2, { + scale: 1.1 + }).to(.1, { + scale: .9 + }).to(.1, { + scale: 1 + }).start(), cc.tween(t.backNode).to(.2, { + scale: 1.1 + }).to(.1, { + scale: .9 + }).to(.1, { + scale: 1 + }).start(), cc.tween(t.bottomShareBtn).to(.2, { + scale: 1.1 + }).to(.1, { + scale: .9 + }).to(.1, { + scale: 1 + }).start() + }, 1e3)) + }, e.prototype.hideFailPop = function() { + this.node.active = !1 + }, e.prototype.continueFunc = function() { + this.showPropPop(4) + }, e.prototype.giveUpFunc = function() { + this.giveUpCallBack && this.giveUpCallBack() + }, e.prototype.showPropPop = function(t) { + var e = { + popName: "getPropPop", + showPopData: { + popCallbackCollect: this.popCallbackCollect, + popType: t, + coinNum: m.default.getInstance().coinNum + } + }; + cc.game.emit("showPop", e) + }, i([C(cc.Node)], e.prototype, "fainNode", void 0), i([C(cc.Label)], e.prototype, "descLabel", void 0), i([C(cc.Label)], e.prototype, "failNumLabel", void 0), i([C({ + type: cc.Node, + tooltip: "重新挑战" + })], e.prototype, "restartNode", void 0), i([C({ + type: cc.Node, + tooltip: "返回羊群" + })], e.prototype, "backNode", void 0), i([C({ + type: cc.Node, + tooltip: "墓碑spine" + })], e.prototype, "tombNode", void 0), i([C({ + type: cc.Node, + tooltip: "墓碑气泡" + })], e.prototype, "tombBubble", void 0), i([C({ + type: cc.Label, + tooltip: "墓碑描述" + })], e.prototype, "tombDesc", void 0), i([C({ + type: cc.Node, + tooltip: "墓碑粒子" + })], e.prototype, "tombParticle", void 0), i([C({ + type: cc.Node, + tooltip: "排名base" + })], e.prototype, "rankNode", void 0), i([C({ + type: cc.Label, + tooltip: "排名" + })], e.prototype, "rankPreLabel", void 0), i([C({ + type: cc.Label, + tooltip: "排名" + })], e.prototype, "rankNumLabel", void 0), i([C({ + type: cc.Label, + tooltip: "排名" + })], e.prototype, "rankLastLabel", void 0), i([C(cc.Node)], e.prototype, "shareNode", void 0), i([C(cc.Node)], e.prototype, "shareBtn", void 0), i([C(cc.Node)], e.prototype, "noShareBtn", void 0), i([C(cc.Node)], e.prototype, "shareCloseBtn", void 0), i([C({ + type: cc.Node, + tooltip: "底部分享按钮" + })], e.prototype, "bottomShareBtn", void 0), i([N], e) + }(cc.Component); + o.default = w, cc._RF.pop() + }, { + "../../i18n/gd_language": "gd_language", + "../../i18n/i18n": "i18n", + "../../script/manager/data-manager": "data-manager", + "../api/api-sheep": "api-sheep", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../common/native/share": "share", + "../common/native/tt-sdk": "tt-sdk", + "../common/sdk": "sdk", + "../common/spine": "spine", + "../manager/GameManager": "GameManager", + "../manager/report-common": "report-common", + "../utils/uma/uma-sdk": "uma-sdk" + } + ], + "flying-item-pop-coin": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "f8882Kqr8ZNno3Bla7FeEvc", "flying-item-pop-coin"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }, + r = this && this.__awaiter || function(t, e, o, n) { + return new(o || (o = Promise))(function(a, i) { + function r(t) { + try { + s(n.next(t)) + } catch (e) { + i(e) + } + } + + function c(t) { + try { + s(n.throw(t)) + } catch (e) { + i(e) + } + } + + function s(t) { + var e; + t.done ? a(t.value) : (e = t.value, e instanceof o ? e : new o(function(t) { + t(e) + })).then(r, c) + } + s((n = n.apply(t, e || [])).next()) + }) + }, + c = this && this.__generator || function(t, e) { + var o, n, a, i, r = { + label: 0, + sent: function() { + if (1 & a[0]) throw a[1]; + return a[1] + }, + trys: [], + ops: [] + }; + return i = { + next: c(0), + throw :c(1), + return :c(2) + }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { + return this + }), i; + + function c(t) { + return function(e) { + return s([t, e]) + } + } + + function s(i) { + if (o) throw new TypeError("Generator is already executing."); + for (; r;) try { + if (o = 1, n && (a = 2 & i[0] ? n.return : i[0] ? n.throw || ((a = n.return) && a.call(n), 0) : n.next) && !(a = a.call(n, i[1])).done) return a; + switch (n = 0, a && (i = [2 & i[0], a.value]), i[0]) { + case 0: + case 1: + a = i; + break; + case 4: + return r.label++, { + value: i[1], + done: !1 + }; + case 5: + r.label++, n = i[1], i = [0]; + continue; + case 7: + i = r.ops.pop(), r.trys.pop(); + continue; + default: + if (!(a = (a = r.trys).length > 0 && a[a.length - 1]) && (6 === i[0] || 2 === i[0])) { + r = 0; + continue + } + if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { + r.label = i[1]; + break + } + if (6 === i[0] && r.label < a[1]) { + r.label = a[1], a = i; + break + } + if (a && r.label < a[2]) { + r.label = a[2], r.ops.push(i); + break + } + a[2] && r.ops.pop(), r.trys.pop(); + continue + } + i = e.call(t, r) + } catch (c) { + i = [6, c], n = 0 + } finally { + o = a = 0 + } + if (5 & i[0]) throw i[1]; + return { + value: i[0] ? i[1] : void 0, + done: !0 + } + } + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var s = t("../../script/common/native/audio"), + l = t("../../script/common/spine"), + u = cc._decorator, + p = u.ccclass, + d = u.property, + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.coinFlyNode = null, e.toNode = null, e.speed = 500, e.diceNumLength = 15, e.centerPoint = null, e.flyMiniNodeArr = [], e.parameter = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.flyTo = function(t, e, o) { + return r(this, void 0, Promise, function() { + var n, a; + return c(this, function(i) { + switch (i.label) { + case 0: + this.toNode = t, this.parameter = e, this.centerPoint = cc.v2(this.node.parent.width * (this.node.parent.anchorX - .5) * -1, this.node.parent.height * (this.node.parent.anchorY - .5) * -1), o && this.getNodePosition(o), n = this.getRandomPoint(), s.default.playAudioMusic("audio/sound/coin-fly.mp3", !1), a = 0, i.label = 1; + case 1: + return a < this.diceNumLength ? a != this.diceNumLength - 1 ? [3, 3] : [4, this.addMiniCoin(a, n[a])] : [3, 5]; + case 2: + return i.sent(), e && e.callBack && e.callBack(), [3, 4]; + case 3: + this.addMiniCoin(a, n[a]), i.label = 4; + case 4: + return a++, [3, 1]; + case 5: + return [2] + } + }) + }) + }, e.prototype.addMiniCoin = function(t, e) { + return r(this, void 0, Promise, function() { + var o = this; + return c(this, function() { + return [2, new Promise(function(n) { + var a = o.getWorldPosition(o.toNode), + i = o.getNodePosition(a), + r = cc.instantiate(o.coinFlyNode); + r.active = !0, r.getChildByName("goldPart").active = !1, r.setPosition(e), o.node.parent.addChild(r); + var c = o.getRadiusPoint(), + u = .05 * Math.abs(t - o.diceNumLength); + cc.tween(r).set({ + scale: 0 + }).delay(.1 * t).call(function() { + r.getChildByName("gold").getComponent(l.default).play("1Main_Coin1", 0) + }).to(.3, { + scale: .6 + }, { + easing: cc.easing.backOut + }).by(u, { + x: c.x, + y: c.y + }).call(function() { + r.getChildByName("goldPart").active = !0 + }).to(.3, { + x: i.x, + y: i.y + }, { + easing: cc.easing.cubicOut + }).call(function() { + s.default.playAudioMusic("audio/sound/pop-fly-end.mp3", !1), r.destroy(), o.toNodeAnim(), n(), 0 == t && o.parameter && o.parameter.firstCallBack && o.parameter.firstCallBack() + }, o).start() + })] + }) + }) + }, e.prototype.random = function(t, e) { + return Math.floor(Math.random() * (e - t)) + t + }, e.prototype.getRadiusPoint = function() { + var t = this.random(40, 80), + e = this.random(0, t), + o = Math.sqrt(t * t - e * e); + return 1 == this.random(0, 2) && (e = -e), 1 == this.random(0, 2) && (o = -o), cc.v2(e, o) + }, e.prototype.getRandomPoint = function() { + for (var t = [], e = 0; e < this.diceNumLength; e++) { + var o = this.random(this.centerPoint.x - 40, this.centerPoint.x + 40), + n = this.random(this.centerPoint.y - 40, this.centerPoint.y + 40), + a = cc.v2(o, n); + t.push(a) + } + return t.sort(function(t, e) { + return t.y - e.y + }), t + }, e.prototype.toNodeAnim = function() { + cc.Tween.stopAllByTarget(this.toNode), cc.tween(this.toNode).to(.1, { + scale: 1.5 + }).to(.1, { + scale: 1 + }).start() + }, e.prototype.getWorldPosition = function(t) { + return t.convertToWorldSpaceAR(cc.v2(0, 0)) + }, e.prototype.getNodePosition = function(t) { + return this.node.parent.convertToNodeSpaceAR(t) + }, e.prototype.getFlyTime = function(t, e) { + var o = e; + return Math.sqrt((o.x - this.node.x) * (o.x - this.node.x) + (o.y - this.node.y) * (o.y - this.node.y)) / t + }, i([d({ + type: cc.Node, + tooltip: "金币飞行节点" + })], e.prototype, "coinFlyNode", void 0), i([p], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "../../script/common/native/audio": "audio", + "../../script/common/spine": "spine" + } + ], + "flying-item-pop-fish": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "24b3aU5EKhEMYofjMDPEymV", "flying-item-pop-fish"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }, + r = this && this.__awaiter || function(t, e, o, n) { + return new(o || (o = Promise))(function(a, i) { + function r(t) { + try { + s(n.next(t)) + } catch (e) { + i(e) + } + } + + function c(t) { + try { + s(n.throw(t)) + } catch (e) { + i(e) + } + } + + function s(t) { + var e; + t.done ? a(t.value) : (e = t.value, e instanceof o ? e : new o(function(t) { + t(e) + })).then(r, c) + } + s((n = n.apply(t, e || [])).next()) + }) + }, + c = this && this.__generator || function(t, e) { + var o, n, a, i, r = { + label: 0, + sent: function() { + if (1 & a[0]) throw a[1]; + return a[1] + }, + trys: [], + ops: [] + }; + return i = { + next: c(0), + throw :c(1), + return :c(2) + }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { + return this + }), i; + + function c(t) { + return function(e) { + return s([t, e]) + } + } + + function s(i) { + if (o) throw new TypeError("Generator is already executing."); + for (; r;) try { + if (o = 1, n && (a = 2 & i[0] ? n.return : i[0] ? n.throw || ((a = n.return) && a.call(n), 0) : n.next) && !(a = a.call(n, i[1])).done) return a; + switch (n = 0, a && (i = [2 & i[0], a.value]), i[0]) { + case 0: + case 1: + a = i; + break; + case 4: + return r.label++, { + value: i[1], + done: !1 + }; + case 5: + r.label++, n = i[1], i = [0]; + continue; + case 7: + i = r.ops.pop(), r.trys.pop(); + continue; + default: + if (!(a = (a = r.trys).length > 0 && a[a.length - 1]) && (6 === i[0] || 2 === i[0])) { + r = 0; + continue + } + if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { + r.label = i[1]; + break + } + if (6 === i[0] && r.label < a[1]) { + r.label = a[1], a = i; + break + } + if (a && r.label < a[2]) { + r.label = a[2], r.ops.push(i); + break + } + a[2] && r.ops.pop(), r.trys.pop(); + continue + } + i = e.call(t, r) + } catch (c) { + i = [6, c], n = 0 + } finally { + o = a = 0 + } + if (5 & i[0]) throw i[1]; + return { + value: i[0] ? i[1] : void 0, + done: !0 + } + } + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var s = t("../../script/common/native/audio"), + l = t("../../script/manager/GameManager"), + u = cc._decorator, + p = u.ccclass, + d = u.property, + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.coinFlyNode = null, e.toNode = null, e.speed = 500, e.diceNumLength = 15, e.centerPoint = null, e.flyMiniNodeArr = [], e.parameter = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.flyTo = function(t, e, o) { + return r(this, void 0, Promise, function() { + var n, a, i; + return c(this, function(r) { + switch (r.label) { + case 0: + this.toNode = t, this.parameter = e, l.default.getInstance().moneyDict && l.default.getInstance().moneyDict.fish && (n = Number(l.default.getInstance().moneyDict.fish), this.diceNumLength = n < 1 ? this.diceNumLength : n), this.centerPoint = cc.v2(this.node.parent.width * (this.node.parent.anchorX - .5) * -1, this.node.parent.height * (this.node.parent.anchorY - .5) * -1), o && this.getNodePosition(o), a = this.getRandomPoint(), s.default.playAudioMusic("audio/sound/fish-fly.mp3", !1), i = 0, r.label = 1; + case 1: + return i < this.diceNumLength ? i != this.diceNumLength - 1 ? [3, 3] : [4, this.addMiniCoin(i, a[i])] : [3, 5]; + case 2: + return r.sent(), e && e.callBack && e.callBack(), [3, 4]; + case 3: + this.addMiniCoin(i, a[i]), r.label = 4; + case 4: + return i++, [3, 1]; + case 5: + return [2] + } + }) + }) + }, e.prototype.addMiniCoin = function(t, e) { + return r(this, void 0, Promise, function() { + var o = this; + return c(this, function() { + return [2, new Promise(function(n) { + var a = o.getWorldPosition(o.toNode), + i = o.getNodePosition(a), + r = cc.instantiate(o.coinFlyNode); + r.active = !0, r.getChildByName("goldPart").active = !1, r.setPosition(e), o.node.parent.addChild(r); + var c = o.getRadiusPoint(), + l = .05 * Math.abs(t - o.diceNumLength); + cc.tween(r).set({ + scale: 0 + }).delay(.1 * t).call(function() { + r.getChildByName("gold").getComponent(cc.Animation).getAnimationState("fishAnimation").speed = 2, r.getChildByName("gold").getComponent(cc.Animation).play() + }).to(.3, { + scale: .6 + }, { + easing: cc.easing.backOut + }).by(l, { + x: c.x, + y: c.y + }).call(function() { + r.getChildByName("goldPart").active = !0 + }).to(.3, { + x: i.x, + y: i.y + }).call(function() { + s.default.playAudioMusic("audio/sound/pop-fly-end.mp3", !1), r.destroy(), o.toNodeAnim(), n(), 0 == t && o.parameter && o.parameter.firstCallBack && o.parameter.firstCallBack() + }, o).start() + })] + }) + }) + }, e.prototype.random = function(t, e) { + return Math.floor(Math.random() * (e - t)) + t + }, e.prototype.getRadiusPoint = function() { + var t = this.random(40, 80), + e = this.random(0, t), + o = Math.sqrt(t * t - e * e); + return 1 == this.random(0, 2) && (e = -e), 1 == this.random(0, 2) && (o = -o), cc.v2(e, o) + }, e.prototype.getRandomPoint = function() { + for (var t = [], e = 0; e < this.diceNumLength; e++) { + var o = this.random(this.centerPoint.x - 40, this.centerPoint.x + 40), + n = this.random(this.centerPoint.y - 40, this.centerPoint.y + 40), + a = cc.v2(o, n); + t.push(a) + } + return t.sort(function(t, e) { + return t.y - e.y + }), t + }, e.prototype.toNodeAnim = function() { + cc.Tween.stopAllByTarget(this.toNode), cc.tween(this.toNode).to(.1, { + scale: 1.5 + }).to(.1, { + scale: 1 + }).start() + }, e.prototype.getWorldPosition = function(t) { + return t.convertToWorldSpaceAR(cc.v2(0, 0)) + }, e.prototype.getNodePosition = function(t) { + return this.node.parent.convertToNodeSpaceAR(t) + }, e.prototype.getFlyTime = function(t, e) { + var o = e; + return Math.sqrt((o.x - this.node.x) * (o.x - this.node.x) + (o.y - this.node.y) * (o.y - this.node.y)) / t + }, i([d({ + type: cc.Node, + tooltip: "金币飞行节点" + })], e.prototype, "coinFlyNode", void 0), i([p], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "../../script/common/native/audio": "audio", + "../../script/manager/GameManager": "GameManager" + } + ], + fontTipsLayer: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "fddcdbtmuBJSauoEdki8uxT", "fontTipsLayer"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/enumConfig"), + c = cc._decorator, + s = c.ccclass, + l = c.property, + u = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.popNode = null, e.tipsFontLabel = null, e + } + return a(e, t), e.prototype.start = function() { + this.popNode.active = !1, cc.game.on(r.EMITKEY.SHOWMAINTIPS, this.showTips, this) + }, e.prototype.showTips = function(t) { + var e = this; + this.popNode.stopAllActions(), this.popNode.active = !0, this.tipsFontLabel.string = t + "", this.popNode.y = -100, cc.tween(this.popNode).set({ + opacity: 255 + }).to(.3, { + y: 0 + }).delay(1).to(.3, { + opacity: 0 + }).call(function() { + e.popNode.active = !1 + }, this).start() + }, i([l(cc.Node)], e.prototype, "popNode", void 0), i([l(cc.Label)], e.prototype, "tipsFontLabel", void 0), i([s], e) + }(cc.Component); + o.default = u, cc._RF.pop() + }, { + "../common/enumConfig": "enumConfig" + } + ], + "game-top-ui": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "011b2otLrtL36irPwLg72Hm", "game-top-ui"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.cookieNode = null, e.cookieImg = null, e.cookieNum = null, e.cookiePrefab = null, e.cookieTrailing = null, e.cookieCurCount = 0, e.cookieAllCount = 0, e.goldBlockCoinCount = 0, e.ribbonBoxCount = 0, e + } + return a(e, t), e.prototype.start = function() {}, i([s(cc.Node)], e.prototype, "cookieNode", void 0), i([s(cc.Node)], e.prototype, "cookieImg", void 0), i([s(cc.Node)], e.prototype, "cookieNum", void 0), i([s(cc.Prefab)], e.prototype, "cookiePrefab", void 0), i([s(cc.Prefab)], e.prototype, "cookieTrailing", void 0), i([c], e) + }(cc.Component); + o.default = l, cc._RF.pop() + }, {} + ], + gameLayer: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "4f0043pQOFO24XT2d3lGc3T", "gameLayer"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/CcJsFunc"), + c = t("../common/dataTs"), + s = t("../common/native/audio"), + l = t("../main/mainLayer"), + u = t("./chessboard"), + p = t("./crushArea"), + d = t("./gameUiLayer"), + h = t("./moveOutArea"), + f = t("../common/spine"), + m = t("../common/enumConfig"), + g = t("../manager/GameManager"), + y = t("../manager/DateManager"), + v = t("../utils/uma/uma-sdk"), + b = t("../../i18n/i18n"), + _ = t("../../i18n/gd_language"), + N = t("../common/native/native-bridge"), + C = t("../manager/report-common"), + w = t("../manager/data-manager"), + P = t("../api/api-sheep"), + k = cc._decorator, + S = k.ccclass, + D = k.property, + A = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mainLayer = null, e.bgLayer = null, e.chessboard = null, e.crushArea = null, e.moveOutArea = null, e.uiLayer = null, e.gameTopUi = null, e.gameWin = null, e.gameNext = null, e.levelDataArray = null, e.gameIsWin = !1, e.popCallbackCollect = null, e.userData = null, e.playLevelNum = 0, e.gameIsStop = !1, e.chessY = 0, e.beginBGM = !1, e.timer = 0, e.countdown = 0, e + } + return a(e, t), e.prototype.onEnable = function() { + cc.audioEngine.setMusicVolume(1), cc.game.setFrameRate(60), this.countdown = 0, g.default.getInstance().playGameCount++; + var t = y.default.format(m.CALENDARNAMES[6], new Date); + g.default.getInstance().gameBeginDate = t + }, e.prototype.update = function(t) { + this.timer += t, this.timer >= 1 && 0 == this.gameIsStop && (this.timer = 0, this.countdown++) + }, e.prototype.start = function() { + cc.game.on(m.EMITKEY.RESTARTNOWLEVEL, this.restartNowLevel, this), cc.game.on(m.EMITKEY.SHOWMAINLAYER, this.showMainLayer, this), cc.game.on(m.EMITKEY.GAMEOVERRESTART, this.gameOverRestartFunc, this), r.default.addbtnTouchStartScale(this.gameWin), r.default.addbtnTouchEndScale(this.gameWin, this.gameWinFunc.bind(this)), r.default.addbtnTouchCancelScale(this.gameWin), r.default.addbtnTouchStartScale(this.gameNext), r.default.addbtnTouchEndScale(this.gameNext, this.gameNextFunc.bind(this)), r.default.addbtnTouchCancelScale(this.gameNext), cc.sys.isBrowser ? (this.gameWin.active = !0, this.gameNext.active = !0) : (this.gameWin.active = !1, this.gameNext.active = !1) + }, e.prototype.onDisable = function() { + this.chessY = 0 + }, e.prototype.adaptScreen = function() { + var t = this; + setTimeout(function() { + g.default.getInstance().globalData.isFullScreen && 0 == t.chessY && t.chessboard.y > 400 && (t.chessboard.y -= 100, t.chessY = t.chessboard.y) + }, 200), setTimeout(function() { + t.onPointIsContains() + }, 100), g.default.getInstance().gameType == m.GAMETYPE.GAMEDAILY ? (this.bgLayer.color = new cc.Color(195, 254, 139), this.bgLayer.getChildByName("glassSP").getComponent(f.default).play("2Grass", 0)) : g.default.getInstance().gameType == m.GAMETYPE.GAMETOPIC && (this.bgLayer.color = new cc.Color(65, 167, 143), this.bgLayer.getChildByName("glassSP").getComponent(f.default).play("2Grass2", 0)) + }, e.prototype.onPointIsContains = function() { + this.chessboard.getBoundingBoxToWorld(); + for (var t = r.default.getWorldPosition(this.moveOutArea), e = this.chessboard.getBoundingBoxToWorld(); e.contains(t);) { + if (this.chessboard.scale -= .05, this.chessboard.scale < .5) { + console.log("超出最小scale 退出 ###### "); + break + } + e = this.chessboard.getBoundingBoxToWorld(), console.log("我在节点的内部 ###### ") + } + console.log("我在节点的外部 ###### ", this.chessboard.scale) + }, e.prototype.gameNextFunc = function() { + if (this.playLevelNum < this.levelDataArray.length - 1) this.playNextLevelMap(); + else { + cc.game.emit("showMainTips", b.default.instance.trans(_.GDLanguage.map_over)), g.default.getInstance().cookieDict.cookie += 12; + var t = c.default.getCookieRewardData(); + t.cookieNum = g.default.getInstance().cookieDict.cookie, c.default.setCookieRewardData(t) + } + }, e.prototype.initLevelLayer = function(t) { + for (var e in g.default.getInstance().coinNum = 60, g.default.getInstance().levelWinDict.coin = 0, g.default.getInstance().levelWinDict.cancel = 0, g.default.getInstance().levelWinDict.remove = 0, g.default.getInstance().levelWinDict.random = 0, c.default.subLoveCount(1), console.log("当前关卡类型 ###### = ", g.default.getInstance().gameType), g.default.getInstance().reportProperty) g.default.getInstance().reportProperty[e] = 0; + g.default.getInstance().reportProperty.challenge_count++, console.log("challenge_count = " + g.default.getInstance().reportProperty.challenge_count), this.playLevelNum = 0, this.levelDataArray = t; + var o = t[this.playLevelNum]; + if (this.gameIsWin = !1, this.node.active = !0, this.mainLayer.active = !1, this.gameIsStopFunc(!1), this.chessboard.getComponent(u.default).init(o, this), this.crushArea.getComponent(p.default).initCrushArea(this), this.moveOutArea.getComponent(h.default).initMoveOutArea(this), this.uiLayer.getComponent(d.default).initGameUi(t), this.levelDataArray.length > 0 && this.uiLayer.getComponent(d.default).setLevelStage(this.playLevelNum), this.adaptScreen(), this.popCallbackCollect = { + continueCallBack: this.playNextLevel.bind(this), + returnMainCallBack: this.showMainLayer.bind(this), + rebornGameCallBack: this.rebornGameFunc.bind(this), + giveUpCallBack: this.giveUpFunc.bind(this), + restartCallBack: this.restartNowLevel.bind(this), + resumeCallBack: this.resumeCallBackFunc.bind(this) + }, this.playGameBgMusic(), g.default.getInstance().gameType == m.GAMETYPE.GAMELEVEL) { + var n = c.default.getSprintRewardData(); + n.isGameEd = 1, c.default.setSprintRewardData(n), console.log("冲刺奖励 = " + JSON.stringify(n)) + } else g.default.getInstance().gameType == m.GAMETYPE.GAMEDAILY && this.updateTodayWin(!1) + }, e.prototype.resumeCallBackFunc = function() { + this.gameIsStopFunc(!1) + }, e.prototype.gameIsStopFunc = function(t) { + this.gameIsStop = t, this.uiLayer.getComponent(d.default).gameIsStopFunc(t) + }, e.prototype.playNextLevelMap = function() { + var t = "每日挑战"; + g.default.getInstance().gameType == m.GAMETYPE.GAMEDAILY ? t = "每日挑战" : g.default.getInstance().gameType == m.GAMETYPE.GAMETOPIC && (t = "话题挑战"), C.default.reportTACommon("level_2", { + game_type: t + }), this.playLevelNum += 1; + var e = this.levelDataArray[this.playLevelNum]; + this.gameIsWin = !1, this.gameIsStopFunc(!1), this.adaptScreen(), this.chessboard.getComponent(u.default).initNextLevelMap(e, this), this.uiLayer.getComponent(d.default).setLevelStage(this.playLevelNum), g.default.getInstance().todayState < 0 && (g.default.getInstance().todayState = 0, setTimeout(function() { + cc.game.emit("showPop", { + popName: "nextLevelPop", + showPopData: {} + }) + }, 1e3)) + }, e.prototype.playNextLevel = function() { + console.log("打开下一关卡"), this.userData = c.default.getUserData(); + var t = this.userData.playLevelId; + this.playLevelfunc(t) + }, e.prototype.restartNowLevel = function() { + if (console.log("重新开始本关卡 type = " + g.default.getInstance().gameType), this.countdown = 0, this.gameIsStopFunc(!1), g.default.getInstance().gameType == m.GAMETYPE.GAMEDAILY) this.playNumberfunc(); + else if (g.default.getInstance().gameType == m.GAMETYPE.GAMETOPIC) this.playNumberfunc(); + else { + this.userData = c.default.getUserData(); + var t = this.userData.playLevelId; + this.playLevelfunc(t) + } + }, e.prototype.playLevelfunc = function(t) { + var e = this, + o = y.default.format(m.CALENDARNAMES[4], new Date); + if (o) { + var n = o.split("-"); + n.length >= 3 && (t = Number(n[2])) + } + c.default.getLevelByID(t, function(t) { + if (t.length < 1) return cc.game.emit("showMainTips", b.default.instance.trans(_.GDLanguage.level_inadequate)), void e.showMainLayer(m.GAMEOVER.NONE); + cc.game.emit("closeAllPop"), e.initLevelLayer(t) + }) + }, e.prototype.playNumberfunc = function() { + if (this.levelDataArray.length < 1) this.showMainLayer(m.GAMEOVER.NONE); + else { + cc.game.emit("closeAllPop"), g.default.getInstance().gameType == m.GAMETYPE.GAMEDAILY ? this.uiLayer.getComponent(d.default).recoverTime(1) : g.default.getInstance().gameType == m.GAMETYPE.GAMETOPIC && this.uiLayer.getComponent(d.default).recoverTime(1); + var t = w.default.getGameLevelData(); + t ? (console.log("获取关卡缓存数据 ###### "), this.initLevelLayer(t)) : this.initLevelLayer(this.levelDataArray) + } + }, e.prototype.showSetUpLayer = function() { + console.log("打开设置页面"); + var t = { + popName: "setupPop", + showPopData: { + popCallbackCollect: this.popCallbackCollect, + setupType: 2 + } + }; + cc.game.emit("showPop", t), this.gameIsStopFunc(!0) + }, e.prototype.showMainLayer = function(t) { + void 0 === t && (t = m.GAMEOVER.NONE), console.log("打开主页面 = " + t); + var e = this; + cc.game.emit(m.EMITKEY.SHOWTRANSITLAYER, function(o) { + console.log("可以打开了 gamelayer"), cc.game.emit("closeAllPop"), e.gameIsStopFunc(!0), e.mainLayer.getComponent(l.default).showMainLayer(t), e.node.active = !1, o() + }) + }, e.prototype.gameOverFunc = function(t) { + void 0 === t && (t = 1), this.gameOverState(2), console.log("游戏失败 failType = ", t); + var e = { + popName: "failPop", + showPopData: { + popCallbackCollect: this.popCallbackCollect, + failType: t + } + }; + cc.game.emit("showPop", e), this.gameIsStopFunc(!0) + }, e.prototype.gameOverState = function(t) { + g.default.getInstance().game_over = t, 1 == t && this.reportData(t) + }, e.prototype.gameOverRestartFunc = function() { + this.reportData(2) + }, e.prototype.reportData = function(t) { + var e = this, + o = 1; + for (var n in g.default.getInstance().sheepMark) { + var a = g.default.getInstance().sheepMark[n]; + if (Number(a) > 0) { + o = 2; + break + } + } + for (var i = c.default.getSheepClothesData(), r = 1, s = 0; s < i.length; s++) { + var l = i[s]; + if (l.dressing) { + r = l.clothesId; + break + } + } + var u = { + rank_score: 1, + rank_state: t, + rank_time: this.countdown, + rank_role: o, + skin: r + }; + if (console.log("parms = " + JSON.stringify(u), JSON.stringify(g.default.getInstance().sheepMark)), 0 == this.checkIsTodayWin()) return console.log("checkIsTodayWin gameover ######## false"), cc.game.emit(m.EMITKEY.SHOWMAINTIPS, "每日关卡已更新, 快去挑战今日关卡吧"), void setTimeout(function() { + e.showMainLayer(), cc.game.emit(m.EMITKEY.SHOWMODULE, m.MODULETYPE.COMMON) + }, 1500); + if (g.default.getInstance().gameType == m.GAMETYPE.GAMEDAILY) { + if (w.default.rankUserInfo && 1 == w.default.rankUserInfo.state) return void console.log("数据重复 = ", JSON.stringify(w.default.rankUserInfo)); + P.default.gameOver(u, function() { + cc.game.emit(m.EMITKEY.GAMEOVERSUCCESS) + }) + } else g.default.getInstance().gameType == m.GAMETYPE.GAMETOPIC && P.default.topicGameOver(u, function() { + cc.game.emit(m.EMITKEY.GAMEOVERSUCCESS) + }) + }, e.prototype.checkIsTodayWin = function() { + var t = y.default.format(m.CALENDARNAMES[6], new Date); + return g.default.getInstance().gameEndDate = t, console.log("time ###### = ", g.default.getInstance().gameBeginDate, "------", g.default.getInstance().gameEndDate), g.default.getInstance().gameBeginDate == g.default.getInstance().gameEndDate ? (console.log("进入游戏和结束游戏时间相等 ###### "), !0) : (console.log("进入游戏和结束游戏时间不相等,不上报数据 ###### "), !1) + }, e.prototype.gameWinFunc = function() { + if (this.gameOverState(1), this.uiLayer.getComponent(d.default).gameIsWin(), g.default.getInstance().gameType == m.GAMETYPE.GAMELEVEL) { + var t = c.default.gameConfigData.baseConfigData.sprintRewardLevel; + if (c.default.getUserData().playLevelId >= t) { + var e = c.default.getSprintRewardData(); + e.winNum += 1, e.rewardProgress < 3 ? (e.rewardProgress += 1, 3 == e.rewardProgress && (e.winBox += 1)) : e.rewardProgress = 1, e.isGameEd = 0, c.default.setSprintRewardData(e); + var o = [3, 6, 9, 12, 15, 25, 50, 100]; + for (var n in o) + if (e.winNum == o[n]) { + var a = "richroad_level" + e.winNum, + i = c.default.getUserData().playLevelId + "", + r = { + levelNum: i, + c_levelNum: Number(i) + }; + v.default.trackEvent(a, r), console.log("连胜 ########", a, r); + break + } + } + this.userData = c.default.getUserData(), console.log("游戏获胜,关卡为:", this.levelDataArray, this.userData.playLevelId); + var s = { + af_level: this.userData.playLevelId + }; + N.default.leitingReport("af_levels_achieved", s); + var l = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 120, 150, 200]; + for (var n in l) + if (this.userData.playLevelId == l[n]) { + var u = { + af_level: this.userData.playLevelId + }; + N.default.leitingReport("af_level" + this.userData.playLevelId, u), console.log("af_level" + this.userData.playLevelId); + break + } + this.crushArea.getComponent(p.default).hideCrushArea(), this.uiLayer.getComponent(d.default).removeGameUiBtn(); + var h = c.default.getRewardBoxData(this.userData.playLevelId), + f = this.userData.playLevelId >= 5; + c.default.gameLevelWin(f, h); + var y = c.default.getCollectionUnlockData(); + console.log("unlockObj:", y); + var b = { + popName: "winPop", + showPopData: { + popCallbackCollect: this.popCallbackCollect, + winRewardObj: h, + unlockObj: y, + time: this.countdown + } + }; + cc.game.emit(m.EMITKEY.SHOWPOP, b), this.gameIsStopFunc(!0) + } else g.default.getInstance().gameType == m.GAMETYPE.GAMEDAILY ? (this.userData = c.default.getUserData(), h = c.default.getRewardBoxData(this.userData.playLevelId), c.default.gameLevelWin(!0, h), y = c.default.getCollectionUnlockData(), b = { + popName: "winPop", + showPopData: { + popCallbackCollect: this.popCallbackCollect, + winRewardObj: h, + unlockObj: y, + time: this.countdown + } + }, cc.game.emit(m.EMITKEY.SHOWPOP, b), this.crushArea.getComponent(p.default).hideCrushArea(), this.uiLayer.getComponent(d.default).removeGameUiBtn(), this.gameIsStopFunc(!0), this.updateTodayWin(!0)) : g.default.getInstance().gameType == m.GAMETYPE.GAMETOPIC && (b = { + popName: "winPop", + showPopData: { + popCallbackCollect: this.popCallbackCollect, + time: this.countdown + } + }, cc.game.emit(m.EMITKEY.SHOWPOP, b), this.crushArea.getComponent(p.default).hideCrushArea(), this.uiLayer.getComponent(d.default).removeGameUiBtn(), this.gameIsStopFunc(!0)) + }, e.prototype.updateTodayWin = function(t) { + if (console.log("isWin = ", t), 0 != this.checkIsTodayWin()) { + var e = y.default.format(m.CALENDARNAMES[5], new Date), + o = y.default.format(m.CALENDARNAMES[6], new Date), + n = c.default.getDailyData(e, o); + n ? n.isWin = t : n = { + dailyID: o, + isWin: t, + unLimitVideo: 0, + sheepNum: -1 + }, c.default.saveDailyData(e, o, n) + } else console.log("checkIsTodayWin update cache ######## false") + }, e.prototype.giveUpFunc = function(t) { + void 0 === t && (t = 0), g.default.getInstance().gameType == m.GAMETYPE.GAMELEVEL && (c.default.getSprintRewardData().winNum > 0 && cc.game.emit("showPop", { + popName: "sprintRewardPop", + showPopData: { + popCallbackCollect: null, + popType: 2 + } + }), g.default.getInstance().cookieDict.cookieCurCount > 0 && cc.game.emit("showPop", { + popName: "loseCookiePop", + showPopData: { + popCallbackCollect: null, + popType: 0 + } + })); + var e = { + popName: "loseLovePop", + showPopData: { + popCallbackCollect: this.popCallbackCollect, + popType: t + } + }; + cc.game.emit("showPop", e), this.gameIsStopFunc(!0) + }, e.prototype.rebornGameFunc = function() { + console.log("这里有个看视频"), cc.game.emit("closeAllPop"), this.gameIsStopFunc(!1), g.default.getInstance().gameType == m.GAMETYPE.GAMEDAILY && this.uiLayer.getComponent(d.default).recoverTime(), this.crushArea.getComponent(p.default).rebornGameFunc() + }, e.prototype.crushBlockNode = function(t) { + this.crushArea.getComponent("crushArea").addCrushAreaCardNode(t); + var e = this.chessboard.getComponent(u.default).checkGameWin(), + o = this.moveOutArea.getComponent(h.default).checkGameWin(); + e && o && (console.log("游戏胜利!"), this.gameIsWin = !0, this.gameIsStopFunc(!0)) + }, e.prototype.crushAnimateCallback = function() { + this.gameIsWin && (this.playLevelNum < this.levelDataArray.length - 1 ? this.playNextLevelMap() : this.gameWinFunc()) + }, e.prototype.playGameBgMusic = function() { + if (c.default.getUserSetupData().musicStatus < 0) cc.audioEngine.stopAll(); + else if (0 == this.beginBGM) { + var t = this, + e = "audio/music/game_begin.mp3"; + g.default.getInstance().gameType == m.GAMETYPE.GAMEDAILY ? e = "audio/music/game_begin.mp3" : g.default.getInstance().gameType == m.GAMETYPE.GAMETOPIC && (e = "audio/music/game_begin.mp3"), cc.loader.loadRes(e, function(e, o) { + var n = cc.audioEngine.playMusic(o, !1); + cc.audioEngine.getCurrentTime(n), cc.audioEngine.getDuration(n), cc.audioEngine.setFinishCallback(n, function() { + t.beginBGM = !0, console.log("播放完成进场音乐 ###### "), t.playBg() + }) + }) + } else this.playBg() + }, e.prototype.playBg = function() { + s.default.playBGM() + }, i([D(cc.Node)], e.prototype, "mainLayer", void 0), i([D(cc.Node)], e.prototype, "bgLayer", void 0), i([D(cc.Node)], e.prototype, "chessboard", void 0), i([D(cc.Node)], e.prototype, "crushArea", void 0), i([D(cc.Node)], e.prototype, "moveOutArea", void 0), i([D(cc.Node)], e.prototype, "uiLayer", void 0), i([D(cc.Node)], e.prototype, "gameTopUi", void 0), i([D(cc.Node)], e.prototype, "gameWin", void 0), i([D(cc.Node)], e.prototype, "gameNext", void 0), i([S], e) + }(cc.Component); + o.default = A, cc._RF.pop() + }, { + "../../i18n/gd_language": "gd_language", + "../../i18n/i18n": "i18n", + "../api/api-sheep": "api-sheep", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../common/native/audio": "audio", + "../common/native/native-bridge": "native-bridge", + "../common/spine": "spine", + "../main/mainLayer": "mainLayer", + "../manager/DateManager": "DateManager", + "../manager/GameManager": "GameManager", + "../manager/data-manager": "data-manager", + "../manager/report-common": "report-common", + "../utils/uma/uma-sdk": "uma-sdk", + "./chessboard": "chessboard", + "./crushArea": "crushArea", + "./gameUiLayer": "gameUiLayer", + "./moveOutArea": "moveOutArea" + } + ], + gameUiLayer: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "91b87hBI4pAa6NOoAiPYA2X", "gameUiLayer"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/CcJsFunc"), + c = t("../common/dataTs"), + s = t("../common/enumConfig"), + l = t("../common/native/audio"), + u = t("../common/sdk"), + p = t("../manager/DateManager"), + d = t("../manager/GameManager"), + h = t("./chessboard"), + f = t("./crushArea"), + m = t("./gameLayer"), + g = t("../../pre/item/prop-prefab"), + y = t("../utils/uma/uma-sdk"), + v = t("../manager/report-common"), + b = t("../../i18n/i18n"), + _ = t("../../i18n/gd_language"), + N = t("../manager/data-manager"), + C = cc._decorator, + w = C.ccclass, + P = C.property, + k = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.removeBtn = null, e.removeBg1 = null, e.removeMask = null, e.removeNumLabel = null, e.removeVedio = null, e.cancelBtn = null, e.cancelBg1 = null, e.cancelMask = null, e.cancelNumLabel = null, e.cancelVedio = null, e.randomBtn = null, e.randomBg1 = null, e.randomMask = null, e.randomNumLabel = null, e.randomVedio = null, e.setUpBtn = null, e.moveOutArea = null, e.chessboardNode = null, e.crushArea = null, e.levelNode = null, e.levelNumLabel = null, e.stageOneNode = null, e.stageTwoNode = null, e.maskStage = null, e.propPrefab = null, e.paddingHeight = 25, e.userData = null, e.isMoving = !1, e.timer = 0, e.countdownOrogin = 0, e.countdown = 0, e.countdownAdd = 60, e.gameIsStop = !1, e.popCallbackCollect = null, e.getPropType = 0, e + } + return a(e, t), e.prototype.start = function() { + r.default.addbtnTouchStartScale(this.removeBtn), r.default.addbtnTouchEndScale(this.removeBtn, this.removeEndFunc.bind(this)), r.default.addbtnTouchCancelScale(this.removeBtn), r.default.addbtnTouchStartScale(this.cancelBtn), r.default.addbtnTouchEndScale(this.cancelBtn, this.cancelEndFunc.bind(this)), r.default.addbtnTouchCancelScale(this.cancelBtn), r.default.addbtnTouchStartScale(this.randomBtn), r.default.addbtnTouchEndScale(this.randomBtn, this.randomEndFunc.bind(this)), r.default.addbtnTouchCancelScale(this.randomBtn), r.default.addbtnTouchStartScale(this.setUpBtn), r.default.addbtnTouchEndScale(this.setUpBtn, this.setUpEndFunc.bind(this)), r.default.addbtnTouchCancelScale(this.setUpBtn), this.popCallbackCollect = { + buyCallBack: this.buyCallBackFunc.bind(this), + freeCallBack: this.freeCallBackFunc.bind(this), + exitCallBack: this.exitCallBackFunc.bind(this) + } + }, e.prototype.exitCallBackFunc = function() { + this.gameIsStopFunc(!1) + }, e.prototype.setTimeByLevel = function(t, e) { + var o = t.timeArray; + if (e > o.length) cc.game.emit("showMainTips", b.default.instance.trans(_.GDLanguage.level_inadequate)); + else { + var n = o[e - 1]; + this.countdown = n, this.countdownOrogin = n, console.log("countdowm = " + n), this.updateTime(this.countdown) + } + }, e.prototype.update = function(t) { + d.default.getInstance().gameType == s.GAMETYPE.GAMEDAILY && 0 == this.gameIsStop && (this.timer += t, this.timer >= 1 && (this.timer = 0, this.countdown--, this.updateTime(this.countdown))) + }, e.prototype.updateTime = function() {}, e.prototype.gameIsWin = function() { + if (d.default.getInstance().gameType == s.GAMETYPE.GAMELEVEL) { + if (d.default.getInstance().levelWinDict.remove > 0) { + var t = d.default.getInstance().levelWinDict.remove + ""; + y.default.trackEvent("game_finish_skill_1", { + num: t, + c_num: Number(t) + }) + } + if (d.default.getInstance().levelWinDict.cancel > 0) { + var e = d.default.getInstance().levelWinDict.cancel + ""; + y.default.trackEvent("game_finish_skill_2", { + num: e, + c_num: Number(e) + }) + } + if (d.default.getInstance().levelWinDict.random > 0) { + var o = d.default.getInstance().levelWinDict.random + ""; + y.default.trackEvent("game_finish_skill_3", { + num: o, + c_num: Number(o) + }) + } + } else { + var n = this.countdown <= 0 ? 0 : this.countdown, + a = n + ""; + d.default.getInstance().reportProperty.dailyWin_time_remaining = n, y.default.trackEvent("daily_finishtime", { + remainTime: a, + c_remainTime: Number(a) + }) + } + }, e.prototype.gameIsStopFunc = function(t) { + this.gameIsStop = t + }, e.prototype.recoverTime = function(t) { + void 0 === t && (t = 0), this.countdown <= 0 && (this.countdown = this.countdownAdd), 1 == t && (this.countdown = this.countdownOrogin), this.updateTime(this.countdown) + }, e.prototype.initGameUi = function(t) { + for (var e in this.userData = c.default.getUserData(), this.userData.prop_cancel = 0, this.userData.prop_random = 0, this.userData.prop_remove = 0, c.default.saveUserData(this.userData), d.default.getInstance().sheepMark) d.default.getInstance().sheepMark[e] = 0; + this.isMoving = !1; + var o = this.removeBtn.height + this.paddingHeight, + n = -(cc.winSize.height / 2 + this.removeBtn.height / 2); + this.removeBtn.y = n, this.cancelBtn.y = n, this.randomBtn.y = n, cc.tween(this.removeBtn).by(.4, { + y: o + }).start(), cc.tween(this.cancelBtn).by(.4, { + y: o + }).start(), cc.tween(this.randomBtn).by(.4, { + y: o + }).start(), this.setGameLayerUiData(), t.length > 1 ? (this.stageTwoNode.active = !0, this.stageOneNode.active = !1) : (this.stageTwoNode.active = !1, this.stageOneNode.active = !1) + }, e.prototype.setLevelStage = function(t) { + if (0 == t ? this.stageOneNode.active = !1 : 1 == t && (this.stageOneNode.active = !0), this.levelNode.active = !0, d.default.getInstance().gameType == s.GAMETYPE.GAMEDAILY) { + if (p.default.format(s.CALENDARNAMES[4], p.default.getInstance().selDate).split("-").length < 3) return; + this.levelNumLabel.string = "每日一关" + } else this.levelNode.active = !0 + }, e.prototype.setGameLayerUiData = function() { + this.userData = c.default.getUserData(), p.default.format(s.CALENDARNAMES[4], p.default.getInstance().selDate).split("-").length < 3 || (this.levelNumLabel.string = "每日一关", this.userData.prop_remove >= 1 ? (this.removeNumLabel.string = "" + this.userData.prop_remove, this.removeNumLabel.node.active = !0, this.removeBg1.active = !0, this.removeVedio.active = !1, this.removeMask.active = !1) : (this.removeNumLabel.node.active = !1, this.removeVedio.active = !0, d.default.getInstance().sheepMark.propRemoveCount >= 1 ? (this.removeMask.active = !0, this.removeBg1.active = !1) : (this.removeMask.active = !1, this.removeBg1.active = !0)), this.userData.prop_cancel >= 1 ? (this.cancelNumLabel.string = "" + this.userData.prop_cancel, this.cancelNumLabel.node.active = !0, this.cancelBg1.active = !0, this.cancelVedio.active = !1, this.cancelMask.active = !1) : (this.cancelNumLabel.node.active = !1, this.cancelVedio.active = !0, d.default.getInstance().sheepMark.propCancelCount >= 1 ? (this.cancelMask.active = !0, this.cancelBg1.active = !1) : (this.cancelMask.active = !1, this.cancelBg1.active = !0)), this.userData.prop_random >= 1 ? (this.randomNumLabel.string = "" + this.userData.prop_random, this.randomNumLabel.node.active = !0, this.randomBg1.active = !0, this.randomVedio.active = !1, this.randomMask.active = !1) : (this.randomNumLabel.node.active = !1, this.randomVedio.active = !0, d.default.getInstance().sheepMark.propRandomCount >= 1 ? (this.randomMask.active = !0, this.randomBg1.active = !1) : (this.randomMask.active = !1, this.randomBg1.active = !0))) + }, e.prototype.removeGameUiBtn = function() { + var t = this; + console.log("移除按钮 ###### "), this.isMoving = !0, this.removeBtn.height, this.paddingHeight; + var e = -(cc.winSize.height / 2 + this.removeBtn.height); + cc.tween(this.removeBtn).to(.4, { + y: e + }).start(), cc.tween(this.cancelBtn).to(.4, { + y: e + }).start(), cc.tween(this.randomBtn).to(.4, { + y: e + }).call(function() { + t.isMoving = !1 + }, this).start() + }, e.prototype.setUpEndFunc = function() { + this.node.parent.getComponent(m.default).showSetUpLayer() + }, e.prototype.removeEndFunc = function() { + this.userData.prop_remove = 5; + if (!this.isMoving) + if (this.removeMask.activeInHierarchy) cc.game.emit(s.EMITKEY.SHOWMAINTIPS, "每关只能使用一次哦"); + else if (this.userData.prop_remove >= 1) { + if (this.crushArea.getComponent(f.default).moveOutBlock()) { + l.default.playAudioMusic("audio/sound/moveOut.mp3", !1), this.userData.prop_remove--, d.default.getInstance().reportProperty.remove_use++, d.default.getInstance().sheepMark.propRemoveCount++, 0 == d.default.getInstance().reportProperty.remove_ad && console.log("使用初始道具 ###### propRemove"); + var t = N.default.getTAUserInfo(); + t.item_name = "移出道具", v.default.reportTACommon("prop_initial", t), c.default.saveUserData(this.userData), this.setGameLayerUiData(), d.default.getInstance().levelWinDict.remove += 1; + var e = this.userData.prop_remove - 1; + e < 0 && (e = 0) + } + } else console.log("移出道具不足"), this.showPropPop(1, 60) + }, e.prototype.cancelEndFunc = function() { + this.userData.prop_cancel = 5; + if (this.cancelMask.activeInHierarchy) cc.game.emit(s.EMITKEY.SHOWMAINTIPS, "每关只能使用一次哦"); + else if (this.userData.prop_cancel >= 1) { + if (this.crushArea.getComponent(f.default).cancelOneStep()) { + l.default.playAudioMusic("audio/sound/moveOut.mp3", !1), this.userData.prop_cancel--, d.default.getInstance().reportProperty.cancel_use++, d.default.getInstance().sheepMark.propCancelCount++, 0 == d.default.getInstance().reportProperty.cancel_ad && console.log("使用初始道具 ###### propCancel"); + var t = N.default.getTAUserInfo(); + t.item_name = "撤销道具", v.default.reportTACommon("prop_initial", t), c.default.saveUserData(this.userData), this.setGameLayerUiData(), d.default.getInstance().levelWinDict.cancel += 1; + var e = this.userData.prop_cancel - 1; + e < 0 && (e = 0) + } + } else console.log("撤销道具不足"), this.showPropPop(2, 20) + }, e.prototype.randomEndFunc = function() { + this.userData.prop_random = 5; + if (!this.isMoving) + if (this.randomMask.activeInHierarchy) cc.game.emit(s.EMITKEY.SHOWMAINTIPS, "每关只能使用一次哦"); + else if (this.userData.prop_random >= 1) { + var t = this.chessboardNode.getComponent(h.default).updateBlockArea(); + if (console.log("isOk ###### ", t), t) { + l.default.playAudioMusic("audio/sound/random.mp3", !1), this.userData.prop_random--, d.default.getInstance().reportProperty.random_use++, d.default.getInstance().sheepMark.propRandomCount++, 0 == d.default.getInstance().reportProperty.random_ad && console.log("使用初始道具 ###### propRandom"); + var e = N.default.getTAUserInfo(); + e.item_name = "洗牌道具", v.default.reportTACommon("prop_initial", e), c.default.saveUserData(this.userData), this.setGameLayerUiData(), d.default.getInstance().levelWinDict.random += 1; + var o = this.userData.prop_random - 1; + o < 0 && (o = 0) + } + } else console.log("洗牌道具不足"), this.showPropPop(3, 10) + }, e.prototype.buyCallBackFunc = function(t, e) { + if (console.log("coin = " + e), this.userData = c.default.getUserData(), this.userData.coin >= e) { + if (this.userData.coin -= e, d.default.getInstance().levelWinDict.coin += e, this.showTipPop(t, 1), d.default.getInstance().gameType == s.GAMETYPE.GAMELEVEL) { + var o = e + ""; + y.default.trackEvent("game_skill_buy", { + coinNum: o, + c_coinNum: Number(o) + }) + } + this.userData.coin + } else cc.game.emit("showMainTips", b.default.instance.trans(_.GDLanguage.coin_inadequate)) + }, e.prototype.freeCallBackFunc = function(t) { + var e = this; + if (this.getPropType = t, console.log("type = " + t), u.default.isPlatform(u.Platform.wx)) { + var o = N.default.getPropData(), + n = 0; + if (d.default.getInstance().gameType == s.GAMETYPE.GAMEDAILY ? 1 == t ? n = o.daily.prop_remove : 2 == t ? n = o.daily.prop_cancel : 3 == t && (n = o.daily.prop_random) : d.default.getInstance().gameType == s.GAMETYPE.GAMETOPIC && (1 == t ? n = o.topic.prop_remove : 2 == t ? n = o.topic.prop_cancel : 3 == t && (n = o.topic.prop_random)), n > 0) return void e.shareTTAction(t); + if ("shareValue" == u.default.wxValue) return void e.shareTTAction(t) + } + var a = c.default.GetVedioID(); + u.default.watchAdVideo({ + id: a, + success: function() { + console.log("成功 sdk"), cc.game.emit(s.EMITKEY.CLOSEALLPOP), e.showTipPop(t, 2), d.default.getInstance().gameType == s.GAMETYPE.GAMELEVEL && y.default.trackEvent("game_skill_ad") + }, + fail: function(t) { + console.log("失败 ###### = ", t), e.gameIsStopFunc(!1) + }, + nofit: function() { + e.shareTTAction(t) + } + }) + }, e.prototype.shareTTAction = function(t) { + var e = this; + if (u.default.isPlatform(u.Platform.wx)) { + var o = c.default.GetVedioID(), + n = c.default.getUserData().openid; + u.default.share(n, o, function() { + e.shareCbMethod(), e.updateShareCount(t) + }, function() { + cc.game.emit(s.EMITKEY.SHOWMAINTIPS, "分享失败,请分享微信群与好友PK") + }) + } else if (u.default.isPlatform(u.Platform.tt)) { + var a = { + popName: "shareNodePop", + showPopData: { + type: 2, + shareCb: this.shareCbMethod.bind(this) + } + }; + cc.game.emit("showPop", a) + } + }, e.prototype.updateShareCount = function(t) { + var e = N.default.getPropData(); + d.default.getInstance().gameType == s.GAMETYPE.GAMEDAILY ? 1 == t ? e.daily.prop_remove-- : 2 == t ? e.daily.prop_cancel-- : 3 == t && e.daily.prop_random-- : d.default.getInstance().gameType == s.GAMETYPE.GAMETOPIC && (1 == t ? e.topic.prop_remove-- : 2 == t ? e.topic.prop_cancel-- : 3 == t && e.topic.prop_random--), N.default.setPropData(e) + }, e.prototype.shareCbMethod = function() { + console.log("分享成功 ######"), cc.game.emit(s.EMITKEY.CLOSEALLPOP), this.showTipPop(this.getPropType, 3) + }, e.prototype.showTipPop = function(t, e) { + var o = "", + n = null, + a = ""; + 1 == t ? (o = b.default.instance.trans(_.GDLanguage.props_remove_claim), n = this.removeBtn, a = "移出道具", this.userData.prop_remove = 1, this.userData.prop_remove, 1 == e ? d.default.getInstance().reportProperty.remove_buy++ : 2 == e && d.default.getInstance().reportProperty.remove_ad++) : 2 == t ? (o = b.default.instance.trans(_.GDLanguage.props_cancel_claim), n = this.cancelBtn, a = "撤销道具", this.userData.prop_cancel = 1, this.userData.prop_cancel, 1 == e ? d.default.getInstance().reportProperty.cancel_buy++ : 2 == e && d.default.getInstance().reportProperty.cancel_ad++) : 3 == t && (o = b.default.instance.trans(_.GDLanguage.props_random_claim), n = this.randomBtn, a = "洗牌道具", this.userData.prop_random = 1, this.userData.prop_random, 1 == e ? d.default.getInstance().reportProperty.random_buy++ : 2 == e && d.default.getInstance().reportProperty.random_ad++); + var i = "每日挑战"; + d.default.getInstance().gameType == s.GAMETYPE.GAMEDAILY ? i = "每日挑战" : d.default.getInstance().gameType == s.GAMETYPE.GAMETOPIC && (i = "话题挑战"), 2 == e ? v.default.reportTACommon("game_skill_ad", { + item_name: a, + game_type: i + }) : 3 == e && v.default.reportTACommon("game_skill_share", { + item_name: a, + game_type: i + }), c.default.saveUserData(this.userData), this.setGameLayerUiData(), cc.game.emit("showMainTips", o); + var r = cc.instantiate(this.propPrefab); + r.getComponent(g.default).showWithType(t, n, this.movePropFunc.bind(this)), this.node.addChild(r), this.node.setSiblingIndex(20) + }, e.prototype.movePropFunc = function() { + this.gameIsStopFunc(!1) + }, e.prototype.showPropPop = function(t, e) { + this.gameIsStopFunc(!0); + var o = { + popName: "getPropPop", + showPopData: { + popCallbackCollect: this.popCallbackCollect, + popType: t, + coinNum: e + } + }; + cc.game.emit("showPop", o) + }, i([P(cc.Node)], e.prototype, "removeBtn", void 0), i([P(cc.Node)], e.prototype, "removeBg1", void 0), i([P(cc.Node)], e.prototype, "removeMask", void 0), i([P(cc.Label)], e.prototype, "removeNumLabel", void 0), i([P(cc.Node)], e.prototype, "removeVedio", void 0), i([P(cc.Node)], e.prototype, "cancelBtn", void 0), i([P(cc.Node)], e.prototype, "cancelBg1", void 0), i([P(cc.Node)], e.prototype, "cancelMask", void 0), i([P(cc.Label)], e.prototype, "cancelNumLabel", void 0), i([P(cc.Node)], e.prototype, "cancelVedio", void 0), i([P(cc.Node)], e.prototype, "randomBtn", void 0), i([P(cc.Node)], e.prototype, "randomBg1", void 0), i([P(cc.Node)], e.prototype, "randomMask", void 0), i([P(cc.Label)], e.prototype, "randomNumLabel", void 0), i([P(cc.Node)], e.prototype, "randomVedio", void 0), i([P(cc.Node)], e.prototype, "setUpBtn", void 0), i([P(cc.Node)], e.prototype, "moveOutArea", void 0), i([P(cc.Node)], e.prototype, "chessboardNode", void 0), i([P(cc.Node)], e.prototype, "crushArea", void 0), i([P(cc.Node)], e.prototype, "levelNode", void 0), i([P(cc.Label)], e.prototype, "levelNumLabel", void 0), i([P(cc.Node)], e.prototype, "stageOneNode", void 0), i([P(cc.Node)], e.prototype, "stageTwoNode", void 0), i([P(cc.Node)], e.prototype, "maskStage", void 0), i([P(cc.Prefab)], e.prototype, "propPrefab", void 0), i([w], e) + }(cc.Component); + o.default = k, cc._RF.pop() + }, { + "../../i18n/gd_language": "gd_language", + "../../i18n/i18n": "i18n", + "../../pre/item/prop-prefab": "prop-prefab", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../common/native/audio": "audio", + "../common/sdk": "sdk", + "../manager/DateManager": "DateManager", + "../manager/GameManager": "GameManager", + "../manager/data-manager": "data-manager", + "../manager/report-common": "report-common", + "../utils/uma/uma-sdk": "uma-sdk", + "./chessboard": "chessboard", + "./crushArea": "crushArea", + "./gameLayer": "gameLayer" + } + ], + gd_language: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "82e75ge7rlLCb24BwrY9eZO", "gd_language"), Object.defineProperty(o, "__esModule", { + value: !0 + }), o.GDLanguage = void 0, + function(t) { + t.main_screen = "1", t.leaderboard = "2", t.daily_challenge = "3", t.collect = "4", t.level_1 = "5", t.coin_more = "6", t.claim_level = "7", t.life_more = "8", t.life_countdown = "9", t.life_more_play = "10", t.life_full = "11", t.life_1 = "12", t.unlock_all = "13", t.set_up = "14", t.set_up_sound_effect = "15", t.set_up_music = "16", t.set_up_shock = "17", t.set_up_contact_service = "18", t.set_up_id = "19", t.set_up_share = "20", t.game_version = "21", t.fully = "22", t.upgrade_coin = "23", t.coin_inadequate = "24", t.upgrade = "25", t.daily_play = "26", t.daily_start = "27", t.win_frequency = "28", t.collect_title = "29", t.wallpaper = "30", t.wallpaper_dinner = "31", t.wallpaper_lighthouse = "32", t.wallpaper_lazy_time = "33", t.wallpaper_waiting_alone = "34", t.wallpaper_meteor_shower = "35", t.wallpaper_quiet_night = "36", t.wallpaper_road = "37", t.wallpaper_snow = "38", t.wallpaper_starry = "39", t.wallpaper_commuter_road = "40", t.wallpaper_moon = "41", t.wallpaper_stay_tuned = "42", t.block_bricks = "43", t.block_remove = "44", t.block_cancel = "45", t.block_random = "46", t.props_get = "47", t.props_buy = "48", t.props_free = "49", t.chest_level_treasure = "50", t.chest_journey = "51", t.continue = "52", t.pop_claim = "53", t.playing_continue = "54", t.version_view = "55", t.not_enough_space = "56", t.time_over = "57", t.give_up = "58", t.pop_sure = "59", t.life_lose = "60", t.props_remove_claim = "61", t.draw_back = "62", t.withdraw = "63", t.put_recent = "64", t.props_disrupt = "65", t.shuffle_unused = "66", t.revive_remove = "67", t.challenge_unlocked_level = "68", t.pop_restart = "69", t.pop_quit = "70", t.life_run_out = "71", t.streak_award = "72", t.streak_lose = "73", t.challenge_pass = "74", t.function_1 = "75", t.home_return = "76", t.pop_player = "77", t.life_more_2 = "78", t.full_1 = "79", t.pop_stacked = "80", t.not_unlocked = "81", t.level_new_tomorrow = "82", t.level_inadequate = "83", t.life_inadequate = "84", t.video_see = "85", t.map_over = "86", t.props_remove_inadequate = "87", t.props_cancel_inadequate = "88", t.props_random_inadequate = "89", t.props_random_claim = "90", t.share_fail = "91", t.coin_claim_play = "92", t.life_full_play = "93", t.sprint_level_3 = "94", t.game_continue = "95", t.life_full_already = "96", t.tomorrow_play = "97", t.more_time = "98", t.life_lose_ed = "99", t.lose_cookies = "100", t.resurrection = "101", t.collect_cookie = "102", t.ok_title = "103", t.wallpaper_harbour = "104", t.wallpaper_lamp = "105", t.props_cancel_claim = "106" + }(o.GDLanguage || (o.GDLanguage = {})), cc._RF.pop() + }, {} + ], + getLovePop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "ed619JcknNAHJiwu50VgegD", "getLovePop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../i18n/gd_language"), + c = t("../../i18n/i18n"), + s = t("../common/CcJsFunc"), + l = t("../common/dataTs"), + u = t("../common/util"), + p = t("../utils/uma/uma-sdk"), + d = cc._decorator, + h = d.ccclass, + f = d.property, + m = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.getLoveBtn = null, e.closeBtn = null, e.titleLabel = null, e.getLoveDescLabel = null, e.getLoveTimeLabel = null, e.descLabel = null, e.receiveLabel = null, e.popNode = null, e.showPopData = null, e + } + return a(e, t), e.prototype.start = function() { + s.default.addbtnTouchStartScale(this.getLoveBtn), s.default.addbtnTouchEndScale(this.getLoveBtn, this.getLoveFunc.bind(this)), s.default.addbtnTouchCancelScale(this.getLoveBtn), s.default.addbtnTouchStartScale(this.closeBtn), s.default.addbtnTouchEndScale(this.closeBtn, this.hideGetLovePop.bind(this)), s.default.addbtnTouchCancelScale(this.closeBtn), this.titleLabel.string = c.default.instance.trans(r.GDLanguage.life_more), this.getLoveDescLabel.string = c.default.instance.trans(r.GDLanguage.life_countdown), this.descLabel.string = c.default.instance.trans(r.GDLanguage.life_more_play), this.receiveLabel.string = c.default.instance.trans(r.GDLanguage.life_1) + }, e.prototype.showGetLovePop = function(t) { + this.node.active = !0, this.showPopData = t, console.log("获得爱心弹窗", this.showPopData), cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(); + var e = l.default.updateLoveTime(); + if (0 == e) this.getLoveTimeLabel.string = "play"; + else { + var o = u.default.formatTime(e), + n = o[2] < 10 ? "0" + o[2] : o[2] + "", + a = o[3] < 10 ? "0" + o[3] : o[3] + ""; + this.getLoveTimeLabel.string = n + ":" + a + } + }, e.prototype.getLoveFunc = function() {}, e.prototype.hideGetLovePop = function() { + this.node.active = !1, p.default.trackEvent("life_refuse") + }, i([f(cc.Node)], e.prototype, "getLoveBtn", void 0), i([f(cc.Node)], e.prototype, "closeBtn", void 0), i([f(cc.Label)], e.prototype, "titleLabel", void 0), i([f(cc.Label)], e.prototype, "getLoveDescLabel", void 0), i([f(cc.Label)], e.prototype, "getLoveTimeLabel", void 0), i([f(cc.Label)], e.prototype, "descLabel", void 0), i([f(cc.Label)], e.prototype, "receiveLabel", void 0), i([f(cc.Node)], e.prototype, "popNode", void 0), i([h], e) + }(cc.Component); + o.default = m, cc._RF.pop() + }, { + "../../i18n/gd_language": "gd_language", + "../../i18n/i18n": "i18n", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/util": "util", + "../utils/uma/uma-sdk": "uma-sdk" + } + ], + getPropPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "5d202skrZlNSY1om5DswGw5", "getPropPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../i18n/gd_language"), + c = t("../../i18n/i18n"), + s = t("../common/CcJsFunc"), + l = t("../common/dataTs"), + u = t("../common/enumConfig"), + p = t("../common/sdk"), + d = t("../manager/data-manager"), + h = t("../manager/GameManager"), + f = t("../manager/report-common"), + m = cc._decorator, + g = m.ccclass, + y = m.property, + v = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mask = null, e.closeBtn = null, e.freePropBtn = null, e.popNode = null, e.titleLabel = null, e.descLabel = null, e.buyLabel = null, e.freeLabel = null, e.freeDescLabel = null, e.propImage = null, e.noBlockBtn = null, e.noWhiteBtn = null, e.beginBtn = null, e.freeBtnVideo = null, e.beginBtnVideo = null, e.timeNode = null, e.showPopData = null, e + } + return a(e, t), e.prototype.start = function() { + s.default.addbtnTouchEndScale(this.mask, this.maskBtnFunc.bind(this)), s.default.addbtnTouchStartScale(this.closeBtn), s.default.addbtnTouchEndScale(this.closeBtn, this.closeBtnFunc.bind(this)), s.default.addbtnTouchCancelScale(this.closeBtn), s.default.addbtnTouchStartScale(this.noBlockBtn), s.default.addbtnTouchEndScale(this.noBlockBtn, this.noBlockBtnFunc.bind(this)), s.default.addbtnTouchCancelScale(this.noBlockBtn), s.default.addbtnTouchStartScale(this.noWhiteBtn), s.default.addbtnTouchEndScale(this.noWhiteBtn, this.noWhiteBtnFunc.bind(this)), s.default.addbtnTouchCancelScale(this.noWhiteBtn), s.default.addbtnTouchStartScale(this.freePropBtn), s.default.addbtnTouchEndScale(this.freePropBtn, this.freePropBtnFunc.bind(this)), s.default.addbtnTouchCancelScale(this.freePropBtn), s.default.addbtnTouchStartScale(this.beginBtn), s.default.addbtnTouchEndScale(this.beginBtn, this.beginBtnFunc.bind(this)), s.default.addbtnTouchCancelScale(this.beginBtn) + }, e.prototype.maskBtnFunc = function() { + 4 != this.showPopData.popType && 5 != this.showPopData.popType && (this.node.active = !1) + }, e.prototype.closeBtnFunc = function() { + this.node.active = !1, this.showPopData && this.showPopData.popCallbackCollect && this.showPopData.popCallbackCollect.exitCallBack() + }, e.prototype.noBlockBtnFunc = function() { + this.node.active = !1, 4 == this.showPopData.popType ? cc.game.emit("showPop", { + popName: "failPop", + showPopData: { + popCallbackCollect: null, + failType: 2 + } + }) : 5 == this.showPopData.popType && cc.game.emit(u.EMITKEY.SHOWMAINLAYER) + }, e.prototype.noWhiteBtnFunc = function() { + this.node.active = !1, 4 != this.showPopData.popType && 5 != this.showPopData.popType || cc.game.emit(u.EMITKEY.SHOWMAINLAYER) + }, e.prototype.freePropBtnFunc = function() { + console.log("beginBtnFunc ### unLimitVideo = " + h.default.getInstance().unLimitVideo), 4 == this.showPopData.popType && h.default.getInstance().sheepMark.resurgenceCount >= 1 ? cc.game.emit(u.EMITKEY.SHOWMAINTIPS, "无复活机会") : (this.showPopData && this.showPopData.popCallbackCollect && this.showPopData.popCallbackCollect.freeCallBack(this.showPopData.popType), this.updateWxUI()) + }, e.prototype.beginBtnFunc = function() { + if (console.log("beginBtnFunc ### unLimitVideo = " + h.default.getInstance().unLimitVideo), h.default.getInstance().unLimitVideo) return cc.game.emit(u.EMITKEY.RESTARTNOWLEVEL), f.default.reportTACommon("challenge_again", {}), void(this.node.active = !1); + if (6 == this.showPopData.popType) return this.showPopData && this.showPopData.popCallbackCollect && this.showPopData.popCallbackCollect.freeCallBack(this.showPopData.popType), void(this.node.active = !1); + var t = this, + e = l.default.GetVedioID(); + p.default.watchAdVideo({ + id: e, + success: function() { + cc.game.emit(u.EMITKEY.RESTARTNOWLEVEL), f.default.reportTACommon("challenge_again", {}), t.node.active = !1 + }, + fail: function() { + console.log("失败") + }, + nofit: function() { + t.shareTTAction() + } + }) + }, e.prototype.shareTTAction = function() { + var t = this; + if (p.default.isPlatform(p.Platform.wx)) { + var e = l.default.GetVedioID(), + o = l.default.getUserData().openid; + p.default.share(o, e, function() { + t.shareCbMethod() + }, function() { + cc.game.emit(u.EMITKEY.SHOWMAINTIPS, "分享失败,请分享微信群与好友PK") + }) + } else if (p.default.isPlatform(p.Platform.tt)) { + var n = { + popName: "shareNodePop", + showPopData: { + type: 2, + shareCb: this.shareCbMethod.bind(this) + } + }; + cc.game.emit("showPop", n) + } + }, e.prototype.shareCbMethod = function() { + console.log("分享成功 ######"), cc.game.emit(u.EMITKEY.RESTARTNOWLEVEL), f.default.reportTACommon("challenge_again_share", {}), this.node.active = !1 + }, e.prototype.showGetPropPop = function(t) { + this.node.active = !0, this.showPopData = t, this.noBlockBtn.active = !1, this.noWhiteBtn.active = !0, this.closeBtn.active = !0, this.freePropBtn.active = !0, this.beginBtn.active = !1, this.beginBtnVideo.active = !0, this.noWhiteBtn.getChildByName("label").getComponent(cc.Label).string = "不,谢谢", cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(); + var e = t.popType, + o = "", + n = "", + a = "Buy props"; + if (this.freeLabel.string = "获得", this.updateWxUI(), 1 == e) o = "rewardIcon/prop_remove.png", a = "移出道具", n = c.default.instance.trans(r.GDLanguage.draw_back), (i = 1 - h.default.getInstance().sheepMark.propRemoveCount) < 0 && (i = 0), this.freeDescLabel.string = "(" + i + "/1)"; + else if (2 == e) o = "rewardIcon/prop_cancel.png", a = "撤回道具", n = c.default.instance.trans(r.GDLanguage.put_recent), (i = 1 - h.default.getInstance().sheepMark.propCancelCount) < 0 && (i = 0), this.freeDescLabel.string = "(" + i + "/1)"; + else if (3 == e) o = "rewardIcon/prop_random.png", a = "洗牌道具", n = c.default.instance.trans(r.GDLanguage.shuffle_unused), (i = 1 - h.default.getInstance().sheepMark.propRandomCount) < 0 && (i = 0), this.freeDescLabel.string = "(" + i + "/1)"; + else if (4 == e) { + var i; + o = "rewardIcon/prop_life_remove.png", a = "复活吗?", n = "复活并使用移出道具", this.noBlockBtn.active = !0, this.noWhiteBtn.active = !1, this.closeBtn.active = !1, this.freeLabel.string = "复活", console.log(h.default.getInstance().sheepMark.resurgenceCount), (i = 1 - h.default.getInstance().sheepMark.resurgenceCount) < 0 && (i = 0), this.freeDescLabel.string = "(" + i + "/1)" + } else 5 == e ? (a = "再次挑战", this.closeBtn.active = !1, this.freeDescLabel.string = "", this.freeLabel.string = "重新挑战", this.noWhiteBtn.getChildByName("label").getComponent(cc.Label).string = "返回羊群", n = "观看视频,以获得1次\n额外的挑战机会。", o = "rewardIcon/prop_life_one.png", this.freePropBtn.active = !1, this.beginBtn.active = !0, h.default.getInstance().unLimitVideo ? (this.beginBtnVideo.active = !1, n = "已获得无限次数挑战\n赶紧试试吧", o = "rewardIcon/prop_nolimit.png") : this.beginBtnVideo.active = !0) : 6 == e && (a = "再次挑战", this.freeDescLabel.string = "", this.freeLabel.string = "挑战一次", this.noWhiteBtn.getChildByName("label").getComponent(cc.Label).string = "不,谢谢", n = "观看视频,以获得1次\n额外的挑战机会。", o = "rewardIcon/prop_life_one.png", this.freePropBtn.active = !1, this.beginBtn.active = !0); + s.default.changeSpriteFrame(this.propImage, o), this.descLabel.string = n, this.titleLabel.string = a + }, e.prototype.updateWxUI = function() { + var t = this.showPopData.popType; + if (l.default.isPlatform(l.GDPlatform.wx)) { + var e = d.default.getPropData(); + console.log("propData = ", e); + var o = 0; + h.default.getInstance().gameType == u.GAMETYPE.GAMEDAILY ? 1 == t ? o = e.daily.prop_remove : 2 == t ? o = e.daily.prop_cancel : 3 == t && (o = e.daily.prop_random) : h.default.getInstance().gameType == u.GAMETYPE.GAMETOPIC && (1 == t ? o = e.topic.prop_remove : 2 == t ? o = e.topic.prop_cancel : 3 == t && (o = e.topic.prop_random)), o > 0 ? s.default.changeSpriteFrame(this.freeBtnVideo, "rewardIcon/reward_share_black.png") : "shareValue" == p.default.wxValue ? s.default.changeSpriteFrame(this.freeBtnVideo, "rewardIcon/reward_share_black.png") : s.default.changeSpriteFrame(this.freeBtnVideo, "rewardIcon/reward_video_block.png"), d.default.setPropData(e) + } + }, i([y(cc.Node)], e.prototype, "mask", void 0), i([y(cc.Node)], e.prototype, "closeBtn", void 0), i([y(cc.Node)], e.prototype, "freePropBtn", void 0), i([y(cc.Node)], e.prototype, "popNode", void 0), i([y(cc.Label)], e.prototype, "titleLabel", void 0), i([y(cc.Label)], e.prototype, "descLabel", void 0), i([y(cc.Label)], e.prototype, "buyLabel", void 0), i([y(cc.Label)], e.prototype, "freeLabel", void 0), i([y(cc.Label)], e.prototype, "freeDescLabel", void 0), i([y(cc.Node)], e.prototype, "propImage", void 0), i([y(cc.Node)], e.prototype, "noBlockBtn", void 0), i([y(cc.Node)], e.prototype, "noWhiteBtn", void 0), i([y(cc.Node)], e.prototype, "beginBtn", void 0), i([y(cc.Node)], e.prototype, "freeBtnVideo", void 0), i([y(cc.Node)], e.prototype, "beginBtnVideo", void 0), i([y(cc.Node)], e.prototype, "timeNode", void 0), i([g], e) + }(cc.Component); + o.default = v, cc._RF.pop() + }, { + "../../i18n/gd_language": "gd_language", + "../../i18n/i18n": "i18n", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../common/sdk": "sdk", + "../manager/GameManager": "GameManager", + "../manager/data-manager": "data-manager", + "../manager/report-common": "report-common" + } + ], + giftLayerAnimate: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "fb227UOAFRM+a9fREJ/Svyr", "giftLayerAnimate"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../i18n/gd_language"), + c = t("../../i18n/i18n"), + s = t("../../pre/itemSub/brickSubPrefab"), + l = t("../../pre/itemSub/wallpaperSubPrefab"), + u = t("../../pre/main/rewardPrefab"), + p = t("../common/CcJsFunc"), + d = t("../common/dataTs"), + h = t("../common/native/audio"), + f = t("../common/spine"), + m = cc._decorator, + g = m.ccclass, + y = m.property, + v = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.maskNode = null, e.lightBg = null, e.titleNode = null, e.gift1Node = null, e.gift2Node = null, e.getBtn = null, e.getBtnLabel = null, e.giftBg = null, e.rewardPrefab = null, e.brickSubPrefab = null, e.wallpaperSubPrefab = null, e.rewardNodeArray = [], e.rewardData = null, e.collectionItem = null, e.ribbonBoxData = null, e.btnCb = null, e.collectionCb = null, e.ribbonCb = null, e + } + return a(e, t), e.prototype.start = function() { + p.default.addbtnTouchStartScale(this.getBtn), p.default.addbtnTouchEndScale(this.getBtn, this.btnEndFunc.bind(this)), p.default.addbtnTouchCancelScale(this.getBtn), this.getBtnLabel.string = c.default.instance.trans(r.GDLanguage.pop_claim) + }, e.prototype.showRewardLayer = function(t, e, o, n, a, i) { + if (this.rewardData = t, this.collectionItem = e, this.ribbonBoxData = o, this.node.active = !0, this.titleNode.active = !1, this.gift1Node.active = !1, this.giftBg.active = !1, this.lightBg.active = !1, this.getBtn.scale = 0, this.rewardNodeArray = [], this.btnCb = n, this.collectionCb = a, this.ribbonCb = i, t) { + console.log("金币奖励", JSON.stringify(t)); + for (var r = 0; r < 2; r++)(g = cc.instantiate(this.rewardPrefab)).x = 0, g.y = 0, g.scale = 0, g.getComponent(u.default).setRewardNode(this.rewardData[r]), this.rewardNodeArray.push(g), this.node.addChild(g); + this.playGift1Anim() + } else if (e) { + console.log("收藏奖励"); + var c = e.wallpaper, + p = e.brick, + h = d.default.getPictureData(); + if (c > 0) { + var f = cc.instantiate(this.wallpaperSubPrefab); + f.x = 0, f.y = 0, f.scale = 0, f.getComponent(l.default).rewardNodeData(h.bgNum), this.rewardNodeArray.push(f), this.node.addChild(f) + } + if (p > 0) { + var m = cc.instantiate(this.brickSubPrefab); + m.x = 0, m.y = 0, m.scale = 0, m.getComponent(s.default).rewardNodeData(h.brickNum), this.rewardNodeArray.push(m), this.node.addChild(m) + } + this.playGift2Anim() + } else if (o) { + for (console.log("Ribbon奖励", JSON.stringify(o)), r = 0; r < o.length; r++) { + var g; + (g = cc.instantiate(this.rewardPrefab)).x = 0, g.y = 0, g.scale = 0, g.getComponent(u.default).setRewardNode(o[r]), this.rewardNodeArray.push(g), this.node.addChild(g) + } + this.playGift3Anim() + } else console.log("暂无奖励") + }, e.prototype.playGift1Anim = function() { + var t = this; + t.gift1Node.active = !0, t.gift1Node.getComponent(f.default).setFrameEventCb("Open1", function() { + h.default.playAudioMusic("audio/sound/Open1.mp3", !1) + }), t.gift1Node.getComponent(f.default).setFrameEventCb("Eff_Sheen1", function() { + t.titleNode.active = !0, h.default.playAudioMusic("audio/sound/Words1.mp3", !1), t.titleNode.getComponent(f.default).play("Award1_Words1", 1), cc.tween(t.giftBg).to(.3, { + scale: 1.5 + }).call(function() { + cc.tween(t.giftBg).by(40, { + angle: 360 + }).repeatForever().start() + }, t).start() + }), t.gift1Node.getComponent(f.default).setFrameEventCb("Treasure1", function() { + t.giftBg.active = !0, cc.tween(t.giftBg).by(40, { + angle: 360 + }).repeatForever().start(), t.playRewardNode() + }), t.gift1Node.getComponent(f.default).play("Ref1_Open1", 1) + }, e.prototype.playGift2Anim = function() { + var t = this; + this.gift1Node.active = !0, this.gift1Node.getComponent(f.default).setFrameEventCb("Open1", function() { + console.log("1"), h.default.playAudioMusic("audio/sound/Open1.mp3", !1) + }), this.gift1Node.getComponent(f.default).setFrameEventCb("Eff_Sheen1", function() { + t.titleNode.active = !0, h.default.playAudioMusic("audio/sound/Words2.mp3", !1), t.titleNode.getComponent(f.default).play("Award1_Words4", 1), cc.tween(t.lightBg).to(.3, { + scale: 1.5 + }).call(function() { + cc.tween(t.lightBg).by(40, { + angle: 360 + }).repeatForever().start() + }, t).start() + }), this.gift1Node.getComponent(f.default).setFrameEventCb("Treasure1", function() { + console.log("3"), t.lightBg.active = !0, cc.tween(t.lightBg).by(40, { + angle: 360 + }).repeatForever().start(), t.playCollectionNode() + }), this.gift1Node.getComponent(f.default).play("Ref1_Open2", 1, function() { + console.log("4") + }) + }, e.prototype.playGift3Anim = function() { + var t = this; + this.gift1Node.active = !0, this.gift1Node.getComponent(f.default).setFrameEventCb("Open1", function() { + console.log("1"), h.default.playAudioMusic("audio/sound/Open1.mp3", !1) + }), this.gift1Node.getComponent(f.default).setFrameEventCb("Eff_Sheen1", function() { + t.titleNode.active = !0, h.default.playAudioMusic("audio/sound/Words1.mp3", !1), t.titleNode.getComponent(f.default).play("Award1_Words1", 1), cc.tween(t.lightBg).to(.3, { + scale: 1.5 + }).call(function() { + cc.tween(t.lightBg).by(40, { + angle: 360 + }).repeatForever().start() + }, t).start() + }), this.gift1Node.getComponent(f.default).setFrameEventCb("Treasure1", function() { + console.log("3"), t.lightBg.active = !0, cc.tween(t.lightBg).by(40, { + angle: 360 + }).repeatForever().start(), t.playRibbonAnimationNode() + }), this.gift1Node.getComponent(f.default).play("Ref1_Open5", 1, function() { + console.log("4") + }) + }, e.prototype.btnEndFunc = function() { + this.getBtn.stopAllActions(); + for (var t = 0; t < this.rewardNodeArray.length; t++) this.rewardNodeArray[t].destroy(); + this.rewardNodeArray = [], this.node.active = !1, !this.btnCb || this.collectionItem || this.ribbonBoxData ? this.collectionItem ? (this.collectionCb && this.collectionCb(), console.log("collectionCb")) : this.ribbonBoxData ? (this.ribbonCb && this.ribbonCb(), console.log("ribbonCb")) : console.log("else") : (console.log("btnCb"), this.btnCb()) + }, e.prototype.playAnimationFloat = function(t, e) { + var o = this; + cc.tween(t).by(1, { + y: e + }).call(function() { + o.playAnimationFloat(t, -e) + }).start() + }, e.prototype.playRewardNode = function() { + var t = this; + cc.tween(this.rewardNodeArray[0]).to(.1, { + scale: 1.4, + x: -150 + }).to(.1, { + scale: 1 + }).to(.1, { + scale: 1.2 + }).to(.1, { + scale: 1 + }).start(), cc.tween(this.rewardNodeArray[1]).delay(.1).to(.1, { + scale: 1.4, + x: 150 + }).to(.1, { + scale: 1 + }).call(function() { + cc.tween(t.getBtn).to(.1, { + scale: 1.3 + }).to(.1, { + scale: 1 + }).start() + }, this).to(.1, { + scale: 1.2 + }).to(.1, { + scale: 1 + }).start() + }, e.prototype.playCollectionNode = function() { + var t = this; + this.collectionItem.wallpaper > 0 && cc.tween(this.rewardNodeArray[0]).to(.1, { + scale: 1.4, + y: 200 + }).to(.1, { + scale: 1 + }).to(.1, { + scale: 1.2 + }).to(.1, { + scale: 1 + }).call(function() { + t.playAnimationFloat(t.rewardNodeArray[0], 10), cc.tween(t.getBtn).to(.1, { + scale: 1.3 + }).to(.1, { + scale: 1 + }).start() + }).start(), this.collectionItem.brick > 0 && cc.tween(this.rewardNodeArray[0]).to(.1, { + scale: 1.4, + y: 200 + }).to(.1, { + scale: 1 + }).to(.1, { + scale: 1.2 + }).to(.1, { + scale: 1 + }).call(function() { + t.playAnimationFloat(t.rewardNodeArray[0], 10), cc.tween(t.getBtn).to(.1, { + scale: 1.3 + }).to(.1, { + scale: 1 + }).start() + }).start() + }, e.prototype.playRibbonAnimationNode = function() { + var t = this; + if (console.log(this.rewardNodeArray.length), this.rewardNodeArray.length >= 4) + for (var e = function(e) { + cc.tween(o.rewardNodeArray[e]).delay(.1).to(.1, { + scale: 1, + x: e % 2 * 240 - 120, + y: 250 + -200 * Math.floor(e / 2) + }).to(.1, { + scale: .8 + }).to(.1, { + scale: 1 + }).to(.1, { + scale: .8 + }).call(function() { + t.playAnimationFloat(t.rewardNodeArray[e], 10), cc.tween(t.getBtn).to(.1, { + scale: 1.3 + }).to(.1, { + scale: 1 + }).start() + }).start() + }, o = this, n = 0; n < this.rewardNodeArray.length; n++) e(n); + else 1 == this.rewardNodeArray.length && cc.tween(this.rewardNodeArray[0]).to(.1, { + scale: 1.4, + y: 200 + }).to(.1, { + scale: 1 + }).to(.1, { + scale: 1.2 + }).to(.1, { + scale: 1 + }).call(function() { + t.playAnimationFloat(t.rewardNodeArray[0], 10), cc.tween(t.getBtn).to(.1, { + scale: 1.3 + }).to(.1, { + scale: 1 + }).start() + }).start() + }, i([y(cc.Node)], e.prototype, "maskNode", void 0), i([y(cc.Node)], e.prototype, "lightBg", void 0), i([y(cc.Node)], e.prototype, "titleNode", void 0), i([y(cc.Node)], e.prototype, "gift1Node", void 0), i([y(cc.Node)], e.prototype, "gift2Node", void 0), i([y(cc.Node)], e.prototype, "getBtn", void 0), i([y(cc.Label)], e.prototype, "getBtnLabel", void 0), i([y(cc.Node)], e.prototype, "giftBg", void 0), i([y(cc.Prefab)], e.prototype, "rewardPrefab", void 0), i([y(cc.Prefab)], e.prototype, "brickSubPrefab", void 0), i([y(cc.Prefab)], e.prototype, "wallpaperSubPrefab", void 0), i([g], e) + }(cc.Component); + o.default = v, cc._RF.pop() + }, { + "../../i18n/gd_language": "gd_language", + "../../i18n/i18n": "i18n", + "../../pre/itemSub/brickSubPrefab": "brickSubPrefab", + "../../pre/itemSub/wallpaperSubPrefab": "wallpaperSubPrefab", + "../../pre/main/rewardPrefab": "rewardPrefab", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/native/audio": "audio", + "../common/spine": "spine" + } + ], + houseLayer: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "cba24z/7chDBLdHt1z34v1a", "houseLayer"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = t("../common/enumConfig"), + u = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mainCultivateLayer = null, e.wardrobeLayer = null, e.touchStartPoint = null, e.pointLength = 0, e.scaleCoef = .05 * .05, e.touchNum = 0, e.maxScale = 1, e.moveBigScale = 1.5, e.disLength = 50, e.oldPosit = null, e.oldScale = 1, e.changeClothes = null, e + } + return a(e, t), e.prototype.start = function() { + this.node.on("touchstart", this.touchStartFunc, this), this.node.on("touchmove", this.touchMoveFunc, this), this.node.on("touchend", this.touchEndFunc, this), this.node.on("touchcancel", this.touchCancelFunc, this), this.changeClothes = this.wardrobeLayer.getChildByName("changeClothes") + }, e.prototype.moveWithRoomId = function(t) { + var e = this.node.width * this.node.scale / 2 - cc.winSize.width / 2, + o = 0; + t == l.ROOMTYPE.ROOMONE ? o = 0 : t == l.ROOMTYPE.ROOMTWO ? o = -e : t == l.ROOMTYPE.ROOMTHREE && (o = e), cc.tween(this.node).to(.3, { + x: o, + y: 0 + }).start() + }, e.prototype.toBigMiddle = function(t) { + this.oldPosit = this.node.position, this.oldScale = this.node.scale; + var e = t.convertToWorldSpaceAR(cc.v2(0, 0)), + o = cc.winSize.width / 2 - e.x, + n = cc.winSize.height / 2 - this.disLength - e.y, + a = (this.node.x + o) * this.moveBigScale, + i = (this.node.y + n) * this.moveBigScale; + cc.tween(this.node).to(.3, { + x: a, + y: i, + scale: this.moveBigScale + }, { + easing: cc.easing.cubicOut + }).start() + }, e.prototype.toMinDefault = function() { + this.oldPosit && cc.tween(this.node).to(.2, { + x: this.oldPosit.x, + y: this.oldPosit.y, + scale: this.oldScale + }).start(), this.oldPosit = null + }, e.prototype.touchStartFunc = function(t) { + var e = t.getLocation(); + this.touchStartPoint = e, this.pointLength = 0, this.touchNum++ + }, e.prototype.touchMoveFunc = function(t) { + if (this.changeClothes.activeInHierarchy) console.log("changeClothes 存在不走滑动逻辑"); + else if (1 == t.getTouches().length) this.moveActionFunc(t.getLocation()), this.touchStartPoint = t.getLocation(); + else if (2 == t.getTouches().length) { + this.touchStartPoint = t.getLocation(); + var e = t.getTouches()[0].getLocation(), + o = t.getTouches()[1].getLocation(); + if (0 == this.pointLength) this.pointLength = e.sub(o).mag(); + else { + var n = e.sub(o).mag(), + a = n - this.pointLength, + i = Math.abs(a); + 0 != a && i > 1 && (this.scaleNode(a), this.pointLength = n) + } + } + }, e.prototype.touchEndFunc = function() { + this.touchNum--, this.pointLength = 0 + }, e.prototype.touchCancelFunc = function() { + this.touchNum-- + }, e.prototype.scaleNode = function(t) { + var e = null; + if (t > 0) { + var o = this.maxScale; + this.node.scale < o && (e = (e = this.node.scale + this.scaleCoef * t) > o ? o : e) + } else { + var n = 1; + this.node.x < 0 && (n = -1); + var a = this.node.width * this.node.scale / 2; + a < Math.abs(this.node.x) + cc.winSize.width / 2 && (this.node.x = n * (a - cc.winSize.width / 2)); + var i = 1; + this.node.y < 0 && (i = -1); + var r = this.node.height * this.node.scale / 2; + r < Math.abs(this.node.y) + cc.winSize.height / 2 && (this.node.y = i * (r - cc.winSize.height / 2)), this.node.scale > 1 && (e = (e = this.node.scale + this.scaleCoef * t) < 1 ? 1 : e) + } + null != e && (this.node.scale = e) + }, e.prototype.moveActionFunc = function(t) { + var e = t.x - this.touchStartPoint.x, + o = t.y - this.touchStartPoint.y; + this.node.x = this.node.x + e, this.node.y = this.node.y + o; + var n = this.node.width * this.node.scale / 2 - cc.winSize.width / 2, + a = this.node.height * this.node.scale / 2 - cc.winSize.height / 2; + this.node.x < -n && (this.node.x = -n), this.node.x > n && (this.node.x = n), this.node.y < -a && (this.node.y = -a), this.node.y > a && (this.node.y = a) + }, i([s(cc.Node)], e.prototype, "mainCultivateLayer", void 0), i([s(cc.Node)], e.prototype, "wardrobeLayer", void 0), i([c], e) + }(cc.Component); + o.default = u, cc._RF.pop() + }, { + "../common/enumConfig": "enumConfig" + } + ], + http: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "0c9d6/yg2FJlZ/64VA6Vfe9", "http"); + var n = this && this.__assign || function() { + return (n = Object.assign || function(t) { + for (var e, o = 1, n = arguments.length; o < n; o++) + for (var a in e = arguments[o]) Object.prototype.hasOwnProperty.call(e, a) && (t[a] = e[a]); + return t + }).apply(this, arguments) + }, + a = this && this.__awaiter || function(t, e, o, n) { + return new(o || (o = Promise))(function(a, i) { + function r(t) { + try { + s(n.next(t)) + } catch (e) { + i(e) + } + } + + function c(t) { + try { + s(n.throw(t)) + } catch (e) { + i(e) + } + } + + function s(t) { + var e; + t.done ? a(t.value) : (e = t.value, e instanceof o ? e : new o(function(t) { + t(e) + })).then(r, c) + } + s((n = n.apply(t, e || [])).next()) + }) + }, + i = this && this.__generator || function(t, e) { + var o, n, a, i, r = { + label: 0, + sent: function() { + if (1 & a[0]) throw a[1]; + return a[1] + }, + trys: [], + ops: [] + }; + return i = { + next: c(0), + throw :c(1), + return :c(2) + }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { + return this + }), i; + + function c(t) { + return function(e) { + return s([t, e]) + } + } + + function s(i) { + if (o) throw new TypeError("Generator is already executing."); + for (; r;) try { + if (o = 1, n && (a = 2 & i[0] ? n.return : i[0] ? n.throw || ((a = n.return) && a.call(n), 0) : n.next) && !(a = a.call(n, i[1])).done) return a; + switch (n = 0, a && (i = [2 & i[0], a.value]), i[0]) { + case 0: + case 1: + a = i; + break; + case 4: + return r.label++, { + value: i[1], + done: !1 + }; + case 5: + r.label++, n = i[1], i = [0]; + continue; + case 7: + i = r.ops.pop(), r.trys.pop(); + continue; + default: + if (!(a = (a = r.trys).length > 0 && a[a.length - 1]) && (6 === i[0] || 2 === i[0])) { + r = 0; + continue + } + if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { + r.label = i[1]; + break + } + if (6 === i[0] && r.label < a[1]) { + r.label = a[1], a = i; + break + } + if (a && r.label < a[2]) { + r.label = a[2], r.ops.push(i); + break + } + a[2] && r.ops.pop(), r.trys.pop(); + continue + } + i = e.call(t, r) + } catch (c) { + i = [6, c], n = 0 + } finally { + o = a = 0 + } + if (5 & i[0]) throw i[1]; + return { + value: i[0] ? i[1] : void 0, + done: !0 + } + } + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }), o.Method = void 0; + var r, c = t("query-string"); + (function(t) { + t.OPTIONS = "OPTIONS", t.GET = "GET", t.HEAD = "HEAD", t.POST = "POST", t.PUT = "PUT", t.DELETE = "DELETE", t.TRACE = "TRACE", t.CONNECT = "CONNECT" + })(r = o.Method || (o.Method = {})); + var s = function() { + function t() {} + return t.requestBefore = function(t) { + this.requestBeforeFunc = t + }, t.queryString = function(t) { + var e = "?", + o = !1; + for (var n in t) o ? e += "&" : o = !0, e += n + "=" + t[n]; + return e + }, t.get = function(t) { + return a(this, void 0, Promise, function() { + var e, o, n, a, c, s; + return i(this, function(i) { + switch (i.label) { + case 0: + return e = t.host, o = t.url, n = t.params, a = t.baseParams, c = t.header, s = { + method: r.GET, + url: e + o, + params: n, + baseParams: a, + header: c, + success: t.success, + fail: t.fail + }, [4, this.requestSync(s)]; + case 1: + return [2, i.sent()] + } + }) + }) + }, t.post = function(t) { + return a(this, void 0, Promise, function() { + var e, o, n, a, c, s, l, u, p, d, h; + return i(this, function(i) { + switch (i.label) { + case 0: + if (e = t.host, o = t.url, n = t.params, a = t.baseParams, c = t.data, s = t.header, l = t.type, u = {}, "file" == l) { + for (d in p = new FormData, c) p.append(d, c[d]); + u = p + } else u = c; + return h = { + method: r.POST, + url: e + o, + data: u, + params: n, + baseParams: a, + header: s, + type: l, + success: t.success, + fail: t.fail + }, [4, this.requestSync(h)]; + case 1: + return [2, i.sent()] + } + }) + }) + }, t.wxRequest = function(t) { + wx.request({ + url: t.url + this.queryString(t.params), + data: t.data, + method: t.method, + header: n({}, t.header), + success: function(e) { + t.success && t.success(e.data) + }, + fail: function(e) { + t.fail && t.fail(e) + } + }) + }, t.h5Request = function(t) { + var e = t.success, + o = t.fail, + a = t.type, + i = t.contentType || t.header["Content-type"] || ""; + try { + var r = t.method, + s = "", + l = null, + u = n(n({}, t.baseParams), t.params); + "POST" === r ? "file" == a ? (s = t.url + this.queryString(u), l = t.data) : (s = t.url + this.queryString(u), "" == i && (i = "application/x-www-form-urlencoded"), l = c.stringify(t.data)) : s = t.url + this.queryString(n(n({}, t.data), u)); + var p = t.timeout || 0, + d = new XMLHttpRequest; + p > 0 && (d.timeout = p), d.onreadystatechange = function() { + if (4 == d.readyState) + if (d.status >= 200 && d.status < 400) { + var t = {}, + n = ""; + try { + t = JSON.parse(d.responseText) + } catch (a) { + n = a + } + "" == n ? e && e(t) : o && o(n) + } else o && o("status: " + d.status) + }, d.open(r, s, !0), i && d.setRequestHeader("Content-Type", i), d.send(l), d.ontimeout = function() { + o && o("request timeout"), console.log("%c>> %c连接超时 %c<<", "color:red", "color:purple", "color:red") + }, d.onerror = function(t) { + console.warn("request error", t), o && o(t) + } + } catch (h) { + console.warn("request err", h), o && o(h) + } + }, t.request = function(t) { + this.requestBeforeFunc && (t = this.requestBeforeFunc(t)), t.header = t.header ? n(n({}, t.baseParams), t.header) : t.baseParams, cc.sys.platform == cc.sys.WECHAT_GAME ? this.wxRequest(t) : this.h5Request(t) + }, t.requestSync = function(t) { + var e = this; + return new Promise(function(o, a) { + var i = t.success, + r = t.fail; + try { + e.request(n(n({}, t), { + success: function(t) { + i && i(t), o(t) + }, + fail: function(t) { + r && r(t), a(t) + } + })) + } catch (c) { + r && r(c), a(c) + } + }) + }, t.requestBeforeFunc = null, t + }(); + o.default = s, cc._RF.pop() + }, { + "query-string": 3 + } + ], + i18n: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "1f5a5kEJdNJPatq/K4Gvl0i", "i18n"); + var n = this && this.__awaiter || function(t, e, o, n) { + return new(o || (o = Promise))(function(a, i) { + function r(t) { + try { + s(n.next(t)) + } catch (e) { + i(e) + } + } + + function c(t) { + try { + s(n.throw(t)) + } catch (e) { + i(e) + } + } + + function s(t) { + var e; + t.done ? a(t.value) : (e = t.value, e instanceof o ? e : new o(function(t) { + t(e) + })).then(r, c) + } + s((n = n.apply(t, e || [])).next()) + }) + }, + a = this && this.__generator || function(t, e) { + var o, n, a, i, r = { + label: 0, + sent: function() { + if (1 & a[0]) throw a[1]; + return a[1] + }, + trys: [], + ops: [] + }; + return i = { + next: c(0), + throw :c(1), + return :c(2) + }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { + return this + }), i; + + function c(t) { + return function(e) { + return s([t, e]) + } + } + + function s(i) { + if (o) throw new TypeError("Generator is already executing."); + for (; r;) try { + if (o = 1, n && (a = 2 & i[0] ? n.return : i[0] ? n.throw || ((a = n.return) && a.call(n), 0) : n.next) && !(a = a.call(n, i[1])).done) return a; + switch (n = 0, a && (i = [2 & i[0], a.value]), i[0]) { + case 0: + case 1: + a = i; + break; + case 4: + return r.label++, { + value: i[1], + done: !1 + }; + case 5: + r.label++, n = i[1], i = [0]; + continue; + case 7: + i = r.ops.pop(), r.trys.pop(); + continue; + default: + if (!(a = (a = r.trys).length > 0 && a[a.length - 1]) && (6 === i[0] || 2 === i[0])) { + r = 0; + continue + } + if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { + r.label = i[1]; + break + } + if (6 === i[0] && r.label < a[1]) { + r.label = a[1], a = i; + break + } + if (a && r.label < a[2]) { + r.label = a[2], r.ops.push(i); + break + } + a[2] && r.ops.pop(), r.trys.pop(); + continue + } + i = e.call(t, r) + } catch (c) { + i = [6, c], n = 0 + } finally { + o = a = 0 + } + if (5 & i[0]) throw i[1]; + return { + value: i[0] ? i[1] : void 0, + done: !0 + } + } + }, + i = this && this.__spreadArrays || function() { + for (var t = 0, e = 0, o = arguments.length; e < o; e++) t += arguments[e].length; + var n = Array(t), + a = 0; + for (e = 0; e < o; e++) + for (var i = arguments[e], r = 0, c = i.length; r < c; r++, a++) n[a] = i[r]; + return n + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../script/common/dataTs"), + c = t("../script/common/enumConfig"), + s = t("../script/tools/str-utils"), + l = ["en", "id", "zh", "ar", "hi", "sp", "ru"], + u = [], + p = function() { + function t() { + this._landCodeDefault = c.LangEnum.zhCN, this._langMap = null, this._langCode = c.LangEnum.zhCN + } + return Object.defineProperty(t, "instance", { + get: function() { + return this._instance || (this._instance = new t), this._instance + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(t.prototype, "langCode", { + get: function() { + return this._langCode + }, + enumerable: !1, + configurable: !0 + }), t.prototype.getLanguageCode = function() { + var t = cc.sys.languageCode.toLowerCase(); + if (console.log("当前系统语言码:", t), t && 0 != t.length || (t = this._landCodeDefault), t = t.toLowerCase().replace("-", "_"), u.indexOf(t) > -1) this._langCode = t; + else { + var e = t.indexOf("_"); + if (e > 0) { + var o = t.substring(0, e); + l.indexOf(o) > -1 && (this._langCode = o) + } else this._langCode = t + } + console.log("实际使用语言码:", this._langCode), r.default.langCode = this._langCode, this._langMap = {} + }, t.prototype.init = function() { + return n(this, void 0, Promise, function() { + var t = this; + return a(this, function() { + return this.getLanguageCode(), [2, new Promise(function(e) { + cc.assetManager.loadBundle(cc.resources.name, function(o, n) { + o || n.load("data/gd_language", cc.JsonAsset, function(o, a) { + if (!o) { + var i = a.json; + for (var r in i) { + var c = i[r]; + t._langMap[r] = c[t.langCode] && c[t.langCode].length > 0 ? c[t.langCode] : c[t._landCodeDefault] + } + n.release("data/gd_language", cc.JsonAsset), e() + } + }) + }) + })] + }) + }) + }, t.prototype.trans = function(t) { + for (var e = [], o = 1; o < arguments.length; o++) e[o - 1] = arguments[o]; + var n = this._langMap[t]; + if (n) return s.default.formatStr.apply(s.default, i([n], e)); + console.error("!!!错误翻译键值:", t) + }, t._instance = null, t + }(); + o.default = p, cc._RF.pop() + }, { + "../script/common/dataTs": "dataTs", + "../script/common/enumConfig": "enumConfig", + "../script/tools/str-utils": "str-utils" + } + ], + "key-map": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "197c5Ibx59IfbkkbvaEx9/i", "key-map"); + var n = this && this.__awaiter || function(t, e, o, n) { + return new(o || (o = Promise))(function(a, i) { + function r(t) { + try { + s(n.next(t)) + } catch (e) { + i(e) + } + } + + function c(t) { + try { + s(n.throw(t)) + } catch (e) { + i(e) + } + } + + function s(t) { + var e; + t.done ? a(t.value) : (e = t.value, e instanceof o ? e : new o(function(t) { + t(e) + })).then(r, c) + } + s((n = n.apply(t, e || [])).next()) + }) + }, + a = this && this.__generator || function(t, e) { + var o, n, a, i, r = { + label: 0, + sent: function() { + if (1 & a[0]) throw a[1]; + return a[1] + }, + trys: [], + ops: [] + }; + return i = { + next: c(0), + throw :c(1), + return :c(2) + }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { + return this + }), i; + + function c(t) { + return function(e) { + return s([t, e]) + } + } + + function s(i) { + if (o) throw new TypeError("Generator is already executing."); + for (; r;) try { + if (o = 1, n && (a = 2 & i[0] ? n.return : i[0] ? n.throw || ((a = n.return) && a.call(n), 0) : n.next) && !(a = a.call(n, i[1])).done) return a; + switch (n = 0, a && (i = [2 & i[0], a.value]), i[0]) { + case 0: + case 1: + a = i; + break; + case 4: + return r.label++, { + value: i[1], + done: !1 + }; + case 5: + r.label++, n = i[1], i = [0]; + continue; + case 7: + i = r.ops.pop(), r.trys.pop(); + continue; + default: + if (!(a = (a = r.trys).length > 0 && a[a.length - 1]) && (6 === i[0] || 2 === i[0])) { + r = 0; + continue + } + if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { + r.label = i[1]; + break + } + if (6 === i[0] && r.label < a[1]) { + r.label = a[1], a = i; + break + } + if (a && r.label < a[2]) { + r.label = a[2], r.ops.push(i); + break + } + a[2] && r.ops.pop(), r.trys.pop(); + continue + } + i = e.call(t, r) + } catch (c) { + i = [6, c], n = 0 + } finally { + o = a = 0 + } + if (5 & i[0]) throw i[1]; + return { + value: i[0] ? i[1] : void 0, + done: !0 + } + } + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var i = function() { + function t() {} + return t.onKeyDown = function(t, e, o) { + var n = "" + this.getCharCode(t); + this.downList[n] || (this.downList[n] = []), o && (e = e.bind(o)), this.downList[n].push(e) + }, t.onKeyUp = function(t, e, o) { + var n = "" + this.getCharCode(t); + this.upList[n] || (this.upList[n] = []), o && (e = e.bind(o)), this.upList[n].push(e) + }, t.onKeyDownWithMeta = function(t, e) { + var o = this.getCharCode(t), + n = "meta"; + cc.sys.os == cc.sys.OS_WINDOWS && (n = "ctrl"); + var a = o + "+" + n; + this.downList[a] || (this.downList[a] = []), this.downList[a].push(e) + }, t.onKeyDownWithCtrl = function(t, e) { + var o = this.getCharCode(t) + "+ctrl"; + this.downList[o] || (this.downList[o] = []), this.downList[o].push(e) + }, t.keyDown = function(t) { + var e = t.keyCode; + this.funcKey(e, !0); + var o = "" + e; + this.isMetaDown && (o = e + "+meta"), this.isCtrlDown && (o = e + "+ctrl"), this.downList[o] && this.downList[o].forEach(function(t) { + t && t() + }) + }, t.keyUp = function(t) { + return n(this, void 0, Promise, function() { + var e, o; + return a(this, function() { + return e = t.keyCode, o = "" + e, this.funcKey(e, !1), this.upList[o] && this.upList[o].forEach(function(t) { + t && t() + }), [2] + }) + }) + }, t.funcKey = function(t, e) { + return n(this, void 0, Promise, function() { + return a(this, function() { + return this.updateFuncKey(t, e), [2] + }) + }) + }, t.updateFuncKey = function(t, e) { + 18 == t ? this.isAltDown = e : 16 == t ? this.isShiftDown = e : 91 == t ? this.isMetaDown = e : 17 == t && (this.isCtrlDown = e) + }, t.isTrue = function(t) { + return t ? "✅" : "❌" + }, t.print = function() { + this.isTrue(this.isAltDown), this.isTrue(this.isShiftDown), this.isTrue(this.isCtrlDown), this.isTrue(this.isMetaDown) + }, t.getCharCode = function(t) { + return t.toUpperCase().charCodeAt(0) + }, t.downList = {}, t.upList = {}, t.isMetaDown = !1, t.isCtrlDown = !1, t.isAltDown = !1, t.isShiftDown = !1, t.funcKeyUpDelayTimer = 0, t + }(); + o.default = i, cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN, i.keyDown, i), cc.systemEvent.on(cc.SystemEvent.EventType.KEY_UP, i.keyUp, i), cc._RF.pop() + }, {} + ], + loadCanvas: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "29c5c6pohNMuIwinCm1KXPJ", "loadCanvas"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/dataTs"), + c = t("../common/enumConfig"), + s = t("../manager/DateManager"), + l = t("../public/network-tool"), + u = cc._decorator, + p = u.ccclass, + d = (u.property, function(t) { + function e() { + return null !== t && t.apply(this, arguments) || this + } + return a(e, t), e.prototype.start = function() { + var t = s.default.format(c.CALENDARNAMES[8], new Date); + console.log("monthKey = ", t) + }, e.prototype.insertAllMap = function() { + var t = []; + r.default.loadJsonData("data/map_ids", function(e) { + t = e, console.log("maps = " + e.length); + for (var o = 0; o < t.length; o++) r.default.getOriginLevelMapData(t[o], function(t) { + if (t) { + console.log("push=>", t.data.map_id); + var e = t.data.map_id, + o = t.data.map_data; + l.default.setLevelMapData(e, o) + } + }) + }) + }, i([p], e) + }(cc.Component)); + o.default = d, cc._RF.pop() + }, { + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../manager/DateManager": "DateManager", + "../public/network-tool": "network-tool" + } + ], + loadLayer: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "4d645A+CV5DRYYMx0geEXPK", "loadLayer"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__assign || function() { + return (i = Object.assign || function(t) { + for (var e, o = 1, n = arguments.length; o < n; o++) + for (var a in e = arguments[o]) Object.prototype.hasOwnProperty.call(e, a) && (t[a] = e[a]); + return t + }).apply(this, arguments) + }, + r = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }, + c = this && this.__awaiter || function(t, e, o, n) { + return new(o || (o = Promise))(function(a, i) { + function r(t) { + try { + s(n.next(t)) + } catch (e) { + i(e) + } + } + + function c(t) { + try { + s(n.throw(t)) + } catch (e) { + i(e) + } + } + + function s(t) { + var e; + t.done ? a(t.value) : (e = t.value, e instanceof o ? e : new o(function(t) { + t(e) + })).then(r, c) + } + s((n = n.apply(t, e || [])).next()) + }) + }, + s = this && this.__generator || function(t, e) { + var o, n, a, i, r = { + label: 0, + sent: function() { + if (1 & a[0]) throw a[1]; + return a[1] + }, + trys: [], + ops: [] + }; + return i = { + next: c(0), + throw :c(1), + return :c(2) + }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { + return this + }), i; + + function c(t) { + return function(e) { + return s([t, e]) + } + } + + function s(i) { + if (o) throw new TypeError("Generator is already executing."); + for (; r;) try { + if (o = 1, n && (a = 2 & i[0] ? n.return : i[0] ? n.throw || ((a = n.return) && a.call(n), 0) : n.next) && !(a = a.call(n, i[1])).done) return a; + switch (n = 0, a && (i = [2 & i[0], a.value]), i[0]) { + case 0: + case 1: + a = i; + break; + case 4: + return r.label++, { + value: i[1], + done: !1 + }; + case 5: + r.label++, n = i[1], i = [0]; + continue; + case 7: + i = r.ops.pop(), r.trys.pop(); + continue; + default: + if (!(a = (a = r.trys).length > 0 && a[a.length - 1]) && (6 === i[0] || 2 === i[0])) { + r = 0; + continue + } + if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { + r.label = i[1]; + break + } + if (6 === i[0] && r.label < a[1]) { + r.label = a[1], a = i; + break + } + if (a && r.label < a[2]) { + r.label = a[2], r.ops.push(i); + break + } + a[2] && r.ops.pop(), r.trys.pop(); + continue + } + i = e.call(t, r) + } catch (c) { + i = [6, c], n = 0 + } finally { + o = a = 0 + } + if (5 & i[0]) throw i[1]; + return { + value: i[0] ? i[1] : void 0, + done: !0 + } + } + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }), cc.macro.CLEANUP_IMAGE_CACHE = !1, cc.dynamicAtlasManager.enabled = !0; + var l = t("../../i18n/i18n"), + u = t("../common/CcJsFunc"), + p = t("../common/dataTs"), + d = t("../common/native/native-bridge"), + h = t("../common/native/native-def"), + f = t("../common/native/native-event"), + m = t("../common/native/share"), + g = t("../common/sdk"), + y = t("../common/spine"), + v = t("../effect/player-head-atlas"), + b = t("../manager/GameManager"), + _ = t("../manager/report-common"), + N = t("../tools/register-head-image"), + C = t("../utils/uma/uma-sdk"), + w = cc._decorator, + P = w.ccclass, + k = w.property, + S = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.bgLayer = null, e.loadProgressBar = null, e.descNode = null, e.userNode = null, e.privacyNode = null, e.chooseNode = null, e.chooseBg = null, e.beginNode = null, e.tipsNode = null, e.arrowBgBase = null, e.userNodeBase = null, e.loadNum = 0, e.loadOverNum = 2, e.initX = 250, e.initY = -60, e.progressCurrent = 0, e.progressAll = 2, e.sceneLoadEd = !1, e.loginStatusEd = !1, e + } + return a(e, t), e.prototype.update = function(t) { + this.isNeedLogin() ? this.loginStatusEd && this.progressAction(t) : this.progressAction(t) + }, e.prototype.progressAction = function(t) { + this.progressCurrent += t, this.progressCurrent <= this.progressAll ? this.loadProgressBar.progress = this.progressCurrent / this.progressAll : this.progressCurrent > this.progressAll && (this.loadProgressBar.progress = 1, this.loadNum >= this.loadOverNum && !this.sceneLoadEd && (console.log("PUSH=>加载成功 update"), this.getInfoMainScene())) + }, e.prototype.start = function() { + if (cc.game.on(f.NativeEvent.LeitingGetDeviceInfo, this.leitingGetDeviceInfo, this), cc.game.on(f.NativeEvent.LeitingLoginInfo, this.onLeitingLoginInfo, this), cc.game.on(f.NativeEvent.LeitingLoginErr, this.onLeitingLoginErr, this), this.bgLayer.getChildByName("sp").getComponent(y.default).play("2Grass", 0), this.isNeedLogin()) { + this.descNode.active = !0; + var t = cc.sys.localStorage.getItem("gameloading"); + console.log("loading = ", t), t ? (this.beginNode.active = !1, this.arrowBgBase.active = !1, this.userNodeBase.active = !1, this.loginStatusEd = !0) : (this.beginNode.active = !0, this.arrowBgBase.active = !0, this.userNodeBase.active = !0) + } else this.descNode.active = !1; + b.default.getInstance().initData(), this.loadNum = 0, this.loadMainScene(), m.default.init(), this.loadCfg(), v.default.instance.init(2048, 2048, 100), N.registerHeadImgLoader(), u.default.addbtnTouchOriginEndScale(this.userNode, this.userNodeFunc.bind(this)), u.default.addbtnTouchOriginEndScale(this.privacyNode, this.privacyNodeFunc.bind(this)), u.default.addbtnTouchOriginEndScale(this.chooseBg, this.chooseBgFunc.bind(this)), u.default.addbtnTouchOriginEndScale(this.beginNode, this.beginNodeFunc.bind(this)), this.tipsNode.active = !1 + }, e.prototype.userNodeFunc = function() { + console.log("用户协议") + }, e.prototype.privacyNodeFunc = function() { + console.log("隐私政策") + }, e.prototype.chooseBgFunc = function() { + this.chooseNode.active = !this.chooseNode.active, console.log("选择 = ", this.chooseNode.activeInHierarchy) + }, e.prototype.beginNodeFunc = function() { + var t = this; + if (console.log("开始游戏 = ", this.chooseNode.activeInHierarchy), !this.chooseNode.activeInHierarchy) return this.tipsNode.active = !0, void setTimeout(function() { + t.tipsNode.active = !1 + }, 2e3); + cc.sys.localStorage.setItem("gameloading", "gameloading"), this.loginStatusEd = !0, this.loadCfg() + }, e.prototype.leitingGetDeviceInfo = function() { + var t = p.default.getUserData(); + if (t && t.userID && t.userID.length > 0 && d.default.callNative(h.NativeFun.publicParamsInfo, { + userId: t.userID + }), d.default.deviceInfo) { + var e = { + androidid: d.default.deviceInfo.androidId, + chennal: "310001", + gameCode: "59" + }; + d.default.leitingReport("af_before_login", e) + } + }, e.prototype.onLeitingLoginInfo = function() { + this.loginStatusEd = !0, this.loadJson(), _.default.reportTACommon("login", { + login_type: "正常登录" + }), d.default.loginInfo && (d.default.loginInfo.userId, d.default.media); + var t = {}; + if (d.default.deviceInfo) { + var e = p.default.getUserData(); + t = { + androidid: d.default.deviceInfo.androidId, + chennal: "310001", + gameCode: "59", + userId: e.userID, + type: 2, + roldId: d.default.deviceInfo.gaid + } + } + var o = {}; + d.default.loginInfo && (e = p.default.getUserData(), o = { + loginType: "1", + chennal: d.default.loginInfo.channelNo, + gameCode: "59", + userId: e.userID, + type: 2, + serviceName: "海外测试服", + serviceId: "1", + loginMode: "1", + playLevelId: e.playLevelId + }); + var n = i(i({}, t), o); + d.default.leitingReport("af_login", n) + }, e.prototype.onLeitingLoginErr = function() { + this.loginStatusEd = !0, this.loadJson() + }, e.prototype.loadCfg = function() { + return c(this, void 0, Promise, function() { + return s(this, function(t) { + switch (t.label) { + case 0: + return [4, l.default.instance.init()]; + case 1: + return t.sent(), this.isNeedLogin() ? this.loginStatusEd && this.loadJson() : this.loadJson(), [2] + } + }) + }) + }, e.prototype.isNeedLogin = function() { + return !!(g.default.isPlatform(g.Platform.android) || g.default.isPlatform(g.Platform.oppo) || g.default.isPlatform(g.Platform.vivo)) + }, e.prototype.loadJson = function() { + var t = this; + p.default.initData(function() { + console.log("JSON加载完成"); + var e = p.default.getUserData(); + C.default.setUserid(e.userID); + var o = p.default.getHourseUnlockData(), + n = 0; + if (o.length) { + var a = o[o.length - 1]; + for (var i in a) + if (!a[i].unlock) { + n = a[i].unlockID; + break + } + } + for (var r in n || o.length, e.dailyData) + for (var c in e.dailyData[r]) e.dailyData[r][c].isWin; + t.loadScene() + }), _.default.initTA() + }, e.prototype.loadMainScene = function() { + var t = this; + cc.director.preloadScene("game", function() {}, function() { + console.log("PUSH=>主场景加载完成"), t.loadScene() + }) + }, e.prototype.loadScene = function() { + this.loadNum += 1, console.log("PUSH=>", this.loadNum), this.loadNum >= this.loadOverNum && this.progressCurrent >= this.progressAll && !this.sceneLoadEd && (console.log("PUSH=>loadScene加载成功"), this.getInfoMainScene()) + }, e.prototype.getInfoMainScene = function() { + this.sceneLoadEd = !0, _.default.reportTACommon("app_start", { + step: "启动" + }), cc.director.loadScene("game", function() { + console.log("PUSH=>进入主场景") + }) + }, r([k(cc.Node)], e.prototype, "bgLayer", void 0), r([k(cc.ProgressBar)], e.prototype, "loadProgressBar", void 0), r([k(cc.Node)], e.prototype, "descNode", void 0), r([k(cc.Node)], e.prototype, "userNode", void 0), r([k(cc.Node)], e.prototype, "privacyNode", void 0), r([k(cc.Node)], e.prototype, "chooseNode", void 0), r([k(cc.Node)], e.prototype, "chooseBg", void 0), r([k(cc.Node)], e.prototype, "beginNode", void 0), r([k(cc.Node)], e.prototype, "tipsNode", void 0), r([k(cc.Node)], e.prototype, "arrowBgBase", void 0), r([k(cc.Node)], e.prototype, "userNodeBase", void 0), r([P], e) + }(cc.Component); + o.default = S, cc._RF.pop() + }, { + "../../i18n/i18n": "i18n", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/native/native-bridge": "native-bridge", + "../common/native/native-def": "native-def", + "../common/native/native-event": "native-event", + "../common/native/share": "share", + "../common/sdk": "sdk", + "../common/spine": "spine", + "../effect/player-head-atlas": "player-head-atlas", + "../manager/GameManager": "GameManager", + "../manager/report-common": "report-common", + "../tools/register-head-image": "register-head-image", + "../utils/uma/uma-sdk": "uma-sdk" + } + ], + loseCookiePop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "8756cpkvkBHlIyfdBoS6jSg", "loseCookiePop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../i18n/gd_language"), + c = t("../../i18n/i18n"), + s = t("../common/CcJsFunc"), + l = t("../manager/GameManager"), + u = cc._decorator, + p = u.ccclass, + d = u.property, + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mainLayer = null, e.popNode = null, e.titleLabel = null, e.descLabel = null, e.numLabel = null, e.exitLabel = null, e.restartLabel = null, e.mainLabel = null, e.restartBtn = null, e.closeBtn = null, e.mainMenuBtn = null, e.exitBtn = null, e.heartNode = null, e.cookieNumLabel = null, e.showPopData = null, e + } + return a(e, t), e.prototype.start = function() { + cc.game.on("blowupHeartAnim", this.blowupHeartAnimFunc, this), s.default.addbtnTouchStartScale(this.closeBtn), s.default.addbtnTouchEndScale(this.closeBtn, this.hideLoseLovePop.bind(this)), s.default.addbtnTouchCancelScale(this.closeBtn), s.default.addbtnTouchStartScale(this.restartBtn), s.default.addbtnTouchEndScale(this.restartBtn, this.restartFunc.bind(this)), s.default.addbtnTouchCancelScale(this.restartBtn), s.default.addbtnTouchStartScale(this.mainMenuBtn), s.default.addbtnTouchEndScale(this.mainMenuBtn, this.returnMainMenuFunc.bind(this)), s.default.addbtnTouchCancelScale(this.mainMenuBtn), s.default.addbtnTouchStartScale(this.exitBtn), s.default.addbtnTouchEndScale(this.exitBtn, this.exitBtnFunc.bind(this)), s.default.addbtnTouchCancelScale(this.exitBtn), this.setupFonts() + }, e.prototype.setupFonts = function() { + this.titleLabel.string = c.default.instance.trans(r.GDLanguage.pop_sure), this.restartLabel.string = c.default.instance.trans(r.GDLanguage.pop_restart), this.exitLabel.string = c.default.instance.trans(r.GDLanguage.pop_quit), this.mainLabel.string = c.default.instance.trans(r.GDLanguage.main_screen), this.descLabel.string = c.default.instance.trans(r.GDLanguage.lose_cookies) + }, e.prototype.blowupHeartAnimFunc = function(t) { + 0 == t ? this.node.active = !1 : 1 == t && cc.tween(this.heartNode).to(.2, { + scale: 1.2 + }).to(.1, { + scale: 1 + }).start() + }, e.prototype.showPop = function(t) { + this.node.active = !0, this.showPopData = t, cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(), this.restartBtn.active = !1, this.mainMenuBtn.active = !1, this.exitBtn.active = !1, 0 == this.showPopData.popType ? (this.restartBtn.active = !0, this.mainMenuBtn.active = !0, this.popNode.height = 700) : 1 == this.showPopData.popType && (this.exitBtn.active = !0, this.popNode.height = 600), this.cookieNumLabel.getComponent(cc.Label).string = "x" + l.default.getInstance().cookieDict.cookieCurCount + }, e.prototype.hideLoseLovePop = function() { + this.node.active = !1, cc.game.emit("blowupHeartAnim", 0) + }, e.prototype.restartFunc = function() { + this.exitBtnFunc() + }, e.prototype.returnMainMenuFunc = function() { + this.exitBtnFunc() + }, e.prototype.exitBtnFunc = function() { + this.node.active = !1, cc.game.emit("blowupHeartAnim", 1) + }, i([d(cc.Node)], e.prototype, "mainLayer", void 0), i([d(cc.Node)], e.prototype, "popNode", void 0), i([d(cc.Label)], e.prototype, "titleLabel", void 0), i([d(cc.Label)], e.prototype, "descLabel", void 0), i([d(cc.Label)], e.prototype, "numLabel", void 0), i([d(cc.Label)], e.prototype, "exitLabel", void 0), i([d(cc.Label)], e.prototype, "restartLabel", void 0), i([d(cc.Label)], e.prototype, "mainLabel", void 0), i([d(cc.Node)], e.prototype, "restartBtn", void 0), i([d(cc.Node)], e.prototype, "closeBtn", void 0), i([d(cc.Node)], e.prototype, "mainMenuBtn", void 0), i([d(cc.Node)], e.prototype, "exitBtn", void 0), i([d(cc.Node)], e.prototype, "heartNode", void 0), i([d(cc.Node)], e.prototype, "cookieNumLabel", void 0), i([p], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "../../i18n/gd_language": "gd_language", + "../../i18n/i18n": "i18n", + "../common/CcJsFunc": "CcJsFunc", + "../manager/GameManager": "GameManager" + } + ], + loseLovePop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "86deeGjM+dBbIIFyxI9LHFp", "loseLovePop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/CcJsFunc"), + c = t("../common/enumConfig"), + s = t("../manager/data-manager"), + l = t("../manager/report-common"), + u = cc._decorator, + p = u.ccclass, + d = u.property, + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mask = null, e.popNode = null, e.titleNode = null, e.titleLabel = null, e.descNode = null, e.closeBtn = null, e.giveupBtn = null, e.noGiveupBtn = null, e.showPopData = null, e + } + return a(e, t), e.prototype.start = function() { + r.default.addbtnTouchEndScale(this.mask, this.hideLoseLovePop.bind(this)), r.default.addbtnTouchStartScale(this.closeBtn), r.default.addbtnTouchEndScale(this.closeBtn, this.hideLoseLovePop.bind(this)), r.default.addbtnTouchCancelScale(this.closeBtn), r.default.addbtnTouchStartScale(this.giveupBtn), r.default.addbtnTouchEndScale(this.giveupBtn, this.giveupBtnFunc.bind(this)), r.default.addbtnTouchCancelScale(this.giveupBtn), r.default.addbtnTouchStartScale(this.noGiveupBtn), r.default.addbtnTouchEndScale(this.noGiveupBtn, this.noGiveupBtnFunc.bind(this)), r.default.addbtnTouchCancelScale(this.noGiveupBtn) + }, e.prototype.showLoseLovePop = function(t) { + this.node.active = !0, this.showPopData = t, cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(), 0 == this.showPopData.popType ? (this.popNode.height = 715, this.descNode.active = !0) : 1 == this.showPopData.popType && (this.popNode.height = 601, this.descNode.active = !1) + }, e.prototype.hideLoseLovePop = function() { + this.node.active = !1 + }, e.prototype.giveupBtnFunc = function() { + console.log("打开主页面"), cc.game.emit(c.EMITKEY.SHOWMAINLAYER); + var t = s.default.getTAUserInfo(); + l.default.reportTACommon("game_give_up", t) + }, e.prototype.noGiveupBtnFunc = function() { + this.node.active = !1 + }, i([d(cc.Node)], e.prototype, "mask", void 0), i([d(cc.Node)], e.prototype, "popNode", void 0), i([d(cc.Node)], e.prototype, "titleNode", void 0), i([d(cc.Label)], e.prototype, "titleLabel", void 0), i([d(cc.Node)], e.prototype, "descNode", void 0), i([d(cc.Node)], e.prototype, "closeBtn", void 0), i([d(cc.Node)], e.prototype, "giveupBtn", void 0), i([d(cc.Node)], e.prototype, "noGiveupBtn", void 0), i([p], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "../common/CcJsFunc": "CcJsFunc", + "../common/enumConfig": "enumConfig", + "../manager/data-manager": "data-manager", + "../manager/report-common": "report-common" + } + ], + "main-cookie-reward": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "98ef1B9rVlIgINOcS1NN8Sh", "main-cookie-reward"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../../pre/main/cookiePrefab"), + c = t("../../common/CcJsFunc"), + s = t("../../common/dataTs"), + l = t("../../common/enumConfig"), + u = t("../../common/spine"), + p = t("../../common/util"), + d = t("../../manager/GameManager"), + h = t("../../manager/report-common"), + f = cc._decorator, + m = f.ccclass, + g = f.property, + y = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.clickBtn = null, e.cookieImg = null, e.progressBar = null, e.progressLabel = null, e.rewardImage = null, e.rewardNumLabel = null, e.clockSpine = null, e.timeLabel = null, e.cookiePrefab = null, e.startNode = null, e.updateTime = 0, e.progressOld = 0, e.progressNew = 0, e.isUpdate = !1, e.rewardData = null, e.cookieNum = 0, e.rewardCallback = null, e + } + return a(e, t), e.prototype.update = function(t) { + this.updateTime += t, this.updateTime >= 1 && (this.updateTime -= 1, this.updateTimeNum()), this.isUpdate && (this.progressOld += 15 * t, this.progressOld < this.progressNew && this.rewardData ? this.progressBar.progress = this.progressOld / this.rewardData.cookieNum : (this.isUpdate = !1, this.checkProgressFunc())) + }, e.prototype.updateTimeNum = function() { + var t = s.default.gameConfigData.baseConfigData.cookieRewardLevel; + if (!(s.default.getUserData().playLevelId < t)) { + var e = s.default.updateCookieRewardTime(); + if (0 == e) console.log("已满"), this.timeLabel.string = "End"; + else { + var o = p.default.formatTime(e); + o[0] > 0 ? this.timeLabel.string = o[0] + "d" + o[1] + "h" : o[1] > 0 ? this.timeLabel.string = o[1] + "h" + o[2] + "m" : o[2] > 0 ? this.timeLabel.string = o[2] + "m" + o[3] + "s" : o[3] > 0 && (this.timeLabel.string = o[2] + "m" + o[3] + "s") + } + } + }, e.prototype.start = function() { + this.clockSpine.getComponent(u.default).play("5Clock1", 0), this.updateSubViewFunc(), this.updateTimeNum() + }, e.prototype.updateSubViewFunc = function() { + var t = s.default.gameConfigData.baseConfigData.cookieReward; + console.log("cookieReward", JSON.stringify(t)); + var e = s.default.getCookieRewardData(); + console.log("cookieData", JSON.stringify(e)), console.log("cookieDict", JSON.stringify(d.default.getInstance().cookieDict)), this.progressNew = e.cookieNum, this.progressOld = e.cookieNum - d.default.getInstance().cookieDict.cookie, this.progressOld < 0 && (this.progressOld = 0); + var o = e.progress; + o >= 3 && (o = 0, e.progress = o, s.default.setCookieRewardData(e)), this.rewardData = t[o], console.log("rewardData", JSON.stringify(this.rewardData)); + var n = e.cookieNum; + n >= this.rewardData.cookieNum && (n = this.rewardData.cookieNum), this.progressLabel.string = n + "/" + this.rewardData.cookieNum, this.rewardNumLabel.string = this.rewardData.rewardCount + "", this.progressBar.progress = this.progressOld / this.rewardData.cookieNum; + var a = "rewardIcon/" + this.rewardData.rewardType + ".png"; + c.default.changeSpriteFrame(this.rewardImage, a), d.default.getInstance().cookieDict.cookie = 0, d.default.getInstance().cookieDict.cookieCurCount = 0, console.log("清空cookieDict", d.default.getInstance().cookieDict), this.cookieNum = n + }, e.prototype.checkProgressFunc = function() { + if (this.cookieNum >= this.rewardData.cookieNum) { + this.getRewardFunc(); + var t = s.default.getCookieRewardData(); + t.progress += 1, t.progress > 3 && (t.progress = 0), t.cookieNum > this.rewardData.cookieNum ? (console.log("多的饼干计入下一奖励", t.cookieNum - this.rewardData.cookieNum), t.cookieNum = t.cookieNum - this.rewardData.cookieNum, d.default.getInstance().cookieDict.cookie = t.cookieNum) : t.cookieNum = 0, s.default.setCookieRewardData(t), this.updateSubViewFunc(), this.isUpdate = !0 + } else cc.game.emit(l.EMITKEY.HIDEMASKLAYER) + }, e.prototype.callbackFunc = function() { + console.log("奖励播放成功 ######"), cc.game.emit(l.EMITKEY.HIDEMASKLAYER), cc.game.emit(l.EMITKEY.MAINUPDATEUI) + }, e.prototype.rewardCallbackFunc = function() { + this.rewardCallback && this.rewardCallback() + }, e.prototype.getRewardFunc = function() { + console.log("领取奖励", JSON.stringify(this.rewardData)); + var t = s.default.getUserData(), + e = this.rewardData.rewardType; + if ("reward_fish" == e) t.fish += this.rewardData.rewardCount; + else { + t[e] += this.rewardData.rewardCount; + var o, n = 0, + a = ""; + "prop_remove" == e ? (n = 1, a = "移出道具") : "prop_cancel" == e ? (n = 2, a = "撤销道具") : "prop_random" == e && (n = 3, a = "洗牌道具"), o = t[e], h.default.reportTACommon("item_get", { + item_id: n, + item_type: "消耗道具", + item_name: a, + change_num: 1, + num_before: o - 1, + num_after: o, + action: "饼干活动开启宝箱", + reason: "宝箱获得道具" + }) + } + s.default.saveUserData(t); + var i = { + popName: "showRewardPop", + showPopData: { + popCallbackCollect: null, + rewardData: this.rewardData, + startNode: this.rewardImage, + endNode: this.startNode, + popType: 1, + callback: this.callbackFunc.bind(this), + rewardCallback: this.rewardCallbackFunc.bind(this) + } + }; + cc.game.emit("showPop", i) + }, e.prototype.checkCookie = function(t, e) { + if (this.rewardCallback = e, console.log("cookieDict", d.default.getInstance().cookieDict), d.default.getInstance().cookieDict.cookie <= 0) return console.log("cookie <= 0 ######"), void(t && t()); + var o = this, + n = c.default.getWorldPosition(this.startNode), + a = c.default.getNodePosition(this.node, n), + i = c.default.getWorldPosition(this.cookieImg), + s = c.default.getNodePosition(this.node, i), + u = cc.instantiate(this.cookiePrefab); + this.node.addChild(u), u.getComponent(r.default).showData(1, d.default.getInstance().cookieDict.cookie), u.position = cc.v3(a), u.scale = 0, cc.tween(u).to(.2, { + scale: 1.2 + }).to(.2, { + scale: 1 + }).delay(.2).to(.3, { + position: cc.v3(a.x + 10, a.y - 10) + }).to(.3, { + position: cc.v3(a.x - 12, a.y - 12) + }).to(.5, { + position: cc.v3(s) + }).call(function() { + u.destroy(), cc.tween(o.cookieImg).to(.1, { + scale: 1.2 + }).to(.1, { + scale: 1 + }).call(function() { + t && t(), o.updateSubViewFunc(), cc.game.emit(l.EMITKEY.HIDEMASKLAYER), o.isUpdate = !0 + }).start() + }).start() + }, i([g(cc.Node)], e.prototype, "clickBtn", void 0), i([g(cc.Node)], e.prototype, "cookieImg", void 0), i([g(cc.ProgressBar)], e.prototype, "progressBar", void 0), i([g(cc.Label)], e.prototype, "progressLabel", void 0), i([g(cc.Node)], e.prototype, "rewardImage", void 0), i([g(cc.Label)], e.prototype, "rewardNumLabel", void 0), i([g(cc.Node)], e.prototype, "clockSpine", void 0), i([g(cc.Label)], e.prototype, "timeLabel", void 0), i([g(cc.Prefab)], e.prototype, "cookiePrefab", void 0), i([g(cc.Node)], e.prototype, "startNode", void 0), i([m], e) + }(cc.Component); + o.default = y, cc._RF.pop() + }, { + "../../../pre/main/cookiePrefab": "cookiePrefab", + "../../common/CcJsFunc": "CcJsFunc", + "../../common/dataTs": "dataTs", + "../../common/enumConfig": "enumConfig", + "../../common/spine": "spine", + "../../common/util": "util", + "../../manager/GameManager": "GameManager", + "../../manager/report-common": "report-common" + } + ], + "main-rank": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "9b6efOXGmVLpb6Xc/L4u6Jt", "main-rank"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }, + r = this && this.__awaiter || function(t, e, o, n) { + return new(o || (o = Promise))(function(a, i) { + function r(t) { + try { + s(n.next(t)) + } catch (e) { + i(e) + } + } + + function c(t) { + try { + s(n.throw(t)) + } catch (e) { + i(e) + } + } + + function s(t) { + var e; + t.done ? a(t.value) : (e = t.value, e instanceof o ? e : new o(function(t) { + t(e) + })).then(r, c) + } + s((n = n.apply(t, e || [])).next()) + }) + }, + c = this && this.__generator || function(t, e) { + var o, n, a, i, r = { + label: 0, + sent: function() { + if (1 & a[0]) throw a[1]; + return a[1] + }, + trys: [], + ops: [] + }; + return i = { + next: c(0), + throw :c(1), + return :c(2) + }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { + return this + }), i; + + function c(t) { + return function(e) { + return s([t, e]) + } + } + + function s(i) { + if (o) throw new TypeError("Generator is already executing."); + for (; r;) try { + if (o = 1, n && (a = 2 & i[0] ? n.return : i[0] ? n.throw || ((a = n.return) && a.call(n), 0) : n.next) && !(a = a.call(n, i[1])).done) return a; + switch (n = 0, a && (i = [2 & i[0], a.value]), i[0]) { + case 0: + case 1: + a = i; + break; + case 4: + return r.label++, { + value: i[1], + done: !1 + }; + case 5: + r.label++, n = i[1], i = [0]; + continue; + case 7: + i = r.ops.pop(), r.trys.pop(); + continue; + default: + if (!(a = (a = r.trys).length > 0 && a[a.length - 1]) && (6 === i[0] || 2 === i[0])) { + r = 0; + continue + } + if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { + r.label = i[1]; + break + } + if (6 === i[0] && r.label < a[1]) { + r.label = a[1], a = i; + break + } + if (a && r.label < a[2]) { + r.label = a[2], r.ops.push(i); + break + } + a[2] && r.ops.pop(), r.trys.pop(); + continue + } + i = e.call(t, r) + } catch (c) { + i = [6, c], n = 0 + } finally { + o = a = 0 + } + if (5 & i[0]) throw i[1]; + return { + value: i[0] ? i[1] : void 0, + done: !0 + } + } + }, + s = this && this.__spreadArrays || function() { + for (var t = 0, e = 0, o = arguments.length; e < o; e++) t += arguments[e].length; + var n = Array(t), + a = 0; + for (e = 0; e < o; e++) + for (var i = arguments[e], r = 0, c = i.length; r < c; r++, a++) n[a] = i[r]; + return n + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var l = t("../api/api-sheep"), + u = t("../common/CcJsFunc"), + p = t("../common/dataTs"), + d = t("../common/enumConfig"), + h = t("../common/spine"), + f = t("../manager/GameManager"), + m = t("../manager/report-common"), + g = t("../manager/data-manager"), + y = t("./mainUiLayer"), + v = t("../module/ScrollMsg"), + b = t("../module/sheep-flock"), + _ = t("../common/native/audio"), + N = t("../api/ApiTool"), + C = cc._decorator, + w = C.ccclass, + P = C.property, + k = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mainUILayer = null, e.bgSp = null, e.capSp = null, e.sunglassesSp = null, e.hairSp = null, e.sheepFlock = null, e.positionNode = null, e.positionNodeIcon = null, e.positionNodeCycle = null, e.scrollMsg = null, e.iconNode = null, e.catNodeIcon = null, e.sunNodeIcon = null, e.hairNodeIcon = null, e.catNodeIconWoman = null, e.sunNodeIconWoman = null, e.hairNodeIconWoman = null, e.dataArray = [], e.sheepArray = [], e.marginH = 0, e.contentH = 0, e.contentY = 0, e.curIdx = 0, e.userIdx = 0, e.winSuccess = !1, e.stageInfo = null, e.scrollToPosition = !1, e.isFirstEnter = !0, e + } + return a(e, t), e.prototype.playSpAnimation = function() { + this.node.on(cc.Node.EventType.TOUCH_MOVE, function(t) { + var e = t.touch.getDelta(); + this.moveActionFunc(e.y) + }, this), this.bgSp.active = !1, this.bgSp.getComponent(h.default).play("Stage1", 0), this.capSp.getComponent(h.default).play("Stage1", 0), this.sunglassesSp.getComponent(h.default).setNewSkin("00"), this.sunglassesSp.getComponent(h.default).play("Stage1", 0), this.hairSp.getComponent(h.default).play("Stage1", 0); + var t = this.capSp.getChildByName("click"), + e = this.sunglassesSp.getChildByName("click"), + o = this.hairSp.getChildByName("click"); + u.default.addbtnTouchEndScale(t, this.capClickFunc.bind(this, 1)), u.default.addbtnTouchEndScale(e, this.capClickFunc.bind(this, 2)), u.default.addbtnTouchEndScale(o, this.capClickFunc.bind(this, 3)), this.catNodeIcon = this.iconNode.getChildByName("cat-icon"), this.sunNodeIcon = this.iconNode.getChildByName("sun-icon"), this.hairNodeIcon = this.iconNode.getChildByName("hair-icon"), this.catNodeIconWoman = this.iconNode.getChildByName("cat-icon-woman"), this.sunNodeIconWoman = this.iconNode.getChildByName("sun-icon-woman"), this.hairNodeIconWoman = this.iconNode.getChildByName("hair-icon-woman"), this.capSp.active = !1, this.sunglassesSp.active = !1, this.hairSp.active = !1, this.catNodeIcon.opacity = 0, this.sunNodeIcon.opacity = 0, this.hairNodeIcon.opacity = 0, this.catNodeIconWoman.opacity = 0, this.sunNodeIconWoman.opacity = 0, this.hairNodeIconWoman.opacity = 0 + }, e.prototype.capClickFunc = function(t) { + console.log("idx = " + t); + var e = { + popName: "stagePop", + showPopData: { + idx: t, + stageInfo: this.stageInfo + } + }; + cc.game.emit("showPop", e) + }, e.prototype.start = function() { + cc.game.on(d.EMITKEY.USERINFOSUCCESS, this.showUserInfoFunc, this), this.playSpAnimation(), this.positionNode.zIndex = 100, this.positionNode.on(cc.Node.EventType.TOUCH_END, function() { + m.default.reportTACommon("fast_indexing_click", {}), this.scrollToPosition = !0, this.positionNodeFunc() + }, this), this.positionNode.active = !1 + }, e.prototype.showUserInfoFunc = function() { + console.log(" Data.user.avatar = " + g.default.user.avatar, g.default.user.uid), u.default.setAvatar(this.positionNodeIcon, g.default.user.avatar) + }, e.prototype.update = function() { + this.scrollToPosition && this.showOrHide() + }, e.prototype.positionNodeFunc = function() { + var t = this; + this.positionNode.active = !1, this.node.stopAllActions(); + var e = this.contentY + 750 * this.userIdx, + o = .3 * this.userIdx; + 0 == o && (o = .5), o >= 2 && (o = 2), cc.tween(this.node).to(o, { + y: e + }, { + easing: cc.easing.cubicOut + }).call(function() { + cc.game.emit(d.EMITKEY.SHOWUSERNODE), t.scrollToPosition = !1 + }, this).start() + }, e.prototype.onEnable = function() { + var t = this; + this.scheduleOnce(function() { + t.requestData() + }, .1), cc.audioEngine.setMusicVolume(1), cc.game.setFrameRate(30), f.default.setGameType(d.GAMETYPE.GAMEMAIN), _.default.playBGM() + }, e.prototype.requestData = function() { + return r(this, void 0, void 0, function() { + return c(this, function(t) { + switch (t.label) { + case 0: + return this.positionNode.active = !1, p.default.isLogin() ? [4, l.default.requestRankUserInfo()] : [3, 2]; + case 1: + t.sent(), console.log("PUSH=>获取用户信息成功 = ", g.default.rankUserInfo), t.label = 2; + case 2: + return console.log("PUSH=>请求网络数据 ######"), this.getStageInfo(), this.getRankInfo(), [2] + } + }) + }) + }, e.prototype.orderby = function(t, e) { + if (t.length <= 1) return t; + for (var o = Math.floor(t.length / 2), n = t.splice(o, 1)[0], a = [], i = [], r = 0, c = t; r < c.length; r++) { + var s = c[r]; + e(s) < e(n) ? a.push(s) : i.push(s) + } + return this.orderby(a, e).concat([n], this.orderby(i, e)) + }, e.prototype.bubbleSort = function(t) { + for (var e, o = s(t), n = 0, a = o.length; n < a; n++) + for (var i = 0; i < a - 1 - n; i++) o[i].win_score > 0 || o[i].fail_score < o[i + 1].fail_score && (e = [o[i + 1], o[i]], o[i] = e[0], o[i + 1] = e[1]); + return o + }, e.prototype.getStageInfo = function() { + var t = this, + e = g.default.getStageData(); + e ? (console.log("使用缓存数据->舞台"), t.setInfoData(e)) : (console.log("缓存数据过期->舞台"), l.default.getStageInfoData(function(e) { + t.setInfoData(e), g.default.setStageData(e) + })) + }, e.prototype.setInfoData = function(t) { + this.stageInfo = t.data, this.setStageInfo() + }, e.prototype.getRankInfo = function() { + f.default.getInstance().game_over > 0 && f.default.getInstance().playGameCount < 2 && p.default.removeItem(d.STORAGEKEY.RANKDATA); + var t = this, + e = g.default.getRankData(); + e ? (console.log("使用本地缓存数据->排行榜数据"), t.setRankData(e)) : (console.log("本地缓存数据不存在或已过期->排行榜数据"), l.default.getRankInfoData(function(e) { + t.setRankData(e), g.default.setRankData(e) + })) + }, e.prototype.setRankData = function(t) { + this.setSubViewData(t.data.list), f.default.getInstance().rankInfo = t.data, this.mainUILayer.getComponent(y.default).showBottomRankNode(t.data.user) + }, e.prototype.setStageInfo = function() { + var t = this.stageInfo; + this.capSp.active = !1, this.sunglassesSp.active = !1, this.hairSp.active = !1, this.catNodeIcon.opacity = 0, this.sunNodeIcon.opacity = 0, this.hairNodeIcon.opacity = 0, this.catNodeIconWoman.opacity = 0, this.sunNodeIconWoman.opacity = 0, this.hairNodeIconWoman.opacity = 0, t.firstWin && t.firstWin.nick_name && t.firstWin.nick_name.length && (this.capSp.active = !0, console.log("info.firstWin.gender = " + t.firstWin.gender), 0 == t.firstWin.gender ? (this.catNodeIcon.opacity = 255, u.default.setAvatar(this.catNodeIcon, t.firstWin.avatar)) : (this.catNodeIconWoman.opacity = 255, u.default.setAvatar(this.catNodeIconWoman, t.firstWin.avatar))), t.iqWin && t.iqWin.nick_name && t.iqWin.nick_name.length ? (this.sunglassesSp.active = !0, this.sunglassesSp.getComponent(h.default).play("Stage1", 0), console.log("info.iqWin.gender = " + t.iqWin.gender), 0 == t.iqWin.gender ? (this.sunNodeIcon.opacity = 255, u.default.setAvatar(this.sunNodeIcon, t.iqWin.avatar)) : (this.sunNodeIconWoman.opacity = 255, u.default.setAvatar(this.sunNodeIconWoman, t.iqWin.avatar))) : (this.sunglassesSp.active = !0, this.sunglassesSp.getComponent(h.default).play("Stage0", 0)), t.timeWin && t.timeWin.nick_name && t.timeWin.nick_name.length && (this.hairSp.active = !0, console.log("info.firstWin.gender = " + t.firstWin.gender), 0 == t.timeWin.gender ? (this.hairNodeIcon.opacity = 255, u.default.setAvatar(this.hairNodeIcon, t.timeWin.avatar)) : (this.hairNodeIconWoman.opacity = 255, u.default.setAvatar(this.hairNodeIconWoman, t.timeWin.avatar))) + }, e.prototype.onDisable = function() { + this.node.stopAllActions() + }, e.prototype.setSubViewData = function(t) { + var e = this; + void 0 === t && (t = []); + var o = this, + n = p.default.getUserData().userID, + a = !1; + for (var i in t) + if ((l = (_ = t[i]).result) && l.length) { + var r = JSON.parse(l); + for (var c in r) + if (r[c].uid == Number(n)) { + a = !0; + break + } + } + if (0 == a) { + var s = g.default.rankUserInfo; + if (s && s.region && s.region.length) + for (var i in t) { + var l = (_ = t[i]).result; + if (s.region == _.name) { + if (l && l.length) { + var u = []; + (r = JSON.parse(l)).length >= 36 && (r[18] = s); + for (var h = 0; h < r.length; h++) h < 36 && u.push(r[h]); + _.result = JSON.stringify(u), t[i] = _ + } + break + } + } + } + for (var i in this.dataArray = t, this.sheepArray) this.sheepArray[i].destroy(); + var m = this.dataArray.length; + if (0 != m) { + var y = 0, + b = 0; + for (var i in this.dataArray) { + var _; + y += (_ = this.dataArray[i]).all_score, b += _.win_score + } + var C = "今日挑战 " + y + " 羊,通关 " + b + " 羊"; + N.default.dailyAllNumber = y, N.default.dailywinNumber = b, N.default.avatar = g.default.user.avatar, this.scrollMsg.getComponent(v.default).showMsg({ + msg: C + }); + var w = (cc.winSize.height - cc.winSize.width) / 2; + console.log(w), this.node.height = 750 * (m + 1), this.marginH = (this.node.height - cc.winSize.height) / 2, this.node.y = -this.marginH, console.log(this.node.y), console.log(this.node.height), this.contentY = this.node.y, this.contentH = this.node.height, this.updatePositionNode(this.dataArray), this.sheepArray = []; + var P = function(t) { + setTimeout(function() { + e.addSheepShock(e.dataArray, t, 750) + }, 100 * t) + }; + for (h = 0; h < m; h++) P(h); + 1 == f.default.getInstance().game_over && (cc.game.emit(d.EMITKEY.SHOWMASKLAYER), setTimeout(function() { + e.scrollToPosition = !0, e.positionNodeFunc() + }, 100)), setTimeout(function() { + cc.game.emit(d.EMITKEY.HIDEMASKLAYER) + }, 7e3), this.isFirstEnter && (this.node.y += cc.winSize.width, this.isFirstEnter = !1, cc.tween(this.node).delay(.5).call(function() { + o.bgSp.active = !0 + }).to(1, { + y: o.node.y - cc.winSize.width + }, { + easing: cc.easing.quadOut + }).start()) + } + }, e.prototype.updatePositionNode = function(t) { + var e = p.default.getUserData().userID, + o = 0; + for (var n in this.winSuccess = !1, t) { + var a = t[n].result; + if (a && a.length) { + var i = JSON.parse(a); + for (var r in i) { + var c = i[r]; + if (c.uid == Number(e)) { + this.userIdx = o, this.winSuccess = !0, console.log("找到名字了 ###### " + o + " res = " + JSON.stringify(c)), this.curIdx = Math.floor(this.node.y / 750 + this.dataArray.length / 2), console.log("用户所在位置 = " + this.userIdx + " - 当前位置 = " + this.curIdx), this.curIdx == this.userIdx ? this.positionNode.active = !1 : this.positionNode.active = !0; + break + } + } + if (this.winSuccess) break; + o++ + } + } + }, e.prototype.addSheepShock = function(t, e, o) { + var n = cc.instantiate(this.sheepFlock); + e > 2 && (n.opacity = 0), this.node.addChild(n), this.sheepArray[e] = n; + var a = { + type: 0 == e ? 1 : e < 3 ? 2 : 3, + num: e + 1, + item: t[e] + }; + n.getComponent(b.default).setupData(a), n.x = 0, f.default.getInstance().globalData.isFullScreen ? n.y = this.marginH - e * o - 150 : n.y = this.marginH - e * o - 250 + }, e.prototype.moveActionFunc = function(t) { + if (!(this.dataArray.length < 2)) { + for (var e in this.sheepArray) this.sheepArray[e].opacity = 0; + this.sheepArray.length > 5 && this.showOrHide(), this.node.y += t, this.node.y >= this.marginH ? this.node.y = this.marginH : this.node.y <= -this.marginH && (this.node.y = -this.marginH), this.winSuccess && (this.curIdx == this.userIdx ? this.positionNode.active = !1 : this.positionNode.active = !0, this.curIdx < this.userIdx ? this.positionNodeCycle.scaleY = 1 : this.curIdx > this.userIdx && (this.positionNodeCycle.scaleY = -1)) + } + }, e.prototype.showOrHide = function() { + this.curIdx = Math.floor(this.node.y / 750 + this.dataArray.length / 2), this.curIdx >= this.sheepArray.length && (this.curIdx = this.sheepArray.length - 1), this.curIdx >= 1 ? this.curIdx < this.sheepArray.length - 1 ? (this.sheepArray[this.curIdx - 1].opacity = 255, this.sheepArray[this.curIdx].opacity = 255, this.sheepArray[this.curIdx + 1].opacity = 255) : (this.sheepArray[this.sheepArray.length - 3].opacity = 255, this.sheepArray[this.sheepArray.length - 2].opacity = 255, this.sheepArray[this.sheepArray.length - 1].opacity = 255) : this.sheepArray.length > 2 && (this.sheepArray[0].opacity = 255, this.sheepArray[1].opacity = 255, this.sheepArray[2].opacity = 255) + }, e.prototype.containFunc = function(t, e) { + for (var o = "", n = 0; n < e.length; n++) { + var a = e[n]; + if (!(o += a, t.indexOf(o) >= 0 || (o = o.slice(0, o.length - 1), o += this.IsUpper(a) ? a.toLowerCase() : a.toUpperCase(), t.indexOf(o) >= 0))) return !1 + } + return !0 + }, e.prototype.IsUpper = function(t) { + return t === t.toUpperCase() + }, i([P({ + type: cc.Node, + tooltip: "mainUILayer" + })], e.prototype, "mainUILayer", void 0), i([P({ + type: cc.Node, + tooltip: "背景spine" + })], e.prototype, "bgSp", void 0), i([P({ + type: cc.Node, + tooltip: "帽子羊spine" + })], e.prototype, "capSp", void 0), i([P({ + type: cc.Node, + tooltip: "墨镜羊spine" + })], e.prototype, "sunglassesSp", void 0), i([P({ + type: cc.Node, + tooltip: "长发羊spine" + })], e.prototype, "hairSp", void 0), i([P({ + type: cc.Prefab, + tooltip: "羊群" + })], e.prototype, "sheepFlock", void 0), i([P({ + type: cc.Node, + tooltip: "定位按钮" + })], e.prototype, "positionNode", void 0), i([P({ + type: cc.Node, + tooltip: "定位按钮头像" + })], e.prototype, "positionNodeIcon", void 0), i([P({ + type: cc.Node, + tooltip: "定位按钮图标" + })], e.prototype, "positionNodeCycle", void 0), i([P({ + type: cc.Node, + tooltip: "跑马灯" + })], e.prototype, "scrollMsg", void 0), i([P({ + type: cc.Node, + tooltip: "头像" + })], e.prototype, "iconNode", void 0), i([w], e) + }(cc.Component); + o.default = k, cc._RF.pop() + }, { + "../api/ApiTool": "ApiTool", + "../api/api-sheep": "api-sheep", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../common/native/audio": "audio", + "../common/spine": "spine", + "../manager/GameManager": "GameManager", + "../manager/data-manager": "data-manager", + "../manager/report-common": "report-common", + "../module/ScrollMsg": "ScrollMsg", + "../module/sheep-flock": "sheep-flock", + "./mainUiLayer": "mainUiLayer" + } + ], + "main-tabbar": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "66a40jaUH5JALG1+2y2R2kp", "main-tabbar"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../i18n/gd_language"), + c = t("../../i18n/i18n"), + s = t("../common/CcJsFunc"), + l = t("../common/dataTs"), + u = t("../common/enumConfig"), + p = t("../manager/GameManager"), + d = t("../manager/report-common"), + h = t("../utils/uma/uma-sdk"), + f = cc._decorator, + m = f.ccclass, + g = f.property, + y = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mainPage = null, e.pageMain = null, e.pageDaily = null, e.pageCollect = null, e.tabbarMain = null, e.tabbarDaily = null, e.tabbarCollect = null, e.pageContent = null, e.tabbarArr = [], e.updateTime = 0, e + } + return a(e, t), e.prototype.update = function(t) { + this.updateTime += t, this.updateTime + }, e.prototype.start = function() { + cc.game.on(u.EMITKEY.MAINUPDATEUI, this.setMainLayerData, this), cc.game.on(u.EMITKEY.UPDATETABBARRECEIVE, this.updateTabbar, this), this.pageContent = this.mainPage.getChildByName("pageContent"), s.default.addbtnTouchEndScale(this.tabbarCollect, this.tabbarAction.bind(this, 0)), s.default.addbtnTouchEndScale(this.tabbarMain, this.tabbarAction.bind(this, 1)), s.default.addbtnTouchEndScale(this.tabbarDaily, this.tabbarAction.bind(this, 2)), this.tabbarArr.push(this.tabbarCollect), this.tabbarArr.push(this.tabbarMain), this.tabbarArr.push(this.tabbarDaily), this.pageCollect.x = 0, this.pageMain.x = 750, this.pageDaily.x = 1500, this.updateTabbar(1, !1), this.setMainLayerData(), this.setupFonts() + }, e.prototype.setupFonts = function() { + var t = c.default.instance.trans(r.GDLanguage.collect); + this.tabbarCollect.getChildByName("icon-label").getComponent(cc.Label).string = t; + var e = c.default.instance.trans(r.GDLanguage.main_screen); + this.tabbarMain.getChildByName("icon-label").getComponent(cc.Label).string = e; + var o = c.default.instance.trans(r.GDLanguage.daily_challenge); + this.tabbarDaily.getChildByName("icon-label").getComponent(cc.Label).string = o + }, e.prototype.onEnable = function() { + this.setMainLayerData() + }, e.prototype.setMainLayerData = function() { + var t = p.default.getInstance().collectionMark; + 0 == t.bgNum && 0 == t.brickNum && (p.default.getInstance().collectionMark.tabbarCollection = !1), p.default.getInstance().collectionMark.tabbarCollection ? this.tabbarCollect.getChildByName("icon-mark").active = !0 : this.tabbarCollect.getChildByName("icon-mark").active = !1 + }, e.prototype.tabbarAction = function(t) { + s.default.addClickAudio(), this.updateTabbar(t), t != u.MAINPAGE.PAGEDAILY ? p.default.getInstance().tabbarIsDaily && (console.log("点击了每日挑战,没玩"), h.default.trackEvent("daily_return"), d.default.reportTACommon("daily_return", {})) : p.default.getInstance().tabbarIsDaily = !0 + }, e.prototype.updateTabbar = function(t, e) { + void 0 === e && (e = !0); + var o = this; + if (2 == t && l.default.getUserData().playLevelId < 14) cc.game.emit("showPop", { + popName: "nothingPop", + showPopData: { + popCallbackCollect: null, + popType: 3 + } + }); + else { + for (var n in p.default.getInstance().mainPage = t, this.tabbarArr) { + var a = this.tabbarArr[n]; + t == Number(n) ? (a.getChildByName("bg-icon-nor").active = !1, a.getChildByName("bg-icon-sel").active = !0, a.getChildByName("icon-nor").active = !1, a.getChildByName("icon-sel").active = !0) : (a.getChildByName("bg-icon-nor").active = !0, a.getChildByName("bg-icon-sel").active = !1, a.getChildByName("icon-nor").active = !0, a.getChildByName("icon-sel").active = !1) + } + var i = e ? .3 : 0, + r = 0, + c = null; + switch (t) { + case 0: + r = 0, c = this.pageCollect; + break; + case 1: + r = -750, c = this.pageMain; + break; + case 2: + r = -1500, c = this.pageDaily + } + c && (c.active = !0), this.pageContent.stopAllActions(), cc.tween(this.pageContent).to(i, { + x: r + }).call(function() { + o.hideOtherNode(c) + }).start(), cc.game.emit(u.EMITKEY.UPDATETABBARSEND, t), this.setMainLayerData() + } + }, e.prototype.hideOtherNode = function(t) { + var e = this.mainPage.getChildByName("pageContent").children; + for (var o in e) t && t != e[o] && (e[o].active = !1) + }, i([g(cc.Node)], e.prototype, "mainPage", void 0), i([g(cc.Node)], e.prototype, "pageMain", void 0), i([g(cc.Node)], e.prototype, "pageDaily", void 0), i([g(cc.Node)], e.prototype, "pageCollect", void 0), i([g(cc.Node)], e.prototype, "tabbarMain", void 0), i([g(cc.Node)], e.prototype, "tabbarDaily", void 0), i([g(cc.Node)], e.prototype, "tabbarCollect", void 0), i([m], e) + }(cc.Component); + o.default = y, cc._RF.pop() + }, { + "../../i18n/gd_language": "gd_language", + "../../i18n/i18n": "i18n", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../manager/GameManager": "GameManager", + "../manager/report-common": "report-common", + "../utils/uma/uma-sdk": "uma-sdk" + } + ], + mainCanvas: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "53853D2Qg1AFKoc4UUFQ6nI", "mainCanvas"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r, c, s = t("../common/enumConfig"), + l = t("../common/native/audio"), + u = t("../common/native/tt-sdk"), + p = t("../common/sdk"), + d = t("../manager/GameManager"), + h = t("../manager/report-common"), + f = cc._decorator, + m = f.ccclass, + g = f.property; + (function(t) { + t[t.ready = 0] = "ready", t[t.recording = 1] = "recording", t[t.stop = 2] = "stop", t[t.pause = 3] = "pause" + })(r || (r = {})), + function(t) { + t[t.RestartRecord = 0] = "RestartRecord", t[t.ShareMessage = 1] = "ShareMessage" + }(c || (c = {})); + var y = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mainLayer = null, e.gameLayer = null, e.status = r.ready, e.recordFinishAction = c.RestartRecord, e.timer = 0, e + } + return a(e, t), e.prototype.start = function() { + var t = this; + this.mainLayer.active = !0, this.gameLayer.active = !1, cc.game.on(s.EMITKEY.TTSTARTRECORD, this.beginRecordFunc, this), cc.game.on(s.EMITKEY.TTSTOPRECORD, this.stopRecordFunc, this), cc.game.on(s.EMITKEY.TTSHARERECORD, this.shareRecordFunc, this), this.ttRewardInit(), this.scheduleOnce(function() { + t.beginRecord() + }, 2), p.default.setOnShow(function() { + console.log("on Show"), l.default.playBGM() + }), p.default.setOnHide(function() { + console.log("on Hide"), l.default.playBGM() + }) + }, e.prototype.beginRecordFunc = function() { + this.status != r.recording && this.beginRecord() + }, e.prototype.stopRecordFunc = function() { + this.stopRecord() + }, e.prototype.ttRewardInit = function() { + if (cc.sys.platform == cc.sys.BYTEDANCE_GAME) { + var t = tt.getGameRecorderManager(); + t.onStart(this.recordStart.bind(this)), t.onStop(this.recordStop.bind(this)), t.onPause(this.recordPause.bind(this)), t.onResume(this.recordResume.bind(this)) + } + }, e.prototype.beginRecord = function() { + cc.sys.platform == cc.sys.BYTEDANCE_GAME && (console.log("beginRecord ###### "), d.default.getInstance().videoDuration = 0, u.default.recorderStart()) + }, e.prototype.stopRecord = function() { + u.default.recorderStop() + }, e.prototype.recordStart = function() { + console.log("record start"), d.default.getInstance().videoDuration = 0, this.status = r.recording, this.initStatus() + }, e.prototype.recordStop = function(t) { + console.log("record stop", t.videoPath), u.default.setVideoPath(t.videoPath), d.default.getInstance().videoPath = t.videoPath, this.status = r.stop, this.initStatus() + }, e.prototype.recordPause = function() { + console.log("record pause"), this.status = r.pause, this.initStatus() + }, e.prototype.recordResume = function() { + console.log("record resume"), this.status = r.recording, this.initStatus() + }, e.prototype.update = function(t) { + this.timer += t, d.default.getInstance().bulletTime += t, this.status == r.recording && (d.default.getInstance().videoDuration += t), this.timer >= 1 && (this.timer = 0, this.status == r.recording && this.initStatus()) + }, e.prototype.initStatus = function() { + if (d.default.getInstance().videoDuration >= 300) { + u.default.recorderStop(); + var t = this; + this.scheduleOnce(function() { + t.beginRecord() + }, 2) + } + if (d.default.getInstance().videoDuration < 1) switch (this.status) { + case r.ready: + console.log("录制 ###### "); + break; + case r.recording: + console.log("录制中...... ###### "); + break; + case r.pause: + console.log("暂停录制...... ###### "); + break; + case r.stop: + console.log("录制...... ###### ") + } + }, e.prototype.recordBtnAction = function() { + switch (console.log("video tip status:", this.status, r[this.status]), this.status) { + case r.ready: + d.default.getInstance().videoDuration = 0, u.default.recorderStart(); + break; + case r.recording: + u.default.recorderPause(); + break; + case r.pause: + u.default.recorderResume(); + break; + case r.stop: + u.default.recorderStart(), this.status = r.recording, d.default.getInstance().videoDuration = 0 + } + this.initStatus() + }, e.prototype.shareRecordFunc = function() { + cc.sys.platform == cc.sys.BYTEDANCE_GAME && (h.default.reportTACommon("share_click", {}), d.default.getInstance().videoDuration < 3 ? cc.game.emit(s.EMITKEY.SHOWMAINTIPS, "录屏小于3s,无法分享") : (u.default.recorderStop(), this.showPop())) + }, e.prototype.showPop = function() { + cc.sys.platform == cc.sys.BYTEDANCE_GAME && (console.log("我要炫耀 = ", d.default.getInstance().videoPath), d.default.getInstance().videoPath && 0 != d.default.getInstance().videoPath.length ? u.default.shareAppMessage({ + url: d.default.getInstance().videoPath, + success: function() { + u.default.recorderStart() + }, + fail: function() { + u.default.recorderStart() + } + }) : u.default.recorderStart()) + }, i([g(cc.Node)], e.prototype, "mainLayer", void 0), i([g(cc.Node)], e.prototype, "gameLayer", void 0), i([m], e) + }(cc.Component); + o.default = y, cc._RF.pop() + }, { + "../common/enumConfig": "enumConfig", + "../common/native/audio": "audio", + "../common/native/tt-sdk": "tt-sdk", + "../common/sdk": "sdk", + "../manager/GameManager": "GameManager", + "../manager/report-common": "report-common" + } + ], + mainCultivateLayer: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "a504aoDOgxNhZMyOCq1oDJZ", "mainCultivateLayer"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../pre/main/catClawPrefabs"), + c = t("../common/CcJsFunc"), + s = t("../common/dataTs"), + l = t("../common/enumConfig"), + u = t("../common/native/audio"), + p = t("../common/spine"), + d = t("../manager/GameManager"), + h = t("../utils/uma/uma-sdk"), + f = t("./catNode"), + m = t("./houseLayer"), + g = t("./upgrade-tip"), + y = t("./wardrobeLayer"), + v = cc._decorator, + b = v.ccclass, + _ = v.property, + N = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mainUILayer = null, e.wholeBuildHouse = null, e.wardrobeLayer = null, e.houseLayer = null, e.topUiLayer = null, e.particlePrefab = null, e.upgradeTip = null, e.clawPrefab = null, e.clawNode = null, e.catObj = null, e.upgradeArr = [], e.popCallbackCollect = null, e.isShowHouse = !1, e + } + return a(e, t), e.prototype.start = function() { + window.xuxu = this, this.node.on("touchstart", this.touchStartFunc, this), this.node.on("touchend", this.hideWardrobelLayer, this), cc.game.on(l.EMITKEY.UPDATETABBARSEND, this.updateTabbar, this), this.initMainCultivateLayer(), this.popCallbackCollect = { + playGameCallBack: this.playGameFunc.bind(this) + } + }, e.prototype.playGameFunc = function() {}, e.prototype.updateTabbar = function(t) { + t == l.MAINPAGE.PAGEHOUSE ? (this.showUpgrade(), this.isShowHouse = !0) : this.hideUpgrade() + }, e.prototype.initMainCultivateLayer = function() { + this.nextRoomIsUnloack(), this.clawNode = cc.instantiate(this.clawPrefab), this.wholeBuildHouse.addChild(this.clawNode), this.clawNode.active = !1 + }, e.prototype.setClawNodeWithNode = function(t) { + if (cc.isValid(this.clawNode)) + if (t) { + var e = c.default.getWorldPosition(t), + o = c.default.getNodePosition(this.wholeBuildHouse, e); + this.clawNode.position = cc.v3(o.x, o.y, 0), this.clawNode.getComponent(r.default).playClawAnimation() + } else this.clawNode.active = !1; + else console.log("猫爪子已释放 ###### ") + }, e.prototype.unlockNewHouse = function() { + this.nextRoomIsUnloack(!0), cc.game.emit(l.EMITKEY.MAINUPDATEUI) + }, e.prototype.updateLayout = function() { + this.catObj = {}; + var t = s.default.getGameConfigData().baseConfigData.unlockHouseDataArray; + for (var e in t) + for (var o in t[e]) { + var n = t[e][o]; + this.setBuildStatus(n, !1, !1) + } + var a = s.default.getUserData().unlockHouseUserData; + for (var e in a) + for (var o in a[e])(n = a[e][o]).unlock ? this.setBuildStatus(n, !0, !1) : n.show && this.addUpgradeTip(n) + }, e.prototype.addUpgradeTip = function(t) { + var e = "house_" + t.house, + o = "room_" + t.room, + n = "mask_room_" + t.room, + a = ""; + "cat" == t.buildType ? a = t.buildType : "build" == t.buildType ? a = t.buildType + "_" + t.buildid : "skin" == t.buildType && (a = "cat"); + var i = this.wholeBuildHouse.getChildByName(e), + r = i.getChildByName(o), + c = i.getChildByName(n), + s = r.getChildByName(a), + u = s.getChildByName("lock"), + p = (s.getChildByName("unLock"), u.getChildByName("lockImg")); + c.active = !1; + var h = cc.instantiate(this.upgradeTip), + f = p.convertToWorldSpaceAR(cc.v2(0, 0)), + m = i.convertToNodeSpaceAR(f); + h.x = m.x, h.y = m.y + p.height / 2, "build" == t.buildType && 1 == t.house && 1 == t.room && 1 == t.buildid && (h.x += 50, h.y += 50), "build" == t.buildType && 3 == t.house && 2 == t.room && 2 == t.buildid && (h.y += 50), "skin" == t.buildType && 3 == t.house && 2 == t.room && 9 == t.buildid && (h.y -= 50), "build" == t.buildType && 3 == t.house && 3 == t.room ? 1 == t.buildid ? h.x -= 70 : 2 == t.buildid ? (h.x += 50, h.y += 50) : 3 == t.buildid ? h.x += 50 : 10 == t.buildid && (h.x -= 50, h.y -= 50) : "skin" == t.buildType && 3 == t.house && 3 == t.room && 10 == t.buildid && (h.x -= 50, h.y -= 50), i.addChild(h), h.getComponent(g.default).showPoint(t, this, !0), this.upgradeArr.push(h), d.default.getInstance().mainPage != l.MAINPAGE.PAGEHOUSE && (h.active = !1) + }, e.prototype.clickUpgradePoint = function(t) { + for (var e in this.upgradeArr) this.upgradeArr[e].getComponent(g.default).showPoint(); + t.getComponent(g.default).showFish() + }, e.prototype.clickUpgradeFish = function(t, e) { + for (var o in console.log("houseData = " + JSON.stringify(t)), this.upgradeArr) this.upgradeArr[o].getComponent(g.default).showPoint(); + var n = s.default.getUserData(), + a = n.unlockHouseUserData; + if (n.fish >= t.fish) { + for (var i in a) + for (var r in a[i]) t.unlockID == a[i][r].unlockID && (a[i][r].unlock = !0), a[i][r].show = !0; + var c = !1; + if (a.length) { + var u = a[a.length - 1]; + for (var o in u) u[o].unlock || (c = !0) + } + if (n.fish -= t.fish, n.unlockHouseUserData = a, "cat" == t.buildType || "skin" == t.buildType) { + var p = { + clothesID: t.clothesID, + clothRank: t.clothesID % 1e3 == 0 ? 3 : 1, + isWear: t.clothesID % 1e3 == 0 + }, + f = n.catClothesData, + m = "cat_" + t.buildid; + f[m] ? f[m].push(p) : (console.log("userCldata clKey为空,需要初始化数组 ### "), f[m] = [], f[m].push(p)), d.default.getInstance().collectionMark.tabbarCollection = !0, "cat" == t.buildType ? d.default.getInstance().collectionMark.catNum = t.clothesID : (d.default.getInstance().collectionMark.catNum = t.clothesID, d.default.getInstance().collectionMark.catSkinNum = t.clothesID) + } + s.default.saveUserData(n), e.getComponent(g.default).hide(), cc.game.emit(l.EMITKEY.SHOWMASKLAYER, 7), this.playFlyFishAnimation(t, e.node), c || (console.log("刷新解锁气泡"), this.updateLayout()); + var y = t.unlockID + ""; + h.default.trackEvent("house_unlock", { + houseID: y + }), cc.isValid(this.clawNode) && (console.log("释放猫爪子 ###### "), this.clawNode.destroy()) + } else { + var v = { + popName: "nothingPop", + showPopData: { + popCallbackCollect: this.popCallbackCollect, + popType: 0 + } + }; + cc.game.emit("showPop", v) + } + }, e.prototype.playFlyFishAnimation = function(t) { + var e = "house_" + t.house, + o = "room_" + t.room, + n = "mask_room_" + t.room, + a = ""; + "cat" == t.buildType ? a = t.buildType : "build" == t.buildType ? a = t.buildType + "_" + t.buildid : "skin" == t.buildType && (a = "cat"); + var i = this.wholeBuildHouse.getChildByName(e), + r = i.getChildByName(o), + c = i.getChildByName(n), + s = r.getChildByName(a), + l = s.getChildByName("lock"); + s.getChildByName("unLock"), l.getChildByName("lockImg"), c.active = !1 + }, e.prototype.flyUnlockFishFunc = function(t, e) { + this.removeFunc(this.upgradeArr, e), this.setBuildStatus(t, !0, !0), cc.game.emit(l.EMITKEY.MAINUPDATEUI) + }, e.prototype.indexOfFunc = function(t, e) { + for (var o = 0; o < t.length; o++) + if (t[o] == e) return o; + return -1 + }, e.prototype.removeFunc = function(t, e) { + var o = this.indexOfFunc(t, e); + o > -1 && t.splice(o, 1) + }, e.prototype.nextRoomIsUnloack = function(t) { + void 0 === t && (t = !1); + var e = s.default.getHourseUnlockData(t); + e && (console.log("unlockData ### = " + JSON.stringify(e)), 0 == this.upgradeArr.length && (this.updateLayout(), e.length <= 4 ? this.houseLayer.getComponent(m.default).moveWithRoomId(l.ROOMTYPE.ROOMONE) : 4 < e.length && e.length < 8 ? this.houseLayer.getComponent(m.default).moveWithRoomId(l.ROOMTYPE.ROOMTWO) : 8 <= e.length && e.length < 11 && this.houseLayer.getComponent(m.default).moveWithRoomId(l.ROOMTYPE.ROOMTHREE))) + }, e.prototype.setBuildStatus = function(t, e, o) { + var n = "house_" + t.house, + a = "room_" + t.room, + i = "mask_room_" + t.room, + r = ""; + "cat" == t.buildType ? r = t.buildType : "build" == t.buildType ? r = t.buildType + "_" + t.buildid : "skin" == t.buildType && (r = "cat"); + var c = this.wholeBuildHouse.getChildByName(n), + s = c.getChildByName(a), + d = c.getChildByName(i), + h = s.getChildByName(r), + m = h.getChildByName("lock"), + g = h.getChildByName("unLock"); + e && (d.active = !1); + var y = m.convertToWorldSpaceAR(cc.v2(0, 0)), + v = c.convertToNodeSpaceAR(y); + if (e && o) { + var b = cc.instantiate(this.particlePrefab); + if (c.addChild(b), b.x = v.x, b.y = v.y, e && "cat" == t.buildType) { + var _ = "audio/sound/Unlock_Cat.mp3"; + u.default.playAudioMusic(_, !1) + } else e && "build" == t.buildType ? (_ = "audio/sound/Unlock_Furniture.mp3", u.default.playAudioMusic(_, !1)) : e && "skin" == t.buildType && (_ = "audio/sound/Unlock_Cat.mp3", u.default.playAudioMusic(_, !1)); + var N = this; + cc.tween(m).to(.1, { + scale: 0 + }).call(function() { + m.active = !e, g.active = e, cc.tween(g).set({ + scale: 0 + }).to(.1, { + scale: 1.2 + }).to(.1, { + scale: 1 + }).to(.1, { + scale: 1.1 + }).to(.1, { + scale: 1 + }).call(function() { + if (console.log("家具动画播放完成"), N.nextRoomIsUnloack(), e && "cat" == t.buildType) { + var o = "1_Standby1"; + g.getChildByName("unLockImg").getComponent(p.default).play(o, 0), cc.game.emit("unlockBuildBtn", t.buildid) + } else e && "skin" == t.buildType && (o = "1_Standby_CloUnlock1", g.getChildByName("unLockImg").getComponent(p.default).play(o, 0), g.getChildByName("unLockImg").getComponent(f.default).playClothesAnimation(!0)); + cc.game.emit(l.EMITKEY.HIDEMASKLAYER, 12) + }, N).start() + }, N).start() + } else m.active = !e, g.active = e; + e && "cat" == t.buildType && (g.getChildByName("unLockImg").getComponent(p.default).play("1_Standby1", 0), g.getChildByName("unLockImg").getComponent(f.default).setCatData(t.buildid, this), this.catObj["cat_" + t.buildid] = g.getChildByName("unLockImg"), this.catObj["particle_" + t.buildid] = g.getChildByName("Particle_Unlock1")) + }, e.prototype.refreshCatCloth = function(t, e, o) { + this.catObj["cat_" + t].getComponent(f.default).updateSkin(o), e && this.catObj["particle_" + t].getComponent(cc.ParticleSystem).resetSystem() + }, e.prototype.touchStartFunc = function() { + c.default.addClickAudio() + }, e.prototype.hideWardrobelLayer = function() { + this.wardrobeLayer.getComponent(y.default).hideWardrobelLayer(), this.houseToMinDefault(); + var t = this.wardrobeLayer.getChildByName("changeClothes").active; + if (d.default.getInstance().mainPage == l.MAINPAGE.PAGEHOUSE && t) console.log("显示升级光标"), this.showUpgrade(); + else if (d.default.getInstance().mainPage == l.MAINPAGE.PAGEHOUSE) + for (var e in this.upgradeArr) + if (this.upgradeArr[e].getChildByName("icon-dish").active) { + console.log("有鱼 ######"), this.upgradeArr[e].getComponent(g.default).show(); + break + } + }, e.prototype.showUpgrade = function() { + var t = s.default.getUserData(); + if (!(t.playLevelId <= 2 && t.fish < 2)) { + for (var e in this.upgradeArr) this.upgradeArr[e].getComponent(g.default).show(); + if (this.upgradeArr.length) { + var o = this.upgradeArr[0]; + this.setClawNodeWithNode(o) + } + } + }, e.prototype.hideUpgrade = function() { + for (var t in this.upgradeArr) this.upgradeArr[t].getComponent(g.default).hide(); + this.upgradeArr.length && (this.upgradeArr[0], this.setClawNodeWithNode()), cc.isValid(this.clawNode) && this.isShowHouse && (console.log("释放猫爪子 ###### "), this.clawNode.destroy()) + }, e.prototype.touchCatFunc = function(t) { + d.default.getInstance().mainPage == l.MAINPAGE.PAGEHOUSE && this.hideUpgrade(), this.wardrobeLayer.getComponent(y.default).showWardrobelLayer(t, this) + }, e.prototype.houseToBigMiddle = function(t) { + var e = "cat_" + t, + o = this.catObj[e]; + this.houseLayer.getComponent(m.default).toBigMiddle(o) + }, e.prototype.houseToMinDefault = function() { + this.houseLayer.getComponent(m.default).toMinDefault() + }, i([_(cc.Node)], e.prototype, "mainUILayer", void 0), i([_(cc.Node)], e.prototype, "wholeBuildHouse", void 0), i([_(cc.Node)], e.prototype, "wardrobeLayer", void 0), i([_(cc.Node)], e.prototype, "houseLayer", void 0), i([_(cc.Node)], e.prototype, "topUiLayer", void 0), i([_(cc.Prefab)], e.prototype, "particlePrefab", void 0), i([_(cc.Prefab)], e.prototype, "upgradeTip", void 0), i([_(cc.Prefab)], e.prototype, "clawPrefab", void 0), i([_(cc.Node)], e.prototype, "clawNode", void 0), i([b], e) + }(cc.Component); + o.default = N, cc._RF.pop() + }, { + "../../pre/main/catClawPrefabs": "catClawPrefabs", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../common/native/audio": "audio", + "../common/spine": "spine", + "../manager/GameManager": "GameManager", + "../utils/uma/uma-sdk": "uma-sdk", + "./catNode": "catNode", + "./houseLayer": "houseLayer", + "./upgrade-tip": "upgrade-tip", + "./wardrobeLayer": "wardrobeLayer" + } + ], + mainLayer: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "b8c45Z6zn1ISr2PENniP8fC", "mainLayer"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../i18n/gd_language"), + c = t("../../i18n/i18n"), + s = t("../api/api-sheep"), + l = t("../common/dataTs"), + u = t("../common/enumConfig"), + p = t("../common/native/audio"), + d = t("../common/sdk"), + h = t("../game/gameLayer"), + f = t("../manager/data-manager"), + m = t("../manager/DateManager"), + g = t("../manager/GameManager"), + y = cc._decorator, + v = y.ccclass, + b = y.property, + _ = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.gameLayer = null, e.commonUIPrefab = null, e.commonUI = null, e.topicUIPrefab = null, e.topicUI = null, e + } + return a(e, t), e.prototype.start = function() { + cc.game.on(u.EMITKEY.BEGINGAME, this.beginGameFunc, this), cc.game.on(u.EMITKEY.SHOWMODULE, this.showModuleFunc, this), this.setupSubviews(), this.updateSubUI(), d.default.isPlatform(d.Platform.web) || this.preLoadVedio(), this.requestData() + }, e.prototype.requestData = function() { + l.default.isLogin() && this.requestMatchResult() + }, e.prototype.requestMatchResult = function() { + if (!f.default.getMatchResultData()) { + f.default.setMatchResultData(); + var t = this; + setTimeout(function() { + s.default.getMatchResult(2, function(e) { + t.showMatch(e) + }) + }, 1e3) + } + }, e.prototype.showMatch = function(t) { + if (t && t.data && t.data.topic && t.data.topic.id > 0 && t.data.topic.info && t.data.topic.info.uid > 0) { + var e = { + popName: "topicLastWinPop", + showPopData: t.data + }; + cc.game.emit("showPop", e) + } + }, e.prototype.onEnable = function() { + this.updateSubUI() + }, e.prototype.beginGameFunc = function() { + this.beginGame() + }, e.prototype.showModuleFunc = function(t) { + switch (void 0 === t && (t = u.MODULETYPE.COMMON), t) { + case u.MODULETYPE.COMMON: + this.commonUI.active = !0, this.topicUI.active = !1; + break; + case u.MODULETYPE.TOPIC: + this.commonUI.active = !1, this.topicUI.active = !0 + } + }, e.prototype.setupSubviews = function() { + this.topicUI = cc.instantiate(this.topicUIPrefab), this.topicUI.active = !1, this.node.addChild(this.topicUI), this.commonUI = cc.instantiate(this.commonUIPrefab), this.commonUI.active = !0, this.node.addChild(this.commonUI) + }, e.prototype.updateSubUI = function() { + this.node.active = !0, this.gameLayer.active = !1, this.playMainBgMusic(), cc.game.emit(u.EMITKEY.MAINUPDATEUI) + }, e.prototype.showMainLayer = function(t) { + void 0 === t && (t = u.GAMEOVER.NONE), cc.game.emit(u.EMITKEY.TTSTOPRECORD), cc.game.emit(u.EMITKEY.TTSTARTRECORD), console.log("回到主页面 = " + t), this.node.active = !0, this.gameLayer.active = !1, this.updateRewardData(t), this.playMainBgMusic(), cc.game.emit(u.EMITKEY.MAINUPDATEUI), g.default.getInstance().gameType == u.GAMETYPE.GAMEDAILY ? cc.game.emit(u.EMITKEY.UPDATETABBARRECEIVE, 2) : cc.game.emit(u.EMITKEY.UPDATETABBARRECEIVE, 1) + }, e.prototype.preLoadVedio = function() { + var t = l.default.GetVedioID(); + d.default.preloadVideoAd(t, function() { + console.log("预加载视频成功") + }, function() { + console.log("预加载视频失败") + }, function() {}, !0) + }, e.prototype.updateRewardData = function(t) { + switch (t) { + case u.GAMEOVER.LEVELFAIL: + g.default.getInstance().gameType == u.GAMETYPE.GAMELEVEL && l.default.resetSprintReward() + } + }, e.prototype.playMainBgMusic = function() { + p.default.playBGM() + }, e.prototype.beginGame = function() { + cc.game.emit(u.EMITKEY.TTSTARTRECORD); + var t = this, + e = 0, + o = m.default.format(u.CALENDARNAMES[4], new Date); + if (o) { + var n = o.split("-"); + n.length >= 3 && (e = Number(n[2])) + } + l.default.getLevelByID(e, function(o) { + console.log("关卡数据:", e, o), t.gameLayer.activeInHierarchy ? console.log("已经打开 mainLayer 1") : o.length < 1 ? cc.game.emit("showMainTips", c.default.instance.trans(r.GDLanguage.level_inadequate)) : (t.beginGameData(o), f.default.setGameLevelData(o)) + }) + }, e.prototype.beginGameData = function(t) { + var e = this; + cc.game.emit(u.EMITKEY.SHOWTRANSITLAYER, function(o) { + e.gameLayer.activeInHierarchy ? console.log("已经打开 mainLayer 2") : (console.log("可以打开了 mainLayer"), e.gameLayer.getComponent(h.default).initLevelLayer(t), e.node.active = !1, o()) + }) + }, i([b({ + type: cc.Node, + tooltip: "游戏节点" + })], e.prototype, "gameLayer", void 0), i([b({ + type: cc.Prefab, + tooltip: "common页面节点" + })], e.prototype, "commonUIPrefab", void 0), i([b({ + type: cc.Prefab, + tooltip: "topic节点" + })], e.prototype, "topicUIPrefab", void 0), i([v], e) + }(cc.Component); + o.default = _, cc._RF.pop() + }, { + "../../i18n/gd_language": "gd_language", + "../../i18n/i18n": "i18n", + "../api/api-sheep": "api-sheep", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../common/native/audio": "audio", + "../common/sdk": "sdk", + "../game/gameLayer": "gameLayer", + "../manager/DateManager": "DateManager", + "../manager/GameManager": "GameManager", + "../manager/data-manager": "data-manager" + } + ], + mainUiLayer: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "4db0ejDPE9I06u2DuGNxPAb", "mainUiLayer"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }, + r = this && this.__awaiter || function(t, e, o, n) { + return new(o || (o = Promise))(function(a, i) { + function r(t) { + try { + s(n.next(t)) + } catch (e) { + i(e) + } + } + + function c(t) { + try { + s(n.throw(t)) + } catch (e) { + i(e) + } + } + + function s(t) { + var e; + t.done ? a(t.value) : (e = t.value, e instanceof o ? e : new o(function(t) { + t(e) + })).then(r, c) + } + s((n = n.apply(t, e || [])).next()) + }) + }, + c = this && this.__generator || function(t, e) { + var o, n, a, i, r = { + label: 0, + sent: function() { + if (1 & a[0]) throw a[1]; + return a[1] + }, + trys: [], + ops: [] + }; + return i = { + next: c(0), + throw :c(1), + return :c(2) + }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { + return this + }), i; + + function c(t) { + return function(e) { + return s([t, e]) + } + } + + function s(i) { + if (o) throw new TypeError("Generator is already executing."); + for (; r;) try { + if (o = 1, n && (a = 2 & i[0] ? n.return : i[0] ? n.throw || ((a = n.return) && a.call(n), 0) : n.next) && !(a = a.call(n, i[1])).done) return a; + switch (n = 0, a && (i = [2 & i[0], a.value]), i[0]) { + case 0: + case 1: + a = i; + break; + case 4: + return r.label++, { + value: i[1], + done: !1 + }; + case 5: + r.label++, n = i[1], i = [0]; + continue; + case 7: + i = r.ops.pop(), r.trys.pop(); + continue; + default: + if (!(a = (a = r.trys).length > 0 && a[a.length - 1]) && (6 === i[0] || 2 === i[0])) { + r = 0; + continue + } + if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { + r.label = i[1]; + break + } + if (6 === i[0] && r.label < a[1]) { + r.label = a[1], a = i; + break + } + if (a && r.label < a[2]) { + r.label = a[2], r.ops.push(i); + break + } + a[2] && r.ops.pop(), r.trys.pop(); + continue + } + i = e.call(t, r) + } catch (c) { + i = [6, c], n = 0 + } finally { + o = a = 0 + } + if (5 & i[0]) throw i[1]; + return { + value: i[0] ? i[1] : void 0, + done: !0 + } + } + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var s = t("../common/CcJsFunc"), + l = t("../common/dataTs"), + u = t("../common/util"), + p = t("../common/enumConfig"), + d = t("../manager/report-common"), + h = t("../manager/GameManager"), + f = t("../manager/DateManager"), + m = t("../common/sdk"), + g = t("../api/api-sheep"), + y = t("../common/native/tt-sdk"), + v = t("../manager/data-manager"), + b = t("../common/native/audio"), + _ = cc._decorator, + N = _.ccclass, + C = _.property, + w = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.beginBtn = null, e.setupBtn = null, e.rankBtn = null, e.meBtn = null, e.focusBtn = null, e.childBtn = null, e.deskBtn = null, e.timeNode = null, e.timeLabel = null, e.bottomRankNode = null, e.levelNumLabel = null, e.bulletNode = null, e.bulletBtn = null, e.collectBtn = null, e.topicBtn = null, e.friendBtn = null, e.ttRankBtn = null, e.popCallbackCollect = null, e.beginButtonDuration = 0, e.updateTime = 0, e + } + return a(e, t), e.prototype.update = function(t) { + this.beginButtonDuration += t, this.updateTime += t, this.updateTime >= 1 && (this.updateTime = 0, this.updateTimeFunc()) + }, e.prototype.updateTimeFunc = function() { + var t = f.default.format(p.CALENDARNAMES[8], new Date).split(" "); + if (!(t.length < 2)) { + var e = t[1].split(":"); + if (!(e.length < 3)) { + var o = 3600 * (24 - Number(e[0]) - 1) + 60 * (60 - Number(e[1]) - 1) + (60 - Number(e[2])); + if (this.timeNode.activeInHierarchy) { + var n = u.default.formatTime(1e3 * o), + a = (n[1] < 10 ? "0" + n[1] : n[1]) + ":" + (n[2] < 10 ? "0" + n[2] : n[2]) + ":" + (n[3] < 10 ? "0" + n[3] : n[3]) + " 重置"; + this.timeLabel.string = a + } + this.setMainLayerData() + } + } + }, e.prototype.onEnable = function() { + this.topicBtn.getChildByName("tag_icon").active = !v.default.getMatchResultData(), h.default.getInstance().collectionMark.topicClothesNum > 0 ? this.collectBtn.getChildByName("tag_icon").active = !0 : this.collectBtn.getChildByName("tag_icon").active = !1 + }, e.prototype.start = function() { + cc.game.on(p.EMITKEY.MAINUPDATEUI, this.setMainLayerData, this), cc.game.on(p.EMITKEY.RANKUSERINFOSUCCESS, this.rankUserInfoFunc, this), cc.game.on(p.EMITKEY.BULLETSTATE, this.bulletStateFunc, this), this.bulletStateFunc(), s.default.addTargetTouchUpInside(this.setupBtn, this.setupTouchEnd.bind(this)), s.default.addTargetTouchUpInside(this.rankBtn, this.rankBtnFunc.bind(this)), s.default.addTargetTouchUpInside(this.ttRankBtn, this.rankBtnFunc.bind(this)), s.default.addTargetTouchUpInside(this.beginBtn, this.beginBtnEnd.bind(this)), s.default.addTargetTouchUpInside(this.focusBtn, this.focusBtnFunc.bind(this)), s.default.addTargetTouchUpInside(this.childBtn, this.childBtnFunc.bind(this)), s.default.addTargetTouchUpInside(this.deskBtn, this.deskBtnFunc.bind(this)), s.default.addTargetTouchUpInside(this.bulletBtn, this.bulletBtnFunc.bind(this)), s.default.addTargetTouchUpInside(this.collectBtn, this.collectBtnFunc.bind(this)), s.default.addTargetTouchUpInside(this.topicBtn, this.topicBtnFunc.bind(this)), s.default.addTargetTouchUpInside(this.friendBtn, this.friendBtnFunc.bind(this)), s.default.addTargetTouchUpInside(this.meBtn, this.meBtnFunc.bind(this)), l.default.isLogin() ? (this.bulletBtn.active = !0, this.meBtn.active = !0) : (this.bulletBtn.active = !1, this.meBtn.active = !1), this.childBtn.active = !1, this.deskBtn.active = !1, this.focusBtn.active = !1, y.default.isSupportFocusDouYin() && (this.focusBtn.active = !0), this.setMainLayerData(), this.updateTimeFunc(), this.popCallbackCollect = { + freeCallBack: this.freeCallBackFunc.bind(this), + exitCallBack: this.exitCallBackFunc.bind(this) + }, this.bottomRankNode.active = !1, this.requestData(), l.default.isPlatform(l.GDPlatform.wx) || l.default.isPlatform(l.GDPlatform.web) ? (this.friendBtn.active = !0, this.rankBtn.active = !0) : (this.friendBtn.active = !1, this.rankBtn.active = !1), l.default.isPlatform(l.GDPlatform.tt) || l.default.isPlatform(l.GDPlatform.oppo) || l.default.isPlatform(l.GDPlatform.vivo) ? this.ttRankBtn.active = !0 : this.ttRankBtn.active = !1 + }, e.prototype.meBtnFunc = function() { + console.log("个人资料"), cc.game.emit("showPop", { + popName: "personalPop", + showPopData: {} + }) + }, e.prototype.friendBtnFunc = function() { + console.log("朋友圈"), cc.game.emit("showPop", { + popName: "todayRankPop", + showPopData: {} + }) + }, e.prototype.beginBtnEnd = function() { + console.log("开始游戏"), this.beginTouchEnd(1) + }, e.prototype.topicBtnFunc = function() { + console.log("今日话题"), this.beginTouchEnd(2) + }, e.prototype.collectBtnFunc = function() { + console.log("收藏"); + var t = { + popName: "topicCollectPop", + showPopData: { + topicClothesNum: h.default.getInstance().collectionMark.topicClothesNum, + changeClothesCb: this.changeClothesFunc.bind(this) + } + }; + cc.game.emit("showPop", t), this.collectBtn.getChildByName("tag_icon").active = !1, h.default.getInstance().collectionMark.topicClothesNum = 0 + }, e.prototype.changeClothesFunc = function(t) { + g.default.updateUserSkin(t, function() {}), setTimeout(function() { + cc.game.emit(p.EMITKEY.CHANGESHEEPCLOTHES) + }, 1e3) + }, e.prototype.bulletStateFunc = function() { + var t = l.default.getItem(p.STORAGEKEY.BULLETSWITCH); + if (!t) return console.log("bullet = " + t), void l.default.setItem(p.STORAGEKEY.BULLETSWITCH, 1); + this.bulletNode.opacity = 1 == t ? 255 : 0 + }, e.prototype.rankUserInfoFunc = function() { + l.default.isLogin() ? (this.bulletBtn.active = !0, this.meBtn.active = !0) : (this.bulletBtn.active = !1, this.meBtn.active = !1) + }, e.prototype.bulletBtnFunc = function() { + h.default.getInstance().bulletTime <= 0 ? cc.game.emit(p.EMITKEY.SHOWMAINTIPS, "一分钟只能发一条弹幕哦~") : (console.log("发弹幕"), cc.game.emit("showPop", { + popName: "bulletScreenPop", + showPopData: {} + })) + }, e.prototype.focusBtnFunc = function() { + console.log("关注"), y.default.focusDouYin() + }, e.prototype.childBtnFunc = function() { + console.log("转跳"), y.default.gameBox() + }, e.prototype.deskBtnFunc = function() { + console.log("桌面"), y.default.addShortcut() + }, e.prototype.requestData = function() { + l.default.isLogin() && g.default.requestUserInfo() + }, e.prototype.exitCallBackFunc = function() {}, e.prototype.showBottomRankNode = function(t) { + t.index ? (this.bottomRankNode.active = !0, this.bottomRankNode.getChildByName("rank").getComponent(cc.Label).string = "第" + t.index + "名") : this.bottomRankNode.active = !1 + }, e.prototype.freeCallBackFunc = function() { + console.log("观看广告 ###### "); + var t = this, + e = l.default.GetVedioID(); + m.default.watchAdVideo({ + id: e, + success: function() { + console.log("成功 sdk"), t.beginTouchCallbackFunc() + }, + fail: function() { + console.log("失败") + }, + nofit: function() { + t.shareTTAction() + } + }) + }, e.prototype.shareTTAction = function() { + var t = this; + if (m.default.isPlatform(m.Platform.wx)) { + var e = l.default.GetVedioID(), + o = l.default.getUserData().openid; + m.default.share(o, e, function() { + t.shareCbMethod() + }, function() { + cc.game.emit(p.EMITKEY.SHOWMAINTIPS, "分享失败,请分享微信群与好友PK") + }) + } else if (m.default.isPlatform(m.Platform.tt)) { + var n = { + popName: "shareNodePop", + showPopData: { + type: 2, + shareCb: this.shareCbMethod.bind(this) + } + }; + cc.game.emit("showPop", n) + } + }, e.prototype.shareCbMethod = function() { + console.log("分享成功 ######"), this.beginTouchCallbackFunc() + }, e.prototype.rankBtnFunc = function() { + console.log("排行榜"), cc.game.emit("showPop", { + popName: "sheepRankPop", + showPopData: { + popCallbackCollect: null + } + }) + }, e.prototype.setMainLayerData = function() { + this.timeNode.active = !1; + var t = v.default.todayIsWin(); - 1 == t ? this.levelNumLabel.string = "加入羊群" : 0 == t ? this.levelNumLabel.string = "再次挑战" : 1 == t && (this.levelNumLabel.string = "已加入羊群", this.timeNode.active = !0) + }, e.prototype.setupTouchEnd = function() { + console.log("打开设置弹窗"), cc.game.emit("showPop", { + popName: "setupPop", + showPopData: { + popCallbackCollect: null, + setupType: 1 + } + }) + }, e.prototype.beginTouchEnd = function(t) { + return r(this, void 0, Promise, function() { + var e, o; + return c(this, function(n) { + switch (n.label) { + case 0: + return m.default.isPlatform(m.Platform.tt) ? 0 != l.default.isLogin() ? [3, 5] : [4, g.default.ttLogin()] : [3, 6]; + case 1: + n.sent(), n.label = 2; + case 2: + return n.trys.push([2, 4, , 5]), [4, g.default.getUserInfo()]; + case 3: + return n.sent(), [3, 5]; + case 4: + return e = n.sent(), cc.warn("获取用户信息失败,可能用户拒绝授权", e), [3, 5]; + case 5: + return [3, 17]; + case 6: + return m.default.isPlatform(m.Platform.wx) ? 0 != l.default.isLogin() ? [3, 11] : [4, g.default.wxLogin()] : [3, 12]; + case 7: + n.sent(), n.label = 8; + case 8: + return n.trys.push([8, 10, , 11]), [4, g.default.getWxUserInfo()]; + case 9: + return n.sent(), [3, 11]; + case 10: + return o = n.sent(), cc.warn("获取用户信息失败,可能用户拒绝授权", o), [3, 11]; + case 11: + return [3, 17]; + case 12: + return m.default.isPlatform(m.Platform.oppo) ? 0 != l.default.isLogin() ? [3, 14] : [4, g.default.oppoLogin()] : [3, 15]; + case 13: + n.sent(), n.label = 14; + case 14: + return [3, 17]; + case 15: + return m.default.isPlatform(m.Platform.vivo) ? 0 != l.default.isLogin() ? [3, 17] : [4, g.default.vivoLogin()] : [3, 17]; + case 16: + n.sent(), n.label = 17; + case 17: + return console.log("登录成功,或者已登录 ###### "), 1 != t ? [3, 18] : (this.beginGameStatus(), [3, 20]); + case 18: + return 2 != t ? [3, 20] : [4, g.default.getTopicData(function() {})]; + case 19: + n.sent(), d.default.reportTACommon("game_start", { + type: "话题挑战" + }), v.default.topicModel && v.default.topicModel.info && 0 != v.default.topicModel.info.type ? this.enterTopicGame() : (this.showChoosePop(0), console.log("加入话题")), n.label = 20; + case 20: + return [2] + } + }) + }) + }, e.prototype.showChoosePop = function(t) { + var e = { + popName: "topicChoosePop", + showPopData: { + type: t, + chooseCallback: this.chooseCallbackFunc.bind(this) + } + }; + cc.game.emit("showPop", e) + }, e.prototype.chooseCallbackFunc = function() { + var t = this; + this.enterTopicGame(), setTimeout(function() { + t.showTeamPop() + }, 1500) + }, e.prototype.enterTopicGame = function() { + d.default.reportTACommon("topic_join_ad", {}), cc.game.emit(p.EMITKEY.SHOWTRANSITLAYER, function() { + cc.game.emit(p.EMITKEY.SHOWMODULE, p.MODULETYPE.TOPIC) + }) + }, e.prototype.showTeamPop = function() { + cc.game.emit("showPop", { + popName: "topicJoinedPop", + showPopData: {} + }) + }, e.prototype.beginGameStatus = function() { + var t = v.default.todayIsWin(); + if (h.default.getInstance().todayState = t, console.log("state = ", t), d.default.reportTACommon("game_start", { + type: "每日挑战" + }), h.default.getInstance().unLimitVideo = !0, -1 == t) this.gotoGame(); + else if (0 == t) this.videoGotoGame(); + else if (1 == t) this.videoGotoGame(); + }, e.prototype.gotoGame = function() { + var t = { + popName: "nothingPop", + showPopData: { + beginTouchCallback: this.beginTouchCallbackFunc.bind(this), + popType: 0 + } + }; + cc.game.emit("showPop", t) + }, e.prototype.videoGotoGame = function() { + var t = f.default.format(p.CALENDARNAMES[5], new Date), + e = f.default.format(p.CALENDARNAMES[6], new Date), + o = l.default.getDailyData(t, e), + n = 0; + if (o && o.unLimitVideo && (n = o.unLimitVideo), n >= 3 || h.default.getInstance().unLimitVideo) h.default.getInstance().unLimitVideo = !0, this.beginTouchCallbackFunc(), console.log("免广告 ###### = " + n); + else { + h.default.getInstance().unLimitVideo = !1; + var a = { + popName: "noLimitPop", + showPopData: { + playVideoFunc: this.playVideoFunc.bind(this), + noPlayVideoFunc: this.noPlayVideoFunc.bind(this), + videoCount: n + } + }; + cc.game.emit(p.EMITKEY.SHOWPOP, a), console.log("不免广告 ###### = " + n) + } + }, e.prototype.playVideoFunc = function() { + console.log("观看广告"); + var t = this, + e = l.default.GetVedioID(); + m.default.watchAdVideo({ + id: e, + success: function() { + console.log("成功 sdk"); + var e = f.default.format(p.CALENDARNAMES[5], new Date), + o = f.default.format(p.CALENDARNAMES[6], new Date), + n = l.default.getDailyData(e, o), + a = 1; + n ? (a = Number(n.unLimitVideo) + 1, n.unLimitVideo = a, a >= 3 && d.default.reportTACommon("unlimited_challenges_ad", {})) : n = { + dailyID: o, + isWin: !1, + unLimitVideo: a, + sheepNum: -1 + }, l.default.saveDailyData(e, o, n), a >= 3 ? (h.default.getInstance().unLimitVideo = !0, t.beginTouchCallbackFunc(), cc.game.emit(p.EMITKEY.CLOSEALLPOP)) : t.videoGotoGame() + }, + fail: function() { + console.log("失败") + }, + nofit: function() { + t.shareTTAction() + } + }) + }, e.prototype.noPlayVideoFunc = function() { + var t = { + popName: "getPropPop", + showPopData: { + popCallbackCollect: this.popCallbackCollect, + popType: 6 + } + }; + cc.game.emit(p.EMITKEY.SHOWPOP, t) + }, e.prototype.beginTouchCallbackFunc = function() { + this.beginButtonDuration >= 1 ? (this.beginButtonDuration = 0, h.default.setGameType(p.GAMETYPE.GAMEDAILY), b.default.playBGM(), cc.game.emit(p.EMITKEY.BEGINGAME)) : console.log("不能连续点击") + }, i([C({ + type: cc.Node, + tooltip: "开始游戏" + })], e.prototype, "beginBtn", void 0), i([C(cc.Node)], e.prototype, "setupBtn", void 0), i([C({ + type: cc.Node, + tooltip: "wx排行榜" + })], e.prototype, "rankBtn", void 0), i([C({ + type: cc.Node, + tooltip: "个人资料" + })], e.prototype, "meBtn", void 0), i([C({ + type: cc.Node, + tooltip: "关注抖音号" + })], e.prototype, "focusBtn", void 0), i([C({ + type: cc.Node, + tooltip: "托儿所" + })], e.prototype, "childBtn", void 0), i([C({ + type: cc.Node, + tooltip: "添加到桌面" + })], e.prototype, "deskBtn", void 0), i([C(cc.Node)], e.prototype, "timeNode", void 0), i([C(cc.Label)], e.prototype, "timeLabel", void 0), i([C(cc.Node)], e.prototype, "bottomRankNode", void 0), i([C(cc.Label)], e.prototype, "levelNumLabel", void 0), i([C({ + type: cc.Node, + tooltip: "弹幕页面" + })], e.prototype, "bulletNode", void 0), i([C({ + type: cc.Node, + tooltip: "弹幕" + })], e.prototype, "bulletBtn", void 0), i([C({ + type: cc.Node, + tooltip: "换装" + })], e.prototype, "collectBtn", void 0), i([C({ + type: cc.Node, + tooltip: "今日话题页面" + })], e.prototype, "topicBtn", void 0), i([C({ + type: cc.Node, + tooltip: "好友排行榜" + })], e.prototype, "friendBtn", void 0), i([C({ + type: cc.Node, + tooltip: "tt排行榜" + })], e.prototype, "ttRankBtn", void 0), i([N], e) + }(cc.Component); + o.default = w, cc._RF.pop() + }, { + "../api/api-sheep": "api-sheep", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../common/native/audio": "audio", + "../common/native/tt-sdk": "tt-sdk", + "../common/sdk": "sdk", + "../common/util": "util", + "../manager/DateManager": "DateManager", + "../manager/GameManager": "GameManager", + "../manager/data-manager": "data-manager", + "../manager/report-common": "report-common" + } + ], + mapArea: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "67f71SJOXZGlKQEcc+5J3rk", "mapArea"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.blackLine = null, e.widthNum = 0, e.heightNum = 0, e.minBlockNum = 0, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.refreshMap = function(t, e, o) { + this.widthNum = t, this.heightNum = e, this.minBlockNum = o, this.node.removeAllChildren(); + var n = this.widthNum * this.minBlockNum, + a = this.heightNum * this.minBlockNum, + i = this.node.width / n; + this.node.height = i * a; + for (var r = 0; r <= n; r++) { + var c = r * i, + s = 0, + l = 0; + l = r % (this.minBlockNum / 2) == 0 ? 1 : 0, r % this.minBlockNum == 0 && (l = 2), this.addBlackLine(c, s, l, !0) + } + for (var u = 0; u <= a; u++) c = 0, s = -u * i, l = 0, l = u % (this.minBlockNum / 2) == 0 ? 1 : 0, u % this.minBlockNum == 0 && (l = 2), this.addBlackLine(c, s, l, !1) + }, e.prototype.addBlackLine = function(t, e, o, n) { + var a = cc.instantiate(this.blackLine); + 2 == o ? (a.height = 6, a.opacity = 50) : 1 == o ? (a.height = 4, a.opacity = 40) : (a.height = 2, a.opacity = 20), n ? (a.angle = -90, a.width = this.node.height) : (a.angle = 0, a.width = this.node.width), a.x = t, a.y = e, this.node.addChild(a) + }, i([s(cc.Prefab)], e.prototype, "blackLine", void 0), i([c], e) + }(cc.Component); + o.default = l, cc._RF.pop() + }, {} + ], + mapEditor: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "d6b62YDoXJBjYP9NnAI8e6T", "mapEditor"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../pre/mapEditor/blockEditorPrefab"), + c = t("../common/config"), + s = t("../common/key-map"), + l = t("./mapArea"), + u = cc._decorator, + p = u.ccclass, + d = u.property, + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mapArea = null, e.blockArea = null, e.blockEditorNode = null, e.blockEditorPrefab = null, e.widthNum = 0, e.heightNum = 0, e.moveBlockType = 0, e.moldType = 1, e.levelID = 0, e.blockNodeObj = {}, e.isDeleteBlock = !1, e.minBlockNum = 8, e.blockMaxWidth = 120, e.blockMaxHeight = 135, e.moveMinBlockNum = 1, e.newLevelDataObj = null, e + } + return a(e, t), e.prototype.start = function() { + window.xuxu = this, cc.game.on("refreshMapSizeData", this.refreshMapSizeData, this), cc.game.on("setBlockTypeData", this.setBlockTypeData, this), cc.game.on("initLevelData", this.initLevelData, this), this.node.on(cc.Node.EventType.MOUSE_DOWN, this.mouseDown, this), this.node.on(cc.Node.EventType.MOUSE_ENTER, this.mouseEnter, this), this.node.on(cc.Node.EventType.MOUSE_MOVE, this.mouseMove, this), this.node.on(cc.Node.EventType.MOUSE_LEAVE, this.mouseLeave, this), s.default.onKeyDownWithMeta("a", this.changeMouseStatus.bind(this)), s.default.onKeyDownWithMeta("1", this.changeBlockVoid.bind(this)), s.default.onKeyDownWithMeta("2", this.changeBlockType.bind(this)), s.default.onKeyDownWithMeta("3", this.changeRandomBlockType.bind(this)), s.default.onKeyDownWithMeta("4", this.changeMoveMinBlockNum.bind(this)), s.default.onKeyDownWithMeta("z", this.changeMouseStatus.bind(this)), s.default.onKeyDownWithMeta("x", this.changeBlockVoid.bind(this)), s.default.onKeyDownWithMeta("c", this.changeRandomBlockType.bind(this)), s.default.onKeyDownWithMeta("v", this.changeMoveMinBlockNum.bind(this)) + }, e.prototype.initLevelData = function(t) { + console.log("新地图数据:", t), this.newLevelDataObj = t.newLevelData, this.levelID = this.newLevelDataObj.levelKey, this.setLevelMapData() + }, e.prototype.setBlockTypeData = function(t) { + if (!this.newLevelDataObj) return !1; + this.newLevelDataObj.blockTypeData = t, console.log("设置关卡图块数据:", t) + }, e.prototype.refreshMapSizeData = function(t) { + if (!this.newLevelDataObj) return !1; + this.newLevelDataObj.widthNum = t.width, this.newLevelDataObj.heightNum = t.height, this.setLevelMapData() + }, e.prototype.setLevelMapData = function() { + this.initLevelAllBlock(), this.mapArea.getComponent(l.default).refreshMap(this.newLevelDataObj.widthNum, this.newLevelDataObj.heightNum, this.minBlockNum) + }, e.prototype.mouseDown = function(t) { + if (!this.newLevelDataObj || this.isDeleteBlock) return !1; + var e = t.getLocation(), + o = this.node.convertToNodeSpaceAR(e), + n = this.getMouseBlockPoint(o), + a = this.getMouseBlockArea(n); + this.clickAddMapBlockNode(a), console.log("lineObj:", a.rolNum, a.rowNum) + }, e.prototype.mouseEnter = function(t) { + if (!this.newLevelDataObj || this.isDeleteBlock) return !1; + this.blockEditorNode.active = !0; + var e = t.getLocation(), + o = this.node.convertToNodeSpaceAR(e); + this.blockEditorNode.x = o.x, this.blockEditorNode.y = o.y; + var n = this.node.width / this.newLevelDataObj.widthNum; + this.blockEditorNode.scale = n / this.blockMaxWidth, this.blockEditorNode.getComponent(r.default).setBlockImgType(this.moveBlockType, this.moldType) + }, e.prototype.mouseMove = function(t) { + if (!this.newLevelDataObj || this.isDeleteBlock) return !1; + var e = t.getLocation(), + o = this.node.convertToNodeSpaceAR(e), + n = this.getMouseBlockPoint(o); + this.blockEditorNode.x = n.x, this.blockEditorNode.y = n.y + }, e.prototype.mouseLeave = function() { + if (!this.newLevelDataObj || this.isDeleteBlock) return !1; + this.blockEditorNode.active = !1 + }, e.prototype.getMouseBlockArea = function(t) { + var e = this.newLevelDataObj.widthNum * this.minBlockNum, + o = (this.heightNum, this.minBlockNum, this.node.width / e); + return { + rolNum: Math.floor(t.x / o), + rowNum: Math.floor(Math.abs(t.y) / o) + } + }, e.prototype.getMouseBlockPoint = function(t) { + var e = this.newLevelDataObj.widthNum * this.minBlockNum, + o = (this.heightNum, this.minBlockNum, this.node.width / e * this.moveMinBlockNum), + n = Math.floor(t.x / o) * o, + a = -Math.floor(Math.abs(t.y) / o) * o; + return cc.v2(n, a) + }, e.prototype.clickAddMapBlockNode = function(t) { + var e = this.getBlockLayerIndex(t), + o = { + id: e + "-" + t.rolNum + "-" + t.rowNum, + type: this.moveBlockType, + rolNum: t.rolNum, + rowNum: t.rowNum, + layerNum: e, + moldType: this.moldType, + blockNode: null + }; + this.newLevelDataObj.levelData[e] ? this.newLevelDataObj.levelData[e].push(o) : (this.newLevelDataObj.levelData[e] = [], this.newLevelDataObj.levelData[e].push(o)), console.log("添加完数据:", this.newLevelDataObj.levelData), this.addBlockEditorNode(t.rolNum, t.rowNum, e, this.moveBlockType, this.moldType) + }, e.prototype.initLevelAllBlock = function() { + this.blockNodeObj = {}, this.blockArea.removeAllChildren(); + var t = this.newLevelDataObj.levelData; + for (var e in t) + for (var o in t[e]) this.addBlockEditorNode(t[e][o].rolNum, t[e][o].rowNum, t[e][o].layerNum, t[e][o].type, t[e][o].moldType) + }, e.prototype.addBlockEditorNode = function(t, e, o, n, a) { + var i = cc.instantiate(this.blockEditorPrefab), + c = this.newLevelDataObj.widthNum * this.minBlockNum, + s = this.node.width / c, + l = t * s, + u = -e * s, + p = this.node.width / this.newLevelDataObj.widthNum; + i.scale = p / this.blockMaxWidth, i.x = l, i.y = u, i.getComponent(r.default).setBlockImgType(n, this.moldType), i.getComponent(r.default).setBlockLayerNum(t, e, o, a, this.deleteBlock.bind(this)); + var d = t + "-" + e + "-" + o; + this.blockNodeObj[d] = i, this.blockArea.addChild(i), cc.game.emit("setBlockNum") + }, e.prototype.deleteBlock = function(t, e, o) { + if (this.isDeleteBlock) { + var n = t + "-" + e + "-" + o; + this.blockNodeObj[n] && (this.blockNodeObj[n].destroy(), delete this.blockNodeObj[n]); + var a = this.newLevelDataObj.levelData; + if (a[o]) + for (var i = 0; i < a[o].length; i++) a[o][i].rolNum == t && a[o][i].rowNum == e && a[o].splice(i, 1); + cc.game.emit("setBlockNum") + } + }, e.prototype.getBlockLayerIndex = function(t) { + var e = this.newLevelDataObj.levelData, + o = 1; + for (var n in e) + for (var a = e[n], i = 0; i < a.length; i++) + if (a[i]) { + var r = t.rolNum - this.minBlockNum, + c = t.rolNum + this.minBlockNum, + s = t.rowNum - this.minBlockNum, + l = t.rowNum + this.minBlockNum, + u = a[i]; + u.rolNum > r && u.rolNum < c && u.rowNum > s && u.rowNum < l && u.layerNum + 1 > o && (o = u.layerNum + 1) + } + return o + }, e.prototype.changeMoveMinBlockNum = function() { + 1 == this.moveMinBlockNum ? this.moveMinBlockNum = 4 : this.moveMinBlockNum = 1 + }, e.prototype.changeRandomBlockType = function() { + this.moldType = 2, this.moveBlockType = 0, this.blockEditorNode.getComponent(r.default).setBlockImgType(this.moveBlockType, this.moldType) + }, e.prototype.changeBlockVoid = function() { + this.moldType = 1, this.moveBlockType = 0, this.blockEditorNode.getComponent(r.default).setBlockImgType(this.moveBlockType, this.moldType) + }, e.prototype.changeBlockType = function() { + this.moveBlockType++, this.moldType = 1, this.moveBlockType > c.default.blockTypeConfig[c.default.blockTypeConfig.length - 1] && (this.moveBlockType = 0), this.blockEditorNode.getComponent(r.default).setBlockImgType(this.moveBlockType, this.moldType) + }, e.prototype.changeMouseStatus = function() { + if (console.log("command+a"), this.isDeleteBlock) { + console.log("this.isDeleteBlock", this.isDeleteBlock), this.isDeleteBlock = !1, this.blockEditorNode.active = !0; + var t = this.node.width / this.newLevelDataObj.widthNum; + this.blockEditorNode.scale = t / this.blockMaxWidth + } else console.log("this.isDeleteBlock", this.isDeleteBlock), this.isDeleteBlock = !0, this.blockEditorNode.active = !1 + }, i([d(cc.Node)], e.prototype, "mapArea", void 0), i([d(cc.Node)], e.prototype, "blockArea", void 0), i([d(cc.Node)], e.prototype, "blockEditorNode", void 0), i([d(cc.Prefab)], e.prototype, "blockEditorPrefab", void 0), i([p], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "../../pre/mapEditor/blockEditorPrefab": "blockEditorPrefab", + "../common/config": "config", + "../common/key-map": "key-map", + "./mapArea": "mapArea" + } + ], + maskLayer: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "5fe07xHyi5IB5UwR8crAg1t", "maskLayer"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("./enumConfig"), + c = cc._decorator, + s = c.ccclass, + l = (c.property, function(t) { + function e() { + return null !== t && t.apply(this, arguments) || this + } + return a(e, t), e.prototype.start = function() { + this.node.active = !1, cc.game.on(r.EMITKEY.SHOWMASKLAYER, this.showMaskLayer, this), cc.game.on(r.EMITKEY.HIDEMASKLAYER, this.hideMaskLayer, this), this.node.on(cc.Node.EventType.TOUCH_START, this.starFunc, this), this.node.on(cc.Node.EventType.TOUCH_END, this.endFunc, this), this.node.on(cc.Node.EventType.TOUCH_MOVE, this.moveFunc, this), this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.cancelFunc, this) + }, e.prototype.showMaskLayer = function() { + this.node.active = !0 + }, e.prototype.hideMaskLayer = function() { + this.node.active = !1 + }, e.prototype.starFunc = function(t) { + t.stopPropagation() + }, e.prototype.endFunc = function(t) { + t.stopPropagation() + }, e.prototype.moveFunc = function(t) { + t.stopPropagation() + }, e.prototype.cancelFunc = function(t) { + t.stopPropagation() + }, i([s], e) + }(cc.Component)); + o.default = l, cc._RF.pop() + }, { + "./enumConfig": "enumConfig" + } + ], + mask: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "29fbe5db7JFWJL2hqkjASq4", "mask"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = (r.property, function(t) { + function e() { + return null !== t && t.apply(this, arguments) || this + } + return a(e, t), e.prototype.start = function() { + this.node.on(cc.Node.EventType.TOUCH_START, this.starFunc, this), this.node.on(cc.Node.EventType.TOUCH_END, this.endFunc, this), this.node.on(cc.Node.EventType.TOUCH_MOVE, this.moveFunc, this), this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.cancelFunc, this) + }, e.prototype.starFunc = function(t) { + t.stopPropagation() + }, e.prototype.endFunc = function(t) { + t.stopPropagation() + }, e.prototype.moveFunc = function(t) { + t.stopPropagation() + }, e.prototype.cancelFunc = function(t) { + t.stopPropagation() + }, i([c], e) + }(cc.Component)); + o.default = s, cc._RF.pop() + }, {} + ], + "mesh-vertex": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "a29abOYIg9Li5/yGTvFnVbF", "mesh-vertex"), Object.defineProperty(o, "__esModule", { + value: !0 + }), o.MeshVertex = void 0; + o.MeshVertex = function(t, e, o) { + this.position = t, this.normal = e, this.uv = o + }, cc._RF.pop() + }, {} + ], + moveOutArea: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "f88d3tXmpFFjbC+QpZh+Ueh", "moveOutArea"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/enumConfig"), + c = t("./crushArea"), + s = cc._decorator, + l = s.ccclass, + u = s.property, + p = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.crushAreaNode = null, e.crushAreaArgs = null, e.blockMaxWidth = 120, e.parentComp = null, e.newScale = .8, e.newAddY = 8, e.moveOutObj = { + 1: [], + 2: [], + 3: [] + }, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.initMoveOutArea = function(t) { + this.node.removeAllChildren(), this.parentComp = t, this.moveOutObj = { + 1: [], + 2: [], + 3: [] + } + }, e.prototype.addThreeOutBlock = function(t) { + for (var e = 0; e < t.length; e++) { + var o = e + 1; + this.moveOutObj[o].push(t[e]); + var n = t[e], + a = n.node.convertToWorldSpaceAR(cc.v2(0, 0)), + i = this.node.convertToNodeSpaceAR(a); + n.node.removeFromParent(!1), n.node.x = i.x, n.node.y = i.y, n.cardDataObj.moldType = 1, n.updateBlockNodeData(n.cardDataObj, this.removeCardNode.bind(this)), this.node.addChild(n.node) + } + this.updateBlockPosStatus() + }, e.prototype.cancelAddBlockFunc = function(t) { + this.moveOutObj[t.moveOutKey].push(t); + var e = t.node.convertToWorldSpaceAR(cc.v2(0, 0)), + o = this.node.convertToNodeSpaceAR(e); + t.node.removeFromParent(!1), t.node.x = o.x, t.node.y = o.y, this.node.addChild(t.node), this.updateBlockPosStatus() + }, e.prototype.checkGameWin = function() { + for (var t in this.moveOutObj) + if (this.moveOutObj[t].length > 0) return !1; + return !0 + }, e.prototype.updateBlockPosStatus = function() { + for (var t in this.moveOutObj) + for (var e = Number(t) * this.blockMaxWidth * this.newScale - this.blockMaxWidth * this.newScale / 2, o = function(o) { + var a = n.moveOutObj[t][o], + i = o * n.newAddY; + o < n.moveOutObj[t].length - 1 ? a.setStatus(!1, n.newScale) : a.setStatus(!0, n.newScale), a.node.x != e || a.node.y != i ? (a.node.stopAllActions(), cc.tween(a.node).to(.15, { + x: e, + y: i, + scale: n.newScale + }).call(function() { + a.isChoosed = !1, cc.game.emit(r.EMITKEY.HIDEMASKLAYER, 8) + }, n).start()) : (a.isChoosed = !1, cc.game.emit(r.EMITKEY.HIDEMASKLAYER, 9)) + }, n = this, a = 0; a < this.moveOutObj[t].length; a++) o(a) + }, e.prototype.removeCardNode = function(t) { + if (!(this.crushAreaNode.getComponent(c.default).getCrushBlockNum() >= 7)) { + this.crushAreaNode.setSiblingIndex(10), this.crushAreaArgs.setSiblingIndex(10); + var e = 1; + for (var o in this.moveOutObj) + for (var n = 0; n < this.moveOutObj[o].length; n++) { + var a = t.cardDataObj; + if (this.moveOutObj[o][n].cardDataObj.layerNum == a.layerNum && this.moveOutObj[o][n].cardDataObj.rolNum == a.rolNum && this.moveOutObj[o][n].cardDataObj.rowNum == a.rowNum) { + e = Number(o), this.moveOutObj[o].splice(n, 1), this.updateBlockPosStatus(); + break + } + } + this.parentComp.crushBlockNode(t), t.comeParent = "moveOutArea", t.moveOutKey = e + } + }, i([u(cc.Node)], e.prototype, "crushAreaNode", void 0), i([u(cc.Node)], e.prototype, "crushAreaArgs", void 0), i([l], e) + }(cc.Component); + o.default = p, cc._RF.pop() + }, { + "../common/enumConfig": "enumConfig", + "./crushArea": "crushArea" + } + ], + "native-bridge": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "2c85cEMdLpBjqoP7dN6ARgY", "native-bridge"), Object.defineProperty(o, "__esModule", { + value: !0 + }); + var n = t("../sdk"), + a = t("./native-def"), + i = t("./native-event"), + r = function() { + function t() {} + return t.leitingShareReq = function(e) { + t.shareInfo = e, t.callNative(a.NativeFun.leitingShare, { + manner: e.manner, + params: JSON.stringify(e.param) + }) + }, t.leitingLogin = function(e) { + t.loginInfo = e, cc.director.getScene().name, cc.game.emit(i.NativeEvent.LeitingLoginInfo, e) + }, t.leitingShare = function(e) { + t.shareInfo && ("1" == e.status ? t.shareInfo.success && t.shareInfo.success(!0) : t.shareInfo.fail && t.shareInfo.fail(!0), t.shareInfo.complete && t.shareInfo.complete("1" == e.status), t.shareInfo = null) + }, t.leitingReport = function(e, o) { + void 0 === o && (o = {}); + var n = JSON.stringify(o); + t.callNative(a.NativeFun.leitingEventReport, { + plugName: "FF", + eventKey: e + "," + e, + eventValue: n + }) + }, t.callNative = function(t, e) { + void 0 === e && (e = {}), console.log("callNative", "method", t, "param", e), window.jsb ? n.default.isPlatform(n.Platform.android) ? jsb.reflection.callStaticMethod("org/cocos2dx/javascript/CocosBridge", "callNative", "(Ljava/lang/String;Ljava/lang/String;)V", t, JSON.stringify(e)) : n.default.isPlatform(n.Platform.ios) && jsb.reflection.callStaticMethod("CocosBridge", "callNative:withParam:", t, JSON.stringify(e)) : console.log(t, " support on jsb only") + }, t.CocosCaller = function(e, o) { + console.log("CocosCaller", e, o); + var n = JSON.parse(o); + switch (e) { + case a.CocosFun.androidParamsInfo: + t.androidInfo = n; + break; + case a.CocosFun.setMedia: + t.media = n.value; + break; + case a.CocosFun.leitingLogin: + t.leitingLogin(n); + break; + case a.CocosFun.leitingShare: + t.leitingShare(n); + break; + case a.CocosFun.leitingGetDeviceInfo: + t.deviceInfo = n, cc.game.emit(i.NativeEvent.LeitingGetDeviceInfo); + break; + case a.CocosFun.outAppPayNotify: + t.loginInfo = n; + break; + case a.CocosFun.overseasUserBindCallback: + cc.game.emit(i.NativeEvent.OverseasUserBindCallback); + break; + case a.CocosFun.leitingLoginErr: + t.loginInfo = null, cc.game.emit(i.NativeEvent.LeitingLoginErr); + break; + case a.CocosFun.showRewardVideoAdRst: + cc.game.emit("ad-reward-video-native-callback", 0, n && 0 == n.code); + break; + case a.CocosFun.productInfoRecv: + "0" != (r = n).code && console.warn("请求商品价格信息失败"), cc.game.emit(i.NativeEvent.ProductInfoRst, r.productInfo); + break; + case a.CocosFun.leitingPayCb: + var r = n; + cc.game.emit(i.NativeEvent.PayRst, r); + default: + cc.error("native call cocos err", e) + } + }, t.loginInfo = null, t.deviceInfo = null, t.androidInfo = null, t.media = "", t + }(); + o.default = r, window.CocosCaller = r.CocosCaller, cc._RF.pop() + }, { + "../sdk": "sdk", + "./native-def": "native-def", + "./native-event": "native-event" + } + ], + "native-def": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "b1a045iF8FPGbssaev6oGNm", "native-def"), Object.defineProperty(o, "__esModule", { + value: !0 + }), o.CocosFun = o.NativeFun = o.shareType = o.sharePlatform = o.reportType = o.afReportList = o.BindType = void 0, + function(t) { + t.googleplay = "1", t.facebook = "2", t.gamecenter = "3" + }(o.BindType || (o.BindType = {})), o.afReportList = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 200, 400, 600], + function(t) { + t.Regiser = "2", t.CreateRole = "3", t.Loginout = "4", t.Pay = "5", t.FinishGuide = "6", t.addCart = "7" + }(o.reportType || (o.reportType = {})), + function(t) { + t.googleplay = "googleplay", t.facebook = "facebook", t.lineins = "lineins" + }(o.sharePlatform || (o.sharePlatform = {})), + function(t) { + t.link = "link", t.photo = "photo", t.video = "video", t.text = "text" + }(o.shareType || (o.shareType = {})), + function(t) { + t.InitLeitingSdk = "initLeitingSdk", t.leitingLogin = "leitingLogin", t.leitingAccountCenter = "leitingAccountCenter", t.leitingShare = "leitingShare", t.leitingShowBindAccountPage = "leitingShowBindAccountPage", t.leitingEventReport = "leitingEventReport", t.showRewardVideoAd = "showRewardVideoAd", t.reqProductInfo = "reqProductInfo", t.reqPay = "reqPay", t.shushuEventReport = "shushuEventReport", t.publicParamsInfo = "publicParamsInfo" + }(o.NativeFun || (o.NativeFun = {})), + function(t) { + t.setMedia = "setMedia", t.leitingLogin = "leitingLogin", t.leitingLoginErr = "leitingLoginErr", t.leitingPay = "leitingPay", t.leitingShare = "leitingShare", t.leitingGetDeviceInfo = "leitingGetDeviceInfo", t.outAppPayNotify = "outAppPayNotify", t.overseasUserBindCallback = "overseasUserBindCallback", t.showRewardVideoAdRst = "showRewardVideoAdRst", t.productInfoRecv = "productInfoRecv", t.leitingPayCb = "leitingPayCb", t.androidParamsInfo = "androidParamsInfo" + }(o.CocosFun || (o.CocosFun = {})), cc._RF.pop() + }, {} + ], + "native-event": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "4b33ap2W0tF+qCVSawt7vjA", "native-event"), Object.defineProperty(o, "__esModule", { + value: !0 + }), o.NativeEvent = void 0, + function(t) { + t.LeitingGetDeviceInfo = "NativeEvent.LeitingGetDeviceInfo", t.LeitingLoginInfo = "NativeEvent.LeitingLoginInfo", t.OverseasUserBindCallback = "NativeEvent.OverseasUserBindCallback", t.LeitingLoginErr = "NativeEvent.LeitingLoginErr", t.ProductInfoRst = "NativeEvent.ProductInfoRst", t.PayRst = "NativeEvent.PayRst" + }(o.NativeEvent || (o.NativeEvent = {})), cc._RF.pop() + }, {} + ], + "network-tool": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "cd03faX39hArqKnt5t/dSp9", "network-tool"); + var n = this && this.__assign || function() { + return (n = Object.assign || function(t) { + for (var e, o = 1, n = arguments.length; o < n; o++) + for (var a in e = arguments[o]) Object.prototype.hasOwnProperty.call(e, a) && (t[a] = e[a]); + return t + }).apply(this, arguments) + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var a = t("../common/http"), + i = t("./data-env"), + r = t("./data-type"), + c = i.getLocalEnvConfig(r.ENV.local), + s = function() { + function t() {} + return t.setLevelMapData = function(e, o) { + this.host.indexOf("easygame2021") >= 0 ? console.log("线上环境停止测试 ###### ") : t.post({ + url: "/admin/game_map/upsert", + data: { + map_id: e, + map_data: o + }, + success: function(t) { + 0 == t.err_code ? console.log("保存地图:", e, t) : console.log("保存地图失败:", e, t) + } + }) + }, t.get = function(t) { + return a.default.get(n({ + host: this.host, + baseParams: {} + }, t)) + }, t.post = function(t) { + return a.default.post(n({ + host: this.host, + baseParams: {} + }, t)) + }, t.GETURL = function(t) { + return a.default.get(n({ + baseParams: {} + }, t)) + }, t.POSTURL = function(t) { + return a.default.post(n({ + baseParams: {} + }, t)) + }, t.GET = function(t, e, o) { + void 0 === e && (e = {}); + var n = ""; + Object.keys(e).forEach(function(t) { + n += t + "=" + encodeURIComponent(e[t]) + "&" + }), "" !== n && (t = t + "?" + (n = n.substr(0, n.lastIndexOf("&")))); + var a = cc.loader.getXMLHttpRequest(); + a.open("GET", t, !0), a.setRequestHeader("Content-Type", "text/plain;charset=UTF-8"), a.onreadystatechange = function() { + if (4 === a.readyState) { + var t = a.responseText; + a.status >= 200 && a.status < 300 ? (a.statusText, o(!0, t)) : o(!1, t) + } + }, a.timeout = this.TimeOut, a.send() + }, t.POST = function(t, e, o) { + void 0 === e && (e = {}); + var n = cc.loader.getXMLHttpRequest(), + a = ""; + Object.keys(e).forEach(function(t) { + a += t + "=" + encodeURIComponent(e[t]) + "&" + }), "" !== a && (a = a.substr(0, a.lastIndexOf("&"))), n.open("POST", t, !0), n.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), n.onreadystatechange = function() { + if (4 === n.readyState) { + var t = n.responseText; + n.status >= 200 && n.status < 300 ? (n.statusText, o(!0, t)) : o(!1, t) + } + }, n.send(a) + }, t.host = c.host, t.TimeOut = 200, t + }(); + o.default = s, cc._RF.pop() + }, { + "../common/http": "http", + "./data-env": "data-env", + "./data-type": "data-type" + } + ], + newLevelPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "da3caVMFQ5HlYmVp5lat/E1", "newLevelPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = t("../common/config"), + u = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.inputLevelNum = null, e.closeNode = null, e + } + return a(e, t), e.prototype.start = function() { + this.closeNode.on(cc.Node.EventType.TOUCH_END, this.closeFunc, this) + }, e.prototype.showNewLevelPop = function() { + this.node.active = !0, this.inputLevelNum.string = "" + }, e.prototype.newLevelFunc = function() { + var t = Number(this.inputLevelNum.string); + t > 0 ? (this.node.active = !1, this.emitNewLevel(t), console.log("设置关卡数", this.inputLevelNum.string)) : console.log("error:书写错误") + }, e.prototype.emitNewLevel = function(t) { + var e = cc.instantiate(l.default.baseMapObj); + e.levelKey = t; + var o = { + newLevelData: e + }; + cc.game.emit("initLevelData", o) + }, e.prototype.closeFunc = function() { + this.node.active = !1 + }, i([s({ + type: cc.EditBox, + tooltip: "输入对应关卡数" + })], e.prototype, "inputLevelNum", void 0), i([s(cc.Node)], e.prototype, "closeNode", void 0), i([c], e) + }(cc.Component); + o.default = u, cc._RF.pop() + }, { + "../common/config": "config" + } + ], + nextLevelPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "b49fdZpjJtCJY67qY7JG6Ry", "nextLevelPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.maskNode = null, e.fainNode = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.showPop = function() { + var t = this; + this.maskNode.opacity = 0, this.node.active = !0, cc.tween(this.maskNode).to(0, { + opacity: 0 + }).to(.2, { + opacity: 178 + }).start(); + var e = cc.winSize.width; + this.fainNode.x = e, this.fainNode.y = 100, cc.tween(this.fainNode).to(1, { + x: 0, + y: 100 + }, { + easing: cc.easing.cubicOut + }).delay(1).call(function() { + cc.tween(t.maskNode).to(.8, { + opacity: 0 + }).start() + }).to(1, { + x: -e, + y: 100 + }, { + easing: cc.easing.quadOut + }).call(function() { + t.node.active = !1 + }).start() + }, i([s(cc.Node)], e.prototype, "maskNode", void 0), i([s(cc.Node)], e.prototype, "fainNode", void 0), i([c], e) + }(cc.Component); + o.default = l, cc._RF.pop() + }, {} + ], + noLimitPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "86b2eck/b9Nv5kDApWcxh9L", "noLimitPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/CcJsFunc"), + c = t("../common/enumConfig"), + s = cc._decorator, + l = s.ccclass, + u = s.property, + p = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mask = null, e.popNode = null, e.closeBtn = null, e.videoBtn = null, e.noVideoBtn = null, e.limitVideoLabel = null, e.showPopData = null, e + } + return a(e, t), e.prototype.start = function() { + cc.game.on(c.EMITKEY.UPDATEPOPDATA, this.updatePopDataFunc, this), r.default.addbtnTouchEndScale(this.mask, this.closeBtnFunc.bind(this)), r.default.addbtnTouchStartScale(this.closeBtn), r.default.addbtnTouchEndScale(this.closeBtn, this.closeBtnFunc.bind(this)), r.default.addbtnTouchCancelScale(this.closeBtn), r.default.addbtnTouchStartScale(this.videoBtn), r.default.addbtnTouchEndScale(this.videoBtn, this.videoBtnFunc.bind(this)), r.default.addbtnTouchCancelScale(this.videoBtn), r.default.addbtnTouchStartScale(this.noVideoBtn), r.default.addbtnTouchEndScale(this.noVideoBtn, this.noVideoBtnFunc.bind(this)), r.default.addbtnTouchCancelScale(this.noVideoBtn) + }, e.prototype.updatePopDataFunc = function() {}, e.prototype.closeBtnFunc = function() { + this.node.active = !1, this.showPopData && this.showPopData.noPlayVideoFunc && this.showPopData.noPlayVideoFunc() + }, e.prototype.noVideoBtnFunc = function() { + this.node.active = !1, this.showPopData && this.showPopData.noPlayVideoFunc && this.showPopData.noPlayVideoFunc() + }, e.prototype.videoBtnFunc = function() { + this.node.active = !1, this.showPopData && this.showPopData.playVideoFunc && this.showPopData.playVideoFunc() + }, e.prototype.showNoLimitPop = function(t) { + this.node.active = !0, this.showPopData = t, this.limitVideoLabel.string = t.videoCount + "/3", cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start() + }, i([u(cc.Node)], e.prototype, "mask", void 0), i([u(cc.Node)], e.prototype, "popNode", void 0), i([u(cc.Node)], e.prototype, "closeBtn", void 0), i([u(cc.Node)], e.prototype, "videoBtn", void 0), i([u(cc.Node)], e.prototype, "noVideoBtn", void 0), i([u(cc.Label)], e.prototype, "limitVideoLabel", void 0), i([l], e) + }(cc.Component); + o.default = p, cc._RF.pop() + }, { + "../common/CcJsFunc": "CcJsFunc", + "../common/enumConfig": "enumConfig" + } + ], + nothingPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "f9f03C5IqJPgrwEd50J+8g+", "nothingPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/CcJsFunc"), + c = t("../common/enumConfig"), + s = t("../manager/DateManager"), + l = cc._decorator, + u = l.ccclass, + p = l.property, + d = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mask = null, e.popNode = null, e.closeBtn = null, e.goBtn = null, e.titleLabel = null, e.descLabel = null, e.goLabel = null, e.showPopData = null, e + } + return a(e, t), e.prototype.start = function() { + r.default.addbtnTouchEndScale(this.mask, this.closeBtnFunc.bind(this)), r.default.addbtnTouchStartScale(this.closeBtn), r.default.addbtnTouchEndScale(this.closeBtn, this.closeBtnFunc.bind(this)), r.default.addbtnTouchCancelScale(this.closeBtn), r.default.addbtnTouchStartScale(this.goBtn), r.default.addbtnTouchEndScale(this.goBtn, this.goBtnFunc.bind(this)), r.default.addbtnTouchCancelScale(this.goBtn) + }, e.prototype.closeBtnFunc = function() { + this.node.active = !1 + }, e.prototype.goBtnFunc = function() { + this.showPopData && this.showPopData.beginTouchCallback && this.showPopData.beginTouchCallback(), this.closeBtnFunc() + }, e.prototype.showNothingPop = function(t) { + this.node.active = !0, this.showPopData = t, cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(); + var e = s.default.format(c.CALENDARNAMES[4], new Date); + if (e) { + var o = e.split("-"); + o.length >= 3 && (this.titleLabel.string = o[1] + "月" + o[2] + "日") + } + }, i([p(cc.Node)], e.prototype, "mask", void 0), i([p(cc.Node)], e.prototype, "popNode", void 0), i([p(cc.Node)], e.prototype, "closeBtn", void 0), i([p(cc.Node)], e.prototype, "goBtn", void 0), i([p(cc.Label)], e.prototype, "titleLabel", void 0), i([p(cc.Label)], e.prototype, "descLabel", void 0), i([p(cc.Label)], e.prototype, "goLabel", void 0), i([u], e) + }(cc.Component); + o.default = d, cc._RF.pop() + }, { + "../common/CcJsFunc": "CcJsFunc", + "../common/enumConfig": "enumConfig", + "../manager/DateManager": "DateManager" + } + ], + "page-house": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "c7dfaR+FBhOv4WArlgOZb10", "page-house"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../common/CcJsFunc"), + c = t("../../common/dataTs"), + s = t("../../common/enumConfig"), + l = cc._decorator, + u = l.ccclass, + p = l.property, + d = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.showMain = null, e + } + return a(e, t), e.prototype.start = function() { + cc.game.on(s.EMITKEY.MAINUPDATEUI, this.updateSubUI, this), r.default.addbtnTouchStartScale(this.showMain), r.default.addbtnTouchEndScale(this.showMain, this.showMainFunc.bind(this)), r.default.addbtnTouchCancelScale(this.showMain), this.updateSubUI() + }, e.prototype.updateSubUI = function() { + console.log("page-house MAINUPDATEUI"), 1 == c.default.currentHouseUnlockAll() ? this.showMain.getChildByName("mark").active = !0 : this.showMain.getChildByName("mark").active = !1 + }, e.prototype.showMainFunc = function() { + cc.game.emit(s.EMITKEY.UPDATETABBARRECEIVE, 1) + }, i([p(cc.Node)], e.prototype, "showMain", void 0), i([u], e) + }(cc.Component); + o.default = d, cc._RF.pop() + }, { + "../../common/CcJsFunc": "CcJsFunc", + "../../common/dataTs": "dataTs", + "../../common/enumConfig": "enumConfig" + } + ], + "page-main": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "df8f95zulFCI6iyRCXBRejZ", "page-main"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../../i18n/gd_language"), + c = t("../../../i18n/i18n"), + s = t("../../common/CcJsFunc"), + l = t("../../common/dataTs"), + u = t("../../common/enumConfig"), + p = t("../../common/sdk"), + d = t("../../common/spine"), + h = t("../../common/util"), + f = t("../../manager/GameManager"), + m = cc._decorator, + g = m.ccclass, + y = m.property, + v = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mainLayer = null, e.nextBtn = null, e.sprintReward = null, e.sprintWinLabel = null, e.sprintWinLabelShadow = null, e.sprintTimeLabel = null, e.cookieReward = null, e.updateTime = 0, e.popCallbackCollect = null, e + } + return a(e, t), e.prototype.update = function(t) { + this.updateTime += t, this.updateTime >= 1 && (this.updateTime -= 1, this.updateTimeNum()) + }, e.prototype.updateTimeNum = function() { + if (!(l.default.getUserData().playLevelId < 3)) { + var t = l.default.updateSprintRewardTime(); + if (0 == t) console.log("已满"), this.sprintTimeLabel.string = "End"; + else { + var e = h.default.formatTime(t); + e[0] > 0 ? this.sprintTimeLabel.string = e[0] + "d " + e[1] + "h" : e[1] > 0 ? this.sprintTimeLabel.string = e[1] + "h " + e[2] + "m" : e[2] > 0 ? this.sprintTimeLabel.string = e[2] + "m " + e[3] + "s" : e[3] > 0 && (this.sprintTimeLabel.string = e[2] + "m " + e[3] + "s") + } + } + }, e.prototype.start = function() { + cc.game.on(u.EMITKEY.MAINUPDATEUI, this.updateUiDataFunc, this), f.default.getInstance().gameEnv == u.GAMEENV.ENVRELEASE ? (this.nextBtn.active = !1, cc.sys.isBrowser && (this.nextBtn.active = !0), p.default.isPlatform(p.Platform.ios) && (this.nextBtn.active = !0)) : this.nextBtn.active = !0, s.default.addbtnTouchStartScale(this.nextBtn), s.default.addbtnTouchEndScale(this.nextBtn, this.nextBtnFunc.bind(this)), s.default.addbtnTouchCancelScale(this.nextBtn), s.default.addbtnTouchStartScale(this.sprintReward), s.default.addbtnTouchEndScale(this.sprintReward, this.sprintRewardFunc.bind(this)), s.default.addbtnTouchCancelScale(this.sprintReward); + var t = this.cookieReward.getChildByName("click-btn"); + s.default.addbtnTouchEndScale(t, this.cookieRewardFunc.bind(this)), this.updateTimeNum(), this.updateUiDataFunc(), this.popCallbackCollect = { + playGameCallBack: this.playGameCallBackFunc.bind(this) + } + }, e.prototype.playGameCallBackFunc = function() {}, e.prototype.cookieRewardFunc = function() { + var t = { + popName: "nothingPop", + showPopData: { + popCallbackCollect: this.popCallbackCollect, + popType: 4 + } + }; + cc.game.emit("showPop", t) + }, e.prototype.updateUiDataFunc = function() { + console.log("page-main MAINUPDATEUI"); + var t = l.default.getSprintRewardData(); + this.sprintWinLabel.string = t.winNum + "", this.sprintWinLabelShadow.string = t.winNum + "", this.sprintReward.getChildByName("mark").active = f.default.getInstance().sprintMark, this.sprintReward.getComponent(d.default).play("4Icon_RichRoad1", 0, function() { + console.log("4Icon_RichRoad1 ######") + }), l.default.getUserData().playLevelId < l.default.gameConfigData.baseConfigData.sprintRewardLevel ? this.sprintReward.active = !1 : this.sprintReward.active = !0, l.default.getUserData().playLevelId < l.default.gameConfigData.baseConfigData.cookieRewardLevel ? this.cookieReward.active = !1 : this.cookieReward.active = !0 + }, e.prototype.nextBtnFunc = function() { + l.default.gameLevelWin(!0, null); + var t = l.default.checkCollectionData(); + t && console.log("解锁收藏数据###### = " + JSON.stringify(t)), f.default.getInstance().sprintMark = !0; + var e = l.default.gameConfigData.baseConfigData.sprintRewardLevel; + if (l.default.getUserData().playLevelId >= e) { + var o = l.default.getSprintRewardData(); + o.winNum += 1, o.rewardProgress < 3 ? (o.rewardProgress += 1, 3 == o.rewardProgress && (o.winBox += 1)) : o.rewardProgress = 1, l.default.setSprintRewardData(o) + } + if (l.default.getSprintRewardData().rewardProgress >= 3) { + var n = l.default.getSprintRewardData().winBox, + a = l.default.getUserData(), + i = n > 5 ? 5 : n, + r = 12; + i > 1 && (r += 11 * (i - 1)), a.coin += r, a.prop_remove += 1, l.default.saveUserData(a) + } + cc.game.emit(u.EMITKEY.MAINUPDATEUI) + }, e.prototype.sprintRewardFunc = function() { + console.log("冲刺奖励"); + var t = l.default.gameConfigData.baseConfigData.sprintRewardLevel; + l.default.getUserData().playLevelId >= t ? cc.game.emit("showPop", { + popName: "sprintRewardPop", + showPopData: { + popCallbackCollect: null, + popType: 0 + } + }) : cc.game.emit("showMainTips", c.default.instance.trans(r.GDLanguage.challenge_unlocked_level, 3)) + }, i([y(cc.Node)], e.prototype, "mainLayer", void 0), i([y(cc.Node)], e.prototype, "nextBtn", void 0), i([y(cc.Node)], e.prototype, "sprintReward", void 0), i([y(cc.Label)], e.prototype, "sprintWinLabel", void 0), i([y(cc.Label)], e.prototype, "sprintWinLabelShadow", void 0), i([y(cc.Label)], e.prototype, "sprintTimeLabel", void 0), i([y(cc.Node)], e.prototype, "cookieReward", void 0), i([g], e) + }(cc.Component); + o.default = v, cc._RF.pop() + }, { + "../../../i18n/gd_language": "gd_language", + "../../../i18n/i18n": "i18n", + "../../common/CcJsFunc": "CcJsFunc", + "../../common/dataTs": "dataTs", + "../../common/enumConfig": "enumConfig", + "../../common/sdk": "sdk", + "../../common/spine": "spine", + "../../common/util": "util", + "../../manager/GameManager": "GameManager" + } + ], + picturePop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "e955bv+WvlGDIiibEKuUWDZ", "picturePop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../i18n/gd_language"), + c = t("../common/CcJsFunc"), + s = t("../manager/GameManager"), + l = t("../../i18n/i18n"), + u = cc._decorator, + p = u.ccclass, + d = u.property, + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.popNode = null, e.wallpaperBtn = null, e.brickBtn = null, e.wallpaperSv = null, e.brickSv = null, e.topUIBtnArr = [], e.contentSvArr = [], e + } + return a(e, t), e.prototype.hideRankPop = function() { + this.node.active = !1 + }, e.prototype.onLoad = function() {}, e.prototype.onEnable = function() { + this.updateMarkClot() + }, e.prototype.updateMarkClot = function() { + var t = s.default.getInstance().collectionMark; + this.wallpaperBtn.getChildByName("mark").active = t.bgNum > 0, this.brickBtn.getChildByName("mark").active = t.brickNum > 0 + }, e.prototype.start = function() { + c.default.addbtnTouchStartScale(this.wallpaperBtn), c.default.addbtnTouchEndScale(this.wallpaperBtn, this.topUIButtonAction.bind(this, "wallpaper", 0)), c.default.addbtnTouchCancelScale(this.wallpaperBtn), c.default.addbtnTouchStartScale(this.brickBtn), c.default.addbtnTouchEndScale(this.brickBtn, this.topUIButtonAction.bind(this, "brick", 1)), c.default.addbtnTouchCancelScale(this.brickBtn), this.setupSubNode(), this.wallpaperBtn.getChildByName("label").getComponent(cc.Label).string = l.default.instance.trans(r.GDLanguage.wallpaper), this.brickBtn.getChildByName("label").getComponent(cc.Label).string = l.default.instance.trans(r.GDLanguage.block_bricks) + }, e.prototype.setupSubNode = function() { + for (var t = 0; t < this.topUIBtnArr.length; t++) 0 == t ? (this.topUIBtnArr[t].getChildByName("imgSel").active = !0, this.topUIBtnArr[t].getChildByName("imgNor").active = !1) : (this.topUIBtnArr[t].getChildByName("imgSel").active = !1, this.topUIBtnArr[t].getChildByName("imgNor").active = !0); + for (t = 0; t < this.contentSvArr.length; t++) this.contentSvArr[t].active = 0 == t + }, e.prototype.topUIButtonAction = function(t, e) { + for (var o = 0; o < this.topUIBtnArr.length; o++) o == e ? (this.topUIBtnArr[o].getChildByName("imgSel").active = !0, this.topUIBtnArr[o].getChildByName("imgNor").active = !1) : (this.topUIBtnArr[o].getChildByName("imgSel").active = !1, this.topUIBtnArr[o].getChildByName("imgNor").active = !0); + for (o = 0; o < this.contentSvArr.length; o++) this.contentSvArr[o].active = o == e; + this.updateMarkClot() + }, i([d(cc.Node)], e.prototype, "popNode", void 0), i([d(cc.Node)], e.prototype, "wallpaperBtn", void 0), i([d(cc.Node)], e.prototype, "brickBtn", void 0), i([d(cc.Node)], e.prototype, "wallpaperSv", void 0), i([d(cc.Node)], e.prototype, "brickSv", void 0), i([d([cc.Node])], e.prototype, "topUIBtnArr", void 0), i([d([cc.Node])], e.prototype, "contentSvArr", void 0), i([p], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "../../i18n/gd_language": "gd_language", + "../../i18n/i18n": "i18n", + "../common/CcJsFunc": "CcJsFunc", + "../manager/GameManager": "GameManager" + } + ], + "player-head-atlas": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "d3fb2TeqiZHiZ2RxiW6S6RM", "player-head-atlas"), Object.defineProperty(o, "__esModule", { + value: !0 + }); + var n = function() { + function t() { + this._texture = null, this._width = 0, this._height = 0, this._row = 0, this._col = 0, this._posList = null, this._unusingIdxs = [], this._count = 0, this._dirty = !1, this._headSize = 46, this._urlMap = null, this._idxMap = null + } + return Object.defineProperty(t, "instance", { + get: function() { + return this._instance || (this._instance = new t), this._instance + }, + enumerable: !1, + configurable: !0 + }), t.prototype.init = function(t, e, o) { + this._headSize = o; + var n = new cc.RenderTexture; + n.initWithSize(t, e), n.update(null), this._texture = n, this._idxMap = {}, this._urlMap = {}, this._width = t, this._height = e, this._posList = [], this._col = Math.floor((t - 4) / (this._headSize + 2)), this._row = Math.ceil(400 / this._col); + for (var a = 0; a < this._row; a++) + for (var i = 0; i < this._col; i++) { + var r = cc.v2((this._headSize + 2) * i + 2, (this._headSize + 2) * a + 2); + this._posList.push(r) + } + for (this.reset(), a = 0; a < 400; a++) this._unusingIdxs.push(a); + this._count = 0 + }, Object.defineProperty(t.prototype, "texture", { + get: function() { + return this._texture + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(t.prototype, "cellSize", { + get: function() { + return this._headSize + }, + enumerable: !1, + configurable: !0 + }), t.prototype.insertSpriteFrame = function(t, e) { + var o = e._rect, + n = e.getTexture(), + a = this._urlMap[t], + i = o.x, + r = o.y, + c = -1; + if (a) i += a.x, r += a.y, c = a.idx; + else { + if (0 == this._unusingIdxs.length) return console.error("头像合集id用完了。。。"), null; + c = this._unusingIdxs.pop(); + var s = this._posList[c]; + this._texture.drawTextureAt(n, s.x, s.y), this._count++, i += s.x, r += s.y, this._dirty = !0, a = { + x: i, + y: r, + texture: this._texture, + spriteFrame: e, + idx: c, + url: t + } + } + return a + }, t.prototype.update = function() { + this._dirty && (this._texture.update(null), this._dirty = !1) + }, t.prototype.deleteInnerTextureByIdx = function(t) { + var e = this._idxMap[t]; + this.deleteInnerTexture(e) + }, t.prototype.deleteInnerTextureByPath = function(t) { + var e = this._urlMap[t]; + this.deleteInnerTexture(e) + }, t.prototype.deleteInnerTexture = function(t) { + t && (delete this._urlMap[t.url], delete this._idxMap[t.idx], t.spriteFrame._resetDynamicAtlasFrame(), this._count--, this._unusingIdxs.indexOf(t.idx) < 0 && this._unusingIdxs.push(t.idx)) + }, t.prototype.isEmpty = function() { + return this._count <= 0 + }, t.prototype.packToDynamicAtlas = function(t, e, o) { + var n = this._urlMap[t] || this.insertSpriteFrame(t, o); + return n && (o._setDynamicAtlasFrame(n), this._urlMap[t] = n, this._idxMap[n.idx] = n), n + }, t.prototype.reset = function() { + if (this._idxMap) { + this._unusingIdxs = []; + for (var t = 0; t < 400; t++) { + this._unusingIdxs.push(t); + var e = this._idxMap[t]; + e && e.spriteFrame.isValid && e.spriteFrame._resetDynamicAtlasFrame() + } + this._idxMap = {}, this._urlMap = {} + } + }, t.prototype.destroy = function() { + this.reset(), this._texture.destroy() + }, t.DEFAULT = "default", t._instance = null, t + }(); + o.default = n, cc._RF.pop() + }, {} + ], + popManager: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "3798fTcqOJGqIPq3Alhl8FP", "popManager"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/enumConfig"), + c = t("../pop/bullet-screen-pop"), + s = t("../pop/challengeSucPop"), + l = t("../pop/failPop"), + u = t("../pop/FriendRankPop"), + p = t("../pop/getPropPop"), + d = t("../pop/loseLovePop"), + h = t("../pop/nextLevelPop"), + f = t("../pop/noLimitPop"), + m = t("../pop/nothingPop"), + g = t("../pop/PersonalPop"), + y = t("../pop/setupPop"), + v = t("../pop/shareNodePop"), + b = t("../pop/sheep-rank-pop"), + _ = t("../pop/show-daily-pop"), + N = t("../pop/stagePop"), + C = t("../pop/TodayRankPop"), + w = t("../pop/topicChoosePop"), + P = t("../pop/topicCollectPop"), + k = t("../pop/topicJoinedPop"), + S = t("../pop/topicLastWinPop"), + D = t("../pop/topicNewPop"), + A = t("../pop/winPop"), + T = cc._decorator, + O = T.ccclass, + I = T.property, + E = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.showDailyPrefab = null, e.showDailyPop = null, e.setupPopPrefab = null, e.setupPop = null, e.getPropPopPrefab = null, e.getPropPop = null, e.nothingPopPrefab = null, e.nothingPop = null, e.failPopPrefab = null, e.failPop = null, e.loseLovePopPrefab = null, e.loseLovePop = null, e.winPopPrefab = null, e.winPop = null, e.noLimitPopPrefab = null, e.noLimitPop = null, e.sheepRankPopPrefab = null, e.sheepRankPop = null, e.stagePopPrefab = null, e.stagePop = null, e.bulletScreenPopPrefab = null, e.bulletScreenPop = null, e.nextLevelPopPrefab = null, e.nextLevelPop = null, e.shareNodePopPrefab = null, e.shareNodePop = null, e.topicChoosePopPrefab = null, e.topicChoosePop = null, e.topicCollectPopPrefab = null, e.topicCollectPop = null, e.topicLastWinPopPrefab = null, e.topicLastWinPop = null, e.topicNewPopPrefab = null, e.topicNewPop = null, e.todayRankPopPrefab = null, e.todayRankPop = null, e.firendRankPopPrefab = null, e.firendRankPop = null, e.personalPopPrefab = null, e.personalPop = null, e.topicJoinedPopPrefab = null, e.topicJoinedPop = null, e.challengeSucPopPrefab = null, e.challengeSucPop = null, e.showPopArray = [], e + } + return a(e, t), e.prototype.start = function() { + cc.game.on(r.EMITKEY.SHOWPOP, this.showPop, this), cc.game.on(r.EMITKEY.CLOSEALLPOP, this.closeAllPop, this), this.initPop(), this.closeAllPop() + }, e.prototype.initPop = function() { + this.todayRankPop = this.ifHaveNode(this.todayRankPop, this.todayRankPopPrefab) + }, e.prototype.showPop = function(t) { + var e = t.popName, + o = t.showPopData; + "winPop" == e ? (this.winPop = this.ifHaveNode(this.winPop, this.winPopPrefab), this.winPop.getComponent(A.default).showWinPop(o)) : "failPop" == e ? (this.failPop = this.ifHaveNode(this.failPop, this.failPopPrefab), this.failPop.getComponent(l.default).showFailPop(o)) : "loseLovePop" == e ? (this.loseLovePop = this.ifHaveNode(this.loseLovePop, this.loseLovePopPrefab), this.loseLovePop.getComponent(d.default).showLoseLovePop(o)) : "setupPop" == e ? (this.setupPop = this.ifHaveNode(this.setupPop, this.setupPopPrefab), this.setupPop.getComponent(y.default).showSetupPop(o)) : "getPropPop" == e ? (this.getPropPop = this.ifHaveNode(this.getPropPop, this.getPropPopPrefab), this.getPropPop.getComponent(p.default).showGetPropPop(o)) : "nothingPop" == e ? (this.nothingPop = this.ifHaveNode(this.nothingPop, this.nothingPopPrefab), this.nothingPop.getComponent(m.default).showNothingPop(o)) : "showDailyPop" == e ? (this.showDailyPop = this.ifHaveNode(this.showDailyPop, this.showDailyPrefab), this.showDailyPop.getComponent(_.default).showPop(o)) : "noLimitPop" == e ? (this.noLimitPop = this.ifHaveNode(this.noLimitPop, this.noLimitPopPrefab), this.noLimitPop.getComponent(f.default).showNoLimitPop(o)) : "sheepRankPop" == e ? (this.sheepRankPop = this.ifHaveNode(this.sheepRankPop, this.sheepRankPopPrefab), this.sheepRankPop.getComponent(b.default).sheepRankPop(o)) : "stagePop" == e ? (this.stagePop = this.ifHaveNode(this.stagePop, this.stagePopPrefab), this.stagePop.getComponent(N.default).showPop(o)) : "bulletScreenPop" == e ? (this.bulletScreenPop = this.ifHaveNode(this.bulletScreenPop, this.bulletScreenPopPrefab), this.bulletScreenPop.getComponent(c.default).showPop(o)) : "nextLevelPop" == e ? (this.nextLevelPop = this.ifHaveNode(this.nextLevelPop, this.nextLevelPopPrefab), this.nextLevelPop.getComponent(h.default).showPop(o)) : "shareNodePop" == e ? (this.shareNodePop = this.ifHaveNode(this.shareNodePop, this.shareNodePopPrefab), this.shareNodePop.getComponent(v.default).showPop(o)) : "topicChoosePop" == e ? (this.topicChoosePop = this.ifHaveNode(this.topicChoosePop, this.topicChoosePopPrefab), this.topicChoosePop.getComponent(w.default).showPop(o)) : "topicCollectPop" == e ? (this.topicCollectPop = this.ifHaveNode(this.topicCollectPop, this.topicCollectPopPrefab), this.topicCollectPop.getComponent(P.default).showPop(o)) : "topicLastWinPop" == e ? (this.topicLastWinPop = this.ifHaveNode(this.topicLastWinPop, this.topicLastWinPopPrefab), this.topicLastWinPop.getComponent(S.default).showPop(o)) : "topicNewPop" == e ? (this.topicNewPop = this.ifHaveNode(this.topicNewPop, this.topicNewPopPrefab), this.topicNewPop.getComponent(D.default).showPop(o)) : "friendRankPop" == e ? (this.firendRankPop = this.ifHaveNode(this.firendRankPop, this.firendRankPopPrefab), this.firendRankPop.getComponent(u.default).showPop(o)) : "todayRankPop" == e ? (this.todayRankPop = this.ifHaveNode(this.todayRankPop, this.todayRankPopPrefab), this.todayRankPop.getComponent(C.default).showPop(o)) : "personalPop" == e ? (this.personalPop = this.ifHaveNode(this.personalPop, this.personalPopPrefab), this.personalPop.getComponent(g.default).showPop(o)) : "topicJoinedPop" == e ? (this.topicJoinedPop = this.ifHaveNode(this.topicJoinedPop, this.topicJoinedPopPrefab), this.topicJoinedPop.getComponent(k.default).showPop(o)) : "challengeSucPop" == e && (this.challengeSucPop = this.ifHaveNode(this.challengeSucPop, this.challengeSucPopPrefab), this.challengeSucPop.getComponent(s.default).showPop(o)) + }, e.prototype.ifHaveNode = function(t, e) { + return t || (t = cc.instantiate(e), this.node.addChild(t)), t.setSiblingIndex(-1), t + }, e.prototype.closeAllPop = function() { + var t = this.node.children; + for (var e in t) { + var o = t[e]; + o.setSiblingIndex(0), o.active = !1 + } + }, i([I({ + type: cc.Prefab, + tooltip: "每日挑战获取礼包" + })], e.prototype, "showDailyPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "设置页面" + })], e.prototype, "setupPopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "获取道具页面" + })], e.prototype, "getPropPopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "一些通用页面" + })], e.prototype, "nothingPopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "失败页面" + })], e.prototype, "failPopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "放弃挑战界面" + })], e.prototype, "loseLovePopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "胜利界面" + })], e.prototype, "winPopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "无限生命页面" + })], e.prototype, "noLimitPopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "排行弹框页面" + })], e.prototype, "sheepRankPopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "舞台弹框页面" + })], e.prototype, "stagePopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "弹幕弹框页面" + })], e.prototype, "bulletScreenPopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "下一等级提示" + })], e.prototype, "nextLevelPopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "分享弹框" + })], e.prototype, "shareNodePopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "选择羊队" + })], e.prototype, "topicChoosePopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "收藏页面" + })], e.prototype, "topicCollectPopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "昨日获胜页面" + })], e.prototype, "topicLastWinPopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "昨日获胜页面奖励弹框" + })], e.prototype, "topicNewPopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "今日朋友圈" + })], e.prototype, "todayRankPopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "好友排行榜" + })], e.prototype, "firendRankPopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "个人资料" + })], e.prototype, "personalPopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "队伍分配弹窗" + })], e.prototype, "topicJoinedPopPrefab", void 0), i([I({ + type: cc.Prefab, + tooltip: "wx获胜弹框" + })], e.prototype, "challengeSucPopPrefab", void 0), i([O], e) + }(cc.Component); + o.default = E, cc._RF.pop() + }, { + "../common/enumConfig": "enumConfig", + "../pop/FriendRankPop": "FriendRankPop", + "../pop/PersonalPop": "PersonalPop", + "../pop/TodayRankPop": "TodayRankPop", + "../pop/bullet-screen-pop": "bullet-screen-pop", + "../pop/challengeSucPop": "challengeSucPop", + "../pop/failPop": "failPop", + "../pop/getPropPop": "getPropPop", + "../pop/loseLovePop": "loseLovePop", + "../pop/nextLevelPop": "nextLevelPop", + "../pop/noLimitPop": "noLimitPop", + "../pop/nothingPop": "nothingPop", + "../pop/setupPop": "setupPop", + "../pop/shareNodePop": "shareNodePop", + "../pop/sheep-rank-pop": "sheep-rank-pop", + "../pop/show-daily-pop": "show-daily-pop", + "../pop/stagePop": "stagePop", + "../pop/topicChoosePop": "topicChoosePop", + "../pop/topicCollectPop": "topicCollectPop", + "../pop/topicJoinedPop": "topicJoinedPop", + "../pop/topicLastWinPop": "topicLastWinPop", + "../pop/topicNewPop": "topicNewPop", + "../pop/winPop": "winPop" + } + ], + "prop-prefab": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "78621mmfFZP3p0KRuVUnueB", "prop-prefab"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../script/common/CcJsFunc"), + c = t("../../script/common/native/audio"), + s = cc._decorator, + l = s.ccclass, + u = s.property, + p = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.propImage = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.showWithType = function(t, e, o) { + var n = "", + a = e.position; + 1 == t ? n = "rewardIcon/prop_remove.png" : 2 == t ? n = "rewardIcon/prop_cancel.png" : 3 == t && (n = "rewardIcon/prop_random.png"), r.default.changeSpriteFrame(this.propImage, n); + var i = this; + cc.tween(this.node).to(.1, { + scale: 1.1 + }).to(.1, { + scale: 1 + }).to(.1, { + scale: .9 + }).to(.1, { + scale: .9 + }).to(.1, { + angle: 10 + }).to(.1, { + angle: -10 + }).to(.1, { + angle: 10 + }).to(.1, { + angle: -10 + }).to(.1, { + angle: 0 + }).to(.3, { + position: a, + scale: 0 + }).call(function() { + i.node.destroy(), cc.tween(e).to(.1, { + scale: 1.5 + }).to(.1, { + scale: 1 + }).start(), c.default.playAudioMusic("audio/sound/pop-fly-end.mp3", !1), o && o() + }).start() + }, i([u(cc.Node)], e.prototype, "propImage", void 0), i([l], e) + }(cc.Component); + o.default = p, cc._RF.pop() + }, { + "../../script/common/CcJsFunc": "CcJsFunc", + "../../script/common/native/audio": "audio" + } + ], + "register-head-image": [ + function(t, e, o) { + "use strict"; + + function n(t, e, o) { + var n = new Image; + + function a() { + n.removeEventListener("load", a), n.removeEventListener("error", i), o && o(null, n) + } + + function i() { + n.removeEventListener("load", a), n.removeEventListener("error", i), o && o(new Error(t)) + } + return "file:" !== window.location.protocol && (n.crossOrigin = "anonymous"), n.addEventListener("load", a), n.addEventListener("error", i), n.src = t, n + } + cc._RF.push(e, "8f94axQML9NUKBkQZXk81kh", "register-head-image"), Object.defineProperty(o, "__esModule", { + value: !0 + }), o.registerHeadImgLoader = o.headImgExt = void 0, o.headImgExt = ".head", o.registerHeadImgLoader = function() { + cc.assetManager.downloader.register(o.headImgExt, function(t, e, o) { + o(null, t) + }), cc.assetManager.parser.register(o.headImgExt, n), cc.assetManager.factory.register(o.headImgExt, function(t, e, o, n) { + var a = null, + i = null; + try { + (a = new cc.Texture2D)._uuid = t, a._nativeUrl = t, a._nativeAsset = e + } catch (r) { + i = r + } + n && n(i, a) + }) + }, cc._RF.pop() + }, {} + ], + "report-common": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "cdaf1e/eKZNDKb4XXuwbreu", "report-common"); + var n = this && this.__assign || function() { + return (n = Object.assign || function(t) { + for (var e, o = 1, n = arguments.length; o < n; o++) + for (var a in e = arguments[o]) Object.prototype.hasOwnProperty.call(e, a) && (t[a] = e[a]); + return t + }).apply(this, arguments) + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var a = t("../common/sdk"), + i = t("../common/native/native-bridge"), + r = t("../common/native/native-def"), + c = t("../common/enumConfig"), + s = t("../public/data-env").getEnvConfig(), + l = function() { + function t() {} + return Object.defineProperty(t, "instance", { + get: function() { + return this._instance || (this._instance = new t), this._instance + }, + enumerable: !1, + configurable: !0 + }), t.initTA = function() { + try { + t._ta = new ThinkingAnalyticsAPI({ + appId: "4c2f27905d7149e9bf3c5fa627ee7d97", + serverUrl: "https://maowosshushu.leiting.com", + enableNative: !0, + autoTrack: { + appShow: !1, + appHide: !1, + appClick: !0, + appView: !0, + appCrash: !0, + appInstall: !0 + } + }), t._ta.init(); + var e = this.getUserData().userID; + t._ta.login(e); + var o = t._ta.getDeviceId(); + console.log("report-initTA suc = ", e, o) + } catch (n) { + console.log("report-initTA err = ", n) + } + }, t.getUserData = function() { + var t = cc.sys.localStorage.getItem(c.STORAGEKEY.GAMEUSERLOCALDATA); + return JSON.parse(t).userData + }, t.reportTACommon = function(e, o) { + try { + this.reportPrefix && (e = this.reportPrefix + e); + var c = this.getUserData(); + if (i.default.deviceInfo) { + var s = i.default.deviceInfo; + t.publicInfo.ip = s.ip, t.publicInfo.server_id = "1", t.publicInfo.server_name = "海外测试服", t.publicInfo.androidid = s.androidId, t.publicInfo.imei = s.imei, t.publicInfo.oaid = s.oaid, t.publicInfo.mac = s.mac, t.publicInfo.termin_info = s.terminInfo, t.publicInfo.os_version = s.osVer + } + if (i.default.loginInfo) { + var l = i.default.loginInfo; + t.publicInfo.channel = l.channelNo + } + var u = Number(c.registerTime); + console.log("registerTime = " + u + typeof u); + var p = c.userID; + t.publicInfo.registerTime = u, t.publicInfo.user_id = p, i.default.androidInfo && (t.publicInfo.ver = i.default.androidInfo.versionName); + var d = n(n({}, t.publicInfo), o); + console.log("reportTACommon ### = ", e, "---", JSON.stringify(d)), a.default.isPlatform(a.Platform.android) ? (console.log("Call Native isAndroid"), i.default.callNative(r.NativeFun.shushuEventReport, { + eventName: e, + properties: d + })) : (a.default.isPlatform(a.Platform.web), t._ta || t.initTA(), t._ta.track(e, d)) + } catch (h) { + console.log("report-TACommon err", h) + } + }, t._instance = null, t._ta = null, t.publicInfo = {}, t.reportPrefix = s.reportPrefix, t + }(); + o.default = l, cc._RF.pop() + }, { + "../common/enumConfig": "enumConfig", + "../common/native/native-bridge": "native-bridge", + "../common/native/native-def": "native-def", + "../common/sdk": "sdk", + "../public/data-env": "data-env" + } + ], + "reward-emitter": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "eded8SCVetL/rNMC74RIvnT", "reward-emitter"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }, + r = this && this.__awaiter || function(t, e, o, n) { + return new(o || (o = Promise))(function(a, i) { + function r(t) { + try { + s(n.next(t)) + } catch (e) { + i(e) + } + } + + function c(t) { + try { + s(n.throw(t)) + } catch (e) { + i(e) + } + } + + function s(t) { + var e; + t.done ? a(t.value) : (e = t.value, e instanceof o ? e : new o(function(t) { + t(e) + })).then(r, c) + } + s((n = n.apply(t, e || [])).next()) + }) + }, + c = this && this.__generator || function(t, e) { + var o, n, a, i, r = { + label: 0, + sent: function() { + if (1 & a[0]) throw a[1]; + return a[1] + }, + trys: [], + ops: [] + }; + return i = { + next: c(0), + throw :c(1), + return :c(2) + }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { + return this + }), i; + + function c(t) { + return function(e) { + return s([t, e]) + } + } + + function s(i) { + if (o) throw new TypeError("Generator is already executing."); + for (; r;) try { + if (o = 1, n && (a = 2 & i[0] ? n.return : i[0] ? n.throw || ((a = n.return) && a.call(n), 0) : n.next) && !(a = a.call(n, i[1])).done) return a; + switch (n = 0, a && (i = [2 & i[0], a.value]), i[0]) { + case 0: + case 1: + a = i; + break; + case 4: + return r.label++, { + value: i[1], + done: !1 + }; + case 5: + r.label++, n = i[1], i = [0]; + continue; + case 7: + i = r.ops.pop(), r.trys.pop(); + continue; + default: + if (!(a = (a = r.trys).length > 0 && a[a.length - 1]) && (6 === i[0] || 2 === i[0])) { + r = 0; + continue + } + if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { + r.label = i[1]; + break + } + if (6 === i[0] && r.label < a[1]) { + r.label = a[1], a = i; + break + } + if (a && r.label < a[2]) { + r.label = a[2], r.ops.push(i); + break + } + a[2] && r.ops.pop(), r.trys.pop(); + continue + } + i = e.call(t, r) + } catch (c) { + i = [6, c], n = 0 + } finally { + o = a = 0 + } + if (5 & i[0]) throw i[1]; + return { + value: i[0] ? i[1] : void 0, + done: !0 + } + } + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }), o.RewardEmitterName = void 0; + var s, l = t("./CoinEmitter"); + (function(t) { + t.coin = "coin", t.diamond = "diamond", t.dice = "dice", t.clover = "clover" + })(s = o.RewardEmitterName || (o.RewardEmitterName = {})); + var u = cc._decorator, + p = u.ccclass, + d = u.property, + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.coinEmitter = null, e.prefabList = [], e + } + return a(e, t), e.prototype.send = function(t, e, o, n) { + return void 0 === o && (o = !1), r(this, void 0, Promise, function() { + return c(this, function() { + return t <= 0 ? [2] : (this.setPrefab(e, t, o, n), [2]) + }) + }) + }, e.prototype.start = function() {}, e.prototype.resetAnimation = function() { + this.send(.1, s.coin, !0) + }, e.prototype.setPrefab = function(t, e, o, n) { + var a = null, + i = o ? e : this.computeDiceNodeNum(e); + switch (t) { + case s.coin: + a = this.prefabList[0]; + break; + case s.diamond: + a = this.prefabList[1]; + break; + case s.dice: + a = this.prefabList[2]; + break; + case s.clover: + a = this.prefabList[3] + } + var r = !0; + this.currentPrefab == a && (r = !1), this.currentPrefab = a, this.coinEmitter.prefab = this.currentPrefab, this.coinEmitter.fire(i, r, n) + }, e.prototype.computeDiceNodeNum = function(t) { + return t >= 100 ? 80 : t >= 50 ? 50 : t >= 30 ? 30 : t >= 20 ? 20 : t >= 10 ? 10 : 5 + }, i([d({ + type: l.CoinEmitter, + tooltip: "发射器 控制节点" + })], e.prototype, "coinEmitter", void 0), i([d({ + type: [cc.Prefab], + tooltip: "发射器预制体" + })], e.prototype, "prefabList", void 0), i([p], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "./CoinEmitter": "CoinEmitter" + } + ], + rewardPrefab: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "a121afwuuhFa6IKfrPvi+zw", "rewardPrefab"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../script/common/CcJsFunc"), + c = cc._decorator, + s = c.ccclass, + l = c.property, + u = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.icon = null, e.rewardNum = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.setRewardNode = function(t) { + var e = "rewardIcon/" + t.propType + ".png"; + r.default.changeSpriteFrame(this.icon, e), this.rewardNum.string = "" + t.num + }, i([l(cc.Node)], e.prototype, "icon", void 0), i([l(cc.Label)], e.prototype, "rewardNum", void 0), i([s], e) + }(cc.Component); + o.default = u, cc._RF.pop() + }, { + "../../script/common/CcJsFunc": "CcJsFunc" + } + ], + saveAsPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "79458xlXgdFfJ/BI3F5BmEK", "saveAsPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.inputLevelNum = null, e.closeNode = null, e + } + return a(e, t), e.prototype.start = function() { + this.closeNode.on(cc.Node.EventType.TOUCH_END, this.closeFunc, this) + }, e.prototype.showSaveAsPop = function() { + this.node.active = !0, this.inputLevelNum.string = "" + }, e.prototype.selectLevelFunc = function() { + var t = Number(this.inputLevelNum.string); + t > 0 ? (this.node.active = !1, this.emitSelectLevel(t), console.log("设置关卡数", this.inputLevelNum.string)) : console.log("error:书写错误") + }, e.prototype.emitSelectLevel = function(t) { + cc.game.emit("saveAsNewMap", t) + }, e.prototype.closeFunc = function() { + this.node.active = !1 + }, i([s({ + type: cc.EditBox, + tooltip: "输入另存为关卡数" + })], e.prototype, "inputLevelNum", void 0), i([s(cc.Node)], e.prototype, "closeNode", void 0), i([c], e) + }(cc.Component); + o.default = l, cc._RF.pop() + }, {} + ], + sdk: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "e267eKhDStMpaYZFC42eefy", "sdk"); + var n = this && this.__assign || function() { + return (n = Object.assign || function(t) { + for (var e, o = 1, n = arguments.length; o < n; o++) + for (var a in e = arguments[o]) Object.prototype.hasOwnProperty.call(e, a) && (t[a] = e[a]); + return t + }).apply(this, arguments) + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }), o.Platform = o.VibrateType = o.SHARE_CALLBACK_RATE = o.SHARE_CALLBACK_TIME = void 0; + var a, i, r = t("./native/wx-sdk"), + c = t("./native/tt-sdk"), + s = t("./http"), + l = t("./native/android-sdk"), + u = t("../public/data-env"), + p = t("./native/audio"), + d = t("./enumConfig"), + h = t("./native/share"), + f = u.getEnvConfig(); + o.SHARE_CALLBACK_TIME = 3, o.SHARE_CALLBACK_RATE = 0, + function(t) { + t[t.Light = 15] = "Light", t[t.Medium = 20] = "Medium", t[t.Heavy = 30] = "Heavy", t[t.Long = 400] = "Long" + }(a = o.VibrateType || (o.VibrateType = {})), + function(t) { + t[t.android = 0] = "android", t[t.ios = 1] = "ios", t[t.wx = 2] = "wx", t[t.tt = 3] = "tt", t[t.web = 4] = "web", t[t.oppo = 5] = "oppo", t[t.vivo = 6] = "vivo" + }(i = o.Platform || (o.Platform = {})); + var m = function() { + function t() {} + return Object.defineProperty(t, "baseParams", { + get: function() { + var t = cc.sys.localStorage.getItem(d.STORAGEKEY.GAMEUSERLOCALDATA); + return { + t: JSON.parse(t).userData.token + } + }, + enumerable: !1, + configurable: !0 + }), t.get = function(t) { + return s.default.get(n({ + host: this.host, + baseParams: this.baseParams + }, t)) + }, t.post = function(t) { + return s.default.post(n({ + host: this.host, + baseParams: this.baseParams + }, t)) + }, t.save = function(t, e) { + cc.sys.localStorage.setItem(t, e) + }, t.load = function(t) { + return cc.sys.localStorage.getItem(t) + }, t.vibrateShort = function(t) { + void 0 === t && (t = a.Light); + var e = cc.sys.localStorage.getItem(d.STORAGEKEY.GAMEUSERLOCALDATA); + if (e) { + var o = JSON.parse(e); + if (o && o.setUpData && o.setUpData.shockStatus < 1) return void console.log("shockStatus = " + o.setUpData.shockStatus) + } + this.isPlatform(i.wx) && wx.vibrateShort ? t == a.Light ? r.default.vibrateShort("light") : t == a.Medium ? r.default.vibrateShort("medium") : r.default.vibrateShort("heavy") : cc.sys.platform == cc.sys.BYTEDANCE_GAME && window.tt && tt.vibrateShort ? c.default.vibrateShort() : this.isPlatform(i.android) && l.default.vibrateShort(t) + }, t.vibrateLong = function(t) { + void 0 === t && (t = a.Long), this.isPlatform(i.wx) && wx.vibrateLong ? r.default.vibrateLong() : cc.sys.platform == cc.sys.BYTEDANCE_GAME && window.tt && tt.vibrateLong ? c.default.vibrateLong() : this.isPlatform(i.android) && l.default.vibrateShort(t) + }, t.checkUpdateManager = function() { + this.isPlatform(i.wx) ? r.default.checkUpdateManager() : cc.sys.platform == cc.sys.BYTEDANCE_GAME && window.tt || this.isPlatform(i.android) + }, t.onShareAppMessageQuery = function() { + if (this.isPlatform(i.wx)) return r.default.onShareAppMessageQuery(); + cc.sys.platform == cc.sys.BYTEDANCE_GAME && window.tt || this.isPlatform(i.android) + }, t.setOnShow = function(t) { + this.isPlatform(i.wx) ? cc.game.on(cc.game.EVENT_SHOW, t) : this.isPlatform(i.tt) ? cc.game.on(cc.game.EVENT_SHOW, t) : (this.isPlatform(i.android), cc.game.on(cc.game.EVENT_SHOW, t)) + }, t.setOffShow = function(t) { + this.isPlatform(i.wx) ? cc.game.off(cc.game.EVENT_SHOW, t) : cc.sys.platform == cc.sys.BYTEDANCE_GAME && window.tt ? cc.game.off(cc.game.EVENT_SHOW, t) : (this.isPlatform(i.android), cc.game.off(cc.game.EVENT_SHOW, t)) + }, t.setOnShowOnce = function(t) { + if (this.isPlatform(i.wx)) return r.default.setOnShowOnce(t); + cc.sys.platform == cc.sys.BYTEDANCE_GAME && window.tt || this.isPlatform(i.android) + }, t.setOnHide = function(t) { + if (this.isPlatform(i.wx)) return r.default.setOnHide(t); + this.isPlatform(i.tt) ? cc.game.on(cc.game.EVENT_HIDE, t) : (this.isPlatform(i.android), cc.game.on(cc.game.EVENT_HIDE, t)) + }, t.setOffHide = function(t) { + this.isPlatform(i.wx) ? r.default.setOffHide(t) : cc.sys.platform == cc.sys.BYTEDANCE_GAME && window.tt || (this.isPlatform(i.android), cc.game.off(cc.game.EVENT_HIDE, t)) + }, t.setOnHideOnce = function(t) { + if (this.isPlatform(i.wx)) return r.default.setOnHideOnce(t); + cc.sys.platform == cc.sys.BYTEDANCE_GAME && window.tt || this.isPlatform(i.android) + }, t.setOnShareAppMessage = function(t) { + this.isPlatform(i.wx) ? r.default.onShareAppMessage(t) : cc.sys.platform == cc.sys.BYTEDANCE_GAME && window.tt || this.isPlatform(i.android) + }, t.weiBoJump = function() { + if (this.isPlatform(i.wx)) return r.default.weiBoJump(); + cc.sys.platform == cc.sys.BYTEDANCE_GAME && window.tt || this.isPlatform(i.android) + }, t.copyToClipboard = function(t) { + if (this.isPlatform(i.wx)) r.default.setClipboardData(t); + else if (cc.sys.platform == cc.sys.BYTEDANCE_GAME) c.default.setClipboardData(t); + else if (cc.sys.isBrowser) { + var e = t + "", + o = document.createElement("textarea"); + o.value = e, o.setAttribute("readonly", ""), o.style.position = "absolute", o.style.left = "-9999px", o.style.fontSize = "12pt"; + var n = getSelection(), + a = null; + n.rangeCount > 0 && (a = n.getRangeAt(0)), document.body.appendChild(o), o.select(), o.selectionStart = 0, o.selectionEnd = e.length; + var s = !1; + try { + s = document.execCommand("copy") + } catch (l) { + cc.warn("[sdk] copy to clipboard err", l) + } + document.body.removeChild(o), a && (n.removeAllRanges(), n.addRange(a)), s ? cc.log("h5 copy to clipboard success") : cc.log("h5 copy to clipboard failed") + } + }, t.chooseImage = function() { + this.isPlatform(i.wx) ? cc.log("---wxChooseImage---") : cc.sys.platform == cc.sys.BYTEDANCE_GAME ? cc.log("---ttChooseImage---") : cc.sys.isBrowser && cc.log("---h5ChooseImage---") + }, t.preloadVideoAd = function(t, e, o, n, a) { + var r = this; + void 0 === a && (a = !0), cc.log("[sdk] video ad", t); + var c = t; + if (console.log("cc.sys.os:", cc.sys.os), console.log("adID:", c), console.log("this.videoAdMap:", this.videoAdMap), "" != c) { + var s = null; + if (this.videoAdMap[c]) { + if (!a) return console.log("[video ad] 使用已有回调方法"), this.videoAdMap[c]; + var l = this.videoAdMap[c], + u = l.video, + d = l.close, + h = l.error; + u.offClose(d), u.offError(h), s = u, console.log("[video ad] 清空回调方法") + } else console.log("创建实力"), this.isPlatform(i.wx) ? s = wx.createRewardedVideoAd({ + adUnitId: c, + multiton: !0 + }) : this.isPlatform(i.tt) ? s = tt.createRewardedVideoAd({ + adUnitId: c, + multiton: !0 + }) : this.isPlatform(i.oppo) ? s = qg.createRewardedVideoAd({ + adUnitId: c + }) : this.isPlatform(i.vivo) && (s = ad.createRewardedVideoAd({ + adUnitId: c + })); + var f = function(t) { + t && t.isEnded || void 0 === t ? (console.log("正常播放结束,可以下发游戏奖励 ++++"), e && e(), r.isPlatform(i.wx) && r.reportRewardBehavior(4, c, s)) : (cc.game.emit("showMainTips", "中途退出,不下发游戏奖励"), console.log("播放中途退出,不下发游戏奖励 ----"), o && o("quit", "中途退出"), r.isPlatform(i.wx) && r.reportRewardBehavior(3, c, s)), p.default.playBGM(), r._canShowRewardedVideoAd = !0 + }, + m = function(t) { + 1004 == t.errCode || 1005 == t.errCode || 1006 == t.errCode ? n && n("no-fit", "没有合适的广告") : o && o(t.errCode, t.errMsg), r.reportRewardBehavior(5, c, s), console.log("没有合适的广告 = ", t.errCode, t.errMsg), cc.game.emit("showMainTips", "广告拉取失败", t.errCode), p.default.playBGM(), r._canShowRewardedVideoAd = !0 + }; + if (null != s && null != s) return s.onClose(f), s.onError(m), this.isPlatform(i.wx) && s.onLoad(function(t) { + t && (1 == t.shareValue ? r.wxValue = "shareValue" : 1 == t.rewardValue ? r.wxValue = "rewardValue" : r.wxValue = ""), console.log("激励视频 广告加载成功 = ", t, "wxValue = ", r.wxValue) + }), cc.log("[video ad] 注册新的回调方法"), this.videoAdMap[c] = { + video: s, + close: f, + error: m + }, this.videoAdMap[c] + } + }, t.share = function(t, e, o, n) { + var a = this; + this.isPlatform(i.wx) ? h.default.shareMethod({ + success: function() { + o && o() + }, + fail: function() { + n && n() + }, + complete: function() { + if (a.videoAdMap[e]) { + var o = a.videoAdMap[e].video; + a.reportShareBehavior(t, e, o) + } + } + }) : o && o() + }, t.createCanvas = function() { + if (this.isPlatform(i.wx)) { + var t = canvas.toTempFilePathSync({ + x: 0, + y: 0, + width: cc.winSize.width, + height: cc.winSize.height, + destWidth: cc.winSize.width, + destHeight: cc.winSize.height, + fileType: "png", + quality: "1.0" + }); + this.wxSave(t) + } else if (this.isPlatform(i.tt)) { + var e = canvas.toTempFilePathSync({ + x: 0, + y: 0, + width: cc.winSize.width, + height: cc.winSize.height, + destWidth: cc.winSize.width, + destHeight: cc.winSize.height + }); + tt.shareAppMessage({ + imageUrl: e + }) + } + }, t.wxSave = function(t) { + wx.authorize({ + scope: "scope.writePhotosAlbum", + success: function() { + wx.saveImageToPhotosAlbum({ + filePath: t, + success: function() { + wx.showToast({ + title: "截图已保存至相册,快快分享到朋友圈吧", + icon: "none", + image: "", + duration: 1500 + }) + }, + fail: function() {} + }) + }, + fail: function() { + var e = { + title: "微信授权", + content: "保存到相册需要您的授权,请给予我们授权", + showCancel: !0, + canelColor: "#666", + confirmText: "去授权", + confirmColor: "#666", + success: function(e) { + 1 == e.confirm && wx.openSetting({ + success: function() { + wx.saveImageToPhotosAlbum({ + filePath: t, + success: function() { + wx.showToast({ + title: "截图已保存至相册,快快分享到朋友圈吧", + icon: "none", + image: "", + duration: 1500 + }) + }, + fail: function() {} + }) + } + }) + } + }; + wx.showModal(e) + } + }) + }, t.reportRewardBehavior = function(t, e, o) { + o.reportShareBehavior({ + operation: t, + currentShow: 0, + strategy: 1, + adunit: e, + scenelD: 1, + shareValue: 0, + rewardValue: 1 + }) + }, t.reportShareBehavior = function(t, e, o) { + o.reportShareBehavior({ + operation: 6, + inviteUser: t, + strategy: 1, + adunit: e, + scenelD: 1, + shareValue: 1, + rewardValue: 0 + }) + }, t.watchAdVideo = function(t) { + var e = this, + o = t.id, + n = t.tag, + a = t.success, + r = t.fail, + c = t.nofit; + if (0 != this._canShowRewardedVideoAd) + if (cc.log("[sdk] watch ad video", n), cc.sys.isBrowser) a && a(); + else { + if ("" != o) { + if (this.isPlatform(i.android)) l.default.showRewardVideoAd(o, a, r); + else if (this.isPlatform(i.wx)) { + var s = this.preloadVideoAd(o, a, r, c, !0).video; + s.show().then(function() { + return s.show(), e.reportRewardBehavior(1, o, s), !0 + }).catch(function(t) { + if (console.log("[sdk] 激励视频广告显示失败", t), console.log("广告组件出现问题", t), s.load().then(function() { + console.log("手动加载成功"), s.show() + }), "can't invoke load() while video-ad is showed" != t.errMsg) return r && r(t), !1; + console.warn("[sdk] can't invoke load() while video-ad is showed, ignore operation.") + }) + } else if (this.isPlatform(i.tt)) { + console.log("[字节sdk]"); + var u = this.preloadVideoAd(o, a, r, c, !0).video; + u.show().then(function() { + return console.log("[sdk] 激励视频广告显示成功"), !0 + }).catch(function(t) { + if (console.log("[sdk] 激励视频广告显示失败", t), console.log("广告组件出现问题", t), u.load().then(function() { + console.log("手动加载成功"), u.show() + }), "can't invoke load() while video-ad is showed" != t.errMsg) return r && r(t), !1; + console.warn("[sdk] can't invoke load() while video-ad is showed, ignore operation.") + }) + } else if (this.isPlatform(i.oppo)) { + console.log("[oppo sdk]"); + var p = this.preloadVideoAd(o, a, r, c, !0).video; + p.show().then(function() { + return console.log("[sdk] 激励视频广告显示成功"), !0 + }).catch(function(t) { + if (console.log("[sdk] 激励视频广告显示失败", t), console.log("广告组件出现问题", t), p.load().then(function() { + console.log("手动加载成功"), p.show() + }), "can't invoke load() while video-ad is showed" != t.errMsg) return r && r(t), !1; + console.warn("[sdk] can't invoke load() while video-ad is showed, ignore operation.") + }) + } else if (this.isPlatform(i.vivo)) { + console.log("[vivo sdk]"); + var d = this.preloadVideoAd(o, a, r, c, !0).video; + d.show().then(function() { + return console.log("[sdk] 激励视频广告显示成功"), !0 + }).catch(function(t) { + if (console.log("[sdk] 激励视频广告显示失败", t), console.log("广告组件出现问题", t), d.load().then(function() { + console.log("手动加载成功"), d.show() + }), "can't invoke load() while video-ad is showed" != t.errMsg) return r && r(t), !1; + console.warn("[sdk] can't invoke load() while video-ad is showed, ignore operation.") + }) + } + return !0 + } + a && a() + } + }, t.showInterstitialAd = function(t) { + this.isPlatform(i.wx) ? r.default.showInterstitialAd() : cc.sys.platform == cc.sys.BYTEDANCE_GAME ? c.default.showInterstitialAd() : this.isPlatform(i.android) && l.default.showInterstitialAd(t.tag) + }, t.showFullScreenAd = function(t) { + this.isPlatform(i.android) && l.default.showFullScreenAd(t) + }, t.showBigImageAd = function(t) { + this.isPlatform(i.android) && l.default.showBigImageAd(t) + }, t.hideBigImageAd = function(t) { + this.isPlatform(i.android) && l.default.hideBigImageAd(t) + }, t.showBannerAd = function() { + this.isPlatform(i.wx) ? r.default.showBannerAd() : cc.sys.platform == cc.sys.BYTEDANCE_GAME && c.default.showBannerAd() + }, t.hideBannerAd = function() { + this.isPlatform(i.wx) ? r.default.hideBannerAd() : cc.sys.platform == cc.sys.BYTEDANCE_GAME && c.default.hideBannerAd() + }, t.showToast = function(t) { + this.isPlatform(i.wx) ? r.default.showToast(t) : (cc.sys.platform, cc.sys.BYTEDANCE_GAME) + }, t.getDeviceId = function() { + return "" + }, t.uploadFile = function(t) { + var e = this.host; + cc.sys.platform == cc.sys.BYTEDANCE_GAME && tt.uploadFile({ + url: e + t.url, + filePath: t.file, + name: "image_file", + formData: t.data, + success: t.success, + fail: t.fail, + complete: t.complete + }) + }, t.on = function(t, e, o) { + return cc.systemEvent.on(t, e, o) + }, t.once = function(t, e, o) { + return cc.systemEvent.once(t, e, o) + }, t.off = function(t, e, o) { + return cc.systemEvent.off(t, e, o) + }, t.targetOff = function(t) { + return cc.systemEvent.targetOff(t) + }, t.createAuthorizeBtn = function(t, e) { + var o = t.getBoundingBoxToWorld(), + n = cc.view.getFrameSize(), + a = cc.winSize, + i = o.xMin / a.width * n.width, + r = (a.height - o.yMax) / a.height * n.height, + c = o.width / a.width * n.width, + s = o.height / a.height * n.height, + l = this.createUserInfoButton({ + type: "text", + text: " ", + style: { + left: i, + top: r, + width: c, + height: s, + lineHeight: 0, + backgroundColor: "", + color: "#ffffff", + textAlign: "center", + fontSize: 16, + borderRadius: 4 + } + }); + return l.onTap(function(t) { + t.iv || t.signature ? e(!0) : e(!1) + }), l + }, t.rankScoreUpdate = function(t, e, o) { + this.isPlatform(i.wx) && r.default.wxRankScoreUpdate(t, e, o) + }, t.rankScoreRemove = function(t) { + this.isPlatform(i.wx) && r.default.wxRankScoreRemove(t) + }, t.showSubContext = function(t, e, o, n) { + this.isPlatform(i.wx) && r.default.wxShowSubContext(t, e, o, n) + }, t.getAppVersion = function() { + return "" + }, t.isPlatform = function(t) { + switch (t) { + case i.android: + return !(!cc.sys.isNative || cc.sys.os != cc.sys.OS_ANDROID); + case i.ios: + return !(!cc.sys.isNative || cc.sys.os != cc.sys.OS_IOS); + case i.wx: + return cc.sys.platform == cc.sys.WECHAT_GAME; + case i.tt: + return cc.sys.platform == cc.sys.BYTEDANCE_GAME; + case i.oppo: + return cc.sys.platform == cc.sys.OPPO_GAME; + case i.vivo: + return cc.sys.platform == cc.sys.VIVO_GAME; + case i.web: + return cc.sys.isBrowser + } + return !1 + }, t.getPlatform = function() { + return cc.sys.isNative && cc.sys.os == cc.sys.OS_ANDROID ? i.android : cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS ? i.ios : cc.sys.platform == cc.sys.WECHAT_GAME ? i.wx : i.web + }, t.createUserInfoButton = function(t) { + return wx.createUserInfoButton ? wx.createUserInfoButton(t) : (cc.log("[sdk] createUserInfoButton"), null) + }, t._shareNum = 0, t._shareCount = 0, t._canShowRewardedVideoAd = !0, t.host = f.host, t.wxValue = "", t.videoAdMap = {}, t + }(); + o.default = m, m.checkUpdateManager(), cc._RF.pop() + }, { + "../public/data-env": "data-env", + "./enumConfig": "enumConfig", + "./http": "http", + "./native/android-sdk": "android-sdk", + "./native/audio": "audio", + "./native/share": "share", + "./native/tt-sdk": "tt-sdk", + "./native/wx-sdk": "wx-sdk" + } + ], + selectLevelPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "20c37kr4K9IaaKo8NFkM2dj", "selectLevelPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/dataTs"), + c = cc._decorator, + s = c.ccclass, + l = c.property, + u = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.inputLevelNum = null, e.closeNode = null, e + } + return a(e, t), e.prototype.start = function() { + this.closeNode.on(cc.Node.EventType.TOUCH_END, this.closeFunc, this) + }, e.prototype.showSelectLevelPop = function() { + this.node.active = !0, this.inputLevelNum.string = "" + }, e.prototype.selectLevelFunc = function() { + var t = Number(this.inputLevelNum.string); + t > 0 ? (this.node.active = !1, this.emitSelectLevel(t), console.log("设置关卡数", this.inputLevelNum.string)) : console.log("error:书写错误") + }, e.prototype.emitSelectLevel = function(t) { + r.default.getLevelMapData(t, function(t) { + if (console.log("data:", t), t) { + var e = { + newLevelData: t + }; + cc.game.emit("initLevelData", e) + } else console.log("error:找不到对应关卡") + }) + }, e.prototype.closeFunc = function() { + this.node.active = !1 + }, i([l({ + type: cc.EditBox, + tooltip: "输入对应关卡数" + })], e.prototype, "inputLevelNum", void 0), i([l(cc.Node)], e.prototype, "closeNode", void 0), i([s], e) + }(cc.Component); + o.default = u, cc._RF.pop() + }, { + "../common/dataTs": "dataTs" + } + ], + setBloackNumPrefab: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "adc65qZJIVBEbnAGo5PKVIz", "setBloackNumPrefab"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../script/common/CcJsFunc"), + c = cc._decorator, + s = c.ccclass, + l = c.property, + u = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.blockImg = null, e.typeID = null, e.inputBlockNum = null, e.blockType = 0, e.parentCallbackFunc = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.initBlockNumNode = function(t, e, o) { + this.blockType = t, this.parentCallbackFunc = o; + var n = e[t]; + n && (this.inputBlockNum.string = "" + n); + var a = "block/block_" + t + ".png"; + r.default.changeSpriteFrame(this.blockImg, a) + }, e.prototype.setBlockNumFun = function() { + var t = Number(this.inputBlockNum.string); + this.parentCallbackFunc(this.blockType, t) + }, i([l(cc.Node)], e.prototype, "blockImg", void 0), i([l(cc.Label)], e.prototype, "typeID", void 0), i([l({ + type: cc.EditBox, + tooltip: "块的使用组数" + })], e.prototype, "inputBlockNum", void 0), i([s], e) + }(cc.Component); + o.default = u, cc._RF.pop() + }, { + "../../script/common/CcJsFunc": "CcJsFunc" + } + ], + setBlockNumPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "223a5iixK9JDqi/hb6BvmvY", "setBlockNumPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../pre/mapEditor/setBloackNumPrefab"), + c = t("../common/config"), + s = cc._decorator, + l = s.ccclass, + u = s.property, + p = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.setBlockNumPrefab = null, e.closeNode = null, e.blockContent = null, e.groupNumLabel = null, e.blockTypeConfig = c.default.blockTypeConfig, e.blockDataObj = {}, e.newScale = .5, e.blockPreWidth = 60, e.blockPreHeight = 110, e.groupMax = 0, e.hengNum = 10, e + } + return a(e, t), e.prototype.start = function() { + this.closeNode.on(cc.Node.EventType.TOUCH_END, this.closeFunc, this) + }, e.prototype.showSetBlockPop = function(t, e) { + for (var o in console.log("groupMax = ", t), this.node.active = !0, this.blockDataObj = e, this.groupMax = t, this.updateGroupNum(), this.blockContent.removeAllChildren(), this.blockTypeConfig) this.addSetBlockNumNode(o, this.blockTypeConfig[o], e); + this.blockContent.height = (Math.ceil(this.blockTypeConfig.length / this.hengNum) + 1) * this.blockPreHeight + }, e.prototype.addSetBlockNumNode = function(t, e, o) { + var n = cc.instantiate(this.setBlockNumPrefab), + a = this.blockPreWidth / 2 + t % this.hengNum * (this.blockPreWidth + 5) - this.blockContent.width / 2, + i = this.blockPreHeight / 2 + Math.floor(t / this.hengNum) * (this.blockPreHeight + 40); + n.x = a, n.y = -i, n.scale = this.newScale, n.getComponent(r.default).initBlockNumNode(e, o, this.chileSetBlockNum.bind(this)), this.blockContent.addChild(n) + }, e.prototype.chileSetBlockNum = function(t, e) { + e ? this.blockDataObj[t] = e : delete this.blockDataObj[t], this.updateGroupNum() + }, e.prototype.updateGroupNum = function() { + var t = 0; + for (var e in this.blockDataObj) t += this.blockDataObj[e]; + this.groupNumLabel.string = "组数:" + t + "/" + this.groupMax + }, e.prototype.closeFunc = function() { + this.node.active = !1 + }, e.prototype.confirmFunc = function() { + var t = 0; + for (var e in this.blockDataObj) t += this.blockDataObj[e]; + t == this.groupMax ? (console.log("配置无误"), cc.game.emit("showTips", "配置成功"), this.node.active = !1, cc.game.emit("setBlockTypeData", this.blockDataObj)) : (console.log("配置有错"), cc.game.emit("showTips", "配置有错")) + }, i([u(cc.Prefab)], e.prototype, "setBlockNumPrefab", void 0), i([u(cc.Node)], e.prototype, "closeNode", void 0), i([u(cc.Node)], e.prototype, "blockContent", void 0), i([u(cc.Label)], e.prototype, "groupNumLabel", void 0), i([l], e) + }(cc.Component); + o.default = p, cc._RF.pop() + }, { + "../../pre/mapEditor/setBloackNumPrefab": "setBloackNumPrefab", + "../common/config": "config" + } + ], + setupPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "71b23kHj7xHS5zCkm73iIBG", "setupPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../i18n/gd_language"), + c = t("../../i18n/i18n"), + s = t("../common/CcJsFunc"), + l = t("../common/dataTs"), + u = t("../common/enumConfig"), + p = t("../common/native/audio"), + d = t("../common/native/wx-sdk"), + h = t("../common/sdk"), + f = t("../manager/GameManager"), + m = t("../manager/report-common"), + g = t("../utils/uma/uma-sdk"), + y = cc._decorator, + v = y.ccclass, + b = y.property, + _ = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mask = null, e.popNode = null, e.userIdLabel = null, e.titleLabel = null, e.soundLabel = null, e.musicLabel = null, e.shakeLabel = null, e.backLabel = null, e.closeBtn = null, e.returnMainBtn = null, e.shareBtn = null, e.shareVideo = null, e.shareLabel = null, e.effectBtn = null, e.effectBg = null, e.musicBtn = null, e.musicBg = null, e.shockBtn = null, e.shockBg = null, e.bulletBtn = null, e.bulletBg = null, e.whiteCycle = null, e.greenCycle = null, e.userNode = null, e.privacyNode = null, e.showPopData = null, e.setupData = null, e.whiteBtnX = 27, e + } + return a(e, t), e.prototype.start = function() { + this.effectBtn.on("touchend", this.setEffectFunc, this), this.musicBtn.on("touchend", this.setMusicFunc, this), this.shockBtn.on("touchend", this.setShockFunc, this), this.bulletBtn.on("touchend", this.setBulletFunc, this), s.default.addbtnTouchEndScale(this.mask, this.hideSetupPop.bind(this)), s.default.addbtnTouchStartScale(this.closeBtn), s.default.addbtnTouchEndScale(this.closeBtn, this.hideSetupPop.bind(this)), s.default.addbtnTouchCancelScale(this.closeBtn), s.default.addbtnTouchStartScale(this.returnMainBtn), s.default.addbtnTouchEndScale(this.returnMainBtn, this.returnMainFunc.bind(this)), s.default.addbtnTouchCancelScale(this.returnMainBtn), s.default.addbtnTouchStartScale(this.shareBtn), s.default.addbtnTouchEndScale(this.shareBtn, this.shareBtnFunc.bind(this)), s.default.addbtnTouchCancelScale(this.shareBtn), s.default.addTargetTouchUpInside(this.userNode, this.userNodeFunc.bind(this)), s.default.addTargetTouchUpInside(this.privacyNode, this.privacyNodeFunc.bind(this)), this.setupFonts(), h.default.isPlatform(h.Platform.oppo) || h.default.isPlatform(h.Platform.vivo) ? (this.userNode.active = !0, this.privacyNode.active = !0) : (this.userNode.active = !1, this.privacyNode.active = !1) + }, e.prototype.userNodeFunc = function() { + console.log("用户协议"), cc.sys.openURL("https://www.52shenbian.com/yinsi/yinsi.html") + }, e.prototype.privacyNodeFunc = function() { + console.log("隐私政策"), cc.sys.openURL("https://www.52shenbian.com/yinsi/fuwu.html") + }, e.prototype.setupFonts = function() { + this.titleLabel.string = c.default.instance.trans(r.GDLanguage.set_up), this.soundLabel.string = c.default.instance.trans(r.GDLanguage.set_up_sound_effect), this.musicLabel.string = c.default.instance.trans(r.GDLanguage.set_up_music), this.shakeLabel.string = c.default.instance.trans(r.GDLanguage.set_up_shock); + var t = l.default.getItem(u.STORAGEKEY.BULLETSWITCH); + console.log("bullet = " + t), -1 == t ? (this.bulletBg.stopAllActions(), cc.tween(this.bulletBg).to(.2, { + opacity: 0 + }).start()) : (this.bulletBg.stopAllActions(), cc.tween(this.bulletBg).delay(.1).to(.2, { + opacity: 255 + }).start()) + }, e.prototype.showSetupPop = function(t) { + this.node.active = !0, this.showPopData = t, this.returnMainBtn.active = !1, this.shareBtn.active = !1; + var e = l.default.getUserData(); + e.userID.length ? (this.userIdLabel.string = "UID: " + e.userID, this.userIdLabel.node.active = !0) : this.userIdLabel.node.active = !1, 2 == t.setupType ? this.returnMainBtn.active = !0 : 1 == t.setupType && (this.shareBtn.active = !0, l.default.isPlatform(l.GDPlatform.wx) ? (this.shareLabel.getComponent(cc.Label).string = "官方微博", s.default.changeSpriteFrame(this.shareVideo, "rewardIcon/reward_weibo_icon.png")) : (l.default.isPlatform(l.GDPlatform.oppo) || l.default.isPlatform(l.GDPlatform.oppo)) && (this.shareBtn.active = !1)), cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(), this.setSetupStatus() + }, e.prototype.hideSetupPop = function() { + this.showPopData && this.showPopData.popCallbackCollect && this.showPopData.popCallbackCollect.resumeCallBack(), this.node.active = !1 + }, e.prototype.setSetupStatus = function() { + this.setupData = l.default.getUserSetupData(), 1 == this.setupData.effectStatus ? this.effectBg.opacity = 255 : this.effectBg.opacity = 0, 1 == this.setupData.musicStatus ? this.musicBg.opacity = 255 : this.musicBg.opacity = 0, 1 == this.setupData.shockStatus ? this.shockBg.opacity = 255 : this.shockBg.opacity = 0 + }, e.prototype.setEffectFunc = function() { + 1 == this.setupData.effectStatus ? (this.effectBg.stopAllActions(), cc.tween(this.effectBg).to(.2, { + opacity: 0 + }).start()) : (this.effectBg.stopAllActions(), cc.tween(this.effectBg).delay(.1).to(.2, { + opacity: 255 + }).start()), this.setupData.effectStatus = -this.setupData.effectStatus, l.default.saveUserSetupData(this.setupData), p.default.playBGM() + }, e.prototype.setMusicFunc = function() { + 1 == this.setupData.musicStatus ? (this.musicBg.stopAllActions(), cc.tween(this.musicBg).to(.2, { + opacity: 0 + }).start()) : (this.musicBg.stopAllActions(), cc.tween(this.musicBg).delay(.1).to(.2, { + opacity: 255 + }).start()), this.setupData.musicStatus = -this.setupData.musicStatus, l.default.saveUserSetupData(this.setupData), p.default.playBGM(), 1 == this.setupData.musicStatus ? p.default.playBGM() : m.default.reportTACommon("music_close", {}) + }, e.prototype.setShockFunc = function() { + 1 == this.setupData.shockStatus ? (this.shockBg.stopAllActions(), cc.tween(this.shockBg).to(.2, { + opacity: 0 + }).start()) : (this.shockBg.stopAllActions(), cc.tween(this.shockBg).delay(.1).to(.2, { + opacity: 255 + }).start()), this.setupData.shockStatus = -this.setupData.shockStatus, l.default.saveUserSetupData(this.setupData) + }, e.prototype.setBulletFunc = function() { + var t = l.default.getItem(u.STORAGEKEY.BULLETSWITCH); + console.log("bullet = " + t), 1 == t ? (this.bulletBg.stopAllActions(), cc.tween(this.bulletBg).to(.2, { + opacity: 0 + }).start()) : (t = -1, this.bulletBg.stopAllActions(), cc.tween(this.bulletBg).delay(.1).to(.2, { + opacity: 255 + }).start()), t = -t, l.default.setItem(u.STORAGEKEY.BULLETSWITCH, t), cc.game.emit(u.EMITKEY.BULLETSTATE) + }, e.prototype.shareBtnFunc = function() { + l.default.isPlatform(l.GDPlatform.tt) ? cc.game.emit(u.EMITKEY.TTSHARERECORD) : l.default.isPlatform(l.GDPlatform.wx) && d.default.weiBoJump() + }, e.prototype.returnMainFunc = function() { + if (f.default.getInstance().gameType == u.GAMETYPE.GAMELEVEL) { + if (l.default.getSprintRewardData().winNum > 0) { + var t = { + popName: "sprintRewardPop", + showPopData: { + popCallbackCollect: null, + popType: 1 + } + }; + cc.game.emit("showPop", t) + } + f.default.getInstance().cookieDict.cookieCurCount > 0 && (t = { + popName: "loseCookiePop", + showPopData: { + popCallbackCollect: null, + popType: 1 + } + }, cc.game.emit("showPop", t)) + } + var e = 0 == f.default.getInstance().sheepMark.resurgenceCount ? 0 : 1; + console.log("展示失去爱心弹框"); + var o = { + popName: "loseLovePop", + showPopData: { + popCallbackCollect: null, + popType: e + } + }; + cc.game.emit("showPop", o), this.node.active = !1 + }, e.prototype.contactFunc = function() { + console.log("联系客服"), g.default.trackEvent("setting_service") + }, i([b(cc.Node)], e.prototype, "mask", void 0), i([b(cc.Node)], e.prototype, "popNode", void 0), i([b(cc.Label)], e.prototype, "userIdLabel", void 0), i([b(cc.Label)], e.prototype, "titleLabel", void 0), i([b(cc.Label)], e.prototype, "soundLabel", void 0), i([b(cc.Label)], e.prototype, "musicLabel", void 0), i([b(cc.Label)], e.prototype, "shakeLabel", void 0), i([b(cc.Label)], e.prototype, "backLabel", void 0), i([b(cc.Node)], e.prototype, "closeBtn", void 0), i([b(cc.Node)], e.prototype, "returnMainBtn", void 0), i([b(cc.Node)], e.prototype, "shareBtn", void 0), i([b(cc.Node)], e.prototype, "shareVideo", void 0), i([b(cc.Node)], e.prototype, "shareLabel", void 0), i([b(cc.Node)], e.prototype, "effectBtn", void 0), i([b(cc.Node)], e.prototype, "effectBg", void 0), i([b(cc.Node)], e.prototype, "musicBtn", void 0), i([b(cc.Node)], e.prototype, "musicBg", void 0), i([b(cc.Node)], e.prototype, "shockBtn", void 0), i([b(cc.Node)], e.prototype, "shockBg", void 0), i([b(cc.Node)], e.prototype, "bulletBtn", void 0), i([b(cc.Node)], e.prototype, "bulletBg", void 0), i([b(cc.SpriteFrame)], e.prototype, "whiteCycle", void 0), i([b(cc.SpriteFrame)], e.prototype, "greenCycle", void 0), i([b(cc.Node)], e.prototype, "userNode", void 0), i([b(cc.Node)], e.prototype, "privacyNode", void 0), i([v], e) + }(cc.Component); + o.default = _, cc._RF.pop() + }, { + "../../i18n/gd_language": "gd_language", + "../../i18n/i18n": "i18n", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../common/native/audio": "audio", + "../common/native/wx-sdk": "wx-sdk", + "../common/sdk": "sdk", + "../manager/GameManager": "GameManager", + "../manager/report-common": "report-common", + "../utils/uma/uma-sdk": "uma-sdk" + } + ], + shareNodePop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "a0bd2kRDllJoo/euhMYhvFy", "shareNodePop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/CcJsFunc"), + c = t("../common/dataTs"), + s = t("../common/enumConfig"), + l = t("../common/native/share"), + u = t("../common/native/tt-sdk"), + p = cc._decorator, + d = p.ccclass, + h = p.property, + f = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.popNode = null, e.shareNodeVideo = null, e.shareNodeUrl = null, e.closeVideoBtn = null, e.shareVideoBtn = null, e.exitVideoBtn = null, e.closeUrlBtn = null, e.shareUrlBtn = null, e.exitUrlBtn = null, e.popData = null, e + } + return a(e, t), e.prototype.start = function() { + r.default.addTargetTouchUpInside(this.closeVideoBtn, this.closeVideoBtnFunc.bind(this)), r.default.addTargetTouchUpInside(this.shareVideoBtn, this.shareVideoBtnFunc.bind(this)), r.default.addTargetTouchUpInside(this.exitVideoBtn, this.exitVideoBtnFunc.bind(this)), r.default.addTargetTouchUpInside(this.closeUrlBtn, this.closeUrlBtnFunc.bind(this)), r.default.addTargetTouchUpInside(this.shareUrlBtn, this.shareUrlBtnFunc.bind(this)), r.default.addTargetTouchUpInside(this.exitUrlBtn, this.exitUrlBtnFunc.bind(this)) + }, e.prototype.closeVideoBtnFunc = function() { + this.node.active = !1 + }, e.prototype.shareVideoBtnFunc = function() { + cc.game.emit(s.EMITKEY.TTSHARERECORD) + }, e.prototype.exitVideoBtnFunc = function() { + this.node.active = !1 + }, e.prototype.closeUrlBtnFunc = function() { + this.node.active = !1 + }, e.prototype.shareUrlBtnFunc = function() { + var t = this, + e = this; + c.default.isPlatform(c.GDPlatform.tt) ? u.default.shareTemplate(function(o) { + console.log("shareTemplate = ", o), o && (e.node.active = !1), t.popData && t.popData.shareCb && (e.popData.shareCb(o), e.node.active = !1) + }) : c.default.isPlatform(c.GDPlatform.wx) ? l.default.shareMethod({ + success: function() {}, + fail: function() {}, + complete: function() {} + }) : this.node.active = !1 + }, e.prototype.exitUrlBtnFunc = function() { + this.node.active = !1 + }, e.prototype.showPop = function(t) { + this.popData = t, this.shareNodeVideo.active = !1, this.shareNodeUrl.active = !1, this.node.active = !0, cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(), c.default.isPlatform(c.GDPlatform.tt) ? 1 == t.type ? this.shareNodeVideo.active = !0 : 2 == t.type && (this.shareNodeUrl.active = !0) : (c.default.isPlatform(c.GDPlatform.wx), this.shareNodeUrl.active = !0) + }, i([h(cc.Node)], e.prototype, "popNode", void 0), i([h(cc.Node)], e.prototype, "shareNodeVideo", void 0), i([h(cc.Node)], e.prototype, "shareNodeUrl", void 0), i([h(cc.Node)], e.prototype, "closeVideoBtn", void 0), i([h(cc.Node)], e.prototype, "shareVideoBtn", void 0), i([h(cc.Node)], e.prototype, "exitVideoBtn", void 0), i([h(cc.Node)], e.prototype, "closeUrlBtn", void 0), i([h(cc.Node)], e.prototype, "shareUrlBtn", void 0), i([h(cc.Node)], e.prototype, "exitUrlBtn", void 0), i([d], e) + }(cc.Component); + o.default = f, cc._RF.pop() + }, { + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../common/native/share": "share", + "../common/native/tt-sdk": "tt-sdk" + } + ], + share: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "cc74eL1jO5JXILJM8B5nOu3", "share"), Object.defineProperty(o, "__esModule", { + value: !0 + }), o.ShareType = void 0; + var n = t("../sdk"); + (function(t) { + t.share = "share", t.addFriend = "addFriend", t.getReward = "getReward" + })(o.ShareType || (o.ShareType = {})); + var a = function() { + function t() {} + return t.init = function() { + n.default.setOnShow(function() {}), n.default.setOnShow(function() {}); + var t = this.getShareParams(), + e = { + title: t.title, + imageUrl: t.imageUrl, + query: "1" + }; + n.default.setOnShareAppMessage(e) + }, t.getRewardShare = function(t) { + var e = this.getShareParams(), + o = { + title: e.title, + imageUrl: e.imageUrl, + success: function(e) { + console.log("Share", "success", e), e && (t.success(), console.log("分享成功")) + }, + fail: function(e) { + console.log("Share", "success", e), e && (t.fail(), console.log("分享失败")) + }, + query: "2", + validate: !0 + }; + this.initiativeShare(o, !0) + }, t.shareMethod = function(t) { + var e = t.success, + o = t.fail, + n = t.complete, + a = this.getShareParams(); + this.initiativeShare({ + title: a.title, + imageUrl: a.imageUrl, + success: function(t) { + console.log("分享 success = ", t), e && e(t) + }, + fail: function(t) { + console.log("分享 fail = ", t), o && o(t) + }, + complete: function(t) { + console.log("分享 complete = ", t), n && n(t) + }, + validate: !0 + }, !0) + }, t.initiativeShare = function(t, e) { + if (n.default.isPlatform(n.Platform.web)) return t.success && t.success(!0), void(t.complete && t.complete(!1)); + var o = !1, + a = (new Date).getTime(), + i = !0; + 1 == t.validate ? e ? (console.log("分享 111"), n.default.setOnShowOnce(function() { + i ? (o = (new Date).getTime() - a >= 2500, console.log("分享 222 result = ", o, "startTime = ", a), 0 == o ? (t.fail && t.fail(!0), t.complete && t.complete(!1), console.log("分享 333")) : (a = (new Date).getTime(), console.log("分享 444 result = ", o, "startTime = ", a), i = !1, t.success && t.success(!0), t.complete && t.complete(!0))) : console.log("多次进入后台 ###### ") + })) : (console.log("分享 555"), n.default.setOnShow(function() { + 0 == (o = (new Date).getTime() - a >= 2500) ? (t.fail && t.fail(!0), t.complete && t.complete(!1)) : (t.success && t.success(!0), t.complete && t.complete(!0)) + })) : (t.success(!0), t.complete && t.complete(!0)); + var r = ""; + t.query && (r = t.query), wx.shareAppMessage({ + title: t.title, + imageUrl: t.imageUrl, + query: r + }) + }, t.getShareParams = function() { + var t = [{ + title: "最新出炉全国省份智力排行!", + imageUrl: "https://cat-match-static.easygame2021.com/images/wx_1.jpg" + }, { + title: "带薪上厕所的时候都在玩啥?", + imageUrl: "https://cat-match-static.easygame2021.com/images/wx_2.jpg" + }, { + title: "据说通关的都能达到爱因斯坦的IQ!", + imageUrl: "https://cat-match-static.easygame2021.com/images/wx_3.jpg" + }, { + title: "敢不敢睡觉前玩这个游戏?", + imageUrl: "https://cat-match-static.easygame2021.com/images/wx_4.jpg" + }, { + title: "什么能阻止我睡觉?就是这头羊!!", + imageUrl: "https://cat-match-static.easygame2021.com/images/wx_5.jpg" + }, { + title: "智力不够,就不要来挑战这个游戏了!", + imageUrl: "https://cat-match-static.easygame2021.com/images/wx_6.jpg" + }, { + title: "敢不敢来测算下你的智商够不够?", + imageUrl: "https://cat-match-static.easygame2021.com/images/wx_7.jpg" + }, { + title: "据说只有0.01%的人可以通关!玻璃心勿进!", + imageUrl: "https://cat-match-static.easygame2021.com/images/wx_8.jpg" + }]; + return t[Math.floor(Math.random() * t.length)] + }, t.shareId = 0, t.parsedId = "", t + }(); + o.default = a, cc._RF.pop() + }, { + "../sdk": "sdk" + } + ], + "sheep-card": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "a4c42prjHtESYEMJNr5MQAH", "sheep-card"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.redbgNode = null, e.bluebgNode = null, e.graybgNode = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.setupData = function(t) { + this.redbgNode.active = !1, this.bluebgNode.active = !1, this.graybgNode.active = !1; + var e = null, + o = !1; + if (1 == t.type ? (this.redbgNode.active = !0, e = this.redbgNode, o = !0) : 2 == t.type ? (this.bluebgNode.active = !0, e = this.bluebgNode) : 3 == t.type && (this.graybgNode.active = !0, e = this.graybgNode), e) { + var n = e.getChildByName("num-label").getComponent(cc.Label), + a = e.getChildByName("count-label").getComponent(cc.Label), + i = e.getChildByName("name-label").getComponent(cc.Label); + if (n.string = "第 " + t.num + " 名", a.string = t.item.win_score + " 羊", i.string = t.item.name + "羊队", o) { + var r = e.getChildByName("flash_1"), + c = e.getChildByName("flash_2"); + this.playAnimationFloat(r, 255), this.playAnimationFloat(c, -255) + } + } + }, e.prototype.playAnimationFloat = function(t, e) { + var o = this; + cc.tween(t).delay(.5).by(.1, { + opacity: e + }).call(function() { + o.playAnimationFloat(t, -e) + }).start() + }, i([s(cc.Node)], e.prototype, "redbgNode", void 0), i([s(cc.Node)], e.prototype, "bluebgNode", void 0), i([s(cc.Node)], e.prototype, "graybgNode", void 0), i([c], e) + }(cc.Component); + o.default = l, cc._RF.pop() + }, {} + ], + "sheep-flock-icon": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "a441bXbKtZDx6Z6u1Z9IX7r", "sheep-flock-icon"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../script/common/CcJsFunc"), + c = cc._decorator, + s = c.ccclass, + l = c.property, + u = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.iconHeader = null, e.purpleNode = null, e.blueNode = null, e.regionNode = null, e.cityNode = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.showData = function(t) { + var e = this; + t ? (this.node.stopAllActions(), this.node.active = !0, cc.tween(this.node).delay(3).call(function() { + e.node.active = !1 + }, this).start(), 0 == t.gender ? (this.purpleNode.active = !1, this.blueNode.active = !0) : 1 == t.gender ? (this.purpleNode.active = !1, this.blueNode.active = !0) : (this.purpleNode.active = !0, this.blueNode.active = !1), t.nick_name ? this.regionNode.getComponent(cc.Label).string = t.nick_name : this.regionNode.getComponent(cc.Label).string = "", t.city ? this.cityNode.getComponent(cc.Label).string = t.city : this.cityNode.getComponent(cc.Label).string = "", r.default.setAvatar(this.iconHeader, t.avatar)) : this.node.active = !1 + }, i([l(cc.Node)], e.prototype, "iconHeader", void 0), i([l(cc.Node)], e.prototype, "purpleNode", void 0), i([l(cc.Node)], e.prototype, "blueNode", void 0), i([l(cc.Node)], e.prototype, "regionNode", void 0), i([l(cc.Node)], e.prototype, "cityNode", void 0), i([s], e) + }(cc.Component); + o.default = u, cc._RF.pop() + }, { + "../../script/common/CcJsFunc": "CcJsFunc" + } + ], + "sheep-flock": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "9c2fby18nZLPpABsAs/z6CS", "sheep-flock"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }, + r = this && this.__spreadArrays || function() { + for (var t = 0, e = 0, o = arguments.length; e < o; e++) t += arguments[e].length; + var n = Array(t), + a = 0; + for (e = 0; e < o; e++) + for (var i = arguments[e], r = 0, c = i.length; r < c; r++, a++) n[a] = i[r]; + return n + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var c = t("../../script/common/CcJsFunc"), + s = t("../../script/common/dataTs"), + l = t("../../script/common/enumConfig"), + u = t("../../script/common/spine"), + p = t("../../script/manager/DateManager"), + d = t("../../script/manager/GameManager"), + h = t("../../script/manager/data-manager"), + f = t("./sheep-card"), + m = t("./sheep-flock-icon"), + g = cc._decorator, + y = g.ccclass, + v = g.property, + b = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.sheepSp = null, e.sheepNode = null, e.sheepCard = null, e.sheepCardNode = null, e.sheepIcon = null, e.sheepIconNode = null, e.manSheepHeader = null, e.manSheepHeaderNode = null, e.womanSheepheader = null, e.womanSheepheaderNode = null, e.zIndexList = null, e.userRankInfo = null, e.userPosItem = null, e.sheepNodeArr = [], e.angle = 0, e.radius = 0, e.iconNode = null, e.sheepUserNode = null, e.clothesData = null, e + } + return a(e, t), e.prototype.start = function() { + cc.game.on(l.EMITKEY.SHOWUSERNODE, this.showUserNode, this), cc.game.on(l.EMITKEY.CHANGESHEEPCLOTHES, this.changeSheepClothesFunc, this) + }, e.prototype.changeSheepClothesFunc = function() { + if (this.sheepUserNode && this.userRankInfo && 1 == this.userRankInfo.state) { + for (var t = this, e = "sheep/Sheeps", o = "skin_00", n = s.default.getSheepClothesData(), a = 0; a < n.length; a++) { + var i = n[a]; + if (i.dressing) { + e = "sheep/" + i.spName, o = i.spSkin; + break + } + } + this.sheepUserNode.getChildByName("sheepSp").getComponent(u.default).loadSpine(e, function() { + t.sheepUserNode.getChildByName("sheepSp").getComponent(u.default).setNewSkin(o), t.sheepUserNode.getChildByName("sheepSp").getComponent(u.default).play("Jump2", 0) + }) + } + }, e.prototype.showUserNode = function() { + var t = this; + this.userRankInfo && this.sheepIconNode && this.userPosItem && (console.log("game_over = " + d.default.getInstance().game_over), 1 == d.default.getInstance().game_over && this.sheepUserNode ? (this.sheepUserNode.opacity = 255, this.sheepUserNode.getChildByName("sheepSp").getComponent(u.default).play("Drop1", 1, function() { + t.sheepUserNode.getChildByName("flashSp").opacity = 255, t.sheepUserNode.getChildByName("flashSp").getComponent(u.default).play("3Ray1", 1, function() { + t.sheepUserNode.getChildByName("flashSp").opacity = 0 + }), setTimeout(function() { + s.default.isPlatform(s.GDPlatform.tt) ? t.showSharePop() : s.default.isPlatform(s.GDPlatform.web) && t.showWxSharePop() + }, 500), t.sheepUserNode.getChildByName("sheepSp").getComponent(u.default).play("Jump2", 0) + }), d.default.getInstance().game_over = 0) : (this.sheepIconNode.x = this.userPosItem.x, this.sheepIconNode.y = this.userPosItem.y + 20, this.sheepIconNode.getComponent(m.default).showData(this.userRankInfo))) + }, e.prototype.showSharePop = function() { + cc.game.emit("showPop", { + popName: "shareNodePop", + showPopData: { + type: 1 + } + }) + }, e.prototype.showWxSharePop = function() { + cc.game.emit("showPop", { + popName: "challengeSucPop", + showPopData: {} + }), setTimeout(function() { + cc.game.emit(l.EMITKEY.HIDEMASKLAYER) + }, 2e3) + }, e.prototype.setupData = function(t) { + if (t) { + this.angle = 240, this.radius = 100, this.sheepNodeArr = []; + try { + this.clothesData = s.default.gameConfigData.baseConfigData.sheepClothesData + } catch (g) {} + var e = p.default.format(l.CALENDARNAMES[5], new Date), + o = p.default.format(l.CALENDARNAMES[6], new Date), + n = s.default.getDailyData(e, o), + a = -1; + n && n.sheepNum && (a = Number(n.sheepNum)), a = a < 0 ? 0 : a, this.zIndexList = [29, 28, 27, 26, 28, 28, 30, 29, 28, 27, 26, 25, 18, 25, 24, 25, 26, 27, 40, 39, 38, 37, 36, 35, 34, 33, 22, 17, 16, 15, 22, 23, 24, 25, 26, 27], this.sheepNode || (this.sheepNode = this.sheepSp), this.sheepCardNode || (this.sheepCardNode = this.sheepCard), this.sheepIconNode || (this.sheepIconNode = this.sheepIcon), this.manSheepHeader || (this.manSheepHeaderNode = this.manSheepHeader), this.womanSheepheader || (this.womanSheepheaderNode = this.womanSheepheader), this.node.removeAllChildren(), this.iconNode = new cc.Node, this.iconNode.width = this.node.width, this.iconNode.height = this.node.height, this.iconNode.name = "iconNode", this.iconNode.zIndex = 100, this.node.addChild(this.iconNode); + var i = cc.instantiate(this.sheepCardNode); + this.node.addChild(i), i.zIndex = 49, i.y += 70, i.getComponent(f.default).setupData(t); + var r = []; + if (t.item && t.item.result && t.item.result.length > 0 && "null" != t.item.result) { + this.node.addChild(this.sheepIconNode), this.sheepIconNode.zIndex = 200, this.sheepIconNode.active = !1; + var c = JSON.parse(t.item.result); + r = this.bubbleSort(c); + var u = s.default.getUserData().userID; + for (var d in r) Number(u) == r[d].uid && (this.userRankInfo = r[d]) + } + var h = t.item.all_score; + h > 36 && (h = 36), h <= 0 && (h = 0); + for (var m = 0; m < h; m++) setTimeout(function() {}, 0 * m), this.setSheep(r, m, a) + } + }, e.prototype.bubbleSort = function(t) { + for (var e, o, n = r(t), a = 0, i = n.length; a < i; a++) + for (var c = 0; c < i - 1 - a; c++) n[c].state > n[c + 1].state ? (e = [n[c + 1], n[c]], n[c] = e[0], n[c + 1] = e[1]) : n[c].state == n[c + 1].state && n[c].fail < n[c + 1].fail && (o = [n[c + 1], n[c]], n[c] = o[0], n[c + 1] = o[1]); + return n + }, e.prototype.setSheep = function(t, e) { + if (!(e >= t.length)) { + var o = cc.instantiate(this.sheepNode); + this.node.addChild(o), this.sheepNodeArr.push(o); + var n = 0; + e < 6 ? (n = 6, this.radius = 100) : e < 18 ? (n = 12, this.radius = 200) : (n = 18, this.radius = 300); + var a = this.angle / 180 * Math.PI, + i = this.radius * Math.cos(a), + r = this.radius * Math.sin(a), + l = 0; + e < this.zIndexList.length && (l = this.zIndexList[e]), o.x = i, o.y = r, o.zIndex = l, this.angle += 360 / n; + var u = t[e]; + if (1 == u.state) { + var p = null; + (p = 0 == u.gender ? cc.instantiate(this.manSheepHeader) : cc.instantiate(this.womanSheepheader)).zIndex = l, this.iconNode.addChild(p), p.x = i, p.y = r + 95, e < t.length && c.default.setAvatar(p, t[e].avatar) + } + var h = "sheep/Sheeps", + f = "skin_00"; + if (Number(s.default.getUserData().userID) == u.uid) { + if (this.userPosItem = cc.v2(i, r), this.userRankInfo) { + for (var g = s.default.getSheepClothesData(), y = 0; y < g.length; y++) { + var v = g[y]; + if (v.dressing) { + h = "sheep/" + v.spName, f = v.spSkin; + break + } + } + this.sheepUserNode = o, 1 == d.default.getInstance().game_over && (this.sheepUserNode.opacity = 0) + } + } else if (this.clothesData && u.skin && u.skin > 0) + for (var b in this.clothesData) + if (this.clothesData[b].clothesId == u.skin) { + h = "sheep/" + this.clothesData[b].spName, f = this.clothesData[b].spSkin; + break + } + 1 != u.state && (h = "sheep/Dead1"), this.setUpSheepNode(o, h, u, f); + var _ = o.getChildByName("clickNode"); + _.on(cc.Node.EventType.TOUCH_END, function() { + if (console.log(_.parent.getPosition().x, _.parent.getPosition().y), this.sheepIconNode) { + var o = t[e]; + this.sheepIconNode.x = _.parent.getPosition().x, this.sheepIconNode.y = _.parent.getPosition().y + 20, this.sheepIconNode.getComponent(m.default).showData(o) + } + }, this) + } + }, e.prototype.setUpSheepNode = function(t, e, o, n) { + t.getChildByName("flashSp").opacity = 0, t.getChildByName("sheepSp").getComponent(u.default).loadSpine(e, function() { + var a = "Jump2"; + "sheep/Dead1" == e ? (o.fail || (o.fail = 1), a = "Dead" + h.default.getDeadNum(o.fail), t.getChildByName("sheepSp").getComponent(u.default).play(a, 0)) : (t.getChildByName("sheepSp").getComponent(u.default).setNewSkin(n), t.getChildByName("sheepSp").getComponent(u.default).play(a, 0)) + }) + }, i([v({ + type: cc.Node, + tooltip: "羊" + })], e.prototype, "sheepSp", void 0), i([v({ + type: cc.Node, + tooltip: "名次牌子" + })], e.prototype, "sheepCard", void 0), i([v({ + type: cc.Node, + tooltip: "卡片" + })], e.prototype, "sheepIcon", void 0), i([v({ + type: cc.Node, + tooltip: "男头像" + })], e.prototype, "manSheepHeader", void 0), i([v({ + type: cc.Node, + tooltip: "女头像" + })], e.prototype, "womanSheepheader", void 0), i([y], e) + }(cc.Component); + o.default = b, cc._RF.pop() + }, { + "../../script/common/CcJsFunc": "CcJsFunc", + "../../script/common/dataTs": "dataTs", + "../../script/common/enumConfig": "enumConfig", + "../../script/common/spine": "spine", + "../../script/manager/DateManager": "DateManager", + "../../script/manager/GameManager": "GameManager", + "../../script/manager/data-manager": "data-manager", + "./sheep-card": "sheep-card", + "./sheep-flock-icon": "sheep-flock-icon" + } + ], + "sheep-rank-pop": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "4f1e6q1O4ZIM6jxip+/6cgl", "sheep-rank-pop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../api/api-sheep"), + c = t("../common/CcJsFunc"), + s = t("../manager/GameManager"), + l = t("./popSub/sheepRankItem"), + u = cc._decorator, + p = u.ccclass, + d = u.property, + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.popNode = null, e.sheepRankItem = null, e.rankItem = null, e.contentView = null, e.closeBtn = null, e.bottomNode = null, e + } + return a(e, t), e.prototype.start = function() { + c.default.addbtnTouchStartScale(this.closeBtn), c.default.addbtnTouchEndScale(this.closeBtn, this.closeBtnFunc.bind(this)), c.default.addbtnTouchCancelScale(this.closeBtn) + }, e.prototype.closeBtnFunc = function() { + this.node.active = !1 + }, e.prototype.sheepRankPop = function() { + this.node.active = !0, this.requestData() + }, e.prototype.requestData = function() { + if (cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(), this.rankItem || (this.rankItem = cc.instantiate(this.sheepRankItem)), this.contentView.removeAllChildren(), this.bottomNode.active = !1, s.default.getInstance().rankInfo) this.setSubViews(s.default.getInstance().rankInfo); + else { + var t = this; + r.default.getRankInfoData(function(e) { + t.setSubViews(e.data) + }) + } + }, e.prototype.setSubViews = function(t) { + for (var e = 0; e < t.list.length; e++) { + var o = t.list[e]; + o.index = e; + var n = cc.instantiate(this.rankItem); + this.contentView.addChild(n), n.getComponent(l.default).setupData(o) + } + t.user.index && (this.bottomNode.getComponent(l.default).setBottomData(t.user), this.bottomNode.active = !0) + }, i([d({ + type: cc.Node, + tooltip: "popNode" + })], e.prototype, "popNode", void 0), i([d({ + type: cc.Node, + tooltip: "item 子View" + })], e.prototype, "sheepRankItem", void 0), i([d({ + type: cc.Node, + tooltip: "item 父视图" + })], e.prototype, "contentView", void 0), i([d({ + type: cc.Node, + tooltip: "关闭按钮" + })], e.prototype, "closeBtn", void 0), i([d({ + type: cc.Node, + tooltip: "bottom View" + })], e.prototype, "bottomNode", void 0), i([p], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "../api/api-sheep": "api-sheep", + "../common/CcJsFunc": "CcJsFunc", + "../manager/GameManager": "GameManager", + "./popSub/sheepRankItem": "sheepRankItem" + } + ], + sheepRankItem: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "3fc70swD4FHKLdy7tN3hR6f", "sheepRankItem"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.imgNode = null, e.labelNode = null, e.numNode = null, e.nameNode = null, e.countNode = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.setupData = function(t) { + var e = t.index + 1; + this.numNode.getComponent(cc.Label).string = e + "", this.nameNode.getComponent(cc.Label).string = t.name, this.countNode.getComponent(cc.Label).string = t.win_score + ""; + var o = null, + n = null, + a = null, + i = null, + r = null, + c = null, + s = this.imgNode.children; + for (var l in s) { + var u = s[l]; + "text-black" == u.name || "text-sheep-black" == u.name ? u.active = !0 : u.active = !1, "num-yellow" == u.name ? o = u : "num-sliver" == u.name ? n = u : "num-orange" == u.name ? a = u : "num-blue" == u.name ? i = u : "num-black" == u.name || ("img-yellow" == u.name ? r = u : "img-white" == u.name ? c = u : u.name) + } + c.active = !0, 1 == e ? (o.active = !0, r.active = !0, c.active = !1) : 2 == e ? n.active = !0 : 3 == e ? a.active = !0 : i.active = !0 + }, e.prototype.setBottomData = function(t) { + this.numNode.getComponent(cc.Label).string = t.index + "", this.nameNode.getComponent(cc.Label).string = t.item.name, this.countNode.getComponent(cc.Label).string = t.item.win_score + "" + }, i([s(cc.Node)], e.prototype, "imgNode", void 0), i([s(cc.Node)], e.prototype, "labelNode", void 0), i([s(cc.Node)], e.prototype, "numNode", void 0), i([s(cc.Node)], e.prototype, "nameNode", void 0), i([s(cc.Node)], e.prototype, "countNode", void 0), i([c], e) + }(cc.Component); + o.default = l, cc._RF.pop() + }, {} + ], + "show-daily-pop": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "3a139KaoTJPZKuR6HDW3cfD", "show-daily-pop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../i18n/gd_language"), + c = t("../../i18n/i18n"), + s = t("../../pre/main/rewardPrefab"), + l = t("../../script/common/CcJsFunc"), + u = t("../../script/common/native/audio"), + p = t("../../script/common/spine"), + d = cc._decorator, + h = d.ccclass, + f = d.property, + m = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.maskNode = null, e.titleSpine = null, e.boxSpine = null, e.flashNode = null, e.receiveBtn = null, e.receiveLabel = null, e.rewardPrefab = null, e.popData = null, e.rewardNodeArray = [], e.rewardDataArray = [], e + } + return a(e, t), e.prototype.start = function() { + l.default.addbtnTouchStartScale(this.receiveBtn), l.default.addbtnTouchEndScale(this.receiveBtn, this.receiveBtnFunc.bind(this)), l.default.addbtnTouchCancelScale(this.receiveBtn) + }, e.prototype.receiveBtnFunc = function() { + this.node.active = !1, this.receiveBtn.stopAllActions(); + for (var t = 0; t < this.rewardNodeArray.length; t++) this.rewardNodeArray[t].destroy(); + this.rewardNodeArray = [] + }, e.prototype.showPop = function(t) { + if (this.popData = t, this.node.active = !0, this.titleSpine.active = !1, this.boxSpine.active = !1, this.receiveBtn.active = !1, this.flashNode.active = !1, this.receiveLabel.string = c.default.instance.trans(r.GDLanguage.pop_claim), "daily" == t.popName) { + var e = {}; + 1 == t.popType ? (e.propType = "prop_random", e.num = 3) : 2 == t.popType ? (e.propType = "prop_cancel", e.num = 3) : 3 == t.popType && (e.propType = "prop_remove", e.num = 3), this.rewardDataArray.push(e), this.addRewardNode(), this.playAnimation() + } else this.node.active = !1 + }, e.prototype.playAnimation = function() { + var t = this; + t.boxSpine.active = !0, t.boxSpine.getComponent(p.default).setFrameEventCb("Open1", function() { + console.log("1"), u.default.playAudioMusic("audio/sound/Open1.mp3", !1) + }), t.boxSpine.getComponent(p.default).setFrameEventCb("Eff_Sheen1", function() { + t.titleSpine.active = !0, u.default.playAudioMusic("audio/sound/Words1.mp3", !1), t.titleSpine.getComponent(p.default).play("Award1_Words1", 1), console.log("2"), t.flashNode.active = !0, cc.tween(t.flashNode).by(40, { + angle: 360 + }).repeatForever().start(), t.playRewardNode() + }), t.boxSpine.getComponent(p.default).setFrameEventCb("Treasure1", function() { + t.flashNode.active = !0, cc.tween(t.flashNode).by(40, { + angle: 360 + }).repeatForever().start(), t.playRewardNode(), console.log("3") + }), t.boxSpine.getComponent(p.default).play("4Daily_Open" + this.popData.popType, 1, function() { + console.log("4"), t.receiveBtn.active = !0 + }) + }, e.prototype.addRewardNode = function() { + for (var t = 0; t < this.rewardDataArray.length; t++) { + var e = cc.instantiate(this.rewardPrefab); + e.x = 0, e.y = 0, e.scale = 0, e.getComponent(s.default).setRewardNode(this.rewardDataArray[t]), this.rewardNodeArray.push(e), this.node.addChild(e) + } + }, e.prototype.playRewardNode = function() { + var t = this; + this.rewardNodeArray.length && cc.tween(this.rewardNodeArray[0]).to(.1, { + scale: 1.4, + y: 150 + }).to(.1, { + scale: 1 + }).to(.1, { + scale: 1.2 + }).to(.1, { + scale: 1 + }).call(function() { + t.playAnimationFloat(t.rewardNodeArray[0], 10) + }).start() + }, e.prototype.playAnimationFloat = function(t, e) { + var o = this; + cc.tween(t).by(1, { + y: e + }).call(function() { + o.playAnimationFloat(t, -e) + }).start() + }, i([f(cc.Node)], e.prototype, "maskNode", void 0), i([f(cc.Node)], e.prototype, "titleSpine", void 0), i([f(cc.Node)], e.prototype, "boxSpine", void 0), i([f(cc.Node)], e.prototype, "flashNode", void 0), i([f(cc.Node)], e.prototype, "receiveBtn", void 0), i([f(cc.Label)], e.prototype, "receiveLabel", void 0), i([f(cc.Prefab)], e.prototype, "rewardPrefab", void 0), i([h], e) + }(cc.Component); + o.default = m, cc._RF.pop() + }, { + "../../i18n/gd_language": "gd_language", + "../../i18n/i18n": "i18n", + "../../pre/main/rewardPrefab": "rewardPrefab", + "../../script/common/CcJsFunc": "CcJsFunc", + "../../script/common/native/audio": "audio", + "../../script/common/spine": "spine" + } + ], + "show-reward-pop": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "a28f8l6KdRP1bgidG2CHAQ9", "show-reward-pop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../i18n/gd_language"), + c = t("../../i18n/i18n"), + s = t("../../pre/main/cookieRewardNode"), + l = t("../../script/common/CcJsFunc"), + u = t("../../script/common/enumConfig"), + p = t("../../script/common/native/audio"), + d = t("../../script/common/spine"), + h = cc._decorator, + f = h.ccclass, + m = h.property, + g = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.maskNode = null, e.cookieRewardLayer = null, e.cookieTitleSpine = null, e.cookieRewardNode = null, e.cookieFlashNode = null, e.cookieImageNode = null, e.cookieNumNode = null, e.cookieReceiveBtn = null, e.cookiePropEndNode = null, e.receiveLabel = null, e.popData = null, e + } + return a(e, t), e.prototype.start = function() { + l.default.addbtnTouchStartScale(this.cookieReceiveBtn), l.default.addbtnTouchEndScale(this.cookieReceiveBtn, this.receiveBtnFunc.bind(this)), l.default.addbtnTouchCancelScale(this.cookieReceiveBtn), this.receiveLabel.string = c.default.instance.trans(r.GDLanguage.pop_claim) + }, e.prototype.receiveBtnFunc = function() { + var t = this; + this.maskNode.active = !1, this.cookieTitleSpine.active = !1, this.cookieFlashNode.active = !1, this.cookieReceiveBtn.active = !1; + var e = this.cookiePropEndNode, + o = l.default.getWorldPosition(e), + n = l.default.getNodePosition(this.node, o); + cc.tween(this.cookieRewardNode).to(.1, { + angle: 5 + }).to(.1, { + angle: -5 + }).to(.1, { + angle: 5 + }).to(.1, { + angle: -5 + }).to(.3, { + position: cc.v3(n.x, n.y, 0), + scale: .3 + }).call(function() { + t.node.active = !1, t.popData && t.popData.rewardCallback && t.popData.rewardCallback(), cc.tween(e).to(.2, { + scale: 1.2 + }).to(.2, { + scale: 1 + }).start() + }).start() + }, e.prototype.showPop = function(t) { + this.popData = t, this.cookieRewardLayer.active = !1, 1 == t.popType && (this.node.active = !0, this.maskNode.active = !0, this.cookieRewardLayer.active = !0, this.cookieRewardLayer.position = cc.v3(0, 0, 0), this.cookieRewardNode.scale = 1, this.cookieTitleSpine.active = !0, this.cookieReceiveBtn.active = !0, this.showCookieRewardPopData(t.rewardData, t.startNode, t.endNode)) + }, e.prototype.showCookieRewardPopData = function(t, e, o) { + console.log("领取奖励", JSON.stringify(t)); + var n = this; + n.cookieFlashNode.active = !1, p.default.playAudioMusic("audio/sound/Words1.mp3", !1), n.cookieTitleSpine.getComponent(d.default).play("Award1_Words1", 1); + var a = l.default.getWorldPosition(e), + i = l.default.getNodePosition(this.node, a), + r = l.default.getWorldPosition(o), + c = l.default.getNodePosition(this.node, r); + this.cookieRewardNode.getComponent(s.default).showData(t), this.cookieRewardNode.position = cc.v3(i), this.cookieReceiveBtn.scale = 0, this.cookieRewardNode.scale = .5, cc.tween(this.cookieRewardNode).to(.3, { + position: cc.v3(i.x + 10, i.y - 400), + scale: .7 + }).to(.3, { + position: cc.v3(i.x - 100, i.y - 500) + }).to(.2, { + position: cc.v3(c), + scale: 1 + }).call(function() { + n.cookieFlashNode.active = !0, cc.tween(n.cookieFlashNode).by(5, { + angle: 360 + }).repeatForever().start(), cc.tween(n.cookieReceiveBtn).to(.3, { + scale: 1 + }).start(), n.popData && n.popData.callback ? n.popData.callback() : cc.game.emit(u.EMITKEY.HIDEMASKLAYER) + }).start() + }, i([m(cc.Node)], e.prototype, "maskNode", void 0), i([m(cc.Node)], e.prototype, "cookieRewardLayer", void 0), i([m(cc.Node)], e.prototype, "cookieTitleSpine", void 0), i([m(cc.Node)], e.prototype, "cookieRewardNode", void 0), i([m(cc.Node)], e.prototype, "cookieFlashNode", void 0), i([m(cc.Node)], e.prototype, "cookieImageNode", void 0), i([m(cc.Node)], e.prototype, "cookieNumNode", void 0), i([m(cc.Node)], e.prototype, "cookieReceiveBtn", void 0), i([m(cc.Node)], e.prototype, "cookiePropEndNode", void 0), i([m(cc.Label)], e.prototype, "receiveLabel", void 0), i([f], e) + }(cc.Component); + o.default = g, cc._RF.pop() + }, { + "../../i18n/gd_language": "gd_language", + "../../i18n/i18n": "i18n", + "../../pre/main/cookieRewardNode": "cookieRewardNode", + "../../script/common/CcJsFunc": "CcJsFunc", + "../../script/common/enumConfig": "enumConfig", + "../../script/common/native/audio": "audio", + "../../script/common/spine": "spine" + } + ], + "snake-ctrl-point": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "97d1cS+taxBnYxM87Oc/vw1", "snake-ctrl-point"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator.ccclass, + c = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.size = 20, e.isDragging = !1, e.sprite = null, e.onEditStart = null, e.onEditEnd = null, e + } + return a(e, t), e.prototype.onLoad = function() { + this.node.on(cc.Node.EventType.TOUCH_START, this.onTouchStart, this), this.node.on(cc.Node.EventType.TOUCH_MOVE, this.onTouchMove, this), this.node.on(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this), this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.onTouchEnd, this), this.node.addComponent(cc.BlockInputEvents) + }, e.prototype.start = function() { + this.idle() + }, e.prototype.setEditCallback = function(t, e) { + this.onEditStart = t, this.onEditEnd = e + }, e.prototype.onTouchStart = function() { + this.selected(), this.isDragging = !0, this.onEditStart && this.onEditStart() + }, e.prototype.onTouchMove = function(t) { + if (0 != this.isDragging) { + var e = t.getDelta(), + o = e.x, + n = e.y; + this.node.setPosition(this.node.position.x + o, this.node.position.y + n) + } + }, e.prototype.onTouchEnd = function() { + this.idle(), this.isDragging = !1, this.onEditEnd && this.onEditEnd() + }, e.prototype.idle = function() { + this.node.stopAllActions(), cc.tween(this.node).to(.1, { + scale: 1, + opacity: 255 + }).to(.5, { + scale: 1.01, + opacity: 200 + }, { + easing: cc.easing.backInOut + }).union().repeatForever().start() + }, e.prototype.selected = function() { + this.node.stopAllActions(), cc.tween(this.node).to(.1, { + scale: 1, + opacity: 255 + }).to(.5, { + scale: 1.4, + opacity: 100 + }, { + easing: cc.easing.backInOut + }).union().repeatForever().start() + }, e.prototype.getSpriteFrameByColor = function(t) { + for (var e = new Uint8Array(16), o = 0; o < 2; o++) + for (var n = 0; n < 2; n++) e[8 * o + 4 * n] = t.r, e[8 * o + 4 * n + 1] = t.g, e[8 * o + 4 * n + 2] = t.b, e[8 * o + 4 * n + 3] = t.a; + var a = new cc.Texture2D; + return a.initWithData(e, cc.Texture2D.PixelFormat.RGBA8888, 2, 2), new cc.SpriteFrame(a) + }, i([r], e) + }(cc.Component); + o.default = c, cc._RF.pop() + }, {} + ], + "snake-sprite-assembler": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "f7fady81S5KDZYrZVIIiQPn", "snake-sprite-assembler"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }); + Object.defineProperty(o, "__esModule", { + value: !0 + }), o.SplineSpriteAssembler = void 0; + for (var i = t("../bezier/curve-sample"), r = cc.Vec3, c = t("../bezier/export-helper"), s = cc.Mat4, l = [], u = 0; u < 4; u++) l.push(new r); + var p = []; + for (u = 0; u < 4; u++) p.push({ + u: 0, + v: 1 + }); + var d = new r, + h = Math.floor(65535 / 4), + f = new Array, + m = new Array, + g = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e._renderData = null, e.verticesCount = 0, e.indicesCount = 0, e + } + return a(e, t), e.prototype.init = function(e) { + t.prototype.init.call(this, e), this._renderData = new cc.RenderData, this._renderData.init(this), this._renderData.createFlexData(0, 4, 6, this.getVfmt()), this._updateIndices() + }, e.prototype._updateIndices = function() { + for (var t = this._renderData.iDatas[0], e = 0, o = 0, n = t.length; e < n; e += 6, o += 4) t[e] = o, t[e + 1] = o + 1, t[e + 2] = o + 2, t[e + 3] = o + 1, t[e + 4] = o + 3, t[e + 5] = o + 2 + }, e.prototype.updateRenderData = function(t) { + this.packToDynamicAtlas(t, t.spriteFrame), t._vertsDirty && (this.updateVertAndUV(t), t._vertsDirty = !1) + }, e.prototype.updateVertAndUV = function(t) { + var e, o = t.spriteFrame; + if (o) { + var n = o._rect, + a = o.insetTop, + u = o.insetBottom, + g = n.height - a - u; + f.length = 0, m.length = 0; + for (var y = t.mSpline.GetCurves(), v = a, b = 0, _ = 0; _ < y.length; ++_) { + for (var N = y[_].samples, C = 0 == _ ? 0 : 1; C < N.length; C++) { + var w = N[C]; + if (c.math.approx(v, w.distanceInCurve, .01)) v += g; + else if (v < w.distanceInCurve) + do { + var P = N[C - 1].distanceInCurve, + k = (v - P) / (w.distanceInCurve - P), + S = i.CurveSample.Lerp(N[C - 1], w, k); + f.push(S), m.push(b + S.distanceInCurve), v += g + } while (v < w.distanceInCurve); + f.push(w), m.push(b + w.distanceInCurve) + } + v -= y[_].Length, b += y[_].Length + } + var D = f.length - 1; + D > h && (console.warn("Spline(" + t.name + ")的四边形数量(" + D + ")超过了允许的最大值(" + h + "), 自动截断, Spline 曲线会显示不完整"), f.length = h), this.verticesCount = 4 * D, this.indicesCount = 6 * D; + var A = t.node.width, + T = t.node.getWorldMatrix(new s), + O = .5 * A, + I = this._renderData._flexBuffer; + I.reserve(this.verticesCount, this.indicesCount) && this._updateIndices(), I.used(this.verticesCount, this.indicesCount); + var E = this._renderData.vDatas[0], + L = this._renderData.uintVDatas[0], + M = 0, + B = null === (e = t.spriteFrame) || void 0 === e ? void 0 : e.uvSliced, + R = m[m.length - 1], + F = R > n.height ? 1 : n.height / R, + j = R * F, + x = j - u; + x < a && (x = a); + for (var U = 0, G = 256 * t.node.color.toRGBValue() + t.node.color.getA(), H = function(t, e) { + var o = m[t]; + if (o <= a + 1e-4) return a > 0 ? c.math.lerp(B[12].v, B[8].v, o / a) : B[8].v; + if (R < n.height) return c.math.lerp(B[8].v, B[0].v, (o - a) / (R - a)); + if (o >= x) return 0 == U && (U = Math.floor((x - a) / g) * g + a), c.math.lerp(B[8].v, B[0].v, (o - U) / (j - U)); + var i = (o - a) / g % 1; + return i = e(i), c.math.lerp(B[8].v, B[4].v, i) + }, Y = function(t) { + return t < .001 ? 1 : t + }, J = function(t) { + return t > .9999 ? 0 : t + }, W = 0, V = f.length - 1; W < V; W++) { + w = f[W + 1], r.cross(d, cc.v3(0, 0, 1), w.tangent); + var K = O * w.scale.x; + for (r.multiplyScalar(d, d, K), r.subtract(l[0], w.location, d), r.add(l[1], w.location, d), w = f[W], r.cross(d, cc.v3(0, 0, 1), w.tangent), K = O * w.scale.x, r.multiplyScalar(d, d, K), r.subtract(l[2], w.location, d), r.add(l[3], w.location, d), p[0].v = H(W + 1, Y), p[0].u = B[1].u, p[1].v = p[0].v, p[1].u = B[2].u, p[2].v = H(W, J), p[2].u = B[13].u, p[3].v = p[2].v, p[3].u = B[14].u, _ = 0; _ < 4; _++) { + var q = l[_]; + r.transformMat4(q, q, T); + var z = 5 * _; + E[M + z] = q.x, E[M + z + 1] = q.y, E[M + z + 2] = p[_].u, E[M + z + 3] = p[_].v, L[M + z + 4] = G + } + M += 20 + } + t.splineVerticesCache = E, f.length = 0, m.length = 0 + } + }, e.prototype.fillBuffers = function(t, e) { + e.worldMatDirty && this.updateVertAndUV(t); + var o = this._renderData, + n = o.vDatas[0], + a = o.iDatas[0], + i = this.getBuffer(e), + r = i.request(this.verticesCount, this.indicesCount), + c = r.byteOffset >> 2, + s = i._vData; + n.length + c > s.length ? s.set(n.subarray(0, s.length - c), c) : s.set(n, c); + for (var l = i._iData, u = r.vertexOffset, p = r.indiceOffset, d = 0, h = a.length; d < h; d++) l[p++] = u + a[d] + }, e.prototype.getBuffer = function() { + return cc.renderer._handle._meshBuffer + }, e.prototype.packToDynamicAtlas = function(t, e) { + if (!e._original && cc.dynamicAtlasManager && e._texture.packable) { + var o = cc.dynamicAtlasManager.insertSpriteFrame(e); + o && e._setDynamicAtlasFrame(o) + } + var n = t._materials[0]; + n && n.getProperty("texture") !== e._texture && (t._vertsDirty = !0, t._updateMaterial()) + }, e + }(cc.Assembler); + o.SplineSpriteAssembler = g, cc._RF.pop() + }, { + "../bezier/curve-sample": "curve-sample", + "../bezier/export-helper": "export-helper" + } + ], + spine: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "f215cEjIoBLcpliwC5ZCFQh", "spine"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.spine = null, e._frameEventMap = {}, e._loop = !1, e._times = 1, e._playingName = "", e._playingNameQueue = [], e + } + return a(e, t), e.prototype.onLoad = function() { + this.init() + }, e.prototype.init = function() { + this.spine && (this.spine.setCompleteListener(this.completeFunc.bind(this)), this.spine.setStartListener(this.startFunc.bind(this)), this.spine.setEventListener(this.frameEventFunc.bind(this))) + }, e.prototype.completeFunc = function(t) { + if (!this._loop) + if (this._playingNameQueue.length > 0) { + if (t.animation.name == this._playingNameQueue[this._playingNameQueue.length - 1]) { + if (this._times--, 0 == this._times) return void(this._completeCb && this._completeCb(t.animation.name)); + this.playQueue(this._playingNameQueue, this._times, this._completeCb) + } + } else { + if (this._times--, 0 == this._times) return void(this._completeCb && this._completeCb(t.animation.name)); + this.play(this._playingName, this._times, this._completeCb) + } + }, e.prototype.startFunc = function(t) { + this._startCb && this._startCb(t.animation.name) + }, e.prototype.frameEventFunc = function(t, e) { + this._frameEventMap[e.data.name] && this._frameEventMap[e.data.name](e.data.name) + }, e.prototype.setCompleteCb = function(t) { + this._completeCb = t + }, e.prototype.setStartCb = function(t) { + this._startCb = t + }, e.prototype.setFrameEventCb = function(t, e) { + t ? e ? this._frameEventMap[t] = e : delete this._frameEventMap[t] : this._frameEventMap = {} + }, e.prototype.setNewSkin = function(t) { + this.spine.setSkin(t) + }, e.prototype.play = function(t, e, o) { + void 0 === e && (e = 1), cc.isValid(this) && cc.isValid(this.node) && (this.spine.clearTracks(), this.spine.setToSetupPose(), this._playingName = t, this._loop = 0 == e, this._times = e, this._completeCb = o, this._playingNameQueue.length = 0, this.spine.setAnimation(0, this._playingName, this._loop)) + }, e.prototype.playQueue = function(t, e, o) { + if (void 0 === e && (e = 1), cc.isValid(this) && cc.isValid(this.node) && 0 != t.length) + if (this._completeCb = o, this.spine.clearTracks(), this.spine.setToSetupPose(), 1 == t.length) this.play(t[0], e); + else { + this._loop = 0 == e, this._times = e, this._playingNameQueue = t.concat(), this.spine.setAnimation(0, t[0], !1); + for (var n = 1; n < t.length; n++) this.spine.addAnimation(0, t[n], !1) + } + }, e.prototype.loadNewSpine = function(t, e) { + var o = this; + cc.resources.load("catModel/" + t, sp.SkeletonData, function(t, n) { + o.spine.skeletonData = n, e() + }) + }, e.prototype.loadSpine = function(t, e) { + var o = this; + cc.resources.load(t, sp.SkeletonData, function(t, n) { + o.spine.skeletonData = n, e() + }) + }, e.prototype.clear = function() { + this._loop = !1, this._times = 0, this._playingName = "", this._playingNameQueue.length = 0, this.setCompleteCb(), this.setFrameEventCb(), this.spine.clearTracks() + }, e.prototype.onDestroy = function() { + this.clear() + }, i([s({ + type: sp.Skeleton, + tooltip: "spine动画节点" + })], e.prototype, "spine", void 0), i([c], e) + }(cc.Component); + o.default = l, cc._RF.pop() + }, {} + ], + "spline-node": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "54695rURQFKQ4TOtSSPaoKl", "spline-node"), Object.defineProperty(o, "__esModule", { + value: !0 + }), o.SplineNode = void 0; + var n = t("./typed-event"), + a = cc.Vec2, + i = cc.Vec3, + r = function() { + function t(t, e, o) { + this.position = i.ZERO.clone(), this.direction = new i(0, 1, 0), this.up = new i(0, 0, 1), this.scale = a.ONE.clone(), this.changed = new n.TypedEvent, this.position.set(t), this.direction.set(e), o && (this.scale.x = o.x, this.scale.y = o.y) + } + return Object.defineProperty(t.prototype, "Position", { + get: function() { + return this.position + }, + set: function(t) { + this.position.equals(t) || (this.position.set(t), this.changed.emit(this)) + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(t.prototype, "Direction", { + get: function() { + return this.direction + }, + set: function(t) { + this.direction.equals(t) || (this.direction.set(t), this.changed.emit(this)) + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(t.prototype, "Up", { + get: function() { + return this.up + }, + set: function(t) { + this.up.equals(t) || (this.up.set(t), this.changed.emit(this)) + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(t.prototype, "Scale", { + get: function() { + return this.scale + }, + set: function(t) { + this.scale.equals(t) || (this.scale.set(t), this.changed.emit(this)) + }, + enumerable: !1, + configurable: !0 + }), t + }(); + o.SplineNode = r, cc._RF.pop() + }, { + "./typed-event": "typed-event" + } + ], + "spline-sprite": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "7cb294g2cpBkqh5EBwwas6q", "spline-sprite"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }), o.SplineSprite = o.SplineSpriteVert = void 0; + var r = t("../bezier/spline"), + c = t("../bezier/spline-node"), + s = t("../snake-ctrl-point"), + l = t("./snake-sprite-assembler"), + u = (cc.Sprite, cc.Node), + p = (cc.Node.EventType, cc.assetManager), + d = (cc.Color, cc._decorator), + h = d.ccclass, + f = d.property, + m = d.menu; + o.SplineSpriteVert = function(t) { + this.vertices = t + }; + var g = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.showDebugInfo = !1, e.editMode = !1, e.mCtrlNodeRoot = null, e.mSplineDirty = !0, e.lockHeadAndTail = !0, e.mSpline = new r.Spline, e.curveSampleList = new Array, e.splineVerticesCache = null, e + } + return a(e, t), Object.defineProperty(e.prototype, "ShowDebugInfo", { + get: function() { + return this.showDebugInfo + }, + enumerable: !1, + configurable: !0 + }), e.prototype.setSplineDirty = function() { + this.mSplineDirty = !0 + }, e.prototype.onLoad = function() { + var e; + null === (e = t.prototype.onLoad) || void 0 === e || e.call(this), this.initRootCtrlNode(), this.setSplineDirty(), this.mCtrlNodeRoot.active = !1 + }, e.prototype.start = function() { + var e; + null === (e = t.prototype.start) || void 0 === e || e.call(this) + }, e.prototype.onEnable = function() { + t.prototype.onEnable.call(this) + }, e.prototype.setCtrlPosList = function(t) { + if (this.spriteFrame) { + try { + this.mCtrlNodeRoot && this.mCtrlNodeRoot.isValid && (this.mCtrlNodeRoot.removeAllChildren(), this.mSpline.RemoveAllNode()) + } catch (i) { + cc.warn("setCtrlPosList err", i) + } + try { + for (var e = 0; e < t.length; e++) { + var o = t[e], + n = this.addBigCtrlNode(o), + a = 0 == e || e == t.length - 1; + this.updateBigCtrlNode(n, a) + } + } catch (i) { + cc.warn(i) + } + this.updateSpline() + } + }, e.prototype.getCtrlPosList = function() { + var t = []; + if (!this.mCtrlNodeRoot) return t; + for (var e in this.mCtrlNodeRoot.children) { + var o = this.mCtrlNodeRoot.children[e], + n = o.children[0]; + t.push({ + p: { + x: o.position.x, + y: o.position.y + }, + t: { + x: n.position.x, + y: n.position.y + } + }) + } + return t + }, e.prototype.getHeadDirection = function() { + if (this.mCtrlNodeRoot && this.mCtrlNodeRoot.children.length > 0) { + var t = this.mCtrlNodeRoot.children[0].children[0]; + return cc.v2(t.position.normalize()) + } + return cc.v2() + }, e.prototype.lockHeadAndTailCtrlNode = function(t) { + this.lockHeadAndTail = t + }, e.prototype.setEditMode = function(t) { + if (this.editMode = t, this.mCtrlNodeRoot.active = t, t) + for (var e = this.mCtrlNodeRoot.children.length, o = 0; o < e; o++) { + var n = this.mCtrlNodeRoot.children[o], + a = this.lockHeadAndTail && (0 == o || o == e - 1); + this.updateBigCtrlNode(n, a) + } + this.setVertsDirty() + }, e.prototype.getCurvePoints = function() { + return this.mSpline.GetCurves(), [] + }, e.prototype.updateCtrlNodeData = function(t, e) { + if (this.mCtrlNodeRoot) { + if (!(this.mCtrlNodeRoot.children.length <= t)) { + var o = this.mCtrlNodeRoot.children[t]; + if (o) { + o.setPosition(e.p); + var n = o.children[0]; + n && n.setPosition(e.t) + } + } + } else cc.warn("根控制节点还没有创建完成") + }, e.prototype.updateBigCtrlNode = function(t, e) { + if (void 0 === e && (e = !1), t) { + 0 == e && this.setNodeCtrl(t); + var o = t.children[0]; + o || (o = this.addTangentNode(t, cc.v2(0, 100))), this.setNodeCtrl(o) + } + }, e.prototype._resetAssembler = function() { + this.setVertsDirty(), this._assembler = new l.SplineSpriteAssembler, this._assembler.init(this) + }, e.prototype.calcDirection = function(t) { + if (t.children.length <= 0) return cc.v3(10, -10, 0); + var e = t.position, + o = t.children[0].position; + return cc.Vec3.add(cc.v3(), e, o) + }, e.prototype.updateSpline = function() { + try { + var t = this.mCtrlNodeRoot.children; + if (!t || 0 == t.length) return; + if (t.length < 2) return; + if (this.mSpline.reset(), t.length > 0) + for (var e = 0; e < t.length; e++) this.mSpline.AddNode(this.newCtrlByNode(t[e])); + this.setVertsDirty() + } catch (o) { + cc.log("update spline err:", o) + } + }, e.prototype.newCtrlByNode = function(t) { + return new c.SplineNode(t.position, this.calcDirection(t), cc.v2(t.scale, t.scale)) + }, e.prototype.addBigCtrlNode = function(t) { + var e = this.addCtrlNode(t.p); + return this.addTangentNode(e, t.t), e + }, e.prototype.addCtrlNode = function(t, e) { + void 0 === e && (e = !0); + var o = new u("__ctrl-node__"); + return o.setParent(this.mCtrlNodeRoot), o.setPosition(t), e && this.addCtrlHandleImg(o, 20), o + }, e.prototype.addTangentNode = function(t, e) { + var o = t.getChildByName("__tangent-node__"); + return o || (o = new u("__tangent-node__")).setParent(t), o.setPosition(e), this.addCtrlHandleImg(o, 12, cc.Color.RED), o + }, e.prototype.initRootCtrlNode = function() { + this.mCtrlNodeRoot || (this.mCtrlNodeRoot = this.node.getChildByName("__ctrl-nodes-root__"), this.mCtrlNodeRoot || (this.mCtrlNodeRoot = new u("__ctrl-nodes-root__"), this.mCtrlNodeRoot.parent = this.node, this.mCtrlNodeRoot.setPosition(0, 0))); + var t = this.mCtrlNodeRoot.children.length; + if (t < 2) + for (var e = 2 - t, o = 0; o < e; o++) this.addCtrlNode(cc.v2(0, -100 * o)) + }, e.prototype.addCtrlHandleImg = function(t, e, o) { + void 0 === e && (e = 10), void 0 === o && (o = cc.Color.WHITE); + var n = t.addComponent(cc.Sprite); + p.loadAny({ + uuid: "e7aba14b-f956-4480-b254-8d57832e273f" + }, function(t, a) { + n.spriteFrame = a, n.node && n.node.isValid && (n.node.color = o, n.node.setContentSize(e, e)) + }), t.setContentSize(e, e) + }, e.prototype.setNodeCtrl = function(t) { + if (t) { + var e = t.getComponent(s.default); + e ? this.setVertsDirty() : e = t.addComponent(s.default) + } + }, e.prototype.ensureControlChildNode = function() {}, i([f({ + editorOnly: !0, + tooltip: "是否显示调试信息, 只在编辑器中有效" + })], e.prototype, "showDebugInfo", void 0), i([f({ + tooltip: "是否为编辑模式" + })], e.prototype, "editMode", void 0), i([h(), m("2D/SnakeSprite")], e) + }(cc.Sprite); + o.SplineSprite = g, cc._RF.pop() + }, { + "../bezier/spline": "spline", + "../bezier/spline-node": "spline-node", + "../snake-ctrl-point": "snake-ctrl-point", + "./snake-sprite-assembler": "snake-sprite-assembler" + } + ], + spline: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "100b90Z0nZEjY59xqkwsOb4", "spline"), Object.defineProperty(o, "__esModule", { + value: !0 + }), o.Spline = o.ListChangeType = void 0; + var n, a = t("./cubic-bezier-curve"), + i = t("./typed-event"), + r = cc.Vec3; + (function(t) { + t[t.clear = 0] = "clear" + })(n = o.ListChangeType || (o.ListChangeType = {})); + var c = function(t, e) { + this.newItems = t, this.insertIndex = e + }, + s = function(t, e) { + this.removedItems = t, this.removeIndex = e + }, + l = function(t) { + this.newItems = t + }, + u = function() { + function t() { + var t = this; + this.nodes = [], this.curves = [], this._length = 0, this.isLoop = !1, this.NodeListChanged = new i.TypedEvent, this.CurveChanged = new i.TypedEvent, this.UpdateAfterCurveChanged = function() { + t._length = 0; + for (var e = 0, o = t.curves; e < o.length; e++) { + var n = o[e]; + t._length += n.Length + } + t.CurveChanged.emit(t) + }, this.start = null, this.end = null, this.StartNodeChanged = function() { + var e = t.end, + o = t.start; + e.changed.off(t.EndNodeChanged), e.Position = o.Position, e.Direction = o.Direction, e.Scale = o.Scale, e.Up = o.Up, e.changed.on(t.EndNodeChanged) + }, this.EndNodeChanged = function() { + var e = t.start, + o = t.end; + e.changed.off(t.StartNodeChanged), e.Position = o.Position, e.Direction = o.Direction, e.Scale = o.Scale, e.Up = o.Up, e.changed.on(t.StartNodeChanged) + } + } + return t.prototype.GetCurves = function() { + return this.curves + }, Object.defineProperty(t.prototype, "Length", { + get: function() { + return this._length + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(t.prototype, "IsLoop", { + get: function() { + return this.isLoop + }, + enumerable: !1, + configurable: !0 + }), t.prototype.reset = function() { + this.nodes.length = 0, this.curves.length = 0, this.RaiseNodeListChanged(n.clear), this.UpdateAfterCurveChanged() + }, t.prototype.RaiseNodeListChanged = function(t) { + this.NodeListChanged.emit(t) + }, t.prototype.GetSample = function(t) { + var e = this.GetNodeIndexForTime(t); + return this.curves[e].GetSample(t - e) + }, t.prototype.getAllCurveSampleCount = function() { + for (var t = 0, e = 0, o = this.curves; e < o.length; e++) t += o[e].samples.length; + return t + }, t.prototype.foreachSamples = function(t) { + for (var e = 0, o = 0, n = this.curves; o < n.length; o++) { + for (var a = n[o], i = e; i < a.samples.length; ++i) t(a.samples[i]); + e = 1 + } + }, t.prototype.GetCurve = function(t) { + return this.curves[this.GetNodeIndexForTime(t)] + }, t.prototype.GetNodeIndexForTime = function(t) { + if (t < 0 || t > 1) throw new Error("Time must be between 0 and 1. Given time was " + t); + return Math.floor(t * (this.curves.length - 1)) + }, t.prototype.RefreshCurves = function() { + this.curves.length = 0; + for (var t = 0; t < this.nodes.length - 1; ++t) { + var e = this.nodes[t], + o = this.nodes[t + 1], + i = new a.CubicBezierCurve(e, o); + i.Changed.on(this.UpdateAfterCurveChanged), this.curves.push(i) + } + this.RaiseNodeListChanged(n.clear), this.UpdateAfterCurveChanged() + }, t.prototype.GetSampleAtDistance = function(t) { + if (t < 0 || t > this.Length) throw new Error("Distance must be between 0 and spline length (" + this._length + "). Given distance was " + t); + for (var e = 0, o = this.curves; e < o.length; e++) { + var n = o[e], + a = n.Length; + if (t > a && t < a + 1e-4 && (t = a), !(t > a)) return n.GetSampleAtDistance(t); + t -= a + } + throw new Error("Something went wrong with GetSampleAtDistance.") + }, t.prototype.AddNode = function(t) { + if (this.nodes.push(t), 1 !== this.nodes.length) { + var e = this.nodes[this.nodes.length - 2], + o = new a.CubicBezierCurve(e, t); + o.Changed.on(this.UpdateAfterCurveChanged), this.curves.push(o) + } + this.RaiseNodeListChanged(new l(new Array(t))), this.UpdateAfterCurveChanged(), this.updateLoopBinding() + }, t.prototype.InsertNode = function(t, e) { + if (0 === t) throw new Error("Can't insert a node at index 0."); + var o = this.nodes[t]; + this.nodes.splice(t, 0, e), this.curves[t - 1].ConnectEnd(e); + var n = new a.CubicBezierCurve(e, o); + n.Changed.on(this.UpdateAfterCurveChanged), this.curves.splice(t, 0, n), this.RaiseNodeListChanged(new c([e], t)), this.UpdateAfterCurveChanged(), this.updateLoopBinding() + }, t.prototype.RemoveAllNode = function() { + for (var t = 0; t < this.nodes.length; t++) { + if (t < 2) return; + var e = this.nodes[t]; + this.RemoveNode(e) + } + }, t.prototype.RemoveNode = function(t) { + var e = this.nodes, + o = e.indexOf(t); + if (e.length <= 2) throw new Error("Can't remove the node because a spline needs at least 2 nodes."); + var n = this.curves; + if (0 !== o && o !== e.length - 1) { + var a = e[o + 1]; + n[o - 1].ConnectEnd(a) + } + e.splice(o, 1); + var i = o === e.length - 1 ? o - 1 : o; + n[i].Changed.off(this.UpdateAfterCurveChanged), n.splice(i, 1), this.RaiseNodeListChanged(new s([t], o)), this.UpdateAfterCurveChanged(), this.updateLoopBinding() + }, t.prototype.updateLoopBinding = function() { + null !== this.start && this.start.changed.off(this.StartNodeChanged), null !== this.end && this.end.changed.off(this.EndNodeChanged), this.isLoop ? (this.start = this.nodes[0], this.end = this.nodes[this.nodes.length - 1], this.start.changed.on(this.StartNodeChanged), this.end.changed.on(this.EndNodeChanged), this.StartNodeChanged()) : (this.start = null, this.end = null) + }, t.prototype.GetProjectionSample = function(t) { + for (var e = null, o = 34028235e31, n = 0, a = this.curves; n < a.length; n++) { + var i = a[n], + c = i.GetProjectionSample(t); + if (i !== this.curves[0]) { + var s = r.squaredDistance(null == c ? void 0 : c.location, t); + s < o && (o = s, e = c) + } else e = c, o = r.squaredDistance(null == c ? void 0 : c.location, t) + } + return e + }, t + }(); + o.Spline = u, cc._RF.pop() + }, { + "./cubic-bezier-curve": "cubic-bezier-curve", + "./typed-event": "typed-event" + } + ], + sprintRewardBar: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "b08b76DWJJK55Of1nkBDZNg", "sprintRewardBar"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../../i18n/gd_language"), + c = t("../../../i18n/i18n"), + s = t("../../common/CcJsFunc"), + l = t("../../common/dataTs"), + u = t("../../common/native/audio"), + p = t("../../common/spine"), + d = t("../../manager/GameManager"), + h = cc._decorator, + f = h.ccclass, + m = h.property, + g = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.maskNode = null, e.spineBox = null, e.bgCoin = null, e.bgCoinLabel = null, e.bgProp = null, e.bgPropLabel = null, e.reveiceBtn = null, e.reveiceBtnLabel = null, e.spineProgress = null, e.particleNode = null, e.labelNode = null, e.lastLabel = null, e.callback = null, e + } + return a(e, t), e.prototype.start = function() { + s.default.addbtnTouchStartScale(this.reveiceBtn), s.default.addbtnTouchEndScale(this.reveiceBtn, this.reveiceBtnFunc.bind(this)), s.default.addbtnTouchCancelScale(this.reveiceBtn), this.reveiceBtnLabel.string = c.default.instance.trans(r.GDLanguage.pop_claim) + }, e.prototype.reveiceBtnFunc = function() { + this.node.active = !1, l.default.getSprintRewardData().rewardProgress >= 3 && this.callback && this.callback() + }, e.prototype.showProgress = function(t) { + var e = this; + this.spineBox.active = !1, this.bgCoin.active = !1, this.bgProp.active = !1, this.reveiceBtn.active = !1, this.node.active = !0, this.maskNode.opacity = 0, this.maskNode.active = !0, this.callback = t, e.spineProgress.active = !1, e.particleNode.active = !1, console.log("冲刺奖励 = " + JSON.stringify(l.default.getSprintRewardData())); + var o = l.default.getSprintRewardData(), + n = o.rewardProgress, + a = o.winBox, + i = o.winNum; + if (n <= 0 && (n = 1), l.default.getSprintRewardData().rewardProgress >= 3) { + var r = l.default.getUserData(), + c = a > 5 ? 5 : a, + u = 12; + c > 1 && (u += 11 * (c - 1)), r.coin += u; + var p = l.default.gameConfigData.baseConfigData.rewardBox[Math.floor(3 * Math.random())]; + if (p && p.length >= 2) { + console.log(JSON.stringify(p)); + var d = "rewardIcon/" + p[1].propType + ".png"; + s.default.changeSpriteFrame(this.bgProp, d), "prop_remove" == p[1].propType ? (r.prop_remove++, r.prop_remove) : "prop_cancel" == p[1].propType ? (r.prop_cancel++, r.prop_cancel) : "prop_random" == p[1].propType && (r.prop_random++, r.prop_random) + } + l.default.saveUserData(r), this.bgCoinLabel.string = "x" + u + } + var h = a; + i <= 3 && (h = 0); + var f = 3 * h; + n >= 3 && a > 0 && (f = 3 * (a - 1)); + var m = this.labelNode.children; + for (var g in m) f += 1, m[g].getComponent(cc.Label).string = f + "", g < n ? (m[g].active = !1, Number(g) == n - 1 && (m[g].active = !0, e.lastLabel = m[g])) : m[g].active = !0; + cc.tween(this.spineProgress).to(0, { + opacity: 0 + }).call(function() { + e.spineProgress.active = !0, e.playSpineProgress() + }).to(1, { + opacity: 255 + }).call(function() {}).start() + }, e.prototype.playSpineProgress = function() { + console.log("playSpineProgress ###### "); + var t = this, + e = l.default.getSprintRewardData(), + o = (e.winBox, e.rewardProgress), + n = this.getSpineName(); + console.log("spineName = " + n), this.spineProgress.getComponent(p.default).setFrameEventCb("NoShow1", function(e) { + console.log("NoShow1 = " + e), t.lastLabel.active = !1, o < 3 && t.playBoxAnim() + }), this.spineProgress.getComponent(p.default).setFrameEventCb("Open2", function(e) { + console.log("Open2 = " + e), t.particleNode.active = !0, t.particleNode.getComponent(cc.ParticleSystem).resetSystem(), t.particleNode.getChildByName("Star0").getComponent(cc.ParticleSystem).resetSystem(), t.particleNode.getChildByName("Star1").getComponent(cc.ParticleSystem).resetSystem() + }), this.spineProgress.getComponent(p.default).play(n, 1, function() { + n += "_1", console.log("待机 " + n), o >= 3 && t.playBoxAnim(), t.spineProgress.getComponent(p.default).play(n, 0, function() {}) + }) + }, e.prototype.getSpineName = function() { + var t = l.default.getSprintRewardData(), + e = t.winBox, + o = t.rewardProgress, + n = e <= 0 ? 1 : e + 1; + n = n >= 5 ? 5 : n, o >= 3 && n > 1 && n < 5 && (n -= 1); + var a = "3RichRoad" + n + "_" + (o <= 0 ? 1 : o >= 3 ? 3 : o); + return 0 == o && (a = "3RichRoad0_0"), a + }, e.prototype.playBoxAnim = function() { + d.default.getInstance().sprintMark = !0; + var t = this; + if (l.default.getSprintRewardData().rewardProgress < 3) return this.maskNode.active = !1, void(this.callback && this.callback()); + this.maskNode.opacity = 220, t.spineBox.active = !0, this.spineBox.getComponent(p.default).setFrameEventCb("Open1", function() { + u.default.playAudioMusic("audio/sound/Open1.mp3", !1) + }), this.spineBox.getComponent(p.default).setFrameEventCb("Eff_Sheen1", function() { + t.bgCoin.active = !0, t.bgProp.active = !0 + }), this.spineBox.getComponent(p.default).play("Ref1_Open4", 1, function() { + t.reveiceBtn.active = !0, cc.tween(t.reveiceBtn).to(.1, { + scale: 1.3 + }).to(.1, { + scale: 1 + }).start() + }) + }, i([m(cc.Node)], e.prototype, "maskNode", void 0), i([m(cc.Node)], e.prototype, "spineBox", void 0), i([m(cc.Node)], e.prototype, "bgCoin", void 0), i([m(cc.Label)], e.prototype, "bgCoinLabel", void 0), i([m(cc.Node)], e.prototype, "bgProp", void 0), i([m(cc.Label)], e.prototype, "bgPropLabel", void 0), i([m(cc.Node)], e.prototype, "reveiceBtn", void 0), i([m(cc.Label)], e.prototype, "reveiceBtnLabel", void 0), i([m(cc.Node)], e.prototype, "spineProgress", void 0), i([m(cc.Node)], e.prototype, "particleNode", void 0), i([m(cc.Node)], e.prototype, "labelNode", void 0), i([f], e) + }(cc.Component); + o.default = g, cc._RF.pop() + }, { + "../../../i18n/gd_language": "gd_language", + "../../../i18n/i18n": "i18n", + "../../common/CcJsFunc": "CcJsFunc", + "../../common/dataTs": "dataTs", + "../../common/native/audio": "audio", + "../../common/spine": "spine", + "../../manager/GameManager": "GameManager" + } + ], + sprintRewardPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "28f4dgUbolNKYJgMwFcV4Es", "sprintRewardPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../i18n/gd_language"), + c = t("../../i18n/i18n"), + s = t("../common/CcJsFunc"), + l = t("../common/dataTs"), + u = t("../common/enumConfig"), + p = t("../common/spine"), + d = t("../common/util"), + h = t("../manager/GameManager"), + f = cc._decorator, + m = f.ccclass, + g = f.property, + y = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.popNode = null, e.closeBtn = null, e.titleLabel = null, e.spineNode = null, e.timeSpineNode = null, e.descLabel = null, e.playBtn = null, e.timeLabel = null, e.exitBtn = null, e.resetBtn = null, e.mainBtn = null, e.playLabel = null, e.exitLabel = null, e.restartLabel = null, e.mainLabel = null, e.firstLabel = null, e.secondLabel = null, e.threeLabel = null, e.particleNode = null, e.showPopData = null, e.updateTime = 0, e + } + return a(e, t), e.prototype.update = function(t) { + this.updateTime += t, this.updateTime >= 1 && (this.updateTime -= 1, this.updateTimeNum()) + }, e.prototype.updateTimeNum = function() { + var t = l.default.updateSprintRewardTime(); + if (0 == t) console.log("已满"), this.timeLabel.string = "End"; + else { + var e = d.default.formatTime(t); + e[0] > 0 ? this.timeLabel.string = e[0] + "d" + e[1] + "h" : e[1] > 0 ? this.timeLabel.string = e[1] + "h" + e[2] + "m" : e[2] > 0 ? this.timeLabel.string = e[2] + "m" + e[3] + "s" : e[3] > 0 && (this.timeLabel.string = e[2] + "m" + e[3] + "s") + } + }, e.prototype.start = function() { + s.default.addbtnTouchStartScale(this.closeBtn), s.default.addbtnTouchEndScale(this.closeBtn, this.closeBtnFunc.bind(this)), s.default.addbtnTouchCancelScale(this.closeBtn), s.default.addbtnTouchStartScale(this.playBtn), s.default.addbtnTouchEndScale(this.playBtn, this.playBtnFunc.bind(this)), s.default.addbtnTouchCancelScale(this.playBtn), s.default.addbtnTouchStartScale(this.exitBtn), s.default.addbtnTouchEndScale(this.exitBtn, this.exitBtnFunc.bind(this)), s.default.addbtnTouchCancelScale(this.exitBtn), s.default.addbtnTouchStartScale(this.resetBtn), s.default.addbtnTouchEndScale(this.resetBtn, this.resetBtnFunc.bind(this)), s.default.addbtnTouchCancelScale(this.resetBtn), s.default.addbtnTouchStartScale(this.mainBtn), s.default.addbtnTouchEndScale(this.mainBtn, this.mainBtnFunc.bind(this)), s.default.addbtnTouchCancelScale(this.mainBtn), this.updateTimeNum(), this.setupFonts() + }, e.prototype.setupFonts = function() { + this.playLabel.string = c.default.instance.trans(r.GDLanguage.daily_start), this.restartLabel.string = c.default.instance.trans(r.GDLanguage.pop_restart), this.exitLabel.string = c.default.instance.trans(r.GDLanguage.pop_quit), this.mainLabel.string = c.default.instance.trans(r.GDLanguage.main_screen) + }, e.prototype.resetBtnFunc = function() { + this.node.active = !1, this.exitBtnFunc() + }, e.prototype.mainBtnFunc = function() { + this.exitBtnFunc() + }, e.prototype.exitBtnFunc = function() { + this.node.active = !1, cc.game.emit("blowupHeartAnim", 1) + }, e.prototype.closeBtnFunc = function() { + this.node.active = !1, cc.game.emit("blowupHeartAnim", 0) + }, e.prototype.playBtnFunc = function() { + console.log("去玩游戏"), this.node.active = !1 + }, e.prototype.showPop = function(t) { + var e = this; + this.node.active = !0, this.firstLabel.node.scale = 1, this.secondLabel.node.scale = 1, this.showPopData = t, this.playBtn.active = !1, this.mainBtn.active = !1, this.exitBtn.active = !1, this.resetBtn.active = !1; + var o = this.node.getChildByName("mask"); + o.opacity = 0, cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(), this.titleLabel.string = c.default.instance.trans(r.GDLanguage.level_1, l.default.getUserData().playLevelId), this.timeSpineNode.getComponent(p.default).play("5Clock1", 0); + var n = l.default.getSprintRewardData(); + console.log("冲刺奖励 = " + JSON.stringify(n)); + var a = n.winBox, + i = n.rewardProgress, + s = 3 * a; + i >= 3 && a > 0 ? (s = 3 * (a - 1), this.firstLabel.string = s + 2 + "", this.secondLabel.string = s + 3 + "", this.threeLabel.string = s + 4 + "") : (this.firstLabel.string = s + 1 + "", this.secondLabel.string = s + 2 + "", this.threeLabel.string = s + 3 + ""), this.firstLabel.node.active = !0, this.secondLabel.node.active = !0, this.threeLabel.node.active = !0, 1 == i || (2 == i ? e.firstLabel.node.active = !1 : 3 == i && (e.firstLabel.node.active = !1)); + var d = { + spineName: "2RichRoad0_0", + standBy: !0 + }; + d = i <= 0 ? this.getSpineNameWithStaydBy(!0) : this.getSpineNameWithStaydBy(!h.default.getInstance().sprintMark); + var f = c.default.instance.trans(r.GDLanguage.streak_award); + 0 == this.showPopData.popType ? (this.popNode.height = 600, this.playBtn.active = !0, o.opacity = 178) : 1 == this.showPopData.popType ? (this.popNode.height = 600, this.exitBtn.active = !0, d = this.getSpineNameWithStaydBy(!0), f = c.default.instance.trans(r.GDLanguage.streak_lose)) : 2 == this.showPopData.popType && (this.popNode.height = 700, this.resetBtn.active = !0, this.mainBtn.active = !0, d = this.getSpineNameWithStaydBy(!0), f = c.default.instance.trans(r.GDLanguage.streak_lose)), this.descLabel.string = f, this.spineNode.getComponent(p.default).setFrameEventCb("NoShow1", function(t) { + console.log("NoShow1 = " + t), e.updateProgressLabel(i) + }), this.spineNode.getComponent(p.default).setFrameEventCb("Open2", function(t) { + console.log("Open2 = " + t), e.particleNode.getComponent(cc.ParticleSystem).resetSystem(), e.particleNode.getChildByName("Star0").getComponent(cc.ParticleSystem).resetSystem(), e.particleNode.getChildByName("Star1").getComponent(cc.ParticleSystem).resetSystem() + }); + var m = d.spineName, + g = d.standBy; + console.log("spineDict", m, g), g ? (e.updateProgressLabel(i), this.spineNode.getComponent(p.default).play(m, 0, function() {})) : this.spineNode.getComponent(p.default).play(m, 1, function() { + m += "_1", console.log("待机 " + m), e.spineNode.getComponent(p.default).play(m, 0, function() {}) + }), h.default.getInstance().sprintMark = !1, 0 == this.showPopData.popType && cc.game.emit(u.EMITKEY.MAINUPDATEUI) + }, e.prototype.updateProgressLabel = function(t) { + 1 == t ? this.firstLabel.node.active = !1 : 2 == t ? this.secondLabel.node.active = !1 : 3 == t && (this.secondLabel.node.active = !1) + }, e.prototype.getSpineNameWithStaydBy = function(t) { + var e = l.default.getSprintRewardData(), + o = e.winBox, + n = e.rewardProgress, + a = o <= 0 ? 1 : o + 1; + a = a >= 5 ? 5 : a, n >= 3 && a > 1 && a <= 5 && (a -= 1); + var i = n <= 0 ? 1 : n >= 3 ? 3 : n, + r = "2RichRoad" + a + "_" + (t ? i + "_1" : i); + return 0 == n && (r = "2RichRoad0_0"), { + spineName: r, + standBy: t + } + }, i([g(cc.Node)], e.prototype, "popNode", void 0), i([g(cc.Node)], e.prototype, "closeBtn", void 0), i([g(cc.Label)], e.prototype, "titleLabel", void 0), i([g(cc.Node)], e.prototype, "spineNode", void 0), i([g(cc.Node)], e.prototype, "timeSpineNode", void 0), i([g(cc.Label)], e.prototype, "descLabel", void 0), i([g(cc.Node)], e.prototype, "playBtn", void 0), i([g(cc.Label)], e.prototype, "timeLabel", void 0), i([g(cc.Node)], e.prototype, "exitBtn", void 0), i([g(cc.Node)], e.prototype, "resetBtn", void 0), i([g(cc.Node)], e.prototype, "mainBtn", void 0), i([g(cc.Label)], e.prototype, "playLabel", void 0), i([g(cc.Label)], e.prototype, "exitLabel", void 0), i([g(cc.Label)], e.prototype, "restartLabel", void 0), i([g(cc.Label)], e.prototype, "mainLabel", void 0), i([g(cc.Label)], e.prototype, "firstLabel", void 0), i([g(cc.Label)], e.prototype, "secondLabel", void 0), i([g(cc.Label)], e.prototype, "threeLabel", void 0), i([g(cc.Node)], e.prototype, "particleNode", void 0), i([m], e) + }(cc.Component); + o.default = y, cc._RF.pop() + }, { + "../../i18n/gd_language": "gd_language", + "../../i18n/i18n": "i18n", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../common/spine": "spine", + "../common/util": "util", + "../manager/GameManager": "GameManager" + } + ], + stagePop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "7537cBSDCRLP5ZtoGd5R7fy", "stagePop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/CcJsFunc"), + c = t("../common/spine"), + s = t("../common/util"), + l = t("../manager/DateManager"), + u = cc._decorator, + p = u.ccclass, + d = u.property, + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mask = null, e.popNode = null, e.closeBtn = null, e.titleLabel = null, e.spNode = null, e.headerNode = null, e.manNode = null, e.womanNode = null, e.userName = null, e.userAddress = null, e.topTimeLabel = null, e.lTimeLabel = null, e.timeLabel = null, e.rTimeLabel = null, e.noKingNode = null, e.showPopData = null, e + } + return a(e, t), e.prototype.start = function() { + r.default.addbtnTouchEndScale(this.mask, this.closeBtnFunc.bind(this)), r.default.addbtnTouchStartScale(this.closeBtn), r.default.addbtnTouchEndScale(this.closeBtn, this.closeBtnFunc.bind(this)), r.default.addbtnTouchCancelScale(this.closeBtn) + }, e.prototype.closeBtnFunc = function() { + this.node.active = !1 + }, e.prototype.showPop = function(t) { + var e = this; + this.node.active = !0, this.showPopData = t; + var o = t.idx; + cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(); + var n = "", + a = "", + i = "", + r = "", + s = "", + u = "", + p = "default"; + 1 == o ? (n = "全国领头羊", i = "于昨日", r = "首个通关", s = "sheep/Alpaca01", u = "animation") : 2 == o ? (n = "机智牧羊犬", a = "于昨日在不使用道具和复活的情", i = "况下仅用", r = "通关", s = "sheep/DJ1", u = "Jump2", p = "00") : 3 == o && (n = "秋名山羊神", i = "于昨日仅用", r = "通关", s = "sheep/Alpaca02", u = "animation"), this.spNode.getComponent(c.default).loadSpine(s, function() { + e.spNode.getComponent(c.default).setNewSkin(p), e.spNode.getComponent(c.default).play(u, 0) + }), this.titleLabel.string = n, this.topTimeLabel.string = a, this.lTimeLabel.string = i, this.rTimeLabel.string = r; + var d = this.showPopData.stageInfo; + if (1 == o && d.firstWin && d.firstWin.nick_name && d.firstWin.nick_name.length) { + console.log(JSON.stringify(d.firstWin)); + var h = this.getTimeDate(d.firstWin.ts), + f = l.default.getInstance().formatTs(d.firstWin.ts); + this.timeLabel.string = f[3] + ":" + f[4] + ":" + f[5], this.updateInfo(d.firstWin) + } + this.noKingNode.active = !1, 2 == o && d.iqWin && d.iqWin.nick_name && d.iqWin.nick_name.length ? (console.log(JSON.stringify(d.iqWin)), h = this.getTimeDate(d.iqWin.time), this.timeLabel.string = h[1] + "分" + h[2] + "秒", this.updateInfo(d.iqWin)) : 2 == o && (this.noKingNode.active = !0, this.titleLabel.string = "最强王者", console.log("最强王者")), 3 == o && d.timeWin && d.timeWin.nick_name && d.timeWin.nick_name.length && (console.log(JSON.stringify(d.timeWin)), h = this.getTimeDate(d.timeWin.time), this.timeLabel.string = h[1] + "分" + h[2] + "秒", this.updateInfo(d.timeWin)) + }, e.prototype.updateInfo = function(t) { + r.default.setAvatar(this.headerNode, t.avatar), this.userName.getComponent(cc.Label).string = t.nick_name, this.userAddress.getComponent(cc.Label).string = t.city, 0 == t.gender ? this.manNode.active = !0 : this.manNode.active = !1 + }, e.prototype.getTimeDate = function(t) { + var e = s.default.countdownTime(t); + return [e[0] < 10 ? "0" + e[0] : e[0] + "", e[1] < 10 ? "0" + e[1] : e[1] + "", e[2] < 10 ? "0" + e[2] : e[2] + ""] + }, i([d(cc.Node)], e.prototype, "mask", void 0), i([d(cc.Node)], e.prototype, "popNode", void 0), i([d(cc.Node)], e.prototype, "closeBtn", void 0), i([d(cc.Label)], e.prototype, "titleLabel", void 0), i([d(cc.Node)], e.prototype, "spNode", void 0), i([d(cc.Node)], e.prototype, "headerNode", void 0), i([d(cc.Node)], e.prototype, "manNode", void 0), i([d(cc.Node)], e.prototype, "womanNode", void 0), i([d(cc.Label)], e.prototype, "userName", void 0), i([d(cc.Label)], e.prototype, "userAddress", void 0), i([d(cc.Label)], e.prototype, "topTimeLabel", void 0), i([d(cc.Label)], e.prototype, "lTimeLabel", void 0), i([d(cc.Label)], e.prototype, "timeLabel", void 0), i([d(cc.Label)], e.prototype, "rTimeLabel", void 0), i([d({ + type: cc.Node, + tooltip: "最强王者" + })], e.prototype, "noKingNode", void 0), i([p], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "../common/CcJsFunc": "CcJsFunc", + "../common/spine": "spine", + "../common/util": "util", + "../manager/DateManager": "DateManager" + } + ], + "str-utils": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "622d8ysQvVFXaRZmKMfNXEC", "str-utils"), Object.defineProperty(o, "__esModule", { + value: !0 + }); + var n = function() { + function t() {} + return t.formatStr = function(t) { + for (var e = [], o = 1; o < arguments.length; o++) e[o - 1] = arguments[o]; + if (e && e.length > 0) + for (var n = 0; n < e.length; n++) { + var a = new RegExp("\\{" + n + "\\}", "g"); + t = t.replace(a, String(e[n])) + } + return t + }, t.trim = function(t) { + return t && 0 != t.length ? t.replace(/^\s+/, "").replace(/\s+$/, "") : "" + }, t + }(); + o.default = n, cc._RF.pop() + }, {} + ], + "thinkingdata.mg.cocoscreator.min": [ + function(t, e) { + "use strict"; + + function o(t) { + return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) { + return typeof t + } : function(t) { + return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t + })(t) + } + + function n(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") + } + + function a(t, e) { + for (var o = 0; o < e.length; o++) { + var n = e[o]; + n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) + } + } + + function i(t, e, o) { + return e && a(t.prototype, e), o && a(t, o), t + } + cc._RF.push(e, "a0a6ahsQR5GbrwuSTQ1Rjj5", "thinkingdata.mg.cocoscreator.min"); + var r = {}, + c = Array.prototype, + s = Object.prototype, + l = c.slice, + u = s.toString, + p = Object.prototype.hasOwnProperty, + d = c.forEach, + h = Array.isArray, + f = {}; + r.each = function(t, e, o) { + if (null == t) return !1; + if (d && t.forEach === d) t.forEach(e, o); + else if (t.length === +t.length) { + for (var n = 0, a = t.length; n < a; n++) + if (n in t && e.call(o, t[n], n, t) === f) return !1 + } else + for (var i in t) + if (p.call(t, i) && e.call(o, t[i], i, t) === f) return !1 + }, r.extend = function(t) { + return r.each(l.call(arguments, 1), function(e) { + for (var o in e) void 0 !== e[o] && (t[o] = e[o]) + }), t + }, r.extend2Layers = function(t) { + return r.each(l.call(arguments, 1), function(e) { + for (var o in e) void 0 !== e[o] && (r.isObject(e[o]) && r.isObject(t[o]) ? r.extend(t[o], e[o]) : t[o] = e[o]) + }), t + }, r.isArray = h || function(t) { + return "[object Array]" === u.call(t) + }, r.isFunction = function(t) { + try { + return "function" == typeof t + } catch (t) { + return !1 + } + }, r.isPromise = function(t) { + return "[object Promise]" === u.call(t) && null != t + }, r.isObject = function(t) { + return "[object Object]" === u.call(t) && null != t + }, r.isEmptyObject = function(t) { + if (r.isObject(t)) { + for (var e in t) + if (p.call(t, e)) return !1; + return !0 + } + return !1 + }, r.isUndefined = function(t) { + return void 0 === t + }, r.isString = function(t) { + return "[object String]" === u.call(t) + }, r.isDate = function(t) { + return "[object Date]" === u.call(t) + }, r.isBoolean = function(t) { + return "[object Boolean]" === u.call(t) + }, r.isNumber = function(t) { + return "[object Number]" === u.call(t) && /[\d\.]+/.test(String(t)) + }, r.isJSONString = function(t) { + try { + JSON.parse(t) + } catch (t) { + return !1 + } + return !0 + }, r.decodeURIComponent = function(t) { + var e = ""; + try { + e = decodeURIComponent(t) + } catch (o) { + e = t + } + return e + }, r.encodeURIComponent = function(t) { + var e = ""; + try { + e = encodeURIComponent(t) + } catch (o) { + e = t + } + return e + }, r.utf8Encode = function(t) { + for (var e, o = "", n = e = 0, a = (t = (t + "").replace(/\r\n/g, "\n").replace(/\r/g, "\n")).length, i = 0; i < a; i++) { + var r = t.charCodeAt(i), + c = null; + r < 128 ? e++ : c = 127 < r && r < 2048 ? String.fromCharCode(r >> 6 | 192, 63 & r | 128) : String.fromCharCode(r >> 12 | 224, r >> 6 & 63 | 128, 63 & r | 128), null !== c && (n < e && (o += t.substring(n, e)), o += c, n = e = i + 1) + } + return n < e && (o += t.substring(n, t.length)), o + }, r.base64Encode = function(t) { + var e, o, n, a, i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", + c = 0, + s = 0, + l = "", + u = []; + if (!t) return t; + for (t = r.utf8Encode(t); e = (a = t.charCodeAt(c++) << 16 | t.charCodeAt(c++) << 8 | t.charCodeAt(c++)) >> 18 & 63, o = a >> 12 & 63, n = a >> 6 & 63, a &= 63, u[s++] = i.charAt(e) + i.charAt(o) + i.charAt(n) + i.charAt(a), c < t.length;); + switch (l = u.join(""), t.length % 3) { + case 1: + l = l.slice(0, -2) + "=="; + break; + case 2: + l = l.slice(0, -1) + "=" + } + return l + }, r.encodeDates = function(t) { + return r.each(t, function(e, o) { + if (r.isDate(e)) t[o] = r.formatDate(e); + else if (r.isObject(e)) t[o] = r.encodeDates(e); + else if (r.isArray(e)) + for (var n = 0; n < e.length; n++) r.isDate(e[n]) && (t[o][n] = r.formatDate(e[n])) + }), t + }, r.formatDate = function(t) { + function e(t) { + return t < 10 ? "0" + t : t + } + return t.getFullYear() + "-" + e(t.getMonth() + 1) + "-" + e(t.getDate()) + " " + e(t.getHours()) + ":" + e(t.getMinutes()) + ":" + e(t.getSeconds()) + "." + ((o = t.getMilliseconds()) < 100 && 9 < o ? "0" + o : o < 10 ? "00" + o : o); + var o + }, r.searchObjDate = function(t) { + try { + (r.isObject(t) || r.isArray(t)) && r.each(t, function(e, o) { + r.isObject(e) || r.isArray(e) ? r.searchObjDate(t[o]) : r.isDate(e) && (t[o] = r.formatDate(e)) + }) + } catch (e) { + m.warn(e) + } + }, r.UUID = function() { + var t = (new Date).getTime(); + return String(Math.random()).replace(".", "").slice(1, 11) + "-" + t + }, r.UUIDv4 = function() { + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) { + var e = 16 * Math.random() | 0; + return ("x" === t ? e : 3 & e | 8).toString(16) + }) + }, r.setMpPlatform = function(t) { + r.mpPlatform = t + }, r.getMpPlatform = function() { + return r.mpPlatform + }, r.createExtraHeaders = function() { + return { + "TA-Integration-Type": "MG", + "TA-Integration-Version": "2.1.0", + "TA-Integration-Count": "1", + "TA-Integration-Extra": r.getMpPlatform() + } + }, r.checkAppId = function(t) { + return t.replace(/\s*/g, "") + }, r.checkUrl = function(t) { + return t = t.replace(/\s*/g, ""), r.url("basic", t) + }, r.url = function() { + function t() { + return new RegExp(/(.*?)\.?([^.]*?)\.(com|net|org|biz|ws|in|me|co\.uk|co|org\.uk|ltd\.uk|plc\.uk|me\.uk|edu|mil|br\.com|cn\.com|eu\.com|hu\.com|no\.com|qc\.com|sa\.com|se\.com|se\.net|us\.com|uy\.com|ac|co\.ac|gv\.ac|or\.ac|ac\.ac|af|am|as|at|ac\.at|co\.at|gv\.at|or\.at|asn\.au|com\.au|edu\.au|org\.au|net\.au|id\.au|be|ac\.be|adm\.br|adv\.br|am\.br|arq\.br|art\.br|bio\.br|cng\.br|cnt\.br|com\.br|ecn\.br|eng\.br|esp\.br|etc\.br|eti\.br|fm\.br|fot\.br|fst\.br|g12\.br|gov\.br|ind\.br|inf\.br|jor\.br|lel\.br|med\.br|mil\.br|net\.br|nom\.br|ntr\.br|odo\.br|org\.br|ppg\.br|pro\.br|psc\.br|psi\.br|rec\.br|slg\.br|tmp\.br|tur\.br|tv\.br|vet\.br|zlg\.br|br|ab\.ca|bc\.ca|mb\.ca|nb\.ca|nf\.ca|ns\.ca|nt\.ca|on\.ca|pe\.ca|qc\.ca|sk\.ca|yk\.ca|ca|cc|ac\.cn|net\.cn|com\.cn|edu\.cn|gov\.cn|org\.cn|bj\.cn|sh\.cn|tj\.cn|cq\.cn|he\.cn|nm\.cn|ln\.cn|jl\.cn|hl\.cn|js\.cn|zj\.cn|ah\.cn|gd\.cn|gx\.cn|hi\.cn|sc\.cn|gz\.cn|yn\.cn|xz\.cn|sn\.cn|gs\.cn|qh\.cn|nx\.cn|xj\.cn|tw\.cn|hk\.cn|mo\.cn|cn|cx|cz|de|dk|fo|com\.ec|tm\.fr|com\.fr|asso\.fr|presse\.fr|fr|gf|gs|co\.il|net\.il|ac\.il|k12\.il|gov\.il|muni\.il|ac\.in|co\.in|org\.in|ernet\.in|gov\.in|net\.in|res\.in|is|it|ac\.jp|co\.jp|go\.jp|or\.jp|ne\.jp|ac\.kr|co\.kr|go\.kr|ne\.kr|nm\.kr|or\.kr|li|lt|lu|asso\.mc|tm\.mc|com\.mm|org\.mm|net\.mm|edu\.mm|gov\.mm|ms|nl|no|nu|pl|ro|org\.ro|store\.ro|tm\.ro|firm\.ro|www\.ro|arts\.ro|rec\.ro|info\.ro|nom\.ro|nt\.ro|se|si|com\.sg|org\.sg|net\.sg|gov\.sg|sk|st|tf|ac\.th|co\.th|go\.th|mi\.th|net\.th|or\.th|tm|to|com\.tr|edu\.tr|gov\.tr|k12\.tr|net\.tr|org\.tr|com\.tw|org\.tw|net\.tw|ac\.uk|uk\.com|uk\.net|gb\.com|gb\.net|vg|sh|kz|ch|info|ua|gov|name|pro|ie|hk|com\.hk|org\.hk|net\.hk|edu\.hk|us|tk|cd|by|ad|lv|eu\.lv|bz|es|jp|cl|ag|mobi|eu|co\.nz|org\.nz|net\.nz|maori\.nz|iwi\.nz|io|la|md|sc|sg|vc|tw|travel|my|se|tv|pt|com\.pt|edu\.pt|asia|fi|com\.ve|net\.ve|fi|org\.ve|web\.ve|info\.ve|co\.ve|tel|im|gr|ru|net\.ru|org\.ru|hr|com\.hr|ly|xyz)$/) + } + + function e(t, e) { + var o = t.charAt(0); + return e = e.split(o), o === t ? e : e[(t = parseInt(t.substring(1), 10)) < 0 ? e.length + t : t - 1] + } + + function o(t, e) { + for (var o, n, a = t.charAt(0), i = e.split("&"), c = [], s = {}, l = t.substring(1), u = 0, p = i.length; u < p; u++) + if ("" !== (c = (c = i[u].match(/(.*?)=(.*)/)) || [i[u], i[u], ""])[1].replace(/\s/g, "")) { + if (c[2] = (n = c[2] || "", r.decodeURIComponent(n.replace(/\+/g, " "))), l === c[1]) return c[2]; + (o = c[1].match(/(.*)\[([0-9]+)\]/)) ? (s[o[1]] = s[o[1]] || [], s[o[1]][o[2]] = c[2]) : s[c[1]] = c[2] + } + return a === t ? s : s[l] + } + return function(n, a) { + var i = {}; + if ("tld?" === n) return t(); + if (a = a || window.location.toString(), !n) return a; + if (n = n.toString(), a.match(/^mailto:([^/].+)/)) r = a.match(/^mailto:([^/].+)/), i.protocol = "mailto", i.email = r[1]; + else { + if (a.match(/(.*?)\/#!(.*)/) && (a = (r = a.match(/(.*?)\/#!(.*)/))[1] + r[2]), a.match(/(.*?)#(.*)/) && (r = a.match(/(.*?)#(.*)/), i.hash = r[2], a = r[1]), i.hash && n.match(/^#/)) return o(n, i.hash); + if (a.match(/(.*?)\?(.*)/) && (r = a.match(/(.*?)\?(.*)/), i.query = r[2], a = r[1]), i.query && n.match(/^\?/)) return o(n, i.query); + if (a.match(/(.*?):?\/\/(.*)/) && (r = a.match(/(.*?):?\/\/(.*)/), i.protocol = r[1].toLowerCase(), a = r[2]), a.match(/(.*?)(\/.*)/) && (r = a.match(/(.*?)(\/.*)/), i.path = r[2], a = r[1]), i.path = (i.path || "").replace(/^([^/])/, "/$1").replace(/\/$/, ""), n.match(/^[-0-9]+$/) && (n = n.replace(/^([^/])/, "/$1")), n.match(/^\//)) return e(n, i.path.substring(1)); + if ((r = (r = e("/-1", i.path.substring(1))) && r.match(/(.*?)\.(.*)/)) && (i.file = r[0], i.filename = r[1], i.fileext = r[2]), a.match(/(.*):([0-9]+)$/) && (r = a.match(/(.*):([0-9]+)$/), i.port = r[2], a = r[1]), a.match(/(.*?)@(.*)/) && (r = a.match(/(.*?)@(.*)/), i.auth = r[1], a = r[2]), i.auth && (r = i.auth.match(/(.*):(.*)/), i.user = r ? r[1] : i.auth, i.pass = r ? r[2] : void 0), i.hostname = a.toLowerCase(), "." === n.charAt(0)) return e(n, i.hostname); + t() && (r = i.hostname.match(t())) && (i.tld = r[3], i.domain = r[2] ? r[2] + "." + r[3] : void 0, i.sub = r[1] || void 0); + var r = i.port ? ":" + i.port : ""; + i.protocol = i.protocol || window.location.protocol.replace(":", ""), i.port = i.port || ("https" === i.protocol ? "443" : "80"), i.protocol = i.protocol || ("443" === i.port ? "https" : "http"), i.basic = i.protocol + "://" + i.hostname + r + } + return n in i ? i[n] : "{}" === n ? i : "" + } + }(), r.createString = function(t) { + for (var e = t, o = Math.random().toString(36).substr(2); o.length < e;) o += Math.random().toString(36).substr(2); + return o.substr(0, t) + }, r.createAesKey = function() { + return r.createString(16) + }, r.generateEncryptyData = function(t, e) { + if (void 0 === e) return t; + var o = e.publicKey, + n = e.version; + if (void 0 === o || void 0 === n) return t; + if ("undefined" == typeof CryptoJS || "undefined" == typeof JSEncrypt) return t; + var a = r.createAesKey(); + try { + var i = CryptoJS.enc.Utf8.parse(a), + c = CryptoJS.enc.Utf8.parse(JSON.stringify(t)), + s = r.isUndefined(CryptoJS.pad.Pkcs7) ? CryptoJS.pad.PKCS7 : CryptoJS.pad.Pkcs7; + return i = CryptoJS.AES.encrypt(c, i, { + mode: CryptoJS.mode.ECB, + padding: s + }).toString(), (s = new JSEncrypt).setPublicKey(o), !1 === (s = s.encrypt(a)) ? (m.warn("私钥加密失败,返回原数据"), t) : { + pkv: n, + ekey: s, + payload: i + } + } catch (t) { + m.warn("数据加密失败,返回原数据: " + t) + } + return t + }; + var m = "object" === o(m) ? m : {}; + m.info = function() { + if ("object" === ("undefined" == typeof console ? "undefined" : o(console)) && console.log && m.enabled) try { + return console.log.apply(console, arguments) + } catch (t) { + console.log(arguments[0]) + } + }, m.warn = function() { + if ("object" === ("undefined" == typeof console ? "undefined" : o(console)) && console.log && m.enabled) try { + return console.warn.apply(console, arguments) + } catch (t) { + console.warn(arguments[0]) + } + }; + var g = function() { + function t() { + n(this, t), this.config = { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_mg" + } + } + return i(t, [{ + key: "getConfig", + value: function() { + return this.config + } + }, { + key: "getStorage", + value: function(t, e, o) { + if (t = localStorage.getItem(t), !e) return r.isJSONString(t) ? JSON.parse(t) : {}; + r.isJSONString(t) ? o(JSON.parse(t)) : o({}) + } + }, { + key: "setStorage", + value: function(t, e) { + localStorage.setItem(t, e) + } + }, { + key: "_setSystemProxy", + value: function(t) { + this._sysCallback = t + } + }, { + key: "getSystemInfo", + value: function(t) { + var e = { + mp_platform: "web", + system: this._getOs(), + screenWidth: window.screen.width, + screenHeight: window.screen.height, + systemLanguage: navigator.language + }; + this._sysCallback && (e = r.extend(e, this._sysCallback(t))), t.success(e), t.complete() + } + }, { + key: "_getOs", + value: function() { + var t = navigator.userAgent; + return /Windows/i.test(t) ? /Phone/.test(t) || /WPDesktop/.test(t) ? "Windows Phone" : "Windows" : /(iPhone|iPad|iPod)/.test(t) ? "iOS" : /Android/.test(t) ? "Android" : /(BlackBerry|PlayBook|BB10)/i.test(t) ? "BlackBerry" : /Mac/i.test(t) ? "MacOS" : /Linux/.test(t) ? "Linux" : /CrOS/.test(t) ? "ChromeOS" : "" + } + }, { + key: "getNetworkType", + value: function(t) { + t.complete() + } + }, { + key: "onNetworkStatusChange", + value: function() {} + }, { + key: "request", + value: function(t) { + var e = {}, + o = new XMLHttpRequest; + if (o.open(t.method, t.url), t.header) + for (var n in t.header) o.setRequestHeader(n, t.header[n]); + return o.onreadystatechange = function() { + 4 === o.readyState && 200 === o.status ? (e.statusCode = 200, r.isJSONString(o.responseText) && (e.data = JSON.parse(o.responseText)), t.success(e)) : 200 !== o.status && (e.errMsg = "network error", t.fail(e)) + }, o.ontimeout = function() { + e.errMsg = "timeout", t.fail(e) + }, o.send(t.data), o + } + }, { + key: "initAutoTrackInstance", + value: function(t, e) { + this.instance = t, this.autoTrack = e.autoTrack; + var o = this; + "onpagehide" in window ? window.onpagehide = function() { + o.onPageHide(!0) + } : window.onbeforeunload = function() { + o.onPageHide(!0) + }, o.onPageShow(), o.autoTrack.appHide && o.instance.timeEvent("ta_page_hide"), "onvisibilitychange" in document && (document.onvisibilitychange = function() { + document.hidden ? o.onPageHide(!1) : (o.onPageShow(), o.autoTrack.appHide && o.instance.timeEvent("ta_page_hide")) + }) + } + }, { + key: "setGlobal", + value: function(t, e) { + window[e] = t + } + }, { + key: "getAppOptions", + value: function() {} + }, { + key: "showToast", + value: function() {} + }, { + key: "onPageShow", + value: function() { + var t; + this.autoTrack.appShow && (t = {}, r.extend(t, this.autoTrack.properties), r.isFunction(this.autoTrack.callback) && r.extend(t, this.autoTrack.callback("appShow")), this.instance._internalTrack("ta_page_show", t)) + } + }, { + key: "onPageHide", + value: function(t) { + var e; + this.autoTrack.appHide && (e = {}, r.extend(e, this.autoTrack.properties), r.isFunction(this.autoTrack.callback) && r.extend(e, this.autoTrack.callback("appHide")), this.instance._internalTrack("ta_page_hide", e, new Date, null, t)) + } + }], [{ + key: "createInstance", + value: function() { + return new t + } + }]), t + }(), + y = function() { + function t(e, o) { + n(this, t), this.taInstance = e, this.config = o || {}, this.referrer = "Directly open", this.config.isPlugin ? (e.App = function() { + App.apply(this, arguments) + }, inension(e.Page)) : (e = App, App = this._initAppExtention(e), e = Page, Page = this._initPageExtension(e)) + } + return i(t, [{ + key: "_initPageExtension", + value: function(t) { + var e = this; + return function(o) { + var n = o.onShow, + a = o.onShareAppMessage; + return o.onShow = function(t) { + e.onPageShow(), "function" == typeof n && n.call(this, t) + }, "function" == typeof a && (o.onShareAppMessage = function(t) { + return t = a.call(this, t), e.onPageShare(t) + }), t(o) + } + } + }, { + key: "_initAppExtention", + value: function(t) { + var e = this; + return function(o) { + var n = o.onLaunch, + a = o.onShow, + i = o.onHide; + return o.onLaunch = function(t) { + e.onAppLaunch(t, this), "function" == typeof n && n.call(this, t) + }, o.onShow = function(t) { + e.onAppShow(t), "function" == typeof a && a.call(this, t) + }, o.onHide = function() { + e.onAppHide(), "function" == typeof i && i.call(this) + }, t(o) + } + } + }, { + key: "onAppLaunch", + value: function(t, e) { + this._setAutoTrackProperties(t), r.isUndefined(e) || (e[this.taInstance.name] = this.taInstance), this.config.appLaunch && (e = {}, t && t.path && (e["#url_path"] = this._getPath(t.path)), this.taInstance._internalTrack("ta_mp_launch", e)) + } + }, { + key: "onAppShow", + value: function(t) { + var e; + this.config.appHide && this.taInstance.timeEvent("ta_mp_hide"), this._setAutoTrackProperties(t), this.config.appShow && (e = {}, t && t.path && (e["#url_path"] = this._getPath(t.path)), r.extend(e, this.config.properties), r.isFunction(this.config.callback) && r.extend(e, this.config.callback("appShow")), this.taInstance._internalTrack("ta_mp_show", e)) + } + }, { + key: "onAppHide", + value: function() { + var t; + this.config.appHide && (t = { + "#url_path": this._getCurrentPath() + }, r.extend(t, this.config.properties), r.isFunction(this.config.callback) && r.extend(t, this.config.callback("appHide")), this.taInstance._internalTrack("ta_mp_hide", t)) + } + }, { + key: "_getCurrentPath", + value: function() { + var t = "Not to get"; + try { + var e = getCurrentPages(); + t = e[e.length - 1].route + } catch (t) { + m.info(t) + } + return t + } + }, { + key: "_setAutoTrackProperties", + value: function(t) { + t = { + "#scene": t.scene + }, this.taInstance._setAutoTrackProperties(t) + } + }, { + key: "_getPath", + value: function(t) { + return "string" == typeof t ? t.replace(/^\//, "") : "Abnormal values" + } + }, { + key: "onPageShare", + value: function(t) { + return this.config.pageShare && this.taInstance._internalTrack("ta_mp_share", { + "#url_path": this._getCurrentPath() + }), r.isObject(t) ? t : {} + } + }, { + key: "onPageShow", + value: function() { + var t, e; + this.config.pageShow && (e = { + "#url_path": (t = this._getCurrentPath()) || "The system did not get a value", + "#referrer": this.referrer + }, this.referrer = t, this.taInstance._internalTrack("ta_mp_view", e)) + } + }]), t + }(), + v = function() { + function t(e, o, a) { + var i = this; + n(this, t), this.taInstance = e, this.config = o || {}, o = a.getLaunchOptionsSync(), this._onShow(o), this.startTracked = !0, a.onShow(function(t) { + i._onShow(t) + }), a.onHide(function() { + var t; + i.startTracked = !1, i.config.appHide && (t = {}, r.extend(t, i.config.properties), r.isFunction(i.config.callback) && r.extend(t, i.config.callback("appHide")), i.taInstance._internalTrack("ta_mg_hide", t)) + }) + } + return i(t, [{ + key: "_onShow", + value: function(t) { + this.startTracked || (this.config.appHide && this.taInstance.timeEvent("ta_mg_hide"), t && t.scene && this.taInstance._setAutoTrackProperties({ + "#scene": t.scene + }), this.config.appShow && (t = {}, r.extend(t, this.config.properties), r.isFunction(this.config.callback) && r.extend(t, this.config.callback("appShow")), this.taInstance._internalTrack("ta_mg_show", t))) + } + }]), t + }(), + b = function() { + function t(e, o, a) { + n(this, t), this.api = e, this.config = o, this._config = a + } + return i(t, [{ + key: "getConfig", + value: function() { + return this.config + } + }, { + key: "getStorage", + value: function(t, e, o) { + if (!e) { + if ("dd_mp" === this._config.platform) { + var n = this.api.getStorageSync({ + key: t + }); + return r.isJSONString(n.data) ? JSON.parse(n.data) : {} + } + return n = this.api.getStorageSync(t), r.isJSONString(n) ? JSON.parse(n) : {} + } + this.api.getStorage({ + key: t, + success: function(t) { + t = r.isJSONString(t.data) ? JSON.parse(t.data) : {}, o(t) + }, + fail: function() { + m.warn("getStorage faild"), o({}) + } + }) + } + }, { + key: "setStorage", + value: function(t, e) { + this.api.setStorage({ + key: t, + data: e + }) + } + }, { + key: "_getPlatform", + value: function() { + return "" + } + }, { + key: "getSystemInfo", + value: function(t) { + var e = this._config.mpPlatform; + this.api.getSystemInfo({ + success: function(o) { + r.isFunction(e) ? o.mp_platform = e(o) : o.mp_platform = e, t.success(o), "wechat" === e && t.complete() + }, + complete: function() { + t.complete() + } + }) + } + }, { + key: "getNetworkType", + value: function(t) { + r.isFunction(this.api.getNetworkType) ? this.api.getNetworkType({ + success: function(e) { + t.success(e) + }, + complete: function() { + t.complete() + } + }) : (t.success({}), t.complete()) + } + }, { + key: "onNetworkStatusChange", + value: function(t) { + r.isFunction(this.api.onNetworkStatusChange) ? this.api.onNetworkStatusChange(t) : t({}) + } + }, { + key: "request", + value: function(t) { + if ("ali_mp" !== this._config.platform && "dd_mp" !== this._config.platform) return this.api.request(t); + var e = r.extend({}, t); + return e.headers = t.header, e.success = function(e) { + e.statusCode = e.status, t.success(e) + }, e.fail = function(e) { + e.errMsg = e.errorMessage, t.fail(e) + }, "dd_mp" === this._config.platform ? this.api.httpRequest(e) : this.api.request(e) + } + }, { + key: "initAutoTrackInstance", + value: function(t, e) { + return r.isObject(e.autoTrack) && (e.autoTrack.isPlugin = e.is_plugin), new(this._config.mp ? y : v)(t, e.autoTrack, this.api) + } + }, { + key: "setGlobal", + value: function(t, e) { + this._config.mp ? m.warn("ThinkingAnalytics: we do not set global name for TA instance when you do not enable auto track.") : GameGlobal[e] = t + } + }, { + key: "getAppOptions", + value: function(t) { + var e = {}; + try { + e = this.api.getLaunchOptionsSync() + } catch (t) { + m.warn("Cannot get launch options.") + } + if (r.isFunction(t)) try { + this._config.mp ? this.api.onAppShow(t) : this.api.onShow(t) + } catch (t) { + m.warn("Cannot register onShow callback.") + } + return e + } + }, { + key: "showToast", + value: function(t) { + var e; + r.isFunction(this.api.showToast) && (e = { + title: t + }, "dd_mp" !== this._config.platform && "ali_mp" !== this._config.platform || (e.content = t), this.api.showToast(e)) + } + }], [{ + key: "createInstance", + value: function() { + return this._createInstance("R_CURRENT_PLATFORM") + } + }, { + key: "_createInstance", + value: function(e) { + switch (e) { + case "wechat_mp": + return new t(wx, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_wechat" + }, { + mpPlatform: "wechat", + mp: !0, + platform: e + }); + case "wechat_mg": + return new t(wx, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_wechat_game" + }, { + mpPlatform: "wechat", + platform: e + }); + case "qq_mp": + return new t(qq, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_qq" + }, { + mpPlatform: "qq", + mp: !0, + platform: e + }); + case "qq_mg": + return new t(qq, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_qq_game" + }, { + mpPlatform: "qq", + platform: e + }); + case "baidu_mp": + return new t(swan, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_swan" + }, { + mpPlatform: function(t) { + return t.host + }, + mp: !0, + platform: e + }); + case "baidu_mg": + return new t(swan, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_swan_game" + }, { + mpPlatform: function(t) { + return t.host + }, + platform: e + }); + case "tt_mg": + return new t(tt, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_tt_game" + }, { + mpPlatform: function(t) { + return t.appName + }, + platform: e + }); + case "tt_mp": + return new t(tt, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_tt" + }, { + mpPlatform: function(t) { + return t.appName + }, + mp: !0, + platform: e + }); + case "ali_mp": + return new t(my, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_ali" + }, { + mpPlatform: function(t) { + return t.app + }, + mp: !0, + platform: e + }); + case "dd_mp": + return new t(dd, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_dd" + }, { + mpPlatform: "dingding", + mp: !0, + platform: e + }); + case "bl_mg": + return new t(bl, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_mg" + }, { + mpPlatform: "bilibili", + platform: e + }); + case "kuaishou_mp": + return new t(ks, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_kuaishou" + }, { + mpPlatform: "kuaishou", + mp: !0, + platform: e + }); + case "qh360_mg": + return new t(qh, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_qh360" + }, { + mpPlatform: "qh360", + platform: e + }); + case "tb_mp": + return new t(my, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_tb" + }, { + mpPlatform: "tb", + mp: !0, + platform: e + }); + case "jd_mp": + return new t(jd, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_jd" + }, { + mpPlatform: "jd", + mp: !0, + platform: e + }); + case "qh360_mp": + return new t(qh, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_qh360" + }, { + mpPlatform: "qh360", + mp: !0, + platform: e + }); + case "WEB": + return new g.createInstance + } + } + }]), t + }(), + _ = function t(e, o) { + var a = this; + n(this, t), this.taInstance = e, this.config = o || {}, this.config.appShow && this.taInstance._internalTrack("ta_mg_show"), this.config.appHide && this.taInstance.timeEvent("ta_mg_hide"), qg.onShow(function() { + var t; + a.config.appHide && a.taInstance.timeEvent("ta_mg_hide"), a.config.appShow && (t = {}, r.extend(t, a.config.properties), r.isFunction(a.config.callback) && r.extend(t, a.config.callback("appShow")), a.taInstance._internalTrack("ta_mg_show")) + }), qg.onHide(function() { + var t; + a.config.appHide && (t = {}, r.extend(t, a.config.properties), r.isFunction(a.config.callback) && r.extend(t, a.config.callback("appHide")), a.taInstance._internalTrack("ta_mg_hide")) + }) + }, + N = function() { + function t() { + n(this, t), this.config = { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_qg_vivo_game", + asyncPersistence: !0 + } + } + return i(t, [{ + key: "getConfig", + value: function() { + return this.config || {} + } + }, { + key: "getStorage", + value: function(t, e, o) { + if (!e) return e = qg.getStorageSync({ + key: t + }), r.isJSONString(e) ? JSON.parse(e) : {}; + qg.getStorage({ + key: t, + success: function(t) { + t = r.isJSONString(t) ? JSON.parse(t) : {}, o(t) + }, + fail: function() { + o({}) + } + }) + } + }, { + key: "setStorage", + value: function(t, e) { + qg.setStorage({ + key: t, + value: e + }) + } + }, { + key: "getSystemInfo", + value: function(t) { + qg.getSystemInfo({ + success: function(e) { + var o = e, + n = [e.osType, e.osVersionName].join(" "); + o.brand = e.manufacturer, o.system = n, o.mp_platform = "vivo_qg", t.success(o) + }, + complete: function() { + t.complete() + } + }) + } + }, { + key: "getNetworkType", + value: function(t) { + qg.getNetworkType({ + success: function(e) { + var o = e; + o.networkType = e.type, t.success(o) + }, + complete: function() { + t.complete() + } + }) + } + }, { + key: "onNetworkStatusChange", + value: function(t) { + qg.subscribeNetworkStatus({ + callback: function(e) { + var o = e; + o.networkType = e.type, t(o) + } + }) + } + }, { + key: "request", + value: function(t) { + return qg.request({ + url: t.url, + data: t.data, + method: t.method, + header: t.header, + success: function(e) { + t.success(e) + }, + fail: function(e) { + t.fail(e) + } + }) + } + }, { + key: "initAutoTrackInstance", + value: function(t, e) { + return new _(t, e.autoTrack) + } + }, { + key: "setGlobal", + value: function(t, e) { + globalThis[e] = t + } + }, { + key: "getAppOptions", + value: function() { + return {} + } + }, { + key: "showToast", + value: function(t) { + qg.showToast({ + message: t, + duration: 0 + }) + } + }], [{ + key: "createInstance", + value: function() { + return new t + } + }]), t + }(), + C = function t(e, o, a) { + var i = this; + n(this, t), this.taInstance = e, this.config = o || {}, this.config.appShow && (o = {}, r.extend(o, this.config.properties), r.isFunction(this.config.callback) && r.extend(o, this.config.callback("appShow")), this.taInstance._internalTrack("ta_mg_show", o)), this.config.appHide && this.taInstance.timeEvent("ta_mg_hide"), a.onShow(function() { + var t; + i.config.appHide && i.taInstance.timeEvent("ta_mg_hide"), i.config.appShow && (t = {}, r.extend(t, i.config.properties), r.isFunction(i.config.callback) && r.extend(t, i.config.callback("appShow")), i.taInstance._internalTrack("ta_mg_show", t)) + }), a.onHide(function() { + var t; + i.config.appHide && (t = {}, r.extend(t, i.config.properties), r.isFunction(i.config.callback) && r.extend(t, i.config.callback("appHide")), i.taInstance._internalTrack("ta_mg_hide", t)) + }) + }, + w = function() { + function t(e, o, a) { + n(this, t), this.api = e, this.config = o, this._config = a + } + return i(t, [{ + key: "getConfig", + value: function() { + return this.config || {} + } + }, { + key: "getStorage", + value: function(t, e, o) { + if (t = localStorage.getItem(t), !e) return r.isJSONString(t) ? JSON.parse(t) : {}; + r.isJSONString(t) ? o(JSON.parse(t)) : o({}) + } + }, { + key: "setStorage", + value: function(t, e) { + localStorage.setItem(t, e) + } + }, { + key: "getSystemInfo", + value: function(t) { + var e = this._config.mpPlatform; + this.api.getSystemInfo({ + success: function(o) { + o.mp_platform = e, t.success(o) + }, + complete: function() { + t.complete() + } + }) + } + }, { + key: "getNetworkType", + value: function(t) { + this.api.getNetworkType({ + success: function(e) { + t.success(e) + }, + complete: function() { + t.complete() + } + }) + } + }, { + key: "onNetworkStatusChange", + value: function(t) { + this.api.onNetworkStatusChange({ + callback: function(e) { + t(e) + } + }) + } + }, { + key: "request", + value: function(t) { + var e = {}, + o = new XMLHttpRequest; + if (o.open(t.method, t.url), t.header) + for (var n in t.header) o.setRequestHeader(n, t.header[n]); + return o.onreadystatechange = function() { + 4 === o.readyState && 200 === o.status ? (e.statusCode = 200, r.isJSONString(o.responseText) && (e.data = JSON.parse(o.responseText)), t.success(e)) : 200 !== o.status && (e.errMsg = "network error", t.fail(e)) + }, o.ontimeout = function() { + e.errMsg = "timeout", t.fail(e) + }, o.send(t.data), o + } + }, { + key: "initAutoTrackInstance", + value: function(t, e) { + return new C(t, e.autoTrack, this.api) + } + }, { + key: "setGlobal", + value: function(t, e) { + globalThis[e] = t + } + }, { + key: "getAppOptions", + value: function() { + return this.api.getLaunchOptionsSync() + } + }, { + key: "showToast", + value: function(t) { + this.api.showToast({ + title: t, + icon: "none", + duration: 2e3 + }) + } + }], [{ + key: "createInstance", + value: function() { + return this._createInstance("R_CURRENT_PLATFORM") + } + }, { + key: "_createInstance", + value: function(e) { + switch (e) { + case "oppo": + return new t(qg, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_qg_oppo_game" + }, { + mpPlatform: "oppo_qg" + }); + case "huawei": + return new t(hbs, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_qg_huawei_game" + }, { + mpPlatform: "huawei_qg" + }); + case "mz": + return new t(qg, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_qg_mz_game" + }, { + mpPlatform: "mz" + }); + case "xiaomi": + return new t(qg, { + persistenceName: "thinkingdata", + persistenceNameOld: "thinkingdata_qg" + }, { + mpPlatform: "xiaomi" + }) + } + } + }]), t + }(), + P = function() { + function t() { + n(this, t) + } + return i(t, null, [{ + key: "createInstance", + value: function() { + var t = Object.freeze({ + WECHAT_GAME: 104, + QQ_PLAY: 105, + BAIDU_GAME: 107, + VIVO_GAME: 108, + OPPO_GAME: 109, + HUAWEI_GAME: 110, + XIAOMI_GAME: 111, + BYTEDANCE_GAME: 117, + QTT_GAME: 116, + LINKSURE: 119, + WECHAT_MINI_GAME: "WECHAT_GAME", + BAIDU_MINI_GAME: "BAIDU_MINI_GAME", + XIAOMI_QUICK_GAME: "XIAOMI_QUICK_GAME", + OPPO_MINI_GAME: "OPPO_MINI_GAME", + VIVO_MINI_GAME: "VIVO_MINI_GAME", + HUAWEI_QUICK_GAME: "HUAWEI_QUICK_GAME", + BYTEDANCE_MINI_GAME: "BYTEDANCE_MINI_GAME", + QTT_MINI_GAME: "QTT_MINI_GAME", + LINKSURE_MINI_GAME: "LINKSURE_MINI_GAME" + }); + if (cc.sys.platform === t.WECHAT_GAME || cc.sys.platform === t.WECHAT_MINI_GAME) return b._createInstance("wechat_mg"); + if (cc.sys.platform === t.BAIDU_GAME || cc.sys.platform === t.BAIDU_MIN_GAME) return b._createInstance("baidu_mg"); + if (cc.sys.platform === t.VIVO_GAME || cc.sys.platform === t.VIVO_MINI_GAME) return N.createInstance(); + if (cc.sys.platform === t.QQ_PLAY) return b._createInstance("qq_mg"); + if (cc.sys.platform === t.OPPO_GAME || cc.sys.platform === t.OPPO_MINI_GAME) return w._createInstance("oppo"); + if (cc.sys.platform === t.HUAWEI_GAME || cc.sys.platform === t.HUAWEI_QUICK_GAME) return w._createInstance("huawei"); + if (cc.sys.platform === t.XIAOMI_GAME || cc.sys.platform === t.XIAOMI_QUICK_GAME) return w._createInstance("xiaomi"); + if (cc.sys.platform === t.BYTEDANCE_GAME || cc.sys.platform === t.BYTEDANCE_MINI_GAME) return b._createInstance("tt_mg"); + var e = g.createInstance(); + return e._sysCallback = function() { + return { + system: cc.sys.os.replace(" ", "") + " " + cc.sys.osVersion + } + }, e.getNetworkType = function(t) { + var e = {}; + switch (cc.sys.getNetworkType()) { + case cc.sys.NetworkType.LAN: + e.networkType = "WIFI"; + break; + case cc.sys.NetworkType.WWAN: + e.networkType = "WWAN"; + break; + default: + e.networkType = "NONE" + } + t.success(e), t.complete() + }, e.getSystemInfo = function(t) { + var o = { + mp_platform: cc.sys.platform.toString(), + system: e._getOs(), + screenWidth: window.screen.width, + screenHeight: window.screen.height + }; + e._sysCallback && (o = r.extend(o, e._sysCallback(t))), t.success(o), t.complete() + }, e + } + }]), t + }(), + k = function() { + function t() { + n(this, t) + } + return i(t, null, [{ + key: "_getCurrentPlatform", + value: function() { + return this.currentPlatform || (this.currentPlatform = P.createInstance()) + } + }, { + key: "getConfig", + value: function() { + return this._getCurrentPlatform().getConfig() + } + }, { + key: "getStorage", + value: function(t, e, o) { + return this._getCurrentPlatform().getStorage(t, e, o) + } + }, { + key: "setStorage", + value: function(t, e) { + return this._getCurrentPlatform().setStorage(t, e) + } + }, { + key: "getSystemInfo", + value: function(t) { + return this._getCurrentPlatform().getSystemInfo(t) + } + }, { + key: "getNetworkType", + value: function(t) { + return this._getCurrentPlatform().getNetworkType(t) + } + }, { + key: "onNetworkStatusChange", + value: function(t) { + this._getCurrentPlatform().onNetworkStatusChange(t) + } + }, { + key: "request", + value: function(t) { + return this._getCurrentPlatform().request(t) + } + }, { + key: "initAutoTrackInstance", + value: function(t, e) { + return this._getCurrentPlatform().initAutoTrackInstance(t, e) + } + }, { + key: "setGlobal", + value: function(t, e) { + t && e && this._getCurrentPlatform().setGlobal(t, e) + } + }, { + key: "getAppOptions", + value: function(t) { + return this._getCurrentPlatform().getAppOptions(t) + } + }, { + key: "showDebugToast", + value: function(t) { + this._getCurrentPlatform().showToast(t) + } + }]), t + }(), + S = /^[a-zA-Z][a-zA-Z0-9_]{0,49}$/, + D = function() { + function t() { + n(this, t) + } + return i(t, null, [{ + key: "stripProperties", + value: function(t) { + return r.isObject(t) && r.each(t, function(t, e) { + r.isString(t) || r.isNumber(t) || r.isDate(t) || r.isBoolean(t) || r.isArray(t) || r.isObject(t) || m.warn("Your data -", e, t, "- format does not meet requirements and may not be stored correctly. Attribute values only support String, Number, Date, Boolean, Array, Object") + }), t + } + }, { + key: "_checkPropertiesKey", + value: function(t) { + var e = !0; + return r.each(t, function(t, o) { + S.test(o) || (m.warn("Invalid KEY: " + o), e = !1) + }), e + } + }, { + key: "event", + value: function(t) { + return !(!r.isString(t) || !S.test(t)) || (m.warn("Check the parameter format. The eventName must start with an English letter and contain no more than 50 characters including letters, digits, and underscores: " + t), !1) + } + }, { + key: "propertyName", + value: function(t) { + return !(!r.isString(t) || !S.test(t)) || (m.warn("Check the parameter format. PropertyName must start with a letter and contain letters, digits, and underscores (_). The value is a string of no more than 50 characters: " + t), !1) + } + }, { + key: "properties", + value: function(t) { + return this.stripProperties(t), !(t && (r.isObject(t) ? !this._checkPropertiesKey(t) && (m.warn("Check the parameter format. The properties key must start with a letter, contain digits, letters, and underscores (_), and contain a maximum of 50 characters"), 1) : (m.warn("properties can be none, but it must be an object"), 1))) + } + }, { + key: "propertiesMust", + value: function(t) { + return this.stripProperties(t), void 0 === t || !r.isObject(t) || r.isEmptyObject(t) ? (m.warn("properties must be an object with a value"), !1) : !!this._checkPropertiesKey(t) || (m.warn("Check the parameter format. The properties key must start with a letter, contain digits, letters, and underscores (_), and contain a maximum of 50 characters"), !1) + } + }, { + key: "userId", + value: function(t) { + return !(!r.isString(t) || !/^.{1,64}$/.test(t)) || (m.warn("The user ID must be a string of less than 64 characters and cannot be null"), !1) + } + }, { + key: "userAddProperties", + value: function(t) { + if (!this.propertiesMust(t)) return !1; + for (var e in t) + if (!r.isNumber(t[e])) return m.warn("The attributes of userAdd need to be Number"), !1; + return !0 + } + }, { + key: "userAppendProperties", + value: function(t) { + if (!this.propertiesMust(t)) return !1; + for (var e in t) + if (!r.isArray(t[e])) return m.warn("The attribute of userAppend must be Array"), !1; + return !0 + } + }]), t + }(), + A = function() { + function t(e, o, a, i, c) { + n(this, t), this.data = e, this.serverUrl = o, this.callback = c, this.tryCount = r.isNumber(a) ? a : 1, this.timeout = r.isNumber(i) ? i : 3e3, this.taClassName = "HttpTask" + } + return i(t, [{ + key: "run", + value: function() { + var t = this, + e = r.createExtraHeaders(); + e["content-type"] = "application/json"; + var o = k.request({ + url: this.serverUrl, + method: "POST", + data: this.data, + header: e, + success: function(e) { + t.onSuccess(e) + }, + fail: function(e) { + t.onFailed(e) + } + }); + setTimeout(function() { + (r.isObject(o) || r.isPromise(o)) && r.isFunction(o.abort) && o.abort() + }, this.timeout) + } + }, { + key: "onSuccess", + value: function(t) { + if (200 === t.statusCode) { + var e; + switch (t.data.code) { + case 0: + e = "success"; + break; + case -1: + e = "invalid data"; + break; + case -2: + e = "invalid APP ID"; + break; + default: + e = "Unknown return code" + } + this.callback({ + code: t.data.code, + msg: e + }) + } else this.callback({ + code: -3, + msg: t.statusCode + }) + } + }, { + key: "onFailed", + value: function(t) { + 0 < --this.tryCount ? this.run() : this.callback({ + code: -3, + msg: t.errMsg + }) + } + }]), t + }(), + T = function() { + function t(e, o, a, i, c, s, l) { + n(this, t), this.data = e, this.serverDebugUrl = o, this.callback = l, this.tryCount = r.isNumber(a) ? a : 1, this.timeout = r.isNumber(i) ? i : 3e3, this.dryrun = c, this.deviceId = s, this.taClassName = "HttpTaskDebug" + } + return i(t, [{ + key: "run", + value: function() { + var t = this, + e = "appid=" + this.data["#app_id"] + "&source=client&dryRun=" + this.dryrun + "&deviceId=" + this.deviceId + "&data=" + encodeURIComponent(JSON.stringify(this.data.data[0])), + o = r.createExtraHeaders(); + o["content-type"] = "application/x-www-form-urlencoded"; + var n = k.request({ + url: this.serverDebugUrl, + method: "POST", + data: e, + header: o, + success: function(e) { + t.onSuccess(e) + }, + fail: function(e) { + t.onFailed(e) + } + }); + setTimeout(function() { + (r.isObject(n) || r.isPromise(n)) && r.isFunction(n.abort) && n.abort() + }, this.timeout) + } + }, { + key: "onSuccess", + value: function(t) { + if (200 === t.statusCode) { + var e; + if (0 === t.data.errorLevel) e = "Verify data success."; + else if (1 === t.data.errorLevel) { + for (var o = t.data.errorProperties, n = "", a = 0; a < o.length; a++) { + var i = o[a].errorReason; + n = n + " propertyName:" + o[a].propertyName + " errorReasons:" + i + "\n" + } + e = "Debug data error. errorLevel:" + t.data.errorLevel + " reason:" + n + } else 2 !== t.data.errorLevel && -1 !== t.data.errorLevel || (e = "Debug data error. errorLevel:" + t.data.errorLevel + " reason:" + t.data.errorReasons); + m.info(e), this.callback({ + code: t.data.errorLevel, + msg: e + }) + } else this.callback({ + code: -3, + msg: t.statusCode + }) + } + }, { + key: "onFailed", + value: function(t) { + 0 < --this.tryCount ? this.run() : this.callback({ + code: -3, + msg: t.errMsg + }) + } + }]), t + }(), + O = new(function() { + function t() { + n(this, t), this.items = [], this.isRunning = !1, this.showDebug = !1 + } + return i(t, [{ + key: "enqueue", + value: function(t, e, o, n) { + n = !(3 < arguments.length && void 0 !== n) || n; + var a = this; + e = "debug" === o.debugMode ? new T(t, e, o.maxRetries, o.sendTimeout, 0, o.deviceId, function(t) { + a.isRunning = !1, r.isFunction(o.callback) && o.callback(t), a._runNext(), !1 === a.showDebug && (0 !== t.code && 1 !== t.code && 2 !== t.code || (a.showDebug = !0, r.isFunction(k.showDebugToast) && k.showDebugToast("The current mode is Debug"))) + }) : "debugOnly" === o.debugMode ? new T(t, e, o.maxRetries, o.sendTimeout, 1, o.deviceId, function(t) { + a.isRunning = !1, r.isFunction(o.callback) && o.callback(t), a._runNext(), !1 === a.showDebug && (0 !== t.code && 1 !== t.code && 2 !== t.code || (a.showDebug = !0, r.isFunction(k.showDebugToast) && k.showDebugToast("The current mode is debugOnly"))) + }) : new A(JSON.stringify(t), e, o.maxRetries, o.sendTimeout, function(t) { + a.isRunning = !1, r.isFunction(o.callback) && o.callback(t), a._runNext() + }), !0 === n ? (this.items.push(e), this._runNext()) : e.run() + } + }, { + key: "_dequeue", + value: function() { + return this.items.shift() + } + }, { + key: "_runNext", + value: function() { + if (0 < this.items.length && !this.isRunning) + if (this.isRunning = !0, "HttpTask" !== this.items[0].taClassName) this._dequeue().run(); + else { + for (var t = this.items.splice(0, this.items.length), e = t[0], o = JSON.parse(e.data), n = o["#app_id"], a = 1; a < t.length; a++) { + var i = t[a], + r = JSON.parse(i.data); + r["#app_id"] === n && e.serverUrl === i.serverUrl ? o.data = o.data.concat(r.data) : this.items.push(i) + } + var c = (new Date).getTime(); + o["#flush_time"] = c, new A(JSON.stringify(o), e.serverUrl, e.tryCount, e.timeout, e.callback).run() + } + } + }]), t + }()), + I = { + name: "thinkingdata", + is_plugin: !1, + maxRetries: 3, + sendTimeout: 3e3, + enablePersistence: !0, + asyncPersistence: !1, + enableLog: !0, + strict: !1, + debugMode: "none" + }, + E = { + properties: { + "#lib": "MG", + "#lib_version": "2.1.0" + }, + initDeviceId: function(t) { + r.isString(t) && (this.properties["#device_id"] = t) + }, + getSystemInfo: function(t) { + var e = this; + k.onNetworkStatusChange(function(t) { + e.properties["#network_type"] = t.networkType + }), k.getNetworkType({ + success: function(t) { + e.properties["#network_type"] = t.networkType + }, + complete: function() { + k.getSystemInfo({ + success: function(t) { + m.info(JSON.stringify(t, null, 4)); + var o = t.system ? t.system.replace(/\s+/g, " ").split(" ") : []; + o = { + "#manufacturer": t.brand, + "#device_model": t.model, + "#screen_width": Number(t.screenWidth), + "#screen_height": Number(t.screenHeight), + "#os": o[0], + "#os_version": o[1], + "#mp_platform": t.mp_platform, + "#system_language": t.systemLanguage + }, r.extend(e.properties, o), r.setMpPlatform(t.mp_platform) + }, + complete: function() { + t() + } + }) + } + }) + } + }, + L = function() { + function t(e, o) { + var a = this; + n(this, t), this.enabled = e.enablePersistence, this.enabled ? (e.isChildInstance ? (this.name = e.persistenceName + "_" + e.name, this.nameOld = e.persistenceNameOld + "_" + e.name) : (this.name = e.persistenceName, this.nameOld = e.persistenceNameOld), e.asyncPersistence ? (this._state = {}, k.getStorage(this.name, !0, function(t) { + r.isEmptyObject(t) ? k.getStorage(a.nameOld, !0, function(t) { + a._state = r.extend2Layers({}, t, a._state), a._init(e, o), a._save() + }) : (a._state = r.extend2Layers({}, t, a._state), a._init(e, o), a._save()) + })) : (this._state = k.getStorage(this.name) || {}, r.isEmptyObject(this._state) && (this._state = k.getStorage(this.nameOld) || {}), this._init(e, o))) : (this._state = {}, this._init(e, o)) + } + return i(t, [{ + key: "_init", + value: function(t, e) { + this.getDistinctId() || this.setDistinctId(r.UUID()), t.isChildInstance || (this.getDeviceId() || this._setDeviceId(r.UUID()), E.initDeviceId(this.getDeviceId())), this.initComplete = !0, "function" == typeof e && e(), this._save() + } + }, { + key: "_save", + value: function() { + this.enabled && this.initComplete && k.setStorage(this.name, JSON.stringify(this._state)) + } + }, { + key: "_set", + value: function(t, e) { + var n, a = this; + "string" == typeof t ? (n = {})[t] = e : "object" === o(t) && (n = t), r.each(n, function(t, e) { + a._state[e] = t + }), this._save() + } + }, { + key: "_get", + value: function(t) { + return this._state[t] + } + }, { + key: "setEventTimer", + value: function(t, e) { + var o = this._state.event_timers || {}; + o[t] = e, this._set("event_timers", o) + } + }, { + key: "removeEventTimer", + value: function(t) { + var e = (this._state.event_timers || {})[t]; + return r.isUndefined(e) || (delete this._state.event_timers[t], this._save()), e + } + }, { + key: "getDeviceId", + value: function() { + return this._state.device_id + } + }, { + key: "_setDeviceId", + value: function(t) { + this.getDeviceId() ? m.warn("cannot modify the device id.") : this._set("device_id", t) + } + }, { + key: "getDistinctId", + value: function() { + return this._state.distinct_id + } + }, { + key: "setDistinctId", + value: function(t) { + this._set("distinct_id", t) + } + }, { + key: "getAccountId", + value: function() { + return this._state.account_id + } + }, { + key: "setAccountId", + value: function(t) { + this._set("account_id", t) + } + }, { + key: "getSuperProperties", + value: function() { + return this._state.props || {} + } + }, { + key: "setSuperProperties", + value: function(t, e) { + t = e ? t : r.extend(this.getSuperProperties(), t), this._set("props", t) + } + }]), t + }(), + // M = function() { + // function t(e) { + // n(this, t), e.appId = e.appId ? r.checkAppId(e.appId) : r.checkAppId(e.appid), e.serverUrl = e.serverUrl ? r.checkUrl(e.serverUrl) : r.checkUrl(e.server_url); + // var o = r.extend({}, I, k.getConfig()); + // r.isObject(e) ? this.config = r.extend(o, e) : this.config = o, this._init(this.config) + // } + // return i(t, [{ + // key: "_init", + // value: function(t) { + // var e = this; + // this.name = t.name, this.appId = t.appId || t.appid; + // var o = t.serverUrl || t.server_url; + // this.serverUrl = o + "/sync_xcx", this.serverDebugUrl = o + "/data_debug", this.configUrl = o + "/config", this.autoTrackProperties = {}, this._queue = [], this.updateConfig(this.configUrl, this.appId), t.isChildInstance ? this._state = {} : (m.enabled = t.enableLog, this.instances = [], this._state = { + // getSystemInfo: !1, + // initComplete: !1 + // }, E.getSystemInfo(function() { + // e._updateState({ + // getSystemInfo: !0 + // }) + // }), k.setGlobal(this, this.name)), this.store = new L(t, function() { + // e.config.asyncPersistence && r.isFunction(e.config.persistenceComplete) && e.config.persistenceComplete(e), e._updateState() + // }), this.enabled = !r.isBoolean(this.store._get("ta_enabled")) || this.store._get("ta_enabled"), this.isOptOut = !!r.isBoolean(this.store._get("ta_isOptOut")) && this.store._get("ta_isOptOut"), !t.isChildInstance && t.autoTrack && (this.autoTrack = k.initAutoTrackInstance(this, t)) + // } + // }, { + // key: "updateConfig", + // value: function(t, e) { + // var o = this, + // n = r.createExtraHeaders(); + // n["content-type"] = "application/json"; + // var a = k.request({ + // url: t + "?appid=" + e, + // method: "GET", + // header: n, + // success: function(t) { + // r.isUndefined(t) || r.isUndefined(t.data) || (m.info("config update success(" + e + ") :" + JSON.stringify(t.data)), r.isUndefined(t.data.data) || (o.config.syncBatchSize = t.data.data.sync_batch_size, o.config.syncInterval = t.data.data.sync_interval, o.config.disableEventList = t.data.data.disable_event_list, r.isUndefined(t.data.data.secret_key) || (t = t.data.data.secret_key, o.config.secretKey = { + // publicKey: t.key, + // version: t.version + // }))) + // }, + // fail: function(t) { + // m.info("config update fail(" + e + ") :" + t.errMsg) + // } + // }); + // setTimeout(function() { + // (r.isObject(a) || r.isPromise(a)) && r.isFunction(a.abort) && a.abort() + // }, 3e3) + // } + // }, { + // key: "initInstance", + // value: function(e, o) { + // if (this.config.isChildInstance) m.warn("initInstance() cannot be called on child instance"); + // else { + // if (r.isString(e) && e !== this.name && r.isUndefined(this[e])) return o = new t(r.extend({}, this.config, { + // enablePersistence: !1, + // isChildInstance: !0, + // name: e + // }, o)), this[e] = o, this.instances.push(e), this[e]._state = this._state, o; + // m.warn("initInstance() failed due to the name is invalid: " + e) + // } + // } + // }, { + // key: "lightInstance", + // value: function(t) { + // return this[t] + // } + // }, { + // key: "_setAutoTrackProperties", + // value: function(t) { + // r.extend(this.autoTrackProperties, t) + // } + // }, { + // key: "init", + // value: function() { + // if (this._state.initComplete) return !1; + // this._updateState({ + // initComplete: !0 + // }) + // } + // }, { + // key: "_isReady", + // value: function() { + // return this._state.getSystemInfo && this._state.initComplete && this.store.initComplete && this.getDeviceId() + // } + // }, { + // key: "_updateState", + // value: function(t) { + // var e = this; + // r.isObject(t) && r.extend(this._state, t), this._onStateChange(), r.each(this.instances, function(t) { + // e[t]._onStateChange() + // }) + // } + // }, { + // key: "_onStateChange", + // value: function() { + // var t = this; + // this._isReady() && this._queue && 0 < this._queue.length && (r.each(this._queue, function(e) { + // t[e[0]].apply(t, l.call(e[1])) + // }), this._queue = []) + // } + // }, { + // key: "_hasDisabled", + // value: function() { + // var t = !this.enabled || this.isOptOut; + // return t && m.info("ThinkingData is Pause or Stop!"), t + // } + // }, { + // key: "_sendRequest", + // value: function(t, e, o) { + // var n, a, i; + // this._hasDisabled() || (r.isUndefined(this.config.disableEventList) || !this.config.disableEventList.includes(t.eventName) ? (e = r.isDate(e) ? e : new Date, n = { + // data: [{ + // "#type": t.type, + // "#time": r.formatDate(e), + // "#distinct_id": this.store.getDistinctId() + // }] + // }, this.store.getAccountId() && (n.data[0]["#account_id"] = this.store.getAccountId()), "track" === t.type || "track_update" === t.type || "track_overwrite" === t.type ? (n.data[0]["#event_name"] = t.eventName, "track_update" === t.type || "track_overwrite" === t.type ? n.data[0]["#event_id"] = t.extraId : t.firstCheckId && (n.data[0]["#first_check_id"] = t.firstCheckId), n.data[0].properties = r.extend({ + // "#zone_offset": 0 - e.getTimezoneOffset() / 60 + // }, E.properties, this.autoTrackProperties, this.store.getSuperProperties(), this.dynamicProperties ? this.dynamicProperties() : {}), e = this.store.removeEventTimer(t.eventName), r.isUndefined(e) || (a = (new Date).getTime() - e, 86400 < (i = parseFloat((a / 1e3).toFixed(3))) ? i = 86400 : i < 0 && (i = 0), n.data[0].properties["#duration"] = i)) : n.data[0].properties = {}, r.isObject(t.properties) && !r.isEmptyObject(t.properties) && r.extend(n.data[0].properties, t.properties), r.searchObjDate(n.data[0]), 1 < this.config.maxRetries && (n.data[0]["#uuid"] = r.UUIDv4()), n["#app_id"] = this.appId, m.info(JSON.stringify(n, null, 4)), a = "debug" === this.config.debugMode || "debugOnly" === this.config.debugMode ? this.serverDebugUrl : this.serverUrl, r.isBoolean(this.config.enableEncrypt) && 1 == this.config.enableEncrypt && (n.data[0] = r.generateEncryptyData(n.data[0], this.config.secretKey)), o ? (i = new FormData, "debug" === this.config.debugMode || "debugOnly" === this.config.debugMode ? (i.append("source", "client"), i.append("appid", this.appId), i.append("dryRun", "debugOnly" === this.config.debugMode ? 1 : 0), i.append("deviceId", this.getDeviceId()), i.append("data", JSON.stringify(n.data[0]))) : (o = r.base64Encode(JSON.stringify(n)), i.append("data", o)), navigator.sendBeacon(a, i), r.isFunction(t.onComplete) && t.onComplete({ + // statusCode: 200 + // })) : O.enqueue(n, a, { + // maxRetries: this.config.maxRetries, + // sendTimeout: this.config.sendTimeout, + // callback: t.onComplete, + // debugMode: this.config.debugMode, + // deviceId: this.getDeviceId() + // })) : m.info("disabled Event : " + t.eventName)) + // } + // }, { + // key: "_isObjectParams", + // value: function(t) { + // return r.isObject(t) && r.isFunction(t.onComplete) + // } + // }, { + // key: "track", + // value: function(t, e, o, n) { + // var a; + // this._hasDisabled() || (this._isObjectParams(t) && (t = (a = t).eventName, e = a.properties, o = a.time, n = a.onComplete), D.event(t) && D.properties(e) || !this.config.strict ? this._internalTrack(t, e, o, n) : r.isFunction(n) && n({ + // code: -1, + // msg: "invalid parameters" + // })) + // } + // }, { + // key: "trackUpdate", + // value: function(t) { + // var e; + // this._hasDisabled() || (t && t.eventId && (D.event(t.eventName) && D.properties(t.properties) || !this.config.strict) ? (e = r.isDate(t.time) ? t.time : new Date, this._isReady() ? this._sendRequest({ + // type: "track_update", + // eventName: t.eventName, + // properties: t.properties, + // onComplete: t.onComplete, + // extraId: t.eventId + // }, e) : (t.time = e, this._queue.push(["trackUpdate", [t]]))) : (m.warn("Invalide parameter for trackUpdate: you should pass an object contains eventId to trackUpdate()"), r.isFunction(t.onComplete) && t.onComplete({ + // code: -1, + // msg: "invalid parameters" + // }))) + // } + // }, { + // key: "trackOverwrite", + // value: function(t) { + // var e; + // this._hasDisabled() || (t && t.eventId && (D.event(t.eventName) && D.properties(t.properties) || !this.config.strict) ? (e = r.isDate(t.time) ? t.time : new Date, this._isReady() ? this._sendRequest({ + // type: "track_overwrite", + // eventName: t.eventName, + // properties: t.properties, + // onComplete: t.onComplete, + // extraId: t.eventId + // }, e) : (t.time = e, this._queue.push(["trackOverwrite", [t]]))) : (m.warn("Invalide parameter for trackOverwrite: you should pass an object contains eventId to trackOverwrite()"), r.isFunction(t.onComplete) && t.onComplete({ + // code: -1, + // msg: "invalid parameters" + // }))) + // } + // }, { + // key: "trackFirstEvent", + // value: function(t) { + // var e; + // this._hasDisabled() || (t && t.eventName && (D.event(t.eventName) && D.properties(t.properties) || !this.config.strict) ? (e = r.isDate(t.time) ? t.time : new Date, this._isReady() ? this._sendRequest({ + // type: "track", + // eventName: t.eventName, + // properties: t.properties, + // onComplete: t.onComplete, + // firstCheckId: t.firstCheckId || this.getDeviceId() + // }, e) : (t.time = e, this._queue.push(["trackFirstEvent", [t]]))) : (m.warn("Invalide parameter for trackFirstEvent: you should pass an object contains eventName to trackFirstEvent()"), r.isFunction(t.onComplete) && t.onComplete({ + // code: -1, + // msg: "invalid parameters" + // }))) + // } + // }, { + // key: "_internalTrack", + // value: function(t, e, o, n, a) { + // this._hasDisabled() || (o = r.isDate(o) ? o : new Date, this._isReady() ? this._sendRequest({ + // type: "track", + // eventName: t, + // properties: e, + // onComplete: n + // }, o, a) : this._queue.push(["_internalTrack", [t, e, o, n]])) + // } + // }, { + // key: "userSet", + // value: function(t, e, o) { + // var n; + // this._hasDisabled() || (this._isObjectParams(t) && (t = (n = t).properties, e = n.time, o = n.onComplete), D.propertiesMust(t) || !this.config.strict ? (e = r.isDate(e) ? e : new Date, this._isReady() ? this._sendRequest({ + // type: "user_set", + // properties: t, + // onComplete: o + // }, e) : this._queue.push(["userSet", [t, e, o]])) : (m.warn("calling userSet failed due to invalid arguments"), r.isFunction(o) && o({ + // code: -1, + // msg: "invalid parameters" + // }))) + // } + // }, { + // key: "userSetOnce", + // value: function(t, e, o) { + // var n; + // this._hasDisabled() || (this._isObjectParams(t) && (t = (n = t).properties, e = n.time, o = n.onComplete), D.propertiesMust(t) || !this.config.strict ? (e = r.isDate(e) ? e : new Date, this._isReady() ? this._sendRequest({ + // type: "user_setOnce", + // properties: t, + // onComplete: o + // }, e) : this._queue.push(["userSetOnce", [t, e, o]])) : (m.warn("calling userSetOnce failed due to invalid arguments"), r.isFunction(o) && o({ + // code: -1, + // msg: "invalid parameters" + // }))) + // } + // }, { + // key: "userUnset", + // value: function(t, e, o) { + // var n; + // this._hasDisabled() || (this._isObjectParams(n) && (t = n.property, e = n.time, o = n.onComplete), D.propertyName(t) || !this.config.strict ? (e = r.isDate(e) ? e : new Date, this._isReady() ? ((n = {})[t] = 0, this._sendRequest({ + // type: "user_unset", + // properties: n, + // onComplete: o + // }, e)) : this._queue.push(["userUnset", [t, o, e]])) : (m.warn("calling userUnset failed due to invalid arguments"), r.isFunction(o) && o({ + // code: -1, + // msg: "invalid parameters" + // }))) + // } + // }, { + // key: "userDel", + // value: function(t, e) { + // var o; + // this._hasDisabled() || (this._isObjectParams(t) && (t = (o = t).time, e = o.onComplete), t = r.isDate(t) ? t : new Date, this._isReady() ? this._sendRequest({ + // type: "user_del", + // onComplete: e + // }, t) : this._queue.push(["userDel", [t, e]])) + // } + // }, { + // key: "userAdd", + // value: function(t, e, o) { + // var n; + // this._hasDisabled() || (this._isObjectParams(t) && (t = (n = t).properties, e = n.time, o = n.onComplete), D.userAddProperties(t) || !this.config.strict ? (e = r.isDate(e) ? e : new Date, this._isReady() ? this._sendRequest({ + // type: "user_add", + // properties: t, + // onComplete: o + // }, e) : this._queue.push(["userAdd", [t, e, o]])) : (m.warn("calling userAdd failed due to invalid arguments"), r.isFunction(o) && o({ + // code: -1, + // msg: "invalid parameters" + // }))) + // } + // }, { + // key: "userAppend", + // value: function(t, e, o) { + // var n; + // this._hasDisabled() || (this._isObjectParams(t) && (t = (n = t).properties, e = n.time, o = n.onComplete), D.userAppendProperties(t) || !this.config.strict ? (e = r.isDate(e) ? e : new Date, this._isReady() ? this._sendRequest({ + // type: "user_append", + // properties: t, + // onComplete: o + // }, e) : this._queue.push(["userAppend", [t, e, o]])) : (m.warn("calling userAppend failed due to invalid arguments"), r.isFunction(o) && o({ + // code: -1, + // msg: "invalid parameters" + // }))) + // } + // }, { + // key: "userUniqAppend", + // value: function(t, e, o) { + // var n; + // this._hasDisabled() || (this._isObjectParams(t) && (t = (n = t).properties, e = n.time, o = n.onComplete), D.userAppendProperties(t) || !this.config.strict ? (e = r.isDate(e) ? e : new Date, this._isReady() ? this._sendRequest({ + // type: "user_uniq_append", + // properties: t, + // onComplete: o + // }, e) : this._queue.push(["userUniqAppend", [t, e, o]])) : (m.warn("calling userAppend failed due to invalid arguments"), r.isFunction(o) && o({ + // code: -1, + // msg: "invalid parameters" + // }))) + // } + // }, { + // key: "authorizeOpenID", + // value: function(t) { + // this.identify(t) + // } + // }, { + // key: "identify", + // value: function(t) { + // if (!this._hasDisabled()) { + // if ("number" == typeof t) t = String(t); + // else if ("string" != typeof t) return !1; + // this.store.setDistinctId(t) + // } + // } + // }, { + // key: "getDistinctId", + // value: function() { + // return this.store.getDistinctId() + // } + // }, { + // key: "login", + // value: function(t) { + // if (!this._hasDisabled()) { + // if ("number" == typeof t) t = String(t); + // else if ("string" != typeof t) return !1; + // this.store.setAccountId(t) + // } + // } + // }, { + // key: "getAccountId", + // value: function() { + // return this.store.getAccountId() + // } + // }, { + // key: "logout", + // value: function() { + // this._hasDisabled() || this.store.setAccountId(null) + // } + // }, { + // key: "setSuperProperties", + // value: function(t) { + // this._hasDisabled() || (D.propertiesMust(t) || !this.config.strict ? this.store.setSuperProperties(t) : m.warn("setSuperProperties parameter must be a valid property value")) + // } + // }, { + // key: "clearSuperProperties", + // value: function() { + // this._hasDisabled() || this.store.setSuperProperties({}, !0) + // } + // }, { + // key: "unsetSuperProperty", + // value: function(t) { + // var e; + // this._hasDisabled() || r.isString(t) && (delete(e = this.getSuperProperties())[t], this.store.setSuperProperties(e, !0)) + // } + // }, { + // key: "getSuperProperties", + // value: function() { + // return this.store.getSuperProperties() + // } + // }, { + // key: "getPresetProperties", + // value: function() { + // var t = E.properties, + // e = {}, + // o = t["#os"]; + // e.os = r.isUndefined(o) ? "" : o, o = t["#screen_width"], e.screenWidth = r.isUndefined(o) ? 0 : o, o = t["#screen_height"], e.screenHeight = r.isUndefined(o) ? 0 : o, o = t["#network_type"], e.networkType = r.isUndefined(o) ? "" : o, o = t["#device_model"], e.deviceModel = r.isUndefined(o) ? "" : o, o = t["#os_version"], e.osVersion = r.isUndefined(o) ? "" : o, e.deviceId = this.getDeviceId(); + // var n = 0 - (new Date).getTimezoneOffset() / 60; + // return e.zoneOffset = n, t = t["#manufacturer"], e.manufacturer = r.isUndefined(t) ? "" : t, e.toEventPresetProperties = function() { + // return { + // "#device_model": e.deviceModel, + // "#device_id": e.deviceId, + // "#screen_width": e.screenWidth, + // "#screen_height": e.screenHeight, + // "#os": e.os, + // "#os_version": e.osVersion, + // "#network_type": e.networkType, + // "#zone_offset": n, + // "#manufacturer": e.manufacturer + // } + // }, e + // } + // }, { + // key: "setDynamicSuperProperties", + // value: function(t) { + // this._hasDisabled() || ("function" == typeof t ? D.properties(t()) || !this.config.strict ? this.dynamicProperties = t : m.warn("A dynamic public property must return a valid property value") : m.warn("setDynamicSuperProperties parameter must be a function type")) + // } + // }, { + // key: "timeEvent", + // value: function(t, e) { + // this._hasDisabled() || (e = r.isDate(e) ? e : new Date, this._isReady() ? D.event(t) || !this.config.strict ? this.store.setEventTimer(t, e.getTime()) : m.warn("calling timeEvent failed due to invalid eventName: " + t) : this._queue.push(["timeEvent", [t, e]])) + // } + // }, { + // key: "getDeviceId", + // value: function() { + // return E.properties["#device_id"] + // } + // }, { + // key: "enableTracking", + // value: function(t) { + // this.enabled = t, this.store._set("ta_enabled", t) + // } + // }, { + // key: "optOutTracking", + // value: function() { + // this.store.setSuperProperties({}, !0), this.store.setDistinctId(r.UUID()), this.store.setAccountId(null), this._queue.splice(0, this._queue.length), this.isOptOut = !0, this.store._set("ta_isOptOut", !0) + // } + // }, { + // key: "optOutTrackingAndDeleteUser", + // value: function() { + // var t = new Date; + // this._sendRequest({ + // type: "user_del" + // }, t), this.optOutTracking() + // } + // }, { + // key: "optInTracking", + // value: function() { + // this.isOptOut = !1, this.store._set("ta_isOptOut", !1) + // } + // }, { + // key: "setTrackStatus", + // value: function(t) { + // switch (t) { + // case "PAUSE": + // this.eventSaveOnly = !1, this.optInTracking(), this.enableTracking(!1); + // break; + // case "STOP": + // this.eventSaveOnly = !1, this.optOutTracking(!0); + // break; + // case "SAVE_ONLY": + // case "NORMAL": + // default: + // this.eventSaveOnly = !1, this.optInTracking(), this.enableTracking(!0) + // } + // } + // }]), t + // }(), + B = { + name: "thinkingdata", + enableLog: !0, + enableNative: !1 + }, + R = function() { + function t(e) { + n(this, t), e.appId = e.appId ? r.checkAppId(e.appId) : r.checkAppId(e.appid), e.serverUrl = e.serverUrl ? r.checkUrl(e.serverUrl) : r.checkUrl(e.server_url); + var o = r.extend({}, B, k.getConfig()); + r.isObject(e) ? this.config = r.extend(o, e) : this.config = o, this._init(this.config) + } + return i(t, [{ + key: "_isNativePlatform", + value: function() { + return !(!this._isIOS() && !this._isAndroid() || !this.config.enableNative) + } + }, { + key: "_isIOS", + value: function() { + return !(!cc.sys.isNative || "iOS" !== cc.sys.os) + } + }, { + key: "_isAndroid", + value: function() { + return !(!cc.sys.isNative || "Android" !== cc.sys.os) + } + }, { + key: "_init", + value: function(t) { + this.name = t.name, this.appId = t.appId || t.appid, this._isNativePlatform() ? (this.initInstanceForNative(this.name, t, this.appId), this._readStorage(t)) : this.taJs = new ThinkingAnalyticsAPIForJS(t) + } + }, { + key: "_readStorage", + value: function(t) { + var e = this, + o = t.persistenceName, + n = t.persistenceNameOld; + t.isChildInstance && (o = t.persistenceName + "_" + t.name, n = t.persistenceNameOld + "_" + t.name), this._state = k.getStorage(o) || {}, r.isEmptyObject(this._state) && (this._state = k.getStorage(n) || {}), r.isEmptyObject(this._state) ? k.getStorage(o, !0, function(t) { + r.isEmptyObject(t) ? k.getStorage(n, !0, function(t) { + e._state = r.extend2Layers({}, t, e._state) + }) : e._state = r.extend2Layers({}, t, e._state), e._state.distinct_id && e.identifyForNative(e._state.distinct_id), e._state.account_id && e.loginForNative(e._state.account_id) + }) : (this._state.distinct_id && this.identifyForNative(this._state.distinct_id), this._state.account_id && this.loginForNative(this._state.account_id)) + } + }, { + key: "initInstance", + value: function(t, e) { + return this._isNativePlatform() ? r.isUndefined(e) ? this[t] = new ThinkingAnalyticsAPI(this.config) : this[t] = new ThinkingAnalyticsAPI(e) : this[t] = this.taJs.initInstance(t, e), this[t] + } + }, { + key: "lightInstance", + value: function(t) { + return this[t] + } + }, { + key: "init", + value: function() { + if (this._isNativePlatform()) { + var t = window, + e = this; + return t.__autoTrackCallback = function(t) { + return r.isFunction(e.config.autoTrack.callback) ? (t = e.config.autoTrack.callback(t), JSON.stringify(t)) : "{}" + }, void this.startThinkingAnalyticsForNative() + } + this.taJs.init() + } + }, { + key: "track", + value: function(t, e, o, n) { + this._isNativePlatform() ? this.trackForNative(t, e, o, this.appId) : this.taJs.track(t, e, o, n) + } + }, { + key: "trackUpdate", + value: function(t) { + this._isNativePlatform() ? this.trackUpdateForNative(t, this.appId) : this.taJs.trackUpdate(t) + } + }, { + key: "trackOverwrite", + value: function(t) { + this._isNativePlatform() ? this.trackOverwriteForNative(t, this.appId) : this.taJs.trackOverwrite(t) + } + }, { + key: "trackFirstEvent", + value: function(t) { + this._isNativePlatform() ? this.trackFirstEventForNative(t, this.appId) : this.taJs.trackFirstEvent(t) + } + }, { + key: "userSet", + value: function(t, e, o) { + this._isNativePlatform() ? this.userSetForNative(t, this.appId) : this.taJs.userSet(t, e, o) + } + }, { + key: "userSetOnce", + value: function(t, e, o) { + this._isNativePlatform() ? this.userSetOnceForNative(t, this.appId) : this.taJs.userSetOnce(t, e, o) + } + }, { + key: "userUnset", + value: function(t, e, o) { + this._isNativePlatform() ? this.userUnsetForNative(t, this.appId) : this.taJs.userUnset(t, e, o) + } + }, { + key: "userDel", + value: function(t, e) { + this._isNativePlatform() ? this.userDelForNative(this.appId) : this.taJs.userDel(t, e) + } + }, { + key: "userAdd", + value: function(t, e, o) { + this._isNativePlatform() ? this.userAddForNative(t, this.appId) : this.taJs.userAdd(t, e, o) + } + }, { + key: "userAppend", + value: function(t, e, o) { + this._isNativePlatform() ? this.userAppendForNative(t, this.appId) : this.taJs.userAppend(t, e, o) + } + }, { + key: "userUniqAppend", + value: function(t, e, o) { + this._isNativePlatform() ? this.userUniqAppendForNative(t, this.appId) : this.taJs.userUniqAppend(t, e, o) + } + }, { + key: "authorizeOpenID", + value: function(t) { + this.identify(t) + } + }, { + key: "identify", + value: function(t) { + this._isNativePlatform() ? this.identifyForNative(t, this.appId) : this.taJs.identify(t) + } + }, { + key: "getDistinctId", + value: function() { + return this._isNativePlatform() ? this.getDistinctIdForNative(this.appId) : this.taJs.getDistinctId() + } + }, { + key: "login", + value: function(t) { + this._isNativePlatform() ? this.loginForNative(t, this.appId) : this.taJs.login(t) + } + }, { + key: "getAccountId", + value: function() { + return this._isNativePlatform() ? this.getAccountIdForNative(this.appId) : this.taJs.getAccountId() + } + }, { + key: "logout", + value: function() { + this._isNativePlatform() ? this.logoutForNative(this.appId) : this.taJs.logout() + } + }, { + key: "setSuperProperties", + value: function(t) { + this._isNativePlatform() ? this.setSuperPropertiesForNative(t, this.appId) : this.taJs.setSuperProperties(t) + } + }, { + key: "clearSuperProperties", + value: function() { + this._isNativePlatform() ? this.clearSuperPropertiesForNative(this.appId) : this.taJs.clearSuperProperties() + } + }, { + key: "unsetSuperProperty", + value: function(t) { + this._isNativePlatform() ? this.unsetSuperPropertyForNative(t, this.appId) : this.taJs.unsetSuperProperty(t) + } + }, { + key: "getSuperProperties", + value: function() { + return this._isNativePlatform() ? this.getSuperPropertiesForNative(this.appId) : this.taJs.getSuperProperties() + } + }, { + key: "getPresetProperties", + value: function() { + if (this._isNativePlatform()) { + var t = this.getPresetPropertiesForNative(this.appId), + e = {}, + o = t["#os"]; + e.os = r.isUndefined(o) ? "" : o, o = t["#screen_width"], e.screenWidth = r.isUndefined(o) ? 0 : o, o = t["#screen_height"], e.screenHeight = r.isUndefined(o) ? 0 : o, o = t["#network_type"], e.networkType = r.isUndefined(o) ? "" : o, o = t["#device_model"], e.deviceModel = r.isUndefined(o) ? "" : o, o = t["#os_version"], e.osVersion = r.isUndefined(o) ? "" : o, e.deviceId = this.getDeviceId(); + var n = 0 - (new Date).getTimezoneOffset() / 60; + return e.zoneOffset = n, t = t["#manufacturer"], e.manufacturer = r.isUndefined(t) ? "" : t, e.toEventPresetProperties = function() { + return { + "#device_model": e.deviceModel, + "#device_id": e.deviceId, + "#screen_width": e.screenWidth, + "#screen_height": e.screenHeight, + "#os": e.os, + "#os_version": e.osVersion, + "#network_type": e.networkType, + "#zone_offset": n, + "#manufacturer": e.manufacturer + } + }, e + } + return this.taJs.getPresetProperties() + } + }, { + key: "setDynamicSuperProperties", + value: function(t) { + this._isNativePlatform() ? "function" == typeof t ? (this.dynamicProperties = t, window.__dynamicPropertiesForNative = function(e) { + return console.log("__dynamicPropertiesForNative: native msg: ", e), e = t(), e = r.encodeDates(e), JSON.stringify(e) + }, this.setDynamicSuperPropertiesForNative("__dynamicPropertiesForNative")) : logger.warn("setDynamicSuperProperties parameter must be a function type") : this.taJs.setDynamicSuperProperties(t) + } + }, { + key: "timeEvent", + value: function(t, e) { + return this._isNativePlatform() ? this.timeEventForNative(t, this.appId) : this.taJs.timeEvent(t, e) + } + }, { + key: "getDeviceId", + value: function() { + return this._isNativePlatform() ? this.getDeviceIdForNative(this.appId) : this.taJs.getDeviceId() + } + }, { + key: "enableTracking", + value: function(t) { + this._isNativePlatform() ? this.enableTrackingForNative(t, this.appId) : this.taJs.enableTracking(t) + } + }, { + key: "optOutTracking", + value: function() { + this._isNativePlatform() ? this.optOutTrackingForNative(this.appId) : this.taJs.optOutTracking() + } + }, { + key: "optOutTrackingAndDeleteUser", + value: function() { + this._isNativePlatform() ? this.optOutTrackingAndDeleteUserForNative(this.appId) : this.taJs.optOutTrackingAndDeleteUser() + } + }, { + key: "optInTracking", + value: function() { + this._isNativePlatform() ? this.optInTrackingForNative(this.appId) : this.taJs.optInTracking() + } + }, { + key: "setTrackStatus", + value: function(t) { + this._isNativePlatform() ? this.setTrackStatusForNative(t, this.appId) : this.taJs.setTrackStatus(t) + } + }, { + key: "trackForNative", + value: function(t, e, o, n) { + o = r.isDate(o) ? r.formatDate(o) : "", r.isUndefined(e) && (e = {}), e = r.extend(e, this.dynamicProperties ? this.dynamicProperties() : {}), e = r.encodeDates(e), this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "track", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", t, JSON.stringify(e), o, n) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "track:properties:time:appId:", t, JSON.stringify(e), o, n) + } + }, { + key: "trackUpdateForNative", + value: function(t, e) { + t.properties = r.extend(r.isUndefined(t.properties) ? {} : t.properties, this.dynamicProperties ? this.dynamicProperties() : {}), t = r.encodeDates(t), this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "trackUpdate", "(Ljava/lang/String;Ljava/lang/String;)V", JSON.stringify(t), e) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "trackUpdate:appId:", JSON.stringify(t), e) + } + }, { + key: "trackFirstEventForNative", + value: function(t, e) { + t.properties = r.extend(r.isUndefined(t.properties) ? {} : t.properties, this.dynamicProperties ? this.dynamicProperties() : {}), t = r.encodeDates(t), this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "trackFirstEvent", "(Ljava/lang/String;Ljava/lang/String;)V", JSON.stringify(t), e) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "trackFirstEvent:appId:", JSON.stringify(t), e) + } + }, { + key: "trackOverwriteForNative", + value: function(t, e) { + t.properties = r.extend(r.isUndefined(t.properties) ? {} : t.properties, this.dynamicProperties ? this.dynamicProperties() : {}), t = r.encodeDates(t), this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "trackOverwrite", "(Ljava/lang/String;Ljava/lang/String;)V", JSON.stringify(t), e) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "trackOverwrite:appId:", JSON.stringify(t), e) + } + }, { + key: "timeEventForNative", + value: function(t, e) { + this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "timeEvent", "(Ljava/lang/String;Ljava/lang/String;)V", t, e) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "timeEvent:appId:", t, e) + } + }, { + key: "loginForNative", + value: function(t, e) { + this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "login", "(Ljava/lang/String;Ljava/lang/String;)V", t, e) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "login:appId:", t, e) + } + }, { + key: "logoutForNative", + value: function(t) { + this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "logout", "(Ljava/lang/String;)V", t) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "logout:", t) + } + }, { + key: "setSuperPropertiesForNative", + value: function(t, e) { + t = r.encodeDates(t), this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "setSuperProperties", "(Ljava/lang/String;Ljava/lang/String;)V", JSON.stringify(t), e) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "setSuperProperties:appId:", JSON.stringify(t), e) + } + }, { + key: "getSuperPropertiesForNative", + value: function(t) { + var e = "{}"; + return this._isAndroid() ? e = jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "getSuperProperties", "(Ljava/lang/String;)V", t) : this._isIOS() && (e = jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "getSuperProperties:", t)), JSON.parse(e) + } + }, { + key: "unsetSuperPropertyForNative", + value: function(t, e) { + this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "unsetSuperProperty", "(Ljava/lang/String;Ljava/lang/String;)V", t, e) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "unsetSuperProperty:appId:", t, e) + } + }, { + key: "clearSuperPropertiesForNative", + value: function(t) { + this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "clearSuperProperties", "(Ljava/lang/String;)V", t) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "clearSuperProperties:", t) + } + }, { + key: "userSetForNative", + value: function(t, e) { + t = r.encodeDates(t), this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "userSet", "(Ljava/lang/String;Ljava/lang/String;)V", JSON.stringify(t), e) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "userSet:appId:", JSON.stringify(t), e) + } + }, { + key: "userSetOnceForNative", + value: function(t, e) { + t = r.encodeDates(t), this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "userSetOnce", "(Ljava/lang/String;Ljava/lang/String;)V", JSON.stringify(t), e) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "userSetOnce:appId:", JSON.stringify(t), e) + } + }, { + key: "userAppendForNative", + value: function(t, e) { + t = r.encodeDates(t), this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "userAppend", "(Ljava/lang/String;Ljava/lang/String;)V", JSON.stringify(t), e) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "userAppend:appId:", JSON.stringify(t), e) + } + }, { + key: "userUniqAppendForNative", + value: function(t, e) { + t = r.encodeDates(t), this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "userUniqAppend", "(Ljava/lang/String;Ljava/lang/String;)V", JSON.stringify(t), e) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "userUniqAppend:appId:", JSON.stringify(t), e) + } + }, { + key: "userAddForNative", + value: function(t, e) { + t = r.encodeDates(t), this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "userAdd", "(Ljava/lang/String;Ljava/lang/String;)V", JSON.stringify(t), e) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "userAdd:appId:", JSON.stringify(t), e) + } + }, { + key: "userUnsetForNative", + value: function(t, e) { + this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "userUnset", "(Ljava/lang/String;Ljava/lang/String;)V", t, e) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "userUnset:appId:", t, e) + } + }, { + key: "userDelForNative", + value: function(t) { + this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "userDel", "(Ljava/lang/String;)V", t) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "userDel:", t) + } + }, { + key: "authorizeOpenIDForNative", + value: function(t, e) { + this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "authorizeOpenID", "(Ljava/lang/String;Ljava/lang/String;)V", t, e) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "authorizeOpenID:appId:", t, e) + } + }, { + key: "identifyForNative", + value: function(t, e) { + this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "identify", "(Ljava/lang/String;Ljava/lang/String;)V", t, e) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "identify:appId:", t, e) + } + }, { + key: "initInstanceForNative", + value: function(t, e, o) { + this._isAndroid() ? (jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "setCustomerLibInfo", "(Ljava/lang/String;Ljava/lang/String;)V", "MG", "2.1.0"), r.isUndefined(e) ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "initInstanceAppId", "(Ljava/lang/String;Ljava/lang/String;)V", t, o) : jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "initInstanceConfig", "(Ljava/lang/String;Ljava/lang/String;)V", t, JSON.stringify(e))) : this._isIOS() && (jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "setCustomerLibInfoWithLibName:libVersion:", "MG", "2.1.0"), r.isUndefined(e) ? jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "initInstance:appId:", t, o) : jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "initInstance:config:", t, JSON.stringify(e))) + } + }, { + key: "lightInstanceForNative", + value: function(t, e) { + return this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "lightInstance", "(Ljava/lang/String;Ljava/lang/String;)V", t, e) : this._isIOS() ? jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "lightInstance:appId:", t, e) : void 0 + } + }, { + key: "startThinkingAnalyticsForNative", + value: function(t) { + this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "startThinkingAnalytics", "(Ljava/lang/String;)V", t) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "startThinkingAnalytics:", t) + } + }, { + key: "setDynamicSuperPropertiesForNative", + value: function(t, e) { + this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "setDynamicSuperProperties", "(Ljava/lang/String;Ljava/lang/String;)V", t, e) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "setDynamicSuperProperties:appId:", t, e) + } + }, { + key: "getDeviceIdForNative", + value: function(t) { + return this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "getDeviceId", "(Ljava/lang/String;)Ljava/lang/String;", t) : this._isIOS() ? jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "getDeviceId:", t) : void 0 + } + }, { + key: "getDistinctIdForNative", + value: function(t) { + return this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "getDistinctId", "(Ljava/lang/String;)Ljava/lang/String;", t) : this._isIOS() ? jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "getDistinctId:", t) : void 0 + } + }, { + key: "getAccountIdForNative", + value: function(t) { + return this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "getAccountId", "(Ljava/lang/String;)Ljava/lang/String;", t) : this._isIOS() ? jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "getAccountId:", t) : void 0 + } + }, { + key: "getPresetPropertiesForNative", + value: function(t) { + var e = "{}"; + return this._isAndroid() ? e = jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "getPresetProperties", "(Ljava/lang/String;)Ljava/lang/String;", t) : this._isIOS() && (e = jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "getPresetProperties:", t)), JSON.parse(e) + } + }, { + key: "enableTrackingForNative", + value: function(t, e) { + this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "enableTracking", "(Ljava/lang/String;Ljava/lang/String;)V", t.toString(), e) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "enableTracking:appId:", t.toString(), e) + } + }, { + key: "optOutTrackingForNative", + value: function(t) { + this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "optOutTracking", "(Ljava/lang/String;)V", t) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "optOutTracking:", t) + } + }, { + key: "optOutTrackingAndDeleteUserForNative", + value: function(t) { + this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "optOutTrackingAndDeleteUser", "(Ljava/lang/String;)V", t) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "optOutTrackingAndDeleteUser:", t) + } + }, { + key: "optInTrackingForNative", + value: function(t) { + this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "optInTracking", "(Ljava/lang/String;)V", t) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "optInTracking:", t) + } + }, { + key: "setTrackStatusForNative", + value: function(t, e) { + this._isAndroid() ? jsb.reflection.callStaticMethod("com/cocos/game/CocosCreatorProxyApi", "setTrackStatus", "(Ljava/lang/String;Ljava/lang/String;)V", t, e) : this._isIOS() && jsb.reflection.callStaticMethod("CocosCreatorProxyApi", "setTrackStatus:appId:", t, e) + } + }]), t + }(); + window.ThinkingAnalyticsAPI = R, window.ThinkingAnalyticsAPIForJS = M, cc._RF.pop() + }, {} + ], + topUiLayer: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "66108Xuwc1FDr3Qf3OyCrBI", "topUiLayer"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../pre/main/flying-item-pop-coin"), + c = t("../activity/main/main-cookie-reward"), + s = t("../common/dataTs"), + l = t("../common/enumConfig"), + u = t("../manager/GameManager"), + p = cc._decorator, + d = p.ccclass, + h = p.property, + f = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.coinNumLabel = null, e.flyCoinNode = null, e.topCoinNode = null, e.cookieReward = null, e.moneyData = null, e + } + return a(e, t), e.prototype.start = function() { + cc.game.on(l.EMITKEY.MAINUPDATEUI, this.setMainLayerData, this), this.setMainLayerData() + }, e.prototype.setMainLayerData = function() { + console.log("topUiLayer MAINUPDATEUI"); + var t = s.default.getUserData(); + u.default.getInstance().moneyDict, u.default.getInstance().cookieDict, this.coinNumLabel.string = t.coin + "", this.checkCoinOrFish() + }, e.prototype.getFlyTime = function(t, e, o) { + var n = o; + return Math.sqrt((n.x - e.x) * (n.x - e.x) + (n.y - e.y) * (n.y - e.y)) / t + }, e.prototype.updatenNumberAnim = function(t, e, o) { + var n = { + num: e + }, + a = t.getComponent(cc.Label); + a.string = n.num + "", console.log((o - e) / 10); + var i = o - e < 10 ? .3 : (o - e) / 10 * .3; + i > 1 && (i = 1), cc.tween(n).to(i, { + num: o + }, { + progress: function(t, e, o, n) { + return a.string = Math.ceil(t + (e - t) * n) + "", t + (e - t) * n + } + }).start() + }, e.prototype.checkCoinOrFish = function() { + console.log("checkCoinOrFish moneyDict", u.default.getInstance().moneyDict), console.log("checkCoinOrFish cookieDict", u.default.getInstance().cookieDict), this.moneyData = u.default.getInstance().moneyDict; + var t = this.moneyData.coin, + e = (this.moneyData.fish, u.default.getInstance().cookieDict.cookie), + o = s.default.getUserData(); + this.coinNumLabel.string = o.coin - t + "", t > 0 ? this.flyCoinFunc() : e > 0 && this.flyCookieFunc() + }, e.prototype.flyCoinFunc = function() { + console.log("flyCoinFunc"), cc.game.emit(l.EMITKEY.SHOWMASKLAYER, 7); + var t = this, + e = { + firstCallBack: function() { + console.log("金币开始飞行"); + var e = u.default.getInstance().moneyDict.coin, + o = s.default.getUserData(); + t.updatenNumberAnim(t.coinNumLabel.node, o.coin - e, o.coin) + }, + callBack: function() { + console.log("金币飞行结束"), u.default.getInstance().moneyDict.coin = 0, t.flyCoinNode.active = !1, cc.game.emit(l.EMITKEY.HIDEMASKLAYER, 12), u.default.getInstance().cookieDict.cookie > 0 && t.flyCookieFunc() + } + }; + this.flyCoinNode.active = !0, this.flyCoinNode.getComponent(r.default).flyTo(this.topCoinNode, e) + }, e.prototype.flyCookieFunc = function() { + s.default.getUserData().playLevelId < 17 || (console.log("flyCookieFunc"), cc.game.emit(l.EMITKEY.SHOWMASKLAYER, 7), this.cookieReward.getComponent(c.default).checkCookie(function() { + cc.game.emit(l.EMITKEY.HIDEMASKLAYER, 12), console.log("获取饼干动画完毕 ###") + })) + }, e.prototype.getWorldPosition = function(t) { + return t.convertToWorldSpaceAR(cc.v2(0, 0)) + }, e.prototype.getNodePosition = function(t, e) { + return t.convertToNodeSpaceAR(e) + }, i([h(cc.Label)], e.prototype, "coinNumLabel", void 0), i([h(cc.Node)], e.prototype, "flyCoinNode", void 0), i([h(cc.Node)], e.prototype, "topCoinNode", void 0), i([h(cc.Node)], e.prototype, "cookieReward", void 0), i([d], e) + }(cc.Component); + o.default = f, cc._RF.pop() + }, { + "../../pre/main/flying-item-pop-coin": "flying-item-pop-coin", + "../activity/main/main-cookie-reward": "main-cookie-reward", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../manager/GameManager": "GameManager" + } + ], + "topic-card-node": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "1be56R1zVlJqa9MONuCRdDg", "topic-card-node"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../../script/common/CcJsFunc"), + c = cc._decorator, + s = c.ccclass, + l = c.property, + u = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.iconHeader = null, e.purpleNode = null, e.blueNode = null, e.nickNameNode = null, e.cityNode = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.showData = function(t) { + var e = this; + t ? (this.node.stopAllActions(), this.node.active = !0, cc.tween(this.node).delay(3).call(function() { + e.node.active = !1 + }, this).start(), t.gender ? 1 == t.gender ? (this.purpleNode.active = !1, this.blueNode.active = !0) : 2 == t.gender ? (this.purpleNode.active = !0, this.blueNode.active = !1) : (this.purpleNode.active = !1, this.blueNode.active = !0) : (this.purpleNode.active = !1, this.blueNode.active = !0), t.nick_name ? this.nickNameNode.getComponent(cc.Label).string = t.nick_name : this.nickNameNode.getComponent(cc.Label).string = "", t.city ? this.cityNode.getComponent(cc.Label).string = t.city : this.cityNode.getComponent(cc.Label).string = "", r.default.setAvatar(this.iconHeader, t.avatar)) : this.node.active = !1 + }, i([l(cc.Node)], e.prototype, "iconHeader", void 0), i([l(cc.Node)], e.prototype, "purpleNode", void 0), i([l(cc.Node)], e.prototype, "blueNode", void 0), i([l(cc.Node)], e.prototype, "nickNameNode", void 0), i([l(cc.Node)], e.prototype, "cityNode", void 0), i([s], e) + }(cc.Component); + o.default = u, cc._RF.pop() + }, { + "../../../script/common/CcJsFunc": "CcJsFunc" + } + ], + "topic-header-node": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "bf959UaKZ5L25ZRO1LSyISJ", "topic-header-node"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../../script/api/api-sheep"), + c = t("../../../script/common/CcJsFunc"), + s = t("../../../script/common/dataTs"), + l = cc._decorator, + u = l.ccclass, + p = l.property, + d = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.manHeader = null, e.womanHeader = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.showData = function(t) { + var e = this; + if (this.womanHeader.opacity = 0, this.manHeader.opacity = 255, t == s.default.getUserData().userID) r.default.getTopicUserInfo(t, function(t) { + 0 == t.err_code && t.data && t.data.user && c.default.setAvatar(e.manHeader, t.data.user.avatar) + }); + else { + var o = "localHeader/header_" + c.default.randomNum(1, 200); + c.default.changeSpriteFrame(this.manHeader, o) + } + }, i([p(cc.Node)], e.prototype, "manHeader", void 0), i([p(cc.Node)], e.prototype, "womanHeader", void 0), i([u], e) + }(cc.Component); + o.default = d, cc._RF.pop() + }, { + "../../../script/api/api-sheep": "api-sheep", + "../../../script/common/CcJsFunc": "CcJsFunc", + "../../../script/common/dataTs": "dataTs" + } + ], + "topic-rank": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "e59f1N9al1CCKpf6SOs72TQ", "topic-rank"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }, + r = this && this.__awaiter || function(t, e, o, n) { + return new(o || (o = Promise))(function(a, i) { + function r(t) { + try { + s(n.next(t)) + } catch (e) { + i(e) + } + } + + function c(t) { + try { + s(n.throw(t)) + } catch (e) { + i(e) + } + } + + function s(t) { + var e; + t.done ? a(t.value) : (e = t.value, e instanceof o ? e : new o(function(t) { + t(e) + })).then(r, c) + } + s((n = n.apply(t, e || [])).next()) + }) + }, + c = this && this.__generator || function(t, e) { + var o, n, a, i, r = { + label: 0, + sent: function() { + if (1 & a[0]) throw a[1]; + return a[1] + }, + trys: [], + ops: [] + }; + return i = { + next: c(0), + throw :c(1), + return :c(2) + }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { + return this + }), i; + + function c(t) { + return function(e) { + return s([t, e]) + } + } + + function s(i) { + if (o) throw new TypeError("Generator is already executing."); + for (; r;) try { + if (o = 1, n && (a = 2 & i[0] ? n.return : i[0] ? n.throw || ((a = n.return) && a.call(n), 0) : n.next) && !(a = a.call(n, i[1])).done) return a; + switch (n = 0, a && (i = [2 & i[0], a.value]), i[0]) { + case 0: + case 1: + a = i; + break; + case 4: + return r.label++, { + value: i[1], + done: !1 + }; + case 5: + r.label++, n = i[1], i = [0]; + continue; + case 7: + i = r.ops.pop(), r.trys.pop(); + continue; + default: + if (!(a = (a = r.trys).length > 0 && a[a.length - 1]) && (6 === i[0] || 2 === i[0])) { + r = 0; + continue + } + if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { + r.label = i[1]; + break + } + if (6 === i[0] && r.label < a[1]) { + r.label = a[1], a = i; + break + } + if (a && r.label < a[2]) { + r.label = a[2], r.ops.push(i); + break + } + a[2] && r.ops.pop(), r.trys.pop(); + continue + } + i = e.call(t, r) + } catch (c) { + i = [6, c], n = 0 + } finally { + o = a = 0 + } + if (5 & i[0]) throw i[1]; + return { + value: i[0] ? i[1] : void 0, + done: !0 + } + } + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var s = t("../../api/api-sheep"), + l = t("../../common/CcJsFunc"), + u = t("../../common/dataTs"), + p = t("../../common/spine"), + d = t("../../manager/data-manager"), + h = t("../../manager/GameManager"), + f = t("../../module/ScrollMsg"), + m = t("../../../pre/module/item/topic-sheep-node"), + g = t("../../../pre/module/item/topic-header-node"), + y = t("../../../pre/module/item/topic-card-node"), + v = t("../../common/enumConfig"), + b = t("../../manager/report-common"), + _ = cc._decorator, + N = _.ccclass, + C = _.property, + w = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.topicUI = null, e.tombScrollPrefabs = null, e.tombScroll = null, e.tombScrollMsg = null, e.toaistScroll = null, e.toaistScrollMsg = null, e.BGSP = null, e.tombSP = null, e.toaistSP = null, e.spotSP = null, e.DJSP = null, e.tombDeadLabel = null, e.taoistDeadLabel = null, e.sheepNodeBase = null, e.sheepNode = null, e.cardNodePrefab = null, e.cardNode = null, e.headerNodeBase = null, e.headerNode = null, e.marginH = 0, e.boundBox = null, e.sheepArray = [], e.isMoving = !1, e.topicRankModel = null, e.userIdx = 0, e.userID = null, e.scrollToPosition = !1, e.contentY = 0, e.curSheepNode = null, e + } + return a(e, t), e.prototype.start = function() { + var t = this, + e = this; + cc.game.on(v.EMITKEY.TOPICPOSITION, this.topicPositionFunc, this), this.node.on(cc.Node.EventType.TOUCH_MOVE, function(t) { + var o = t.touch.getDelta(); + e.moveActionFunc(o.y) + }), this.node.on(cc.Node.EventType.TOUCH_END, function(t) { + var o = t.touch.getDelta(); + e.moveActionEndFunc(o.y) + }), this.tombScrollMsg = cc.instantiate(this.tombScrollPrefabs), this.tombScroll.addChild(this.tombScrollMsg), this.toaistScrollMsg = cc.instantiate(this.tombScrollPrefabs), this.toaistScroll.addChild(this.toaistScrollMsg), setTimeout(function() { + t.boundBox = cc.rect(0, 0, cc.winSize.width, cc.winSize.height) + }, 100), this.cardNode = cc.instantiate(this.cardNodePrefab), this.node.addChild(this.cardNode), this.cardNode.opacity = 0 + }, e.prototype.topicPositionFunc = function() { + var t = this; + this.node.stopAllActions(), this.scrollToPosition = !0; + var e = .3 * this.userIdx; + 0 == e && (e = .5), e >= 2 && (e = 2); + var o = this.userIdx > 4 ? 100 * (this.userIdx - 5) : 0; + cc.tween(this.node).to(e, { + y: this.contentY - o + }, { + easing: cc.easing.cubicOut + }).call(function() { + if (t.scrollToPosition = !1, t.curSheepNode) + if (1 == h.default.getInstance().game_over) h.default.getInstance().game_over = 0, t.curSheepNode.getComponent(m.default).playFlashAnimation(); + else { + var e = t.curSheepNode.getComponent(m.default).getUserID(); + s.default.getTopicUserInfo(e, function(e) { + 0 == e.err_code && e.data && e.data.user && t.showCardNode(t.curSheepNode.x, t.curSheepNode.y + 150, e.data.user) + }) + } + }, this).start() + }, e.prototype.onEnable = function() { + this.requestData() + }, e.prototype.onDisable = function() { + if (this.topicRankModel) { + var t = { + a_team_win: this.topicRankModel.tomb.length, + b_team_win: this.topicRankModel.taoist.length, + a_team_fail: this.topicRankModel.tomb_fail_member, + b_team_fail: this.topicRankModel.taoist_fail_member + }; + b.default.reportTACommon("topic_team", t) + } + }, e.prototype.requestData = function() { + return r(this, void 0, void 0, function() { + var t; + return c(this, function(e) { + switch (e.label) { + case 0: + return t = this, h.default.getInstance().game_over > 0 ? [4, s.default.getTopicData(function() {})] : [3, 2]; + case 1: + e.sent(), e.label = 2; + case 2: + return [4, s.default.topicRankInfo(function(e) { + t.topicRankModel = e.data + })]; + case 3: + return e.sent(), d.default.topicModel && d.default.topicModel.info && 0 != d.default.topicModel.info.type || s.default.getTopicData(function() {}), this.setupSubviews(), [2] + } + }) + }) + }, e.prototype.setupSubviews = function() { + var t = this, + e = this; + if (this.topicRankModel) { + var o = this.topicRankModel.tomb, + n = this.topicRankModel.taoist; + o || (o = []), n || (n = []); + var a; + a = o.length >= n.length ? o.length : n.length; + var i = (cc.winSize.height - cc.winSize.width) / 2; + if (this.node.height = cc.winSize.height + 100 * Math.floor(a / 3), this.node.height < 1.5 * cc.winSize.height && (this.node.height = 1.5 * cc.winSize.height), this.marginH = (this.node.height - cc.winSize.height) / 2, this.node.y = this.marginH, this.contentY = this.node.y, console.log("排行榜高度 = ", this.node.height, i, this.marginH), this.setupSheep(o, n), this.tombDeadLabel.string = d.default.topicRankInfo.tomb_fail_member, this.taoistDeadLabel.string = d.default.topicRankInfo.taoist_fail_member, setTimeout(function() { + if (t.tombScrollMsg && t.toaistScrollMsg) { + var a = "今日挑战 " + (d.default.topicRankInfo.tomb_fail_member + o.length) + " 羊,通关 " + o.length + " 羊"; + e.tombScrollMsg.getComponent(f.default).showMsg({ + msg: a + }); + var i = "今日挑战 " + (d.default.topicRankInfo.taoist_fail_member + n.length) + " 羊,通关 " + n.length + " 羊"; + e.toaistScrollMsg.getComponent(f.default).showMsg({ + msg: i + }) + } + }, 1e3), 1 == h.default.getInstance().game_over) { + var r = o.length >= 500 || n.length >= 500 ? 2 : 1; + setTimeout(function() { + t.scrollToPosition = !0, t.topicPositionFunc() + }, 1e3 * r) + } + } + }, e.prototype.setAnimationSub = function(t, e) { + this.BGSP.getComponent(p.default).play("Stage2", 0), this.spotSP.getComponent(p.default).play("0Spotlight", 0); + var o; + o = t.length >= e.length ? "sheep/DJ1" : "sheep/DJ2", 1 == d.default.topicModel.id ? this.playDJAnimation(o, "The01", "Jump2") : 2 == d.default.topicModel.id ? this.playDJAnimation(o, "The02", "Jump2") : 3 == d.default.topicModel.id ? this.playDJAnimation(o, "The03", "Jump2") : this.playDJAnimation(o, "00", "Jump2"); + var n = d.default.getJudgeAnimation(d.default.topicModel.id, !0, !1); + this.playTombAnimation(n.spName, n.anim); + var a = d.default.getJudgeAnimation(d.default.topicModel.id, !1, !0); + this.playTaoistAnimation(a.spName, a.anim) + }, e.prototype.playDJAnimation = function(t, e, o) { + var n = this; + this.DJSP.zIndex = 10, this.DJSP.getComponent(p.default).loadSpine(t, function() { + n.DJSP.getComponent(p.default).setNewSkin(e), n.DJSP.getComponent(p.default).play(o, 0) + }) + }, e.prototype.playTombAnimation = function(t, e) { + var o = this; + this.tombSP.getComponent(p.default).loadSpine(t, function() { + o.tombSP.getComponent(p.default).play(e, 0) + }) + }, e.prototype.playTaoistAnimation = function(t, e) { + var o = this; + this.toaistSP.getComponent(p.default).loadSpine(t, function() { + o.toaistSP.getComponent(p.default).play(e, 0) + }) + }, e.prototype.setupSheep = function(t, e) { + var o = this; + for (var n in this.sheepArray) this.sheepArray[n].destroy(); + this.sheepArray = [], this.userID = u.default.getUserData().userID; + for (var a = function(n) { + setTimeout(function() { + o.createSheepNode(n, t, e, !0) + }, 1 * n) + }, i = 0; i < t.length; i++) a(i); + var r = function(n) { + setTimeout(function() { + o.createSheepNode(n, t, e, !1) + }, 1 * n) + }; + for (i = 0; i < e.length; i++) r(i); + setTimeout(function() { + o.showOrHide() + }, 300), this.setAnimationSub(t, e) + }, e.prototype.createSheepNode = function(t, e, o, n) { + if (!(t > 300)) { + var a = this, + i = cc.instantiate(this.sheepNode); + i.opacity = 0, this.sheepNodeBase.addChild(i), this.sheepArray.push(i); + var r = Math.floor(t / 3), + c = Math.floor(t % 3), + s = -this.marginH - cc.winSize.height / 2 + 550 + 90 * r, + l = 0, + u = n ? 1 : -1; + l = r % 2 == 0 ? -cc.winSize.width / 2 + 100 * c + 100 : -cc.winSize.width / 2 + 100 * c + 80, l *= u, i.x = l, i.y = s, i.scaleX = n ? 1 : -1, i.setSiblingIndex(3 * r); + var p; + (p = n ? e[t] : o[t]) == this.userID && (this.userIdx = r, this.curSheepNode = i, 1 == h.default.getInstance().game_over && this.curSheepNode && (this.curSheepNode.active = !1), console.log("找到了用户id ###### taoistData ", p, r)), i.getComponent(m.default).showData(p, n, function(t) { + a.showCardNode(i.x, i.y + 150, t) + }); + var d = cc.instantiate(this.headerNode); + d.opacity = 0, d.x = l, d.y = s, this.headerNodeBase.addChild(d), this.sheepArray.push(d), d.getComponent(g.default).showData(p) + } + }, e.prototype.showCardNode = function(t, e, o) { + var n = this; + this.cardNode.stopAllActions(), this.cardNode.x = t, this.cardNode.y = e, this.cardNode.getComponent(y.default).showData(o), cc.tween(this.cardNode).to(0, { + opacity: 255 + }).delay(2).call(function() { + n.cardNode.opacity = 0 + }).start() + }, e.prototype.moveActionFunc = function(t) { + this.node.height < cc.winSize.height || (this.node.y += t, this.node.y >= this.marginH ? this.node.y = this.marginH : this.node.y <= -this.marginH && (this.node.y = -this.marginH), this.isMoving = !0) + }, e.prototype.moveActionEndFunc = function() { + this.isMoving = !1 + }, e.prototype.update = function() { + (this.isMoving || this.scrollToPosition) && this.showOrHide() + }, e.prototype.showOrHide = function() { + for (var t = 0; t < this.sheepArray.length; t++) { + var e = this.sheepArray[t], + o = l.default.getWorldPosition(e); + this.boundBox && this.boundBox.contains(o) ? e.opacity = 255 : e.opacity = 0 + } + }, i([C({ + type: cc.Node, + tooltip: "UI父层级" + })], e.prototype, "topicUI", void 0), i([C({ + type: cc.Prefab, + tooltip: "跑马灯预制体" + })], e.prototype, "tombScrollPrefabs", void 0), i([C({ + type: cc.Node, + tooltip: "跑马灯base" + })], e.prototype, "tombScroll", void 0), i([C({ + type: cc.Node, + tooltip: "跑马灯base" + })], e.prototype, "toaistScroll", void 0), i([C({ + type: cc.Node, + tooltip: "背景动画" + })], e.prototype, "BGSP", void 0), i([C({ + type: cc.Node, + tooltip: "坟墓动画" + })], e.prototype, "tombSP", void 0), i([C({ + type: cc.Node, + tooltip: "道士动画" + })], e.prototype, "toaistSP", void 0), i([C({ + type: cc.Node, + tooltip: "灯光动画" + })], e.prototype, "spotSP", void 0), i([C({ + type: cc.Node, + tooltip: "蹦迪" + })], e.prototype, "DJSP", void 0), i([C({ + type: cc.Label, + tooltip: "僵尸死亡数量" + })], e.prototype, "tombDeadLabel", void 0), i([C({ + type: cc.Label, + tooltip: "道士死亡数量" + })], e.prototype, "taoistDeadLabel", void 0), i([C({ + type: cc.Node, + tooltip: "羊模型父视图" + })], e.prototype, "sheepNodeBase", void 0), i([C({ + type: cc.Prefab, + tooltip: "羊模型" + })], e.prototype, "sheepNode", void 0), i([C({ + type: cc.Prefab, + tooltip: "名片" + })], e.prototype, "cardNodePrefab", void 0), i([C({ + type: cc.Node, + tooltip: "头像模型父视图" + })], e.prototype, "headerNodeBase", void 0), i([C({ + type: cc.Prefab, + tooltip: "头像" + })], e.prototype, "headerNode", void 0), i([N], e) + }(cc.Component); + o.default = w, cc._RF.pop() + }, { + "../../../pre/module/item/topic-card-node": "topic-card-node", + "../../../pre/module/item/topic-header-node": "topic-header-node", + "../../../pre/module/item/topic-sheep-node": "topic-sheep-node", + "../../api/api-sheep": "api-sheep", + "../../common/CcJsFunc": "CcJsFunc", + "../../common/dataTs": "dataTs", + "../../common/enumConfig": "enumConfig", + "../../common/spine": "spine", + "../../manager/GameManager": "GameManager", + "../../manager/data-manager": "data-manager", + "../../manager/report-common": "report-common", + "../../module/ScrollMsg": "ScrollMsg" + } + ], + "topic-sheep-node": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "f08acs7KTtK6rQhXCkhnzFG", "topic-sheep-node"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../../script/api/api-sheep"), + c = t("../../../script/common/CcJsFunc"), + s = t("../../../script/common/dataTs"), + l = t("../../../script/common/spine"), + u = t("../../../script/manager/data-manager"), + p = cc._decorator, + d = p.ccclass, + h = p.property, + f = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.flashNode = null, e.sheepSp = null, e.clickNode = null, e.userID = 0, e.clickCallback = null, e.userData = null, e + } + return a(e, t), e.prototype.start = function() { + c.default.addTargetTouchUpInside(this.clickNode, this.clickNodeFunc.bind(this)) + }, e.prototype.clickNodeFunc = function() { + var t = this; + this.userData ? t.clickCallback && t.clickCallback(this.userData) : r.default.getTopicUserInfo(this.userID, function(e) { + 0 == e.err_code && e.data && e.data.user && (t.userData = e.data.user, t.clickCallback && t.clickCallback(e.data.user)) + }) + }, e.prototype.getUserID = function() { + return this.userID + }, e.prototype.playFlashAnimation = function() { + var t = this; + this.node.active = !0, this.sheepSp.getComponent(l.default).play("Drop1", 1, function() { + t.flashNode.active = !0, t.flashNode.getComponent(l.default).play("3Ray1", 1, function() { + t.flashNode.active = !1, s.default.isPlatform(s.GDPlatform.tt) && t.showSharePop() + }), t.sheepSp.getComponent(l.default).play("Jump3", 0) + }) + }, e.prototype.showSharePop = function() { + cc.game.emit("showPop", { + popName: "shareNodePop", + showPopData: { + type: 1 + } + }) + }, e.prototype.showData = function(t, e, o) { + if (this.userID = t, this.clickCallback = o, u.default.topicModel) + if (e) { + var n = u.default.getTopicAnimation(u.default.topicModel.id, !0, !1); + this.playTomb(n.spName, n.skin, "Jump3") + } else n = u.default.getTopicAnimation(u.default.topicModel.id, !1, !0), this.playTaoist(n.spName, n.skin, "Jump3") + }, e.prototype.playTomb = function(t, e, o) { + var n = this; + this.sheepSp.getComponent(l.default).loadSpine(t, function() { + n.sheepSp.getComponent(l.default).setNewSkin(e), n.sheepSp.getComponent(l.default).play(o, 0) + }) + }, e.prototype.playTaoist = function(t, e, o) { + var n = this; + this.sheepSp.getComponent(l.default).loadSpine(t, function() { + n.sheepSp.getComponent(l.default).setNewSkin(e), n.sheepSp.getComponent(l.default).play(o, 0) + }) + }, i([h(cc.Node)], e.prototype, "flashNode", void 0), i([h(cc.Node)], e.prototype, "sheepSp", void 0), i([h(cc.Node)], e.prototype, "clickNode", void 0), i([d], e) + }(cc.Component); + o.default = f, cc._RF.pop() + }, { + "../../../script/api/api-sheep": "api-sheep", + "../../../script/common/CcJsFunc": "CcJsFunc", + "../../../script/common/dataTs": "dataTs", + "../../../script/common/spine": "spine", + "../../../script/manager/data-manager": "data-manager" + } + ], + "topic-ui-layer": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "41174iuu2NIQJJDkdlO9Oyh", "topic-ui-layer"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../common/CcJsFunc"), + c = t("../../common/enumConfig"), + s = t("../../common/native/audio"), + l = t("../../common/util"), + u = t("../../manager/data-manager"), + p = t("../../manager/DateManager"), + d = t("../../manager/GameManager"), + h = cc._decorator, + f = h.ccclass, + m = h.property, + g = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.pointBtn = null, e.settingBtn = null, e.backBtn = null, e.playBtn = null, e.locationBtn = null, e.timeNode = null, e.timeLabel = null, e.tombLabel = null, e.taoistLabel = null, e.tombNumLabel = null, e.taoistNumLabel = null, e.vsProgress = null, e.beginButtonDuration = 0, e.updateTime = 0, e + } + return a(e, t), e.prototype.start = function() { + cc.game.on(c.EMITKEY.TOPICACCOUNT, this.topicAccountFunc, this), cc.game.on(c.EMITKEY.TOPICRANKINFO, this.topicRankInfoFunc, this), r.default.addTargetTouchUpInside(this.pointBtn, this.pointBtnFunc.bind(this)), r.default.addTargetTouchUpInside(this.settingBtn, this.settingBtnFunc.bind(this)), r.default.addTargetTouchUpInside(this.backBtn, this.backBtnFunc.bind(this)), r.default.addTargetTouchUpInside(this.playBtn, this.playBtnFunc.bind(this)), r.default.addTargetTouchUpInside(this.locationBtn, this.locationBtnFunc.bind(this)), this.updateTimeFunc() + }, e.prototype.onEnable = function() { + this.topicAccountFunc(), this.topicRankInfoFunc() + }, e.prototype.topicAccountFunc = function() { + if (console.log("TOPICACCOUNT 通知 = ", JSON.stringify(u.default.topicModel)), u.default.topicModel) { + this.timeNode.active = !1; + var t = u.default.topicModel.name.split("#"); + t.length < 2 || (this.tombLabel.string = t[0], this.taoistLabel.string = t[1]) + } + }, e.prototype.topicRankInfoFunc = function() { + if (console.log("TOPICRANKINFO 通知 ######"), u.default.topicRankInfo) { + var t = u.default.topicRankInfo.tomb, + e = u.default.topicRankInfo.taoist; + if (t || (t = []), e || (e = []), console.log("topicRankInfoFunc ", t.length, "---", e.length), this.tombNumLabel.string = t.length + "羊", this.taoistNumLabel.string = e.length + "羊", t.length == e.length ? (this.tombLabel.fontSize = 90, this.taoistLabel.fontSize = 90) : t.length > e.length ? (this.tombLabel.fontSize = 90, this.taoistLabel.fontSize = 60) : (this.tombLabel.fontSize = 60, this.taoistLabel.fontSize = 90), 0 == t.length && 0 == e.length) this.vsProgress.fillStart = .5; + else if (0 == t.length) this.vsProgress.fillStart = 0; + else if (0 == e.length) this.vsProgress.fillStart = 1; + else if (t.length > 0 && e.length > 0) { + var o = t.length / (t.length + e.length); + this.vsProgress.fillStart = o + } + this.locationBtn.active = !1; + var n = this.playBtn.getChildByName("label").getComponent(cc.Label), + a = this.isWin(); + console.log("winNum ###### = ", a), 1 == a ? (n.string = "已加入羊群", this.timeNode.active = !0, this.locationBtn.active = !0) : n.string = 0 == a ? "再次挑战" : "加入羊群" + } + }, e.prototype.isWin = function() { + if (u.default.topicModel && u.default.topicModel.info) { + if (1 == u.default.topicModel.info.state) return 1; + if (2 == u.default.topicModel.info.state) return 0 + } + return -1 + }, e.prototype.pointBtnFunc = function() { + console.log("提示"), this.showChoosePop(1) + }, e.prototype.settingBtnFunc = function() { + console.log("设置"), cc.game.emit("showPop", { + popName: "setupPop", + showPopData: {} + }) + }, e.prototype.backBtnFunc = function() { + console.log("返回"), cc.game.emit(c.EMITKEY.SHOWTRANSITLAYER, function() { + cc.game.emit(c.EMITKEY.SHOWMODULE, c.MODULETYPE.COMMON) + }) + }, e.prototype.playBtnFunc = function() { + console.log("开始游戏"), this.chooseCallbackFunc() + }, e.prototype.showChoosePop = function(t) { + var e = { + popName: "topicChoosePop", + showPopData: { + type: t, + chooseCallback: this.chooseCallbackFunc.bind(this) + } + }; + cc.game.emit("showPop", e) + }, e.prototype.chooseCallbackFunc = function() { + if (this.beginButtonDuration >= 1) { + this.beginButtonDuration = 0; + var t = this.isWin(); + if (console.log("winNum ###### = ", t), 1 == t) return void cc.game.emit(c.EMITKEY.SHOWMAINTIPS, "每日一关,今天已挑战成功"); + d.default.setGameType(c.GAMETYPE.GAMETOPIC), s.default.playBGM(), cc.game.emit(c.EMITKEY.BEGINGAME) + } else console.log("不能连续点击") + }, e.prototype.locationBtnFunc = function() { + console.log("定位"), cc.game.emit(c.EMITKEY.TOPICPOSITION) + }, e.prototype.update = function(t) { + this.beginButtonDuration += t, this.updateTime += t, this.updateTime >= 1 && (this.updateTime = 0, this.updateTimeFunc()) + }, e.prototype.updateTimeFunc = function() { + var t = p.default.format(c.CALENDARNAMES[8], new Date).split(" "); + if (!(t.length < 2)) { + var e = t[1].split(":"); + if (!(e.length < 3)) { + var o = 3600 * (24 - Number(e[0]) - 1) + 60 * (60 - Number(e[1]) - 1) + (60 - Number(e[2])); + if (this.timeNode.activeInHierarchy) { + var n = l.default.formatTime(1e3 * o), + a = (n[1] < 10 ? "0" + n[1] : n[1]) + ":" + (n[2] < 10 ? "0" + n[2] : n[2]) + ":" + (n[3] < 10 ? "0" + n[3] : n[3]) + " 重置"; + this.timeLabel.string = a + } + } + } + }, i([m({ + type: cc.Node, + tooltip: "提示" + })], e.prototype, "pointBtn", void 0), i([m({ + type: cc.Node, + tooltip: "设置" + })], e.prototype, "settingBtn", void 0), i([m({ + type: cc.Node, + tooltip: "返回" + })], e.prototype, "backBtn", void 0), i([m({ + type: cc.Node, + tooltip: "开始游戏" + })], e.prototype, "playBtn", void 0), i([m({ + type: cc.Node, + tooltip: "定位" + })], e.prototype, "locationBtn", void 0), i([m({ + type: cc.Node, + tooltip: "倒计时" + })], e.prototype, "timeNode", void 0), i([m({ + type: cc.Label, + tooltip: "倒计时" + })], e.prototype, "timeLabel", void 0), i([m({ + type: cc.Label, + tooltip: "僵尸" + })], e.prototype, "tombLabel", void 0), i([m({ + type: cc.Label, + tooltip: "道士" + })], e.prototype, "taoistLabel", void 0), i([m({ + type: cc.Label, + tooltip: "僵尸数量" + })], e.prototype, "tombNumLabel", void 0), i([m({ + type: cc.Label, + tooltip: "道士数量" + })], e.prototype, "taoistNumLabel", void 0), i([m({ + type: cc.Sprite, + tooltip: "vs进度" + })], e.prototype, "vsProgress", void 0), i([f], e) + }(cc.Component); + o.default = g, cc._RF.pop() + }, { + "../../common/CcJsFunc": "CcJsFunc", + "../../common/enumConfig": "enumConfig", + "../../common/native/audio": "audio", + "../../common/util": "util", + "../../manager/DateManager": "DateManager", + "../../manager/GameManager": "GameManager", + "../../manager/data-manager": "data-manager" + } + ], + "topic-ui": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "8fa33VO+JBKg6ZJbHIXKnoL", "topic-ui"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../common/dataTs"), + c = t("../../common/enumConfig"), + s = t("../../common/native/audio"), + l = t("../../manager/GameManager"), + u = cc._decorator, + p = u.ccclass, + d = u.property, + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.rankNode = null, e.uiLayer = null, e.beginBGM = !1, e + } + return a(e, t), e.prototype.onEnable = function() { + l.default.setGameType(c.GAMETYPE.GAMETOMB), this.playGameBgMusic() + }, e.prototype.start = function() {}, e.prototype.playGameBgMusic = function() { + if (r.default.getUserSetupData().musicStatus < 0) cc.audioEngine.stopAll(); + else if (0 == this.beginBGM) { + var t = this; + cc.loader.loadRes("audio/music/game_begin.mp3", function(e, o) { + var n = cc.audioEngine.playMusic(o, !1); + cc.audioEngine.getCurrentTime(n), cc.audioEngine.getDuration(n), cc.audioEngine.setFinishCallback(n, function() { + t.beginBGM = !0, console.log("播放完成进场音乐 ###### "), t.playBg() + }) + }) + } else this.playBg() + }, e.prototype.playBg = function() { + s.default.playBGM() + }, i([d({ + type: cc.Node, + tooltip: "排行榜" + })], e.prototype, "rankNode", void 0), i([d({ + type: cc.Node, + tooltip: "UI" + })], e.prototype, "uiLayer", void 0), i([p], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "../../common/dataTs": "dataTs", + "../../common/enumConfig": "enumConfig", + "../../common/native/audio": "audio", + "../../manager/GameManager": "GameManager" + } + ], + topicChoosePop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "db225EuZZ1H86t8bfP+ErU1", "topicChoosePop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../api/api-sheep"), + c = t("../common/CcJsFunc"), + s = t("../common/dataTs"), + l = t("../common/enumConfig"), + u = t("../common/sdk"), + p = t("../common/spine"), + d = t("../common/util"), + h = t("../manager/data-manager"), + f = t("../manager/DateManager"), + m = cc._decorator, + g = m.ccclass, + y = m.property, + v = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.popNode = null, e.titleNode = null, e.closeBtn = null, e.yellowNode = null, e.redNode = null, e.yellowBtn = null, e.redBtn = null, e.timeNode = null, e.chooseBtn = null, e.chooseVideo = null, e.chooseLabel = null, e.noChooseBtn = null, e.giveupBtn = null, e.tombName = null, e.taoistName = null, e.tombSP = null, e.taoistSP = null, e.timeLabel = null, e.popData = null, e.topicType = 0, e.updateTime = 0, e + } + return a(e, t), e.prototype.start = function() { + c.default.addTargetTouchUpInside(this.closeBtn, this.closeBtnFunc.bind(this)), c.default.addTargetTouchUpInside(this.yellowNode, this.yellowNodeFunc.bind(this)), c.default.addTargetTouchUpInside(this.redNode, this.redNodeFunc.bind(this)), c.default.addTargetTouchUpInside(this.chooseBtn, this.chooseBtnFunc.bind(this)), c.default.addTargetTouchUpInside(this.giveupBtn, this.giveupBtnFunc.bind(this)) + }, e.prototype.closeBtnFunc = function() { + this.node.active = !1 + }, e.prototype.yellowNodeFunc = function() { + this.topicType = 1, console.log("topicType = ", this.topicType), this.popData && 1 == this.popData.type || this.exchangeUI(!0) + }, e.prototype.redNodeFunc = function() { + this.topicType = 2, console.log("topicType = ", this.topicType), this.popData && 1 == this.popData.type || this.exchangeUI(!1) + }, e.prototype.exchangeUI = function(t, e) { + if (void 0 === e && (e = !1), this.noChooseBtn.active = !1, h.default.topicModel && h.default.topicModel.name) { + var o = h.default.topicModel.name.split("#"); + if (!(o.length < 2)) + if (this.yellowBtn.active = !0, this.redBtn.active = !0, t) { + this.chooseLabel.string = "加入" + o[0] + "羊", this.yellowNode.getChildByName("choose").active = !0, this.redNode.getChildByName("choose").active = !1, this.yellowBtn.getChildByName("name").color = (new cc.Color).fromHEX("#FBE547"), this.redBtn.getChildByName("name").color = (new cc.Color).fromHEX("#FFFFFF"), this.redBtn.getChildByName("name").getComponent(cc.Label).string = "选择", this.redBtn.active = !e; + var n = e ? "已加入" : "已选择"; + this.yellowBtn.getChildByName("name").getComponent(cc.Label).string = n + } else this.chooseLabel.string = "加入" + o[1] + "羊", this.yellowNode.getChildByName("choose").active = !1, this.redNode.getChildByName("choose").active = !0, this.yellowBtn.getChildByName("name").color = (new cc.Color).fromHEX("#FFFFFF"), this.redBtn.getChildByName("name").color = (new cc.Color).fromHEX("#FBE547"), this.yellowBtn.getChildByName("name").getComponent(cc.Label).string = "选择", this.yellowBtn.active = !e, n = e ? "已加入" : "已选择", this.redBtn.getChildByName("name").getComponent(cc.Label).string = n + } + }, e.prototype.chooseBtnFunc = function() { + if (0 == this.topicType) { + if (this.yellowBtn.stopAllActions(), this.redBtn.stopAllActions(), cc.tween(this.yellowBtn).to(.2, { + scale: 1.5 + }).to(.2, { + scale: 1 + }).start(), cc.tween(this.redBtn).to(.2, { + scale: 1.5 + }).to(.2, { + scale: 1 + }).start(), !h.default.topicModel) return void cc.game.emit(l.EMITKEY.SHOWMAINTIPS, "请选择你的阵营"); + h.default.topicModel.tomb < h.default.topicModel.taoist ? this.topicType = 1 : h.default.topicModel.tomb > h.default.topicModel.taoist ? this.topicType = 2 : this.topicType = c.default.randomNum(1, 2) + } + if (1 != h.default.todayIsWin()) { + var t = this; + if (u.default.isPlatform(u.Platform.wx)) { + var e = s.default.GetVedioID(), + o = s.default.getUserData().openid; + u.default.share(o, e, function() { + t.addTopicMethod() + }, function() { + cc.game.emit(l.EMITKEY.SHOWMAINTIPS, "分享失败,请分享微信群与好友PK") + }) + } else u.default.watchAdVideo({ + id: s.default.GetVedioID(), + success: function() { + console.log("视频播放成功 ###### "), t.addTopicMethod() + }, + fail: function() { + console.log("失败") + }, + nofit: function() {} + }) + } else this.addTopicMethod() + }, e.prototype.addTopicMethod = function() { + this.requestData(), this.node.active = !1, this.popData && this.popData.chooseCallback && this.popData.chooseCallback() + }, e.prototype.requestData = function() { + var t = { + type: this.topicType + }; + console.log("加入话题参数 = ", t), r.default.joinTopic(t, function() { + console.log("加入话题成功 ######") + }) + }, e.prototype.giveupBtnFunc = function() { + this.node.active = !1 + }, e.prototype.showPop = function(t) { + this.node.active = !0, this.popData = t, this.topicType = 0, this.yellowBtn.active = !0, this.redBtn.active = !0; + var e = h.default.todayIsWin(); + if (this.chooseVideo.active = 1 != e, s.default.isPlatform(s.GDPlatform.wx) && c.default.changeSpriteFrame(this.chooseVideo, "rewardIcon/reward_share_white.png"), h.default.topicModel && h.default.topicModel.name) { + var o = h.default.topicModel.name.split("#"); + o.length >= 2 && (this.tombName.string = o[0], this.taoistName.string = o[1]); + var n = h.default.getTopicAnimation(h.default.topicModel.id, !0, !1); + this.playTomb(n.spName, n.skin, "Jump1"); + var a = h.default.getTopicAnimation(h.default.topicModel.id, !1, !0); + this.playTaoist(a.spName, a.skin, "Jump1") + } + this.yellowNode.getChildByName("choose").active = !1, this.redNode.getChildByName("choose").active = !1, this.yellowBtn.getChildByName("name").color = (new cc.Color).fromHEX("#FFFFFF"), this.redBtn.getChildByName("name").color = (new cc.Color).fromHEX("#FFFFFF"), this.noChooseBtn.active = !1, this.chooseLabel.string = "加入对抗", cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(), 0 == t.type ? (this.chooseBtn.active = !0, this.giveupBtn.active = !0, this.yellowBtn.getChildByName("name").getComponent(cc.Label).string = "选择", this.redBtn.getChildByName("name").getComponent(cc.Label).string = "选择", this.titleNode.getComponent(cc.Label).string = "选择羊队") : 1 == t.type && (this.chooseBtn.active = !1, this.giveupBtn.active = !1, this.titleNode.getComponent(cc.Label).string = "今日话题", h.default.topicModel && h.default.topicModel.info && (1 == h.default.topicModel.info.type ? this.exchangeUI(!0, !0) : this.exchangeUI(!1, !0))), this.updateTimeFunc() + }, e.prototype.playTomb = function(t, e, o) { + var n = this; + this.tombSP.getComponent(p.default).loadSpine(t, function() { + n.tombSP.getComponent(p.default).setNewSkin(e), n.tombSP.getComponent(p.default).play(o, 0) + }) + }, e.prototype.playTaoist = function(t, e, o) { + var n = this; + this.taoistSP.getComponent(p.default).loadSpine(t, function() { + n.taoistSP.getComponent(p.default).setNewSkin(e), n.taoistSP.getComponent(p.default).play(o, 0) + }) + }, e.prototype.update = function(t) { + this.updateTime += t, this.updateTime >= 1 && (this.updateTime = 0, this.updateTimeFunc()) + }, e.prototype.updateTimeFunc = function() { + var t = f.default.format(l.CALENDARNAMES[8], new Date).split(" "); + if (!(t.length < 2)) { + var e = t[1].split(":"); + if (!(e.length < 3)) { + var o = 3600 * (24 - Number(e[0]) - 1) + 60 * (60 - Number(e[1]) - 1) + (60 - Number(e[2])); + if (this.timeNode.activeInHierarchy) { + var n = d.default.formatTime(1e3 * o), + a = (n[1] < 10 ? "0" + n[1] : n[1]) + " 小时 " + (n[2] < 10 ? "0" + n[2] : n[2]) + " 分 " + (n[3] < 10 ? "0" + n[3] : n[3]) + " 秒"; + this.timeLabel.string = a + } + } + } + }, i([y({ + type: cc.Node, + tooltip: "弹框" + })], e.prototype, "popNode", void 0), i([y({ + type: cc.Node, + tooltip: "标题" + })], e.prototype, "titleNode", void 0), i([y({ + type: cc.Node, + tooltip: "关闭按钮" + })], e.prototype, "closeBtn", void 0), i([y({ + type: cc.Node, + tooltip: "羊base" + })], e.prototype, "yellowNode", void 0), i([y({ + type: cc.Node, + tooltip: "羊base" + })], e.prototype, "redNode", void 0), i([y({ + type: cc.Node, + tooltip: "选择" + })], e.prototype, "yellowBtn", void 0), i([y({ + type: cc.Node, + tooltip: "选择" + })], e.prototype, "redBtn", void 0), i([y({ + type: cc.Node, + tooltip: "剩余时间" + })], e.prototype, "timeNode", void 0), i([y({ + type: cc.Node, + tooltip: "选择" + })], e.prototype, "chooseBtn", void 0), i([y({ + type: cc.Node, + tooltip: "视频" + })], e.prototype, "chooseVideo", void 0), i([y({ + type: cc.Label, + tooltip: "描述" + })], e.prototype, "chooseLabel", void 0), i([y({ + type: cc.Node, + tooltip: "未选择" + })], e.prototype, "noChooseBtn", void 0), i([y({ + type: cc.Node, + tooltip: "放弃" + })], e.prototype, "giveupBtn", void 0), i([y({ + type: cc.Label, + tooltip: "阵营名字" + })], e.prototype, "tombName", void 0), i([y({ + type: cc.Label, + tooltip: "阵营名字" + })], e.prototype, "taoistName", void 0), i([y({ + type: cc.Node, + tooltip: "阵营动画" + })], e.prototype, "tombSP", void 0), i([y({ + type: cc.Node, + tooltip: "阵营动画" + })], e.prototype, "taoistSP", void 0), i([y({ + type: cc.Label, + tooltip: "倒计时" + })], e.prototype, "timeLabel", void 0), i([g], e) + }(cc.Component); + o.default = v, cc._RF.pop() + }, { + "../api/api-sheep": "api-sheep", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../common/sdk": "sdk", + "../common/spine": "spine", + "../common/util": "util", + "../manager/DateManager": "DateManager", + "../manager/data-manager": "data-manager" + } + ], + topicCollectPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "9626bbOFCpLgLU2U6ganUyA", "topicCollectPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }, + r = this && this.__spreadArrays || function() { + for (var t = 0, e = 0, o = arguments.length; e < o; e++) t += arguments[e].length; + var n = Array(t), + a = 0; + for (e = 0; e < o; e++) + for (var i = arguments[e], r = 0, c = i.length; r < c; r++, a++) n[a] = i[r]; + return n + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var c = t("../common/CcJsFunc"), + s = t("../common/dataTs"), + l = t("../common/spine"), + u = cc._decorator, + p = u.ccclass, + d = u.property, + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.popNode = null, e.closeBtn = null, e.sheepCommonBaseNode = null, e.sheepCommonNode = null, e.dressingBaseNode = null, e.dressingNode = null, e.previousBtn = null, e.sureBtn = null, e.nextBtn = null, e.indexLabel = null, e.subPop = null, e.subSheep = null, e.titleLabel = null, e.contentDesc = null, e.contentTeam = null, e.contentDefault = null, e.luckBtn = null, e.changeBtn = null, e.subCloseBtn = null, e.dataArray = [], e.labelArray = [], e.curIdx = 1, e.allIdx = 0, e.clothesId = 0, e.popData = null, e + } + return a(e, t), e.prototype.start = function() { + c.default.addTargetTouchUpInside(this.closeBtn, this.closeBtnFunc.bind(this)), c.default.addTargetTouchUpInside(this.previousBtn, this.previousBtnFunc.bind(this)), c.default.addTargetTouchUpInside(this.sureBtn, this.sureBtnFunc.bind(this)), c.default.addTargetTouchUpInside(this.nextBtn, this.nextBtnFunc.bind(this)), c.default.addTargetTouchUpInside(this.subCloseBtn, this.subCloseBtnFunc.bind(this)), c.default.addTargetTouchUpInside(this.luckBtn, this.luckBtnFunc.bind(this)), c.default.addTargetTouchUpInside(this.changeBtn, this.changeBtnFunc.bind(this)) + }, e.prototype.luckBtnFunc = function() { + this.subPop.active = !1 + }, e.prototype.changeBtnFunc = function() { + this.subPop.active = !1; + var t = s.default.getSheepClothesData(); + if (this.clothesId > 0) { + for (var e in t) this.clothesId == t[e].clothesId ? (t[e].dressing = !0, this.popData && this.popData.changeClothesCb && this.popData.changeClothesCb(this.clothesId)) : t[e].dressing = !1; + s.default.setSheepClothesData(t), this.setupSubViews(this.curIdx) + } + }, e.prototype.subCloseBtnFunc = function() { + this.subPop.active = !1 + }, e.prototype.closeBtnFunc = function() { + this.node.active = !1 + }, e.prototype.previousBtnFunc = function() { + this.curIdx--, this.curIdx < 1 && (this.curIdx = 1), this.setupSubViews(this.curIdx) + }, e.prototype.sureBtnFunc = function() { + this.node.active = !1 + }, e.prototype.nextBtnFunc = function() { + this.curIdx++, this.curIdx > this.allIdx && (this.curIdx = this.allIdx), this.setupSubViews(this.curIdx) + }, e.prototype.showPop = function(t) { + this.node.active = !0, this.popData = t, cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(), this.sheepCommonNode.active = !1, this.dressingNode.active = !1, this.subPop.active = !1, this.setupSubViews(this.curIdx) + }, e.prototype.setupSubViews = function(t) { + for (var e in t < 1 && (t = 1), this.dataArray)(a = this.dataArray[e]).destroy(); + for (var e in this.labelArray)(a = this.labelArray[e]).destroy(); + this.dataArray = [], this.labelArray = []; + var o = s.default.getSheepClothesData(); + o = this.bubbleSort(o), o = this.bubbleIdSort(o), this.allIdx = Math.ceil(o.length / 12), this.indexLabel.string = this.curIdx + " / " + this.allIdx; + for (var n = 0; n < o.length; n++) + if (n >= 12 * (t - 1) && n < 12 * t) { + var a, i = o[n]; + (a = cc.instantiate(this.sheepCommonNode)).active = !0, this.sheepCommonBaseNode.addChild(a), this.dataArray.push(a); + var r = cc.instantiate(this.dressingNode); + r.active = !0, this.dressingBaseNode.addChild(r), this.labelArray.push(r), c.default.addbtnTouchEndScale(a, this.itemBtnFunc.bind(this, i)), this.updateItem(a, r, i) + } + }, e.prototype.itemBtnFunc = function(t) { + var e = this; + console.log(t), this.clothesId = t.clothesId, this.subPop.active = !0, cc.tween(this.subPop).set({ + scale: .8, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(); + var o = "sheep/" + t.spName; + this.subSheep.getComponent(l.default).loadSpine(o, function() { + e.subSheep.getComponent(l.default).setNewSkin(t.spSkin), t.unlock ? e.subSheep.getComponent(l.default).play("Jump1", 0) : e.subSheep.getComponent(l.default).play("Unlock1", 0) + }), t.unlock ? (this.luckBtn.active = !1, this.changeBtn.active = !0, this.titleLabel.string = t.name) : (this.luckBtn.active = !0, this.changeBtn.active = !1, this.titleLabel.string = "???"), this.contentTeam.string = this.getName(t.clothesId), this.contentDesc.string = "在话题战 中,加入" + t.name + "阵营并获胜后获得。" + }, e.prototype.getName = function(t) { + return this.contentDesc.node.active = !0, this.contentTeam.node.active = !0, this.contentDefault.node.active = !1, 8 == t || 9 == t ? "僵尸vs道士" : 10 == t || 11 == t ? "狼人vs吸血鬼" : 12 == t || 13 == t ? "黑羊vs白羊" : 41 == t || 42 == t ? "五仁vs莲蓉" : 43 == t || 44 == t ? "学生vs老师" : 45 == t || 46 == t ? "嫦娥vs玉兔" : 47 == t || 48 == t ? "学童vs夫子" : (this.contentDesc.node.active = !1, this.contentTeam.node.active = !1, this.contentDefault.node.active = !0, this.contentDefault.string = 1 == t ? "默认装扮。我只是一只孤独的美羊羊。" : "常规模式通关,或话题PK中所选阵营获胜后获得。", "") + }, e.prototype.bubbleSort = function(t) { + for (var e, o = r(t), n = 0, a = o.length; n < a; n++) + for (var i = 0; i < a - 1 - n; i++) o[i].unlock < o[i + 1].unlock && (e = [o[i + 1], o[i]], o[i] = e[0], o[i + 1] = e[1]); + return o + }, e.prototype.bubbleIdSort = function(t) { + for (var e, o = r(t), n = 0, a = o.length; n < a; n++) + for (var i = 0; i < a - 1 - n; i++) o[i].unlock <= o[i + 1].unlock && o[i].clothesId > o[i + 1].clothesId && (e = [o[i + 1], o[i]], o[i] = e[0], o[i + 1] = e[1]); + return o + }, e.prototype.updateItem = function(t, e, o) { + var n = t.getChildByName("new"), + a = t.getChildByName("SP"), + i = t.getChildByName("choose"); + e.opacity = 0, this.popData && this.popData.topicClothesNum == o.clothesId ? n.active = !0 : n.active = !1; + var r = "sheep/" + o.spName; + a.getComponent(l.default).loadSpine(r, function() { + a.getComponent(l.default).setNewSkin(o.spSkin), o.unlock ? o.dressing ? (i.active = !0, e.opacity = 255, a.getComponent(l.default).play("Jump1", 0)) : i.active = !1 : (a.getComponent(l.default).play("Unlock1", 0), i.active = !1) + }) + }, i([d(cc.Node)], e.prototype, "popNode", void 0), i([d(cc.Node)], e.prototype, "closeBtn", void 0), i([d(cc.Node)], e.prototype, "sheepCommonBaseNode", void 0), i([d(cc.Node)], e.prototype, "sheepCommonNode", void 0), i([d(cc.Node)], e.prototype, "dressingBaseNode", void 0), i([d(cc.Node)], e.prototype, "dressingNode", void 0), i([d(cc.Node)], e.prototype, "previousBtn", void 0), i([d(cc.Node)], e.prototype, "sureBtn", void 0), i([d(cc.Node)], e.prototype, "nextBtn", void 0), i([d(cc.Label)], e.prototype, "indexLabel", void 0), i([d(cc.Node)], e.prototype, "subPop", void 0), i([d(cc.Node)], e.prototype, "subSheep", void 0), i([d(cc.Label)], e.prototype, "titleLabel", void 0), i([d(cc.Label)], e.prototype, "contentDesc", void 0), i([d(cc.Label)], e.prototype, "contentTeam", void 0), i([d(cc.Label)], e.prototype, "contentDefault", void 0), i([d(cc.Node)], e.prototype, "luckBtn", void 0), i([d(cc.Node)], e.prototype, "changeBtn", void 0), i([d(cc.Node)], e.prototype, "subCloseBtn", void 0), i([p], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/spine": "spine" + } + ], + topicJoinedPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "90ef543uIxHfKnKA811WqDS", "topicJoinedPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../api/api-sheep"), + c = t("../common/CcJsFunc"), + s = t("../common/dataTs"), + l = t("../common/spine"), + u = t("../manager/data-manager"), + p = cc._decorator, + d = p.ccclass, + h = p.property, + f = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.popNode = null, e.titleLabel = null, e.tombNode = null, e.taoistNode = null, e.tombLabel = null, e.taoistLabel = null, e.teamLabel = null, e.closeBtn = null, e.sureBtn = null, e.tombSP = null, e.taoistSP = null, e + } + return a(e, t), e.prototype.start = function() { + c.default.addTargetTouchUpInside(this.closeBtn, this.closeBtnFunc.bind(this)), c.default.addTargetTouchUpInside(this.sureBtn, this.sureBtnBtn.bind(this)) + }, e.prototype.closeBtnFunc = function() { + this.node.active = !1 + }, e.prototype.sureBtnBtn = function() { + this.node.active = !1 + }, e.prototype.showPop = function() { + var t = this; + this.node.active = !0, this.tombNode.active = !1, this.taoistNode.active = !1, cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(), this.updateUI(0); + var e = u.default.getTopicAnimation(u.default.topicModel.id, !0, !1); + this.playTomb(e.spName, e.skin, "Jump1"); + var o = u.default.getTopicAnimation(u.default.topicModel.id, !1, !0); + this.playTaoist(o.spName, o.skin, "Jump1"), r.default.getTopicUserInfo(s.default.getUserData().userID, function(e) { + if (0 == e.err_code && e.data && e.data.user) { + var o = e.data.user.type; + 1 == o ? t.tombNode.active = !0 : 2 == o && (t.taoistNode.active = !0), t.updateUI(o) + } + }) + }, e.prototype.updateUI = function(t) { + var e = u.default.topicModel.name.split("#"); + e.length < 2 || (this.tombLabel.string = e[0] + "羊", this.taoistLabel.string = e[1] + "羊", this.teamLabel.string = "", 1 == t ? this.teamLabel.string = e[0] + "羊队" : 2 == t && (this.teamLabel.string = e[1] + "羊队")) + }, e.prototype.playTomb = function(t, e, o) { + var n = this; + this.tombSP.getComponent(l.default).loadSpine(t, function() { + n.tombSP.getComponent(l.default).setNewSkin(e), n.tombSP.getComponent(l.default).play(o, 0) + }) + }, e.prototype.playTaoist = function(t, e, o) { + var n = this; + this.taoistSP.getComponent(l.default).loadSpine(t, function() { + n.taoistSP.getComponent(l.default).setNewSkin(e), n.taoistSP.getComponent(l.default).play(o, 0) + }) + }, i([h(cc.Node)], e.prototype, "popNode", void 0), i([h(cc.Label)], e.prototype, "titleLabel", void 0), i([h(cc.Node)], e.prototype, "tombNode", void 0), i([h(cc.Node)], e.prototype, "taoistNode", void 0), i([h(cc.Label)], e.prototype, "tombLabel", void 0), i([h(cc.Label)], e.prototype, "taoistLabel", void 0), i([h(cc.Label)], e.prototype, "teamLabel", void 0), i([h(cc.Node)], e.prototype, "closeBtn", void 0), i([h(cc.Node)], e.prototype, "sureBtn", void 0), i([h(cc.Node)], e.prototype, "tombSP", void 0), i([h(cc.Node)], e.prototype, "taoistSP", void 0), i([d], e) + }(cc.Component); + o.default = f, cc._RF.pop() + }, { + "../api/api-sheep": "api-sheep", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/spine": "spine", + "../manager/data-manager": "data-manager" + } + ], + topicLastWinPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "74b18J+qNBMbqeSpfyEZqtg", "topicLastWinPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/CcJsFunc"), + c = t("../common/spine"), + s = t("../manager/data-manager"), + l = cc._decorator, + u = l.ccclass, + p = l.property, + d = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.popNode = null, e.closeBtn = null, e.tombSign = null, e.taoistSign = null, e.tombNode = null, e.taoistNode = null, e.nameLabel = null, e.tombLabel = null, e.taoistLabel = null, e.tombNumLabel = null, e.taoistNumLabel = null, e.bottomNumLabel = null, e.tombProgress = null, e.taoistProgress = null, e.tombSP = null, e.taoistSP = null, e.popData = null, e.teamIsWIn = !1, e + } + return a(e, t), e.prototype.start = function() { + r.default.addTargetTouchUpInside(this.closeBtn, this.closeBtnFunc.bind(this)) + }, e.prototype.closeBtnFunc = function() { + if (this.node.active = !1, this.teamIsWIn) { + var t = { + popName: "topicNewPop", + showPopData: { + type: 1, + data: this.popData + } + }; + cc.game.emit("showPop", t) + } + }, e.prototype.showPop = function(t) { + this.node.active = !0, this.popData = t, cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start(), t && this.setupData(t) + }, e.prototype.setupData = function(t) { + var e = t.tomb, + o = t.taoist, + n = t.tomb_fail_member, + a = t.taoist_fail_member, + i = e.length, + r = o.length, + c = t.topic.name.split("#"), + l = i + r + n + a, + u = i + r, + p = 0, + d = 0; + i == r ? this.nameLabel.string = "赛况" : i > r ? (1 == t.topic.info.type && (this.teamIsWIn = !0), this.tombSign.active = !0, this.taoistSign.active = !1, this.nameLabel.string = c[0] + "羊队获胜!") : (2 == t.topic.info.type && (this.teamIsWIn = !0), this.tombSign.active = !1, this.taoistSign.active = !0, this.nameLabel.string = c[1] + "羊队获胜!"), 0 != u && (p = i / u * 300, d = r / u * 300), p < 50 && (p = 50), d < 50 && (d = 50), cc.tween(this.tombProgress).to(0, { + height: 50 + }).to(1.5, { + height: p + }).start(), cc.tween(this.taoistProgress).to(0, { + height: 50 + }).to(1.5, { + height: d + }).start(), this.tombNumLabel.string = i + "羊", this.taoistNumLabel.string = r + "羊", this.tombLabel.string = c[0] + "羊队", this.taoistLabel.string = c[1] + "羊队", this.bottomNumLabel.string = l + "", 1 == t.topic.info.type ? (this.tombNode.active = !0, this.taoistNode.active = !1) : (this.tombNode.active = !1, this.taoistNode.active = !0); + var h = s.default.getTopicAnimation(t.topic.id, !0, !1); + this.playTomb(h.spName, h.skin, "Jump3"); + var f = s.default.getTopicAnimation(t.topic.id, !1, !0); + this.playTaoist(f.spName, f.skin, "Jump3") + }, e.prototype.playTomb = function(t, e, o) { + var n = this; + this.tombSP.getComponent(c.default).loadSpine(t, function() { + n.tombSP.getComponent(c.default).setNewSkin(e), n.tombSP.getComponent(c.default).play(o, 0) + }) + }, e.prototype.playTaoist = function(t, e, o) { + var n = this; + this.taoistSP.getComponent(c.default).loadSpine(t, function() { + n.taoistSP.getComponent(c.default).setNewSkin(e), n.taoistSP.getComponent(c.default).play(o, 0) + }) + }, i([p({ + type: cc.Node, + tooltip: "弹框" + })], e.prototype, "popNode", void 0), i([p({ + type: cc.Node, + tooltip: "关闭按钮" + })], e.prototype, "closeBtn", void 0), i([p(cc.Node)], e.prototype, "tombSign", void 0), i([p(cc.Node)], e.prototype, "taoistSign", void 0), i([p(cc.Node)], e.prototype, "tombNode", void 0), i([p(cc.Node)], e.prototype, "taoistNode", void 0), i([p({ + type: cc.Label, + tooltip: "羊队" + })], e.prototype, "nameLabel", void 0), i([p({ + type: cc.Label, + tooltip: "僵尸" + })], e.prototype, "tombLabel", void 0), i([p({ + type: cc.Label, + tooltip: "道士" + })], e.prototype, "taoistLabel", void 0), i([p({ + type: cc.Label, + tooltip: "僵尸数量" + })], e.prototype, "tombNumLabel", void 0), i([p({ + type: cc.Label, + tooltip: "道士数量" + })], e.prototype, "taoistNumLabel", void 0), i([p({ + type: cc.Label, + tooltip: "总人数" + })], e.prototype, "bottomNumLabel", void 0), i([p(cc.Node)], e.prototype, "tombProgress", void 0), i([p(cc.Node)], e.prototype, "taoistProgress", void 0), i([p(cc.Node)], e.prototype, "tombSP", void 0), i([p(cc.Node)], e.prototype, "taoistSP", void 0), i([u], e) + }(cc.Component); + o.default = d, cc._RF.pop() + }, { + "../common/CcJsFunc": "CcJsFunc", + "../common/spine": "spine", + "../manager/data-manager": "data-manager" + } + ], + topicNewPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "9383fTm8p9NuLEys6rFPQBI", "topicNewPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/CcJsFunc"), + c = t("../common/dataTs"), + s = t("../common/spine"), + l = t("../manager/GameManager"), + u = cc._decorator, + p = u.ccclass, + d = u.property, + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.maskNode = null, e.popNode = null, e.nameLabel = null, e.bgFlashSP = null, e.sheepSP = null, e.winLabel = null, e.descLabel = null, e + } + return a(e, t), e.prototype.start = function() { + r.default.addbtnTouchEndScale(this.maskNode, this.maskNodeFunc.bind(this)) + }, e.prototype.maskNodeFunc = function() { + this.node.active = !1 + }, e.prototype.showPop = function(t) { + var e = this; + this.node.active = !0, cc.tween(this.bgFlashSP).to(0, { + scale: 0 + }).to(.1, { + scale: 1 + }).call(function() { + e.bgFlashSP.getComponent(s.default).loadSpine("sheep/UI", function() { + e.bgFlashSP.getComponent(s.default).play("4Ray2", 0) + }) + }).start(), 1 == t.type ? this.receiveSheepClothes() : 2 == t.type && this.showSheep(t.data) + }, e.prototype.showSheep = function(t) { + var e = this; + cc.tween(this.sheepSP).to(0, { + scale: 0 + }).to(.2, { + scale: 1 + }).call(function() { + e.sheepSP.getComponent(s.default).loadSpine("sheep/" + t.spName, function() { + e.sheepSP.getComponent(s.default).setNewSkin(t.spSkin), e.sheepSP.getComponent(s.default).play("Jump1", 0) + }) + }).start(), this.nameLabel.string = t.name, this.winLabel.string = "", this.descLabel.string = "" + }, e.prototype.receiveSheepClothes = function() { + var t = this, + e = c.default.getSheepClothesData(), + o = !1, + n = "skin_00", + a = "羊"; + e = r.default.shuffle(e); + for (var i = 0; i < e.length; i++) { + var u = e[i]; + u.dressing, "Sheeps" != u.spName || 0 != u.unlock || o || (o = !0, u.unlock = !0, n = u.spSkin, a = u.name, l.default.getInstance().collectionMark.topicClothesNum = u.clothesId) + } + o && c.default.setSheepClothesData(e), cc.tween(this.sheepSP).to(0, { + scale: 0 + }).to(.2, { + scale: 1 + }).call(function() { + t.sheepSP.getComponent(s.default).loadSpine("sheep/Sheeps", function() { + t.sheepSP.getComponent(s.default).setNewSkin(n), t.sheepSP.getComponent(s.default).play("Jump1", 0) + }) + }).start(), this.nameLabel.string = a, this.descLabel.string = "昨日的话题PK战", this.winLabel.string = "你所在的羊队胜出" + }, i([d(cc.Node)], e.prototype, "maskNode", void 0), i([d(cc.Node)], e.prototype, "popNode", void 0), i([d(cc.Label)], e.prototype, "nameLabel", void 0), i([d(cc.Node)], e.prototype, "bgFlashSP", void 0), i([d(cc.Node)], e.prototype, "sheepSP", void 0), i([d(cc.Label)], e.prototype, "winLabel", void 0), i([d(cc.Label)], e.prototype, "descLabel", void 0), i([p], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/spine": "spine", + "../manager/GameManager": "GameManager" + } + ], + transitionsLayer: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "1496aPelvpJyp4OMHFbWe8I", "transitionsLayer"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/enumConfig"), + c = t("../common/native/audio"), + s = t("../common/spine"), + l = cc._decorator, + u = l.ccclass, + p = l.property, + d = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.sheepSp = null, e.playing = !1, e.animCallBack = null, e + } + return a(e, t), e.prototype.start = function() { + cc.game.on(r.EMITKEY.SHOWTRANSITLAYER, this.playTransitionLayerAnim, this) + }, e.prototype.playTransitionLayerAnim = function(t) { + if (!this.playing) { + var e = this; + this.playing = !0, this.animCallBack = t, this.sheepSp.active = !0, c.default.playAudioMusic("audio/sound/transitFont.mp3", !1), this.sheepSp.getComponent(s.default).setFrameEventCb("Turnarounds", function(t) { + console.log("专场动画 ### ", t), e.animCallBack(e.playAnimOpen.bind(e)) + }), this.sheepSp.getComponent(s.default).play("Interlude", 1, function() { + e.playing = !1, e.sheepSp.active = !1, console.log("专场动画 end ###") + }) + } + }, e.prototype.playAnimOpen = function() { + console.log("转场动画切换 ### ") + }, i([p(cc.Node)], e.prototype, "sheepSp", void 0), i([u], e) + }(cc.Component); + o.default = d, cc._RF.pop() + }, { + "../common/enumConfig": "enumConfig", + "../common/native/audio": "audio", + "../common/spine": "spine" + } + ], + "tt-sdk": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "0d66ayRO/dGya2ZzHsK5JHr", "tt-sdk"), Object.defineProperty(o, "__esModule", { + value: !0 + }); + var n = function() { + function t() {} + return t.init = function() { + cc.sys.platform == cc.sys.BYTEDANCE_GAME && tt.showShareMenu({ + success: function() { + console.log("[tt] 已成功显示转发按钮") + }, + fail: function(t) { + console.log("[tt] showShareMenu 调用失败", t.errMsg) + }, + complete: function() { + console.log("[tt] showShareMenu 调用完成") + } + }) + }, t.vibrateShort = function() { + tt.vibrateShort({}) + }, t.vibrateLong = function() { + tt.vibrateLong({}) + }, t.login = function() { + tt.login({ + success: function(t) { + console.log("[tt] 登录成功", t) + }, + fail: function(t) { + console.log("[tt] 登录失败", t) + } + }) + }, t.checkSession = function() { + tt.checkSession({ + success: function() { + console.log("[tt] session 未过期") + }, + fail: function() { + console.log("[tt] session 已过期,需要重新登录"), this.login() + } + }) + }, t.getSetting = function() { + tt.checkSession({ + success: function(t) { + console.log("[tt] -------------getSetting 获取用户当前的授权状态成功-----------", t), t.errMsg + }, + fail: function(t) { + console.log("[tt] -------------getSetting 获取用户当前的授权状态失败-----------", t) + } + }) + }, t.openSetting = function() { + tt.openSetting({ + success: function(t) { + console.log("[tt] -------------openSetting success-----------", t) + }, + complete: function(t) { + console.log("[tt] -------------openSetting complete-----------", t) + }, + fail: function(t) { + console.log("[tt] -------------openSetting fail-----------", t) + } + }) + }, t.authorize = function() { + tt.authorize({ + scope: "scope.userInfo", + success: function(t) { + console.log("[tt] authorize success", t) + }, + complete: function(t) { + console.log("[tt] authorize complete", t) + }, + fail: function(t) { + console.log("[tt] authorize fail", t) + } + }) + }, t.recorderStart = function() { + if (cc.sys.platform == cc.sys.BYTEDANCE_GAME) try { + console.log("开始录屏 ###### "), tt.getGameRecorderManager().start({ + duration: 300 + }) + } catch (t) { + cc.warn(t) + } + }, t.recorderStop = function() { + if (cc.sys.platform == cc.sys.BYTEDANCE_GAME) { + console.log("录屏结束stop ###### "); + try { + tt.getGameRecorderManager().stop() + } catch (t) { + cc.warn(t) + } + } + }, t.recorderPause = function() { + cc.sys.platform == cc.sys.BYTEDANCE_GAME && (console.log("录屏结束pause ###### "), tt.getGameRecorderManager().pause()) + }, t.recorderResume = function() { + cc.sys.platform == cc.sys.BYTEDANCE_GAME && (console.log("录屏结束resume ###### "), tt.getGameRecorderManager().resume()) + }, t.setVideoPath = function(t) { + this.videoPath = t + }, t.shareTemplate = function(t) { + cc.sys.platform == cc.sys.BYTEDANCE_GAME ? tt.shareAppMessage({ + templateId: "gf33jlfc0h1k415a7o", + query: "", + success: function() { + console.log("分享成功"), t(!0) + }, + fail: function() { + console.log("分享失败"), t(!1) + } + }) : t(!0) + }, t.shareAppMessage = function(t) { + var e = t.success, + o = t.fail, + n = t.url; + console.log("[tt] [sdk][tt] share app message", n), n || (n = this.videoPath); + try { + tt.shareAppMessage({ + channel: "video", + query: "", + templateId: "", + title: "羊了个羊", + desc: "看看大家都喜欢什么羊", + extra: { + videoPath: n, + videoTopics: ["羊了个羊"] + }, + success: function() { + e && e(), console.log("[tt] 分享视频成功") + }, + fail: function(t) { + o && o(), console.log("[tt] 分享视频失败", t) + } + }) + } catch (a) { + cc.warn("share app message err", a) + } + }, t.rewardVideoAd = function(t) { + var e = this; + this.onRewardVideoAdSuccess = t.success, this.onRewardVideoAdFail = t.fail, this.rewardAd ? this.rewardAd.show() : (this.rewardAd = tt.createRewardedVideoAd({ + adUnitId: t.id + }), this.rewardAd.onLoad(function() { + e.rewardAd.show() + }), this.rewardAd.onError(function(t) { + e.onRewardVideoAdFail && e.onRewardVideoAdFail(), cc.warn("tt reward video ad error", t) + }), this.rewardAd.onClose(function(t) { + t.isEnded && e.onRewardVideoAdSuccess && e.onRewardVideoAdSuccess(), e.onRewardVideoAdFail && e.onRewardVideoAdFail() + })) + }, t.setClipboardData = function(t) { + tt.setClipboardData({ + data: t, + success: function() { + tt.getClipboardData({ + success: function(t) { + console.log("tt get clipboard data:", t.data) + } + }) + } + }) + }, t.showBannerAd = function(t) { + var e = this; + this.onRewardBannerAdSuccess = t.success, this.onRewardBannerAdFail = t.fail, this.bannerAd ? this.bannerAd.show() : (this.bannerAd = tt.createBannerAd({ + adUnitId: t.id, + adIntervals: 30, + style: { + left: 0, + top: cc.winSize.height, + width: 300 + } + }), this.bannerAd.onLoad(function() { + e.bannerAd.show() + }), this.bannerAd.onError(function(t) { + e.onRewardBannerAdFail && e.onRewardBannerAdFail(), cc.warn("tt reward video ad error", t) + })) + }, t.hideBannerAd = function() { + this.bannerAd && this.bannerAd.hide() + }, t.showInterstitialAd = function() {}, t.showRewardVideoAd = function() {}, t.focusDouYin = function() { + cc.sys.platform == cc.sys.BYTEDANCE_GAME && tt.openAwemeUserProfile({ + success: function(t) { + console.log(t) + } + }) + }, t.isSupportFocusDouYin = function() { + if (cc.sys.platform != cc.sys.BYTEDANCE_GAME) return !1; + for (var t = tt.getSystemInfoSync(), e = t.system, o = t.SDKVersion, n = t.version, a = t.appName, i = (e.split(" "), n.split(".")), r = 0; r < i.length; r++) i[r].length < 2 && (i[r] = "0" + i[r]); + return !(o.replace(/\./g, "") < 1840) && "Douyin" == a + }, t.addShortcut = function(t) { + cc.sys.platform == cc.sys.BYTEDANCE_GAME && tt.addShortcut({ + success: function() { + console.log("添加桌面成功"), t && t(!0) + }, + fail: function(e) { + console.log("添加桌面失败", e.errMsg), t && t(!1) + } + }) + }, t.isSupportShortcut = function() { + if (cc.sys.platform != cc.sys.BYTEDANCE_GAME) return !1; + var t = tt.getSystemInfoSync(); + console.log("sdkversion = " + JSON.stringify(t)); + for (var e = t.system, o = t.SDKVersion, n = t.version, a = (e.split(" "), n.split(".")), i = 0; i < a.length; i++) a[i].length < 2 && (a[i] = "0" + a[i]); + var r = o.replace(/\./g, ""); + return console.log("sdkversion = " + r), !(r < 2460) + }, t.getSystemInfo = function() { + if (cc.sys.platform == cc.sys.BYTEDANCE_GAME) return tt.getSystemInfoSync() + }, t.gameBox = function() { + if (cc.sys.platform == cc.sys.BYTEDANCE_GAME && (tt.onMoreGamesModalClose(function(t) { + console.log("modal closed", t) + }), tt.onNavigateToMiniGameBox(function(t) { + console.log("box = " + t.errCode), console.log("box = " + t.errMsg) + }), "ios" !== tt.getSystemInfoSync().platform)) { + var t = tt.getLaunchOptionsSync(); + console.log("options = ", JSON.stringify(t)), tt.showMoreGamesModal({ + appLaunchOptions: [{ + appId: "ttb06fc6d22f51b12b02", + query: "foo=bar&baz=qux", + extraData: {} + }, { + appId: "tte3e995547cd7daab02", + query: "foo=bar&baz=qux", + extraData: {} + }], + success: function(t) { + console.log("success", t.errMsg) + }, + fail: function(t) { + console.log("fail", t.errMsg) + } + }) + } + }, t.videoPath = "", t.rewardAd = null, t.onRewardVideoAdSuccess = null, t.onRewardVideoAdFail = null, t.bannerAd = null, t.onRewardBannerAdSuccess = null, t.onRewardBannerAdFail = null, t.interstitialAd = null, t.onRewardInterstitialAdSuccess = null, t.onRewardInterstitialAdFail = null, t + }(); + o.default = n, n.init(), cc._RF.pop() + }, {} + ], + "typed-event": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "a986cr5ta9GR5lVg0qHZvFl", "typed-event"), Object.defineProperty(o, "__esModule", { + value: !0 + }), o.TypedEvent = void 0; + o.TypedEvent = function() { + var t = this; + this.listeners = [], this.listenersOncer = [], this.on = function(e) { + return t.listeners.push(e), { + dispose: function() { + return t.off(e) + } + } + }, this.once = function(e) { + t.listenersOncer.push(e) + }, this.off = function(e) { + var o = t.listeners.indexOf(e); + o > -1 && t.listeners.splice(o, 1) + }, this.emit = function(e) { + if (t.listeners.forEach(function(t) { + return t(e) + }), t.listenersOncer.length > 0) { + var o = t.listenersOncer; + t.listenersOncer = [], o.forEach(function(t) { + return t(e) + }) + } + }, this.pipe = function(e) { + return t.on(function(t) { + return e.emit(t) + }) + } + }, cc._RF.pop() + }, {} + ], + uiControler: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "81349GiDV5P+4W7p0Ox2i/o", "uiControler"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("./mapEditor"), + c = t("./newLevelPop"), + s = t("./selectLevelPop"), + l = t("./setBlockNumPop"), + u = t("../common/config"), + p = t("../common/dataTs"), + d = t("./editorGameLayer"), + h = t("./saveAsPop"), + f = cc._decorator, + m = f.ccclass, + g = f.property, + y = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mapEditorNode = null, e.setBlockNumPop = null, e.selectLevelPop = null, e.newLevelPop = null, e.saveAsPop = null, e.editorGameLayer = null, e.levelNumLabel = null, e.blockNumLabel = null, e + } + return a(e, t), e.prototype.onLoad = function() {}, e.prototype.start = function() { + cc.game.on("initLevelData", this.initLevelData, this), cc.game.on("setBlockNum", this.showBlockNum, this), cc.game.on("saveAsNewMap", this.saveAsNewMap, this) + }, e.prototype.selectLevelFun = function() { + console.log("编辑关卡"), this.selectLevelPop.getComponent(s.default).showSelectLevelPop() + }, e.prototype.newLevelFun = function() { + console.log("新建关卡"), this.newLevelPop.getComponent(c.default).showNewLevelPop() + }, e.prototype.chooseMapSizeFun = function(t, e) { + cc.game.emit("refreshMapSizeData", u.default.mapType[e]) + }, e.prototype.saveAsShowLayer = function() { + console.log("另存为关卡"), this.saveAsPop.getComponent(h.default).showSaveAsPop() + }, e.prototype.saveLevelMapFun = function() { + console.log("保存关卡"); + var t = this.mapEditorNode.getComponent(r.default).levelID, + e = this.mapEditorNode.getComponent(r.default).newLevelDataObj; + this.checkMapIsRight(e) ? p.default.setLevelMapData(t, e) : console.log("关卡配置错误") + }, e.prototype.checkMapIsRight = function(t) { + var e = 0, + o = 0, + n = t, + a = n.levelData; + for (var i in a) + for (var r in a[i]) 0 == a[i][r].type ? e++ : o++; + if (console.log("blockNum:", e), console.log("blockTypeNum:", o), e % 3 != 0) return console.log("空白块不是3的倍数"), cc.game.emit("showTips", "空白块不是3的倍数"), !1; + if (o % 3 != 0) return console.log("类型块不是3的倍数"), cc.game.emit("showTips", "类型块不是3的倍数"), !1; + var c = n.blockTypeData, + s = 0; + for (var i in c) s += c[i]; + return console.log("typeNum:", s), s == e / 3 || (console.log("块类型设置数量错误"), cc.game.emit("showTips", "块类型设置数量错误"), !1) + }, e.prototype.saveAsNewMap = function(t) { + var e = this.mapEditorNode.getComponent(r.default).newLevelDataObj; + e.levelKey = t, p.default.setLevelMapData(t, e); + var o = { + newLevelData: e + }; + cc.game.emit("initLevelData", o) + }, e.prototype.setBlockTypeFun = function() { + console.log("设置本关的图块类型数量"); + var t = 0, + e = this.mapEditorNode.getComponent(r.default).newLevelDataObj, + o = e.levelData; + for (var n in o) + for (var a in o[n]) 0 == o[n][a].type && t++; + var i = e.blockTypeData; + t % 3 == 0 ? this.setBlockNumPop.getComponent(l.default).showSetBlockPop(t / 3, i) : (console.log("error:块数量不能被整除"), cc.game.emit("showTips", "error:块数量不能被整除"), this.setBlockNumPop.getComponent(l.default).showSetBlockPop(0, i)) + }, e.prototype.selectNewBlockTypeFun = function() { + console.log("选择即将摆放的图块类型") + }, e.prototype.testPlayFun = function() { + console.log("试玩本关卡"), this.mapEditorNode.getComponent(r.default).levelID; + var t = cc.instantiate(this.mapEditorNode.getComponent(r.default).newLevelDataObj); + console.log("data:", t); + var e = [t]; + this.editorGameLayer.getComponent(d.default).initLevelLayer(e) + }, e.prototype.backOffFun = function() { + console.log("回退组块") + }, e.prototype.initLevelData = function(t) { + this.levelNumLabel.string = "当前关卡ID:" + t.newLevelData.levelKey + }, e.prototype.showBlockNum = function() { + if (!this.mapEditorNode.getComponent(r.default).newLevelDataObj) return !1; + var t = this.getAllBlockNum(); + this.blockNumLabel.string = "" + t + }, e.prototype.getAllBlockNum = function() { + var t = 0, + e = this.mapEditorNode.getComponent(r.default).newLevelDataObj.levelData; + for (var o in e) t += e[o].length; + return t + }, i([g(cc.Node)], e.prototype, "mapEditorNode", void 0), i([g(cc.Node)], e.prototype, "setBlockNumPop", void 0), i([g(cc.Node)], e.prototype, "selectLevelPop", void 0), i([g(cc.Node)], e.prototype, "newLevelPop", void 0), i([g(cc.Node)], e.prototype, "saveAsPop", void 0), i([g(cc.Node)], e.prototype, "editorGameLayer", void 0), i([g(cc.Label)], e.prototype, "levelNumLabel", void 0), i([g(cc.Label)], e.prototype, "blockNumLabel", void 0), i([m], e) + }(cc.Component); + o.default = y, cc._RF.pop() + }, { + "../common/config": "config", + "../common/dataTs": "dataTs", + "./editorGameLayer": "editorGameLayer", + "./mapEditor": "mapEditor", + "./newLevelPop": "newLevelPop", + "./saveAsPop": "saveAsPop", + "./selectLevelPop": "selectLevelPop", + "./setBlockNumPop": "setBlockNumPop" + } + ], + "uma-sdk": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "31ca3gDt7FFSYn5bPlPkMAx", "uma-sdk"); + var n = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var a = t("../../common/dataTs"), + i = t("../../common/enumConfig"), + r = t("../../common/sdk"), + c = t("../../manager/DateManager"), + s = cc._decorator, + l = s.ccclass, + u = (s.property, function() { + function t() {} + return t.setUserid = function() { + r.default.isPlatform(r.Platform.wx) + }, t.trackEvent = function(t, e) { + void 0 === e && (e = null); + var o = a.default.getUserData(); + e || (e = {}); + var n = Number(a.default.getUserData().registerTime), + s = c.default.format(i.CALENDARNAMES[6], new Date(n)); + e.time = s, e.c_time = Number(s), e.uid = o.userID; + var l = JSON.stringify(e); + e.data = l, r.default.isPlatform(r.Platform.wx) + }, n([l], t) + }()); + o.default = u, cc._RF.pop() + }, { + "../../common/dataTs": "dataTs", + "../../common/enumConfig": "enumConfig", + "../../common/sdk": "sdk", + "../../manager/DateManager": "DateManager" + } + ], + "unlock-build-pop": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "23d5cnrWYpLtbx08aY5sAOq", "unlock-build-pop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/CcJsFunc"), + c = t("../common/dataTs"), + s = t("../common/native/audio"), + l = t("../common/spine"), + u = cc._decorator, + p = u.ccclass, + d = u.property, + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mainCultivateLayer = null, e.flightNode = null, e.spriteNode = null, e.spineTitle = null, e.spineAnim = null, e.receiveBtn = null, e + } + return a(e, t), e.prototype.start = function() { + r.default.addbtnTouchStartScale(this.receiveBtn, this.receiveBtnFunc.bind(this)), r.default.addbtnTouchEndScale(this.receiveBtn, this.receiveBtnFunc.bind(this)), r.default.addbtnTouchCancelScale(this.receiveBtn, this.receiveBtnFunc.bind(this)) + }, e.prototype.hideDefault = function() { + this.flightNode.active = !1, this.spriteNode.active = !1, this.spineTitle.active = !1, this.spineAnim.active = !1, this.receiveBtn.active = !1 + }, e.prototype.showGetRemoveProp = function() { + this.node.active = !0, this.hideDefault(), this.playRemoveAnim() + }, e.prototype.playRemoveAnim = function() { + var t = this, + e = this; + this.spineAnim.active = !0, this.spineAnim.getComponent(l.default).setFrameEventCb("Open1", function() { + console.log("1"), s.default.playAudioMusic("audio/sound/Open2.mp3", !1) + }), this.spineAnim.getComponent(l.default).setFrameEventCb("Eff_Sheen1", function() { + e.spineTitle.active = !0, console.log("2"), s.default.playAudioMusic("audio/sound/Words2.mp3", !1), e.spineTitle.getComponent(l.default).play("Award1_Words1", 1), t.spineAnim.getComponent(l.default).setFrameEventCb("Treasure1", function() { + console.log("3"), e.flightNode.active = !0, t.spriteNode.active = !0, e.receiveBtn.active = !0, e.flightNode.scale = 0, e.spriteNode.scale = 0, e.receiveBtn.scale = 0, cc.tween(e.flightNode).to(.3, { + scale: .8 + }).call(function() { + cc.tween(e.flightNode).by(5, { + angle: 360 + }).repeatForever().start() + }, e).start(), cc.tween(e.spriteNode).to(.1, { + scale: 1.4 + }).to(.1, { + scale: 1 + }).to(.1, { + scale: 1.2 + }).to(.1, { + scale: 1 + }).call(function() { + cc.tween(e.receiveBtn).to(.1, { + scale: 1.3 + }).to(.1, { + scale: 1 + }).start() + }).start() + }) + }), this.spineAnim.getComponent(l.default).play("Ref1_Open3", 1, function() { + console.log("4") + }); + var o = c.default.getUserData(); + o.prop_remove += 2, c.default.saveUserData(o) + }, e.prototype.receiveBtnFunc = function() { + this.node.active = !1 + }, i([d(cc.Node)], e.prototype, "mainCultivateLayer", void 0), i([d(cc.Node)], e.prototype, "flightNode", void 0), i([d(cc.Node)], e.prototype, "spriteNode", void 0), i([d(cc.Node)], e.prototype, "spineTitle", void 0), i([d(cc.Node)], e.prototype, "spineAnim", void 0), i([d(cc.Node)], e.prototype, "receiveBtn", void 0), i([p], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/native/audio": "audio", + "../common/spine": "spine" + } + ], + "unlock-build": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "b4509jR79lK778pfI4KU2y8", "unlock-build"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/dataTs"), + c = t("../common/native/audio"), + s = t("../common/spine"), + l = cc._decorator, + u = l.ccclass, + p = l.property, + d = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.catContent = null, e.unlockBuildBtn = null, e.lightBg = null, e.ribbonNode = null, e.catNode = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.playCatAnimation = function(t) { + void 0 === t && (t = 1); + var e = this; + this.hideDefault(), this.catContent.active = !0, e.catContent.scale = 1; + var o = r.default.getGameConfigData().baseConfigData.catClothesData["cat_" + t]; + o && o.length && (e.ribbonNode.getComponent(cc.Label).string = o[0].name), this.unlockBuildBtn.active = !0, e.unlockBuildBtn.getComponent(s.default).setFrameEventCb("Cat1", function() { + console.log("Cat1 frame ######"), c.default.playAudioMusic("audio/sound/Open2.mp3", !1), e.lightBg.active = !0, e.ribbonNode.active = !0, e.catNode.active = !0, cc.tween(e.lightBg).by(5, { + angle: 360 + }).repeatForever().start(), e.catContent.scale = 0, cc.tween(e.catContent).to(.1, { + scale: 1.1 + }).to(.1, { + scale: 1 + }).start(), e.setCatSpine(t), cc.tween(e.catContent).delay(2).to(.2, { + scale: 1.2 + }).to(.3, { + scale: 0 + }, { + easing: cc.easing.cubicIn + }).call(function() { + e.node.active = !1 + }).start() + }), this.unlockBuildBtn.getComponent(s.default).play("3UnlockCat1", 1, function() { + console.log("3UnlockCat1 播放完成") + }) + }, e.prototype.setCatSpine = function(t) { + var e = this, + o = "Model" + (t < 10 ? "0" + t : t + ""); + this.catNode.getComponent(s.default).loadNewSpine(o, function() { + e.catNode.getComponent(s.default).setNewSkin("00"), e.catNode.getComponent(s.default).play("2_Action1", 1, function() { + e.catNode.getComponent(s.default).play("1_Standby1", 0) + }) + }) + }, e.prototype.hideDefault = function() { + this.unlockBuildBtn.active = !1, this.lightBg.active = !1, this.ribbonNode.active = !1, this.catNode.active = !1 + }, i([p(cc.Node)], e.prototype, "catContent", void 0), i([p(cc.Node)], e.prototype, "unlockBuildBtn", void 0), i([p(cc.Node)], e.prototype, "lightBg", void 0), i([p(cc.Node)], e.prototype, "ribbonNode", void 0), i([p(cc.Node)], e.prototype, "catNode", void 0), i([u], e) + }(cc.Component); + o.default = d, cc._RF.pop() + }, { + "../common/dataTs": "dataTs", + "../common/native/audio": "audio", + "../common/spine": "spine" + } + ], + "upgrade-tip": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "fc6e6B31jVAnbLpM0OJ9CQp", "upgrade-tip"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/CcJsFunc"), + c = t("../common/dataTs"), + s = t("./mainCultivateLayer"), + l = cc._decorator, + u = l.ccclass, + p = l.property, + d = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.iconFish = null, e.iconPoint = null, e.iconNode = null, e.fishNode = null, e.arrowNode = null, e.mainCultivateLayer = null, e.houseData = null, e + } + return a(e, t), e.prototype.start = function() { + r.default.addbtnTouchEndScale(this.iconPoint, this.iconPointEndFunc.bind(this)), r.default.addbtnTouchEndScale(this.iconFish, this.iconFishEndFunc.bind(this)) + }, e.prototype.iconPointEndFunc = function(t) { + t.stopPropagation(), this.mainCultivateLayer && this.mainCultivateLayer.getComponent(s.default).clickUpgradePoint(this) + }, e.prototype.iconFishEndFunc = function(t) { + t.stopPropagation(), this.mainCultivateLayer && this.mainCultivateLayer.getComponent(s.default).clickUpgradeFish(this.houseData, this) + }, e.prototype.showPoint = function(t, e, o) { + void 0 === t && (t = this.houseData), void 0 === e && (e = this.mainCultivateLayer), void 0 === o && (o = !1), this.mainCultivateLayer = e, this.houseData = t, this.iconPoint.active = !0, this.iconFish.active = !1, this.fishNode.getComponent(cc.Label).string = "x" + t.fish, c.default.getUserData().fish >= t.fish ? this.arrowNode.active = !0 : this.arrowNode.active = !1, o && (this.iconPoint.scale = 0, cc.tween(this.iconPoint).delay(.1).to(.5, { + scale: 1 + }).start()); + var n = "rewardIcon/Unlock_Hammer.png"; + "cat" == t.buildType ? (n = "rewardIcon/Unlock_Cat.png", r.default.changeSpriteFrame(this.iconNode, n)) : "skin" == t.buildType ? (n = "rewardIcon/Unlock_Clothing.png", r.default.changeSpriteFrame(this.iconNode, n)) : 1 == t.buildid ? (n = "rewardIcon/Unlock_Brush.png", r.default.changeSpriteFrame(this.iconNode, n)) : r.default.changeSpriteFrame(this.iconNode, n) + }, e.prototype.showFish = function() { + console.log(JSON.stringify(this.houseData)), this.iconPoint.active = !1, this.iconFish.active = !0, this.iconFish.scale = 0, cc.tween(this.iconFish).to(.3, { + scale: 1 + }).start() + }, e.prototype.show = function() { + this.node.active = !0, this.iconPoint.active = !0, this.iconFish.active = !1, this.iconPoint.scale = 0, cc.tween(this.iconPoint).delay(.1).to(.5, { + scale: 1 + }).start() + }, e.prototype.hide = function() { + this.node.active = !1 + }, i([p(cc.Node)], e.prototype, "iconFish", void 0), i([p(cc.Node)], e.prototype, "iconPoint", void 0), i([p(cc.Node)], e.prototype, "iconNode", void 0), i([p(cc.Node)], e.prototype, "fishNode", void 0), i([p(cc.Node)], e.prototype, "arrowNode", void 0), i([u], e) + }(cc.Component); + o.default = d, cc._RF.pop() + }, { + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "./mainCultivateLayer": "mainCultivateLayer" + } + ], + upgradePop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "56493C1WJVBQJG8pH7F9E9g", "upgradePop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../common/CcJsFunc"), + c = t("../common/dataTs"), + s = t("../common/enumConfig"), + l = t("../common/native/audio"), + u = t("../common/spine"), + p = t("../utils/uma/uma-sdk"), + d = cc._decorator, + h = d.ccclass, + f = d.property, + m = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.coinNum = null, e.catNode = null, e.closeBtn = null, e.upgradeBtn = null, e.popNode = null, e.catId = 0, e.clothId = 0, e.callBack = null, e.popCallbackCollect = null, e + } + return a(e, t), e.prototype.start = function() { + r.default.addbtnTouchStartScale(this.closeBtn), r.default.addbtnTouchEndScale(this.closeBtn, this.hideUpgradePop.bind(this)), r.default.addbtnTouchCancelScale(this.closeBtn), r.default.addbtnTouchStartScale(this.upgradeBtn), r.default.addbtnTouchEndScale(this.upgradeBtn, this.upgradeFunc.bind(this)), r.default.addbtnTouchCancelScale(this.upgradeBtn), this.popCallbackCollect = { + playGameCallBack: this.playGameFunc.bind(this) + } + }, e.prototype.playGameFunc = function() {}, e.prototype.showUpgradePop = function(t, e) { + this.node.active = !0, this.catId = t, this.callBack = e, c.default.getGameConfigData().baseConfigData.catClothesData; + for (var o = c.default.getUserData().catClothesData["cat_" + this.catId], n = 0; n < o.length; n++) o[n].isWear && (this.clothId = o[n].clothesID, this.setCatSpine(this.clothId, o[n].clothRank + 1)); + cc.tween(this.popNode).set({ + scale: 0, + opacity: 0 + }).to(.2, { + scale: 1.1, + opacity: 255 + }, { + easing: cc.easing.quadOut + }).to(.2, { + scale: 1 + }).start() + }, e.prototype.hideUpgradePop = function() { + this.node.active = !1, this.callBack && this.callBack(!1) + }, e.prototype.upgradeFunc = function() { + console.log("升级服装"); + var t = c.default.upgradeClothesLevel(this.catId, this.clothId); + if (t) this.node.active = !1, cc.game.emit(s.EMITKEY.MAINUPDATEUI), this.callBack(!0), l.default.playAudioMusic("audio/sound/Clothe_Upgrade.mp3", !1); + else { + var e = { + popName: "nothingPop", + showPopData: { + popCallbackCollect: this.popCallbackCollect, + popType: 0 + } + }; + cc.game.emit("showPop", e), this.hideUpgradePop() + } + var o = t ? "升级成功" : "升级失败"; + p.default.trackEvent("house_clothing_upgrade", { + upgrade: o + }) + }, e.prototype.setCatSpine = function(t, e) { + var o = this, + n = "Model" + (this.catId < 10 ? "0" + this.catId : this.catId + ""); + this.catNode.getComponent(u.default).loadNewSpine(n, function() { + var n = t % 1e3, + a = n < 10 ? "0" + n : n + ""; + o.catNode.getComponent(u.default).setNewSkin(a), o.catNode.getComponent(u.default).play("1_Standby1", 0); + var i = 1; + i = e < 2 ? 0 : 1; + for (var r = ["Collar2", "Collar1"], c = 0; c < r.length; c++) o.catNode.getComponent("spine").spine.getAttachment(r[c], r[c]) && (o.catNode.getComponent("spine").spine.getAttachment(r[c], r[c]).color.a = i); + i = e < 3 ? 0 : 1; + var s = ["Body1", "Arm_L1", "Arm_R1", "Cloak1"]; + for (c = 0; c < s.length; c++) o.catNode.getComponent("spine").spine.getAttachment(s[c], s[c]) && (o.catNode.getComponent("spine").spine.getAttachment(s[c], s[c]).color.a = i) + }) + }, i([f(cc.Label)], e.prototype, "coinNum", void 0), i([f(cc.Node)], e.prototype, "catNode", void 0), i([f(cc.Node)], e.prototype, "closeBtn", void 0), i([f(cc.Node)], e.prototype, "upgradeBtn", void 0), i([f(cc.Node)], e.prototype, "popNode", void 0), i([h], e) + }(cc.Component); + o.default = m, cc._RF.pop() + }, { + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../common/native/audio": "audio", + "../common/spine": "spine", + "../utils/uma/uma-sdk": "uma-sdk" + } + ], + util: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "4a098EKhTpIr40rNw8ENK2v", "util"), Object.defineProperty(o, "__esModule", { + value: !0 + }); + var n = { + isType: function(t, e) { + return Object.prototype.toString.call(t).slice(8, -1).toLowerCase() == e + }, + arrayRemoveEqu: function(t) { + for (var e = [], o = 0; o < t.length; o++) - 1 == e.indexOf(t[o]) && e.push(t[o]); + return e + }, + copy: function(t) { + var e = JSON.stringify(t); + return JSON.parse(e) + }, + inRect: function(t, e, o, n, a, i) { + return t >= o && e >= n && t <= o + a && e <= n + i ? 1 : 0 + }, + pointLength: function(t, e) { + var o = e.x - t.x, + n = e.y - t.y; + return o * o + n * n + }, + join: function(t, e) { + void 0 === e && (e = ","); + var o = [], + n = 0; + for (var a in t) o[n] = t[a], n++; + return o.join(e) + }, + concat: function() { + var t = {}; + for (var e in arguments) + for (var o in arguments[e]) t[o] = arguments[e][o]; + return t + }, + toArray: function(t, e) { + var o = []; + if (e) + for (var n in t) o.push(n, t[n]); + else + for (var n in t) o.push(t[n]); + return o + }, + valueArray: function(t, e) { + var o = []; + for (var n in t) o.push(t[n][e]); + return o + }, + getObjectLen: function(t) { + var e = 0; + for (var o in t) e++; + return e + }, + formatTime: function(t) { + var e = [0, 0, 0, 0, 0]; + return e[4] = t % 1e3, e[3] = Math.floor(t / 1e3), e[3] >= 60 && (e[2] = Math.floor(e[3] / 60), e[3] = e[3] % 60, e[2] >= 60 && (e[1] = Math.floor(e[2] / 60), e[2] = e[2] % 60, e[1] >= 24 && (e[0] = Math.floor(e[1] / 24), e[1] = e[1] % 24))), e + }, + countdownTime: function(t) { + var e = [0, 0, 0]; + return e[0] = Math.floor(t / 3600), e[1] = Math.floor(t % 3600 / 60), e[2] = Math.floor(t % 60), e + }, + getTime: function(t, e, o) { + var n = "", + a = "", + i = new Date(t); + switch (1 == o ? (n += i.getFullYear() + "/", n += this.fixLength(i.getMonth() + 1, 2) + "/", n += this.fixLength(i.getDate(), 2)) : 2 == o ? (n += i.getFullYear() + "-", n += this.fixLength(i.getMonth() + 1, 2) + "-", n += this.fixLength(i.getDate(), 2)) : (n += i.getFullYear() + "年", n += this.fixLength(i.getMonth() + 1, 2) + "月", n += this.fixLength(i.getDate(), 2) + "日"), a += this.fixLength(i.getHours(), 2) + ":", a += this.fixLength(i.getMinutes(), 2) + ":", a += this.fixLength(i.getSeconds(), 2), e) { + case 1: + return n; + case 2: + return n + " " + a; + default: + return a + } + }, + rnd: function(t, e) { + return null == e && (t = 0), t + Math.floor(Math.random() * (e - t + 1)) + }, + rndArray: function(t) { + for (var e = t.concat(), o = []; e.length > 0;) o.push(e.splice(this.rnd(e.length - 1), 1)[0]); + return o + }, + inArray: function(t, e) { + for (var o in e) + if (t == e[o]) return o; + return -1 + }, + countArray: function(t, e, o) { + var n = 0; + for (var a in t) e == t[a] && n++; + return o && (n = t.length - n), n + }, + fixLength: function(t, e, o, n) { + for (t += "", arguments.length < 3 && (o = 0), arguments.length < 4 && (n = "0"); t.length < e;) 0 == o ? t = n + t : t += n; + return t.length > e && (t = 0 == o ? t.slice(-e) : t.slice(0, e)), t + }, + fixNumber: function(t, e, o) { + var n = Math.pow(10, e); + return Math[o] ? Math[o](t * n) / n : Math.round(t * n) / n + }, + formatNumber: function(t, e, o) { + if (!isNaN(t) && (arguments.length < 2 && (e = 1), arguments.length < 3 && (o = -1), o > -1 && (t = parseFloat(t).toFixed(o)), 1 == e)) { + var n = t.toString().split("."), + a = n[0], + i = ""; + for (void 0 !== n[1] && (i = "." + n[1]), n = []; a.length > 3;) n.unshift(a.slice(-3)), a = a.slice(0, a.length - 3); + a.length > 0 && n.unshift(a), t = n.join() + i + } + return t + }, + fixValue: function(t, e, o, n) { + return t = Math[n] ? Math[n](t) : Math.round(t), null != e && t < e ? t = e : null != o && t > o && (t = o), t + }, + isInt: function(t, e, o) { + var n = parseInt(t); + return n == t ? null != e && n < e || null != o && n > o ? 0 : 1 : 0 + }, + unsignInt: function(t, e) { + return t <= 0 ? 0 : Math[e] ? Math[e](t) : Math.round(t) + }, + getKey: function(t, e) { + for (var o in t) + if (t[o] == e) return o + }, + getGrid: function(t, e, o, n) { + for (var a = [], i = 0; i < e; i++) + for (var r = 0; r < t; r++) a[i * t + r] = {}, a[i * t + r].y = i * n, a[i * t + r].x = r * o; + return a + }, + getByteLen: function(t) { + for (var e = 0, o = 0; o < t.length; o++) t.charCodeAt(o) > 255 ? e += 2 : e++; + return e + }, + simpleSplit: function(t, e) { + var o = []; + return -1 == t.indexOf(e) ? (o[0] = t, o[1] = "") : (o[0] = t.slice(0, t.indexOf(e)), o[1] = t.slice(t.indexOf(e) + 1)), o + }, + getSum: function(t) { + var e = 0; + for (var o in t) e += t[o]; + return e + }, + getAverage: function(t) { + var e = 0, + o = 0; + for (var n in t) e += t[n], o++; + return e / o + }, + parseToObject: function(t, e, o, n) { + n = n || "."; + var a = e.split(n), + i = a.pop(), + r = t; + for (var c in a) r = r[a[c]]; + return null != o && (r[i] = o), r[i] + }, + multicall: function(t, e) { + var o = e; + switch (o.length) { + case 0: + t(); + break; + case 1: + t(o[0]); + break; + case 2: + t(o[0], o[1]); + break; + case 3: + t(o[0], o[1], o[2]); + break; + case 4: + t(o[0], o[1], o[2], o[3]); + break; + case 5: + t(o[0], o[1], o[2], o[3], o[4]); + break; + case 6: + t(o[0], o[1], o[2], o[3], o[4], o[5]); + break; + case 7: + t(o[0], o[1], o[2], o[3], o[4], o[5], o[6]); + break; + case 8: + t(o[0], o[1], o[2], o[3], o[4], o[5], o[6], o[7]); + break; + case 9: + t(o[0], o[1], o[2], o[3], o[4], o[5], o[6], o[7], o[8]); + break; + case 10: + t(o[0], o[1], o[2], o[3], o[4], o[5], o[6], o[7], o[8], o[9]) + } + }, + getPointAlpha: function(t, e, o) { + var n = window.document.createElement("canvas"), + a = n.getContext("2d"); + return n.width = 1, n.height = 1, a.drawImage(t, e, o, 1, 1, 0, 0, 1, 1), a.getImageData(0, 0, 1, 1).data[3] + }, + ajax: function(t, e, o, n) { + e = e || "", n = n || "GET"; + var a = new window.XMLHttpRequest; + a.onreadystatechange = function() { + 4 == a.readyState && 200 == a.status && o(a.responseText) + }, a.open(n, t, !0), a.send(e) + }, + getQueryString: function(t) { + var e = new RegExp("(^|&)" + t + "=([^&]*)(&|$)", "i"), + o = window.location.search.substr(1).match(e); + return null != o ? unescape(o[2]) : null + }, + delayCallbackOnce: function(t, e) { + cc.director.getScheduler().schedule(t, this._defaultTimerTarget, 0, 0, e, !1) + } + }; + o.default = n, cc._RF.pop() + }, {} + ], + wallpaperPrefab: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "5ccb7gpTcZNy6oxSxO1hXsJ", "wallpaperPrefab"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = t("../../pre/itemSub/wallpaperSubPrefab"), + u = t("../../script/common/dataTs"), + p = t("../../script/common/enumConfig"), + d = t("../../script/pop/popSub/wallpaperSv"), + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.content = null, e.wallpaperSubPrefab = null, e.base_title_label = null, e.parentNode = null, e.nodeData = null, e + } + return a(e, t), e.prototype.start = function() {}, e.prototype.setNodeData = function(t, e) { + for (var o in this.parentNode = e, this.nodeData = t, u.default.langCode == p.LangEnum.zhCN && "- Coming soon -" == this.nodeData.titleName ? this.base_title_label.string = "- 敬请期待 -" : this.base_title_label.string = this.nodeData.titleName, this.nodeData.bgArray) { + var n = cc.instantiate(this.wallpaperSubPrefab); + n.getComponent(l.default).setNodeData(this.nodeData.bgArray[o], this), this.content.addChild(n) + } + }, e.prototype.refreshNode = function(t, e) { + this.parentNode = e, this.nodeData = t; + var o = this.content.children; + for (var n in o) o[n].getComponent(l.default).setNodeData(this.nodeData.bgArray[n], this) + }, e.prototype.refreshSubNode = function() { + this.parentNode.getComponent(d.default).refreshSubNode() + }, i([s(cc.Node)], e.prototype, "content", void 0), i([s(cc.Prefab)], e.prototype, "wallpaperSubPrefab", void 0), i([s(cc.Label)], e.prototype, "base_title_label", void 0), i([c], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "../../pre/itemSub/wallpaperSubPrefab": "wallpaperSubPrefab", + "../../script/common/dataTs": "dataTs", + "../../script/common/enumConfig": "enumConfig", + "../../script/pop/popSub/wallpaperSv": "wallpaperSv" + } + ], + wallpaperSubPrefab: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "f4535mVxXNAALqaewBHYpME", "wallpaperSubPrefab"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = cc._decorator, + c = r.ccclass, + s = r.property, + l = t("../../script/common/dataTs"), + u = t("../../script/common/CcJsFunc"), + p = t("../item/wallpaperPrefab"), + d = t("../../script/manager/GameManager"), + h = t("../../script/utils/uma/uma-sdk"), + f = t("../../script/common/enumConfig"), + m = t("../../script/manager/report-common"), + g = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.imgContent = null, e.imgLabel = null, e.imgBorder = null, e.imgLock = null, e.parentNode = null, e.userData = null, e.nodeData = null, e.levelNum = null, e.pictureData = null, e.isReward = !1, e + } + return a(e, t), e.prototype.start = function() { + u.default.addbtnTouchEndScale(this.node, this.clickNodeAction.bind(this)) + }, e.prototype.rewardNodeData = function(t, e) { + void 0 === e && (e = !0), this.isReward = e, this.imgLock.active = !1, this.imgContent.active = !0, this.imgBorder.active = !1; + var o = "pictureIcon/GameBgicon" + t + ".png"; + u.default.changeSpriteFrame(this.imgContent, o), this.imgBorder.getChildByName("mark").active = !1, this.imgLabel.node.active = !1 + }, e.prototype.setNodeData = function(t, e) { + this.isReward = !1, this.parentNode = e, this.nodeData = t, this.userData = l.default.getUserData(), this.levelNum = this.userData.playLevelId, this.pictureData = l.default.getPictureData(), l.default.langCode == f.LangEnum.zhCN ? this.imgLabel.string = this.nodeData.name : this.imgLabel.string = this.nodeData.en_name; + var o = "pictureIcon/GameBgicon" + this.nodeData.bgID + ".png"; + u.default.changeSpriteFrame(this.imgContent, o), this.levelNum > this.nodeData.unlockNum ? (this.imgLock.active = !1, this.imgContent.active = !0, this.imgBorder.active = !1, this.pictureData.bgNum == this.nodeData.bgID ? this.imgBorder.active = !0 : this.imgBorder.active = !1) : (this.imgLock.active = !0, this.imgContent.active = !1, this.imgBorder.active = !1), d.default.getInstance().collectionMark.bgNum == t.bgID ? (this.imgBorder.getChildByName("mark").active = !0, d.default.getInstance().collectionMark.bgNum = 0) : this.imgBorder.getChildByName("mark").active = !1 + }, e.prototype.clickNodeAction = function() { + if (u.default.addClickAudio(), this.levelNum >= this.nodeData.unlockNum && !this.isReward) { + this.pictureData.bgNum != this.nodeData.bgID && m.default.reportTACommon("collar_bg", { + bg_before: this.pictureData.bgNum, + bg_after: this.nodeData.bgID + }), this.imgBorder.active = !0, this.pictureData.bgNum = this.nodeData.bgID, l.default.savePictureData(this.pictureData), this.parentNode.getComponent(p.default).refreshSubNode(), this.imgBorder.getChildByName("mark").active = !1; + var t = this.nodeData.bgID + ""; + h.default.trackEvent("collar_bg", { + ID: t, + c_ID: Number(t) + }), cc.game.emit(f.EMITKEY.UPDATEPICTURE) + } + }, i([s(cc.Node)], e.prototype, "imgContent", void 0), i([s(cc.Label)], e.prototype, "imgLabel", void 0), i([s(cc.Node)], e.prototype, "imgBorder", void 0), i([s(cc.Node)], e.prototype, "imgLock", void 0), i([c], e) + }(cc.Component); + o.default = g, cc._RF.pop() + }, { + "../../script/common/CcJsFunc": "CcJsFunc", + "../../script/common/dataTs": "dataTs", + "../../script/common/enumConfig": "enumConfig", + "../../script/manager/GameManager": "GameManager", + "../../script/manager/report-common": "report-common", + "../../script/utils/uma/uma-sdk": "uma-sdk", + "../item/wallpaperPrefab": "wallpaperPrefab" + } + ], + wallpaperSv: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "e1a4baQrCVBT5Hpjf/VGnTF", "wallpaperSv"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../common/dataTs"), + c = t("../../../pre/item/wallpaperPrefab"), + s = t("../../../i18n/i18n"), + l = t("../../../i18n/gd_language"), + u = cc._decorator, + p = u.ccclass, + d = u.property, + h = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.content = null, e.wallpaperPrefab = null, e.dataArray = [], e.i18nArray = [], e + } + return a(e, t), e.prototype.start = function() { + this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_commuter_road)), this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_starry)), this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_lamp)), this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_harbour)), this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_snow)), this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_dinner)), this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_moon)), this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_lazy_time)), this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_waiting_alone)), this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_lighthouse)), this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_meteor_shower)), this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_harbour)), this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_lamp)), this.content.removeAllChildren(), this.dataArray = r.default.gameConfigData.baseConfigData.bgData; + var t = 0; + for (var e in this.dataArray) + for (var o in this.dataArray[e].bgArray) t < this.i18nArray.length && (this.dataArray[e].bgArray[o].en_name = this.i18nArray[t]), t++; + for (var e in this.dataArray) { + var n = cc.instantiate(this.wallpaperPrefab); + n.getComponent(c.default).setNodeData(this.dataArray[e], this), this.content.addChild(n) + } + }, e.prototype.onEnable = function() { + this.dataArray.length > 0 && this.refreshSubNode() + }, e.prototype.refreshSubNode = function() { + var t = this.content.children; + for (var e in t) { + var o = this.dataArray[e]; + t[e].getComponent(c.default).refreshNode(o, this) + } + }, i([d(cc.Node)], e.prototype, "content", void 0), i([d(cc.Prefab)], e.prototype, "wallpaperPrefab", void 0), i([p], e) + }(cc.Component); + o.default = h, cc._RF.pop() + }, { + "../../../i18n/gd_language": "gd_language", + "../../../i18n/i18n": "i18n", + "../../../pre/item/wallpaperPrefab": "wallpaperPrefab", + "../../common/dataTs": "dataTs" + } + ], + wardrobeLayer: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "4448eEzJr1BMqSaSIx1uqZX", "wardrobeLayer"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../../pre/main/clothesPrefab"), + c = t("../common/CcJsFunc"), + s = t("../common/dataTs"), + l = t("../common/enumConfig"), + u = t("../pop/upgradePop"), + p = t("../utils/uma/uma-sdk"), + d = t("./mainCultivateLayer"), + h = cc._decorator, + f = h.ccclass, + m = h.property, + g = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.mainCultivateLayer = null, e.changeClothesNode = null, e.scrollContent = null, e.clothesPrefab = null, e.btnLayer = null, e.ribbonNode = null, e.ribbonLabel = null, e.rankBtn = null, e.levelLabel1 = null, e.levelLabel2 = null, e.upgradePop = null, e.challengeBtn = null, e.clothPadding = 20, e.catId = 0, e.clothNodeArray = [], e.cultivateComp = null, e.isShowing = !1, e + } + return a(e, t), e.prototype.start = function() { + c.default.addbtnTouchStartScale(this.rankBtn), c.default.addbtnTouchEndScale(this.rankBtn, this.rankFunc.bind(this)), c.default.addbtnTouchCancelScale(this.rankBtn), c.default.addbtnTouchStartScale(this.challengeBtn), c.default.addbtnTouchEndScale(this.challengeBtn, this.challengeBtnFunc.bind(this)), c.default.addbtnTouchCancelScale(this.challengeBtn) + }, e.prototype.showWardrobelLayer = function(t, e) { + var o = this; + console.log("catId = ", t), this.isShowing || (this.isShowing = !0, this.cultivateComp = e, this.catId = t, this.scrollContent.removeAllChildren(), this.changeClothesNode.active = !0, this.changeClothesNode.y = -cc.winSize.height / 2, this.initCatClothesNode(), cc.tween(this.changeClothesNode).by(.3, { + y: 350 + }, { + easing: cc.easing.cubicOut + }).start(), this.cultivateComp.houseToBigMiddle(this.catId), cc.tween(this.changeClothesNode).delay(.3).call(function() { + o.showBtnLayer(!0) + }, this).start()) + }, e.prototype.hideWardrobelLayer = function() { + var t = this; + 0 != this.catId && (this.catId = 0, this.isShowing = !1, this.changeClothesNode.stopAllActions(), cc.tween(this.changeClothesNode).to(.2, { + y: -cc.winSize.height / 2 + }).call(function() { + t.changeClothesNode.active = !1 + }, this).start(), this.hideBtnLayer()) + }, e.prototype.showBtnLayer = function(t) { + this.btnLayer.active = !0; + for (var e = s.default.getUserData().catClothesData["cat_" + this.catId], o = 0; o < e.length; o++) + if (e[o].isWear) { + var n = s.default.getClothesData(this.catId, e[o].clothesID); + this.ribbonLabel.string = n.name, console.log("clothesData = " + JSON.stringify(e[o])), e[o].clothRank >= 3 ? (this.rankBtn.active = !1, this.challengeBtn.active = !1) : (2 == n.skin ? (this.challengeBtn.active = !0, this.rankBtn.active = !1) : (this.challengeBtn.active = !1, this.rankBtn.active = !0), this.levelLabel1.string = e[o].clothRank + "", this.levelLabel2.string = e[o].clothRank + 1 + "") + } + t && (cc.tween(this.ribbonNode).set({ + scale: 0 + }).to(.3, { + scale: 1 + }, { + easing: cc.easing.backOut + }).start(), cc.tween(this.rankBtn).set({ + scale: 0 + }).delay(.15).to(.3, { + scale: 1 + }, { + easing: cc.easing.cubicOut + }).start()) + }, e.prototype.hideBtnLayer = function() { + this.btnLayer.active = !1 + }, e.prototype.rankFunc = function(t) { + t.stopPropagation(), cc.log("打开升级弹窗"), this.upgradePop.getComponent(u.default).showUpgradePop(this.catId, this.popCallbackFunc.bind(this)) + }, e.prototype.challengeBtnFunc = function() { + this.hideWardrobelLayer(), this.mainCultivateLayer.getComponent(d.default).houseToMinDefault(), cc.game.emit(l.EMITKEY.UPDATETABBARRECEIVE, 2) + }, e.prototype.popCallbackFunc = function(t) { + void 0 === t && (t = !1), this.cultivateComp.refreshCatCloth(this.catId, t, t), this.refreshClothSelect(), this.showBtnLayer(!1) + }, e.prototype.initCatClothesNode = function() { + var t = s.default.getGameConfigData().baseConfigData.catClothesData, + e = s.default.getUserData().catClothesData; + console.log("baseConfig catClothesData = ", t), console.log("userData userClothesData = ", e), this.clothNodeArray = []; + for (var o = "cat_" + this.catId, n = t[o], a = 0; a < n.length; a++) this.addClotheNode(a, n[a], e[o]) + }, e.prototype.refreshClothSelect = function() { + for (var t = s.default.getUserData().catClothesData, e = "cat_" + this.catId, o = 0; o < this.clothNodeArray.length; o++) { + var n = this.clothNodeArray[o].getComponent(r.default).clothData; + this.clothNodeArray[o].getComponent(r.default).setClothNodeData(n, this, this.catId, t[e]) + } + }, e.prototype.addClotheNode = function(t, e, o) { + var n = cc.instantiate(this.clothesPrefab), + a = n.width; + n.x = (a + this.clothPadding) * t + a / 2, n.getComponent(r.default).setClothNodeData(e, this, this.catId, o), this.scrollContent.addChild(n), this.scrollContent.width = (t + 1) * (a + this.clothPadding), this.clothNodeArray.push(n) + }, e.prototype.dressCloth = function(t) { + var e = "cat_" + this.catId, + o = s.default.getUserData(), + n = o.catClothesData[e]; + for (var a in n) n[a].clothesID == t ? n[a].isWear = !0 : n[a].isWear = !1; + s.default.saveUserData(o), this.refreshClothSelect(), this.cultivateComp.refreshCatCloth(this.catId, !1, !0), this.showBtnLayer(!1); + var i = t + ""; + p.default.trackEvent("house_clothing", { + clothID: i + }) + }, i([m(cc.Node)], e.prototype, "mainCultivateLayer", void 0), i([m(cc.Node)], e.prototype, "changeClothesNode", void 0), i([m(cc.Node)], e.prototype, "scrollContent", void 0), i([m(cc.Prefab)], e.prototype, "clothesPrefab", void 0), i([m(cc.Node)], e.prototype, "btnLayer", void 0), i([m(cc.Node)], e.prototype, "ribbonNode", void 0), i([m(cc.Label)], e.prototype, "ribbonLabel", void 0), i([m(cc.Node)], e.prototype, "rankBtn", void 0), i([m(cc.Label)], e.prototype, "levelLabel1", void 0), i([m(cc.Label)], e.prototype, "levelLabel2", void 0), i([m(cc.Node)], e.prototype, "upgradePop", void 0), i([m(cc.Node)], e.prototype, "challengeBtn", void 0), i([f], e) + }(cc.Component); + o.default = g, cc._RF.pop() + }, { + "../../pre/main/clothesPrefab": "clothesPrefab", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../pop/upgradePop": "upgradePop", + "../utils/uma/uma-sdk": "uma-sdk", + "./mainCultivateLayer": "mainCultivateLayer" + } + ], + winPop: [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "e67c6kaMd9Juoslo14wbz9l", "winPop"); + var n, a = this && this.__extends || (n = function(t, e) { + return (n = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(t, e) { + t.__proto__ = e + } || function(t, e) { + for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]) + })(t, e) + }, function(t, e) { + function o() { + this.constructor = t + } + n(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o) + }), + i = this && this.__decorate || function(t, e, o, n) { + var a, i = arguments.length, + r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); + else + for (var c = t.length - 1; c >= 0; c--)(a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r); + return i > 3 && r && Object.defineProperty(e, o, r), r + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var r = t("../api/api-sheep"), + c = t("../common/CcJsFunc"), + s = t("../common/dataTs"), + l = t("../common/enumConfig"), + u = t("../common/spine"), + p = t("../common/util"), + d = t("../manager/data-manager"), + h = t("../manager/DateManager"), + f = t("../manager/GameManager"), + m = t("../manager/report-common"), + g = cc._decorator, + y = g.ccclass, + v = g.property, + b = function(t) { + function e() { + var e = null !== t && t.apply(this, arguments) || this; + return e.titleNode = null, e.barefootNode = null, e.barefootTitle = null, e.barefootDesc = null, e.sheepSp = null, e.sheepFlagSp = null, e.winDescNode = null, e.backBtn = null, e.shareNode = null, e.shareBtn = null, e.noShareBtn = null, e.shareCloseBtn = null, e.timeNode = null, e.flashSp = null, e + } + return a(e, t), e.prototype.start = function() { + c.default.addbtnTouchStartScale(this.backBtn), c.default.addbtnTouchEndScale(this.backBtn, this.backBtnFunc.bind(this)), c.default.addbtnTouchCancelScale(this.backBtn), c.default.addbtnTouchStartScale(this.shareBtn), c.default.addbtnTouchEndScale(this.shareBtn, this.shareBtnFunc.bind(this)), c.default.addbtnTouchCancelScale(this.shareBtn), c.default.addbtnTouchStartScale(this.noShareBtn), c.default.addbtnTouchEndScale(this.noShareBtn, this.noShareBtnFunc.bind(this)), c.default.addbtnTouchCancelScale(this.noShareBtn), c.default.addbtnTouchStartScale(this.shareCloseBtn), c.default.addbtnTouchEndScale(this.shareCloseBtn, this.shareCloseBtnFunc.bind(this)), c.default.addbtnTouchCancelScale(this.shareCloseBtn) + }, e.prototype.shareBtnFunc = function() { + cc.game.emit(l.EMITKEY.TTSHARERECORD) + }, e.prototype.noShareBtnFunc = function() { + this.shareNode.active = !1, this.showBackBtn() + }, e.prototype.shareCloseBtnFunc = function() { + this.shareNode.active = !1, this.showBackBtn() + }, e.prototype.backBtnFunc = function() { + cc.game.emit(l.EMITKEY.SHOWMAINLAYER) + }, e.prototype.showBackBtn = function() { + cc.tween(this.backBtn).delay(.5).to(.2, { + scale: 1.1 + }).to(.1, { + scale: .9 + }).to(.1, { + scale: 1 + }).start() + }, e.prototype.showWinPop = function(t) { + var e = this; + this.node.active = !0, this.backBtn.scale = 0, this.shareNode.scale = 0; + var o = d.default.getTAUserInfo(); + m.default.reportTACommon("game_finish", o), this.titleNode.getComponent(cc.Label).string = h.default.getDateString(); + var n = p.default.countdownTime(t.time), + a = n[1] < 10 ? "0" + n[1] : n[1] + "", + i = n[2] < 10 ? "0" + n[2] : n[2] + ""; + if (this.timeNode.getComponent(cc.Label).string = "通关用时" + a + "分" + i + "秒", f.default.getInstance().gameType == l.GAMETYPE.GAMEDAILY) this.barefootDesc.getComponent(cc.Label).string = "加入羊群", r.default.getRankInfoData(function(t) { + d.default.setRankData(t), f.default.getInstance().rankInfo = t.data; + var o = 12; + f.default.getInstance().rankInfo && (o = f.default.getInstance().rankInfo.user.index); + var n = "您所在的地区为第 " + o + " 名"; + e.winDescNode.getComponent(cc.RichText).string = n + }); + else if (f.default.getInstance().gameType == l.GAMETYPE.GAMETOPIC) { + this.barefootDesc.getComponent(cc.Label).string = "加入" + this.getTeamName(); + var c = ""; + d.default.topicRankInfo && d.default.topicModel && (c = 1 == d.default.topicModel.info.type ? d.default.topicRankInfo.tomb ? d.default.topicRankInfo.tomb.length + "" : "0" : d.default.topicRankInfo.taoist ? d.default.topicRankInfo.taoist.length + "" : "0"); + var s = "" + this.getTeamName() + "羊队已有 " + c + " 羊"; + e.winDescNode.getComponent(cc.RichText).string = s + } + this.playBareFoot(), e.sheepSp.getComponent(u.default).play("Finish1", 1, function() { + e.sheepSp.getComponent(u.default).play("Finish2", 0) + }), e.flashSp.active = !1, cc.tween(e.sheepFlagSp).to(0, { + scale: 0 + }).delay(1).call(function() { + e.playDescSp() + }).to(.2, { + scale: 1.1 + }).to(.1, { + scale: .9 + }).to(.1, { + scale: 1 + }).start() + }, e.prototype.playDescSp = function() { + var t = this; + if (f.default.getInstance().gameType == l.GAMETYPE.GAMEDAILY) { + var e = s.default.getSheepClothesData(), + o = !1, + n = "sheep/Sheeps", + a = "skin_00", + i = null; + e = c.default.shuffle(e); + for (var r = 0; r < e.length; r++)(g = e[r]).dressing && (n = "sheep/" + g.spName, a = g.spSkin), "Sheeps" != g.spName || 0 != g.unlock || o || (o = !0, g.unlock = !0, i = g, f.default.getInstance().collectionMark.topicClothesNum = g.clothesId); + o && s.default.setSheepClothesData(e), t.flashSp.active = !1, t.sheepFlagSp.getComponent(u.default).loadSpine(n, function() { + console.log("skinName = ", a), t.sheepFlagSp.getComponent(u.default).setNewSkin(a), t.sheepFlagSp.getComponent(u.default).play("Jump2", 0), setTimeout(function() { + t.flashSp.active = !0, t.flashSp.getComponent(u.default).play("4Ray1", 1, function() { + t.flashSp.getComponent(u.default).play("4Ray2", 0) + }) + }, 300) + }), this.showNewSheep(i) + } else if (f.default.getInstance().gameType == l.GAMETYPE.GAMETOPIC) { + var p = 1 == d.default.topicModel.info.type, + h = 2 == d.default.topicModel.info.type, + m = d.default.getTopicAnimation(d.default.topicModel.id, p, h); + for (t.flashSp.active = !1, t.sheepFlagSp.getComponent(u.default).loadSpine(m.spName, function() { + t.sheepFlagSp.getComponent(u.default).setNewSkin(m.skin), t.sheepFlagSp.getComponent(u.default).play("Jump1", 0), setTimeout(function() { + t.flashSp.active = !0, t.flashSp.getComponent(u.default).play("4Ray1", 1, function() { + t.flashSp.getComponent(u.default).play("4Ray2", 0) + }) + }, 300) + }), e = s.default.getSheepClothesData(), o = !1, i = null, r = 0; r < e.length; r++) { + var g; + (g = e[r]).dressing, g.spSkin != m.skin || 0 != g.unlock || o || (o = !0, g.unlock = !0, i = g, f.default.getInstance().collectionMark.topicClothesNum = g.clothesId) + } + this.showNewSheep(i), o && s.default.setSheepClothesData(e) + } + setTimeout(function() { + t.showBackBtn() + }, 500) + }, e.prototype.showNewSheep = function(t) { + t && setTimeout(function() { + var e = { + popName: "topicNewPop", + showPopData: { + type: 2, + data: t + } + }; + cc.game.emit("showPop", e) + }, 1e3) + }, e.prototype.getTeamName = function() { + var t = d.default.topicModel.name.split("#"); + return t.length >= 2 ? 1 == d.default.topicModel.info.type ? t[0] : t[1] : "" + }, e.prototype.showShareNode = function() { + this.shareNode.active = !0, cc.tween(this.shareNode).delay(.5).to(.2, { + scale: 1.1 + }).to(.1, { + scale: .9 + }).to(.1, { + scale: 1 + }).start() + }, e.prototype.playBareFoot = function() { + var t = this; + this.barefootNode.active = !0, cc.tween(this.barefootNode).to(0, { + scale: 0 + }).to(.1, { + scale: 1.1 + }).to(.1, { + scale: .9 + }).to(.1, { + scale: 1 + }).call(function() { + cc.tween(t.barefootTitle).to(.1, { + scale: 1.1 + }).to(.1, { + scale: .9 + }).to(.1, { + scale: 1 + }).call(function() { + cc.tween(t.barefootDesc).to(.1, { + scale: 1.1 + }).to(.1, { + scale: .9 + }).to(.1, { + scale: 1 + }).start() + }, t).start() + }, this).start() + }, i([v(cc.Node)], e.prototype, "titleNode", void 0), i([v(cc.Node)], e.prototype, "barefootNode", void 0), i([v(cc.Node)], e.prototype, "barefootTitle", void 0), i([v(cc.Node)], e.prototype, "barefootDesc", void 0), i([v(cc.Node)], e.prototype, "sheepSp", void 0), i([v(cc.Node)], e.prototype, "sheepFlagSp", void 0), i([v(cc.Node)], e.prototype, "winDescNode", void 0), i([v(cc.Node)], e.prototype, "backBtn", void 0), i([v(cc.Node)], e.prototype, "shareNode", void 0), i([v(cc.Node)], e.prototype, "shareBtn", void 0), i([v(cc.Node)], e.prototype, "noShareBtn", void 0), i([v(cc.Node)], e.prototype, "shareCloseBtn", void 0), i([v(cc.Node)], e.prototype, "timeNode", void 0), i([v({ + type: cc.Node, + tooltip: "flash动画" + })], e.prototype, "flashSp", void 0), i([y], e) + }(cc.Component); + o.default = b, cc._RF.pop() + }, { + "../api/api-sheep": "api-sheep", + "../common/CcJsFunc": "CcJsFunc", + "../common/dataTs": "dataTs", + "../common/enumConfig": "enumConfig", + "../common/spine": "spine", + "../common/util": "util", + "../manager/DateManager": "DateManager", + "../manager/GameManager": "GameManager", + "../manager/data-manager": "data-manager", + "../manager/report-common": "report-common" + } + ], + "wx-sdk": [ + function(t, e, o) { + "use strict"; + cc._RF.push(e, "dbb360ys3xP25Wexckd5YGf", "wx-sdk"); + var n = this && this.__awaiter || function(t, e, o, n) { + return new(o || (o = Promise))(function(a, i) { + function r(t) { + try { + s(n.next(t)) + } catch (e) { + i(e) + } + } + + function c(t) { + try { + s(n.throw(t)) + } catch (e) { + i(e) + } + } + + function s(t) { + var e; + t.done ? a(t.value) : (e = t.value, e instanceof o ? e : new o(function(t) { + t(e) + })).then(r, c) + } + s((n = n.apply(t, e || [])).next()) + }) + }, + a = this && this.__generator || function(t, e) { + var o, n, a, i, r = { + label: 0, + sent: function() { + if (1 & a[0]) throw a[1]; + return a[1] + }, + trys: [], + ops: [] + }; + return i = { + next: c(0), + throw :c(1), + return :c(2) + }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { + return this + }), i; + + function c(t) { + return function(e) { + return s([t, e]) + } + } + + function s(i) { + if (o) throw new TypeError("Generator is already executing."); + for (; r;) try { + if (o = 1, n && (a = 2 & i[0] ? n.return : i[0] ? n.throw || ((a = n.return) && a.call(n), 0) : n.next) && !(a = a.call(n, i[1])).done) return a; + switch (n = 0, a && (i = [2 & i[0], a.value]), i[0]) { + case 0: + case 1: + a = i; + break; + case 4: + return r.label++, { + value: i[1], + done: !1 + }; + case 5: + r.label++, n = i[1], i = [0]; + continue; + case 7: + i = r.ops.pop(), r.trys.pop(); + continue; + default: + if (!(a = (a = r.trys).length > 0 && a[a.length - 1]) && (6 === i[0] || 2 === i[0])) { + r = 0; + continue + } + if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { + r.label = i[1]; + break + } + if (6 === i[0] && r.label < a[1]) { + r.label = a[1], a = i; + break + } + if (a && r.label < a[2]) { + r.label = a[2], r.ops.push(i); + break + } + a[2] && r.ops.pop(), r.trys.pop(); + continue + } + i = e.call(t, r) + } catch (c) { + i = [6, c], n = 0 + } finally { + o = a = 0 + } + if (5 & i[0]) throw i[1]; + return { + value: i[0] ? i[1] : void 0, + done: !0 + } + } + }; + Object.defineProperty(o, "__esModule", { + value: !0 + }); + var i = t("../sdk"); + cc.sys.platform, cc.sys.WECHAT_GAME; + var r = function() { + function t() {} + return t.init = function() { + cc.sys.platform == cc.sys.WECHAT_GAME && (wx.onInteractiveStorageModified(function(t) { + cc.log("onInteractiveStorageModified", t) + }), wx.onShareMessageToFriend(function(t) { + cc.log("wx.shareMessageToFriend", t); + var e = t.success ? "分享成功" : "分享失败"; + wx.showToast({ + title: e, + icon: "none", + duration: 2e3 + }), t.success + }), wx.createGameIcon && (this.gameIconAd = wx.createGameIcon({ + adUnitId: "PBgAAvMtdTk_v2ho", + count: 1, + style: [] + }, { + appNameHidden: !1, + color: "#713A0CC8", + size: 60, + borderWidth: 5, + borderColor: "#ffffff77", + left: 0, + top: 200 + })), this.authorize(), console.info("-- 开启转发 --"), this.registerShowHide()) + }, t.checkUpdateManager = function() { + if (cc.sys.platform == cc.sys.WECHAT_GAME) { + var t = wx.getUpdateManager(); + t.onCheckForUpdate(function(t) { + console.info("[app update]", t.hasUpdate) + }), t.onUpdateReady(function() { + wx.showModal({ + title: "更新提示", + content: "新版本已经准备好,是否重启应用?", + success: function(e) { + e.confirm && t.applyUpdate() + } + }) + }) + } + }, t.registerShowHide = function() { + return n(this, void 0, Promise, function() { + var t = this; + return a(this, function() { + return wx.onShow(function() { + t.onShowFunction && t.onShowFunction.forEach(function(t) { + return t() + }), t.onShowOnceFunction && (t.onShowOnceFunction.forEach(function(t) { + t() + }), t.onShowOnceFunction.length = 0) + }), wx.onHide(function() { + t.onHideFunction && t.onHideFunction.forEach(function(t) { + return t() + }), t.onHideOnceFunction && (t.onHideOnceFunction.forEach(function(t) { + t() + }), t.onHideOnceFunction.length = 0) + }), [2] + }) + }) + }, t.showGameIcon = function() { + var t = this; + if (this.gameIconAd) { + if (this.gameIconAdShown) return; + this.gameIconAd.load().then(function() { + t.gameIconAd.show(), t.gameIconAdShown = !0 + }).catch(function(e) { + cc.error("wx-sdk show game icon", e), t.gameIconAd.hide() + }) + } + }, t.hideGameIcon = function() { + this.gameIconAd && (this.gameIconAd.hide(), this.gameIconAdShown = !1) + }, t.authorizeLocation = function() { + return n(this, void 0, Promise, function() { + return a(this, function() { + return wx.authorize({ + scope: "scope.userLocation", + success: function(t) { + cc.log("authorize success:", t) + }, + fail: function(t) { + cc.log("authorize fail:", t) + } + }), [2] + }) + }) + }, t.authorize = function() { + return n(this, void 0, Promise, function() { + return a(this, function() { + return [2] + }) + }) + }, t.weiBoJump = function() { + wx.navigateToMiniProgram({ + appId: "wx9074de28009e1111", + path: "pages/profile/profile?nickname=羊了个羊官博", + success: function() { + console.log("成功跳转微博小程序") + } + }) + }, t.vibrateShort = function(t) { + void 0 === t && (t = "light"), wx.vibrateShort({ + type: t, + style: t + }) + }, t.vibrateLong = function() { + wx.vibrateLong({}) + }, t.wxAppLogin = function() { + throw new Error("Method not implemented.") + }, t.getSubVersion = function(t) { + var e = t.split("."); + return { + first: parseInt(e[0].trim()), + second: parseInt(e[1].trim()), + third: parseInt(e[2].trim()) + } + }, t.isVersionLower = function(t, e) { + var o = this.getSubVersion(t), + n = this.getSubVersion(e); + return !(o.first > n.first || o.second > n.second || o.third > n.third) + }, t.isWxVersionLower = function(t) { + if (cc.sys.platform != cc.sys.WECHAT_GAME && cc.sys.platform != cc.sys.WECHAT_GAME_SUB) return !0; + var e = wx.getSystemInfoSync().SDKVersion, + o = !1; + return this.isVersionLower(e, t) && (o = !0), cc.log("[sdk] is wx version lower", e, t, o), o + }, t.isWxVersionHigher = function(t) { + return !this.isWxVersionLower(t) + }, t.wxRankScoreUpdate = function(t, e, o) { + cc.sys.platform == cc.sys.WECHAT_GAME && wx.getOpenDataContext().postMessage({ + cmd: "update-" + t, + type: o, + score: e + }) + }, t.wxRankScoreRemove = function(t) { + cc.sys.platform == cc.sys.WECHAT_GAME && wx.getOpenDataContext().postMessage({ + cmd: "remove-" + t, + score: 0 + }) + }, t.wxShowSubContext = function(t, e, o, n) { + cc.sys.platform == cc.sys.WECHAT_GAME && wx.getOpenDataContext().postMessage({ + cmd: "show-" + t, + setData: e, + w: o, + h: n + }) + }, t.onShareAppMessage = function(t) { + wx.showShareMenu({ + withShareTicket: !0 + }), wx.onShareAppMessage(function() { + return { + title: t.title, + imageUrl: t.imageUrl, + query: t.query + } + }), wx.onShareTimeline(function() { + return { + title: "羊了个羊", + imageUrl: "", + query: "a=1&b=2" + } + }) + }, t.onShareAppMessageQuery = function() { + return wx.getEnterOptionsSync().query + }, t.wxShare = function(t, e) { + if (cc.sys.platform == cc.sys.WECHAT_GAME) { + var o = cc.winSize; + e || (e = canvas.toTempFilePathSync({ + destHeight: o.width / 5 * 4 + })), wx.shareAppMessage({ + title: t, + imageUrl: e + }) + } + }, t.wxShareWithCallBack = function(t) { + if (t.tag, cc.sys.isBrowser) return t.success && t.success("local"), void(t.complete && t.complete("local")); + if (cc.sys.platform != cc.sys.WECHAT_GAME) return t.success && t.success("local"), void(t.complete && t.complete("local")); + null == t.validate && (t.validate = !0), this._beforeOnHideAction = 1; + var e = !1, + o = !1, + n = !1, + a = function(e) { + o || (console.log("构建 success"), t.success && t.success(e), o = !0) + }, + r = function(e) { + t.complete && t.complete(e) + }, + c = Date.now(); + this.setOnShow(function() { + Date.now() - c < 1e3 * i.SHARE_CALLBACK_TIME && (e = !0) + }), this.setOnShow(function() { + return !(!e || o) && (t.validate && Date.now() - c < 1e3 * i.SHARE_CALLBACK_TIME ? void(Math.random() < i.SHARE_CALLBACK_RATE ? (a(), r()) : wx.showModal({ + title: "提示", + content: "分享失败,请分享到群!", + confirmText: "重试", + showCancel: !1, + complete: function() { + console.log("执行 complete") + }, + success: function() { + console.log("执行 success"), a() + }, + fail: function() { + console.log("执行 fail"), n || (console.log("构建 fail"), t.fail && t.fail(void 0), n = !0) + } + })) : (a(), void r())) + }); + var s = setInterval(function() { + a(), r() + }, 2e3); + clearInterval(s); + var l = ""; + t.query && (l = t.query), wx.shareAppMessage({ + title: t.title, + imageUrl: t.imageUrl, + query: l + }) + }, t.setOnShow = function(t) { + t && this.onShowFunction.push(t) + }, t.setOffShow = function(t) { + var e = this.onShowFunction.indexOf(t); + e > -1 && this.onShowFunction.splice(e, 1) + }, t.setOnShowOnce = function(t) { + t && this.onShowOnceFunction.push(t) + }, t.setOffShowOnce = function(t) { + var e = this.onShowOnceFunction.indexOf(t); + e > -1 && this.onShowOnceFunction.splice(e, 1) + }, t.setOnHide = function(t) { + t && this.onHideFunction.push(t) + }, t.setOffHide = function(t) { + var e = this.onHideFunction.indexOf(t); + e > -1 && this.onHideFunction.splice(e, 1) + }, t.setOnHideOnce = function(t) { + t && this.onHideOnceFunction.push(t) + }, t.setOffHideOnce = function(t) { + var e = this.onHideOnceFunction.indexOf(t); + e > -1 && this.onHideOnceFunction.splice(e, 1) + }, t.getAppVersion = function() { + if (cc.sys.platform == cc.sys.WECHAT_GAME && wx.getAccountInfoSync) { + var t = wx.getAccountInfoSync(); + return cc.log("[sdk] accountInfo:", t), t.miniProgram.version || "" + } + return "" + }, t.setClipboardData = function(t) { + wx.setClipboardData({ + data: t, + success: function() { + wx.getClipboardData({ + success: function(t) { + cc.log("wx get clipboard data:", t.data) + } + }) + } + }) + }, t.showToast = function(t) { + wx.showToast(t) + }, t.showBannerAd = function() {}, t.hideBannerAd = function() {}, t.showInterstitialAd = function() {}, t.showRewardVideoAd = function(t, e, o) { + if (wx) { + var n = !1, + a = wx.createRewardedVideoAd({ + adUnitId: t + }); + a.onClose(function(t) { + 0 == n && (n = !0, t && t.isEnded || void 0 === t ? e() : o(!1, "观看失败")) + }), a.onError(function(t) { + 0 == n && (n = !0, o(!1, t.errMsg)) + }), a.load().then(function() { + a.show() + }).catch(function() { + o(!1, "广告拉取失败") + }) + } else o(!1, "wx undefined") + }, t.onShowFunction = [], t.onHideFunction = [], t.onShowOnceFunction = [], t.onHideOnceFunction = [], t.gameIconAd = null, t.gameIconAdShown = !1, t + }(); + o.default = r, r.init(), cc._RF.pop() + }, { + "../sdk": "sdk" + } + ] +}, {}, ["gd_language", "i18n", "BulletPrefab", "brickPrefab", "collectPrefab", "prop-prefab", "wallpaperPrefab", "brickSubPrefab", "collectSubPrefab", "wallpaperSubPrefab", "blockPrefab", "catClawPrefabs", "clothesPrefab", "cookiePrefab", "cookieRewardNode", "flying-item-pop-coin", "flying-item-pop-fish", "rewardPrefab", "blockEditorPrefab", "setBloackNumPrefab", "topic-card-node", "topic-header-node", "topic-sheep-node", "PrivacyPolicy", "calendar-item", "daily-challenge", "cat-house-progress", "main-cookie-reward", "topic-rank", "topic-ui-layer", "topic-ui", "ApiTool", "api-sheep", "fontTipsLayer", "transitionsLayer", "CcJsFunc", "ad", "config", "dataModel", "dataTs", "enumConfig", "http", "key-map", "mask", "maskLayer", "android-sdk", "audio", "native-bridge", "native-def", "native-event", "share", "tt-sdk", "wx-sdk", "sdk", "spine", "util", "CoinEmitter", "CoinEmitterByTime", "SpriteWithMask", "SpriteWithMaskAssembler", "cubic-bezier-curve", "curve-sample", "export-helper", "export", "mesh-vertex", "spline-node", "spline", "typed-event", "player-head-atlas", "reward-emitter", "snake-ctrl-point", "snake-sprite-assembler", "spline-sprite", "chessboard", "crushArea", "game-top-ui", "gameLayer", "gameUiLayer", "moveOutArea", "loadCanvas", "loadLayer", "catNode", "houseLayer", "main-rank", "main-tabbar", "mainCanvas", "mainCultivateLayer", "mainLayer", "mainUiLayer", "page-house", "page-main", "topUiLayer", "upgrade-tip", "wardrobeLayer", "DateManager", "GameManager", "PoolManager", "data-manager", "popManager", "report-common", "blockArea", "editorGameLayer", "editorGameUiLayer", "editorPopCommon", "editorTips", "mapArea", "mapEditor", "newLevelPop", "saveAsPop", "selectLevelPop", "setBlockNumPop", "uiControler", "ScrollMsg", "bullet-screen", "sheep-card", "sheep-flock-icon", "sheep-flock", "FriendRankPop", "PersonalPop", "PrivacyUserPop", "TodayRankPop", "bullet-screen-pop", "challengeSucPop", "failPop", "getLovePop", "getPropPop", "giftLayerAnimate", "loseCookiePop", "loseLovePop", "nextLevelPop", "noLimitPop", "nothingPop", "picturePop", "brickSv", "collectSv", "sheepRankItem", "sprintRewardBar", "wallpaperSv", "setupPop", "shareNodePop", "sheep-rank-pop", "show-daily-pop", "show-reward-pop", "sprintRewardPop", "stagePop", "topicChoosePop", "topicCollectPop", "topicJoinedPop", "topicLastWinPop", "topicNewPop", "unlock-build-pop", "unlock-build", "upgradePop", "winPop", "data-env", "data-type", "network-tool", "thinkingdata.mg.cocoscreator.min", "FriendSubContextView", "TodaySubContextView", "bullet-item", "register-head-image", "str-utils", "uma-sdk"]); \ No newline at end of file