bnstooltips 1.6.5 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -58,8 +58,8 @@ function styleInject(css, ref) {
58
58
  }
59
59
  }
60
60
 
61
- var css_248z$7 = "*[class*=\"00008130.UI.Label_LightYellow_12\"] {\n color: #ecd967 !important; }\n\n*[class*=\"00008130.UI.Vital_LightBlue\"] {\n color: #46bee1 !important;\n font-weight: 500 !important; }\n\n*[class*=\"00008130.UI.Label_Green03_12\"] {\n color: #58ff77 !important; }\n\n.TooltipBase_grade-none {\n color: #c2cadc; }\n\n.TooltipBase_grade-1 {\n color: #6c6c6c !important; }\n\n.TooltipBase_border-grade-1 {\n border-color: #6c6c6c !important; }\n\n.TooltipBase_border-hover-grade-1:hover {\n border-color: #6c6c6c !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_1\"] {\n color: #6c6c6c !important;\n border-color: #6c6c6c !important; }\n\n.TooltipBase_grade-2 {\n color: #ffffff !important; }\n\n.TooltipBase_border-grade-2 {\n border-color: #ffffff !important; }\n\n.TooltipBase_border-hover-grade-2:hover {\n border-color: #ffffff !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_2\"] {\n color: #ffffff !important;\n border-color: #ffffff !important; }\n\n.TooltipBase_grade-3 {\n color: #58ff77 !important; }\n\n.TooltipBase_border-grade-3 {\n border-color: #58ff77 !important; }\n\n.TooltipBase_border-hover-grade-3:hover {\n border-color: #58ff77 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_3\"] {\n color: #58ff77 !important;\n border-color: #58ff77 !important; }\n\n.TooltipBase_grade-4 {\n color: #46bee1 !important; }\n\n.TooltipBase_border-grade-4 {\n border-color: #46bee1 !important; }\n\n.TooltipBase_border-hover-grade-4:hover {\n border-color: #46bee1 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_4\"] {\n color: #46bee1 !important;\n border-color: #46bee1 !important; }\n\n.TooltipBase_grade-5 {\n color: #d739ff !important; }\n\n.TooltipBase_border-grade-5 {\n border-color: #d739ff !important; }\n\n.TooltipBase_border-hover-grade-5:hover {\n border-color: #d739ff !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_5\"] {\n color: #d739ff !important;\n border-color: #d739ff !important; }\n\n.TooltipBase_grade-6 {\n color: #f1b248 !important; }\n\n.TooltipBase_border-grade-6 {\n border-color: #f1b248 !important; }\n\n.TooltipBase_border-hover-grade-6:hover {\n border-color: #f1b248 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_6\"] {\n color: #f1b248 !important;\n border-color: #f1b248 !important; }\n\n.TooltipBase_grade-7 {\n color: #ff770a !important; }\n\n.TooltipBase_border-grade-7 {\n border-color: #ff770a !important; }\n\n.TooltipBase_border-hover-grade-7:hover {\n border-color: #ff770a !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_7\"] {\n color: #ff770a !important;\n border-color: #ff770a !important; }\n\n.TooltipBase_grade-8 {\n color: #ff0084 !important; }\n\n.TooltipBase_border-grade-8 {\n border-color: #ff0084 !important; }\n\n.TooltipBase_border-hover-grade-8:hover {\n border-color: #ff0084 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_8\"] {\n color: #ff0084 !important;\n border-color: #ff0084 !important; }\n\n.TooltipBase_iconbg-grade-1 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_1.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-2 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_2.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-3 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_3.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-4 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_4.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-5 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_5.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-6 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_6.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-7 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_7.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-8 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_9.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-9 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_9.png\") no-repeat; }\n\n.TooltipBase_container {\n box-sizing: border-box;\n font-family: \"Montserrat\", sans-serif !important;\n scroll-behavior: smooth;\n touch-action: manipulation;\n -webkit-overflow-scrolling: touch;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n position: relative;\n display: inline-flex;\n flex-direction: column;\n background-color: rgba(3, 3, 3, 0.9);\n backdrop-filter: brightness(1.5) blur(5px);\n -webkit-backdrop-filter: brightness(1.5) blur(5px);\n padding: 1rem;\n border: 1px solid;\n border-color: #6c6c6c;\n font-weight: 500;\n font-size: 16px;\n text-decoration: none;\n color: #fff;\n width: 380px;\n max-height: calc(100vh - 50px);\n overflow-y: auto;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */\n border-radius: 3px;\n text-shadow: black 1px 1px 0; }\n\n.TooltipBase_containerFullHeight {\n height: 99%; }\n\n.TooltipBase_container::-webkit-scrollbar {\n display: none; }\n\n@media only screen and (max-width: 380px) {\n .TooltipBase_container {\n width: 100%; } }\n\n@supports not (backdrop-filter: brightness(1.5) blur(5px)) {\n .TooltipBase_container {\n background-color: rgba(0, 0, 0, 0.95); }\n .TooltipBase_container-loading {\n background-color: rgba(0, 0, 0, 0.95); } }\n\n.TooltipBase_container-loading {\n background-color: rgba(3, 3, 3, 0.9);\n backdrop-filter: brightness(1.5) blur(5px);\n -webkit-backdrop-filter: brightness(1.5) blur(5px);\n padding: 1rem; }\n\n.TooltipBase_titlesubtitle {\n display: flex;\n justify-content: space-between;\n margin-bottom: 1rem; }\n\n.TooltipBase_title {\n flex: 1;\n overflow: hidden;\n padding-right: 1rem; }\n\n.TooltipBase_title_text {\n font-size: 18px;\n text-shadow: black 1px 1px 0;\n font-weight: 500; }\n\n.TooltipBase_subtitle {\n text-align: end;\n font-size: 12px; }\n\n.TooltipBase_iconmaininfo {\n display: flex;\n margin-bottom: 0.8rem; }\n\n.TooltipBase_iconcontainer {\n margin-right: 0.5rem;\n margin-bottom: 0.25rem;\n float: left;\n position: relative; }\n\n.TooltipBase_iconBg {\n width: 64px;\n height: 64px;\n background-origin: content-box !important; }\n\n.TooltipBase_icon {\n width: calc(64px - (0px * 2));\n height: calc(64px - (0px * 2));\n padding: 0px; }\n\n.TooltipBase_maininfocontainer {\n font-size: 16px;\n font-weight: 500; }\n\n.TooltipBase_maininfocontainer > div:not(:last-child) {\n margin-bottom: 0.2rem; }\n\n.TooltipBase_fullwidthContainer {\n line-height: 17px; }\n\n.TooltipBase_fullwidthContainer > div:not(:last-child) {\n margin-bottom: 0.5rem; }\n\n.TooltipBase_fullwidthContainer-subContainer {\n font-size: 12px; }\n\n.TooltipBase_fullwidthContainer-subContainer > div:not(:last-child) {\n margin-bottom: 0.1rem; }\n\n.TooltipBase_flex {\n display: flex;\n align-items: center; }\n\n.TooltipBase_flex-col {\n display: flex;\n justify-content: center;\n flex-direction: column; }\n\n.TooltipBase_descriptions-description-title {\n font-weight: 500; }\n";
62
- styleInject(css_248z$7);
61
+ var css_248z$6 = "*[class*=\"00008130.UI.Label_LightYellow_12\"] {\n color: #ecd967 !important; }\n\n*[class*=\"00008130.UI.Vital_LightBlue\"] {\n color: #46bee1 !important;\n font-weight: 500 !important; }\n\n*[class*=\"00008130.UI.Label_Green03_12\"] {\n color: #58ff77 !important; }\n\n.TooltipBase_grade-none {\n color: #c2cadc; }\n\n.TooltipBase_grade-1 {\n color: #6c6c6c !important; }\n\n.TooltipBase_border-grade-1 {\n border-color: #6c6c6c !important; }\n\n.TooltipBase_border-hover-grade-1:hover {\n border-color: #6c6c6c !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_1\"] {\n color: #6c6c6c !important;\n border-color: #6c6c6c !important; }\n\n.TooltipBase_grade-2 {\n color: #ffffff !important; }\n\n.TooltipBase_border-grade-2 {\n border-color: #ffffff !important; }\n\n.TooltipBase_border-hover-grade-2:hover {\n border-color: #ffffff !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_2\"] {\n color: #ffffff !important;\n border-color: #ffffff !important; }\n\n.TooltipBase_grade-3 {\n color: #58ff77 !important; }\n\n.TooltipBase_border-grade-3 {\n border-color: #58ff77 !important; }\n\n.TooltipBase_border-hover-grade-3:hover {\n border-color: #58ff77 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_3\"] {\n color: #58ff77 !important;\n border-color: #58ff77 !important; }\n\n.TooltipBase_grade-4 {\n color: #46bee1 !important; }\n\n.TooltipBase_border-grade-4 {\n border-color: #46bee1 !important; }\n\n.TooltipBase_border-hover-grade-4:hover {\n border-color: #46bee1 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_4\"] {\n color: #46bee1 !important;\n border-color: #46bee1 !important; }\n\n.TooltipBase_grade-5 {\n color: #d739ff !important; }\n\n.TooltipBase_border-grade-5 {\n border-color: #d739ff !important; }\n\n.TooltipBase_border-hover-grade-5:hover {\n border-color: #d739ff !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_5\"] {\n color: #d739ff !important;\n border-color: #d739ff !important; }\n\n.TooltipBase_grade-6 {\n color: #f1b248 !important; }\n\n.TooltipBase_border-grade-6 {\n border-color: #f1b248 !important; }\n\n.TooltipBase_border-hover-grade-6:hover {\n border-color: #f1b248 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_6\"] {\n color: #f1b248 !important;\n border-color: #f1b248 !important; }\n\n.TooltipBase_grade-7 {\n color: #ff770a !important; }\n\n.TooltipBase_border-grade-7 {\n border-color: #ff770a !important; }\n\n.TooltipBase_border-hover-grade-7:hover {\n border-color: #ff770a !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_7\"] {\n color: #ff770a !important;\n border-color: #ff770a !important; }\n\n.TooltipBase_grade-8 {\n color: #ff0084 !important; }\n\n.TooltipBase_border-grade-8 {\n border-color: #ff0084 !important; }\n\n.TooltipBase_border-hover-grade-8:hover {\n border-color: #ff0084 !important; }\n\n*[class*=\"00008130.Program.Fontset_ItemGrade_8\"] {\n color: #ff0084 !important;\n border-color: #ff0084 !important; }\n\n.TooltipBase_iconbg-grade-1 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_1.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-2 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_2.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-3 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_3.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-4 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_4.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-5 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_5.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-6 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_6.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-7 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_7.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-8 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_9.png\") no-repeat; }\n\n.TooltipBase_iconbg-grade-9 {\n background: url(\"https://lean.bns.tools/bns/icons/UE4/ItemIcon_Bg_Grade_9.png\") no-repeat; }\n\n.TooltipBase_container {\n box-sizing: border-box;\n font-family: \"Montserrat\", sans-serif !important;\n scroll-behavior: smooth;\n touch-action: manipulation;\n -webkit-overflow-scrolling: touch;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n position: relative;\n display: inline-flex;\n flex-direction: column;\n background-color: rgba(3, 3, 3, 0.9);\n backdrop-filter: brightness(1.5) blur(5px);\n -webkit-backdrop-filter: brightness(1.5) blur(5px);\n padding: 1rem;\n border: 1px solid;\n border-color: #6c6c6c;\n font-weight: 500;\n font-size: 16px;\n text-decoration: none;\n color: #fff;\n width: 380px;\n max-height: calc(100vh - 50px);\n overflow-y: auto;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */\n border-radius: 3px;\n text-shadow: black 1px 1px 0; }\n\n.TooltipBase_containerFullHeight {\n height: 99%; }\n\n.TooltipBase_container::-webkit-scrollbar {\n display: none; }\n\n@media only screen and (max-width: 380px) {\n .TooltipBase_container {\n width: 100%; } }\n\n@supports not (backdrop-filter: brightness(1.5) blur(5px)) {\n .TooltipBase_container {\n background-color: rgba(0, 0, 0, 0.95); }\n .TooltipBase_container-loading {\n background-color: rgba(0, 0, 0, 0.95); } }\n\n.TooltipBase_container-loading {\n background-color: rgba(3, 3, 3, 0.9);\n backdrop-filter: brightness(1.5) blur(5px);\n -webkit-backdrop-filter: brightness(1.5) blur(5px);\n padding: 1rem; }\n\n.TooltipBase_titlesubtitle {\n display: flex;\n justify-content: space-between;\n margin-bottom: 1rem; }\n\n.TooltipBase_title {\n flex: 1;\n overflow: hidden;\n padding-right: 1rem; }\n\n.TooltipBase_title_text {\n font-size: 18px;\n text-shadow: black 1px 1px 0;\n font-weight: 500; }\n\n.TooltipBase_subtitle {\n text-align: end;\n font-size: 12px; }\n\n.TooltipBase_iconmaininfo {\n display: flex;\n margin-bottom: 0.8rem; }\n\n.TooltipBase_iconcontainer {\n margin-right: 0.5rem;\n margin-bottom: 0.25rem;\n float: left;\n position: relative; }\n\n.TooltipBase_iconBg {\n width: 64px;\n height: 64px;\n background-origin: content-box !important; }\n\n.TooltipBase_icon {\n width: calc(64px - (0px * 2));\n height: calc(64px - (0px * 2));\n padding: 0px; }\n\n.TooltipBase_maininfocontainer {\n font-size: 16px;\n font-weight: 500; }\n\n.TooltipBase_maininfocontainer > div:not(:last-child) {\n margin-bottom: 0.2rem; }\n\n.TooltipBase_fullwidthContainer {\n line-height: 17px; }\n\n.TooltipBase_fullwidthContainer > div:not(:last-child) {\n margin-bottom: 0.5rem; }\n\n.TooltipBase_fullwidthContainer-subContainer {\n font-size: 12px; }\n\n.TooltipBase_fullwidthContainer-subContainer > div:not(:last-child) {\n margin-bottom: 0.1rem; }\n\n.TooltipBase_flex {\n display: flex;\n align-items: center; }\n\n.TooltipBase_flex-col {\n display: flex;\n justify-content: center;\n flex-direction: column; }\n\n.TooltipBase_descriptions-description-title {\n font-weight: 500; }\n";
62
+ styleInject(css_248z$6);
63
63
 
64
64
  function TooltipBase(_a) {
65
65
  var title = _a.title, category = _a.subtitle, grade = _a.grade, _b = _a.icon, icon = _b === void 0 ? "" : _b, _c = _a.mainInfos, mainTexts = _c === void 0 ? [] : _c, _d = _a.subInfoGroups, subTexts = _d === void 0 ? [] : _d, id = _a.id, _e = _a.fullHeight, fullHeight = _e === void 0 ? false : _e;
@@ -161,8 +161,8 @@ function __generator(thisArg, body) {
161
161
  }
162
162
  }
163
163
 
