bnstooltips 1.6.5 → 2.0.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,1109 @@ 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
+ exports.ServerRegion = void 0;
5645
+ (function (ServerRegion) {
5646
+ ServerRegion["EUNA"] = "EUNA";
5647
+ ServerRegion["Korea"] = "Korea";
5648
+ ServerRegion["KoreaTest"] = "KoreaTest";
5649
+ })(exports.ServerRegion || (exports.ServerRegion = {}));
5650
+ var TooltipSettingsBase = /** @class */ (function () {
5651
+ function TooltipSettingsBase(offline) {
5652
+ if (offline === void 0) { offline = false; }
5653
+ this.debug = false;
5654
+ this.fullHeight = false;
5655
+ this.offline = offline;
5639
5656
  }
5640
- else {
5641
- return (React__default["default"].createElement("div", { className: "ItemTooltip_itemIconLoading" },
5642
- React__default["default"].createElement("div", { className: "dot-elastic" })));
5657
+ return TooltipSettingsBase;
5658
+ }());
5659
+ var TooltipWithNetworkSettings = /** @class */ (function (_super) {
5660
+ __extends(TooltipWithNetworkSettings, _super);
5661
+ function TooltipWithNetworkSettings(region, client, offline) {
5662
+ if (offline === void 0) { offline = false; }
5663
+ var _this = this;
5664
+ var l_offline = offline;
5665
+ if (region == null)
5666
+ l_offline = true;
5667
+ _this = _super.call(this, l_offline) || this;
5668
+ _this.region = region;
5669
+ _this.client = client;
5670
+ return _this;
5643
5671
  }
5644
- }
5672
+ return TooltipWithNetworkSettings;
5673
+ }(TooltipSettingsBase));
5674
+
5675
+ var ItemTooltipSettings = /** @class */ (function (_super) {
5676
+ __extends(ItemTooltipSettings, _super);
5677
+ function ItemTooltipSettings(data, region, client, offline) {
5678
+ var _this = _super.call(this, region, client, offline) || this;
5679
+ _this.data = data;
5680
+ return _this;
5681
+ }
5682
+ return ItemTooltipSettings;
5683
+ }(TooltipWithNetworkSettings));
5684
+
5685
+ var SkillTooltipSettings = /** @class */ (function (_super) {
5686
+ __extends(SkillTooltipSettings, _super);
5687
+ function SkillTooltipSettings(data) {
5688
+ var _this = _super.call(this) || this;
5689
+ _this.data = data;
5690
+ return _this;
5691
+ }
5692
+ return SkillTooltipSettings;
5693
+ }(TooltipSettingsBase));
5645
5694
 
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
5695
+ 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";
5696
+ styleInject(css_248z$2);
5697
+
5698
+ function getButtonIconPath(button) {
5699
+ var _a;
5700
+ if (buttonIconMapping.find(function (x) { return x.button === button; }) == null)
5658
5701
  return null;
5659
- }
5702
+ return ("/00072858" + ((_a = buttonIconMapping.find(function (x) { return x.button === button; })) === null || _a === void 0 ? void 0 : _a.path));
5703
+ }
5704
+ var buttonIconMapping = [
5705
+ {
5706
+ button: "F",
5707
+ path: "/Key_Alphabet_F",
5708
+ },
5709
+ {
5710
+ button: "Q",
5711
+ path: "/Key_Alphabet_Q",
5712
+ },
5713
+ {
5714
+ button: "E",
5715
+ path: "/Key_Alphabet_E",
5716
+ },
5717
+ {
5718
+ button: "S",
5719
+ path: "/Key_Alphabet_S",
5720
+ },
5721
+ {
5722
+ button: "Z",
5723
+ path: "/Key_Alphabet_Z",
5724
+ },
5725
+ {
5726
+ button: "X",
5727
+ path: "/Key_Alphabet_X",
5728
+ },
5729
+ {
5730
+ button: "C",
5731
+ path: "/Key_Alphabet_C",
5732
+ },
5733
+ {
5734
+ button: "V",
5735
+ path: "/Key_Alphabet_V",
5736
+ },
5737
+ {
5738
+ button: "W",
5739
+ path: "/Key_Alphabet_W",
5740
+ },
5741
+ {
5742
+ button: "G",
5743
+ path: "/Key_Alphabet_G",
5744
+ },
5745
+ {
5746
+ button: "B",
5747
+ path: "/Key_Alphabet_B",
5748
+ },
5749
+ {
5750
+ button: "SPACE",
5751
+ path: "/Key_Space_Big",
5752
+ },
5753
+ {
5754
+ button: "TAB",
5755
+ path: "/Key_Tab_Big",
5756
+ },
5757
+ {
5758
+ button: "1",
5759
+ path: "/Key_Num_1",
5760
+ },
5761
+ {
5762
+ button: "2",
5763
+ path: "/Key_Num_2",
5764
+ },
5765
+ {
5766
+ button: "3",
5767
+ path: "/Key_Num_3",
5768
+ },
5769
+ {
5770
+ button: "4",
5771
+ path: "/Key_Num_4",
5772
+ },
5773
+ {
5774
+ button: "LMB",
5775
+ path: "/GameUI_Tag_MouseL",
5776
+ },
5777
+ {
5778
+ button: "RMB",
5779
+ path: "/GameUI_Tag_MouseR",
5780
+ },
5781
+ ];
5660
5782
 
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))); })));
5783
+ function SkillIconWithButton(_a) {
5784
+ var skill = _a.skill;
5785
+ return (React__default["default"].createElement("div", { className: "SkillTooltip_skillIconContainer" },
5786
+ React__default["default"].createElement("img", { className: "SkillTooltip_skillIcon", src: BuildIconPath(skill.IconPath, skill.IconIndex - 1), alt: "" }),
5787
+ getButtonIconPath(getNormalizedButton(skill)) ? (React__default["default"].createElement("img", { className: "SkillTooltip_buttonIcon" +
5788
+ " " +
5789
+ (getNormalizedButton(skill) === "RMB" ||
5790
+ getNormalizedButton(skill) === "LMB"
5791
+ ? "SkillTooltip_buttonIconMouse"
5792
+ : ""), src: BuildIconPath(getButtonIconPath(getNormalizedButton(skill))), alt: "" })) : null));
5668
5793
  }
5669
5794
 
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
- } })); })));
5795
+ function SkillTooltipBoundary(_a) {
5796
+ 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;
5797
+ return (React__default["default"].createElement("div", { className: "SkillTooltip_boundary" },
5798
+ React__default["default"].createElement("div", { className: "SkillTooltip_boundaryHead" }, head),
5799
+ React__default["default"].createElement("div", { className: "SkillTooltip_boundaryBody " +
5800
+ (pvpModifier ? "SkillTooltip_boundaryBodyModifier " : "") +
5801
+ bodyClass +
5802
+ (hasIcon ? " SkillTooltip_boundaryHasIcon " : "") }, body)));
5676
5803
  }
5677
5804
 
5678
- function RawText(_a) {
5679
- var htmlString = _a.htmlString;
5680
- return (React__default["default"].createElement("div", { className: "ItemTooltip_raw", dangerouslySetInnerHTML: { __html: htmlString } }));
5805
+ function SkillTooltipBoundaryContainer(_a) {
5806
+ var children = _a.children;
5807
+ return React__default["default"].createElement("div", { className: "SkillTooltip_boundaryContainer" }, children);
5681
5808
  }
5682
5809
 
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));
5810
+ function PvpModifiers(_a) {
5811
+ var skill = _a.skill;
5812
+ return (React__default["default"].createElement(SkillTooltipBoundaryContainer, null,
5813
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", null, "Equalized PvP"), body: React__default["default"].createElement("span", null,
5814
+ "x\u00A0",
5815
+ React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: skill.EqualizedPvp } })), pvpModifier: true }),
5816
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", null, "PvP"), body: React__default["default"].createElement("span", null,
5817
+ "x\u00A0",
5818
+ React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: skill.Pvp } })), pvpModifier: true })));
5698
5819
  }
