From 45c807c5b03a1327e4ccbaedd3fc51d477fb0fb6 Mon Sep 17 00:00:00 2001 From: godhyzzang <109357302+godhyzzang@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:34:13 +0900 Subject: [PATCH 01/18] =?UTF-8?q?feat=20:=20blockview=EB=8A=94=20isAsync?= =?UTF-8?q?=EA=B0=80=20false=EC=9D=B8=20=EC=83=81=ED=83=9C=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EB=8F=99=EC=98=81=EC=83=81=20=EC=9E=AC=EC=83=9D?= =?UTF-8?q?=EC=97=AC=EB=B6=80=EC=99=80=20=EC=83=81=EA=B4=80=EC=97=86?= =?UTF-8?q?=EC=9D=B4=20=EC=9B=90=ED=95=98=EB=8A=94=20script=EB=A5=BC=20?= =?UTF-8?q?=ED=81=B4=EB=A6=AD=ED=95=B4=EC=84=9C=20=EC=9D=B4=EB=8F=99?= =?UTF-8?q?=ED=95=A0=20=EC=88=98=20=EC=9E=88=EC=8A=B5=EB=8B=88=EB=8B=A4.?= =?UTF-8?q?=20lineview=EB=8A=94=20=EC=95=88=20=EB=90=98=EB=8A=94=20?= =?UTF-8?q?=EC=83=81=ED=99=A9=EC=9E=85=EB=8B=88=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pnp.cjs | 864 +++++++++--------- core/dist/components/BlockView.d.ts | 5 +- core/dist/components/BlockView.d.ts.map | 2 +- core/dist/components/LineView.d.ts | 1 + core/dist/components/LineView.d.ts.map | 2 +- .../components/ReactScriptPlayer.d.ts.map | 2 +- core/dist/hooks/useThrottling.d.ts | 6 +- core/dist/hooks/useThrottling.d.ts.map | 2 +- core/dist/index.js | 78 +- core/dist/index.js.map | 8 +- core/dist/utils/findClickedIndex.d.ts | 3 + core/dist/utils/findClickedIndex.d.ts.map | 1 + core/dist/utils/moveToScriptAtIndex.d.ts | 3 + core/dist/utils/moveToScriptAtIndex.d.ts.map | 1 + core/src/components/BlockView.tsx | 3 +- core/src/components/LineView.tsx | 53 +- core/src/components/ReactScriptPlayer.tsx | 19 +- core/src/hooks/useThrottling.ts | 29 +- core/src/utils/findClickedIndex.ts | 12 + core/src/utils/moveToScriptAtIndex.ts | 18 + package.json | 2 +- 21 files changed, 602 insertions(+), 512 deletions(-) create mode 100644 core/dist/utils/findClickedIndex.d.ts create mode 100644 core/dist/utils/findClickedIndex.d.ts.map create mode 100644 core/dist/utils/moveToScriptAtIndex.d.ts create mode 100644 core/dist/utils/moveToScriptAtIndex.d.ts.map create mode 100644 core/src/utils/findClickedIndex.ts create mode 100644 core/src/utils/moveToScriptAtIndex.ts diff --git a/.pnp.cjs b/.pnp.cjs index 82ff7ce..3de1f11 100644 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -55,7 +55,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@ampproject/remapping", [\ ["npm:2.3.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@ampproject-remapping-npm-2.3.0-559c14eee4-10c0.zip/node_modules/@ampproject/remapping/",\ + "packageLocation": "../../../../.yarn/berry/cache/@ampproject-remapping-npm-2.3.0-559c14eee4-10c0.zip/node_modules/@ampproject/remapping/",\ "packageDependencies": [\ ["@ampproject/remapping", "npm:2.3.0"],\ ["@jridgewell/gen-mapping", "npm:0.3.5"],\ @@ -66,7 +66,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/code-frame", [\ ["npm:7.25.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-code-frame-npm-7.25.7-40a9f53f43-10c0.zip/node_modules/@babel/code-frame/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-code-frame-npm-7.25.7-40a9f53f43-10c0.zip/node_modules/@babel/code-frame/",\ "packageDependencies": [\ ["@babel/code-frame", "npm:7.25.7"],\ ["@babel/highlight", "npm:7.25.7"],\ @@ -77,7 +77,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/compat-data", [\ ["npm:7.25.8", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-compat-data-npm-7.25.8-a7237f1519-10c0.zip/node_modules/@babel/compat-data/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-compat-data-npm-7.25.8-a7237f1519-10c0.zip/node_modules/@babel/compat-data/",\ "packageDependencies": [\ ["@babel/compat-data", "npm:7.25.8"]\ ],\ @@ -86,7 +86,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/core", [\ ["npm:7.25.8", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-core-npm-7.25.8-e5a00584a2-10c0.zip/node_modules/@babel/core/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-core-npm-7.25.8-e5a00584a2-10c0.zip/node_modules/@babel/core/",\ "packageDependencies": [\ ["@babel/core", "npm:7.25.8"],\ ["@ampproject/remapping", "npm:2.3.0"],\ @@ -110,7 +110,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/generator", [\ ["npm:7.25.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-generator-npm-7.25.7-68dd72ad91-10c0.zip/node_modules/@babel/generator/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-generator-npm-7.25.7-68dd72ad91-10c0.zip/node_modules/@babel/generator/",\ "packageDependencies": [\ ["@babel/generator", "npm:7.25.7"],\ ["@babel/types", "npm:7.25.8"],\ @@ -123,7 +123,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/helper-compilation-targets", [\ ["npm:7.25.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-helper-compilation-targets-npm-7.25.7-912ef98d47-10c0.zip/node_modules/@babel/helper-compilation-targets/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-helper-compilation-targets-npm-7.25.7-912ef98d47-10c0.zip/node_modules/@babel/helper-compilation-targets/",\ "packageDependencies": [\ ["@babel/helper-compilation-targets", "npm:7.25.7"],\ ["@babel/compat-data", "npm:7.25.8"],\ @@ -137,7 +137,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/helper-module-imports", [\ ["npm:7.25.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-helper-module-imports-npm-7.25.7-f7b3a083a0-10c0.zip/node_modules/@babel/helper-module-imports/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-helper-module-imports-npm-7.25.7-f7b3a083a0-10c0.zip/node_modules/@babel/helper-module-imports/",\ "packageDependencies": [\ ["@babel/helper-module-imports", "npm:7.25.7"],\ ["@babel/traverse", "npm:7.25.7"],\ @@ -148,14 +148,14 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/helper-module-transforms", [\ ["npm:7.25.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-helper-module-transforms-npm-7.25.7-01310522f0-10c0.zip/node_modules/@babel/helper-module-transforms/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-helper-module-transforms-npm-7.25.7-01310522f0-10c0.zip/node_modules/@babel/helper-module-transforms/",\ "packageDependencies": [\ ["@babel/helper-module-transforms", "npm:7.25.7"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:e5a00584a285b0af54cef0dd0f4aa450c66fb9ff72a926747912c010361531d86226daef2c61386b254279bb40b28aaca6512cf376825cb81e1a7b6b7404d417#npm:7.25.7", {\ - "packageLocation": "./.yarn/__virtual__/@babel-helper-module-transforms-virtual-6c5bc87670/3/AppData/Local/Yarn/Berry/cache/@babel-helper-module-transforms-npm-7.25.7-01310522f0-10c0.zip/node_modules/@babel/helper-module-transforms/",\ + "packageLocation": "./.yarn/__virtual__/@babel-helper-module-transforms-virtual-6c5bc87670/5/.yarn/berry/cache/@babel-helper-module-transforms-npm-7.25.7-01310522f0-10c0.zip/node_modules/@babel/helper-module-transforms/",\ "packageDependencies": [\ ["@babel/helper-module-transforms", "virtual:e5a00584a285b0af54cef0dd0f4aa450c66fb9ff72a926747912c010361531d86226daef2c61386b254279bb40b28aaca6512cf376825cb81e1a7b6b7404d417#npm:7.25.7"],\ ["@babel/core", "npm:7.25.8"],\ @@ -174,7 +174,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/helper-plugin-utils", [\ ["npm:7.25.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-helper-plugin-utils-npm-7.25.7-0b7fcf14ca-10c0.zip/node_modules/@babel/helper-plugin-utils/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-helper-plugin-utils-npm-7.25.7-0b7fcf14ca-10c0.zip/node_modules/@babel/helper-plugin-utils/",\ "packageDependencies": [\ ["@babel/helper-plugin-utils", "npm:7.25.7"]\ ],\ @@ -183,7 +183,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/helper-simple-access", [\ ["npm:7.25.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-helper-simple-access-npm-7.25.7-3a9e5cd6e8-10c0.zip/node_modules/@babel/helper-simple-access/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-helper-simple-access-npm-7.25.7-3a9e5cd6e8-10c0.zip/node_modules/@babel/helper-simple-access/",\ "packageDependencies": [\ ["@babel/helper-simple-access", "npm:7.25.7"],\ ["@babel/traverse", "npm:7.25.7"],\ @@ -194,7 +194,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/helper-string-parser", [\ ["npm:7.25.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-helper-string-parser-npm-7.25.7-352069de58-10c0.zip/node_modules/@babel/helper-string-parser/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-helper-string-parser-npm-7.25.7-352069de58-10c0.zip/node_modules/@babel/helper-string-parser/",\ "packageDependencies": [\ ["@babel/helper-string-parser", "npm:7.25.7"]\ ],\ @@ -203,7 +203,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/helper-validator-identifier", [\ ["npm:7.25.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-helper-validator-identifier-npm-7.25.7-1c758f0472-10c0.zip/node_modules/@babel/helper-validator-identifier/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-helper-validator-identifier-npm-7.25.7-1c758f0472-10c0.zip/node_modules/@babel/helper-validator-identifier/",\ "packageDependencies": [\ ["@babel/helper-validator-identifier", "npm:7.25.7"]\ ],\ @@ -212,7 +212,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/helper-validator-option", [\ ["npm:7.25.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-helper-validator-option-npm-7.25.7-8c969bf588-10c0.zip/node_modules/@babel/helper-validator-option/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-helper-validator-option-npm-7.25.7-8c969bf588-10c0.zip/node_modules/@babel/helper-validator-option/",\ "packageDependencies": [\ ["@babel/helper-validator-option", "npm:7.25.7"]\ ],\ @@ -221,7 +221,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/helpers", [\ ["npm:7.25.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-helpers-npm-7.25.7-267b4cec46-10c0.zip/node_modules/@babel/helpers/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-helpers-npm-7.25.7-267b4cec46-10c0.zip/node_modules/@babel/helpers/",\ "packageDependencies": [\ ["@babel/helpers", "npm:7.25.7"],\ ["@babel/template", "npm:7.25.7"],\ @@ -232,7 +232,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/highlight", [\ ["npm:7.25.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-highlight-npm-7.25.7-308b20da71-10c0.zip/node_modules/@babel/highlight/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-highlight-npm-7.25.7-308b20da71-10c0.zip/node_modules/@babel/highlight/",\ "packageDependencies": [\ ["@babel/highlight", "npm:7.25.7"],\ ["@babel/helper-validator-identifier", "npm:7.25.7"],\ @@ -245,7 +245,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/parser", [\ ["npm:7.25.8", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-parser-npm-7.25.8-fda12195b5-10c0.zip/node_modules/@babel/parser/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-parser-npm-7.25.8-fda12195b5-10c0.zip/node_modules/@babel/parser/",\ "packageDependencies": [\ ["@babel/parser", "npm:7.25.8"],\ ["@babel/types", "npm:7.25.8"]\ @@ -255,14 +255,14 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/plugin-transform-react-jsx-self", [\ ["npm:7.25.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-plugin-transform-react-jsx-self-npm-7.25.7-1a6e2e6ec0-10c0.zip/node_modules/@babel/plugin-transform-react-jsx-self/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-plugin-transform-react-jsx-self-npm-7.25.7-1a6e2e6ec0-10c0.zip/node_modules/@babel/plugin-transform-react-jsx-self/",\ "packageDependencies": [\ ["@babel/plugin-transform-react-jsx-self", "npm:7.25.7"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:95eb9d030a337b22ac7bee3f8f6c4b89cbc0a12d955860af33e27379f0ca40461c16fa969b7dccf5301fb793dfa3bfa378222dd04ba597163fe3fef30f7ef152#npm:7.25.7", {\ - "packageLocation": "./.yarn/__virtual__/@babel-plugin-transform-react-jsx-self-virtual-2eef254e72/3/AppData/Local/Yarn/Berry/cache/@babel-plugin-transform-react-jsx-self-npm-7.25.7-1a6e2e6ec0-10c0.zip/node_modules/@babel/plugin-transform-react-jsx-self/",\ + "packageLocation": "./.yarn/__virtual__/@babel-plugin-transform-react-jsx-self-virtual-2eef254e72/5/.yarn/berry/cache/@babel-plugin-transform-react-jsx-self-npm-7.25.7-1a6e2e6ec0-10c0.zip/node_modules/@babel/plugin-transform-react-jsx-self/",\ "packageDependencies": [\ ["@babel/plugin-transform-react-jsx-self", "virtual:95eb9d030a337b22ac7bee3f8f6c4b89cbc0a12d955860af33e27379f0ca40461c16fa969b7dccf5301fb793dfa3bfa378222dd04ba597163fe3fef30f7ef152#npm:7.25.7"],\ ["@babel/core", "npm:7.25.8"],\ @@ -278,14 +278,14 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/plugin-transform-react-jsx-source", [\ ["npm:7.25.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-plugin-transform-react-jsx-source-npm-7.25.7-1f60cac636-10c0.zip/node_modules/@babel/plugin-transform-react-jsx-source/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-plugin-transform-react-jsx-source-npm-7.25.7-1f60cac636-10c0.zip/node_modules/@babel/plugin-transform-react-jsx-source/",\ "packageDependencies": [\ ["@babel/plugin-transform-react-jsx-source", "npm:7.25.7"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:95eb9d030a337b22ac7bee3f8f6c4b89cbc0a12d955860af33e27379f0ca40461c16fa969b7dccf5301fb793dfa3bfa378222dd04ba597163fe3fef30f7ef152#npm:7.25.7", {\ - "packageLocation": "./.yarn/__virtual__/@babel-plugin-transform-react-jsx-source-virtual-e9da1312c8/3/AppData/Local/Yarn/Berry/cache/@babel-plugin-transform-react-jsx-source-npm-7.25.7-1f60cac636-10c0.zip/node_modules/@babel/plugin-transform-react-jsx-source/",\ + "packageLocation": "./.yarn/__virtual__/@babel-plugin-transform-react-jsx-source-virtual-e9da1312c8/5/.yarn/berry/cache/@babel-plugin-transform-react-jsx-source-npm-7.25.7-1f60cac636-10c0.zip/node_modules/@babel/plugin-transform-react-jsx-source/",\ "packageDependencies": [\ ["@babel/plugin-transform-react-jsx-source", "virtual:95eb9d030a337b22ac7bee3f8f6c4b89cbc0a12d955860af33e27379f0ca40461c16fa969b7dccf5301fb793dfa3bfa378222dd04ba597163fe3fef30f7ef152#npm:7.25.7"],\ ["@babel/core", "npm:7.25.8"],\ @@ -301,7 +301,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/template", [\ ["npm:7.25.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-template-npm-7.25.7-4db3590fa2-10c0.zip/node_modules/@babel/template/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-template-npm-7.25.7-4db3590fa2-10c0.zip/node_modules/@babel/template/",\ "packageDependencies": [\ ["@babel/template", "npm:7.25.7"],\ ["@babel/code-frame", "npm:7.25.7"],\ @@ -313,7 +313,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/traverse", [\ ["npm:7.25.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-traverse-npm-7.25.7-0ca7b771fb-10c0.zip/node_modules/@babel/traverse/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-traverse-npm-7.25.7-0ca7b771fb-10c0.zip/node_modules/@babel/traverse/",\ "packageDependencies": [\ ["@babel/traverse", "npm:7.25.7"],\ ["@babel/code-frame", "npm:7.25.7"],\ @@ -329,7 +329,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@babel/types", [\ ["npm:7.25.8", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@babel-types-npm-7.25.8-44acfff5f6-10c0.zip/node_modules/@babel/types/",\ + "packageLocation": "../../../../.yarn/berry/cache/@babel-types-npm-7.25.8-44acfff5f6-10c0.zip/node_modules/@babel/types/",\ "packageDependencies": [\ ["@babel/types", "npm:7.25.8"],\ ["@babel/helper-string-parser", "npm:7.25.7"],\ @@ -718,14 +718,14 @@ const RAW_RUNTIME_STATE = ]],\ ["@eslint-community/eslint-utils", [\ ["npm:4.4.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@eslint-community-eslint-utils-npm-4.4.0-d1791bd5a3-10c0.zip/node_modules/@eslint-community/eslint-utils/",\ + "packageLocation": "../../../../.yarn/berry/cache/@eslint-community-eslint-utils-npm-4.4.0-d1791bd5a3-10c0.zip/node_modules/@eslint-community/eslint-utils/",\ "packageDependencies": [\ ["@eslint-community/eslint-utils", "npm:4.4.0"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:2a7127d90ac5034537975bc99db10e4790ff2d95c9403d7c13b7a59efb8c814f588d101422860032fe9e7e68ea3e9b29ebd8e93bd10fe90d0dd6e5f95dce63ce#npm:4.4.0", {\ - "packageLocation": "./.yarn/__virtual__/@eslint-community-eslint-utils-virtual-cd6b1ca88d/3/AppData/Local/Yarn/Berry/cache/@eslint-community-eslint-utils-npm-4.4.0-d1791bd5a3-10c0.zip/node_modules/@eslint-community/eslint-utils/",\ + "packageLocation": "./.yarn/__virtual__/@eslint-community-eslint-utils-virtual-cd6b1ca88d/5/.yarn/berry/cache/@eslint-community-eslint-utils-npm-4.4.0-d1791bd5a3-10c0.zip/node_modules/@eslint-community/eslint-utils/",\ "packageDependencies": [\ ["@eslint-community/eslint-utils", "virtual:2a7127d90ac5034537975bc99db10e4790ff2d95c9403d7c13b7a59efb8c814f588d101422860032fe9e7e68ea3e9b29ebd8e93bd10fe90d0dd6e5f95dce63ce#npm:4.4.0"],\ ["@types/eslint", null],\ @@ -739,7 +739,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["virtual:dd20287a5a1e86b12a5b04609f98bd729fafd847d08e1fc89cdc68f92d1acf209e53b09ef0af4b6e7781d88e1f9acf94e3bf34619939e434ad5ffb0f24855eb4#npm:4.4.0", {\ - "packageLocation": "./.yarn/__virtual__/@eslint-community-eslint-utils-virtual-f326fbb3df/3/AppData/Local/Yarn/Berry/cache/@eslint-community-eslint-utils-npm-4.4.0-d1791bd5a3-10c0.zip/node_modules/@eslint-community/eslint-utils/",\ + "packageLocation": "./.yarn/__virtual__/@eslint-community-eslint-utils-virtual-f326fbb3df/5/.yarn/berry/cache/@eslint-community-eslint-utils-npm-4.4.0-d1791bd5a3-10c0.zip/node_modules/@eslint-community/eslint-utils/",\ "packageDependencies": [\ ["@eslint-community/eslint-utils", "virtual:dd20287a5a1e86b12a5b04609f98bd729fafd847d08e1fc89cdc68f92d1acf209e53b09ef0af4b6e7781d88e1f9acf94e3bf34619939e434ad5ffb0f24855eb4#npm:4.4.0"],\ ["@types/eslint", null],\ @@ -755,7 +755,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@eslint-community/regexpp", [\ ["npm:4.11.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@eslint-community-regexpp-npm-4.11.1-37bbb67aaa-10c0.zip/node_modules/@eslint-community/regexpp/",\ + "packageLocation": "../../../../.yarn/berry/cache/@eslint-community-regexpp-npm-4.11.1-37bbb67aaa-10c0.zip/node_modules/@eslint-community/regexpp/",\ "packageDependencies": [\ ["@eslint-community/regexpp", "npm:4.11.1"]\ ],\ @@ -764,7 +764,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@eslint/eslintrc", [\ ["npm:2.1.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@eslint-eslintrc-npm-2.1.4-1ff4b5f908-10c0.zip/node_modules/@eslint/eslintrc/",\ + "packageLocation": "../../../../.yarn/berry/cache/@eslint-eslintrc-npm-2.1.4-1ff4b5f908-10c0.zip/node_modules/@eslint/eslintrc/",\ "packageDependencies": [\ ["@eslint/eslintrc", "npm:2.1.4"],\ ["ajv", "npm:6.12.6"],\ @@ -782,7 +782,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@eslint/js", [\ ["npm:8.57.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@eslint-js-npm-8.57.1-dec269f278-10c0.zip/node_modules/@eslint/js/",\ + "packageLocation": "../../../../.yarn/berry/cache/@eslint-js-npm-8.57.1-dec269f278-10c0.zip/node_modules/@eslint/js/",\ "packageDependencies": [\ ["@eslint/js", "npm:8.57.1"]\ ],\ @@ -791,7 +791,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@humanwhocodes/config-array", [\ ["npm:0.13.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@humanwhocodes-config-array-npm-0.13.0-843095a032-10c0.zip/node_modules/@humanwhocodes/config-array/",\ + "packageLocation": "../../../../.yarn/berry/cache/@humanwhocodes-config-array-npm-0.13.0-843095a032-10c0.zip/node_modules/@humanwhocodes/config-array/",\ "packageDependencies": [\ ["@humanwhocodes/config-array", "npm:0.13.0"],\ ["@humanwhocodes/object-schema", "npm:2.0.3"],\ @@ -803,7 +803,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@humanwhocodes/module-importer", [\ ["npm:1.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@humanwhocodes-module-importer-npm-1.0.1-9d07ed2e4a-10c0.zip/node_modules/@humanwhocodes/module-importer/",\ + "packageLocation": "../../../../.yarn/berry/cache/@humanwhocodes-module-importer-npm-1.0.1-9d07ed2e4a-10c0.zip/node_modules/@humanwhocodes/module-importer/",\ "packageDependencies": [\ ["@humanwhocodes/module-importer", "npm:1.0.1"]\ ],\ @@ -812,7 +812,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@humanwhocodes/object-schema", [\ ["npm:2.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@humanwhocodes-object-schema-npm-2.0.3-4f0e508cd9-10c0.zip/node_modules/@humanwhocodes/object-schema/",\ + "packageLocation": "../../../../.yarn/berry/cache/@humanwhocodes-object-schema-npm-2.0.3-4f0e508cd9-10c0.zip/node_modules/@humanwhocodes/object-schema/",\ "packageDependencies": [\ ["@humanwhocodes/object-schema", "npm:2.0.3"]\ ],\ @@ -821,7 +821,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@isaacs/cliui", [\ ["npm:8.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@isaacs-cliui-npm-8.0.2-f4364666d5-10c0.zip/node_modules/@isaacs/cliui/",\ + "packageLocation": "../../../../.yarn/berry/cache/@isaacs-cliui-npm-8.0.2-f4364666d5-10c0.zip/node_modules/@isaacs/cliui/",\ "packageDependencies": [\ ["@isaacs/cliui", "npm:8.0.2"],\ ["string-width", "npm:5.1.2"],\ @@ -845,7 +845,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@jridgewell/gen-mapping", [\ ["npm:0.3.5", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@jridgewell-gen-mapping-npm-0.3.5-d8b85ebeaf-10c0.zip/node_modules/@jridgewell/gen-mapping/",\ + "packageLocation": "../../../../.yarn/berry/cache/@jridgewell-gen-mapping-npm-0.3.5-d8b85ebeaf-10c0.zip/node_modules/@jridgewell/gen-mapping/",\ "packageDependencies": [\ ["@jridgewell/gen-mapping", "npm:0.3.5"],\ ["@jridgewell/set-array", "npm:1.2.1"],\ @@ -857,7 +857,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@jridgewell/resolve-uri", [\ ["npm:3.1.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@jridgewell-resolve-uri-npm-3.1.2-5bc4245992-10c0.zip/node_modules/@jridgewell/resolve-uri/",\ + "packageLocation": "../../../../.yarn/berry/cache/@jridgewell-resolve-uri-npm-3.1.2-5bc4245992-10c0.zip/node_modules/@jridgewell/resolve-uri/",\ "packageDependencies": [\ ["@jridgewell/resolve-uri", "npm:3.1.2"]\ ],\ @@ -866,7 +866,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@jridgewell/set-array", [\ ["npm:1.2.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@jridgewell-set-array-npm-1.2.1-2312928209-10c0.zip/node_modules/@jridgewell/set-array/",\ + "packageLocation": "../../../../.yarn/berry/cache/@jridgewell-set-array-npm-1.2.1-2312928209-10c0.zip/node_modules/@jridgewell/set-array/",\ "packageDependencies": [\ ["@jridgewell/set-array", "npm:1.2.1"]\ ],\ @@ -875,7 +875,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@jridgewell/sourcemap-codec", [\ ["npm:1.5.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@jridgewell-sourcemap-codec-npm-1.5.0-dfd9126d71-10c0.zip/node_modules/@jridgewell/sourcemap-codec/",\ + "packageLocation": "../../../../.yarn/berry/cache/@jridgewell-sourcemap-codec-npm-1.5.0-dfd9126d71-10c0.zip/node_modules/@jridgewell/sourcemap-codec/",\ "packageDependencies": [\ ["@jridgewell/sourcemap-codec", "npm:1.5.0"]\ ],\ @@ -884,7 +884,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@jridgewell/trace-mapping", [\ ["npm:0.3.25", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@jridgewell-trace-mapping-npm-0.3.25-c076fd2279-10c0.zip/node_modules/@jridgewell/trace-mapping/",\ + "packageLocation": "../../../../.yarn/berry/cache/@jridgewell-trace-mapping-npm-0.3.25-c076fd2279-10c0.zip/node_modules/@jridgewell/trace-mapping/",\ "packageDependencies": [\ ["@jridgewell/trace-mapping", "npm:0.3.25"],\ ["@jridgewell/resolve-uri", "npm:3.1.2"],\ @@ -895,7 +895,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@nodelib/fs.scandir", [\ ["npm:2.1.5", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@nodelib-fs.scandir-npm-2.1.5-89c67370dd-10c0.zip/node_modules/@nodelib/fs.scandir/",\ + "packageLocation": "../../../../.yarn/berry/cache/@nodelib-fs.scandir-npm-2.1.5-89c67370dd-10c0.zip/node_modules/@nodelib/fs.scandir/",\ "packageDependencies": [\ ["@nodelib/fs.scandir", "npm:2.1.5"],\ ["@nodelib/fs.stat", "npm:2.0.5"],\ @@ -906,7 +906,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@nodelib/fs.stat", [\ ["npm:2.0.5", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@nodelib-fs.stat-npm-2.0.5-01f4dd3030-10c0.zip/node_modules/@nodelib/fs.stat/",\ + "packageLocation": "../../../../.yarn/berry/cache/@nodelib-fs.stat-npm-2.0.5-01f4dd3030-10c0.zip/node_modules/@nodelib/fs.stat/",\ "packageDependencies": [\ ["@nodelib/fs.stat", "npm:2.0.5"]\ ],\ @@ -915,7 +915,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@nodelib/fs.walk", [\ ["npm:1.2.8", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@nodelib-fs.walk-npm-1.2.8-b4a89da548-10c0.zip/node_modules/@nodelib/fs.walk/",\ + "packageLocation": "../../../../.yarn/berry/cache/@nodelib-fs.walk-npm-1.2.8-b4a89da548-10c0.zip/node_modules/@nodelib/fs.walk/",\ "packageDependencies": [\ ["@nodelib/fs.walk", "npm:1.2.8"],\ ["@nodelib/fs.scandir", "npm:2.1.5"],\ @@ -926,7 +926,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@npmcli/agent", [\ ["npm:2.2.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@npmcli-agent-npm-2.2.2-e2f559d6c0-10c0.zip/node_modules/@npmcli/agent/",\ + "packageLocation": "../../../../.yarn/berry/cache/@npmcli-agent-npm-2.2.2-e2f559d6c0-10c0.zip/node_modules/@npmcli/agent/",\ "packageDependencies": [\ ["@npmcli/agent", "npm:2.2.2"],\ ["agent-base", "npm:7.1.1"],\ @@ -940,7 +940,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@npmcli/fs", [\ ["npm:3.1.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@npmcli-fs-npm-3.1.1-c19bd09f3c-10c0.zip/node_modules/@npmcli/fs/",\ + "packageLocation": "../../../../.yarn/berry/cache/@npmcli-fs-npm-3.1.1-c19bd09f3c-10c0.zip/node_modules/@npmcli/fs/",\ "packageDependencies": [\ ["@npmcli/fs", "npm:3.1.1"],\ ["semver", "npm:7.6.3"]\ @@ -950,7 +950,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@parcel/watcher", [\ ["npm:2.4.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@parcel-watcher-npm-2.4.1-2b3c6bb4aa-10c0.zip/node_modules/@parcel/watcher/",\ + "packageLocation": "../../../../.yarn/berry/cache/@parcel-watcher-npm-2.4.1-2b3c6bb4aa-10c0.zip/node_modules/@parcel/watcher/",\ "packageDependencies": [\ ["@parcel/watcher", "npm:2.4.1"],\ ["@parcel/watcher-android-arm64", "npm:2.4.1"],\ @@ -1084,7 +1084,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@pkgjs/parseargs", [\ ["npm:0.11.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@pkgjs-parseargs-npm-0.11.0-cd2a3fe948-10c0.zip/node_modules/@pkgjs/parseargs/",\ + "packageLocation": "../../../../.yarn/berry/cache/@pkgjs-parseargs-npm-0.11.0-cd2a3fe948-10c0.zip/node_modules/@pkgjs/parseargs/",\ "packageDependencies": [\ ["@pkgjs/parseargs", "npm:0.11.0"]\ ],\ @@ -1093,7 +1093,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@pkgr/core", [\ ["npm:0.1.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@pkgr-core-npm-0.1.1-844d1f59d1-10c0.zip/node_modules/@pkgr/core/",\ + "packageLocation": "../../../../.yarn/berry/cache/@pkgr-core-npm-0.1.1-844d1f59d1-10c0.zip/node_modules/@pkgr/core/",\ "packageDependencies": [\ ["@pkgr/core", "npm:0.1.1"]\ ],\ @@ -1246,7 +1246,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@types/babel__core", [\ ["npm:7.20.5", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@types-babel__core-npm-7.20.5-4d95f75eab-10c0.zip/node_modules/@types/babel__core/",\ + "packageLocation": "../../../../.yarn/berry/cache/@types-babel__core-npm-7.20.5-4d95f75eab-10c0.zip/node_modules/@types/babel__core/",\ "packageDependencies": [\ ["@types/babel__core", "npm:7.20.5"],\ ["@babel/parser", "npm:7.25.8"],\ @@ -1260,7 +1260,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@types/babel__generator", [\ ["npm:7.6.8", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@types-babel__generator-npm-7.6.8-61be1197d9-10c0.zip/node_modules/@types/babel__generator/",\ + "packageLocation": "../../../../.yarn/berry/cache/@types-babel__generator-npm-7.6.8-61be1197d9-10c0.zip/node_modules/@types/babel__generator/",\ "packageDependencies": [\ ["@types/babel__generator", "npm:7.6.8"],\ ["@babel/types", "npm:7.25.8"]\ @@ -1270,7 +1270,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@types/babel__template", [\ ["npm:7.4.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@types-babel__template-npm-7.4.4-f34eba762c-10c0.zip/node_modules/@types/babel__template/",\ + "packageLocation": "../../../../.yarn/berry/cache/@types-babel__template-npm-7.4.4-f34eba762c-10c0.zip/node_modules/@types/babel__template/",\ "packageDependencies": [\ ["@types/babel__template", "npm:7.4.4"],\ ["@babel/parser", "npm:7.25.8"],\ @@ -1281,7 +1281,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@types/babel__traverse", [\ ["npm:7.20.6", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@types-babel__traverse-npm-7.20.6-fac4243243-10c0.zip/node_modules/@types/babel__traverse/",\ + "packageLocation": "../../../../.yarn/berry/cache/@types-babel__traverse-npm-7.20.6-fac4243243-10c0.zip/node_modules/@types/babel__traverse/",\ "packageDependencies": [\ ["@types/babel__traverse", "npm:7.20.6"],\ ["@babel/types", "npm:7.25.8"]\ @@ -1291,7 +1291,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@types/estree", [\ ["npm:1.0.6", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@types-estree-npm-1.0.6-b5e23f2ea2-10c0.zip/node_modules/@types/estree/",\ + "packageLocation": "../../../../.yarn/berry/cache/@types-estree-npm-1.0.6-b5e23f2ea2-10c0.zip/node_modules/@types/estree/",\ "packageDependencies": [\ ["@types/estree", "npm:1.0.6"]\ ],\ @@ -1300,7 +1300,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@types/prop-types", [\ ["npm:15.7.13", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@types-prop-types-npm-15.7.13-ac81cbe352-10c0.zip/node_modules/@types/prop-types/",\ + "packageLocation": "../../../../.yarn/berry/cache/@types-prop-types-npm-15.7.13-ac81cbe352-10c0.zip/node_modules/@types/prop-types/",\ "packageDependencies": [\ ["@types/prop-types", "npm:15.7.13"]\ ],\ @@ -1309,7 +1309,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@types/react", [\ ["npm:18.3.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@types-react-npm-18.3.3-07e68e178e-10c0.zip/node_modules/@types/react/",\ + "packageLocation": "../../../../.yarn/berry/cache/@types-react-npm-18.3.3-07e68e178e-10c0.zip/node_modules/@types/react/",\ "packageDependencies": [\ ["@types/react", "npm:18.3.3"],\ ["@types/prop-types", "npm:15.7.13"],\ @@ -1320,7 +1320,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@types/react-dom", [\ ["npm:18.3.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@types-react-dom-npm-18.3.0-111444d3eb-10c0.zip/node_modules/@types/react-dom/",\ + "packageLocation": "../../../../.yarn/berry/cache/@types-react-dom-npm-18.3.0-111444d3eb-10c0.zip/node_modules/@types/react-dom/",\ "packageDependencies": [\ ["@types/react-dom", "npm:18.3.0"],\ ["@types/react", "npm:18.3.3"]\ @@ -1330,14 +1330,14 @@ const RAW_RUNTIME_STATE = ]],\ ["@typescript-eslint/eslint-plugin", [\ ["npm:8.8.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@typescript-eslint-eslint-plugin-npm-8.8.1-072141df9a-10c0.zip/node_modules/@typescript-eslint/eslint-plugin/",\ + "packageLocation": "../../../../.yarn/berry/cache/@typescript-eslint-eslint-plugin-npm-8.8.1-072141df9a-10c0.zip/node_modules/@typescript-eslint/eslint-plugin/",\ "packageDependencies": [\ ["@typescript-eslint/eslint-plugin", "npm:8.8.1"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:4e713d12bdbc7ddec9fda4cb5b83c291c3d2ff3a0ed63ce890f5fefb7a46552061e9a7cc6ad8fb730548cc9e36c8fcd40bc2173cd8ef45945459433b0e57e973#npm:8.8.1", {\ - "packageLocation": "./.yarn/__virtual__/@typescript-eslint-eslint-plugin-virtual-73006f23fa/3/AppData/Local/Yarn/Berry/cache/@typescript-eslint-eslint-plugin-npm-8.8.1-072141df9a-10c0.zip/node_modules/@typescript-eslint/eslint-plugin/",\ + "packageLocation": "./.yarn/__virtual__/@typescript-eslint-eslint-plugin-virtual-73006f23fa/5/.yarn/berry/cache/@typescript-eslint-eslint-plugin-npm-8.8.1-072141df9a-10c0.zip/node_modules/@typescript-eslint/eslint-plugin/",\ "packageDependencies": [\ ["@typescript-eslint/eslint-plugin", "virtual:4e713d12bdbc7ddec9fda4cb5b83c291c3d2ff3a0ed63ce890f5fefb7a46552061e9a7cc6ad8fb730548cc9e36c8fcd40bc2173cd8ef45945459433b0e57e973#npm:8.8.1"],\ ["@eslint-community/regexpp", "npm:4.11.1"],\ @@ -1367,7 +1367,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["virtual:ea35bf3da4d290ae453fe455661c3510f7ee200c335a977da403ec82854ba7dec40e6f9e72d8c19f0e70a55cbda847a643d15be5b3f7ab25ce5c27b0a95bbc76#npm:8.8.1", {\ - "packageLocation": "./.yarn/__virtual__/@typescript-eslint-eslint-plugin-virtual-da33e2b773/3/AppData/Local/Yarn/Berry/cache/@typescript-eslint-eslint-plugin-npm-8.8.1-072141df9a-10c0.zip/node_modules/@typescript-eslint/eslint-plugin/",\ + "packageLocation": "./.yarn/__virtual__/@typescript-eslint-eslint-plugin-virtual-da33e2b773/5/.yarn/berry/cache/@typescript-eslint-eslint-plugin-npm-8.8.1-072141df9a-10c0.zip/node_modules/@typescript-eslint/eslint-plugin/",\ "packageDependencies": [\ ["@typescript-eslint/eslint-plugin", "virtual:ea35bf3da4d290ae453fe455661c3510f7ee200c335a977da403ec82854ba7dec40e6f9e72d8c19f0e70a55cbda847a643d15be5b3f7ab25ce5c27b0a95bbc76#npm:8.8.1"],\ ["@eslint-community/regexpp", "npm:4.11.1"],\ @@ -1399,14 +1399,14 @@ const RAW_RUNTIME_STATE = ]],\ ["@typescript-eslint/parser", [\ ["npm:8.8.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@typescript-eslint-parser-npm-8.8.1-8ea3c3533f-10c0.zip/node_modules/@typescript-eslint/parser/",\ + "packageLocation": "../../../../.yarn/berry/cache/@typescript-eslint-parser-npm-8.8.1-8ea3c3533f-10c0.zip/node_modules/@typescript-eslint/parser/",\ "packageDependencies": [\ ["@typescript-eslint/parser", "npm:8.8.1"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:4e713d12bdbc7ddec9fda4cb5b83c291c3d2ff3a0ed63ce890f5fefb7a46552061e9a7cc6ad8fb730548cc9e36c8fcd40bc2173cd8ef45945459433b0e57e973#npm:8.8.1", {\ - "packageLocation": "./.yarn/__virtual__/@typescript-eslint-parser-virtual-db5ce39016/3/AppData/Local/Yarn/Berry/cache/@typescript-eslint-parser-npm-8.8.1-8ea3c3533f-10c0.zip/node_modules/@typescript-eslint/parser/",\ + "packageLocation": "./.yarn/__virtual__/@typescript-eslint-parser-virtual-db5ce39016/5/.yarn/berry/cache/@typescript-eslint-parser-npm-8.8.1-8ea3c3533f-10c0.zip/node_modules/@typescript-eslint/parser/",\ "packageDependencies": [\ ["@typescript-eslint/parser", "virtual:4e713d12bdbc7ddec9fda4cb5b83c291c3d2ff3a0ed63ce890f5fefb7a46552061e9a7cc6ad8fb730548cc9e36c8fcd40bc2173cd8ef45945459433b0e57e973#npm:8.8.1"],\ ["@types/eslint", null],\ @@ -1430,7 +1430,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@typescript-eslint/scope-manager", [\ ["npm:8.8.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@typescript-eslint-scope-manager-npm-8.8.1-55ff5f6604-10c0.zip/node_modules/@typescript-eslint/scope-manager/",\ + "packageLocation": "../../../../.yarn/berry/cache/@typescript-eslint-scope-manager-npm-8.8.1-55ff5f6604-10c0.zip/node_modules/@typescript-eslint/scope-manager/",\ "packageDependencies": [\ ["@typescript-eslint/scope-manager", "npm:8.8.1"],\ ["@typescript-eslint/types", "npm:8.8.1"],\ @@ -1441,14 +1441,14 @@ const RAW_RUNTIME_STATE = ]],\ ["@typescript-eslint/type-utils", [\ ["npm:8.8.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@typescript-eslint-type-utils-npm-8.8.1-47ab05c28f-10c0.zip/node_modules/@typescript-eslint/type-utils/",\ + "packageLocation": "../../../../.yarn/berry/cache/@typescript-eslint-type-utils-npm-8.8.1-47ab05c28f-10c0.zip/node_modules/@typescript-eslint/type-utils/",\ "packageDependencies": [\ ["@typescript-eslint/type-utils", "npm:8.8.1"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:73006f23fa4de2f38ebc910e0f75aa1acc6d62e0902d7d0ec7711236ae14cc7366bdfd39fe53d61ae7d940659958989bd85abf2b68caa3c9c4bee95468beb729#npm:8.8.1", {\ - "packageLocation": "./.yarn/__virtual__/@typescript-eslint-type-utils-virtual-fc50da3e7f/3/AppData/Local/Yarn/Berry/cache/@typescript-eslint-type-utils-npm-8.8.1-47ab05c28f-10c0.zip/node_modules/@typescript-eslint/type-utils/",\ + "packageLocation": "./.yarn/__virtual__/@typescript-eslint-type-utils-virtual-fc50da3e7f/5/.yarn/berry/cache/@typescript-eslint-type-utils-npm-8.8.1-47ab05c28f-10c0.zip/node_modules/@typescript-eslint/type-utils/",\ "packageDependencies": [\ ["@typescript-eslint/type-utils", "virtual:73006f23fa4de2f38ebc910e0f75aa1acc6d62e0902d7d0ec7711236ae14cc7366bdfd39fe53d61ae7d940659958989bd85abf2b68caa3c9c4bee95468beb729#npm:8.8.1"],\ ["@types/typescript", null],\ @@ -1467,7 +1467,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@typescript-eslint/types", [\ ["npm:8.8.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@typescript-eslint-types-npm-8.8.1-6fa8894cd0-10c0.zip/node_modules/@typescript-eslint/types/",\ + "packageLocation": "../../../../.yarn/berry/cache/@typescript-eslint-types-npm-8.8.1-6fa8894cd0-10c0.zip/node_modules/@typescript-eslint/types/",\ "packageDependencies": [\ ["@typescript-eslint/types", "npm:8.8.1"]\ ],\ @@ -1476,14 +1476,14 @@ const RAW_RUNTIME_STATE = ]],\ ["@typescript-eslint/typescript-estree", [\ ["npm:8.8.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@typescript-eslint-typescript-estree-npm-8.8.1-5164039b82-10c0.zip/node_modules/@typescript-eslint/typescript-estree/",\ + "packageLocation": "../../../../.yarn/berry/cache/@typescript-eslint-typescript-estree-npm-8.8.1-5164039b82-10c0.zip/node_modules/@typescript-eslint/typescript-estree/",\ "packageDependencies": [\ ["@typescript-eslint/typescript-estree", "npm:8.8.1"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:2a7127d90ac5034537975bc99db10e4790ff2d95c9403d7c13b7a59efb8c814f588d101422860032fe9e7e68ea3e9b29ebd8e93bd10fe90d0dd6e5f95dce63ce#npm:8.8.1", {\ - "packageLocation": "./.yarn/__virtual__/@typescript-eslint-typescript-estree-virtual-3e23c85a11/3/AppData/Local/Yarn/Berry/cache/@typescript-eslint-typescript-estree-npm-8.8.1-5164039b82-10c0.zip/node_modules/@typescript-eslint/typescript-estree/",\ + "packageLocation": "./.yarn/__virtual__/@typescript-eslint-typescript-estree-virtual-3e23c85a11/5/.yarn/berry/cache/@typescript-eslint-typescript-estree-npm-8.8.1-5164039b82-10c0.zip/node_modules/@typescript-eslint/typescript-estree/",\ "packageDependencies": [\ ["@typescript-eslint/typescript-estree", "virtual:2a7127d90ac5034537975bc99db10e4790ff2d95c9403d7c13b7a59efb8c814f588d101422860032fe9e7e68ea3e9b29ebd8e93bd10fe90d0dd6e5f95dce63ce#npm:8.8.1"],\ ["@types/typescript", null],\ @@ -1504,7 +1504,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["virtual:fc50da3e7ffcddfb5263e68d75ebe20b43f4a6508b69cf8f18d476fd3d97bef3bb2ac35cc25f5142c739fe446ffc94e44fe74af79acf4256b35d779b93a70369#npm:8.8.1", {\ - "packageLocation": "./.yarn/__virtual__/@typescript-eslint-typescript-estree-virtual-1cfe8bb63f/3/AppData/Local/Yarn/Berry/cache/@typescript-eslint-typescript-estree-npm-8.8.1-5164039b82-10c0.zip/node_modules/@typescript-eslint/typescript-estree/",\ + "packageLocation": "./.yarn/__virtual__/@typescript-eslint-typescript-estree-virtual-1cfe8bb63f/5/.yarn/berry/cache/@typescript-eslint-typescript-estree-npm-8.8.1-5164039b82-10c0.zip/node_modules/@typescript-eslint/typescript-estree/",\ "packageDependencies": [\ ["@typescript-eslint/typescript-estree", "virtual:fc50da3e7ffcddfb5263e68d75ebe20b43f4a6508b69cf8f18d476fd3d97bef3bb2ac35cc25f5142c739fe446ffc94e44fe74af79acf4256b35d779b93a70369#npm:8.8.1"],\ ["@types/typescript", null],\ @@ -1527,14 +1527,14 @@ const RAW_RUNTIME_STATE = ]],\ ["@typescript-eslint/utils", [\ ["npm:8.8.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@typescript-eslint-utils-npm-8.8.1-8d6beda707-10c0.zip/node_modules/@typescript-eslint/utils/",\ + "packageLocation": "../../../../.yarn/berry/cache/@typescript-eslint-utils-npm-8.8.1-8d6beda707-10c0.zip/node_modules/@typescript-eslint/utils/",\ "packageDependencies": [\ ["@typescript-eslint/utils", "npm:8.8.1"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:73006f23fa4de2f38ebc910e0f75aa1acc6d62e0902d7d0ec7711236ae14cc7366bdfd39fe53d61ae7d940659958989bd85abf2b68caa3c9c4bee95468beb729#npm:8.8.1", {\ - "packageLocation": "./.yarn/__virtual__/@typescript-eslint-utils-virtual-1783803ff5/3/AppData/Local/Yarn/Berry/cache/@typescript-eslint-utils-npm-8.8.1-8d6beda707-10c0.zip/node_modules/@typescript-eslint/utils/",\ + "packageLocation": "./.yarn/__virtual__/@typescript-eslint-utils-virtual-1783803ff5/5/.yarn/berry/cache/@typescript-eslint-utils-npm-8.8.1-8d6beda707-10c0.zip/node_modules/@typescript-eslint/utils/",\ "packageDependencies": [\ ["@typescript-eslint/utils", "virtual:73006f23fa4de2f38ebc910e0f75aa1acc6d62e0902d7d0ec7711236ae14cc7366bdfd39fe53d61ae7d940659958989bd85abf2b68caa3c9c4bee95468beb729#npm:8.8.1"],\ ["@eslint-community/eslint-utils", "virtual:dd20287a5a1e86b12a5b04609f98bd729fafd847d08e1fc89cdc68f92d1acf209e53b09ef0af4b6e7781d88e1f9acf94e3bf34619939e434ad5ffb0f24855eb4#npm:4.4.0"],\ @@ -1551,7 +1551,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["virtual:fc50da3e7ffcddfb5263e68d75ebe20b43f4a6508b69cf8f18d476fd3d97bef3bb2ac35cc25f5142c739fe446ffc94e44fe74af79acf4256b35d779b93a70369#npm:8.8.1", {\ - "packageLocation": "./.yarn/__virtual__/@typescript-eslint-utils-virtual-2a7127d90a/3/AppData/Local/Yarn/Berry/cache/@typescript-eslint-utils-npm-8.8.1-8d6beda707-10c0.zip/node_modules/@typescript-eslint/utils/",\ + "packageLocation": "./.yarn/__virtual__/@typescript-eslint-utils-virtual-2a7127d90a/5/.yarn/berry/cache/@typescript-eslint-utils-npm-8.8.1-8d6beda707-10c0.zip/node_modules/@typescript-eslint/utils/",\ "packageDependencies": [\ ["@typescript-eslint/utils", "virtual:fc50da3e7ffcddfb5263e68d75ebe20b43f4a6508b69cf8f18d476fd3d97bef3bb2ac35cc25f5142c739fe446ffc94e44fe74af79acf4256b35d779b93a70369#npm:8.8.1"],\ ["@eslint-community/eslint-utils", "virtual:2a7127d90ac5034537975bc99db10e4790ff2d95c9403d7c13b7a59efb8c814f588d101422860032fe9e7e68ea3e9b29ebd8e93bd10fe90d0dd6e5f95dce63ce#npm:4.4.0"],\ @@ -1570,7 +1570,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@typescript-eslint/visitor-keys", [\ ["npm:8.8.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@typescript-eslint-visitor-keys-npm-8.8.1-dc00720006-10c0.zip/node_modules/@typescript-eslint/visitor-keys/",\ + "packageLocation": "../../../../.yarn/berry/cache/@typescript-eslint-visitor-keys-npm-8.8.1-dc00720006-10c0.zip/node_modules/@typescript-eslint/visitor-keys/",\ "packageDependencies": [\ ["@typescript-eslint/visitor-keys", "npm:8.8.1"],\ ["@typescript-eslint/types", "npm:8.8.1"],\ @@ -1581,7 +1581,7 @@ const RAW_RUNTIME_STATE = ]],\ ["@ungap/structured-clone", [\ ["npm:1.2.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@ungap-structured-clone-npm-1.2.0-648f0b82e0-10c0.zip/node_modules/@ungap/structured-clone/",\ + "packageLocation": "../../../../.yarn/berry/cache/@ungap-structured-clone-npm-1.2.0-648f0b82e0-10c0.zip/node_modules/@ungap/structured-clone/",\ "packageDependencies": [\ ["@ungap/structured-clone", "npm:1.2.0"]\ ],\ @@ -1590,14 +1590,14 @@ const RAW_RUNTIME_STATE = ]],\ ["@vitejs/plugin-react", [\ ["npm:4.3.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/@vitejs-plugin-react-npm-4.3.2-e79c11d68b-10c0.zip/node_modules/@vitejs/plugin-react/",\ + "packageLocation": "../../../../.yarn/berry/cache/@vitejs-plugin-react-npm-4.3.2-e79c11d68b-10c0.zip/node_modules/@vitejs/plugin-react/",\ "packageDependencies": [\ ["@vitejs/plugin-react", "npm:4.3.2"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:7ff15405ea2a649bedb31b53eb450b593e17c2290ffe01050ae1173d21896ac6c71075320c9f785857328929ff5965843d133b83cfa1c0dfdbb3e8f91e535cc1#npm:4.3.2", {\ - "packageLocation": "./.yarn/__virtual__/@vitejs-plugin-react-virtual-95eb9d030a/3/AppData/Local/Yarn/Berry/cache/@vitejs-plugin-react-npm-4.3.2-e79c11d68b-10c0.zip/node_modules/@vitejs/plugin-react/",\ + "packageLocation": "./.yarn/__virtual__/@vitejs-plugin-react-virtual-95eb9d030a/5/.yarn/berry/cache/@vitejs-plugin-react-npm-4.3.2-e79c11d68b-10c0.zip/node_modules/@vitejs/plugin-react/",\ "packageDependencies": [\ ["@vitejs/plugin-react", "virtual:7ff15405ea2a649bedb31b53eb450b593e17c2290ffe01050ae1173d21896ac6c71075320c9f785857328929ff5965843d133b83cfa1c0dfdbb3e8f91e535cc1#npm:4.3.2"],\ ["@babel/core", "npm:7.25.8"],\ @@ -1617,7 +1617,7 @@ const RAW_RUNTIME_STATE = ]],\ ["abbrev", [\ ["npm:2.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/abbrev-npm-2.0.0-0eb38a17e5-10c0.zip/node_modules/abbrev/",\ + "packageLocation": "../../../../.yarn/berry/cache/abbrev-npm-2.0.0-0eb38a17e5-10c0.zip/node_modules/abbrev/",\ "packageDependencies": [\ ["abbrev", "npm:2.0.0"]\ ],\ @@ -1626,7 +1626,7 @@ const RAW_RUNTIME_STATE = ]],\ ["acorn", [\ ["npm:8.12.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/acorn-npm-8.12.1-610871d57c-10c0.zip/node_modules/acorn/",\ + "packageLocation": "../../../../.yarn/berry/cache/acorn-npm-8.12.1-610871d57c-10c0.zip/node_modules/acorn/",\ "packageDependencies": [\ ["acorn", "npm:8.12.1"]\ ],\ @@ -1635,14 +1635,14 @@ const RAW_RUNTIME_STATE = ]],\ ["acorn-jsx", [\ ["npm:5.3.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/acorn-jsx-npm-5.3.2-d7594599ea-10c0.zip/node_modules/acorn-jsx/",\ + "packageLocation": "../../../../.yarn/berry/cache/acorn-jsx-npm-5.3.2-d7594599ea-10c0.zip/node_modules/acorn-jsx/",\ "packageDependencies": [\ ["acorn-jsx", "npm:5.3.2"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:a50722a5a9326b6a5f12350c494c4db3aa0f4caeac45e3e9e5fe071da20014ecfe738fe2ebe2c9c98abae81a4ea86b42f56d776b3bd5ec37f9ad3670c242b242#npm:5.3.2", {\ - "packageLocation": "./.yarn/__virtual__/acorn-jsx-virtual-834321b202/3/AppData/Local/Yarn/Berry/cache/acorn-jsx-npm-5.3.2-d7594599ea-10c0.zip/node_modules/acorn-jsx/",\ + "packageLocation": "./.yarn/__virtual__/acorn-jsx-virtual-834321b202/5/.yarn/berry/cache/acorn-jsx-npm-5.3.2-d7594599ea-10c0.zip/node_modules/acorn-jsx/",\ "packageDependencies": [\ ["acorn-jsx", "virtual:a50722a5a9326b6a5f12350c494c4db3aa0f4caeac45e3e9e5fe071da20014ecfe738fe2ebe2c9c98abae81a4ea86b42f56d776b3bd5ec37f9ad3670c242b242#npm:5.3.2"],\ ["@types/acorn", null],\ @@ -1657,7 +1657,7 @@ const RAW_RUNTIME_STATE = ]],\ ["agent-base", [\ ["npm:7.1.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/agent-base-npm-7.1.1-c9e1a4b59e-10c0.zip/node_modules/agent-base/",\ + "packageLocation": "../../../../.yarn/berry/cache/agent-base-npm-7.1.1-c9e1a4b59e-10c0.zip/node_modules/agent-base/",\ "packageDependencies": [\ ["agent-base", "npm:7.1.1"],\ ["debug", "virtual:1ff4b5f90832ba0a9c93ba1223af226e44ba70c1126a3740d93562b97bc36544e896a5e95908196f7458713e6a6089a34bfc67362fc6df7fa093bd06c878be47#npm:4.3.7"]\ @@ -1667,7 +1667,7 @@ const RAW_RUNTIME_STATE = ]],\ ["aggregate-error", [\ ["npm:3.1.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/aggregate-error-npm-3.1.0-415a406f4e-10c0.zip/node_modules/aggregate-error/",\ + "packageLocation": "../../../../.yarn/berry/cache/aggregate-error-npm-3.1.0-415a406f4e-10c0.zip/node_modules/aggregate-error/",\ "packageDependencies": [\ ["aggregate-error", "npm:3.1.0"],\ ["clean-stack", "npm:2.2.0"],\ @@ -1678,7 +1678,7 @@ const RAW_RUNTIME_STATE = ]],\ ["ajv", [\ ["npm:6.12.6", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/ajv-npm-6.12.6-4b5105e2b2-10c0.zip/node_modules/ajv/",\ + "packageLocation": "../../../../.yarn/berry/cache/ajv-npm-6.12.6-4b5105e2b2-10c0.zip/node_modules/ajv/",\ "packageDependencies": [\ ["ajv", "npm:6.12.6"],\ ["fast-deep-equal", "npm:3.1.3"],\ @@ -1691,14 +1691,14 @@ const RAW_RUNTIME_STATE = ]],\ ["ansi-regex", [\ ["npm:5.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/ansi-regex-npm-5.0.1-c963a48615-10c0.zip/node_modules/ansi-regex/",\ + "packageLocation": "../../../../.yarn/berry/cache/ansi-regex-npm-5.0.1-c963a48615-10c0.zip/node_modules/ansi-regex/",\ "packageDependencies": [\ ["ansi-regex", "npm:5.0.1"]\ ],\ "linkType": "HARD"\ }],\ ["npm:6.1.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/ansi-regex-npm-6.1.0-abe011aae4-10c0.zip/node_modules/ansi-regex/",\ + "packageLocation": "../../../../.yarn/berry/cache/ansi-regex-npm-6.1.0-abe011aae4-10c0.zip/node_modules/ansi-regex/",\ "packageDependencies": [\ ["ansi-regex", "npm:6.1.0"]\ ],\ @@ -1707,7 +1707,7 @@ const RAW_RUNTIME_STATE = ]],\ ["ansi-styles", [\ ["npm:3.2.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/ansi-styles-npm-3.2.1-8cb8107983-10c0.zip/node_modules/ansi-styles/",\ + "packageLocation": "../../../../.yarn/berry/cache/ansi-styles-npm-3.2.1-8cb8107983-10c0.zip/node_modules/ansi-styles/",\ "packageDependencies": [\ ["ansi-styles", "npm:3.2.1"],\ ["color-convert", "npm:1.9.3"]\ @@ -1715,7 +1715,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["npm:4.3.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/ansi-styles-npm-4.3.0-245c7d42c7-10c0.zip/node_modules/ansi-styles/",\ + "packageLocation": "../../../../.yarn/berry/cache/ansi-styles-npm-4.3.0-245c7d42c7-10c0.zip/node_modules/ansi-styles/",\ "packageDependencies": [\ ["ansi-styles", "npm:4.3.0"],\ ["color-convert", "npm:2.0.1"]\ @@ -1723,7 +1723,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["npm:6.2.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/ansi-styles-npm-6.2.1-d43647018c-10c0.zip/node_modules/ansi-styles/",\ + "packageLocation": "../../../../.yarn/berry/cache/ansi-styles-npm-6.2.1-d43647018c-10c0.zip/node_modules/ansi-styles/",\ "packageDependencies": [\ ["ansi-styles", "npm:6.2.1"]\ ],\ @@ -1732,7 +1732,7 @@ const RAW_RUNTIME_STATE = ]],\ ["argparse", [\ ["npm:2.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/argparse-npm-2.0.1-faff7999e6-10c0.zip/node_modules/argparse/",\ + "packageLocation": "../../../../.yarn/berry/cache/argparse-npm-2.0.1-faff7999e6-10c0.zip/node_modules/argparse/",\ "packageDependencies": [\ ["argparse", "npm:2.0.1"]\ ],\ @@ -1741,7 +1741,7 @@ const RAW_RUNTIME_STATE = ]],\ ["array-buffer-byte-length", [\ ["npm:1.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/array-buffer-byte-length-npm-1.0.1-e7afc30010-10c0.zip/node_modules/array-buffer-byte-length/",\ + "packageLocation": "../../../../.yarn/berry/cache/array-buffer-byte-length-npm-1.0.1-e7afc30010-10c0.zip/node_modules/array-buffer-byte-length/",\ "packageDependencies": [\ ["array-buffer-byte-length", "npm:1.0.1"],\ ["call-bind", "npm:1.0.7"],\ @@ -1752,7 +1752,7 @@ const RAW_RUNTIME_STATE = ]],\ ["array-includes", [\ ["npm:3.1.8", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/array-includes-npm-3.1.8-62a178e549-10c0.zip/node_modules/array-includes/",\ + "packageLocation": "../../../../.yarn/berry/cache/array-includes-npm-3.1.8-62a178e549-10c0.zip/node_modules/array-includes/",\ "packageDependencies": [\ ["array-includes", "npm:3.1.8"],\ ["call-bind", "npm:1.0.7"],\ @@ -1767,7 +1767,7 @@ const RAW_RUNTIME_STATE = ]],\ ["array.prototype.findlast", [\ ["npm:1.2.5", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/array.prototype.findlast-npm-1.2.5-316cb71d39-10c0.zip/node_modules/array.prototype.findlast/",\ + "packageLocation": "../../../../.yarn/berry/cache/array.prototype.findlast-npm-1.2.5-316cb71d39-10c0.zip/node_modules/array.prototype.findlast/",\ "packageDependencies": [\ ["array.prototype.findlast", "npm:1.2.5"],\ ["call-bind", "npm:1.0.7"],\ @@ -1782,7 +1782,7 @@ const RAW_RUNTIME_STATE = ]],\ ["array.prototype.flat", [\ ["npm:1.3.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/array.prototype.flat-npm-1.3.2-350729f7f4-10c0.zip/node_modules/array.prototype.flat/",\ + "packageLocation": "../../../../.yarn/berry/cache/array.prototype.flat-npm-1.3.2-350729f7f4-10c0.zip/node_modules/array.prototype.flat/",\ "packageDependencies": [\ ["array.prototype.flat", "npm:1.3.2"],\ ["call-bind", "npm:1.0.7"],\ @@ -1795,7 +1795,7 @@ const RAW_RUNTIME_STATE = ]],\ ["array.prototype.flatmap", [\ ["npm:1.3.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/array.prototype.flatmap-npm-1.3.2-5c6a4af226-10c0.zip/node_modules/array.prototype.flatmap/",\ + "packageLocation": "../../../../.yarn/berry/cache/array.prototype.flatmap-npm-1.3.2-5c6a4af226-10c0.zip/node_modules/array.prototype.flatmap/",\ "packageDependencies": [\ ["array.prototype.flatmap", "npm:1.3.2"],\ ["call-bind", "npm:1.0.7"],\ @@ -1808,7 +1808,7 @@ const RAW_RUNTIME_STATE = ]],\ ["array.prototype.tosorted", [\ ["npm:1.1.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/array.prototype.tosorted-npm-1.1.4-c1fc919434-10c0.zip/node_modules/array.prototype.tosorted/",\ + "packageLocation": "../../../../.yarn/berry/cache/array.prototype.tosorted-npm-1.1.4-c1fc919434-10c0.zip/node_modules/array.prototype.tosorted/",\ "packageDependencies": [\ ["array.prototype.tosorted", "npm:1.1.4"],\ ["call-bind", "npm:1.0.7"],\ @@ -1822,7 +1822,7 @@ const RAW_RUNTIME_STATE = ]],\ ["arraybuffer.prototype.slice", [\ ["npm:1.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/arraybuffer.prototype.slice-npm-1.0.3-97a993a091-10c0.zip/node_modules/arraybuffer.prototype.slice/",\ + "packageLocation": "../../../../.yarn/berry/cache/arraybuffer.prototype.slice-npm-1.0.3-97a993a091-10c0.zip/node_modules/arraybuffer.prototype.slice/",\ "packageDependencies": [\ ["arraybuffer.prototype.slice", "npm:1.0.3"],\ ["array-buffer-byte-length", "npm:1.0.1"],\ @@ -1839,7 +1839,7 @@ const RAW_RUNTIME_STATE = ]],\ ["available-typed-arrays", [\ ["npm:1.0.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/available-typed-arrays-npm-1.0.7-e5e5d79687-10c0.zip/node_modules/available-typed-arrays/",\ + "packageLocation": "../../../../.yarn/berry/cache/available-typed-arrays-npm-1.0.7-e5e5d79687-10c0.zip/node_modules/available-typed-arrays/",\ "packageDependencies": [\ ["available-typed-arrays", "npm:1.0.7"],\ ["possible-typed-array-names", "npm:1.0.0"]\ @@ -1849,7 +1849,7 @@ const RAW_RUNTIME_STATE = ]],\ ["balanced-match", [\ ["npm:1.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/balanced-match-npm-1.0.2-a53c126459-10c0.zip/node_modules/balanced-match/",\ + "packageLocation": "../../../../.yarn/berry/cache/balanced-match-npm-1.0.2-a53c126459-10c0.zip/node_modules/balanced-match/",\ "packageDependencies": [\ ["balanced-match", "npm:1.0.2"]\ ],\ @@ -1858,7 +1858,7 @@ const RAW_RUNTIME_STATE = ]],\ ["brace-expansion", [\ ["npm:1.1.11", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/brace-expansion-npm-1.1.11-fb95eb05ad-10c0.zip/node_modules/brace-expansion/",\ + "packageLocation": "../../../../.yarn/berry/cache/brace-expansion-npm-1.1.11-fb95eb05ad-10c0.zip/node_modules/brace-expansion/",\ "packageDependencies": [\ ["brace-expansion", "npm:1.1.11"],\ ["balanced-match", "npm:1.0.2"],\ @@ -1867,7 +1867,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["npm:2.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/brace-expansion-npm-2.0.1-17aa2616f9-10c0.zip/node_modules/brace-expansion/",\ + "packageLocation": "../../../../.yarn/berry/cache/brace-expansion-npm-2.0.1-17aa2616f9-10c0.zip/node_modules/brace-expansion/",\ "packageDependencies": [\ ["brace-expansion", "npm:2.0.1"],\ ["balanced-match", "npm:1.0.2"]\ @@ -1877,7 +1877,7 @@ const RAW_RUNTIME_STATE = ]],\ ["braces", [\ ["npm:3.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/braces-npm-3.0.3-582c14023c-10c0.zip/node_modules/braces/",\ + "packageLocation": "../../../../.yarn/berry/cache/braces-npm-3.0.3-582c14023c-10c0.zip/node_modules/braces/",\ "packageDependencies": [\ ["braces", "npm:3.0.3"],\ ["fill-range", "npm:7.1.1"]\ @@ -1887,7 +1887,7 @@ const RAW_RUNTIME_STATE = ]],\ ["browserslist", [\ ["npm:4.24.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/browserslist-npm-4.24.0-6b67324c87-10c0.zip/node_modules/browserslist/",\ + "packageLocation": "../../../../.yarn/berry/cache/browserslist-npm-4.24.0-6b67324c87-10c0.zip/node_modules/browserslist/",\ "packageDependencies": [\ ["browserslist", "npm:4.24.0"],\ ["caniuse-lite", "npm:1.0.30001667"],\ @@ -1900,7 +1900,7 @@ const RAW_RUNTIME_STATE = ]],\ ["cacache", [\ ["npm:18.0.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/cacache-npm-18.0.4-3dc4edc849-10c0.zip/node_modules/cacache/",\ + "packageLocation": "../../../../.yarn/berry/cache/cacache-npm-18.0.4-3dc4edc849-10c0.zip/node_modules/cacache/",\ "packageDependencies": [\ ["cacache", "npm:18.0.4"],\ ["@npmcli/fs", "npm:3.1.1"],\ @@ -1921,7 +1921,7 @@ const RAW_RUNTIME_STATE = ]],\ ["call-bind", [\ ["npm:1.0.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/call-bind-npm-1.0.7-762763ef96-10c0.zip/node_modules/call-bind/",\ + "packageLocation": "../../../../.yarn/berry/cache/call-bind-npm-1.0.7-762763ef96-10c0.zip/node_modules/call-bind/",\ "packageDependencies": [\ ["call-bind", "npm:1.0.7"],\ ["es-define-property", "npm:1.0.0"],\ @@ -1935,7 +1935,7 @@ const RAW_RUNTIME_STATE = ]],\ ["callsites", [\ ["npm:3.1.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/callsites-npm-3.1.0-268f989910-10c0.zip/node_modules/callsites/",\ + "packageLocation": "../../../../.yarn/berry/cache/callsites-npm-3.1.0-268f989910-10c0.zip/node_modules/callsites/",\ "packageDependencies": [\ ["callsites", "npm:3.1.0"]\ ],\ @@ -1944,7 +1944,7 @@ const RAW_RUNTIME_STATE = ]],\ ["caniuse-lite", [\ ["npm:1.0.30001667", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/caniuse-lite-npm-1.0.30001667-6dc99b360b-10c0.zip/node_modules/caniuse-lite/",\ + "packageLocation": "../../../../.yarn/berry/cache/caniuse-lite-npm-1.0.30001667-6dc99b360b-10c0.zip/node_modules/caniuse-lite/",\ "packageDependencies": [\ ["caniuse-lite", "npm:1.0.30001667"]\ ],\ @@ -1953,7 +1953,7 @@ const RAW_RUNTIME_STATE = ]],\ ["chalk", [\ ["npm:2.4.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/chalk-npm-2.4.2-3ea16dd91e-10c0.zip/node_modules/chalk/",\ + "packageLocation": "../../../../.yarn/berry/cache/chalk-npm-2.4.2-3ea16dd91e-10c0.zip/node_modules/chalk/",\ "packageDependencies": [\ ["chalk", "npm:2.4.2"],\ ["ansi-styles", "npm:3.2.1"],\ @@ -1963,7 +1963,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["npm:4.1.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/chalk-npm-4.1.2-ba8b67ab80-10c0.zip/node_modules/chalk/",\ + "packageLocation": "../../../../.yarn/berry/cache/chalk-npm-4.1.2-ba8b67ab80-10c0.zip/node_modules/chalk/",\ "packageDependencies": [\ ["chalk", "npm:4.1.2"],\ ["ansi-styles", "npm:4.3.0"],\ @@ -1974,7 +1974,7 @@ const RAW_RUNTIME_STATE = ]],\ ["chokidar", [\ ["npm:4.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/chokidar-npm-4.0.1-989df9ae3c-10c0.zip/node_modules/chokidar/",\ + "packageLocation": "../../../../.yarn/berry/cache/chokidar-npm-4.0.1-989df9ae3c-10c0.zip/node_modules/chokidar/",\ "packageDependencies": [\ ["chokidar", "npm:4.0.1"],\ ["readdirp", "npm:4.0.2"]\ @@ -1984,7 +1984,7 @@ const RAW_RUNTIME_STATE = ]],\ ["chownr", [\ ["npm:2.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/chownr-npm-2.0.0-638f1c9c61-10c0.zip/node_modules/chownr/",\ + "packageLocation": "../../../../.yarn/berry/cache/chownr-npm-2.0.0-638f1c9c61-10c0.zip/node_modules/chownr/",\ "packageDependencies": [\ ["chownr", "npm:2.0.0"]\ ],\ @@ -1993,7 +1993,7 @@ const RAW_RUNTIME_STATE = ]],\ ["clean-stack", [\ ["npm:2.2.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/clean-stack-npm-2.2.0-a8ce435a5c-10c0.zip/node_modules/clean-stack/",\ + "packageLocation": "../../../../.yarn/berry/cache/clean-stack-npm-2.2.0-a8ce435a5c-10c0.zip/node_modules/clean-stack/",\ "packageDependencies": [\ ["clean-stack", "npm:2.2.0"]\ ],\ @@ -2002,7 +2002,7 @@ const RAW_RUNTIME_STATE = ]],\ ["color-convert", [\ ["npm:1.9.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/color-convert-npm-1.9.3-1fe690075e-10c0.zip/node_modules/color-convert/",\ + "packageLocation": "../../../../.yarn/berry/cache/color-convert-npm-1.9.3-1fe690075e-10c0.zip/node_modules/color-convert/",\ "packageDependencies": [\ ["color-convert", "npm:1.9.3"],\ ["color-name", "npm:1.1.3"]\ @@ -2010,7 +2010,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["npm:2.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/color-convert-npm-2.0.1-79730e935b-10c0.zip/node_modules/color-convert/",\ + "packageLocation": "../../../../.yarn/berry/cache/color-convert-npm-2.0.1-79730e935b-10c0.zip/node_modules/color-convert/",\ "packageDependencies": [\ ["color-convert", "npm:2.0.1"],\ ["color-name", "npm:1.1.4"]\ @@ -2020,14 +2020,14 @@ const RAW_RUNTIME_STATE = ]],\ ["color-name", [\ ["npm:1.1.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/color-name-npm-1.1.3-728b7b5d39-10c0.zip/node_modules/color-name/",\ + "packageLocation": "../../../../.yarn/berry/cache/color-name-npm-1.1.3-728b7b5d39-10c0.zip/node_modules/color-name/",\ "packageDependencies": [\ ["color-name", "npm:1.1.3"]\ ],\ "linkType": "HARD"\ }],\ ["npm:1.1.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/color-name-npm-1.1.4-025792b0ea-10c0.zip/node_modules/color-name/",\ + "packageLocation": "../../../../.yarn/berry/cache/color-name-npm-1.1.4-025792b0ea-10c0.zip/node_modules/color-name/",\ "packageDependencies": [\ ["color-name", "npm:1.1.4"]\ ],\ @@ -2036,7 +2036,7 @@ const RAW_RUNTIME_STATE = ]],\ ["concat-map", [\ ["npm:0.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/concat-map-npm-0.0.1-85a921b7ee-10c0.zip/node_modules/concat-map/",\ + "packageLocation": "../../../../.yarn/berry/cache/concat-map-npm-0.0.1-85a921b7ee-10c0.zip/node_modules/concat-map/",\ "packageDependencies": [\ ["concat-map", "npm:0.0.1"]\ ],\ @@ -2045,7 +2045,7 @@ const RAW_RUNTIME_STATE = ]],\ ["convert-source-map", [\ ["npm:2.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/convert-source-map-npm-2.0.0-7ab664dc4e-10c0.zip/node_modules/convert-source-map/",\ + "packageLocation": "../../../../.yarn/berry/cache/convert-source-map-npm-2.0.0-7ab664dc4e-10c0.zip/node_modules/convert-source-map/",\ "packageDependencies": [\ ["convert-source-map", "npm:2.0.0"]\ ],\ @@ -2054,7 +2054,7 @@ const RAW_RUNTIME_STATE = ]],\ ["cross-spawn", [\ ["npm:7.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/cross-spawn-npm-7.0.3-e4ff3e65b3-10c0.zip/node_modules/cross-spawn/",\ + "packageLocation": "../../../../.yarn/berry/cache/cross-spawn-npm-7.0.3-e4ff3e65b3-10c0.zip/node_modules/cross-spawn/",\ "packageDependencies": [\ ["cross-spawn", "npm:7.0.3"],\ ["path-key", "npm:3.1.1"],\ @@ -2066,7 +2066,7 @@ const RAW_RUNTIME_STATE = ]],\ ["cssesc", [\ ["npm:3.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/cssesc-npm-3.0.0-15ec56f86f-10c0.zip/node_modules/cssesc/",\ + "packageLocation": "../../../../.yarn/berry/cache/cssesc-npm-3.0.0-15ec56f86f-10c0.zip/node_modules/cssesc/",\ "packageDependencies": [\ ["cssesc", "npm:3.0.0"]\ ],\ @@ -2075,7 +2075,7 @@ const RAW_RUNTIME_STATE = ]],\ ["csstype", [\ ["npm:3.1.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/csstype-npm-3.1.3-e9a1c85013-10c0.zip/node_modules/csstype/",\ + "packageLocation": "../../../../.yarn/berry/cache/csstype-npm-3.1.3-e9a1c85013-10c0.zip/node_modules/csstype/",\ "packageDependencies": [\ ["csstype", "npm:3.1.3"]\ ],\ @@ -2084,7 +2084,7 @@ const RAW_RUNTIME_STATE = ]],\ ["data-view-buffer", [\ ["npm:1.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/data-view-buffer-npm-1.0.1-d911beebce-10c0.zip/node_modules/data-view-buffer/",\ + "packageLocation": "../../../../.yarn/berry/cache/data-view-buffer-npm-1.0.1-d911beebce-10c0.zip/node_modules/data-view-buffer/",\ "packageDependencies": [\ ["data-view-buffer", "npm:1.0.1"],\ ["call-bind", "npm:1.0.7"],\ @@ -2096,7 +2096,7 @@ const RAW_RUNTIME_STATE = ]],\ ["data-view-byte-length", [\ ["npm:1.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/data-view-byte-length-npm-1.0.1-538a9e432e-10c0.zip/node_modules/data-view-byte-length/",\ + "packageLocation": "../../../../.yarn/berry/cache/data-view-byte-length-npm-1.0.1-538a9e432e-10c0.zip/node_modules/data-view-byte-length/",\ "packageDependencies": [\ ["data-view-byte-length", "npm:1.0.1"],\ ["call-bind", "npm:1.0.7"],\ @@ -2108,7 +2108,7 @@ const RAW_RUNTIME_STATE = ]],\ ["data-view-byte-offset", [\ ["npm:1.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/data-view-byte-offset-npm-1.0.0-7112a24a4b-10c0.zip/node_modules/data-view-byte-offset/",\ + "packageLocation": "../../../../.yarn/berry/cache/data-view-byte-offset-npm-1.0.0-7112a24a4b-10c0.zip/node_modules/data-view-byte-offset/",\ "packageDependencies": [\ ["data-view-byte-offset", "npm:1.0.0"],\ ["call-bind", "npm:1.0.7"],\ @@ -2120,14 +2120,14 @@ const RAW_RUNTIME_STATE = ]],\ ["debug", [\ ["npm:4.3.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/debug-npm-4.3.7-385645adf9-10c0.zip/node_modules/debug/",\ + "packageLocation": "../../../../.yarn/berry/cache/debug-npm-4.3.7-385645adf9-10c0.zip/node_modules/debug/",\ "packageDependencies": [\ ["debug", "npm:4.3.7"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:1ff4b5f90832ba0a9c93ba1223af226e44ba70c1126a3740d93562b97bc36544e896a5e95908196f7458713e6a6089a34bfc67362fc6df7fa093bd06c878be47#npm:4.3.7", {\ - "packageLocation": "./.yarn/__virtual__/debug-virtual-d06b253898/3/AppData/Local/Yarn/Berry/cache/debug-npm-4.3.7-385645adf9-10c0.zip/node_modules/debug/",\ + "packageLocation": "./.yarn/__virtual__/debug-virtual-d06b253898/5/.yarn/berry/cache/debug-npm-4.3.7-385645adf9-10c0.zip/node_modules/debug/",\ "packageDependencies": [\ ["debug", "virtual:1ff4b5f90832ba0a9c93ba1223af226e44ba70c1126a3740d93562b97bc36544e896a5e95908196f7458713e6a6089a34bfc67362fc6df7fa093bd06c878be47#npm:4.3.7"],\ ["@types/supports-color", null],\ @@ -2143,7 +2143,7 @@ const RAW_RUNTIME_STATE = ]],\ ["deep-is", [\ ["npm:0.1.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/deep-is-npm-0.1.4-88938b5a67-10c0.zip/node_modules/deep-is/",\ + "packageLocation": "../../../../.yarn/berry/cache/deep-is-npm-0.1.4-88938b5a67-10c0.zip/node_modules/deep-is/",\ "packageDependencies": [\ ["deep-is", "npm:0.1.4"]\ ],\ @@ -2152,7 +2152,7 @@ const RAW_RUNTIME_STATE = ]],\ ["deepmerge", [\ ["npm:4.3.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/deepmerge-npm-4.3.1-4f751a0844-10c0.zip/node_modules/deepmerge/",\ + "packageLocation": "../../../../.yarn/berry/cache/deepmerge-npm-4.3.1-4f751a0844-10c0.zip/node_modules/deepmerge/",\ "packageDependencies": [\ ["deepmerge", "npm:4.3.1"]\ ],\ @@ -2161,7 +2161,7 @@ const RAW_RUNTIME_STATE = ]],\ ["define-data-property", [\ ["npm:1.1.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/define-data-property-npm-1.1.4-4cbd8efc51-10c0.zip/node_modules/define-data-property/",\ + "packageLocation": "../../../../.yarn/berry/cache/define-data-property-npm-1.1.4-4cbd8efc51-10c0.zip/node_modules/define-data-property/",\ "packageDependencies": [\ ["define-data-property", "npm:1.1.4"],\ ["es-define-property", "npm:1.0.0"],\ @@ -2173,7 +2173,7 @@ const RAW_RUNTIME_STATE = ]],\ ["define-properties", [\ ["npm:1.2.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/define-properties-npm-1.2.1-8a4d42413b-10c0.zip/node_modules/define-properties/",\ + "packageLocation": "../../../../.yarn/berry/cache/define-properties-npm-1.2.1-8a4d42413b-10c0.zip/node_modules/define-properties/",\ "packageDependencies": [\ ["define-properties", "npm:1.2.1"],\ ["define-data-property", "npm:1.1.4"],\ @@ -2209,7 +2209,7 @@ const RAW_RUNTIME_STATE = ]],\ ["detect-libc", [\ ["npm:1.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/detect-libc-npm-1.0.3-c30ac344d4-10c0.zip/node_modules/detect-libc/",\ + "packageLocation": "../../../../.yarn/berry/cache/detect-libc-npm-1.0.3-c30ac344d4-10c0.zip/node_modules/detect-libc/",\ "packageDependencies": [\ ["detect-libc", "npm:1.0.3"]\ ],\ @@ -2227,7 +2227,7 @@ const RAW_RUNTIME_STATE = ]],\ ["doctrine", [\ ["npm:2.1.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/doctrine-npm-2.1.0-ac15d049b7-10c0.zip/node_modules/doctrine/",\ + "packageLocation": "../../../../.yarn/berry/cache/doctrine-npm-2.1.0-ac15d049b7-10c0.zip/node_modules/doctrine/",\ "packageDependencies": [\ ["doctrine", "npm:2.1.0"],\ ["esutils", "npm:2.0.3"]\ @@ -2235,7 +2235,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["npm:3.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/doctrine-npm-3.0.0-c6f1615f04-10c0.zip/node_modules/doctrine/",\ + "packageLocation": "../../../../.yarn/berry/cache/doctrine-npm-3.0.0-c6f1615f04-10c0.zip/node_modules/doctrine/",\ "packageDependencies": [\ ["doctrine", "npm:3.0.0"],\ ["esutils", "npm:2.0.3"]\ @@ -2245,7 +2245,7 @@ const RAW_RUNTIME_STATE = ]],\ ["eastasianwidth", [\ ["npm:0.2.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/eastasianwidth-npm-0.2.0-c37eb16bd1-10c0.zip/node_modules/eastasianwidth/",\ + "packageLocation": "../../../../.yarn/berry/cache/eastasianwidth-npm-0.2.0-c37eb16bd1-10c0.zip/node_modules/eastasianwidth/",\ "packageDependencies": [\ ["eastasianwidth", "npm:0.2.0"]\ ],\ @@ -2254,7 +2254,7 @@ const RAW_RUNTIME_STATE = ]],\ ["electron-to-chromium", [\ ["npm:1.5.36", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/electron-to-chromium-npm-1.5.36-6e4a25fa19-10c0.zip/node_modules/electron-to-chromium/",\ + "packageLocation": "../../../../.yarn/berry/cache/electron-to-chromium-npm-1.5.36-6e4a25fa19-10c0.zip/node_modules/electron-to-chromium/",\ "packageDependencies": [\ ["electron-to-chromium", "npm:1.5.36"]\ ],\ @@ -2263,14 +2263,14 @@ const RAW_RUNTIME_STATE = ]],\ ["emoji-regex", [\ ["npm:8.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/emoji-regex-npm-8.0.0-213764015c-10c0.zip/node_modules/emoji-regex/",\ + "packageLocation": "../../../../.yarn/berry/cache/emoji-regex-npm-8.0.0-213764015c-10c0.zip/node_modules/emoji-regex/",\ "packageDependencies": [\ ["emoji-regex", "npm:8.0.0"]\ ],\ "linkType": "HARD"\ }],\ ["npm:9.2.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/emoji-regex-npm-9.2.2-e6fac8d058-10c0.zip/node_modules/emoji-regex/",\ + "packageLocation": "../../../../.yarn/berry/cache/emoji-regex-npm-9.2.2-e6fac8d058-10c0.zip/node_modules/emoji-regex/",\ "packageDependencies": [\ ["emoji-regex", "npm:9.2.2"]\ ],\ @@ -2279,7 +2279,7 @@ const RAW_RUNTIME_STATE = ]],\ ["encoding", [\ ["npm:0.1.13", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/encoding-npm-0.1.13-82a1837d30-10c0.zip/node_modules/encoding/",\ + "packageLocation": "../../../../.yarn/berry/cache/encoding-npm-0.1.13-82a1837d30-10c0.zip/node_modules/encoding/",\ "packageDependencies": [\ ["encoding", "npm:0.1.13"],\ ["iconv-lite", "npm:0.6.3"]\ @@ -2289,7 +2289,7 @@ const RAW_RUNTIME_STATE = ]],\ ["env-paths", [\ ["npm:2.2.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/env-paths-npm-2.2.1-7c7577428c-10c0.zip/node_modules/env-paths/",\ + "packageLocation": "../../../../.yarn/berry/cache/env-paths-npm-2.2.1-7c7577428c-10c0.zip/node_modules/env-paths/",\ "packageDependencies": [\ ["env-paths", "npm:2.2.1"]\ ],\ @@ -2298,7 +2298,7 @@ const RAW_RUNTIME_STATE = ]],\ ["err-code", [\ ["npm:2.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/err-code-npm-2.0.3-082e0ff9a7-10c0.zip/node_modules/err-code/",\ + "packageLocation": "../../../../.yarn/berry/cache/err-code-npm-2.0.3-082e0ff9a7-10c0.zip/node_modules/err-code/",\ "packageDependencies": [\ ["err-code", "npm:2.0.3"]\ ],\ @@ -2307,7 +2307,7 @@ const RAW_RUNTIME_STATE = ]],\ ["es-abstract", [\ ["npm:1.23.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/es-abstract-npm-1.23.3-ffd85665f7-10c0.zip/node_modules/es-abstract/",\ + "packageLocation": "../../../../.yarn/berry/cache/es-abstract-npm-1.23.3-ffd85665f7-10c0.zip/node_modules/es-abstract/",\ "packageDependencies": [\ ["es-abstract", "npm:1.23.3"],\ ["array-buffer-byte-length", "npm:1.0.1"],\ @@ -2362,7 +2362,7 @@ const RAW_RUNTIME_STATE = ]],\ ["es-define-property", [\ ["npm:1.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/es-define-property-npm-1.0.0-e23aa9b242-10c0.zip/node_modules/es-define-property/",\ + "packageLocation": "../../../../.yarn/berry/cache/es-define-property-npm-1.0.0-e23aa9b242-10c0.zip/node_modules/es-define-property/",\ "packageDependencies": [\ ["es-define-property", "npm:1.0.0"],\ ["get-intrinsic", "npm:1.2.4"]\ @@ -2372,7 +2372,7 @@ const RAW_RUNTIME_STATE = ]],\ ["es-errors", [\ ["npm:1.3.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/es-errors-npm-1.3.0-fda0c9b8a8-10c0.zip/node_modules/es-errors/",\ + "packageLocation": "../../../../.yarn/berry/cache/es-errors-npm-1.3.0-fda0c9b8a8-10c0.zip/node_modules/es-errors/",\ "packageDependencies": [\ ["es-errors", "npm:1.3.0"]\ ],\ @@ -2381,7 +2381,7 @@ const RAW_RUNTIME_STATE = ]],\ ["es-iterator-helpers", [\ ["npm:1.1.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/es-iterator-helpers-npm-1.1.0-47deee3fe3-10c0.zip/node_modules/es-iterator-helpers/",\ + "packageLocation": "../../../../.yarn/berry/cache/es-iterator-helpers-npm-1.1.0-47deee3fe3-10c0.zip/node_modules/es-iterator-helpers/",\ "packageDependencies": [\ ["es-iterator-helpers", "npm:1.1.0"],\ ["call-bind", "npm:1.0.7"],\ @@ -2404,7 +2404,7 @@ const RAW_RUNTIME_STATE = ]],\ ["es-object-atoms", [\ ["npm:1.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/es-object-atoms-npm-1.0.0-c5cca6d760-10c0.zip/node_modules/es-object-atoms/",\ + "packageLocation": "../../../../.yarn/berry/cache/es-object-atoms-npm-1.0.0-c5cca6d760-10c0.zip/node_modules/es-object-atoms/",\ "packageDependencies": [\ ["es-object-atoms", "npm:1.0.0"],\ ["es-errors", "npm:1.3.0"]\ @@ -2414,7 +2414,7 @@ const RAW_RUNTIME_STATE = ]],\ ["es-set-tostringtag", [\ ["npm:2.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/es-set-tostringtag-npm-2.0.3-8a191fed13-10c0.zip/node_modules/es-set-tostringtag/",\ + "packageLocation": "../../../../.yarn/berry/cache/es-set-tostringtag-npm-2.0.3-8a191fed13-10c0.zip/node_modules/es-set-tostringtag/",\ "packageDependencies": [\ ["es-set-tostringtag", "npm:2.0.3"],\ ["get-intrinsic", "npm:1.2.4"],\ @@ -2426,7 +2426,7 @@ const RAW_RUNTIME_STATE = ]],\ ["es-shim-unscopables", [\ ["npm:1.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/es-shim-unscopables-npm-1.0.2-a3056a4c0d-10c0.zip/node_modules/es-shim-unscopables/",\ + "packageLocation": "../../../../.yarn/berry/cache/es-shim-unscopables-npm-1.0.2-a3056a4c0d-10c0.zip/node_modules/es-shim-unscopables/",\ "packageDependencies": [\ ["es-shim-unscopables", "npm:1.0.2"],\ ["hasown", "npm:2.0.2"]\ @@ -2436,7 +2436,7 @@ const RAW_RUNTIME_STATE = ]],\ ["es-to-primitive", [\ ["npm:1.2.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/es-to-primitive-npm-1.2.1-b7a7eac6c5-10c0.zip/node_modules/es-to-primitive/",\ + "packageLocation": "../../../../.yarn/berry/cache/es-to-primitive-npm-1.2.1-b7a7eac6c5-10c0.zip/node_modules/es-to-primitive/",\ "packageDependencies": [\ ["es-to-primitive", "npm:1.2.1"],\ ["is-callable", "npm:1.2.7"],\ @@ -2511,14 +2511,14 @@ const RAW_RUNTIME_STATE = ]],\ ["esbuild-scss-modules-plugin", [\ ["npm:1.1.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/esbuild-scss-modules-plugin-npm-1.1.1-80564f61e0-10c0.zip/node_modules/esbuild-scss-modules-plugin/",\ + "packageLocation": "../../../../.yarn/berry/cache/esbuild-scss-modules-plugin-npm-1.1.1-80564f61e0-10c0.zip/node_modules/esbuild-scss-modules-plugin/",\ "packageDependencies": [\ ["esbuild-scss-modules-plugin", "npm:1.1.1"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:ea35bf3da4d290ae453fe455661c3510f7ee200c335a977da403ec82854ba7dec40e6f9e72d8c19f0e70a55cbda847a643d15be5b3f7ab25ce5c27b0a95bbc76#npm:1.1.1", {\ - "packageLocation": "./.yarn/__virtual__/esbuild-scss-modules-plugin-virtual-e5f77e4700/3/AppData/Local/Yarn/Berry/cache/esbuild-scss-modules-plugin-npm-1.1.1-80564f61e0-10c0.zip/node_modules/esbuild-scss-modules-plugin/",\ + "packageLocation": "./.yarn/__virtual__/esbuild-scss-modules-plugin-virtual-e5f77e4700/5/.yarn/berry/cache/esbuild-scss-modules-plugin-npm-1.1.1-80564f61e0-10c0.zip/node_modules/esbuild-scss-modules-plugin/",\ "packageDependencies": [\ ["esbuild-scss-modules-plugin", "virtual:ea35bf3da4d290ae453fe455661c3510f7ee200c335a977da403ec82854ba7dec40e6f9e72d8c19f0e70a55cbda847a643d15be5b3f7ab25ce5c27b0a95bbc76#npm:1.1.1"],\ ["@types/cssnano", null],\ @@ -2536,7 +2536,7 @@ const RAW_RUNTIME_STATE = ]],\ ["escalade", [\ ["npm:3.2.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/escalade-npm-3.2.0-19b50dd48f-10c0.zip/node_modules/escalade/",\ + "packageLocation": "../../../../.yarn/berry/cache/escalade-npm-3.2.0-19b50dd48f-10c0.zip/node_modules/escalade/",\ "packageDependencies": [\ ["escalade", "npm:3.2.0"]\ ],\ @@ -2545,14 +2545,14 @@ const RAW_RUNTIME_STATE = ]],\ ["escape-string-regexp", [\ ["npm:1.0.5", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/escape-string-regexp-npm-1.0.5-3284de402f-10c0.zip/node_modules/escape-string-regexp/",\ + "packageLocation": "../../../../.yarn/berry/cache/escape-string-regexp-npm-1.0.5-3284de402f-10c0.zip/node_modules/escape-string-regexp/",\ "packageDependencies": [\ ["escape-string-regexp", "npm:1.0.5"]\ ],\ "linkType": "HARD"\ }],\ ["npm:4.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/escape-string-regexp-npm-4.0.0-4b531d8d59-10c0.zip/node_modules/escape-string-regexp/",\ + "packageLocation": "../../../../.yarn/berry/cache/escape-string-regexp-npm-4.0.0-4b531d8d59-10c0.zip/node_modules/escape-string-regexp/",\ "packageDependencies": [\ ["escape-string-regexp", "npm:4.0.0"]\ ],\ @@ -2561,7 +2561,7 @@ const RAW_RUNTIME_STATE = ]],\ ["eslint", [\ ["npm:8.57.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/eslint-npm-8.57.1-dd20287a5a-10c0.zip/node_modules/eslint/",\ + "packageLocation": "../../../../.yarn/berry/cache/eslint-npm-8.57.1-dd20287a5a-10c0.zip/node_modules/eslint/",\ "packageDependencies": [\ ["eslint", "npm:8.57.1"],\ ["@eslint-community/eslint-utils", "virtual:dd20287a5a1e86b12a5b04609f98bd729fafd847d08e1fc89cdc68f92d1acf209e53b09ef0af4b6e7781d88e1f9acf94e3bf34619939e434ad5ffb0f24855eb4#npm:4.4.0"],\ @@ -2608,14 +2608,14 @@ const RAW_RUNTIME_STATE = ]],\ ["eslint-config-prettier", [\ ["npm:9.1.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/eslint-config-prettier-npm-9.1.0-0e1fd42d7d-10c0.zip/node_modules/eslint-config-prettier/",\ + "packageLocation": "../../../../.yarn/berry/cache/eslint-config-prettier-npm-9.1.0-0e1fd42d7d-10c0.zip/node_modules/eslint-config-prettier/",\ "packageDependencies": [\ ["eslint-config-prettier", "npm:9.1.0"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:4e713d12bdbc7ddec9fda4cb5b83c291c3d2ff3a0ed63ce890f5fefb7a46552061e9a7cc6ad8fb730548cc9e36c8fcd40bc2173cd8ef45945459433b0e57e973#npm:9.1.0", {\ - "packageLocation": "./.yarn/__virtual__/eslint-config-prettier-virtual-103c252dad/3/AppData/Local/Yarn/Berry/cache/eslint-config-prettier-npm-9.1.0-0e1fd42d7d-10c0.zip/node_modules/eslint-config-prettier/",\ + "packageLocation": "./.yarn/__virtual__/eslint-config-prettier-virtual-103c252dad/5/.yarn/berry/cache/eslint-config-prettier-npm-9.1.0-0e1fd42d7d-10c0.zip/node_modules/eslint-config-prettier/",\ "packageDependencies": [\ ["eslint-config-prettier", "virtual:4e713d12bdbc7ddec9fda4cb5b83c291c3d2ff3a0ed63ce890f5fefb7a46552061e9a7cc6ad8fb730548cc9e36c8fcd40bc2173cd8ef45945459433b0e57e973#npm:9.1.0"],\ ["@types/eslint", null],\ @@ -2630,14 +2630,14 @@ const RAW_RUNTIME_STATE = ]],\ ["eslint-plugin-prettier", [\ ["npm:5.2.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/eslint-plugin-prettier-npm-5.2.1-7057756a8d-10c0.zip/node_modules/eslint-plugin-prettier/",\ + "packageLocation": "../../../../.yarn/berry/cache/eslint-plugin-prettier-npm-5.2.1-7057756a8d-10c0.zip/node_modules/eslint-plugin-prettier/",\ "packageDependencies": [\ ["eslint-plugin-prettier", "npm:5.2.1"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:4e713d12bdbc7ddec9fda4cb5b83c291c3d2ff3a0ed63ce890f5fefb7a46552061e9a7cc6ad8fb730548cc9e36c8fcd40bc2173cd8ef45945459433b0e57e973#npm:5.2.1", {\ - "packageLocation": "./.yarn/__virtual__/eslint-plugin-prettier-virtual-1a481f584c/3/AppData/Local/Yarn/Berry/cache/eslint-plugin-prettier-npm-5.2.1-7057756a8d-10c0.zip/node_modules/eslint-plugin-prettier/",\ + "packageLocation": "./.yarn/__virtual__/eslint-plugin-prettier-virtual-1a481f584c/5/.yarn/berry/cache/eslint-plugin-prettier-npm-5.2.1-7057756a8d-10c0.zip/node_modules/eslint-plugin-prettier/",\ "packageDependencies": [\ ["eslint-plugin-prettier", "virtual:4e713d12bdbc7ddec9fda4cb5b83c291c3d2ff3a0ed63ce890f5fefb7a46552061e9a7cc6ad8fb730548cc9e36c8fcd40bc2173cd8ef45945459433b0e57e973#npm:5.2.1"],\ ["@types/eslint", null],\ @@ -2660,7 +2660,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["virtual:ea35bf3da4d290ae453fe455661c3510f7ee200c335a977da403ec82854ba7dec40e6f9e72d8c19f0e70a55cbda847a643d15be5b3f7ab25ce5c27b0a95bbc76#npm:5.2.1", {\ - "packageLocation": "./.yarn/__virtual__/eslint-plugin-prettier-virtual-8b122d5744/3/AppData/Local/Yarn/Berry/cache/eslint-plugin-prettier-npm-5.2.1-7057756a8d-10c0.zip/node_modules/eslint-plugin-prettier/",\ + "packageLocation": "./.yarn/__virtual__/eslint-plugin-prettier-virtual-8b122d5744/5/.yarn/berry/cache/eslint-plugin-prettier-npm-5.2.1-7057756a8d-10c0.zip/node_modules/eslint-plugin-prettier/",\ "packageDependencies": [\ ["eslint-plugin-prettier", "virtual:ea35bf3da4d290ae453fe455661c3510f7ee200c335a977da403ec82854ba7dec40e6f9e72d8c19f0e70a55cbda847a643d15be5b3f7ab25ce5c27b0a95bbc76#npm:5.2.1"],\ ["@types/eslint", null],\ @@ -2685,14 +2685,14 @@ const RAW_RUNTIME_STATE = ]],\ ["eslint-plugin-react", [\ ["npm:7.37.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/eslint-plugin-react-npm-7.37.1-c62b7e0250-10c0.zip/node_modules/eslint-plugin-react/",\ + "packageLocation": "../../../../.yarn/berry/cache/eslint-plugin-react-npm-7.37.1-c62b7e0250-10c0.zip/node_modules/eslint-plugin-react/",\ "packageDependencies": [\ ["eslint-plugin-react", "npm:7.37.1"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:ea35bf3da4d290ae453fe455661c3510f7ee200c335a977da403ec82854ba7dec40e6f9e72d8c19f0e70a55cbda847a643d15be5b3f7ab25ce5c27b0a95bbc76#npm:7.37.1", {\ - "packageLocation": "./.yarn/__virtual__/eslint-plugin-react-virtual-55fd939d7d/3/AppData/Local/Yarn/Berry/cache/eslint-plugin-react-npm-7.37.1-c62b7e0250-10c0.zip/node_modules/eslint-plugin-react/",\ + "packageLocation": "./.yarn/__virtual__/eslint-plugin-react-virtual-55fd939d7d/5/.yarn/berry/cache/eslint-plugin-react-npm-7.37.1-c62b7e0250-10c0.zip/node_modules/eslint-plugin-react/",\ "packageDependencies": [\ ["eslint-plugin-react", "virtual:ea35bf3da4d290ae453fe455661c3510f7ee200c335a977da403ec82854ba7dec40e6f9e72d8c19f0e70a55cbda847a643d15be5b3f7ab25ce5c27b0a95bbc76#npm:7.37.1"],\ ["@types/eslint", null],\ @@ -2725,14 +2725,14 @@ const RAW_RUNTIME_STATE = ]],\ ["eslint-plugin-react-hooks", [\ ["npm:4.6.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/eslint-plugin-react-hooks-npm-4.6.2-05bc129286-10c0.zip/node_modules/eslint-plugin-react-hooks/",\ + "packageLocation": "../../../../.yarn/berry/cache/eslint-plugin-react-hooks-npm-4.6.2-05bc129286-10c0.zip/node_modules/eslint-plugin-react-hooks/",\ "packageDependencies": [\ ["eslint-plugin-react-hooks", "npm:4.6.2"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:ea35bf3da4d290ae453fe455661c3510f7ee200c335a977da403ec82854ba7dec40e6f9e72d8c19f0e70a55cbda847a643d15be5b3f7ab25ce5c27b0a95bbc76#npm:4.6.2", {\ - "packageLocation": "./.yarn/__virtual__/eslint-plugin-react-hooks-virtual-64e685d595/3/AppData/Local/Yarn/Berry/cache/eslint-plugin-react-hooks-npm-4.6.2-05bc129286-10c0.zip/node_modules/eslint-plugin-react-hooks/",\ + "packageLocation": "./.yarn/__virtual__/eslint-plugin-react-hooks-virtual-64e685d595/5/.yarn/berry/cache/eslint-plugin-react-hooks-npm-4.6.2-05bc129286-10c0.zip/node_modules/eslint-plugin-react-hooks/",\ "packageDependencies": [\ ["eslint-plugin-react-hooks", "virtual:ea35bf3da4d290ae453fe455661c3510f7ee200c335a977da403ec82854ba7dec40e6f9e72d8c19f0e70a55cbda847a643d15be5b3f7ab25ce5c27b0a95bbc76#npm:4.6.2"],\ ["@types/eslint", null],\ @@ -2747,7 +2747,7 @@ const RAW_RUNTIME_STATE = ]],\ ["eslint-scope", [\ ["npm:7.2.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/eslint-scope-npm-7.2.2-53cb0df8e8-10c0.zip/node_modules/eslint-scope/",\ + "packageLocation": "../../../../.yarn/berry/cache/eslint-scope-npm-7.2.2-53cb0df8e8-10c0.zip/node_modules/eslint-scope/",\ "packageDependencies": [\ ["eslint-scope", "npm:7.2.2"],\ ["esrecurse", "npm:4.3.0"],\ @@ -2758,7 +2758,7 @@ const RAW_RUNTIME_STATE = ]],\ ["eslint-visitor-keys", [\ ["npm:3.4.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/eslint-visitor-keys-npm-3.4.3-a356ac7e46-10c0.zip/node_modules/eslint-visitor-keys/",\ + "packageLocation": "../../../../.yarn/berry/cache/eslint-visitor-keys-npm-3.4.3-a356ac7e46-10c0.zip/node_modules/eslint-visitor-keys/",\ "packageDependencies": [\ ["eslint-visitor-keys", "npm:3.4.3"]\ ],\ @@ -2767,7 +2767,7 @@ const RAW_RUNTIME_STATE = ]],\ ["espree", [\ ["npm:9.6.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/espree-npm-9.6.1-a50722a5a9-10c0.zip/node_modules/espree/",\ + "packageLocation": "../../../../.yarn/berry/cache/espree-npm-9.6.1-a50722a5a9-10c0.zip/node_modules/espree/",\ "packageDependencies": [\ ["espree", "npm:9.6.1"],\ ["acorn", "npm:8.12.1"],\ @@ -2779,7 +2779,7 @@ const RAW_RUNTIME_STATE = ]],\ ["esquery", [\ ["npm:1.6.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/esquery-npm-1.6.0-16fee31531-10c0.zip/node_modules/esquery/",\ + "packageLocation": "../../../../.yarn/berry/cache/esquery-npm-1.6.0-16fee31531-10c0.zip/node_modules/esquery/",\ "packageDependencies": [\ ["esquery", "npm:1.6.0"],\ ["estraverse", "npm:5.3.0"]\ @@ -2789,7 +2789,7 @@ const RAW_RUNTIME_STATE = ]],\ ["esrecurse", [\ ["npm:4.3.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/esrecurse-npm-4.3.0-10b86a887a-10c0.zip/node_modules/esrecurse/",\ + "packageLocation": "../../../../.yarn/berry/cache/esrecurse-npm-4.3.0-10b86a887a-10c0.zip/node_modules/esrecurse/",\ "packageDependencies": [\ ["esrecurse", "npm:4.3.0"],\ ["estraverse", "npm:5.3.0"]\ @@ -2799,7 +2799,7 @@ const RAW_RUNTIME_STATE = ]],\ ["estraverse", [\ ["npm:5.3.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/estraverse-npm-5.3.0-03284f8f63-10c0.zip/node_modules/estraverse/",\ + "packageLocation": "../../../../.yarn/berry/cache/estraverse-npm-5.3.0-03284f8f63-10c0.zip/node_modules/estraverse/",\ "packageDependencies": [\ ["estraverse", "npm:5.3.0"]\ ],\ @@ -2808,7 +2808,7 @@ const RAW_RUNTIME_STATE = ]],\ ["esutils", [\ ["npm:2.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/esutils-npm-2.0.3-f865beafd5-10c0.zip/node_modules/esutils/",\ + "packageLocation": "../../../../.yarn/berry/cache/esutils-npm-2.0.3-f865beafd5-10c0.zip/node_modules/esutils/",\ "packageDependencies": [\ ["esutils", "npm:2.0.3"]\ ],\ @@ -2817,7 +2817,7 @@ const RAW_RUNTIME_STATE = ]],\ ["exponential-backoff", [\ ["npm:3.1.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/exponential-backoff-npm-3.1.1-04df458b30-10c0.zip/node_modules/exponential-backoff/",\ + "packageLocation": "../../../../.yarn/berry/cache/exponential-backoff-npm-3.1.1-04df458b30-10c0.zip/node_modules/exponential-backoff/",\ "packageDependencies": [\ ["exponential-backoff", "npm:3.1.1"]\ ],\ @@ -2826,7 +2826,7 @@ const RAW_RUNTIME_STATE = ]],\ ["fast-deep-equal", [\ ["npm:3.1.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/fast-deep-equal-npm-3.1.3-790edcfcf5-10c0.zip/node_modules/fast-deep-equal/",\ + "packageLocation": "../../../../.yarn/berry/cache/fast-deep-equal-npm-3.1.3-790edcfcf5-10c0.zip/node_modules/fast-deep-equal/",\ "packageDependencies": [\ ["fast-deep-equal", "npm:3.1.3"]\ ],\ @@ -2835,7 +2835,7 @@ const RAW_RUNTIME_STATE = ]],\ ["fast-diff", [\ ["npm:1.3.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/fast-diff-npm-1.3.0-9f19e3b743-10c0.zip/node_modules/fast-diff/",\ + "packageLocation": "../../../../.yarn/berry/cache/fast-diff-npm-1.3.0-9f19e3b743-10c0.zip/node_modules/fast-diff/",\ "packageDependencies": [\ ["fast-diff", "npm:1.3.0"]\ ],\ @@ -2844,7 +2844,7 @@ const RAW_RUNTIME_STATE = ]],\ ["fast-glob", [\ ["npm:3.3.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/fast-glob-npm-3.3.2-0a8cb4f2ca-10c0.zip/node_modules/fast-glob/",\ + "packageLocation": "../../../../.yarn/berry/cache/fast-glob-npm-3.3.2-0a8cb4f2ca-10c0.zip/node_modules/fast-glob/",\ "packageDependencies": [\ ["fast-glob", "npm:3.3.2"],\ ["@nodelib/fs.stat", "npm:2.0.5"],\ @@ -2858,7 +2858,7 @@ const RAW_RUNTIME_STATE = ]],\ ["fast-json-stable-stringify", [\ ["npm:2.1.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/fast-json-stable-stringify-npm-2.1.0-02e8905fda-10c0.zip/node_modules/fast-json-stable-stringify/",\ + "packageLocation": "../../../../.yarn/berry/cache/fast-json-stable-stringify-npm-2.1.0-02e8905fda-10c0.zip/node_modules/fast-json-stable-stringify/",\ "packageDependencies": [\ ["fast-json-stable-stringify", "npm:2.1.0"]\ ],\ @@ -2867,7 +2867,7 @@ const RAW_RUNTIME_STATE = ]],\ ["fast-levenshtein", [\ ["npm:2.0.6", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/fast-levenshtein-npm-2.0.6-fcd74b8df5-10c0.zip/node_modules/fast-levenshtein/",\ + "packageLocation": "../../../../.yarn/berry/cache/fast-levenshtein-npm-2.0.6-fcd74b8df5-10c0.zip/node_modules/fast-levenshtein/",\ "packageDependencies": [\ ["fast-levenshtein", "npm:2.0.6"]\ ],\ @@ -2876,7 +2876,7 @@ const RAW_RUNTIME_STATE = ]],\ ["fastq", [\ ["npm:1.17.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/fastq-npm-1.17.1-56d4554993-10c0.zip/node_modules/fastq/",\ + "packageLocation": "../../../../.yarn/berry/cache/fastq-npm-1.17.1-56d4554993-10c0.zip/node_modules/fastq/",\ "packageDependencies": [\ ["fastq", "npm:1.17.1"],\ ["reusify", "npm:1.0.4"]\ @@ -2886,7 +2886,7 @@ const RAW_RUNTIME_STATE = ]],\ ["file-entry-cache", [\ ["npm:6.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/file-entry-cache-npm-6.0.1-31965cf0af-10c0.zip/node_modules/file-entry-cache/",\ + "packageLocation": "../../../../.yarn/berry/cache/file-entry-cache-npm-6.0.1-31965cf0af-10c0.zip/node_modules/file-entry-cache/",\ "packageDependencies": [\ ["file-entry-cache", "npm:6.0.1"],\ ["flat-cache", "npm:3.2.0"]\ @@ -2896,7 +2896,7 @@ const RAW_RUNTIME_STATE = ]],\ ["fill-range", [\ ["npm:7.1.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/fill-range-npm-7.1.1-bf491486db-10c0.zip/node_modules/fill-range/",\ + "packageLocation": "../../../../.yarn/berry/cache/fill-range-npm-7.1.1-bf491486db-10c0.zip/node_modules/fill-range/",\ "packageDependencies": [\ ["fill-range", "npm:7.1.1"],\ ["to-regex-range", "npm:5.0.1"]\ @@ -2906,7 +2906,7 @@ const RAW_RUNTIME_STATE = ]],\ ["find-up", [\ ["npm:5.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/find-up-npm-5.0.0-e03e9b796d-10c0.zip/node_modules/find-up/",\ + "packageLocation": "../../../../.yarn/berry/cache/find-up-npm-5.0.0-e03e9b796d-10c0.zip/node_modules/find-up/",\ "packageDependencies": [\ ["find-up", "npm:5.0.0"],\ ["locate-path", "npm:6.0.0"],\ @@ -2917,7 +2917,7 @@ const RAW_RUNTIME_STATE = ]],\ ["flat-cache", [\ ["npm:3.2.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/flat-cache-npm-3.2.0-9a887f084e-10c0.zip/node_modules/flat-cache/",\ + "packageLocation": "../../../../.yarn/berry/cache/flat-cache-npm-3.2.0-9a887f084e-10c0.zip/node_modules/flat-cache/",\ "packageDependencies": [\ ["flat-cache", "npm:3.2.0"],\ ["flatted", "npm:3.3.1"],\ @@ -2929,7 +2929,7 @@ const RAW_RUNTIME_STATE = ]],\ ["flatted", [\ ["npm:3.3.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/flatted-npm-3.3.1-458870f59b-10c0.zip/node_modules/flatted/",\ + "packageLocation": "../../../../.yarn/berry/cache/flatted-npm-3.3.1-458870f59b-10c0.zip/node_modules/flatted/",\ "packageDependencies": [\ ["flatted", "npm:3.3.1"]\ ],\ @@ -2938,7 +2938,7 @@ const RAW_RUNTIME_STATE = ]],\ ["for-each", [\ ["npm:0.3.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/for-each-npm-0.3.3-0010ca8cdd-10c0.zip/node_modules/for-each/",\ + "packageLocation": "../../../../.yarn/berry/cache/for-each-npm-0.3.3-0010ca8cdd-10c0.zip/node_modules/for-each/",\ "packageDependencies": [\ ["for-each", "npm:0.3.3"],\ ["is-callable", "npm:1.2.7"]\ @@ -2948,7 +2948,7 @@ const RAW_RUNTIME_STATE = ]],\ ["foreground-child", [\ ["npm:3.3.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/foreground-child-npm-3.3.0-b8be745271-10c0.zip/node_modules/foreground-child/",\ + "packageLocation": "../../../../.yarn/berry/cache/foreground-child-npm-3.3.0-b8be745271-10c0.zip/node_modules/foreground-child/",\ "packageDependencies": [\ ["foreground-child", "npm:3.3.0"],\ ["cross-spawn", "npm:7.0.3"],\ @@ -2959,7 +2959,7 @@ const RAW_RUNTIME_STATE = ]],\ ["fs-minipass", [\ ["npm:2.1.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/fs-minipass-npm-2.1.0-501ef87306-10c0.zip/node_modules/fs-minipass/",\ + "packageLocation": "../../../../.yarn/berry/cache/fs-minipass-npm-2.1.0-501ef87306-10c0.zip/node_modules/fs-minipass/",\ "packageDependencies": [\ ["fs-minipass", "npm:2.1.0"],\ ["minipass", "npm:3.3.6"]\ @@ -2967,7 +2967,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["npm:3.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/fs-minipass-npm-3.0.3-d148d6ac19-10c0.zip/node_modules/fs-minipass/",\ + "packageLocation": "../../../../.yarn/berry/cache/fs-minipass-npm-3.0.3-d148d6ac19-10c0.zip/node_modules/fs-minipass/",\ "packageDependencies": [\ ["fs-minipass", "npm:3.0.3"],\ ["minipass", "npm:7.1.2"]\ @@ -2977,7 +2977,7 @@ const RAW_RUNTIME_STATE = ]],\ ["fs.realpath", [\ ["npm:1.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/fs.realpath-npm-1.0.0-c8f05d8126-10c0.zip/node_modules/fs.realpath/",\ + "packageLocation": "../../../../.yarn/berry/cache/fs.realpath-npm-1.0.0-c8f05d8126-10c0.zip/node_modules/fs.realpath/",\ "packageDependencies": [\ ["fs.realpath", "npm:1.0.0"]\ ],\ @@ -2996,7 +2996,7 @@ const RAW_RUNTIME_STATE = ]],\ ["function-bind", [\ ["npm:1.1.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/function-bind-npm-1.1.2-7a55be9b03-10c0.zip/node_modules/function-bind/",\ + "packageLocation": "../../../../.yarn/berry/cache/function-bind-npm-1.1.2-7a55be9b03-10c0.zip/node_modules/function-bind/",\ "packageDependencies": [\ ["function-bind", "npm:1.1.2"]\ ],\ @@ -3005,7 +3005,7 @@ const RAW_RUNTIME_STATE = ]],\ ["function.prototype.name", [\ ["npm:1.1.6", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/function.prototype.name-npm-1.1.6-fd3a6a5cdd-10c0.zip/node_modules/function.prototype.name/",\ + "packageLocation": "../../../../.yarn/berry/cache/function.prototype.name-npm-1.1.6-fd3a6a5cdd-10c0.zip/node_modules/function.prototype.name/",\ "packageDependencies": [\ ["function.prototype.name", "npm:1.1.6"],\ ["call-bind", "npm:1.0.7"],\ @@ -3018,7 +3018,7 @@ const RAW_RUNTIME_STATE = ]],\ ["functions-have-names", [\ ["npm:1.2.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/functions-have-names-npm-1.2.3-e5cf1e2208-10c0.zip/node_modules/functions-have-names/",\ + "packageLocation": "../../../../.yarn/berry/cache/functions-have-names-npm-1.2.3-e5cf1e2208-10c0.zip/node_modules/functions-have-names/",\ "packageDependencies": [\ ["functions-have-names", "npm:1.2.3"]\ ],\ @@ -3027,7 +3027,7 @@ const RAW_RUNTIME_STATE = ]],\ ["generic-names", [\ ["npm:4.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/generic-names-npm-4.0.0-c188ad8a22-10c0.zip/node_modules/generic-names/",\ + "packageLocation": "../../../../.yarn/berry/cache/generic-names-npm-4.0.0-c188ad8a22-10c0.zip/node_modules/generic-names/",\ "packageDependencies": [\ ["generic-names", "npm:4.0.0"],\ ["loader-utils", "npm:3.3.1"]\ @@ -3037,7 +3037,7 @@ const RAW_RUNTIME_STATE = ]],\ ["gensync", [\ ["npm:1.0.0-beta.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/gensync-npm-1.0.0-beta.2-224666d72f-10c0.zip/node_modules/gensync/",\ + "packageLocation": "../../../../.yarn/berry/cache/gensync-npm-1.0.0-beta.2-224666d72f-10c0.zip/node_modules/gensync/",\ "packageDependencies": [\ ["gensync", "npm:1.0.0-beta.2"]\ ],\ @@ -3046,7 +3046,7 @@ const RAW_RUNTIME_STATE = ]],\ ["get-intrinsic", [\ ["npm:1.2.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/get-intrinsic-npm-1.2.4-1dad3427b2-10c0.zip/node_modules/get-intrinsic/",\ + "packageLocation": "../../../../.yarn/berry/cache/get-intrinsic-npm-1.2.4-1dad3427b2-10c0.zip/node_modules/get-intrinsic/",\ "packageDependencies": [\ ["get-intrinsic", "npm:1.2.4"],\ ["es-errors", "npm:1.3.0"],\ @@ -3060,7 +3060,7 @@ const RAW_RUNTIME_STATE = ]],\ ["get-symbol-description", [\ ["npm:1.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/get-symbol-description-npm-1.0.2-f8c332e0b5-10c0.zip/node_modules/get-symbol-description/",\ + "packageLocation": "../../../../.yarn/berry/cache/get-symbol-description-npm-1.0.2-f8c332e0b5-10c0.zip/node_modules/get-symbol-description/",\ "packageDependencies": [\ ["get-symbol-description", "npm:1.0.2"],\ ["call-bind", "npm:1.0.7"],\ @@ -3072,7 +3072,7 @@ const RAW_RUNTIME_STATE = ]],\ ["glob", [\ ["npm:10.4.5", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/glob-npm-10.4.5-8c63175f05-10c0.zip/node_modules/glob/",\ + "packageLocation": "../../../../.yarn/berry/cache/glob-npm-10.4.5-8c63175f05-10c0.zip/node_modules/glob/",\ "packageDependencies": [\ ["glob", "npm:10.4.5"],\ ["foreground-child", "npm:3.3.0"],\ @@ -3085,7 +3085,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["npm:7.2.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/glob-npm-7.2.3-2d866d17a5-10c0.zip/node_modules/glob/",\ + "packageLocation": "../../../../.yarn/berry/cache/glob-npm-7.2.3-2d866d17a5-10c0.zip/node_modules/glob/",\ "packageDependencies": [\ ["glob", "npm:7.2.3"],\ ["fs.realpath", "npm:1.0.0"],\ @@ -3100,7 +3100,7 @@ const RAW_RUNTIME_STATE = ]],\ ["glob-parent", [\ ["npm:5.1.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/glob-parent-npm-5.1.2-021ab32634-10c0.zip/node_modules/glob-parent/",\ + "packageLocation": "../../../../.yarn/berry/cache/glob-parent-npm-5.1.2-021ab32634-10c0.zip/node_modules/glob-parent/",\ "packageDependencies": [\ ["glob-parent", "npm:5.1.2"],\ ["is-glob", "npm:4.0.3"]\ @@ -3108,7 +3108,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["npm:6.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/glob-parent-npm-6.0.2-2cbef12738-10c0.zip/node_modules/glob-parent/",\ + "packageLocation": "../../../../.yarn/berry/cache/glob-parent-npm-6.0.2-2cbef12738-10c0.zip/node_modules/glob-parent/",\ "packageDependencies": [\ ["glob-parent", "npm:6.0.2"],\ ["is-glob", "npm:4.0.3"]\ @@ -3118,14 +3118,14 @@ const RAW_RUNTIME_STATE = ]],\ ["globals", [\ ["npm:11.12.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/globals-npm-11.12.0-1fa7f41a6c-10c0.zip/node_modules/globals/",\ + "packageLocation": "../../../../.yarn/berry/cache/globals-npm-11.12.0-1fa7f41a6c-10c0.zip/node_modules/globals/",\ "packageDependencies": [\ ["globals", "npm:11.12.0"]\ ],\ "linkType": "HARD"\ }],\ ["npm:13.24.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/globals-npm-13.24.0-cc7713139c-10c0.zip/node_modules/globals/",\ + "packageLocation": "../../../../.yarn/berry/cache/globals-npm-13.24.0-cc7713139c-10c0.zip/node_modules/globals/",\ "packageDependencies": [\ ["globals", "npm:13.24.0"],\ ["type-fest", "npm:0.20.2"]\ @@ -3135,7 +3135,7 @@ const RAW_RUNTIME_STATE = ]],\ ["globalthis", [\ ["npm:1.0.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/globalthis-npm-1.0.4-de22ac6193-10c0.zip/node_modules/globalthis/",\ + "packageLocation": "../../../../.yarn/berry/cache/globalthis-npm-1.0.4-de22ac6193-10c0.zip/node_modules/globalthis/",\ "packageDependencies": [\ ["globalthis", "npm:1.0.4"],\ ["define-properties", "npm:1.2.1"],\ @@ -3146,7 +3146,7 @@ const RAW_RUNTIME_STATE = ]],\ ["gopd", [\ ["npm:1.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/gopd-npm-1.0.1-10c1d0b534-10c0.zip/node_modules/gopd/",\ + "packageLocation": "../../../../.yarn/berry/cache/gopd-npm-1.0.1-10c1d0b534-10c0.zip/node_modules/gopd/",\ "packageDependencies": [\ ["gopd", "npm:1.0.1"],\ ["get-intrinsic", "npm:1.2.4"]\ @@ -3156,7 +3156,7 @@ const RAW_RUNTIME_STATE = ]],\ ["graceful-fs", [\ ["npm:4.2.11", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/graceful-fs-npm-4.2.11-24bb648a68-10c0.zip/node_modules/graceful-fs/",\ + "packageLocation": "../../../../.yarn/berry/cache/graceful-fs-npm-4.2.11-24bb648a68-10c0.zip/node_modules/graceful-fs/",\ "packageDependencies": [\ ["graceful-fs", "npm:4.2.11"]\ ],\ @@ -3165,7 +3165,7 @@ const RAW_RUNTIME_STATE = ]],\ ["graphemer", [\ ["npm:1.4.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/graphemer-npm-1.4.0-0627732d35-10c0.zip/node_modules/graphemer/",\ + "packageLocation": "../../../../.yarn/berry/cache/graphemer-npm-1.4.0-0627732d35-10c0.zip/node_modules/graphemer/",\ "packageDependencies": [\ ["graphemer", "npm:1.4.0"]\ ],\ @@ -3174,7 +3174,7 @@ const RAW_RUNTIME_STATE = ]],\ ["has-bigints", [\ ["npm:1.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/has-bigints-npm-1.0.2-52732e614d-10c0.zip/node_modules/has-bigints/",\ + "packageLocation": "../../../../.yarn/berry/cache/has-bigints-npm-1.0.2-52732e614d-10c0.zip/node_modules/has-bigints/",\ "packageDependencies": [\ ["has-bigints", "npm:1.0.2"]\ ],\ @@ -3183,14 +3183,14 @@ const RAW_RUNTIME_STATE = ]],\ ["has-flag", [\ ["npm:3.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/has-flag-npm-3.0.0-16ac11fe05-10c0.zip/node_modules/has-flag/",\ + "packageLocation": "../../../../.yarn/berry/cache/has-flag-npm-3.0.0-16ac11fe05-10c0.zip/node_modules/has-flag/",\ "packageDependencies": [\ ["has-flag", "npm:3.0.0"]\ ],\ "linkType": "HARD"\ }],\ ["npm:4.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/has-flag-npm-4.0.0-32af9f0536-10c0.zip/node_modules/has-flag/",\ + "packageLocation": "../../../../.yarn/berry/cache/has-flag-npm-4.0.0-32af9f0536-10c0.zip/node_modules/has-flag/",\ "packageDependencies": [\ ["has-flag", "npm:4.0.0"]\ ],\ @@ -3199,7 +3199,7 @@ const RAW_RUNTIME_STATE = ]],\ ["has-property-descriptors", [\ ["npm:1.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/has-property-descriptors-npm-1.0.2-d7077d09f1-10c0.zip/node_modules/has-property-descriptors/",\ + "packageLocation": "../../../../.yarn/berry/cache/has-property-descriptors-npm-1.0.2-d7077d09f1-10c0.zip/node_modules/has-property-descriptors/",\ "packageDependencies": [\ ["has-property-descriptors", "npm:1.0.2"],\ ["es-define-property", "npm:1.0.0"]\ @@ -3209,7 +3209,7 @@ const RAW_RUNTIME_STATE = ]],\ ["has-proto", [\ ["npm:1.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/has-proto-npm-1.0.3-b598da2961-10c0.zip/node_modules/has-proto/",\ + "packageLocation": "../../../../.yarn/berry/cache/has-proto-npm-1.0.3-b598da2961-10c0.zip/node_modules/has-proto/",\ "packageDependencies": [\ ["has-proto", "npm:1.0.3"]\ ],\ @@ -3218,7 +3218,7 @@ const RAW_RUNTIME_STATE = ]],\ ["has-symbols", [\ ["npm:1.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/has-symbols-npm-1.0.3-1986bff2c4-10c0.zip/node_modules/has-symbols/",\ + "packageLocation": "../../../../.yarn/berry/cache/has-symbols-npm-1.0.3-1986bff2c4-10c0.zip/node_modules/has-symbols/",\ "packageDependencies": [\ ["has-symbols", "npm:1.0.3"]\ ],\ @@ -3227,7 +3227,7 @@ const RAW_RUNTIME_STATE = ]],\ ["has-tostringtag", [\ ["npm:1.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/has-tostringtag-npm-1.0.2-74a4800369-10c0.zip/node_modules/has-tostringtag/",\ + "packageLocation": "../../../../.yarn/berry/cache/has-tostringtag-npm-1.0.2-74a4800369-10c0.zip/node_modules/has-tostringtag/",\ "packageDependencies": [\ ["has-tostringtag", "npm:1.0.2"],\ ["has-symbols", "npm:1.0.3"]\ @@ -3237,7 +3237,7 @@ const RAW_RUNTIME_STATE = ]],\ ["hasown", [\ ["npm:2.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/hasown-npm-2.0.2-80fe6c9901-10c0.zip/node_modules/hasown/",\ + "packageLocation": "../../../../.yarn/berry/cache/hasown-npm-2.0.2-80fe6c9901-10c0.zip/node_modules/hasown/",\ "packageDependencies": [\ ["hasown", "npm:2.0.2"],\ ["function-bind", "npm:1.1.2"]\ @@ -3247,7 +3247,7 @@ const RAW_RUNTIME_STATE = ]],\ ["http-cache-semantics", [\ ["npm:4.1.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/http-cache-semantics-npm-4.1.1-1120131375-10c0.zip/node_modules/http-cache-semantics/",\ + "packageLocation": "../../../../.yarn/berry/cache/http-cache-semantics-npm-4.1.1-1120131375-10c0.zip/node_modules/http-cache-semantics/",\ "packageDependencies": [\ ["http-cache-semantics", "npm:4.1.1"]\ ],\ @@ -3256,7 +3256,7 @@ const RAW_RUNTIME_STATE = ]],\ ["http-proxy-agent", [\ ["npm:7.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/http-proxy-agent-npm-7.0.2-643ed7cc33-10c0.zip/node_modules/http-proxy-agent/",\ + "packageLocation": "../../../../.yarn/berry/cache/http-proxy-agent-npm-7.0.2-643ed7cc33-10c0.zip/node_modules/http-proxy-agent/",\ "packageDependencies": [\ ["http-proxy-agent", "npm:7.0.2"],\ ["agent-base", "npm:7.1.1"],\ @@ -3267,7 +3267,7 @@ const RAW_RUNTIME_STATE = ]],\ ["https-proxy-agent", [\ ["npm:7.0.5", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/https-proxy-agent-npm-7.0.5-94c14d4619-10c0.zip/node_modules/https-proxy-agent/",\ + "packageLocation": "../../../../.yarn/berry/cache/https-proxy-agent-npm-7.0.5-94c14d4619-10c0.zip/node_modules/https-proxy-agent/",\ "packageDependencies": [\ ["https-proxy-agent", "npm:7.0.5"],\ ["agent-base", "npm:7.1.1"],\ @@ -3278,7 +3278,7 @@ const RAW_RUNTIME_STATE = ]],\ ["iconv-lite", [\ ["npm:0.6.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/iconv-lite-npm-0.6.3-24b8aae27e-10c0.zip/node_modules/iconv-lite/",\ + "packageLocation": "../../../../.yarn/berry/cache/iconv-lite-npm-0.6.3-24b8aae27e-10c0.zip/node_modules/iconv-lite/",\ "packageDependencies": [\ ["iconv-lite", "npm:0.6.3"],\ ["safer-buffer", "npm:2.1.2"]\ @@ -3288,7 +3288,7 @@ const RAW_RUNTIME_STATE = ]],\ ["icss-replace-symbols", [\ ["npm:1.1.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/icss-replace-symbols-npm-1.1.0-bc11c612de-10c0.zip/node_modules/icss-replace-symbols/",\ + "packageLocation": "../../../../.yarn/berry/cache/icss-replace-symbols-npm-1.1.0-bc11c612de-10c0.zip/node_modules/icss-replace-symbols/",\ "packageDependencies": [\ ["icss-replace-symbols", "npm:1.1.0"]\ ],\ @@ -3297,14 +3297,14 @@ const RAW_RUNTIME_STATE = ]],\ ["icss-utils", [\ ["npm:5.1.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/icss-utils-npm-5.1.0-8d8c062d07-10c0.zip/node_modules/icss-utils/",\ + "packageLocation": "../../../../.yarn/berry/cache/icss-utils-npm-5.1.0-8d8c062d07-10c0.zip/node_modules/icss-utils/",\ "packageDependencies": [\ ["icss-utils", "npm:5.1.0"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:f5aae85a73b5fd90e1a008c1675ad79266105546d09ff183688909918f428435557b4ddba0b7a1d6898d895da2c36c175eca64d3e8112e2944443a10e77277d4#npm:5.1.0", {\ - "packageLocation": "./.yarn/__virtual__/icss-utils-virtual-333f2e95b9/3/AppData/Local/Yarn/Berry/cache/icss-utils-npm-5.1.0-8d8c062d07-10c0.zip/node_modules/icss-utils/",\ + "packageLocation": "./.yarn/__virtual__/icss-utils-virtual-333f2e95b9/5/.yarn/berry/cache/icss-utils-npm-5.1.0-8d8c062d07-10c0.zip/node_modules/icss-utils/",\ "packageDependencies": [\ ["icss-utils", "virtual:f5aae85a73b5fd90e1a008c1675ad79266105546d09ff183688909918f428435557b4ddba0b7a1d6898d895da2c36c175eca64d3e8112e2944443a10e77277d4#npm:5.1.0"],\ ["@types/postcss", null],\ @@ -3319,7 +3319,7 @@ const RAW_RUNTIME_STATE = ]],\ ["ignore", [\ ["npm:5.3.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/ignore-npm-5.3.2-346d3ba017-10c0.zip/node_modules/ignore/",\ + "packageLocation": "../../../../.yarn/berry/cache/ignore-npm-5.3.2-346d3ba017-10c0.zip/node_modules/ignore/",\ "packageDependencies": [\ ["ignore", "npm:5.3.2"]\ ],\ @@ -3328,7 +3328,7 @@ const RAW_RUNTIME_STATE = ]],\ ["immutable", [\ ["npm:4.3.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/immutable-npm-4.3.7-a76ac3621b-10c0.zip/node_modules/immutable/",\ + "packageLocation": "../../../../.yarn/berry/cache/immutable-npm-4.3.7-a76ac3621b-10c0.zip/node_modules/immutable/",\ "packageDependencies": [\ ["immutable", "npm:4.3.7"]\ ],\ @@ -3337,7 +3337,7 @@ const RAW_RUNTIME_STATE = ]],\ ["import-fresh", [\ ["npm:3.3.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/import-fresh-npm-3.3.0-3e34265ca9-10c0.zip/node_modules/import-fresh/",\ + "packageLocation": "../../../../.yarn/berry/cache/import-fresh-npm-3.3.0-3e34265ca9-10c0.zip/node_modules/import-fresh/",\ "packageDependencies": [\ ["import-fresh", "npm:3.3.0"],\ ["parent-module", "npm:1.0.1"],\ @@ -3348,7 +3348,7 @@ const RAW_RUNTIME_STATE = ]],\ ["imurmurhash", [\ ["npm:0.1.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/imurmurhash-npm-0.1.4-610c5068a0-10c0.zip/node_modules/imurmurhash/",\ + "packageLocation": "../../../../.yarn/berry/cache/imurmurhash-npm-0.1.4-610c5068a0-10c0.zip/node_modules/imurmurhash/",\ "packageDependencies": [\ ["imurmurhash", "npm:0.1.4"]\ ],\ @@ -3357,7 +3357,7 @@ const RAW_RUNTIME_STATE = ]],\ ["indent-string", [\ ["npm:4.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/indent-string-npm-4.0.0-7b717435b2-10c0.zip/node_modules/indent-string/",\ + "packageLocation": "../../../../.yarn/berry/cache/indent-string-npm-4.0.0-7b717435b2-10c0.zip/node_modules/indent-string/",\ "packageDependencies": [\ ["indent-string", "npm:4.0.0"]\ ],\ @@ -3366,7 +3366,7 @@ const RAW_RUNTIME_STATE = ]],\ ["inflight", [\ ["npm:1.0.6", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/inflight-npm-1.0.6-ccedb4b908-10c0.zip/node_modules/inflight/",\ + "packageLocation": "../../../../.yarn/berry/cache/inflight-npm-1.0.6-ccedb4b908-10c0.zip/node_modules/inflight/",\ "packageDependencies": [\ ["inflight", "npm:1.0.6"],\ ["once", "npm:1.4.0"],\ @@ -3377,7 +3377,7 @@ const RAW_RUNTIME_STATE = ]],\ ["inherits", [\ ["npm:2.0.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/inherits-npm-2.0.4-c66b3957a0-10c0.zip/node_modules/inherits/",\ + "packageLocation": "../../../../.yarn/berry/cache/inherits-npm-2.0.4-c66b3957a0-10c0.zip/node_modules/inherits/",\ "packageDependencies": [\ ["inherits", "npm:2.0.4"]\ ],\ @@ -3386,7 +3386,7 @@ const RAW_RUNTIME_STATE = ]],\ ["internal-slot", [\ ["npm:1.0.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/internal-slot-npm-1.0.7-6e3758af00-10c0.zip/node_modules/internal-slot/",\ + "packageLocation": "../../../../.yarn/berry/cache/internal-slot-npm-1.0.7-6e3758af00-10c0.zip/node_modules/internal-slot/",\ "packageDependencies": [\ ["internal-slot", "npm:1.0.7"],\ ["es-errors", "npm:1.3.0"],\ @@ -3398,7 +3398,7 @@ const RAW_RUNTIME_STATE = ]],\ ["ip-address", [\ ["npm:9.0.5", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/ip-address-npm-9.0.5-9fa024d42a-10c0.zip/node_modules/ip-address/",\ + "packageLocation": "../../../../.yarn/berry/cache/ip-address-npm-9.0.5-9fa024d42a-10c0.zip/node_modules/ip-address/",\ "packageDependencies": [\ ["ip-address", "npm:9.0.5"],\ ["jsbn", "npm:1.1.0"],\ @@ -3409,7 +3409,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-array-buffer", [\ ["npm:3.0.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-array-buffer-npm-3.0.4-c1d4ec5b64-10c0.zip/node_modules/is-array-buffer/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-array-buffer-npm-3.0.4-c1d4ec5b64-10c0.zip/node_modules/is-array-buffer/",\ "packageDependencies": [\ ["is-array-buffer", "npm:3.0.4"],\ ["call-bind", "npm:1.0.7"],\ @@ -3420,7 +3420,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-async-function", [\ ["npm:2.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-async-function-npm-2.0.0-ebf8596ab1-10c0.zip/node_modules/is-async-function/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-async-function-npm-2.0.0-ebf8596ab1-10c0.zip/node_modules/is-async-function/",\ "packageDependencies": [\ ["is-async-function", "npm:2.0.0"],\ ["has-tostringtag", "npm:1.0.2"]\ @@ -3430,7 +3430,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-bigint", [\ ["npm:1.0.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-bigint-npm-1.0.4-31c2eecbc9-10c0.zip/node_modules/is-bigint/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-bigint-npm-1.0.4-31c2eecbc9-10c0.zip/node_modules/is-bigint/",\ "packageDependencies": [\ ["is-bigint", "npm:1.0.4"],\ ["has-bigints", "npm:1.0.2"]\ @@ -3440,7 +3440,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-boolean-object", [\ ["npm:1.1.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-boolean-object-npm-1.1.2-ecbd575e6a-10c0.zip/node_modules/is-boolean-object/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-boolean-object-npm-1.1.2-ecbd575e6a-10c0.zip/node_modules/is-boolean-object/",\ "packageDependencies": [\ ["is-boolean-object", "npm:1.1.2"],\ ["call-bind", "npm:1.0.7"],\ @@ -3451,7 +3451,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-callable", [\ ["npm:1.2.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-callable-npm-1.2.7-808a303e61-10c0.zip/node_modules/is-callable/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-callable-npm-1.2.7-808a303e61-10c0.zip/node_modules/is-callable/",\ "packageDependencies": [\ ["is-callable", "npm:1.2.7"]\ ],\ @@ -3460,7 +3460,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-core-module", [\ ["npm:2.15.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-core-module-npm-2.15.1-34c73a6cbd-10c0.zip/node_modules/is-core-module/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-core-module-npm-2.15.1-34c73a6cbd-10c0.zip/node_modules/is-core-module/",\ "packageDependencies": [\ ["is-core-module", "npm:2.15.1"],\ ["hasown", "npm:2.0.2"]\ @@ -3470,7 +3470,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-data-view", [\ ["npm:1.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-data-view-npm-1.0.1-d6136250e8-10c0.zip/node_modules/is-data-view/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-data-view-npm-1.0.1-d6136250e8-10c0.zip/node_modules/is-data-view/",\ "packageDependencies": [\ ["is-data-view", "npm:1.0.1"],\ ["is-typed-array", "npm:1.1.13"]\ @@ -3480,7 +3480,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-date-object", [\ ["npm:1.0.5", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-date-object-npm-1.0.5-88f3d08b5e-10c0.zip/node_modules/is-date-object/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-date-object-npm-1.0.5-88f3d08b5e-10c0.zip/node_modules/is-date-object/",\ "packageDependencies": [\ ["is-date-object", "npm:1.0.5"],\ ["has-tostringtag", "npm:1.0.2"]\ @@ -3490,7 +3490,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-extglob", [\ ["npm:2.1.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-extglob-npm-2.1.1-0870ea68b5-10c0.zip/node_modules/is-extglob/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-extglob-npm-2.1.1-0870ea68b5-10c0.zip/node_modules/is-extglob/",\ "packageDependencies": [\ ["is-extglob", "npm:2.1.1"]\ ],\ @@ -3499,7 +3499,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-finalizationregistry", [\ ["npm:1.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-finalizationregistry-npm-1.0.2-15bf1bd7ce-10c0.zip/node_modules/is-finalizationregistry/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-finalizationregistry-npm-1.0.2-15bf1bd7ce-10c0.zip/node_modules/is-finalizationregistry/",\ "packageDependencies": [\ ["is-finalizationregistry", "npm:1.0.2"],\ ["call-bind", "npm:1.0.7"]\ @@ -3509,7 +3509,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-fullwidth-code-point", [\ ["npm:3.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-fullwidth-code-point-npm-3.0.0-1ecf4ebee5-10c0.zip/node_modules/is-fullwidth-code-point/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-fullwidth-code-point-npm-3.0.0-1ecf4ebee5-10c0.zip/node_modules/is-fullwidth-code-point/",\ "packageDependencies": [\ ["is-fullwidth-code-point", "npm:3.0.0"]\ ],\ @@ -3518,7 +3518,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-generator-function", [\ ["npm:1.0.10", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-generator-function-npm-1.0.10-1d0f3809ef-10c0.zip/node_modules/is-generator-function/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-generator-function-npm-1.0.10-1d0f3809ef-10c0.zip/node_modules/is-generator-function/",\ "packageDependencies": [\ ["is-generator-function", "npm:1.0.10"],\ ["has-tostringtag", "npm:1.0.2"]\ @@ -3528,7 +3528,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-glob", [\ ["npm:4.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-glob-npm-4.0.3-cb87bf1bdb-10c0.zip/node_modules/is-glob/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-glob-npm-4.0.3-cb87bf1bdb-10c0.zip/node_modules/is-glob/",\ "packageDependencies": [\ ["is-glob", "npm:4.0.3"],\ ["is-extglob", "npm:2.1.1"]\ @@ -3538,7 +3538,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-lambda", [\ ["npm:1.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-lambda-npm-1.0.1-7ab55bc8a8-10c0.zip/node_modules/is-lambda/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-lambda-npm-1.0.1-7ab55bc8a8-10c0.zip/node_modules/is-lambda/",\ "packageDependencies": [\ ["is-lambda", "npm:1.0.1"]\ ],\ @@ -3547,7 +3547,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-map", [\ ["npm:2.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-map-npm-2.0.3-9e061e76e3-10c0.zip/node_modules/is-map/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-map-npm-2.0.3-9e061e76e3-10c0.zip/node_modules/is-map/",\ "packageDependencies": [\ ["is-map", "npm:2.0.3"]\ ],\ @@ -3556,7 +3556,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-negative-zero", [\ ["npm:2.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-negative-zero-npm-2.0.3-d06b09e322-10c0.zip/node_modules/is-negative-zero/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-negative-zero-npm-2.0.3-d06b09e322-10c0.zip/node_modules/is-negative-zero/",\ "packageDependencies": [\ ["is-negative-zero", "npm:2.0.3"]\ ],\ @@ -3565,7 +3565,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-number", [\ ["npm:7.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-number-npm-7.0.0-060086935c-10c0.zip/node_modules/is-number/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-number-npm-7.0.0-060086935c-10c0.zip/node_modules/is-number/",\ "packageDependencies": [\ ["is-number", "npm:7.0.0"]\ ],\ @@ -3574,7 +3574,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-number-object", [\ ["npm:1.0.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-number-object-npm-1.0.7-539d0e274d-10c0.zip/node_modules/is-number-object/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-number-object-npm-1.0.7-539d0e274d-10c0.zip/node_modules/is-number-object/",\ "packageDependencies": [\ ["is-number-object", "npm:1.0.7"],\ ["has-tostringtag", "npm:1.0.2"]\ @@ -3584,7 +3584,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-path-inside", [\ ["npm:3.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-path-inside-npm-3.0.3-2ea0ef44fd-10c0.zip/node_modules/is-path-inside/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-path-inside-npm-3.0.3-2ea0ef44fd-10c0.zip/node_modules/is-path-inside/",\ "packageDependencies": [\ ["is-path-inside", "npm:3.0.3"]\ ],\ @@ -3593,7 +3593,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-regex", [\ ["npm:1.1.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-regex-npm-1.1.4-cca193ef11-10c0.zip/node_modules/is-regex/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-regex-npm-1.1.4-cca193ef11-10c0.zip/node_modules/is-regex/",\ "packageDependencies": [\ ["is-regex", "npm:1.1.4"],\ ["call-bind", "npm:1.0.7"],\ @@ -3604,7 +3604,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-set", [\ ["npm:2.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-set-npm-2.0.3-1b72c9a855-10c0.zip/node_modules/is-set/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-set-npm-2.0.3-1b72c9a855-10c0.zip/node_modules/is-set/",\ "packageDependencies": [\ ["is-set", "npm:2.0.3"]\ ],\ @@ -3613,7 +3613,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-shared-array-buffer", [\ ["npm:1.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-shared-array-buffer-npm-1.0.3-3b3b3142a6-10c0.zip/node_modules/is-shared-array-buffer/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-shared-array-buffer-npm-1.0.3-3b3b3142a6-10c0.zip/node_modules/is-shared-array-buffer/",\ "packageDependencies": [\ ["is-shared-array-buffer", "npm:1.0.3"],\ ["call-bind", "npm:1.0.7"]\ @@ -3623,7 +3623,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-string", [\ ["npm:1.0.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-string-npm-1.0.7-9f7066daed-10c0.zip/node_modules/is-string/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-string-npm-1.0.7-9f7066daed-10c0.zip/node_modules/is-string/",\ "packageDependencies": [\ ["is-string", "npm:1.0.7"],\ ["has-tostringtag", "npm:1.0.2"]\ @@ -3633,7 +3633,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-symbol", [\ ["npm:1.0.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-symbol-npm-1.0.4-eb9baac703-10c0.zip/node_modules/is-symbol/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-symbol-npm-1.0.4-eb9baac703-10c0.zip/node_modules/is-symbol/",\ "packageDependencies": [\ ["is-symbol", "npm:1.0.4"],\ ["has-symbols", "npm:1.0.3"]\ @@ -3643,7 +3643,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-typed-array", [\ ["npm:1.1.13", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-typed-array-npm-1.1.13-0dce6ee7c2-10c0.zip/node_modules/is-typed-array/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-typed-array-npm-1.1.13-0dce6ee7c2-10c0.zip/node_modules/is-typed-array/",\ "packageDependencies": [\ ["is-typed-array", "npm:1.1.13"],\ ["which-typed-array", "npm:1.1.15"]\ @@ -3653,7 +3653,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-weakmap", [\ ["npm:2.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-weakmap-npm-2.0.2-ced3cab2dc-10c0.zip/node_modules/is-weakmap/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-weakmap-npm-2.0.2-ced3cab2dc-10c0.zip/node_modules/is-weakmap/",\ "packageDependencies": [\ ["is-weakmap", "npm:2.0.2"]\ ],\ @@ -3662,7 +3662,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-weakref", [\ ["npm:1.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-weakref-npm-1.0.2-ff80e8c314-10c0.zip/node_modules/is-weakref/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-weakref-npm-1.0.2-ff80e8c314-10c0.zip/node_modules/is-weakref/",\ "packageDependencies": [\ ["is-weakref", "npm:1.0.2"],\ ["call-bind", "npm:1.0.7"]\ @@ -3672,7 +3672,7 @@ const RAW_RUNTIME_STATE = ]],\ ["is-weakset", [\ ["npm:2.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/is-weakset-npm-2.0.3-f7d282c9c1-10c0.zip/node_modules/is-weakset/",\ + "packageLocation": "../../../../.yarn/berry/cache/is-weakset-npm-2.0.3-f7d282c9c1-10c0.zip/node_modules/is-weakset/",\ "packageDependencies": [\ ["is-weakset", "npm:2.0.3"],\ ["call-bind", "npm:1.0.7"],\ @@ -3683,7 +3683,7 @@ const RAW_RUNTIME_STATE = ]],\ ["isarray", [\ ["npm:2.0.5", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/isarray-npm-2.0.5-4ba522212d-10c0.zip/node_modules/isarray/",\ + "packageLocation": "../../../../.yarn/berry/cache/isarray-npm-2.0.5-4ba522212d-10c0.zip/node_modules/isarray/",\ "packageDependencies": [\ ["isarray", "npm:2.0.5"]\ ],\ @@ -3692,14 +3692,14 @@ const RAW_RUNTIME_STATE = ]],\ ["isexe", [\ ["npm:2.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/isexe-npm-2.0.0-b58870bd2e-10c0.zip/node_modules/isexe/",\ + "packageLocation": "../../../../.yarn/berry/cache/isexe-npm-2.0.0-b58870bd2e-10c0.zip/node_modules/isexe/",\ "packageDependencies": [\ ["isexe", "npm:2.0.0"]\ ],\ "linkType": "HARD"\ }],\ ["npm:3.1.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/isexe-npm-3.1.1-9c0061eead-10c0.zip/node_modules/isexe/",\ + "packageLocation": "../../../../.yarn/berry/cache/isexe-npm-3.1.1-9c0061eead-10c0.zip/node_modules/isexe/",\ "packageDependencies": [\ ["isexe", "npm:3.1.1"]\ ],\ @@ -3708,7 +3708,7 @@ const RAW_RUNTIME_STATE = ]],\ ["iterator.prototype", [\ ["npm:1.1.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/iterator.prototype-npm-1.1.3-2bcc06f3f8-10c0.zip/node_modules/iterator.prototype/",\ + "packageLocation": "../../../../.yarn/berry/cache/iterator.prototype-npm-1.1.3-2bcc06f3f8-10c0.zip/node_modules/iterator.prototype/",\ "packageDependencies": [\ ["iterator.prototype", "npm:1.1.3"],\ ["define-properties", "npm:1.2.1"],\ @@ -3722,7 +3722,7 @@ const RAW_RUNTIME_STATE = ]],\ ["jackspeak", [\ ["npm:3.4.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/jackspeak-npm-3.4.3-546bfad080-10c0.zip/node_modules/jackspeak/",\ + "packageLocation": "../../../../.yarn/berry/cache/jackspeak-npm-3.4.3-546bfad080-10c0.zip/node_modules/jackspeak/",\ "packageDependencies": [\ ["jackspeak", "npm:3.4.3"],\ ["@isaacs/cliui", "npm:8.0.2"],\ @@ -3733,7 +3733,7 @@ const RAW_RUNTIME_STATE = ]],\ ["js-tokens", [\ ["npm:4.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/js-tokens-npm-4.0.0-0ac852e9e2-10c0.zip/node_modules/js-tokens/",\ + "packageLocation": "../../../../.yarn/berry/cache/js-tokens-npm-4.0.0-0ac852e9e2-10c0.zip/node_modules/js-tokens/",\ "packageDependencies": [\ ["js-tokens", "npm:4.0.0"]\ ],\ @@ -3742,7 +3742,7 @@ const RAW_RUNTIME_STATE = ]],\ ["js-yaml", [\ ["npm:4.1.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/js-yaml-npm-4.1.0-3606f32312-10c0.zip/node_modules/js-yaml/",\ + "packageLocation": "../../../../.yarn/berry/cache/js-yaml-npm-4.1.0-3606f32312-10c0.zip/node_modules/js-yaml/",\ "packageDependencies": [\ ["js-yaml", "npm:4.1.0"],\ ["argparse", "npm:2.0.1"]\ @@ -3752,7 +3752,7 @@ const RAW_RUNTIME_STATE = ]],\ ["jsbn", [\ ["npm:1.1.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/jsbn-npm-1.1.0-1da0181838-10c0.zip/node_modules/jsbn/",\ + "packageLocation": "../../../../.yarn/berry/cache/jsbn-npm-1.1.0-1da0181838-10c0.zip/node_modules/jsbn/",\ "packageDependencies": [\ ["jsbn", "npm:1.1.0"]\ ],\ @@ -3761,7 +3761,7 @@ const RAW_RUNTIME_STATE = ]],\ ["jsesc", [\ ["npm:3.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/jsesc-npm-3.0.2-3b3b74ec0d-10c0.zip/node_modules/jsesc/",\ + "packageLocation": "../../../../.yarn/berry/cache/jsesc-npm-3.0.2-3b3b74ec0d-10c0.zip/node_modules/jsesc/",\ "packageDependencies": [\ ["jsesc", "npm:3.0.2"]\ ],\ @@ -3770,7 +3770,7 @@ const RAW_RUNTIME_STATE = ]],\ ["json-buffer", [\ ["npm:3.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/json-buffer-npm-3.0.1-f8f6d20603-10c0.zip/node_modules/json-buffer/",\ + "packageLocation": "../../../../.yarn/berry/cache/json-buffer-npm-3.0.1-f8f6d20603-10c0.zip/node_modules/json-buffer/",\ "packageDependencies": [\ ["json-buffer", "npm:3.0.1"]\ ],\ @@ -3779,7 +3779,7 @@ const RAW_RUNTIME_STATE = ]],\ ["json-schema-traverse", [\ ["npm:0.4.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/json-schema-traverse-npm-0.4.1-4759091693-10c0.zip/node_modules/json-schema-traverse/",\ + "packageLocation": "../../../../.yarn/berry/cache/json-schema-traverse-npm-0.4.1-4759091693-10c0.zip/node_modules/json-schema-traverse/",\ "packageDependencies": [\ ["json-schema-traverse", "npm:0.4.1"]\ ],\ @@ -3788,7 +3788,7 @@ const RAW_RUNTIME_STATE = ]],\ ["json-stable-stringify-without-jsonify", [\ ["npm:1.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/json-stable-stringify-without-jsonify-npm-1.0.1-b65772b28b-10c0.zip/node_modules/json-stable-stringify-without-jsonify/",\ + "packageLocation": "../../../../.yarn/berry/cache/json-stable-stringify-without-jsonify-npm-1.0.1-b65772b28b-10c0.zip/node_modules/json-stable-stringify-without-jsonify/",\ "packageDependencies": [\ ["json-stable-stringify-without-jsonify", "npm:1.0.1"]\ ],\ @@ -3797,7 +3797,7 @@ const RAW_RUNTIME_STATE = ]],\ ["json5", [\ ["npm:2.2.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/json5-npm-2.2.3-9962c55073-10c0.zip/node_modules/json5/",\ + "packageLocation": "../../../../.yarn/berry/cache/json5-npm-2.2.3-9962c55073-10c0.zip/node_modules/json5/",\ "packageDependencies": [\ ["json5", "npm:2.2.3"]\ ],\ @@ -3806,7 +3806,7 @@ const RAW_RUNTIME_STATE = ]],\ ["jsx-ast-utils", [\ ["npm:3.3.5", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/jsx-ast-utils-npm-3.3.5-114c80f97a-10c0.zip/node_modules/jsx-ast-utils/",\ + "packageLocation": "../../../../.yarn/berry/cache/jsx-ast-utils-npm-3.3.5-114c80f97a-10c0.zip/node_modules/jsx-ast-utils/",\ "packageDependencies": [\ ["jsx-ast-utils", "npm:3.3.5"],\ ["array-includes", "npm:3.1.8"],\ @@ -3819,7 +3819,7 @@ const RAW_RUNTIME_STATE = ]],\ ["keyv", [\ ["npm:4.5.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/keyv-npm-4.5.4-4c8e2cf7f7-10c0.zip/node_modules/keyv/",\ + "packageLocation": "../../../../.yarn/berry/cache/keyv-npm-4.5.4-4c8e2cf7f7-10c0.zip/node_modules/keyv/",\ "packageDependencies": [\ ["keyv", "npm:4.5.4"],\ ["json-buffer", "npm:3.0.1"]\ @@ -3829,7 +3829,7 @@ const RAW_RUNTIME_STATE = ]],\ ["levn", [\ ["npm:0.4.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/levn-npm-0.4.1-d183b2d7bb-10c0.zip/node_modules/levn/",\ + "packageLocation": "../../../../.yarn/berry/cache/levn-npm-0.4.1-d183b2d7bb-10c0.zip/node_modules/levn/",\ "packageDependencies": [\ ["levn", "npm:0.4.1"],\ ["prelude-ls", "npm:1.2.1"],\ @@ -3840,7 +3840,7 @@ const RAW_RUNTIME_STATE = ]],\ ["load-script", [\ ["npm:1.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/load-script-npm-1.0.0-32a3163a57-10c0.zip/node_modules/load-script/",\ + "packageLocation": "../../../../.yarn/berry/cache/load-script-npm-1.0.0-32a3163a57-10c0.zip/node_modules/load-script/",\ "packageDependencies": [\ ["load-script", "npm:1.0.0"]\ ],\ @@ -3849,7 +3849,7 @@ const RAW_RUNTIME_STATE = ]],\ ["loader-utils", [\ ["npm:3.3.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/loader-utils-npm-3.3.1-eed38ce75b-10c0.zip/node_modules/loader-utils/",\ + "packageLocation": "../../../../.yarn/berry/cache/loader-utils-npm-3.3.1-eed38ce75b-10c0.zip/node_modules/loader-utils/",\ "packageDependencies": [\ ["loader-utils", "npm:3.3.1"]\ ],\ @@ -3858,7 +3858,7 @@ const RAW_RUNTIME_STATE = ]],\ ["locate-path", [\ ["npm:6.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/locate-path-npm-6.0.0-06a1e4c528-10c0.zip/node_modules/locate-path/",\ + "packageLocation": "../../../../.yarn/berry/cache/locate-path-npm-6.0.0-06a1e4c528-10c0.zip/node_modules/locate-path/",\ "packageDependencies": [\ ["locate-path", "npm:6.0.0"],\ ["p-locate", "npm:5.0.0"]\ @@ -3868,7 +3868,7 @@ const RAW_RUNTIME_STATE = ]],\ ["lodash.camelcase", [\ ["npm:4.3.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/lodash.camelcase-npm-4.3.0-bf268e3bf0-10c0.zip/node_modules/lodash.camelcase/",\ + "packageLocation": "../../../../.yarn/berry/cache/lodash.camelcase-npm-4.3.0-bf268e3bf0-10c0.zip/node_modules/lodash.camelcase/",\ "packageDependencies": [\ ["lodash.camelcase", "npm:4.3.0"]\ ],\ @@ -3877,7 +3877,7 @@ const RAW_RUNTIME_STATE = ]],\ ["lodash.merge", [\ ["npm:4.6.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/lodash.merge-npm-4.6.2-77cb4416bf-10c0.zip/node_modules/lodash.merge/",\ + "packageLocation": "../../../../.yarn/berry/cache/lodash.merge-npm-4.6.2-77cb4416bf-10c0.zip/node_modules/lodash.merge/",\ "packageDependencies": [\ ["lodash.merge", "npm:4.6.2"]\ ],\ @@ -3886,7 +3886,7 @@ const RAW_RUNTIME_STATE = ]],\ ["loose-envify", [\ ["npm:1.4.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/loose-envify-npm-1.4.0-6307b72ccf-10c0.zip/node_modules/loose-envify/",\ + "packageLocation": "../../../../.yarn/berry/cache/loose-envify-npm-1.4.0-6307b72ccf-10c0.zip/node_modules/loose-envify/",\ "packageDependencies": [\ ["loose-envify", "npm:1.4.0"],\ ["js-tokens", "npm:4.0.0"]\ @@ -3896,14 +3896,14 @@ const RAW_RUNTIME_STATE = ]],\ ["lru-cache", [\ ["npm:10.4.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/lru-cache-npm-10.4.3-30c10b861a-10c0.zip/node_modules/lru-cache/",\ + "packageLocation": "../../../../.yarn/berry/cache/lru-cache-npm-10.4.3-30c10b861a-10c0.zip/node_modules/lru-cache/",\ "packageDependencies": [\ ["lru-cache", "npm:10.4.3"]\ ],\ "linkType": "HARD"\ }],\ ["npm:5.1.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/lru-cache-npm-5.1.1-f475882a51-10c0.zip/node_modules/lru-cache/",\ + "packageLocation": "../../../../.yarn/berry/cache/lru-cache-npm-5.1.1-f475882a51-10c0.zip/node_modules/lru-cache/",\ "packageDependencies": [\ ["lru-cache", "npm:5.1.1"],\ ["yallist", "npm:3.1.1"]\ @@ -3913,14 +3913,14 @@ const RAW_RUNTIME_STATE = ]],\ ["lucide-react", [\ ["npm:0.447.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/lucide-react-npm-0.447.0-3b33a909f1-10c0.zip/node_modules/lucide-react/",\ + "packageLocation": "../../../../.yarn/berry/cache/lucide-react-npm-0.447.0-3b33a909f1-10c0.zip/node_modules/lucide-react/",\ "packageDependencies": [\ ["lucide-react", "npm:0.447.0"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:7ff15405ea2a649bedb31b53eb450b593e17c2290ffe01050ae1173d21896ac6c71075320c9f785857328929ff5965843d133b83cfa1c0dfdbb3e8f91e535cc1#npm:0.447.0", {\ - "packageLocation": "./.yarn/__virtual__/lucide-react-virtual-41c836719d/3/AppData/Local/Yarn/Berry/cache/lucide-react-npm-0.447.0-3b33a909f1-10c0.zip/node_modules/lucide-react/",\ + "packageLocation": "./.yarn/__virtual__/lucide-react-virtual-41c836719d/5/.yarn/berry/cache/lucide-react-npm-0.447.0-3b33a909f1-10c0.zip/node_modules/lucide-react/",\ "packageDependencies": [\ ["lucide-react", "virtual:7ff15405ea2a649bedb31b53eb450b593e17c2290ffe01050ae1173d21896ac6c71075320c9f785857328929ff5965843d133b83cfa1c0dfdbb3e8f91e535cc1#npm:0.447.0"],\ ["@types/react", "npm:18.3.3"],\ @@ -3935,7 +3935,7 @@ const RAW_RUNTIME_STATE = ]],\ ["make-fetch-happen", [\ ["npm:13.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/make-fetch-happen-npm-13.0.1-4180f2aaa8-10c0.zip/node_modules/make-fetch-happen/",\ + "packageLocation": "../../../../.yarn/berry/cache/make-fetch-happen-npm-13.0.1-4180f2aaa8-10c0.zip/node_modules/make-fetch-happen/",\ "packageDependencies": [\ ["make-fetch-happen", "npm:13.0.1"],\ ["@npmcli/agent", "npm:2.2.2"],\ @@ -3956,7 +3956,7 @@ const RAW_RUNTIME_STATE = ]],\ ["memoize-one", [\ ["npm:5.2.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/memoize-one-npm-5.2.1-ee0f8be979-10c0.zip/node_modules/memoize-one/",\ + "packageLocation": "../../../../.yarn/berry/cache/memoize-one-npm-5.2.1-ee0f8be979-10c0.zip/node_modules/memoize-one/",\ "packageDependencies": [\ ["memoize-one", "npm:5.2.1"]\ ],\ @@ -3965,7 +3965,7 @@ const RAW_RUNTIME_STATE = ]],\ ["merge2", [\ ["npm:1.4.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/merge2-npm-1.4.1-a2507bd06c-10c0.zip/node_modules/merge2/",\ + "packageLocation": "../../../../.yarn/berry/cache/merge2-npm-1.4.1-a2507bd06c-10c0.zip/node_modules/merge2/",\ "packageDependencies": [\ ["merge2", "npm:1.4.1"]\ ],\ @@ -3974,7 +3974,7 @@ const RAW_RUNTIME_STATE = ]],\ ["micromatch", [\ ["npm:4.0.8", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/micromatch-npm-4.0.8-c9570e4aca-10c0.zip/node_modules/micromatch/",\ + "packageLocation": "../../../../.yarn/berry/cache/micromatch-npm-4.0.8-c9570e4aca-10c0.zip/node_modules/micromatch/",\ "packageDependencies": [\ ["micromatch", "npm:4.0.8"],\ ["braces", "npm:3.0.3"],\ @@ -3985,7 +3985,7 @@ const RAW_RUNTIME_STATE = ]],\ ["minimatch", [\ ["npm:3.1.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/minimatch-npm-3.1.2-9405269906-10c0.zip/node_modules/minimatch/",\ + "packageLocation": "../../../../.yarn/berry/cache/minimatch-npm-3.1.2-9405269906-10c0.zip/node_modules/minimatch/",\ "packageDependencies": [\ ["minimatch", "npm:3.1.2"],\ ["brace-expansion", "npm:1.1.11"]\ @@ -3993,7 +3993,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["npm:9.0.5", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/minimatch-npm-9.0.5-9aa93d97fa-10c0.zip/node_modules/minimatch/",\ + "packageLocation": "../../../../.yarn/berry/cache/minimatch-npm-9.0.5-9aa93d97fa-10c0.zip/node_modules/minimatch/",\ "packageDependencies": [\ ["minimatch", "npm:9.0.5"],\ ["brace-expansion", "npm:2.0.1"]\ @@ -4003,7 +4003,7 @@ const RAW_RUNTIME_STATE = ]],\ ["minipass", [\ ["npm:3.3.6", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/minipass-npm-3.3.6-b8d93a945b-10c0.zip/node_modules/minipass/",\ + "packageLocation": "../../../../.yarn/berry/cache/minipass-npm-3.3.6-b8d93a945b-10c0.zip/node_modules/minipass/",\ "packageDependencies": [\ ["minipass", "npm:3.3.6"],\ ["yallist", "npm:4.0.0"]\ @@ -4011,14 +4011,14 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["npm:5.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/minipass-npm-5.0.0-c64fb63c92-10c0.zip/node_modules/minipass/",\ + "packageLocation": "../../../../.yarn/berry/cache/minipass-npm-5.0.0-c64fb63c92-10c0.zip/node_modules/minipass/",\ "packageDependencies": [\ ["minipass", "npm:5.0.0"]\ ],\ "linkType": "HARD"\ }],\ ["npm:7.1.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/minipass-npm-7.1.2-3a5327d36d-10c0.zip/node_modules/minipass/",\ + "packageLocation": "../../../../.yarn/berry/cache/minipass-npm-7.1.2-3a5327d36d-10c0.zip/node_modules/minipass/",\ "packageDependencies": [\ ["minipass", "npm:7.1.2"]\ ],\ @@ -4027,7 +4027,7 @@ const RAW_RUNTIME_STATE = ]],\ ["minipass-collect", [\ ["npm:2.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/minipass-collect-npm-2.0.1-73d3907e40-10c0.zip/node_modules/minipass-collect/",\ + "packageLocation": "../../../../.yarn/berry/cache/minipass-collect-npm-2.0.1-73d3907e40-10c0.zip/node_modules/minipass-collect/",\ "packageDependencies": [\ ["minipass-collect", "npm:2.0.1"],\ ["minipass", "npm:7.1.2"]\ @@ -4037,7 +4037,7 @@ const RAW_RUNTIME_STATE = ]],\ ["minipass-fetch", [\ ["npm:3.0.5", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/minipass-fetch-npm-3.0.5-ed78529694-10c0.zip/node_modules/minipass-fetch/",\ + "packageLocation": "../../../../.yarn/berry/cache/minipass-fetch-npm-3.0.5-ed78529694-10c0.zip/node_modules/minipass-fetch/",\ "packageDependencies": [\ ["minipass-fetch", "npm:3.0.5"],\ ["encoding", "npm:0.1.13"],\ @@ -4050,7 +4050,7 @@ const RAW_RUNTIME_STATE = ]],\ ["minipass-flush", [\ ["npm:1.0.5", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/minipass-flush-npm-1.0.5-efe79d9826-10c0.zip/node_modules/minipass-flush/",\ + "packageLocation": "../../../../.yarn/berry/cache/minipass-flush-npm-1.0.5-efe79d9826-10c0.zip/node_modules/minipass-flush/",\ "packageDependencies": [\ ["minipass-flush", "npm:1.0.5"],\ ["minipass", "npm:3.3.6"]\ @@ -4060,7 +4060,7 @@ const RAW_RUNTIME_STATE = ]],\ ["minipass-pipeline", [\ ["npm:1.2.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/minipass-pipeline-npm-1.2.4-5924cb077f-10c0.zip/node_modules/minipass-pipeline/",\ + "packageLocation": "../../../../.yarn/berry/cache/minipass-pipeline-npm-1.2.4-5924cb077f-10c0.zip/node_modules/minipass-pipeline/",\ "packageDependencies": [\ ["minipass-pipeline", "npm:1.2.4"],\ ["minipass", "npm:3.3.6"]\ @@ -4070,7 +4070,7 @@ const RAW_RUNTIME_STATE = ]],\ ["minipass-sized", [\ ["npm:1.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/minipass-sized-npm-1.0.3-306d86f432-10c0.zip/node_modules/minipass-sized/",\ + "packageLocation": "../../../../.yarn/berry/cache/minipass-sized-npm-1.0.3-306d86f432-10c0.zip/node_modules/minipass-sized/",\ "packageDependencies": [\ ["minipass-sized", "npm:1.0.3"],\ ["minipass", "npm:3.3.6"]\ @@ -4080,7 +4080,7 @@ const RAW_RUNTIME_STATE = ]],\ ["minizlib", [\ ["npm:2.1.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/minizlib-npm-2.1.2-ea89cd0cfb-10c0.zip/node_modules/minizlib/",\ + "packageLocation": "../../../../.yarn/berry/cache/minizlib-npm-2.1.2-ea89cd0cfb-10c0.zip/node_modules/minizlib/",\ "packageDependencies": [\ ["minizlib", "npm:2.1.2"],\ ["minipass", "npm:3.3.6"],\ @@ -4091,7 +4091,7 @@ const RAW_RUNTIME_STATE = ]],\ ["mkdirp", [\ ["npm:1.0.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/mkdirp-npm-1.0.4-37f6ef56b9-10c0.zip/node_modules/mkdirp/",\ + "packageLocation": "../../../../.yarn/berry/cache/mkdirp-npm-1.0.4-37f6ef56b9-10c0.zip/node_modules/mkdirp/",\ "packageDependencies": [\ ["mkdirp", "npm:1.0.4"]\ ],\ @@ -4100,7 +4100,7 @@ const RAW_RUNTIME_STATE = ]],\ ["ms", [\ ["npm:2.1.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/ms-npm-2.1.3-81ff3cfac1-10c0.zip/node_modules/ms/",\ + "packageLocation": "../../../../.yarn/berry/cache/ms-npm-2.1.3-81ff3cfac1-10c0.zip/node_modules/ms/",\ "packageDependencies": [\ ["ms", "npm:2.1.3"]\ ],\ @@ -4109,7 +4109,7 @@ const RAW_RUNTIME_STATE = ]],\ ["nanoid", [\ ["npm:3.3.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/nanoid-npm-3.3.7-98824ba130-10c0.zip/node_modules/nanoid/",\ + "packageLocation": "../../../../.yarn/berry/cache/nanoid-npm-3.3.7-98824ba130-10c0.zip/node_modules/nanoid/",\ "packageDependencies": [\ ["nanoid", "npm:3.3.7"]\ ],\ @@ -4118,7 +4118,7 @@ const RAW_RUNTIME_STATE = ]],\ ["natural-compare", [\ ["npm:1.4.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/natural-compare-npm-1.4.0-97b75b362d-10c0.zip/node_modules/natural-compare/",\ + "packageLocation": "../../../../.yarn/berry/cache/natural-compare-npm-1.4.0-97b75b362d-10c0.zip/node_modules/natural-compare/",\ "packageDependencies": [\ ["natural-compare", "npm:1.4.0"]\ ],\ @@ -4127,7 +4127,7 @@ const RAW_RUNTIME_STATE = ]],\ ["negotiator", [\ ["npm:0.6.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/negotiator-npm-0.6.3-9d50e36171-10c0.zip/node_modules/negotiator/",\ + "packageLocation": "../../../../.yarn/berry/cache/negotiator-npm-0.6.3-9d50e36171-10c0.zip/node_modules/negotiator/",\ "packageDependencies": [\ ["negotiator", "npm:0.6.3"]\ ],\ @@ -4165,7 +4165,7 @@ const RAW_RUNTIME_STATE = ]],\ ["node-releases", [\ ["npm:2.0.18", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/node-releases-npm-2.0.18-51abc46668-10c0.zip/node_modules/node-releases/",\ + "packageLocation": "../../../../.yarn/berry/cache/node-releases-npm-2.0.18-51abc46668-10c0.zip/node_modules/node-releases/",\ "packageDependencies": [\ ["node-releases", "npm:2.0.18"]\ ],\ @@ -4174,7 +4174,7 @@ const RAW_RUNTIME_STATE = ]],\ ["nopt", [\ ["npm:7.2.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/nopt-npm-7.2.1-635b7da949-10c0.zip/node_modules/nopt/",\ + "packageLocation": "../../../../.yarn/berry/cache/nopt-npm-7.2.1-635b7da949-10c0.zip/node_modules/nopt/",\ "packageDependencies": [\ ["nopt", "npm:7.2.1"],\ ["abbrev", "npm:2.0.0"]\ @@ -4184,7 +4184,7 @@ const RAW_RUNTIME_STATE = ]],\ ["object-assign", [\ ["npm:4.1.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/object-assign-npm-4.1.1-1004ad6dec-10c0.zip/node_modules/object-assign/",\ + "packageLocation": "../../../../.yarn/berry/cache/object-assign-npm-4.1.1-1004ad6dec-10c0.zip/node_modules/object-assign/",\ "packageDependencies": [\ ["object-assign", "npm:4.1.1"]\ ],\ @@ -4193,7 +4193,7 @@ const RAW_RUNTIME_STATE = ]],\ ["object-inspect", [\ ["npm:1.13.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/object-inspect-npm-1.13.2-3c6e11a536-10c0.zip/node_modules/object-inspect/",\ + "packageLocation": "../../../../.yarn/berry/cache/object-inspect-npm-1.13.2-3c6e11a536-10c0.zip/node_modules/object-inspect/",\ "packageDependencies": [\ ["object-inspect", "npm:1.13.2"]\ ],\ @@ -4202,7 +4202,7 @@ const RAW_RUNTIME_STATE = ]],\ ["object-keys", [\ ["npm:1.1.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/object-keys-npm-1.1.1-1bf2f1be93-10c0.zip/node_modules/object-keys/",\ + "packageLocation": "../../../../.yarn/berry/cache/object-keys-npm-1.1.1-1bf2f1be93-10c0.zip/node_modules/object-keys/",\ "packageDependencies": [\ ["object-keys", "npm:1.1.1"]\ ],\ @@ -4211,7 +4211,7 @@ const RAW_RUNTIME_STATE = ]],\ ["object.assign", [\ ["npm:4.1.5", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/object.assign-npm-4.1.5-aa3b2260ba-10c0.zip/node_modules/object.assign/",\ + "packageLocation": "../../../../.yarn/berry/cache/object.assign-npm-4.1.5-aa3b2260ba-10c0.zip/node_modules/object.assign/",\ "packageDependencies": [\ ["object.assign", "npm:4.1.5"],\ ["call-bind", "npm:1.0.7"],\ @@ -4224,7 +4224,7 @@ const RAW_RUNTIME_STATE = ]],\ ["object.entries", [\ ["npm:1.1.8", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/object.entries-npm-1.1.8-386f7451b8-10c0.zip/node_modules/object.entries/",\ + "packageLocation": "../../../../.yarn/berry/cache/object.entries-npm-1.1.8-386f7451b8-10c0.zip/node_modules/object.entries/",\ "packageDependencies": [\ ["object.entries", "npm:1.1.8"],\ ["call-bind", "npm:1.0.7"],\ @@ -4236,7 +4236,7 @@ const RAW_RUNTIME_STATE = ]],\ ["object.fromentries", [\ ["npm:2.0.8", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/object.fromentries-npm-2.0.8-8f6e2db04a-10c0.zip/node_modules/object.fromentries/",\ + "packageLocation": "../../../../.yarn/berry/cache/object.fromentries-npm-2.0.8-8f6e2db04a-10c0.zip/node_modules/object.fromentries/",\ "packageDependencies": [\ ["object.fromentries", "npm:2.0.8"],\ ["call-bind", "npm:1.0.7"],\ @@ -4249,7 +4249,7 @@ const RAW_RUNTIME_STATE = ]],\ ["object.values", [\ ["npm:1.2.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/object.values-npm-1.2.0-5112376fc7-10c0.zip/node_modules/object.values/",\ + "packageLocation": "../../../../.yarn/berry/cache/object.values-npm-1.2.0-5112376fc7-10c0.zip/node_modules/object.values/",\ "packageDependencies": [\ ["object.values", "npm:1.2.0"],\ ["call-bind", "npm:1.0.7"],\ @@ -4261,7 +4261,7 @@ const RAW_RUNTIME_STATE = ]],\ ["once", [\ ["npm:1.4.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/once-npm-1.4.0-ccf03ef07a-10c0.zip/node_modules/once/",\ + "packageLocation": "../../../../.yarn/berry/cache/once-npm-1.4.0-ccf03ef07a-10c0.zip/node_modules/once/",\ "packageDependencies": [\ ["once", "npm:1.4.0"],\ ["wrappy", "npm:1.0.2"]\ @@ -4271,7 +4271,7 @@ const RAW_RUNTIME_STATE = ]],\ ["optionator", [\ ["npm:0.9.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/optionator-npm-0.9.4-1f114b00e8-10c0.zip/node_modules/optionator/",\ + "packageLocation": "../../../../.yarn/berry/cache/optionator-npm-0.9.4-1f114b00e8-10c0.zip/node_modules/optionator/",\ "packageDependencies": [\ ["optionator", "npm:0.9.4"],\ ["deep-is", "npm:0.1.4"],\ @@ -4286,7 +4286,7 @@ const RAW_RUNTIME_STATE = ]],\ ["p-limit", [\ ["npm:3.1.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/p-limit-npm-3.1.0-05d2ede37f-10c0.zip/node_modules/p-limit/",\ + "packageLocation": "../../../../.yarn/berry/cache/p-limit-npm-3.1.0-05d2ede37f-10c0.zip/node_modules/p-limit/",\ "packageDependencies": [\ ["p-limit", "npm:3.1.0"],\ ["yocto-queue", "npm:0.1.0"]\ @@ -4296,7 +4296,7 @@ const RAW_RUNTIME_STATE = ]],\ ["p-locate", [\ ["npm:5.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/p-locate-npm-5.0.0-92cc7c7a3e-10c0.zip/node_modules/p-locate/",\ + "packageLocation": "../../../../.yarn/berry/cache/p-locate-npm-5.0.0-92cc7c7a3e-10c0.zip/node_modules/p-locate/",\ "packageDependencies": [\ ["p-locate", "npm:5.0.0"],\ ["p-limit", "npm:3.1.0"]\ @@ -4306,7 +4306,7 @@ const RAW_RUNTIME_STATE = ]],\ ["p-map", [\ ["npm:4.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/p-map-npm-4.0.0-4677ae07c7-10c0.zip/node_modules/p-map/",\ + "packageLocation": "../../../../.yarn/berry/cache/p-map-npm-4.0.0-4677ae07c7-10c0.zip/node_modules/p-map/",\ "packageDependencies": [\ ["p-map", "npm:4.0.0"],\ ["aggregate-error", "npm:3.1.0"]\ @@ -4316,7 +4316,7 @@ const RAW_RUNTIME_STATE = ]],\ ["package-json-from-dist", [\ ["npm:1.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/package-json-from-dist-npm-1.0.1-4631a88465-10c0.zip/node_modules/package-json-from-dist/",\ + "packageLocation": "../../../../.yarn/berry/cache/package-json-from-dist-npm-1.0.1-4631a88465-10c0.zip/node_modules/package-json-from-dist/",\ "packageDependencies": [\ ["package-json-from-dist", "npm:1.0.1"]\ ],\ @@ -4325,7 +4325,7 @@ const RAW_RUNTIME_STATE = ]],\ ["parent-module", [\ ["npm:1.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/parent-module-npm-1.0.1-1fae11b095-10c0.zip/node_modules/parent-module/",\ + "packageLocation": "../../../../.yarn/berry/cache/parent-module-npm-1.0.1-1fae11b095-10c0.zip/node_modules/parent-module/",\ "packageDependencies": [\ ["parent-module", "npm:1.0.1"],\ ["callsites", "npm:3.1.0"]\ @@ -4335,7 +4335,7 @@ const RAW_RUNTIME_STATE = ]],\ ["path-exists", [\ ["npm:4.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/path-exists-npm-4.0.0-e9e4f63eb0-10c0.zip/node_modules/path-exists/",\ + "packageLocation": "../../../../.yarn/berry/cache/path-exists-npm-4.0.0-e9e4f63eb0-10c0.zip/node_modules/path-exists/",\ "packageDependencies": [\ ["path-exists", "npm:4.0.0"]\ ],\ @@ -4344,7 +4344,7 @@ const RAW_RUNTIME_STATE = ]],\ ["path-is-absolute", [\ ["npm:1.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/path-is-absolute-npm-1.0.1-31bc695ffd-10c0.zip/node_modules/path-is-absolute/",\ + "packageLocation": "../../../../.yarn/berry/cache/path-is-absolute-npm-1.0.1-31bc695ffd-10c0.zip/node_modules/path-is-absolute/",\ "packageDependencies": [\ ["path-is-absolute", "npm:1.0.1"]\ ],\ @@ -4353,7 +4353,7 @@ const RAW_RUNTIME_STATE = ]],\ ["path-key", [\ ["npm:3.1.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/path-key-npm-3.1.1-0e66ea8321-10c0.zip/node_modules/path-key/",\ + "packageLocation": "../../../../.yarn/berry/cache/path-key-npm-3.1.1-0e66ea8321-10c0.zip/node_modules/path-key/",\ "packageDependencies": [\ ["path-key", "npm:3.1.1"]\ ],\ @@ -4362,7 +4362,7 @@ const RAW_RUNTIME_STATE = ]],\ ["path-parse", [\ ["npm:1.0.7", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/path-parse-npm-1.0.7-09564527b7-10c0.zip/node_modules/path-parse/",\ + "packageLocation": "../../../../.yarn/berry/cache/path-parse-npm-1.0.7-09564527b7-10c0.zip/node_modules/path-parse/",\ "packageDependencies": [\ ["path-parse", "npm:1.0.7"]\ ],\ @@ -4371,7 +4371,7 @@ const RAW_RUNTIME_STATE = ]],\ ["path-scurry", [\ ["npm:1.11.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/path-scurry-npm-1.11.1-aaf8c339af-10c0.zip/node_modules/path-scurry/",\ + "packageLocation": "../../../../.yarn/berry/cache/path-scurry-npm-1.11.1-aaf8c339af-10c0.zip/node_modules/path-scurry/",\ "packageDependencies": [\ ["path-scurry", "npm:1.11.1"],\ ["lru-cache", "npm:10.4.3"],\ @@ -4382,7 +4382,7 @@ const RAW_RUNTIME_STATE = ]],\ ["picocolors", [\ ["npm:1.1.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/picocolors-npm-1.1.0-ea12a640bd-10c0.zip/node_modules/picocolors/",\ + "packageLocation": "../../../../.yarn/berry/cache/picocolors-npm-1.1.0-ea12a640bd-10c0.zip/node_modules/picocolors/",\ "packageDependencies": [\ ["picocolors", "npm:1.1.0"]\ ],\ @@ -4391,7 +4391,7 @@ const RAW_RUNTIME_STATE = ]],\ ["picomatch", [\ ["npm:2.3.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/picomatch-npm-2.3.1-c782cfd986-10c0.zip/node_modules/picomatch/",\ + "packageLocation": "../../../../.yarn/berry/cache/picomatch-npm-2.3.1-c782cfd986-10c0.zip/node_modules/picomatch/",\ "packageDependencies": [\ ["picomatch", "npm:2.3.1"]\ ],\ @@ -4400,7 +4400,7 @@ const RAW_RUNTIME_STATE = ]],\ ["possible-typed-array-names", [\ ["npm:1.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/possible-typed-array-names-npm-1.0.0-3a8176348a-10c0.zip/node_modules/possible-typed-array-names/",\ + "packageLocation": "../../../../.yarn/berry/cache/possible-typed-array-names-npm-1.0.0-3a8176348a-10c0.zip/node_modules/possible-typed-array-names/",\ "packageDependencies": [\ ["possible-typed-array-names", "npm:1.0.0"]\ ],\ @@ -4409,7 +4409,7 @@ const RAW_RUNTIME_STATE = ]],\ ["postcss", [\ ["npm:8.4.47", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/postcss-npm-8.4.47-2f4d4be1fa-10c0.zip/node_modules/postcss/",\ + "packageLocation": "../../../../.yarn/berry/cache/postcss-npm-8.4.47-2f4d4be1fa-10c0.zip/node_modules/postcss/",\ "packageDependencies": [\ ["postcss", "npm:8.4.47"],\ ["nanoid", "npm:3.3.7"],\ @@ -4421,14 +4421,14 @@ const RAW_RUNTIME_STATE = ]],\ ["postcss-modules", [\ ["npm:4.3.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/postcss-modules-npm-4.3.1-85d6d65d8e-10c0.zip/node_modules/postcss-modules/",\ + "packageLocation": "../../../../.yarn/berry/cache/postcss-modules-npm-4.3.1-85d6d65d8e-10c0.zip/node_modules/postcss-modules/",\ "packageDependencies": [\ ["postcss-modules", "npm:4.3.1"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:e5f77e470062f93119f7a9a0a93a2cb9da8c44ac4ed5880bdfe1ce4ea414e1d0956ac0b05623f6ca27a09d131810018ed436227e173461b318439538a6d8112b#npm:4.3.1", {\ - "packageLocation": "./.yarn/__virtual__/postcss-modules-virtual-8cf47ea1c8/3/AppData/Local/Yarn/Berry/cache/postcss-modules-npm-4.3.1-85d6d65d8e-10c0.zip/node_modules/postcss-modules/",\ + "packageLocation": "./.yarn/__virtual__/postcss-modules-virtual-8cf47ea1c8/5/.yarn/berry/cache/postcss-modules-npm-4.3.1-85d6d65d8e-10c0.zip/node_modules/postcss-modules/",\ "packageDependencies": [\ ["postcss-modules", "virtual:e5f77e470062f93119f7a9a0a93a2cb9da8c44ac4ed5880bdfe1ce4ea414e1d0956ac0b05623f6ca27a09d131810018ed436227e173461b318439538a6d8112b#npm:4.3.1"],\ ["@types/postcss", null],\ @@ -4451,14 +4451,14 @@ const RAW_RUNTIME_STATE = ]],\ ["postcss-modules-extract-imports", [\ ["npm:3.1.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/postcss-modules-extract-imports-npm-3.1.0-501aab09e8-10c0.zip/node_modules/postcss-modules-extract-imports/",\ + "packageLocation": "../../../../.yarn/berry/cache/postcss-modules-extract-imports-npm-3.1.0-501aab09e8-10c0.zip/node_modules/postcss-modules-extract-imports/",\ "packageDependencies": [\ ["postcss-modules-extract-imports", "npm:3.1.0"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:8cf47ea1c87bc01f1f06a2f3e4d3c801e202cbc7166459480d5a40834833089cee91548b684122dfe121c677a93487d0f55705802fc2669318fe84fd6514e45d#npm:3.1.0", {\ - "packageLocation": "./.yarn/__virtual__/postcss-modules-extract-imports-virtual-4560784fbe/3/AppData/Local/Yarn/Berry/cache/postcss-modules-extract-imports-npm-3.1.0-501aab09e8-10c0.zip/node_modules/postcss-modules-extract-imports/",\ + "packageLocation": "./.yarn/__virtual__/postcss-modules-extract-imports-virtual-4560784fbe/5/.yarn/berry/cache/postcss-modules-extract-imports-npm-3.1.0-501aab09e8-10c0.zip/node_modules/postcss-modules-extract-imports/",\ "packageDependencies": [\ ["postcss-modules-extract-imports", "virtual:8cf47ea1c87bc01f1f06a2f3e4d3c801e202cbc7166459480d5a40834833089cee91548b684122dfe121c677a93487d0f55705802fc2669318fe84fd6514e45d#npm:3.1.0"],\ ["@types/postcss", null],\ @@ -4473,14 +4473,14 @@ const RAW_RUNTIME_STATE = ]],\ ["postcss-modules-local-by-default", [\ ["npm:4.0.5", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/postcss-modules-local-by-default-npm-4.0.5-1a623b43f9-10c0.zip/node_modules/postcss-modules-local-by-default/",\ + "packageLocation": "../../../../.yarn/berry/cache/postcss-modules-local-by-default-npm-4.0.5-1a623b43f9-10c0.zip/node_modules/postcss-modules-local-by-default/",\ "packageDependencies": [\ ["postcss-modules-local-by-default", "npm:4.0.5"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:8cf47ea1c87bc01f1f06a2f3e4d3c801e202cbc7166459480d5a40834833089cee91548b684122dfe121c677a93487d0f55705802fc2669318fe84fd6514e45d#npm:4.0.5", {\ - "packageLocation": "./.yarn/__virtual__/postcss-modules-local-by-default-virtual-f5aae85a73/3/AppData/Local/Yarn/Berry/cache/postcss-modules-local-by-default-npm-4.0.5-1a623b43f9-10c0.zip/node_modules/postcss-modules-local-by-default/",\ + "packageLocation": "./.yarn/__virtual__/postcss-modules-local-by-default-virtual-f5aae85a73/5/.yarn/berry/cache/postcss-modules-local-by-default-npm-4.0.5-1a623b43f9-10c0.zip/node_modules/postcss-modules-local-by-default/",\ "packageDependencies": [\ ["postcss-modules-local-by-default", "virtual:8cf47ea1c87bc01f1f06a2f3e4d3c801e202cbc7166459480d5a40834833089cee91548b684122dfe121c677a93487d0f55705802fc2669318fe84fd6514e45d#npm:4.0.5"],\ ["@types/postcss", null],\ @@ -4498,14 +4498,14 @@ const RAW_RUNTIME_STATE = ]],\ ["postcss-modules-scope", [\ ["npm:3.2.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/postcss-modules-scope-npm-3.2.0-a03c18262e-10c0.zip/node_modules/postcss-modules-scope/",\ + "packageLocation": "../../../../.yarn/berry/cache/postcss-modules-scope-npm-3.2.0-a03c18262e-10c0.zip/node_modules/postcss-modules-scope/",\ "packageDependencies": [\ ["postcss-modules-scope", "npm:3.2.0"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:8cf47ea1c87bc01f1f06a2f3e4d3c801e202cbc7166459480d5a40834833089cee91548b684122dfe121c677a93487d0f55705802fc2669318fe84fd6514e45d#npm:3.2.0", {\ - "packageLocation": "./.yarn/__virtual__/postcss-modules-scope-virtual-9a2a757818/3/AppData/Local/Yarn/Berry/cache/postcss-modules-scope-npm-3.2.0-a03c18262e-10c0.zip/node_modules/postcss-modules-scope/",\ + "packageLocation": "./.yarn/__virtual__/postcss-modules-scope-virtual-9a2a757818/5/.yarn/berry/cache/postcss-modules-scope-npm-3.2.0-a03c18262e-10c0.zip/node_modules/postcss-modules-scope/",\ "packageDependencies": [\ ["postcss-modules-scope", "virtual:8cf47ea1c87bc01f1f06a2f3e4d3c801e202cbc7166459480d5a40834833089cee91548b684122dfe121c677a93487d0f55705802fc2669318fe84fd6514e45d#npm:3.2.0"],\ ["@types/postcss", null],\ @@ -4521,14 +4521,14 @@ const RAW_RUNTIME_STATE = ]],\ ["postcss-modules-values", [\ ["npm:4.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/postcss-modules-values-npm-4.0.0-63d7ec543a-10c0.zip/node_modules/postcss-modules-values/",\ + "packageLocation": "../../../../.yarn/berry/cache/postcss-modules-values-npm-4.0.0-63d7ec543a-10c0.zip/node_modules/postcss-modules-values/",\ "packageDependencies": [\ ["postcss-modules-values", "npm:4.0.0"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:8cf47ea1c87bc01f1f06a2f3e4d3c801e202cbc7166459480d5a40834833089cee91548b684122dfe121c677a93487d0f55705802fc2669318fe84fd6514e45d#npm:4.0.0", {\ - "packageLocation": "./.yarn/__virtual__/postcss-modules-values-virtual-195a280149/3/AppData/Local/Yarn/Berry/cache/postcss-modules-values-npm-4.0.0-63d7ec543a-10c0.zip/node_modules/postcss-modules-values/",\ + "packageLocation": "./.yarn/__virtual__/postcss-modules-values-virtual-195a280149/5/.yarn/berry/cache/postcss-modules-values-npm-4.0.0-63d7ec543a-10c0.zip/node_modules/postcss-modules-values/",\ "packageDependencies": [\ ["postcss-modules-values", "virtual:8cf47ea1c87bc01f1f06a2f3e4d3c801e202cbc7166459480d5a40834833089cee91548b684122dfe121c677a93487d0f55705802fc2669318fe84fd6514e45d#npm:4.0.0"],\ ["@types/postcss", null],\ @@ -4544,7 +4544,7 @@ const RAW_RUNTIME_STATE = ]],\ ["postcss-selector-parser", [\ ["npm:6.1.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/postcss-selector-parser-npm-6.1.2-46a8e03b00-10c0.zip/node_modules/postcss-selector-parser/",\ + "packageLocation": "../../../../.yarn/berry/cache/postcss-selector-parser-npm-6.1.2-46a8e03b00-10c0.zip/node_modules/postcss-selector-parser/",\ "packageDependencies": [\ ["postcss-selector-parser", "npm:6.1.2"],\ ["cssesc", "npm:3.0.0"],\ @@ -4555,7 +4555,7 @@ const RAW_RUNTIME_STATE = ]],\ ["postcss-value-parser", [\ ["npm:4.2.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/postcss-value-parser-npm-4.2.0-3cef602a6a-10c0.zip/node_modules/postcss-value-parser/",\ + "packageLocation": "../../../../.yarn/berry/cache/postcss-value-parser-npm-4.2.0-3cef602a6a-10c0.zip/node_modules/postcss-value-parser/",\ "packageDependencies": [\ ["postcss-value-parser", "npm:4.2.0"]\ ],\ @@ -4564,7 +4564,7 @@ const RAW_RUNTIME_STATE = ]],\ ["prelude-ls", [\ ["npm:1.2.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/prelude-ls-npm-1.2.1-3e4d272a55-10c0.zip/node_modules/prelude-ls/",\ + "packageLocation": "../../../../.yarn/berry/cache/prelude-ls-npm-1.2.1-3e4d272a55-10c0.zip/node_modules/prelude-ls/",\ "packageDependencies": [\ ["prelude-ls", "npm:1.2.1"]\ ],\ @@ -4582,7 +4582,7 @@ const RAW_RUNTIME_STATE = ]],\ ["prettier-linter-helpers", [\ ["npm:1.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/prettier-linter-helpers-npm-1.0.0-6925131a7e-10c0.zip/node_modules/prettier-linter-helpers/",\ + "packageLocation": "../../../../.yarn/berry/cache/prettier-linter-helpers-npm-1.0.0-6925131a7e-10c0.zip/node_modules/prettier-linter-helpers/",\ "packageDependencies": [\ ["prettier-linter-helpers", "npm:1.0.0"],\ ["fast-diff", "npm:1.3.0"]\ @@ -4592,7 +4592,7 @@ const RAW_RUNTIME_STATE = ]],\ ["proc-log", [\ ["npm:4.2.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/proc-log-npm-4.2.0-4d65296a9d-10c0.zip/node_modules/proc-log/",\ + "packageLocation": "../../../../.yarn/berry/cache/proc-log-npm-4.2.0-4d65296a9d-10c0.zip/node_modules/proc-log/",\ "packageDependencies": [\ ["proc-log", "npm:4.2.0"]\ ],\ @@ -4601,7 +4601,7 @@ const RAW_RUNTIME_STATE = ]],\ ["promise-retry", [\ ["npm:2.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/promise-retry-npm-2.0.1-871f0b01b7-10c0.zip/node_modules/promise-retry/",\ + "packageLocation": "../../../../.yarn/berry/cache/promise-retry-npm-2.0.1-871f0b01b7-10c0.zip/node_modules/promise-retry/",\ "packageDependencies": [\ ["promise-retry", "npm:2.0.1"],\ ["err-code", "npm:2.0.3"],\ @@ -4612,7 +4612,7 @@ const RAW_RUNTIME_STATE = ]],\ ["prop-types", [\ ["npm:15.8.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/prop-types-npm-15.8.1-17c71ee7ee-10c0.zip/node_modules/prop-types/",\ + "packageLocation": "../../../../.yarn/berry/cache/prop-types-npm-15.8.1-17c71ee7ee-10c0.zip/node_modules/prop-types/",\ "packageDependencies": [\ ["prop-types", "npm:15.8.1"],\ ["loose-envify", "npm:1.4.0"],\ @@ -4624,7 +4624,7 @@ const RAW_RUNTIME_STATE = ]],\ ["punycode", [\ ["npm:2.3.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/punycode-npm-2.3.1-97543c420d-10c0.zip/node_modules/punycode/",\ + "packageLocation": "../../../../.yarn/berry/cache/punycode-npm-2.3.1-97543c420d-10c0.zip/node_modules/punycode/",\ "packageDependencies": [\ ["punycode", "npm:2.3.1"]\ ],\ @@ -4633,7 +4633,7 @@ const RAW_RUNTIME_STATE = ]],\ ["queue-microtask", [\ ["npm:1.2.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/queue-microtask-npm-1.2.3-fcc98e4e2d-10c0.zip/node_modules/queue-microtask/",\ + "packageLocation": "../../../../.yarn/berry/cache/queue-microtask-npm-1.2.3-fcc98e4e2d-10c0.zip/node_modules/queue-microtask/",\ "packageDependencies": [\ ["queue-microtask", "npm:1.2.3"]\ ],\ @@ -4642,7 +4642,7 @@ const RAW_RUNTIME_STATE = ]],\ ["react", [\ ["npm:18.3.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/react-npm-18.3.1-af38f3c1ae-10c0.zip/node_modules/react/",\ + "packageLocation": "../../../../.yarn/berry/cache/react-npm-18.3.1-af38f3c1ae-10c0.zip/node_modules/react/",\ "packageDependencies": [\ ["react", "npm:18.3.1"],\ ["loose-envify", "npm:1.4.0"]\ @@ -4652,14 +4652,14 @@ const RAW_RUNTIME_STATE = ]],\ ["react-dom", [\ ["npm:18.3.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/react-dom-npm-18.3.1-a805663f38-10c0.zip/node_modules/react-dom/",\ + "packageLocation": "../../../../.yarn/berry/cache/react-dom-npm-18.3.1-a805663f38-10c0.zip/node_modules/react-dom/",\ "packageDependencies": [\ ["react-dom", "npm:18.3.1"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:ea35bf3da4d290ae453fe455661c3510f7ee200c335a977da403ec82854ba7dec40e6f9e72d8c19f0e70a55cbda847a643d15be5b3f7ab25ce5c27b0a95bbc76#npm:18.3.1", {\ - "packageLocation": "./.yarn/__virtual__/react-dom-virtual-05b9a77671/3/AppData/Local/Yarn/Berry/cache/react-dom-npm-18.3.1-a805663f38-10c0.zip/node_modules/react-dom/",\ + "packageLocation": "./.yarn/__virtual__/react-dom-virtual-05b9a77671/5/.yarn/berry/cache/react-dom-npm-18.3.1-a805663f38-10c0.zip/node_modules/react-dom/",\ "packageDependencies": [\ ["react-dom", "virtual:ea35bf3da4d290ae453fe455661c3510f7ee200c335a977da403ec82854ba7dec40e6f9e72d8c19f0e70a55cbda847a643d15be5b3f7ab25ce5c27b0a95bbc76#npm:18.3.1"],\ ["@types/react", "npm:18.3.3"],\ @@ -4676,7 +4676,7 @@ const RAW_RUNTIME_STATE = ]],\ ["react-fast-compare", [\ ["npm:3.2.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/react-fast-compare-npm-3.2.2-45b585a872-10c0.zip/node_modules/react-fast-compare/",\ + "packageLocation": "../../../../.yarn/berry/cache/react-fast-compare-npm-3.2.2-45b585a872-10c0.zip/node_modules/react-fast-compare/",\ "packageDependencies": [\ ["react-fast-compare", "npm:3.2.2"]\ ],\ @@ -4685,7 +4685,7 @@ const RAW_RUNTIME_STATE = ]],\ ["react-is", [\ ["npm:16.13.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/react-is-npm-16.13.1-a9b9382b4f-10c0.zip/node_modules/react-is/",\ + "packageLocation": "../../../../.yarn/berry/cache/react-is-npm-16.13.1-a9b9382b4f-10c0.zip/node_modules/react-is/",\ "packageDependencies": [\ ["react-is", "npm:16.13.1"]\ ],\ @@ -4694,14 +4694,14 @@ const RAW_RUNTIME_STATE = ]],\ ["react-player", [\ ["npm:2.16.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/react-player-npm-2.16.0-c3172d3dd2-10c0.zip/node_modules/react-player/",\ + "packageLocation": "../../../../.yarn/berry/cache/react-player-npm-2.16.0-c3172d3dd2-10c0.zip/node_modules/react-player/",\ "packageDependencies": [\ ["react-player", "npm:2.16.0"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:7ff15405ea2a649bedb31b53eb450b593e17c2290ffe01050ae1173d21896ac6c71075320c9f785857328929ff5965843d133b83cfa1c0dfdbb3e8f91e535cc1#npm:2.16.0", {\ - "packageLocation": "./.yarn/__virtual__/react-player-virtual-0290c73284/3/AppData/Local/Yarn/Berry/cache/react-player-npm-2.16.0-c3172d3dd2-10c0.zip/node_modules/react-player/",\ + "packageLocation": "./.yarn/__virtual__/react-player-virtual-0290c73284/5/.yarn/berry/cache/react-player-npm-2.16.0-c3172d3dd2-10c0.zip/node_modules/react-player/",\ "packageDependencies": [\ ["react-player", "virtual:7ff15405ea2a649bedb31b53eb450b593e17c2290ffe01050ae1173d21896ac6c71075320c9f785857328929ff5965843d133b83cfa1c0dfdbb3e8f91e535cc1#npm:2.16.0"],\ ["@types/react", "npm:18.3.3"],\ @@ -4783,7 +4783,7 @@ const RAW_RUNTIME_STATE = ]],\ ["react-refresh", [\ ["npm:0.14.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/react-refresh-npm-0.14.2-95df341b4d-10c0.zip/node_modules/react-refresh/",\ + "packageLocation": "../../../../.yarn/berry/cache/react-refresh-npm-0.14.2-95df341b4d-10c0.zip/node_modules/react-refresh/",\ "packageDependencies": [\ ["react-refresh", "npm:0.14.2"]\ ],\ @@ -4792,7 +4792,7 @@ const RAW_RUNTIME_STATE = ]],\ ["readdirp", [\ ["npm:4.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/readdirp-npm-4.0.2-8001f0febc-10c0.zip/node_modules/readdirp/",\ + "packageLocation": "../../../../.yarn/berry/cache/readdirp-npm-4.0.2-8001f0febc-10c0.zip/node_modules/readdirp/",\ "packageDependencies": [\ ["readdirp", "npm:4.0.2"]\ ],\ @@ -4801,7 +4801,7 @@ const RAW_RUNTIME_STATE = ]],\ ["reflect.getprototypeof", [\ ["npm:1.0.6", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/reflect.getprototypeof-npm-1.0.6-b33819c756-10c0.zip/node_modules/reflect.getprototypeof/",\ + "packageLocation": "../../../../.yarn/berry/cache/reflect.getprototypeof-npm-1.0.6-b33819c756-10c0.zip/node_modules/reflect.getprototypeof/",\ "packageDependencies": [\ ["reflect.getprototypeof", "npm:1.0.6"],\ ["call-bind", "npm:1.0.7"],\ @@ -4817,7 +4817,7 @@ const RAW_RUNTIME_STATE = ]],\ ["regexp.prototype.flags", [\ ["npm:1.5.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/regexp.prototype.flags-npm-1.5.3-09ac29fab0-10c0.zip/node_modules/regexp.prototype.flags/",\ + "packageLocation": "../../../../.yarn/berry/cache/regexp.prototype.flags-npm-1.5.3-09ac29fab0-10c0.zip/node_modules/regexp.prototype.flags/",\ "packageDependencies": [\ ["regexp.prototype.flags", "npm:1.5.3"],\ ["call-bind", "npm:1.0.7"],\ @@ -4830,7 +4830,7 @@ const RAW_RUNTIME_STATE = ]],\ ["resolve", [\ ["patch:resolve@npm%3A2.0.0-next.5#optional!builtin::version=2.0.0-next.5&hash=c3c19d", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/resolve-patch-95f8f5d302-10c0.zip/node_modules/resolve/",\ + "packageLocation": "../../../../.yarn/berry/cache/resolve-patch-95f8f5d302-10c0.zip/node_modules/resolve/",\ "packageDependencies": [\ ["resolve", "patch:resolve@npm%3A2.0.0-next.5#optional!builtin::version=2.0.0-next.5&hash=c3c19d"],\ ["is-core-module", "npm:2.15.1"],\ @@ -4842,7 +4842,7 @@ const RAW_RUNTIME_STATE = ]],\ ["resolve-from", [\ ["npm:4.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/resolve-from-npm-4.0.0-f758ec21bf-10c0.zip/node_modules/resolve-from/",\ + "packageLocation": "../../../../.yarn/berry/cache/resolve-from-npm-4.0.0-f758ec21bf-10c0.zip/node_modules/resolve-from/",\ "packageDependencies": [\ ["resolve-from", "npm:4.0.0"]\ ],\ @@ -4851,7 +4851,7 @@ const RAW_RUNTIME_STATE = ]],\ ["retry", [\ ["npm:0.12.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/retry-npm-0.12.0-72ac7fb4cc-10c0.zip/node_modules/retry/",\ + "packageLocation": "../../../../.yarn/berry/cache/retry-npm-0.12.0-72ac7fb4cc-10c0.zip/node_modules/retry/",\ "packageDependencies": [\ ["retry", "npm:0.12.0"]\ ],\ @@ -4860,7 +4860,7 @@ const RAW_RUNTIME_STATE = ]],\ ["reusify", [\ ["npm:1.0.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/reusify-npm-1.0.4-95ac4aec11-10c0.zip/node_modules/reusify/",\ + "packageLocation": "../../../../.yarn/berry/cache/reusify-npm-1.0.4-95ac4aec11-10c0.zip/node_modules/reusify/",\ "packageDependencies": [\ ["reusify", "npm:1.0.4"]\ ],\ @@ -4869,7 +4869,7 @@ const RAW_RUNTIME_STATE = ]],\ ["rimraf", [\ ["npm:3.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/rimraf-npm-3.0.2-2cb7dac69a-10c0.zip/node_modules/rimraf/",\ + "packageLocation": "../../../../.yarn/berry/cache/rimraf-npm-3.0.2-2cb7dac69a-10c0.zip/node_modules/rimraf/",\ "packageDependencies": [\ ["rimraf", "npm:3.0.2"],\ ["glob", "npm:7.2.3"]\ @@ -4879,7 +4879,7 @@ const RAW_RUNTIME_STATE = ]],\ ["rollup", [\ ["npm:4.24.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/rollup-npm-4.24.0-e772e759c0-10c0.zip/node_modules/rollup/",\ + "packageLocation": "../../../../.yarn/berry/cache/rollup-npm-4.24.0-e772e759c0-10c0.zip/node_modules/rollup/",\ "packageDependencies": [\ ["rollup", "npm:4.24.0"],\ ["@rollup/rollup-android-arm-eabi", "npm:4.24.0"],\ @@ -4906,7 +4906,7 @@ const RAW_RUNTIME_STATE = ]],\ ["run-parallel", [\ ["npm:1.2.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/run-parallel-npm-1.2.0-3f47ff2034-10c0.zip/node_modules/run-parallel/",\ + "packageLocation": "../../../../.yarn/berry/cache/run-parallel-npm-1.2.0-3f47ff2034-10c0.zip/node_modules/run-parallel/",\ "packageDependencies": [\ ["run-parallel", "npm:1.2.0"],\ ["queue-microtask", "npm:1.2.3"]\ @@ -4916,7 +4916,7 @@ const RAW_RUNTIME_STATE = ]],\ ["safe-array-concat", [\ ["npm:1.1.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/safe-array-concat-npm-1.1.2-f9c09c1a31-10c0.zip/node_modules/safe-array-concat/",\ + "packageLocation": "../../../../.yarn/berry/cache/safe-array-concat-npm-1.1.2-f9c09c1a31-10c0.zip/node_modules/safe-array-concat/",\ "packageDependencies": [\ ["safe-array-concat", "npm:1.1.2"],\ ["call-bind", "npm:1.0.7"],\ @@ -4929,7 +4929,7 @@ const RAW_RUNTIME_STATE = ]],\ ["safe-regex-test", [\ ["npm:1.0.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/safe-regex-test-npm-1.0.3-97fe5cc608-10c0.zip/node_modules/safe-regex-test/",\ + "packageLocation": "../../../../.yarn/berry/cache/safe-regex-test-npm-1.0.3-97fe5cc608-10c0.zip/node_modules/safe-regex-test/",\ "packageDependencies": [\ ["safe-regex-test", "npm:1.0.3"],\ ["call-bind", "npm:1.0.7"],\ @@ -4941,7 +4941,7 @@ const RAW_RUNTIME_STATE = ]],\ ["safer-buffer", [\ ["npm:2.1.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/safer-buffer-npm-2.1.2-8d5c0b705e-10c0.zip/node_modules/safer-buffer/",\ + "packageLocation": "../../../../.yarn/berry/cache/safer-buffer-npm-2.1.2-8d5c0b705e-10c0.zip/node_modules/safer-buffer/",\ "packageDependencies": [\ ["safer-buffer", "npm:2.1.2"]\ ],\ @@ -4950,7 +4950,7 @@ const RAW_RUNTIME_STATE = ]],\ ["sass", [\ ["npm:1.79.5", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/sass-npm-1.79.5-9f4647a8cf-10c0.zip/node_modules/sass/",\ + "packageLocation": "../../../../.yarn/berry/cache/sass-npm-1.79.5-9f4647a8cf-10c0.zip/node_modules/sass/",\ "packageDependencies": [\ ["sass", "npm:1.79.5"],\ ["@parcel/watcher", "npm:2.4.1"],\ @@ -4963,7 +4963,7 @@ const RAW_RUNTIME_STATE = ]],\ ["scheduler", [\ ["npm:0.23.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/scheduler-npm-0.23.2-6d1dd9c2b7-10c0.zip/node_modules/scheduler/",\ + "packageLocation": "../../../../.yarn/berry/cache/scheduler-npm-0.23.2-6d1dd9c2b7-10c0.zip/node_modules/scheduler/",\ "packageDependencies": [\ ["scheduler", "npm:0.23.2"],\ ["loose-envify", "npm:1.4.0"]\ @@ -4973,14 +4973,14 @@ const RAW_RUNTIME_STATE = ]],\ ["semver", [\ ["npm:6.3.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/semver-npm-6.3.1-bcba31fdbe-10c0.zip/node_modules/semver/",\ + "packageLocation": "../../../../.yarn/berry/cache/semver-npm-6.3.1-bcba31fdbe-10c0.zip/node_modules/semver/",\ "packageDependencies": [\ ["semver", "npm:6.3.1"]\ ],\ "linkType": "HARD"\ }],\ ["npm:7.6.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/semver-npm-7.6.3-57e82c14d5-10c0.zip/node_modules/semver/",\ + "packageLocation": "../../../../.yarn/berry/cache/semver-npm-7.6.3-57e82c14d5-10c0.zip/node_modules/semver/",\ "packageDependencies": [\ ["semver", "npm:7.6.3"]\ ],\ @@ -4989,7 +4989,7 @@ const RAW_RUNTIME_STATE = ]],\ ["set-function-length", [\ ["npm:1.2.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/set-function-length-npm-1.2.2-243073748b-10c0.zip/node_modules/set-function-length/",\ + "packageLocation": "../../../../.yarn/berry/cache/set-function-length-npm-1.2.2-243073748b-10c0.zip/node_modules/set-function-length/",\ "packageDependencies": [\ ["set-function-length", "npm:1.2.2"],\ ["define-data-property", "npm:1.1.4"],\ @@ -5004,7 +5004,7 @@ const RAW_RUNTIME_STATE = ]],\ ["set-function-name", [\ ["npm:2.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/set-function-name-npm-2.0.2-3d9a2d8899-10c0.zip/node_modules/set-function-name/",\ + "packageLocation": "../../../../.yarn/berry/cache/set-function-name-npm-2.0.2-3d9a2d8899-10c0.zip/node_modules/set-function-name/",\ "packageDependencies": [\ ["set-function-name", "npm:2.0.2"],\ ["define-data-property", "npm:1.1.4"],\ @@ -5017,7 +5017,7 @@ const RAW_RUNTIME_STATE = ]],\ ["shebang-command", [\ ["npm:2.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/shebang-command-npm-2.0.0-eb2b01921d-10c0.zip/node_modules/shebang-command/",\ + "packageLocation": "../../../../.yarn/berry/cache/shebang-command-npm-2.0.0-eb2b01921d-10c0.zip/node_modules/shebang-command/",\ "packageDependencies": [\ ["shebang-command", "npm:2.0.0"],\ ["shebang-regex", "npm:3.0.0"]\ @@ -5027,7 +5027,7 @@ const RAW_RUNTIME_STATE = ]],\ ["shebang-regex", [\ ["npm:3.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/shebang-regex-npm-3.0.0-899a0cd65e-10c0.zip/node_modules/shebang-regex/",\ + "packageLocation": "../../../../.yarn/berry/cache/shebang-regex-npm-3.0.0-899a0cd65e-10c0.zip/node_modules/shebang-regex/",\ "packageDependencies": [\ ["shebang-regex", "npm:3.0.0"]\ ],\ @@ -5036,7 +5036,7 @@ const RAW_RUNTIME_STATE = ]],\ ["side-channel", [\ ["npm:1.0.6", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/side-channel-npm-1.0.6-511657386f-10c0.zip/node_modules/side-channel/",\ + "packageLocation": "../../../../.yarn/berry/cache/side-channel-npm-1.0.6-511657386f-10c0.zip/node_modules/side-channel/",\ "packageDependencies": [\ ["side-channel", "npm:1.0.6"],\ ["call-bind", "npm:1.0.7"],\ @@ -5049,7 +5049,7 @@ const RAW_RUNTIME_STATE = ]],\ ["signal-exit", [\ ["npm:4.1.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/signal-exit-npm-4.1.0-61fb957687-10c0.zip/node_modules/signal-exit/",\ + "packageLocation": "../../../../.yarn/berry/cache/signal-exit-npm-4.1.0-61fb957687-10c0.zip/node_modules/signal-exit/",\ "packageDependencies": [\ ["signal-exit", "npm:4.1.0"]\ ],\ @@ -5058,7 +5058,7 @@ const RAW_RUNTIME_STATE = ]],\ ["smart-buffer", [\ ["npm:4.2.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/smart-buffer-npm-4.2.0-5ac3f668bb-10c0.zip/node_modules/smart-buffer/",\ + "packageLocation": "../../../../.yarn/berry/cache/smart-buffer-npm-4.2.0-5ac3f668bb-10c0.zip/node_modules/smart-buffer/",\ "packageDependencies": [\ ["smart-buffer", "npm:4.2.0"]\ ],\ @@ -5067,7 +5067,7 @@ const RAW_RUNTIME_STATE = ]],\ ["socks", [\ ["npm:2.8.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/socks-npm-2.8.3-3532b59899-10c0.zip/node_modules/socks/",\ + "packageLocation": "../../../../.yarn/berry/cache/socks-npm-2.8.3-3532b59899-10c0.zip/node_modules/socks/",\ "packageDependencies": [\ ["socks", "npm:2.8.3"],\ ["ip-address", "npm:9.0.5"],\ @@ -5078,7 +5078,7 @@ const RAW_RUNTIME_STATE = ]],\ ["socks-proxy-agent", [\ ["npm:8.0.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/socks-proxy-agent-npm-8.0.4-991722041a-10c0.zip/node_modules/socks-proxy-agent/",\ + "packageLocation": "../../../../.yarn/berry/cache/socks-proxy-agent-npm-8.0.4-991722041a-10c0.zip/node_modules/socks-proxy-agent/",\ "packageDependencies": [\ ["socks-proxy-agent", "npm:8.0.4"],\ ["agent-base", "npm:7.1.1"],\ @@ -5090,7 +5090,7 @@ const RAW_RUNTIME_STATE = ]],\ ["source-map-js", [\ ["npm:1.2.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/source-map-js-npm-1.2.1-b9a47d7e1a-10c0.zip/node_modules/source-map-js/",\ + "packageLocation": "../../../../.yarn/berry/cache/source-map-js-npm-1.2.1-b9a47d7e1a-10c0.zip/node_modules/source-map-js/",\ "packageDependencies": [\ ["source-map-js", "npm:1.2.1"]\ ],\ @@ -5099,7 +5099,7 @@ const RAW_RUNTIME_STATE = ]],\ ["sprintf-js", [\ ["npm:1.1.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/sprintf-js-npm-1.1.3-b99efd75b2-10c0.zip/node_modules/sprintf-js/",\ + "packageLocation": "../../../../.yarn/berry/cache/sprintf-js-npm-1.1.3-b99efd75b2-10c0.zip/node_modules/sprintf-js/",\ "packageDependencies": [\ ["sprintf-js", "npm:1.1.3"]\ ],\ @@ -5108,7 +5108,7 @@ const RAW_RUNTIME_STATE = ]],\ ["ssri", [\ ["npm:10.0.6", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/ssri-npm-10.0.6-6b8eaec5ce-10c0.zip/node_modules/ssri/",\ + "packageLocation": "../../../../.yarn/berry/cache/ssri-npm-10.0.6-6b8eaec5ce-10c0.zip/node_modules/ssri/",\ "packageDependencies": [\ ["ssri", "npm:10.0.6"],\ ["minipass", "npm:7.1.2"]\ @@ -5118,7 +5118,7 @@ const RAW_RUNTIME_STATE = ]],\ ["string-hash", [\ ["npm:1.1.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/string-hash-npm-1.1.3-3cb8892e7c-10c0.zip/node_modules/string-hash/",\ + "packageLocation": "../../../../.yarn/berry/cache/string-hash-npm-1.1.3-3cb8892e7c-10c0.zip/node_modules/string-hash/",\ "packageDependencies": [\ ["string-hash", "npm:1.1.3"]\ ],\ @@ -5127,7 +5127,7 @@ const RAW_RUNTIME_STATE = ]],\ ["string-width", [\ ["npm:4.2.3", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/string-width-npm-4.2.3-2c27177bae-10c0.zip/node_modules/string-width/",\ + "packageLocation": "../../../../.yarn/berry/cache/string-width-npm-4.2.3-2c27177bae-10c0.zip/node_modules/string-width/",\ "packageDependencies": [\ ["string-width", "npm:4.2.3"],\ ["emoji-regex", "npm:8.0.0"],\ @@ -5137,7 +5137,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["npm:5.1.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/string-width-npm-5.1.2-bf60531341-10c0.zip/node_modules/string-width/",\ + "packageLocation": "../../../../.yarn/berry/cache/string-width-npm-5.1.2-bf60531341-10c0.zip/node_modules/string-width/",\ "packageDependencies": [\ ["string-width", "npm:5.1.2"],\ ["eastasianwidth", "npm:0.2.0"],\ @@ -5149,7 +5149,7 @@ const RAW_RUNTIME_STATE = ]],\ ["string.prototype.matchall", [\ ["npm:4.0.11", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/string.prototype.matchall-npm-4.0.11-a18d0665a1-10c0.zip/node_modules/string.prototype.matchall/",\ + "packageLocation": "../../../../.yarn/berry/cache/string.prototype.matchall-npm-4.0.11-a18d0665a1-10c0.zip/node_modules/string.prototype.matchall/",\ "packageDependencies": [\ ["string.prototype.matchall", "npm:4.0.11"],\ ["call-bind", "npm:1.0.7"],\ @@ -5170,7 +5170,7 @@ const RAW_RUNTIME_STATE = ]],\ ["string.prototype.repeat", [\ ["npm:1.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/string.prototype.repeat-npm-1.0.0-3f87f5fd9e-10c0.zip/node_modules/string.prototype.repeat/",\ + "packageLocation": "../../../../.yarn/berry/cache/string.prototype.repeat-npm-1.0.0-3f87f5fd9e-10c0.zip/node_modules/string.prototype.repeat/",\ "packageDependencies": [\ ["string.prototype.repeat", "npm:1.0.0"],\ ["define-properties", "npm:1.2.1"],\ @@ -5181,7 +5181,7 @@ const RAW_RUNTIME_STATE = ]],\ ["string.prototype.trim", [\ ["npm:1.2.9", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/string.prototype.trim-npm-1.2.9-7b24b35971-10c0.zip/node_modules/string.prototype.trim/",\ + "packageLocation": "../../../../.yarn/berry/cache/string.prototype.trim-npm-1.2.9-7b24b35971-10c0.zip/node_modules/string.prototype.trim/",\ "packageDependencies": [\ ["string.prototype.trim", "npm:1.2.9"],\ ["call-bind", "npm:1.0.7"],\ @@ -5194,7 +5194,7 @@ const RAW_RUNTIME_STATE = ]],\ ["string.prototype.trimend", [\ ["npm:1.0.8", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/string.prototype.trimend-npm-1.0.8-9c0ed19266-10c0.zip/node_modules/string.prototype.trimend/",\ + "packageLocation": "../../../../.yarn/berry/cache/string.prototype.trimend-npm-1.0.8-9c0ed19266-10c0.zip/node_modules/string.prototype.trimend/",\ "packageDependencies": [\ ["string.prototype.trimend", "npm:1.0.8"],\ ["call-bind", "npm:1.0.7"],\ @@ -5206,7 +5206,7 @@ const RAW_RUNTIME_STATE = ]],\ ["string.prototype.trimstart", [\ ["npm:1.0.8", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/string.prototype.trimstart-npm-1.0.8-8c6b16ba6e-10c0.zip/node_modules/string.prototype.trimstart/",\ + "packageLocation": "../../../../.yarn/berry/cache/string.prototype.trimstart-npm-1.0.8-8c6b16ba6e-10c0.zip/node_modules/string.prototype.trimstart/",\ "packageDependencies": [\ ["string.prototype.trimstart", "npm:1.0.8"],\ ["call-bind", "npm:1.0.7"],\ @@ -5218,7 +5218,7 @@ const RAW_RUNTIME_STATE = ]],\ ["strip-ansi", [\ ["npm:6.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/strip-ansi-npm-6.0.1-caddc7cb40-10c0.zip/node_modules/strip-ansi/",\ + "packageLocation": "../../../../.yarn/berry/cache/strip-ansi-npm-6.0.1-caddc7cb40-10c0.zip/node_modules/strip-ansi/",\ "packageDependencies": [\ ["strip-ansi", "npm:6.0.1"],\ ["ansi-regex", "npm:5.0.1"]\ @@ -5226,7 +5226,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["npm:7.1.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/strip-ansi-npm-7.1.0-7453b80b79-10c0.zip/node_modules/strip-ansi/",\ + "packageLocation": "../../../../.yarn/berry/cache/strip-ansi-npm-7.1.0-7453b80b79-10c0.zip/node_modules/strip-ansi/",\ "packageDependencies": [\ ["strip-ansi", "npm:7.1.0"],\ ["ansi-regex", "npm:6.1.0"]\ @@ -5236,7 +5236,7 @@ const RAW_RUNTIME_STATE = ]],\ ["strip-json-comments", [\ ["npm:3.1.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/strip-json-comments-npm-3.1.1-dcb2324823-10c0.zip/node_modules/strip-json-comments/",\ + "packageLocation": "../../../../.yarn/berry/cache/strip-json-comments-npm-3.1.1-dcb2324823-10c0.zip/node_modules/strip-json-comments/",\ "packageDependencies": [\ ["strip-json-comments", "npm:3.1.1"]\ ],\ @@ -5245,7 +5245,7 @@ const RAW_RUNTIME_STATE = ]],\ ["supports-color", [\ ["npm:5.5.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/supports-color-npm-5.5.0-183ac537bc-10c0.zip/node_modules/supports-color/",\ + "packageLocation": "../../../../.yarn/berry/cache/supports-color-npm-5.5.0-183ac537bc-10c0.zip/node_modules/supports-color/",\ "packageDependencies": [\ ["supports-color", "npm:5.5.0"],\ ["has-flag", "npm:3.0.0"]\ @@ -5253,7 +5253,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["npm:7.2.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/supports-color-npm-7.2.0-606bfcf7da-10c0.zip/node_modules/supports-color/",\ + "packageLocation": "../../../../.yarn/berry/cache/supports-color-npm-7.2.0-606bfcf7da-10c0.zip/node_modules/supports-color/",\ "packageDependencies": [\ ["supports-color", "npm:7.2.0"],\ ["has-flag", "npm:4.0.0"]\ @@ -5263,7 +5263,7 @@ const RAW_RUNTIME_STATE = ]],\ ["supports-preserve-symlinks-flag", [\ ["npm:1.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/supports-preserve-symlinks-flag-npm-1.0.0-f17c4d0028-10c0.zip/node_modules/supports-preserve-symlinks-flag/",\ + "packageLocation": "../../../../.yarn/berry/cache/supports-preserve-symlinks-flag-npm-1.0.0-f17c4d0028-10c0.zip/node_modules/supports-preserve-symlinks-flag/",\ "packageDependencies": [\ ["supports-preserve-symlinks-flag", "npm:1.0.0"]\ ],\ @@ -5272,7 +5272,7 @@ const RAW_RUNTIME_STATE = ]],\ ["synckit", [\ ["npm:0.9.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/synckit-npm-0.9.2-515a819361-10c0.zip/node_modules/synckit/",\ + "packageLocation": "../../../../.yarn/berry/cache/synckit-npm-0.9.2-515a819361-10c0.zip/node_modules/synckit/",\ "packageDependencies": [\ ["synckit", "npm:0.9.2"],\ ["@pkgr/core", "npm:0.1.1"],\ @@ -5283,7 +5283,7 @@ const RAW_RUNTIME_STATE = ]],\ ["tar", [\ ["npm:6.2.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/tar-npm-6.2.1-237800bb20-10c0.zip/node_modules/tar/",\ + "packageLocation": "../../../../.yarn/berry/cache/tar-npm-6.2.1-237800bb20-10c0.zip/node_modules/tar/",\ "packageDependencies": [\ ["tar", "npm:6.2.1"],\ ["chownr", "npm:2.0.0"],\ @@ -5298,7 +5298,7 @@ const RAW_RUNTIME_STATE = ]],\ ["text-table", [\ ["npm:0.2.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/text-table-npm-0.2.0-d92a778b59-10c0.zip/node_modules/text-table/",\ + "packageLocation": "../../../../.yarn/berry/cache/text-table-npm-0.2.0-d92a778b59-10c0.zip/node_modules/text-table/",\ "packageDependencies": [\ ["text-table", "npm:0.2.0"]\ ],\ @@ -5307,7 +5307,7 @@ const RAW_RUNTIME_STATE = ]],\ ["to-fast-properties", [\ ["npm:2.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/to-fast-properties-npm-2.0.0-0dc60cc481-10c0.zip/node_modules/to-fast-properties/",\ + "packageLocation": "../../../../.yarn/berry/cache/to-fast-properties-npm-2.0.0-0dc60cc481-10c0.zip/node_modules/to-fast-properties/",\ "packageDependencies": [\ ["to-fast-properties", "npm:2.0.0"]\ ],\ @@ -5316,7 +5316,7 @@ const RAW_RUNTIME_STATE = ]],\ ["to-regex-range", [\ ["npm:5.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/to-regex-range-npm-5.0.1-f1e8263b00-10c0.zip/node_modules/to-regex-range/",\ + "packageLocation": "../../../../.yarn/berry/cache/to-regex-range-npm-5.0.1-f1e8263b00-10c0.zip/node_modules/to-regex-range/",\ "packageDependencies": [\ ["to-regex-range", "npm:5.0.1"],\ ["is-number", "npm:7.0.0"]\ @@ -5326,14 +5326,14 @@ const RAW_RUNTIME_STATE = ]],\ ["ts-api-utils", [\ ["npm:1.3.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/ts-api-utils-npm-1.3.0-33457908f8-10c0.zip/node_modules/ts-api-utils/",\ + "packageLocation": "../../../../.yarn/berry/cache/ts-api-utils-npm-1.3.0-33457908f8-10c0.zip/node_modules/ts-api-utils/",\ "packageDependencies": [\ ["ts-api-utils", "npm:1.3.0"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:3e23c85a11d1f62af53936bafa42353d339449c6bdf97fec1d011de194919db04342a2845eb4cd6e1d81a153cea678c8f341e24583304d74dced371c65a042d5#npm:1.3.0", {\ - "packageLocation": "./.yarn/__virtual__/ts-api-utils-virtual-c38e781bc0/3/AppData/Local/Yarn/Berry/cache/ts-api-utils-npm-1.3.0-33457908f8-10c0.zip/node_modules/ts-api-utils/",\ + "packageLocation": "./.yarn/__virtual__/ts-api-utils-virtual-c38e781bc0/5/.yarn/berry/cache/ts-api-utils-npm-1.3.0-33457908f8-10c0.zip/node_modules/ts-api-utils/",\ "packageDependencies": [\ ["ts-api-utils", "virtual:3e23c85a11d1f62af53936bafa42353d339449c6bdf97fec1d011de194919db04342a2845eb4cd6e1d81a153cea678c8f341e24583304d74dced371c65a042d5#npm:1.3.0"],\ ["@types/typescript", null],\ @@ -5346,7 +5346,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["virtual:73006f23fa4de2f38ebc910e0f75aa1acc6d62e0902d7d0ec7711236ae14cc7366bdfd39fe53d61ae7d940659958989bd85abf2b68caa3c9c4bee95468beb729#npm:1.3.0", {\ - "packageLocation": "./.yarn/__virtual__/ts-api-utils-virtual-e9e1b2ce93/3/AppData/Local/Yarn/Berry/cache/ts-api-utils-npm-1.3.0-33457908f8-10c0.zip/node_modules/ts-api-utils/",\ + "packageLocation": "./.yarn/__virtual__/ts-api-utils-virtual-e9e1b2ce93/5/.yarn/berry/cache/ts-api-utils-npm-1.3.0-33457908f8-10c0.zip/node_modules/ts-api-utils/",\ "packageDependencies": [\ ["ts-api-utils", "virtual:73006f23fa4de2f38ebc910e0f75aa1acc6d62e0902d7d0ec7711236ae14cc7366bdfd39fe53d61ae7d940659958989bd85abf2b68caa3c9c4bee95468beb729#npm:1.3.0"],\ ["@types/typescript", null],\ @@ -5361,7 +5361,7 @@ const RAW_RUNTIME_STATE = ]],\ ["tslib", [\ ["npm:2.7.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/tslib-npm-2.7.0-21668f5c21-10c0.zip/node_modules/tslib/",\ + "packageLocation": "../../../../.yarn/berry/cache/tslib-npm-2.7.0-21668f5c21-10c0.zip/node_modules/tslib/",\ "packageDependencies": [\ ["tslib", "npm:2.7.0"]\ ],\ @@ -5370,7 +5370,7 @@ const RAW_RUNTIME_STATE = ]],\ ["type-check", [\ ["npm:0.4.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/type-check-npm-0.4.0-60565800ce-10c0.zip/node_modules/type-check/",\ + "packageLocation": "../../../../.yarn/berry/cache/type-check-npm-0.4.0-60565800ce-10c0.zip/node_modules/type-check/",\ "packageDependencies": [\ ["type-check", "npm:0.4.0"],\ ["prelude-ls", "npm:1.2.1"]\ @@ -5380,7 +5380,7 @@ const RAW_RUNTIME_STATE = ]],\ ["type-fest", [\ ["npm:0.20.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/type-fest-npm-0.20.2-b36432617f-10c0.zip/node_modules/type-fest/",\ + "packageLocation": "../../../../.yarn/berry/cache/type-fest-npm-0.20.2-b36432617f-10c0.zip/node_modules/type-fest/",\ "packageDependencies": [\ ["type-fest", "npm:0.20.2"]\ ],\ @@ -5389,7 +5389,7 @@ const RAW_RUNTIME_STATE = ]],\ ["typed-array-buffer", [\ ["npm:1.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/typed-array-buffer-npm-1.0.2-31e458f38d-10c0.zip/node_modules/typed-array-buffer/",\ + "packageLocation": "../../../../.yarn/berry/cache/typed-array-buffer-npm-1.0.2-31e458f38d-10c0.zip/node_modules/typed-array-buffer/",\ "packageDependencies": [\ ["typed-array-buffer", "npm:1.0.2"],\ ["call-bind", "npm:1.0.7"],\ @@ -5401,7 +5401,7 @@ const RAW_RUNTIME_STATE = ]],\ ["typed-array-byte-length", [\ ["npm:1.0.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/typed-array-byte-length-npm-1.0.1-9ab0891fb8-10c0.zip/node_modules/typed-array-byte-length/",\ + "packageLocation": "../../../../.yarn/berry/cache/typed-array-byte-length-npm-1.0.1-9ab0891fb8-10c0.zip/node_modules/typed-array-byte-length/",\ "packageDependencies": [\ ["typed-array-byte-length", "npm:1.0.1"],\ ["call-bind", "npm:1.0.7"],\ @@ -5415,7 +5415,7 @@ const RAW_RUNTIME_STATE = ]],\ ["typed-array-byte-offset", [\ ["npm:1.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/typed-array-byte-offset-npm-1.0.2-14b64ee0e1-10c0.zip/node_modules/typed-array-byte-offset/",\ + "packageLocation": "../../../../.yarn/berry/cache/typed-array-byte-offset-npm-1.0.2-14b64ee0e1-10c0.zip/node_modules/typed-array-byte-offset/",\ "packageDependencies": [\ ["typed-array-byte-offset", "npm:1.0.2"],\ ["available-typed-arrays", "npm:1.0.7"],\ @@ -5430,7 +5430,7 @@ const RAW_RUNTIME_STATE = ]],\ ["typed-array-length", [\ ["npm:1.0.6", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/typed-array-length-npm-1.0.6-867a36a1ac-10c0.zip/node_modules/typed-array-length/",\ + "packageLocation": "../../../../.yarn/berry/cache/typed-array-length-npm-1.0.6-867a36a1ac-10c0.zip/node_modules/typed-array-length/",\ "packageDependencies": [\ ["typed-array-length", "npm:1.0.6"],\ ["call-bind", "npm:1.0.7"],\ @@ -5445,7 +5445,7 @@ const RAW_RUNTIME_STATE = ]],\ ["typescript", [\ ["patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/typescript-patch-9fde7bec60-10c0.zip/node_modules/typescript/",\ + "packageLocation": "../../../../.yarn/berry/cache/typescript-patch-9fde7bec60-10c0.zip/node_modules/typescript/",\ "packageDependencies": [\ ["typescript", "patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07"]\ ],\ @@ -5454,7 +5454,7 @@ const RAW_RUNTIME_STATE = ]],\ ["unbox-primitive", [\ ["npm:1.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/unbox-primitive-npm-1.0.2-cb56a05066-10c0.zip/node_modules/unbox-primitive/",\ + "packageLocation": "../../../../.yarn/berry/cache/unbox-primitive-npm-1.0.2-cb56a05066-10c0.zip/node_modules/unbox-primitive/",\ "packageDependencies": [\ ["unbox-primitive", "npm:1.0.2"],\ ["call-bind", "npm:1.0.7"],\ @@ -5467,7 +5467,7 @@ const RAW_RUNTIME_STATE = ]],\ ["unique-filename", [\ ["npm:3.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/unique-filename-npm-3.0.0-77d68e0a45-10c0.zip/node_modules/unique-filename/",\ + "packageLocation": "../../../../.yarn/berry/cache/unique-filename-npm-3.0.0-77d68e0a45-10c0.zip/node_modules/unique-filename/",\ "packageDependencies": [\ ["unique-filename", "npm:3.0.0"],\ ["unique-slug", "npm:4.0.0"]\ @@ -5477,7 +5477,7 @@ const RAW_RUNTIME_STATE = ]],\ ["unique-slug", [\ ["npm:4.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/unique-slug-npm-4.0.0-e6b08f28aa-10c0.zip/node_modules/unique-slug/",\ + "packageLocation": "../../../../.yarn/berry/cache/unique-slug-npm-4.0.0-e6b08f28aa-10c0.zip/node_modules/unique-slug/",\ "packageDependencies": [\ ["unique-slug", "npm:4.0.0"],\ ["imurmurhash", "npm:0.1.4"]\ @@ -5487,14 +5487,14 @@ const RAW_RUNTIME_STATE = ]],\ ["update-browserslist-db", [\ ["npm:1.1.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/update-browserslist-db-npm-1.1.1-16e34017b1-10c0.zip/node_modules/update-browserslist-db/",\ + "packageLocation": "../../../../.yarn/berry/cache/update-browserslist-db-npm-1.1.1-16e34017b1-10c0.zip/node_modules/update-browserslist-db/",\ "packageDependencies": [\ ["update-browserslist-db", "npm:1.1.1"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:6b67324c878ea06e56ed3caefea53f7683e6ecc2f59a5ccb4eed038528684d5d9ad5763adbad2b939021498b8316c469d622a567bb66012ffd14e8022cf45739#npm:1.1.1", {\ - "packageLocation": "./.yarn/__virtual__/update-browserslist-db-virtual-29df3fc383/3/AppData/Local/Yarn/Berry/cache/update-browserslist-db-npm-1.1.1-16e34017b1-10c0.zip/node_modules/update-browserslist-db/",\ + "packageLocation": "./.yarn/__virtual__/update-browserslist-db-virtual-29df3fc383/5/.yarn/berry/cache/update-browserslist-db-npm-1.1.1-16e34017b1-10c0.zip/node_modules/update-browserslist-db/",\ "packageDependencies": [\ ["update-browserslist-db", "virtual:6b67324c878ea06e56ed3caefea53f7683e6ecc2f59a5ccb4eed038528684d5d9ad5763adbad2b939021498b8316c469d622a567bb66012ffd14e8022cf45739#npm:1.1.1"],\ ["@types/browserslist", null],\ @@ -5511,7 +5511,7 @@ const RAW_RUNTIME_STATE = ]],\ ["uri-js", [\ ["npm:4.4.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/uri-js-npm-4.4.1-66d11cbcaf-10c0.zip/node_modules/uri-js/",\ + "packageLocation": "../../../../.yarn/berry/cache/uri-js-npm-4.4.1-66d11cbcaf-10c0.zip/node_modules/uri-js/",\ "packageDependencies": [\ ["uri-js", "npm:4.4.1"],\ ["punycode", "npm:2.3.1"]\ @@ -5521,7 +5521,7 @@ const RAW_RUNTIME_STATE = ]],\ ["util-deprecate", [\ ["npm:1.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/util-deprecate-npm-1.0.2-e3fe1a219c-10c0.zip/node_modules/util-deprecate/",\ + "packageLocation": "../../../../.yarn/berry/cache/util-deprecate-npm-1.0.2-e3fe1a219c-10c0.zip/node_modules/util-deprecate/",\ "packageDependencies": [\ ["util-deprecate", "npm:1.0.2"]\ ],\ @@ -5530,14 +5530,14 @@ const RAW_RUNTIME_STATE = ]],\ ["vite", [\ ["npm:5.4.8", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/vite-npm-5.4.8-0e6d2e051d-10c0.zip/node_modules/vite/",\ + "packageLocation": "../../../../.yarn/berry/cache/vite-npm-5.4.8-0e6d2e051d-10c0.zip/node_modules/vite/",\ "packageDependencies": [\ ["vite", "npm:5.4.8"]\ ],\ "linkType": "SOFT"\ }],\ ["virtual:7ff15405ea2a649bedb31b53eb450b593e17c2290ffe01050ae1173d21896ac6c71075320c9f785857328929ff5965843d133b83cfa1c0dfdbb3e8f91e535cc1#npm:5.4.8", {\ - "packageLocation": "./.yarn/__virtual__/vite-virtual-3622bc7094/3/AppData/Local/Yarn/Berry/cache/vite-npm-5.4.8-0e6d2e051d-10c0.zip/node_modules/vite/",\ + "packageLocation": "./.yarn/__virtual__/vite-virtual-3622bc7094/5/.yarn/berry/cache/vite-npm-5.4.8-0e6d2e051d-10c0.zip/node_modules/vite/",\ "packageDependencies": [\ ["vite", "virtual:7ff15405ea2a649bedb31b53eb450b593e17c2290ffe01050ae1173d21896ac6c71075320c9f785857328929ff5965843d133b83cfa1c0dfdbb3e8f91e535cc1#npm:5.4.8"],\ ["@types/less", null],\ @@ -5582,7 +5582,7 @@ const RAW_RUNTIME_STATE = ]],\ ["which", [\ ["npm:2.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/which-npm-2.0.2-320ddf72f7-10c0.zip/node_modules/which/",\ + "packageLocation": "../../../../.yarn/berry/cache/which-npm-2.0.2-320ddf72f7-10c0.zip/node_modules/which/",\ "packageDependencies": [\ ["which", "npm:2.0.2"],\ ["isexe", "npm:2.0.0"]\ @@ -5590,7 +5590,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["npm:4.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/which-npm-4.0.0-dd31cd4928-10c0.zip/node_modules/which/",\ + "packageLocation": "../../../../.yarn/berry/cache/which-npm-4.0.0-dd31cd4928-10c0.zip/node_modules/which/",\ "packageDependencies": [\ ["which", "npm:4.0.0"],\ ["isexe", "npm:3.1.1"]\ @@ -5600,7 +5600,7 @@ const RAW_RUNTIME_STATE = ]],\ ["which-boxed-primitive", [\ ["npm:1.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/which-boxed-primitive-npm-1.0.2-e214f9ae5a-10c0.zip/node_modules/which-boxed-primitive/",\ + "packageLocation": "../../../../.yarn/berry/cache/which-boxed-primitive-npm-1.0.2-e214f9ae5a-10c0.zip/node_modules/which-boxed-primitive/",\ "packageDependencies": [\ ["which-boxed-primitive", "npm:1.0.2"],\ ["is-bigint", "npm:1.0.4"],\ @@ -5614,7 +5614,7 @@ const RAW_RUNTIME_STATE = ]],\ ["which-builtin-type", [\ ["npm:1.1.4", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/which-builtin-type-npm-1.1.4-23f1df9013-10c0.zip/node_modules/which-builtin-type/",\ + "packageLocation": "../../../../.yarn/berry/cache/which-builtin-type-npm-1.1.4-23f1df9013-10c0.zip/node_modules/which-builtin-type/",\ "packageDependencies": [\ ["which-builtin-type", "npm:1.1.4"],\ ["function.prototype.name", "npm:1.1.6"],\ @@ -5635,7 +5635,7 @@ const RAW_RUNTIME_STATE = ]],\ ["which-collection", [\ ["npm:1.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/which-collection-npm-1.0.2-0d6277e921-10c0.zip/node_modules/which-collection/",\ + "packageLocation": "../../../../.yarn/berry/cache/which-collection-npm-1.0.2-0d6277e921-10c0.zip/node_modules/which-collection/",\ "packageDependencies": [\ ["which-collection", "npm:1.0.2"],\ ["is-map", "npm:2.0.3"],\ @@ -5648,7 +5648,7 @@ const RAW_RUNTIME_STATE = ]],\ ["which-typed-array", [\ ["npm:1.1.15", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/which-typed-array-npm-1.1.15-91410874a2-10c0.zip/node_modules/which-typed-array/",\ + "packageLocation": "../../../../.yarn/berry/cache/which-typed-array-npm-1.1.15-91410874a2-10c0.zip/node_modules/which-typed-array/",\ "packageDependencies": [\ ["which-typed-array", "npm:1.1.15"],\ ["available-typed-arrays", "npm:1.0.7"],\ @@ -5662,7 +5662,7 @@ const RAW_RUNTIME_STATE = ]],\ ["word-wrap", [\ ["npm:1.2.5", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/word-wrap-npm-1.2.5-42d00c4b09-10c0.zip/node_modules/word-wrap/",\ + "packageLocation": "../../../../.yarn/berry/cache/word-wrap-npm-1.2.5-42d00c4b09-10c0.zip/node_modules/word-wrap/",\ "packageDependencies": [\ ["word-wrap", "npm:1.2.5"]\ ],\ @@ -5671,7 +5671,7 @@ const RAW_RUNTIME_STATE = ]],\ ["wrap-ansi", [\ ["npm:7.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/wrap-ansi-npm-7.0.0-ad6e1a0554-10c0.zip/node_modules/wrap-ansi/",\ + "packageLocation": "../../../../.yarn/berry/cache/wrap-ansi-npm-7.0.0-ad6e1a0554-10c0.zip/node_modules/wrap-ansi/",\ "packageDependencies": [\ ["wrap-ansi", "npm:7.0.0"],\ ["ansi-styles", "npm:4.3.0"],\ @@ -5681,7 +5681,7 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }],\ ["npm:8.1.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/wrap-ansi-npm-8.1.0-26a4e6ae28-10c0.zip/node_modules/wrap-ansi/",\ + "packageLocation": "../../../../.yarn/berry/cache/wrap-ansi-npm-8.1.0-26a4e6ae28-10c0.zip/node_modules/wrap-ansi/",\ "packageDependencies": [\ ["wrap-ansi", "npm:8.1.0"],\ ["ansi-styles", "npm:6.2.1"],\ @@ -5693,7 +5693,7 @@ const RAW_RUNTIME_STATE = ]],\ ["wrappy", [\ ["npm:1.0.2", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/wrappy-npm-1.0.2-916de4d4b3-10c0.zip/node_modules/wrappy/",\ + "packageLocation": "../../../../.yarn/berry/cache/wrappy-npm-1.0.2-916de4d4b3-10c0.zip/node_modules/wrappy/",\ "packageDependencies": [\ ["wrappy", "npm:1.0.2"]\ ],\ @@ -5702,14 +5702,14 @@ const RAW_RUNTIME_STATE = ]],\ ["yallist", [\ ["npm:3.1.1", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/yallist-npm-3.1.1-a568a556b4-10c0.zip/node_modules/yallist/",\ + "packageLocation": "../../../../.yarn/berry/cache/yallist-npm-3.1.1-a568a556b4-10c0.zip/node_modules/yallist/",\ "packageDependencies": [\ ["yallist", "npm:3.1.1"]\ ],\ "linkType": "HARD"\ }],\ ["npm:4.0.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/yallist-npm-4.0.0-b493d9e907-10c0.zip/node_modules/yallist/",\ + "packageLocation": "../../../../.yarn/berry/cache/yallist-npm-4.0.0-b493d9e907-10c0.zip/node_modules/yallist/",\ "packageDependencies": [\ ["yallist", "npm:4.0.0"]\ ],\ @@ -5718,7 +5718,7 @@ const RAW_RUNTIME_STATE = ]],\ ["yocto-queue", [\ ["npm:0.1.0", {\ - "packageLocation": "../../AppData/Local/Yarn/Berry/cache/yocto-queue-npm-0.1.0-c6c9a7db29-10c0.zip/node_modules/yocto-queue/",\ + "packageLocation": "../../../../.yarn/berry/cache/yocto-queue-npm-0.1.0-c6c9a7db29-10c0.zip/node_modules/yocto-queue/",\ "packageDependencies": [\ ["yocto-queue", "npm:0.1.0"]\ ],\ diff --git a/core/dist/components/BlockView.d.ts b/core/dist/components/BlockView.d.ts index ae1b2e4..23b069b 100644 --- a/core/dist/components/BlockView.d.ts +++ b/core/dist/components/BlockView.d.ts @@ -1,7 +1,8 @@ import { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts'; interface BlockViewProps { scripts: Script[]; - currentScriptIndex: number; + currentScriptIndex: number | null; + currentVideoScriptIndex: number | null; selectedLanguages: T[]; seekTo: (timeInSeconds: number) => void; onClickScript: (script: Script, index: number) => void; @@ -9,6 +10,6 @@ interface BlockViewProps { timeStyle?: TimeStyle; textStyle?: TextStyle; } -export declare function BlockView({ scripts, currentScriptIndex, selectedLanguages, seekTo, onClickScript, onSelectWord, timeStyle, textStyle, }: BlockViewProps): import("react/jsx-runtime").JSX.Element; +export declare function BlockView({ scripts, currentScriptIndex, currentVideoScriptIndex, selectedLanguages, seekTo, onClickScript, onSelectWord, timeStyle, textStyle, }: BlockViewProps): import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=BlockView.d.ts.map \ No newline at end of file diff --git a/core/dist/components/BlockView.d.ts.map b/core/dist/components/BlockView.d.ts.map index 28ae734..9502586 100644 --- a/core/dist/components/BlockView.d.ts.map +++ b/core/dist/components/BlockView.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"BlockView.d.ts","sourceRoot":"","sources":["../../src/components/BlockView.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAMhF,UAAU,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACtD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAGD,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACzD,OAAO,EACP,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,aAAa,EACb,YAAY,EACZ,SAAS,EACT,SAAS,GACV,EAAE,cAAc,CAAC,CAAC,CAAC,2CA8DnB"} \ No newline at end of file +{"version":3,"file":"BlockView.d.ts","sourceRoot":"","sources":["../../src/components/BlockView.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAOhF,UAAU,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACtD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAGD,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACzD,OAAO,EACP,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,EACjB,MAAM,EACN,aAAa,EACb,YAAY,EACZ,SAAS,EACT,SAAS,GACV,EAAE,cAAc,CAAC,CAAC,CAAC,2CA8DnB"} \ No newline at end of file diff --git a/core/dist/components/LineView.d.ts b/core/dist/components/LineView.d.ts index 9769e4c..52e658a 100644 --- a/core/dist/components/LineView.d.ts +++ b/core/dist/components/LineView.d.ts @@ -3,6 +3,7 @@ interface LineViewProps { scripts: Script[]; selectedLanguages: T[]; currentScriptIndex: number; + currentVideoScriptIndex: number | null; seekTo: (timeInSeconds: number) => void; onSelectWord: (word: string, script: Script, index: number) => void; textStyle?: TextStyle; diff --git a/core/dist/components/LineView.d.ts.map b/core/dist/components/LineView.d.ts.map index 6e74580..fe39288 100644 --- a/core/dist/components/LineView.d.ts.map +++ b/core/dist/components/LineView.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"LineView.d.ts","sourceRoot":"","sources":["../../src/components/LineView.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAQxE,UAAU,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACrD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI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S,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IACnE,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;CACpE;AAGD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACxD,OAAO,EACP,iBAAiB,EACjB,kBAAkB,EAClB,MAAM,EACN,YAAY,EACZ,SAAS,EACT,UAAU,EACV,UAAU,GACX,EAAE,aAAa,CAAC,CAAC,CAAC,2CAgElB"} \ No newline at end of file diff --git a/core/dist/components/ReactScriptPlayer.d.ts.map b/core/dist/components/ReactScriptPlayer.d.ts.map index ae7fe32..b84c210 100644 --- a/core/dist/components/ReactScriptPlayer.d.ts.map +++ b/core/dist/components/ReactScriptPlayer.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ReactScriptPlayer.d.ts","sourceRoot":"","sources":["../../src/components/ReactScriptPlayer.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,MAAM,EACN,cAAc,EACd,SAAS,EACT,SAAS,EACV,MAAM,uBAAuB,CAAC;AAK/B,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACrE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IACnE,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;CACpE;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACjE,IAAI,EACJ,OAAO,EACP,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,aAAa,EACb,YAAY,EACZ,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,GACX,EAAE,sBAAsB,CAAC,CAAC,CAAC,2CA+B3B"} \ No newline at end of file +{"version":3,"file":"ReactScriptPlayer.d.ts","sourceRoot":"","sources":["../../src/components/ReactScriptPlayer.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,MAAM,EACN,cAAc,EACd,SAAS,EACT,SAAS,EACV,MAAM,uBAAuB,CAAC;AAM/B,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACrE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IACnE,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;CACpE;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACjE,IAAI,EACJ,OAAO,EACP,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,aAAa,EACb,YAAY,EACZ,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,GACX,EAAE,sBAAsB,CAAC,CAAC,CAAC,2CA0D3B"} \ No newline at end of file diff --git a/core/dist/hooks/useThrottling.d.ts b/core/dist/hooks/useThrottling.d.ts index 0d49fe1..0defa53 100644 --- a/core/dist/hooks/useThrottling.d.ts +++ b/core/dist/hooks/useThrottling.d.ts @@ -1,7 +1,7 @@ -interface ThrottlingProps { - buttonClicked: () => void; +interface ThrottlingProps { + buttonClicked: (arg: T) => void; delay?: number; } -export default function useThrottling({ buttonClicked, delay, }: ThrottlingProps): () => void; +export default function useThrottling({ buttonClicked, delay, }: ThrottlingProps): (arg: T) => void; export {}; //# sourceMappingURL=useThrottling.d.ts.map \ No newline at end of file diff --git a/core/dist/hooks/useThrottling.d.ts.map b/core/dist/hooks/useThrottling.d.ts.map index a875114..e1eea58 100644 --- a/core/dist/hooks/useThrottling.d.ts.map +++ b/core/dist/hooks/useThrottling.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"useThrottling.d.ts","sourceRoot":"","sources":["../../src/hooks/useThrottling.ts"],"names":[],"mappings":"AAEA,UAAU,eAAe;IACvB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,aAAa,EACb,KAAW,GACZ,EAAE,eAAe,cAcjB"} \ No newline at end of file +{"version":3,"file":"useThrottling.d.ts","sourceRoot":"","sources":["../../src/hooks/useThrottling.ts"],"names":[],"mappings":"AAEA,UAAU,eAAe,CAAC,CAAC;IACzB,aAAa,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,CAAC,EAAE,EACvC,aAAa,EACb,KAAS,GACV,EAAE,eAAe,CAAC,CAAC,CAAC,SAIX,CAAC,UAaV"} \ No newline at end of file diff --git a/core/dist/index.js b/core/dist/index.js index 7635b1e..945016a 100644 --- a/core/dist/index.js +++ b/core/dist/index.js @@ -1,3 +1,6 @@ +// src/components/ReactScriptPlayer.tsx +import { useState as useState2 } from "react"; + // esbuild-scss-modules-plugin:./ReactScriptPlayer.module.scss var digest = "9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50"; var classes = { "scriptsContainer": "_scriptsContainer_1tyea_7", "title": "_title_1tyea_18", "lineViewContainer": "_lineViewContainer_1tyea_23", "skipButtonContainer": "_skipButtonContainer_1tyea_28", "blockViewContainer": "_blockViewContainer_1tyea_35", "scriptItem": "_scriptItem_1tyea_42", "timeButton": "_timeButton_1tyea_47", "textView": "_textView_1tyea_60", "highlighted": "_highlighted_1tyea_65" }; @@ -78,6 +81,12 @@ var css = `* { })(); var ReactScriptPlayer_module_default = classes; +// src/utils/findClickedIndex.ts +var findClickIndex = (scripts, clickedIndex) => { + if (!scripts || scripts.length === 0) return null; + return clickedIndex >= 0 && clickedIndex < scripts.length ? clickedIndex : null; +}; + // src/hooks/useThrottling.ts import { useState, useCallback } from "react"; function useThrottling({ @@ -85,15 +94,18 @@ function useThrottling({ delay = 300 }) { const [isThrottled, setIsThrottled] = useState(false); - const throttledCallback = useCallback(() => { - if (!isThrottled) { - buttonClicked(); - setIsThrottled(true); - setTimeout(() => { - setIsThrottled(false); - }, delay); - } - }, [isThrottled, buttonClicked, delay]); + const throttledCallback = useCallback( + (arg) => { + if (!isThrottled) { + buttonClicked(arg); + setIsThrottled(true); + setTimeout(() => { + setIsThrottled(false); + }, delay); + } + }, + [isThrottled, buttonClicked, delay] + ); return throttledCallback; } @@ -137,6 +149,16 @@ function TextDisplay({ ); } +// src/utils/moveToScriptAtIndex.ts +var moveToScriptAtIndex = (index, scripts, seekTo) => { + if (index < 0 || index >= scripts.length - 1) { + console.warn("Invalid script index:", index); + return; + } + console.log("Seeking to:", scripts[index]); + seekTo(scripts[index].startTimeInSecond); +}; + // src/components/LineView.tsx import { jsx as jsx2, jsxs } from "react/jsx-runtime"; function LineView({ @@ -149,27 +171,21 @@ function LineView({ PrevButton, NextButton }) { - const totalScripts = scripts.length; - const handlePrevious = () => { - if (currentScriptIndex > 0) { - seekTo(scripts[currentScriptIndex - 1].startTimeInSecond); - } - }; - const handleNext = () => { - if (currentScriptIndex < totalScripts - 1) { - seekTo(scripts[currentScriptIndex + 1].startTimeInSecond); - } - }; const throttledHandlePrevious = useThrottling({ - buttonClicked: handlePrevious + buttonClicked: (currentScriptIndex2) => moveToScriptAtIndex(currentScriptIndex2 - 1, scripts, seekTo) }); const throttledHandleNext = useThrottling({ - buttonClicked: handleNext + buttonClicked: (currentScriptIndex2) => moveToScriptAtIndex(currentScriptIndex2 + 1, scripts, seekTo) }); return /* @__PURE__ */ jsxs("div", { className: ReactScriptPlayer_module_default.lineViewContainer, children: [ /* @__PURE__ */ jsxs("div", { className: ReactScriptPlayer_module_default.skipButtonContainer, children: [ - PrevButton ? /* @__PURE__ */ jsx2(PrevButton, { onClick: throttledHandlePrevious }) : /* @__PURE__ */ jsx2("button", { onClick: throttledHandlePrevious, children: /* @__PURE__ */ jsx2("img", { src: arrow_back_default, alt: "Back Arrow" }) }), - NextButton ? /* @__PURE__ */ jsx2(NextButton, { onClick: throttledHandleNext }) : /* @__PURE__ */ jsx2("button", { onClick: throttledHandleNext, children: /* @__PURE__ */ jsx2("img", { src: arrow_forward_default, alt: "Forward Arrow" }) }) + PrevButton ? /* @__PURE__ */ jsx2( + PrevButton, + { + onClick: () => throttledHandlePrevious(currentScriptIndex) + } + ) : /* @__PURE__ */ jsx2("button", { onClick: () => throttledHandlePrevious(currentScriptIndex), children: /* @__PURE__ */ jsx2("img", { src: arrow_back_default, alt: "Back Arrow" }) }), + NextButton ? /* @__PURE__ */ jsx2(NextButton, { onClick: () => throttledHandleNext(currentScriptIndex) }) : /* @__PURE__ */ jsx2("button", { onClick: () => throttledHandleNext(currentScriptIndex), children: /* @__PURE__ */ jsx2("img", { src: arrow_forward_default, alt: "Forward Arrow" }) }) ] }), scripts[currentScriptIndex] && /* @__PURE__ */ jsx2( TextDisplay, @@ -228,7 +244,7 @@ function BlockView({ { className: ReactScriptPlayer_module_default.scriptItem, onClick: () => { - seekTo(script.startTimeInSecond); + moveToScriptAtIndex(index, scripts, seekTo); onClickScript(script, index); }, style: { @@ -297,8 +313,14 @@ function ReactScriptPlayer({ PrevButton, NextButton }) { - var _a; - const currentScriptIndex = (_a = findCurrentScriptIndex(scripts, currentTime)) != null ? _a : 0; + var _a, _b; + const [isAsync, setIsAsync] = useState2(true); + const [clickedIndex, setClickedIndex] = useState2(0); + const currentScriptIndex = isAsync ? (_a = findCurrentScriptIndex(scripts, currentTime)) != null ? _a : 0 : (_b = findClickIndex(scripts, clickedIndex)) != null ? _b : 0; + const handleClickScript = (script, index) => { + setClickedIndex(index); + onClickScript(script, index); + }; const scriptPlayerProps = { scripts, currentScriptIndex, @@ -315,7 +337,7 @@ function ReactScriptPlayer({ BlockView, { ...scriptPlayerProps, - onClickScript, + onClickScript: handleClickScript, timeStyle, textStyle } diff --git a/core/dist/index.js.map b/core/dist/index.js.map index d8fae2b..4ca17fb 100644 --- a/core/dist/index.js.map +++ b/core/dist/index.js.map @@ -1,7 +1,7 @@ { "version": 3, - "sources": ["esbuild-scss-modules-plugin:./ReactScriptPlayer.module.scss", "../src/hooks/useThrottling.ts", "../src/components/TextDisplay.tsx", "../src/components/LineView.tsx", "../src/components/BlockView.tsx", "../src/utils/convertTime.ts", "../src/utils/findCurrentScriptIndex.ts", "../src/components/ReactScriptPlayer.tsx"], - "sourcesContent": ["\nconst digest = '9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50';\nconst classes = {\"scriptsContainer\":\"_scriptsContainer_1tyea_7\",\"title\":\"_title_1tyea_18\",\"lineViewContainer\":\"_lineViewContainer_1tyea_23\",\"skipButtonContainer\":\"_skipButtonContainer_1tyea_28\",\"blockViewContainer\":\"_blockViewContainer_1tyea_35\",\"scriptItem\":\"_scriptItem_1tyea_42\",\"timeButton\":\"_timeButton_1tyea_47\",\"textView\":\"_textView_1tyea_60\",\"highlighted\":\"_highlighted_1tyea_65\"};\nconst css = `* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n._scriptsContainer_1tyea_7 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n width: 100%;\n height: auto;\n padding: 1.5rem;\n border: 2px solid #ececec;\n border-radius: 0.75rem;\n}\n\n._title_1tyea_18 {\n font-size: 1.25rem;\n font-weight: 700;\n}\n\n._lineViewContainer_1tyea_23 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 {\n align-self: end;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 button {\n cursor: pointer;\n}\n\n._blockViewContainer_1tyea_35 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n height: 16rem;\n overflow-y: auto;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 {\n padding: 16px;\n border-radius: 12px;\n transition: background-color 0.5s ease-in-out;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 ._timeButton_1tyea_47 {\n width: 5rem;\n padding-inline: 0.75rem;\n padding-block: 0.5rem;\n margin-bottom: 0.5rem;\n border: none;\n border-radius: 9999px;\n background-color: gray;\n cursor: pointer;\n font-size: 0.75rem;\n color: white;\n}\n\n._textView_1tyea_60 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n._textView_1tyea_60._highlighted_1tyea_65 {\n background-color: #fef08a;\n}`;\n\n(function() {\n if (typeof document !== \"undefined\" && !document.getElementById(digest)) {\n var ele = document.createElement('style');\n ele.id = digest;\n ele.textContent = css;\n document.head.appendChild(ele);\n }\n})();\n\nexport default classes;\nexport { css, digest, classes };\n ", "import { useState, useCallback } from 'react';\n\ninterface ThrottlingProps {\n buttonClicked: () => void;\n delay?: number; // Optional delay prop\n}\n\nexport default function useThrottling({\n buttonClicked,\n delay = 300,\n}: ThrottlingProps) {\n const [isThrottled, setIsThrottled] = useState(false);\n\n const throttledCallback = useCallback(() => {\n if (!isThrottled) {\n buttonClicked();\n setIsThrottled(true);\n setTimeout(() => {\n setIsThrottled(false);\n }, delay);\n }\n }, [isThrottled, buttonClicked, delay]);\n\n return throttledCallback;\n}\n", "import React from 'react';\nimport { Script, LanguageCode, TextStyle } from '../interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface TextDisplayProps {\n script: Script;\n selectedLanguages: T[];\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n}\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uC801\uC6A9\nexport function TextDisplay({\n script,\n selectedLanguages,\n onSelectWord,\n textStyle,\n}: TextDisplayProps) {\n return (\n \n {selectedLanguages.map((language) => (\n {\n const selection = window.getSelection();\n if (selection && selection.toString()) {\n const selectedWord = selection.toString().trim();\n if (selectedWord) {\n onSelectWord(selectedWord, script, 0);\n }\n }\n }}\n >\n {script[language] || `(${language} \uC790\uB9C9\uC774 \uC5C6\uC5B4\uC694!)`}\n

\n ))}\n \n );\n}\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n\n // \uC790\uB9C9 \uD14D\uC2A4\uD2B8 \uC2A4\uD0C0\uC77C\uB9C1\n textStyle?: TextStyle;\n // \uC790\uB9C9 \uB118\uAE30\uAE30 \uBC84\uD2BC\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n const totalScripts = scripts.length;\n\n const handlePrevious = () => {\n if (currentScriptIndex > 0) {\n seekTo(scripts[currentScriptIndex - 1].startTimeInSecond);\n }\n };\n\n const handleNext = () => {\n if (currentScriptIndex < totalScripts - 1) {\n seekTo(scripts[currentScriptIndex + 1].startTimeInSecond);\n }\n };\n\n const throttledHandlePrevious = useThrottling({\n buttonClicked: handlePrevious,\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: handleNext,\n });\n\n return (\n
\n
\n {PrevButton ? (\n \n ) : (\n \n )}\n {NextButton ? (\n \n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n}\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n\n useEffect(() => {\n if (containerRef.current) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex]);\n\n return (\n
\n {scripts.map((script, index) => (\n {\n seekTo(script.startTimeInSecond);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n \n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n", "import React from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\n\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n}: ReactScriptPlayerProps) {\n const currentScriptIndex = findCurrentScriptIndex(scripts, currentTime) ?? 0;\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n return (\n
\n
\n

Transcript

\n {mode === 'line' ? (\n \n ) : (\n \n )}\n
\n
\n );\n}\n"], - "mappings": ";AACA,IAAM,SAAS;AACf,IAAM,UAAU,EAAC,oBAAmB,6BAA4B,SAAQ,mBAAkB,qBAAoB,+BAA8B,uBAAsB,iCAAgC,sBAAqB,gCAA+B,cAAa,wBAAuB,cAAa,w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C,WACC,OAAO,oBAAoB,kBAAkB,eAC7C,OAAO,oBAAoB,OAAO,mBAAmB,gBACnD;AAAA,EACN;AACA,SAAO,UAAU,KACb,QAAQ,SAAS,IAAI,QACrB;AACN;;;ACwBM,SACE,OAAAC,MADF,QAAAC,aAAA;AA7BC,SAAS,kBAAmD;AAAA,EACjE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA8B;AAzC9B;AA0CE,QAAM,sBAAqB,4BAAuB,SAAS,WAAW,MAA3C,YAAgD;AAE3E,QAAM,oBAAoB;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SACE,gBAAAD,KAAC,SAAI,WAAW,iCAAO,kBAAkB,OAAO,EAAE,GAAG,eAAe,GAClE,0BAAAC,MAAC,SAAI,WAAW,iCAAO,kBACrB;AAAA,oBAAAD,KAAC,OAAE,WAAW,iCAAO,OAAO,wBAAU;AAAA,IACrC,SAAS,SACR,gBAAAA,KAAC,YAAU,GAAG,mBAAmB,WAAsB,IAEvD,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ,GACF;AAEJ;", - "names": ["jsx", "jsx", "jsxs", "index", "jsx", "jsxs"] + "sources": ["../src/components/ReactScriptPlayer.tsx", "esbuild-scss-modules-plugin:./ReactScriptPlayer.module.scss", "../src/utils/findClickedIndex.ts", "../src/hooks/useThrottling.ts", "../src/components/TextDisplay.tsx", "../src/utils/moveToScriptAtIndex.ts", "../src/components/LineView.tsx", "../src/components/BlockView.tsx", "../src/utils/convertTime.ts", "../src/utils/findCurrentScriptIndex.ts"], + "sourcesContent": ["import React, { useState } from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { findClickIndex } from 'utils/findClickedIndex';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\n\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n}: ReactScriptPlayerProps) {\n //async\uC5EC\uBD80\uC5D0 \uB530\uB77C currentScriptIndex\uAC00 \uB2EC\uB77C\uC838\uC57C\uD568\n\n const [isAsync, setIsAsync] = useState(true);\n const [clickedIndex, setClickedIndex] = useState(0);\n\n const currentScriptIndex = isAsync\n ? (findCurrentScriptIndex(scripts, currentTime) ?? 0)\n : (findClickIndex(scripts, clickedIndex) ?? 0);\n\n const handleClickScript = (script: Script, index: number) => {\n setClickedIndex(index);\n onClickScript(script, index);\n };\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n return (\n
\n
\n

Transcript

\n {mode === 'line' ? (\n \n ) : (\n \n )}\n
\n
\n );\n}\n", "\nconst digest = '9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50';\nconst classes = {\"scriptsContainer\":\"_scriptsContainer_1tyea_7\",\"title\":\"_title_1tyea_18\",\"lineViewContainer\":\"_lineViewContainer_1tyea_23\",\"skipButtonContainer\":\"_skipButtonContainer_1tyea_28\",\"blockViewContainer\":\"_blockViewContainer_1tyea_35\",\"scriptItem\":\"_scriptItem_1tyea_42\",\"timeButton\":\"_timeButton_1tyea_47\",\"textView\":\"_textView_1tyea_60\",\"highlighted\":\"_highlighted_1tyea_65\"};\nconst css = `* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n._scriptsContainer_1tyea_7 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n width: 100%;\n height: auto;\n padding: 1.5rem;\n border: 2px solid #ececec;\n border-radius: 0.75rem;\n}\n\n._title_1tyea_18 {\n font-size: 1.25rem;\n font-weight: 700;\n}\n\n._lineViewContainer_1tyea_23 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 {\n align-self: end;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 button {\n cursor: pointer;\n}\n\n._blockViewContainer_1tyea_35 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n height: 16rem;\n overflow-y: auto;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 {\n padding: 16px;\n border-radius: 12px;\n transition: background-color 0.5s ease-in-out;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 ._timeButton_1tyea_47 {\n width: 5rem;\n padding-inline: 0.75rem;\n padding-block: 0.5rem;\n margin-bottom: 0.5rem;\n border: none;\n border-radius: 9999px;\n background-color: gray;\n cursor: pointer;\n font-size: 0.75rem;\n color: white;\n}\n\n._textView_1tyea_60 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n._textView_1tyea_60._highlighted_1tyea_65 {\n background-color: #fef08a;\n}`;\n\n(function() {\n if (typeof document !== \"undefined\" && !document.getElementById(digest)) {\n var ele = document.createElement('style');\n ele.id = digest;\n ele.textContent = css;\n document.head.appendChild(ele);\n }\n})();\n\nexport default classes;\nexport { css, digest, classes };\n ", "// findClickIndex.ts\nimport { Script } from 'interfaces/Scripts';\n\nexport const findClickIndex = (\n scripts: Script[] | undefined,\n clickedIndex: number,\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n return clickedIndex >= 0 && clickedIndex < scripts.length\n ? clickedIndex\n : null;\n};\n", "import { useState, useCallback } from 'react';\n\ninterface ThrottlingProps {\n buttonClicked: (arg: T) => void;\n delay?: number; // Optional delay prop\n}\n\nexport default function useThrottling({\n buttonClicked,\n delay = 300,\n}: ThrottlingProps) {\n const [isThrottled, setIsThrottled] = useState(false);\n\n const throttledCallback = useCallback(\n (arg: T) => {\n if (!isThrottled) {\n buttonClicked(arg);\n setIsThrottled(true);\n setTimeout(() => {\n setIsThrottled(false);\n }, delay);\n }\n },\n [isThrottled, buttonClicked, delay],\n );\n\n return throttledCallback;\n}\n", "import React from 'react';\nimport { Script, LanguageCode, TextStyle } from '../interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface TextDisplayProps {\n script: Script;\n selectedLanguages: T[];\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n}\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uC801\uC6A9\nexport function TextDisplay({\n script,\n selectedLanguages,\n onSelectWord,\n textStyle,\n}: TextDisplayProps) {\n return (\n \n {selectedLanguages.map((language) => (\n {\n const selection = window.getSelection();\n if (selection && selection.toString()) {\n const selectedWord = selection.toString().trim();\n if (selectedWord) {\n onSelectWord(selectedWord, script, 0);\n }\n }\n }}\n >\n {script[language] || `(${language} \uC790\uB9C9\uC774 \uC5C6\uC5B4\uC694!)`}\n

\n ))}\n \n );\n}\n", "import { Script } from '../interfaces/Scripts';\n\nexport const moveToScriptAtIndex = (\n index: number,\n scripts: Script[],\n seekTo: (timeInSeconds: number) => void,\n) => {\n // \uC720\uD6A8\uD55C \uC778\uB371\uC2A4\uC778\uC9C0 \uD655\uC778\n if (index < 0 || index >= scripts.length - 1) {\n console.warn('Invalid script index:', index);\n return;\n }\n\n // \uC2A4\uD06C\uB9BD\uD2B8 \uC2DC\uC791 \uC2DC\uAC04\uC73C\uB85C \uC774\uB3D9\n console.log('Seeking to:', scripts[index]);\n\n seekTo(scripts[index].startTimeInSecond);\n};\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n // const totalScripts = scripts.length;\n\n // const handlePrevious = () => {\n // if (currentScriptIndex > 0) {\n // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond);\n // }\n // console.log(\n // '\uC804\uC73C\uB85C \uC774\uB3D9 ',\n // scripts[currentScriptIndex - 1].startTimeInSecond,\n // );\n // };\n\n // const handleNext = () => {\n // if (currentScriptIndex < totalScripts - 1) {\n // console.log(\n // '\uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9',\n // scripts[currentScriptIndex + 1].startTimeInSecond,\n // );\n // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond);\n // }\n // };\n\n const throttledHandlePrevious = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo),\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo),\n });\n\n // console.log(currentScriptIndex);\n\n return (\n
\n
\n {PrevButton ? (\n throttledHandlePrevious(currentScriptIndex)}\n />\n ) : (\n \n )}\n {NextButton ? (\n throttledHandleNext(currentScriptIndex)} />\n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n}\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n\n useEffect(() => {\n if (containerRef.current) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex]);\n\n return (\n
\n {scripts.map((script, index) => (\n {\n moveToScriptAtIndex(index, scripts, seekTo);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n \n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n"], + "mappings": ";AAAA,SAAgB,YAAAA,iBAAgB;;;ACChC,IAAM,SAAS;AACf,IAAM,UAAU,EAAC,oBAAmB,6BAA4B,SAAQ,mBAAkB,qBAAoB,+BAA8B,uBAAsB,iCAAgC,sBAAqB,gCAA+B,cAAa,wBAAuB,cAAa,wBAAuB,YAAW,sBAAqB,eAAc,wBAAuB;AACnY,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAoEX,WAAW;AACV,MAAI,OAAO,aAAa,eAAe,CAAC,SAAS,eAAe,MAAM,GAAG;AACvE,QAAI,MAAM,SAAS,cAAc,OAA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EACjE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA8B;AA1C9B;AA6CE,QAAM,CAAC,SAAS,UAAU,IAAIC,UAAkB,IAAI;AACpD,QAAM,CAAC,cAAc,eAAe,IAAIA,UAAiB,CAAC;AAE1D,QAAM,qBAAqB,WACtB,4BAAuB,SAAS,WAAW,MAA3C,YAAgD,KAChD,oBAAe,SAAS,YAAY,MAApC,YAAyC;AAE9C,QAAM,oBAAoB,CAAC,QAAmB,UAAkB;AAC9D,oBAAgB,KAAK;AACrB,kBAAc,QAAQ,KAAK;AAAA,EAC7B;AAEA,QAAM,oBAAoB;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SACE,gBAAAF,KAAC,SAAI,WAAW,iCAAO,kBAAkB,OAAO,EAAE,GAAG,eAAe,GAClE,0BAAAC,MAAC,SAAI,WAAW,iCAAO,kBACrB;AAAA,oBAAAD,KAAC,OAAE,WAAW,iCAAO,OAAO,wBAAU;AAAA,IACrC,SAAS,SACR,gBAAAA,KAAC,YAAU,GAAG,mBAAmB,WAAsB,IAEvD,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,eAAe;AAAA,QACf;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ,GACF;AAEJ;", + "names": ["useState", "jsx", "currentScriptIndex", "jsx", "jsxs", "index", "jsx", "jsxs", "useState"] } diff --git a/core/dist/utils/findClickedIndex.d.ts b/core/dist/utils/findClickedIndex.d.ts new file mode 100644 index 0000000..d365586 --- /dev/null +++ b/core/dist/utils/findClickedIndex.d.ts @@ -0,0 +1,3 @@ +import { Script } from 'interfaces/Scripts'; +export declare const findClickIndex: (scripts: Script[] | undefined, clickedIndex: number) => number | null; +//# sourceMappingURL=findClickedIndex.d.ts.map \ No newline at end of file diff --git a/core/dist/utils/findClickedIndex.d.ts.map b/core/dist/utils/findClickedIndex.d.ts.map new file mode 100644 index 0000000..f7841ee --- /dev/null +++ b/core/dist/utils/findClickedIndex.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"findClickedIndex.d.ts","sourceRoot":"","sources":["../../src/utils/findClickedIndex.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,eAAO,MAAM,cAAc,YAChB,MAAM,EAAE,GAAG,SAAS,gBACf,MAAM,KACnB,MAAM,GAAG,IAKX,CAAC"} \ No newline at end of file diff --git a/core/dist/utils/moveToScriptAtIndex.d.ts b/core/dist/utils/moveToScriptAtIndex.d.ts new file mode 100644 index 0000000..fb96596 --- /dev/null +++ b/core/dist/utils/moveToScriptAtIndex.d.ts @@ -0,0 +1,3 @@ +import { Script } from '../interfaces/Scripts'; +export declare const moveToScriptAtIndex: (index: number, scripts: Script[], seekTo: (timeInSeconds: number) => void) => void; +//# sourceMappingURL=moveToScriptAtIndex.d.ts.map \ No newline at end of file diff --git a/core/dist/utils/moveToScriptAtIndex.d.ts.map b/core/dist/utils/moveToScriptAtIndex.d.ts.map new file mode 100644 index 0000000..312a3e5 --- /dev/null +++ b/core/dist/utils/moveToScriptAtIndex.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"moveToScriptAtIndex.d.ts","sourceRoot":"","sources":["../../src/utils/moveToScriptAtIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,MAAM,SAC3C,MAAM,WACJ,MAAM,CAAC,CAAC,CAAC,EAAE,UACZ,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,SAYxC,CAAC"} \ No newline at end of file diff --git a/core/src/components/BlockView.tsx b/core/src/components/BlockView.tsx index 34df23e..abd7bd2 100644 --- a/core/src/components/BlockView.tsx +++ b/core/src/components/BlockView.tsx @@ -3,6 +3,7 @@ import { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts'; import styles from './ReactScriptPlayer.module.scss'; import { convertTime } from 'utils/convertTime'; import { TextDisplay } from './TextDisplay'; +import { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex'; // BlockView에 제네릭 T 추가 interface BlockViewProps { @@ -55,7 +56,7 @@ export function BlockView({ className={styles.scriptItem} key={index} onClick={() => { - seekTo(script.startTimeInSecond); + moveToScriptAtIndex(index, scripts, seekTo); onClickScript(script, index); }} style={{ diff --git a/core/src/components/LineView.tsx b/core/src/components/LineView.tsx index 94a8da4..752a987 100644 --- a/core/src/components/LineView.tsx +++ b/core/src/components/LineView.tsx @@ -5,7 +5,7 @@ import arrow_back from '../assets/icons/arrow_back.svg'; import arrow_forward from '../assets/icons/arrow_forward.svg'; import { TextDisplay } from './TextDisplay'; import styles from './ReactScriptPlayer.module.scss'; - +import { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex'; // LineView에 제네릭 T 추가 interface LineViewProps { scripts: Script[]; @@ -13,10 +13,7 @@ interface LineViewProps { currentScriptIndex: number; seekTo: (timeInSeconds: number) => void; onSelectWord: (word: string, script: Script, index: number) => void; - - // 자막 텍스트 스타일링 textStyle?: TextStyle; - // 자막 넘기기 버튼 PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element; NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element; } @@ -32,41 +29,55 @@ export function LineView({ PrevButton, NextButton, }: LineViewProps) { - const totalScripts = scripts.length; + // const totalScripts = scripts.length; - const handlePrevious = () => { - if (currentScriptIndex > 0) { - seekTo(scripts[currentScriptIndex - 1].startTimeInSecond); - } - }; + // const handlePrevious = () => { + // if (currentScriptIndex > 0) { + // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond); + // } + // console.log( + // '전으로 이동 ', + // scripts[currentScriptIndex - 1].startTimeInSecond, + // ); + // }; - const handleNext = () => { - if (currentScriptIndex < totalScripts - 1) { - seekTo(scripts[currentScriptIndex + 1].startTimeInSecond); - } - }; + // const handleNext = () => { + // if (currentScriptIndex < totalScripts - 1) { + // console.log( + // '다음으로 이동', + // scripts[currentScriptIndex + 1].startTimeInSecond, + // ); + // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond); + // } + // }; const throttledHandlePrevious = useThrottling({ - buttonClicked: handlePrevious, + buttonClicked: (currentScriptIndex: number) => + moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo), }); const throttledHandleNext = useThrottling({ - buttonClicked: handleNext, + buttonClicked: (currentScriptIndex: number) => + moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo), }); + // console.log(currentScriptIndex); + return (
{PrevButton ? ( - + throttledHandlePrevious(currentScriptIndex)} + /> ) : ( - )} {NextButton ? ( - + throttledHandleNext(currentScriptIndex)} /> ) : ( - )} diff --git a/core/src/components/ReactScriptPlayer.tsx b/core/src/components/ReactScriptPlayer.tsx index da826d1..e6f3cdb 100644 --- a/core/src/components/ReactScriptPlayer.tsx +++ b/core/src/components/ReactScriptPlayer.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useState } from 'react'; import styles from './ReactScriptPlayer.module.scss'; import { LanguageCode, @@ -7,6 +7,7 @@ import { TextStyle, TimeStyle, } from '../interfaces/Scripts'; +import { findClickIndex } from 'utils/findClickedIndex'; import { LineView } from './LineView'; import { BlockView } from './BlockView'; import { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex'; @@ -40,7 +41,19 @@ export function ReactScriptPlayer({ PrevButton, NextButton, }: ReactScriptPlayerProps) { - const currentScriptIndex = findCurrentScriptIndex(scripts, currentTime) ?? 0; + //async여부에 따라 currentScriptIndex가 달라져야함 + + const [isAsync, setIsAsync] = useState(true); + const [clickedIndex, setClickedIndex] = useState(0); + + const currentScriptIndex = isAsync + ? (findCurrentScriptIndex(scripts, currentTime) ?? 0) + : (findClickIndex(scripts, clickedIndex) ?? 0); + + const handleClickScript = (script: Script, index: number) => { + setClickedIndex(index); + onClickScript(script, index); + }; const scriptPlayerProps = { scripts, @@ -62,7 +75,7 @@ export function ReactScriptPlayer({ ) : ( diff --git a/core/src/hooks/useThrottling.ts b/core/src/hooks/useThrottling.ts index f29ac75..bfd2661 100644 --- a/core/src/hooks/useThrottling.ts +++ b/core/src/hooks/useThrottling.ts @@ -1,25 +1,28 @@ import { useState, useCallback } from 'react'; -interface ThrottlingProps { - buttonClicked: () => void; +interface ThrottlingProps { + buttonClicked: (arg: T) => void; delay?: number; // Optional delay prop } -export default function useThrottling({ +export default function useThrottling({ buttonClicked, delay = 300, -}: ThrottlingProps) { +}: ThrottlingProps) { const [isThrottled, setIsThrottled] = useState(false); - const throttledCallback = useCallback(() => { - if (!isThrottled) { - buttonClicked(); - setIsThrottled(true); - setTimeout(() => { - setIsThrottled(false); - }, delay); - } - }, [isThrottled, buttonClicked, delay]); + const throttledCallback = useCallback( + (arg: T) => { + if (!isThrottled) { + buttonClicked(arg); + setIsThrottled(true); + setTimeout(() => { + setIsThrottled(false); + }, delay); + } + }, + [isThrottled, buttonClicked, delay], + ); return throttledCallback; } diff --git a/core/src/utils/findClickedIndex.ts b/core/src/utils/findClickedIndex.ts new file mode 100644 index 0000000..6fe54f0 --- /dev/null +++ b/core/src/utils/findClickedIndex.ts @@ -0,0 +1,12 @@ +// findClickIndex.ts +import { Script } from 'interfaces/Scripts'; + +export const findClickIndex = ( + scripts: Script[] | undefined, + clickedIndex: number, +): number | null => { + if (!scripts || scripts.length === 0) return null; + return clickedIndex >= 0 && clickedIndex < scripts.length + ? clickedIndex + : null; +}; diff --git a/core/src/utils/moveToScriptAtIndex.ts b/core/src/utils/moveToScriptAtIndex.ts new file mode 100644 index 0000000..20d55f8 --- /dev/null +++ b/core/src/utils/moveToScriptAtIndex.ts @@ -0,0 +1,18 @@ +import { Script } from '../interfaces/Scripts'; + +export const moveToScriptAtIndex = ( + index: number, + scripts: Script[], + seekTo: (timeInSeconds: number) => void, +) => { + // 유효한 인덱스인지 확인 + if (index < 0 || index >= scripts.length - 1) { + console.warn('Invalid script index:', index); + return; + } + + // 스크립트 시작 시간으로 이동 + console.log('Seeking to:', scripts[index]); + + seekTo(scripts[index].startTimeInSecond); +}; diff --git a/package.json b/package.json index 0505fb1..6c4c4c6 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "core": "yarn workspace react-player-plugin-prompter", "demo": "yarn workspace demo", "docs": "yarn workspace docs", - "dev" : "yarn core dev & yarn demo dev", + "dev": "yarn core dev & yarn demo dev", "typecheck": "yarn workspaces foreach --all run typecheck", "lint": "eslint .", "lint:fix": "eslint . --fix", From 1cfd7aecdd5b3818ad1adc86515f70de375be1e3 Mon Sep 17 00:00:00 2001 From: godhyzzang <109357302+godhyzzang@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:36:59 +0900 Subject: [PATCH 02/18] =?UTF-8?q?comment:=20=EC=A3=BC=EC=84=9Dtodo?= =?UTF-8?q?=EB=A1=9C=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/dist/index.js | 1 + core/dist/index.js.map | 4 ++-- core/src/components/ReactScriptPlayer.tsx | 7 +++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/dist/index.js b/core/dist/index.js index 945016a..b462b1e 100644 --- a/core/dist/index.js +++ b/core/dist/index.js @@ -304,6 +304,7 @@ function ReactScriptPlayer({ scripts, selectedLanguages, seekTo, + // isAsync, // TODO(@godhyzzang) : isAsync를 props로 넘겨줘야합니다 currentTime, onClickScript, onSelectWord, diff --git a/core/dist/index.js.map b/core/dist/index.js.map index 4ca17fb..7af1380 100644 --- a/core/dist/index.js.map +++ b/core/dist/index.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../src/components/ReactScriptPlayer.tsx", "esbuild-scss-modules-plugin:./ReactScriptPlayer.module.scss", "../src/utils/findClickedIndex.ts", "../src/hooks/useThrottling.ts", "../src/components/TextDisplay.tsx", "../src/utils/moveToScriptAtIndex.ts", "../src/components/LineView.tsx", "../src/components/BlockView.tsx", "../src/utils/convertTime.ts", "../src/utils/findCurrentScriptIndex.ts"], - "sourcesContent": ["import React, { useState } from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { findClickIndex } from 'utils/findClickedIndex';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\n\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n}: ReactScriptPlayerProps) {\n //async\uC5EC\uBD80\uC5D0 \uB530\uB77C currentScriptIndex\uAC00 \uB2EC\uB77C\uC838\uC57C\uD568\n\n const [isAsync, setIsAsync] = useState(true);\n const [clickedIndex, setClickedIndex] = useState(0);\n\n const currentScriptIndex = isAsync\n ? (findCurrentScriptIndex(scripts, currentTime) ?? 0)\n : (findClickIndex(scripts, clickedIndex) ?? 0);\n\n const handleClickScript = (script: Script, index: number) => {\n setClickedIndex(index);\n onClickScript(script, index);\n };\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n return (\n
\n
\n

Transcript

\n {mode === 'line' ? (\n \n ) : (\n \n )}\n
\n
\n );\n}\n", "\nconst digest = '9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50';\nconst classes = {\"scriptsContainer\":\"_scriptsContainer_1tyea_7\",\"title\":\"_title_1tyea_18\",\"lineViewContainer\":\"_lineViewContainer_1tyea_23\",\"skipButtonContainer\":\"_skipButtonContainer_1tyea_28\",\"blockViewContainer\":\"_blockViewContainer_1tyea_35\",\"scriptItem\":\"_scriptItem_1tyea_42\",\"timeButton\":\"_timeButton_1tyea_47\",\"textView\":\"_textView_1tyea_60\",\"highlighted\":\"_highlighted_1tyea_65\"};\nconst css = `* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n._scriptsContainer_1tyea_7 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n width: 100%;\n height: auto;\n padding: 1.5rem;\n border: 2px solid #ececec;\n border-radius: 0.75rem;\n}\n\n._title_1tyea_18 {\n font-size: 1.25rem;\n font-weight: 700;\n}\n\n._lineViewContainer_1tyea_23 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 {\n align-self: end;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 button {\n cursor: pointer;\n}\n\n._blockViewContainer_1tyea_35 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n height: 16rem;\n overflow-y: auto;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 {\n padding: 16px;\n border-radius: 12px;\n transition: background-color 0.5s ease-in-out;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 ._timeButton_1tyea_47 {\n width: 5rem;\n padding-inline: 0.75rem;\n padding-block: 0.5rem;\n margin-bottom: 0.5rem;\n border: none;\n border-radius: 9999px;\n background-color: gray;\n cursor: pointer;\n font-size: 0.75rem;\n color: white;\n}\n\n._textView_1tyea_60 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n._textView_1tyea_60._highlighted_1tyea_65 {\n background-color: #fef08a;\n}`;\n\n(function() {\n if (typeof document !== \"undefined\" && !document.getElementById(digest)) {\n var ele = document.createElement('style');\n ele.id = digest;\n ele.textContent = css;\n document.head.appendChild(ele);\n }\n})();\n\nexport default classes;\nexport { css, digest, classes };\n ", "// findClickIndex.ts\nimport { Script } from 'interfaces/Scripts';\n\nexport const findClickIndex = (\n scripts: Script[] | undefined,\n clickedIndex: number,\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n return clickedIndex >= 0 && clickedIndex < scripts.length\n ? clickedIndex\n : null;\n};\n", "import { useState, useCallback } from 'react';\n\ninterface ThrottlingProps {\n buttonClicked: (arg: T) => void;\n delay?: number; // Optional delay prop\n}\n\nexport default function useThrottling({\n buttonClicked,\n delay = 300,\n}: ThrottlingProps) {\n const [isThrottled, setIsThrottled] = useState(false);\n\n const throttledCallback = useCallback(\n (arg: T) => {\n if (!isThrottled) {\n buttonClicked(arg);\n setIsThrottled(true);\n setTimeout(() => {\n setIsThrottled(false);\n }, delay);\n }\n },\n [isThrottled, buttonClicked, delay],\n );\n\n return throttledCallback;\n}\n", "import React from 'react';\nimport { Script, LanguageCode, TextStyle } from '../interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface TextDisplayProps {\n script: Script;\n selectedLanguages: T[];\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n}\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uC801\uC6A9\nexport function TextDisplay({\n script,\n selectedLanguages,\n onSelectWord,\n textStyle,\n}: TextDisplayProps) {\n return (\n \n {selectedLanguages.map((language) => (\n {\n const selection = window.getSelection();\n if (selection && selection.toString()) {\n const selectedWord = selection.toString().trim();\n if (selectedWord) {\n onSelectWord(selectedWord, script, 0);\n }\n }\n }}\n >\n {script[language] || `(${language} \uC790\uB9C9\uC774 \uC5C6\uC5B4\uC694!)`}\n

\n ))}\n
\n );\n}\n", "import { Script } from '../interfaces/Scripts';\n\nexport const moveToScriptAtIndex = (\n index: number,\n scripts: Script[],\n seekTo: (timeInSeconds: number) => void,\n) => {\n // \uC720\uD6A8\uD55C \uC778\uB371\uC2A4\uC778\uC9C0 \uD655\uC778\n if (index < 0 || index >= scripts.length - 1) {\n console.warn('Invalid script index:', index);\n return;\n }\n\n // \uC2A4\uD06C\uB9BD\uD2B8 \uC2DC\uC791 \uC2DC\uAC04\uC73C\uB85C \uC774\uB3D9\n console.log('Seeking to:', scripts[index]);\n\n seekTo(scripts[index].startTimeInSecond);\n};\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n // const totalScripts = scripts.length;\n\n // const handlePrevious = () => {\n // if (currentScriptIndex > 0) {\n // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond);\n // }\n // console.log(\n // '\uC804\uC73C\uB85C \uC774\uB3D9 ',\n // scripts[currentScriptIndex - 1].startTimeInSecond,\n // );\n // };\n\n // const handleNext = () => {\n // if (currentScriptIndex < totalScripts - 1) {\n // console.log(\n // '\uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9',\n // scripts[currentScriptIndex + 1].startTimeInSecond,\n // );\n // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond);\n // }\n // };\n\n const throttledHandlePrevious = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo),\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo),\n });\n\n // console.log(currentScriptIndex);\n\n return (\n
\n
\n {PrevButton ? (\n throttledHandlePrevious(currentScriptIndex)}\n />\n ) : (\n \n )}\n {NextButton ? (\n throttledHandleNext(currentScriptIndex)} />\n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n}\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n\n useEffect(() => {\n if (containerRef.current) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex]);\n\n return (\n
\n {scripts.map((script, index) => (\n {\n moveToScriptAtIndex(index, scripts, seekTo);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n
\n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n"], - "mappings": ";AAAA,SAAgB,YAAAA,iBAAgB;;;ACChC,IAAM,SAAS;AACf,IAAM,UAAU,EAAC,oBAAmB,6BAA4B,SAAQ,mBAAkB,qBAAoB,+BAA8B,uBAAsB,iCAAgC,sBAAqB,gCAA+B,cAAa,wBAAuB,cAAa,wBAAuB,YAAW,sBAAqB,eAAc,wBAAuB;AACnY,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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AAO,oBAAoB,kBAAkB,eAC7C,OAAO,oBAAoB,OAAO,mBAAmB,gBACnD;AAAA,EACN;AACA,SAAO,UAAU,KACb,QAAQ,SAAS,IAAI,QACrB;AACN;;;ATqCM,SACE,OAAAC,MADF,QAAAC,aAAA;AAzCC,SAAS,kBAAmD;AAAA,EACjE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA8B;AA1C9B;AA6CE,QAAM,CAAC,SAAS,UAAU,IAAIC,UAAkB,IAAI;AACpD,QAAM,CAAC,cAAc,eAAe,IAAIA,UAAiB,CAAC;AAE1D,QAAM,qBAAqB,WACtB,4BAAuB,SAAS,WAAW,MAA3C,YAAgD,KAChD,oBAAe,SAAS,YAAY,MAApC,YAAyC;AAE9C,QAAM,oBAAoB,CAAC,QAAmB,UAAkB;AAC9D,oBAAgB,KAAK;AACrB,kBAAc,QAAQ,KAAK;AAAA,EAC7B;AAEA,QAAM,oBAAoB;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SACE,gBAAAF,KAAC,SAAI,WAAW,iCAAO,kBAAkB,OAAO,EAAE,GAAG,eAAe,GAClE,0BAAAC,MAAC,SAAI,WAAW,iCAAO,kBACrB;AAAA,oBAAAD,KAAC,OAAE,WAAW,iCAAO,OAAO,wBAAU;AAAA,IACrC,SAAS,SACR,gBAAAA,KAAC,YAAU,GAAG,mBAAmB,WAAsB,IAEvD,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,eAAe;AAAA,QACf;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ,GACF;AAEJ;", + "sourcesContent": ["import React, { useState } from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { findClickIndex } from 'utils/findClickedIndex';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\n\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n // isAsync: boolean; // TODO(@godhyzzang) : isAsync\uB97C props\uB85C \uB118\uACA8\uC918\uC57C\uD569\uB2C8\uB2E4\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n // isAsync, // TODO(@godhyzzang) : isAsync\uB97C props\uB85C \uB118\uACA8\uC918\uC57C\uD569\uB2C8\uB2E4\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n}: ReactScriptPlayerProps) {\n // TODO(@godhyzzang) : isAsync\uB97C props\uB85C \uB118\uACA8\uC918\uC57C\uD569\uB2C8\uB2E4\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [isAsync, setIsAsync] = useState(true);\n const [clickedIndex, setClickedIndex] = useState(0);\n\n // async\uC5EC\uBD80\uC5D0 \uB530\uB77C currentScriptIndex\uAC00 \uB2EC\uB77C\uC838\uC57C\uD569\uB2C8\uB2E4\n const currentScriptIndex = isAsync\n ? (findCurrentScriptIndex(scripts, currentTime) ?? 0)\n : (findClickIndex(scripts, clickedIndex) ?? 0);\n\n const handleClickScript = (script: Script, index: number) => {\n setClickedIndex(index);\n onClickScript(script, index);\n };\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n return (\n
\n
\n

Transcript

\n {mode === 'line' ? (\n \n ) : (\n \n )}\n
\n
\n );\n}\n", "\nconst digest = '9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50';\nconst classes = {\"scriptsContainer\":\"_scriptsContainer_1tyea_7\",\"title\":\"_title_1tyea_18\",\"lineViewContainer\":\"_lineViewContainer_1tyea_23\",\"skipButtonContainer\":\"_skipButtonContainer_1tyea_28\",\"blockViewContainer\":\"_blockViewContainer_1tyea_35\",\"scriptItem\":\"_scriptItem_1tyea_42\",\"timeButton\":\"_timeButton_1tyea_47\",\"textView\":\"_textView_1tyea_60\",\"highlighted\":\"_highlighted_1tyea_65\"};\nconst css = `* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n._scriptsContainer_1tyea_7 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n width: 100%;\n height: auto;\n padding: 1.5rem;\n border: 2px solid #ececec;\n border-radius: 0.75rem;\n}\n\n._title_1tyea_18 {\n font-size: 1.25rem;\n font-weight: 700;\n}\n\n._lineViewContainer_1tyea_23 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 {\n align-self: end;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 button {\n cursor: pointer;\n}\n\n._blockViewContainer_1tyea_35 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n height: 16rem;\n overflow-y: auto;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 {\n padding: 16px;\n border-radius: 12px;\n transition: background-color 0.5s ease-in-out;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 ._timeButton_1tyea_47 {\n width: 5rem;\n padding-inline: 0.75rem;\n padding-block: 0.5rem;\n margin-bottom: 0.5rem;\n border: none;\n border-radius: 9999px;\n background-color: gray;\n cursor: pointer;\n font-size: 0.75rem;\n color: white;\n}\n\n._textView_1tyea_60 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n._textView_1tyea_60._highlighted_1tyea_65 {\n background-color: #fef08a;\n}`;\n\n(function() {\n if (typeof document !== \"undefined\" && !document.getElementById(digest)) {\n var ele = document.createElement('style');\n ele.id = digest;\n ele.textContent = css;\n document.head.appendChild(ele);\n }\n})();\n\nexport default classes;\nexport { css, digest, classes };\n ", "// findClickIndex.ts\nimport { Script } from 'interfaces/Scripts';\n\nexport const findClickIndex = (\n scripts: Script[] | undefined,\n clickedIndex: number,\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n return clickedIndex >= 0 && clickedIndex < scripts.length\n ? clickedIndex\n : null;\n};\n", "import { useState, useCallback } from 'react';\n\ninterface ThrottlingProps {\n buttonClicked: (arg: T) => void;\n delay?: number; // Optional delay prop\n}\n\nexport default function useThrottling({\n buttonClicked,\n delay = 300,\n}: ThrottlingProps) {\n const [isThrottled, setIsThrottled] = useState(false);\n\n const throttledCallback = useCallback(\n (arg: T) => {\n if (!isThrottled) {\n buttonClicked(arg);\n setIsThrottled(true);\n setTimeout(() => {\n setIsThrottled(false);\n }, delay);\n }\n },\n [isThrottled, buttonClicked, delay],\n );\n\n return throttledCallback;\n}\n", "import React from 'react';\nimport { Script, LanguageCode, TextStyle } from '../interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface TextDisplayProps {\n script: Script;\n selectedLanguages: T[];\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n}\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uC801\uC6A9\nexport function TextDisplay({\n script,\n selectedLanguages,\n onSelectWord,\n textStyle,\n}: TextDisplayProps) {\n return (\n \n {selectedLanguages.map((language) => (\n {\n const selection = window.getSelection();\n if (selection && selection.toString()) {\n const selectedWord = selection.toString().trim();\n if (selectedWord) {\n onSelectWord(selectedWord, script, 0);\n }\n }\n }}\n >\n {script[language] || `(${language} \uC790\uB9C9\uC774 \uC5C6\uC5B4\uC694!)`}\n

\n ))}\n \n );\n}\n", "import { Script } from '../interfaces/Scripts';\n\nexport const moveToScriptAtIndex = (\n index: number,\n scripts: Script[],\n seekTo: (timeInSeconds: number) => void,\n) => {\n // \uC720\uD6A8\uD55C \uC778\uB371\uC2A4\uC778\uC9C0 \uD655\uC778\n if (index < 0 || index >= scripts.length - 1) {\n console.warn('Invalid script index:', index);\n return;\n }\n\n // \uC2A4\uD06C\uB9BD\uD2B8 \uC2DC\uC791 \uC2DC\uAC04\uC73C\uB85C \uC774\uB3D9\n console.log('Seeking to:', scripts[index]);\n\n seekTo(scripts[index].startTimeInSecond);\n};\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n // const totalScripts = scripts.length;\n\n // const handlePrevious = () => {\n // if (currentScriptIndex > 0) {\n // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond);\n // }\n // console.log(\n // '\uC804\uC73C\uB85C \uC774\uB3D9 ',\n // scripts[currentScriptIndex - 1].startTimeInSecond,\n // );\n // };\n\n // const handleNext = () => {\n // if (currentScriptIndex < totalScripts - 1) {\n // console.log(\n // '\uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9',\n // scripts[currentScriptIndex + 1].startTimeInSecond,\n // );\n // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond);\n // }\n // };\n\n const throttledHandlePrevious = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo),\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo),\n });\n\n // console.log(currentScriptIndex);\n\n return (\n
\n
\n {PrevButton ? (\n throttledHandlePrevious(currentScriptIndex)}\n />\n ) : (\n \n )}\n {NextButton ? (\n throttledHandleNext(currentScriptIndex)} />\n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n}\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n\n useEffect(() => {\n if (containerRef.current) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex]);\n\n return (\n
\n {scripts.map((script, index) => (\n {\n moveToScriptAtIndex(index, scripts, seekTo);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n \n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n"], + "mappings": ";AAAA,SAAgB,YAAAA,iBAAgB;;;ACChC,IAAM,SAAS;AACf,IAAM,UAAU,EAAC,oBAAmB,6BAA4B,SAAQ,mBAAkB,qBAAoB,+BAA8B,uBAAsB,iCAAgC,sBAAqB,gCAA+B,cAAa,wBAAuB,cAAa,wBAAuB,YAAW,sBAAqB,eAAc,wBAAuB;AACnY,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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"currentScriptIndex", "jsx", "jsxs", "index", "jsx", "jsxs", "useState"] } diff --git a/core/src/components/ReactScriptPlayer.tsx b/core/src/components/ReactScriptPlayer.tsx index e6f3cdb..82dcb2b 100644 --- a/core/src/components/ReactScriptPlayer.tsx +++ b/core/src/components/ReactScriptPlayer.tsx @@ -17,6 +17,7 @@ export interface ReactScriptPlayerProps { scripts: Script[]; selectedLanguages: T[]; seekTo: (timeInSeconds: number) => void; + // isAsync: boolean; // TODO(@godhyzzang) : isAsync를 props로 넘겨줘야합니다 currentTime: number; onClickScript: (script: Script, index: number) => void; onSelectWord: (word: string, script: Script, index: number) => void; @@ -32,6 +33,7 @@ export function ReactScriptPlayer({ scripts, selectedLanguages, seekTo, + // isAsync, // TODO(@godhyzzang) : isAsync를 props로 넘겨줘야합니다 currentTime, onClickScript, onSelectWord, @@ -41,11 +43,12 @@ export function ReactScriptPlayer({ PrevButton, NextButton, }: ReactScriptPlayerProps) { - //async여부에 따라 currentScriptIndex가 달라져야함 - + // TODO(@godhyzzang) : isAsync를 props로 넘겨줘야합니다 + // eslint-disable-next-line @typescript-eslint/no-unused-vars const [isAsync, setIsAsync] = useState(true); const [clickedIndex, setClickedIndex] = useState(0); + // async여부에 따라 currentScriptIndex가 달라져야합니다 const currentScriptIndex = isAsync ? (findCurrentScriptIndex(scripts, currentTime) ?? 0) : (findClickIndex(scripts, clickedIndex) ?? 0); From b4f28ce4c370a218f3b6b0c301967eabf612ee76 Mon Sep 17 00:00:00 2001 From: godhyzzang <109357302+godhyzzang@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:48:05 +0900 Subject: [PATCH 03/18] =?UTF-8?q?fix=20:=20lint=EC=97=90=EB=9F=AC=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/dist/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/core/dist/index.js b/core/dist/index.js index b462b1e..4011f85 100644 --- a/core/dist/index.js +++ b/core/dist/index.js @@ -315,6 +315,7 @@ function ReactScriptPlayer({ NextButton }) { var _a, _b; + // eslint-disable-next-line @typescript-eslint/no-unused-vars const [isAsync, setIsAsync] = useState2(true); const [clickedIndex, setClickedIndex] = useState2(0); const currentScriptIndex = isAsync ? (_a = findCurrentScriptIndex(scripts, currentTime)) != null ? _a : 0 : (_b = findClickIndex(scripts, clickedIndex)) != null ? _b : 0; From fedf008743a4bb2415e59b03b1d9e5b20313be26 Mon Sep 17 00:00:00 2001 From: godhyzzang <109357302+godhyzzang@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:51:06 +0900 Subject: [PATCH 04/18] =?UTF-8?q?comment=20:=20=EC=A3=BC=EC=84=9D=ED=95=A0?= =?UTF-8?q?=EC=9D=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/components/LineView.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/components/LineView.tsx b/core/src/components/LineView.tsx index 752a987..f6a2d5f 100644 --- a/core/src/components/LineView.tsx +++ b/core/src/components/LineView.tsx @@ -29,6 +29,7 @@ export function LineView({ PrevButton, NextButton, }: LineViewProps) { + // 이전 코드 // const totalScripts = scripts.length; // const handlePrevious = () => { From dfd86f3124c5039d9dd5b7c72edab23373e3e006 Mon Sep 17 00:00:00 2001 From: godhyzzang <109357302+godhyzzang@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:54:05 +0900 Subject: [PATCH 05/18] =?UTF-8?q?comment=20:=20=EC=A3=BC=EC=84=9D=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/components/ReactScriptPlayer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/components/ReactScriptPlayer.tsx b/core/src/components/ReactScriptPlayer.tsx index 82dcb2b..c6c806b 100644 --- a/core/src/components/ReactScriptPlayer.tsx +++ b/core/src/components/ReactScriptPlayer.tsx @@ -50,8 +50,8 @@ export function ReactScriptPlayer({ // async여부에 따라 currentScriptIndex가 달라져야합니다 const currentScriptIndex = isAsync - ? (findCurrentScriptIndex(scripts, currentTime) ?? 0) - : (findClickIndex(scripts, clickedIndex) ?? 0); + ? (findCurrentScriptIndex(scripts, currentTime) ?? 0) // 동영상 재생에 동기화되는 script Index찾는 함수 + : (findClickIndex(scripts, clickedIndex) ?? 0); // 클릭한 script index 찾는 함수 const handleClickScript = (script: Script, index: number) => { setClickedIndex(index); From 68d12b94bc619d62190e0d88a8e87a780d1cf13a Mon Sep 17 00:00:00 2001 From: godhyzzang <109357302+godhyzzang@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:55:29 +0900 Subject: [PATCH 06/18] =?UTF-8?q?rename=20:=20findClickIndex=EB=A5=BC=20fi?= =?UTF-8?q?ndClickedIndex=EB=A1=9C=20=EC=9D=B4=EB=A6=84=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/dist/index.js | 4 ++-- core/dist/index.js.map | 2 +- core/dist/utils/findClickedIndex.d.ts | 2 +- core/src/components/ReactScriptPlayer.tsx | 4 ++-- core/src/utils/findClickedIndex.ts | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/dist/index.js b/core/dist/index.js index 4011f85..e40414b 100644 --- a/core/dist/index.js +++ b/core/dist/index.js @@ -82,7 +82,7 @@ var css = `* { var ReactScriptPlayer_module_default = classes; // src/utils/findClickedIndex.ts -var findClickIndex = (scripts, clickedIndex) => { +var findClickedIndex = (scripts, clickedIndex) => { if (!scripts || scripts.length === 0) return null; return clickedIndex >= 0 && clickedIndex < scripts.length ? clickedIndex : null; }; @@ -318,7 +318,7 @@ function ReactScriptPlayer({ // eslint-disable-next-line @typescript-eslint/no-unused-vars const [isAsync, setIsAsync] = useState2(true); const [clickedIndex, setClickedIndex] = useState2(0); - const currentScriptIndex = isAsync ? (_a = findCurrentScriptIndex(scripts, currentTime)) != null ? _a : 0 : (_b = findClickIndex(scripts, clickedIndex)) != null ? _b : 0; + const currentScriptIndex = isAsync ? (_a = findCurrentScriptIndex(scripts, currentTime)) != null ? _a : 0 : (_b = findClickedIndex(scripts, clickedIndex)) != null ? _b : 0; const handleClickScript = (script, index) => { setClickedIndex(index); onClickScript(script, index); diff --git a/core/dist/index.js.map b/core/dist/index.js.map index 7af1380..5897121 100644 --- a/core/dist/index.js.map +++ b/core/dist/index.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../src/components/ReactScriptPlayer.tsx", "esbuild-scss-modules-plugin:./ReactScriptPlayer.module.scss", "../src/utils/findClickedIndex.ts", "../src/hooks/useThrottling.ts", "../src/components/TextDisplay.tsx", "../src/utils/moveToScriptAtIndex.ts", "../src/components/LineView.tsx", "../src/components/BlockView.tsx", "../src/utils/convertTime.ts", "../src/utils/findCurrentScriptIndex.ts"], - "sourcesContent": ["import React, { useState } from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { findClickIndex } from 'utils/findClickedIndex';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\n\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n // isAsync: boolean; // TODO(@godhyzzang) : isAsync\uB97C props\uB85C \uB118\uACA8\uC918\uC57C\uD569\uB2C8\uB2E4\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n // isAsync, // TODO(@godhyzzang) : isAsync\uB97C props\uB85C \uB118\uACA8\uC918\uC57C\uD569\uB2C8\uB2E4\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n}: ReactScriptPlayerProps) {\n // TODO(@godhyzzang) : isAsync\uB97C props\uB85C \uB118\uACA8\uC918\uC57C\uD569\uB2C8\uB2E4\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [isAsync, setIsAsync] = useState(true);\n const [clickedIndex, setClickedIndex] = useState(0);\n\n // async\uC5EC\uBD80\uC5D0 \uB530\uB77C currentScriptIndex\uAC00 \uB2EC\uB77C\uC838\uC57C\uD569\uB2C8\uB2E4\n const currentScriptIndex = isAsync\n ? (findCurrentScriptIndex(scripts, currentTime) ?? 0)\n : (findClickIndex(scripts, clickedIndex) ?? 0);\n\n const handleClickScript = (script: Script, index: number) => {\n setClickedIndex(index);\n onClickScript(script, index);\n };\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n return (\n
\n
\n

Transcript

\n {mode === 'line' ? (\n \n ) : (\n \n )}\n
\n
\n );\n}\n", "\nconst digest = '9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50';\nconst classes = {\"scriptsContainer\":\"_scriptsContainer_1tyea_7\",\"title\":\"_title_1tyea_18\",\"lineViewContainer\":\"_lineViewContainer_1tyea_23\",\"skipButtonContainer\":\"_skipButtonContainer_1tyea_28\",\"blockViewContainer\":\"_blockViewContainer_1tyea_35\",\"scriptItem\":\"_scriptItem_1tyea_42\",\"timeButton\":\"_timeButton_1tyea_47\",\"textView\":\"_textView_1tyea_60\",\"highlighted\":\"_highlighted_1tyea_65\"};\nconst css = `* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n._scriptsContainer_1tyea_7 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n width: 100%;\n height: auto;\n padding: 1.5rem;\n border: 2px solid #ececec;\n border-radius: 0.75rem;\n}\n\n._title_1tyea_18 {\n font-size: 1.25rem;\n font-weight: 700;\n}\n\n._lineViewContainer_1tyea_23 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 {\n align-self: end;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 button {\n cursor: pointer;\n}\n\n._blockViewContainer_1tyea_35 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n height: 16rem;\n overflow-y: auto;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 {\n padding: 16px;\n border-radius: 12px;\n transition: background-color 0.5s ease-in-out;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 ._timeButton_1tyea_47 {\n width: 5rem;\n padding-inline: 0.75rem;\n padding-block: 0.5rem;\n margin-bottom: 0.5rem;\n border: none;\n border-radius: 9999px;\n background-color: gray;\n cursor: pointer;\n font-size: 0.75rem;\n color: white;\n}\n\n._textView_1tyea_60 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n._textView_1tyea_60._highlighted_1tyea_65 {\n background-color: #fef08a;\n}`;\n\n(function() {\n if (typeof document !== \"undefined\" && !document.getElementById(digest)) {\n var ele = document.createElement('style');\n ele.id = digest;\n ele.textContent = css;\n document.head.appendChild(ele);\n }\n})();\n\nexport default classes;\nexport { css, digest, classes };\n ", "// findClickIndex.ts\nimport { Script } from 'interfaces/Scripts';\n\nexport const findClickIndex = (\n scripts: Script[] | undefined,\n clickedIndex: number,\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n return clickedIndex >= 0 && clickedIndex < scripts.length\n ? clickedIndex\n : null;\n};\n", "import { useState, useCallback } from 'react';\n\ninterface ThrottlingProps {\n buttonClicked: (arg: T) => void;\n delay?: number; // Optional delay prop\n}\n\nexport default function useThrottling({\n buttonClicked,\n delay = 300,\n}: ThrottlingProps) {\n const [isThrottled, setIsThrottled] = useState(false);\n\n const throttledCallback = useCallback(\n (arg: T) => {\n if (!isThrottled) {\n buttonClicked(arg);\n setIsThrottled(true);\n setTimeout(() => {\n setIsThrottled(false);\n }, delay);\n }\n },\n [isThrottled, buttonClicked, delay],\n );\n\n return throttledCallback;\n}\n", "import React from 'react';\nimport { Script, LanguageCode, TextStyle } from '../interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface TextDisplayProps {\n script: Script;\n selectedLanguages: T[];\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n}\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uC801\uC6A9\nexport function TextDisplay({\n script,\n selectedLanguages,\n onSelectWord,\n textStyle,\n}: TextDisplayProps) {\n return (\n \n {selectedLanguages.map((language) => (\n {\n const selection = window.getSelection();\n if (selection && selection.toString()) {\n const selectedWord = selection.toString().trim();\n if (selectedWord) {\n onSelectWord(selectedWord, script, 0);\n }\n }\n }}\n >\n {script[language] || `(${language} \uC790\uB9C9\uC774 \uC5C6\uC5B4\uC694!)`}\n

\n ))}\n \n );\n}\n", "import { Script } from '../interfaces/Scripts';\n\nexport const moveToScriptAtIndex = (\n index: number,\n scripts: Script[],\n seekTo: (timeInSeconds: number) => void,\n) => {\n // \uC720\uD6A8\uD55C \uC778\uB371\uC2A4\uC778\uC9C0 \uD655\uC778\n if (index < 0 || index >= scripts.length - 1) {\n console.warn('Invalid script index:', index);\n return;\n }\n\n // \uC2A4\uD06C\uB9BD\uD2B8 \uC2DC\uC791 \uC2DC\uAC04\uC73C\uB85C \uC774\uB3D9\n console.log('Seeking to:', scripts[index]);\n\n seekTo(scripts[index].startTimeInSecond);\n};\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n // const totalScripts = scripts.length;\n\n // const handlePrevious = () => {\n // if (currentScriptIndex > 0) {\n // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond);\n // }\n // console.log(\n // '\uC804\uC73C\uB85C \uC774\uB3D9 ',\n // scripts[currentScriptIndex - 1].startTimeInSecond,\n // );\n // };\n\n // const handleNext = () => {\n // if (currentScriptIndex < totalScripts - 1) {\n // console.log(\n // '\uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9',\n // scripts[currentScriptIndex + 1].startTimeInSecond,\n // );\n // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond);\n // }\n // };\n\n const throttledHandlePrevious = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo),\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo),\n });\n\n // console.log(currentScriptIndex);\n\n return (\n
\n
\n {PrevButton ? (\n throttledHandlePrevious(currentScriptIndex)}\n />\n ) : (\n \n )}\n {NextButton ? (\n throttledHandleNext(currentScriptIndex)} />\n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n}\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n\n useEffect(() => {\n if (containerRef.current) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex]);\n\n return (\n
\n {scripts.map((script, index) => (\n {\n moveToScriptAtIndex(index, scripts, seekTo);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n \n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n"], + "sourcesContent": ["import React, { useState } from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { findClickedIndex } from 'utils/findClickedIndex';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\n\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n // isAsync: boolean; // TODO(@godhyzzang) : isAsync\uB97C props\uB85C \uB118\uACA8\uC918\uC57C\uD569\uB2C8\uB2E4\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n // isAsync, // TODO(@godhyzzang) : isAsync\uB97C props\uB85C \uB118\uACA8\uC918\uC57C\uD569\uB2C8\uB2E4\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n}: ReactScriptPlayerProps) {\n // TODO(@godhyzzang) : isAsync\uB97C props\uB85C \uB118\uACA8\uC918\uC57C\uD569\uB2C8\uB2E4\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [isAsync, setIsAsync] = useState(true);\n const [clickedIndex, setClickedIndex] = useState(0);\n\n // async\uC5EC\uBD80\uC5D0 \uB530\uB77C currentScriptIndex\uAC00 \uB2EC\uB77C\uC838\uC57C\uD569\uB2C8\uB2E4\n const currentScriptIndex = isAsync\n ? (findCurrentScriptIndex(scripts, currentTime) ?? 0)\n : (findClickedIndex(scripts, clickedIndex) ?? 0);\n\n const handleClickScript = (script: Script, index: number) => {\n setClickedIndex(index);\n onClickScript(script, index);\n };\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n return (\n
\n
\n

Transcript

\n {mode === 'line' ? (\n \n ) : (\n \n )}\n
\n
\n );\n}\n", "\nconst digest = '9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50';\nconst classes = {\"scriptsContainer\":\"_scriptsContainer_1tyea_7\",\"title\":\"_title_1tyea_18\",\"lineViewContainer\":\"_lineViewContainer_1tyea_23\",\"skipButtonContainer\":\"_skipButtonContainer_1tyea_28\",\"blockViewContainer\":\"_blockViewContainer_1tyea_35\",\"scriptItem\":\"_scriptItem_1tyea_42\",\"timeButton\":\"_timeButton_1tyea_47\",\"textView\":\"_textView_1tyea_60\",\"highlighted\":\"_highlighted_1tyea_65\"};\nconst css = `* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n._scriptsContainer_1tyea_7 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n width: 100%;\n height: auto;\n padding: 1.5rem;\n border: 2px solid #ececec;\n border-radius: 0.75rem;\n}\n\n._title_1tyea_18 {\n font-size: 1.25rem;\n font-weight: 700;\n}\n\n._lineViewContainer_1tyea_23 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 {\n align-self: end;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 button {\n cursor: pointer;\n}\n\n._blockViewContainer_1tyea_35 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n height: 16rem;\n overflow-y: auto;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 {\n padding: 16px;\n border-radius: 12px;\n transition: background-color 0.5s ease-in-out;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 ._timeButton_1tyea_47 {\n width: 5rem;\n padding-inline: 0.75rem;\n padding-block: 0.5rem;\n margin-bottom: 0.5rem;\n border: none;\n border-radius: 9999px;\n background-color: gray;\n cursor: pointer;\n font-size: 0.75rem;\n color: white;\n}\n\n._textView_1tyea_60 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n._textView_1tyea_60._highlighted_1tyea_65 {\n background-color: #fef08a;\n}`;\n\n(function() {\n if (typeof document !== \"undefined\" && !document.getElementById(digest)) {\n var ele = document.createElement('style');\n ele.id = digest;\n ele.textContent = css;\n document.head.appendChild(ele);\n }\n})();\n\nexport default classes;\nexport { css, digest, classes };\n ", "// findClickedIndex.ts\nimport { Script } from 'interfaces/Scripts';\n\nexport const findClickedIndex = (\n scripts: Script[] | undefined,\n clickedIndex: number,\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n return clickedIndex >= 0 && clickedIndex < scripts.length\n ? clickedIndex\n : null;\n};\n", "import { useState, useCallback } from 'react';\n\ninterface ThrottlingProps {\n buttonClicked: (arg: T) => void;\n delay?: number; // Optional delay prop\n}\n\nexport default function useThrottling({\n buttonClicked,\n delay = 300,\n}: ThrottlingProps) {\n const [isThrottled, setIsThrottled] = useState(false);\n\n const throttledCallback = useCallback(\n (arg: T) => {\n if (!isThrottled) {\n buttonClicked(arg);\n setIsThrottled(true);\n setTimeout(() => {\n setIsThrottled(false);\n }, delay);\n }\n },\n [isThrottled, buttonClicked, delay],\n );\n\n return throttledCallback;\n}\n", "import React from 'react';\nimport { Script, LanguageCode, TextStyle } from '../interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface TextDisplayProps {\n script: Script;\n selectedLanguages: T[];\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n}\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uC801\uC6A9\nexport function TextDisplay({\n script,\n selectedLanguages,\n onSelectWord,\n textStyle,\n}: TextDisplayProps) {\n return (\n \n {selectedLanguages.map((language) => (\n {\n const selection = window.getSelection();\n if (selection && selection.toString()) {\n const selectedWord = selection.toString().trim();\n if (selectedWord) {\n onSelectWord(selectedWord, script, 0);\n }\n }\n }}\n >\n {script[language] || `(${language} \uC790\uB9C9\uC774 \uC5C6\uC5B4\uC694!)`}\n

\n ))}\n \n );\n}\n", "import { Script } from '../interfaces/Scripts';\n\nexport const moveToScriptAtIndex = (\n index: number,\n scripts: Script[],\n seekTo: (timeInSeconds: number) => void,\n) => {\n // \uC720\uD6A8\uD55C \uC778\uB371\uC2A4\uC778\uC9C0 \uD655\uC778\n if (index < 0 || index >= scripts.length - 1) {\n console.warn('Invalid script index:', index);\n return;\n }\n\n // \uC2A4\uD06C\uB9BD\uD2B8 \uC2DC\uC791 \uC2DC\uAC04\uC73C\uB85C \uC774\uB3D9\n console.log('Seeking to:', scripts[index]);\n\n seekTo(scripts[index].startTimeInSecond);\n};\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n // const totalScripts = scripts.length;\n\n // const handlePrevious = () => {\n // if (currentScriptIndex > 0) {\n // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond);\n // }\n // console.log(\n // '\uC804\uC73C\uB85C \uC774\uB3D9 ',\n // scripts[currentScriptIndex - 1].startTimeInSecond,\n // );\n // };\n\n // const handleNext = () => {\n // if (currentScriptIndex < totalScripts - 1) {\n // console.log(\n // '\uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9',\n // scripts[currentScriptIndex + 1].startTimeInSecond,\n // );\n // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond);\n // }\n // };\n\n const throttledHandlePrevious = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo),\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo),\n });\n\n // console.log(currentScriptIndex);\n\n return (\n
\n
\n {PrevButton ? (\n throttledHandlePrevious(currentScriptIndex)}\n />\n ) : (\n \n )}\n {NextButton ? (\n throttledHandleNext(currentScriptIndex)} />\n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n}\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n\n useEffect(() => {\n if (containerRef.current) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex]);\n\n return (\n
\n {scripts.map((script, index) => (\n {\n moveToScriptAtIndex(index, scripts, seekTo);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n \n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n"], "mappings": ";AAAA,SAAgB,YAAAA,iBAAgB;;;ACChC,IAAM,SAAS;AACf,IAAM,UAAU,EAAC,oBAAmB,6BAA4B,SAAQ,mBAAkB,qBAAoB,+BAA8B,uBAAsB,iCAAgC,sBAAqB,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AAE,GAAG,eAAe,GAClE,0BAAAC,MAAC,SAAI,WAAW,iCAAO,kBACrB;AAAA,oBAAAD,KAAC,OAAE,WAAW,iCAAO,OAAO,wBAAU;AAAA,IACrC,SAAS,SACR,gBAAAA,KAAC,YAAU,GAAG,mBAAmB,WAAsB,IAEvD,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,eAAe;AAAA,QACf;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ,GACF;AAEJ;", "names": ["useState", "jsx", "currentScriptIndex", "jsx", "jsxs", "index", "jsx", "jsxs", "useState"] } diff --git a/core/dist/utils/findClickedIndex.d.ts b/core/dist/utils/findClickedIndex.d.ts index d365586..d7032d3 100644 --- a/core/dist/utils/findClickedIndex.d.ts +++ b/core/dist/utils/findClickedIndex.d.ts @@ -1,3 +1,3 @@ import { Script } from 'interfaces/Scripts'; -export declare const findClickIndex: (scripts: Script[] | undefined, clickedIndex: number) => number | null; +export declare const findClickedIndex: (scripts: Script[] | undefined, clickedIndex: number) => number | null; //# sourceMappingURL=findClickedIndex.d.ts.map \ No newline at end of file diff --git a/core/src/components/ReactScriptPlayer.tsx b/core/src/components/ReactScriptPlayer.tsx index c6c806b..5d1ca60 100644 --- a/core/src/components/ReactScriptPlayer.tsx +++ b/core/src/components/ReactScriptPlayer.tsx @@ -7,7 +7,7 @@ import { TextStyle, TimeStyle, } from '../interfaces/Scripts'; -import { findClickIndex } from 'utils/findClickedIndex'; +import { findClickedIndex } from 'utils/findClickedIndex'; import { LineView } from './LineView'; import { BlockView } from './BlockView'; import { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex'; @@ -51,7 +51,7 @@ export function ReactScriptPlayer({ // async여부에 따라 currentScriptIndex가 달라져야합니다 const currentScriptIndex = isAsync ? (findCurrentScriptIndex(scripts, currentTime) ?? 0) // 동영상 재생에 동기화되는 script Index찾는 함수 - : (findClickIndex(scripts, clickedIndex) ?? 0); // 클릭한 script index 찾는 함수 + : (findClickedIndex(scripts, clickedIndex) ?? 0); // 클릭한 script index 찾는 함수 const handleClickScript = (script: Script, index: number) => { setClickedIndex(index); diff --git a/core/src/utils/findClickedIndex.ts b/core/src/utils/findClickedIndex.ts index 6fe54f0..7c7c29f 100644 --- a/core/src/utils/findClickedIndex.ts +++ b/core/src/utils/findClickedIndex.ts @@ -1,7 +1,7 @@ -// findClickIndex.ts +// findClickedIndex.ts import { Script } from 'interfaces/Scripts'; -export const findClickIndex = ( +export const findClickedIndex = ( scripts: Script[] | undefined, clickedIndex: number, ): number | null => { From 9391b25f28208d6edb998deaf87aafd7eb6e47c7 Mon Sep 17 00:00:00 2001 From: godhyzzang <109357302+godhyzzang@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:57:28 +0900 Subject: [PATCH 07/18] =?UTF-8?q?comment=20:=20=EC=A3=BC=EC=84=9D=20?= =?UTF-8?q?=EB=8B=AC=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/components/ReactScriptPlayer.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/components/ReactScriptPlayer.tsx b/core/src/components/ReactScriptPlayer.tsx index 5d1ca60..719d580 100644 --- a/core/src/components/ReactScriptPlayer.tsx +++ b/core/src/components/ReactScriptPlayer.tsx @@ -48,11 +48,12 @@ export function ReactScriptPlayer({ const [isAsync, setIsAsync] = useState(true); const [clickedIndex, setClickedIndex] = useState(0); - // async여부에 따라 currentScriptIndex가 달라져야합니다 + // TODO(@godhyzzang) : async여부에 따라 currentScriptIndex가 달라져야합니다 const currentScriptIndex = isAsync ? (findCurrentScriptIndex(scripts, currentTime) ?? 0) // 동영상 재생에 동기화되는 script Index찾는 함수 : (findClickedIndex(scripts, clickedIndex) ?? 0); // 클릭한 script index 찾는 함수 + // TODO(@godhyzzang) : lineview에서도 setClickedIndex 사용해야함. 현재 이 함수가 blockview에서만 사용되고 있어서 lineview에서는 currentScriptIndex를 set하지 못 하고 있습니다. const handleClickScript = (script: Script, index: number) => { setClickedIndex(index); onClickScript(script, index); From 80e87c37ca00d457ec4b585db4b70e11b2956458 Mon Sep 17 00:00:00 2001 From: godhyzzang <109357302+godhyzzang@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:57:57 +0900 Subject: [PATCH 08/18] =?UTF-8?q?comment:=20=EC=A3=BC=EC=84=9D=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/components/ReactScriptPlayer.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/core/src/components/ReactScriptPlayer.tsx b/core/src/components/ReactScriptPlayer.tsx index 719d580..76d7dab 100644 --- a/core/src/components/ReactScriptPlayer.tsx +++ b/core/src/components/ReactScriptPlayer.tsx @@ -48,7 +48,6 @@ export function ReactScriptPlayer({ const [isAsync, setIsAsync] = useState(true); const [clickedIndex, setClickedIndex] = useState(0); - // TODO(@godhyzzang) : async여부에 따라 currentScriptIndex가 달라져야합니다 const currentScriptIndex = isAsync ? (findCurrentScriptIndex(scripts, currentTime) ?? 0) // 동영상 재생에 동기화되는 script Index찾는 함수 : (findClickedIndex(scripts, clickedIndex) ?? 0); // 클릭한 script index 찾는 함수 From d45fca4d5dcdc5ec9b306cd38800365f8dfba817 Mon Sep 17 00:00:00 2001 From: godhyzzang <109357302+godhyzzang@users.noreply.github.com> Date: Thu, 7 Nov 2024 15:31:47 +0900 Subject: [PATCH 09/18] =?UTF-8?q?fix=20:=20=EB=B9=84=EB=8F=99=EA=B8=B0isAs?= =?UTF-8?q?ync=EB=9D=BC=EB=8A=94=20=EC=9D=B4=EB=A6=84=EC=97=90=20=EB=A7=9E?= =?UTF-8?q?=EC=B6=B0=20=EC=82=BC=ED=95=AD=EC=97=B0=EC=82=B0=EC=9E=90=20?= =?UTF-8?q?=ED=95=A8=EC=88=98=20=EC=9C=84=EC=B9=98=20=EB=B0=94=EA=BF=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/dist/components/BlockView.d.ts | 5 ++--- core/dist/components/BlockView.d.ts.map | 2 +- core/dist/components/LineView.d.ts | 1 - core/dist/components/LineView.d.ts.map | 2 +- core/dist/components/ReactScriptPlayer.d.ts.map | 2 +- core/dist/hooks/useThrottling.d.ts.map | 2 +- core/dist/index.js | 5 ++--- core/dist/index.js.map | 4 ++-- core/dist/utils/findClickedIndex.d.ts.map | 2 +- core/src/components/ReactScriptPlayer.tsx | 6 +++--- 10 files changed, 14 insertions(+), 17 deletions(-) diff --git a/core/dist/components/BlockView.d.ts b/core/dist/components/BlockView.d.ts index 23b069b..ae1b2e4 100644 --- a/core/dist/components/BlockView.d.ts +++ b/core/dist/components/BlockView.d.ts @@ -1,8 +1,7 @@ import { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts'; interface BlockViewProps { scripts: Script[]; - currentScriptIndex: number | null; - currentVideoScriptIndex: number | null; + currentScriptIndex: number; selectedLanguages: T[]; seekTo: (timeInSeconds: number) => void; onClickScript: (script: Script, index: number) => void; @@ -10,6 +9,6 @@ interface BlockViewProps { timeStyle?: TimeStyle; textStyle?: TextStyle; } -export declare function BlockView({ scripts, currentScriptIndex, currentVideoScriptIndex, selectedLanguages, seekTo, onClickScript, onSelectWord, timeStyle, textStyle, }: BlockViewProps): import("react/jsx-runtime").JSX.Element; +export declare function BlockView({ scripts, currentScriptIndex, selectedLanguages, seekTo, onClickScript, onSelectWord, timeStyle, textStyle, }: BlockViewProps): import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=BlockView.d.ts.map \ No newline at end of file diff --git a/core/dist/components/BlockView.d.ts.map b/core/dist/components/BlockView.d.ts.map index 9502586..cdaf64d 100644 --- a/core/dist/components/BlockView.d.ts.map +++ b/core/dist/components/BlockView.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"BlockView.d.ts","sourceRoot":"","sources":["../../src/components/BlockView.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAOhF,UAAU,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACtD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAGD,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACzD,OAAO,EACP,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,EACjB,MAAM,EACN,aAAa,EACb,YAAY,EACZ,SAAS,EACT,SAAS,GACV,EAAE,cAAc,CAAC,CAAC,CAAC,2CA8DnB"} \ No newline at end of file +{"version":3,"file":"BlockView.d.ts","sourceRoot":"","sources":["../../src/components/BlockView.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAOhF,UAAU,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACtD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAGD,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACzD,OAAO,EACP,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,aAAa,EACb,YAAY,EACZ,SAAS,EACT,SAAS,GACV,EAAE,cAAc,CAAC,CAAC,CAAC,2CA8DnB"} \ No newline at end of file diff --git a/core/dist/components/LineView.d.ts b/core/dist/components/LineView.d.ts index 52e658a..9769e4c 100644 --- a/core/dist/components/LineView.d.ts +++ b/core/dist/components/LineView.d.ts @@ -3,7 +3,6 @@ interface LineViewProps { scripts: Script[]; selectedLanguages: T[]; currentScriptIndex: number; - currentVideoScriptIndex: number | null; seekTo: (timeInSeconds: number) => void; onSelectWord: (word: string, script: Script, index: number) => void; textStyle?: TextStyle; diff --git a/core/dist/components/LineView.d.ts.map b/core/dist/components/LineView.d.ts.map index fe39288..f30b80d 100644 --- a/core/dist/components/LineView.d.ts.map +++ b/core/dist/components/LineView.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"LineView.d.ts","sourceRoot":"","sources":["../../src/components/LineView.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAQxE,UAAU,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACrD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IACnE,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;CACpE;AAGD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACxD,OAAO,EACP,iBAAiB,EACjB,kBAAkB,EAClB,MAAM,EACN,YAAY,EACZ,SAAS,EACT,UAAU,EACV,UAAU,GACX,EAAE,aAAa,CAAC,CAAC,CAAC,2CAgElB"} \ No newline at end of file +{"version":3,"file":"LineView.d.ts","sourceRoot":"","sources":["../../src/components/LineView.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAQxE,UAAU,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACrD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IACnE,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;CACpE;AAGD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACxD,OAAO,EACP,iBAAiB,EACjB,kBAAkB,EAClB,MAAM,EACN,YAAY,EACZ,SAAS,EACT,UAAU,EACV,UAAU,GACX,EAAE,aAAa,CAAC,CAAC,CAAC,2CAmElB"} \ No newline at end of file diff --git a/core/dist/components/ReactScriptPlayer.d.ts.map b/core/dist/components/ReactScriptPlayer.d.ts.map index b84c210..244c374 100644 --- a/core/dist/components/ReactScriptPlayer.d.ts.map +++ b/core/dist/components/ReactScriptPlayer.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ReactScriptPlayer.d.ts","sourceRoot":"","sources":["../../src/components/ReactScriptPlayer.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,MAAM,EACN,cAAc,EACd,SAAS,EACT,SAAS,EACV,MAAM,uBAAuB,CAAC;AAM/B,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACrE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IACnE,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;CACpE;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACjE,IAAI,EACJ,OAAO,EACP,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,aAAa,EACb,YAAY,EACZ,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,GACX,EAAE,sBAAsB,CAAC,CAAC,CAAC,2CA0D3B"} \ No newline at end of file +{"version":3,"file":"ReactScriptPlayer.d.ts","sourceRoot":"","sources":["../../src/components/ReactScriptPlayer.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,MAAM,EACN,cAAc,EACd,SAAS,EACT,SAAS,EACV,MAAM,uBAAuB,CAAC;AAM/B,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACrE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IACnE,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;CACpE;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACjE,IAAI,EACJ,OAAO,EACP,iBAAiB,EACjB,MAAM,EAEN,WAAW,EACX,aAAa,EACb,YAAY,EACZ,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,GACX,EAAE,sBAAsB,CAAC,CAAC,CAAC,2CA4C3B"} \ No newline at end of file diff --git a/core/dist/hooks/useThrottling.d.ts.map b/core/dist/hooks/useThrottling.d.ts.map index e1eea58..e94e95e 100644 --- a/core/dist/hooks/useThrottling.d.ts.map +++ b/core/dist/hooks/useThrottling.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"useThrottling.d.ts","sourceRoot":"","sources":["../../src/hooks/useThrottling.ts"],"names":[],"mappings":"AAEA,UAAU,eAAe,CAAC,CAAC;IACzB,aAAa,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,CAAC,EAAE,EACvC,aAAa,EACb,KAAS,GACV,EAAE,eAAe,CAAC,CAAC,CAAC,SAIX,CAAC,UAaV"} \ No newline at end of file +{"version":3,"file":"useThrottling.d.ts","sourceRoot":"","sources":["../../src/hooks/useThrottling.ts"],"names":[],"mappings":"AAEA,UAAU,eAAe,CAAC,CAAC;IACzB,aAAa,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,CAAC,EAAE,EACvC,aAAa,EACb,KAAW,GACZ,EAAE,eAAe,CAAC,CAAC,CAAC,SAIX,CAAC,UAaV"} \ No newline at end of file diff --git a/core/dist/index.js b/core/dist/index.js index e40414b..51dec5b 100644 --- a/core/dist/index.js +++ b/core/dist/index.js @@ -315,10 +315,9 @@ function ReactScriptPlayer({ NextButton }) { var _a, _b; - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const [isAsync, setIsAsync] = useState2(true); + const [isAsync, setIsAsync] = useState2(); const [clickedIndex, setClickedIndex] = useState2(0); - const currentScriptIndex = isAsync ? (_a = findCurrentScriptIndex(scripts, currentTime)) != null ? _a : 0 : (_b = findClickedIndex(scripts, clickedIndex)) != null ? _b : 0; + const currentScriptIndex = isAsync ? (_a = findClickedIndex(scripts, clickedIndex)) != null ? _a : 0 : (_b = findCurrentScriptIndex(scripts, currentTime)) != null ? _b : 0; const handleClickScript = (script, index) => { setClickedIndex(index); onClickScript(script, index); diff --git a/core/dist/index.js.map b/core/dist/index.js.map index 5897121..f5a7146 100644 --- a/core/dist/index.js.map +++ b/core/dist/index.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../src/components/ReactScriptPlayer.tsx", "esbuild-scss-modules-plugin:./ReactScriptPlayer.module.scss", "../src/utils/findClickedIndex.ts", "../src/hooks/useThrottling.ts", "../src/components/TextDisplay.tsx", "../src/utils/moveToScriptAtIndex.ts", "../src/components/LineView.tsx", "../src/components/BlockView.tsx", "../src/utils/convertTime.ts", "../src/utils/findCurrentScriptIndex.ts"], - "sourcesContent": ["import React, { useState } from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { findClickedIndex } from 'utils/findClickedIndex';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\n\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n // isAsync: boolean; // TODO(@godhyzzang) : isAsync\uB97C props\uB85C \uB118\uACA8\uC918\uC57C\uD569\uB2C8\uB2E4\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n // isAsync, // TODO(@godhyzzang) : isAsync\uB97C props\uB85C \uB118\uACA8\uC918\uC57C\uD569\uB2C8\uB2E4\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n}: ReactScriptPlayerProps) {\n // TODO(@godhyzzang) : isAsync\uB97C props\uB85C \uB118\uACA8\uC918\uC57C\uD569\uB2C8\uB2E4\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [isAsync, setIsAsync] = useState(true);\n const [clickedIndex, setClickedIndex] = useState(0);\n\n // async\uC5EC\uBD80\uC5D0 \uB530\uB77C currentScriptIndex\uAC00 \uB2EC\uB77C\uC838\uC57C\uD569\uB2C8\uB2E4\n const currentScriptIndex = isAsync\n ? (findCurrentScriptIndex(scripts, currentTime) ?? 0)\n : (findClickedIndex(scripts, clickedIndex) ?? 0);\n\n const handleClickScript = (script: Script, index: number) => {\n setClickedIndex(index);\n onClickScript(script, index);\n };\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n return (\n
\n
\n

Transcript

\n {mode === 'line' ? (\n \n ) : (\n \n )}\n
\n
\n );\n}\n", "\nconst digest = '9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50';\nconst classes = {\"scriptsContainer\":\"_scriptsContainer_1tyea_7\",\"title\":\"_title_1tyea_18\",\"lineViewContainer\":\"_lineViewContainer_1tyea_23\",\"skipButtonContainer\":\"_skipButtonContainer_1tyea_28\",\"blockViewContainer\":\"_blockViewContainer_1tyea_35\",\"scriptItem\":\"_scriptItem_1tyea_42\",\"timeButton\":\"_timeButton_1tyea_47\",\"textView\":\"_textView_1tyea_60\",\"highlighted\":\"_highlighted_1tyea_65\"};\nconst css = `* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n._scriptsContainer_1tyea_7 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n width: 100%;\n height: auto;\n padding: 1.5rem;\n border: 2px solid #ececec;\n border-radius: 0.75rem;\n}\n\n._title_1tyea_18 {\n font-size: 1.25rem;\n font-weight: 700;\n}\n\n._lineViewContainer_1tyea_23 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 {\n align-self: end;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 button {\n cursor: pointer;\n}\n\n._blockViewContainer_1tyea_35 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n height: 16rem;\n overflow-y: auto;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 {\n padding: 16px;\n border-radius: 12px;\n transition: background-color 0.5s ease-in-out;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 ._timeButton_1tyea_47 {\n width: 5rem;\n padding-inline: 0.75rem;\n padding-block: 0.5rem;\n margin-bottom: 0.5rem;\n border: none;\n border-radius: 9999px;\n background-color: gray;\n cursor: pointer;\n font-size: 0.75rem;\n color: white;\n}\n\n._textView_1tyea_60 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n._textView_1tyea_60._highlighted_1tyea_65 {\n background-color: #fef08a;\n}`;\n\n(function() {\n if (typeof document !== \"undefined\" && !document.getElementById(digest)) {\n var ele = document.createElement('style');\n ele.id = digest;\n ele.textContent = css;\n document.head.appendChild(ele);\n }\n})();\n\nexport default classes;\nexport { css, digest, classes };\n ", "// findClickedIndex.ts\nimport { Script } from 'interfaces/Scripts';\n\nexport const findClickedIndex = (\n scripts: Script[] | undefined,\n clickedIndex: number,\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n return clickedIndex >= 0 && clickedIndex < scripts.length\n ? clickedIndex\n : null;\n};\n", "import { useState, useCallback } from 'react';\n\ninterface ThrottlingProps {\n buttonClicked: (arg: T) => void;\n delay?: number; // Optional delay prop\n}\n\nexport default function useThrottling({\n buttonClicked,\n delay = 300,\n}: ThrottlingProps) {\n const [isThrottled, setIsThrottled] = useState(false);\n\n const throttledCallback = useCallback(\n (arg: T) => {\n if (!isThrottled) {\n buttonClicked(arg);\n setIsThrottled(true);\n setTimeout(() => {\n setIsThrottled(false);\n }, delay);\n }\n },\n [isThrottled, buttonClicked, delay],\n );\n\n return throttledCallback;\n}\n", "import React from 'react';\nimport { Script, LanguageCode, TextStyle } from '../interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface TextDisplayProps {\n script: Script;\n selectedLanguages: T[];\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n}\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uC801\uC6A9\nexport function TextDisplay({\n script,\n selectedLanguages,\n onSelectWord,\n textStyle,\n}: TextDisplayProps) {\n return (\n \n {selectedLanguages.map((language) => (\n {\n const selection = window.getSelection();\n if (selection && selection.toString()) {\n const selectedWord = selection.toString().trim();\n if (selectedWord) {\n onSelectWord(selectedWord, script, 0);\n }\n }\n }}\n >\n {script[language] || `(${language} \uC790\uB9C9\uC774 \uC5C6\uC5B4\uC694!)`}\n

\n ))}\n \n );\n}\n", "import { Script } from '../interfaces/Scripts';\n\nexport const moveToScriptAtIndex = (\n index: number,\n scripts: Script[],\n seekTo: (timeInSeconds: number) => void,\n) => {\n // \uC720\uD6A8\uD55C \uC778\uB371\uC2A4\uC778\uC9C0 \uD655\uC778\n if (index < 0 || index >= scripts.length - 1) {\n console.warn('Invalid script index:', index);\n return;\n }\n\n // \uC2A4\uD06C\uB9BD\uD2B8 \uC2DC\uC791 \uC2DC\uAC04\uC73C\uB85C \uC774\uB3D9\n console.log('Seeking to:', scripts[index]);\n\n seekTo(scripts[index].startTimeInSecond);\n};\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n // const totalScripts = scripts.length;\n\n // const handlePrevious = () => {\n // if (currentScriptIndex > 0) {\n // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond);\n // }\n // console.log(\n // '\uC804\uC73C\uB85C \uC774\uB3D9 ',\n // scripts[currentScriptIndex - 1].startTimeInSecond,\n // );\n // };\n\n // const handleNext = () => {\n // if (currentScriptIndex < totalScripts - 1) {\n // console.log(\n // '\uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9',\n // scripts[currentScriptIndex + 1].startTimeInSecond,\n // );\n // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond);\n // }\n // };\n\n const throttledHandlePrevious = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo),\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo),\n });\n\n // console.log(currentScriptIndex);\n\n return (\n
\n
\n {PrevButton ? (\n throttledHandlePrevious(currentScriptIndex)}\n />\n ) : (\n \n )}\n {NextButton ? (\n throttledHandleNext(currentScriptIndex)} />\n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n}\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n\n useEffect(() => {\n if (containerRef.current) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex]);\n\n return (\n
\n {scripts.map((script, index) => (\n {\n moveToScriptAtIndex(index, scripts, seekTo);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n \n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n"], - "mappings": ";AAAA,SAAgB,YAAAA,iBAAgB;;;ACChC,IAAM,SAAS;AACf,IAAM,UAAU,EAAC,oBAAmB,6BAA4B,SAAQ,mBAAkB,qBAAoB,+BAA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WAAW,iCAAO,kBAAkB,OAAO,EAAE,GAAG,eAAe,GAClE,0BAAAC,MAAC,SAAI,WAAW,iCAAO,kBACrB;AAAA,oBAAAD,KAAC,OAAE,WAAW,iCAAO,OAAO,wBAAU;AAAA,IACrC,SAAS,SACR,gBAAAA,KAAC,YAAU,GAAG,mBAAmB,WAAsB,IAEvD,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,eAAe;AAAA,QACf;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ,GACF;AAEJ;", + "sourcesContent": ["import React, { useState } from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { findClickedIndex } from 'utils/findClickedIndex';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\n\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n // isAsync: boolean; // TODO(@godhyzzang) : isAsync\uB97C props\uB85C \uB118\uACA8\uC918\uC57C\uD569\uB2C8\uB2E4\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n // isAsync, // TODO(@godhyzzang) : isAsync\uB97C props\uB85C \uB118\uACA8\uC918\uC57C\uD569\uB2C8\uB2E4\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n}: ReactScriptPlayerProps) {\n // TODO(@godhyzzang) : isAsync\uB97C props\uB85C \uB118\uACA8\uC918\uC57C\uD569\uB2C8\uB2E4\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [isAsync, setIsAsync] = useState();\n const [clickedIndex, setClickedIndex] = useState(0);\n\n const currentScriptIndex = isAsync\n ? (findClickedIndex(scripts, clickedIndex) ?? 0) // \uD074\uB9AD\uD55C script index \uCC3E\uB294 \uD568\uC218\n : (findCurrentScriptIndex(scripts, currentTime) ?? 0); // \uB3D9\uC601\uC0C1 \uC7AC\uC0DD\uC5D0 \uB3D9\uAE30\uD654\uB418\uB294 script Index\uCC3E\uB294 \uD568\uC218\n\n // TODO(@godhyzzang) : lineview\uC5D0\uC11C\uB3C4 setClickedIndex \uC0AC\uC6A9\uD574\uC57C\uD568. \uD604\uC7AC \uC774 \uD568\uC218\uAC00 blockview\uC5D0\uC11C\uB9CC \uC0AC\uC6A9\uB418\uACE0 \uC788\uC5B4\uC11C lineview\uC5D0\uC11C\uB294 currentScriptIndex\uB97C set\uD558\uC9C0 \uBABB \uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4.\n const handleClickScript = (script: Script, index: number) => {\n setClickedIndex(index);\n onClickScript(script, index);\n };\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n return (\n
\n
\n

Transcript

\n {mode === 'line' ? (\n \n ) : (\n \n )}\n
\n
\n );\n}\n", "\nconst digest = '9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50';\nconst classes = {\"scriptsContainer\":\"_scriptsContainer_1tyea_7\",\"title\":\"_title_1tyea_18\",\"lineViewContainer\":\"_lineViewContainer_1tyea_23\",\"skipButtonContainer\":\"_skipButtonContainer_1tyea_28\",\"blockViewContainer\":\"_blockViewContainer_1tyea_35\",\"scriptItem\":\"_scriptItem_1tyea_42\",\"timeButton\":\"_timeButton_1tyea_47\",\"textView\":\"_textView_1tyea_60\",\"highlighted\":\"_highlighted_1tyea_65\"};\nconst css = `* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n._scriptsContainer_1tyea_7 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n width: 100%;\n height: auto;\n padding: 1.5rem;\n border: 2px solid #ececec;\n border-radius: 0.75rem;\n}\n\n._title_1tyea_18 {\n font-size: 1.25rem;\n font-weight: 700;\n}\n\n._lineViewContainer_1tyea_23 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 {\n align-self: end;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 button {\n cursor: pointer;\n}\n\n._blockViewContainer_1tyea_35 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n height: 16rem;\n overflow-y: auto;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 {\n padding: 16px;\n border-radius: 12px;\n transition: background-color 0.5s ease-in-out;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 ._timeButton_1tyea_47 {\n width: 5rem;\n padding-inline: 0.75rem;\n padding-block: 0.5rem;\n margin-bottom: 0.5rem;\n border: none;\n border-radius: 9999px;\n background-color: gray;\n cursor: pointer;\n font-size: 0.75rem;\n color: white;\n}\n\n._textView_1tyea_60 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n._textView_1tyea_60._highlighted_1tyea_65 {\n background-color: #fef08a;\n}`;\n\n(function() {\n if (typeof document !== \"undefined\" && !document.getElementById(digest)) {\n var ele = document.createElement('style');\n ele.id = digest;\n ele.textContent = css;\n document.head.appendChild(ele);\n }\n})();\n\nexport default classes;\nexport { css, digest, classes };\n ", "// findClickedIndex.ts\nimport { Script } from 'interfaces/Scripts';\n\nexport const findClickedIndex = (\n scripts: Script[] | undefined,\n clickedIndex: number,\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n return clickedIndex >= 0 && clickedIndex < scripts.length\n ? clickedIndex\n : null;\n};\n", "import { useState, useCallback } from 'react';\n\ninterface ThrottlingProps {\n buttonClicked: (arg: T) => void;\n delay?: number; // Optional delay prop\n}\n\nexport default function useThrottling({\n buttonClicked,\n delay = 300,\n}: ThrottlingProps) {\n const [isThrottled, setIsThrottled] = useState(false);\n\n const throttledCallback = useCallback(\n (arg: T) => {\n if (!isThrottled) {\n buttonClicked(arg);\n setIsThrottled(true);\n setTimeout(() => {\n setIsThrottled(false);\n }, delay);\n }\n },\n [isThrottled, buttonClicked, delay],\n );\n\n return throttledCallback;\n}\n", "import React from 'react';\nimport { Script, LanguageCode, TextStyle } from '../interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface TextDisplayProps {\n script: Script;\n selectedLanguages: T[];\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n}\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uC801\uC6A9\nexport function TextDisplay({\n script,\n selectedLanguages,\n onSelectWord,\n textStyle,\n}: TextDisplayProps) {\n return (\n \n {selectedLanguages.map((language) => (\n {\n const selection = window.getSelection();\n if (selection && selection.toString()) {\n const selectedWord = selection.toString().trim();\n if (selectedWord) {\n onSelectWord(selectedWord, script, 0);\n }\n }\n }}\n >\n {script[language] || `(${language} \uC790\uB9C9\uC774 \uC5C6\uC5B4\uC694!)`}\n

\n ))}\n \n );\n}\n", "import { Script } from '../interfaces/Scripts';\n\nexport const moveToScriptAtIndex = (\n index: number,\n scripts: Script[],\n seekTo: (timeInSeconds: number) => void,\n) => {\n // \uC720\uD6A8\uD55C \uC778\uB371\uC2A4\uC778\uC9C0 \uD655\uC778\n if (index < 0 || index >= scripts.length - 1) {\n console.warn('Invalid script index:', index);\n return;\n }\n\n // \uC2A4\uD06C\uB9BD\uD2B8 \uC2DC\uC791 \uC2DC\uAC04\uC73C\uB85C \uC774\uB3D9\n console.log('Seeking to:', scripts[index]);\n\n seekTo(scripts[index].startTimeInSecond);\n};\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n // \uC774\uC804 \uCF54\uB4DC\n // const totalScripts = scripts.length;\n\n // const handlePrevious = () => {\n // if (currentScriptIndex > 0) {\n // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond);\n // }\n // console.log(\n // '\uC804\uC73C\uB85C \uC774\uB3D9 ',\n // scripts[currentScriptIndex - 1].startTimeInSecond,\n // );\n // };\n\n // const handleNext = () => {\n // if (currentScriptIndex < totalScripts - 1) {\n // console.log(\n // '\uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9',\n // scripts[currentScriptIndex + 1].startTimeInSecond,\n // );\n // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond);\n // }\n // };\n\n const throttledHandlePrevious = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo),\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo),\n });\n\n // console.log(currentScriptIndex);\n\n return (\n
\n
\n {PrevButton ? (\n throttledHandlePrevious(currentScriptIndex)}\n />\n ) : (\n \n )}\n {NextButton ? (\n throttledHandleNext(currentScriptIndex)} />\n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n}\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n\n useEffect(() => {\n if (containerRef.current) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex]);\n\n return (\n
\n {scripts.map((script, index) => (\n {\n moveToScriptAtIndex(index, scripts, seekTo);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n \n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n"], + "mappings": ";AAAA,SAAgB,YAAAA,iBAAgB;;;ACChC,IAAM,SAAS;AACf,IAAM,UAAU,EAAC,oBAAmB,6BAA4B,SAAQ,mBAAkB,qBAAoB,+BAA8B,uBAAsB,iCAAgC,sBAAqB,gCAA+B,cAAa,wBAAuB,cAAa,wBAAuB,YAAW,sBAAqB,eAAc,wBAAuB;AACnY,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAoEX,WAAW;AACV,MAAI,OAAO,aAAa,eAAe,CAAC,SAAS,eAAe,MAAM,GAAG;AACvE,QAAI,MAAM,SAAS,cAAc,OAAO;AACxC,QAAI,KAAK;AACT,QAAI,cAAc;AAClB,aAAS,KAAK,YAAY,GAAG;AAAA,EAC/B;AACF,GAAG;AAEH,IAAO,mCAAQ;;;AC7ER,IAAM,mBAAmB,CAC9B,SACA,iBACkB;AAClB,MAAI,CAAC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,SAAS,UAAU,IAAIC,UAAkB;AAChD,QAAM,CAAC,cAAc,eAAe,IAAIA,UAAiB,CAAC;AAE1D,QAAM,qBAAqB,WACtB,sBAAiB,SAAS,YAAY,MAAtC,YAA2C,KAC3C,4BAAuB,SAAS,WAAW,MAA3C,YAAgD;AAGrD,QAAM,oBAAoB,CAAC,QAAmB,UAAkB;AAC9D,oBAAgB,KAAK;AACrB,kBAAc,QAAQ,KAAK;AAAA,EAC7B;AAEA,QAAM,oBAAoB;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SACE,gBAAAF,KAAC,SAAI,WAAW,iCAAO,kBAAkB,OAAO,EAAE,GAAG,eAAe,GAClE,0BAAAC,MAAC,SAAI,WAAW,iCAAO,kBACrB;AAAA,oBAAAD,KAAC,OAAE,WAAW,iCAAO,OAAO,wBAAU;AAAA,IACrC,SAAS,SACR,gBAAAA,KAAC,YAAU,GAAG,mBAAmB,WAAsB,IAEvD,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,eAAe;AAAA,QACf;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ,GACF;AAEJ;", "names": ["useState", "jsx", "currentScriptIndex", "jsx", "jsxs", "index", "jsx", "jsxs", "useState"] } diff --git a/core/dist/utils/findClickedIndex.d.ts.map b/core/dist/utils/findClickedIndex.d.ts.map index f7841ee..8504d61 100644 --- a/core/dist/utils/findClickedIndex.d.ts.map +++ b/core/dist/utils/findClickedIndex.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"findClickedIndex.d.ts","sourceRoot":"","sources":["../../src/utils/findClickedIndex.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,eAAO,MAAM,cAAc,YAChB,MAAM,EAAE,GAAG,SAAS,gBACf,MAAM,KACnB,MAAM,GAAG,IAKX,CAAC"} \ No newline at end of file +{"version":3,"file":"findClickedIndex.d.ts","sourceRoot":"","sources":["../../src/utils/findClickedIndex.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,eAAO,MAAM,gBAAgB,YAClB,MAAM,EAAE,GAAG,SAAS,gBACf,MAAM,KACnB,MAAM,GAAG,IAKX,CAAC"} \ No newline at end of file diff --git a/core/src/components/ReactScriptPlayer.tsx b/core/src/components/ReactScriptPlayer.tsx index 76d7dab..aa1b621 100644 --- a/core/src/components/ReactScriptPlayer.tsx +++ b/core/src/components/ReactScriptPlayer.tsx @@ -45,12 +45,12 @@ export function ReactScriptPlayer({ }: ReactScriptPlayerProps) { // TODO(@godhyzzang) : isAsync를 props로 넘겨줘야합니다 // eslint-disable-next-line @typescript-eslint/no-unused-vars - const [isAsync, setIsAsync] = useState(true); + const [isAsync, setIsAsync] = useState(); const [clickedIndex, setClickedIndex] = useState(0); const currentScriptIndex = isAsync - ? (findCurrentScriptIndex(scripts, currentTime) ?? 0) // 동영상 재생에 동기화되는 script Index찾는 함수 - : (findClickedIndex(scripts, clickedIndex) ?? 0); // 클릭한 script index 찾는 함수 + ? (findClickedIndex(scripts, clickedIndex) ?? 0) // 클릭한 script index 찾는 함수 + : (findCurrentScriptIndex(scripts, currentTime) ?? 0); // 동영상 재생에 동기화되는 script Index찾는 함수 // TODO(@godhyzzang) : lineview에서도 setClickedIndex 사용해야함. 현재 이 함수가 blockview에서만 사용되고 있어서 lineview에서는 currentScriptIndex를 set하지 못 하고 있습니다. const handleClickScript = (script: Script, index: number) => { From 3b67230e5026aca6e9712f886599e7d3457949cd Mon Sep 17 00:00:00 2001 From: godhyzzang <109357302+godhyzzang@users.noreply.github.com> Date: Mon, 11 Nov 2024 16:20:24 +0900 Subject: [PATCH 10/18] =?UTF-8?q?[feat]=20=EC=9E=90=EB=A7=89=20=EA=B0=80?= =?UTF-8?q?=EC=9A=B4=EB=8D=B0=20=EC=A0=95=EB=A0=AC=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?switch=EB=B2=84=ED=8A=BC=20=EA=B5=AC=ED=98=84=20(#34)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat : 자막 가운데 정렬 버튼 구현 * remove : 필요없는 findClickedIndex함수 삭제 * chore : dev 후 실행 파일 --- core/dist/components/BlockView.d.ts | 3 +- core/dist/components/BlockView.d.ts.map | 2 +- .../components/ReactScriptPlayer.d.ts.map | 2 +- core/dist/components/SwitchButton.d.ts | 7 + core/dist/components/SwitchButton.d.ts.map | 1 + core/dist/components/SwithButton.d.ts | 7 + core/dist/components/SwithButton.d.ts.map | 1 + core/dist/index.js | 179 +++++++++++++----- core/dist/index.js.map | 8 +- core/dist/utils/findClickedIndex.d.ts | 3 - core/dist/utils/findClickedIndex.d.ts.map | 1 - core/src/components/BlockView.tsx | 12 +- .../components/ReactScriptPlayer.module.scss | 63 +++++- core/src/components/ReactScriptPlayer.tsx | 28 ++- core/src/components/SwitchButton.tsx | 34 ++++ core/src/utils/findClickedIndex.ts | 12 -- 16 files changed, 277 insertions(+), 86 deletions(-) create mode 100644 core/dist/components/SwitchButton.d.ts create mode 100644 core/dist/components/SwitchButton.d.ts.map create mode 100644 core/dist/components/SwithButton.d.ts create mode 100644 core/dist/components/SwithButton.d.ts.map delete mode 100644 core/dist/utils/findClickedIndex.d.ts delete mode 100644 core/dist/utils/findClickedIndex.d.ts.map create mode 100644 core/src/components/SwitchButton.tsx delete mode 100644 core/src/utils/findClickedIndex.ts diff --git a/core/dist/components/BlockView.d.ts b/core/dist/components/BlockView.d.ts index ae1b2e4..106a1e9 100644 --- a/core/dist/components/BlockView.d.ts +++ b/core/dist/components/BlockView.d.ts @@ -4,11 +4,12 @@ interface BlockViewProps { currentScriptIndex: number; selectedLanguages: T[]; seekTo: (timeInSeconds: number) => void; + isSubtitleCentered?: boolean; onClickScript: (script: Script, index: number) => void; onSelectWord: (word: string, script: Script, index: number) => void; timeStyle?: TimeStyle; textStyle?: TextStyle; } -export declare function BlockView({ scripts, currentScriptIndex, selectedLanguages, seekTo, onClickScript, onSelectWord, timeStyle, textStyle, }: BlockViewProps): import("react/jsx-runtime").JSX.Element; +export declare function BlockView({ scripts, currentScriptIndex, selectedLanguages, seekTo, isSubtitleCentered, onClickScript, onSelectWord, timeStyle, textStyle, }: BlockViewProps): import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=BlockView.d.ts.map \ No newline at end of file diff --git a/core/dist/components/BlockView.d.ts.map b/core/dist/components/BlockView.d.ts.map index cdaf64d..8c31588 100644 --- a/core/dist/components/BlockView.d.ts.map +++ b/core/dist/components/BlockView.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"BlockView.d.ts","sourceRoot":"","sources":["../../src/components/BlockView.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAOhF,UAAU,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACtD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAGD,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACzD,OAAO,EACP,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,aAAa,EACb,YAAY,EACZ,SAAS,EACT,SAAS,GACV,EAAE,cAAc,CAAC,CAAC,CAAC,2CA8DnB"} \ No newline at end of file +{"version":3,"file":"BlockView.d.ts","sourceRoot":"","sources":["../../src/components/BlockView.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAMhF,UAAU,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACtD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAGD,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACzD,OAAO,EACP,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,SAAS,EACT,SAAS,GACV,EAAE,cAAc,CAAC,CAAC,CAAC,2CAiEnB"} \ No newline at end of file diff --git a/core/dist/components/ReactScriptPlayer.d.ts.map b/core/dist/components/ReactScriptPlayer.d.ts.map index 244c374..61a992f 100644 --- a/core/dist/components/ReactScriptPlayer.d.ts.map +++ b/core/dist/components/ReactScriptPlayer.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ReactScriptPlayer.d.ts","sourceRoot":"","sources":["../../src/components/ReactScriptPlayer.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,MAAM,EACN,cAAc,EACd,SAAS,EACT,SAAS,EACV,MAAM,uBAAuB,CAAC;AAM/B,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACrE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IACnE,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;CACpE;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACjE,IAAI,EACJ,OAAO,EACP,iBAAiB,EACjB,MAAM,EAEN,WAAW,EACX,aAAa,EACb,YAAY,EACZ,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,GACX,EAAE,sBAAsB,CAAC,CAAC,CAAC,2CA4C3B"} \ No newline at end of file +{"version":3,"file":"ReactScriptPlayer.d.ts","sourceRoot":"","sources":["../../src/components/ReactScriptPlayer.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,YAAY,EACZ,MAAM,EACN,cAAc,EACd,SAAS,EACT,SAAS,EACV,MAAM,uBAAuB,CAAC;AAI/B,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACrE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IACnE,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;CACpE;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACjE,IAAI,EACJ,OAAO,EACP,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,aAAa,EACb,YAAY,EACZ,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,GACX,EAAE,sBAAsB,CAAC,CAAC,CAAC,2CA6C3B"} \ No newline at end of file diff --git a/core/dist/components/SwitchButton.d.ts b/core/dist/components/SwitchButton.d.ts new file mode 100644 index 0000000..5290725 --- /dev/null +++ b/core/dist/components/SwitchButton.d.ts @@ -0,0 +1,7 @@ +import React from 'react'; +export interface SwitchButtonProps { + toggle: React.Dispatch>; + isToggle: boolean; +} +export declare function SwitchButton({ toggle, isToggle, }: SwitchButtonProps): JSX.Element; +//# sourceMappingURL=SwitchButton.d.ts.map \ No newline at end of file diff --git a/core/dist/components/SwitchButton.d.ts.map b/core/dist/components/SwitchButton.d.ts.map new file mode 100644 index 0000000..cd13dc5 --- /dev/null +++ b/core/dist/components/SwitchButton.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SwitchButton.d.ts","sourceRoot":"","sources":["../../src/components/SwitchButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACtD,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,QAAQ,GACT,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAsBjC"} \ No newline at end of file diff --git a/core/dist/components/SwithButton.d.ts b/core/dist/components/SwithButton.d.ts new file mode 100644 index 0000000..ea9ac15 --- /dev/null +++ b/core/dist/components/SwithButton.d.ts @@ -0,0 +1,7 @@ +import React from 'react'; +export interface SwitchButtonProps { + toggle: React.Dispatch>; + isToggle: boolean; +} +export declare function SwitchButton({ toggle, isToggle, }: SwitchButtonProps): JSX.Element; +//# sourceMappingURL=SwithButton.d.ts.map \ No newline at end of file diff --git a/core/dist/components/SwithButton.d.ts.map b/core/dist/components/SwithButton.d.ts.map new file mode 100644 index 0000000..a875076 --- /dev/null +++ b/core/dist/components/SwithButton.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SwithButton.d.ts","sourceRoot":"","sources":["../../src/components/SwithButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACtD,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,QAAQ,GACT,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAwBjC"} \ No newline at end of file diff --git a/core/dist/index.js b/core/dist/index.js index 51dec5b..1f638db 100644 --- a/core/dist/index.js +++ b/core/dist/index.js @@ -2,15 +2,15 @@ import { useState as useState2 } from "react"; // esbuild-scss-modules-plugin:./ReactScriptPlayer.module.scss -var digest = "9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50"; -var classes = { "scriptsContainer": "_scriptsContainer_1tyea_7", "title": "_title_1tyea_18", "lineViewContainer": "_lineViewContainer_1tyea_23", "skipButtonContainer": "_skipButtonContainer_1tyea_28", "blockViewContainer": "_blockViewContainer_1tyea_35", "scriptItem": "_scriptItem_1tyea_42", "timeButton": "_timeButton_1tyea_47", "textView": "_textView_1tyea_60", "highlighted": "_highlighted_1tyea_65" }; +var digest = "25156907bebcaf0559a742aed223c85038fcb2fc79508f6e84460a864423278b"; +var classes = { "scriptsContainer": "_scriptsContainer_dilkp_7", "horizontalContainer": "_horizontalContainer_dilkp_18", "title": "_title_dilkp_24", "lineViewContainer": "_lineViewContainer_dilkp_29", "skipButtonContainer": "_skipButtonContainer_dilkp_34", "blockViewContainer": "_blockViewContainer_dilkp_41", "scriptItem": "_scriptItem_dilkp_48", "timeButton": "_timeButton_dilkp_53", "textView": "_textView_dilkp_66", "highlighted": "_highlighted_dilkp_71", "switchButton": "_switchButton_dilkp_75", "switch": "_switch_dilkp_75", "slider": "_slider_dilkp_97" }; var css = `* { box-sizing: border-box; margin: 0; padding: 0; } -._scriptsContainer_1tyea_7 { +._scriptsContainer_dilkp_7 { display: flex; flex-direction: column; gap: 2rem; @@ -21,36 +21,42 @@ var css = `* { border-radius: 0.75rem; } -._title_1tyea_18 { +._horizontalContainer_dilkp_18 { + display: flex; + flex-direction: row; + justify-content: space-between; +} + +._title_dilkp_24 { font-size: 1.25rem; font-weight: 700; } -._lineViewContainer_1tyea_23 { +._lineViewContainer_dilkp_29 { display: flex; flex-direction: column; gap: 2rem; } -._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 { +._lineViewContainer_dilkp_29 ._skipButtonContainer_dilkp_34 { align-self: end; } -._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 button { +._lineViewContainer_dilkp_29 ._skipButtonContainer_dilkp_34 button { cursor: pointer; } -._blockViewContainer_1tyea_35 { +._blockViewContainer_dilkp_41 { display: flex; flex-direction: column; gap: 2rem; height: 16rem; overflow-y: auto; } -._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 { +._blockViewContainer_dilkp_41 ._scriptItem_dilkp_48 { padding: 16px; border-radius: 12px; transition: background-color 0.5s ease-in-out; } -._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 ._timeButton_1tyea_47 { +._blockViewContainer_dilkp_41 ._scriptItem_dilkp_48 ._timeButton_dilkp_53 { width: 5rem; padding-inline: 0.75rem; padding-block: 0.5rem; @@ -63,13 +69,64 @@ var css = `* { color: white; } -._textView_1tyea_60 { +._textView_dilkp_66 { display: flex; flex-direction: column; gap: 1rem; } -._textView_1tyea_60._highlighted_1tyea_65 { +._textView_dilkp_66._highlighted_dilkp_71 { background-color: #fef08a; +} + +._switchButton_dilkp_75 { + display: flex; + align-items: center; + gap: 0.5rem; + border: none; + background-color: white; + cursor: pointer; + padding: 0.5rem; + border-radius: 0.5rem; +} + +._switch_dilkp_75 { + position: relative; + display: inline-block; + width: 40px; + height: 20px; +} +._switch_dilkp_75 input { + opacity: 0; + width: 0; + height: 0; +} +._switch_dilkp_75 ._slider_dilkp_97 { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #ccc; + transition: 0.4s; + border-radius: 20px; +} +._switch_dilkp_75 ._slider_dilkp_97:before { + position: absolute; + content: ""; + height: 14px; + width: 14px; + left: 3px; + bottom: 3px; + background-color: white; + transition: 0.4s; + border-radius: 50%; +} +._switch_dilkp_75 input:checked + ._slider_dilkp_97 { + background-color: gray; +} +._switch_dilkp_75 input:checked + ._slider_dilkp_97:before { + transform: translateX(20px); }`; (function() { if (typeof document !== "undefined" && !document.getElementById(digest)) { @@ -81,11 +138,39 @@ var css = `* { })(); var ReactScriptPlayer_module_default = classes; -// src/utils/findClickedIndex.ts -var findClickedIndex = (scripts, clickedIndex) => { - if (!scripts || scripts.length === 0) return null; - return clickedIndex >= 0 && clickedIndex < scripts.length ? clickedIndex : null; -}; +// src/components/SwitchButton.tsx +import { jsx, jsxs } from "react/jsx-runtime"; +function SwitchButton({ + toggle, + isToggle +}) { + return /* @__PURE__ */ jsxs( + "button", + { + className: ReactScriptPlayer_module_default.switchButton, + type: "button", + onClick: () => { + toggle((prev) => !prev); + }, + children: [ + /* @__PURE__ */ jsxs("label", { className: ReactScriptPlayer_module_default.switch, children: [ + /* @__PURE__ */ jsx( + "input", + { + type: "checkbox", + checked: isToggle, + onChange: () => { + toggle((prev) => !prev); + } + } + ), + /* @__PURE__ */ jsx("span", { className: ReactScriptPlayer_module_default.slider }) + ] }), + /* @__PURE__ */ jsx("span", { children: "\uC790\uB9C9 \uAC00\uC6B4\uB370 \uC815\uB82C" }) + ] + } + ); +} // src/hooks/useThrottling.ts import { useState, useCallback } from "react"; @@ -116,18 +201,18 @@ var arrow_back_default = 'data:image/svg+xml, /* @__PURE__ */ jsx( + children: selectedLanguages.map((language) => /* @__PURE__ */ jsx2( "p", { className: ReactScriptPlayer_module_default.text, @@ -160,7 +245,7 @@ var moveToScriptAtIndex = (index, scripts, seekTo) => { }; // src/components/LineView.tsx -import { jsx as jsx2, jsxs } from "react/jsx-runtime"; +import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime"; function LineView({ scripts, selectedLanguages, @@ -177,17 +262,17 @@ function LineView({ const throttledHandleNext = useThrottling({ buttonClicked: (currentScriptIndex2) => moveToScriptAtIndex(currentScriptIndex2 + 1, scripts, seekTo) }); - return /* @__PURE__ */ jsxs("div", { className: ReactScriptPlayer_module_default.lineViewContainer, children: [ - /* @__PURE__ */ jsxs("div", { className: ReactScriptPlayer_module_default.skipButtonContainer, children: [ - PrevButton ? /* @__PURE__ */ jsx2( + return /* @__PURE__ */ jsxs2("div", { className: ReactScriptPlayer_module_default.lineViewContainer, children: [ + /* @__PURE__ */ jsxs2("div", { className: ReactScriptPlayer_module_default.skipButtonContainer, children: [ + PrevButton ? /* @__PURE__ */ jsx3( PrevButton, { onClick: () => throttledHandlePrevious(currentScriptIndex) } - ) : /* @__PURE__ */ jsx2("button", { onClick: () => throttledHandlePrevious(currentScriptIndex), children: /* @__PURE__ */ jsx2("img", { src: arrow_back_default, alt: "Back Arrow" }) }), - NextButton ? /* @__PURE__ */ jsx2(NextButton, { onClick: () => throttledHandleNext(currentScriptIndex) }) : /* @__PURE__ */ jsx2("button", { onClick: () => throttledHandleNext(currentScriptIndex), children: /* @__PURE__ */ jsx2("img", { src: arrow_forward_default, alt: "Forward Arrow" }) }) + ) : /* @__PURE__ */ jsx3("button", { onClick: () => throttledHandlePrevious(currentScriptIndex), children: /* @__PURE__ */ jsx3("img", { src: arrow_back_default, alt: "Back Arrow" }) }), + NextButton ? /* @__PURE__ */ jsx3(NextButton, { onClick: () => throttledHandleNext(currentScriptIndex) }) : /* @__PURE__ */ jsx3("button", { onClick: () => throttledHandleNext(currentScriptIndex), children: /* @__PURE__ */ jsx3("img", { src: arrow_forward_default, alt: "Forward Arrow" }) }) ] }), - scripts[currentScriptIndex] && /* @__PURE__ */ jsx2( + scripts[currentScriptIndex] && /* @__PURE__ */ jsx3( TextDisplay, { script: scripts[currentScriptIndex], @@ -212,12 +297,13 @@ function convertTime(seconds) { } // src/components/BlockView.tsx -import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime"; +import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime"; function BlockView({ scripts, currentScriptIndex, selectedLanguages, seekTo, + isSubtitleCentered, onClickScript, onSelectWord, timeStyle, @@ -225,7 +311,7 @@ function BlockView({ }) { const containerRef = useRef(null); useEffect(() => { - if (containerRef.current) { + if (containerRef.current && isSubtitleCentered !== void 0 && isSubtitleCentered) { if (currentScriptIndex < containerRef.current.children.length - 1) { const container = containerRef.current; const target = container.children[currentScriptIndex]; @@ -238,8 +324,8 @@ function BlockView({ }); } } - }, [currentScriptIndex]); - return /* @__PURE__ */ jsx3("div", { ref: containerRef, className: ReactScriptPlayer_module_default.blockViewContainer, children: scripts.map((script, index) => /* @__PURE__ */ jsxs2( + }, [currentScriptIndex, isSubtitleCentered]); + return /* @__PURE__ */ jsx4("div", { ref: containerRef, className: ReactScriptPlayer_module_default.blockViewContainer, children: scripts.map((script, index) => /* @__PURE__ */ jsxs3( "div", { className: ReactScriptPlayer_module_default.scriptItem, @@ -251,7 +337,7 @@ function BlockView({ backgroundColor: index === currentScriptIndex ? (textStyle == null ? void 0 : textStyle.activeColor) || "lightgray" : "transparent" }, children: [ - /* @__PURE__ */ jsx3( + /* @__PURE__ */ jsx4( "button", { className: ReactScriptPlayer_module_default.timeButton, @@ -265,7 +351,7 @@ function BlockView({ children: convertTime(script.startTimeInSecond) } ), - /* @__PURE__ */ jsx3( + /* @__PURE__ */ jsx4( TextDisplay, { script: scripts[index], @@ -298,13 +384,12 @@ var findCurrentScriptIndex = (scripts, currentTime, adjustmentTime = 0.05, exten }; // src/components/ReactScriptPlayer.tsx -import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime"; +import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime"; function ReactScriptPlayer({ mode, scripts, selectedLanguages, seekTo, - // isAsync, // TODO(@godhyzzang) : isAsync를 props로 넘겨줘야합니다 currentTime, onClickScript, onSelectWord, @@ -314,12 +399,10 @@ function ReactScriptPlayer({ PrevButton, NextButton }) { - var _a, _b; - const [isAsync, setIsAsync] = useState2(); - const [clickedIndex, setClickedIndex] = useState2(0); - const currentScriptIndex = isAsync ? (_a = findClickedIndex(scripts, clickedIndex)) != null ? _a : 0 : (_b = findCurrentScriptIndex(scripts, currentTime)) != null ? _b : 0; + var _a; + const currentScriptIndex = (_a = findCurrentScriptIndex(scripts, currentTime)) != null ? _a : 0; + const [isSubtitleCentered, setIsSubtitleCentered] = useState2(true); const handleClickScript = (script, index) => { - setClickedIndex(index); onClickScript(script, index); }; const scriptPlayerProps = { @@ -332,12 +415,22 @@ function ReactScriptPlayer({ PrevButton, NextButton }; - return /* @__PURE__ */ jsx4("div", { className: ReactScriptPlayer_module_default.scriptsContainer, style: { ...containerStyle }, children: /* @__PURE__ */ jsxs3("div", { className: ReactScriptPlayer_module_default.displayContainer, children: [ - /* @__PURE__ */ jsx4("p", { className: ReactScriptPlayer_module_default.title, children: "Transcript" }), - mode === "line" ? /* @__PURE__ */ jsx4(LineView, { ...scriptPlayerProps, textStyle }) : /* @__PURE__ */ jsx4( + return /* @__PURE__ */ jsx5("div", { className: ReactScriptPlayer_module_default.scriptsContainer, style: { ...containerStyle }, children: /* @__PURE__ */ jsxs4("div", { className: ReactScriptPlayer_module_default.displayContainer, children: [ + /* @__PURE__ */ jsxs4("div", { className: ReactScriptPlayer_module_default.horizontalContainer, children: [ + /* @__PURE__ */ jsx5("p", { className: ReactScriptPlayer_module_default.title, children: "Transcript" }), + mode === "block" && SwitchButton && /* @__PURE__ */ jsx5( + SwitchButton, + { + isToggle: isSubtitleCentered, + toggle: setIsSubtitleCentered + } + ) + ] }), + mode === "line" ? /* @__PURE__ */ jsx5(LineView, { ...scriptPlayerProps, textStyle }) : /* @__PURE__ */ jsx5( BlockView, { ...scriptPlayerProps, + isSubtitleCentered, onClickScript: handleClickScript, timeStyle, textStyle diff --git a/core/dist/index.js.map b/core/dist/index.js.map index f5a7146..f4fa465 100644 --- a/core/dist/index.js.map +++ b/core/dist/index.js.map @@ -1,7 +1,7 @@ { "version": 3, - "sources": ["../src/components/ReactScriptPlayer.tsx", "esbuild-scss-modules-plugin:./ReactScriptPlayer.module.scss", "../src/utils/findClickedIndex.ts", "../src/hooks/useThrottling.ts", "../src/components/TextDisplay.tsx", "../src/utils/moveToScriptAtIndex.ts", "../src/components/LineView.tsx", "../src/components/BlockView.tsx", "../src/utils/convertTime.ts", "../src/utils/findCurrentScriptIndex.ts"], - "sourcesContent": ["import React, { useState } from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { findClickedIndex } from 'utils/findClickedIndex';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\n\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n // isAsync: boolean; // TODO(@godhyzzang) : isAsync\uB97C props\uB85C \uB118\uACA8\uC918\uC57C\uD569\uB2C8\uB2E4\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n // isAsync, // TODO(@godhyzzang) : isAsync\uB97C props\uB85C \uB118\uACA8\uC918\uC57C\uD569\uB2C8\uB2E4\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n}: ReactScriptPlayerProps) {\n // TODO(@godhyzzang) : isAsync\uB97C props\uB85C \uB118\uACA8\uC918\uC57C\uD569\uB2C8\uB2E4\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [isAsync, setIsAsync] = useState();\n const [clickedIndex, setClickedIndex] = useState(0);\n\n const currentScriptIndex = isAsync\n ? (findClickedIndex(scripts, clickedIndex) ?? 0) // \uD074\uB9AD\uD55C script index \uCC3E\uB294 \uD568\uC218\n : (findCurrentScriptIndex(scripts, currentTime) ?? 0); // \uB3D9\uC601\uC0C1 \uC7AC\uC0DD\uC5D0 \uB3D9\uAE30\uD654\uB418\uB294 script Index\uCC3E\uB294 \uD568\uC218\n\n // TODO(@godhyzzang) : lineview\uC5D0\uC11C\uB3C4 setClickedIndex \uC0AC\uC6A9\uD574\uC57C\uD568. \uD604\uC7AC \uC774 \uD568\uC218\uAC00 blockview\uC5D0\uC11C\uB9CC \uC0AC\uC6A9\uB418\uACE0 \uC788\uC5B4\uC11C lineview\uC5D0\uC11C\uB294 currentScriptIndex\uB97C set\uD558\uC9C0 \uBABB \uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4.\n const handleClickScript = (script: Script, index: number) => {\n setClickedIndex(index);\n onClickScript(script, index);\n };\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n return (\n
\n
\n

Transcript

\n {mode === 'line' ? (\n \n ) : (\n \n )}\n
\n
\n );\n}\n", "\nconst digest = '9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50';\nconst classes = {\"scriptsContainer\":\"_scriptsContainer_1tyea_7\",\"title\":\"_title_1tyea_18\",\"lineViewContainer\":\"_lineViewContainer_1tyea_23\",\"skipButtonContainer\":\"_skipButtonContainer_1tyea_28\",\"blockViewContainer\":\"_blockViewContainer_1tyea_35\",\"scriptItem\":\"_scriptItem_1tyea_42\",\"timeButton\":\"_timeButton_1tyea_47\",\"textView\":\"_textView_1tyea_60\",\"highlighted\":\"_highlighted_1tyea_65\"};\nconst css = `* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n._scriptsContainer_1tyea_7 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n width: 100%;\n height: auto;\n padding: 1.5rem;\n border: 2px solid #ececec;\n border-radius: 0.75rem;\n}\n\n._title_1tyea_18 {\n font-size: 1.25rem;\n font-weight: 700;\n}\n\n._lineViewContainer_1tyea_23 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 {\n align-self: end;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 button {\n cursor: pointer;\n}\n\n._blockViewContainer_1tyea_35 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n height: 16rem;\n overflow-y: auto;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 {\n padding: 16px;\n border-radius: 12px;\n transition: background-color 0.5s ease-in-out;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 ._timeButton_1tyea_47 {\n width: 5rem;\n padding-inline: 0.75rem;\n padding-block: 0.5rem;\n margin-bottom: 0.5rem;\n border: none;\n border-radius: 9999px;\n background-color: gray;\n cursor: pointer;\n font-size: 0.75rem;\n color: white;\n}\n\n._textView_1tyea_60 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n._textView_1tyea_60._highlighted_1tyea_65 {\n background-color: #fef08a;\n}`;\n\n(function() {\n if (typeof document !== \"undefined\" && !document.getElementById(digest)) {\n var ele = document.createElement('style');\n ele.id = digest;\n ele.textContent = css;\n document.head.appendChild(ele);\n }\n})();\n\nexport default classes;\nexport { css, digest, classes };\n ", "// findClickedIndex.ts\nimport { Script } from 'interfaces/Scripts';\n\nexport const findClickedIndex = (\n scripts: Script[] | undefined,\n clickedIndex: number,\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n return clickedIndex >= 0 && clickedIndex < scripts.length\n ? clickedIndex\n : null;\n};\n", "import { useState, useCallback } from 'react';\n\ninterface ThrottlingProps {\n buttonClicked: (arg: T) => void;\n delay?: number; // Optional delay prop\n}\n\nexport default function useThrottling({\n buttonClicked,\n delay = 300,\n}: ThrottlingProps) {\n const [isThrottled, setIsThrottled] = useState(false);\n\n const throttledCallback = useCallback(\n (arg: T) => {\n if (!isThrottled) {\n buttonClicked(arg);\n setIsThrottled(true);\n setTimeout(() => {\n setIsThrottled(false);\n }, delay);\n }\n },\n [isThrottled, buttonClicked, delay],\n );\n\n return throttledCallback;\n}\n", "import React from 'react';\nimport { Script, LanguageCode, TextStyle } from '../interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface TextDisplayProps {\n script: Script;\n selectedLanguages: T[];\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n}\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uC801\uC6A9\nexport function TextDisplay({\n script,\n selectedLanguages,\n onSelectWord,\n textStyle,\n}: TextDisplayProps) {\n return (\n \n {selectedLanguages.map((language) => (\n {\n const selection = window.getSelection();\n if (selection && selection.toString()) {\n const selectedWord = selection.toString().trim();\n if (selectedWord) {\n onSelectWord(selectedWord, script, 0);\n }\n }\n }}\n >\n {script[language] || `(${language} \uC790\uB9C9\uC774 \uC5C6\uC5B4\uC694!)`}\n

\n ))}\n \n );\n}\n", "import { Script } from '../interfaces/Scripts';\n\nexport const moveToScriptAtIndex = (\n index: number,\n scripts: Script[],\n seekTo: (timeInSeconds: number) => void,\n) => {\n // \uC720\uD6A8\uD55C \uC778\uB371\uC2A4\uC778\uC9C0 \uD655\uC778\n if (index < 0 || index >= scripts.length - 1) {\n console.warn('Invalid script index:', index);\n return;\n }\n\n // \uC2A4\uD06C\uB9BD\uD2B8 \uC2DC\uC791 \uC2DC\uAC04\uC73C\uB85C \uC774\uB3D9\n console.log('Seeking to:', scripts[index]);\n\n seekTo(scripts[index].startTimeInSecond);\n};\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n // \uC774\uC804 \uCF54\uB4DC\n // const totalScripts = scripts.length;\n\n // const handlePrevious = () => {\n // if (currentScriptIndex > 0) {\n // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond);\n // }\n // console.log(\n // '\uC804\uC73C\uB85C \uC774\uB3D9 ',\n // scripts[currentScriptIndex - 1].startTimeInSecond,\n // );\n // };\n\n // const handleNext = () => {\n // if (currentScriptIndex < totalScripts - 1) {\n // console.log(\n // '\uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9',\n // scripts[currentScriptIndex + 1].startTimeInSecond,\n // );\n // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond);\n // }\n // };\n\n const throttledHandlePrevious = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo),\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo),\n });\n\n // console.log(currentScriptIndex);\n\n return (\n
\n
\n {PrevButton ? (\n throttledHandlePrevious(currentScriptIndex)}\n />\n ) : (\n \n )}\n {NextButton ? (\n throttledHandleNext(currentScriptIndex)} />\n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n}\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n\n useEffect(() => {\n if (containerRef.current) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex]);\n\n return (\n
\n {scripts.map((script, index) => (\n {\n moveToScriptAtIndex(index, scripts, seekTo);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n \n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n"], - "mappings": ";AAAA,SAAgB,YAAAA,iBAAgB;;;ACChC,IAAM,SAAS;AACf,IAAM,UAAU,EAAC,oBAAmB,6BAA4B,SAAQ,mBAAkB,qBAAoB,+BAA8B,uBAAsB,iCAAgC,sBAAqB,gCAA+B,cAAa,wBAAuB,cAAa,wBAAuB,YAAW,sBAAqB,eAAc,wBAAuB;AACnY,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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AACA,SAAO,UAAU,KACb,QAAQ,SAAS,IAAI,QACrB;AACN;;;ATwCM,SACE,OAAAC,MADF,QAAAC,aAAA;AA3CC,SAAS,kBAAmD;AAAA,EACjE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA8B;AA5C9B;AA+CE,QAAM,CAAC,SAAS,UAAU,IAAIC,UAAkB;AAChD,QAAM,CAAC,cAAc,eAAe,IAAIA,UAAiB,CAAC;AAE1D,QAAM,qBAAqB,WACtB,sBAAiB,SAAS,YAAY,MAAtC,YAA2C,KAC3C,4BAAuB,SAAS,WAAW,MAA3C,YAAgD;AAGrD,QAAM,oBAAoB,CAAC,QAAmB,UAAkB;AAC9D,oBAAgB,KAAK;AACrB,kBAAc,QAAQ,KAAK;AAAA,EAC7B;AAEA,QAAM,oBAAoB;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SACE,gBAAAF,KAAC,SAAI,WAAW,iCAAO,kBAAkB,OAAO,EAAE,GAAG,eAAe,GAClE,0BAAAC,MAAC,SAAI,WAAW,iCAAO,kBACrB;AAAA,oBAAAD,KAAC,OAAE,WAAW,iCAAO,OAAO,wBAAU;AAAA,IACrC,SAAS,SACR,gBAAAA,KAAC,YAAU,GAAG,mBAAmB,WAAsB,IAEvD,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,eAAe;AAAA,QACf;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ,GACF;AAEJ;", - "names": ["useState", "jsx", "currentScriptIndex", "jsx", "jsxs", "index", "jsx", "jsxs", "useState"] + "sources": ["../src/components/ReactScriptPlayer.tsx", "esbuild-scss-modules-plugin:./ReactScriptPlayer.module.scss", "../src/components/SwitchButton.tsx", "../src/hooks/useThrottling.ts", "../src/components/TextDisplay.tsx", "../src/utils/moveToScriptAtIndex.ts", "../src/components/LineView.tsx", "../src/components/BlockView.tsx", "../src/utils/convertTime.ts", "../src/utils/findCurrentScriptIndex.ts"], + "sourcesContent": ["import React, { useState } from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { SwitchButton } from './SwitchButton';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n}: ReactScriptPlayerProps) {\n const currentScriptIndex = findCurrentScriptIndex(scripts, currentTime) ?? 0; // \uB3D9\uC601\uC0C1 \uC7AC\uC0DD\uC5D0 \uB3D9\uAE30\uD654\uB418\uB294 script Index\uCC3E\uB294 \uD568\uC218\n const [isSubtitleCentered, setIsSubtitleCentered] = useState(true);\n\n const handleClickScript = (script: Script, index: number) => {\n onClickScript(script, index);\n };\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n return (\n
\n
\n
\n

Transcript

\n {mode === 'block' && SwitchButton && (\n \n )}\n
\n {mode === 'line' ? (\n \n ) : (\n \n )}\n
\n
\n );\n}\n", "\nconst digest = '25156907bebcaf0559a742aed223c85038fcb2fc79508f6e84460a864423278b';\nconst classes = {\"scriptsContainer\":\"_scriptsContainer_dilkp_7\",\"horizontalContainer\":\"_horizontalContainer_dilkp_18\",\"title\":\"_title_dilkp_24\",\"lineViewContainer\":\"_lineViewContainer_dilkp_29\",\"skipButtonContainer\":\"_skipButtonContainer_dilkp_34\",\"blockViewContainer\":\"_blockViewContainer_dilkp_41\",\"scriptItem\":\"_scriptItem_dilkp_48\",\"timeButton\":\"_timeButton_dilkp_53\",\"textView\":\"_textView_dilkp_66\",\"highlighted\":\"_highlighted_dilkp_71\",\"switchButton\":\"_switchButton_dilkp_75\",\"switch\":\"_switch_dilkp_75\",\"slider\":\"_slider_dilkp_97\"};\nconst css = `* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n._scriptsContainer_dilkp_7 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n width: 100%;\n height: auto;\n padding: 1.5rem;\n border: 2px solid #ececec;\n border-radius: 0.75rem;\n}\n\n._horizontalContainer_dilkp_18 {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n}\n\n._title_dilkp_24 {\n font-size: 1.25rem;\n font-weight: 700;\n}\n\n._lineViewContainer_dilkp_29 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n}\n._lineViewContainer_dilkp_29 ._skipButtonContainer_dilkp_34 {\n align-self: end;\n}\n._lineViewContainer_dilkp_29 ._skipButtonContainer_dilkp_34 button {\n cursor: pointer;\n}\n\n._blockViewContainer_dilkp_41 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n height: 16rem;\n overflow-y: auto;\n}\n._blockViewContainer_dilkp_41 ._scriptItem_dilkp_48 {\n padding: 16px;\n border-radius: 12px;\n transition: background-color 0.5s ease-in-out;\n}\n._blockViewContainer_dilkp_41 ._scriptItem_dilkp_48 ._timeButton_dilkp_53 {\n width: 5rem;\n padding-inline: 0.75rem;\n padding-block: 0.5rem;\n margin-bottom: 0.5rem;\n border: none;\n border-radius: 9999px;\n background-color: gray;\n cursor: pointer;\n font-size: 0.75rem;\n color: white;\n}\n\n._textView_dilkp_66 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n._textView_dilkp_66._highlighted_dilkp_71 {\n background-color: #fef08a;\n}\n\n._switchButton_dilkp_75 {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n border: none;\n background-color: white;\n cursor: pointer;\n padding: 0.5rem;\n border-radius: 0.5rem;\n}\n\n._switch_dilkp_75 {\n position: relative;\n display: inline-block;\n width: 40px;\n height: 20px;\n}\n._switch_dilkp_75 input {\n opacity: 0;\n width: 0;\n height: 0;\n}\n._switch_dilkp_75 ._slider_dilkp_97 {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #ccc;\n transition: 0.4s;\n border-radius: 20px;\n}\n._switch_dilkp_75 ._slider_dilkp_97:before {\n position: absolute;\n content: \"\";\n height: 14px;\n width: 14px;\n left: 3px;\n bottom: 3px;\n background-color: white;\n transition: 0.4s;\n border-radius: 50%;\n}\n._switch_dilkp_75 input:checked + ._slider_dilkp_97 {\n background-color: gray;\n}\n._switch_dilkp_75 input:checked + ._slider_dilkp_97:before {\n transform: translateX(20px);\n}`;\n\n(function() {\n if (typeof document !== \"undefined\" && !document.getElementById(digest)) {\n var ele = document.createElement('style');\n ele.id = digest;\n ele.textContent = css;\n document.head.appendChild(ele);\n }\n})();\n\nexport default classes;\nexport { css, digest, classes };\n ", "import React from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\n\nexport interface SwitchButtonProps {\n toggle: React.Dispatch>;\n isToggle: boolean;\n}\n\nexport function SwitchButton({\n toggle,\n isToggle,\n}: SwitchButtonProps): JSX.Element {\n return (\n {\n toggle((prev: boolean) => !prev);\n }}\n >\n \n \uC790\uB9C9 \uAC00\uC6B4\uB370 \uC815\uB82C\n \n );\n}\n", "import { useState, useCallback } from 'react';\n\ninterface ThrottlingProps {\n buttonClicked: (arg: T) => void;\n delay?: number; // Optional delay prop\n}\n\nexport default function useThrottling({\n buttonClicked,\n delay = 300,\n}: ThrottlingProps) {\n const [isThrottled, setIsThrottled] = useState(false);\n\n const throttledCallback = useCallback(\n (arg: T) => {\n if (!isThrottled) {\n buttonClicked(arg);\n setIsThrottled(true);\n setTimeout(() => {\n setIsThrottled(false);\n }, delay);\n }\n },\n [isThrottled, buttonClicked, delay],\n );\n\n return throttledCallback;\n}\n", "import React from 'react';\nimport { Script, LanguageCode, TextStyle } from '../interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface TextDisplayProps {\n script: Script;\n selectedLanguages: T[];\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n}\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uC801\uC6A9\nexport function TextDisplay({\n script,\n selectedLanguages,\n onSelectWord,\n textStyle,\n}: TextDisplayProps) {\n return (\n \n {selectedLanguages.map((language) => (\n {\n const selection = window.getSelection();\n if (selection && selection.toString()) {\n const selectedWord = selection.toString().trim();\n if (selectedWord) {\n onSelectWord(selectedWord, script, 0);\n }\n }\n }}\n >\n {script[language] || `(${language} \uC790\uB9C9\uC774 \uC5C6\uC5B4\uC694!)`}\n

\n ))}\n \n );\n}\n", "import { Script } from '../interfaces/Scripts';\n\nexport const moveToScriptAtIndex = (\n index: number,\n scripts: Script[],\n seekTo: (timeInSeconds: number) => void,\n) => {\n // \uC720\uD6A8\uD55C \uC778\uB371\uC2A4\uC778\uC9C0 \uD655\uC778\n if (index < 0 || index >= scripts.length - 1) {\n console.warn('Invalid script index:', index);\n return;\n }\n\n // \uC2A4\uD06C\uB9BD\uD2B8 \uC2DC\uC791 \uC2DC\uAC04\uC73C\uB85C \uC774\uB3D9\n console.log('Seeking to:', scripts[index]);\n\n seekTo(scripts[index].startTimeInSecond);\n};\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n // \uC774\uC804 \uCF54\uB4DC\n // const totalScripts = scripts.length;\n\n // const handlePrevious = () => {\n // if (currentScriptIndex > 0) {\n // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond);\n // }\n // console.log(\n // '\uC804\uC73C\uB85C \uC774\uB3D9 ',\n // scripts[currentScriptIndex - 1].startTimeInSecond,\n // );\n // };\n\n // const handleNext = () => {\n // if (currentScriptIndex < totalScripts - 1) {\n // console.log(\n // '\uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9',\n // scripts[currentScriptIndex + 1].startTimeInSecond,\n // );\n // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond);\n // }\n // };\n\n const throttledHandlePrevious = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo),\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo),\n });\n\n // console.log(currentScriptIndex);\n\n return (\n
\n
\n {PrevButton ? (\n throttledHandlePrevious(currentScriptIndex)}\n />\n ) : (\n \n )}\n {NextButton ? (\n throttledHandleNext(currentScriptIndex)} />\n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n isSubtitleCentered?: boolean;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n}\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n isSubtitleCentered,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n useEffect(() => {\n if (\n containerRef.current &&\n isSubtitleCentered !== undefined &&\n isSubtitleCentered\n ) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex, isSubtitleCentered]);\n\n return (\n
\n {scripts.map((script, index) => (\n {\n moveToScriptAtIndex(index, scripts, seekTo);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n \n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n"], + "mappings": ";AAAA,SAAgB,YAAAA,iBAAgB;;;ACChC,IAAM,SAAS;AACf,IAAM,UAAU,EAAC,oBAAmB,6BAA4B,uBAAsB,iCAAgC,SAAQ,mBAAkB,qBAAoB,+BAA8B,uBAAsB,iCAAgC,sBAAqB,gCAA+B,cAAa,wBAAuB,cAAa,wBAAuB,YAAW,sBAAqB,eAAc,yBAAwB,gBAAe,0BAAyB,UAAS,oBAAmB,UAAS,mBAAkB;AACzhB,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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SACE,gBAAAF,KAAC,SAAI,WAAW,iCAAO,kBAAkB,OAAO,EAAE,GAAG,eAAe,GAClE,0BAAAC,MAAC,SAAI,WAAW,iCAAO,kBACrB;AAAA,oBAAAA,MAAC,SAAI,WAAW,iCAAO,qBACrB;AAAA,sBAAAD,KAAC,OAAE,WAAW,iCAAO,OAAO,wBAAU;AAAA,MACrC,SAAS,WAAW,gBACnB,gBAAAA;AAAA,QAAC;AAAA;AAAA,UACC,UAAU;AAAA,UACV,QAAQ;AAAA;AAAA,MACV;AAAA,OAEJ;AAAA,IACC,SAAS,SACR,gBAAAA,KAAC,YAAU,GAAG,mBAAmB,WAAsB,IAEvD,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ,GACF;AAEJ;", + "names": ["useState", "jsx", "jsx", "jsxs", "currentScriptIndex", "jsx", "jsxs", "index", "jsx", "jsxs", "useState"] } diff --git a/core/dist/utils/findClickedIndex.d.ts b/core/dist/utils/findClickedIndex.d.ts deleted file mode 100644 index d7032d3..0000000 --- a/core/dist/utils/findClickedIndex.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Script } from 'interfaces/Scripts'; -export declare const findClickedIndex: (scripts: Script[] | undefined, clickedIndex: number) => number | null; -//# sourceMappingURL=findClickedIndex.d.ts.map \ No newline at end of file diff --git a/core/dist/utils/findClickedIndex.d.ts.map b/core/dist/utils/findClickedIndex.d.ts.map deleted file mode 100644 index 8504d61..0000000 --- a/core/dist/utils/findClickedIndex.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"findClickedIndex.d.ts","sourceRoot":"","sources":["../../src/utils/findClickedIndex.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,eAAO,MAAM,gBAAgB,YAClB,MAAM,EAAE,GAAG,SAAS,gBACf,MAAM,KACnB,MAAM,GAAG,IAKX,CAAC"} \ No newline at end of file diff --git a/core/src/components/BlockView.tsx b/core/src/components/BlockView.tsx index abd7bd2..9af1d93 100644 --- a/core/src/components/BlockView.tsx +++ b/core/src/components/BlockView.tsx @@ -4,13 +4,13 @@ import styles from './ReactScriptPlayer.module.scss'; import { convertTime } from 'utils/convertTime'; import { TextDisplay } from './TextDisplay'; import { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex'; - // BlockView에 제네릭 T 추가 interface BlockViewProps { scripts: Script[]; currentScriptIndex: number; selectedLanguages: T[]; seekTo: (timeInSeconds: number) => void; + isSubtitleCentered?: boolean; onClickScript: (script: Script, index: number) => void; onSelectWord: (word: string, script: Script, index: number) => void; timeStyle?: TimeStyle; @@ -23,15 +23,19 @@ export function BlockView({ currentScriptIndex, selectedLanguages, seekTo, + isSubtitleCentered, onClickScript, onSelectWord, timeStyle, textStyle, }: BlockViewProps) { const containerRef = useRef(null); - useEffect(() => { - if (containerRef.current) { + if ( + containerRef.current && + isSubtitleCentered !== undefined && + isSubtitleCentered + ) { if (currentScriptIndex < containerRef.current.children.length - 1) { const container = containerRef.current; const target = container.children[currentScriptIndex]; @@ -47,7 +51,7 @@ export function BlockView({ }); } } - }, [currentScriptIndex]); + }, [currentScriptIndex, isSubtitleCentered]); return (
diff --git a/core/src/components/ReactScriptPlayer.module.scss b/core/src/components/ReactScriptPlayer.module.scss index 7cdb3c2..b58d610 100644 --- a/core/src/components/ReactScriptPlayer.module.scss +++ b/core/src/components/ReactScriptPlayer.module.scss @@ -15,6 +15,12 @@ border-radius: 0.75rem; } +.horizontalContainer { + display: flex; + flex-direction: row; + justify-content: space-between; +} + .title { font-size: 1.25rem; font-weight: 700; @@ -38,7 +44,6 @@ display: flex; flex-direction: column; gap: 2rem; - // TODO(@smosco): 블록뷰에만 height 따로 줌 height: 16rem; overflow-y: auto; @@ -71,3 +76,59 @@ background-color: #fef08a; } } + +.switchButton { + display: flex; + align-items: center; + gap: 0.5rem; + border: none; + background-color: white; + cursor: pointer; + padding: 0.5rem; + border-radius: 0.5rem; +} + +.switch { + position: relative; + display: inline-block; + width: 40px; + height: 20px; + + input { + opacity: 0; + width: 0; + height: 0; + } + + .slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #ccc; + transition: 0.4s; + border-radius: 20px; + + &:before { + position: absolute; + content: ''; + height: 14px; + width: 14px; + left: 3px; + bottom: 3px; + background-color: white; + transition: 0.4s; + border-radius: 50%; + } + } + + input:checked + .slider { + background-color: gray; + } + + input:checked + .slider:before { + transform: translateX(20px); + } +} diff --git a/core/src/components/ReactScriptPlayer.tsx b/core/src/components/ReactScriptPlayer.tsx index aa1b621..bc38bc9 100644 --- a/core/src/components/ReactScriptPlayer.tsx +++ b/core/src/components/ReactScriptPlayer.tsx @@ -1,5 +1,6 @@ import React, { useState } from 'react'; import styles from './ReactScriptPlayer.module.scss'; +import { SwitchButton } from './SwitchButton'; import { LanguageCode, Script, @@ -7,17 +8,14 @@ import { TextStyle, TimeStyle, } from '../interfaces/Scripts'; -import { findClickedIndex } from 'utils/findClickedIndex'; import { LineView } from './LineView'; import { BlockView } from './BlockView'; import { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex'; - export interface ReactScriptPlayerProps { mode: 'line' | 'block'; scripts: Script[]; selectedLanguages: T[]; seekTo: (timeInSeconds: number) => void; - // isAsync: boolean; // TODO(@godhyzzang) : isAsync를 props로 넘겨줘야합니다 currentTime: number; onClickScript: (script: Script, index: number) => void; onSelectWord: (word: string, script: Script, index: number) => void; @@ -33,7 +31,6 @@ export function ReactScriptPlayer({ scripts, selectedLanguages, seekTo, - // isAsync, // TODO(@godhyzzang) : isAsync를 props로 넘겨줘야합니다 currentTime, onClickScript, onSelectWord, @@ -43,18 +40,10 @@ export function ReactScriptPlayer({ PrevButton, NextButton, }: ReactScriptPlayerProps) { - // TODO(@godhyzzang) : isAsync를 props로 넘겨줘야합니다 - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const [isAsync, setIsAsync] = useState(); - const [clickedIndex, setClickedIndex] = useState(0); - - const currentScriptIndex = isAsync - ? (findClickedIndex(scripts, clickedIndex) ?? 0) // 클릭한 script index 찾는 함수 - : (findCurrentScriptIndex(scripts, currentTime) ?? 0); // 동영상 재생에 동기화되는 script Index찾는 함수 + const currentScriptIndex = findCurrentScriptIndex(scripts, currentTime) ?? 0; // 동영상 재생에 동기화되는 script Index찾는 함수 + const [isSubtitleCentered, setIsSubtitleCentered] = useState(true); - // TODO(@godhyzzang) : lineview에서도 setClickedIndex 사용해야함. 현재 이 함수가 blockview에서만 사용되고 있어서 lineview에서는 currentScriptIndex를 set하지 못 하고 있습니다. const handleClickScript = (script: Script, index: number) => { - setClickedIndex(index); onClickScript(script, index); }; @@ -72,12 +61,21 @@ export function ReactScriptPlayer({ return (
-

Transcript

+
+

Transcript

+ {mode === 'block' && SwitchButton && ( + + )} +
{mode === 'line' ? ( ) : ( >; + isToggle: boolean; +} + +export function SwitchButton({ + toggle, + isToggle, +}: SwitchButtonProps): JSX.Element { + return ( + + ); +} diff --git a/core/src/utils/findClickedIndex.ts b/core/src/utils/findClickedIndex.ts deleted file mode 100644 index 7c7c29f..0000000 --- a/core/src/utils/findClickedIndex.ts +++ /dev/null @@ -1,12 +0,0 @@ -// findClickedIndex.ts -import { Script } from 'interfaces/Scripts'; - -export const findClickedIndex = ( - scripts: Script[] | undefined, - clickedIndex: number, -): number | null => { - if (!scripts || scripts.length === 0) return null; - return clickedIndex >= 0 && clickedIndex < scripts.length - ? clickedIndex - : null; -}; From 0f20707429add1c99535a55dd8107a5ba121a0c1 Mon Sep 17 00:00:00 2001 From: godhyzzang <109357302+godhyzzang@users.noreply.github.com> Date: Mon, 11 Nov 2024 16:23:46 +0900 Subject: [PATCH 11/18] =?UTF-8?q?feat=20:=20focus=EB=B2=84=ED=8A=BC?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD,=20blockView=EB=A1=9C?= =?UTF-8?q?=20=EC=9D=B4=EB=8F=99,=20PrevButton,=20NextButton=EC=B2=98?= =?UTF-8?q?=EB=9F=BC=20=EA=B8=B0=EB=8A=A5,ui=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/components/BlockView.tsx | 115 ++++++++++++------ .../components/ReactScriptPlayer.module.scss | 62 ---------- core/src/components/ReactScriptPlayer.tsx | 25 ++-- demo/src/App.tsx | 39 ++++++ demo/src/components/VideoPlayer.module.scss | 16 +++ 5 files changed, 143 insertions(+), 114 deletions(-) diff --git a/core/src/components/BlockView.tsx b/core/src/components/BlockView.tsx index 9af1d93..a7c7399 100644 --- a/core/src/components/BlockView.tsx +++ b/core/src/components/BlockView.tsx @@ -1,35 +1,61 @@ -import React, { useRef, useEffect } from 'react'; +import React, { useRef, useEffect, useState } from 'react'; import { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts'; import styles from './ReactScriptPlayer.module.scss'; import { convertTime } from 'utils/convertTime'; import { TextDisplay } from './TextDisplay'; import { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex'; -// BlockView에 제네릭 T 추가 + interface BlockViewProps { scripts: Script[]; currentScriptIndex: number; selectedLanguages: T[]; seekTo: (timeInSeconds: number) => void; - isSubtitleCentered?: boolean; onClickScript: (script: Script, index: number) => void; onSelectWord: (word: string, script: Script, index: number) => void; timeStyle?: TimeStyle; textStyle?: TextStyle; + FocusButton?: ({ + state, + setState, + }: { + state: boolean; + setState: React.Dispatch>; + }) => JSX.Element; } -// BlockView에 제네릭 T를 적용 export function BlockView({ scripts, currentScriptIndex, selectedLanguages, seekTo, - isSubtitleCentered, onClickScript, onSelectWord, timeStyle, textStyle, + FocusButton, }: BlockViewProps) { const containerRef = useRef(null); + const [isSubtitleCentered, setIsSubtitleCentered] = useState(true); + + useEffect(() => { + const handleInteraction = () => { + setIsSubtitleCentered(false); + }; + + const container = containerRef.current; + if (container) { + container.addEventListener('wheel', handleInteraction); + container.addEventListener('touchmove', handleInteraction); + } + + return () => { + if (container) { + container.removeEventListener('wheel', handleInteraction); + container.removeEventListener('touchmove', handleInteraction); + } + }; + }, [setIsSubtitleCentered]); + useEffect(() => { if ( containerRef.current && @@ -39,7 +65,6 @@ export function BlockView({ if (currentScriptIndex < containerRef.current.children.length - 1) { const container = containerRef.current; const target = container.children[currentScriptIndex]; - // 컨테이너의 상단에서부터 타겟까지의 거리 계산 const targetTop = target.getBoundingClientRect().top; const containerTop = container.getBoundingClientRect().top; @@ -53,44 +78,56 @@ export function BlockView({ } }, [currentScriptIndex, isSubtitleCentered]); + useEffect(() => { + console.log('isSubtitleCentered:', isSubtitleCentered); + }, [isSubtitleCentered]); + return ( -
- {scripts.map((script, index) => ( -
{ - moveToScriptAtIndex(index, scripts, seekTo); - onClickScript(script, index); - }} - style={{ - backgroundColor: - index === currentScriptIndex - ? textStyle?.activeColor || 'lightgray' - : 'transparent', - }} - > - + - -
- ))} + +
+ ))} +
); } diff --git a/core/src/components/ReactScriptPlayer.module.scss b/core/src/components/ReactScriptPlayer.module.scss index b58d610..5ad7bcc 100644 --- a/core/src/components/ReactScriptPlayer.module.scss +++ b/core/src/components/ReactScriptPlayer.module.scss @@ -15,12 +15,6 @@ border-radius: 0.75rem; } -.horizontalContainer { - display: flex; - flex-direction: row; - justify-content: space-between; -} - .title { font-size: 1.25rem; font-weight: 700; @@ -76,59 +70,3 @@ background-color: #fef08a; } } - -.switchButton { - display: flex; - align-items: center; - gap: 0.5rem; - border: none; - background-color: white; - cursor: pointer; - padding: 0.5rem; - border-radius: 0.5rem; -} - -.switch { - position: relative; - display: inline-block; - width: 40px; - height: 20px; - - input { - opacity: 0; - width: 0; - height: 0; - } - - .slider { - position: absolute; - cursor: pointer; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: #ccc; - transition: 0.4s; - border-radius: 20px; - - &:before { - position: absolute; - content: ''; - height: 14px; - width: 14px; - left: 3px; - bottom: 3px; - background-color: white; - transition: 0.4s; - border-radius: 50%; - } - } - - input:checked + .slider { - background-color: gray; - } - - input:checked + .slider:before { - transform: translateX(20px); - } -} diff --git a/core/src/components/ReactScriptPlayer.tsx b/core/src/components/ReactScriptPlayer.tsx index bc38bc9..9f3f480 100644 --- a/core/src/components/ReactScriptPlayer.tsx +++ b/core/src/components/ReactScriptPlayer.tsx @@ -1,6 +1,5 @@ -import React, { useState } from 'react'; +import React from 'react'; import styles from './ReactScriptPlayer.module.scss'; -import { SwitchButton } from './SwitchButton'; import { LanguageCode, Script, @@ -8,6 +7,7 @@ import { TextStyle, TimeStyle, } from '../interfaces/Scripts'; +import { Dispatch, SetStateAction } from 'react'; import { LineView } from './LineView'; import { BlockView } from './BlockView'; import { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex'; @@ -24,6 +24,13 @@ export interface ReactScriptPlayerProps { timeStyle?: TimeStyle; PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element; NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element; + FocusButton?: ({ + state, + setState, + }: { + state: boolean; + setState: Dispatch>; + }) => JSX.Element; } export function ReactScriptPlayer({ @@ -39,9 +46,9 @@ export function ReactScriptPlayer({ timeStyle, PrevButton, NextButton, + FocusButton, }: ReactScriptPlayerProps) { const currentScriptIndex = findCurrentScriptIndex(scripts, currentTime) ?? 0; // 동영상 재생에 동기화되는 script Index찾는 함수 - const [isSubtitleCentered, setIsSubtitleCentered] = useState(true); const handleClickScript = (script: Script, index: number) => { onClickScript(script, index); @@ -61,21 +68,13 @@ export function ReactScriptPlayer({ return (
-
-

Transcript

- {mode === 'block' && SwitchButton && ( - - )} -
+

Transcript

{mode === 'line' ? ( ) : ( ); + const FocusButton = ({ + state, + setState, + }: { + state: boolean; + setState: React.Dispatch>; + }) => ( +
+ +
+ ); return (
@@ -113,6 +151,7 @@ function App() { }} PrevButton={PrevButton} NextButton={NextButton} + FocusButton={FocusButton} />
); diff --git a/demo/src/components/VideoPlayer.module.scss b/demo/src/components/VideoPlayer.module.scss index 09732af..b923edf 100644 --- a/demo/src/components/VideoPlayer.module.scss +++ b/demo/src/components/VideoPlayer.module.scss @@ -142,3 +142,19 @@ background-color: #f3f4f6; } } + +.focusButtonContainer { + display: flex; + justify-content: flex-end; +} + +.focusButton { + width: 2rem; + height: 2rem; + display: flex; + align-items: center; + justify-content: center; + border: none; + background: none; + cursor: pointer; +} From 15813f5b5230eebc4483e62066555da2f26b507f Mon Sep 17 00:00:00 2001 From: godhyzzang <109357302+godhyzzang@users.noreply.github.com> Date: Mon, 11 Nov 2024 16:24:02 +0900 Subject: [PATCH 12/18] =?UTF-8?q?remove=20:=20=ED=95=84=EC=9A=94=EC=97=86?= =?UTF-8?q?=EB=8A=94=20switch=EB=B2=84=ED=8A=BC=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/components/SwitchButton.tsx | 34 ---------------------------- 1 file changed, 34 deletions(-) delete mode 100644 core/src/components/SwitchButton.tsx diff --git a/core/src/components/SwitchButton.tsx b/core/src/components/SwitchButton.tsx deleted file mode 100644 index d9ff2e1..0000000 --- a/core/src/components/SwitchButton.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import React from 'react'; -import styles from './ReactScriptPlayer.module.scss'; - -export interface SwitchButtonProps { - toggle: React.Dispatch>; - isToggle: boolean; -} - -export function SwitchButton({ - toggle, - isToggle, -}: SwitchButtonProps): JSX.Element { - return ( - - ); -} From 27019d155da13a0d8269f171b2193ef705b30c4b Mon Sep 17 00:00:00 2001 From: godhyzzang <109357302+godhyzzang@users.noreply.github.com> Date: Mon, 11 Nov 2024 16:34:43 +0900 Subject: [PATCH 13/18] =?UTF-8?q?chore=20:=20dev=EC=8B=A4=ED=96=89=20?= =?UTF-8?q?=ED=9B=84=20dist=ED=8C=8C=EC=9D=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/dist/components/BlockView.d.ts | 8 +- core/dist/components/BlockView.d.ts.map | 2 +- core/dist/components/ReactScriptPlayer.d.ts | 7 +- .../components/ReactScriptPlayer.d.ts.map | 2 +- core/dist/index.js | 274 +++++++----------- core/dist/index.js.map | 8 +- 6 files changed, 118 insertions(+), 183 deletions(-) diff --git a/core/dist/components/BlockView.d.ts b/core/dist/components/BlockView.d.ts index 106a1e9..387b853 100644 --- a/core/dist/components/BlockView.d.ts +++ b/core/dist/components/BlockView.d.ts @@ -1,15 +1,19 @@ +import React from 'react'; import { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts'; interface BlockViewProps { scripts: Script[]; currentScriptIndex: number; selectedLanguages: T[]; seekTo: (timeInSeconds: number) => void; - isSubtitleCentered?: boolean; onClickScript: (script: Script, index: number) => void; onSelectWord: (word: string, script: Script, index: number) => void; timeStyle?: TimeStyle; textStyle?: TextStyle; + FocusButton?: ({ state, setState, }: { + state: boolean; + setState: React.Dispatch>; + }) => JSX.Element; } -export declare function BlockView({ scripts, currentScriptIndex, selectedLanguages, seekTo, isSubtitleCentered, onClickScript, onSelectWord, timeStyle, textStyle, }: BlockViewProps): import("react/jsx-runtime").JSX.Element; +export declare function BlockView({ scripts, currentScriptIndex, selectedLanguages, seekTo, onClickScript, onSelectWord, timeStyle, textStyle, FocusButton, }: BlockViewProps): import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=BlockView.d.ts.map \ No newline at end of file diff --git a/core/dist/components/BlockView.d.ts.map b/core/dist/components/BlockView.d.ts.map index 8c31588..56c6954 100644 --- a/core/dist/components/BlockView.d.ts.map +++ b/core/dist/components/BlockView.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"BlockView.d.ts","sourceRoot":"","sources":["../../src/components/BlockView.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAMhF,UAAU,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACtD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAGD,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACzD,OAAO,EACP,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,SAAS,EACT,SAAS,GACV,EAAE,cAAc,CAAC,CAAC,CAAC,2CAiEnB"} \ No newline at end of file +{"version":3,"file":"BlockView.d.ts","sourceRoot":"","sources":["../../src/components/BlockView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAMhF,UAAU,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACtD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,CAAC,EACb,KAAK,EACL,QAAQ,GACT,EAAE;QACD,KAAK,EAAE,OAAO,CAAC;QACf,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;KACzD,KAAK,GAAG,CAAC,OAAO,CAAC;CACnB;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACzD,OAAO,EACP,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,aAAa,EACb,YAAY,EACZ,SAAS,EACT,SAAS,EACT,WAAW,GACZ,EAAE,cAAc,CAAC,CAAC,CAAC,2CAiGnB"} \ No newline at end of file diff --git a/core/dist/components/ReactScriptPlayer.d.ts b/core/dist/components/ReactScriptPlayer.d.ts index ce93312..59b3f87 100644 --- a/core/dist/components/ReactScriptPlayer.d.ts +++ b/core/dist/components/ReactScriptPlayer.d.ts @@ -1,4 +1,5 @@ import { LanguageCode, Script, ContainerStyle, TextStyle, TimeStyle } from '../interfaces/Scripts'; +import { Dispatch, SetStateAction } from 'react'; export interface ReactScriptPlayerProps { mode: 'line' | 'block'; scripts: Script[]; @@ -16,6 +17,10 @@ export interface ReactScriptPlayerProps { NextButton?: ({ onClick }: { onClick: () => void; }) => JSX.Element; + FocusButton?: ({ state, setState, }: { + state: boolean; + setState: Dispatch>; + }) => JSX.Element; } -export declare function ReactScriptPlayer({ mode, scripts, selectedLanguages, seekTo, currentTime, onClickScript, onSelectWord, containerStyle, textStyle, timeStyle, PrevButton, NextButton, }: ReactScriptPlayerProps): import("react/jsx-runtime").JSX.Element; +export declare function ReactScriptPlayer({ mode, scripts, selectedLanguages, seekTo, currentTime, onClickScript, onSelectWord, containerStyle, textStyle, timeStyle, PrevButton, NextButton, FocusButton, }: ReactScriptPlayerProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=ReactScriptPlayer.d.ts.map \ No newline at end of file diff --git a/core/dist/components/ReactScriptPlayer.d.ts.map b/core/dist/components/ReactScriptPlayer.d.ts.map index 61a992f..59343f5 100644 --- a/core/dist/components/ReactScriptPlayer.d.ts.map +++ b/core/dist/components/ReactScriptPlayer.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ReactScriptPlayer.d.ts","sourceRoot":"","sources":["../../src/components/ReactScriptPlayer.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,YAAY,EACZ,MAAM,EACN,cAAc,EACd,SAAS,EACT,SAAS,EACV,MAAM,uBAAuB,CAAC;AAI/B,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACrE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IACnE,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;CACpE;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACjE,IAAI,EACJ,OAAO,EACP,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,aAAa,EACb,YAAY,EACZ,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,GACX,EAAE,sBAAsB,CAAC,CAAC,CAAC,2CA6C3B"} \ No newline at end of file +{"version":3,"file":"ReactScriptPlayer.d.ts","sourceRoot":"","sources":["../../src/components/ReactScriptPlayer.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,MAAM,EACN,cAAc,EACd,SAAS,EACT,SAAS,EACV,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAIjD,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACrE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IACnE,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IACnE,WAAW,CAAC,EAAE,CAAC,EACb,KAAK,EACL,QAAQ,GACT,EAAE;QACD,KAAK,EAAE,OAAO,CAAC;QACf,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;KAC7C,KAAK,GAAG,CAAC,OAAO,CAAC;CACnB;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACjE,IAAI,EACJ,OAAO,EACP,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,aAAa,EACb,YAAY,EACZ,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,EACV,WAAW,GACZ,EAAE,sBAAsB,CAAC,CAAC,CAAC,2CAoC3B"} \ No newline at end of file diff --git a/core/dist/index.js b/core/dist/index.js index 1f638db..964135d 100644 --- a/core/dist/index.js +++ b/core/dist/index.js @@ -1,16 +1,13 @@ -// src/components/ReactScriptPlayer.tsx -import { useState as useState2 } from "react"; - // esbuild-scss-modules-plugin:./ReactScriptPlayer.module.scss -var digest = "25156907bebcaf0559a742aed223c85038fcb2fc79508f6e84460a864423278b"; -var classes = { "scriptsContainer": "_scriptsContainer_dilkp_7", "horizontalContainer": "_horizontalContainer_dilkp_18", "title": "_title_dilkp_24", "lineViewContainer": "_lineViewContainer_dilkp_29", "skipButtonContainer": "_skipButtonContainer_dilkp_34", "blockViewContainer": "_blockViewContainer_dilkp_41", "scriptItem": "_scriptItem_dilkp_48", "timeButton": "_timeButton_dilkp_53", "textView": "_textView_dilkp_66", "highlighted": "_highlighted_dilkp_71", "switchButton": "_switchButton_dilkp_75", "switch": "_switch_dilkp_75", "slider": "_slider_dilkp_97" }; +var digest = "9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50"; +var classes = { "scriptsContainer": "_scriptsContainer_1tyea_7", "title": "_title_1tyea_18", "lineViewContainer": "_lineViewContainer_1tyea_23", "skipButtonContainer": "_skipButtonContainer_1tyea_28", "blockViewContainer": "_blockViewContainer_1tyea_35", "scriptItem": "_scriptItem_1tyea_42", "timeButton": "_timeButton_1tyea_47", "textView": "_textView_1tyea_60", "highlighted": "_highlighted_1tyea_65" }; var css = `* { box-sizing: border-box; margin: 0; padding: 0; } -._scriptsContainer_dilkp_7 { +._scriptsContainer_1tyea_7 { display: flex; flex-direction: column; gap: 2rem; @@ -21,42 +18,36 @@ var css = `* { border-radius: 0.75rem; } -._horizontalContainer_dilkp_18 { - display: flex; - flex-direction: row; - justify-content: space-between; -} - -._title_dilkp_24 { +._title_1tyea_18 { font-size: 1.25rem; font-weight: 700; } -._lineViewContainer_dilkp_29 { +._lineViewContainer_1tyea_23 { display: flex; flex-direction: column; gap: 2rem; } -._lineViewContainer_dilkp_29 ._skipButtonContainer_dilkp_34 { +._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 { align-self: end; } -._lineViewContainer_dilkp_29 ._skipButtonContainer_dilkp_34 button { +._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 button { cursor: pointer; } -._blockViewContainer_dilkp_41 { +._blockViewContainer_1tyea_35 { display: flex; flex-direction: column; gap: 2rem; height: 16rem; overflow-y: auto; } -._blockViewContainer_dilkp_41 ._scriptItem_dilkp_48 { +._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 { padding: 16px; border-radius: 12px; transition: background-color 0.5s ease-in-out; } -._blockViewContainer_dilkp_41 ._scriptItem_dilkp_48 ._timeButton_dilkp_53 { +._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 ._timeButton_1tyea_47 { width: 5rem; padding-inline: 0.75rem; padding-block: 0.5rem; @@ -69,64 +60,13 @@ var css = `* { color: white; } -._textView_dilkp_66 { +._textView_1tyea_60 { display: flex; flex-direction: column; gap: 1rem; } -._textView_dilkp_66._highlighted_dilkp_71 { +._textView_1tyea_60._highlighted_1tyea_65 { background-color: #fef08a; -} - -._switchButton_dilkp_75 { - display: flex; - align-items: center; - gap: 0.5rem; - border: none; - background-color: white; - cursor: pointer; - padding: 0.5rem; - border-radius: 0.5rem; -} - -._switch_dilkp_75 { - position: relative; - display: inline-block; - width: 40px; - height: 20px; -} -._switch_dilkp_75 input { - opacity: 0; - width: 0; - height: 0; -} -._switch_dilkp_75 ._slider_dilkp_97 { - position: absolute; - cursor: pointer; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: #ccc; - transition: 0.4s; - border-radius: 20px; -} -._switch_dilkp_75 ._slider_dilkp_97:before { - position: absolute; - content: ""; - height: 14px; - width: 14px; - left: 3px; - bottom: 3px; - background-color: white; - transition: 0.4s; - border-radius: 50%; -} -._switch_dilkp_75 input:checked + ._slider_dilkp_97 { - background-color: gray; -} -._switch_dilkp_75 input:checked + ._slider_dilkp_97:before { - transform: translateX(20px); }`; (function() { if (typeof document !== "undefined" && !document.getElementById(digest)) { @@ -138,40 +78,6 @@ var css = `* { })(); var ReactScriptPlayer_module_default = classes; -// src/components/SwitchButton.tsx -import { jsx, jsxs } from "react/jsx-runtime"; -function SwitchButton({ - toggle, - isToggle -}) { - return /* @__PURE__ */ jsxs( - "button", - { - className: ReactScriptPlayer_module_default.switchButton, - type: "button", - onClick: () => { - toggle((prev) => !prev); - }, - children: [ - /* @__PURE__ */ jsxs("label", { className: ReactScriptPlayer_module_default.switch, children: [ - /* @__PURE__ */ jsx( - "input", - { - type: "checkbox", - checked: isToggle, - onChange: () => { - toggle((prev) => !prev); - } - } - ), - /* @__PURE__ */ jsx("span", { className: ReactScriptPlayer_module_default.slider }) - ] }), - /* @__PURE__ */ jsx("span", { children: "\uC790\uB9C9 \uAC00\uC6B4\uB370 \uC815\uB82C" }) - ] - } - ); -} - // src/hooks/useThrottling.ts import { useState, useCallback } from "react"; function useThrottling({ @@ -201,18 +107,18 @@ var arrow_back_default = 'data:image/svg+xml, /* @__PURE__ */ jsx2( + children: selectedLanguages.map((language) => /* @__PURE__ */ jsx( "p", { className: ReactScriptPlayer_module_default.text, @@ -245,7 +151,7 @@ var moveToScriptAtIndex = (index, scripts, seekTo) => { }; // src/components/LineView.tsx -import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime"; +import { jsx as jsx2, jsxs } from "react/jsx-runtime"; function LineView({ scripts, selectedLanguages, @@ -262,17 +168,17 @@ function LineView({ const throttledHandleNext = useThrottling({ buttonClicked: (currentScriptIndex2) => moveToScriptAtIndex(currentScriptIndex2 + 1, scripts, seekTo) }); - return /* @__PURE__ */ jsxs2("div", { className: ReactScriptPlayer_module_default.lineViewContainer, children: [ - /* @__PURE__ */ jsxs2("div", { className: ReactScriptPlayer_module_default.skipButtonContainer, children: [ - PrevButton ? /* @__PURE__ */ jsx3( + return /* @__PURE__ */ jsxs("div", { className: ReactScriptPlayer_module_default.lineViewContainer, children: [ + /* @__PURE__ */ jsxs("div", { className: ReactScriptPlayer_module_default.skipButtonContainer, children: [ + PrevButton ? /* @__PURE__ */ jsx2( PrevButton, { onClick: () => throttledHandlePrevious(currentScriptIndex) } - ) : /* @__PURE__ */ jsx3("button", { onClick: () => throttledHandlePrevious(currentScriptIndex), children: /* @__PURE__ */ jsx3("img", { src: arrow_back_default, alt: "Back Arrow" }) }), - NextButton ? /* @__PURE__ */ jsx3(NextButton, { onClick: () => throttledHandleNext(currentScriptIndex) }) : /* @__PURE__ */ jsx3("button", { onClick: () => throttledHandleNext(currentScriptIndex), children: /* @__PURE__ */ jsx3("img", { src: arrow_forward_default, alt: "Forward Arrow" }) }) + ) : /* @__PURE__ */ jsx2("button", { onClick: () => throttledHandlePrevious(currentScriptIndex), children: /* @__PURE__ */ jsx2("img", { src: arrow_back_default, alt: "Back Arrow" }) }), + NextButton ? /* @__PURE__ */ jsx2(NextButton, { onClick: () => throttledHandleNext(currentScriptIndex) }) : /* @__PURE__ */ jsx2("button", { onClick: () => throttledHandleNext(currentScriptIndex), children: /* @__PURE__ */ jsx2("img", { src: arrow_forward_default, alt: "Forward Arrow" }) }) ] }), - scripts[currentScriptIndex] && /* @__PURE__ */ jsx3( + scripts[currentScriptIndex] && /* @__PURE__ */ jsx2( TextDisplay, { script: scripts[currentScriptIndex], @@ -285,7 +191,7 @@ function LineView({ } // src/components/BlockView.tsx -import { useRef, useEffect } from "react"; +import { useRef, useEffect, useState as useState2 } from "react"; // src/utils/convertTime.ts function convertTime(seconds) { @@ -297,19 +203,36 @@ function convertTime(seconds) { } // src/components/BlockView.tsx -import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime"; +import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime"; function BlockView({ scripts, currentScriptIndex, selectedLanguages, seekTo, - isSubtitleCentered, onClickScript, onSelectWord, timeStyle, - textStyle + textStyle, + FocusButton }) { const containerRef = useRef(null); + const [isSubtitleCentered, setIsSubtitleCentered] = useState2(true); + useEffect(() => { + const handleInteraction = () => { + setIsSubtitleCentered(false); + }; + const container = containerRef.current; + if (container) { + container.addEventListener("wheel", handleInteraction); + container.addEventListener("touchmove", handleInteraction); + } + return () => { + if (container) { + container.removeEventListener("wheel", handleInteraction); + container.removeEventListener("touchmove", handleInteraction); + } + }; + }, [setIsSubtitleCentered]); useEffect(() => { if (containerRef.current && isSubtitleCentered !== void 0 && isSubtitleCentered) { if (currentScriptIndex < containerRef.current.children.length - 1) { @@ -325,45 +248,57 @@ function BlockView({ } } }, [currentScriptIndex, isSubtitleCentered]); - return /* @__PURE__ */ jsx4("div", { ref: containerRef, className: ReactScriptPlayer_module_default.blockViewContainer, children: scripts.map((script, index) => /* @__PURE__ */ jsxs3( - "div", - { - className: ReactScriptPlayer_module_default.scriptItem, - onClick: () => { - moveToScriptAtIndex(index, scripts, seekTo); - onClickScript(script, index); - }, - style: { - backgroundColor: index === currentScriptIndex ? (textStyle == null ? void 0 : textStyle.activeColor) || "lightgray" : "transparent" + useEffect(() => { + console.log("isSubtitleCentered:", isSubtitleCentered); + }, [isSubtitleCentered]); + return /* @__PURE__ */ jsxs2("div", { className: ReactScriptPlayer_module_default.blockViewContainer, children: [ + FocusButton && /* @__PURE__ */ jsx3( + FocusButton, + { + setState: setIsSubtitleCentered, + state: isSubtitleCentered + } + ), + /* @__PURE__ */ jsx3("div", { ref: containerRef, className: ReactScriptPlayer_module_default.blockViewContainer, children: scripts.map((script, index) => /* @__PURE__ */ jsxs2( + "div", + { + className: ReactScriptPlayer_module_default.scriptItem, + onClick: () => { + moveToScriptAtIndex(index, scripts, seekTo); + onClickScript(script, index); + }, + style: { + backgroundColor: index === currentScriptIndex ? (textStyle == null ? void 0 : textStyle.activeColor) || "lightgray" : "transparent" + }, + children: [ + /* @__PURE__ */ jsx3( + "button", + { + className: ReactScriptPlayer_module_default.timeButton, + style: { + color: timeStyle == null ? void 0 : timeStyle.color, + fontSize: timeStyle == null ? void 0 : timeStyle.fontSize, + backgroundColor: timeStyle == null ? void 0 : timeStyle.backgroundColor, + borderRadius: timeStyle == null ? void 0 : timeStyle.borderRadius, + padding: timeStyle == null ? void 0 : timeStyle.padding + }, + children: convertTime(script.startTimeInSecond) + } + ), + /* @__PURE__ */ jsx3( + TextDisplay, + { + script: scripts[index], + selectedLanguages, + onSelectWord, + textStyle + } + ) + ] }, - children: [ - /* @__PURE__ */ jsx4( - "button", - { - className: ReactScriptPlayer_module_default.timeButton, - style: { - color: timeStyle == null ? void 0 : timeStyle.color, - fontSize: timeStyle == null ? void 0 : timeStyle.fontSize, - backgroundColor: timeStyle == null ? void 0 : timeStyle.backgroundColor, - borderRadius: timeStyle == null ? void 0 : timeStyle.borderRadius, - padding: timeStyle == null ? void 0 : timeStyle.padding - }, - children: convertTime(script.startTimeInSecond) - } - ), - /* @__PURE__ */ jsx4( - TextDisplay, - { - script: scripts[index], - selectedLanguages, - onSelectWord, - textStyle - } - ) - ] - }, - index - )) }); + index + )) }) + ] }); } // src/utils/findCurrentScriptIndex.ts @@ -384,7 +319,7 @@ var findCurrentScriptIndex = (scripts, currentTime, adjustmentTime = 0.05, exten }; // src/components/ReactScriptPlayer.tsx -import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime"; +import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime"; function ReactScriptPlayer({ mode, scripts, @@ -397,11 +332,11 @@ function ReactScriptPlayer({ textStyle, timeStyle, PrevButton, - NextButton + NextButton, + FocusButton }) { var _a; const currentScriptIndex = (_a = findCurrentScriptIndex(scripts, currentTime)) != null ? _a : 0; - const [isSubtitleCentered, setIsSubtitleCentered] = useState2(true); const handleClickScript = (script, index) => { onClickScript(script, index); }; @@ -415,22 +350,13 @@ function ReactScriptPlayer({ PrevButton, NextButton }; - return /* @__PURE__ */ jsx5("div", { className: ReactScriptPlayer_module_default.scriptsContainer, style: { ...containerStyle }, children: /* @__PURE__ */ jsxs4("div", { className: ReactScriptPlayer_module_default.displayContainer, children: [ - /* @__PURE__ */ jsxs4("div", { className: ReactScriptPlayer_module_default.horizontalContainer, children: [ - /* @__PURE__ */ jsx5("p", { className: ReactScriptPlayer_module_default.title, children: "Transcript" }), - mode === "block" && SwitchButton && /* @__PURE__ */ jsx5( - SwitchButton, - { - isToggle: isSubtitleCentered, - toggle: setIsSubtitleCentered - } - ) - ] }), - mode === "line" ? /* @__PURE__ */ jsx5(LineView, { ...scriptPlayerProps, textStyle }) : /* @__PURE__ */ jsx5( + return /* @__PURE__ */ jsx4("div", { className: ReactScriptPlayer_module_default.scriptsContainer, style: { ...containerStyle }, children: /* @__PURE__ */ jsxs3("div", { className: ReactScriptPlayer_module_default.displayContainer, children: [ + /* @__PURE__ */ jsx4("p", { className: ReactScriptPlayer_module_default.title, children: "Transcript" }), + mode === "line" ? /* @__PURE__ */ jsx4(LineView, { ...scriptPlayerProps, textStyle }) : /* @__PURE__ */ jsx4( BlockView, { ...scriptPlayerProps, - isSubtitleCentered, + FocusButton, onClickScript: handleClickScript, timeStyle, textStyle diff --git a/core/dist/index.js.map b/core/dist/index.js.map index f4fa465..ab6b0de 100644 --- a/core/dist/index.js.map +++ b/core/dist/index.js.map @@ -1,7 +1,7 @@ { "version": 3, - "sources": ["../src/components/ReactScriptPlayer.tsx", "esbuild-scss-modules-plugin:./ReactScriptPlayer.module.scss", "../src/components/SwitchButton.tsx", "../src/hooks/useThrottling.ts", "../src/components/TextDisplay.tsx", "../src/utils/moveToScriptAtIndex.ts", "../src/components/LineView.tsx", "../src/components/BlockView.tsx", "../src/utils/convertTime.ts", "../src/utils/findCurrentScriptIndex.ts"], - "sourcesContent": ["import React, { useState } from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { SwitchButton } from './SwitchButton';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n}: ReactScriptPlayerProps) {\n const currentScriptIndex = findCurrentScriptIndex(scripts, currentTime) ?? 0; // \uB3D9\uC601\uC0C1 \uC7AC\uC0DD\uC5D0 \uB3D9\uAE30\uD654\uB418\uB294 script Index\uCC3E\uB294 \uD568\uC218\n const [isSubtitleCentered, setIsSubtitleCentered] = useState(true);\n\n const handleClickScript = (script: Script, index: number) => {\n onClickScript(script, index);\n };\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n return (\n
\n
\n
\n

Transcript

\n {mode === 'block' && SwitchButton && (\n \n )}\n
\n {mode === 'line' ? (\n \n ) : (\n \n )}\n
\n
\n );\n}\n", "\nconst digest = '25156907bebcaf0559a742aed223c85038fcb2fc79508f6e84460a864423278b';\nconst classes = {\"scriptsContainer\":\"_scriptsContainer_dilkp_7\",\"horizontalContainer\":\"_horizontalContainer_dilkp_18\",\"title\":\"_title_dilkp_24\",\"lineViewContainer\":\"_lineViewContainer_dilkp_29\",\"skipButtonContainer\":\"_skipButtonContainer_dilkp_34\",\"blockViewContainer\":\"_blockViewContainer_dilkp_41\",\"scriptItem\":\"_scriptItem_dilkp_48\",\"timeButton\":\"_timeButton_dilkp_53\",\"textView\":\"_textView_dilkp_66\",\"highlighted\":\"_highlighted_dilkp_71\",\"switchButton\":\"_switchButton_dilkp_75\",\"switch\":\"_switch_dilkp_75\",\"slider\":\"_slider_dilkp_97\"};\nconst css = `* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n._scriptsContainer_dilkp_7 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n width: 100%;\n height: auto;\n padding: 1.5rem;\n border: 2px solid #ececec;\n border-radius: 0.75rem;\n}\n\n._horizontalContainer_dilkp_18 {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n}\n\n._title_dilkp_24 {\n font-size: 1.25rem;\n font-weight: 700;\n}\n\n._lineViewContainer_dilkp_29 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n}\n._lineViewContainer_dilkp_29 ._skipButtonContainer_dilkp_34 {\n align-self: end;\n}\n._lineViewContainer_dilkp_29 ._skipButtonContainer_dilkp_34 button {\n cursor: pointer;\n}\n\n._blockViewContainer_dilkp_41 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n height: 16rem;\n overflow-y: auto;\n}\n._blockViewContainer_dilkp_41 ._scriptItem_dilkp_48 {\n padding: 16px;\n border-radius: 12px;\n transition: background-color 0.5s ease-in-out;\n}\n._blockViewContainer_dilkp_41 ._scriptItem_dilkp_48 ._timeButton_dilkp_53 {\n width: 5rem;\n padding-inline: 0.75rem;\n padding-block: 0.5rem;\n margin-bottom: 0.5rem;\n border: none;\n border-radius: 9999px;\n background-color: gray;\n cursor: pointer;\n font-size: 0.75rem;\n color: white;\n}\n\n._textView_dilkp_66 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n._textView_dilkp_66._highlighted_dilkp_71 {\n background-color: #fef08a;\n}\n\n._switchButton_dilkp_75 {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n border: none;\n background-color: white;\n cursor: pointer;\n padding: 0.5rem;\n border-radius: 0.5rem;\n}\n\n._switch_dilkp_75 {\n position: relative;\n display: inline-block;\n width: 40px;\n height: 20px;\n}\n._switch_dilkp_75 input {\n opacity: 0;\n width: 0;\n height: 0;\n}\n._switch_dilkp_75 ._slider_dilkp_97 {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #ccc;\n transition: 0.4s;\n border-radius: 20px;\n}\n._switch_dilkp_75 ._slider_dilkp_97:before {\n position: absolute;\n content: \"\";\n height: 14px;\n width: 14px;\n left: 3px;\n bottom: 3px;\n background-color: white;\n transition: 0.4s;\n border-radius: 50%;\n}\n._switch_dilkp_75 input:checked + ._slider_dilkp_97 {\n background-color: gray;\n}\n._switch_dilkp_75 input:checked + ._slider_dilkp_97:before {\n transform: translateX(20px);\n}`;\n\n(function() {\n if (typeof document !== \"undefined\" && !document.getElementById(digest)) {\n var ele = document.createElement('style');\n ele.id = digest;\n ele.textContent = css;\n document.head.appendChild(ele);\n }\n})();\n\nexport default classes;\nexport { css, digest, classes };\n ", "import React from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\n\nexport interface SwitchButtonProps {\n toggle: React.Dispatch>;\n isToggle: boolean;\n}\n\nexport function SwitchButton({\n toggle,\n isToggle,\n}: SwitchButtonProps): JSX.Element {\n return (\n {\n toggle((prev: boolean) => !prev);\n }}\n >\n \n \uC790\uB9C9 \uAC00\uC6B4\uB370 \uC815\uB82C\n \n );\n}\n", "import { useState, useCallback } from 'react';\n\ninterface ThrottlingProps {\n buttonClicked: (arg: T) => void;\n delay?: number; // Optional delay prop\n}\n\nexport default function useThrottling({\n buttonClicked,\n delay = 300,\n}: ThrottlingProps) {\n const [isThrottled, setIsThrottled] = useState(false);\n\n const throttledCallback = useCallback(\n (arg: T) => {\n if (!isThrottled) {\n buttonClicked(arg);\n setIsThrottled(true);\n setTimeout(() => {\n setIsThrottled(false);\n }, delay);\n }\n },\n [isThrottled, buttonClicked, delay],\n );\n\n return throttledCallback;\n}\n", "import React from 'react';\nimport { Script, LanguageCode, TextStyle } from '../interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface TextDisplayProps {\n script: Script;\n selectedLanguages: T[];\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n}\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uC801\uC6A9\nexport function TextDisplay({\n script,\n selectedLanguages,\n onSelectWord,\n textStyle,\n}: TextDisplayProps) {\n return (\n \n {selectedLanguages.map((language) => (\n {\n const selection = window.getSelection();\n if (selection && selection.toString()) {\n const selectedWord = selection.toString().trim();\n if (selectedWord) {\n onSelectWord(selectedWord, script, 0);\n }\n }\n }}\n >\n {script[language] || `(${language} \uC790\uB9C9\uC774 \uC5C6\uC5B4\uC694!)`}\n

\n ))}\n
\n );\n}\n", "import { Script } from '../interfaces/Scripts';\n\nexport const moveToScriptAtIndex = (\n index: number,\n scripts: Script[],\n seekTo: (timeInSeconds: number) => void,\n) => {\n // \uC720\uD6A8\uD55C \uC778\uB371\uC2A4\uC778\uC9C0 \uD655\uC778\n if (index < 0 || index >= scripts.length - 1) {\n console.warn('Invalid script index:', index);\n return;\n }\n\n // \uC2A4\uD06C\uB9BD\uD2B8 \uC2DC\uC791 \uC2DC\uAC04\uC73C\uB85C \uC774\uB3D9\n console.log('Seeking to:', scripts[index]);\n\n seekTo(scripts[index].startTimeInSecond);\n};\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n // \uC774\uC804 \uCF54\uB4DC\n // const totalScripts = scripts.length;\n\n // const handlePrevious = () => {\n // if (currentScriptIndex > 0) {\n // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond);\n // }\n // console.log(\n // '\uC804\uC73C\uB85C \uC774\uB3D9 ',\n // scripts[currentScriptIndex - 1].startTimeInSecond,\n // );\n // };\n\n // const handleNext = () => {\n // if (currentScriptIndex < totalScripts - 1) {\n // console.log(\n // '\uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9',\n // scripts[currentScriptIndex + 1].startTimeInSecond,\n // );\n // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond);\n // }\n // };\n\n const throttledHandlePrevious = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo),\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo),\n });\n\n // console.log(currentScriptIndex);\n\n return (\n
\n
\n {PrevButton ? (\n throttledHandlePrevious(currentScriptIndex)}\n />\n ) : (\n \n )}\n {NextButton ? (\n throttledHandleNext(currentScriptIndex)} />\n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n isSubtitleCentered?: boolean;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n}\n\n// BlockView\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n isSubtitleCentered,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n useEffect(() => {\n if (\n containerRef.current &&\n isSubtitleCentered !== undefined &&\n isSubtitleCentered\n ) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex, isSubtitleCentered]);\n\n return (\n
\n {scripts.map((script, index) => (\n {\n moveToScriptAtIndex(index, scripts, seekTo);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n
\n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n"], - "mappings": ";AAAA,SAAgB,YAAAA,iBAAgB;;;ACChC,IAAM,SAAS;AACf,IAAM,UAAU,EAAC,oBAAmB,6BAA4B,uBAAsB,iCAAgC,SAAQ,mBAAkB,qBAAoB,+BAA8B,uBAAsB,iCAAgC,sBAAqB,gCAA+B,cAAa,wBAAuB,cAAa,wBAAuB,YAAW,sBAAqB,eAAc,yBAAwB,gBAAe,0BAAyB,UAAS,oBAAmB,UAAS,mBAAkB;AACzhB,IAAM,MA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ACb,QAAQ,SAAS,IAAI,QACrB;AACN;;;AT8BQ,SACE,OAAAC,MADF,QAAAC,aAAA;AAnCD,SAAS,kBAAmD;AAAA,EACjE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA8B;AAzC9B;AA0CE,QAAM,sBAAqB,4BAAuB,SAAS,WAAW,MAA3C,YAAgD;AAC3E,QAAM,CAAC,oBAAoB,qBAAqB,IAAIC,UAAS,IAAI;AAEjE,QAAM,oBAAoB,CAAC,QAAmB,UAAkB;AAC9D,kBAAc,QAAQ,KAAK;AAAA,EAC7B;AAEA,QAAM,oBAAoB;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SACE,gBAAAF,KAAC,SAAI,WAAW,iCAAO,kBAAkB,OAAO,EAAE,GAAG,eAAe,GAClE,0BAAAC,MAAC,SAAI,WAAW,iCAAO,kBACrB;AAAA,oBAAAA,MAAC,SAAI,WAAW,iCAAO,qBACrB;AAAA,sBAAAD,KAAC,OAAE,WAAW,iCAAO,OAAO,wBAAU;AAAA,MACrC,SAAS,WAAW,gBACnB,gBAAAA;AAAA,QAAC;AAAA;AAAA,UACC,UAAU;AAAA,UACV,QAAQ;AAAA;AAAA,MACV;AAAA,OAEJ;AAAA,IACC,SAAS,SACR,gBAAAA,KAAC,YAAU,GAAG,mBAAmB,WAAsB,IAEvD,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ,GACF;AAEJ;", - "names": ["useState", "jsx", "jsx", "jsxs", "currentScriptIndex", "jsx", "jsxs", "index", "jsx", "jsxs", "useState"] + "sources": ["esbuild-scss-modules-plugin:./ReactScriptPlayer.module.scss", "../src/hooks/useThrottling.ts", "../src/components/TextDisplay.tsx", "../src/utils/moveToScriptAtIndex.ts", "../src/components/LineView.tsx", "../src/components/BlockView.tsx", "../src/utils/convertTime.ts", "../src/utils/findCurrentScriptIndex.ts", "../src/components/ReactScriptPlayer.tsx"], + "sourcesContent": ["\nconst digest = '9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50';\nconst classes = {\"scriptsContainer\":\"_scriptsContainer_1tyea_7\",\"title\":\"_title_1tyea_18\",\"lineViewContainer\":\"_lineViewContainer_1tyea_23\",\"skipButtonContainer\":\"_skipButtonContainer_1tyea_28\",\"blockViewContainer\":\"_blockViewContainer_1tyea_35\",\"scriptItem\":\"_scriptItem_1tyea_42\",\"timeButton\":\"_timeButton_1tyea_47\",\"textView\":\"_textView_1tyea_60\",\"highlighted\":\"_highlighted_1tyea_65\"};\nconst css = `* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n._scriptsContainer_1tyea_7 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n width: 100%;\n height: auto;\n padding: 1.5rem;\n border: 2px solid #ececec;\n border-radius: 0.75rem;\n}\n\n._title_1tyea_18 {\n font-size: 1.25rem;\n font-weight: 700;\n}\n\n._lineViewContainer_1tyea_23 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 {\n align-self: end;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 button {\n cursor: pointer;\n}\n\n._blockViewContainer_1tyea_35 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n height: 16rem;\n overflow-y: auto;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 {\n padding: 16px;\n border-radius: 12px;\n transition: background-color 0.5s ease-in-out;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 ._timeButton_1tyea_47 {\n width: 5rem;\n padding-inline: 0.75rem;\n padding-block: 0.5rem;\n margin-bottom: 0.5rem;\n border: none;\n border-radius: 9999px;\n background-color: gray;\n cursor: pointer;\n font-size: 0.75rem;\n color: white;\n}\n\n._textView_1tyea_60 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n._textView_1tyea_60._highlighted_1tyea_65 {\n background-color: #fef08a;\n}`;\n\n(function() {\n if (typeof document !== \"undefined\" && !document.getElementById(digest)) {\n var ele = document.createElement('style');\n ele.id = digest;\n ele.textContent = css;\n document.head.appendChild(ele);\n }\n})();\n\nexport default classes;\nexport { css, digest, classes };\n ", "import { useState, useCallback } from 'react';\n\ninterface ThrottlingProps {\n buttonClicked: (arg: T) => void;\n delay?: number; // Optional delay prop\n}\n\nexport default function useThrottling({\n buttonClicked,\n delay = 300,\n}: ThrottlingProps) {\n const [isThrottled, setIsThrottled] = useState(false);\n\n const throttledCallback = useCallback(\n (arg: T) => {\n if (!isThrottled) {\n buttonClicked(arg);\n setIsThrottled(true);\n setTimeout(() => {\n setIsThrottled(false);\n }, delay);\n }\n },\n [isThrottled, buttonClicked, delay],\n );\n\n return throttledCallback;\n}\n", "import React from 'react';\nimport { Script, LanguageCode, TextStyle } from '../interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface TextDisplayProps {\n script: Script;\n selectedLanguages: T[];\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n}\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uC801\uC6A9\nexport function TextDisplay({\n script,\n selectedLanguages,\n onSelectWord,\n textStyle,\n}: TextDisplayProps) {\n return (\n \n {selectedLanguages.map((language) => (\n {\n const selection = window.getSelection();\n if (selection && selection.toString()) {\n const selectedWord = selection.toString().trim();\n if (selectedWord) {\n onSelectWord(selectedWord, script, 0);\n }\n }\n }}\n >\n {script[language] || `(${language} \uC790\uB9C9\uC774 \uC5C6\uC5B4\uC694!)`}\n

\n ))}\n
\n );\n}\n", "import { Script } from '../interfaces/Scripts';\n\nexport const moveToScriptAtIndex = (\n index: number,\n scripts: Script[],\n seekTo: (timeInSeconds: number) => void,\n) => {\n // \uC720\uD6A8\uD55C \uC778\uB371\uC2A4\uC778\uC9C0 \uD655\uC778\n if (index < 0 || index >= scripts.length - 1) {\n console.warn('Invalid script index:', index);\n return;\n }\n\n // \uC2A4\uD06C\uB9BD\uD2B8 \uC2DC\uC791 \uC2DC\uAC04\uC73C\uB85C \uC774\uB3D9\n console.log('Seeking to:', scripts[index]);\n\n seekTo(scripts[index].startTimeInSecond);\n};\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n // \uC774\uC804 \uCF54\uB4DC\n // const totalScripts = scripts.length;\n\n // const handlePrevious = () => {\n // if (currentScriptIndex > 0) {\n // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond);\n // }\n // console.log(\n // '\uC804\uC73C\uB85C \uC774\uB3D9 ',\n // scripts[currentScriptIndex - 1].startTimeInSecond,\n // );\n // };\n\n // const handleNext = () => {\n // if (currentScriptIndex < totalScripts - 1) {\n // console.log(\n // '\uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9',\n // scripts[currentScriptIndex + 1].startTimeInSecond,\n // );\n // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond);\n // }\n // };\n\n const throttledHandlePrevious = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo),\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo),\n });\n\n // console.log(currentScriptIndex);\n\n return (\n
\n
\n {PrevButton ? (\n throttledHandlePrevious(currentScriptIndex)}\n />\n ) : (\n \n )}\n {NextButton ? (\n throttledHandleNext(currentScriptIndex)} />\n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect, useState } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n FocusButton?: ({\n state,\n setState,\n }: {\n state: boolean;\n setState: React.Dispatch>;\n }) => JSX.Element;\n}\n\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n FocusButton,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n const [isSubtitleCentered, setIsSubtitleCentered] = useState(true);\n\n useEffect(() => {\n const handleInteraction = () => {\n setIsSubtitleCentered(false);\n };\n\n const container = containerRef.current;\n if (container) {\n container.addEventListener('wheel', handleInteraction);\n container.addEventListener('touchmove', handleInteraction);\n }\n\n return () => {\n if (container) {\n container.removeEventListener('wheel', handleInteraction);\n container.removeEventListener('touchmove', handleInteraction);\n }\n };\n }, [setIsSubtitleCentered]);\n\n useEffect(() => {\n if (\n containerRef.current &&\n isSubtitleCentered !== undefined &&\n isSubtitleCentered\n ) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex, isSubtitleCentered]);\n\n useEffect(() => {\n console.log('isSubtitleCentered:', isSubtitleCentered);\n }, [isSubtitleCentered]);\n\n return (\n
\n {FocusButton && (\n \n )}\n
\n {scripts.map((script, index) => (\n {\n moveToScriptAtIndex(index, scripts, seekTo);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n
\n
\n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n", "import React from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { Dispatch, SetStateAction } from 'react';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n FocusButton?: ({\n state,\n setState,\n }: {\n state: boolean;\n setState: Dispatch>;\n }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n FocusButton,\n}: ReactScriptPlayerProps) {\n const currentScriptIndex = findCurrentScriptIndex(scripts, currentTime) ?? 0; // \uB3D9\uC601\uC0C1 \uC7AC\uC0DD\uC5D0 \uB3D9\uAE30\uD654\uB418\uB294 script Index\uCC3E\uB294 \uD568\uC218\n\n const handleClickScript = (script: Script, index: number) => {\n onClickScript(script, index);\n };\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n return (\n
\n
\n

Transcript

\n {mode === 'line' ? (\n \n ) : (\n \n )}\n
\n
\n );\n}\n"], + "mappings": ";AACA,IAAM,SAAS;AACf,IAAM,UAAU,EAAC,oBAAmB,6BAA4B,SAAQ,mBAAkB,qBAAoB,+BAA8B,uBAAsB,iCAAgC,sBAAqB,gCAA+B,cAAa,wBAAuB,cAAa,wBAAuB,YAAW,sBAAqB,eAAc,wBAAuB;AACnY,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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AAmB,UAAkB;AAC9D,kBAAc,QAAQ,KAAK;AAAA,EAC7B;AAEA,QAAM,oBAAoB;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SACE,gBAAAD,KAAC,SAAI,WAAW,iCAAO,kBAAkB,OAAO,EAAE,GAAG,eAAe,GAClE,0BAAAC,MAAC,SAAI,WAAW,iCAAO,kBACrB;AAAA,oBAAAD,KAAC,OAAE,WAAW,iCAAO,OAAO,wBAAU;AAAA,IACrC,SAAS,SACR,gBAAAA,KAAC,YAAU,GAAG,mBAAmB,WAAsB,IAEvD,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ,GACF;AAEJ;", + "names": ["jsx", "currentScriptIndex", "useState", "jsx", "jsxs", "useState", "index", "jsx", "jsxs"] } From 0ec97c88ce19c780b0ebf7cb38edaad1ac8c95d0 Mon Sep 17 00:00:00 2001 From: godhyzzang <109357302+godhyzzang@users.noreply.github.com> Date: Mon, 11 Nov 2024 16:55:56 +0900 Subject: [PATCH 14/18] =?UTF-8?q?rename=20:=20focusButton=20=EC=86=8D?= =?UTF-8?q?=EC=84=B1,=20=ED=95=B8=EB=93=A4=EB=9F=AC=20=EB=AA=85=ED=99=95?= =?UTF-8?q?=ED=95=9C=20=EC=9D=B4=EB=A6=84=EC=9C=BC=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/components/BlockView.tsx | 12 ++++++------ core/src/components/ReactScriptPlayer.tsx | 8 ++++---- demo/src/App.tsx | 14 +++++++------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/core/src/components/BlockView.tsx b/core/src/components/BlockView.tsx index a7c7399..6e99c46 100644 --- a/core/src/components/BlockView.tsx +++ b/core/src/components/BlockView.tsx @@ -15,11 +15,11 @@ interface BlockViewProps { timeStyle?: TimeStyle; textStyle?: TextStyle; FocusButton?: ({ - state, - setState, + isFocus, + setIsFocus, }: { - state: boolean; - setState: React.Dispatch>; + isFocus: boolean; + setIsFocus: React.Dispatch>; }) => JSX.Element; } @@ -86,8 +86,8 @@ export function BlockView({
{FocusButton && ( )}
diff --git a/core/src/components/ReactScriptPlayer.tsx b/core/src/components/ReactScriptPlayer.tsx index 9f3f480..c4a96d7 100644 --- a/core/src/components/ReactScriptPlayer.tsx +++ b/core/src/components/ReactScriptPlayer.tsx @@ -25,11 +25,11 @@ export interface ReactScriptPlayerProps { PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element; NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element; FocusButton?: ({ - state, - setState, + isFocus, + setIsFocus, }: { - state: boolean; - setState: Dispatch>; + isFocus: boolean; + setIsFocus: Dispatch>; }) => JSX.Element; } diff --git a/demo/src/App.tsx b/demo/src/App.tsx index fd1c96e..3ab1c19 100644 --- a/demo/src/App.tsx +++ b/demo/src/App.tsx @@ -56,19 +56,19 @@ function App() { ); const FocusButton = ({ - state, - setState, + isFocus, + setIsFocus, }: { - state: boolean; - setState: React.Dispatch>; + isFocus: boolean; + setIsFocus: React.Dispatch>; }) => (
\n );\n}\n", "import { Script } from '../interfaces/Scripts';\n\nexport const moveToScriptAtIndex = (\n index: number,\n scripts: Script[],\n seekTo: (timeInSeconds: number) => void,\n) => {\n // \uC720\uD6A8\uD55C \uC778\uB371\uC2A4\uC778\uC9C0 \uD655\uC778\n if (index < 0 || index >= scripts.length - 1) {\n console.warn('Invalid script index:', index);\n return;\n }\n\n // \uC2A4\uD06C\uB9BD\uD2B8 \uC2DC\uC791 \uC2DC\uAC04\uC73C\uB85C \uC774\uB3D9\n console.log('Seeking to:', scripts[index]);\n\n seekTo(scripts[index].startTimeInSecond);\n};\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n // \uC774\uC804 \uCF54\uB4DC\n // const totalScripts = scripts.length;\n\n // const handlePrevious = () => {\n // if (currentScriptIndex > 0) {\n // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond);\n // }\n // console.log(\n // '\uC804\uC73C\uB85C \uC774\uB3D9 ',\n // scripts[currentScriptIndex - 1].startTimeInSecond,\n // );\n // };\n\n // const handleNext = () => {\n // if (currentScriptIndex < totalScripts - 1) {\n // console.log(\n // '\uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9',\n // scripts[currentScriptIndex + 1].startTimeInSecond,\n // );\n // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond);\n // }\n // };\n\n const throttledHandlePrevious = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo),\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo),\n });\n\n // console.log(currentScriptIndex);\n\n return (\n
\n
\n {PrevButton ? (\n throttledHandlePrevious(currentScriptIndex)}\n />\n ) : (\n \n )}\n {NextButton ? (\n throttledHandleNext(currentScriptIndex)} />\n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect, useState } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n FocusButton?: ({\n state,\n setState,\n }: {\n state: boolean;\n setState: React.Dispatch>;\n }) => JSX.Element;\n}\n\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n FocusButton,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n const [isSubtitleCentered, setIsSubtitleCentered] = useState(true);\n\n useEffect(() => {\n const handleInteraction = () => {\n setIsSubtitleCentered(false);\n };\n\n const container = containerRef.current;\n if (container) {\n container.addEventListener('wheel', handleInteraction);\n container.addEventListener('touchmove', handleInteraction);\n }\n\n return () => {\n if (container) {\n container.removeEventListener('wheel', handleInteraction);\n container.removeEventListener('touchmove', handleInteraction);\n }\n };\n }, [setIsSubtitleCentered]);\n\n useEffect(() => {\n if (\n containerRef.current &&\n isSubtitleCentered !== undefined &&\n isSubtitleCentered\n ) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex, isSubtitleCentered]);\n\n useEffect(() => {\n console.log('isSubtitleCentered:', isSubtitleCentered);\n }, [isSubtitleCentered]);\n\n return (\n
\n {FocusButton && (\n \n )}\n
\n {scripts.map((script, index) => (\n {\n moveToScriptAtIndex(index, scripts, seekTo);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n
\n
\n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n", "import React from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { Dispatch, SetStateAction } from 'react';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n FocusButton?: ({\n state,\n setState,\n }: {\n state: boolean;\n setState: Dispatch>;\n }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n FocusButton,\n}: ReactScriptPlayerProps) {\n const currentScriptIndex = findCurrentScriptIndex(scripts, currentTime) ?? 0; // \uB3D9\uC601\uC0C1 \uC7AC\uC0DD\uC5D0 \uB3D9\uAE30\uD654\uB418\uB294 script Index\uCC3E\uB294 \uD568\uC218\n\n const handleClickScript = (script: Script, index: number) => {\n onClickScript(script, index);\n };\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n return (\n
\n
\n

Transcript

\n {mode === 'line' ? (\n \n ) : (\n \n )}\n
\n
\n );\n}\n"], - "mappings": ";AACA,IAAM,SAAS;AACf,IAAM,UAAU,EAAC,oBAAmB,6BAA4B,SAAQ,mBAAkB,qBAAoB,+BAA8B,uBAAsB,iCAAgC,sBAAqB,gCAA+B,cAAa,wBAAuB,cAAa,wBAAuB,YAAW,sBAAqB,eAAc,wBAAuB;AACnY,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAoEX,WAAW;AACV,MAAI,OAAO,aAAa,eAAe,CAAC,SAAS,eAAe,MAAM,GAAG;AACvE,QA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AU,GAAG,mBAAmB,WAAsB,IAEvD,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ,GACF;AAEJ;", + "sourcesContent": ["\nconst digest = '9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50';\nconst classes = {\"scriptsContainer\":\"_scriptsContainer_1tyea_7\",\"title\":\"_title_1tyea_18\",\"lineViewContainer\":\"_lineViewContainer_1tyea_23\",\"skipButtonContainer\":\"_skipButtonContainer_1tyea_28\",\"blockViewContainer\":\"_blockViewContainer_1tyea_35\",\"scriptItem\":\"_scriptItem_1tyea_42\",\"timeButton\":\"_timeButton_1tyea_47\",\"textView\":\"_textView_1tyea_60\",\"highlighted\":\"_highlighted_1tyea_65\"};\nconst css = `* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n._scriptsContainer_1tyea_7 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n width: 100%;\n height: auto;\n padding: 1.5rem;\n border: 2px solid #ececec;\n border-radius: 0.75rem;\n}\n\n._title_1tyea_18 {\n font-size: 1.25rem;\n font-weight: 700;\n}\n\n._lineViewContainer_1tyea_23 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 {\n align-self: end;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 button {\n cursor: pointer;\n}\n\n._blockViewContainer_1tyea_35 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n height: 16rem;\n overflow-y: auto;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 {\n padding: 16px;\n border-radius: 12px;\n transition: background-color 0.5s ease-in-out;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 ._timeButton_1tyea_47 {\n width: 5rem;\n padding-inline: 0.75rem;\n padding-block: 0.5rem;\n margin-bottom: 0.5rem;\n border: none;\n border-radius: 9999px;\n background-color: gray;\n cursor: pointer;\n font-size: 0.75rem;\n color: white;\n}\n\n._textView_1tyea_60 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n._textView_1tyea_60._highlighted_1tyea_65 {\n background-color: #fef08a;\n}`;\n\n(function() {\n if (typeof document !== \"undefined\" && !document.getElementById(digest)) {\n var ele = document.createElement('style');\n ele.id = digest;\n ele.textContent = css;\n document.head.appendChild(ele);\n }\n})();\n\nexport default classes;\nexport { css, digest, classes };\n ", "import { useState, useCallback } from 'react';\n\ninterface ThrottlingProps {\n buttonClicked: (arg: T) => void;\n delay?: number; // Optional delay prop\n}\n\nexport default function useThrottling({\n buttonClicked,\n delay = 300,\n}: ThrottlingProps) {\n const [isThrottled, setIsThrottled] = useState(false);\n\n const throttledCallback = useCallback(\n (arg: T) => {\n if (!isThrottled) {\n buttonClicked(arg);\n setIsThrottled(true);\n setTimeout(() => {\n setIsThrottled(false);\n }, delay);\n }\n },\n [isThrottled, buttonClicked, delay],\n );\n\n return throttledCallback;\n}\n", "import React from 'react';\nimport { Script, LanguageCode, TextStyle } from '../interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface TextDisplayProps {\n script: Script;\n selectedLanguages: T[];\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n}\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uC801\uC6A9\nexport function TextDisplay({\n script,\n selectedLanguages,\n onSelectWord,\n textStyle,\n}: TextDisplayProps) {\n return (\n \n {selectedLanguages.map((language) => (\n {\n const selection = window.getSelection();\n if (selection && selection.toString()) {\n const selectedWord = selection.toString().trim();\n if (selectedWord) {\n onSelectWord(selectedWord, script, 0);\n }\n }\n }}\n >\n {script[language] || `(${language} \uC790\uB9C9\uC774 \uC5C6\uC5B4\uC694!)`}\n

\n ))}\n
\n );\n}\n", "import { Script } from '../interfaces/Scripts';\n\nexport const moveToScriptAtIndex = (\n index: number,\n scripts: Script[],\n seekTo: (timeInSeconds: number) => void,\n) => {\n // \uC720\uD6A8\uD55C \uC778\uB371\uC2A4\uC778\uC9C0 \uD655\uC778\n if (index < 0 || index >= scripts.length - 1) {\n console.warn('Invalid script index:', index);\n return;\n }\n\n // \uC2A4\uD06C\uB9BD\uD2B8 \uC2DC\uC791 \uC2DC\uAC04\uC73C\uB85C \uC774\uB3D9\n console.log('Seeking to:', scripts[index]);\n\n seekTo(scripts[index].startTimeInSecond);\n};\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n // \uC774\uC804 \uCF54\uB4DC\n // const totalScripts = scripts.length;\n\n // const handlePrevious = () => {\n // if (currentScriptIndex > 0) {\n // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond);\n // }\n // console.log(\n // '\uC804\uC73C\uB85C \uC774\uB3D9 ',\n // scripts[currentScriptIndex - 1].startTimeInSecond,\n // );\n // };\n\n // const handleNext = () => {\n // if (currentScriptIndex < totalScripts - 1) {\n // console.log(\n // '\uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9',\n // scripts[currentScriptIndex + 1].startTimeInSecond,\n // );\n // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond);\n // }\n // };\n\n const throttledHandlePrevious = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo),\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo),\n });\n\n // console.log(currentScriptIndex);\n\n return (\n
\n
\n {PrevButton ? (\n throttledHandlePrevious(currentScriptIndex)}\n />\n ) : (\n \n )}\n {NextButton ? (\n throttledHandleNext(currentScriptIndex)} />\n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect, useState } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n FocusButton?: ({\n isFocus,\n setIsFocus,\n }: {\n isFocus: boolean;\n setIsFocus: React.Dispatch>;\n }) => JSX.Element;\n}\n\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n FocusButton,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n const [isSubtitleCentered, setIsSubtitleCentered] = useState(true);\n\n useEffect(() => {\n const handleInteraction = () => {\n setIsSubtitleCentered(false);\n };\n\n const container = containerRef.current;\n if (container) {\n container.addEventListener('wheel', handleInteraction);\n container.addEventListener('touchmove', handleInteraction);\n }\n\n return () => {\n if (container) {\n container.removeEventListener('wheel', handleInteraction);\n container.removeEventListener('touchmove', handleInteraction);\n }\n };\n }, [setIsSubtitleCentered]);\n\n useEffect(() => {\n if (\n containerRef.current &&\n isSubtitleCentered !== undefined &&\n isSubtitleCentered\n ) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex, isSubtitleCentered]);\n\n useEffect(() => {\n console.log('isSubtitleCentered:', isSubtitleCentered);\n }, [isSubtitleCentered]);\n\n return (\n
\n {FocusButton && (\n \n )}\n
\n {scripts.map((script, index) => (\n {\n moveToScriptAtIndex(index, scripts, seekTo);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n
\n \n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n", "import React from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { Dispatch, SetStateAction } from 'react';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n FocusButton?: ({\n isFocus,\n setIsFocus,\n }: {\n isFocus: boolean;\n setIsFocus: Dispatch>;\n }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n FocusButton,\n}: ReactScriptPlayerProps) {\n const currentScriptIndex = findCurrentScriptIndex(scripts, currentTime) ?? 0; // \uB3D9\uC601\uC0C1 \uC7AC\uC0DD\uC5D0 \uB3D9\uAE30\uD654\uB418\uB294 script Index\uCC3E\uB294 \uD568\uC218\n\n const handleClickScript = (script: Script, index: number) => {\n onClickScript(script, index);\n };\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n return (\n
\n
\n

Transcript

\n {mode === 'line' ? (\n \n ) : (\n \n )}\n
\n
\n );\n}\n"], + "mappings": ";AACA,IAAM,SAAS;AACf,IAAM,UAAU,EAAC,oBAAmB,6BAA4B,SAAQ,mBAAkB,qBAAoB,+BAA8B,uBAAsB,iCAAgC,sBAAqB,gCAA+B,cAAa,wBAAuB,cAAa,wBAAuB,YAAW,sBAAqB,eAAc,wBAAuB;AACnY,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AAM,oBAAoB,CAAC,QAAmB,UAAkB;AAC9D,kBAAc,QAAQ,KAAK;AAAA,EAC7B;AAEA,QAAM,oBAAoB;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SACE,gBAAAD,KAAC,SAAI,WAAW,iCAAO,kBAAkB,OAAO,EAAE,GAAG,eAAe,GAClE,0BAAAC,MAAC,SAAI,WAAW,iCAAO,kBACrB;AAAA,oBAAAD,KAAC,OAAE,WAAW,iCAAO,OAAO,wBAAU;AAAA,IACrC,SAAS,SACR,gBAAAA,KAAC,YAAU,GAAG,mBAAmB,WAAsB,IAEvD,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ,GACF;AAEJ;", "names": ["jsx", "currentScriptIndex", "useState", "jsx", "jsxs", "useState", "index", "jsx", "jsxs"] } From e40e1ba7c46091d1510c26dd8d5c44966f0b32cb Mon Sep 17 00:00:00 2001 From: godhyzzang <109357302+godhyzzang@users.noreply.github.com> Date: Mon, 11 Nov 2024 16:57:16 +0900 Subject: [PATCH 16/18] =?UTF-8?q?remove=20:=20=ED=95=84=EC=9A=94=EC=97=86?= =?UTF-8?q?=EB=8A=94=20=EB=94=94=EB=B2=84=EA=B9=85=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/dist/index.js | 3 --- core/dist/index.js.map | 4 ++-- core/src/components/BlockView.tsx | 4 ---- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/core/dist/index.js b/core/dist/index.js index c87e7d2..6cd55fb 100644 --- a/core/dist/index.js +++ b/core/dist/index.js @@ -248,9 +248,6 @@ function BlockView({ } } }, [currentScriptIndex, isSubtitleCentered]); - useEffect(() => { - console.log("isSubtitleCentered:", isSubtitleCentered); - }, [isSubtitleCentered]); return /* @__PURE__ */ jsxs2("div", { className: ReactScriptPlayer_module_default.blockViewContainer, children: [ FocusButton && /* @__PURE__ */ jsx3( FocusButton, diff --git a/core/dist/index.js.map b/core/dist/index.js.map index 8588477..6557af6 100644 --- a/core/dist/index.js.map +++ b/core/dist/index.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["esbuild-scss-modules-plugin:./ReactScriptPlayer.module.scss", "../src/hooks/useThrottling.ts", "../src/components/TextDisplay.tsx", "../src/utils/moveToScriptAtIndex.ts", "../src/components/LineView.tsx", "../src/components/BlockView.tsx", "../src/utils/convertTime.ts", "../src/utils/findCurrentScriptIndex.ts", "../src/components/ReactScriptPlayer.tsx"], - "sourcesContent": ["\nconst digest = '9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50';\nconst classes = {\"scriptsContainer\":\"_scriptsContainer_1tyea_7\",\"title\":\"_title_1tyea_18\",\"lineViewContainer\":\"_lineViewContainer_1tyea_23\",\"skipButtonContainer\":\"_skipButtonContainer_1tyea_28\",\"blockViewContainer\":\"_blockViewContainer_1tyea_35\",\"scriptItem\":\"_scriptItem_1tyea_42\",\"timeButton\":\"_timeButton_1tyea_47\",\"textView\":\"_textView_1tyea_60\",\"highlighted\":\"_highlighted_1tyea_65\"};\nconst css = `* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n._scriptsContainer_1tyea_7 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n width: 100%;\n height: auto;\n padding: 1.5rem;\n border: 2px solid #ececec;\n border-radius: 0.75rem;\n}\n\n._title_1tyea_18 {\n font-size: 1.25rem;\n font-weight: 700;\n}\n\n._lineViewContainer_1tyea_23 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 {\n align-self: end;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 button {\n cursor: pointer;\n}\n\n._blockViewContainer_1tyea_35 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n height: 16rem;\n overflow-y: auto;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 {\n padding: 16px;\n border-radius: 12px;\n transition: background-color 0.5s ease-in-out;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 ._timeButton_1tyea_47 {\n width: 5rem;\n padding-inline: 0.75rem;\n padding-block: 0.5rem;\n margin-bottom: 0.5rem;\n border: none;\n border-radius: 9999px;\n background-color: gray;\n cursor: pointer;\n font-size: 0.75rem;\n color: white;\n}\n\n._textView_1tyea_60 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n._textView_1tyea_60._highlighted_1tyea_65 {\n background-color: #fef08a;\n}`;\n\n(function() {\n if (typeof document !== \"undefined\" && !document.getElementById(digest)) {\n var ele = document.createElement('style');\n ele.id = digest;\n ele.textContent = css;\n document.head.appendChild(ele);\n }\n})();\n\nexport default classes;\nexport { css, digest, classes };\n ", "import { useState, useCallback } from 'react';\n\ninterface ThrottlingProps {\n buttonClicked: (arg: T) => void;\n delay?: number; // Optional delay prop\n}\n\nexport default function useThrottling({\n buttonClicked,\n delay = 300,\n}: ThrottlingProps) {\n const [isThrottled, setIsThrottled] = useState(false);\n\n const throttledCallback = useCallback(\n (arg: T) => {\n if (!isThrottled) {\n buttonClicked(arg);\n setIsThrottled(true);\n setTimeout(() => {\n setIsThrottled(false);\n }, delay);\n }\n },\n [isThrottled, buttonClicked, delay],\n );\n\n return throttledCallback;\n}\n", "import React from 'react';\nimport { Script, LanguageCode, TextStyle } from '../interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface TextDisplayProps {\n script: Script;\n selectedLanguages: T[];\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n}\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uC801\uC6A9\nexport function TextDisplay({\n script,\n selectedLanguages,\n onSelectWord,\n textStyle,\n}: TextDisplayProps) {\n return (\n \n {selectedLanguages.map((language) => (\n {\n const selection = window.getSelection();\n if (selection && selection.toString()) {\n const selectedWord = selection.toString().trim();\n if (selectedWord) {\n onSelectWord(selectedWord, script, 0);\n }\n }\n }}\n >\n {script[language] || `(${language} \uC790\uB9C9\uC774 \uC5C6\uC5B4\uC694!)`}\n

\n ))}\n \n );\n}\n", "import { Script } from '../interfaces/Scripts';\n\nexport const moveToScriptAtIndex = (\n index: number,\n scripts: Script[],\n seekTo: (timeInSeconds: number) => void,\n) => {\n // \uC720\uD6A8\uD55C \uC778\uB371\uC2A4\uC778\uC9C0 \uD655\uC778\n if (index < 0 || index >= scripts.length - 1) {\n console.warn('Invalid script index:', index);\n return;\n }\n\n // \uC2A4\uD06C\uB9BD\uD2B8 \uC2DC\uC791 \uC2DC\uAC04\uC73C\uB85C \uC774\uB3D9\n console.log('Seeking to:', scripts[index]);\n\n seekTo(scripts[index].startTimeInSecond);\n};\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n // \uC774\uC804 \uCF54\uB4DC\n // const totalScripts = scripts.length;\n\n // const handlePrevious = () => {\n // if (currentScriptIndex > 0) {\n // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond);\n // }\n // console.log(\n // '\uC804\uC73C\uB85C \uC774\uB3D9 ',\n // scripts[currentScriptIndex - 1].startTimeInSecond,\n // );\n // };\n\n // const handleNext = () => {\n // if (currentScriptIndex < totalScripts - 1) {\n // console.log(\n // '\uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9',\n // scripts[currentScriptIndex + 1].startTimeInSecond,\n // );\n // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond);\n // }\n // };\n\n const throttledHandlePrevious = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo),\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo),\n });\n\n // console.log(currentScriptIndex);\n\n return (\n
\n
\n {PrevButton ? (\n throttledHandlePrevious(currentScriptIndex)}\n />\n ) : (\n \n )}\n {NextButton ? (\n throttledHandleNext(currentScriptIndex)} />\n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect, useState } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n FocusButton?: ({\n isFocus,\n setIsFocus,\n }: {\n isFocus: boolean;\n setIsFocus: React.Dispatch>;\n }) => JSX.Element;\n}\n\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n FocusButton,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n const [isSubtitleCentered, setIsSubtitleCentered] = useState(true);\n\n useEffect(() => {\n const handleInteraction = () => {\n setIsSubtitleCentered(false);\n };\n\n const container = containerRef.current;\n if (container) {\n container.addEventListener('wheel', handleInteraction);\n container.addEventListener('touchmove', handleInteraction);\n }\n\n return () => {\n if (container) {\n container.removeEventListener('wheel', handleInteraction);\n container.removeEventListener('touchmove', handleInteraction);\n }\n };\n }, [setIsSubtitleCentered]);\n\n useEffect(() => {\n if (\n containerRef.current &&\n isSubtitleCentered !== undefined &&\n isSubtitleCentered\n ) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex, isSubtitleCentered]);\n\n useEffect(() => {\n console.log('isSubtitleCentered:', isSubtitleCentered);\n }, [isSubtitleCentered]);\n\n return (\n
\n {FocusButton && (\n \n )}\n
\n {scripts.map((script, index) => (\n {\n moveToScriptAtIndex(index, scripts, seekTo);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n
\n \n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n", "import React from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { Dispatch, SetStateAction } from 'react';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n FocusButton?: ({\n isFocus,\n setIsFocus,\n }: {\n isFocus: boolean;\n setIsFocus: Dispatch>;\n }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n FocusButton,\n}: ReactScriptPlayerProps) {\n const currentScriptIndex = findCurrentScriptIndex(scripts, currentTime) ?? 0; // \uB3D9\uC601\uC0C1 \uC7AC\uC0DD\uC5D0 \uB3D9\uAE30\uD654\uB418\uB294 script Index\uCC3E\uB294 \uD568\uC218\n\n const handleClickScript = (script: Script, index: number) => {\n onClickScript(script, index);\n };\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n return (\n
\n
\n

Transcript

\n {mode ===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AU,KACb,QAAQ,SAAS,IAAI,QACrB;AACN;;;ACoCM,SACE,OAAAC,MADF,QAAAC,aAAA;AAlCC,SAAS,kBAAmD;AAAA,EACjE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA8B;AAjD9B;AAkDE,QAAM,sBAAqB,4BAAuB,SAAS,WAAW,MAA3C,YAAgD;AAE3E,QAAM,oBAAoB,CAAC,QAAmB,UAAkB;AAC9D,kBAAc,QAAQ,KAAK;AAAA,EAC7B;AAEA,QAAM,oBAAoB;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SACE,gBAAAD,KAAC,SAAI,WAAW,iCAAO,kBAAkB,OAAO,EAAE,GAAG,eAAe,GAClE,0BAAAC,MAAC,SAAI,WAAW,iCAAO,kBACrB;AAAA,oBAAAD,KAAC,OAAE,WAAW,iCAAO,OAAO,wBAAU;AAAA,IACrC,SAAS,SACR,gBAAAA,KAAC,YAAU,GAAG,mBAAmB,WAAsB,IAEvD,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ,GACF;AAEJ;", + "sourcesContent": ["\nconst digest = '9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50';\nconst classes = {\"scriptsContainer\":\"_scriptsContainer_1tyea_7\",\"title\":\"_title_1tyea_18\",\"lineViewContainer\":\"_lineViewContainer_1tyea_23\",\"skipButtonContainer\":\"_skipButtonContainer_1tyea_28\",\"blockViewContainer\":\"_blockViewContainer_1tyea_35\",\"scriptItem\":\"_scriptItem_1tyea_42\",\"timeButton\":\"_timeButton_1tyea_47\",\"textView\":\"_textView_1tyea_60\",\"highlighted\":\"_highlighted_1tyea_65\"};\nconst css = `* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n._scriptsContainer_1tyea_7 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n width: 100%;\n height: auto;\n padding: 1.5rem;\n border: 2px solid #ececec;\n border-radius: 0.75rem;\n}\n\n._title_1tyea_18 {\n font-size: 1.25rem;\n font-weight: 700;\n}\n\n._lineViewContainer_1tyea_23 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 {\n align-self: end;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 button {\n cursor: pointer;\n}\n\n._blockViewContainer_1tyea_35 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n height: 16rem;\n overflow-y: auto;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 {\n padding: 16px;\n border-radius: 12px;\n transition: background-color 0.5s ease-in-out;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 ._timeButton_1tyea_47 {\n width: 5rem;\n padding-inline: 0.75rem;\n padding-block: 0.5rem;\n margin-bottom: 0.5rem;\n border: none;\n border-radius: 9999px;\n background-color: gray;\n cursor: pointer;\n font-size: 0.75rem;\n color: white;\n}\n\n._textView_1tyea_60 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n._textView_1tyea_60._highlighted_1tyea_65 {\n background-color: #fef08a;\n}`;\n\n(function() {\n if (typeof document !== \"undefined\" && !document.getElementById(digest)) {\n var ele = document.createElement('style');\n ele.id = digest;\n ele.textContent = css;\n document.head.appendChild(ele);\n }\n})();\n\nexport default classes;\nexport { css, digest, classes };\n ", "import { useState, useCallback } from 'react';\n\ninterface ThrottlingProps {\n buttonClicked: (arg: T) => void;\n delay?: number; // Optional delay prop\n}\n\nexport default function useThrottling({\n buttonClicked,\n delay = 300,\n}: ThrottlingProps) {\n const [isThrottled, setIsThrottled] = useState(false);\n\n const throttledCallback = useCallback(\n (arg: T) => {\n if (!isThrottled) {\n buttonClicked(arg);\n setIsThrottled(true);\n setTimeout(() => {\n setIsThrottled(false);\n }, delay);\n }\n },\n [isThrottled, buttonClicked, delay],\n );\n\n return throttledCallback;\n}\n", "import React from 'react';\nimport { Script, LanguageCode, TextStyle } from '../interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface TextDisplayProps {\n script: Script;\n selectedLanguages: T[];\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n}\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uC801\uC6A9\nexport function TextDisplay({\n script,\n selectedLanguages,\n onSelectWord,\n textStyle,\n}: TextDisplayProps) {\n return (\n \n {selectedLanguages.map((language) => (\n {\n const selection = window.getSelection();\n if (selection && selection.toString()) {\n const selectedWord = selection.toString().trim();\n if (selectedWord) {\n onSelectWord(selectedWord, script, 0);\n }\n }\n }}\n >\n {script[language] || `(${language} \uC790\uB9C9\uC774 \uC5C6\uC5B4\uC694!)`}\n

\n ))}\n \n );\n}\n", "import { Script } from '../interfaces/Scripts';\n\nexport const moveToScriptAtIndex = (\n index: number,\n scripts: Script[],\n seekTo: (timeInSeconds: number) => void,\n) => {\n // \uC720\uD6A8\uD55C \uC778\uB371\uC2A4\uC778\uC9C0 \uD655\uC778\n if (index < 0 || index >= scripts.length - 1) {\n console.warn('Invalid script index:', index);\n return;\n }\n\n // \uC2A4\uD06C\uB9BD\uD2B8 \uC2DC\uC791 \uC2DC\uAC04\uC73C\uB85C \uC774\uB3D9\n console.log('Seeking to:', scripts[index]);\n\n seekTo(scripts[index].startTimeInSecond);\n};\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n // \uC774\uC804 \uCF54\uB4DC\n // const totalScripts = scripts.length;\n\n // const handlePrevious = () => {\n // if (currentScriptIndex > 0) {\n // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond);\n // }\n // console.log(\n // '\uC804\uC73C\uB85C \uC774\uB3D9 ',\n // scripts[currentScriptIndex - 1].startTimeInSecond,\n // );\n // };\n\n // const handleNext = () => {\n // if (currentScriptIndex < totalScripts - 1) {\n // console.log(\n // '\uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9',\n // scripts[currentScriptIndex + 1].startTimeInSecond,\n // );\n // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond);\n // }\n // };\n\n const throttledHandlePrevious = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo),\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo),\n });\n\n // console.log(currentScriptIndex);\n\n return (\n
\n
\n {PrevButton ? (\n throttledHandlePrevious(currentScriptIndex)}\n />\n ) : (\n \n )}\n {NextButton ? (\n throttledHandleNext(currentScriptIndex)} />\n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect, useState } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n FocusButton?: ({\n isFocus,\n setIsFocus,\n }: {\n isFocus: boolean;\n setIsFocus: React.Dispatch>;\n }) => JSX.Element;\n}\n\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n FocusButton,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n const [isSubtitleCentered, setIsSubtitleCentered] = useState(true);\n\n useEffect(() => {\n const handleInteraction = () => {\n setIsSubtitleCentered(false);\n };\n\n const container = containerRef.current;\n if (container) {\n container.addEventListener('wheel', handleInteraction);\n container.addEventListener('touchmove', handleInteraction);\n }\n\n return () => {\n if (container) {\n container.removeEventListener('wheel', handleInteraction);\n container.removeEventListener('touchmove', handleInteraction);\n }\n };\n }, [setIsSubtitleCentered]);\n\n useEffect(() => {\n if (\n containerRef.current &&\n isSubtitleCentered !== undefined &&\n isSubtitleCentered\n ) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex, isSubtitleCentered]);\n\n return (\n
\n {FocusButton && (\n \n )}\n
\n {scripts.map((script, index) => (\n {\n moveToScriptAtIndex(index, scripts, seekTo);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n
\n \n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n", "import React from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { Dispatch, SetStateAction } from 'react';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n FocusButton?: ({\n isFocus,\n setIsFocus,\n }: {\n isFocus: boolean;\n setIsFocus: Dispatch>;\n }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n FocusButton,\n}: ReactScriptPlayerProps) {\n const currentScriptIndex = findCurrentScriptIndex(scripts, currentTime) ?? 0; // \uB3D9\uC601\uC0C1 \uC7AC\uC0DD\uC5D0 \uB3D9\uAE30\uD654\uB418\uB294 script Index\uCC3E\uB294 \uD568\uC218\n\n const handleClickScript = (script: Script, index: number) => {\n onClickScript(script, index);\n };\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n return (\n
\n
\n

Transcript

\n {mode === 'line' ? (\n \n ) : (\n \n )}\n
\n
\n );\n}\n"], + "mappings": ";AACA,IAAM,SAAS;AACf,IAAM,UAAU,EAAC,oBAAmB,6BAA4B,SAAQ,mBAAkB,qBAAoB,+BAA8B,uBAAsB,iCAAgC,sBAAqB,gCAA+B,cAAa,wBAAuB,cAAa,wBAAuB,YAAW,sBAAqB,eAAc,wBAAuB;AACnY,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAoEX,WAAW;AACV,MAAI,OAAO,aAAa,eAAe,CAAC,SAAS,eAAe,MAAM,GAAG;AACvE,QAAI,MAAM,SAAS,cAAc,OAAO;AACxC,QAAI,KAAK;AACT,QAAI,cAAc;AAClB,aAAS,KAAK,YAAY,GAAG;AAAA,EAC/B;AACF,GAAG;AAEH,IAAO,mCAAQ;;;AChFf,SAAS,U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/src/components/BlockView.tsx b/core/src/components/BlockView.tsx index 6e99c46..5952c5c 100644 --- a/core/src/components/BlockView.tsx +++ b/core/src/components/BlockView.tsx @@ -78,10 +78,6 @@ export function BlockView({ } }, [currentScriptIndex, isSubtitleCentered]); - useEffect(() => { - console.log('isSubtitleCentered:', isSubtitleCentered); - }, [isSubtitleCentered]); - return (
{FocusButton && ( From 010a960eec0e432e975973743a68d7c459b5bc2b Mon Sep 17 00:00:00 2001 From: godhyzzang <109357302+godhyzzang@users.noreply.github.com> Date: Mon, 11 Nov 2024 17:16:20 +0900 Subject: [PATCH 17/18] =?UTF-8?q?rename=20:=20isSubtitledCentered=EB=A5=BC?= =?UTF-8?q?=20isFocus=EB=A1=9C=20=EB=AA=85=ED=99=95=ED=95=98=EA=B2=8C=20?= =?UTF-8?q?=EC=9D=B4=EB=A6=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/dist/index.js | 22 ++++++++++------------ core/dist/index.js.map | 4 ++-- core/src/components/BlockView.tsx | 23 ++++++++++------------- 3 files changed, 22 insertions(+), 27 deletions(-) diff --git a/core/dist/index.js b/core/dist/index.js index 6cd55fb..e7c27b5 100644 --- a/core/dist/index.js +++ b/core/dist/index.js @@ -216,11 +216,15 @@ function BlockView({ FocusButton }) { const containerRef = useRef(null); - const [isSubtitleCentered, setIsSubtitleCentered] = useState2(true); + const [isFocused, setIsFocused] = useState2(true); useEffect(() => { const handleInteraction = () => { - setIsSubtitleCentered(false); + setIsFocused(false); + console.log(isFocused + "isFocused"); + console.log(setIsFocused + "setIsFocused"); }; + console.log(isFocused + "isFocused"); + console.log(setIsFocused + "setIsFocused"); const container = containerRef.current; if (container) { container.addEventListener("wheel", handleInteraction); @@ -232,9 +236,9 @@ function BlockView({ container.removeEventListener("touchmove", handleInteraction); } }; - }, [setIsSubtitleCentered]); + }, [setIsFocused, isFocused]); useEffect(() => { - if (containerRef.current && isSubtitleCentered !== void 0 && isSubtitleCentered) { + if (containerRef.current && isFocused !== void 0 && isFocused) { if (currentScriptIndex < containerRef.current.children.length - 1) { const container = containerRef.current; const target = container.children[currentScriptIndex]; @@ -247,15 +251,9 @@ function BlockView({ }); } } - }, [currentScriptIndex, isSubtitleCentered]); + }, [currentScriptIndex, isFocused]); return /* @__PURE__ */ jsxs2("div", { className: ReactScriptPlayer_module_default.blockViewContainer, children: [ - FocusButton && /* @__PURE__ */ jsx3( - FocusButton, - { - setIsFocus: setIsSubtitleCentered, - isFocus: isSubtitleCentered - } - ), + FocusButton && /* @__PURE__ */ jsx3(FocusButton, { setIsFocus: setIsFocused, isFocus: isFocused }), /* @__PURE__ */ jsx3("div", { ref: containerRef, className: ReactScriptPlayer_module_default.blockViewContainer, children: scripts.map((script, index) => /* @__PURE__ */ jsxs2( "div", { diff --git a/core/dist/index.js.map b/core/dist/index.js.map index 6557af6..6ddb9dd 100644 --- a/core/dist/index.js.map +++ b/core/dist/index.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["esbuild-scss-modules-plugin:./ReactScriptPlayer.module.scss", "../src/hooks/useThrottling.ts", "../src/components/TextDisplay.tsx", "../src/utils/moveToScriptAtIndex.ts", "../src/components/LineView.tsx", "../src/components/BlockView.tsx", "../src/utils/convertTime.ts", "../src/utils/findCurrentScriptIndex.ts", "../src/components/ReactScriptPlayer.tsx"], - "sourcesContent": ["\nconst digest = '9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50';\nconst classes = {\"scriptsContainer\":\"_scriptsContainer_1tyea_7\",\"title\":\"_title_1tyea_18\",\"lineViewContainer\":\"_lineViewContainer_1tyea_23\",\"skipButtonContainer\":\"_skipButtonContainer_1tyea_28\",\"blockViewContainer\":\"_blockViewContainer_1tyea_35\",\"scriptItem\":\"_scriptItem_1tyea_42\",\"timeButton\":\"_timeButton_1tyea_47\",\"textView\":\"_textView_1tyea_60\",\"highlighted\":\"_highlighted_1tyea_65\"};\nconst css = `* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n._scriptsContainer_1tyea_7 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n width: 100%;\n height: auto;\n padding: 1.5rem;\n border: 2px solid #ececec;\n border-radius: 0.75rem;\n}\n\n._title_1tyea_18 {\n font-size: 1.25rem;\n font-weight: 700;\n}\n\n._lineViewContainer_1tyea_23 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 {\n align-self: end;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 button {\n cursor: pointer;\n}\n\n._blockViewContainer_1tyea_35 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n height: 16rem;\n overflow-y: auto;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 {\n padding: 16px;\n border-radius: 12px;\n transition: background-color 0.5s ease-in-out;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 ._timeButton_1tyea_47 {\n width: 5rem;\n padding-inline: 0.75rem;\n padding-block: 0.5rem;\n margin-bottom: 0.5rem;\n border: none;\n border-radius: 9999px;\n background-color: gray;\n cursor: pointer;\n font-size: 0.75rem;\n color: white;\n}\n\n._textView_1tyea_60 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n._textView_1tyea_60._highlighted_1tyea_65 {\n background-color: #fef08a;\n}`;\n\n(function() {\n if (typeof document !== \"undefined\" && !document.getElementById(digest)) {\n var ele = document.createElement('style');\n ele.id = digest;\n ele.textContent = css;\n document.head.appendChild(ele);\n }\n})();\n\nexport default classes;\nexport { css, digest, classes };\n ", "import { useState, useCallback } from 'react';\n\ninterface ThrottlingProps {\n buttonClicked: (arg: T) => void;\n delay?: number; // Optional delay prop\n}\n\nexport default function useThrottling({\n buttonClicked,\n delay = 300,\n}: ThrottlingProps) {\n const [isThrottled, setIsThrottled] = useState(false);\n\n const throttledCallback = useCallback(\n (arg: T) => {\n if (!isThrottled) {\n buttonClicked(arg);\n setIsThrottled(true);\n setTimeout(() => {\n setIsThrottled(false);\n }, delay);\n }\n },\n [isThrottled, buttonClicked, delay],\n );\n\n return throttledCallback;\n}\n", "import React from 'react';\nimport { Script, LanguageCode, TextStyle } from '../interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface TextDisplayProps {\n script: Script;\n selectedLanguages: T[];\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n}\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uC801\uC6A9\nexport function TextDisplay({\n script,\n selectedLanguages,\n onSelectWord,\n textStyle,\n}: TextDisplayProps) {\n return (\n \n {selectedLanguages.map((language) => (\n {\n const selection = window.getSelection();\n if (selection && selection.toString()) {\n const selectedWord = selection.toString().trim();\n if (selectedWord) {\n onSelectWord(selectedWord, script, 0);\n }\n }\n }}\n >\n {script[language] || `(${language} \uC790\uB9C9\uC774 \uC5C6\uC5B4\uC694!)`}\n

\n ))}\n
\n );\n}\n", "import { Script } from '../interfaces/Scripts';\n\nexport const moveToScriptAtIndex = (\n index: number,\n scripts: Script[],\n seekTo: (timeInSeconds: number) => void,\n) => {\n // \uC720\uD6A8\uD55C \uC778\uB371\uC2A4\uC778\uC9C0 \uD655\uC778\n if (index < 0 || index >= scripts.length - 1) {\n console.warn('Invalid script index:', index);\n return;\n }\n\n // \uC2A4\uD06C\uB9BD\uD2B8 \uC2DC\uC791 \uC2DC\uAC04\uC73C\uB85C \uC774\uB3D9\n console.log('Seeking to:', scripts[index]);\n\n seekTo(scripts[index].startTimeInSecond);\n};\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n // \uC774\uC804 \uCF54\uB4DC\n // const totalScripts = scripts.length;\n\n // const handlePrevious = () => {\n // if (currentScriptIndex > 0) {\n // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond);\n // }\n // console.log(\n // '\uC804\uC73C\uB85C \uC774\uB3D9 ',\n // scripts[currentScriptIndex - 1].startTimeInSecond,\n // );\n // };\n\n // const handleNext = () => {\n // if (currentScriptIndex < totalScripts - 1) {\n // console.log(\n // '\uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9',\n // scripts[currentScriptIndex + 1].startTimeInSecond,\n // );\n // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond);\n // }\n // };\n\n const throttledHandlePrevious = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo),\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo),\n });\n\n // console.log(currentScriptIndex);\n\n return (\n
\n
\n {PrevButton ? (\n throttledHandlePrevious(currentScriptIndex)}\n />\n ) : (\n \n )}\n {NextButton ? (\n throttledHandleNext(currentScriptIndex)} />\n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect, useState } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n FocusButton?: ({\n isFocus,\n setIsFocus,\n }: {\n isFocus: boolean;\n setIsFocus: React.Dispatch>;\n }) => JSX.Element;\n}\n\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n FocusButton,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n const [isSubtitleCentered, setIsSubtitleCentered] = useState(true);\n\n useEffect(() => {\n const handleInteraction = () => {\n setIsSubtitleCentered(false);\n };\n\n const container = containerRef.current;\n if (container) {\n container.addEventListener('wheel', handleInteraction);\n container.addEventListener('touchmove', handleInteraction);\n }\n\n return () => {\n if (container) {\n container.removeEventListener('wheel', handleInteraction);\n container.removeEventListener('touchmove', handleInteraction);\n }\n };\n }, [setIsSubtitleCentered]);\n\n useEffect(() => {\n if (\n containerRef.current &&\n isSubtitleCentered !== undefined &&\n isSubtitleCentered\n ) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex, isSubtitleCentered]);\n\n return (\n
\n {FocusButton && (\n \n )}\n
\n {scripts.map((script, index) => (\n {\n moveToScriptAtIndex(index, scripts, seekTo);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n
\n \n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n", "import React from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { Dispatch, SetStateAction } from 'react';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n FocusButton?: ({\n isFocus,\n setIsFocus,\n }: {\n isFocus: boolean;\n setIsFocus: Dispatch>;\n }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n FocusButton,\n}: ReactScriptPlayerProps) {\n const currentScriptIndex = findCurrentScriptIndex(scripts, currentTime) ?? 0; // \uB3D9\uC601\uC0C1 \uC7AC\uC0DD\uC5D0 \uB3D9\uAE30\uD654\uB418\uB294 script Index\uCC3E\uB294 \uD568\uC218\n\n const handleClickScript = (script: Script, index: number) => {\n onClickScript(script, index);\n };\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n return (\n
\n
\n

Transcript

\n {mode === 'line' ? (\n \n ) : (\n \n )}\n
\n
\n );\n}\n"], - "mappings": ";AACA,IAAM,SAAS;AACf,IAAM,UAAU,EAAC,oBAAmB,6BAA4B,SAAQ,mBAAkB,qBAAoB,+BAA8B,uBAAsB,iCAAgC,sBAAqB,gCAA+B,cAAa,wBAAuB,cAAa,wBAAuB,YAAW,sBAAqB,eAAc,wBAAuB;AACnY,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAoEX,WAAW;AACV,MAAI,OAAO,aAAa,eAAe,CAAC,SAAS,eAAe,MAAM,GAAG;AACvE,QAAI,MAAM,SAAS,cAAc,OAAO;AACxC,QAAI,KAAK;AACT,QAAI,cAAc;AAClB,aAAS,KAAK,YAAY,GAAG;AAAA,EAC/B;AACF,GAAG;AAEH,IAAO,mCAAQ;;;AChFf,SAAS,UAAU,mBAAmB;AAOvB,SAAR,cAAkC;AAAA,EACvC;A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AA,EAChC;AAEA,QAAM,kBAAkB,CAAC,GAAG,OAAO,EAAE,QAAQ;AAC7C,QAAM,QAAQ,gBAAgB;AAAA,IAC5B,CAAC,WACC,OAAO,oBAAoB,kBAAkB,eAC7C,OAAO,oBAAoB,OAAO,mBAAmB,gBACnD;AAAA,EACN;AACA,SAAO,UAAU,KACb,QAAQ,SAAS,IAAI,QACrB;AACN;;;ACoCM,SACE,OAAAC,MADF,QAAAC,aAAA;AAlCC,SAAS,kBAAmD;AAAA,EACjE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA8B;AAjD9B;AAkDE,QAAM,sBAAqB,4BAAuB,SAAS,WAAW,MAA3C,YAAgD;AAE3E,QAAM,oBAAoB,CAAC,QAAmB,UAAkB;AAC9D,kBAAc,QAAQ,KAAK;AAAA,EAC7B;AAEA,QAAM,oBAAoB;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SACE,gBAAAD,KAAC,SAAI,WAAW,iCAAO,kBAAkB,OAAO,EAAE,GAAG,eAAe,GAClE,0BAAAC,MAAC,SAAI,WAAW,iCAAO,kBACrB;AAAA,oBAAAD,KAAC,OAAE,WAAW,iCAAO,OAAO,wBAAU;AAAA,IACrC,SAAS,SACR,gBAAAA,KAAC,YAAU,GAAG,mBAAmB,WAAsB,IAEvD,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ,GACF;AAEJ;", + "sourcesContent": ["\nconst digest = '9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50';\nconst classes = {\"scriptsContainer\":\"_scriptsContainer_1tyea_7\",\"title\":\"_title_1tyea_18\",\"lineViewContainer\":\"_lineViewContainer_1tyea_23\",\"skipButtonContainer\":\"_skipButtonContainer_1tyea_28\",\"blockViewContainer\":\"_blockViewContainer_1tyea_35\",\"scriptItem\":\"_scriptItem_1tyea_42\",\"timeButton\":\"_timeButton_1tyea_47\",\"textView\":\"_textView_1tyea_60\",\"highlighted\":\"_highlighted_1tyea_65\"};\nconst css = `* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n._scriptsContainer_1tyea_7 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n width: 100%;\n height: auto;\n padding: 1.5rem;\n border: 2px solid #ececec;\n border-radius: 0.75rem;\n}\n\n._title_1tyea_18 {\n font-size: 1.25rem;\n font-weight: 700;\n}\n\n._lineViewContainer_1tyea_23 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 {\n align-self: end;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 button {\n cursor: pointer;\n}\n\n._blockViewContainer_1tyea_35 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n height: 16rem;\n overflow-y: auto;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 {\n padding: 16px;\n border-radius: 12px;\n transition: background-color 0.5s ease-in-out;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 ._timeButton_1tyea_47 {\n width: 5rem;\n padding-inline: 0.75rem;\n padding-block: 0.5rem;\n margin-bottom: 0.5rem;\n border: none;\n border-radius: 9999px;\n background-color: gray;\n cursor: pointer;\n font-size: 0.75rem;\n color: white;\n}\n\n._textView_1tyea_60 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n._textView_1tyea_60._highlighted_1tyea_65 {\n background-color: #fef08a;\n}`;\n\n(function() {\n if (typeof document !== \"undefined\" && !document.getElementById(digest)) {\n var ele = document.createElement('style');\n ele.id = digest;\n ele.textContent = css;\n document.head.appendChild(ele);\n }\n})();\n\nexport default classes;\nexport { css, digest, classes };\n ", "import { useState, useCallback } from 'react';\n\ninterface ThrottlingProps {\n buttonClicked: (arg: T) => void;\n delay?: number; // Optional delay prop\n}\n\nexport default function useThrottling({\n buttonClicked,\n delay = 300,\n}: ThrottlingProps) {\n const [isThrottled, setIsThrottled] = useState(false);\n\n const throttledCallback = useCallback(\n (arg: T) => {\n if (!isThrottled) {\n buttonClicked(arg);\n setIsThrottled(true);\n setTimeout(() => {\n setIsThrottled(false);\n }, delay);\n }\n },\n [isThrottled, buttonClicked, delay],\n );\n\n return throttledCallback;\n}\n", "import React from 'react';\nimport { Script, LanguageCode, TextStyle } from '../interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface TextDisplayProps {\n script: Script;\n selectedLanguages: T[];\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n}\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uC801\uC6A9\nexport function TextDisplay({\n script,\n selectedLanguages,\n onSelectWord,\n textStyle,\n}: TextDisplayProps) {\n return (\n \n {selectedLanguages.map((language) => (\n {\n const selection = window.getSelection();\n if (selection && selection.toString()) {\n const selectedWord = selection.toString().trim();\n if (selectedWord) {\n onSelectWord(selectedWord, script, 0);\n }\n }\n }}\n >\n {script[language] || `(${language} \uC790\uB9C9\uC774 \uC5C6\uC5B4\uC694!)`}\n

\n ))}\n \n );\n}\n", "import { Script } from '../interfaces/Scripts';\n\nexport const moveToScriptAtIndex = (\n index: number,\n scripts: Script[],\n seekTo: (timeInSeconds: number) => void,\n) => {\n // \uC720\uD6A8\uD55C \uC778\uB371\uC2A4\uC778\uC9C0 \uD655\uC778\n if (index < 0 || index >= scripts.length - 1) {\n console.warn('Invalid script index:', index);\n return;\n }\n\n // \uC2A4\uD06C\uB9BD\uD2B8 \uC2DC\uC791 \uC2DC\uAC04\uC73C\uB85C \uC774\uB3D9\n console.log('Seeking to:', scripts[index]);\n\n seekTo(scripts[index].startTimeInSecond);\n};\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n // \uC774\uC804 \uCF54\uB4DC\n // const totalScripts = scripts.length;\n\n // const handlePrevious = () => {\n // if (currentScriptIndex > 0) {\n // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond);\n // }\n // console.log(\n // '\uC804\uC73C\uB85C \uC774\uB3D9 ',\n // scripts[currentScriptIndex - 1].startTimeInSecond,\n // );\n // };\n\n // const handleNext = () => {\n // if (currentScriptIndex < totalScripts - 1) {\n // console.log(\n // '\uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9',\n // scripts[currentScriptIndex + 1].startTimeInSecond,\n // );\n // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond);\n // }\n // };\n\n const throttledHandlePrevious = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo),\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo),\n });\n\n // console.log(currentScriptIndex);\n\n return (\n
\n
\n {PrevButton ? (\n throttledHandlePrevious(currentScriptIndex)}\n />\n ) : (\n \n )}\n {NextButton ? (\n throttledHandleNext(currentScriptIndex)} />\n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect, useState } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n FocusButton?: ({\n isFocus,\n setIsFocus,\n }: {\n isFocus: boolean;\n setIsFocus: React.Dispatch>;\n }) => JSX.Element;\n}\n\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n FocusButton,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n const [isFocused, setIsFocused] = useState(true);\n\n useEffect(() => {\n const handleInteraction = () => {\n setIsFocused(false);\n console.log(isFocused + 'isFocused');\n console.log(setIsFocused + 'setIsFocused');\n };\n console.log(isFocused + 'isFocused');\n console.log(setIsFocused + 'setIsFocused');\n\n const container = containerRef.current;\n if (container) {\n container.addEventListener('wheel', handleInteraction);\n container.addEventListener('touchmove', handleInteraction);\n }\n\n return () => {\n if (container) {\n container.removeEventListener('wheel', handleInteraction);\n container.removeEventListener('touchmove', handleInteraction);\n }\n };\n }, [setIsFocused, isFocused]);\n\n useEffect(() => {\n if (containerRef.current && isFocused !== undefined && isFocused) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex, isFocused]);\n\n return (\n
\n {FocusButton && (\n \n )}\n
\n {scripts.map((script, index) => (\n {\n moveToScriptAtIndex(index, scripts, seekTo);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n
\n \n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n", "import React from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { Dispatch, SetStateAction } from 'react';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n FocusButton?: ({\n isFocus,\n setIsFocus,\n }: {\n isFocus: boolean;\n setIsFocus: Dispatch>;\n }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n FocusButton,\n}: ReactScriptPlayerProps) {\n const currentScriptIndex = findCurrentScriptIndex(scripts, currentTime) ?? 0; // \uB3D9\uC601\uC0C1 \uC7AC\uC0DD\uC5D0 \uB3D9\uAE30\uD654\uB418\uB294 script Index\uCC3E\uB294 \uD568\uC218\n\n const handleClickScript = (script: Script, index: number) => {\n onClickScript(script, index);\n };\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n return (\n
\n
\n

Transcript

\n {mode === 'line' ? (\n \n ) : (\n \n )}\n
\n
\n );\n}\n"], + "mappings": ";AACA,IAAM,SAAS;AACf,IAAM,UAAU,EAAC,oBAAmB,6BAA4B,SAAQ,mBAAkB,qBAAoB,+BAA8B,uBAAsB,iCAAgC,sBAAqB,gCAA+B,cAAa,wBAAuB,cAAa,wBAAuB,YAAW,sBAAqB,eAAc,wBAAuB;AACnY,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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rB;AAAA,oBAAAD,KAAC,OAAE,WAAW,iCAAO,OAAO,wBAAU;AAAA,IACrC,SAAS,SACR,gBAAAA,KAAC,YAAU,GAAG,mBAAmB,WAAsB,IAEvD,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ,GACF;AAEJ;", "names": ["jsx", "currentScriptIndex", "useState", "jsx", "jsxs", "useState", "index", "jsx", "jsxs"] } diff --git a/core/src/components/BlockView.tsx b/core/src/components/BlockView.tsx index 5952c5c..f5cadd4 100644 --- a/core/src/components/BlockView.tsx +++ b/core/src/components/BlockView.tsx @@ -35,12 +35,16 @@ export function BlockView({ FocusButton, }: BlockViewProps) { const containerRef = useRef(null); - const [isSubtitleCentered, setIsSubtitleCentered] = useState(true); + const [isFocused, setIsFocused] = useState(true); useEffect(() => { const handleInteraction = () => { - setIsSubtitleCentered(false); + setIsFocused(false); + console.log(isFocused + 'isFocused'); + console.log(setIsFocused + 'setIsFocused'); }; + console.log(isFocused + 'isFocused'); + console.log(setIsFocused + 'setIsFocused'); const container = containerRef.current; if (container) { @@ -54,14 +58,10 @@ export function BlockView({ container.removeEventListener('touchmove', handleInteraction); } }; - }, [setIsSubtitleCentered]); + }, [setIsFocused, isFocused]); useEffect(() => { - if ( - containerRef.current && - isSubtitleCentered !== undefined && - isSubtitleCentered - ) { + if (containerRef.current && isFocused !== undefined && isFocused) { if (currentScriptIndex < containerRef.current.children.length - 1) { const container = containerRef.current; const target = container.children[currentScriptIndex]; @@ -76,15 +76,12 @@ export function BlockView({ }); } } - }, [currentScriptIndex, isSubtitleCentered]); + }, [currentScriptIndex, isFocused]); return (
{FocusButton && ( - + )}
{scripts.map((script, index) => ( From 37effab08a1201b77811d91d12a0486474f3a3b6 Mon Sep 17 00:00:00 2001 From: godhyzzang <109357302+godhyzzang@users.noreply.github.com> Date: Wed, 13 Nov 2024 00:30:00 +0900 Subject: [PATCH 18/18] =?UTF-8?q?fix=20:=20=EB=A0=8C=EB=8D=94=EB=A7=81=20?= =?UTF-8?q?=EB=84=88=EB=AC=B4=20=EC=9E=90=EC=A3=BC=ED=95=B4=EC=99=80?= =?UTF-8?q?=EC=84=9C=20=EB=B2=84=ED=8A=BC=EC=9D=B4=20=EC=95=88=20=EB=88=8C?= =?UTF-8?q?=EB=A0=B8=EB=8D=98=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0=20?= =?UTF-8?q?(#38)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix : script타임 단위인 1초단위로만 progressInterval수정하여 rendering 시간 0.1초에서 1초로 늘림 * fix : 동영상 재생될 때 자연스럽게 자막 보이도록 adjustTime 0.3초로 적절히 조절, extendTime은 0으로 만듦 * fix : 버튼 1초 이내에는 1번만 눌리게 delay시간 눌려서 버튼 여러번 눌렸을 때 버퍼링현상 해결 * comment : 주석 삭제 * chore : dev 후 dist파일 * chore : 변경된 코드 반영된 제대로된 dist파일 --- core/dist/components/BlockView.d.ts.map | 2 +- core/dist/components/LineView.d.ts.map | 2 +- core/dist/components/SwitchButton.d.ts | 7 ------- core/dist/components/SwitchButton.d.ts.map | 1 - core/dist/components/SwithButton.d.ts | 7 ------- core/dist/components/SwithButton.d.ts.map | 1 - core/dist/hooks/useThrottling.d.ts.map | 2 +- core/dist/index.js | 4 ++-- core/dist/index.js.map | 4 ++-- core/src/components/LineView.tsx | 23 ---------------------- core/src/hooks/useThrottling.ts | 2 +- core/src/utils/findCurrentScriptIndex.ts | 4 ++-- demo/src/App.tsx | 2 +- 13 files changed, 11 insertions(+), 50 deletions(-) delete mode 100644 core/dist/components/SwitchButton.d.ts delete mode 100644 core/dist/components/SwitchButton.d.ts.map delete mode 100644 core/dist/components/SwithButton.d.ts delete mode 100644 core/dist/components/SwithButton.d.ts.map diff --git a/core/dist/components/BlockView.d.ts.map b/core/dist/components/BlockView.d.ts.map index f578ea2..f886a6c 100644 --- a/core/dist/components/BlockView.d.ts.map +++ b/core/dist/components/BlockView.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"BlockView.d.ts","sourceRoot":"","sources":["../../src/components/BlockView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAMhF,UAAU,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACtD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,CAAC,EACb,OAAO,EACP,UAAU,GACX,EAAE;QACD,OAAO,EAAE,OAAO,CAAC;QACjB,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;KAC3D,KAAK,GAAG,CAAC,OAAO,CAAC;CACnB;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACzD,OAAO,EACP,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,aAAa,EACb,YAAY,EACZ,SAAS,EACT,SAAS,EACT,WAAW,GACZ,EAAE,cAAc,CAAC,CAAC,CAAC,2CAiGnB"} \ No newline at end of file +{"version":3,"file":"BlockView.d.ts","sourceRoot":"","sources":["../../src/components/BlockView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAMhF,UAAU,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACtD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,CAAC,EACb,OAAO,EACP,UAAU,GACX,EAAE;QACD,OAAO,EAAE,OAAO,CAAC;QACjB,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;KAC3D,KAAK,GAAG,CAAC,OAAO,CAAC;CACnB;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACzD,OAAO,EACP,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,aAAa,EACb,YAAY,EACZ,SAAS,EACT,SAAS,EACT,WAAW,GACZ,EAAE,cAAc,CAAC,CAAC,CAAC,2CA0FnB"} \ No newline at end of file diff --git a/core/dist/components/LineView.d.ts.map b/core/dist/components/LineView.d.ts.map index f30b80d..6f566ba 100644 --- a/core/dist/components/LineView.d.ts.map +++ b/core/dist/components/LineView.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"LineView.d.ts","sourceRoot":"","sources":["../../src/components/LineView.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAQxE,UAAU,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACrD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IACnE,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;CACpE;AAGD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACxD,OAAO,EACP,iBAAiB,EACjB,kBAAkB,EAClB,MAAM,EACN,YAAY,EACZ,SAAS,EACT,UAAU,EACV,UAAU,GACX,EAAE,aAAa,CAAC,CAAC,CAAC,2CAmElB"} \ No newline at end of file +{"version":3,"file":"LineView.d.ts","sourceRoot":"","sources":["../../src/components/LineView.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAQxE,UAAU,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY;IACrD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,iBAAiB,EAAE,CAAC,EAAE,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IACnE,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;CACpE;AAGD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAAE,EACxD,OAAO,EACP,iBAAiB,EACjB,kBAAkB,EAClB,MAAM,EACN,YAAY,EACZ,SAAS,EACT,UAAU,EACV,UAAU,GACX,EAAE,aAAa,CAAC,CAAC,CAAC,2CA4ClB"} \ No newline at end of file diff --git a/core/dist/components/SwitchButton.d.ts b/core/dist/components/SwitchButton.d.ts deleted file mode 100644 index 5290725..0000000 --- a/core/dist/components/SwitchButton.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import React from 'react'; -export interface SwitchButtonProps { - toggle: React.Dispatch>; - isToggle: boolean; -} -export declare function SwitchButton({ toggle, isToggle, }: SwitchButtonProps): JSX.Element; -//# sourceMappingURL=SwitchButton.d.ts.map \ No newline at end of file diff --git a/core/dist/components/SwitchButton.d.ts.map b/core/dist/components/SwitchButton.d.ts.map deleted file mode 100644 index cd13dc5..0000000 --- a/core/dist/components/SwitchButton.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SwitchButton.d.ts","sourceRoot":"","sources":["../../src/components/SwitchButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACtD,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,QAAQ,GACT,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAsBjC"} \ No newline at end of file diff --git a/core/dist/components/SwithButton.d.ts b/core/dist/components/SwithButton.d.ts deleted file mode 100644 index ea9ac15..0000000 --- a/core/dist/components/SwithButton.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import React from 'react'; -export interface SwitchButtonProps { - toggle: React.Dispatch>; - isToggle: boolean; -} -export declare function SwitchButton({ toggle, isToggle, }: SwitchButtonProps): JSX.Element; -//# sourceMappingURL=SwithButton.d.ts.map \ No newline at end of file diff --git a/core/dist/components/SwithButton.d.ts.map b/core/dist/components/SwithButton.d.ts.map deleted file mode 100644 index a875076..0000000 --- a/core/dist/components/SwithButton.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SwithButton.d.ts","sourceRoot":"","sources":["../../src/components/SwithButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACtD,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,QAAQ,GACT,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAwBjC"} \ No newline at end of file diff --git a/core/dist/hooks/useThrottling.d.ts.map b/core/dist/hooks/useThrottling.d.ts.map index e94e95e..9ea7071 100644 --- a/core/dist/hooks/useThrottling.d.ts.map +++ b/core/dist/hooks/useThrottling.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"useThrottling.d.ts","sourceRoot":"","sources":["../../src/hooks/useThrottling.ts"],"names":[],"mappings":"AAEA,UAAU,eAAe,CAAC,CAAC;IACzB,aAAa,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,CAAC,EAAE,EACvC,aAAa,EACb,KAAW,GACZ,EAAE,eAAe,CAAC,CAAC,CAAC,SAIX,CAAC,UAaV"} \ No newline at end of file +{"version":3,"file":"useThrottling.d.ts","sourceRoot":"","sources":["../../src/hooks/useThrottling.ts"],"names":[],"mappings":"AAEA,UAAU,eAAe,CAAC,CAAC;IACzB,aAAa,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,CAAC,EAAE,EACvC,aAAa,EACb,KAAY,GACb,EAAE,eAAe,CAAC,CAAC,CAAC,SAIX,CAAC,UAaV"} \ No newline at end of file diff --git a/core/dist/index.js b/core/dist/index.js index e7c27b5..9f7882e 100644 --- a/core/dist/index.js +++ b/core/dist/index.js @@ -82,7 +82,7 @@ var ReactScriptPlayer_module_default = classes; import { useState, useCallback } from "react"; function useThrottling({ buttonClicked, - delay = 300 + delay = 1e3 }) { const [isThrottled, setIsThrottled] = useState(false); const throttledCallback = useCallback( @@ -297,7 +297,7 @@ function BlockView({ } // src/utils/findCurrentScriptIndex.ts -var findCurrentScriptIndex = (scripts, currentTime, adjustmentTime = 0.05, extendedTime = 0.05) => { +var findCurrentScriptIndex = (scripts, currentTime, adjustmentTime = 0.3, extendedTime = 0) => { if (!scripts || scripts.length === 0) return null; const middleIndex = Math.floor(scripts.length / 2); if (currentTime < scripts[middleIndex].startTimeInSecond) { diff --git a/core/dist/index.js.map b/core/dist/index.js.map index 6ddb9dd..9993107 100644 --- a/core/dist/index.js.map +++ b/core/dist/index.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["esbuild-scss-modules-plugin:./ReactScriptPlayer.module.scss", "../src/hooks/useThrottling.ts", "../src/components/TextDisplay.tsx", "../src/utils/moveToScriptAtIndex.ts", "../src/components/LineView.tsx", "../src/components/BlockView.tsx", "../src/utils/convertTime.ts", "../src/utils/findCurrentScriptIndex.ts", "../src/components/ReactScriptPlayer.tsx"], - "sourcesContent": ["\nconst digest = '9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50';\nconst classes = {\"scriptsContainer\":\"_scriptsContainer_1tyea_7\",\"title\":\"_title_1tyea_18\",\"lineViewContainer\":\"_lineViewContainer_1tyea_23\",\"skipButtonContainer\":\"_skipButtonContainer_1tyea_28\",\"blockViewContainer\":\"_blockViewContainer_1tyea_35\",\"scriptItem\":\"_scriptItem_1tyea_42\",\"timeButton\":\"_timeButton_1tyea_47\",\"textView\":\"_textView_1tyea_60\",\"highlighted\":\"_highlighted_1tyea_65\"};\nconst css = `* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n._scriptsContainer_1tyea_7 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n width: 100%;\n height: auto;\n padding: 1.5rem;\n border: 2px solid #ececec;\n border-radius: 0.75rem;\n}\n\n._title_1tyea_18 {\n font-size: 1.25rem;\n font-weight: 700;\n}\n\n._lineViewContainer_1tyea_23 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 {\n align-self: end;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 button {\n cursor: pointer;\n}\n\n._blockViewContainer_1tyea_35 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n height: 16rem;\n overflow-y: auto;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 {\n padding: 16px;\n border-radius: 12px;\n transition: background-color 0.5s ease-in-out;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 ._timeButton_1tyea_47 {\n width: 5rem;\n padding-inline: 0.75rem;\n padding-block: 0.5rem;\n margin-bottom: 0.5rem;\n border: none;\n border-radius: 9999px;\n background-color: gray;\n cursor: pointer;\n font-size: 0.75rem;\n color: white;\n}\n\n._textView_1tyea_60 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n._textView_1tyea_60._highlighted_1tyea_65 {\n background-color: #fef08a;\n}`;\n\n(function() {\n if (typeof document !== \"undefined\" && !document.getElementById(digest)) {\n var ele = document.createElement('style');\n ele.id = digest;\n ele.textContent = css;\n document.head.appendChild(ele);\n }\n})();\n\nexport default classes;\nexport { css, digest, classes };\n ", "import { useState, useCallback } from 'react';\n\ninterface ThrottlingProps {\n buttonClicked: (arg: T) => void;\n delay?: number; // Optional delay prop\n}\n\nexport default function useThrottling({\n buttonClicked,\n delay = 300,\n}: ThrottlingProps) {\n const [isThrottled, setIsThrottled] = useState(false);\n\n const throttledCallback = useCallback(\n (arg: T) => {\n if (!isThrottled) {\n buttonClicked(arg);\n setIsThrottled(true);\n setTimeout(() => {\n setIsThrottled(false);\n }, delay);\n }\n },\n [isThrottled, buttonClicked, delay],\n );\n\n return throttledCallback;\n}\n", "import React from 'react';\nimport { Script, LanguageCode, TextStyle } from '../interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface TextDisplayProps {\n script: Script;\n selectedLanguages: T[];\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n}\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uC801\uC6A9\nexport function TextDisplay({\n script,\n selectedLanguages,\n onSelectWord,\n textStyle,\n}: TextDisplayProps) {\n return (\n \n {selectedLanguages.map((language) => (\n {\n const selection = window.getSelection();\n if (selection && selection.toString()) {\n const selectedWord = selection.toString().trim();\n if (selectedWord) {\n onSelectWord(selectedWord, script, 0);\n }\n }\n }}\n >\n {script[language] || `(${language} \uC790\uB9C9\uC774 \uC5C6\uC5B4\uC694!)`}\n

\n ))}\n
\n );\n}\n", "import { Script } from '../interfaces/Scripts';\n\nexport const moveToScriptAtIndex = (\n index: number,\n scripts: Script[],\n seekTo: (timeInSeconds: number) => void,\n) => {\n // \uC720\uD6A8\uD55C \uC778\uB371\uC2A4\uC778\uC9C0 \uD655\uC778\n if (index < 0 || index >= scripts.length - 1) {\n console.warn('Invalid script index:', index);\n return;\n }\n\n // \uC2A4\uD06C\uB9BD\uD2B8 \uC2DC\uC791 \uC2DC\uAC04\uC73C\uB85C \uC774\uB3D9\n console.log('Seeking to:', scripts[index]);\n\n seekTo(scripts[index].startTimeInSecond);\n};\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n // \uC774\uC804 \uCF54\uB4DC\n // const totalScripts = scripts.length;\n\n // const handlePrevious = () => {\n // if (currentScriptIndex > 0) {\n // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond);\n // }\n // console.log(\n // '\uC804\uC73C\uB85C \uC774\uB3D9 ',\n // scripts[currentScriptIndex - 1].startTimeInSecond,\n // );\n // };\n\n // const handleNext = () => {\n // if (currentScriptIndex < totalScripts - 1) {\n // console.log(\n // '\uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9',\n // scripts[currentScriptIndex + 1].startTimeInSecond,\n // );\n // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond);\n // }\n // };\n\n const throttledHandlePrevious = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo),\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo),\n });\n\n // console.log(currentScriptIndex);\n\n return (\n
\n
\n {PrevButton ? (\n throttledHandlePrevious(currentScriptIndex)}\n />\n ) : (\n \n )}\n {NextButton ? (\n throttledHandleNext(currentScriptIndex)} />\n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect, useState } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n FocusButton?: ({\n isFocus,\n setIsFocus,\n }: {\n isFocus: boolean;\n setIsFocus: React.Dispatch>;\n }) => JSX.Element;\n}\n\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n FocusButton,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n const [isFocused, setIsFocused] = useState(true);\n\n useEffect(() => {\n const handleInteraction = () => {\n setIsFocused(false);\n console.log(isFocused + 'isFocused');\n console.log(setIsFocused + 'setIsFocused');\n };\n console.log(isFocused + 'isFocused');\n console.log(setIsFocused + 'setIsFocused');\n\n const container = containerRef.current;\n if (container) {\n container.addEventListener('wheel', handleInteraction);\n container.addEventListener('touchmove', handleInteraction);\n }\n\n return () => {\n if (container) {\n container.removeEventListener('wheel', handleInteraction);\n container.removeEventListener('touchmove', handleInteraction);\n }\n };\n }, [setIsFocused, isFocused]);\n\n useEffect(() => {\n if (containerRef.current && isFocused !== undefined && isFocused) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex, isFocused]);\n\n return (\n
\n {FocusButton && (\n \n )}\n
\n {scripts.map((script, index) => (\n {\n moveToScriptAtIndex(index, scripts, seekTo);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n
\n
\n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0.05, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n", "import React from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { Dispatch, SetStateAction } from 'react';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n FocusButton?: ({\n isFocus,\n setIsFocus,\n }: {\n isFocus: boolean;\n setIsFocus: Dispatch>;\n }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n FocusButton,\n}: ReactScriptPlayerProps) {\n const currentScriptIndex = findCurrentScriptIndex(scripts, currentTime) ?? 0; // \uB3D9\uC601\uC0C1 \uC7AC\uC0DD\uC5D0 \uB3D9\uAE30\uD654\uB418\uB294 script Index\uCC3E\uB294 \uD568\uC218\n\n const handleClickScript = (script: Script, index: number) => {\n onClickScript(script, index);\n };\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n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AAA,EACN;AACA,SAAO,UAAU,KACb,QAAQ,SAAS,IAAI,QACrB;AACN;;;ACoCM,SACE,OAAAC,MADF,QAAAC,aAAA;AAlCC,SAAS,kBAAmD;AAAA,EACjE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA8B;AAjD9B;AAkDE,QAAM,sBAAqB,4BAAuB,SAAS,WAAW,MAA3C,YAAgD;AAE3E,QAAM,oBAAoB,CAAC,QAAmB,UAAkB;AAC9D,kBAAc,QAAQ,KAAK;AAAA,EAC7B;AAEA,QAAM,oBAAoB;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SACE,gBAAAD,KAAC,SAAI,WAAW,iCAAO,kBAAkB,OAAO,EAAE,GAAG,eAAe,GAClE,0BAAAC,MAAC,SAAI,WAAW,iCAAO,kBACrB;AAAA,oBAAAD,KAAC,OAAE,WAAW,iCAAO,OAAO,wBAAU;AAAA,IACrC,SAAS,SACR,gBAAAA,KAAC,YAAU,GAAG,mBAAmB,WAAsB,IAEvD,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ,GACF;AAEJ;", + "sourcesContent": ["\nconst digest = '9b88b24bc5ba973e3b88f2c5f7446f6da86e199e8003f6a24f080d5601160c50';\nconst classes = {\"scriptsContainer\":\"_scriptsContainer_1tyea_7\",\"title\":\"_title_1tyea_18\",\"lineViewContainer\":\"_lineViewContainer_1tyea_23\",\"skipButtonContainer\":\"_skipButtonContainer_1tyea_28\",\"blockViewContainer\":\"_blockViewContainer_1tyea_35\",\"scriptItem\":\"_scriptItem_1tyea_42\",\"timeButton\":\"_timeButton_1tyea_47\",\"textView\":\"_textView_1tyea_60\",\"highlighted\":\"_highlighted_1tyea_65\"};\nconst css = `* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n._scriptsContainer_1tyea_7 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n width: 100%;\n height: auto;\n padding: 1.5rem;\n border: 2px solid #ececec;\n border-radius: 0.75rem;\n}\n\n._title_1tyea_18 {\n font-size: 1.25rem;\n font-weight: 700;\n}\n\n._lineViewContainer_1tyea_23 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 {\n align-self: end;\n}\n._lineViewContainer_1tyea_23 ._skipButtonContainer_1tyea_28 button {\n cursor: pointer;\n}\n\n._blockViewContainer_1tyea_35 {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n height: 16rem;\n overflow-y: auto;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 {\n padding: 16px;\n border-radius: 12px;\n transition: background-color 0.5s ease-in-out;\n}\n._blockViewContainer_1tyea_35 ._scriptItem_1tyea_42 ._timeButton_1tyea_47 {\n width: 5rem;\n padding-inline: 0.75rem;\n padding-block: 0.5rem;\n margin-bottom: 0.5rem;\n border: none;\n border-radius: 9999px;\n background-color: gray;\n cursor: pointer;\n font-size: 0.75rem;\n color: white;\n}\n\n._textView_1tyea_60 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n._textView_1tyea_60._highlighted_1tyea_65 {\n background-color: #fef08a;\n}`;\n\n(function() {\n if (typeof document !== \"undefined\" && !document.getElementById(digest)) {\n var ele = document.createElement('style');\n ele.id = digest;\n ele.textContent = css;\n document.head.appendChild(ele);\n }\n})();\n\nexport default classes;\nexport { css, digest, classes };\n ", "import { useState, useCallback } from 'react';\n\ninterface ThrottlingProps {\n buttonClicked: (arg: T) => void;\n delay?: number; // Optional delay prop\n}\n\nexport default function useThrottling({\n buttonClicked,\n delay = 1000,\n}: ThrottlingProps) {\n const [isThrottled, setIsThrottled] = useState(false);\n\n const throttledCallback = useCallback(\n (arg: T) => {\n if (!isThrottled) {\n buttonClicked(arg);\n setIsThrottled(true);\n setTimeout(() => {\n setIsThrottled(false);\n }, delay);\n }\n },\n [isThrottled, buttonClicked, delay],\n );\n\n return throttledCallback;\n}\n", "import React from 'react';\nimport { Script, LanguageCode, TextStyle } from '../interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface TextDisplayProps {\n script: Script;\n selectedLanguages: T[];\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n}\n\n// TextDisplay\uC5D0 \uC81C\uB124\uB9AD T \uC801\uC6A9\nexport function TextDisplay({\n script,\n selectedLanguages,\n onSelectWord,\n textStyle,\n}: TextDisplayProps) {\n return (\n \n {selectedLanguages.map((language) => (\n {\n const selection = window.getSelection();\n if (selection && selection.toString()) {\n const selectedWord = selection.toString().trim();\n if (selectedWord) {\n onSelectWord(selectedWord, script, 0);\n }\n }\n }}\n >\n {script[language] || `(${language} \uC790\uB9C9\uC774 \uC5C6\uC5B4\uC694!)`}\n

\n ))}\n \n );\n}\n", "import { Script } from '../interfaces/Scripts';\n\nexport const moveToScriptAtIndex = (\n index: number,\n scripts: Script[],\n seekTo: (timeInSeconds: number) => void,\n) => {\n // \uC720\uD6A8\uD55C \uC778\uB371\uC2A4\uC778\uC9C0 \uD655\uC778\n if (index < 0 || index >= scripts.length - 1) {\n console.warn('Invalid script index:', index);\n return;\n }\n\n // \uC2A4\uD06C\uB9BD\uD2B8 \uC2DC\uC791 \uC2DC\uAC04\uC73C\uB85C \uC774\uB3D9\n console.log('Seeking to:', scripts[index]);\n\n seekTo(scripts[index].startTimeInSecond);\n};\n", "import React from 'react';\nimport { LanguageCode, Script, TextStyle } from '../interfaces/Scripts';\nimport useThrottling from 'hooks/useThrottling';\nimport arrow_back from '../assets/icons/arrow_back.svg';\nimport arrow_forward from '../assets/icons/arrow_forward.svg';\nimport { TextDisplay } from './TextDisplay';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n// LineView\uC5D0 \uC81C\uB124\uB9AD T \uCD94\uAC00\ninterface LineViewProps {\n scripts: Script[];\n selectedLanguages: T[];\n currentScriptIndex: number;\n seekTo: (timeInSeconds: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n textStyle?: TextStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n}\n\n// LineView \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC81C\uB124\uB9AD T\uB97C \uC801\uC6A9\nexport function LineView({\n scripts,\n selectedLanguages,\n currentScriptIndex,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n}: LineViewProps) {\n const throttledHandlePrevious = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo),\n });\n const throttledHandleNext = useThrottling({\n buttonClicked: (currentScriptIndex: number) =>\n moveToScriptAtIndex(currentScriptIndex + 1, scripts, seekTo),\n });\n\n // console.log(currentScriptIndex);\n\n return (\n
\n
\n {PrevButton ? (\n throttledHandlePrevious(currentScriptIndex)}\n />\n ) : (\n \n )}\n {NextButton ? (\n throttledHandleNext(currentScriptIndex)} />\n ) : (\n \n )}\n
\n\n {/* TextDisplay\uC5D0\uC11C \uD604\uC7AC \uC790\uB9C9\uACFC \uC120\uD0DD\uB41C \uC5B8\uC5B4\uB97C \uD45C\uC2DC */}\n {scripts[currentScriptIndex] && (\n \n )}\n
\n );\n}\n", "import React, { useRef, useEffect, useState } from 'react';\nimport { LanguageCode, Script, TimeStyle, TextStyle } from 'interfaces/Scripts';\nimport styles from './ReactScriptPlayer.module.scss';\nimport { convertTime } from 'utils/convertTime';\nimport { TextDisplay } from './TextDisplay';\nimport { moveToScriptAtIndex } from '../utils/moveToScriptAtIndex';\n\ninterface BlockViewProps {\n scripts: Script[];\n currentScriptIndex: number;\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n timeStyle?: TimeStyle;\n textStyle?: TextStyle;\n FocusButton?: ({\n isFocus,\n setIsFocus,\n }: {\n isFocus: boolean;\n setIsFocus: React.Dispatch>;\n }) => JSX.Element;\n}\n\nexport function BlockView({\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onClickScript,\n onSelectWord,\n timeStyle,\n textStyle,\n FocusButton,\n}: BlockViewProps) {\n const containerRef = useRef(null);\n const [isFocused, setIsFocused] = useState(true);\n\n useEffect(() => {\n const handleInteraction = () => {\n setIsFocused(false);\n console.log(isFocused + 'isFocused');\n console.log(setIsFocused + 'setIsFocused');\n };\n console.log(isFocused + 'isFocused');\n console.log(setIsFocused + 'setIsFocused');\n\n const container = containerRef.current;\n if (container) {\n container.addEventListener('wheel', handleInteraction);\n container.addEventListener('touchmove', handleInteraction);\n }\n\n return () => {\n if (container) {\n container.removeEventListener('wheel', handleInteraction);\n container.removeEventListener('touchmove', handleInteraction);\n }\n };\n }, [setIsFocused, isFocused]);\n\n useEffect(() => {\n if (containerRef.current && isFocused !== undefined && isFocused) {\n if (currentScriptIndex < containerRef.current.children.length - 1) {\n const container = containerRef.current;\n const target = container.children[currentScriptIndex];\n // \uCEE8\uD14C\uC774\uB108\uC758 \uC0C1\uB2E8\uC5D0\uC11C\uBD80\uD130 \uD0C0\uAC9F\uAE4C\uC9C0\uC758 \uAC70\uB9AC \uACC4\uC0B0\n const targetTop = target.getBoundingClientRect().top;\n const containerTop = container.getBoundingClientRect().top;\n const relativeTop = targetTop - containerTop;\n\n container.scrollBy({\n top: relativeTop - 20,\n behavior: 'smooth',\n });\n }\n }\n }, [currentScriptIndex, isFocused]);\n\n return (\n
\n {FocusButton && (\n \n )}\n
\n {scripts.map((script, index) => (\n {\n moveToScriptAtIndex(index, scripts, seekTo);\n onClickScript(script, index);\n }}\n style={{\n backgroundColor:\n index === currentScriptIndex\n ? textStyle?.activeColor || 'lightgray'\n : 'transparent',\n }}\n >\n \n {convertTime(script.startTimeInSecond)}\n \n\n \n
\n ))}\n
\n \n );\n}\n", "export function convertTime(seconds: number) {\n // \uBD84\uACFC \uCD08\uB85C \uB098\uB214\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n // \uB450 \uC790\uB9BF\uC218\uB85C \uB9DE\uCD94\uAE30\n const paddedMinutes = String(minutes).padStart(2, '0');\n const paddedSeconds = String(remainingSeconds).padStart(2, '0');\n\n return `${paddedMinutes}:${paddedSeconds}`;\n}\n", "import { Script } from 'interfaces/Scripts';\n\nexport const findCurrentScriptIndex = (\n scripts: Script[] | undefined,\n currentTime: number,\n adjustmentTime: number = 0.3, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uC77C\uCC0D \uD45C\uC2DC\n extendedTime: number = 0, // \uC790\uB9C9\uC744 \uC57D\uAC04 \uB2A6\uAC8C \uC885\uB8CC\n): number | null => {\n if (!scripts || scripts.length === 0) return null;\n\n const middleIndex = Math.floor(scripts.length / 2);\n\n if (currentTime < scripts[middleIndex].startTimeInSecond) {\n // \uC55E\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uC21C\uCC28\uC801\uC73C\uB85C)\n const index = scripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1 ? index : null;\n }\n // \uB4B7\uBD80\uBD84 \uC790\uB9C9 \uD0D0\uC0C9 (\uB4A4\uC5D0\uC11C\uBD80\uD130)\n const reversedScripts = [...scripts].reverse();\n const index = reversedScripts.findIndex(\n (script) =>\n script.startTimeInSecond - adjustmentTime <= currentTime &&\n script.startTimeInSecond + script.durationInSecond + extendedTime >=\n currentTime,\n );\n return index !== -1\n ? scripts.length - 1 - index // \uC6D0\uB798 \uBC30\uC5F4 \uAE30\uC900 \uC778\uB371\uC2A4 \uBC18\uD658\n : null;\n};\n", "import React from 'react';\nimport styles from './ReactScriptPlayer.module.scss';\nimport {\n LanguageCode,\n Script,\n ContainerStyle,\n TextStyle,\n TimeStyle,\n} from '../interfaces/Scripts';\nimport { Dispatch, SetStateAction } from 'react';\nimport { LineView } from './LineView';\nimport { BlockView } from './BlockView';\nimport { findCurrentScriptIndex } from 'utils/findCurrentScriptIndex';\nexport interface ReactScriptPlayerProps {\n mode: 'line' | 'block';\n scripts: Script[];\n selectedLanguages: T[];\n seekTo: (timeInSeconds: number) => void;\n currentTime: number;\n onClickScript: (script: Script, index: number) => void;\n onSelectWord: (word: string, script: Script, index: number) => void;\n containerStyle?: ContainerStyle;\n textStyle?: TextStyle;\n timeStyle?: TimeStyle;\n PrevButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n NextButton?: ({ onClick }: { onClick: () => void }) => JSX.Element;\n FocusButton?: ({\n isFocus,\n setIsFocus,\n }: {\n isFocus: boolean;\n setIsFocus: Dispatch>;\n }) => JSX.Element;\n}\n\nexport function ReactScriptPlayer({\n mode,\n scripts,\n selectedLanguages,\n seekTo,\n currentTime,\n onClickScript,\n onSelectWord,\n containerStyle,\n textStyle,\n timeStyle,\n PrevButton,\n NextButton,\n FocusButton,\n}: ReactScriptPlayerProps) {\n const currentScriptIndex = findCurrentScriptIndex(scripts, currentTime) ?? 0; // \uB3D9\uC601\uC0C1 \uC7AC\uC0DD\uC5D0 \uB3D9\uAE30\uD654\uB418\uB294 script Index\uCC3E\uB294 \uD568\uC218\n\n const handleClickScript = (script: Script, index: number) => {\n onClickScript(script, index);\n };\n\n const scriptPlayerProps = {\n scripts,\n currentScriptIndex,\n selectedLanguages,\n seekTo,\n onSelectWord,\n textStyle,\n PrevButton,\n NextButton,\n };\n\n return (\n
\n
\n

Transcript

\n {m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KACb,QAAQ,SAAS,IAAI,QACrB;AACN;;;ACoCM,SACE,OAAAC,MADF,QAAAC,aAAA;AAlCC,SAAS,kBAAmD;AAAA,EACjE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA8B;AAjD9B;AAkDE,QAAM,sBAAqB,4BAAuB,SAAS,WAAW,MAA3C,YAAgD;AAE3E,QAAM,oBAAoB,CAAC,QAAmB,UAAkB;AAC9D,kBAAc,QAAQ,KAAK;AAAA,EAC7B;AAEA,QAAM,oBAAoB;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SACE,gBAAAD,KAAC,SAAI,WAAW,iCAAO,kBAAkB,OAAO,EAAE,GAAG,eAAe,GAClE,0BAAAC,MAAC,SAAI,WAAW,iCAAO,kBACrB;AAAA,oBAAAD,KAAC,OAAE,WAAW,iCAAO,OAAO,wBAAU;AAAA,IACrC,SAAS,SACR,gBAAAA,KAAC,YAAU,GAAG,mBAAmB,WAAsB,IAEvD,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ,GACF;AAEJ;", "names": ["jsx", "currentScriptIndex", "useState", "jsx", "jsxs", "useState", "index", "jsx", "jsxs"] } diff --git a/core/src/components/LineView.tsx b/core/src/components/LineView.tsx index f6a2d5f..1736d4b 100644 --- a/core/src/components/LineView.tsx +++ b/core/src/components/LineView.tsx @@ -29,29 +29,6 @@ export function LineView({ PrevButton, NextButton, }: LineViewProps) { - // 이전 코드 - // const totalScripts = scripts.length; - - // const handlePrevious = () => { - // if (currentScriptIndex > 0) { - // seekTo(scripts[currentScriptIndex - 1].startTimeInSecond); - // } - // console.log( - // '전으로 이동 ', - // scripts[currentScriptIndex - 1].startTimeInSecond, - // ); - // }; - - // const handleNext = () => { - // if (currentScriptIndex < totalScripts - 1) { - // console.log( - // '다음으로 이동', - // scripts[currentScriptIndex + 1].startTimeInSecond, - // ); - // seekTo(scripts[currentScriptIndex + 1].startTimeInSecond); - // } - // }; - const throttledHandlePrevious = useThrottling({ buttonClicked: (currentScriptIndex: number) => moveToScriptAtIndex(currentScriptIndex - 1, scripts, seekTo), diff --git a/core/src/hooks/useThrottling.ts b/core/src/hooks/useThrottling.ts index bfd2661..367e8fb 100644 --- a/core/src/hooks/useThrottling.ts +++ b/core/src/hooks/useThrottling.ts @@ -7,7 +7,7 @@ interface ThrottlingProps { export default function useThrottling({ buttonClicked, - delay = 300, + delay = 1000, }: ThrottlingProps) { const [isThrottled, setIsThrottled] = useState(false); diff --git a/core/src/utils/findCurrentScriptIndex.ts b/core/src/utils/findCurrentScriptIndex.ts index 3aacfa1..38eca8a 100644 --- a/core/src/utils/findCurrentScriptIndex.ts +++ b/core/src/utils/findCurrentScriptIndex.ts @@ -3,8 +3,8 @@ import { Script } from 'interfaces/Scripts'; export const findCurrentScriptIndex = ( scripts: Script[] | undefined, currentTime: number, - adjustmentTime: number = 0.05, // 자막을 약간 일찍 표시 - extendedTime: number = 0.05, // 자막을 약간 늦게 종료 + adjustmentTime: number = 0.3, // 자막을 약간 일찍 표시 + extendedTime: number = 0, // 자막을 약간 늦게 종료 ): number | null => { if (!scripts || scripts.length === 0) return null; diff --git a/demo/src/App.tsx b/demo/src/App.tsx index 3ab1c19..03c130e 100644 --- a/demo/src/App.tsx +++ b/demo/src/App.tsx @@ -106,7 +106,7 @@ function App() { volume={volume} controls={false} playbackRate={playbackRate} - progressInterval={100} + progressInterval={1000} />