164
- var css_248z$6 = ".ItemTooltip_itemIconLoading {\n width: 50px;\n padding: 0.22rem 0;\n display: flex;\n justify-content: center;\n align-items: center; }\n\n.ItemTooltip_jobstyleToggleContainer {\n display: flex; }\n\n.ItemTooltip_jobstyleButton {\n flex: 1;\n border: none;\n padding: 0.33rem 0.5rem;\n border-radius: 0;\n background-color: rgba(233, 233, 233, 0.1);\n color: #fff;\n opacity: 0.8;\n cursor: pointer;\n transition: background-color 0.1s; }\n .ItemTooltip_jobstyleButton:hover {\n background-color: rgba(255, 255, 255, 0.2);\n opacity: 1; }\n .ItemTooltip_jobstyleButton-active {\n background-color: rgba(255, 255, 255, 0.3) !important;\n color: #fff;\n opacity: 1; }\n\n.ItemTooltip_itemiconnamedivspan {\n display: flex;\n justify-content: center;\n align-items: center; }\n\n.ItemTooltip_cooldown {\n font-weight: 400;\n font-size: 12px; }\n\n.ItemTooltip_subInfo {\n font-size: 14px; }\n\n.ItemTooltip_stats_mainstat {\n font-size: 16px;\n margin-bottom: 0.05rem; }\n\n.ItemTooltip_stats_substat {\n font-size: 14px; }\n\n.ItemTooltip_itemIconInline {\n width: 18px !important;\n height: 18px !important;\n margin: 0 1px;\n top: 3px;\n position: relative; }\n\n.ItemTooltip_itemIconRandom {\n width: 36px !important;\n top: 6px;\n margin: 0 1px 0 2px; }\n\n.ItemTooltip_itemIconSmall {\n width: 20px !important;\n height: 20px !important;\n margin-right: 0.33rem; }\n\n.ItemTooltip_setBonus {\n margin-bottom: 0.8rem !important; }\n\n.ItemTooltip_setContainer {\n padding-left: 0.33rem;\n padding-top: 0.22rem; }\n\n.ItemTooltip_setStageContainer {\n display: flex;\n margin: 0.25rem 0 0.35rem 0; }\n\n.ItemTooltip_setStageNumber {\n margin-top: 0.2rem;\n padding-top: 0.1rem;\n line-height: 16px;\n width: 16px;\n height: 16px;\n max-height: 16px;\n font-weight: 500;\n display: flex;\n justify-content: center;\n align-items: center;\n color: rgba(88, 255, 119, 0.8);\n border: 1px solid rgba(88, 255, 119, 0.9);\n border-radius: 3px; }\n\n.ItemTooltip_setStageContent {\n padding-top: 0.2rem;\n flex-grow: 2;\n padding-left: 0.55rem;\n max-width: 90%;\n color: #58ff77; }\n\n.ItemTooltip_itemiconnamediv {\n display: flex;\n align-items: center;\n padding: 0.15rem 0 0.15rem 0.33rem;\n line-height: 20px; }\n\n.ItemTooltip_setItemIconNameDiv {\n display: flex;\n align-items: center;\n padding: 0.11rem 0 0.11rem 0.33rem;\n line-height: 20px; }\n\n.ItemTooltip_setItemsContainer {\n display: flex;\n font-size: 12px; }\n\n.ItemTooltip_setItemsSubContainer {\n flex: 1; }\n\n.ItemTooltip_itemNameRandomDiv {\n display: flex;\n align-items: center; }\n\n@media only screen and (max-width: 380px) {\n .ItemTooltip_jobstyleButton {\n padding: 0.5rem; } }\n\n/**\r\n * ==============================================\r\n * Dot Elastic\r\n * ==============================================\r\n */\n.dot-elastic {\n position: relative;\n width: 10px;\n height: 10px;\n border-radius: 5px;\n background-color: rgba(127, 127, 127, 0.8);\n color: rgba(127, 127, 127, 0.8);\n animation: dotElastic 1s infinite linear; }\n\n.dot-elastic::before,\n.dot-elastic::after {\n content: \"\";\n display: inline-block;\n position: absolute;\n top: 0; }\n\n.dot-elastic::before {\n left: -15px;\n width: 10px;\n height: 10px;\n border-radius: 5px;\n background-color: rgba(127, 127, 127, 0.8);\n color: rgba(127, 127, 127, 0.8);\n animation: dotElasticBefore 1s infinite linear; }\n\n.dot-elastic::after {\n left: 15px;\n width: 10px;\n height: 10px;\n border-radius: 5px;\n background-color: rgba(127, 127, 127, 0.8);\n color: rgba(127, 127, 127, 0.8);\n animation: dotElasticAfter 1s infinite linear; }\n\n@keyframes dotElasticBefore {\n 0% {\n transform: scale(1, 1); }\n 25% {\n transform: scale(1, 1.5); }\n 50% {\n transform: scale(1, 0.67); }\n 75% {\n transform: scale(1, 1); }\n 100% {\n transform: scale(1, 1); } }\n\n@keyframes dotElastic {\n 0% {\n transform: scale(1, 1); }\n 25% {\n transform: scale(1, 1); }\n 50% {\n transform: scale(1, 1.5); }\n 75% {\n transform: scale(1, 1); }\n 100% {\n transform: scale(1, 1); } }\n\n@keyframes dotElasticAfter {\n 0% {\n transform: scale(1, 1); }\n 25% {\n transform: scale(1, 1); }\n 50% {\n transform: scale(1, 0.67); }\n 75% {\n transform: scale(1, 1.5); }\n 100% {\n transform: scale(1, 1); } }\n";
165
- styleInject(css_248z$6);
164
+ var css_248z$5 = ".ItemTooltip_itemIconLoading {\n width: 50px;\n padding: 0.22rem 0;\n display: flex;\n justify-content: center;\n align-items: center; }\n\n.ItemTooltip_jobstyleToggleContainer {\n display: flex; }\n\n.ItemTooltip_jobstyleButton {\n flex: 1;\n border: none;\n padding: 0.33rem 0.5rem;\n border-radius: 0;\n background-color: rgba(233, 233, 233, 0.1);\n color: #fff;\n opacity: 0.8;\n cursor: pointer;\n transition: background-color 0.1s; }\n .ItemTooltip_jobstyleButton:hover {\n background-color: rgba(255, 255, 255, 0.2);\n opacity: 1; }\n .ItemTooltip_jobstyleButton-active {\n background-color: rgba(255, 255, 255, 0.3) !important;\n color: #fff;\n opacity: 1; }\n\n.ItemTooltip_itemiconnamedivspan {\n display: flex;\n justify-content: center;\n align-items: center; }\n\n.ItemTooltip_cooldown {\n font-weight: 400;\n font-size: 12px; }\n\n.ItemTooltip_subInfo {\n font-size: 14px; }\n\n.ItemTooltip_stats_mainstat {\n font-size: 16px;\n margin-bottom: 0.05rem; }\n\n.ItemTooltip_stats_substat {\n font-size: 14px; }\n\n.ItemTooltip_itemIconInline {\n width: 18px !important;\n height: 18px !important;\n margin: 0 1px;\n top: 3px;\n position: relative; }\n\n.ItemTooltip_itemIconRandom {\n width: 36px !important;\n top: 6px;\n margin: 0 1px 0 2px; }\n\n.ItemTooltip_itemIconSmall {\n width: 20px !important;\n height: 20px !important;\n margin-right: 0.33rem; }\n\n.ItemTooltip_setBonus {\n margin-bottom: 0.8rem !important; }\n\n.ItemTooltip_setContainer {\n padding-left: 0.33rem;\n padding-top: 0.22rem; }\n\n.ItemTooltip_setStageContainer {\n display: flex;\n margin: 0.25rem 0 0.35rem 0; }\n\n.ItemTooltip_setStageNumber {\n margin-top: 0.2rem;\n padding-top: 0.1rem;\n line-height: 16px;\n width: 16px;\n height: 16px;\n max-height: 16px;\n font-weight: 500;\n display: flex;\n justify-content: center;\n align-items: center;\n color: rgba(88, 255, 119, 0.8);\n border: 1px solid rgba(88, 255, 119, 0.9);\n border-radius: 3px; }\n\n.ItemTooltip_setStageContent {\n padding-top: 0.2rem;\n flex-grow: 2;\n padding-left: 0.55rem;\n max-width: 90%;\n color: #58ff77; }\n\n.ItemTooltip_itemiconnamediv {\n display: flex;\n align-items: center;\n padding: 0.15rem 0 0.15rem 0.33rem;\n line-height: 20px; }\n\n.ItemTooltip_setItemIconNameDiv {\n display: flex;\n align-items: center;\n padding: 0.11rem 0 0.11rem 0.33rem;\n line-height: 20px; }\n\n.ItemTooltip_setItemsContainer {\n display: flex;\n font-size: 12px; }\n\n.ItemTooltip_setItemsSubContainer {\n flex: 1; }\n\n.ItemTooltip_itemNameRandomDiv {\n display: flex;\n align-items: center; }\n\n@media only screen and (max-width: 380px) {\n .ItemTooltip_jobstyleButton {\n padding: 0.5rem; } }\n\n/**\r\n * ==============================================\r\n * Dot Elastic\r\n * ==============================================\r\n */\n.dot-elastic {\n position: relative;\n width: 10px;\n height: 10px;\n border-radius: 5px;\n background-color: rgba(127, 127, 127, 0.8);\n color: rgba(127, 127, 127, 0.8);\n animation: dotElastic 1s infinite linear; }\n\n.dot-elastic::before,\n.dot-elastic::after {\n content: \"\";\n display: inline-block;\n position: absolute;\n top: 0; }\n\n.dot-elastic::before {\n left: -15px;\n width: 10px;\n height: 10px;\n border-radius: 5px;\n background-color: rgba(127, 127, 127, 0.8);\n color: rgba(127, 127, 127, 0.8);\n animation: dotElasticBefore 1s infinite linear; }\n\n.dot-elastic::after {\n left: 15px;\n width: 10px;\n height: 10px;\n border-radius: 5px;\n background-color: rgba(127, 127, 127, 0.8);\n color: rgba(127, 127, 127, 0.8);\n animation: dotElasticAfter 1s infinite linear; }\n\n@keyframes dotElasticBefore {\n 0% {\n transform: scale(1, 1); }\n 25% {\n transform: scale(1, 1.5); }\n 50% {\n transform: scale(1, 0.67); }\n 75% {\n transform: scale(1, 1); }\n 100% {\n transform: scale(1, 1); } }\n\n@keyframes dotElastic {\n 0% {\n transform: scale(1, 1); }\n 25% {\n transform: scale(1, 1); }\n 50% {\n transform: scale(1, 1.5); }\n 75% {\n transform: scale(1, 1); }\n 100% {\n transform: scale(1, 1); } }\n\n@keyframes dotElasticAfter {\n 0% {\n transform: scale(1, 1); }\n 25% {\n transform: scale(1, 1); }\n 50% {\n transform: scale(1, 0.67); }\n 75% {\n transform: scale(1, 1.5); }\n 100% {\n transform: scale(1, 1); } }\n";
165
+ styleInject(css_248z$5);
166
166
 
167
167
  function BuildIconPath(iconPath, iconIndex) {
168
168
  if (iconPath == null)
@@ -1448,9 +1448,6 @@ function SetBonus(props) {
1448
1448
  React__default["default"].createElement(SkillModifiers, { jobstyle: jobstyle, isSetBonus: true, skillModifierGroups: setStage.skillModifiers })))); })))));
1449
1449
  }
1450
1450
 
1451
- var css_248z$5 = ".tippy-box {\n max-width: none !important;\n background-color: transparent !important;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;\n transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important; }\n .tippy-box:hover {\n box-shadow: black 0px 20px 60px 0px !important; }\n\n.tippy-content {\n padding: 0 !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ff0084 !important; }\n";
1452
- styleInject(css_248z$5);
1453
-
1454
1451
  var top = 'top';
1455
1452
  var bottom = 'bottom';
1456
1453
  var right = 'right';
@@ -1607,29 +1604,32 @@ function getBasePlacement$1(placement) {
1607
1604
  return placement.split('-')[0];
1608
1605
  }
1609
1606
 
