MWI TaskManager

sort all task in taskboard

// ==UserScript==
// @name         MWI TaskManager
// @namespace    http://tampermonkey.net/
// @version      0.22
// @description  sort all task in taskboard
// @author       shykai
// @match        https://www.milkywayidle.com/*
// @match        https://test.milkywayidle.com/*
// @icon         https://www.milkywayidle.com/favicon.svg
// @grant        GM_getValue
// @grant        GM_setValue
// ==/UserScript==

(function () {
    'use strict';

    //default config
    let globalConfig = {
        isBattleIcon: true,
        dungeonConfig: {
            "/actions/combat/chimerical_den": false,
            "/actions/combat/sinister_circus": false,
            "/actions/combat/enchanted_fortress": false,
            "/actions/combat/pirate_cove": false,
        }
    };

    const globalConfigName = "MWITaskManager_globalConfig";
    function saveConfig() {
        GM_setValue(globalConfigName, JSON.stringify(globalConfig));
    }

    const savedConfig = GM_getValue(globalConfigName, null);
    if (savedConfig) {
        let readConfig = JSON.parse(savedConfig);
        globalConfig.isBattleIcon = readConfig.isBattleIcon;
        for (let key in readConfig.dungeonConfig) {
            globalConfig.dungeonConfig[key] = readConfig.dungeonConfig[key];
        }
    }

    // split from actions_sprite.e6388cbc.svg
    const actionSVGText = '<?xml version="1.0" encoding="utf-8"?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <symbol fill="none" viewBox="0 0 100 100" id="chimerical_den" xmlns="http://www.w3.org/2000/svg"> <g clip-path="url(#aea)"> <path d="m14.554 35.23-8.92 8.92L16.9 50.254l6.573-6.104 1.409-4.695-10.329-4.225Z" fill="#2FC4A7" /> <path d="m14.554 35.23-8.92 8.92L16.9 50.254l6.573-6.104 1.409-4.695-10.329-4.225Z" fill="#fff" fill-opacity=".6" /> <path d="M63.38 10.347 42.723 8l10.798 11.268 9.86-8.92Z" fill="#2FC4A7" /> <path d="M63.38 10.347 42.723 8l10.798 11.268 9.86-8.92Z" fill="#fff" fill-opacity=".6" /> <path d="m80.751 32.413-5.164-13.145 18.31 12.206-13.146.94Z" fill="#2FC4A7" /> <path d="m80.751 32.413-5.164-13.145 18.31 12.206-13.146.94Z" fill="#fff" fill-opacity=".6" /> <path d="m65.258 44.15 9.39-8.45 4.695 3.286 7.511 2.817-10.328 6.573-11.268-4.226Z" fill="#2FC4A7" /> <path d="m65.258 44.15 9.39-8.45 4.695 3.286 7.511 2.817-10.328 6.573-11.268-4.226Z" fill="#fff" fill-opacity=".6" /> <path d="m30.516 34.291 7.512-6.573 15.963 1.409 6.103 4.225-9.39 11.737-15.023 2.348-5.165-13.146Z" fill="#2FC4A7" /> <path d="m30.516 34.291 7.512-6.573 15.963 1.409 6.103 4.225-9.39 11.737-15.023 2.348-5.165-13.146Z" fill="#fff" fill-opacity=".6" /> <path d="M28.639 15.981 42.722 8l10.798 8.92 2.347 12.207H36.15L28.64 15.98Z" fill="#898989" /> <path d="M28.639 15.981 42.722 8l10.798 8.92 2.347 12.207H36.15L28.64 15.98Z" fill="#fff" fill-opacity=".4" /> <path d="m30.516 34.291-7.98 4.225v5.634l-2.818 15.493-2.817 22.066 11.738-5.634 1.408-13.615 6.573-14.554-6.104-13.615Z" fill="#898989" /> <path d="m30.516 34.291-7.98 4.225v5.634l-2.818 15.493-2.817 22.066 11.738-5.634 1.408-13.615 6.573-14.554-6.104-13.615Z" fill="#fff" fill-opacity=".4" /> <path d="M39.437 29.127 28.638 15.98l-6.103 22.535 7.981-4.225 8.92-5.164Z" fill="#898989" /> <path d="M39.437 29.127 28.638 15.98l-6.103 22.535 7.981-4.225 8.92-5.164Z" fill="#fff" fill-opacity=".6" /> <path d="m63.38 10.347-9.859 6.573.47 12.207 16.431 11.737 4.226-4.695L63.38 10.347Z" fill="#898989" /> <path d="m63.38 10.347-9.859 6.573.47 12.207 16.431 11.737 4.226-4.695L63.38 10.347Z" fill="#fff" fill-opacity=".6" /> <path d="M16.432 47.437 5.634 44.15 0 77.014l16.901 4.695 4.226-21.596-4.695-12.676Z" fill="#898989" /> <path d="M16.432 47.437 5.634 44.15 0 77.014l16.901 4.695 4.226-21.596-4.695-12.676Z" fill="#fff" fill-opacity=".2" /> <path d="m68.075 82.178-.47-38.028 8.92 4.226 4.696 35.21-13.146-1.408Z" fill="#898989" /> <path d="m68.075 82.178-.47-38.028 8.92 4.226 4.696 35.21-13.146-1.408Z" fill="#fff" fill-opacity=".2" /> <path d="m75.587 19.268-7.042 3.286 6.103 13.615 4.695 2.817 1.408-6.573-5.164-13.145Z" fill="#898989" /> <path d="m75.587 19.268-7.042 3.286 6.103 13.615 4.695 2.817 1.408-6.573-5.164-13.145Z" fill="#fff" fill-opacity=".2" /> <path d="m49.765 44.15 12.207 13.146-4.226 9.859L43.662 53.54l-8.92 5.164-3.756 20.658-4.225-2.348 1.878-14.554 7.511-15.493 13.615-2.817Z" fill="#898989" /> <path d="m49.765 44.15 12.207 13.146-4.226 9.859L43.662 53.54l-8.92 5.164-3.756 20.658-4.225-2.348 1.878-14.554 7.511-15.493 13.615-2.817Z" fill="#fff" fill-opacity=".2" /> <path d="m22.535 44.15-6.103 3.287 4.695 12.676 1.408-15.963ZM60.094 33.352 49.765 44.15l12.207 13.146 6.103-1.878-.47-11.268 2.817-3.286-10.328-7.512ZM86.385 41.803l-9.86 6.573 4.696 35.21 9.39-1.877-4.226-39.906Z" fill="#898989" /> <path d="m68.075 55.418-6.103 1.878-4.225 9.859 1.877 15.962 8.451-.939v-26.76Z" fill="#898989" /> <path d="m68.075 55.418-6.103 1.878-4.225 9.859 1.877 15.962 8.451-.939v-26.76Z" fill="#000" fill-opacity=".2" /> <path d="m79.343 38.986 1.408-6.573 13.146-.939 4.225 17.84L100 76.545l-9.39 5.165-4.225-39.906-7.042-2.817Z" fill="#898989" /> <path d="m79.343 38.986 1.408-6.573 13.146-.939 4.225 17.84L100 76.545l-9.39 5.165-4.225-39.906-7.042-2.817Z" fill="#000" fill-opacity=".2" /> <path d="M69.101 16.752c.084 1.88-.63 3.5-1.263 3.7l2.593 6.56c1.068-.383 2.141-.145 3.241.883l-.002-.004c-.967-1.794-1.301-2.413-2.38-2.577 1.172-.4 1.431-1.393 2.658-1.709-.878-.082-1.5-.025-3.007.405.41-.616.707-.851 1.308-1.149-1.13.26-1.49.285-2.253 1.102.945-1.264 1.327-2.09 1.684-4.15-.934 1.533-1.065 1.344-2.199 2.19.687-1.427.637-1.872.585-2.676-.273.652-.7 1.175-.983 1.186.133-.797.316-1.99.018-3.76Z" fill="#2FC4A7" /> <path d="M69.101 16.752c.084 1.88-.63 3.5-1.263 3.7l2.593 6.56c1.068-.383 2.141-.145 3.241.883l-.002-.004c-.967-1.794-1.301-2.413-2.38-2.577 1.172-.4 1.431-1.393 2.658-1.709-.878-.082-1.5-.025-3.007.405.41-.616.707-.851 1.308-1.149-1.13.26-1.49.285-2.253 1.102.945-1.264 1.327-2.09 1.684-4.15-.934 1.533-1.065 1.344-2.199 2.19.687-1.427.637-1.872.585-2.676-.273.652-.7 1.175-.983 1.186.133-.797.316-1.99.018-3.76Z" fill="#000" fill-opacity=".2" /> <path d="M46.386 24.963c-1.368 1.02-2.704 3.187-2.455 4.13h-4.72c-.545-1.037-1.439-2.29-3.113-2.967.854-.035 2.563-.104 3.113.824-.44-1.767-.744-1.83-1.278-3.617.598 1.094 1.78 1.066 2.406 3.287.178-.905.161-1.432 0-2.393.512 1.627.718 2.11.614 3.594.304-1.99.649-2.983 1.872-4.686-.5 2.137-.287 2.194-.183 4.178.578-1.75.92-1.954 1.516-2.368-.289.747-.392 1.617-.227 1.991.477-.652 1.03-1.295 2.455-1.973Z" fill="#2FC4A7" /> <path d="M46.386 24.963c-1.368 1.02-2.704 3.187-2.455 4.13h-4.72c-.545-1.037-1.439-2.29-3.113-2.967.854-.035 2.563-.104 3.113.824-.44-1.767-.744-1.83-1.278-3.617.598 1.094 1.78 1.066 2.406 3.287.178-.905.161-1.432 0-2.393.512 1.627.718 2.11.614 3.594.304-1.99.649-2.983 1.872-4.686-.5 2.137-.287 2.194-.183 4.178.578-1.75.92-1.954 1.516-2.368-.289.747-.392 1.617-.227 1.991.477-.652 1.03-1.295 2.455-1.973Z" fill="#000" fill-opacity=".4" /> <path d="M45 80H30.5l4-21.5 9-5L58 67l2 16-15-3Z" fill="#898989" /> <path d="M45 80H30.5l4-21.5 9-5L58 67l2 16-15-3Z" fill="#000" fill-opacity=".6" /> <path d="M46.233 80.352 34 80l3.964-15.085L44.33 61l10.255 9.61L56 82l-9.767-1.648Z" fill="#141414" /> <path d="M26.5 36.5C28 45 39 73 58.5 73c15.824 0 22.5-6 30-14.5M21 59c.5 7 4.203 20.5 17.5 20.5 13.5 0 26-18.5 29.5-28" stroke="#2FC4A7" /> <path d="M26.5 36.5C28 45 39 73 58.5 73c15.824 0 22.5-6 30-14.5M21 59c.5 7 4.203 20.5 17.5 20.5 13.5 0 26-18.5 29.5-28" stroke="#000" stroke-opacity=".4" /> <path d="M74 73c-.247-1.188.236-2.431.502-2.692.47.373 1.675 1.192 1.998 2.192.407 1.26-.337 1.922-.5 2.5-.722-.315-1.752-.812-2-2Z" fill="#2FC4A7" /> <path d="M74 73c-.247-1.188.236-2.431.502-2.692.47.373 1.675 1.192 1.998 2.192.407 1.26-.337 1.922-.5 2.5-.722-.315-1.752-.812-2-2Z" fill="#000" fill-opacity=".4" /> <path d="M71.28 68.543c.586.823.554 2.026.404 2.354-.527-.078-1.832-.17-2.426-.81-.75-.807-.307-1.67-.346-2.202.728-.083 1.78-.165 2.368.658Z" fill="#2FC4A7" /> <path d="M71.28 68.543c.586.823.554 2.026.404 2.354-.527-.078-1.832-.17-2.426-.81-.75-.807-.307-1.67-.346-2.202.728-.083 1.78-.165 2.368.658Z" fill="#000" fill-opacity=".4" /> <path d="M46.016 81.03c-.402 1.146-1.459 1.96-1.822 2.046-.21-.563-.817-1.887-.576-2.91.303-1.29 1.443-1.755 1.882-2.166.455.643.919 1.886.516 3.03Z" fill="#2FC4A7" /> <path d="M46.016 81.03c-.402 1.146-1.459 1.96-1.822 2.046-.21-.563-.817-1.887-.576-2.91.303-1.29 1.443-1.755 1.882-2.166.455.643.919 1.886.516 3.03Z" fill="#000" fill-opacity=".4" /> <path d="M50.587 77.86c.093 1.007-.54 2.03-.835 2.238-.416-.332-1.498-1.067-1.69-1.92-.241-1.073.575-1.598.809-2.076.67.293 1.622.752 1.716 1.758Z" fill="#2FC4A7" /> <path d="M50.587 77.86c.093 1.007-.54 2.03-.835 2.238-.416-.332-1.498-1.067-1.69-1.92-.241-1.073.575-1.598.809-2.076.67.293 1.622.752 1.716 1.758Z" fill="#000" fill-opacity=".4" /> <path d="m68 79-14 3 6.5 8 13-1.078L78 83l-10-4Z" fill="#2FC4A7" /> <path d="m68 79-14 3 6.5 8 13-1.078L78 83l-10-4Z" fill="#fff" fill-opacity=".6" /> <path d="m59.5 93-.5-4.5 18-2-3 4.5-14.5 2Z" fill="#898989" /> <path d="m59.5 93-.5-4.5 18-2-3 4.5-14.5 2Z" fill="#fff" fill-opacity=".2" /> <path d="M51.5 87.5 54 82l7 6.32L59.5 93l-8-5.5Z" fill="#898989" /> <path d="M51.5 87.5 54 82l7 6.32L59.5 93l-8-5.5Z" fill="#fff" fill-opacity=".4" /> <path d="m74 91-1-4 5-4 2 5.053L74 91Z" fill="#898989" /> <path d="M37.019 73.47c-2.247 2.135-3.95 6.66-3.519 8.53h-14c-.656-3.208-2.787-7.926-5.753-9.53 4.05.347 5.429.765 7.229 4.057-.752-3.5.539-5.353-.414-8.89 1.178 2.165 1.827 3.832 2.93 8.23.502-1.795.529-2.84.292-4.743.926 3.221 1.318 4.18.909 7.119.91-3.944 1.788-5.914 4.68-9.298-1.357 4.24-.897 4.35-.911 8.282 1.224-1.895 1.409-3.783 2.767-4.608-.726 1.482-.21 3.112.109 3.853 1.126-1.294 3.487-2.951 5.68-3.002Z" fill="#2FC4A7" /> <path d="M37.019 73.47c-2.247 2.135-3.95 6.66-3.519 8.53h-14c-.656-3.208-2.787-7.926-5.753-9.53 4.05.347 5.429.765 7.229 4.057-.752-3.5.539-5.353-.414-8.89 1.178 2.165 1.827 3.832 2.93 8.23.502-1.795.529-2.84.292-4.743.926 3.221 1.318 4.18.909 7.119.91-3.944 1.788-5.914 4.68-9.298-1.357 4.24-.897 4.35-.911 8.282 1.224-1.895 1.409-3.783 2.767-4.608-.726 1.482-.21 3.112.109 3.853 1.126-1.294 3.487-2.951 5.68-3.002Z" fill="#000" fill-opacity=".6" /> <path d="M8.522 77.258C9.86 79.598 10.626 83.625 10 85h11.5c0-2.538-.169-4.418 2.549-7.443-1.841.817-3.11.91-4.67 4.12-.319-1.579-.238-2.423.197-3.88-1.262 2.318-1.754 2.974-1.647 5.444-.506-3.415-1.184-5.242-3.738-8.768.925 3.778.451 3.736.06 6.89-1.033-1.864-1.024-3.428-2.3-4.473.574 1.392-.113 2.552-.508 3.055-.997-1.355-1.455-1.452-2.921-2.687Z" fill="#2FC4A7" /> <path d="M8.522 77.258C9.86 79.598 10.626 83.625 10 85h11.5c0-2.538-.169-4.418 2.549-7.443-1.841.817-3.11.91-4.67 4.12-.319-1.579-.238-2.423.197-3.88-1.262 2.318-1.754 2.974-1.647 5.444-.506-3.415-1.184-5.242-3.738-8.768.925 3.778.451 3.736.06 6.89-1.033-1.864-1.024-3.428-2.3-4.473.574 1.392-.113 2.552-.508 3.055-.997-1.355-1.455-1.452-2.921-2.687Z" fill="#000" fill-opacity=".4" /> </g> <defs> <clipPath id="aea"> <path fill="#fff" d="M0 0h100v100H0z" /> </clipPath> </defs> </symbol> <symbol fill="none" viewBox="0 0 100 100" id="sinister_circus" xmlns="http://www.w3.org/2000/svg"> <g clip-path="url(#ara)"> <path d="M0 91.722V68.39L100 68v23.5c-5.74 1.296-24 4.111-48.889 4.111-24.889 0-44.444-2.592-51.111-3.889Z" fill="#D0333D" /> <path d="M0 91.722V68.39L100 68v23.5c-5.74 1.296-24 4.111-48.889 4.111-24.889 0-44.444-2.592-51.111-3.889Z" fill="#000" fill-opacity=".2" /> <path d="M62.222 70.611H36.667V95.39c1.852 0 7.11.222 13.333.222 6.222 0 10.37-.037 12.222-.222V70.61Z" fill="#D0333D" /> <path d="M62.222 70.611H36.667V95.39c1.852 0 7.11.222 13.333.222 6.222 0 10.37-.037 12.222-.222V70.61Z" fill="#000" fill-opacity=".8" /> <path d="M10 93.167V68.389l17.778.556v25.888c-7.28-.448-11.18-.801-17.778-1.666Z" fill="#7445B8" /> <path d="M10 93.167V68.389l17.778.556v25.888c-7.28-.448-11.18-.801-17.778-1.666Z" fill="#fff" fill-opacity=".6" /> <path d="M90 93.167V68.945l-17.778.536v25.464c7.036-.447 10.947-.789 17.778-1.778Z" fill="#7445B8" /> <path d="M90 93.167V68.945l-17.778.536v25.464c7.036-.447 10.947-.789 17.778-1.778Z" fill="#fff" fill-opacity=".2" /> <path d="M56.667 5.056c-4 .888-6.482-.741-7.223-1.667v6.667c.926.555 3.89 1.11 7.778-.556 4.708-2.018 6.049-2.353 12.222-1.667 5 .556 7.593-2.037 8.334-3.889-1.482.926-5.223 2.445-8.334 1.112-3.889-1.667-7.777-1.112-12.777 0Z" fill="#A272E4" /> <path d="M49.444 22.278V3.388" stroke="#898989" stroke-width="1.111" /> <path d="M49.444 22.278V3.388" stroke="#fff" stroke-opacity=".6" stroke-width="1.111" /> <path d="M49.444 69.643C38.778 69.643 12.963 69.214 0 69v3.857c.185 1.072 1.111 3.857 3.333 3.857 3.89 0 6.111-4.5 6.667-6.428.556 2.143 4.444 7.071 8.889 7.071 4.444 0 8.518-4.286 9.444-6.428C29.444 73.286 33.556 78 38.89 78c5.333 0 9.444-4.071 10.555-6.429C50.556 74.143 55.667 78 60.556 78S70 73.5 71.11 70.929c1.296 2.571 5.111 6.428 10 6.428s8.148-4.5 8.889-7.071c.556 2.143 4 6.428 6.667 6.428 2.222 0 3.333-1.928 3.333-3.214V69c-11.111.214-39.889.643-50.556.643Z" fill="#7445B8" /> <path d="M49.444 69.643C38.778 69.643 12.963 69.214 0 69v3.857c.185 1.072 1.111 3.857 3.333 3.857 3.89 0 6.111-4.5 6.667-6.428.556 2.143 4.444 7.071 8.889 7.071 4.444 0 8.518-4.286 9.444-6.428C29.444 73.286 33.556 78 38.89 78c5.333 0 9.444-4.071 10.555-6.429C50.556 74.143 55.667 78 60.556 78S70 73.5 71.11 70.929c1.296 2.571 5.111 6.428 10 6.428s8.148-4.5 8.889-7.071c.556 2.143 4 6.428 6.667 6.428 2.222 0 3.333-1.928 3.333-3.214V69c-11.111.214-39.889.643-50.556.643Z" fill="#fff" fill-opacity=".4" /> <path d="M31.111 46.167C43.333 34.5 47.222 25.056 49.444 17.833c2.223 7.223 5.034 17.28 20 30 11.112 9.445 23.334 16.111 30.556 20-10.74.37-35.889 1.112-48.333 1.112-12.445 0-39.63-.741-51.667-1.112 4.444-2.222 17.725-8.889 31.111-21.666Z" fill="#D0333D" /> <path d="M45.556 47.278c1.777-10.667 3.333-21.667 3.889-29.445.555 7.778 1.888 22.778 2.777 29.445.89 6.666 4.074 17.222 5.556 21.667H40.556c.926-2.778 3.222-11 5-21.667Z" fill="#7445B8" /> <path d="M45.556 47.278c1.777-10.667 3.333-21.667 3.889-29.445.555 7.778 1.888 22.778 2.777 29.445.89 6.666 4.074 17.222 5.556 21.667H40.556c.926-2.778 3.222-11 5-21.667Z" fill="#fff" fill-opacity=".6" /> <path d="M32.222 49.5c8.89-11.111 15.556-24.444 17.223-31.667-1.112 7.778-6.445 25.111-10 32.223-3.556 7.11-7.056 12.889-10.945 18.444h-18c3.889-2.222 12.833-7.889 21.722-19Z" fill="#7445B8" /> <path d="M32.222 49.5c8.89-11.111 15.556-24.444 17.223-31.667-1.112 7.778-6.445 25.111-10 32.223-3.556 7.11-7.056 12.889-10.945 18.444h-18c3.889-2.222 12.833-7.889 21.722-19Z" fill="#fff" fill-opacity=".8" /> <path d="M66.603 49.848c-9.143-11.233-15.58-24.237-17.159-32.015 1.143 7.864 6.073 25.387 9.73 32.577C62.833 57.599 67.5 63.383 71.5 69l18.5-.617c-4-2.247-14.254-7.302-23.397-18.535Z" fill="#7445B8" /> <path d="M66.603 49.848c-9.143-11.233-15.58-24.237-17.159-32.015 1.143 7.864 6.073 25.387 9.73 32.577C62.833 57.599 67.5 63.383 71.5 69l18.5-.617c-4-2.247-14.254-7.302-23.397-18.535Z" fill="#fff" fill-opacity=".4" /> <path d="M49.444 68.945c-10.666 0-36.481-.926-49.444-1.112v3.334c.185.926 1.111 3.333 3.333 3.333 3.89 0 6.111-3.889 6.667-5.555.556 1.851 4.444 6.11 8.889 6.11 4.444 0 8.518-3.703 9.444-5.555 1.111 2.037 5.223 6.111 10.556 6.111 5.333 0 9.444-3.518 10.555-5.555 1.112 2.222 6.223 5.555 11.112 5.555S70 71.722 71.11 69.5c1.296 2.222 5.111 5.556 10 5.556s8.148-3.89 8.889-6.111c.556 1.851 4 5.555 6.667 5.555 2.222 0 3.333-1.667 3.333-2.778v-3.889c-11.111.186-39.889 1.112-50.556 1.112Z" fill="#D0333D" /> <path d="M49.444 68.945c-10.666 0-36.481-.926-49.444-1.112v3.334c.185.926 1.111 3.333 3.333 3.333 3.89 0 6.111-3.889 6.667-5.555.556 1.851 4.444 6.11 8.889 6.11 4.444 0 8.518-3.703 9.444-5.555 1.111 2.037 5.223 6.111 10.556 6.111 5.333 0 9.444-3.518 10.555-5.555 1.112 2.222 6.223 5.555 11.112 5.555S70 71.722 71.11 69.5c1.296 2.222 5.111 5.556 10 5.556s8.148-3.89 8.889-6.111c.556 1.851 4 5.555 6.667 5.555 2.222 0 3.333-1.667 3.333-2.778v-3.889c-11.111.186-39.889 1.112-50.556 1.112Z" fill="#000" fill-opacity=".2" /> </g> <defs> <clipPath id="ara"> <path fill="#fff" d="M0 0h100v100H0z" /> </clipPath> </defs> </symbol> <symbol fill="none" viewBox="0 0 100 100" id="enchanted_fortress" xmlns="http://www.w3.org/2000/svg"> <path d="M8 71V44h80v27H8Z" fill="#898989" /> <path d="M8 71V44h80v27H8Z" fill="#fff" fill-opacity=".4" /> <path d="M8 71V44h26v27H8Z" fill="#898989" /> <path d="M8 71V44h26v27H8Z" fill="#fff" fill-opacity=".2" /> <path d="M88 44v27H66V44h22Z" fill="#898989" /> <path d="M88 44v27H66V44h22Z" fill="#fff" fill-opacity=".2" /> <path d="M66 44v24l18.5.912V50.5L66 44ZM66 44H34V23h32v21Z" fill="#898989" /> <path d="M66 44H34V23h32v21Z" fill="#fff" fill-opacity=".4" /> <path d="M66 23H34l32 11V23Z" fill="#898989" /> <path d="M66 23H34l32 11V23Z" fill="#fff" fill-opacity=".2" /> <path d="M34 23v-8h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v8H34Z" fill="#898989" /> <path d="M34 23v-8h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v8H34Z" fill="#fff" fill-opacity=".6" /> <path d="M50 15V4" stroke="#898989" /> <path d="M50 15V4" stroke="#fff" stroke-opacity=".6" /> <path d="M0 48v-8h4v3h3v-3h4v3h3v-3h4v8l-2 3H2l-2-3Z" fill="#7445B8" /> <path d="M0 48v-8h4v3h3v-3h4v3h3v-3h4v8l-2 3H2l-2-3Z" fill="#fff" fill-opacity=".2" /> <path d="m2 51-2-3h18l-2 3H2ZM30 58v-8h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v8H30Z" fill="#7445B8" /> <path d="M30 58v-8h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v3h3v-3h4v8H30Z" fill="#fff" fill-opacity=".2" /> <path d="M2 90V51h14v39H2Z" fill="#7445B8" /> <path fill="#7445B8" d="M8 88h3v2H8z" /> <path fill="#fff" fill-opacity=".2" d="M8 88h3v2H8z" /> <path fill="#7445B8" d="M9 78h4v3H9z" /> <path fill="#fff" fill-opacity=".2" d="M9 78h4v3H9z" /> <path fill="#7445B8" d="M4 73h4v2H4z" /> <path fill="#fff" fill-opacity=".2" d="M4 73h4v2H4z" /> <path fill="#7445B8" d="M12 62h3v2h-3z" /> <path fill="#fff" fill-opacity=".2" d="M12 62h3v2h-3z" /> <path d="M84 90V51h14v39H84Z" fill="#7445B8" /> <path fill="#898989" d="M90 56h3v5h-3z" /> <path fill="#000" fill-opacity=".6" d="M90 56h3v5h-3z" /> <path d="M16 88V64h14v24H16ZM69 88V64h15v24H69Z" fill="#7445B8" /> <path d="M69 88V64h15v24H69Z" fill="#000" fill-opacity=".2" /> <path d="M69 64v24h15V69.588L69 64Z" fill="#7445B8" /> <path d="M69 64v24h15V69.588L69 64Z" fill="#000" fill-opacity=".4" /> <path d="M84 76v14h14v-8.412L84 76Z" fill="#7445B8" /> <path d="M84 76v14h14v-8.412L84 76Z" fill="#000" fill-opacity=".2" /> <path d="M30 92V58h39v34H30Z" fill="#7445B8" /> <path d="M30 92V58h39v34H30Z" fill="#fff" fill-opacity=".2" /> <path d="M41.389 92V75.815C41.666 73.543 43.714 69 49.694 69c5.98 0 8.03 4.543 8.306 6.815V92H41.389Z" fill="#898989" /> <path d="M41.389 92V75.815C41.666 73.543 43.714 69 49.694 69c5.98 0 8.03 4.543 8.306 6.815V92H41.389Z" fill="#000" fill-opacity=".8" /> <path fill="#898989" d="M7 56h3v5H7z" /> <path fill="#000" fill-opacity=".6" d="M7 56h3v5H7z" /> <path fill="#898989" d="M7 67h3v5H7z" /> <path fill="#000" fill-opacity=".6" d="M7 67h3v5H7z" /> <path fill="#898989" d="M37 56h3v5h-3z" /> <path fill="#000" fill-opacity=".6" d="M37 56h3v5h-3z" /> <path fill="#898989" d="M48 56h3v5h-3z" /> <path fill="#000" fill-opacity=".6" d="M48 56h3v5h-3z" /> <path fill="#898989" d="M59 56h3v5h-3z" /> <path fill="#000" fill-opacity=".6" d="M59 56h3v5h-3z" /> <path fill="#898989" d="M39 26h3v5h-3z" /> <path fill="#000" fill-opacity=".2" d="M39 26h3v5h-3z" /> <path fill="#898989" d="M48 26h3v5h-3z" /> <path fill="#000" fill-opacity=".2" d="M48 26h3v5h-3z" /> <path fill="#898989" d="M57 26h3v5h-3z" /> <path fill="#000" fill-opacity=".4" d="M57 26h3v5h-3z" /> <path d="M16 51H2l14 5.5V51Z" fill="#7445B8" /> <path d="M16 51H2l14 5.5V51Z" fill="#000" fill-opacity=".2" /> <path d="M16 64.206V88h14V69.794l-14-5.588Z" fill="#7445B8" /> <path d="M16 64.206V88h14V69.794l-14-5.588Z" fill="#000" fill-opacity=".2" /> <path d="M51 26h-3v2l3 1v-3Z" fill="#898989" /> <path d="M51 26h-3v2l3 1v-3Z" fill="#000" fill-opacity=".4" /> <path d="M82 48v-8h4v3h3v-3h4v3h3v-3h4v8l-2 3H84l-2-3Z" fill="#7445B8" /> <path d="M82 48v-8h4v3h3v-3h4v3h3v-3h4v8l-2 3H84l-2-3Z" fill="#fff" fill-opacity=".2" /> <path d="m84 51-2-3h18l-2 3H84ZM98 51H84l14 5.5V51Z" fill="#7445B8" /> <path d="M98 51H84l14 5.5V51Z" fill="#000" fill-opacity=".2" /> <path fill="#898989" d="M39 37h4v3h-4z" /> <path fill="#fff" fill-opacity=".6" d="M39 37h4v3h-4z" /> <path fill="#898989" d="M44 44h5v2h-5z" /> <path fill="#fff" fill-opacity=".6" d="M44 44h5v2h-5z" /> <path fill="#898989" d="M50 34h3v2h-3z" /> <path fill="#fff" fill-opacity=".6" d="M50 34h3v2h-3z" /> <path fill="#898989" d="M58 40h4v2h-4z" /> <path fill="#fff" fill-opacity=".6" d="M58 40h4v2h-4z" /> <path fill="#7445B8" d="M30 65h4v3h-4z" /> <path fill="#fff" fill-opacity=".4" d="M30 65h4v3h-4z" /> <path fill="#7445B8" d="M37 72h3v2h-3z" /> <path fill="#fff" fill-opacity=".4" d="M37 72h3v2h-3z" /> <path fill="#7445B8" d="M63 90h3v2h-3z" /> <path fill="#fff" fill-opacity=".4" d="M63 90h3v2h-3z" /> <path fill="#7445B8" d="M42 63h4v2h-4z" /> <path fill="#fff" fill-opacity=".4" d="M42 63h4v2h-4z" /> <path fill="#7445B8" d="M64 80h4v3h-4z" /> <path fill="#fff" fill-opacity=".4" d="M64 80h4v3h-4z" /> <path fill="#7445B8" d="M60 75h3v2h-3z" /> <path fill="#fff" fill-opacity=".4" d="M60 75h3v2h-3z" /> <path fill="#7445B8" d="M33 82h4v4h-4z" /> <path fill="#fff" fill-opacity=".4" d="M33 82h4v4h-4z" /> <path fill="#7445B8" d="M64 67h4v2h-4z" /> <path fill="#fff" fill-opacity=".4" d="M64 67h4v2h-4z" /> <path fill="#7445B8" d="M90 67h4v2h-4z" /> <path fill="#fff" fill-opacity=".2" d="M90 67h4v2h-4z" /> <path d="M11.143 33c-.857 0-1.714-.667-2.143-1v2c.429.333 1.286 1 2.143 1 .857 0 1.286-1 2.571-1 1.286 0 1.715 1 2.572 1 .685 0 1.428-.667 1.714-1l-.429-.5L18 32c-.286.333-.857 1-1.714 1S15 32 13.714 32c-1.285 0-1.714 1-2.571 1Z" fill="#FAA21E" /> <path d="M11.059 33c-.824 0-1.647-.667-2.059-1v2c.412.333 1.235 1 2.059 1v-2ZM16 33c-.823 0-1.235-1-2.47-1h-.014l.013 2c1.236 0 1.648 1 2.471 1v-2Z" fill="#C57A09" /> <path d="M93.143 33c-.857 0-1.714-.667-2.143-1v2c.429.333 1.286 1 2.143 1 .857 0 1.286-1 2.571-1 1.286 0 1.715 1 2.572 1 .685 0 1.428-.667 1.714-1l-.429-.5L100 32c-.286.333-.857 1-1.714 1S97 32 95.714 32c-1.285 0-1.714 1-2.571 1Z" fill="#FAA21E" /> <path d="M93.059 33c-.824 0-1.647-.667-2.059-1v2c.412.333 1.235 1 2.059 1v-2ZM98 33c-.823 0-1.235-1-2.47-1h-.014l.013 2c1.236 0 1.648 1 2.471 1v-2Z" fill="#C57A09" /> <path d="M9 40v-8" stroke="#898989" /> <path d="M9 40v-8" stroke="#fff" stroke-opacity=".6" /> <path d="M53 5c-1 0-2-.667-2.5-1v2c.5.333 1.5 1 2.5 1s1.5-1 3-1 2 1 3 1c.8 0 1.667-.667 2-1l-.5-.5L61 4c-.333.333-1 1-2 1s-1.5-1-3-1-2 1-3 1Z" fill="#FAA21E" /> <path d="M53 5c-1 0-2-.667-2.5-1v2c.5.333 1.5 1 2.5 1V5ZM59 5c-1 0-1.5-1-3-1h-.016L56 6c1.5 0 2 1 3 1V5Z" fill="#C57A09" /> <path d="M91 40v-8" stroke="#898989" /> <path d="M91 40v-8" stroke="#fff" stroke-opacity=".6" /> <path fill="#7445B8" d="M85 53h3v3h-3z" /> <path fill="#fff" fill-opacity=".2" d="M85 53h3v3h-3z" /> <path fill="#7445B8" d="M93 73h3v2h-3z" /> <path fill="#fff" fill-opacity=".2" d="M93 73h3v2h-3z" /> <path fill="#7445B8" d="M88 85h4v3h-4z" /> </symbol> <symbol fill="none" viewBox="0 0 100 100" id="pirate_cove" xmlns="http://www.w3.org/2000/svg"> <path d="M100 76c0 11.874-22.386 21.5-50 21.5S0 87.874 0 76c0-5.878 9-20.5 9-20.5h41c13.627 0 40 1 40 1s10 13.486 10 19.5Z" fill="#FAA21E" /> <path d="M100 76c0 11.874-22.386 21.5-50 21.5S0 87.874 0 76c0-5.878 9-20.5 9-20.5h41c13.627 0 40 1 40 1s10 13.486 10 19.5Z" fill="#fff" fill-opacity=".4" /> <path d="M4.5 32.5 1.5 70c10-8.5 26.412-14 49.912-14 22 0 37.5 7 47 14.5l-2.913-38-2.5 1v4L90.5 39v-4L88 36v4l-3 .5v-4l-2.5.5v4.5L80 42v-4l-2.5.5v4l-3 .5v-4l-23.087-1.5-22.912 2V43l-3-.5V39l-3-.5V42l-2.5-.5V38l-3-.5V41l-3.088-1v-4L11 35v4l-3.5-1.5v-4l-3-1Z" fill="#898989" /> <path d="M0 75.803C0 89.721 22.353 92.5 49.927 92.5c25.167 0 49.5-3.697 50-16-.5 1.318-1.222 3.5-3.5 3.5-2.996 0-4.062-7.428-7.557-7.428-2.496 0-3.495 4.11-7.49 4.11-5.491 0-9.47-9.182-20.453-9.182-9.992 0-18.512 15-26.5 15-7.988 0-10.462-6.35-13.458-6.35-1.997 0-1.997 3.168-5.492 3.168S8.987 68.54 5.991 68.54C3.595 68.54 1 73.167 0 75.803Z" fill="#1D8CE0" /> <path d="M0 75.803C0 89.721 22.353 92.5 49.927 92.5c25.167 0 49.5-3.697 50-16-.5 1.318-1.222 3.5-3.5 3.5-2.996 0-4.062-7.428-7.557-7.428-2.496 0-3.495 4.11-7.49 4.11-5.491 0-9.47-9.182-20.453-9.182-9.992 0-18.512 15-26.5 15-7.988 0-10.462-6.35-13.458-6.35-1.997 0-1.997 3.168-5.492 3.168S8.987 68.54 5.991 68.54C3.595 68.54 1 73.167 0 75.803Z" fill="#fff" fill-opacity=".95" /> <path d="M0 76.177C0 87.953 22.386 97.5 50 97.5c25.204 0 45.98-7.957 49.427-18.3-.403.839-1.575 1.8-3 1.8-2.574 0-4.5-5.5-7.5-5.5s-2.725 2.382-7.427 2.382c-7.018 0-9.573-5.882-20.573-5.882-10.007 0-18 12-26 12s-9.073-5-14-5c-2.514 0-2.768 1.441-5.427 1.441C12 80.441 8.427 72 5.427 72 3.027 72 1 75.04 0 76.177Z" fill="#1D8CE0" /> <path d="M0 76.177C0 87.953 22.386 97.5 50 97.5c25.204 0 45.98-7.957 49.427-18.3-.403.839-1.575 1.8-3 1.8-2.574 0-4.5-5.5-7.5-5.5s-2.725 2.382-7.427 2.382c-7.018 0-9.573-5.882-20.573-5.882-10.007 0-18 12-26 12s-9.073-5-14-5c-2.514 0-2.768 1.441-5.427 1.441C12 80.441 8.427 72 5.427 72 3.027 72 1 75.04 0 76.177Z" fill="#000" fill-opacity=".4" /> <path d="m81.23 71 2.183 9.178-3.637 1.004-3.636-1.004 1.454-6.118L81.231 71Z" fill="#898989" /> <path d="m81.23 71 2.183 9.178-3.637 1.004-3.636-1.004 1.454-6.118L81.231 71Z" fill="#fff" fill-opacity=".4" /> <path d="m70.322 63.238 1.454 4.079-2.73 1.138-1.633-1.138.727-3.06 2.182-1.02Z" fill="#898989" /> <path d="m70.322 63.238 1.454 4.079-2.73 1.138-1.633-1.138.727-3.06 2.182-1.02Z" fill="#fff" fill-opacity=".4" /> <path d="M77.058 74.06 81.23 71l-3.636 6.546 2.182 3.636-4.096-1.004 1.378-6.118Z" fill="#898989" /> <path d="M77.058 74.06 81.23 71l-3.636 6.546 2.182 3.636-4.096-1.004 1.378-6.118Z" fill="#fff" fill-opacity=".2" /> <path d="m68.101 64.257 2.067-1.02-1.208 2.22v2.998l-1.548-1.138.69-3.06Z" fill="#898989" /> <path d="m68.101 64.257 2.067-1.02-1.208 2.22v2.998l-1.548-1.138.69-3.06Z" fill="#fff" fill-opacity=".2" /> <path d="M50.385 56.224c-3.746 0-9.171 2.146-10.537 2.927L36.92 43.344h26.343l-.5 15.807c-1.756-.586-8.632-2.927-12.379-2.927Z" fill="#898989" /> <path d="M50.385 56.224c-3.746 0-9.171 2.146-10.537 2.927L36.92 43.344h26.343l-.5 15.807c-1.756-.586-8.632-2.927-12.379-2.927Z" fill="#000" fill-opacity=".6" /> <path d="m39.262 61.546 1.756-2.98-1.756-12.454 2.927 6.014 1.757-4.098 2.341 2.342 1.756-3.513 2.927 3.513 2.342-4.098 1.756 3.512 3.513-2.342 1.17 5.27 2.928-6.6-1.757 12.453 3.013 1.171 2.927-1.17 3.513-15.807 7.525-7.823v-14.37l-6.524-7.45-5.201-6.653L47.29 3.536l-15.054 7.025-5.87 8.196-2.927 13.465 8.797 10.697L33.5 57.5l5.762 4.046Z" fill="#898989" /> <path d="m39.262 61.546 1.756-2.98-1.756-12.454 2.927 6.014 1.757-4.098 2.341 2.342 1.756-3.513 2.927 3.513 2.342-4.098 1.756 3.512 3.513-2.342 1.17 5.27 2.928-6.6-1.757 12.453 3.013 1.171 2.927-1.17 3.513-15.807 7.525-7.823v-14.37l-6.524-7.45-5.201-6.653L47.29 3.536l-15.054 7.025-5.87 8.196-2.927 13.465 8.797 10.697L33.5 57.5l5.762 4.046Z" fill="#fff" fill-opacity=".4" /> <path d="m32.22 43.345 2.928-5.27 4.098 8.197-7.025-2.927Z" fill="#898989" /> <path d="m32.22 43.345 2.928-5.27 4.098 8.197-7.025-2.927Z" fill="#fff" fill-opacity=".2" /> <path d="m67.346 44.515 2.927-7.61H61.49l5.855 7.61Z" fill="#898989" /> <path d="m67.346 44.515 2.927-7.61H61.49l5.855 7.61Z" fill="#fff" fill-opacity=".2" /> <path d="m70.375 42.76-2.927 1.755-.586 14.05 3.513-15.806Z" fill="#898989" /> <path d="m70.375 42.76-2.927 1.755-.586 14.05 3.513-15.806Z" fill="#000" fill-opacity=".2" /> <path d="m49.784 19.928-.586 4.098 2.927.586 6.44-3.513-1.171-2.927-3.512-1.756-4.098 3.512Z" fill="#898989" /> <path d="m49.784 19.928-.586 4.098 2.927.586 6.44-3.513-1.171-2.927-3.512-1.756-4.098 3.512Z" fill="#fff" fill-opacity=".2" /> <path d="m39.246 46.272 3.512-1.757 1.171 3.513 1.756-3.513 2.342 2.342 2.927-2.342 2.342 1.757 3.512-2.928 1.757 4.098v-2.341l4.097 1.17-2.927 6.44-1.17-5.269-3.513 2.342-1.756-3.512-2.342 4.097-2.927-3.512-1.756 3.512-2.342-2.341-1.756 4.098-2.927-5.854Z" fill="#FEFEFE" /> <path d="m53.881 32.807-1.756-2.342v-5.854l5.854-3.512 2.342 4.098-6.44 7.61ZM39.831 12.903l-7.61-2.341 15.22-7.025-7.61 9.366Z" fill="#898989" /> <path d="m39.831 12.903-7.61-2.341 15.22-7.025-7.61 9.366Z" fill="#fff" fill-opacity=".95" /> <path d="m47.442 3.537-7.61 9.366 7.61-.585 7.025-2.927 4.098 1.17h4.097l2.928-1.17.585-2.927-18.733-2.928Z" fill="#898989" /> <path d="m47.442 3.537-7.61 9.366 7.61-.585 7.025-2.927 4.098 1.17h4.097l2.928-1.17.585-2.927-18.733-2.928Z" fill="#fff" fill-opacity=".95" /> <path d="m47.442 3.537-7.61 9.366 7.61-.585 7.025-2.927-7.025-5.854Z" fill="#898989" /> <path d="m47.442 3.537-7.61 9.366 7.61-.585 7.025-2.927-7.025-5.854Z" fill="#fff" fill-opacity=".8" /> <path d="m41.018 27.539-7.025-2.342-1.756 4.683 2.927 8.196 7.61-1.17 4.684-2.928-6.44-6.44Z" fill="#546DDB" /> <path d="m41.018 27.539-7.025-2.342-1.756 4.683 2.927 8.196 7.61-1.17 4.684-2.928-6.44-6.44Z" fill="#000" fill-opacity=".8" /> <path d="m65.02 27.539-8.781 6.44 5.269 2.926h8.781l1.756-7.025-1.756-4.683-5.269 2.342Z" fill="#546DDB" /> <path d="m65.02 27.539-8.781 6.44 5.269 2.926h8.781l1.756-7.025-1.756-4.683-5.269 2.342Z" fill="#000" fill-opacity=".8" /> <path d="m49.214 43.345 2.927-4.684 2.927 5.27-2.927-1.172-2.927.586Z" fill="#546DDB" /> <path d="m49.214 43.345 2.927-4.684 2.927 5.27-2.927-1.172-2.927.586Z" fill="#000" fill-opacity=".8" /> <path d="m39.831 12.903-7.61-2.341 3.512 9.366 4.098-7.025Z" fill="#898989" /> <path d="m39.831 12.903-7.61-2.341 3.512 9.366 4.098-7.025Z" fill="#fff" fill-opacity=".8" /> <path d="m53.881 32.807 2.342 1.171 8.781-6.44-4.683-2.341-6.44 7.61Z" fill="#898989" /> <path d="m53.881 32.807 2.342 1.171 8.781-6.44-4.683-2.341-6.44 7.61Z" fill="#fff" fill-opacity=".6" /> <path d="m49.784 33.392-.586 9.953 2.927-4.684v-8.196l-2.341 2.927Z" fill="#898989" /> <path d="m49.784 33.392-.586 9.953 2.927-4.684v-8.196l-2.341 2.927Z" fill="#fff" fill-opacity=".8" /> <path d="m53.881 32.807 1.171 11.123-2.927-5.269v-8.196l1.756 2.342Z" fill="#898989" /> <path d="m53.881 32.807 1.171 11.123-2.927-5.269v-8.196l1.756 2.342Z" fill="#fff" fill-opacity=".6" /> <path d="m32.22 21.684 1.757 3.513 7.025 2.342 3.512-2.342-8.78-5.269-3.513 1.756Z" fill="#898989" /> <path d="m32.22 21.684 1.757 3.513 7.025 2.342 3.512-2.342-8.78-5.269-3.513 1.756Z" fill="#fff" fill-opacity=".8" /> <path d="m44.514 25.197-3.512 2.342 6.44 6.44 2.34-.586-5.268-8.196Z" fill="#898989" /> <path d="m44.514 25.197-3.512 2.342 6.44 6.44 2.34-.586-5.268-8.196Z" fill="#fff" fill-opacity=".6" /> <path d="m39.831 12.903-4.098 7.025 8.782 5.269 4.097-1.171.586-4.683-1.756-7.025-7.61.585Z" fill="#898989" /> <path d="m39.831 12.903-4.098 7.025 8.782 5.269 4.097-1.171.586-4.683-1.756-7.025-7.61.585Z" fill="#fff" fill-opacity=".6" /> <path d="m62.077 14.074-7.61 1.756 7.025 2.927.585-4.683Z" fill="#898989" /> <path d="m62.077 14.074-7.61 1.756 7.025 2.927.585-4.683Z" fill="#fff" fill-opacity=".8" /> <path d="m57.979 21.099-.585-2.927h4.098l8.78 7.025-5.268 2.341-4.683-2.341-2.342-4.098Z" fill="#898989" /> <path d="m57.979 21.099-.585-2.927h4.098l8.78 7.025-5.268 2.341-4.683-2.341-2.342-4.098Z" fill="#fff" fill-opacity=".8" /> <path d="m63.248 10.562-1.171 3.512h5.854L65.589 9.39l-2.341 1.17Z" fill="#898989" /> <path d="m63.248 10.562-1.171 3.512h5.854L65.589 9.39l-2.341 1.17Z" fill="#fff" fill-opacity=".6" /> <path d="m70.273 25.196-1.171-8.195.585-1.757-1.756-1.17-2.342-4.684L66.76 7.05l11.123 13.464-7.61 4.683Z" fill="#898989" /> <path d="m72.029 29.88-1.757-4.683 7.61-4.684v14.635L72.03 29.88Z" fill="#898989" /> <path d="m72.029 29.88-1.757-4.683 7.61-4.684v14.635L72.03 29.88Z" fill="#000" fill-opacity=".2" /> <path d="m32.22 29.88-8.78 2.342 3.512-12.88 7.025 5.855-1.756 4.683Z" fill="#898989" /> <path d="m32.22 29.88-8.78 2.342 3.512-12.88 7.025 5.855-1.756 4.683Z" fill="#fff" fill-opacity=".6" /> <path d="M39.246 46.271v15.221l1.756-2.927-1.756-12.294ZM60.906 58.565l1.756-12.294 1.273 13.465-3.029-1.17Z" fill="#898989" /> <path d="m42.758 36.905-7.61 1.17 4.098 8.197 3.512-1.757v-7.61Z" fill="#898989" /> <path d="m42.758 36.905-7.61 1.17 4.098 8.197 3.512-1.757v-7.61Z" fill="#fff" fill-opacity=".6" /> <path d="m58.565 45.1 2.927-8.195 5.854 7.61-4.684 1.757-4.097-1.171Z" fill="#898989" /> <path d="m58.565 45.1 2.927-8.195 5.854 7.61-4.684 1.757-4.097-1.171Z" fill="#fff" fill-opacity=".6" /> <path d="M20.506 65.164c-1.047.274-2.308.033-2.36-.697-.053-.73-.267-1.186.802-1.858 1.068-.671 2.337-.575 2.834.215.496.79.247 1.942-1.276 2.34Z" fill="#898989" /> <path d="m14.5 19 4.913 46.5" stroke="#FAA21E" /> <path d="m14.5 19 4.913 46.5" stroke="#000" stroke-opacity=".4" /> <path d="M14.404 24.592c-1.345-3.164-.34-5.298-.34-5.298 4.213 1.433 5.543-.34 9.533-.784 3.99-.443 5.798 3.075 11.562-.029-4.42 8.103-7.06 5.075-11.05 7.735-3.99 3.104-3.684 4.052-9.364 3.675 0 0 1.005-2.134-.34-5.299Z" fill="#D0333D" /> <path d="M14.404 24.592c-1.345-3.164-.34-5.298-.34-5.298 4.213 1.433 5.543-.34 9.533-.784 3.99-.443 5.798 3.075 11.562-.029-4.42 8.103-7.06 5.075-11.05 7.735-3.99 3.104-3.684 4.052-9.364 3.675 0 0 1.005-2.134-.34-5.299Z" fill="#000" fill-opacity=".2" /> <path d="m23.5 20.5-5 6M17 22l8 2.5" stroke="#000" /> <path d="M17.79 66.013c-.784.173-1.754-.075-1.826-.664-.072-.589-.255-.964.53-1.457.783-.492 1.753-.36 2.166.297.412.656.273 1.57-.87 1.824Z" fill="#898989" /> <path d="M17.79 66.013c-.784.173-1.754-.075-1.826-.664-.072-.589-.255-.964.53-1.457.783-.492 1.753-.36 2.166.297.412.656.273 1.57-.87 1.824Z" fill="#fff" fill-opacity=".2" /> <path d="M26.223 66.127c-.398-.15-.745-.494-.59-.715.155-.222.194-.4.693-.359.5.04.882.345.855.68-.027.336-.377.612-.958.394Z" fill="#898989" /> <path d="M26.223 66.127c-.398-.15-.745-.494-.59-.715.155-.222.194-.4.693-.359.5.04.882.345.855.68-.027.336-.377.612-.958.394Z" fill="#fff" fill-opacity=".4" /> <path d="M24.064 69.046c-.43.048-.925-.13-.918-.438.006-.307-.062-.51.392-.723.453-.212.957-.093 1.126.267.17.36.025.823-.6.894Z" fill="#898989" /> <path d="M24.064 69.046c-.43.048-.925-.13-.918-.438.006-.307-.062-.51.392-.723.453-.212.957-.093 1.126.267.17.36.025.823-.6.894Z" fill="#fff" fill-opacity=".4" /> <path d="M18.501 64.823c-.127 1.076.198 2.417 2.069 2.16 1.16-.16 3.028-.214 3.156-1.29.127-1.075-1.088-2.103-2.715-2.295-1.627-.193-2.383.35-2.51 1.425Z" fill="#898989" /> <path d="M18.501 64.823c-.127 1.076.198 2.417 2.069 2.16 1.16-.16 3.028-.214 3.156-1.29.127-1.075-1.088-2.103-2.715-2.295-1.627-.193-2.383.35-2.51 1.425Z" fill="#fff" fill-opacity=".4" /> <path d="M74.912 54v-4l3.5-1v4l-3.5 1Z" fill="#898989" /> <path d="M74.912 54v-4l3.5-1v4l-3.5 1Z" fill="#fff" fill-opacity=".2" /> <path d="m93.912 54-3 1v4H94.5l-.587-5Z" fill="#898989" /> <path d="m93.912 54-3 1v4H94.5l-.587-5Z" fill="#fff" fill-opacity=".2" /> <path d="M29 48v3.5h2.5V49L29 48Z" fill="#898989" /> <path d="M29 48v3.5h2.5V49L29 48Z" fill="#fff" fill-opacity=".2" /> <path d="m85 45-.5 3H87v-3.5l-2 .5Z" fill="#898989" /> <path d="m85 45-.5 3H87v-3.5l-2 .5Z" fill="#fff" fill-opacity=".2" /> <path d="M9 51v5h3.5l-.5-4-3-1Z" fill="#898989" /> <path d="M9 51v5h3.5l-.5-4-3-1Z" fill="#fff" fill-opacity=".2" /> </symbol> </svg>';

    const parser = new DOMParser();
    const actionSVG = parser.parseFromString(actionSVGText, 'application/xml');
    const monsterSVG = "/static/media/combat_monsters_sprite.395438a8.svg"; //parser.parseFromString(GM_getResourceText("monsterSVG"), 'application/xml');

    const taskBattleIndex = 99; //Battle at bottom
    const taskOrderIndex = {
        Milking: 1,
        Foraging: 2,
        Woodcutting: 3,
        Cheesesmithing: 4,
        Crafting: 5,
        Tailoring: 6,
        Cooking: 7,
        Brewing: 8,
        Alchemy: 9,
        Enhancing: 10,
        Defeat: taskBattleIndex, //Battle at bottom
    };
    const taskOrderIndex_CN = {
        挤奶: 1,
        采摘: 2,
        伐木: 3,
        奶酪锻造: 4,
        制作: 5,
        缝纫: 6,
        烹饪: 7,
        冲泡: 8,
        炼金: 9,
        强化: 10,
        击败: taskBattleIndex, //Battle at bottom
    };

    const allMonster = {
        "/monsters/abyssal_imp": {
            "en": "Abyssal Imp",
            "cn": "深渊小鬼",
            "zone": "/actions/combat/infernal_abyss",
            "dungeon": [
                "/actions/combat/enchanted_fortress",
                "/actions/combat/pirate_cove"
            ],
            "sortIndex": 11
        },
        "/monsters/acrobat": {
            "en": "Acrobat",
            "cn": "杂技师",
            "zone": "",
            "dungeon": [
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": -1
        },
        "/monsters/alligator": {
            "en": "Sherlock",
            "cn": "夏洛克",
            "zone": "/actions/combat/swamp_planet",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": 2
        },
        "/monsters/anchor_shark": {
            "en": "Anchor Shark",
            "cn": "持锚鲨",
            "zone": "",
            "dungeon": [
                "/actions/combat/pirate_cove"
            ],
            "sortIndex": -1
        },
        "/monsters/aquahorse": {
            "en": "Aquahorse",
            "cn": "水马",
            "zone": "/actions/combat/aqua_planet",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": 3
        },
        "/monsters/black_bear": {
            "en": "Black Bear",
            "cn": "黑熊",
            "zone": "/actions/combat/bear_with_it",
            "dungeon": [
                "/actions/combat/enchanted_fortress",
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": 8
        },
        "/monsters/brine_marksman": {
            "en": "Brine Marksman",
            "cn": "海盐射手",
            "zone": "",
            "dungeon": [
                "/actions/combat/pirate_cove"
            ],
            "sortIndex": -1
        },
        "/monsters/butterjerry": {
            "en": "Butterjerry",
            "cn": "蝶鼠",
            "zone": "",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": -1
        },
        "/monsters/captain_fishhook": {
            "en": "Captain Cheesehook",
            "cn": "鱼钩船长",
            "zone": "",
            "dungeon": [
                "/actions/combat/pirate_cove"
            ],
            "sortIndex": -1
        },
        "/monsters/centaur_archer": {
            "en": "Centaur Archer",
            "cn": "半人马弓箭手",
            "zone": "/actions/combat/jungle_planet",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": 4
        },
        "/monsters/chronofrost_sorcerer": {
            "en": "Chronofrost Sorcerer",
            "cn": "霜时巫师",
            "zone": "/actions/combat/sorcerers_tower",
            "dungeon": [],
            "sortIndex": 7
        },
        "/monsters/crab": {
            "en": "I Pinch",
            "cn": "螃蟹",
            "zone": "/actions/combat/aqua_planet",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": 3
        },
        "/monsters/crystal_colossus": {
            "en": "Crystal Colossus",
            "cn": "水晶巨像",
            "zone": "/actions/combat/golem_cave",
            "dungeon": [],
            "sortIndex": 9
        },
        "/monsters/demonic_overlord": {
            "en": "Demonic Overlord",
            "cn": "恶魔霸主",
            "zone": "/actions/combat/infernal_abyss",
            "dungeon": [],
            "sortIndex": 11
        },
        "/monsters/deranged_jester": {
            "en": "Deranged Jester",
            "cn": "小丑皇",
            "zone": "",
            "dungeon": [
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": -1
        },
        "/monsters/dodocamel": {
            "en": "Dodocamel",
            "cn": "渡渡驼",
            "zone": "",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": -1
        },
        "/monsters/dusk_revenant": {
            "en": "Dusk Revenant",
            "cn": "黄昏亡灵",
            "zone": "/actions/combat/twilight_zone",
            "dungeon": [],
            "sortIndex": 10
        },
        "/monsters/elementalist": {
            "en": "Elementalist",
            "cn": "元素法师",
            "zone": "/actions/combat/sorcerers_tower",
            "dungeon": [
                "/actions/combat/enchanted_fortress",
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": 7
        },
        "/monsters/enchanted_bishop": {
            "en": "Enchanted Bishop",
            "cn": "秘法之相",
            "zone": "",
            "dungeon": [
                "/actions/combat/enchanted_fortress"
            ],
            "sortIndex": -1
        },
        "/monsters/enchanted_king": {
            "en": "Enchanted King",
            "cn": "秘法之王",
            "zone": "",
            "dungeon": [
                "/actions/combat/enchanted_fortress"
            ],
            "sortIndex": -1
        },
        "/monsters/enchanted_knight": {
            "en": "Enchanted Knight",
            "cn": "秘法骑士",
            "zone": "",
            "dungeon": [
                "/actions/combat/enchanted_fortress"
            ],
            "sortIndex": -1
        },
        "/monsters/enchanted_pawn": {
            "en": "Enchanted Pawn",
            "cn": "秘法之兵",
            "zone": "",
            "dungeon": [
                "/actions/combat/enchanted_fortress"
            ],
            "sortIndex": -1
        },
        "/monsters/enchanted_queen": {
            "en": "Enchanted Queen",
            "cn": "秘法之后",
            "zone": "",
            "dungeon": [
                "/actions/combat/enchanted_fortress"
            ],
            "sortIndex": -1
        },
        "/monsters/enchanted_rook": {
            "en": "Enchanted Rook",
            "cn": "秘法堡垒",
            "zone": "",
            "dungeon": [
                "/actions/combat/enchanted_fortress"
            ],
            "sortIndex": -1
        },
        "/monsters/eye": {
            "en": "Eye",
            "cn": "独眼",
            "zone": "/actions/combat/planet_of_the_eyes",
            "dungeon": [
                "/actions/combat/chimerical_den",
                "/actions/combat/pirate_cove"
            ],
            "sortIndex": 6
        },
        "/monsters/eyes": {
            "en": "Eyes",
            "cn": "叠眼",
            "zone": "/actions/combat/planet_of_the_eyes",
            "dungeon": [
                "/actions/combat/chimerical_den",
                "/actions/combat/pirate_cove"
            ],
            "sortIndex": 6
        },
        "/monsters/flame_sorcerer": {
            "en": "Flame Sorcerer",
            "cn": "火焰巫师",
            "zone": "/actions/combat/sorcerers_tower",
            "dungeon": [
                "/actions/combat/enchanted_fortress",
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": 7
        },
        "/monsters/fly": {
            "en": "Fly",
            "cn": "苍蝇",
            "zone": "/actions/combat/smelly_planet",
            "dungeon": [],
            "sortIndex": 1
        },
        "/monsters/frog": {
            "en": "Frogger",
            "cn": "青蛙",
            "zone": "/actions/combat/swamp_planet",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": 2
        },
        "/monsters/giant_shoebill": {
            "en": "Giant Shoebill",
            "cn": "鲸头鹳",
            "zone": "/actions/combat/swamp_planet",
            "dungeon": [],
            "sortIndex": 2
        },
        "/monsters/gobo_boomy": {
            "en": "Boomy",
            "cn": "轰轰",
            "zone": "/actions/combat/gobo_planet",
            "dungeon": [
                "/actions/combat/chimerical_den",
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": 5
        },
        "/monsters/gobo_chieftain": {
            "en": "Gobo Chieftain",
            "cn": "哥布林酋长",
            "zone": "/actions/combat/gobo_planet",
            "dungeon": [],
            "sortIndex": 5
        },
        "/monsters/gobo_shooty": {
            "en": "Shooty",
            "cn": "咻咻",
            "zone": "/actions/combat/gobo_planet",
            "dungeon": [
                "/actions/combat/chimerical_den",
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": 5
        },
        "/monsters/gobo_slashy": {
            "en": "Slashy",
            "cn": "砍砍",
            "zone": "/actions/combat/gobo_planet",
            "dungeon": [
                "/actions/combat/chimerical_den",
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": 5
        },
        "/monsters/gobo_smashy": {
            "en": "Smashy",
            "cn": "锤锤",
            "zone": "/actions/combat/gobo_planet",
            "dungeon": [
                "/actions/combat/chimerical_den",
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": 5
        },
        "/monsters/gobo_stabby": {
            "en": "Stabby",
            "cn": "刺刺",
            "zone": "/actions/combat/gobo_planet",
            "dungeon": [
                "/actions/combat/chimerical_den",
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": 5
        },
        "/monsters/granite_golem": {
            "en": "Granite Golem",
            "cn": "花岗魔像",
            "zone": "/actions/combat/golem_cave",
            "dungeon": [
                "/actions/combat/pirate_cove"
            ],
            "sortIndex": 9
        },
        "/monsters/griffin": {
            "en": "Griffin",
            "cn": "狮鹫",
            "zone": "",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": -1
        },
        "/monsters/grizzly_bear": {
            "en": "Grizzly Bear",
            "cn": "棕熊",
            "zone": "/actions/combat/bear_with_it",
            "dungeon": [
                "/actions/combat/enchanted_fortress",
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": 8
        },
        "/monsters/gummy_bear": {
            "en": "Gummy Bear",
            "cn": "软糖熊",
            "zone": "/actions/combat/bear_with_it",
            "dungeon": [
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": 8
        },
        "/monsters/ice_sorcerer": {
            "en": "Ice Sorcerer",
            "cn": "冰霜巫师",
            "zone": "/actions/combat/sorcerers_tower",
            "dungeon": [
                "/actions/combat/enchanted_fortress",
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": 7
        },
        "/monsters/infernal_warlock": {
            "en": "Infernal Warlock",
            "cn": "地狱术士",
            "zone": "/actions/combat/infernal_abyss",
            "dungeon": [
                "/actions/combat/pirate_cove"
            ],
            "sortIndex": 11
        },
        "/monsters/jackalope": {
            "en": "Jackalope",
            "cn": "鹿角兔",
            "zone": "",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": -1
        },
        "/monsters/juggler": {
            "en": "Juggler",
            "cn": "杂耍者",
            "zone": "",
            "dungeon": [
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": -1
        },
        "/monsters/jungle_sprite": {
            "en": "Jungle Sprite",
            "cn": "丛林精灵",
            "zone": "/actions/combat/jungle_planet",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": 4
        },
        "/monsters/luna_empress": {
            "en": "Luna Empress",
            "cn": "月神之蝶",
            "zone": "/actions/combat/jungle_planet",
            "dungeon": [],
            "sortIndex": 4
        },
        "/monsters/magician": {
            "en": "Magician",
            "cn": "魔术师",
            "zone": "",
            "dungeon": [
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": -1
        },
        "/monsters/magnetic_golem": {
            "en": "Magnetic Golem",
            "cn": "磁力魔像",
            "zone": "/actions/combat/golem_cave",
            "dungeon": [
                "/actions/combat/enchanted_fortress",
                "/actions/combat/pirate_cove"
            ],
            "sortIndex": 9
        },
        "/monsters/manticore": {
            "en": "Manticore",
            "cn": "狮蝎兽",
            "zone": "",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": -1
        },
        "/monsters/marine_huntress": {
            "en": "Marine Huntress",
            "cn": "海洋猎手",
            "zone": "/actions/combat/aqua_planet",
            "dungeon": [],
            "sortIndex": 3
        },
        "/monsters/myconid": {
            "en": "Myconid",
            "cn": "蘑菇人",
            "zone": "/actions/combat/jungle_planet",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": 4
        },
        "/monsters/nom_nom": {
            "en": "Nom Nom",
            "cn": "咬咬鱼",
            "zone": "/actions/combat/aqua_planet",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": 3
        },
        "/monsters/novice_sorcerer": {
            "en": "Novice Sorcerer",
            "cn": "新手巫师",
            "zone": "/actions/combat/sorcerers_tower",
            "dungeon": [
                "/actions/combat/enchanted_fortress",
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": 7
        },
        "/monsters/panda": {
            "en": "Panda",
            "cn": "熊猫",
            "zone": "/actions/combat/bear_with_it",
            "dungeon": [
                "/actions/combat/enchanted_fortress",
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": 8
        },
        "/monsters/polar_bear": {
            "en": "Polar Bear",
            "cn": "北极熊",
            "zone": "/actions/combat/bear_with_it",
            "dungeon": [
                "/actions/combat/enchanted_fortress",
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": 8
        },
        "/monsters/porcupine": {
            "en": "Porcupine",
            "cn": "豪猪",
            "zone": "/actions/combat/smelly_planet",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": 1
        },
        "/monsters/rabid_rabbit": {
            "en": "Rabid Rabbit",
            "cn": "疯魔兔",
            "zone": "",
            "dungeon": [
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": -1
        },
        "/monsters/rat": {
            "en": "Jerry",
            "cn": "杰瑞",
            "zone": "/actions/combat/smelly_planet",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": 1
        },
        "/monsters/red_panda": {
            "en": "Red Panda",
            "cn": "小熊猫",
            "zone": "/actions/combat/bear_with_it",
            "dungeon": [],
            "sortIndex": 8
        },
        "/monsters/sea_snail": {
            "en": "Gary",
            "cn": "蜗牛",
            "zone": "/actions/combat/aqua_planet",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": 3
        },
        "/monsters/skunk": {
            "en": "Skunk",
            "cn": "臭鼬",
            "zone": "/actions/combat/smelly_planet",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": 1
        },
        "/monsters/slimy": {
            "en": "Slimy",
            "cn": "史莱姆",
            "zone": "/actions/combat/smelly_planet",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": 1
        },
        "/monsters/snake": {
            "en": "Thnake",
            "cn": "蛇",
            "zone": "/actions/combat/swamp_planet",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": 2
        },
        "/monsters/soul_hunter": {
            "en": "Soul Hunter",
            "cn": "灵魂猎手",
            "zone": "/actions/combat/infernal_abyss",
            "dungeon": [
                "/actions/combat/enchanted_fortress",
                "/actions/combat/pirate_cove"
            ],
            "sortIndex": 11
        },
        "/monsters/squawker": {
            "en": "Squawker",
            "cn": "鹦鹉",
            "zone": "",
            "dungeon": [
                "/actions/combat/pirate_cove"
            ],
            "sortIndex": -1
        },
        "/monsters/stalactite_golem": {
            "en": "Stalactite Golem",
            "cn": "钟乳石魔像",
            "zone": "/actions/combat/golem_cave",
            "dungeon": [
                "/actions/combat/enchanted_fortress",
                "/actions/combat/pirate_cove"
            ],
            "sortIndex": 9
        },
        "/monsters/swampy": {
            "en": "Swampy",
            "cn": "沼泽虫",
            "zone": "/actions/combat/swamp_planet",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": 2
        },
        "/monsters/the_kraken": {
            "en": "The Kraken",
            "cn": "克拉肯",
            "zone": "",
            "dungeon": [
                "/actions/combat/pirate_cove"
            ],
            "sortIndex": -1
        },
        "/monsters/the_watcher": {
            "en": "The Watcher",
            "cn": "观察者",
            "zone": "/actions/combat/planet_of_the_eyes",
            "dungeon": [],
            "sortIndex": 6
        },
        "/monsters/tidal_conjuror": {
            "en": "Tidal Conjuror",
            "cn": "潮汐召唤师",
            "zone": "",
            "dungeon": [
                "/actions/combat/pirate_cove"
            ],
            "sortIndex": -1
        },
        "/monsters/treant": {
            "en": "Treant",
            "cn": "树人",
            "zone": "/actions/combat/jungle_planet",
            "dungeon": [],
            "sortIndex": 4
        },
        "/monsters/turtle": {
            "en": "Turuto",
            "cn": "忍者龟",
            "zone": "/actions/combat/aqua_planet",
            "dungeon": [
                "/actions/combat/chimerical_den"
            ],
            "sortIndex": 3
        },
        "/monsters/vampire": {
            "en": "Vampire",
            "cn": "吸血鬼",
            "zone": "/actions/combat/twilight_zone",
            "dungeon": [
                "/actions/combat/pirate_cove",
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": 10
        },
        "/monsters/veyes": {
            "en": "Veyes",
            "cn": "复眼",
            "zone": "/actions/combat/planet_of_the_eyes",
            "dungeon": [
                "/actions/combat/chimerical_den",
                "/actions/combat/pirate_cove"
            ],
            "sortIndex": 6
        },
        "/monsters/werewolf": {
            "en": "Werewolf",
            "cn": "狼人",
            "zone": "/actions/combat/twilight_zone",
            "dungeon": [
                "/actions/combat/pirate_cove",
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": 10
        },
        "/monsters/zombie": {
            "en": "Zombie",
            "cn": "僵尸",
            "zone": "/actions/combat/twilight_zone",
            "dungeon": [
                "/actions/combat/pirate_cove",
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": 10
        },
        "/monsters/zombie_bear": {
            "en": "Zombie Bear",
            "cn": "僵尸熊",
            "zone": "",
            "dungeon": [
                "/actions/combat/sinister_circus"
            ],
            "sortIndex": -1
        }
    };

    function getTaskDetailFromTaskName(fullTaskName) {
        var taskType = -1;
        var taskName = "";

        if (/^(.+) - (.+)$/.test(fullTaskName)) {
            let res = /^(.+) - (.+)$/.exec(fullTaskName);
            if (res[1] in taskOrderIndex) {
                taskType = taskOrderIndex[res[1]];
            }
            else if (res[1] in taskOrderIndex_CN) {
                taskType = taskOrderIndex_CN[res[1]];
            }
            taskName = res[2];
        }
        if (taskType == -1) console.log("Task Parse error", fullTaskName);

        return { taskType, taskName };
    }

    function getHridFromMonsterName(name) {
        for (let key in allMonster) {
            if (allMonster[key].en === name || allMonster[key].cn === name) {
                return key;
            }
        }
        console.log("Monster not found", name);
        return null;
    }
    function getMapIndexFromMonsterName(name) {
        const key = getHridFromMonsterName(name);
        if (!key) {
            return -1;
        }
        return allMonster[key].sortIndex;
    }

    function getTaskDetailFromElement(ele) {
        const div = ele.querySelector("div.RandomTask_name__1hl1b");

        const translatedfrom = div.getAttribute("script_translatedfrom"); //adapt old zhCN Script
        if (translatedfrom) {
            return getTaskDetailFromTaskName(translatedfrom);
        }

        const fullTaskName = Array.from(div.childNodes).find(node => node.nodeType === Node.TEXT_NODE).textContent.trim();
        return getTaskDetailFromTaskName(fullTaskName);
    }

    function compareFn(a, b) {
        var { taskType: a_TypeIndex, taskName: a_taskName } = getTaskDetailFromElement(a);

        var { taskType: b_TypeIndex, taskName: b_TaskName } = getTaskDetailFromElement(b);

        if (a_TypeIndex === taskBattleIndex && b_TypeIndex === taskBattleIndex) {
            var a_MapIndex = getMapIndexFromMonsterName(a_taskName);
            var b_MapIndex = getMapIndexFromMonsterName(b_TaskName);

            if (a_MapIndex != b_MapIndex) {
                return (a_MapIndex > b_MapIndex ? 1 : -1);
            }
        }

        if (a_TypeIndex == b_TypeIndex) {
            return a_taskName == b_TaskName ? 0
                : (a_taskName > b_TaskName ? 1 : -1);
        }

        return a_TypeIndex > b_TypeIndex ? 1 : -1;
    }

    function adaptSVG(svg, objSVG, target) {
        svg.setAttribute('target', target);
        if (typeof objSVG == 'string' && objSVG.endsWith(".svg")) {
            const use = document.createElementNS("http://www.w3.org/2000/svg", "use");
            use.setAttribute("href", objSVG + '#' + target);
            svg.appendChild(use);
        } else {
            const targetSymbolElement = objSVG.querySelector(`symbol[id="${target}"]`);
            if (targetSymbolElement) {
                const children = targetSymbolElement.childNodes;
                for (let i = 0; i < children.length; i++) {
                    svg.appendChild(children[i].cloneNode(true));
                }
                svg.setAttribute('viewBox', targetSymbolElement.getAttribute('viewBox'));
                svg.setAttribute('fill', 'none');
            }
        }
    }

    function addIconToTask(div) {
        var { taskType, taskName } = getTaskDetailFromElement(div);

        if (taskType != taskBattleIndex) {
            return;
        }

        const monsterHrid = getHridFromMonsterName(taskName);
        if (!monsterHrid) {
            return;
        }

        var offset = 5; // 5% from left and each 30% width
        const isShowDungeon = Object.values(globalConfig.dungeonConfig).filter(Boolean).length > 0;
        if (!isShowDungeon) {
            offset = 50;
        }

        const backgroundDiv = document.createElement('div');
        backgroundDiv.id = "MonsterIcon";
        backgroundDiv.style.position = 'absolute';
        backgroundDiv.style.left = `${offset}%`; offset += 30;
        backgroundDiv.style.width = '30%';
        backgroundDiv.style.height = '100%';
        backgroundDiv.style.opacity = '0.3';

        const monsterName = monsterHrid.split("/").pop();

        const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
        svg.setAttribute("width", "100%");
        svg.setAttribute("height", "100%");

        adaptSVG(svg, monsterSVG, monsterName);

        backgroundDiv.appendChild(svg);

        div.appendChild(backgroundDiv);


        const dungeonMap = allMonster[monsterHrid]?.dungeon;
        if (isShowDungeon && dungeonMap) {
            Object.keys(globalConfig.dungeonConfig).filter(dungeon => globalConfig.dungeonConfig[dungeon]).forEach(dungeon => {
                if (dungeonMap.includes(dungeon)) {
                    const dungeonDiv = document.createElement('div');
                    dungeonDiv.id = "DungeonIcon";
                    dungeonDiv.style.position = 'absolute';
                    dungeonDiv.style.left = `${offset}%`; offset += 30;
                    dungeonDiv.style.width = '30%';
                    dungeonDiv.style.height = '100%';
                    dungeonDiv.style.opacity = '0.3';

                    const dungeonName = dungeon.split("/").pop();

                    const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
                    svg.setAttribute("width", "100%");
                    svg.setAttribute("height", "100%");

                    adaptSVG(svg, actionSVG, dungeonName);

                    dungeonDiv.appendChild(svg);
                    div.appendChild(dungeonDiv);
                }
            })
        }

        // fix button style
        div.style.position = 'relative';
        div.querySelector(".RandomTask_content__VVQva").style.zIndex = 1;
        div.querySelectorAll(".Item_item__2De2O").forEach(node => node.style.backgroundColor = "transparent");

    }

    function updateIconByConfig() {
        const battleIcon = document.querySelector("#BattleIcon");
        if (battleIcon) {
            if (globalConfig.isBattleIcon) {
                battleIcon.style.opacity = '1';
                battleIcon.querySelector("#taskCount").style.display = 'inline';
            } else {
                battleIcon.style.opacity = '0.3';
                battleIcon.querySelector("#taskCount").style.display = 'none';
            }
        }

        Object.keys(globalConfig.dungeonConfig).forEach(dungeon => {
            const dungeonIcon = document.querySelector(`#${dungeon.split("/").pop()}`);
            if (dungeonIcon) {
                if (globalConfig.isBattleIcon && globalConfig.dungeonConfig[dungeon]) {
                    dungeonIcon.style.opacity = '1';
                    dungeonIcon.querySelector("#taskCount").style.display = 'inline';
                } else {
                    dungeonIcon.style.opacity = '0.3';
                    dungeonIcon.querySelector("#taskCount").style.display = 'none';
                }
            }
        });
    }

    function createIcon(id, objSVG, target) {

        // battle icon
        const div = document.createElement("div");
        div.id = id;
        div.style.height = "100%"; // 设置高度

        const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
        svg.setAttribute("role", "img");
        svg.setAttribute("aria-label", "Combat");
        svg.setAttribute("class", "Icon_icon__2LtL_ Icon_xtiny__331pI Icon_inline__1Idwv");
        svg.setAttribute("width", "100%");
        svg.setAttribute("height", "100%");
        svg.style.margin = "1px";

        adaptSVG(svg, objSVG, target);

        const divCount = document.createElement("span");
        divCount.id = "taskCount";
        divCount.textContent = "";

        div.appendChild(svg);
        div.appendChild(divCount);

        // div onclick change config
        div.addEventListener("click", function (evt) {
            if (id === "BattleIcon") {
                globalConfig.isBattleIcon = !globalConfig.isBattleIcon;
            } else {
                let configkey = Object.keys(globalConfig.dungeonConfig).find(key => key.split("/").pop() === id);
                globalConfig.dungeonConfig[configkey] = !globalConfig.dungeonConfig[configkey];
            }
            saveConfig(); //auto save when click

            updateIconByConfig();

            //clean all checkers to refresh statics
            document.querySelectorAll("#taskChekerInCoin").forEach(checker => checker.id = null);
        });

        return div;
    }

    function addSortButtonAndStaticsBar(pannel) {
        const sortButton = document.createElement("button");
        sortButton.setAttribute("class", "Button_button__1Fe9z Button_small__3fqC7");
        sortButton.id = "TaskSort";
        sortButton.innerHTML = "TaskSort";
        sortButton.addEventListener("click", function (evt) {
            const list = document.querySelector("div.TasksPanel_taskList__2xh4k");
            [...list.querySelectorAll("div.RandomTask_randomTask__3B9fA")]
                .sort(compareFn)
                .forEach(node => list.appendChild(node));
        });
        pannel.appendChild(sortButton);

        // add statics bar
        const battleIcon = createIcon("BattleIcon", "/static/media/misc_sprite.426c5d78.svg", "combat");
        pannel.appendChild(battleIcon);

        // add all dungeon icon
        Object.keys(globalConfig.dungeonConfig).forEach(dungeon => {
            const dungeonIcon = createIcon(dungeon.split("/").pop(), actionSVG, dungeon.split("/").pop());
            pannel.appendChild(dungeonIcon);
        });
    }

    function optimizeForMobile(pannel) {
        if (/Mobi|Android/i.test(navigator.userAgent)) {
            const upgradeButton = pannel.querySelector("button.Button_button__1Fe9z.Button_small__3fqC7");
            if (upgradeButton) {
                upgradeButton.style.display = "none";
                console.log("hide upgrade button when mobile");
            }
        }
    }

    function refresh() {
        const pannel = document.querySelector("div.TasksPanel_taskSlotCount__nfhgS");
        if (pannel) {
            let sortButton = pannel.querySelector("#TaskSort");
            if (!sortButton) {
                optimizeForMobile(pannel);
                addSortButtonAndStaticsBar(pannel);
                updateIconByConfig();
            }
        }
        else {
            return; //not in task board
        }

        let needRefreshTaskStatics = false;
        const taskNodes = document.querySelectorAll("div.TasksPanel_taskList__2xh4k div.RandomTask_randomTask__3B9fA");
        for (let node of taskNodes) {
            const coinDiv = node.querySelector(".Item_count__1HVvv");
            if (coinDiv && !coinDiv.querySelector("#taskChekerInCoin")) {
                needRefreshTaskStatics = true;

                //remove old and add new icon
                const oldIcon = node.querySelector("#MonsterIcon");
                if (oldIcon) {
                    oldIcon.remove();
                }
                const oldDungeonIcons = node.querySelectorAll("#DungeonIcon");
                oldDungeonIcons.forEach(icon => icon.remove());

                if (globalConfig.isBattleIcon) {
                    addIconToTask(node);
                }

                //add checker
                const checker = document.createElement("div");
                checker.id = "taskChekerInCoin";
                coinDiv.appendChild(checker);
            }
        }

        if (needRefreshTaskStatics) {
            const battleIcon = document.querySelector("#BattleIcon #taskCount");
            if (battleIcon) {
                const battleCount = [...document.querySelectorAll("div.RandomTask_randomTask__3B9fA")].filter(node => node.querySelector("#MonsterIcon")).length;
                battleIcon.textContent = battleCount > 0 ? `*${battleCount}` : '';
            }

            Object.keys(globalConfig.dungeonConfig).forEach(dungeon => {
                const dungeonIcon = document.querySelector(`#${dungeon.split("/").pop()} #taskCount`);
                if (dungeonIcon) {
                    const dungeonCount = [...document.querySelectorAll("div.RandomTask_randomTask__3B9fA")].filter(node => {
                        const dungeonIcons = node.querySelectorAll("#DungeonIcon svg");
                        return Array.from(dungeonIcons).some(svg => svg.getAttribute("target").includes(dungeon.split("/").pop()));
                    }).length;
                    dungeonIcon.textContent = dungeonCount > 0 ? `*${dungeonCount}` : '';
                }
            });
        }
    }

    const config = { attributes: true, childList: true, subtree: true };

    const observer = new MutationObserver(function (mutationsList, observer) {
        refresh();
    });

    observer.observe(document, config);

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址