From 1215b41c836d83cc7cecb00d5daf739ed5ea56b2 Mon Sep 17 00:00:00 2001 From: Alexey Date: Tue, 21 Apr 2026 20:38:31 +0500 Subject: [PATCH] Redesign Color Filter fullscreen cards --- dist/BlueMarble-For-GreasyFork.user.css | 265 ++++++++++++++++++---- dist/BlueMarble-For-GreasyFork.user.js | 50 +++-- dist/BlueMarble-Standalone.user.js | 4 +- dist/BlueMarble.user.css | 4 +- dist/BlueMarble.user.js | 4 +- src/WindowFilter.css | 284 +++++++++++++++++++++--- src/WindowFilter.js | 104 +++++---- 7 files changed, 577 insertions(+), 138 deletions(-) diff --git a/dist/BlueMarble-For-GreasyFork.user.css b/dist/BlueMarble-For-GreasyFork.user.css index d30fb57..11a14f1 100644 --- a/dist/BlueMarble-For-GreasyFork.user.css +++ b/dist/BlueMarble-For-GreasyFork.user.css @@ -621,20 +621,18 @@ input[type=file] { padding-right: 0.08rem; } #bm-window-filter .bm-filter-insights { + display: block; + margin: 0 0.18rem; +} +#bm-window-filter .bm-filter-stat-grid { display: grid; - grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr); - gap: 0.24rem 0.3rem; - align-items: stretch; + grid-template-columns: repeat(5, minmax(0, 1fr)); + gap: 0.24rem; } -#bm-window-filter .bm-filter-insights > hr, +#bm-window-filter .bm-filter-stat-card, #bm-window-filter .bm-filter-sort-panel { - grid-column: 1 / -1; -} -#bm-window-filter .bm-filter-stats-card, -#bm-window-filter .bm-filter-note, -#bm-window-filter .bm-filter-sort-panel { - padding: 0.38rem 0.48rem; - border-radius: 13px; + min-width: 0; + border-radius: 11px; border: 1px solid rgba(255, 255, 255, 0.18); background: linear-gradient( @@ -643,25 +641,37 @@ input[type=file] { rgba(255, 255, 255, 0.07)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 8px 20px rgba(0, 0, 0, 0.08); } -#bm-window-filter .bm-filter-stats-card { - display: grid; - gap: 0.18rem; +#bm-window-filter .bm-filter-stat-card { + min-height: 2.7rem; + display: flex; + flex-direction: column; + justify-content: center; + gap: 0.08rem; + padding: 0.34rem 0.45rem; + color: rgba(18, 35, 63, 0.96); + line-height: 1.22; } -#bm-window-filter .bm-filter-stats-card br { - display: none; +#bm-window-filter .bm-filter-stat-label { + color: rgba(49, 71, 105, 0.82); + font-size: 0.62rem; + letter-spacing: 0; + font-family: var(--bm-font-display); + text-transform: uppercase; } -#bm-window-filter .bm-filter-stats-card span { - display: block; - padding: 0.28rem 0.38rem; - border-radius: 10px; - background: - linear-gradient( - 180deg, - rgba(255, 255, 255, 0.2), - rgba(255, 255, 255, 0.08)); +#bm-window-filter .bm-filter-stat-value { + display: inline-block; + min-width: 0; + color: rgba(15, 31, 56, 0.96); + font-size: 1.04em; + font-weight: 700; + overflow-wrap: anywhere; } -#bm-window-filter .bm-filter-note p { - margin: 0; +#bm-window-filter .bm-filter-stat-card time { + font-family: var(--bm-font-mono); + letter-spacing: 0; +} +#bm-window-filter .bm-filter-sort-panel { + padding: 0.38rem 0.48rem; } #bm-window-filter .bm-filter-sort-panel fieldset { border: none; @@ -686,9 +696,9 @@ input[type=file] { display: flex; flex-direction: row; flex-wrap: wrap; - justify-content: center; + justify-content: flex-start; align-items: stretch; - gap: 0.3rem; + gap: 0.38rem; } #bm-window-filter .bm-filter-color { position: relative; @@ -726,6 +736,32 @@ input[type=file] { rgba(186, 246, 255, 0.12), transparent 22%); } +#bm-window-filter:not(.bm-windowed) .bm-filter-color::before { + background: + linear-gradient( + 180deg, + rgba(255, 255, 255, 0.08), + rgba(0, 0, 0, 0.04)); +} +#bm-window-filter:not(.bm-windowed) .bm-filter-color::after { + content: ""; + position: absolute; + left: 0.52rem; + bottom: 0.46rem; + width: 1.65rem; + height: 1.65rem; + background: currentColor; + opacity: 0.72; + pointer-events: none; + z-index: 0; + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.8 12s3.1-5 8.2-5 8.2 5 8.2 5-3.1 5-8.2 5-8.2-5-8.2-5Z' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='none' stroke='black' stroke-width='1.9'/%3E%3C/svg%3E") center / contain no-repeat; + mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.8 12s3.1-5 8.2-5 8.2 5 8.2 5-3.1 5-8.2 5-8.2-5-8.2-5Z' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='none' stroke='black' stroke-width='1.9'/%3E%3C/svg%3E") center / contain no-repeat; +} +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-state=hidden]::after { + opacity: 0.88; + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.6 9.8C6.1 8.3 8.6 7 12 7c5.1 0 8.2 5 8.2 5a15.2 15.2 0 0 1-2.2 2.7' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M14.1 16.7a8.3 8.3 0 0 1-2.1.3c-5.1 0-8.2-5-8.2-5a14.9 14.9 0 0 1 1.8-2.3' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M5 5l14 14' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10.4 10.7a2.5 2.5 0 0 0 2.9 2.9' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; + mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.6 9.8C6.1 8.3 8.6 7 12 7c5.1 0 8.2 5 8.2 5a15.2 15.2 0 0 1-2.2 2.7' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M14.1 16.7a8.3 8.3 0 0 1-2.1.3c-5.1 0-8.2-5-8.2-5a14.9 14.9 0 0 1 1.8-2.3' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M5 5l14 14' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10.4 10.7a2.5 2.5 0 0 0 2.9 2.9' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; +} #bm-window-filter .bm-filter-color-toggle { cursor: pointer; } @@ -733,13 +769,117 @@ input[type=file] { #bm-window-filter .bm-filter-color:focus-within { transform: translateY(-2px); border-color: rgba(146, 221, 255, 0.26); - background: - linear-gradient( - 160deg, - rgba(255, 255, 255, 0.22), - rgba(186, 246, 255, 0.1)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 24px rgba(0, 0, 0, 0.1); } +#bm-window-filter:not(.bm-windowed) .bm-filter-color { + width: min(100%, 23.5rem); + max-width: 23.5rem; + min-height: 6.15rem; + display: grid; + grid-template-columns: minmax(0, 1.2fr) minmax(7.6rem, 0.8fr); + align-items: stretch; + gap: 0.48rem; + padding: 0.5rem; + color: var(--bm-filter-card-fg); + background-color: var(--bm-filter-card-bg); + background-image: none; +} +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-id="-2"][data-state=shown] { + background-image: + conic-gradient( + #aa0000 0%, + #aaaa00 16.6%, + #00aa00 33.3%, + #00aaaa 50%, + #0000aa 66.6%, + #aa00aa 83.3%, + #aa0000 100%); +} +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-id="-1"][data-state=shown], +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-id="0"][data-state=shown] { + background-image: url('data:image/svg+xml;utf8,'); + background-color: rgba(255, 255, 255, 0.18); +} +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-state=hidden] { + color: var(--bm-filter-card-fg); + border-color: rgba(255, 255, 255, 0.16); + background-color: var(--bm-filter-card-bg); + background-image: none; +} +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-id="-2"][data-state=hidden] { + background-image: + conic-gradient( + #aa0000 0%, + #aaaa00 16.6%, + #00aa00 33.3%, + #00aaaa 50%, + #0000aa 66.6%, + #aa00aa 83.3%, + #aa0000 100%); +} +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-id="-1"][data-state=hidden], +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-id="0"][data-state=hidden] { + background-image: url('data:image/svg+xml;utf8,'); + background-color: rgba(255, 255, 255, 0.18); +} +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-state=hidden]::before { + opacity: 0.16; +} +#bm-window-filter:not(.bm-windowed) .bm-filter-color > * { + position: relative; + z-index: 1; +} +#bm-window-filter:not(.bm-windowed) .bm-filter-premium-star { + display: none; +} +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-premium="1"] .bm-filter-premium-star { + position: absolute; + top: 50%; + right: -3.2rem; + z-index: 0; + display: block; + width: 10.5rem; + aspect-ratio: 1; + background: currentColor; + clip-path: polygon(50% 5%, 62% 38%, 98% 38%, 69% 59%, 80% 93%, 50% 72%, 20% 93%, 31% 59%, 2% 38%, 38% 38%); + opacity: 0.12; + pointer-events: none; + transform: translateY(-50%); +} +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-premium="1"][data-state=hidden] .bm-filter-premium-star { + opacity: 0.18; +} +#bm-window-filter:not(.bm-windowed) .bm-filter-color-main, +#bm-window-filter:not(.bm-windowed) .bm-filter-color-meta, +#bm-window-filter:not(.bm-windowed) .bm-filter-color-progress { + min-width: 0; + display: flex; + flex-direction: column; +} +#bm-window-filter:not(.bm-windowed) .bm-filter-color-main { + justify-content: flex-start; + gap: 0.4rem; +} +#bm-window-filter:not(.bm-windowed) .bm-filter-color-title { + min-width: 0; +} +#bm-window-filter:not(.bm-windowed) .bm-filter-color-meta { + align-items: flex-end; + justify-content: space-between; + gap: 0.42rem; + text-align: right; +} +#bm-window-filter:not(.bm-windowed) .bm-filter-color-progress { + align-items: flex-end; + gap: 0.08rem; +} +#bm-window-filter:not(.bm-windowed) .bm-filter-color .bm-filter-color-pxl-cnt { + font-family: var(--bm-font-display); + font-size: 1rem; + font-weight: 700; + line-height: 1.15; + overflow-wrap: anywhere; +} #bm-window-filter .bm-filter-color-toggle:focus-visible { outline: none; border-color: rgba(116, 231, 255, 0.62); @@ -793,6 +933,22 @@ input[type=file] { height: 1.55rem; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.18)); } +#bm-window-filter:not(.bm-windowed) .bm-filter-container-rgb { + display: none; +} +#bm-window-filter:not(.bm-windowed) .bm-filter-container-rgb button { + min-width: 3rem; + min-height: 3rem; + padding: 0; + color: currentColor !important; + pointer-events: none; +} +#bm-window-filter:not(.bm-windowed) .bm-filter-container-rgb .bm-filter-eye-icon { + width: 2.75rem; + height: 2.75rem; + filter: none; + transform: translateY(0.08rem); +} #bm-window-filter .bm-filter-color > .bm-flex-between { flex-direction: column; align-items: flex-start; @@ -801,12 +957,27 @@ input[type=file] { #bm-window-filter .bm-filter-color h2 { margin: 0.04rem 0 0; } +#bm-window-filter:not(.bm-windowed) .bm-filter-color h2 { + display: block; + max-width: 100%; + margin: 0.08rem 0 0; + color: currentColor; + font-size: 1.02rem; + letter-spacing: 0; + line-height: 1.12; + overflow-wrap: anywhere; +} #bm-window-filter .bm-filter-color .bm-filter-color-pxl-desc { margin: 0.1rem 0 0; } #bm-window-filter .bm-filter-color small { font-size: 0.75em; } +#bm-window-filter:not(.bm-windowed) .bm-filter-color small { + color: currentColor; + letter-spacing: 0; + opacity: 0.82; +} #bm-window-filter .bm-filter-color.bm-color-hide { display: none; } @@ -958,14 +1129,30 @@ input[type=file] { width: min(100vw - 0.35rem, 50rem); max-width: min(100vw - 0.35rem, 50rem) !important; } - #bm-window-filter .bm-filter-insights { + #bm-window-filter .bm-filter-stat-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + #bm-window-filter .bm-filter-stat-card-wide { + grid-column: span 2; + } +} +@media (max-width: 620px) { + #bm-window-filter .bm-filter-stat-grid { grid-template-columns: 1fr; } - #bm-window-filter .bm-filter-note, - #bm-window-filter .bm-filter-sort-panel, - #bm-window-filter .bm-filter-insights > hr { + #bm-window-filter .bm-filter-stat-card-wide { grid-column: auto; } + #bm-window-filter:not(.bm-windowed) .bm-filter-color { + width: 100%; + max-width: none; + grid-template-columns: 1fr; + } + #bm-window-filter:not(.bm-windowed) .bm-filter-color-meta, + #bm-window-filter:not(.bm-windowed) .bm-filter-color-progress { + align-items: flex-start; + text-align: left; + } } /* src/WindowMain.css */ @@ -1215,4 +1402,4 @@ input[type=file] { /* src/main.css */ -/* Build Hash: 741f270e99de */ +/* Build Hash: 893c29fe0ffa */ diff --git a/dist/BlueMarble-For-GreasyFork.user.js b/dist/BlueMarble-For-GreasyFork.user.js index 268dc2c..291f97e 100644 --- a/dist/BlueMarble-For-GreasyFork.user.js +++ b/dist/BlueMarble-For-GreasyFork.user.js @@ -2535,7 +2535,7 @@ Getting Y ${pixelY}-${pixelY + drawSizeY}`); button.onclick = () => __privateMethod(this, _WindowFilter_instances, selectColorList_fn).call(this, false); }).buildElement().addButton({ "class": "bm-button-secondary", "textContent": "Show All Colors" }, (instance, button) => { button.onclick = () => __privateMethod(this, _WindowFilter_instances, selectColorList_fn).call(this, true); - }).buildElement().buildElement().addHr().buildElement().addDiv({ "class": "bm-container bm-scrollable bm-filter-scrollable" }).addDiv({ "class": "bm-container bm-filter-insights", "style": "margin-left: 2.5ch; margin-right: 2.5ch;" }).addDiv({ "class": "bm-container bm-filter-stats-card" }).addSpan({ "id": "bm-filter-tile-load", "innerHTML": "Tiles Loaded: 0 / ???" }).buildElement().addBr().buildElement().addSpan({ "id": "bm-filter-tot-correct", "innerHTML": "Correct Pixels: ???" }).buildElement().addBr().buildElement().addSpan({ "id": "bm-filter-tot-total", "innerHTML": "Total Pixels: ???" }).buildElement().addBr().buildElement().addSpan({ "id": "bm-filter-tot-remaining", "innerHTML": "Complete: ??? (???)" }).buildElement().addBr().buildElement().addSpan({ "id": "bm-filter-tot-completed", "innerHTML": "??? ???" }).buildElement().buildElement().addDiv({ "class": "bm-container bm-filter-note" }).addP({ "innerHTML": `Press the ${windowedIcon.replace(" { + }).buildElement().buildElement().addHr().buildElement().addDiv({ "class": "bm-container bm-scrollable bm-filter-scrollable" }).addDiv({ "class": "bm-container bm-filter-insights" }).addDiv({ "class": "bm-filter-stat-grid" }).addDiv({ "class": "bm-filter-stat-card" }).addSpan({ "class": "bm-filter-stat-label", "textContent": "Tiles" }).buildElement().addSpan({ "id": "bm-filter-tile-load", "class": "bm-filter-stat-value", "textContent": "0 / ???" }).buildElement().buildElement().addDiv({ "class": "bm-filter-stat-card" }).addSpan({ "class": "bm-filter-stat-label", "textContent": "Correct" }).buildElement().addSpan({ "id": "bm-filter-tot-correct", "class": "bm-filter-stat-value", "textContent": "???" }).buildElement().buildElement().addDiv({ "class": "bm-filter-stat-card" }).addSpan({ "class": "bm-filter-stat-label", "textContent": "Total" }).buildElement().addSpan({ "id": "bm-filter-tot-total", "class": "bm-filter-stat-value", "textContent": "???" }).buildElement().buildElement().addDiv({ "class": "bm-filter-stat-card" }).addSpan({ "class": "bm-filter-stat-label", "textContent": "Remaining" }).buildElement().addSpan({ "id": "bm-filter-tot-remaining", "class": "bm-filter-stat-value", "textContent": "???" }).buildElement().buildElement().addDiv({ "class": "bm-filter-stat-card bm-filter-stat-card-wide" }).addSpan({ "class": "bm-filter-stat-label", "textContent": "Finish At" }).buildElement().addSpan({ "id": "bm-filter-tot-completed", "class": "bm-filter-stat-value", "textContent": "???" }).buildElement().buildElement().buildElement().addHr().buildElement().addForm({ "class": "bm-container bm-filter-sort-panel" }).addFieldset().addLegend({ "textContent": "Sort Options:", "style": "font-weight: 700;" }).buildElement().addDiv({ "class": "bm-container" }).addSelect({ "id": "bm-filter-sort-primary", "name": "sortPrimary", "textContent": "I want to view " }).addOption({ "value": "id", "textContent": "color IDs" }).buildElement().addOption({ "value": "name", "textContent": "color names" }).buildElement().addOption({ "value": "premium", "textContent": "premium colors" }).buildElement().addOption({ "value": "percent", "textContent": "percentage" }).buildElement().addOption({ "value": "correct", "textContent": "correct pixels" }).buildElement().addOption({ "value": "incorrect", "textContent": "incorrect pixels" }).buildElement().addOption({ "value": "total", "textContent": "total pixels" }).buildElement().buildElement().addSelect({ "id": "bm-filter-sort-secondary", "name": "sortSecondary", "textContent": " in " }).addOption({ "value": "ascending", "textContent": "ascending" }).buildElement().addOption({ "value": "descending", "textContent": "descending" }).buildElement().buildElement().addSpan({ "textContent": " order." }).buildElement().buildElement().addDiv({ "class": "bm-container" }).addCheckbox({ "id": "bm-filter-show-unused", "name": "showUnused", "textContent": "Show unused colors" }).buildElement().buildElement().buildElement().addDiv({ "class": "bm-container bm-filter-sort-actions" }).addButton({ "class": "bm-button-primary", "textContent": "Sort Colors", "type": "submit" }, (instance, button) => { button.onclick = (event) => { event.preventDefault(); const formData = new FormData(document.querySelector(`#${this.windowID} form`)); @@ -2552,11 +2552,11 @@ Getting Y ${pixelY}-${pixelY + drawSizeY}`); __privateMethod(this, _WindowFilter_instances, buildColorList_fn).call(this, scrollableContainer); __privateMethod(this, _WindowFilter_instances, syncSortFormControls_fn).call(this); __privateMethod(this, _WindowFilter_instances, sortColorList_fn).call(this, this.sortPrimary, this.sortSecondary, this.showUnused); - this.updateInnerHTML("#bm-filter-tile-load", `Tiles Loaded: ${localizeNumber(this.tilesLoadedTotal)} / ${localizeNumber(this.tilesTotal)}`); - this.updateInnerHTML("#bm-filter-tot-correct", `Correct Pixels: ${localizeNumber(this.allPixelsCorrectTotal)}`); - this.updateInnerHTML("#bm-filter-tot-total", `Total Pixels: ${localizeNumber(this.allPixelsTotal)}`); - this.updateInnerHTML("#bm-filter-tot-remaining", `Remaining: ${localizeNumber((this.allPixelsTotal || 0) - (this.allPixelsCorrectTotal || 0))} (${localizePercent(((this.allPixelsTotal || 0) - (this.allPixelsCorrectTotal || 0)) / (this.allPixelsTotal || 1))})`); - this.updateInnerHTML("#bm-filter-tot-completed", `Completed at: `); + this.updateInnerHTML("#bm-filter-tile-load", `${localizeNumber(this.tilesLoadedTotal)} / ${localizeNumber(this.tilesTotal)}`); + this.updateInnerHTML("#bm-filter-tot-correct", localizeNumber(this.allPixelsCorrectTotal)); + this.updateInnerHTML("#bm-filter-tot-total", localizeNumber(this.allPixelsTotal)); + this.updateInnerHTML("#bm-filter-tot-remaining", `${localizeNumber((this.allPixelsTotal || 0) - (this.allPixelsCorrectTotal || 0))} (${localizePercent(((this.allPixelsTotal || 0) - (this.allPixelsCorrectTotal || 0)) / (this.allPixelsTotal || 1))})`); + this.updateInnerHTML("#bm-filter-tot-completed", ``); __privateMethod(this, _WindowFilter_instances, startAutoRefresh_fn).call(this); } /** Spawns a windowed Color Filter window. @@ -2666,11 +2666,11 @@ Getting Y ${pixelY}-${pixelY + drawSizeY}`); const allTotal = this.allPixelsTotal.toString().length > 7 ? this.allPixelsTotal.toString().slice(0, 2) + "\u2026" + this.allPixelsTotal.toString().slice(-3) : this.allPixelsTotal.toString(); this.updateInnerHTML("#bm-filter-windowed-color-totals", `${allCorrect}/${allTotal}`, true); } - this.updateInnerHTML("#bm-filter-tile-load", `Tiles Loaded: ${localizeNumber(this.tilesLoadedTotal)} / ${localizeNumber(this.tilesTotal)}`); - this.updateInnerHTML("#bm-filter-tot-correct", `Correct Pixels: ${localizeNumber(this.allPixelsCorrectTotal)}`); - this.updateInnerHTML("#bm-filter-tot-total", `Total Pixels: ${localizeNumber(this.allPixelsTotal)}`); - this.updateInnerHTML("#bm-filter-tot-remaining", `Remaining: ${localizeNumber((this.allPixelsTotal || 0) - (this.allPixelsCorrectTotal || 0))} (${localizePercent(((this.allPixelsTotal || 0) - (this.allPixelsCorrectTotal || 0)) / (this.allPixelsTotal || 1))})`); - this.updateInnerHTML("#bm-filter-tot-completed", `Completed at: `); + this.updateInnerHTML("#bm-filter-tile-load", `${localizeNumber(this.tilesLoadedTotal)} / ${localizeNumber(this.tilesTotal)}`); + this.updateInnerHTML("#bm-filter-tot-correct", localizeNumber(this.allPixelsCorrectTotal)); + this.updateInnerHTML("#bm-filter-tot-total", localizeNumber(this.allPixelsTotal)); + this.updateInnerHTML("#bm-filter-tot-remaining", `${localizeNumber((this.allPixelsTotal || 0) - (this.allPixelsCorrectTotal || 0))} (${localizePercent(((this.allPixelsTotal || 0) - (this.allPixelsCorrectTotal || 0)) / (this.allPixelsTotal || 1))})`); + this.updateInnerHTML("#bm-filter-tot-completed", ``); if (!colorList) { return colorStatistics; } @@ -2695,7 +2695,7 @@ Getting Y ${pixelY}-${pixelY + drawSizeY}`); } const pixelDesc = document.querySelector(`#${this.windowID} .bm-filter-color[data-id="${colorID}"] .bm-filter-color-pxl-desc`); if (pixelDesc) { - pixelDesc.textContent = `${typeof colorIncorrect == "number" && !isNaN(colorIncorrect) ? colorIncorrect : "???"} incorrect pixel${colorIncorrect == 1 ? "" : "s"}. Completed: ${colorPercent}`; + pixelDesc.innerHTML = `${colorPercent} done
${typeof colorIncorrect == "number" && !isNaN(colorIncorrect) ? colorIncorrect : "???"} off`; } } __privateMethod(this, _WindowFilter_instances, sortColorList_fn).call(this, this.sortPrimary, this.sortSecondary, this.showUnused); @@ -2973,6 +2973,9 @@ Getting Y ${pixelY}-${pixelY + drawSizeY}`); textColorForPaletteColorBackground = "transparent"; } const bgEffectForButtons = textColorForPaletteColorBackground == "white" ? "bm-button-hover-white" : "bm-button-hover-black"; + const colorRGB = color.rgb?.map((channel) => Number(channel) || 0).join(","); + const colorCardText = color.id == -2 || color.id == -1 || color.id == 0 ? "white" : textColorForPaletteColorBackground; + const colorCardStyle = `--bm-filter-card-bg: rgb(${colorRGB}); --bm-filter-card-fg: ${colorCardText};`; const { colorCorrect, colorCorrectLocalized, @@ -2990,13 +2993,14 @@ Getting Y ${pixelY}-${pixelY + drawSizeY}`); "data-id": color.id, "data-name": color.name, "data-premium": +color.premium, + "data-state": isColorHidden ? "hidden" : "shown", "data-correct": !Number.isNaN(parseInt(colorCorrect)) ? colorCorrect : "0", "data-total": colorTotal, "data-percent": colorPercent.slice(-1) == "%" ? colorPercent.slice(0, -1) : "0", "data-incorrect": colorIncorrect || 0 }, (instance, div) => __privateMethod(this, _WindowFilter_instances, initializeColorBlockToggle_fn).call(this, div, color)).addDiv({ "class": "bm-filter-container-rgb", "style": `background-color: rgb(${color.rgb?.map((channel) => Number(channel) || 0).join(",")});${color.premium ? styleBackgroundStar : ""}` }).addButton( { - "class": "bm-button-trans " + bgEffectForButtons, + "class": "bm-button-trans bm-filter-color-visibility " + bgEffectForButtons, "data-state": isColorHidden ? "hidden" : "shown", "aria-label": isColorHidden ? `Show the color ${color.name || ""} on templates.` : `Hide the color ${color.name || ""} on templates.`, "innerHTML": isColorHidden ? this.eyeClosed : this.eyeOpen, @@ -3016,20 +3020,22 @@ Getting Y ${pixelY}-${pixelY + drawSizeY}`); } else { colorList.addDiv({ "class": "bm-container bm-filter-color bm-flex-between", + "style": colorCardStyle, "data-id": color.id, "data-name": color.name, "data-premium": +color.premium, + "data-state": isColorHidden ? "hidden" : "shown", "data-correct": !Number.isNaN(parseInt(colorCorrect)) ? colorCorrect : "0", "data-total": colorTotal, "data-percent": colorPercent.slice(-1) == "%" ? colorPercent.slice(0, -1) : "0", "data-incorrect": colorIncorrect || 0 - }, (instance, div) => __privateMethod(this, _WindowFilter_instances, initializeColorBlockToggle_fn).call(this, div, color)).addDiv({ "class": "bm-flex-center", "style": "flex-direction: column;" }).addDiv({ "class": "bm-filter-container-rgb", "style": `background-color: rgb(${color.rgb?.map((channel) => Number(channel) || 0).join(",")});` }).addButton( + }, (instance, div) => __privateMethod(this, _WindowFilter_instances, initializeColorBlockToggle_fn).call(this, div, color)).addDiv({ "class": "bm-filter-premium-star", "aria-hidden": "true" }).buildElement().addDiv({ "class": "bm-filter-color-main" }).addDiv({ "class": "bm-filter-container-rgb" }).addButton( { - "class": "bm-button-trans " + bgEffectForButtons, + "class": "bm-button-trans bm-filter-color-visibility " + bgEffectForButtons, "data-state": isColorHidden ? "hidden" : "shown", "aria-label": isColorHidden ? `Show the color ${color.name || ""} on templates.` : `Hide the color ${color.name || ""} on templates.`, "innerHTML": isColorHidden ? this.eyeClosed : this.eyeOpen, - "style": `color: ${textColorForPaletteColorBackground};` + "style": `color: ${colorCardText};` }, (instance, button) => { button.onclick = (event) => { @@ -3041,7 +3047,7 @@ Getting Y ${pixelY}-${pixelY + drawSizeY}`); } __privateMethod(this, _WindowFilter_instances, syncColorToggleLabel_fn).call(this, button, color); } - ).buildElement().buildElement().addSmall({ "textContent": color.id == -2 ? "???????" : colorValueHex }).buildElement().buildElement().addDiv({ "class": "bm-flex-between" }).addHeader(2, { "textContent": (color.premium ? "\u2605 " : "") + color.name }).buildElement().addDiv({ "class": "bm-flex-between", "style": "gap: 1.5ch;" }).addSmall({ "textContent": `#${color.id.toString().padStart(2, 0)}` }).buildElement().addSmall({ "class": "bm-filter-color-pxl-cnt", "textContent": `${colorCorrectLocalized} / ${colorTotalLocalized}` }).buildElement().buildElement().addP({ "class": "bm-filter-color-pxl-desc", "textContent": `${typeof colorIncorrect == "number" && !isNaN(colorIncorrect) ? colorIncorrect : "???"} incorrect pixel${colorIncorrect == 1 ? "" : "s"}. Completed: ${colorPercent}` }).buildElement().buildElement().buildElement(); + ).buildElement().buildElement().addDiv({ "class": "bm-filter-color-title" }).addSmall({ "textContent": `#${color.id.toString().padStart(2, 0)} / ${color.id == -2 ? "mixed" : colorValueHex}` }).buildElement().addHeader(2, { "textContent": color.name }).buildElement().buildElement().buildElement().addDiv({ "class": "bm-filter-color-meta" }).addDiv({ "class": "bm-filter-color-progress" }).addSpan({ "class": "bm-filter-color-pxl-cnt", "textContent": `${colorCorrectLocalized} / ${colorTotalLocalized}` }).buildElement().addSmall({ "class": "bm-filter-color-pxl-desc", "innerHTML": `${colorPercent} done
${typeof colorIncorrect == "number" && !isNaN(colorIncorrect) ? colorIncorrect : "???"} off` }).buildElement().buildElement().buildElement().buildElement(); } } colorList.buildOverlay(parentElement); @@ -3093,7 +3099,7 @@ Getting Y ${pixelY}-${pixelY + drawSizeY}`); if (color.classList?.contains("bm-color-hide")) { continue; } - const button = color.querySelector(".bm-filter-container-rgb button"); + const button = color.querySelector(".bm-filter-color-visibility"); if (button.dataset["state"] == "hidden" && !userWantsUnselect) { continue; } @@ -3111,7 +3117,9 @@ Getting Y ${pixelY}-${pixelY + drawSizeY}`); syncColorToggleLabel_fn = function(button, color) { const ariaLabel = button.dataset["state"] == "hidden" ? `Show the color ${color.name || ""} on templates.` : `Hide the color ${color.name || ""} on templates.`; button.ariaLabel = ariaLabel; - button.closest(".bm-filter-color")?.setAttribute("aria-label", ariaLabel); + const colorElement = button.closest(".bm-filter-color"); + colorElement?.setAttribute("aria-label", ariaLabel); + colorElement?.setAttribute("data-state", button.dataset["state"]); }; /** Toggles a color from the clickable color block or its icon. * @param {HTMLButtonElement} button - The color visibility button @@ -3153,7 +3161,7 @@ Getting Y ${pixelY}-${pixelY + drawSizeY}`); if (event.target instanceof Element && event.target.closest("button, a, input, select, textarea")) { return; } - const button = colorElement.querySelector(".bm-filter-container-rgb button"); + const button = colorElement.querySelector(".bm-filter-color-visibility"); __privateMethod(this, _WindowFilter_instances, toggleColorVisibility_fn).call(this, button, color); }; colorElement.onkeydown = (event) => { @@ -4652,4 +4660,4 @@ Time Since Blink: ${String(Math.floor(elapsed / 6e4)).padStart(2, "0")}:${String } })(); -// Build Hash: f552d070dbe3 +// Build Hash: a2ac3a13a36f diff --git a/dist/BlueMarble-Standalone.user.js b/dist/BlueMarble-Standalone.user.js index 35dcd60..f6ce29a 100644 --- a/dist/BlueMarble-Standalone.user.js +++ b/dist/BlueMarble-Standalone.user.js @@ -38,6 +38,6 @@ The "Blue Marble" image is owned by NASA. */ -(()=>{var t=t=>{throw TypeError(t)},e=(e,i,s)=>i.has(e)?t("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(e):i.set(e,s),i=(e,i,s)=>(((e,i)=>{i.has(e)||t("Cannot access private method")})(e,i),s);function s(t){return new Promise(e=>setTimeout(e,t))}function n(t){return(new Intl.NumberFormat).format(t)}function o(t){return new Intl.NumberFormat(void 0,{style:"percent",t:2,i:2}).format(t)}function a(t){return t.toLocaleString(void 0,{o:"long",l:"numeric",h:"2-digit",m:"2-digit",u:"2-digit"})}function r(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}function l(...t){(0,console.log)(...t)}function h(...t){(0,console.error)(...t)}function c(...t){(0,console.warn)(...t)}function m(t,e){if(0===t)return e[0];let i="";const s=e.length;for(;t>0;)i=e[t%s]+i,t=Math.floor(t/s);return i}function d(t,e){let i=0;const s=e.length;for(const n of t){const t=e.indexOf(n);-1==t&&h(`Invalid character '${n}' encountered whilst decoding! Is the decode alphabet/base incorrect?`),i=i*s+t}return i}function u(t){let e="";for(let i=0;i(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4));return.2126*e[0]+.7152*e[1]+.0722*e[2]}function f(t,e,i){return Array.isArray(t)&&([t,e,i]=t),(1<<24|t<<16|e<<8|i).toString(16).slice(1)}var g,w,x,y=[{id:0,premium:!1,name:"Transparent",rgb:[0,0,0]},{id:1,premium:!1,name:"Black",rgb:[0,0,0]},{id:2,premium:!1,name:"Dark Gray",rgb:[60,60,60]},{id:3,premium:!1,name:"Gray",rgb:[120,120,120]},{id:4,premium:!1,name:"Light Gray",rgb:[210,210,210]},{id:5,premium:!1,name:"White",rgb:[255,255,255]},{id:6,premium:!1,name:"Deep Red",rgb:[96,0,24]},{id:7,premium:!1,name:"Red",rgb:[237,28,36]},{id:8,premium:!1,name:"Orange",rgb:[255,127,39]},{id:9,premium:!1,name:"Gold",rgb:[246,170,9]},{id:10,premium:!1,name:"Yellow",rgb:[249,221,59]},{id:11,premium:!1,name:"Light Yellow",rgb:[255,250,188]},{id:12,premium:!1,name:"Dark Green",rgb:[14,185,104]},{id:13,premium:!1,name:"Green",rgb:[19,230,123]},{id:14,premium:!1,name:"Light Green",rgb:[135,255,94]},{id:15,premium:!1,name:"Dark Teal",rgb:[12,129,110]},{id:16,premium:!1,name:"Teal",rgb:[16,174,166]},{id:17,premium:!1,name:"Light Teal",rgb:[19,225,190]},{id:18,premium:!1,name:"Dark Blue",rgb:[40,80,158]},{id:19,premium:!1,name:"Blue",rgb:[64,147,228]},{id:20,premium:!1,name:"Cyan",rgb:[96,247,242]},{id:21,premium:!1,name:"Indigo",rgb:[107,80,246]},{id:22,premium:!1,name:"Light Indigo",rgb:[153,177,251]},{id:23,premium:!1,name:"Dark Purple",rgb:[120,12,153]},{id:24,premium:!1,name:"Purple",rgb:[170,56,185]},{id:25,premium:!1,name:"Light Purple",rgb:[224,159,249]},{id:26,premium:!1,name:"Dark Pink",rgb:[203,0,122]},{id:27,premium:!1,name:"Pink",rgb:[236,31,128]},{id:28,premium:!1,name:"Light Pink",rgb:[243,141,169]},{id:29,premium:!1,name:"Dark Brown",rgb:[104,70,52]},{id:30,premium:!1,name:"Brown",rgb:[149,104,42]},{id:31,premium:!1,name:"Beige",rgb:[248,178,119]},{id:32,premium:!0,name:"Medium Gray",rgb:[170,170,170]},{id:33,premium:!0,name:"Dark Red",rgb:[165,14,30]},{id:34,premium:!0,name:"Light Red",rgb:[250,128,114]},{id:35,premium:!0,name:"Dark Orange",rgb:[228,92,26]},{id:36,premium:!0,name:"Light Tan",rgb:[214,181,148]},{id:37,premium:!0,name:"Dark Goldenrod",rgb:[156,132,49]},{id:38,premium:!0,name:"Goldenrod",rgb:[197,173,49]},{id:39,premium:!0,name:"Light Goldenrod",rgb:[232,212,95]},{id:40,premium:!0,name:"Dark Olive",rgb:[74,107,58]},{id:41,premium:!0,name:"Olive",rgb:[90,148,74]},{id:42,premium:!0,name:"Light Olive",rgb:[132,197,115]},{id:43,premium:!0,name:"Dark Cyan",rgb:[15,121,159]},{id:44,premium:!0,name:"Light Cyan",rgb:[187,250,242]},{id:45,premium:!0,name:"Light Blue",rgb:[125,199,255]},{id:46,premium:!0,name:"Dark Indigo",rgb:[77,49,184]},{id:47,premium:!0,name:"Dark Slate Blue",rgb:[74,66,132]},{id:48,premium:!0,name:"Slate Blue",rgb:[122,113,196]},{id:49,premium:!0,name:"Light Slate Blue",rgb:[181,174,241]},{id:50,premium:!0,name:"Light Brown",rgb:[219,164,99]},{id:51,premium:!0,name:"Dark Beige",rgb:[209,128,81]},{id:52,premium:!0,name:"Light Beige",rgb:[255,197,165]},{id:53,premium:!0,name:"Dark Peach",rgb:[155,82,73]},{id:54,premium:!0,name:"Peach",rgb:[209,128,120]},{id:55,premium:!0,name:"Light Peach",rgb:[250,182,164]},{id:56,premium:!0,name:"Dark Tan",rgb:[123,99,82]},{id:57,premium:!0,name:"Tan",rgb:[156,132,107]},{id:58,premium:!0,name:"Dark Slate",rgb:[51,57,65]},{id:59,premium:!0,name:"Slate",rgb:[109,117,141]},{id:60,premium:!0,name:"Light Slate",rgb:[179,185,209]},{id:61,premium:!0,name:"Dark Stone",rgb:[109,100,63]},{id:62,premium:!0,name:"Stone",rgb:[148,140,107]},{id:63,premium:!0,name:"Light Stone",rgb:[205,197,158]}],$='',v=class{constructor(t,i){e(this,g),this.name=t,this.version=i,this.p=null,this.$=null,this.v="bm-r",this.M=null,this.C=null,this.T=[]}S(t){this.p=t}k(t){this.$=t}N(){return this.T.length>0&&(this.C=this.T.pop()),this}D(t){t?.appendChild(this.M),this.M=null,this.C=null,this.T=[]}L(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"div",{},t)),this}H(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"p",{},t)),this}O(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"small",{},t)),this}I(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"span",{},t)),this}B(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"details",{},t)),this}P(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"summary",{},t)),this}A(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"img",{},t)),this}F(t,e={},s=()=>{}){return s(this,i(this,g,w).call(this,"h"+t,{},e)),this}W(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"hr",{},t)),this}U(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"br",{},t)),this}V(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"form",{},t)),this}G(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"fieldset",{},t)),this}R(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"legend",{},t)),this}j(t={},e=()=>{}){const s={};t.textContent?(s.textContent=t.textContent,delete t.textContent):t.innerHTML&&(s.innerHTML=t.innerHTML,delete t.textContent);const n=i(this,g,w).call(this,"label",s),o=i(this,g,w).call(this,"input",{type:"checkbox"},t);return n.insertBefore(o,n.firstChild),this.N(),e(this,n,o),this}Y(t={},e=()=>{}){const s=i(this,g,w).call(this,"label",{textContent:t.textContent??"",for:t.id??""});return delete t.textContent,this.N(),e(this,s,i(this,g,w).call(this,"select",{},t)),this}J(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"option",{},t)),this}X(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"ol",{},t)),this}_(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"ul",{},t)),this}q(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"menu",{},t)),this}Z(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"li",{},t)),this}K(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"table",{},t)),this}tt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"caption",{},t)),this}et(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"thead",{},t)),this}it(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"tbody",{},t)),this}st(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"tfoot",{},t)),this}nt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"tr",{},t)),this}ot(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"th",{},t)),this}rt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"td",{},t)),this}lt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"button",{},t)),this}ht(t={},e=()=>{}){const s=t.title??t.textContent??"Help: No info";delete t.textContent,t.title=`Help: ${s}`;const n={textContent:"?",className:"bm-10",onclick:()=>{this.ct(this.v,s)}};return e(this,i(this,g,w).call(this,"button",n,t)),this}dt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"input",{},t)),this}ut(t={},e=()=>{}){const s=t.textContent??"";delete t.textContent;const n=i(this,g,w).call(this,"div"),o=i(this,g,w).call(this,"input",{type:"file",tabindex:"-1","aria-hidden":"true"},t);this.N();const a=i(this,g,w).call(this,"button",{textContent:s});return this.N(),this.N(),a.addEventListener("click",()=>{o.click()}),o.addEventListener("change",()=>{a.style.maxWidth=`${a.offsetWidth}px`,o.files.length>0?a.textContent=o.files[0].name:a.textContent=s}),e(this,n,o,a),this}bt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"textarea",{},t)),this}ft(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"div",{class:"bm-S"},t)),this}gt(t=Date.now(),e=500,s={},n=()=>{}){const o="bm--",a=s?.id||o+"-"+crypto.randomUUID().slice(0,8),r={class:o},l=i(this,g,w).call(this,"time",r,s);return l.id=a,l.dataset.endDate=t,setInterval(()=>{if(!l.isConnected)return;const t=Math.max(l.dataset.endDate-Date.now(),0),e=Math.floor(t/1e3),i=Math.floor(e/3600),s=Math.floor(e%60),n=Math.floor(e%3600/60);l.setAttribute("datetime",`PT${i}H${n}M${s}S`),l.textContent=String(i).padStart(2,"0")+":"+String(n).padStart(2,"0")+":"+String(s).padStart(2,"0")},e),n(this,l),this}ct(t,e,i=!1){const s=document.getElementById(t.replace(/^#/,""));s&&(s instanceof HTMLInputElement?s.value=e:i?s.textContent=e:s.innerHTML=e)}wt(t){if(t.disabled)return;t.disabled=!0,t.style.textDecoration="none";const e=t.closest(".bm-W"),i=t.closest(".bm-S"),s=e?.querySelector("h1"),n=e?.querySelector(".bm-m");if(!e||!i||!n)return t.disabled=!1,void(t.style.textDecoration="");const o=e=>{let i,s=!1;const o=()=>{s||(s=!0,clearTimeout(i),n.removeEventListener("transitionend",a),e(),t.disabled=!1,t.style.textDecoration="")},a=t=>{t.target==n&&"height"==t.propertyName&&o()};n.addEventListener("transitionend",a),i=setTimeout(o,360)};if(e.parentElement.append(e),"expanded"==t.dataset.buttonStatus){e.dataset.widthBeforeMinimize=e.style.width,e.dataset.heightBeforeMinimize=e.style.height,e.dataset.minHeightBeforeMinimize=e.style.minHeight,n.style.height=n.scrollHeight+"px",n.offsetHeight,e.style.width||(e.style.width=e.scrollWidth+"px"),o(()=>{n.style.display="none"}),n.style.height="0",(e.style.height||e.classList.contains("bm-N"))&&(e.style.minHeight="0px",e.style.height=(()=>{const t=getComputedStyle(e),s=t=>parseFloat(t)||0,n="border-box"==t.boxSizing?s(t.paddingTop)+s(t.paddingBottom)+s(t.borderTopWidth)+s(t.borderBottomWidth):0;return Math.ceil(i.getBoundingClientRect().height+n+2)})()+"px");const a=s?.cloneNode(!0)??document.createElement("h1"),r=a.textContent;t.nextElementSibling.appendChild(a),t.innerHTML='',t.dataset.buttonStatus="collapsed",t.ariaLabel=`Unminimize window "${r}"`}else{const s=i.querySelector("h1"),a=s.textContent;s.remove(),n.style.display="",n.style.height="0",e.style.width=e.dataset.widthBeforeMinimize??"",e.style.minHeight=e.dataset.minHeightBeforeMinimize??"",e.style.height=e.dataset.heightBeforeMinimize??"",n.offsetHeight,o(()=>{n.style.height="",delete e.dataset.widthBeforeMinimize,delete e.dataset.heightBeforeMinimize,delete e.dataset.minHeightBeforeMinimize}),n.style.height=n.scrollHeight+"px",t.innerHTML=$,t.dataset.buttonStatus="expanded",t.ariaLabel=`Minimize window "${a}"`}}xt(t,e,i={}){const s=document.querySelector(t),n=document.querySelector(e),o=i?.yt??(()=>{});if(!s||!n)return void this.$t(`Can not drag! ${s?"":"moveMe"} ${s||n?"":"and "}${n?"":"iMoveThings "}was not found!`);let a,r=!1,l=0,h=null,c=0,m=0,d=0,u=0,b=null;const p=()=>{if(r){const t=Math.abs(c-d),e=Math.abs(m-u);(t>.5||e>.5)&&(c=d,m=u,s.style.transform=`translate(${c}px, ${m}px)`,s.style.left="0px",s.style.top="0px",s.style.right=""),h=requestAnimationFrame(p)}},f=(t,e)=>{r=!0,b=s.getBoundingClientRect(),a=t-b.left,l=e-b.top;const i=window.getComputedStyle(s).transform;if(i&&"none"!==i){const t=new DOMMatrix(i);c=t.m41,m=t.m42}else c=b.left,m=b.top;d=c,u=m,document.body.style.userSelect="none",n.classList.add("bm-M"),document.addEventListener("mousemove",w),document.addEventListener("touchmove",x,{passive:!1}),document.addEventListener("mouseup",g),document.addEventListener("touchend",g),document.addEventListener("touchcancel",g),h&&cancelAnimationFrame(h),p()},g=()=>{r=!1,h&&(cancelAnimationFrame(h),h=null),document.body.style.userSelect="",n.classList.remove("bm-M"),document.removeEventListener("mousemove",w),document.removeEventListener("touchmove",x),document.removeEventListener("mouseup",g),document.removeEventListener("touchend",g),document.removeEventListener("touchcancel",g),o({element:s,x:c,y:m}),b=null},w=t=>{r&&b&&(d=t.clientX-a,u=t.clientY-l)},x=t=>{if(r&&b){const e=t.touches[0];if(!e)return;d=e.clientX-a,u=e.clientY-l,t.preventDefault()}};n.addEventListener("mousedown",function(t){t.preventDefault(),f(t.clientX,t.clientY)}),n.addEventListener("touchstart",function(t){const e=t?.touches?.[0];e&&(f(e.clientX,e.clientY),t.preventDefault())},{passive:!1})}vt(t,e,i={}){const s=document.querySelector(t),n=document.querySelector(e),o=i?.yt??(()=>{});if(!s||!n)return void this.$t(`Can not resize! ${s?"":"resizeMe"} ${s||n?"":"and "}${n?"":"iResizeThings "}was not found!`);let a=!1,r=0,l=0,h=0,c=0,m=0,d=0,u=0,b=0,p=null;const f=()=>Number.isFinite(i?.maxWidth)?i.maxWidth:window.innerWidth-16,g=()=>Number.isFinite(i?.maxHeight)?i.maxHeight:window.innerHeight-16,w=Number.isFinite(i?.minWidth)?i.minWidth:200,x=Number.isFinite(i?.minHeight)?i.minHeight:160,y=(t,e,i)=>Math.min(Math.max(t,e),Math.max(e,i)),$=()=>{if(a){const t=Math.abs(m-u),e=Math.abs(d-b);(t>.5||e>.5)&&(m=u,d=b,s.style.width=`${m}px`,s.style.height=`${d}px`),p=requestAnimationFrame($)}},v=(t,e)=>{a=!0,r=t,l=e,h=s.offsetWidth,c=s.offsetHeight,m=h,d=c,u=h,b=c,document.body.style.userSelect="none",n.classList.add("bm-2h"),document.addEventListener("mousemove",C),document.addEventListener("touchmove",T,{passive:!1}),document.addEventListener("mouseup",M),document.addEventListener("touchend",M),document.addEventListener("touchcancel",M),p&&cancelAnimationFrame(p),$()},M=()=>{a=!1,p&&(cancelAnimationFrame(p),p=null),document.body.style.userSelect="",n.classList.remove("bm-2h"),document.removeEventListener("mousemove",C),document.removeEventListener("touchmove",T),document.removeEventListener("mouseup",M),document.removeEventListener("touchend",M),document.removeEventListener("touchcancel",M),o({element:s,width:m,height:d})},C=t=>{a&&(u=y(h+(t.clientX-r),w,f()),b=y(c+(t.clientY-l),x,g()))},T=t=>{if(!a)return;const e=t?.touches?.[0];e&&(u=y(h+(e.clientX-r),w,f()),b=y(c+(e.clientY-l),x,g()),t.preventDefault())};n.addEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),v(t.clientX,t.clientY)}),n.addEventListener("touchstart",t=>{const e=t?.touches?.[0];e&&(t.preventDefault(),t.stopPropagation(),v(e.clientX,e.clientY))},{passive:!1})}Mt(t){(0,console.info)(`${this.name}: ${t}`),this.ct(this.v,"Status: "+t,!0)}$t(t){(0,console.error)(`${this.name}: ${t}`),this.ct(this.v,"Error: "+t,!0)}};g=new WeakSet,w=function(t,e={},s={}){const n=document.createElement(t);this.M?(this.C?.appendChild(n),this.T.push(this.C),this.C=n):(this.M=n,this.C=n);for(const[t,s]of Object.entries(e))i(this,g,x).call(this,n,t,s);for(const[t,e]of Object.entries(s))i(this,g,x).call(this,n,t,e);return n},x=function(t,e,i){"class"==e?t.classList.add(...i.split(/\s+/)):"for"==e?t.htmlFor=i:"tabindex"==e?t.tabIndex=Number(i):"readonly"==e?t.readOnly="true"==i||"1"==i:"maxlength"==e?t.maxLength=Number(i):e.startsWith("data")?t.dataset[e.slice(5).split("-").map((t,e)=>0==e?t:t[0].toUpperCase()+t.slice(1)).join("")]=i:e.startsWith("aria")?t.setAttribute(e,i):t[e]=i};var M,C,T,S,k,N,D,L,H,O,I,B,P,A=class extends v{constructor(t,i){super(t,i),e(this,M),this.window=null,this.Ct="bm-l",this.Tt=document.body,this.St="windowSettings"}kt(){document.querySelector(`#${this.Ct}`)?i(this,M,T).call(this):(this.window=this.L({id:this.Ct,class:"bm-W"}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Settings"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>t.wt(e),e.ontouchend=()=>{e.click()}}).N().L().N().L({class:"bm-D"}).lt({class:"bm-s",innerHTML:'',"aria-label":'Close window "Settings"'},(t,e)=>{e.onclick=()=>i(this,M,T).call(this),e.ontouchend=()=>{e.click()}}).N().N().N().L({class:"bm-m"}).L({class:"bm-L bm-h"}).F(1,{textContent:"Settings"}).N().N().W().N().H({textContent:"Settings take 5 seconds to save."}).N().L({class:"bm-L bm-H"},(t,e)=>{this.Nt(),this.Dt()}).N().N().N().D(this.Tt),i(this,M,D).call(this))}Nt(){i(this,M,L).call(this,"Pixel Highlight")}Dt(){i(this,M,L).call(this,"Template")}};M=new WeakSet,C=function(){var t,e;return this.Lt?((t=this.Lt)[e=this.St]??(t[e]={}),this.Lt[this.St]):null},T=function(){const t=document.querySelector(`#${this.Ct}`);i(this,M,N).call(this,t),t?.remove()},S=function(t,e,i){const s=Math.max(8,window.innerWidth-t.offsetWidth-8),n=Math.max(8,window.innerHeight-t.offsetHeight-8);return{x:Math.min(Math.max(Math.round(Number(e)||8),8),s),y:Math.min(Math.max(Math.round(Number(i)||8),8),n)}},k=function(t){const e=i(this,M,C).call(this);e&&t&&requestAnimationFrame(()=>{if(!t.isConnected)return;const s=Number(e.x),n=Number(e.y);if(!Number.isFinite(s)||!Number.isFinite(n))return;const o=i(this,M,S).call(this,t,s,n);t.style.left="0px",t.style.top="0px",t.style.right="",t.style.transform=`translate(${o.x}px, ${o.y}px)`,o.x==s&&o.y==n||(e.x=o.x,e.y=o.y,this.Ht?.())})},N=function(t){const e=i(this,M,C).call(this);if(!e||!t?.isConnected)return;const s=t.getBoundingClientRect(),n=i(this,M,S).call(this,t,s.left,s.top);t.style.left="0px",t.style.top="0px",t.style.right="",t.style.transform=`translate(${n.x}px, ${n.y}px)`,e.x=n.x,e.y=n.y,this.Ht?.()},D=function(){const t=document.querySelector(`#${this.Ct}.bm-W`);t&&(i(this,M,k).call(this,t),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`,{yt:({element:t})=>i(this,M,N).call(this,t)}))},L=function(t){this.window=this.L({class:"bm-L"}).F(2,{textContent:t}).N().W().N().H({innerHTML:`An error occured loading the ${t} category. SettingsManager failed to override the ${t} function inside WindowSettings.`}).N().N()},H=new WeakSet,O=function(t,e){t.disabled=!0;const i=t.dataset.status,s=this.Lt?.highlight??[[1,0,1],[2,0,0],[1,-1,0],[1,1,0],[1,0,-1]];let n=[2,0,0];const o=s;switch(i){case"Disabled":t.dataset.status="Incorrect",t.ariaLabel="Sub-pixel incorrect",n=[1,...e];break;case"Incorrect":t.dataset.status="Template",t.ariaLabel="Sub-pixel template",n=[2,...e];break;case"Template":t.dataset.status="Disabled",t.ariaLabel="Sub-pixel disabled",n=[0,...e];break}const a=s.findIndex(([,t,e])=>t==n[1]&&e==n[2]);0!=n[0]?-1!=a?o[a]=n:o.push(n):-1!=a&&o.splice(a,1),this.Lt.highlight=o,t.disabled=!1},I=async function(t){const e=document.querySelectorAll(".bm-3 button");for(const t of e)t.disabled=!0;let i=[0,0,0,0,2,0,0,0,0];switch(t){case"Cross":i=[0,1,0,1,2,1,0,1,0];break;case"X":i=[1,0,1,0,2,0,1,0,1];break;case"Full":i=[2,2,2,2,2,2,2,2,2];break}const n=document.querySelector(".bm-n")?.childNodes??[];for(let t=0;t{const[s,n,o,a]=e.split(",").map(Number);(n>>24==0?0:n.get(e)??-2;const a=o.get(s);o.set(s,a?a+1:1)}return console.log(o),o};var F=class{constructor(){this.qt=Math.ceil(80/1300*window.innerWidth),this.Zt=y.slice(1)}Kt(t){const e=document.createElement("div");for(let t=0;t{t.parentNode.childElementCount<=1?t.parentNode.remove():t.remove()},e.appendChild(t)}t.appendChild(e)}},W=class extends HTMLElement{};customElements.define("confetti-piece",W);var U,V,G,R,j,E,Y,J,X,_,q,Z,K,Q,tt,et,it,st,nt,ot,at,rt,lt,ht,ct,mt,dt,ut,bt='',pt='',ft=class extends v{constructor(t){super(t.name,t.version),e(this,U),this.window=null,this.Ct="bm-t",this.Qt="bm-E",this.Tt=document.body,this.$=t.$??null,this.te="ftr-oWin",this.St="windowFilter",this.ee=null,this.ie=null,this.se=null,this.ne=null,this.oe=1e4,this.ae=360,this.re=220,this.le=1e3,this.he=1400,this.ce=t.p?.ce,this.me='',this.de='';const{palette:i,_t:s}=this.ce.ue;this.palette=i,this.be=0,this.pe=0,this.fe=new Map,this.ge=new Map,this.we=0,this.xe=0,this.timeRemaining=0,this.ye="",this.sortPrimary="total",this.sortSecondary="descending",this.showUnused=!1}$e(){i(this,U,G).call(this)?this.ve():this.kt()}kt(){if(document.querySelector(`#${this.Ct}`))return void i(this,U,E).call(this);this.window=this.L({id:this.Ct,class:"bm-W"},(t,e)=>{}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Color Filter"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>t.wt(e),e.ontouchend=()=>{e.click()}}).N().L().N().L({class:"bm-D"}).lt({class:"bm-s",innerHTML:pt,"aria-label":'Switch to windowed mode for "Color Filter"'},(t,e)=>{e.onclick=()=>{i(this,U,R).call(this,!0),i(this,U,E).call(this),this.ve()},e.ontouchend=()=>{e.click()}}).N().lt({class:"bm-s",innerHTML:bt,"aria-label":'Close window "Color Filter"'},(t,e)=>{e.onclick=()=>i(this,U,E).call(this),e.ontouchend=()=>{e.click()}}).N().N().N().L({class:"bm-m"}).L({class:"bm-L bm-h bm-1O"}).F(1,{textContent:"Color Filter"}).N().N().W().N().L({class:"bm-L bm-x bm-h bm-1G",style:"gap: 1.5ch;"}).lt({class:"bm-1v",textContent:"Hide All Colors"},(t,e)=>{e.onclick=()=>i(this,U,st).call(this,!1)}).N().lt({class:"bm-1v",textContent:"Show All Colors"},(t,e)=>{e.onclick=()=>i(this,U,st).call(this,!0)}).N().N().W().N().L({class:"bm-L bm-H bm-1s"}).L({class:"bm-L bm-1B",style:"margin-left: 2.5ch; margin-right: 2.5ch;"}).L({class:"bm-L bm-1t"}).I({id:"bm-i",innerHTML:"Tiles Loaded: 0 / ???"}).N().U().N().I({id:"bm-d",innerHTML:"Correct Pixels: ???"}).N().U().N().I({id:"bm-j",innerHTML:"Total Pixels: ???"}).N().U().N().I({id:"bm-7",innerHTML:"Complete: ??? (???)"}).N().U().N().I({id:"bm-8",innerHTML:"??? ???"}).N().N().L({class:"bm-L bm-21"}).H({innerHTML:`Press the ${pt.replace("{e.onclick=t=>{t.preventDefault();const e=new FormData(document.querySelector(`#${this.Ct} form`)),s={};for(const[t,i]of e)s[t]=i;console.log(`Primary: ${s.sortPrimary}; Secondary: ${s.sortSecondary}; Unused: ${"on"==s.showUnused}`),i(this,U,it).call(this,s.sortPrimary,s.sortSecondary,"on"==s.showUnused)}}).N().N().N().N().N().N().N().D(this.Tt),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`);const t=document.querySelector(`#${this.Ct} .bm-L.bm-H`);i(this,U,et).call(this,t),i(this,U,j).call(this),i(this,U,it).call(this,this.sortPrimary,this.sortSecondary,this.showUnused),this.ct("#bm-i",`Tiles Loaded: ${n(this.be)} / ${n(this.pe)}`),this.ct("#bm-d",`Correct Pixels: ${n(this.we)}`),this.ct("#bm-j",`Total Pixels: ${n(this.xe)}`),this.ct("#bm-7",`Remaining: ${n((this.xe||0)-(this.we||0))} (${o(((this.xe||0)-(this.we||0))/(this.xe||1))})`),this.ct("#bm-8",`Completed at: `),i(this,U,Y).call(this)}ve(){if(document.querySelector(`#${this.Ct}`))return void i(this,U,E).call(this);this.window=this.L({id:this.Ct,class:"bm-W bm-N",style:`width: 360px; height: min(70vh, 32rem); min-width: ${this.ae}px; min-height: ${this.re}px; max-width: min(${this.le}px, calc(100vw - 16px)); max-height: min(${this.he}px, calc(100vh - 16px));`}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Color Filter"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>{const i=document.querySelector("#bm-2");i&&(i.style.display="expanded"==e.dataset.buttonStatus?"none":""),t.wt(e)},e.ontouchend=()=>{e.click()}}).N().L().I({id:"bm-2",class:"bm-y",style:"font-weight: 700;"}).N().N().L({class:"bm-D"}).lt({class:"bm-s",innerHTML:'',"aria-label":'Switch to fullscreen mode for "Color Filter"'},(t,e)=>{e.onclick=()=>{i(this,U,R).call(this,!1),i(this,U,E).call(this),this.kt()},e.ontouchend=()=>{e.click()}}).N().lt({class:"bm-s",innerHTML:bt,"aria-label":'Close window "Color Filter"'},(t,e)=>{e.onclick=()=>i(this,U,E).call(this),e.ontouchend=()=>{e.click()}}).N().N().N().L({class:"bm-m"}).L({class:"bm-L bm-h bm-1O"}).F(1,{textContent:"Color Filter"}).N().N().W().N().L({class:"bm-L bm-x bm-h bm-1G",style:"gap: 1.5ch;"}).lt({class:"bm-1v",textContent:"None"},(t,e)=>{e.onclick=()=>i(this,U,st).call(this,!1)}).N().lt({class:"bm-1v",textContent:"All"},(t,e)=>{e.onclick=()=>i(this,U,st).call(this,!0)}).N().N().W().N().L({class:"bm-L bm-H bm-1s"}).N().N().L({class:"bm-1P",title:"Resize Color Filter window","aria-label":"Resize Color Filter window",role:"presentation",textContent:"◢",style:"position: absolute; right: 0; bottom: 0; width: 28px; height: 28px; display: flex; align-items: flex-end; justify-content: flex-end; padding-right: 4px; padding-bottom: 4px; box-sizing: border-box; z-index: 5; cursor: nwse-resize; pointer-events: auto; touch-action: none; user-select: none; font-size: 8px; line-height: 1; color: rgba(255,255,255,0.95); background: transparent; border: none; box-shadow: none;"}).N().N().D(this.Tt),i(this,U,tt).call(this);const t=document.querySelector(`#${this.Ct} .bm-L.bm-H`);i(this,U,et).call(this,t),i(this,U,j).call(this),i(this,U,it).call(this,this.sortPrimary,this.sortSecondary,this.showUnused),i(this,U,Y).call(this)}Me(){i(this,U,rt).call(this);const t=document.querySelector(`#${this.Qt}`),e={};for(const t of this.palette){const i=this.fe.get(t.id)??0,s=n(i);let a=0,r="0",l=o(1);0!=i&&(a=this.ge.get(t.id)??"???","number"!=typeof a&&this.be==this.pe&&t.id&&(a=0),r="string"==typeof a?a:n(a),l=isNaN(a/i)?"???":o(a/i));const h=parseInt(i)-parseInt(a);e[t.id]={Ce:i,Te:s,Se:a,ke:r,Ne:l,De:h}}if(document.querySelector("#bm-2")){const t=this.we.toString().length>7?this.we.toString().slice(0,2)+"…"+this.we.toString().slice(-3):this.we.toString(),e=this.xe.toString().length>7?this.xe.toString().slice(0,2)+"…"+this.xe.toString().slice(-3):this.xe.toString();this.ct("#bm-2",`${t}/${e}`,!0)}if(this.ct("#bm-i",`Tiles Loaded: ${n(this.be)} / ${n(this.pe)}`),this.ct("#bm-d",`Correct Pixels: ${n(this.we)}`),this.ct("#bm-j",`Total Pixels: ${n(this.xe)}`),this.ct("#bm-7",`Remaining: ${n((this.xe||0)-(this.we||0))} (${o(((this.xe||0)-(this.we||0))/(this.xe||1))})`),this.ct("#bm-8",`Completed at: `),!t)return e;const s=Array.from(t.children);for(const t of s){const i=parseInt(t.dataset.id),{Se:s,ke:n,Ne:o,Ce:a,Te:r,De:l}=e[i];t.dataset.correct=Number.isNaN(parseInt(s))?"0":s,t.dataset.total=a,t.dataset.percent="%"==o.slice(-1)?o.slice(0,-1):"0",t.dataset.incorrect=l||0;const h=document.querySelector(`#${this.Ct} .bm-z[data-id="${i}"] .bm-9`);h&&(h.textContent=`${n} / ${r}`);const c=document.querySelector(`#${this.Ct} .bm-z[data-id="${i}"] .bm-6`);c&&(c.textContent=`${"number"!=typeof l||isNaN(l)?"???":l} incorrect pixel${1==l?"":"s"}. Completed: ${o}`)}i(this,U,it).call(this,this.sortPrimary,this.sortSecondary,this.showUnused)}};U=new WeakSet,V=function(){var t,e;return this.$?((t=this.$.Lt)[e=this.St]??(t[e]={}),this.$.Lt[this.St]):null},G=function(){const t=i(this,U,V).call(this);return"windowed"==t?.mode||"fullscreen"!=t?.mode},R=function(t){const e=i(this,U,V).call(this);e&&(e.mode=t?"windowed":"fullscreen"),this.$&&(this.$.Le(this.te,t),this.$.Ht())},j=function(){const t=document.querySelector(`#${this.Ct} #bm-c`),e=document.querySelector(`#${this.Ct} #bm-5`),i=document.querySelector(`#${this.Ct} #bm-e`);t instanceof HTMLSelectElement&&(t.value=this.sortPrimary),e instanceof HTMLSelectElement&&(e.value=this.sortSecondary),i instanceof HTMLInputElement&&(i.checked=this.showUnused)},E=function(){const t=document.querySelector(`#${this.Ct}`);t?.classList.contains("bm-N")&&i(this,U,K).call(this,t),i(this,U,J).call(this),i(this,U,X).call(this),t?.remove()},Y=function(){i(this,U,J).call(this),this.ne=setInterval(()=>{document.querySelector(`#${this.Ct}`)?this.Me():i(this,U,J).call(this)},this.oe)},J=function(){this.ne&&(clearInterval(this.ne),this.ne=null)},X=function(){this.ee&&(this.ee.disconnect(),this.ee=null),this.ie&&(window.removeEventListener("resize",this.ie),this.ie=null),this.se&&(clearTimeout(this.se),this.se=null)},_=function(t,e,i){const s=Math.max(e,i);return Math.min(Math.max(Math.round(Number(t)||e),e),s)},q=function(t,e,i){const s=Math.max(8,window.innerWidth-t.offsetWidth-8),n=Math.max(8,window.innerHeight-t.offsetHeight-8);return{x:Math.min(Math.max(Math.round(Number(e)||8),8),s),y:Math.min(Math.max(Math.round(Number(i)||8),8),n)}},Z=function(t){const e=i(this,U,V).call(this);if(!e||!t)return;const s=Number(e.width),n=Number(e.height),o=Number.isFinite(s),a=Number.isFinite(n);o&&(e.width=i(this,U,_).call(this,s,this.ae,Math.min(this.le,window.innerWidth-16)),t.style.width=`${e.width}px`),a&&(e.height=i(this,U,_).call(this,n,this.re,Math.min(this.he,window.innerHeight-16)),t.style.height=`${e.height}px`),requestAnimationFrame(()=>{if(!t.isConnected)return;const s=Number(e.x),n=Number(e.y);if(!Number.isFinite(s)||!Number.isFinite(n))return;const o=i(this,U,q).call(this,t,s,n);t.style.left="0px",t.style.top="0px",t.style.right="",t.style.transform=`translate(${o.x}px, ${o.y}px)`,o.x==s&&o.y==n||(e.x=o.x,e.y=o.y,this.$?.Ht())})},K=function(t){const e=i(this,U,V).call(this);if(!e||!t?.isConnected||!t.classList.contains("bm-N"))return;if(t.querySelector('.bm-S button[data-button-status="collapsed"]'))return;const s=t.getBoundingClientRect(),n=i(this,U,_).call(this,s.width,this.ae,Math.min(this.le,window.innerWidth-16)),o=i(this,U,_).call(this,s.height,this.re,Math.min(this.he,window.innerHeight-16));Math.round(s.width)!=n&&(t.style.width=`${n}px`),Math.round(s.height)!=o&&(t.style.height=`${o}px`);const a=i(this,U,q).call(this,t,s.left,s.top);t.style.left="0px",t.style.top="0px",t.style.right="",t.style.transform=`translate(${a.x}px, ${a.y}px)`,e.x=a.x,e.y=a.y,e.width=n,e.height=o,this.$?.Ht()},Q=function(t,e=150){this.se&&clearTimeout(this.se),this.se=setTimeout(()=>{this.se=null,i(this,U,K).call(this,t)},e)},tt=function(){const t=document.querySelector(`#${this.Ct}.bm-W`);t&&(i(this,U,X).call(this),i(this,U,Z).call(this,t),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`,{yt:({element:t})=>i(this,U,K).call(this,t)}),this.vt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-1P`,{minWidth:this.ae,minHeight:this.re,maxWidth:Math.min(this.le,window.innerWidth-16),maxHeight:Math.min(this.he,window.innerHeight-16),yt:({element:t})=>i(this,U,K).call(this,t)}),"function"==typeof ResizeObserver&&(this.ee=new ResizeObserver(()=>i(this,U,Q).call(this,t)),this.ee.observe(t)),this.ie=()=>i(this,U,Q).call(this,t,0),window.addEventListener("resize",this.ie))},et=function(t){const e=t.closest(`#${this.Ct}`)?.classList.contains("bm-N");console.log(`Is Windowed Mode: ${e}`);const s=new v(this.name,this.version);s.L({id:this.Qt});const n=this.Me();for(const t of this.palette){const o="#"+f(t.rgb).toUpperCase(),a=p(t.rgb);let r=1.05/(a+.05)>(a+.05)/.05?"white":"black";t.id||(r="transparent");const l="white"==r?"bm-f":"bm-g",{Se:h,ke:c,Ne:m,Ce:d,Te:u,De:b}=n[t.id],g=!!this.ce.He.get(t.id);if(e){const e=`background-size: auto 100%; background-repeat: repeat-x; background-image: url("data:image/svg+xml;utf8,");`;s.L({class:"bm-L bm-z bm-x","data-id":t.id,"data-name":t.name,"data-premium":+t.premium,"data-correct":Number.isNaN(parseInt(h))?"0":h,"data-total":d,"data-percent":"%"==m.slice(-1)?m.slice(0,-1):"0","data-incorrect":b||0},(e,s)=>i(this,U,at).call(this,s,t)).L({class:"bm-a",style:`background-color: rgb(${t.rgb?.map(t=>Number(t)||0).join(",")});${t.premium?e:""}`}).lt({class:"bm-A "+l,"data-state":g?"hidden":"shown","aria-label":g?`Show the color ${t.name||""} on templates.`:`Hide the color ${t.name||""} on templates.`,innerHTML:g?this.de:this.me,style:`color: ${r};`},(e,s)=>{s.onclick=e=>{e.stopPropagation(),i(this,U,ot).call(this,s,t)},t.id||(s.disabled=!0),i(this,U,nt).call(this,s,t)}).N().O({textContent:`#${t.id.toString().padStart(2,0)}`,style:`color: ${-1==t.id||0==t.id?"white":r}`}).N().F(2,{textContent:t.name,style:`color: ${-1==t.id||0==t.id?"white":r}`}).N().O({class:"bm-9",textContent:`${c} / ${u}`,style:`color: ${-1==t.id||0==t.id?"white":r}; flex: 1 1 auto; text-align: right;`}).N().N().N()}else s.L({class:"bm-L bm-z bm-x","data-id":t.id,"data-name":t.name,"data-premium":+t.premium,"data-correct":Number.isNaN(parseInt(h))?"0":h,"data-total":d,"data-percent":"%"==m.slice(-1)?m.slice(0,-1):"0","data-incorrect":b||0},(e,s)=>i(this,U,at).call(this,s,t)).L({class:"bm-D",style:"flex-direction: column;"}).L({class:"bm-a",style:`background-color: rgb(${t.rgb?.map(t=>Number(t)||0).join(",")});`}).lt({class:"bm-A "+l,"data-state":g?"hidden":"shown","aria-label":g?`Show the color ${t.name||""} on templates.`:`Hide the color ${t.name||""} on templates.`,innerHTML:g?this.de:this.me,style:`color: ${r};`},(e,s)=>{s.onclick=e=>{e.stopPropagation(),i(this,U,ot).call(this,s,t)},t.id||(s.disabled=!0),i(this,U,nt).call(this,s,t)}).N().N().O({textContent:-2==t.id?"???????":o}).N().N().L({class:"bm-x"}).F(2,{textContent:(t.premium?"★ ":"")+t.name}).N().L({class:"bm-x",style:"gap: 1.5ch;"}).O({textContent:`#${t.id.toString().padStart(2,0)}`}).N().O({class:"bm-9",textContent:`${c} / ${u}`}).N().N().H({class:"bm-6",textContent:`${"number"!=typeof b||isNaN(b)?"???":b} incorrect pixel${1==b?"":"s"}. Completed: ${m}`}).N().N().N()}s.D(t)},it=function(t,e,i){this.sortPrimary=t,this.sortSecondary=e,this.showUnused=i;const s=document.querySelector(`#${this.Qt}`),n=Array.from(s.children);n.sort((s,n)=>{const o=s.getAttribute("data-"+t),a=n.getAttribute("data-"+t),r=parseFloat(o),l=parseFloat(a),h=!isNaN(r),c=!isNaN(l);if(i?s.classList.remove("bm-I"):Number(s.getAttribute("data-total"))||s.classList.add("bm-I"),h&&c)return"ascending"===e?r-l:l-r;{const t=o.toLowerCase(),i=a.toLowerCase();return ti?"ascending"===e?1:-1:0}}),n.forEach(t=>s.appendChild(t))},st=function(t){const e=document.querySelector(`#${this.Qt}`),i=Array.from(e.children);for(const e of i){if(e.classList?.contains("bm-I"))continue;const i=e.querySelector(".bm-a button");("hidden"!=i.dataset.state||t)&&("shown"==i.dataset.state&&t||i.click())}},nt=function(t,e){const i="hidden"==t.dataset.state?`Show the color ${e.name||""} on templates.`:`Hide the color ${e.name||""} on templates.`;t.ariaLabel=i,t.closest(".bm-z")?.setAttribute("aria-label",i)},ot=function(t,e){t&&!t.disabled&&e.id&&(t.style.textDecoration="none",t.disabled=!0,"shown"==t.dataset.state?(t.innerHTML=this.de,t.dataset.state="hidden",this.ce.Oe(e.id,!0)):(t.innerHTML=this.me,t.dataset.state="shown",this.ce.Oe(e.id,!1)),i(this,U,nt).call(this,t,e),t.disabled=!1,t.style.textDecoration="")},at=function(t,e){t&&e.id&&(t.classList.add("bm-z-toggle"),t.tabIndex=0,t.setAttribute("role","button"),t.onclick=s=>{if(s.target instanceof Element&&s.target.closest("button, a, input, select, textarea"))return;const n=t.querySelector(".bm-a button");i(this,U,ot).call(this,n,e)},t.onkeydown=e=>{"Enter"!=e.key&&" "!=e.key||(e.preventDefault(),t.click())})},rt=function(){this.be=0,this.pe=0,this.xe=0,this.we=0,this.ge=new Map,this.fe=new Map;for(const t of this.ce.Ie){const e=t.zt?.total??0;this.xe+=e??0;const i=t.zt?.colors??new Map;for(const[t,e]of i){const i=Number(e)||0,s=this.fe.get(t)??0;this.fe.set(t,s+i)}const s=t.zt?.correct??{};this.be+=Object.keys(s).length,this.pe+=Object.keys(t.Bt).length;for(const t of Object.values(s))for(const[e,i]of t){const t=Number(i)||0;this.we+=t;const s=this.ge.get(e)??0;this.ge.set(e,s+t)}}console.log(`Tiles loaded: ${this.be} / ${this.pe}`),this.we>=this.xe&&this.xe&&this.be==this.pe&&(new F).Kt(document.querySelector(`#${this.Ct}`)),this.timeRemaining=new Date(30*(this.xe-this.we)*1e3+Date.now()),this.ye=a(this.timeRemaining)},lt=new WeakSet,ht=async function(t,e,i){i.preventDefault();const s=await async function(t){let e="";return t&&(e=t.clipboardData.getData("text/plain")),0!=e.length||(await navigator.clipboard.readText().then(t=>{e=t}).catch(t=>{l("Failed to retrieve clipboard data using navigator! Using fallback methods...")}),0!=e.length||(e=window.clipboardData?.getData("Text"))),e}(i),n=s.split(/[^a-zA-Z0-9]+/).filter(t=>t).map(Number).filter(t=>!isNaN(t));2==n.length&&"bm-O"==e.id?(t.ct("bm-O",n?.[0]||""),t.ct("bm-P",n?.[1]||"")):1==n.length?t.ct(e.id,n?.[0]||""):(t.ct("bm-Q",n?.[0]||""),t.ct("bm-R",n?.[1]||""),t.ct("bm-O",n?.[2]||""),t.ct("bm-P",n?.[3]||""))};var gt=class extends v{constructor(t,i,s,n=void 0){super(t,i),e(this,ct),this.window=null,this.Ct="bm-u",this.Tt=document.body,this.Be=JSON.parse(GM_getValue("bmTemplates","{}")),this.scriptVersion=this.Be?.scriptVersion,this.schemaVersion=this.Be?.schemaVersion,this.Pe=void 0,this.Ae=s,this.ce=n}kt(){if(document.querySelector(`#${this.Ct}`))return void document.querySelector(`#${this.Ct}`).remove();let t="";document.querySelector("#bm-F")||(t=t.concat("z-index: 9001;").trim()),this.window=this.L({id:this.Ct,class:"bm-W",style:t},(t,e)=>{}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Template Wizard"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>t.wt(e),e.ontouchend=()=>{e.click()}}).N().L().N().lt({class:"bm-s",textContent:"✖","aria-label":'Close window "Template Wizard"'},(t,e)=>{e.onclick=()=>{document.querySelector(`#${this.Ct}`)?.remove()},e.ontouchend=()=>{e.click()}}).N().N().L({class:"bm-m"}).L({class:"bm-L bm-h"}).F(1,{textContent:"Template Wizard"}).N().N().W().N().L({class:"bm-L"}).F(2,{textContent:"Status"}).N().H({id:"bm-v",textContent:"Loading template storage status..."}).N().N().L({class:"bm-L bm-H"}).F(2,{textContent:"Detected templates:"}).N().N().N().N().D(this.Tt),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`),i(this,ct,mt).call(this),i(this,ct,dt).call(this)}};ct=new WeakSet,mt=function(){const t=this.schemaVersion.split(/[-\.\+]/),e=this.Ae.split(/[-\.\+]/);let s="";t[0]==e[0]?t[1]==e[1]?(s='Template storage health: Healthy!
No futher action required. (Reason: Semantic version matches)',this.Pe="Good"):(s='Template storage health: Poor!
You can still use your template, but some features may not work. It is recommended that you update Blue Marble\'s template storage. (Reason: MINOR version mismatch)',this.Pe="Poor"):t[0]Bad!
It is guaranteed that some features are broken. You might still be able to use the template. It is HIGHLY recommended that you download all templates and update Blue Marble\'s template storage before continuing. (Reason: MAJOR version mismatch)',this.Pe="Bad"):(s='Template storage health: Dead!
Blue Marble can not load the template storage. (Reason: MAJOR version unknown)',this.Pe="Dead");const n=`
If you want to continue using your current templates, then make sure the template storage (schema) is up-to-date.
If you don't want to update the template storage, then downgrade Blue Marble to version ${r(this.scriptVersion)} to continue using your templates.
Alternatively, if you don't care about corrupting the templates listed below, you can fix any issues with the template storage by uploading a new template.`,o=function(){const t=[...document.querySelectorAll("body > div > .hidden")].filter(t=>/version:/i.test(t.textContent));if(t[0]){const e=t[0].textContent?.match(/\d+/);return e?new Date(Number(e[0])):void 0}}();let l=o?a(o):"???";this.ct("#bm-v",`${s}
Your templates were created during Blue Marble version ${r(this.scriptVersion)} with schema version ${r(this.schemaVersion)}.
The current Blue Marble version is ${r(this.version)} and requires schema version ${r(this.Ae)}.
Wplace was last updated on ${l}.${"Good"!=this.Pe?n:""}`);const h=new v(this.name,this.version);"Dead"!=this.Pe&&(h.L({class:"bm-L bm-D bm-h",style:"gap: 1.5ch;"}),h.lt({textContent:"Download all templates"},(t,e)=>{e.onclick=()=>{e.disabled=!0,this.ce.ze().then(()=>{e.disabled=!1})}}).N()),"Poor"!=this.Pe&&"Bad"!=this.Pe||h.lt({textContent:`Update template storage to ${this.Ae}`},(t,e)=>{e.onclick=()=>{e.disabled=!0,i(this,ct,ut).call(this,!0)}}).N(),h.N().D(document.querySelector("#bm-v").parentNode)},dt=function(){const t=this.Be?.templates;if(Object.keys(t).length>0){const e=document.querySelector(`#${this.Ct} .bm-H`),i=new v(this.name,this.version);i.L({id:"bm-B",class:"bm-L"});for(const e in t){const s=e,o=t[e];if(t.hasOwnProperty(e)){const t=s.split(" "),e=Number(t?.[0]),a=d(t?.[1]||"0",this.ce.Fe),r=o.name||`Template ${e||""}`,l=o?.coords?.split(",").map(Number),h=o.pixels?.total??void 0,c=void 0,m="number"==typeof e?n(e):"???",u="number"==typeof a?n(a):"???",b="number"==typeof h?n(h):"???";i.L({class:"bm-L bm-D"}).L({class:"bm-D",style:"flex-direction: column; gap: 0;"}).L({class:"bm-1",textContent:c||"🖼️"}).N().O({textContent:`#${m}`}).N().N().L({class:"bm-D bm-0"}).F(3,{textContent:r}).N().I({textContent:`Uploaded by user #${u}`}).N().I({textContent:`Coordinates: ${l.join(", ")}`}).N().I({textContent:`Total Pixels: ${b}`}).N().N().N()}}i.N().D(e)}},ut=async function(t){if(t){const t=document.querySelector(`#${this.Ct} .bm-m`);t.innerHTML="",new v(this.name,this.version).L({class:"bm-L"}).L({class:"bm-L bm-h"}).F(1,{textContent:"Template Wizard"}).N().N().W().N().L({class:"bm-L"}).F(2,{textContent:"Status"}).N().H({textContent:"Updating template storage. Please wait..."}).N().N().N().D(t)}GM_deleteValue("bmCoords");const e=this.Be?.templates;if(Object.keys(e).length>0)for(const[t,i]of Object.entries(e))if(e.hasOwnProperty(t)){const t=new z({displayName:i.name,Bt:i.tiles});t.Xt();const e=await this.ce.We(t);await this.ce.Ue(e,t.displayName,t.coords)}t&&(console.log("Restarting Template Wizard..."),document.querySelector(`#${this.Ct}`).remove(),new gt(this.name,this.version,this.Ae,this.ce).kt())};var wt,xt,yt,$t,vt,Mt,Ct,Tt,St=gt;wt=new WeakSet,xt=function(){const t=this.$?.Lt?.filter,e=Array.isArray(t)?t:[];this.He.clear();for(const t of e){const e=Number(t);Number.isFinite(e)&&this.He.set(e,!0)}},yt=function(){this.$&&(this.$.Lt.filter=Array.from(this.He.keys()).map(t=>Number(t)).filter(t=>Number.isFinite(t)).sort((t,e)=>t-e),this.$.Ht())},$t=async function(){GM.setValue("bmTemplates",JSON.stringify(this.Ve))},vt=async function(t){console.log("Parsing BlueMarble...");const e=t.templates;console.log(`BlueMarble length: ${Object.keys(e).length}`);const i=t?.schemaVersion,s=i.split(/[-\.\+]/),n=this.schemaVersion.split(/[-\.\+]/),o=t?.scriptVersion;console.log(`BlueMarble Template Schema: ${i}; Script Version: ${o}`),s[0]==n[0]?(s[1]!=n[1]&&new St(this.name,this.version,this.schemaVersion,this).kt(),this.Ie=await async function({At:t,Ge:i,Ie:s}){if(Object.keys(e).length>0)for(const n in e){const o=n,a=e[n];if(console.log(`Template Key: ${o}`),e.hasOwnProperty(n)){const e=o.split(" "),n=Number(e?.[0]),r=e?.[1]||"0",l=a.name||`Template ${n||""}`,h={total:a.pixels?.total,colors:new Map(Object.entries(a.pixels?.colors||{}).map(([t,e])=>[Number(t),e]))},c=a.tiles,m={},d={},u=t*i;for(const t in c)if(console.log(t),c.hasOwnProperty(t)){const e=b(c[t]),i=new Blob([e],{type:"image/png"}),s=await createImageBitmap(i);m[t]=s;const n=new OffscreenCanvas(u,u).getContext("2d");n.drawImage(s,0,0);const o=n.getImageData(0,0,s.width,s.height);d[t]=new Uint32Array(o.data.buffer)}const p=new z({displayName:l,Ot:n||this.Ie?.length||0,It:r||""});p.zt=h,p.Bt=m,p.Pt=d,s.push(p),console.log(this.Ie),console.log("^^^ This ^^^")}}return s}({At:this.At,Ge:this.Ge,Ie:this.Ie})):s[0]>>24&255,y=g>>>24&255,$=b.get(w)??-2,v=b.get(g)??-2;if(this.He.get($)&&(e[i*h+c]=g),-1==$){const t=536870912;this.He.get($)?e[i*h+c]=0:(u/o&1)==(f/o&1)?(e[i*h+c]=t,e[(i-1)*h+(c-1)]=t,e[(i-1)*h+(c+1)]=t,e[(i+1)*h+(c-1)]=t,e[(i+1)*h+(c+1)]=t):(e[i*h+c]=0,e[(i-1)*h+c]=t,e[(i+1)*h+c]=t,e[i*h+(c-1)]=t,e[i*h+(c+1)]=t)}if(!n&&x>m&&v!=$&&(d||y>m)){const t=e[i*h+c];for(const n of s){const[s,o,a]=n,r=0!=s?1!=s?t:4278190335:0;e[(i+a)*h+(c+o)]=r}}if(-1==$&&g<=m){const t=p.get($);p.set($,t?t+1:1);continue}if(x<=m||y<=m)continue;if(v!=$)continue;const M=p.get($);p.set($,M?M+1:1)}return console.log("List of template pixels that match the tile:"),console.log(p),{qe:p,Ze:e}},Ct=new WeakSet,Tt=function(t){const e=JSON.parse(GM_getValue("bmUserSettings","{}"));e.telemetry=t,GM.setValue("bmUserSettings",JSON.stringify(e))};var kt=GM_info.script.name.toString(),Nt=GM_info.script.version.toString();!function(t){const e=document.createElement("script");e.setAttribute("bm-11",kt),e.setAttribute("bm-X","color: cornflowerblue;"),e.textContent=`(${t})();`,document.documentElement?.appendChild(e),e.remove()}(()=>{const t=document.currentScript,e=t?.getAttribute("bm-11")||"Blue Marble",i=t?.getAttribute("bm-X")||"",s=new Map;window.addEventListener("message",t=>{const{source:n,endpoint:o,blobID:a,blobData:r,blink:l}=t.data,h=Date.now()-l;if(console.groupCollapsed(`%c${e}%c: ${s.size} Recieved IMAGE message about blob "${a}"`,i,""),console.log(`Blob fetch took %c${String(Math.floor(h/6e4)).padStart(2,"0")}:${String(Math.floor(h/1e3)%60).padStart(2,"0")}.${String(h%1e3).padStart(3,"0")}%c MM:SS.mmm`,i,""),console.log(s),console.groupEnd(),"blue-marble"==n&&a&&r&&!o){const t=s.get(a);"function"==typeof t?t(r):c(`%c${e}%c: Attempted to retrieve a blob (%s) from queue, but the blobID was not a function! Skipping...`,i,"",a),s.delete(a)}});const n=window.fetch;window.fetch=async function(...t){const o=await n.apply(this,t),a=o.clone(),r=(t[0]instanceof Request?t[0]?.url:t[0])||"ignore",l=a.headers.get("content-type")||"";if(l.includes("application/json"))console.log(`%c${e}%c: Sending JSON message about endpoint "${r}"`,i,""),a.json().then(t=>{const s=r?.split("?")[0].split("/").filter(t=>t&&isNaN(Number(t))).filter(t=>t&&!t.includes(".")).pop();if("me"==s)try{sessionStorage.setItem("bm-2n",JSON.stringify(t))}catch(t){console.warn(`%c${e}%c: Failed to cache "/me" payload`,i,"",t)}window.postMessage({source:"blue-marble",endpoint:r,jsonData:t},"*")}).catch(t=>{console.error(`%c${e}%c: Failed to parse JSON: `,i,"",t)});else if(l.includes("image/")&&!r.includes("openfreemap")&&!r.includes("maps")){const t=Date.now(),n=await a.blob();return console.log(`%c${e}%c: ${s.size} Sending IMAGE message about endpoint "${r}"`,i,""),new Promise(o=>{const l=crypto.randomUUID();s.set(l,t=>{o(new Response(t,{headers:a.headers,status:a.status,statusText:a.statusText})),console.log(`%c${e}%c: ${s.size} Processed blob "${l}"`,i,"")}),window.postMessage({source:"blue-marble",endpoint:r,blobID:l,blobData:n,blink:t})}).catch(n=>{const o=Date.now();console.error(`%c${e}%c: Failed to Promise blob!`,i,""),console.groupCollapsed(`%c${e}%c: Details of failed blob Promise:`,i,""),console.log(`Endpoint: ${r}\nThere are ${s.size} blobs processing...\nBlink: ${t.toLocaleString()}\nTime Since Blink: ${String(Math.floor(o/6e4)).padStart(2,"0")}:${String(Math.floor(o/1e3)%60).padStart(2,"0")}.${String(o%1e3).padStart(3,"0")} MM:SS.mmm`),console.error("Exception stack:",n),console.groupEnd()})}return o}});var Dt=`div:has(>confetti-piece){position:absolute;inset:0;overflow:hidden;pointer-events:none}confetti-piece{position:absolute;top:-10px;width:var(--size);height:var(--size);background:currentColor;transform:translate3d(var(--x),-10vh,0) rotate(var(--rot));animation:fall var(--duration) linear var(--delay);will-change:transform;pointer-events:none}@keyframes fall{to{transform:translate3d(var(--x),110vh,0) rotate(calc(var(--rot) + 720deg))}}.bm-screenreader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.bm-W{--bm-surface-strong: rgba(9, 20, 42, .5);--bm-surface-soft: rgba(24, 41, 74, .28);--bm-surface-glass: rgba(255, 255, 255, .1);--bm-surface-glass-strong: rgba(255, 255, 255, .18);--bm-border-soft: rgba(255, 255, 255, .18);--bm-border-strong: rgba(163, 228, 255, .34);--bm-text-primary: rgba(17, 36, 66, .96);--bm-text-secondary: rgba(36, 57, 90, .84);--bm-accent-start: #baf6ff;--bm-accent-end: #81b6ff;--bm-accent-shadow: rgba(132, 182, 255, .22);--bm-font-body: "Rajdhani", "Segoe UI Variable Text", "Segoe UI", sans-serif;--bm-font-display: "Michroma", "Orbitron", "Segoe UI", sans-serif;--bm-font-mono: "Roboto Mono", "Rajdhani", "Courier New", monospace;position:fixed;isolation:isolate;overflow:hidden;background:radial-gradient(circle at 14% 12%,rgba(255,255,255,.24),transparent 18%),radial-gradient(circle at 86% 8%,rgba(186,246,255,.22),transparent 24%),radial-gradient(circle at 82% 84%,rgba(129,182,255,.18),transparent 28%),linear-gradient(145deg,#ffffff2e,#ffffff0f 22%,#6991d414 54%,#09142a2e);color:var(--bm-text-primary);padding:6px;border-radius:16px;border:1px solid var(--bm-border-soft);box-shadow:0 18px 40px #0003,inset 0 1px #ffffff38,inset 0 -1px #ffffff0d;z-index:9000;transition:background .32s ease,border-color .22s ease,box-shadow .22s ease,opacity .22s ease,transform 0s,width .22s ease,max-width .22s ease,max-height .22s ease;top:75px;left:60px;width:auto;max-height:fit-content;max-width:calc(100% - 135px);backdrop-filter:blur(26px) saturate(1.25);font-family:var(--bm-font-body);letter-spacing:.04em}.bm-W:before,.bm-W:after{content:"";position:absolute;inset:0;pointer-events:none}.bm-W:before{border-radius:inherit;padding:1px;background:linear-gradient(135deg,#ffffff73,#ffffff1f 24%,#baf6ff38 58%,#81b6ff4d);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.85}.bm-W:after{border-radius:inherit;background:linear-gradient(180deg,rgba(255,255,255,.2),transparent 24%),radial-gradient(circle at 18% 0%,rgba(255,255,255,.22),transparent 22%),radial-gradient(circle at 88% 16%,rgba(186,246,255,.18),transparent 18%);opacity:1}.bm-S{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.28ch;padding:.18rem .24rem;border-radius:10px;border:1px solid rgba(255,255,255,.16);background:radial-gradient(circle at 0 0,rgba(255,255,255,.22) 0,transparent 42%),linear-gradient(135deg,#ffffff2e,#ffffff14);cursor:grab;width:100%;height:fit-content;box-shadow:inset 0 1px #ffffff29,0 6px 18px #0000001a}.bm-S.bm-M{cursor:grabbing}.bm-W:has(.bm-S.bm-M){pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.bm-S.bm-M{pointer-events:auto}.bm-T{display:inline-block;height:2.2em;margin-right:.45ch;padding:.2rem;border-radius:12px;vertical-align:middle;background:linear-gradient(135deg,#ffffff38,#ffffff14);box-shadow:inset 0 1px #ffffff29,0 8px 18px #0000001f}.bm-W h1{display:inline-block;font-size:1rem;font-weight:700;vertical-align:middle;font-family:var(--bm-font-display);text-transform:uppercase;letter-spacing:.14em;color:#10213cf5}.bm-S h1,.bm-y{font-size:.78rem;user-select:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-family:var(--bm-font-display);letter-spacing:.14em;color:#122542f2;text-shadow:0 1px 0 rgba(255,255,255,.28)}.bm-S div:has(h1){display:contents}.bm-W h2{display:inline-block;font-size:.88rem;font-weight:700;vertical-align:middle;font-family:var(--bm-font-display);letter-spacing:.1em;color:#122340f5}.bm-W h3{display:inline-block;font-size:large;font-weight:700;font-family:var(--bm-font-display);letter-spacing:.08em;color:#122340f5}.bm-W p{color:var(--bm-text-secondary);line-height:1.5;letter-spacing:.035em}.bm-W hr{border:none;height:1px;margin:.32rem 0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.28),transparent)}.bm-L.bm-h{width:fit-content;margin-left:auto;margin-right:auto}.bm-L{margin:.24em 0}.bm-W input,.bm-W select,.bm-W textarea,.bm-W button{font:inherit}.bm-W button{appearance:none;color:var(--bm-text-primary);font-family:var(--bm-font-display);background:linear-gradient(135deg,#ffffff38,#a4d0ff24);border:1px solid rgba(255,255,255,.22);border-radius:999px;padding:.28em .62em;min-height:1.78em;font-weight:600;letter-spacing:.1em;box-shadow:inset 0 1px #ffffff38,0 8px 20px #0000001a;transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,filter .18s ease,opacity .18s ease,transform .18s ease}.bm-W button:hover,.bm-W button:focus-visible{background:linear-gradient(135deg,#ffffff47,#baf6ff2e);border-color:#e6f5ff5c;box-shadow:inset 0 1px #ffffff42,0 10px 22px #0000001f;transform:translateY(-1px)}.bm-W button:focus-visible,.bm-W input:focus-visible,.bm-W select:focus-visible,.bm-W textarea:focus-visible{outline:none;border-color:#74e7ff9e;box-shadow:0 0 0 3px #74e7ff26,inset 0 1px #ffffff1f}.bm-W button:active{transform:translateY(0) scale(.98);filter:brightness(.98);box-shadow:inset 0 1px #ffffff1f,0 8px 16px #12244e3d}.bm-W button:disabled{opacity:.56;cursor:not-allowed;text-decoration:none;transform:none;filter:saturate(.72);box-shadow:none}.bm-W button.bm-1H{color:#07203b;background:linear-gradient(135deg,#ffffff6b,#baf6ff57);border-color:#eff8ff6b;box-shadow:inset 0 1px #ffffff70,0 10px 22px #81b6ff24}.bm-W button.bm-1H:hover,.bm-W button.bm-1H:focus-visible{background:linear-gradient(135deg,#ffffff85,#ccfaff5c)}.bm-W button.bm-1v{background:linear-gradient(135deg,#ffffff29,#ffffff14);border-color:#ffffff2e;box-shadow:inset 0 1px #ffffff24,0 8px 20px #00000014}.bm-W button.bm-1v:hover,.bm-W button.bm-1v:focus-visible{background:linear-gradient(135deg,#ffffff3d,#baf6ff1f)}.bm-s{display:inline-flex;align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.16);inline-size:1.62rem;block-size:1.62rem;min-height:1.62rem!important;min-width:1.62rem;margin-top:0;text-align:center;line-height:1;padding:0!important;aspect-ratio:1 / 1;border-radius:50%!important;background:linear-gradient(135deg,#ffffff3d,#ffffff1a)!important;box-shadow:inset 0 1px #ffffff2e,0 8px 18px #0000001a!important;overflow:hidden;flex:0 0 auto;font-size:.74rem}.bm-s svg{display:block;width:70%;height:70%;flex:0 0 auto;margin:auto;color:currentColor;pointer-events:none;transform:translateZ(0);overflow:visible}.bm-s .bm-1g{width:68%;height:68%;transform:translateY(.5px) translateZ(0)}.bm-s .bm-1b{width:62%;height:62%;transform:translateY(.75px) translateZ(0)}#bm-t.bm-N .bm-s .bm-1b{transform:translateZ(0)}.bm-J{vertical-align:middle}.bm-J svg{width:50%;margin:0 auto;fill:#111}.bm-W button.bm-A{background:transparent!important;box-shadow:none!important;border-color:transparent!important}.bm-A.bm-f:hover,.bm-A.bm-f:focus{background-color:#ffffff2e!important}.bm-A.bm-f:active{background-color:#ffffff3d!important}.bm-A.bm-g:hover,.bm-A.bm-g:focus{background-color:#00000024!important}.bm-A.bm-g:active{background-color:#0003!important}.bm-W input[type=number],.bm-W select,.bm-W textarea{color:var(--bm-text-primary);font-family:var(--bm-font-body);background:linear-gradient(180deg,#ffffff29,#ffffff0f);border:1px solid rgba(255,255,255,.18);border-radius:12px;box-shadow:inset 0 1px #ffffff1f}input[type=number].bm-C{appearance:auto;-moz-appearance:textfield;width:5.9ch;margin-left:1ch;padding:.2em .35ch;font-size:small}input[type=number].bm-C::-webkit-outer-spin-button,input[type=number].bm-C::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}div:has(>.bm-K)>button{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bm-K,input[type=file]{display:none!important;visibility:hidden!important;position:absolute!important;left:-9999px!important;top:-9999px!important;width:0!important;height:0!important;opacity:0!important;z-index:-9999!important;pointer-events:none!important}.bm-W select{padding:.22em .45ch}.bm-W label:has(input[type=checkbox]){display:flex;width:fit-content;gap:1ch;align-items:center;color:var(--bm-text-secondary)}.bm-W input[type=checkbox]{width:1em;accent-color:#74e7ff}.bm-m{overflow:hidden;max-height:calc(100% - 5px);transition:height .3s cubic-bezier(.4,0,.2,1)}.bm-W textarea{font-size:small;padding:.38em .52em;height:4em;width:100%;resize:vertical;line-height:1.45}.bm-W textarea::placeholder,.bm-W input::placeholder{color:#2f446699}.bm-W a:not(:has(*)){color:#1558a4f0;text-decoration:underline;text-decoration-color:#1558a459}.bm-W small{font-size:x-small;font-family:var(--bm-font-display);letter-spacing:.12em;color:var(--bm-text-secondary)}.bm-W ul li{list-style:disc;margin-left:5ch}.bm-W .bm-L.bm-H{max-height:var(--bm-H-max-height, calc(80vh - 150px) );overflow:auto;scrollbar-width:thin;scrollbar-color:rgba(146,221,255,.42) rgba(255,255,255,.05)}.bm-W .bm-L.bm-H::-webkit-scrollbar{width:10px;height:10px}.bm-W .bm-L.bm-H::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#74e7ff7a,#538dff66);border-radius:999px;border:2px solid transparent;background-clip:padding-box}.bm-W .bm-L.bm-H::-webkit-scrollbar-track{background:#ffffff0a;border-radius:999px}.bm-x{display:flex;align-content:center;justify-content:space-between;align-items:center;gap:.35ch}.bm-D{display:flex;align-content:center;justify-content:center;align-items:center;gap:.35ch}.bm-_{white-space:pre;letter-spacing:0;line-height:1!important;font-size:1.6em;font-family:monospace}.bm-N .bm-L:not(#bm-F .bm-L){margin-top:.18em;margin-bottom:.18em}.bm-N h1:not(#bm-F h1){font-size:1em}#bm-t .bm-1A{display:block;width:1.28em;height:1.28em;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;overflow:visible}#bm-t p svg{display:inline-block;height:1em;width:1em;color:currentColor;vertical-align:-.16em}#bm-t:not(.bm-N){width:min(50rem,calc(100vw - .55rem));max-width:min(50rem,calc(100vw - .55rem))!important}#bm-t .bm-1O{padding-top:.08rem}#bm-t .bm-1G{gap:.22rem;flex-wrap:wrap;width:100%;padding:.16rem}#bm-t .bm-1G>button{flex:1 1 10rem}#bm-t .bm-1s{padding-right:.08rem}#bm-t .bm-1B{display:grid;grid-template-columns:minmax(16rem,20rem) minmax(0,1fr);gap:.24rem .3rem;align-items:stretch}#bm-t .bm-1B>hr,#bm-t .bm-1u{grid-column:1 / -1}#bm-t .bm-1t,#bm-t .bm-21,#bm-t .bm-1u{padding:.38rem .48rem;border-radius:13px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(155deg,#ffffff2e,#ffffff12);box-shadow:inset 0 1px #ffffff29,0 8px 20px #00000014}#bm-t .bm-1t{display:grid;gap:.18rem}#bm-t .bm-1t br{display:none}#bm-t .bm-1t span{display:block;padding:.28rem .38rem;border-radius:10px;background:linear-gradient(180deg,#fff3,#ffffff14)}#bm-t .bm-21 p{margin:0}#bm-t .bm-1u fieldset{border:none;padding:0;margin:0}#bm-t .bm-1u legend{margin-bottom:.12rem}#bm-t .bm-1u .bm-L{margin-top:.1rem;margin-bottom:.1rem}#bm-t .bm-1l{display:flex;justify-content:flex-start}#bm-t .bm-1l button{min-width:7.8rem}#bm-E{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;align-items:stretch;gap:.3rem}#bm-t .bm-z{position:relative;overflow:hidden;width:fit-content;max-width:35ch;padding:.28rem;gap:.28rem;border-radius:13px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(160deg,#ffffff2e,#ffffff12);box-shadow:inset 0 1px #ffffff29,0 8px 20px #00000014;transition:background .25s ease,border-color .25s ease,box-shadow .25s ease,transform .25s ease}#bm-t .bm-z:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at top right,rgba(255,255,255,.18),transparent 24%),radial-gradient(circle at 18% 0%,rgba(186,246,255,.12),transparent 22%)}#bm-t .bm-z-toggle{cursor:pointer}#bm-t .bm-z:hover,#bm-t .bm-z:focus-within{transform:translateY(-2px);border-color:#92ddff42;background:linear-gradient(160deg,#ffffff38,#baf6ff1a);box-shadow:inset 0 1px #fff3,0 10px 24px #0000001a}#bm-t .bm-z-toggle:focus-visible{outline:none;border-color:#74e7ff9e;box-shadow:0 0 0 3px #74e7ff26,inset 0 1px #fff3,0 10px 24px #0000001a}#bm-t .bm-a{display:block;width:fit-content;height:fit-content;padding:.26rem;border:1px solid rgba(255,255,255,.18);border-radius:10px;box-shadow:inset 0 1px #ffffff24,0 6px 16px #00000014}#bm-t .bm-z[data-id="-2"] .bm-a{background:conic-gradient(#a00,#aa0 16.6%,#0a0,#0aa 50%,#00a 66.6%,#a0a,#a00)}#bm-t .bm-z[data-id="-1"] .bm-a{background:url('data:image/svg+xml;utf8,') repeat;background-color:transparent!important}#bm-t .bm-z[data-id="-1"] .bm-a svg{color:#fff!important}#bm-t .bm-z[data-id="0"] .bm-a{background-color:transparent!important}#bm-t .bm-a button{display:inline-flex;align-items:center;justify-content:center;padding:.24em;min-width:2.05rem;min-height:2.05rem;border-radius:999px;line-height:1}#bm-t .bm-a .bm-1A{width:1.55rem;height:1.55rem;filter:drop-shadow(0 1px 0 rgba(255,255,255,.18))}#bm-t .bm-z>.bm-x{flex-direction:column;align-items:flex-start;gap:.02rem}#bm-t .bm-z h2{margin:.04rem 0 0}#bm-t .bm-z .bm-6{margin:.1rem 0 0}#bm-t .bm-z small{font-size:.75em}#bm-t .bm-z.bm-I{display:none}#bm-t.bm-N{--bm-H-max-height: 100%;display:grid;grid-template-rows:auto minmax(0,1fr);width:360px;height:min(60vh,22rem);min-width:360px;min-height:180px;max-width:min(1000px,calc(100vw - 16px))!important;max-height:min(1400px,calc(100vh - 16px))!important;overflow:hidden;box-sizing:border-box;position:fixed;transition:background .32s ease,border-color .22s ease,box-shadow .22s ease,transform 0s}#bm-t.bm-N .bm-m{display:grid;grid-template-rows:auto auto auto auto minmax(0,1fr);grid-row:2;min-height:0;min-width:0;overflow:hidden}#bm-t.bm-N .bm-1G{gap:.16rem;flex-wrap:nowrap;width:100%;padding:.12rem}#bm-t.bm-N .bm-1G>button{flex:1 1 0;min-width:0}#bm-t.bm-N #bm-E{flex-direction:column;align-items:stretch;gap:.16rem;width:100%;align-self:stretch;min-width:0;box-sizing:border-box}#bm-t.bm-N .bm-z{width:100%;max-width:none;align-self:stretch;flex:1 1 auto;min-width:0;margin:0;padding:.12rem;border-radius:11px;box-sizing:border-box}#bm-t.bm-N .bm-z>.bm-x{width:100%;min-width:0;flex:1 1 auto}#bm-t.bm-N .bm-L.bm-H{display:block;grid-row:5;min-height:0;min-width:0;height:100%;width:100%;max-height:100%!important;overflow:auto;box-sizing:border-box}#bm-t.bm-N .bm-1P{position:absolute;right:4px;bottom:4px;display:flex;width:20px;height:20px;align-items:flex-end;justify-content:flex-end;padding-right:4px;padding-bottom:4px;box-sizing:border-box;z-index:5;cursor:nwse-resize;pointer-events:auto;opacity:.78;touch-action:none;user-select:none;color:#ffffffdb;background:linear-gradient(135deg,#ffffff24,#538dff24);border:1px solid rgba(255,255,255,.12);border-radius:8px;box-shadow:inset 0 1px #ffffff14}#bm-t.bm-N .bm-1P:hover,#bm-t.bm-N .bm-1P.bm-2h{opacity:1;border-color:#92ddff5c;box-shadow:inset 0 1px #ffffff1a,0 8px 16px #00000029}#bm-t.bm-N .bm-a{display:flex;width:100%;min-width:0;flex:1 1 auto;gap:.5ch;align-items:center;padding:.1rem .2rem;border:none;border-radius:8px;box-sizing:border-box}#bm-t.bm-N .bm-a button{padding:.2em;flex:0 0 auto}#bm-t.bm-N .bm-a .bm-1A{width:1.36rem;height:1.36rem}#bm-t.bm-N .bm-z h2{font-size:.78rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#bm-t #bm-2{display:inline-flex;align-items:center;padding:.08rem .24rem;border-radius:999px;background:#ffffff1f;box-shadow:inset 0 1px #ffffff14;font-size:1em}@media (max-width: 980px){#bm-t:not(.bm-N){width:min(100vw - .35rem,50rem);max-width:min(100vw - .35rem,50rem)!important}#bm-t .bm-1B{grid-template-columns:1fr}#bm-t .bm-21,#bm-t .bm-1u,#bm-t .bm-1B>hr{grid-column:auto}}#bm-F{width:min(25.5rem,calc(100vw - .65rem));max-width:min(25.5rem,calc(100vw - .65rem))!important}#bm-F .bm-m{display:flex;flex-direction:column}#bm-F .bm-2e,#bm-F .bm-2a{position:relative;overflow:hidden;border-radius:14px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(150deg,#ffffff2e,#ffffff14);box-shadow:inset 0 1px #fff3,0 10px 24px #0000001a}#bm-F .bm-2e:before,#bm-F .bm-2a:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at top right,rgba(255,255,255,.2),transparent 26%),radial-gradient(circle at 20% 0%,rgba(186,246,255,.16),transparent 24%)}#bm-F .bm-2e{display:flex;align-items:center;gap:.5rem;padding:.48rem .58rem}#bm-F .bm-2e h1{margin:0}#bm-F .bm-29{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.24rem}#bm-F .bm-1J{min-width:0;min-height:2.55rem;display:flex;align-items:flex-start;padding:.34rem .45rem;border-radius:11px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(160deg,#ffffff2e,#ffffff12);box-shadow:inset 0 1px #ffffff29;color:#12233ff5;line-height:1.22}#bm-F .bm-1J>span,#bm-F .bm-1J>time{min-width:0}#bm-F .bm-1h,#bm-F .bm-1i{flex-direction:column;justify-content:center;gap:.08rem}#bm-F .bm-1D{display:inline-block;font-size:1.3em;color:#0f1f38f5;white-space:normal;overflow-wrap:anywhere}#bm-F .bm-1D b{font-size:1em}#bm-F .bm-1C{color:#314769d1;font-size:.62rem;letter-spacing:.08em;font-family:var(--bm-font-display);text-transform:uppercase}#bm-F .bm-1J time{white-space:nowrap;font-family:var(--bm-font-mono);letter-spacing:.06em}#bm-F .bm-2a{padding:.48rem}#bm-F .bm-23{display:grid;grid-template-columns:auto repeat(4,minmax(0,1fr));gap:.22rem;align-items:center}#bm-F .bm-23 .bm-J{width:1.8rem;height:1.8rem}#bm-F .bm-23 .bm-C{width:100%;margin-left:0;text-align:center}#bm-F .bm-24,#bm-F .bm-25{margin-top:.24rem}#bm-F .bm-24>div{width:100%}#bm-F .bm-1Z{gap:.24rem;margin-top:.3rem}#bm-F .bm-1Z>button{flex:1 1 0}#bm-F .bm-25 textarea{min-height:4.1rem}@media (max-width: 720px){#bm-F{width:min(100vw - .45rem,25.5rem);max-width:min(100vw - .45rem,25.5rem)!important}#bm-F .bm-29{grid-template-columns:1fr}#bm-F .bm-23{grid-template-columns:repeat(2,minmax(0,1fr))}#bm-F .bm-23 .bm-J{grid-column:1 / -1;width:100%;aspect-ratio:auto;height:1.8rem}#bm-F .bm-1Z{flex-direction:column}}#bm-l div:has(>.bm-3){width:fit-content;justify-content:flex-start}#bm-l .bm-3{display:flex;flex-direction:column;width:13%}#bm-l .bm-3 span{width:fit-content;margin:auto;font-size:.7em}#bm-l .bm-3 button{width:fit-content;padding:0;border-radius:0}#bm-l .bm-3 svg{stroke:#333;stroke-width:.02px;width:100%;min-width:1.5ch;max-width:14.5ch}#bm-l .bm-3 button:hover svg,#bm-l .bm-3 button:focus svg{opacity:.9}#bm-l .bm-n{display:grid;grid-template-columns:1fr 1fr 1fr;width:25%;min-width:3ch;max-width:15ch}#bm-l .bm-n>button{width:100%;padding:0;aspect-ratio:1 / 1;background-color:#fff;border:#333 1px solid;border-radius:0;box-sizing:border-box}#bm-l .bm-n>button[data-status=Incorrect]{background-color:brown}#bm-l .bm-n>button[data-status=Template]{background-color:#2f4f4f}#bm-l .bm-n>button:hover,#bm-l .bm-n>button:focus{opacity:.8}#bm-B{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start}#bm-B>.bm-L{width:100%;justify-content:flex-start;background-color:#153063e6;border-radius:1em;padding:.5em;transition:background-color .3s ease}#bm-B>.bm-L:hover,#bm-B>.bm-L:focus-within{background-color:#112855e6}#bm-B .bm-1{height:100%;font-size:xxx-large}#bm-B .bm-0{flex-direction:column;align-items:flex-start;gap:0}`;function Lt(t){const e=document.createElement("link");e.href=t,e.rel="preload",e.as="style",e.onload=function(){this.onload=null,this.rel="stylesheet"},document.head?.appendChild(e)}GM_addStyle(Dt);var Ht="@font-face{font-family:'Roboto Mono';font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAADGIAA4AAAAAWngAADEuAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHDQGYD9TVEFUSACEThEICoGbAPoCC4NKAAE2AiQDg0oEIAWEWAeEYQwHGzdHsxERbBwIgEaWFUXpovSC/zKBG0OsPsALHwg+NI1SpzSGCOqReFjIyBOMluTO77d+stdLxT8578xk8qTZE3w1OkJLH/HCf/x+7dyZJ38RsxRVsnqjLjUQIiGSyJtptC9XNc3uBUH3jMC+IPGCwECyDmFX89mpyks+JIiJf6k8fvmlMgTb7HBGzQZtEAQxQERakSoRUQFtQsyY02nPpbWwNnW6NDZla5z75dci42ORHwuCaq3Kmj0ET+QQ1DlUpAkssLsnhSTshycLrNy5f+5lOA2/t5MLU2NQJiJXK72oo8DYDLlCiWoygX9gnU3olU+HAod+kuJDaft726r09zRd1TAn9LLCnq5xKpWLhSaRJcnn8ZuWTyMNYzBiVQejdkbvEPRyKpF4LBYhK8yasmcmQbLRBuGlm12eTnaqQZyfDdP1Mk2XIjkorrf+MzbbQxeN55AxRPykXkQdo6t7c6XysPaJR4AuryOynFyPSwYBK3+VxcBn491YBHx2z6pLgQ8ABADND6LF5vWqFysQH8cogOrrvfw7uRngSlumfQL3+G3WBQU35hQiwLYw/Sv01TXAvggLWwCQFwcCEEaiSZ1CKnpCm3SkQCuJg/v8agg872ppgDgDBqZZMmE0MnDeqzLFHLS0yV4BhERKR3RU0A5n7xP7pLBZIdIr6NjSaNVr8gOSVZLN2y922+46xDTNpPnEggWihehGjCB8EAEIJAKDiEIwEPzgzsYw0g0J/d40/5oG0OtRBAwc6XSWGItIJZo8IJg5jPBC+B01EUEffgsggea4pIfj/1ht+/7P9+Dv8dv/t7ffblTXq0vVLtHD38MrDy8/VDxce7j6sPmQ+pDxMFrXEx8Y74vWe8hDRvHEc2VTMjfM2y3yoQH3M1pcRqskaLNajlJlVloklU6aZ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DOqOSSmlLVW5AoVUrBu7FKeeYVvWSqGTlTquCSYowoNe8mdCqpO1NJC9SqEKK+ckoCgsgAYn4giGS9r3o0EQUFkWgCRmEqVinP47o6lRGJIRCZQiZKsoOMqRGuSlCJ1kJGBgMxjpqY0jLPrxkBG99YngLF3jX08Az5AalSJpS8FDBGXqnyzZX2tZJZUwgL3Gk2hXLQzjhc1SehYQTDChEqTDgcvAgf/zQjikJCRkFFQ8cQLQYTn4CQiJiElEwcuXgKCZQSJUmmoqaRIlWadBkyufMABePJizcfvvy8894HI0Z99MlnvcaY7PaHv722ko0/deh3hKUdkDZzluUvwLSTluNyscde9mynHXTKPvv9HBZoAhM+xpZF6ydHOfnXOm8dggAXaCs3LPNsNXpptVU6tVsoJukJy6zAofO7X+ntYjAjh9FvTjvjlbPOOe+CXBddkueKNWZddU2+6/5UoEixQqVKlClXqUqFaovUqrFYnSUa1BvXqEmLVs3+Moeny0233NbtXljC3yzsM2DKjbDCGMYxgUkkZBQoMQUHwxkz6auEfNafqNNkm/Ne/fU4c9r9BxG3FS/R2+muY0SwdfVjcc5Iy/z3siKbmreCL48SZxxd5w796Bvsm4QCoRC4qHw4CAQOfnUkt38If1yYQhc=)format('woff2');}";Lt("https://fonts.googleapis.com/css2?family=Michroma&family=Rajdhani:wght@400;500;600;700&display=swap"),Ht.indexOf("@font-face")+1?(console.log("Loading Roboto Mono as a file..."),GM_addStyle(Ht)):Lt("https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap");var Ot=JSON.parse(GM_getValue("bmUserSettings","{}")),It=(new class{constructor(){this.Ke=null,this.Qe=null,this.ti="#bm-p"}ei(t){return this.Qe=t,this.Ke=new MutationObserver(t=>{for(const e of t)for(const t of e.addedNodes)t instanceof HTMLElement&&t.matches?.(this.ti)}),this}ii(){return this.Ke}observe(t,e=!1,i=!1){t.observe(this.Qe,{childList:e,subtree:i})}},new class extends v{constructor(t,i){super(t,i),e(this,lt),this.window=null,this.Ct="bm-F",this.Tt=document.body}kt(){document.querySelector(`#${this.Ct}`)?this.$t("Main window already exists!"):(this.window=this.L({id:this.Ct,class:"bm-W bm-N",style:"top: 10px; left: unset; right: 75px;"},(t,e)=>{}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Blue Marble"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>t.wt(e),e.ontouchend=()=>{e.click()}}).N().L().N().L({class:"bm-D"}).lt({class:"bm-s",innerHTML:'',title:"Settings","aria-label":"Open settings"},(t,e)=>{e.onclick=()=>{t.$.kt()}}).N().N().N().L({class:"bm-m"}).W().N().L({class:"bm-L bm-2e"}).A({class:"bm-T",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALEQa0zv0AAAACBjSFJNAACHDwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAABF2lDQ1BJQ0MgUHJvZmlsZQAAKM9jYGDiyUnOLWYSYGDIzSspCnJ3UoiIjFJgv8PAyCDJwMygyWCZmFxc4BgQ4MOAE3y7BlQNBJd1QWYxkAa4UlKLk4H0HyCOSy4oKmFgYIwBsrnLSwpA7AwgWyQpG8yuAbGLgA4EsieA2OkQ9hKwGgh7B1hNSJAzkH0GyHZIR2InIbGh9oIAc7IRA9VBSWpFCYh2c2JgAIUpelghxJjFgNgYGBdLEGL5ixgYLL4CxScgxJJmMjBsb2VgkLiFEFNZwMDA38LAsO18cmlRGdRqKSA+zXiSOZl1Ekc29zcBe9FAaRPFj5oTjCSsJ7mxBpbHvs0uqGLt3DirZk3m/trLh18a/P8PAN5BU32YWvgkAAAACXBIWXMAAA7BAAAOwQG4kWvtAAAAGHRFWHRTb2Z0d2FyZQBQYWludC5ORVQgNS4xLjgbaeqoAAAAjGVYSWZJSSoACAAAAAUAGgEFAAEAAABKAAAAGwEFAAEAAABSAAAAKAEDAAEAAAACAAAAMQECABAAAABaAAAAaYcEAAEAAABqAAAAAAAA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1ZSK4pVw+dHD7N+/Vr0ej0h8+/H0bFPYisYM2Y8v//DJpxEft95b5squ2ZzKTnZ6WTKUbrl5dfYvHmzzPsBQegqrq5Gurt71ZugsaGR+IREiSRj9F92O5M+O3e1SPngrx/xzLpVjBoeQHFpGa/+8TXOfvM5WmnWgX3HGDduNK5GV+GJK0Z3J24mpaki5D14IPvlUhou7auqrcNPtp4ok/r5auw1GurrcHPz4u1tT/0g5g8+9FlWoaLs/eDPFOYX4T/YW86uFzj55XF1scyfN0NgN1ApatnT06PefFpZzyXFZpKS06VlZZSUFLN69TpsNhtNMrI1VdWUV9RIZ7Ukxl8k8uxnP51An52KKFCKi7JEt++RSvUoIihGo5sEKMfHx0fOMRGUFgtNcrL3wdvb262qodXWwwDhyIVz0XJHDqGisk5dyc1CvLyCdL48/NGP4t0xgT775ny6YudgwMEOhgT4S0VWGTeNVKLB3l4r46PBJrIrkiYHrCLP7KmptshysoladtHR3ibPHLgUFS0ciSbi9LE7xvqfCfzHXt56QBk/ZYK0w0cNanDSy8WrCLm61Tb09blVBKTvBLN1dFHbYJHv6UTrq8gTBd2968WfjPGzCfzHPj6aoJi8B1JfU42Laz/Z8U4qIl0dNiFhG1qZ84aGeiFbm2zTUnbt3PCLfP/iBP7b/nbwjOLq6isEq5XrqQ9+PfWibq9uXf5/+oN/A9GVF7dbp9A3AAAAAElFTkSuQmCC"},(t,e)=>{const i=new Date;204==Math.floor((i.getTime()-new Date(i.getFullYear(),0,1))/864e5)+1&&(e.parentNode.style.position="relative",e.parentNode.innerHTML=e.parentNode.innerHTML+'',e.onload=()=>{(new F).Kt(document.querySelector(`#${this.Ct}`))})}).N().F(1,{textContent:this.name}).N().N().W().N().L({class:"bm-L bm-29"}).L({class:"bm-1J bm-1h"}).I({class:"bm-1C",textContent:"Droplets"}).N().I({id:"bm-w",class:"bm-1D",textContent:"0"}).N().N().L({class:"bm-1J bm-1h"}).I({class:"bm-1C",textContent:"Next Level"}).N().I({id:"bm-q",class:"bm-1D",textContent:"0 px"}).N().N().L({class:"bm-1J bm-1i"}).I({class:"bm-1C",textContent:"Charges"}).N().gt(Date.now(),1e3,{class:"bm-1D",style:"font-weight: 700;"},(t,e)=>{t.p.si=e.id}).N().N().N().W().N().L({class:"bm-L bm-2a"}).L({class:"bm-L bm-23"}).lt({class:"bm-s bm-J",style:"margin-top: 0;",innerHTML:''},(t,e)=>{e.onclick=()=>{const e=t.p?.ni;e?.[0]?(t.ct("bm-Q",e?.[0]||""),t.ct("bm-R",e?.[1]||""),t.ct("bm-O",e?.[2]||""),t.ct("bm-P",e?.[3]||"")):t.$t("Coordinates are malformed! Did you try clicking on the canvas first?")}}).N().dt({type:"number",id:"bm-Q",class:"bm-C",placeholder:"Tl X",min:0,max:2047,step:1,required:!0},(t,e)=>{e.addEventListener("paste",s=>i(this,lt,ht).call(this,t,e,s))}).N().dt({type:"number",id:"bm-R",class:"bm-C",placeholder:"Tl Y",min:0,max:2047,step:1,required:!0},(t,e)=>{e.addEventListener("paste",s=>i(this,lt,ht).call(this,t,e,s))}).N().dt({type:"number",id:"bm-O",class:"bm-C",placeholder:"Px X",min:0,max:2047,step:1,required:!0},(t,e)=>{e.addEventListener("paste",s=>i(this,lt,ht).call(this,t,e,s))}).N().dt({type:"number",id:"bm-P",class:"bm-C",placeholder:"Px Y",min:0,max:2047,step:1,required:!0},(t,e)=>{e.addEventListener("paste",s=>i(this,lt,ht).call(this,t,e,s))}).N().N().L({class:"bm-L bm-24"}).ut({class:"bm-K",textContent:"Upload Template",accept:"image/png, image/jpeg, image/webp, image/bmp, image/gif"}).N().N().L({class:"bm-L bm-x bm-1Z"}).lt({class:"bm-1v",textContent:"Disable","data-button-status":"shown"},(t,e)=>{e.onclick=()=>{e.disabled=!0,"shown"==e.dataset.buttonStatus?(t.p?.ce?.oi(!1),e.dataset.buttonStatus="hidden",e.textContent="Enable",t.Mt("Disabled templates!")):(t.p?.ce?.oi(!0),e.dataset.buttonStatus="shown",e.textContent="Disable",t.Mt("Enabled templates!")),e.disabled=!1}}).N().lt({class:"bm-1H",textContent:"Create"},(t,e)=>{e.onclick=()=>{const e=document.querySelector(`#${this.Ct} .bm-K`),i=document.querySelector("#bm-Q");if(!i.checkValidity())return i.reportValidity(),void t.$t("Coordinates are malformed! Did you try clicking on the canvas first?");const s=document.querySelector("#bm-R");if(!s.checkValidity())return s.reportValidity(),void t.$t("Coordinates are malformed! Did you try clicking on the canvas first?");const n=document.querySelector("#bm-O");if(!n.checkValidity())return n.reportValidity(),void t.$t("Coordinates are malformed! Did you try clicking on the canvas first?");const o=document.querySelector("#bm-P");if(!o.checkValidity())return o.reportValidity(),void t.$t("Coordinates are malformed! Did you try clicking on the canvas first?");e?.files[0]?(t?.p?.ce.Ue(e.files[0],e.files[0]?.name.replace(/\.[^/.]+$/,""),[Number(i.value),Number(s.value),Number(n.value),Number(o.value)]),t.Mt("Drew to canvas!")):t.$t("No file selected!")}}).N().lt({class:"bm-1v",textContent:"Filter"},(t,e)=>{e.onclick=()=>this.ai()}).N().N().L({class:"bm-L bm-25"}).bt({id:this.v,placeholder:`Status: Sleeping...\nVersion: ${this.version}`,readOnly:!0}).N().N().N().N().N().D(this.Tt),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`))}ai(){new ft(this).$e()}}(kt,Nt)),Bt=new class{constructor(t,i){e(this,wt),this.name=t,this.version=i,this.Re=null,this.$=null,this.schemaVersion="2.0.0",this.ri=null,this.Fe="!#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~",this.At=1e3,this.Ge=3,this._e=3,this.ue=function(t){const e=y;e.unshift({id:-1,premium:!1,name:"Erased",rgb:[222,250,206]}),e.unshift({id:-2,premium:!1,name:"Other",rgb:[0,0,0]});const i=new Map;for(const s of e){if(0==s.id||-2==s.id)continue;const e=s.rgb[0],n=s.rgb[1],o=s.rgb[2];for(let a=-t;a<=t;a++)for(let r=-t;r<=t;r++)for(let l=-t;l<=t;l++){const t=e+a,h=n+r,c=o+l;if(t<0||t>255||h<0||h>255||c<0||c>255)continue;const m=(255<<24|c<<16|h<<8|t)>>>0;i.has(m)||i.set(m,s.id)}}return{palette:e,_t:i}}(this._e),this.Ee=null,this.li="",this.Ie=[],this.Ve=null,this.hi=!0,this.ci=null,this.He=new Map}mi(t){this.Re=t}k(t){this.$=t,i(this,wt,xt).call(this)}Oe(t,e){const s=Number(t);Number.isFinite(s)&&(e?this.He.set(s,!0):this.He.delete(s),i(this,wt,yt).call(this))}async di(){return{whoami:this.name.replace(" ",""),scriptVersion:this.version,schemaVersion:this.schemaVersion,templates:{}}}async Ue(t,e,s){this.Ve||(this.Ve=await this.di(),console.log("Creating JSON...")),this.Re.Mt(`Creating template at ${s.join(", ")}...`);const n=new z({displayName:e,Ot:0,It:m(this.ri||0,this.Fe),file:t,coords:s}),o=!this.$?.Lt?.flags?.includes("hl-noSkip"),a=this.$?.Lt?.flags?.includes("hl-agSkip");console.log(`Should Skip: ${o}; Should Agg Skip: ${a}`);const{Yt:r,Jt:l}=await n.Ut(this.At,this.ue,o,a);n.Bt=r;const h={total:n.zt.total,colors:Object.fromEntries(n.zt.colors)};this.Ve.templates[`${n.Ot} ${n.It}`]={name:n.displayName,coords:s.join(", "),enabled:!0,pixels:h,tiles:l},this.Ie=[],this.Ie.push(n),this.Re.Mt(`Template created at ${s.join(", ")}!`),console.log(Object.keys(this.Ve.templates).length),console.log(this.Ve),console.log(this.Ie),console.log(JSON.stringify(this.Ve)),await i(this,wt,$t).call(this)}ui(){}async bi(){this.Ve||(this.Ve=await this.di(),console.log("Creating JSON..."))}async pi(){l("Downloading all templates..."),console.log(this.Ie);for(const t of this.Ie)await this.fi(t),await s(500)}async ze(){const t=JSON.parse(GM_getValue("bmTemplates","{}"))?.templates;if(console.log(t),Object.keys(t).length>0)for(const[e,i]of Object.entries(t))t.hasOwnProperty(e)&&(await this.fi(new z({displayName:i.name,Ot:e.split(" ")?.[0],It:e.split(" ")?.[1],Bt:i.tiles})),await s(500))}async fi(t){t.Xt();const e=`${t.coords.join("-")}_${t.displayName.replaceAll(" ","-")}`,i=await this.We(t);await GM.download({url:URL.createObjectURL(i),name:e+".png",gi:"uniquify",onload:()=>{l(`Download of template '${e}' complete!`)},onerror:(t,i)=>{h(`Download of template '${e}' failed because ${t}! Details: ${i}`)},ontimeout:()=>{c(`Download of template '${e}' has timed out!`)}})}async We(t){console.log(t);const e=t.Bt,i=Object.keys(e).sort(),s=await Promise.all(i.map(t=>{return i=e[t],new Promise((t,e)=>{const s=new Image;s.onload=()=>t(s),s.onerror=e,s.src="data:image/png;base64,"+i});var i}));let n=1/0,o=1/0,a=0,r=0;i.forEach((t,e)=>{const[i,l,h,c]=t.split(",").map(Number),m=s[e],d=i*this.At+h,u=l*this.At+c;n=Math.min(n,d),o=Math.min(o,u),a=Math.max(a,d+m.width/this.Ge),r=Math.max(r,u+m.height/this.Ge)}),console.log(`Absolute coordinates: (${n}, ${o}) and (${a}, ${r})`);const l=a-n,h=r-o,c=l*this.Ge,m=h*this.Ge;console.log(`Template Width: ${l}\nTemplate Height: ${h}\nCanvas Width: ${c}\nCanvas Height: ${m}`);const d=new OffscreenCanvas(c,m),u=d.getContext("2d");i.forEach((t,e)=>{const[i,a,r,l]=t.split(",").map(Number),h=s[e],c=i*this.At+r,m=a*this.At+l;console.log(`Drawing tile (${i}, ${a}, ${r}, ${l}) (${c}, ${m}) at (${c-n}, ${m-o}) on the canvas...`),u.drawImage(h,(c-n)*this.Ge,(m-o)*this.Ge,h.width,h.height)}),u.globalCompositeOperation="destination-over",u.drawImage(d,0,-1),u.drawImage(d,0,1),u.drawImage(d,-1,0),u.drawImage(d,1,0);const b=new OffscreenCanvas(l,h),p=b.getContext("2d");return p.imageSmoothingEnabled=!1,p.drawImage(d,0,0,l*this.Ge,h*this.Ge,0,0,l,h),b.convertToBlob({type:"image/png"})}async wi(t,e){if(!this.hi)return t;const s=this.At*this.Ge;e=e[0].toString().padStart(4,"0")+","+e[1].toString().padStart(4,"0"),console.log(`Searching for templates in tile: "${e}"`);const o=this.Ie;console.log(o),o.sort((t,e)=>t.Ot-e.Ot),console.log(o);const a=o.map(t=>{const i=Object.keys(t.Bt).filter(t=>t.startsWith(e));if(0===i.length)return null;const s=i.map(e=>{const i=e.split(",");return{xi:t,Gt:t.Bt[e],Pt:t.Pt?.[e],yi:[i[0],i[1]],$i:[i[2],i[3]]}});return s?.[0]}).filter(Boolean);console.log(a);const r=a?.length||0;if(console.log(`templateCount = ${r}`),!(r>0))return this.Re.Mt(`Sleeping\nVersion: ${this.version}`),t;{const t=n(o.filter(t=>Object.keys(t.Bt).filter(t=>t.startsWith(e)).length>0).reduce((t,e)=>t+(e.zt.total||0),0));this.Re.Mt(`Displaying ${r} template${1==r?"":"s"}.\nTotal pixels: ${t}`)}const l=await createImageBitmap(t),h=new OffscreenCanvas(s,s),c=h.getContext("2d");c.imageSmoothingEnabled=!1,c.beginPath(),c.rect(0,0,s,s),c.clip(),c.clearRect(0,0,s,s),c.drawImage(l,0,0,s,s);const m=c.getImageData(0,0,s,s),d=new Uint32Array(m.data.buffer),u=this.$?.Lt?.highlight||[[2,0,0]],b=u?.[0],p=1==u?.length&&2==b?.[0]&&0==b?.[1]&&0==b?.[2];for(const t of a){console.log("Template:"),console.log(t);const s=!!t.xi.zt?.colors?.get(-1);let n=t.Pt.slice();const o=Number(t.$i[0])*this.Ge,a=Number(t.$i[1])*this.Ge;if(0!=this.He.size||s||c.drawImage(t.Gt,o,a),!n){const e=c.getImageData(o,a,t.Gt.width,t.Gt.height);n=new Uint32Array(e.data.buffer)}const r=Date.now(),{qe:l,Ze:h}=i(this,wt,Mt).call(this,{je:d,Ee:n,Ye:[o,a,t.Gt.width,t.Gt.height],Je:u,Xe:p});let m=0;const b=0;for(const[t,e]of l)t!=b&&(m+=e);0==this.He.size&&!s&&p||(console.log("Colors to filter: ",this.He),c.drawImage(await createImageBitmap(new ImageData(new Uint8ClampedArray(h.buffer),t.Gt.width,t.Gt.height)),o,a)),console.log(`Finished calculating correct pixels & filtering colors for the tile ${e} in ${(Date.now()-r)/1e3} seconds!\nThere are ${m} correct pixels.`),void 0===t.xi.zt.correct&&(t.xi.zt.correct={}),t.xi.zt.correct[e]=l}return await h.convertToBlob({type:"image/png"})}async Mi(t){console.log("Importing JSON..."),console.log(t),"BlueMarble"==t?.whoami&&await i(this,wt,vt).call(this,t)}oi(t){this.hi=t}}(kt,Nt),Pt=new class{constructor(t){this.ce=t,this.Ci=!1,this.si="",this.ni=[],this.Ti=[]}Si(t){window.addEventListener("message",async e=>{const i=e.data,s=i.jsonData;if(!i||"blue-marble"!==i.source)return;if(!i.endpoint)return;const n=i.endpoint?.split("?")[0].split("/").filter(t=>t&&isNaN(Number(t))).filter(t=>t&&!t.includes(".")).pop();switch(console.log('%cBlue Marble%c: Recieved message about "%s"',"color: cornflowerblue;","",n),n){case"me":this.ki(t,s);break;case"pixel":const e=i.endpoint.split("?")[0].split("/").filter(t=>t&&!isNaN(Number(t))),n=new URLSearchParams(i.endpoint.split("?")[1]),r=[n.get("x"),n.get("y")];if(this.ni.length&&(!e.length||!r.length))return void t.$t("Coordinates are malformed!\nDid you try clicking the canvas first?");this.ni=[...e,...r];const l=(o=e,a=r,[parseInt(o[0])%4*1e3+parseInt(a[0]),parseInt(o[1])%4*1e3+parseInt(a[1])]),h=document.querySelectorAll("span");for(const t of h){const i=t.textContent.trim();if(i.includes(l[0])&&i.includes(l[1])){let i=document.querySelector("#bm-p");e[0],e[1],r[0],r[1];const s=["Tl X:","Tl Y:","Px X:","Px Y:"],n=["bm-Y","bm-Z","bm-U","bm-V"],o=[...e,...r];if(i)for(const[t,e]of n.entries())document.getElementById(e).textContent=`${s[t]??"??:"} ${o[t]}`;else{i=document.createElement("span"),i.id="bm-p",i.style="display: flex; flex-wrap: wrap; gap: 0 1ch; font-size: small;";for(const[t,e]of o.entries()){const a=document.createElement("span");a.id=n[o.indexOf(e)??""],a.textContent=`${s[t]??"??:"} ${e}`,i.appendChild(a)}t.parentNode.parentNode.parentNode.insertAdjacentElement("afterend",i)}}}break;case"tile":case"tiles":let c=i.endpoint.split("/");c=[parseInt(c[c.length-2]),parseInt(c[c.length-1].replace(".png",""))];const m=i.blobID,d=i.blobData,u=Date.now(),b=await this.ce.wi(d,c);console.log(`Finished loading the tile in ${(Date.now()-u)/1e3} seconds!`),window.postMessage({source:"blue-marble",blobID:m,blobData:b,blink:i.blink});break;case"robots":this.Ci="false"==s.userscript?.toString().toLowerCase();break}var o,a})}ki(t,e){if(e.status&&"2"!=e.status?.toString()[0])return void t.$t("You are not logged in or Wplace is offline!\nCould not fetch userdata.");const i=Math.ceil(Math.pow(Math.floor(e.level)*Math.pow(30,.65),1/.65)-e.pixelsPainted);if(console.log(e.id),(e.id||0===e.id)&&console.log(m(e.id,"!#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~")),this.ce.ri=e.id,0!=this.si.length){const t=document.querySelector("#"+this.si);if(t){const i=e.charges;t.dataset.endDate=Date.now()+(i.max-i.count)*i.cooldownMs}}t.ct("bm-w",`${n(e.droplets)}`),t.ct("bm-q",`${n(i)} px`)}async Ni(t){try{const e=await fetch(`${window.location.origin}/api/me`,{credentials:"include"});if(!e.ok)return void t.$t(`Could not fetch userdata.\nHTTP ${e.status}`);const i=await e.json();this.ki(t,i)}catch(t){h("Failed to fetch current user data:",t)}}Di(t){try{const e=sessionStorage.getItem("bm-2n");if(!e)return!1;const i=JSON.parse(e);return this.ki(t,i),!0}catch(t){return h("Failed to apply cached user data:",t),!1}}async Li(t){console.log("Sending heartbeat to telemetry server...");let e=GM_getValue("bmUserSettings","{}");if(e=JSON.parse(e),!e||!e.telemetry||!e.uuid)return void console.log("Telemetry is disabled, not sending heartbeat.");const i=navigator.userAgent;let s=await this.Hi(i),n=this.Oi(i);GM_xmlhttpRequest({method:"POST",url:"https://telemetry.thebluecorner.net/heartbeat",headers:{"Content-Type":"application/json"},data:JSON.stringify({uuid:e.uuid,version:t,browser:s,os:n}),onload:t=>{200!==t.status&&h("Failed to send heartbeat:",t.statusText)},onerror:t=>{h("Error sending heartbeat:",t)}})}async Hi(t=navigator.userAgent){return(t=t||"").includes("OPR/")||t.includes("Opera")?"Opera":t.includes("Edg/")?"Edge":t.includes("Vivaldi")?"Vivaldi":t.includes("YaBrowser")?"Yandex":t.includes("Kiwi")?"Kiwi":t.includes("Brave")?"Brave":t.includes("Firefox/")?"Firefox":t.includes("Chrome/")?"Chrome":t.includes("Safari/")?"Safari":navigator.brave&&"function"==typeof navigator.brave.isBrave&&await navigator.brave.isBrave()?"Brave":"Unknown"}Oi(t=navigator.userAgent){return/Windows NT 11/i.test(t=t||"")?"Windows 11":/Windows NT 10/i.test(t)?"Windows 10":/Windows NT 6\.3/i.test(t)?"Windows 8.1":/Windows NT 6\.2/i.test(t)?"Windows 8":/Windows NT 6\.1/i.test(t)?"Windows 7":/Windows NT 6\.0/i.test(t)?"Windows Vista":/Windows NT 5\.1|Windows XP/i.test(t)?"Windows XP":/Mac OS X 10[_\.]15/i.test(t)?"macOS Catalina":/Mac OS X 10[_\.]14/i.test(t)?"macOS Mojave":/Mac OS X 10[_\.]13/i.test(t)?"macOS High Sierra":/Mac OS X 10[_\.]12/i.test(t)?"macOS Sierra":/Mac OS X 10[_\.]11/i.test(t)?"OS X El Capitan":/Mac OS X 10[_\.]10/i.test(t)?"OS X Yosemite":/Mac OS X 10[_\.]/i.test(t)?"macOS":/Android/i.test(t)?"Android":/iPhone|iPad|iPod/i.test(t)?"iOS":/Linux/i.test(t)?"Linux":"Unknown"}}(Bt),At=new class extends A{constructor(t,i,s){var n;super(t,i),e(this,H),this.Lt=s,(n=this.Lt).flags??(n.flags=[]),this.Ii=structuredClone(this.Lt),this.Bi="bmUserSettings",this.Pi=5e3,this.Ai=0,setInterval(this.zi.bind(this),this.Pi)}async zi(){await this.Fi()}async Fi(t=!1){const e=JSON.stringify(this.Lt);e!=JSON.stringify(this.Ii)&&(t||Date.now()-this.Ai>this.Pi)&&(await GM.setValue(this.Bi,e),this.Ii=structuredClone(this.Lt),this.Ai=Date.now(),console.log(e))}async Ht(){await this.Fi(!0)}Le(t,e=void 0){const i=this.Lt?.flags?.indexOf(t)??-1;-1!=i&&!0!==e?this.Lt?.flags?.splice(i,1):-1==i&&!1!==e&&this.Lt?.flags?.push(t)}Nt(){const t='',e='',s=this.Lt?.highlight??[[1,0,1],[2,0,0],[1,-1,0],[1,1,0],[1,0,-1]];this.window=this.L({class:"bm-L"}).F(2,{textContent:"Pixel Highlight"}).N().W().N().L({class:"bm-L",style:"margin-left: 1.5ch;"}).j({textContent:"Highlight transparent pixels"},(t,e,i)=>{i.checked=!this.Lt?.flags?.includes("hl-noTrans"),i.onchange=t=>this.Le("hl-noTrans",!t.target.checked)}).N().H({id:"bm-4",textContent:"Choose a preset:",style:"font-weight: 700;"}).N().L({class:"bm-D",role:"group","aria-labelledby":"bm-4"}).L({class:"bm-3"}).I({textContent:"None"}).N().lt({innerHTML:t,"aria-label":'Preset "None"'},(t,e)=>{e.onclick=()=>i(this,H,I).call(this,"None")}).N().N().L({class:"bm-3"}).I({textContent:"Cross"}).N().lt({innerHTML:e,"aria-label":'Preset "Cross Shape"'},(t,e)=>{e.onclick=()=>i(this,H,I).call(this,"Cross")}).N().N().L({class:"bm-3"}).I({textContent:"X"}).N().lt({innerHTML:e.replace('d="M1,0H2V1H3V2H2V3H1V2H0V1H1Z"','d="M0,0V1H3V0H2V3H3V2H0V3H1V0Z"'),"aria-label":'Preset "X Shape"'},(t,e)=>{e.onclick=()=>i(this,H,I).call(this,"X")}).N().N().L({class:"bm-3"}).I({textContent:"Full"}).N().lt({innerHTML:t.replace("#fff","#2f4f4f"),"aria-label":'Preset "Full Template"'},(t,e)=>{e.onclick=()=>i(this,H,I).call(this,"Full")}).N().N().N().H({id:"bm-b",textContent:"Create a custom pattern:",style:"font-weight: 700;"}).N().L({class:"bm-n",role:"group","aria-labelledby":"bm-b"});for(let t=-1;t<=1;t++)for(let e=-1;e<=1;e++){const n=s[s.findIndex(([,i,s])=>i==e&&s==t)]?.[0]??0;let o="Disabled";1==n?o="Incorrect":2==n&&(o="Template"),this.window=this.lt({"data-status":o,"aria-label":`Sub-pixel ${o.toLowerCase()}`},(s,n)=>{n.onclick=()=>i(this,H,O).call(this,n,[e,t])}).N()}this.window=this.N().N().N()}Dt(){this.window=this.L({class:"bm-L"}).F(2,{textContent:"Pixel Highlight"}).N().W().N().L({class:"bm-L",style:"margin-left: 1.5ch;"}).j({textContent:"Template creation should skip transparent tiles"},(t,e,i)=>{i.checked=!this.Lt?.flags?.includes("hl-noSkip"),i.onchange=t=>this.Le("hl-noSkip",!t.target.checked)}).N().j({innerHTML:"Experimental: Template creation should aggressively skip transparent tiles"},(t,e,i)=>{i.checked=this.Lt?.flags?.includes("hl-agSkip"),i.onchange=t=>this.Le("hl-agSkip",t.target.checked)}).N().N().N()}}(kt,Nt,Ot);It.k(At),It.S(Pt),Bt.mi(It),Bt.k(At);var zt=JSON.parse(GM_getValue("bmTemplates","{}"));if(console.log(zt),console.log(Ot),console.log(Object.keys(Ot).length),0==Object.keys(Ot).length){const t=crypto.randomUUID();console.log(t),GM.setValue("bmUserSettings",JSON.stringify({uuid:t}))}setInterval(()=>Pt.Li(Nt),18e5);var Ft=Ot?.telemetry;if(console.log(`Telemetry is ${!(null==Ft)}`),null==Ft||Ft>1){const t=new class extends v{constructor(t,i,s,n){super(t,i),e(this,Ct),this.window=null,this.Ct="bm-k",this.Tt=document.body,this.Wi=s,this.uuid=n}async kt(){if(document.querySelector(`#${this.Ct}`))return void this.$t("Telemetry window already exists!");const t=await this.p.Hi(navigator.userAgent),e=this.p.Oi(navigator.userAgent);this.window=this.L({id:this.Ct,class:"bm-W",style:"height: 80vh; z-index: 9998;"}).L({class:"bm-m"}).L({class:"bm-L bm-h"}).F(1,{textContent:`${this.name} Telemetry`}).N().N().W().N().L({class:"bm-L bm-D",style:"gap: 1.5ch; flex-wrap: wrap;"}).lt({textContent:"Enable Telemetry"},(t,e)=>{e.onclick=()=>{i(this,Ct,Tt).call(this,this.Wi);const t=document.getElementById(this.Ct);t?.remove()}}).N().lt({textContent:"Disable Telemetry"},(t,e)=>{e.onclick=()=>{i(this,Ct,Tt).call(this,0);const t=document.getElementById(this.Ct);t?.remove()}}).N().lt({textContent:"More Information"},(t,e)=>{e.onclick=()=>{window.open("https://github.com/SwingTheVine/Wplace-TelemetryServer#telemetry-data","_blank","noopener noreferrer")}}).N().N().L({class:"bm-L bm-H"}).L({class:"bm-L"}).F(2,{textContent:"Legal"}).N().H({textContent:`We collect anonymous telemetry data such as your browser, OS, and script version to make the experience better for everyone. The data is never shared personally. The data is never sold. You can turn this off by pressing the "Disable" button, but keeping it on helps us improve features and reliability faster. Thank you for supporting ${this.name}!`}).N().N().W().N().L({class:"bm-L"}).F(2,{textContent:"Non-Legal Summary"}).N().H({innerHTML:'You can disable telemetry by pressing the "Disable" button. If you would like to read more about what information we collect, press the "More Information" button.
This is the data stored on our servers:'}).N()._().Z({innerHTML:`A unique identifier (UUIDv4) generated by Blue Marble. This enables our telemetry to function without tracking your actual user ID.
Your UUID is: ${r(this.uuid)}`}).N().Z({innerHTML:`The version of Blue Marble you are using.
Your version is: ${r(this.version)}`}).N().Z({innerHTML:`Your browser type, which is used to determine Blue Marble outages and browser popularity.
Your browser type is: ${r(t)}`}).N().Z({innerHTML:`Your OS type, which is used to determine Blue Marble outages and OS popularity.
Your OS type is: ${r(e)}`}).N().Z({innerHTML:"The date and time that Blue Marble sent the telemetry information."}).N().N().H({innerHTML:'All of the data mentioned above is aggregated every hour. This means every hour, anything that could even remotly be considered "personal data" is deleted from our server. Here, "aggregated" data means things like "42 people used Blue Marble on Google Chrome this hour", which can\'t be used to identify anyone in particular.'}).N().N().N().N().N().D(this.Tt)}}(kt,Nt,1,Ot?.uuid);t.S(Pt),t.kt()}!async function(){await Bt.Mi(zt),Pt.Si(It),It.kt(),It.ai(),Pt.Di(It),Pt.Ni(It),new MutationObserver((t,e)=>{const i=document.querySelector("#color-1");if(!i)return;let s=document.querySelector("#bm-G");if(!s){s=document.createElement("button"),s.id="bm-G",s.textContent="Move ↑",s.className="btn btn-soft",s.onclick=function(){const t=this.parentNode.parentNode.parentNode.parentNode,e="Move ↑"==this.textContent;t.parentNode.className=t.parentNode.className.replace(e?"bottom":"top",e?"top":"bottom"),t.style.borderTopLeftRadius=e?"0px":"var(--radius-box)",t.style.borderTopRightRadius=e?"0px":"var(--radius-box)",t.style.borderBottomLeftRadius=e?"var(--radius-box)":"0px",t.style.borderBottomRightRadius=e?"var(--radius-box)":"0px",this.textContent=e?"Move ↓":"Move ↑"};const t=i.parentNode.parentNode.parentNode.parentNode.querySelector("h2");t.parentNode?.appendChild(s)}}).observe(document.body,{childList:!0,subtree:!0}),l(`%c${kt}%c (${Nt}) userscript has loaded!`,"color: cornflowerblue;","")}()})(); +(()=>{var t=t=>{throw TypeError(t)},e=(e,i,s)=>i.has(e)?t("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(e):i.set(e,s),i=(e,i,s)=>(((e,i)=>{i.has(e)||t("Cannot access private method")})(e,i),s);function s(t){return new Promise(e=>setTimeout(e,t))}function n(t){return(new Intl.NumberFormat).format(t)}function o(t){return new Intl.NumberFormat(void 0,{style:"percent",t:2,i:2}).format(t)}function a(t){return t.toLocaleString(void 0,{o:"long",l:"numeric",h:"2-digit",m:"2-digit",u:"2-digit"})}function r(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}function l(...t){(0,console.log)(...t)}function c(...t){(0,console.error)(...t)}function h(...t){(0,console.warn)(...t)}function m(t,e){if(0===t)return e[0];let i="";const s=e.length;for(;t>0;)i=e[t%s]+i,t=Math.floor(t/s);return i}function d(t,e){let i=0;const s=e.length;for(const n of t){const t=e.indexOf(n);-1==t&&c(`Invalid character '${n}' encountered whilst decoding! Is the decode alphabet/base incorrect?`),i=i*s+t}return i}function u(t){let e="";for(let i=0;i(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4));return.2126*e[0]+.7152*e[1]+.0722*e[2]}function f(t,e,i){return Array.isArray(t)&&([t,e,i]=t),(1<<24|t<<16|e<<8|i).toString(16).slice(1)}var g,w,x,y=[{id:0,premium:!1,name:"Transparent",rgb:[0,0,0]},{id:1,premium:!1,name:"Black",rgb:[0,0,0]},{id:2,premium:!1,name:"Dark Gray",rgb:[60,60,60]},{id:3,premium:!1,name:"Gray",rgb:[120,120,120]},{id:4,premium:!1,name:"Light Gray",rgb:[210,210,210]},{id:5,premium:!1,name:"White",rgb:[255,255,255]},{id:6,premium:!1,name:"Deep Red",rgb:[96,0,24]},{id:7,premium:!1,name:"Red",rgb:[237,28,36]},{id:8,premium:!1,name:"Orange",rgb:[255,127,39]},{id:9,premium:!1,name:"Gold",rgb:[246,170,9]},{id:10,premium:!1,name:"Yellow",rgb:[249,221,59]},{id:11,premium:!1,name:"Light Yellow",rgb:[255,250,188]},{id:12,premium:!1,name:"Dark Green",rgb:[14,185,104]},{id:13,premium:!1,name:"Green",rgb:[19,230,123]},{id:14,premium:!1,name:"Light Green",rgb:[135,255,94]},{id:15,premium:!1,name:"Dark Teal",rgb:[12,129,110]},{id:16,premium:!1,name:"Teal",rgb:[16,174,166]},{id:17,premium:!1,name:"Light Teal",rgb:[19,225,190]},{id:18,premium:!1,name:"Dark Blue",rgb:[40,80,158]},{id:19,premium:!1,name:"Blue",rgb:[64,147,228]},{id:20,premium:!1,name:"Cyan",rgb:[96,247,242]},{id:21,premium:!1,name:"Indigo",rgb:[107,80,246]},{id:22,premium:!1,name:"Light Indigo",rgb:[153,177,251]},{id:23,premium:!1,name:"Dark Purple",rgb:[120,12,153]},{id:24,premium:!1,name:"Purple",rgb:[170,56,185]},{id:25,premium:!1,name:"Light Purple",rgb:[224,159,249]},{id:26,premium:!1,name:"Dark Pink",rgb:[203,0,122]},{id:27,premium:!1,name:"Pink",rgb:[236,31,128]},{id:28,premium:!1,name:"Light Pink",rgb:[243,141,169]},{id:29,premium:!1,name:"Dark Brown",rgb:[104,70,52]},{id:30,premium:!1,name:"Brown",rgb:[149,104,42]},{id:31,premium:!1,name:"Beige",rgb:[248,178,119]},{id:32,premium:!0,name:"Medium Gray",rgb:[170,170,170]},{id:33,premium:!0,name:"Dark Red",rgb:[165,14,30]},{id:34,premium:!0,name:"Light Red",rgb:[250,128,114]},{id:35,premium:!0,name:"Dark Orange",rgb:[228,92,26]},{id:36,premium:!0,name:"Light Tan",rgb:[214,181,148]},{id:37,premium:!0,name:"Dark Goldenrod",rgb:[156,132,49]},{id:38,premium:!0,name:"Goldenrod",rgb:[197,173,49]},{id:39,premium:!0,name:"Light Goldenrod",rgb:[232,212,95]},{id:40,premium:!0,name:"Dark Olive",rgb:[74,107,58]},{id:41,premium:!0,name:"Olive",rgb:[90,148,74]},{id:42,premium:!0,name:"Light Olive",rgb:[132,197,115]},{id:43,premium:!0,name:"Dark Cyan",rgb:[15,121,159]},{id:44,premium:!0,name:"Light Cyan",rgb:[187,250,242]},{id:45,premium:!0,name:"Light Blue",rgb:[125,199,255]},{id:46,premium:!0,name:"Dark Indigo",rgb:[77,49,184]},{id:47,premium:!0,name:"Dark Slate Blue",rgb:[74,66,132]},{id:48,premium:!0,name:"Slate Blue",rgb:[122,113,196]},{id:49,premium:!0,name:"Light Slate Blue",rgb:[181,174,241]},{id:50,premium:!0,name:"Light Brown",rgb:[219,164,99]},{id:51,premium:!0,name:"Dark Beige",rgb:[209,128,81]},{id:52,premium:!0,name:"Light Beige",rgb:[255,197,165]},{id:53,premium:!0,name:"Dark Peach",rgb:[155,82,73]},{id:54,premium:!0,name:"Peach",rgb:[209,128,120]},{id:55,premium:!0,name:"Light Peach",rgb:[250,182,164]},{id:56,premium:!0,name:"Dark Tan",rgb:[123,99,82]},{id:57,premium:!0,name:"Tan",rgb:[156,132,107]},{id:58,premium:!0,name:"Dark Slate",rgb:[51,57,65]},{id:59,premium:!0,name:"Slate",rgb:[109,117,141]},{id:60,premium:!0,name:"Light Slate",rgb:[179,185,209]},{id:61,premium:!0,name:"Dark Stone",rgb:[109,100,63]},{id:62,premium:!0,name:"Stone",rgb:[148,140,107]},{id:63,premium:!0,name:"Light Stone",rgb:[205,197,158]}],$='',v=class{constructor(t,i){e(this,g),this.name=t,this.version=i,this.p=null,this.$=null,this.v="bm-r",this.M=null,this.C=null,this.T=[]}S(t){this.p=t}k(t){this.$=t}N(){return this.T.length>0&&(this.C=this.T.pop()),this}D(t){t?.appendChild(this.M),this.M=null,this.C=null,this.T=[]}O(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"div",{},t)),this}L(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"p",{},t)),this}H(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"small",{},t)),this}I(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"span",{},t)),this}B(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"details",{},t)),this}P(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"summary",{},t)),this}A(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"img",{},t)),this}F(t,e={},s=()=>{}){return s(this,i(this,g,w).call(this,"h"+t,{},e)),this}W(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"hr",{},t)),this}U(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"br",{},t)),this}V(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"form",{},t)),this}G(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"fieldset",{},t)),this}R(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"legend",{},t)),this}j(t={},e=()=>{}){const s={};t.textContent?(s.textContent=t.textContent,delete t.textContent):t.innerHTML&&(s.innerHTML=t.innerHTML,delete t.textContent);const n=i(this,g,w).call(this,"label",s),o=i(this,g,w).call(this,"input",{type:"checkbox"},t);return n.insertBefore(o,n.firstChild),this.N(),e(this,n,o),this}Y(t={},e=()=>{}){const s=i(this,g,w).call(this,"label",{textContent:t.textContent??"",for:t.id??""});return delete t.textContent,this.N(),e(this,s,i(this,g,w).call(this,"select",{},t)),this}J(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"option",{},t)),this}X(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"ol",{},t)),this}_(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"ul",{},t)),this}q(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"menu",{},t)),this}Z(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"li",{},t)),this}K(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"table",{},t)),this}tt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"caption",{},t)),this}et(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"thead",{},t)),this}it(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"tbody",{},t)),this}st(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"tfoot",{},t)),this}nt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"tr",{},t)),this}ot(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"th",{},t)),this}rt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"td",{},t)),this}lt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"button",{},t)),this}ct(t={},e=()=>{}){const s=t.title??t.textContent??"Help: No info";delete t.textContent,t.title=`Help: ${s}`;const n={textContent:"?",className:"bm-10",onclick:()=>{this.ht(this.v,s)}};return e(this,i(this,g,w).call(this,"button",n,t)),this}dt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"input",{},t)),this}ut(t={},e=()=>{}){const s=t.textContent??"";delete t.textContent;const n=i(this,g,w).call(this,"div"),o=i(this,g,w).call(this,"input",{type:"file",tabindex:"-1","aria-hidden":"true"},t);this.N();const a=i(this,g,w).call(this,"button",{textContent:s});return this.N(),this.N(),a.addEventListener("click",()=>{o.click()}),o.addEventListener("change",()=>{a.style.maxWidth=`${a.offsetWidth}px`,o.files.length>0?a.textContent=o.files[0].name:a.textContent=s}),e(this,n,o,a),this}bt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"textarea",{},t)),this}ft(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"div",{class:"bm-S"},t)),this}gt(t=Date.now(),e=500,s={},n=()=>{}){const o="bm--",a=s?.id||o+"-"+crypto.randomUUID().slice(0,8),r={class:o},l=i(this,g,w).call(this,"time",r,s);return l.id=a,l.dataset.endDate=t,setInterval(()=>{if(!l.isConnected)return;const t=Math.max(l.dataset.endDate-Date.now(),0),e=Math.floor(t/1e3),i=Math.floor(e/3600),s=Math.floor(e%60),n=Math.floor(e%3600/60);l.setAttribute("datetime",`PT${i}H${n}M${s}S`),l.textContent=String(i).padStart(2,"0")+":"+String(n).padStart(2,"0")+":"+String(s).padStart(2,"0")},e),n(this,l),this}ht(t,e,i=!1){const s=document.getElementById(t.replace(/^#/,""));s&&(s instanceof HTMLInputElement?s.value=e:i?s.textContent=e:s.innerHTML=e)}wt(t){if(t.disabled)return;t.disabled=!0,t.style.textDecoration="none";const e=t.closest(".bm-W"),i=t.closest(".bm-S"),s=e?.querySelector("h1"),n=e?.querySelector(".bm-m");if(!e||!i||!n)return t.disabled=!1,void(t.style.textDecoration="");const o=e=>{let i,s=!1;const o=()=>{s||(s=!0,clearTimeout(i),n.removeEventListener("transitionend",a),e(),t.disabled=!1,t.style.textDecoration="")},a=t=>{t.target==n&&"height"==t.propertyName&&o()};n.addEventListener("transitionend",a),i=setTimeout(o,360)};if(e.parentElement.append(e),"expanded"==t.dataset.buttonStatus){e.dataset.widthBeforeMinimize=e.style.width,e.dataset.heightBeforeMinimize=e.style.height,e.dataset.minHeightBeforeMinimize=e.style.minHeight,n.style.height=n.scrollHeight+"px",n.offsetHeight,e.style.width||(e.style.width=e.scrollWidth+"px"),o(()=>{n.style.display="none"}),n.style.height="0",(e.style.height||e.classList.contains("bm-N"))&&(e.style.minHeight="0px",e.style.height=(()=>{const t=getComputedStyle(e),s=t=>parseFloat(t)||0,n="border-box"==t.boxSizing?s(t.paddingTop)+s(t.paddingBottom)+s(t.borderTopWidth)+s(t.borderBottomWidth):0;return Math.ceil(i.getBoundingClientRect().height+n+2)})()+"px");const a=s?.cloneNode(!0)??document.createElement("h1"),r=a.textContent;t.nextElementSibling.appendChild(a),t.innerHTML='',t.dataset.buttonStatus="collapsed",t.ariaLabel=`Unminimize window "${r}"`}else{const s=i.querySelector("h1"),a=s.textContent;s.remove(),n.style.display="",n.style.height="0",e.style.width=e.dataset.widthBeforeMinimize??"",e.style.minHeight=e.dataset.minHeightBeforeMinimize??"",e.style.height=e.dataset.heightBeforeMinimize??"",n.offsetHeight,o(()=>{n.style.height="",delete e.dataset.widthBeforeMinimize,delete e.dataset.heightBeforeMinimize,delete e.dataset.minHeightBeforeMinimize}),n.style.height=n.scrollHeight+"px",t.innerHTML=$,t.dataset.buttonStatus="expanded",t.ariaLabel=`Minimize window "${a}"`}}xt(t,e,i={}){const s=document.querySelector(t),n=document.querySelector(e),o=i?.yt??(()=>{});if(!s||!n)return void this.$t(`Can not drag! ${s?"":"moveMe"} ${s||n?"":"and "}${n?"":"iMoveThings "}was not found!`);let a,r=!1,l=0,c=null,h=0,m=0,d=0,u=0,b=null;const p=()=>{if(r){const t=Math.abs(h-d),e=Math.abs(m-u);(t>.5||e>.5)&&(h=d,m=u,s.style.transform=`translate(${h}px, ${m}px)`,s.style.left="0px",s.style.top="0px",s.style.right=""),c=requestAnimationFrame(p)}},f=(t,e)=>{r=!0,b=s.getBoundingClientRect(),a=t-b.left,l=e-b.top;const i=window.getComputedStyle(s).transform;if(i&&"none"!==i){const t=new DOMMatrix(i);h=t.m41,m=t.m42}else h=b.left,m=b.top;d=h,u=m,document.body.style.userSelect="none",n.classList.add("bm-M"),document.addEventListener("mousemove",w),document.addEventListener("touchmove",x,{passive:!1}),document.addEventListener("mouseup",g),document.addEventListener("touchend",g),document.addEventListener("touchcancel",g),c&&cancelAnimationFrame(c),p()},g=()=>{r=!1,c&&(cancelAnimationFrame(c),c=null),document.body.style.userSelect="",n.classList.remove("bm-M"),document.removeEventListener("mousemove",w),document.removeEventListener("touchmove",x),document.removeEventListener("mouseup",g),document.removeEventListener("touchend",g),document.removeEventListener("touchcancel",g),o({element:s,x:h,y:m}),b=null},w=t=>{r&&b&&(d=t.clientX-a,u=t.clientY-l)},x=t=>{if(r&&b){const e=t.touches[0];if(!e)return;d=e.clientX-a,u=e.clientY-l,t.preventDefault()}};n.addEventListener("mousedown",function(t){t.preventDefault(),f(t.clientX,t.clientY)}),n.addEventListener("touchstart",function(t){const e=t?.touches?.[0];e&&(f(e.clientX,e.clientY),t.preventDefault())},{passive:!1})}vt(t,e,i={}){const s=document.querySelector(t),n=document.querySelector(e),o=i?.yt??(()=>{});if(!s||!n)return void this.$t(`Can not resize! ${s?"":"resizeMe"} ${s||n?"":"and "}${n?"":"iResizeThings "}was not found!`);let a=!1,r=0,l=0,c=0,h=0,m=0,d=0,u=0,b=0,p=null;const f=()=>Number.isFinite(i?.maxWidth)?i.maxWidth:window.innerWidth-16,g=()=>Number.isFinite(i?.maxHeight)?i.maxHeight:window.innerHeight-16,w=Number.isFinite(i?.minWidth)?i.minWidth:200,x=Number.isFinite(i?.minHeight)?i.minHeight:160,y=(t,e,i)=>Math.min(Math.max(t,e),Math.max(e,i)),$=()=>{if(a){const t=Math.abs(m-u),e=Math.abs(d-b);(t>.5||e>.5)&&(m=u,d=b,s.style.width=`${m}px`,s.style.height=`${d}px`),p=requestAnimationFrame($)}},v=(t,e)=>{a=!0,r=t,l=e,c=s.offsetWidth,h=s.offsetHeight,m=c,d=h,u=c,b=h,document.body.style.userSelect="none",n.classList.add("bm-2s"),document.addEventListener("mousemove",C),document.addEventListener("touchmove",T,{passive:!1}),document.addEventListener("mouseup",M),document.addEventListener("touchend",M),document.addEventListener("touchcancel",M),p&&cancelAnimationFrame(p),$()},M=()=>{a=!1,p&&(cancelAnimationFrame(p),p=null),document.body.style.userSelect="",n.classList.remove("bm-2s"),document.removeEventListener("mousemove",C),document.removeEventListener("touchmove",T),document.removeEventListener("mouseup",M),document.removeEventListener("touchend",M),document.removeEventListener("touchcancel",M),o({element:s,width:m,height:d})},C=t=>{a&&(u=y(c+(t.clientX-r),w,f()),b=y(h+(t.clientY-l),x,g()))},T=t=>{if(!a)return;const e=t?.touches?.[0];e&&(u=y(c+(e.clientX-r),w,f()),b=y(h+(e.clientY-l),x,g()),t.preventDefault())};n.addEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),v(t.clientX,t.clientY)}),n.addEventListener("touchstart",t=>{const e=t?.touches?.[0];e&&(t.preventDefault(),t.stopPropagation(),v(e.clientX,e.clientY))},{passive:!1})}Mt(t){(0,console.info)(`${this.name}: ${t}`),this.ht(this.v,"Status: "+t,!0)}$t(t){(0,console.error)(`${this.name}: ${t}`),this.ht(this.v,"Error: "+t,!0)}};g=new WeakSet,w=function(t,e={},s={}){const n=document.createElement(t);this.M?(this.C?.appendChild(n),this.T.push(this.C),this.C=n):(this.M=n,this.C=n);for(const[t,s]of Object.entries(e))i(this,g,x).call(this,n,t,s);for(const[t,e]of Object.entries(s))i(this,g,x).call(this,n,t,e);return n},x=function(t,e,i){"class"==e?t.classList.add(...i.split(/\s+/)):"for"==e?t.htmlFor=i:"tabindex"==e?t.tabIndex=Number(i):"readonly"==e?t.readOnly="true"==i||"1"==i:"maxlength"==e?t.maxLength=Number(i):e.startsWith("data")?t.dataset[e.slice(5).split("-").map((t,e)=>0==e?t:t[0].toUpperCase()+t.slice(1)).join("")]=i:e.startsWith("aria")?t.setAttribute(e,i):t[e]=i};var M,C,T,S,k,N,D,O,L,H,I,B,P,A=class extends v{constructor(t,i){super(t,i),e(this,M),this.window=null,this.Ct="bm-l",this.Tt=document.body,this.St="windowSettings"}kt(){document.querySelector(`#${this.Ct}`)?i(this,M,T).call(this):(this.window=this.O({id:this.Ct,class:"bm-W"}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Settings"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>t.wt(e),e.ontouchend=()=>{e.click()}}).N().O().N().O({class:"bm-D"}).lt({class:"bm-s",innerHTML:'',"aria-label":'Close window "Settings"'},(t,e)=>{e.onclick=()=>i(this,M,T).call(this),e.ontouchend=()=>{e.click()}}).N().N().N().O({class:"bm-m"}).O({class:"bm-L bm-h"}).F(1,{textContent:"Settings"}).N().N().W().N().L({textContent:"Settings take 5 seconds to save."}).N().O({class:"bm-L bm-H"},(t,e)=>{this.Nt(),this.Dt()}).N().N().N().D(this.Tt),i(this,M,D).call(this))}Nt(){i(this,M,O).call(this,"Pixel Highlight")}Dt(){i(this,M,O).call(this,"Template")}};M=new WeakSet,C=function(){var t,e;return this.Ot?((t=this.Ot)[e=this.St]??(t[e]={}),this.Ot[this.St]):null},T=function(){const t=document.querySelector(`#${this.Ct}`);i(this,M,N).call(this,t),t?.remove()},S=function(t,e,i){const s=Math.max(8,window.innerWidth-t.offsetWidth-8),n=Math.max(8,window.innerHeight-t.offsetHeight-8);return{x:Math.min(Math.max(Math.round(Number(e)||8),8),s),y:Math.min(Math.max(Math.round(Number(i)||8),8),n)}},k=function(t){const e=i(this,M,C).call(this);e&&t&&requestAnimationFrame(()=>{if(!t.isConnected)return;const s=Number(e.x),n=Number(e.y);if(!Number.isFinite(s)||!Number.isFinite(n))return;const o=i(this,M,S).call(this,t,s,n);t.style.left="0px",t.style.top="0px",t.style.right="",t.style.transform=`translate(${o.x}px, ${o.y}px)`,o.x==s&&o.y==n||(e.x=o.x,e.y=o.y,this.Lt?.())})},N=function(t){const e=i(this,M,C).call(this);if(!e||!t?.isConnected)return;const s=t.getBoundingClientRect(),n=i(this,M,S).call(this,t,s.left,s.top);t.style.left="0px",t.style.top="0px",t.style.right="",t.style.transform=`translate(${n.x}px, ${n.y}px)`,e.x=n.x,e.y=n.y,this.Lt?.()},D=function(){const t=document.querySelector(`#${this.Ct}.bm-W`);t&&(i(this,M,k).call(this,t),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`,{yt:({element:t})=>i(this,M,N).call(this,t)}))},O=function(t){this.window=this.O({class:"bm-L"}).F(2,{textContent:t}).N().W().N().L({innerHTML:`An error occured loading the ${t} category. SettingsManager failed to override the ${t} function inside WindowSettings.`}).N().N()},L=new WeakSet,H=function(t,e){t.disabled=!0;const i=t.dataset.status,s=this.Ot?.highlight??[[1,0,1],[2,0,0],[1,-1,0],[1,1,0],[1,0,-1]];let n=[2,0,0];const o=s;switch(i){case"Disabled":t.dataset.status="Incorrect",t.ariaLabel="Sub-pixel incorrect",n=[1,...e];break;case"Incorrect":t.dataset.status="Template",t.ariaLabel="Sub-pixel template",n=[2,...e];break;case"Template":t.dataset.status="Disabled",t.ariaLabel="Sub-pixel disabled",n=[0,...e];break}const a=s.findIndex(([,t,e])=>t==n[1]&&e==n[2]);0!=n[0]?-1!=a?o[a]=n:o.push(n):-1!=a&&o.splice(a,1),this.Ot.highlight=o,t.disabled=!1},I=async function(t){const e=document.querySelectorAll(".bm-3 button");for(const t of e)t.disabled=!0;let i=[0,0,0,0,2,0,0,0,0];switch(t){case"Cross":i=[0,1,0,1,2,1,0,1,0];break;case"X":i=[1,0,1,0,2,0,1,0,1];break;case"Full":i=[2,2,2,2,2,2,2,2,2];break}const n=document.querySelector(".bm-n")?.childNodes??[];for(let t=0;t{const[s,n,o,a]=e.split(",").map(Number);(n>>24==0?0:n.get(e)??-2;const a=o.get(s);o.set(s,a?a+1:1)}return console.log(o),o};var F=class{constructor(){this.qt=Math.ceil(80/1300*window.innerWidth),this.Zt=y.slice(1)}Kt(t){const e=document.createElement("div");for(let t=0;t{t.parentNode.childElementCount<=1?t.parentNode.remove():t.remove()},e.appendChild(t)}t.appendChild(e)}},W=class extends HTMLElement{};customElements.define("confetti-piece",W);var U,V,G,R,j,E,Y,J,X,_,q,Z,K,Q,tt,et,it,st,nt,ot,at,rt,lt,ct,ht,mt,dt,ut,bt='',pt=class extends v{constructor(t){super(t.name,t.version),e(this,U),this.window=null,this.Ct="bm-t",this.Qt="bm-E",this.Tt=document.body,this.$=t.$??null,this.te="ftr-oWin",this.St="windowFilter",this.ee=null,this.ie=null,this.se=null,this.ne=null,this.oe=1e4,this.ae=360,this.re=220,this.le=1e3,this.ce=1400,this.he=t.p?.he,this.me='',this.de='';const{palette:i,_t:s}=this.he.ue;this.palette=i,this.be=0,this.pe=0,this.fe=new Map,this.ge=new Map,this.we=0,this.xe=0,this.timeRemaining=0,this.ye="",this.sortPrimary="total",this.sortSecondary="descending",this.showUnused=!1}$e(){i(this,U,G).call(this)?this.ve():this.kt()}kt(){if(document.querySelector(`#${this.Ct}`))return void i(this,U,E).call(this);this.window=this.O({id:this.Ct,class:"bm-W"},(t,e)=>{}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Color Filter"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>t.wt(e),e.ontouchend=()=>{e.click()}}).N().O().N().O({class:"bm-D"}).lt({class:"bm-s",innerHTML:'',"aria-label":'Switch to windowed mode for "Color Filter"'},(t,e)=>{e.onclick=()=>{i(this,U,R).call(this,!0),i(this,U,E).call(this),this.ve()},e.ontouchend=()=>{e.click()}}).N().lt({class:"bm-s",innerHTML:bt,"aria-label":'Close window "Color Filter"'},(t,e)=>{e.onclick=()=>i(this,U,E).call(this),e.ontouchend=()=>{e.click()}}).N().N().N().O({class:"bm-m"}).O({class:"bm-L bm-h bm-1-"}).F(1,{textContent:"Color Filter"}).N().N().W().N().O({class:"bm-L bm-x bm-h bm-1Q",style:"gap: 1.5ch;"}).lt({class:"bm-1D",textContent:"Hide All Colors"},(t,e)=>{e.onclick=()=>i(this,U,st).call(this,!1)}).N().lt({class:"bm-1D",textContent:"Show All Colors"},(t,e)=>{e.onclick=()=>i(this,U,st).call(this,!0)}).N().N().W().N().O({class:"bm-L bm-H bm-1x"}).O({class:"bm-L bm-1L"}).O({class:"bm-1E"}).O({class:"bm-1F"}).I({class:"bm-1y",textContent:"Tiles"}).N().I({id:"bm-i",class:"bm-1z",textContent:"0 / ???"}).N().N().O({class:"bm-1F"}).I({class:"bm-1y",textContent:"Correct"}).N().I({id:"bm-d",class:"bm-1z",textContent:"???"}).N().N().O({class:"bm-1F"}).I({class:"bm-1y",textContent:"Total"}).N().I({id:"bm-j",class:"bm-1z",textContent:"???"}).N().N().O({class:"bm-1F"}).I({class:"bm-1y",textContent:"Remaining"}).N().I({id:"bm-7",class:"bm-1z",textContent:"???"}).N().N().O({class:"bm-1F bm-1a"}).I({class:"bm-1y",textContent:"Finish At"}).N().I({id:"bm-8",class:"bm-1z",textContent:"???"}).N().N().N().W().N().V({class:"bm-L bm-1A"}).G().R({textContent:"Sort Options:",style:"font-weight: 700;"}).N().O({class:"bm-L"}).Y({id:"bm-c",name:"sortPrimary",textContent:"I want to view "}).J({value:"id",textContent:"color IDs"}).N().J({value:"name",textContent:"color names"}).N().J({value:"premium",textContent:"premium colors"}).N().J({value:"percent",textContent:"percentage"}).N().J({value:"correct",textContent:"correct pixels"}).N().J({value:"incorrect",textContent:"incorrect pixels"}).N().J({value:"total",textContent:"total pixels"}).N().N().Y({id:"bm-5",name:"sortSecondary",textContent:" in "}).J({value:"ascending",textContent:"ascending"}).N().J({value:"descending",textContent:"descending"}).N().N().I({textContent:" order."}).N().N().O({class:"bm-L"}).j({id:"bm-e",name:"showUnused",textContent:"Show unused colors"}).N().N().N().O({class:"bm-L bm-1o"}).lt({class:"bm-1R",textContent:"Sort Colors",type:"submit"},(t,e)=>{e.onclick=t=>{t.preventDefault();const e=new FormData(document.querySelector(`#${this.Ct} form`)),s={};for(const[t,i]of e)s[t]=i;console.log(`Primary: ${s.sortPrimary}; Secondary: ${s.sortSecondary}; Unused: ${"on"==s.showUnused}`),i(this,U,it).call(this,s.sortPrimary,s.sortSecondary,"on"==s.showUnused)}}).N().N().N().N().N().N().N().D(this.Tt),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`);const t=document.querySelector(`#${this.Ct} .bm-L.bm-H`);i(this,U,et).call(this,t),i(this,U,j).call(this),i(this,U,it).call(this,this.sortPrimary,this.sortSecondary,this.showUnused),this.ht("#bm-i",`${n(this.be)} / ${n(this.pe)}`),this.ht("#bm-d",n(this.we)),this.ht("#bm-j",n(this.xe)),this.ht("#bm-7",`${n((this.xe||0)-(this.we||0))} (${o(((this.xe||0)-(this.we||0))/(this.xe||1))})`),this.ht("#bm-8",``),i(this,U,Y).call(this)}ve(){if(document.querySelector(`#${this.Ct}`))return void i(this,U,E).call(this);this.window=this.O({id:this.Ct,class:"bm-W bm-N",style:`width: 360px; height: min(70vh, 32rem); min-width: ${this.ae}px; min-height: ${this.re}px; max-width: min(${this.le}px, calc(100vw - 16px)); max-height: min(${this.ce}px, calc(100vh - 16px));`}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Color Filter"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>{const i=document.querySelector("#bm-2");i&&(i.style.display="expanded"==e.dataset.buttonStatus?"none":""),t.wt(e)},e.ontouchend=()=>{e.click()}}).N().O().I({id:"bm-2",class:"bm-y",style:"font-weight: 700;"}).N().N().O({class:"bm-D"}).lt({class:"bm-s",innerHTML:'',"aria-label":'Switch to fullscreen mode for "Color Filter"'},(t,e)=>{e.onclick=()=>{i(this,U,R).call(this,!1),i(this,U,E).call(this),this.kt()},e.ontouchend=()=>{e.click()}}).N().lt({class:"bm-s",innerHTML:bt,"aria-label":'Close window "Color Filter"'},(t,e)=>{e.onclick=()=>i(this,U,E).call(this),e.ontouchend=()=>{e.click()}}).N().N().N().O({class:"bm-m"}).O({class:"bm-L bm-h bm-1-"}).F(1,{textContent:"Color Filter"}).N().N().W().N().O({class:"bm-L bm-x bm-h bm-1Q",style:"gap: 1.5ch;"}).lt({class:"bm-1D",textContent:"None"},(t,e)=>{e.onclick=()=>i(this,U,st).call(this,!1)}).N().lt({class:"bm-1D",textContent:"All"},(t,e)=>{e.onclick=()=>i(this,U,st).call(this,!0)}).N().N().W().N().O({class:"bm-L bm-H bm-1x"}).N().N().O({class:"bm-1_",title:"Resize Color Filter window","aria-label":"Resize Color Filter window",role:"presentation",textContent:"◢",style:"position: absolute; right: 0; bottom: 0; width: 28px; height: 28px; display: flex; align-items: flex-end; justify-content: flex-end; padding-right: 4px; padding-bottom: 4px; box-sizing: border-box; z-index: 5; cursor: nwse-resize; pointer-events: auto; touch-action: none; user-select: none; font-size: 8px; line-height: 1; color: rgba(255,255,255,0.95); background: transparent; border: none; box-shadow: none;"}).N().N().D(this.Tt),i(this,U,tt).call(this);const t=document.querySelector(`#${this.Ct} .bm-L.bm-H`);i(this,U,et).call(this,t),i(this,U,j).call(this),i(this,U,it).call(this,this.sortPrimary,this.sortSecondary,this.showUnused),i(this,U,Y).call(this)}Me(){i(this,U,rt).call(this);const t=document.querySelector(`#${this.Qt}`),e={};for(const t of this.palette){const i=this.fe.get(t.id)??0,s=n(i);let a=0,r="0",l=o(1);0!=i&&(a=this.ge.get(t.id)??"???","number"!=typeof a&&this.be==this.pe&&t.id&&(a=0),r="string"==typeof a?a:n(a),l=isNaN(a/i)?"???":o(a/i));const c=parseInt(i)-parseInt(a);e[t.id]={Ce:i,Te:s,Se:a,ke:r,Ne:l,De:c}}if(document.querySelector("#bm-2")){const t=this.we.toString().length>7?this.we.toString().slice(0,2)+"…"+this.we.toString().slice(-3):this.we.toString(),e=this.xe.toString().length>7?this.xe.toString().slice(0,2)+"…"+this.xe.toString().slice(-3):this.xe.toString();this.ht("#bm-2",`${t}/${e}`,!0)}if(this.ht("#bm-i",`${n(this.be)} / ${n(this.pe)}`),this.ht("#bm-d",n(this.we)),this.ht("#bm-j",n(this.xe)),this.ht("#bm-7",`${n((this.xe||0)-(this.we||0))} (${o(((this.xe||0)-(this.we||0))/(this.xe||1))})`),this.ht("#bm-8",``),!t)return e;const s=Array.from(t.children);for(const t of s){const i=parseInt(t.dataset.id),{Se:s,ke:n,Ne:o,Ce:a,Te:r,De:l}=e[i];t.dataset.correct=Number.isNaN(parseInt(s))?"0":s,t.dataset.total=a,t.dataset.percent="%"==o.slice(-1)?o.slice(0,-1):"0",t.dataset.incorrect=l||0;const c=document.querySelector(`#${this.Ct} .bm-z[data-id="${i}"] .bm-9`);c&&(c.textContent=`${n} / ${r}`);const h=document.querySelector(`#${this.Ct} .bm-z[data-id="${i}"] .bm-6`);h&&(h.innerHTML=`${o} done
${"number"!=typeof l||isNaN(l)?"???":l} off`)}i(this,U,it).call(this,this.sortPrimary,this.sortSecondary,this.showUnused)}};U=new WeakSet,V=function(){var t,e;return this.$?((t=this.$.Ot)[e=this.St]??(t[e]={}),this.$.Ot[this.St]):null},G=function(){const t=i(this,U,V).call(this);return"windowed"==t?.mode||"fullscreen"!=t?.mode},R=function(t){const e=i(this,U,V).call(this);e&&(e.mode=t?"windowed":"fullscreen"),this.$&&(this.$.Oe(this.te,t),this.$.Lt())},j=function(){const t=document.querySelector(`#${this.Ct} #bm-c`),e=document.querySelector(`#${this.Ct} #bm-5`),i=document.querySelector(`#${this.Ct} #bm-e`);t instanceof HTMLSelectElement&&(t.value=this.sortPrimary),e instanceof HTMLSelectElement&&(e.value=this.sortSecondary),i instanceof HTMLInputElement&&(i.checked=this.showUnused)},E=function(){const t=document.querySelector(`#${this.Ct}`);t?.classList.contains("bm-N")&&i(this,U,K).call(this,t),i(this,U,J).call(this),i(this,U,X).call(this),t?.remove()},Y=function(){i(this,U,J).call(this),this.ne=setInterval(()=>{document.querySelector(`#${this.Ct}`)?this.Me():i(this,U,J).call(this)},this.oe)},J=function(){this.ne&&(clearInterval(this.ne),this.ne=null)},X=function(){this.ee&&(this.ee.disconnect(),this.ee=null),this.ie&&(window.removeEventListener("resize",this.ie),this.ie=null),this.se&&(clearTimeout(this.se),this.se=null)},_=function(t,e,i){const s=Math.max(e,i);return Math.min(Math.max(Math.round(Number(t)||e),e),s)},q=function(t,e,i){const s=Math.max(8,window.innerWidth-t.offsetWidth-8),n=Math.max(8,window.innerHeight-t.offsetHeight-8);return{x:Math.min(Math.max(Math.round(Number(e)||8),8),s),y:Math.min(Math.max(Math.round(Number(i)||8),8),n)}},Z=function(t){const e=i(this,U,V).call(this);if(!e||!t)return;const s=Number(e.width),n=Number(e.height),o=Number.isFinite(s),a=Number.isFinite(n);o&&(e.width=i(this,U,_).call(this,s,this.ae,Math.min(this.le,window.innerWidth-16)),t.style.width=`${e.width}px`),a&&(e.height=i(this,U,_).call(this,n,this.re,Math.min(this.ce,window.innerHeight-16)),t.style.height=`${e.height}px`),requestAnimationFrame(()=>{if(!t.isConnected)return;const s=Number(e.x),n=Number(e.y);if(!Number.isFinite(s)||!Number.isFinite(n))return;const o=i(this,U,q).call(this,t,s,n);t.style.left="0px",t.style.top="0px",t.style.right="",t.style.transform=`translate(${o.x}px, ${o.y}px)`,o.x==s&&o.y==n||(e.x=o.x,e.y=o.y,this.$?.Lt())})},K=function(t){const e=i(this,U,V).call(this);if(!e||!t?.isConnected||!t.classList.contains("bm-N"))return;if(t.querySelector('.bm-S button[data-button-status="collapsed"]'))return;const s=t.getBoundingClientRect(),n=i(this,U,_).call(this,s.width,this.ae,Math.min(this.le,window.innerWidth-16)),o=i(this,U,_).call(this,s.height,this.re,Math.min(this.ce,window.innerHeight-16));Math.round(s.width)!=n&&(t.style.width=`${n}px`),Math.round(s.height)!=o&&(t.style.height=`${o}px`);const a=i(this,U,q).call(this,t,s.left,s.top);t.style.left="0px",t.style.top="0px",t.style.right="",t.style.transform=`translate(${a.x}px, ${a.y}px)`,e.x=a.x,e.y=a.y,e.width=n,e.height=o,this.$?.Lt()},Q=function(t,e=150){this.se&&clearTimeout(this.se),this.se=setTimeout(()=>{this.se=null,i(this,U,K).call(this,t)},e)},tt=function(){const t=document.querySelector(`#${this.Ct}.bm-W`);t&&(i(this,U,X).call(this),i(this,U,Z).call(this,t),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`,{yt:({element:t})=>i(this,U,K).call(this,t)}),this.vt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-1_`,{minWidth:this.ae,minHeight:this.re,maxWidth:Math.min(this.le,window.innerWidth-16),maxHeight:Math.min(this.ce,window.innerHeight-16),yt:({element:t})=>i(this,U,K).call(this,t)}),"function"==typeof ResizeObserver&&(this.ee=new ResizeObserver(()=>i(this,U,Q).call(this,t)),this.ee.observe(t)),this.ie=()=>i(this,U,Q).call(this,t,0),window.addEventListener("resize",this.ie))},et=function(t){const e=t.closest(`#${this.Ct}`)?.classList.contains("bm-N");console.log(`Is Windowed Mode: ${e}`);const s=new v(this.name,this.version);s.O({id:this.Qt});const n=this.Me();for(const t of this.palette){const o="#"+f(t.rgb).toUpperCase(),a=p(t.rgb);let r=1.05/(a+.05)>(a+.05)/.05?"white":"black";t.id||(r="transparent");const l="white"==r?"bm-f":"bm-g",c=t.rgb?.map(t=>Number(t)||0).join(","),h=-2==t.id||-1==t.id||0==t.id?"white":r,m=`--bm-1S: rgb(${c}); --bm-1T: ${h};`,{Se:d,ke:u,Ne:b,Ce:g,Te:w,De:x}=n[t.id],y=!!this.he.Le.get(t.id);if(e){const e=`background-size: auto 100%; background-repeat: repeat-x; background-image: url("data:image/svg+xml;utf8,");`;s.O({class:"bm-L bm-z bm-x","data-id":t.id,"data-name":t.name,"data-premium":+t.premium,"data-state":y?"hidden":"shown","data-correct":Number.isNaN(parseInt(d))?"0":d,"data-total":g,"data-percent":"%"==b.slice(-1)?b.slice(0,-1):"0","data-incorrect":x||0},(e,s)=>i(this,U,at).call(this,s,t)).O({class:"bm-a",style:`background-color: rgb(${t.rgb?.map(t=>Number(t)||0).join(",")});${t.premium?e:""}`}).lt({class:"bm-A bm-z-visibility "+l,"data-state":y?"hidden":"shown","aria-label":y?`Show the color ${t.name||""} on templates.`:`Hide the color ${t.name||""} on templates.`,innerHTML:y?this.de:this.me,style:`color: ${r};`},(e,s)=>{s.onclick=e=>{e.stopPropagation(),i(this,U,ot).call(this,s,t)},t.id||(s.disabled=!0),i(this,U,nt).call(this,s,t)}).N().H({textContent:`#${t.id.toString().padStart(2,0)}`,style:`color: ${-1==t.id||0==t.id?"white":r}`}).N().F(2,{textContent:t.name,style:`color: ${-1==t.id||0==t.id?"white":r}`}).N().H({class:"bm-9",textContent:`${u} / ${w}`,style:`color: ${-1==t.id||0==t.id?"white":r}; flex: 1 1 auto; text-align: right;`}).N().N().N()}else s.O({class:"bm-L bm-z bm-x",style:m,"data-id":t.id,"data-name":t.name,"data-premium":+t.premium,"data-state":y?"hidden":"shown","data-correct":Number.isNaN(parseInt(d))?"0":d,"data-total":g,"data-percent":"%"==b.slice(-1)?b.slice(0,-1):"0","data-incorrect":x||0},(e,s)=>i(this,U,at).call(this,s,t)).O({class:"bm-1p","aria-hidden":"true"}).N().O({class:"bm-z-main"}).O({class:"bm-a"}).lt({class:"bm-A bm-z-visibility "+l,"data-state":y?"hidden":"shown","aria-label":y?`Show the color ${t.name||""} on templates.`:`Hide the color ${t.name||""} on templates.`,innerHTML:y?this.de:this.me,style:`color: ${h};`},(e,s)=>{s.onclick=e=>{e.stopPropagation(),i(this,U,ot).call(this,s,t)},t.id||(s.disabled=!0),i(this,U,nt).call(this,s,t)}).N().N().O({class:"bm-z-title"}).H({textContent:`#${t.id.toString().padStart(2,0)} / ${-2==t.id?"mixed":o}`}).N().F(2,{textContent:t.name}).N().N().N().O({class:"bm-z-meta"}).O({class:"bm-z-progress"}).I({class:"bm-9",textContent:`${u} / ${w}`}).N().H({class:"bm-6",innerHTML:`${b} done
${"number"!=typeof x||isNaN(x)?"???":x} off`}).N().N().N().N()}s.D(t)},it=function(t,e,i){this.sortPrimary=t,this.sortSecondary=e,this.showUnused=i;const s=document.querySelector(`#${this.Qt}`),n=Array.from(s.children);n.sort((s,n)=>{const o=s.getAttribute("data-"+t),a=n.getAttribute("data-"+t),r=parseFloat(o),l=parseFloat(a),c=!isNaN(r),h=!isNaN(l);if(i?s.classList.remove("bm-I"):Number(s.getAttribute("data-total"))||s.classList.add("bm-I"),c&&h)return"ascending"===e?r-l:l-r;{const t=o.toLowerCase(),i=a.toLowerCase();return ti?"ascending"===e?1:-1:0}}),n.forEach(t=>s.appendChild(t))},st=function(t){const e=document.querySelector(`#${this.Qt}`),i=Array.from(e.children);for(const e of i){if(e.classList?.contains("bm-I"))continue;const i=e.querySelector(".bm-z-visibility");("hidden"!=i.dataset.state||t)&&("shown"==i.dataset.state&&t||i.click())}},nt=function(t,e){const i="hidden"==t.dataset.state?`Show the color ${e.name||""} on templates.`:`Hide the color ${e.name||""} on templates.`;t.ariaLabel=i;const s=t.closest(".bm-z");s?.setAttribute("aria-label",i),s?.setAttribute("data-state",t.dataset.state)},ot=function(t,e){t&&!t.disabled&&e.id&&(t.style.textDecoration="none",t.disabled=!0,"shown"==t.dataset.state?(t.innerHTML=this.de,t.dataset.state="hidden",this.he.He(e.id,!0)):(t.innerHTML=this.me,t.dataset.state="shown",this.he.He(e.id,!1)),i(this,U,nt).call(this,t,e),t.disabled=!1,t.style.textDecoration="")},at=function(t,e){t&&e.id&&(t.classList.add("bm-z-toggle"),t.tabIndex=0,t.setAttribute("role","button"),t.onclick=s=>{if(s.target instanceof Element&&s.target.closest("button, a, input, select, textarea"))return;const n=t.querySelector(".bm-z-visibility");i(this,U,ot).call(this,n,e)},t.onkeydown=e=>{"Enter"!=e.key&&" "!=e.key||(e.preventDefault(),t.click())})},rt=function(){this.be=0,this.pe=0,this.xe=0,this.we=0,this.ge=new Map,this.fe=new Map;for(const t of this.he.Ie){const e=t.zt?.total??0;this.xe+=e??0;const i=t.zt?.colors??new Map;for(const[t,e]of i){const i=Number(e)||0,s=this.fe.get(t)??0;this.fe.set(t,s+i)}const s=t.zt?.correct??{};this.be+=Object.keys(s).length,this.pe+=Object.keys(t.Bt).length;for(const t of Object.values(s))for(const[e,i]of t){const t=Number(i)||0;this.we+=t;const s=this.ge.get(e)??0;this.ge.set(e,s+t)}}console.log(`Tiles loaded: ${this.be} / ${this.pe}`),this.we>=this.xe&&this.xe&&this.be==this.pe&&(new F).Kt(document.querySelector(`#${this.Ct}`)),this.timeRemaining=new Date(30*(this.xe-this.we)*1e3+Date.now()),this.ye=a(this.timeRemaining)},lt=new WeakSet,ct=async function(t,e,i){i.preventDefault();const s=await async function(t){let e="";return t&&(e=t.clipboardData.getData("text/plain")),0!=e.length||(await navigator.clipboard.readText().then(t=>{e=t}).catch(t=>{l("Failed to retrieve clipboard data using navigator! Using fallback methods...")}),0!=e.length||(e=window.clipboardData?.getData("Text"))),e}(i),n=s.split(/[^a-zA-Z0-9]+/).filter(t=>t).map(Number).filter(t=>!isNaN(t));2==n.length&&"bm-O"==e.id?(t.ht("bm-O",n?.[0]||""),t.ht("bm-P",n?.[1]||"")):1==n.length?t.ht(e.id,n?.[0]||""):(t.ht("bm-Q",n?.[0]||""),t.ht("bm-R",n?.[1]||""),t.ht("bm-O",n?.[2]||""),t.ht("bm-P",n?.[3]||""))};var ft=class extends v{constructor(t,i,s,n=void 0){super(t,i),e(this,ht),this.window=null,this.Ct="bm-u",this.Tt=document.body,this.Be=JSON.parse(GM_getValue("bmTemplates","{}")),this.scriptVersion=this.Be?.scriptVersion,this.schemaVersion=this.Be?.schemaVersion,this.Pe=void 0,this.Ae=s,this.he=n}kt(){if(document.querySelector(`#${this.Ct}`))return void document.querySelector(`#${this.Ct}`).remove();let t="";document.querySelector("#bm-F")||(t=t.concat("z-index: 9001;").trim()),this.window=this.O({id:this.Ct,class:"bm-W",style:t},(t,e)=>{}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Template Wizard"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>t.wt(e),e.ontouchend=()=>{e.click()}}).N().O().N().lt({class:"bm-s",textContent:"✖","aria-label":'Close window "Template Wizard"'},(t,e)=>{e.onclick=()=>{document.querySelector(`#${this.Ct}`)?.remove()},e.ontouchend=()=>{e.click()}}).N().N().O({class:"bm-m"}).O({class:"bm-L bm-h"}).F(1,{textContent:"Template Wizard"}).N().N().W().N().O({class:"bm-L"}).F(2,{textContent:"Status"}).N().L({id:"bm-v",textContent:"Loading template storage status..."}).N().N().O({class:"bm-L bm-H"}).F(2,{textContent:"Detected templates:"}).N().N().N().N().D(this.Tt),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`),i(this,ht,mt).call(this),i(this,ht,dt).call(this)}};ht=new WeakSet,mt=function(){const t=this.schemaVersion.split(/[-\.\+]/),e=this.Ae.split(/[-\.\+]/);let s="";t[0]==e[0]?t[1]==e[1]?(s='Template storage health: Healthy!
No futher action required. (Reason: Semantic version matches)',this.Pe="Good"):(s='Template storage health: Poor!
You can still use your template, but some features may not work. It is recommended that you update Blue Marble\'s template storage. (Reason: MINOR version mismatch)',this.Pe="Poor"):t[0]Bad!
It is guaranteed that some features are broken. You might still be able to use the template. It is HIGHLY recommended that you download all templates and update Blue Marble\'s template storage before continuing. (Reason: MAJOR version mismatch)',this.Pe="Bad"):(s='Template storage health: Dead!
Blue Marble can not load the template storage. (Reason: MAJOR version unknown)',this.Pe="Dead");const n=`
If you want to continue using your current templates, then make sure the template storage (schema) is up-to-date.
If you don't want to update the template storage, then downgrade Blue Marble to version ${r(this.scriptVersion)} to continue using your templates.
Alternatively, if you don't care about corrupting the templates listed below, you can fix any issues with the template storage by uploading a new template.`,o=function(){const t=[...document.querySelectorAll("body > div > .hidden")].filter(t=>/version:/i.test(t.textContent));if(t[0]){const e=t[0].textContent?.match(/\d+/);return e?new Date(Number(e[0])):void 0}}();let l=o?a(o):"???";this.ht("#bm-v",`${s}
Your templates were created during Blue Marble version ${r(this.scriptVersion)} with schema version ${r(this.schemaVersion)}.
The current Blue Marble version is ${r(this.version)} and requires schema version ${r(this.Ae)}.
Wplace was last updated on ${l}.${"Good"!=this.Pe?n:""}`);const c=new v(this.name,this.version);"Dead"!=this.Pe&&(c.O({class:"bm-L bm-D bm-h",style:"gap: 1.5ch;"}),c.lt({textContent:"Download all templates"},(t,e)=>{e.onclick=()=>{e.disabled=!0,this.he.ze().then(()=>{e.disabled=!1})}}).N()),"Poor"!=this.Pe&&"Bad"!=this.Pe||c.lt({textContent:`Update template storage to ${this.Ae}`},(t,e)=>{e.onclick=()=>{e.disabled=!0,i(this,ht,ut).call(this,!0)}}).N(),c.N().D(document.querySelector("#bm-v").parentNode)},dt=function(){const t=this.Be?.templates;if(Object.keys(t).length>0){const e=document.querySelector(`#${this.Ct} .bm-H`),i=new v(this.name,this.version);i.O({id:"bm-B",class:"bm-L"});for(const e in t){const s=e,o=t[e];if(t.hasOwnProperty(e)){const t=s.split(" "),e=Number(t?.[0]),a=d(t?.[1]||"0",this.he.Fe),r=o.name||`Template ${e||""}`,l=o?.coords?.split(",").map(Number),c=o.pixels?.total??void 0,h=void 0,m="number"==typeof e?n(e):"???",u="number"==typeof a?n(a):"???",b="number"==typeof c?n(c):"???";i.O({class:"bm-L bm-D"}).O({class:"bm-D",style:"flex-direction: column; gap: 0;"}).O({class:"bm-1",textContent:h||"🖼️"}).N().H({textContent:`#${m}`}).N().N().O({class:"bm-D bm-0"}).F(3,{textContent:r}).N().I({textContent:`Uploaded by user #${u}`}).N().I({textContent:`Coordinates: ${l.join(", ")}`}).N().I({textContent:`Total Pixels: ${b}`}).N().N().N()}}i.N().D(e)}},ut=async function(t){if(t){const t=document.querySelector(`#${this.Ct} .bm-m`);t.innerHTML="",new v(this.name,this.version).O({class:"bm-L"}).O({class:"bm-L bm-h"}).F(1,{textContent:"Template Wizard"}).N().N().W().N().O({class:"bm-L"}).F(2,{textContent:"Status"}).N().L({textContent:"Updating template storage. Please wait..."}).N().N().N().D(t)}GM_deleteValue("bmCoords");const e=this.Be?.templates;if(Object.keys(e).length>0)for(const[t,i]of Object.entries(e))if(e.hasOwnProperty(t)){const t=new z({displayName:i.name,Bt:i.tiles});t.Xt();const e=await this.he.We(t);await this.he.Ue(e,t.displayName,t.coords)}t&&(console.log("Restarting Template Wizard..."),document.querySelector(`#${this.Ct}`).remove(),new ft(this.name,this.version,this.Ae,this.he).kt())};var gt,wt,xt,yt,$t,vt,Mt,Ct,Tt=ft;gt=new WeakSet,wt=function(){const t=this.$?.Ot?.filter,e=Array.isArray(t)?t:[];this.Le.clear();for(const t of e){const e=Number(t);Number.isFinite(e)&&this.Le.set(e,!0)}},xt=function(){this.$&&(this.$.Ot.filter=Array.from(this.Le.keys()).map(t=>Number(t)).filter(t=>Number.isFinite(t)).sort((t,e)=>t-e),this.$.Lt())},yt=async function(){GM.setValue("bmTemplates",JSON.stringify(this.Ve))},$t=async function(t){console.log("Parsing BlueMarble...");const e=t.templates;console.log(`BlueMarble length: ${Object.keys(e).length}`);const i=t?.schemaVersion,s=i.split(/[-\.\+]/),n=this.schemaVersion.split(/[-\.\+]/),o=t?.scriptVersion;console.log(`BlueMarble Template Schema: ${i}; Script Version: ${o}`),s[0]==n[0]?(s[1]!=n[1]&&new Tt(this.name,this.version,this.schemaVersion,this).kt(),this.Ie=await async function({At:t,Ge:i,Ie:s}){if(Object.keys(e).length>0)for(const n in e){const o=n,a=e[n];if(console.log(`Template Key: ${o}`),e.hasOwnProperty(n)){const e=o.split(" "),n=Number(e?.[0]),r=e?.[1]||"0",l=a.name||`Template ${n||""}`,c={total:a.pixels?.total,colors:new Map(Object.entries(a.pixels?.colors||{}).map(([t,e])=>[Number(t),e]))},h=a.tiles,m={},d={},u=t*i;for(const t in h)if(console.log(t),h.hasOwnProperty(t)){const e=b(h[t]),i=new Blob([e],{type:"image/png"}),s=await createImageBitmap(i);m[t]=s;const n=new OffscreenCanvas(u,u).getContext("2d");n.drawImage(s,0,0);const o=n.getImageData(0,0,s.width,s.height);d[t]=new Uint32Array(o.data.buffer)}const p=new z({displayName:l,Ht:n||this.Ie?.length||0,It:r||""});p.zt=c,p.Bt=m,p.Pt=d,s.push(p),console.log(this.Ie),console.log("^^^ This ^^^")}}return s}({At:this.At,Ge:this.Ge,Ie:this.Ie})):s[0]>>24&255,y=g>>>24&255,$=b.get(w)??-2,v=b.get(g)??-2;if(this.Le.get($)&&(e[i*c+h]=g),-1==$){const t=536870912;this.Le.get($)?e[i*c+h]=0:(u/o&1)==(f/o&1)?(e[i*c+h]=t,e[(i-1)*c+(h-1)]=t,e[(i-1)*c+(h+1)]=t,e[(i+1)*c+(h-1)]=t,e[(i+1)*c+(h+1)]=t):(e[i*c+h]=0,e[(i-1)*c+h]=t,e[(i+1)*c+h]=t,e[i*c+(h-1)]=t,e[i*c+(h+1)]=t)}if(!n&&x>m&&v!=$&&(d||y>m)){const t=e[i*c+h];for(const n of s){const[s,o,a]=n,r=0!=s?1!=s?t:4278190335:0;e[(i+a)*c+(h+o)]=r}}if(-1==$&&g<=m){const t=p.get($);p.set($,t?t+1:1);continue}if(x<=m||y<=m)continue;if(v!=$)continue;const M=p.get($);p.set($,M?M+1:1)}return console.log("List of template pixels that match the tile:"),console.log(p),{qe:p,Ze:e}},Mt=new WeakSet,Ct=function(t){const e=JSON.parse(GM_getValue("bmUserSettings","{}"));e.telemetry=t,GM.setValue("bmUserSettings",JSON.stringify(e))};var St=GM_info.script.name.toString(),kt=GM_info.script.version.toString();!function(t){const e=document.createElement("script");e.setAttribute("bm-11",St),e.setAttribute("bm-X","color: cornflowerblue;"),e.textContent=`(${t})();`,document.documentElement?.appendChild(e),e.remove()}(()=>{const t=document.currentScript,e=t?.getAttribute("bm-11")||"Blue Marble",i=t?.getAttribute("bm-X")||"",s=new Map;window.addEventListener("message",t=>{const{source:n,endpoint:o,blobID:a,blobData:r,blink:l}=t.data,c=Date.now()-l;if(console.groupCollapsed(`%c${e}%c: ${s.size} Recieved IMAGE message about blob "${a}"`,i,""),console.log(`Blob fetch took %c${String(Math.floor(c/6e4)).padStart(2,"0")}:${String(Math.floor(c/1e3)%60).padStart(2,"0")}.${String(c%1e3).padStart(3,"0")}%c MM:SS.mmm`,i,""),console.log(s),console.groupEnd(),"blue-marble"==n&&a&&r&&!o){const t=s.get(a);"function"==typeof t?t(r):h(`%c${e}%c: Attempted to retrieve a blob (%s) from queue, but the blobID was not a function! Skipping...`,i,"",a),s.delete(a)}});const n=window.fetch;window.fetch=async function(...t){const o=await n.apply(this,t),a=o.clone(),r=(t[0]instanceof Request?t[0]?.url:t[0])||"ignore",l=a.headers.get("content-type")||"";if(l.includes("application/json"))console.log(`%c${e}%c: Sending JSON message about endpoint "${r}"`,i,""),a.json().then(t=>{const s=r?.split("?")[0].split("/").filter(t=>t&&isNaN(Number(t))).filter(t=>t&&!t.includes(".")).pop();if("me"==s)try{sessionStorage.setItem("bm-2y",JSON.stringify(t))}catch(t){console.warn(`%c${e}%c: Failed to cache "/me" payload`,i,"",t)}window.postMessage({source:"blue-marble",endpoint:r,jsonData:t},"*")}).catch(t=>{console.error(`%c${e}%c: Failed to parse JSON: `,i,"",t)});else if(l.includes("image/")&&!r.includes("openfreemap")&&!r.includes("maps")){const t=Date.now(),n=await a.blob();return console.log(`%c${e}%c: ${s.size} Sending IMAGE message about endpoint "${r}"`,i,""),new Promise(o=>{const l=crypto.randomUUID();s.set(l,t=>{o(new Response(t,{headers:a.headers,status:a.status,statusText:a.statusText})),console.log(`%c${e}%c: ${s.size} Processed blob "${l}"`,i,"")}),window.postMessage({source:"blue-marble",endpoint:r,blobID:l,blobData:n,blink:t})}).catch(n=>{const o=Date.now();console.error(`%c${e}%c: Failed to Promise blob!`,i,""),console.groupCollapsed(`%c${e}%c: Details of failed blob Promise:`,i,""),console.log(`Endpoint: ${r}\nThere are ${s.size} blobs processing...\nBlink: ${t.toLocaleString()}\nTime Since Blink: ${String(Math.floor(o/6e4)).padStart(2,"0")}:${String(Math.floor(o/1e3)%60).padStart(2,"0")}.${String(o%1e3).padStart(3,"0")} MM:SS.mmm`),console.error("Exception stack:",n),console.groupEnd()})}return o}});var Nt=`div:has(>confetti-piece){position:absolute;inset:0;overflow:hidden;pointer-events:none}confetti-piece{position:absolute;top:-10px;width:var(--size);height:var(--size);background:currentColor;transform:translate3d(var(--x),-10vh,0) rotate(var(--rot));animation:fall var(--duration) linear var(--delay);will-change:transform;pointer-events:none}@keyframes fall{to{transform:translate3d(var(--x),110vh,0) rotate(calc(var(--rot) + 720deg))}}.bm-screenreader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.bm-W{--bm-surface-strong: rgba(9, 20, 42, .5);--bm-surface-soft: rgba(24, 41, 74, .28);--bm-surface-glass: rgba(255, 255, 255, .1);--bm-surface-glass-strong: rgba(255, 255, 255, .18);--bm-border-soft: rgba(255, 255, 255, .18);--bm-border-strong: rgba(163, 228, 255, .34);--bm-text-primary: rgba(17, 36, 66, .96);--bm-text-secondary: rgba(36, 57, 90, .84);--bm-accent-start: #baf6ff;--bm-accent-end: #81b6ff;--bm-accent-shadow: rgba(132, 182, 255, .22);--bm-font-body: "Rajdhani", "Segoe UI Variable Text", "Segoe UI", sans-serif;--bm-font-display: "Michroma", "Orbitron", "Segoe UI", sans-serif;--bm-font-mono: "Roboto Mono", "Rajdhani", "Courier New", monospace;position:fixed;isolation:isolate;overflow:hidden;background:radial-gradient(circle at 14% 12%,rgba(255,255,255,.24),transparent 18%),radial-gradient(circle at 86% 8%,rgba(186,246,255,.22),transparent 24%),radial-gradient(circle at 82% 84%,rgba(129,182,255,.18),transparent 28%),linear-gradient(145deg,#ffffff2e,#ffffff0f 22%,#6991d414 54%,#09142a2e);color:var(--bm-text-primary);padding:6px;border-radius:16px;border:1px solid var(--bm-border-soft);box-shadow:0 18px 40px #0003,inset 0 1px #ffffff38,inset 0 -1px #ffffff0d;z-index:9000;transition:background .32s ease,border-color .22s ease,box-shadow .22s ease,opacity .22s ease,transform 0s,width .22s ease,max-width .22s ease,max-height .22s ease;top:75px;left:60px;width:auto;max-height:fit-content;max-width:calc(100% - 135px);backdrop-filter:blur(26px) saturate(1.25);font-family:var(--bm-font-body);letter-spacing:.04em}.bm-W:before,.bm-W:after{content:"";position:absolute;inset:0;pointer-events:none}.bm-W:before{border-radius:inherit;padding:1px;background:linear-gradient(135deg,#ffffff73,#ffffff1f 24%,#baf6ff38 58%,#81b6ff4d);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.85}.bm-W:after{border-radius:inherit;background:linear-gradient(180deg,rgba(255,255,255,.2),transparent 24%),radial-gradient(circle at 18% 0%,rgba(255,255,255,.22),transparent 22%),radial-gradient(circle at 88% 16%,rgba(186,246,255,.18),transparent 18%);opacity:1}.bm-S{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.28ch;padding:.18rem .24rem;border-radius:10px;border:1px solid rgba(255,255,255,.16);background:radial-gradient(circle at 0 0,rgba(255,255,255,.22) 0,transparent 42%),linear-gradient(135deg,#ffffff2e,#ffffff14);cursor:grab;width:100%;height:fit-content;box-shadow:inset 0 1px #ffffff29,0 6px 18px #0000001a}.bm-S.bm-M{cursor:grabbing}.bm-W:has(.bm-S.bm-M){pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.bm-S.bm-M{pointer-events:auto}.bm-T{display:inline-block;height:2.2em;margin-right:.45ch;padding:.2rem;border-radius:12px;vertical-align:middle;background:linear-gradient(135deg,#ffffff38,#ffffff14);box-shadow:inset 0 1px #ffffff29,0 8px 18px #0000001f}.bm-W h1{display:inline-block;font-size:1rem;font-weight:700;vertical-align:middle;font-family:var(--bm-font-display);text-transform:uppercase;letter-spacing:.14em;color:#10213cf5}.bm-S h1,.bm-y{font-size:.78rem;user-select:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-family:var(--bm-font-display);letter-spacing:.14em;color:#122542f2;text-shadow:0 1px 0 rgba(255,255,255,.28)}.bm-S div:has(h1){display:contents}.bm-W h2{display:inline-block;font-size:.88rem;font-weight:700;vertical-align:middle;font-family:var(--bm-font-display);letter-spacing:.1em;color:#122340f5}.bm-W h3{display:inline-block;font-size:large;font-weight:700;font-family:var(--bm-font-display);letter-spacing:.08em;color:#122340f5}.bm-W p{color:var(--bm-text-secondary);line-height:1.5;letter-spacing:.035em}.bm-W hr{border:none;height:1px;margin:.32rem 0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.28),transparent)}.bm-L.bm-h{width:fit-content;margin-left:auto;margin-right:auto}.bm-L{margin:.24em 0}.bm-W input,.bm-W select,.bm-W textarea,.bm-W button{font:inherit}.bm-W button{appearance:none;color:var(--bm-text-primary);font-family:var(--bm-font-display);background:linear-gradient(135deg,#ffffff38,#a4d0ff24);border:1px solid rgba(255,255,255,.22);border-radius:999px;padding:.28em .62em;min-height:1.78em;font-weight:600;letter-spacing:.1em;box-shadow:inset 0 1px #ffffff38,0 8px 20px #0000001a;transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,filter .18s ease,opacity .18s ease,transform .18s ease}.bm-W button:hover,.bm-W button:focus-visible{background:linear-gradient(135deg,#ffffff47,#baf6ff2e);border-color:#e6f5ff5c;box-shadow:inset 0 1px #ffffff42,0 10px 22px #0000001f;transform:translateY(-1px)}.bm-W button:focus-visible,.bm-W input:focus-visible,.bm-W select:focus-visible,.bm-W textarea:focus-visible{outline:none;border-color:#74e7ff9e;box-shadow:0 0 0 3px #74e7ff26,inset 0 1px #ffffff1f}.bm-W button:active{transform:translateY(0) scale(.98);filter:brightness(.98);box-shadow:inset 0 1px #ffffff1f,0 8px 16px #12244e3d}.bm-W button:disabled{opacity:.56;cursor:not-allowed;text-decoration:none;transform:none;filter:saturate(.72);box-shadow:none}.bm-W button.bm-1R{color:#07203b;background:linear-gradient(135deg,#ffffff6b,#baf6ff57);border-color:#eff8ff6b;box-shadow:inset 0 1px #ffffff70,0 10px 22px #81b6ff24}.bm-W button.bm-1R:hover,.bm-W button.bm-1R:focus-visible{background:linear-gradient(135deg,#ffffff85,#ccfaff5c)}.bm-W button.bm-1D{background:linear-gradient(135deg,#ffffff29,#ffffff14);border-color:#ffffff2e;box-shadow:inset 0 1px #ffffff24,0 8px 20px #00000014}.bm-W button.bm-1D:hover,.bm-W button.bm-1D:focus-visible{background:linear-gradient(135deg,#ffffff3d,#baf6ff1f)}.bm-s{display:inline-flex;align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.16);inline-size:1.62rem;block-size:1.62rem;min-height:1.62rem!important;min-width:1.62rem;margin-top:0;text-align:center;line-height:1;padding:0!important;aspect-ratio:1 / 1;border-radius:50%!important;background:linear-gradient(135deg,#ffffff3d,#ffffff1a)!important;box-shadow:inset 0 1px #ffffff2e,0 8px 18px #0000001a!important;overflow:hidden;flex:0 0 auto;font-size:.74rem}.bm-s svg{display:block;width:70%;height:70%;flex:0 0 auto;margin:auto;color:currentColor;pointer-events:none;transform:translateZ(0);overflow:visible}.bm-s .bm-1j{width:68%;height:68%;transform:translateY(.5px) translateZ(0)}.bm-s .bm-1e{width:62%;height:62%;transform:translateY(.75px) translateZ(0)}#bm-t.bm-N .bm-s .bm-1e{transform:translateZ(0)}.bm-J{vertical-align:middle}.bm-J svg{width:50%;margin:0 auto;fill:#111}.bm-W button.bm-A{background:transparent!important;box-shadow:none!important;border-color:transparent!important}.bm-A.bm-f:hover,.bm-A.bm-f:focus{background-color:#ffffff2e!important}.bm-A.bm-f:active{background-color:#ffffff3d!important}.bm-A.bm-g:hover,.bm-A.bm-g:focus{background-color:#00000024!important}.bm-A.bm-g:active{background-color:#0003!important}.bm-W input[type=number],.bm-W select,.bm-W textarea{color:var(--bm-text-primary);font-family:var(--bm-font-body);background:linear-gradient(180deg,#ffffff29,#ffffff0f);border:1px solid rgba(255,255,255,.18);border-radius:12px;box-shadow:inset 0 1px #ffffff1f}input[type=number].bm-C{appearance:auto;-moz-appearance:textfield;width:5.9ch;margin-left:1ch;padding:.2em .35ch;font-size:small}input[type=number].bm-C::-webkit-outer-spin-button,input[type=number].bm-C::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}div:has(>.bm-K)>button{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bm-K,input[type=file]{display:none!important;visibility:hidden!important;position:absolute!important;left:-9999px!important;top:-9999px!important;width:0!important;height:0!important;opacity:0!important;z-index:-9999!important;pointer-events:none!important}.bm-W select{padding:.22em .45ch}.bm-W label:has(input[type=checkbox]){display:flex;width:fit-content;gap:1ch;align-items:center;color:var(--bm-text-secondary)}.bm-W input[type=checkbox]{width:1em;accent-color:#74e7ff}.bm-m{overflow:hidden;max-height:calc(100% - 5px);transition:height .3s cubic-bezier(.4,0,.2,1)}.bm-W textarea{font-size:small;padding:.38em .52em;height:4em;width:100%;resize:vertical;line-height:1.45}.bm-W textarea::placeholder,.bm-W input::placeholder{color:#2f446699}.bm-W a:not(:has(*)){color:#1558a4f0;text-decoration:underline;text-decoration-color:#1558a459}.bm-W small{font-size:x-small;font-family:var(--bm-font-display);letter-spacing:.12em;color:var(--bm-text-secondary)}.bm-W ul li{list-style:disc;margin-left:5ch}.bm-W .bm-L.bm-H{max-height:var(--bm-H-max-height, calc(80vh - 150px) );overflow:auto;scrollbar-width:thin;scrollbar-color:rgba(146,221,255,.42) rgba(255,255,255,.05)}.bm-W .bm-L.bm-H::-webkit-scrollbar{width:10px;height:10px}.bm-W .bm-L.bm-H::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#74e7ff7a,#538dff66);border-radius:999px;border:2px solid transparent;background-clip:padding-box}.bm-W .bm-L.bm-H::-webkit-scrollbar-track{background:#ffffff0a;border-radius:999px}.bm-x{display:flex;align-content:center;justify-content:space-between;align-items:center;gap:.35ch}.bm-D{display:flex;align-content:center;justify-content:center;align-items:center;gap:.35ch}.bm-_{white-space:pre;letter-spacing:0;line-height:1!important;font-size:1.6em;font-family:monospace}.bm-N .bm-L:not(#bm-F .bm-L){margin-top:.18em;margin-bottom:.18em}.bm-N h1:not(#bm-F h1){font-size:1em}#bm-t .bm-1K{display:block;width:1.28em;height:1.28em;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;overflow:visible}#bm-t p svg{display:inline-block;height:1em;width:1em;color:currentColor;vertical-align:-.16em}#bm-t:not(.bm-N){width:min(50rem,calc(100vw - .55rem));max-width:min(50rem,calc(100vw - .55rem))!important}#bm-t .bm-1-{padding-top:.08rem}#bm-t .bm-1Q{gap:.22rem;flex-wrap:wrap;width:100%;padding:.16rem}#bm-t .bm-1Q>button{flex:1 1 10rem}#bm-t .bm-1x{padding-right:.08rem}#bm-t .bm-1L{display:block;margin:0 .18rem}#bm-t .bm-1E{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.24rem}#bm-t .bm-1F,#bm-t .bm-1A{min-width:0;border-radius:11px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(155deg,#ffffff2e,#ffffff12);box-shadow:inset 0 1px #ffffff29,0 8px 20px #00000014}#bm-t .bm-1F{min-height:2.7rem;display:flex;flex-direction:column;justify-content:center;gap:.08rem;padding:.34rem .45rem;color:#12233ff5;line-height:1.22}#bm-t .bm-1y{color:#314769d1;font-size:.62rem;letter-spacing:0;font-family:var(--bm-font-display);text-transform:uppercase}#bm-t .bm-1z{display:inline-block;min-width:0;color:#0f1f38f5;font-size:1.04em;font-weight:700;overflow-wrap:anywhere}#bm-t .bm-1F time{font-family:var(--bm-font-mono);letter-spacing:0}#bm-t .bm-1A{padding:.38rem .48rem}#bm-t .bm-1A fieldset{border:none;padding:0;margin:0}#bm-t .bm-1A legend{margin-bottom:.12rem}#bm-t .bm-1A .bm-L{margin-top:.1rem;margin-bottom:.1rem}#bm-t .bm-1o{display:flex;justify-content:flex-start}#bm-t .bm-1o button{min-width:7.8rem}#bm-E{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-items:stretch;gap:.38rem}#bm-t .bm-z{position:relative;overflow:hidden;width:fit-content;max-width:35ch;padding:.28rem;gap:.28rem;border-radius:13px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(160deg,#ffffff2e,#ffffff12);box-shadow:inset 0 1px #ffffff29,0 8px 20px #00000014;transition:background .25s ease,border-color .25s ease,box-shadow .25s ease,transform .25s ease}#bm-t .bm-z:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at top right,rgba(255,255,255,.18),transparent 24%),radial-gradient(circle at 18% 0%,rgba(186,246,255,.12),transparent 22%)}#bm-t:not(.bm-N) .bm-z:before{background:linear-gradient(180deg,#ffffff14,#0000000a)}#bm-t:not(.bm-N) .bm-z:after{content:"";position:absolute;left:.52rem;bottom:.46rem;width:1.65rem;height:1.65rem;background:currentColor;opacity:.72;pointer-events:none;z-index:0;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.8 12s3.1-5 8.2-5 8.2 5 8.2 5-3.1 5-8.2 5-8.2-5-8.2-5Z' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='none' stroke='black' stroke-width='1.9'/%3E%3C/svg%3E") center / contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.8 12s3.1-5 8.2-5 8.2 5 8.2 5-3.1 5-8.2 5-8.2-5-8.2-5Z' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='none' stroke='black' stroke-width='1.9'/%3E%3C/svg%3E") center / contain no-repeat}#bm-t:not(.bm-N) .bm-z[data-state=hidden]:after{opacity:.88;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.6 9.8C6.1 8.3 8.6 7 12 7c5.1 0 8.2 5 8.2 5a15.2 15.2 0 0 1-2.2 2.7' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M14.1 16.7a8.3 8.3 0 0 1-2.1.3c-5.1 0-8.2-5-8.2-5a14.9 14.9 0 0 1 1.8-2.3' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M5 5l14 14' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10.4 10.7a2.5 2.5 0 0 0 2.9 2.9' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.6 9.8C6.1 8.3 8.6 7 12 7c5.1 0 8.2 5 8.2 5a15.2 15.2 0 0 1-2.2 2.7' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M14.1 16.7a8.3 8.3 0 0 1-2.1.3c-5.1 0-8.2-5-8.2-5a14.9 14.9 0 0 1 1.8-2.3' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M5 5l14 14' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10.4 10.7a2.5 2.5 0 0 0 2.9 2.9' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat}#bm-t .bm-z-toggle{cursor:pointer}#bm-t .bm-z:hover,#bm-t .bm-z:focus-within{transform:translateY(-2px);border-color:#92ddff42;box-shadow:inset 0 1px #fff3,0 10px 24px #0000001a}#bm-t:not(.bm-N) .bm-z{width:min(100%,23.5rem);max-width:23.5rem;min-height:6.15rem;display:grid;grid-template-columns:minmax(0,1.2fr) minmax(7.6rem,.8fr);align-items:stretch;gap:.48rem;padding:.5rem;color:var(--bm-1T);background-color:var(--bm-1S);background-image:none}#bm-t:not(.bm-N) .bm-z[data-id="-2"][data-state=shown]{background-image:conic-gradient(#a00,#aa0 16.6%,#0a0,#0aa 50%,#00a 66.6%,#a0a,#a00)}#bm-t:not(.bm-N) .bm-z[data-id="-1"][data-state=shown],#bm-t:not(.bm-N) .bm-z[data-id="0"][data-state=shown]{background-image:url('data:image/svg+xml;utf8,');background-color:#ffffff2e}#bm-t:not(.bm-N) .bm-z[data-state=hidden]{color:var(--bm-1T);border-color:#ffffff29;background-color:var(--bm-1S);background-image:none}#bm-t:not(.bm-N) .bm-z[data-id="-2"][data-state=hidden]{background-image:conic-gradient(#a00,#aa0 16.6%,#0a0,#0aa 50%,#00a 66.6%,#a0a,#a00)}#bm-t:not(.bm-N) .bm-z[data-id="-1"][data-state=hidden],#bm-t:not(.bm-N) .bm-z[data-id="0"][data-state=hidden]{background-image:url('data:image/svg+xml;utf8,');background-color:#ffffff2e}#bm-t:not(.bm-N) .bm-z[data-state=hidden]:before{opacity:.16}#bm-t:not(.bm-N) .bm-z>*{position:relative;z-index:1}#bm-t:not(.bm-N) .bm-1p{display:none}#bm-t:not(.bm-N) .bm-z[data-premium="1"] .bm-1p{position:absolute;top:50%;right:-3.2rem;z-index:0;display:block;width:10.5rem;aspect-ratio:1;background:currentColor;clip-path:polygon(50% 5%,62% 38%,98% 38%,69% 59%,80% 93%,50% 72%,20% 93%,31% 59%,2% 38%,38% 38%);opacity:.12;pointer-events:none;transform:translateY(-50%)}#bm-t:not(.bm-N) .bm-z[data-premium="1"][data-state=hidden] .bm-1p{opacity:.18}#bm-t:not(.bm-N) .bm-z-main,#bm-t:not(.bm-N) .bm-z-meta,#bm-t:not(.bm-N) .bm-z-progress{min-width:0;display:flex;flex-direction:column}#bm-t:not(.bm-N) .bm-z-main{justify-content:flex-start;gap:.4rem}#bm-t:not(.bm-N) .bm-z-title{min-width:0}#bm-t:not(.bm-N) .bm-z-meta{align-items:flex-end;justify-content:space-between;gap:.42rem;text-align:right}#bm-t:not(.bm-N) .bm-z-progress{align-items:flex-end;gap:.08rem}#bm-t:not(.bm-N) .bm-z .bm-9{font-family:var(--bm-font-display);font-size:1rem;font-weight:700;line-height:1.15;overflow-wrap:anywhere}#bm-t .bm-z-toggle:focus-visible{outline:none;border-color:#74e7ff9e;box-shadow:0 0 0 3px #74e7ff26,inset 0 1px #fff3,0 10px 24px #0000001a}#bm-t .bm-a{display:block;width:fit-content;height:fit-content;padding:.26rem;border:1px solid rgba(255,255,255,.18);border-radius:10px;box-shadow:inset 0 1px #ffffff24,0 6px 16px #00000014}#bm-t .bm-z[data-id="-2"] .bm-a{background:conic-gradient(#a00,#aa0 16.6%,#0a0,#0aa 50%,#00a 66.6%,#a0a,#a00)}#bm-t .bm-z[data-id="-1"] .bm-a{background:url('data:image/svg+xml;utf8,') repeat;background-color:transparent!important}#bm-t .bm-z[data-id="-1"] .bm-a svg{color:#fff!important}#bm-t .bm-z[data-id="0"] .bm-a{background-color:transparent!important}#bm-t .bm-a button{display:inline-flex;align-items:center;justify-content:center;padding:.24em;min-width:2.05rem;min-height:2.05rem;border-radius:999px;line-height:1}#bm-t .bm-a .bm-1K{width:1.55rem;height:1.55rem;filter:drop-shadow(0 1px 0 rgba(255,255,255,.18))}#bm-t:not(.bm-N) .bm-a{display:none}#bm-t:not(.bm-N) .bm-a button{min-width:3rem;min-height:3rem;padding:0;color:currentColor!important;pointer-events:none}#bm-t:not(.bm-N) .bm-a .bm-1K{width:2.75rem;height:2.75rem;filter:none;transform:translateY(.08rem)}#bm-t .bm-z>.bm-x{flex-direction:column;align-items:flex-start;gap:.02rem}#bm-t .bm-z h2{margin:.04rem 0 0}#bm-t:not(.bm-N) .bm-z h2{display:block;max-width:100%;margin:.08rem 0 0;color:currentColor;font-size:1.02rem;letter-spacing:0;line-height:1.12;overflow-wrap:anywhere}#bm-t .bm-z .bm-6{margin:.1rem 0 0}#bm-t .bm-z small{font-size:.75em}#bm-t:not(.bm-N) .bm-z small{color:currentColor;letter-spacing:0;opacity:.82}#bm-t .bm-z.bm-I{display:none}#bm-t.bm-N{--bm-H-max-height: 100%;display:grid;grid-template-rows:auto minmax(0,1fr);width:360px;height:min(60vh,22rem);min-width:360px;min-height:180px;max-width:min(1000px,calc(100vw - 16px))!important;max-height:min(1400px,calc(100vh - 16px))!important;overflow:hidden;box-sizing:border-box;position:fixed;transition:background .32s ease,border-color .22s ease,box-shadow .22s ease,transform 0s}#bm-t.bm-N .bm-m{display:grid;grid-template-rows:auto auto auto auto minmax(0,1fr);grid-row:2;min-height:0;min-width:0;overflow:hidden}#bm-t.bm-N .bm-1Q{gap:.16rem;flex-wrap:nowrap;width:100%;padding:.12rem}#bm-t.bm-N .bm-1Q>button{flex:1 1 0;min-width:0}#bm-t.bm-N #bm-E{flex-direction:column;align-items:stretch;gap:.16rem;width:100%;align-self:stretch;min-width:0;box-sizing:border-box}#bm-t.bm-N .bm-z{width:100%;max-width:none;align-self:stretch;flex:1 1 auto;min-width:0;margin:0;padding:.12rem;border-radius:11px;box-sizing:border-box}#bm-t.bm-N .bm-z>.bm-x{width:100%;min-width:0;flex:1 1 auto}#bm-t.bm-N .bm-L.bm-H{display:block;grid-row:5;min-height:0;min-width:0;height:100%;width:100%;max-height:100%!important;overflow:auto;box-sizing:border-box}#bm-t.bm-N .bm-1_{position:absolute;right:4px;bottom:4px;display:flex;width:20px;height:20px;align-items:flex-end;justify-content:flex-end;padding-right:4px;padding-bottom:4px;box-sizing:border-box;z-index:5;cursor:nwse-resize;pointer-events:auto;opacity:.78;touch-action:none;user-select:none;color:#ffffffdb;background:linear-gradient(135deg,#ffffff24,#538dff24);border:1px solid rgba(255,255,255,.12);border-radius:8px;box-shadow:inset 0 1px #ffffff14}#bm-t.bm-N .bm-1_:hover,#bm-t.bm-N .bm-1_.bm-2s{opacity:1;border-color:#92ddff5c;box-shadow:inset 0 1px #ffffff1a,0 8px 16px #00000029}#bm-t.bm-N .bm-a{display:flex;width:100%;min-width:0;flex:1 1 auto;gap:.5ch;align-items:center;padding:.1rem .2rem;border:none;border-radius:8px;box-sizing:border-box}#bm-t.bm-N .bm-a button{padding:.2em;flex:0 0 auto}#bm-t.bm-N .bm-a .bm-1K{width:1.36rem;height:1.36rem}#bm-t.bm-N .bm-z h2{font-size:.78rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#bm-t #bm-2{display:inline-flex;align-items:center;padding:.08rem .24rem;border-radius:999px;background:#ffffff1f;box-shadow:inset 0 1px #ffffff14;font-size:1em}@media (max-width: 980px){#bm-t:not(.bm-N){width:min(100vw - .35rem,50rem);max-width:min(100vw - .35rem,50rem)!important}#bm-t .bm-1E{grid-template-columns:repeat(3,minmax(0,1fr))}#bm-t .bm-1a{grid-column:span 2}}@media (max-width: 620px){#bm-t .bm-1E{grid-template-columns:1fr}#bm-t .bm-1a{grid-column:auto}#bm-t:not(.bm-N) .bm-z{width:100%;max-width:none;grid-template-columns:1fr}#bm-t:not(.bm-N) .bm-z-meta,#bm-t:not(.bm-N) .bm-z-progress{align-items:flex-start;text-align:left}}#bm-F{width:min(25.5rem,calc(100vw - .65rem));max-width:min(25.5rem,calc(100vw - .65rem))!important}#bm-F .bm-m{display:flex;flex-direction:column}#bm-F .bm-2p,#bm-F .bm-2l{position:relative;overflow:hidden;border-radius:14px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(150deg,#ffffff2e,#ffffff14);box-shadow:inset 0 1px #fff3,0 10px 24px #0000001a}#bm-F .bm-2p:before,#bm-F .bm-2l:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at top right,rgba(255,255,255,.2),transparent 26%),radial-gradient(circle at 20% 0%,rgba(186,246,255,.16),transparent 24%)}#bm-F .bm-2p{display:flex;align-items:center;gap:.5rem;padding:.48rem .58rem}#bm-F .bm-2p h1{margin:0}#bm-F .bm-2k{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.24rem}#bm-F .bm-1V{min-width:0;min-height:2.55rem;display:flex;align-items:flex-start;padding:.34rem .45rem;border-radius:11px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(160deg,#ffffff2e,#ffffff12);box-shadow:inset 0 1px #ffffff29;color:#12233ff5;line-height:1.22}#bm-F .bm-1V>span,#bm-F .bm-1V>time{min-width:0}#bm-F .bm-1k,#bm-F .bm-1l{flex-direction:column;justify-content:center;gap:.08rem}#bm-F .bm-1N{display:inline-block;font-size:1.3em;color:#0f1f38f5;white-space:normal;overflow-wrap:anywhere}#bm-F .bm-1N b{font-size:1em}#bm-F .bm-1M{color:#314769d1;font-size:.62rem;letter-spacing:.08em;font-family:var(--bm-font-display);text-transform:uppercase}#bm-F .bm-1V time{white-space:nowrap;font-family:var(--bm-font-mono);letter-spacing:.06em}#bm-F .bm-2l{padding:.48rem}#bm-F .bm-2e{display:grid;grid-template-columns:auto repeat(4,minmax(0,1fr));gap:.22rem;align-items:center}#bm-F .bm-2e .bm-J{width:1.8rem;height:1.8rem}#bm-F .bm-2e .bm-C{width:100%;margin-left:0;text-align:center}#bm-F .bm-2f,#bm-F .bm-2g{margin-top:.24rem}#bm-F .bm-2f>div{width:100%}#bm-F .bm-29{gap:.24rem;margin-top:.3rem}#bm-F .bm-29>button{flex:1 1 0}#bm-F .bm-2g textarea{min-height:4.1rem}@media (max-width: 720px){#bm-F{width:min(100vw - .45rem,25.5rem);max-width:min(100vw - .45rem,25.5rem)!important}#bm-F .bm-2k{grid-template-columns:1fr}#bm-F .bm-2e{grid-template-columns:repeat(2,minmax(0,1fr))}#bm-F .bm-2e .bm-J{grid-column:1 / -1;width:100%;aspect-ratio:auto;height:1.8rem}#bm-F .bm-29{flex-direction:column}}#bm-l div:has(>.bm-3){width:fit-content;justify-content:flex-start}#bm-l .bm-3{display:flex;flex-direction:column;width:13%}#bm-l .bm-3 span{width:fit-content;margin:auto;font-size:.7em}#bm-l .bm-3 button{width:fit-content;padding:0;border-radius:0}#bm-l .bm-3 svg{stroke:#333;stroke-width:.02px;width:100%;min-width:1.5ch;max-width:14.5ch}#bm-l .bm-3 button:hover svg,#bm-l .bm-3 button:focus svg{opacity:.9}#bm-l .bm-n{display:grid;grid-template-columns:1fr 1fr 1fr;width:25%;min-width:3ch;max-width:15ch}#bm-l .bm-n>button{width:100%;padding:0;aspect-ratio:1 / 1;background-color:#fff;border:#333 1px solid;border-radius:0;box-sizing:border-box}#bm-l .bm-n>button[data-status=Incorrect]{background-color:brown}#bm-l .bm-n>button[data-status=Template]{background-color:#2f4f4f}#bm-l .bm-n>button:hover,#bm-l .bm-n>button:focus{opacity:.8}#bm-B{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start}#bm-B>.bm-L{width:100%;justify-content:flex-start;background-color:#153063e6;border-radius:1em;padding:.5em;transition:background-color .3s ease}#bm-B>.bm-L:hover,#bm-B>.bm-L:focus-within{background-color:#112855e6}#bm-B .bm-1{height:100%;font-size:xxx-large}#bm-B .bm-0{flex-direction:column;align-items:flex-start;gap:0}`;function Dt(t){const e=document.createElement("link");e.href=t,e.rel="preload",e.as="style",e.onload=function(){this.onload=null,this.rel="stylesheet"},document.head?.appendChild(e)}GM_addStyle(Nt);var Ot="@font-face{font-family:'Roboto Mono';font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAADGIAA4AAAAAWngAADEuAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHDQGYD9TVEFUSACEThEICoGbAPoCC4NKAAE2AiQDg0oEIAWEWAeEYQwHGzdHsxERbBwIgEaWFUXpovSC/zKBG0OsPsALHwg+NI1SpzSGCOqReFjIyBOMluTO77d+stdLxT8578xk8qTZE3w1OkJLH/HCf/x+7dyZJ38RsxRVsnqjLjUQIiGSyJtptC9XNc3uBUH3jMC+IPGCwECyDmFX89mpyks+JIiJf6k8fvmlMgTb7HBGzQZtEAQxQERakSoRUQFtQsyY02nPpbWwNnW6NDZla5z75dci42ORHwuCaq3Kmj0ET+QQ1DlUpAkssLsnhSTshycLrNy5f+5lOA2/t5MLU2NQJiJXK72oo8DYDLlCiWoygX9gnU3olU+HAod+kuJDaft726r09zRd1TAn9LLCnq5xKpWLhSaRJcnn8ZuWTyMNYzBiVQejdkbvEPRyKpF4LBYhK8yasmcmQbLRBuGlm12eTnaqQZyfDdP1Mk2XIjkorrf+MzbbQxeN55AxRPykXkQdo6t7c6XysPaJR4AuryOynFyPSwYBK3+VxcBn491YBHx2z6pLgQ8ABADND6LF5vWqFysQH8cogOrrvfw7uRngSlumfQL3+G3WBQU35hQiwLYw/Sv01TXA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YBT2LCLpM2W6dCoLx4rvccdTb0emtIOpYd/q8NbHSblCJe+/n+0jnNSyKcIrbDjWJrSn3iCdT5taXWpGH7Vdllyh5HfPUiwgjP/PRDgUZeFDCGqQibxhUvECgnE4sc2DbtmIFYEbhECq0+ItPwpB7LuTOwTQK3D/GHxiZt4LhVUeRHSLQKhuRqsT/mvXPm7+kqv1xRpcL4NrV/3LijKmRA3CedrFRYZpy6ONqtKgjlJdmkr/BxobvD0mVI+c9let+8y/K0fpftfg2umCelzEp5G3J3CNDjbibNkZLBWMCxMiV0SklUt70WK2CgYewhT77qqrvtvFwVhgj8nlDOqOSSmlLVW5AoVUrBu7FKeeYVvWSqGTlTquCSYowoNe8mdCqpO1NJC9SqEKK+ckoCgsgAYn4giGS9r3o0EQUFkWgCRmEqVinP47o6lRGJIRCZQiZKsoOMqRGuSlCJ1kJGBgMxjpqY0jLPrxkBG99YngLF3jX08Az5AalSJpS8FDBGXqnyzZX2tZJZUwgL3Gk2hXLQzjhc1SehYQTDChEqTDgcvAgf/zQjikJCRkFFQ8cQLQYTn4CQiJiElEwcuXgKCZQSJUmmoqaRIlWadBkyufMABePJizcfvvy8894HI0Z99MlnvcaY7PaHv722ko0/deh3hKUdkDZzluUvwLSTluNyscde9mynHXTKPvv9HBZoAhM+xpZF6ydHOfnXOm8dggAXaCs3LPNsNXpptVU6tVsoJukJy6zAofO7X+ntYjAjh9FvTjvjlbPOOe+CXBddkueKNWZddU2+6/5UoEixQqVKlClXqUqFaovUqrFYnSUa1BvXqEmLVs3+Moeny0233NbtXljC3yzsM2DKjbDCGMYxgUkkZBQoMQUHwxkz6auEfNafqNNkm/Ne/fU4c9r9BxG3FS/R2+muY0SwdfVjcc5Iy/z3siKbmreCL48SZxxd5w796Bvsm4QCoRC4qHw4CAQOfnUkt38If1yYQhc=)format('woff2');}";Dt("https://fonts.googleapis.com/css2?family=Michroma&family=Rajdhani:wght@400;500;600;700&display=swap"),Ot.indexOf("@font-face")+1?(console.log("Loading Roboto Mono as a file..."),GM_addStyle(Ot)):Dt("https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap");var Lt=JSON.parse(GM_getValue("bmUserSettings","{}")),Ht=(new class{constructor(){this.Ke=null,this.Qe=null,this.ti="#bm-p"}ei(t){return this.Qe=t,this.Ke=new MutationObserver(t=>{for(const e of t)for(const t of e.addedNodes)t instanceof HTMLElement&&t.matches?.(this.ti)}),this}ii(){return this.Ke}observe(t,e=!1,i=!1){t.observe(this.Qe,{childList:e,subtree:i})}},new class extends v{constructor(t,i){super(t,i),e(this,lt),this.window=null,this.Ct="bm-F",this.Tt=document.body}kt(){document.querySelector(`#${this.Ct}`)?this.$t("Main window already exists!"):(this.window=this.O({id:this.Ct,class:"bm-W bm-N",style:"top: 10px; left: unset; right: 75px;"},(t,e)=>{}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Blue Marble"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>t.wt(e),e.ontouchend=()=>{e.click()}}).N().O().N().O({class:"bm-D"}).lt({class:"bm-s",innerHTML:'',title:"Settings","aria-label":"Open settings"},(t,e)=>{e.onclick=()=>{t.$.kt()}}).N().N().N().O({class:"bm-m"}).W().N().O({class:"bm-L bm-2p"}).A({class:"bm-T",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALEQa0zv0AAAACBjSFJNAACHDwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAABF2lDQ1BJQ0MgUHJvZmlsZQAAKM9jYGDiyUnOLWYSYGDIzSspCnJ3UoiIjFJgv8PAyCDJwMygyWCZmFxc4BgQ4MOAE3y7BlQNBJd1QWYxkAa4UlKLk4H0HyCOSy4oKmFgYIwBsrnLSwpA7AwgWyQpG8yuAbGLgA4EsieA2OkQ9hKwGgh7B1hNSJAzkH0GyHZIR2InIbGh9oIAc7IRA9VBSWpFCYh2c2JgAIUpelghxJ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C"},(t,e)=>{const i=new Date;204==Math.floor((i.getTime()-new Date(i.getFullYear(),0,1))/864e5)+1&&(e.parentNode.style.position="relative",e.parentNode.innerHTML=e.parentNode.innerHTML+'',e.onload=()=>{(new F).Kt(document.querySelector(`#${this.Ct}`))})}).N().F(1,{textContent:this.name}).N().N().W().N().O({class:"bm-L bm-2k"}).O({class:"bm-1V bm-1k"}).I({class:"bm-1M",textContent:"Droplets"}).N().I({id:"bm-w",class:"bm-1N",textContent:"0"}).N().N().O({class:"bm-1V bm-1k"}).I({class:"bm-1M",textContent:"Next Level"}).N().I({id:"bm-q",class:"bm-1N",textContent:"0 px"}).N().N().O({class:"bm-1V bm-1l"}).I({class:"bm-1M",textContent:"Charges"}).N().gt(Date.now(),1e3,{class:"bm-1N",style:"font-weight: 700;"},(t,e)=>{t.p.si=e.id}).N().N().N().W().N().O({class:"bm-L bm-2l"}).O({class:"bm-L bm-2e"}).lt({class:"bm-s bm-J",style:"margin-top: 0;",innerHTML:''},(t,e)=>{e.onclick=()=>{const e=t.p?.ni;e?.[0]?(t.ht("bm-Q",e?.[0]||""),t.ht("bm-R",e?.[1]||""),t.ht("bm-O",e?.[2]||""),t.ht("bm-P",e?.[3]||"")):t.$t("Coordinates are malformed! Did you try clicking on the canvas first?")}}).N().dt({type:"number",id:"bm-Q",class:"bm-C",placeholder:"Tl X",min:0,max:2047,step:1,required:!0},(t,e)=>{e.addEventListener("paste",s=>i(this,lt,ct).call(this,t,e,s))}).N().dt({type:"number",id:"bm-R",class:"bm-C",placeholder:"Tl Y",min:0,max:2047,step:1,required:!0},(t,e)=>{e.addEventListener("paste",s=>i(this,lt,ct).call(this,t,e,s))}).N().dt({type:"number",id:"bm-O",class:"bm-C",placeholder:"Px X",min:0,max:2047,step:1,required:!0},(t,e)=>{e.addEventListener("paste",s=>i(this,lt,ct).call(this,t,e,s))}).N().dt({type:"number",id:"bm-P",class:"bm-C",placeholder:"Px Y",min:0,max:2047,step:1,required:!0},(t,e)=>{e.addEventListener("paste",s=>i(this,lt,ct).call(this,t,e,s))}).N().N().O({class:"bm-L bm-2f"}).ut({class:"bm-K",textContent:"Upload Template",accept:"image/png, image/jpeg, image/webp, image/bmp, image/gif"}).N().N().O({class:"bm-L bm-x bm-29"}).lt({class:"bm-1D",textContent:"Disable","data-button-status":"shown"},(t,e)=>{e.onclick=()=>{e.disabled=!0,"shown"==e.dataset.buttonStatus?(t.p?.he?.oi(!1),e.dataset.buttonStatus="hidden",e.textContent="Enable",t.Mt("Disabled templates!")):(t.p?.he?.oi(!0),e.dataset.buttonStatus="shown",e.textContent="Disable",t.Mt("Enabled templates!")),e.disabled=!1}}).N().lt({class:"bm-1R",textContent:"Create"},(t,e)=>{e.onclick=()=>{const e=document.querySelector(`#${this.Ct} .bm-K`),i=document.querySelector("#bm-Q");if(!i.checkValidity())return i.reportValidity(),void t.$t("Coordinates are malformed! Did you try clicking on the canvas first?");const s=document.querySelector("#bm-R");if(!s.checkValidity())return s.reportValidity(),void t.$t("Coordinates are malformed! Did you try clicking on the canvas first?");const n=document.querySelector("#bm-O");if(!n.checkValidity())return n.reportValidity(),void t.$t("Coordinates are malformed! Did you try clicking on the canvas first?");const o=document.querySelector("#bm-P");if(!o.checkValidity())return o.reportValidity(),void t.$t("Coordinates are malformed! Did you try clicking on the canvas first?");e?.files[0]?(t?.p?.he.Ue(e.files[0],e.files[0]?.name.replace(/\.[^/.]+$/,""),[Number(i.value),Number(s.value),Number(n.value),Number(o.value)]),t.Mt("Drew to canvas!")):t.$t("No file selected!")}}).N().lt({class:"bm-1D",textContent:"Filter"},(t,e)=>{e.onclick=()=>this.ai()}).N().N().O({class:"bm-L bm-2g"}).bt({id:this.v,placeholder:`Status: Sleeping...\nVersion: ${this.version}`,readOnly:!0}).N().N().N().N().N().D(this.Tt),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`))}ai(){new pt(this).$e()}}(St,kt)),It=new class{constructor(t,i){e(this,gt),this.name=t,this.version=i,this.Re=null,this.$=null,this.schemaVersion="2.0.0",this.ri=null,this.Fe="!#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~",this.At=1e3,this.Ge=3,this._e=3,this.ue=function(t){const e=y;e.unshift({id:-1,premium:!1,name:"Erased",rgb:[222,250,206]}),e.unshift({id:-2,premium:!1,name:"Other",rgb:[0,0,0]});const i=new Map;for(const s of e){if(0==s.id||-2==s.id)continue;const e=s.rgb[0],n=s.rgb[1],o=s.rgb[2];for(let a=-t;a<=t;a++)for(let r=-t;r<=t;r++)for(let l=-t;l<=t;l++){const t=e+a,c=n+r,h=o+l;if(t<0||t>255||c<0||c>255||h<0||h>255)continue;const m=(255<<24|h<<16|c<<8|t)>>>0;i.has(m)||i.set(m,s.id)}}return{palette:e,_t:i}}(this._e),this.Ee=null,this.li="",this.Ie=[],this.Ve=null,this.ci=!0,this.hi=null,this.Le=new Map}mi(t){this.Re=t}k(t){this.$=t,i(this,gt,wt).call(this)}He(t,e){const s=Number(t);Number.isFinite(s)&&(e?this.Le.set(s,!0):this.Le.delete(s),i(this,gt,xt).call(this))}async di(){return{whoami:this.name.replace(" ",""),scriptVersion:this.version,schemaVersion:this.schemaVersion,templates:{}}}async Ue(t,e,s){this.Ve||(this.Ve=await this.di(),console.log("Creating JSON...")),this.Re.Mt(`Creating template at ${s.join(", ")}...`);const n=new z({displayName:e,Ht:0,It:m(this.ri||0,this.Fe),file:t,coords:s}),o=!this.$?.Ot?.flags?.includes("hl-noSkip"),a=this.$?.Ot?.flags?.includes("hl-agSkip");console.log(`Should Skip: ${o}; Should Agg Skip: ${a}`);const{Yt:r,Jt:l}=await n.Ut(this.At,this.ue,o,a);n.Bt=r;const c={total:n.zt.total,colors:Object.fromEntries(n.zt.colors)};this.Ve.templates[`${n.Ht} ${n.It}`]={name:n.displayName,coords:s.join(", "),enabled:!0,pixels:c,tiles:l},this.Ie=[],this.Ie.push(n),this.Re.Mt(`Template created at ${s.join(", ")}!`),console.log(Object.keys(this.Ve.templates).length),console.log(this.Ve),console.log(this.Ie),console.log(JSON.stringify(this.Ve)),await i(this,gt,yt).call(this)}ui(){}async bi(){this.Ve||(this.Ve=await this.di(),console.log("Creating JSON..."))}async pi(){l("Downloading all templates..."),console.log(this.Ie);for(const t of this.Ie)await this.fi(t),await s(500)}async ze(){const t=JSON.parse(GM_getValue("bmTemplates","{}"))?.templates;if(console.log(t),Object.keys(t).length>0)for(const[e,i]of Object.entries(t))t.hasOwnProperty(e)&&(await this.fi(new z({displayName:i.name,Ht:e.split(" ")?.[0],It:e.split(" ")?.[1],Bt:i.tiles})),await s(500))}async fi(t){t.Xt();const e=`${t.coords.join("-")}_${t.displayName.replaceAll(" ","-")}`,i=await this.We(t);await GM.download({url:URL.createObjectURL(i),name:e+".png",gi:"uniquify",onload:()=>{l(`Download of template '${e}' complete!`)},onerror:(t,i)=>{c(`Download of template '${e}' failed because ${t}! Details: ${i}`)},ontimeout:()=>{h(`Download of template '${e}' has timed out!`)}})}async We(t){console.log(t);const e=t.Bt,i=Object.keys(e).sort(),s=await Promise.all(i.map(t=>{return i=e[t],new Promise((t,e)=>{const s=new Image;s.onload=()=>t(s),s.onerror=e,s.src="data:image/png;base64,"+i});var i}));let n=1/0,o=1/0,a=0,r=0;i.forEach((t,e)=>{const[i,l,c,h]=t.split(",").map(Number),m=s[e],d=i*this.At+c,u=l*this.At+h;n=Math.min(n,d),o=Math.min(o,u),a=Math.max(a,d+m.width/this.Ge),r=Math.max(r,u+m.height/this.Ge)}),console.log(`Absolute coordinates: (${n}, ${o}) and (${a}, ${r})`);const l=a-n,c=r-o,h=l*this.Ge,m=c*this.Ge;console.log(`Template Width: ${l}\nTemplate Height: ${c}\nCanvas Width: ${h}\nCanvas Height: ${m}`);const d=new OffscreenCanvas(h,m),u=d.getContext("2d");i.forEach((t,e)=>{const[i,a,r,l]=t.split(",").map(Number),c=s[e],h=i*this.At+r,m=a*this.At+l;console.log(`Drawing tile (${i}, ${a}, ${r}, ${l}) (${h}, ${m}) at (${h-n}, ${m-o}) on the canvas...`),u.drawImage(c,(h-n)*this.Ge,(m-o)*this.Ge,c.width,c.height)}),u.globalCompositeOperation="destination-over",u.drawImage(d,0,-1),u.drawImage(d,0,1),u.drawImage(d,-1,0),u.drawImage(d,1,0);const b=new OffscreenCanvas(l,c),p=b.getContext("2d");return p.imageSmoothingEnabled=!1,p.drawImage(d,0,0,l*this.Ge,c*this.Ge,0,0,l,c),b.convertToBlob({type:"image/png"})}async wi(t,e){if(!this.ci)return t;const s=this.At*this.Ge;e=e[0].toString().padStart(4,"0")+","+e[1].toString().padStart(4,"0"),console.log(`Searching for templates in tile: "${e}"`);const o=this.Ie;console.log(o),o.sort((t,e)=>t.Ht-e.Ht),console.log(o);const a=o.map(t=>{const i=Object.keys(t.Bt).filter(t=>t.startsWith(e));if(0===i.length)return null;const s=i.map(e=>{const i=e.split(",");return{xi:t,Gt:t.Bt[e],Pt:t.Pt?.[e],yi:[i[0],i[1]],$i:[i[2],i[3]]}});return s?.[0]}).filter(Boolean);console.log(a);const r=a?.length||0;if(console.log(`templateCount = ${r}`),!(r>0))return this.Re.Mt(`Sleeping\nVersion: ${this.version}`),t;{const t=n(o.filter(t=>Object.keys(t.Bt).filter(t=>t.startsWith(e)).length>0).reduce((t,e)=>t+(e.zt.total||0),0));this.Re.Mt(`Displaying ${r} template${1==r?"":"s"}.\nTotal pixels: ${t}`)}const l=await createImageBitmap(t),c=new OffscreenCanvas(s,s),h=c.getContext("2d");h.imageSmoothingEnabled=!1,h.beginPath(),h.rect(0,0,s,s),h.clip(),h.clearRect(0,0,s,s),h.drawImage(l,0,0,s,s);const m=h.getImageData(0,0,s,s),d=new Uint32Array(m.data.buffer),u=this.$?.Ot?.highlight||[[2,0,0]],b=u?.[0],p=1==u?.length&&2==b?.[0]&&0==b?.[1]&&0==b?.[2];for(const t of a){console.log("Template:"),console.log(t);const s=!!t.xi.zt?.colors?.get(-1);let n=t.Pt.slice();const o=Number(t.$i[0])*this.Ge,a=Number(t.$i[1])*this.Ge;if(0!=this.Le.size||s||h.drawImage(t.Gt,o,a),!n){const e=h.getImageData(o,a,t.Gt.width,t.Gt.height);n=new Uint32Array(e.data.buffer)}const r=Date.now(),{qe:l,Ze:c}=i(this,gt,vt).call(this,{je:d,Ee:n,Ye:[o,a,t.Gt.width,t.Gt.height],Je:u,Xe:p});let m=0;const b=0;for(const[t,e]of l)t!=b&&(m+=e);0==this.Le.size&&!s&&p||(console.log("Colors to filter: ",this.Le),h.drawImage(await createImageBitmap(new ImageData(new Uint8ClampedArray(c.buffer),t.Gt.width,t.Gt.height)),o,a)),console.log(`Finished calculating correct pixels & filtering colors for the tile ${e} in ${(Date.now()-r)/1e3} seconds!\nThere are ${m} correct pixels.`),void 0===t.xi.zt.correct&&(t.xi.zt.correct={}),t.xi.zt.correct[e]=l}return await c.convertToBlob({type:"image/png"})}async Mi(t){console.log("Importing JSON..."),console.log(t),"BlueMarble"==t?.whoami&&await i(this,gt,$t).call(this,t)}oi(t){this.ci=t}}(St,kt),Bt=new class{constructor(t){this.he=t,this.Ci=!1,this.si="",this.ni=[],this.Ti=[]}Si(t){window.addEventListener("message",async e=>{const i=e.data,s=i.jsonData;if(!i||"blue-marble"!==i.source)return;if(!i.endpoint)return;const n=i.endpoint?.split("?")[0].split("/").filter(t=>t&&isNaN(Number(t))).filter(t=>t&&!t.includes(".")).pop();switch(console.log('%cBlue Marble%c: Recieved message about "%s"',"color: cornflowerblue;","",n),n){case"me":this.ki(t,s);break;case"pixel":const e=i.endpoint.split("?")[0].split("/").filter(t=>t&&!isNaN(Number(t))),n=new URLSearchParams(i.endpoint.split("?")[1]),r=[n.get("x"),n.get("y")];if(this.ni.length&&(!e.length||!r.length))return void t.$t("Coordinates are malformed!\nDid you try clicking the canvas first?");this.ni=[...e,...r];const l=(o=e,a=r,[parseInt(o[0])%4*1e3+parseInt(a[0]),parseInt(o[1])%4*1e3+parseInt(a[1])]),c=document.querySelectorAll("span");for(const t of c){const i=t.textContent.trim();if(i.includes(l[0])&&i.includes(l[1])){let i=document.querySelector("#bm-p");e[0],e[1],r[0],r[1];const s=["Tl X:","Tl Y:","Px X:","Px Y:"],n=["bm-Y","bm-Z","bm-U","bm-V"],o=[...e,...r];if(i)for(const[t,e]of n.entries())document.getElementById(e).textContent=`${s[t]??"??:"} ${o[t]}`;else{i=document.createElement("span"),i.id="bm-p",i.style="display: flex; flex-wrap: wrap; gap: 0 1ch; font-size: small;";for(const[t,e]of o.entries()){const a=document.createElement("span");a.id=n[o.indexOf(e)??""],a.textContent=`${s[t]??"??:"} ${e}`,i.appendChild(a)}t.parentNode.parentNode.parentNode.insertAdjacentElement("afterend",i)}}}break;case"tile":case"tiles":let h=i.endpoint.split("/");h=[parseInt(h[h.length-2]),parseInt(h[h.length-1].replace(".png",""))];const m=i.blobID,d=i.blobData,u=Date.now(),b=await this.he.wi(d,h);console.log(`Finished loading the tile in ${(Date.now()-u)/1e3} seconds!`),window.postMessage({source:"blue-marble",blobID:m,blobData:b,blink:i.blink});break;case"robots":this.Ci="false"==s.userscript?.toString().toLowerCase();break}var o,a})}ki(t,e){if(e.status&&"2"!=e.status?.toString()[0])return void t.$t("You are not logged in or Wplace is offline!\nCould not fetch userdata.");const i=Math.ceil(Math.pow(Math.floor(e.level)*Math.pow(30,.65),1/.65)-e.pixelsPainted);if(console.log(e.id),(e.id||0===e.id)&&console.log(m(e.id,"!#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~")),this.he.ri=e.id,0!=this.si.length){const t=document.querySelector("#"+this.si);if(t){const i=e.charges;t.dataset.endDate=Date.now()+(i.max-i.count)*i.cooldownMs}}t.ht("bm-w",`${n(e.droplets)}`),t.ht("bm-q",`${n(i)} px`)}async Ni(t){try{const e=await fetch(`${window.location.origin}/api/me`,{credentials:"include"});if(!e.ok)return void t.$t(`Could not fetch userdata.\nHTTP ${e.status}`);const i=await e.json();this.ki(t,i)}catch(t){c("Failed to fetch current user data:",t)}}Di(t){try{const e=sessionStorage.getItem("bm-2y");if(!e)return!1;const i=JSON.parse(e);return this.ki(t,i),!0}catch(t){return c("Failed to apply cached user data:",t),!1}}async Oi(t){console.log("Sending heartbeat to telemetry server...");let e=GM_getValue("bmUserSettings","{}");if(e=JSON.parse(e),!e||!e.telemetry||!e.uuid)return void console.log("Telemetry is disabled, not sending heartbeat.");const i=navigator.userAgent;let s=await this.Li(i),n=this.Hi(i);GM_xmlhttpRequest({method:"POST",url:"https://telemetry.thebluecorner.net/heartbeat",headers:{"Content-Type":"application/json"},data:JSON.stringify({uuid:e.uuid,version:t,browser:s,os:n}),onload:t=>{200!==t.status&&c("Failed to send heartbeat:",t.statusText)},onerror:t=>{c("Error sending heartbeat:",t)}})}async Li(t=navigator.userAgent){return(t=t||"").includes("OPR/")||t.includes("Opera")?"Opera":t.includes("Edg/")?"Edge":t.includes("Vivaldi")?"Vivaldi":t.includes("YaBrowser")?"Yandex":t.includes("Kiwi")?"Kiwi":t.includes("Brave")?"Brave":t.includes("Firefox/")?"Firefox":t.includes("Chrome/")?"Chrome":t.includes("Safari/")?"Safari":navigator.brave&&"function"==typeof navigator.brave.isBrave&&await navigator.brave.isBrave()?"Brave":"Unknown"}Hi(t=navigator.userAgent){return/Windows NT 11/i.test(t=t||"")?"Windows 11":/Windows NT 10/i.test(t)?"Windows 10":/Windows NT 6\.3/i.test(t)?"Windows 8.1":/Windows NT 6\.2/i.test(t)?"Windows 8":/Windows NT 6\.1/i.test(t)?"Windows 7":/Windows NT 6\.0/i.test(t)?"Windows Vista":/Windows NT 5\.1|Windows XP/i.test(t)?"Windows XP":/Mac OS X 10[_\.]15/i.test(t)?"macOS Catalina":/Mac OS X 10[_\.]14/i.test(t)?"macOS Mojave":/Mac OS X 10[_\.]13/i.test(t)?"macOS High Sierra":/Mac OS X 10[_\.]12/i.test(t)?"macOS Sierra":/Mac OS X 10[_\.]11/i.test(t)?"OS X El Capitan":/Mac OS X 10[_\.]10/i.test(t)?"OS X Yosemite":/Mac OS X 10[_\.]/i.test(t)?"macOS":/Android/i.test(t)?"Android":/iPhone|iPad|iPod/i.test(t)?"iOS":/Linux/i.test(t)?"Linux":"Unknown"}}(It),Pt=new class extends A{constructor(t,i,s){var n;super(t,i),e(this,L),this.Ot=s,(n=this.Ot).flags??(n.flags=[]),this.Ii=structuredClone(this.Ot),this.Bi="bmUserSettings",this.Pi=5e3,this.Ai=0,setInterval(this.zi.bind(this),this.Pi)}async zi(){await this.Fi()}async Fi(t=!1){const e=JSON.stringify(this.Ot);e!=JSON.stringify(this.Ii)&&(t||Date.now()-this.Ai>this.Pi)&&(await GM.setValue(this.Bi,e),this.Ii=structuredClone(this.Ot),this.Ai=Date.now(),console.log(e))}async Lt(){await this.Fi(!0)}Oe(t,e=void 0){const i=this.Ot?.flags?.indexOf(t)??-1;-1!=i&&!0!==e?this.Ot?.flags?.splice(i,1):-1==i&&!1!==e&&this.Ot?.flags?.push(t)}Nt(){const t='',e='',s=this.Ot?.highlight??[[1,0,1],[2,0,0],[1,-1,0],[1,1,0],[1,0,-1]];this.window=this.O({class:"bm-L"}).F(2,{textContent:"Pixel Highlight"}).N().W().N().O({class:"bm-L",style:"margin-left: 1.5ch;"}).j({textContent:"Highlight transparent pixels"},(t,e,i)=>{i.checked=!this.Ot?.flags?.includes("hl-noTrans"),i.onchange=t=>this.Oe("hl-noTrans",!t.target.checked)}).N().L({id:"bm-4",textContent:"Choose a preset:",style:"font-weight: 700;"}).N().O({class:"bm-D",role:"group","aria-labelledby":"bm-4"}).O({class:"bm-3"}).I({textContent:"None"}).N().lt({innerHTML:t,"aria-label":'Preset "None"'},(t,e)=>{e.onclick=()=>i(this,L,I).call(this,"None")}).N().N().O({class:"bm-3"}).I({textContent:"Cross"}).N().lt({innerHTML:e,"aria-label":'Preset "Cross Shape"'},(t,e)=>{e.onclick=()=>i(this,L,I).call(this,"Cross")}).N().N().O({class:"bm-3"}).I({textContent:"X"}).N().lt({innerHTML:e.replace('d="M1,0H2V1H3V2H2V3H1V2H0V1H1Z"','d="M0,0V1H3V0H2V3H3V2H0V3H1V0Z"'),"aria-label":'Preset "X Shape"'},(t,e)=>{e.onclick=()=>i(this,L,I).call(this,"X")}).N().N().O({class:"bm-3"}).I({textContent:"Full"}).N().lt({innerHTML:t.replace("#fff","#2f4f4f"),"aria-label":'Preset "Full Template"'},(t,e)=>{e.onclick=()=>i(this,L,I).call(this,"Full")}).N().N().N().L({id:"bm-b",textContent:"Create a custom pattern:",style:"font-weight: 700;"}).N().O({class:"bm-n",role:"group","aria-labelledby":"bm-b"});for(let t=-1;t<=1;t++)for(let e=-1;e<=1;e++){const n=s[s.findIndex(([,i,s])=>i==e&&s==t)]?.[0]??0;let o="Disabled";1==n?o="Incorrect":2==n&&(o="Template"),this.window=this.lt({"data-status":o,"aria-label":`Sub-pixel ${o.toLowerCase()}`},(s,n)=>{n.onclick=()=>i(this,L,H).call(this,n,[e,t])}).N()}this.window=this.N().N().N()}Dt(){this.window=this.O({class:"bm-L"}).F(2,{textContent:"Pixel Highlight"}).N().W().N().O({class:"bm-L",style:"margin-left: 1.5ch;"}).j({textContent:"Template creation should skip transparent tiles"},(t,e,i)=>{i.checked=!this.Ot?.flags?.includes("hl-noSkip"),i.onchange=t=>this.Oe("hl-noSkip",!t.target.checked)}).N().j({innerHTML:"Experimental: Template creation should aggressively skip transparent tiles"},(t,e,i)=>{i.checked=this.Ot?.flags?.includes("hl-agSkip"),i.onchange=t=>this.Oe("hl-agSkip",t.target.checked)}).N().N().N()}}(St,kt,Lt);Ht.k(Pt),Ht.S(Bt),It.mi(Ht),It.k(Pt);var At=JSON.parse(GM_getValue("bmTemplates","{}"));if(console.log(At),console.log(Lt),console.log(Object.keys(Lt).length),0==Object.keys(Lt).length){const t=crypto.randomUUID();console.log(t),GM.setValue("bmUserSettings",JSON.stringify({uuid:t}))}setInterval(()=>Bt.Oi(kt),18e5);var zt=Lt?.telemetry;if(console.log(`Telemetry is ${!(null==zt)}`),null==zt||zt>1){const t=new class extends v{constructor(t,i,s,n){super(t,i),e(this,Mt),this.window=null,this.Ct="bm-k",this.Tt=document.body,this.Wi=s,this.uuid=n}async kt(){if(document.querySelector(`#${this.Ct}`))return void this.$t("Telemetry window already exists!");const t=await this.p.Li(navigator.userAgent),e=this.p.Hi(navigator.userAgent);this.window=this.O({id:this.Ct,class:"bm-W",style:"height: 80vh; z-index: 9998;"}).O({class:"bm-m"}).O({class:"bm-L bm-h"}).F(1,{textContent:`${this.name} Telemetry`}).N().N().W().N().O({class:"bm-L bm-D",style:"gap: 1.5ch; flex-wrap: wrap;"}).lt({textContent:"Enable Telemetry"},(t,e)=>{e.onclick=()=>{i(this,Mt,Ct).call(this,this.Wi);const t=document.getElementById(this.Ct);t?.remove()}}).N().lt({textContent:"Disable Telemetry"},(t,e)=>{e.onclick=()=>{i(this,Mt,Ct).call(this,0);const t=document.getElementById(this.Ct);t?.remove()}}).N().lt({textContent:"More Information"},(t,e)=>{e.onclick=()=>{window.open("https://github.com/SwingTheVine/Wplace-TelemetryServer#telemetry-data","_blank","noopener noreferrer")}}).N().N().O({class:"bm-L bm-H"}).O({class:"bm-L"}).F(2,{textContent:"Legal"}).N().L({textContent:`We collect anonymous telemetry data such as your browser, OS, and script version to make the experience better for everyone. The data is never shared personally. The data is never sold. You can turn this off by pressing the "Disable" button, but keeping it on helps us improve features and reliability faster. Thank you for supporting ${this.name}!`}).N().N().W().N().O({class:"bm-L"}).F(2,{textContent:"Non-Legal Summary"}).N().L({innerHTML:'You can disable telemetry by pressing the "Disable" button. If you would like to read more about what information we collect, press the "More Information" button.
This is the data stored on our servers:'}).N()._().Z({innerHTML:`A unique identifier (UUIDv4) generated by Blue Marble. This enables our telemetry to function without tracking your actual user ID.
Your UUID is: ${r(this.uuid)}`}).N().Z({innerHTML:`The version of Blue Marble you are using.
Your version is: ${r(this.version)}`}).N().Z({innerHTML:`Your browser type, which is used to determine Blue Marble outages and browser popularity.
Your browser type is: ${r(t)}`}).N().Z({innerHTML:`Your OS type, which is used to determine Blue Marble outages and OS popularity.
Your OS type is: ${r(e)}`}).N().Z({innerHTML:"The date and time that Blue Marble sent the telemetry information."}).N().N().L({innerHTML:'All of the data mentioned above is aggregated every hour. This means every hour, anything that could even remotly be considered "personal data" is deleted from our server. Here, "aggregated" data means things like "42 people used Blue Marble on Google Chrome this hour", which can\'t be used to identify anyone in particular.'}).N().N().N().N().N().D(this.Tt)}}(St,kt,1,Lt?.uuid);t.S(Bt),t.kt()}!async function(){await It.Mi(At),Bt.Si(Ht),Ht.kt(),Ht.ai(),Bt.Di(Ht),Bt.Ni(Ht),new MutationObserver((t,e)=>{const i=document.querySelector("#color-1");if(!i)return;let s=document.querySelector("#bm-G");if(!s){s=document.createElement("button"),s.id="bm-G",s.textContent="Move ↑",s.className="btn btn-soft",s.onclick=function(){const t=this.parentNode.parentNode.parentNode.parentNode,e="Move ↑"==this.textContent;t.parentNode.className=t.parentNode.className.replace(e?"bottom":"top",e?"top":"bottom"),t.style.borderTopLeftRadius=e?"0px":"var(--radius-box)",t.style.borderTopRightRadius=e?"0px":"var(--radius-box)",t.style.borderBottomLeftRadius=e?"var(--radius-box)":"0px",t.style.borderBottomRightRadius=e?"var(--radius-box)":"0px",this.textContent=e?"Move ↓":"Move ↑"};const t=i.parentNode.parentNode.parentNode.parentNode.querySelector("h2");t.parentNode?.appendChild(s)}}).observe(document.body,{childList:!0,subtree:!0}),l(`%c${St}%c (${kt}) userscript has loaded!`,"color: cornflowerblue;","")}()})(); -// Build Hash: 8c7a632f9994 +// Build Hash: ae85722104d9 diff --git a/dist/BlueMarble.user.css b/dist/BlueMarble.user.css index 1e4d4e5..cc268ef 100644 --- a/dist/BlueMarble.user.css +++ b/dist/BlueMarble.user.css @@ -1,3 +1,3 @@ -div:has(>confetti-piece){position:absolute;inset:0;overflow:hidden;pointer-events:none}confetti-piece{position:absolute;top:-10px;width:var(--size);height:var(--size);background:currentColor;transform:translate3d(var(--x),-10vh,0) rotate(var(--rot));animation:fall var(--duration) linear var(--delay);will-change:transform;pointer-events:none}@keyframes fall{to{transform:translate3d(var(--x),110vh,0) rotate(calc(var(--rot) + 720deg))}}.bm-screenreader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.bm-W{--bm-surface-strong: rgba(9, 20, 42, .5);--bm-surface-soft: rgba(24, 41, 74, .28);--bm-surface-glass: rgba(255, 255, 255, .1);--bm-surface-glass-strong: rgba(255, 255, 255, .18);--bm-border-soft: rgba(255, 255, 255, .18);--bm-border-strong: rgba(163, 228, 255, .34);--bm-text-primary: rgba(17, 36, 66, .96);--bm-text-secondary: rgba(36, 57, 90, .84);--bm-accent-start: #baf6ff;--bm-accent-end: #81b6ff;--bm-accent-shadow: rgba(132, 182, 255, .22);--bm-font-body: "Rajdhani", "Segoe UI Variable Text", "Segoe UI", sans-serif;--bm-font-display: "Michroma", "Orbitron", "Segoe UI", sans-serif;--bm-font-mono: "Roboto Mono", "Rajdhani", "Courier New", monospace;position:fixed;isolation:isolate;overflow:hidden;background:radial-gradient(circle at 14% 12%,rgba(255,255,255,.24),transparent 18%),radial-gradient(circle at 86% 8%,rgba(186,246,255,.22),transparent 24%),radial-gradient(circle at 82% 84%,rgba(129,182,255,.18),transparent 28%),linear-gradient(145deg,#ffffff2e,#ffffff0f 22%,#6991d414 54%,#09142a2e);color:var(--bm-text-primary);padding:6px;border-radius:16px;border:1px solid var(--bm-border-soft);box-shadow:0 18px 40px #0003,inset 0 1px #ffffff38,inset 0 -1px #ffffff0d;z-index:9000;transition:background .32s ease,border-color .22s ease,box-shadow .22s ease,opacity .22s ease,transform 0s,width .22s ease,max-width .22s ease,max-height .22s ease;top:75px;left:60px;width:auto;max-height:fit-content;max-width:calc(100% - 135px);backdrop-filter:blur(26px) saturate(1.25);font-family:var(--bm-font-body);letter-spacing:.04em}.bm-W:before,.bm-W:after{content:"";position:absolute;inset:0;pointer-events:none}.bm-W:before{border-radius:inherit;padding:1px;background:linear-gradient(135deg,#ffffff73,#ffffff1f 24%,#baf6ff38 58%,#81b6ff4d);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.85}.bm-W:after{border-radius:inherit;background:linear-gradient(180deg,rgba(255,255,255,.2),transparent 24%),radial-gradient(circle at 18% 0%,rgba(255,255,255,.22),transparent 22%),radial-gradient(circle at 88% 16%,rgba(186,246,255,.18),transparent 18%);opacity:1}.bm-S{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.28ch;padding:.18rem .24rem;border-radius:10px;border:1px solid rgba(255,255,255,.16);background:radial-gradient(circle at 0 0,rgba(255,255,255,.22) 0,transparent 42%),linear-gradient(135deg,#ffffff2e,#ffffff14);cursor:grab;width:100%;height:fit-content;box-shadow:inset 0 1px #ffffff29,0 6px 18px #0000001a}.bm-S.bm-M{cursor:grabbing}.bm-W:has(.bm-S.bm-M){pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.bm-S.bm-M{pointer-events:auto}.bm-T{display:inline-block;height:2.2em;margin-right:.45ch;padding:.2rem;border-radius:12px;vertical-align:middle;background:linear-gradient(135deg,#ffffff38,#ffffff14);box-shadow:inset 0 1px #ffffff29,0 8px 18px #0000001f}.bm-W h1{display:inline-block;font-size:1rem;font-weight:700;vertical-align:middle;font-family:var(--bm-font-display);text-transform:uppercase;letter-spacing:.14em;color:#10213cf5}.bm-S h1,.bm-y{font-size:.78rem;user-select:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-family:var(--bm-font-display);letter-spacing:.14em;color:#122542f2;text-shadow:0 1px 0 rgba(255,255,255,.28)}.bm-S div:has(h1){display:contents}.bm-W h2{display:inline-block;font-size:.88rem;font-weight:700;vertical-align:middle;font-family:var(--bm-font-display);letter-spacing:.1em;color:#122340f5}.bm-W h3{display:inline-block;font-size:large;font-weight:700;font-family:var(--bm-font-display);letter-spacing:.08em;color:#122340f5}.bm-W p{color:var(--bm-text-secondary);line-height:1.5;letter-spacing:.035em}.bm-W hr{border:none;height:1px;margin:.32rem 0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.28),transparent)}.bm-L.bm-h{width:fit-content;margin-left:auto;margin-right:auto}.bm-L{margin:.24em 0}.bm-W input,.bm-W select,.bm-W textarea,.bm-W button{font:inherit}.bm-W button{appearance:none;color:var(--bm-text-primary);font-family:var(--bm-font-display);background:linear-gradient(135deg,#ffffff38,#a4d0ff24);border:1px solid rgba(255,255,255,.22);border-radius:999px;padding:.28em .62em;min-height:1.78em;font-weight:600;letter-spacing:.1em;box-shadow:inset 0 1px #ffffff38,0 8px 20px #0000001a;transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,filter .18s ease,opacity .18s ease,transform .18s ease}.bm-W button:hover,.bm-W button:focus-visible{background:linear-gradient(135deg,#ffffff47,#baf6ff2e);border-color:#e6f5ff5c;box-shadow:inset 0 1px #ffffff42,0 10px 22px #0000001f;transform:translateY(-1px)}.bm-W button:focus-visible,.bm-W input:focus-visible,.bm-W select:focus-visible,.bm-W textarea:focus-visible{outline:none;border-color:#74e7ff9e;box-shadow:0 0 0 3px #74e7ff26,inset 0 1px #ffffff1f}.bm-W button:active{transform:translateY(0) scale(.98);filter:brightness(.98);box-shadow:inset 0 1px #ffffff1f,0 8px 16px #12244e3d}.bm-W button:disabled{opacity:.56;cursor:not-allowed;text-decoration:none;transform:none;filter:saturate(.72);box-shadow:none}.bm-W button.bm-1H{color:#07203b;background:linear-gradient(135deg,#ffffff6b,#baf6ff57);border-color:#eff8ff6b;box-shadow:inset 0 1px #ffffff70,0 10px 22px #81b6ff24}.bm-W button.bm-1H:hover,.bm-W button.bm-1H:focus-visible{background:linear-gradient(135deg,#ffffff85,#ccfaff5c)}.bm-W button.bm-1v{background:linear-gradient(135deg,#ffffff29,#ffffff14);border-color:#ffffff2e;box-shadow:inset 0 1px #ffffff24,0 8px 20px #00000014}.bm-W button.bm-1v:hover,.bm-W button.bm-1v:focus-visible{background:linear-gradient(135deg,#ffffff3d,#baf6ff1f)}.bm-s{display:inline-flex;align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.16);inline-size:1.62rem;block-size:1.62rem;min-height:1.62rem!important;min-width:1.62rem;margin-top:0;text-align:center;line-height:1;padding:0!important;aspect-ratio:1 / 1;border-radius:50%!important;background:linear-gradient(135deg,#ffffff3d,#ffffff1a)!important;box-shadow:inset 0 1px #ffffff2e,0 8px 18px #0000001a!important;overflow:hidden;flex:0 0 auto;font-size:.74rem}.bm-s svg{display:block;width:70%;height:70%;flex:0 0 auto;margin:auto;color:currentColor;pointer-events:none;transform:translateZ(0);overflow:visible}.bm-s .bm-1g{width:68%;height:68%;transform:translateY(.5px) translateZ(0)}.bm-s .bm-1b{width:62%;height:62%;transform:translateY(.75px) translateZ(0)}#bm-t.bm-N .bm-s .bm-1b{transform:translateZ(0)}.bm-J{vertical-align:middle}.bm-J svg{width:50%;margin:0 auto;fill:#111}.bm-W button.bm-A{background:transparent!important;box-shadow:none!important;border-color:transparent!important}.bm-A.bm-f:hover,.bm-A.bm-f:focus{background-color:#ffffff2e!important}.bm-A.bm-f:active{background-color:#ffffff3d!important}.bm-A.bm-g:hover,.bm-A.bm-g:focus{background-color:#00000024!important}.bm-A.bm-g:active{background-color:#0003!important}.bm-W input[type=number],.bm-W select,.bm-W textarea{color:var(--bm-text-primary);font-family:var(--bm-font-body);background:linear-gradient(180deg,#ffffff29,#ffffff0f);border:1px solid rgba(255,255,255,.18);border-radius:12px;box-shadow:inset 0 1px #ffffff1f}input[type=number].bm-C{appearance:auto;-moz-appearance:textfield;width:5.9ch;margin-left:1ch;padding:.2em .35ch;font-size:small}input[type=number].bm-C::-webkit-outer-spin-button,input[type=number].bm-C::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}div:has(>.bm-K)>button{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bm-K,input[type=file]{display:none!important;visibility:hidden!important;position:absolute!important;left:-9999px!important;top:-9999px!important;width:0!important;height:0!important;opacity:0!important;z-index:-9999!important;pointer-events:none!important}.bm-W select{padding:.22em .45ch}.bm-W label:has(input[type=checkbox]){display:flex;width:fit-content;gap:1ch;align-items:center;color:var(--bm-text-secondary)}.bm-W input[type=checkbox]{width:1em;accent-color:#74e7ff}.bm-m{overflow:hidden;max-height:calc(100% - 5px);transition:height .3s cubic-bezier(.4,0,.2,1)}.bm-W textarea{font-size:small;padding:.38em .52em;height:4em;width:100%;resize:vertical;line-height:1.45}.bm-W textarea::placeholder,.bm-W input::placeholder{color:#2f446699}.bm-W a:not(:has(*)){color:#1558a4f0;text-decoration:underline;text-decoration-color:#1558a459}.bm-W small{font-size:x-small;font-family:var(--bm-font-display);letter-spacing:.12em;color:var(--bm-text-secondary)}.bm-W ul li{list-style:disc;margin-left:5ch}.bm-W .bm-L.bm-H{max-height:var(--bm-H-max-height, calc(80vh - 150px) );overflow:auto;scrollbar-width:thin;scrollbar-color:rgba(146,221,255,.42) rgba(255,255,255,.05)}.bm-W .bm-L.bm-H::-webkit-scrollbar{width:10px;height:10px}.bm-W .bm-L.bm-H::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#74e7ff7a,#538dff66);border-radius:999px;border:2px solid transparent;background-clip:padding-box}.bm-W .bm-L.bm-H::-webkit-scrollbar-track{background:#ffffff0a;border-radius:999px}.bm-x{display:flex;align-content:center;justify-content:space-between;align-items:center;gap:.35ch}.bm-D{display:flex;align-content:center;justify-content:center;align-items:center;gap:.35ch}.bm-_{white-space:pre;letter-spacing:0;line-height:1!important;font-size:1.6em;font-family:monospace}.bm-N .bm-L:not(#bm-F .bm-L){margin-top:.18em;margin-bottom:.18em}.bm-N h1:not(#bm-F h1){font-size:1em}#bm-t .bm-1A{display:block;width:1.28em;height:1.28em;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;overflow:visible}#bm-t p svg{display:inline-block;height:1em;width:1em;color:currentColor;vertical-align:-.16em}#bm-t:not(.bm-N){width:min(50rem,calc(100vw - .55rem));max-width:min(50rem,calc(100vw - .55rem))!important}#bm-t .bm-1O{padding-top:.08rem}#bm-t .bm-1G{gap:.22rem;flex-wrap:wrap;width:100%;padding:.16rem}#bm-t .bm-1G>button{flex:1 1 10rem}#bm-t .bm-1s{padding-right:.08rem}#bm-t .bm-1B{display:grid;grid-template-columns:minmax(16rem,20rem) minmax(0,1fr);gap:.24rem .3rem;align-items:stretch}#bm-t .bm-1B>hr,#bm-t .bm-1u{grid-column:1 / -1}#bm-t .bm-1t,#bm-t .bm-21,#bm-t .bm-1u{padding:.38rem .48rem;border-radius:13px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(155deg,#ffffff2e,#ffffff12);box-shadow:inset 0 1px #ffffff29,0 8px 20px #00000014}#bm-t .bm-1t{display:grid;gap:.18rem}#bm-t .bm-1t br{display:none}#bm-t .bm-1t span{display:block;padding:.28rem .38rem;border-radius:10px;background:linear-gradient(180deg,#fff3,#ffffff14)}#bm-t .bm-21 p{margin:0}#bm-t .bm-1u fieldset{border:none;padding:0;margin:0}#bm-t .bm-1u legend{margin-bottom:.12rem}#bm-t .bm-1u .bm-L{margin-top:.1rem;margin-bottom:.1rem}#bm-t .bm-1l{display:flex;justify-content:flex-start}#bm-t .bm-1l button{min-width:7.8rem}#bm-E{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;align-items:stretch;gap:.3rem}#bm-t .bm-z{position:relative;overflow:hidden;width:fit-content;max-width:35ch;padding:.28rem;gap:.28rem;border-radius:13px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(160deg,#ffffff2e,#ffffff12);box-shadow:inset 0 1px #ffffff29,0 8px 20px #00000014;transition:background .25s ease,border-color .25s ease,box-shadow .25s ease,transform .25s ease}#bm-t .bm-z:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at top right,rgba(255,255,255,.18),transparent 24%),radial-gradient(circle at 18% 0%,rgba(186,246,255,.12),transparent 22%)}#bm-t .bm-z-toggle{cursor:pointer}#bm-t .bm-z:hover,#bm-t .bm-z:focus-within{transform:translateY(-2px);border-color:#92ddff42;background:linear-gradient(160deg,#ffffff38,#baf6ff1a);box-shadow:inset 0 1px #fff3,0 10px 24px #0000001a}#bm-t .bm-z-toggle:focus-visible{outline:none;border-color:#74e7ff9e;box-shadow:0 0 0 3px #74e7ff26,inset 0 1px #fff3,0 10px 24px #0000001a}#bm-t .bm-a{display:block;width:fit-content;height:fit-content;padding:.26rem;border:1px solid rgba(255,255,255,.18);border-radius:10px;box-shadow:inset 0 1px #ffffff24,0 6px 16px #00000014}#bm-t .bm-z[data-id="-2"] .bm-a{background:conic-gradient(#a00,#aa0 16.6%,#0a0,#0aa 50%,#00a 66.6%,#a0a,#a00)}#bm-t .bm-z[data-id="-1"] .bm-a{background:url('data:image/svg+xml;utf8,') repeat;background-color:transparent!important}#bm-t .bm-z[data-id="-1"] .bm-a svg{color:#fff!important}#bm-t .bm-z[data-id="0"] .bm-a{background-color:transparent!important}#bm-t .bm-a button{display:inline-flex;align-items:center;justify-content:center;padding:.24em;min-width:2.05rem;min-height:2.05rem;border-radius:999px;line-height:1}#bm-t .bm-a .bm-1A{width:1.55rem;height:1.55rem;filter:drop-shadow(0 1px 0 rgba(255,255,255,.18))}#bm-t .bm-z>.bm-x{flex-direction:column;align-items:flex-start;gap:.02rem}#bm-t .bm-z h2{margin:.04rem 0 0}#bm-t .bm-z .bm-6{margin:.1rem 0 0}#bm-t .bm-z small{font-size:.75em}#bm-t .bm-z.bm-I{display:none}#bm-t.bm-N{--bm-H-max-height: 100%;display:grid;grid-template-rows:auto minmax(0,1fr);width:360px;height:min(60vh,22rem);min-width:360px;min-height:180px;max-width:min(1000px,calc(100vw - 16px))!important;max-height:min(1400px,calc(100vh - 16px))!important;overflow:hidden;box-sizing:border-box;position:fixed;transition:background .32s ease,border-color .22s ease,box-shadow .22s ease,transform 0s}#bm-t.bm-N .bm-m{display:grid;grid-template-rows:auto auto auto auto minmax(0,1fr);grid-row:2;min-height:0;min-width:0;overflow:hidden}#bm-t.bm-N .bm-1G{gap:.16rem;flex-wrap:nowrap;width:100%;padding:.12rem}#bm-t.bm-N .bm-1G>button{flex:1 1 0;min-width:0}#bm-t.bm-N #bm-E{flex-direction:column;align-items:stretch;gap:.16rem;width:100%;align-self:stretch;min-width:0;box-sizing:border-box}#bm-t.bm-N .bm-z{width:100%;max-width:none;align-self:stretch;flex:1 1 auto;min-width:0;margin:0;padding:.12rem;border-radius:11px;box-sizing:border-box}#bm-t.bm-N .bm-z>.bm-x{width:100%;min-width:0;flex:1 1 auto}#bm-t.bm-N .bm-L.bm-H{display:block;grid-row:5;min-height:0;min-width:0;height:100%;width:100%;max-height:100%!important;overflow:auto;box-sizing:border-box}#bm-t.bm-N .bm-1P{position:absolute;right:4px;bottom:4px;display:flex;width:20px;height:20px;align-items:flex-end;justify-content:flex-end;padding-right:4px;padding-bottom:4px;box-sizing:border-box;z-index:5;cursor:nwse-resize;pointer-events:auto;opacity:.78;touch-action:none;user-select:none;color:#ffffffdb;background:linear-gradient(135deg,#ffffff24,#538dff24);border:1px solid rgba(255,255,255,.12);border-radius:8px;box-shadow:inset 0 1px #ffffff14}#bm-t.bm-N .bm-1P:hover,#bm-t.bm-N .bm-1P.bm-2h{opacity:1;border-color:#92ddff5c;box-shadow:inset 0 1px #ffffff1a,0 8px 16px #00000029}#bm-t.bm-N .bm-a{display:flex;width:100%;min-width:0;flex:1 1 auto;gap:.5ch;align-items:center;padding:.1rem .2rem;border:none;border-radius:8px;box-sizing:border-box}#bm-t.bm-N .bm-a button{padding:.2em;flex:0 0 auto}#bm-t.bm-N .bm-a .bm-1A{width:1.36rem;height:1.36rem}#bm-t.bm-N .bm-z h2{font-size:.78rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#bm-t #bm-2{display:inline-flex;align-items:center;padding:.08rem .24rem;border-radius:999px;background:#ffffff1f;box-shadow:inset 0 1px #ffffff14;font-size:1em}@media (max-width: 980px){#bm-t:not(.bm-N){width:min(100vw - .35rem,50rem);max-width:min(100vw - .35rem,50rem)!important}#bm-t .bm-1B{grid-template-columns:1fr}#bm-t .bm-21,#bm-t .bm-1u,#bm-t .bm-1B>hr{grid-column:auto}}#bm-F{width:min(25.5rem,calc(100vw - .65rem));max-width:min(25.5rem,calc(100vw - .65rem))!important}#bm-F .bm-m{display:flex;flex-direction:column}#bm-F .bm-2e,#bm-F .bm-2a{position:relative;overflow:hidden;border-radius:14px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(150deg,#ffffff2e,#ffffff14);box-shadow:inset 0 1px #fff3,0 10px 24px #0000001a}#bm-F .bm-2e:before,#bm-F .bm-2a:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at top right,rgba(255,255,255,.2),transparent 26%),radial-gradient(circle at 20% 0%,rgba(186,246,255,.16),transparent 24%)}#bm-F .bm-2e{display:flex;align-items:center;gap:.5rem;padding:.48rem .58rem}#bm-F .bm-2e h1{margin:0}#bm-F .bm-29{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.24rem}#bm-F .bm-1J{min-width:0;min-height:2.55rem;display:flex;align-items:flex-start;padding:.34rem .45rem;border-radius:11px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(160deg,#ffffff2e,#ffffff12);box-shadow:inset 0 1px #ffffff29;color:#12233ff5;line-height:1.22}#bm-F .bm-1J>span,#bm-F .bm-1J>time{min-width:0}#bm-F .bm-1h,#bm-F .bm-1i{flex-direction:column;justify-content:center;gap:.08rem}#bm-F .bm-1D{display:inline-block;font-size:1.3em;color:#0f1f38f5;white-space:normal;overflow-wrap:anywhere}#bm-F .bm-1D b{font-size:1em}#bm-F .bm-1C{color:#314769d1;font-size:.62rem;letter-spacing:.08em;font-family:var(--bm-font-display);text-transform:uppercase}#bm-F .bm-1J time{white-space:nowrap;font-family:var(--bm-font-mono);letter-spacing:.06em}#bm-F .bm-2a{padding:.48rem}#bm-F .bm-23{display:grid;grid-template-columns:auto repeat(4,minmax(0,1fr));gap:.22rem;align-items:center}#bm-F .bm-23 .bm-J{width:1.8rem;height:1.8rem}#bm-F .bm-23 .bm-C{width:100%;margin-left:0;text-align:center}#bm-F .bm-24,#bm-F .bm-25{margin-top:.24rem}#bm-F .bm-24>div{width:100%}#bm-F .bm-1Z{gap:.24rem;margin-top:.3rem}#bm-F .bm-1Z>button{flex:1 1 0}#bm-F .bm-25 textarea{min-height:4.1rem}@media (max-width: 720px){#bm-F{width:min(100vw - .45rem,25.5rem);max-width:min(100vw - .45rem,25.5rem)!important}#bm-F .bm-29{grid-template-columns:1fr}#bm-F .bm-23{grid-template-columns:repeat(2,minmax(0,1fr))}#bm-F .bm-23 .bm-J{grid-column:1 / -1;width:100%;aspect-ratio:auto;height:1.8rem}#bm-F .bm-1Z{flex-direction:column}}#bm-l div:has(>.bm-3){width:fit-content;justify-content:flex-start}#bm-l .bm-3{display:flex;flex-direction:column;width:13%}#bm-l .bm-3 span{width:fit-content;margin:auto;font-size:.7em}#bm-l .bm-3 button{width:fit-content;padding:0;border-radius:0}#bm-l .bm-3 svg{stroke:#333;stroke-width:.02px;width:100%;min-width:1.5ch;max-width:14.5ch}#bm-l .bm-3 button:hover svg,#bm-l .bm-3 button:focus svg{opacity:.9}#bm-l .bm-n{display:grid;grid-template-columns:1fr 1fr 1fr;width:25%;min-width:3ch;max-width:15ch}#bm-l .bm-n>button{width:100%;padding:0;aspect-ratio:1 / 1;background-color:#fff;border:#333 1px solid;border-radius:0;box-sizing:border-box}#bm-l .bm-n>button[data-status=Incorrect]{background-color:brown}#bm-l .bm-n>button[data-status=Template]{background-color:#2f4f4f}#bm-l .bm-n>button:hover,#bm-l .bm-n>button:focus{opacity:.8}#bm-B{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start}#bm-B>.bm-L{width:100%;justify-content:flex-start;background-color:#153063e6;border-radius:1em;padding:.5em;transition:background-color .3s ease}#bm-B>.bm-L:hover,#bm-B>.bm-L:focus-within{background-color:#112855e6}#bm-B .bm-1{height:100%;font-size:xxx-large}#bm-B .bm-0{flex-direction:column;align-items:flex-start;gap:0} +div:has(>confetti-piece){position:absolute;inset:0;overflow:hidden;pointer-events:none}confetti-piece{position:absolute;top:-10px;width:var(--size);height:var(--size);background:currentColor;transform:translate3d(var(--x),-10vh,0) rotate(var(--rot));animation:fall var(--duration) linear var(--delay);will-change:transform;pointer-events:none}@keyframes fall{to{transform:translate3d(var(--x),110vh,0) rotate(calc(var(--rot) + 720deg))}}.bm-screenreader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.bm-W{--bm-surface-strong: rgba(9, 20, 42, .5);--bm-surface-soft: rgba(24, 41, 74, .28);--bm-surface-glass: rgba(255, 255, 255, .1);--bm-surface-glass-strong: rgba(255, 255, 255, .18);--bm-border-soft: rgba(255, 255, 255, .18);--bm-border-strong: rgba(163, 228, 255, .34);--bm-text-primary: rgba(17, 36, 66, .96);--bm-text-secondary: rgba(36, 57, 90, .84);--bm-accent-start: #baf6ff;--bm-accent-end: #81b6ff;--bm-accent-shadow: rgba(132, 182, 255, .22);--bm-font-body: "Rajdhani", "Segoe UI Variable Text", "Segoe UI", sans-serif;--bm-font-display: "Michroma", "Orbitron", "Segoe UI", sans-serif;--bm-font-mono: "Roboto Mono", "Rajdhani", "Courier New", monospace;position:fixed;isolation:isolate;overflow:hidden;background:radial-gradient(circle at 14% 12%,rgba(255,255,255,.24),transparent 18%),radial-gradient(circle at 86% 8%,rgba(186,246,255,.22),transparent 24%),radial-gradient(circle at 82% 84%,rgba(129,182,255,.18),transparent 28%),linear-gradient(145deg,#ffffff2e,#ffffff0f 22%,#6991d414 54%,#09142a2e);color:var(--bm-text-primary);padding:6px;border-radius:16px;border:1px solid var(--bm-border-soft);box-shadow:0 18px 40px #0003,inset 0 1px #ffffff38,inset 0 -1px #ffffff0d;z-index:9000;transition:background .32s ease,border-color .22s ease,box-shadow .22s ease,opacity .22s ease,transform 0s,width .22s ease,max-width .22s ease,max-height .22s ease;top:75px;left:60px;width:auto;max-height:fit-content;max-width:calc(100% - 135px);backdrop-filter:blur(26px) saturate(1.25);font-family:var(--bm-font-body);letter-spacing:.04em}.bm-W:before,.bm-W:after{content:"";position:absolute;inset:0;pointer-events:none}.bm-W:before{border-radius:inherit;padding:1px;background:linear-gradient(135deg,#ffffff73,#ffffff1f 24%,#baf6ff38 58%,#81b6ff4d);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.85}.bm-W:after{border-radius:inherit;background:linear-gradient(180deg,rgba(255,255,255,.2),transparent 24%),radial-gradient(circle at 18% 0%,rgba(255,255,255,.22),transparent 22%),radial-gradient(circle at 88% 16%,rgba(186,246,255,.18),transparent 18%);opacity:1}.bm-S{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.28ch;padding:.18rem .24rem;border-radius:10px;border:1px solid rgba(255,255,255,.16);background:radial-gradient(circle at 0 0,rgba(255,255,255,.22) 0,transparent 42%),linear-gradient(135deg,#ffffff2e,#ffffff14);cursor:grab;width:100%;height:fit-content;box-shadow:inset 0 1px #ffffff29,0 6px 18px #0000001a}.bm-S.bm-M{cursor:grabbing}.bm-W:has(.bm-S.bm-M){pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.bm-S.bm-M{pointer-events:auto}.bm-T{display:inline-block;height:2.2em;margin-right:.45ch;padding:.2rem;border-radius:12px;vertical-align:middle;background:linear-gradient(135deg,#ffffff38,#ffffff14);box-shadow:inset 0 1px #ffffff29,0 8px 18px #0000001f}.bm-W h1{display:inline-block;font-size:1rem;font-weight:700;vertical-align:middle;font-family:var(--bm-font-display);text-transform:uppercase;letter-spacing:.14em;color:#10213cf5}.bm-S h1,.bm-y{font-size:.78rem;user-select:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-family:var(--bm-font-display);letter-spacing:.14em;color:#122542f2;text-shadow:0 1px 0 rgba(255,255,255,.28)}.bm-S div:has(h1){display:contents}.bm-W h2{display:inline-block;font-size:.88rem;font-weight:700;vertical-align:middle;font-family:var(--bm-font-display);letter-spacing:.1em;color:#122340f5}.bm-W h3{display:inline-block;font-size:large;font-weight:700;font-family:var(--bm-font-display);letter-spacing:.08em;color:#122340f5}.bm-W p{color:var(--bm-text-secondary);line-height:1.5;letter-spacing:.035em}.bm-W hr{border:none;height:1px;margin:.32rem 0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.28),transparent)}.bm-L.bm-h{width:fit-content;margin-left:auto;margin-right:auto}.bm-L{margin:.24em 0}.bm-W input,.bm-W select,.bm-W textarea,.bm-W button{font:inherit}.bm-W button{appearance:none;color:var(--bm-text-primary);font-family:var(--bm-font-display);background:linear-gradient(135deg,#ffffff38,#a4d0ff24);border:1px solid rgba(255,255,255,.22);border-radius:999px;padding:.28em .62em;min-height:1.78em;font-weight:600;letter-spacing:.1em;box-shadow:inset 0 1px #ffffff38,0 8px 20px #0000001a;transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,filter .18s ease,opacity .18s ease,transform .18s ease}.bm-W button:hover,.bm-W button:focus-visible{background:linear-gradient(135deg,#ffffff47,#baf6ff2e);border-color:#e6f5ff5c;box-shadow:inset 0 1px #ffffff42,0 10px 22px #0000001f;transform:translateY(-1px)}.bm-W button:focus-visible,.bm-W input:focus-visible,.bm-W select:focus-visible,.bm-W textarea:focus-visible{outline:none;border-color:#74e7ff9e;box-shadow:0 0 0 3px #74e7ff26,inset 0 1px #ffffff1f}.bm-W button:active{transform:translateY(0) scale(.98);filter:brightness(.98);box-shadow:inset 0 1px #ffffff1f,0 8px 16px #12244e3d}.bm-W button:disabled{opacity:.56;cursor:not-allowed;text-decoration:none;transform:none;filter:saturate(.72);box-shadow:none}.bm-W button.bm-1R{color:#07203b;background:linear-gradient(135deg,#ffffff6b,#baf6ff57);border-color:#eff8ff6b;box-shadow:inset 0 1px #ffffff70,0 10px 22px #81b6ff24}.bm-W button.bm-1R:hover,.bm-W button.bm-1R:focus-visible{background:linear-gradient(135deg,#ffffff85,#ccfaff5c)}.bm-W button.bm-1D{background:linear-gradient(135deg,#ffffff29,#ffffff14);border-color:#ffffff2e;box-shadow:inset 0 1px #ffffff24,0 8px 20px #00000014}.bm-W button.bm-1D:hover,.bm-W button.bm-1D:focus-visible{background:linear-gradient(135deg,#ffffff3d,#baf6ff1f)}.bm-s{display:inline-flex;align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.16);inline-size:1.62rem;block-size:1.62rem;min-height:1.62rem!important;min-width:1.62rem;margin-top:0;text-align:center;line-height:1;padding:0!important;aspect-ratio:1 / 1;border-radius:50%!important;background:linear-gradient(135deg,#ffffff3d,#ffffff1a)!important;box-shadow:inset 0 1px #ffffff2e,0 8px 18px #0000001a!important;overflow:hidden;flex:0 0 auto;font-size:.74rem}.bm-s svg{display:block;width:70%;height:70%;flex:0 0 auto;margin:auto;color:currentColor;pointer-events:none;transform:translateZ(0);overflow:visible}.bm-s .bm-1j{width:68%;height:68%;transform:translateY(.5px) translateZ(0)}.bm-s .bm-1e{width:62%;height:62%;transform:translateY(.75px) translateZ(0)}#bm-t.bm-N .bm-s .bm-1e{transform:translateZ(0)}.bm-J{vertical-align:middle}.bm-J svg{width:50%;margin:0 auto;fill:#111}.bm-W button.bm-A{background:transparent!important;box-shadow:none!important;border-color:transparent!important}.bm-A.bm-f:hover,.bm-A.bm-f:focus{background-color:#ffffff2e!important}.bm-A.bm-f:active{background-color:#ffffff3d!important}.bm-A.bm-g:hover,.bm-A.bm-g:focus{background-color:#00000024!important}.bm-A.bm-g:active{background-color:#0003!important}.bm-W input[type=number],.bm-W select,.bm-W textarea{color:var(--bm-text-primary);font-family:var(--bm-font-body);background:linear-gradient(180deg,#ffffff29,#ffffff0f);border:1px solid rgba(255,255,255,.18);border-radius:12px;box-shadow:inset 0 1px #ffffff1f}input[type=number].bm-C{appearance:auto;-moz-appearance:textfield;width:5.9ch;margin-left:1ch;padding:.2em .35ch;font-size:small}input[type=number].bm-C::-webkit-outer-spin-button,input[type=number].bm-C::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}div:has(>.bm-K)>button{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bm-K,input[type=file]{display:none!important;visibility:hidden!important;position:absolute!important;left:-9999px!important;top:-9999px!important;width:0!important;height:0!important;opacity:0!important;z-index:-9999!important;pointer-events:none!important}.bm-W select{padding:.22em .45ch}.bm-W label:has(input[type=checkbox]){display:flex;width:fit-content;gap:1ch;align-items:center;color:var(--bm-text-secondary)}.bm-W input[type=checkbox]{width:1em;accent-color:#74e7ff}.bm-m{overflow:hidden;max-height:calc(100% - 5px);transition:height .3s cubic-bezier(.4,0,.2,1)}.bm-W textarea{font-size:small;padding:.38em .52em;height:4em;width:100%;resize:vertical;line-height:1.45}.bm-W textarea::placeholder,.bm-W input::placeholder{color:#2f446699}.bm-W a:not(:has(*)){color:#1558a4f0;text-decoration:underline;text-decoration-color:#1558a459}.bm-W small{font-size:x-small;font-family:var(--bm-font-display);letter-spacing:.12em;color:var(--bm-text-secondary)}.bm-W ul li{list-style:disc;margin-left:5ch}.bm-W .bm-L.bm-H{max-height:var(--bm-H-max-height, calc(80vh - 150px) );overflow:auto;scrollbar-width:thin;scrollbar-color:rgba(146,221,255,.42) rgba(255,255,255,.05)}.bm-W .bm-L.bm-H::-webkit-scrollbar{width:10px;height:10px}.bm-W .bm-L.bm-H::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#74e7ff7a,#538dff66);border-radius:999px;border:2px solid transparent;background-clip:padding-box}.bm-W .bm-L.bm-H::-webkit-scrollbar-track{background:#ffffff0a;border-radius:999px}.bm-x{display:flex;align-content:center;justify-content:space-between;align-items:center;gap:.35ch}.bm-D{display:flex;align-content:center;justify-content:center;align-items:center;gap:.35ch}.bm-_{white-space:pre;letter-spacing:0;line-height:1!important;font-size:1.6em;font-family:monospace}.bm-N .bm-L:not(#bm-F .bm-L){margin-top:.18em;margin-bottom:.18em}.bm-N h1:not(#bm-F h1){font-size:1em}#bm-t .bm-1K{display:block;width:1.28em;height:1.28em;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;overflow:visible}#bm-t p svg{display:inline-block;height:1em;width:1em;color:currentColor;vertical-align:-.16em}#bm-t:not(.bm-N){width:min(50rem,calc(100vw - .55rem));max-width:min(50rem,calc(100vw - .55rem))!important}#bm-t .bm-1-{padding-top:.08rem}#bm-t .bm-1Q{gap:.22rem;flex-wrap:wrap;width:100%;padding:.16rem}#bm-t .bm-1Q>button{flex:1 1 10rem}#bm-t .bm-1x{padding-right:.08rem}#bm-t .bm-1L{display:block;margin:0 .18rem}#bm-t .bm-1E{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.24rem}#bm-t .bm-1F,#bm-t .bm-1A{min-width:0;border-radius:11px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(155deg,#ffffff2e,#ffffff12);box-shadow:inset 0 1px #ffffff29,0 8px 20px #00000014}#bm-t .bm-1F{min-height:2.7rem;display:flex;flex-direction:column;justify-content:center;gap:.08rem;padding:.34rem .45rem;color:#12233ff5;line-height:1.22}#bm-t .bm-1y{color:#314769d1;font-size:.62rem;letter-spacing:0;font-family:var(--bm-font-display);text-transform:uppercase}#bm-t .bm-1z{display:inline-block;min-width:0;color:#0f1f38f5;font-size:1.04em;font-weight:700;overflow-wrap:anywhere}#bm-t .bm-1F time{font-family:var(--bm-font-mono);letter-spacing:0}#bm-t .bm-1A{padding:.38rem .48rem}#bm-t .bm-1A fieldset{border:none;padding:0;margin:0}#bm-t .bm-1A legend{margin-bottom:.12rem}#bm-t .bm-1A .bm-L{margin-top:.1rem;margin-bottom:.1rem}#bm-t .bm-1o{display:flex;justify-content:flex-start}#bm-t .bm-1o button{min-width:7.8rem}#bm-E{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-items:stretch;gap:.38rem}#bm-t .bm-z{position:relative;overflow:hidden;width:fit-content;max-width:35ch;padding:.28rem;gap:.28rem;border-radius:13px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(160deg,#ffffff2e,#ffffff12);box-shadow:inset 0 1px #ffffff29,0 8px 20px #00000014;transition:background .25s ease,border-color .25s ease,box-shadow .25s ease,transform .25s ease}#bm-t .bm-z:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at top right,rgba(255,255,255,.18),transparent 24%),radial-gradient(circle at 18% 0%,rgba(186,246,255,.12),transparent 22%)}#bm-t:not(.bm-N) .bm-z:before{background:linear-gradient(180deg,#ffffff14,#0000000a)}#bm-t:not(.bm-N) .bm-z:after{content:"";position:absolute;left:.52rem;bottom:.46rem;width:1.65rem;height:1.65rem;background:currentColor;opacity:.72;pointer-events:none;z-index:0;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.8 12s3.1-5 8.2-5 8.2 5 8.2 5-3.1 5-8.2 5-8.2-5-8.2-5Z' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='none' stroke='black' stroke-width='1.9'/%3E%3C/svg%3E") center / contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.8 12s3.1-5 8.2-5 8.2 5 8.2 5-3.1 5-8.2 5-8.2-5-8.2-5Z' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='none' stroke='black' stroke-width='1.9'/%3E%3C/svg%3E") center / contain no-repeat}#bm-t:not(.bm-N) .bm-z[data-state=hidden]:after{opacity:.88;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.6 9.8C6.1 8.3 8.6 7 12 7c5.1 0 8.2 5 8.2 5a15.2 15.2 0 0 1-2.2 2.7' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M14.1 16.7a8.3 8.3 0 0 1-2.1.3c-5.1 0-8.2-5-8.2-5a14.9 14.9 0 0 1 1.8-2.3' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M5 5l14 14' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10.4 10.7a2.5 2.5 0 0 0 2.9 2.9' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.6 9.8C6.1 8.3 8.6 7 12 7c5.1 0 8.2 5 8.2 5a15.2 15.2 0 0 1-2.2 2.7' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M14.1 16.7a8.3 8.3 0 0 1-2.1.3c-5.1 0-8.2-5-8.2-5a14.9 14.9 0 0 1 1.8-2.3' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M5 5l14 14' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10.4 10.7a2.5 2.5 0 0 0 2.9 2.9' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat}#bm-t .bm-z-toggle{cursor:pointer}#bm-t .bm-z:hover,#bm-t .bm-z:focus-within{transform:translateY(-2px);border-color:#92ddff42;box-shadow:inset 0 1px #fff3,0 10px 24px #0000001a}#bm-t:not(.bm-N) .bm-z{width:min(100%,23.5rem);max-width:23.5rem;min-height:6.15rem;display:grid;grid-template-columns:minmax(0,1.2fr) minmax(7.6rem,.8fr);align-items:stretch;gap:.48rem;padding:.5rem;color:var(--bm-1T);background-color:var(--bm-1S);background-image:none}#bm-t:not(.bm-N) .bm-z[data-id="-2"][data-state=shown]{background-image:conic-gradient(#a00,#aa0 16.6%,#0a0,#0aa 50%,#00a 66.6%,#a0a,#a00)}#bm-t:not(.bm-N) .bm-z[data-id="-1"][data-state=shown],#bm-t:not(.bm-N) .bm-z[data-id="0"][data-state=shown]{background-image:url('data:image/svg+xml;utf8,');background-color:#ffffff2e}#bm-t:not(.bm-N) .bm-z[data-state=hidden]{color:var(--bm-1T);border-color:#ffffff29;background-color:var(--bm-1S);background-image:none}#bm-t:not(.bm-N) .bm-z[data-id="-2"][data-state=hidden]{background-image:conic-gradient(#a00,#aa0 16.6%,#0a0,#0aa 50%,#00a 66.6%,#a0a,#a00)}#bm-t:not(.bm-N) .bm-z[data-id="-1"][data-state=hidden],#bm-t:not(.bm-N) .bm-z[data-id="0"][data-state=hidden]{background-image:url('data:image/svg+xml;utf8,');background-color:#ffffff2e}#bm-t:not(.bm-N) .bm-z[data-state=hidden]:before{opacity:.16}#bm-t:not(.bm-N) .bm-z>*{position:relative;z-index:1}#bm-t:not(.bm-N) .bm-1p{display:none}#bm-t:not(.bm-N) .bm-z[data-premium="1"] .bm-1p{position:absolute;top:50%;right:-3.2rem;z-index:0;display:block;width:10.5rem;aspect-ratio:1;background:currentColor;clip-path:polygon(50% 5%,62% 38%,98% 38%,69% 59%,80% 93%,50% 72%,20% 93%,31% 59%,2% 38%,38% 38%);opacity:.12;pointer-events:none;transform:translateY(-50%)}#bm-t:not(.bm-N) .bm-z[data-premium="1"][data-state=hidden] .bm-1p{opacity:.18}#bm-t:not(.bm-N) .bm-z-main,#bm-t:not(.bm-N) .bm-z-meta,#bm-t:not(.bm-N) .bm-z-progress{min-width:0;display:flex;flex-direction:column}#bm-t:not(.bm-N) .bm-z-main{justify-content:flex-start;gap:.4rem}#bm-t:not(.bm-N) .bm-z-title{min-width:0}#bm-t:not(.bm-N) .bm-z-meta{align-items:flex-end;justify-content:space-between;gap:.42rem;text-align:right}#bm-t:not(.bm-N) .bm-z-progress{align-items:flex-end;gap:.08rem}#bm-t:not(.bm-N) .bm-z .bm-9{font-family:var(--bm-font-display);font-size:1rem;font-weight:700;line-height:1.15;overflow-wrap:anywhere}#bm-t .bm-z-toggle:focus-visible{outline:none;border-color:#74e7ff9e;box-shadow:0 0 0 3px #74e7ff26,inset 0 1px #fff3,0 10px 24px #0000001a}#bm-t .bm-a{display:block;width:fit-content;height:fit-content;padding:.26rem;border:1px solid rgba(255,255,255,.18);border-radius:10px;box-shadow:inset 0 1px #ffffff24,0 6px 16px #00000014}#bm-t .bm-z[data-id="-2"] .bm-a{background:conic-gradient(#a00,#aa0 16.6%,#0a0,#0aa 50%,#00a 66.6%,#a0a,#a00)}#bm-t .bm-z[data-id="-1"] .bm-a{background:url('data:image/svg+xml;utf8,') repeat;background-color:transparent!important}#bm-t .bm-z[data-id="-1"] .bm-a svg{color:#fff!important}#bm-t .bm-z[data-id="0"] .bm-a{background-color:transparent!important}#bm-t .bm-a button{display:inline-flex;align-items:center;justify-content:center;padding:.24em;min-width:2.05rem;min-height:2.05rem;border-radius:999px;line-height:1}#bm-t .bm-a .bm-1K{width:1.55rem;height:1.55rem;filter:drop-shadow(0 1px 0 rgba(255,255,255,.18))}#bm-t:not(.bm-N) .bm-a{display:none}#bm-t:not(.bm-N) .bm-a button{min-width:3rem;min-height:3rem;padding:0;color:currentColor!important;pointer-events:none}#bm-t:not(.bm-N) .bm-a .bm-1K{width:2.75rem;height:2.75rem;filter:none;transform:translateY(.08rem)}#bm-t .bm-z>.bm-x{flex-direction:column;align-items:flex-start;gap:.02rem}#bm-t .bm-z h2{margin:.04rem 0 0}#bm-t:not(.bm-N) .bm-z h2{display:block;max-width:100%;margin:.08rem 0 0;color:currentColor;font-size:1.02rem;letter-spacing:0;line-height:1.12;overflow-wrap:anywhere}#bm-t .bm-z .bm-6{margin:.1rem 0 0}#bm-t .bm-z small{font-size:.75em}#bm-t:not(.bm-N) .bm-z small{color:currentColor;letter-spacing:0;opacity:.82}#bm-t .bm-z.bm-I{display:none}#bm-t.bm-N{--bm-H-max-height: 100%;display:grid;grid-template-rows:auto minmax(0,1fr);width:360px;height:min(60vh,22rem);min-width:360px;min-height:180px;max-width:min(1000px,calc(100vw - 16px))!important;max-height:min(1400px,calc(100vh - 16px))!important;overflow:hidden;box-sizing:border-box;position:fixed;transition:background .32s ease,border-color .22s ease,box-shadow .22s ease,transform 0s}#bm-t.bm-N .bm-m{display:grid;grid-template-rows:auto auto auto auto minmax(0,1fr);grid-row:2;min-height:0;min-width:0;overflow:hidden}#bm-t.bm-N .bm-1Q{gap:.16rem;flex-wrap:nowrap;width:100%;padding:.12rem}#bm-t.bm-N .bm-1Q>button{flex:1 1 0;min-width:0}#bm-t.bm-N #bm-E{flex-direction:column;align-items:stretch;gap:.16rem;width:100%;align-self:stretch;min-width:0;box-sizing:border-box}#bm-t.bm-N .bm-z{width:100%;max-width:none;align-self:stretch;flex:1 1 auto;min-width:0;margin:0;padding:.12rem;border-radius:11px;box-sizing:border-box}#bm-t.bm-N .bm-z>.bm-x{width:100%;min-width:0;flex:1 1 auto}#bm-t.bm-N .bm-L.bm-H{display:block;grid-row:5;min-height:0;min-width:0;height:100%;width:100%;max-height:100%!important;overflow:auto;box-sizing:border-box}#bm-t.bm-N .bm-1_{position:absolute;right:4px;bottom:4px;display:flex;width:20px;height:20px;align-items:flex-end;justify-content:flex-end;padding-right:4px;padding-bottom:4px;box-sizing:border-box;z-index:5;cursor:nwse-resize;pointer-events:auto;opacity:.78;touch-action:none;user-select:none;color:#ffffffdb;background:linear-gradient(135deg,#ffffff24,#538dff24);border:1px solid rgba(255,255,255,.12);border-radius:8px;box-shadow:inset 0 1px #ffffff14}#bm-t.bm-N .bm-1_:hover,#bm-t.bm-N .bm-1_.bm-2s{opacity:1;border-color:#92ddff5c;box-shadow:inset 0 1px #ffffff1a,0 8px 16px #00000029}#bm-t.bm-N .bm-a{display:flex;width:100%;min-width:0;flex:1 1 auto;gap:.5ch;align-items:center;padding:.1rem .2rem;border:none;border-radius:8px;box-sizing:border-box}#bm-t.bm-N .bm-a button{padding:.2em;flex:0 0 auto}#bm-t.bm-N .bm-a .bm-1K{width:1.36rem;height:1.36rem}#bm-t.bm-N .bm-z h2{font-size:.78rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#bm-t #bm-2{display:inline-flex;align-items:center;padding:.08rem .24rem;border-radius:999px;background:#ffffff1f;box-shadow:inset 0 1px #ffffff14;font-size:1em}@media (max-width: 980px){#bm-t:not(.bm-N){width:min(100vw - .35rem,50rem);max-width:min(100vw - .35rem,50rem)!important}#bm-t .bm-1E{grid-template-columns:repeat(3,minmax(0,1fr))}#bm-t .bm-1a{grid-column:span 2}}@media (max-width: 620px){#bm-t .bm-1E{grid-template-columns:1fr}#bm-t .bm-1a{grid-column:auto}#bm-t:not(.bm-N) .bm-z{width:100%;max-width:none;grid-template-columns:1fr}#bm-t:not(.bm-N) .bm-z-meta,#bm-t:not(.bm-N) .bm-z-progress{align-items:flex-start;text-align:left}}#bm-F{width:min(25.5rem,calc(100vw - .65rem));max-width:min(25.5rem,calc(100vw - .65rem))!important}#bm-F .bm-m{display:flex;flex-direction:column}#bm-F .bm-2p,#bm-F .bm-2l{position:relative;overflow:hidden;border-radius:14px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(150deg,#ffffff2e,#ffffff14);box-shadow:inset 0 1px #fff3,0 10px 24px #0000001a}#bm-F .bm-2p:before,#bm-F .bm-2l:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at top right,rgba(255,255,255,.2),transparent 26%),radial-gradient(circle at 20% 0%,rgba(186,246,255,.16),transparent 24%)}#bm-F .bm-2p{display:flex;align-items:center;gap:.5rem;padding:.48rem .58rem}#bm-F .bm-2p h1{margin:0}#bm-F .bm-2k{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.24rem}#bm-F .bm-1V{min-width:0;min-height:2.55rem;display:flex;align-items:flex-start;padding:.34rem .45rem;border-radius:11px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(160deg,#ffffff2e,#ffffff12);box-shadow:inset 0 1px #ffffff29;color:#12233ff5;line-height:1.22}#bm-F .bm-1V>span,#bm-F .bm-1V>time{min-width:0}#bm-F .bm-1k,#bm-F .bm-1l{flex-direction:column;justify-content:center;gap:.08rem}#bm-F .bm-1N{display:inline-block;font-size:1.3em;color:#0f1f38f5;white-space:normal;overflow-wrap:anywhere}#bm-F .bm-1N b{font-size:1em}#bm-F .bm-1M{color:#314769d1;font-size:.62rem;letter-spacing:.08em;font-family:var(--bm-font-display);text-transform:uppercase}#bm-F .bm-1V time{white-space:nowrap;font-family:var(--bm-font-mono);letter-spacing:.06em}#bm-F .bm-2l{padding:.48rem}#bm-F .bm-2e{display:grid;grid-template-columns:auto repeat(4,minmax(0,1fr));gap:.22rem;align-items:center}#bm-F .bm-2e .bm-J{width:1.8rem;height:1.8rem}#bm-F .bm-2e .bm-C{width:100%;margin-left:0;text-align:center}#bm-F .bm-2f,#bm-F .bm-2g{margin-top:.24rem}#bm-F .bm-2f>div{width:100%}#bm-F .bm-29{gap:.24rem;margin-top:.3rem}#bm-F .bm-29>button{flex:1 1 0}#bm-F .bm-2g textarea{min-height:4.1rem}@media (max-width: 720px){#bm-F{width:min(100vw - .45rem,25.5rem);max-width:min(100vw - .45rem,25.5rem)!important}#bm-F .bm-2k{grid-template-columns:1fr}#bm-F .bm-2e{grid-template-columns:repeat(2,minmax(0,1fr))}#bm-F .bm-2e .bm-J{grid-column:1 / -1;width:100%;aspect-ratio:auto;height:1.8rem}#bm-F .bm-29{flex-direction:column}}#bm-l div:has(>.bm-3){width:fit-content;justify-content:flex-start}#bm-l .bm-3{display:flex;flex-direction:column;width:13%}#bm-l .bm-3 span{width:fit-content;margin:auto;font-size:.7em}#bm-l .bm-3 button{width:fit-content;padding:0;border-radius:0}#bm-l .bm-3 svg{stroke:#333;stroke-width:.02px;width:100%;min-width:1.5ch;max-width:14.5ch}#bm-l .bm-3 button:hover svg,#bm-l .bm-3 button:focus svg{opacity:.9}#bm-l .bm-n{display:grid;grid-template-columns:1fr 1fr 1fr;width:25%;min-width:3ch;max-width:15ch}#bm-l .bm-n>button{width:100%;padding:0;aspect-ratio:1 / 1;background-color:#fff;border:#333 1px solid;border-radius:0;box-sizing:border-box}#bm-l .bm-n>button[data-status=Incorrect]{background-color:brown}#bm-l .bm-n>button[data-status=Template]{background-color:#2f4f4f}#bm-l .bm-n>button:hover,#bm-l .bm-n>button:focus{opacity:.8}#bm-B{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start}#bm-B>.bm-L{width:100%;justify-content:flex-start;background-color:#153063e6;border-radius:1em;padding:.5em;transition:background-color .3s ease}#bm-B>.bm-L:hover,#bm-B>.bm-L:focus-within{background-color:#112855e6}#bm-B .bm-1{height:100%;font-size:xxx-large}#bm-B .bm-0{flex-direction:column;align-items:flex-start;gap:0} -/* Build Hash: f329f0c6cd6a */ +/* Build Hash: b5e6e3ebdaaf */ diff --git a/dist/BlueMarble.user.js b/dist/BlueMarble.user.js index 5cda73c..9f572fb 100644 --- a/dist/BlueMarble.user.js +++ b/dist/BlueMarble.user.js @@ -39,6 +39,6 @@ The "Blue Marble" image is owned by NASA. */ -(()=>{var t=t=>{throw TypeError(t)},e=(e,i,s)=>i.has(e)?t("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(e):i.set(e,s),i=(e,i,s)=>(((e,i)=>{i.has(e)||t("Cannot access private method")})(e,i),s);function s(t){return new Promise(e=>setTimeout(e,t))}function n(t){return(new Intl.NumberFormat).format(t)}function o(t){return new Intl.NumberFormat(void 0,{style:"percent",t:2,i:2}).format(t)}function a(t){return t.toLocaleString(void 0,{o:"long",l:"numeric",h:"2-digit",m:"2-digit",u:"2-digit"})}function r(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}function l(...t){(0,console.log)(...t)}function h(...t){(0,console.error)(...t)}function c(...t){(0,console.warn)(...t)}function m(t,e){if(0===t)return e[0];let i="";const s=e.length;for(;t>0;)i=e[t%s]+i,t=Math.floor(t/s);return i}function d(t,e){let i=0;const s=e.length;for(const n of t){const t=e.indexOf(n);-1==t&&h(`Invalid character '${n}' encountered whilst decoding! Is the decode alphabet/base incorrect?`),i=i*s+t}return i}function u(t){let e="";for(let i=0;i(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4));return.2126*e[0]+.7152*e[1]+.0722*e[2]}function f(t,e,i){return Array.isArray(t)&&([t,e,i]=t),(1<<24|t<<16|e<<8|i).toString(16).slice(1)}var g,w,x,y=[{id:0,premium:!1,name:"Transparent",rgb:[0,0,0]},{id:1,premium:!1,name:"Black",rgb:[0,0,0]},{id:2,premium:!1,name:"Dark Gray",rgb:[60,60,60]},{id:3,premium:!1,name:"Gray",rgb:[120,120,120]},{id:4,premium:!1,name:"Light Gray",rgb:[210,210,210]},{id:5,premium:!1,name:"White",rgb:[255,255,255]},{id:6,premium:!1,name:"Deep Red",rgb:[96,0,24]},{id:7,premium:!1,name:"Red",rgb:[237,28,36]},{id:8,premium:!1,name:"Orange",rgb:[255,127,39]},{id:9,premium:!1,name:"Gold",rgb:[246,170,9]},{id:10,premium:!1,name:"Yellow",rgb:[249,221,59]},{id:11,premium:!1,name:"Light Yellow",rgb:[255,250,188]},{id:12,premium:!1,name:"Dark Green",rgb:[14,185,104]},{id:13,premium:!1,name:"Green",rgb:[19,230,123]},{id:14,premium:!1,name:"Light Green",rgb:[135,255,94]},{id:15,premium:!1,name:"Dark Teal",rgb:[12,129,110]},{id:16,premium:!1,name:"Teal",rgb:[16,174,166]},{id:17,premium:!1,name:"Light Teal",rgb:[19,225,190]},{id:18,premium:!1,name:"Dark Blue",rgb:[40,80,158]},{id:19,premium:!1,name:"Blue",rgb:[64,147,228]},{id:20,premium:!1,name:"Cyan",rgb:[96,247,242]},{id:21,premium:!1,name:"Indigo",rgb:[107,80,246]},{id:22,premium:!1,name:"Light Indigo",rgb:[153,177,251]},{id:23,premium:!1,name:"Dark Purple",rgb:[120,12,153]},{id:24,premium:!1,name:"Purple",rgb:[170,56,185]},{id:25,premium:!1,name:"Light Purple",rgb:[224,159,249]},{id:26,premium:!1,name:"Dark Pink",rgb:[203,0,122]},{id:27,premium:!1,name:"Pink",rgb:[236,31,128]},{id:28,premium:!1,name:"Light Pink",rgb:[243,141,169]},{id:29,premium:!1,name:"Dark Brown",rgb:[104,70,52]},{id:30,premium:!1,name:"Brown",rgb:[149,104,42]},{id:31,premium:!1,name:"Beige",rgb:[248,178,119]},{id:32,premium:!0,name:"Medium Gray",rgb:[170,170,170]},{id:33,premium:!0,name:"Dark Red",rgb:[165,14,30]},{id:34,premium:!0,name:"Light Red",rgb:[250,128,114]},{id:35,premium:!0,name:"Dark Orange",rgb:[228,92,26]},{id:36,premium:!0,name:"Light Tan",rgb:[214,181,148]},{id:37,premium:!0,name:"Dark Goldenrod",rgb:[156,132,49]},{id:38,premium:!0,name:"Goldenrod",rgb:[197,173,49]},{id:39,premium:!0,name:"Light Goldenrod",rgb:[232,212,95]},{id:40,premium:!0,name:"Dark Olive",rgb:[74,107,58]},{id:41,premium:!0,name:"Olive",rgb:[90,148,74]},{id:42,premium:!0,name:"Light Olive",rgb:[132,197,115]},{id:43,premium:!0,name:"Dark Cyan",rgb:[15,121,159]},{id:44,premium:!0,name:"Light Cyan",rgb:[187,250,242]},{id:45,premium:!0,name:"Light Blue",rgb:[125,199,255]},{id:46,premium:!0,name:"Dark Indigo",rgb:[77,49,184]},{id:47,premium:!0,name:"Dark Slate Blue",rgb:[74,66,132]},{id:48,premium:!0,name:"Slate Blue",rgb:[122,113,196]},{id:49,premium:!0,name:"Light Slate Blue",rgb:[181,174,241]},{id:50,premium:!0,name:"Light Brown",rgb:[219,164,99]},{id:51,premium:!0,name:"Dark Beige",rgb:[209,128,81]},{id:52,premium:!0,name:"Light Beige",rgb:[255,197,165]},{id:53,premium:!0,name:"Dark Peach",rgb:[155,82,73]},{id:54,premium:!0,name:"Peach",rgb:[209,128,120]},{id:55,premium:!0,name:"Light Peach",rgb:[250,182,164]},{id:56,premium:!0,name:"Dark Tan",rgb:[123,99,82]},{id:57,premium:!0,name:"Tan",rgb:[156,132,107]},{id:58,premium:!0,name:"Dark Slate",rgb:[51,57,65]},{id:59,premium:!0,name:"Slate",rgb:[109,117,141]},{id:60,premium:!0,name:"Light Slate",rgb:[179,185,209]},{id:61,premium:!0,name:"Dark Stone",rgb:[109,100,63]},{id:62,premium:!0,name:"Stone",rgb:[148,140,107]},{id:63,premium:!0,name:"Light Stone",rgb:[205,197,158]}],$='',v=class{constructor(t,i){e(this,g),this.name=t,this.version=i,this.p=null,this.$=null,this.v="bm-r",this.M=null,this.C=null,this.T=[]}S(t){this.p=t}k(t){this.$=t}N(){return this.T.length>0&&(this.C=this.T.pop()),this}D(t){t?.appendChild(this.M),this.M=null,this.C=null,this.T=[]}L(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"div",{},t)),this}H(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"p",{},t)),this}O(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"small",{},t)),this}I(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"span",{},t)),this}B(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"details",{},t)),this}P(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"summary",{},t)),this}A(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"img",{},t)),this}F(t,e={},s=()=>{}){return s(this,i(this,g,w).call(this,"h"+t,{},e)),this}W(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"hr",{},t)),this}U(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"br",{},t)),this}V(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"form",{},t)),this}G(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"fieldset",{},t)),this}R(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"legend",{},t)),this}j(t={},e=()=>{}){const s={};t.textContent?(s.textContent=t.textContent,delete t.textContent):t.innerHTML&&(s.innerHTML=t.innerHTML,delete t.textContent);const n=i(this,g,w).call(this,"label",s),o=i(this,g,w).call(this,"input",{type:"checkbox"},t);return n.insertBefore(o,n.firstChild),this.N(),e(this,n,o),this}Y(t={},e=()=>{}){const s=i(this,g,w).call(this,"label",{textContent:t.textContent??"",for:t.id??""});return delete t.textContent,this.N(),e(this,s,i(this,g,w).call(this,"select",{},t)),this}J(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"option",{},t)),this}X(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"ol",{},t)),this}_(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"ul",{},t)),this}q(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"menu",{},t)),this}Z(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"li",{},t)),this}K(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"table",{},t)),this}tt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"caption",{},t)),this}et(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"thead",{},t)),this}it(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"tbody",{},t)),this}st(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"tfoot",{},t)),this}nt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"tr",{},t)),this}ot(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"th",{},t)),this}rt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"td",{},t)),this}lt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"button",{},t)),this}ht(t={},e=()=>{}){const s=t.title??t.textContent??"Help: No info";delete t.textContent,t.title=`Help: ${s}`;const n={textContent:"?",className:"bm-10",onclick:()=>{this.ct(this.v,s)}};return e(this,i(this,g,w).call(this,"button",n,t)),this}dt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"input",{},t)),this}ut(t={},e=()=>{}){const s=t.textContent??"";delete t.textContent;const n=i(this,g,w).call(this,"div"),o=i(this,g,w).call(this,"input",{type:"file",tabindex:"-1","aria-hidden":"true"},t);this.N();const a=i(this,g,w).call(this,"button",{textContent:s});return this.N(),this.N(),a.addEventListener("click",()=>{o.click()}),o.addEventListener("change",()=>{a.style.maxWidth=`${a.offsetWidth}px`,o.files.length>0?a.textContent=o.files[0].name:a.textContent=s}),e(this,n,o,a),this}bt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"textarea",{},t)),this}ft(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"div",{class:"bm-S"},t)),this}gt(t=Date.now(),e=500,s={},n=()=>{}){const o="bm--",a=s?.id||o+"-"+crypto.randomUUID().slice(0,8),r={class:o},l=i(this,g,w).call(this,"time",r,s);return l.id=a,l.dataset.endDate=t,setInterval(()=>{if(!l.isConnected)return;const t=Math.max(l.dataset.endDate-Date.now(),0),e=Math.floor(t/1e3),i=Math.floor(e/3600),s=Math.floor(e%60),n=Math.floor(e%3600/60);l.setAttribute("datetime",`PT${i}H${n}M${s}S`),l.textContent=String(i).padStart(2,"0")+":"+String(n).padStart(2,"0")+":"+String(s).padStart(2,"0")},e),n(this,l),this}ct(t,e,i=!1){const s=document.getElementById(t.replace(/^#/,""));s&&(s instanceof HTMLInputElement?s.value=e:i?s.textContent=e:s.innerHTML=e)}wt(t){if(t.disabled)return;t.disabled=!0,t.style.textDecoration="none";const e=t.closest(".bm-W"),i=t.closest(".bm-S"),s=e?.querySelector("h1"),n=e?.querySelector(".bm-m");if(!e||!i||!n)return t.disabled=!1,void(t.style.textDecoration="");const o=e=>{let i,s=!1;const o=()=>{s||(s=!0,clearTimeout(i),n.removeEventListener("transitionend",a),e(),t.disabled=!1,t.style.textDecoration="")},a=t=>{t.target==n&&"height"==t.propertyName&&o()};n.addEventListener("transitionend",a),i=setTimeout(o,360)};if(e.parentElement.append(e),"expanded"==t.dataset.buttonStatus){e.dataset.widthBeforeMinimize=e.style.width,e.dataset.heightBeforeMinimize=e.style.height,e.dataset.minHeightBeforeMinimize=e.style.minHeight,n.style.height=n.scrollHeight+"px",n.offsetHeight,e.style.width||(e.style.width=e.scrollWidth+"px"),o(()=>{n.style.display="none"}),n.style.height="0",(e.style.height||e.classList.contains("bm-N"))&&(e.style.minHeight="0px",e.style.height=(()=>{const t=getComputedStyle(e),s=t=>parseFloat(t)||0,n="border-box"==t.boxSizing?s(t.paddingTop)+s(t.paddingBottom)+s(t.borderTopWidth)+s(t.borderBottomWidth):0;return Math.ceil(i.getBoundingClientRect().height+n+2)})()+"px");const a=s?.cloneNode(!0)??document.createElement("h1"),r=a.textContent;t.nextElementSibling.appendChild(a),t.innerHTML='',t.dataset.buttonStatus="collapsed",t.ariaLabel=`Unminimize window "${r}"`}else{const s=i.querySelector("h1"),a=s.textContent;s.remove(),n.style.display="",n.style.height="0",e.style.width=e.dataset.widthBeforeMinimize??"",e.style.minHeight=e.dataset.minHeightBeforeMinimize??"",e.style.height=e.dataset.heightBeforeMinimize??"",n.offsetHeight,o(()=>{n.style.height="",delete e.dataset.widthBeforeMinimize,delete e.dataset.heightBeforeMinimize,delete e.dataset.minHeightBeforeMinimize}),n.style.height=n.scrollHeight+"px",t.innerHTML=$,t.dataset.buttonStatus="expanded",t.ariaLabel=`Minimize window "${a}"`}}xt(t,e,i={}){const s=document.querySelector(t),n=document.querySelector(e),o=i?.yt??(()=>{});if(!s||!n)return void this.$t(`Can not drag! ${s?"":"moveMe"} ${s||n?"":"and "}${n?"":"iMoveThings "}was not found!`);let a,r=!1,l=0,h=null,c=0,m=0,d=0,u=0,b=null;const p=()=>{if(r){const t=Math.abs(c-d),e=Math.abs(m-u);(t>.5||e>.5)&&(c=d,m=u,s.style.transform=`translate(${c}px, ${m}px)`,s.style.left="0px",s.style.top="0px",s.style.right=""),h=requestAnimationFrame(p)}},f=(t,e)=>{r=!0,b=s.getBoundingClientRect(),a=t-b.left,l=e-b.top;const i=window.getComputedStyle(s).transform;if(i&&"none"!==i){const t=new DOMMatrix(i);c=t.m41,m=t.m42}else c=b.left,m=b.top;d=c,u=m,document.body.style.userSelect="none",n.classList.add("bm-M"),document.addEventListener("mousemove",w),document.addEventListener("touchmove",x,{passive:!1}),document.addEventListener("mouseup",g),document.addEventListener("touchend",g),document.addEventListener("touchcancel",g),h&&cancelAnimationFrame(h),p()},g=()=>{r=!1,h&&(cancelAnimationFrame(h),h=null),document.body.style.userSelect="",n.classList.remove("bm-M"),document.removeEventListener("mousemove",w),document.removeEventListener("touchmove",x),document.removeEventListener("mouseup",g),document.removeEventListener("touchend",g),document.removeEventListener("touchcancel",g),o({element:s,x:c,y:m}),b=null},w=t=>{r&&b&&(d=t.clientX-a,u=t.clientY-l)},x=t=>{if(r&&b){const e=t.touches[0];if(!e)return;d=e.clientX-a,u=e.clientY-l,t.preventDefault()}};n.addEventListener("mousedown",function(t){t.preventDefault(),f(t.clientX,t.clientY)}),n.addEventListener("touchstart",function(t){const e=t?.touches?.[0];e&&(f(e.clientX,e.clientY),t.preventDefault())},{passive:!1})}vt(t,e,i={}){const s=document.querySelector(t),n=document.querySelector(e),o=i?.yt??(()=>{});if(!s||!n)return void this.$t(`Can not resize! ${s?"":"resizeMe"} ${s||n?"":"and "}${n?"":"iResizeThings "}was not found!`);let a=!1,r=0,l=0,h=0,c=0,m=0,d=0,u=0,b=0,p=null;const f=()=>Number.isFinite(i?.maxWidth)?i.maxWidth:window.innerWidth-16,g=()=>Number.isFinite(i?.maxHeight)?i.maxHeight:window.innerHeight-16,w=Number.isFinite(i?.minWidth)?i.minWidth:200,x=Number.isFinite(i?.minHeight)?i.minHeight:160,y=(t,e,i)=>Math.min(Math.max(t,e),Math.max(e,i)),$=()=>{if(a){const t=Math.abs(m-u),e=Math.abs(d-b);(t>.5||e>.5)&&(m=u,d=b,s.style.width=`${m}px`,s.style.height=`${d}px`),p=requestAnimationFrame($)}},v=(t,e)=>{a=!0,r=t,l=e,h=s.offsetWidth,c=s.offsetHeight,m=h,d=c,u=h,b=c,document.body.style.userSelect="none",n.classList.add("bm-2h"),document.addEventListener("mousemove",C),document.addEventListener("touchmove",T,{passive:!1}),document.addEventListener("mouseup",M),document.addEventListener("touchend",M),document.addEventListener("touchcancel",M),p&&cancelAnimationFrame(p),$()},M=()=>{a=!1,p&&(cancelAnimationFrame(p),p=null),document.body.style.userSelect="",n.classList.remove("bm-2h"),document.removeEventListener("mousemove",C),document.removeEventListener("touchmove",T),document.removeEventListener("mouseup",M),document.removeEventListener("touchend",M),document.removeEventListener("touchcancel",M),o({element:s,width:m,height:d})},C=t=>{a&&(u=y(h+(t.clientX-r),w,f()),b=y(c+(t.clientY-l),x,g()))},T=t=>{if(!a)return;const e=t?.touches?.[0];e&&(u=y(h+(e.clientX-r),w,f()),b=y(c+(e.clientY-l),x,g()),t.preventDefault())};n.addEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),v(t.clientX,t.clientY)}),n.addEventListener("touchstart",t=>{const e=t?.touches?.[0];e&&(t.preventDefault(),t.stopPropagation(),v(e.clientX,e.clientY))},{passive:!1})}Mt(t){(0,console.info)(`${this.name}: ${t}`),this.ct(this.v,"Status: "+t,!0)}$t(t){(0,console.error)(`${this.name}: ${t}`),this.ct(this.v,"Error: "+t,!0)}};g=new WeakSet,w=function(t,e={},s={}){const n=document.createElement(t);this.M?(this.C?.appendChild(n),this.T.push(this.C),this.C=n):(this.M=n,this.C=n);for(const[t,s]of Object.entries(e))i(this,g,x).call(this,n,t,s);for(const[t,e]of Object.entries(s))i(this,g,x).call(this,n,t,e);return n},x=function(t,e,i){"class"==e?t.classList.add(...i.split(/\s+/)):"for"==e?t.htmlFor=i:"tabindex"==e?t.tabIndex=Number(i):"readonly"==e?t.readOnly="true"==i||"1"==i:"maxlength"==e?t.maxLength=Number(i):e.startsWith("data")?t.dataset[e.slice(5).split("-").map((t,e)=>0==e?t:t[0].toUpperCase()+t.slice(1)).join("")]=i:e.startsWith("aria")?t.setAttribute(e,i):t[e]=i};var M,C,T,S,k,N,D,L,H,O,I,B,P,A=class extends v{constructor(t,i){super(t,i),e(this,M),this.window=null,this.Ct="bm-l",this.Tt=document.body,this.St="windowSettings"}kt(){document.querySelector(`#${this.Ct}`)?i(this,M,T).call(this):(this.window=this.L({id:this.Ct,class:"bm-W"}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Settings"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>t.wt(e),e.ontouchend=()=>{e.click()}}).N().L().N().L({class:"bm-D"}).lt({class:"bm-s",innerHTML:'',"aria-label":'Close window "Settings"'},(t,e)=>{e.onclick=()=>i(this,M,T).call(this),e.ontouchend=()=>{e.click()}}).N().N().N().L({class:"bm-m"}).L({class:"bm-L bm-h"}).F(1,{textContent:"Settings"}).N().N().W().N().H({textContent:"Settings take 5 seconds to save."}).N().L({class:"bm-L bm-H"},(t,e)=>{this.Nt(),this.Dt()}).N().N().N().D(this.Tt),i(this,M,D).call(this))}Nt(){i(this,M,L).call(this,"Pixel Highlight")}Dt(){i(this,M,L).call(this,"Template")}};M=new WeakSet,C=function(){var t,e;return this.Lt?((t=this.Lt)[e=this.St]??(t[e]={}),this.Lt[this.St]):null},T=function(){const t=document.querySelector(`#${this.Ct}`);i(this,M,N).call(this,t),t?.remove()},S=function(t,e,i){const s=Math.max(8,window.innerWidth-t.offsetWidth-8),n=Math.max(8,window.innerHeight-t.offsetHeight-8);return{x:Math.min(Math.max(Math.round(Number(e)||8),8),s),y:Math.min(Math.max(Math.round(Number(i)||8),8),n)}},k=function(t){const e=i(this,M,C).call(this);e&&t&&requestAnimationFrame(()=>{if(!t.isConnected)return;const s=Number(e.x),n=Number(e.y);if(!Number.isFinite(s)||!Number.isFinite(n))return;const o=i(this,M,S).call(this,t,s,n);t.style.left="0px",t.style.top="0px",t.style.right="",t.style.transform=`translate(${o.x}px, ${o.y}px)`,o.x==s&&o.y==n||(e.x=o.x,e.y=o.y,this.Ht?.())})},N=function(t){const e=i(this,M,C).call(this);if(!e||!t?.isConnected)return;const s=t.getBoundingClientRect(),n=i(this,M,S).call(this,t,s.left,s.top);t.style.left="0px",t.style.top="0px",t.style.right="",t.style.transform=`translate(${n.x}px, ${n.y}px)`,e.x=n.x,e.y=n.y,this.Ht?.()},D=function(){const t=document.querySelector(`#${this.Ct}.bm-W`);t&&(i(this,M,k).call(this,t),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`,{yt:({element:t})=>i(this,M,N).call(this,t)}))},L=function(t){this.window=this.L({class:"bm-L"}).F(2,{textContent:t}).N().W().N().H({innerHTML:`An error occured loading the ${t} category. SettingsManager failed to override the ${t} function inside WindowSettings.`}).N().N()},H=new WeakSet,O=function(t,e){t.disabled=!0;const i=t.dataset.status,s=this.Lt?.highlight??[[1,0,1],[2,0,0],[1,-1,0],[1,1,0],[1,0,-1]];let n=[2,0,0];const o=s;switch(i){case"Disabled":t.dataset.status="Incorrect",t.ariaLabel="Sub-pixel incorrect",n=[1,...e];break;case"Incorrect":t.dataset.status="Template",t.ariaLabel="Sub-pixel template",n=[2,...e];break;case"Template":t.dataset.status="Disabled",t.ariaLabel="Sub-pixel disabled",n=[0,...e];break}const a=s.findIndex(([,t,e])=>t==n[1]&&e==n[2]);0!=n[0]?-1!=a?o[a]=n:o.push(n):-1!=a&&o.splice(a,1),this.Lt.highlight=o,t.disabled=!1},I=async function(t){const e=document.querySelectorAll(".bm-3 button");for(const t of e)t.disabled=!0;let i=[0,0,0,0,2,0,0,0,0];switch(t){case"Cross":i=[0,1,0,1,2,1,0,1,0];break;case"X":i=[1,0,1,0,2,0,1,0,1];break;case"Full":i=[2,2,2,2,2,2,2,2,2];break}const n=document.querySelector(".bm-n")?.childNodes??[];for(let t=0;t{const[s,n,o,a]=e.split(",").map(Number);(n>>24==0?0:n.get(e)??-2;const a=o.get(s);o.set(s,a?a+1:1)}return console.log(o),o};var F=class{constructor(){this.qt=Math.ceil(80/1300*window.innerWidth),this.Zt=y.slice(1)}Kt(t){const e=document.createElement("div");for(let t=0;t{t.parentNode.childElementCount<=1?t.parentNode.remove():t.remove()},e.appendChild(t)}t.appendChild(e)}},W=class extends HTMLElement{};customElements.define("confetti-piece",W);var U,V,G,R,j,E,Y,J,X,_,q,Z,K,Q,tt,et,it,st,nt,ot,at,rt,lt,ht,ct,mt,dt,ut,bt='',pt='',ft=class extends v{constructor(t){super(t.name,t.version),e(this,U),this.window=null,this.Ct="bm-t",this.Qt="bm-E",this.Tt=document.body,this.$=t.$??null,this.te="ftr-oWin",this.St="windowFilter",this.ee=null,this.ie=null,this.se=null,this.ne=null,this.oe=1e4,this.ae=360,this.re=220,this.le=1e3,this.he=1400,this.ce=t.p?.ce,this.me='',this.de='';const{palette:i,_t:s}=this.ce.ue;this.palette=i,this.be=0,this.pe=0,this.fe=new Map,this.ge=new Map,this.we=0,this.xe=0,this.timeRemaining=0,this.ye="",this.sortPrimary="total",this.sortSecondary="descending",this.showUnused=!1}$e(){i(this,U,G).call(this)?this.ve():this.kt()}kt(){if(document.querySelector(`#${this.Ct}`))return void i(this,U,E).call(this);this.window=this.L({id:this.Ct,class:"bm-W"},(t,e)=>{}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Color Filter"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>t.wt(e),e.ontouchend=()=>{e.click()}}).N().L().N().L({class:"bm-D"}).lt({class:"bm-s",innerHTML:pt,"aria-label":'Switch to windowed mode for "Color Filter"'},(t,e)=>{e.onclick=()=>{i(this,U,R).call(this,!0),i(this,U,E).call(this),this.ve()},e.ontouchend=()=>{e.click()}}).N().lt({class:"bm-s",innerHTML:bt,"aria-label":'Close window "Color Filter"'},(t,e)=>{e.onclick=()=>i(this,U,E).call(this),e.ontouchend=()=>{e.click()}}).N().N().N().L({class:"bm-m"}).L({class:"bm-L bm-h bm-1O"}).F(1,{textContent:"Color Filter"}).N().N().W().N().L({class:"bm-L bm-x bm-h bm-1G",style:"gap: 1.5ch;"}).lt({class:"bm-1v",textContent:"Hide All Colors"},(t,e)=>{e.onclick=()=>i(this,U,st).call(this,!1)}).N().lt({class:"bm-1v",textContent:"Show All Colors"},(t,e)=>{e.onclick=()=>i(this,U,st).call(this,!0)}).N().N().W().N().L({class:"bm-L bm-H bm-1s"}).L({class:"bm-L bm-1B",style:"margin-left: 2.5ch; margin-right: 2.5ch;"}).L({class:"bm-L bm-1t"}).I({id:"bm-i",innerHTML:"Tiles Loaded: 0 / ???"}).N().U().N().I({id:"bm-d",innerHTML:"Correct Pixels: ???"}).N().U().N().I({id:"bm-j",innerHTML:"Total Pixels: ???"}).N().U().N().I({id:"bm-7",innerHTML:"Complete: ??? (???)"}).N().U().N().I({id:"bm-8",innerHTML:"??? ???"}).N().N().L({class:"bm-L bm-21"}).H({innerHTML:`Press the ${pt.replace("{e.onclick=t=>{t.preventDefault();const e=new FormData(document.querySelector(`#${this.Ct} form`)),s={};for(const[t,i]of e)s[t]=i;console.log(`Primary: ${s.sortPrimary}; Secondary: ${s.sortSecondary}; Unused: ${"on"==s.showUnused}`),i(this,U,it).call(this,s.sortPrimary,s.sortSecondary,"on"==s.showUnused)}}).N().N().N().N().N().N().N().D(this.Tt),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`);const t=document.querySelector(`#${this.Ct} .bm-L.bm-H`);i(this,U,et).call(this,t),i(this,U,j).call(this),i(this,U,it).call(this,this.sortPrimary,this.sortSecondary,this.showUnused),this.ct("#bm-i",`Tiles Loaded: ${n(this.be)} / ${n(this.pe)}`),this.ct("#bm-d",`Correct Pixels: ${n(this.we)}`),this.ct("#bm-j",`Total Pixels: ${n(this.xe)}`),this.ct("#bm-7",`Remaining: ${n((this.xe||0)-(this.we||0))} (${o(((this.xe||0)-(this.we||0))/(this.xe||1))})`),this.ct("#bm-8",`Completed at: `),i(this,U,Y).call(this)}ve(){if(document.querySelector(`#${this.Ct}`))return void i(this,U,E).call(this);this.window=this.L({id:this.Ct,class:"bm-W bm-N",style:`width: 360px; height: min(70vh, 32rem); min-width: ${this.ae}px; min-height: ${this.re}px; max-width: min(${this.le}px, calc(100vw - 16px)); max-height: min(${this.he}px, calc(100vh - 16px));`}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Color Filter"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>{const i=document.querySelector("#bm-2");i&&(i.style.display="expanded"==e.dataset.buttonStatus?"none":""),t.wt(e)},e.ontouchend=()=>{e.click()}}).N().L().I({id:"bm-2",class:"bm-y",style:"font-weight: 700;"}).N().N().L({class:"bm-D"}).lt({class:"bm-s",innerHTML:'',"aria-label":'Switch to fullscreen mode for "Color Filter"'},(t,e)=>{e.onclick=()=>{i(this,U,R).call(this,!1),i(this,U,E).call(this),this.kt()},e.ontouchend=()=>{e.click()}}).N().lt({class:"bm-s",innerHTML:bt,"aria-label":'Close window "Color Filter"'},(t,e)=>{e.onclick=()=>i(this,U,E).call(this),e.ontouchend=()=>{e.click()}}).N().N().N().L({class:"bm-m"}).L({class:"bm-L bm-h bm-1O"}).F(1,{textContent:"Color Filter"}).N().N().W().N().L({class:"bm-L bm-x bm-h bm-1G",style:"gap: 1.5ch;"}).lt({class:"bm-1v",textContent:"None"},(t,e)=>{e.onclick=()=>i(this,U,st).call(this,!1)}).N().lt({class:"bm-1v",textContent:"All"},(t,e)=>{e.onclick=()=>i(this,U,st).call(this,!0)}).N().N().W().N().L({class:"bm-L bm-H bm-1s"}).N().N().L({class:"bm-1P",title:"Resize Color Filter window","aria-label":"Resize Color Filter window",role:"presentation",textContent:"◢",style:"position: absolute; right: 0; bottom: 0; width: 28px; height: 28px; display: flex; align-items: flex-end; justify-content: flex-end; padding-right: 4px; padding-bottom: 4px; box-sizing: border-box; z-index: 5; cursor: nwse-resize; pointer-events: auto; touch-action: none; user-select: none; font-size: 8px; line-height: 1; color: rgba(255,255,255,0.95); background: transparent; border: none; box-shadow: none;"}).N().N().D(this.Tt),i(this,U,tt).call(this);const t=document.querySelector(`#${this.Ct} .bm-L.bm-H`);i(this,U,et).call(this,t),i(this,U,j).call(this),i(this,U,it).call(this,this.sortPrimary,this.sortSecondary,this.showUnused),i(this,U,Y).call(this)}Me(){i(this,U,rt).call(this);const t=document.querySelector(`#${this.Qt}`),e={};for(const t of this.palette){const i=this.fe.get(t.id)??0,s=n(i);let a=0,r="0",l=o(1);0!=i&&(a=this.ge.get(t.id)??"???","number"!=typeof a&&this.be==this.pe&&t.id&&(a=0),r="string"==typeof a?a:n(a),l=isNaN(a/i)?"???":o(a/i));const h=parseInt(i)-parseInt(a);e[t.id]={Ce:i,Te:s,Se:a,ke:r,Ne:l,De:h}}if(document.querySelector("#bm-2")){const t=this.we.toString().length>7?this.we.toString().slice(0,2)+"…"+this.we.toString().slice(-3):this.we.toString(),e=this.xe.toString().length>7?this.xe.toString().slice(0,2)+"…"+this.xe.toString().slice(-3):this.xe.toString();this.ct("#bm-2",`${t}/${e}`,!0)}if(this.ct("#bm-i",`Tiles Loaded: ${n(this.be)} / ${n(this.pe)}`),this.ct("#bm-d",`Correct Pixels: ${n(this.we)}`),this.ct("#bm-j",`Total Pixels: ${n(this.xe)}`),this.ct("#bm-7",`Remaining: ${n((this.xe||0)-(this.we||0))} (${o(((this.xe||0)-(this.we||0))/(this.xe||1))})`),this.ct("#bm-8",`Completed at: `),!t)return e;const s=Array.from(t.children);for(const t of s){const i=parseInt(t.dataset.id),{Se:s,ke:n,Ne:o,Ce:a,Te:r,De:l}=e[i];t.dataset.correct=Number.isNaN(parseInt(s))?"0":s,t.dataset.total=a,t.dataset.percent="%"==o.slice(-1)?o.slice(0,-1):"0",t.dataset.incorrect=l||0;const h=document.querySelector(`#${this.Ct} .bm-z[data-id="${i}"] .bm-9`);h&&(h.textContent=`${n} / ${r}`);const c=document.querySelector(`#${this.Ct} .bm-z[data-id="${i}"] .bm-6`);c&&(c.textContent=`${"number"!=typeof l||isNaN(l)?"???":l} incorrect pixel${1==l?"":"s"}. Completed: ${o}`)}i(this,U,it).call(this,this.sortPrimary,this.sortSecondary,this.showUnused)}};U=new WeakSet,V=function(){var t,e;return this.$?((t=this.$.Lt)[e=this.St]??(t[e]={}),this.$.Lt[this.St]):null},G=function(){const t=i(this,U,V).call(this);return"windowed"==t?.mode||"fullscreen"!=t?.mode},R=function(t){const e=i(this,U,V).call(this);e&&(e.mode=t?"windowed":"fullscreen"),this.$&&(this.$.Le(this.te,t),this.$.Ht())},j=function(){const t=document.querySelector(`#${this.Ct} #bm-c`),e=document.querySelector(`#${this.Ct} #bm-5`),i=document.querySelector(`#${this.Ct} #bm-e`);t instanceof HTMLSelectElement&&(t.value=this.sortPrimary),e instanceof HTMLSelectElement&&(e.value=this.sortSecondary),i instanceof HTMLInputElement&&(i.checked=this.showUnused)},E=function(){const t=document.querySelector(`#${this.Ct}`);t?.classList.contains("bm-N")&&i(this,U,K).call(this,t),i(this,U,J).call(this),i(this,U,X).call(this),t?.remove()},Y=function(){i(this,U,J).call(this),this.ne=setInterval(()=>{document.querySelector(`#${this.Ct}`)?this.Me():i(this,U,J).call(this)},this.oe)},J=function(){this.ne&&(clearInterval(this.ne),this.ne=null)},X=function(){this.ee&&(this.ee.disconnect(),this.ee=null),this.ie&&(window.removeEventListener("resize",this.ie),this.ie=null),this.se&&(clearTimeout(this.se),this.se=null)},_=function(t,e,i){const s=Math.max(e,i);return Math.min(Math.max(Math.round(Number(t)||e),e),s)},q=function(t,e,i){const s=Math.max(8,window.innerWidth-t.offsetWidth-8),n=Math.max(8,window.innerHeight-t.offsetHeight-8);return{x:Math.min(Math.max(Math.round(Number(e)||8),8),s),y:Math.min(Math.max(Math.round(Number(i)||8),8),n)}},Z=function(t){const e=i(this,U,V).call(this);if(!e||!t)return;const s=Number(e.width),n=Number(e.height),o=Number.isFinite(s),a=Number.isFinite(n);o&&(e.width=i(this,U,_).call(this,s,this.ae,Math.min(this.le,window.innerWidth-16)),t.style.width=`${e.width}px`),a&&(e.height=i(this,U,_).call(this,n,this.re,Math.min(this.he,window.innerHeight-16)),t.style.height=`${e.height}px`),requestAnimationFrame(()=>{if(!t.isConnected)return;const s=Number(e.x),n=Number(e.y);if(!Number.isFinite(s)||!Number.isFinite(n))return;const o=i(this,U,q).call(this,t,s,n);t.style.left="0px",t.style.top="0px",t.style.right="",t.style.transform=`translate(${o.x}px, ${o.y}px)`,o.x==s&&o.y==n||(e.x=o.x,e.y=o.y,this.$?.Ht())})},K=function(t){const e=i(this,U,V).call(this);if(!e||!t?.isConnected||!t.classList.contains("bm-N"))return;if(t.querySelector('.bm-S button[data-button-status="collapsed"]'))return;const s=t.getBoundingClientRect(),n=i(this,U,_).call(this,s.width,this.ae,Math.min(this.le,window.innerWidth-16)),o=i(this,U,_).call(this,s.height,this.re,Math.min(this.he,window.innerHeight-16));Math.round(s.width)!=n&&(t.style.width=`${n}px`),Math.round(s.height)!=o&&(t.style.height=`${o}px`);const a=i(this,U,q).call(this,t,s.left,s.top);t.style.left="0px",t.style.top="0px",t.style.right="",t.style.transform=`translate(${a.x}px, ${a.y}px)`,e.x=a.x,e.y=a.y,e.width=n,e.height=o,this.$?.Ht()},Q=function(t,e=150){this.se&&clearTimeout(this.se),this.se=setTimeout(()=>{this.se=null,i(this,U,K).call(this,t)},e)},tt=function(){const t=document.querySelector(`#${this.Ct}.bm-W`);t&&(i(this,U,X).call(this),i(this,U,Z).call(this,t),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`,{yt:({element:t})=>i(this,U,K).call(this,t)}),this.vt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-1P`,{minWidth:this.ae,minHeight:this.re,maxWidth:Math.min(this.le,window.innerWidth-16),maxHeight:Math.min(this.he,window.innerHeight-16),yt:({element:t})=>i(this,U,K).call(this,t)}),"function"==typeof ResizeObserver&&(this.ee=new ResizeObserver(()=>i(this,U,Q).call(this,t)),this.ee.observe(t)),this.ie=()=>i(this,U,Q).call(this,t,0),window.addEventListener("resize",this.ie))},et=function(t){const e=t.closest(`#${this.Ct}`)?.classList.contains("bm-N");console.log(`Is Windowed Mode: ${e}`);const s=new v(this.name,this.version);s.L({id:this.Qt});const n=this.Me();for(const t of this.palette){const o="#"+f(t.rgb).toUpperCase(),a=p(t.rgb);let r=1.05/(a+.05)>(a+.05)/.05?"white":"black";t.id||(r="transparent");const l="white"==r?"bm-f":"bm-g",{Se:h,ke:c,Ne:m,Ce:d,Te:u,De:b}=n[t.id],g=!!this.ce.He.get(t.id);if(e){const e=`background-size: auto 100%; background-repeat: repeat-x; background-image: url("data:image/svg+xml;utf8,");`;s.L({class:"bm-L bm-z bm-x","data-id":t.id,"data-name":t.name,"data-premium":+t.premium,"data-correct":Number.isNaN(parseInt(h))?"0":h,"data-total":d,"data-percent":"%"==m.slice(-1)?m.slice(0,-1):"0","data-incorrect":b||0},(e,s)=>i(this,U,at).call(this,s,t)).L({class:"bm-a",style:`background-color: rgb(${t.rgb?.map(t=>Number(t)||0).join(",")});${t.premium?e:""}`}).lt({class:"bm-A "+l,"data-state":g?"hidden":"shown","aria-label":g?`Show the color ${t.name||""} on templates.`:`Hide the color ${t.name||""} on templates.`,innerHTML:g?this.de:this.me,style:`color: ${r};`},(e,s)=>{s.onclick=e=>{e.stopPropagation(),i(this,U,ot).call(this,s,t)},t.id||(s.disabled=!0),i(this,U,nt).call(this,s,t)}).N().O({textContent:`#${t.id.toString().padStart(2,0)}`,style:`color: ${-1==t.id||0==t.id?"white":r}`}).N().F(2,{textContent:t.name,style:`color: ${-1==t.id||0==t.id?"white":r}`}).N().O({class:"bm-9",textContent:`${c} / ${u}`,style:`color: ${-1==t.id||0==t.id?"white":r}; flex: 1 1 auto; text-align: right;`}).N().N().N()}else s.L({class:"bm-L bm-z bm-x","data-id":t.id,"data-name":t.name,"data-premium":+t.premium,"data-correct":Number.isNaN(parseInt(h))?"0":h,"data-total":d,"data-percent":"%"==m.slice(-1)?m.slice(0,-1):"0","data-incorrect":b||0},(e,s)=>i(this,U,at).call(this,s,t)).L({class:"bm-D",style:"flex-direction: column;"}).L({class:"bm-a",style:`background-color: rgb(${t.rgb?.map(t=>Number(t)||0).join(",")});`}).lt({class:"bm-A "+l,"data-state":g?"hidden":"shown","aria-label":g?`Show the color ${t.name||""} on templates.`:`Hide the color ${t.name||""} on templates.`,innerHTML:g?this.de:this.me,style:`color: ${r};`},(e,s)=>{s.onclick=e=>{e.stopPropagation(),i(this,U,ot).call(this,s,t)},t.id||(s.disabled=!0),i(this,U,nt).call(this,s,t)}).N().N().O({textContent:-2==t.id?"???????":o}).N().N().L({class:"bm-x"}).F(2,{textContent:(t.premium?"★ ":"")+t.name}).N().L({class:"bm-x",style:"gap: 1.5ch;"}).O({textContent:`#${t.id.toString().padStart(2,0)}`}).N().O({class:"bm-9",textContent:`${c} / ${u}`}).N().N().H({class:"bm-6",textContent:`${"number"!=typeof b||isNaN(b)?"???":b} incorrect pixel${1==b?"":"s"}. Completed: ${m}`}).N().N().N()}s.D(t)},it=function(t,e,i){this.sortPrimary=t,this.sortSecondary=e,this.showUnused=i;const s=document.querySelector(`#${this.Qt}`),n=Array.from(s.children);n.sort((s,n)=>{const o=s.getAttribute("data-"+t),a=n.getAttribute("data-"+t),r=parseFloat(o),l=parseFloat(a),h=!isNaN(r),c=!isNaN(l);if(i?s.classList.remove("bm-I"):Number(s.getAttribute("data-total"))||s.classList.add("bm-I"),h&&c)return"ascending"===e?r-l:l-r;{const t=o.toLowerCase(),i=a.toLowerCase();return ti?"ascending"===e?1:-1:0}}),n.forEach(t=>s.appendChild(t))},st=function(t){const e=document.querySelector(`#${this.Qt}`),i=Array.from(e.children);for(const e of i){if(e.classList?.contains("bm-I"))continue;const i=e.querySelector(".bm-a button");("hidden"!=i.dataset.state||t)&&("shown"==i.dataset.state&&t||i.click())}},nt=function(t,e){const i="hidden"==t.dataset.state?`Show the color ${e.name||""} on templates.`:`Hide the color ${e.name||""} on templates.`;t.ariaLabel=i,t.closest(".bm-z")?.setAttribute("aria-label",i)},ot=function(t,e){t&&!t.disabled&&e.id&&(t.style.textDecoration="none",t.disabled=!0,"shown"==t.dataset.state?(t.innerHTML=this.de,t.dataset.state="hidden",this.ce.Oe(e.id,!0)):(t.innerHTML=this.me,t.dataset.state="shown",this.ce.Oe(e.id,!1)),i(this,U,nt).call(this,t,e),t.disabled=!1,t.style.textDecoration="")},at=function(t,e){t&&e.id&&(t.classList.add("bm-z-toggle"),t.tabIndex=0,t.setAttribute("role","button"),t.onclick=s=>{if(s.target instanceof Element&&s.target.closest("button, a, input, select, textarea"))return;const n=t.querySelector(".bm-a button");i(this,U,ot).call(this,n,e)},t.onkeydown=e=>{"Enter"!=e.key&&" "!=e.key||(e.preventDefault(),t.click())})},rt=function(){this.be=0,this.pe=0,this.xe=0,this.we=0,this.ge=new Map,this.fe=new Map;for(const t of this.ce.Ie){const e=t.zt?.total??0;this.xe+=e??0;const i=t.zt?.colors??new Map;for(const[t,e]of i){const i=Number(e)||0,s=this.fe.get(t)??0;this.fe.set(t,s+i)}const s=t.zt?.correct??{};this.be+=Object.keys(s).length,this.pe+=Object.keys(t.Bt).length;for(const t of Object.values(s))for(const[e,i]of t){const t=Number(i)||0;this.we+=t;const s=this.ge.get(e)??0;this.ge.set(e,s+t)}}console.log(`Tiles loaded: ${this.be} / ${this.pe}`),this.we>=this.xe&&this.xe&&this.be==this.pe&&(new F).Kt(document.querySelector(`#${this.Ct}`)),this.timeRemaining=new Date(30*(this.xe-this.we)*1e3+Date.now()),this.ye=a(this.timeRemaining)},lt=new WeakSet,ht=async function(t,e,i){i.preventDefault();const s=await async function(t){let e="";return t&&(e=t.clipboardData.getData("text/plain")),0!=e.length||(await navigator.clipboard.readText().then(t=>{e=t}).catch(t=>{l("Failed to retrieve clipboard data using navigator! Using fallback methods...")}),0!=e.length||(e=window.clipboardData?.getData("Text"))),e}(i),n=s.split(/[^a-zA-Z0-9]+/).filter(t=>t).map(Number).filter(t=>!isNaN(t));2==n.length&&"bm-O"==e.id?(t.ct("bm-O",n?.[0]||""),t.ct("bm-P",n?.[1]||"")):1==n.length?t.ct(e.id,n?.[0]||""):(t.ct("bm-Q",n?.[0]||""),t.ct("bm-R",n?.[1]||""),t.ct("bm-O",n?.[2]||""),t.ct("bm-P",n?.[3]||""))};var gt=class extends v{constructor(t,i,s,n=void 0){super(t,i),e(this,ct),this.window=null,this.Ct="bm-u",this.Tt=document.body,this.Be=JSON.parse(GM_getValue("bmTemplates","{}")),this.scriptVersion=this.Be?.scriptVersion,this.schemaVersion=this.Be?.schemaVersion,this.Pe=void 0,this.Ae=s,this.ce=n}kt(){if(document.querySelector(`#${this.Ct}`))return void document.querySelector(`#${this.Ct}`).remove();let t="";document.querySelector("#bm-F")||(t=t.concat("z-index: 9001;").trim()),this.window=this.L({id:this.Ct,class:"bm-W",style:t},(t,e)=>{}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Template Wizard"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>t.wt(e),e.ontouchend=()=>{e.click()}}).N().L().N().lt({class:"bm-s",textContent:"✖","aria-label":'Close window "Template Wizard"'},(t,e)=>{e.onclick=()=>{document.querySelector(`#${this.Ct}`)?.remove()},e.ontouchend=()=>{e.click()}}).N().N().L({class:"bm-m"}).L({class:"bm-L bm-h"}).F(1,{textContent:"Template Wizard"}).N().N().W().N().L({class:"bm-L"}).F(2,{textContent:"Status"}).N().H({id:"bm-v",textContent:"Loading template storage status..."}).N().N().L({class:"bm-L bm-H"}).F(2,{textContent:"Detected templates:"}).N().N().N().N().D(this.Tt),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`),i(this,ct,mt).call(this),i(this,ct,dt).call(this)}};ct=new WeakSet,mt=function(){const t=this.schemaVersion.split(/[-\.\+]/),e=this.Ae.split(/[-\.\+]/);let s="";t[0]==e[0]?t[1]==e[1]?(s='Template storage health: Healthy!
No futher action required. (Reason: Semantic version matches)',this.Pe="Good"):(s='Template storage health: Poor!
You can still use your template, but some features may not work. It is recommended that you update Blue Marble\'s template storage. (Reason: MINOR version mismatch)',this.Pe="Poor"):t[0]Bad!
It is guaranteed that some features are broken. You might still be able to use the template. It is HIGHLY recommended that you download all templates and update Blue Marble\'s template storage before continuing. (Reason: MAJOR version mismatch)',this.Pe="Bad"):(s='Template storage health: Dead!
Blue Marble can not load the template storage. (Reason: MAJOR version unknown)',this.Pe="Dead");const n=`
If you want to continue using your current templates, then make sure the template storage (schema) is up-to-date.
If you don't want to update the template storage, then downgrade Blue Marble to version ${r(this.scriptVersion)} to continue using your templates.
Alternatively, if you don't care about corrupting the templates listed below, you can fix any issues with the template storage by uploading a new template.`,o=function(){const t=[...document.querySelectorAll("body > div > .hidden")].filter(t=>/version:/i.test(t.textContent));if(t[0]){const e=t[0].textContent?.match(/\d+/);return e?new Date(Number(e[0])):void 0}}();let l=o?a(o):"???";this.ct("#bm-v",`${s}
Your templates were created during Blue Marble version ${r(this.scriptVersion)} with schema version ${r(this.schemaVersion)}.
The current Blue Marble version is ${r(this.version)} and requires schema version ${r(this.Ae)}.
Wplace was last updated on ${l}.${"Good"!=this.Pe?n:""}`);const h=new v(this.name,this.version);"Dead"!=this.Pe&&(h.L({class:"bm-L bm-D bm-h",style:"gap: 1.5ch;"}),h.lt({textContent:"Download all templates"},(t,e)=>{e.onclick=()=>{e.disabled=!0,this.ce.ze().then(()=>{e.disabled=!1})}}).N()),"Poor"!=this.Pe&&"Bad"!=this.Pe||h.lt({textContent:`Update template storage to ${this.Ae}`},(t,e)=>{e.onclick=()=>{e.disabled=!0,i(this,ct,ut).call(this,!0)}}).N(),h.N().D(document.querySelector("#bm-v").parentNode)},dt=function(){const t=this.Be?.templates;if(Object.keys(t).length>0){const e=document.querySelector(`#${this.Ct} .bm-H`),i=new v(this.name,this.version);i.L({id:"bm-B",class:"bm-L"});for(const e in t){const s=e,o=t[e];if(t.hasOwnProperty(e)){const t=s.split(" "),e=Number(t?.[0]),a=d(t?.[1]||"0",this.ce.Fe),r=o.name||`Template ${e||""}`,l=o?.coords?.split(",").map(Number),h=o.pixels?.total??void 0,c=void 0,m="number"==typeof e?n(e):"???",u="number"==typeof a?n(a):"???",b="number"==typeof h?n(h):"???";i.L({class:"bm-L bm-D"}).L({class:"bm-D",style:"flex-direction: column; gap: 0;"}).L({class:"bm-1",textContent:c||"🖼️"}).N().O({textContent:`#${m}`}).N().N().L({class:"bm-D bm-0"}).F(3,{textContent:r}).N().I({textContent:`Uploaded by user #${u}`}).N().I({textContent:`Coordinates: ${l.join(", ")}`}).N().I({textContent:`Total Pixels: ${b}`}).N().N().N()}}i.N().D(e)}},ut=async function(t){if(t){const t=document.querySelector(`#${this.Ct} .bm-m`);t.innerHTML="",new v(this.name,this.version).L({class:"bm-L"}).L({class:"bm-L bm-h"}).F(1,{textContent:"Template Wizard"}).N().N().W().N().L({class:"bm-L"}).F(2,{textContent:"Status"}).N().H({textContent:"Updating template storage. Please wait..."}).N().N().N().D(t)}GM_deleteValue("bmCoords");const e=this.Be?.templates;if(Object.keys(e).length>0)for(const[t,i]of Object.entries(e))if(e.hasOwnProperty(t)){const t=new z({displayName:i.name,Bt:i.tiles});t.Xt();const e=await this.ce.We(t);await this.ce.Ue(e,t.displayName,t.coords)}t&&(console.log("Restarting Template Wizard..."),document.querySelector(`#${this.Ct}`).remove(),new gt(this.name,this.version,this.Ae,this.ce).kt())};var wt,xt,yt,$t,vt,Mt,Ct,Tt,St=gt;wt=new WeakSet,xt=function(){const t=this.$?.Lt?.filter,e=Array.isArray(t)?t:[];this.He.clear();for(const t of e){const e=Number(t);Number.isFinite(e)&&this.He.set(e,!0)}},yt=function(){this.$&&(this.$.Lt.filter=Array.from(this.He.keys()).map(t=>Number(t)).filter(t=>Number.isFinite(t)).sort((t,e)=>t-e),this.$.Ht())},$t=async function(){GM.setValue("bmTemplates",JSON.stringify(this.Ve))},vt=async function(t){console.log("Parsing BlueMarble...");const e=t.templates;console.log(`BlueMarble length: ${Object.keys(e).length}`);const i=t?.schemaVersion,s=i.split(/[-\.\+]/),n=this.schemaVersion.split(/[-\.\+]/),o=t?.scriptVersion;console.log(`BlueMarble Template Schema: ${i}; Script Version: ${o}`),s[0]==n[0]?(s[1]!=n[1]&&new St(this.name,this.version,this.schemaVersion,this).kt(),this.Ie=await async function({At:t,Ge:i,Ie:s}){if(Object.keys(e).length>0)for(const n in e){const o=n,a=e[n];if(console.log(`Template Key: ${o}`),e.hasOwnProperty(n)){const e=o.split(" "),n=Number(e?.[0]),r=e?.[1]||"0",l=a.name||`Template ${n||""}`,h={total:a.pixels?.total,colors:new Map(Object.entries(a.pixels?.colors||{}).map(([t,e])=>[Number(t),e]))},c=a.tiles,m={},d={},u=t*i;for(const t in c)if(console.log(t),c.hasOwnProperty(t)){const e=b(c[t]),i=new Blob([e],{type:"image/png"}),s=await createImageBitmap(i);m[t]=s;const n=new OffscreenCanvas(u,u).getContext("2d");n.drawImage(s,0,0);const o=n.getImageData(0,0,s.width,s.height);d[t]=new Uint32Array(o.data.buffer)}const p=new z({displayName:l,Ot:n||this.Ie?.length||0,It:r||""});p.zt=h,p.Bt=m,p.Pt=d,s.push(p),console.log(this.Ie),console.log("^^^ This ^^^")}}return s}({At:this.At,Ge:this.Ge,Ie:this.Ie})):s[0]>>24&255,y=g>>>24&255,$=b.get(w)??-2,v=b.get(g)??-2;if(this.He.get($)&&(e[i*h+c]=g),-1==$){const t=536870912;this.He.get($)?e[i*h+c]=0:(u/o&1)==(f/o&1)?(e[i*h+c]=t,e[(i-1)*h+(c-1)]=t,e[(i-1)*h+(c+1)]=t,e[(i+1)*h+(c-1)]=t,e[(i+1)*h+(c+1)]=t):(e[i*h+c]=0,e[(i-1)*h+c]=t,e[(i+1)*h+c]=t,e[i*h+(c-1)]=t,e[i*h+(c+1)]=t)}if(!n&&x>m&&v!=$&&(d||y>m)){const t=e[i*h+c];for(const n of s){const[s,o,a]=n,r=0!=s?1!=s?t:4278190335:0;e[(i+a)*h+(c+o)]=r}}if(-1==$&&g<=m){const t=p.get($);p.set($,t?t+1:1);continue}if(x<=m||y<=m)continue;if(v!=$)continue;const M=p.get($);p.set($,M?M+1:1)}return console.log("List of template pixels that match the tile:"),console.log(p),{qe:p,Ze:e}},Ct=new WeakSet,Tt=function(t){const e=JSON.parse(GM_getValue("bmUserSettings","{}"));e.telemetry=t,GM.setValue("bmUserSettings",JSON.stringify(e))};var kt=GM_info.script.name.toString(),Nt=GM_info.script.version.toString();!function(t){const e=document.createElement("script");e.setAttribute("bm-11",kt),e.setAttribute("bm-X","color: cornflowerblue;"),e.textContent=`(${t})();`,document.documentElement?.appendChild(e),e.remove()}(()=>{const t=document.currentScript,e=t?.getAttribute("bm-11")||"Blue Marble",i=t?.getAttribute("bm-X")||"",s=new Map;window.addEventListener("message",t=>{const{source:n,endpoint:o,blobID:a,blobData:r,blink:l}=t.data,h=Date.now()-l;if(console.groupCollapsed(`%c${e}%c: ${s.size} Recieved IMAGE message about blob "${a}"`,i,""),console.log(`Blob fetch took %c${String(Math.floor(h/6e4)).padStart(2,"0")}:${String(Math.floor(h/1e3)%60).padStart(2,"0")}.${String(h%1e3).padStart(3,"0")}%c MM:SS.mmm`,i,""),console.log(s),console.groupEnd(),"blue-marble"==n&&a&&r&&!o){const t=s.get(a);"function"==typeof t?t(r):c(`%c${e}%c: Attempted to retrieve a blob (%s) from queue, but the blobID was not a function! Skipping...`,i,"",a),s.delete(a)}});const n=window.fetch;window.fetch=async function(...t){const o=await n.apply(this,t),a=o.clone(),r=(t[0]instanceof Request?t[0]?.url:t[0])||"ignore",l=a.headers.get("content-type")||"";if(l.includes("application/json"))console.log(`%c${e}%c: Sending JSON message about endpoint "${r}"`,i,""),a.json().then(t=>{const s=r?.split("?")[0].split("/").filter(t=>t&&isNaN(Number(t))).filter(t=>t&&!t.includes(".")).pop();if("me"==s)try{sessionStorage.setItem("bm-2n",JSON.stringify(t))}catch(t){console.warn(`%c${e}%c: Failed to cache "/me" payload`,i,"",t)}window.postMessage({source:"blue-marble",endpoint:r,jsonData:t},"*")}).catch(t=>{console.error(`%c${e}%c: Failed to parse JSON: `,i,"",t)});else if(l.includes("image/")&&!r.includes("openfreemap")&&!r.includes("maps")){const t=Date.now(),n=await a.blob();return console.log(`%c${e}%c: ${s.size} Sending IMAGE message about endpoint "${r}"`,i,""),new Promise(o=>{const l=crypto.randomUUID();s.set(l,t=>{o(new Response(t,{headers:a.headers,status:a.status,statusText:a.statusText})),console.log(`%c${e}%c: ${s.size} Processed blob "${l}"`,i,"")}),window.postMessage({source:"blue-marble",endpoint:r,blobID:l,blobData:n,blink:t})}).catch(n=>{const o=Date.now();console.error(`%c${e}%c: Failed to Promise blob!`,i,""),console.groupCollapsed(`%c${e}%c: Details of failed blob Promise:`,i,""),console.log(`Endpoint: ${r}\nThere are ${s.size} blobs processing...\nBlink: ${t.toLocaleString()}\nTime Since Blink: ${String(Math.floor(o/6e4)).padStart(2,"0")}:${String(Math.floor(o/1e3)%60).padStart(2,"0")}.${String(o%1e3).padStart(3,"0")} MM:SS.mmm`),console.error("Exception stack:",n),console.groupEnd()})}return o}});var Dt=GM_getResourceText("CSS-BM-File");function Lt(t){const e=document.createElement("link");e.href=t,e.rel="preload",e.as="style",e.onload=function(){this.onload=null,this.rel="stylesheet"},document.head?.appendChild(e)}GM_addStyle(Dt);var Ht="robotoMonoInjectionPoint";Lt("https://fonts.googleapis.com/css2?family=Michroma&family=Rajdhani:wght@400;500;600;700&display=swap"),Ht.indexOf("@font-face")+1?(console.log("Loading Roboto Mono as a file..."),GM_addStyle(Ht)):Lt("https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap");var Ot=JSON.parse(GM_getValue("bmUserSettings","{}")),It=(new class{constructor(){this.Ke=null,this.Qe=null,this.ti="#bm-p"}ei(t){return this.Qe=t,this.Ke=new MutationObserver(t=>{for(const e of t)for(const t of e.addedNodes)t instanceof HTMLElement&&t.matches?.(this.ti)}),this}ii(){return this.Ke}observe(t,e=!1,i=!1){t.observe(this.Qe,{childList:e,subtree:i})}},new class extends v{constructor(t,i){super(t,i),e(this,lt),this.window=null,this.Ct="bm-F",this.Tt=document.body}kt(){document.querySelector(`#${this.Ct}`)?this.$t("Main window already exists!"):(this.window=this.L({id:this.Ct,class:"bm-W bm-N",style:"top: 10px; left: unset; right: 75px;"},(t,e)=>{}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Blue Marble"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>t.wt(e),e.ontouchend=()=>{e.click()}}).N().L().N().L({class:"bm-D"}).lt({class:"bm-s",innerHTML:'',title:"Settings","aria-label":"Open settings"},(t,e)=>{e.onclick=()=>{t.$.kt()}}).N().N().N().L({class:"bm-m"}).W().N().L({class:"bm-L bm-2e"}).A({class:"bm-T",src:"https://raw.githubusercontent.com/SwingTheVine/Wplace-BlueMarble/main/dist/assets/Favicon.png"},(t,e)=>{const i=new Date;204==Math.floor((i.getTime()-new Date(i.getFullYear(),0,1))/864e5)+1&&(e.parentNode.style.position="relative",e.parentNode.innerHTML=e.parentNode.innerHTML+'',e.onload=()=>{(new F).Kt(document.querySelector(`#${this.Ct}`))})}).N().F(1,{textContent:this.name}).N().N().W().N().L({class:"bm-L bm-29"}).L({class:"bm-1J bm-1h"}).I({class:"bm-1C",textContent:"Droplets"}).N().I({id:"bm-w",class:"bm-1D",textContent:"0"}).N().N().L({class:"bm-1J bm-1h"}).I({class:"bm-1C",textContent:"Next Level"}).N().I({id:"bm-q",class:"bm-1D",textContent:"0 px"}).N().N().L({class:"bm-1J bm-1i"}).I({class:"bm-1C",textContent:"Charges"}).N().gt(Date.now(),1e3,{class:"bm-1D",style:"font-weight: 700;"},(t,e)=>{t.p.si=e.id}).N().N().N().W().N().L({class:"bm-L bm-2a"}).L({class:"bm-L bm-23"}).lt({class:"bm-s bm-J",style:"margin-top: 0;",innerHTML:''},(t,e)=>{e.onclick=()=>{const e=t.p?.ni;e?.[0]?(t.ct("bm-Q",e?.[0]||""),t.ct("bm-R",e?.[1]||""),t.ct("bm-O",e?.[2]||""),t.ct("bm-P",e?.[3]||"")):t.$t("Coordinates are malformed! Did you try clicking on the canvas first?")}}).N().dt({type:"number",id:"bm-Q",class:"bm-C",placeholder:"Tl X",min:0,max:2047,step:1,required:!0},(t,e)=>{e.addEventListener("paste",s=>i(this,lt,ht).call(this,t,e,s))}).N().dt({type:"number",id:"bm-R",class:"bm-C",placeholder:"Tl Y",min:0,max:2047,step:1,required:!0},(t,e)=>{e.addEventListener("paste",s=>i(this,lt,ht).call(this,t,e,s))}).N().dt({type:"number",id:"bm-O",class:"bm-C",placeholder:"Px X",min:0,max:2047,step:1,required:!0},(t,e)=>{e.addEventListener("paste",s=>i(this,lt,ht).call(this,t,e,s))}).N().dt({type:"number",id:"bm-P",class:"bm-C",placeholder:"Px Y",min:0,max:2047,step:1,required:!0},(t,e)=>{e.addEventListener("paste",s=>i(this,lt,ht).call(this,t,e,s))}).N().N().L({class:"bm-L bm-24"}).ut({class:"bm-K",textContent:"Upload Template",accept:"image/png, image/jpeg, image/webp, image/bmp, image/gif"}).N().N().L({class:"bm-L bm-x bm-1Z"}).lt({class:"bm-1v",textContent:"Disable","data-button-status":"shown"},(t,e)=>{e.onclick=()=>{e.disabled=!0,"shown"==e.dataset.buttonStatus?(t.p?.ce?.oi(!1),e.dataset.buttonStatus="hidden",e.textContent="Enable",t.Mt("Disabled templates!")):(t.p?.ce?.oi(!0),e.dataset.buttonStatus="shown",e.textContent="Disable",t.Mt("Enabled templates!")),e.disabled=!1}}).N().lt({class:"bm-1H",textContent:"Create"},(t,e)=>{e.onclick=()=>{const e=document.querySelector(`#${this.Ct} .bm-K`),i=document.querySelector("#bm-Q");if(!i.checkValidity())return i.reportValidity(),void t.$t("Coordinates are malformed! Did you try clicking on the canvas first?");const s=document.querySelector("#bm-R");if(!s.checkValidity())return s.reportValidity(),void t.$t("Coordinates are malformed! Did you try clicking on the canvas first?");const n=document.querySelector("#bm-O");if(!n.checkValidity())return n.reportValidity(),void t.$t("Coordinates are malformed! Did you try clicking on the canvas first?");const o=document.querySelector("#bm-P");if(!o.checkValidity())return o.reportValidity(),void t.$t("Coordinates are malformed! Did you try clicking on the canvas first?");e?.files[0]?(t?.p?.ce.Ue(e.files[0],e.files[0]?.name.replace(/\.[^/.]+$/,""),[Number(i.value),Number(s.value),Number(n.value),Number(o.value)]),t.Mt("Drew to canvas!")):t.$t("No file selected!")}}).N().lt({class:"bm-1v",textContent:"Filter"},(t,e)=>{e.onclick=()=>this.ai()}).N().N().L({class:"bm-L bm-25"}).bt({id:this.v,placeholder:`Status: Sleeping...\nVersion: ${this.version}`,readOnly:!0}).N().N().N().N().N().D(this.Tt),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`))}ai(){new ft(this).$e()}}(kt,Nt)),Bt=new class{constructor(t,i){e(this,wt),this.name=t,this.version=i,this.Re=null,this.$=null,this.schemaVersion="2.0.0",this.ri=null,this.Fe="!#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~",this.At=1e3,this.Ge=3,this._e=3,this.ue=function(t){const e=y;e.unshift({id:-1,premium:!1,name:"Erased",rgb:[222,250,206]}),e.unshift({id:-2,premium:!1,name:"Other",rgb:[0,0,0]});const i=new Map;for(const s of e){if(0==s.id||-2==s.id)continue;const e=s.rgb[0],n=s.rgb[1],o=s.rgb[2];for(let a=-t;a<=t;a++)for(let r=-t;r<=t;r++)for(let l=-t;l<=t;l++){const t=e+a,h=n+r,c=o+l;if(t<0||t>255||h<0||h>255||c<0||c>255)continue;const m=(255<<24|c<<16|h<<8|t)>>>0;i.has(m)||i.set(m,s.id)}}return{palette:e,_t:i}}(this._e),this.Ee=null,this.li="",this.Ie=[],this.Ve=null,this.hi=!0,this.ci=null,this.He=new Map}mi(t){this.Re=t}k(t){this.$=t,i(this,wt,xt).call(this)}Oe(t,e){const s=Number(t);Number.isFinite(s)&&(e?this.He.set(s,!0):this.He.delete(s),i(this,wt,yt).call(this))}async di(){return{whoami:this.name.replace(" ",""),scriptVersion:this.version,schemaVersion:this.schemaVersion,templates:{}}}async Ue(t,e,s){this.Ve||(this.Ve=await this.di(),console.log("Creating JSON...")),this.Re.Mt(`Creating template at ${s.join(", ")}...`);const n=new z({displayName:e,Ot:0,It:m(this.ri||0,this.Fe),file:t,coords:s}),o=!this.$?.Lt?.flags?.includes("hl-noSkip"),a=this.$?.Lt?.flags?.includes("hl-agSkip");console.log(`Should Skip: ${o}; Should Agg Skip: ${a}`);const{Yt:r,Jt:l}=await n.Ut(this.At,this.ue,o,a);n.Bt=r;const h={total:n.zt.total,colors:Object.fromEntries(n.zt.colors)};this.Ve.templates[`${n.Ot} ${n.It}`]={name:n.displayName,coords:s.join(", "),enabled:!0,pixels:h,tiles:l},this.Ie=[],this.Ie.push(n),this.Re.Mt(`Template created at ${s.join(", ")}!`),console.log(Object.keys(this.Ve.templates).length),console.log(this.Ve),console.log(this.Ie),console.log(JSON.stringify(this.Ve)),await i(this,wt,$t).call(this)}ui(){}async bi(){this.Ve||(this.Ve=await this.di(),console.log("Creating JSON..."))}async pi(){l("Downloading all templates..."),console.log(this.Ie);for(const t of this.Ie)await this.fi(t),await s(500)}async ze(){const t=JSON.parse(GM_getValue("bmTemplates","{}"))?.templates;if(console.log(t),Object.keys(t).length>0)for(const[e,i]of Object.entries(t))t.hasOwnProperty(e)&&(await this.fi(new z({displayName:i.name,Ot:e.split(" ")?.[0],It:e.split(" ")?.[1],Bt:i.tiles})),await s(500))}async fi(t){t.Xt();const e=`${t.coords.join("-")}_${t.displayName.replaceAll(" ","-")}`,i=await this.We(t);await GM.download({url:URL.createObjectURL(i),name:e+".png",gi:"uniquify",onload:()=>{l(`Download of template '${e}' complete!`)},onerror:(t,i)=>{h(`Download of template '${e}' failed because ${t}! Details: ${i}`)},ontimeout:()=>{c(`Download of template '${e}' has timed out!`)}})}async We(t){console.log(t);const e=t.Bt,i=Object.keys(e).sort(),s=await Promise.all(i.map(t=>{return i=e[t],new Promise((t,e)=>{const s=new Image;s.onload=()=>t(s),s.onerror=e,s.src="data:image/png;base64,"+i});var i}));let n=1/0,o=1/0,a=0,r=0;i.forEach((t,e)=>{const[i,l,h,c]=t.split(",").map(Number),m=s[e],d=i*this.At+h,u=l*this.At+c;n=Math.min(n,d),o=Math.min(o,u),a=Math.max(a,d+m.width/this.Ge),r=Math.max(r,u+m.height/this.Ge)}),console.log(`Absolute coordinates: (${n}, ${o}) and (${a}, ${r})`);const l=a-n,h=r-o,c=l*this.Ge,m=h*this.Ge;console.log(`Template Width: ${l}\nTemplate Height: ${h}\nCanvas Width: ${c}\nCanvas Height: ${m}`);const d=new OffscreenCanvas(c,m),u=d.getContext("2d");i.forEach((t,e)=>{const[i,a,r,l]=t.split(",").map(Number),h=s[e],c=i*this.At+r,m=a*this.At+l;console.log(`Drawing tile (${i}, ${a}, ${r}, ${l}) (${c}, ${m}) at (${c-n}, ${m-o}) on the canvas...`),u.drawImage(h,(c-n)*this.Ge,(m-o)*this.Ge,h.width,h.height)}),u.globalCompositeOperation="destination-over",u.drawImage(d,0,-1),u.drawImage(d,0,1),u.drawImage(d,-1,0),u.drawImage(d,1,0);const b=new OffscreenCanvas(l,h),p=b.getContext("2d");return p.imageSmoothingEnabled=!1,p.drawImage(d,0,0,l*this.Ge,h*this.Ge,0,0,l,h),b.convertToBlob({type:"image/png"})}async wi(t,e){if(!this.hi)return t;const s=this.At*this.Ge;e=e[0].toString().padStart(4,"0")+","+e[1].toString().padStart(4,"0"),console.log(`Searching for templates in tile: "${e}"`);const o=this.Ie;console.log(o),o.sort((t,e)=>t.Ot-e.Ot),console.log(o);const a=o.map(t=>{const i=Object.keys(t.Bt).filter(t=>t.startsWith(e));if(0===i.length)return null;const s=i.map(e=>{const i=e.split(",");return{xi:t,Gt:t.Bt[e],Pt:t.Pt?.[e],yi:[i[0],i[1]],$i:[i[2],i[3]]}});return s?.[0]}).filter(Boolean);console.log(a);const r=a?.length||0;if(console.log(`templateCount = ${r}`),!(r>0))return this.Re.Mt(`Sleeping\nVersion: ${this.version}`),t;{const t=n(o.filter(t=>Object.keys(t.Bt).filter(t=>t.startsWith(e)).length>0).reduce((t,e)=>t+(e.zt.total||0),0));this.Re.Mt(`Displaying ${r} template${1==r?"":"s"}.\nTotal pixels: ${t}`)}const l=await createImageBitmap(t),h=new OffscreenCanvas(s,s),c=h.getContext("2d");c.imageSmoothingEnabled=!1,c.beginPath(),c.rect(0,0,s,s),c.clip(),c.clearRect(0,0,s,s),c.drawImage(l,0,0,s,s);const m=c.getImageData(0,0,s,s),d=new Uint32Array(m.data.buffer),u=this.$?.Lt?.highlight||[[2,0,0]],b=u?.[0],p=1==u?.length&&2==b?.[0]&&0==b?.[1]&&0==b?.[2];for(const t of a){console.log("Template:"),console.log(t);const s=!!t.xi.zt?.colors?.get(-1);let n=t.Pt.slice();const o=Number(t.$i[0])*this.Ge,a=Number(t.$i[1])*this.Ge;if(0!=this.He.size||s||c.drawImage(t.Gt,o,a),!n){const e=c.getImageData(o,a,t.Gt.width,t.Gt.height);n=new Uint32Array(e.data.buffer)}const r=Date.now(),{qe:l,Ze:h}=i(this,wt,Mt).call(this,{je:d,Ee:n,Ye:[o,a,t.Gt.width,t.Gt.height],Je:u,Xe:p});let m=0;const b=0;for(const[t,e]of l)t!=b&&(m+=e);0==this.He.size&&!s&&p||(console.log("Colors to filter: ",this.He),c.drawImage(await createImageBitmap(new ImageData(new Uint8ClampedArray(h.buffer),t.Gt.width,t.Gt.height)),o,a)),console.log(`Finished calculating correct pixels & filtering colors for the tile ${e} in ${(Date.now()-r)/1e3} seconds!\nThere are ${m} correct pixels.`),void 0===t.xi.zt.correct&&(t.xi.zt.correct={}),t.xi.zt.correct[e]=l}return await h.convertToBlob({type:"image/png"})}async Mi(t){console.log("Importing JSON..."),console.log(t),"BlueMarble"==t?.whoami&&await i(this,wt,vt).call(this,t)}oi(t){this.hi=t}}(kt,Nt),Pt=new class{constructor(t){this.ce=t,this.Ci=!1,this.si="",this.ni=[],this.Ti=[]}Si(t){window.addEventListener("message",async e=>{const i=e.data,s=i.jsonData;if(!i||"blue-marble"!==i.source)return;if(!i.endpoint)return;const n=i.endpoint?.split("?")[0].split("/").filter(t=>t&&isNaN(Number(t))).filter(t=>t&&!t.includes(".")).pop();switch(console.log('%cBlue Marble%c: Recieved message about "%s"',"color: cornflowerblue;","",n),n){case"me":this.ki(t,s);break;case"pixel":const e=i.endpoint.split("?")[0].split("/").filter(t=>t&&!isNaN(Number(t))),n=new URLSearchParams(i.endpoint.split("?")[1]),r=[n.get("x"),n.get("y")];if(this.ni.length&&(!e.length||!r.length))return void t.$t("Coordinates are malformed!\nDid you try clicking the canvas first?");this.ni=[...e,...r];const l=(o=e,a=r,[parseInt(o[0])%4*1e3+parseInt(a[0]),parseInt(o[1])%4*1e3+parseInt(a[1])]),h=document.querySelectorAll("span");for(const t of h){const i=t.textContent.trim();if(i.includes(l[0])&&i.includes(l[1])){let i=document.querySelector("#bm-p");e[0],e[1],r[0],r[1];const s=["Tl X:","Tl Y:","Px X:","Px Y:"],n=["bm-Y","bm-Z","bm-U","bm-V"],o=[...e,...r];if(i)for(const[t,e]of n.entries())document.getElementById(e).textContent=`${s[t]??"??:"} ${o[t]}`;else{i=document.createElement("span"),i.id="bm-p",i.style="display: flex; flex-wrap: wrap; gap: 0 1ch; font-size: small;";for(const[t,e]of o.entries()){const a=document.createElement("span");a.id=n[o.indexOf(e)??""],a.textContent=`${s[t]??"??:"} ${e}`,i.appendChild(a)}t.parentNode.parentNode.parentNode.insertAdjacentElement("afterend",i)}}}break;case"tile":case"tiles":let c=i.endpoint.split("/");c=[parseInt(c[c.length-2]),parseInt(c[c.length-1].replace(".png",""))];const m=i.blobID,d=i.blobData,u=Date.now(),b=await this.ce.wi(d,c);console.log(`Finished loading the tile in ${(Date.now()-u)/1e3} seconds!`),window.postMessage({source:"blue-marble",blobID:m,blobData:b,blink:i.blink});break;case"robots":this.Ci="false"==s.userscript?.toString().toLowerCase();break}var o,a})}ki(t,e){if(e.status&&"2"!=e.status?.toString()[0])return void t.$t("You are not logged in or Wplace is offline!\nCould not fetch userdata.");const i=Math.ceil(Math.pow(Math.floor(e.level)*Math.pow(30,.65),1/.65)-e.pixelsPainted);if(console.log(e.id),(e.id||0===e.id)&&console.log(m(e.id,"!#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~")),this.ce.ri=e.id,0!=this.si.length){const t=document.querySelector("#"+this.si);if(t){const i=e.charges;t.dataset.endDate=Date.now()+(i.max-i.count)*i.cooldownMs}}t.ct("bm-w",`${n(e.droplets)}`),t.ct("bm-q",`${n(i)} px`)}async Ni(t){try{const e=await fetch(`${window.location.origin}/api/me`,{credentials:"include"});if(!e.ok)return void t.$t(`Could not fetch userdata.\nHTTP ${e.status}`);const i=await e.json();this.ki(t,i)}catch(t){h("Failed to fetch current user data:",t)}}Di(t){try{const e=sessionStorage.getItem("bm-2n");if(!e)return!1;const i=JSON.parse(e);return this.ki(t,i),!0}catch(t){return h("Failed to apply cached user data:",t),!1}}async Li(t){console.log("Sending heartbeat to telemetry server...");let e=GM_getValue("bmUserSettings","{}");if(e=JSON.parse(e),!e||!e.telemetry||!e.uuid)return void console.log("Telemetry is disabled, not sending heartbeat.");const i=navigator.userAgent;let s=await this.Hi(i),n=this.Oi(i);GM_xmlhttpRequest({method:"POST",url:"https://telemetry.thebluecorner.net/heartbeat",headers:{"Content-Type":"application/json"},data:JSON.stringify({uuid:e.uuid,version:t,browser:s,os:n}),onload:t=>{200!==t.status&&h("Failed to send heartbeat:",t.statusText)},onerror:t=>{h("Error sending heartbeat:",t)}})}async Hi(t=navigator.userAgent){return(t=t||"").includes("OPR/")||t.includes("Opera")?"Opera":t.includes("Edg/")?"Edge":t.includes("Vivaldi")?"Vivaldi":t.includes("YaBrowser")?"Yandex":t.includes("Kiwi")?"Kiwi":t.includes("Brave")?"Brave":t.includes("Firefox/")?"Firefox":t.includes("Chrome/")?"Chrome":t.includes("Safari/")?"Safari":navigator.brave&&"function"==typeof navigator.brave.isBrave&&await navigator.brave.isBrave()?"Brave":"Unknown"}Oi(t=navigator.userAgent){return/Windows NT 11/i.test(t=t||"")?"Windows 11":/Windows NT 10/i.test(t)?"Windows 10":/Windows NT 6\.3/i.test(t)?"Windows 8.1":/Windows NT 6\.2/i.test(t)?"Windows 8":/Windows NT 6\.1/i.test(t)?"Windows 7":/Windows NT 6\.0/i.test(t)?"Windows Vista":/Windows NT 5\.1|Windows XP/i.test(t)?"Windows XP":/Mac OS X 10[_\.]15/i.test(t)?"macOS Catalina":/Mac OS X 10[_\.]14/i.test(t)?"macOS Mojave":/Mac OS X 10[_\.]13/i.test(t)?"macOS High Sierra":/Mac OS X 10[_\.]12/i.test(t)?"macOS Sierra":/Mac OS X 10[_\.]11/i.test(t)?"OS X El Capitan":/Mac OS X 10[_\.]10/i.test(t)?"OS X Yosemite":/Mac OS X 10[_\.]/i.test(t)?"macOS":/Android/i.test(t)?"Android":/iPhone|iPad|iPod/i.test(t)?"iOS":/Linux/i.test(t)?"Linux":"Unknown"}}(Bt),At=new class extends A{constructor(t,i,s){var n;super(t,i),e(this,H),this.Lt=s,(n=this.Lt).flags??(n.flags=[]),this.Ii=structuredClone(this.Lt),this.Bi="bmUserSettings",this.Pi=5e3,this.Ai=0,setInterval(this.zi.bind(this),this.Pi)}async zi(){await this.Fi()}async Fi(t=!1){const e=JSON.stringify(this.Lt);e!=JSON.stringify(this.Ii)&&(t||Date.now()-this.Ai>this.Pi)&&(await GM.setValue(this.Bi,e),this.Ii=structuredClone(this.Lt),this.Ai=Date.now(),console.log(e))}async Ht(){await this.Fi(!0)}Le(t,e=void 0){const i=this.Lt?.flags?.indexOf(t)??-1;-1!=i&&!0!==e?this.Lt?.flags?.splice(i,1):-1==i&&!1!==e&&this.Lt?.flags?.push(t)}Nt(){const t='',e='',s=this.Lt?.highlight??[[1,0,1],[2,0,0],[1,-1,0],[1,1,0],[1,0,-1]];this.window=this.L({class:"bm-L"}).F(2,{textContent:"Pixel Highlight"}).N().W().N().L({class:"bm-L",style:"margin-left: 1.5ch;"}).j({textContent:"Highlight transparent pixels"},(t,e,i)=>{i.checked=!this.Lt?.flags?.includes("hl-noTrans"),i.onchange=t=>this.Le("hl-noTrans",!t.target.checked)}).N().H({id:"bm-4",textContent:"Choose a preset:",style:"font-weight: 700;"}).N().L({class:"bm-D",role:"group","aria-labelledby":"bm-4"}).L({class:"bm-3"}).I({textContent:"None"}).N().lt({innerHTML:t,"aria-label":'Preset "None"'},(t,e)=>{e.onclick=()=>i(this,H,I).call(this,"None")}).N().N().L({class:"bm-3"}).I({textContent:"Cross"}).N().lt({innerHTML:e,"aria-label":'Preset "Cross Shape"'},(t,e)=>{e.onclick=()=>i(this,H,I).call(this,"Cross")}).N().N().L({class:"bm-3"}).I({textContent:"X"}).N().lt({innerHTML:e.replace('d="M1,0H2V1H3V2H2V3H1V2H0V1H1Z"','d="M0,0V1H3V0H2V3H3V2H0V3H1V0Z"'),"aria-label":'Preset "X Shape"'},(t,e)=>{e.onclick=()=>i(this,H,I).call(this,"X")}).N().N().L({class:"bm-3"}).I({textContent:"Full"}).N().lt({innerHTML:t.replace("#fff","#2f4f4f"),"aria-label":'Preset "Full Template"'},(t,e)=>{e.onclick=()=>i(this,H,I).call(this,"Full")}).N().N().N().H({id:"bm-b",textContent:"Create a custom pattern:",style:"font-weight: 700;"}).N().L({class:"bm-n",role:"group","aria-labelledby":"bm-b"});for(let t=-1;t<=1;t++)for(let e=-1;e<=1;e++){const n=s[s.findIndex(([,i,s])=>i==e&&s==t)]?.[0]??0;let o="Disabled";1==n?o="Incorrect":2==n&&(o="Template"),this.window=this.lt({"data-status":o,"aria-label":`Sub-pixel ${o.toLowerCase()}`},(s,n)=>{n.onclick=()=>i(this,H,O).call(this,n,[e,t])}).N()}this.window=this.N().N().N()}Dt(){this.window=this.L({class:"bm-L"}).F(2,{textContent:"Pixel Highlight"}).N().W().N().L({class:"bm-L",style:"margin-left: 1.5ch;"}).j({textContent:"Template creation should skip transparent tiles"},(t,e,i)=>{i.checked=!this.Lt?.flags?.includes("hl-noSkip"),i.onchange=t=>this.Le("hl-noSkip",!t.target.checked)}).N().j({innerHTML:"Experimental: Template creation should aggressively skip transparent tiles"},(t,e,i)=>{i.checked=this.Lt?.flags?.includes("hl-agSkip"),i.onchange=t=>this.Le("hl-agSkip",t.target.checked)}).N().N().N()}}(kt,Nt,Ot);It.k(At),It.S(Pt),Bt.mi(It),Bt.k(At);var zt=JSON.parse(GM_getValue("bmTemplates","{}"));if(console.log(zt),console.log(Ot),console.log(Object.keys(Ot).length),0==Object.keys(Ot).length){const t=crypto.randomUUID();console.log(t),GM.setValue("bmUserSettings",JSON.stringify({uuid:t}))}setInterval(()=>Pt.Li(Nt),18e5);var Ft=Ot?.telemetry;if(console.log(`Telemetry is ${!(null==Ft)}`),null==Ft||Ft>1){const t=new class extends v{constructor(t,i,s,n){super(t,i),e(this,Ct),this.window=null,this.Ct="bm-k",this.Tt=document.body,this.Wi=s,this.uuid=n}async kt(){if(document.querySelector(`#${this.Ct}`))return void this.$t("Telemetry window already exists!");const t=await this.p.Hi(navigator.userAgent),e=this.p.Oi(navigator.userAgent);this.window=this.L({id:this.Ct,class:"bm-W",style:"height: 80vh; z-index: 9998;"}).L({class:"bm-m"}).L({class:"bm-L bm-h"}).F(1,{textContent:`${this.name} Telemetry`}).N().N().W().N().L({class:"bm-L bm-D",style:"gap: 1.5ch; flex-wrap: wrap;"}).lt({textContent:"Enable Telemetry"},(t,e)=>{e.onclick=()=>{i(this,Ct,Tt).call(this,this.Wi);const t=document.getElementById(this.Ct);t?.remove()}}).N().lt({textContent:"Disable Telemetry"},(t,e)=>{e.onclick=()=>{i(this,Ct,Tt).call(this,0);const t=document.getElementById(this.Ct);t?.remove()}}).N().lt({textContent:"More Information"},(t,e)=>{e.onclick=()=>{window.open("https://github.com/SwingTheVine/Wplace-TelemetryServer#telemetry-data","_blank","noopener noreferrer")}}).N().N().L({class:"bm-L bm-H"}).L({class:"bm-L"}).F(2,{textContent:"Legal"}).N().H({textContent:`We collect anonymous telemetry data such as your browser, OS, and script version to make the experience better for everyone. The data is never shared personally. The data is never sold. You can turn this off by pressing the "Disable" button, but keeping it on helps us improve features and reliability faster. Thank you for supporting ${this.name}!`}).N().N().W().N().L({class:"bm-L"}).F(2,{textContent:"Non-Legal Summary"}).N().H({innerHTML:'You can disable telemetry by pressing the "Disable" button. If you would like to read more about what information we collect, press the "More Information" button.
This is the data stored on our servers:'}).N()._().Z({innerHTML:`A unique identifier (UUIDv4) generated by Blue Marble. This enables our telemetry to function without tracking your actual user ID.
Your UUID is: ${r(this.uuid)}`}).N().Z({innerHTML:`The version of Blue Marble you are using.
Your version is: ${r(this.version)}`}).N().Z({innerHTML:`Your browser type, which is used to determine Blue Marble outages and browser popularity.
Your browser type is: ${r(t)}`}).N().Z({innerHTML:`Your OS type, which is used to determine Blue Marble outages and OS popularity.
Your OS type is: ${r(e)}`}).N().Z({innerHTML:"The date and time that Blue Marble sent the telemetry information."}).N().N().H({innerHTML:'All of the data mentioned above is aggregated every hour. This means every hour, anything that could even remotly be considered "personal data" is deleted from our server. Here, "aggregated" data means things like "42 people used Blue Marble on Google Chrome this hour", which can\'t be used to identify anyone in particular.'}).N().N().N().N().N().D(this.Tt)}}(kt,Nt,1,Ot?.uuid);t.S(Pt),t.kt()}!async function(){await Bt.Mi(zt),Pt.Si(It),It.kt(),It.ai(),Pt.Di(It),Pt.Ni(It),new MutationObserver((t,e)=>{const i=document.querySelector("#color-1");if(!i)return;let s=document.querySelector("#bm-G");if(!s){s=document.createElement("button"),s.id="bm-G",s.textContent="Move ↑",s.className="btn btn-soft",s.onclick=function(){const t=this.parentNode.parentNode.parentNode.parentNode,e="Move ↑"==this.textContent;t.parentNode.className=t.parentNode.className.replace(e?"bottom":"top",e?"top":"bottom"),t.style.borderTopLeftRadius=e?"0px":"var(--radius-box)",t.style.borderTopRightRadius=e?"0px":"var(--radius-box)",t.style.borderBottomLeftRadius=e?"var(--radius-box)":"0px",t.style.borderBottomRightRadius=e?"var(--radius-box)":"0px",this.textContent=e?"Move ↓":"Move ↑"};const t=i.parentNode.parentNode.parentNode.parentNode.querySelector("h2");t.parentNode?.appendChild(s)}}).observe(document.body,{childList:!0,subtree:!0}),l(`%c${kt}%c (${Nt}) userscript has loaded!`,"color: cornflowerblue;","")}()})(); +(()=>{var t=t=>{throw TypeError(t)},e=(e,i,s)=>i.has(e)?t("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(e):i.set(e,s),i=(e,i,s)=>(((e,i)=>{i.has(e)||t("Cannot access private method")})(e,i),s);function s(t){return new Promise(e=>setTimeout(e,t))}function n(t){return(new Intl.NumberFormat).format(t)}function o(t){return new Intl.NumberFormat(void 0,{style:"percent",t:2,i:2}).format(t)}function a(t){return t.toLocaleString(void 0,{o:"long",l:"numeric",h:"2-digit",m:"2-digit",u:"2-digit"})}function r(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}function l(...t){(0,console.log)(...t)}function c(...t){(0,console.error)(...t)}function h(...t){(0,console.warn)(...t)}function m(t,e){if(0===t)return e[0];let i="";const s=e.length;for(;t>0;)i=e[t%s]+i,t=Math.floor(t/s);return i}function d(t,e){let i=0;const s=e.length;for(const n of t){const t=e.indexOf(n);-1==t&&c(`Invalid character '${n}' encountered whilst decoding! Is the decode alphabet/base incorrect?`),i=i*s+t}return i}function u(t){let e="";for(let i=0;i(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4));return.2126*e[0]+.7152*e[1]+.0722*e[2]}function f(t,e,i){return Array.isArray(t)&&([t,e,i]=t),(1<<24|t<<16|e<<8|i).toString(16).slice(1)}var g,w,x,y=[{id:0,premium:!1,name:"Transparent",rgb:[0,0,0]},{id:1,premium:!1,name:"Black",rgb:[0,0,0]},{id:2,premium:!1,name:"Dark Gray",rgb:[60,60,60]},{id:3,premium:!1,name:"Gray",rgb:[120,120,120]},{id:4,premium:!1,name:"Light Gray",rgb:[210,210,210]},{id:5,premium:!1,name:"White",rgb:[255,255,255]},{id:6,premium:!1,name:"Deep Red",rgb:[96,0,24]},{id:7,premium:!1,name:"Red",rgb:[237,28,36]},{id:8,premium:!1,name:"Orange",rgb:[255,127,39]},{id:9,premium:!1,name:"Gold",rgb:[246,170,9]},{id:10,premium:!1,name:"Yellow",rgb:[249,221,59]},{id:11,premium:!1,name:"Light Yellow",rgb:[255,250,188]},{id:12,premium:!1,name:"Dark Green",rgb:[14,185,104]},{id:13,premium:!1,name:"Green",rgb:[19,230,123]},{id:14,premium:!1,name:"Light Green",rgb:[135,255,94]},{id:15,premium:!1,name:"Dark Teal",rgb:[12,129,110]},{id:16,premium:!1,name:"Teal",rgb:[16,174,166]},{id:17,premium:!1,name:"Light Teal",rgb:[19,225,190]},{id:18,premium:!1,name:"Dark Blue",rgb:[40,80,158]},{id:19,premium:!1,name:"Blue",rgb:[64,147,228]},{id:20,premium:!1,name:"Cyan",rgb:[96,247,242]},{id:21,premium:!1,name:"Indigo",rgb:[107,80,246]},{id:22,premium:!1,name:"Light Indigo",rgb:[153,177,251]},{id:23,premium:!1,name:"Dark Purple",rgb:[120,12,153]},{id:24,premium:!1,name:"Purple",rgb:[170,56,185]},{id:25,premium:!1,name:"Light Purple",rgb:[224,159,249]},{id:26,premium:!1,name:"Dark Pink",rgb:[203,0,122]},{id:27,premium:!1,name:"Pink",rgb:[236,31,128]},{id:28,premium:!1,name:"Light Pink",rgb:[243,141,169]},{id:29,premium:!1,name:"Dark Brown",rgb:[104,70,52]},{id:30,premium:!1,name:"Brown",rgb:[149,104,42]},{id:31,premium:!1,name:"Beige",rgb:[248,178,119]},{id:32,premium:!0,name:"Medium Gray",rgb:[170,170,170]},{id:33,premium:!0,name:"Dark Red",rgb:[165,14,30]},{id:34,premium:!0,name:"Light Red",rgb:[250,128,114]},{id:35,premium:!0,name:"Dark Orange",rgb:[228,92,26]},{id:36,premium:!0,name:"Light Tan",rgb:[214,181,148]},{id:37,premium:!0,name:"Dark Goldenrod",rgb:[156,132,49]},{id:38,premium:!0,name:"Goldenrod",rgb:[197,173,49]},{id:39,premium:!0,name:"Light Goldenrod",rgb:[232,212,95]},{id:40,premium:!0,name:"Dark Olive",rgb:[74,107,58]},{id:41,premium:!0,name:"Olive",rgb:[90,148,74]},{id:42,premium:!0,name:"Light Olive",rgb:[132,197,115]},{id:43,premium:!0,name:"Dark Cyan",rgb:[15,121,159]},{id:44,premium:!0,name:"Light Cyan",rgb:[187,250,242]},{id:45,premium:!0,name:"Light Blue",rgb:[125,199,255]},{id:46,premium:!0,name:"Dark Indigo",rgb:[77,49,184]},{id:47,premium:!0,name:"Dark Slate Blue",rgb:[74,66,132]},{id:48,premium:!0,name:"Slate Blue",rgb:[122,113,196]},{id:49,premium:!0,name:"Light Slate Blue",rgb:[181,174,241]},{id:50,premium:!0,name:"Light Brown",rgb:[219,164,99]},{id:51,premium:!0,name:"Dark Beige",rgb:[209,128,81]},{id:52,premium:!0,name:"Light Beige",rgb:[255,197,165]},{id:53,premium:!0,name:"Dark Peach",rgb:[155,82,73]},{id:54,premium:!0,name:"Peach",rgb:[209,128,120]},{id:55,premium:!0,name:"Light Peach",rgb:[250,182,164]},{id:56,premium:!0,name:"Dark Tan",rgb:[123,99,82]},{id:57,premium:!0,name:"Tan",rgb:[156,132,107]},{id:58,premium:!0,name:"Dark Slate",rgb:[51,57,65]},{id:59,premium:!0,name:"Slate",rgb:[109,117,141]},{id:60,premium:!0,name:"Light Slate",rgb:[179,185,209]},{id:61,premium:!0,name:"Dark Stone",rgb:[109,100,63]},{id:62,premium:!0,name:"Stone",rgb:[148,140,107]},{id:63,premium:!0,name:"Light Stone",rgb:[205,197,158]}],$='',v=class{constructor(t,i){e(this,g),this.name=t,this.version=i,this.p=null,this.$=null,this.v="bm-r",this.M=null,this.C=null,this.T=[]}S(t){this.p=t}k(t){this.$=t}N(){return this.T.length>0&&(this.C=this.T.pop()),this}D(t){t?.appendChild(this.M),this.M=null,this.C=null,this.T=[]}O(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"div",{},t)),this}L(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"p",{},t)),this}H(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"small",{},t)),this}I(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"span",{},t)),this}B(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"details",{},t)),this}P(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"summary",{},t)),this}A(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"img",{},t)),this}F(t,e={},s=()=>{}){return s(this,i(this,g,w).call(this,"h"+t,{},e)),this}W(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"hr",{},t)),this}U(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"br",{},t)),this}V(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"form",{},t)),this}G(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"fieldset",{},t)),this}R(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"legend",{},t)),this}j(t={},e=()=>{}){const s={};t.textContent?(s.textContent=t.textContent,delete t.textContent):t.innerHTML&&(s.innerHTML=t.innerHTML,delete t.textContent);const n=i(this,g,w).call(this,"label",s),o=i(this,g,w).call(this,"input",{type:"checkbox"},t);return n.insertBefore(o,n.firstChild),this.N(),e(this,n,o),this}Y(t={},e=()=>{}){const s=i(this,g,w).call(this,"label",{textContent:t.textContent??"",for:t.id??""});return delete t.textContent,this.N(),e(this,s,i(this,g,w).call(this,"select",{},t)),this}J(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"option",{},t)),this}X(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"ol",{},t)),this}_(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"ul",{},t)),this}q(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"menu",{},t)),this}Z(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"li",{},t)),this}K(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"table",{},t)),this}tt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"caption",{},t)),this}et(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"thead",{},t)),this}it(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"tbody",{},t)),this}st(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"tfoot",{},t)),this}nt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"tr",{},t)),this}ot(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"th",{},t)),this}rt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"td",{},t)),this}lt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"button",{},t)),this}ct(t={},e=()=>{}){const s=t.title??t.textContent??"Help: No info";delete t.textContent,t.title=`Help: ${s}`;const n={textContent:"?",className:"bm-10",onclick:()=>{this.ht(this.v,s)}};return e(this,i(this,g,w).call(this,"button",n,t)),this}dt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"input",{},t)),this}ut(t={},e=()=>{}){const s=t.textContent??"";delete t.textContent;const n=i(this,g,w).call(this,"div"),o=i(this,g,w).call(this,"input",{type:"file",tabindex:"-1","aria-hidden":"true"},t);this.N();const a=i(this,g,w).call(this,"button",{textContent:s});return this.N(),this.N(),a.addEventListener("click",()=>{o.click()}),o.addEventListener("change",()=>{a.style.maxWidth=`${a.offsetWidth}px`,o.files.length>0?a.textContent=o.files[0].name:a.textContent=s}),e(this,n,o,a),this}bt(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"textarea",{},t)),this}ft(t={},e=()=>{}){return e(this,i(this,g,w).call(this,"div",{class:"bm-S"},t)),this}gt(t=Date.now(),e=500,s={},n=()=>{}){const o="bm--",a=s?.id||o+"-"+crypto.randomUUID().slice(0,8),r={class:o},l=i(this,g,w).call(this,"time",r,s);return l.id=a,l.dataset.endDate=t,setInterval(()=>{if(!l.isConnected)return;const t=Math.max(l.dataset.endDate-Date.now(),0),e=Math.floor(t/1e3),i=Math.floor(e/3600),s=Math.floor(e%60),n=Math.floor(e%3600/60);l.setAttribute("datetime",`PT${i}H${n}M${s}S`),l.textContent=String(i).padStart(2,"0")+":"+String(n).padStart(2,"0")+":"+String(s).padStart(2,"0")},e),n(this,l),this}ht(t,e,i=!1){const s=document.getElementById(t.replace(/^#/,""));s&&(s instanceof HTMLInputElement?s.value=e:i?s.textContent=e:s.innerHTML=e)}wt(t){if(t.disabled)return;t.disabled=!0,t.style.textDecoration="none";const e=t.closest(".bm-W"),i=t.closest(".bm-S"),s=e?.querySelector("h1"),n=e?.querySelector(".bm-m");if(!e||!i||!n)return t.disabled=!1,void(t.style.textDecoration="");const o=e=>{let i,s=!1;const o=()=>{s||(s=!0,clearTimeout(i),n.removeEventListener("transitionend",a),e(),t.disabled=!1,t.style.textDecoration="")},a=t=>{t.target==n&&"height"==t.propertyName&&o()};n.addEventListener("transitionend",a),i=setTimeout(o,360)};if(e.parentElement.append(e),"expanded"==t.dataset.buttonStatus){e.dataset.widthBeforeMinimize=e.style.width,e.dataset.heightBeforeMinimize=e.style.height,e.dataset.minHeightBeforeMinimize=e.style.minHeight,n.style.height=n.scrollHeight+"px",n.offsetHeight,e.style.width||(e.style.width=e.scrollWidth+"px"),o(()=>{n.style.display="none"}),n.style.height="0",(e.style.height||e.classList.contains("bm-N"))&&(e.style.minHeight="0px",e.style.height=(()=>{const t=getComputedStyle(e),s=t=>parseFloat(t)||0,n="border-box"==t.boxSizing?s(t.paddingTop)+s(t.paddingBottom)+s(t.borderTopWidth)+s(t.borderBottomWidth):0;return Math.ceil(i.getBoundingClientRect().height+n+2)})()+"px");const a=s?.cloneNode(!0)??document.createElement("h1"),r=a.textContent;t.nextElementSibling.appendChild(a),t.innerHTML='',t.dataset.buttonStatus="collapsed",t.ariaLabel=`Unminimize window "${r}"`}else{const s=i.querySelector("h1"),a=s.textContent;s.remove(),n.style.display="",n.style.height="0",e.style.width=e.dataset.widthBeforeMinimize??"",e.style.minHeight=e.dataset.minHeightBeforeMinimize??"",e.style.height=e.dataset.heightBeforeMinimize??"",n.offsetHeight,o(()=>{n.style.height="",delete e.dataset.widthBeforeMinimize,delete e.dataset.heightBeforeMinimize,delete e.dataset.minHeightBeforeMinimize}),n.style.height=n.scrollHeight+"px",t.innerHTML=$,t.dataset.buttonStatus="expanded",t.ariaLabel=`Minimize window "${a}"`}}xt(t,e,i={}){const s=document.querySelector(t),n=document.querySelector(e),o=i?.yt??(()=>{});if(!s||!n)return void this.$t(`Can not drag! ${s?"":"moveMe"} ${s||n?"":"and "}${n?"":"iMoveThings "}was not found!`);let a,r=!1,l=0,c=null,h=0,m=0,d=0,u=0,b=null;const p=()=>{if(r){const t=Math.abs(h-d),e=Math.abs(m-u);(t>.5||e>.5)&&(h=d,m=u,s.style.transform=`translate(${h}px, ${m}px)`,s.style.left="0px",s.style.top="0px",s.style.right=""),c=requestAnimationFrame(p)}},f=(t,e)=>{r=!0,b=s.getBoundingClientRect(),a=t-b.left,l=e-b.top;const i=window.getComputedStyle(s).transform;if(i&&"none"!==i){const t=new DOMMatrix(i);h=t.m41,m=t.m42}else h=b.left,m=b.top;d=h,u=m,document.body.style.userSelect="none",n.classList.add("bm-M"),document.addEventListener("mousemove",w),document.addEventListener("touchmove",x,{passive:!1}),document.addEventListener("mouseup",g),document.addEventListener("touchend",g),document.addEventListener("touchcancel",g),c&&cancelAnimationFrame(c),p()},g=()=>{r=!1,c&&(cancelAnimationFrame(c),c=null),document.body.style.userSelect="",n.classList.remove("bm-M"),document.removeEventListener("mousemove",w),document.removeEventListener("touchmove",x),document.removeEventListener("mouseup",g),document.removeEventListener("touchend",g),document.removeEventListener("touchcancel",g),o({element:s,x:h,y:m}),b=null},w=t=>{r&&b&&(d=t.clientX-a,u=t.clientY-l)},x=t=>{if(r&&b){const e=t.touches[0];if(!e)return;d=e.clientX-a,u=e.clientY-l,t.preventDefault()}};n.addEventListener("mousedown",function(t){t.preventDefault(),f(t.clientX,t.clientY)}),n.addEventListener("touchstart",function(t){const e=t?.touches?.[0];e&&(f(e.clientX,e.clientY),t.preventDefault())},{passive:!1})}vt(t,e,i={}){const s=document.querySelector(t),n=document.querySelector(e),o=i?.yt??(()=>{});if(!s||!n)return void this.$t(`Can not resize! ${s?"":"resizeMe"} ${s||n?"":"and "}${n?"":"iResizeThings "}was not found!`);let a=!1,r=0,l=0,c=0,h=0,m=0,d=0,u=0,b=0,p=null;const f=()=>Number.isFinite(i?.maxWidth)?i.maxWidth:window.innerWidth-16,g=()=>Number.isFinite(i?.maxHeight)?i.maxHeight:window.innerHeight-16,w=Number.isFinite(i?.minWidth)?i.minWidth:200,x=Number.isFinite(i?.minHeight)?i.minHeight:160,y=(t,e,i)=>Math.min(Math.max(t,e),Math.max(e,i)),$=()=>{if(a){const t=Math.abs(m-u),e=Math.abs(d-b);(t>.5||e>.5)&&(m=u,d=b,s.style.width=`${m}px`,s.style.height=`${d}px`),p=requestAnimationFrame($)}},v=(t,e)=>{a=!0,r=t,l=e,c=s.offsetWidth,h=s.offsetHeight,m=c,d=h,u=c,b=h,document.body.style.userSelect="none",n.classList.add("bm-2s"),document.addEventListener("mousemove",C),document.addEventListener("touchmove",T,{passive:!1}),document.addEventListener("mouseup",M),document.addEventListener("touchend",M),document.addEventListener("touchcancel",M),p&&cancelAnimationFrame(p),$()},M=()=>{a=!1,p&&(cancelAnimationFrame(p),p=null),document.body.style.userSelect="",n.classList.remove("bm-2s"),document.removeEventListener("mousemove",C),document.removeEventListener("touchmove",T),document.removeEventListener("mouseup",M),document.removeEventListener("touchend",M),document.removeEventListener("touchcancel",M),o({element:s,width:m,height:d})},C=t=>{a&&(u=y(c+(t.clientX-r),w,f()),b=y(h+(t.clientY-l),x,g()))},T=t=>{if(!a)return;const e=t?.touches?.[0];e&&(u=y(c+(e.clientX-r),w,f()),b=y(h+(e.clientY-l),x,g()),t.preventDefault())};n.addEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),v(t.clientX,t.clientY)}),n.addEventListener("touchstart",t=>{const e=t?.touches?.[0];e&&(t.preventDefault(),t.stopPropagation(),v(e.clientX,e.clientY))},{passive:!1})}Mt(t){(0,console.info)(`${this.name}: ${t}`),this.ht(this.v,"Status: "+t,!0)}$t(t){(0,console.error)(`${this.name}: ${t}`),this.ht(this.v,"Error: "+t,!0)}};g=new WeakSet,w=function(t,e={},s={}){const n=document.createElement(t);this.M?(this.C?.appendChild(n),this.T.push(this.C),this.C=n):(this.M=n,this.C=n);for(const[t,s]of Object.entries(e))i(this,g,x).call(this,n,t,s);for(const[t,e]of Object.entries(s))i(this,g,x).call(this,n,t,e);return n},x=function(t,e,i){"class"==e?t.classList.add(...i.split(/\s+/)):"for"==e?t.htmlFor=i:"tabindex"==e?t.tabIndex=Number(i):"readonly"==e?t.readOnly="true"==i||"1"==i:"maxlength"==e?t.maxLength=Number(i):e.startsWith("data")?t.dataset[e.slice(5).split("-").map((t,e)=>0==e?t:t[0].toUpperCase()+t.slice(1)).join("")]=i:e.startsWith("aria")?t.setAttribute(e,i):t[e]=i};var M,C,T,S,k,N,D,O,L,H,I,B,P,A=class extends v{constructor(t,i){super(t,i),e(this,M),this.window=null,this.Ct="bm-l",this.Tt=document.body,this.St="windowSettings"}kt(){document.querySelector(`#${this.Ct}`)?i(this,M,T).call(this):(this.window=this.O({id:this.Ct,class:"bm-W"}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Settings"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>t.wt(e),e.ontouchend=()=>{e.click()}}).N().O().N().O({class:"bm-D"}).lt({class:"bm-s",innerHTML:'',"aria-label":'Close window "Settings"'},(t,e)=>{e.onclick=()=>i(this,M,T).call(this),e.ontouchend=()=>{e.click()}}).N().N().N().O({class:"bm-m"}).O({class:"bm-L bm-h"}).F(1,{textContent:"Settings"}).N().N().W().N().L({textContent:"Settings take 5 seconds to save."}).N().O({class:"bm-L bm-H"},(t,e)=>{this.Nt(),this.Dt()}).N().N().N().D(this.Tt),i(this,M,D).call(this))}Nt(){i(this,M,O).call(this,"Pixel Highlight")}Dt(){i(this,M,O).call(this,"Template")}};M=new WeakSet,C=function(){var t,e;return this.Ot?((t=this.Ot)[e=this.St]??(t[e]={}),this.Ot[this.St]):null},T=function(){const t=document.querySelector(`#${this.Ct}`);i(this,M,N).call(this,t),t?.remove()},S=function(t,e,i){const s=Math.max(8,window.innerWidth-t.offsetWidth-8),n=Math.max(8,window.innerHeight-t.offsetHeight-8);return{x:Math.min(Math.max(Math.round(Number(e)||8),8),s),y:Math.min(Math.max(Math.round(Number(i)||8),8),n)}},k=function(t){const e=i(this,M,C).call(this);e&&t&&requestAnimationFrame(()=>{if(!t.isConnected)return;const s=Number(e.x),n=Number(e.y);if(!Number.isFinite(s)||!Number.isFinite(n))return;const o=i(this,M,S).call(this,t,s,n);t.style.left="0px",t.style.top="0px",t.style.right="",t.style.transform=`translate(${o.x}px, ${o.y}px)`,o.x==s&&o.y==n||(e.x=o.x,e.y=o.y,this.Lt?.())})},N=function(t){const e=i(this,M,C).call(this);if(!e||!t?.isConnected)return;const s=t.getBoundingClientRect(),n=i(this,M,S).call(this,t,s.left,s.top);t.style.left="0px",t.style.top="0px",t.style.right="",t.style.transform=`translate(${n.x}px, ${n.y}px)`,e.x=n.x,e.y=n.y,this.Lt?.()},D=function(){const t=document.querySelector(`#${this.Ct}.bm-W`);t&&(i(this,M,k).call(this,t),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`,{yt:({element:t})=>i(this,M,N).call(this,t)}))},O=function(t){this.window=this.O({class:"bm-L"}).F(2,{textContent:t}).N().W().N().L({innerHTML:`An error occured loading the ${t} category. SettingsManager failed to override the ${t} function inside WindowSettings.`}).N().N()},L=new WeakSet,H=function(t,e){t.disabled=!0;const i=t.dataset.status,s=this.Ot?.highlight??[[1,0,1],[2,0,0],[1,-1,0],[1,1,0],[1,0,-1]];let n=[2,0,0];const o=s;switch(i){case"Disabled":t.dataset.status="Incorrect",t.ariaLabel="Sub-pixel incorrect",n=[1,...e];break;case"Incorrect":t.dataset.status="Template",t.ariaLabel="Sub-pixel template",n=[2,...e];break;case"Template":t.dataset.status="Disabled",t.ariaLabel="Sub-pixel disabled",n=[0,...e];break}const a=s.findIndex(([,t,e])=>t==n[1]&&e==n[2]);0!=n[0]?-1!=a?o[a]=n:o.push(n):-1!=a&&o.splice(a,1),this.Ot.highlight=o,t.disabled=!1},I=async function(t){const e=document.querySelectorAll(".bm-3 button");for(const t of e)t.disabled=!0;let i=[0,0,0,0,2,0,0,0,0];switch(t){case"Cross":i=[0,1,0,1,2,1,0,1,0];break;case"X":i=[1,0,1,0,2,0,1,0,1];break;case"Full":i=[2,2,2,2,2,2,2,2,2];break}const n=document.querySelector(".bm-n")?.childNodes??[];for(let t=0;t{const[s,n,o,a]=e.split(",").map(Number);(n>>24==0?0:n.get(e)??-2;const a=o.get(s);o.set(s,a?a+1:1)}return console.log(o),o};var F=class{constructor(){this.qt=Math.ceil(80/1300*window.innerWidth),this.Zt=y.slice(1)}Kt(t){const e=document.createElement("div");for(let t=0;t{t.parentNode.childElementCount<=1?t.parentNode.remove():t.remove()},e.appendChild(t)}t.appendChild(e)}},W=class extends HTMLElement{};customElements.define("confetti-piece",W);var U,V,G,R,j,E,Y,J,X,_,q,Z,K,Q,tt,et,it,st,nt,ot,at,rt,lt,ct,ht,mt,dt,ut,bt='',pt=class extends v{constructor(t){super(t.name,t.version),e(this,U),this.window=null,this.Ct="bm-t",this.Qt="bm-E",this.Tt=document.body,this.$=t.$??null,this.te="ftr-oWin",this.St="windowFilter",this.ee=null,this.ie=null,this.se=null,this.ne=null,this.oe=1e4,this.ae=360,this.re=220,this.le=1e3,this.ce=1400,this.he=t.p?.he,this.me='',this.de='';const{palette:i,_t:s}=this.he.ue;this.palette=i,this.be=0,this.pe=0,this.fe=new Map,this.ge=new Map,this.we=0,this.xe=0,this.timeRemaining=0,this.ye="",this.sortPrimary="total",this.sortSecondary="descending",this.showUnused=!1}$e(){i(this,U,G).call(this)?this.ve():this.kt()}kt(){if(document.querySelector(`#${this.Ct}`))return void i(this,U,E).call(this);this.window=this.O({id:this.Ct,class:"bm-W"},(t,e)=>{}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Color Filter"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>t.wt(e),e.ontouchend=()=>{e.click()}}).N().O().N().O({class:"bm-D"}).lt({class:"bm-s",innerHTML:'',"aria-label":'Switch to windowed mode for "Color Filter"'},(t,e)=>{e.onclick=()=>{i(this,U,R).call(this,!0),i(this,U,E).call(this),this.ve()},e.ontouchend=()=>{e.click()}}).N().lt({class:"bm-s",innerHTML:bt,"aria-label":'Close window "Color Filter"'},(t,e)=>{e.onclick=()=>i(this,U,E).call(this),e.ontouchend=()=>{e.click()}}).N().N().N().O({class:"bm-m"}).O({class:"bm-L bm-h bm-1-"}).F(1,{textContent:"Color Filter"}).N().N().W().N().O({class:"bm-L bm-x bm-h bm-1Q",style:"gap: 1.5ch;"}).lt({class:"bm-1D",textContent:"Hide All Colors"},(t,e)=>{e.onclick=()=>i(this,U,st).call(this,!1)}).N().lt({class:"bm-1D",textContent:"Show All Colors"},(t,e)=>{e.onclick=()=>i(this,U,st).call(this,!0)}).N().N().W().N().O({class:"bm-L bm-H bm-1x"}).O({class:"bm-L bm-1L"}).O({class:"bm-1E"}).O({class:"bm-1F"}).I({class:"bm-1y",textContent:"Tiles"}).N().I({id:"bm-i",class:"bm-1z",textContent:"0 / ???"}).N().N().O({class:"bm-1F"}).I({class:"bm-1y",textContent:"Correct"}).N().I({id:"bm-d",class:"bm-1z",textContent:"???"}).N().N().O({class:"bm-1F"}).I({class:"bm-1y",textContent:"Total"}).N().I({id:"bm-j",class:"bm-1z",textContent:"???"}).N().N().O({class:"bm-1F"}).I({class:"bm-1y",textContent:"Remaining"}).N().I({id:"bm-7",class:"bm-1z",textContent:"???"}).N().N().O({class:"bm-1F bm-1a"}).I({class:"bm-1y",textContent:"Finish At"}).N().I({id:"bm-8",class:"bm-1z",textContent:"???"}).N().N().N().W().N().V({class:"bm-L bm-1A"}).G().R({textContent:"Sort Options:",style:"font-weight: 700;"}).N().O({class:"bm-L"}).Y({id:"bm-c",name:"sortPrimary",textContent:"I want to view "}).J({value:"id",textContent:"color IDs"}).N().J({value:"name",textContent:"color names"}).N().J({value:"premium",textContent:"premium colors"}).N().J({value:"percent",textContent:"percentage"}).N().J({value:"correct",textContent:"correct pixels"}).N().J({value:"incorrect",textContent:"incorrect pixels"}).N().J({value:"total",textContent:"total pixels"}).N().N().Y({id:"bm-5",name:"sortSecondary",textContent:" in "}).J({value:"ascending",textContent:"ascending"}).N().J({value:"descending",textContent:"descending"}).N().N().I({textContent:" order."}).N().N().O({class:"bm-L"}).j({id:"bm-e",name:"showUnused",textContent:"Show unused colors"}).N().N().N().O({class:"bm-L bm-1o"}).lt({class:"bm-1R",textContent:"Sort Colors",type:"submit"},(t,e)=>{e.onclick=t=>{t.preventDefault();const e=new FormData(document.querySelector(`#${this.Ct} form`)),s={};for(const[t,i]of e)s[t]=i;console.log(`Primary: ${s.sortPrimary}; Secondary: ${s.sortSecondary}; Unused: ${"on"==s.showUnused}`),i(this,U,it).call(this,s.sortPrimary,s.sortSecondary,"on"==s.showUnused)}}).N().N().N().N().N().N().N().D(this.Tt),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`);const t=document.querySelector(`#${this.Ct} .bm-L.bm-H`);i(this,U,et).call(this,t),i(this,U,j).call(this),i(this,U,it).call(this,this.sortPrimary,this.sortSecondary,this.showUnused),this.ht("#bm-i",`${n(this.be)} / ${n(this.pe)}`),this.ht("#bm-d",n(this.we)),this.ht("#bm-j",n(this.xe)),this.ht("#bm-7",`${n((this.xe||0)-(this.we||0))} (${o(((this.xe||0)-(this.we||0))/(this.xe||1))})`),this.ht("#bm-8",``),i(this,U,Y).call(this)}ve(){if(document.querySelector(`#${this.Ct}`))return void i(this,U,E).call(this);this.window=this.O({id:this.Ct,class:"bm-W bm-N",style:`width: 360px; height: min(70vh, 32rem); min-width: ${this.ae}px; min-height: ${this.re}px; max-width: min(${this.le}px, calc(100vw - 16px)); max-height: min(${this.ce}px, calc(100vh - 16px));`}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Color Filter"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>{const i=document.querySelector("#bm-2");i&&(i.style.display="expanded"==e.dataset.buttonStatus?"none":""),t.wt(e)},e.ontouchend=()=>{e.click()}}).N().O().I({id:"bm-2",class:"bm-y",style:"font-weight: 700;"}).N().N().O({class:"bm-D"}).lt({class:"bm-s",innerHTML:'',"aria-label":'Switch to fullscreen mode for "Color Filter"'},(t,e)=>{e.onclick=()=>{i(this,U,R).call(this,!1),i(this,U,E).call(this),this.kt()},e.ontouchend=()=>{e.click()}}).N().lt({class:"bm-s",innerHTML:bt,"aria-label":'Close window "Color Filter"'},(t,e)=>{e.onclick=()=>i(this,U,E).call(this),e.ontouchend=()=>{e.click()}}).N().N().N().O({class:"bm-m"}).O({class:"bm-L bm-h bm-1-"}).F(1,{textContent:"Color Filter"}).N().N().W().N().O({class:"bm-L bm-x bm-h bm-1Q",style:"gap: 1.5ch;"}).lt({class:"bm-1D",textContent:"None"},(t,e)=>{e.onclick=()=>i(this,U,st).call(this,!1)}).N().lt({class:"bm-1D",textContent:"All"},(t,e)=>{e.onclick=()=>i(this,U,st).call(this,!0)}).N().N().W().N().O({class:"bm-L bm-H bm-1x"}).N().N().O({class:"bm-1_",title:"Resize Color Filter window","aria-label":"Resize Color Filter window",role:"presentation",textContent:"◢",style:"position: absolute; right: 0; bottom: 0; width: 28px; height: 28px; display: flex; align-items: flex-end; justify-content: flex-end; padding-right: 4px; padding-bottom: 4px; box-sizing: border-box; z-index: 5; cursor: nwse-resize; pointer-events: auto; touch-action: none; user-select: none; font-size: 8px; line-height: 1; color: rgba(255,255,255,0.95); background: transparent; border: none; box-shadow: none;"}).N().N().D(this.Tt),i(this,U,tt).call(this);const t=document.querySelector(`#${this.Ct} .bm-L.bm-H`);i(this,U,et).call(this,t),i(this,U,j).call(this),i(this,U,it).call(this,this.sortPrimary,this.sortSecondary,this.showUnused),i(this,U,Y).call(this)}Me(){i(this,U,rt).call(this);const t=document.querySelector(`#${this.Qt}`),e={};for(const t of this.palette){const i=this.fe.get(t.id)??0,s=n(i);let a=0,r="0",l=o(1);0!=i&&(a=this.ge.get(t.id)??"???","number"!=typeof a&&this.be==this.pe&&t.id&&(a=0),r="string"==typeof a?a:n(a),l=isNaN(a/i)?"???":o(a/i));const c=parseInt(i)-parseInt(a);e[t.id]={Ce:i,Te:s,Se:a,ke:r,Ne:l,De:c}}if(document.querySelector("#bm-2")){const t=this.we.toString().length>7?this.we.toString().slice(0,2)+"…"+this.we.toString().slice(-3):this.we.toString(),e=this.xe.toString().length>7?this.xe.toString().slice(0,2)+"…"+this.xe.toString().slice(-3):this.xe.toString();this.ht("#bm-2",`${t}/${e}`,!0)}if(this.ht("#bm-i",`${n(this.be)} / ${n(this.pe)}`),this.ht("#bm-d",n(this.we)),this.ht("#bm-j",n(this.xe)),this.ht("#bm-7",`${n((this.xe||0)-(this.we||0))} (${o(((this.xe||0)-(this.we||0))/(this.xe||1))})`),this.ht("#bm-8",``),!t)return e;const s=Array.from(t.children);for(const t of s){const i=parseInt(t.dataset.id),{Se:s,ke:n,Ne:o,Ce:a,Te:r,De:l}=e[i];t.dataset.correct=Number.isNaN(parseInt(s))?"0":s,t.dataset.total=a,t.dataset.percent="%"==o.slice(-1)?o.slice(0,-1):"0",t.dataset.incorrect=l||0;const c=document.querySelector(`#${this.Ct} .bm-z[data-id="${i}"] .bm-9`);c&&(c.textContent=`${n} / ${r}`);const h=document.querySelector(`#${this.Ct} .bm-z[data-id="${i}"] .bm-6`);h&&(h.innerHTML=`${o} done
${"number"!=typeof l||isNaN(l)?"???":l} off`)}i(this,U,it).call(this,this.sortPrimary,this.sortSecondary,this.showUnused)}};U=new WeakSet,V=function(){var t,e;return this.$?((t=this.$.Ot)[e=this.St]??(t[e]={}),this.$.Ot[this.St]):null},G=function(){const t=i(this,U,V).call(this);return"windowed"==t?.mode||"fullscreen"!=t?.mode},R=function(t){const e=i(this,U,V).call(this);e&&(e.mode=t?"windowed":"fullscreen"),this.$&&(this.$.Oe(this.te,t),this.$.Lt())},j=function(){const t=document.querySelector(`#${this.Ct} #bm-c`),e=document.querySelector(`#${this.Ct} #bm-5`),i=document.querySelector(`#${this.Ct} #bm-e`);t instanceof HTMLSelectElement&&(t.value=this.sortPrimary),e instanceof HTMLSelectElement&&(e.value=this.sortSecondary),i instanceof HTMLInputElement&&(i.checked=this.showUnused)},E=function(){const t=document.querySelector(`#${this.Ct}`);t?.classList.contains("bm-N")&&i(this,U,K).call(this,t),i(this,U,J).call(this),i(this,U,X).call(this),t?.remove()},Y=function(){i(this,U,J).call(this),this.ne=setInterval(()=>{document.querySelector(`#${this.Ct}`)?this.Me():i(this,U,J).call(this)},this.oe)},J=function(){this.ne&&(clearInterval(this.ne),this.ne=null)},X=function(){this.ee&&(this.ee.disconnect(),this.ee=null),this.ie&&(window.removeEventListener("resize",this.ie),this.ie=null),this.se&&(clearTimeout(this.se),this.se=null)},_=function(t,e,i){const s=Math.max(e,i);return Math.min(Math.max(Math.round(Number(t)||e),e),s)},q=function(t,e,i){const s=Math.max(8,window.innerWidth-t.offsetWidth-8),n=Math.max(8,window.innerHeight-t.offsetHeight-8);return{x:Math.min(Math.max(Math.round(Number(e)||8),8),s),y:Math.min(Math.max(Math.round(Number(i)||8),8),n)}},Z=function(t){const e=i(this,U,V).call(this);if(!e||!t)return;const s=Number(e.width),n=Number(e.height),o=Number.isFinite(s),a=Number.isFinite(n);o&&(e.width=i(this,U,_).call(this,s,this.ae,Math.min(this.le,window.innerWidth-16)),t.style.width=`${e.width}px`),a&&(e.height=i(this,U,_).call(this,n,this.re,Math.min(this.ce,window.innerHeight-16)),t.style.height=`${e.height}px`),requestAnimationFrame(()=>{if(!t.isConnected)return;const s=Number(e.x),n=Number(e.y);if(!Number.isFinite(s)||!Number.isFinite(n))return;const o=i(this,U,q).call(this,t,s,n);t.style.left="0px",t.style.top="0px",t.style.right="",t.style.transform=`translate(${o.x}px, ${o.y}px)`,o.x==s&&o.y==n||(e.x=o.x,e.y=o.y,this.$?.Lt())})},K=function(t){const e=i(this,U,V).call(this);if(!e||!t?.isConnected||!t.classList.contains("bm-N"))return;if(t.querySelector('.bm-S button[data-button-status="collapsed"]'))return;const s=t.getBoundingClientRect(),n=i(this,U,_).call(this,s.width,this.ae,Math.min(this.le,window.innerWidth-16)),o=i(this,U,_).call(this,s.height,this.re,Math.min(this.ce,window.innerHeight-16));Math.round(s.width)!=n&&(t.style.width=`${n}px`),Math.round(s.height)!=o&&(t.style.height=`${o}px`);const a=i(this,U,q).call(this,t,s.left,s.top);t.style.left="0px",t.style.top="0px",t.style.right="",t.style.transform=`translate(${a.x}px, ${a.y}px)`,e.x=a.x,e.y=a.y,e.width=n,e.height=o,this.$?.Lt()},Q=function(t,e=150){this.se&&clearTimeout(this.se),this.se=setTimeout(()=>{this.se=null,i(this,U,K).call(this,t)},e)},tt=function(){const t=document.querySelector(`#${this.Ct}.bm-W`);t&&(i(this,U,X).call(this),i(this,U,Z).call(this,t),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`,{yt:({element:t})=>i(this,U,K).call(this,t)}),this.vt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-1_`,{minWidth:this.ae,minHeight:this.re,maxWidth:Math.min(this.le,window.innerWidth-16),maxHeight:Math.min(this.ce,window.innerHeight-16),yt:({element:t})=>i(this,U,K).call(this,t)}),"function"==typeof ResizeObserver&&(this.ee=new ResizeObserver(()=>i(this,U,Q).call(this,t)),this.ee.observe(t)),this.ie=()=>i(this,U,Q).call(this,t,0),window.addEventListener("resize",this.ie))},et=function(t){const e=t.closest(`#${this.Ct}`)?.classList.contains("bm-N");console.log(`Is Windowed Mode: ${e}`);const s=new v(this.name,this.version);s.O({id:this.Qt});const n=this.Me();for(const t of this.palette){const o="#"+f(t.rgb).toUpperCase(),a=p(t.rgb);let r=1.05/(a+.05)>(a+.05)/.05?"white":"black";t.id||(r="transparent");const l="white"==r?"bm-f":"bm-g",c=t.rgb?.map(t=>Number(t)||0).join(","),h=-2==t.id||-1==t.id||0==t.id?"white":r,m=`--bm-1S: rgb(${c}); --bm-1T: ${h};`,{Se:d,ke:u,Ne:b,Ce:g,Te:w,De:x}=n[t.id],y=!!this.he.Le.get(t.id);if(e){const e=`background-size: auto 100%; background-repeat: repeat-x; background-image: url("data:image/svg+xml;utf8,");`;s.O({class:"bm-L bm-z bm-x","data-id":t.id,"data-name":t.name,"data-premium":+t.premium,"data-state":y?"hidden":"shown","data-correct":Number.isNaN(parseInt(d))?"0":d,"data-total":g,"data-percent":"%"==b.slice(-1)?b.slice(0,-1):"0","data-incorrect":x||0},(e,s)=>i(this,U,at).call(this,s,t)).O({class:"bm-a",style:`background-color: rgb(${t.rgb?.map(t=>Number(t)||0).join(",")});${t.premium?e:""}`}).lt({class:"bm-A bm-z-visibility "+l,"data-state":y?"hidden":"shown","aria-label":y?`Show the color ${t.name||""} on templates.`:`Hide the color ${t.name||""} on templates.`,innerHTML:y?this.de:this.me,style:`color: ${r};`},(e,s)=>{s.onclick=e=>{e.stopPropagation(),i(this,U,ot).call(this,s,t)},t.id||(s.disabled=!0),i(this,U,nt).call(this,s,t)}).N().H({textContent:`#${t.id.toString().padStart(2,0)}`,style:`color: ${-1==t.id||0==t.id?"white":r}`}).N().F(2,{textContent:t.name,style:`color: ${-1==t.id||0==t.id?"white":r}`}).N().H({class:"bm-9",textContent:`${u} / ${w}`,style:`color: ${-1==t.id||0==t.id?"white":r}; flex: 1 1 auto; text-align: right;`}).N().N().N()}else s.O({class:"bm-L bm-z bm-x",style:m,"data-id":t.id,"data-name":t.name,"data-premium":+t.premium,"data-state":y?"hidden":"shown","data-correct":Number.isNaN(parseInt(d))?"0":d,"data-total":g,"data-percent":"%"==b.slice(-1)?b.slice(0,-1):"0","data-incorrect":x||0},(e,s)=>i(this,U,at).call(this,s,t)).O({class:"bm-1p","aria-hidden":"true"}).N().O({class:"bm-z-main"}).O({class:"bm-a"}).lt({class:"bm-A bm-z-visibility "+l,"data-state":y?"hidden":"shown","aria-label":y?`Show the color ${t.name||""} on templates.`:`Hide the color ${t.name||""} on templates.`,innerHTML:y?this.de:this.me,style:`color: ${h};`},(e,s)=>{s.onclick=e=>{e.stopPropagation(),i(this,U,ot).call(this,s,t)},t.id||(s.disabled=!0),i(this,U,nt).call(this,s,t)}).N().N().O({class:"bm-z-title"}).H({textContent:`#${t.id.toString().padStart(2,0)} / ${-2==t.id?"mixed":o}`}).N().F(2,{textContent:t.name}).N().N().N().O({class:"bm-z-meta"}).O({class:"bm-z-progress"}).I({class:"bm-9",textContent:`${u} / ${w}`}).N().H({class:"bm-6",innerHTML:`${b} done
${"number"!=typeof x||isNaN(x)?"???":x} off`}).N().N().N().N()}s.D(t)},it=function(t,e,i){this.sortPrimary=t,this.sortSecondary=e,this.showUnused=i;const s=document.querySelector(`#${this.Qt}`),n=Array.from(s.children);n.sort((s,n)=>{const o=s.getAttribute("data-"+t),a=n.getAttribute("data-"+t),r=parseFloat(o),l=parseFloat(a),c=!isNaN(r),h=!isNaN(l);if(i?s.classList.remove("bm-I"):Number(s.getAttribute("data-total"))||s.classList.add("bm-I"),c&&h)return"ascending"===e?r-l:l-r;{const t=o.toLowerCase(),i=a.toLowerCase();return ti?"ascending"===e?1:-1:0}}),n.forEach(t=>s.appendChild(t))},st=function(t){const e=document.querySelector(`#${this.Qt}`),i=Array.from(e.children);for(const e of i){if(e.classList?.contains("bm-I"))continue;const i=e.querySelector(".bm-z-visibility");("hidden"!=i.dataset.state||t)&&("shown"==i.dataset.state&&t||i.click())}},nt=function(t,e){const i="hidden"==t.dataset.state?`Show the color ${e.name||""} on templates.`:`Hide the color ${e.name||""} on templates.`;t.ariaLabel=i;const s=t.closest(".bm-z");s?.setAttribute("aria-label",i),s?.setAttribute("data-state",t.dataset.state)},ot=function(t,e){t&&!t.disabled&&e.id&&(t.style.textDecoration="none",t.disabled=!0,"shown"==t.dataset.state?(t.innerHTML=this.de,t.dataset.state="hidden",this.he.He(e.id,!0)):(t.innerHTML=this.me,t.dataset.state="shown",this.he.He(e.id,!1)),i(this,U,nt).call(this,t,e),t.disabled=!1,t.style.textDecoration="")},at=function(t,e){t&&e.id&&(t.classList.add("bm-z-toggle"),t.tabIndex=0,t.setAttribute("role","button"),t.onclick=s=>{if(s.target instanceof Element&&s.target.closest("button, a, input, select, textarea"))return;const n=t.querySelector(".bm-z-visibility");i(this,U,ot).call(this,n,e)},t.onkeydown=e=>{"Enter"!=e.key&&" "!=e.key||(e.preventDefault(),t.click())})},rt=function(){this.be=0,this.pe=0,this.xe=0,this.we=0,this.ge=new Map,this.fe=new Map;for(const t of this.he.Ie){const e=t.zt?.total??0;this.xe+=e??0;const i=t.zt?.colors??new Map;for(const[t,e]of i){const i=Number(e)||0,s=this.fe.get(t)??0;this.fe.set(t,s+i)}const s=t.zt?.correct??{};this.be+=Object.keys(s).length,this.pe+=Object.keys(t.Bt).length;for(const t of Object.values(s))for(const[e,i]of t){const t=Number(i)||0;this.we+=t;const s=this.ge.get(e)??0;this.ge.set(e,s+t)}}console.log(`Tiles loaded: ${this.be} / ${this.pe}`),this.we>=this.xe&&this.xe&&this.be==this.pe&&(new F).Kt(document.querySelector(`#${this.Ct}`)),this.timeRemaining=new Date(30*(this.xe-this.we)*1e3+Date.now()),this.ye=a(this.timeRemaining)},lt=new WeakSet,ct=async function(t,e,i){i.preventDefault();const s=await async function(t){let e="";return t&&(e=t.clipboardData.getData("text/plain")),0!=e.length||(await navigator.clipboard.readText().then(t=>{e=t}).catch(t=>{l("Failed to retrieve clipboard data using navigator! Using fallback methods...")}),0!=e.length||(e=window.clipboardData?.getData("Text"))),e}(i),n=s.split(/[^a-zA-Z0-9]+/).filter(t=>t).map(Number).filter(t=>!isNaN(t));2==n.length&&"bm-O"==e.id?(t.ht("bm-O",n?.[0]||""),t.ht("bm-P",n?.[1]||"")):1==n.length?t.ht(e.id,n?.[0]||""):(t.ht("bm-Q",n?.[0]||""),t.ht("bm-R",n?.[1]||""),t.ht("bm-O",n?.[2]||""),t.ht("bm-P",n?.[3]||""))};var ft=class extends v{constructor(t,i,s,n=void 0){super(t,i),e(this,ht),this.window=null,this.Ct="bm-u",this.Tt=document.body,this.Be=JSON.parse(GM_getValue("bmTemplates","{}")),this.scriptVersion=this.Be?.scriptVersion,this.schemaVersion=this.Be?.schemaVersion,this.Pe=void 0,this.Ae=s,this.he=n}kt(){if(document.querySelector(`#${this.Ct}`))return void document.querySelector(`#${this.Ct}`).remove();let t="";document.querySelector("#bm-F")||(t=t.concat("z-index: 9001;").trim()),this.window=this.O({id:this.Ct,class:"bm-W",style:t},(t,e)=>{}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Template Wizard"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>t.wt(e),e.ontouchend=()=>{e.click()}}).N().O().N().lt({class:"bm-s",textContent:"✖","aria-label":'Close window "Template Wizard"'},(t,e)=>{e.onclick=()=>{document.querySelector(`#${this.Ct}`)?.remove()},e.ontouchend=()=>{e.click()}}).N().N().O({class:"bm-m"}).O({class:"bm-L bm-h"}).F(1,{textContent:"Template Wizard"}).N().N().W().N().O({class:"bm-L"}).F(2,{textContent:"Status"}).N().L({id:"bm-v",textContent:"Loading template storage status..."}).N().N().O({class:"bm-L bm-H"}).F(2,{textContent:"Detected templates:"}).N().N().N().N().D(this.Tt),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`),i(this,ht,mt).call(this),i(this,ht,dt).call(this)}};ht=new WeakSet,mt=function(){const t=this.schemaVersion.split(/[-\.\+]/),e=this.Ae.split(/[-\.\+]/);let s="";t[0]==e[0]?t[1]==e[1]?(s='Template storage health: Healthy!
No futher action required. (Reason: Semantic version matches)',this.Pe="Good"):(s='Template storage health: Poor!
You can still use your template, but some features may not work. It is recommended that you update Blue Marble\'s template storage. (Reason: MINOR version mismatch)',this.Pe="Poor"):t[0]Bad!
It is guaranteed that some features are broken. You might still be able to use the template. It is HIGHLY recommended that you download all templates and update Blue Marble\'s template storage before continuing. (Reason: MAJOR version mismatch)',this.Pe="Bad"):(s='Template storage health: Dead!
Blue Marble can not load the template storage. (Reason: MAJOR version unknown)',this.Pe="Dead");const n=`
If you want to continue using your current templates, then make sure the template storage (schema) is up-to-date.
If you don't want to update the template storage, then downgrade Blue Marble to version ${r(this.scriptVersion)} to continue using your templates.
Alternatively, if you don't care about corrupting the templates listed below, you can fix any issues with the template storage by uploading a new template.`,o=function(){const t=[...document.querySelectorAll("body > div > .hidden")].filter(t=>/version:/i.test(t.textContent));if(t[0]){const e=t[0].textContent?.match(/\d+/);return e?new Date(Number(e[0])):void 0}}();let l=o?a(o):"???";this.ht("#bm-v",`${s}
Your templates were created during Blue Marble version ${r(this.scriptVersion)} with schema version ${r(this.schemaVersion)}.
The current Blue Marble version is ${r(this.version)} and requires schema version ${r(this.Ae)}.
Wplace was last updated on ${l}.${"Good"!=this.Pe?n:""}`);const c=new v(this.name,this.version);"Dead"!=this.Pe&&(c.O({class:"bm-L bm-D bm-h",style:"gap: 1.5ch;"}),c.lt({textContent:"Download all templates"},(t,e)=>{e.onclick=()=>{e.disabled=!0,this.he.ze().then(()=>{e.disabled=!1})}}).N()),"Poor"!=this.Pe&&"Bad"!=this.Pe||c.lt({textContent:`Update template storage to ${this.Ae}`},(t,e)=>{e.onclick=()=>{e.disabled=!0,i(this,ht,ut).call(this,!0)}}).N(),c.N().D(document.querySelector("#bm-v").parentNode)},dt=function(){const t=this.Be?.templates;if(Object.keys(t).length>0){const e=document.querySelector(`#${this.Ct} .bm-H`),i=new v(this.name,this.version);i.O({id:"bm-B",class:"bm-L"});for(const e in t){const s=e,o=t[e];if(t.hasOwnProperty(e)){const t=s.split(" "),e=Number(t?.[0]),a=d(t?.[1]||"0",this.he.Fe),r=o.name||`Template ${e||""}`,l=o?.coords?.split(",").map(Number),c=o.pixels?.total??void 0,h=void 0,m="number"==typeof e?n(e):"???",u="number"==typeof a?n(a):"???",b="number"==typeof c?n(c):"???";i.O({class:"bm-L bm-D"}).O({class:"bm-D",style:"flex-direction: column; gap: 0;"}).O({class:"bm-1",textContent:h||"🖼️"}).N().H({textContent:`#${m}`}).N().N().O({class:"bm-D bm-0"}).F(3,{textContent:r}).N().I({textContent:`Uploaded by user #${u}`}).N().I({textContent:`Coordinates: ${l.join(", ")}`}).N().I({textContent:`Total Pixels: ${b}`}).N().N().N()}}i.N().D(e)}},ut=async function(t){if(t){const t=document.querySelector(`#${this.Ct} .bm-m`);t.innerHTML="",new v(this.name,this.version).O({class:"bm-L"}).O({class:"bm-L bm-h"}).F(1,{textContent:"Template Wizard"}).N().N().W().N().O({class:"bm-L"}).F(2,{textContent:"Status"}).N().L({textContent:"Updating template storage. Please wait..."}).N().N().N().D(t)}GM_deleteValue("bmCoords");const e=this.Be?.templates;if(Object.keys(e).length>0)for(const[t,i]of Object.entries(e))if(e.hasOwnProperty(t)){const t=new z({displayName:i.name,Bt:i.tiles});t.Xt();const e=await this.he.We(t);await this.he.Ue(e,t.displayName,t.coords)}t&&(console.log("Restarting Template Wizard..."),document.querySelector(`#${this.Ct}`).remove(),new ft(this.name,this.version,this.Ae,this.he).kt())};var gt,wt,xt,yt,$t,vt,Mt,Ct,Tt=ft;gt=new WeakSet,wt=function(){const t=this.$?.Ot?.filter,e=Array.isArray(t)?t:[];this.Le.clear();for(const t of e){const e=Number(t);Number.isFinite(e)&&this.Le.set(e,!0)}},xt=function(){this.$&&(this.$.Ot.filter=Array.from(this.Le.keys()).map(t=>Number(t)).filter(t=>Number.isFinite(t)).sort((t,e)=>t-e),this.$.Lt())},yt=async function(){GM.setValue("bmTemplates",JSON.stringify(this.Ve))},$t=async function(t){console.log("Parsing BlueMarble...");const e=t.templates;console.log(`BlueMarble length: ${Object.keys(e).length}`);const i=t?.schemaVersion,s=i.split(/[-\.\+]/),n=this.schemaVersion.split(/[-\.\+]/),o=t?.scriptVersion;console.log(`BlueMarble Template Schema: ${i}; Script Version: ${o}`),s[0]==n[0]?(s[1]!=n[1]&&new Tt(this.name,this.version,this.schemaVersion,this).kt(),this.Ie=await async function({At:t,Ge:i,Ie:s}){if(Object.keys(e).length>0)for(const n in e){const o=n,a=e[n];if(console.log(`Template Key: ${o}`),e.hasOwnProperty(n)){const e=o.split(" "),n=Number(e?.[0]),r=e?.[1]||"0",l=a.name||`Template ${n||""}`,c={total:a.pixels?.total,colors:new Map(Object.entries(a.pixels?.colors||{}).map(([t,e])=>[Number(t),e]))},h=a.tiles,m={},d={},u=t*i;for(const t in h)if(console.log(t),h.hasOwnProperty(t)){const e=b(h[t]),i=new Blob([e],{type:"image/png"}),s=await createImageBitmap(i);m[t]=s;const n=new OffscreenCanvas(u,u).getContext("2d");n.drawImage(s,0,0);const o=n.getImageData(0,0,s.width,s.height);d[t]=new Uint32Array(o.data.buffer)}const p=new z({displayName:l,Ht:n||this.Ie?.length||0,It:r||""});p.zt=c,p.Bt=m,p.Pt=d,s.push(p),console.log(this.Ie),console.log("^^^ This ^^^")}}return s}({At:this.At,Ge:this.Ge,Ie:this.Ie})):s[0]>>24&255,y=g>>>24&255,$=b.get(w)??-2,v=b.get(g)??-2;if(this.Le.get($)&&(e[i*c+h]=g),-1==$){const t=536870912;this.Le.get($)?e[i*c+h]=0:(u/o&1)==(f/o&1)?(e[i*c+h]=t,e[(i-1)*c+(h-1)]=t,e[(i-1)*c+(h+1)]=t,e[(i+1)*c+(h-1)]=t,e[(i+1)*c+(h+1)]=t):(e[i*c+h]=0,e[(i-1)*c+h]=t,e[(i+1)*c+h]=t,e[i*c+(h-1)]=t,e[i*c+(h+1)]=t)}if(!n&&x>m&&v!=$&&(d||y>m)){const t=e[i*c+h];for(const n of s){const[s,o,a]=n,r=0!=s?1!=s?t:4278190335:0;e[(i+a)*c+(h+o)]=r}}if(-1==$&&g<=m){const t=p.get($);p.set($,t?t+1:1);continue}if(x<=m||y<=m)continue;if(v!=$)continue;const M=p.get($);p.set($,M?M+1:1)}return console.log("List of template pixels that match the tile:"),console.log(p),{qe:p,Ze:e}},Mt=new WeakSet,Ct=function(t){const e=JSON.parse(GM_getValue("bmUserSettings","{}"));e.telemetry=t,GM.setValue("bmUserSettings",JSON.stringify(e))};var St=GM_info.script.name.toString(),kt=GM_info.script.version.toString();!function(t){const e=document.createElement("script");e.setAttribute("bm-11",St),e.setAttribute("bm-X","color: cornflowerblue;"),e.textContent=`(${t})();`,document.documentElement?.appendChild(e),e.remove()}(()=>{const t=document.currentScript,e=t?.getAttribute("bm-11")||"Blue Marble",i=t?.getAttribute("bm-X")||"",s=new Map;window.addEventListener("message",t=>{const{source:n,endpoint:o,blobID:a,blobData:r,blink:l}=t.data,c=Date.now()-l;if(console.groupCollapsed(`%c${e}%c: ${s.size} Recieved IMAGE message about blob "${a}"`,i,""),console.log(`Blob fetch took %c${String(Math.floor(c/6e4)).padStart(2,"0")}:${String(Math.floor(c/1e3)%60).padStart(2,"0")}.${String(c%1e3).padStart(3,"0")}%c MM:SS.mmm`,i,""),console.log(s),console.groupEnd(),"blue-marble"==n&&a&&r&&!o){const t=s.get(a);"function"==typeof t?t(r):h(`%c${e}%c: Attempted to retrieve a blob (%s) from queue, but the blobID was not a function! Skipping...`,i,"",a),s.delete(a)}});const n=window.fetch;window.fetch=async function(...t){const o=await n.apply(this,t),a=o.clone(),r=(t[0]instanceof Request?t[0]?.url:t[0])||"ignore",l=a.headers.get("content-type")||"";if(l.includes("application/json"))console.log(`%c${e}%c: Sending JSON message about endpoint "${r}"`,i,""),a.json().then(t=>{const s=r?.split("?")[0].split("/").filter(t=>t&&isNaN(Number(t))).filter(t=>t&&!t.includes(".")).pop();if("me"==s)try{sessionStorage.setItem("bm-2y",JSON.stringify(t))}catch(t){console.warn(`%c${e}%c: Failed to cache "/me" payload`,i,"",t)}window.postMessage({source:"blue-marble",endpoint:r,jsonData:t},"*")}).catch(t=>{console.error(`%c${e}%c: Failed to parse JSON: `,i,"",t)});else if(l.includes("image/")&&!r.includes("openfreemap")&&!r.includes("maps")){const t=Date.now(),n=await a.blob();return console.log(`%c${e}%c: ${s.size} Sending IMAGE message about endpoint "${r}"`,i,""),new Promise(o=>{const l=crypto.randomUUID();s.set(l,t=>{o(new Response(t,{headers:a.headers,status:a.status,statusText:a.statusText})),console.log(`%c${e}%c: ${s.size} Processed blob "${l}"`,i,"")}),window.postMessage({source:"blue-marble",endpoint:r,blobID:l,blobData:n,blink:t})}).catch(n=>{const o=Date.now();console.error(`%c${e}%c: Failed to Promise blob!`,i,""),console.groupCollapsed(`%c${e}%c: Details of failed blob Promise:`,i,""),console.log(`Endpoint: ${r}\nThere are ${s.size} blobs processing...\nBlink: ${t.toLocaleString()}\nTime Since Blink: ${String(Math.floor(o/6e4)).padStart(2,"0")}:${String(Math.floor(o/1e3)%60).padStart(2,"0")}.${String(o%1e3).padStart(3,"0")} MM:SS.mmm`),console.error("Exception stack:",n),console.groupEnd()})}return o}});var Nt=GM_getResourceText("CSS-BM-File");function Dt(t){const e=document.createElement("link");e.href=t,e.rel="preload",e.as="style",e.onload=function(){this.onload=null,this.rel="stylesheet"},document.head?.appendChild(e)}GM_addStyle(Nt);var Ot="robotoMonoInjectionPoint";Dt("https://fonts.googleapis.com/css2?family=Michroma&family=Rajdhani:wght@400;500;600;700&display=swap"),Ot.indexOf("@font-face")+1?(console.log("Loading Roboto Mono as a file..."),GM_addStyle(Ot)):Dt("https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap");var Lt=JSON.parse(GM_getValue("bmUserSettings","{}")),Ht=(new class{constructor(){this.Ke=null,this.Qe=null,this.ti="#bm-p"}ei(t){return this.Qe=t,this.Ke=new MutationObserver(t=>{for(const e of t)for(const t of e.addedNodes)t instanceof HTMLElement&&t.matches?.(this.ti)}),this}ii(){return this.Ke}observe(t,e=!1,i=!1){t.observe(this.Qe,{childList:e,subtree:i})}},new class extends v{constructor(t,i){super(t,i),e(this,lt),this.window=null,this.Ct="bm-F",this.Tt=document.body}kt(){document.querySelector(`#${this.Ct}`)?this.$t("Main window already exists!"):(this.window=this.O({id:this.Ct,class:"bm-W bm-N",style:"top: 10px; left: unset; right: 75px;"},(t,e)=>{}).ft().lt({class:"bm-s",innerHTML:$,"aria-label":'Minimize window "Blue Marble"',"data-button-status":"expanded"},(t,e)=>{e.onclick=()=>t.wt(e),e.ontouchend=()=>{e.click()}}).N().O().N().O({class:"bm-D"}).lt({class:"bm-s",innerHTML:'',title:"Settings","aria-label":"Open settings"},(t,e)=>{e.onclick=()=>{t.$.kt()}}).N().N().N().O({class:"bm-m"}).W().N().O({class:"bm-L bm-2p"}).A({class:"bm-T",src:"https://raw.githubusercontent.com/SwingTheVine/Wplace-BlueMarble/main/dist/assets/Favicon.png"},(t,e)=>{const i=new Date;204==Math.floor((i.getTime()-new Date(i.getFullYear(),0,1))/864e5)+1&&(e.parentNode.style.position="relative",e.parentNode.innerHTML=e.parentNode.innerHTML+'',e.onload=()=>{(new F).Kt(document.querySelector(`#${this.Ct}`))})}).N().F(1,{textContent:this.name}).N().N().W().N().O({class:"bm-L bm-2k"}).O({class:"bm-1V bm-1k"}).I({class:"bm-1M",textContent:"Droplets"}).N().I({id:"bm-w",class:"bm-1N",textContent:"0"}).N().N().O({class:"bm-1V bm-1k"}).I({class:"bm-1M",textContent:"Next Level"}).N().I({id:"bm-q",class:"bm-1N",textContent:"0 px"}).N().N().O({class:"bm-1V bm-1l"}).I({class:"bm-1M",textContent:"Charges"}).N().gt(Date.now(),1e3,{class:"bm-1N",style:"font-weight: 700;"},(t,e)=>{t.p.si=e.id}).N().N().N().W().N().O({class:"bm-L bm-2l"}).O({class:"bm-L bm-2e"}).lt({class:"bm-s bm-J",style:"margin-top: 0;",innerHTML:''},(t,e)=>{e.onclick=()=>{const e=t.p?.ni;e?.[0]?(t.ht("bm-Q",e?.[0]||""),t.ht("bm-R",e?.[1]||""),t.ht("bm-O",e?.[2]||""),t.ht("bm-P",e?.[3]||"")):t.$t("Coordinates are malformed! Did you try clicking on the canvas first?")}}).N().dt({type:"number",id:"bm-Q",class:"bm-C",placeholder:"Tl X",min:0,max:2047,step:1,required:!0},(t,e)=>{e.addEventListener("paste",s=>i(this,lt,ct).call(this,t,e,s))}).N().dt({type:"number",id:"bm-R",class:"bm-C",placeholder:"Tl Y",min:0,max:2047,step:1,required:!0},(t,e)=>{e.addEventListener("paste",s=>i(this,lt,ct).call(this,t,e,s))}).N().dt({type:"number",id:"bm-O",class:"bm-C",placeholder:"Px X",min:0,max:2047,step:1,required:!0},(t,e)=>{e.addEventListener("paste",s=>i(this,lt,ct).call(this,t,e,s))}).N().dt({type:"number",id:"bm-P",class:"bm-C",placeholder:"Px Y",min:0,max:2047,step:1,required:!0},(t,e)=>{e.addEventListener("paste",s=>i(this,lt,ct).call(this,t,e,s))}).N().N().O({class:"bm-L bm-2f"}).ut({class:"bm-K",textContent:"Upload Template",accept:"image/png, image/jpeg, image/webp, image/bmp, image/gif"}).N().N().O({class:"bm-L bm-x bm-29"}).lt({class:"bm-1D",textContent:"Disable","data-button-status":"shown"},(t,e)=>{e.onclick=()=>{e.disabled=!0,"shown"==e.dataset.buttonStatus?(t.p?.he?.oi(!1),e.dataset.buttonStatus="hidden",e.textContent="Enable",t.Mt("Disabled templates!")):(t.p?.he?.oi(!0),e.dataset.buttonStatus="shown",e.textContent="Disable",t.Mt("Enabled templates!")),e.disabled=!1}}).N().lt({class:"bm-1R",textContent:"Create"},(t,e)=>{e.onclick=()=>{const e=document.querySelector(`#${this.Ct} .bm-K`),i=document.querySelector("#bm-Q");if(!i.checkValidity())return i.reportValidity(),void t.$t("Coordinates are malformed! Did you try clicking on the canvas first?");const s=document.querySelector("#bm-R");if(!s.checkValidity())return s.reportValidity(),void t.$t("Coordinates are malformed! Did you try clicking on the canvas first?");const n=document.querySelector("#bm-O");if(!n.checkValidity())return n.reportValidity(),void t.$t("Coordinates are malformed! Did you try clicking on the canvas first?");const o=document.querySelector("#bm-P");if(!o.checkValidity())return o.reportValidity(),void t.$t("Coordinates are malformed! Did you try clicking on the canvas first?");e?.files[0]?(t?.p?.he.Ue(e.files[0],e.files[0]?.name.replace(/\.[^/.]+$/,""),[Number(i.value),Number(s.value),Number(n.value),Number(o.value)]),t.Mt("Drew to canvas!")):t.$t("No file selected!")}}).N().lt({class:"bm-1D",textContent:"Filter"},(t,e)=>{e.onclick=()=>this.ai()}).N().N().O({class:"bm-L bm-2g"}).bt({id:this.v,placeholder:`Status: Sleeping...\nVersion: ${this.version}`,readOnly:!0}).N().N().N().N().N().D(this.Tt),this.xt(`#${this.Ct}.bm-W`,`#${this.Ct} .bm-S`))}ai(){new pt(this).$e()}}(St,kt)),It=new class{constructor(t,i){e(this,gt),this.name=t,this.version=i,this.Re=null,this.$=null,this.schemaVersion="2.0.0",this.ri=null,this.Fe="!#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~",this.At=1e3,this.Ge=3,this._e=3,this.ue=function(t){const e=y;e.unshift({id:-1,premium:!1,name:"Erased",rgb:[222,250,206]}),e.unshift({id:-2,premium:!1,name:"Other",rgb:[0,0,0]});const i=new Map;for(const s of e){if(0==s.id||-2==s.id)continue;const e=s.rgb[0],n=s.rgb[1],o=s.rgb[2];for(let a=-t;a<=t;a++)for(let r=-t;r<=t;r++)for(let l=-t;l<=t;l++){const t=e+a,c=n+r,h=o+l;if(t<0||t>255||c<0||c>255||h<0||h>255)continue;const m=(255<<24|h<<16|c<<8|t)>>>0;i.has(m)||i.set(m,s.id)}}return{palette:e,_t:i}}(this._e),this.Ee=null,this.li="",this.Ie=[],this.Ve=null,this.ci=!0,this.hi=null,this.Le=new Map}mi(t){this.Re=t}k(t){this.$=t,i(this,gt,wt).call(this)}He(t,e){const s=Number(t);Number.isFinite(s)&&(e?this.Le.set(s,!0):this.Le.delete(s),i(this,gt,xt).call(this))}async di(){return{whoami:this.name.replace(" ",""),scriptVersion:this.version,schemaVersion:this.schemaVersion,templates:{}}}async Ue(t,e,s){this.Ve||(this.Ve=await this.di(),console.log("Creating JSON...")),this.Re.Mt(`Creating template at ${s.join(", ")}...`);const n=new z({displayName:e,Ht:0,It:m(this.ri||0,this.Fe),file:t,coords:s}),o=!this.$?.Ot?.flags?.includes("hl-noSkip"),a=this.$?.Ot?.flags?.includes("hl-agSkip");console.log(`Should Skip: ${o}; Should Agg Skip: ${a}`);const{Yt:r,Jt:l}=await n.Ut(this.At,this.ue,o,a);n.Bt=r;const c={total:n.zt.total,colors:Object.fromEntries(n.zt.colors)};this.Ve.templates[`${n.Ht} ${n.It}`]={name:n.displayName,coords:s.join(", "),enabled:!0,pixels:c,tiles:l},this.Ie=[],this.Ie.push(n),this.Re.Mt(`Template created at ${s.join(", ")}!`),console.log(Object.keys(this.Ve.templates).length),console.log(this.Ve),console.log(this.Ie),console.log(JSON.stringify(this.Ve)),await i(this,gt,yt).call(this)}ui(){}async bi(){this.Ve||(this.Ve=await this.di(),console.log("Creating JSON..."))}async pi(){l("Downloading all templates..."),console.log(this.Ie);for(const t of this.Ie)await this.fi(t),await s(500)}async ze(){const t=JSON.parse(GM_getValue("bmTemplates","{}"))?.templates;if(console.log(t),Object.keys(t).length>0)for(const[e,i]of Object.entries(t))t.hasOwnProperty(e)&&(await this.fi(new z({displayName:i.name,Ht:e.split(" ")?.[0],It:e.split(" ")?.[1],Bt:i.tiles})),await s(500))}async fi(t){t.Xt();const e=`${t.coords.join("-")}_${t.displayName.replaceAll(" ","-")}`,i=await this.We(t);await GM.download({url:URL.createObjectURL(i),name:e+".png",gi:"uniquify",onload:()=>{l(`Download of template '${e}' complete!`)},onerror:(t,i)=>{c(`Download of template '${e}' failed because ${t}! Details: ${i}`)},ontimeout:()=>{h(`Download of template '${e}' has timed out!`)}})}async We(t){console.log(t);const e=t.Bt,i=Object.keys(e).sort(),s=await Promise.all(i.map(t=>{return i=e[t],new Promise((t,e)=>{const s=new Image;s.onload=()=>t(s),s.onerror=e,s.src="data:image/png;base64,"+i});var i}));let n=1/0,o=1/0,a=0,r=0;i.forEach((t,e)=>{const[i,l,c,h]=t.split(",").map(Number),m=s[e],d=i*this.At+c,u=l*this.At+h;n=Math.min(n,d),o=Math.min(o,u),a=Math.max(a,d+m.width/this.Ge),r=Math.max(r,u+m.height/this.Ge)}),console.log(`Absolute coordinates: (${n}, ${o}) and (${a}, ${r})`);const l=a-n,c=r-o,h=l*this.Ge,m=c*this.Ge;console.log(`Template Width: ${l}\nTemplate Height: ${c}\nCanvas Width: ${h}\nCanvas Height: ${m}`);const d=new OffscreenCanvas(h,m),u=d.getContext("2d");i.forEach((t,e)=>{const[i,a,r,l]=t.split(",").map(Number),c=s[e],h=i*this.At+r,m=a*this.At+l;console.log(`Drawing tile (${i}, ${a}, ${r}, ${l}) (${h}, ${m}) at (${h-n}, ${m-o}) on the canvas...`),u.drawImage(c,(h-n)*this.Ge,(m-o)*this.Ge,c.width,c.height)}),u.globalCompositeOperation="destination-over",u.drawImage(d,0,-1),u.drawImage(d,0,1),u.drawImage(d,-1,0),u.drawImage(d,1,0);const b=new OffscreenCanvas(l,c),p=b.getContext("2d");return p.imageSmoothingEnabled=!1,p.drawImage(d,0,0,l*this.Ge,c*this.Ge,0,0,l,c),b.convertToBlob({type:"image/png"})}async wi(t,e){if(!this.ci)return t;const s=this.At*this.Ge;e=e[0].toString().padStart(4,"0")+","+e[1].toString().padStart(4,"0"),console.log(`Searching for templates in tile: "${e}"`);const o=this.Ie;console.log(o),o.sort((t,e)=>t.Ht-e.Ht),console.log(o);const a=o.map(t=>{const i=Object.keys(t.Bt).filter(t=>t.startsWith(e));if(0===i.length)return null;const s=i.map(e=>{const i=e.split(",");return{xi:t,Gt:t.Bt[e],Pt:t.Pt?.[e],yi:[i[0],i[1]],$i:[i[2],i[3]]}});return s?.[0]}).filter(Boolean);console.log(a);const r=a?.length||0;if(console.log(`templateCount = ${r}`),!(r>0))return this.Re.Mt(`Sleeping\nVersion: ${this.version}`),t;{const t=n(o.filter(t=>Object.keys(t.Bt).filter(t=>t.startsWith(e)).length>0).reduce((t,e)=>t+(e.zt.total||0),0));this.Re.Mt(`Displaying ${r} template${1==r?"":"s"}.\nTotal pixels: ${t}`)}const l=await createImageBitmap(t),c=new OffscreenCanvas(s,s),h=c.getContext("2d");h.imageSmoothingEnabled=!1,h.beginPath(),h.rect(0,0,s,s),h.clip(),h.clearRect(0,0,s,s),h.drawImage(l,0,0,s,s);const m=h.getImageData(0,0,s,s),d=new Uint32Array(m.data.buffer),u=this.$?.Ot?.highlight||[[2,0,0]],b=u?.[0],p=1==u?.length&&2==b?.[0]&&0==b?.[1]&&0==b?.[2];for(const t of a){console.log("Template:"),console.log(t);const s=!!t.xi.zt?.colors?.get(-1);let n=t.Pt.slice();const o=Number(t.$i[0])*this.Ge,a=Number(t.$i[1])*this.Ge;if(0!=this.Le.size||s||h.drawImage(t.Gt,o,a),!n){const e=h.getImageData(o,a,t.Gt.width,t.Gt.height);n=new Uint32Array(e.data.buffer)}const r=Date.now(),{qe:l,Ze:c}=i(this,gt,vt).call(this,{je:d,Ee:n,Ye:[o,a,t.Gt.width,t.Gt.height],Je:u,Xe:p});let m=0;const b=0;for(const[t,e]of l)t!=b&&(m+=e);0==this.Le.size&&!s&&p||(console.log("Colors to filter: ",this.Le),h.drawImage(await createImageBitmap(new ImageData(new Uint8ClampedArray(c.buffer),t.Gt.width,t.Gt.height)),o,a)),console.log(`Finished calculating correct pixels & filtering colors for the tile ${e} in ${(Date.now()-r)/1e3} seconds!\nThere are ${m} correct pixels.`),void 0===t.xi.zt.correct&&(t.xi.zt.correct={}),t.xi.zt.correct[e]=l}return await c.convertToBlob({type:"image/png"})}async Mi(t){console.log("Importing JSON..."),console.log(t),"BlueMarble"==t?.whoami&&await i(this,gt,$t).call(this,t)}oi(t){this.ci=t}}(St,kt),Bt=new class{constructor(t){this.he=t,this.Ci=!1,this.si="",this.ni=[],this.Ti=[]}Si(t){window.addEventListener("message",async e=>{const i=e.data,s=i.jsonData;if(!i||"blue-marble"!==i.source)return;if(!i.endpoint)return;const n=i.endpoint?.split("?")[0].split("/").filter(t=>t&&isNaN(Number(t))).filter(t=>t&&!t.includes(".")).pop();switch(console.log('%cBlue Marble%c: Recieved message about "%s"',"color: cornflowerblue;","",n),n){case"me":this.ki(t,s);break;case"pixel":const e=i.endpoint.split("?")[0].split("/").filter(t=>t&&!isNaN(Number(t))),n=new URLSearchParams(i.endpoint.split("?")[1]),r=[n.get("x"),n.get("y")];if(this.ni.length&&(!e.length||!r.length))return void t.$t("Coordinates are malformed!\nDid you try clicking the canvas first?");this.ni=[...e,...r];const l=(o=e,a=r,[parseInt(o[0])%4*1e3+parseInt(a[0]),parseInt(o[1])%4*1e3+parseInt(a[1])]),c=document.querySelectorAll("span");for(const t of c){const i=t.textContent.trim();if(i.includes(l[0])&&i.includes(l[1])){let i=document.querySelector("#bm-p");e[0],e[1],r[0],r[1];const s=["Tl X:","Tl Y:","Px X:","Px Y:"],n=["bm-Y","bm-Z","bm-U","bm-V"],o=[...e,...r];if(i)for(const[t,e]of n.entries())document.getElementById(e).textContent=`${s[t]??"??:"} ${o[t]}`;else{i=document.createElement("span"),i.id="bm-p",i.style="display: flex; flex-wrap: wrap; gap: 0 1ch; font-size: small;";for(const[t,e]of o.entries()){const a=document.createElement("span");a.id=n[o.indexOf(e)??""],a.textContent=`${s[t]??"??:"} ${e}`,i.appendChild(a)}t.parentNode.parentNode.parentNode.insertAdjacentElement("afterend",i)}}}break;case"tile":case"tiles":let h=i.endpoint.split("/");h=[parseInt(h[h.length-2]),parseInt(h[h.length-1].replace(".png",""))];const m=i.blobID,d=i.blobData,u=Date.now(),b=await this.he.wi(d,h);console.log(`Finished loading the tile in ${(Date.now()-u)/1e3} seconds!`),window.postMessage({source:"blue-marble",blobID:m,blobData:b,blink:i.blink});break;case"robots":this.Ci="false"==s.userscript?.toString().toLowerCase();break}var o,a})}ki(t,e){if(e.status&&"2"!=e.status?.toString()[0])return void t.$t("You are not logged in or Wplace is offline!\nCould not fetch userdata.");const i=Math.ceil(Math.pow(Math.floor(e.level)*Math.pow(30,.65),1/.65)-e.pixelsPainted);if(console.log(e.id),(e.id||0===e.id)&&console.log(m(e.id,"!#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~")),this.he.ri=e.id,0!=this.si.length){const t=document.querySelector("#"+this.si);if(t){const i=e.charges;t.dataset.endDate=Date.now()+(i.max-i.count)*i.cooldownMs}}t.ht("bm-w",`${n(e.droplets)}`),t.ht("bm-q",`${n(i)} px`)}async Ni(t){try{const e=await fetch(`${window.location.origin}/api/me`,{credentials:"include"});if(!e.ok)return void t.$t(`Could not fetch userdata.\nHTTP ${e.status}`);const i=await e.json();this.ki(t,i)}catch(t){c("Failed to fetch current user data:",t)}}Di(t){try{const e=sessionStorage.getItem("bm-2y");if(!e)return!1;const i=JSON.parse(e);return this.ki(t,i),!0}catch(t){return c("Failed to apply cached user data:",t),!1}}async Oi(t){console.log("Sending heartbeat to telemetry server...");let e=GM_getValue("bmUserSettings","{}");if(e=JSON.parse(e),!e||!e.telemetry||!e.uuid)return void console.log("Telemetry is disabled, not sending heartbeat.");const i=navigator.userAgent;let s=await this.Li(i),n=this.Hi(i);GM_xmlhttpRequest({method:"POST",url:"https://telemetry.thebluecorner.net/heartbeat",headers:{"Content-Type":"application/json"},data:JSON.stringify({uuid:e.uuid,version:t,browser:s,os:n}),onload:t=>{200!==t.status&&c("Failed to send heartbeat:",t.statusText)},onerror:t=>{c("Error sending heartbeat:",t)}})}async Li(t=navigator.userAgent){return(t=t||"").includes("OPR/")||t.includes("Opera")?"Opera":t.includes("Edg/")?"Edge":t.includes("Vivaldi")?"Vivaldi":t.includes("YaBrowser")?"Yandex":t.includes("Kiwi")?"Kiwi":t.includes("Brave")?"Brave":t.includes("Firefox/")?"Firefox":t.includes("Chrome/")?"Chrome":t.includes("Safari/")?"Safari":navigator.brave&&"function"==typeof navigator.brave.isBrave&&await navigator.brave.isBrave()?"Brave":"Unknown"}Hi(t=navigator.userAgent){return/Windows NT 11/i.test(t=t||"")?"Windows 11":/Windows NT 10/i.test(t)?"Windows 10":/Windows NT 6\.3/i.test(t)?"Windows 8.1":/Windows NT 6\.2/i.test(t)?"Windows 8":/Windows NT 6\.1/i.test(t)?"Windows 7":/Windows NT 6\.0/i.test(t)?"Windows Vista":/Windows NT 5\.1|Windows XP/i.test(t)?"Windows XP":/Mac OS X 10[_\.]15/i.test(t)?"macOS Catalina":/Mac OS X 10[_\.]14/i.test(t)?"macOS Mojave":/Mac OS X 10[_\.]13/i.test(t)?"macOS High Sierra":/Mac OS X 10[_\.]12/i.test(t)?"macOS Sierra":/Mac OS X 10[_\.]11/i.test(t)?"OS X El Capitan":/Mac OS X 10[_\.]10/i.test(t)?"OS X Yosemite":/Mac OS X 10[_\.]/i.test(t)?"macOS":/Android/i.test(t)?"Android":/iPhone|iPad|iPod/i.test(t)?"iOS":/Linux/i.test(t)?"Linux":"Unknown"}}(It),Pt=new class extends A{constructor(t,i,s){var n;super(t,i),e(this,L),this.Ot=s,(n=this.Ot).flags??(n.flags=[]),this.Ii=structuredClone(this.Ot),this.Bi="bmUserSettings",this.Pi=5e3,this.Ai=0,setInterval(this.zi.bind(this),this.Pi)}async zi(){await this.Fi()}async Fi(t=!1){const e=JSON.stringify(this.Ot);e!=JSON.stringify(this.Ii)&&(t||Date.now()-this.Ai>this.Pi)&&(await GM.setValue(this.Bi,e),this.Ii=structuredClone(this.Ot),this.Ai=Date.now(),console.log(e))}async Lt(){await this.Fi(!0)}Oe(t,e=void 0){const i=this.Ot?.flags?.indexOf(t)??-1;-1!=i&&!0!==e?this.Ot?.flags?.splice(i,1):-1==i&&!1!==e&&this.Ot?.flags?.push(t)}Nt(){const t='',e='',s=this.Ot?.highlight??[[1,0,1],[2,0,0],[1,-1,0],[1,1,0],[1,0,-1]];this.window=this.O({class:"bm-L"}).F(2,{textContent:"Pixel Highlight"}).N().W().N().O({class:"bm-L",style:"margin-left: 1.5ch;"}).j({textContent:"Highlight transparent pixels"},(t,e,i)=>{i.checked=!this.Ot?.flags?.includes("hl-noTrans"),i.onchange=t=>this.Oe("hl-noTrans",!t.target.checked)}).N().L({id:"bm-4",textContent:"Choose a preset:",style:"font-weight: 700;"}).N().O({class:"bm-D",role:"group","aria-labelledby":"bm-4"}).O({class:"bm-3"}).I({textContent:"None"}).N().lt({innerHTML:t,"aria-label":'Preset "None"'},(t,e)=>{e.onclick=()=>i(this,L,I).call(this,"None")}).N().N().O({class:"bm-3"}).I({textContent:"Cross"}).N().lt({innerHTML:e,"aria-label":'Preset "Cross Shape"'},(t,e)=>{e.onclick=()=>i(this,L,I).call(this,"Cross")}).N().N().O({class:"bm-3"}).I({textContent:"X"}).N().lt({innerHTML:e.replace('d="M1,0H2V1H3V2H2V3H1V2H0V1H1Z"','d="M0,0V1H3V0H2V3H3V2H0V3H1V0Z"'),"aria-label":'Preset "X Shape"'},(t,e)=>{e.onclick=()=>i(this,L,I).call(this,"X")}).N().N().O({class:"bm-3"}).I({textContent:"Full"}).N().lt({innerHTML:t.replace("#fff","#2f4f4f"),"aria-label":'Preset "Full Template"'},(t,e)=>{e.onclick=()=>i(this,L,I).call(this,"Full")}).N().N().N().L({id:"bm-b",textContent:"Create a custom pattern:",style:"font-weight: 700;"}).N().O({class:"bm-n",role:"group","aria-labelledby":"bm-b"});for(let t=-1;t<=1;t++)for(let e=-1;e<=1;e++){const n=s[s.findIndex(([,i,s])=>i==e&&s==t)]?.[0]??0;let o="Disabled";1==n?o="Incorrect":2==n&&(o="Template"),this.window=this.lt({"data-status":o,"aria-label":`Sub-pixel ${o.toLowerCase()}`},(s,n)=>{n.onclick=()=>i(this,L,H).call(this,n,[e,t])}).N()}this.window=this.N().N().N()}Dt(){this.window=this.O({class:"bm-L"}).F(2,{textContent:"Pixel Highlight"}).N().W().N().O({class:"bm-L",style:"margin-left: 1.5ch;"}).j({textContent:"Template creation should skip transparent tiles"},(t,e,i)=>{i.checked=!this.Ot?.flags?.includes("hl-noSkip"),i.onchange=t=>this.Oe("hl-noSkip",!t.target.checked)}).N().j({innerHTML:"Experimental: Template creation should aggressively skip transparent tiles"},(t,e,i)=>{i.checked=this.Ot?.flags?.includes("hl-agSkip"),i.onchange=t=>this.Oe("hl-agSkip",t.target.checked)}).N().N().N()}}(St,kt,Lt);Ht.k(Pt),Ht.S(Bt),It.mi(Ht),It.k(Pt);var At=JSON.parse(GM_getValue("bmTemplates","{}"));if(console.log(At),console.log(Lt),console.log(Object.keys(Lt).length),0==Object.keys(Lt).length){const t=crypto.randomUUID();console.log(t),GM.setValue("bmUserSettings",JSON.stringify({uuid:t}))}setInterval(()=>Bt.Oi(kt),18e5);var zt=Lt?.telemetry;if(console.log(`Telemetry is ${!(null==zt)}`),null==zt||zt>1){const t=new class extends v{constructor(t,i,s,n){super(t,i),e(this,Mt),this.window=null,this.Ct="bm-k",this.Tt=document.body,this.Wi=s,this.uuid=n}async kt(){if(document.querySelector(`#${this.Ct}`))return void this.$t("Telemetry window already exists!");const t=await this.p.Li(navigator.userAgent),e=this.p.Hi(navigator.userAgent);this.window=this.O({id:this.Ct,class:"bm-W",style:"height: 80vh; z-index: 9998;"}).O({class:"bm-m"}).O({class:"bm-L bm-h"}).F(1,{textContent:`${this.name} Telemetry`}).N().N().W().N().O({class:"bm-L bm-D",style:"gap: 1.5ch; flex-wrap: wrap;"}).lt({textContent:"Enable Telemetry"},(t,e)=>{e.onclick=()=>{i(this,Mt,Ct).call(this,this.Wi);const t=document.getElementById(this.Ct);t?.remove()}}).N().lt({textContent:"Disable Telemetry"},(t,e)=>{e.onclick=()=>{i(this,Mt,Ct).call(this,0);const t=document.getElementById(this.Ct);t?.remove()}}).N().lt({textContent:"More Information"},(t,e)=>{e.onclick=()=>{window.open("https://github.com/SwingTheVine/Wplace-TelemetryServer#telemetry-data","_blank","noopener noreferrer")}}).N().N().O({class:"bm-L bm-H"}).O({class:"bm-L"}).F(2,{textContent:"Legal"}).N().L({textContent:`We collect anonymous telemetry data such as your browser, OS, and script version to make the experience better for everyone. The data is never shared personally. The data is never sold. You can turn this off by pressing the "Disable" button, but keeping it on helps us improve features and reliability faster. Thank you for supporting ${this.name}!`}).N().N().W().N().O({class:"bm-L"}).F(2,{textContent:"Non-Legal Summary"}).N().L({innerHTML:'You can disable telemetry by pressing the "Disable" button. If you would like to read more about what information we collect, press the "More Information" button.
This is the data stored on our servers:'}).N()._().Z({innerHTML:`A unique identifier (UUIDv4) generated by Blue Marble. This enables our telemetry to function without tracking your actual user ID.
Your UUID is: ${r(this.uuid)}`}).N().Z({innerHTML:`The version of Blue Marble you are using.
Your version is: ${r(this.version)}`}).N().Z({innerHTML:`Your browser type, which is used to determine Blue Marble outages and browser popularity.
Your browser type is: ${r(t)}`}).N().Z({innerHTML:`Your OS type, which is used to determine Blue Marble outages and OS popularity.
Your OS type is: ${r(e)}`}).N().Z({innerHTML:"The date and time that Blue Marble sent the telemetry information."}).N().N().L({innerHTML:'All of the data mentioned above is aggregated every hour. This means every hour, anything that could even remotly be considered "personal data" is deleted from our server. Here, "aggregated" data means things like "42 people used Blue Marble on Google Chrome this hour", which can\'t be used to identify anyone in particular.'}).N().N().N().N().N().D(this.Tt)}}(St,kt,1,Lt?.uuid);t.S(Bt),t.kt()}!async function(){await It.Mi(At),Bt.Si(Ht),Ht.kt(),Ht.ai(),Bt.Di(Ht),Bt.Ni(Ht),new MutationObserver((t,e)=>{const i=document.querySelector("#color-1");if(!i)return;let s=document.querySelector("#bm-G");if(!s){s=document.createElement("button"),s.id="bm-G",s.textContent="Move ↑",s.className="btn btn-soft",s.onclick=function(){const t=this.parentNode.parentNode.parentNode.parentNode,e="Move ↑"==this.textContent;t.parentNode.className=t.parentNode.className.replace(e?"bottom":"top",e?"top":"bottom"),t.style.borderTopLeftRadius=e?"0px":"var(--radius-box)",t.style.borderTopRightRadius=e?"0px":"var(--radius-box)",t.style.borderBottomLeftRadius=e?"var(--radius-box)":"0px",t.style.borderBottomRightRadius=e?"var(--radius-box)":"0px",this.textContent=e?"Move ↓":"Move ↑"};const t=i.parentNode.parentNode.parentNode.parentNode.querySelector("h2");t.parentNode?.appendChild(s)}}).observe(document.body,{childList:!0,subtree:!0}),l(`%c${St}%c (${kt}) userscript has loaded!`,"color: cornflowerblue;","")}()})(); -// Build Hash: 38b03b4274ae +// Build Hash: 7a06cd0539e3 diff --git a/src/WindowFilter.css b/src/WindowFilter.css index d68310a..9175072 100644 --- a/src/WindowFilter.css +++ b/src/WindowFilter.css @@ -47,22 +47,20 @@ } #bm-window-filter .bm-filter-insights { + display: block; + margin: 0 0.18rem; +} + +#bm-window-filter .bm-filter-stat-grid { display: grid; - grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr); - gap: 0.24rem 0.3rem; - align-items: stretch; + grid-template-columns: repeat(5, minmax(0, 1fr)); + gap: 0.24rem; } -#bm-window-filter .bm-filter-insights > hr, +#bm-window-filter .bm-filter-stat-card, #bm-window-filter .bm-filter-sort-panel { - grid-column: 1 / -1; -} - -#bm-window-filter .bm-filter-stats-card, -#bm-window-filter .bm-filter-note, -#bm-window-filter .bm-filter-sort-panel { - padding: 0.38rem 0.48rem; - border-radius: 13px; + min-width: 0; + border-radius: 11px; border: 1px solid rgba(255, 255, 255, 0.18); background: linear-gradient(155deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.07)); box-shadow: @@ -70,24 +68,41 @@ 0 8px 20px rgba(0, 0, 0, 0.08); } -#bm-window-filter .bm-filter-stats-card { - display: grid; - gap: 0.18rem; +#bm-window-filter .bm-filter-stat-card { + min-height: 2.7rem; + display: flex; + flex-direction: column; + justify-content: center; + gap: 0.08rem; + padding: 0.34rem 0.45rem; + color: rgba(18, 35, 63, 0.96); + line-height: 1.22; } -#bm-window-filter .bm-filter-stats-card br { - display: none; +#bm-window-filter .bm-filter-stat-label { + color: rgba(49, 71, 105, 0.82); + font-size: 0.62rem; + letter-spacing: 0; + font-family: var(--bm-font-display); + text-transform: uppercase; } -#bm-window-filter .bm-filter-stats-card span { - display: block; - padding: 0.28rem 0.38rem; - border-radius: 10px; - background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08)); +#bm-window-filter .bm-filter-stat-value { + display: inline-block; + min-width: 0; + color: rgba(15, 31, 56, 0.96); + font-size: 1.04em; + font-weight: 700; + overflow-wrap: anywhere; } -#bm-window-filter .bm-filter-note p { - margin: 0; +#bm-window-filter .bm-filter-stat-card time { + font-family: var(--bm-font-mono); + letter-spacing: 0; +} + +#bm-window-filter .bm-filter-sort-panel { + padding: 0.38rem 0.48rem; } #bm-window-filter .bm-filter-sort-panel fieldset { @@ -119,9 +134,9 @@ display: flex; flex-direction: row; flex-wrap: wrap; - justify-content: center; + justify-content: flex-start; align-items: stretch; - gap: 0.3rem; + gap: 0.38rem; } /* Filter color */ @@ -155,6 +170,31 @@ radial-gradient(circle at 18% 0%, rgba(186, 246, 255, 0.12), transparent 22%); } +#bm-window-filter:not(.bm-windowed) .bm-filter-color::before { + background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.04)); +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-color::after { + content: ""; + position: absolute; + left: 0.52rem; + bottom: 0.46rem; + width: 1.65rem; + height: 1.65rem; + background: currentColor; + opacity: 0.72; + pointer-events: none; + z-index: 0; + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.8 12s3.1-5 8.2-5 8.2 5 8.2 5-3.1 5-8.2 5-8.2-5-8.2-5Z' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='none' stroke='black' stroke-width='1.9'/%3E%3C/svg%3E") center / contain no-repeat; + mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.8 12s3.1-5 8.2-5 8.2 5 8.2 5-3.1 5-8.2 5-8.2-5-8.2-5Z' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='none' stroke='black' stroke-width='1.9'/%3E%3C/svg%3E") center / contain no-repeat; +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-state="hidden"]::after { + opacity: 0.88; + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.6 9.8C6.1 8.3 8.6 7 12 7c5.1 0 8.2 5 8.2 5a15.2 15.2 0 0 1-2.2 2.7' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M14.1 16.7a8.3 8.3 0 0 1-2.1.3c-5.1 0-8.2-5-8.2-5a14.9 14.9 0 0 1 1.8-2.3' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M5 5l14 14' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10.4 10.7a2.5 2.5 0 0 0 2.9 2.9' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; + mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.6 9.8C6.1 8.3 8.6 7 12 7c5.1 0 8.2 5 8.2 5a15.2 15.2 0 0 1-2.2 2.7' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M14.1 16.7a8.3 8.3 0 0 1-2.1.3c-5.1 0-8.2-5-8.2-5a14.9 14.9 0 0 1 1.8-2.3' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M5 5l14 14' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10.4 10.7a2.5 2.5 0 0 0 2.9 2.9' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; +} + #bm-window-filter .bm-filter-color-toggle { cursor: pointer; } @@ -164,12 +204,138 @@ #bm-window-filter .bm-filter-color:focus-within { transform: translateY(-2px); border-color: rgba(146, 221, 255, 0.26); - background: linear-gradient(160deg, rgba(255, 255, 255, 0.22), rgba(186, 246, 255, 0.1)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 24px rgba(0, 0, 0, 0.1); } +/* Fullscreen filter color cards */ +#bm-window-filter:not(.bm-windowed) .bm-filter-color { + width: min(100%, 23.5rem); + max-width: 23.5rem; + min-height: 6.15rem; + display: grid; + grid-template-columns: minmax(0, 1.2fr) minmax(7.6rem, 0.8fr); + align-items: stretch; + gap: 0.48rem; + padding: 0.5rem; + color: var(--bm-filter-card-fg); + background-color: var(--bm-filter-card-bg); + background-image: none; +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-id="-2"][data-state="shown"] { + background-image: conic-gradient( + #aa0000 0%, + #aaaa00 16.6%, + #00aa00 33.3%, + #00aaaa 50%, + #0000aa 66.6%, + #aa00aa 83.3%, + #aa0000 100% + ); +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-id="-1"][data-state="shown"], +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-id="0"][data-state="shown"] { + background-image: url('data:image/svg+xml;utf8,'); + background-color: rgba(255, 255, 255, 0.18); +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-state="hidden"] { + color: var(--bm-filter-card-fg); + border-color: rgba(255, 255, 255, 0.16); + background-color: var(--bm-filter-card-bg); + background-image: none; +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-id="-2"][data-state="hidden"] { + background-image: conic-gradient( + #aa0000 0%, + #aaaa00 16.6%, + #00aa00 33.3%, + #00aaaa 50%, + #0000aa 66.6%, + #aa00aa 83.3%, + #aa0000 100% + ); +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-id="-1"][data-state="hidden"], +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-id="0"][data-state="hidden"] { + background-image: url('data:image/svg+xml;utf8,'); + background-color: rgba(255, 255, 255, 0.18); +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-state="hidden"]::before { + opacity: 0.16; +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-color > * { + position: relative; + z-index: 1; +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-premium-star { + display: none; +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-premium="1"] .bm-filter-premium-star { + position: absolute; + top: 50%; + right: -3.2rem; + z-index: 0; + display: block; + width: 10.5rem; + aspect-ratio: 1; + background: currentColor; + clip-path: polygon(50% 5%, 62% 38%, 98% 38%, 69% 59%, 80% 93%, 50% 72%, 20% 93%, 31% 59%, 2% 38%, 38% 38%); + opacity: 0.12; + pointer-events: none; + transform: translateY(-50%); +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-color[data-premium="1"][data-state="hidden"] .bm-filter-premium-star { + opacity: 0.18; +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-color-main, +#bm-window-filter:not(.bm-windowed) .bm-filter-color-meta, +#bm-window-filter:not(.bm-windowed) .bm-filter-color-progress { + min-width: 0; + display: flex; + flex-direction: column; +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-color-main { + justify-content: flex-start; + gap: 0.4rem; +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-color-title { + min-width: 0; +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-color-meta { + align-items: flex-end; + justify-content: space-between; + gap: 0.42rem; + text-align: right; +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-color-progress { + align-items: flex-end; + gap: 0.08rem; +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-color .bm-filter-color-pxl-cnt { + font-family: var(--bm-font-display); + font-size: 1rem; + font-weight: 700; + line-height: 1.15; + overflow-wrap: anywhere; +} + #bm-window-filter .bm-filter-color-toggle:focus-visible { outline: none; border-color: rgba(116, 231, 255, 0.62); @@ -239,6 +405,25 @@ filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.18)); } +#bm-window-filter:not(.bm-windowed) .bm-filter-container-rgb { + display: none; +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-container-rgb button { + min-width: 3rem; + min-height: 3rem; + padding: 0; + color: currentColor !important; + pointer-events: none; +} + +#bm-window-filter:not(.bm-windowed) .bm-filter-container-rgb .bm-filter-eye-icon { + width: 2.75rem; + height: 2.75rem; + filter: none; + transform: translateY(0.08rem); +} + /* Filter window container for color information */ #bm-window-filter .bm-filter-color > .bm-flex-between { flex-direction: column; @@ -250,6 +435,17 @@ margin: 0.04rem 0 0; } +#bm-window-filter:not(.bm-windowed) .bm-filter-color h2 { + display: block; + max-width: 100%; + margin: 0.08rem 0 0; + color: currentColor; + font-size: 1.02rem; + letter-spacing: 0; + line-height: 1.12; + overflow-wrap: anywhere; +} + #bm-window-filter .bm-filter-color .bm-filter-color-pxl-desc { margin: 0.1rem 0 0; } @@ -259,6 +455,12 @@ font-size: 0.75em; } +#bm-window-filter:not(.bm-windowed) .bm-filter-color small { + color: currentColor; + letter-spacing: 0; + opacity: 0.82; +} + /* Filter window hide unused colors */ #bm-window-filter .bm-filter-color.bm-color-hide { display: none; @@ -439,13 +641,33 @@ max-width: min(100vw - 0.35rem, 50rem) !important; } - #bm-window-filter .bm-filter-insights { + #bm-window-filter .bm-filter-stat-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + + #bm-window-filter .bm-filter-stat-card-wide { + grid-column: span 2; + } +} + +@media (max-width: 620px) { + #bm-window-filter .bm-filter-stat-grid { grid-template-columns: 1fr; } - #bm-window-filter .bm-filter-note, - #bm-window-filter .bm-filter-sort-panel, - #bm-window-filter .bm-filter-insights > hr { + #bm-window-filter .bm-filter-stat-card-wide { grid-column: auto; } + + #bm-window-filter:not(.bm-windowed) .bm-filter-color { + width: 100%; + max-width: none; + grid-template-columns: 1fr; + } + + #bm-window-filter:not(.bm-windowed) .bm-filter-color-meta, + #bm-window-filter:not(.bm-windowed) .bm-filter-color-progress { + align-items: flex-start; + text-align: left; + } } diff --git a/src/WindowFilter.js b/src/WindowFilter.js index c460cf6..5a1391e 100644 --- a/src/WindowFilter.js +++ b/src/WindowFilter.js @@ -133,20 +133,28 @@ export default class WindowFilter extends Overlay { .buildElement() .addHr().buildElement() .addDiv({'class': 'bm-container bm-scrollable bm-filter-scrollable'}) - .addDiv({'class': 'bm-container bm-filter-insights', 'style': 'margin-left: 2.5ch; margin-right: 2.5ch;'}) - .addDiv({'class': 'bm-container bm-filter-stats-card'}) - .addSpan({'id': 'bm-filter-tile-load', 'innerHTML': 'Tiles Loaded: 0 / ???'}).buildElement() - .addBr().buildElement() - .addSpan({'id': 'bm-filter-tot-correct', 'innerHTML': 'Correct Pixels: ???'}).buildElement() - .addBr().buildElement() - .addSpan({'id': 'bm-filter-tot-total', 'innerHTML': 'Total Pixels: ???'}).buildElement() - .addBr().buildElement() - .addSpan({'id': 'bm-filter-tot-remaining', 'innerHTML': 'Complete: ??? (???)'}).buildElement() - .addBr().buildElement() - .addSpan({'id': 'bm-filter-tot-completed', 'innerHTML': '??? ???'}).buildElement() - .buildElement() - .addDiv({'class': 'bm-container bm-filter-note'}) - .addP({'innerHTML': `Press the ${windowedIcon.replace('Tiles Loaded: ${localizeNumber(this.tilesLoadedTotal)} / ${localizeNumber(this.tilesTotal)}`); - this.updateInnerHTML('#bm-filter-tot-correct', `Correct Pixels: ${localizeNumber(this.allPixelsCorrectTotal)}`); - this.updateInnerHTML('#bm-filter-tot-total', `Total Pixels: ${localizeNumber(this.allPixelsTotal)}`); - this.updateInnerHTML('#bm-filter-tot-remaining', `Remaining: ${localizeNumber((this.allPixelsTotal || 0) - (this.allPixelsCorrectTotal || 0))} (${localizePercent(((this.allPixelsTotal || 0) - (this.allPixelsCorrectTotal || 0)) / (this.allPixelsTotal || 1))})`); - this.updateInnerHTML('#bm-filter-tot-completed', `Completed at: `); + this.updateInnerHTML('#bm-filter-tile-load', `${localizeNumber(this.tilesLoadedTotal)} / ${localizeNumber(this.tilesTotal)}`); + this.updateInnerHTML('#bm-filter-tot-correct', localizeNumber(this.allPixelsCorrectTotal)); + this.updateInnerHTML('#bm-filter-tot-total', localizeNumber(this.allPixelsTotal)); + this.updateInnerHTML('#bm-filter-tot-remaining', `${localizeNumber((this.allPixelsTotal || 0) - (this.allPixelsCorrectTotal || 0))} (${localizePercent(((this.allPixelsTotal || 0) - (this.allPixelsCorrectTotal || 0)) / (this.allPixelsTotal || 1))})`); + this.updateInnerHTML('#bm-filter-tot-completed', ``); this.#startAutoRefresh(); } @@ -606,6 +614,11 @@ export default class WindowFilter extends Overlay { // Changes the luminance of the hover/focus button effect const bgEffectForButtons = (textColorForPaletteColorBackground == 'white') ? 'bm-button-hover-white' : 'bm-button-hover-black'; + const colorRGB = color.rgb?.map(channel => Number(channel) || 0).join(','); + const colorCardText = ((color.id == -2) || (color.id == -1) || (color.id == 0)) + ? 'white' + : textColorForPaletteColorBackground; + const colorCardStyle = `--bm-filter-card-bg: rgb(${colorRGB}); --bm-filter-card-fg: ${colorCardText};`; // Generated by #updateColorList() const { @@ -631,6 +644,7 @@ export default class WindowFilter extends Overlay { 'data-id': color.id, 'data-name': color.name, 'data-premium': +color.premium, + 'data-state': isColorHidden ? 'hidden' : 'shown', 'data-correct': !Number.isNaN(parseInt(colorCorrect)) ? colorCorrect : '0', 'data-total': colorTotal, 'data-percent': (colorPercent.slice(-1) == '%') ? colorPercent.slice(0, -1) : '0', @@ -638,7 +652,7 @@ export default class WindowFilter extends Overlay { }, (instance, div) => this.#initializeColorBlockToggle(div, color)) .addDiv({'class': 'bm-filter-container-rgb', 'style': `background-color: rgb(${color.rgb?.map(channel => Number(channel) || 0).join(',')});${color.premium ? styleBackgroundStar : ''}`}) .addButton({ - 'class': 'bm-button-trans ' + bgEffectForButtons, + 'class': 'bm-button-trans bm-filter-color-visibility ' + bgEffectForButtons, 'data-state': isColorHidden ? 'hidden' : 'shown', 'aria-label': isColorHidden ? `Show the color ${color.name || ''} on templates.` : `Hide the color ${color.name || ''} on templates.`, 'innerHTML': isColorHidden ? this.eyeClosed : this.eyeOpen, @@ -666,22 +680,25 @@ export default class WindowFilter extends Overlay { // Add fullscreen mode color DOM to color list colorList.addDiv({'class': 'bm-container bm-filter-color bm-flex-between', + 'style': colorCardStyle, 'data-id': color.id, 'data-name': color.name, 'data-premium': +color.premium, + 'data-state': isColorHidden ? 'hidden' : 'shown', 'data-correct': !Number.isNaN(parseInt(colorCorrect)) ? colorCorrect : '0', 'data-total': colorTotal, 'data-percent': (colorPercent.slice(-1) == '%') ? colorPercent.slice(0, -1) : '0', 'data-incorrect': colorIncorrect || 0 }, (instance, div) => this.#initializeColorBlockToggle(div, color)) - .addDiv({'class': 'bm-flex-center', 'style': 'flex-direction: column;'}) - .addDiv({'class': 'bm-filter-container-rgb', 'style': `background-color: rgb(${color.rgb?.map(channel => Number(channel) || 0).join(',')});`}) + .addDiv({'class': 'bm-filter-premium-star', 'aria-hidden': 'true'}).buildElement() + .addDiv({'class': 'bm-filter-color-main'}) + .addDiv({'class': 'bm-filter-container-rgb'}) .addButton({ - 'class': 'bm-button-trans ' + bgEffectForButtons, + 'class': 'bm-button-trans bm-filter-color-visibility ' + bgEffectForButtons, 'data-state': isColorHidden ? 'hidden' : 'shown', 'aria-label': isColorHidden ? `Show the color ${color.name || ''} on templates.` : `Hide the color ${color.name || ''} on templates.`, 'innerHTML': isColorHidden ? this.eyeClosed : this.eyeOpen, - 'style': `color: ${textColorForPaletteColorBackground};`}, + 'style': `color: ${colorCardText};`}, (instance, button) => { // When the button is clicked @@ -696,15 +713,16 @@ export default class WindowFilter extends Overlay { } ).buildElement() .buildElement() - .addSmall({'textContent': (color.id == -2) ? '???????' : colorValueHex}).buildElement() - .buildElement() - .addDiv({'class': 'bm-flex-between'}) - .addHeader(2, {'textContent': (color.premium ? '★ ' : '') + color.name}).buildElement() - .addDiv({'class': 'bm-flex-between', 'style': 'gap: 1.5ch;'}) - .addSmall({'textContent': `#${color.id.toString().padStart(2, 0)}`}).buildElement() - .addSmall({'class': 'bm-filter-color-pxl-cnt', 'textContent': `${colorCorrectLocalized} / ${colorTotalLocalized}`}).buildElement() + .addDiv({'class': 'bm-filter-color-title'}) + .addSmall({'textContent': `#${color.id.toString().padStart(2, 0)} / ${(color.id == -2) ? 'mixed' : colorValueHex}`}).buildElement() + .addHeader(2, {'textContent': color.name}).buildElement() + .buildElement() + .buildElement() + .addDiv({'class': 'bm-filter-color-meta'}) + .addDiv({'class': 'bm-filter-color-progress'}) + .addSpan({'class': 'bm-filter-color-pxl-cnt', 'textContent': `${colorCorrectLocalized} / ${colorTotalLocalized}`}).buildElement() + .addSmall({'class': 'bm-filter-color-pxl-desc', 'innerHTML': `${colorPercent} done
${((typeof colorIncorrect == 'number') && !isNaN(colorIncorrect)) ? colorIncorrect : '???'} off`}).buildElement() .buildElement() - .addP({'class': 'bm-filter-color-pxl-desc', 'textContent': `${((typeof colorIncorrect == 'number') && !isNaN(colorIncorrect)) ? colorIncorrect : '???'} incorrect pixel${(colorIncorrect == 1) ? '' : 's'}. Completed: ${colorPercent}`}).buildElement() .buildElement() .buildElement(); } @@ -784,7 +802,7 @@ export default class WindowFilter extends Overlay { if (color.classList?.contains('bm-color-hide')) {continue;} // Gets the button to click - const button = color.querySelector('.bm-filter-container-rgb button'); + const button = color.querySelector('.bm-filter-color-visibility'); // Exits early if the button is in its proper state if ((button.dataset['state'] == 'hidden') && !userWantsUnselect) {continue;} // If the button is selected, and the user wants to select all buttons, then skip this one @@ -805,7 +823,11 @@ export default class WindowFilter extends Overlay { : `Hide the color ${color.name || ''} on templates.`; button.ariaLabel = ariaLabel; - button.closest('.bm-filter-color')?.setAttribute('aria-label', ariaLabel); + + const colorElement = button.closest('.bm-filter-color'); + colorElement?.setAttribute('aria-label', ariaLabel); + colorElement?.setAttribute('data-state', button.dataset['state']); + } /** Toggles a color from the clickable color block or its icon. @@ -849,7 +871,7 @@ export default class WindowFilter extends Overlay { colorElement.onclick = event => { if (event.target instanceof Element && event.target.closest('button, a, input, select, textarea')) {return;} - const button = colorElement.querySelector('.bm-filter-container-rgb button'); + const button = colorElement.querySelector('.bm-filter-color-visibility'); this.#toggleColorVisibility(button, color); }; @@ -944,11 +966,11 @@ export default class WindowFilter extends Overlay { this.updateInnerHTML('#bm-filter-windowed-color-totals', `${allCorrect}/${allTotal}`, true); } - this.updateInnerHTML('#bm-filter-tile-load', `Tiles Loaded: ${localizeNumber(this.tilesLoadedTotal)} / ${localizeNumber(this.tilesTotal)}`); - this.updateInnerHTML('#bm-filter-tot-correct', `Correct Pixels: ${localizeNumber(this.allPixelsCorrectTotal)}`); - this.updateInnerHTML('#bm-filter-tot-total', `Total Pixels: ${localizeNumber(this.allPixelsTotal)}`); - this.updateInnerHTML('#bm-filter-tot-remaining', `Remaining: ${localizeNumber((this.allPixelsTotal || 0) - (this.allPixelsCorrectTotal || 0))} (${localizePercent(((this.allPixelsTotal || 0) - (this.allPixelsCorrectTotal || 0)) / (this.allPixelsTotal || 1))})`); - this.updateInnerHTML('#bm-filter-tot-completed', `Completed at: `); + this.updateInnerHTML('#bm-filter-tile-load', `${localizeNumber(this.tilesLoadedTotal)} / ${localizeNumber(this.tilesTotal)}`); + this.updateInnerHTML('#bm-filter-tot-correct', localizeNumber(this.allPixelsCorrectTotal)); + this.updateInnerHTML('#bm-filter-tot-total', localizeNumber(this.allPixelsTotal)); + this.updateInnerHTML('#bm-filter-tot-remaining', `${localizeNumber((this.allPixelsTotal || 0) - (this.allPixelsCorrectTotal || 0))} (${localizePercent(((this.allPixelsTotal || 0) - (this.allPixelsCorrectTotal || 0)) / (this.allPixelsTotal || 1))})`); + this.updateInnerHTML('#bm-filter-tot-completed', ``); // Return early if the color list does not exist. // We can't update DOM elements that don't exist, so we exit now. @@ -983,7 +1005,7 @@ export default class WindowFilter extends Overlay { // Updates the pixel description if it exists const pixelDesc = document.querySelector(`#${this.windowID} .bm-filter-color[data-id="${colorID}"] .bm-filter-color-pxl-desc`); - if (pixelDesc) {pixelDesc.textContent = `${((typeof colorIncorrect == 'number') && !isNaN(colorIncorrect)) ? colorIncorrect : '???'} incorrect pixel${(colorIncorrect == 1) ? '' : 's'}. Completed: ${colorPercent}`;} + if (pixelDesc) {pixelDesc.innerHTML = `${colorPercent} done
${((typeof colorIncorrect == 'number') && !isNaN(colorIncorrect)) ? colorIncorrect : '???'} off`;} } // Since the dataset has changed, we need to sort again