1610
- // import { isHTMLElement } from './instanceOf';
1611
- function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars
1612
- includeScale) {
1607
+ var max = Math.max;
1608
+ var min = Math.min;
1609
+ var round = Math.round;
1610
+
1611
+ function getBoundingClientRect(element, includeScale) {
1612
+ if (includeScale === void 0) {
1613
+ includeScale = false;
1614
+ }
1613
1615
 
1614
1616
  var rect = element.getBoundingClientRect();
1615
1617
  var scaleX = 1;
1616
- var scaleY = 1; // FIXME:
1617
- // `offsetWidth` returns an integer while `getBoundingClientRect`
1618
- // returns a float. This results in `scaleX` or `scaleY` being
1619
- // non-1 when it should be for elements that aren't a full pixel in
1620
- // width or height.
1621
- // if (isHTMLElement(element) && includeScale) {
1622
- // const offsetHeight = element.offsetHeight;
1623
- // const offsetWidth = element.offsetWidth;
1624
- // // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
1625
- // // Fallback to 1 in case both values are `0`
1626
- // if (offsetWidth > 0) {
1627
- // scaleX = rect.width / offsetWidth || 1;
1628
- // }
1629
- // if (offsetHeight > 0) {
1630
- // scaleY = rect.height / offsetHeight || 1;
1631
- // }
1632
- // }
1618
+ var scaleY = 1;
1619
+
1620
+ if (isHTMLElement(element) && includeScale) {
1621
+ var offsetHeight = element.offsetHeight;
1622
+ var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
1623
+ // Fallback to 1 in case both values are `0`
1624
+
1625
+ if (offsetWidth > 0) {
1626
+ scaleX = round(rect.width) / offsetWidth || 1;
1627
+ }
1628
+
1629
+ if (offsetHeight > 0) {
1630
+ scaleY = round(rect.height) / offsetHeight || 1;
1631
+ }
1632
+ }
1633
1633
 
1634
1634
  return {
1635
1635
  width: rect.width / scaleX,
@@ -1748,6 +1748,10 @@ function getContainingBlock(element) {
1748
1748
 
1749
1749
  var currentNode = getParentNode(element);
1750
1750
 
1751
+ if (isShadowRoot(currentNode)) {
1752
+ currentNode = currentNode.host;
1753
+ }
1754
+
1751
1755
  while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
1752
1756
  var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
1753
1757
  // create a containing block.
@@ -1784,13 +1788,13 @@ function getMainAxisFromPlacement(placement) {
1784
1788
  return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
1785
1789
  }
1786
1790
 
1787
- var max = Math.max;
1788
- var min = Math.min;
1789
- var round = Math.round;
1790
-
1791
1791
  function within(min$1, value, max$1) {
1792
1792
  return max(min$1, min(value, max$1));
1793
1793
  }
1794
+ function withinMaxClamp(min, value, max) {
1795
+ var v = within(min, value, max);
1796
+ return v > max ? max : v;
1797
+ }
1794
1798
 
1795
1799
  function getFreshSideObject() {
1796
1800
  return {
@@ -1922,8 +1926,8 @@ function roundOffsetsByDPR(_ref) {
1922
1926
  var win = window;
1923
1927
  var dpr = win.devicePixelRatio || 1;
1924
1928
  return {
1925
- x: round(round(x * dpr) / dpr) || 0,
1926
- y: round(round(y * dpr) / dpr) || 0
1929
+ x: round(x * dpr) / dpr || 0,
1930
+ y: round(y * dpr) / dpr || 0
1927
1931
  };
1928
1932
  }
1929
1933
 
@@ -1938,14 +1942,23 @@ function mapToStyles(_ref2) {
1938
1942
  position = _ref2.position,
1939
1943
  gpuAcceleration = _ref2.gpuAcceleration,
1940
1944
  adaptive = _ref2.adaptive,
1941
- roundOffsets = _ref2.roundOffsets;
1942
-
1943
- var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,
1944
- _ref3$x = _ref3.x,
1945
- x = _ref3$x === void 0 ? 0 : _ref3$x,
1946
- _ref3$y = _ref3.y,
1947
- y = _ref3$y === void 0 ? 0 : _ref3$y;
1945
+ roundOffsets = _ref2.roundOffsets,
1946
+ isFixed = _ref2.isFixed;
1947
+ var _offsets$x = offsets.x,
1948
+ x = _offsets$x === void 0 ? 0 : _offsets$x,
1949
+ _offsets$y = offsets.y,
1950
+ y = _offsets$y === void 0 ? 0 : _offsets$y;
1951
+
1952
+ var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
1953
+ x: x,
1954
+ y: y
1955
+ }) : {
1956
+ x: x,
1957
+ y: y
1958
+ };
1948
1959
 
1960
+ x = _ref3.x;
1961
+ y = _ref3.y;
1949
1962
  var hasX = offsets.hasOwnProperty('x');
1950
1963
  var hasY = offsets.hasOwnProperty('y');
1951
1964
  var sideX = left;
@@ -1970,16 +1983,18 @@ function mapToStyles(_ref2) {
1970
1983
  offsetParent = offsetParent;
1971
1984
 
1972
1985
  if (placement === top || (placement === left || placement === right) && variation === end) {
1973
- sideY = bottom; // $FlowFixMe[prop-missing]
1974
-
1975
- y -= offsetParent[heightProp] - popperRect.height;
1986
+ sideY = bottom;
1987
+ var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
1988
+ offsetParent[heightProp];
1989
+ y -= offsetY - popperRect.height;
1976
1990
  y *= gpuAcceleration ? 1 : -1;
1977
1991
  }
1978
1992
 
1979
1993
  if (placement === left || (placement === top || placement === bottom) && variation === end) {
1980
- sideX = right; // $FlowFixMe[prop-missing]
1981
-
1982
- x -= offsetParent[widthProp] - popperRect.width;
1994
+ sideX = right;
1995
+ var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
1996
+ offsetParent[widthProp];
1997
+ x -= offsetX - popperRect.width;
1983
1998
  x *= gpuAcceleration ? 1 : -1;
1984
1999
  }
1985
2000
  }
@@ -1988,6 +2003,17 @@ function mapToStyles(_ref2) {
1988
2003
  position: position
1989
2004
  }, adaptive && unsetSides);
1990
2005
 
2006
+ var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
2007
+ x: x,
2008
+ y: y
2009
+ }) : {
2010
+ x: x,
2011
+ y: y
2012
+ };
2013
+
2014
+ x = _ref4.x;
2015
+ y = _ref4.y;
2016
+
1991
2017
  if (gpuAcceleration) {
1992
2018
  var _Object$assign;
1993
2019
 
@@ -1997,9 +2023,9 @@ function mapToStyles(_ref2) {
1997
2023
  return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
1998
2024
  }
1999
2025
 
2000
- function computeStyles(_ref4) {
2001
- var state = _ref4.state,
2002
- options = _ref4.options;
2026
+ function computeStyles(_ref5) {
2027
+ var state = _ref5.state,
2028
+ options = _ref5.options;
2003
2029
  var _options$gpuAccelerat = options.gpuAcceleration,
2004
2030
  gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
2005
2031
  _options$adaptive = options.adaptive,
@@ -2022,7 +2048,8 @@ function computeStyles(_ref4) {
2022
2048
  variation: getVariation(state.placement),
2023
2049
  popper: state.elements.popper,
2024
2050
  popperRect: state.rects.popper,
2025
- gpuAcceleration: gpuAcceleration
2051
+ gpuAcceleration: gpuAcceleration,
2052
+ isFixed: state.options.strategy === 'fixed'
2026
2053
  };
2027
2054
 
2028
2055
  if (state.modifiersData.popperOffsets != null) {
@@ -2280,7 +2307,7 @@ function getInnerBoundingClientRect(element) {
2280
2307
  }
2281
2308
 
2282
2309
  function getClientRectFromMixedType(element, clippingParent) {
2283
- return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
2310
+ return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement$1(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
2284
2311
  } // A "clipping parent" is an overflowable container with the characteristic of
2285
2312
  // clipping (or hiding) overflowing elements with a position different from
2286
2313
  // `initial`
@@ -2797,6 +2824,14 @@ function preventOverflow(_ref) {
2797
2824
  var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
2798
2825
  placement: state.placement
2799
2826
  })) : tetherOffset;
2827
+ var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
2828
+ mainAxis: tetherOffsetValue,
2829
+ altAxis: tetherOffsetValue
2830
+ } : Object.assign({
2831
+ mainAxis: 0,
2832
+ altAxis: 0
2833
+ }, tetherOffsetValue);
2834
+ var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
2800
2835
  var data = {
2801
2836
  x: 0,
2802
2837
  y: 0
@@ -2806,13 +2841,15 @@ function preventOverflow(_ref) {
2806
2841
  return;
2807
2842
  }
2808
2843
 
2809
- if (checkMainAxis || checkAltAxis) {
2844
+ if (checkMainAxis) {
2845
+ var _offsetModifierState$;
2846
+
2810
2847
  var mainSide = mainAxis === 'y' ? top : left;
2811
2848
  var altSide = mainAxis === 'y' ? bottom : right;
2812
2849
  var len = mainAxis === 'y' ? 'height' : 'width';
2813
2850
  var offset = popperOffsets[mainAxis];
2814
- var min$1 = popperOffsets[mainAxis] + overflow[mainSide];
2815
- var max$1 = popperOffsets[mainAxis] - overflow[altSide];
2851
+ var min$1 = offset + overflow[mainSide];
2852
+ var max$1 = offset - overflow[altSide];
2816
2853
  var additive = tether ? -popperRect[len] / 2 : 0;
2817
2854
  var minLen = variation === start ? referenceRect[len] : popperRect[len];
2818
2855
  var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
@@ -2832,36 +2869,45 @@ function preventOverflow(_ref) {
2832
2869
  // width or height)
2833
2870
 
2834
2871
  var arrowLen = within(0, referenceRect[len], arrowRect[len]);
2835
- var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;
2836
- var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;
2872
+ var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
2873
+ var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
2837
2874
  var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
2838
2875
  var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
2839
- var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;
2840
- var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;
2841
- var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;
2876
+ var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
2877
+ var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
2878
+ var tetherMax = offset + maxOffset - offsetModifierValue;
2879
+ var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
2880
+ popperOffsets[mainAxis] = preventedOffset;
2881
+ data[mainAxis] = preventedOffset - offset;
2882
+ }
2842
2883
 
2843
- if (checkMainAxis) {
2844
- var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
2845
- popperOffsets[mainAxis] = preventedOffset;
2846
- data[mainAxis] = preventedOffset - offset;
2847
- }
2884
+ if (checkAltAxis) {
2885
+ var _offsetModifierState$2;
2848
2886
 
2849
- if (checkAltAxis) {
2850
- var _mainSide = mainAxis === 'x' ? top : left;
2887
+ var _mainSide = mainAxis === 'x' ? top : left;
2851
2888
 
2852
- var _altSide = mainAxis === 'x' ? bottom : right;
2889
+ var _altSide = mainAxis === 'x' ? bottom : right;
2853
2890
 
2854
- var _offset = popperOffsets[altAxis];
2891
+ var _offset = popperOffsets[altAxis];
2855
2892
 
2856
- var _min = _offset + overflow[_mainSide];
2893
+ var _len = altAxis === 'y' ? 'height' : 'width';
2857
2894
 
2858
- var _max = _offset - overflow[_altSide];
2895
+ var _min = _offset + overflow[_mainSide];
2859
2896
 
2860
- var _preventedOffset = within(tether ? min(_min, tetherMin) : _min, _offset, tether ? max(_max, tetherMax) : _max);
2897
+ var _max = _offset - overflow[_altSide];
2861
2898
 
2862
- popperOffsets[altAxis] = _preventedOffset;
2863
- data[altAxis] = _preventedOffset - _offset;
2864
- }
2899
+ var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
2900
+
2901
+ var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
2902
+
2903
+ var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
2904
+
2905
+ var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
2906
+
2907
+ var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
2908
+
2909
+ popperOffsets[altAxis] = _preventedOffset;
2910
+ data[altAxis] = _preventedOffset - _offset;
2865
2911
  }
2866
2912
 
2867
2913
  state.modifiersData[name] = data;
@@ -2893,8 +2939,8 @@ function getNodeScroll(node) {
2893
2939
 
2894
2940
  function isElementScaled(element) {
2895
2941
  var rect = element.getBoundingClientRect();
2896
- var scaleX = rect.width / element.offsetWidth || 1;
2897
- var scaleY = rect.height / element.offsetHeight || 1;
2942
+ var scaleX = round(rect.width) / element.offsetWidth || 1;
2943
+ var scaleY = round(rect.height) / element.offsetHeight || 1;
2898
2944
  return scaleX !== 1 || scaleY !== 1;
2899
2945
  } // Returns the composite rect of an element relative to its offsetParent.
2900
2946
  // Composite means it takes into account transforms as well as layout.
@@ -2906,9 +2952,9 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
2906
2952
  }
2907
2953
 
2908
2954
  var isOffsetParentAnElement = isHTMLElement(offsetParent);
2909
- isHTMLElement(offsetParent) && isElementScaled(offsetParent);
2955
+ var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
2910
2956
  var documentElement = getDocumentElement(offsetParent);
2911
- var rect = getBoundingClientRect(elementOrVirtualElement);
2957
+ var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
2912
2958
  var scroll = {
2913
2959
  scrollLeft: 0,
2914
2960
  scrollTop: 0
@@ -2925,7 +2971,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
2925
2971
  }
2926
2972
 
2927
2973
  if (isHTMLElement(offsetParent)) {
2928
- offsets = getBoundingClientRect(offsetParent);
2974
+ offsets = getBoundingClientRect(offsetParent, true);
2929
2975
  offsets.x += offsetParent.clientLeft;
2930
2976
  offsets.y += offsetParent.clientTop;
2931
2977
  } else if (documentElement) {
@@ -5576,1019 +5622,1123 @@ var Tippy = index;
5576
5622
  var css_248z$4 = ".tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:\"\";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}";
5577
5623
  styleInject(css_248z$4);
5578
5624
 
5579
- var ItemTooltipWrapper = function (_a) {
5580
- var data = _a.data, region = _a.region, children = _a.children, client = _a.client, _b = _a.offline, offline = _b === void 0 ? false : _b, _c = _a.interactive, interactive = _c === void 0 ? true : _c, _d = _a.placement, placement = _d === void 0 ? "right" : _d, _e = _a.debug, debug = _e === void 0 ? false : _e, jobstyleOverride = _a.jobstyleOverride, _f = _a.followCursor, followCursor$1 = _f === void 0 ? false : _f, _g = _a.trigger, trigger = _g === void 0 ? "mouseenter focus" : _g, _h = _a.showArrow, showArrow = _h === void 0 ? true : _h;
5581
- var spanRef = React.useRef(null);
5582
- var _j = React.useState(null), childRef = _j[0], setChildRef = _j[1];
5583
- /**
5584
- * Mount the temporary span element.
5585
- * retrieve and store the target element's reference.
5586
- */
5587
- React.useEffect(function () {
5588
- if (spanRef.current) {
5589
- setChildRef(spanRef.current.previousElementSibling);
5590
- }
5591
- return function () { return setChildRef(null); };
5592
- }, []);
5593
- var _k = React.useState(true), isOffline = _k[0], setIsOffline = _k[1];
5594
- return (React__default["default"].createElement(React__default["default"].Fragment, null,
5595
- children,
5596
- childRef ? (React__default["default"].createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, onMount: function () { return setIsOffline(offline); }, placement: placement, animation: "fade", interactive: interactive, content: React__default["default"].createElement(ItemTooltip, { region: region, jobstyleOverride: jobstyleOverride, data: data, offline: isOffline, client: client, debug: debug }), theme: "grade" + data.grade, reference: childRef })) : (React__default["default"].createElement("span", { ref: spanRef, style: { display: "none" } }))));
5597
- };
5625
+ var TooltipWrapperSettings = /** @class */ (function () {
5626
+ function TooltipWrapperSettings(followCursor, interactive, placement, trigger, showArrow) {
5627
+ if (followCursor === void 0) { followCursor = false; }
5628
+ if (interactive === void 0) { interactive = true; }
5629
+ if (placement === void 0) { placement = "right"; }
5630
+ if (trigger === void 0) { trigger = "mouseenter focus"; }
5631
+ if (showArrow === void 0) { showArrow = true; }
5632
+ this.followCursor = followCursor;
5633
+ this.interactive = interactive;
5634
+ this.placement = placement;
5635
+ this.trigger = trigger;
5636
+ this.showArrow = showArrow;
5637
+ }
5638
+ return TooltipWrapperSettings;
5639
+ }());
5598
5640
 
5599
- function ItemIconNameDiv(_a) {
5600
- var _this = this;
5601
- var _b;
5602
- var item = _a.item, region = _a.region, client = _a.client, _c = _a.showRandomIcon, showRandomIcon = _c === void 0 ? false : _c;
5603
- var _d = React.useState(), itemData = _d[0], setItemData = _d[1];
5604
- React.useEffect(function () {
5605
- if (client)
5606
- (function () { return __awaiter(_this, void 0, void 0, function () {
5607
- var _a;
5608
- return __generator(this, function (_b) {
5609
- switch (_b.label) {
5610
- case 0:
5611
- _a = setItemData;
5612
- return [4 /*yield*/, client.GetItem(item.itemId, item.itemLevel)];
5613
- case 1:
5614
- _a.apply(void 0, [_b.sent()]);
5615
- return [2 /*return*/];
5616
- }
5617
- });
5618
- }); })();
5619
- }, [item, client]);
5620
- if (itemData) {
5621
- if (itemData.grade != 0)
5622
- return (React__default["default"].createElement("div", { className: "ItemTooltip_itemiconnamediv" },
5623
- React__default["default"].createElement(ItemTooltipWrapper, { region: region, client: client, data: itemData },
5624
- React__default["default"].createElement("img", { className: "ItemTooltip_itemIconSmall", alt: "", src: BuildIconPath((_b = itemData.icon) === null || _b === void 0 ? void 0 : _b.iconPath) })),
5625
- React__default["default"].createElement("div", { className: "ItemTooltip_itemNameRandomDiv" },
5626
- React__default["default"].createElement("span", { className: "TooltipBase_grade-" + itemData.grade, dangerouslySetInnerHTML: { __html: itemData.name } }),
5627
- showRandomIcon ? (React__default["default"].createElement(React__default["default"].Fragment, null,
5628
- "\u00A0",
5629
- React__default["default"].createElement("div", null,
5630
- React__default["default"].createElement("img", { style: {
5631
- width: 36,
5632
- height: 18,
5633
- margin: "0 1px",
5634
- top: 4,
5635
- position: "relative",
5636
- }, alt: "", src: "https://lean.bns.tools/bns/icons/00015590/Tag_Random.png" })))) : null)));
5637
- else
5638
- return null;
5641
+ var css_248z$3 = ".tippy-box {\n max-width: none !important;\n background-color: transparent !important;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;\n transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important; }\n .tippy-box:hover {\n box-shadow: black 0px 20px 60px 0px !important; }\n\n.tippy-content {\n padding: 0 !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ff0084 !important; }\n";
5642
+ styleInject(css_248z$3);
5643
+
5644
+ var TooltipSettingsBase = /** @class */ (function () {
5645
+ function TooltipSettingsBase() {
5646
+ this.debug = false;
5647
+ this.fullHeight = false;
5639
5648
  }
5640
- else {
5641
- return (React__default["default"].createElement("div", { className: "ItemTooltip_itemIconLoading" },
5642
- React__default["default"].createElement("div", { className: "dot-elastic" })));
5649
+ return TooltipSettingsBase;
5650
+ }());
5651
+ var TooltipWithNetworkSettings = /** @class */ (function (_super) {
5652
+ __extends(TooltipWithNetworkSettings, _super);
5653
+ function TooltipWithNetworkSettings(region, client, offline) {
5654
+ if (offline === void 0) { offline = false; }
5655
+ var _this = this;
5656
+ var l_offline = offline;
5657
+ if (region == null)
5658
+ l_offline = true;
5659
+ _this = _super.call(this) || this;
5660
+ _this.region = region;
5661
+ _this.client = client;
5662
+ _this.offline = l_offline;
5663
+ return _this;
5643
5664
  }
5644
- }
5665
+ return TooltipWithNetworkSettings;
5666
+ }(TooltipSettingsBase));
5667
+
5668
+ var ItemTooltipSettings = /** @class */ (function (_super) {
5669
+ __extends(ItemTooltipSettings, _super);
5670
+ function ItemTooltipSettings(data, region, client, offline) {
5671
+ var _this = _super.call(this, region, client, offline) || this;
5672
+ _this.data = data;
5673
+ return _this;
5674
+ }
5675
+ return ItemTooltipSettings;
5676
+ }(TooltipWithNetworkSettings));
5677
+
5678
+ var SkillTooltipSettings = /** @class */ (function (_super) {
5679
+ __extends(SkillTooltipSettings, _super);
5680
+ function SkillTooltipSettings(data) {
5681
+ var _this = _super.call(this) || this;
5682
+ _this.data = data;
5683
+ return _this;
5684
+ }
5685
+ return SkillTooltipSettings;
5686
+ }(TooltipSettingsBase));
5645
5687
 
5646
- function DecomposeResults(props) {
5647
- if (props.client)
5648
- return (React__default["default"].createElement("div", null, props.items
5649
- .filter(function (x) { return x != null; })
5650
- .map(function (item, i) {
5651
- return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: item.itemId + "-" + item.itemLevel + "_" + i },
5652
- React__default["default"].createElement(ItemIconNameDiv, { region: props.region, item: item, client: props.client, showRandomIcon: item.isRandom }),
5653
- item.isRandom ? null : (React__default["default"].createElement(React__default["default"].Fragment, null,
5654
- "\u00A0",
5655
- item.isMinMax ? (React__default["default"].createElement("span", null, GetRangeString(item.min, item.max))) : (React__default["default"].createElement("span", null, GetRangeString(item.min)))))));
5656
- })));
5657
- else
5688
+ var css_248z$2 = ".SkillTooltip_skillIconContainer {\n width: 60px;\n height: 60px;\n padding: 0;\n float: left;\n position: relative; }\n\n.SkillTooltip_skillIcon {\n width: 60px;\n height: 60px; }\n\n.SkillTooltip_buttonIcon {\n position: absolute;\n right: 1px;\n bottom: 1px;\n height: 18px;\n opacity: 0.9; }\n\n.SkillTooltip_buttonIconMouse {\n background-color: rgba(0, 0, 0, 0.8); }\n\n.SkillTooltip_mainText {\n font-weight: 500; }\n\n.SkillTooltip_smallText {\n font-size: 12px; }\n\n.SkillTooltip_subTextMargin {\n margin-bottom: 0.3rem; }\n\n.SkillTooltip_boundaryContainer {\n display: flex;\n width: 100%;\n margin-bottom: 0.5rem;\n line-height: 17px; }\n\n.SkillTooltip_boundary {\n flex: 1;\n flex-basis: 0px;\n min-width: 0;\n display: flex;\n flex-direction: column;\n color: black;\n margin: 0.15rem; }\n\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryHead {\n border-radius: 3px 0 0 0; }\n\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryHead {\n border-radius: 0 3px 0 0; }\n\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 0 3px; }\n\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 3px 0; }\n\n.SkillTooltip_boundaryHead {\n color: white;\n font-weight: 500;\n font-size: 12px;\n text-overflow: ellipsis;\n overflow: hidden;\n padding: 0.3rem;\n text-align: center;\n flex: 1;\n min-height: 26px;\n background-color: rgba(127, 127, 127, 0.4); }\n\n.SkillTooltip_boundaryBody {\n color: white;\n padding: 0.5rem 0.3rem;\n margin-top: 0.15rem;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40px;\n flex: 2;\n background-color: rgba(127, 127, 127, 0.4); }\n\n.SkillTooltip_boundaryBodyModifier {\n min-height: 33px !important; }\n\n.SkillTooltip_boundaryHasIcon {\n min-height: 50px !important; }\n\n.SkillTooltip_conditionRow {\n display: flex;\n align-items: center;\n font-size: 12px; }\n\n.SkillTooltip_conditionRow:not(:last-of-type) {\n margin-bottom: 0.1rem; }\n\n.SkillTooltip_conditionIcon {\n width: 20px;\n height: 20px;\n margin-right: 0.33rem; }\n\n.SkillTooltip_conditionIconSmall {\n width: 12px;\n height: 12px;\n margin-right: 0.22rem; }\n\n.tooltipArg {\n color: #46bee1;\n font-weight: 600; }\n\n.target-360 {\n background-image: url(\"./360.png\");\n background-repeat: no-repeat;\n background-position: 50% 60%;\n background-size: auto 64px; }\n\n.target-front-180 {\n background-image: url(\"./180.png\");\n background-repeat: no-repeat;\n background-position: 50% 70%;\n background-size: auto 64px; }\n\n.laser {\n background-image: url(\"./laser.png\");\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: auto 64px; }\n";
5689
+ styleInject(css_248z$2);
5690
+
5691
+ function getButtonIconPath(button) {
5692
+ var _a;
5693
+ if (buttonIconMapping.find(function (x) { return x.button === button; }) == null)
5658
5694
  return null;
5659
- }
5695
+ return ("/00072858" + ((_a = buttonIconMapping.find(function (x) { return x.button === button; })) === null || _a === void 0 ? void 0 : _a.path));
5696
+ }
5697
+ var buttonIconMapping = [
5698
+ {
5699
+ button: "F",
5700
+ path: "/Key_Alphabet_F",
5701
+ },
5702
+ {
5703
+ button: "Q",
5704
+ path: "/Key_Alphabet_Q",
5705
+ },
5706
+ {
5707
+ button: "E",
5708
+ path: "/Key_Alphabet_E",
5709
+ },
5710
+ {
5711
+ button: "S",
5712
+ path: "/Key_Alphabet_S",
5713
+ },
5714
+ {
5715
+ button: "Z",
5716
+ path: "/Key_Alphabet_Z",
5717
+ },
5718
+ {
5719
+ button: "X",
5720
+ path: "/Key_Alphabet_X",
5721
+ },
5722
+ {
5723
+ button: "C",
5724
+ path: "/Key_Alphabet_C",
5725
+ },
5726
+ {
5727
+ button: "V",
5728
+ path: "/Key_Alphabet_V",
5729
+ },
5730
+ {
5731
+ button: "W",
5732
+ path: "/Key_Alphabet_W",
5733
+ },
5734
+ {
5735
+ button: "G",
5736
+ path: "/Key_Alphabet_G",
5737
+ },
5738
+ {
5739
+ button: "B",
5740
+ path: "/Key_Alphabet_B",
5741
+ },
5742
+ {
5743
+ button: "SPACE",
5744
+ path: "/Key_Space_Big",
5745
+ },
5746
+ {
5747
+ button: "TAB",
5748
+ path: "/Key_Tab_Big",
5749
+ },
5750
+ {
5751
+ button: "1",
5752
+ path: "/Key_Num_1",
5753
+ },
5754
+ {
5755
+ button: "2",
5756
+ path: "/Key_Num_2",
5757
+ },
5758
+ {
5759
+ button: "3",
5760
+ path: "/Key_Num_3",
5761
+ },
5762
+ {
5763
+ button: "4",
5764
+ path: "/Key_Num_4",
5765
+ },
5766
+ {
5767
+ button: "LMB",
5768
+ path: "/GameUI_Tag_MouseL",
5769
+ },
5770
+ {
5771
+ button: "RMB",
5772
+ path: "/GameUI_Tag_MouseR",
5773
+ },
5774
+ ];
5660
5775
 
5661
- function SetBonusToggle(_a) {
5662
- var jobstyles = _a.jobstyles, jobstyle = _a.jobstyle, setJobstyle = _a.setJobstyle;
5663
- return (React__default["default"].createElement("div", { className: "ItemTooltip_jobstyleToggleContainer" }, jobstyles.map(function (style) { return (React__default["default"].createElement("button", { key: style, className: "ItemTooltip_jobstyleButton" +
5664
- (style === jobstyle ? " ItemTooltip_jobstyleButton-active" : ""), onClick: function (e) {
5665
- e.stopPropagation();
5666
- setJobstyle(style);
5667
- } }, GetJobStyleNameString(style))); })));
5776
+ function SkillIconWithButton(_a) {
5777
+ var skill = _a.skill;
5778
+ return (React__default["default"].createElement("div", { className: "SkillTooltip_skillIconContainer" },
5779
+ React__default["default"].createElement("img", { className: "SkillTooltip_skillIcon", src: BuildIconPath(skill.IconPath, skill.IconIndex - 1), alt: "" }),
5780
+ getButtonIconPath(getNormalizedButton(skill)) ? (React__default["default"].createElement("img", { className: "SkillTooltip_buttonIcon" +
5781
+ " " +
5782
+ (getNormalizedButton(skill) === "RMB" ||
5783
+ getNormalizedButton(skill) === "LMB"
5784
+ ? "SkillTooltip_buttonIconMouse"
5785
+ : ""), src: BuildIconPath(getButtonIconPath(getNormalizedButton(skill))), alt: "" })) : null));
5668
5786
  }
5669
5787
 
5670
- function ItemDescriptionText(_a) {
5671
- var htmlString = _a.htmlString;
5672
- var textSplit = htmlString.replace("<br/>", "<br />").split("<br />");
5673
- return (React__default["default"].createElement("div", { className: "ItemTooltip_descriptions TooltipBase_flex-col" }, textSplit.map(function (htmlText, i) { return (React__default["default"].createElement("span", { key: i, dangerouslySetInnerHTML: {
5674
- __html: ReplaceIconsInHtmlString(htmlText),
5675
- } })); })));
5788
+ function SkillTooltipBoundary(_a) {
5789
+ var head = _a.head, body = _a.body, _b = _a.bodyClass, bodyClass = _b === void 0 ? "" : _b, _c = _a.pvpModifier, pvpModifier = _c === void 0 ? false : _c, _d = _a.hasIcon, hasIcon = _d === void 0 ? false : _d;
5790
+ return (React__default["default"].createElement("div", { className: "SkillTooltip_boundary" },
5791
+ React__default["default"].createElement("div", { className: "SkillTooltip_boundaryHead" }, head),
5792
+ React__default["default"].createElement("div", { className: "SkillTooltip_boundaryBody " +
5793
+ (pvpModifier ? "SkillTooltip_boundaryBodyModifier " : "") +
5794
+ bodyClass +
5795
+ (hasIcon ? " SkillTooltip_boundaryHasIcon " : "") }, body)));
5676
5796
  }
5677
5797
 
5678
- function RawText(_a) {
5679
- var htmlString = _a.htmlString;
5680
- return (React__default["default"].createElement("div", { className: "ItemTooltip_raw", dangerouslySetInnerHTML: { __html: htmlString } }));
5798
+ function SkillTooltipBoundaryContainer(_a) {
5799
+ var children = _a.children;
5800
+ return React__default["default"].createElement("div", { className: "SkillTooltip_boundaryContainer" }, children);
5681
5801
  }
5682
5802
 
5683
- function TextWithNumber(_a) {
5684
- var text = _a.text, number = _a.number;
5685
- return (React__default["default"].createElement("div", null,
5686
- text,
5687
- number));
5688
- }
5689
-
5690
- function StringEnumerationWithText(_a) {
5691
- var enumeration = _a.enumeration, textBefore = _a.textBefore, textAfter = _a.textAfter;
5692
- return (React__default["default"].createElement("div", null,
5693
- textBefore,
5694
- enumeration.map(function (item, i) { return (React__default["default"].createElement("span", { key: i },
5695
- item,
5696
- i != enumeration.length - 1 ? ", " : null)); }),
5697
- textAfter));
5803
+ function PvpModifiers(_a) {
5804
+ var skill = _a.skill;
5805
+ return (React__default["default"].createElement(SkillTooltipBoundaryContainer, null,
5806
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", null, "Equalized PvP"), body: React__default["default"].createElement("span", null,
5807
+ "x\u00A0",
5808
+ React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: skill.EqualizedPvp } })), pvpModifier: true }),
5809
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", null, "PvP"), body: React__default["default"].createElement("span", null,
5810
+ "x\u00A0",
5811
+ React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: skill.Pvp } })), pvpModifier: true })));
5698
5812
  }
