From d8fa7c6465532ff7212bd8d723583d9405fdbafe Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Apr 2024 05:14:42 +0000 Subject: [PATCH] Update webpanel --- api/10.3.0 | 1 + .../5.7.0/165.ba83e5a7e5ce7342f32c.bundle.js | 2 + .../165.ba83e5a7e5ce7342f32c.bundle.js.map | 1 + .../5.7.0/171.91936e72280a3d6afb03.bundle.js | 2 + .../171.91936e72280a3d6afb03.bundle.js.map | 1 + .../5.7.0/182.863e8e49ed9d42931724.bundle.js | 2 + .../182.863e8e49ed9d42931724.bundle.js.map | 1 + .../5.7.0/233.bca5af88bf85dd9388cf.bundle.js | 2 + .../233.bca5af88bf85dd9388cf.bundle.js.map | 1 + .../5.7.0/240.9d4d9c96f62ce48cce5f.bundle.js | 2 + .../240.9d4d9c96f62ce48cce5f.bundle.js.map | 1 + .../5.7.0/246.67f9678139a3c824ae5c.bundle.js | 2 + .../246.67f9678139a3c824ae5c.bundle.js.map | 1 + .../5.7.0/264.6bc80619e126b48208c1.bundle.js | 2 + .../264.6bc80619e126b48208c1.bundle.js.map | 1 + .../5.7.0/318.262f7ca0e51a961f2197.bundle.js | 2 + .../318.262f7ca0e51a961f2197.bundle.js.map | 1 + .../5.7.0/338.3abb1cf4078b59bacaa5.bundle.js | 2 + .../338.3abb1cf4078b59bacaa5.bundle.js.map | 1 + .../5.7.0/340.60c7f09c8654c822471d.bundle.js | 2 + .../340.60c7f09c8654c822471d.bundle.js.map | 1 + .../5.7.0/345.463f4581d9005d5a1f8f.bundle.js | 2 + .../345.463f4581d9005d5a1f8f.bundle.js.map | 1 + .../5.7.0/356.8162c10f9d74465626fb.bundle.js | 2 + .../356.8162c10f9d74465626fb.bundle.js.map | 1 + .../5.7.0/363.d935e8c7446b49ba6955.bundle.js | 2 + .../363.d935e8c7446b49ba6955.bundle.js.map | 1 + .../5.7.0/370.d23700bdb9e4969823c6.bundle.js | 2 + .../370.d23700bdb9e4969823c6.bundle.js.map | 1 + .../5.7.0/404.a8f6c9632768de417c6c.bundle.js | 2 + .../404.a8f6c9632768de417c6c.bundle.js.map | 1 + .../5.7.0/408.67a24726289357584bda.bundle.js | 2 + .../408.67a24726289357584bda.bundle.js.map | 1 + .../5.7.0/422.de987a83a6a343eed949.bundle.js | 1 + .../5.7.0/51.018c826056e10797488e.bundle.js | 2 + .../51.018c826056e10797488e.bundle.js.map | 1 + .../5.7.0/578.b30e90acaefb17f3a915.bundle.js | 2 + .../578.b30e90acaefb17f3a915.bundle.js.map | 1 + .../5.7.0/6.8be2a144a2793570315b.bundle.js | 2 + .../6.8be2a144a2793570315b.bundle.js.map | 1 + .../5.7.0/607.592e15ea131f62401699.bundle.js | 2 + .../607.592e15ea131f62401699.bundle.js.map | 1 + .../5.7.0/608.cdba29b0c970b4473f8d.bundle.js | 2 + .../608.cdba29b0c970b4473f8d.bundle.js.map | 1 + .../5.7.0/611.9c4e031ea3c5676ddc02.bundle.js | 2 + .../611.9c4e031ea3c5676ddc02.bundle.js.map | 1 + .../5.7.0/637.67f97d250d5cc7c88b41.bundle.js | 2 + .../637.67f97d250d5cc7c88b41.bundle.js.map | 1 + .../5.7.0/638.22ae8c317d679c0fbe03.bundle.js | 2 + .../638.22ae8c317d679c0fbe03.bundle.js.map | 1 + .../5.7.0/657.ebfcf366f770219cda87.bundle.js | 2 + .../657.ebfcf366f770219cda87.bundle.js.map | 1 + .../5.7.0/666.466319a2ec0bfe75619b.bundle.js | 2 + .../666.466319a2ec0bfe75619b.bundle.js.map | 1 + .../5.7.0/67.d56fce4f5250e06063bf.bundle.js | 2 + .../67.d56fce4f5250e06063bf.bundle.js.map | 1 + .../5.7.0/670.f23545dfb1fa34187665.bundle.js | 2 + .../670.f23545dfb1fa34187665.bundle.js.map | 1 + .../5.7.0/671.d70d3c2a0ea3e94cdaa3.bundle.js | 2 + .../671.d70d3c2a0ea3e94cdaa3.bundle.js.map | 1 + .../5.7.0/685.d842923a8b4fb2925914.bundle.js | 2 + .../685.d842923a8b4fb2925914.bundle.js.map | 1 + .../5.7.0/724.37608abcbb4a745b53ee.bundle.js | 2 + .../724.37608abcbb4a745b53ee.bundle.js.map | 1 + .../5.7.0/732.26d1b1972e8409d84e2b.bundle.js | 2 + .../732.26d1b1972e8409d84e2b.bundle.js.map | 1 + .../5.7.0/740.ff042fc269d749115529.bundle.js | 2 + .../740.ff042fc269d749115529.bundle.js.map | 1 + .../5.7.0/746.24e79402e2a97d9d230f.bundle.js | 2 + .../746.24e79402e2a97d9d230f.bundle.js.map | 1 + .../5.7.0/747.a7a7de444f0f31df471a.bundle.js | 2 + .../747.a7a7de444f0f31df471a.bundle.js.map | 1 + .../5.7.0/756.3ea7efa9992f327c4f5e.bundle.js | 2 + .../756.3ea7efa9992f327c4f5e.bundle.js.map | 1 + .../5.7.0/757.cd59822a9cafc5472de2.bundle.js | 2 + .../757.cd59822a9cafc5472de2.bundle.js.map | 1 + .../5.7.0/767.2226708e286478875491.bundle.js | 2 + .../767.2226708e286478875491.bundle.js.map | 1 + .../5.7.0/792.d0502c03902c2b81a3bc.bundle.js | 2 + .../792.d0502c03902c2b81a3bc.bundle.js.map | 1 + .../5.7.0/799.5f592f7ea70157f79ee3.bundle.js | 2 + .../799.5f592f7ea70157f79ee3.bundle.js.map | 1 + .../5.7.0/803.e84dc0cafa5ef825835a.bundle.js | 2 + .../803.e84dc0cafa5ef825835a.bundle.js.map | 1 + .../5.7.0/818.de10c00448eedd21537d.bundle.js | 2 + .../818.de10c00448eedd21537d.bundle.js.map | 1 + webpanel/5.7.0/835dd74f1c08a7f91a60.svg | 1 + .../5.7.0/856.4c7ce7828aeda2beaebd.bundle.js | 2 + .../856.4c7ce7828aeda2beaebd.bundle.js.map | 1 + .../5.7.0/898.506fa6125431a4f5701d.bundle.js | 2 + .../898.506fa6125431a4f5701d.bundle.js.map | 1 + .../5.7.0/899.40a4d85a43cf77edbe66.bundle.js | 2 + .../899.40a4d85a43cf77edbe66.bundle.js.map | 1 + .../5.7.0/921.d5768a750d900f116d8c.bundle.js | 2 + .../921.d5768a750d900f116d8c.bundle.js.map | 1 + .../5.7.0/926.9721f261bd7f5a7449df.bundle.js | 2 + .../926.9721f261bd7f5a7449df.bundle.js.map | 1 + webpanel/5.7.0/995a88a72fd6520c8505.png | Bin 0 -> 2807 bytes webpanel/5.7.0/android-chrome-192x192.png | Bin 0 -> 21288 bytes webpanel/5.7.0/android-chrome-512x512.png | Bin 0 -> 54467 bytes webpanel/5.7.0/apple-touch-icon.png | Bin 0 -> 19692 bytes webpanel/5.7.0/b5616c99bf2052a6bbd7.svg | 121 +++++++++++++++ webpanel/5.7.0/browserconfig.xml | 9 ++ webpanel/5.7.0/c97e39e417e48a3282f9.svg | 74 +++++++++ webpanel/5.7.0/favicon-16x16.png | Bin 0 -> 1430 bytes webpanel/5.7.0/favicon-32x32.png | Bin 0 -> 2924 bytes webpanel/5.7.0/favicon.ico | Bin 0 -> 15086 bytes .../5.7.0/main.23756f40ad9814a1e9eb.bundle.js | 2 + .../main.23756f40ad9814a1e9eb.bundle.js.map | 1 + webpanel/5.7.0/manifest.json | 19 +++ webpanel/5.7.0/mstile-144x144.png | Bin 0 -> 15228 bytes webpanel/5.7.0/mstile-150x150.png | Bin 0 -> 14265 bytes webpanel/5.7.0/mstile-310x150.png | Bin 0 -> 15096 bytes webpanel/5.7.0/mstile-310x310.png | Bin 0 -> 31932 bytes webpanel/5.7.0/mstile-70x70.png | Bin 0 -> 9967 bytes webpanel/5.7.0/safari-pinned-tab.svg | 140 ++++++++++++++++++ webpanel/5.7.0/service-worker.js | 1 + webpanel/5.7.0/site.webmanifest | 19 +++ webpanel/5.7.0/webpanelmanifest.json | 1 + 119 files changed, 531 insertions(+) create mode 120000 api/10.3.0 create mode 100644 webpanel/5.7.0/165.ba83e5a7e5ce7342f32c.bundle.js create mode 100644 webpanel/5.7.0/165.ba83e5a7e5ce7342f32c.bundle.js.map create mode 100644 webpanel/5.7.0/171.91936e72280a3d6afb03.bundle.js create mode 100644 webpanel/5.7.0/171.91936e72280a3d6afb03.bundle.js.map create mode 100644 webpanel/5.7.0/182.863e8e49ed9d42931724.bundle.js create mode 100644 webpanel/5.7.0/182.863e8e49ed9d42931724.bundle.js.map create mode 100644 webpanel/5.7.0/233.bca5af88bf85dd9388cf.bundle.js create mode 100644 webpanel/5.7.0/233.bca5af88bf85dd9388cf.bundle.js.map create mode 100644 webpanel/5.7.0/240.9d4d9c96f62ce48cce5f.bundle.js create mode 100644 webpanel/5.7.0/240.9d4d9c96f62ce48cce5f.bundle.js.map create mode 100644 webpanel/5.7.0/246.67f9678139a3c824ae5c.bundle.js create mode 100644 webpanel/5.7.0/246.67f9678139a3c824ae5c.bundle.js.map create mode 100644 webpanel/5.7.0/264.6bc80619e126b48208c1.bundle.js create mode 100644 webpanel/5.7.0/264.6bc80619e126b48208c1.bundle.js.map create mode 100644 webpanel/5.7.0/318.262f7ca0e51a961f2197.bundle.js create mode 100644 webpanel/5.7.0/318.262f7ca0e51a961f2197.bundle.js.map create mode 100644 webpanel/5.7.0/338.3abb1cf4078b59bacaa5.bundle.js create mode 100644 webpanel/5.7.0/338.3abb1cf4078b59bacaa5.bundle.js.map create mode 100644 webpanel/5.7.0/340.60c7f09c8654c822471d.bundle.js create mode 100644 webpanel/5.7.0/340.60c7f09c8654c822471d.bundle.js.map create mode 100644 webpanel/5.7.0/345.463f4581d9005d5a1f8f.bundle.js create mode 100644 webpanel/5.7.0/345.463f4581d9005d5a1f8f.bundle.js.map create mode 100644 webpanel/5.7.0/356.8162c10f9d74465626fb.bundle.js create mode 100644 webpanel/5.7.0/356.8162c10f9d74465626fb.bundle.js.map create mode 100644 webpanel/5.7.0/363.d935e8c7446b49ba6955.bundle.js create mode 100644 webpanel/5.7.0/363.d935e8c7446b49ba6955.bundle.js.map create mode 100644 webpanel/5.7.0/370.d23700bdb9e4969823c6.bundle.js create mode 100644 webpanel/5.7.0/370.d23700bdb9e4969823c6.bundle.js.map create mode 100644 webpanel/5.7.0/404.a8f6c9632768de417c6c.bundle.js create mode 100644 webpanel/5.7.0/404.a8f6c9632768de417c6c.bundle.js.map create mode 100644 webpanel/5.7.0/408.67a24726289357584bda.bundle.js create mode 100644 webpanel/5.7.0/408.67a24726289357584bda.bundle.js.map create mode 100644 webpanel/5.7.0/422.de987a83a6a343eed949.bundle.js create mode 100644 webpanel/5.7.0/51.018c826056e10797488e.bundle.js create mode 100644 webpanel/5.7.0/51.018c826056e10797488e.bundle.js.map create mode 100644 webpanel/5.7.0/578.b30e90acaefb17f3a915.bundle.js create mode 100644 webpanel/5.7.0/578.b30e90acaefb17f3a915.bundle.js.map create mode 100644 webpanel/5.7.0/6.8be2a144a2793570315b.bundle.js create mode 100644 webpanel/5.7.0/6.8be2a144a2793570315b.bundle.js.map create mode 100644 webpanel/5.7.0/607.592e15ea131f62401699.bundle.js create mode 100644 webpanel/5.7.0/607.592e15ea131f62401699.bundle.js.map create mode 100644 webpanel/5.7.0/608.cdba29b0c970b4473f8d.bundle.js create mode 100644 webpanel/5.7.0/608.cdba29b0c970b4473f8d.bundle.js.map create mode 100644 webpanel/5.7.0/611.9c4e031ea3c5676ddc02.bundle.js create mode 100644 webpanel/5.7.0/611.9c4e031ea3c5676ddc02.bundle.js.map create mode 100644 webpanel/5.7.0/637.67f97d250d5cc7c88b41.bundle.js create mode 100644 webpanel/5.7.0/637.67f97d250d5cc7c88b41.bundle.js.map create mode 100644 webpanel/5.7.0/638.22ae8c317d679c0fbe03.bundle.js create mode 100644 webpanel/5.7.0/638.22ae8c317d679c0fbe03.bundle.js.map create mode 100644 webpanel/5.7.0/657.ebfcf366f770219cda87.bundle.js create mode 100644 webpanel/5.7.0/657.ebfcf366f770219cda87.bundle.js.map create mode 100644 webpanel/5.7.0/666.466319a2ec0bfe75619b.bundle.js create mode 100644 webpanel/5.7.0/666.466319a2ec0bfe75619b.bundle.js.map create mode 100644 webpanel/5.7.0/67.d56fce4f5250e06063bf.bundle.js create mode 100644 webpanel/5.7.0/67.d56fce4f5250e06063bf.bundle.js.map create mode 100644 webpanel/5.7.0/670.f23545dfb1fa34187665.bundle.js create mode 100644 webpanel/5.7.0/670.f23545dfb1fa34187665.bundle.js.map create mode 100644 webpanel/5.7.0/671.d70d3c2a0ea3e94cdaa3.bundle.js create mode 100644 webpanel/5.7.0/671.d70d3c2a0ea3e94cdaa3.bundle.js.map create mode 100644 webpanel/5.7.0/685.d842923a8b4fb2925914.bundle.js create mode 100644 webpanel/5.7.0/685.d842923a8b4fb2925914.bundle.js.map create mode 100644 webpanel/5.7.0/724.37608abcbb4a745b53ee.bundle.js create mode 100644 webpanel/5.7.0/724.37608abcbb4a745b53ee.bundle.js.map create mode 100644 webpanel/5.7.0/732.26d1b1972e8409d84e2b.bundle.js create mode 100644 webpanel/5.7.0/732.26d1b1972e8409d84e2b.bundle.js.map create mode 100644 webpanel/5.7.0/740.ff042fc269d749115529.bundle.js create mode 100644 webpanel/5.7.0/740.ff042fc269d749115529.bundle.js.map create mode 100644 webpanel/5.7.0/746.24e79402e2a97d9d230f.bundle.js create mode 100644 webpanel/5.7.0/746.24e79402e2a97d9d230f.bundle.js.map create mode 100644 webpanel/5.7.0/747.a7a7de444f0f31df471a.bundle.js create mode 100644 webpanel/5.7.0/747.a7a7de444f0f31df471a.bundle.js.map create mode 100644 webpanel/5.7.0/756.3ea7efa9992f327c4f5e.bundle.js create mode 100644 webpanel/5.7.0/756.3ea7efa9992f327c4f5e.bundle.js.map create mode 100644 webpanel/5.7.0/757.cd59822a9cafc5472de2.bundle.js create mode 100644 webpanel/5.7.0/757.cd59822a9cafc5472de2.bundle.js.map create mode 100644 webpanel/5.7.0/767.2226708e286478875491.bundle.js create mode 100644 webpanel/5.7.0/767.2226708e286478875491.bundle.js.map create mode 100644 webpanel/5.7.0/792.d0502c03902c2b81a3bc.bundle.js create mode 100644 webpanel/5.7.0/792.d0502c03902c2b81a3bc.bundle.js.map create mode 100644 webpanel/5.7.0/799.5f592f7ea70157f79ee3.bundle.js create mode 100644 webpanel/5.7.0/799.5f592f7ea70157f79ee3.bundle.js.map create mode 100644 webpanel/5.7.0/803.e84dc0cafa5ef825835a.bundle.js create mode 100644 webpanel/5.7.0/803.e84dc0cafa5ef825835a.bundle.js.map create mode 100644 webpanel/5.7.0/818.de10c00448eedd21537d.bundle.js create mode 100644 webpanel/5.7.0/818.de10c00448eedd21537d.bundle.js.map create mode 100644 webpanel/5.7.0/835dd74f1c08a7f91a60.svg create mode 100644 webpanel/5.7.0/856.4c7ce7828aeda2beaebd.bundle.js create mode 100644 webpanel/5.7.0/856.4c7ce7828aeda2beaebd.bundle.js.map create mode 100644 webpanel/5.7.0/898.506fa6125431a4f5701d.bundle.js create mode 100644 webpanel/5.7.0/898.506fa6125431a4f5701d.bundle.js.map create mode 100644 webpanel/5.7.0/899.40a4d85a43cf77edbe66.bundle.js create mode 100644 webpanel/5.7.0/899.40a4d85a43cf77edbe66.bundle.js.map create mode 100644 webpanel/5.7.0/921.d5768a750d900f116d8c.bundle.js create mode 100644 webpanel/5.7.0/921.d5768a750d900f116d8c.bundle.js.map create mode 100644 webpanel/5.7.0/926.9721f261bd7f5a7449df.bundle.js create mode 100644 webpanel/5.7.0/926.9721f261bd7f5a7449df.bundle.js.map create mode 100644 webpanel/5.7.0/995a88a72fd6520c8505.png create mode 100644 webpanel/5.7.0/android-chrome-192x192.png create mode 100644 webpanel/5.7.0/android-chrome-512x512.png create mode 100644 webpanel/5.7.0/apple-touch-icon.png create mode 100644 webpanel/5.7.0/b5616c99bf2052a6bbd7.svg create mode 100644 webpanel/5.7.0/browserconfig.xml create mode 100644 webpanel/5.7.0/c97e39e417e48a3282f9.svg create mode 100644 webpanel/5.7.0/favicon-16x16.png create mode 100644 webpanel/5.7.0/favicon-32x32.png create mode 100644 webpanel/5.7.0/favicon.ico create mode 100644 webpanel/5.7.0/main.23756f40ad9814a1e9eb.bundle.js create mode 100644 webpanel/5.7.0/main.23756f40ad9814a1e9eb.bundle.js.map create mode 100644 webpanel/5.7.0/manifest.json create mode 100644 webpanel/5.7.0/mstile-144x144.png create mode 100644 webpanel/5.7.0/mstile-150x150.png create mode 100644 webpanel/5.7.0/mstile-310x150.png create mode 100644 webpanel/5.7.0/mstile-310x310.png create mode 100644 webpanel/5.7.0/mstile-70x70.png create mode 100644 webpanel/5.7.0/safari-pinned-tab.svg create mode 100644 webpanel/5.7.0/service-worker.js create mode 100644 webpanel/5.7.0/site.webmanifest create mode 100644 webpanel/5.7.0/webpanelmanifest.json diff --git a/api/10.3.0 b/api/10.3.0 new file mode 120000 index 00000000..f1a6d57c --- /dev/null +++ b/api/10.3.0 @@ -0,0 +1 @@ +../webpanel/5.7.0 \ No newline at end of file diff --git a/webpanel/5.7.0/165.ba83e5a7e5ce7342f32c.bundle.js b/webpanel/5.7.0/165.ba83e5a7e5ce7342f32c.bundle.js new file mode 100644 index 00000000..d1876fb9 --- /dev/null +++ b/webpanel/5.7.0/165.ba83e5a7e5ce7342f32c.bundle.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunktgstation_server_control_panel=self.webpackChunktgstation_server_control_panel||[]).push([[165,657],{48256:function(e,t,n){n.d(t,{RZ:function(){return x}}),"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(e,t,n){const i=Number(0xffffffffn&t),r=Number(t>>32n);this.setUint32(e+(n?0:4),i,n),this.setUint32(e+(n?4:0),r,n)}});var i=e=>new DataView(new ArrayBuffer(e)),r=e=>new Uint8Array(e.buffer||e),a=e=>(new TextEncoder).encode(String(e)),o=e=>Math.min(4294967295,Number(e)),s=e=>Math.min(65535,Number(e));function l(e,t){if(void 0===t||t instanceof Date||(t=new Date(t)),e instanceof File)return{isFile:1,t:t||new Date(e.lastModified),i:e.stream()};if(e instanceof Response)return{isFile:1,t:t||new Date(e.headers.get("Last-Modified")||Date.now()),i:e.body};if(void 0===t)t=new Date;else if(isNaN(t))throw new Error("Invalid modification date.");if(void 0===e)return{isFile:0,t:t};if("string"==typeof e)return{isFile:1,t:t,i:a(e)};if(e instanceof Blob)return{isFile:1,t:t,i:e.stream()};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:1,t:t,i:e};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:1,t:t,i:r(e)};if(Symbol.asyncIterator in e)return{isFile:1,t:t,i:c(e)};throw new TypeError("Unsupported input format.")}function c(e){const t="next"in e?e:e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){let n=0;for(;e.desiredSize>n;){const i=await t.next();if(!i.value){e.close();break}{const t=f(i.value);e.enqueue(t),n+=t.byteLength}}}})}function f(e){return"string"==typeof e?a(e):e instanceof Uint8Array?e:r(e)}function u(e,t,n){if(void 0===t||t instanceof Uint8Array||(t=a(t)),e instanceof File)return{o:m(t||a(e.name)),A:BigInt(e.size)};if(e instanceof Response){const i=e.headers.get("content-disposition"),r=i&&i.match(/;\s*filename\*?=["']?(.*?)["']?$/i),o=r&&r[1]||e.url&&new URL(e.url).pathname.split("/").findLast(Boolean),s=o&&decodeURIComponent(o),l=n||+e.headers.get("content-length");return{o:m(t||a(s)),A:BigInt(l)}}return t=m(t,void 0!==e||void 0!==n),"string"==typeof e?{o:t,A:BigInt(a(e).length)}:e instanceof Blob?{o:t,A:BigInt(e.size)}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{o:t,A:BigInt(e.byteLength)}:{o:t,A:d(e,n)}}function d(e,t){return t>-1?BigInt(t):e?void 0:0n}function m(e,t=1){if(!e||e.every((e=>47===e)))throw new Error("The file must have a name.");if(t)for(;47===e[e.length-1];)e=e.subarray(0,-1);else 47!==e[e.length-1]&&(e=new Uint8Array([...e,47]));return e}var v=new WebAssembly.Instance(new WebAssembly.Module(Uint8Array.from(atob("AGFzbQEAAAABCgJgAABgAn9/AXwDAwIAAQUDAQACBwkCAW0CAAFjAAEIAQAKlQECSQEDfwNAIAEhAEEAIQIDQCAAQQF2IABBAXFBoIbi7X5scyEAIAJBAWoiAkEIRw0ACyABQQJ0IAA2AgAgAUEBaiIBQYACRw0ACwtJAQF/IAFBf3MhAUGAgAQhAkGAgAQgAGohAANAIAFB/wFxIAItAABzQQJ0KAIAIAFBCHZzIQEgAkEBaiICIABJDQALIAFBf3O4Cw"),(e=>e.charCodeAt(0))))),{c:p,m:A}=v.exports,g=r(A).subarray(65536);function E(e,t=0){for(const n of function*(e){for(;e.length>65536;)yield e.subarray(0,65536),e=e.subarray(65536);e.length&&(yield e)}(e))g.set(n),t=p(n.length,t);return t}function y(e,t,n=0){const i=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,r=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;t.setUint16(n,i,1),t.setUint16(n+2,r,1)}function h(e){const t=i(30);return t.setUint32(0,1347093252),t.setUint32(4,754976768),y(e.t,t,10),t.setUint16(26,e.o.length,1),r(t)}async function*b(e){let{i:t}=e;if("then"in t&&(t=await t),t instanceof Uint8Array)yield t,e.u=E(t,0),e.A=BigInt(t.length);else{e.A=0n;const n=t.getReader();for(;;){const{value:t,done:i}=await n.read();if(i)break;e.u=E(t,e.u),e.A+=BigInt(t.length),yield t}}}function w(e,t){const n=i(16+(t?8:0));return n.setUint32(0,1347094280),n.setUint32(4,e.isFile?e.u:0,1),t?(n.setBigUint64(8,e.A,1),n.setBigUint64(16,e.A,1)):(n.setUint32(8,o(e.A),1),n.setUint32(12,o(e.A),1)),r(n)}function U(e,t,n=0){const a=i(46);return a.setUint32(0,1347092738),a.setUint32(4,755182848),a.setUint16(8,2048),y(e.t,a,12),a.setUint32(16,e.isFile?e.u:0,1),a.setUint32(20,o(e.A),1),a.setUint32(24,o(e.A),1),a.setUint16(28,e.o.length,1),a.setUint16(30,n,1),a.setUint16(40,e.isFile?33204:16893,1),a.setUint32(42,o(t),1),r(a)}function B(e,t,n){const a=i(n);return a.setUint16(0,1,1),a.setUint16(2,n-4,1),16&n&&(a.setBigUint64(4,e.A,1),a.setBigUint64(12,e.A,1)),a.setBigUint64(n-8,t,1),r(a)}function I(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}function x(e,t={}){const n={"Content-Type":"application/zip","Content-Disposition":"attachment"};return("bigint"==typeof t.length||Number.isInteger(t.length))&&t.length>0&&(n["Content-Length"]=String(t.length)),t.metadata&&(n["Content-Length"]=String((e=>function(e){let t=BigInt(22),n=0n,i=0;for(const r of e){if(!r.o)throw new Error("Every file must have a non-empty name.");if(void 0===r.A)throw new Error(`Missing size for file "${(new TextDecoder).decode(r.o)}".`);const e=r.A>=0xffffffffn,a=n>=0xffffffffn;n+=BigInt(46+r.o.length+(e&&8))+r.A,t+=BigInt(r.o.length+46+(12*a|28*e)),i||(i=e)}return(i||n>=0xffffffffn)&&(t+=BigInt(76)),t+n}(function*(e){for(const t of e)yield u(...I(t)[0])}(e)))(t.metadata))),new Response(Z(e),{headers:n})}function Z(e){return c(async function*(e){const t=[];let n=0n,a=0n,l=0;for await(const i of e){yield h(i),yield i.o,i.isFile&&(yield*b(i));const e=i.A>=0xffffffffn,r=12*(n>=0xffffffffn)|28*e;yield w(i,e),t.push(U(i,n,r)),t.push(i.o),r&&t.push(B(i,n,r)),e&&(n+=8n),a++,n+=BigInt(46+i.o.length)+i.A,l||(l=e)}let c=0n;for(const e of t)yield e,c+=BigInt(e.length);if(l||n>=0xffffffffn){const e=i(76);e.setUint32(0,1347094022),e.setBigUint64(4,BigInt(44),1),e.setUint32(12,755182848),e.setBigUint64(24,a,1),e.setBigUint64(32,a,1),e.setBigUint64(40,c,1),e.setBigUint64(48,n,1),e.setUint32(56,1347094023),e.setBigUint64(64,n+c,1),e.setUint32(72,1,1),yield r(e)}const f=i(22);f.setUint32(0,1347093766),f.setUint16(8,s(a),1),f.setUint16(10,s(a),1),f.setUint32(12,o(c),1),f.setUint32(16,o(n),1),yield r(f)}(async function*(e){for await(const t of e){const[e,n]=I(t);yield Object.assign(l(...n),u(...e))}}(e)))}},38966:function(e,t,n){n.d(t,{Z:function(){return w}});var i=n(87462),r=n(63366),a=n(94184),o=n.n(a),s=n(67294),l=n(76792),c=n(48358),f=["active","disabled","className","style","activeLabel","children"],u=["children"],d=s.forwardRef((function(e,t){var n=e.active,a=e.disabled,l=e.className,u=e.style,d=e.activeLabel,m=e.children,v=(0,r.Z)(e,f),p=n||a?"span":c.Z;return s.createElement("li",{ref:t,style:u,className:o()(l,"page-item",{active:n,disabled:a})},s.createElement(p,(0,i.Z)({className:"page-link",disabled:a},v),m,n&&d&&s.createElement("span",{className:"sr-only"},d)))}));d.defaultProps={active:!1,disabled:!1,activeLabel:"(current)"},d.displayName="PageItem";var m=d;function v(e,t,n){function i(e){var i=e.children,a=(0,r.Z)(e,u);return s.createElement(d,a,s.createElement("span",{"aria-hidden":"true"},i||t),s.createElement("span",{className:"sr-only"},n))}return void 0===n&&(n=e),i.displayName=e,i}var p=v("First","\xab"),A=v("Prev","\u2039","Previous"),g=v("Ellipsis","\u2026","More"),E=v("Next","\u203a"),y=v("Last","\xbb"),h=["bsPrefix","className","children","size"],b=s.forwardRef((function(e,t){var n=e.bsPrefix,a=e.className,c=e.children,f=e.size,u=(0,r.Z)(e,h),d=(0,l.vE)(n,"pagination");return s.createElement("ul",(0,i.Z)({ref:t},u,{className:o()(a,d,f&&d+"-"+f)}),c)}));b.First=p,b.Prev=A,b.Ellipsis=g,b.Item=m,b.Next=E,b.Last=y;var w=b},19611:function(e,t,n){n.d(t,{Z:function(){return p}});var i=n(87462),r=n(63366),a=n(94184),o=n.n(a),s=n(67294),l=(n(55638),n(76792)),c=["as","bsPrefix","className","children"],f=s.forwardRef((function(e,t){var n=e.as,a=void 0===n?"div":n,f=e.bsPrefix,u=e.className,d=e.children,m=(0,r.Z)(e,c);return f=(0,l.vE)(f,"popover-header"),s.createElement(a,(0,i.Z)({ref:t},m,{className:o()(f,u)}),d)})),u=["as","bsPrefix","className","children"],d=s.forwardRef((function(e,t){var n=e.as,a=void 0===n?"div":n,c=e.bsPrefix,f=e.className,d=e.children,m=(0,r.Z)(e,u);return c=(0,l.vE)(c,"popover-body"),s.createElement(a,(0,i.Z)({ref:t},m,{className:o()(f,c)}),d)})),m=["bsPrefix","placement","className","style","children","content","arrowProps","popper","show"],v=s.forwardRef((function(e,t){var n=e.bsPrefix,a=e.placement,c=e.className,f=e.style,u=e.children,v=e.content,p=e.arrowProps,A=(e.popper,e.show,(0,r.Z)(e,m)),g=(0,l.vE)(n,"popover"),E=((null==a?void 0:a.split("-"))||[])[0];return s.createElement("div",(0,i.Z)({ref:t,role:"tooltip",style:f,"x-placement":E,className:o()(c,g,E&&"bs-popover-"+E)},A),s.createElement("div",(0,i.Z)({className:"arrow"},p)),v?s.createElement(d,null,u):u)}));v.defaultProps={placement:"right"},v.Title=f,v.Content=d;var p=v},56841:function(e,t,n){var i=n(51721),r=n(67294),a=n(97184),o=n(28752),s=n(75103),l=function(e){function t(){return e.apply(this,arguments)||this}return(0,i.Z)(t,e),t.prototype.render=function(){throw new Error("ReactBootstrap: The `Tab` component is not meant to be rendered! It's an abstract component that is only valid as a direct Child of the `Tabs` Component. For custom tabs components use TabPane and TabsContainer directly")},t}(r.Component);l.Container=a.Z,l.Content=o.Z,l.Pane=s.Z,t.Z=l},97184:function(e,t,n){var i=n(67294),r=n(14289),a=n(24426),o=n(45017);t.Z=function(e){var t=(0,r.Ch)(e,{activeKey:"onSelect"}),n=t.id,s=t.generateChildId,l=t.onSelect,c=t.activeKey,f=t.transition,u=t.mountOnEnter,d=t.unmountOnExit,m=t.children,v=(0,i.useMemo)((function(){return s||function(e,t){return n?n+"-"+t+"-"+e:null}}),[n,s]),p=(0,i.useMemo)((function(){return{onSelect:l,activeKey:c,transition:f,mountOnEnter:u||!1,unmountOnExit:d||!1,getControlledId:function(e){return v(e,"tabpane")},getControllerId:function(e){return v(e,"tab")}}}),[l,c,f,u,d,v]);return i.createElement(a.Z.Provider,{value:p},i.createElement(o.Z.Provider,{value:l||null},m))}},28752:function(e,t,n){var i=n(87462),r=n(63366),a=n(94184),o=n.n(a),s=n(67294),l=n(76792),c=["bsPrefix","as","className"],f=s.forwardRef((function(e,t){var n=e.bsPrefix,a=e.as,f=void 0===a?"div":a,u=e.className,d=(0,r.Z)(e,c),m=(0,l.vE)(n,"tab-content");return s.createElement(f,(0,i.Z)({ref:t},d,{className:o()(u,m)}))}));t.Z=f},75103:function(e,t,n){var i=n(87462),r=n(63366),a=n(94184),o=n.n(a),s=n(67294),l=n(76792),c=n(24426),f=n(45017),u=n(41068),d=["activeKey","getControlledId","getControllerId"],m=["bsPrefix","className","active","onEnter","onEntering","onEntered","onExit","onExiting","onExited","mountOnEnter","unmountOnExit","transition","as","eventKey"];var v=s.forwardRef((function(e,t){var n=function(e){var t=(0,s.useContext)(c.Z);if(!t)return e;var n=t.activeKey,a=t.getControlledId,o=t.getControllerId,l=(0,r.Z)(t,d),m=!1!==e.transition&&!1!==l.transition,v=(0,f.h)(e.eventKey);return(0,i.Z)({},e,{active:null==e.active&&null!=v?(0,f.h)(n)===v:e.active,id:a(e.eventKey),"aria-labelledby":o(e.eventKey),transition:m&&(e.transition||l.transition||u.Z),mountOnEnter:null!=e.mountOnEnter?e.mountOnEnter:l.mountOnEnter,unmountOnExit:null!=e.unmountOnExit?e.unmountOnExit:l.unmountOnExit})}(e),a=n.bsPrefix,v=n.className,p=n.active,A=n.onEnter,g=n.onEntering,E=n.onEntered,y=n.onExit,h=n.onExiting,b=n.onExited,w=n.mountOnEnter,U=n.unmountOnExit,B=n.transition,I=n.as,x=void 0===I?"div":I,Z=(n.eventKey,(0,r.Z)(n,m)),N=(0,l.vE)(a,"tab-pane");if(!p&&!B&&U)return null;var C=s.createElement(x,(0,i.Z)({},Z,{ref:t,role:"tabpanel","aria-hidden":!p,className:o()(v,N,{active:p})}));return B&&(C=s.createElement(B,{in:p,onEnter:A,onEntering:g,onEntered:E,onExit:y,onExiting:h,onExited:b,mountOnEnter:w,unmountOnExit:U},C)),s.createElement(c.Z.Provider,{value:null},s.createElement(f.Z.Provider,{value:null},C))}));v.displayName="TabPane",t.Z=v},85509:function(e,t,n){var i=n(87462),r=n(63366),a=n(67294),o=(n(55638),n(14289)),s=n(13361),l=n(23982),c=n(41244),f=n(97184),u=n(28752),d=n(75103),m=n(53439),v=["id","onSelect","transition","mountOnEnter","unmountOnExit","children","activeKey"];function p(e){var t=e.props,n=t.title,i=t.eventKey,r=t.disabled,o=t.tabClassName,s=t.id;return null==n?null:a.createElement(c.Z,{as:l.Z,eventKey:i,disabled:r,id:s,className:o},n)}var A=function(e){var t=(0,o.Ch)(e,{activeKey:"onSelect"}),n=t.id,l=t.onSelect,c=t.transition,A=t.mountOnEnter,g=t.unmountOnExit,E=t.children,y=t.activeKey,h=void 0===y?function(e){var t;return(0,m.E)(e,(function(e){null==t&&(t=e.props.eventKey)})),t}(E):y,b=(0,r.Z)(t,v);return a.createElement(f.Z,{id:n,activeKey:h,onSelect:l,transition:c,mountOnEnter:A,unmountOnExit:g},a.createElement(s.Z,(0,i.Z)({},b,{role:"tablist",as:"nav"}),(0,m.U)(E,p)),a.createElement(u.Z,null,(0,m.U)(E,(function(e){var t=(0,i.Z)({},e.props);return delete t.title,delete t.disabled,delete t.tabClassName,a.createElement(d.Z,t)}))))};A.defaultProps={variant:"tabs",mountOnEnter:!1,unmountOnExit:!1},A.displayName="Tabs",t.Z=A}}]); +//# sourceMappingURL=165.ba83e5a7e5ce7342f32c.bundle.js.map \ No newline at end of file diff --git a/webpanel/5.7.0/165.ba83e5a7e5ce7342f32c.bundle.js.map b/webpanel/5.7.0/165.ba83e5a7e5ce7342f32c.bundle.js.map new file mode 100644 index 00000000..52b60ccf --- /dev/null +++ b/webpanel/5.7.0/165.ba83e5a7e5ce7342f32c.bundle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"165.ba83e5a7e5ce7342f32c.bundle.js","mappings":"2LAAA,WAAWA,KAAKC,WAAWC,OAAOC,eAAeH,KAAKC,UAAU,S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ACXwF,EAAWN,aACE,gBAAoB,IAASM,SAIrDL,EAAK3E,aAvEc,CACjBiF,QAAS,OACTvC,cAAc,EACdC,eAAe,GAqEjBgC,EAAK1E,YAAc,OACnB","sources":["webpack://tgstation-server-control-panel/./node_modules/client-zip/index.js","webpack://tgstation-server-control-panel/./node_modules/react-bootstrap/esm/PageItem.js","webpack://tgstation-server-control-panel/./node_modules/react-bootstrap/esm/Pagination.js","webpack://tgstation-server-control-panel/./node_modules/react-bootstrap/esm/PopoverTitle.js","webpack://tgstation-server-control-panel/./node_modules/react-bootstrap/esm/PopoverContent.js","webpack://tgstation-server-control-panel/./node_modules/react-bootstrap/esm/Popover.js","webpack://tgstation-server-control-panel/./node_modules/react-bootstrap/esm/Tab.js","webpack://tgstation-server-control-panel/./node_modules/react-bootstrap/esm/TabContainer.js","webpack://tgstation-server-control-panel/./node_modules/react-bootstrap/esm/TabContent.js","webpack://tgstation-server-control-panel/./node_modules/react-bootstrap/esm/TabPane.js","webpack://tgstation-server-control-panel/./node_modules/react-bootstrap/esm/Tabs.js"],"sourcesContent":["\"stream\"in Blob.prototype||Object.defineProperty(Blob.prototype,\"stream\",{value(){return new Response(this).body}}),\"setBigUint64\"in DataView.prototype||Object.defineProperty(DataView.prototype,\"setBigUint64\",{value(n,e,t){const i=Number(0xffffffffn&e),o=Number(e>>32n);this.setUint32(n+(t?0:4),i,t),this.setUint32(n+(t?4:0),o,t)}});var n=n=>new DataView(new ArrayBuffer(n)),e=n=>new Uint8Array(n.buffer||n),t=n=>(new TextEncoder).encode(String(n)),i=n=>Math.min(4294967295,Number(n)),o=n=>Math.min(65535,Number(n));function f(n,i){if(void 0===i||i instanceof Date||(i=new Date(i)),n instanceof File)return{isFile:1,t:i||new Date(n.lastModified),i:n.stream()};if(n instanceof Response)return{isFile:1,t:i||new Date(n.headers.get(\"Last-Modified\")||Date.now()),i:n.body};if(void 0===i)i=new Date;else if(isNaN(i))throw new Error(\"Invalid modification date.\");if(void 0===n)return{isFile:0,t:i};if(\"string\"==typeof n)return{isFile:1,t:i,i:t(n)};if(n instanceof Blob)return{isFile:1,t:i,i:n.stream()};if(n instanceof Uint8Array||n instanceof ReadableStream)return{isFile:1,t:i,i:n};if(n instanceof ArrayBuffer||ArrayBuffer.isView(n))return{isFile:1,t:i,i:e(n)};if(Symbol.asyncIterator in n)return{isFile:1,t:i,i:r(n)};throw new TypeError(\"Unsupported input format.\")}function r(n){const e=\"next\"in n?n:n[Symbol.asyncIterator]();return new ReadableStream({async pull(n){let t=0;for(;n.desiredSize>t;){const i=await e.next();if(!i.value){n.close();break}{const e=s(i.value);n.enqueue(e),t+=e.byteLength}}}})}function s(n){return\"string\"==typeof n?t(n):n instanceof Uint8Array?n:e(n)}function a(n,e,i){if(void 0===e||e instanceof Uint8Array||(e=t(e)),n instanceof File)return{o:u(e||t(n.name)),A:BigInt(n.size)};if(n instanceof Response){const o=n.headers.get(\"content-disposition\"),f=o&&o.match(/;\\s*filename\\*?=[\"']?(.*?)[\"']?$/i),r=f&&f[1]||n.url&&new URL(n.url).pathname.split(\"/\").findLast(Boolean),s=r&&decodeURIComponent(r),a=i||+n.headers.get(\"content-length\");return{o:u(e||t(s)),A:BigInt(a)}}return e=u(e,void 0!==n||void 0!==i),\"string\"==typeof n?{o:e,A:BigInt(t(n).length)}:n instanceof Blob?{o:e,A:BigInt(n.size)}:n instanceof ArrayBuffer||ArrayBuffer.isView(n)?{o:e,A:BigInt(n.byteLength)}:{o:e,A:A(n,i)}}function A(n,e){return e>-1?BigInt(e):n?void 0:0n}function u(n,e=1){if(!n||n.every((n=>47===n)))throw new Error(\"The file must have a name.\");if(e)for(;47===n[n.length-1];)n=n.subarray(0,-1);else 47!==n[n.length-1]&&(n=new Uint8Array([...n,47]));return n}var d=new WebAssembly.Instance(new WebAssembly.Module(Uint8Array.from(atob(\"AGFzbQEAAAABCgJgAABgAn9/AXwDAwIAAQUDAQACBwkCAW0CAAFjAAEIAQAKlQECSQEDfwNAIAEhAEEAIQIDQCAAQQF2IABBAXFBoIbi7X5scyEAIAJBAWoiAkEIRw0ACyABQQJ0IAA2AgAgAUEBaiIBQYACRw0ACwtJAQF/IAFBf3MhAUGAgAQhAkGAgAQgAGohAANAIAFB/wFxIAItAABzQQJ0KAIAIAFBCHZzIQEgAkEBaiICIABJDQALIAFBf3O4Cw\"),(n=>n.charCodeAt(0))))),{c,m}=d.exports,l=e(m).subarray(65536);function y(n,e=0){for(const t of function*(n){for(;n.length>65536;)yield n.subarray(0,65536),n=n.subarray(65536);n.length&&(yield n)}(n))l.set(t),e=c(t.length,e);return e}function B(n,e,t=0){const i=n.getSeconds()>>1|n.getMinutes()<<5|n.getHours()<<11,o=n.getDate()|n.getMonth()+1<<5|n.getFullYear()-1980<<9;e.setUint16(t,i,1),e.setUint16(t+2,o,1)}function w(t){const i=n(30);return i.setUint32(0,1347093252),i.setUint32(4,754976768),B(t.t,i,10),i.setUint16(26,t.o.length,1),e(i)}async function*I(n){let{i:e}=n;if(\"then\"in e&&(e=await e),e instanceof Uint8Array)yield e,n.u=y(e,0),n.A=BigInt(e.length);else{n.A=0n;const t=e.getReader();for(;;){const{value:e,done:i}=await t.read();if(i)break;n.u=y(e,n.u),n.A+=BigInt(e.length),yield e}}}function g(t,o){const f=n(16+(o?8:0));return f.setUint32(0,1347094280),f.setUint32(4,t.isFile?t.u:0,1),o?(f.setBigUint64(8,t.A,1),f.setBigUint64(16,t.A,1)):(f.setUint32(8,i(t.A),1),f.setUint32(12,i(t.A),1)),e(f)}function b(t,o,f=0){const r=n(46);return r.setUint32(0,1347092738),r.setUint32(4,755182848),r.setUint16(8,2048),B(t.t,r,12),r.setUint32(16,t.isFile?t.u:0,1),r.setUint32(20,i(t.A),1),r.setUint32(24,i(t.A),1),r.setUint16(28,t.o.length,1),r.setUint16(30,f,1),r.setUint16(40,t.isFile?33204:16893,1),r.setUint32(42,i(o),1),e(r)}function p(t,i,o){const f=n(o);return f.setUint16(0,1,1),f.setUint16(2,o-4,1),16&o&&(f.setBigUint64(4,t.A,1),f.setBigUint64(12,t.A,1)),f.setBigUint64(o-8,i,1),e(f)}function D(n){return n instanceof File||n instanceof Response?[[n],[n]]:[[n.input,n.name,n.size],[n.input,n.lastModified]]}var h=n=>function(n){let e=BigInt(22),t=0n,i=0;for(const o of n){if(!o.o)throw new Error(\"Every file must have a non-empty name.\");if(void 0===o.A)throw new Error(`Missing size for file \"${(new TextDecoder).decode(o.o)}\".`);const n=o.A>=0xffffffffn,f=t>=0xffffffffn;t+=BigInt(46+o.o.length+(n&&8))+o.A,e+=BigInt(o.o.length+46+(12*f|28*n)),i||(i=n)}return(i||t>=0xffffffffn)&&(e+=BigInt(76)),e+t}(function*(n){for(const e of n)yield a(...D(e)[0])}(n));function F(n,e={}){const t={\"Content-Type\":\"application/zip\",\"Content-Disposition\":\"attachment\"};return(\"bigint\"==typeof e.length||Number.isInteger(e.length))&&e.length>0&&(t[\"Content-Length\"]=String(e.length)),e.metadata&&(t[\"Content-Length\"]=String(h(e.metadata))),new Response(Q(n),{headers:t})}function Q(t){return r(async function*(t){const f=[];let r=0n,s=0n,a=0;for await(const n of t){yield w(n),yield n.o,n.isFile&&(yield*I(n));const e=n.A>=0xffffffffn,t=12*(r>=0xffffffffn)|28*e;yield g(n,e),f.push(b(n,r,t)),f.push(n.o),t&&f.push(p(n,r,t)),e&&(r+=8n),s++,r+=BigInt(46+n.o.length)+n.A,a||(a=e)}let A=0n;for(const n of f)yield n,A+=BigInt(n.length);if(a||r>=0xffffffffn){const t=n(76);t.setUint32(0,1347094022),t.setBigUint64(4,BigInt(44),1),t.setUint32(12,755182848),t.setBigUint64(24,s,1),t.setBigUint64(32,s,1),t.setBigUint64(40,A,1),t.setBigUint64(48,r,1),t.setUint32(56,1347094023),t.setBigUint64(64,r+A,1),t.setUint32(72,1,1),yield e(t)}const u=n(22);u.setUint32(0,1347093766),u.setUint16(8,o(s),1),u.setUint16(10,o(s),1),u.setUint32(12,i(A),1),u.setUint32(16,i(r),1),yield e(u)}(async function*(n){for await(const e of n){const[n,t]=D(e);yield Object.assign(f(...t),a(...n))}}(t)))}export{F as downloadZip,Q as makeZip,h as predictLength};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"active\", \"disabled\", \"className\", \"style\", \"activeLabel\", \"children\"],\n _excluded2 = [\"children\"];\n\n/* eslint-disable react/no-multi-comp */\nimport classNames from 'classnames';\nimport React from 'react';\nimport SafeAnchor from './SafeAnchor';\nvar defaultProps = {\n active: false,\n disabled: false,\n activeLabel: '(current)'\n};\nvar PageItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var active = _ref.active,\n disabled = _ref.disabled,\n className = _ref.className,\n style = _ref.style,\n activeLabel = _ref.activeLabel,\n children = _ref.children,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var Component = active || disabled ? 'span' : SafeAnchor;\n return /*#__PURE__*/React.createElement(\"li\", {\n ref: ref,\n style: style,\n className: classNames(className, 'page-item', {\n active: active,\n disabled: disabled\n })\n }, /*#__PURE__*/React.createElement(Component, _extends({\n className: \"page-link\",\n disabled: disabled\n }, props), children, active && activeLabel && /*#__PURE__*/React.createElement(\"span\", {\n className: \"sr-only\"\n }, activeLabel)));\n});\nPageItem.defaultProps = defaultProps;\nPageItem.displayName = 'PageItem';\nexport default PageItem;\n\nfunction createButton(name, defaultValue, label) {\n if (label === void 0) {\n label = name;\n }\n\n function Button(_ref2) {\n var children = _ref2.children,\n props = _objectWithoutPropertiesLoose(_ref2, _excluded2);\n\n return /*#__PURE__*/React.createElement(PageItem, props, /*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": \"true\"\n }, children || defaultValue), /*#__PURE__*/React.createElement(\"span\", {\n className: \"sr-only\"\n }, label));\n }\n\n Button.displayName = name;\n return Button;\n}\n\nexport var First = createButton('First', '«');\nexport var Prev = createButton('Prev', '‹', 'Previous');\nexport var Ellipsis = createButton('Ellipsis', '…', 'More');\nexport var Next = createButton('Next', '›');\nexport var Last = createButton('Last', '»');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"bsPrefix\", \"className\", \"children\", \"size\"];\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport PageItem, { Ellipsis, First, Last, Next, Prev } from './PageItem';\n\n/**\n * @property {PageItem} Item\n * @property {PageItem} First\n * @property {PageItem} Prev\n * @property {PageItem} Ellipsis\n * @property {PageItem} Next\n * @property {PageItem} Last\n */\nvar Pagination = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n className = _ref.className,\n children = _ref.children,\n size = _ref.size,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'pagination');\n return /*#__PURE__*/React.createElement(\"ul\", _extends({\n ref: ref\n }, props, {\n className: classNames(className, decoratedBsPrefix, size && decoratedBsPrefix + \"-\" + size)\n }), children);\n});\nPagination.First = First;\nPagination.Prev = Prev;\nPagination.Ellipsis = Ellipsis;\nPagination.Item = PageItem;\nPagination.Next = Next;\nPagination.Last = Last;\nexport default Pagination;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"as\", \"bsPrefix\", \"className\", \"children\"];\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar PopoverTitle = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'div' : _ref$as,\n bsPrefix = _ref.bsPrefix,\n className = _ref.className,\n children = _ref.children,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n bsPrefix = useBootstrapPrefix(bsPrefix, 'popover-header');\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref\n }, props, {\n className: classNames(bsPrefix, className)\n }), children);\n});\nexport default PopoverTitle;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"as\", \"bsPrefix\", \"className\", \"children\"];\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar PopoverContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'div' : _ref$as,\n bsPrefix = _ref.bsPrefix,\n className = _ref.className,\n children = _ref.children,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n bsPrefix = useBootstrapPrefix(bsPrefix, 'popover-body');\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref\n }, props, {\n className: classNames(className, bsPrefix)\n }), children);\n});\nexport default PopoverContent;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"bsPrefix\", \"placement\", \"className\", \"style\", \"children\", \"content\", \"arrowProps\", \"popper\", \"show\"];\nimport classNames from 'classnames';\nimport React from 'react';\nimport isRequiredForA11y from 'prop-types-extra/lib/isRequiredForA11y';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport PopoverTitle from './PopoverTitle';\nimport PopoverContent from './PopoverContent';\nvar defaultProps = {\n placement: 'right'\n};\nvar Popover = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n placement = _ref.placement,\n className = _ref.className,\n style = _ref.style,\n children = _ref.children,\n content = _ref.content,\n arrowProps = _ref.arrowProps,\n _ = _ref.popper,\n _1 = _ref.show,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'popover');\n\n var _ref2 = (placement == null ? void 0 : placement.split('-')) || [],\n primaryPlacement = _ref2[0];\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: ref,\n role: \"tooltip\",\n style: style,\n \"x-placement\": primaryPlacement,\n className: classNames(className, decoratedBsPrefix, primaryPlacement && \"bs-popover-\" + primaryPlacement)\n }, props), /*#__PURE__*/React.createElement(\"div\", _extends({\n className: \"arrow\"\n }, arrowProps)), content ? /*#__PURE__*/React.createElement(PopoverContent, null, children) : children);\n});\nPopover.defaultProps = defaultProps;\nPopover.Title = PopoverTitle;\nPopover.Content = PopoverContent;\nexport default Popover;","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport React from 'react';\nimport TabContainer from './TabContainer';\nimport TabContent from './TabContent';\nimport TabPane from './TabPane';\n\n/* eslint-disable react/require-render-return, react/no-unused-prop-types */\nvar Tab = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Tab, _React$Component);\n\n function Tab() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Tab.prototype;\n\n _proto.render = function render() {\n throw new Error('ReactBootstrap: The `Tab` component is not meant to be rendered! ' + \"It's an abstract component that is only valid as a direct Child of the `Tabs` Component. \" + 'For custom tabs components use TabPane and TabsContainer directly');\n return null;\n };\n\n return Tab;\n}(React.Component);\n\nTab.Container = TabContainer;\nTab.Content = TabContent;\nTab.Pane = TabPane;\nexport default Tab;","import React, { useMemo } from 'react';\nimport { useUncontrolled } from 'uncontrollable';\nimport TabContext from './TabContext';\nimport SelectableContext from './SelectableContext';\n\nvar TabContainer = function TabContainer(props) {\n var _useUncontrolled = useUncontrolled(props, {\n activeKey: 'onSelect'\n }),\n id = _useUncontrolled.id,\n generateCustomChildId = _useUncontrolled.generateChildId,\n onSelect = _useUncontrolled.onSelect,\n activeKey = _useUncontrolled.activeKey,\n transition = _useUncontrolled.transition,\n mountOnEnter = _useUncontrolled.mountOnEnter,\n unmountOnExit = _useUncontrolled.unmountOnExit,\n children = _useUncontrolled.children;\n\n var generateChildId = useMemo(function () {\n return generateCustomChildId || function (key, type) {\n return id ? id + \"-\" + type + \"-\" + key : null;\n };\n }, [id, generateCustomChildId]);\n var tabContext = useMemo(function () {\n return {\n onSelect: onSelect,\n activeKey: activeKey,\n transition: transition,\n mountOnEnter: mountOnEnter || false,\n unmountOnExit: unmountOnExit || false,\n getControlledId: function getControlledId(key) {\n return generateChildId(key, 'tabpane');\n },\n getControllerId: function getControllerId(key) {\n return generateChildId(key, 'tab');\n }\n };\n }, [onSelect, activeKey, transition, mountOnEnter, unmountOnExit, generateChildId]);\n return /*#__PURE__*/React.createElement(TabContext.Provider, {\n value: tabContext\n }, /*#__PURE__*/React.createElement(SelectableContext.Provider, {\n value: onSelect || null\n }, children));\n};\n\nexport default TabContainer;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"bsPrefix\", \"as\", \"className\"];\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar TabContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'div' : _ref$as,\n className = _ref.className,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'tab-content');\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref\n }, props, {\n className: classNames(className, decoratedBsPrefix)\n }));\n});\nexport default TabContent;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"activeKey\", \"getControlledId\", \"getControllerId\"],\n _excluded2 = [\"bsPrefix\", \"className\", \"active\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"mountOnEnter\", \"unmountOnExit\", \"transition\", \"as\", \"eventKey\"];\nimport classNames from 'classnames';\nimport React, { useContext } from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport TabContext from './TabContext';\nimport SelectableContext, { makeEventKey } from './SelectableContext';\nimport Fade from './Fade';\n\nfunction useTabContext(props) {\n var context = useContext(TabContext);\n if (!context) return props;\n\n var activeKey = context.activeKey,\n getControlledId = context.getControlledId,\n getControllerId = context.getControllerId,\n rest = _objectWithoutPropertiesLoose(context, _excluded);\n\n var shouldTransition = props.transition !== false && rest.transition !== false;\n var key = makeEventKey(props.eventKey);\n return _extends({}, props, {\n active: props.active == null && key != null ? makeEventKey(activeKey) === key : props.active,\n id: getControlledId(props.eventKey),\n 'aria-labelledby': getControllerId(props.eventKey),\n transition: shouldTransition && (props.transition || rest.transition || Fade),\n mountOnEnter: props.mountOnEnter != null ? props.mountOnEnter : rest.mountOnEnter,\n unmountOnExit: props.unmountOnExit != null ? props.unmountOnExit : rest.unmountOnExit\n });\n}\n\nvar TabPane = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var _useTabContext = useTabContext(props),\n bsPrefix = _useTabContext.bsPrefix,\n className = _useTabContext.className,\n active = _useTabContext.active,\n onEnter = _useTabContext.onEnter,\n onEntering = _useTabContext.onEntering,\n onEntered = _useTabContext.onEntered,\n onExit = _useTabContext.onExit,\n onExiting = _useTabContext.onExiting,\n onExited = _useTabContext.onExited,\n mountOnEnter = _useTabContext.mountOnEnter,\n unmountOnExit = _useTabContext.unmountOnExit,\n Transition = _useTabContext.transition,\n _useTabContext$as = _useTabContext.as,\n Component = _useTabContext$as === void 0 ? 'div' : _useTabContext$as,\n _ = _useTabContext.eventKey,\n rest = _objectWithoutPropertiesLoose(_useTabContext, _excluded2);\n\n var prefix = useBootstrapPrefix(bsPrefix, 'tab-pane');\n if (!active && !Transition && unmountOnExit) return null;\n var pane = /*#__PURE__*/React.createElement(Component, _extends({}, rest, {\n ref: ref,\n role: \"tabpanel\",\n \"aria-hidden\": !active,\n className: classNames(className, prefix, {\n active: active\n })\n }));\n if (Transition) pane = /*#__PURE__*/React.createElement(Transition, {\n in: active,\n onEnter: onEnter,\n onEntering: onEntering,\n onEntered: onEntered,\n onExit: onExit,\n onExiting: onExiting,\n onExited: onExited,\n mountOnEnter: mountOnEnter,\n unmountOnExit: unmountOnExit\n }, pane); // We provide an empty the TabContext so `\n );\n };\n\n return (\n \n \n \n