5699
5820
 
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))); })));
5821
+ function SkillBoundaries(_a) {
5822
+ var skill = _a.skill;
5823
+ var _b = React__default["default"].useState(false), hasIcon = _b[0], setHasIcon = _b[1];
5824
+ React__default["default"].useEffect(function () {
5825
+ setHasIcon(skill.Boundaries.Range.Shape != null && skill.Boundaries.Range.Shape != "");
5826
+ }, [skill]);
5827
+ return (React__default["default"].createElement(SkillTooltipBoundaryContainer, null,
5828
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5829
+ __html: skill.Boundaries.Distance.Name,
5830
+ } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5831
+ __html: skill.Boundaries.Distance.Value,
5832
+ } }), hasIcon: hasIcon }),
5833
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5834
+ __html: skill.Boundaries.Range.Name,
5835
+ } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5836
+ __html: skill.Boundaries.Range.Value,
5837
+ } }), hasIcon: hasIcon, bodyClass: skill.Boundaries.Range.Shape }),
5838
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5839
+ __html: skill.Boundaries.Cast.Name,
5840
+ } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5841
+ __html: skill.Boundaries.Cast.Value,
5842
+ } }), hasIcon: hasIcon }),
5843
+ React__default["default"].createElement(SkillTooltipBoundary, { head: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5844
+ __html: skill.Boundaries.Recycle.Name,
5845
+ } }), body: React__default["default"].createElement("span", { dangerouslySetInnerHTML: {
5846
+ __html: skill.Boundaries.Recycle.Value,
5847
+ } }), hasIcon: hasIcon })));
5708
5848
  }
5709
5849
 
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));
5850
+ function SkillConditions(_a) {
5851
+ var tooltipItems = _a.tooltipItems;
5852
+ 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" },
5853
+ sub.IconPath != null ? (React__default["default"].createElement("img", { src: sub.IconIndex != null && sub.IconIndex > 0
5854
+ ? BuildIconPath(sub.IconPath, sub.IconIndex - 1)
5855
+ : BuildIconPath(sub.IconPath), alt: "", className: "SkillTooltip_conditionIcon" })) : null,
5856
+ React__default["default"].createElement("div", { key: i, dangerouslySetInnerHTML: { __html: sub.Text } }))); })));
5721
5857
  }
5722
5858
 
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 = "";
5859
+ function SkillTooltip(_a) {
5860
+ var settings = _a.settings;
5861
+ var debug = settings.debug;
5862
+ var skill = settings.data;
5753
5863
  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,
5864
+ title: skill.Name,
5865
+ id: skill.ID + "-" + skill.Variation,
5866
+ grade: 4,
5867
+ icon: skill.IconPath ? React__default["default"].createElement(SkillIconWithButton, { skill: skill }) : "",
5868
+ subtitle: skill.AdditionalInfo
5869
+ ? "<div style=\"font-size: 12px;\">".concat(skill.AdditionalInfo, "</div>")
5870
+ : "",
5759
5871
  mainInfos: [],
5760
5872
  subInfoGroups: [],
5761
- fullHeight: fullHeight,
5762
5873
  };
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);
5874
+ if (skill.Tooltip != null) {
5875
+ //topPart
5876
+ AddMainText1s(tooltipBaseProps.mainInfos, skill);
5877
+ AddMainText2s(tooltipBaseProps.mainInfos, skill);
5878
+ //bottomPart
5879
+ AddSubTexts(tooltipBaseProps.subInfoGroups, skill);
5880
+ AddBreakValue(tooltipBaseProps.subInfoGroups, skill);
5881
+ AddPvpModifiers(tooltipBaseProps.subInfoGroups, skill);
5882
+ AddBoundaries(tooltipBaseProps.subInfoGroups, skill);
5883
+ AddConditions(tooltipBaseProps.subInfoGroups, skill);
5884
+ AddStances(tooltipBaseProps.subInfoGroups, skill);
5885
+ if (debug) {
5886
+ AddIds(tooltipBaseProps.subInfoGroups, skill);
5887
+ }
5817
5888
  }
5818
5889
  return React__default["default"].createElement(TooltipBase, __assign({}, tooltipBaseProps));
5819
5890
  }
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)));
5891
+ function AddMainText1s(mainInfos, skill) {
5892
+ skill.Tooltip.Main1.forEach(function (main) {
5893
+ mainInfos.push(React__default["default"].createElement("div", { className: "SkillTooltip_mainText", dangerouslySetInnerHTML: { __html: main.Text } }));
5894
+ });
5844
5895
  }
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)));
5896
+ function AddMainText2s(mainInfos, skill) {
5897
+ skill.Tooltip.Main2.forEach(function (main) {
5898
+ mainInfos.push(React__default["default"].createElement("div", { className: "SkillTooltip_smallText", dangerouslySetInnerHTML: { __html: main.Text } }));
5899
+ });
5849
5900
  }
5850
- function AddGearScore(subInfoGroups, item, debugMode) {
5851
- if (!debugMode)
5852
- return;
5901
+ function AddSubTexts(subInfoGroups, skill) {
5902
+ var texts = [];
5903
+ skill.Tooltip.Sub.forEach(function (sub, i) {
5904
+ texts.push(React__default["default"].createElement("div", { className: "SkillTooltip_subText" +
5905
+ (i != skill.Tooltip.Sub.length - 1
5906
+ ? " SkillTooltip_subTextMargin"
5907
+ : "") },
5908
+ sub.IconPath != null && sub.IconPath != "" ? (React__default["default"].createElement("img", { src: sub.IconIndex != null && sub.IconIndex > 0
5909
+ ? BuildIconPath(sub.IconPath, sub.IconIndex - 1)
5910
+ : BuildIconPath(sub.IconPath), alt: "", className: "SkillTooltip_conditionIconSmall" })) : null,
5911
+ React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: sub.Text } })));
5912
+ });
5853
5913
  subInfoGroups.push({
5854
5914
  title: "",
5855
- texts: [React__default["default"].createElement(GearScore, __assign({}, item))],
5915
+ texts: texts,
5856
5916
  });
5857
5917
  }
