Files
core/hwe/js/troop.js
T
2021-08-22 02:40:27 +09:00

2 lines
11 KiB
JavaScript

(()=>{"use strict";var t,e={9754:(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 o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?c(t):e}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a(t){var e="function"==typeof Map?new Map:void 0;return(a=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 u(t,arguments,f(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),s(r,t)})(t)}function u(t,e,n){return(u=l()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&s(o,n.prototype),o}).apply(null,arguments)}function l(){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 s(t,e){return(s=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(4916),n(5306),n(2479),n(1539),n(9714),n(1058),n(6992),n(189),n(8783),n(3948),n(4723),n(7042),n(9826),n(3123),n(3210),n(1038),n(2526),n(1817),n(2165),n(2222),n(8304),n(489),n(2772),n(2419),n(1532);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&&s(t,e)}(a,t);var e,n,r=(e=a,n=l(),function(){var t,r=f(e);if(n){var o=f(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return i(this,t)});function a(){var t;o(this,a);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return p(c(t=r.call.apply(r,[this].concat(n))),"name","NotNullExpected"),t}return a}(a(TypeError));function h(t){if(null==t)throw new d;return t}var y=n(9755),b=n.n(y),v=(n(3734),n(9669)),g=n.n(v);function m(){alert("작업을 실패했습니다.")}function w(t){return(w="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 O(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function j(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _(t,e){return!e||"object"!==w(e)&&"function"!=typeof e?x(t):e}function x(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function S(t){var e="function"==typeof Map?new Map:void 0;return(S=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 T(t,arguments,k(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),P(r,t)})(t)}function T(t,e,n){return(T=R()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&P(o,n.prototype),o}).apply(null,arguments)}function R(){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 P(t,e){return(P=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function k(t){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function E(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}g().defaults.headers.common["X-Requested-With"]="XMLHttpRequest",String.prototype.format=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.replace(/{(\d+)}/g,(function(t,n){return void 0!==e[n]?e[n].toString():t}))},n(5666),n(4986),n(8674);var M=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&&P(t,e)}(c,t);var e,n,r,o,i=(e=c,n=R(),function(){var t,r=k(e);if(n){var o=k(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return _(this,t)});function c(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return O(this,c),E(x(t=i.call(this,e)),"name","RuntimeError"),t.message=e,t}return r=c,(o=[{key:"toString",value:function(){return this.message?this.name+": "+this.message:this.name}}])&&j(r.prototype,o),c}(S(Error));function C(t,e,n,r,o,i,c){try{var a=t[i](c),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(r,o)}function F(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function c(t){C(i,r,o,c,a,"next",t)}function a(t){C(i,r,o,c,a,"throw",t)}c(void 0)}))}}b()((function(t){t("#btnLeaveTroop").click((function(){return!!confirm("정말 부대를 탈퇴하시겠습니까?")&&(t.post({url:"j_troop.php",dataType:"json",data:{action:"부대탈퇴"}}).then((function(t){console.log(t),t.result||(alert(t.reason),location.reload()),location.reload()}),m),!1)})),t("#btnCreateTroop").click((function(){return t.post({url:"j_troop.php",dataType:"json",data:{action:"부대창설",name:t("#nameplate").val()}}).then((function(t){console.log(t),t.result||(alert(t.reason),location.reload()),location.reload()}),m),!1})),t("#btnChangeTroopName").click((function(){return t.post({url:"j_troop.php",dataType:"json",data:{action:"부대변경",name:t("#nameplate").val()}}).then((function(t){console.log(t),t.result||(alert(t.reason),location.reload()),location.reload()}),m),!1})),t("#btnKickTroop").click((function(){return t.post({url:"j_troop.php",dataType:"json",data:{action:"부대추방",gen:t("#genNo").val()}}).then((function(t){console.log(t),t.result||(alert(t.reason),location.reload()),location.reload()}),m),!1})),t("#btnJoinTroop").click((function(){return t.post({url:"j_troop.php",dataType:"json",data:{action:"부대가입",troop:t(".troopId:checked").val()}}).then((function(t){console.log(t),t.result||(alert(t.reason),location.reload()),location.reload()}),m),!1})),function(t){var e,n={},r=(e=document.location.pathname).substring(0,e.lastIndexOf("/")),o=t("<div id='on_mover' style='position:absolute;'><table class='tb_layout bg0' style='width:100%;'><thead><tr><td width=98 class='bg1 center'>이 름</td><td width=98 class='bg1 center'>통무지</td><td width=53 class='bg1 center'>자 금</td><td width=53 class='bg1 center'>군 량</td><td width=48 class='bg1 center'>도시</td><td width=28 class='bg1 center'>守</td><td width=58 class='bg1 center'>병 종</td><td width=63 class='bg1 center'>병 사</td><td width=38 class='bg1 center'>훈련</td><td width=38 class='bg1 center'>사기</td><td width=213 class='bg1 center'>명 령</td><td width=38 class='bg1 center'>삭턴</td><td width=48 class='bg1 center'>턴</td></tr></thead></thead><tbody class='content'></tbody></table></div>");o.find("thead td"),o.css("width","960px").css("margin","0").css("padding","0").css("left","50%").css("margin-left","-480px"),o.hide();var i=function(){var e=F(regeneratorRuntime.mark((function e(){var i,c,a,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},(i=t("#on_mover .content")).html(""),e.next=5,g().get("".concat(r,"/b_genList.php"),{responseType:"text"});case 5:c=e.sent,a=c.data;try{u=t(a),function(){var e=void 0;if(u.each((function(){if("general_list"==t(this).attr("id"))return e=t(this),!1})),void 0===e)throw new M;return e}().find("tbody > tr").each((function(){var e=t(this),r=e.children(".i_troop");if("-"!=t.trim(r.text())){r.remove();var o=parseInt(e.data("general-id"));n[o]=e,e.hide(),i.append(e)}})),t(".troopUser").hover((function(){var e=t(this),r=e.closest("tr"),i=parseInt(e.data("general-id"));console.log(i);var c=h(r.offset()).top+h(r.outerHeight());o.css("top",c),n[i].show(),o.show()}),(function(){var e=t(this),r=parseInt(e.data("general-id"));n[r].hide(),o.hide()}))}catch(t){console.log(t)}case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),c=t("table:eq(0) td:eq(0)");c.find("br:last").remove();var a=t('<input type="button" value="암행부 연동">');a.click(F(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i();case 2:case"end":return t.stop()}}),t)})))),c.append(a),window.userList=n,t("body").append(o)}(t)}))}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={id:t,loaded:!1,exports:{}};return e[t].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.m=e,t=[],r.O=(e,n,o,i)=>{if(!n){var c=1/0;for(s=0;s<t.length;s++){for(var[n,o,i]=t[s],a=!0,u=0;u<n.length;u++)(!1&i||c>=i)&&Object.keys(r.O).every((t=>r.O[t](n[u])))?n.splice(u--,1):(a=!1,i<c&&(c=i));if(a){t.splice(s--,1);var l=o();void 0!==l&&(e=l)}}return e}i=i||0;for(var s=t.length;s>0&&t[s-1][2]>i;s--)t[s]=t[s-1];t[s]=[n,o,i]},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=48,(()=>{var t={48:0};r.O.j=e=>0===t[e];var e=(e,n)=>{var o,i,[c,a,u]=n,l=0;if(c.some((e=>0!==t[e]))){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(u)var s=u(r)}for(e&&e(n);l<c.length;l++)i=c[l],r.o(t,i)&&t[i]&&t[i][0](),t[c[l]]=0;return r.O(s)},n=self.webpackChunkhidche_lib=self.webpackChunkhidche_lib||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})();var o=r.O(void 0,[216],(()=>r(9754)));o=r.O(o)})();
//# sourceMappingURL=troop.js.map