5699
5813
 
5700
- function SealingResult(_a) {
5701
- var item = _a.item, client = _a.client, region = _a.region;
5702
- return (React__default["default"].createElement("div", null, item.sealing.sealConsumeItems
5703
- .filter(function (x) { return x.min != 0; })
5704
- .map(function (consumeItem, i) { return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
5705
- React__default["default"].createElement(ItemIconNameDiv, { region: region, item: consumeItem, client: client }),
5706
- "\u00A0",
5707
- GetRangeString(consumeItem.min))); })));
5814
+ function SkillBoundaries(_a) {
5815
+ var skill = _a.skill;
5816
+ var _b = React__default["default"].useState(false), hasIcon = _b[0], setHasIcon = _b[1];
5817
+ React__default["default"].useEffect(function () {
5818
+ setHasIcon(skill.Boundaries.Range.Shape != null && skill.Boundaries.Range.Shape != "");
5819
+ }, [skill]);
5820
+ return (React__default["default"].createElement(SkillTooltipBoundaryContainer, null,
5821
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5822
+ __html: skill.Boundaries.Distance.Name,
5823
+ } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5824
+ __html: skill.Boundaries.Distance.Value,
5825
+ } }), hasIcon: hasIcon }),
5826
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5827
+ __html: skill.Boundaries.Range.Name,
5828
+ } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5829
+ __html: skill.Boundaries.Range.Value,
5830
+ } }), hasIcon: hasIcon, bodyClass: skill.Boundaries.Range.Shape }),
5831
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5832
+ __html: skill.Boundaries.Cast.Name,
5833
+ } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5834
+ __html: skill.Boundaries.Cast.Value,
5835
+ } }), hasIcon: hasIcon }),
5836
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5837
+ __html: skill.Boundaries.Recycle.Name,
5838
+ } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5839
+ __html: skill.Boundaries.Recycle.Value,
5840
+ } }), hasIcon: hasIcon })));
5708
5841
  }
5709
5842
 
5710
- function AccountTransfer(_a) {
5711
- var item = _a.item, client = _a.client, region = _a.region;
5712
- return (React__default["default"].createElement("div", null,
5713
- item.accountTransfer.requiredItems.map(function (consumeItem, i) { return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
5714
- React__default["default"].createElement(ItemIconNameDiv, { region: region, client: client, item: consumeItem }),
5715
- "\u00A0",
5716
- GetRangeString(consumeItem.min))); }),
5717
- item.accountTransfer.moneyCost != null &&
5718
- item.accountTransfer.moneyCost > 0 ? (React__default["default"].createElement("span", null,
5719
- item.accountTransfer.moneyCost,
5720
- "\u00A0copper")) : null));
5843
+ function SkillConditions(_a) {
5844
+ var tooltipItems = _a.tooltipItems;
5845
+ return (React__default["default"].createElement(React__default["default"].Fragment, null, tooltipItems.map(function (sub, i) { return (React__default["default"].createElement("div", { key: i, className: "SkillTooltip_conditionRow" },
5846
+ sub.IconPath != null ? (React__default["default"].createElement("img", { src: sub.IconIndex != null && sub.IconIndex > 0
5847
+ ? BuildIconPath(sub.IconPath, sub.IconIndex - 1)
5848
+ : BuildIconPath(sub.IconPath), alt: "", className: "SkillTooltip_conditionIcon" })) : null,
5849
+ React__default["default"].createElement("div", { key: i, dangerouslySetInnerHTML: { __html: sub.Text } }))); })));
5721
5850
  }
5722
5851
 
5723
- function ItemTooltip(_a) {
5724
- var _this = this;
5725
- var _b, _c, _d;
5726
- var data = _a.data, region = _a.region, _e = _a.debug, debug = _e === void 0 ? false : _e, _f = _a.offline, offline = _f === void 0 ? false : _f, clientProp = _a.client, jobstyleOverride = _a.jobstyleOverride, _g = _a.fullHeight, fullHeight = _g === void 0 ? false : _g;
5727
- var _h = React.useState("advanced-1"), jobstyle = _h[0], setJobstyle = _h[1];
5728
- var _j = React.useState(), client = _j[0], setClient = _j[1];
5729
- React.useEffect(function () {
5730
- if (offline)
5731
- return;
5732
- if (clientProp == undefined) {
5733
- (function () { return __awaiter(_this, void 0, void 0, function () {
5734
- return __generator(this, function (_a) {
5735
- setClient(new ItemDownloadClient(region));
5736
- return [2 /*return*/];
5737
- });
5738
- }); })();
5739
- }
5740
- else {
5741
- setClient(clientProp);
5742
- }
5743
- }, [offline]);
5744
- React.useEffect(function () {
5745
- if (jobstyleOverride != undefined) {
5746
- setJobstyle(jobstyleOverride);
5747
- }
5748
- }, [jobstyleOverride]);
5749
- var item = data;
5750
- var itemCategory = (_c = (_b = item.categories) === null || _b === void 0 ? void 0 : _b.sort(function (a, b) { return b.index - a.index; })[0].localizedName) !== null && _c !== void 0 ? _c : "";
5751
- if (itemCategory == "none")
5752
- itemCategory = "";
5852
+ function SkillTooltip(_a) {
5853
+ var settings = _a.settings;
5854
+ var debug = settings.debug;
5855
+ var skill = settings.data;
5753
5856
  var tooltipBaseProps = {
5754
- title: item.name,
5755
- grade: item.grade,
5756
- id: item.id + "-" + item.level,
5757
- icon: item.icon ? BuildIconPath(item.icon.iconPath) : "",
5758
- subtitle: itemCategory,
5857
+ title: skill.Name,
5858
+ id: skill.ID + "-" + skill.Variation,
5859
+ grade: 4,
5860
+ icon: skill.IconPath ? React__default["default"].createElement(SkillIconWithButton, { skill: skill }) : "",
5861
+ subtitle: skill.AdditionalInfo
5862
+ ? "<div style=\"font-size: 12px;\">".concat(skill.AdditionalInfo, "</div>")
5863
+ : "",
5759
5864
  mainInfos: [],
5760
5865
  subInfoGroups: [],
5761
- fullHeight: fullHeight,
5762
5866
  };
5763
- var setHasSkillModifiers = false;
5764
- var jobstyles = [];
5765
- var itemCombats = false;
5766
- if (item.skills != null && item.skills.length > 0) {
5767
- item.skills.forEach(function (itemSkill) {
5768
- if (itemSkill.jobstyle != null) {
5769
- setHasSkillModifiers = true;
5770
- itemCombats = true;
5771
- if (!jobstyles.includes(itemSkill.jobstyle)) {
5772
- jobstyles.push(itemSkill.jobstyle);
5773
- }
5774
- }
5775
- });
5776
- }
5777
- if (((_d = item.setBonus) === null || _d === void 0 ? void 0 : _d.setBonusStages) != null) {
5778
- item.setBonus.setBonusStages.forEach(function (stage) {
5779
- if (stage.skillModifiers != null && stage.skillModifiers.length > 0) {
5780
- setHasSkillModifiers = true;
5781
- stage.skillModifiers.forEach(function (modifier) {
5782
- if (!jobstyles.includes(modifier.jobstyle)) {
5783
- jobstyles.push(modifier.jobstyle);
5784
- }
5785
- });
5786
- }
5787
- });
5788
- }
5789
- //top part
5790
- AddMainInfo(tooltipBaseProps.mainInfos, item);
5791
- AddSubInfo(tooltipBaseProps.mainInfos, item);
5792
- AddSkillTitles(tooltipBaseProps.mainInfos, item, itemCombats, jobstyle);
5793
- AddCooldowns(tooltipBaseProps.mainInfos, item);
5794
- AddItemStats(tooltipBaseProps.mainInfos, item);
5795
- AddItemRandomStats(tooltipBaseProps.mainInfos, item);
5796
- //bottom part
5797
- AddGearScore(tooltipBaseProps.subInfoGroups, item, debug);
5798
- AddJobstyleToggles(setHasSkillModifiers, tooltipBaseProps.subInfoGroups, jobstyles, jobstyle, setJobstyle);
5799
- AddTopText(tooltipBaseProps.subInfoGroups, item);
5800
- AddSkillDescriptions(tooltipBaseProps.subInfoGroups, item, itemCombats, jobstyle);
5801
- AddSkillModifiers(tooltipBaseProps.subInfoGroups, item, false, jobstyle);
5802
- AddSetBonus(tooltipBaseProps.subInfoGroups, item, jobstyle);
5803
- if (!offline) {
5804
- AddDecomposeResults(tooltipBaseProps.subInfoGroups, item, client, region);
5805
- }
5806
- AddUnityPoints(tooltipBaseProps.subInfoGroups, item);
5807
- AddDescriptions(tooltipBaseProps.subInfoGroups, item);
5808
- AddFlavorText(tooltipBaseProps.subInfoGroups, item);
5809
- AddItemUsableGroup(tooltipBaseProps.subInfoGroups, item);
5810
- AddRequiredLevel(tooltipBaseProps.subInfoGroups, item);
5811
- AddRequiredJobs(tooltipBaseProps.subInfoGroups, item);
5812
- AddBoundToAccount(tooltipBaseProps.subInfoGroups, item);
5813
- AddAbleToTrade(tooltipBaseProps.subInfoGroups, item);
5814
- if (!offline) {
5815
- AddSealingResult(tooltipBaseProps.subInfoGroups, item, client, region);
5816
- AddAccountTransferResult(tooltipBaseProps.subInfoGroups, item, client, region);
5867
+ if (skill.Tooltip != null) {
5868
+ //topPart
5869
+ AddMainText1s(tooltipBaseProps.mainInfos, skill);
5870
+ AddMainText2s(tooltipBaseProps.mainInfos, skill);
5871
+ //bottomPart
5872
+ AddSubTexts(tooltipBaseProps.subInfoGroups, skill);
5873
+ AddBreakValue(tooltipBaseProps.subInfoGroups, skill);
5874
+ AddPvpModifiers(tooltipBaseProps.subInfoGroups, skill);
5875
+ AddBoundaries(tooltipBaseProps.subInfoGroups, skill);
5876
+ AddConditions(tooltipBaseProps.subInfoGroups, skill);
5877
+ AddStances(tooltipBaseProps.subInfoGroups, skill);
5878
+ if (debug) {
5879
+ AddIds(tooltipBaseProps.subInfoGroups, skill);
5880
+ }
5817
5881
  }
5818
5882
  return React__default["default"].createElement(TooltipBase, __assign({}, tooltipBaseProps));
5819
5883
  }
5820
- function AddMainInfo(mainInfos, item) {
5821
- if (item.mainInfo != null)
5822
- mainInfos.push(React__default["default"].createElement(ItemMainInfo, __assign({}, item)));
5823
- }
5824
- function AddSubInfo(mainInfos, item) {
5825
- if (item.subInfo != null)
5826
- mainInfos.push(React__default["default"].createElement(ItemSubInfo, __assign({}, item)));
5827
- }
5828
- function AddSkillTitles(mainInfos, item, itemCombats, jobstyle) {
5829
- var itemSkills = item.skills;
5830
- if (itemSkills == null || itemSkills.length == 0)
5831
- return;
5832
- mainInfos.push(React__default["default"].createElement(ItemSkillTitles, { item: item, itemCombats: itemCombats, jobstyle: jobstyle }));
5833
- }
5834
- function AddCooldowns(mainInfos, item) {
5835
- if ((item.cooldownInMs == null || item.cooldownInMs == 0) &&
5836
- (item.bgCooldownInMs == null || item.bgCooldownInMs == 0))
5837
- return;
5838
- mainInfos.push(React__default["default"].createElement(ItemCooldowns, __assign({}, item)));
5839
- }
5840
- function AddItemStats(mainInfos, item) {
5841
- if (item.stats == null || item.stats.length == 0)
5842
- return;
5843
- mainInfos.push(React__default["default"].createElement(ItemStats, __assign({}, item)));
5884
+ function AddMainText1s(mainInfos, skill) {
5885
+ skill.Tooltip.Main1.forEach(function (main) {
5886
+ mainInfos.push(React__default["default"].createElement("div", { className: "SkillTooltip_mainText", dangerouslySetInnerHTML: { __html: main.Text } }));
5887
+ });
5844
5888
  }
5845
- function AddItemRandomStats(mainInfos, item) {
5846
- if (item.randomStats == null || item.randomStats.length === 0)
5847
- return;
5848
- mainInfos.push(React__default["default"].createElement(ItemRandomStats, __assign({}, item)));
5889
+ function AddMainText2s(mainInfos, skill) {
5890
+ skill.Tooltip.Main2.forEach(function (main) {
5891
+ mainInfos.push(React__default["default"].createElement("div", { className: "SkillTooltip_smallText", dangerouslySetInnerHTML: { __html: main.Text } }));
5892
+ });
5849
5893
  }
5850
- function AddGearScore(subInfoGroups, item, debugMode) {
5851
- if (!debugMode)
5852
- return;
5894
+ function AddSubTexts(subInfoGroups, skill) {
5895
+ var texts = [];
5896
+ skill.Tooltip.Sub.forEach(function (sub, i) {
5897
+ texts.push(React__default["default"].createElement("div", { className: "SkillTooltip_subText" +
5898
+ (i != skill.Tooltip.Sub.length - 1
5899
+ ? " SkillTooltip_subTextMargin"
5900
+ : "") },
5901
+ sub.IconPath != null && sub.IconPath != "" ? (React__default["default"].createElement("img", { src: sub.IconIndex != null && sub.IconIndex > 0
5902
+ ? BuildIconPath(sub.IconPath, sub.IconIndex - 1)
5903
+ : BuildIconPath(sub.IconPath), alt: "", className: "SkillTooltip_conditionIconSmall" })) : null,
5904
+ React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: sub.Text } })));
5905
+ });
5853
5906
  subInfoGroups.push({
5854
5907
  title: "",
5855
- texts: [React__default["default"].createElement(GearScore, __assign({}, item))],
5908
+ texts: texts,
5856
5909
  });
5857
5910
  }
5858
- function AddTopText(subInfoGroups, item) {
5859
- if (item.topText == null)
5911
+ function AddBreakValue(subInfoGroups, skill) {
5912
+ if (skill.BreakValue != null && skill.BreakValue !== "0") {
5913
+ subInfoGroups.push({
5914
+ title: "",
5915
+ texts: [
5916
+ React__default["default"].createElement("div", null,
5917
+ "Breaker value:\u00A0",
5918
+ React__default["default"].createElement("span", { className: "tooltipArg", dangerouslySetInnerHTML: { __html: skill.BreakValue } })),
5919
+ ],
5920
+ });
5921
+ }
5922
+ }
5923
+ function AddPvpModifiers(subInfoGroups, skill) {
5924
+ if (skill.Pvp == null || skill.EqualizedPvp == null)
5860
5925
  return;
5861
5926
  subInfoGroups.push({
5862
5927
  title: "",
5863
- texts: [React__default["default"].createElement(TopText, __assign({}, item))],
5928
+ texts: [React__default["default"].createElement(PvpModifiers, { skill: skill })],
5864
5929
  });
5865
5930
  }
5866
- function AddSkillDescriptions(subInfoGroups, item, itemCombats, jobstyle) {
5867
- if (item.skills == null || item.skills.length == 0)
5931
+ function AddBoundaries(subInfoGroups, skill) {
5932
+ if (skill.Boundaries == null)
5868
5933
  return;
5869
5934
  subInfoGroups.push({
5870
5935
  title: "",
5871
- texts: [
5872
- React__default["default"].createElement(ItemSkillDescriptions, { item: item, itemCombats: itemCombats, jobstyle: jobstyle }),
5873
- ],
5936
+ texts: [React__default["default"].createElement(SkillBoundaries, { skill: skill })],
5874
5937
  });
5875
5938
  }
5876
- function AddSkillModifiers(subInfoGroups, item, isSetBonus, jobstyle) {
5877
- if (item.skillModifierGroups == null || item.skillModifierGroups.length == 0)
5939
+ function AddConditions(subInfoGroups, skill) {
5940
+ if (skill.Tooltip.Condition.length == 0)
5878
5941
  return;
5879
5942
  subInfoGroups.push({
5880
- title: "",
5881
- texts: [
5882
- React__default["default"].createElement(SkillModifiers, { skillModifierGroups: item.skillModifierGroups, isSetBonus: isSetBonus, jobstyle: jobstyle }),
5883
- ],
5943
+ title: "Terms of Use",
5944
+ texts: [React__default["default"].createElement(SkillConditions, { tooltipItems: skill.Tooltip.Condition })],
5884
5945
  });
5885
5946
  }
5886
- function AddSetBonus(subInfoGroups, item, jobstyle) {
5887
- if (item.setBonus == null)
5947
+ function AddStances(subInfoGroups, skill) {
5948
+ if (skill.Tooltip.Stance.length == 0)
5888
5949
  return;
5889
5950
  subInfoGroups.push({
5890
- title: "Set Effect:",
5891
- texts: [React__default["default"].createElement(SetBonus, { item: item, jobstyle: jobstyle })],
5951
+ title: "Switch Position",
5952
+ texts: [React__default["default"].createElement(SkillConditions, { tooltipItems: skill.Tooltip.Stance })],
5892
5953
  });
5893
5954
  }
5894
- function AddDecomposeResults(subInfoGroups, item, client, region) {
5895
- if (item.decomposeRewards == null || item.decomposeRewards.length == 0)
5896
- return;
5897
- var fixedItems = []
5898
- .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.fixedItems; })).filter(function (x) { return x != null; });
5899
- var randomItems = []
5900
- .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.randomItems; })).filter(function (x) { return x != null; });
5901
- var selectItems = []
5902
- .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.selectItems; })).filter(function (x) { return x != null; });
5903
- if (fixedItems.length > 0)
5904
- subInfoGroups.push({
5905
- title: "Guaranteed/Salvage:",
5906
- texts: [
5907
- React__default["default"].createElement(DecomposeResults, { region: region, items: fixedItems, client: client }),
5908
- ],
5909
- });
5910
- if (randomItems.length > 0)
5911
- subInfoGroups.push({
5912
- title: "Random:",
5913
- texts: [
5914
- React__default["default"].createElement(DecomposeResults, { region: region, items: randomItems, client: client }),
5915
- ],
5916
- });
5917
- if (selectItems.length > 0)
5918
- subInfoGroups.push({
5919
- title: "Select:",
5920
- texts: [
5921
- React__default["default"].createElement(DecomposeResults, { region: region, items: selectItems, client: client }),
5922
- ],
5923
- });
5924
- }
5925
- function AddJobstyleToggles(setHasSkillModifiers, subInfoGroups, jobstyles, jobstyle, setJobstyle) {
5926
- if (!setHasSkillModifiers)
5927
- return;
5955
+ function AddIds(subInfoGroups, skill) {
5928
5956
  subInfoGroups.push({
5929
- title: "",
5930
- texts: [
5931
- React__default["default"].createElement(SetBonusToggle, { jobstyles: jobstyles, jobstyle: jobstyle, setJobstyle: setJobstyle }),
5932
- ],
5933
- });
5934
- }
5935
- function AddDescriptions(subInfoGroups, item) {
5936
- if (item.descriptions == null || item.descriptions.length == 0)
5937
- return;
5938
- item.descriptions
5939
- .filter(function (x) { return x.text != null && x.text != ""; })
5940
- .forEach(function (description) {
5941
- subInfoGroups.push({
5942
- title: description.title,
5943
- texts: [React__default["default"].createElement(ItemDescriptionText, { htmlString: description.text })],
5944
- });
5957
+ title: "Debug info",
5958
+ texts: [React__default["default"].createElement("div", null,
5959
+ "ID: ",
5960
+ skill.ID), React__default["default"].createElement("div", null,
5961
+ "Variation: ",
5962
+ skill.Variation)],
5945
5963
  });
5964
+ }
5965
+
5966
+ var NpcTooltipSettings = /** @class */ (function (_super) {
5967
+ __extends(NpcTooltipSettings, _super);
5968
+ function NpcTooltipSettings(npc, region, grade, client, offline) {
5969
+ if (grade === void 0) { grade = 4; }
5970
+ var _this = _super.call(this, region, client, offline) || this;
5971
+ _this.npc = npc;
5972
+ _this.grade = grade;
5973
+ return _this;
5974
+ }
5975
+ return NpcTooltipSettings;
5976
+ }(TooltipWithNetworkSettings));
5977
+
5978
+ var css_248z$1 = ".NpcTooltip_toggleBarContainer {\n display: flex; }\n\n.NpcTooltip_toggleButton {\n border: none;\n padding: 0.33rem;\n margin: 0 0.1rem;\n border-radius: 0;\n background-color: rgba(233, 233, 233, 0.1);\n color: #fff;\n opacity: 0.8;\n cursor: pointer;\n transition: background-color 0.1s; }\n .NpcTooltip_toggleButton:hover {\n background-color: rgba(255, 255, 255, 0.2);\n opacity: 1; }\n .NpcTooltip_toggleButton-active {\n background-color: rgba(255, 255, 255, 0.3) !important;\n color: #fff;\n opacity: 1; }\n .NpcTooltip_toggleButton img {\n width: 32px;\n height: 32px; }\n\n.NpcTooltip_storeEntry {\n display: flex;\n align-items: stretch;\n background-color: rgba(233, 233, 233, 0.1);\n padding: 0.33rem;\n font-size: 14px; }\n .NpcTooltip_storeEntry:not(:last-child) {\n margin-bottom: 0.2rem; }\n\n.NpcTooltip_storeEntryItemNameLimit {\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center; }\n\n.NpcTooltip_storeEntryItemLimit {\n font-size: 12px; }\n\n.NpcTooltip_storeEntryItemName {\n flex: 1;\n display: flex;\n align-items: center; }\n\n.NpcTooltip_storeEntryItemIconName {\n display: flex;\n align-items: center; }\n .NpcTooltip_storeEntryItemIconName img {\n width: 48px;\n height: 48px;\n margin-right: 0.33rem; }\n\n.NpcTooltip_itemBuyPriceEntriesContainer {\n display: flex;\n flex-direction: column;\n flex: 1;\n align-items: flex-end;\n justify-content: center;\n padding-left: 2rem; }\n\n.NpcTooltip_itemBuyPriceEntries {\n display: flex; }\n .NpcTooltip_itemBuyPriceEntries-moneyMargin {\n margin-bottom: 0.2rem; }\n\n.NpcTooltip_itemBuyPriceEntry:not(:first-child) {\n margin-left: 0.33rem; }\n\n.NpcTooltip_itemBuyPriceEntryContainer {\n position: relative;\n height: 32px; }\n .NpcTooltip_itemBuyPriceEntryContainer img {\n width: 32px;\n height: 32px; }\n .NpcTooltip_itemBuyPriceEntryContainer-shadow {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n box-shadow: inset 0 0 2px 0px #000000; }\n\n.NpcTooltip_itemBuyPriceEntryCount {\n position: absolute;\n bottom: 0;\n left: 0;\n color: #ffffff;\n background-color: rgba(0, 0, 0, 0.4);\n width: 32px;\n line-height: 12px;\n text-align: center; }\n\n.NpcTooltip_moneyContainer {\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n .NpcTooltip_moneyContainer > span {\n display: flex;\n align-items: center; }\n .NpcTooltip_moneyContainer > span:not(:first-child) {\n margin-left: 0.1rem; }\n .NpcTooltip_moneyContainer > span > img {\n width: 16px;\n height: 16px; }\n";
5979
+ styleInject(css_248z$1);
5980
+
5981
+ function StoreToggle(_a) {
5982
+ var store = _a.store, isActive = _a.isActive, setActive = _a.setActive;
5983
+ return (React__default["default"].createElement("button", { className: "NpcTooltip_toggleButton " +
5984
+ (isActive ? "NpcTooltip_toggleButton-active" : ""), onClick: setActive }, store.Icon != null && store.Icon != "" ? (React__default["default"].createElement("img", { src: store.Icon, alt: store.Name })) : (React__default["default"].createElement("span", null, store.Name))));
5985
+ }
5986
+
5987
+ function StoreToggleBar(_a) {
5988
+ var stores = _a.stores, activeTab = _a.activeTab, setActiveTab = _a.setActiveTab;
5989
+ return (React__default["default"].createElement("div", { className: "NpcTooltip_toggleBarContainer" }, stores.map(function (store, i) { return (React__default["default"].createElement(StoreToggle, { key: i, store: store, isActive: activeTab === i, setActive: function () { return setActiveTab(i); } })); })));
5990
+ }
5991
+
5992
+ var BuyLimitReset;
5993
+ (function (BuyLimitReset) {
5994
+ BuyLimitReset[BuyLimitReset["Day"] = 0] = "Day";
5995
+ BuyLimitReset[BuyLimitReset["Week"] = 1] = "Week";
5996
+ BuyLimitReset[BuyLimitReset["Month"] = 2] = "Month";
5997
+ BuyLimitReset[BuyLimitReset["Absolute"] = 3] = "Absolute";
5998
+ })(BuyLimitReset || (BuyLimitReset = {}));
5999
+ var BuyLimitType;
6000
+ (function (BuyLimitType) {
6001
+ BuyLimitType[BuyLimitType["Character"] = 0] = "Character";
6002
+ BuyLimitType[BuyLimitType["Account"] = 1] = "Account";
6003
+ })(BuyLimitType || (BuyLimitType = {}));
6004
+
6005
+ function ItemBuyLimit(_a) {
6006
+ var limit = _a.limit;
6007
+ if (limit == null)
6008
+ return null;
6009
+ return (React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemLimit" }, GetStringForBuyLimitType(limit.LimitType) +
6010
+ "Limit: " +
6011
+ limit.Amount +
6012
+ "/" +
6013
+ GetStringForBuyLimitReset(limit.LimitReset)));
5946
6014
  }