5858
- function AddTopText(subInfoGroups, item) {
5859
- if (item.topText == null)
5918
+ function AddBreakValue(subInfoGroups, skill) {
5919
+ if (skill.BreakValue != null && skill.BreakValue !== "0") {
5920
+ subInfoGroups.push({
5921
+ title: "",
5922
+ texts: [
5923
+ React__default["default"].createElement("div", null,
5924
+ "Breaker value:\u00A0",
5925
+ React__default["default"].createElement("span", { className: "tooltipArg", dangerouslySetInnerHTML: { __html: skill.BreakValue } })),
5926
+ ],
5927
+ });
5928
+ }
5929
+ }
5930
+ function AddPvpModifiers(subInfoGroups, skill) {
5931
+ if (skill.Pvp == null || skill.EqualizedPvp == null)
5860
5932
  return;
5861
5933
  subInfoGroups.push({
5862
5934
  title: "",
5863
- texts: [React__default["default"].createElement(TopText, __assign({}, item))],
5935
+ texts: [React__default["default"].createElement(PvpModifiers, { skill: skill })],
5864
5936
  });
5865
5937
  }
5866
- function AddSkillDescriptions(subInfoGroups, item, itemCombats, jobstyle) {
5867
- if (item.skills == null || item.skills.length == 0)
5938
+ function AddBoundaries(subInfoGroups, skill) {
5939
+ if (skill.Boundaries == null)
5868
5940
  return;
5869
5941
  subInfoGroups.push({
5870
5942
  title: "",
5871
- texts: [
5872
- React__default["default"].createElement(ItemSkillDescriptions, { item: item, itemCombats: itemCombats, jobstyle: jobstyle }),
5873
- ],
5943
+ texts: [React__default["default"].createElement(SkillBoundaries, { skill: skill })],
5874
5944
  });
5875
5945
  }
5876
- function AddSkillModifiers(subInfoGroups, item, isSetBonus, jobstyle) {
5877
- if (item.skillModifierGroups == null || item.skillModifierGroups.length == 0)
5946
+ function AddConditions(subInfoGroups, skill) {
5947
+ if (skill.Tooltip.Condition.length == 0)
5878
5948
  return;
5879
5949
  subInfoGroups.push({
5880
- title: "",
5881
- texts: [
5882
- React__default["default"].createElement(SkillModifiers, { skillModifierGroups: item.skillModifierGroups, isSetBonus: isSetBonus, jobstyle: jobstyle }),
5883
- ],
5950
+ title: "Terms of Use",
5951
+ texts: [React__default["default"].createElement(SkillConditions, { tooltipItems: skill.Tooltip.Condition })],
5884
5952
  });
5885
5953
  }
5886
- function AddSetBonus(subInfoGroups, item, jobstyle) {
5887
- if (item.setBonus == null)
5954
+ function AddStances(subInfoGroups, skill) {
5955
+ if (skill.Tooltip.Stance.length == 0)
5888
5956
  return;
5889
5957
  subInfoGroups.push({
5890
- title: "Set Effect:",
5891
- texts: [React__default["default"].createElement(SetBonus, { item: item, jobstyle: jobstyle })],
5958
+ title: "Switch Position",
5959
+ texts: [React__default["default"].createElement(SkillConditions, { tooltipItems: skill.Tooltip.Stance })],
5892
5960
  });
5893
5961
  }
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;
5962
+ function AddIds(subInfoGroups, skill) {
5928
5963
  subInfoGroups.push({
5929
- title: "",
5930
- texts: [
5931
- React__default["default"].createElement(SetBonusToggle, { jobstyles: jobstyles, jobstyle: jobstyle, setJobstyle: setJobstyle }),
5932
- ],
5964
+ title: "Debug info",
5965
+ texts: [React__default["default"].createElement("div", null,
5966
+ "ID: ",
5967
+ skill.ID), React__default["default"].createElement("div", null,
5968
+ "Variation: ",
5969
+ skill.Variation)],
5933
5970
  });
5971
+ }
5972
+
5973
+ var NpcTooltipSettings = /** @class */ (function (_super) {
5974
+ __extends(NpcTooltipSettings, _super);
5975
+ function NpcTooltipSettings(npc, region, grade, client, offline) {
5976
+ if (grade === void 0) { grade = 4; }
5977
+ var _this = _super.call(this, region, client, offline) || this;
5978
+ _this.npc = npc;
5979
+ _this.grade = grade;
5980
+ return _this;
5981
+ }
5982
+ return NpcTooltipSettings;
5983
+ }(TooltipWithNetworkSettings));
5984
+
5985
+ 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";
5986
+ styleInject(css_248z$1);
5987
+
5988
+ function StoreToggle(_a) {
5989
+ var store = _a.store, isActive = _a.isActive, setActive = _a.setActive;
5990
+ return (React__default["default"].createElement("button", { className: "NpcTooltip_toggleButton " +
5991
+ (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))));
5992
+ }
5993
+
5994
+ function StoreToggleBar(_a) {
5995
+ var stores = _a.stores, activeTab = _a.activeTab, setActiveTab = _a.setActiveTab;
5996
+ 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); } })); })));
5997
+ }
5998
+
5999
+ var BuyLimitReset;
6000
+ (function (BuyLimitReset) {
6001
+ BuyLimitReset[BuyLimitReset["Day"] = 0] = "Day";
6002
+ BuyLimitReset[BuyLimitReset["Week"] = 1] = "Week";
6003
+ BuyLimitReset[BuyLimitReset["Month"] = 2] = "Month";
6004
+ BuyLimitReset[BuyLimitReset["Absolute"] = 3] = "Absolute";
6005
+ })(BuyLimitReset || (BuyLimitReset = {}));
6006
+ var BuyLimitType;
6007
+ (function (BuyLimitType) {
6008
+ BuyLimitType[BuyLimitType["Character"] = 0] = "Character";
6009
+ BuyLimitType[BuyLimitType["Account"] = 1] = "Account";
6010
+ })(BuyLimitType || (BuyLimitType = {}));
6011
+
6012
+ function ItemBuyLimit(_a) {
6013
+ var limit = _a.limit;
6014
+ if (limit == null)
6015
+ return null;
6016
+ return (React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemLimit" }, GetStringForBuyLimitType(limit.LimitType) +
6017
+ "Limit: " +
6018
+ limit.Amount +
6019
+ "/" +
6020
+ GetStringForBuyLimitReset(limit.LimitReset)));
5934
6021
  }
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
- });
5945
- });
6022
+ function GetStringForBuyLimitType(type) {
6023
+ switch (type) {
6024
+ case BuyLimitType.Account:
6025
+ return "Account ";
6026
+ case BuyLimitType.Character:
6027
+ return "Character ";
6028
+ default:
6029
+ return "";
6030
+ }
5946
6031
  }
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
- });
6032
+ function GetStringForBuyLimitReset(reset) {
6033
+ switch (reset) {
6034
+ case BuyLimitReset.Day:
6035
+ return "Day";
6036
+ case BuyLimitReset.Week:
6037
+ return "Week ";
6038
+ case BuyLimitReset.Month:
6039
+ return "Month";
6040
+ default:
6041
+ return "";
6042
+ }
6043
+ }
6044
+
6045
+ function Money(_a) {
6046
+ var money = _a.money;
6047
+ var bnsmoney = getMoneyObj(money);
6048
+ if (bnsmoney == null)
6049
+ return null;
6050
+ return (React__default["default"].createElement("div", { className: "NpcTooltip_moneyContainer" },
6051
+ bnsmoney.Gold > 0 ? (React__default["default"].createElement("span", null,
6052
+ bnsmoney.Gold,
6053
+ React__default["default"].createElement("img", { src: BuildIconPath("gold"), alt: "" }))) : null,
6054
+ bnsmoney.Silver > 0 ? (React__default["default"].createElement("span", null,
6055
+ bnsmoney.Silver,
6056
+ React__default["default"].createElement("img", { src: BuildIconPath("silver"), alt: "" }))) : null,
6057
+ bnsmoney.Copper > 0 ? (React__default["default"].createElement("span", null,
6058
+ bnsmoney.Copper,
6059
+ React__default["default"].createElement("img", { src: BuildIconPath("copper"), alt: "" }))) : null));
6060
+ }
6061
+
6062
+ function StoreItemBuyPriceEntry(_a) {
6063
+ var _this = this;
6064
+ var itemRef = _a.itemRef, client = _a.client;
6065
+ var _b = React.useState(), item = _b[0], setItem = _b[1];
6066
+ React.useEffect(function () {
6067
+ if (client == null)
6068
+ return;
6069
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6070
+ var _a;
6071
+ return __generator(this, function (_b) {
6072
+ switch (_b.label) {
6073
+ case 0:
6074
+ _a = setItem;
6075
+ return [4 /*yield*/, client.GetItem(itemRef.itemId, itemRef.itemLevel)];
6076
+ case 1:
6077
+ _a.apply(void 0, [_b.sent()]);
6078
+ return [2 /*return*/];
6079
+ }
6080
+ });
6081
+ }); })();
6082
+ }, [itemRef, client]);
6083
+ var tooltipItemSettings = new ItemTooltipSettings(item, client.region, client);
6084
+ var wrapperSettings = new TooltipWrapperSettings(undefined, undefined, undefined, "click", undefined);
6085
+ return (React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntry" }, item ? (React__default["default"].createElement(TooltipWrapper, { settings: wrapperSettings, tooltipSettings: tooltipItemSettings },
6086
+ React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer" },
6087
+ React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryContainer-shadow" }),
6088
+ React__default["default"].createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" }),
6089
+ React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntryCount" },
6090
+ React__default["default"].createElement("span", null, itemRef.min))))) : null));
6091
+ }
6092
+
6093
+ function NpcStoreEntry(_a) {
6094
+ var _this = this;
6095
+ var _b, _c;
6096
+ var data = _a.data, client = _a.client;
6097
+ var _d = React.useState(), item = _d[0], setItem = _d[1];
6098
+ React.useEffect(function () {
6099
+ if (client == null)
6100
+ return;
6101
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6102
+ var res;
6103
+ return __generator(this, function (_a) {
6104
+ switch (_a.label) {
6105
+ case 0: return [4 /*yield*/, client.GetItem(data.Item.itemId, data.Item.itemLevel)];
6106
+ case 1:
6107
+ res = _a.sent();
6108
+ setItem(res);
6109
+ return [2 /*return*/];
6110
+ }
6111
+ });
6112
+ }); })();
6113
+ }, [data, client]);
6114
+ if (item != undefined) {
6115
+ var tooltipItemSettings = new ItemTooltipSettings(item, client.region, client);
6116
+ var wrapperSettings = new TooltipWrapperSettings(undefined, undefined, undefined, "click", undefined);
6117
+ return (React__default["default"].createElement("div", { className: "NpcTooltip_storeEntry" },
6118
+ React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemIconName" },
6119
+ React__default["default"].createElement(TooltipWrapper, { settings: wrapperSettings, tooltipSettings: tooltipItemSettings },
6120
+ React__default["default"].createElement("img", { className: "TooltipBase_iconbg-grade-" + item.grade, src: BuildIconPath(item.icon.iconPath), alt: "" })),
6121
+ React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemNameLimit" },
6122
+ React__default["default"].createElement("div", { className: "NpcTooltip_storeEntryItemName TooltipBase_grade-" + item.grade, dangerouslySetInnerHTML: { __html: item.name } }),
6123
+ React__default["default"].createElement(ItemBuyLimit, { limit: data.Limit }))),
6124
+ React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntriesContainer" },
6125
+ ((_b = data.BuyPrice.Items) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (React__default["default"].createElement("div", { className: "NpcTooltip_itemBuyPriceEntries " +
6126
+ (data.BuyPrice.Money > 0
6127
+ ? "NpcTooltip_itemBuyPriceEntries-moneyMargin"
6128
+ : "") }, (_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,
6129
+ React__default["default"].createElement(Money, { money: data.BuyPrice.Money }))));
6130
+ }
6131
+ else {
6132
+ return null;
6133
+ }
6134
+ }
6135
+
6136
+ function NpcStores(_a) {
6137
+ var stores = _a.stores, activeTab = _a.activeTab, client = _a.client;
6138
+ var activeStore = stores[activeTab];
6139
+ 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 })); })));
6140
+ }
6141
+
6142
+ function NpcTooltip(_a) {
6143
+ var _this = this;
6144
+ var _b, _c;
6145
+ var settings = _a.settings;
6146
+ var npc = settings.npc;
6147
+ var _d = React.useState(0), activeTab = _d[0], setActiveTab = _d[1];
6148
+ var _e = React.useState(), client = _e[0], setClient = _e[1];
6149
+ React.useEffect(function () {
6150
+ if (!settings.offline) {
6151
+ if (settings.client == undefined) {
6152
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6153
+ return __generator(this, function (_a) {
6154
+ setClient(new ItemDownloadClient(settings.region));
6155
+ return [2 /*return*/];
6156
+ });
6157
+ }); })();
6158
+ }
6159
+ else {
6160
+ setClient(settings.client);
6161
+ }
6162
+ }
6163
+ }, [settings.offline]);
6164
+ var tooltipBaseProps = {
6165
+ title: npc.Name,
6166
+ grade: (_b = settings.grade) !== null && _b !== void 0 ? _b : 4,
6167
+ id: npc.Alias,
6168
+ subtitle: (_c = npc.Title) !== null && _c !== void 0 ? _c : "",
6169
+ fullHeight: settings.fullHeight,
6170
+ subInfoGroups: [],
6171
+ };
6172
+ //no top part
6173
+ AddStoreToggles(tooltipBaseProps.subInfoGroups, activeTab, setActiveTab, npc.Stores);
6174
+ AddStores(tooltipBaseProps.subInfoGroups, activeTab, client, npc.Stores);
6175
+ return React__default["default"].createElement(TooltipBase, __assign({}, tooltipBaseProps));
5954
6176
  }
