(()=>{"use strict";var t,e={3489:(t,e,n)=>{var r=n(1053),a=n(6820);$((function(){var t;t=$("#destNationID"),(0,r.x)({isDetailMap:!1,clickableAll:!0,neutralView:!0,useCachedMap:!0,selectCallback:function(e){var n=function(t){if(null==t)throw new a.m;return t}(t.val());return!!e.nationID&&(t.val(e.nationID).trigger("change"),null===t.val()&&t.val(n).trigger("change"),!1)}})}))},1053:(t,e,n)=>{n.d(e,{x:()=>A}),n(8674),n(2526),n(1817),n(2165),n(7042),n(1038),n(7941),n(7327),n(5003),n(9337);var r=n(1763),a=n.n(r),o=n(2205),i=n.n(o),c=(n(5666),n(4916),n(3123),n(4747),n(2222),n(9826),n(1249),n(6992),n(1539),n(189),n(8783),n(3948),n(9669)),l=n.n(c),s=n(9755),u=n.n(s),f=(n(5306),n(2479),n(9714),n(1058),n(4723),n(3210),n(6820));function p(t){if(null==t)throw new f.m;return t}function d(t){for(var e={},n=0,r=Object.values(t);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){c=!0,o=t},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw o}}}}function C(t,e){if(t){if("string"==typeof t)return S(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(t,e):void 0}}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&e.attr("href",h.format(t.id)),y&&e.on("click",(function(){return y(t)}))})),t},A=function(t){var r=u()(n+" .city_tooltip"),a=r.find(".city_name"),o=r.find(".nation_name"),i=u()(n+" .city_link"),c=u()(n+" .map_body");return!e.neutralView&&D()&&(i.on("touchstart",(function(t){if(window.sam_toggleSingleTap)return!0;var e=u()(this),n=e.data("touchMode");a.data("target")!=e.data("id")||void 0===n?e.data("touchMode",1):e.data("touchMode",n+1),c.data("touchMode",1),a.data("target",e.data("id"))})),i.on("touchend",(function(){if(window.sam_toggleSingleTap)return!0;var t=u()(this),e=t.parent().position();a.html(t.data("text"));var n=t.data("nation");n?o.html(n).show():o.html("").hide();var i=e.left,l=e.top,s=c.data("scale");if(s&&(i/=s,l/=s),r.css({top:l+25,left:i+35}).show(),t.data("touchMode")<=1)return!1;t.data("touchMode",0)})),c.on("touchend",(function(){if(window.sam_toggleSingleTap)return!0;r.hide()}))),c.on("mousemove",(function(t){if(u()(this).data("touchMode"))return!0;var e=this.getBoundingClientRect(),n=t.clientX-e.left-this.clientLeft+this.scrollLeft,a=t.clientY-e.top-this.clientTop+this.scrollTop,o=c.data("scale");o&&(n/=o,a/=o),r.css({top:a+10,left:n+10})})),i.on("mouseenter",(function(){if(c.data("touchMode"))return!0;var t=u()(this);a.data("target",t.data("id")),a.html(t.data("text"));var e=t.data("nation");e?o.html(e).show():o.html("").hide(),r.show()})),i.on("mouseleave",(function(){r.hide()})),i.on("click",(function(){var t=u()(this).data("touchMode");if(void 0!==t)return 1!==t&&void 0})),t},I=function(t){var e=u()("".concat(n," .map_body")),a=t.cityList,o=t.myCity;return a.forEach((function(t){var n=t.id;u()(".city_base_".concat(n)).detach();var r=u()('
'));r.addClass("city_level_".concat(t.level)),r.data("obj",t).css({left:t.x-20,top:t.y-15});var a=u()('');a.data({text:t.text,nation:t.nation,id:t.id}),r.append(a);var o=u()('
');if(void 0!==t.color&&o.css({"background-color":t.color}),a.append(o),t.state>0){var i="wrong";t.state<10?i="good":t.state<40?i="bad":t.state<50&&(i="war");var c=u()('
'));o.append(c)}if(t.isCapital){var l=u()('
');o.append(l)}var s=u()(''.concat(t.name,"").format());o.append(s),e.append(r)})),o&&r.find(".city_base_".concat(o," .city_filler")).addClass("my_city"),t},T=function(t){var e=u()(n+" .map_body"),a=t.cityList,o=t.myCity;return a.forEach((function(t){var n=t.id;u()(".city_base_".concat(n)).detach();var r=u()('
'));if(r.addClass("city_level_".concat(t.level)),r.data("obj",t).css({left:t.x-20,top:t.y-15}),void 0!==t.color){var a=u()('
');r.append(a),a.css({"background-image":"url({0}/b{1}.png)".format(window.pathConfig.gameImage,m(t.color))})}var o=u()('');o.data({text:t.text,nation:t.nation,id:t.id}),r.append(o);var i=u()('
'));if(o.append(i),t.state>0){var c=u()('
'));o.append(c)}if(t.nationID&&t.nationID>0){var l=t.supply?"f":"d",s=u()('
'));if(t.isCapital){var f=u()('
'));s.append(f)}i.append(s)}var d=u()(''.concat(t.name,""));i.append(d),e.append(r)})),o&&r.find(".city_base_".concat(o," .city_filler")).addClass("my_city"),t},j=function(){return(j=M(regeneratorRuntime.mark((function t(e){var n,r,a,o,i,c,l,s,u,p,m;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return p=function(t){var e=t.id,n=t.nationID,r=16;return e in o&&(r|=o[e]<<3),null!==l&&n==l&&(r|=4),i.has(e)&&(r|=2),null!==c&&e==c&&(r|=2),f&&(r|=1),x(x({},t),{},{clickable:r})},u=function(t){var e=t.nationID;if(void 0===e||!(e in a))return x(x({},t),{},{isCapital:!1});var n=a[e];return x(x({},t),{},{nation:n.name,color:n.color,isCapital:n.capital==t.id})},s=function(t){var e=t.id;if(!(e in v))throw TypeError("알수 없는 cityID: ".concat(e));var n=k(v[e],3),r=n[0],a=n[1],o=n[2];return x(x({},t),{},{name:r,x:a,y:o})},r=function(t){var e=k(t,4);return{id:e[0],name:e[1],color:e[2],capital:e[3]}},n=function(t){var e=k(t,6),n=e[0],r=e[1],a=e[2],o=e[3];return{id:n,level:r,state:a,nationID:o>0?o:void 0,region:e[4],supply:0!=e[5]}},a=d(e.nationList.map(r)),o=e.spyList,i=new Set(e.shownByGeneralList),c=e.myCity,l=e.myNation,m=e.cityList.map(n).map(s).map(u).map(p).map(window.formatCityInfo),t.abrupt("return",{cityList:m,myCity:c});case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)},F=function(t){return j.apply(this,arguments)},S=function(){return(S=M(regeneratorRuntime.mark((function t(n){var a,o,i,c,l,f,p,d,m,y,h,v;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=function(){var t=r.data("currentTheme"),e=n.theme;t!==e&&(t&&r.removeClass("map_theme_"+t),r.addClass("map_theme_"+e),r.data("currentTheme",null!=e?e:"_current"))},e.dynamicMapTheme&&a(),o=n.startYear,i=n.year,c=n.month,s?r.addClass("map_detail").removeClass("map_basic"):r.addClass("map_basic").removeClass("map_detail"),l=u()(".map_title_text"),i0&&(m-=1),m&&d.push("{0}년".format(m)),y&&d.push("{0}개월".format(y)),p.push("초반제한 기간 : {0} ({1}년)".format(d.join(" "),o+3))),h=Math.floor(Math.max(0,i-o)/5)+1,v=5*h+o,p.push("기술등급 제한 : {0}등급 ({1}년 해제)".format(h,v,h+1)),f.html(p.join("
")),r.removeClass("map_string map_summer map_fall map_winter"),c<=3?r.addClass("map_spring"):c<=6?r.addClass("map_summer"):c<=9?r.addClass("map_fall"):r.addClass("map_winter"),l.html("{0}年 {1}月".format(i,c)),t.abrupt("return",n);case 20:case"end":return t.stop()}}),t)})))).apply(this,arguments)},C=function(t){return S.apply(this,arguments)},_=function(){return(_=M(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.result){t.next=2;break}throw"fail: ".concat(e.reason);case 2:if(a()(e.startYear)&&a()(e.year)&&a()(e.month)){t.next=4;break}throw"fail: date type";case 4:return c&&(localStorage.setItem(g,JSON.stringify([serverID,e])),localStorage.setItem(b,JSON.stringify(e.startYear))),r.removeClass("draw_required"),t.abrupt("return",e);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)},w=function(t){return _.apply(this,arguments)},n=U.length>1&&void 0!==U[1]?U[1]:".world_map",0!=(r=u()(n)).length){t.next=15;break}return t.abrupt("return");case 15:return o={isDetailMap:!0,clickableAll:!1,selectCallback:void 0,hrefTemplate:"#",useCachedMap:!1,year:void 0,month:void 0,aux:void 0,neutralView:!1,showMe:!0,targetJson:"j_map.php",reqType:"post",dynamicMapTheme:!1,callback:void 0,startYear:void 0},e=i()({},o,e),c=e.useCachedMap,s=e.isDetailMap,f=e.clickableAll,y=e.selectCallback,h=p(e.hrefTemplate),v=window.getCityPosition(),g="sam.".concat(serverNick,".map"),b="am.".concat(serverNick,".startYear"),R=r.find(".map_toggle_cityname"),"yes"==localStorage.getItem("sam.hideMapCityName")&&(r.addClass("hide_cityname"),R.addClass("active").attr("aria-pressed","true")),R.click((function(){R.hasClass("active")?(r.removeClass("hide_cityname"),localStorage.setItem("sam.hideMapCityName","no")):(r.addClass("hide_cityname"),localStorage.setItem("sam.hideMapCityName","yes"))})),N=r.find(".map_toggle_single_tap"),"yes"==localStorage.getItem("sam.toggleSingleTap")?(window.sam_toggleSingleTap=!0,N.addClass("active").attr("aria-pressed","true")):window.sam_toggleSingleTap=!1,B=u()(n+" .map_body"),N.click((function(){N.hasClass("active")?(localStorage.setItem("sam.toggleSingleTap","no"),window.sam_toggleSingleTap=!1):(B.removeData("touchMode"),localStorage.setItem("sam.toggleSingleTap","yes"),window.sam_toggleSingleTap=!0)})),s?r.addClass("map_detail"):r.removeClass("map_datail"),L=l()({url:p(e.targetJson),method:p(e.reqType),responseType:"json",data:O({data:JSON.stringify({neutralView:e.neutralView,year:e.year,month:e.month,showMe:e.showMe,aux:e.aux})})}),t.next=36,L;case 36:return J=t.sent,Y=J.data,t.next=40,w(Y).then(C).then(F).then(s?T:I).then(A).then(E).then(P);case 40:if(q=t.sent,e.callback&&e.callback(q,Y),!r.hasClass("draw_required")){t.next=53;break}if(!c){t.next=48;break}return t.next=46,M(regeneratorRuntime.mark((function t(){var e,n,r,a,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=localStorage.getItem(g)){t.next=3;break}return t.abrupt("return");case 3:if(n=JSON.parse(e),r=k(n,2),a=r[0],o=r[1],a==serverID){t.next=6;break}return t.abrupt("return");case 6:return t.next=8,C(o).then(F).then(s?T:I).then(A).then(E).then(P);case 8:case"end":return t.stop()}}),t)})))();case 46:t.next=53;break;case 48:if(!e.year||!e.month){t.next=53;break}return V=localStorage.getItem(b),$=V?JSON.parse(V):e.year,t.next=53,C({year:e.year,month:e.month,startYear:$});case 53:case"end":return t.stop()}}),t)})))).apply(this,arguments)}n(9720),window.reloadWorldMap=A,u()((function(t){D()&&t(".map_body .map_toggle_single_tap").show()}))},6820:(t,e,n)=>{function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?i(t):e}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t){var e="function"==typeof Map?new Map:void 0;return(c=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return l(t,arguments,f(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,t)})(t)}function l(t,e,n){return(l=s()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var a=new(Function.bind.apply(t,r));return n&&u(a,n.prototype),a}).apply(null,arguments)}function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{m:()=>d}),n(2222),n(8304),n(489),n(2772),n(1539),n(9714),n(2419),n(6992),n(1532),n(8783),n(3948),n(2526),n(1817),n(2165);var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(c,t);var e,n,r=(e=c,n=s(),function(){var t,r=f(e);if(n){var a=f(this).constructor;t=Reflect.construct(r,arguments,a)}else t=r.apply(this,arguments);return o(this,t)});function c(){var t;a(this,c);for(var e=arguments.length,n=new Array(e),o=0;o{if(!n){var i=1/0;for(u=0;u=o)&&Object.keys(r.O).every((t=>r.O[t](n[l])))?n.splice(l--,1):(c=!1,o0&&t[u-1][2]>o;u--)t[u]=t[u-1];t[u]=[n,a,o]},r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),r.j=969,(()=>{var t={969:0,842:0};r.O.j=e=>0===t[e];var e=(e,n)=>{var a,o,[i,c,l]=n,s=0;if(i.some((e=>0!==t[e]))){for(a in c)r.o(c,a)&&(r.m[a]=c[a]);if(l)var u=l(r)}for(e&&e(n);sr(3489)));a=r.O(a)})(); //# sourceMappingURL=defaultSelectNationByMap.js.map