5947
- function AddFlavorText(subInfoGroups, item) {
5948
- if (item.flavorText == null || item.flavorText == "")
5949
- return;
5950
- subInfoGroups.push({
5951
- title: "",
5952
- texts: [React__default["default"].createElement(ItemDescriptionText, { htmlString: item.flavorText })],
5953
- });
6015
+ function GetStringForBuyLimitType(type) {
6016
+ switch (type) {
6017
+ case BuyLimitType.Account:
6018
+ return "Account ";
6019
+ case BuyLimitType.Character:
6020
+ return "Character ";
6021
+ default:
6022
+ return "";
6023
+ }
5954
6024
  }
5955
- function AddItemUsableGroup(subInfoGroups, item) {
5956
- if (IsNullOrEmpty(item.usableGroup))
5957
- return;
5958
- subInfoGroups.push({
5959
- title: "",
5960
- texts: [React__default["default"].createElement(RawText, { htmlString: item.usableGroup })],
5961
- });
6025
+ function GetStringForBuyLimitReset(reset) {
6026
+ switch (reset) {
6027
+ case BuyLimitReset.Day:
6028
+ return "Day";
6029
+ case BuyLimitReset.Week:
6030
+ return "Week ";
6031
+ case BuyLimitReset.Month:
6032
+ return "Month";
6033
+ default:
6034
+ return "";
6035
+ }
6036
+ }
6037
+
6038
+ function Money(_a) {
6039
+ var money = _a.money;
6040
+ var bnsmoney = getMoneyObj(money);
6041
+ if (bnsmoney == null)
6042
+ return null;
6043
+ return (React__default["default"].createElement("div", { className: "NpcTooltip_moneyContainer" },
6044
+ bnsmoney.Gold > 0 ? (React__default["default"].createElement("span", null,
6045
+ bnsmoney.Gold,
6046
+ React__default["default"].createElement("img", { src: BuildIconPath("gold"), alt: "" }))) : null,
6047
+ bnsmoney.Silver > 0 ? (React__default["default"].createElement("span", null,
6048
+ bnsmoney.Silver,
6049
+ React__default["default"].createElement("img", { src: BuildIconPath("silver"), alt: "" }))) : null,
6050
+ bnsmoney.Copper > 0 ? (React__default["default"].createElement("span", null,
6051
+ bnsmoney.Copper,
6052
+ React__default["default"].createElement("img", { src: BuildIconPath("copper"), alt: "" }))) : null));
6053
+ }
6054
+
6055
+ function StoreItemBuyPriceEntry(_a) {
6056
+ var _this = this;
6057
+ var itemRef = _a.itemRef, client = _a.client;
6058
+ var _b = React.useState(), item = _b[0], setItem = _b[1];
6059
+ React.useEffect(function () {
6060
+ if (client == null)
6061
+ return;
6062
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6063
+ var _a;
6064
+ return __generator(this, function (_b) {
6065
+ switch (_b.label) {
6066
+ case 0:
6067
+ _a = setItem;
6068
+ return [4 /*yield*/, client.GetItem(itemRef.itemId, itemRef.itemLevel)];
6069
+ case 1:
6070
+ _a.apply(void 0, [_b.sent()]);
6071
+ return [2 /*return*/];
6072
+ }
6073
+ });
6074
+ }); })();
6075
+ }, [itemRef, client]);
6076
+ var tooltipItemSettings = new ItemTooltipSettings(item, client.region, client);
6077
+ var wrapperSettings = new TooltipWrapperSettings(undefined, undefined, undefined, "click", undefined);
6078
+ return (React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntry" }, item ? (React__default["default"].createElement(TooltipWrapper, { targetSettings: wrapperSettings, contentSettings: tooltipItemSettings },
6079
+ React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer" },
6080
+ React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer-shadow" }),
6081
+ React__default["default"].createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" }),
6082
+ React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryCount" },
6083
+ React__default["default"].createElement("span", null, itemRef.min))))) : null));
6084
+ }
6085
+
6086
+ function NpcStoreEntry(_a) {
6087
+ var _this = this;
6088
+ var _b, _c;
6089
+ var data = _a.data, client = _a.client;
6090
+ var _d = React.useState(), item = _d[0], setItem = _d[1];
6091
+ React.useEffect(function () {
6092
+ if (client == null)
6093
+ return;
6094
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6095
+ var res;
6096
+ return __generator(this, function (_a) {
6097
+ switch (_a.label) {
6098
+ case 0: return [4 /*yield*/, client.GetItem(data.Item.itemId, data.Item.itemLevel)];
6099
+ case 1:
6100
+ res = _a.sent();
6101
+ setItem(res);
6102
+ return [2 /*return*/];
6103
+ }
6104
+ });
6105
+ }); })();
6106
+ }, [data, client]);
6107
+ if (item != undefined) {
6108
+ var tooltipItemSettings = new ItemTooltipSettings(item, client.region, client);
6109
+ var wrapperSettings = new TooltipWrapperSettings(undefined, undefined, undefined, "click", undefined);
6110
+ return (React__default["default"].createElement("div", { className: "NpcTooltip_storeEntry" },
6111
+ React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemIconName" },
6112
+ React__default["default"].createElement(TooltipWrapper, { targetSettings: wrapperSettings, contentSettings: tooltipItemSettings },
6113
+ React__default["default"].createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" })),
6114
+ React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemNameLimit" },
6115
+ React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemName TooltipBase_grade-" + item.grade, dangerouslySetInnerHTML: { __html: item.name } }),
6116
+ React__default["default"].createElement(ItemBuyLimit, { limit: data.Limit }))),
6117
+ React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntriesContainer" },
6118
+ ((_b = data.BuyPrice.Items) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntries " +
6119
+ (data.BuyPrice.Money > 0
6120
+ ? "NpcTooltip_itemBuyPriceEntries-moneyMargin"
6121
+ : "") }, (_c = data.BuyPrice.Items) === null || _c === void 0 ? void 0 : _c.map(function (itemCountRef, i) { return (React__default["default"].createElement(StoreItemBuyPriceEntry, { itemRef: itemCountRef, client: client, key: i })); }))) : null,
6122
+ React__default["default"].createElement(Money, { money: data.BuyPrice.Money }))));
6123
+ }
6124
+ else {
6125
+ return null;
6126
+ }
6127
+ }
6128
+
6129
+ function NpcStores(_a) {
6130
+ var stores = _a.stores, activeTab = _a.activeTab, client = _a.client;
6131
+ var activeStore = stores[activeTab];
6132
+ return (React__default["default"].createElement("div", null, activeStore.Entries.map(function (entry, i) { return (React__default["default"].createElement(NpcStoreEntry, { key: i, data: entry, client: client })); })));
6133
+ }
6134
+
6135
+ function NpcTooltip(_a) {
6136
+ var _this = this;
6137
+ var _b, _c;
6138
+ var settings = _a.settings;
6139
+ var npc = settings.npc;
6140
+ var _d = React.useState(0), activeTab = _d[0], setActiveTab = _d[1];
6141
+ var _e = React.useState(), client = _e[0], setClient = _e[1];
6142
+ React.useEffect(function () {
6143
+ if (!settings.offline) {
6144
+ if (settings.client == undefined) {
6145
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6146
+ return __generator(this, function (_a) {
6147
+ setClient(new ItemDownloadClient(settings.region));
6148
+ return [2 /*return*/];
6149
+ });
6150
+ }); })();
6151
+ }
6152
+ else {
6153
+ setClient(settings.client);
6154
+ }
6155
+ }
6156
+ }, [settings.offline]);
6157
+ var tooltipBaseProps = {
6158
+ title: npc.Name,
6159
+ grade: (_b = settings.grade) !== null && _b !== void 0 ? _b : 4,
6160
+ id: npc.Alias,
6161
+ subtitle: (_c = npc.Title) !== null && _c !== void 0 ? _c : "",
6162
+ fullHeight: settings.fullHeight,
6163
+ subInfoGroups: [],
6164
+ };
6165
+ //no top part
6166
+ AddStoreToggles(tooltipBaseProps.subInfoGroups, activeTab, setActiveTab, npc.Stores);
6167
+ AddStores(tooltipBaseProps.subInfoGroups, activeTab, client, npc.Stores);
6168
+ return React__default["default"].createElement(TooltipBase, __assign({}, tooltipBaseProps));
5962
6169
  }
