From b10edd3de909cf8774ffe0e1e82754f68c365703 Mon Sep 17 00:00:00 2001 From: Vaivaswat Date: Fri, 21 Mar 2025 19:35:46 +0530 Subject: [PATCH 1/7] Adding Visual Test Report in Github Actions --- .github/workflows/ci-test.yml | 10 + .gitignore | 4 +- test/unit/visual/visual-report.js | 427 ++++++++++++++++++++++++++++++ test/unit/visual/visualTest.js | 3 + 4 files changed, 443 insertions(+), 1 deletion(-) create mode 100644 test/unit/visual/visual-report.js diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index bd3ca55ba0..d38a09b64f 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -27,6 +27,16 @@ jobs: run: npm test env: CI: true + - name: Generate Visual Test Report + run: node test/unit/visual/generate-visual-report.js + env: + CI: true + - name: Upload Visual Test Report + uses: actions/upload-artifact@v3 + with: + name: visual-test-report + path: test/unit/visual/visual-report.html + retention-days: 14 - name: report test coverage run: bash <(curl -s https://codecov.io/bash) -f coverage/coverage-final.json env: diff --git a/.gitignore b/.gitignore index 6d6bb7e175..1504e8b5a4 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,6 @@ yarn.lock docs/data.json analyzer/ preview/ -__screenshots__/ \ No newline at end of file +__screenshots__/ +actual-screenshots/ +visual-report.html \ No newline at end of file diff --git a/test/unit/visual/visual-report.js b/test/unit/visual/visual-report.js new file mode 100644 index 0000000000..1989c0b72a --- /dev/null +++ b/test/unit/visual/visual-report.js @@ -0,0 +1,427 @@ +const fs = require('fs'); +const path = require('path'); + +async function generateVisualReport() { + const expectedDir = path.join(process.cwd(), 'test/unit/visual/screenshots'); + const actualDir = path.join(process.cwd(), 'test/unit/visual/actual-screenshots'); + const outputFile = path.join(process.cwd(), 'test/unit/visual/visual-report.html'); + + // Make sure the output directory exists + const outputDir = path.dirname(outputFile); + if (!fs.existsSync(outputDir)) { + fs.mkdirSync(outputDir, { recursive: true }); + } + + // Function to read image file and convert to data URL + function imageToDataURL(filePath) { + try { + const data = fs.readFileSync(filePath); + const base64 = data.toString('base64'); + return `data:image/png;base64,${base64}`; + } catch (error) { + console.error(`Failed to read image: ${filePath}`, error); + return null; + } + } + + // Create a lookup map for actual screenshots + function createActualScreenshotMap() { + const actualMap = new Map(); + if (!fs.existsSync(actualDir)) { + console.warn(`Actual screenshots directory does not exist: ${actualDir}`); + return actualMap; + } + + const files = fs.readdirSync(actualDir); + for (const file of files) { + if (file.endsWith('.png') && !file.endsWith('-diff.png')) { + actualMap.set(file, path.join(actualDir, file)); + } + } + + return actualMap; + } + + const actualScreenshotMap = createActualScreenshotMap(); + + // Recursively find all test cases + function findTestCases(dir, prefix = '') { + const testCases = []; + + if (!fs.existsSync(path.join(dir, prefix))) { + console.warn(`Directory does not exist: ${path.join(dir, prefix)}`); + return testCases; + } + + const entries = fs.readdirSync(path.join(dir, prefix), { withFileTypes: true }); + + for (const entry of entries) { + const fullPath = path.join(prefix, entry.name); + + if (entry.isDirectory()) { + // Recursively search subdirectories + testCases.push(...findTestCases(dir, fullPath)); + } else if (entry.name === 'metadata.json') { + // Found a test case + const metadataPath = path.join(dir, fullPath); + let metadata; + + try { + metadata = JSON.parse(fs.readFileSync(metadataPath, 'utf8')); + } catch (error) { + console.error(`Failed to read metadata: ${metadataPath}`, error); + continue; + } + + const testDir = path.dirname(fullPath); + + const test = { + name: testDir, + numScreenshots: metadata.numScreenshots || 0, + screenshots: [] + }; + + // Create flattened name for lookup + const flattenedName = testDir.replace(/\//g, '-'); + + // Collect all screenshots for this test + for (let i = 0; i < test.numScreenshots; i++) { + const screenshotName = i.toString().padStart(3, '0') + '.png'; + const expectedPath = path.join(dir, testDir, screenshotName); + + // Use flattened name for actual screenshots + const actualScreenshotName = `${flattenedName}-${i.toString().padStart(3, '0')}.png`; + const actualPath = actualScreenshotMap.get(actualScreenshotName) || null; + + // Use flattened name for diff image + const diffScreenshotName = `${flattenedName}-${i.toString().padStart(3, '0')}-diff.png`; + const diffPath = path.join(actualDir, diffScreenshotName); + + const hasExpected = fs.existsSync(expectedPath); + const hasActual = actualPath && fs.existsSync(actualPath); + const hasDiff = fs.existsSync(diffPath); + + const screenshot = { + index: i, + expectedImage: hasExpected ? imageToDataURL(expectedPath) : null, + actualImage: hasActual ? imageToDataURL(actualPath) : null, + diffImage: hasDiff ? imageToDataURL(diffPath) : null, + passed: hasExpected && hasActual && !hasDiff + }; + + test.screenshots.push(screenshot); + } + + // Don't add tests with no screenshots + if (test.screenshots.length > 0) { + testCases.push(test); + } + } + } + + return testCases; + } + + // Find all test cases from the expected directory + const testCases = findTestCases(expectedDir); + + if (testCases.length === 0) { + console.warn('No test cases found. Check if the expected directory is correct.'); + } + + // Count passed/failed tests and screenshots + const totalTests = testCases.length; + let passedTests = 0; + let totalScreenshots = 0; + let passedScreenshots = 0; + + for (const test of testCases) { + const testPassed = test.screenshots.every(screenshot => screenshot.passed); + if (testPassed) passedTests++; + + totalScreenshots += test.screenshots.length; + passedScreenshots += test.screenshots.filter(s => s.passed).length; + } + + // Generate HTML + const html = ` + + + + + + p5.js Visual Test Results + + + +
+

p5.js Visual Test Results

+
+ + + +
+
+ +
+

Summary

+

+ Total Tests: ${totalTests}
+ Passed Tests: ${passedTests} (${totalTests > 0 ? Math.round(passedTests/totalTests*100) : 0}%)
+ Failed Tests: ${totalTests - passedTests} (${totalTests > 0 ? Math.round((totalTests-passedTests)/totalTests*100) : 0}%)
+ Total Screenshots: ${totalScreenshots}
+ Passed Screenshots: ${passedScreenshots} (${totalScreenshots > 0 ? Math.round(passedScreenshots/totalScreenshots*100) : 0}%)
+ Report Generated: ${new Date().toLocaleString()} +

+
+ +
+ ${testCases.map(test => { + const passed = test.screenshots.every(s => s.passed); + return ` +
+
+ ${test.name} + ${passed ? 'PASS' : 'FAIL'} +
+
+ ${test.screenshots.map(screenshot => ` +
+
+ Screenshot #${screenshot.index + 1} + + ${screenshot.passed ? 'PASS' : 'FAIL'} + +
+
+
+
Expected
+ ${screenshot.expectedImage ? + `Expected Result` : + `
No expected image found
`} +
+
+
Actual
+ ${screenshot.actualImage ? + `Actual Result` : + `
No actual image found
`} +
+ ${screenshot.diffImage ? ` +
+
Diff
+ Difference +
+ ` : ''} +
+
+ `).join('')} +
+
+ `; + }).join('')} +
+ + + + + `; + + // Write HTML to file + fs.writeFileSync(outputFile, html); + console.log(`Visual test report generated: ${outputFile}`); + + return { + totalTests, + passedTests, + failedTests: totalTests - passedTests, + totalScreenshots, + passedScreenshots, + failedScreenshots: totalScreenshots - passedScreenshots, + reportPath: outputFile + }; +} + +// Run the function if this script is executed directly +if (require.main === module) { + generateVisualReport().catch(error => { + console.error('Failed to generate report:', error); + process.exit(1); + }); +} + +module.exports = { generateVisualReport }; \ No newline at end of file diff --git a/test/unit/visual/visualTest.js b/test/unit/visual/visualTest.js index 120ce79565..236110f20c 100644 --- a/test/unit/visual/visualTest.js +++ b/test/unit/visual/visualTest.js @@ -441,6 +441,8 @@ export function visualTest( : []; for (let i = 0; i < actual.length; i++) { + const flatName = name.replace(/\//g, '-'); + const actualFilename = `../actual-screenshots/${flatName}-${i.toString().padStart(3, '0')}.png`; if (expected[i]) { const result = await checkMatch(actual[i], expected[i], myp5); if (!result.ok) { @@ -453,6 +455,7 @@ export function visualTest( } else { writeImageFile(expectedFilenames[i], toBase64(actual[i])); } + writeImageFile(actualFilename, toBase64(actual[i])); } }); }); From 8679a7aff4deb75bdeff12733db2c735fa7c213d Mon Sep 17 00:00:00 2001 From: Vaivaswat Date: Fri, 21 Mar 2025 20:01:51 +0530 Subject: [PATCH 2/7] Updated file name and upload-artifact version --- .github/workflows/ci-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index d38a09b64f..dee848d10a 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -28,11 +28,11 @@ jobs: env: CI: true - name: Generate Visual Test Report - run: node test/unit/visual/generate-visual-report.js + run: node test/unit/visual/visual-report.js env: CI: true - name: Upload Visual Test Report - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: visual-test-report path: test/unit/visual/visual-report.html From 4a674e3fad1f232a159f8f2bb45749e90c5218a4 Mon Sep 17 00:00:00 2001 From: Vaivaswat Date: Fri, 21 Mar 2025 20:30:43 +0530 Subject: [PATCH 3/7] moved the script from test folder to root --- .github/workflows/ci-test.yml | 2 +- test/unit/visual/visual-report.js => visual-report.js | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename test/unit/visual/visual-report.js => visual-report.js (100%) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index dee848d10a..58c9740882 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -28,7 +28,7 @@ jobs: env: CI: true - name: Generate Visual Test Report - run: node test/unit/visual/visual-report.js + run: node visual-report.js env: CI: true - name: Upload Visual Test Report diff --git a/test/unit/visual/visual-report.js b/visual-report.js similarity index 100% rename from test/unit/visual/visual-report.js rename to visual-report.js From a229893fe75f3356662423c72dbddb114f92804b Mon Sep 17 00:00:00 2001 From: Vaivaswat Date: Wed, 21 May 2025 02:12:14 +0530 Subject: [PATCH 4/7] report genration fixes and actual-screenshot fixes --- .github/workflows/ci-test.yml | 8 ++++++++ test/unit/visual/cases/typography.js | 12 ++++++++++++ .../2d mode/intentionally failing test/000.png | Bin 0 -> 965 bytes .../intentionally failing test/metadata.json | 3 +++ .../webgl mode/intentionally failing test/000.png | Bin 0 -> 965 bytes .../intentionally failing test/metadata.json | 3 +++ test/unit/visual/visualTest.js | 6 +++++- 7 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 test/unit/visual/screenshots/Typography/textAlign/2d mode/intentionally failing test/000.png create mode 100644 test/unit/visual/screenshots/Typography/textAlign/2d mode/intentionally failing test/metadata.json create mode 100644 test/unit/visual/screenshots/Typography/textAlign/webgl mode/intentionally failing test/000.png create mode 100644 test/unit/visual/screenshots/Typography/textAlign/webgl mode/intentionally failing test/metadata.json diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 58c9740882..8aade18738 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -24,20 +24,28 @@ jobs: env: CI: true - name: build and test + id: test run: npm test + continue-on-error: true env: CI: true - name: Generate Visual Test Report + if: always() run: node visual-report.js env: CI: true - name: Upload Visual Test Report + if: always() uses: actions/upload-artifact@v4 with: name: visual-test-report path: test/unit/visual/visual-report.html retention-days: 14 - name: report test coverage + if: steps.test.outcome == 'success' run: bash <(curl -s https://codecov.io/bash) -f coverage/coverage-final.json env: CI: true + - name: fail job if tests failed + if: steps.test.outcome != 'success' + run: exit 1 \ No newline at end of file diff --git a/test/unit/visual/cases/typography.js b/test/unit/visual/cases/typography.js index 46fbab5777..dff725c48c 100644 --- a/test/unit/visual/cases/typography.js +++ b/test/unit/visual/cases/typography.js @@ -385,6 +385,18 @@ visualSuite("Typography", function () { }); } ); + visualTest("intentionally failing test", function (p5, screenshot) { + p5.createCanvas(100, 100); + p5.background(255); + // initially put a red circle for storing in screenshots + p5.fill(255, 0, 0); // Red fill + p5.noStroke(); + + // Then change circle to rect to make it fail + p5.rect(30, 30, 40, 40); + + screenshot(); + }); }); } }); diff --git a/test/unit/visual/screenshots/Typography/textAlign/2d mode/intentionally failing test/000.png b/test/unit/visual/screenshots/Typography/textAlign/2d mode/intentionally failing test/000.png new file mode 100644 index 0000000000000000000000000000000000000000..57a75785d13b332570cd37f5d983e57fcc19df18 GIT binary patch literal 965 zcmeAS@N?(olHy`uVBq!ia0vp^DImV6OLcaSW-5 zdppP5$T?A<)nClfFrC%M*6hJX)>cODgd+`t+zAbvSo?V^d?Fc(yIfsLAB8FI^lY!* z?SJLuj^f{cp6|Z<{rr4Csk3RDIrnDBWN>isc25&veE3LFA;pHp#o>mG!sW&39SsvK z9n{=Kl@wC=CY%gx<=~jfoKh5`$mH~lVWvzdCDL;quAZ>l`oTA`iVB8x>vrAVxrN2Y zm+|xG17~<Xkl zuY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eb5TA2nRCl@_oOFT z`}$p)#-38YzxKlMADfuZ&YdfgTIn!tdgJNSQ(V9MW~sAz-ul#FB2`=K$?Ng!x)!76 zVm*bGUoXszabQvTuH$`v!n*PW^AxMvYOE3#Tcsx3+`M~wOKi-N6(?2;)EcN{N1A;w zGoM~0{>?Y*)+Dw!pR|s|Tzr^xeD6eVm*ekK9KNuMN(xL~yuM(+YXISbLwx7=EQ&#&#H?3tE<0$>-gq+ zW!b){gI720(^_48Z+c4K_S?26xtH7!daa&&uQn-RPTd#DjBg88<{WtUjIE+ZNB-)@ z-h*FCew$ckKFGb0T9{W|zq_mci`~2Q6ZS^8c8f56v=S9jS8#NzzRb~aedPiRMoyz! zv)vr__^}@4^q6q*o(a>VQY{TXho+uy%LE112Rjxr38ic??`^1<%he@3L1FRUOqL_B yLjvYBut>i3RaS^w-t>q? Date: Wed, 11 Jun 2025 14:59:23 +0530 Subject: [PATCH 5/7] moved the init of regex out of recursive function --- visual-report.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/visual-report.js b/visual-report.js index 1989c0b72a..12e21b6261 100644 --- a/visual-report.js +++ b/visual-report.js @@ -1,5 +1,6 @@ const fs = require('fs'); const path = require('path'); +const SLASH_REGEX = /\//g; async function generateVisualReport() { const expectedDir = path.join(process.cwd(), 'test/unit/visual/screenshots'); @@ -82,7 +83,7 @@ async function generateVisualReport() { }; // Create flattened name for lookup - const flattenedName = testDir.replace(/\//g, '-'); + const flattenedName = testDir.replace(SLASH_REGEX, '-'); // Collect all screenshots for this test for (let i = 0; i < test.numScreenshots; i++) { From c584788e2024a9a818a6345968e353fff99eaf31 Mon Sep 17 00:00:00 2001 From: Vaivaswat Date: Wed, 11 Jun 2025 15:01:05 +0530 Subject: [PATCH 6/7] removed the drawing triangles' test screenshots --- .../2D mode/Drawing triangles/000.png | Bin 671 -> 0 bytes .../2D mode/Drawing triangles/metadata.json | 3 --- .../WebGL mode/Drawing triangles/000.png | Bin 648 -> 0 bytes .../WebGL mode/Drawing triangles/metadata.json | 3 --- 4 files changed, 6 deletions(-) delete mode 100644 test/unit/visual/screenshots/Shape drawing/2D mode/Drawing triangles/000.png delete mode 100644 test/unit/visual/screenshots/Shape drawing/2D mode/Drawing triangles/metadata.json delete mode 100644 test/unit/visual/screenshots/Shape drawing/WebGL mode/Drawing triangles/000.png delete mode 100644 test/unit/visual/screenshots/Shape drawing/WebGL mode/Drawing triangles/metadata.json diff --git a/test/unit/visual/screenshots/Shape drawing/2D mode/Drawing triangles/000.png b/test/unit/visual/screenshots/Shape drawing/2D mode/Drawing triangles/000.png deleted file mode 100644 index 597cdeebda606181129ebce8fec9d15d3c10ef78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 671 zcmV;Q0$}}#P)Px%SxH1eRA@u(mpzWcFc5_&EmxtVK$OsN2|6kY4uFJ!3Q^E<1PU5zDnL*m3XZ@b z=#Y@IdX{FD&4$F|pAhZZ4H62@e1319hv;&-#PkPN6hJDbVo;=Ff>2N-DB|e^{+G1| zg8?-f4eIy%p3c*LTP;Oyw;KTli(#q;B?5`#m}avXJ)cjS&*znb(gJ}J-ENn*+by-* z?Qb7c2}&EJ)oLk-{eGWm=ubmwgA9j5x?ZmYdljuuKxu=Z+3)xJFMH)d9S#TTbUL(J ztyJpyT-qRw$;#2}np zrXUREIt0WZoLuk5c}X<63;`n$PA*B&@1AuP0%DM4a=8G(9xh-i0RkA?Nx%riHo5YY zGz|eG5Ld~S*EiBhzzD=;a=nA$$w7C5HU@E-Ts$R=$798Xf1%B0lU}cvnw)j!Gb0e2 zM1Gk5?1002ovPDHLk FV1nF^A}as@ diff --git a/test/unit/visual/screenshots/Shape drawing/2D mode/Drawing triangles/metadata.json b/test/unit/visual/screenshots/Shape drawing/2D mode/Drawing triangles/metadata.json deleted file mode 100644 index 2d4bfe30da..0000000000 --- a/test/unit/visual/screenshots/Shape drawing/2D mode/Drawing triangles/metadata.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "numScreenshots": 1 -} \ No newline at end of file diff --git a/test/unit/visual/screenshots/Shape drawing/WebGL mode/Drawing triangles/000.png b/test/unit/visual/screenshots/Shape drawing/WebGL mode/Drawing triangles/000.png deleted file mode 100644 index 378333ea08ee7941d24c57e9b13414aa735eeaf5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 648 zcmV;30(bq1P)Px%LP0DCIMJ zStmv6x;A)W0OoKwBnRaL0yWCAG`rodPu=73ND9gc1krD|TT@k)0RYDRez(`B)5*Rs zt&}&&@p$Zm$2F<6G?X(4N(&|Se*Yepp#&6yGQ8yQ-4N<>xrBG~A1gS6P{Sj5C_w@5 z_j?OOpYh)V5WWY9w&MkX@a#hs4l^eN;&28*SzWJJTQ*c)Jp0HzH-Wj7pctG%xO3rp ztdz*X06RxH@kB-ip>o0xBn<-RI-k$BfrsTq5O6UJ%)to&uQ`U7B5q5U#{)=0)9T9Heg)S<0X2;330Beps_B3mprIY1zA#T@o7yt~0000 Date: Wed, 11 Jun 2025 15:08:28 +0530 Subject: [PATCH 7/7] removed the intentional failing test case along with its screenshots --- test/unit/visual/cases/typography.js | 12 ------------ .../2d mode/intentionally failing test/000.png | Bin 965 -> 0 bytes .../intentionally failing test/metadata.json | 3 --- .../webgl mode/intentionally failing test/000.png | Bin 965 -> 0 bytes .../intentionally failing test/metadata.json | 3 --- 5 files changed, 18 deletions(-) delete mode 100644 test/unit/visual/screenshots/Typography/textAlign/2d mode/intentionally failing test/000.png delete mode 100644 test/unit/visual/screenshots/Typography/textAlign/2d mode/intentionally failing test/metadata.json delete mode 100644 test/unit/visual/screenshots/Typography/textAlign/webgl mode/intentionally failing test/000.png delete mode 100644 test/unit/visual/screenshots/Typography/textAlign/webgl mode/intentionally failing test/metadata.json diff --git a/test/unit/visual/cases/typography.js b/test/unit/visual/cases/typography.js index dff725c48c..46fbab5777 100644 --- a/test/unit/visual/cases/typography.js +++ b/test/unit/visual/cases/typography.js @@ -385,18 +385,6 @@ visualSuite("Typography", function () { }); } ); - visualTest("intentionally failing test", function (p5, screenshot) { - p5.createCanvas(100, 100); - p5.background(255); - // initially put a red circle for storing in screenshots - p5.fill(255, 0, 0); // Red fill - p5.noStroke(); - - // Then change circle to rect to make it fail - p5.rect(30, 30, 40, 40); - - screenshot(); - }); }); } }); diff --git a/test/unit/visual/screenshots/Typography/textAlign/2d mode/intentionally failing test/000.png b/test/unit/visual/screenshots/Typography/textAlign/2d mode/intentionally failing test/000.png deleted file mode 100644 index 57a75785d13b332570cd37f5d983e57fcc19df18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 965 zcmeAS@N?(olHy`uVBq!ia0vp^DImV6OLcaSW-5 zdppP5$T?A<)nClfFrC%M*6hJX)>cODgd+`t+zAbvSo?V^d?Fc(yIfsLAB8FI^lY!* z?SJLuj^f{cp6|Z<{rr4Csk3RDIrnDBWN>isc25&veE3LFA;pHp#o>mG!sW&39SsvK z9n{=Kl@wC=CY%gx<=~jfoKh5`$mH~lVWvzdCDL;quAZ>l`oTA`iVB8x>vrAVxrN2Y zm+|xG17~<Xkl zuYdK%v}EQRcUg}eTeUNeH~b-MQ5oBswO2Q!Y+1c_UH1P#L-h$~&%Ro<=#0YZX^R)z z-wOYG`)7lW9@F*fSJ!X3Eh;W{%AC!R%W6{rV`ocXgdOCU`iGOAeXle^Y;2d- zEjrJ-X)mvgToL2VTTFa>mrR~ANy^Ip$yt@R`puiyZ`Z!lS$h3Eb5TA2nRCl@_oOFT z`}$p)#-38YzxKlMADfuZ&YdfgTIn!tdgJNSQ(V9MW~sAz-ul#FB2`=K$?Ng!x)!76 zVm*bGUoXszabQvTuH$`v!n*PW^AxMvYOE3#Tcsx3+`M~wOKi-N6(?2;)EcN{N1A;w zGoM~0{>?Y*)+Dw!pR|s|Tzr^xeD6eVm*ekK9KNuMN(xL~yuM(+YXISbLwx7=EQ&#&#H?3tE<0$>-gq+ zW!b){gI720(^_48Z+c4K_S?26xtH7!daa&&uQn-RPTd#DjB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