From 551d8a3d9d48caf71610c4c25127116f40036d0a Mon Sep 17 00:00:00 2001 From: WEBXOSS Date: Sun, 20 Aug 2017 23:43:42 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=A6=20release=20WX16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DeckEditor/Deck.min.js | 2 +- DeckEditor/DeckEditor.js | 2 +- DeckEditor/index.html | 12 ++++++------ ImageAndDetail.min.js | 2 +- Localize.min.js | 5 +++-- background | 2 +- css.css | 4 ++-- index.html | 12 ++++++------ webxoss.appcache | 4 ++-- webxoss.js | 6 +++--- 10 files changed, 26 insertions(+), 25 deletions(-) diff --git a/DeckEditor/Deck.min.js b/DeckEditor/Deck.min.js index 12af155..0d8084d 100644 --- a/DeckEditor/Deck.min.js +++ b/DeckEditor/Deck.min.js @@ -1 +1 @@ -"use strict";function callConstructor(e){return new(e.bind.apply(e,arguments))}function applyToConstructor(e,r){var t=concat(null,toArr(r));return new(e.bind.apply(e,t))}function nextTick(e){setTimeout(e,0)}function DeckManager(){this.getDeckNames()}function TextualRule(e,r,t){this.prop=e,this.map=r,this.exact=t}function NumericRule(e,r){this.prop=e,this.keywords=r}function Searcher(){this.rules=[ColorRule,CrossRule,TypeRule,RarityRule,RiseRule,TrapRule,AcceRule,SkillRule,NoBurstRule,TimmingRule,LimitingRule,ClassRule,PowerRule,LevelRule,LimitRule,NumberRule,IllustRule,WxidRule,NameRule]}var concat=Array.prototype.concat.bind([]),toArr=function(e){return e?"string"==typeof e?[]:Array.prototype.slice.call(e,0):[]},isArr=Array.isArray,inArr=function(e,r){return-1!=toArr(r).indexOf(e)},removeFromArr=function(e,r){var t=r.indexOf(e);return!(t<0)&&(r.splice(t,1),!0)},isStr=function(e){return"string"==typeof e},isObj=function(e){return e&&"object"==typeof e&&!isArr(e)},isNum=function(e){return"number"==typeof e},isFunc=function(e){return"function"==typeof e},pEach=function(e,r,t){return e.reduce(function(e,t){return e.then(function(){return r(t)})},Promise.resolve())};DeckManager.prototype.getDeckNames=function(){var e=localStorage.getItem("deck_filenames");return this._deckNames=e?JSON.parse(e):[],this._deckNames},DeckManager.prototype._updateDeckNames=function(){this._deckNames.sort(),localStorage.setItem("deck_filenames",JSON.stringify(this._deckNames))},DeckManager.prototype.createDeck=function(e,r){return!inArr(e,this._deckNames)&&(this._deckNames.push(e),this._updateDeckNames(),this.saveDeck(e,r),!0)},DeckManager.prototype.renameDeck=function(e,r){if(!inArr(e,this._deckNames))return!1;if(inArr(r,this._deckNames))return!1;var t=this.loadDeck(e);return this.deleteDeck(e),this.createDeck(r,t),!0},DeckManager.prototype.deleteDeck=function(e){return!!removeFromArr(e,this._deckNames)&&(this._updateDeckNames(),localStorage.removeItem("deck_file_"+e),!0)},DeckManager.prototype.loadDeck=function(e){var r=localStorage.getItem("deck_file_"+e);return r?JSON.parse(r):null},DeckManager.prototype.saveDeck=function(e,r){return!!inArr(e,this._deckNames)&&(localStorage.setItem("deck_file_"+e,JSON.stringify(r)),!0)},DeckManager.prototype.checkMainDeck=function(e){if(!isArr(e))return!1;if(40!==e.length)return!1;for(var r=[],t=0;t10)return!1;for(var r=[],t=0;t4)return!1;return!0},TextualRule.prototype.parse=function(e){for(var r=[],t=0;tcross<","【cross】","【交错】","【クロス】","[связь]",">크로스<"]};var TimmingRule={};TimmingRule.parse=function(e){for(var r=[],t=0;t=*(\d+)\+?$/),r||(r=e.match(/^(\d+)\+$/)),r){var t=parseInt(r[1]);return[t,1/0]}if(r=e.match(/^<=*(\d+)\-?$/),r||(r=e.match(/^(\d+)\-$/)),r){var t=parseInt(r[1]);return[-1/0,t]}if(r=e.match(/^(\d+)[\-\~](\d+)$/)){return[parseInt(r[1]),parseInt(r[2])]}return null},NumericRule.prototype.parseWord=function(e){for(var r=0;r=n&&t<=i})}};var PowerRule=new NumericRule("power",["力量","パワー","power","сила","파워"]),LevelRule=new NumericRule("level",["等级","レベル","level","lv.","lv","уровень","livello","레벨"]),LimitRule=new NumericRule("limit",["界限","リミット","limite","limit","ограничение","리미트"]),NumberRule=new NumericRule("",[""]);NumberRule.parse=function(e){for(var r=[],t=0;t=i&&n<=u})}};var IllustRule={};IllustRule.parseWord=function(e){var r=e.match(/illust:?(.+)/);return r||(r=e.match(/画师:?(.+)/)),r||(r=e.match(/畫師:?(.+)/)),r?r[1]:null},IllustRule.parse=function(e){for(var r=[],t=0;t10)return!1;for(var r=[],t=0;t4)return!1;return!0},TextualRule.prototype.parse=function(e){for(var r=[],t=0;tcross<","【cross】","【交错】","【クロス】","[связь]",">크로스<"]};var TimmingRule={};TimmingRule.parse=function(e){for(var r=[],t=0;t=*(\d+)\+?$/),r||(r=e.match(/^(\d+)\+$/)),r){var t=parseInt(r[1]);return[t,1/0]}if(r=e.match(/^<=*(\d+)\-?$/),r||(r=e.match(/^(\d+)\-$/)),r){var t=parseInt(r[1]);return[-(1/0),t]}if(r=e.match(/^(\d+)[\-\~](\d+)$/)){var n=parseInt(r[1]),i=parseInt(r[2]);return[n,i]}return null},NumericRule.prototype.parseWord=function(e){for(var r=0;r=n&&t<=i})}};var PowerRule=new NumericRule("power",["力量","パワー","power","сила","파워"]),LevelRule=new NumericRule("level",["等级","レベル","level","lv.","lv","уровень","livello","레벨"]),LimitRule=new NumericRule("limit",["界限","リミット","limite","limit","ограничение","리미트"]),NumberRule=new NumericRule("",[""]);NumberRule.parse=function(e){for(var r=[],t=0;t=i&&n<=u})}};var IllustRule={};IllustRule.parseWord=function(e){var r=e.match(/illust:?(.+)/);return r||(r=e.match(/画师:?(.+)/)),r||(r=e.match(/畫師:?(.+)/)),r?r[1]:null},IllustRule.parse=function(e){for(var r=[],t=0;t=results.length)break;var t=results[n],r=newElement("li"),c=new Image;c.src=getImageUrlByPid(t.pid),c.alt=Localize.cardName(t),c.title=Localize.cardName(t),c.onmousemove=showDetail.bind(null,t),c.onclick=addCardByInfo.bind(null,t,!1),r.appendChild(c),$("search-list").appendChild(r),_shown++}_shown=0)return void selectDeck(t);deckManager.createDeck(e,n||getCurrentDeck()),updateDeckList(),t=deckNames.indexOf(e),selectDeck(t)}function deleteDeck(e){var n=deckIndex;deckManager.deleteDeck(e),updateDeckList(),n>=deckNames.length&&(n=deckNames.length-1),selectDeck(n)}function renameDeck(e){var n=deckName;createDeck(e),deleteDeck(n)}function selectDeck(e){deckIndex=e,deckName=deckNames[e],loadDeck(deckName),$("select-decks").selectedIndex=e}function getCurrentDeck(){var e={};return e.mainDeck=mainData.deckObjs.map(function(e){return e.info.pid}),e.lrigDeck=lrigData.deckObjs.map(function(e){return e.info.pid}),e}function dataToPids(e){return e.deckObjs.map(function(e){return e.info.pid})}function addCardByInfo(e,n){var t;t="LRIG"===e.cardType||"ARTS"===e.cardType||"RESONA"===e.cardType?lrigData:mainData,t.deckObjs.length>=t.limit||(t.deckObjs.push({idx:t.deckObjs.length,info:e,img:null}),n||(updateDeck(t),saveDeck(deckName)))}function removeCardByIndex(e,n,t){e.zone.removeChild(e.deckObjs[n].img),e.deckObjs.splice(n,1),updateDeck(e),t||saveDeck(deckName)}function removeAllCards(e){e.zone.innerHTML="",e.deckObjs.length=0}function updateDeck(e){defaultSort(e);var n,t,r=dataToPids(e);"main"===e.deck?(n=deckManager.checkMainDeck(r),t=$("main-deck-title"),$("main-deck-burst-count").textContent=deckManager.burstCount(r)):(n=deckManager.checkLrigDeck(r),t=$("lrig-deck-title")),n?t.classList.remove("invalid"):t.classList.add("invalid"),t=$("main-deck-mayus-room"),n=deckManager.checkMayusRoom(dataToPids(mainData).concat(dataToPids(lrigData))),n?t.classList.remove("invalid"):t.classList.add("invalid"),e.deckObjs.forEach(function(n,t){var r=n.info,c=n.img;c||(c=new Image,c.src=getImageUrlByPid(r.pid),c.alt=Localize.cardName(r),c.onmousemove=showDetail.bind(null,r),n.img=c,e.zone.appendChild(c)),c.onclick=removeCardByIndex.bind(null,e,t,!1),c.style.left=t%10*WIDTH+"px",c.style.top=Math.floor(t/10)*HEIGHT+"px"},this)}function defaultSort(e){e.deckObjs.sort(function(e,n){var t=e.info,r=n.info,c=e.idx,a=n.idx;if("LRIG"===t.cardType){if("LRIG"!==r.cardType)return-1;if(r.level!==t.level)return t.level-r.level}if("ARTS"===t.cardType&&"ARTS"!==r.cardType)return 1;if("RESONA"===t.cardType){if("LRIG"===r.cardType)return 1;if("ARTS"===r.cardType)return-1;if(r.level!==t.level)return t.level-r.level}if("SIGNI"===t.cardType){if("SIGNI"!==r.cardType)return-1;if(t.level!==r.level)return r.level-t.level;if(t.power!==r.power)return t.power-r.power}return"SPELL"===t.cardType&&"SPELL"!==r.cardType?1:t.cid!==r.cid?t.cid-r.cid:c-a}),e.deckObjs.forEach(function(e,n){e.idx=n})}function hideImpotExport(){hide($("div-import-warp"))}function deckToText(e){var n="";return[e.lrigDeck,e.mainDeck.filter(function(e){var n=CardInfo[e];return!(n.burstEffectTexts&&n.burstEffectTexts.length)}),e.mainDeck.filter(function(e){var n=CardInfo[e];return n.burstEffectTexts&&n.burstEffectTexts.length})].forEach(function(e,t,r){var c="",a=0;e.forEach(function(e,t,r){var i=CardInfo[e],o=Localize.cardName(i);o!==c&&0!==t?(n+=a+" "+c+"\n",c=o,a=1):(c=o,a++),t===r.length-1&&(n+=a+" "+c+"\n")},this),t!==r.length-1&&(n+="——————————\n")}),n}function deckToJson(e){var n={format:"WEBXOSS Deck",version:"1",content:e};return JSON.stringify(n)}function parseFile(e,n){if(!FileReader||e.size>1024)return void n(null);var t=new FileReader;t.onload=function(e){n(parseCode(t.result))},t.readAsText(e)}function parseCode(e){try{var n=JSON.parse(e);return"WEBXOSS Deck"===n.format&&1==+n.version&&n.content.mainDeck.length<=50&&n.content.lrigDeck.length<=20?n.content:null}catch(e){return null}}var concat=Array.prototype.concat.bind([]),toArr=function(e){return e?"string"==typeof e?[]:Array.prototype.slice.call(e,0):[]},isArr=Array.isArray,inArr=function(e,n){return-1!=toArr(n).indexOf(e)},removeFromArr=function(e,n){var t=n.indexOf(e);return!(t<0)&&(n.splice(t,1),!0)},isStr=function(e){return"string"==typeof e},isObj=function(e){return e&&"object"==typeof e&&!isArr(e)},isNum=function(e){return"number"==typeof e},isFunc=function(e){return"function"==typeof e},pEach=function(e,n,t){return e.reduce(function(e,t){return e.then(function(){return n(t)})},Promise.resolve())},$=document.getElementById.bind(document);Localize.init(),Localize.DOM("DeckEditor"),window.searcher=new Searcher,window.imageManager=new ImageManager("../"),window.detail=new CardDetail(imageManager);var results=[],RESULTS_LENGTH=20,_shown=0;$("search-input").onchange=search,$("search-input").onkeyup=search,$("search-show-more").onclick=showMore;var WIDTH=62,HEIGHT=87,mainData={deck:"main",limit:50,deckObjs:[],zone:$("main-deck-zone")},lrigData={deck:"lrig",limit:20,deckObjs:[],zone:$("lrig-deck-zone")},deckManager=new DeckManager,deckNames=[],deckName="",deckIndex=-1,whiteHope={mainDeck:[112,113,114,115,116,117,118,119,120,121,112,113,114,115,116,117,118,119,120,121,112,113,114,115,116,117,118,119,120,121,112,113,114,115,116,117,118,119,120,121],lrigDeck:[104,105,106,107,108,109,110,111]};updateDeckList(),selectDeck(0);var emptyDeck={mainDeck:[],lrigDeck:[]};$("button-new-deck").onclick=function(e){if(!$("input-new-deck-name").value)return window.alert(Localize.editor("PLEASE_INPUT_A_DECK_NAME")),void $("input-new-deck-name").focus();createDeck($("input-new-deck-name").value,emptyDeck),$("input-new-deck-name").value=""},$("button-copy-deck").onclick=function(e){if(!$("input-new-deck-name").value)return window.alert(Localize.editor("PLEASE_INPUT_A_DECK_NAME")),void $("input-new-deck-name").focus();createDeck($("input-new-deck-name").value),$("input-new-deck-name").value=""},$("button-delete-deck").onclick=function(e){window.confirm(Localize.editor("CONFIRM_DELETE_DECK",deckName))&&deleteDeck(deckName)},$("select-decks").onchange=function(e){selectDeck($("select-decks").selectedIndex)},$("button-rename").onclick=function(e){var n=window.prompt(Localize.editor("DECK_NAME"),deckName);if(n&&n!==deckName)return inArr(n,deckNames)?void window.alert(Localize.editor("DECK_NAME_ALREADY_EXISTS",n)):void renameDeck(n)},$("button-import-export").onclick=function(e){show($("div-import-warp")),$("textarea-import-export").value=""},$("button-import-export-cancel").onclick=function(e){hideImpotExport()},$("button-text").onclick=function(e){var n=deckToText(getCurrentDeck());$("textarea-import-export").value=n,$("textarea-import-export").select()},$("button-export").onclick=function(e){var n=deckName+".webxoss",t=deckToJson(getCurrentDeck());download(n,t)},$("button-export-code").onclick=function(e){var n=deckToJson(getCurrentDeck());$("textarea-import-export").value=n,$("textarea-import-export").select()};var download=function(){var e=newElement("a");return e.target="_blank",e.style.position="fixed",e.style.width="0",e.style.height="0",e.style.overflow="hidden",e.style.top="0",e.style.left="0",e.style.zIndex="-1024",e.style.opacity="0",document.body.appendChild(e),function(n,t){e.href="data:application/octet-stream,"+encodeURI(t),e.download=n,e.click()}}();$("input-file").onchange=function(e){var n=$("input-file").files[0];if($("input-file").value=null,n){var t=n.name.replace(/\.webxoss$/,"");if(inArr(t,deckNames))return void window.alert(Localize.editor("DECK_NAME_ALREADY_EXISTS",t));parseFile(n,function(e){if($("input-file").value=null,!e)return void window.alert(Localize.editor("FAILED_TO_PARSE_FILE"));createDeck(t,e),hideImpotExport()})}},$("button-import-code").onclick=function(e){var n=$("textarea-import-export").value,t=parseCode(n);if(t){var r=window.prompt(Localize.editor("DECK_NAME"));if(!r)return;if(inArr(r,deckNames))return void window.alert(Localize.editor("DECK_NAME_ALREADY_EXISTS",r));createDeck(r,t),hideImpotExport()}else window.alert(Localize.editor("FAILED_TO_PARSE_CODE"))},$("link-back-to-webxoss").onclick=function(e){if(window.opener&&!window.opener.closed)return e.preventDefault(),window.close(),!1},search(); \ No newline at end of file +"use strict";function callConstructor(e){var n=e.bind.apply(e,arguments);return new n}function applyToConstructor(e,n){var t=concat(null,toArr(n)),r=e.bind.apply(e,t);return new r}function nextTick(e){setTimeout(e,0)}function hide(e){e.style.display="none"}function show(e){e.style.display=""}function disable(e){e.disabled=!0}function enable(e){e.disabled=!1}function newElement(e){for(var n=document.createElement(e),t=1;t=results.length)break;var t=results[n],r=newElement("li"),c=new Image;c.src=getImageUrlByPid(t.pid),c.alt=Localize.cardName(t),c.title=Localize.cardName(t),c.onmousemove=showDetail.bind(null,t),c.onclick=addCardByInfo.bind(null,t,!1),r.appendChild(c),$("search-list").appendChild(r),_shown++}_shown=0?void selectDeck(t):(deckManager.createDeck(e,n||getCurrentDeck()),updateDeckList(),t=deckNames.indexOf(e),void selectDeck(t))}function deleteDeck(e){var n=deckIndex;deckManager.deleteDeck(e),updateDeckList(),n>=deckNames.length&&(n=deckNames.length-1),selectDeck(n)}function renameDeck(e){var n=deckName;createDeck(e),deleteDeck(n)}function selectDeck(e){deckIndex=e,deckName=deckNames[e],loadDeck(deckName),$("select-decks").selectedIndex=e}function getCurrentDeck(){var e={};return e.mainDeck=mainData.deckObjs.map(function(e){return e.info.pid}),e.lrigDeck=lrigData.deckObjs.map(function(e){return e.info.pid}),e}function dataToPids(e){return e.deckObjs.map(function(e){return e.info.pid})}function addCardByInfo(e,n){var t;t="LRIG"===e.cardType||"ARTS"===e.cardType||"RESONA"===e.cardType?lrigData:mainData,t.deckObjs.length>=t.limit||(t.deckObjs.push({idx:t.deckObjs.length,info:e,img:null}),n||(updateDeck(t),saveDeck(deckName)))}function removeCardByIndex(e,n,t){e.zone.removeChild(e.deckObjs[n].img),e.deckObjs.splice(n,1),updateDeck(e),t||saveDeck(deckName)}function removeAllCards(e){e.zone.innerHTML="",e.deckObjs.length=0}function updateDeck(e){defaultSort(e);var n,t,r=dataToPids(e);"main"===e.deck?(n=deckManager.checkMainDeck(r),t=$("main-deck-title"),$("main-deck-burst-count").textContent=deckManager.burstCount(r)):(n=deckManager.checkLrigDeck(r),t=$("lrig-deck-title")),n?t.classList.remove("invalid"):t.classList.add("invalid"),t=$("main-deck-mayus-room"),n=deckManager.checkMayusRoom(dataToPids(mainData).concat(dataToPids(lrigData))),n?t.classList.remove("invalid"):t.classList.add("invalid"),e.deckObjs.forEach(function(n,t){var r=n.info,c=n.img;c||(c=new Image,c.src=getImageUrlByPid(r.pid),c.alt=Localize.cardName(r),c.onmousemove=showDetail.bind(null,r),n.img=c,e.zone.appendChild(c)),c.onclick=removeCardByIndex.bind(null,e,t,!1),c.style.left=t%10*WIDTH+"px",c.style.top=Math.floor(t/10)*HEIGHT+"px"},this)}function defaultSort(e){e.deckObjs.sort(function(e,n){var t=e.info,r=n.info,c=e.idx,a=n.idx;if("LRIG"===t.cardType){if("LRIG"!==r.cardType)return-1;if(r.level!==t.level)return t.level-r.level}if("ARTS"===t.cardType&&"ARTS"!==r.cardType)return 1;if("RESONA"===t.cardType){if("LRIG"===r.cardType)return 1;if("ARTS"===r.cardType)return-1;if(r.level!==t.level)return t.level-r.level}if("SIGNI"===t.cardType){if("SIGNI"!==r.cardType)return-1;if(t.level!==r.level)return r.level-t.level;if(t.power!==r.power)return t.power-r.power}return"SPELL"===t.cardType&&"SPELL"!==r.cardType?1:t.cid!==r.cid?t.cid-r.cid:c-a}),e.deckObjs.forEach(function(e,n){e.idx=n})}function hideImpotExport(){hide($("div-import-warp"))}function deckToText(e){var n="",t=[e.lrigDeck,e.mainDeck.filter(function(e){var n=CardInfo[e];return!(n.burstEffectTexts&&n.burstEffectTexts.length)}),e.mainDeck.filter(function(e){var n=CardInfo[e];return n.burstEffectTexts&&n.burstEffectTexts.length})];return t.forEach(function(e,t,r){var c="",a=0;e.forEach(function(e,t,r){var i=CardInfo[e],o=Localize.cardName(i);o!==c&&0!==t?(n+=a+" "+c+"\n",c=o,a=1):(c=o,a++),t===r.length-1&&(n+=a+" "+c+"\n")},this),t!==r.length-1&&(n+="——————————\n")}),n}function deckToJson(e){var n={format:"WEBXOSS Deck",version:"1",content:e};return JSON.stringify(n)}function parseFile(e,n){if(!FileReader||e.size>1024)return void n(null);var t=new FileReader;t.onload=function(e){n(parseCode(t.result))},t.readAsText(e)}function parseCode(e){try{var n=JSON.parse(e),t="WEBXOSS Deck"===n.format&&1===+n.version&&n.content.mainDeck.length<=50&&n.content.lrigDeck.length<=20;return t?n.content:null}catch(e){return null}}var concat=Array.prototype.concat.bind([]),toArr=function(e){return e?"string"==typeof e?[]:Array.prototype.slice.call(e,0):[]},isArr=Array.isArray,inArr=function(e,n){return toArr(n).indexOf(e)!=-1},removeFromArr=function(e,n){var t=n.indexOf(e);return!(t<0)&&(n.splice(t,1),!0)},isStr=function(e){return"string"==typeof e},isObj=function(e){return e&&"object"==typeof e&&!isArr(e)},isNum=function(e){return"number"==typeof e},isFunc=function(e){return"function"==typeof e},pEach=function(e,n,t){return e.reduce(function(e,t){return e.then(function(){return n(t)})},Promise.resolve())},$=document.getElementById.bind(document);Localize.init(),Localize.DOM("DeckEditor"),window.searcher=new Searcher,window.imageManager=new ImageManager("../"),window.detail=new CardDetail(imageManager);var results=[],RESULTS_LENGTH=20,_shown=0;$("search-input").onchange=search,$("search-input").onkeyup=search,$("search-show-more").onclick=showMore;var WIDTH=62,HEIGHT=87,mainData={deck:"main",limit:50,deckObjs:[],zone:$("main-deck-zone")},lrigData={deck:"lrig",limit:20,deckObjs:[],zone:$("lrig-deck-zone")},deckManager=new DeckManager,deckNames=[],deckName="",deckIndex=-1,whiteHope={mainDeck:[112,113,114,115,116,117,118,119,120,121,112,113,114,115,116,117,118,119,120,121,112,113,114,115,116,117,118,119,120,121,112,113,114,115,116,117,118,119,120,121],lrigDeck:[104,105,106,107,108,109,110,111]};updateDeckList(),selectDeck(0);var emptyDeck={mainDeck:[],lrigDeck:[]};$("button-new-deck").onclick=function(e){return $("input-new-deck-name").value?(createDeck($("input-new-deck-name").value,emptyDeck),void($("input-new-deck-name").value="")):(window.alert(Localize.editor("PLEASE_INPUT_A_DECK_NAME")),void $("input-new-deck-name").focus())},$("button-copy-deck").onclick=function(e){return $("input-new-deck-name").value?(createDeck($("input-new-deck-name").value),void($("input-new-deck-name").value="")):(window.alert(Localize.editor("PLEASE_INPUT_A_DECK_NAME")),void $("input-new-deck-name").focus())},$("button-delete-deck").onclick=function(e){window.confirm(Localize.editor("CONFIRM_DELETE_DECK",deckName))&&deleteDeck(deckName)},$("select-decks").onchange=function(e){selectDeck($("select-decks").selectedIndex)},$("button-rename").onclick=function(e){var n=window.prompt(Localize.editor("DECK_NAME"),deckName);if(n&&n!==deckName)return inArr(n,deckNames)?void window.alert(Localize.editor("DECK_NAME_ALREADY_EXISTS",n)):void renameDeck(n)},$("button-import-export").onclick=function(e){show($("div-import-warp")),$("textarea-import-export").value=""},$("button-import-export-cancel").onclick=function(e){hideImpotExport()},$("button-text").onclick=function(e){var n=deckToText(getCurrentDeck());$("textarea-import-export").value=n,$("textarea-import-export").select()},$("button-export").onclick=function(e){var n=deckName+".webxoss",t=deckToJson(getCurrentDeck());download(n,t)},$("button-export-code").onclick=function(e){var n=deckToJson(getCurrentDeck());$("textarea-import-export").value=n,$("textarea-import-export").select()};var download=function(){var e=newElement("a");return e.target="_blank",e.style.position="fixed",e.style.width="0",e.style.height="0",e.style.overflow="hidden",e.style.top="0",e.style.left="0",e.style.zIndex="-1024",e.style.opacity="0",document.body.appendChild(e),function(n,t){e.href="data:application/octet-stream,"+encodeURI(t),e.download=n,e.click()}}();$("input-file").onchange=function(e){var n=$("input-file").files[0];if($("input-file").value=null,n){var t=n.name.replace(/\.webxoss$/,"");return inArr(t,deckNames)?void window.alert(Localize.editor("DECK_NAME_ALREADY_EXISTS",t)):void parseFile(n,function(e){return $("input-file").value=null,e?(createDeck(t,e),void hideImpotExport()):void window.alert(Localize.editor("FAILED_TO_PARSE_FILE"))})}},$("button-import-code").onclick=function(e){var n=$("textarea-import-export").value,t=parseCode(n);if(t){var r=window.prompt(Localize.editor("DECK_NAME"));if(!r)return;if(inArr(r,deckNames))return void window.alert(Localize.editor("DECK_NAME_ALREADY_EXISTS",r));createDeck(r,t),hideImpotExport()}else window.alert(Localize.editor("FAILED_TO_PARSE_CODE"))},$("link-back-to-webxoss").onclick=function(e){if(window.opener&&!window.opener.closed)return e.preventDefault(),window.close(),!1},search(); \ No newline at end of file diff --git a/DeckEditor/index.html b/DeckEditor/index.html index e0fe5a1..a3876d4 100644 --- a/DeckEditor/index.html +++ b/DeckEditor/index.html @@ -1,6 +1,6 @@ - - + + DeckEditor @@ -71,12 +71,12 @@ - + - + \ No newline at end of file diff --git a/ImageAndDetail.min.js b/ImageAndDetail.min.js index 3d63a8e..99c679f 100644 --- a/ImageAndDetail.min.js +++ b/ImageAndDetail.min.js @@ -1 +1 @@ -"use strict";window.ImageManager=function(){function e(e){var t=new Image;return t.src=e,t}function t(t){this.dir=t||"./",this.black=e(this.dir+"images/WIXOSS_BLACK.jpg"),this.white=e(this.dir+"images/WIXOSS_WHITE.jpg"),this.noimage=e(this.dir+"images/noimage.jpg"),this.imageCache={},this.stateImageMap={frozen:e(this.dir+"background/frozen.png"),charm:e(this.dir+"background/charm.png"),lancer:e(this.dir+"background/lancer.png"),doubleCrash:e(this.dir+"background/doubleCrash.png"),locked:e(this.dir+"background/locked.png"),assassin:e(this.dir+"background/assassin.png")}}return t.prototype.getUrlByPid=function(e){if(!e)return this.black.src;var t=window.ImageFileCache.getUrlByPid(e);return t||(t=this.dir+"images/"+("0000"+e).slice(-4)+".jpg",window.ImageFileCache.fetchAndCache(e,t),t)},t.prototype.getImageByPid=function(t){if(!t)return this.noimage;if(t in this.imageCache)return this.imageCache[t];var i=this.getUrlByPid(t),a=e(i);return this.imageCache[t]=a,a},t.prototype.getBackImage=function(e){return e?this.white:this.black},t.prototype.getStateImage=function(e){return this.stateImageMap[e]},t}(),window.CardDetail=function(){function e(e){return document.getElementById(e)}function t(e){for(var t=document.createElement(e),i=1;i=1024?this.kvLimit.value="∞":this.kvLimit.value=i.limit,this.addKeyValue([this.kvCardType,this.kvColor],[this.kvLevel,this.kvClasses],[this.kvLimit,this.kvCost],[this.kvEffects])):"SIGNI"===i.cardType?(this.kvPower.value=i.power,this.kvGuard.value=Localize.guard(i),this.addKeyValue([this.kvCardType,this.kvColor],[this.kvLevel,this.kvClasses],[this.kvPower,this.kvGuard],[this.kvEffects],[this.kvBurst])):"RESONA"===i.cardType?(this.kvPower.value=i.power,this.kvGuard.value=Localize.guard(i),this.addKeyValue([this.kvCardType,this.kvColor],[this.kvLevel,this.kvClasses],[this.kvPower,this.kvGuard],[this.kvEffects])):"SPELL"===i.cardType?this.addKeyValue([this.kvCardType,this.kvColor],[this.kvCost],[this.kvEffects],[this.kvBurst]):"ARTS"===i.cardType&&(this.kvTimmings.value=Localize.timmings(i),this.addKeyValue([this.kvCardType,this.kvColor],[this.kvCost],[this.kvTimmings],[this.kvEffects]))}},a.prototype.addKeyValue=function(){for(var e=0;e=1024?this.kvLimit.value="∞":this.kvLimit.value=i.limit,this.addKeyValue([this.kvCardType,this.kvColor],[this.kvLevel,this.kvClasses],[this.kvLimit,this.kvCost],[this.kvEffects])):"SIGNI"===i.cardType?(this.kvPower.value=i.power,this.kvGuard.value=Localize.guard(i),this.addKeyValue([this.kvCardType,this.kvColor],[this.kvLevel,this.kvClasses],[this.kvPower,this.kvGuard],[this.kvEffects],[this.kvBurst])):"RESONA"===i.cardType?(this.kvPower.value=i.power,this.kvGuard.value=Localize.guard(i),this.addKeyValue([this.kvCardType,this.kvColor],[this.kvLevel,this.kvClasses],[this.kvPower,this.kvGuard],[this.kvEffects])):"SPELL"===i.cardType?this.addKeyValue([this.kvCardType,this.kvColor],[this.kvCost],[this.kvEffects],[this.kvBurst]):"ARTS"===i.cardType&&(this.kvTimmings.value=Localize.timmings(i),this.addKeyValue([this.kvCardType,this.kvColor],[this.kvCost],[this.kvTimmings],[this.kvEffects]))}},a.prototype.addKeyValue=function(){for(var e=0;e","label-nickname":"您的昵称:","input-nickame":{placeholder:"昵称"},"link-edit-deck":"编辑卡组","label-bgm":"音乐","label-sound-effect":"音效","label-room-list":"房间列表:","span-play-replay":"录像回放","label-create-room-password":"房间密码:","label-mayus-room":"茧的房间","label-create-room":"创建房间:","input-room-name":{placeholder:"房间名字"},"button-create-room":"创建","link-about":{textContent:"关于我们",href:"about.html"},"link-service":{textContent:"服务条款",href:"service.html"},"link-disclaimer":{textContent:"免责声明",href:"service.html#disclaimer"},"link-supporters":{textContent:"捐赠者名单",href:"supporters.html"},"span-leave-room":"<<返回","label-live":"直播","label-ready":"准备","button-replay-step":"下一步","button-replay-auto":"自动播放","button-replay-save":"保存录像","span-surrender":"投降","span-leave-game":"离开","chat-input":{placeholder:"在此处聊天"},"label-replay-list":"录像列表:","label-replay-file":"录像文件:","button-replay-return":"返回","reconnect-title":"连接已断开!","reconnect-retry":"正在重新连接...","wait-for-reconnect-title":"对手的连接已断开!","wait-for-reconnect-retry":"正在等待重新连接...","wait-for-reconnect-button-drop":"放弃等待","span-set-proxy":"设置代理","proxy-title":"设置代理","proxy-description":"使用代理后,你与WEBXOSS服务器之间的数据将由代理服务器转发. 通常情况下,你不必设置代理,但如果掉线情况频繁发生,代理可能会有所帮助.","proxy-noproxy":"不使用代理 (东京)","proxy-cloudflare":"CloudFlare","proxy-provide":"提供代理服务器...","proxy-button-ok":"确定","msgbox-button-ok":"确定","msgbox-button-cancel":"取消"},DeckEditor:{"link-back-to-webxoss":"完成编辑","label-select-deck":"选择牌组:","button-delete-deck":"删除","button-rename":"重命名","label-new-deck":"新建牌组:","input-new-deck-name":{placeholder:"牌组名字"},"button-new-deck":"新建","button-copy-deck":"复制","button-import-export":"导入/导出","main-deck-title":"主卡组","main-deck-mayus-room":"茧的房间","main-deck-burst-title":"爆发:","lrig-deck-title":"LRIG卡组","label-import-from-file":"从文件导入:","label-export-to-file":"导出到文件:","button-export":"导出","button-text":"显示文本","button-export-code":"显示代码","button-import-code":"导入代码","button-import-export-cancel":"取消","search-input":{placeholder:"输入关键字以搜索"},"link-search-tips":{textContent:"搜索技巧",href:"SearchTips.html"},"search-show-more":"显示更多"}},index:{REQUIRE_UPDATE:"客户端版本与服务器不匹配!\n更新后才能进行游戏!",UPDATING:"正在更新...",UPDATE_READY:"更新完毕,点击此处完成更新!",NET_WORK_ERROR:"网络错误.",DISCONNECTED:"连接已断开",NO_VALID_DECK:"没有可用的卡组!\n请先编辑卡组!",OPPONENT_DISCONNECTED:"对手断开了连接!",SELF_DISCONNECTED:"己方断开了连接!",PLEASE_INPUT_A_NICKNAME:"请输入昵称!",PLEASE_INPUT_A_ROOM_NAME:"请输入房间名字!",FAILED_TO_READ_DECK:"读取卡组失败!",NEW_GUEST:"%s进入了房间",GUEST_LEFT:"%s离开了房间",READY:"对手已经做好准备",UNREADY:"对手取消了准备",INPUT_PASSWORD:"请输入房间密码",WRONG_PASSWORD:"密码错误!",NOT_CONNECTED:"未与服务器建立连接!\n请稍后重试!",SUPPORT_URL:"about.html#support",CONFIRM_SURRENDER:"确定要投降吗?",SURRENDERED:"你投降了!",OPPONENT_SURRENDERED:"对手投降了!",CONFIRM_CLOSE:"游戏正在进行,您确定要离开吗?",DROPPED:"对战对手已经离开了游戏",SAVE_REPLAY:"保存录像",FAILED_TO_PARSE_REPLAY:"解析文件失败!",UNSUPPORTED_REPLAY_VERSION:"不支持的录像版本!\n请升级你的客户端!",PROVIDE_PROXY_SERVER:"你愿意为WEBXOSS提供代理服务吗?\n联系webxoss@gmail.com吧!\nWEBXOSS将在你的帮助下变得更棒!",FETCHING_DATA:'正在读取数据...\n点击"确定"取消操作.',FAILED_TO_FETCH_DATA:"读取数据失败!"},editor:{PLEASE_INPUT_A_DECK_NAME:"请输入牌组名字!",DECK_NAME:"新的卡组名字",DECK_NAME_ALREADY_EXISTS:'卡组"%s"已存在!',FAILED_TO_PARSE_FILE:"解析文件失败!",FAILED_TO_PARSE_CODE:"解析代码失败!",CONFIRM_DELETE_DECK:'确定要删除卡组"%s"吗?'}},o={common:{OK:"OK",CANCEL:"CANCEL",NO_CARDS:"No cards",or:"or"},_misc:{DIALOG_TITLE_EFFECTS:"Multiple effects have been triggered\nChoose one to resolve.",NO_OPTIONS:"Unable to %s",GIVE_UP:"Don't %s",GUARD_TRUE:"Yes",GUARD_FALSE:"No",LIMITING:"%s Only",WAIT:"Waiting...",CLASS_SEPARATOR:":\n",CROSS_NAME_QUOTE_LEFT:'"',CROSS_NAME_QUOTE_RIGHT:'"',CROSS_LEFT:">Cross< %s Left",CROSS_RIGHT:">Cross< %s Right",CROSS_AND:">Cross< %s Right and %s Left",CROSS_OR:" or ",GUARD_DESCRIPTION:"[Guard] (By discarding this card from your hand, disable one of a LRIG's attacks)",MULTI_ENER_DESCRIPTION:"[Constant]: [Multi Ener] (When you pay a cost, treat this card as if it has all colors)"},buttonTitle:{OK:"OK",CANCEL:"CANCEL",LEVEL0_LRIG:"Set up LRIG",DISCARD_AND_REDRAW:"Mulligan",CHARGE:"Charge",GROW:"Grow",SUMMON_SIGNI:"Summon",SUMMON_SIGNI_ZONE:"Zone",BANISH:"Banish",BOUNCE:"Bounce",TRASH:"Trash",TRASH_SIGNI:"Trash",USE_SPELL:"Use SPEL",SPELL_EFFECT:"Select SPELL effect",USE_ARTS:"Use ARTS",ARTS_EFFECT:"Select ARTS effect",SPELL_CUT_IN:"Spell cut-in",USE_ACTION_EFFECT:"Action effect",SEEK:"Search",SET_ORDER:"Set order",SIGNI_ATTACK:"Attack",LRIG_ATTACK:"Attack",GUARD:"Guard",DISCARD:"Discard",DECLARE:"Declare",PAY:"Pay",PAY_EXCEED:"Exceed",DOWN:"Down",UP:"Up",TARGET:"Target",PAY_ENER:"Pay ener",LAUNCH:"Launch",EFFECTS:"Effects",CONFIRM:"Confirm",END_SELECT:"End select",END_ENER_PHASE:"End Ener Phase",END_GROW_PHASE:"End Grow Phase",END_MAIN_PHASE:"End Main Phase",END_ARTS_STEP:"End ARTS Step",END_SIGNI_ATTACK_STEP:"End SIGNI Attack Step",END_LRIG_ATTACK_STEP:"End LRIG Attack Step",VIEW:"View",ADD_TO_HAND:"Add to hand",COLOR:"Color",CHOOSE_EFFECT:"Choose Effect",CHOOSE_ZONE:"Choose Zone",RESET_SIGNI_ZONE:"Replace",CHARM_CARD:"Charm",TRASH_CHARM:"Trash Charm",REVEAL:"Reveal",PUT_TO_TOP:"Put to top",PUT_TO_BOTTOM:"Put to bottom",REVEAL_MORE:"Reveal more cards",PROTECT:"Protect",_SHIRONAKUJI:"-6000",CLASS:"class",PAY_WHITE_INSTEAD:"Pay [White] instead",TRASH_OSAKI:"Trash Osaki",RESONA:"Resona",CRASH:"Crash",PLAYER:"Player",PUT_TO_CHECK_ZONE:"Put to Check Zone",PUT_TO_ENER_ZONE:"Put to Ener Zone",CONFIRM_REFRESH_SELF:"Deck refesh\nConfirm your trash",CONFIRM_REFRESH_OPPONENT:"Deck refesh\nConfirm opponent's trash",GUESS_TRAP:"Is trap?"},noOptions:{TARGET:"No targets"},giveUp:{TARGET:"Don't select",SUMMON_SIGNI_ZONE:"Cancel"},gameText:{YES:"Yes",NO:"No",white:"white",black:"black",red:"red",blue:"blue",green:"green",colorless:"colorless",ADD_TO_HAND:"Add to hand",SUMMON:"Summon",DOWN:"Down",UP:"Up",SHOW_EFFECTS_DIALOG_TITLE:"Effect",PUT_TO_TOP:"Put to top",PUT_TO_BOTTOM:"Put to bottom",SELF:"Me",OPPONENT:"Opponent",PUT_TO_ENER_ZONE:"Put to Ener Zone",CONFIRM_ENCORE:"Do you want to pay for Encore?",CONFIRM_BET:"Do you want to bet?",MAIN_DECK:"Main Deck",HAND:"Hand",SIGNI_ZONE:"SIGNI Zone",TRASH_ZONE:"Trash Zone",ENER_ZONE:"Ener Zone",LIFE_CLOTH:"Life Cloth",SELECT_DONE:"End select"},prop:{cardType:"Type",classes:"Class",level:"Level",color:"Color",limit:"Limit",power:"Power",limting:"Limiting",guard:"Guard",cost:"Cost",timmings:"Timing",effects:"Abilities",burst:"Life Burst"},cardType:{LRIG:"LRIG",SIGNI:"SIGNI",SPELL:"SPELL",ARTS:"ARTS",RESONA:"RESONA"},color:{white:"White",black:"Black",red:"Red",blue:"Blue",green:"Green",colorless:"Colorless"},costColor:{costWhite:"White",costBlack:"Black",costRed:"Red",costBlue:"Blue",costGreen:"Green",costColorless:"Colorless"},timming:{mainPhase:"[Main Phase]",attackPhase:"[Attack Phase]",spellCutIn:"[Spell Cut-In]"},class:{"タマ":"Tama","花代":"Hanayo","ユヅキ":"Yuzuki","ピルルク":"Piruluk","エルドラ":"Eldora","ミルルン":"Mirurun","緑子":"Midoriko","アン":"Anne","ウリス":"Ulith","イオナ":"Iona","ウムル":"Umuru","リメンバ":"Remember","タウィル":"Tawil","サシェ":"Sashe","ミュウ":"Myuu","アイヤイ":"Aiyai","アルフォウ":"Alfou","ハナレ":"Hanare","リル":"Ril","メル":"Mel","あや":"Aya","ナナシ":"Nanashi","ドーナ":"Donna","ママ":"Mama","精像":"Image","天使":"Angel","悪魔":"Devil","美巧":"Beautiful Technique","精武":"War","アーム":"Arm","ウェポン":"Weapon","武勇":"Valor","調理":"Cooking","遊具":"Playground Equipment","毒牙":"Poison Fang","精羅":"Nature","鉱石":"Ore","宝石":"Gem","植物":"Plant","原子":"Atom","宇宙":"Space","精械":"Machine","電機":"Electric","古代兵器":"Ancient Weapon","迷宮":"Labyrinth","精生":"Living","水獣":"Water Beast","空獣":"Sky Beast","地獣":"Earth Beast","龍獣":"Dragon Beast","凶蟲":"Misfortune Insect","精元":"Origin","トリック":"Trick","英知":"Wisdom","微菌":"Bacteria","怪異":"Apparition"},DOM:{index:{"link-version":"","label-nickname":"Nickname:","input-nickame":{placeholder:"nickname"},"link-edit-deck":"DeckEditor","label-bgm":"BGM","label-sound-effect":"SE","label-room-list":"Room list:","span-play-replay":"Watch Replay","label-create-room-password":"Password:","label-mayus-room":"Mayu's Room","label-create-room":"Create Room:","input-room-name":{placeholder:"room name"},"button-create-room":"create","link-about":{textContent:"About",href:"about_en.html"},"link-service":{textContent:"Terms",href:"service_en.html"},"link-disclaimer":{textContent:"Disclaimer",href:"service_en.html#disclaimer"},"link-supporters":{textContent:"Supporters",href:"supporters_en.html"},"span-leave-room":"<","label-nickname":"ニックネーム:","input-nickame":{placeholder:"ニックネーム"},"link-edit-deck":"デッキ構築","label-bgm":"BGM","label-sound-effect":"SE","label-room-list":"部屋リスト:","span-play-replay":"リプレイ再生","label-create-room-password":"パスワード:","label-mayus-room":"繭の部屋","label-create-room":"部屋を作る:","input-room-name":{placeholder:"部屋の名前"},"button-create-room":"完成","link-about":{textContent:"About",href:"about_en.html"},"link-service":{textContent:"Terms",href:"service_en.html"},"link-disclaimer":{textContent:"Disclaimer",href:"service_en.html#disclaimer"},"link-supporters":{textContent:"Supporters",href:"supporters_en.html"},"span-leave-room":"<<戻る","label-live":"LIVE","label-ready":"準備","button-replay-step":"STEP","button-replay-auto":"AUTO","button-replay-save":"DOWNLOAD","span-surrender":"投了する","span-leave-game":"戻る","chat-input":{placeholder:"ここでチャットする"},"label-replay-list":"リプレイリスト:","label-replay-file":"ファイル:","button-replay-return":"戻る","reconnect-title":"リンクが切断されました。","reconnect-retry":"再接続中…","wait-for-reconnect-title":"対戦相手が切断されました。","wait-for-reconnect-retry":"再接続を待っています...","wait-for-reconnect-button-drop":"待たない","span-set-proxy":"Set Proxy","proxy-title":"Proxy","proxy-description":"If your connection to WEBXOSS server is not stable, you can try a proxy.","proxy-noproxy":"No Proxy (Tokyo)","proxy-cloudflare":"CloudFlare","proxy-provide":"Provide a server...","proxy-button-ok":"OK","msgbox-button-ok":"OK","msgbox-button-cancel":"キャンセル"},DeckEditor:{"link-back-to-webxoss":"構築完成","label-select-deck":"デッキを選ぶ:","button-delete-deck":"デリート","button-rename":"リネーム","label-new-deck":"新しいデッキ:","input-new-deck-name":{placeholder:"デッキ名"},"button-new-deck":"新築","button-copy-deck":"複製","button-import-export":"インポート/エクスポート","main-deck-title":"メインデッキ","main-deck-mayus-room":"繭の部屋","main-deck-burst-title":"ライフバースト:","lrig-deck-title":"ルリグデッキ","label-import-from-file":"ファイルからインポート:","label-export-to-file":"ファイルにエクスポート:","button-export":"エクスポート","button-text":"テキストを表示","button-export-code":"コードを表示","button-import-code":"コードをインポート","button-import-export-cancel":"キャンセル","search-input":{placeholder:"キーワードで検索"},"link-search-tips":{textContent:"ヒント",href:"SearchTips_en.html"},"search-show-more":"もっと表す…"}},index:{REQUIRE_UPDATE:"新しいバージョンが必要です。\nクライアントを更新してください。",UPDATING:"更新中…",UPDATE_READY:"更新完了しました。ここでクリックと完成する。",NET_WORK_ERROR:"ネットワークにエラーがあります。",DISCONNECTED:"リンク切断されました。",NO_VALID_DECK:"まずデッキを作りなさい。",OPPONENT_DISCONNECTED:"対戦相手が切断されました。",SELF_DISCONNECTED:"対戦者が切断されました。",PLEASE_INPUT_A_NICKNAME:"ニックネームを入力して下さい。",PLEASE_INPUT_A_ROOM_NAME:"部屋名を入力して下さい。",FAILED_TO_READ_DECK:"デッキローディングは失敗しました。",NEW_GUEST:"%s部屋に入りました",GUEST_LEFT:"%s部屋を出ました",READY:"対戦相手は準備ができています。",UNREADY:"Unready",INPUT_PASSWORD:"パスワード",WRONG_PASSWORD:"パスワードが正しくありません。",NOT_CONNECTED:"まだサーバに接続されていません。\n後でもう一度お試しください。",SUPPORT_URL:"about_en.html#support",CONFIRM_SURRENDER:"投了てもよろしいですか?",SURRENDERED:"あなたは投了しました。",OPPONENT_SURRENDERED:"対戦相手は投了しました。",CONFIRM_CLOSE:"ゲームを離れてもよろしいですか?",DROPPED:"対戦相手は、もうゲームから離れた。",SAVE_REPLAY:"リプレイを保存",FAILED_TO_PARSE_REPLAY:"ファイル解析は失敗しました。",UNSUPPORTED_REPLAY_VERSION:"Unsupported replay version!\nPlease update your client!",PROVIDE_PROXY_SERVER:"Would you like to provide us a proxy server?\nPlease contact webxoss@gmail.com !\nWEBXOSS will be more awesome with your help!",FETCHING_DATA:'Fetching data...\nClick "OK" to cancel.',FAILED_TO_FETCH_DATA:"Failed to fetch data!"},editor:{PLEASE_INPUT_A_DECK_NAME:"デッキ名を入力して下さい。",DECK_NAME:"デッキ名",DECK_NAME_ALREADY_EXISTS:'デッキ"%s"は既に存在しました。',FAILED_TO_PARSE_FILE:"ファイル解析は失敗しました。",FAILED_TO_PARSE_CODE:"コード解析は失敗しました。",CONFIRM_DELETE_DECK:'Are you sure to delete "%s"?'}},E={common:{OK:"OK",CANCEL:"Отмена",NO_CARDS:"Нет карт",or:"or"},_misc:{DIALOG_TITLE_EFFECTS:"Сработало несколько способностей.\nВыберите какую выполнить.",NO_OPTIONS:"Не могу %s",GIVE_UP:"Не %s",GUARD_TRUE:"Да",GUARD_FALSE:"Нет",LIMITING:"Лишь для %s",WAIT:"Ожидание...",CLASS_SEPARATOR:":\n",CROSS_NAME_QUOTE_LEFT:'"',CROSS_NAME_QUOTE_RIGHT:'"',CROSS_LEFT:">Связь< слева от %s",CROSS_RIGHT:">Связь< справа от %s",CROSS_AND:">Cross< %s Right and %s Left",CROSS_OR:" или ",GUARD_DESCRIPTION:"[Защита] (Сбросив эту карту со своей руки, отмените атаку одной ИДЕЛ.)",MULTI_ENER_DESCRIPTION:"[Постоянно]: [Мульти-энер] (Когда Вы платите цену, считается, что эта карта относится ко всем цветам.)"},buttonTitle:{OK:"OK",CANCEL:"Отмена",LEVEL0_LRIG:"Выбрать ИДЕЛ",DISCARD_AND_REDRAW:"Заменить",CHARGE:"Зарядить",GROW:"Рост",SUMMON_SIGNI:"призвать",SUMMON_SIGNI_ZONE:"Зона",BANISH:"стереть",BOUNCE:"Вернуть",TRASH:"убрать",TRASH_SIGNI:"Убрать",USE_SPELL:"Использовать Магию",SPELL_EFFECT:"Выберите эффект Магии",USE_ARTS:"Использовать Умения",ARTS_EFFECT:"Выберите эффект Умения",SPELL_CUT_IN:"Ответить",USE_ACTION_EFFECT:"Действие",SEEK:"Искать",SET_ORDER:"Порядок",SIGNI_ATTACK:"Атаковать",LRIG_ATTACK:"Атаковать",GUARD:"защититься",DISCARD:"сбросить",DECLARE:"Назвать",PAY:"Заплатить",PAY_EXCEED:"Выход за грань",DOWN:"Положить",UP:"Поднять",TARGET:"выбрать",PAY_ENER:"заплатить энер",LAUNCH:"использовать",EFFECTS:"Эффекты",CONFIRM:"Подтвердить",END_SELECT:"Завершить выбор",END_ENER_PHASE:"Конец энер-фазы",END_GROW_PHASE:"Конец фазы роста",END_MAIN_PHASE:"Конец основной фазы",END_ARTS_STEP:"Конец шага Умений",END_SIGNI_ATTACK_STEP:"Конец шага атаки Записей",END_LRIG_ATTACK_STEP:"Конец шага атаки ИДЕЛ",VIEW:"Посмотреть",ADD_TO_HAND:"Взять в руку",COLOR:"Цвет",CHOOSE_EFFECT:"Выберите эффект",CHOOSE_ZONE:"Выберите зону",RESET_SIGNI_ZONE:"Заменить",CHARM_CARD:"Чары",TRASH_CHARM:"Убрать Чары",REVEAL:"Показать",PUT_TO_TOP:"Поместить наверх",PUT_TO_BOTTOM:"Поместить вниз",REVEAL_MORE:"Показать больше карт",PROTECT:"Защитить",_SHIRONAKUJI:"-6000",CLASS:"класс",PAY_WHITE_INSTEAD:"Заплатить [Белую] взамен",TRASH_OSAKI:"Убрать Osaki",RESONA:"Отглас",CRASH:"Разрушить",PLAYER:"Игрок",PUT_TO_CHECK_ZONE:"Поместить в зону проверки",PUT_TO_ENER_ZONE:"Поместить в энер-зону",CONFIRM_REFRESH_SELF:"Обновление колоды\nОзнакомьтесь со сбросом",CONFIRM_REFRESH_OPPONENT:"Обновление колоды\nОзнакомьтесь со сбросом",GUESS_TRAP:"Является ли карта Ловушкой?"},noOptions:{TARGET:"Нет целей"},giveUp:{TARGET:"Не выбирать",SUMMON_SIGNI_ZONE:"Отмена"},gameText:{YES:"Yes",NO:"No",white:"белая",black:"чёрная",red:"красная",blue:"синяя",green:"зелёная",colorless:"бесцветная",ADD_TO_HAND:"Взять в руку",SUMMON:"Призвать",DOWN:"Положить",UP:"Поднять",SHOW_EFFECTS_DIALOG_TITLE:"Эффект",PUT_TO_TOP:"Поместить наверх",PUT_TO_BOTTOM:"Поместить вниз",SELF:"Я",OPPONENT:"Противник",PUT_TO_ENER_ZONE:"Поместить в энер-зону",CONFIRM_ENCORE:"Заплатить за Продление?",CONFIRM_BET:"Сделать ставку?",MAIN_DECK:"Основная колода",HAND:"руку",SIGNI_ZONE:"Зону Записей",TRASH_ZONE:"сброс",ENER_ZONE:"энер-зону",LIFE_CLOTH:"Жизненная материя",SELECT_DONE:"Завершить"},prop:{cardType:"Тип",classes:"Класс",level:"Уровень",color:"Цвет",limit:"Лимит",power:"Сила",limting:"Ограничения",guard:"Защита",cost:"Цена",timmings:"Момент",effects:"Способности",burst:"вспышка"},cardType:{LRIG:"ИДЕЛ",SIGNI:"Запись",SPELL:"Магия",ARTS:"Умение",RESONA:"Отголосок"},color:{white:"Белая",black:"Чёрная",red:"Красная",blue:"Синяя",green:"Зелёная",colorless:"Бесцветная"},costColor:{costWhite:"Белая",costBlack:"Чёрная",costRed:"Красная",costBlue:"Синяя",costGreen:"Зелёная",costColorless:"Бесцветная"},timming:{mainPhase:"[Основная фаза]",attackPhase:"[Фаза атаки]",spellCutIn:"[Ответ на магию]"},class:{"タマ":"Tama","花代":"Hanayo","ユヅキ":"Yuzuki","ピルルク":"Piruluk","エルドラ":"Eldora","ミルルン":"Mirurun","緑子":"Midoriko","アン":"Anne","ウリス":"Ulith","イオナ":"Iona","ウムル":"Umr","リメンバ":"Remember","タウィル":"Tawil","サシェ":"Sashe","ミュウ":"Myuu","アイヤイ":"Aiyai","アルフォウ":"Alfou","ハナレ":"Hanare","リル":"Ril","メル":"Mel","あや":"Aya","ナナシ":"Nanashi","ドーナ":"Donna","ママ":"Mama","精像":"Миф","天使":"Ангел","悪魔":"Демон","美巧":"Прекрасный навык","精武":"Война","アーム":"Вооружение","ウェポン":"Снаряд","武勇":"Доблестная","調理":"Кулинарная","遊具":"Игровой предмет","毒牙":"Ядовитый клык","精羅":"Естество","鉱石":"Руда","宝石":"Драгоценность","植物":"Растение","原子":"Атом","宇宙":"Космос","精械":"Механика","電機":"Электромашина","古代兵器":"Древнее оружие","迷宮":"Лабиринт","精生":"Существо","水獣":"Водный зверь","空獣":"Небесный зверь","地獣":"Земной зверь","龍獣":"Драконоподобный зверь","凶蟲":"Злобное насекомое","精元":"Первородный","トリック":"Шалость","英知":"Мудрость","微菌":"Бактерия","怪異":"Привидение"},DOM:{index:{"link-version":"","label-nickname":"Никнейм:","input-nickame":{placeholder:"никнейм"},"link-edit-deck":"РедакторКолоды","label-bgm":"BGM","label-sound-effect":"SE","label-room-list":"Список комнат","span-play-replay":"Посмотреть повтор","label-create-room-password":"Пароль:","label-mayus-room":"繭の部屋","label-create-room":"Создать комнату:","input-room-name":{placeholder:"имя комнаты"},"button-create-room":"создать","link-about":{textContent:"О клиенте",href:"about_en.html"},"link-service":{textContent:"Положения",href:"service_en.html"},"link-disclaimer":{textContent:"Дисклеймер",href:"service_en.html#disclaimer"},"link-supporters":{textContent:"Пожертвования",href:"supporters_en.html"},"span-leave-room":"<<Вернуться","label-live":"LIVE","label-ready":"Готов","button-replay-step":"ДАЛЕЕ","button-replay-auto":"АВТО","button-replay-save":"DOWNLOAD","span-surrender":"Сдаться","span-leave-game":"Выйти","chat-input":{placeholder:"Сообщение..."},"label-replay-list":"Список повторов:","label-replay-file":"Файл повтора:","button-replay-return":"Вернуться","reconnect-title":"Соединение потеряно!","reconnect-retry":"Переподключение...","wait-for-reconnect-title":"Оппонент потерял соединение!","wait-for-reconnect-retry":"Ожидание переподключения...","wait-for-reconnect-button-drop":"Уйти","span-set-proxy":"Установить Proxy","proxy-title":"Proxy","proxy-description":"Если Ваше соединение с WEBXOSS нестабильно, можете использовать Proxy.","proxy-noproxy":"Без Proxy (Tokyo)","proxy-cloudflare":"CloudFlare","proxy-provide":"Свой сервер...","proxy-button-ok":"OK","msgbox-button-ok":"OK","msgbox-button-cancel":"Отмена"},DeckEditor:{"link-back-to-webxoss":"Готово","label-select-deck":"Выберите колоду:","button-delete-deck":"Удалить","button-rename":"Переименовать","label-new-deck":"Новая колода:","input-new-deck-name":{placeholder:"имя колоды"},"button-new-deck":"Добавить","button-copy-deck":"Дублировать","button-import-export":"Загрузить/Выгрузить","main-deck-title":"Основная колода","main-deck-mayus-room":"Комната Маю","main-deck-burst-title":"Вспышки: ","lrig-deck-title":"ИДЕЛ-колода","label-import-from-file":"Загрузить файл:","label-export-to-file":"Выгрузить файл:","button-export":"Выгрузить","button-text":"Показать текстом","button-export-code":"Показать код","button-import-code":"Импортировать код","button-import-export-cancel":"Отмена","search-input":{placeholder:"Искать..."},"link-search-tips":{textContent:"Памятка по поиску",href:"SearchTips_en.html"},"search-show-more":"Показать ещё"}},index:{REQUIRE_UPDATE:"Нужна новая версия!\nЧтобы начать игру, необходимо обновить клиент!",UPDATING:"Обновляю...",UPDATE_READY:"Обновлено, нажмите для применения!",NET_WORK_ERROR:"Ошибка сети.",DISCONNECTED:"Потеря соединения",NO_VALID_DECK:"Нет доступной колоды!\nОтредактируйте свою колоду!",OPPONENT_DISCONNECTED:"Противник потерял соединение!",SELF_DISCONNECTED:"Игрок потерял соединение!",PLEASE_INPUT_A_NICKNAME:"Введите свой никнейм!",PLEASE_INPUT_A_ROOM_NAME:"Введите имя комнаты!",FAILED_TO_READ_DECK:"Не удалось прочитать колоду!",NEW_GUEST:"%s вошёл в комнату.",GUEST_LEFT:"%s покинул комнату.",READY:"Готов открывать!",UNREADY:"Не готов",INPUT_PASSWORD:"Введите пароль",WRONG_PASSWORD:"Неверный пароль!",NOT_CONNECTED:"Нет соединения с сервером!\nПожалуйста, попробуйте позже!",SUPPORT_URL:"about_en.html#support",CONFIRM_SURRENDER:"Вы точно хотите сдаться?",SURRENDERED:"Вы сдались!",OPPONENT_SURRENDERED:"Противник сдался!",CONFIRM_CLOSE:"Вы точно хотите уйти?",DROPPED:"Противник ушёл.",SAVE_REPLAY:"Сохранить повтор",FAILED_TO_PARSE_REPLAY:"Не удалось разобрать повтор!", -UNSUPPORTED_REPLAY_VERSION:"Неподдерживаемая версия повтора!\nОбновите клиент!",PROVIDE_PROXY_SERVER:"Желаете предоставить свой Proxy-сервер?\nСвяжитесь с webxoss@gmail.com !\nWEBXOSS с Вашей помощью станет лучше!",FETCHING_DATA:'Загрузка данных...\nНажмите "OK" для отмены.',FAILED_TO_FETCH_DATA:"Не удалось загрузить!"},editor:{PLEASE_INPUT_A_DECK_NAME:"Введите имя колоды!",DECK_NAME:"Имя колоды:",DECK_NAME_ALREADY_EXISTS:'Колода с именем "%s" уже существует!',FAILED_TO_PARSE_FILE:"Не удалось разобрать файл!",FAILED_TO_PARSE_CODE:"Не удалось разобрать код!",CONFIRM_DELETE_DECK:'Вы точно хотите удалить "%s"?'}},n={common:{OK:"OK",CANCEL:"CANCEL",NO_CARDS:"No cards",or:"or"},_misc:{DIALOG_TITLE_EFFECTS:"Piu effetti sono stati attivati\nScegline uno da risolvere.",NO_OPTIONS:"Non hai %s",GIVE_UP:"Non %s",GUARD_TRUE:"Si",GUARD_FALSE:"No",LIMITING:"%s Only",WAIT:"In attesa...",CLASS_SEPARATOR:":\n",CROSS_NAME_QUOTE_LEFT:'"',CROSS_NAME_QUOTE_RIGHT:'"',CROSS_LEFT:">Cross< %s Sinistra",CROSS_RIGHT:">Cross< %s Destra",CROSS_AND:">Cross< %s Right and %s Left",CROSS_OR:" o ",GUARD_DESCRIPTION:"[Guard] (Scartando questa carta dalla tua mano annulla un attacco di una LRIG)",MULTI_ENER_DESCRIPTION:"[Constant]: [Multi Ener] (Mentre paghi un costo tratta questa carta come se fosse di un qualsiasi colore)"},buttonTitle:{OK:"OK",CANCEL:"Annulla",LEVEL0_LRIG:"Seleziona LRIG",DISCARD_AND_REDRAW:"Mulligan",CHARGE:"Carica",GROW:"Grow",SUMMON_SIGNI:"Evoca",SUMMON_SIGNI_ZONE:"Zona",BANISH:"Bandisci",BOUNCE:"Rimbalza",TRASH:"Scarti",TRASH_SIGNI:"Scarta",USE_SPELL:"Usa SPELL",SPELL_EFFECT:"Scegli che effetto attivare",USE_ARTS:"Usa ARTS",ARTS_EFFECT:"Scegli che effetto attivare",SPELL_CUT_IN:"Spell cut-in",USE_ACTION_EFFECT:"Azione",SEEK:"Cerca",SET_ORDER:"Ordina",SIGNI_ATTACK:"Attacca",LRIG_ATTACK:"Attacca",GUARD:"Guard",DISCARD:"Scarta",DECLARE:"Dichiara",PAY:"Paga",PAY_EXCEED:"Exceed",DOWN:"Down",UP:"Up",TARGET:"Bersaglia",PAY_ENER:"Paga Ener",LAUNCH:"Lancia",EFFECTS:"Effetti",CONFIRM:"Conferma",END_SELECT:"Termina",END_ENER_PHASE:"Fine Ener Phase",END_GROW_PHASE:"Fine Grow Phase",END_MAIN_PHASE:"Fine Main Phase",END_ARTS_STEP:"Fine ARTS Step",END_SIGNI_ATTACK_STEP:"Fine SIGNI Attack Step",END_LRIG_ATTACK_STEP:"Fine LRIG Attack Step",VIEW:"Dettagli",ADD_TO_HAND:"Aggiungi alla mano",COLOR:"Colore",CHOOSE_EFFECT:"Seleziona effetto",CHOOSE_ZONE:"Seleziona Zona",RESET_SIGNI_ZONE:"Sostituisci",CHARM_CARD:"Charm",TRASH_CHARM:"Scarta Charm",REVEAL:"Rivela",PUT_TO_TOP:"Metti in cima",PUT_TO_BOTTOM:"Metti in fondo",REVEAL_MORE:"Rivela altre carte",PROTECT:"Protect",_SHIRONAKUJI:"-6000",CLASS:"classe",PAY_WHITE_INSTEAD:"Paga [White] invece",TRASH_OSAKI:"Scarta Osaki",RESONA:"Resona",CRASH:"Crash",PLAYER:"Player",PUT_TO_CHECK_ZONE:"Sposta nella Check Zone",PUT_TO_ENER_ZONE:"Sposta nella Ener Zone",CONFIRM_REFRESH_SELF:"Deck refresh\nConferma",CONFIRM_REFRESH_OPPONENT:"Deck refresh avversario\nConferma",GUESS_TRAP:"Is trap?"},noOptions:{TARGET:"Nessun bersaglio"},giveUp:{TARGET:"Non selezionare",SUMMON_SIGNI_ZONE:"Cancella"},gameText:{YES:"Yes",NO:"No",white:"white",black:"black",red:"red",blue:"blue",green:"green",colorless:"colorless",ADD_TO_HAND:"Aggiungi alla mano",SUMMON:"Evoca",DOWN:"Down",UP:"Up",SHOW_EFFECTS_DIALOG_TITLE:"Effetto",PUT_TO_TOP:"Metti in cima",PUT_TO_BOTTOM:"Metti in fondo",SELF:"Giocatore",OPPONENT:"Avversario",PUT_TO_ENER_ZONE:"Metti nella Ener Zone",CONFIRM_ENCORE:"Vuoi pagare il costo di Encore?",CONFIRM_BET:"Do you want to bet?",MAIN_DECK:"Main Deck",HAND:"Hand",SIGNI_ZONE:"SIGNI Zone",TRASH_ZONE:"Trash Zone",ENER_ZONE:"Ener Zone",LIFE_CLOTH:"Life Cloth",SELECT_DONE:"Termina"},prop:{cardType:"Tipo",classes:"Classe",level:"Livello",color:"Colore",limit:"Limite",power:"Power",limting:"Limitazione",guard:"Guard",cost:"Costo",timmings:"Timing",effects:"Abilita",burst:"Life Burst"},cardType:{LRIG:"LRIG",SIGNI:"SIGNI",SPELL:"SPELL",ARTS:"ARTS",RESONA:"RESONA"},color:{white:"White",black:"Black",red:"Red",blue:"Blue",green:"Green",colorless:"Colorless"},costColor:{costWhite:"White",costBlack:"Black",costRed:"Red",costBlue:"Blue",costGreen:"Green",costColorless:"Colorless"},timming:{mainPhase:"[Main Phase]",attackPhase:"[Attack Phase]",spellCutIn:"[Spell Cut-In]"},class:{"タマ":"Tama","花代":"Hanayo","ユヅキ":"Yuzuki","ピルルク":"Piruluk","エルドラ":"Eldora","ミルルン":"Mirurun","緑子":"Midoriko","アン":"Anne","ウリス":"Ulith","イオナ":"Iona","ウムル":"Umuru","リメンバ":"Remember","タウィル":"Tawil","サシェ":"Sashe","ミュウ":"Myuu","アイヤイ":"Aiyai","アルフォウ":"Alfou","ハナレ":"Hanare","リル":"Ril","メル":"Mel","あや":"Aya","ナナシ":"Nanashi","ドーナ":"Donna","ママ":"Mama","精像":"Image","天使":"Angel","悪魔":"Devil","美巧":"Beautiful Technique","精武":"War","アーム":"Arm","ウェポン":"Weapon","武勇":"Valor","調理":"Cooking","遊具":"Playground Equipment","毒牙":"Poison Fang","精羅":"Nature","鉱石":"Ore","宝石":"Gem","植物":"Plant","原子":"Atom","宇宙":"Space","精械":"Machine","電機":"Electric","古代兵器":"Ancient Weapon","迷宮":"Labyrinth","精生":"Living","水獣":"Water Beast","空獣":"Sky Beast","地獣":"Earth Beast","龍獣":"Dragon Beast","凶蟲":"Misfortune Insect","精元":"Origin","トリック":"Trick","英知":"Wisdom","微菌":"Bacteria","怪異":"Apparition"},DOM:{index:{"link-version":"","label-nickname":"Nickname:","input-nickame":{placeholder:"nickname"},"link-edit-deck":"Deck Editor","label-bgm":"BGM","label-sound-effect":"SE","label-room-list":"Stanze:","span-play-replay":"Guarda Replay","label-create-room-password":"Password:","label-mayus-room":"Stanza di mayu","label-create-room":"Crea Stanza:","input-room-name":{placeholder:"room name"},"button-create-room":"crea","link-about":{textContent:"About",href:"about_en.html"},"link-service":{textContent:"Termini",href:"service_en.html"},"link-disclaimer":{textContent:"Disclaimer",href:"service_en.html#disclaimer"},"link-supporters":{textContent:"Supporters",href:"supporters_en.html"},"span-leave-room":"<< Torna","label-live":"LIVE","label-ready":"Pronto","button-replay-step":"STEP","button-replay-auto":"AUTO","button-replay-save":"DOWNLOAD","span-surrender":"Resa","span-leave-game":"Abbandona","chat-input":{placeholder:"Chatta qui..."},"label-replay-list":"Lista replay:","label-replay-file":"File replay:","button-replay-return":"Torna","reconnect-title":"Ti sei disconnesso!","reconnect-retry":"Riconnessione...","wait-for-reconnect-title":"Il tuo avversario si è disconnesso!","wait-for-reconnect-retry":"In attesa di riconnessione...","wait-for-reconnect-button-drop":"Drop","span-set-proxy":"Imposta Proxy","proxy-title":"Proxy","proxy-description":"Se la tua connessione a WEBXOSS non è stabile puoi provare con l'uso di un proxy.","proxy-noproxy":"No Proxy (Tokyo)","proxy-cloudflare":"CloudFlare","proxy-provide":"Configura server...","proxy-button-ok":"OK","msgbox-button-ok":"OK","msgbox-button-cancel":"Annulla"},DeckEditor:{"link-back-to-webxoss":"Fine","label-select-deck":"Seleziona deck:","button-delete-deck":"Cancella","button-rename":"Rinomina","label-new-deck":"Nuovo deck:","input-new-deck-name":{placeholder:"nome deck"},"button-new-deck":"Aggiungi","button-copy-deck":"Duplica","button-import-export":"Importa/Esporta","main-deck-title":"Main Deck","main-deck-mayus-room":"Stanza di mayu","main-deck-burst-title":"Burst: ","lrig-deck-title":"LRIG Deck","label-import-from-file":"Importa file:","label-export-to-file":"Esporta file:","button-export":"Esporta","button-text":"Mostra testo","button-export-code":"Mostra codice","button-import-code":"Importa codice","button-import-export-cancel":"Annulla","search-input":{placeholder:"Cerca qui..."},"link-search-tips":{textContent:"Spiegazione filtri",href:"SearchTips_it.html"},"search-show-more":"Altro"}},index:{REQUIRE_UPDATE:"Una nuova versione è richiesta! Aggiorna il client!",UPDATING:"Aggiornamento...",UPDATE_READY:"Aggiornato, conferma per applicare!",NET_WORK_ERROR:"Errore di rete.",DISCONNECTED:"Disconnesso",NO_VALID_DECK:"Nessun deck valido! Modifica il tuo deck!",OPPONENT_DISCONNECTED:"Il tuo avversario si è disconnesso!",SELF_DISCONNECTED:"Il giocatore si è disconnesso!",PLEASE_INPUT_A_NICKNAME:"Inserisci un nickname!",PLEASE_INPUT_A_ROOM_NAME:"Inserisci il nome della stanza!",FAILED_TO_READ_DECK:"Lettura del deck fallita!",NEW_GUEST:"%s è entrato nella stanza.",GUEST_LEFT:"%s ha lasciato la stanza.",READY:"Pronto!",UNREADY:"Non pronto",INPUT_PASSWORD:"Inserisci password",WRONG_PASSWORD:"Password errata!",NOT_CONNECTED:"Non connesso, riprova piu tardi!",SUPPORT_URL:"about_en.html#support",CONFIRM_SURRENDER:"Sicuro di volerti arrendere?",SURRENDERED:"Ti sei arreso!",OPPONENT_SURRENDERED:"Il tuo avversario si è arreso!",CONFIRM_CLOSE:"Sicuro di voler abbandonare?",DROPPED:"You are dropped.",SAVE_REPLAY:"Salva replay",FAILED_TO_PARSE_REPLAY:"File replay non valido!",UNSUPPORTED_REPLAY_VERSION:"Versione del replay non supportata, aggiorna il tuo client!",PROVIDE_PROXY_SERVER:"Vuoi donare un server proxy?\nPer piacere contattaci a webxoss@gmail.com !\nWEBXOSS sara ancora migliore grazie a te!",FETCHING_DATA:'Lettura dati...\nPremi "OK" per annullare.',FAILED_TO_FETCH_DATA:"Lettura dati fallita!"},editor:{PLEASE_INPUT_A_DECK_NAME:"Inserisci nome del deck!",DECK_NAME:"Nome Deck:",DECK_NAME_ALREADY_EXISTS:'il Deck "%s" esiste gia!',FAILED_TO_PARSE_FILE:"Lettura file fallita!",FAILED_TO_PARSE_CODE:"Lettura codice fallita!",CONFIRM_DELETE_DECK:'Sicuro di voler cancellare "%s"?'}},a={common:{OK:"확인",CANCEL:"캔슬",NO_CARDS:"카드가 없습니다",or:"or"},_misc:{DIALOG_TITLE_EFFECTS:"복수의 효과가 동시에 발동되었습니다.\n먼저 처리할 효과를 하나 골라주세요",NO_OPTIONS:"%s할 수 없습니다",GIVE_UP:"%s하지 않는다",GUARD_TRUE:"있음",GUARD_FALSE:"-",LIMITING:"%s 한정",WAIT:"대전 상대가 생각중",CLASS_SEPARATOR:":",CROSS_NAME_QUOTE_LEFT:"《",CROSS_NAME_QUOTE_RIGHT:"》",CROSS_LEFT:"[크로스]%s의 왼쪽",CROSS_RIGHT:"[크로스]%s의 오른쪽",CROSS_AND:"[크로스]%s의 왼쪽과 %s의 오른쪽",CROSS_OR:"또는",GUARD_DESCRIPTION:"[가드](이 카드를 패에서 버리는 것으로, 루리그의 공격을 한 번 무효로 한다.)",MULTI_ENER_DESCRIPTION:"[상시]:[멀티에나](코스트를 지불할 때, 이 카드는 모든 색을 가진것 처럼 취급한다.)"},buttonTitle:{OK:"확인",CANCEL:"캔슬",LEVEL0_LRIG:"루리그 셋",DISCARD_AND_REDRAW:"다시 뽑기",CHARGE:"차지",GROW:"그로우",SUMMON_SIGNI:"장에 내기",SUMMON_SIGNI_ZONE:"시그니 존",BANISH:"배니시",BOUNCE:"패로 되돌리기",TRASH:"트래시",TRASH_SIGNI:"트래시",USE_SPELL:"사용",SPELL_EFFECT:"효과를 선택",USE_ARTS:"아츠를 사용",ARTS_EFFECT:"효과를 선택",SPELL_CUT_IN:"컷 인",USE_ACTION_EFFECT:"기동",SEEK:"찾기",SET_ORDER:"순서를 배치",SIGNI_ATTACK:"어택",LRIG_ATTACK:"어택",GUARD:"가드",DISCARD:"버리기",DECLARE:"선언",PAY:"지불",PAY_EXCEED:"엑시드",DOWN:"다운",UP:"업",TARGET:"목표",PAY_ENER:"에나를 지불",LAUNCH:"발동",EFFECTS:"먼저 처리",CONFIRM:"확인",END_SELECT:"선택을 완료",END_ENER_PHASE:"에나 페이즈 종료",END_GROW_PHASE:"그로우 페이즈 종료",END_MAIN_PHASE:"메인 페이즈 종료",END_ARTS_STEP:"아츠 스텝 종료",END_SIGNI_ATTACK_STEP:"스텝 종료",END_LRIG_ATTACK_STEP:"스텝 종료",VIEW:"본다",ADD_TO_HAND:"패에 더하기",COLOR:"색",CHOOSE_EFFECT:"효과 선택",CHOOSE_ZONE:"존 선택",RESET_SIGNI_ZONE:"배치",CHARM_CARD:"참",TRASH_CHARM:"참을 트래시",REVEAL:"공개",PUT_TO_TOP:"위에 두기",PUT_TO_BOTTOM:"아래에 두기",REVEAL_MORE:"카드를 더 공개",PROTECT:"보호",_SHIRONAKUJI:"-6000",CLASS:"클래스",PAY_WHITE_INSTEAD:"대신 [백]을 지불",TRASH_OSAKI:"오사키",RESONA:"레조나",CRASH:"크래시",PLAYER:"플레이어",PUT_TO_CHECK_ZONE:"체크 존에 두기",PUT_TO_ENER_ZONE:"에나 존에 두기",CONFIRM_REFRESH_SELF:"리프레시\n당신의 트래시를 확인",CONFIRM_REFRESH_OPPONENT:"리프레시\n상대의 트래시를 확인",GUESS_TRAP:"Is trap?"},noOptions:{TARGET:"목표가 없습니다"},giveUp:{TARGET:"선택하지 않는다",SUMMON_SIGNI_ZONE:"캔슬",DISCARD_AND_REDRAW:"다시 뽑지 않는다",SEEK:"찾지 않는다"},gameText:{YES:"Yes",NO:"No",white:"백",black:"흑",red:"적",blue:"청",green:"녹",colorless:"무",ADD_TO_HAND:"패에 더한다",SUMMON:"장에 낸다",DOWN:"다운",UP:"업",SHOW_EFFECTS_DIALOG_TITLE:"효과",PUT_TO_TOP:"위에 둔다",PUT_TO_BOTTOM:"아래에 둔다",SELF:"당신",OPPONENT:"대전 상대",PUT_TO_ENER_ZONE:"에나 존에 둔다",CONFIRM_ENCORE:"앵콜을 사용합니까?",CONFIRM_BET:"베트 하시겠습니까?",MAIN_DECK:"덱",HAND:"Hand",SIGNI_ZONE:"SIGNI Zone",TRASH_ZONE:"Trash Zone",ENER_ZONE:"에나 존에",LIFE_CLOTH:"라이프 클로스",SELECT_DONE:"선택 완료"},prop:{cardType:"종류",classes:"타입",level:"레벨",color:"색",limit:"리미트",power:"파워",limting:"한정조건",guard:"가드",cost:"코스트",timmings:"타이밍",effects:"효과",burst:"라이프 버스트"},cardType:{LRIG:"루리그",SIGNI:"시그니",SPELL:"스펠",ARTS:"아츠",RESONA:"레조나"},color:{white:"백",black:"흑",red:"적",blue:"청",green:"녹",colorless:"무"},costColor:{costWhite:"백",costBlack:"흑",costRed:"적",costBlue:"청",costGreen:"녹",costColorless:"무"},timming:{mainPhase:"[메인 페이즈]",attackPhase:"[어택 페이즈]",spellCutIn:"[스펠 컷인]"},class:{"タマ":"타마","花代":"하나요","ユヅキ":"유즈키","ピルルク":"피루루크","エルドラ":"엘도라","ミルルン":"미루룽","緑子":"미도리코","アン":"안","ウリス":"우리스","イオナ":"이오나","ウムル":"움르","リメンバ":"리멤버","タウィル":"타윌","サシェ":"사셰","ミュウ":"뮤","アイヤイ":"아이야이","アルフォウ":"알포우","ハナレ":"하나레","リル":"릴","メル":"멜","あや":"Aya","ナナシ":"Nanashi","ドーナ":"Donna","ママ":"Mama","精像":"정상","天使":"천사","悪魔":"악마","美巧":"미교","精武":"정무","アーム":"암","ウェポン":"웨펀","武勇":"무용","調理":"조리","遊具":"유구","毒牙":"독아","精羅":"정나","鉱石":"광석","宝石":"보석","植物":"식물","原子":"원자","宇宙":"우주","精械":"정계","電機":"전기","古代兵器":"고대병기","迷宮":"미궁","精生":"정생","水獣":"수수","空獣":"공수","地獣":"지수","龍獣":"용수","凶蟲":"흉충","精元":"정원","トリック":"トリック","英知":"英知","微菌":"微菌","怪異":"怪異"},DOM:{index:{"link-version":"<火竜点睛>","label-nickname":"닉네임:","input-nickame":{placeholder:"닉네임"},"link-edit-deck":"덱 편집","label-bgm":"BGM","label-sound-effect":"SE","label-room-list":"방 목록:","span-play-replay":"리플레이 재생","label-create-room-password":"패스워드:","label-mayus-room":"마유의 방","label-create-room":"방 생성:","input-room-name":{placeholder:"방 제목"},"button-create-room":"완료","link-about":{textContent:"About",href:"about_en.html"},"link-service":{textContent:"Terms",href:"service_en.html"},"link-disclaimer":{textContent:"Disclaimer",href:"service_en.html#disclaimer"},"link-supporters":{textContent:"Supporters",href:"supporters_en.html"},"span-leave-room":"<<돌아가기","label-live":"LIVE","label-ready":"준비","button-replay-step":"STEP","button-replay-auto":"AUTO","button-replay-save":"DOWNLOAD","span-surrender":"항복하기","span-leave-game":"돌아가기","chat-input":{placeholder:"대화 입력"},"label-replay-list":"리플레이 리스트:","label-replay-file":"파일:","button-replay-return":"돌아가기","reconnect-title":"연결이 끊어졌습니다.","reconnect-retry":"재접속중...","wait-for-reconnect-title":"대전 상대의 연결이 끊어졌습니다.","wait-for-reconnect-retry":"재접속을 기다리고 있습니다...","wait-for-reconnect-button-drop":"기다리지 않는다","span-set-proxy":"프록시 설정","proxy-title":"프록시","proxy-description":"만약 WEBXOSS 서버가 원활하지 않다면, 프록시를 시도할 수 있습니다.","proxy-noproxy":"프록시 없음 (Tokyo)","proxy-cloudflare":"CloudFlare","proxy-provide":"서버 제공중...","proxy-button-ok":"확인","msgbox-button-ok":"확인","msgbox-button-cancel":"캔슬"},DeckEditor:{"link-back-to-webxoss":"작성 완료","label-select-deck":"덱 고르기:","button-delete-deck":"삭제","button-rename":"명명","label-new-deck":"새로운 덱:","input-new-deck-name":{placeholder:"덱 이름"},"button-new-deck":"신규","button-copy-deck":"복제","button-import-export":"불러오기/저장하기","main-deck-title":"메인 덱","main-deck-mayus-room":"마유의 방","main-deck-burst-title":"라이프 버스트:","lrig-deck-title":"루리그 덱","label-import-from-file":"파일에서 불러오기:","label-export-to-file":"파일로 저장하기:","button-export":"저장하기","button-text":"텍스트 표시","button-export-code":"코드 표시","button-import-code":"코드 불러오기","button-import-export-cancel":"캔슬","search-input":{placeholder:"키워드로 검색"},"link-search-tips":{textContent:"힌트",href:"SearchTips_en.html"},"search-show-more":"좀더 찾기…"}},index:{REQUIRE_UPDATE:"새로운 버전이 필요합니다.\n클라이언트를 갱신해주세요.",UPDATING:"갱신중…",UPDATE_READY:"갱신 완료했습니다. 여기를 클릭해주세요.",NET_WORK_ERROR:"네트워크에 에러가 발생했습니다.",DISCONNECTED:"연결이 끊어졌습니다.",NO_VALID_DECK:"덱이 없습니다.",OPPONENT_DISCONNECTED:"대전 상대의 연결이 끊어졌습니다.",SELF_DISCONNECTED:"対戦者が切断されました。",PLEASE_INPUT_A_NICKNAME:"닉네임을 입력해주세요.",PLEASE_INPUT_A_ROOM_NAME:"방 이름을 입력해주세요.",FAILED_TO_READ_DECK:"덱을 로딩하는데 실패했습니다.",NEW_GUEST:"%s 방에 들어왔습니다.",GUEST_LEFT:"%s 방을 나갔습니다.",READY:"대전 상대의 준비가 완료되었습니다.",UNREADY:"준비 해재",INPUT_PASSWORD:"패스워드",WRONG_PASSWORD:"패스워드가 바르지 않습니다.",NOT_CONNECTED:"아직 서버에 접속되어있지 않습니다.\n나중에 다시 한번 시도해주세요.",SUPPORT_URL:"about_en.html#support",CONFIRM_SURRENDER:"정말로 항복하시겠습니까?",SURRENDERED:"항복했습니다.",OPPONENT_SURRENDERED:"대전 상대가 항복했습니다.",CONFIRM_CLOSE:"게임을 떠나시겠습니까?",DROPPED:"대전 상대가 게임을 떠났습니다.",SAVE_REPLAY:"리플레이를 보존",FAILED_TO_PARSE_REPLAY:"파일 해석에 실패했습니다.",UNSUPPORTED_REPLAY_VERSION:"지원하지 않는 리플레이 버전입니다.\n클라이언트를 업데이트 바랍니다.",PROVIDE_PROXY_SERVER:"프록시 서버를 지원하고 싶습니까?\n webxoss@gmail.com 으로 연락 주세요!\nWEBXOSS는 당신의 협력에 감사합니다!",FETCHING_DATA:"데이터를 가져오는 중...\n확인을 눌러 취소.",FAILED_TO_FETCH_DATA:"데이터를 가져오는데 실패했습니다!"},editor:{PLEASE_INPUT_A_DECK_NAME:"덱 이름을 입력해주세요.",DECK_NAME:"덱 이름",DECK_NAME_ALREADY_EXISTS:'덱 "%s"은 이미 존재하고 있습니다.',FAILED_TO_PARSE_FILE:"파일 해석에 실패했습니다.",FAILED_TO_PARSE_CODE:"코드 해석에 실패했습니다.",CONFIRM_DELETE_DECK:'정말로 "%s"를 지우시겠습니까?'}},_=Object.create(t);return _.traditional=!0,e.map=o,e.init=function(){var t=e.getLanguage();e.setLanguage(t)},e.getLanguage=function(){return localStorage.getItem("language")||"en"},e.setLanguage=function(i){"zh_CN"===i?(e.map=t,CardInfo=CardInfo_zh,localStorage.setItem("language",i)):"zh_TW"===i?(e.map=_,CardInfo=CardInfo_zh,localStorage.setItem("language",i)):"en"===i?(e.map=o,CardInfo=CardInfo_en,localStorage.setItem("language",i)):"jp"===i?(e.map=r,CardInfo=CardInfo_jp,localStorage.setItem("language",i)):"ko"===i?(e.map=a,CardInfo=CardInfo_ko,localStorage.setItem("language",i)):"ru"===i?(e.map=E,CardInfo=CardInfo_ru,localStorage.setItem("language",i)):"it"===i?(e.map=n,CardInfo=CardInfo_it,localStorage.setItem("language",i)):(e.map=o,CardInfo=CardInfo_jp)},e.formatString=function(e,t){for(var o=0;o","label-nickname":"您的昵称:","input-nickame":{placeholder:"昵称"},"link-edit-deck":"编辑卡组","label-bgm":"音乐","label-sound-effect":"音效","label-room-list":"房间列表:","span-play-replay":"录像回放","label-create-room-password":"房间密码:","label-mayus-room":"茧的房间","label-create-room":"创建房间:","input-room-name":{placeholder:"房间名字"},"button-create-room":"创建","link-about":{textContent:"关于我们",href:"about.html"},"link-service":{textContent:"服务条款",href:"service.html"},"link-disclaimer":{textContent:"免责声明",href:"service.html#disclaimer"},"link-supporters":{textContent:"捐赠者名单",href:"supporters.html"},"span-leave-room":"<<返回","label-live":"直播","label-ready":"准备","button-replay-step":"下一步","button-replay-auto":"自动播放","button-replay-save":"保存录像","span-surrender":"投降","span-leave-game":"离开","chat-input":{placeholder:"在此处聊天"},"label-replay-list":"录像列表:","label-replay-file":"录像文件:","button-replay-return":"返回","reconnect-title":"连接已断开!","reconnect-retry":"正在重新连接...","wait-for-reconnect-title":"对手的连接已断开!","wait-for-reconnect-retry":"正在等待重新连接...","wait-for-reconnect-button-drop":"放弃等待","span-set-proxy":"设置代理","proxy-title":"设置代理","proxy-description":"使用代理后,你与WEBXOSS服务器之间的数据将由代理服务器转发. 通常情况下,你不必设置代理,但如果掉线情况频繁发生,代理可能会有所帮助.","proxy-noproxy":"不使用代理 (东京)","proxy-cloudflare":"CloudFlare","proxy-provide":"提供代理服务器...","proxy-button-ok":"确定","msgbox-button-ok":"确定","msgbox-button-cancel":"取消"},DeckEditor:{"link-back-to-webxoss":"完成编辑","label-select-deck":"选择牌组:","button-delete-deck":"删除","button-rename":"重命名","label-new-deck":"新建牌组:","input-new-deck-name":{placeholder:"牌组名字"},"button-new-deck":"新建","button-copy-deck":"复制","button-import-export":"导入/导出","main-deck-title":"主卡组","main-deck-mayus-room":"茧的房间","main-deck-burst-title":"爆发:","lrig-deck-title":"LRIG卡组","label-import-from-file":"从文件导入:","label-export-to-file":"导出到文件:","button-export":"导出","button-text":"显示文本","button-export-code":"显示代码","button-import-code":"导入代码","button-import-export-cancel":"取消","search-input":{placeholder:"输入关键字以搜索"},"link-search-tips":{textContent:"搜索技巧",href:"SearchTips.html"},"search-show-more":"显示更多"}},index:{REQUIRE_UPDATE:"客户端版本与服务器不匹配!\n更新后才能进行游戏!",UPDATING:"正在更新...",UPDATE_READY:"更新完毕,点击此处完成更新!",NET_WORK_ERROR:"网络错误.",DISCONNECTED:"连接已断开",NO_VALID_DECK:"没有可用的卡组!\n请先编辑卡组!",OPPONENT_DISCONNECTED:"对手断开了连接!",SELF_DISCONNECTED:"己方断开了连接!",PLEASE_INPUT_A_NICKNAME:"请输入昵称!",PLEASE_INPUT_A_ROOM_NAME:"请输入房间名字!",FAILED_TO_READ_DECK:"读取卡组失败!",NEW_GUEST:"%s进入了房间",GUEST_LEFT:"%s离开了房间",READY:"对手已经做好准备",UNREADY:"对手取消了准备",INPUT_PASSWORD:"请输入房间密码",WRONG_PASSWORD:"密码错误!",NOT_CONNECTED:"未与服务器建立连接!\n请稍后重试!",SUPPORT_URL:"about.html#support",CONFIRM_SURRENDER:"确定要投降吗?",SURRENDERED:"你投降了!",OPPONENT_SURRENDERED:"对手投降了!",CONFIRM_CLOSE:"游戏正在进行,您确定要离开吗?",DROPPED:"对战对手已经离开了游戏",SAVE_REPLAY:"保存录像",FAILED_TO_PARSE_REPLAY:"解析文件失败!",UNSUPPORTED_REPLAY_VERSION:"不支持的录像版本!\n请升级你的客户端!",PROVIDE_PROXY_SERVER:"你愿意为WEBXOSS提供代理服务吗?\n联系webxoss@gmail.com吧!\nWEBXOSS将在你的帮助下变得更棒!",FETCHING_DATA:'正在读取数据...\n点击"确定"取消操作.',FAILED_TO_FETCH_DATA:"读取数据失败!"},editor:{PLEASE_INPUT_A_DECK_NAME:"请输入牌组名字!",DECK_NAME:"新的卡组名字",DECK_NAME_ALREADY_EXISTS:'卡组"%s"已存在!',FAILED_TO_PARSE_FILE:"解析文件失败!",FAILED_TO_PARSE_CODE:"解析代码失败!",CONFIRM_DELETE_DECK:'确定要删除卡组"%s"吗?'}},t={common:{OK:"OK",CANCEL:"CANCEL",NO_CARDS:"No cards",or:"or"},_misc:{DIALOG_TITLE_EFFECTS:"Multiple effects have been triggered\nChoose one to resolve.",NO_OPTIONS:"Unable to %s",GIVE_UP:"Don't %s",GUARD_TRUE:"Yes",GUARD_FALSE:"No",LIMITING:"%s Only",WAIT:"Waiting...",CLASS_SEPARATOR:":\n",CROSS_NAME_QUOTE_LEFT:'"',CROSS_NAME_QUOTE_RIGHT:'"',CROSS_LEFT:">Cross< %s Left",CROSS_RIGHT:">Cross< %s Right",CROSS_AND:">Cross< %s Right and %s Left",CROSS_OR:" or ",GUARD_DESCRIPTION:"[Guard] (By discarding this card from your hand, disable one of a LRIG's attacks)",MULTI_ENER_DESCRIPTION:"[Constant]: [Multi Ener] (When you pay a cost, treat this card as if it has all colors)",LAYER_DESCRIPTION:"(Layer) All of your SIGNI get this [Layer] ability."},buttonTitle:{OK:"OK",CANCEL:"CANCEL",LEVEL0_LRIG:"Set up LRIG",DISCARD_AND_REDRAW:"Mulligan",CHARGE:"Charge",GROW:"Grow",SUMMON_SIGNI:"Summon",SUMMON_SIGNI_ZONE:"Zone",BANISH:"Banish",BOUNCE:"Bounce",TRASH:"Trash",TRASH_SIGNI:"Trash",USE_SPELL:"Use SPEL",SPELL_EFFECT:"Select SPELL effect",USE_ARTS:"Use ARTS",ARTS_EFFECT:"Select ARTS effect",SPELL_CUT_IN:"Spell cut-in",USE_ACTION_EFFECT:"Action effect",SEEK:"Search",SET_ORDER:"Set order",SIGNI_ATTACK:"Attack",LRIG_ATTACK:"Attack",GUARD:"Guard",DISCARD:"Discard",DECLARE:"Declare",PAY:"Pay",PAY_EXCEED:"Exceed",DOWN:"Down",UP:"Up",TARGET:"Target",PAY_ENER:"Pay ener",LAUNCH:"Launch",EFFECTS:"Effects",CONFIRM:"Confirm",END_SELECT:"End select",END_ENER_PHASE:"End Ener Phase",END_GROW_PHASE:"End Grow Phase",END_MAIN_PHASE:"End Main Phase",END_ARTS_STEP:"End ARTS Step",END_SIGNI_ATTACK_STEP:"End SIGNI Attack Step",END_LRIG_ATTACK_STEP:"End LRIG Attack Step",VIEW:"View",ADD_TO_HAND:"Add to hand",COLOR:"Color",CHOOSE_EFFECT:"Choose Effect",CHOOSE_ZONE:"Choose Zone",RESET_SIGNI_ZONE:"Replace",CHARM_CARD:"Charm",TRASH_CHARM:"Trash Charm",REVEAL:"Reveal",PUT_TO_TOP:"Put to top",PUT_TO_BOTTOM:"Put to bottom",REVEAL_MORE:"Reveal more cards",PROTECT:"Protect",_SHIRONAKUJI:"-6000",CLASS:"class",PAY_WHITE_INSTEAD:"Pay [White] instead",TRASH_OSAKI:"Trash Osaki",RESONA:"Resona",CRASH:"Crash",PLAYER:"Player",PUT_TO_CHECK_ZONE:"Put to Check Zone",PUT_TO_ENER_ZONE:"Put to Ener Zone",CONFIRM_REFRESH_SELF:"Deck refesh\nConfirm your trash",CONFIRM_REFRESH_OPPONENT:"Deck refesh\nConfirm opponent's trash",GUESS_TRAP:"Is trap?",LEVEL:"Level"},noOptions:{TARGET:"No targets"},giveUp:{TARGET:"Don't select",SUMMON_SIGNI_ZONE:"Cancel"},gameText:{YES:"Yes",NO:"No",white:"white",black:"black",red:"red",blue:"blue",green:"green",colorless:"colorless",ADD_TO_HAND:"Add to hand",SUMMON:"Summon",DOWN:"Down",UP:"Up",SHOW_EFFECTS_DIALOG_TITLE:"Effect",PUT_TO_TOP:"Put to top",PUT_TO_BOTTOM:"Put to bottom",SELF:"Me",OPPONENT:"Opponent",PUT_TO_ENER_ZONE:"Put to Ener Zone",CONFIRM_ENCORE:"Do you want to pay for Encore?",CONFIRM_BET:"Do you want to bet?",MAIN_DECK:"Main Deck",HAND:"Hand",SIGNI_ZONE:"SIGNI Zone",TRASH_ZONE:"Trash Zone",ENER_ZONE:"Ener Zone",LIFE_CLOTH:"Life Cloth",SELECT_DONE:"End select"},prop:{cardType:"Type",classes:"Class",level:"Level",color:"Color",limit:"Limit",power:"Power",limting:"Limiting",guard:"Guard",cost:"Cost",timmings:"Timing",effects:"Abilities",burst:"Life Burst"},cardType:{LRIG:"LRIG",SIGNI:"SIGNI",SPELL:"SPELL",ARTS:"ARTS",RESONA:"RESONA"},color:{white:"White",black:"Black",red:"Red",blue:"Blue",green:"Green",colorless:"Colorless"},costColor:{costWhite:"White",costBlack:"Black",costRed:"Red",costBlue:"Blue",costGreen:"Green",costColorless:"Colorless"},timming:{mainPhase:"[Main Phase]",attackPhase:"[Attack Phase]",spellCutIn:"[Spell Cut-In]"},class:{"タマ":"Tama","花代":"Hanayo","ユヅキ":"Yuzuki","ピルルク":"Piruluk","エルドラ":"Eldora","ミルルン":"Mirurun","緑子":"Midoriko","アン":"Anne","ウリス":"Ulith","イオナ":"Iona","ウムル":"Umuru","リメンバ":"Remember","タウィル":"Tawil","サシェ":"Sashe","ミュウ":"Myuu","アイヤイ":"Aiyai","アルフォウ":"Alfou","ハナレ":"Hanare","リル":"Ril","メル":"Mel","あや":"Aya","ナナシ":"Nanashi","ドーナ":"Donna","ママ":"Mama","精像":"Image","天使":"Angel","悪魔":"Devil","美巧":"Beautiful Technique","精武":"War","アーム":"Arm","ウェポン":"Weapon","武勇":"Valor","調理":"Cooking","遊具":"Playground Equipment","毒牙":"Poison Fang","精羅":"Nature","鉱石":"Ore","宝石":"Gem","植物":"Plant","原子":"Atom","宇宙":"Space","精械":"Machine","電機":"Electric","古代兵器":"Ancient Weapon","迷宮":"Labyrinth","精生":"Living","水獣":"Water Beast","空獣":"Sky Beast","地獣":"Earth Beast","龍獣":"Dragon Beast","凶蟲":"Misfortune Insect","精元":"Origin","トリック":"Trick","英知":"Wisdom","微菌":"Bacteria","怪異":"Apparition"},DOM:{index:{"link-version":"","label-nickname":"Nickname:","input-nickame":{placeholder:"nickname"},"link-edit-deck":"DeckEditor","label-bgm":"BGM","label-sound-effect":"SE","label-room-list":"Room list:","span-play-replay":"Watch Replay","label-create-room-password":"Password:","label-mayus-room":"Mayu's Room","label-create-room":"Create Room:","input-room-name":{placeholder:"room name"},"button-create-room":"create","link-about":{textContent:"About",href:"about_en.html"},"link-service":{textContent:"Terms",href:"service_en.html"},"link-disclaimer":{textContent:"Disclaimer",href:"service_en.html#disclaimer"},"link-supporters":{textContent:"Supporters",href:"supporters_en.html"},"span-leave-room":"<","label-nickname":"ニックネーム:","input-nickame":{placeholder:"ニックネーム"},"link-edit-deck":"デッキ構築","label-bgm":"BGM","label-sound-effect":"SE","label-room-list":"部屋リスト:","span-play-replay":"リプレイ再生","label-create-room-password":"パスワード:","label-mayus-room":"繭の部屋","label-create-room":"部屋を作る:","input-room-name":{placeholder:"部屋の名前"},"button-create-room":"完成","link-about":{textContent:"About",href:"about_en.html"},"link-service":{textContent:"Terms",href:"service_en.html"},"link-disclaimer":{textContent:"Disclaimer",href:"service_en.html#disclaimer"},"link-supporters":{textContent:"Supporters",href:"supporters_en.html"},"span-leave-room":"<<戻る","label-live":"LIVE","label-ready":"準備","button-replay-step":"STEP","button-replay-auto":"AUTO","button-replay-save":"DOWNLOAD","span-surrender":"投了する","span-leave-game":"戻る","chat-input":{placeholder:"ここでチャットする"},"label-replay-list":"リプレイリスト:","label-replay-file":"ファイル:","button-replay-return":"戻る","reconnect-title":"リンクが切断されました。","reconnect-retry":"再接続中…","wait-for-reconnect-title":"対戦相手が切断されました。","wait-for-reconnect-retry":"再接続を待っています...","wait-for-reconnect-button-drop":"待たない","span-set-proxy":"Set Proxy","proxy-title":"Proxy","proxy-description":"If your connection to WEBXOSS server is not stable, you can try a proxy.","proxy-noproxy":"No Proxy (Tokyo)","proxy-cloudflare":"CloudFlare","proxy-provide":"Provide a server...","proxy-button-ok":"OK","msgbox-button-ok":"OK","msgbox-button-cancel":"キャンセル"},DeckEditor:{"link-back-to-webxoss":"構築完成","label-select-deck":"デッキを選ぶ:","button-delete-deck":"デリート","button-rename":"リネーム","label-new-deck":"新しいデッキ:","input-new-deck-name":{placeholder:"デッキ名"},"button-new-deck":"新築","button-copy-deck":"複製","button-import-export":"インポート/エクスポート","main-deck-title":"メインデッキ","main-deck-mayus-room":"繭の部屋","main-deck-burst-title":"ライフバースト:","lrig-deck-title":"ルリグデッキ","label-import-from-file":"ファイルからインポート:","label-export-to-file":"ファイルにエクスポート:","button-export":"エクスポート","button-text":"テキストを表示","button-export-code":"コードを表示","button-import-code":"コードをインポート","button-import-export-cancel":"キャンセル","search-input":{placeholder:"キーワードで検索"},"link-search-tips":{textContent:"ヒント",href:"SearchTips_en.html"},"search-show-more":"もっと表す…"}},index:{REQUIRE_UPDATE:"新しいバージョンが必要です。\nクライアントを更新してください。",UPDATING:"更新中…",UPDATE_READY:"更新完了しました。ここでクリックと完成する。",NET_WORK_ERROR:"ネットワークにエラーがあります。",DISCONNECTED:"リンク切断されました。",NO_VALID_DECK:"まずデッキを作りなさい。",OPPONENT_DISCONNECTED:"対戦相手が切断されました。",SELF_DISCONNECTED:"対戦者が切断されました。",PLEASE_INPUT_A_NICKNAME:"ニックネームを入力して下さい。",PLEASE_INPUT_A_ROOM_NAME:"部屋名を入力して下さい。",FAILED_TO_READ_DECK:"デッキローディングは失敗しました。",NEW_GUEST:"%s部屋に入りました",GUEST_LEFT:"%s部屋を出ました",READY:"対戦相手は準備ができています。",UNREADY:"Unready",INPUT_PASSWORD:"パスワード",WRONG_PASSWORD:"パスワードが正しくありません。",NOT_CONNECTED:"まだサーバに接続されていません。\n後でもう一度お試しください。",SUPPORT_URL:"about_en.html#support",CONFIRM_SURRENDER:"投了てもよろしいですか?",SURRENDERED:"あなたは投了しました。",OPPONENT_SURRENDERED:"対戦相手は投了しました。",CONFIRM_CLOSE:"ゲームを離れてもよろしいですか?",DROPPED:"対戦相手は、もうゲームから離れた。",SAVE_REPLAY:"リプレイを保存",FAILED_TO_PARSE_REPLAY:"ファイル解析は失敗しました。",UNSUPPORTED_REPLAY_VERSION:"Unsupported replay version!\nPlease update your client!",PROVIDE_PROXY_SERVER:"Would you like to provide us a proxy server?\nPlease contact webxoss@gmail.com !\nWEBXOSS will be more awesome with your help!",FETCHING_DATA:'Fetching data...\nClick "OK" to cancel.',FAILED_TO_FETCH_DATA:"Failed to fetch data!"},editor:{PLEASE_INPUT_A_DECK_NAME:"デッキ名を入力して下さい。",DECK_NAME:"デッキ名",DECK_NAME_ALREADY_EXISTS:'デッキ"%s"は既に存在しました。',FAILED_TO_PARSE_FILE:"ファイル解析は失敗しました。",FAILED_TO_PARSE_CODE:"コード解析は失敗しました。",CONFIRM_DELETE_DECK:'Are you sure to delete "%s"?'}},r={common:{OK:"OK",CANCEL:"Отмена",NO_CARDS:"Нет карт",or:"or"},_misc:{DIALOG_TITLE_EFFECTS:"Сработало несколько способностей.\nВыберите какую выполнить.",NO_OPTIONS:"Не могу %s",GIVE_UP:"Не %s",GUARD_TRUE:"Да",GUARD_FALSE:"Нет",LIMITING:"Лишь для %s",WAIT:"Ожидание...",CLASS_SEPARATOR:":\n",CROSS_NAME_QUOTE_LEFT:'"',CROSS_NAME_QUOTE_RIGHT:'"',CROSS_LEFT:">Связь< слева от %s",CROSS_RIGHT:">Связь< справа от %s",CROSS_AND:">Cross< %s Right and %s Left",CROSS_OR:" или ",GUARD_DESCRIPTION:"[Защита] (Сбросив эту карту со своей руки, отмените атаку одной ИДЕЛ.)",MULTI_ENER_DESCRIPTION:"[Постоянно]: [Мульти-энер] (Когда Вы платите цену, считается, что эта карта относится ко всем цветам.)",LAYER_DESCRIPTION:"(Layer) All of your SIGNI get this [Layer] ability."},buttonTitle:{OK:"OK",CANCEL:"Отмена",LEVEL0_LRIG:"Выбрать ИДЕЛ",DISCARD_AND_REDRAW:"Заменить",CHARGE:"Зарядить",GROW:"Рост",SUMMON_SIGNI:"призвать",SUMMON_SIGNI_ZONE:"Зона",BANISH:"стереть",BOUNCE:"Вернуть",TRASH:"убрать",TRASH_SIGNI:"Убрать",USE_SPELL:"Использовать Магию",SPELL_EFFECT:"Выберите эффект Магии",USE_ARTS:"Использовать Умения",ARTS_EFFECT:"Выберите эффект Умения",SPELL_CUT_IN:"Ответить",USE_ACTION_EFFECT:"Действие",SEEK:"Искать",SET_ORDER:"Порядок",SIGNI_ATTACK:"Атаковать",LRIG_ATTACK:"Атаковать",GUARD:"защититься",DISCARD:"сбросить",DECLARE:"Назвать",PAY:"Заплатить",PAY_EXCEED:"Выход за грань",DOWN:"Положить",UP:"Поднять",TARGET:"выбрать",PAY_ENER:"заплатить энер",LAUNCH:"использовать",EFFECTS:"Эффекты",CONFIRM:"Подтвердить",END_SELECT:"Завершить выбор",END_ENER_PHASE:"Конец энер-фазы",END_GROW_PHASE:"Конец фазы роста",END_MAIN_PHASE:"Конец основной фазы",END_ARTS_STEP:"Конец шага Умений",END_SIGNI_ATTACK_STEP:"Конец шага атаки Записей",END_LRIG_ATTACK_STEP:"Конец шага атаки ИДЕЛ",VIEW:"Посмотреть",ADD_TO_HAND:"Взять в руку",COLOR:"Цвет",CHOOSE_EFFECT:"Выберите эффект",CHOOSE_ZONE:"Выберите зону",RESET_SIGNI_ZONE:"Заменить",CHARM_CARD:"Чары",TRASH_CHARM:"Убрать Чары",REVEAL:"Показать",PUT_TO_TOP:"Поместить наверх",PUT_TO_BOTTOM:"Поместить вниз",REVEAL_MORE:"Показать больше карт",PROTECT:"Защитить",_SHIRONAKUJI:"-6000",CLASS:"класс",PAY_WHITE_INSTEAD:"Заплатить [Белую] взамен",TRASH_OSAKI:"Убрать Osaki",RESONA:"Отглас",CRASH:"Разрушить",PLAYER:"Игрок",PUT_TO_CHECK_ZONE:"Поместить в зону проверки",PUT_TO_ENER_ZONE:"Поместить в энер-зону",CONFIRM_REFRESH_SELF:"Обновление колоды\nОзнакомьтесь со сбросом",CONFIRM_REFRESH_OPPONENT:"Обновление колоды\nОзнакомьтесь со сбросом",GUESS_TRAP:"Является ли карта Ловушкой?",LEVEL:"Level"},noOptions:{TARGET:"Нет целей"},giveUp:{TARGET:"Не выбирать",SUMMON_SIGNI_ZONE:"Отмена"},gameText:{YES:"Yes",NO:"No",white:"белая",black:"чёрная",red:"красная",blue:"синяя",green:"зелёная",colorless:"бесцветная",ADD_TO_HAND:"Взять в руку",SUMMON:"Призвать",DOWN:"Положить",UP:"Поднять",SHOW_EFFECTS_DIALOG_TITLE:"Эффект",PUT_TO_TOP:"Поместить наверх",PUT_TO_BOTTOM:"Поместить вниз",SELF:"Я",OPPONENT:"Противник",PUT_TO_ENER_ZONE:"Поместить в энер-зону",CONFIRM_ENCORE:"Заплатить за Продление?",CONFIRM_BET:"Сделать ставку?",MAIN_DECK:"Основная колода",HAND:"руку",SIGNI_ZONE:"Зону Записей",TRASH_ZONE:"сброс",ENER_ZONE:"энер-зону",LIFE_CLOTH:"Жизненная материя",SELECT_DONE:"Завершить"},prop:{cardType:"Тип",classes:"Класс",level:"Уровень",color:"Цвет",limit:"Лимит",power:"Сила",limting:"Ограничения",guard:"Защита",cost:"Цена",timmings:"Момент",effects:"Способности",burst:"вспышка"},cardType:{LRIG:"ИДЕЛ",SIGNI:"Запись",SPELL:"Магия",ARTS:"Умение",RESONA:"Отголосок"},color:{white:"Белая",black:"Чёрная",red:"Красная",blue:"Синяя",green:"Зелёная",colorless:"Бесцветная"},costColor:{costWhite:"Белая",costBlack:"Чёрная",costRed:"Красная",costBlue:"Синяя",costGreen:"Зелёная",costColorless:"Бесцветная"},timming:{mainPhase:"[Основная фаза]",attackPhase:"[Фаза атаки]",spellCutIn:"[Ответ на магию]"},class:{"タマ":"Tama","花代":"Hanayo","ユヅキ":"Yuzuki","ピルルク":"Piruluk","エルドラ":"Eldora","ミルルン":"Mirurun","緑子":"Midoriko","アン":"Anne","ウリス":"Ulith","イオナ":"Iona","ウムル":"Umr","リメンバ":"Remember","タウィル":"Tawil","サシェ":"Sashe","ミュウ":"Myuu","アイヤイ":"Aiyai","アルフォウ":"Alfou","ハナレ":"Hanare","リル":"Ril","メル":"Mel","あや":"Aya","ナナシ":"Nanashi","ドーナ":"Donna","ママ":"Mama","精像":"Миф","天使":"Ангел","悪魔":"Демон","美巧":"Прекрасный навык","精武":"Война","アーム":"Вооружение","ウェポン":"Снаряд","武勇":"Доблестная","調理":"Кулинарная","遊具":"Игровой предмет","毒牙":"Ядовитый клык","精羅":"Естество","鉱石":"Руда","宝石":"Драгоценность","植物":"Растение","原子":"Атом","宇宙":"Космос","精械":"Механика","電機":"Электромашина","古代兵器":"Древнее оружие","迷宮":"Лабиринт","精生":"Существо","水獣":"Водный зверь","空獣":"Небесный зверь","地獣":"Земной зверь","龍獣":"Драконоподобный зверь","凶蟲":"Злобное насекомое","精元":"Первородный","トリック":"Шалость","英知":"Мудрость","微菌":"Бактерия","怪異":"Привидение"},DOM:{index:{"link-version":"","label-nickname":"Никнейм:","input-nickame":{placeholder:"никнейм"},"link-edit-deck":"РедакторКолоды","label-bgm":"BGM","label-sound-effect":"SE","label-room-list":"Список комнат","span-play-replay":"Посмотреть повтор","label-create-room-password":"Пароль:","label-mayus-room":"繭の部屋","label-create-room":"Создать комнату:","input-room-name":{placeholder:"имя комнаты"},"button-create-room":"создать","link-about":{textContent:"О клиенте",href:"about_en.html"},"link-service":{textContent:"Положения",href:"service_en.html"},"link-disclaimer":{textContent:"Дисклеймер",href:"service_en.html#disclaimer"},"link-supporters":{textContent:"Пожертвования",href:"supporters_en.html"},"span-leave-room":"<<Вернуться","label-live":"LIVE","label-ready":"Готов","button-replay-step":"ДАЛЕЕ","button-replay-auto":"АВТО","button-replay-save":"DOWNLOAD","span-surrender":"Сдаться","span-leave-game":"Выйти","chat-input":{placeholder:"Сообщение..."},"label-replay-list":"Список повторов:","label-replay-file":"Файл повтора:","button-replay-return":"Вернуться","reconnect-title":"Соединение потеряно!","reconnect-retry":"Переподключение...","wait-for-reconnect-title":"Оппонент потерял соединение!","wait-for-reconnect-retry":"Ожидание переподключения...","wait-for-reconnect-button-drop":"Уйти","span-set-proxy":"Установить Proxy","proxy-title":"Proxy","proxy-description":"Если Ваше соединение с WEBXOSS нестабильно, можете использовать Proxy.","proxy-noproxy":"Без Proxy (Tokyo)","proxy-cloudflare":"CloudFlare","proxy-provide":"Свой сервер...","proxy-button-ok":"OK","msgbox-button-ok":"OK","msgbox-button-cancel":"Отмена"},DeckEditor:{"link-back-to-webxoss":"Готово","label-select-deck":"Выберите колоду:","button-delete-deck":"Удалить","button-rename":"Переименовать","label-new-deck":"Новая колода:","input-new-deck-name":{placeholder:"имя колоды"},"button-new-deck":"Добавить","button-copy-deck":"Дублировать","button-import-export":"Загрузить/Выгрузить","main-deck-title":"Основная колода","main-deck-mayus-room":"Комната Маю","main-deck-burst-title":"Вспышки: ","lrig-deck-title":"ИДЕЛ-колода","label-import-from-file":"Загрузить файл:","label-export-to-file":"Выгрузить файл:","button-export":"Выгрузить","button-text":"Показать текстом","button-export-code":"Показать код","button-import-code":"Импортировать код","button-import-export-cancel":"Отмена","search-input":{placeholder:"Искать..."},"link-search-tips":{textContent:"Памятка по поиску",href:"SearchTips_en.html"},"search-show-more":"Показать ещё"}},index:{REQUIRE_UPDATE:"Нужна новая версия!\nЧтобы начать игру, необходимо обновить клиент!",UPDATING:"Обновляю...",UPDATE_READY:"Обновлено, нажмите для применения!",NET_WORK_ERROR:"Ошибка сети.",DISCONNECTED:"Потеря соединения",NO_VALID_DECK:"Нет доступной колоды!\nОтредактируйте свою колоду!",OPPONENT_DISCONNECTED:"Противник потерял соединение!",SELF_DISCONNECTED:"Игрок потерял соединение!",PLEASE_INPUT_A_NICKNAME:"Введите свой никнейм!",PLEASE_INPUT_A_ROOM_NAME:"Введите имя комнаты!",FAILED_TO_READ_DECK:"Не удалось прочитать колоду!",NEW_GUEST:"%s вошёл в комнату.",GUEST_LEFT:"%s покинул комнату.",READY:"Готов открывать!",UNREADY:"Не готов",INPUT_PASSWORD:"Введите пароль", +WRONG_PASSWORD:"Неверный пароль!",NOT_CONNECTED:"Нет соединения с сервером!\nПожалуйста, попробуйте позже!",SUPPORT_URL:"about_en.html#support",CONFIRM_SURRENDER:"Вы точно хотите сдаться?",SURRENDERED:"Вы сдались!",OPPONENT_SURRENDERED:"Противник сдался!",CONFIRM_CLOSE:"Вы точно хотите уйти?",DROPPED:"Противник ушёл.",SAVE_REPLAY:"Сохранить повтор",FAILED_TO_PARSE_REPLAY:"Не удалось разобрать повтор!",UNSUPPORTED_REPLAY_VERSION:"Неподдерживаемая версия повтора!\nОбновите клиент!",PROVIDE_PROXY_SERVER:"Желаете предоставить свой Proxy-сервер?\nСвяжитесь с webxoss@gmail.com !\nWEBXOSS с Вашей помощью станет лучше!",FETCHING_DATA:'Загрузка данных...\nНажмите "OK" для отмены.',FAILED_TO_FETCH_DATA:"Не удалось загрузить!"},editor:{PLEASE_INPUT_A_DECK_NAME:"Введите имя колоды!",DECK_NAME:"Имя колоды:",DECK_NAME_ALREADY_EXISTS:'Колода с именем "%s" уже существует!',FAILED_TO_PARSE_FILE:"Не удалось разобрать файл!",FAILED_TO_PARSE_CODE:"Не удалось разобрать код!",CONFIRM_DELETE_DECK:'Вы точно хотите удалить "%s"?'}},n={common:{OK:"OK",CANCEL:"CANCEL",NO_CARDS:"No cards",or:"or"},_misc:{DIALOG_TITLE_EFFECTS:"Piu effetti sono stati attivati\nScegline uno da risolvere.",NO_OPTIONS:"Non hai %s",GIVE_UP:"Non %s",GUARD_TRUE:"Si",GUARD_FALSE:"No",LIMITING:"%s Only",WAIT:"In attesa...",CLASS_SEPARATOR:":\n",CROSS_NAME_QUOTE_LEFT:'"',CROSS_NAME_QUOTE_RIGHT:'"',CROSS_LEFT:">Cross< %s Sinistra",CROSS_RIGHT:">Cross< %s Destra",CROSS_AND:">Cross< %s Right and %s Left",CROSS_OR:" o ",GUARD_DESCRIPTION:"[Guard] (Scartando questa carta dalla tua mano annulla un attacco di una LRIG)",MULTI_ENER_DESCRIPTION:"[Constant]: [Multi Ener] (Mentre paghi un costo tratta questa carta come se fosse di un qualsiasi colore)",LAYER_DESCRIPTION:"(Layer) All of your SIGNI get this [Layer] ability."},buttonTitle:{OK:"OK",CANCEL:"Annulla",LEVEL0_LRIG:"Seleziona LRIG",DISCARD_AND_REDRAW:"Mulligan",CHARGE:"Carica",GROW:"Grow",SUMMON_SIGNI:"Evoca",SUMMON_SIGNI_ZONE:"Zona",BANISH:"Bandisci",BOUNCE:"Rimbalza",TRASH:"Scarti",TRASH_SIGNI:"Scarta",USE_SPELL:"Usa SPELL",SPELL_EFFECT:"Scegli che effetto attivare",USE_ARTS:"Usa ARTS",ARTS_EFFECT:"Scegli che effetto attivare",SPELL_CUT_IN:"Spell cut-in",USE_ACTION_EFFECT:"Azione",SEEK:"Cerca",SET_ORDER:"Ordina",SIGNI_ATTACK:"Attacca",LRIG_ATTACK:"Attacca",GUARD:"Guard",DISCARD:"Scarta",DECLARE:"Dichiara",PAY:"Paga",PAY_EXCEED:"Exceed",DOWN:"Down",UP:"Up",TARGET:"Bersaglia",PAY_ENER:"Paga Ener",LAUNCH:"Lancia",EFFECTS:"Effetti",CONFIRM:"Conferma",END_SELECT:"Termina",END_ENER_PHASE:"Fine Ener Phase",END_GROW_PHASE:"Fine Grow Phase",END_MAIN_PHASE:"Fine Main Phase",END_ARTS_STEP:"Fine ARTS Step",END_SIGNI_ATTACK_STEP:"Fine SIGNI Attack Step",END_LRIG_ATTACK_STEP:"Fine LRIG Attack Step",VIEW:"Dettagli",ADD_TO_HAND:"Aggiungi alla mano",COLOR:"Colore",CHOOSE_EFFECT:"Seleziona effetto",CHOOSE_ZONE:"Seleziona Zona",RESET_SIGNI_ZONE:"Sostituisci",CHARM_CARD:"Charm",TRASH_CHARM:"Scarta Charm",REVEAL:"Rivela",PUT_TO_TOP:"Metti in cima",PUT_TO_BOTTOM:"Metti in fondo",REVEAL_MORE:"Rivela altre carte",PROTECT:"Protect",_SHIRONAKUJI:"-6000",CLASS:"classe",PAY_WHITE_INSTEAD:"Paga [White] invece",TRASH_OSAKI:"Scarta Osaki",RESONA:"Resona",CRASH:"Crash",PLAYER:"Player",PUT_TO_CHECK_ZONE:"Sposta nella Check Zone",PUT_TO_ENER_ZONE:"Sposta nella Ener Zone",CONFIRM_REFRESH_SELF:"Deck refresh\nConferma",CONFIRM_REFRESH_OPPONENT:"Deck refresh avversario\nConferma",GUESS_TRAP:"Is trap?",LEVEL:"level"},noOptions:{TARGET:"Nessun bersaglio"},giveUp:{TARGET:"Non selezionare",SUMMON_SIGNI_ZONE:"Cancella"},gameText:{YES:"Yes",NO:"No",white:"white",black:"black",red:"red",blue:"blue",green:"green",colorless:"colorless",ADD_TO_HAND:"Aggiungi alla mano",SUMMON:"Evoca",DOWN:"Down",UP:"Up",SHOW_EFFECTS_DIALOG_TITLE:"Effetto",PUT_TO_TOP:"Metti in cima",PUT_TO_BOTTOM:"Metti in fondo",SELF:"Giocatore",OPPONENT:"Avversario",PUT_TO_ENER_ZONE:"Metti nella Ener Zone",CONFIRM_ENCORE:"Vuoi pagare il costo di Encore?",CONFIRM_BET:"Do you want to bet?",MAIN_DECK:"Main Deck",HAND:"Hand",SIGNI_ZONE:"SIGNI Zone",TRASH_ZONE:"Trash Zone",ENER_ZONE:"Ener Zone",LIFE_CLOTH:"Life Cloth",SELECT_DONE:"Termina"},prop:{cardType:"Tipo",classes:"Classe",level:"Livello",color:"Colore",limit:"Limite",power:"Power",limting:"Limitazione",guard:"Guard",cost:"Costo",timmings:"Timing",effects:"Abilita",burst:"Life Burst"},cardType:{LRIG:"LRIG",SIGNI:"SIGNI",SPELL:"SPELL",ARTS:"ARTS",RESONA:"RESONA"},color:{white:"White",black:"Black",red:"Red",blue:"Blue",green:"Green",colorless:"Colorless"},costColor:{costWhite:"White",costBlack:"Black",costRed:"Red",costBlue:"Blue",costGreen:"Green",costColorless:"Colorless"},timming:{mainPhase:"[Main Phase]",attackPhase:"[Attack Phase]",spellCutIn:"[Spell Cut-In]"},class:{"タマ":"Tama","花代":"Hanayo","ユヅキ":"Yuzuki","ピルルク":"Piruluk","エルドラ":"Eldora","ミルルン":"Mirurun","緑子":"Midoriko","アン":"Anne","ウリス":"Ulith","イオナ":"Iona","ウムル":"Umuru","リメンバ":"Remember","タウィル":"Tawil","サシェ":"Sashe","ミュウ":"Myuu","アイヤイ":"Aiyai","アルフォウ":"Alfou","ハナレ":"Hanare","リル":"Ril","メル":"Mel","あや":"Aya","ナナシ":"Nanashi","ドーナ":"Donna","ママ":"Mama","精像":"Image","天使":"Angel","悪魔":"Devil","美巧":"Beautiful Technique","精武":"War","アーム":"Arm","ウェポン":"Weapon","武勇":"Valor","調理":"Cooking","遊具":"Playground Equipment","毒牙":"Poison Fang","精羅":"Nature","鉱石":"Ore","宝石":"Gem","植物":"Plant","原子":"Atom","宇宙":"Space","精械":"Machine","電機":"Electric","古代兵器":"Ancient Weapon","迷宮":"Labyrinth","精生":"Living","水獣":"Water Beast","空獣":"Sky Beast","地獣":"Earth Beast","龍獣":"Dragon Beast","凶蟲":"Misfortune Insect","精元":"Origin","トリック":"Trick","英知":"Wisdom","微菌":"Bacteria","怪異":"Apparition"},DOM:{index:{"link-version":"","label-nickname":"Nickname:","input-nickame":{placeholder:"nickname"},"link-edit-deck":"Deck Editor","label-bgm":"BGM","label-sound-effect":"SE","label-room-list":"Stanze:","span-play-replay":"Guarda Replay","label-create-room-password":"Password:","label-mayus-room":"Stanza di mayu","label-create-room":"Crea Stanza:","input-room-name":{placeholder:"room name"},"button-create-room":"crea","link-about":{textContent:"About",href:"about_en.html"},"link-service":{textContent:"Termini",href:"service_en.html"},"link-disclaimer":{textContent:"Disclaimer",href:"service_en.html#disclaimer"},"link-supporters":{textContent:"Supporters",href:"supporters_en.html"},"span-leave-room":"<< Torna","label-live":"LIVE","label-ready":"Pronto","button-replay-step":"STEP","button-replay-auto":"AUTO","button-replay-save":"DOWNLOAD","span-surrender":"Resa","span-leave-game":"Abbandona","chat-input":{placeholder:"Chatta qui..."},"label-replay-list":"Lista replay:","label-replay-file":"File replay:","button-replay-return":"Torna","reconnect-title":"Ti sei disconnesso!","reconnect-retry":"Riconnessione...","wait-for-reconnect-title":"Il tuo avversario si è disconnesso!","wait-for-reconnect-retry":"In attesa di riconnessione...","wait-for-reconnect-button-drop":"Drop","span-set-proxy":"Imposta Proxy","proxy-title":"Proxy","proxy-description":"Se la tua connessione a WEBXOSS non è stabile puoi provare con l'uso di un proxy.","proxy-noproxy":"No Proxy (Tokyo)","proxy-cloudflare":"CloudFlare","proxy-provide":"Configura server...","proxy-button-ok":"OK","msgbox-button-ok":"OK","msgbox-button-cancel":"Annulla"},DeckEditor:{"link-back-to-webxoss":"Fine","label-select-deck":"Seleziona deck:","button-delete-deck":"Cancella","button-rename":"Rinomina","label-new-deck":"Nuovo deck:","input-new-deck-name":{placeholder:"nome deck"},"button-new-deck":"Aggiungi","button-copy-deck":"Duplica","button-import-export":"Importa/Esporta","main-deck-title":"Main Deck","main-deck-mayus-room":"Stanza di mayu","main-deck-burst-title":"Burst: ","lrig-deck-title":"LRIG Deck","label-import-from-file":"Importa file:","label-export-to-file":"Esporta file:","button-export":"Esporta","button-text":"Mostra testo","button-export-code":"Mostra codice","button-import-code":"Importa codice","button-import-export-cancel":"Annulla","search-input":{placeholder:"Cerca qui..."},"link-search-tips":{textContent:"Spiegazione filtri",href:"SearchTips_it.html"},"search-show-more":"Altro"}},index:{REQUIRE_UPDATE:"Una nuova versione è richiesta! Aggiorna il client!",UPDATING:"Aggiornamento...",UPDATE_READY:"Aggiornato, conferma per applicare!",NET_WORK_ERROR:"Errore di rete.",DISCONNECTED:"Disconnesso",NO_VALID_DECK:"Nessun deck valido! Modifica il tuo deck!",OPPONENT_DISCONNECTED:"Il tuo avversario si è disconnesso!",SELF_DISCONNECTED:"Il giocatore si è disconnesso!",PLEASE_INPUT_A_NICKNAME:"Inserisci un nickname!",PLEASE_INPUT_A_ROOM_NAME:"Inserisci il nome della stanza!",FAILED_TO_READ_DECK:"Lettura del deck fallita!",NEW_GUEST:"%s è entrato nella stanza.",GUEST_LEFT:"%s ha lasciato la stanza.",READY:"Pronto!",UNREADY:"Non pronto",INPUT_PASSWORD:"Inserisci password",WRONG_PASSWORD:"Password errata!",NOT_CONNECTED:"Non connesso, riprova piu tardi!",SUPPORT_URL:"about_en.html#support",CONFIRM_SURRENDER:"Sicuro di volerti arrendere?",SURRENDERED:"Ti sei arreso!",OPPONENT_SURRENDERED:"Il tuo avversario si è arreso!",CONFIRM_CLOSE:"Sicuro di voler abbandonare?",DROPPED:"You are dropped.",SAVE_REPLAY:"Salva replay",FAILED_TO_PARSE_REPLAY:"File replay non valido!",UNSUPPORTED_REPLAY_VERSION:"Versione del replay non supportata, aggiorna il tuo client!",PROVIDE_PROXY_SERVER:"Vuoi donare un server proxy?\nPer piacere contattaci a webxoss@gmail.com !\nWEBXOSS sara ancora migliore grazie a te!",FETCHING_DATA:'Lettura dati...\nPremi "OK" per annullare.',FAILED_TO_FETCH_DATA:"Lettura dati fallita!"},editor:{PLEASE_INPUT_A_DECK_NAME:"Inserisci nome del deck!",DECK_NAME:"Nome Deck:",DECK_NAME_ALREADY_EXISTS:'il Deck "%s" esiste gia!',FAILED_TO_PARSE_FILE:"Lettura file fallita!",FAILED_TO_PARSE_CODE:"Lettura codice fallita!",CONFIRM_DELETE_DECK:'Sicuro di voler cancellare "%s"?'}},E={common:{OK:"확인",CANCEL:"캔슬",NO_CARDS:"카드가 없습니다",or:"or"},_misc:{DIALOG_TITLE_EFFECTS:"복수의 효과가 동시에 발동되었습니다.\n먼저 처리할 효과를 하나 골라주세요",NO_OPTIONS:"%s할 수 없습니다",GIVE_UP:"%s하지 않는다",GUARD_TRUE:"있음",GUARD_FALSE:"-",LIMITING:"%s 한정",WAIT:"대전 상대가 생각중",CLASS_SEPARATOR:":",CROSS_NAME_QUOTE_LEFT:"《",CROSS_NAME_QUOTE_RIGHT:"》",CROSS_LEFT:"[크로스]%s의 왼쪽",CROSS_RIGHT:"[크로스]%s의 오른쪽",CROSS_AND:"[크로스]%s의 왼쪽과 %s의 오른쪽",CROSS_OR:"또는",GUARD_DESCRIPTION:"[가드](이 카드를 패에서 버리는 것으로, 루리그의 공격을 한 번 무효로 한다.)",MULTI_ENER_DESCRIPTION:"[상시]:[멀티에나](코스트를 지불할 때, 이 카드는 모든 색을 가진것 처럼 취급한다.)",LAYER_DESCRIPTION:"(Layer) All of your SIGNI get this [Layer] ability."},buttonTitle:{OK:"확인",CANCEL:"캔슬",LEVEL0_LRIG:"루리그 셋",DISCARD_AND_REDRAW:"다시 뽑기",CHARGE:"차지",GROW:"그로우",SUMMON_SIGNI:"장에 내기",SUMMON_SIGNI_ZONE:"시그니 존",BANISH:"배니시",BOUNCE:"패로 되돌리기",TRASH:"트래시",TRASH_SIGNI:"트래시",USE_SPELL:"사용",SPELL_EFFECT:"효과를 선택",USE_ARTS:"아츠를 사용",ARTS_EFFECT:"효과를 선택",SPELL_CUT_IN:"컷 인",USE_ACTION_EFFECT:"기동",SEEK:"찾기",SET_ORDER:"순서를 배치",SIGNI_ATTACK:"어택",LRIG_ATTACK:"어택",GUARD:"가드",DISCARD:"버리기",DECLARE:"선언",PAY:"지불",PAY_EXCEED:"엑시드",DOWN:"다운",UP:"업",TARGET:"목표",PAY_ENER:"에나를 지불",LAUNCH:"발동",EFFECTS:"먼저 처리",CONFIRM:"확인",END_SELECT:"선택을 완료",END_ENER_PHASE:"에나 페이즈 종료",END_GROW_PHASE:"그로우 페이즈 종료",END_MAIN_PHASE:"메인 페이즈 종료",END_ARTS_STEP:"아츠 스텝 종료",END_SIGNI_ATTACK_STEP:"스텝 종료",END_LRIG_ATTACK_STEP:"스텝 종료",VIEW:"본다",ADD_TO_HAND:"패에 더하기",COLOR:"색",CHOOSE_EFFECT:"효과 선택",CHOOSE_ZONE:"존 선택",RESET_SIGNI_ZONE:"배치",CHARM_CARD:"참",TRASH_CHARM:"참을 트래시",REVEAL:"공개",PUT_TO_TOP:"위에 두기",PUT_TO_BOTTOM:"아래에 두기",REVEAL_MORE:"카드를 더 공개",PROTECT:"보호",_SHIRONAKUJI:"-6000",CLASS:"클래스",PAY_WHITE_INSTEAD:"대신 [백]을 지불",TRASH_OSAKI:"오사키",RESONA:"레조나",CRASH:"크래시",PLAYER:"플레이어",PUT_TO_CHECK_ZONE:"체크 존에 두기",PUT_TO_ENER_ZONE:"에나 존에 두기",CONFIRM_REFRESH_SELF:"리프레시\n당신의 트래시를 확인",CONFIRM_REFRESH_OPPONENT:"리프레시\n상대의 트래시를 확인",GUESS_TRAP:"Is trap?",LEVEL:"Level"},noOptions:{TARGET:"목표가 없습니다"},giveUp:{TARGET:"선택하지 않는다",SUMMON_SIGNI_ZONE:"캔슬",DISCARD_AND_REDRAW:"다시 뽑지 않는다",SEEK:"찾지 않는다"},gameText:{YES:"Yes",NO:"No",white:"백",black:"흑",red:"적",blue:"청",green:"녹",colorless:"무",ADD_TO_HAND:"패에 더한다",SUMMON:"장에 낸다",DOWN:"다운",UP:"업",SHOW_EFFECTS_DIALOG_TITLE:"효과",PUT_TO_TOP:"위에 둔다",PUT_TO_BOTTOM:"아래에 둔다",SELF:"당신",OPPONENT:"대전 상대",PUT_TO_ENER_ZONE:"에나 존에 둔다",CONFIRM_ENCORE:"앵콜을 사용합니까?",CONFIRM_BET:"베트 하시겠습니까?",MAIN_DECK:"덱",HAND:"Hand",SIGNI_ZONE:"SIGNI Zone",TRASH_ZONE:"Trash Zone",ENER_ZONE:"에나 존에",LIFE_CLOTH:"라이프 클로스",SELECT_DONE:"선택 완료"},prop:{cardType:"종류",classes:"타입",level:"레벨",color:"색",limit:"리미트",power:"파워",limting:"한정조건",guard:"가드",cost:"코스트",timmings:"타이밍",effects:"효과",burst:"라이프 버스트"},cardType:{LRIG:"루리그",SIGNI:"시그니",SPELL:"스펠",ARTS:"아츠",RESONA:"레조나"},color:{white:"백",black:"흑",red:"적",blue:"청",green:"녹",colorless:"무"},costColor:{costWhite:"백",costBlack:"흑",costRed:"적",costBlue:"청",costGreen:"녹",costColorless:"무"},timming:{mainPhase:"[메인 페이즈]",attackPhase:"[어택 페이즈]",spellCutIn:"[스펠 컷인]"},class:{"タマ":"타마","花代":"하나요","ユヅキ":"유즈키","ピルルク":"피루루크","エルドラ":"엘도라","ミルルン":"미루룽","緑子":"미도리코","アン":"안","ウリス":"우리스","イオナ":"이오나","ウムル":"움르","リメンバ":"리멤버","タウィル":"타윌","サシェ":"사셰","ミュウ":"뮤","アイヤイ":"아이야이","アルフォウ":"알포우","ハナレ":"하나레","リル":"릴","メル":"멜","あや":"Aya","ナナシ":"Nanashi","ドーナ":"Donna","ママ":"Mama","精像":"정상","天使":"천사","悪魔":"악마","美巧":"미교","精武":"정무","アーム":"암","ウェポン":"웨펀","武勇":"무용","調理":"조리","遊具":"유구","毒牙":"독아","精羅":"정나","鉱石":"광석","宝石":"보석","植物":"식물","原子":"원자","宇宙":"우주","精械":"정계","電機":"전기","古代兵器":"고대병기","迷宮":"미궁","精生":"정생","水獣":"수수","空獣":"공수","地獣":"지수","龍獣":"용수","凶蟲":"흉충","精元":"정원","トリック":"トリック","英知":"英知","微菌":"微菌","怪異":"怪異"},DOM:{index:{"link-version":"<復活>","label-nickname":"닉네임:","input-nickame":{placeholder:"닉네임"},"link-edit-deck":"덱 편집","label-bgm":"BGM","label-sound-effect":"SE","label-room-list":"방 목록:","span-play-replay":"리플레이 재생","label-create-room-password":"패스워드:","label-mayus-room":"마유의 방","label-create-room":"방 생성:","input-room-name":{placeholder:"방 제목"},"button-create-room":"완료","link-about":{textContent:"About",href:"about_en.html"},"link-service":{textContent:"Terms",href:"service_en.html"},"link-disclaimer":{textContent:"Disclaimer",href:"service_en.html#disclaimer"},"link-supporters":{textContent:"Supporters",href:"supporters_en.html"},"span-leave-room":"<<돌아가기","label-live":"LIVE","label-ready":"준비","button-replay-step":"STEP","button-replay-auto":"AUTO","button-replay-save":"DOWNLOAD","span-surrender":"항복하기","span-leave-game":"돌아가기","chat-input":{placeholder:"대화 입력"},"label-replay-list":"리플레이 리스트:","label-replay-file":"파일:","button-replay-return":"돌아가기","reconnect-title":"연결이 끊어졌습니다.","reconnect-retry":"재접속중...","wait-for-reconnect-title":"대전 상대의 연결이 끊어졌습니다.","wait-for-reconnect-retry":"재접속을 기다리고 있습니다...","wait-for-reconnect-button-drop":"기다리지 않는다","span-set-proxy":"프록시 설정","proxy-title":"프록시","proxy-description":"만약 WEBXOSS 서버가 원활하지 않다면, 프록시를 시도할 수 있습니다.","proxy-noproxy":"프록시 없음 (Tokyo)","proxy-cloudflare":"CloudFlare","proxy-provide":"서버 제공중...","proxy-button-ok":"확인","msgbox-button-ok":"확인","msgbox-button-cancel":"캔슬"},DeckEditor:{"link-back-to-webxoss":"작성 완료","label-select-deck":"덱 고르기:","button-delete-deck":"삭제","button-rename":"명명","label-new-deck":"새로운 덱:","input-new-deck-name":{placeholder:"덱 이름"},"button-new-deck":"신규","button-copy-deck":"복제","button-import-export":"불러오기/저장하기","main-deck-title":"메인 덱","main-deck-mayus-room":"마유의 방","main-deck-burst-title":"라이프 버스트:","lrig-deck-title":"루리그 덱","label-import-from-file":"파일에서 불러오기:","label-export-to-file":"파일로 저장하기:","button-export":"저장하기","button-text":"텍스트 표시","button-export-code":"코드 표시","button-import-code":"코드 불러오기","button-import-export-cancel":"캔슬","search-input":{placeholder:"키워드로 검색"},"link-search-tips":{textContent:"힌트",href:"SearchTips_en.html"},"search-show-more":"좀더 찾기…"}},index:{REQUIRE_UPDATE:"새로운 버전이 필요합니다.\n클라이언트를 갱신해주세요.",UPDATING:"갱신중…",UPDATE_READY:"갱신 완료했습니다. 여기를 클릭해주세요.",NET_WORK_ERROR:"네트워크에 에러가 발생했습니다.",DISCONNECTED:"연결이 끊어졌습니다.",NO_VALID_DECK:"덱이 없습니다.",OPPONENT_DISCONNECTED:"대전 상대의 연결이 끊어졌습니다.",SELF_DISCONNECTED:"対戦者が切断されました。",PLEASE_INPUT_A_NICKNAME:"닉네임을 입력해주세요.",PLEASE_INPUT_A_ROOM_NAME:"방 이름을 입력해주세요.",FAILED_TO_READ_DECK:"덱을 로딩하는데 실패했습니다.",NEW_GUEST:"%s 방에 들어왔습니다.",GUEST_LEFT:"%s 방을 나갔습니다.",READY:"대전 상대의 준비가 완료되었습니다.",UNREADY:"준비 해재",INPUT_PASSWORD:"패스워드",WRONG_PASSWORD:"패스워드가 바르지 않습니다.",NOT_CONNECTED:"아직 서버에 접속되어있지 않습니다.\n나중에 다시 한번 시도해주세요.",SUPPORT_URL:"about_en.html#support",CONFIRM_SURRENDER:"정말로 항복하시겠습니까?",SURRENDERED:"항복했습니다.",OPPONENT_SURRENDERED:"대전 상대가 항복했습니다.",CONFIRM_CLOSE:"게임을 떠나시겠습니까?",DROPPED:"대전 상대가 게임을 떠났습니다.",SAVE_REPLAY:"리플레이를 보존",FAILED_TO_PARSE_REPLAY:"파일 해석에 실패했습니다.",UNSUPPORTED_REPLAY_VERSION:"지원하지 않는 리플레이 버전입니다.\n클라이언트를 업데이트 바랍니다.",PROVIDE_PROXY_SERVER:"프록시 서버를 지원하고 싶습니까?\n webxoss@gmail.com 으로 연락 주세요!\nWEBXOSS는 당신의 협력에 감사합니다!",FETCHING_DATA:"데이터를 가져오는 중...\n확인을 눌러 취소.",FAILED_TO_FETCH_DATA:"데이터를 가져오는데 실패했습니다!"},editor:{PLEASE_INPUT_A_DECK_NAME:"덱 이름을 입력해주세요.",DECK_NAME:"덱 이름",DECK_NAME_ALREADY_EXISTS:'덱 "%s"은 이미 존재하고 있습니다.',FAILED_TO_PARSE_FILE:"파일 해석에 실패했습니다.",FAILED_TO_PARSE_CODE:"코드 해석에 실패했습니다.",CONFIRM_DELETE_DECK:'정말로 "%s"를 지우시겠습니까?'}},i={common:{OK:"OK",CANCEL:"CANCELAR",NO_CARDS:"Sin cartas",or:"o"},_misc:{DIALOG_TITLE_EFFECTS:"Multiples efectos se han disparado.\nEscoge uno para resolver.",NO_OPTIONS:"No es posible %s",GIVE_UP:"No %s",GUARD_TRUE:"Si",GUARD_FALSE:"No",LIMITING:"Limitado a %s",WAIT:"Esperando...",CLASS_SEPARATOR:":\n",CROSS_NAME_QUOTE_LEFT:'"',CROSS_NAME_QUOTE_RIGHT:'"',CROSS_LEFT:">Cross< %s Izquierda",CROSS_RIGHT:">Cross< %s Derecha",CROSS_AND:">Cross< %s Derecha y %s Izquierda",CROSS_OR:" o ",GUARD_DESCRIPTION:"[Guardia] (Al descartar esta carta de tu mano, deshabilita el ataque de una LRIG)",MULTI_ENER_DESCRIPTION:"[Constante]: [Multi Ener] (Cuando pagues un costo, trata esta carta como si tuviera todos los colores)",LAYER_DESCRIPTION:"(Layer) Todos tus SIGNI obtienen esta habilidad [Layer]."},buttonTitle:{OK:"OK",CANCEL:"CANCELAR",LEVEL0_LRIG:"Colocar LRIG",DISCARD_AND_REDRAW:"Mulligan",CHARGE:"Cargar",GROW:"Crecer",SUMMON_SIGNI:"Invocar",SUMMON_SIGNI_ZONE:"Zona",BANISH:"Desterrar",BOUNCE:"Rebotar",TRASH:"Basura",TRASH_SIGNI:"Basura",USE_SPELL:"Usar HECHIZO",SPELL_EFFECT:"Seleccionar efecto de HECHIZO",USE_ARTS:"Usar ARTS",ARTS_EFFECT:"Seleccionar efecto de ARTS",SPELL_CUT_IN:"Usar Corta-Hechizos",USE_ACTION_EFFECT:"Efecto Acción",SEEK:"Buscar",SET_ORDER:"Establecer orden",SIGNI_ATTACK:"Atacar",LRIG_ATTACK:"Atacar",GUARD:"Usar Guardia",DISCARD:"Descartar",DECLARE:"Declarar",PAY:"Pagar",PAY_EXCEED:"Exceed",DOWN:"Bajar",UP:"Subir",TARGET:"Objetivo",PAY_ENER:"Pagar Ener",LAUNCH:"Lanzar",EFFECTS:"Efectos",CONFIRM:"Confirmar",END_SELECT:"Terminar selección",END_ENER_PHASE:"Terminar Fase de Ener",END_GROW_PHASE:"Terminar Fase de Crecimiento",END_MAIN_PHASE:"Terminar Fase Principal",END_ARTS_STEP:"Terminar Fase de ARTS",END_SIGNI_ATTACK_STEP:"Terminar Fase de Ataque de SIGNI",END_LRIG_ATTACK_STEP:" Terminar Fase de Ataque de LRIG",VIEW:"Ver",ADD_TO_HAND:"Agregar a la mano",COLOR:"Color",CHOOSE_EFFECT:"Escoger Efecto",CHOOSE_ZONE:"Escoger Zona",RESET_SIGNI_ZONE:"Reemplazar",CHARM_CARD:"Charm",TRASH_CHARM:"Desechar Charm",REVEAL:"Revelar",PUT_TO_TOP:"Colocar en la parte superior",PUT_TO_BOTTOM:"Colocar en la parte inferior",REVEAL_MORE:"Revelar más cartas",PROTECT:"Proteger",_SHIRONAKUJI:"-6000",CLASS:"clase",PAY_WHITE_INSTEAD:"Pagar [Blanco] en su lugar",TRASH_OSAKI:"Desechar Osaki",RESONA:"Resona",CRASH:"Crushear",PLAYER:"Jugador",PUT_TO_CHECK_ZONE:"Colocar en la Zona de Verificación",PUT_TO_ENER_ZONE:"Colocar en la Zona de Ener",CONFIRM_REFRESH_SELF:"Refrezcar mazo\nConfirma tu basura.",CONFIRM_REFRESH_OPPONENT:"Refrezcar mazo\nConfirma la basura de tu oponente.",GUESS_TRAP:"¿Es una trampa?",LEVEL:"Nivel"},noOptions:{TARGET:"Sin objetivos"},giveUp:{TARGET:"No seleccionar",SUMMON_SIGNI_ZONE:"Cancelar"},gameText:{YES:"Si",NO:"No",white:"blanco",black:"negro",red:"rojo",blue:"azul",green:"verde",colorless:"incoloro",ADD_TO_HAND:"Agregar a la mano",SUMMON:"Invocar",DOWN:"Bajar",UP:"Subir",SHOW_EFFECTS_DIALOG_TITLE:"Efecto",PUT_TO_TOP:"Colocar en la parte superior",PUT_TO_BOTTOM:"Colocar en la parte inferior",SELF:"A mí",OPPONENT:"Oponente",PUT_TO_ENER_ZONE:"Colocar en la Zona de Ener",CONFIRM_ENCORE:"Deseas pagar por Encore?",CONFIRM_BET:"Deseas apostar?",MAIN_DECK:"Mazo Principal",HAND:"Mano",SIGNI_ZONE:"Zona de SIGNI",TRASH_ZONE:"Zona de Basura",ENER_ZONE:"Zona de Ener",LIFE_CLOTH:"Life Cloth",SELECT_DONE:"Terminar de seleccionar"},prop:{cardType:"Tipo",classes:"Clase",level:"Nivel",color:"Color",limit:"Limite",power:"Poder",limting:"Limitación",guard:"Guardia",cost:"Costo",timmings:"Tiempo de Uso",effects:"Habilidades",burst:"Life Burst"},cardType:{LRIG:"LRIG",SIGNI:"SIGNI",SPELL:"HECHIZO",ARTS:"ARTS",RESONA:"RESONA"},color:{white:"Blanco",black:"Negro",red:"Rojo",blue:"Azul",green:"Verde",colorless:"Incoloro"},costColor:{costWhite:"Blanco",costBlack:"Negro",costRed:"Rojo",costBlue:"Azul",costGreen:"Verde",costColorless:"Incoloro"},timming:{mainPhase:"[Fase Principal]",attackPhase:"[Fase de Ataque]",spellCutIn:"[Corta-Hechizos]"},class:{"タマ":"Tama","花代":"Hanayo","ユヅキ":"Yuzuki","ピルルク":"Piruluk","エルドラ":"Eldora","ミルルン":"Mirurun","緑子":"Midoriko","アン":"Anne","ウリス":"Ulith","イオナ":"Iona","ウムル":"Umuru","リメンバ":"Remember","タウィル":"Tawil","サシェ":"Sashe","ミュウ":"Myuu","アイヤイ":"Aiyai","アルフォウ":"Alfou","ハナレ":"Hanare","リル":"Ril","メル":"Mel","あや":"Aya","ナナシ":"Nanashi","ドーナ":"Donna","ママ":"Mama","精像":"Imagen","天使":"Angel","悪魔":"Demonio","美巧":"Armonía Artística","精武":"Guerra","アーム":"Armamento","ウェポン":"Arma","武勇":"Valor","調理":"Cocina","遊具":"Zona de Juegos","毒牙":"Colmillo Venenoso","精羅":"Naturaleza","鉱石":"Mineral","宝石":"Gema","植物":"Planta","原子":"Átomo","宇宙":"Espacio","精械":"Maquinaria","電機":"Eléctrica","古代兵器":"Arma Antigua","迷宮":"Laberinto","精生":"Ser","水獣":"Bestia Marina","空獣":"Bestia Aérea","地獣":"Bestia Terrenal","龍獣":"Bestia Dragón","凶蟲":"Insecto del Infortunio","精元":"Origen","トリック":"Truco","英知":"Sabiduría","微菌":"Bacteria","怪異":"Aparición"},DOM:{index:{"link-version":"","label-nickname":"Nickname:","input-nickame":{placeholder:"nickname"},"link-edit-deck":"EditarMazo","label-bgm":"BGM","label-sound-effect":"SFX","label-room-list":"Lista de Salas:","span-play-replay":"Mirar Repetición","label-create-room-password":"Contraseña:","label-mayus-room":"Cuarto de Mayu","label-create-room":"Crear Sala:","input-room-name":{placeholder:"nombre de sala"},"button-create-room":"crear","link-about":{textContent:"Sobre",href:"about_en.html"},"link-service":{textContent:"Terminos",href:"service_en.html"},"link-disclaimer":{textContent:"Disclaimer",href:"service_en.html#disclaimer"},"link-supporters":{textContent:"Supporters",href:"supporters_en.html"},"span-leave-room":"< - - + + @@ -230,12 +230,12 @@ - + - + \ No newline at end of file diff --git a/webxoss.appcache b/webxoss.appcache index 4152c74..dca01f8 100644 --- a/webxoss.appcache +++ b/webxoss.appcache @@ -22,7 +22,7 @@ DeckEditor/editor.css # images # background/bg.png -background/Grid.jpg +background/Grid.png background/white.jpg background/whiteGrid.jpg background/black.jpg @@ -47,4 +47,4 @@ background/loading.gif NETWORK: * -# 2016/05/22 23:52 +# 2017/08/20 23:43 diff --git a/webxoss.js b/webxoss.js index 104f082..6ca90aa 100644 --- a/webxoss.js +++ b/webxoss.js @@ -1,3 +1,3 @@ -"use strict";function callConstructor(t){return new(t.bind.apply(t,arguments))}function applyToConstructor(t,e){var i=concat(null,toArr(e));return new(t.bind.apply(t,i))}function nextTick(t){setTimeout(t,0)}function MessageBox(){this.eWarp=document.getElementById("msgbox-warp"),this.eWin=document.getElementById("msgbox-window"),this.eMsg=document.getElementById("msgbox-msg"),this.eInput=document.getElementById("msgbox-input"),this.ePreset=document.getElementById("msgbox-preset"),this.eOk=document.getElementById("msgbox-button-ok"),this.eCancel=document.getElementById("msgbox-button-cancel")}function IO(t){this.socket=t,this.listener=null,this.sendingMsg=null,this.datas=[],this.id=0,this.inputBlocked=!1,this.outputBlocked=!1,this.socket.removeAllListeners("gameMessage"),this.socket.on("gameMessage",this.receiveGameMessage.bind(this))}function Card(t,e){createjs.Container.prototype.initialize.call(this),this.game=t,this.isWhiteBack=e,this.width=Card.WIDTH,this.height=Card.HEIGHT,this.pid=0,this.zone=null,this.zIndex=0,this.changed=!0,this.isSide=!1,this.renderLayer=new createjs.Container,this.addChild(this.renderLayer),this.renderLayer.regX=this.width/2,this.renderLayer.regY=this.height/2,this.bitmap=new CardBitmap("",t.imageManager.noimage),this.renderLayer.addChild(this.bitmap),this.stateLayer=new createjs.Container,this.renderLayer.addChild(this.stateLayer),this.effectShape=new createjs.Shape,this.renderLayer.addChild(this.effectShape),this.buttonLayer=new ButtonList,this.buttonLayer.x=this.width/2,this.buttonLayer.y=this.height/2,this.renderLayer.addChild(this.buttonLayer),this.style=new Style({x:0,y:0,zIndex:0,top:!1,covered:!1,offX:0,offY:0,rotation:0,scaleX:-1,shadowColor:"#f7ff00",shadowBlur:0,flash:0,shine:0}),this.style.checkSkip=function(){return this.game.skip}.bind(this),this.on("mouseover",this.handleMouseover),this.on("mouseout",this.handleMouseout),this.game.addCard(this)}function CardBitmap(t,e){createjs.Container.prototype.initialize.call(this),this.setAltImage(t,e),this.setWidthHeight(Card.WIDTH,Card.HEIGHT),this.complete=e.complete,this.text=new createjs.Text(t),this.bitmap=new createjs.Bitmap(e),this.addChild(this.text,this.bitmap),this.changed=!0}function StateBitmap(t){var e=new createjs.Bitmap(t);return e.width=Card.WIDTH,e.height=Card.HEIGHT,e}function Style(t){this.transitingStyle={};for(var e in t)this.transitingStyle[e]=new TransitingValue(t[e]);this.changed=!0,this.checkSkip=null}function TransitingValue(t){this.changeTime=0,this.startValue=t,this.endValue=t,this.duration=0,this.timing=TransitingValue.cubic,this.done=!1}function Zone(t){createjs.Container.prototype.initialize.call(this),this.game=t.game,this.name=t.name,this.x=t.x,this.y=t.y,this.showAmount=!!t.showAmount,this._amount=0,this.opposite=!!t.opposite,this.checkable=!!t.checkable,this.cards=[],this.changed=!0,this.text=new createjs.Text("","bold 12px monospace"),this.text.textAlign="center",this.addChild(this.text),this.opposite&&(this.rotation=180,this.text.rotation=180),this.buttonLayer=new ButtonList,this.buttonLayer.rotation=-this.rotation,this.addChild(this.buttonLayer),this.checkable&&(this.viewCardsButton=new Button(Localize("buttonTitle","VIEW"),function(){this.game.dialog.showCards(Localize("buttonTitle","VIEW"),this.cards,function(){})}.bind(this)),this.viewCardsButton.alpha=.8),this.game.addZone(this)}function StackZone(t){Zone.apply(this,arguments),this.showPower=!!t.showPower,this.changed=!0,this._power=0,this.power=0,t.centerText?this.text.textBaseline="middle":(this.text.textBaseline="top",this.text.y=Card.HEIGHT/2,this.opposite&&(this.text.rotation=180,this.text.textBaseline="bottom")),this.stateLayer=new createjs.Container,this.stateShape=new createjs.Shape,this.stateLayer.addChild(this.stateShape),this.addChild(this.stateLayer)}function TileZone(t){Zone.apply(this,arguments),this.up=t.up,this.horizontal=t.horizontal,this.center=t.center,this.width=t.width,this.spacing=t.spacing,this.showAmount=!!t.showAmount,this.horizontal?(this.text.textBaseline="middle",this.opposite?this.text.textAlign="left":this.text.textAlign="right"):(this.text.textAlign="center",this.opposite?this.text.textBaseline="top":this.text.textBaseline="bottom"),this.checkable&&(this.buttonLayer.y+=this.width/2,this.buttonLayer.addButton(this.viewCardsButton))}function Game(t,e,i,n){this.io=t,this.audio=e,this.ongameover=i,this.io.listener=function(t){console.log(t),this.addMsgs(t),this.update()}.bind(this),this.onidle=null,this.gameDiv=document.getElementById("GameDiv"),this.canvasContainer=document.getElementById("BattleField"),this.canvasContainer.innerHTML="",this.canvas=document.createElement("canvas"),this.canvas.width=576,this.canvas.height=734,this.canvasContainer.appendChild(this.canvas),this.stage=new createjs.Stage(this.canvas),this.stage.enableDOMEvents(!0),this.stage.enableMouseOver(10),this.dialog=new Dialog(this),this.selector=new Selector(this,n),this.objList=[],this.background=new GameBackground(this),this.stage.addChild(this.background),this.cards=[],this.cardLayer=new createjs.Container,this.stage.addChild(this.cardLayer),this.zones=[],this.zoneLayer=new createjs.Container,this.stage.addChild(this.zoneLayer),this.msgQueue=[],this._packageCount=0,this.imageManager=new ImageManager,this.cardDetail=new CardDetail(this.imageManager),this.initZones(),this.skip=!1}function Button(t,e){createjs.Container.prototype.initialize.call(this),this.changed=!0;var i=Button.HEIGHT,n=i+'px "Segoe UI", Arial, "Microsoft Yahei", Simsun, sans-serif';this.text=new createjs.Text(t,n),this.text.textBaseline="middle",this.height=i+10,this.width=this.text.getMeasuredWidth()+16,this.regX=this.width/2,this.regY=this.height/2,this.text.x=8,this.text.y=this.height/2,this.background=new createjs.Shape,this.toDefaultStyle(),this.addChild(this.background,this.text),this.on("click",e),this.on("mouseover",this.toHoverStyle),this.on("mouseout",this.toDefaultStyle)}function ButtonList(){createjs.Container.prototype.initialize.call(this),this.changed=!1,this.buttons=[]}function Selector(t,e){this.game=t,this.msgs=[],this.selectedIndexes=[],this._autoPopMsg=null,this.spectating=e}function Dialog(t){this.game=t,this.searcher=new Searcher,this.warpDiv=this.newElement("div"),this.dialogDiv=this.newElement("div"),this.titleDiv=this.newElement("div"),this.closeIcon=this.newElement("div"),this.bodyDiv=this.newElement("div"),this.footerDiv=this.newElement("div"),this.footSpan=this.newElement("span"),this.okBtn=this.newElement("button"),this.cancelBtn=this.newElement("button"),this.okBtn.textContent=Localize("common","OK"),this.cancelBtn.textContent=Localize("common","CANCEL"),this.closeIcon.onclick=this.close.bind(this),this.warpDiv.classList.add("warp"),this.dialogDiv.classList.add("dialog"),this.titleDiv.classList.add("title"),this.closeIcon.classList.add("closeIcon"),this.bodyDiv.classList.add("body"),this.footerDiv.classList.add("footer"),this.okBtn.classList.add("okBtn"),this.cancelBtn.classList.add("cancelBtn"),this.warpDiv.appendChild(this.dialogDiv),this.dialogDiv.appendChild(this.closeIcon),this.dialogDiv.appendChild(this.titleDiv),this.dialogDiv.appendChild(this.bodyDiv),this.dialogDiv.appendChild(this.footerDiv),this.footerDiv.appendChild(this.footSpan),this.footerDiv.appendChild(this.okBtn),this.footerDiv.appendChild(this.cancelBtn),this.warpDiv.style.display="none",t.stage.canvas.parentElement.appendChild(this.warpDiv)}function GameBackground(t){createjs.Container.prototype.initialize.call(this),this.game=t,this.width=t.stage.canvas.width,this.height=t.stage.canvas.height,this.changed=!0,this.mask=new createjs.Shape,this.addChild(this.mask)}function GameAudio(){this.bgm=document.getElementById("audio-bgm"),this.soundEffect=document.getElementById("audio-sound-effect"),this.bgmCheckBox=document.getElementById("checkbox-bgm"),this.seCheckBox=document.getElementById("checkbox-sound-effect"),this.bgmDisabled=!1,this.seDisabled=!1,this.lastPlay="",this.map={white:"WhiteAng",black:"DarkFßen",red:"reLEIdEN",blue:"Süblueß",green:"GreenWi",NevWorry:"NevWorry",main:"Love Your Enemies.W",Battle:"バトル!"},this.loadSettings()}function ChatManager(t){this.socket=t,this.dialogue=document.getElementById("chat-dialogue"),this.input=document.getElementById("chat-input"),this.input.onkeypress=function(t){13===(t.keyCode||t.which||t.charCode)&&(this.sendMsg(this.input.value),this.input.value=null)}.bind(this)}function hide(t){t.style.display="none"}function show(t,e){1===arguments.length?t.style.display="":t.disabled=e?"":"none"}function disable(t){t.disabled=!0}function enable(t,e){1===arguments.length?t.disabled=!1:t.disabled=!e}function setClass(t,e,i){i?t.classList.add(e):t.classList.remove(e)}function newElement(t){for(var e=document.createElement(t),i=1;iVERSION)return void msgBox.alert(Localize.index("UNSUPPORTED_REPLAY_VERSION"),initHall);playingReplay=!0,gameStart("replay"),game.io.datas=t.messagePacks;var i=0,n=!0,o=!1;game.onidle=function(){n=!0,i>=t.messagePacks.length?($("button-replay-auto").onclick=null,$("button-replay-step").onclick=null,$("button-replay-save").onclick=null,t.surrender&&(t.win?game.win(!0):game.lose(!0))):o&&setTimeout(e,500)},e(),$("button-replay-auto").onclick=function(t){o=!0,e()},$("button-replay-step").onclick=function(t){if(o)return void(o=!1);e()},$("button-replay-save").onclick=function(e){e.preventDefault();var i=document.createElement("a"),n=objToBlob(createReplayObj(t.messagePacks,t.win,t.surrender)),o=blobToUrl(n),s=(new Date).toISOString().replace("T"," ").substr(0,19).replace(/:/g,"-"),a=s+".wxrep";i.href=o,i.download=a,i.click(),window.URL.revokeObjectURL(o)}}function readReplayFile(t,e){if(!t||!window.FileReader||!window.JSON)return void e(null);var i=new FileReader;i.onload=function(t){var n=i.result,o=null;try{o=JSON.parse(n)}catch(t){return e(null)}if(!checkReplayObj(o))return e(null);e(o)},i.onerror=function(t){e(null)},i.readAsText(t)}function checkReplayObj(t){return!!isObj(t)&&("WEBXOSS Replay"===t.format&&("1"===t.version&&!!isObj(t.content)))}function checkDomain(){var t=location.hostname;"127.0.0.1"!==t&&(t.match(/^(.*\.)?webxoss\.com$/)||msgBox.preset("warn"))}var concat=Array.prototype.concat.bind([]),toArr=function(t){return t?"string"==typeof t?[]:Array.prototype.slice.call(t,0):[]},isArr=Array.isArray,inArr=function(t,e){return-1!=toArr(e).indexOf(t)},removeFromArr=function(t,e){var i=e.indexOf(t);return!(i<0)&&(e.splice(i,1),!0)},isStr=function(t){return"string"==typeof t},isObj=function(t){return t&&"object"==typeof t&&!isArr(t)},isNum=function(t){return"number"==typeof t},isFunc=function(t){return"function"==typeof t},pEach=function(t,e,i){return t.reduce(function(t,i){return t.then(function(){return e(i)})},Promise.resolve())};MessageBox.prototype.alert=function(t,e){this.eWin.className="alert",this.eMsg.textContent=t,this.eWarp.classList.add("shown"),this.eOk.focus(),this.eOk.onclick=function(t){this.close(),e&&e()}.bind(this)},MessageBox.prototype.confirm=function(t,e){this.eWin.className="confirm",this.eMsg.textContent=t,this.eWarp.classList.add("shown"),this.eCancel.focus(),this.eOk.onclick=function(t){this.close(),e&&e(!0)}.bind(this),this.eCancel.onclick=function(t){this.close(),e&&e(!1)}.bind(this)},MessageBox.prototype.prompt=function(t,e,i){2===arguments.length&&(e="",i=arguments[1]),this.eWin.className="prompt",this.eMsg.textContent=t,this.eInput.value=e,this.eWarp.classList.add("shown"),this.eInput.select();var n=function(t){this.close(),i&&i(t||"")}.bind(this);this.eOk.onclick=function(t){n(this.eInput.value)}.bind(this),this.eCancel.onclick=function(t){n()}.bind(this),this.eInput.onkeypress=function(t){13===(t.keyCode||t.which||t.charCode)&&n(this.eInput.value)}.bind(this)},MessageBox.prototype.preset=function(t){this.eWin.className="preset";for(var e=this.ePreset.children,i=0;i1||!(!inArr(t,["SigniZone","LrigZone"])||0===this.zone.getCardIndex(this))))},Card.prototype.removeButtons=function(){this.buttonLayer.removeAllButtons()},Card.prototype.update=function(){var t=this.style.isChanged()||this.changed;if(concat(this.buttonLayer,this.bitmap).forEach(function(e){e.update()&&(t=!0)},this),!t)return!1;this.changed=!1;var e=this.renderLayer,i=(this.effectShape,this.bitmap),n=this.style.getComputedStyle();this.x=n.x,this.y=n.y,this.rotation=n.rotation,this.buttonLayer.rotation=-n.rotation,this.alpha=1-n.flash%1,e.x=n.offX,e.y=n.offY;var o=this.pid?Localize.cardName(CardInfo[this.pid]):"???";if(n.scaleX>0?this.bitmap.setAltImage(o,this.game.imageManager.getImageByPid(this.pid)):this.bitmap.setAltImage(o,this.game.imageManager.getBackImage(this.isWhiteBack)),e.scaleX=Math.abs(n.scaleX),i.shadow=new createjs.Shadow(n.shadowColor,0,0,n.shadowBlur),n.shine>0){var s=40,a=n.shine*(this.width+s)-s,r=n.shine*(this.height+s)-s,c=a+s,h=r+s;this.effectShape.graphics.clear().beginLinearGradientFill(["rgba(255,255,255,0)","white","rgba(255,255,255,0)"],[0,.5,1],a,r,c,h).drawRect(0,0,this.width,this.height)}return this.zIndex=n.top?512:n.zIndex,this.visible=n.top||!n.covered,!0},Card.prototype.handleMouseover=function(t){this.game.cardDetail.show(this.pid),this.zone.opposite||"HandZone"!==this.zone.name||this.floatup()},Card.prototype.handleMouseout=function(t){this.zone.opposite||"HandZone"!==this.zone.name||this.floatdown()},CardBitmap.prototype=new createjs.Container,CardBitmap.prototype.constructor=CardBitmap,CardBitmap.prototype.setAltImage=function(t,e){t===this.alt&&e===this.img||(this.changed=!0,this.alt=t,this.img=e)},CardBitmap.prototype.setWidthHeight=function(t,e){t===this.width&&e===this.height||(this.changed=!0,this.width=t,this.height=e)},CardBitmap.prototype.update=function(){return this.complete!=this.img.complete&&(this.changed=!0),!!this.changed&&(this.changed=!1,this.complete=this.img.complete,this.text.text=this.alt,this.img.complete&&0!==this.img.naturalWidth?(this.bitmap.image=this.img,this.bitmap.scaleX=this.width/this.img.width,this.bitmap.scaleY=this.height/this.img.height,this.bitmap.visible=!0,this.text.visible=!1):(this.bitmap.visible=!1,this.text.visible=!0),!0)},Style.linear=function(t){return t},Style.prototype.transit=function(t,e,i,n){this.checkSkip&&this.checkSkip()&&(i=0),this.transitingStyle[t].transitTo(e,i,n),this.changed=!0},Style.prototype.set=function(t,e){this.transit(t,e)},Style.prototype.getComputedStyle=function(){var t={};for(var e in this.transitingStyle)t[e]=this.transitingStyle[e].getValue(),this.transitingStyle[e].isDone()||(this.changed=!0);return t},Style.prototype.isChanged=function(){var t=this.changed;return this.changed=!1,t},TransitingValue.linear=function(t){return t},TransitingValue.cubic=function(t){var e=1-t;return 1-e*e*e},TransitingValue.prototype.now=function(){return Date.now()},TransitingValue.prototype.transitTo=function(t,e,i){this.startValue=this.getValue(),this.endValue=t,this.duration=e||0,this.timing=i||TransitingValue.cubic,this.changeTime=this.now(),this.done=!1},TransitingValue.prototype.getValue=function(){var t=this.now(),e=this.changeTime,i=e+1e3*this.duration;if(t=i||this.startValue===this.endValue)return this.done=!0,this.endValue;if(!isNum(this.endValue))return this.startValue;var n=this.timing((t-e)/(i-e));return this.startValue+n*(this.endValue-this.startValue)},TransitingValue.prototype.isDone=function(){return this.done},Zone.prototype=new createjs.Container,Zone.prototype.constructor=Zone,Zone.prototype.sortCards=function(){var t=this.cards.length;this.cards.forEach(function(e,i){e.style.set("zIndex",t-i)},this)},Zone.prototype.addCard=function(t,e){"SigniZone"===this.name&&"LrigZone"===this.name||t.removeStates(),e?this.cards.push(t):this.cards.unshift(t),this.sortCards(),this.updateCardPosition()},Zone.prototype.removeCard=function(t,e){removeFromArr(t,this.cards),this.sortCards(),this.updateCardPosition()},Zone.prototype.getCardIndex=function(t){return this.cards.indexOf(t)},Zone.prototype.updateCardPosition=function(){},Zone.prototype.update=function(){var t=this.cards.filter(function(t){return!t.isSide},this).length;if(this.showAmount&&this._amount!==t){this._amount=t;var e=0===this._amount?"":this._amount;this.setText(e)}var i=this.buttonLayer.update()||this.changed;return this.changed=!1,i},Zone.prototype.addButton=function(t,e){var i=new Button(t,e.bind(this,this));this.buttonLayer.addButton(i)},Zone.prototype.removeButtons=function(){this.buttonLayer.removeAllButtons(),this.checkable&&this.cards.length>1&&("SigniZone"===this.name?this.cards[0].addButton(this.viewCardsButton):this.buttonLayer.addButton(this.viewCardsButton))},Zone.prototype.setText=function(t){if(this.changed=!0,!t)return void(this.text.visible=!1);this.text.visible=!0,this.text.text=t},Zone.prototype.setTextColor=function(t){this.changed=!0,"EnerZone"===this.name?this.text.color="white":this.text.color=t},Zone.prototype.shouldUseDialog=function(){return!1},StackZone.prototype=Object.create(Zone.prototype),StackZone.prototype.constructor=StackZone,StackZone.prototype.updateCardPosition=function(){var t=!1;this.cards.forEach(function(e,i){e.moveTo(this.x,this.y,t,!!i),e.x===this.x&&e.y===this.y&&(t=!0)},this)},StackZone.prototype.addViewCardsButton=function(){this.buttonLayer.addButton(this.viewCardsButton)},Zone.prototype.addStates=function(t){this.changed=!0,this.stateLayer.visible=!0,t.forEach(function(t){var e=this.stateShape.graphics,i=Card.WIDTH,n=Card.HEIGHT;"powerDown"===t?e.f("rgba(164,96,222,0.3)").r(-i/2,-n/2,i,n):"disabled"===t?e.f("rgba(0,0,0,0.7)").r(-i/2,-n/2,i,n):"infected"===t&&e.f("rgba(255,0,0,0.3)").r(-i/2,-n/2,i,n)},this)},Zone.prototype.removeStates=function(){this.changed=!0,this.stateLayer.visible=!1,this.stateShape.graphics.clear()},StackZone.prototype.update=function(){var t=this.changed;return this.showPower?(this._amount!==this.cards.length&&(this._amount=this.cards.length,this.power=this._power=0,this.setText("")),this._power!==this.power&&(this._power=this.power,this.setText(this._power))):Zone.prototype.update.call(this)&&(t=!0),this.changed=!1,t},TileZone.prototype=Object.create(Zone.prototype),TileZone.prototype.constructor=TileZone,TileZone.prototype.updateCardPosition=function(){if(this.cards.length){var t,e=this.spacing;t=this.horizontal?this.up?Card.WIDTH:Card.HEIGHT:this.up?Card.HEIGHT:Card.WIDTH;var i,n,o=this.opposite?-1:1;(t+e)*this.cards.length-e<=this.width?(n=t+e,i=this.center?-n*(this.cards.length-1)/2:t/2):(n=(this.width-t)/(this.cards.length-1),i=this.center?t/2-this.width/2:t/2);var s=this.cards.length;this.horizontal?this.cards.forEach(function(t,e){var a=s-e-1;t.moveTo(this.x+o*(i+a*n),this.y)},this):this.cards.forEach(function(t,e){var a=s-e-1;t.moveTo(this.x,this.y+o*(i+a*n))},this)}},TileZone.prototype.update=function(){return this.buttonLayer.visible=this.cards.length>4,Zone.prototype.update.call(this)},Game.prototype.setSid=function(t,e){t.sid=e,this.objList[e]=t},Game.prototype.getObjBySid=function(t){return this.objList[t]},Game.prototype.addCard=function(t){this.cards.push(t),this.cardLayer.addChild(t)},Game.prototype.addZone=function(t){this.zones.push(t),this.zoneLayer.addChild(t)},Game.prototype.handleInit=function(t){function e(t,e){this.setSid(t.mainDeck,e.mainDeck),this.setSid(t.lrigDeck,e.lrigDeck),this.setSid(t.handZone,e.handZone),this.setSid(t.lrigZone,e.lrigZone),this.setSid(t.signiZones[0],e.signiZones[0]),this.setSid(t.signiZones[1],e.signiZones[1]),this.setSid(t.signiZones[2],e.signiZones[2]),this.setSid(t.enerZone,e.enerZone),this.setSid(t.checkZone,e.checkZone),this.setSid(t.trashZone,e.trashZone),this.setSid(t.lrigTrashZone,e.lrigTrashZone),this.setSid(t.lifeClothZone,e.lifeClothZone),this.setSid(t.excludedZone,e.excludedZone),e.mainDeckCards.forEach(function(e){var i=new Card(this,!1);this.setSid(i,e),i.move(0,t.mainDeck,!0,!1,!1)},this),e.lrigDeckCards.forEach(function(i,n){var o=new Card(this,!0);this.setSid(o,i);var s=e.lrigDeckCardInfos[n];o.move(s.pid,t.lrigDeck,!0,!1,!1,s.isSide)},this)}return this.setSid(this.player,t.player),this.setSid(this.opponent,t.opponent),e.call(this,this.player,t.playerZones),e.call(this,this.opponent,t.opponentZones),!0},Game.prototype.handleSetColor=function(t){document.body.setAttribute("self",t.selfColor),document.body.setAttribute("opponent",t.opponentColor);var e={white:"black",black:"yellow",red:"white",blue:"yellow",green:"white"};this.zones.forEach(function(i){var n=i.opposite?e[t.opponentColor]:e[t.selfColor];i.setTextColor(n)},this);var i=this.audio;return i.bgmFadeOut(function(){i.playBgm(t.selfColor)}),!0},Game.prototype.handlePackedMsgStart=function(){return this._packageCount++,!0},Game.prototype.handlePackedMsgEnd=function(){return this._packageCount--,!0},Game.prototype.handleMoveCard=function(t){var e=this.getObjBySid(t.card),i=this.getObjBySid(t.zone);return e.move(t.pid,i,t.up,t.faceup,t.bottom,t.isSide),!1},Game.prototype.handleUpCard=function(t){return this.getObjBySid(t.card).up(),!1},Game.prototype.handleDownCard=function(t){ -return this.getObjBySid(t.card).down(),!1},Game.prototype.handleFaceupCard=function(t){var e=this.getObjBySid(t.card);return e.pid=t.pid,e.faceup(),!1},Game.prototype.handleFacedownCard=function(t){return this.getObjBySid(t.card).facedown(),!1},Game.prototype.handleShuffle=function(t){return t.cards.forEach(function(t){this.getObjBySid(t).pid=0},this),!0},Game.prototype.handleSelect=function(t){return console.log(t),!!this.skip||(this.selector.addMsg(t),!0)},Game.prototype.handlePayEner=function(t){if(console.log("handlePayEner",t),this.skip)return!0;var e=t.cards.map(function(t){return this.getObjBySid(t)},this),i=this,n=null;return t.cancelable&&(n=function(){i.input("PAY_ENER",null)}),this.dialog.selectEner(Localize("buttonTitle","PAY_ENER"),e,t.colors,t,function(t){i.input("PAY_ENER",t)},n),!0},Game.prototype.handleShowCards=function(t){if(this.skip)return!0;var e=t.cards.map(function(e,i){var n=this.getObjBySid(e);return n.pid=t.pids[i],n},this),i=this,n=t.label||"CONFIRM";return this.dialog.showCards(Localize("buttonTitle",n),e,function(){i.input("OK")}),!0},Game.prototype.handleShowCardsById=function(t){if(this.skip)return!0;var e=t.ids.map(function(t,e){return{pid:t}},this),i=this,n=t.label||"CONFIRM";return this.dialog.showCards(Localize("buttonTitle",n),e,function(){i.input("OK")}),!0},Game.prototype.handleShowColors=function(t){if(this.skip)return!0;var e=t.colors.map(function(t){return Localize.color(t)}),i=this;return this.dialog.showText(Localize("buttonTitle","COLOR"),e.join(","),function(){i.input("OK")}),!0},Game.prototype.handleShowTypes=function(t){if(this.skip)return!0;var e=t.types.map(function(t){return Localize("cardType",t)}),i=this;return this.dialog.showText(Localize("prop","cardType"),e.join(","),function(){i.input("OK")}),!0},Game.prototype.handleShowEffects=function(t){if(this.skip)return!0;var e=t.effects.map(function(t){return Localize.desc(t)}).join("\n"),i=this;return this.dialog.showText(Localize("gameText","SHOW_EFFECTS_DIALOG_TITLE"),e,function(){i.input("OK")}),!0},Game.prototype.handleShowText=function(t){if(this.skip)return!0;var e="";"number"===t.type?e=t.content:"text"===t.type&&(e=Localize("gameText",t.content));var i=this;return this.dialog.showText(Localize.labelToDialogTitle(t.title),e,function(){i.input("OK")}),!0},Game.prototype.handleInformCards=function(t){return t.cards.forEach(function(e,i){this.getObjBySid(e).pid=t.pids[i]},this),!0},Game.prototype.handleCardStates=function(t){var e=t.signiInfos,i=t.lrigInfos,n=t.zoneInfos;return e.forEach(function(t){var e=this.getObjBySid(t.card);e.zone.power=t.power,e.removeStates(),e.addStates(t.states)},this),i.forEach(function(t){var e=this.getObjBySid(t.card);e.removeStates(),e.addStates(t.states)},this),n&&n.forEach(function(t){var e=this.getObjBySid(t.zone);e.removeStates(),e.addStates(t.states)},this),!0},Game.prototype.handleActivate=function(t){return this.getObjBySid(t.card).shine(),!1},Game.prototype.handleCardSelected=function(t){return this.getObjBySid(t.card).flash(),!1},Game.prototype.handleSelectNumber=function(t){if(this.skip)return!0;var e=t.label,i=t.min,n=t.max,o=t.defaultValue||0,s=Localize.labelToDialogTitle(e),a=this;return this.dialog.selectNumber(s,i,n,o,!1,function(t){a.input(e,t)}),!0},Game.prototype.handleSelectText=function(t){if(this.skip)return!0;var e=t.label,i=Localize.labelToDialogTitle(e),n=t.type||"gameText",o=t.texts.map(function(t){return Localize(n,t)},this),s=this;return this.dialog.selectText(i,o,!1,function(t){s.input(e,t)}),!0},Game.prototype.handleSelectCardId=function(t){if(this.skip)return!0;try{var e=this,i=t.label,n=Localize.labelToDialogTitle(i);this.dialog.selectCardId(n,function(t){e.input(i,t)})}catch(t){window.alert(t.name+t.message)}return!0},Game.prototype.handleCoinChange=function(t){return(t.player===this.player.sid?this.player:this.opponent).coinZone.setText("Coin"+t.coin),!0},Game.prototype.handleConfirm=function(t){if(this.skip)return!0;var e=Localize.labelToDialogTitle("CONFIRM"),i=Localize("gameText",t.text),n=this;return this.dialog.confirm(e,i,function(t){n.input("OK",t)}),!0},Game.prototype.handleWin=function(t){this.win()},Game.prototype.win=function(t){this.ongameover(!0,t,this.getMessagePacks())},Game.prototype.handleLose=function(t){this.lose()},Game.prototype.lose=function(t){this.ongameover(!1,t,this.getMessagePacks())},Game.prototype.getMessagePacks=function(){return this.io.getDatas()},Game.prototype.handleMsg=function(t){if(!t)return!1;var e={INIT:this.handleInit,SET_COLOR:this.handleSetColor,PACKED_MSG_START:this.handlePackedMsgStart,PACKED_MSG_END:this.handlePackedMsgEnd,MOVE_CARD:this.handleMoveCard,UP_CARD:this.handleUpCard,DOWN_CARD:this.handleDownCard,FACEUP_CARD:this.handleFaceupCard,FACEDOWN_CARD:this.handleFacedownCard,SHUFFLE:this.handleShuffle,SELECT:this.handleSelect,PAY_ENER:this.handlePayEner,SHOW_CARDS:this.handleShowCards,SHOW_CARDS_BY_ID:this.handleShowCardsById,SHOW_COLORS:this.handleShowColors,SHOW_TYPES:this.handleShowTypes,SHOW_EFFECTS:this.handleShowEffects,SHOW_TEXT:this.handleShowText,INFORM_CARDS:this.handleInformCards,CARD_STATES:this.handleCardStates,ACTIVATE:this.handleActivate,CARD_SELECTED:this.handleCardSelected,SELECT_NUMBER:this.handleSelectNumber,SELECT_TEXT:this.handleSelectText,SELECT_CARD_ID:this.handleSelectCardId,CONFIRM:this.handleConfirm,COIN_CHANGE:this.handleCoinChange,WIN:this.handleWin,LOSE:this.handleLose},i=e[t.type];return i?i.call(this,t.content)||this.skip:(console.warn(t),window.alert('Unknown message type: "'+t.type+'" .'),!0)},Game.prototype.handleMsgQueue=function(){if(this.msgQueue.length){this.buttonZone.setText(""),this.background.setWaiting(!1);for(var t,e=!0;(t=this.msgQueue.shift())&&(this.handleMsg(t)||(e=!1),e||this._packageCount););this.msgQueue.length||this.handleIdle()}},Game.prototype.handleIdle=function(){this.selector.removeButtons(),this.selector.showButtons(),this.selector.autoPop(),this.selector.msgs.length||(this.buttonZone.setText(Localize.waitingMsg()),this.background.setWaiting(!0)),this.onidle&&this.onidle()},Game.prototype.addMsgs=function(t){this.selector.clear(),this.msgQueue=this.msgQueue.concat(t),t.length||this.handleIdle()},Game.prototype.input=function(t,e){void 0===e&&(e=[]),this.removeButtons(),this.io.send({label:t,input:e}),this.background.setWaiting(!0)},Game.prototype.removeButtons=function(){this.cards.forEach(function(t){t.removeButtons()},this),this.zones.forEach(function(t){t.removeButtons()},this)},Game.prototype.update=function(){var t=!1;concat(this.cards,this.zones,this.background).forEach(function(e){e.update()&&(t=!0)},this),t?(this.cardLayer.sortChildren(function(t,e){return t.zIndex-e.zIndex}),this.stage.update()):this.handleMsgQueue()},Game.prototype.initZones=function(){this.player={enerZone:new TileZone({game:this,name:"EnerZone",x:92,y:377,up:!1,horizontal:!1,center:!1,width:259,spacing:5,showAmount:!0,checkable:!0}),signiZones:[new StackZone({game:this,name:"SigniZone",x:190,y:421,checkable:!0,showPower:!0}),new StackZone({game:this,name:"SigniZone",x:288,y:421,checkable:!0,showPower:!0}),new StackZone({game:this,name:"SigniZone",x:386,y:421,checkable:!0,showPower:!0})],mainDeck:new StackZone({game:this,name:"MainDeck",x:471.5,y:421,showAmount:!0}),lrigDeck:new StackZone({game:this,name:"LrigDeck",x:544.5,y:421,showAmount:!0,checkable:!0}),checkZone:new StackZone({game:this,name:"CheckZone",x:190,y:519}),lrigZone:new StackZone({game:this,name:"LrigZone",x:288,y:519,showAmount:!0}),trashZone:new StackZone({game:this,name:"TrashZone",x:471.5,y:519,showAmount:!0,checkable:!0}),lrigTrashZone:new StackZone({game:this,name:"LrigTrashZone",x:544.5,y:519,showAmount:!0,checkable:!0}),lifeClothZone:new TileZone({game:this,name:"LifeClothZone",x:158.5,y:604.5,up:!1,horizontal:!0,center:!1,width:3*Card.HEIGHT,spacing:2*-Card.HEIGHT/3,showAmount:!0}),coinZone:new StackZone({game:this,name:"CoinZone",x:471.5,y:604.5,centerText:!0}),excludedZone:new StackZone({game:this,name:"ExcludedZone",x:617.5,y:421}),handZone:new TileZone({game:this,name:"HandZone",x:288,y:690,up:!0,horizontal:!0,center:!0,width:576,spacing:8})},this.opponent={enerZone:new TileZone({game:this,name:"EnerZone",x:484,y:357,opposite:!0,up:!1,horizontal:!1,center:!1,width:259,spacing:5,showAmount:!0,checkable:!0}),signiZones:[new StackZone({game:this,name:"SigniZone",x:386,y:313,checkable:!0,showPower:!0,opposite:!0}),new StackZone({game:this,name:"SigniZone",x:288,y:313,checkable:!0,showPower:!0,opposite:!0}),new StackZone({game:this,name:"SigniZone",x:190,y:313,checkable:!0,showPower:!0,opposite:!0})],mainDeck:new StackZone({game:this,name:"MainDeck",x:104.5,y:313,showAmount:!0,opposite:!0}),lrigDeck:new StackZone({game:this,name:"LrigDeck",x:31.5,y:313,showAmount:!0,opposite:!0}),lrigZone:new StackZone({game:this,name:"LrigZone",x:288,y:215,showAmount:!0,opposite:!0}),checkZone:new StackZone({game:this,name:"CheckZone",x:386,y:215,opposite:!0}),trashZone:new StackZone({game:this,name:"TrashZone",x:104.5,y:215,showAmount:!0,opposite:!0,checkable:!0}),lrigTrashZone:new StackZone({game:this,name:"LrigTrashZone",x:31.5,y:215,showAmount:!0,opposite:!0,checkable:!0}),lifeClothZone:new TileZone({game:this,name:"LifeClothZone",x:417.5,y:129.5,opposite:!0,up:!1,horizontal:!0,center:!1,width:3*Card.HEIGHT,spacing:2*-Card.HEIGHT/3,showAmount:!0}),coinZone:new StackZone({game:this,name:"CoinZone",x:104.5,y:129.5,centerText:!0}),excludedZone:new StackZone({game:this,name:"ExcludedZone",x:-41.5,y:313,opposite:!0}),handZone:new TileZone({game:this,name:"HandZone",x:288,y:44,opposite:!0,up:!0,horizontal:!0,center:!0,width:576,spacing:8})},this.buttonZone=new StackZone({game:this,name:"ButtonZone",x:386,y:519,centerText:!0}),this.player.coinZone.text.font="14px monospace",this.opponent.coinZone.text.font="14px monospace"},Button.HEIGHT=11,Button.prototype=new createjs.Container,Button.prototype.constructor=Button,Button.prototype.toDefaultStyle=function(){this.changed=!0,this.text.color="#444",this.background.graphics.clear().beginStroke("#c0c0c0").beginLinearGradientFill(["#ededed","#ededed","#dedede"],[0,.38,1],0,0,0,this.height).drawRoundRect(0,0,this.width,this.height,2)},Button.prototype.toHoverStyle=function(){this.changed=!0,this.text.color="#000",this.background.graphics.clear().beginStroke("#afafaf").beginLinearGradientFill(["#f0f0f0","#f0f0f0","#e0e0e0"],[0,.38,1],0,0,0,this.height).drawRoundRect(0,0,this.width,this.height,2)},Button.prototype.update=function(){var t=this.changed;return this.changed=!1,t},ButtonList.prototype=new createjs.Container,ButtonList.prototype.constructor=ButtonList,ButtonList.prototype.addButton=function(t){this.changed=!0,this.buttons.push(t),this.addChild(t)},ButtonList.prototype.setButtonPositions=function(){var t=-this.buttons.length/2+.5;this.buttons.forEach(function(e,i){e.x=0,e.y=(t+i)*e.height})},ButtonList.prototype.removeButton=function(t){removeFromArr(t,this.buttons),this.removeChild(t)&&(this.changed=!0)},ButtonList.prototype.removeAllButtons=function(){this.buttons.length&&(this.changed=!0,this.buttons.length=0,this.removeAllChildren())},ButtonList.prototype.update=function(){this.changed&&this.setButtonPositions();var t=this.changed;return this.buttons.forEach(function(e){e.update()&&(t=!0)}),this.changed=!1,t},Selector.prototype.addMsg=function(t){this.msgs.push(this.parseMsg(t))},Selector.prototype.parseMsg=function(t){var e={label:t.label,min:t.min,max:t.max,careOrder:t.careOrder};return e.title=Localize.labelToTitle(t.label),e.cards=t.options.map(function(t){return this.game.getObjBySid(t)},this),e.extraCards=t.extraCards.map(function(e,i){var n=this.game.getObjBySid(e);return n.pid=t.extraPids[i],n},this),e.extraCards.length||(e.extraCards=e.cards.slice()),e.descriptions=t.descriptions.map(function(t){return Localize.desc(t)},this),e},Selector.prototype.showButtons=function(){this.msgs.forEach(function(t){var e=t.extraCards;if(e.length)if("USE_ACTION_EFFECT"===t.label){var i=[];t.cards.forEach(function(e,n){var o,s=t.descriptions[n];o=e.shouldUseDialog()?e.zone.constructor===TileZone?this.game.buttonZone:e.zone:e,"EnerZone"===e.zone.name&&(o=e.zone.cards.length>4?e.zone:e);for(var a,r=0;r=t.max)return void this.send(t);this.removeButtons(),this.showMsgButtons(t)}},Selector.prototype.selectBind=function(t,e){return this.select.bind(this,t,e)},Selector.prototype.unselect=function(t,e){this.spectating||(removeFromArr(e,this.selectedIndexes),this.removeButtons(),this.selectedIndexes.length?this.showMsgButtons(t):this.showButtons())},Selector.prototype.unselectBind=function(t,e){return this.unselect.bind(this,t,e)},Selector.prototype.showMsgButtons=function(t){if(t.cards.forEach(function(e,i){inArr(i,this.selectedIndexes)?e.addButton("-"+t.title,this.unselectBind(t,i)):e.addButton(t.title,this.selectBind(t,i))},this),this.selectedIndexes.length>=t.min){var e;e=this.selectedIndexes.length?Localize("buttonTitle","END_SELECT"):Localize.giveUp(t.label),this.game.buttonZone.addButton(e,this.sendBind(t))}},Selector.prototype.send=function(t,e){this.spectating||(isArr(e)||(e=this.selectedIndexes),this.game.input(t.label,e.slice()),console.log('game.input("'+t.label+'",['+e.toString()+"]);"),this.clear())},Selector.prototype.sendBind=function(t){return this.send.bind(this,t)},Selector.prototype.popDialog=function(t){var e=Localize.labelToDialogTitle(t.label),i=t.extraCards,n={min:t.min,max:t.max,texts:t.descriptions,canClose:!0,careOrder:t.careOrder,targets:t.cards};this.game.dialog.selectSomeCards(e,i,n,this.sendBind(t))},Selector.prototype.popDialogBind=function(t){return this.popDialog.bind(this,t)},Selector.prototype.removeButtons=function(){this.game.removeButtons()},Selector.prototype.autoPop=function(){if(1===this.msgs.length&&this._autoPopMsg){if("SPELL_CUT_IN"===this._autoPopMsg.label)return;this.popDialog(this._autoPopMsg)}},Selector.prototype.clear=function(){this.removeButtons(),this.game.dialog.close(),this.selectedIndexes.length=0,this.msgs.length=0,this._autoPopMsg=null},Dialog.prototype.newElement=function(t){return document.createElement(t)},Dialog.prototype.newCardImg=function(t){var e=this.newElement("img");return e.src=this.game.imageManager.getUrlByPid(t),e},Dialog.prototype.mouseover=function(t,e){t.onmouseover=this.game.cardDetail.show.bind(this.game.cardDetail,e)},Dialog.prototype.center=function(t){var e=t.parentElement;t.style.top="0",t.style.left="0",t.style.top=(e.offsetHeight-t.offsetHeight)/2+"px",t.style.left=(e.offsetWidth-t.offsetWidth)/2+"px"},Dialog.prototype.pop=function(t,e,i,n,o,s){var a=this;this.titleDiv.textContent=t,this.footSpan.innerHTML="",i&&this.footSpan.appendChild(i),this.bodyDiv.innerHTML="",this.bodyDiv.style.width="",this.bodyDiv.appendChild(e),this.closeIcon.style.display=n?"":"none",o?(this.okBtn.onclick=function(t){a.close(),o()},this.footerDiv.style.display=""):(this.okBtn.onclick=null,this.footerDiv.style.display="none"),s?(this.cancelBtn.onclick=function(t){a.close(),s()},this.cancelBtn.style.display=""):(this.cancelBtn.onclick=null,this.cancelBtn.style.display="none"),this.warpDiv.style.opacity="0",this.warpDiv.style.display="",this.center(this.dialogDiv),this.warpDiv.style.opacity="1"},Dialog.prototype.close=function(){this.okBtn.disabled=!1,this.warpDiv.style.display="none"},Dialog.prototype.showText=function(t,e,i){var n=document.createTextNode(e);this.pop(t,n,null,!1,i)},Dialog.prototype.confirm=function(t,e,i){var n=document.createTextNode(e);this.pop(t,n,null,!1,i.bind(null,!0),i.bind(null,!1))},Dialog.prototype.selectText=function(t,e,i,n){var o=this,s=this.newElement("div");e.forEach(function(t,e){var i=this.newElement("div");i.classList.add("option"),i.textContent=t,s.appendChild(i),i.onclick=function(t){o.close(),n(e)}},this),this.pop(t,s,null,i,null)},Dialog.prototype.selectNumber=function(t,e,i,n,o,s){for(var a=this.newElement("div"),r=this.newElement("select"),c=e;c<=i;c++){var h=this.newElement("option");h.value=c,h.textContent=c,r.appendChild(h)}r.value=n,a.appendChild(r),this.pop(t,a,null,o,function(){s(r.value)})},Dialog.prototype.showCards=function(t,e,i){var n=this.newElement("div");e.length?e.forEach(function(t){var e=this.newElement("div"),i=this.newCardImg(t.pid);e.appendChild(i),e.classList.add("card"),this.mouseover(e,t.pid),n.appendChild(e)},this):n.textContent=Localize("common","NO_CARDS"),this.pop(t,n,null,!1,i)},Dialog.prototype.selectCardId=function(t,e){function i(){var t=c.value;d=a.search(t),n()}function n(){p=0,h.innerHTML="",o()}function o(){for(var t=0;t=d.length)break;var n=d[i].pid,o=s.newElement("div"),a=s.newCardImg(n);o.appendChild(a),o.classList.add("card"),s.mouseover(o,n),o.onclick=function(t){s.close(),e(t)}.bind(null,n),h.appendChild(o),p++}}var s=this,a=this.searcher,r=this.newElement("div");r.style.textAlign="center";var c=this.newElement("input");c.setAttribute("placeholder","Search..."),c.type="text",c.style.textAlign="center",c.style.width="90%";var h=this.newElement("div");h.style.maxHeight="450px",h.style["overflow-y"]="auto",h.style.textAlign="left";var l=this.newElement("div");l.textContent="Show More...",l.style.color="blue",l.style.cursor="pointer",l.style.margin="1em 0",r.appendChild(c),r.appendChild(h),r.appendChild(l);var d=[],u=9,p=0;l.onclick=o,c.onchange=c.onkeyup=i,i(),this.pop(t,r,null,!1,null),r.style.minWidth=r.offsetWidth+"px",c.focus()},Dialog.prototype.selectCard=function(t,e,i,n){var o=this,s=this.newElement("div");e.forEach(function(t,e){var i=this.newElement("div"),a=this.newCardImg(t.pid);i.appendChild(a),i.classList.add("card"),this.mouseover(i,t.pid),i.onclick=function(t){o.close(),n(e)},s.appendChild(i)},this),this.pop(t,s,null,i,null)},Dialog.prototype.selectCardAdvanced=function(t,e,i,n,o,s,a,r){function c(){u.forEach(function(t,e){t.opt.classList.remove("disabled")},this);var t=s(d,h);l.okBtn.disabled=!t,o&&u.forEach(function(t,e){var i=d.indexOf(e)+1;t.num.textContent=i||"",l.center(t.num)},this)}function h(t){u[t].opt.classList.add("disabled")}i||(i=[]);var l=this,d=[],u=[],p=this.newElement("div");e.forEach(function(t,e){var n=this.newElement("div"),o=this.newCardImg(t.pid),s=this.newElement("div");s.textContent=i[e]||"";var a=this.newElement("div"),r=this.newElement("div");n.appendChild(o),n.appendChild(s),n.appendChild(a),n.appendChild(r),n.classList.add("card"),s.classList.add("txt"),a.classList.add("msk"),r.classList.add("num"),this.mouseover(n,t.pid);var h={opt:n,txt:s,msk:a,num:r};u[e]=h,n.onclick=function(t){!n.classList.contains("selected")&&n.classList.contains("disabled")||(n.classList.contains("selected")?removeFromArr(e,d):d.push(e),n.classList.toggle("selected"),c())},p.appendChild(n)},this),c(),l.pop(t,p,null,n,a.bind(null,d),r),u.forEach(function(t){this.center(t.txt)},this)},Dialog.prototype.selectSomeCards=function(t,e,i,n){var o=i.min||0,s=i.max;s||(s=i.targets?i.targets.length:e.length);var a,r=i.texts,c=i.canClose,h=i.careOrder,l=i.targets;a=o?null:n.bind(null,[]),this.selectCardAdvanced(t,e,r,c,h,function(t,i){l&&l.length&&e.forEach(function(t,e){inArr(t,l)||i(e)},this);var n=t.length;return n>=s?(e.forEach(function(t,e){i(e)},this),!0):n&&n>=o},function(t){l&&l.length&&l.length!==e.length&&(t=t.map(function(t){return l.indexOf(e[t])})),n(t)},a)},Dialog.prototype.selectEner=function(t,e,i,n,o,s){function a(t,o){var s={},a=0;if(["colorless","white","black","red","blue","green","multi"].forEach(function(t){s[t]=n[t]||0,a+=s[t]},this),t.length>=a)return e.forEach(function(t,e){o(e)},this),!0;var r=[];if(t.forEach(function(t){var e=i[t];if("multi"!==e)return isArr(e)?void r.push(e):void(s[e]>0?s[e]-=1:s.colorless-=1)},this),r.forEach(function(t){for(var e=0;e0)return void(s[i]-=1)}s.colorless-=1}),s.colorless>0)return!1;e.forEach(function(t,e){var n=i[e];if("multi"!==n){if(isArr(n)){if(n.some(function(t){return s[t]>0}))return;return o(e)}s[n]||o(e)}},this)}var r=e.map(function(t){return t.sid===n.source?"WARN":""},this);this.selectCardAdvanced(t,e,r,!1,!1,a,o,s)},GameBackground.prototype=new createjs.Container,GameBackground.prototype.constructor=GameBackground,GameBackground.prototype.setWaiting=function(t){t?this.mask.graphics.clear().beginFill("rgba(0,0,0,0.25)").drawRect(0,0,this.width,this.height):this.mask.graphics.clear(),this.changed=!0},GameBackground.prototype.update=function(){var t=this.changed;return this.changed=!1,t},window.FakeSocket=function(){function t(t){this._win=t,this._listeners={},this.id="<"+e.push(this)+">",this.io={reconnection:function(){},opts:{query:""}}}var e=[];return window.addEventListener("message",function(t){var i=t.source,n=t.data.name,o=t.data.data;"tick"!==n&&"tock"!==n&&console.log(JSON.stringify(t.data));for(var s=0;s64&&this.dialogue.removeChild(this.dialogue.firstChild),this.dialogue.scrollTop=this.dialogue.scrollHeight},ChatManager.prototype.clear=function(){this.dialogue.innerHTML=""};var $=document.getElementById.bind(document);window.applicationCache&&(applicationCache.addEventListener("progress",function(t){if($("div-notice").classList.add("shown"),t.loaded===t.total){$("div-notice").classList.add("green");var e=document.createElement("a");e.href=location.href,e.textContent=Localize.index("UPDATE_READY"),$("span-notice").innerHTML="",$("span-notice").appendChild(e)}else{var i=(t.loaded/t.total*100).toFixed(0)+"%";$("span-notice").textContent=Localize.index("UPDATING")+i}},!1),applicationCache.addEventListener("error",function(t){console.warn(t)},!1));var VERSION=68,serverVersion,clientId=0,game=null,position="",mayusRoom=!0,inroom=!1,blocking=!1,roomMsgObj=null,audio=new GameAudio,msgBox=new MessageBox,deckManager=new DeckManager,socket;if("?local=true"===location.search)socket=new FakeSocket(window.opener),window.socket=socket,window.game=game;else{console.log=function(){window._lastLog=arguments};var host=getProxy();host||(host=/:\d*$/.test(location.host)?location.host.replace(/:\d*$/,":2015"):location.host+":2015");var url=location.protocol+"//"+host;socket=io(url,{reconnection:!1,reconnectionDelay:3e3,reconnectionDelayMax:3e4,reconnectionAttempts:10})}"?debug"===location.search&&(window.socket=socket);var chatManager=new ChatManager(socket);$("span-set-proxy").onclick=function(){$("select-proxy").value=getProxy(),msgBox.preset("proxy")},$("proxy-button-ok").onclick=function(){var t=$("select-proxy").value;if(getProxy()===t)return void msgBox.close();localStorage.setItem("proxy",t),reload()},$("select-proxy").onchange=function(){"provide"===$("select-proxy").value&&msgBox.alert(Localize.index("PROVIDE_PROXY_SERVER"))},createjs.Ticker.on("tick",function(t){game&&game.update()}),initLanguage(),initInputValues(),initHall(),$("select-language").onchange=function(){Localize.setLanguage($("select-language").value),Localize.DOM("index")},socket.on("error",function(t){if(audio.playBgm(),"MAX_SOCKETS_PER_IP"===t||"MAX_SOCKETS"===t)return void msgBox.alert(t);msgBox.alert(Localize.index("NET_WORK_ERROR"),reload)}),socket.on("disconnect",function(t){console.log("disconnect"),socket.io.reconnection()?msgBox.preset("reconnect"):(game=null,audio.playBgm(),msgBox.alert(Localize.index("DISCONNECTED"),reload))}),socket.on("reconnect_failed",function(t){msgBox.alert("RECONNECT_FAILED",reload)}),socket.on("reconnect_attempt",function(){console.log("reconnect_attempt"),socket.io.opts.query="clientId="+clientId}),socket.on("reconnect",function(t){console.log("reconnect")}),socket.on("error message",function(t){msgBox.alert(t)}),socket.on("client id",function(t){clientId=t,console.log("clientId = %s",t)}),socket.on("game reconnect",function(){console.log("game reconnect"),msgBox.close(),game.io.resend()}),socket.on("game reconnect failed",function(){console.log("game reconnect failed"),msgBox.alert(Localize.index("DROPPED"),initHall)}),socket.on("wait for reconnect",function(){console.log("wait for reconnect"),socket.io.reconnection(!1),enable($("wait-for-reconnect-button-drop"),!isSpectator()),msgBox.preset("wait-for-reconnect")}),$("wait-for-reconnect-button-drop").onclick=function(t){disable(this),socket.emit("drop")},socket.on("opponent reconnect",function(){console.log("opponent reconnect"),socket.io.reconnection(!0),msgBox.close()}),socket.on("version",function(t){serverVersion=t}),socket.on("game start",function(t){gameStart()}),socket.on("update room list",function(t){$("room-list").innerHTML="";var e=[];t.forEach(function(t){var i=document.createElement("li");t.mayusRoom||i.classList.add("no-mayus-room"),t.live?(i.textContent=t.roomName,i.classList.add("live"),i.onclick=watchLive.bind(null,t.roomName),e.push(i)):(i.textContent=t.roomName+" ("+t.count+"/"+t.total+")",t.passwordRequired&&i.classList.add("password-required"),i.onclick=joinRoom.bind(null,t.roomName,t.passwordRequired),$("room-list").appendChild(i))}),e.forEach(function(t){$("room-list").appendChild(t)})}),socket.on("update online counter",function(t){$("span-online-counter").textContent=t}),function(){function t(){i=!1,e=Date.now(),socket.emit("tick"),setTimeout(function(){i||($("span-latency").classList.add("warn"),$("span-latency").textContent=">500ms")},1e3)}var e=0,i=!1;socket.on("tock",function(){i=!0;var n=Math.round((Date.now()-e)/2);n<500&&($("span-latency").textContent=n+"ms",$("span-latency").classList.remove("warn")),setTimeout(t,1e3)}),t()}();for(var elements=[$("room-guest-nickname")],i=0;i<5;i++){elements.push($("host-spectator-"+i)),elements.push($("guest-spectator-"+i));var checkbox=$("checkbox-spectator-"+i);checkbox.onchange=function(t,e){if(blocking)return e.returnValue=!1;this.checked?socket.emit("unlockSpec",t):socket.emit("lockSpec",t),blocking=!0}.bind(checkbox,i)}socket.on("update room",function(t){roomMsgObj=t,updateRoom(t)}),socket.on("host left",function(){initHall()}),socket.on("kicked",function(){initHall()}),$("span-leave-room").onclick=function(){socket.emit("leaveRoom"),initHall()},socket.on("wrong password",function(){msgBox.alert(Localize.index("WRONG_PASSWORD"))}),socket.on("host disconnected",function(){if(game){var t=Localize.index("OPPONENT_DISCONNECTED");"host-spectator"===position&&(t=Localize.index("SELF_DISCONNECTED")),msgBox.alert(t,initHall)}else initHall()}),socket.on("guest disconnected",function(){var t=Localize.index("OPPONENT_DISCONNECTED");"guest-spectator"===position&&(t=Localize.index("SELF_DISCONNECTED")),msgBox.alert(t,initHall)}),$("span-surrender").onclick=function(){game&&msgBox.confirm(Localize.index("CONFIRM_SURRENDER"),function(t){t&&socket.emit("surrender")})},$("span-leave-game").onclick=function(){game&&(playingReplay||socket.emit("leaveRoom"),initHall())},socket.on("surrendered",function(){game&&game.lose(!0)}),socket.on("opponent surrendered",function(){game&&game.win(!0)}),$("button-create-room").onclick=function(t){if(checkVersion()){if(!$("input-nickame").value)return void msgBox.alert(Localize.index("PLEASE_INPUT_A_NICKNAME"),function(){$("input-nickame").focus()});if(!$("input-room-name").value)return void msgBox.alert(Localize.index("PLEASE_INPUT_A_ROOM_NAME"),function(){$("input-room-name").focus()});mayusRoom=$("checkbox-mayus-room").checked,initDeckOptions()&&(localStorage.setItem("room name",$("input-room-name").value),localStorage.setItem("nickname",$("input-nickame").value),localStorage.setItem("password",$("input-create-room-password").value),socket.emit("createRoom",{roomName:$("input-room-name").value,nickname:$("input-nickame").value,password:$("input-create-room-password").value,mayusRoom:mayusRoom}))}},$("input-ready").onchange=function(t){if(blocking)return t.returnValue=!1;if($("input-ready").checked){var e=deckManager.loadDeck($("select-decks").value);if(!e)return void msgBox.alert(Localize.index("FAILED_TO_READ_DECK"),function(){$("input-ready").checked=!1});disable($("select-decks")),socket.emit("ready",e),blocking=!0}else enable($("select-decks")),socket.emit("unready"),blocking=!0},$("button-start-game").onclick=function(t){if(blocking)return t.returnValue=!1;var e=deckManager.loadDeck($("select-decks").value);if(!e)return void msgBox.alert(Localize.index("FAILED_TO_READ_DECK"));var i=e;i.live=$("input-live").checked,localStorage.setItem("live",i.live),socket.emit("startGame",i),blocking=!0},$("link-edit-deck").onclick=function(t){return window.open($("link-edit-deck").href),t.preventDefault(),!1};var oldRoomName="";$("room-name").onblur=handleRenameRoom, -$("room-name-form").onsubmit=handleRenameRoom;var stopFetchingLive=0,watchingLive=!1;socket.on("liveData",function(t){return stopFetchingLive?void stopFetchingLive--:t?(msgBox.close(),watchingLive=!0,gameStart("live"),game.skip=!0,t.forEach(function(t,e){game.io.receiveGameMessage({buffer:[{id:e,data:t}]})}),game.handleMsgQueue(),void(game.skip=!1)):void msgBox.alert(Localize.index("FAILED_TO_FETCH_DATA"))});var stopFetchingReplay=!1;socket.on("replayList",function(t){$("replay-list").innerHTML="",t.forEach(function(t){var e=newElement("li"),i=CardInfo[t.selfLrig],n=CardInfo[t.opponentLrig],o=Localize.classes(i)+" vs "+Localize.classes(n);o=o.replace(/\n/g,""),e.textContent=o,e.onclick=getReplayContent.bind(null,t.id),$("replay-list").appendChild(e)})}),socket.on("replayContent",function(t){if(!stopFetchingReplay){if(!t)return void msgBox.alert(Localize.index("FAILED_TO_FETCH_DATA"));msgBox.close(),playReplayContent(t)}}),socket.on("chat",function(t){var e=["host","host-spectator"],i=["guest","guest-spectator"],n=["host-spectator","guest-spectator"],o=inArr(position,e)&&inArr(t.position,i)||inArr(position,i)&&inArr(t.position,e),s=inArr(t.position,n);chatManager.addMsg(t.nickname,t.content,o,s)}),$("checkbox-bgm").onchange=function(t){audio.disableBgm(!$("checkbox-bgm").checked)},$("checkbox-sound-effect").onchange=function(t){audio.disableSoundEffect(!$("checkbox-sound-effect").checked)};var playingReplay=!1;$("span-play-replay").onclick=function(t){$("input-replay-file").value=null,msgBox.preset("replay"),updateReplayList()},$("button-replay-return").onclick=function(t){msgBox.close()},$("input-replay-file").onchange=function(t){readAndPlayReplayFile()},window.onbeforeunload=function(t){if(game&&"?local=true"!==location.search){var e=Localize.index("CONFIRM_CLOSE");return t.returnValue=e,e}},checkDomain(),/iPhone|Android/i.test(navigator.userAgent)&&($("link-edit-deck").onclick=function(t){window.confirm("Do you like to try our new DeckEditor for mobile phone?")&&(t.preventDefault(),location="/next/")}); \ No newline at end of file +"use strict";function callConstructor(t){var e=t.bind.apply(t,arguments);return new e}function applyToConstructor(t,e){var i=concat(null,toArr(e)),n=t.bind.apply(t,i);return new n}function nextTick(t){setTimeout(t,0)}function MessageBox(){this.eWarp=document.getElementById("msgbox-warp"),this.eWin=document.getElementById("msgbox-window"),this.eMsg=document.getElementById("msgbox-msg"),this.eInput=document.getElementById("msgbox-input"),this.ePreset=document.getElementById("msgbox-preset"),this.eOk=document.getElementById("msgbox-button-ok"),this.eCancel=document.getElementById("msgbox-button-cancel")}function IO(t){this.socket=t,this.listener=null,this.sendingMsg=null,this.datas=[],this.id=0,this.inputBlocked=!1,this.outputBlocked=!1,this.socket.removeAllListeners("gameMessage"),this.socket.on("gameMessage",this.receiveGameMessage.bind(this))}function Card(t,e){createjs.Container.prototype.initialize.call(this),this.game=t,this.isWhiteBack=e,this.width=Card.WIDTH,this.height=Card.HEIGHT,this.pid=0,this.zone=null,this.zIndex=0,this.changed=!0,this.isSide=!1,this.renderLayer=new createjs.Container,this.addChild(this.renderLayer),this.renderLayer.regX=this.width/2,this.renderLayer.regY=this.height/2,this.bitmap=new CardBitmap("",t.imageManager.noimage),this.renderLayer.addChild(this.bitmap),this.stateLayer=new createjs.Container,this.renderLayer.addChild(this.stateLayer),this.effectShape=new createjs.Shape,this.renderLayer.addChild(this.effectShape),this.buttonLayer=new ButtonList,this.buttonLayer.x=this.width/2,this.buttonLayer.y=this.height/2,this.renderLayer.addChild(this.buttonLayer),this.style=new Style({x:0,y:0,zIndex:0,top:!1,covered:!1,offX:0,offY:0,rotation:0,scaleX:-1,shadowColor:"#f7ff00",shadowBlur:0,flash:0,shine:0}),this.style.checkSkip=function(){return this.game.skip}.bind(this),this.on("mouseover",this.handleMouseover),this.on("mouseout",this.handleMouseout),this.game.addCard(this)}function CardBitmap(t,e){createjs.Container.prototype.initialize.call(this),this.setAltImage(t,e),this.setWidthHeight(Card.WIDTH,Card.HEIGHT),this.complete=e.complete,this.text=new createjs.Text(t),this.bitmap=new createjs.Bitmap(e),this.addChild(this.text,this.bitmap),this.changed=!0}function StateBitmap(t){var e=new createjs.Bitmap(t);return e.width=Card.WIDTH,e.height=Card.HEIGHT,e}function Style(t){this.transitingStyle={};for(var e in t)this.transitingStyle[e]=new TransitingValue(t[e]);this.changed=!0,this.checkSkip=null}function TransitingValue(t){this.changeTime=0,this.startValue=t,this.endValue=t,this.duration=0,this.timing=TransitingValue.cubic,this.done=!1}function Zone(t){createjs.Container.prototype.initialize.call(this),this.game=t.game,this.name=t.name,this.x=t.x,this.y=t.y,this.showAmount=!!t.showAmount,this._amount=0,this.opposite=!!t.opposite,this.checkable=!!t.checkable,this.cards=[],this.changed=!0,this.text=new createjs.Text("","bold 12px monospace"),this.text.textAlign="center",this.addChild(this.text),this.opposite&&(this.rotation=180,this.text.rotation=180),this.buttonLayer=new ButtonList,this.buttonLayer.rotation=-this.rotation,this.addChild(this.buttonLayer),this.checkable&&(this.viewCardsButton=new Button(Localize("buttonTitle","VIEW"),function(){this.game.dialog.showCards(Localize("buttonTitle","VIEW"),this.cards,function(){})}.bind(this)),this.viewCardsButton.alpha=.8),this.game.addZone(this)}function StackZone(t){Zone.apply(this,arguments),this.showPower=!!t.showPower,this.changed=!0,this._power=0,this.power=0,t.centerText?this.text.textBaseline="middle":(this.text.textBaseline="top",this.text.y=Card.HEIGHT/2,this.opposite&&(this.text.rotation=180,this.text.textBaseline="bottom")),this.stateLayer=new createjs.Container,this.stateShape=new createjs.Shape,this.stateLayer.addChild(this.stateShape),this.addChild(this.stateLayer)}function TileZone(t){Zone.apply(this,arguments),this.up=t.up,this.horizontal=t.horizontal,this.center=t.center,this.width=t.width,this.spacing=t.spacing,this.showAmount=!!t.showAmount,this.horizontal?(this.text.textBaseline="middle",this.opposite?this.text.textAlign="left":this.text.textAlign="right"):(this.text.textAlign="center",this.opposite?this.text.textBaseline="top":this.text.textBaseline="bottom"),this.checkable&&(this.buttonLayer.y+=this.width/2,this.buttonLayer.addButton(this.viewCardsButton))}function Game(t,e,i,n){this.io=t,this.audio=e,this.ongameover=i,this.io.listener=function(t){console.log(t),this.addMsgs(t),this.update()}.bind(this),this.onidle=null,this.gameDiv=document.getElementById("GameDiv"),this.canvasContainer=document.getElementById("BattleField"),this.canvasContainer.innerHTML="",this.canvas=document.createElement("canvas"),this.canvas.width=576,this.canvas.height=734,this.canvasContainer.appendChild(this.canvas),this.stage=new createjs.Stage(this.canvas),this.stage.enableDOMEvents(!0),this.stage.enableMouseOver(10),this.dialog=new Dialog(this),this.selector=new Selector(this,n),this.objList=[],this.background=new GameBackground(this),this.stage.addChild(this.background),this.cards=[],this.cardLayer=new createjs.Container,this.stage.addChild(this.cardLayer),this.zones=[],this.zoneLayer=new createjs.Container,this.stage.addChild(this.zoneLayer),this.msgQueue=[],this._packageCount=0,this.imageManager=new ImageManager,this.cardDetail=new CardDetail(this.imageManager),this.initZones(),this.skip=!1}function Button(t,e){createjs.Container.prototype.initialize.call(this),this.changed=!0;var i=5,n=8,o=Button.HEIGHT,s=o+'px "Segoe UI", Arial, "Microsoft Yahei", Simsun, sans-serif';this.text=new createjs.Text(t,s),this.text.textBaseline="middle",this.height=o+2*i,this.width=this.text.getMeasuredWidth()+2*n,this.regX=this.width/2,this.regY=this.height/2,this.text.x=n,this.text.y=this.height/2,this.background=new createjs.Shape,this.toDefaultStyle(),this.addChild(this.background,this.text),this.on("click",e),this.on("mouseover",this.toHoverStyle),this.on("mouseout",this.toDefaultStyle)}function ButtonList(){createjs.Container.prototype.initialize.call(this),this.changed=!1,this.buttons=[]}function Selector(t,e){this.game=t,this.msgs=[],this.selectedIndexes=[],this._autoPopMsg=null,this.spectating=e}function Dialog(t){this.game=t,this.searcher=new Searcher,this.warpDiv=this.newElement("div"),this.dialogDiv=this.newElement("div"),this.titleDiv=this.newElement("div"),this.closeIcon=this.newElement("div"),this.bodyDiv=this.newElement("div"),this.footerDiv=this.newElement("div"),this.footSpan=this.newElement("span"),this.okBtn=this.newElement("button"),this.cancelBtn=this.newElement("button"),this.okBtn.textContent=Localize("common","OK"),this.cancelBtn.textContent=Localize("common","CANCEL"),this.closeIcon.onclick=this.close.bind(this),this.warpDiv.classList.add("warp"),this.dialogDiv.classList.add("dialog"),this.titleDiv.classList.add("title"),this.closeIcon.classList.add("closeIcon"),this.bodyDiv.classList.add("body"),this.footerDiv.classList.add("footer"),this.okBtn.classList.add("okBtn"),this.cancelBtn.classList.add("cancelBtn"),this.warpDiv.appendChild(this.dialogDiv),this.dialogDiv.appendChild(this.closeIcon),this.dialogDiv.appendChild(this.titleDiv),this.dialogDiv.appendChild(this.bodyDiv),this.dialogDiv.appendChild(this.footerDiv),this.footerDiv.appendChild(this.footSpan),this.footerDiv.appendChild(this.okBtn),this.footerDiv.appendChild(this.cancelBtn),this.warpDiv.style.display="none",t.stage.canvas.parentElement.appendChild(this.warpDiv)}function GameBackground(t){createjs.Container.prototype.initialize.call(this),this.game=t,this.width=t.stage.canvas.width,this.height=t.stage.canvas.height,this.changed=!0,this.mask=new createjs.Shape,this.addChild(this.mask)}function GameAudio(){this.bgm=document.getElementById("audio-bgm"),this.soundEffect=document.getElementById("audio-sound-effect"),this.bgmCheckBox=document.getElementById("checkbox-bgm"),this.seCheckBox=document.getElementById("checkbox-sound-effect"),this.bgmDisabled=!1,this.seDisabled=!1,this.lastPlay="",this.map={white:"WhiteAng",black:"DarkFßen",red:"reLEIdEN",blue:"Süblueß",green:"GreenWi",NevWorry:"NevWorry",main:"Love Your Enemies.W",Battle:"バトル!"},this.loadSettings()}function ChatManager(t){this.socket=t,this.dialogue=document.getElementById("chat-dialogue"),this.input=document.getElementById("chat-input"),this.input.onkeypress=function(t){var e=t.keyCode||t.which||t.charCode;13===e&&(this.sendMsg(this.input.value),this.input.value=null)}.bind(this)}function hide(t){t.style.display="none"}function show(t,e){1===arguments.length?t.style.display="":t.disabled=e?"":"none"}function disable(t){t.disabled=!0}function enable(t,e){1===arguments.length?t.disabled=!1:t.disabled=!e}function setClass(t,e,i){i?t.classList.add(e):t.classList.remove(e)}function newElement(t){for(var e=document.createElement(t),i=1;iVERSION||t.clientVersion<69)return void msgBox.alert(Localize.index("UNSUPPORTED_REPLAY_VERSION"),initHall);playingReplay=!0,gameStart("replay"),game.io.datas=t.messagePacks;var i=0,n=!0,o=!1;game.onidle=function(){n=!0,i>=t.messagePacks.length?($("button-replay-auto").onclick=null,$("button-replay-step").onclick=null,$("button-replay-save").onclick=null,t.surrender&&(t.win?game.win(!0):game.lose(!0))):o&&setTimeout(e,500)},e(),$("button-replay-auto").onclick=function(t){o=!0,e()},$("button-replay-step").onclick=function(t){return o?void(o=!1):void e()},$("button-replay-save").onclick=function(e){e.preventDefault();var i=document.createElement("a"),n=objToBlob(createReplayObj(t.messagePacks,t.win,t.surrender)),o=blobToUrl(n),s=(new Date).toISOString().replace("T"," ").substr(0,19).replace(/:/g,"-"),a=s+".wxrep";i.href=o,i.download=a,i.click(),window.URL.revokeObjectURL(o)}}function readReplayFile(t,e){if(!t||!window.FileReader||!window.JSON)return void e(null);var i=new FileReader;i.onload=function(t){var n=i.result,o=null;try{o=JSON.parse(n)}catch(t){return e(null)}return checkReplayObj(o)?void e(o):e(null)},i.onerror=function(t){e(null)},i.readAsText(t)}function checkReplayObj(t){return!!isObj(t)&&("WEBXOSS Replay"===t.format&&("1"===t.version&&!!isObj(t.content)))}function checkDomain(){var t=location.hostname;"127.0.0.1"!==t&&(t.match(/^(.*\.)?webxoss\.com$/)||msgBox.preset("warn"))}var concat=Array.prototype.concat.bind([]),toArr=function(t){return t?"string"==typeof t?[]:Array.prototype.slice.call(t,0):[]},isArr=Array.isArray,inArr=function(t,e){return toArr(e).indexOf(t)!=-1},removeFromArr=function(t,e){var i=e.indexOf(t);return!(i<0)&&(e.splice(i,1),!0)},isStr=function(t){return"string"==typeof t},isObj=function(t){return t&&"object"==typeof t&&!isArr(t)},isNum=function(t){return"number"==typeof t},isFunc=function(t){return"function"==typeof t},pEach=function(t,e,i){return t.reduce(function(t,i){return t.then(function(){return e(i)})},Promise.resolve())};MessageBox.prototype.alert=function(t,e){this.eWin.className="alert",this.eMsg.textContent=t,this.eWarp.classList.add("shown"),this.eOk.focus(),this.eOk.onclick=function(t){this.close(),e&&e()}.bind(this)},MessageBox.prototype.confirm=function(t,e){this.eWin.className="confirm",this.eMsg.textContent=t,this.eWarp.classList.add("shown"),this.eCancel.focus(),this.eOk.onclick=function(t){this.close(),e&&e(!0)}.bind(this),this.eCancel.onclick=function(t){this.close(),e&&e(!1)}.bind(this)},MessageBox.prototype.prompt=function(t,e,i){2===arguments.length&&(e="",i=arguments[1]),this.eWin.className="prompt",this.eMsg.textContent=t,this.eInput.value=e,this.eWarp.classList.add("shown"),this.eInput.select();var n=function(t){this.close(),i&&i(t||"")}.bind(this);this.eOk.onclick=function(t){n(this.eInput.value)}.bind(this),this.eCancel.onclick=function(t){n()}.bind(this),this.eInput.onkeypress=function(t){var e=t.keyCode||t.which||t.charCode;13===e&&n(this.eInput.value)}.bind(this)},MessageBox.prototype.preset=function(t){this.eWin.className="preset";for(var e=this.ePreset.children,i=0;i1||!(!inArr(t,["SigniZone","LrigZone"])||0===this.zone.getCardIndex(this))))},Card.prototype.removeButtons=function(){this.buttonLayer.removeAllButtons()},Card.prototype.update=function(){var t=this.style.isChanged()||this.changed;if(concat(this.buttonLayer,this.bitmap).forEach(function(e){e.update()&&(t=!0)},this),!t)return!1;this.changed=!1;var e=this.renderLayer,i=(this.effectShape,this.bitmap),n=this.style.getComputedStyle();this.x=n.x,this.y=n.y,this.rotation=n.rotation,this.buttonLayer.rotation=-n.rotation,this.alpha=1-n.flash%1,e.x=n.offX,e.y=n.offY;var o=this.pid?Localize.cardName(CardInfo[this.pid]):"???";if(n.scaleX>0?this.bitmap.setAltImage(o,this.game.imageManager.getImageByPid(this.pid)):this.bitmap.setAltImage(o,this.game.imageManager.getBackImage(this.isWhiteBack)),e.scaleX=Math.abs(n.scaleX),i.shadow=new createjs.Shadow(n.shadowColor,0,0,n.shadowBlur),n.shine>0){var s=40,a=n.shine*(this.width+s)-s,r=n.shine*(this.height+s)-s,c=a+s,h=r+s;this.effectShape.graphics.clear().beginLinearGradientFill(["rgba(255,255,255,0)","white","rgba(255,255,255,0)"],[0,.5,1],a,r,c,h).drawRect(0,0,this.width,this.height)}return this.zIndex=n.top?512:n.zIndex,this.visible=n.top||!n.covered,!0},Card.prototype.handleMouseover=function(t){this.game.cardDetail.show(this.pid),this.zone.opposite||"HandZone"!==this.zone.name||this.floatup()},Card.prototype.handleMouseout=function(t){this.zone.opposite||"HandZone"!==this.zone.name||this.floatdown()},CardBitmap.prototype=new createjs.Container,CardBitmap.prototype.constructor=CardBitmap,CardBitmap.prototype.setAltImage=function(t,e){t===this.alt&&e===this.img||(this.changed=!0,this.alt=t,this.img=e)},CardBitmap.prototype.setWidthHeight=function(t,e){t===this.width&&e===this.height||(this.changed=!0,this.width=t,this.height=e)},CardBitmap.prototype.update=function(){return this.complete!=this.img.complete&&(this.changed=!0),!!this.changed&&(this.changed=!1,this.complete=this.img.complete,this.text.text=this.alt,this.img.complete&&0!==this.img.naturalWidth?(this.bitmap.image=this.img,this.bitmap.scaleX=this.width/this.img.width,this.bitmap.scaleY=this.height/this.img.height,this.bitmap.visible=!0,this.text.visible=!1):(this.bitmap.visible=!1,this.text.visible=!0),!0)},Style.linear=function(t){return t},Style.prototype.transit=function(t,e,i,n){this.checkSkip&&this.checkSkip()&&(i=0),this.transitingStyle[t].transitTo(e,i,n),this.changed=!0},Style.prototype.set=function(t,e){this.transit(t,e)},Style.prototype.getComputedStyle=function(){var t={};for(var e in this.transitingStyle)t[e]=this.transitingStyle[e].getValue(),this.transitingStyle[e].isDone()||(this.changed=!0);return t},Style.prototype.isChanged=function(){var t=this.changed;return this.changed=!1,t},TransitingValue.linear=function(t){return t},TransitingValue.cubic=function(t){var e=1-t;return 1-e*e*e},TransitingValue.prototype.now=function(){return Date.now()},TransitingValue.prototype.transitTo=function(t,e,i){this.startValue=this.getValue(),this.endValue=t,this.duration=e||0,this.timing=i||TransitingValue.cubic,this.changeTime=this.now(),this.done=!1},TransitingValue.prototype.getValue=function(){var t=this.now(),e=this.changeTime,i=e+1e3*this.duration;if(t=i||this.startValue===this.endValue)return this.done=!0,this.endValue;if(!isNum(this.endValue))return this.startValue;var n=this.timing((t-e)/(i-e));return this.startValue+n*(this.endValue-this.startValue)},TransitingValue.prototype.isDone=function(){return this.done},Zone.prototype=new createjs.Container,Zone.prototype.constructor=Zone,Zone.prototype.sortCards=function(){var t=this.cards.length;this.cards.forEach(function(e,i){e.style.set("zIndex",t-i)},this)},Zone.prototype.addCard=function(t,e){"SigniZone"===this.name&&"LrigZone"===this.name||t.removeStates(),e?this.cards.push(t):this.cards.unshift(t),this.sortCards(),this.updateCardPosition()},Zone.prototype.removeCard=function(t,e){removeFromArr(t,this.cards),this.sortCards(),this.updateCardPosition()},Zone.prototype.getCardIndex=function(t){return this.cards.indexOf(t)},Zone.prototype.updateCardPosition=function(){},Zone.prototype.update=function(){var t=this.cards.filter(function(t){return!t.isSide},this).length;if(this.showAmount&&this._amount!==t){this._amount=t;var e=0===this._amount?"":this._amount;this.setText(e)}var i=this.buttonLayer.update()||this.changed;return this.changed=!1,i},Zone.prototype.addButton=function(t,e){var i=new Button(t,e.bind(this,this));this.buttonLayer.addButton(i)},Zone.prototype.removeButtons=function(){this.buttonLayer.removeAllButtons(),this.checkable&&this.cards.length>1&&("SigniZone"===this.name?this.cards[0].addButton(this.viewCardsButton):this.buttonLayer.addButton(this.viewCardsButton))},Zone.prototype.setText=function(t){return this.changed=!0,t?(this.text.visible=!0,void(this.text.text=t)):void(this.text.visible=!1)},Zone.prototype.setTextColor=function(t){this.changed=!0,"EnerZone"===this.name?this.text.color="white":this.text.color=t},Zone.prototype.shouldUseDialog=function(){return!1},StackZone.prototype=Object.create(Zone.prototype),StackZone.prototype.constructor=StackZone,StackZone.prototype.updateCardPosition=function(){var t=!1;this.cards.forEach(function(e,i){e.moveTo(this.x,this.y,t,!!i),e.x===this.x&&e.y===this.y&&(t=!0)},this)},StackZone.prototype.addViewCardsButton=function(){this.buttonLayer.addButton(this.viewCardsButton)},Zone.prototype.addStates=function(t){this.changed=!0,this.stateLayer.visible=!0,t.forEach(function(t){var e=this.stateShape.graphics,i=Card.WIDTH,n=Card.HEIGHT;"powerDown"===t?e.f("rgba(164,96,222,0.3)").r(-i/2,-n/2,i,n):"disabled"===t?e.f("rgba(0,0,0,0.7)").r(-i/2,-n/2,i,n):"infected"===t&&e.f("rgba(255,0,0,0.3)").r(-i/2,-n/2,i,n)},this)},Zone.prototype.removeStates=function(){this.changed=!0,this.stateLayer.visible=!1,this.stateShape.graphics.clear()},StackZone.prototype.update=function(){var t=this.changed;return this.showPower?(this._amount!==this.cards.length&&(this._amount=this.cards.length,this.power=this._power=0,this.setText("")),this._power!==this.power&&(this._power=this.power,this.setText(this._power))):Zone.prototype.update.call(this)&&(t=!0),this.changed=!1,t},TileZone.prototype=Object.create(Zone.prototype),TileZone.prototype.constructor=TileZone,TileZone.prototype.updateCardPosition=function(){if(this.cards.length){var t,e=this.spacing;t=this.horizontal?this.up?Card.WIDTH:Card.HEIGHT:this.up?Card.HEIGHT:Card.WIDTH;var i,n,o=this.opposite?-1:1;(t+e)*this.cards.length-e<=this.width?(n=t+e,i=this.center?-n*(this.cards.length-1)/2:t/2):(n=(this.width-t)/(this.cards.length-1),i=this.center?t/2-this.width/2:t/2);var s=this.cards.length;this.horizontal?this.cards.forEach(function(t,e){var a=s-e-1;t.moveTo(this.x+o*(i+a*n),this.y)},this):this.cards.forEach(function(t,e){var a=s-e-1;t.moveTo(this.x,this.y+o*(i+a*n))},this)}},TileZone.prototype.update=function(){return this.buttonLayer.visible=this.cards.length>4,Zone.prototype.update.call(this)},Game.prototype.setSid=function(t,e){t.sid=e,this.objList[e]=t},Game.prototype.getObjBySid=function(t){return this.objList[t]},Game.prototype.addCard=function(t){this.cards.push(t),this.cardLayer.addChild(t)},Game.prototype.addZone=function(t){this.zones.push(t),this.zoneLayer.addChild(t)},Game.prototype.handleInit=function(t){function e(t,e){this.setSid(t.mainDeck,e.mainDeck),this.setSid(t.lrigDeck,e.lrigDeck),this.setSid(t.handZone,e.handZone),this.setSid(t.lrigZone,e.lrigZone),this.setSid(t.signiZones[0],e.signiZones[0]),this.setSid(t.signiZones[1],e.signiZones[1]),this.setSid(t.signiZones[2],e.signiZones[2]),this.setSid(t.enerZone,e.enerZone),this.setSid(t.checkZone,e.checkZone),this.setSid(t.trashZone,e.trashZone),this.setSid(t.lrigTrashZone,e.lrigTrashZone),this.setSid(t.lifeClothZone,e.lifeClothZone),this.setSid(t.excludedZone,e.excludedZone),e.mainDeckCards.forEach(function(e){var i=new Card(this,!1);this.setSid(i,e),i.move(0,t.mainDeck,!0,!1,!1)},this),e.lrigDeckCards.forEach(function(i,n){var o=new Card(this,!0);this.setSid(o,i);var s=e.lrigDeckCardInfos[n];o.move(s.pid,t.lrigDeck,!0,!1,!1,s.isSide)},this)}return this.setSid(this.player,t.player),this.setSid(this.opponent,t.opponent),e.call(this,this.player,t.playerZones),e.call(this,this.opponent,t.opponentZones),!0},Game.prototype.handleSetColor=function(t){document.body.setAttribute("self",t.selfColor),document.body.setAttribute("opponent",t.opponentColor);var e={white:"black",black:"yellow",red:"white",blue:"yellow",green:"white"};this.zones.forEach(function(i){var n=i.opposite?e[t.opponentColor]:e[t.selfColor];i.setTextColor(n)},this);var i=this.audio;return i.bgmFadeOut(function(){i.playBgm(t.selfColor)}),!0},Game.prototype.handlePackedMsgStart=function(){return this._packageCount++,!0},Game.prototype.handlePackedMsgEnd=function(){return this._packageCount--,!0},Game.prototype.handleMoveCard=function(t){var e=this.getObjBySid(t.card),i=this.getObjBySid(t.zone);return e.move(t.pid,i,t.up,t.faceup,t.bottom,t.isSide),!1},Game.prototype.handleUpCard=function(t){ +var e=this.getObjBySid(t.card);return e.up(),!1},Game.prototype.handleDownCard=function(t){var e=this.getObjBySid(t.card);return e.down(),!1},Game.prototype.handleFaceupCard=function(t){var e=this.getObjBySid(t.card);return e.pid=t.pid,e.faceup(),!1},Game.prototype.handleFacedownCard=function(t){var e=this.getObjBySid(t.card);return e.facedown(),!1},Game.prototype.handleShuffle=function(t){return t.cards.forEach(function(t){var e=this.getObjBySid(t);e.pid=0},this),!0},Game.prototype.handleSelect=function(t){return console.log(t),!!this.skip||(this.selector.addMsg(t),!0)},Game.prototype.handlePayEner=function(t){if(console.log("handlePayEner",t),this.skip)return!0;var e=t.cards.map(function(t){return this.getObjBySid(t)},this),i=this,n=null;return t.cancelable&&(n=function(){i.input("PAY_ENER",null)}),this.dialog.selectEner(Localize("buttonTitle","PAY_ENER"),e,t.integers,t,function(t){i.input("PAY_ENER",t)},n),!0},Game.prototype.handleShowCards=function(t){if(this.skip)return!0;var e=t.cards.map(function(e,i){var n=this.getObjBySid(e);return n.pid=t.pids[i],n},this),i=this,n=t.label||"CONFIRM";return this.dialog.showCards(Localize("buttonTitle",n),e,function(){i.input("OK")}),!0},Game.prototype.handleShowCardsById=function(t){if(this.skip)return!0;var e=t.ids.map(function(t,e){return{pid:t}},this),i=this,n=t.label||"CONFIRM";return this.dialog.showCards(Localize("buttonTitle",n),e,function(){i.input("OK")}),!0},Game.prototype.handleShowColors=function(t){if(this.skip)return!0;var e=t.colors.map(function(t){return Localize.color(t)}),i=this;return this.dialog.showText(Localize("buttonTitle","COLOR"),e.join(","),function(){i.input("OK")}),!0},Game.prototype.handleShowTypes=function(t){if(this.skip)return!0;var e=t.types.map(function(t){return Localize("cardType",t)}),i=this;return this.dialog.showText(Localize("prop","cardType"),e.join(","),function(){i.input("OK")}),!0},Game.prototype.handleShowEffects=function(t){if(this.skip)return!0;var e=t.effects.map(function(t){return Localize.desc(t)}).join("\n"),i=this;return this.dialog.showText(Localize("gameText","SHOW_EFFECTS_DIALOG_TITLE"),e,function(){i.input("OK")}),!0},Game.prototype.handleShowText=function(t){if(this.skip)return!0;var e="";"number"===t.type?e=t.content:"text"===t.type&&(e=Localize("gameText",t.content));var i=this;return this.dialog.showText(Localize.labelToDialogTitle(t.title),e,function(){i.input("OK")}),!0},Game.prototype.handleInformCards=function(t){return t.cards.forEach(function(e,i){var n=this.getObjBySid(e);n.pid=t.pids[i]},this),!0},Game.prototype.handleCardStates=function(t){var e=t.signiInfos,i=t.lrigInfos,n=t.zoneInfos;return e.forEach(function(t){var e=this.getObjBySid(t.card);e.zone.power=t.power,e.removeStates(),e.addStates(t.states)},this),i.forEach(function(t){var e=this.getObjBySid(t.card);e.removeStates(),e.addStates(t.states)},this),n&&n.forEach(function(t){var e=this.getObjBySid(t.zone);e.removeStates(),e.addStates(t.states)},this),!0},Game.prototype.handleActivate=function(t){var e=this.getObjBySid(t.card);return e.shine(),!1},Game.prototype.handleCardSelected=function(t){var e=this.getObjBySid(t.card);return e.flash(),!1},Game.prototype.handleSelectNumber=function(t){if(this.skip)return!0;var e=t.label,i=t.min,n=t.max,o=t.defaultValue||0,s=Localize.labelToDialogTitle(e),a=this;return this.dialog.selectNumber(s,i,n,o,!1,function(t){a.input(e,t)}),!0},Game.prototype.handleSelectText=function(t){if(this.skip)return!0;var e=t.label,i=Localize.labelToDialogTitle(e),n=t.type||"gameText",o=t.texts.map(function(t){return Localize(n,t)},this),s=this;return this.dialog.selectText(i,o,!1,function(t){s.input(e,t)}),!0},Game.prototype.handleSelectCardId=function(t){if(this.skip)return!0;try{var e=this,i=t.label,n=Localize.labelToDialogTitle(i);this.dialog.selectCardId(n,function(t){e.input(i,t)})}catch(t){window.alert(t.name+t.message)}return!0},Game.prototype.handleCoinChange=function(t){var e=t.player===this.player.sid?this.player:this.opponent;return e.coinZone.setText("Coin"+t.coin),!0},Game.prototype.handleConfirm=function(t){if(this.skip)return!0;var e=Localize.labelToDialogTitle("CONFIRM"),i=Localize("gameText",t.text),n=this;return this.dialog.confirm(e,i,function(t){n.input("OK",t)}),!0},Game.prototype.handleWin=function(t){this.win()},Game.prototype.win=function(t){this.ongameover(!0,t,this.getMessagePacks())},Game.prototype.handleLose=function(t){this.lose()},Game.prototype.lose=function(t){this.ongameover(!1,t,this.getMessagePacks())},Game.prototype.getMessagePacks=function(){return this.io.getDatas()},Game.prototype.handleMsg=function(t){if(!t)return!1;var e={INIT:this.handleInit,SET_COLOR:this.handleSetColor,PACKED_MSG_START:this.handlePackedMsgStart,PACKED_MSG_END:this.handlePackedMsgEnd,MOVE_CARD:this.handleMoveCard,UP_CARD:this.handleUpCard,DOWN_CARD:this.handleDownCard,FACEUP_CARD:this.handleFaceupCard,FACEDOWN_CARD:this.handleFacedownCard,SHUFFLE:this.handleShuffle,SELECT:this.handleSelect,PAY_ENER:this.handlePayEner,SHOW_CARDS:this.handleShowCards,SHOW_CARDS_BY_ID:this.handleShowCardsById,SHOW_COLORS:this.handleShowColors,SHOW_TYPES:this.handleShowTypes,SHOW_EFFECTS:this.handleShowEffects,SHOW_TEXT:this.handleShowText,INFORM_CARDS:this.handleInformCards,CARD_STATES:this.handleCardStates,ACTIVATE:this.handleActivate,CARD_SELECTED:this.handleCardSelected,SELECT_NUMBER:this.handleSelectNumber,SELECT_TEXT:this.handleSelectText,SELECT_CARD_ID:this.handleSelectCardId,CONFIRM:this.handleConfirm,COIN_CHANGE:this.handleCoinChange,WIN:this.handleWin,LOSE:this.handleLose},i=e[t.type];return i?i.call(this,t.content)||this.skip:(console.warn(t),window.alert('Unknown message type: "'+t.type+'" .'),!0)},Game.prototype.handleMsgQueue=function(){if(this.msgQueue.length){this.buttonZone.setText(""),this.background.setWaiting(!1);for(var t,e=!0;(t=this.msgQueue.shift())&&(this.handleMsg(t)||(e=!1),e||this._packageCount););this.msgQueue.length||this.handleIdle()}},Game.prototype.handleIdle=function(){this.selector.removeButtons(),this.selector.showButtons(),this.selector.autoPop(),this.selector.msgs.length||(this.buttonZone.setText(Localize.waitingMsg()),this.background.setWaiting(!0)),this.onidle&&this.onidle()},Game.prototype.addMsgs=function(t){this.selector.clear(),this.msgQueue=this.msgQueue.concat(t),t.length||this.handleIdle()},Game.prototype.input=function(t,e){void 0===e&&(e=[]),this.removeButtons(),this.io.send({label:t,input:e}),this.background.setWaiting(!0)},Game.prototype.removeButtons=function(){this.cards.forEach(function(t){t.removeButtons()},this),this.zones.forEach(function(t){t.removeButtons()},this)},Game.prototype.update=function(){var t=!1;concat(this.cards,this.zones,this.background).forEach(function(e){e.update()&&(t=!0)},this),t?(this.cardLayer.sortChildren(function(t,e){return t.zIndex-e.zIndex}),this.stage.update()):this.handleMsgQueue()},Game.prototype.initZones=function(){this.player={enerZone:new TileZone({game:this,name:"EnerZone",x:92,y:377,up:!1,horizontal:!1,center:!1,width:259,spacing:5,showAmount:!0,checkable:!0}),signiZones:[new StackZone({game:this,name:"SigniZone",x:190,y:421,checkable:!0,showPower:!0}),new StackZone({game:this,name:"SigniZone",x:288,y:421,checkable:!0,showPower:!0}),new StackZone({game:this,name:"SigniZone",x:386,y:421,checkable:!0,showPower:!0})],mainDeck:new StackZone({game:this,name:"MainDeck",x:471.5,y:421,showAmount:!0}),lrigDeck:new StackZone({game:this,name:"LrigDeck",x:544.5,y:421,showAmount:!0,checkable:!0}),checkZone:new StackZone({game:this,name:"CheckZone",x:190,y:519}),lrigZone:new StackZone({game:this,name:"LrigZone",x:288,y:519,showAmount:!0}),trashZone:new StackZone({game:this,name:"TrashZone",x:471.5,y:519,showAmount:!0,checkable:!0}),lrigTrashZone:new StackZone({game:this,name:"LrigTrashZone",x:544.5,y:519,showAmount:!0,checkable:!0}),lifeClothZone:new TileZone({game:this,name:"LifeClothZone",x:158.5,y:604.5,up:!1,horizontal:!0,center:!1,width:3*Card.HEIGHT,spacing:2*-Card.HEIGHT/3,showAmount:!0}),coinZone:new StackZone({game:this,name:"CoinZone",x:471.5,y:604.5,centerText:!0}),excludedZone:new StackZone({game:this,name:"ExcludedZone",x:617.5,y:421}),handZone:new TileZone({game:this,name:"HandZone",x:288,y:690,up:!0,horizontal:!0,center:!0,width:576,spacing:8})},this.opponent={enerZone:new TileZone({game:this,name:"EnerZone",x:484,y:357,opposite:!0,up:!1,horizontal:!1,center:!1,width:259,spacing:5,showAmount:!0,checkable:!0}),signiZones:[new StackZone({game:this,name:"SigniZone",x:386,y:313,checkable:!0,showPower:!0,opposite:!0}),new StackZone({game:this,name:"SigniZone",x:288,y:313,checkable:!0,showPower:!0,opposite:!0}),new StackZone({game:this,name:"SigniZone",x:190,y:313,checkable:!0,showPower:!0,opposite:!0})],mainDeck:new StackZone({game:this,name:"MainDeck",x:104.5,y:313,showAmount:!0,opposite:!0}),lrigDeck:new StackZone({game:this,name:"LrigDeck",x:31.5,y:313,showAmount:!0,opposite:!0}),lrigZone:new StackZone({game:this,name:"LrigZone",x:288,y:215,showAmount:!0,opposite:!0}),checkZone:new StackZone({game:this,name:"CheckZone",x:386,y:215,opposite:!0}),trashZone:new StackZone({game:this,name:"TrashZone",x:104.5,y:215,showAmount:!0,opposite:!0,checkable:!0}),lrigTrashZone:new StackZone({game:this,name:"LrigTrashZone",x:31.5,y:215,showAmount:!0,opposite:!0,checkable:!0}),lifeClothZone:new TileZone({game:this,name:"LifeClothZone",x:417.5,y:129.5,opposite:!0,up:!1,horizontal:!0,center:!1,width:3*Card.HEIGHT,spacing:2*-Card.HEIGHT/3,showAmount:!0}),coinZone:new StackZone({game:this,name:"CoinZone",x:104.5,y:129.5,centerText:!0}),excludedZone:new StackZone({game:this,name:"ExcludedZone",x:-41.5,y:313,opposite:!0}),handZone:new TileZone({game:this,name:"HandZone",x:288,y:44,opposite:!0,up:!0,horizontal:!0,center:!0,width:576,spacing:8})},this.buttonZone=new StackZone({game:this,name:"ButtonZone",x:386,y:519,centerText:!0}),this.player.coinZone.text.font="14px monospace",this.opponent.coinZone.text.font="14px monospace"},Button.HEIGHT=11,Button.prototype=new createjs.Container,Button.prototype.constructor=Button,Button.prototype.toDefaultStyle=function(){this.changed=!0,this.text.color="#444",this.background.graphics.clear().beginStroke("#c0c0c0").beginLinearGradientFill(["#ededed","#ededed","#dedede"],[0,.38,1],0,0,0,this.height).drawRoundRect(0,0,this.width,this.height,2)},Button.prototype.toHoverStyle=function(){this.changed=!0,this.text.color="#000",this.background.graphics.clear().beginStroke("#afafaf").beginLinearGradientFill(["#f0f0f0","#f0f0f0","#e0e0e0"],[0,.38,1],0,0,0,this.height).drawRoundRect(0,0,this.width,this.height,2)},Button.prototype.update=function(){var t=this.changed;return this.changed=!1,t},ButtonList.prototype=new createjs.Container,ButtonList.prototype.constructor=ButtonList,ButtonList.prototype.addButton=function(t){this.changed=!0,this.buttons.push(t),this.addChild(t)},ButtonList.prototype.setButtonPositions=function(){var t=-this.buttons.length/2+.5;this.buttons.forEach(function(e,i){e.x=0,e.y=(t+i)*e.height})},ButtonList.prototype.removeButton=function(t){removeFromArr(t,this.buttons),this.removeChild(t)&&(this.changed=!0)},ButtonList.prototype.removeAllButtons=function(){this.buttons.length&&(this.changed=!0,this.buttons.length=0,this.removeAllChildren())},ButtonList.prototype.update=function(){this.changed&&this.setButtonPositions();var t=this.changed;return this.buttons.forEach(function(e){e.update()&&(t=!0)}),this.changed=!1,t},Selector.prototype.addMsg=function(t){this.msgs.push(this.parseMsg(t))},Selector.prototype.parseMsg=function(t){var e={label:t.label,min:t.min,max:t.max,careOrder:t.careOrder};return e.title=Localize.labelToTitle(t.label),e.cards=t.options.map(function(t){return this.game.getObjBySid(t)},this),e.extraCards=t.extraCards.map(function(e,i){var n=this.game.getObjBySid(e);return n.pid=t.extraPids[i],n},this),e.extraCards.length||(e.extraCards=e.cards.slice()),e.descriptions=t.descriptions.map(function(t){return Localize.desc(t)},this),e},Selector.prototype.showButtons=function(){this.msgs.forEach(function(t){var e=t.extraCards;if(e.length)if("USE_ACTION_EFFECT"===t.label){var i=[];t.cards.forEach(function(e,n){var o,s=t.descriptions[n];o=e.shouldUseDialog()?e.zone.constructor===TileZone?this.game.buttonZone:e.zone:e,"EnerZone"===e.zone.name&&(o=e.zone.cards.length>4?e.zone:e);for(var a,r=0;r=t.max)return void this.send(t);this.removeButtons(),this.showMsgButtons(t)}},Selector.prototype.selectBind=function(t,e){return this.select.bind(this,t,e)},Selector.prototype.unselect=function(t,e){this.spectating||(removeFromArr(e,this.selectedIndexes),this.removeButtons(),this.selectedIndexes.length?this.showMsgButtons(t):this.showButtons())},Selector.prototype.unselectBind=function(t,e){return this.unselect.bind(this,t,e)},Selector.prototype.showMsgButtons=function(t){if(t.cards.forEach(function(e,i){inArr(i,this.selectedIndexes)?e.addButton("-"+t.title,this.unselectBind(t,i)):e.addButton(t.title,this.selectBind(t,i))},this),this.selectedIndexes.length>=t.min){var e;e=this.selectedIndexes.length?Localize("buttonTitle","END_SELECT"):Localize.giveUp(t.label),this.game.buttonZone.addButton(e,this.sendBind(t))}},Selector.prototype.send=function(t,e){this.spectating||(isArr(e)||(e=this.selectedIndexes),this.game.input(t.label,e.slice()),console.log('game.input("'+t.label+'",['+e.toString()+"]);"),this.clear())},Selector.prototype.sendBind=function(t){return this.send.bind(this,t)},Selector.prototype.popDialog=function(t){var e=Localize.labelToDialogTitle(t.label),i=t.extraCards,n={min:t.min,max:t.max,texts:t.descriptions,canClose:!0,careOrder:t.careOrder,targets:t.cards};this.game.dialog.selectSomeCards(e,i,n,this.sendBind(t))},Selector.prototype.popDialogBind=function(t){return this.popDialog.bind(this,t)},Selector.prototype.removeButtons=function(){this.game.removeButtons()},Selector.prototype.autoPop=function(){if(1===this.msgs.length&&this._autoPopMsg){if("SPELL_CUT_IN"===this._autoPopMsg.label)return;this.popDialog(this._autoPopMsg)}},Selector.prototype.clear=function(){this.removeButtons(),this.game.dialog.close(),this.selectedIndexes.length=0,this.msgs.length=0,this._autoPopMsg=null},Dialog.prototype.newElement=function(t){return document.createElement(t)},Dialog.prototype.newCardImg=function(t){var e=this.newElement("img");return e.src=this.game.imageManager.getUrlByPid(t),e},Dialog.prototype.mouseover=function(t,e){t.onmouseover=this.game.cardDetail.show.bind(this.game.cardDetail,e)},Dialog.prototype.center=function(t){var e=t.parentElement;t.style.top="0",t.style.left="0",t.style.top=(e.offsetHeight-t.offsetHeight)/2+"px",t.style.left=(e.offsetWidth-t.offsetWidth)/2+"px"},Dialog.prototype.pop=function(t,e,i,n,o,s){var a=this;this.titleDiv.textContent=t,this.footSpan.innerHTML="",i&&this.footSpan.appendChild(i),this.bodyDiv.innerHTML="",this.bodyDiv.style.width="",this.bodyDiv.appendChild(e),this.closeIcon.style.display=n?"":"none",o?(this.okBtn.onclick=function(t){a.close(),o()},this.footerDiv.style.display=""):(this.okBtn.onclick=null,this.footerDiv.style.display="none"),s?(this.cancelBtn.onclick=function(t){a.close(),s()},this.cancelBtn.style.display=""):(this.cancelBtn.onclick=null,this.cancelBtn.style.display="none"),this.warpDiv.style.opacity="0",this.warpDiv.style.display="",this.center(this.dialogDiv),this.warpDiv.style.opacity="1"},Dialog.prototype.close=function(){this.okBtn.disabled=!1,this.warpDiv.style.display="none"},Dialog.prototype.showText=function(t,e,i){var n=document.createTextNode(e);this.pop(t,n,null,!1,i)},Dialog.prototype.confirm=function(t,e,i){var n=document.createTextNode(e);this.pop(t,n,null,!1,i.bind(null,!0),i.bind(null,!1))},Dialog.prototype.selectText=function(t,e,i,n){var o=this,s=this.newElement("div");e.forEach(function(t,e){var i=this.newElement("div");i.classList.add("option"),i.textContent=t,s.appendChild(i),i.onclick=function(t){o.close(),n(e)}},this),this.pop(t,s,null,i,null)},Dialog.prototype.selectNumber=function(t,e,i,n,o,s){for(var a=this.newElement("div"),r=this.newElement("select"),c=e;c<=i;c++){var h=this.newElement("option");h.value=c,h.textContent=c,r.appendChild(h)}r.value=n,a.appendChild(r),this.pop(t,a,null,o,function(){s(r.value)})},Dialog.prototype.showCards=function(t,e,i){var n=this.newElement("div");e.length?e.forEach(function(t){var e=this.newElement("div"),i=this.newCardImg(t.pid);e.appendChild(i),e.classList.add("card"),this.mouseover(e,t.pid),n.appendChild(e)},this):n.textContent=Localize("common","NO_CARDS"),this.pop(t,n,null,!1,i)},Dialog.prototype.selectCardId=function(t,e){function i(){var t=c.value;d=a.search(t),n()}function n(){p=0,h.innerHTML="",o()}function o(){for(var t=0;t=d.length)break;var n=d[i].pid,o=s.newElement("div"),a=s.newCardImg(n);o.appendChild(a),o.classList.add("card"),s.mouseover(o,n),o.onclick=function(t){s.close(),e(t)}.bind(null,n),h.appendChild(o),p++}}var s=this,a=this.searcher,r=this.newElement("div");r.style.textAlign="center";var c=this.newElement("input");c.setAttribute("placeholder","Search..."),c.type="text",c.style.textAlign="center",c.style.width="90%";var h=this.newElement("div");h.style.maxHeight="450px",h.style["overflow-y"]="auto",h.style.textAlign="left";var l=this.newElement("div");l.textContent="Show More...",l.style.color="blue",l.style.cursor="pointer",l.style.margin="1em 0",r.appendChild(c),r.appendChild(h),r.appendChild(l);var d=[],u=9,p=0;l.onclick=o,c.onchange=c.onkeyup=i,i(),this.pop(t,r,null,!1,null),r.style.minWidth=r.offsetWidth+"px",c.focus()},Dialog.prototype.selectCard=function(t,e,i,n){var o=this,s=this.newElement("div");e.forEach(function(t,e){var i=this.newElement("div"),a=this.newCardImg(t.pid);i.appendChild(a),i.classList.add("card"),this.mouseover(i,t.pid),i.onclick=function(t){o.close(),n(e)},s.appendChild(i)},this),this.pop(t,s,null,i,null)},Dialog.prototype.selectCardAdvanced=function(t,e,i,n,o,s,a,r){function c(){u.forEach(function(t,e){t.opt.classList.remove("disabled")},this);var t=s(d,h);l.okBtn.disabled=!t,o&&u.forEach(function(t,e){var i=d.indexOf(e)+1;t.num.textContent=i||"",l.center(t.num)},this)}function h(t){u[t].opt.classList.add("disabled")}i||(i=[]);var l=this,d=[],u=[],p=this.newElement("div");e.forEach(function(t,e){var n=this.newElement("div"),o=this.newCardImg(t.pid),s=this.newElement("div");s.textContent=i[e]||"";var a=this.newElement("div"),r=this.newElement("div");n.appendChild(o),n.appendChild(s),n.appendChild(a),n.appendChild(r),n.classList.add("card"),s.classList.add("txt"),a.classList.add("msk"),r.classList.add("num"),this.mouseover(n,t.pid);var h={opt:n,txt:s,msk:a,num:r};u[e]=h,n.onclick=function(t){!n.classList.contains("selected")&&n.classList.contains("disabled")||(n.classList.contains("selected")?removeFromArr(e,d):d.push(e),n.classList.toggle("selected"),c())},p.appendChild(n)},this),c(),l.pop(t,p,null,n,a.bind(null,d),r),u.forEach(function(t){this.center(t.txt)},this)},Dialog.prototype.selectSomeCards=function(t,e,i,n){var o=i.min||0,s=i.max;s||(s=i.targets?i.targets.length:e.length);var a,r=i.texts,c=i.canClose,h=i.careOrder,l=i.targets;a=o?null:n.bind(null,[]),this.selectCardAdvanced(t,e,r,c,h,function(t,i){l&&l.length&&e.forEach(function(t,e){inArr(t,l)||i(e)},this);var n=t.length;return n>=s?(e.forEach(function(t,e){i(e)},this),!0):n&&n>=o},function(t){l&&l.length&&l.length!==e.length&&(t=t.map(function(t){return l.indexOf(e[t])})),n(t)},a)},Dialog.prototype.selectEner=function(t,e,i,n,o,s){function a(t,e){for(var i=e.length,n=1<",this.io={reconnection:function(){},opts:{query:""}}}var e=[];return window.addEventListener("message",function(t){var i=t.source,n=t.data.name,o=t.data.data;"tick"!==n&&"tock"!==n&&console.log(JSON.stringify(t.data));for(var s=0;s64&&this.dialogue.removeChild(this.dialogue.firstChild),this.dialogue.scrollTop=this.dialogue.scrollHeight},ChatManager.prototype.clear=function(){this.dialogue.innerHTML=""};var $=document.getElementById.bind(document);window.applicationCache&&(applicationCache.addEventListener("progress",function(t){if($("div-notice").classList.add("shown"),t.loaded===t.total){$("div-notice").classList.add("green");var e=document.createElement("a");e.href=location.href,e.textContent=Localize.index("UPDATE_READY"),$("span-notice").innerHTML="",$("span-notice").appendChild(e)}else{var i=(t.loaded/t.total*100).toFixed(0)+"%";$("span-notice").textContent=Localize.index("UPDATING")+i}},!1),applicationCache.addEventListener("error",function(t){console.warn(t)},!1));var VERSION=69,serverVersion,clientId=0,game=null,position="",mayusRoom=!0,inroom=!1,blocking=!1,roomMsgObj=null,audio=new GameAudio,msgBox=new MessageBox,deckManager=new DeckManager,socket;if("?local=true"===location.search)socket=new FakeSocket(window.opener),window.socket=socket,window.game=game;else{console.log=function(){window._lastLog=arguments};var host=getProxy();host||(host=/:\d*$/.test(location.host)?location.host.replace(/:\d*$/,":2015"):location.host+":2015");var url=location.protocol+"//"+host;socket=io(url,{reconnection:!1,reconnectionDelay:3e3,reconnectionDelayMax:3e4,reconnectionAttempts:10})}"?debug"===location.search&&(window.socket=socket);var chatManager=new ChatManager(socket);$("span-set-proxy").onclick=function(){$("select-proxy").value=getProxy(),msgBox.preset("proxy")},$("proxy-button-ok").onclick=function(){var t=$("select-proxy").value;return getProxy()===t?void msgBox.close():(localStorage.setItem("proxy",t),void reload())},$("select-proxy").onchange=function(){"provide"===$("select-proxy").value&&msgBox.alert(Localize.index("PROVIDE_PROXY_SERVER"))},createjs.Ticker.on("tick",function(t){game&&game.update()}),initLanguage(),initInputValues(),initHall(),$("select-language").onchange=function(){Localize.setLanguage($("select-language").value),Localize.DOM("index")},socket.on("error",function(t){return audio.playBgm(),"MAX_SOCKETS_PER_IP"===t||"MAX_SOCKETS"===t?void msgBox.alert(t):void msgBox.alert(Localize.index("NET_WORK_ERROR"),reload)}),socket.on("disconnect",function(t){console.log("disconnect"),socket.io.reconnection()?msgBox.preset("reconnect"):(game=null,audio.playBgm(),msgBox.alert(Localize.index("DISCONNECTED"),reload))}),socket.on("reconnect_failed",function(t){msgBox.alert("RECONNECT_FAILED",reload)}),socket.on("reconnect_attempt",function(){console.log("reconnect_attempt"),socket.io.opts.query="clientId="+clientId}),socket.on("reconnect",function(t){console.log("reconnect")}),socket.on("error message",function(t){msgBox.alert(t)}),socket.on("client id",function(t){clientId=t,console.log("clientId = %s",t)}),socket.on("game reconnect",function(){console.log("game reconnect"),msgBox.close(),game.io.resend()}),socket.on("game reconnect failed",function(){console.log("game reconnect failed"),msgBox.alert(Localize.index("DROPPED"),initHall)}),socket.on("wait for reconnect",function(){console.log("wait for reconnect"),socket.io.reconnection(!1),enable($("wait-for-reconnect-button-drop"),!isSpectator()),msgBox.preset("wait-for-reconnect")}),$("wait-for-reconnect-button-drop").onclick=function(t){disable(this),socket.emit("drop")},socket.on("opponent reconnect",function(){console.log("opponent reconnect"),socket.io.reconnection(!0),msgBox.close()}),socket.on("version",function(t){serverVersion=t}),socket.on("game start",function(t){gameStart()}),socket.on("update room list",function(t){$("room-list").innerHTML="";var e=[];t.forEach(function(t){var i=document.createElement("li");t.mayusRoom||i.classList.add("no-mayus-room"),t.live?(i.textContent=t.roomName,i.classList.add("live"),i.onclick=watchLive.bind(null,t.roomName),e.push(i)):(i.textContent=t.roomName+" ("+t.count+"/"+t.total+")",t.passwordRequired&&i.classList.add("password-required"),i.onclick=joinRoom.bind(null,t.roomName,t.passwordRequired),$("room-list").appendChild(i))}),e.forEach(function(t){$("room-list").appendChild(t)})}),socket.on("update online counter",function(t){$("span-online-counter").textContent=t}),function(){function t(){i=!1,e=Date.now(),socket.emit("tick"),setTimeout(function(){i||($("span-latency").classList.add("warn"),$("span-latency").textContent=">500ms")},1e3)}var e=0,i=!1;socket.on("tock",function(){i=!0;var n=Math.round((Date.now()-e)/2);n<500&&($("span-latency").textContent=n+"ms",$("span-latency").classList.remove("warn")),setTimeout(t,1e3)}),t()}();for(var elements=[$("room-guest-nickname")],i=0;i<5;i++){elements.push($("host-spectator-"+i)),elements.push($("guest-spectator-"+i));var checkbox=$("checkbox-spectator-"+i);checkbox.onchange=function(t,e){return blocking?e.returnValue=!1:(this.checked?socket.emit("unlockSpec",t):socket.emit("lockSpec",t),void(blocking=!0))}.bind(checkbox,i)}socket.on("update room",function(t){roomMsgObj=t,updateRoom(t)}),socket.on("host left",function(){initHall()}),socket.on("kicked",function(){initHall()}),$("span-leave-room").onclick=function(){socket.emit("leaveRoom"),initHall()},socket.on("wrong password",function(){msgBox.alert(Localize.index("WRONG_PASSWORD"))}),socket.on("host disconnected",function(){if(game){var t=Localize.index("OPPONENT_DISCONNECTED");"host-spectator"===position&&(t=Localize.index("SELF_DISCONNECTED")),msgBox.alert(t,initHall)}else initHall()}),socket.on("guest disconnected",function(){var t=Localize.index("OPPONENT_DISCONNECTED");"guest-spectator"===position&&(t=Localize.index("SELF_DISCONNECTED")),msgBox.alert(t,initHall)}),$("span-surrender").onclick=function(){game&&msgBox.confirm(Localize.index("CONFIRM_SURRENDER"),function(t){t&&socket.emit("surrender")})},$("span-leave-game").onclick=function(){game&&(playingReplay||socket.emit("leaveRoom"),initHall())},socket.on("surrendered",function(){game&&game.lose(!0)}),socket.on("opponent surrendered",function(){game&&game.win(!0)}),$("button-create-room").onclick=function(t){if(checkVersion()){if(!$("input-nickame").value)return void msgBox.alert(Localize.index("PLEASE_INPUT_A_NICKNAME"),function(){$("input-nickame").focus()});if(!$("input-room-name").value)return void msgBox.alert(Localize.index("PLEASE_INPUT_A_ROOM_NAME"),function(){$("input-room-name").focus()});mayusRoom=$("checkbox-mayus-room").checked,initDeckOptions()&&(localStorage.setItem("room name",$("input-room-name").value),localStorage.setItem("nickname",$("input-nickame").value),localStorage.setItem("password",$("input-create-room-password").value),socket.emit("createRoom",{roomName:$("input-room-name").value,nickname:$("input-nickame").value,password:$("input-create-room-password").value,mayusRoom:mayusRoom}))}},$("input-ready").onchange=function(t){if(blocking)return t.returnValue=!1;if($("input-ready").checked){var e=deckManager.loadDeck($("select-decks").value);if(!e)return void msgBox.alert(Localize.index("FAILED_TO_READ_DECK"),function(){$("input-ready").checked=!1});disable($("select-decks")),socket.emit("ready",e),blocking=!0}else enable($("select-decks")),socket.emit("unready"),blocking=!0},$("button-start-game").onclick=function(t){if(blocking)return t.returnValue=!1;var e=deckManager.loadDeck($("select-decks").value);if(!e)return void msgBox.alert(Localize.index("FAILED_TO_READ_DECK"));var i=e;i.live=$("input-live").checked,localStorage.setItem("live",i.live),socket.emit("startGame",i),blocking=!0},$("link-edit-deck").onclick=function(t){return window.open($("link-edit-deck").href),t.preventDefault(), +!1};var oldRoomName="";$("room-name").onblur=handleRenameRoom,$("room-name-form").onsubmit=handleRenameRoom;var stopFetchingLive=0,watchingLive=!1;socket.on("liveData",function(t){return stopFetchingLive?void stopFetchingLive--:t?(msgBox.close(),watchingLive=!0,gameStart("live"),game.skip=!0,t.forEach(function(t,e){game.io.receiveGameMessage({buffer:[{id:e,data:t}]})}),game.handleMsgQueue(),void(game.skip=!1)):void msgBox.alert(Localize.index("FAILED_TO_FETCH_DATA"))});var stopFetchingReplay=!1;socket.on("replayList",function(t){$("replay-list").innerHTML="",t.forEach(function(t){var e=newElement("li"),i=CardInfo[t.selfLrig],n=CardInfo[t.opponentLrig],o=Localize.classes(i)+" vs "+Localize.classes(n);o=o.replace(/\n/g,""),e.textContent=o,e.onclick=getReplayContent.bind(null,t.id),$("replay-list").appendChild(e)})}),socket.on("replayContent",function(t){if(!stopFetchingReplay){if(!t)return void msgBox.alert(Localize.index("FAILED_TO_FETCH_DATA"));msgBox.close(),playReplayContent(t)}}),socket.on("chat",function(t){var e=["host","host-spectator"],i=["guest","guest-spectator"],n=["host-spectator","guest-spectator"],o=inArr(position,e)&&inArr(t.position,i)||inArr(position,i)&&inArr(t.position,e),s=inArr(t.position,n);chatManager.addMsg(t.nickname,t.content,o,s)}),$("checkbox-bgm").onchange=function(t){audio.disableBgm(!$("checkbox-bgm").checked)},$("checkbox-sound-effect").onchange=function(t){audio.disableSoundEffect(!$("checkbox-sound-effect").checked)};var playingReplay=!1;$("span-play-replay").onclick=function(t){$("input-replay-file").value=null,msgBox.preset("replay"),updateReplayList()},$("button-replay-return").onclick=function(t){msgBox.close()},$("input-replay-file").onchange=function(t){readAndPlayReplayFile()},window.onbeforeunload=function(t){if(game&&"?local=true"!==location.search){var e=Localize.index("CONFIRM_CLOSE");return t.returnValue=e,e}},checkDomain(),/iPhone|Android/i.test(navigator.userAgent)&&($("link-edit-deck").onclick=function(t){window.confirm("Do you like to try our new DeckEditor for mobile phone?")&&(t.preventDefault(),location="/next/")}); \ No newline at end of file