5955
- function AddItemUsableGroup(subInfoGroups, item) {
5956
- if (IsNullOrEmpty(item.usableGroup))
6177
+ function AddStoreToggles(subInfoGroups, activeTab, setActiveTab, Stores) {
6178
+ if (Stores == null || Stores.length <= 0)
5957
6179
  return;
5958
6180
  subInfoGroups.push({
5959
6181
  title: "",
5960
- texts: [React__default["default"].createElement(RawText, { htmlString: item.usableGroup })],
6182
+ texts: [
6183
+ React__default["default"].createElement(StoreToggleBar, { stores: Stores, activeTab: activeTab, setActiveTab: setActiveTab }),
6184
+ ],
5961
6185
  });
5962
6186
  }
5963
- function AddRequiredLevel(subInfoGroups, item) {
5964
- if (item.levelRequired == null || item.levelRequired <= 1)
6187
+ function AddStores(subInfoGroups, activeTab, client, Stores) {
6188
+ if (Stores == null || Stores.length <= 0)
5965
6189
  return;
5966
6190
  subInfoGroups.push({
5967
6191
  title: "",
5968
6192
  texts: [
5969
- React__default["default"].createElement(TextWithNumber, { text: "Requires Level ", number: item.levelRequired }),
5970
- ],
5971
- });
5972
- }
5973
- function AddRequiredJobs(subInfoGroups, item) {
5974
- if (item.classRequired == null || item.classRequired.length == 0)
5975
- return;
5976
- var enJobNames = item.classRequired.map(function (x) { return x.enName; });
5977
- subInfoGroups.push({
5978
- title: "",
5979
- 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),
6193
+ React__default["default"].createElement(NpcStores, { stores: Stores, activeTab: activeTab, client: client }),
6036
6194
  ],
6037
6195
  });
6038
6196
  }
