mirror of
https://github.com/mhwikicn/mhdos-armor-set-searcher
synced 2025-12-06 13:39:03 +08:00
49 lines
117 KiB
JavaScript
49 lines
117 KiB
JavaScript
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"gZ5g":[function(require,module,exports) {
|
|
"use strict";function t(e){return(t="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})(e)}function e(t,e){return o(t)||n(t,e)||i(t,e)||r()}function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,u=[],i=!0,c=!1;try{for(r=r.call(t);!(i=(n=r.next()).done)&&(u.push(n.value),!e||u.length!==e);i=!0);}catch(a){c=!0,o=a}finally{try{i||null==r.return||r.return()}finally{if(c)throw o}}return u}}function o(t){if(Array.isArray(t))return t}function u(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=i(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 u,c=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){a=!0,u=t},f:function(){try{c||null==r.return||r.return()}finally{if(a)throw u}}}}function i(t,e){if(t){if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e,r){return e&&f(t.prototype,e),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function y(){return(y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=s(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function s(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=j(t)););return t}function p(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&O(t,e)}function b(t){var e=w();return function(){var r,n=j(t);if(e){var o=j(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return v(this,r)}}function v(e,r){if(r&&("object"===t(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t){var e="function"==typeof Map?new Map:void 0;return(d=function(t){if(null===t||!g(t))return t;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 m(t,arguments,j(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),O(r,t)})(t)}function m(t,e,r){return(m=w()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&O(o,r.prototype),o}).apply(null,arguments)}function w(){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 g(t){return-1!==Function.toString.call(t).indexOf("[native code]")}function O(t,e){return(O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function j(t){return(j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(exports,"__esModule",{value:!0});var S=function(t){p(n,d(Map));var r=b(n);function n(){return a(this,n),r.apply(this,arguments)}return l(n,[{key:"get",value:function(t){return y(j(n.prototype),"get",this).call(this,t)||0}},{key:"add",value:function(t,e){this.set(t,e+this.get(t))}},{key:"addSkills",value:function(t){var r,n=u(t);try{for(n.s();!(r=n.n()).done;){var o=e(r.value,2),i=o[0],c=o[1];this.add(i,c)}}catch(a){n.e(a)}finally{n.f()}}},{key:"substract",value:function(t,e){this.set(t,e+this.get(t))}},{key:"substractSkills",value:function(t){var r,n=u(t);try{for(n.s();!(r=n.n()).done;){var o=e(r.value,2),i=o[0],c=o[1];this.substract(i,c)}}catch(a){n.e(a)}finally{n.f()}}},{key:"multiply",value:function(t){var r,n=u(this);try{for(n.s();!(r=n.n()).done;){var o=e(r.value,2),i=o[0],c=o[1];this.set(i,c*t)}}catch(a){n.e(a)}finally{n.f()}}}]),n}();exports.default=S;
|
|
},{}],"mrro":[function(require,module,exports) {
|
|
"use strict";function t(r){return(t="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})(r)}var r=this;function e(){e=function(){return r};var r={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,r,e){t[r]=e.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(N){f=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var o=r&&r.prototype instanceof v?r:v,a=Object.create(o.prototype),u=new O(n||[]);return i(a,"_invoke",{value:L(t,e,u)}),a}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(N){return{type:"throw",arg:N}}}r.wrap=l;var h={};function v(){}function d(){}function y(){}var m={};f(m,u,function(){return this});var g=Object.getPrototypeOf,w=g&&g(g(S([])));w&&w!==n&&o.call(w,u)&&(m=w);var x=y.prototype=v.prototype=Object.create(m);function b(t){["next","throw","return"].forEach(function(r){f(t,r,function(t){return this._invoke(r,t)})})}function k(r,e){var n;i(this,"_invoke",{value:function(i,a){function u(){return new e(function(n,u){!function n(i,a,u,c){var s=p(r[i],r,a);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==t(l)&&o.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(l).then(function(t){f.value=t,u(f)},function(t){return n("throw",t,u,c)})}c(s.arg)}(i,a,n,u)})}return n=n?n.then(u,u):u()}})}function L(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=_(a,e);if(u){if(u===h)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var c=p(t,r,e);if("normal"===c.type){if(n=e.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n="completed",e.method="throw",e.arg=c.arg)}}}function _(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,_(t,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=p(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,h;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function j(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function E(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function S(t){if(t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function r(){for(;++e<t.length;)if(o.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return n.next=n}}return{next:P}}function P(){return{value:void 0,done:!0}}return d.prototype=y,i(x,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:d,configurable:!0}),d.displayName=f(y,s,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===d||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,f(t,s,"GeneratorFunction")),t.prototype=Object.create(x),t},r.awrap=function(t){return{__await:t}},b(k.prototype),f(k.prototype,c,function(){return this}),r.AsyncIterator=k,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new k(l(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},b(x),f(x,s,"Generator"),f(x,u,function(){return this}),f(x,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),E(e),h}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;E(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:S(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),h}},r}var n=this&&this.__awaiter||function(t,r,e,n){return new(e||(e=Promise))(function(o,i){function a(t){try{c(n.next(t))}catch(r){i(r)}}function u(t){try{c(n.throw(t))}catch(r){i(r)}}function c(t){t.done?o(t.value):new e(function(r){r(t.value)}).then(a,u)}c((n=n.apply(t,r||[])).next())})},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});var i=o(require("./models/equipment/EquipmentSkills")),a=7;exports.MAX_RARITY=a;var u=83;exports.TORSO_UP_ID=u;var c={name:"None",type:-1,defense:{base:0,max:0,maxLr:0},resistance:[0,0,0,0,0],category:-1,slots:0,rarity:0,skills:new i.default,isGeneric:!0};exports.DUMMY_PIECE=c;var s=function(t){return n(r,void 0,void 0,e().mark(function r(){return e().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,fetch(t);case 2:return r.abrupt("return",r.sent.json());case 3:case"end":return r.stop()}},r)}))},f=function(t){return n(r,void 0,void 0,e().mark(function r(){var n;return e().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,s(t);case 2:return n=r.sent,r.abrupt("return",n.map(function(t){var r=new i.default;for(var e in t.skills){var n=t.skills[e];r.set(parseInt(e),n)}return Object.assign({},t,{skills:r})}));case 4:case"end":return r.stop()}},r)}))},l=function(){return n(r,void 0,void 0,e().mark(function t(){return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",f("./head.json"));case 1:case"end":return t.stop()}},t)}))};exports.getHead=l;var p=function(){return n(r,void 0,void 0,e().mark(function t(){return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",f("./chest.json"));case 1:case"end":return t.stop()}},t)}))};exports.getChest=p;var h=function(){return n(r,void 0,void 0,e().mark(function t(){return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",f("./arms.json"));case 1:case"end":return t.stop()}},t)}))};exports.getArms=h;var v=function(){return n(r,void 0,void 0,e().mark(function t(){return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",f("./waist.json"));case 1:case"end":return t.stop()}},t)}))};exports.getWaist=v;var d=function(){return n(r,void 0,void 0,e().mark(function t(){return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",f("./legs.json"));case 1:case"end":return t.stop()}},t)}))};exports.getLegs=d;var y=function(){return n(r,void 0,void 0,e().mark(function t(){return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",f("./decorations.json"));case 1:case"end":return t.stop()}},t)}))};exports.getDecorations=y;var m=function(){return n(r,void 0,void 0,e().mark(function t(){var r,n,o;return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s("./skill-names.json");case 2:for(o in r=t.sent,n=new Map,r)n.set(parseInt(o),r[o]);return t.abrupt("return",n);case 6:case"end":return t.stop()}},t)}))};exports.getSkillNameMap=m;var g=function(){return n(r,void 0,void 0,e().mark(function t(){return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("./skill-categories.json"));case 1:case"end":return t.stop()}},t)}))};exports.getSkillCategories=g;var w=function(){return n(r,void 0,void 0,e().mark(function t(){var r,n,o,i;return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s("./skills.json");case 2:for(i in r=t.sent,n=new Map,o=function(t){var e=parseInt(t);n.set(e,r[t].map(function(t){return Object.assign({},t,{requiredSkill:e})}))},r)o(i);return t.abrupt("return",n);case 7:case"end":return t.stop()}},t)}))};exports.getSkillActivationMap=w;
|
|
},{"./models/equipment/EquipmentSkills":"gZ5g"}],"cuDj":[function(require,module,exports) {
|
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.range=function(e,r){return Array.from({length:r-e},function(r,t){return t+e})};
|
|
},{}],"XByd":[function(require,module,exports) {
|
|
"use strict";var e;Object.defineProperty(exports,"__esModule",{value:!0}),function(e){e[e.HEAD=0]="HEAD",e[e.CHEST=1]="CHEST",e[e.ARMS=2]="ARMS",e[e.WAIST=3]="WAIST",e[e.LEGS=4]="LEGS",e[e.CHARM=5]="CHARM",e[e.WEAPON=6]="WEAPON"}(e||(e={})),exports.default=e;
|
|
},{}],"He0k":[function(require,module,exports) {
|
|
"use strict";function t(t){return e(t)||n(t)||u(t)||r()}function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function e(t){if(Array.isArray(t))return l(t)}function i(t,r){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=u(t))||r&&t&&"number"==typeof t.length){n&&(t=n);var e=0,i=function(){};return{s:i,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:i}}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,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function o(t,r){return c(t)||f(t,r)||u(t,r)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t,r){if(t){if("string"==typeof t)return l(t,r);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)?l(t,r):void 0}}function l(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}function f(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var e,i,o=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(e=n.next()).done)&&(o.push(e.value),!r||o.length!==r);a=!0);}catch(l){u=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(u)throw i}}return o}}function c(t){if(Array.isArray(t))return t}function s(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function y(t,r){for(var n=0;n<r.length;n++){var e=r[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function p(t,r,n){return r&&y(t.prototype,r),n&&y(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var h=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});var m=require("../../../helper/range.helper"),v=h(require("../equipment/EquipmentCategory")),d=h(require("../equipment/EquipmentSkills")),b=function(){function r(){s(this,r),this.list=[]}return p(r,[{key:"get",value:function(){return this.list}},{key:"add",value:function(t){return this.list.push(t)}},{key:"remove",value:function(t){this.list=this.list.filter(function(r,n){return n!==t})}},{key:"serialize",value:function(t){return this.list.map(function(r){var n=[],e=Array.from(r.skills.entries());e.forEach(function(r){var e=o(r,2),i=e[0],a=e[1];n.push("".concat(t.get(i),",").concat(a,","))});var i=e.length;for(var a in m.range(i,2))n.push(",,");return n.push("".concat(r.slots)),n.join("")}).join("\n")}},{key:"deserialize",value:function(t,n){var e,a=[],u=i(t.split("\n"));try{var l=function(){var t=e.value.split(","),i=parseInt(t[4]),u=[[0,1],[2,3]].filter(function(r){var n=o(r,2),e=(n[0],n[1]);return!isNaN(parseInt(t[e]))}).map(function(r){var e=o(r,2),i=e[0],a=e[1],u=t[i],l=Array.from(n.entries()).find(function(t){var r=o(t,2);r[0];return r[1]===u})[0];return{name:u,points:parseInt(t[a]),id:l}}),l=new d.default(u.map(function(t){return[t.id,t.points]})),f={name:r.getCharmName(l,i,n),category:v.default.CHARM,slots:i,rarity:0,skills:l};a.push(f)};for(u.s();!(e=u.n()).done;)l()}catch(f){u.e(f)}finally{u.f()}return this.list=a,a}}],[{key:"Instance",get:function(){return this._instance||(this._instance=new this)}},{key:"getCharmName",value:function(r,n,e){var i=Array.from(r.entries()).map(function(t){return"".concat(e.get(t[0]),":").concat(t[1])}),o=0!==n?"".concat(n," Slots"):"";return[].concat(t(i),[o]).join(" ").trim()}}]),r}();exports.default=b;
|
|
},{"../../../helper/range.helper":"cuDj","../equipment/EquipmentCategory":"XByd","../equipment/EquipmentSkills":"gZ5g"}],"nZfY":[function(require,module,exports) {
|
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.htmlToElement=function(e){var t=document.createElement("template");return e=e.trim(),t.innerHTML=e,t.content.firstChild};
|
|
},{}],"aUxA":[function(require,module,exports) {
|
|
"use strict";function e(e){return r(e)||n(e)||o(e)||t()}function t(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function r(e){if(Array.isArray(e))return l(e)}function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=o(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 l,c=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){i=!0,l=e},f:function(){try{c||null==n.return||n.return()}finally{if(i)throw l}}}}function o(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var i=c(require("../../data-provider/models/user/UserCharmList")),u=require("../../helper/html.helper"),d=c(require("../../data-provider/models/equipment/EquipmentCategory")),m=require("../../helper/range.helper"),s=c(require("../../data-provider/models/equipment/EquipmentSkills")),f=function(e){window.localStorage.setItem("charms",i.default.Instance.serialize(e))},p=function(){return window.localStorage.getItem("charms")},h=function(e,t){return 0!==t&&-1!==e},y=function(e){document.getElementsByClassName("charm-".concat(e))[0].remove()},v=function(e,t){i.default.Instance.deserialize(e,t),i.default.Instance.get().forEach(function(e,n){E(e,n,t)})},g=function(){for(var e=document.getElementsByClassName("charm-table-ele"),t=0,n=Array.from(e);t<n.length;t++){n[t].remove()}},E=function(e,t,n){for(var r=u.htmlToElement('<tr class="charm-table-ele charm-'.concat(t,'" data-index="').concat(t,'"></tr>')),a=0,o=Array.from(e.skills.keys());a<o.length;a++){var l=o[a];r.appendChild(u.htmlToElement("<td>".concat(n.get(l),"</td>"))),r.appendChild(u.htmlToElement("<td>".concat(e.skills.get(l),"</td>")))}var c=Array.from(e.skills.keys()).length;for(var i in m.range(c,2))r.appendChild(u.htmlToElement("<td></td>")),r.appendChild(u.htmlToElement("<td></td>"));r.appendChild(u.htmlToElement("<td>".concat(e.slots,"</td>")));var d=u.htmlToElement('<td class="charm-delete">X</td>');d.addEventListener("click",function(){return b(t,n)}),r.appendChild(d),document.getElementById("charm-table").children[0].appendChild(r)},I=function(e,t){var n=i.default.Instance.add(e);E(e,n-1,t),f(t)},b=function(e,t){i.default.Instance.remove(e),y(e),f(t)},k=function(e){var t=i.default.Instance.serialize(e),n=new Blob([t],{type:"text/plain"}),r=document.getElementById("charm-download"),a=window.URL.createObjectURL(n);r.href=a,r.download="charms.csv",r.click()},C=function(e){e.preventDefault(),document.getElementById("charm-upload").click()},w=function(e){var t=document.getElementById("charm-upload");t.files&&t.files[0].text().then(function(t){try{i.default.Instance.deserialize(t,e),f(e),g(),i.default.Instance.get().forEach(function(t,n){E(t,n,e)})}catch(n){alert("Could not process file")}})},B=function(e){var t=parseInt(document.getElementById("charm-slots").value),n=[1,2].map(function(e){return{id:parseInt(document.getElementById("charm-skill-".concat(e,"-name")).value),points:parseInt(document.getElementById("charm-skill-".concat(e,"-points")).value)}});if(0!==t||n.some(function(e){return h(e.id,e.points)})){var r=new s.default(n.filter(function(e){return h(e.id,e.points)}).map(function(e){return[e.id,e.points]})),a={name:i.default.getCharmName(r,t,e),slots:t,category:d.default.CHARM,rarity:0,skills:r};I(a,e)}},A=function(e){document.getElementById("charm-add").addEventListener("click",function(){return B(e)}),document.getElementById("charm-export").addEventListener("click",function(){return k(e)}),document.getElementById("charm-import").addEventListener("click",function(e){return C(e)}),document.getElementById("charm-upload").addEventListener("change",function(){return w(e)})},T=function(){for(var e=document.getElementsByClassName("charm-points-pick"),t=0,n=Array.from(e);t<n.length;t++){var r,o=n[t],l=a(m.range(-10,11).reverse());try{for(l.s();!(r=l.n()).done;){var c=r.value;o.appendChild(u.htmlToElement("\n <option ".concat(0===c?'selected="selected"':"",' value="').concat(c,'">').concat(c,"</option>\n ")))}}catch(i){l.e(i)}finally{l.f()}}},S=function(t,n,r){for(var a=document.getElementsByClassName("charm-skill-pick"),o=function(){var a=c[l],o=r.map(function(e,t){return u.htmlToElement('\n <optgroup label="'.concat(e,'" data-category="').concat(t,'"></optgroup>\n '))});n.forEach(function(e){if(0!==e.length){var n=e[0],r=n.category,a=n.requiredSkill,l=t.get(a),c=u.htmlToElement('\n <option value="'.concat(a,'" data-skill="').concat(a,'">').concat(l,"</option>\n "));o[r].appendChild(c)}}),o.unshift(u.htmlToElement('\n <option value="-1" data-skill="-1">None</option>\n ')),a.append.apply(a,e(o)),a.getElementsByTagName("option")[0].selected=!0},l=0,c=Array.from(a);l<c.length;l++)o()},q=function(e,t,n){T(),S(e,t,n)};exports.renderCharmPicker=function(e,t,n){q(e,t,n),A(e);var r=p();r&&v(r,e)};
|
|
},{"../../data-provider/models/user/UserCharmList":"He0k","../../helper/html.helper":"nZfY","../../data-provider/models/equipment/EquipmentCategory":"XByd","../../helper/range.helper":"cuDj","../../data-provider/models/equipment/EquipmentSkills":"gZ5g"}],"fC2O":[function(require,module,exports) {
|
|
"use strict";function e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function n(e,n){for(var i=0;i<n.length;i++){var t=n[i];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function i(e,i,t){return i&&n(e.prototype,i),t&&n(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var s=t(require("../equipment/EquipmentCategory")),u=function(){function n(){var i=this;e(this,n),this.pins=[],this.exclusions=[],[s.default.HEAD,s.default.CHEST,s.default.ARMS,s.default.WAIST,s.default.LEGS].forEach(function(e){i.pins.push(void 0),i.exclusions.push([])}),this.isActive=!1}return i(n,[{key:"addPin",value:function(e){this.pins[e.category]=e}},{key:"removePin",value:function(e){this.pins[e]=void 0}},{key:"addExclusion",value:function(e){this.exclusions[e.category].push(e)}},{key:"removeExclusion",value:function(e){var n=this.exclusions[e.category].findIndex(function(n){return n.name===e.name});this.exclusions[e.category].splice(n,1)}},{key:"hasPin",value:function(e){if(!e)return!1;if(e.isGeneric)return!1;var n=this.pins[e.category];return!!n&&n.name===e.name}},{key:"hasExclusion",value:function(e){return!!this.exclusions[e.category].find(function(n){return n.name===e.name})}},{key:"serialize",value:function(){return JSON.stringify({pins:this.pins,exclusions:this.exclusions})}},{key:"deserialize",value:function(e){var n=JSON.parse(e);this.pins=n.pins,this.exclusions=n.exclusions}}],[{key:"Instance",get:function(){return this._instance||(this._instance=new this)}}]),n}();exports.default=u;
|
|
},{"../equipment/EquipmentCategory":"XByd"}],"vmHf":[function(require,module,exports) {
|
|
"use strict";function e(e){return r(e)||n(e)||o(e)||t()}function t(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function r(e){if(Array.isArray(e))return i(e)}function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=o(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,l=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){c=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(c)throw i}}}}function o(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var c=l(require("../../data-provider/models/equipment/EquipmentCategory")),u=l(require("../../data-provider/models/user/UserEquipmentSettings")),d=require("../../helper/html.helper"),s=function(){window.localStorage.setItem("eq-settings",u.default.Instance.serialize())},m=function(){return window.localStorage.getItem("eq-settings")},f=function(e){var t=document.createElement("div");t.style.textAlign="left",t.setAttribute("data-name",e.name),t.classList.add("eq-exclusion-ele");var n=d.htmlToElement("<span>".concat(e.name,"</span>")),r=d.htmlToElement("<span>X</span>");return r.addEventListener("click",function(){return exports.removeExlusion(e)}),r.style.marginRight="1em",r.style.marginLeft="1em",r.style.cursor="pointer",t.appendChild(r),t.appendChild(n),t},p=function(t,n){var r,o=document.createElement("div");o.style.textAlign="left";var i=document.createElement("select");i.setAttribute("id","eq-".concat(t,"-pin-picker")),i.style.width="72%";var l,c=a((r=[{name:"None",category:t}]).concat.apply(r,e(n)));try{for(c.s();!(l=c.n()).done;){var u=l.value;i.appendChild(d.htmlToElement('<option value="'.concat(u.name,'">').concat(u.name,"</option>")))}}catch(m){c.e(m)}finally{c.f()}i.addEventListener("change",function(){exports.addPin({name:i.value,category:t})});var s=d.htmlToElement("<span>X</span>");return s.addEventListener("click",function(){return exports.removePin(n[0].category)}),s.style.marginRight="1em",s.style.marginLeft="1em",s.style.cursor="pointer",o.appendChild(s),o.appendChild(i),o},v=function(e){for(var t=document.getElementById("eq-container"),n=0,r=[[c.default.HEAD,"Head",e[0]],[c.default.CHEST,"Chest",e[1]],[c.default.ARMS,"Arms",e[2]],[c.default.WAIST,"Waist",e[3]],[c.default.LEGS,"Legs",e[4]]];n<r.length;n++){var a=r[n],o=a[0],i=a[1],l=a[2],u=d.htmlToElement('<div class="eq-column" data-eq-column-type="'.concat(o,'"></div>')),s=d.htmlToElement('<div class="eq-column-item eq-column-header">'.concat(i," Pinned</div>")),m=d.htmlToElement('<div class="eq-column-item eq-column-content eq-column-pin"></div>'),f=p(o,l);m.appendChild(f);var v=d.htmlToElement('<div class="eq-column-item eq-column-header">'.concat(i," Excluded</div>")),y=d.htmlToElement('<div id="eq-'.concat(o,'-exclusion" class="eq-column-item eq-column-content eq-column-exclusion"></div>'));u.appendChild(s),u.appendChild(m),u.appendChild(v),u.appendChild(y),t.appendChild(u)}},y=function(e){document.getElementById("eq-".concat(e.category,"-exclusion")).appendChild(f(e))};exports.removeExlusion=function(e){var t=Array.from(document.getElementsByClassName("eq-exclusion-ele")).find(function(t){return t.getAttribute("data-name")===e.name});t&&(t.remove(),u.default.Instance.removeExclusion(e),s())},exports.removePin=function(e){var t=document.getElementById("eq-".concat(e,"-pin-picker"));u.default.Instance.removePin(e),t.selectedIndex=0,s()},exports.addExclusion=function(e){u.default.Instance.hasExclusion(e)||(u.default.Instance.addExclusion(e),y(e),s())},exports.addPin=function(e){"None"!==e.name?(u.default.Instance.addPin(e),s(),document.getElementById("eq-".concat(e.category,"-pin-picker")).value=e.name):u.default.Instance.removePin(e.category)},exports.renderEqSettings=function(e){v(e);var t=m();t&&u.default.Instance.deserialize(t);var n,r=a(u.default.Instance.exclusions);try{for(r.s();!(n=r.n()).done;){var o,i=a(n.value);try{for(i.s();!(o=i.n()).done;){var l=o.value;y(l)}}catch(c){i.e(c)}finally{i.f()}}}catch(c){r.e(c)}finally{r.f()}u.default.Instance.pins.forEach(function(e,t){e?exports.addPin(e):exports.removePin(t)})};
|
|
},{"../../data-provider/models/equipment/EquipmentCategory":"XByd","../../data-provider/models/user/UserEquipmentSettings":"fC2O","../../helper/html.helper":"nZfY"}],"f7g5":[function(require,module,exports) {
|
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(e){e.classList.contains("navbar-selected")||e.classList.add("navbar-hover")},t=function(e){e.classList.remove("navbar-hover")},r=function(e,t){for(var r=0,n=Array.from(e.children);r<n.length;r++){var a=n[r];a.classList.remove("navbar-selected"),a.classList.remove("navbar-hover")}t.classList.add("navbar-selected");for(var s=t.getAttribute("data-selection"),i=document.getElementsByClassName("panel"),c=0,o=Array.from(i);c<o.length;c++){var d=o[c];s===d.getAttribute("data-panel-number")?d.classList.remove("hidden"):d.classList.add("hidden")}};exports.initiateNavbar=function(){for(var n=document.getElementById("navbar-container").children[0],a=function(){var a=i[s];a.addEventListener("mouseenter",function(){return e(a)}),a.addEventListener("mouseleave",function(){return t(a)}),a.addEventListener("click",function(){return r(n,a)})},s=0,i=Array.from(n.children);s<i.length;s++)a();r(n,n.children[0])};
|
|
},{}],"EAj3":[function(require,module,exports) {
|
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../helper/html.helper"),t=function(){return Array.from(document.getElementsByClassName("search-picker-activation"))},r=function(){t().forEach(function(e){var t=e.children[0],r=e.children[1];t.checked=!1,r.classList.remove("highlighted")})};exports.resetSkillActivations=r;var i=function(){return t().filter(function(e){return e.children[0].checked}).map(function(e){var t=e.textContent.trim(),r=parseInt(e.getAttribute("data-id")),i=parseInt(e.getAttribute("data-skill")),c=parseInt(e.getAttribute("data-points"));return{id:r,name:t,requiredPoints:c,requiredSkill:i,isPositive:c>0,category:parseInt(e.parentElement.getAttribute("data-category"))}})};exports.getSkillActivations=i;var c=function(t){for(var r in t){var i=t[r],c=e.htmlToElement('\n <div class="search-picker-category" id="search-picker-category-'.concat(r,'" data-category="').concat(r,'">\n <div class="search-picker-category-title banner">').concat(i,"</div>\n </div>\n "));document.getElementById("search-skill-picker").appendChild(c)}},n=function(t){t.forEach(function(t){t.filter(function(e){return e.isPositive}).reverse().forEach(function(t){var r=e.htmlToElement('\n <div class="search-picker-activation" data-skill="'.concat(t.requiredSkill,'" data-points="').concat(t.requiredPoints,'" data-id="').concat(t.id,'">\n <input style="float:left;" type="checkbox">\n <div class="search-picker-activation-name">').concat(t.name,"</div>\n </div>\n "));document.getElementById("search-picker-category-".concat(t.category)).appendChild(r)})})},a=function(){for(var e=Array.from(document.getElementsByClassName("search-picker-activation")),t=function(){var e=i[r];e.addEventListener("click",function(t){var r=t.target,i=e.children[0];"INPUT"!==r.tagName&&(i.checked=!i.checked);var c=e.children[1];i.checked?c.classList.add("highlighted"):c.classList.remove("highlighted")})},r=0,i=e;r<i.length;r++)t()},o=function(e,t){c(t),n(e),a()};exports.renderSkillPicker=o;
|
|
},{"../../helper/html.helper":"nZfY"}],"aAyu":[function(require,module,exports) {
|
|
"use strict";function t(t,o){return n(t)||r(t,o)||i(t,o)||e()}function e(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],l=!0,a=!1;try{for(r=r.call(t);!(l=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);l=!0);}catch(u){a=!0,o=u}finally{try{l||null==r.return||r.return()}finally{if(a)throw o}}return i}}function n(t){if(Array.isArray(t))return t}function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=i(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 l,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,l=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw l}}}}function i(t,e){if(t){if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e,r){return e&&u(t.prototype,e),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var f=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});var c=require("../../data-provider/data-provider.module"),h=f(require("../../data-provider/models/equipment/EquipmentCategory")),p=f(require("../../data-provider/models/equipment/EquipmentSkills")),d=function(){function e(t,r,n,o,i){a(this,e),this.skills=new p.default,this.score=0,this.totalSlots=0,this.torsoUp=0,this.equipment=t,r&&(this.skills=r),n&&(this.score=n),o&&(this.totalSlots=o),i&&(this.torsoUp=i)}return s(e,[{key:"getSlots",value:function(){return this.equipment.map(function(t){return t.slots}).filter(function(t){return t>0})}},{key:"getSlotsExceptChest",value:function(){return this.equipment.filter(function(t){return t.category!==h.default.CHEST}).map(function(t){return t.slots}).filter(function(t){return t>0})}},{key:"copy",value:function(){return new e(this.equipment.map(function(t){return t}),new p.default(this.skills),this.score,this.totalSlots,this.torsoUp)}},{key:"addPiece",value:function(e){if(e.skills.has(c.TORSO_UP_ID))this.torsoUp++;else if(e.category===h.default.CHEST&&this.torsoUp>0){var r,n=o(e.skills);try{for(n.s();!(r=n.n()).done;){var i=t(r.value,2),l=i[0],a=i[1];this.skills.add(l,a*(this.torsoUp+1))}}catch(u){n.e(u)}finally{n.f()}}else this.skills.addSkills(e.skills);this.equipment[e.category]=e,this.score=this.score+e.score,this.totalSlots=this.totalSlots+e.slots}}]),e}();exports.default=d;
|
|
},{"../../data-provider/data-provider.module":"mrro","../../data-provider/models/equipment/EquipmentCategory":"XByd","../../data-provider/models/equipment/EquipmentSkills":"gZ5g"}],"pNrS":[function(require,module,exports) {
|
|
"use strict";function e(e){return n(e)||r(e)||s(e)||t()}function t(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function n(e){if(Array.isArray(e))return f(e)}function a(e,t){return u(e)||o(e,t)||s(e,t)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i=[],o=!0,u=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(l){u=!0,a=l}finally{try{o||null==r.return||r.return()}finally{if(u)throw a}}return i}}function u(e){if(Array.isArray(e))return e}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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 i,o=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){u=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(u)throw i}}}}function s(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var h=p(require("../../data-provider/models/equipment/EquipmentSkills")),m=p(require("../../data-provider/models/equipment/EquipmentCategory")),v=function(){function t(e,r,n){c(this,t);var a=e.equipment[m.default.CHEST];this.chest=e.torsoUp>0?t.applyTorsoUpToChest(a,e.torsoUp):a,this.head=e.equipment[m.default.HEAD],this.arms=e.equipment[m.default.ARMS],this.waist=e.equipment[m.default.WAIST],this.legs=e.equipment[m.default.LEGS],this.charm=e.equipment[m.default.CHARM],this.decos=r.decos,this.evaluation=this.evaluate(e,r,n)}return y(t,[{key:"getPieces",value:function(){return[this.head,this.chest,this.arms,this.waist,this.legs]}},{key:"evaluate",value:function(t,r,n){var i,o={base:0,max:0},u=[0,0,0,0,0],s=l(this.getPieces());try{for(s.s();!(i=s.n()).done;){var f=i.value;o.base+=f.defense.base,o.max+=f.defense.max,u=f.resistance.map(function(e,t){return e+u[t]})}}catch(w){s.e(w)}finally{s.f()}var c=new h.default;r.decos.forEach(function(e){return c.addSkills(e.skills)});var d=new h.default(t.skills);d.addSkills(new h.default(c));var y,p=[],m=l(d);try{var v=function(){var t=a(y.value,2),r=t[0],i=t[1];if(Math.abs(i)<10)return"continue";var o=n.get(r).filter(function(e){return e.isPositive?i>=e.requiredPoints:i<=e.requiredPoints});p.push.apply(p,e(o))};for(m.s();!(y=m.n()).done;)v()}catch(w){m.e(w)}finally{m.f()}var b={defense:o,resistance:u,activations:p,skills:d,torsoUp:t.torsoUp};return this.evaluation=b,b}}],[{key:"applyTorsoUpToChest",value:function(e,t){var r=new h.default(e.skills);return r.multiply(t+1),Object.assign({},e,{skills:r})}}]),t}();exports.default=v;
|
|
},{"../../data-provider/models/equipment/EquipmentSkills":"gZ5g","../../data-provider/models/equipment/EquipmentCategory":"XByd"}],"Zol7":[function(require,module,exports) {
|
|
"use strict";var e;Object.defineProperty(exports,"__esModule",{value:!0}),function(e){e[e.ALL=0]="ALL",e[e.BLADEMASTER=1]="BLADEMASTER",e[e.GUNNER=2]="GUNNER"}(e||(e={})),exports.default=e;
|
|
},{}],"MMJS":[function(require,module,exports) {
|
|
"use strict";function r(r){return i(r)||n(r)||t(r)||e()}function e(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function t(r,e){if(r){if("string"==typeof r)return a(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?a(r,e):void 0}}function n(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}function i(r){if(Array.isArray(r))return a(r)}function a(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}var o=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0});var u=require("../data-provider/data-provider.module"),l=o(require("../data-provider/models/equipment/ArmorType")),f=o(require("../data-provider/models/equipment/EquipmentCategory")),s=o(require("../data-provider/models/equipment/EquipmentSkills")),c=function(r,e){return r.type===l.default.ALL||r.type===e};exports.filterType=c;var p=function(r,e){return!e.includes(r.name)},d=function(r,e){return r.rarity<=e};exports.filterRarity=d;var y=function(r,e){return e.some(function(e){var t=r.skills.get(e.requiredSkill);return t&&t>0})};exports.filterHasSkill=y;var m=function(r,e){return e===u.MAX_RARITY?r:r.filter(function(r){return d(r,e)})};exports.applyRarityFilter=m;var v=function(r,e){for(var t,n=[],i=function(){var e=o[a];if(r.find(function(r){return r.slots===e})){var t={name:"".concat(e," Slot Charm"),slots:e,category:f.default.CHARM,rarity:0,skills:new s.default};n.push(t)}},a=0,o=[3,2,1];a<o.length;a++)i();var l=(t=r.filter(function(r){return y(r,e)})).concat.apply(t,n);return 0===l.length?[Object.assign({},u.DUMMY_PIECE,{category:f.default.CHARM})]:l};exports.applyCharmFilter=v;var g=function(e,t,n,i,a,o,l){var f,d;if(a)return[e.find(function(r){return r.name===a.name})];for(var v=m(e,t).filter(function(r){return c(r,n)}).filter(function(r){return p(r,o.map(function(r){return r.name}))}).sort(function(r,e){return e.defense.max-r.defense.max}),g=[],b=function(){var r=A[h],e=v.find(function(e){return e.slots===r});if(e){var t={type:e.type,defense:e.defense,resistance:e.resistance,name:"".concat(r," Slot Piece"),slots:r,category:e.category,rarity:e.rarity,skills:new s.default,isGeneric:!0};return g.push(t),"break"}},h=0,A=[3,2,1];h<A.length;h++){if("break"===b())break}var S=[v.find(function(r){return r.skills.has(u.TORSO_UP_ID)})].filter(function(r){return void 0!==r}).map(function(r){return Object.assign({},r,{name:"Torso Up Piece",isGeneric:!0})}),_=(f=(d=v.filter(function(r){return y(r,l)})).concat.apply(d,g)).concat.apply(f,r(S));return 0===_.length?[Object.assign({},u.DUMMY_PIECE,{type:n,category:i})]:_};exports.applyArmorFilter=g;
|
|
},{"../data-provider/data-provider.module":"mrro","../data-provider/models/equipment/ArmorType":"Zol7","../data-provider/models/equipment/EquipmentCategory":"XByd","../data-provider/models/equipment/EquipmentSkills":"gZ5g"}],"zX0v":[function(require,module,exports) {
|
|
"use strict";function r(r){return n(r)||e(r)||f(r)||t()}function t(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function e(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}function n(r){if(Array.isArray(r))return s(r)}function o(r,t){return u(r)||i(r,t)||f(r,t)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(r,t){var e=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=e){var n,o,a=[],i=!0,u=!1;try{for(e=e.call(r);!(i=(n=e.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(l){u=!0,o=l}finally{try{i||null==e.return||e.return()}finally{if(u)throw o}}return a}}function u(r){if(Array.isArray(r))return r}function l(r,t){var e="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=f(r))||t&&r&&"number"==typeof r.length){e&&(r=e);var n=0,o=function(){};return{s:o,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(r){throw r},f:o}}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 a,i=!0,u=!1;return{s:function(){e=e.call(r)},n:function(){var r=e.next();return i=r.done,r},e:function(r){u=!0,a=r},f:function(){try{i||null==e.return||e.return()}finally{if(u)throw a}}}}function f(r,t){if(r){if("string"==typeof r)return s(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?s(r,t):void 0}}function s(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}var c=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0});var p=require("../data-provider/data-provider.module"),y=c(require("../data-provider/models/equipment/EquipmentSkills")),m=function(r,t){var e,n=0,a=l(t);try{for(a.s();!(e=a.n()).done;){var i=o(e.value,1)[0];n+=r.get(i)||0}}catch(u){a.e(u)}finally{a.f()}return n};exports.getScoreFromSkillMap=m;var d=function(r,t){return r.skills.has(p.TORSO_UP_ID)?Object.assign({},r,{score:t}):r};exports.scoreTorsoUpPieces=d;var v=function(t,e){var n=new y.default;t.forEach(function(r){return n.addSkills(r.skills)});var o=m(n,e),a=Math.max.apply(Math,r(Array.from(n.values()))),i=Math.max(o,a);return{skills:n,decos:t,score:i}};exports.evaluateListOfDecos=v;var h=function(r,t,e){for(var n=[],o=0,a=Array.from(e.entries());o<a.length;o++){var i=a[o][0],u=r.skills.get(i),l=t.skills.get(i);if(u>l)return 0;u===l?n.push(1):n.push(2)}return Math.max.apply(Math,n)};exports.decoPermWorseOrSameAsComparison=h;var b=function(t){var e=new Map(Array.from(t.entries()).map(function(t){var e=o(t,2),n=e[0],a=e[1];return[n,Math.max.apply(Math,r(a.map(function(r){return r.score})))]}));return e.set(0,0),e};exports.getDecoSlotScoreMap=b;var S=function(r,t){return r.filter(function(e,n){for(var o=!1,a=0;a<r.length;a++)if(n!==a){var i=r[a],u=h(e,i,t);if(2===u){o=!0;break}if(a>n&&1===u){o=!0;break}}return!o})};exports.pruneDecoPermutations=S;
|
|
},{"../data-provider/data-provider.module":"mrro","../data-provider/models/equipment/EquipmentSkills":"gZ5g"}],"z7Uc":[function(require,module,exports) {
|
|
"use strict";function t(t){return n(t)||r(t)||o(t)||e()}function e(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function n(t){if(Array.isArray(t))return l(t)}function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=o(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}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 l,u=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){a=!0,l=t},f:function(){try{u||null==r.return||r.return()}finally{if(a)throw l}}}}function o(t,e){if(t){if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var c=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});var f=c(require("../../data-provider/models/equipment/EquipmentSkills")),d=function(){function e(t,r,n,i,o){u(this,e),this.decos=[],this.requiredSlots=0,this.decoMinSlotMap=t,this.unusedSlotsSum=r,this.missingSkills=n,i&&(this.decos=i),this.requiredSlots=o||this.calculateRequiredSlots()}return s(e,[{key:"copy",value:function(){return new e(this.decoMinSlotMap,this.unusedSlotsSum,new f.default(this.missingSkills),this.decos.map(function(t){return t}),this.requiredSlots)}},{key:"calculateRequiredSlots",value:function(){var t,e=0,r=i(this.missingSkills);try{for(r.s();!(t=r.n()).done;){var n=t.value,o=n[0],l=n[1];e+=this.decoMinSlotMap.getMinRequiredSlotsForSkill(o,l)}}catch(u){r.e(u)}finally{r.f()}return this.requiredSlots=e,e}},{key:"addPerm",value:function(e,r){var n;this.unusedSlotsSum-=r,(n=this.decos).push.apply(n,t(e.decos));var o,l=0,u=i(this.missingSkills);try{for(u.s();!(o=u.n()).done;){var a=o.value,s=a[0],c=a[1]-e.skills.get(s);this.missingSkills.set(s,c),l+=this.decoMinSlotMap.getMinRequiredSlotsForSkill(s,c)}}catch(f){u.e(f)}finally{u.f()}this.requiredSlots=l}}]),e}();exports.default=d;
|
|
},{"../../data-provider/models/equipment/EquipmentSkills":"gZ5g"}],"Ra9L":[function(require,module,exports) {
|
|
"use strict";function t(e){return(t="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})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(){o=function(){return e};var e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(P){f=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),c=new _(n||[]);return i(a,"_invoke",{value:S(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(P){return{type:"throw",arg:P}}}e.wrap=s;var p={};function y(){}function v(){}function d(){}var g={};f(g,c,function(){return this});var m=Object.getPrototypeOf,w=m&&m(m(j([])));w&&w!==r&&n.call(w,c)&&(g=w);var b=d.prototype=y.prototype=Object.create(g);function x(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function L(e,r){var o;i(this,"_invoke",{value:function(i,a){function c(){return new r(function(o,c){!function o(i,a,c,u){var l=h(e[i],e,a);if("throw"!==l.type){var f=l.arg,s=f.value;return s&&"object"==t(s)&&n.call(s,"__await")?r.resolve(s.__await).then(function(t){o("next",t,c,u)},function(t){o("throw",t,c,u)}):r.resolve(s).then(function(t){f.value=t,c(f)},function(t){return o("throw",t,c,u)})}u(l.arg)}(i,a,o,c)})}return o=o?o.then(c,c):c()}})}function S(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return M()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=E(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function E(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,p;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function j(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:M}}function M(){return{value:void 0,done:!0}}return v.prototype=d,i(b,"constructor",{value:d,configurable:!0}),i(d,"constructor",{value:v,configurable:!0}),v.displayName=f(d,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,f(t,l,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},x(L.prototype),f(L.prototype,u,function(){return this}),e.AsyncIterator=L,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new L(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},x(b),f(b,l,"Generator"),f(b,c,function(){return this}),f(b,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=j,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}var i=o().mark(l);function a(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=c(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function c(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function l(t,e,r,n,c){var u,f,s,h,p;return o().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:u=a(t),o.prev=1,u.s();case 3:if((f=u.n()).done){o.next=15;break}if(s=f.value,h=c+s.skills.get(e),p=n+s.requiredSlots,!(h>=r)){o.next=12;break}return o.next=10,p;case 10:o.next=13;break;case 12:return o.delegateYield(l(t,e,r,p,h),"t0",13);case 13:o.next=3;break;case 15:o.next=20;break;case 17:o.prev=17,o.t1=o.catch(1),u.e(o.t1);case 20:return o.prev=20,u.f(),o.finish(20);case 23:case"end":return o.stop()}},i,null,[[1,17,20,23]])}Object.defineProperty(exports,"__esModule",{value:!0});var f=function(){function t(r,n){var o=this;e(this,t),this.decorationsOfSkillMap=new Map,this.calculations=new Map;var i,c=a(n);try{var u=function(){var t=i.value[0],e=r.filter(function(e){return e.skills.get(t)>0}).sort(function(e,r){return r.skills.get(t)-e.skills.get(t)});o.decorationsOfSkillMap.set(t,e),o.calculations.set(t,new Map)};for(c.s();!(i=c.n()).done;)u()}catch(l){c.e(l)}finally{c.f()}}return n(t,[{key:"calculateMinRequiredSlots",value:function(e,r){var n=this.decorationsOfSkillMap.get(e);if(0===n.length)return t.DUMMY_SCORE;var o,i=t.DUMMY_SCORE,c=a(l(n,e,r,0,0));try{for(c.s();!(o=c.n()).done;){var u=o.value;u<i&&(i=u)}}catch(f){c.e(f)}finally{c.f()}return i}},{key:"getMinRequiredSlotsForSkill",value:function(t,e){var r=this.calculations.get(t);if(e<=0)return 0;if(r.has(e))return r.get(e);var n=this.calculateMinRequiredSlots(t,e);return r.set(e,n),n}}]),t}();f.DUMMY_SCORE=1e3,exports.default=f;
|
|
},{}],"mUId":[function(require,module,exports) {
|
|
"use strict";function t(e){return(t="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})(e)}function e(t){return o(t)||n(t)||h(t)||r()}function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function o(t){if(Array.isArray(t))return d(t)}function a(t,e){return c(t)||u(t,e)||h(t,e)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a=[],i=!0,u=!1;try{for(r=r.call(t);!(i=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);i=!0);}catch(c){u=!0,o=c}finally{try{i||null==r.return||r.return()}finally{if(u)throw o}}return a}}function c(t){if(Array.isArray(t))return t}function l(){l=function(){return e};var e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(_){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof d?e:d,i=Object.create(a.prototype),u=new q(n||[]);return o(i,"_invoke",{value:k(t,r,u)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(_){return{type:"throw",arg:_}}}e.wrap=f;var h={};function d(){}function v(){}function y(){}var m={};s(m,i,function(){return this});var g=Object.getPrototypeOf,b=g&&g(g(O([])));b&&b!==r&&n.call(b,i)&&(m=b);var w=y.prototype=d.prototype=Object.create(m);function S(t){["next","throw","return"].forEach(function(e){s(t,e,function(t){return this._invoke(e,t)})})}function x(e,r){var a;o(this,"_invoke",{value:function(o,i){function u(){return new r(function(a,u){!function o(a,i,u,c){var l=p(e[a],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&n.call(f,"__await")?r.resolve(f.__await).then(function(t){o("next",t,u,c)},function(t){o("throw",t,u,c)}):r.resolve(f).then(function(t){s.value=t,u(s)},function(t){return o("throw",t,u,c)})}c(l.arg)}(o,i,a,u)})}return a=a?a.then(u,u):u()}})}function k(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return j()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=E(i,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=p(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=p(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return v.prototype=y,o(w,"constructor",{value:y,configurable:!0}),o(y,"constructor",{value:v,configurable:!0}),v.displayName=s(y,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,s(t,c,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},S(x.prototype),s(x.prototype,u,function(){return this}),e.AsyncIterator=x,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new x(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then(function(t){return t.done?t.value:i.next()})},S(w),s(w,c,"Generator"),s(w,i,function(){return this}),s(w,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,q.prototype={constructor:q,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}var s=l().mark(q),f=l().mark(O);function p(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=h(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 a,i=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){u=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw a}}}}function h(t,e){if(t){if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(t,e):void 0}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var v=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});var y=require("../data-provider/data-provider.module"),m=v(require("../data-provider/models/equipment/EquipmentCategory")),g=v(require("../data-provider/models/equipment/EquipmentSkills")),b=v(require("../scorer/models/ArmorEvaluation")),w=v(require("./models/ArmorSet")),S=require("../data-filter/data-filter.module"),x=require("../scorer/scorer.module"),k=v(require("../scorer/models/DecoEvaluation")),E=v(require("../scorer/models/DecoMinSlotMap")),L=function(t){var e=[m.default.HEAD,m.default.CHEST,m.default.ARMS,m.default.WAIST,m.default.LEGS,m.default.CHARM].map(function(e){return Object.assign({},y.DUMMY_PIECE,{type:t,category:e,score:0})});return new b.default(e)},A=function(t,e){for(var r=t.filter(function(t){return 1===t.requiredSlots}),n=t.filter(function(t){return 2===t.requiredSlots}),o=t.filter(function(t){return 3===t.requiredSlots}),a={name:"None",rarity:0,requiredSlots:0,skills:new g.default},i=r.map(function(t){return[t]}).concat([[a]]),u=x.pruneDecoPermutations(i.map(function(t){return x.evaluateListOfDecos(t,e)}),e),c=u.map(function(t){return t.decos}),l=[],s=0;s<c.length;s++)for(var f=c[s],h=Math.abs(s);h<c.length;h++){var d=c[h];l.push(f.concat(d))}for(var v=n.map(function(t){return[t]}).concat(l),y=x.pruneDecoPermutations(v.map(function(t){return x.evaluateListOfDecos(t,e)}),e),m=[],b=0;b<c.length;b++)for(var w=c[b],S=Math.abs(b);S<l.length;S++){var k=l[S];m.push(w.concat(k))}var E,L=[],A=p(r);try{for(A.s();!(E=A.n()).done;){var q,O=E.value,j=p(n);try{for(j.s();!(q=j.n()).done;){var _=q.value;L.push([O,_])}}catch(M){j.e(M)}finally{j.f()}}}catch(M){A.e(M)}finally{A.f()}var P=o.map(function(t){return[t]}).concat(L).concat(m),T=x.pruneDecoPermutations(P.map(function(t){return x.evaluateListOfDecos(t,e)}),e);return new Map([[0,[]],[1,u],[2,y],[3,T]])};function q(t,e,r,n,o){var a,i,u,c;return l().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:a=p(t[o]),l.prev=1,a.s();case 3:if((i=a.n()).done){l.next=18;break}if(u=i.value,(c=e.copy()).addPiece(u),!(c.score>=n)){l.next=12;break}return l.next=10,c;case 10:l.next=14;break;case 12:if(!(c.score+r[o]<n)){l.next=14;break}return l.abrupt("break",18);case 14:if(!(o>0)){l.next=16;break}return l.delegateYield(q(t,c,r,n,o-1),"t0",16);case 16:l.next=3;break;case 18:l.next=23;break;case 20:l.prev=20,l.t1=l.catch(1),a.e(l.t1);case 23:return l.prev=23,a.f(),l.finish(23);case 26:case"end":return l.stop()}},s,null,[[1,20,23,26]])}function O(t,e,r,n){var o,a,i,u,c;return l().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:o=e[n],a=p(t.get(o)),l.prev=2,a.s();case 4:if((i=a.n()).done){l.next=19;break}if(u=i.value,(c=r.copy()).addPerm(u,o),!(c.requiredSlots<=0)){l.next=13;break}return l.next=11,c;case 11:l.next=15;break;case 13:if(!(c.unusedSlotsSum<c.requiredSlots)){l.next=15;break}return l.abrupt("continue",17);case 15:if(!(n>0)){l.next=17;break}return l.delegateYield(O(t,e,c,n-1),"t0",17);case 17:l.next=4;break;case 19:l.next=24;break;case 21:l.prev=21,l.t1=l.catch(2),a.e(l.t1);case 24:return l.prev=24,a.f(),l.finish(24);case 27:case"end":return l.stop()}},f,null,[[2,21,24,27]])}var j=function(t,e){var r=e+1,n=t.score*r,o=t.decos.map(function(t){var e=new g.default(t.skills);return e.multiply(r),Object.assign({},t,{affectedByTorsoUp:!0,name:t.name.concat(" (TorsoUp)"),skills:e})}),a=new g.default(t.skills);return a.multiply(r),{score:n,decos:o,skills:a}},_=function(t,e,r,n,o){var i,u=function(t,e){if(e.requiredSlots<=0)return e;if(!(e.unusedSlotsSum<e.requiredSlots)&&0!==t.length){var r=O(o,t,e,t.length-1).next().value;return r||void 0}},c=t.equipment[m.default.CHEST].slots,l=new g.default(Array.from(r).map(function(e){var r=a(e,2),n=r[0];return[n,r[1]-t.skills.get(n)]})),s=t.totalSlots+e.weaponSlots;if(t.torsoUp>0&&c>0){var f,h=t.getSlotsExceptChest().concat(e.weaponSlots?e.weaponSlots:[]),d=s-c,v=new k.default(n,d,l),y=p(o.get(c));try{for(y.s();!(f=y.n()).done;){var b=f.value,w=j(b,t.torsoUp),S=v.copy();S.addPerm(w,c);var x=u(h,S);if(x){i=x;break}}}catch(E){y.e(E)}finally{y.f()}}else{i=u(t.getSlots().concat(e.weaponSlots?e.weaponSlots:[]),new k.default(n,t.totalSlots+e.weaponSlots,l))}return i},P=function(t,r,n,o,a){var i=new g.default(o.skillActivations.map(function(t){return[t.requiredSkill,t.requiredPoints]})),u=A(r,i),c=x.getDecoSlotScoreMap(u),l=L(o.armorType),s=x.getScoreFromSkillMap(i,i)-c.get(o.weaponSlots),f=new E.default(r,i),h=t;h.push(n);var d=h.map(function(t){return t.map(function(t){var e=c.get(t.slots)+x.getScoreFromSkillMap(t.skills,i);return Object.assign({},t,{score:e})})}),v=Math.max.apply(Math,e(d[1].map(function(t){return t.score}))),y=[d[1],d[0].map(function(t){return x.scoreTorsoUpPieces(t,v)}),d[2],d[3].map(function(t){return x.scoreTorsoUpPieces(t,v)}),d[4].map(function(t){return x.scoreTorsoUpPieces(t,v)}),d[5]].map(function(t){return t.sort(function(t,e){return e.score-t.score})}),m=[0],b=0;y.map(function(t){return t[0].score}).forEach(function(t){b+=t,m.push(b)});var S,k=0,O=[],j=p(q(y,l,m,s,y.length-1));try{for(j.s();!(S=j.n()).done;){var P=S.value,T=_(P,o,i,f,u);if(T){var M=new w.default(P,T,a.skillActivation);if(O.push(M),k===o.limit-1)break;k++}}}catch(D){j.e(D)}finally{j.f()}return O},T=function(t,e,r,n,o){var a=t.map(function(t,e){return S.applyArmorFilter(t,n.armorRarity,n.armorType,e,n.pins[e],n.exclusions[e],n.skillActivations)}),i=S.applyCharmFilter(r,n.skillActivations),u=S.applyRarityFilter(e,n.decoRarity).filter(function(t){return S.filterHasSkill(t,n.skillActivations)});return P(a,u,i,n,o)};exports.search=T;
|
|
},{"../data-provider/data-provider.module":"mrro","../data-provider/models/equipment/EquipmentCategory":"XByd","../data-provider/models/equipment/EquipmentSkills":"gZ5g","../scorer/models/ArmorEvaluation":"aAyu","./models/ArmorSet":"pNrS","../data-filter/data-filter.module":"MMJS","../scorer/scorer.module":"zX0v","../scorer/models/DecoEvaluation":"z7Uc","../scorer/models/DecoMinSlotMap":"Ra9L"}],"qhuQ":[function(require,module,exports) {
|
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getGlobalSettings=function(){var e=document.getElementById("armor-type"),t=document.getElementById("weapon-slots"),r=document.getElementById("armor-rarity"),a=document.getElementById("deco-rarity"),n=document.getElementById("search-limit");return{armorType:parseInt(e.value),weaponSlots:parseInt(t.value),armorRarity:parseInt(r.value),decoRarity:parseInt(a.value),limit:parseInt(n.value)}};
|
|
},{}],"sJIk":[function(require,module,exports) {
|
|
"use strict";function t(e){return(t="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})(e)}function e(t){return o(t)||r(t)||s(t)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function o(t){if(Array.isArray(t))return c(t)}function a(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=s(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 a,i=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){l=!0,a=t},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function i(t,e){return d(t)||u(t,e)||s(t,e)||l()}function l(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t,e){if(t){if("string"==typeof t)return c(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)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,a=[],i=!0,l=!1;try{for(n=n.call(t);!(i=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);i=!0);}catch(s){l=!0,o=s}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}}function d(t){if(Array.isArray(t))return t}function h(){h=function(){return e};var e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(j){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var a=e&&e.prototype instanceof p?e:p,i=Object.create(a.prototype),l=new S(r||[]);return o(i,"_invoke",{value:T(t,n,l)}),i}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(j){return{type:"throw",arg:j}}}e.wrap=u;var f={};function p(){}function m(){}function v(){}var y={};c(y,i,function(){return this});var g=Object.getPrototypeOf,b=g&&g(g(A([])));b&&b!==n&&r.call(b,i)&&(y=b);var E=v.prototype=p.prototype=Object.create(y);function w(t){["next","throw","return"].forEach(function(e){c(t,e,function(t){return this._invoke(e,t)})})}function x(e,n){var a;o(this,"_invoke",{value:function(o,i){function l(){return new n(function(a,l){!function o(a,i,l,s){var c=d(e[a],e,i);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==t(h)&&r.call(h,"__await")?n.resolve(h.__await).then(function(t){o("next",t,l,s)},function(t){o("throw",t,l,s)}):n.resolve(h).then(function(t){u.value=t,l(u)},function(t){return o("throw",t,l,s)})}s(c.arg)}(o,i,a,l)})}return a=a?a.then(l,l):l()}})}function T(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return P()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=k(i,n);if(l){if(l===f)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=d(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function k(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=d(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function A(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,o(E,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},w(x.prototype),c(x.prototype,l,function(){return this}),e.AsyncIterator=x,e.async=function(t,n,r,o,a){void 0===a&&(a=Promise);var i=new x(u(t,n,r,o),a);return e.isGeneratorFunction(n)?i:i.next().then(function(t){return t.done?t.value:i.next()})},w(E),c(E,s,"Generator"),c(E,i,function(){return this}),c(E,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=A,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(l&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:A(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}var f=h().mark(g),p=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});var m=p(require("../../data-provider/models/user/UserEquipmentSettings")),v=require("../../helper/html.helper"),y=require("./eq-settings.component");function g(t){var e,n,r,o;return h().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:e=k(),n=document.createElement("div"),e.appendChild(n),r=Array.from(t.values()).reduce(function(t,e){return t+e.length},0),o=0;case 5:if(!(o<r)){a.next=12;break}return n.innerHTML="Checked ".concat(o," possible skills ..."),a.next=9,o;case 9:o++,a.next=5;break;case 12:case"end":return a.stop()}},f)}exports.moreSkillsIterator=g;var b=function(t,e){var n=t.childNodes,r=n[n.length-1];r.classList.contains("result-set-details")?r.classList.toggle("hidden"):t.appendChild(e())},E=v.htmlToElement('\n <div class="results-banner banner">\n You have some pins or exclusions active, which may be limiting results. You may find some results by removing those pins or exclusions.\n <div>\n'),w=function(t,n,r){var o=v.htmlToElement('\n <tr>\n <th>Skill</th>\n <th style="width: 6%">Weapon</th>\n <th style="width: 6%">Head</th>\n <th style="width: 6%">Chest</th>\n <th style="width: 6%">Arms</th>\n <th style="width: 6%">Waist</th>\n <th style="width: 6%">Legs</th>\n <th style="width: 6%">Charm</th>\n <th style="width: 6%">Deco</th>\n <th style="width: 6%">Total</th>\n <th>Active</th>\n </tr>\n '),l=Array.from(t.evaluation.skills.entries()).sort(function(t,e){var n=i(t,2),r=(n[0],n[1]),o=i(e,2);o[0];return o[1]-r}).map(function(e){var r=i(e,2),o=r[0],l=r[1],s=document.createElement("tr"),c=t.decos.map(function(t){return t.skills.get(o)}).reduce(function(t,e){return t+e},0);s.appendChild(v.htmlToElement("<td>".concat(n.skillName.get(o)?n.skillName.get(o):"","</td>"))),s.appendChild(v.htmlToElement("<td></td>"));var u,d=a(t.getPieces());try{for(d.s();!(u=d.n()).done;){var h=u.value;s.append(v.htmlToElement("<td>".concat(h.skills.get(o)?h.skills.get(o):"","</td>")))}}catch(p){d.e(p)}finally{d.f()}s.append(v.htmlToElement("<td>".concat(t.charm.skills.get(o)?t.charm.skills.get(o):"","</td>"))),s.append(v.htmlToElement("<td>".concat(c||"","</td>"))),s.append(v.htmlToElement("<td>".concat(l,"</td>")));var f=t.evaluation.activations.find(function(t){return t.requiredSkill===o});return f&&s.append(v.htmlToElement("<td ".concat(f.isPositive?"":'class="neg-skill"','}">').concat(f.name,"</td>"))),s}),s=document.createElement("tr");s.appendChild(v.htmlToElement("<td>Slots</td>")),[r.weaponSlots].concat(e(t.getPieces().map(function(t){return t.slots})),[t.charm.slots]).forEach(function(t){return s.appendChild(v.htmlToElement("<td>".concat(t,"</td>")))});var c=v.htmlToElement('<table class="result-set-skill-table"></table>');c.appendChild(o),l.forEach(function(t){return c.appendChild(t)}),c.appendChild(s);var u,d=new Map,h=a(t.decos);try{for(h.s();!(u=h.n()).done;){var f=u.value.name;d.set(f,1+(d.get(f)||0))}}catch(S){h.e(S)}finally{h.f()}var p=Array.from(d.entries()).map(function(t){var e=i(t,2),n=e[0],r=e[1];return"".concat(r," x ").concat(n)}).join(", "),g=v.htmlToElement("\n <div><span>".concat(p,"</span></div>\n ")),b=v.htmlToElement('<table class="result-set-piece-table"></table>'),E=v.htmlToElement("<tr><th>Def</th><th>Piece</th><th>Pin</th><th>Excl</th></tr>");b.appendChild(E);var w,x=a(t.getPieces());try{var T=function(){var t=w.value,e=document.createElement("tr"),n=v.htmlToElement('<td style="width: 20%;">'.concat(t.defense.max,"</td>")),r=v.htmlToElement('<td style="width: 50%;">'.concat(t.name,"</td>")),o=t.isGeneric?v.htmlToElement('<td style="user-select: none; width: 15%;"></td>'):v.htmlToElement('<td style="user-select: none; width: 15%; cursor: pointer;">✓</td>'),a=t.isGeneric?v.htmlToElement('<td style="user-select: none; width: 15%;"></td>'):v.htmlToElement('<td style="user-select: none; width: 15%; cursor: pointer;">X</td>');m.default.Instance.hasPin(t)&&o.classList.add("pin-highlighted"),m.default.Instance.hasExclusion(t)&&a.classList.add("excl-highlighted"),o.addEventListener("click",function(){t.isGeneric||(m.default.Instance.hasPin(t)?(y.removePin(t.category),o.classList.remove("pin-highlighted")):(y.addPin(t),o.classList.add("pin-highlighted")))}),a.addEventListener("click",function(){t.isGeneric||(m.default.Instance.hasExclusion(t)?(y.removeExlusion(t),a.classList.remove("excl-highlighted")):(y.addExclusion(t),a.classList.add("excl-highlighted")))}),e.appendChild(n),e.appendChild(r),e.appendChild(o),e.appendChild(a),b.appendChild(e)};for(x.s();!(w=x.n()).done;)T()}catch(S){x.e(S)}finally{x.f()}var k=v.htmlToElement('<tr class="result-set-details"></tr>'),L=v.htmlToElement('<td colspan="6""></td>'),C=v.htmlToElement('<div class="result-set-details-container"></div>');return L.appendChild(C),k.appendChild(L),C.appendChild(b),C.appendChild(c),C.appendChild(document.createElement("div")),C.appendChild(g),k},x=function(t,e,n){for(var r=n.skillActivations,o=t.evaluation.activations.filter(function(t){return!t.isPositive||!r.find(function(e){return e.requiredSkill===t.requiredSkill})||r.find(function(e){return e.requiredSkill===t.requiredSkill&&t.requiredPoints>e.requiredPoints})}).sort(function(t,e){return e.requiredPoints-t.requiredPoints}).map(function(t){return'<span class="result-set-unrelated-skill '.concat(t.isPositive?"":"neg-skill",'">').concat(t.name,"</span>")}),a=v.htmlToElement('<tbody class="result-set"></tbody>'),i=v.htmlToElement('\n <tr class="result-set-row result-set-row1">\n <td>'.concat(t.head.name,"</td>\n <td>").concat(t.chest.name,"</td>\n <td>").concat(t.arms.name,"</td>\n <td>").concat(t.waist.name,"</td>\n <td>").concat(t.legs.name,"</td>\n <td>").concat(t.charm.name,"</td>\n </tr>")),l=v.htmlToElement('\n <tr class="result-set-row result-set-row2">\n <td colspan="6">\n <p><span class="def">DEF</span> <span>'.concat(t.evaluation.defense.max,'</span></p>\n <p><span class="fir">FIR</span> <span>').concat(t.evaluation.resistance[0],'</span></p>\n <p><span class="wat">WAT</span> <span>').concat(t.evaluation.resistance[1],'</span></p>\n <p><span class="ice">ICE</span> <span>').concat(t.evaluation.resistance[2],'</span></p>\n <p><span class="thn">THN</span> <span>').concat(t.evaluation.resistance[3],'</span></p>\n <p><span class="drg">DRG</span> <span>').concat(t.evaluation.resistance[4],'</span></p>\n <span class="result-set-unrelated">').concat(o.join(""),"</span>\n </td>\n </tr>")),s=function(){return w(t,e,n)},c=0,u=[i,l];c<u.length;c++){var d=u[c];a.appendChild(d),d.addEventListener("click",function(){return b(a,s)})}return a},T=function(t){for(var e=parseInt(t.getAttribute("data-id")),n=0,r=Array.from(document.getElementsByClassName("search-picker-activation"));n<r.length;n++){var o=r[n];if(e===parseInt(o.getAttribute("data-id"))){o.click();break}}},k=function(){for(var t=document.getElementById("search-results"),e=0,n=Array.from(t.children);e<n.length;e++){n[e].remove()}return t};exports.renderMoreSkills=function(t,e){var n=k();if(0===t.length)return n.appendChild(v.htmlToElement('\n <div class="results-banner banner">\n Can\'t fit more skills\n <div>\n ')),void(e&&n.appendChild(E));var r,o=a(t);try{var i=function(){var t=r.value,e=v.htmlToElement('<div class="results-more-skills-act" data-id="'.concat(t.id,'"></div>'));e.appendChild(v.htmlToElement('<span class="results-more-skills-act-content">'.concat(t.name,"</span>"))),e.addEventListener("click",function(){T(e)}),n.appendChild(e)};for(o.s();!(r=o.n()).done;)i()}catch(l){o.e(l)}finally{o.f()}},exports.renderResults=function(t,e,n,r){var o=k();if(o.appendChild(v.htmlToElement('\n <div class="results-title">Results for '.concat(n.skillActivations.map(function(t){return t.name}).join(", ")," (").concat(t.length," matches)</div>\n "))),0===t.length)return o.appendChild(v.htmlToElement('\n <div class="results-banner banner">\n No matching armor sets\n <div>\n ')),void(r&&o.appendChild(E));var a=v.htmlToElement('<table class="results-table" id="results-table"></table>'),i=v.htmlToElement("<tr><th>Head</th><th>Torso</th><th>Arms</th><th>Waist</th><th>Legs</th><th>Charm</th></tr>");o.appendChild(a),a.appendChild(i),t.sort(function(t,e){return e.evaluation.defense.max-t.evaluation.defense.max}).map(function(t){return x(t,e,n)}).forEach(function(t){return a.appendChild(t)})};
|
|
},{"../../data-provider/models/user/UserEquipmentSettings":"fC2O","../../helper/html.helper":"nZfY","./eq-settings.component":"vmHf"}],"ZDl8":[function(require,module,exports) {
|
|
var define;
|
|
var t;function e(t){return(e="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)}var r=this;function n(){"use strict";n=function(){return t};var t={},r=Object.prototype,o=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(O){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),c=new P(n||[]);return i(a,"_invoke",{value:L(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(O){return{type:"throw",arg:O}}}t.wrap=f;var d={};function p(){}function v(){}function y(){}var m={};l(m,c,function(){return this});var g=Object.getPrototypeOf,b=g&&g(g(j([])));b&&b!==r&&o.call(b,c)&&(m=b);var w=y.prototype=p.prototype=Object.create(m);function x(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function k(t,r){var n;i(this,"_invoke",{value:function(i,a){function c(){return new r(function(n,c){!function n(i,a,c,u){var s=h(t[i],t,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==e(f)&&o.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,c,u)},function(t){n("throw",t,c,u)}):r.resolve(f).then(function(t){l.value=t,c(l)},function(t){return n("throw",t,c,u)})}u(s.arg)}(i,a,n,c)})}return n=n?n.then(c,c):c()}})}function L(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return q()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=E(a,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function E(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,d;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function j(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:q}}function q(){return{value:void 0,done:!0}}return v.prototype=y,i(w,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:v,configurable:!0}),v.displayName=l(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,l(t,s,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},x(k.prototype),l(k.prototype,u,function(){return this}),t.AsyncIterator=k,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new k(f(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},x(w),l(w,s,"Generator"),l(w,c,function(){return this}),l(w,"toString",function(){return"[object Generator]"}),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=j,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=i(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 a,c=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,a=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw a}}}}function i(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var c=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{u(n.next(t))}catch(e){i(e)}}function c(t){try{u(n.throw(t))}catch(e){i(e)}}function u(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(a,c)}u((n=n.apply(t,e||[])).next())})},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});var s=u(require("../../data-provider/models/user/UserCharmList")),l=require("../../searcher/searcher.module"),f=require("./global-settings.component"),h=require("./picker.component"),d=require("./search-results.component"),p=u(require("../../data-provider/models/user/UserEquipmentSettings")),v=function(t,e){return t.some(function(t){return void 0!==t})||e.some(function(t){return t.length>0})},y=function(){var t=f.getGlobalSettings(),e=h.getSkillActivations();if(0!==e.length){var r=e.filter(function(t,r){return e.every(function(e,n){return r===n||(t.requiredSkill!==e.requiredSkill||t.requiredPoints>=e.requiredPoints)})});return{weaponSlots:t.weaponSlots,armorType:t.armorType,armorRarity:t.armorRarity,decoRarity:t.decoRarity,limit:Math.min(Math.max(t.limit,1),1e3),skillActivations:r,pins:p.default.Instance.pins,exclusions:p.default.Instance.exclusions}}},m=function(t,e){var r=y();if(r){var n=l.search(t.armor,t.decorations,s.default.Instance.get(),r,e);d.renderResults(n,e,r,v(r.pins,r.exclusions))}else alert("Please select at least one skill")},g=function(t,e){return c(r,void 0,void 0,n().mark(function r(){var i,a,c,u,f,h,p,m,g,b,w,x,k;return n().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(i=y()){r.next=4;break}return alert("Please select at least one skill"),r.abrupt("return");case 4:a=s.default.Instance.get(),c=[],u=d.moreSkillsIterator(e.skillActivation),f=o(e.skillActivation),r.prev=8,f.s();case 10:if((h=f.n()).done){r.next=36;break}p=h.value,m=p[1],g=m.filter(function(t){return t.requiredPoints>=0}).filter(function(t){return!i.skillActivations.map(function(t){return t.id}).includes(t.id)}).filter(function(t){return!i.skillActivations.find(function(e){return t.requiredSkill===e.requiredSkill&&t.requiredPoints<e.requiredPoints})}).sort(function(t,e){return t.requiredPoints-e.requiredPoints}),b=!1,w=o(g),r.prev=16,k=n().mark(function r(){var o,s;return n().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(o=x.value,u.next(),!b){r.next=4;break}return r.abrupt("return","continue");case 4:return s=Object.assign({},i,{limit:1,skillActivations:i.skillActivations.concat(o)}),r.next=7,new Promise(function(r,n){setTimeout(function(){var n=l.search(t.armor,t.decorations,a,s,e);r(n)})});case 7:0===r.sent.length?b=!0:c.push(o);case 9:case"end":return r.stop()}},r)}),w.s();case 19:if((x=w.n()).done){r.next=26;break}return r.delegateYield(k(),"t0",21);case 21:if("continue"!==r.t0){r.next=24;break}return r.abrupt("continue",24);case 24:r.next=19;break;case 26:r.next=31;break;case 28:r.prev=28,r.t1=r.catch(16),w.e(r.t1);case 31:return r.prev=31,w.f(),r.finish(31);case 34:r.next=10;break;case 36:r.next=41;break;case 38:r.prev=38,r.t2=r.catch(8),f.e(r.t2);case 41:return r.prev=41,f.f(),r.finish(41);case 44:d.renderMoreSkills(c,v(i.pins,i.exclusions));case 45:case"end":return r.stop()}},r,null,[[8,38,41,44],[16,28,31,34]])}))},b=function(){h.resetSkillActivations()};exports.attachControlListeners=function(t,e){var r=document.getElementById("search-btn"),n=document.getElementById("more-btn"),o=document.getElementById("reset-btn");r.addEventListener("click",function(){m(t,e)}),n.addEventListener("click",function(){g(t,e)}),o.addEventListener("click",function(){b()})};
|
|
},{"../../data-provider/models/user/UserCharmList":"He0k","../../searcher/searcher.module":"mUId","./global-settings.component":"qhuQ","./picker.component":"EAj3","./search-results.component":"sJIk","../../data-provider/models/user/UserEquipmentSettings":"fC2O"}],"QCba":[function(require,module,exports) {
|
|
"use strict";function t(e){return(t="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})(e)}var e=this;function r(){r=function(){return e};var e={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(P){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,a=Object.create(o.prototype),c=new O(n||[]);return i(a,"_invoke",{value:k(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(P){return{type:"throw",arg:P}}}e.wrap=f;var p={};function v(){}function y(){}function d(){}var g={};l(g,c,function(){return this});var m=Object.getPrototypeOf,w=m&&m(m(j([])));w&&w!==n&&o.call(w,c)&&(g=w);var x=d.prototype=v.prototype=Object.create(g);function b(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function L(e,r){var n;i(this,"_invoke",{value:function(i,a){function c(){return new r(function(n,c){!function n(i,a,c,u){var s=h(e[i],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==t(f)&&o.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,c,u)},function(t){n("throw",t,c,u)}):r.resolve(f).then(function(t){l.value=t,c(l)},function(t){return n("throw",t,c,u)})}u(s.arg)}(i,a,n,c)})}return n=n?n.then(c,c):c()}})}function k(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return N()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=E(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function E(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,p;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:N}}function N(){return{value:void 0,done:!0}}return y.prototype=d,i(x,"constructor",{value:d,configurable:!0}),i(d,"constructor",{value:y,configurable:!0}),y.displayName=l(d,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,s,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},b(L.prototype),l(L.prototype,u,function(){return this}),e.AsyncIterator=L,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new L(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},b(x),l(x,s,"Generator"),l(x,c,function(){return this}),l(x,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=j,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{u(n.next(t))}catch(e){i(e)}}function c(t){try{u(n.throw(t))}catch(e){i(e)}}function u(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(a,c)}u((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0});var o=require("../../data-provider/data-provider.module"),i=require("../ui/charms.component"),a=require("../ui/eq-settings.component"),c=require("../ui/navbar.component"),u=require("../ui/picker.component"),s=require("../ui/search-controls.component"),l=function(){return n(e,void 0,void 0,r().mark(function t(){var e,n,l;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return c.initiateNavbar(),t.next=3,o.getHead();case 3:return t.t0=t.sent,t.next=6,o.getChest();case 6:return t.t1=t.sent,t.next=9,o.getArms();case 9:return t.t2=t.sent,t.next=12,o.getWaist();case 12:return t.t3=t.sent,t.next=15,o.getLegs();case 15:return t.t4=t.sent,e=[t.t0,t.t1,t.t2,t.t3,t.t4],t.next=19,o.getDecorations();case 19:return n=t.sent,t.next=22,o.getSkillNameMap();case 22:return t.t5=t.sent,t.next=25,o.getSkillActivationMap();case 25:return t.t6=t.sent,t.next=28,o.getSkillCategories();case 28:t.t7=t.sent,l={skillName:t.t5,skillActivation:t.t6,skillCategories:t.t7},u.renderSkillPicker(l.skillActivation,l.skillCategories),i.renderCharmPicker(l.skillName,l.skillActivation,l.skillCategories),a.renderEqSettings(e),s.attachControlListeners({armor:e,decorations:n},l);case 34:case"end":return t.stop()}},t)}))};l();
|
|
},{"../../data-provider/data-provider.module":"mrro","../ui/charms.component":"aUxA","../ui/eq-settings.component":"vmHf","../ui/navbar.component":"f7g5","../ui/picker.component":"EAj3","../ui/search-controls.component":"ZDl8"}]},{},["QCba"], null)
|
|
//# sourceMappingURL=pages.2550135d.js.map
|