Oviya commited on
Commit ·
9db5bb0
1
Parent(s): 47111c6
fix
Browse filesFiles changed (6)
270 unmodified lines27127227327427527677 unmodified lines35435535635735835960 unmodified lines4204214224234244259 unmodified lines43543643743843944014 unmodified lines45545645745845946066 unmodified lines5275285295305315329 unmodified lines54254354454554654776 unmodified lines62462562662762862970 unmodified lines7007017027037047054628 unmodified lines53345335533653375338533964 unmodified lines540454055406540754085409477 unmodified lines5887588858895890589158922991 unmodified lines8884888588868887888888898890703 unmodified lines959495959596959795989599200 unmodified lines9800980198029803980498051608 unmodified lines114141141511416114171141811419825 unmodified lines12245122461224712248122491225052 unmodified lines1230312304123051230612307123081111 unmodified lines134201342113422134231342413425232 unmodified lines136581365913660136611366213663227 unmodified lines138911389213893138941389513896509 unmodified lines14406144071440814409144101441168 unmodified lines144801448114482144831448414485120 unmodified lines146061460714608146091461014611245 unmodified lines14857148581485914860148611486214863112 unmodified lines14976149771497814979149801498149 unmodified lines15031150321503315034150351503638 unmodified lines1507515076150771507815079150802 unmodified lines1508315084150851508615087150883 unmodified lines15092150931509415095150961509748 unmodified lines1514615147151481514915150151512 unmodified lines15154151551515615157151581515957 unmodified lines15217152181521915220152211522233 unmodified lines1525615257152581525915260152613453 unmodified lines1871518716187171871818719187201872146 unmodified lines187681876918770187711877218773338 unmodified lines1911219113191141911519116191172191 unmodified lines21309213102131121312213132131421315536 unmodified lines218522185321854218552185621857161 unmodified lines2201922020220212202222023220241168 unmodified lines231932319423195231962319723198566 unmodified lines23765237662376723768237692377031 unmodified lines238022380323804238052380623807835 unmodified lines246432464424645246462464724648161 unmodified lines24810248112481224813248142481524816140 unmodified lines249572495824959249602496124962247 unmodified lines25210252112521225213252142521525 unmodified lines25241252422524325244252452524661 unmodified lines253082530925310253112531225313195 unmodified lines25509255102551125512255132551425515270 unmodified lines"url": "https://github.com/sponsors/ai"}],"dependencies": {"nanoid": "^3.3.7","picocolors": "^1.0.0",77 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/animations/-/animations-17.3.12.tgz","integrity": "sha512-9hsdWF4gRRcVJtPcCcYLaX1CIyM9wUu6r+xRl6zU5hq8qhl35hig6ounz7CXFAzLf0WDBdM16bPHouVGaG76lg==","dependencies": {"tslib": "^2.3.0"},60 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/common/-/common-17.3.12.tgz","integrity": "sha512-vabJzvrx76XXFrm1RJZ6o/CyG32piTB/1sfFfKHdlH1QrmArb8It4gyk9oEjZ1IkAD0HvBWlfWmn+T6Vx3pdUw==","dependencies": {"tslib": "^2.3.0"},9 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-17.3.12.tgz","integrity": "sha512-vwI8oOL/gM+wPnptOVeBbMfZYwzRxQsovojZf+Zol9szl0k3SZ3FycWlxxXZGFu3VIEfrP6pXplTmyODS/Lt1w==","dependencies": {"tslib": "^2.3.0"},14 unmodified lines"resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-17.3.12.tgz","integrity": "sha512-1F8M7nWfChzurb7obbvuE7mJXlHtY1UG58pcwcomVtpPb+kPavgAO8OEvJHYBMV+bzSxkXt5UIwL9lt9jHUxZA==","dev": true,"dependencies": {"@babel/core": "7.23.9","@jridgewell/sourcemap-codec": "^1.4.14",66 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/core/-/core-17.3.12.tgz","integrity": "sha512-MuFt5yKi161JmauUta4Dh0m8ofwoq6Ino+KoOtkYMBGsSx+A7dSm+DUxxNwdj7+DNyg3LjVGCFgBFnq4g8z06A==","dependencies": {"tslib": "^2.3.0"},9 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/forms/-/forms-17.3.12.tgz","integrity": "sha512-tV6r12Q3yEUlXwpVko4E+XscunTIpPkLbaiDn/MTL3Vxi2LZnsLgHyd/i38HaHN+e/H3B0a1ToSOhV5wf3ay4Q==","dependencies": {"tslib": "^2.3.0"},76 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-17.3.12.tgz","integrity": "sha512-DYY04ptWh/ulMHzd+y52WCE8QnEYGeIiW3hEIFjCN8z0kbIdFdUtEB0IK5vjNL3ejyhUmphcpeT5PYf3YXtqWQ==","dependencies": {"tslib": "^2.3.0"},70 unmodified lines"version": "7.24.0","resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.0.tgz","integrity": "sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw==","dependencies": {"@ampproject/remapping": "^2.2.0","@babel/code-frame": "^7.23.5",4628 unmodified lines"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz","integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==","dev": true,"bin": {"acorn": "bin/acorn"},64 unmodified lines"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz","integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==","dev": true,"dependencies": {"fast-deep-equal": "^3.1.1","json-schema-traverse": "^1.0.0",477 unmodified lines"url": "https://github.com/sponsors/ai"}],"dependencies": {"caniuse-lite": "^1.0.30001688","electron-to-chromium": "^1.5.73",2991 unmodified lines"version": "5.1.2","resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-5.1.2.tgz","integrity": "sha512-2oIUMGn00FdUiqz6epiiJr7xcFyNYj3rDcfmnzfkBnHyBQ3cBQUs4mmyGsOb7TTLb9kxk7dBcmEmqhDKkBoDyA==","dev": true},"node_modules/jest-diff": {"version": "30.0.0-alpha.6",703 unmodified lines"resolved": "https://registry.npmjs.org/karma/-/karma-6.4.4.tgz","integrity": "sha512-LrtUxbdvt1gOpo3gxG+VAJlJAEMhbWlM4YrFQgql98FwF7+K8K12LYO4hnDdUkNjeztYrOXEMqgTajSWgmtI/w==","dev": true,"dependencies": {"@colors/colors": "1.5.0","body-parser": "^1.19.0",200 unmodified lines"resolved": "https://registry.npmjs.org/less/-/less-4.2.0.tgz","integrity": "sha512-P3b3HJDBtSzsXUl0im2L7gTO5Ubg8mEN6G8qoTS77iXxXX4Hvu4Qj540PZDvQ8V6DmX6iXo98k7Md0Cm1PrLaA==","dev": true,"dependencies": {"copy-anything": "^2.0.1","parse-node-version": "^1.0.1",1608 unmodified lines"url": "https://github.com/sponsors/ai"}],"dependencies": {"nanoid": "^3.3.7","picocolors": "^1.1.1",825 unmodified lines"version": "7.8.1","resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz","integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==","dependencies": {"tslib": "^2.1.0"}52 unmodified lines"resolved": "https://registry.npmjs.org/sass/-/sass-1.71.1.tgz","integrity": "sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg==","dev": true,"dependencies": {"chokidar": ">=3.0.0 <4.0.0","immutable": "^4.0.0",1111 unmodified lines"resolved": "https://registry.npmjs.org/terser/-/terser-5.29.1.tgz","integrity": "sha512-lZQ/fyaIGxsbGxApKmoPTODIzELy3++mXhS5hOqaAWZjQtpq/hFHAc+rm29NND1rYRxRWKcjuARNwULNXa5RtQ==","dev": true,"dependencies": {"@jridgewell/source-map": "^0.3.3","acorn": "^8.8.2",232 unmodified lines"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz","integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==","dev": true,"bin": {"tsc": "bin/tsc","tsserver": "bin/tsserver"227 unmodified lines"resolved": "https://registry.npmjs.org/vite/-/vite-5.1.8.tgz","integrity": "sha512-mB8ToUuSmzODSpENgvpFk2fTiU/YQ1tmcVJJ4WZbq4fPdGJkFNVcmVL5k7iDug6xzWjjuGDKAuSievIsD6H7Xw==","dev": true,"dependencies": {"esbuild": "^0.19.3","postcss": "^8.4.35",509 unmodified lines"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz","integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==","dev": true,"dependencies": {"@types/estree": "^1.0.5","@webassemblyjs/ast": "^1.12.1",68 unmodified lines"resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.1.tgz","integrity": "sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA==","dev": true,"dependencies": {"@types/bonjour": "^3.5.9","@types/connect-history-api-fallback": "^1.3.5",120 unmodified lines"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz","integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==","dev": true,"dependencies": {"fast-deep-equal": "^3.1.1","fast-json-stable-stringify": "^2.0.0",245 unmodified lines"node_modules/zone.js": {"version": "0.14.10","resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.14.10.tgz","integrity": "sha512-YGAhaO7J5ywOXW6InXNlLmfU194F8lVgu7bRntUF3TiG8Y3nBK0x1UJJuHUP/e8IyihkjCYqhCScpSwnlaSRkQ=="}},"dependencies": {112 unmodified lines"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz","integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==","dev": true,"requires": {"nanoid": "^3.3.7","picocolors": "^1.0.0",49 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/animations/-/animations-17.3.12.tgz","integrity": "sha512-9hsdWF4gRRcVJtPcCcYLaX1CIyM9wUu6r+xRl6zU5hq8qhl35hig6ounz7CXFAzLf0WDBdM16bPHouVGaG76lg==","requires": {"tslib": "^2.3.0"}38 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/common/-/common-17.3.12.tgz","integrity": "sha512-vabJzvrx76XXFrm1RJZ6o/CyG32piTB/1sfFfKHdlH1QrmArb8It4gyk9oEjZ1IkAD0HvBWlfWmn+T6Vx3pdUw==","requires": {"tslib": "^2.3.0"}2 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-17.3.12.tgz","integrity": "sha512-vwI8oOL/gM+wPnptOVeBbMfZYwzRxQsovojZf+Zol9szl0k3SZ3FycWlxxXZGFu3VIEfrP6pXplTmyODS/Lt1w==","requires": {"tslib": "^2.3.0"}3 unmodified lines"resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-17.3.12.tgz","integrity": "sha512-1F8M7nWfChzurb7obbvuE7mJXlHtY1UG58pcwcomVtpPb+kPavgAO8OEvJHYBMV+bzSxkXt5UIwL9lt9jHUxZA==","dev": true,"requires": {"@babel/core": "7.23.9","@jridgewell/sourcemap-codec": "^1.4.14",48 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/core/-/core-17.3.12.tgz","integrity": "sha512-MuFt5yKi161JmauUta4Dh0m8ofwoq6Ino+KoOtkYMBGsSx+A7dSm+DUxxNwdj7+DNyg3LjVGCFgBFnq4g8z06A==","requires": {"tslib": "^2.3.0"}2 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/forms/-/forms-17.3.12.tgz","integrity": "sha512-tV6r12Q3yEUlXwpVko4E+XscunTIpPkLbaiDn/MTL3Vxi2LZnsLgHyd/i38HaHN+e/H3B0a1ToSOhV5wf3ay4Q==","requires": {"tslib": "^2.3.0"}57 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-17.3.12.tgz","integrity": "sha512-DYY04ptWh/ulMHzd+y52WCE8QnEYGeIiW3hEIFjCN8z0kbIdFdUtEB0IK5vjNL3ejyhUmphcpeT5PYf3YXtqWQ==","requires": {"tslib": "^2.3.0"}33 unmodified lines"version": "7.24.0","resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.0.tgz","integrity": "sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw==","requires": {"@ampproject/remapping": "^2.2.0","@babel/code-frame": "^7.23.5",3453 unmodified lines"version": "8.14.0","resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz","integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==","dev": true},"acorn-import-attributes": {"version": "1.9.5",46 unmodified lines"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz","integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==","dev": true,"requires": {"fast-deep-equal": "^3.1.1","json-schema-traverse": "^1.0.0",338 unmodified lines"version": "4.24.3","resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.3.tgz","integrity": "sha512-1CPmv8iobE2fyRMV97dAcMVegvvWKxmq94hkLiAkUGwKVTyDLw33K+ZxiFrREKmmps4rIw6grcCFCnTMSZ/YiA==","requires": {"caniuse-lite": "^1.0.30001688","electron-to-chromium": "^1.5.73",2191 unmodified lines"version": "5.1.2","resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-5.1.2.tgz","integrity": "sha512-2oIUMGn00FdUiqz6epiiJr7xcFyNYj3rDcfmnzfkBnHyBQ3cBQUs4mmyGsOb7TTLb9kxk7dBcmEmqhDKkBoDyA==","dev": true},"jest-diff": {"version": "30.0.0-alpha.6",536 unmodified lines"resolved": "https://registry.npmjs.org/karma/-/karma-6.4.4.tgz","integrity": "sha512-LrtUxbdvt1gOpo3gxG+VAJlJAEMhbWlM4YrFQgql98FwF7+K8K12LYO4hnDdUkNjeztYrOXEMqgTajSWgmtI/w==","dev": true,"requires": {"@colors/colors": "1.5.0","body-parser": "^1.19.0",161 unmodified lines"resolved": "https://registry.npmjs.org/less/-/less-4.2.0.tgz","integrity": "sha512-P3b3HJDBtSzsXUl0im2L7gTO5Ubg8mEN6G8qoTS77iXxXX4Hvu4Qj540PZDvQ8V6DmX6iXo98k7Md0Cm1PrLaA==","dev": true,"requires": {"copy-anything": "^2.0.1","errno": "^0.1.1",1168 unmodified lines"version": "8.4.49","resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz","integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==","requires": {"nanoid": "^3.3.7","picocolors": "^1.1.1",566 unmodified lines"version": "7.8.1","resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz","integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==","requires": {"tslib": "^2.1.0"}31 unmodified lines"resolved": "https://registry.npmjs.org/sass/-/sass-1.71.1.tgz","integrity": "sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg==","dev": true,"requires": {"chokidar": ">=3.0.0 <4.0.0","immutable": "^4.0.0",835 unmodified lines"resolved": "https://registry.npmjs.org/terser/-/terser-5.29.1.tgz","integrity": "sha512-lZQ/fyaIGxsbGxApKmoPTODIzELy3++mXhS5hOqaAWZjQtpq/hFHAc+rm29NND1rYRxRWKcjuARNwULNXa5RtQ==","dev": true,"requires": {"@jridgewell/source-map": "^0.3.3","acorn": "^8.8.2",161 unmodified lines"version": "5.3.3","resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz","integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==","dev": true},"ua-parser-js": {"version": "0.7.40",140 unmodified lines"resolved": "https://registry.npmjs.org/vite/-/vite-5.1.8.tgz","integrity": "sha512-mB8ToUuSmzODSpENgvpFk2fTiU/YQ1tmcVJJ4WZbq4fPdGJkFNVcmVL5k7iDug6xzWjjuGDKAuSievIsD6H7Xw==","dev": true,"requires": {"esbuild": "^0.19.3","fsevents": "~2.3.3",247 unmodified lines"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz","integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==","dev": true,"requires": {"@types/estree": "^1.0.5","@webassemblyjs/ast": "^1.12.1",25 unmodified lines"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz","integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==","dev": true,"requires": {"fast-deep-equal": "^3.1.1","fast-json-stable-stringify": "^2.0.0",61 unmodified lines"resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.1.tgz","integrity": "sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA==","dev": true,"requires": {"@types/bonjour": "^3.5.9","@types/connect-history-api-fallback": "^1.3.5",195 unmodified lines"zone.js": {"version": "0.14.10","resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.14.10.tgz","integrity": "sha512-YGAhaO7J5ywOXW6InXNlLmfU194F8lVgu7bRntUF3TiG8Y3nBK0x1UJJuHUP/e8IyihkjCYqhCScpSwnlaSRkQ=="}}}270 unmodified lines27127227327427527627777 unmodified lines35535635735835936036160 unmodified lines4224234244254264274289 unmodified lines43843944044144244344414 unmodified lines45946046146246346446566 unmodified lines5325335345355365375389 unmodified lines54854955055155255355476 unmodified lines63163263363463563663770 unmodified lines7087097107117127137144628 unmodified lines534353445345534653475348534964 unmodified lines5414541554165417541854195420477 unmodified lines58985899590059015902590359042991 unmodified lines88968897889888998900890189028903703 unmodified lines9607960896099610961196129613200 unmodified lines98149815981698179818981998201608 unmodified lines11429114301143111432114331143411435825 unmodified lines1226112262122631226412265122661226752 unmodified lines123201232112322123231232412325123261111 unmodified lines13438134391344013441134421344313444232 unmodified lines13677136781367913680136811368213683227 unmodified lines13911139121391313914139151391613917509 unmodified lines1442714428144291443014431144321443368 unmodified lines14502145031450414505145061450714508120 unmodified lines14629146301463114632146331463414635245 unmodified lines1488114882148831488414885148861488714888112 unmodified lines1500115002150031500415005150061500749 unmodified lines1505715058150591506015061150621506338 unmodified lines151021510315104151051510615107151082 unmodified lines151111511215113151141511515116151173 unmodified lines1512115122151231512415125151261512748 unmodified lines151761517715178151791518015181151822 unmodified lines1518515186151871518815189151901519157 unmodified lines1524915250152511525215253152541525533 unmodified lines152891529015291152921529315294152953453 unmodified lines187491875018751187521875318754187551875646 unmodified lines18803188041880518806188071880818809338 unmodified lines191481914919150191511915219153191542191 unmodified lines2134621347213482134921350213512135221353536 unmodified lines21890218912189221893218942189521896161 unmodified lines220582205922060220612206222063220641168 unmodified lines23233232342323523236232372323823239566 unmodified lines2380623807238082380923810238112381231 unmodified lines23844238452384623847238482384923850835 unmodified lines24686246872468824689246902469124692161 unmodified lines2485424855248562485724858248592486024861140 unmodified lines25002250032500425005250062500725008247 unmodified lines2525625257252582525925260252612526225 unmodified lines2528825289252902529125292252932529461 unmodified lines25356253572535825359253602536125362195 unmodified lines2555825559255602556125562255632556425565270 unmodified lines"url": "https://github.com/sponsors/ai"}],"peer": true,"dependencies": {"nanoid": "^3.3.7","picocolors": "^1.0.0",77 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/animations/-/animations-17.3.12.tgz","integrity": "sha512-9hsdWF4gRRcVJtPcCcYLaX1CIyM9wUu6r+xRl6zU5hq8qhl35hig6ounz7CXFAzLf0WDBdM16bPHouVGaG76lg==","peer": true,"dependencies": {"tslib": "^2.3.0"},60 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/common/-/common-17.3.12.tgz","integrity": "sha512-vabJzvrx76XXFrm1RJZ6o/CyG32piTB/1sfFfKHdlH1QrmArb8It4gyk9oEjZ1IkAD0HvBWlfWmn+T6Vx3pdUw==","peer": true,"dependencies": {"tslib": "^2.3.0"},9 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-17.3.12.tgz","integrity": "sha512-vwI8oOL/gM+wPnptOVeBbMfZYwzRxQsovojZf+Zol9szl0k3SZ3FycWlxxXZGFu3VIEfrP6pXplTmyODS/Lt1w==","peer": true,"dependencies": {"tslib": "^2.3.0"},14 unmodified lines"resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-17.3.12.tgz","integrity": "sha512-1F8M7nWfChzurb7obbvuE7mJXlHtY1UG58pcwcomVtpPb+kPavgAO8OEvJHYBMV+bzSxkXt5UIwL9lt9jHUxZA==","dev": true,"peer": true,"dependencies": {"@babel/core": "7.23.9","@jridgewell/sourcemap-codec": "^1.4.14",66 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/core/-/core-17.3.12.tgz","integrity": "sha512-MuFt5yKi161JmauUta4Dh0m8ofwoq6Ino+KoOtkYMBGsSx+A7dSm+DUxxNwdj7+DNyg3LjVGCFgBFnq4g8z06A==","peer": true,"dependencies": {"tslib": "^2.3.0"},9 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/forms/-/forms-17.3.12.tgz","integrity": "sha512-tV6r12Q3yEUlXwpVko4E+XscunTIpPkLbaiDn/MTL3Vxi2LZnsLgHyd/i38HaHN+e/H3B0a1ToSOhV5wf3ay4Q==","peer": true,"dependencies": {"tslib": "^2.3.0"},76 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-17.3.12.tgz","integrity": "sha512-DYY04ptWh/ulMHzd+y52WCE8QnEYGeIiW3hEIFjCN8z0kbIdFdUtEB0IK5vjNL3ejyhUmphcpeT5PYf3YXtqWQ==","peer": true,"dependencies": {"tslib": "^2.3.0"},70 unmodified lines"version": "7.24.0","resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.0.tgz","integrity": "sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw==","peer": true,"dependencies": {"@ampproject/remapping": "^2.2.0","@babel/code-frame": "^7.23.5",4628 unmodified lines"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz","integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==","dev": true,"peer": true,"bin": {"acorn": "bin/acorn"},64 unmodified lines"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz","integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==","dev": true,"peer": true,"dependencies": {"fast-deep-equal": "^3.1.1","json-schema-traverse": "^1.0.0",477 unmodified lines"url": "https://github.com/sponsors/ai"}],"peer": true,"dependencies": {"caniuse-lite": "^1.0.30001688","electron-to-chromium": "^1.5.73",2991 unmodified lines"version": "5.1.2","resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-5.1.2.tgz","integrity": "sha512-2oIUMGn00FdUiqz6epiiJr7xcFyNYj3rDcfmnzfkBnHyBQ3cBQUs4mmyGsOb7TTLb9kxk7dBcmEmqhDKkBoDyA==","dev": true,"peer": true},"node_modules/jest-diff": {"version": "30.0.0-alpha.6",703 unmodified lines"resolved": "https://registry.npmjs.org/karma/-/karma-6.4.4.tgz","integrity": "sha512-LrtUxbdvt1gOpo3gxG+VAJlJAEMhbWlM4YrFQgql98FwF7+K8K12LYO4hnDdUkNjeztYrOXEMqgTajSWgmtI/w==","dev": true,"peer": true,"dependencies": {"@colors/colors": "1.5.0","body-parser": "^1.19.0",200 unmodified lines"resolved": "https://registry.npmjs.org/less/-/less-4.2.0.tgz","integrity": "sha512-P3b3HJDBtSzsXUl0im2L7gTO5Ubg8mEN6G8qoTS77iXxXX4Hvu4Qj540PZDvQ8V6DmX6iXo98k7Md0Cm1PrLaA==","dev": true,"peer": true,"dependencies": {"copy-anything": "^2.0.1","parse-node-version": "^1.0.1",1608 unmodified lines"url": "https://github.com/sponsors/ai"}],"peer": true,"dependencies": {"nanoid": "^3.3.7","picocolors": "^1.1.1",825 unmodified lines"version": "7.8.1","resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz","integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==","peer": true,"dependencies": {"tslib": "^2.1.0"}52 unmodified lines"resolved": "https://registry.npmjs.org/sass/-/sass-1.71.1.tgz","integrity": "sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg==","dev": true,"peer": true,"dependencies": {"chokidar": ">=3.0.0 <4.0.0","immutable": "^4.0.0",1111 unmodified lines"resolved": "https://registry.npmjs.org/terser/-/terser-5.29.1.tgz","integrity": "sha512-lZQ/fyaIGxsbGxApKmoPTODIzELy3++mXhS5hOqaAWZjQtpq/hFHAc+rm29NND1rYRxRWKcjuARNwULNXa5RtQ==","dev": true,"peer": true,"dependencies": {"@jridgewell/source-map": "^0.3.3","acorn": "^8.8.2",232 unmodified lines"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz","integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==","dev": true,"peer": true,"bin": {"tsc": "bin/tsc","tsserver": "bin/tsserver"227 unmodified lines"resolved": "https://registry.npmjs.org/vite/-/vite-5.1.8.tgz","integrity": "sha512-mB8ToUuSmzODSpENgvpFk2fTiU/YQ1tmcVJJ4WZbq4fPdGJkFNVcmVL5k7iDug6xzWjjuGDKAuSievIsD6H7Xw==","dev": true,"peer": true,"dependencies": {"esbuild": "^0.19.3","postcss": "^8.4.35",509 unmodified lines"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz","integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==","dev": true,"peer": true,"dependencies": {"@types/estree": "^1.0.5","@webassemblyjs/ast": "^1.12.1",68 unmodified lines"resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.1.tgz","integrity": "sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA==","dev": true,"peer": true,"dependencies": {"@types/bonjour": "^3.5.9","@types/connect-history-api-fallback": "^1.3.5",120 unmodified lines"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz","integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==","dev": true,"peer": true,"dependencies": {"fast-deep-equal": "^3.1.1","fast-json-stable-stringify": "^2.0.0",245 unmodified lines"node_modules/zone.js": {"version": "0.14.10","resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.14.10.tgz","integrity": "sha512-YGAhaO7J5ywOXW6InXNlLmfU194F8lVgu7bRntUF3TiG8Y3nBK0x1UJJuHUP/e8IyihkjCYqhCScpSwnlaSRkQ==","peer": true}},"dependencies": {112 unmodified lines"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz","integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==","dev": true,"peer": true,"requires": {"nanoid": "^3.3.7","picocolors": "^1.0.0",49 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/animations/-/animations-17.3.12.tgz","integrity": "sha512-9hsdWF4gRRcVJtPcCcYLaX1CIyM9wUu6r+xRl6zU5hq8qhl35hig6ounz7CXFAzLf0WDBdM16bPHouVGaG76lg==","peer": true,"requires": {"tslib": "^2.3.0"}38 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/common/-/common-17.3.12.tgz","integrity": "sha512-vabJzvrx76XXFrm1RJZ6o/CyG32piTB/1sfFfKHdlH1QrmArb8It4gyk9oEjZ1IkAD0HvBWlfWmn+T6Vx3pdUw==","peer": true,"requires": {"tslib": "^2.3.0"}2 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-17.3.12.tgz","integrity": "sha512-vwI8oOL/gM+wPnptOVeBbMfZYwzRxQsovojZf+Zol9szl0k3SZ3FycWlxxXZGFu3VIEfrP6pXplTmyODS/Lt1w==","peer": true,"requires": {"tslib": "^2.3.0"}3 unmodified lines"resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-17.3.12.tgz","integrity": "sha512-1F8M7nWfChzurb7obbvuE7mJXlHtY1UG58pcwcomVtpPb+kPavgAO8OEvJHYBMV+bzSxkXt5UIwL9lt9jHUxZA==","dev": true,"peer": true,"requires": {"@babel/core": "7.23.9","@jridgewell/sourcemap-codec": "^1.4.14",48 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/core/-/core-17.3.12.tgz","integrity": "sha512-MuFt5yKi161JmauUta4Dh0m8ofwoq6Ino+KoOtkYMBGsSx+A7dSm+DUxxNwdj7+DNyg3LjVGCFgBFnq4g8z06A==","peer": true,"requires": {"tslib": "^2.3.0"}2 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/forms/-/forms-17.3.12.tgz","integrity": "sha512-tV6r12Q3yEUlXwpVko4E+XscunTIpPkLbaiDn/MTL3Vxi2LZnsLgHyd/i38HaHN+e/H3B0a1ToSOhV5wf3ay4Q==","peer": true,"requires": {"tslib": "^2.3.0"}57 unmodified lines"version": "17.3.12","resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-17.3.12.tgz","integrity": "sha512-DYY04ptWh/ulMHzd+y52WCE8QnEYGeIiW3hEIFjCN8z0kbIdFdUtEB0IK5vjNL3ejyhUmphcpeT5PYf3YXtqWQ==","peer": true,"requires": {"tslib": "^2.3.0"}33 unmodified lines"version": "7.24.0","resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.0.tgz","integrity": "sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw==","peer": true,"requires": {"@ampproject/remapping": "^2.2.0","@babel/code-frame": "^7.23.5",3453 unmodified lines"version": "8.14.0","resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz","integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==","dev": true,"peer": true},"acorn-import-attributes": {"version": "1.9.5",46 unmodified lines"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz","integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==","dev": true,"peer": true,"requires": {"fast-deep-equal": "^3.1.1","json-schema-traverse": "^1.0.0",338 unmodified lines"version": "4.24.3","resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.3.tgz","integrity": "sha512-1CPmv8iobE2fyRMV97dAcMVegvvWKxmq94hkLiAkUGwKVTyDLw33K+ZxiFrREKmmps4rIw6grcCFCnTMSZ/YiA==","peer": true,"requires": {"caniuse-lite": "^1.0.30001688","electron-to-chromium": "^1.5.73",2191 unmodified lines"version": "5.1.2","resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-5.1.2.tgz","integrity": "sha512-2oIUMGn00FdUiqz6epiiJr7xcFyNYj3rDcfmnzfkBnHyBQ3cBQUs4mmyGsOb7TTLb9kxk7dBcmEmqhDKkBoDyA==","dev": true,"peer": true},"jest-diff": {"version": "30.0.0-alpha.6",536 unmodified lines"resolved": "https://registry.npmjs.org/karma/-/karma-6.4.4.tgz","integrity": "sha512-LrtUxbdvt1gOpo3gxG+VAJlJAEMhbWlM4YrFQgql98FwF7+K8K12LYO4hnDdUkNjeztYrOXEMqgTajSWgmtI/w==","dev": true,"peer": true,"requires": {"@colors/colors": "1.5.0","body-parser": "^1.19.0",161 unmodified lines"resolved": "https://registry.npmjs.org/less/-/less-4.2.0.tgz","integrity": "sha512-P3b3HJDBtSzsXUl0im2L7gTO5Ubg8mEN6G8qoTS77iXxXX4Hvu4Qj540PZDvQ8V6DmX6iXo98k7Md0Cm1PrLaA==","dev": true,"peer": true,"requires": {"copy-anything": "^2.0.1","errno": "^0.1.1",1168 unmodified lines"version": "8.4.49","resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz","integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==","peer": true,"requires": {"nanoid": "^3.3.7","picocolors": "^1.1.1",566 unmodified lines"version": "7.8.1","resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz","integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==","peer": true,"requires": {"tslib": "^2.1.0"}31 unmodified lines"resolved": "https://registry.npmjs.org/sass/-/sass-1.71.1.tgz","integrity": "sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg==","dev": true,"peer": true,"requires": {"chokidar": ">=3.0.0 <4.0.0","immutable": "^4.0.0",835 unmodified lines"resolved": "https://registry.npmjs.org/terser/-/terser-5.29.1.tgz","integrity": "sha512-lZQ/fyaIGxsbGxApKmoPTODIzELy3++mXhS5hOqaAWZjQtpq/hFHAc+rm29NND1rYRxRWKcjuARNwULNXa5RtQ==","dev": true,"peer": true,"requires": {"@jridgewell/source-map": "^0.3.3","acorn": "^8.8.2",161 unmodified lines"version": "5.3.3","resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz","integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==","dev": true,"peer": true},"ua-parser-js": {"version": "0.7.40",140 unmodified lines"resolved": "https://registry.npmjs.org/vite/-/vite-5.1.8.tgz","integrity": "sha512-mB8ToUuSmzODSpENgvpFk2fTiU/YQ1tmcVJJ4WZbq4fPdGJkFNVcmVL5k7iDug6xzWjjuGDKAuSievIsD6H7Xw==","dev": true,"peer": true,"requires": {"esbuild": "^0.19.3","fsevents": "~2.3.3",247 unmodified lines"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz","integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==","dev": true,"peer": true,"requires": {"@types/estree": "^1.0.5","@webassemblyjs/ast": "^1.12.1",25 unmodified lines"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz","integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==","dev": true,"peer": true,"requires": {"fast-deep-equal": "^3.1.1","fast-json-stable-stringify": "^2.0.0",61 unmodified lines"resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.1.tgz","integrity": "sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA==","dev": true,"peer": true,"requires": {"@types/bonjour": "^3.5.9","@types/connect-history-api-fallback": "^1.3.5",195 unmodified lines"zone.js": {"version": "0.14.10","resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.14.10.tgz","integrity": "sha512-YGAhaO7J5ywOXW6InXNlLmfU194F8lVgu7bRntUF3TiG8Y3nBK0x1UJJuHUP/e8IyihkjCYqhCScpSwnlaSRkQ==","peer": true}}}
82 unmodified lines838485868788899033 unmodified lines12412512612712812913082 unmodified linespattern="[A-Za-z]*"(input)="onInput($event, question.index); onAnswerChange(question.index)"[ngClass]="{'correct-answer': !isLoading && isChecked && userAnswers[question.index] === questionsWithAnswers[question.index].correctAnswer,'wrong-answer': !isLoading && isChecked && userAnswers[question.index] !== questionsWithAnswers[question.index].correctAnswer}" /></span>33 unmodified lines<ul class="hint-list" role="list"><ng-container *ngFor="let hint of hints; let i = index"><li *ngIf="hint && hint.trim() !== '' && userAnswers[i] !== questionsWithAnswers[i]?.correctAnswer"class="hint-item"><strong>Hint for Question {{ i + 1 }}:</strong> {{ hint }}</li>82 unmodified lines838485868788899033 unmodified lines12412512612712812913082 unmodified linespattern="[A-Za-z]*"(input)="onInput($event, question.index); onAnswerChange(question.index)"[ngClass]="{'correct-answer': answerStatuses[question.index] === 'correct','wrong-answer': answerStatuses[question.index] === 'incorrect'}" /></span>33 unmodified lines<ul class="hint-list" role="list"><ng-container *ngFor="let hint of hints; let i = index"><li *ngIf="hint && hint.trim() !== ''"class="hint-item"><strong>Hint for Question {{ i + 1 }}:</strong> {{ hint }}</li>
123456789101112135 unmodified lines1920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475481 unmodified line5505515525535545555565575585595605615625635645655665675685695705715725735745755761 unmodified line5785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866874 unmodified lines692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722import { Component } from '@angular/core';import { FormsModule } from '@angular/forms';import { CommonModule } from '@angular/common';import { GenerateQuestionsService } from './generate-questions.service';import { Router } from '@angular/router';import confetti from 'canvas-confetti';import { ChangeDetectorRef } from '@angular/core';import { HeaderComponent } from '../shared/header/header.component';import { ButtonComponent } from '../shared/button/button.component';interface QuestionWithAnswer {question: string;5 unmodified linesindex: number;}@Component({selector: 'app-generate-questions',standalone: true,imports: [FormsModule, CommonModule, HeaderComponent, ButtonComponent],templateUrl: './generate-questions.component.html',styleUrls: ['./generate-questions.component.css']})export class GenerateQuestionsComponent {topic: string = "";hardcodedTopics: string[] = ["Noun","Verb","Past Tense","Adjective","Present Continuous",];showSuggestions: boolean = false;userAnswers: string[] = [];feedback: string[] = [];error: string = "";isChecked: boolean = false;isAnswerModified: boolean = false;questions: { parts: string[]; index: number }[] = [];attemptCounts: { [key: number]: number } = {};correctAnswers: string[] = [];questionsWithAnswers: QuestionWithAnswer[] = [];currentDifficulty: string = "basic";// difficultyLevels: string[] = ['basic', 'elementary', 'pre-intermediate', 'intermediate', 'upper-intermediate', 'advanced', 'hard'];difficultyLevels: string[] = ["basic", "intermediate", "expert"];isDropdownDisabled: boolean = false;isValidationInProgress: boolean = false;isTopicLocked: boolean = false;isAllLevelsCompleted: boolean = false;readonlyAnswers: boolean[] = [];hints: string[] = [];attempts: number[] = [];isQuestionsGenerated: boolean = false;isGenerateDisabled: boolean = true;isResetDisabled: boolean = true;isFirstAttemptDone: boolean = false;hasNewHints: boolean = false;isLoading: boolean = false;isValidationCompleted = false;showLevelTooltip: boolean = false;activateLevelDot: boolean = false;isTyping: boolean = false;validated: boolean = false;constructor(private generateQuestionsService: GenerateQuestionsService,private router: Router,private cdr: ChangeDetectorRef,) { }onTopicChange() {if (this.topic.trim().length > 0) {this.isGenerateDisabled = false;} else {this.isGenerateDisabled = true;}if (this.topic.trim().length === 0) {this.showSuggestions = true;} else {this.showSuggestions = false;}}getProgressWidth(): string {const index = this.difficultyLevels.indexOf(this.currentDifficulty);if (index === -1 || this.difficultyLevels.length <= 1) return "0%";const percent = (index / (this.difficultyLevels.length - 1)) * 100;return `${percent}%`;}generateQuestions() {this.hints = [];this.isQuestionsGenerated = false;this.showLevelTooltip = true;this.activateLevelDot = true;if (this.isAllLevelsCompleted) {this.error = "Please reset to start over.";return;}this.isTopicLocked = true;this.showSuggestions = false;this.readonlyAnswers = [];this.isDropdownDisabled = true;console.log(`Generating questions for difficulty level: ${this.currentDifficulty}`);this.generateQuestionsService.generateQuestions(this.topic, this.currentDifficulty).subscribe((response) => {console.log("Response from backend:", response);// --- Minimal change: accept new shape { text } and fall back to old generations[0].text ---const rawQuestions = (response?.text ?? response?.generations?.[0]?.text ?? '').trim();if (rawQuestions) {console.log("Raw Questions:", rawQuestions);this.isQuestionsGenerated = true;this.isGenerateDisabled = true;this.isResetDisabled = false;this.questionsWithAnswers = [];// same regex you already useconst regex = /(\d+\.\s*.+?_______)\s*(.*?)\s*\(([^)]+)\)\s*$/gm;let match;while ((match = regex.exec(rawQuestions)) !== null) {console.log("Match:", match);const questionText = (match[1] ?? "").trim(); // up to _______const afterBlankRaw = (match[2] ?? ""); // text after the blankconst correctAnswer = (match[3] ?? "").trim(); // answer in parentheses// clean any stray "_" or "-" right after the blankconst afterBlankClean = afterBlankRaw.replace(/^[_-]+/, "").replace(/^\s+/, " ").replace(/\s{2,}/g, " ");if (questionText && correctAnswer) {this.questionsWithAnswers.push({question: `${questionText}${afterBlankClean}`,correctAnswer,});}}console.log("Extracted Questions with Answers:", this.questionsWithAnswers);// Build renderable questions (parts before/after the blank)this.questions = this.questionsWithAnswers.map((q, index) => {const normalized = q.question.replace(/\s*_{3,}\s*/g, "_______");const parts = normalized.split("_______");if (parts.length === 2) {parts[0] = parts[0].replace(/_+$/, "").trim();parts[1] = parts[1].replace(/^_+/, "").trim();}return { parts, index };});this.userAnswers = new Array(this.questions.length).fill("");this.feedback = new Array(this.questions.length).fill("");this.readonlyAnswers = new Array(this.questions.length).fill(false);this.isChecked = false;this.attemptCounts = this.questions.reduce((acc, _q, i) => {acc[i] = 0;return acc;}, {} as { [key: number]: number });console.log("Questions without answers:", this.questions);} else {this.error = "No questions generated. Please try again.";}},(error) => {if (error.status === 400 && error.error.message) {this.error = error.error.message;} else {this.error = "Failed to fetch questions. Please try again later.";}console.error("Error fetching questions:", error);},);}resetTopic() {this.topic = "";this.questions = [];this.questionsWithAnswers = [];this.userAnswers = [];this.readonlyAnswers = [];this.feedback = [];this.hints = [];this.attemptCounts = [];this.isChecked = false;this.isValidationInProgress = false;this.isFirstAttemptDone = false;this.isAllLevelsCompleted = false;this.hasNewHints = false;this.isQuestionsGenerated = false;this.isTopicLocked = false;this.validated = false;this.currentDifficulty = "basic";this.error = "";this.isGenerateDisabled = true;this.isResetDisabled = true;this.showSuggestions = false;this.showLevelTooltip = false;this.activateLevelDot = false;this.showSuggestions = false;this.isDropdownDisabled = false;this.isTopicLocked = false;this.stopConfetti();// Stop any active countdownsObject.keys(this.countdownTimers).forEach(k => clearInterval(this.countdownTimers[+k]));this.countdownTimers = {};this.countdowns = [];this.showCountdown = [];this.stopGlobalCountdown();this.stopOverlay()}areAllAnswersFilled(): boolean {return this.userAnswers.every((answer) => answer?.trim() !== "");}closeErrorPopup() {this.error = "";this.isGenerateDisabled = true;this.isResetDisabled = false;}// Hint icon one-time flagsshowHintIcon: boolean = false; // controls rendering of the “i” buttonhasShownHintIcon: boolean = false; // remembers if it was shown onceisHintMenuVisible: boolean = false; // remove if you already have itcheckAllAnswers() {this.isChecked = true;this.isValidationInProgress = true;this.isLoading = true;this.isValidationCompleted = true;this.validated = true;this.isFirstAttemptDone = true;const requestPayload = this.questions.map((questionObj, index) => ({topic: this.topic,question: questionObj.parts.join("_______"),user_answer: this.userAnswers[index],}));console.log("Checking answers...");console.log("User Answers:", this.userAnswers);console.log("Correct Answers:",this.questionsWithAnswers.map((q) => q.correctAnswer),);this.generateQuestionsService.validateAllAnswers(requestPayload).subscribe((response) => {console.log("Response from backend for all answers validation:", response);if (response.results && response.results.length > 0) {let allAttemptsCompleted = true;// Track what happened this validation cyclelet hadFirstAttemptWrong = false; // someone is on first wrong attemptlet hadSecondAttemptWrong = false; // someone is on second wrong attempt (autofill path)response.results.forEach((result: any, index: number) => {this.attemptCounts[index]++;const validationResponse = result.validation_response;const hint = result.hint ? result.hint.trim() : "";const userAnswerRaw = this.userAnswers[index] ?? '';const userAnswer = userAnswerRaw.trim().toLowerCase();const correctAnswerRaw = this.questionsWithAnswers[index].correctAnswer ?? '';const correctAnswer = correctAnswerRaw.trim().toLowerCase();console.log(`Validation Response for Question ${index + 1}: ${validationResponse}`);console.log(`User Answer: ${userAnswer}, Correct Answer: ${correctAnswer}`);if (userAnswer === correctAnswer) {console.log(`✅ Correct answer for question ${index + 1}: ${this.userAnswers[index]}`);this.readonlyAnswers[index] = true;this.hints[index] = "";this.userAnswers[index] = this.questionsWithAnswers[index].correctAnswer;} else {console.log(`❌ Incorrect answer for question ${index + 1}: ${this.userAnswers[index]}`);// ====== 1) FIRST WRONG ATTEMPT: show "Try again" countdown, then clear input ======if (this.attemptCounts[index] === 1) {hadFirstAttemptWrong = true;if (!this.globalCountdownActive) {this.startOverlay("Try again in");}setTimeout(() => {console.log(`🔄 Resetting incorrect answer for Question ${index + 1}`);this.userAnswers[index] = ""; // give user a clean slatethis.stopOverlay(); // ensure the HUD disappears}, this.COUNTDOWN_SECS * 1000);}// ====== 2) SECOND WRONG ATTEMPT: show "Showing correct answer" countdown, then autofill ======else if (this.attemptCounts[index] >= 2) {hadSecondAttemptWrong = true;if (!this.globalCountdownActive) {this.startOverlay("Showing correct answer in");}setTimeout(() => {// after countdown, force the correct answerif (!this.userAnswers[index] || this.userAnswers[index].trim() === "" || userAnswer !== correctAnswer) {this.userAnswers[index] = this.questionsWithAnswers[index].correctAnswer;console.log(`✔️ Auto-filled correct answer for Question ${index + 1}: ${this.userAnswers[index]}`);}this.stopOverlay(); // hide the first overlay (showing correct answer)// ====== 3) LAST LEVEL: show a second countdown before congratulations ======if (this.isLastLevel() && index === this.questions.length - 1) {// Give time to read the just-filled correct answerthis.startOverlay("Finishing in");setTimeout(() => {this.stopOverlay();this.isAllLevelsCompleted = true;console.log("🎉 You have completed all difficulty levels.");this.triggerConfetti();}, this.COUNTDOWN_SECS * 1000);}}, this.COUNTDOWN_SECS * 1000);}this.hints[index] = hint.length > 0 ? hint : null;}this.feedback[index] = validationResponse || "No feedback provided.";// minor 2s reflection (kept as-is)setTimeout(() => {if (userAnswer === correctAnswer) {this.userAnswers[index] = this.userAnswers[index];} else {this.userAnswers[index] = this.userAnswers[index];}}, 2000);if (this.attemptCounts[index] < 2) {allAttemptsCompleted = false;}});// Hints auto-hide (unchanged)this.hasNewHints = this.hints.some((h) => h && h.trim() !== "");if (this.hasNewHints) {setTimeout(() => { this.hasNewHints = false; }, 5000);}// --- ONE-TIME “i” icon reveal right after the first validation ---const hasAnyHint = Array.isArray(this.hints) && this.hints.some(h => !!h && h.trim() !== "");const shouldRevealIconOnce = hasAnyHint || hadFirstAttemptWrong || hadSecondAttemptWrong;if (!this.hasShownHintIcon && shouldRevealIconOnce) {this.showHintIcon = true; // reveal oncethis.hasShownHintIcon = true; // lock it} else {this.showHintIcon = false; // never show again in later validations}// --- END ONE-TIME “i” icon reveal ---if (this.isLastLevel() && this.areAllCorrectAnswersDisplayed()) {// Last level, all correct: show finish counter, then congratulationsthis.stopOverlay(); // ensure no old timer remainsthis.startOverlay("Finishing in");setTimeout(() => {this.stopOverlay();this.isAllLevelsCompleted = true;this.triggerConfetti();}, this.COUNTDOWN_SECS * 1000);} else if (!this.isLastLevel() && (this.areAllCorrectAnswersDisplayed() || allAttemptsCompleted)) {// Not last level: even if all answers were correct on first try,// show the counter before moving to the next levelthis.stopOverlay(); // ensure fresh HUDthis.startOverlay("Moving to next level in");setTimeout(() => {this.stopOverlay();this.triggerNextLevelWithDelay();}, this.COUNTDOWN_SECS * 1000);}} else {this.error = "Failed to validate answers. Please try again.";}this.isValidationInProgress = false;this.isLoading = false;},(error) => {console.error("Error validating answers:", error);this.error = "Error validating answers. Please try again later.";this.isValidationInProgress = false;this.isLoading = false;},);}isLastLevel(): boolean {return (this.currentDifficulty ===this.difficultyLevels[this.difficultyLevels.length - 1]);}triggerNextLevelWithDelay() {setTimeout(() => {this.transitionDifficulty();}, 2000);}areAllCorrectAnswersDisplayed(): boolean {return this.userAnswers.every((answer, index) =>(answer ?? "").trim().toLowerCase() ===(this.questionsWithAnswers[index]?.correctAnswer ?? "").trim().toLowerCase(),);}transitionDifficulty() {const currentIndex = this.difficultyLevels.indexOf(this.currentDifficulty);if (currentIndex < this.difficultyLevels.length - 1) {this.currentDifficulty = this.difficultyLevels[currentIndex + 1];console.log(`Switching to ${this.currentDifficulty} difficulty level.`);this.generateQuestions();} else {setTimeout(() => {this.questions = [];this.isAllLevelsCompleted = true;this.isChecked = false;this.isValidationInProgress = false;this.isLoading = false;console.log("🎉 You have completed all difficulty levels.");this.triggerConfetti();}, 3000);}}shouldShowHint(index: number): boolean {return this.attemptCounts[index] < 1;}resetAllLevels() {this.isAllLevelsCompleted = false;this.currentDifficulty = "basic";this.questions = [];this.userAnswers = [];this.feedback = [];this.isChecked = false;this.isQuestionsGenerated = false;this.isValidationInProgress = false;this.isTopicLocked = false;this.hints = [];this.error = "";this.isGenerateDisabled = true;this.isResetDisabled = false;console.log("All levels reset. Starting from basic level.");}onAnswerChange(index: number) {if (!this.isValidationInProgress) {this.isChecked = false;this.validated = false;}const userAnswer = this.userAnswers[index]?.trim();console.log("User Answers:", this.userAnswers);console.log("Are All Answers Filled:", this.areAllAnswersFilled());if (userAnswer) {this.userAnswers[index] = userAnswer;} else {this.userAnswers[index] = "";}this.userAnswers = [...this.userAnswers];}goToHome() {this.router.navigate(["/home"]);}private confettiInterval: any;triggerConfetti() {if (this.confettiInterval) {clearInterval(this.confettiInterval);}this.confettiInterval = setInterval(() => {confetti({startVelocity: 30,spread: 360,ticks: 60,origin: {x: Math.random(),y: Math.random() - 0.2,},});}, 250);}stopConfetti() {this.isAllLevelsCompleted = false;if (this.confettiInterval) {clearInterval(this.confettiInterval);this.confettiInterval = null;}const canvas = document.querySelector("canvas.confetti-canvas");if (canvas) {canvas.remove();}const confettiDivs = document.querySelectorAll(".confetti, .ts-confetti");confettiDivs.forEach((el) => el.remove());}stopConfettiAndReset() {this.stopConfetti();this.resetTopic();}1 unmodified lineselectTopic(suggestion: string): void {this.topic = suggestion;this.showSuggestions = false;this.isGenerateDisabled = false;this.isResetDisabled = true;this.isDropdownDisabled = true;}hideSuggestions(): void {setTimeout(() => {this.showSuggestions = false;}, 150);}processHints(hints: string[]) {this.hints = hints;this.hasNewHints = hints.length > 0;if (this.hasNewHints) {setTimeout(() => {this.hasNewHints = false;}, 5000);}}closeHints(): void {1 unmodified linethis.hasNewHints = false;}openHints(): void {if (this.hints?.length) {this.isHintMenuVisible = true;this.hasNewHints = false;}}toggleHintMenu() {this.isHintMenuVisible = !this.isHintMenuVisible;if (this.isHintMenuVisible) this.showHintIcon = false; // hide after first use}onInput(event: any, index: number) {const value = event.target.value;const filteredValue = value.replace(/[^a-zA-Z]/g, "");this.userAnswers[index] = filteredValue;event.target.value = filteredValue;}//timer implemetation// --- Countdown state (per question) ---countdowns: number[] = []; // current number (5..0) for each questionshowCountdown: boolean[] = []; // whether to show the badgeprivate countdownTimers: { [idx: number]: any } = {}; // interval handlesprivate readonly COUNTDOWN_SECS = 10;// === Global countdown overlay state ===showGlobalCountdown = false; // controls the centered overlayglobalCountdown = 0; // 5..1private globalCountdownActive = false;private globalTimer: any = null;overlayCaption = '';private beginResetCountdown(index: number, seconds: number = this.COUNTDOWN_SECS): void {// avoid duplicate timers for the same questionif (this.countdownTimers[index]) { return; }this.countdowns[index] = seconds;this.showCountdown[index] = true;this.countdownTimers[index] = setInterval(() => {this.countdowns[index] = this.countdowns[index] - 1;if (this.countdowns[index] <= 0) {this.finishCountdown(index);}}, 1000);}/** Stop timer, hide badge, clear the wrong input, and allow retry. *//** Stop timer, hide badge, clear the wrong input, and allow retry. */private finishCountdown(index: number): void {const t = this.countdownTimers[index]; // FIX: use `this`, not `self`if (t) {clearInterval(t);delete this.countdownTimers[index];}this.showCountdown[index] = false;this.countdowns[index] = 0;// Clear only the wrong answer and allow the learner to try again.this.userAnswers[index] = '';// Turn off the global "checked" flag so inputs are not stuck red.this.isChecked = false;}private startGlobalCountdown(): void {if (this.globalCountdownActive) return; // prevent duplicatesthis.globalCountdownActive = true;this.showGlobalCountdown = true;this.globalCountdown = this.COUNTDOWN_SECS;this.globalTimer = setInterval(() => {this.globalCountdown--;if (this.globalCountdown <= 0) {this.stopGlobalCountdown();}}, 1000);}private stopGlobalCountdown(): void {if (this.globalTimer) {clearInterval(this.globalTimer);this.globalTimer = null;}this.showGlobalCountdown = false;this.globalCountdownActive = false;this.globalCountdown = 0;}ngOnDestroy(): void {this.stopGlobalCountdown();}private startOverlay(baseText: string, seconds: number = this.COUNTDOWN_SECS): void {if (this.globalTimer) { clearTimeout(this.globalTimer as any); this.globalTimer = null; }if (this.overlayTicker) { clearInterval(this.overlayTicker); this.overlayTicker = null; }this.globalCountdownActive = true;this.showGlobalCountdown = true;this.overlayCaption = baseText;this.globalCountdown = seconds;this.overlayEndTs = Date.now() + seconds * 1000;this.ringDashoffset = this.ringCircumference;4 unmodified linesconst elapsedMs = seconds * 1000 - remainingMs;this.globalCountdown = Math.ceil(remainingMs / 1000);const progress = Math.min(1, elapsedMs / (seconds * 1000));this.ringDashoffset = this.ringCircumference * (1 - progress);if (remainingMs <= 0) this.stopOverlay();}, 50) as any;this.globalTimer = setTimeout(() => this.stopOverlay(), seconds * 1000) as any;}private stopOverlay(): void {if (this.overlayTicker) { clearInterval(this.overlayTicker); this.overlayTicker = null; }if (this.globalTimer) { clearTimeout(this.globalTimer as any); this.globalTimer = null; }this.showGlobalCountdown = false;this.globalCountdownActive = false;this.overlayCaption = '';this.globalCountdown = 0;this.ringDashoffset = this.ringCircumference;}ringRadius = 90;ringCircumference = 2 * Math.PI * this.ringRadius;ringDashoffset = this.ringCircumference;private overlayTicker: any = null;private overlayEndTs = 0;}12345678910115 unmodified lines17181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654661 unmodified line4684694704714724734744754764771 unmodified line4794804814824834844854864874884894904914924934944954964974984995005014 unmodified lines506507508509510511512513514515516import { Component, OnDestroy } from '@angular/core';import { FormsModule } from '@angular/forms';import { CommonModule } from '@angular/common';import { GenerateQuestionsService } from './generate-questions.service';import { Router } from '@angular/router';import confetti from 'canvas-confetti';import { HeaderComponent } from '../shared/header/header.component';import { ButtonComponent } from '../shared/button/button.component';interface QuestionWithAnswer {question: string;5 unmodified linesindex: number;}const COUNTDOWN_SECONDS = 10;const HINT_AUTO_HIDE_MS = 5000;const NEXT_LEVEL_DELAY_MS = 2000;const COMPLETION_DELAY_MS = 3000;const CONFETTI_INTERVAL_MS = 250;const RING_RADIUS = 90;const INCORRECT_INDICATORS = ['incorrect', 'not correct', 'wrong', 'not right','is not', 'are not', 'isn\'t correct', 'aren\'t correct'];const CORRECT_INDICATORS = ['correct', 'right', 'yes', 'accurate','well done', 'good job', 'perfect'];@Component({selector: 'app-generate-questions',standalone: true,imports: [FormsModule, CommonModule, HeaderComponent, ButtonComponent],templateUrl: './generate-questions.component.html',styleUrls: ['./generate-questions.component.css']})export class GenerateQuestionsComponent implements OnDestroy {topic = '';readonly hardcodedTopics = ['Noun', 'Verb', 'Past Tense', 'Adjective', 'Present Continuous'];questions: Question[] = [];questionsWithAnswers: QuestionWithAnswer[] = [];userAnswers: string[] = [];answerStatuses: ('correct' | 'incorrect' | 'pending')[] = [];feedback: string[] = [];hints: string[] = [];readonlyAnswers: boolean[] = [];attemptCounts: Record<number, number> = {};currentDifficulty = 'basic';readonly difficultyLevels = ['basic', 'intermediate', 'expert'];showSuggestions = false;isQuestionsGenerated = false;isValidationInProgress = false;isFirstAttemptDone = false;isAllLevelsCompleted = false;isHintMenuVisible = false;isLoading = false;isChecked = false;error = '';get isGenerateDisabled() { return !this.topic.trim() || this.isQuestionsGenerated; }get isResetDisabled() { return !this.topic && !this.isQuestionsGenerated; }get isTopicLocked() { return this.isQuestionsGenerated; }get isDropdownDisabled() { return this.isQuestionsGenerated; }get showLevelTooltip() { return this.isQuestionsGenerated; }get activateLevelDot() { return this.isQuestionsGenerated; }private hasShownHintIcon = false;showHintIcon = false;hasNewHints = false;showGlobalCountdown = false;globalCountdown = 0;overlayCaption = '';ringCircumference = 2 * Math.PI * RING_RADIUS;ringDashoffset = this.ringCircumference;private globalTimer: any;private overlayTicker: any;private overlayEndTs = 0;private globalCountdownActive = false;private confettiInterval: any;constructor(private service: GenerateQuestionsService,private router: Router) {}ngOnDestroy(): void {this.clearTimers();this.stopConfettiAnimation();}private clearTimers(): void {if (this.globalTimer) clearInterval(this.globalTimer);if (this.overlayTicker) clearInterval(this.overlayTicker);this.globalTimer = null;this.overlayTicker = null;this.showGlobalCountdown = false;this.globalCountdownActive = false;}onTopicChange(): void {this.showSuggestions = !this.topic.trim();}getProgressWidth(): string {const index = this.difficultyLevels.indexOf(this.currentDifficulty);if (index === -1 || this.difficultyLevels.length <= 1) return '0%';return `${(index / (this.difficultyLevels.length - 1)) * 100}%`;}generateQuestions(): void {if (this.isAllLevelsCompleted) {this.error = 'Please reset to start over.';return;}this.resetQuestionState();this.service.generateQuestions(this.topic, this.currentDifficulty).subscribe({next: (response) => this.handleQuestionsResponse(response),error: (error) => this.handleQuestionsError(error)});}private handleQuestionsResponse(response: any): void {const rawQuestions = (response?.text ?? response?.generations?.[0]?.text ?? '').trim();if (!rawQuestions) {this.error = 'No questions generated. Please try again.';return;}this.isQuestionsGenerated = true;this.parseAndInitializeQuestions(rawQuestions);}private handleQuestionsError(error: any): void {this.error = error.status === 400 && error.error.message? error.error.message: 'Failed to fetch questions. Please try again later.';}private parseAndInitializeQuestions(rawQuestions: string): void {this.questionsWithAnswers = this.parseQuestions(rawQuestions);this.questions = this.splitQuestionsIntoParts(this.questionsWithAnswers);this.initializeAnswerArrays(this.questions.length);}private parseQuestions(text: string): QuestionWithAnswer[] {const regex = /(\d+\.\s*.+?_______)\s*(.*?)\s*\(([^)]+)\)\s*$/gm;const questions: QuestionWithAnswer[] = [];let match;while ((match = regex.exec(text)) !== null) {const questionText = match[1]?.trim();const afterBlank = match[2]?.replace(/^[_-]+/, '').replace(/^\s+/, ' ').replace(/\s{2,}/g, ' ');const correctAnswer = match[3]?.trim();if (questionText && correctAnswer) {questions.push({question: `${questionText}${afterBlank}`,correctAnswer});}}return questions;}private splitQuestionsIntoParts(questions: QuestionWithAnswer[]): Question[] {return questions.map((q, index) => {const normalized = q.question.replace(/\s*_{3,}\s*/g, '_______');const parts = normalized.split('_______').map(p => p.replace(/[_]+/g, '').trim());return { parts, index };});}private initializeAnswerArrays(length: number): void {this.userAnswers = Array(length).fill('');this.answerStatuses = Array(length).fill('pending');this.feedback = Array(length).fill('');this.readonlyAnswers = Array(length).fill(false);this.hints = [];this.attemptCounts = {};for (let i = 0; i < length; i++) {this.attemptCounts[i] = 0;}}private resetQuestionState(): void {this.hints = [];this.showSuggestions = false;this.readonlyAnswers = [];}resetTopic(): void {this.topic = '';this.questions = [];this.questionsWithAnswers = [];this.userAnswers = [];this.answerStatuses = [];this.readonlyAnswers = [];this.feedback = [];this.hints = [];this.attemptCounts = {};this.isQuestionsGenerated = false;this.isValidationInProgress = false;this.isFirstAttemptDone = false;this.isAllLevelsCompleted = false;this.hasNewHints = false;this.showSuggestions = false;this.isChecked = false;this.currentDifficulty = 'basic';this.error = '';this.clearTimers();this.stopConfetti();}areAllAnswersFilled(): boolean {return this.userAnswers.every(answer => answer?.trim());}closeErrorPopup(): void {this.error = '';}private parseAIValidation(response: string): boolean {if (!response) return false;const lower = response.toLowerCase();if (INCORRECT_INDICATORS.some(ind => lower.includes(ind))) return false;if (CORRECT_INDICATORS.some(ind => lower.includes(ind))) return true;return false;}checkAllAnswers(): void {this.isValidationInProgress = true;this.isLoading = true;this.isFirstAttemptDone = true;const payload = this.questions.map((q, i) => ({topic: this.topic,question: q.parts.join('_______'),user_answer: this.userAnswers[i]}));this.service.validateAllAnswers(payload).subscribe({next: (response) => this.handleValidationResponse(response),error: (error) => this.handleValidationError(error)});}private handleValidationResponse(response: any): void {if (!response.results?.length) {this.error = 'Failed to validate answers. Please try again.';this.resetValidationState();return;}let hadFirstWrong = false;let hadSecondWrong = false;response.results.forEach((result: any, index: number) => {this.attemptCounts[index]++;const isCorrect = this.parseAIValidation(result.validation_response);this.feedback[index] = result.validation_response || 'No feedback provided.';if (isCorrect) {this.markAsCorrect(index);} else {const attemptResult = this.handleIncorrectAttempt(index, result.hint);hadFirstWrong = hadFirstWrong || attemptResult.first;hadSecondWrong = hadSecondWrong || attemptResult.second;}});this.handleHintsDisplay(hadFirstWrong || hadSecondWrong);if (!hadSecondWrong) {this.checkLevelCompletion();}this.resetValidationState();}private markAsCorrect(index: number): void {this.readonlyAnswers[index] = true;this.hints[index] = '';this.answerStatuses[index] = 'correct';this.userAnswers[index] = this.userAnswers[index].trim();}private handleIncorrectAttempt(index: number, hint: string): { first: boolean; second: boolean } {this.answerStatuses[index] = 'incorrect';this.hints[index] = hint?.trim() || '';if (this.attemptCounts[index] === 1) {this.scheduleAnswerClear(index);return { first: true, second: false };} else if (this.attemptCounts[index] >= 2) {this.scheduleAnswerReveal(index);return { first: false, second: true };}return { first: false, second: false };}private scheduleAnswerClear(index: number): void {if (!this.globalCountdownActive) this.startOverlay('Try again in');setTimeout(() => {this.userAnswers[index] = '';this.answerStatuses[index] = 'pending';this.clearTimers();}, COUNTDOWN_SECONDS * 1000);}private scheduleAnswerReveal(index: number): void {if (!this.globalCountdownActive) this.startOverlay('Showing correct answer in');setTimeout(() => {this.userAnswers[index] = this.questionsWithAnswers[index].correctAnswer;this.answerStatuses[index] = 'correct';this.readonlyAnswers[index] = true;this.clearTimers();if (this.areAllCorrectAnswersDisplayed()) {if (this.isLastLevel()) {this.scheduleCompletion();} else {this.scheduleNextLevel();}}}, COUNTDOWN_SECONDS * 1000);}private scheduleCompletion(): void {this.startOverlay('Finishing in');setTimeout(() => {this.clearTimers();this.isAllLevelsCompleted = true;this.triggerConfetti();}, COUNTDOWN_SECONDS * 1000);}private handleHintsDisplay(hasWrongAnswers: boolean): void {this.hasNewHints = this.hints.some(h => h?.trim());if (this.hasNewHints) {setTimeout(() => { this.hasNewHints = false; }, HINT_AUTO_HIDE_MS);}if (!this.hasShownHintIcon && (this.hasNewHints || hasWrongAnswers)) {this.showHintIcon = true;this.hasShownHintIcon = true;}}private checkLevelCompletion(): void {if (this.areAllCorrectAnswersDisplayed()) {if (this.isLastLevel()) {this.scheduleCompletion();} else {this.scheduleNextLevel();}}}private scheduleNextLevel(): void {this.clearTimers();this.startOverlay('Moving to next level in');setTimeout(() => {this.clearTimers();setTimeout(() => this.transitionDifficulty(), NEXT_LEVEL_DELAY_MS);}, COUNTDOWN_SECONDS * 1000);}private handleValidationError(error: any): void {this.error = 'Error validating answers. Please try again later.';this.resetValidationState();}private resetValidationState(): void {this.isValidationInProgress = false;this.isLoading = false;}isLastLevel(): boolean {return this.currentDifficulty === this.difficultyLevels[this.difficultyLevels.length - 1];}areAllCorrectAnswersDisplayed(): boolean {return this.readonlyAnswers.every(readonly => readonly);}transitionDifficulty(): void {const currentIndex = this.difficultyLevels.indexOf(this.currentDifficulty);if (currentIndex < this.difficultyLevels.length - 1) {this.currentDifficulty = this.difficultyLevels[currentIndex + 1];this.generateQuestions();} else {setTimeout(() => {this.questions = [];this.isAllLevelsCompleted = true;this.triggerConfetti();}, COMPLETION_DELAY_MS);}}onAnswerChange(index: number): void {this.userAnswers[index] = this.userAnswers[index]?.trim() || '';this.userAnswers = [...this.userAnswers];}goToHome(): void {this.router.navigate(['/home']);}triggerConfetti(): void {if (this.confettiInterval) clearInterval(this.confettiInterval);this.confettiInterval = setInterval(() => {confetti({startVelocity: 30,spread: 360,ticks: 60,origin: { x: Math.random(), y: Math.random() - 0.2 }});}, CONFETTI_INTERVAL_MS);}stopConfetti(): void {this.isAllLevelsCompleted = false;this.stopConfettiAnimation();}private stopConfettiAnimation(): void {if (this.confettiInterval) {clearInterval(this.confettiInterval);this.confettiInterval = null;}document.querySelector('canvas.confetti-canvas')?.remove();document.querySelectorAll('.confetti, .ts-confetti').forEach(el => el.remove());}stopConfettiAndReset(): void {this.stopConfetti();this.resetTopic();}1 unmodified lineselectTopic(suggestion: string): void {this.topic = suggestion;this.showSuggestions = false;}hideSuggestions(): void {setTimeout(() => { this.showSuggestions = false; }, 150);}closeHints(): void {1 unmodified linethis.hasNewHints = false;}toggleHintMenu(): void {this.isHintMenuVisible = !this.isHintMenuVisible;if (this.isHintMenuVisible) this.showHintIcon = false;}onInput(event: any, index: number): void {const filtered = event.target.value.replace(/[^a-zA-Z]/g, '');this.userAnswers[index] = filtered;event.target.value = filtered;}private startOverlay(caption: string, seconds = COUNTDOWN_SECONDS): void {this.clearTimers();this.globalCountdownActive = true;this.showGlobalCountdown = true;this.overlayCaption = caption;this.globalCountdown = seconds;this.overlayEndTs = Date.now() + seconds * 1000;this.ringDashoffset = this.ringCircumference;4 unmodified linesconst elapsedMs = seconds * 1000 - remainingMs;this.globalCountdown = Math.ceil(remainingMs / 1000);this.ringDashoffset = this.ringCircumference * (1 - Math.min(1, elapsedMs / (seconds * 1000)));if (remainingMs <= 0) this.clearTimers();}, 50);this.globalTimer = setTimeout(() => this.clearTimers(), seconds * 1000);}}
1234567891011121314151617181920212223242526272829303132333435363738import { Injectable } from '@angular/core';import { HttpClient } from '@angular/common/http';import { Observable } from 'rxjs';@Injectable({providedIn: 'root'})export class GenerateQuestionsService {private baseUrl = location.hostname.endsWith('hf.space')? 'https://pykara-py-learn-backend.hf.space/media': 'http://localhost:5000/media';constructor(private http: HttpClient) { }// Method to get questions from the backendgenerateQuestions(topic: string, difficulty: string): Observable<any> {return this.http.post<any>(`${this.baseUrl}/generate-questions`, { topic, difficulty });}// Method to validate the user's answer for a specific questionvalidateAnswer(question: string, userAnswer: string, topic: string): Observable<any> {return this.http.post<any>(`${this.baseUrl}/validate-answer`, {question,user_answer: userAnswer,topic});}validateAllAnswers(questions: { topic: string; question: string; user_answer: string }[]): Observable<any> {return this.http.post<any>(`${this.baseUrl}/validate-all-answers`, { questions });}}12345678910111213141516171819202122232425262728293031323334import { Injectable } from '@angular/core';import { HttpClient } from '@angular/common/http';import { Observable } from 'rxjs';import { environment } from '../../environments/environment';@Injectable({providedIn: 'root'})export class GenerateQuestionsService {private readonly baseUrl = environment.apiBaseUrl;constructor(private http: HttpClient) {}/*** Generate grammar questions for a given topic and difficulty level.** @param topic - The grammar topic* @param difficulty - The difficulty level: 'basic', 'intermediate', or 'expert'* @returns Observable with generated questions*/generateQuestions(topic: string, difficulty: string): Observable<any> {return this.http.post<any>(`${this.baseUrl}/generate-questions`, { topic, difficulty });}/*** Validate multiple user answers in a single batch request.** @param questions - Array of questions with user answers* @returns Observable with validation results and hints*/validateAllAnswers(questions: { topic: string; question: string; user_answer: string }[]): Observable<any> {return this.http.post<any>(`${this.baseUrl}/validate-all-answers`, { questions });}}
1234export const environment = { production: true, apiBaseUrl: 'https://pykara-py-learn-backend.hf.space/media'};1234export const environment = { production: false, apiBaseUrl: 'http://localhost:5000/media'};package-lock.json+56-6
src/app/generate-questions/generate-questions.component.html+3-3
src/app/generate-questions/generate-questions.component.ts+360-566
src/app/generate-questions/generate-questions.service.ts+16-20
src/environments/environment.prod.tsAdded+4
src/environments/environment.tsAdded+4