6039
6197
 
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;
6198
+ function TooltipWrapper(_a) {
6199
+ var _b;
6200
+ var settings = _a.settings, tooltipSettings = _a.tooltipSettings, children = _a.children, jobstyleOverride = _a.jobstyleOverride;
6201
+ if (settings == undefined) {
6202
+ settings = new TooltipWrapperSettings();
6203
+ }
6204
+ if (settings == null || tooltipSettings == null)
6205
+ return null;
6206
+ var spanRef = React.useRef(null);
6207
+ var _c = React.useState(null), childRef = _c[0], setChildRef = _c[1];
6208
+ /**
6209
+ * Mount the temporary span element.
6210
+ * retrieve and store the target element's reference.
6211
+ */
6212
+ React.useEffect(function () {
6213
+ if (spanRef.current) {
6214
+ setChildRef(spanRef.current.previousElementSibling);
6215
+ }
6216
+ return function () { return setChildRef(null); };
6217
+ }, []);
6218
+ var _d = React.useState(true); _d[0]; var setIsOffline = _d[1];
6219
+ var grade = 4;
6220
+ var content = null;
6221
+ if (tooltipSettings instanceof ItemTooltipSettings) {
6222
+ content = (React__default["default"].createElement(ItemTooltip, { jobstyleOverride: jobstyleOverride, settings: tooltipSettings }));
6223
+ grade = tooltipSettings.data.grade;
6224
+ }
6225
+ if (tooltipSettings instanceof SkillTooltipSettings) {
6226
+ content = React__default["default"].createElement(SkillTooltip, { settings: tooltipSettings });
6227
+ }
6228
+ if (tooltipSettings instanceof NpcTooltipSettings) {
6229
+ content = React__default["default"].createElement(NpcTooltip, { settings: tooltipSettings });
6230
+ grade = (_b = tooltipSettings.grade) !== null && _b !== void 0 ? _b : 4;
6231
+ }
6232
+ return (React__default["default"].createElement(React__default["default"].Fragment, null,
6233
+ children,
6234
+ childRef ? (React__default["default"].createElement(Tippy, { arrow: settings.showArrow, trigger: settings.trigger, plugins: [followCursor], followCursor: settings.followCursor && !settings.interactive, appendTo: document.body, onMount: function () { return setIsOffline(tooltipSettings.offline); }, placement: settings.placement, animation: "fade", interactive: settings.interactive, content: content, theme: "grade" + grade, reference: childRef })) : (React__default["default"].createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
6075
6235
  }
6076
6236
 
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);
6237
+ function ItemIconNameDiv(_a) {
6238
+ var _this = this;
6239
+ var _b;
6240
+ var item = _a.item, region = _a.region, client = _a.client, _c = _a.showRandomIcon, showRandomIcon = _c === void 0 ? false : _c;
6241
+ var _d = React.useState(), itemData = _d[0], setItemData = _d[1];
6242
+ React.useEffect(function () {
6243
+ if (client)
6244
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6245
+ var _a;
6246
+ return __generator(this, function (_b) {
6247
+ switch (_b.label) {
6248
+ case 0:
6249
+ _a = setItemData;
6250
+ return [4 /*yield*/, client.GetItem(item.itemId, item.itemLevel)];
6251
+ case 1:
6252
+ _a.apply(void 0, [_b.sent()]);
6253
+ return [2 /*return*/];
6254
+ }
6255
+ });
6256
+ }); })();
6257
+ }, [item, client]);
6258
+ if (itemData) {
6259
+ if (itemData.grade != 0) {
6260
+ var itemSettings = new ItemTooltipSettings(itemData);
6261
+ itemSettings.client = client;
6262
+ itemSettings.region = region;
6263
+ return (React__default["default"].createElement("div", { className: "ItemTooltip_itemiconnamediv" },
6264
+ React__default["default"].createElement(TooltipWrapper, { settings: new TooltipWrapperSettings(), tooltipSettings: itemSettings },
6265
+ React__default["default"].createElement("img", { className: "ItemTooltip_itemIconSmall", alt: "", src: BuildIconPath((_b = itemData.icon) === null || _b === void 0 ? void 0 : _b.iconPath) })),
6266
+ React__default["default"].createElement("div", { className: "ItemTooltip_itemNameRandomDiv" },
6267
+ React__default["default"].createElement("span", { className: "TooltipBase_grade-" + itemData.grade, dangerouslySetInnerHTML: { __html: itemData.name } }),
6268
+ showRandomIcon ? (React__default["default"].createElement(React__default["default"].Fragment, null,
6269
+ "\u00A0",
6270
+ React__default["default"].createElement("div", null,
6271
+ React__default["default"].createElement("img", { style: {
6272
+ width: 36,
6273
+ height: 18,
6274
+ margin: "0 1px",
6275
+ top: 4,
6276
+ position: "relative",
6277
+ }, alt: "", src: "https://lean.bns.tools/bns/icons/00015590/Tag_Random.png" })))) : null)));
6278
+ }
6279
+ else
6280
+ return null;
6281
+ }
6282
+ else {
6283
+ return (React__default["default"].createElement("div", { className: "ItemTooltip_itemIconLoading" },
6284
+ React__default["default"].createElement("div", { className: "dot-elastic" })));
6285
+ }
6286
+ }
6079
6287
 
6080
- function getButtonIconPath(button) {
6081
- var _a;
6082
- if (buttonIconMapping.find(function (x) { return x.button === button; }) == null)
6288
+ function DecomposeResults(props) {
6289
+ if (props.client)
6290
+ return (React__default["default"].createElement("div", null, props.items
6291
+ .filter(function (x) { return x != null; })
6292
+ .map(function (item, i) {
6293
+ return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: item.itemId + "-" + item.itemLevel + "_" + i },
6294
+ React__default["default"].createElement(ItemIconNameDiv, { region: props.region, item: item, client: props.client, showRandomIcon: item.isRandom }),
6295
+ item.isRandom ? null : (React__default["default"].createElement(React__default["default"].Fragment, null,
6296
+ "\u00A0",
6297
+ item.isMinMax ? (React__default["default"].createElement("span", null, GetRangeString(item.min, item.max))) : (React__default["default"].createElement("span", null, GetRangeString(item.min)))))));
6298
+ })));
6299
+ else
6083
6300
  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
- ];
6301
+ }
6164
6302
 
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));
6303
+ function SetBonusToggle(_a) {
6304
+ var jobstyles = _a.jobstyles, jobstyle = _a.jobstyle, setJobstyle = _a.setJobstyle;
6305
+ return (React__default["default"].createElement("div", { className: "ItemTooltip_jobstyleToggleContainer" }, jobstyles.map(function (style) { return (React__default["default"].createElement("button", { key: style, className: "ItemTooltip_jobstyleButton" +
6306
+ (style === jobstyle ? " ItemTooltip_jobstyleButton-active" : ""), onClick: function (e) {
6307
+ e.stopPropagation();
6308
+ setJobstyle(style);
6309
+ } }, GetJobStyleNameString(style))); })));
6175
6310
  }
6176
6311
 
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)));
6312
+ function ItemDescriptionText(_a) {
6313
+ var htmlString = _a.htmlString;
6314
+ var textSplit = htmlString.replace("<br/>", "<br />").split("<br />");
6315
+ 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: {
6316
+ __html: ReplaceIconsInHtmlString(htmlText),
6317
+ } })); })));
6185
6318
  }
6186
6319
 
6187
- function SkillTooltipBoundaryContainer(_a) {
6188
- var children = _a.children;
6189
- return React__default["default"].createElement("div", { className: "SkillTooltip_boundaryContainer" }, children);
6320
+ function RawText(_a) {
6321
+ var htmlString = _a.htmlString;
6322
+ return (React__default["default"].createElement("div", { className: "ItemTooltip_raw", dangerouslySetInnerHTML: { __html: htmlString } }));
6190
6323
  }
6191
6324
 
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 })));
6325
+ function TextWithNumber(_a) {
6326
+ var text = _a.text, number = _a.number;
6327
+ return (React__default["default"].createElement("div", null,
6328
+ text,
6329
+ number));
6201
6330
  }