5963
- function AddRequiredLevel(subInfoGroups, item) {
5964
- if (item.levelRequired == null || item.levelRequired <= 1)
6170
+ function AddStoreToggles(subInfoGroups, activeTab, setActiveTab, Stores) {
6171
+ if (Stores == null || Stores.length <= 0)
5965
6172
  return;
5966
6173
  subInfoGroups.push({
5967
6174
  title: "",
5968
6175
  texts: [
5969
- React__default["default"].createElement(TextWithNumber, { text: "Requires Level ", number: item.levelRequired }),
6176
+ React__default["default"].createElement(StoreToggleBar, { stores: Stores, activeTab: activeTab, setActiveTab: setActiveTab }),
5970
6177
  ],
5971
6178
  });
5972
6179
  }
5973
- function AddRequiredJobs(subInfoGroups, item) {
5974
- if (item.classRequired == null || item.classRequired.length == 0)
6180
+ function AddStores(subInfoGroups, activeTab, client, Stores) {
6181
+ if (Stores == null || Stores.length <= 0)
5975
6182
  return;
5976
- var enJobNames = item.classRequired.map(function (x) { return x.enName; });
5977
6183
  subInfoGroups.push({
5978
6184
  title: "",
5979
6185
  texts: [
5980
- React__default["default"].createElement(StringEnumerationWithText, { enumeration: enJobNames, textAfter: " Only", textBefore: "" }),
5981
- ],
5982
- });
5983
- }
5984
- function AddBoundToAccount(subInfoGroups, item) {
5985
- if (item.boundToAccount == null || item.boundToAccount == false)
5986
- return;
5987
- subInfoGroups.push({
5988
- title: "",
5989
- texts: [React__default["default"].createElement("div", null, "Bound to Account")],
5990
- });
5991
- }
5992
- function AddAbleToTrade(subInfoGroups, item) {
5993
- if (item.unableToTrade == null || item.unableToTrade == false)
5994
- return;
5995
- subInfoGroups.push({
5996
- title: "",
5997
- texts: [React__default["default"].createElement("div", null, "Unable to Trade")],
5998
- });
5999
- }
6000
- function AddSealingResult(subInfoGroups, item, client, region) {
6001
- if (item.sealing == null ||
6002
- item.sealing.sealAcquireItemId == null ||
6003
- item.sealing.sealConsumeItems.filter(function (x) { return x.min != 0; }).length == 0)
6004
- return;
6005
- subInfoGroups.push({
6006
- title: "Can be resealed with:",
6007
- texts: [React__default["default"].createElement(SealingResult, { region: region, item: item, client: client })],
6008
- });
6009
- }
6010
- function AddAccountTransferResult(subInfoGroups, item, client, region) {
6011
- if (item.accountTransfer == null ||
6012
- item.accountTransfer.requiredItems == null ||
6013
- item.accountTransfer.requiredItems.length == 0)
6014
- return;
6015
- subInfoGroups.push({
6016
- title: "Can be transferred with:",
6017
- texts: [React__default["default"].createElement(AccountTransfer, { region: region, item: item, client: client })],
6018
- });
6019
- }
6020
- function AddUnityPoints(subInfoGroups, item) {
6021
- if (item.setPoints == null || item.refinementPoints == null)
6022
- return;
6023
- if (item.setPoints === 0)
6024
- return;
6025
- if (item.refinementPoints === 0)
6026
- return;
6027
- subInfoGroups.push({
6028
- title: "",
6029
- texts: [
6030
- React__default["default"].createElement("span", null,
6031
- "Splendor Stone Set Points: ",
6032
- item.setPoints),
6033
- React__default["default"].createElement("span", null,
6034
- "Splendor Stone Refinement Points: ",
6035
- item.refinementPoints),
6186
+ React__default["default"].createElement(NpcStores, { stores: Stores, activeTab: activeTab, client: client }),
6036
6187
  ],
6037
6188
  });
6038
6189
  }
6039
6190
 
6040
- var css_248z$3 = "";
6041
- styleInject(css_248z$3);
6042
-
6043
- function JsonTooltip(props) {
6044
- var tooltipProps = {
6045
- title: props.title,
6046
- grade: props.grade,
6047
- icon: props.icon,
6048
- mainInfos: JsonArrayToJsxArray(props.mainInfos),
6049
- subtitle: props.subtitle,
6050
- subInfoGroups: JsonSubInfoToJsxSubInfo(props.subInfoGroups),
6051
- };
6052
- return React__default["default"].createElement(TooltipBase, __assign({}, tooltipProps));
6053
- }
6054
- function JsonSubInfoToJsxSubInfo(subInfoGroups) {
6055
- if (subInfoGroups == undefined)
6056
- return undefined;
6057
- var result = [];
6058
- subInfoGroups.forEach(function (subInfoGroup) {
6059
- var jsxSubInfoGroup = {
6060
- title: subInfoGroup.title,
6061
- texts: JsonArrayToJsxArray(subInfoGroup.texts),
6062
- };
6063
- result.push(jsxSubInfoGroup);
6064
- });
6065
- return result;
6066
- }
6067
- function JsonArrayToJsxArray(stringArray) {
6068
- if (stringArray == undefined)
6069
- return undefined;
6070
- var jsxArray = [];
6071
- stringArray.forEach(function (mainInfo) {
6072
- jsxArray.push(React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: mainInfo } }));
6073
- });
6074
- return jsxArray;
6191
+ function TooltipWrapper(_a) {
6192
+ var targetSettings = _a.targetSettings, contentSettings = _a.contentSettings, children = _a.children, jobstyleOverride = _a.jobstyleOverride;
6193
+ if (targetSettings == undefined) {
6194
+ targetSettings = new TooltipWrapperSettings();
6195
+ }
6196
+ if (targetSettings == null || contentSettings == null)
6197
+ return null;
6198
+ var spanRef = React.useRef(null);
6199
+ var _b = React.useState(null), childRef = _b[0], setChildRef = _b[1];
6200
+ var _c = React.useState(true), origOffline = _c[0], setOrigOffline = _c[1];
6201
+ /**
6202
+ * Mount the temporary span element.
6203
+ * retrieve and store the target element's reference.
6204
+ */
6205
+ React.useEffect(function () {
6206
+ if (spanRef.current) {
6207
+ setChildRef(spanRef.current.previousElementSibling);
6208
+ }
6209
+ var offline = contentSettings instanceof TooltipWithNetworkSettings
6210
+ ? contentSettings.offline
6211
+ : true;
6212
+ setOrigOffline(offline);
6213
+ return function () { return setChildRef(null); };
6214
+ }, []);
6215
+ var _d = React.useState(true), isOffline = _d[0], setIsOffline = _d[1];
6216
+ var _e = React.useState(4), grade = _e[0], setGrade = _e[1];
6217
+ var _f = React.useState(null), content = _f[0], setContent = _f[1];
6218
+ React.useEffect(function () {
6219
+ var _a;
6220
+ if (contentSettings == null)
6221
+ return;
6222
+ if (contentSettings instanceof TooltipWithNetworkSettings)
6223
+ contentSettings.offline = isOffline;
6224
+ if (contentSettings instanceof ItemTooltipSettings) {
6225
+ setContent(React__default["default"].createElement(ItemTooltipComponent, { jobstyleOverride: jobstyleOverride, settings: contentSettings }));
6226
+ setGrade(contentSettings.data.grade);
6227
+ }
6228
+ if (contentSettings instanceof SkillTooltipSettings) {
6229
+ setContent(React__default["default"].createElement(SkillTooltip, { settings: contentSettings }));
6230
+ setGrade(4);
6231
+ }
6232
+ if (contentSettings instanceof NpcTooltipSettings) {
6233
+ setContent(React__default["default"].createElement(NpcTooltip, { settings: contentSettings }));
6234
+ setGrade((_a = contentSettings.grade) !== null && _a !== void 0 ? _a : 4);
6235
+ }
6236
+ }, [contentSettings, isOffline]);
6237
+ function mountOfflineState() {
6238
+ if (origOffline != isOffline)
6239
+ setIsOffline(origOffline);
6240
+ }
6241
+ return (React__default["default"].createElement(React__default["default"].Fragment, null,
6242
+ children,
6243
+ childRef && content ? (React__default["default"].createElement(Tippy, { arrow: targetSettings.showArrow, trigger: targetSettings.trigger, plugins: [followCursor], followCursor: targetSettings.followCursor && !targetSettings.interactive, appendTo: document.body, onMount: function () { return mountOfflineState(); }, placement: targetSettings.placement, animation: "fade", interactive: targetSettings.interactive, content: content, theme: "grade" + grade, reference: childRef })) : (React__default["default"].createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
6075
6244
  }
6076
6245
 
6077
- var css_248z$2 = ".SkillTooltip_skillIconContainer {\n width: 60px;\n height: 60px;\n padding: 0;\n float: left;\n position: relative; }\n\n.SkillTooltip_skillIcon {\n width: 60px;\n height: 60px; }\n\n.SkillTooltip_buttonIcon {\n position: absolute;\n right: 1px;\n bottom: 1px;\n height: 18px;\n opacity: 0.9; }\n\n.SkillTooltip_buttonIconMouse {\n background-color: rgba(0, 0, 0, 0.8); }\n\n.SkillTooltip_mainText {\n font-weight: 500; }\n\n.SkillTooltip_smallText {\n font-size: 12px; }\n\n.SkillTooltip_subTextMargin {\n margin-bottom: 0.3rem; }\n\n.SkillTooltip_boundaryContainer {\n display: flex;\n width: 100%;\n margin-bottom: 0.5rem;\n line-height: 17px; }\n\n.SkillTooltip_boundary {\n flex: 1;\n flex-basis: 0px;\n min-width: 0;\n display: flex;\n flex-direction: column;\n color: black;\n margin: 0.15rem; }\n\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryHead {\n border-radius: 3px 0 0 0; }\n\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryHead {\n border-radius: 0 3px 0 0; }\n\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 0 3px; }\n\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 3px 0; }\n\n.SkillTooltip_boundaryHead {\n color: white;\n font-weight: 500;\n font-size: 12px;\n text-overflow: ellipsis;\n overflow: hidden;\n padding: 0.3rem;\n text-align: center;\n flex: 1;\n min-height: 26px;\n background-color: rgba(127, 127, 127, 0.4); }\n\n.SkillTooltip_boundaryBody {\n color: white;\n padding: 0.5rem 0.3rem;\n margin-top: 0.15rem;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40px;\n flex: 2;\n background-color: rgba(127, 127, 127, 0.4); }\n\n.SkillTooltip_boundaryBodyModifier {\n min-height: 33px !important; }\n\n.SkillTooltip_boundaryHasIcon {\n min-height: 50px !important; }\n\n.SkillTooltip_conditionRow {\n display: flex;\n align-items: center;\n font-size: 12px; }\n\n.SkillTooltip_conditionRow:not(:last-of-type) {\n margin-bottom: 0.1rem; }\n\n.SkillTooltip_conditionIcon {\n width: 20px;\n height: 20px;\n margin-right: 0.33rem; }\n\n.SkillTooltip_conditionIconSmall {\n width: 12px;\n height: 12px;\n margin-right: 0.22rem; }\n\n.tooltipArg {\n color: #46bee1;\n font-weight: 600; }\n\n.target-360 {\n background-image: url(\"./360.png\");\n background-repeat: no-repeat;\n background-position: 50% 60%;\n background-size: auto 64px; }\n\n.target-front-180 {\n background-image: url(\"./180.png\");\n background-repeat: no-repeat;\n background-position: 50% 70%;\n background-size: auto 64px; }\n\n.laser {\n background-image: url(\"./laser.png\");\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: auto 64px; }\n";
6078
- styleInject(css_248z$2);
6246
+ function ItemIconNameDiv(_a) {
6247
+ var _this = this;
6248
+ var _b;
6249
+ var item = _a.item, region = _a.region, client = _a.client, _c = _a.showRandomIcon, showRandomIcon = _c === void 0 ? false : _c;
6250
+ var _d = React.useState(), itemData = _d[0], setItemData = _d[1];
6251
+ React.useEffect(function () {
6252
+ if (client)
6253
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6254
+ var _a;
6255
+ return __generator(this, function (_b) {
6256
+ switch (_b.label) {
6257
+ case 0:
6258
+ _a = setItemData;
6259
+ return [4 /*yield*/, client.GetItem(item.itemId, item.itemLevel)];
6260
+ case 1:
6261
+ _a.apply(void 0, [_b.sent()]);
6262
+ return [2 /*return*/];
6263
+ }
6264
+ });
6265
+ }); })();
6266
+ }, [item, client]);
6267
+ if (itemData) {
6268
+ if (itemData.grade != 0) {
6269
+ var itemSettings = new ItemTooltipSettings(itemData, region, client);
6270
+ return (React__default["default"].createElement("div", { className: "ItemTooltip_itemiconnamediv" },
6271
+ React__default["default"].createElement(TooltipWrapper, { targetSettings: new TooltipWrapperSettings(), contentSettings: itemSettings },
6272
+ React__default["default"].createElement("img", { className: "ItemTooltip_itemIconSmall", alt: "", src: BuildIconPath((_b = itemData.icon) === null || _b === void 0 ? void 0 : _b.iconPath) })),
6273
+ React__default["default"].createElement("div", { className: "ItemTooltip_itemNameRandomDiv" },
6274
+ React__default["default"].createElement("span", { className: "TooltipBase_grade-" + itemData.grade, dangerouslySetInnerHTML: { __html: itemData.name } }),
6275
+ showRandomIcon ? (React__default["default"].createElement(React__default["default"].Fragment, null,
6276
+ "\u00A0",
6277
+ React__default["default"].createElement("div", null,
6278
+ React__default["default"].createElement("img", { style: {
6279
+ width: 36,
6280
+ height: 18,
6281
+ margin: "0 1px",
6282
+ top: 4,
6283
+ position: "relative",
6284
+ }, alt: "", src: "https://lean.bns.tools/bns/icons/00015590/Tag_Random.png" })))) : null)));
6285
+ }
6286
+ else
6287
+ return null;
6288
+ }
6289
+ else {
6290
+ return (React__default["default"].createElement("div", { className: "ItemTooltip_itemIconLoading" },
6291
+ React__default["default"].createElement("div", { className: "dot-elastic" })));
6292
+ }
6293
+ }
6079
6294
 
6080
- function getButtonIconPath(button) {
6081
- var _a;
6082
- if (buttonIconMapping.find(function (x) { return x.button === button; }) == null)
6295
+ function DecomposeResults(props) {
6296
+ if (props.client)
6297
+ return (React__default["default"].createElement("div", null, props.items
6298
+ .filter(function (x) { return x != null; })
6299
+ .map(function (item, i) {
6300
+ return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: item.itemId + "-" + item.itemLevel + "_" + i },
6301
+ React__default["default"].createElement(ItemIconNameDiv, { region: props.region, item: item, client: props.client, showRandomIcon: item.isRandom }),
6302
+ item.isRandom ? null : (React__default["default"].createElement(React__default["default"].Fragment, null,
6303
+ "\u00A0",
6304
+ item.isMinMax ? (React__default["default"].createElement("span", null, GetRangeString(item.min, item.max))) : (React__default["default"].createElement("span", null, GetRangeString(item.min)))))));
6305
+ })));
6306
+ else
6083
6307
  return null;
6084
- return ("/00072858" + ((_a = buttonIconMapping.find(function (x) { return x.button === button; })) === null || _a === void 0 ? void 0 : _a.path));
6085
- }
6086
- var buttonIconMapping = [
6087
- {
6088
- button: "F",
6089
- path: "/Key_Alphabet_F",
6090
- },
6091
- {
6092
- button: "Q",
6093
- path: "/Key_Alphabet_Q",
6094
- },
6095
- {
6096
- button: "E",
6097
- path: "/Key_Alphabet_E",
6098
- },
6099
- {
6100
- button: "S",
6101
- path: "/Key_Alphabet_S",
6102
- },
6103
- {
6104
- button: "Z",
6105
- path: "/Key_Alphabet_Z",
6106
- },
6107
- {
6108
- button: "X",
6109
- path: "/Key_Alphabet_X",
6110
- },
6111
- {
6112
- button: "C",
6113
- path: "/Key_Alphabet_C",
6114
- },
6115
- {
6116
- button: "V",
6117
- path: "/Key_Alphabet_V",
6118
- },
6119
- {
6120
- button: "W",
6121
- path: "/Key_Alphabet_W",
6122
- },
6123
- {
6124
- button: "G",
6125
- path: "/Key_Alphabet_G",
6126
- },
6127
- {
6128
- button: "B",
6129
- path: "/Key_Alphabet_B",
6130
- },
6131
- {
6132
- button: "SPACE",
6133
- path: "/Key_Space_Big",
6134
- },
6135
- {
6136
- button: "TAB",
6137
- path: "/Key_Tab_Big",
6138
- },
6139
- {
6140
- button: "1",
6141
- path: "/Key_Num_1",
6142
- },
6143
- {
6144
- button: "2",
6145
- path: "/Key_Num_2",
6146
- },
6147
- {
6148
- button: "3",
6149
- path: "/Key_Num_3",
6150
- },
6151
- {
6152
- button: "4",
6153
- path: "/Key_Num_4",
6154
- },
6155
- {
6156
- button: "LMB",
6157
- path: "/GameUI_Tag_MouseL",
6158
- },
6159
- {
6160
- button: "RMB",
6161
- path: "/GameUI_Tag_MouseR",
6162
- },
6163
- ];
6308
+ }
6164
6309
 
6165
- function SkillIconWithButton(_a) {
6166
- var skill = _a.skill;
6167
- return (React__default["default"].createElement("div", { className: "SkillTooltip_skillIconContainer" },
6168
- React__default["default"].createElement("img", { className: "SkillTooltip_skillIcon", src: BuildIconPath(skill.IconPath, skill.IconIndex - 1), alt: "" }),
6169
- getButtonIconPath(getNormalizedButton(skill)) ? (React__default["default"].createElement("img", { className: "SkillTooltip_buttonIcon" +
6170
- " " +
6171
- (getNormalizedButton(skill) === "RMB" ||
6172
- getNormalizedButton(skill) === "LMB"
6173
- ? "SkillTooltip_buttonIconMouse"
6174
- : ""), src: BuildIconPath(getButtonIconPath(getNormalizedButton(skill))), alt: "" })) : null));
6310
+ function SetBonusToggle(_a) {
6311
+ var jobstyles = _a.jobstyles, jobstyle = _a.jobstyle, setJobstyle = _a.setJobstyle;
6312
+ return (React__default["default"].createElement("div", { className: "ItemTooltip_jobstyleToggleContainer" }, jobstyles.map(function (style) { return (React__default["default"].createElement("button", { key: style, className: "ItemTooltip_jobstyleButton" +
6313
+ (style === jobstyle ? " ItemTooltip_jobstyleButton-active" : ""), onClick: function (e) {
6314
+ e.stopPropagation();
6315
+ setJobstyle(style);
6316
+ } }, GetJobStyleNameString(style))); })));
6175
6317
  }
6176
6318
 
6177
- function SkillTooltipBoundary(_a) {
6178
- var head = _a.head, body = _a.body, _b = _a.bodyClass, bodyClass = _b === void 0 ? "" : _b, _c = _a.pvpModifier, pvpModifier = _c === void 0 ? false : _c, _d = _a.hasIcon, hasIcon = _d === void 0 ? false : _d;
6179
- return (React__default["default"].createElement("div", { className: "SkillTooltip_boundary" },
6180
- React__default["default"].createElement("div", { className: "SkillTooltip_boundaryHead" }, head),
6181
- React__default["default"].createElement("div", { className: "SkillTooltip_boundaryBody " +
6182
- (pvpModifier ? "SkillTooltip_boundaryBodyModifier " : "") +
6183
- bodyClass +
6184
- (hasIcon ? " SkillTooltip_boundaryHasIcon " : "") }, body)));
6319
+ function ItemDescriptionText(_a) {
6320
+ var htmlString = _a.htmlString;
6321
+ var textSplit = htmlString.replace("<br/>", "<br />").split("<br />");
6322
+ return (React__default["default"].createElement("div", { className: "ItemTooltip_descriptions TooltipBase_flex-col" }, textSplit.map(function (htmlText, i) { return (React__default["default"].createElement("span", { key: i, dangerouslySetInnerHTML: {
6323
+ __html: ReplaceIconsInHtmlString(htmlText),
6324
+ } })); })));
6185
6325
  }
6186
6326
 
6187
- function SkillTooltipBoundaryContainer(_a) {
6188
- var children = _a.children;
6189
- return React__default["default"].createElement("div", { className: "SkillTooltip_boundaryContainer" }, children);
6327
+ function RawText(_a) {
6328
+ var htmlString = _a.htmlString;
6329
+ return (React__default["default"].createElement("div", { className: "ItemTooltip_raw", dangerouslySetInnerHTML: { __html: htmlString } }));
6190
6330
  }
6191
6331
 
6192
- function PvpModifiers(_a) {
6193
- var skill = _a.skill;
6194
- return (React__default["default"].createElement(SkillTooltipBoundaryContainer, null,
6195
- React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", null, "Equalized PvP"), body: React__default["default"].createElement("span", null,
6196
- "x\u00A0",
6197
- React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: skill.EqualizedPvp } })), pvpModifier: true }),
6198
- React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", null, "PvP"), body: React__default["default"].createElement("span", null,
6199
- "x\u00A0",
6200
- React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: skill.Pvp } })), pvpModifier: true })));
6332
+ function TextWithNumber(_a) {
6333
+ var text = _a.text, number = _a.number;
6334
+ return (React__default["default"].createElement("div", null,
6335
+ text,
6336
+ number));
6201
6337
  }
6202
6338
 
6203
- function SkillBoundaries(_a) {
6204
- var skill = _a.skill;
6205
- var _b = React__default["default"].useState(false), hasIcon = _b[0], setHasIcon = _b[1];
6206
- React__default["default"].useEffect(function () {
6207
- setHasIcon(skill.Boundaries.Range.Shape != null && skill.Boundaries.Range.Shape != "");
6208
- }, [skill]);
6209
- return (React__default["default"].createElement(SkillTooltipBoundaryContainer, null,
6210
- React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6211
- __html: skill.Boundaries.Distance.Name,
6212
- } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6213
- __html: skill.Boundaries.Distance.Value,
6214
- } }), hasIcon: hasIcon }),
6215
- React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6216
- __html: skill.Boundaries.Range.Name,
6217
- } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6218
- __html: skill.Boundaries.Range.Value,
6219
- } }), hasIcon: hasIcon, bodyClass: skill.Boundaries.Range.Shape }),
6220
- React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6221
- __html: skill.Boundaries.Cast.Name,
6222
- } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6223
- __html: skill.Boundaries.Cast.Value,
6224
- } }), hasIcon: hasIcon }),
6225
- React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6226
- __html: skill.Boundaries.Recycle.Name,
6227
- } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
6228
- __html: skill.Boundaries.Recycle.Value,
6229
- } }), hasIcon: hasIcon })));
6339
+ function StringEnumerationWithText(_a) {
6340
+ var enumeration = _a.enumeration, textBefore = _a.textBefore, textAfter = _a.textAfter;
6341
+ return (React__default["default"].createElement("div", null,
6342
+ textBefore,
6343
+ enumeration.map(function (item, i) { return (React__default["default"].createElement("span", { key: i },
6344
+ item,
6345
+ i != enumeration.length - 1 ? ", " : null)); }),
6346
+ textAfter));
6230
6347
  }
6231
6348
 
6232
- function SkillConditions(_a) {
6233
- var tooltipItems = _a.tooltipItems;
6234
- return (React__default["default"].createElement(React__default["default"].Fragment, null, tooltipItems.map(function (sub, i) { return (React__default["default"].createElement("div", { key: i, className: "SkillTooltip_conditionRow" },
6235
- sub.IconPath != null ? (React__default["default"].createElement("img", { src: sub.IconIndex != null && sub.IconIndex > 0
6236
- ? BuildIconPath(sub.IconPath, sub.IconIndex - 1)
6237
- : BuildIconPath(sub.IconPath), alt: "", className: "SkillTooltip_conditionIcon" })) : null,
6238
- React__default["default"].createElement("div", { key: i, dangerouslySetInnerHTML: { __html: sub.Text } }))); })));
6349
+ function SealingResult(_a) {
6350
+ var item = _a.item, client = _a.client, region = _a.region;
6351
+ return (React__default["default"].createElement("div", null, item.sealing.sealConsumeItems
6352
+ .filter(function (x) { return x.min != 0; })
6353
+ .map(function (consumeItem, i) { return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
6354
+ React__default["default"].createElement(ItemIconNameDiv, { region: region, item: consumeItem, client: client }),
6355
+ "\u00A0",
6356
+ GetRangeString(consumeItem.min))); })));
6239
6357
  }
6240
6358
 