\n \n

\n
\n \n
\n
\n \n
\n {nav()}\n \n \n {InstanceEdit.tabs.map(([tabKey, , accessCb, Comp]) => {\n if (!this.state.instancePermissionSet) {\n throw Error(\n \"this.state.instancePermissionSet is null in render card map\"\n );\n }\n return (\n \n {Comp ? (\n !accessCb(\n this.state.instancePermissionSet,\n this.context\n ) ? (\n \n ) : (\n \n )\n ) : (\n \n )}\n \n );\n })}\n \n \n
\n \n
\n \n );\n }\n}\n\nInstanceEdit.contextType = GeneralContext;\nexport default withRouter(InstanceEdit);\n"],"names":["InstanceSettings","React","constructor","props","super","this","editInstance","bind","state","errors","moving","addError","error","setState","prevState","Array","from","push","instance","instanceId","context","id","newPath","path","online","response","InstanceClient","code","StatusCode","response2","reloadInstance","response3","Promise","resolve","setTimeout","payload","moveJob","response4","JobsController","render","checkIMFlag","flag","hasInstanceManagerRight","resolvePermissionSet","user","fields","name","type","FieldType","defaultValue","disabled","InstanceManagerRights","chatBotLimit","min","autoUpdateInterval","configurationType","enum","ConfigurationType","className","obj","map","err","index","key","onClose","prev","newarr","undefined","text","onSave","contextType","InstanceEditContext","withRouter","Deployment","instanceEditContext","useContext","errorState","useState","isLoading","setIsLoading","deployInfo","setDeployInfo","compileJobs","setCompileJobs","compileJobsPage","setCompileJobsPage","compileJobsTotalPages","setCompileJobsTotalPages","compileJobsPageSize","setCompileJobsPageSize","canRead","hasDreamMakerRight","instancePermissionSet","DreamMakerRights","canCompile","canReadDeployments","async","loadDeployInfo","DreamMakerClient","loadCompileJobs","page","pageSize","totalPages","content","timeout","useEffect","parsedTimeMatch","exec","parsedTime","groups","parseInt","days","hours","minutes","seconds","projectName","tooltip","compilerAdditionalArguments","apiValidationPort","max","apiValidationSecurityLevel","DreamDaemonSecurity","requireDMApiValidation","deploymentViewData","paging","currentPage","loadPage","viewDataType","ViewDataType","displayErrors","viewData","title","hideDisabled","newTimeout","_result","Math","floor","result","tooltipid","show","onClick","JobHistory","jobs","setJobs","setErrors","loading","setLoading","setPage","RouteData","maxPage","setMaxPage","onCancel","job","status","JobsClient","loadJobs","sort","a","b","filter","stoppedAt","selectPage","newPage","GracefulAction","injectIntl","watchdogSettings","setWatchdogSettings","loadWatchdogSettings","hasDreamDaemonRight","DreamDaemonRights","DreamDaemonClient","saveWatchdogSettings","newSettings","autoStart","startProfiler","logOutput","port","visibility","DreamDaemonVisibility","securityLevel","startupTimeout","topicRequestTimeout","healthCheckSeconds","dumpOnHealthCheckRestart","minidumps","allowWebClient","additionalParameters","mapThreads","anyEditableField","Object","values","some","field","no_perm_tooltip","canStart","canStop","canRestart","canDump","canMetadata","canGracefulAny","canActionAny","broadcastNotAllowed","WatchdogStatus","activeCompileJob","dmApiVersion","SemVerGte","broadcastFields","message","canViewDeployment","stagedCompileJob","pill","variant","overlay","confirm","intl","formatMessage","softRestart","Restart","softShutdown","Stop","None","onChange","fieldsResult","broadcastMessage","saveMessageId","minimumEnginePerms","EngineRights","minimumServerPerms","minimumRepoPerms","RepositoryRights","minimumDeployPerms","minimumChatPerms","ChatBotRights","minimumFilePerms","ConfigurationRights","InstanceEdit","deleteContextError","match","params","tab","tabs","Set","deleteError","instanceid","newSet","delete","componentDidUpdate","prevProps","InstancePermissionSetClient","add","value","assign","serverInfo","instancename","mountOnEnter","unmountOnExit","activeKey","defaultActiveKey","onSelect","eventKey","history","AppRoutes","fill","configOptions","InstanceEditSidebar","style","top","tabKey","icon","accessCb","component","Error","wip","accessDenied","bsPrefix","fixedWidth","nav","Comp","Config","repositoryRights","Repository","faGamepad","engineRights","Engine","dreamMakerRights","dreamDaemonRights","Server","chatBotRights","ChatBots","configurationRights","Files","InstancePermissions","GeneralContext"],"sourceRoot":""} \ No newline at end of file diff --git a/webpanel/5.7.0/233.bca5af88bf85dd9388cf.bundle.js b/webpanel/5.7.0/233.bca5af88bf85dd9388cf.bundle.js new file mode 100644 index 00000000..5312f7d3 --- /dev/null +++ b/webpanel/5.7.0/233.bca5af88bf85dd9388cf.bundle.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunktgstation_server_control_panel=self.webpackChunktgstation_server_control_panel||[]).push([[233],{79049:function(e,t,n){n.d(t,{Pg:function(){return b},ZP:function(){return v},fS:function(){return p}});var r=n(51436),a=n(67814),o=n(67294),l=n(35005),s=n(32258),i=n(62318),c=n(15293),u=n(43489),d=n(44012);function m(){return m=Object.assign||function(e){for(var t=1;te.onChange(t.target.value),disabled:e.disabled,ref:t})})),h=o.forwardRef((function(e,t){return o.createElement(s.Z.Control,{value:e.value,onChange:t=>e.onChange(t.target.value),disabled:e.disabled,type:"password",ref:t})})),g=o.forwardRef((function(e,t){const n=Math.random().toString();return o.createElement("label",{htmlFor:n,className:"d-flex m-0 flex-grow-1 justify-content-center align-content-center"},o.createElement(s.Z.Check,{id:n,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:"switch",className:"m-auto",disabled:e.disabled,ref:t}))})),w=o.forwardRef((function(e,t){return o.createElement(s.Z.Control,{value:e.value,onChange:t=>e.onChange(isNaN(t.target.valueAsNumber)?t.target.value:t.target.valueAsNumber),disabled:e.disabled,min:e.min,max:e.max,type:"number",ref:t})})),y=o.forwardRef((function(e,t){return o.createElement(s.Z.Control,{value:e.value,onChange:t=>e.onChange(parseInt(t.target.value)),disabled:e.disabled,as:"select",custom:!0,ref:t},Object.entries(e.enum).filter((([e])=>isNaN(parseInt(e)))).map((([t,n])=>e.noLocalize?o.createElement("option",{key:n,value:n},t):o.createElement(d.Z,{id:`${e.name}.${t}`,key:t},(e=>o.createElement("option",{key:n,value:n},e))))))})),b={[p.Enum]:0,[p.Number]:0,[p.Boolean]:!1,[p.String]:"",[p.Password]:""};function v(e){const[t,n]=(0,o.useState)(e.defaultValue??b[e.type]),s=(0,o.useRef)(null);(0,o.useEffect)((()=>{n(e.defaultValue??b[e.type])}),[e.defaultValue]),(0,o.useEffect)((()=>{switch(s.current&&(s.current.checkValidity()?s.current.classList.remove("is-invalid"):s.current.classList.add("is-invalid")),e.type){case p.Boolean:case p.Enum:case p.Number:case p.String:case p.Password:return void e.onChange(t,s.current?.checkValidity()??!0)}}),[t]);const v={string:f,password:h,boolean:g,[p.Number]:void 0,[p.Enum]:void 0},E=t!=(e.defaultValue??b[e.type]);return o.createElement(i.Z,null,o.createElement(c.Z,{overlay:(Z=e.tooltip,Z?o.createElement(u.Z,{id:Z},o.createElement(d.Z,{id:Z})):o.createElement(o.Fragment,null)),show:!!e.tooltip&&void 0},(({ref:t,...n})=>o.createElement(i.Z.Prepend,{className:"w-50 w-xl-40"},o.createElement(i.Z.Text,m({className:"flex-grow-1"},n),o.createElement("span",{className:E?"font-weight-bold":""},o.createElement(d.Z,{id:e.name})),o.createElement("div",{className:"ml-auto"},e.disabled?o.createElement(d.Z,{id:"generic.readonly"}):null,o.createElement("div",{ref:t,className:"d-inline-block ml-2",style:{visibility:e.tooltip?"unset":"hidden"}},o.createElement(a.G,{icon:r.YHc}))))))),e.type===p.Number?o.createElement(w,{value:t,onChange:e=>n(e),name:e.name,disabled:e.disabled,max:e.max,min:e.min,ref:s}):e.type===p.Enum?o.createElement(y,{value:t,onChange:e=>n(e),name:e.name,enum:e.enum,noLocalize:e.noLocalize,disabled:e.disabled}):o.createElement(v[e.type],{value:t,onChange:e=>n(e),disabled:e.disabled,name:e.type,ref:s}),o.createElement(i.Z.Append,null,o.createElement(l.Z,{style:{visibility:!E||e.disabled?"hidden":void 0},variant:"danger",onClick:()=>n(e.defaultValue??b[e.type])},o.createElement(a.G,{icon:"undo"}))));var Z}},35619:function(e,t,n){n.d(t,{Z:function(){return u}});var r=n(67294),a=n(35005),o=n(15293),l=n(43489),s=n(44012),i=n(79049);function c(){return c=Object.assign||function(e){for(var t=1;t{Object.keys(e.fields).forEach((e=>{d((t=>({...t,[e]:{}})))}))}),[]);for(const[a,o]of Object.entries(e.fields))n.set(a,o),t.set(o,(0,r.useState)(o.defaultValue??i.Pg[o.type]));let m=!1,p=!1;for(const[e,r]of n){const[n]=t.get(r),a=u[e];if((r.defaultValue??i.Pg[r.type])!=n&&(m=!0),a?.invalid&&(p=!0),m&&p)break}return e.hideDisabled&&!Object.values(e.fields).some((e=>!e.disabled))?r.createElement(r.Fragment,null):r.createElement("div",null,Object.entries(e.fields).map((([n,a])=>{const{disabled:o,...l}=a;return e.hideDisabled&&o?null:r.createElement(i.ZP,c({key:n},l,{disabled:e.readOnly||o,onChange:(e,r)=>{t.get(a)[1](e),d((e=>({...e,[n]:{...e[n],invalid:!r}})))}}))})),r.createElement("div",{className:"text-center mt-2"},r.createElement(o.Z,{overlay:r.createElement(l.Z,{id:"form-invalid"},r.createElement(s.Z,{id:"generic.invalid_form"})),show:!!p&&void 0},r.createElement(a.Z,{variant:e.readOnly||p?"danger":"success",disabled:e.readOnly||!m||p,onClick:()=>{const r={};for(const[a,o]of n){const[n]=t.get(o);(o.alwaysInclude||n!=(o.defaultValue??i.Pg[o.type])||e.includeAll)&&(r[a]=n)}e.onSave(r)}},r.createElement(s.Z,{id:e.saveMessageId??"generic.save"})))))}},8425:function(e,t,n){n.d(t,{t:function(){return i}});var r=n(67294),a=n(55171),o=n.n(a),l=n(27961);function s(e){return r.createElement(o(),{src:e.obj,name:"JSON",theme:"tube",iconStyle:"triangle",collapsed:!0,displayDataTypes:!1})}function i(e){return l.ZP.showjson.value?r.createElement("div",{className:"text-left"},r.createElement(s,{obj:e.obj})):r.createElement(r.Fragment,null)}},96190:function(e,t,n){n.d(t,{g:function(){return r}});const r=n(67294).createContext(void 0)},27428:function(e,t,n){var r=n(6964),a=n(17347),o=n(52638),l=n(12527),s=n(96846),i=n(53803),c=n(27961),u=n(86755);async function d(e,t,n){const r=e.endpoint.merge(t,n);return c.ZP.githubtoken.value&&(r.headers.authorization=`token ${c.ZP.githubtoken.value}`),e(r)}async function m(){return c.ZP.githubtoken.value?{type:"token",tokenType:"pat",token:c.ZP.githubtoken.value}:{type:"unauthenticated"}}const p=()=>Object.assign(m.bind(null),{hook:d.bind(null)}),f=new class extends l.TypedEmitter{constructor(){super(),this.apiClient=void 0;const e=o.v.plugin(r.X,a.O);this.apiClient=new e({authStrategy:p,userAgent:"tgstation-server-control-panel/"+u.q4,baseUrl:"https://api.github.com",throttle:{onRateLimit:(e,t)=>(console.warn(`Request quota exhausted for request ${t.method} ${t.url}`),0===t.request.retryCount&&(console.log(`Retrying after ${e} seconds!`),!0)),onAbuseLimit:(e,t)=>{console.warn(`Abuse detected for request ${t.method} ${t.url}`)}}})}async getLatestDefaultCommit(e,t){try{const n=await this.apiClient.repos.get({owner:e,repo:t}),r=await this.apiClient.repos.getBranch({owner:e,repo:t,branch:n.data.default_branch});return new i.Z({code:i.G.OK,payload:r.data.commit.sha})}catch(e){return new i.Z({code:i.G.ERROR,error:new s.ZP(s.jK.GITHUB_FAIL,{jsError:e})})}}async getVersions({owner:e,repo:t,current:n,all:r}){let a,o=0;try{a=await this.apiClient.paginate(this.apiClient.repos.listReleases,{owner:e,repo:t},((e,t)=>e.data.reduce(((e,a)=>{const l=/tgstation-server-v([\d.]+)/.exec(a.name??"");if(!l)return e;if(parseInt(l[1][0])<4)return e;const s=l[1];let i=!1;if(s<=n){if(o>=3&&!r)return t(),e;o++,i=!0}return e.push({version:s,body:a.body??"",current:s===n,old:i}),e}),[])))}catch(e){return new i.Z({code:i.G.ERROR,error:new s.ZP(s.jK.GITHUB_FAIL,{jsError:e})})}return new i.Z({code:i.G.OK,payload:a})}transformPR(e){return{number:e.number,title:e.title,author:e.user?.login??"ghost",state:e.merged_at?"merged":e.state,link:e.html_url,head:e.head.sha,tail:e.base.sha,testmergelabel:e.labels.some((e=>e.name?.toLowerCase().includes("testmerge")||e.name?.toLowerCase().includes("test merge")))}}async getPRs({owner:e,repo:t,wantedPRs:n}){let r=[];try{r=(await this.apiClient.paginate(this.apiClient.pulls.list,{owner:e,repo:t,state:"open"})).map(this.transformPR);for(const a of n??[])if(!r.find((e=>e.number==a))){const n=(await this.apiClient.pulls.get({owner:e,repo:t,pull_number:a})).data;r.push(this.transformPR(n))}}catch(e){return console.error(e),new i.Z({code:i.G.ERROR,error:new s.ZP(s.jK.GITHUB_FAIL,{jsError:e})})}return new i.Z({code:i.G.OK,payload:r})}async getPRCommits({owner:e,repo:t,pr:n,wantedCommit:r}){let a,o=[];try{if(o=await this.apiClient.paginate(this.apiClient.pulls.listCommits,{owner:e,repo:t,pull_number:n.number,per_page:100},(({data:e})=>e.map((e=>({name:e.commit.message.split("\n")[0],sha:e.sha,url:e.html_url}))))),o.reverse(),r&&!o.find((e=>e.sha===r))){const n=(await this.apiClient.repos.getCommit({owner:e,repo:t,ref:r})).data;a={name:n.commit.message.split("\n")[0],sha:n.sha,url:n.html_url}}}catch(e){return console.error(e),new i.Z({code:i.G.ERROR,error:new s.ZP(s.jK.GITHUB_FAIL,{jsError:e})})}return new i.Z({code:i.G.OK,payload:[o,a]})}async getFile(e,t,n,r){try{const{data:a}=await this.apiClient.repos.getContent({mediaType:{format:"base64"},owner:e,repo:t,path:n,ref:r});if(Array.isArray(a))return new i.Z({code:i.G.ERROR,error:new s.ZP(s.jK.GITHUB_FAIL,{jsError:new Error(`${n} was a directory!`)})});if("file"!==a.type)return new i.Z({code:i.G.ERROR,error:new s.ZP(s.jK.GITHUB_FAIL,{jsError:new Error(`${n} has type ${a.type}!`)})});const o=a.content;return new i.Z({code:i.G.OK,payload:o})}catch(e){return console.error(e),new i.Z({code:i.G.ERROR,error:new s.ZP(s.jK.GITHUB_FAIL,{jsError:e})})}}async getDirectoryContents(e,t,n,r){try{const{data:a}=await this.apiClient.repos.getContent({owner:e,repo:t,path:n,ref:r});if(!Array.isArray(a))return new i.Z({code:i.G.ERROR,error:new s.ZP(s.jK.GITHUB_FAIL,{jsError:new Error(`${n} was not a directory!`)})});const o=[];return a.forEach((e=>o.push({path:e.path,isDirectory:"dir"==e.type}))),new i.Z({code:i.G.OK,payload:o})}catch(e){return console.error(e),new i.Z({code:i.G.ERROR,error:new s.ZP(s.jK.GITHUB_FAIL,{jsError:e})})}}};t.Z=f}}]); +//# sourceMappingURL=233.bca5af88bf85dd9388cf.bundle.js.map \ No newline at end of file diff --git a/webpanel/5.7.0/233.bca5af88bf85dd9388cf.bundle.js.map b/webpanel/5.7.0/233.bca5af88bf85dd9388cf.bundle.js.map new file mode 100644 index 00000000..a44b4cb2 --- /dev/null +++ b/webpanel/5.7.0/233.bca5af88bf85dd9388cf.bundle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"233.bca5af88bf85dd9388cf.bundle.js","mappings":"8hBAeO,IAAKA,G,SAAAA,GAAAA,EAAAA,QAAAA,UAAAA,EAAAA,OAAAA,SAAAA,EAAAA,OAAAA,SAAAA,EAAAA,SAAAA,WAAAA,EAAAA,KAAAA,O,CAAAA,IAAAA,EAAAA,KAsDZ,MAAMC,EAAgBC,EAAAA,YAAiD,SACnEC,EACAC,GAEA,OACI,gBAAC,YAAD,CACIC,MAAOF,EAAME,MACbC,SAAUC,GAAKJ,EAAMG,SAASC,EAAEC,OAAOH,OACvCI,SAAUN,EAAMM,SAChBL,IAAKA,OAKXM,EAAkBR,EAAAA,YAAiD,SACrEC,EACAC,GAEA,OACI,gBAAC,YAAD,CACIC,MAAOF,EAAME,MACbC,SAAUC,GAAKJ,EAAMG,SAASC,EAAEC,OAAOH,OACvCI,SAAUN,EAAMM,SAChBE,KAAK,WACLP,IAAKA,OAKXQ,EAAiBV,EAAAA,YAAiD,SACpEC,EACAC,GAEA,MAAMS,EAAQC,KAAKC,SAASC,WAC5B,OACI,yBACIC,QAASJ,EACTK,UAAU,sEACV,gBAAC,UAAD,CACIC,GAAIN,EACJO,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ources":["webpack://tgstation-server-control-panel/./src/components/utils/InputField.tsx","webpack://tgstation-server-control-panel/./src/components/utils/InputForm.tsx","webpack://tgstation-server-control-panel/./src/components/utils/JsonViewer.tsx","webpack://tgstation-server-control-panel/./src/contexts/InstanceEditContext.ts","webpack://tgstation-server-control-panel/./src/utils/GithubClient.ts"],"sourcesContent":["import { faInfo } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport React, { useEffect, useRef, useState } from \"react\";\nimport Button from \"react-bootstrap/Button\";\nimport Form from \"react-bootstrap/Form\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\nimport OverlayTrigger from \"react-bootstrap/OverlayTrigger\";\nimport Tooltip from \"react-bootstrap/Tooltip\";\nimport { FormattedMessage } from \"react-intl\";\n\nexport type AnyEnum = {\n [key: string]: string | number;\n [index: number]: string;\n};\n\nexport enum FieldType {\n Boolean = \"boolean\",\n Number = \"number\",\n String = \"string\",\n Password = \"password\",\n Enum = \"enum\"\n}\n\nexport type InputFieldTypes = number | string | boolean;\n\nexport type InputFieldProps = {\n name: string;\n disabled?: boolean;\n tooltip?: string;\n type: FieldType;\n} & (\n | {\n defaultValue?: boolean | null;\n onChange: (newValue: boolean, isValid: boolean) => unknown;\n type: FieldType.Boolean;\n }\n | {\n defaultValue?: number | null;\n onChange: (newValue: number, isValid: boolean) => unknown;\n type: FieldType.Number;\n min?: number;\n max?: number;\n }\n | {\n defaultValue?: string | null;\n onChange: (newValue: string, isValid: boolean) => unknown;\n type: FieldType.String;\n }\n | {\n defaultValue?: string | null;\n onChange: (newValue: string, isValid: boolean) => unknown;\n type: FieldType.Password;\n }\n | {\n defaultValue?: number | null;\n onChange: (newValue: number, isValid: boolean) => unknown;\n type: FieldType.Enum;\n noLocalize?: boolean;\n enum: AnyEnum;\n }\n);\n\ninterface ControlProps {\n value: InputFieldTypes;\n onChange: (newvalue: InputFieldTypes) => unknown;\n disabled?: boolean;\n name: string;\n}\n\nconst StringControl = React.forwardRef(function StringControl(\n props,\n ref\n): JSX.Element {\n return (\n props.onChange(e.target.value)}\n disabled={props.disabled}\n ref={ref}\n />\n );\n});\n\nconst PasswordControl = React.forwardRef(function PasswordControl(\n props,\n ref\n): JSX.Element {\n return (\n props.onChange(e.target.value)}\n disabled={props.disabled}\n type=\"password\"\n ref={ref}\n />\n );\n});\n\nconst BooleanControl = React.forwardRef(function BooleanControl(\n props,\n ref\n): JSX.Element {\n const rndId = Math.random().toString();\n return (\n \n props.onChange(e.target.checked)}\n type=\"switch\"\n className=\"m-auto\"\n disabled={props.disabled}\n ref={ref}\n />\n \n );\n});\n\ntype NumberControlProps = ControlProps & {\n min?: number;\n max?: number;\n};\nconst NumberControl = React.forwardRef(function NumberControl(\n props,\n ref\n): JSX.Element {\n return (\n ) =>\n props.onChange(\n isNaN(e.target.valueAsNumber) ? e.target.value : e.target.valueAsNumber\n )\n }\n disabled={props.disabled}\n min={props.min}\n max={props.max}\n type=\"number\"\n ref={ref}\n />\n );\n});\n\ntype EnumControlProps = ControlProps & {\n enum: AnyEnum;\n noLocalize?: boolean;\n};\nconst EnumControl = React.forwardRef(function EnumControl(\n props,\n ref\n): JSX.Element {\n return (\n props.onChange(parseInt(e.target.value))}\n disabled={props.disabled}\n as=\"select\"\n custom\n ref={ref}>\n {Object.entries(props.enum)\n //filters out reverse mapping\n .filter(([key]) => isNaN(parseInt(key)))\n .map(([key, value]) => {\n return props.noLocalize ? (\n \n ) : (\n \n {message => (\n \n )}\n \n );\n })}\n \n );\n});\n\nexport const defaultValues: Record = {\n [FieldType.Enum]: 0,\n [FieldType.Number]: 0,\n [FieldType.Boolean]: false,\n [FieldType.String]: \"\",\n [FieldType.Password]: \"\"\n};\n\nexport default function InputField(props: InputFieldProps): JSX.Element {\n const [currentValue, setCurrentValue] = useState(\n props.defaultValue ?? defaultValues[props.type]\n );\n const controlRef = useRef(null);\n useEffect(() => {\n setCurrentValue(props.defaultValue ?? defaultValues[props.type]);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props.defaultValue]);\n\n useEffect(() => {\n if (controlRef.current) {\n if (controlRef.current.checkValidity()) {\n controlRef.current.classList.remove(\"is-invalid\");\n } else {\n controlRef.current.classList.add(\"is-invalid\");\n }\n }\n\n switch (props.type) {\n case FieldType.Boolean:\n props.onChange(\n currentValue as boolean,\n controlRef.current?.checkValidity() ?? true\n );\n return;\n case FieldType.Enum:\n case FieldType.Number:\n props.onChange(currentValue as number, controlRef.current?.checkValidity() ?? true);\n return;\n case FieldType.String:\n case FieldType.Password:\n props.onChange(currentValue as string, controlRef.current?.checkValidity() ?? true);\n return;\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentValue]);\n\n const tooltip = (innerid?: string) => {\n if (!innerid) return ;\n\n return (\n \n \n \n );\n };\n\n const basicControls: {\n [Property in typeof props.type]: Property extends FieldType.Enum | FieldType.Number\n ? undefined\n : React.FC;\n } = {\n string: StringControl,\n password: PasswordControl,\n boolean: BooleanControl,\n [FieldType.Number]: undefined,\n [FieldType.Enum]: undefined\n };\n\n const changed = currentValue != (props.defaultValue ?? defaultValues[props.type]);\n\n return (\n \n \n {({ ref, ...triggerHandler }) => (\n \n \n \n \n \n
\n {props.disabled ? : null}\n \n \n
\n \n
\n
\n )}\n \n {props.type === FieldType.Number ? (\n setCurrentValue(newValue)}\n name={props.name}\n disabled={props.disabled}\n max={props.max}\n min={props.min}\n ref={controlRef}\n />\n ) : props.type === FieldType.Enum ? (\n setCurrentValue(newValue)}\n name={props.name}\n enum={props.enum}\n noLocalize={props.noLocalize}\n disabled={props.disabled}\n />\n ) : (\n React.createElement>(\n basicControls[props.type],\n {\n value: currentValue,\n onChange: newValue => setCurrentValue(newValue),\n disabled: props.disabled,\n name: props.type,\n ref: controlRef\n }\n )\n )}\n\n \n \n setCurrentValue(props.defaultValue ?? defaultValues[props.type])\n }>\n \n \n \n
\n );\n}\n","import React, { useEffect, useState } from \"react\";\nimport Button from \"react-bootstrap/Button\";\nimport OverlayTrigger from \"react-bootstrap/OverlayTrigger\";\nimport Tooltip from \"react-bootstrap/Tooltip\";\nimport { FormattedMessage } from \"react-intl\";\n\nimport { DistributiveOmit } from \"../../utils/misc\";\nimport InputField, {\n defaultValues,\n FieldType,\n InputFieldProps,\n InputFieldTypes\n} from \"./InputField\";\n\ntype ExtractValues = T extends T ? T[keyof T] : never;\n\ntype FieldsOutput> = {\n [Id in keyof Fields]: Fields[Id][\"type\"] extends FieldType.Number\n ? number\n : Fields[Id][\"type\"] extends FieldType.Enum\n ? // @ts-expect-error Typescript doesnt seem to support union descrimination in conditional types\n ExtractValues\n : Fields[Id][\"type\"] extends FieldType.Boolean\n ? boolean\n : Fields[Id][\"type\"] extends FieldType.String\n ? string\n : Fields[Id][\"type\"] extends FieldType.Password\n ? string\n : never;\n};\n\nexport type InputFormField = DistributiveOmit & {\n alwaysInclude?: boolean;\n};\ninterface IProps> {\n fields: Fields;\n onSave: (fields: FieldsOutput) => unknown;\n readOnly?: boolean;\n hideDisabled?: boolean;\n includeAll?: boolean;\n saveMessageId?: string;\n}\n\ninterface FieldState {\n invalid?: boolean;\n}\n\nexport default function InputForm>(\n props: IProps\n): JSX.Element {\n const fieldValueStates = new Map<\n InputFormField,\n [InputFieldTypes, React.Dispatch>]\n >();\n const fieldStateIds = new Map();\n const [fieldStates, setFieldStates] = useState>({});\n\n useEffect(() => {\n Object.keys(props.fields).forEach(id => {\n setFieldStates(prevState => ({\n ...prevState,\n [id]: {}\n }));\n });\n // It wants props.fields, but you really shouldnt ever change it\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n for (const [id, field] of Object.entries(props.fields)) {\n fieldStateIds.set(id, field);\n fieldValueStates.set(\n field,\n // props.fields never changes, it will be\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useState(field.defaultValue ?? defaultValues[field.type])\n );\n }\n\n let anyDiff = false;\n let anyInvalid = false;\n for (const [id, fieldDescriptor] of fieldStateIds) {\n const [fieldValue] = fieldValueStates.get(fieldDescriptor)!;\n const fieldState = fieldStates[id];\n if ((fieldDescriptor.defaultValue ?? defaultValues[fieldDescriptor.type]) != fieldValue)\n anyDiff = true;\n if (fieldState?.invalid) anyInvalid = true;\n\n if (anyDiff && anyInvalid) break;\n }\n\n const save = () => {\n const outputObject: Record = {};\n\n for (const [id, fieldDescriptor] of fieldStateIds) {\n const [fieldValue] = fieldValueStates.get(fieldDescriptor)!;\n\n if (\n !fieldDescriptor.alwaysInclude &&\n fieldValue ==\n (fieldDescriptor.defaultValue ?? defaultValues[fieldDescriptor.type]) &&\n !props.includeAll\n )\n continue;\n\n outputObject[id] = fieldValue;\n }\n // @ts-expect-error I can't be assed to turn this generic object into the specially crafted output type, its mostly for public api sanity so i dont care\n props.onSave(outputObject);\n };\n\n //Don't show anything including the save button if we are hiding every single field\n if (props.hideDisabled) {\n if (!Object.values(props.fields).some(field => !field.disabled)) {\n return <>;\n }\n }\n\n return (\n
\n {Object.entries(props.fields).map(([id, field]) => {\n const { disabled, ...innerProps } = field;\n if (props.hideDisabled && disabled) return null;\n\n return (\n {\n fieldValueStates.get(field)![1](newVal);\n setFieldStates(prevState => ({\n ...prevState,\n [id]: {\n ...prevState[id],\n invalid: !isValid\n }\n }));\n }}\n />\n );\n })}\n
\n \n \n \n }\n show={anyInvalid ? undefined : false}>\n \n \n \n \n
\n
\n );\n}\n","import React from \"react\";\nimport ReactJson from \"react-json-view\";\n\nimport configOptions from \"../../ApiClient/util/config\";\n\nexport default function JsonViewer(props: { obj: unknown }): JSX.Element {\n return (\n }\n name={\"JSON\"}\n theme=\"tube\"\n iconStyle=\"triangle\"\n collapsed\n displayDataTypes={false}\n />\n );\n}\n\nexport function DebugJsonViewer(props: { obj: unknown }): JSX.Element {\n if (!configOptions.showjson.value) {\n return <>;\n }\n return (\n
\n \n
\n );\n}\n","import React from \"react\";\n\nimport type {\n InstancePermissionSetResponse,\n InstanceResponse,\n ServerInformationResponse,\n UserResponse\n} from \"../ApiClient/generatedcode/generated\";\nimport InternalError from \"../ApiClient/models/InternalComms/InternalError\";\n\nexport type InstanceEditContext = {\n deleteError: (error: InternalError) => void;\n errors: Set;\n reloadInstance: () => Promise;\n instance: InstanceResponse;\n user: UserResponse;\n serverInfo: ServerInformationResponse;\n instancePermissionSet: InstancePermissionSetResponse;\n};\n\n//same as InstanceEditContext except used for components which arent loading under instanceedit so we cant guarentee that instance wont be null\nexport type UnsafeInstanceEditContext = {\n deleteError: (error: InternalError) => void;\n errors: Set;\n reloadInstance: () => Promise;\n instance: InstanceResponse | null;\n user: UserResponse;\n serverInfo: ServerInformationResponse;\n instancePermissionSet: InstancePermissionSetResponse | null;\n};\n\nexport const InstanceEditContext = React.createContext(\n (undefined as unknown) as InstanceEditContext\n);\n","import { retry } from \"@octokit/plugin-retry\";\nimport { throttling } from \"@octokit/plugin-throttling\";\nimport { RequestError } from \"@octokit/request-error\";\nimport { Octokit, RestEndpointMethodTypes } from \"@octokit/rest\";\nimport { TypedEmitter } from \"tiny-typed-emitter/lib\";\n\nimport InternalError, { ErrorCode } from \"../ApiClient/models/InternalComms/InternalError\";\nimport InternalStatus, { StatusCode } from \"../ApiClient/models/InternalComms/InternalStatus\";\nimport configOptions from \"../ApiClient/util/config\";\nimport { VERSION } from \"../definitions/constants\";\n\nexport interface TGSVersion {\n version: string;\n body: string;\n current: boolean;\n old: boolean;\n}\n\nexport interface Commit {\n name: string;\n sha: string;\n url: string;\n}\n\nexport interface PullRequest {\n number: number;\n title: string;\n author: string;\n state: \"open\" | \"closed\" | \"merged\";\n link: string;\n head: string;\n tail: string;\n testmergelabel: boolean;\n}\n\ntype ExtractArrayType = A extends Array ? ArrayType : never;\nexport type GithubPullRequest = ExtractArrayType<\n RestEndpointMethodTypes[\"pulls\"][\"list\"][\"response\"][\"data\"]\n>;\nexport type FullGithubPullRequest = RestEndpointMethodTypes[\"pulls\"][\"get\"][\"response\"][\"data\"];\n\nexport interface DirectoryItem {\n path: string;\n isDirectory: boolean;\n}\n\ninterface IEvents {}\n\n/* eslint-disable */\n\nasync function hook(request: any, route: any, parameters?: any): Promise {\n const endpoint = request.endpoint.merge(route as string, parameters);\n\n if (configOptions.githubtoken.value) {\n endpoint.headers.authorization = `token ${configOptions.githubtoken.value}`;\n }\n\n return request(endpoint);\n}\n\nasync function auth(): Promise {\n if (configOptions.githubtoken.value) {\n return {\n type: \"token\",\n tokenType: \"pat\",\n token: configOptions.githubtoken.value\n };\n } else {\n return {\n type: \"unauthenticated\"\n };\n }\n}\n\nconst authStrategy = () => {\n return Object.assign(auth.bind(null), {\n hook: hook.bind(null)\n });\n};\n\n/* eslint-enable */\n\nconst e = new (class GithubClient extends TypedEmitter {\n private readonly apiClient: Octokit;\n\n public constructor() {\n super();\n\n const octo = Octokit.plugin(retry, throttling);\n\n this.apiClient = new octo({\n authStrategy,\n userAgent: \"tgstation-server-control-panel/\" + VERSION,\n baseUrl: \"https://api.github.com\",\n throttle: {\n onRateLimit: (\n retryAfter: number,\n options: { method: string; url: string; request: { retryCount: number } }\n ) => {\n console.warn(\n `Request quota exhausted for request ${options.method} ${options.url}`\n );\n\n if (options.request.retryCount === 0) {\n // only retries once\n console.log(`Retrying after ${retryAfter} seconds!`);\n return true;\n }\n return false;\n },\n onAbuseLimit: (retryAfter: number, options: { method: string; url: string }) => {\n // does not retry, only logs a warning\n console.warn(`Abuse detected for request ${options.method} ${options.url}`);\n }\n }\n });\n }\n\n public async getLatestDefaultCommit(\n owner: string,\n repo: string\n ): Promise> {\n try {\n const repoData = await this.apiClient.repos.get({\n owner,\n repo\n });\n\n const branch = await this.apiClient.repos.getBranch({\n owner,\n repo,\n branch: repoData.data.default_branch\n });\n\n return new InternalStatus({\n code: StatusCode.OK,\n payload: branch.data.commit.sha\n });\n } catch (e) {\n return new InternalStatus({\n code: StatusCode.ERROR,\n error: new InternalError(ErrorCode.GITHUB_FAIL, {\n jsError: e as RequestError\n })\n });\n }\n }\n\n public async getVersions({\n owner,\n repo,\n current,\n all\n }: {\n owner: string;\n repo: string;\n current: string;\n all?: boolean;\n }): Promise> {\n let payload: TGSVersion[];\n let oldversions = 0;\n try {\n payload = await this.apiClient.paginate(\n this.apiClient.repos.listReleases,\n { owner, repo },\n (response, done) => {\n return response.data.reduce((result, release) => {\n const match = /tgstation-server-v([\\d.]+)/.exec(release.name ?? \"\");\n if (!match) return result;\n\n const majorVersion = parseInt(match[1][0]);\n if (majorVersion < 4) return result;\n\n const version = match[1];\n let old = false;\n\n //show 3 outdated versions(2 if you count the current one)\n if (version <= current) {\n if (oldversions >= 3 && !all) {\n (done as () => void)();\n return result;\n }\n oldversions++;\n old = true;\n }\n\n result.push({\n version,\n body: release.body ?? \"\",\n current: version === current,\n old\n });\n return result;\n }, [] as TGSVersion[]);\n }\n );\n } catch (e) {\n return new InternalStatus({\n code: StatusCode.ERROR,\n error: new InternalError(ErrorCode.GITHUB_FAIL, {\n jsError: e as RequestError\n })\n });\n }\n return new InternalStatus({\n code: StatusCode.OK,\n payload\n });\n }\n\n private transformPR(pr: FullGithubPullRequest | GithubPullRequest): PullRequest {\n return {\n number: pr.number,\n title: pr.title,\n author: pr.user?.login ?? \"ghost\",\n state: pr.merged_at ? \"merged\" : (pr.state as \"open\" | \"closed\"),\n link: pr.html_url,\n head: pr.head.sha,\n tail: pr.base.sha,\n testmergelabel: pr.labels.some(\n label =>\n label.name?.toLowerCase().includes(\"testmerge\") ||\n label.name?.toLowerCase().includes(\"test merge\")\n )\n };\n }\n\n public async getPRs({\n owner,\n repo,\n wantedPRs\n }: {\n owner: string;\n repo: string;\n wantedPRs?: number[];\n }): Promise> {\n let payload: PullRequest[] = [];\n try {\n payload = (\n await this.apiClient.paginate(this.apiClient.pulls.list, {\n owner,\n repo,\n state: \"open\"\n })\n ).map(this.transformPR);\n\n for (const wantedPR of wantedPRs ?? []) {\n if (!payload.find(pr => pr.number == wantedPR)) {\n const pr = (\n await this.apiClient.pulls.get({\n owner,\n repo,\n pull_number: wantedPR\n })\n ).data;\n payload.push(this.transformPR(pr));\n }\n }\n } catch (e) {\n console.error(e);\n return new InternalStatus({\n code: StatusCode.ERROR,\n error: new InternalError(ErrorCode.GITHUB_FAIL, {\n jsError: e as RequestError\n })\n });\n }\n return new InternalStatus({\n code: StatusCode.OK,\n payload\n });\n }\n\n public async getPRCommits({\n owner,\n repo,\n pr,\n wantedCommit\n }: {\n owner: string;\n repo: string;\n pr: PullRequest;\n wantedCommit?: string;\n }): Promise> {\n let payload: Commit[] = [];\n let extraCommit: Commit | undefined = undefined;\n try {\n payload = await this.apiClient.paginate(\n this.apiClient.pulls.listCommits,\n {\n owner,\n repo,\n pull_number: pr.number,\n per_page: 100\n },\n ({ data }) =>\n data.map(commit => ({\n name: commit.commit.message.split(\"\\n\")[0],\n sha: commit.sha,\n url: commit.html_url\n }))\n );\n\n //Newest at the top\n payload.reverse();\n\n if (wantedCommit && !payload.find(commit => commit.sha === wantedCommit)) {\n const _extraCommit = (\n await this.apiClient.repos.getCommit({\n owner,\n repo,\n ref: wantedCommit\n })\n ).data;\n extraCommit = {\n name: _extraCommit.commit.message.split(\"\\n\")[0],\n sha: _extraCommit.sha,\n url: _extraCommit.html_url\n };\n }\n } catch (e) {\n console.error(e);\n return new InternalStatus<\n [commits: Commit[], extraCommit?: Commit],\n ErrorCode.GITHUB_FAIL\n >({\n code: StatusCode.ERROR,\n error: new InternalError(ErrorCode.GITHUB_FAIL, {\n jsError: e as RequestError\n })\n });\n }\n return new InternalStatus({\n code: StatusCode.OK,\n payload: [payload, extraCommit]\n });\n }\n\n public async getFile(\n owner: string,\n repo: string,\n path: string,\n ref?: string\n ): Promise> {\n try {\n const { data } = await this.apiClient.repos.getContent({\n mediaType: {\n format: \"base64\"\n },\n owner,\n repo,\n path,\n ref\n });\n\n // ignore directory responses\n if (Array.isArray(data)) {\n return new InternalStatus({\n code: StatusCode.ERROR,\n error: new InternalError(ErrorCode.GITHUB_FAIL, {\n jsError: new Error(`${path} was a directory!`)\n })\n });\n }\n\n if (data.type !== \"file\") {\n return new InternalStatus({\n code: StatusCode.ERROR,\n error: new InternalError(ErrorCode.GITHUB_FAIL, {\n jsError: new Error(`${path} has type ${data.type}!`)\n })\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n const raw = (data as any).content as string;\n\n return new InternalStatus({\n code: StatusCode.OK,\n payload: raw\n });\n } catch (e) {\n console.error(e);\n return new InternalStatus({\n code: StatusCode.ERROR,\n error: new InternalError(ErrorCode.GITHUB_FAIL, {\n jsError: e as RequestError\n })\n });\n }\n }\n\n public async getDirectoryContents(\n owner: string,\n repo: string,\n path: string,\n ref?: string\n ): Promise> {\n try {\n const { data } = await this.apiClient.repos.getContent({\n owner,\n repo,\n path,\n ref\n });\n\n // ignore non-directory responses\n if (!Array.isArray(data)) {\n return new InternalStatus({\n code: StatusCode.ERROR,\n error: new InternalError(ErrorCode.GITHUB_FAIL, {\n jsError: new Error(`${path} was not a directory!`)\n })\n });\n }\n\n const result: DirectoryItem[] = [];\n data.forEach(element =>\n result.push({\n path: element.path,\n isDirectory: element.type == \"dir\"\n })\n );\n\n return new InternalStatus({\n code: StatusCode.OK,\n payload: result\n });\n } catch (e) {\n console.error(e);\n return new InternalStatus({\n code: StatusCode.ERROR,\n error: new InternalError(ErrorCode.GITHUB_FAIL, {\n jsError: e as RequestError\n })\n });\n }\n }\n})();\nexport default e;\n"],"names":["FieldType","StringControl","React","props","ref","value","onChange","e","target","disabled","PasswordControl","type","BooleanControl","rndId","Math","random","toString","htmlFor","className","id","checked","NumberControl","isNaN","valueAsNumber","min","max","EnumControl","parseInt","as","custom","Object","entries","enum","filter","key","map","noLocalize","name","message","defaultValues","Enum","Number","Boolean","String","Password","InputField","currentValue","setCurrentValue","useState","defaultValue","controlRef","useRef","useEffect","current","checkValidity","classList","remove","add","basicControls","string","password","boolean","undefined","changed","overlay","innerid","tooltip","show","triggerHandler","style","visibility","icon","faInfo","newValue","variant","onClick","InputForm","fieldValueStates","Map","fieldStateIds","fieldStates","setFieldStates","keys","fields","forEach","prevState","field","set","anyDiff","anyInvalid","fieldDescriptor","fieldValue","get","fieldState","invalid","hideDisabled","values","some","innerProps","readOnly","newVal","isValid","outputObject","alwaysInclude","includeAll","onSave","saveMessageId","JsonViewer","src","obj","theme","iconStyle","collapsed","displayDataTypes","DebugJsonViewer","configOptions","InstanceEditContext","async","hook","request","route","parameters","endpoint","merge","headers","authorization","auth","tokenType","token","authStrategy","assign","bind","TypedEmitter","constructor","super","apiClient","octo","Octokit","retry","throttling","this","userAgent","VERSION","baseUrl","throttle","onRateLimit","retryAfter","options","console","warn","method","url","retryCount","log","onAbuseLimit","owner","repo","repoData","repos","branch","getBranch","data","default_branch","InternalStatus","code","StatusCode","payload","commit","sha","error","InternalError","ErrorCode","jsError","all","oldversions","paginate","listReleases","response","done","reduce","result","release","match","exec","version","old","push","body","transformPR","pr","number","title","author","user","login","state","merged_at","link","html_url","head","tail","base","testmergelabel","labels","label","toLowerCase","includes","wantedPRs","pulls","list","wantedPR","find","pull_number","wantedCommit","extraCommit","listCommits","per_page","split","reverse","_extraCommit","getCommit","path","getContent","mediaType","format","Array","isArray","Error","raw","content","element","isDirectory"],"sourceRoot":""} \ No newline at end of file diff --git a/webpanel/5.7.0/240.9d4d9c96f62ce48cce5f.bundle.js b/webpanel/5.7.0/240.9d4d9c96f62ce48cce5f.bundle.js new file mode 100644 index 00000000..8fa1e638 --- /dev/null +++ b/webpanel/5.7.0/240.9d4d9c96f62ce48cce5f.bundle.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunktgstation_server_control_panel=self.webpackChunktgstation_server_control_panel||[]).push([[240],{8425:function(e,t,n){n.d(t,{t:function(){return l}});var r=n(67294),s=n(55171),a=n.n(s),i=n(27961);function o(e){return r.createElement(a(),{src:e.obj,name:"JSON",theme:"tube",iconStyle:"triangle",collapsed:!0,displayDataTypes:!1})}function l(e){return i.ZP.showjson.value?r.createElement("div",{className:"text-left"},r.createElement(o,{obj:e.obj})):r.createElement(r.Fragment,null)}},89929:function(e,t,n){n.d(t,{Z:function(){return h}});var r=n(67814),s=n(67294),a=n(35005),i=n(32258),o=n(15293),l=n(38966),c=n(19611),d=n(44012);function m(){return m=Object.assign||function(e){for(var t=1;tthis.props.selectPage(t)},t));const p=this.props.totalPages>7?s.createElement(l.Z.Ellipsis,{disabled:!0}):null,g=s.createElement(c.Z,{id:"popover-gotopage"},s.createElement(c.Z.Title,null,s.createElement(d.Z,{id:"generic.goto.title"})),s.createElement(c.Z.Content,null,s.createElement("form",{className:"d-flex",onSubmit:e=>{e.preventDefault(),this.props.selectPage(this.state.gotoValue),this.setState({showGoto:!1})}},s.createElement(i.Z.Control,{className:"mr-2",type:"number",min:1,max:this.props.totalPages,value:this.state.gotoValue,onChange:e=>this.setState({gotoValue:parseInt(e.target.value)}),custom:!0}),s.createElement(a.Z,{type:"submit"},s.createElement(d.Z,{id:"generic.goto"}))))),{selectPage:y,totalPages:w,currentPage:E,...v}=this.props;return s.createElement("div",m({className:"text-center",style:{position:"sticky",bottom:"1.5em"}},v),s.createElement(l.Z,{className:"justify-content-center"},s.createElement(l.Z.Prev,{disabled:this.props.currentPage<=1,onClick:()=>this.props.selectPage(Math.max(this.props.currentPage-1,1))}),s.createElement(l.Z.Item,{active:this.props.currentPage<=1,onClick:()=>this.props.selectPage(1)},"1"),p,e,p,this.props.totalPages>=2?s.createElement(l.Z.Item,{active:this.props.currentPage>=this.props.totalPages,onClick:()=>this.props.selectPage(this.props.totalPages)},this.props.totalPages):null,this.props.totalPages>7?s.createElement(o.Z,{show:this.state.showGoto,placement:"top",overlay:g},s.createElement(l.Z.Item,{onClick:()=>this.setState((e=>({showGoto:!e.showGoto})))},s.createElement(r.G,{icon:"search"}))):null,s.createElement(l.Z.Next,{disabled:this.props.currentPage>=this.props.totalPages,onClick:()=>this.props.selectPage(Math.min(this.props.currentPage+1,this.props.totalPages))})))}}},32240:function(e,t,n){n.r(t);var r=n(51436),s=n(67814),a=n(67294),i=n(35005),o=n(32258),l=n(94716),c=n(62318),d=n(15293),m=n(43489),h=n(44012),u=n(9899),p=n(48509),g=n(96846),y=n(53803),w=n(39521),E=n(96190),v=n(27428),f=n(16964),Z=n(1320),P=n(3e3),V=n(9635),b=n(8425),O=n(35855),C=n(89929);function S(){return S=Object.assign||function(e){for(var t=1;t{const n=Array.from(t.errors);return n.push(e),{errors:n}}))}async loadVersions(){if((0,f.DB)(this.context.instancePermissionSet,p.pJ.ListInstalled)){const e=await u.Z.listAllVersions(this.context.instance.id,{page:this.state.page});if(e.code===y.G.OK){if(this.state.page>e.payload.totalPages&&0!==e.payload.totalPages)return void this.setState({page:1});this.setState({versions:e.payload.content,maxPage:e.payload.totalPages})}else this.addError(e.error)}if((0,f.DB)(this.context.instancePermissionSet,p.pJ.ReadActive)){const e=await u.Z.getActiveVersion(this.context.instance.id);e.code===y.G.OK?this.setState({activeVersion:e.payload.engineVersion}):this.addError(e.error)}}async switchVersion(e,t){this.setState({loading:!0});const n=await u.Z.switchActive(this.context.instance.id,e,t&&this.state.customFile?await this.state.customFile.arrayBuffer():void 0);n.code===y.G.ERROR?this.addError(n.error):(t&&this.setState({customFile:null}),n.payload.installJob?(w.Z.registerJob(n.payload.installJob,this.context.instance.id),w.Z.registerCallback(n.payload.installJob.id,(()=>{this.loadVersions()}))):await this.loadVersions()),this.setState({loading:!1})}async componentDidUpdate(e,t){t.page!==this.state.page&&(Z.Mq.byondlistpage=this.state.page,await this.loadVersions())}async componentDidMount(){const e=v.Z.getLatestDefaultCommit("OpenDreamProject","OpenDream");fetch("https://secure.byond.com/download/version.txt").then((e=>e.text())).then((e=>e.split("\n"))).then((e=>e[0])).then((e=>{const t={engine:p.rG.Byond,version:e};this.setState({latestByondVersion:t,selectedByondVersion:t,loading:!1})})).catch((e=>{this.addError(new g.ZP(g.jK.APP_FAIL,{jsError:Error(e)})),this.setState({loading:!1})})),await this.loadVersions();const t=await e;if(t.code===y.G.ERROR)return void this.addError(t.error);const n={engine:p.rG.OpenDream,sourceSHA:t.payload};this.setState((e=>({latestODVersion:n,selectedODVersion:this.makeUniqueStringForVersion(e.latestODVersion)==this.makeUniqueStringForVersion(e.selectedODVersion??e.latestODVersion)?n:e.selectedODVersion})))}render(){if(this.state.loading)return a.createElement(O.Z,{text:"loading.byond"});const e=(0,f.DB)(this.context.instancePermissionSet,p.pJ.ListInstalled),t=(0,f.DB)(this.context.instancePermissionSet,p.pJ.ReadActive),n=(0,f.DB)(this.context.instancePermissionSet,p.pJ.InstallOfficialOrChangeActiveByondVersion),o=(0,f.DB)(this.context.instancePermissionSet,p.pJ.InstallOfficialOrChangeActiveOpenDreamVersion),l=(0,f.DB)(this.context.instancePermissionSet,p.pJ.DeleteInstall);return a.createElement("div",{className:"text-center"},a.createElement(b.t,{obj:this.state}),a.createElement("h1",null,a.createElement(h.Z,{id:"view.instance.engine"})),this.state.errors.map(((e,t)=>{if(e)return a.createElement(P.ZP,{key:t,error:e,onClose:()=>this.setState((e=>{const n=Array.from(e.errors);return n[t]=void 0,{errors:n}}))})})),e?a.createElement(a.Fragment,null,t?null:a.createElement(V.Z,{title:"view.instance.engine.current_denied"}),a.createElement("div",null,this.state.versions.map((e=>a.createElement(c.Z,{className:"w-md-25 mb-1 mx-auto d-flex",key:this.makeUniqueStringForVersion(e.engineVersion)},n||t?a.createElement(c.Z.Prepend,null,a.createElement(c.Z.Radio,{name:"byond",id:this.makeUniqueStringForVersion(e.engineVersion),value:x.friendlyVersion(e.engineVersion),disabled:e.engineVersion.engine===p.rG.Byond?!n:e.engineVersion.engine===p.rG.OpenDream&&!o,checked:this.makeUniqueStringForVersion(e.engineVersion)===this.makeUniqueStringForVersion(this.state.activeVersion),onChange:async()=>{await this.switchVersion(e.engineVersion,!1)}})):null,a.createElement("label",{className:"flex-grow-1 m-0",htmlFor:this.makeUniqueStringForVersion(e.engineVersion)},a.createElement(d.Z,{overlay:this.tooltip("view.instance.engine.custom"),show:!!e.engineVersion.customIteration&&void 0},(({ref:t,...n})=>a.createElement(c.Z.Text,S({className:"w-100"},n),x.friendlyVersion(e.engineVersion),e.engineVersion.customIteration?a.createElement("div",{className:"ml-auto",ref:t},a.createElement(s.G,{fixedWidth:!0,icon:"info"})):null)))),this.makeUniqueStringForVersion(e.engineVersion)!==this.makeUniqueStringForVersion(this.state.activeVersion)?a.createElement(c.Z.Append,null,a.createElement(d.Z,{overlay:this.tooltip("generic.no_perm"),show:!l&&void 0},a.createElement(i.Z,{variant:"danger",disabled:!l,onClick:async()=>{this.setState({loading:!0});const t=await u.Z.deleteVersion(this.context.instance.id,e.engineVersion);t.code===y.G.ERROR?this.addError(t.error):(w.Z.registerJob(t.payload,this.context.instance.id),w.Z.registerCallback(t.payload.id,(()=>{this.loadVersions()}))),this.setState({loading:!1})}},a.createElement(s.G,{icon:r.$aW})))):null)))),a.createElement(C.Z,{className:"mt-4",selectPage:e=>this.setState({page:e}),totalPages:this.state.maxPage??1,currentPage:this.state.page})):t?a.createElement(a.Fragment,null,a.createElement(V.Z,{title:"view.instance.engine.list_denied"}),a.createElement(h.Z,{id:"view.instance.engine.current_version",values:{version:this.state.activeVersion}})):a.createElement(V.Z,{title:"view.instance.engine.current_and_list_denied"}),a.createElement("hr",null),this.renderByondInstall(),a.createElement("hr",null),this.renderODInstall())}tooltip(e){return e?a.createElement(m.Z,{id:e},a.createElement(h.Z,{id:e})):a.createElement(a.Fragment,null)}renderByondInstall(){const e=(0,f.DB)(this.context.instancePermissionSet,p.pJ.InstallCustomByondVersion),t=(0,f.DB)(this.context.instancePermissionSet,p.pJ.InstallOfficialOrChangeActiveByondVersion);return a.createElement(a.Fragment,null,a.createElement("h4",null,a.createElement(h.Z,{id:"view.instance.engine.add_byond"})),a.createElement(c.Z,{className:"w-md-50 w-lg-25 mb-3 mx-auto"},a.createElement(l.Z,{type:"number",defaultValue:this.state.latestByondVersion.version.split(".")[0],onChange:e=>{this.setState((t=>{const n=(t.selectedByondVersion??t.latestByondVersion).version.split(".");return n[0]=e.target.value,{selectedByondVersion:{engine:p.rG.Byond,version:n.join(".")}}}))}}),a.createElement(c.Z.Text,{className:"rounded-0"},"."),a.createElement(l.Z,{type:"number",defaultValue:this.state.latestByondVersion.version.split(".")[1],onChange:e=>{this.setState((t=>{const n=(t.selectedByondVersion??t.latestByondVersion).version.split(".");return n[1]=e.target.value,{selectedByondVersion:{engine:p.rG.Byond,version:n.join(".")}}}))}}),a.createElement(c.Z.Append,null,a.createElement(d.Z,{overlay:this.tooltip("generic.no_perm"),show:!t&&void 0},a.createElement(i.Z,{variant:"success",disabled:!t,onClick:async()=>{await this.switchVersion(this.state.selectedByondVersion??this.state.latestByondVersion,!0)}},a.createElement(s.G,{icon:r.r8p}))))),a.createElement(o.Z,null,a.createElement(d.Z,{overlay:this.tooltip("generic.no_perm"),show:!e&&void 0},a.createElement(o.Z.File,{custom:!0,id:"test",disabled:!e,className:"w-md-50 w-lg-25 text-left",label:this.state.customFile?this.state.customFile.name:a.createElement(h.Z,{id:"view.instance.engine.upload"}),accept:".zip",onChange:e=>{this.setState({customFile:e.target.files?e.target.files[0]:null})}}))))}renderODInstall(){const e=(0,f.DB)(this.context.instancePermissionSet,p.pJ.InstallCustomOpenDreamVersion),t=(0,f.DB)(this.context.instancePermissionSet,p.pJ.InstallOfficialOrChangeActiveOpenDreamVersion);return a.createElement(a.Fragment,null,a.createElement("h4",null,a.createElement(h.Z,{id:"view.instance.engine.add_od"})),a.createElement(c.Z,{className:"w-md-50 w-lg-25 mb-3 mx-auto"},a.createElement(l.Z,{type:"string",defaultValue:this.state.latestODVersion.sourceSHA,value:(this.state.selectedODVersion??this.state.latestODVersion).sourceSHA,onChange:e=>{this.setState({selectedODVersion:{engine:p.rG.OpenDream,sourceSHA:e.target.value}})}}),a.createElement(c.Z.Append,null,a.createElement(d.Z,{overlay:this.tooltip("generic.no_perm"),show:!t&&void 0},a.createElement(i.Z,{variant:"success",disabled:!t,onClick:async()=>{await this.switchVersion(this.state.selectedODVersion??this.state.latestODVersion,!0)}},a.createElement(s.G,{icon:r.r8p}))))),a.createElement(o.Z,null,a.createElement(d.Z,{overlay:this.tooltip("generic.no_perm"),show:!e&&void 0},a.createElement(o.Z.File,{custom:!0,id:"test",disabled:!e,className:"w-md-50 w-lg-25 text-left",label:this.state.customFile?this.state.customFile.name:a.createElement(h.Z,{id:"view.instance.engine.upload"}),accept:".zip",onChange:e=>{this.setState({customFile:e.target.files?e.target.files[0]:null})}}))))}makeUniqueStringForVersion(e){return e?`${e.engine}-${e.version??"null"}-${e.sourceSHA??"null"}-${e.customIteration??"null"}`:"null-version"}static friendlyVersion(e){let t;switch(e.engine){case p.rG.Byond:t=e.version,t.endsWith(".0")&&(t=t.substring(0,t.length-2));break;case p.rG.OpenDream:t=`OD-${e.sourceSHA.substring(0,7)}`;break;default:throw new Error(`Unknown engine type: ${e.engine}`)}return e.customIteration?`${t} (${e.customIteration})`:t}}x.contextType=E.g,t.default=x},96190:function(e,t,n){n.d(t,{g:function(){return r}});const r=n(67294).createContext(void 0)},27428:function(e,t,n){var r=n(6964),s=n(17347),a=n(52638),i=n(12527),o=n(96846),l=n(53803),c=n(27961),d=n(86755);async function m(e,t,n){const r=e.endpoint.merge(t,n);return c.ZP.githubtoken.value&&(r.headers.authorization=`token ${c.ZP.githubtoken.value}`),e(r)}async function h(){return c.ZP.githubtoken.value?{type:"token",tokenType:"pat",token:c.ZP.githubtoken.value}:{type:"unauthenticated"}}const u=()=>Object.assign(h.bind(null),{hook:m.bind(null)}),p=new class extends i.TypedEmitter{constructor(){super(),this.apiClient=void 0;const e=a.v.plugin(r.X,s.O);this.apiClient=new e({authStrategy:u,userAgent:"tgstation-server-control-panel/"+d.q4,baseUrl:"https://api.github.com",throttle:{onRateLimit:(e,t)=>(console.warn(`Request quota exhausted for request ${t.method} ${t.url}`),0===t.request.retryCount&&(console.log(`Retrying after ${e} seconds!`),!0)),onAbuseLimit:(e,t)=>{console.warn(`Abuse detected for request ${t.method} ${t.url}`)}}})}async getLatestDefaultCommit(e,t){try{const n=await this.apiClient.repos.get({owner:e,repo:t}),r=await this.apiClient.repos.getBranch({owner:e,repo:t,branch:n.data.default_branch});return new l.Z({code:l.G.OK,payload:r.data.commit.sha})}catch(e){return new l.Z({code:l.G.ERROR,error:new o.ZP(o.jK.GITHUB_FAIL,{jsError:e})})}}async getVersions({owner:e,repo:t,current:n,all:r}){let s,a=0;try{s=await this.apiClient.paginate(this.apiClient.repos.listReleases,{owner:e,repo:t},((e,t)=>e.data.reduce(((e,s)=>{const i=/tgstation-server-v([\d.]+)/.exec(s.name??"");if(!i)return e;if(parseInt(i[1][0])<4)return e;const o=i[1];let l=!1;if(o<=n){if(a>=3&&!r)return t(),e;a++,l=!0}return e.push({version:o,body:s.body??"",current:o===n,old:l}),e}),[])))}catch(e){return new l.Z({code:l.G.ERROR,error:new o.ZP(o.jK.GITHUB_FAIL,{jsError:e})})}return new l.Z({code:l.G.OK,payload:s})}transformPR(e){return{number:e.number,title:e.title,author:e.user?.login??"ghost",state:e.merged_at?"merged":e.state,link:e.html_url,head:e.head.sha,tail:e.base.sha,testmergelabel:e.labels.some((e=>e.name?.toLowerCase().includes("testmerge")||e.name?.toLowerCase().includes("test merge")))}}async getPRs({owner:e,repo:t,wantedPRs:n}){let r=[];try{r=(await this.apiClient.paginate(this.apiClient.pulls.list,{owner:e,repo:t,state:"open"})).map(this.transformPR);for(const s of n??[])if(!r.find((e=>e.number==s))){const n=(await this.apiClient.pulls.get({owner:e,repo:t,pull_number:s})).data;r.push(this.transformPR(n))}}catch(e){return console.error(e),new l.Z({code:l.G.ERROR,error:new o.ZP(o.jK.GITHUB_FAIL,{jsError:e})})}return new l.Z({code:l.G.OK,payload:r})}async getPRCommits({owner:e,repo:t,pr:n,wantedCommit:r}){let s,a=[];try{if(a=await this.apiClient.paginate(this.apiClient.pulls.listCommits,{owner:e,repo:t,pull_number:n.number,per_page:100},(({data:e})=>e.map((e=>({name:e.commit.message.split("\n")[0],sha:e.sha,url:e.html_url}))))),a.reverse(),r&&!a.find((e=>e.sha===r))){const n=(await this.apiClient.repos.getCommit({owner:e,repo:t,ref:r})).data;s={name:n.commit.message.split("\n")[0],sha:n.sha,url:n.html_url}}}catch(e){return console.error(e),new l.Z({code:l.G.ERROR,error:new o.ZP(o.jK.GITHUB_FAIL,{jsError:e})})}return new l.Z({code:l.G.OK,payload:[a,s]})}async getFile(e,t,n,r){try{const{data:s}=await this.apiClient.repos.getContent({mediaType:{format:"base64"},owner:e,repo:t,path:n,ref:r});if(Array.isArray(s))return new l.Z({code:l.G.ERROR,error:new o.ZP(o.jK.GITHUB_FAIL,{jsError:new Error(`${n} was a directory!`)})});if("file"!==s.type)return new l.Z({code:l.G.ERROR,error:new o.ZP(o.jK.GITHUB_FAIL,{jsError:new Error(`${n} has type ${s.type}!`)})});const a=s.content;return new l.Z({code:l.G.OK,payload:a})}catch(e){return console.error(e),new l.Z({code:l.G.ERROR,error:new o.ZP(o.jK.GITHUB_FAIL,{jsError:e})})}}async getDirectoryContents(e,t,n,r){try{const{data:s}=await this.apiClient.repos.getContent({owner:e,repo:t,path:n,ref:r});if(!Array.isArray(s))return new l.Z({code:l.G.ERROR,error:new o.ZP(o.jK.GITHUB_FAIL,{jsError:new Error(`${n} was not a directory!`)})});const a=[];return s.forEach((e=>a.push({path:e.path,isDirectory:"dir"==e.type}))),new l.Z({code:l.G.OK,payload:a})}catch(e){return console.error(e),new l.Z({code:l.G.ERROR,error:new o.ZP(o.jK.GITHUB_FAIL,{jsError:e})})}}};t.Z=p}}]); +//# sourceMappingURL=240.9d4d9c96f62ce48cce5f.bundle.js.map \ No newline at end of file diff --git a/webpanel/5.7.0/240.9d4d9c96f62ce48cce5f.bundle.js.map b/webpanel/5.7.0/240.9d4d9c96f62ce48cce5f.bundle.js.map new file mode 100644 index 00000000..c5a4bca5 --- /dev/null +++ b/webpanel/5.7.0/240.9d4d9c96f62ce48cce5f.bundle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"240.9d4d9c96f62ce48cce5f.bundle.js","mappings":"mOAKe,SAASA,EAAWC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C,EAA0B,GAQhC,OAPA7G,EAAKwJ,SAAQC,GACT5C,EAAO3L,KAAK,CACRgO,KAAMO,EAAQP,KACdQ,YAA6B,OAAhBD,EAAQ1N,SAItB,IAAIoK,EAAAA,EAAe,CACtBzH,KAAMC,EAAAA,EAAAA,GACNC,QAASiI,IAEf,MAAOjL,GAEL,OADAwJ,QAAQrH,MAAMnC,GACP,IAAIuK,EAAAA,EAAuD,CAC9DzH,KAAMC,EAAAA,EAAAA,MACNZ,MAAO,IAAIqC,EAAAA,GAAcC,EAAAA,GAAAA,YAAuB,CAC5CC,QAAS1E,SAM7B","sources":["webpack://tgstation-server-control-panel/./src/components/utils/JsonViewer.tsx","webpack://tgstation-server-control-panel/./src/components/utils/PageHelper.tsx","webpack://tgstation-server-control-panel/./src/components/views/Instance/Edit/Engine.tsx","webpack://tgstation-server-control-panel/./src/contexts/InstanceEditContext.ts","webpack://tgstation-server-control-panel/./src/utils/GithubClient.ts"],"sourcesContent":["import React from \"react\";\nimport ReactJson from \"react-json-view\";\n\nimport configOptions from \"../../ApiClient/util/config\";\n\nexport default function JsonViewer(props: { obj: unknown }): JSX.Element {\n return (\n }\n name={\"JSON\"}\n theme=\"tube\"\n iconStyle=\"triangle\"\n collapsed\n displayDataTypes={false}\n />\n );\n}\n\nexport function DebugJsonViewer(props: { obj: unknown }): JSX.Element {\n if (!configOptions.showjson.value) {\n return <>;\n }\n return (\n
\n \n
\n );\n}\n","import { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport React, { ComponentPropsWithoutRef } from \"react\";\nimport Button from \"react-bootstrap/Button\";\nimport Form from \"react-bootstrap/Form\";\nimport OverlayTrigger from \"react-bootstrap/OverlayTrigger\";\nimport Pagination from \"react-bootstrap/Pagination\";\nimport Popover from \"react-bootstrap/Popover\";\nimport { FormattedMessage } from \"react-intl\";\n\ntype IProps = {\n selectPage: (page: number) => void;\n totalPages: number;\n currentPage: number;\n} & Partial>;\n\ninterface IState {\n showGoto: boolean;\n gotoValue: number;\n}\n\nexport default class PageHelper extends React.PureComponent {\n public constructor(props: IProps) {\n super(props);\n\n this.state = {\n showGoto: false,\n gotoValue: props.currentPage\n };\n }\n\n public render(): React.ReactNode {\n const items: React.ReactNode[] = [];\n\n const maxRight = Math.max(this.props.totalPages - this.props.currentPage - 1, 0);\n const maxLeft = Math.max(this.props.currentPage - 2, 0);\n\n const min = Math.max(\n this.props.currentPage -\n Math.max(\n 5 - Number(this.props.currentPage !== this.props.totalPages) - maxRight,\n 2\n ),\n 2\n );\n const max = Math.min(\n this.props.currentPage +\n Math.max(5 - Number(this.props.currentPage !== 1) - maxLeft, 2),\n this.props.totalPages - 1\n );\n\n //Start at the second page and stop at the second to last page\n for (let i = min; i <= max; i++) {\n items.push(\n this.props.selectPage(i)}>\n {i}\n \n );\n }\n\n const ellipsis = this.props.totalPages > 7 ? : null;\n\n const findPopover = (\n \n \n \n \n \n {\n e.preventDefault();\n this.props.selectPage(this.state.gotoValue);\n this.setState({\n showGoto: false\n });\n }}>\n this.setState({ gotoValue: parseInt(e.target.value) })}\n custom\n />\n \n \n \n \n );\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { selectPage: _1, totalPages: _2, currentPage: _3, ...props } = this.props;\n\n return (\n
\n \n \n this.props.selectPage(Math.max(this.props.currentPage - 1, 1))\n }\n />\n this.props.selectPage(1)}>\n 1\n \n {ellipsis}\n {items}\n {ellipsis}\n {this.props.totalPages >= 2 ? (\n = this.props.totalPages}\n onClick={() => this.props.selectPage(this.props.totalPages)}>\n {this.props.totalPages}\n \n ) : null}\n {this.props.totalPages > 7 ? (\n \n \n this.setState(prev => {\n return {\n showGoto: !prev.showGoto\n };\n })\n }>\n \n \n \n ) : null}\n = this.props.totalPages}\n onClick={() =>\n this.props.selectPage(\n Math.min(this.props.currentPage + 1, this.props.totalPages)\n )\n }\n />\n \n
\n );\n }\n}\n","import { faPlus, faTrash } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport React, { ChangeEvent } from \"react\";\nimport Button from \"react-bootstrap/Button\";\nimport Form from \"react-bootstrap/Form\";\nimport FormControl from \"react-bootstrap/FormControl\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\nimport OverlayTrigger from \"react-bootstrap/OverlayTrigger\";\nimport Tooltip from \"react-bootstrap/Tooltip\";\nimport { FormattedMessage } from \"react-intl\";\n\nimport EngineClient from \"../../../../ApiClient/EngineClient\";\nimport {\n EngineResponse,\n EngineRights,\n EngineType,\n EngineVersion\n} from \"../../../../ApiClient/generatedcode/generated\";\nimport InternalError, { ErrorCode } from \"../../../../ApiClient/models/InternalComms/InternalError\";\nimport { StatusCode } from \"../../../../ApiClient/models/InternalComms/InternalStatus\";\nimport JobsController from \"../../../../ApiClient/util/JobsController\";\nimport { InstanceEditContext } from \"../../../../contexts/InstanceEditContext\";\nimport GithubClient from \"../../../../utils/GithubClient\";\nimport { hasEngineRight } from \"../../../../utils/misc\";\nimport { RouteData } from \"../../../../utils/routes\";\nimport ErrorAlert from \"../../../utils/ErrorAlert\";\nimport GenericAlert from \"../../../utils/GenericAlert\";\nimport { DebugJsonViewer } from \"../../../utils/JsonViewer\";\nimport Loading from \"../../../utils/Loading\";\nimport PageHelper from \"../../../utils/PageHelper\";\n\ninterface IProps {}\n\ninterface IState {\n errors: Array | undefined>;\n versions: EngineResponse[];\n activeVersion?: EngineVersion;\n latestByondVersion: EngineVersion;\n latestODVersion: EngineVersion;\n selectedByondVersion?: EngineVersion;\n selectedODVersion?: EngineVersion;\n loading: boolean;\n customFile?: File | null;\n page: number;\n maxPage?: number;\n}\n\nclass Engine extends React.Component {\n public declare context: InstanceEditContext;\n public constructor(props: IProps) {\n super(props);\n\n const initByond = {\n version: \"514.1589\",\n engine: EngineType.Byond\n };\n const initOD = {\n engine: EngineType.OpenDream,\n sourceSHA: \"fab769776dada6b9bcad546094d78c604049e0e9\"\n };\n this.state = {\n versions: [],\n errors: [],\n latestByondVersion: initByond,\n latestODVersion: initOD,\n loading: true,\n page: RouteData.byondlistpage ?? 1\n };\n }\n\n private addError(error: InternalError): void {\n this.setState(prevState => {\n const errors = Array.from(prevState.errors);\n errors.push(error);\n return {\n errors\n };\n });\n }\n\n private async loadVersions() {\n if (hasEngineRight(this.context.instancePermissionSet, EngineRights.ListInstalled)) {\n const response = await EngineClient.listAllVersions(this.context.instance.id, {\n page: this.state.page\n });\n if (response.code === StatusCode.OK) {\n if (\n this.state.page > response.payload.totalPages &&\n response.payload.totalPages !== 0\n ) {\n this.setState({\n page: 1\n });\n return;\n }\n\n this.setState({\n versions: response.payload.content,\n maxPage: response.payload.totalPages\n });\n } else {\n this.addError(response.error);\n }\n }\n\n if (hasEngineRight(this.context.instancePermissionSet, EngineRights.ReadActive)) {\n const response2 = await EngineClient.getActiveVersion(this.context.instance.id);\n if (response2.code === StatusCode.OK) {\n this.setState({\n activeVersion: response2.payload.engineVersion\n });\n } else {\n this.addError(response2.error);\n }\n }\n }\n\n private async switchVersion(version: EngineVersion, useCustom: boolean): Promise {\n this.setState({\n loading: true\n });\n const response = await EngineClient.switchActive(\n this.context.instance.id,\n version,\n useCustom && this.state.customFile\n ? await this.state.customFile.arrayBuffer()\n : undefined\n );\n if (response.code === StatusCode.ERROR) {\n this.addError(response.error);\n } else {\n if (useCustom) {\n this.setState({\n customFile: null\n });\n }\n if (response.payload.installJob) {\n JobsController.registerJob(response.payload.installJob, this.context.instance.id);\n JobsController.registerCallback(\n response.payload.installJob.id,\n () => void this.loadVersions()\n );\n } else {\n await this.loadVersions();\n }\n }\n this.setState({\n loading: false\n });\n }\n\n public async componentDidUpdate(\n prevProps: Readonly,\n prevState: Readonly\n ): Promise {\n if (prevState.page !== this.state.page) {\n RouteData.byondlistpage = this.state.page;\n await this.loadVersions();\n }\n }\n\n public async componentDidMount(): Promise {\n const odGetPromise = GithubClient.getLatestDefaultCommit(\"OpenDreamProject\", \"OpenDream\");\n fetch(\"https://secure.byond.com/download/version.txt\")\n .then(res => res.text())\n .then(data => data.split(\"\\n\"))\n .then(versions => versions[0])\n .then(version => {\n const engineVersion: EngineVersion = {\n engine: EngineType.Byond,\n version\n };\n this.setState({\n latestByondVersion: engineVersion,\n selectedByondVersion: engineVersion,\n loading: false\n });\n })\n .catch(e => {\n this.addError(new InternalError(ErrorCode.APP_FAIL, { jsError: Error(e) }));\n this.setState({\n loading: false\n });\n });\n\n await this.loadVersions();\n\n const odLatestCommit = await odGetPromise;\n if (odLatestCommit.code === StatusCode.ERROR) {\n this.addError(odLatestCommit.error);\n return;\n }\n\n const newVer = {\n engine: EngineType.OpenDream,\n sourceSHA: odLatestCommit.payload\n };\n\n this.setState(prev => {\n return {\n latestODVersion: newVer,\n selectedODVersion:\n this.makeUniqueStringForVersion(prev.latestODVersion) ==\n this.makeUniqueStringForVersion(prev.selectedODVersion ?? prev.latestODVersion)\n ? newVer\n : prev.selectedODVersion\n };\n });\n }\n\n public render(): React.ReactNode {\n if (this.state.loading) {\n return ;\n }\n\n const canSeeVersions = hasEngineRight(\n this.context.instancePermissionSet,\n EngineRights.ListInstalled\n );\n const canSeeCurrent = hasEngineRight(\n this.context.instancePermissionSet,\n EngineRights.ReadActive\n );\n const canInstallAndSwitchByond = hasEngineRight(\n this.context.instancePermissionSet,\n EngineRights.InstallOfficialOrChangeActiveByondVersion\n );\n const canInstallAndSwitchOD = hasEngineRight(\n this.context.instancePermissionSet,\n EngineRights.InstallOfficialOrChangeActiveOpenDreamVersion\n );\n const canDelete = hasEngineRight(\n this.context.instancePermissionSet,\n EngineRights.DeleteInstall\n );\n\n return (\n
\n \n