6202
6331
 
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 })));
6332
+ function StringEnumerationWithText(_a) {
6333
+ var enumeration = _a.enumeration, textBefore = _a.textBefore, textAfter = _a.textAfter;
6334
+ return (React__default["default"].createElement("div", null,
6335
+ textBefore,
6336
+ enumeration.map(function (item, i) { return (React__default["default"].createElement("span", { key: i },
6337
+ item,
6338
+ i != enumeration.length - 1 ? ", " : null)); }),
6339
+ textAfter));
6230
6340
  }
6231
6341
 
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 } }))); })));
6342
+ function SealingResult(_a) {
6343
+ var item = _a.item, client = _a.client, region = _a.region;
6344
+ return (React__default["default"].createElement("div", null, item.sealing.sealConsumeItems
6345
+ .filter(function (x) { return x.min != 0; })
6346
+ .map(function (consumeItem, i) { return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
6347
+ React__default["default"].createElement(ItemIconNameDiv, { region: region, item: consumeItem, client: client }),
6348
+ "\u00A0",
6349
+ GetRangeString(consumeItem.min))); })));
6239
6350
  }
6240
6351
 
6241
- function SkillTooltip(_a) {
6242
- var data = _a.data, _b = _a.debug, debug = _b === void 0 ? false : _b;
6243
- var skill = data;
6244
- 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
- : "",
6252
- mainInfos: [],
6253
- subInfoGroups: [],
6254
- };
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);
6352
+ function AccountTransfer(_a) {
6353
+ var item = _a.item, client = _a.client, region = _a.region;
6354
+ return (React__default["default"].createElement("div", null,
6355
+ item.accountTransfer.requiredItems.map(function (consumeItem, i) { return (React__default["default"].createElement("div", { className: "TooltipBase_flex", key: consumeItem.itemId + "_" + i },
6356
+ React__default["default"].createElement(ItemIconNameDiv, { region: region, client: client, item: consumeItem }),
6357
+ "\u00A0",
6358
+ GetRangeString(consumeItem.min))); }),
6359
+ item.accountTransfer.moneyCost != null &&
6360
+ item.accountTransfer.moneyCost > 0 ? (React__default["default"].createElement("span", null,
6361
+ item.accountTransfer.moneyCost,
6362
+ "\u00A0copper")) : null));
6363
+ }
6364
+
6365
+ function ItemTooltip(_a) {
6366
+ var _this = this;
6367
+ var _b, _c, _d;
6368
+ var settings = _a.settings, jobstyleOverride = _a.jobstyleOverride;
6369
+ var _e = React.useState("advanced-1"), jobstyle = _e[0], setJobstyle = _e[1];
6370
+ var _f = React.useState(), client = _f[0], setClient = _f[1];
6371
+ React.useEffect(function () {
6372
+ if (settings.offline)
6373
+ return;
6374
+ if (settings.client == undefined) {
6375
+ (function () { return __awaiter(_this, void 0, void 0, function () {
6376
+ return __generator(this, function (_a) {
6377
+ setClient(new ItemDownloadClient(settings.region));
6378
+ return [2 /*return*/];
6379
+ });
6380
+ }); })();
6381
+ }
6382
+ else {
6383
+ setClient(settings.client);
6384
+ }
6385
+ }, [settings.offline]);
6386
+ React.useEffect(function () {
6387
+ if (jobstyleOverride != undefined) {
6388
+ setJobstyle(jobstyleOverride);
6268
6389
  }
6390
+ }, [jobstyleOverride]);
6391
+ var item = settings.data;
6392
+ 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 : "";
6393
+ if (itemCategory == "none")
6394
+ itemCategory = "";
6395
+ var tooltipBaseProps = {
6396
+ title: item.name,
6397
+ grade: item.grade,
6398
+ id: item.id + "-" + item.level,
6399
+ icon: item.icon ? BuildIconPath(item.icon.iconPath) : "",
6400
+ subtitle: itemCategory,
6401
+ mainInfos: [],
6402
+ subInfoGroups: [],
6403
+ fullHeight: settings.fullHeight,
6404
+ };
6405
+ var setHasSkillModifiers = false;
6406
+ var jobstyles = [];
6407
+ var itemCombats = false;
6408
+ if (item.skills != null && item.skills.length > 0) {
6409
+ item.skills.forEach(function (itemSkill) {
6410
+ if (itemSkill.jobstyle != null) {
6411
+ setHasSkillModifiers = true;
6412
+ itemCombats = true;
6413
+ if (!jobstyles.includes(itemSkill.jobstyle)) {
6414
+ jobstyles.push(itemSkill.jobstyle);
6415
+ }
6416
+ }
6417
+ });
6418
+ }
6419
+ if (((_d = item.setBonus) === null || _d === void 0 ? void 0 : _d.setBonusStages) != null) {
6420
+ item.setBonus.setBonusStages.forEach(function (stage) {
6421
+ if (stage.skillModifiers != null && stage.skillModifiers.length > 0) {
6422
+ setHasSkillModifiers = true;
6423
+ stage.skillModifiers.forEach(function (modifier) {
6424
+ if (!jobstyles.includes(modifier.jobstyle)) {
6425
+ jobstyles.push(modifier.jobstyle);
6426
+ }
6427
+ });
6428
+ }
6429
+ });
6430
+ }
6431
+ //top part
6432
+ AddMainInfo(tooltipBaseProps.mainInfos, item);
6433
+ AddSubInfo(tooltipBaseProps.mainInfos, item);
6434
+ AddSkillTitles(tooltipBaseProps.mainInfos, item, itemCombats, jobstyle);
6435
+ AddCooldowns(tooltipBaseProps.mainInfos, item);
6436
+ AddItemStats(tooltipBaseProps.mainInfos, item);
6437
+ AddItemRandomStats(tooltipBaseProps.mainInfos, item);
6438
+ //bottom part
6439
+ AddGearScore(tooltipBaseProps.subInfoGroups, item, settings.debug);
6440
+ AddJobstyleToggles(setHasSkillModifiers, tooltipBaseProps.subInfoGroups, jobstyles, jobstyle, setJobstyle);
6441
+ AddTopText(tooltipBaseProps.subInfoGroups, item);
6442
+ AddSkillDescriptions(tooltipBaseProps.subInfoGroups, item, itemCombats, jobstyle);
6443
+ AddSkillModifiers(tooltipBaseProps.subInfoGroups, item, false, jobstyle);
6444
+ AddSetBonus(tooltipBaseProps.subInfoGroups, item, jobstyle);
6445
+ if (!settings.offline) {
6446
+ AddDecomposeResults(tooltipBaseProps.subInfoGroups, item, client, settings.region);
6447
+ }
6448
+ AddUnityPoints(tooltipBaseProps.subInfoGroups, item);
6449
+ AddDescriptions(tooltipBaseProps.subInfoGroups, item);
6450
+ AddFlavorText(tooltipBaseProps.subInfoGroups, item);
6451
+ AddItemUsableGroup(tooltipBaseProps.subInfoGroups, item);
6452
+ AddRequiredLevel(tooltipBaseProps.subInfoGroups, item);
6453
+ AddRequiredJobs(tooltipBaseProps.subInfoGroups, item);
6454
+ AddBoundToAccount(tooltipBaseProps.subInfoGroups, item);
6455
+ AddAbleToTrade(tooltipBaseProps.subInfoGroups, item);
6456
+ if (!settings.offline) {
6457
+ AddSealingResult(tooltipBaseProps.subInfoGroups, item, client, settings.region);
6458
+ AddAccountTransferResult(tooltipBaseProps.subInfoGroups, item, client, settings.region);
6269
6459
  }
6270
6460
  return React__default["default"].createElement(TooltipBase, __assign({}, tooltipBaseProps));
6271
6461
  }
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 } }));
6462
+ function AddMainInfo(mainInfos, item) {
6463
+ if (item.mainInfo != null)
6464
+ mainInfos.push(React__default["default"].createElement(ItemMainInfo, __assign({}, item)));
6465
+ }
6466
+ function AddSubInfo(mainInfos, item) {
6467
+ if (item.subInfo != null)
6468
+ mainInfos.push(React__default["default"].createElement(ItemSubInfo, __assign({}, item)));
6469
+ }
6470
+ function AddSkillTitles(mainInfos, item, itemCombats, jobstyle) {
6471
+ var itemSkills = item.skills;
6472
+ if (itemSkills == null || itemSkills.length == 0)
6473
+ return;
6474
+ mainInfos.push(React__default["default"].createElement(ItemSkillTitles, { item: item, itemCombats: itemCombats, jobstyle: jobstyle }));
6475
+ }
6476
+ function AddCooldowns(mainInfos, item) {
6477
+ if ((item.cooldownInMs == null || item.cooldownInMs == 0) &&
6478
+ (item.bgCooldownInMs == null || item.bgCooldownInMs == 0))
6479
+ return;
6480
+ mainInfos.push(React__default["default"].createElement(ItemCooldowns, __assign({}, item)));
6481
+ }
6482
+ function AddItemStats(mainInfos, item) {
6483
+ if (item.stats == null || item.stats.length == 0)
6484
+ return;
6485
+ mainInfos.push(React__default["default"].createElement(ItemStats, __assign({}, item)));
6486
+ }
6487
+ function AddItemRandomStats(mainInfos, item) {
6488
+ if (item.randomStats == null || item.randomStats.length === 0)
6489
+ return;
6490
+ mainInfos.push(React__default["default"].createElement(ItemRandomStats, __assign({}, item)));
6491
+ }
6492
+ function AddGearScore(subInfoGroups, item, debugMode) {
6493
+ if (!debugMode)
6494
+ return;
6495
+ subInfoGroups.push({
6496
+ title: "",
6497
+ texts: [React__default["default"].createElement(GearScore, __assign({}, item))],
6275
6498
  });
6276
6499
  }
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 } }));
6500
+ function AddTopText(subInfoGroups, item) {
6501
+ if (item.topText == null)
6502
+ return;
6503
+ subInfoGroups.push({
6504
+ title: "",
6505
+ texts: [React__default["default"].createElement(TopText, __assign({}, item))],
6280
6506
  });
6281
6507
  }
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 } })));
6508
+ function AddSkillDescriptions(subInfoGroups, item, itemCombats, jobstyle) {
6509
+ if (item.skills == null || item.skills.length == 0)
6510
+ return;
6511
+ subInfoGroups.push({
6512
+ title: "",
6513
+ texts: [
6514
+ React__default["default"].createElement(ItemSkillDescriptions, { item: item, itemCombats: itemCombats, jobstyle: jobstyle }),
6515
+ ],
6293
6516
  });
6517
+ }
6518
+ function AddSkillModifiers(subInfoGroups, item, isSetBonus, jobstyle) {
6519
+ if (item.skillModifierGroups == null || item.skillModifierGroups.length == 0)
6520
+ return;
6294
6521
  subInfoGroups.push({
6295
6522
  title: "",
6296
- texts: texts,
6523
+ texts: [
6524
+ React__default["default"].createElement(SkillModifiers, { skillModifierGroups: item.skillModifierGroups, isSetBonus: isSetBonus, jobstyle: jobstyle }),
6525
+ ],
6297
6526
  });
6298
6527
  }