6241
- function SkillTooltip(_a) {
6242
- var data = _a.data, _b = _a.debug, debug = _b === void 0 ? false : _b;
6243
- var skill = data;
6359
+ function AccountTransfer(_a) {
6360
+ var item = _a.item, client = _a.client, region = _a.region;
6361
+ return (React__default["default"].createElement("div", null,
6362
+ item.accountTransfer.requiredItems.map(function (consumeItem, i) { return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
6363
+ React__default["default"].createElement(ItemIconNameDiv, { region: region, client: client, item: consumeItem }),
6364
+ "\u00A0",
6365
+ GetRangeString(consumeItem.min))); }),
6366
+ item.accountTransfer.moneyCost != null &&
6367
+ item.accountTransfer.moneyCost > 0 ? (React__default["default"].createElement("span", null,
6368
+ item.accountTransfer.moneyCost,
6369
+ "\u00A0copper")) : null));
6370
+ }
6371
+
6372
+ function ItemTooltipComponent(_a) {
6373
+ var _this = this;
6374
+ var _b, _c, _d;
6375
+ var settings = _a.settings, jobstyleOverride = _a.jobstyleOverride;
6376
+ var _e = React.useState("advanced-1"), jobstyle = _e[0], setJobstyle = _e[1];
6377
+ var _f = React.useState(), client = _f[0], setClient = _f[1];
6378
+ React.useEffect(function () {
6379
+ if (settings.offline)
6380
+ return;
6381
+ if (settings.client == undefined) {
6382
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6383
+ return __generator(this, function (_a) {
6384
+ setClient(new ItemDownloadClient(settings.region));
6385
+ return [2 /*return*/];
6386
+ });
6387
+ }); })();
6388
+ }
6389
+ else {
6390
+ setClient(settings.client);
6391
+ }
6392
+ }, [settings.offline]);
6393
+ React.useEffect(function () {
6394
+ if (jobstyleOverride != undefined) {
6395
+ setJobstyle(jobstyleOverride);
6396
+ }
6397
+ }, [jobstyleOverride]);
6398
+ var item = settings.data;
6399
+ var itemCategory = (_c = (_b = item.categories) === null || _b === void 0 ? void 0 : _b.sort(function (a, b) { return b.index - a.index; })[0].localizedName) !== null && _c !== void 0 ? _c : "";
6400
+ if (itemCategory == "none")
6401
+ itemCategory = "";
6244
6402
  var tooltipBaseProps = {
6245
- title: skill.Name,
6246
- id: skill.ID + "-" + skill.Variation,
6247
- grade: 4,
6248
- icon: skill.IconPath ? React__default["default"].createElement(SkillIconWithButton, { skill: skill }) : "",
6249
- subtitle: skill.AdditionalInfo
6250
- ? "<div style=\"font-size: 12px;\">".concat(skill.AdditionalInfo, "</div>")
6251
- : "",
6403
+ title: item.name,
6404
+ grade: item.grade,
6405
+ id: item.id + "-" + item.level,
6406
+ icon: item.icon ? BuildIconPath(item.icon.iconPath) : "",
6407
+ subtitle: itemCategory,
6252
6408
  mainInfos: [],
6253
6409
  subInfoGroups: [],
6410
+ fullHeight: settings.fullHeight,
6254
6411
  };
6255
- if (skill.Tooltip != null) {
6256
- //topPart
6257
- AddMainText1s(tooltipBaseProps.mainInfos, skill);
6258
- AddMainText2s(tooltipBaseProps.mainInfos, skill);
6259
- //bottomPart
6260
- AddSubTexts(tooltipBaseProps.subInfoGroups, skill);
6261
- AddBreakValue(tooltipBaseProps.subInfoGroups, skill);
6262
- AddPvpModifiers(tooltipBaseProps.subInfoGroups, skill);
6263
- AddBoundaries(tooltipBaseProps.subInfoGroups, skill);
6264
- AddConditions(tooltipBaseProps.subInfoGroups, skill);
6265
- AddStances(tooltipBaseProps.subInfoGroups, skill);
6266
- if (debug) {
6267
- AddIds(tooltipBaseProps.subInfoGroups, skill);
6268
- }
6412
+ var setHasSkillModifiers = false;
6413
+ var jobstyles = [];
6414
+ var itemCombats = false;
6415
+ if (item.skills != null && item.skills.length > 0) {
6416
+ item.skills.forEach(function (itemSkill) {
6417
+ if (itemSkill.jobstyle != null) {
6418
+ setHasSkillModifiers = true;
6419
+ itemCombats = true;
6420
+ if (!jobstyles.includes(itemSkill.jobstyle)) {
6421
+ jobstyles.push(itemSkill.jobstyle);
6422
+ }
6423
+ }
6424
+ });
6425
+ }
6426
+ if (((_d = item.setBonus) === null || _d === void 0 ? void 0 : _d.setBonusStages) != null) {
6427
+ item.setBonus.setBonusStages.forEach(function (stage) {
6428
+ if (stage.skillModifiers != null && stage.skillModifiers.length > 0) {
6429
+ setHasSkillModifiers = true;
6430
+ stage.skillModifiers.forEach(function (modifier) {
6431
+ if (!jobstyles.includes(modifier.jobstyle)) {
6432
+ jobstyles.push(modifier.jobstyle);
6433
+ }
6434
+ });
6435
+ }
6436
+ });
6437
+ }
6438
+ //top part
6439
+ AddMainInfo(tooltipBaseProps.mainInfos, item);
6440
+ AddSubInfo(tooltipBaseProps.mainInfos, item);
6441
+ AddSkillTitles(tooltipBaseProps.mainInfos, item, itemCombats, jobstyle);
6442
+ AddCooldowns(tooltipBaseProps.mainInfos, item);
6443
+ AddItemStats(tooltipBaseProps.mainInfos, item);
6444
+ AddItemRandomStats(tooltipBaseProps.mainInfos, item);
6445
+ //bottom part
6446
+ AddGearScore(tooltipBaseProps.subInfoGroups, item, settings.debug);
6447
+ AddJobstyleToggles(setHasSkillModifiers, tooltipBaseProps.subInfoGroups, jobstyles, jobstyle, setJobstyle);
6448
+ AddTopText(tooltipBaseProps.subInfoGroups, item);
6449
+ AddSkillDescriptions(tooltipBaseProps.subInfoGroups, item, itemCombats, jobstyle);
6450
+ AddSkillModifiers(tooltipBaseProps.subInfoGroups, item, false, jobstyle);
6451
+ AddSetBonus(tooltipBaseProps.subInfoGroups, item, jobstyle);
6452
+ if (!settings.offline) {
6453
+ AddDecomposeResults(tooltipBaseProps.subInfoGroups, item, client, settings.region);
6454
+ }
6455
+ AddUnityPoints(tooltipBaseProps.subInfoGroups, item);
6456
+ AddDescriptions(tooltipBaseProps.subInfoGroups, item);
6457
+ AddFlavorText(tooltipBaseProps.subInfoGroups, item);
6458
+ AddItemUsableGroup(tooltipBaseProps.subInfoGroups, item);
6459
+ AddRequiredLevel(tooltipBaseProps.subInfoGroups, item);
6460
+ AddRequiredJobs(tooltipBaseProps.subInfoGroups, item);
6461
+ AddBoundToAccount(tooltipBaseProps.subInfoGroups, item);
6462
+ AddAbleToTrade(tooltipBaseProps.subInfoGroups, item);
6463
+ if (!settings.offline) {
6464
+ AddSealingResult(tooltipBaseProps.subInfoGroups, item, client, settings.region);
6465
+ AddAccountTransferResult(tooltipBaseProps.subInfoGroups, item, client, settings.region);
6269
6466
  }
6270
6467
  return React__default["default"].createElement(TooltipBase, __assign({}, tooltipBaseProps));
6271
6468
  }
6272
- function AddMainText1s(mainInfos, skill) {
6273
- skill.Tooltip.Main1.forEach(function (main) {
6274
- mainInfos.push(React__default["default"].createElement("div", { className: "SkillTooltip_mainText", dangerouslySetInnerHTML: { __html: main.Text } }));
6275
- });
6469
+ function AddMainInfo(mainInfos, item) {
6470
+ if (item.mainInfo != null)
6471
+ mainInfos.push(React__default["default"].createElement(ItemMainInfo, __assign({}, item)));
6276
6472
  }
6277
- function AddMainText2s(mainInfos, skill) {
6278
- skill.Tooltip.Main2.forEach(function (main) {
6279
- mainInfos.push(React__default["default"].createElement("div", { className: "SkillTooltip_smallText", dangerouslySetInnerHTML: { __html: main.Text } }));
6280
- });
6473
+ function AddSubInfo(mainInfos, item) {
6474
+ if (item.subInfo != null)
6475
+ mainInfos.push(React__default["default"].createElement(ItemSubInfo, __assign({}, item)));
6281
6476
  }
6282
- function AddSubTexts(subInfoGroups, skill) {
6283
- var texts = [];
6284
- skill.Tooltip.Sub.forEach(function (sub, i) {
6285
- texts.push(React__default["default"].createElement("div", { className: "SkillTooltip_subText" +
6286
- (i != skill.Tooltip.Sub.length - 1
6287
- ? " SkillTooltip_subTextMargin"
6288
- : "") },
6289
- sub.IconPath != null && sub.IconPath != "" ? (React__default["default"].createElement("img", { src: sub.IconIndex != null && sub.IconIndex > 0
6290
- ? BuildIconPath(sub.IconPath, sub.IconIndex - 1)
6291
- : BuildIconPath(sub.IconPath), alt: "", className: "SkillTooltip_conditionIconSmall" })) : null,
6292
- React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: sub.Text } })));
6293
- });
6477
+ function AddSkillTitles(mainInfos, item, itemCombats, jobstyle) {
6478
+ var itemSkills = item.skills;
6479
+ if (itemSkills == null || itemSkills.length == 0)
6480
+ return;
6481
+ mainInfos.push(React__default["default"].createElement(ItemSkillTitles, { item: item, itemCombats: itemCombats, jobstyle: jobstyle }));
6482
+ }
6483
+ function AddCooldowns(mainInfos, item) {
6484
+ if ((item.cooldownInMs == null || item.cooldownInMs == 0) &&
6485
+ (item.bgCooldownInMs == null || item.bgCooldownInMs == 0))
6486
+ return;
6487
+ mainInfos.push(React__default["default"].createElement(ItemCooldowns, __assign({}, item)));
6488
+ }
6489
+ function AddItemStats(mainInfos, item) {
6490
+ if (item.stats == null || item.stats.length == 0)
6491
+ return;
6492
+ mainInfos.push(React__default["default"].createElement(ItemStats, __assign({}, item)));
6493
+ }
6494
+ function AddItemRandomStats(mainInfos, item) {
6495
+ if (item.randomStats == null || item.randomStats.length === 0)
6496
+ return;
6497
+ mainInfos.push(React__default["default"].createElement(ItemRandomStats, __assign({}, item)));
6498
+ }
6499
+ function AddGearScore(subInfoGroups, item, debugMode) {
6500
+ if (!debugMode)
6501
+ return;
6294
6502
  subInfoGroups.push({
6295
6503
  title: "",
6296
- texts: texts,
6504
+ texts: [React__default["default"].createElement(GearScore, __assign({}, item))],
6297
6505
  });
6298
6506
  }
6299
- function AddBreakValue(subInfoGroups, skill) {
6300
- if (skill.BreakValue != null && skill.BreakValue !== "0") {
6301
- subInfoGroups.push({
6302
- title: "",
6303
- texts: [
6304
- React__default["default"].createElement("div", null,
6305
- "Breaker value:\u00A0",
6306
- React__default["default"].createElement("span", { className: "tooltipArg", dangerouslySetInnerHTML: { __html: skill.BreakValue } })),
6307
- ],
6308
- });
6309
- }
6310
- }
6311
- function AddPvpModifiers(subInfoGroups, skill) {
6312
- if (skill.Pvp == null || skill.EqualizedPvp == null)
6507
+ function AddTopText(subInfoGroups, item) {
6508
+ if (item.topText == null)
6313
6509
  return;
6314
6510
  subInfoGroups.push({
6315
6511
  title: "",
6316
- texts: [React__default["default"].createElement(PvpModifiers, { skill: skill })],
6512
+ texts: [React__default["default"].createElement(TopText, __assign({}, item))],
6317
6513
  });
6318
6514
  }
6319
- function AddBoundaries(subInfoGroups, skill) {
6320
- if (skill.Boundaries == null)
6515
+ function AddSkillDescriptions(subInfoGroups, item, itemCombats, jobstyle) {
6516
+ if (item.skills == null || item.skills.length == 0)
6321
6517
  return;
6322
6518
  subInfoGroups.push({
6323
6519
  title: "",
6324
- texts: [React__default["default"].createElement(SkillBoundaries, { skill: skill })],
6520
+ texts: [
6521
+ React__default["default"].createElement(ItemSkillDescriptions, { item: item, itemCombats: itemCombats, jobstyle: jobstyle }),
6522
+ ],
6325
6523
  });
6326
6524
  }
6327
- function AddConditions(subInfoGroups, skill) {
6328
- if (skill.Tooltip.Condition.length == 0)
6525
+ function AddSkillModifiers(subInfoGroups, item, isSetBonus, jobstyle) {
6526
+ if (item.skillModifierGroups == null || item.skillModifierGroups.length == 0)
6329
6527
  return;
6330
6528
  subInfoGroups.push({
6331
- title: "Terms of Use",
6332
- texts: [React__default["default"].createElement(SkillConditions, { tooltipItems: skill.Tooltip.Condition })],
6529
+ title: "",
6530
+ texts: [
6531
+ React__default["default"].createElement(SkillModifiers, { skillModifierGroups: item.skillModifierGroups, isSetBonus: isSetBonus, jobstyle: jobstyle }),
6532
+ ],
6333
6533
  });
6334
6534
  }
6335
- function AddStances(subInfoGroups, skill) {
6336
- if (skill.Tooltip.Stance.length == 0)
6535
+ function AddSetBonus(subInfoGroups, item, jobstyle) {
6536
+ if (item.setBonus == null)
6337
6537
  return;
6338
6538
  subInfoGroups.push({
6339
- title: "Switch Position",
6340
- texts: [React__default["default"].createElement(SkillConditions, { tooltipItems: skill.Tooltip.Stance })],
6539
+ title: "Set Effect:",
6540
+ texts: [React__default["default"].createElement(SetBonus, { item: item, jobstyle: jobstyle })],
6341
6541
  });
6342
6542
  }
6343
- function AddIds(subInfoGroups, skill) {
6543
+ function AddDecomposeResults(subInfoGroups, item, client, region) {
6544
+ if (item.decomposeRewards == null || item.decomposeRewards.length == 0)
6545
+ return;
6546
+ var fixedItems = []
6547
+ .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.fixedItems; })).filter(function (x) { return x != null; });
6548
+ var randomItems = []
6549
+ .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.randomItems; })).filter(function (x) { return x != null; });
6550
+ var selectItems = []
6551
+ .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.selectItems; })).filter(function (x) { return x != null; });
6552
+ if (fixedItems.length > 0)
6553
+ subInfoGroups.push({
6554
+ title: "Guaranteed/Salvage:",
6555
+ texts: [
6556
+ React__default["default"].createElement(DecomposeResults, { region: region, items: fixedItems, client: client }),
6557
+ ],
6558
+ });
6559
+ if (randomItems.length > 0)
6560
+ subInfoGroups.push({
6561
+ title: "Random:",
6562
+ texts: [
6563
+ React__default["default"].createElement(DecomposeResults, { region: region, items: randomItems, client: client }),
6564
+ ],
6565
+ });
6566
+ if (selectItems.length > 0)
6567
+ subInfoGroups.push({
6568
+ title: "Select:",
6569
+ texts: [
6570
+ React__default["default"].createElement(DecomposeResults, { region: region, items: selectItems, client: client }),
6571
+ ],
6572
+ });
6573
+ }
6574
+ function AddJobstyleToggles(setHasSkillModifiers, subInfoGroups, jobstyles, jobstyle, setJobstyle) {
6575
+ if (!setHasSkillModifiers)
6576
+ return;
6344
6577
  subInfoGroups.push({
6345
- title: "Debug info",
6346
- texts: [React__default["default"].createElement("div", null,
6347
- "ID: ",
6348
- skill.ID), React__default["default"].createElement("div", null,
6349
- "Variation: ",
6350
- skill.Variation)],
6578
+ title: "",
6579
+ texts: [
6580
+ React__default["default"].createElement(SetBonusToggle, { jobstyles: jobstyles, jobstyle: jobstyle, setJobstyle: setJobstyle }),
6581
+ ],
6582
+ });
6583
+ }
6584
+ function AddDescriptions(subInfoGroups, item) {
6585
+ if (item.descriptions == null || item.descriptions.length == 0)
6586
+ return;
6587
+ item.descriptions
6588
+ .filter(function (x) { return x.text != null && x.text != ""; })
6589
+ .forEach(function (description) {
6590
+ subInfoGroups.push({
6591
+ title: description.title,
6592
+ texts: [React__default["default"].createElement(ItemDescriptionText, { htmlString: description.text })],
6593
+ });
6594
+ });
6595
+ }
6596
+ function AddFlavorText(subInfoGroups, item) {
6597
+ if (item.flavorText == null || item.flavorText == "")
6598
+ return;
6599
+ subInfoGroups.push({
6600
+ title: "",
6601
+ texts: [React__default["default"].createElement(ItemDescriptionText, { htmlString: item.flavorText })],
6351
6602
  });
6352
- }
6353
-
6354
- var css_248z$1 = ".tippy-box {\n max-width: none !important;\n background-color: transparent !important;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;\n transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important; }\n .tippy-box:hover {\n box-shadow: black 0px 20px 60px 0px !important; }\n\n.tippy-content {\n padding: 0 !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade1\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #6c6c6c !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade2\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ffffff !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade3\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #58ff77 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade4\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #46bee1 !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade5\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #d739ff !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade6\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #f1b248 !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade7\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ff770a !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"bottom\"]\n.tippy-arrow::before {\n border-bottom-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"top\"]\n.tippy-arrow::before {\n border-top-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"left\"]\n.tippy-arrow::before {\n border-left-color: #ff0084 !important; }\n\n.tippy-box[data-theme~=\"grade8\"][data-placement^=\"right\"]\n.tippy-arrow::before {\n border-right-color: #ff0084 !important; }\n";
6355
- styleInject(css_248z$1);
6356
-
6357
- var SkillTooltipWrapper = function (_a) {
6358
- var data = _a.data, children = _a.children, _b = _a.interactive, interactive = _b === void 0 ? false : _b, _c = _a.placement, placement = _c === void 0 ? "right" : _c, _d = _a.followCursor, followCursor$1 = _d === void 0 ? false : _d, _e = _a.trigger, trigger = _e === void 0 ? "mouseenter focus" : _e, _f = _a.showArrow, showArrow = _f === void 0 ? true : _f;
6359
- var spanRef = React.useRef(null);
6360
- var _g = React.useState(null), childRef = _g[0], setChildRef = _g[1];
6361
- /**
6362
- * Mount the temporary span element.
6363
- * retrieve and store the target element's reference.
6364
- */
6365
- React.useEffect(function () {
6366
- if (spanRef.current) {
6367
- setChildRef(spanRef.current.previousElementSibling);
6368
- }
6369
- return function () { return setChildRef(null); };
6370
- }, []);
6371
- return (React__default["default"].createElement(React__default["default"].Fragment, null,
6372
- children,
6373
- childRef ? (React__default["default"].createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && !interactive, appendTo: document.body, placement: placement, animation: "fade", interactive: interactive, content: React__default["default"].createElement(SkillTooltip, { data: data, debug: false }), theme: "grade" + 4, reference: childRef })) : (React__default["default"].createElement("span", { ref: spanRef, style: { display: "none" } }))));
6374
- };
6375
-
6376
- exports.ServerRegion = void 0;
6377
- (function (ServerRegion) {
6378
- ServerRegion["EUNA"] = "EUNA";
6379
- ServerRegion["Korea"] = "Korea";
6380
- ServerRegion["KoreaTest"] = "KoreaTest";
6381
- })(exports.ServerRegion || (exports.ServerRegion = {}));
6382
-
6383
- var css_248z = ".NpcTooltip_toggleBarContainer {\n display: flex; }\n\n.NpcTooltip_toggleButton {\n flex: 1;\n border: none;\n padding: 0.33rem 0.5rem;\n border-radius: 0;\n background-color: rgba(233, 233, 233, 0.1);\n color: #fff;\n opacity: 0.8;\n cursor: pointer;\n transition: background-color 0.1s; }\n .NpcTooltip_toggleButton:hover {\n background-color: rgba(255, 255, 255, 0.2);\n opacity: 1; }\n .NpcTooltip_toggleButton-active {\n background-color: rgba(255, 255, 255, 0.3) !important;\n color: #fff;\n opacity: 1; }\n\n.NpcTooltip_storeEntry {\n display: flex;\n align-items: stretch;\n background-color: rgba(233, 233, 233, 0.1);\n padding: 0.33rem;\n font-size: 14px; }\n .NpcTooltip_storeEntry:not(:last-child) {\n margin-bottom: 0.2rem; }\n\n.NpcTooltip_storeEntryItemNameLimit {\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center; }\n\n.NpcTooltip_storeEntryItemLimit {\n font-size: 12px; }\n\n.NpcTooltip_storeEntryItemName {\n flex: 1;\n display: flex;\n align-items: center; }\n\n.NpcTooltip_storeEntryItemIconName {\n display: flex;\n align-items: center; }\n .NpcTooltip_storeEntryItemIconName img {\n width: 48px;\n height: 48px;\n margin-right: 0.33rem; }\n\n.NpcTooltip_itemBuyPriceEntriesContainer {\n display: flex;\n flex-direction: column;\n flex: 1;\n align-items: flex-end;\n justify-content: center;\n padding-left: 2rem; }\n\n.NpcTooltip_itemBuyPriceEntries {\n display: flex; }\n .NpcTooltip_itemBuyPriceEntries-moneyMargin {\n margin-bottom: 0.2rem; }\n\n.NpcTooltip_itemBuyPriceEntry:not(:first-child) {\n margin-left: 0.33rem; }\n\n.NpcTooltip_itemBuyPriceEntryContainer {\n position: relative;\n height: 32px; }\n .NpcTooltip_itemBuyPriceEntryContainer img {\n width: 32px;\n height: 32px; }\n .NpcTooltip_itemBuyPriceEntryContainer-shadow {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n box-shadow: inset 0 0 2px 0px #000000; }\n\n.NpcTooltip_itemBuyPriceEntryCount {\n position: absolute;\n bottom: 0;\n left: 0;\n color: #ffffff;\n background-color: rgba(0, 0, 0, 0.4);\n width: 32px;\n line-height: 12px;\n text-align: center; }\n\n.NpcTooltip_moneyContainer {\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n .NpcTooltip_moneyContainer > span {\n display: flex;\n align-items: center; }\n .NpcTooltip_moneyContainer > span:not(:first-child) {\n margin-left: 0.1rem; }\n .NpcTooltip_moneyContainer > span > img {\n width: 16px;\n height: 16px; }\n";
6384
- styleInject(css_248z);
6385
-
6386
- function StoreToggle(_a) {
6387
- var store = _a.store, isActive = _a.isActive, setActive = _a.setActive;
6388
- return (React__default["default"].createElement("button", { className: "NpcTooltip_toggleButton " +
6389
- (isActive ? "NpcTooltip_toggleButton-active" : ""), onClick: setActive },
6390
- React__default["default"].createElement("span", null, store.Name)));
6391
- }
6392
-
6393
- function StoreToggleBar(_a) {
6394
- var stores = _a.stores, activeTab = _a.activeTab, setActiveTab = _a.setActiveTab;
6395
- return (React__default["default"].createElement("div", { className: "NpcTooltip_toggleBarContainer" }, stores.map(function (store, i) { return (React__default["default"].createElement(StoreToggle, { key: i, store: store, isActive: activeTab === i, setActive: function () { return setActiveTab(i); } })); })));
6396
- }
6397
-
6398
- var BuyLimitReset;
6399
- (function (BuyLimitReset) {
6400
- BuyLimitReset[BuyLimitReset["Day"] = 0] = "Day";
6401
- BuyLimitReset[BuyLimitReset["Week"] = 1] = "Week";
6402
- BuyLimitReset[BuyLimitReset["Month"] = 2] = "Month";
6403
- BuyLimitReset[BuyLimitReset["Absolute"] = 3] = "Absolute";
6404
- })(BuyLimitReset || (BuyLimitReset = {}));
6405
- var BuyLimitType;
6406
- (function (BuyLimitType) {
6407
- BuyLimitType[BuyLimitType["Character"] = 0] = "Character";
6408
- BuyLimitType[BuyLimitType["Account"] = 1] = "Account";
6409
- })(BuyLimitType || (BuyLimitType = {}));
6410
-
6411
- function ItemBuyLimit(_a) {
6412
- var limit = _a.limit;
6413
- if (limit == null)
6414
- return null;
6415
- return (React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemLimit" }, GetStringForBuyLimitType(limit.LimitType) +
6416
- "Limit: " +
6417
- limit.Amount +
6418
- "/" +
6419
- GetStringForBuyLimitReset(limit.LimitReset)));
6420
6603
  }