\n \n

\n {this.state.errors.map((err, index) => {\n if (!err) return;\n return (\n \n this.setState(prev => {\n const newarr = Array.from(prev.errors);\n newarr[index] = undefined;\n return {\n errors: newarr\n };\n })\n }\n />\n );\n })}\n {canSeeVersions ? (\n <>\n {!canSeeCurrent ? (\n \n ) : null}\n
\n {this.state.versions.map(item => {\n // noinspection JSBitwiseOperatorUsage\n return (\n \n {canInstallAndSwitchByond || canSeeCurrent ? (\n \n {\n await this.switchVersion(\n item.engineVersion,\n false\n );\n }}\n />\n \n ) : null}\n \n \n {({ ref, ...triggerHandler }) => (\n \n {Engine.friendlyVersion(item.engineVersion)}\n {item.engineVersion.customIteration ? (\n \n }>\n \n
\n ) : null}\n \n )}\n \n \n {this.makeUniqueStringForVersion(item.engineVersion) !==\n this.makeUniqueStringForVersion(\n this.state.activeVersion\n ) ? (\n \n \n {\n this.setState({\n loading: true\n });\n const response = await EngineClient.deleteVersion(\n this.context.instance.id,\n item.engineVersion\n );\n if (\n response.code === StatusCode.ERROR\n ) {\n this.addError(response.error);\n } else {\n JobsController.registerJob(\n response.payload,\n this.context.instance.id\n );\n JobsController.registerCallback(\n response.payload.id,\n () => void this.loadVersions()\n );\n }\n this.setState({\n loading: false\n });\n }}>\n \n \n \n \n ) : null}\n \n );\n })}\n
\n this.setState({ page: newPage })}\n totalPages={this.state.maxPage ?? 1}\n currentPage={this.state.page}\n />\n \n ) : canSeeCurrent ? (\n <>\n \n \n \n ) : (\n \n )}\n
\n {this.renderByondInstall()}\n
\n {this.renderODInstall()}\n \n );\n }\n\n private tooltip(innerid?: string): JSX.Element {\n if (!innerid) return ;\n\n return (\n \n \n \n );\n }\n\n private renderByondInstall(): React.ReactNode {\n const canInstallCustomByond = hasEngineRight(\n this.context.instancePermissionSet,\n EngineRights.InstallCustomByondVersion\n );\n const canInstallAndSwitchByond = hasEngineRight(\n this.context.instancePermissionSet,\n EngineRights.InstallOfficialOrChangeActiveByondVersion\n );\n return (\n \n

\n \n

\n \n {\n this.setState(prev => {\n const arr = (\n prev.selectedByondVersion ?? prev.latestByondVersion\n ).version!.split(\".\");\n arr[0] = e.target.value;\n return {\n selectedByondVersion: {\n engine: EngineType.Byond,\n version: arr.join(\".\")\n }\n };\n });\n }}\n />\n .\n {\n this.setState(prev => {\n const arr = (\n prev.selectedByondVersion ?? prev.latestByondVersion\n ).version!.split(\".\");\n arr[1] = e.target.value;\n return {\n selectedByondVersion: {\n engine: EngineType.Byond,\n version: arr.join(\".\")\n }\n };\n });\n }}\n />\n \n \n {\n await this.switchVersion(\n this.state.selectedByondVersion ??\n this.state.latestByondVersion,\n true\n );\n }}>\n \n \n \n \n \n
\n \n \n )\n }\n accept=\".zip\"\n onChange={(e: ChangeEvent) => {\n this.setState({\n customFile: e.target.files ? e.target.files[0] : null\n });\n }}\n />\n \n \n
\n );\n }\n private renderODInstall(): React.ReactNode {\n const canInstallCustomOD = hasEngineRight(\n this.context.instancePermissionSet,\n EngineRights.InstallCustomOpenDreamVersion\n );\n const canInstallAndSwitchOD = hasEngineRight(\n this.context.instancePermissionSet,\n EngineRights.InstallOfficialOrChangeActiveOpenDreamVersion\n );\n return (\n \n

\n \n

\n \n {\n this.setState({\n selectedODVersion: {\n engine: EngineType.OpenDream,\n sourceSHA: e.target.value\n }\n });\n }}\n />\n \n \n {\n await this.switchVersion(\n this.state.selectedODVersion ?? this.state.latestODVersion,\n true\n );\n }}>\n \n \n \n \n \n
\n \n \n )\n }\n accept=\".zip\"\n onChange={(e: ChangeEvent) => {\n this.setState({\n customFile: e.target.files ? e.target.files[0] : null\n });\n }}\n />\n \n \n
\n );\n }\n\n private makeUniqueStringForVersion(engineVersion?: EngineVersion): string {\n if (!engineVersion) {\n return \"null-version\";\n }\n\n return `${engineVersion.engine}-${engineVersion.version ?? \"null\"}-${\n engineVersion.sourceSHA ?? \"null\"\n }-${engineVersion.customIteration ?? \"null\"}`;\n }\n\n public static friendlyVersion(engineVersion: EngineVersion): string {\n let baseVersion: string;\n switch (engineVersion.engine) {\n case EngineType.Byond:\n baseVersion = engineVersion.version!;\n if (baseVersion.endsWith(\".0\")) {\n baseVersion = baseVersion.substring(0, baseVersion.length - 2);\n }\n break;\n case EngineType.OpenDream:\n baseVersion = `OD-${engineVersion.sourceSHA!.substring(0, 7)}`;\n break;\n default:\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n throw new Error(`Unknown engine type: ${engineVersion.engine}`);\n }\n\n if (engineVersion.customIteration) {\n return `${baseVersion} (${engineVersion.customIteration})`;\n }\n\n return baseVersion;\n }\n}\nEngine.contextType = InstanceEditContext;\nexport default Engine;\n","import React from \"react\";\n\nimport type {\n InstancePermissionSetResponse,\n InstanceResponse,\n ServerInformationResponse,\n UserResponse\n} from \"../ApiClient/generatedcode/generated\";\nimport InternalError from \"../ApiClient/models/InternalComms/InternalError\";\n\nexport type InstanceEditContext = {\n deleteError: (error: InternalError) => void;\n errors: Set;\n reloadInstance: () => Promise;\n instance: InstanceResponse;\n user: UserResponse;\n serverInfo: ServerInformationResponse;\n instancePermissionSet: InstancePermissionSetResponse;\n};\n\n//same as InstanceEditContext except used for components which arent loading under instanceedit so we cant guarentee that instance wont be null\nexport type UnsafeInstanceEditContext = {\n deleteError: (error: InternalError) => void;\n errors: Set;\n reloadInstance: () => Promise;\n instance: InstanceResponse | null;\n user: UserResponse;\n serverInfo: ServerInformationResponse;\n instancePermissionSet: InstancePermissionSetResponse | null;\n};\n\nexport const InstanceEditContext = React.createContext(\n (undefined as unknown) as InstanceEditContext\n);\n","import { retry } from \"@octokit/plugin-retry\";\nimport { throttling } from \"@octokit/plugin-throttling\";\nimport { RequestError } from \"@octokit/request-error\";\nimport { Octokit, RestEndpointMethodTypes } from \"@octokit/rest\";\nimport { TypedEmitter } from \"tiny-typed-emitter/lib\";\n\nimport InternalError, { ErrorCode } from \"../ApiClient/models/InternalComms/InternalError\";\nimport InternalStatus, { StatusCode } from \"../ApiClient/models/InternalComms/InternalStatus\";\nimport configOptions from \"../ApiClient/util/config\";\nimport { VERSION } from \"../definitions/constants\";\n\nexport interface TGSVersion {\n version: string;\n body: string;\n current: boolean;\n old: boolean;\n}\n\nexport interface Commit {\n name: string;\n sha: string;\n url: string;\n}\n\nexport interface PullRequest {\n number: number;\n title: string;\n author: string;\n state: \"open\" | \"closed\" | \"merged\";\n link: string;\n head: string;\n tail: string;\n testmergelabel: boolean;\n}\n\ntype ExtractArrayType
= A extends Array ? ArrayType : never;\nexport type GithubPullRequest = ExtractArrayType<\n RestEndpointMethodTypes[\"pulls\"][\"list\"][\"response\"][\"data\"]\n>;\nexport type FullGithubPullRequest = RestEndpointMethodTypes[\"pulls\"][\"get\"][\"response\"][\"data\"];\n\nexport interface DirectoryItem {\n path: string;\n isDirectory: boolean;\n}\n\ninterface IEvents {}\n\n/* eslint-disable */\n\nasync function hook(request: any, route: any, parameters?: any): Promise {\n const endpoint = request.endpoint.merge(route as string, parameters);\n\n if (configOptions.githubtoken.value) {\n endpoint.headers.authorization = `token ${configOptions.githubtoken.value}`;\n }\n\n return request(endpoint);\n}\n\nasync function auth(): Promise {\n if (configOptions.githubtoken.value) {\n return {\n type: \"token\",\n tokenType: \"pat\",\n token: configOptions.githubtoken.value\n };\n } else {\n return {\n type: \"unauthenticated\"\n };\n }\n}\n\nconst authStrategy = () => {\n return Object.assign(auth.bind(null), {\n hook: hook.bind(null)\n });\n};\n\n/* eslint-enable */\n\nconst e = new (class GithubClient extends TypedEmitter {\n private readonly apiClient: Octokit;\n\n public constructor() {\n super();\n\n const octo = Octokit.plugin(retry, throttling);\n\n this.apiClient = new octo({\n authStrategy,\n userAgent: \"tgstation-server-control-panel/\" + VERSION,\n baseUrl: \"https://api.github.com\",\n throttle: {\n onRateLimit: (\n retryAfter: number,\n options: { method: string; url: string; request: { retryCount: number } }\n ) => {\n console.warn(\n `Request quota exhausted for request ${options.method} ${options.url}`\n );\n\n if (options.request.retryCount === 0) {\n // only retries once\n console.log(`Retrying after ${retryAfter} seconds!`);\n return true;\n }\n return false;\n },\n onAbuseLimit: (retryAfter: number, options: { method: string; url: string }) => {\n // does not retry, only logs a warning\n console.warn(`Abuse detected for request ${options.method} ${options.url}`);\n }\n }\n });\n }\n\n public async getLatestDefaultCommit(\n owner: string,\n repo: string\n ): Promise> {\n try {\n const repoData = await this.apiClient.repos.get({\n owner,\n repo\n });\n\n const branch = await this.apiClient.repos.getBranch({\n owner,\n repo,\n branch: repoData.data.default_branch\n });\n\n return new InternalStatus({\n code: StatusCode.OK,\n payload: branch.data.commit.sha\n });\n } catch (e) {\n return new InternalStatus({\n code: StatusCode.ERROR,\n error: new InternalError(ErrorCode.GITHUB_FAIL, {\n jsError: e as RequestError\n })\n });\n }\n }\n\n public async getVersions({\n owner,\n repo,\n current,\n all\n }: {\n owner: string;\n repo: string;\n current: string;\n all?: boolean;\n }): Promise> {\n let payload: TGSVersion[];\n let oldversions = 0;\n try {\n payload = await this.apiClient.paginate(\n this.apiClient.repos.listReleases,\n { owner, repo },\n (response, done) => {\n return response.data.reduce((result, release) => {\n const match = /tgstation-server-v([\\d.]+)/.exec(release.name ?? \"\");\n if (!match) return result;\n\n const majorVersion = parseInt(match[1][0]);\n if (majorVersion < 4) return result;\n\n const version = match[1];\n let old = false;\n\n //show 3 outdated versions(2 if you count the current one)\n if (version <= current) {\n if (oldversions >= 3 && !all) {\n (done as () => void)();\n return result;\n }\n oldversions++;\n old = true;\n }\n\n result.push({\n version,\n body: release.body ?? \"\",\n current: version === current,\n old\n });\n return result;\n }, [] as TGSVersion[]);\n }\n );\n } catch (e) {\n return new InternalStatus({\n code: StatusCode.ERROR,\n error: new InternalError(ErrorCode.GITHUB_FAIL, {\n jsError: e as RequestError\n })\n });\n }\n return new InternalStatus({\n code: StatusCode.OK,\n payload\n });\n }\n\n private transformPR(pr: FullGithubPullRequest | GithubPullRequest): PullRequest {\n return {\n number: pr.number,\n title: pr.title,\n author: pr.user?.login ?? \"ghost\",\n state: pr.merged_at ? \"merged\" : (pr.state as \"open\" | \"closed\"),\n link: pr.html_url,\n head: pr.head.sha,\n tail: pr.base.sha,\n testmergelabel: pr.labels.some(\n label =>\n label.name?.toLowerCase().includes(\"testmerge\") ||\n label.name?.toLowerCase().includes(\"test merge\")\n )\n };\n }\n\n public async getPRs({\n owner,\n repo,\n wantedPRs\n }: {\n owner: string;\n repo: string;\n wantedPRs?: number[];\n }): Promise> {\n let payload: PullRequest[] = [];\n try {\n payload = (\n await this.apiClient.paginate(this.apiClient.pulls.list, {\n owner,\n repo,\n state: \"open\"\n })\n ).map(this.transformPR);\n\n for (const wantedPR of wantedPRs ?? []) {\n if (!payload.find(pr => pr.number == wantedPR)) {\n const pr = (\n await this.apiClient.pulls.get({\n owner,\n repo,\n pull_number: wantedPR\n })\n ).data;\n payload.push(this.transformPR(pr));\n }\n }\n } catch (e) {\n console.error(e);\n return new InternalStatus({\n code: StatusCode.ERROR,\n error: new InternalError(ErrorCode.GITHUB_FAIL, {\n jsError: e as RequestError\n })\n });\n }\n return new InternalStatus({\n code: StatusCode.OK,\n payload\n });\n }\n\n public async getPRCommits({\n owner,\n repo,\n pr,\n wantedCommit\n }: {\n owner: string;\n repo: string;\n pr: PullRequest;\n wantedCommit?: string;\n }): Promise> {\n let payload: Commit[] = [];\n let extraCommit: Commit | undefined = undefined;\n try {\n payload = await this.apiClient.paginate(\n this.apiClient.pulls.listCommits,\n {\n owner,\n repo,\n pull_number: pr.number,\n per_page: 100\n },\n ({ data }) =>\n data.map(commit => ({\n name: commit.commit.message.split(\"\\n\")[0],\n sha: commit.sha,\n url: commit.html_url\n }))\n );\n\n //Newest at the top\n payload.reverse();\n\n if (wantedCommit && !payload.find(commit => commit.sha === wantedCommit)) {\n const _extraCommit = (\n await this.apiClient.repos.getCommit({\n owner,\n repo,\n ref: wantedCommit\n })\n ).data;\n extraCommit = {\n name: _extraCommit.commit.message.split(\"\\n\")[0],\n sha: _extraCommit.sha,\n url: _extraCommit.html_url\n };\n }\n } catch (e) {\n console.error(e);\n return new InternalStatus<\n [commits: Commit[], extraCommit?: Commit],\n ErrorCode.GITHUB_FAIL\n >({\n code: StatusCode.ERROR,\n error: new InternalError(ErrorCode.GITHUB_FAIL, {\n jsError: e as RequestError\n })\n });\n }\n return new InternalStatus({\n code: StatusCode.OK,\n payload: [payload, extraCommit]\n });\n }\n\n public async getFile(\n owner: string,\n repo: string,\n path: string,\n ref?: string\n ): Promise> {\n try {\n const { data } = await this.apiClient.repos.getContent({\n mediaType: {\n format: \"base64\"\n },\n owner,\n repo,\n path,\n ref\n });\n\n // ignore directory responses\n if (Array.isArray(data)) {\n return new InternalStatus({\n code: StatusCode.ERROR,\n error: new InternalError(ErrorCode.GITHUB_FAIL, {\n jsError: new Error(`${path} was a directory!`)\n })\n });\n }\n\n if (data.type !== \"file\") {\n return new InternalStatus({\n code: StatusCode.ERROR,\n error: new InternalError(ErrorCode.GITHUB_FAIL, {\n jsError: new Error(`${path} has type ${data.type}!`)\n })\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n const raw = (data as any).content as string;\n\n return new InternalStatus({\n code: StatusCode.OK,\n payload: raw\n });\n } catch (e) {\n console.error(e);\n return new InternalStatus({\n code: StatusCode.ERROR,\n error: new InternalError(ErrorCode.GITHUB_FAIL, {\n jsError: e as RequestError\n })\n });\n }\n }\n\n public async getDirectoryContents(\n owner: string,\n repo: string,\n path: string,\n ref?: string\n ): Promise> {\n try {\n const { data } = await this.apiClient.repos.getContent({\n owner,\n repo,\n path,\n ref\n });\n\n // ignore non-directory responses\n if (!Array.isArray(data)) {\n return new InternalStatus({\n code: StatusCode.ERROR,\n error: new InternalError(ErrorCode.GITHUB_FAIL, {\n jsError: new Error(`${path} was not a directory!`)\n })\n });\n }\n\n const result: DirectoryItem[] = [];\n data.forEach(element =>\n result.push({\n path: element.path,\n isDirectory: element.type == \"dir\"\n })\n );\n\n return new InternalStatus({\n code: StatusCode.OK,\n payload: result\n });\n } catch (e) {\n console.error(e);\n return new InternalStatus({\n code: StatusCode.ERROR,\n error: new InternalError(ErrorCode.GITHUB_FAIL, {\n jsError: e as RequestError\n })\n });\n }\n }\n})();\nexport default e;\n"],"names":["JsonViewer","props","src","obj","name","theme","iconStyle","collapsed","displayDataTypes","DebugJsonViewer","configOptions","className","PageHelper","React","constructor","super","this","state","showGoto","gotoValue","currentPage","render","items","maxRight","Math","max","totalPages","maxLeft","min","Number","i","push","key","active","onClick","selectPage","ellipsis","disabled","findPopover","id","onSubmit","e","preventDefault","setState","type","value","onChange","parseInt","target","custom","_1","_2","_3","style","position","bottom","show","placement","overlay","prev","icon","Engine","initByond","version","engine","EngineType","initOD","sourceSHA","versions","errors","latestByondVersion","latestODVersion","loading","page","RouteData","addError","error","prevState","Array","from","hasEngineRight","context","instancePermissionSet","EngineRights","response","EngineClient","instance","code","StatusCode","payload","content","maxPage","response2","activeVersion","engineVersion","useCustom","customFile","arrayBuffer","undefined","installJob","JobsController","loadVersions","prevProps","odGetPromise","GithubClient","fetch","then","res","text","data","split","selectedByondVersion","catch","InternalError","ErrorCode","jsError","Error","odLatestCommit","newVer","selectedODVersion","makeUniqueStringForVersion","canSeeVersions","canSeeCurrent","canInstallAndSwitchByond","canInstallAndSwitchOD","canDelete","map","err","index","onClose","newarr","title","item","friendlyVersion","checked","async","switchVersion","htmlFor","tooltip","customIteration","ref","triggerHandler","fixedWidth","variant","faTrash","newPage","values","renderByondInstall","renderODInstall","innerid","canInstallCustomByond","defaultValue","arr","join","faPlus","label","accept","files","canInstallCustomOD","baseVersion","endsWith","substring","length","contextType","InstanceEditContext","hook","request","route","parameters","endpoint","merge","headers","authorization","auth","tokenType","token","authStrategy","Object","assign","bind","TypedEmitter","apiClient","octo","Octokit","retry","throttling","userAgent","VERSION","baseUrl","throttle","onRateLimit","retryAfter","options","console","warn","method","url","retryCount","log","onAbuseLimit","owner","repo","repoData","repos","get","branch","getBranch","default_branch","InternalStatus","commit","sha","current","all","oldversions","paginate","listReleases","done","reduce","result","release","match","exec","old","body","transformPR","pr","number","author","user","login","merged_at","link","html_url","head","tail","base","testmergelabel","labels","some","toLowerCase","includes","wantedPRs","pulls","list","wantedPR","find","pull_number","wantedCommit","extraCommit","listCommits","per_page","message","reverse","_extraCommit","getCommit","path","getContent","mediaType","format","isArray","raw","forEach","element","isDirectory"],"sourceRoot":""} \ No newline at end of file diff --git a/webpanel/5.7.0/246.67f9678139a3c824ae5c.bundle.js b/webpanel/5.7.0/246.67f9678139a3c824ae5c.bundle.js new file mode 100644 index 00000000..137d0e81 --- /dev/null +++ b/webpanel/5.7.0/246.67f9678139a3c824ae5c.bundle.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunktgstation_server_control_panel=self.webpackChunktgstation_server_control_panel||[]).push([[246],{79049:function(e,n,t){t.d(n,{Pg:function(){return y},ZP:function(){return h},fS:function(){return v}});var a=t(51436),r=t(67814),o=t(67294),i=t(35005),l=t(32258),u=t(62318),c=t(15293),s=t(43489),d=t(44012);function m(){return m=Object.assign||function(e){for(var n=1;ne.onChange(n.target.value),disabled:e.disabled,ref:n})})),E=o.forwardRef((function(e,n){return o.createElement(l.Z.Control,{value:e.value,onChange:n=>e.onChange(n.target.value),disabled:e.disabled,type:"password",ref:n})})),p=o.forwardRef((function(e,n){const t=Math.random().toString();return o.createElement("label",{htmlFor:t,className:"d-flex m-0 flex-grow-1 justify-content-center align-content-center"},o.createElement(l.Z.Check,{id:t,checked:e.value,onChange:n=>e.onChange(n.target.checked),type:"switch",className:"m-auto",disabled:e.disabled,ref:n}))})),b=o.forwardRef((function(e,n){return o.createElement(l.Z.Control,{value:e.value,onChange:n=>e.onChange(isNaN(n.target.valueAsNumber)?n.target.value:n.target.valueAsNumber),disabled:e.disabled,min:e.min,max:e.max,type:"number",ref:n})})),g=o.forwardRef((function(e,n){return o.createElement(l.Z.Control,{value:e.value,onChange:n=>e.onChange(parseInt(n.target.value)),disabled:e.disabled,as:"select",custom:!0,ref:n},Object.entries(e.enum).filter((([e])=>isNaN(parseInt(e)))).map((([n,t])=>e.noLocalize?o.createElement("option",{key:t,value:t},n):o.createElement(d.Z,{id:`${e.name}.${n}`,key:n},(e=>o.createElement("option",{key:t,value:t},e))))))})),y={[v.Enum]:0,[v.Number]:0,[v.Boolean]:!1,[v.String]:"",[v.Password]:""};function h(e){const[n,t]=(0,o.useState)(e.defaultValue??y[e.type]),l=(0,o.useRef)(null);(0,o.useEffect)((()=>{t(e.defaultValue??y[e.type])}),[e.defaultValue]),(0,o.useEffect)((()=>{switch(l.current&&(l.current.checkValidity()?l.current.classList.remove("is-invalid"):l.current.classList.add("is-invalid")),e.type){case v.Boolean:case v.Enum:case v.Number:case v.String:case v.Password:return void e.onChange(n,l.current?.checkValidity()??!0)}}),[n]);const h={string:f,password:E,boolean:p,[v.Number]:void 0,[v.Enum]:void 0},Z=n!=(e.defaultValue??y[e.type]);return o.createElement(u.Z,null,o.createElement(c.Z,{overlay:(x=e.tooltip,x?o.createElement(s.Z,{id:x},o.createElement(d.Z,{id:x})):o.createElement(o.Fragment,null)),show:!!e.tooltip&&void 0},(({ref:n,...t})=>o.createElement(u.Z.Prepend,{className:"w-50 w-xl-40"},o.createElement(u.Z.Text,m({className:"flex-grow-1"},t),o.createElement("span",{className:Z?"font-weight-bold":""},o.createElement(d.Z,{id:e.name})),o.createElement("div",{className:"ml-auto"},e.disabled?o.createElement(d.Z,{id:"generic.readonly"}):null,o.createElement("div",{ref:n,className:"d-inline-block ml-2",style:{visibility:e.tooltip?"unset":"hidden"}},o.createElement(r.G,{icon:a.YHc}))))))),e.type===v.Number?o.createElement(b,{value:n,onChange:e=>t(e),name:e.name,disabled:e.disabled,max:e.max,min:e.min,ref:l}):e.type===v.Enum?o.createElement(g,{value:n,onChange:e=>t(e),name:e.name,enum:e.enum,noLocalize:e.noLocalize,disabled:e.disabled}):o.createElement(h[e.type],{value:n,onChange:e=>t(e),disabled:e.disabled,name:e.type,ref:l}),o.createElement(u.Z.Append,null,o.createElement(i.Z,{style:{visibility:!Z||e.disabled?"hidden":void 0},variant:"danger",onClick:()=>t(e.defaultValue??y[e.type])},o.createElement(r.G,{icon:"undo"}))));var x}},8425:function(e,n,t){t.d(n,{t:function(){return u}});var a=t(67294),r=t(55171),o=t.n(r),i=t(27961);function l(e){return a.createElement(o(),{src:e.obj,name:"JSON",theme:"tube",iconStyle:"triangle",collapsed:!0,displayDataTypes:!1})}function u(e){return i.ZP.showjson.value?a.createElement("div",{className:"text-left"},a.createElement(l,{obj:e.obj})):a.createElement(a.Fragment,null)}},96190:function(e,n,t){t.d(n,{g:function(){return a}});const a=t(67294).createContext(void 0)},62318:function(e,n,t){var a=t(63366),r=t(87462),o=t(94184),i=t.n(o),l=t(67294),u=t(44680),c=t(76792),s=["bsPrefix","size","hasValidation","className","as"],d=(0,u.Z)("input-group-append"),m=(0,u.Z)("input-group-prepend"),v=(0,u.Z)("input-group-text",{Component:"span"}),f=l.forwardRef((function(e,n){var t=e.bsPrefix,o=e.size,u=e.hasValidation,d=e.className,m=e.as,v=void 0===m?"div":m,f=(0,a.Z)(e,s);return t=(0,c.vE)(t,"input-group"),l.createElement(v,(0,r.Z)({ref:n},f,{className:i()(d,t,o&&t+"-"+o,u&&"has-validation")}))}));f.displayName="InputGroup",f.Text=v,f.Radio=function(e){return l.createElement(v,null,l.createElement("input",(0,r.Z)({type:"radio"},e)))},f.Checkbox=function(e){return l.createElement(v,null,l.createElement("input",(0,r.Z)({type:"checkbox"},e)))},f.Append=d,f.Prepend=m,n.Z=f},56841:function(e,n,t){var a=t(51721),r=t(67294),o=t(97184),i=t(28752),l=t(75103),u=function(e){function n(){return e.apply(this,arguments)||this}return(0,a.Z)(n,e),n.prototype.render=function(){throw new Error("ReactBootstrap: The `Tab` component is not meant to be rendered! It's an abstract component that is only valid as a direct Child of the `Tabs` Component. For custom tabs components use TabPane and TabsContainer directly")},n}(r.Component);u.Container=o.Z,u.Content=i.Z,u.Pane=l.Z,n.Z=u},97184:function(e,n,t){var a=t(67294),r=t(14289),o=t(24426),i=t(45017);n.Z=function(e){var n=(0,r.Ch)(e,{activeKey:"onSelect"}),t=n.id,l=n.generateChildId,u=n.onSelect,c=n.activeKey,s=n.transition,d=n.mountOnEnter,m=n.unmountOnExit,v=n.children,f=(0,a.useMemo)((function(){return l||function(e,n){return t?t+"-"+n+"-"+e:null}}),[t,l]),E=(0,a.useMemo)((function(){return{onSelect:u,activeKey:c,transition:s,mountOnEnter:d||!1,unmountOnExit:m||!1,getControlledId:function(e){return f(e,"tabpane")},getControllerId:function(e){return f(e,"tab")}}}),[u,c,s,d,m,f]);return a.createElement(o.Z.Provider,{value:E},a.createElement(i.Z.Provider,{value:u||null},v))}},28752:function(e,n,t){var a=t(87462),r=t(63366),o=t(94184),i=t.n(o),l=t(67294),u=t(76792),c=["bsPrefix","as","className"],s=l.forwardRef((function(e,n){var t=e.bsPrefix,o=e.as,s=void 0===o?"div":o,d=e.className,m=(0,r.Z)(e,c),v=(0,u.vE)(t,"tab-content");return l.createElement(s,(0,a.Z)({ref:n},m,{className:i()(d,v)}))}));n.Z=s},75103:function(e,n,t){var a=t(87462),r=t(63366),o=t(94184),i=t.n(o),l=t(67294),u=t(76792),c=t(24426),s=t(45017),d=t(41068),m=["activeKey","getControlledId","getControllerId"],v=["bsPrefix","className","active","onEnter","onEntering","onEntered","onExit","onExiting","onExited","mountOnEnter","unmountOnExit","transition","as","eventKey"];var f=l.forwardRef((function(e,n){var t=function(e){var n=(0,l.useContext)(c.Z);if(!n)return e;var t=n.activeKey,o=n.getControlledId,i=n.getControllerId,u=(0,r.Z)(n,m),v=!1!==e.transition&&!1!==u.transition,f=(0,s.h)(e.eventKey);return(0,a.Z)({},e,{active:null==e.active&&null!=f?(0,s.h)(t)===f:e.active,id:o(e.eventKey),"aria-labelledby":i(e.eventKey),transition:v&&(e.transition||u.transition||d.Z),mountOnEnter:null!=e.mountOnEnter?e.mountOnEnter:u.mountOnEnter,unmountOnExit:null!=e.unmountOnExit?e.unmountOnExit:u.unmountOnExit})}(e),o=t.bsPrefix,f=t.className,E=t.active,p=t.onEnter,b=t.onEntering,g=t.onEntered,y=t.onExit,h=t.onExiting,Z=t.onExited,x=t.mountOnEnter,C=t.unmountOnExit,N=t.transition,O=t.as,w=void 0===O?"div":O,P=(t.eventKey,(0,r.Z)(t,v)),K=(0,u.vE)(o,"tab-pane");if(!E&&!N&&C)return null;var k=l.createElement(w,(0,a.Z)({},P,{ref:n,role:"tabpanel","aria-hidden":!E,className:i()(f,K,{active:E})}));return N&&(k=l.createElement(N,{in:E,onEnter:p,onEntering:b,onEntered:g,onExit:y,onExiting:h,onExited:Z,mountOnEnter:x,unmountOnExit:C},k)),l.createElement(c.Z.Provider,{value:null},l.createElement(s.Z.Provider,{value:null},k))}));f.displayName="TabPane",n.Z=f},85509:function(e,n,t){var a=t(87462),r=t(63366),o=t(67294),i=(t(55638),t(14289)),l=t(13361),u=t(23982),c=t(41244),s=t(97184),d=t(28752),m=t(75103),v=t(53439),f=["id","onSelect","transition","mountOnEnter","unmountOnExit","children","activeKey"];function E(e){var n=e.props,t=n.title,a=n.eventKey,r=n.disabled,i=n.tabClassName,l=n.id;return null==t?null:o.createElement(c.Z,{as:u.Z,eventKey:a,disabled:r,id:l,className:i},t)}var p=function(e){var n=(0,i.Ch)(e,{activeKey:"onSelect"}),t=n.id,u=n.onSelect,c=n.transition,p=n.mountOnEnter,b=n.unmountOnExit,g=n.children,y=n.activeKey,h=void 0===y?function(e){var n;return(0,v.E)(e,(function(e){null==n&&(n=e.props.eventKey)})),n}(g):y,Z=(0,r.Z)(n,f);return o.createElement(s.Z,{id:t,activeKey:h,onSelect:u,transition:c,mountOnEnter:p,unmountOnExit:b},o.createElement(l.Z,(0,a.Z)({},Z,{role:"tablist",as:"nav"}),(0,v.U)(g,E)),o.createElement(d.Z,null,(0,v.U)(g,(function(e){var n=(0,a.Z)({},e.props);return delete n.title,delete n.disabled,delete n.tabClassName,o.createElement(m.Z,n)}))))};p.defaultProps={variant:"tabs",mountOnEnter:!1,unmountOnExit:!1},p.displayName="Tabs",n.Z=p}}]); +//# sourceMappingURL=246.67f9678139a3c824ae5c.bundle.js.map \ No newline at end of file diff --git a/webpanel/5.7.0/246.67f9678139a3c824ae5c.bundle.js.map b/webpanel/5.7.0/246.67f9678139a3c824ae5c.bundle.js.map new file mode 100644 index 00000000..63866b09 --- /dev/null +++ b/webpanel/5.7.0/246.67f9678139a3c824ae5c.bundle.js.map @@ -0,0 +1 @@ +{"version":3,"file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EACV/H,SAAUA,EACVU,GAAIA,EACJD,UAAWyI,GACVD,GAGL,IAAIE,EAAO,SAAczJ,GACvB,IAAI+G,GAAmB,QAAgB/G,EAAO,CAC5CgH,UAAW,aAEThG,EAAK+F,EAAiB/F,GACtBmG,EAAWJ,EAAiBI,SAC5BC,EAAaL,EAAiBK,WAC9BC,EAAeN,EAAiBM,aAChCC,EAAgBP,EAAiBO,cACjCC,EAAWR,EAAiBQ,SAC5BmC,EAAwB3C,EAAiBC,UACzCA,OAAsC,IAA1B0C,EA1ClB,SAA6BnC,GAC3B,IAAIoC,EAMJ,OALA,OAAQpC,GAAU,SAAU8B,GACF,MAApBM,IACFA,EAAmBN,EAAMrJ,MAAMqI,aAG5BsB,EAmC4CC,CAAoBrC,GAAYmC,EAC/EG,GAAkB,OAA8B9C,EAAkB5B,GAEtE,OAAoB,gBAAoB,IAAc,CACpDnE,GAAIA,EACJgG,UAAWA,EACXG,SAAUA,EACVC,WAAYA,EACZC,aAAcA,EACdC,cAAeA,GACD,gBAAoB,KAAK,OAAS,GAAIuC,EAAiB,CACrEX,KAAM,UACNzH,GAAI,SACF,OAAI8F,EAAU6B,IAA0B,gBAAoB,IAAY,MAAM,OAAI7B,GAAU,SAAU8B,GACxG,IAAIS,GAAa,OAAS,GAAIT,EAAMrJ,OAKpC,cAHO8J,EAAWP,aACXO,EAAWxJ,gBACXwJ,EAAWN,aACE,gBAAoB,IAASM,SAIrDL,EAAKM,aAvEc,CACjBxF,QAAS,OACT8C,cAAc,EACdC,eAAe,GAqEjBmC,EAAK3D,YAAc,OACnB","sources":["webpack://tgstation-server-control-panel/./src/components/utils/InputField.tsx","webpack://tgstation-server-control-panel/./src/components/utils/JsonViewer.tsx","webpack://tgstation-server-control-panel/./src/contexts/InstanceEditContext.ts","webpack://tgstation-server-control-panel/./node_modules/react-bootstrap/esm/InputGroup.js","webpack://tgstation-server-control-panel/./node_modules/react-bootstrap/esm/Tab.js","webpack://tgstation-server-control-panel/./node_modules/react-bootstrap/esm/TabContainer.js","webpack://tgstation-server-control-panel/./node_modules/react-bootstrap/esm/TabContent.js","webpack://tgstation-server-control-panel/./node_modules/react-bootstrap/esm/TabPane.js","webpack://tgstation-server-control-panel/./node_modules/react-bootstrap/esm/Tabs.js"],"sourcesContent":["import { faInfo } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport React, { useEffect, useRef, useState } from \"react\";\nimport Button from \"react-bootstrap/Button\";\nimport Form from \"react-bootstrap/Form\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\nimport OverlayTrigger from \"react-bootstrap/OverlayTrigger\";\nimport Tooltip from \"react-bootstrap/Tooltip\";\nimport { FormattedMessage } from \"react-intl\";\n\nexport type AnyEnum = {\n [key: string]: string | number;\n [index: number]: string;\n};\n\nexport enum FieldType {\n Boolean = \"boolean\",\n Number = \"number\",\n String = \"string\",\n Password = \"password\",\n Enum = \"enum\"\n}\n\nexport type InputFieldTypes = number | string | boolean;\n\nexport type InputFieldProps = {\n name: string;\n disabled?: boolean;\n tooltip?: string;\n type: FieldType;\n} & (\n | {\n defaultValue?: boolean | null;\n onChange: (newValue: boolean, isValid: boolean) => unknown;\n type: FieldType.Boolean;\n }\n | {\n defaultValue?: number | null;\n onChange: (newValue: number, isValid: boolean) => unknown;\n type: FieldType.Number;\n min?: number;\n max?: number;\n }\n | {\n defaultValue?: string | null;\n onChange: (newValue: string, isValid: boolean) => unknown;\n type: FieldType.String;\n }\n | {\n defaultValue?: string | null;\n onChange: (newValue: string, isValid: boolean) => unknown;\n type: FieldType.Password;\n }\n | {\n defaultValue?: number | null;\n onChange: (newValue: number, isValid: boolean) => unknown;\n type: FieldType.Enum;\n noLocalize?: boolean;\n enum: AnyEnum;\n }\n);\n\ninterface ControlProps {\n value: InputFieldTypes;\n onChange: (newvalue: InputFieldTypes) => unknown;\n disabled?: boolean;\n name: string;\n}\n\nconst StringControl = React.forwardRef(function StringControl(\n props,\n ref\n): JSX.Element {\n return (\n props.onChange(e.target.value)}\n disabled={props.disabled}\n ref={ref}\n />\n );\n});\n\nconst PasswordControl = React.forwardRef(function PasswordControl(\n props,\n ref\n): JSX.Element {\n return (\n props.onChange(e.target.value)}\n disabled={props.disabled}\n type=\"password\"\n ref={ref}\n />\n );\n});\n\nconst BooleanControl = React.forwardRef(function BooleanControl(\n props,\n ref\n): JSX.Element {\n const rndId = Math.random().toString();\n return (\n \n props.onChange(e.target.checked)}\n type=\"switch\"\n className=\"m-auto\"\n disabled={props.disabled}\n ref={ref}\n />\n \n );\n});\n\ntype NumberControlProps = ControlProps & {\n min?: number;\n max?: number;\n};\nconst NumberControl = React.forwardRef(function NumberControl(\n props,\n ref\n): JSX.Element {\n return (\n ) =>\n props.onChange(\n isNaN(e.target.valueAsNumber) ? e.target.value : e.target.valueAsNumber\n )\n }\n disabled={props.disabled}\n min={props.min}\n max={props.max}\n type=\"number\"\n ref={ref}\n />\n );\n});\n\ntype EnumControlProps = ControlProps & {\n enum: AnyEnum;\n noLocalize?: boolean;\n};\nconst EnumControl = React.forwardRef(function EnumControl(\n props,\n ref\n): JSX.Element {\n return (\n props.onChange(parseInt(e.target.value))}\n disabled={props.disabled}\n as=\"select\"\n custom\n ref={ref}>\n {Object.entries(props.enum)\n //filters out reverse mapping\n .filter(([key]) => isNaN(parseInt(key)))\n .map(([key, value]) => {\n return props.noLocalize ? (\n \n ) : (\n \n {message => (\n \n )}\n \n );\n })}\n \n );\n});\n\nexport const defaultValues: Record = {\n [FieldType.Enum]: 0,\n [FieldType.Number]: 0,\n [FieldType.Boolean]: false,\n [FieldType.String]: \"\",\n [FieldType.Password]: \"\"\n};\n\nexport default function InputField(props: InputFieldProps): JSX.Element {\n const [currentValue, setCurrentValue] = useState(\n props.defaultValue ?? defaultValues[props.type]\n );\n const controlRef = useRef(null);\n useEffect(() => {\n setCurrentValue(props.defaultValue ?? defaultValues[props.type]);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props.defaultValue]);\n\n useEffect(() => {\n if (controlRef.current) {\n if (controlRef.current.checkValidity()) {\n controlRef.current.classList.remove(\"is-invalid\");\n } else {\n controlRef.current.classList.add(\"is-invalid\");\n }\n }\n\n switch (props.type) {\n case FieldType.Boolean:\n props.onChange(\n currentValue as boolean,\n controlRef.current?.checkValidity() ?? true\n );\n return;\n case FieldType.Enum:\n case FieldType.Number:\n props.onChange(currentValue as number, controlRef.current?.checkValidity() ?? true);\n return;\n case FieldType.String:\n case FieldType.Password:\n props.onChange(currentValue as string, controlRef.current?.checkValidity() ?? true);\n return;\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentValue]);\n\n const tooltip = (innerid?: string) => {\n if (!innerid) return ;\n\n return (\n \n \n \n );\n };\n\n const basicControls: {\n [Property in typeof props.type]: Property extends FieldType.Enum | FieldType.Number\n ? undefined\n : React.FC;\n } = {\n string: StringControl,\n password: PasswordControl,\n boolean: BooleanControl,\n [FieldType.Number]: undefined,\n [FieldType.Enum]: undefined\n };\n\n const changed = currentValue != (props.defaultValue ?? defaultValues[props.type]);\n\n return (\n \n \n {({ ref, ...triggerHandler }) => (\n \n \n \n \n \n
\n {props.disabled ? : null}\n \n \n
\n \n
\n
\n )}\n \n {props.type === FieldType.Number ? (\n setCurrentValue(newValue)}\n name={props.name}\n disabled={props.disabled}\n max={props.max}\n min={props.min}\n ref={controlRef}\n />\n ) : props.type === FieldType.Enum ? (\n setCurrentValue(newValue)}\n name={props.name}\n enum={props.enum}\n noLocalize={props.noLocalize}\n disabled={props.disabled}\n />\n ) : (\n React.createElement>(\n basicControls[props.type],\n {\n value: currentValue,\n onChange: newValue => setCurrentValue(newValue),\n disabled: props.disabled,\n name: props.type,\n ref: controlRef\n }\n )\n )}\n\n \n \n setCurrentValue(props.defaultValue ?? defaultValues[props.type])\n }>\n \n \n \n
\n );\n}\n","import React from \"react\";\nimport ReactJson from \"react-json-view\";\n\nimport configOptions from \"../../ApiClient/util/config\";\n\nexport default function JsonViewer(props: { obj: unknown }): JSX.Element {\n return (\n }\n name={\"JSON\"}\n theme=\"tube\"\n iconStyle=\"triangle\"\n collapsed\n displayDataTypes={false}\n />\n );\n}\n\nexport function DebugJsonViewer(props: { obj: unknown }): JSX.Element {\n if (!configOptions.showjson.value) {\n return <>;\n }\n return (\n
\n \n
\n );\n}\n","import React from \"react\";\n\nimport type {\n InstancePermissionSetResponse,\n InstanceResponse,\n ServerInformationResponse,\n UserResponse\n} from \"../ApiClient/generatedcode/generated\";\nimport InternalError from \"../ApiClient/models/InternalComms/InternalError\";\n\nexport type InstanceEditContext = {\n deleteError: (error: InternalError) => void;\n errors: Set;\n reloadInstance: () => Promise;\n instance: InstanceResponse;\n user: UserResponse;\n serverInfo: ServerInformationResponse;\n instancePermissionSet: InstancePermissionSetResponse;\n};\n\n//same as InstanceEditContext except used for components which arent loading under instanceedit so we cant guarentee that instance wont be null\nexport type UnsafeInstanceEditContext = {\n deleteError: (error: InternalError) => void;\n errors: Set;\n reloadInstance: () => Promise;\n instance: InstanceResponse | null;\n user: UserResponse;\n serverInfo: ServerInformationResponse;\n instancePermissionSet: InstancePermissionSetResponse | null;\n};\n\nexport const InstanceEditContext = React.createContext(\n (undefined as unknown) as InstanceEditContext\n);\n","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nvar _excluded = [\"bsPrefix\", \"size\", \"hasValidation\", \"className\", \"as\"];\nimport classNames from 'classnames';\nimport React from 'react';\nimport createWithBsPrefix from './createWithBsPrefix';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar InputGroupAppend = createWithBsPrefix('input-group-append');\nvar InputGroupPrepend = createWithBsPrefix('input-group-prepend');\nvar InputGroupText = createWithBsPrefix('input-group-text', {\n Component: 'span'\n});\n\nvar InputGroupCheckbox = function InputGroupCheckbox(props) {\n return /*#__PURE__*/React.createElement(InputGroupText, null, /*#__PURE__*/React.createElement(\"input\", _extends({\n type: \"checkbox\"\n }, props)));\n};\n\nvar InputGroupRadio = function InputGroupRadio(props) {\n return /*#__PURE__*/React.createElement(InputGroupText, null, /*#__PURE__*/React.createElement(\"input\", _extends({\n type: \"radio\"\n }, props)));\n};\n\n/**\n *\n * @property {InputGroupAppend} Append\n * @property {InputGroupPrepend} Prepend\n * @property {InputGroupText} Text\n * @property {InputGroupRadio} Radio\n * @property {InputGroupCheckbox} Checkbox\n */\nvar InputGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n size = _ref.size,\n hasValidation = _ref.hasValidation,\n className = _ref.className,\n _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'div' : _ref$as,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n bsPrefix = useBootstrapPrefix(bsPrefix, 'input-group');\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref\n }, props, {\n className: classNames(className, bsPrefix, size && bsPrefix + \"-\" + size, hasValidation && 'has-validation')\n }));\n});\nInputGroup.displayName = 'InputGroup';\nInputGroup.Text = InputGroupText;\nInputGroup.Radio = InputGroupRadio;\nInputGroup.Checkbox = InputGroupCheckbox;\nInputGroup.Append = InputGroupAppend;\nInputGroup.Prepend = InputGroupPrepend;\nexport default InputGroup;","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport React from 'react';\nimport TabContainer from './TabContainer';\nimport TabContent from './TabContent';\nimport TabPane from './TabPane';\n\n/* eslint-disable react/require-render-return, react/no-unused-prop-types */\nvar Tab = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Tab, _React$Component);\n\n function Tab() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Tab.prototype;\n\n _proto.render = function render() {\n throw new Error('ReactBootstrap: The `Tab` component is not meant to be rendered! ' + \"It's an abstract component that is only valid as a direct Child of the `Tabs` Component. \" + 'For custom tabs components use TabPane and TabsContainer directly');\n return null;\n };\n\n return Tab;\n}(React.Component);\n\nTab.Container = TabContainer;\nTab.Content = TabContent;\nTab.Pane = TabPane;\nexport default Tab;","import React, { useMemo } from 'react';\nimport { useUncontrolled } from 'uncontrollable';\nimport TabContext from './TabContext';\nimport SelectableContext from './SelectableContext';\n\nvar TabContainer = function TabContainer(props) {\n var _useUncontrolled = useUncontrolled(props, {\n activeKey: 'onSelect'\n }),\n id = _useUncontrolled.id,\n generateCustomChildId = _useUncontrolled.generateChildId,\n onSelect = _useUncontrolled.onSelect,\n activeKey = _useUncontrolled.activeKey,\n transition = _useUncontrolled.transition,\n mountOnEnter = _useUncontrolled.mountOnEnter,\n unmountOnExit = _useUncontrolled.unmountOnExit,\n children = _useUncontrolled.children;\n\n var generateChildId = useMemo(function () {\n return generateCustomChildId || function (key, type) {\n return id ? id + \"-\" + type + \"-\" + key : null;\n };\n }, [id, generateCustomChildId]);\n var tabContext = useMemo(function () {\n return {\n onSelect: onSelect,\n activeKey: activeKey,\n transition: transition,\n mountOnEnter: mountOnEnter || false,\n unmountOnExit: unmountOnExit || false,\n getControlledId: function getControlledId(key) {\n return generateChildId(key, 'tabpane');\n },\n getControllerId: function getControllerId(key) {\n return generateChildId(key, 'tab');\n }\n };\n }, [onSelect, activeKey, transition, mountOnEnter, unmountOnExit, generateChildId]);\n return /*#__PURE__*/React.createElement(TabContext.Provider, {\n value: tabContext\n }, /*#__PURE__*/React.createElement(SelectableContext.Provider, {\n value: onSelect || null\n }, children));\n};\n\nexport default TabContainer;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"bsPrefix\", \"as\", \"className\"];\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar TabContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'div' : _ref$as,\n className = _ref.className,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'tab-content');\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref\n }, props, {\n className: classNames(className, decoratedBsPrefix)\n }));\n});\nexport default TabContent;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"activeKey\", \"getControlledId\", \"getControllerId\"],\n _excluded2 = [\"bsPrefix\", \"className\", \"active\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"mountOnEnter\", \"unmountOnExit\", \"transition\", \"as\", \"eventKey\"];\nimport classNames from 'classnames';\nimport React, { useContext } from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport TabContext from './TabContext';\nimport SelectableContext, { makeEventKey } from './SelectableContext';\nimport Fade from './Fade';\n\nfunction useTabContext(props) {\n var context = useContext(TabContext);\n if (!context) return props;\n\n var activeKey = context.activeKey,\n getControlledId = context.getControlledId,\n getControllerId = context.getControllerId,\n rest = _objectWithoutPropertiesLoose(context, _excluded);\n\n var shouldTransition = props.transition !== false && rest.transition !== false;\n var key = makeEventKey(props.eventKey);\n return _extends({}, props, {\n active: props.active == null && key != null ? makeEventKey(activeKey) === key : props.active,\n id: getControlledId(props.eventKey),\n 'aria-labelledby': getControllerId(props.eventKey),\n transition: shouldTransition && (props.transition || rest.transition || Fade),\n mountOnEnter: props.mountOnEnter != null ? props.mountOnEnter : rest.mountOnEnter,\n unmountOnExit: props.unmountOnExit != null ? props.unmountOnExit : rest.unmountOnExit\n });\n}\n\nvar TabPane = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var _useTabContext = useTabContext(props),\n bsPrefix = _useTabContext.bsPrefix,\n className = _useTabContext.className,\n active = _useTabContext.active,\n onEnter = _useTabContext.onEnter,\n onEntering = _useTabContext.onEntering,\n onEntered = _useTabContext.onEntered,\n onExit = _useTabContext.onExit,\n onExiting = _useTabContext.onExiting,\n onExited = _useTabContext.onExited,\n mountOnEnter = _useTabContext.mountOnEnter,\n unmountOnExit = _useTabContext.unmountOnExit,\n Transition = _useTabContext.transition,\n _useTabContext$as = _useTabContext.as,\n Component = _useTabContext$as === void 0 ? 'div' : _useTabContext$as,\n _ = _useTabContext.eventKey,\n rest = _objectWithoutPropertiesLoose(_useTabContext, _excluded2);\n\n var prefix = useBootstrapPrefix(bsPrefix, 'tab-pane');\n if (!active && !Transition && unmountOnExit) return null;\n var pane = /*#__PURE__*/React.createElement(Component, _extends({}, rest, {\n ref: ref,\n role: \"tabpanel\",\n \"aria-hidden\": !active,\n className: classNames(className, prefix, {\n active: active\n })\n }));\n if (Transition) pane = /*#__PURE__*/React.createElement(Transition, {\n in: active,\n onEnter: onEnter,\n onEntering: onEntering,\n onEntered: onEntered,\n onExit: onExit,\n onExiting: onExiting,\n onExited: onExited,\n mountOnEnter: mountOnEnter,\n unmountOnExit: unmountOnExit\n }, pane); // We provide an empty the TabContext so `