6299
- function AddBreakValue(subInfoGroups, skill) {
6300
- if (skill.BreakValue != null && skill.BreakValue !== "0") {
6528
+ function AddSetBonus(subInfoGroups, item, jobstyle) {
6529
+ if (item.setBonus == null)
6530
+ return;
6531
+ subInfoGroups.push({
6532
+ title: "Set Effect:",
6533
+ texts: [React__default["default"].createElement(SetBonus, { item: item, jobstyle: jobstyle })],
6534
+ });
6535
+ }
6536
+ function AddDecomposeResults(subInfoGroups, item, client, region) {
6537
+ if (item.decomposeRewards == null || item.decomposeRewards.length == 0)
6538
+ return;
6539
+ var fixedItems = []
6540
+ .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.fixedItems; })).filter(function (x) { return x != null; });
6541
+ var randomItems = []
6542
+ .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.randomItems; })).filter(function (x) { return x != null; });
6543
+ var selectItems = []
6544
+ .concat.apply([], Array.from(item.decomposeRewards, function (x) { return x.selectItems; })).filter(function (x) { return x != null; });
6545
+ if (fixedItems.length > 0)
6301
6546
  subInfoGroups.push({
6302
- title: "",
6547
+ title: "Guaranteed/Salvage:",
6303
6548
  texts: [
6304
- React__default["default"].createElement("div", null,
6305
- "Breaker value:\u00A0",
6306
- React__default["default"].createElement("span", { className: "tooltipArg", dangerouslySetInnerHTML: { __html: skill.BreakValue } })),
6549
+ React__default["default"].createElement(DecomposeResults, { region: region, items: fixedItems, client: client }),
6550
+ ],
6551
+ });
6552
+ if (randomItems.length > 0)
6553
+ subInfoGroups.push({
6554
+ title: "Random:",
6555
+ texts: [
6556
+ React__default["default"].createElement(DecomposeResults, { region: region, items: randomItems, client: client }),
6557
+ ],
6558
+ });
6559
+ if (selectItems.length > 0)
6560
+ subInfoGroups.push({
6561
+ title: "Select:",
6562
+ texts: [
6563
+ React__default["default"].createElement(DecomposeResults, { region: region, items: selectItems, client: client }),
6307
6564
  ],
6308
6565
  });
6309
- }
6310
6566
  }