6421
- function GetStringForBuyLimitType(type) {
6422
- switch (type) {
6423
- case BuyLimitType.Account:
6424
- return "Account ";
6425
- case BuyLimitType.Character:
6426
- return "Character ";
6427
- default:
6428
- return "";
6429
- }
6604
+ function AddItemUsableGroup(subInfoGroups, item) {
6605
+ if (IsNullOrEmpty(item.usableGroup))
6606
+ return;
6607
+ subInfoGroups.push({
6608
+ title: "",
6609
+ texts: [React__default["default"].createElement(RawText, { htmlString: item.usableGroup })],
6610
+ });
6430
6611
  }
6431
- function GetStringForBuyLimitReset(reset) {
6432
- switch (reset) {
6433
- case BuyLimitReset.Day:
6434
- return "Day";
6435
- case BuyLimitReset.Week:
6436
- return "Week ";
6437
- case BuyLimitReset.Month:
6438
- return "Month";
6439
- default:
6440
- return "";
6441
- }
6442
- }
6443
-
6444
- function Money(_a) {
6445
- var money = _a.money;
6446
- var bnsmoney = getMoneyObj(money);
6447
- if (bnsmoney == null)
6448
- return null;
6449
- return (React__default["default"].createElement("div", { className: "NpcTooltip_moneyContainer" },
6450
- bnsmoney.Gold > 0 ? (React__default["default"].createElement("span", null,
6451
- bnsmoney.Gold,
6452
- React__default["default"].createElement("img", { src: BuildIconPath("gold"), alt: "" }))) : null,
6453
- bnsmoney.Silver > 0 ? (React__default["default"].createElement("span", null,
6454
- bnsmoney.Silver,
6455
- React__default["default"].createElement("img", { src: BuildIconPath("silver"), alt: "" }))) : null,
6456
- bnsmoney.Copper > 0 ? (React__default["default"].createElement("span", null,
6457
- bnsmoney.Copper,
6458
- React__default["default"].createElement("img", { src: BuildIconPath("copper"), alt: "" }))) : null));
6459
- }
6460
-
6461
- function StoreItemBuyPriceEntry(_a) {
6462
- var _this = this;
6463
- var itemRef = _a.itemRef, client = _a.client;
6464
- var _b = React.useState(), item = _b[0], setItem = _b[1];
6465
- React.useEffect(function () {
6466
- if (client == null)
6467
- return;
6468
- (function () { return __awaiter(_this, void 0, void 0, function () {
6469
- var _a;
6470
- return __generator(this, function (_b) {
6471
- switch (_b.label) {
6472
- case 0:
6473
- _a = setItem;
6474
- return [4 /*yield*/, client.GetItem(itemRef.itemId, itemRef.itemLevel)];
6475
- case 1:
6476
- _a.apply(void 0, [_b.sent()]);
6477
- return [2 /*return*/];
6478
- }
6479
- });
6480
- }); })();
6481
- }, [itemRef, client]);
6482
- return (React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntry" }, item ? (React__default["default"].createElement(ItemTooltipWrapper, { trigger: "click", data: item, region: client.region, client: client },
6483
- React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer" },
6484
- React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer-shadow" }),
6485
- React__default["default"].createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" }),
6486
- React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryCount" },
6487
- React__default["default"].createElement("span", null, itemRef.min))))) : null));
6488
- }
6489
-
6490
- function NpcStoreEntry(_a) {
6491
- var _this = this;
6492
- var _b, _c;
6493
- var data = _a.data, client = _a.client;
6494
- var _d = React.useState(), item = _d[0], setItem = _d[1];
6495
- React.useEffect(function () {
6496
- if (client == null)
6497
- return;
6498
- (function () { return __awaiter(_this, void 0, void 0, function () {
6499
- var res;
6500
- return __generator(this, function (_a) {
6501
- switch (_a.label) {
6502
- case 0: return [4 /*yield*/, client.GetItem(data.Item.itemId, data.Item.itemLevel)];
6503
- case 1:
6504
- res = _a.sent();
6505
- setItem(res);
6506
- return [2 /*return*/];
6507
- }
6508
- });
6509
- }); })();
6510
- }, [data, client]);
6511
- if (item != undefined) {
6512
- return (React__default["default"].createElement("div", { className: "NpcTooltip_storeEntry" },
6513
- React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemIconName" },
6514
- React__default["default"].createElement(ItemTooltipWrapper, { data: item, client: client, region: client.region, trigger: "click" },
6515
- React__default["default"].createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" })),
6516
- React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemNameLimit" },
6517
- React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemName TooltipBase_grade-" + item.grade, dangerouslySetInnerHTML: { __html: item.name } }),
6518
- React__default["default"].createElement(ItemBuyLimit, { limit: data.Limit }))),
6519
- React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntriesContainer" },
6520
- ((_b = data.BuyPrice.Items) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntries " +
6521
- (data.BuyPrice.Money > 0
6522
- ? "NpcTooltip_itemBuyPriceEntries-moneyMargin"
6523
- : "") }, (_c = data.BuyPrice.Items) === null || _c === void 0 ? void 0 : _c.map(function (itemCountRef, i) { return (React__default["default"].createElement(StoreItemBuyPriceEntry, { itemRef: itemCountRef, client: client, key: i })); }))) : null,
6524
- React__default["default"].createElement(Money, { money: data.BuyPrice.Money }))));
6525
- }
6526
- else {
6527
- return null;
6528
- }
6529
- }
6530
-
6531
- function NpcStores(_a) {
6532
- var stores = _a.stores, activeTab = _a.activeTab, client = _a.client;
6533
- var activeStore = stores[activeTab];
6534
- return (React__default["default"].createElement("div", null, activeStore.Entries.map(function (entry, i) { return (React__default["default"].createElement(NpcStoreEntry, { key: i, data: entry, client: client })); })));
6535
- }
6536
-
6537
- function NpcTooltip(_a) {
6538
- var _this = this;
6539
- var _b;
6540
- var clientProp = _a.client, npc = _a.npc; _a.debug; var region = _a.region, _c = _a.grade, grade = _c === void 0 ? 4 : _c, _d = _a.fullHeight, fullHeight = _d === void 0 ? false : _d;
6541
- var _e = React.useState(0), activeTab = _e[0], setActiveTab = _e[1];
6542
- var _f = React.useState(), client = _f[0], setClient = _f[1];
6543
- React.useEffect(function () {
6544
- if (clientProp == undefined) {
6545
- (function () { return __awaiter(_this, void 0, void 0, function () {
6546
- return __generator(this, function (_a) {
6547
- setClient(new ItemDownloadClient(region));
6548
- return [2 /*return*/];
6549
- });
6550
- }); })();
6551
- }
6552
- else {
6553
- setClient(clientProp);
6554
- }
6555
- }, []);
6556
- var tooltipBaseProps = {
6557
- title: npc.Name,
6558
- grade: grade,
6559
- id: npc.Alias,
6560
- subtitle: (_b = npc.Title) !== null && _b !== void 0 ? _b : "",
6561
- fullHeight: fullHeight,
6562
- subInfoGroups: [],
6563
- };
6564
- //no top part
6565
- AddStoreToggles(tooltipBaseProps.subInfoGroups, npc.Stores, activeTab, setActiveTab);
6566
- AddStores(tooltipBaseProps.subInfoGroups, npc.Stores, activeTab, client);
6567
- return React__default["default"].createElement(TooltipBase, __assign({}, tooltipBaseProps));
6612
+ function AddRequiredLevel(subInfoGroups, item) {
6613
+ if (item.levelRequired == null || item.levelRequired <= 1)
6614
+ return;
6615
+ subInfoGroups.push({
6616
+ title: "",
6617
+ texts: [
6618
+ React__default["default"].createElement(TextWithNumber, { text: "Requires Level ", number: item.levelRequired }),
6619
+ ],
6620
+ });
6568
6621
  }
6569
- function AddStoreToggles(subInfoGroups, Stores, activeTab, setActiveTab) {
6622
+ function AddRequiredJobs(subInfoGroups, item) {
6623
+ if (item.classRequired == null || item.classRequired.length == 0)
6624
+ return;
6625
+ var enJobNames = item.classRequired.map(function (x) { return x.enName; });
6570
6626
  subInfoGroups.push({
6571
6627
  title: "",
6572
6628
  texts: [
6573
- React__default["default"].createElement(StoreToggleBar, { stores: Stores, activeTab: activeTab, setActiveTab: setActiveTab }),
6629
+ React__default["default"].createElement(StringEnumerationWithText, { enumeration: enJobNames, textAfter: " Only", textBefore: "" }),
6574
6630
  ],
6575
6631
  });
6576
6632
  }
6577
- function AddStores(subInfoGroups, Stores, activeTab, client) {
6633
+ function AddBoundToAccount(subInfoGroups, item) {
6634
+ if (item.boundToAccount == null || item.boundToAccount == false)
6635
+ return;
6636
+ subInfoGroups.push({
6637
+ title: "",
6638
+ texts: [React__default["default"].createElement("div", null, "Bound to Account")],
6639
+ });
6640
+ }
6641
+ function AddAbleToTrade(subInfoGroups, item) {
6642
+ if (item.unableToTrade == null || item.unableToTrade == false)
6643
+ return;
6644
+ subInfoGroups.push({
6645
+ title: "",
6646
+ texts: [React__default["default"].createElement("div", null, "Unable to Trade")],
6647
+ });
6648
+ }
6649
+ function AddSealingResult(subInfoGroups, item, client, region) {
6650
+ if (item.sealing == null ||
6651
+ item.sealing.sealAcquireItemId == null ||
6652
+ item.sealing.sealConsumeItems.filter(function (x) { return x.min != 0; }).length == 0)
6653
+ return;
6654
+ subInfoGroups.push({
6655
+ title: "Can be resealed with:",
6656
+ texts: [React__default["default"].createElement(SealingResult, { region: region, item: item, client: client })],
6657
+ });
6658
+ }
6659
+ function AddAccountTransferResult(subInfoGroups, item, client, region) {
6660
+ if (item.accountTransfer == null ||
6661
+ item.accountTransfer.requiredItems == null ||
6662
+ item.accountTransfer.requiredItems.length == 0)
6663
+ return;
6664
+ subInfoGroups.push({
6665
+ title: "Can be transferred with:",
6666
+ texts: [React__default["default"].createElement(AccountTransfer, { region: region, item: item, client: client })],
6667
+ });
6668
+ }
6669
+ function AddUnityPoints(subInfoGroups, item) {
6670
+ if (item.setPoints == null || item.refinementPoints == null)
6671
+ return;
6672
+ if (item.setPoints === 0)
6673
+ return;
6674
+ if (item.refinementPoints === 0)
6675
+ return;
6578
6676
  subInfoGroups.push({
6579
6677
  title: "",
6580
6678
  texts: [
6581
- React__default["default"].createElement(NpcStores, { stores: Stores, activeTab: activeTab, client: client }),
6679
+ React__default["default"].createElement("span", null,
6680
+ "Splendor Stone Set Points: ",
6681
+ item.setPoints),
6682
+ React__default["default"].createElement("span", null,
6683
+ "Splendor Stone Refinement Points: ",
6684
+ item.refinementPoints),
6582
6685
  ],
6583
6686
  });
6584
6687
  }
6585
6688
 
6689
+ var css_248z = "";
6690
+ styleInject(css_248z);
6691
+
6692
+ function JsonTooltip(props) {
6693
+ var tooltipProps = {
6694
+ title: props.title,
6695
+ grade: props.grade,
6696
+ icon: props.icon,
6697
+ mainInfos: JsonArrayToJsxArray(props.mainInfos),
6698
+ subtitle: props.subtitle,
6699
+ subInfoGroups: JsonSubInfoToJsxSubInfo(props.subInfoGroups),
6700
+ };
6701
+ return React__default["default"].createElement(TooltipBase, __assign({}, tooltipProps));
6702
+ }
6703
+ function JsonSubInfoToJsxSubInfo(subInfoGroups) {
6704
+ if (subInfoGroups == undefined)
6705
+ return undefined;
6706
+ var result = [];
6707
+ subInfoGroups.forEach(function (subInfoGroup) {
6708
+ var jsxSubInfoGroup = {
6709
+ title: subInfoGroup.title,
6710
+ texts: JsonArrayToJsxArray(subInfoGroup.texts),
6711
+ };
6712
+ result.push(jsxSubInfoGroup);
6713
+ });
6714
+ return result;
6715
+ }
6716
+ function JsonArrayToJsxArray(stringArray) {
6717
+ if (stringArray == undefined)
6718
+ return undefined;
6719
+ var jsxArray = [];
6720
+ stringArray.forEach(function (mainInfo) {
6721
+ jsxArray.push(React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: mainInfo } }));
6722
+ });
6723
+ return jsxArray;
6724
+ }
6725
+
6726
+ exports.ServerRegion = void 0;
6727
+ (function (ServerRegion) {
6728
+ ServerRegion["EUNA"] = "EUNA";
6729
+ ServerRegion["Korea"] = "Korea";
6730
+ ServerRegion["KoreaTest"] = "KoreaTest";
6731
+ })(exports.ServerRegion || (exports.ServerRegion = {}));
6732
+
6586
6733
  exports.GetCooldownString = GetCooldownString;
6587
- exports.ItemTooltip = ItemTooltip;
6588
- exports.ItemTooltipWrapper = ItemTooltipWrapper;
6734
+ exports.ItemTooltip = ItemTooltipComponent;
6735
+ exports.ItemTooltipSettings = ItemTooltipSettings;
6589
6736
  exports.JsonTooltip = JsonTooltip;
6590
6737
  exports.NpcTooltip = NpcTooltip;
6738
+ exports.NpcTooltipSettings = NpcTooltipSettings;
6591
6739
  exports.SkillTooltip = SkillTooltip;
6592
- exports.SkillTooltipWrapper = SkillTooltipWrapper;
6740
+ exports.SkillTooltipSettings = SkillTooltipSettings;
6593
6741
  exports.TooltipBase = TooltipBase;
6742
+ exports.TooltipWrapper = TooltipWrapper;
6743
+ exports.TooltipWrapperSettings = TooltipWrapperSettings;
6594
6744
  //# sourceMappingURL=index.js.map