6311
- function AddPvpModifiers(subInfoGroups, skill) {
6312
- if (skill.Pvp == null || skill.EqualizedPvp == null)
6567
+ function AddJobstyleToggles(setHasSkillModifiers, subInfoGroups, jobstyles, jobstyle, setJobstyle) {
6568
+ if (!setHasSkillModifiers)
6313
6569
  return;
6314
6570
  subInfoGroups.push({
6315
6571
  title: "",
6316
- texts: [React__default["default"].createElement(PvpModifiers, { skill: skill })],
6572
+ texts: [
6573
+ React__default["default"].createElement(SetBonusToggle, { jobstyles: jobstyles, jobstyle: jobstyle, setJobstyle: setJobstyle }),
6574
+ ],
6317
6575
  });
6318
6576
  }
6319
- function AddBoundaries(subInfoGroups, skill) {
6320
- if (skill.Boundaries == null)
6577
+ function AddDescriptions(subInfoGroups, item) {
6578
+ if (item.descriptions == null || item.descriptions.length == 0)
6579
+ return;
6580
+ item.descriptions
6581
+ .filter(function (x) { return x.text != null && x.text != ""; })
6582
+ .forEach(function (description) {
6583
+ subInfoGroups.push({
6584
+ title: description.title,
6585
+ texts: [React__default["default"].createElement(ItemDescriptionText, { htmlString: description.text })],
6586
+ });
6587
+ });
6588
+ }
6589
+ function AddFlavorText(subInfoGroups, item) {
6590
+ if (item.flavorText == null || item.flavorText == "")
6321
6591
  return;
6322
6592
  subInfoGroups.push({
6323
6593
  title: "",
6324
- texts: [React__default["default"].createElement(SkillBoundaries, { skill: skill })],
6594
+ texts: [React__default["default"].createElement(ItemDescriptionText, { htmlString: item.flavorText })],
6325
6595
  });
6326
6596
  }
6327
- function AddConditions(subInfoGroups, skill) {
6328
- if (skill.Tooltip.Condition.length == 0)
6597
+ function AddItemUsableGroup(subInfoGroups, item) {
6598
+ if (IsNullOrEmpty(item.usableGroup))
6329
6599
  return;
6330
6600
  subInfoGroups.push({
6331
- title: "Terms of Use",
6332
- texts: [React__default["default"].createElement(SkillConditions, { tooltipItems: skill.Tooltip.Condition })],
6601
+ title: "",
6602
+ texts: [React__default["default"].createElement(RawText, { htmlString: item.usableGroup })],
6333
6603
  });
6334
6604
  }
6335
- function AddStances(subInfoGroups, skill) {
6336
- if (skill.Tooltip.Stance.length == 0)
6605
+ function AddRequiredLevel(subInfoGroups, item) {
6606
+ if (item.levelRequired == null || item.levelRequired <= 1)
6607
+ return;
6608
+ subInfoGroups.push({
6609
+ title: "",
6610
+ texts: [
6611
+ React__default["default"].createElement(TextWithNumber, { text: "Requires Level ", number: item.levelRequired }),
6612
+ ],
6613
+ });
6614
+ }
6615
+ function AddRequiredJobs(subInfoGroups, item) {
6616
+ if (item.classRequired == null || item.classRequired.length == 0)
6617
+ return;
6618
+ var enJobNames = item.classRequired.map(function (x) { return x.enName; });
6619
+ subInfoGroups.push({
6620
+ title: "",
6621
+ texts: [
6622
+ React__default["default"].createElement(StringEnumerationWithText, { enumeration: enJobNames, textAfter: " Only", textBefore: "" }),
6623
+ ],
6624
+ });
6625
+ }
6626
+ function AddBoundToAccount(subInfoGroups, item) {
6627
+ if (item.boundToAccount == null || item.boundToAccount == false)
6628
+ return;
6629
+ subInfoGroups.push({
6630
+ title: "",
6631
+ texts: [React__default["default"].createElement("div", null, "Bound to Account")],
6632
+ });
6633
+ }
6634
+ function AddAbleToTrade(subInfoGroups, item) {
6635
+ if (item.unableToTrade == null || item.unableToTrade == false)
6636
+ return;
6637
+ subInfoGroups.push({
6638
+ title: "",
6639
+ texts: [React__default["default"].createElement("div", null, "Unable to Trade")],
6640
+ });
6641
+ }
6642
+ function AddSealingResult(subInfoGroups, item, client, region) {
6643
+ if (item.sealing == null ||
6644
+ item.sealing.sealAcquireItemId == null ||
6645
+ item.sealing.sealConsumeItems.filter(function (x) { return x.min != 0; }).length == 0)
6646
+ return;
6647
+ subInfoGroups.push({
6648
+ title: "Can be resealed with:",
6649
+ texts: [React__default["default"].createElement(SealingResult, { region: region, item: item, client: client })],
6650
+ });
6651
+ }
6652
+ function AddAccountTransferResult(subInfoGroups, item, client, region) {
6653
+ if (item.accountTransfer == null ||
6654
+ item.accountTransfer.requiredItems == null ||
6655
+ item.accountTransfer.requiredItems.length == 0)
6337
6656
  return;
6338
6657
  subInfoGroups.push({
6339
- title: "Switch Position",
6340
- texts: [React__default["default"].createElement(SkillConditions, { tooltipItems: skill.Tooltip.Stance })],
6658
+ title: "Can be transferred with:",
6659
+ texts: [React__default["default"].createElement(AccountTransfer, { region: region, item: item, client: client })],
6341
6660
  });
6342
6661
  }
6343
- function AddIds(subInfoGroups, skill) {
6662
+ function AddUnityPoints(subInfoGroups, item) {
6663
+ if (item.setPoints == null || item.refinementPoints == null)
6664
+ return;
6665
+ if (item.setPoints === 0)
6666
+ return;
6667
+ if (item.refinementPoints === 0)
6668
+ return;
6344
6669
  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)],
6670
+ title: "",
6671
+ texts: [
6672
+ React__default["default"].createElement("span", null,
6673
+ "Splendor Stone Set Points: ",
6674
+ item.setPoints),
6675
+ React__default["default"].createElement("span", null,
6676
+ "Splendor Stone Refinement Points: ",
6677
+ item.refinementPoints),
6678
+ ],
6351
6679
  });
6352
6680
  }
6353
6681
 
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";
6682
+ var css_248z = "";
6384
6683
  styleInject(css_248z);
6385
6684
 
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
- }
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
- }
6430
- }
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: [],
6685
+ function JsonTooltip(props) {
6686
+ var tooltipProps = {
6687
+ title: props.title,
6688
+ grade: props.grade,
6689
+ icon: props.icon,
6690
+ mainInfos: JsonArrayToJsxArray(props.mainInfos),
6691
+ subtitle: props.subtitle,
6692
+ subInfoGroups: JsonSubInfoToJsxSubInfo(props.subInfoGroups),
6563
6693
  };
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));
6694
+ return React__default["default"].createElement(TooltipBase, __assign({}, tooltipProps));
6568
6695
  }
6569
- function AddStoreToggles(subInfoGroups, Stores, activeTab, setActiveTab) {
6570
- subInfoGroups.push({
6571
- title: "",
6572
- texts: [
6573
- React__default["default"].createElement(StoreToggleBar, { stores: Stores, activeTab: activeTab, setActiveTab: setActiveTab }),
6574
- ],
6696
+ function JsonSubInfoToJsxSubInfo(subInfoGroups) {
6697
+ if (subInfoGroups == undefined)
6698
+ return undefined;
6699
+ var result = [];
6700
+ subInfoGroups.forEach(function (subInfoGroup) {
6701
+ var jsxSubInfoGroup = {
6702
+ title: subInfoGroup.title,
6703
+ texts: JsonArrayToJsxArray(subInfoGroup.texts),
6704
+ };
6705
+ result.push(jsxSubInfoGroup);
6575
6706
  });
6707
+ return result;
6576
6708
  }
6577
- function AddStores(subInfoGroups, Stores, activeTab, client) {
6578
- subInfoGroups.push({
6579
- title: "",
6580
- texts: [
6581
- React__default["default"].createElement(NpcStores, { stores: Stores, activeTab: activeTab, client: client }),
6582
- ],
6709
+ function JsonArrayToJsxArray(stringArray) {
6710
+ if (stringArray == undefined)
6711
+ return undefined;
6712
+ var jsxArray = [];
6713
+ stringArray.forEach(function (mainInfo) {
6714
+ jsxArray.push(React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: mainInfo } }));
6583
6715
  });
6716
+ return jsxArray;
6584
6717
  }
6585
6718
 
6586
6719
  exports.GetCooldownString = GetCooldownString;
6587
6720
  exports.ItemTooltip = ItemTooltip;
6588
- exports.ItemTooltipWrapper = ItemTooltipWrapper;
6721
+ exports.ItemTooltipSettings = ItemTooltipSettings;
6589
6722
  exports.JsonTooltip = JsonTooltip;
6590
6723
  exports.NpcTooltip = NpcTooltip;
6724
+ exports.NpcTooltipSettings = NpcTooltipSettings;
6591
6725
  exports.SkillTooltip = SkillTooltip;
6592
- exports.SkillTooltipWrapper = SkillTooltipWrapper;
6726
+ exports.SkillTooltipSettings = SkillTooltipSettings;
6593
6727
  exports.TooltipBase = TooltipBase;
6728
+ exports.TooltipWrapper = TooltipWrapper;
6729
+ exports.TooltipWrapperSettings = TooltipWrapperSettings;
6594
6730
  //# sourceMappingURL=index.js.map