diff --git a/.gitignore b/.gitignore deleted file mode 100644 index a1c2a23..0000000 --- a/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# Compiled class file -*.class - -# Log file -*.log - -# BlueJ files -*.ctxt - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -*.war -*.nar -*.ear -*.zip -*.tar.gz -*.rar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* diff --git a/.idea/JavaStandaloneDesktopApplication_for_Java_Course.iml b/.idea/JavaStandaloneDesktopApplication_for_Java_Course.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/JavaStandaloneDesktopApplication_for_Java_Course.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..7aa4c67 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..1f2cab7 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + 1602056444321 + + + + \ No newline at end of file diff --git a/Huy/.gradle/5.4.1/executionHistory/executionHistory.bin b/Huy/.gradle/5.4.1/executionHistory/executionHistory.bin new file mode 100644 index 0000000..ae94782 Binary files /dev/null and b/Huy/.gradle/5.4.1/executionHistory/executionHistory.bin differ diff --git a/Huy/.gradle/5.4.1/executionHistory/executionHistory.lock b/Huy/.gradle/5.4.1/executionHistory/executionHistory.lock new file mode 100644 index 0000000..2f1de0a Binary files /dev/null and b/Huy/.gradle/5.4.1/executionHistory/executionHistory.lock differ diff --git a/Huy/.gradle/5.4.1/fileChanges/last-build.bin b/Huy/.gradle/5.4.1/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/Huy/.gradle/5.4.1/fileChanges/last-build.bin differ diff --git a/Huy/.gradle/5.4.1/fileContent/fileContent.lock b/Huy/.gradle/5.4.1/fileContent/fileContent.lock new file mode 100644 index 0000000..f3a19a6 Binary files /dev/null and b/Huy/.gradle/5.4.1/fileContent/fileContent.lock differ diff --git a/Huy/.gradle/5.4.1/fileHashes/fileHashes.bin b/Huy/.gradle/5.4.1/fileHashes/fileHashes.bin new file mode 100644 index 0000000..99cb908 Binary files /dev/null and b/Huy/.gradle/5.4.1/fileHashes/fileHashes.bin differ diff --git a/Huy/.gradle/5.4.1/fileHashes/fileHashes.lock b/Huy/.gradle/5.4.1/fileHashes/fileHashes.lock new file mode 100644 index 0000000..4602d50 Binary files /dev/null and b/Huy/.gradle/5.4.1/fileHashes/fileHashes.lock differ diff --git a/Huy/.gradle/5.4.1/fileHashes/resourceHashesCache.bin b/Huy/.gradle/5.4.1/fileHashes/resourceHashesCache.bin new file mode 100644 index 0000000..08920c0 Binary files /dev/null and b/Huy/.gradle/5.4.1/fileHashes/resourceHashesCache.bin differ diff --git a/Huy/.gradle/5.4.1/gc.properties b/Huy/.gradle/5.4.1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/Huy/.gradle/5.4.1/javaCompile/classAnalysis.bin b/Huy/.gradle/5.4.1/javaCompile/classAnalysis.bin new file mode 100644 index 0000000..220ffeb Binary files /dev/null and b/Huy/.gradle/5.4.1/javaCompile/classAnalysis.bin differ diff --git a/Huy/.gradle/5.4.1/javaCompile/jarAnalysis.bin b/Huy/.gradle/5.4.1/javaCompile/jarAnalysis.bin new file mode 100644 index 0000000..c6b17b3 Binary files /dev/null and b/Huy/.gradle/5.4.1/javaCompile/jarAnalysis.bin differ diff --git a/Huy/.gradle/5.4.1/javaCompile/javaCompile.lock b/Huy/.gradle/5.4.1/javaCompile/javaCompile.lock new file mode 100644 index 0000000..c27533b Binary files /dev/null and b/Huy/.gradle/5.4.1/javaCompile/javaCompile.lock differ diff --git a/Huy/.gradle/5.4.1/javaCompile/taskHistory.bin b/Huy/.gradle/5.4.1/javaCompile/taskHistory.bin new file mode 100644 index 0000000..eb3d41e Binary files /dev/null and b/Huy/.gradle/5.4.1/javaCompile/taskHistory.bin differ diff --git a/Huy/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/Huy/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000..1872388 Binary files /dev/null and b/Huy/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/Huy/.gradle/buildOutputCleanup/cache.properties b/Huy/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..c176539 --- /dev/null +++ b/Huy/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Thu Oct 08 09:17:00 ICT 2020 +gradle.version=5.4.1 diff --git a/Huy/.gradle/buildOutputCleanup/outputFiles.bin b/Huy/.gradle/buildOutputCleanup/outputFiles.bin new file mode 100644 index 0000000..17ce105 Binary files /dev/null and b/Huy/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/Huy/.gradle/vcs-1/gc.properties b/Huy/.gradle/vcs-1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/Huy/.idea/.gitignore b/Huy/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/Huy/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/Huy/.idea/Hao.iml b/Huy/.idea/Hao.iml new file mode 100644 index 0000000..78b2cc5 --- /dev/null +++ b/Huy/.idea/Hao.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Huy/.idea/artifacts/Hao_desktop_main_jar.xml b/Huy/.idea/artifacts/Hao_desktop_main_jar.xml new file mode 100644 index 0000000..8f58d56 --- /dev/null +++ b/Huy/.idea/artifacts/Hao_desktop_main_jar.xml @@ -0,0 +1,28 @@ + + + $PROJECT_DIR$/out/artifacts/Hao_desktop_main_jar + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Huy/.idea/compiler.xml b/Huy/.idea/compiler.xml new file mode 100644 index 0000000..1c5ab05 --- /dev/null +++ b/Huy/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Huy/.idea/gradle.xml b/Huy/.idea/gradle.xml new file mode 100644 index 0000000..8a8d7a9 --- /dev/null +++ b/Huy/.idea/gradle.xml @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file diff --git a/Huy/.idea/jarRepositories.xml b/Huy/.idea/jarRepositories.xml new file mode 100644 index 0000000..97a3718 --- /dev/null +++ b/Huy/.idea/jarRepositories.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Huy/.idea/misc.xml b/Huy/.idea/misc.xml new file mode 100644 index 0000000..08d187b --- /dev/null +++ b/Huy/.idea/misc.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/Huy/.idea/vcs.xml b/Huy/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/Huy/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Huy/build.gradle b/Huy/build.gradle new file mode 100644 index 0000000..0b817eb --- /dev/null +++ b/Huy/build.gradle @@ -0,0 +1,63 @@ +buildscript { + + + repositories { + mavenLocal() + mavenCentral() + maven { url "https://plugins.gradle.org/m2/" } + maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } + jcenter() + google() + } + dependencies { + + + } +} + +allprojects { + apply plugin: "eclipse" + + version = '1.0' + ext { + appName = "Demo" + gdxVersion = '1.9.11' + roboVMVersion = '2.3.10' + box2DLightsVersion = '1.4' + ashleyVersion = '1.7.0' + aiVersion = '1.8.0' + } + + repositories { + mavenLocal() + mavenCentral() + jcenter() + google() + maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } + maven { url "https://oss.sonatype.org/content/repositories/releases/" } + } +} + +project(":desktop") { + apply plugin: "java-library" + + + dependencies { + implementation project(":core") + api "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" + api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" + api "com.badlogicgames.gdx:gdx-tools:$gdxVersion" + + } +} + +project(":core") { + apply plugin: "java-library" + + + dependencies { + api "com.badlogicgames.gdx:gdx:$gdxVersion" + api "com.badlogicgames.ashley:ashley:$ashleyVersion" + + } +} diff --git a/Huy/core/assets/Audio/README.md b/Huy/core/assets/Audio/README.md new file mode 100644 index 0000000..45d50c5 --- /dev/null +++ b/Huy/core/assets/Audio/README.md @@ -0,0 +1 @@ +# For sounds and stuff diff --git a/Huy/core/assets/Audio/ZA-WARUDO.mp3 b/Huy/core/assets/Audio/ZA-WARUDO.mp3 new file mode 100644 index 0000000..79299cd Binary files /dev/null and b/Huy/core/assets/Audio/ZA-WARUDO.mp3 differ diff --git a/Huy/core/assets/Bullet_plane.png b/Huy/core/assets/Bullet_plane.png new file mode 100644 index 0000000..d6fb36d Binary files /dev/null and b/Huy/core/assets/Bullet_plane.png differ diff --git a/Huy/core/assets/Enemy.png b/Huy/core/assets/Enemy.png new file mode 100644 index 0000000..5f41564 Binary files /dev/null and b/Huy/core/assets/Enemy.png differ diff --git a/Huy/core/assets/META-INF/MANIFEST.MF b/Huy/core/assets/META-INF/MANIFEST.MF new file mode 100644 index 0000000..788c1a2 --- /dev/null +++ b/Huy/core/assets/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: game.demo.desktop.DesktopLauncher + diff --git a/Huy/core/assets/Plane.png b/Huy/core/assets/Plane.png new file mode 100644 index 0000000..f4d0b59 Binary files /dev/null and b/Huy/core/assets/Plane.png differ diff --git a/Huy/core/assets/Star0.png b/Huy/core/assets/Star0.png new file mode 100644 index 0000000..8903a23 Binary files /dev/null and b/Huy/core/assets/Star0.png differ diff --git a/Huy/core/assets/Star1.png b/Huy/core/assets/Star1.png new file mode 100644 index 0000000..27618fe Binary files /dev/null and b/Huy/core/assets/Star1.png differ diff --git a/Huy/core/assets/Star2.png b/Huy/core/assets/Star2.png new file mode 100644 index 0000000..a186f92 Binary files /dev/null and b/Huy/core/assets/Star2.png differ diff --git a/Huy/core/assets/Star3.png b/Huy/core/assets/Star3.png new file mode 100644 index 0000000..b4df82c Binary files /dev/null and b/Huy/core/assets/Star3.png differ diff --git a/Huy/core/assets/badlogic.jpg b/Huy/core/assets/badlogic.jpg new file mode 100644 index 0000000..4390da6 Binary files /dev/null and b/Huy/core/assets/badlogic.jpg differ diff --git a/Huy/core/assets/database.txt b/Huy/core/assets/database.txt new file mode 100644 index 0000000..e69de29 diff --git a/Huy/core/assets/skin/ArcadeClassic.fnt b/Huy/core/assets/skin/ArcadeClassic.fnt new file mode 100644 index 0000000..ef5dcb1 --- /dev/null +++ b/Huy/core/assets/skin/ArcadeClassic.fnt @@ -0,0 +1,71 @@ +info face="ArcadeClassic" size=32 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=1,1,1,1 spacing=-2,-2 +common lineHeight=33 base=26 scaleW=512 scaleH=512 pages=1 packed=0 +page id=0 file="ArcadeClassic.png" +chars count=66 +char id=10 x=0 y=0 width=15 height=28 xoffset=1 yoffset=-1 xadvance=16 page=0 chnl=0 +char id=32 x=0 y=0 width=0 height=0 xoffset=-1 yoffset=25 xadvance=4 page=0 chnl=0 +char id=33 x=146 y=28 width=13 height=18 xoffset=0 yoffset=7 xadvance=22 page=0 chnl=0 +char id=34 x=0 y=0 width=15 height=28 xoffset=1 yoffset=-1 xadvance=16 page=0 chnl=0 +char id=48 x=127 y=28 width=19 height=18 xoffset=-1 yoffset=7 xadvance=18 page=0 chnl=0 +char id=49 x=475 y=0 width=16 height=18 xoffset=1 yoffset=7 xadvance=18 page=0 chnl=0 +char id=50 x=491 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=51 x=0 y=28 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=52 x=18 y=28 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=53 x=36 y=28 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=54 x=54 y=28 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=55 x=72 y=28 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=56 x=90 y=28 width=19 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=57 x=109 y=28 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=65 x=15 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=66 x=33 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=67 x=51 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=68 x=69 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=69 x=87 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=18 page=0 chnl=0 +char id=70 x=105 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=71 x=123 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=72 x=141 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=73 x=159 y=0 width=16 height=18 xoffset=0 yoffset=7 xadvance=17 page=0 chnl=0 +char id=74 x=175 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=75 x=193 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=76 x=211 y=0 width=16 height=18 xoffset=-2 yoffset=7 xadvance=18 page=0 chnl=0 +char id=77 x=227 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=78 x=245 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=79 x=263 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=80 x=281 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=81 x=299 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=82 x=317 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=83 x=335 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=84 x=353 y=0 width=16 height=18 xoffset=-3 yoffset=7 xadvance=17 page=0 chnl=0 +char id=85 x=369 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=86 x=387 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=18 page=0 chnl=0 +char id=87 x=405 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=88 x=423 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=89 x=441 y=0 width=16 height=18 xoffset=0 yoffset=7 xadvance=17 page=0 chnl=0 +char id=90 x=457 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=97 x=15 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=98 x=33 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=99 x=51 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=100 x=69 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=101 x=87 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=18 page=0 chnl=0 +char id=102 x=105 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=103 x=123 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=104 x=141 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=105 x=159 y=0 width=16 height=18 xoffset=0 yoffset=7 xadvance=17 page=0 chnl=0 +char id=106 x=175 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=107 x=193 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=108 x=211 y=0 width=16 height=18 xoffset=-2 yoffset=7 xadvance=18 page=0 chnl=0 +char id=109 x=227 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=110 x=245 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=111 x=263 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=112 x=281 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=113 x=299 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=114 x=317 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=115 x=335 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=116 x=353 y=0 width=16 height=18 xoffset=-3 yoffset=7 xadvance=17 page=0 chnl=0 +char id=117 x=369 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=118 x=387 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=18 page=0 chnl=0 +char id=119 x=405 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=120 x=423 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=121 x=441 y=0 width=16 height=18 xoffset=0 yoffset=7 xadvance=17 page=0 chnl=0 +char id=122 x=457 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +kernings count=0 diff --git a/Huy/core/assets/skin/ArcadeClassic.png b/Huy/core/assets/skin/ArcadeClassic.png new file mode 100644 index 0000000..475c9d6 Binary files /dev/null and b/Huy/core/assets/skin/ArcadeClassic.png differ diff --git a/Huy/core/assets/skin/ButtonPack.atlas b/Huy/core/assets/skin/ButtonPack.atlas new file mode 100644 index 0000000..d7e5f98 --- /dev/null +++ b/Huy/core/assets/skin/ButtonPack.atlas @@ -0,0 +1,111 @@ + +ButtonPack.png +size: 2048,512 +format: RGBA8888 +filter: Nearest,Nearest +repeat: none +ExitButtonDown + rotate: false + xy: 1558, 274 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +ExitButtonHover + rotate: false + xy: 1108, 138 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +ExitButtonUp + rotate: false + xy: 658, 2 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +MainMenuButtonDown + rotate: false + xy: 2, 138 + size: 448, 134 + orig: 448, 134 + offset: 0, 0 + index: -1 +MainMenuButtonHover + rotate: false + xy: 452, 274 + size: 448, 134 + orig: 448, 134 + offset: 0, 0 + index: -1 +MainMenuButtonUp + rotate: false + xy: 2, 274 + size: 448, 134 + orig: 448, 134 + offset: 0, 0 + index: -1 +PlayButtonDown + rotate: false + xy: 1406, 138 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +PlayButtonHover + rotate: false + xy: 1254, 2 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +PlayButtonUp + rotate: false + xy: 956, 2 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +ResumeButtonDown + rotate: false + xy: 1230, 274 + size: 326, 134 + orig: 326, 134 + offset: 0, 0 + index: -1 +ResumeButtonHover + rotate: false + xy: 780, 138 + size: 326, 134 + orig: 326, 134 + offset: 0, 0 + index: -1 +ResumeButtonUp + rotate: false + xy: 902, 274 + size: 326, 134 + orig: 326, 134 + offset: 0, 0 + index: -1 +RetryButtonDown + rotate: false + xy: 330, 2 + size: 326, 134 + orig: 326, 134 + offset: 0, 0 + index: -1 +RetryButtonHover + rotate: false + xy: 2, 2 + size: 326, 134 + orig: 326, 134 + offset: 0, 0 + index: -1 +RetryButtonUp + rotate: false + xy: 452, 138 + size: 326, 134 + orig: 326, 134 + offset: 0, 0 + index: -1 diff --git a/Huy/core/assets/skin/ButtonPack.json b/Huy/core/assets/skin/ButtonPack.json new file mode 100644 index 0000000..f19178f --- /dev/null +++ b/Huy/core/assets/skin/ButtonPack.json @@ -0,0 +1,34 @@ +{ + com.badlogic.gdx.scenes.scene2d.ui.ImageButton$ImageButtonStyle: { + default: { + up: PlayButtonUp + down: PlayButtonDown + over: PlayButtonHover + }, + Play: { + up: PlayButtonUp + down: PlayButtonDown + over: PlayButtonHover + }, + Exit: { + up: ExitButtonUp + down: ExitButtonDown + over: ExitButtonHover + } + Resume: { + up: ResumeButtonUp + down: ResumeButtonDown + over: ResumeButtonHover + }, + Retry: { + up: RetryButtonUp + down: RetryButtonDown + over: RetryButtonHover + } + MainMenu: { + up: MainMenuButtonUp + down: MainMenuButtonDown + over: MainMenuButtonHover + } + } +} \ No newline at end of file diff --git a/Huy/core/assets/skin/ButtonPack.png b/Huy/core/assets/skin/ButtonPack.png new file mode 100644 index 0000000..8cf3d7f Binary files /dev/null and b/Huy/core/assets/skin/ButtonPack.png differ diff --git a/Huy/core/assets/skin/ButtonPackTestField.json b/Huy/core/assets/skin/ButtonPackTestField.json new file mode 100644 index 0000000..884dc43 --- /dev/null +++ b/Huy/core/assets/skin/ButtonPackTestField.json @@ -0,0 +1,24 @@ +{ +com.badlogic.gdx.graphics.g2d.BitmapFont: { + minecraft: { + file: minecraft.fnt + } +} +com.badlogic.gdx.scenes.scene2d.ui.ImageButton$ImageButtonStyle: { + default: { + up: PlayButtonUp + down: PlayButtonDown + over: PlayButtonHover + } + Play: { + up: PlayButtonUp + down: PlayButtonDown + over: PlayButtonHover + } + Exit: { + up: ExitButtonUp + down: ExitButtonDown + over: ExitButtonHover + } +} +} \ No newline at end of file diff --git a/Huy/core/assets/skin/GAMEOVER.png b/Huy/core/assets/skin/GAMEOVER.png new file mode 100644 index 0000000..524ca13 Binary files /dev/null and b/Huy/core/assets/skin/GAMEOVER.png differ diff --git a/Huy/core/assets/skin/GameTitle.png b/Huy/core/assets/skin/GameTitle.png new file mode 100644 index 0000000..62b55b6 Binary files /dev/null and b/Huy/core/assets/skin/GameTitle.png differ diff --git a/Huy/core/assets/skin/Pause.png b/Huy/core/assets/skin/Pause.png new file mode 100644 index 0000000..171044e Binary files /dev/null and b/Huy/core/assets/skin/Pause.png differ diff --git a/Huy/core/assets/skin/README.md b/Huy/core/assets/skin/README.md new file mode 100644 index 0000000..7ed66f0 --- /dev/null +++ b/Huy/core/assets/skin/README.md @@ -0,0 +1 @@ +# Skin stuff diff --git a/Huy/core/assets/skin/Rectangle 1.png b/Huy/core/assets/skin/Rectangle 1.png new file mode 100644 index 0000000..28f6afe Binary files /dev/null and b/Huy/core/assets/skin/Rectangle 1.png differ diff --git a/Huy/core/assets/skin/Textfield.atlas b/Huy/core/assets/skin/Textfield.atlas new file mode 100644 index 0000000..a43181e --- /dev/null +++ b/Huy/core/assets/skin/Textfield.atlas @@ -0,0 +1,83 @@ + +Textfield.png +size: 2048,2048 +format: RGBA8888 +filter: Linear,Linear +repeat: none +Background_mainmenu + rotate: false + xy: 1, 1243 + size: 1280, 720 + orig: 1280, 720 + offset: 0, 0 + index: -1 +ExitButtonDown + rotate: false + xy: 1283, 1634 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +ExitButtonHover + rotate: false + xy: 1, 398 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +ExitButtonUp + rotate: false + xy: 1283, 1498 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +Group 1 + rotate: false + xy: 1, 1048 + size: 682, 193 + orig: 682, 193 + offset: 0, 0 + index: -1 +PlayButtonDown + rotate: false + xy: 1581, 1634 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +PlayButtonHover + rotate: false + xy: 1, 262 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +PlayButtonUp + rotate: false + xy: 1283, 1362 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +Rectangle 1 + rotate: false + xy: 685, 1151 + size: 489, 90 + orig: 489, 90 + offset: 0, 0 + index: -1 +clicked + rotate: false + xy: 1283, 1770 + size: 682, 193 + orig: 682, 193 + offset: 0, 0 + index: -1 +minecraft + rotate: false + xy: 1, 534 + size: 512, 512 + orig: 512, 512 + offset: 0, 0 + index: -1 diff --git a/Huy/core/assets/skin/Textfield.json b/Huy/core/assets/skin/Textfield.json new file mode 100644 index 0000000..f8420ab --- /dev/null +++ b/Huy/core/assets/skin/Textfield.json @@ -0,0 +1,57 @@ +{ +com.badlogic.gdx.graphics.g2d.BitmapFont: { + minecraft: { + file: minecraft.fnt + } +} +com.badlogic.gdx.graphics.Color: { + RGBA_255_255_255_255: { + r: 1 + g: 1 + b: 1 + a: 1 + } +} +com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable: { + Group 1: { + region: Group 1 + minWidth: 13 + minHeight: 3 + } +} +com.badlogic.gdx.scenes.scene2d.ui.ImageButton$ImageButtonStyle: { + default: { + up: PlayButtonUp + down: PlayButtonDown + over: PlayButtonHover + } + Play: { + up: PlayButtonUp + down: PlayButtonDown + over: PlayButtonHover + } + Exit: { + up: ExitButtonUp + down: ExitButtonDown + over: ExitButtonHover + } +} +com.badlogic.gdx.scenes.scene2d.ui.Label$LabelStyle: { + default: { + font: minecraft + fontColor: RGBA_255_255_255_255 + } +} +com.badlogic.gdx.scenes.scene2d.ui.TextField$TextFieldStyle: { + default: { + font: minecraft + fontColor: RGBA_255_255_255_255 + background: Rectangle 1 + } +} +com.badlogic.gdx.scenes.scene2d.ui.TextTooltip$TextTooltipStyle: { + default: { + label: default + } +} +} \ No newline at end of file diff --git a/Huy/core/assets/skin/Textfield.png b/Huy/core/assets/skin/Textfield.png new file mode 100644 index 0000000..d44f513 Binary files /dev/null and b/Huy/core/assets/skin/Textfield.png differ diff --git a/Huy/core/assets/skin/minecraft.fnt b/Huy/core/assets/skin/minecraft.fnt new file mode 100644 index 0000000..8070467 --- /dev/null +++ b/Huy/core/assets/skin/minecraft.fnt @@ -0,0 +1,102 @@ +info face="Minecraft" size=32 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=1,1,1,1 spacing=-2,-2 +common lineHeight=35 base=24 scaleW=512 scaleH=512 pages=1 packed=0 +page id=0 file="minecraft.png" +chars count=97 +char id=0 x=194 y=60 width=10 height=23 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=0 +char id=10 x=0 y=0 width=0 height=0 xoffset=-1 yoffset=0 xadvance=0 page=0 chnl=0 +char id=32 x=0 y=0 width=0 height=0 xoffset=-1 yoffset=0 xadvance=10 page=0 chnl=0 +char id=33 x=0 y=60 width=6 height=26 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 +char id=34 x=22 y=86 width=18 height=14 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=35 x=114 y=60 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=36 x=80 y=0 width=18 height=30 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=37 x=88 y=60 width=26 height=26 xoffset=1 yoffset=-1 xadvance=28 page=0 chnl=0 +char id=38 x=136 y=60 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=39 x=76 y=86 width=6 height=10 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 +char id=40 x=24 y=60 width=14 height=26 xoffset=-1 yoffset=-1 xadvance=14 page=0 chnl=0 +char id=41 x=38 y=60 width=14 height=26 xoffset=-1 yoffset=-1 xadvance=14 page=0 chnl=0 +char id=42 x=496 y=60 width=14 height=14 xoffset=-1 yoffset=-1 xadvance=14 page=0 chnl=0 +char id=43 x=478 y=60 width=18 height=18 xoffset=1 yoffset=3 xadvance=20 page=0 chnl=0 +char id=44 x=82 y=86 width=6 height=10 xoffset=-1 yoffset=19 xadvance=6 page=0 chnl=0 +char id=45 x=102 y=86 width=12 height=6 xoffset=-1 yoffset=13 xadvance=12 page=0 chnl=0 +char id=46 x=96 y=86 width=6 height=6 xoffset=-1 yoffset=19 xadvance=6 page=0 chnl=0 +char id=47 x=52 y=60 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=48 x=492 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=49 x=326 y=34 width=14 height=26 xoffset=-1 yoffset=-1 xadvance=14 page=0 chnl=0 +char id=50 x=340 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=51 x=358 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=52 x=376 y=34 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=53 x=396 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=54 x=418 y=34 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=55 x=438 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=56 x=456 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=57 x=474 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=58 x=420 y=60 width=6 height=20 xoffset=1 yoffset=5 xadvance=8 page=0 chnl=0 +char id=59 x=188 y=60 width=6 height=24 xoffset=1 yoffset=5 xadvance=8 page=0 chnl=0 +char id=60 x=450 y=60 width=14 height=18 xoffset=-1 yoffset=3 xadvance=14 page=0 chnl=0 +char id=61 x=58 y=86 width=18 height=14 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=62 x=464 y=60 width=14 height=18 xoffset=-1 yoffset=3 xadvance=14 page=0 chnl=0 +char id=63 x=6 y=60 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=64 x=50 y=0 width=30 height=32 xoffset=-1 yoffset=-1 xadvance=30 page=0 chnl=0 +char id=65 x=116 y=0 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=66 x=136 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=67 x=158 y=0 width=24 height=26 xoffset=-1 yoffset=-1 xadvance=24 page=0 chnl=0 +char id=68 x=182 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=69 x=204 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=70 x=226 y=0 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=71 x=246 y=0 width=24 height=26 xoffset=-1 yoffset=-1 xadvance=24 page=0 chnl=0 +char id=72 x=270 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=73 x=292 y=0 width=10 height=26 xoffset=1 yoffset=-1 xadvance=12 page=0 chnl=0 +char id=74 x=302 y=0 width=16 height=26 xoffset=-1 yoffset=-1 xadvance=16 page=0 chnl=0 +char id=75 x=318 y=0 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=76 x=338 y=0 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=77 x=358 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=78 x=380 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=79 x=402 y=0 width=26 height=26 xoffset=-1 yoffset=-1 xadvance=26 page=0 chnl=0 +char id=80 x=428 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=81 x=450 y=0 width=26 height=26 xoffset=-1 yoffset=-1 xadvance=26 page=0 chnl=0 +char id=82 x=476 y=0 width=26 height=26 xoffset=-1 yoffset=-1 xadvance=26 page=0 chnl=0 +char id=83 x=0 y=34 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=84 x=20 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=85 x=42 y=34 width=20 height=26 xoffset=1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=86 x=62 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=87 x=84 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=88 x=106 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=89 x=128 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=90 x=150 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=91 x=30 y=0 width=10 height=32 xoffset=-1 yoffset=-1 xadvance=10 page=0 chnl=0 +char id=92 x=70 y=60 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=93 x=40 y=0 width=10 height=32 xoffset=-1 yoffset=-1 xadvance=10 page=0 chnl=0 +char id=94 x=40 y=86 width=18 height=14 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=95 x=136 y=86 width=20 height=4 xoffset=-1 yoffset=21 xadvance=20 page=0 chnl=0 +char id=96 x=88 y=86 width=8 height=8 xoffset=1 yoffset=-1 xadvance=10 page=0 chnl=0 +char id=97 x=260 y=60 width=20 height=20 xoffset=-1 yoffset=5 xadvance=20 page=0 chnl=0 +char id=98 x=172 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=99 x=280 y=60 width=20 height=20 xoffset=-1 yoffset=5 xadvance=20 page=0 chnl=0 +char id=100 x=194 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=101 x=300 y=60 width=18 height=20 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=102 x=212 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=103 x=98 y=0 width=18 height=28 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=104 x=230 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=105 x=502 y=0 width=6 height=26 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 +char id=106 x=248 y=34 width=16 height=26 xoffset=-1 yoffset=3 xadvance=16 page=0 chnl=0 +char id=107 x=264 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=108 x=282 y=34 width=6 height=26 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 +char id=109 x=318 y=60 width=30 height=20 xoffset=-1 yoffset=5 xadvance=30 page=0 chnl=0 +char id=110 x=348 y=60 width=20 height=20 xoffset=-1 yoffset=5 xadvance=20 page=0 chnl=0 +char id=111 x=368 y=60 width=18 height=20 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=112 x=288 y=34 width=20 height=26 xoffset=-1 yoffset=5 xadvance=20 page=0 chnl=0 +char id=113 x=308 y=34 width=18 height=26 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=114 x=386 y=60 width=16 height=20 xoffset=-1 yoffset=5 xadvance=16 page=0 chnl=0 +char id=115 x=204 y=60 width=16 height=22 xoffset=-1 yoffset=3 xadvance=16 page=0 chnl=0 +char id=116 x=158 y=60 width=12 height=24 xoffset=-1 yoffset=1 xadvance=12 page=0 chnl=0 +char id=117 x=402 y=60 width=18 height=20 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=118 x=0 y=86 width=22 height=16 xoffset=-1 yoffset=9 xadvance=22 page=0 chnl=0 +char id=119 x=426 y=60 width=24 height=18 xoffset=-1 yoffset=7 xadvance=24 page=0 chnl=0 +char id=120 x=220 y=60 width=22 height=22 xoffset=-1 yoffset=3 xadvance=22 page=0 chnl=0 +char id=121 x=170 y=60 width=18 height=24 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=122 x=242 y=60 width=18 height=22 xoffset=-1 yoffset=3 xadvance=18 page=0 chnl=0 +char id=123 x=0 y=0 width=12 height=34 xoffset=-1 yoffset=-1 xadvance=12 page=0 chnl=0 +char id=124 x=24 y=0 width=6 height=34 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 +char id=125 x=12 y=0 width=12 height=34 xoffset=-1 yoffset=-1 xadvance=12 page=0 chnl=0 +char id=126 x=114 y=86 width=22 height=6 xoffset=-1 yoffset=9 xadvance=22 page=0 chnl=0 +kernings count=0 diff --git a/Huy/core/assets/skin/minecraft.png b/Huy/core/assets/skin/minecraft.png new file mode 100644 index 0000000..128908f Binary files /dev/null and b/Huy/core/assets/skin/minecraft.png differ diff --git a/Huy/core/assets/skin/test_data/check-off.png b/Huy/core/assets/skin/test_data/check-off.png new file mode 100644 index 0000000..1cc70c4 Binary files /dev/null and b/Huy/core/assets/skin/test_data/check-off.png differ diff --git a/Huy/core/assets/skin/test_data/check-on.png b/Huy/core/assets/skin/test_data/check-on.png new file mode 100644 index 0000000..57d6d0f Binary files /dev/null and b/Huy/core/assets/skin/test_data/check-on.png differ diff --git a/Huy/core/assets/skin/test_data/cursor.9.png b/Huy/core/assets/skin/test_data/cursor.9.png new file mode 100644 index 0000000..6aa4fab Binary files /dev/null and b/Huy/core/assets/skin/test_data/cursor.9.png differ diff --git a/Huy/core/assets/skin/test_data/default-pane-noborder.9.png b/Huy/core/assets/skin/test_data/default-pane-noborder.9.png new file mode 100644 index 0000000..b308275 Binary files /dev/null and b/Huy/core/assets/skin/test_data/default-pane-noborder.9.png differ diff --git a/Huy/core/assets/skin/test_data/default-pane.9.png b/Huy/core/assets/skin/test_data/default-pane.9.png new file mode 100644 index 0000000..655164f Binary files /dev/null and b/Huy/core/assets/skin/test_data/default-pane.9.png differ diff --git a/Huy/core/assets/skin/test_data/default-rect-down.9.png b/Huy/core/assets/skin/test_data/default-rect-down.9.png new file mode 100644 index 0000000..2ef326f Binary files /dev/null and b/Huy/core/assets/skin/test_data/default-rect-down.9.png differ diff --git a/Huy/core/assets/skin/test_data/default-rect-pad.9.png b/Huy/core/assets/skin/test_data/default-rect-pad.9.png new file mode 100644 index 0000000..655164f Binary files /dev/null and b/Huy/core/assets/skin/test_data/default-rect-pad.9.png differ diff --git a/Huy/core/assets/skin/test_data/default-rect.9.png b/Huy/core/assets/skin/test_data/default-rect.9.png new file mode 100644 index 0000000..6309ff0 Binary files /dev/null and b/Huy/core/assets/skin/test_data/default-rect.9.png differ diff --git a/Huy/core/assets/skin/test_data/default-round-down.9.png b/Huy/core/assets/skin/test_data/default-round-down.9.png new file mode 100644 index 0000000..8311e06 Binary files /dev/null and b/Huy/core/assets/skin/test_data/default-round-down.9.png differ diff --git a/Huy/core/assets/skin/test_data/default-round-large.9.png b/Huy/core/assets/skin/test_data/default-round-large.9.png new file mode 100644 index 0000000..4fcba07 Binary files /dev/null and b/Huy/core/assets/skin/test_data/default-round-large.9.png differ diff --git a/Huy/core/assets/skin/test_data/default-round.9.png b/Huy/core/assets/skin/test_data/default-round.9.png new file mode 100644 index 0000000..08b7b93 Binary files /dev/null and b/Huy/core/assets/skin/test_data/default-round.9.png differ diff --git a/Huy/core/assets/skin/test_data/default-scroll.9.png b/Huy/core/assets/skin/test_data/default-scroll.9.png new file mode 100644 index 0000000..09b5de9 Binary files /dev/null and b/Huy/core/assets/skin/test_data/default-scroll.9.png differ diff --git a/Huy/core/assets/skin/test_data/default-select-selection.9.png b/Huy/core/assets/skin/test_data/default-select-selection.9.png new file mode 100644 index 0000000..12202e7 Binary files /dev/null and b/Huy/core/assets/skin/test_data/default-select-selection.9.png differ diff --git a/Huy/core/assets/skin/test_data/default-select.9.png b/Huy/core/assets/skin/test_data/default-select.9.png new file mode 100644 index 0000000..b4aef8b Binary files /dev/null and b/Huy/core/assets/skin/test_data/default-select.9.png differ diff --git a/Huy/core/assets/skin/test_data/default-slider-knob.png b/Huy/core/assets/skin/test_data/default-slider-knob.png new file mode 100644 index 0000000..2ba5b9d Binary files /dev/null and b/Huy/core/assets/skin/test_data/default-slider-knob.png differ diff --git a/Huy/core/assets/skin/test_data/default-slider.9.png b/Huy/core/assets/skin/test_data/default-slider.9.png new file mode 100644 index 0000000..7ef86d8 Binary files /dev/null and b/Huy/core/assets/skin/test_data/default-slider.9.png differ diff --git a/Huy/core/assets/skin/test_data/default-splitpane-vertical.9.png b/Huy/core/assets/skin/test_data/default-splitpane-vertical.9.png new file mode 100644 index 0000000..13ffaa5 Binary files /dev/null and b/Huy/core/assets/skin/test_data/default-splitpane-vertical.9.png differ diff --git a/Huy/core/assets/skin/test_data/default-splitpane.9.png b/Huy/core/assets/skin/test_data/default-splitpane.9.png new file mode 100644 index 0000000..070753d Binary files /dev/null and b/Huy/core/assets/skin/test_data/default-splitpane.9.png differ diff --git a/Huy/core/assets/skin/test_data/default-window.9.png b/Huy/core/assets/skin/test_data/default-window.9.png new file mode 100644 index 0000000..5204599 Binary files /dev/null and b/Huy/core/assets/skin/test_data/default-window.9.png differ diff --git a/Huy/core/assets/skin/test_data/default.png b/Huy/core/assets/skin/test_data/default.png new file mode 100644 index 0000000..1bb19f6 Binary files /dev/null and b/Huy/core/assets/skin/test_data/default.png differ diff --git a/Huy/core/assets/skin/test_data/selection.png b/Huy/core/assets/skin/test_data/selection.png new file mode 100644 index 0000000..26cc9f1 Binary files /dev/null and b/Huy/core/assets/skin/test_data/selection.png differ diff --git a/Huy/core/assets/skin/test_data/textfield.9.png b/Huy/core/assets/skin/test_data/textfield.9.png new file mode 100644 index 0000000..df7bfb4 Binary files /dev/null and b/Huy/core/assets/skin/test_data/textfield.9.png differ diff --git a/Huy/core/assets/skin/test_data/tree-minus.png b/Huy/core/assets/skin/test_data/tree-minus.png new file mode 100644 index 0000000..99924c9 Binary files /dev/null and b/Huy/core/assets/skin/test_data/tree-minus.png differ diff --git a/Huy/core/assets/skin/test_data/tree-plus.png b/Huy/core/assets/skin/test_data/tree-plus.png new file mode 100644 index 0000000..a4a5876 Binary files /dev/null and b/Huy/core/assets/skin/test_data/tree-plus.png differ diff --git a/Huy/core/assets/skin/test_data/white.png b/Huy/core/assets/skin/test_data/white.png new file mode 100644 index 0000000..a5566c7 Binary files /dev/null and b/Huy/core/assets/skin/test_data/white.png differ diff --git a/Huy/core/assets/test.png b/Huy/core/assets/test.png new file mode 100644 index 0000000..d094b81 Binary files /dev/null and b/Huy/core/assets/test.png differ diff --git a/Huy/core/build.gradle b/Huy/core/build.gradle new file mode 100644 index 0000000..d192d04 --- /dev/null +++ b/Huy/core/build.gradle @@ -0,0 +1,6 @@ +sourceCompatibility = 1.7 +[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' + +sourceSets.main.java.srcDirs = [ "src/" ] + +eclipse.project.name = appName + "-core" diff --git a/Huy/core/build/classes/java/main/UI/GameOverScreen$1$1.class b/Huy/core/build/classes/java/main/UI/GameOverScreen$1$1.class new file mode 100644 index 0000000..9bfeafc Binary files /dev/null and b/Huy/core/build/classes/java/main/UI/GameOverScreen$1$1.class differ diff --git a/Huy/core/build/classes/java/main/UI/GameOverScreen$1.class b/Huy/core/build/classes/java/main/UI/GameOverScreen$1.class new file mode 100644 index 0000000..5f393db Binary files /dev/null and b/Huy/core/build/classes/java/main/UI/GameOverScreen$1.class differ diff --git a/Huy/core/build/classes/java/main/UI/GameOverScreen$2$1.class b/Huy/core/build/classes/java/main/UI/GameOverScreen$2$1.class new file mode 100644 index 0000000..a55a10b Binary files /dev/null and b/Huy/core/build/classes/java/main/UI/GameOverScreen$2$1.class differ diff --git a/Huy/core/build/classes/java/main/UI/GameOverScreen$2.class b/Huy/core/build/classes/java/main/UI/GameOverScreen$2.class new file mode 100644 index 0000000..9085a7a Binary files /dev/null and b/Huy/core/build/classes/java/main/UI/GameOverScreen$2.class differ diff --git a/Huy/core/build/classes/java/main/UI/GameOverScreen$3.class b/Huy/core/build/classes/java/main/UI/GameOverScreen$3.class new file mode 100644 index 0000000..67cd9e8 Binary files /dev/null and b/Huy/core/build/classes/java/main/UI/GameOverScreen$3.class differ diff --git a/Huy/core/build/classes/java/main/UI/GameOverScreen.class b/Huy/core/build/classes/java/main/UI/GameOverScreen.class new file mode 100644 index 0000000..92a923e Binary files /dev/null and b/Huy/core/build/classes/java/main/UI/GameOverScreen.class differ diff --git a/Huy/core/build/classes/java/main/UI/MainClass.class b/Huy/core/build/classes/java/main/UI/MainClass.class new file mode 100644 index 0000000..e377a1c Binary files /dev/null and b/Huy/core/build/classes/java/main/UI/MainClass.class differ diff --git a/Huy/core/build/classes/java/main/UI/MainMenu$1$1.class b/Huy/core/build/classes/java/main/UI/MainMenu$1$1.class new file mode 100644 index 0000000..43c2325 Binary files /dev/null and b/Huy/core/build/classes/java/main/UI/MainMenu$1$1.class differ diff --git a/Huy/core/build/classes/java/main/UI/MainMenu$1.class b/Huy/core/build/classes/java/main/UI/MainMenu$1.class new file mode 100644 index 0000000..e33e858 Binary files /dev/null and b/Huy/core/build/classes/java/main/UI/MainMenu$1.class differ diff --git a/Huy/core/build/classes/java/main/UI/MainMenu$2.class b/Huy/core/build/classes/java/main/UI/MainMenu$2.class new file mode 100644 index 0000000..53e21b5 Binary files /dev/null and b/Huy/core/build/classes/java/main/UI/MainMenu$2.class differ diff --git a/Huy/core/build/classes/java/main/UI/MainMenu.class b/Huy/core/build/classes/java/main/UI/MainMenu.class new file mode 100644 index 0000000..8a515de Binary files /dev/null and b/Huy/core/build/classes/java/main/UI/MainMenu.class differ diff --git a/Huy/core/build/classes/java/main/UI/PauseScreen$1.class b/Huy/core/build/classes/java/main/UI/PauseScreen$1.class new file mode 100644 index 0000000..8741232 Binary files /dev/null and b/Huy/core/build/classes/java/main/UI/PauseScreen$1.class differ diff --git a/Huy/core/build/classes/java/main/UI/PauseScreen$2.class b/Huy/core/build/classes/java/main/UI/PauseScreen$2.class new file mode 100644 index 0000000..cfa3076 Binary files /dev/null and b/Huy/core/build/classes/java/main/UI/PauseScreen$2.class differ diff --git a/Huy/core/build/classes/java/main/UI/PauseScreen.class b/Huy/core/build/classes/java/main/UI/PauseScreen.class new file mode 100644 index 0000000..6c14230 Binary files /dev/null and b/Huy/core/build/classes/java/main/UI/PauseScreen.class differ diff --git a/Huy/core/build/classes/java/main/game/demo/Assets.class b/Huy/core/build/classes/java/main/game/demo/Assets.class new file mode 100644 index 0000000..611dc08 Binary files /dev/null and b/Huy/core/build/classes/java/main/game/demo/Assets.class differ diff --git a/Huy/core/build/classes/java/main/game/demo/Background.class b/Huy/core/build/classes/java/main/game/demo/Background.class new file mode 100644 index 0000000..df12f11 Binary files /dev/null and b/Huy/core/build/classes/java/main/game/demo/Background.class differ diff --git a/Huy/core/build/classes/java/main/game/demo/Bullet.class b/Huy/core/build/classes/java/main/game/demo/Bullet.class new file mode 100644 index 0000000..577687b Binary files /dev/null and b/Huy/core/build/classes/java/main/game/demo/Bullet.class differ diff --git a/Huy/core/build/classes/java/main/game/demo/Collision.class b/Huy/core/build/classes/java/main/game/demo/Collision.class new file mode 100644 index 0000000..dcfc530 Binary files /dev/null and b/Huy/core/build/classes/java/main/game/demo/Collision.class differ diff --git a/Huy/core/build/classes/java/main/game/demo/Enemy.class b/Huy/core/build/classes/java/main/game/demo/Enemy.class new file mode 100644 index 0000000..96810a3 Binary files /dev/null and b/Huy/core/build/classes/java/main/game/demo/Enemy.class differ diff --git a/Huy/core/build/classes/java/main/game/demo/GameObj.class b/Huy/core/build/classes/java/main/game/demo/GameObj.class new file mode 100644 index 0000000..fb2baf8 Binary files /dev/null and b/Huy/core/build/classes/java/main/game/demo/GameObj.class differ diff --git a/Huy/core/build/classes/java/main/game/demo/MyGdxGame.class b/Huy/core/build/classes/java/main/game/demo/MyGdxGame.class new file mode 100644 index 0000000..6d8b02f Binary files /dev/null and b/Huy/core/build/classes/java/main/game/demo/MyGdxGame.class differ diff --git a/Huy/core/build/classes/java/main/game/demo/PixelCoord.class b/Huy/core/build/classes/java/main/game/demo/PixelCoord.class new file mode 100644 index 0000000..fda5e28 Binary files /dev/null and b/Huy/core/build/classes/java/main/game/demo/PixelCoord.class differ diff --git a/Huy/core/build/classes/java/main/game/demo/Player.class b/Huy/core/build/classes/java/main/game/demo/Player.class new file mode 100644 index 0000000..df143a6 Binary files /dev/null and b/Huy/core/build/classes/java/main/game/demo/Player.class differ diff --git a/Huy/core/build/classes/java/main/game/demo/Waves.class b/Huy/core/build/classes/java/main/game/demo/Waves.class new file mode 100644 index 0000000..e6bf305 Binary files /dev/null and b/Huy/core/build/classes/java/main/game/demo/Waves.class differ diff --git a/Huy/core/build/libs/core-1.0.jar b/Huy/core/build/libs/core-1.0.jar new file mode 100644 index 0000000..7f00307 Binary files /dev/null and b/Huy/core/build/libs/core-1.0.jar differ diff --git a/Huy/core/build/tmp/jar/MANIFEST.MF b/Huy/core/build/tmp/jar/MANIFEST.MF new file mode 100644 index 0000000..59499bc --- /dev/null +++ b/Huy/core/build/tmp/jar/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/Huy/core/src/UI/GameOverScreen.java b/Huy/core/src/UI/GameOverScreen.java new file mode 100644 index 0000000..717f719 --- /dev/null +++ b/Huy/core/src/UI/GameOverScreen.java @@ -0,0 +1,147 @@ +package UI; + +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.Screen; +import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.graphics.g2d.BitmapFont; +import com.badlogic.gdx.graphics.g2d.GlyphLayout; +import com.badlogic.gdx.graphics.g2d.SpriteBatch; +import com.badlogic.gdx.scenes.scene2d.InputEvent; +import com.badlogic.gdx.scenes.scene2d.Stage; +import com.badlogic.gdx.scenes.scene2d.actions.Actions; +import com.badlogic.gdx.scenes.scene2d.ui.Image; +import com.badlogic.gdx.scenes.scene2d.ui.ImageButton; +import com.badlogic.gdx.scenes.scene2d.ui.Skin; +import com.badlogic.gdx.scenes.scene2d.ui.Table; +import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; +import com.badlogic.gdx.utils.Align; +import com.badlogic.gdx.utils.viewport.ScreenViewport; +import game.demo.Background; + +public class GameOverScreen implements Screen { + private SpriteBatch batch; + private Texture GameOverTitle; + private Image title; + + private ImageButton RetryButton; + private ImageButton ExitButton; + private ImageButton MainMenuButton; + private Skin skin; + private MainClass mainClass; + private Table table; + private Background background; + + private Stage stage; + + + float tableY = Gdx.graphics.getHeight()/2; + + public GameOverScreen(final MainClass mainClass) { + this.mainClass = mainClass; + batch = new SpriteBatch(); + GameOverTitle = new Texture("skin/GAMEOVER.png"); + title = new Image(GameOverTitle); + + background = new Background(); + background.create(); + background.resize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); + + skin = new Skin(Gdx.files.internal("skin/ButtonPack.json")); + + stage = new Stage(new ScreenViewport()); + + table = new Table(); + table.setWidth(stage.getWidth()); + table.align(Align.center | Align.top); + table.setPosition(0, tableY); + + RetryButton = new ImageButton(skin, "Retry"); + RetryButton.addListener(new ClickListener() { + @Override + public void clicked(InputEvent event, float x, float y) { + stage.addAction(Actions.sequence(Actions.fadeOut(1), Actions.run(new Runnable() { + @Override + public void run() { + mainClass.setNewGameScreen(); + } + }))); + } + }); + + MainMenuButton = new ImageButton(skin, "MainMenu"); + MainMenuButton.addListener(new ClickListener() { + @Override + public void clicked(InputEvent event, float x, float y) { + stage.addAction(Actions.sequence(Actions.fadeOut(1), Actions.run(new Runnable() { + @Override + public void run() { + mainClass.setMenuScreen(); + } + }))); + } + }); + + ExitButton = new ImageButton(skin, "Exit"); + ExitButton.addListener(new ClickListener() { + @Override + public void clicked(InputEvent event, float x, float y) { + Gdx.app.log("Exit Game", "BEEP"); + Gdx.app.exit(); + } + }); + + table.pad(30); + table.add(title).size(500,100); + table.row(); + table.add(RetryButton); + table.row(); + table.add(MainMenuButton); + table.row(); + table.add(ExitButton); + + stage.addActor(table); + + } + + public void show() { + stage.addAction(Actions.fadeIn(1)); + Gdx.input.setInputProcessor(stage); // kieu nhu no add input vao thang render. -- call before render each frame. + } + + public void render(float delta) { + background.render(); + stage.addAction(Actions.fadeIn(1)); + stage.act(); + stage.draw(); + } + + @Override + public void resize(int width, int height) { + stage.getViewport().update(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), true); // this line is important. update size of stage = current screen size. + table.setWidth(stage.getWidth()); + table.align(Align.center|Align.top); + table.setPosition(0, tableY +table.getMinHeight()/2); + } + + @Override + public void pause() { + + } + + @Override + public void resume() { + + } + + @Override + public void hide() { + + } + + + public void dispose() { + stage.dispose(); + batch.dispose(); + skin.dispose(); + } +} diff --git a/Huy/core/src/UI/MainClass.java b/Huy/core/src/UI/MainClass.java new file mode 100644 index 0000000..fda420b --- /dev/null +++ b/Huy/core/src/UI/MainClass.java @@ -0,0 +1,76 @@ +package UI; + +import com.badlogic.gdx.*; +import com.badlogic.gdx.graphics.GL20; +import game.demo.MyGdxGame; + +public class MainClass extends Game implements ApplicationListener { + + private MyGdxGame gameScreen; + private MainMenu mainMenu; + private PauseScreen pauseScreen; +// private HudClass hudScreen; +// private StartClass startScreen; + @Override + public void create() { + gameScreen=new MyGdxGame(this); + //menuScreen=new MenuClass(this); + mainMenu = new MainMenu(this); +// startScreen=new StartClass(this); + pauseScreen = new PauseScreen(this); + setMenuScreen(); + + } + public void setGameScreen() + { + + setScreen(gameScreen); + + } +// public void setStartScreen(){ +// setScreen(startScreen); +// } + public void setNewGameScreen(){ + gameScreen=new MyGdxGame(this); + setScreen(gameScreen); + } + public void setMenuScreen() + { + + setScreen(mainMenu); + gameScreen.pause(); + } + public void setPauseScreen(){ + setScreen(pauseScreen); + + } + + + + @Override + public void dispose() { + + super.dispose(); + } + + @Override + public void render() { + super.render(); + } + + @Override + public void resize(int width, int height) { + + super.resize(width, height); + } + + @Override + public void pause() { + super.pause(); + } + + @Override + public void resume() { + super.resume(); + } +} diff --git a/Huy/core/src/UI/MainMenu.java b/Huy/core/src/UI/MainMenu.java new file mode 100644 index 0000000..8166f4f --- /dev/null +++ b/Huy/core/src/UI/MainMenu.java @@ -0,0 +1,130 @@ +package UI; + +import com.badlogic.gdx.Game; +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.Screen; +import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.graphics.g2d.SpriteBatch; +import com.badlogic.gdx.scenes.scene2d.InputEvent; +import com.badlogic.gdx.scenes.scene2d.Stage; +import com.badlogic.gdx.scenes.scene2d.actions.Actions; +import com.badlogic.gdx.scenes.scene2d.ui.Image; +import com.badlogic.gdx.scenes.scene2d.ui.ImageButton; +import com.badlogic.gdx.scenes.scene2d.ui.Skin; +import com.badlogic.gdx.scenes.scene2d.ui.Table; +import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; +import com.badlogic.gdx.utils.Align; +import com.badlogic.gdx.utils.viewport.ScreenViewport; +import UI.MainClass; +import game.demo.Background; + +public class MainMenu implements Screen { + private SpriteBatch batch; + private ImageButton PlayButton; + private ImageButton ExitButton; + private Skin skin; + private MainClass mainClass; + private Table table; + private Background background; + + private Image title; + + private Stage stage; + + float tableY = Gdx.graphics.getHeight()/2 - 100; + + public MainMenu(final MainClass mainClass){ + this.mainClass = mainClass; + + batch = new SpriteBatch(); + + title = new Image(new Texture("skin/GameTitle.png")); + + background = new Background(); + background.create(); + background.resize(Gdx.graphics.getWidth(),Gdx.graphics.getHeight()); + + skin = new Skin(Gdx.files.internal("skin/ButtonPack.json")); + + stage = new Stage(new ScreenViewport()); + + table = new Table(); + table.setWidth(stage.getWidth()); + table.align(Align.center|Align.top); + table.setPosition(0, tableY); + + PlayButton = new ImageButton(skin, "Play"); + PlayButton.addListener(new ClickListener(){ + @Override + public void clicked(InputEvent event, float x, float y) { + stage.addAction(Actions.sequence(Actions.fadeOut(1), Actions.run(new Runnable() { + @Override + public void run() { + mainClass.setNewGameScreen(); + } + }))); + } + }); + + ExitButton = new ImageButton(skin, "Exit"); + ExitButton.addListener(new ClickListener(){ + @Override + public void clicked(InputEvent event, float x, float y) { + Gdx.app.exit(); + } + }); + + table.pad(30); + table.add(title).size(700,60); + table.row(); + table.add(PlayButton); + table.row(); + table.add(ExitButton); + + stage.addActor(table); + } + @Override + public void show() { + stage.addAction(Actions.fadeIn(1)); + Gdx.input.setInputProcessor(stage); // kieu nhu no add input vao thang render. -- call before render each frame. + } + + public void render (float delta) { + background.render(); + + stage.act(); + stage.draw(); + } + + + + @Override + public void resize(int width, int height) { + stage.getViewport().update(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), true); // this line is important. update size of stage = current screen size. + table.setWidth(stage.getWidth()); + table.align(Align.center|Align.top); + table.setPosition(0, tableY +table.getMinHeight()/2); + } + + @Override + public void pause() { + + } + + @Override + public void resume() { + + } + + @Override + public void hide() { + + } + + + public void dispose() { + stage.dispose(); + batch.dispose(); + skin.dispose(); + } +} diff --git a/Huy/core/src/UI/PauseScreen.java b/Huy/core/src/UI/PauseScreen.java new file mode 100644 index 0000000..af38339 --- /dev/null +++ b/Huy/core/src/UI/PauseScreen.java @@ -0,0 +1,127 @@ +package UI; + +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.Screen; +import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.graphics.g2d.BitmapFont; +import com.badlogic.gdx.graphics.g2d.GlyphLayout; +import com.badlogic.gdx.graphics.g2d.Sprite; +import com.badlogic.gdx.graphics.g2d.SpriteBatch; +import com.badlogic.gdx.scenes.scene2d.InputEvent; +import com.badlogic.gdx.scenes.scene2d.Stage; +import com.badlogic.gdx.scenes.scene2d.ui.ImageButton; +import com.badlogic.gdx.scenes.scene2d.ui.Skin; +import com.badlogic.gdx.scenes.scene2d.ui.Table; +import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; +import com.badlogic.gdx.utils.Align; +import com.badlogic.gdx.utils.viewport.ScreenViewport; +import game.demo.Background; + +public class PauseScreen implements Screen { + private SpriteBatch batch; + private static Texture PauseTitle; + + private ImageButton ResumeButton; + private ImageButton ExitButton; + private Skin skin; + private MainClass mainClass; + private Table table; + private Background background; + + BitmapFont font; + GlyphLayout layout; + + private Stage stage; + + + public PauseScreen(final MainClass mainClass) { + this.mainClass = mainClass; + batch = new SpriteBatch(); + PauseTitle = new Texture("skin/Pause.png"); + + background = new Background(); + background.create(); + background.resize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); + + skin = new Skin(Gdx.files.internal("skin/ButtonPack.json")); + font = new BitmapFont(Gdx.files.internal("skin/minecraft.fnt")); + + layout = new GlyphLayout(); + layout.setText(font, "PAUSE"); + + stage = new Stage(new ScreenViewport()); + + table = new Table(); + table.setWidth(stage.getWidth()); + table.align(Align.center | Align.top); + table.setPosition(0, Gdx.graphics.getHeight() / 2); + + ResumeButton = new ImageButton(skin, "Resume"); + ResumeButton.addListener(new ClickListener() { + @Override + public void clicked(InputEvent event, float x, float y) { + Gdx.app.log("Resume Game", "BEEP"); + mainClass.setGameScreen(); + } + }); + + ExitButton = new ImageButton(skin, "Exit"); + ExitButton.addListener(new ClickListener() { + @Override + public void clicked(InputEvent event, float x, float y) { + Gdx.app.log("Exit Game", "BEEP"); + Gdx.app.exit(); + } + }); + + table.pad(30); + table.add(ResumeButton); + table.row(); + table.add(ExitButton); + + stage.addActor(table); + + } + + public void show() { + Gdx.input.setInputProcessor(stage); // kieu nhu no add input vao thang render. -- call before render each frame. + } + + public void render(float delta) { + background.render(); + + stage.act(); + stage.draw(); + + batch.begin(); + batch.draw(PauseTitle, Gdx.graphics.getWidth()/2 - PauseTitle.getWidth()/2, Gdx.graphics.getHeight()/2); + batch.end(); + } + + @Override + public void resize(int width, int height) { + + } + + @Override + public void pause() { + + } + + @Override + public void resume() { + + } + + @Override + public void hide() { + + } + + + public void dispose() { + stage.dispose(); + batch.dispose(); + skin.dispose(); + } +} diff --git a/Huy/core/src/game/demo/Assets.java b/Huy/core/src/game/demo/Assets.java new file mode 100644 index 0000000..3a518e4 --- /dev/null +++ b/Huy/core/src/game/demo/Assets.java @@ -0,0 +1,15 @@ +package game.demo; + +import com.badlogic.gdx.graphics.Texture; + +public class Assets { + public static Texture texture_bullet; + public static Texture texture_plane; + public static Texture texture_enemy; + + public void load(){ + texture_bullet = new Texture("Bullet99.png"); + texture_plane = new Texture("Spacefighter2_Small.png"); + texture_enemy = new Texture("Enemy_Small.png"); + } +} diff --git a/Huy/core/src/game/demo/Background.java b/Huy/core/src/game/demo/Background.java new file mode 100644 index 0000000..2522a86 --- /dev/null +++ b/Huy/core/src/game/demo/Background.java @@ -0,0 +1,84 @@ +package game.demo; + +import com.badlogic.gdx.ApplicationAdapter; +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.graphics.Camera; +import com.badlogic.gdx.graphics.GL20; +import com.badlogic.gdx.graphics.OrthographicCamera; +import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.graphics.g2d.SpriteBatch; +import com.badlogic.gdx.utils.viewport.StretchViewport; +import com.badlogic.gdx.utils.viewport.Viewport; + +public class Background { + + //Screen + private Camera camera; + private Viewport viewport; + + //Graphics + SpriteBatch batch; + Texture[] background; + + //Background movement + private float[] backgroundOffset = {0,0,0,0}; + private float speed; + + //World parameters (Based on the game resolution) + private final int WORLD_WIDTH = 1280; + private final int WORLD_HEIGHT = 720; + + + public void create () { + background = new Texture[4]; + camera = new OrthographicCamera(); + viewport = new StretchViewport(WORLD_WIDTH, WORLD_HEIGHT, camera); + + speed = WORLD_HEIGHT / 2; + + batch = new SpriteBatch(); + + background[0] = new Texture("Star0.png"); + background[1] = new Texture("Star1.png"); + background[2] = new Texture("Star2.png"); + background[3] = new Texture("Star3.png"); + + } + + public void render () { + float deltaTime = Gdx.graphics.getDeltaTime(); //Time between frames + batch.begin(); + MoveBackground(deltaTime); + batch.end(); + } + + public void MoveBackground(float deltaTime) + { + backgroundOffset[0] += speed/8 * deltaTime; + backgroundOffset[1] += speed/4 * deltaTime; + backgroundOffset[2] += speed/2 * deltaTime; + backgroundOffset[3] += speed * deltaTime; + + for(int i = 0; i < background.length; i++) + { + backgroundOffset[i]++; + if(backgroundOffset[i] > WORLD_HEIGHT) + backgroundOffset[i] = 0; + batch.draw(background[i], 0, -backgroundOffset[i], WORLD_WIDTH, WORLD_HEIGHT); + batch.draw(background[i], 0, -backgroundOffset[i] + WORLD_HEIGHT, WORLD_WIDTH, WORLD_HEIGHT); + } + } + + + public void resize(int width, int height) { + viewport.update(width, height, true); + batch.setProjectionMatrix(camera.combined); + } + + + public void dispose () { + batch.dispose(); + for(int i = 0; i < background.length; i++) + background[i].dispose(); + } +} \ No newline at end of file diff --git a/Huy/core/src/game/demo/Bullet.java b/Huy/core/src/game/demo/Bullet.java new file mode 100644 index 0000000..f72f58d --- /dev/null +++ b/Huy/core/src/game/demo/Bullet.java @@ -0,0 +1,198 @@ +package game.demo; + +import com.badlogic.gdx.ApplicationAdapter; +import com.badlogic.gdx.Game; +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.Input; +import com.badlogic.gdx.graphics.GL20; +import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.graphics.g2d.SpriteBatch; + +import java.util.Vector; +import java.lang.Math; + +public class Bullet extends GameObj { + private SpriteBatch batch; + private long t=0l; + private static Bullet fakebase=new Bullet(0,0,0,0); + protected int Source_ID_Collision=0; + + + + + protected boolean isAlly(){ + return (this.Source_ID_Collision==1); + } + public Bullet(float x_c, float y_c, float xfromhost, float yfromhost, int Id,int CollisionID) { + x = x_c + xfromhost; + x_b = x_c; + y = y_c + yfromhost; + y_b = y_c; + moveId = Id; + id=Id; + State=true; + scale = 1f; + Source_ID_Collision=CollisionID; + t=System.currentTimeMillis(); + } + + public Bullet(float x_c, float y_c, int Id,int CollisionID) { + x = x_c; + x_b = x_c; + y = y_c; + y_b = y_c; + scale = 0.7f; + id = Id; + Source_ID_Collision=CollisionID; + } + + public static void resetfakebase(){ + fakebase.x_b=MyGdxGame.player.getX(); + fakebase.y_b=MyGdxGame.player.getY(); + } + + public void setX_move(float x_move) { this.x_move = x_move; } + + public void setY_move(float y_move) { + this.y_move = y_move; + } + + public void create() { + + batch = new SpriteBatch(); + State=true; + } + + public void render(GameObj playerObject,Vector Earr,int location_of_Bullet,Vector Pixel1,Vector Pixel2) { // loop + batch.begin(); + batch.draw(Assets.texture_bullet, (x- (this.Texture_Width/2)),(y- (this.Texture_Height/2))); + if (this.isAlly()){ + for(int i=0;i< Earr.size();i++){ + if ((this.distanceto(Earr.elementAt(i))<(Earr.elementAt(i).getSonarRange()+this.getSonarRange()))||(this.distanceto2(Earr.elementAt(i))<(Earr.elementAt(i).getSonarRange()+this.getSonarRange()))){ + Pixel1.addElement(new PixelCoord(x- (this.Texture_Width/2),y- (this.Texture_Height/2),location_of_Bullet,i)); + } + } + } + if (!this.isAlly()){ + if ((this.distanceto(playerObject)<(playerObject.getSonarRange()+this.getSonarRange()))||(this.distanceto2(playerObject)<(playerObject.getSonarRange()+this.getSonarRange()))){ + Pixel2.addElement(new PixelCoord(x- (this.Texture_Width/2),y- (this.Texture_Height/2),location_of_Bullet)); + } + } + batch.end(); + y += y_move; + x += x_move; + if (System.currentTimeMillis()-t>10000){ + State=false; + } + } + + public static void render(Player player,Vector Earr,Vector bullet_arr,Vector Pixel1,Vector Pixel2) { + for (int i = 0; i < bullet_arr.size(); i++) { + if (bullet_arr.elementAt(i).State) { + bullet_arr.elementAt(i).setMove(); + bullet_arr.elementAt(i).render(player,Earr,i,Pixel1,Pixel2); + } + } + } + + public void dispose() { + batch.dispose(); + } + + public static void Bullet_Reallo(Vector bullet_arr, float x_c, float y_c, float x_offset, float y_offset,int id,int Collision_ID) { + int BulletGen = 0; + loop: while (BulletGen == 0) { + // need change to replace DED value with ALIVE value in order for the vector not to be too long, waste of memory + for (int i = 0; i < bullet_arr.size(); i++) { //there exists at least an element in the array + if (bullet_arr.elementAt(i).isDed()) { // there is 1 dead bullet + bullet_arr.elementAt(i).Revive(x_c, y_c, x_offset,y_offset,id,Collision_ID);//revive it as a new bullet + BulletGen = 1; + + /*Gdx.app.log("Log", "Bullet number "+i+" revived");*/ + continue loop; + } + } + // if the code get here, there is NO dead bullet in the array + bullet_arr.addElement(new Bullet(x_c, y_c,x_offset,y_offset,id,Collision_ID));// create a new bullet + bullet_arr.lastElement().setParam(); + bullet_arr.lastElement().create(); + BulletGen = 1; + } + } + + public boolean isDed() { + return !State; + } + + public void Revive(float x_c,float y_c, float x_offset, float y_offset,int id,int CollisionID){ + this.x_b=x_c;// omit for more effects + this.y_b=y_c;// omit for more effects + this.x=x_c+x_offset; + this.y=y_c+y_offset; + this.id=id; + this.moveId=id; + this.State=true; + this.Source_ID_Collision=CollisionID; + setHitboxRadius(); + setValue(); + t=System.currentTimeMillis(); + } + + public void Execute(){ + State=false; + id=0; + } + + /* ---------------------------------------------------------------------- + * ---------------------------------------------------------------------- + * --------------------------Edit - add more----------------------------- + * -------------------Bullets' hitbox, value, orbit---------------------- + * ---------------------------------------------------------------------- + * ----------------------------------------------------------------------*/ + + public void setHitboxRadius() { + switch (id){ + case -1: + case -2: + case -3: + case 1: + hitboxRadius=((float)Assets.texture_bullet.getHeight()+(float)Assets.texture_bullet.getWidth())/4; + break; + } + } + + public void setValue(){ + value=1; + } + + public void setMove() { //Furthermore edit bullet orbit here + X = x - x_b; + Y = y - y_b; + D = Math.sqrt((double) X * (double) X + (double) Y * (double) Y); + switch (moveId) { + case -1://straight + setX_move(10 * X / (float) D); + setY_move(10 * Y / (float) D); + break; + case -2://spin around host + setX_move(((Y*15-X*10)*5/(float)D)); + setY_move(((-X*15-Y*10)*5/(float)D)); + x_b=MyGdxGame.player.getX(); + y_b=MyGdxGame.player.getY(); + if (System.currentTimeMillis()-t>500){ + t=System.currentTimeMillis(); + moveId=-1; + } + break; + case -3: + x_b=fakebase.x_b; + y_b=fakebase.y_b; + moveId=-1; + break; + case 1: + setX_move(3 * X / (float) D); + setY_move(3 * Y / (float) D); + break; + } + } +} \ No newline at end of file diff --git a/Huy/core/src/game/demo/Collision.java b/Huy/core/src/game/demo/Collision.java new file mode 100644 index 0000000..1145691 --- /dev/null +++ b/Huy/core/src/game/demo/Collision.java @@ -0,0 +1,83 @@ +package game.demo; +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.graphics.Pixmap; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.Vector; + +public class Collision { + +//ALERT, THIS WILL CAUSE OUT OF BOUNDS OF SCREEN REAL PIXELS, WHAT IF WE HAVE THE CURSOR AT THE CORNER, WHERE ARE THE WASTED PIXEL? + + + public int[][] Materialize(String name,int ID,int width_of_byte,int bpp){ + Pixmap pixmap = new Pixmap(Gdx.files.internal(name)); + ByteBuffer nativeData = pixmap.getPixels(); + byte[] byte_arr = new byte[nativeData.remaining()]; + nativeData.get(byte_arr); + pixmap.dispose(); + int [][] result=HitboxGen(byte_arr,width_of_byte,bpp); + return result; + } + + public int[][] HitboxGen(byte [] byte_arr ,int width_of_byte,int bpp){ + int[] newdata=new int[byte_arr.length/(bpp/8)]; + int height_of_byte= byte_arr.length/(bpp/8)/width_of_byte; + int[][] TransparencyMap=new int[height_of_byte+2][width_of_byte+2];//map of transparent pixels + int[][] DensityMap=new int[height_of_byte+2][width_of_byte+2];//map of hitbox + int[][] Hitbox=new int[height_of_byte][width_of_byte];//map of density level + for(int i=0;i enemy_arr,Vector Sonar) { + for (int i = 0; i < enemy_arr.size(); i++) { + if (enemy_arr.elementAt(i).State) { + enemy_arr.elementAt(i).setMove(); + enemy_arr.elementAt(i).setHitbox(Sonar); + enemy_arr.elementAt(i).render(); + + } + } + } + public void setX_move(float x_move){this.x_move=x_move;} + public void setY_move(float y_move){this.y_move=y_move;} + + public boolean isDed() { + return !State; + } + + public boolean isExecuted() { + if ((value<0)&&State){ + State=false; + return true; + } + return false; + } + + public void render() { // loop + batch.begin(); + batch.draw(Assets.texture_enemy, (int)(x- (Assets.texture_enemy.getWidth()*scale/2)),(int)(y- (Assets.texture_enemy.getHeight()*scale/2)),Assets.texture_enemy.getWidth()*scale,Assets.texture_enemy.getHeight()*scale); + batch.end(); + y += y_move; + x += x_move; + } + + public static void fire(Vector enemy_arr, Vector bullet_arr){ + for (int i=0; i enemy_arr, float x_c, float y_c, int id, int Wave) { + int EnemyGen = 0; + loop: while (EnemyGen == 0) { + // need change to replace DED value with ALIVE value in order for the vector not to be too long, waste of memory + for (int i = 0; i < enemy_arr.size(); i++) { //there exists at least an element in the array + if (enemy_arr.elementAt(i).isDed()) { // there is 1 dead enemy + enemy_arr.elementAt(i).Revive(x_c, y_c, id, Wave);//revive it as a new enemy + EnemyGen = 1; + continue loop; + } + } + // if the code get here, there is NO dead enemy in the array + enemy_arr.addElement(new Enemy(x_c, y_c, id, Wave));// create a new enemy + enemy_arr.lastElement().setParam(); + enemy_arr.lastElement().create(); + EnemyGen = 1; + } + } + + public void Revive(float x_c,float y_c,int id, int Wave){ + this.x_b=x_c; + this.y_b=y_c; + this.x=x_c; + this.y=y_c; + this.id=id; + this.moveId=id; + this.State=true; + this.Wave=Wave; + setPoint(); + setValue(); + setHitboxRadius(); + t=t1=System.currentTimeMillis(); + } + + public static void checkCollision(Vector enemy_arr, Vector bullet_arr){ + for (int i=0;i bullet_arr){ + for (int i=0;i Aaar,Vector bulletarr){ + loop: for(int i=0;i800)) x_move=-x_move; + if ((y+y_move<480)||(y+y_move>720)) y_move=-y_move; + if ((System.currentTimeMillis()-t1>10000)&&(x>640)) x_move=2; + if ((System.currentTimeMillis()-t1>10000)&&(x<640)) x_move=-2; + if ((x<0)||(x>1280)) State=false; + break; + case 2: + x_move=0; + y_move=-1; + if(System.currentTimeMillis()-t1>2000) y_move=0; + if(System.currentTimeMillis()-t1>7000) y_move=1; + if(System.currentTimeMillis()-t1>10000) State=false; + break; + case 3: + x_move=2; + y_move=0; + if(x>1280) State=false; + break; + } + } + //Furthermore edit enemy move here + + public void Bullet_Call(Vector bullet_arr) { //Furthermore edit here + X = x - MyGdxGame.player.x; + Y = y - MyGdxGame.player.y; + + D = Math.sqrt((double) X * (double) X + (double) Y * (double) Y); + switch (id) { + case 1: + if ((System.currentTimeMillis() - t) > 1000 - Wave * 10) { + Bullet.Bullet_Reallo(bullet_arr, x, y, -X / (float) D, -Y / (float) D, 1,-1); + Bullet.Bullet_Reallo(bullet_arr, x - 10, y, -X / (float) D, -Y / (float) D, 1,-1); + Bullet.Bullet_Reallo(bullet_arr, x + 10, y, -X / (float) D, -Y / (float) D, 1,-1); + t = System.currentTimeMillis(); + } + break; + case 2: + case 3: + if ((System.currentTimeMillis() - t) > 1000) { + Bullet.Bullet_Reallo(bullet_arr, x, y, -X / (float) D, -Y / (float) D, 1,-1); + Bullet.Bullet_Reallo(bullet_arr, x - 20, y, -(X - 20) / (float) D, -Y / (float) D, 1,-1); + Bullet.Bullet_Reallo(bullet_arr, x + 20, y, -(X + 20) / (float) D, -Y / (float) D, 1,-1); + t=System.currentTimeMillis(); + } + break; + } + } + //edit enemy shooting + + public void setValue(){ + switch (id) { + case 1: + value=10+Wave*2; + break; + case 2: + value=5+Wave; + break; + case 3: + value=10+Wave; + break; + } + } + //set enemy HP base on id + + public void setPoint(){ + switch (id){ + case 1: + case 2: + case 3: + point=1; + break; + } + } + //set enemy point base on id + + public void setHitboxRadius(){ + switch (id){ + case 1: + case 2: + case 3: + hitboxRadius=20; + break; + } + } + //set enemy hitbox base on id + +} \ No newline at end of file diff --git a/Huy/core/src/game/demo/GameObj.java b/Huy/core/src/game/demo/GameObj.java new file mode 100644 index 0000000..71f86a1 --- /dev/null +++ b/Huy/core/src/game/demo/GameObj.java @@ -0,0 +1,92 @@ +package game.demo; + +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.graphics.g2d.SpriteBatch; + +import java.util.Vector; + +import static java.lang.Integer.max; + +public class GameObj { + protected float x; + protected float y; + private Background bg=new Background(); + protected float x_b; + protected float y_b; + protected float x_move; + protected float y_move; + protected float X; + protected float Y; + protected double D; + public int S_width; + public int S_height; + protected float scale = 1f; + Texture art; + protected int id; //negative for player, positive for enemy + protected int moveId; + protected boolean State; + protected long value; + protected float scaleWidth; + protected float scaleHeight; + protected float hitboxRadius; + protected SpriteBatch batch; + protected int Texture_Width=9; + protected int Texture_Height=9; + public Vector Pixel=new Vector(); + + public void setParam(){ + this.S_width=Gdx.graphics.getWidth(); + this.S_height=Gdx.graphics.getHeight(); + + } + public void setScale(float scaleWidth, float scaleHeight){ + this.scaleWidth = scaleWidth; + this.scaleHeight = scaleHeight; + } + + + public float getX() { + return x; + } + + public float getY() { + return y; + } + public long getValue() { return value;} + public void dispose(){ + art.dispose(); + + } + public double getSonarRange(){ + return max(this.Texture_Width/2,this.Texture_Height/2); + } + + + + public double distanceto(GameObj another){ + return Math.sqrt(Math.pow(this.x+this.Texture_Width/2-another.x-another.Texture_Width/2,2) + Math.pow(this.x+this.Texture_Height/2-another.x-another.Texture_Height/2,2)); + } + public double distanceto2(GameObj another){ + return Math.sqrt(Math.pow(this.x-this.Texture_Width/2-another.x+another.Texture_Width/2,2) + Math.pow(this.x-this.Texture_Height/2-another.x+another.Texture_Height/2,2)); + } + + public void PixelClear(){ + Pixel.clear(); + } + public void setHitbox(Vector Sonar){ + PixelClear(); + for(int i=0;i it just save a variable __> different from c++. + // In later we have to player = new Player() in somewhere--> but not remove new Player() + public static int point = 0; + BitmapFont font_point; + static Player player = new Player(); + Assets assets = new Assets(); + Vector bullet_arr = new Vector<>(); + Vector enemy_arr = new Vector<>(); + Background background = new Background(); + Label label_point = new Label("0",new Skin(Gdx.files.internal("skin/Textfield.json"))); + Skin skin; + SpriteBatch batch; + static int Wave=0; + private Stage stage; + + + static Vector Sonar_Player=new Vector<>();//generic relative position + static Vector Sonar_Enemy=new Vector<>();//generic relative position + static Vector Bullet_Ally_Pixel=new Vector<>();//generic relative position + static Vector Bullet_Oppress_Pixel=new Vector<>();//generic relative position + + + + boolean pauseGame = false; + MainClass mainClass; + int z1=0; + + // Texture sprite_bullet; +// //Input in; // interface class --> abstract class --> we cannot call obj of this class. + public MyGdxGame(MainClass mainClass){ + stage = new Stage(); + label_point.setText(point); + label_point.setFontScale(2f); + label_point.setPosition(0,Gdx.graphics.getHeight()-50); + stage.addActor(label_point); + + this.mainClass = mainClass; + assets.load(); + player.create(assets.texture_plane.getWidth(),assets.texture_plane.getHeight()); + background.create(); + background.resize(Gdx.graphics.getWidth(),Gdx.graphics.getHeight()); + + + + /*------------------------------------------------------------------------------------------------------------*/ + /*--------------------------------newly added 23/10/2020------------------------------------------------------*/ + Bullet_Oppress_Pixel.clear(); + Bullet_Ally_Pixel.clear(); + Sonar_Player.clear(); + Sonar_Enemy.clear(); + int z1=0; + String path = ((FileTextureData)assets.texture_plane.getTextureData()).getFileHandle().path(); + String path2 = ((FileTextureData)assets.texture_bullet.getTextureData()).getFileHandle().path(); + String path3 = ((FileTextureData)assets.texture_enemy.getTextureData()).getFileHandle().path(); + Collision tor=new Collision(); + int[][] Sonar_P=tor.Materialize(path,1,Assets.texture_plane.getWidth(),32); + int[][] Sonar_B=tor.Materialize(path2,2,Assets.texture_bullet.getWidth(),32); + int[][] Sonar_E=tor.Materialize(path3,3,Assets.texture_enemy.getWidth(),32); + //start collision model outline for generic relative position from drawing position\ + for (int i=0;i rapidity) { + t = System.currentTimeMillis(); + loaded = 1; + } else { + loaded = 0; + } + if (loaded==1) return true; + else return false; + + } + else return false; + } + + public void render_player () { // loop + if (State) { + batch.begin(); + batch.draw(Assets.texture_plane, (x - (this.Texture_Width/2)), (y - (Texture_Height/2))); + batch.end(); + } + input(); + + } + public void dispose () { + batch.dispose(); + } + + public static void checkCollision(Vector bullet_arr){ + for (int i=0;i Hail,Vector Barr){ + loop: for(int i=0;iGdx.graphics.getWidth()) x=Gdx.graphics.getWidth(); + if (Gdx.input.isKeyPressed(Input.Keys.UP)) y+=varyDistance; + if (y>Gdx.graphics.getHeight()) y=Gdx.graphics.getHeight(); + if (Gdx.input.isKeyPressed(Input.Keys.DOWN)) y-=varyDistance; + if (y<0) y=0; + } + + public void Bullet_Call(Vector bullet_arr) { //Furthermore edit here + switch (Math.abs(id)) { + case 0: + { + Bullet.Bullet_Reallo(bullet_arr,getX(), getY(), 0, 30, 0,1); + Bullet.Bullet_Reallo(bullet_arr,getX(), getY(), 0, -30, 0,1); + Bullet.Bullet_Reallo(bullet_arr,getX(), getY(), 30, 0, 0,1); + Bullet.Bullet_Reallo(bullet_arr,getX(), getY(), -30, 0, 0,1); + break; + } + case 1: + /* bullet_arr.addElement(new Bullet(getX(), getY(), 0, 30, 1));*/ + { + if (Gdx.input.isKeyPressed(Input.Keys.SHIFT_LEFT)) { + Bullet.Bullet_Reallo(bullet_arr,getX(), getY(), 0, 30, -3,1); + Bullet.Bullet_Reallo(bullet_arr,getX(), getY(), -5, 29, -3,1); + Bullet.Bullet_Reallo(bullet_arr,getX(), getY(), 5, 29, -3,1); + Bullet.Bullet_Reallo(bullet_arr,getX(), getY(), 0, 25, -3,1); + Bullet.Bullet_Reallo(bullet_arr,getX(), getY(), -10, 28, -3,1); + Bullet.Bullet_Reallo(bullet_arr,getX(), getY(), 10, 28, -3,1); + } + else { + Bullet.Bullet_Reallo(bullet_arr,getX(), getY(), 0, 30, -1,1); + Bullet.Bullet_Reallo(bullet_arr,getX()-3, getY(), -2, 29, -1,1); + Bullet.Bullet_Reallo(bullet_arr,getX()+3, getY(), 2, 29, -1,1); + Bullet.Bullet_Reallo(bullet_arr,getX()-5, getY(), -5, 28, -1,1); + Bullet.Bullet_Reallo(bullet_arr,getX()+5, getY(), 5, 28, -1,1); + } + } + break; + } + } +} \ No newline at end of file diff --git a/Huy/core/src/game/demo/Waves.java b/Huy/core/src/game/demo/Waves.java new file mode 100644 index 0000000..7766143 --- /dev/null +++ b/Huy/core/src/game/demo/Waves.java @@ -0,0 +1,76 @@ +package game.demo; +import com.badlogic.gdx.Gdx; + +import java.lang.Object; +import java.util.Random; +import java.util.Vector; +import java.util.concurrent.TimeUnit; + +public class Waves { + private static Random waveid=new Random(); + private static long wavetime=0; + private static long t=System.currentTimeMillis(); + // private static long t1=System.currentTimeMillis(); + private static boolean Loadwave; + private static int enemies=0; + private static int id; + private static boolean isAllEGone; + private static Object obj=new Object(); + + public static void Wave_Come(Vector enemy_arr) { + if (System.currentTimeMillis() - t > wavetime) { + t = System.currentTimeMillis(); + Loadwave = true; + MyGdxGame.Wave++; + id=waveid.nextInt(3); + enemies=0; + } + if (System.currentTimeMillis() - t <= wavetime){ + if (Loadwave) { + Wave_Call(enemy_arr, MyGdxGame.Wave); + } + /*if (!Loadwave){ + isAllEGone=false; + for (int i=0;i enemy_arr, int Wave) { + switch (id){ + case 1: + wavetime=20000; + for (int i=0; i<(Wave+1)/2; i++){ + Enemy.Enemy_Reallo(enemy_arr,(float)(waveid.nextInt(320)+480), (float)(waveid.nextInt(160)+560), 1, Wave);//this is just an example + } + Loadwave=false; + break; + case 2: + wavetime=10000; + for (int i=0; i<8; i++){ + Enemy.Enemy_Reallo(enemy_arr,(float)(80+160*i)*Gdx.graphics.getWidth()/1280,720* Gdx.graphics.getHeight()/720,2,Wave); + } + Loadwave=false; + break; + case 3: + wavetime=10000; + if (System.currentTimeMillis()-t>1000){ + Enemy.Enemy_Reallo(enemy_arr, 0, (float) (waveid.nextInt(160) + 560), 3, Wave); + t=System.currentTimeMillis(); + enemies++; + } + if (enemies==Wave) Loadwave=false; + break; + } + } +} \ No newline at end of file diff --git a/Huy/database.json b/Huy/database.json new file mode 100644 index 0000000..0602fb3 --- /dev/null +++ b/Huy/database.json @@ -0,0 +1 @@ +Khoa \ No newline at end of file diff --git a/Huy/database.txt b/Huy/database.txt new file mode 100644 index 0000000..30d74d2 --- /dev/null +++ b/Huy/database.txt @@ -0,0 +1 @@ +test \ No newline at end of file diff --git a/Huy/desktop/build.gradle b/Huy/desktop/build.gradle new file mode 100644 index 0000000..c292c43 --- /dev/null +++ b/Huy/desktop/build.gradle @@ -0,0 +1,39 @@ +sourceCompatibility = 1.7 +sourceSets.main.java.srcDirs = [ "src/" ] +sourceSets.main.resources.srcDirs = ["../core/assets"] + +project.ext.mainClassName = "game.demo.desktop.DesktopLauncher" +project.ext.assetsDir = new File("../core/assets") + +task run(dependsOn: classes, type: JavaExec) { + main = project.mainClassName + classpath = sourceSets.main.runtimeClasspath + standardInput = System.in + workingDir = project.assetsDir + ignoreExitValue = true +} + +task debug(dependsOn: classes, type: JavaExec) { + main = project.mainClassName + classpath = sourceSets.main.runtimeClasspath + standardInput = System.in + workingDir = project.assetsDir + ignoreExitValue = true + debug = true +} + +task dist(type: Jar) { + manifest { + attributes 'Main-Class': project.mainClassName + } + dependsOn configurations.runtimeClasspath + from { + configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } + } + with jar +} + + +dist.dependsOn classes + +eclipse.project.name = appName + "-desktop" diff --git a/Huy/desktop/build/classes/java/main/game/demo/desktop/DesktopLauncher.class b/Huy/desktop/build/classes/java/main/game/demo/desktop/DesktopLauncher.class new file mode 100644 index 0000000..6d7a005 Binary files /dev/null and b/Huy/desktop/build/classes/java/main/game/demo/desktop/DesktopLauncher.class differ diff --git a/Huy/desktop/build/resources/main/Audio/README.md b/Huy/desktop/build/resources/main/Audio/README.md new file mode 100644 index 0000000..45d50c5 --- /dev/null +++ b/Huy/desktop/build/resources/main/Audio/README.md @@ -0,0 +1 @@ +# For sounds and stuff diff --git a/Huy/desktop/build/resources/main/Audio/ZA-WARUDO.mp3 b/Huy/desktop/build/resources/main/Audio/ZA-WARUDO.mp3 new file mode 100644 index 0000000..79299cd Binary files /dev/null and b/Huy/desktop/build/resources/main/Audio/ZA-WARUDO.mp3 differ diff --git a/Huy/desktop/build/resources/main/Bullet_plane.png b/Huy/desktop/build/resources/main/Bullet_plane.png new file mode 100644 index 0000000..d6fb36d Binary files /dev/null and b/Huy/desktop/build/resources/main/Bullet_plane.png differ diff --git a/Huy/desktop/build/resources/main/Enemy.png b/Huy/desktop/build/resources/main/Enemy.png new file mode 100644 index 0000000..5f41564 Binary files /dev/null and b/Huy/desktop/build/resources/main/Enemy.png differ diff --git a/Huy/desktop/build/resources/main/META-INF/MANIFEST.MF b/Huy/desktop/build/resources/main/META-INF/MANIFEST.MF new file mode 100644 index 0000000..788c1a2 --- /dev/null +++ b/Huy/desktop/build/resources/main/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: game.demo.desktop.DesktopLauncher + diff --git a/Huy/desktop/build/resources/main/Plane.png b/Huy/desktop/build/resources/main/Plane.png new file mode 100644 index 0000000..f4d0b59 Binary files /dev/null and b/Huy/desktop/build/resources/main/Plane.png differ diff --git a/Huy/desktop/build/resources/main/Star0.png b/Huy/desktop/build/resources/main/Star0.png new file mode 100644 index 0000000..8903a23 Binary files /dev/null and b/Huy/desktop/build/resources/main/Star0.png differ diff --git a/Huy/desktop/build/resources/main/Star1.png b/Huy/desktop/build/resources/main/Star1.png new file mode 100644 index 0000000..27618fe Binary files /dev/null and b/Huy/desktop/build/resources/main/Star1.png differ diff --git a/Huy/desktop/build/resources/main/Star2.png b/Huy/desktop/build/resources/main/Star2.png new file mode 100644 index 0000000..a186f92 Binary files /dev/null and b/Huy/desktop/build/resources/main/Star2.png differ diff --git a/Huy/desktop/build/resources/main/Star3.png b/Huy/desktop/build/resources/main/Star3.png new file mode 100644 index 0000000..b4df82c Binary files /dev/null and b/Huy/desktop/build/resources/main/Star3.png differ diff --git a/Huy/desktop/build/resources/main/badlogic.jpg b/Huy/desktop/build/resources/main/badlogic.jpg new file mode 100644 index 0000000..4390da6 Binary files /dev/null and b/Huy/desktop/build/resources/main/badlogic.jpg differ diff --git a/Huy/desktop/build/resources/main/database.txt b/Huy/desktop/build/resources/main/database.txt new file mode 100644 index 0000000..e69de29 diff --git a/Huy/desktop/build/resources/main/skin/ArcadeClassic.fnt b/Huy/desktop/build/resources/main/skin/ArcadeClassic.fnt new file mode 100644 index 0000000..ef5dcb1 --- /dev/null +++ b/Huy/desktop/build/resources/main/skin/ArcadeClassic.fnt @@ -0,0 +1,71 @@ +info face="ArcadeClassic" size=32 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=1,1,1,1 spacing=-2,-2 +common lineHeight=33 base=26 scaleW=512 scaleH=512 pages=1 packed=0 +page id=0 file="ArcadeClassic.png" +chars count=66 +char id=10 x=0 y=0 width=15 height=28 xoffset=1 yoffset=-1 xadvance=16 page=0 chnl=0 +char id=32 x=0 y=0 width=0 height=0 xoffset=-1 yoffset=25 xadvance=4 page=0 chnl=0 +char id=33 x=146 y=28 width=13 height=18 xoffset=0 yoffset=7 xadvance=22 page=0 chnl=0 +char id=34 x=0 y=0 width=15 height=28 xoffset=1 yoffset=-1 xadvance=16 page=0 chnl=0 +char id=48 x=127 y=28 width=19 height=18 xoffset=-1 yoffset=7 xadvance=18 page=0 chnl=0 +char id=49 x=475 y=0 width=16 height=18 xoffset=1 yoffset=7 xadvance=18 page=0 chnl=0 +char id=50 x=491 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=51 x=0 y=28 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=52 x=18 y=28 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=53 x=36 y=28 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=54 x=54 y=28 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=55 x=72 y=28 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=56 x=90 y=28 width=19 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=57 x=109 y=28 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=65 x=15 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=66 x=33 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=67 x=51 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=68 x=69 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=69 x=87 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=18 page=0 chnl=0 +char id=70 x=105 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=71 x=123 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=72 x=141 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=73 x=159 y=0 width=16 height=18 xoffset=0 yoffset=7 xadvance=17 page=0 chnl=0 +char id=74 x=175 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=75 x=193 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=76 x=211 y=0 width=16 height=18 xoffset=-2 yoffset=7 xadvance=18 page=0 chnl=0 +char id=77 x=227 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=78 x=245 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=79 x=263 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=80 x=281 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=81 x=299 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=82 x=317 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=83 x=335 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=84 x=353 y=0 width=16 height=18 xoffset=-3 yoffset=7 xadvance=17 page=0 chnl=0 +char id=85 x=369 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=86 x=387 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=18 page=0 chnl=0 +char id=87 x=405 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=88 x=423 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=89 x=441 y=0 width=16 height=18 xoffset=0 yoffset=7 xadvance=17 page=0 chnl=0 +char id=90 x=457 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=97 x=15 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=98 x=33 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=99 x=51 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=100 x=69 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=101 x=87 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=18 page=0 chnl=0 +char id=102 x=105 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=103 x=123 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=104 x=141 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=105 x=159 y=0 width=16 height=18 xoffset=0 yoffset=7 xadvance=17 page=0 chnl=0 +char id=106 x=175 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=107 x=193 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=108 x=211 y=0 width=16 height=18 xoffset=-2 yoffset=7 xadvance=18 page=0 chnl=0 +char id=109 x=227 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=110 x=245 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=111 x=263 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=112 x=281 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=113 x=299 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=114 x=317 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=115 x=335 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=116 x=353 y=0 width=16 height=18 xoffset=-3 yoffset=7 xadvance=17 page=0 chnl=0 +char id=117 x=369 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=118 x=387 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=18 page=0 chnl=0 +char id=119 x=405 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=120 x=423 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=121 x=441 y=0 width=16 height=18 xoffset=0 yoffset=7 xadvance=17 page=0 chnl=0 +char id=122 x=457 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +kernings count=0 diff --git a/Huy/desktop/build/resources/main/skin/ArcadeClassic.png b/Huy/desktop/build/resources/main/skin/ArcadeClassic.png new file mode 100644 index 0000000..475c9d6 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/ArcadeClassic.png differ diff --git a/Huy/desktop/build/resources/main/skin/ButtonPack.atlas b/Huy/desktop/build/resources/main/skin/ButtonPack.atlas new file mode 100644 index 0000000..d7e5f98 --- /dev/null +++ b/Huy/desktop/build/resources/main/skin/ButtonPack.atlas @@ -0,0 +1,111 @@ + +ButtonPack.png +size: 2048,512 +format: RGBA8888 +filter: Nearest,Nearest +repeat: none +ExitButtonDown + rotate: false + xy: 1558, 274 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +ExitButtonHover + rotate: false + xy: 1108, 138 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +ExitButtonUp + rotate: false + xy: 658, 2 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +MainMenuButtonDown + rotate: false + xy: 2, 138 + size: 448, 134 + orig: 448, 134 + offset: 0, 0 + index: -1 +MainMenuButtonHover + rotate: false + xy: 452, 274 + size: 448, 134 + orig: 448, 134 + offset: 0, 0 + index: -1 +MainMenuButtonUp + rotate: false + xy: 2, 274 + size: 448, 134 + orig: 448, 134 + offset: 0, 0 + index: -1 +PlayButtonDown + rotate: false + xy: 1406, 138 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +PlayButtonHover + rotate: false + xy: 1254, 2 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +PlayButtonUp + rotate: false + xy: 956, 2 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +ResumeButtonDown + rotate: false + xy: 1230, 274 + size: 326, 134 + orig: 326, 134 + offset: 0, 0 + index: -1 +ResumeButtonHover + rotate: false + xy: 780, 138 + size: 326, 134 + orig: 326, 134 + offset: 0, 0 + index: -1 +ResumeButtonUp + rotate: false + xy: 902, 274 + size: 326, 134 + orig: 326, 134 + offset: 0, 0 + index: -1 +RetryButtonDown + rotate: false + xy: 330, 2 + size: 326, 134 + orig: 326, 134 + offset: 0, 0 + index: -1 +RetryButtonHover + rotate: false + xy: 2, 2 + size: 326, 134 + orig: 326, 134 + offset: 0, 0 + index: -1 +RetryButtonUp + rotate: false + xy: 452, 138 + size: 326, 134 + orig: 326, 134 + offset: 0, 0 + index: -1 diff --git a/Huy/desktop/build/resources/main/skin/ButtonPack.json b/Huy/desktop/build/resources/main/skin/ButtonPack.json new file mode 100644 index 0000000..f19178f --- /dev/null +++ b/Huy/desktop/build/resources/main/skin/ButtonPack.json @@ -0,0 +1,34 @@ +{ + com.badlogic.gdx.scenes.scene2d.ui.ImageButton$ImageButtonStyle: { + default: { + up: PlayButtonUp + down: PlayButtonDown + over: PlayButtonHover + }, + Play: { + up: PlayButtonUp + down: PlayButtonDown + over: PlayButtonHover + }, + Exit: { + up: ExitButtonUp + down: ExitButtonDown + over: ExitButtonHover + } + Resume: { + up: ResumeButtonUp + down: ResumeButtonDown + over: ResumeButtonHover + }, + Retry: { + up: RetryButtonUp + down: RetryButtonDown + over: RetryButtonHover + } + MainMenu: { + up: MainMenuButtonUp + down: MainMenuButtonDown + over: MainMenuButtonHover + } + } +} \ No newline at end of file diff --git a/Huy/desktop/build/resources/main/skin/ButtonPack.png b/Huy/desktop/build/resources/main/skin/ButtonPack.png new file mode 100644 index 0000000..8cf3d7f Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/ButtonPack.png differ diff --git a/Huy/desktop/build/resources/main/skin/ButtonPackTestField.json b/Huy/desktop/build/resources/main/skin/ButtonPackTestField.json new file mode 100644 index 0000000..884dc43 --- /dev/null +++ b/Huy/desktop/build/resources/main/skin/ButtonPackTestField.json @@ -0,0 +1,24 @@ +{ +com.badlogic.gdx.graphics.g2d.BitmapFont: { + minecraft: { + file: minecraft.fnt + } +} +com.badlogic.gdx.scenes.scene2d.ui.ImageButton$ImageButtonStyle: { + default: { + up: PlayButtonUp + down: PlayButtonDown + over: PlayButtonHover + } + Play: { + up: PlayButtonUp + down: PlayButtonDown + over: PlayButtonHover + } + Exit: { + up: ExitButtonUp + down: ExitButtonDown + over: ExitButtonHover + } +} +} \ No newline at end of file diff --git a/Huy/desktop/build/resources/main/skin/GAMEOVER.png b/Huy/desktop/build/resources/main/skin/GAMEOVER.png new file mode 100644 index 0000000..524ca13 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/GAMEOVER.png differ diff --git a/Huy/desktop/build/resources/main/skin/GameTitle.png b/Huy/desktop/build/resources/main/skin/GameTitle.png new file mode 100644 index 0000000..62b55b6 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/GameTitle.png differ diff --git a/Huy/desktop/build/resources/main/skin/Pause.png b/Huy/desktop/build/resources/main/skin/Pause.png new file mode 100644 index 0000000..171044e Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/Pause.png differ diff --git a/Huy/desktop/build/resources/main/skin/README.md b/Huy/desktop/build/resources/main/skin/README.md new file mode 100644 index 0000000..7ed66f0 --- /dev/null +++ b/Huy/desktop/build/resources/main/skin/README.md @@ -0,0 +1 @@ +# Skin stuff diff --git a/Huy/desktop/build/resources/main/skin/Rectangle 1.png b/Huy/desktop/build/resources/main/skin/Rectangle 1.png new file mode 100644 index 0000000..28f6afe Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/Rectangle 1.png differ diff --git a/Huy/desktop/build/resources/main/skin/Textfield.atlas b/Huy/desktop/build/resources/main/skin/Textfield.atlas new file mode 100644 index 0000000..a43181e --- /dev/null +++ b/Huy/desktop/build/resources/main/skin/Textfield.atlas @@ -0,0 +1,83 @@ + +Textfield.png +size: 2048,2048 +format: RGBA8888 +filter: Linear,Linear +repeat: none +Background_mainmenu + rotate: false + xy: 1, 1243 + size: 1280, 720 + orig: 1280, 720 + offset: 0, 0 + index: -1 +ExitButtonDown + rotate: false + xy: 1283, 1634 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +ExitButtonHover + rotate: false + xy: 1, 398 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +ExitButtonUp + rotate: false + xy: 1283, 1498 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +Group 1 + rotate: false + xy: 1, 1048 + size: 682, 193 + orig: 682, 193 + offset: 0, 0 + index: -1 +PlayButtonDown + rotate: false + xy: 1581, 1634 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +PlayButtonHover + rotate: false + xy: 1, 262 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +PlayButtonUp + rotate: false + xy: 1283, 1362 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +Rectangle 1 + rotate: false + xy: 685, 1151 + size: 489, 90 + orig: 489, 90 + offset: 0, 0 + index: -1 +clicked + rotate: false + xy: 1283, 1770 + size: 682, 193 + orig: 682, 193 + offset: 0, 0 + index: -1 +minecraft + rotate: false + xy: 1, 534 + size: 512, 512 + orig: 512, 512 + offset: 0, 0 + index: -1 diff --git a/Huy/desktop/build/resources/main/skin/Textfield.json b/Huy/desktop/build/resources/main/skin/Textfield.json new file mode 100644 index 0000000..f8420ab --- /dev/null +++ b/Huy/desktop/build/resources/main/skin/Textfield.json @@ -0,0 +1,57 @@ +{ +com.badlogic.gdx.graphics.g2d.BitmapFont: { + minecraft: { + file: minecraft.fnt + } +} +com.badlogic.gdx.graphics.Color: { + RGBA_255_255_255_255: { + r: 1 + g: 1 + b: 1 + a: 1 + } +} +com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable: { + Group 1: { + region: Group 1 + minWidth: 13 + minHeight: 3 + } +} +com.badlogic.gdx.scenes.scene2d.ui.ImageButton$ImageButtonStyle: { + default: { + up: PlayButtonUp + down: PlayButtonDown + over: PlayButtonHover + } + Play: { + up: PlayButtonUp + down: PlayButtonDown + over: PlayButtonHover + } + Exit: { + up: ExitButtonUp + down: ExitButtonDown + over: ExitButtonHover + } +} +com.badlogic.gdx.scenes.scene2d.ui.Label$LabelStyle: { + default: { + font: minecraft + fontColor: RGBA_255_255_255_255 + } +} +com.badlogic.gdx.scenes.scene2d.ui.TextField$TextFieldStyle: { + default: { + font: minecraft + fontColor: RGBA_255_255_255_255 + background: Rectangle 1 + } +} +com.badlogic.gdx.scenes.scene2d.ui.TextTooltip$TextTooltipStyle: { + default: { + label: default + } +} +} \ No newline at end of file diff --git a/Huy/desktop/build/resources/main/skin/Textfield.png b/Huy/desktop/build/resources/main/skin/Textfield.png new file mode 100644 index 0000000..d44f513 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/Textfield.png differ diff --git a/Huy/desktop/build/resources/main/skin/minecraft.fnt b/Huy/desktop/build/resources/main/skin/minecraft.fnt new file mode 100644 index 0000000..8070467 --- /dev/null +++ b/Huy/desktop/build/resources/main/skin/minecraft.fnt @@ -0,0 +1,102 @@ +info face="Minecraft" size=32 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=1,1,1,1 spacing=-2,-2 +common lineHeight=35 base=24 scaleW=512 scaleH=512 pages=1 packed=0 +page id=0 file="minecraft.png" +chars count=97 +char id=0 x=194 y=60 width=10 height=23 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=0 +char id=10 x=0 y=0 width=0 height=0 xoffset=-1 yoffset=0 xadvance=0 page=0 chnl=0 +char id=32 x=0 y=0 width=0 height=0 xoffset=-1 yoffset=0 xadvance=10 page=0 chnl=0 +char id=33 x=0 y=60 width=6 height=26 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 +char id=34 x=22 y=86 width=18 height=14 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=35 x=114 y=60 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=36 x=80 y=0 width=18 height=30 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=37 x=88 y=60 width=26 height=26 xoffset=1 yoffset=-1 xadvance=28 page=0 chnl=0 +char id=38 x=136 y=60 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=39 x=76 y=86 width=6 height=10 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 +char id=40 x=24 y=60 width=14 height=26 xoffset=-1 yoffset=-1 xadvance=14 page=0 chnl=0 +char id=41 x=38 y=60 width=14 height=26 xoffset=-1 yoffset=-1 xadvance=14 page=0 chnl=0 +char id=42 x=496 y=60 width=14 height=14 xoffset=-1 yoffset=-1 xadvance=14 page=0 chnl=0 +char id=43 x=478 y=60 width=18 height=18 xoffset=1 yoffset=3 xadvance=20 page=0 chnl=0 +char id=44 x=82 y=86 width=6 height=10 xoffset=-1 yoffset=19 xadvance=6 page=0 chnl=0 +char id=45 x=102 y=86 width=12 height=6 xoffset=-1 yoffset=13 xadvance=12 page=0 chnl=0 +char id=46 x=96 y=86 width=6 height=6 xoffset=-1 yoffset=19 xadvance=6 page=0 chnl=0 +char id=47 x=52 y=60 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=48 x=492 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=49 x=326 y=34 width=14 height=26 xoffset=-1 yoffset=-1 xadvance=14 page=0 chnl=0 +char id=50 x=340 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=51 x=358 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=52 x=376 y=34 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=53 x=396 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=54 x=418 y=34 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=55 x=438 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=56 x=456 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=57 x=474 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=58 x=420 y=60 width=6 height=20 xoffset=1 yoffset=5 xadvance=8 page=0 chnl=0 +char id=59 x=188 y=60 width=6 height=24 xoffset=1 yoffset=5 xadvance=8 page=0 chnl=0 +char id=60 x=450 y=60 width=14 height=18 xoffset=-1 yoffset=3 xadvance=14 page=0 chnl=0 +char id=61 x=58 y=86 width=18 height=14 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=62 x=464 y=60 width=14 height=18 xoffset=-1 yoffset=3 xadvance=14 page=0 chnl=0 +char id=63 x=6 y=60 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=64 x=50 y=0 width=30 height=32 xoffset=-1 yoffset=-1 xadvance=30 page=0 chnl=0 +char id=65 x=116 y=0 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=66 x=136 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=67 x=158 y=0 width=24 height=26 xoffset=-1 yoffset=-1 xadvance=24 page=0 chnl=0 +char id=68 x=182 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=69 x=204 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=70 x=226 y=0 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=71 x=246 y=0 width=24 height=26 xoffset=-1 yoffset=-1 xadvance=24 page=0 chnl=0 +char id=72 x=270 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=73 x=292 y=0 width=10 height=26 xoffset=1 yoffset=-1 xadvance=12 page=0 chnl=0 +char id=74 x=302 y=0 width=16 height=26 xoffset=-1 yoffset=-1 xadvance=16 page=0 chnl=0 +char id=75 x=318 y=0 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=76 x=338 y=0 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=77 x=358 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=78 x=380 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=79 x=402 y=0 width=26 height=26 xoffset=-1 yoffset=-1 xadvance=26 page=0 chnl=0 +char id=80 x=428 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=81 x=450 y=0 width=26 height=26 xoffset=-1 yoffset=-1 xadvance=26 page=0 chnl=0 +char id=82 x=476 y=0 width=26 height=26 xoffset=-1 yoffset=-1 xadvance=26 page=0 chnl=0 +char id=83 x=0 y=34 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=84 x=20 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=85 x=42 y=34 width=20 height=26 xoffset=1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=86 x=62 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=87 x=84 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=88 x=106 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=89 x=128 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=90 x=150 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=91 x=30 y=0 width=10 height=32 xoffset=-1 yoffset=-1 xadvance=10 page=0 chnl=0 +char id=92 x=70 y=60 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=93 x=40 y=0 width=10 height=32 xoffset=-1 yoffset=-1 xadvance=10 page=0 chnl=0 +char id=94 x=40 y=86 width=18 height=14 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=95 x=136 y=86 width=20 height=4 xoffset=-1 yoffset=21 xadvance=20 page=0 chnl=0 +char id=96 x=88 y=86 width=8 height=8 xoffset=1 yoffset=-1 xadvance=10 page=0 chnl=0 +char id=97 x=260 y=60 width=20 height=20 xoffset=-1 yoffset=5 xadvance=20 page=0 chnl=0 +char id=98 x=172 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=99 x=280 y=60 width=20 height=20 xoffset=-1 yoffset=5 xadvance=20 page=0 chnl=0 +char id=100 x=194 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=101 x=300 y=60 width=18 height=20 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=102 x=212 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=103 x=98 y=0 width=18 height=28 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=104 x=230 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=105 x=502 y=0 width=6 height=26 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 +char id=106 x=248 y=34 width=16 height=26 xoffset=-1 yoffset=3 xadvance=16 page=0 chnl=0 +char id=107 x=264 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=108 x=282 y=34 width=6 height=26 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 +char id=109 x=318 y=60 width=30 height=20 xoffset=-1 yoffset=5 xadvance=30 page=0 chnl=0 +char id=110 x=348 y=60 width=20 height=20 xoffset=-1 yoffset=5 xadvance=20 page=0 chnl=0 +char id=111 x=368 y=60 width=18 height=20 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=112 x=288 y=34 width=20 height=26 xoffset=-1 yoffset=5 xadvance=20 page=0 chnl=0 +char id=113 x=308 y=34 width=18 height=26 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=114 x=386 y=60 width=16 height=20 xoffset=-1 yoffset=5 xadvance=16 page=0 chnl=0 +char id=115 x=204 y=60 width=16 height=22 xoffset=-1 yoffset=3 xadvance=16 page=0 chnl=0 +char id=116 x=158 y=60 width=12 height=24 xoffset=-1 yoffset=1 xadvance=12 page=0 chnl=0 +char id=117 x=402 y=60 width=18 height=20 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=118 x=0 y=86 width=22 height=16 xoffset=-1 yoffset=9 xadvance=22 page=0 chnl=0 +char id=119 x=426 y=60 width=24 height=18 xoffset=-1 yoffset=7 xadvance=24 page=0 chnl=0 +char id=120 x=220 y=60 width=22 height=22 xoffset=-1 yoffset=3 xadvance=22 page=0 chnl=0 +char id=121 x=170 y=60 width=18 height=24 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=122 x=242 y=60 width=18 height=22 xoffset=-1 yoffset=3 xadvance=18 page=0 chnl=0 +char id=123 x=0 y=0 width=12 height=34 xoffset=-1 yoffset=-1 xadvance=12 page=0 chnl=0 +char id=124 x=24 y=0 width=6 height=34 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 +char id=125 x=12 y=0 width=12 height=34 xoffset=-1 yoffset=-1 xadvance=12 page=0 chnl=0 +char id=126 x=114 y=86 width=22 height=6 xoffset=-1 yoffset=9 xadvance=22 page=0 chnl=0 +kernings count=0 diff --git a/Huy/desktop/build/resources/main/skin/minecraft.png b/Huy/desktop/build/resources/main/skin/minecraft.png new file mode 100644 index 0000000..128908f Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/minecraft.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/check-off.png b/Huy/desktop/build/resources/main/skin/test_data/check-off.png new file mode 100644 index 0000000..1cc70c4 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/check-off.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/check-on.png b/Huy/desktop/build/resources/main/skin/test_data/check-on.png new file mode 100644 index 0000000..57d6d0f Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/check-on.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/cursor.9.png b/Huy/desktop/build/resources/main/skin/test_data/cursor.9.png new file mode 100644 index 0000000..6aa4fab Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/cursor.9.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/default-pane-noborder.9.png b/Huy/desktop/build/resources/main/skin/test_data/default-pane-noborder.9.png new file mode 100644 index 0000000..b308275 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/default-pane-noborder.9.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/default-pane.9.png b/Huy/desktop/build/resources/main/skin/test_data/default-pane.9.png new file mode 100644 index 0000000..655164f Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/default-pane.9.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/default-rect-down.9.png b/Huy/desktop/build/resources/main/skin/test_data/default-rect-down.9.png new file mode 100644 index 0000000..2ef326f Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/default-rect-down.9.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/default-rect-pad.9.png b/Huy/desktop/build/resources/main/skin/test_data/default-rect-pad.9.png new file mode 100644 index 0000000..655164f Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/default-rect-pad.9.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/default-rect.9.png b/Huy/desktop/build/resources/main/skin/test_data/default-rect.9.png new file mode 100644 index 0000000..6309ff0 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/default-rect.9.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/default-round-down.9.png b/Huy/desktop/build/resources/main/skin/test_data/default-round-down.9.png new file mode 100644 index 0000000..8311e06 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/default-round-down.9.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/default-round-large.9.png b/Huy/desktop/build/resources/main/skin/test_data/default-round-large.9.png new file mode 100644 index 0000000..4fcba07 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/default-round-large.9.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/default-round.9.png b/Huy/desktop/build/resources/main/skin/test_data/default-round.9.png new file mode 100644 index 0000000..08b7b93 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/default-round.9.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/default-scroll.9.png b/Huy/desktop/build/resources/main/skin/test_data/default-scroll.9.png new file mode 100644 index 0000000..09b5de9 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/default-scroll.9.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/default-select-selection.9.png b/Huy/desktop/build/resources/main/skin/test_data/default-select-selection.9.png new file mode 100644 index 0000000..12202e7 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/default-select-selection.9.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/default-select.9.png b/Huy/desktop/build/resources/main/skin/test_data/default-select.9.png new file mode 100644 index 0000000..b4aef8b Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/default-select.9.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/default-slider-knob.png b/Huy/desktop/build/resources/main/skin/test_data/default-slider-knob.png new file mode 100644 index 0000000..2ba5b9d Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/default-slider-knob.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/default-slider.9.png b/Huy/desktop/build/resources/main/skin/test_data/default-slider.9.png new file mode 100644 index 0000000..7ef86d8 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/default-slider.9.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/default-splitpane-vertical.9.png b/Huy/desktop/build/resources/main/skin/test_data/default-splitpane-vertical.9.png new file mode 100644 index 0000000..13ffaa5 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/default-splitpane-vertical.9.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/default-splitpane.9.png b/Huy/desktop/build/resources/main/skin/test_data/default-splitpane.9.png new file mode 100644 index 0000000..070753d Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/default-splitpane.9.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/default-window.9.png b/Huy/desktop/build/resources/main/skin/test_data/default-window.9.png new file mode 100644 index 0000000..5204599 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/default-window.9.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/default.png b/Huy/desktop/build/resources/main/skin/test_data/default.png new file mode 100644 index 0000000..1bb19f6 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/default.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/selection.png b/Huy/desktop/build/resources/main/skin/test_data/selection.png new file mode 100644 index 0000000..26cc9f1 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/selection.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/textfield.9.png b/Huy/desktop/build/resources/main/skin/test_data/textfield.9.png new file mode 100644 index 0000000..df7bfb4 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/textfield.9.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/tree-minus.png b/Huy/desktop/build/resources/main/skin/test_data/tree-minus.png new file mode 100644 index 0000000..99924c9 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/tree-minus.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/tree-plus.png b/Huy/desktop/build/resources/main/skin/test_data/tree-plus.png new file mode 100644 index 0000000..a4a5876 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/tree-plus.png differ diff --git a/Huy/desktop/build/resources/main/skin/test_data/white.png b/Huy/desktop/build/resources/main/skin/test_data/white.png new file mode 100644 index 0000000..a5566c7 Binary files /dev/null and b/Huy/desktop/build/resources/main/skin/test_data/white.png differ diff --git a/Huy/desktop/build/resources/main/test.png b/Huy/desktop/build/resources/main/test.png new file mode 100644 index 0000000..d094b81 Binary files /dev/null and b/Huy/desktop/build/resources/main/test.png differ diff --git a/Huy/desktop/src/game/demo/desktop/DesktopLauncher.java b/Huy/desktop/src/game/demo/desktop/DesktopLauncher.java new file mode 100644 index 0000000..a6851c3 --- /dev/null +++ b/Huy/desktop/src/game/demo/desktop/DesktopLauncher.java @@ -0,0 +1,18 @@ +package game.demo.desktop; + +import com.badlogic.gdx.backends.lwjgl.LwjglApplication; +import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; +import UI.MainClass; + +public class DesktopLauncher { + public static void main (String[] arg) { + LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); + config.resizable=true; + config.width=1280; + config.height=720; + config.maxNetThreads=16; + config.title="Noodle Rocket Launcher"; + config.foregroundFPS=144; + new LwjglApplication(new MainClass(), config); + } +} diff --git a/Huy/gradle.properties b/Huy/gradle.properties new file mode 100644 index 0000000..ff329ac --- /dev/null +++ b/Huy/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.daemon=true +org.gradle.jvmargs=-Xms128m -Xmx1500m +org.gradle.configureondemand=false diff --git a/Huy/gradle/wrapper/gradle-wrapper.jar b/Huy/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..5c2d1cf Binary files /dev/null and b/Huy/gradle/wrapper/gradle-wrapper.jar differ diff --git a/Huy/gradle/wrapper/gradle-wrapper.properties b/Huy/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..f4d7b2b --- /dev/null +++ b/Huy/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/Huy/gradlew b/Huy/gradlew new file mode 100644 index 0000000..b0d6d0a --- /dev/null +++ b/Huy/gradlew @@ -0,0 +1,188 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/Huy/gradlew.bat b/Huy/gradlew.bat new file mode 100644 index 0000000..9991c50 --- /dev/null +++ b/Huy/gradlew.bat @@ -0,0 +1,100 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/Huy/settings.gradle b/Huy/settings.gradle new file mode 100644 index 0000000..74fc652 --- /dev/null +++ b/Huy/settings.gradle @@ -0,0 +1 @@ +include 'desktop', 'core' \ No newline at end of file diff --git a/Project/.gradle/5.4.1/executionHistory/executionHistory.bin b/Project/.gradle/5.4.1/executionHistory/executionHistory.bin new file mode 100644 index 0000000..554150e Binary files /dev/null and b/Project/.gradle/5.4.1/executionHistory/executionHistory.bin differ diff --git a/Project/.gradle/5.4.1/executionHistory/executionHistory.lock b/Project/.gradle/5.4.1/executionHistory/executionHistory.lock new file mode 100644 index 0000000..56654ed Binary files /dev/null and b/Project/.gradle/5.4.1/executionHistory/executionHistory.lock differ diff --git a/Project/.gradle/5.4.1/fileChanges/last-build.bin b/Project/.gradle/5.4.1/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/Project/.gradle/5.4.1/fileChanges/last-build.bin differ diff --git a/Project/.gradle/5.4.1/fileContent/fileContent.lock b/Project/.gradle/5.4.1/fileContent/fileContent.lock new file mode 100644 index 0000000..f3a19a6 Binary files /dev/null and b/Project/.gradle/5.4.1/fileContent/fileContent.lock differ diff --git a/Project/.gradle/5.4.1/fileHashes/fileHashes.bin b/Project/.gradle/5.4.1/fileHashes/fileHashes.bin new file mode 100644 index 0000000..c4c89c3 Binary files /dev/null and b/Project/.gradle/5.4.1/fileHashes/fileHashes.bin differ diff --git a/Project/.gradle/5.4.1/fileHashes/fileHashes.lock b/Project/.gradle/5.4.1/fileHashes/fileHashes.lock new file mode 100644 index 0000000..b99a2f7 Binary files /dev/null and b/Project/.gradle/5.4.1/fileHashes/fileHashes.lock differ diff --git a/Project/.gradle/5.4.1/fileHashes/resourceHashesCache.bin b/Project/.gradle/5.4.1/fileHashes/resourceHashesCache.bin new file mode 100644 index 0000000..8eaa0a4 Binary files /dev/null and b/Project/.gradle/5.4.1/fileHashes/resourceHashesCache.bin differ diff --git a/Project/.gradle/5.4.1/gc.properties b/Project/.gradle/5.4.1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/Project/.gradle/5.4.1/javaCompile/classAnalysis.bin b/Project/.gradle/5.4.1/javaCompile/classAnalysis.bin new file mode 100644 index 0000000..0a47f10 Binary files /dev/null and b/Project/.gradle/5.4.1/javaCompile/classAnalysis.bin differ diff --git a/Project/.gradle/5.4.1/javaCompile/jarAnalysis.bin b/Project/.gradle/5.4.1/javaCompile/jarAnalysis.bin new file mode 100644 index 0000000..ddc3987 Binary files /dev/null and b/Project/.gradle/5.4.1/javaCompile/jarAnalysis.bin differ diff --git a/Project/.gradle/5.4.1/javaCompile/javaCompile.lock b/Project/.gradle/5.4.1/javaCompile/javaCompile.lock new file mode 100644 index 0000000..d0597ac Binary files /dev/null and b/Project/.gradle/5.4.1/javaCompile/javaCompile.lock differ diff --git a/Project/.gradle/5.4.1/javaCompile/taskHistory.bin b/Project/.gradle/5.4.1/javaCompile/taskHistory.bin new file mode 100644 index 0000000..37e69cf Binary files /dev/null and b/Project/.gradle/5.4.1/javaCompile/taskHistory.bin differ diff --git a/Project/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/Project/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000..039ddbe Binary files /dev/null and b/Project/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/Project/.gradle/buildOutputCleanup/cache.properties b/Project/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..c176539 --- /dev/null +++ b/Project/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Thu Oct 08 09:17:00 ICT 2020 +gradle.version=5.4.1 diff --git a/Project/.gradle/buildOutputCleanup/outputFiles.bin b/Project/.gradle/buildOutputCleanup/outputFiles.bin new file mode 100644 index 0000000..48cc269 Binary files /dev/null and b/Project/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/Project/.gradle/vcs-1/gc.properties b/Project/.gradle/vcs-1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/Project/.idea/.gitignore b/Project/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/Project/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/Project/.idea/Hao.iml b/Project/.idea/Hao.iml new file mode 100644 index 0000000..78b2cc5 --- /dev/null +++ b/Project/.idea/Hao.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Project/.idea/artifacts/Hao_desktop_main_jar.xml b/Project/.idea/artifacts/Hao_desktop_main_jar.xml new file mode 100644 index 0000000..8f58d56 --- /dev/null +++ b/Project/.idea/artifacts/Hao_desktop_main_jar.xml @@ -0,0 +1,28 @@ + + + $PROJECT_DIR$/out/artifacts/Hao_desktop_main_jar + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Project/.idea/artifacts/Project_desktop_test2_jar.xml b/Project/.idea/artifacts/Project_desktop_test2_jar.xml new file mode 100644 index 0000000..a7b5796 --- /dev/null +++ b/Project/.idea/artifacts/Project_desktop_test2_jar.xml @@ -0,0 +1,37 @@ + + + $PROJECT_DIR$/out/artifacts/Project_desktop_test2_jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Project/.idea/compiler.xml b/Project/.idea/compiler.xml new file mode 100644 index 0000000..1c5ab05 --- /dev/null +++ b/Project/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Project/.idea/gradle.xml b/Project/.idea/gradle.xml new file mode 100644 index 0000000..8a8d7a9 --- /dev/null +++ b/Project/.idea/gradle.xml @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file diff --git a/Project/.idea/jarRepositories.xml b/Project/.idea/jarRepositories.xml new file mode 100644 index 0000000..352ac87 --- /dev/null +++ b/Project/.idea/jarRepositories.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Project/.idea/misc.xml b/Project/.idea/misc.xml new file mode 100644 index 0000000..3a394d1 --- /dev/null +++ b/Project/.idea/misc.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Project/.idea/uiDesigner.xml b/Project/.idea/uiDesigner.xml new file mode 100644 index 0000000..e96534f --- /dev/null +++ b/Project/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Project/.idea/vcs.xml b/Project/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/Project/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Project/META-INF/MANIFEST.MF b/Project/META-INF/MANIFEST.MF new file mode 100644 index 0000000..788c1a2 --- /dev/null +++ b/Project/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: game.demo.desktop.DesktopLauncher + diff --git a/Project/Project_desktop_test_jar/Animation/Plane.png b/Project/Project_desktop_test_jar/Animation/Plane.png new file mode 100644 index 0000000..f4d2cf5 Binary files /dev/null and b/Project/Project_desktop_test_jar/Animation/Plane.png differ diff --git a/Project/Project_desktop_test_jar/Animation/PlaneRight1.png b/Project/Project_desktop_test_jar/Animation/PlaneRight1.png new file mode 100644 index 0000000..761c309 Binary files /dev/null and b/Project/Project_desktop_test_jar/Animation/PlaneRight1.png differ diff --git a/Project/Project_desktop_test_jar/Animation/PlaneRight2.png b/Project/Project_desktop_test_jar/Animation/PlaneRight2.png new file mode 100644 index 0000000..0a90cac Binary files /dev/null and b/Project/Project_desktop_test_jar/Animation/PlaneRight2.png differ diff --git a/Project/Project_desktop_test_jar/Audio/Astronomia.mp3 b/Project/Project_desktop_test_jar/Audio/Astronomia.mp3 new file mode 100644 index 0000000..0d84e9e Binary files /dev/null and b/Project/Project_desktop_test_jar/Audio/Astronomia.mp3 differ diff --git a/Project/Project_desktop_test_jar/Audio/GiornoTheme.mp3 b/Project/Project_desktop_test_jar/Audio/GiornoTheme.mp3 new file mode 100644 index 0000000..4d2e107 Binary files /dev/null and b/Project/Project_desktop_test_jar/Audio/GiornoTheme.mp3 differ diff --git a/Project/Project_desktop_test_jar/Audio/README.md b/Project/Project_desktop_test_jar/Audio/README.md new file mode 100644 index 0000000..45d50c5 --- /dev/null +++ b/Project/Project_desktop_test_jar/Audio/README.md @@ -0,0 +1 @@ +# For sounds and stuff diff --git a/Project/Project_desktop_test_jar/Audio/ZA-WARUDO.mp3 b/Project/Project_desktop_test_jar/Audio/ZA-WARUDO.mp3 new file mode 100644 index 0000000..79299cd Binary files /dev/null and b/Project/Project_desktop_test_jar/Audio/ZA-WARUDO.mp3 differ diff --git a/Project/Project_desktop_test_jar/Audio/lasmic.sfk b/Project/Project_desktop_test_jar/Audio/lasmic.sfk new file mode 100644 index 0000000..36b87b9 Binary files /dev/null and b/Project/Project_desktop_test_jar/Audio/lasmic.sfk differ diff --git a/Project/Project_desktop_test_jar/Audio/lasmic.wav b/Project/Project_desktop_test_jar/Audio/lasmic.wav new file mode 100644 index 0000000..4b11060 Binary files /dev/null and b/Project/Project_desktop_test_jar/Audio/lasmic.wav differ diff --git a/Project/Project_desktop_test_jar/Bullet_plane.png b/Project/Project_desktop_test_jar/Bullet_plane.png new file mode 100644 index 0000000..cd43043 Binary files /dev/null and b/Project/Project_desktop_test_jar/Bullet_plane.png differ diff --git a/Project/Project_desktop_test_jar/Enemy.png b/Project/Project_desktop_test_jar/Enemy.png new file mode 100644 index 0000000..ed209ef Binary files /dev/null and b/Project/Project_desktop_test_jar/Enemy.png differ diff --git a/Project/Project_desktop_test_jar/Gif/DancingEngi.gif b/Project/Project_desktop_test_jar/Gif/DancingEngi.gif new file mode 100644 index 0000000..7835446 Binary files /dev/null and b/Project/Project_desktop_test_jar/Gif/DancingEngi.gif differ diff --git a/Project/Project_desktop_test_jar/Gif/coffindance.gif b/Project/Project_desktop_test_jar/Gif/coffindance.gif new file mode 100644 index 0000000..ed4a967 Binary files /dev/null and b/Project/Project_desktop_test_jar/Gif/coffindance.gif differ diff --git a/Project/Project_desktop_test_jar/Plane.png b/Project/Project_desktop_test_jar/Plane.png new file mode 100644 index 0000000..f4d2cf5 Binary files /dev/null and b/Project/Project_desktop_test_jar/Plane.png differ diff --git a/Project/Project_desktop_test_jar/Plane2.png b/Project/Project_desktop_test_jar/Plane2.png new file mode 100644 index 0000000..4e899e4 Binary files /dev/null and b/Project/Project_desktop_test_jar/Plane2.png differ diff --git a/Project/Project_desktop_test_jar/PlaneLeft.psd b/Project/Project_desktop_test_jar/PlaneLeft.psd new file mode 100644 index 0000000..950acac Binary files /dev/null and b/Project/Project_desktop_test_jar/PlaneLeft.psd differ diff --git a/Project/Project_desktop_test_jar/Project.desktop.test.jar b/Project/Project_desktop_test_jar/Project.desktop.test.jar new file mode 100644 index 0000000..79bed66 Binary files /dev/null and b/Project/Project_desktop_test_jar/Project.desktop.test.jar differ diff --git a/Project/Project_desktop_test_jar/Star0.png b/Project/Project_desktop_test_jar/Star0.png new file mode 100644 index 0000000..8903a23 Binary files /dev/null and b/Project/Project_desktop_test_jar/Star0.png differ diff --git a/Project/Project_desktop_test_jar/Star1.png b/Project/Project_desktop_test_jar/Star1.png new file mode 100644 index 0000000..27618fe Binary files /dev/null and b/Project/Project_desktop_test_jar/Star1.png differ diff --git a/Project/Project_desktop_test_jar/Star2.png b/Project/Project_desktop_test_jar/Star2.png new file mode 100644 index 0000000..a186f92 Binary files /dev/null and b/Project/Project_desktop_test_jar/Star2.png differ diff --git a/Project/Project_desktop_test_jar/Star3.png b/Project/Project_desktop_test_jar/Star3.png new file mode 100644 index 0000000..b4df82c Binary files /dev/null and b/Project/Project_desktop_test_jar/Star3.png differ diff --git a/Project/Project_desktop_test_jar/badlogic.jpg b/Project/Project_desktop_test_jar/badlogic.jpg new file mode 100644 index 0000000..4390da6 Binary files /dev/null and b/Project/Project_desktop_test_jar/badlogic.jpg differ diff --git a/Project/Project_desktop_test_jar/coffindance.gif b/Project/Project_desktop_test_jar/coffindance.gif new file mode 100644 index 0000000..ed4a967 Binary files /dev/null and b/Project/Project_desktop_test_jar/coffindance.gif differ diff --git a/Project/Project_desktop_test_jar/database.txt b/Project/Project_desktop_test_jar/database.txt new file mode 100644 index 0000000..e69de29 diff --git a/Project/Project_desktop_test_jar/lasmic.sfk b/Project/Project_desktop_test_jar/lasmic.sfk new file mode 100644 index 0000000..2d7c921 Binary files /dev/null and b/Project/Project_desktop_test_jar/lasmic.sfk differ diff --git a/Project/Project_desktop_test_jar/lasmic.wav b/Project/Project_desktop_test_jar/lasmic.wav new file mode 100644 index 0000000..60b87a3 Binary files /dev/null and b/Project/Project_desktop_test_jar/lasmic.wav differ diff --git a/Project/Project_desktop_test_jar/planenew.png b/Project/Project_desktop_test_jar/planenew.png new file mode 100644 index 0000000..6923d18 Binary files /dev/null and b/Project/Project_desktop_test_jar/planenew.png differ diff --git a/Project/Project_desktop_test_jar/skin/ArcadeClassic.fnt b/Project/Project_desktop_test_jar/skin/ArcadeClassic.fnt new file mode 100644 index 0000000..ef5dcb1 --- /dev/null +++ b/Project/Project_desktop_test_jar/skin/ArcadeClassic.fnt @@ -0,0 +1,71 @@ +info face="ArcadeClassic" size=32 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=1,1,1,1 spacing=-2,-2 +common lineHeight=33 base=26 scaleW=512 scaleH=512 pages=1 packed=0 +page id=0 file="ArcadeClassic.png" +chars count=66 +char id=10 x=0 y=0 width=15 height=28 xoffset=1 yoffset=-1 xadvance=16 page=0 chnl=0 +char id=32 x=0 y=0 width=0 height=0 xoffset=-1 yoffset=25 xadvance=4 page=0 chnl=0 +char id=33 x=146 y=28 width=13 height=18 xoffset=0 yoffset=7 xadvance=22 page=0 chnl=0 +char id=34 x=0 y=0 width=15 height=28 xoffset=1 yoffset=-1 xadvance=16 page=0 chnl=0 +char id=48 x=127 y=28 width=19 height=18 xoffset=-1 yoffset=7 xadvance=18 page=0 chnl=0 +char id=49 x=475 y=0 width=16 height=18 xoffset=1 yoffset=7 xadvance=18 page=0 chnl=0 +char id=50 x=491 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=51 x=0 y=28 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=52 x=18 y=28 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=53 x=36 y=28 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=54 x=54 y=28 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=55 x=72 y=28 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=56 x=90 y=28 width=19 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=57 x=109 y=28 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=65 x=15 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=66 x=33 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=67 x=51 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=68 x=69 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=69 x=87 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=18 page=0 chnl=0 +char id=70 x=105 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=71 x=123 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=72 x=141 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=73 x=159 y=0 width=16 height=18 xoffset=0 yoffset=7 xadvance=17 page=0 chnl=0 +char id=74 x=175 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=75 x=193 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=76 x=211 y=0 width=16 height=18 xoffset=-2 yoffset=7 xadvance=18 page=0 chnl=0 +char id=77 x=227 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=78 x=245 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=79 x=263 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=80 x=281 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=81 x=299 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=82 x=317 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=83 x=335 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=84 x=353 y=0 width=16 height=18 xoffset=-3 yoffset=7 xadvance=17 page=0 chnl=0 +char id=85 x=369 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=86 x=387 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=18 page=0 chnl=0 +char id=87 x=405 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=88 x=423 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=89 x=441 y=0 width=16 height=18 xoffset=0 yoffset=7 xadvance=17 page=0 chnl=0 +char id=90 x=457 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=97 x=15 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=98 x=33 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=99 x=51 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=100 x=69 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=101 x=87 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=18 page=0 chnl=0 +char id=102 x=105 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=103 x=123 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=104 x=141 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=105 x=159 y=0 width=16 height=18 xoffset=0 yoffset=7 xadvance=17 page=0 chnl=0 +char id=106 x=175 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=107 x=193 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=108 x=211 y=0 width=16 height=18 xoffset=-2 yoffset=7 xadvance=18 page=0 chnl=0 +char id=109 x=227 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=110 x=245 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=111 x=263 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=112 x=281 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=113 x=299 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=114 x=317 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=115 x=335 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=116 x=353 y=0 width=16 height=18 xoffset=-3 yoffset=7 xadvance=17 page=0 chnl=0 +char id=117 x=369 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=118 x=387 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=18 page=0 chnl=0 +char id=119 x=405 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=120 x=423 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +char id=121 x=441 y=0 width=16 height=18 xoffset=0 yoffset=7 xadvance=17 page=0 chnl=0 +char id=122 x=457 y=0 width=18 height=18 xoffset=0 yoffset=7 xadvance=19 page=0 chnl=0 +kernings count=0 diff --git a/Project/Project_desktop_test_jar/skin/ArcadeClassic.png b/Project/Project_desktop_test_jar/skin/ArcadeClassic.png new file mode 100644 index 0000000..475c9d6 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/ArcadeClassic.png differ diff --git a/Project/Project_desktop_test_jar/skin/ButtonPack.atlas b/Project/Project_desktop_test_jar/skin/ButtonPack.atlas new file mode 100644 index 0000000..6f6a940 --- /dev/null +++ b/Project/Project_desktop_test_jar/skin/ButtonPack.atlas @@ -0,0 +1,196 @@ + +ButtonPack.png +size: 2048,512 +format: RGBA8888 +filter: Nearest,Nearest +repeat: none +BackButtonDown + rotate: false + xy: 1330, 269 + size: 216, 50 + orig: 216, 50 + offset: 0, 0 + index: -1 +BackButtonHover + rotate: false + xy: 270, 55 + size: 216, 50 + orig: 216, 50 + offset: 0, 0 + index: -1 +BackButtonUp + rotate: false + xy: 330, 107 + size: 216, 50 + orig: 216, 50 + offset: 0, 0 + index: -1 +ExitButtonDown + rotate: false + xy: 759, 217 + size: 205, 50 + orig: 205, 50 + offset: 0, 0 + index: -1 +ExitButtonHover + rotate: false + xy: 552, 217 + size: 205, 50 + orig: 205, 50 + offset: 0, 0 + index: -1 +ExitButtonUp + rotate: false + xy: 1548, 269 + size: 205, 50 + orig: 205, 50 + offset: 0, 0 + index: -1 +MainMenuButtonDown + rotate: false + xy: 1262, 373 + size: 448, 50 + orig: 448, 50 + offset: 0, 0 + index: -1 +MainMenuButtonHover + rotate: false + xy: 552, 269 + size: 448, 50 + orig: 448, 50 + offset: 0, 0 + index: -1 +MainMenuButtonUp + rotate: false + xy: 604, 321 + size: 448, 50 + orig: 448, 50 + offset: 0, 0 + index: -1 +MultiplayerButtonDown + rotate: false + xy: 1323, 425 + size: 598, 50 + orig: 598, 50 + offset: 0, 0 + index: -1 +MultiplayerButtonHover + rotate: false + xy: 661, 373 + size: 599, 50 + orig: 599, 50 + offset: 0, 0 + index: -1 +MultiplayerButtonUp + rotate: false + xy: 2, 321 + size: 600, 50 + orig: 600, 50 + offset: 0, 0 + index: -1 +PlayButtonDown + rotate: false + xy: 1712, 373 + size: 212, 50 + orig: 212, 50 + offset: 0, 0 + index: -1 +PlayButtonHover + rotate: false + xy: 1650, 321 + size: 212, 50 + orig: 212, 50 + offset: 0, 0 + index: -1 +PlayButtonUp + rotate: false + xy: 268, 3 + size: 212, 50 + orig: 212, 50 + offset: 0, 0 + index: -1 +ResumeButtonDown + rotate: false + xy: 1002, 269 + size: 326, 50 + orig: 326, 50 + offset: 0, 0 + index: -1 +ResumeButtonHover + rotate: false + xy: 1054, 321 + size: 326, 50 + orig: 326, 50 + offset: 0, 0 + index: -1 +ResumeButtonUp + rotate: false + xy: 2, 107 + size: 326, 50 + orig: 326, 50 + offset: 0, 0 + index: -1 +RetryButtonDown + rotate: false + xy: 1382, 321 + size: 266, 50 + orig: 266, 50 + offset: 0, 0 + index: -1 +RetryButtonHover + rotate: false + xy: 2, 2 + size: 264, 51 + orig: 264, 51 + offset: 0, 0 + index: -1 +RetryButtonUp + rotate: false + xy: 2, 55 + size: 266, 50 + orig: 266, 50 + offset: 0, 0 + index: -1 +ScoreboardButtonDown + rotate: false + xy: 2, 159 + size: 544, 52 + orig: 544, 52 + offset: 0, 0 + index: -1 +ScoreboardButtonHover + rotate: false + xy: 2, 213 + size: 546, 52 + orig: 546, 52 + offset: 0, 0 + index: -1 +ScoreboardButtonUp + rotate: false + xy: 2, 267 + size: 548, 52 + orig: 548, 52 + offset: 0, 0 + index: -1 +SingleplayerButtonDown + rotate: false + xy: 2, 425 + size: 660, 50 + orig: 660, 50 + offset: 0, 0 + index: -1 +SingleplayerButtonHover + rotate: false + xy: 664, 425 + size: 657, 50 + orig: 657, 50 + offset: 0, 0 + index: -1 +SingleplayerButtonUp + rotate: false + xy: 2, 373 + size: 657, 50 + orig: 657, 50 + offset: 0, 0 + index: -1 + diff --git a/Project/Project_desktop_test_jar/skin/ButtonPack.json b/Project/Project_desktop_test_jar/skin/ButtonPack.json new file mode 100644 index 0000000..6edaa37 --- /dev/null +++ b/Project/Project_desktop_test_jar/skin/ButtonPack.json @@ -0,0 +1,55 @@ +{ + com.badlogic.gdx.scenes.scene2d.ui.ImageButton$ImageButtonStyle: { + default: { + up: PlayButtonUp + down: PlayButtonDown + over: PlayButtonHover + }, + Play: { + up: PlayButtonUp + down: PlayButtonDown + over: PlayButtonHover + }, + Singleplayer: { + up: SingleplayerButtonUp + down: SingleplayerButtonDown + over: SingleplayerButtonHover + }, + Retry: { + up: RetryButtonUp + down: RetryButtonDown + over: RetryButtonHover + } + Multiplayer: { + up: MultiplayerButtonUp + down: MultiplayerButtonDown + over: MultiplayerButtonHover + }, + ScoreBoard: { + up: ScoreboardButtonUp + down: ScoreboardButtonDown + over: ScoreboardButtonHover + }, + Exit: { + up: ExitButtonUp + down: ExitButtonDown + over: ExitButtonHover + }, + Resume: { + up: ResumeButtonUp + down: ResumeButtonDown + over: ResumeButtonHover + } + MainMenu: { + up: MainMenuButtonUp + down: MainMenuButtonDown + over: MainMenuButtonHover + } + Back: + { + up: BackButtonUp + down: BackButtonDown + over: BackButtonHover + } + } +} \ No newline at end of file diff --git a/Project/Project_desktop_test_jar/skin/ButtonPack.png b/Project/Project_desktop_test_jar/skin/ButtonPack.png new file mode 100644 index 0000000..cf4125a Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/ButtonPack.png differ diff --git a/Project/Project_desktop_test_jar/skin/ButtonPackTestField.json b/Project/Project_desktop_test_jar/skin/ButtonPackTestField.json new file mode 100644 index 0000000..884dc43 --- /dev/null +++ b/Project/Project_desktop_test_jar/skin/ButtonPackTestField.json @@ -0,0 +1,24 @@ +{ +com.badlogic.gdx.graphics.g2d.BitmapFont: { + minecraft: { + file: minecraft.fnt + } +} +com.badlogic.gdx.scenes.scene2d.ui.ImageButton$ImageButtonStyle: { + default: { + up: PlayButtonUp + down: PlayButtonDown + over: PlayButtonHover + } + Play: { + up: PlayButtonUp + down: PlayButtonDown + over: PlayButtonHover + } + Exit: { + up: ExitButtonUp + down: ExitButtonDown + over: ExitButtonHover + } +} +} \ No newline at end of file diff --git a/Project/Project_desktop_test_jar/skin/GAMEOVER.png b/Project/Project_desktop_test_jar/skin/GAMEOVER.png new file mode 100644 index 0000000..e97a906 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/GAMEOVER.png differ diff --git a/Project/Project_desktop_test_jar/skin/GameTitle.png b/Project/Project_desktop_test_jar/skin/GameTitle.png new file mode 100644 index 0000000..62b55b6 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/GameTitle.png differ diff --git a/Project/Project_desktop_test_jar/skin/Pause.png b/Project/Project_desktop_test_jar/skin/Pause.png new file mode 100644 index 0000000..171044e Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/Pause.png differ diff --git a/Project/Project_desktop_test_jar/skin/README.md b/Project/Project_desktop_test_jar/skin/README.md new file mode 100644 index 0000000..7ed66f0 --- /dev/null +++ b/Project/Project_desktop_test_jar/skin/README.md @@ -0,0 +1 @@ +# Skin stuff diff --git a/Project/Project_desktop_test_jar/skin/Rectangle 1.png b/Project/Project_desktop_test_jar/skin/Rectangle 1.png new file mode 100644 index 0000000..28f6afe Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/Rectangle 1.png differ diff --git a/Project/Project_desktop_test_jar/skin/Textfield.atlas b/Project/Project_desktop_test_jar/skin/Textfield.atlas new file mode 100644 index 0000000..a43181e --- /dev/null +++ b/Project/Project_desktop_test_jar/skin/Textfield.atlas @@ -0,0 +1,83 @@ + +Textfield.png +size: 2048,2048 +format: RGBA8888 +filter: Linear,Linear +repeat: none +Background_mainmenu + rotate: false + xy: 1, 1243 + size: 1280, 720 + orig: 1280, 720 + offset: 0, 0 + index: -1 +ExitButtonDown + rotate: false + xy: 1283, 1634 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +ExitButtonHover + rotate: false + xy: 1, 398 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +ExitButtonUp + rotate: false + xy: 1283, 1498 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +Group 1 + rotate: false + xy: 1, 1048 + size: 682, 193 + orig: 682, 193 + offset: 0, 0 + index: -1 +PlayButtonDown + rotate: false + xy: 1581, 1634 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +PlayButtonHover + rotate: false + xy: 1, 262 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +PlayButtonUp + rotate: false + xy: 1283, 1362 + size: 296, 134 + orig: 296, 134 + offset: 0, 0 + index: -1 +Rectangle 1 + rotate: false + xy: 685, 1151 + size: 489, 90 + orig: 489, 90 + offset: 0, 0 + index: -1 +clicked + rotate: false + xy: 1283, 1770 + size: 682, 193 + orig: 682, 193 + offset: 0, 0 + index: -1 +minecraft + rotate: false + xy: 1, 534 + size: 512, 512 + orig: 512, 512 + offset: 0, 0 + index: -1 diff --git a/Project/Project_desktop_test_jar/skin/Textfield.json b/Project/Project_desktop_test_jar/skin/Textfield.json new file mode 100644 index 0000000..f8420ab --- /dev/null +++ b/Project/Project_desktop_test_jar/skin/Textfield.json @@ -0,0 +1,57 @@ +{ +com.badlogic.gdx.graphics.g2d.BitmapFont: { + minecraft: { + file: minecraft.fnt + } +} +com.badlogic.gdx.graphics.Color: { + RGBA_255_255_255_255: { + r: 1 + g: 1 + b: 1 + a: 1 + } +} +com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable: { + Group 1: { + region: Group 1 + minWidth: 13 + minHeight: 3 + } +} +com.badlogic.gdx.scenes.scene2d.ui.ImageButton$ImageButtonStyle: { + default: { + up: PlayButtonUp + down: PlayButtonDown + over: PlayButtonHover + } + Play: { + up: PlayButtonUp + down: PlayButtonDown + over: PlayButtonHover + } + Exit: { + up: ExitButtonUp + down: ExitButtonDown + over: ExitButtonHover + } +} +com.badlogic.gdx.scenes.scene2d.ui.Label$LabelStyle: { + default: { + font: minecraft + fontColor: RGBA_255_255_255_255 + } +} +com.badlogic.gdx.scenes.scene2d.ui.TextField$TextFieldStyle: { + default: { + font: minecraft + fontColor: RGBA_255_255_255_255 + background: Rectangle 1 + } +} +com.badlogic.gdx.scenes.scene2d.ui.TextTooltip$TextTooltipStyle: { + default: { + label: default + } +} +} \ No newline at end of file diff --git a/Project/Project_desktop_test_jar/skin/Textfield.png b/Project/Project_desktop_test_jar/skin/Textfield.png new file mode 100644 index 0000000..d44f513 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/Textfield.png differ diff --git a/Project/Project_desktop_test_jar/skin/minecraft.fnt b/Project/Project_desktop_test_jar/skin/minecraft.fnt new file mode 100644 index 0000000..39b93ce --- /dev/null +++ b/Project/Project_desktop_test_jar/skin/minecraft.fnt @@ -0,0 +1,102 @@ +info face="Minecraft" size=32 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=1,1,1,1 spacing=-2,-2 +common lineHeight=35 base=24 scaleW=512 scaleH=512 pages=1 packed=0 +page id=0 file="minecraft.png" +chars count=97 +char id=0 x=194 y=60 width=10 height=23 xoffset=0 yoffset=2 xadvance=12 page=0 chnl=0 +char id=10 x=0 y=0 width=0 height=0 xoffset=-1 yoffset=0 xadvance=0 page=0 chnl=0 +char id=32 x=0 y=0 width=0 height=0 xoffset=-1 yoffset=0 xadvance=10 page=0 chnl=0 +char id=33 x=0 y=60 width=6 height=26 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 +char id=34 x=22 y=86 width=18 height=14 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=35 x=114 y=60 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=36 x=80 y=0 width=18 height=30 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=37 x=88 y=60 width=26 height=26 xoffset=1 yoffset=-1 xadvance=28 page=0 chnl=0 +char id=38 x=136 y=60 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=39 x=76 y=86 width=6 height=10 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 +char id=40 x=24 y=60 width=14 height=26 xoffset=-1 yoffset=-1 xadvance=14 page=0 chnl=0 +char id=41 x=38 y=60 width=14 height=26 xoffset=-1 yoffset=-1 xadvance=14 page=0 chnl=0 +char id=42 x=496 y=60 width=14 height=14 xoffset=-1 yoffset=-1 xadvance=14 page=0 chnl=0 +char id=43 x=478 y=60 width=18 height=18 xoffset=1 yoffset=3 xadvance=20 page=0 chnl=0 +char id=44 x=82 y=86 width=6 height=10 xoffset=-1 yoffset=19 xadvance=6 page=0 chnl=0 +char id=45 x=102 y=86 width=12 height=6 xoffset=-1 yoffset=13 xadvance=12 page=0 chnl=0 +char id=46 x=96 y=86 width=6 height=6 xoffset=-1 yoffset=19 xadvance=6 page=0 chnl=0 +char id=47 x=52 y=60 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=48 x=492 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=49 x=326 y=34 width=14 height=26 xoffset=-1 yoffset=-1 xadvance=14 page=0 chnl=0 +char id=50 x=340 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=51 x=358 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=52 x=376 y=34 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=53 x=396 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=54 x=418 y=34 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=55 x=438 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=56 x=456 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=57 x=474 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=58 x=420 y=60 width=6 height=20 xoffset=1 yoffset=5 xadvance=8 page=0 chnl=0 +char id=59 x=188 y=60 width=6 height=24 xoffset=1 yoffset=5 xadvance=8 page=0 chnl=0 +char id=60 x=450 y=60 width=14 height=18 xoffset=-1 yoffset=3 xadvance=14 page=0 chnl=0 +char id=61 x=58 y=86 width=18 height=14 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=62 x=464 y=60 width=14 height=18 xoffset=-1 yoffset=3 xadvance=14 page=0 chnl=0 +char id=63 x=6 y=60 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=64 x=50 y=0 width=30 height=32 xoffset=-1 yoffset=-1 xadvance=30 page=0 chnl=0 +char id=65 x=116 y=0 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=66 x=136 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=67 x=158 y=0 width=24 height=26 xoffset=-1 yoffset=-1 xadvance=24 page=0 chnl=0 +char id=68 x=182 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=69 x=204 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=70 x=226 y=0 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=71 x=246 y=0 width=24 height=26 xoffset=-1 yoffset=-1 xadvance=24 page=0 chnl=0 +char id=72 x=270 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=73 x=292 y=0 width=10 height=26 xoffset=1 yoffset=-1 xadvance=12 page=0 chnl=0 +char id=74 x=302 y=0 width=16 height=26 xoffset=-1 yoffset=-1 xadvance=16 page=0 chnl=0 +char id=75 x=318 y=0 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=76 x=338 y=0 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=77 x=358 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=78 x=380 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=79 x=402 y=0 width=26 height=26 xoffset=-1 yoffset=-1 xadvance=26 page=0 chnl=0 +char id=80 x=428 y=0 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=81 x=450 y=0 width=26 height=26 xoffset=-1 yoffset=-1 xadvance=26 page=0 chnl=0 +char id=82 x=476 y=0 width=26 height=26 xoffset=-1 yoffset=-1 xadvance=26 page=0 chnl=0 +char id=83 x=0 y=34 width=20 height=26 xoffset=-1 yoffset=-1 xadvance=20 page=0 chnl=0 +char id=84 x=20 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=85 x=42 y=34 width=20 height=26 xoffset=1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=86 x=62 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=87 x=84 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=88 x=106 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=89 x=128 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=90 x=150 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=91 x=30 y=0 width=10 height=32 xoffset=-1 yoffset=-1 xadvance=10 page=0 chnl=0 +char id=92 x=70 y=60 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=93 x=40 y=0 width=10 height=32 xoffset=-1 yoffset=-1 xadvance=10 page=0 chnl=0 +char id=94 x=40 y=86 width=18 height=14 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=95 x=136 y=86 width=20 height=4 xoffset=-1 yoffset=21 xadvance=20 page=0 chnl=0 +char id=96 x=88 y=86 width=8 height=8 xoffset=1 yoffset=-1 xadvance=10 page=0 chnl=0 +char id=97 x=260 y=60 width=20 height=20 xoffset=-1 yoffset=5 xadvance=20 page=0 chnl=0 +char id=98 x=172 y=34 width=22 height=26 xoffset=-1 yoffset=-1 xadvance=22 page=0 chnl=0 +char id=99 x=280 y=60 width=20 height=20 xoffset=-1 yoffset=5 xadvance=20 page=0 chnl=0 +char id=100 x=194 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=101 x=300 y=60 width=18 height=20 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=102 x=212 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=103 x=98 y=0 width=18 height=28 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=104 x=230 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=105 x=502 y=0 width=6 height=26 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 +char id=106 x=248 y=34 width=16 height=26 xoffset=-1 yoffset=3 xadvance=16 page=0 chnl=0 +char id=107 x=264 y=34 width=18 height=26 xoffset=-1 yoffset=-1 xadvance=18 page=0 chnl=0 +char id=108 x=282 y=34 width=6 height=26 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 +char id=109 x=318 y=60 width=30 height=20 xoffset=-1 yoffset=5 xadvance=30 page=0 chnl=0 +char id=110 x=348 y=60 width=20 height=20 xoffset=-1 yoffset=5 xadvance=20 page=0 chnl=0 +char id=111 x=368 y=60 width=18 height=20 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=112 x=288 y=34 width=20 height=26 xoffset=-1 yoffset=5 xadvance=20 page=0 chnl=0 +char id=113 x=308 y=34 width=18 height=26 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=114 x=386 y=60 width=16 height=20 xoffset=-1 yoffset=5 xadvance=16 page=0 chnl=0 +char id=115 x=204 y=60 width=16 height=22 xoffset=-1 yoffset=3 xadvance=16 page=0 chnl=0 +char id=116 x=158 y=60 width=12 height=24 xoffset=-1 yoffset=1 xadvance=12 page=0 chnl=0 +char id=117 x=402 y=60 width=18 height=20 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=118 x=0 y=86 width=22 height=16 xoffset=-1 yoffset=9 xadvance=22 page=0 chnl=0 +char id=119 x=426 y=60 width=24 height=18 xoffset=-1 yoffset=7 xadvance=24 page=0 chnl=0 +char id=120 x=220 y=60 width=22 height=22 xoffset=-1 yoffset=3 xadvance=22 page=0 chnl=0 +char id=121 x=170 y=60 width=18 height=24 xoffset=-1 yoffset=5 xadvance=18 page=0 chnl=0 +char id=122 x=242 y=60 width=18 height=22 xoffset=-1 yoffset=3 xadvance=18 page=0 chnl=0 +char id=123 x=0 y=0 width=12 height=34 xoffset=-1 yoffset=-1 xadvance=12 page=0 chnl=0 +char id=124 x=24 y=0 width=6 height=34 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 +char id=125 x=12 y=0 width=12 height=34 xoffset=-1 yoffset=-1 xadvance=12 page=0 chnl=0 +char id=126 x=114 y=86 width=22 height=6 xoffset=-1 yoffset=9 xadvance=22 page=0 chnl=0 +kernings count=0 diff --git a/Project/Project_desktop_test_jar/skin/minecraft.png b/Project/Project_desktop_test_jar/skin/minecraft.png new file mode 100644 index 0000000..128908f Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/minecraft.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/check-off.png b/Project/Project_desktop_test_jar/skin/test_data/check-off.png new file mode 100644 index 0000000..1cc70c4 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/check-off.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/check-on.png b/Project/Project_desktop_test_jar/skin/test_data/check-on.png new file mode 100644 index 0000000..57d6d0f Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/check-on.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/cursor.9.png b/Project/Project_desktop_test_jar/skin/test_data/cursor.9.png new file mode 100644 index 0000000..6aa4fab Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/cursor.9.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/default-pane-noborder.9.png b/Project/Project_desktop_test_jar/skin/test_data/default-pane-noborder.9.png new file mode 100644 index 0000000..b308275 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/default-pane-noborder.9.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/default-pane.9.png b/Project/Project_desktop_test_jar/skin/test_data/default-pane.9.png new file mode 100644 index 0000000..655164f Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/default-pane.9.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/default-rect-down.9.png b/Project/Project_desktop_test_jar/skin/test_data/default-rect-down.9.png new file mode 100644 index 0000000..2ef326f Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/default-rect-down.9.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/default-rect-pad.9.png b/Project/Project_desktop_test_jar/skin/test_data/default-rect-pad.9.png new file mode 100644 index 0000000..655164f Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/default-rect-pad.9.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/default-rect.9.png b/Project/Project_desktop_test_jar/skin/test_data/default-rect.9.png new file mode 100644 index 0000000..6309ff0 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/default-rect.9.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/default-round-down.9.png b/Project/Project_desktop_test_jar/skin/test_data/default-round-down.9.png new file mode 100644 index 0000000..8311e06 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/default-round-down.9.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/default-round-large.9.png b/Project/Project_desktop_test_jar/skin/test_data/default-round-large.9.png new file mode 100644 index 0000000..4fcba07 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/default-round-large.9.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/default-round.9.png b/Project/Project_desktop_test_jar/skin/test_data/default-round.9.png new file mode 100644 index 0000000..08b7b93 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/default-round.9.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/default-scroll.9.png b/Project/Project_desktop_test_jar/skin/test_data/default-scroll.9.png new file mode 100644 index 0000000..09b5de9 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/default-scroll.9.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/default-select-selection.9.png b/Project/Project_desktop_test_jar/skin/test_data/default-select-selection.9.png new file mode 100644 index 0000000..12202e7 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/default-select-selection.9.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/default-select.9.png b/Project/Project_desktop_test_jar/skin/test_data/default-select.9.png new file mode 100644 index 0000000..b4aef8b Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/default-select.9.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/default-slider-knob.png b/Project/Project_desktop_test_jar/skin/test_data/default-slider-knob.png new file mode 100644 index 0000000..2ba5b9d Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/default-slider-knob.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/default-slider.9.png b/Project/Project_desktop_test_jar/skin/test_data/default-slider.9.png new file mode 100644 index 0000000..7ef86d8 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/default-slider.9.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/default-splitpane-vertical.9.png b/Project/Project_desktop_test_jar/skin/test_data/default-splitpane-vertical.9.png new file mode 100644 index 0000000..13ffaa5 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/default-splitpane-vertical.9.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/default-splitpane.9.png b/Project/Project_desktop_test_jar/skin/test_data/default-splitpane.9.png new file mode 100644 index 0000000..070753d Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/default-splitpane.9.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/default-window.9.png b/Project/Project_desktop_test_jar/skin/test_data/default-window.9.png new file mode 100644 index 0000000..5204599 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/default-window.9.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/default.png b/Project/Project_desktop_test_jar/skin/test_data/default.png new file mode 100644 index 0000000..1bb19f6 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/default.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/selection.png b/Project/Project_desktop_test_jar/skin/test_data/selection.png new file mode 100644 index 0000000..26cc9f1 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/selection.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/textfield.9.png b/Project/Project_desktop_test_jar/skin/test_data/textfield.9.png new file mode 100644 index 0000000..df7bfb4 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/textfield.9.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/tree-minus.png b/Project/Project_desktop_test_jar/skin/test_data/tree-minus.png new file mode 100644 index 0000000..99924c9 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/tree-minus.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/tree-plus.png b/Project/Project_desktop_test_jar/skin/test_data/tree-plus.png new file mode 100644 index 0000000..a4a5876 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/tree-plus.png differ diff --git a/Project/Project_desktop_test_jar/skin/test_data/white.png b/Project/Project_desktop_test_jar/skin/test_data/white.png new file mode 100644 index 0000000..a5566c7 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/test_data/white.png differ diff --git a/Project/Project_desktop_test_jar/skin/testingfont.atlas b/Project/Project_desktop_test_jar/skin/testingfont.atlas new file mode 100644 index 0000000..cbaee08 --- /dev/null +++ b/Project/Project_desktop_test_jar/skin/testingfont.atlas @@ -0,0 +1,14 @@ + + +testingfont.png +size: 1024,1024 +format: RGBA8888 +filter: Nearest,Nearest +repeat: none +minecraft + rotate: false + xy: 2, 2 + size: 512, 512 + orig: 512, 512 + offset: 0, 0 + index: -1 \ No newline at end of file diff --git a/Project/Project_desktop_test_jar/skin/testingfont.json b/Project/Project_desktop_test_jar/skin/testingfont.json new file mode 100644 index 0000000..f3d27f9 --- /dev/null +++ b/Project/Project_desktop_test_jar/skin/testingfont.json @@ -0,0 +1,27 @@ +{ + com.badlogic.gdx.graphics.g2d.BitmapFont: { + minecraft: { + file: minecraft.fnt + } + } + com.badlogic.gdx.graphics.Color: { + RGBA_255_255_255_255: { + r: 1 + g: 1 + b: 1 + a: 1 + } + } + com.badlogic.gdx.scenes.scene2d.ui.TextField$TextFieldStyle: { + default: { + font: minecraft + fontColor: RGBA_255_255_255_255 + } + }, + "com.badlogic.gdx.scenes.scene2d.ui.Label$LabelStyle": { + "default": { + font: minecraft + fontColor: RGBA_255_255_255_255 + } + } +} \ No newline at end of file diff --git a/Project/Project_desktop_test_jar/skin/testingfont.png b/Project/Project_desktop_test_jar/skin/testingfont.png new file mode 100644 index 0000000..d903fb5 Binary files /dev/null and b/Project/Project_desktop_test_jar/skin/testingfont.png differ diff --git a/Project/Project_desktop_test_jar/test.png b/Project/Project_desktop_test_jar/test.png new file mode 100644 index 0000000..d094b81 Binary files /dev/null and b/Project/Project_desktop_test_jar/test.png differ diff --git a/Project/Scores.json b/Project/Scores.json new file mode 100644 index 0000000..4071c16 --- /dev/null +++ b/Project/Scores.json @@ -0,0 +1 @@ +[{score:134},{score:54},{score:40},{score:17},{name:---,score:10},{name:---,score:10},{name:---,score:10},{name:---,score:10},{name:---,score:10},{name:---,score:10}] \ No newline at end of file diff --git a/Project/Server/node_modules/.bin/is-ci b/Project/Server/node_modules/.bin/is-ci new file mode 100644 index 0000000..bc5605a --- /dev/null +++ b/Project/Server/node_modules/.bin/is-ci @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../is-ci/bin.js" "$@" + ret=$? +else + node "$basedir/../is-ci/bin.js" "$@" + ret=$? +fi +exit $ret diff --git a/Project/Server/node_modules/.bin/is-ci.cmd b/Project/Server/node_modules/.bin/is-ci.cmd new file mode 100644 index 0000000..a68da49 --- /dev/null +++ b/Project/Server/node_modules/.bin/is-ci.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\is-ci\bin.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\is-ci\bin.js" %* +) \ No newline at end of file diff --git a/Project/Server/node_modules/.bin/mime b/Project/Server/node_modules/.bin/mime new file mode 100644 index 0000000..0dbddf0 --- /dev/null +++ b/Project/Server/node_modules/.bin/mime @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../mime/cli.js" "$@" + ret=$? +else + node "$basedir/../mime/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/Project/Server/node_modules/.bin/mime.cmd b/Project/Server/node_modules/.bin/mime.cmd new file mode 100644 index 0000000..8169562 --- /dev/null +++ b/Project/Server/node_modules/.bin/mime.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\mime\cli.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\mime\cli.js" %* +) \ No newline at end of file diff --git a/Project/Server/node_modules/.bin/nodemon b/Project/Server/node_modules/.bin/nodemon new file mode 100644 index 0000000..22d2f6a --- /dev/null +++ b/Project/Server/node_modules/.bin/nodemon @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../nodemon/bin/nodemon.js" "$@" + ret=$? +else + node "$basedir/../nodemon/bin/nodemon.js" "$@" + ret=$? +fi +exit $ret diff --git a/Project/Server/node_modules/.bin/nodemon.cmd b/Project/Server/node_modules/.bin/nodemon.cmd new file mode 100644 index 0000000..a7c5be1 --- /dev/null +++ b/Project/Server/node_modules/.bin/nodemon.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\nodemon\bin\nodemon.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\nodemon\bin\nodemon.js" %* +) \ No newline at end of file diff --git a/Project/Server/node_modules/.bin/nodetouch b/Project/Server/node_modules/.bin/nodetouch new file mode 100644 index 0000000..479e4f6 --- /dev/null +++ b/Project/Server/node_modules/.bin/nodetouch @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../touch/bin/nodetouch.js" "$@" + ret=$? +else + node "$basedir/../touch/bin/nodetouch.js" "$@" + ret=$? +fi +exit $ret diff --git a/Project/Server/node_modules/.bin/nodetouch.cmd b/Project/Server/node_modules/.bin/nodetouch.cmd new file mode 100644 index 0000000..dba681b --- /dev/null +++ b/Project/Server/node_modules/.bin/nodetouch.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\touch\bin\nodetouch.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\touch\bin\nodetouch.js" %* +) \ No newline at end of file diff --git a/Project/Server/node_modules/.bin/nopt b/Project/Server/node_modules/.bin/nopt new file mode 100644 index 0000000..714334e --- /dev/null +++ b/Project/Server/node_modules/.bin/nopt @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../nopt/bin/nopt.js" "$@" + ret=$? +else + node "$basedir/../nopt/bin/nopt.js" "$@" + ret=$? +fi +exit $ret diff --git a/Project/Server/node_modules/.bin/nopt.cmd b/Project/Server/node_modules/.bin/nopt.cmd new file mode 100644 index 0000000..1626454 --- /dev/null +++ b/Project/Server/node_modules/.bin/nopt.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\nopt\bin\nopt.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\nopt\bin\nopt.js" %* +) \ No newline at end of file diff --git a/Project/Server/node_modules/.bin/rc b/Project/Server/node_modules/.bin/rc new file mode 100644 index 0000000..eb55931 --- /dev/null +++ b/Project/Server/node_modules/.bin/rc @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../rc/cli.js" "$@" + ret=$? +else + node "$basedir/../rc/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/Project/Server/node_modules/.bin/rc.cmd b/Project/Server/node_modules/.bin/rc.cmd new file mode 100644 index 0000000..b1c891e --- /dev/null +++ b/Project/Server/node_modules/.bin/rc.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\rc\cli.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\rc\cli.js" %* +) \ No newline at end of file diff --git a/Project/Server/node_modules/.bin/semver b/Project/Server/node_modules/.bin/semver new file mode 100644 index 0000000..d592e69 --- /dev/null +++ b/Project/Server/node_modules/.bin/semver @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../semver/bin/semver" "$@" + ret=$? +else + node "$basedir/../semver/bin/semver" "$@" + ret=$? +fi +exit $ret diff --git a/Project/Server/node_modules/.bin/semver.cmd b/Project/Server/node_modules/.bin/semver.cmd new file mode 100644 index 0000000..37c00a4 --- /dev/null +++ b/Project/Server/node_modules/.bin/semver.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\semver\bin\semver" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\semver\bin\semver" %* +) \ No newline at end of file diff --git a/Project/Server/node_modules/@sindresorhus/is/dist/index.d.ts b/Project/Server/node_modules/@sindresorhus/is/dist/index.d.ts new file mode 100644 index 0000000..e94d30b --- /dev/null +++ b/Project/Server/node_modules/@sindresorhus/is/dist/index.d.ts @@ -0,0 +1,132 @@ +/// +/// +/// +/// +/// +declare type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array; +declare type Primitive = null | undefined | string | number | boolean | Symbol; +export interface ArrayLike { + length: number; +} +export interface Class { + new (...args: any[]): T; +} +declare type DomElement = object & { + nodeType: 1; + nodeName: string; +}; +declare type NodeStream = object & { + pipe: Function; +}; +export declare const enum TypeName { + null = "null", + boolean = "boolean", + undefined = "undefined", + string = "string", + number = "number", + symbol = "symbol", + Function = "Function", + GeneratorFunction = "GeneratorFunction", + AsyncFunction = "AsyncFunction", + Observable = "Observable", + Array = "Array", + Buffer = "Buffer", + Object = "Object", + RegExp = "RegExp", + Date = "Date", + Error = "Error", + Map = "Map", + Set = "Set", + WeakMap = "WeakMap", + WeakSet = "WeakSet", + Int8Array = "Int8Array", + Uint8Array = "Uint8Array", + Uint8ClampedArray = "Uint8ClampedArray", + Int16Array = "Int16Array", + Uint16Array = "Uint16Array", + Int32Array = "Int32Array", + Uint32Array = "Uint32Array", + Float32Array = "Float32Array", + Float64Array = "Float64Array", + ArrayBuffer = "ArrayBuffer", + SharedArrayBuffer = "SharedArrayBuffer", + DataView = "DataView", + Promise = "Promise", + URL = "URL" +} +declare function is(value: unknown): TypeName; +declare namespace is { + const undefined: (value: unknown) => value is undefined; + const string: (value: unknown) => value is string; + const number: (value: unknown) => value is number; + const function_: (value: unknown) => value is Function; + const null_: (value: unknown) => value is null; + const class_: (value: unknown) => value is Class; + const boolean: (value: unknown) => value is boolean; + const symbol: (value: unknown) => value is Symbol; + const numericString: (value: unknown) => boolean; + const array: (arg: any) => arg is any[]; + const buffer: (input: unknown) => input is Buffer; + const nullOrUndefined: (value: unknown) => value is null | undefined; + const object: (value: unknown) => value is object; + const iterable: (value: unknown) => value is IterableIterator; + const asyncIterable: (value: unknown) => value is AsyncIterableIterator; + const generator: (value: unknown) => value is Generator; + const nativePromise: (value: unknown) => value is Promise; + const promise: (value: unknown) => value is Promise; + const generatorFunction: (value: unknown) => value is GeneratorFunction; + const asyncFunction: (value: unknown) => value is Function; + const boundFunction: (value: unknown) => value is Function; + const regExp: (value: unknown) => value is RegExp; + const date: (value: unknown) => value is Date; + const error: (value: unknown) => value is Error; + const map: (value: unknown) => value is Map; + const set: (value: unknown) => value is Set; + const weakMap: (value: unknown) => value is WeakMap; + const weakSet: (value: unknown) => value is WeakSet; + const int8Array: (value: unknown) => value is Int8Array; + const uint8Array: (value: unknown) => value is Uint8Array; + const uint8ClampedArray: (value: unknown) => value is Uint8ClampedArray; + const int16Array: (value: unknown) => value is Int16Array; + const uint16Array: (value: unknown) => value is Uint16Array; + const int32Array: (value: unknown) => value is Int32Array; + const uint32Array: (value: unknown) => value is Uint32Array; + const float32Array: (value: unknown) => value is Float32Array; + const float64Array: (value: unknown) => value is Float64Array; + const arrayBuffer: (value: unknown) => value is ArrayBuffer; + const sharedArrayBuffer: (value: unknown) => value is SharedArrayBuffer; + const dataView: (value: unknown) => value is DataView; + const directInstanceOf: (instance: unknown, klass: Class) => instance is T; + const urlInstance: (value: unknown) => value is URL; + const urlString: (value: unknown) => boolean; + const truthy: (value: unknown) => boolean; + const falsy: (value: unknown) => boolean; + const nan: (value: unknown) => boolean; + const primitive: (value: unknown) => value is Primitive; + const integer: (value: unknown) => value is number; + const safeInteger: (value: unknown) => value is number; + const plainObject: (value: unknown) => boolean; + const typedArray: (value: unknown) => value is TypedArray; + const arrayLike: (value: unknown) => value is ArrayLike; + const inRange: (value: number, range: number | number[]) => boolean; + const domElement: (value: unknown) => value is DomElement; + const observable: (value: unknown) => boolean; + const nodeStream: (value: unknown) => value is NodeStream; + const infinite: (value: unknown) => boolean; + const even: (value: number) => boolean; + const odd: (value: number) => boolean; + const emptyArray: (value: unknown) => boolean; + const nonEmptyArray: (value: unknown) => boolean; + const emptyString: (value: unknown) => boolean; + const nonEmptyString: (value: unknown) => boolean; + const emptyStringOrWhitespace: (value: unknown) => boolean; + const emptyObject: (value: unknown) => boolean; + const nonEmptyObject: (value: unknown) => boolean; + const emptySet: (value: unknown) => boolean; + const nonEmptySet: (value: unknown) => boolean; + const emptyMap: (value: unknown) => boolean; + const nonEmptyMap: (value: unknown) => boolean; + const any: (predicate: unknown, ...values: unknown[]) => boolean; + const all: (predicate: unknown, ...values: unknown[]) => boolean; +} +export default is; diff --git a/Project/Server/node_modules/@sindresorhus/is/dist/index.js b/Project/Server/node_modules/@sindresorhus/is/dist/index.js new file mode 100644 index 0000000..3cbafae --- /dev/null +++ b/Project/Server/node_modules/@sindresorhus/is/dist/index.js @@ -0,0 +1,245 @@ +"use strict"; +/// +/// +/// +/// +Object.defineProperty(exports, "__esModule", { value: true }); +// TODO: Use the `URL` global when targeting Node.js 10 +// tslint:disable-next-line +const URLGlobal = typeof URL === 'undefined' ? require('url').URL : URL; +const toString = Object.prototype.toString; +const isOfType = (type) => (value) => typeof value === type; +const isBuffer = (input) => !is.nullOrUndefined(input) && !is.nullOrUndefined(input.constructor) && is.function_(input.constructor.isBuffer) && input.constructor.isBuffer(input); +const getObjectType = (value) => { + const objectName = toString.call(value).slice(8, -1); + if (objectName) { + return objectName; + } + return null; +}; +const isObjectOfType = (type) => (value) => getObjectType(value) === type; +function is(value) { + switch (value) { + case null: + return "null" /* null */; + case true: + case false: + return "boolean" /* boolean */; + default: + } + switch (typeof value) { + case 'undefined': + return "undefined" /* undefined */; + case 'string': + return "string" /* string */; + case 'number': + return "number" /* number */; + case 'symbol': + return "symbol" /* symbol */; + default: + } + if (is.function_(value)) { + return "Function" /* Function */; + } + if (is.observable(value)) { + return "Observable" /* Observable */; + } + if (Array.isArray(value)) { + return "Array" /* Array */; + } + if (isBuffer(value)) { + return "Buffer" /* Buffer */; + } + const tagType = getObjectType(value); + if (tagType) { + return tagType; + } + if (value instanceof String || value instanceof Boolean || value instanceof Number) { + throw new TypeError('Please don\'t use object wrappers for primitive types'); + } + return "Object" /* Object */; +} +(function (is) { + // tslint:disable-next-line:strict-type-predicates + const isObject = (value) => typeof value === 'object'; + // tslint:disable:variable-name + is.undefined = isOfType('undefined'); + is.string = isOfType('string'); + is.number = isOfType('number'); + is.function_ = isOfType('function'); + // tslint:disable-next-line:strict-type-predicates + is.null_ = (value) => value === null; + is.class_ = (value) => is.function_(value) && value.toString().startsWith('class '); + is.boolean = (value) => value === true || value === false; + is.symbol = isOfType('symbol'); + // tslint:enable:variable-name + is.numericString = (value) => is.string(value) && value.length > 0 && !Number.isNaN(Number(value)); + is.array = Array.isArray; + is.buffer = isBuffer; + is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value); + is.object = (value) => !is.nullOrUndefined(value) && (is.function_(value) || isObject(value)); + is.iterable = (value) => !is.nullOrUndefined(value) && is.function_(value[Symbol.iterator]); + is.asyncIterable = (value) => !is.nullOrUndefined(value) && is.function_(value[Symbol.asyncIterator]); + is.generator = (value) => is.iterable(value) && is.function_(value.next) && is.function_(value.throw); + is.nativePromise = (value) => isObjectOfType("Promise" /* Promise */)(value); + const hasPromiseAPI = (value) => !is.null_(value) && + isObject(value) && + is.function_(value.then) && + is.function_(value.catch); + is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value); + is.generatorFunction = isObjectOfType("GeneratorFunction" /* GeneratorFunction */); + is.asyncFunction = isObjectOfType("AsyncFunction" /* AsyncFunction */); + is.boundFunction = (value) => is.function_(value) && !value.hasOwnProperty('prototype'); + is.regExp = isObjectOfType("RegExp" /* RegExp */); + is.date = isObjectOfType("Date" /* Date */); + is.error = isObjectOfType("Error" /* Error */); + is.map = (value) => isObjectOfType("Map" /* Map */)(value); + is.set = (value) => isObjectOfType("Set" /* Set */)(value); + is.weakMap = (value) => isObjectOfType("WeakMap" /* WeakMap */)(value); + is.weakSet = (value) => isObjectOfType("WeakSet" /* WeakSet */)(value); + is.int8Array = isObjectOfType("Int8Array" /* Int8Array */); + is.uint8Array = isObjectOfType("Uint8Array" /* Uint8Array */); + is.uint8ClampedArray = isObjectOfType("Uint8ClampedArray" /* Uint8ClampedArray */); + is.int16Array = isObjectOfType("Int16Array" /* Int16Array */); + is.uint16Array = isObjectOfType("Uint16Array" /* Uint16Array */); + is.int32Array = isObjectOfType("Int32Array" /* Int32Array */); + is.uint32Array = isObjectOfType("Uint32Array" /* Uint32Array */); + is.float32Array = isObjectOfType("Float32Array" /* Float32Array */); + is.float64Array = isObjectOfType("Float64Array" /* Float64Array */); + is.arrayBuffer = isObjectOfType("ArrayBuffer" /* ArrayBuffer */); + is.sharedArrayBuffer = isObjectOfType("SharedArrayBuffer" /* SharedArrayBuffer */); + is.dataView = isObjectOfType("DataView" /* DataView */); + is.directInstanceOf = (instance, klass) => Object.getPrototypeOf(instance) === klass.prototype; + is.urlInstance = (value) => isObjectOfType("URL" /* URL */)(value); + is.urlString = (value) => { + if (!is.string(value)) { + return false; + } + try { + new URLGlobal(value); // tslint:disable-line no-unused-expression + return true; + } + catch (_a) { + return false; + } + }; + is.truthy = (value) => Boolean(value); + is.falsy = (value) => !value; + is.nan = (value) => Number.isNaN(value); + const primitiveTypes = new Set([ + 'undefined', + 'string', + 'number', + 'boolean', + 'symbol' + ]); + is.primitive = (value) => is.null_(value) || primitiveTypes.has(typeof value); + is.integer = (value) => Number.isInteger(value); + is.safeInteger = (value) => Number.isSafeInteger(value); + is.plainObject = (value) => { + // From: https://github.com/sindresorhus/is-plain-obj/blob/master/index.js + let prototype; + return getObjectType(value) === "Object" /* Object */ && + (prototype = Object.getPrototypeOf(value), prototype === null || // tslint:disable-line:ban-comma-operator + prototype === Object.getPrototypeOf({})); + }; + const typedArrayTypes = new Set([ + "Int8Array" /* Int8Array */, + "Uint8Array" /* Uint8Array */, + "Uint8ClampedArray" /* Uint8ClampedArray */, + "Int16Array" /* Int16Array */, + "Uint16Array" /* Uint16Array */, + "Int32Array" /* Int32Array */, + "Uint32Array" /* Uint32Array */, + "Float32Array" /* Float32Array */, + "Float64Array" /* Float64Array */ + ]); + is.typedArray = (value) => { + const objectType = getObjectType(value); + if (objectType === null) { + return false; + } + return typedArrayTypes.has(objectType); + }; + const isValidLength = (value) => is.safeInteger(value) && value > -1; + is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length); + is.inRange = (value, range) => { + if (is.number(range)) { + return value >= Math.min(0, range) && value <= Math.max(range, 0); + } + if (is.array(range) && range.length === 2) { + return value >= Math.min(...range) && value <= Math.max(...range); + } + throw new TypeError(`Invalid range: ${JSON.stringify(range)}`); + }; + const NODE_TYPE_ELEMENT = 1; + const DOM_PROPERTIES_TO_CHECK = [ + 'innerHTML', + 'ownerDocument', + 'style', + 'attributes', + 'nodeValue' + ]; + is.domElement = (value) => is.object(value) && value.nodeType === NODE_TYPE_ELEMENT && is.string(value.nodeName) && + !is.plainObject(value) && DOM_PROPERTIES_TO_CHECK.every(property => property in value); + is.observable = (value) => { + if (!value) { + return false; + } + if (value[Symbol.observable] && value === value[Symbol.observable]()) { + return true; + } + if (value['@@observable'] && value === value['@@observable']()) { + return true; + } + return false; + }; + is.nodeStream = (value) => !is.nullOrUndefined(value) && isObject(value) && is.function_(value.pipe) && !is.observable(value); + is.infinite = (value) => value === Infinity || value === -Infinity; + const isAbsoluteMod2 = (rem) => (value) => is.integer(value) && Math.abs(value % 2) === rem; + is.even = isAbsoluteMod2(0); + is.odd = isAbsoluteMod2(1); + const isWhiteSpaceString = (value) => is.string(value) && /\S/.test(value) === false; + is.emptyArray = (value) => is.array(value) && value.length === 0; + is.nonEmptyArray = (value) => is.array(value) && value.length > 0; + is.emptyString = (value) => is.string(value) && value.length === 0; + is.nonEmptyString = (value) => is.string(value) && value.length > 0; + is.emptyStringOrWhitespace = (value) => is.emptyString(value) || isWhiteSpaceString(value); + is.emptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length === 0; + is.nonEmptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length > 0; + is.emptySet = (value) => is.set(value) && value.size === 0; + is.nonEmptySet = (value) => is.set(value) && value.size > 0; + is.emptyMap = (value) => is.map(value) && value.size === 0; + is.nonEmptyMap = (value) => is.map(value) && value.size > 0; + const predicateOnArray = (method, predicate, values) => { + if (is.function_(predicate) === false) { + throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`); + } + if (values.length === 0) { + throw new TypeError('Invalid number of values'); + } + return method.call(values, predicate); + }; + // tslint:disable variable-name + is.any = (predicate, ...values) => predicateOnArray(Array.prototype.some, predicate, values); + is.all = (predicate, ...values) => predicateOnArray(Array.prototype.every, predicate, values); + // tslint:enable variable-name +})(is || (is = {})); +// Some few keywords are reserved, but we'll populate them for Node.js users +// See https://github.com/Microsoft/TypeScript/issues/2536 +Object.defineProperties(is, { + class: { + value: is.class_ + }, + function: { + value: is.function_ + }, + null: { + value: is.null_ + } +}); +exports.default = is; +// For CommonJS default export support +module.exports = is; +module.exports.default = is; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/Project/Server/node_modules/@sindresorhus/is/dist/index.js.map b/Project/Server/node_modules/@sindresorhus/is/dist/index.js.map new file mode 100644 index 0000000..cd827fc --- /dev/null +++ b/Project/Server/node_modules/@sindresorhus/is/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":";AAAA,6BAA6B;AAC7B,0CAA0C;AAC1C,2CAA2C;AAC3C,0BAA0B;;AAE1B,uDAAuD;AACvD,2BAA2B;AAC3B,MAAM,SAAS,GAAG,OAAO,GAAG,KAAK,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;AAqDxE,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAC3C,MAAM,QAAQ,GAAG,CAAI,IAAY,EAAE,EAAE,CAAC,CAAC,KAAc,EAAc,EAAE,CAAC,OAAO,KAAK,KAAK,IAAI,CAAC;AAC5F,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAmB,EAAE,CAAC,CAAC,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,eAAe,CAAE,KAAgB,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,SAAS,CAAE,KAAgB,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAK,KAAgB,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAEhP,MAAM,aAAa,GAAG,CAAC,KAAc,EAAmB,EAAE;IACzD,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAErD,IAAI,UAAU,EAAE;QACf,OAAO,UAAsB,CAAC;KAC9B;IAED,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAI,IAAc,EAAE,EAAE,CAAC,CAAC,KAAc,EAAc,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;AAE5G,SAAS,EAAE,CAAC,KAAc;IACzB,QAAQ,KAAK,EAAE;QACd,KAAK,IAAI;YACR,yBAAqB;QACtB,KAAK,IAAI,CAAC;QACV,KAAK,KAAK;YACT,+BAAwB;QACzB,QAAQ;KACR;IAED,QAAQ,OAAO,KAAK,EAAE;QACrB,KAAK,WAAW;YACf,mCAA0B;QAC3B,KAAK,QAAQ;YACZ,6BAAuB;QACxB,KAAK,QAAQ;YACZ,6BAAuB;QACxB,KAAK,QAAQ;YACZ,6BAAuB;QACxB,QAAQ;KACR;IAED,IAAI,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;QACxB,iCAAyB;KACzB;IAED,IAAI,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;QACzB,qCAA2B;KAC3B;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACzB,2BAAsB;KACtB;IAED,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;QACpB,6BAAuB;KACvB;IAED,MAAM,OAAO,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IACrC,IAAI,OAAO,EAAE;QACZ,OAAO,OAAO,CAAC;KACf;IAED,IAAI,KAAK,YAAY,MAAM,IAAI,KAAK,YAAY,OAAO,IAAI,KAAK,YAAY,MAAM,EAAE;QACnF,MAAM,IAAI,SAAS,CAAC,uDAAuD,CAAC,CAAC;KAC7E;IAED,6BAAuB;AACxB,CAAC;AAED,WAAU,EAAE;IACX,kDAAkD;IAClD,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAmB,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC;IAEhF,+BAA+B;IAClB,YAAS,GAAG,QAAQ,CAAY,WAAW,CAAC,CAAC;IAC7C,SAAM,GAAG,QAAQ,CAAS,QAAQ,CAAC,CAAC;IACpC,SAAM,GAAG,QAAQ,CAAS,QAAQ,CAAC,CAAC;IACpC,YAAS,GAAG,QAAQ,CAAW,UAAU,CAAC,CAAC;IACxD,kDAAkD;IACrC,QAAK,GAAG,CAAC,KAAc,EAAiB,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;IAC1D,SAAM,GAAG,CAAC,KAAc,EAAkB,EAAE,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACvG,UAAO,GAAG,CAAC,KAAc,EAAoB,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC;IAClF,SAAM,GAAG,QAAQ,CAAS,QAAQ,CAAC,CAAC;IACjD,8BAA8B;IAEjB,gBAAa,GAAG,CAAC,KAAc,EAAW,EAAE,CACxD,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAEtD,QAAK,GAAG,KAAK,CAAC,OAAO,CAAC;IACtB,SAAM,GAAG,QAAQ,CAAC;IAElB,kBAAe,GAAG,CAAC,KAAc,EAA6B,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,CAAC;IAClG,SAAM,GAAG,CAAC,KAAc,EAAmB,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/G,WAAQ,GAAG,CAAC,KAAc,EAAsC,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAE,KAAmC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC/J,gBAAa,GAAG,CAAC,KAAc,EAA2C,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAE,KAAwC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;IACnL,YAAS,GAAG,CAAC,KAAc,EAAsB,EAAE,CAAC,GAAA,QAAQ,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEvH,gBAAa,GAAG,CAAC,KAAc,EAA6B,EAAE,CAC1E,cAAc,yBAAoC,CAAC,KAAK,CAAC,CAAC;IAE3D,MAAM,aAAa,GAAG,CAAC,KAAc,EAA6B,EAAE,CACnE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC;QACb,QAAQ,CAAC,KAAK,CAAY;QAC1B,GAAA,SAAS,CAAE,KAA0B,CAAC,IAAI,CAAC;QAC3C,GAAA,SAAS,CAAE,KAA0B,CAAC,KAAK,CAAC,CAAC;IAEjC,UAAO,GAAG,CAAC,KAAc,EAA6B,EAAE,CAAC,GAAA,aAAa,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;IAEtG,oBAAiB,GAAG,cAAc,6CAA+C,CAAC;IAClF,gBAAa,GAAG,cAAc,qCAAkC,CAAC;IACjE,gBAAa,GAAG,CAAC,KAAc,EAAqB,EAAE,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAE9G,SAAM,GAAG,cAAc,uBAAyB,CAAC;IACjD,OAAI,GAAG,cAAc,mBAAqB,CAAC;IAC3C,QAAK,GAAG,cAAc,qBAAuB,CAAC;IAC9C,MAAG,GAAG,CAAC,KAAc,EAAkC,EAAE,CAAC,cAAc,iBAAqC,CAAC,KAAK,CAAC,CAAC;IACrH,MAAG,GAAG,CAAC,KAAc,EAAyB,EAAE,CAAC,cAAc,iBAA4B,CAAC,KAAK,CAAC,CAAC;IACnG,UAAO,GAAG,CAAC,KAAc,EAAqC,EAAE,CAAC,cAAc,yBAA4C,CAAC,KAAK,CAAC,CAAC;IACnI,UAAO,GAAG,CAAC,KAAc,EAA4B,EAAE,CAAC,cAAc,yBAAmC,CAAC,KAAK,CAAC,CAAC;IAEjH,YAAS,GAAG,cAAc,6BAA+B,CAAC;IAC1D,aAAU,GAAG,cAAc,+BAAiC,CAAC;IAC7D,oBAAiB,GAAG,cAAc,6CAA+C,CAAC;IAClF,aAAU,GAAG,cAAc,+BAAiC,CAAC;IAC7D,cAAW,GAAG,cAAc,iCAAmC,CAAC;IAChE,aAAU,GAAG,cAAc,+BAAiC,CAAC;IAC7D,cAAW,GAAG,cAAc,iCAAmC,CAAC;IAChE,eAAY,GAAG,cAAc,mCAAqC,CAAC;IACnE,eAAY,GAAG,cAAc,mCAAqC,CAAC;IAEnE,cAAW,GAAG,cAAc,iCAAmC,CAAC;IAChE,oBAAiB,GAAG,cAAc,6CAA+C,CAAC;IAClF,WAAQ,GAAG,cAAc,2BAA6B,CAAC;IAEvD,mBAAgB,GAAG,CAAI,QAAiB,EAAE,KAAe,EAAiB,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IACjI,cAAW,GAAG,CAAC,KAAc,EAAgB,EAAE,CAAC,cAAc,iBAAmB,CAAC,KAAK,CAAC,CAAC;IAEzF,YAAS,GAAG,CAAC,KAAc,EAAE,EAAE;QAC3C,IAAI,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,EAAE;YACnB,OAAO,KAAK,CAAC;SACb;QAED,IAAI;YACH,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,2CAA2C;YACjE,OAAO,IAAI,CAAC;SACZ;QAAC,WAAM;YACP,OAAO,KAAK,CAAC;SACb;IACF,CAAC,CAAC;IAEW,SAAM,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC5C,QAAK,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;IAEnC,MAAG,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,KAAe,CAAC,CAAC;IAErE,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC;QAC9B,WAAW;QACX,QAAQ;QACR,QAAQ;QACR,SAAS;QACT,QAAQ;KACR,CAAC,CAAC;IAEU,YAAS,GAAG,CAAC,KAAc,EAAsB,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,cAAc,CAAC,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC;IAErG,UAAO,GAAG,CAAC,KAAc,EAAmB,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,KAAe,CAAC,CAAC;IACjF,cAAW,GAAG,CAAC,KAAc,EAAmB,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,KAAe,CAAC,CAAC;IAEzF,cAAW,GAAG,CAAC,KAAc,EAAE,EAAE;QAC7C,0EAA0E;QAC1E,IAAI,SAAS,CAAC;QAEd,OAAO,aAAa,CAAC,KAAK,CAAC,0BAAoB;YAC9C,CAAC,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,SAAS,KAAK,IAAI,IAAI,yCAAyC;gBACzG,SAAS,KAAK,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC;IAEF,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;;;;;;;;;;KAU/B,CAAC,CAAC;IACU,aAAU,GAAG,CAAC,KAAc,EAAuB,EAAE;QACjE,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;QAExC,IAAI,UAAU,KAAK,IAAI,EAAE;YACxB,OAAO,KAAK,CAAC;SACb;QAED,OAAO,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC,CAAC;IAEF,MAAM,aAAa,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,GAAA,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;IAC9D,YAAS,GAAG,CAAC,KAAc,EAAsB,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,aAAa,CAAE,KAAmB,CAAC,MAAM,CAAC,CAAC;IAE/I,UAAO,GAAG,CAAC,KAAa,EAAE,KAAwB,EAAE,EAAE;QAClE,IAAI,GAAA,MAAM,CAAC,KAAK,CAAC,EAAE;YAClB,OAAO,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;SAClE;QAED,IAAI,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACvC,OAAO,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;SAClE;QAED,MAAM,IAAI,SAAS,CAAC,kBAAkB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAChE,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,CAAC;IAC5B,MAAM,uBAAuB,GAAG;QAC/B,WAAW;QACX,eAAe;QACf,OAAO;QACP,YAAY;QACZ,WAAW;KACX,CAAC;IAEW,aAAU,GAAG,CAAC,KAAc,EAAuB,EAAE,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAK,KAAoB,CAAC,QAAQ,KAAK,iBAAiB,IAAI,GAAA,MAAM,CAAE,KAAoB,CAAC,QAAQ,CAAC;QACjL,CAAC,GAAA,WAAW,CAAC,KAAK,CAAC,IAAI,uBAAuB,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,IAAK,KAAoB,CAAC,CAAC;IAExF,aAAU,GAAG,CAAC,KAAc,EAAE,EAAE;QAC5C,IAAI,CAAC,KAAK,EAAE;YACX,OAAO,KAAK,CAAC;SACb;QAED,IAAK,KAAa,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,KAAK,KAAM,KAAa,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,EAAE;YACvF,OAAO,IAAI,CAAC;SACZ;QAED,IAAK,KAAa,CAAC,cAAc,CAAC,IAAI,KAAK,KAAM,KAAa,CAAC,cAAc,CAAC,EAAE,EAAE;YACjF,OAAO,IAAI,CAAC;SACZ;QAED,OAAO,KAAK,CAAC;IACd,CAAC,CAAC;IAEW,aAAU,GAAG,CAAC,KAAc,EAAuB,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAY,IAAI,GAAA,SAAS,CAAE,KAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAA,UAAU,CAAC,KAAK,CAAC,CAAC;IAE3K,WAAQ,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,CAAC,QAAQ,CAAC;IAEtF,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,KAAa,EAAE,EAAE,CAAC,GAAA,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC;IAC5F,OAAI,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IACzB,MAAG,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IAErC,MAAM,kBAAkB,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC;IAE9E,aAAU,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;IACpE,gBAAa,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAErE,cAAW,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;IACtE,iBAAc,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IACvE,0BAAuB,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,GAAA,WAAW,CAAC,KAAK,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAE9F,cAAW,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;IACjH,iBAAc,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IAElH,WAAQ,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC;IAC9D,cAAW,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;IAE/D,WAAQ,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC;IAC9D,cAAW,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;IAG5E,MAAM,gBAAgB,GAAG,CAAC,MAAmB,EAAE,SAAkB,EAAE,MAAiB,EAAE,EAAE;QACvF,IAAI,GAAA,SAAS,CAAC,SAAS,CAAC,KAAK,KAAK,EAAE;YACnC,MAAM,IAAI,SAAS,CAAC,sBAAsB,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;SACvE;QAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;YACxB,MAAM,IAAI,SAAS,CAAC,0BAA0B,CAAC,CAAC;SAChD;QAED,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,SAAgB,CAAC,CAAC;IAC9C,CAAC,CAAC;IAEF,+BAA+B;IAClB,MAAG,GAAG,CAAC,SAAkB,EAAE,GAAG,MAAiB,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAC9G,MAAG,GAAG,CAAC,SAAkB,EAAE,GAAG,MAAiB,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAC5H,8BAA8B;AAC/B,CAAC,EAvNS,EAAE,KAAF,EAAE,QAuNX;AAED,4EAA4E;AAC5E,0DAA0D;AAC1D,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE;IAC3B,KAAK,EAAE;QACN,KAAK,EAAE,EAAE,CAAC,MAAM;KAChB;IACD,QAAQ,EAAE;QACT,KAAK,EAAE,EAAE,CAAC,SAAS;KACnB;IACD,IAAI,EAAE;QACL,KAAK,EAAE,EAAE,CAAC,KAAK;KACf;CACD,CAAC,CAAC;AAEH,kBAAe,EAAE,CAAC;AAElB,sCAAsC;AACtC,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC;AACpB,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/Project/Server/node_modules/@sindresorhus/is/license b/Project/Server/node_modules/@sindresorhus/is/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/Project/Server/node_modules/@sindresorhus/is/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Project/Server/node_modules/@sindresorhus/is/package.json b/Project/Server/node_modules/@sindresorhus/is/package.json new file mode 100644 index 0000000..e73e408 --- /dev/null +++ b/Project/Server/node_modules/@sindresorhus/is/package.json @@ -0,0 +1,96 @@ +{ + "_from": "@sindresorhus/is@^0.14.0", + "_id": "@sindresorhus/is@0.14.0", + "_inBundle": false, + "_integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "_location": "/@sindresorhus/is", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@sindresorhus/is@^0.14.0", + "name": "@sindresorhus/is", + "escapedName": "@sindresorhus%2fis", + "scope": "@sindresorhus", + "rawSpec": "^0.14.0", + "saveSpec": null, + "fetchSpec": "^0.14.0" + }, + "_requiredBy": [ + "/got" + ], + "_resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "_shasum": "9fb3a3cf3132328151f353de4632e01e52102bea", + "_spec": "@sindresorhus/is@^0.14.0", + "_where": "E:\\Learn\\Java\\Project\\test\\Server\\node_modules\\got", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Type check values: `is.string('🦄') //=> true`", + "devDependencies": { + "@sindresorhus/tsconfig": "^0.1.0", + "@types/jsdom": "^11.12.0", + "@types/node": "^10.12.10", + "@types/tempy": "^0.2.0", + "@types/zen-observable": "^0.8.0", + "ava": "^0.25.0", + "del-cli": "^1.1.0", + "jsdom": "^11.6.2", + "rxjs": "^6.3.3", + "tempy": "^0.2.1", + "tslint": "^5.9.1", + "tslint-xo": "^0.10.0", + "typescript": "^3.2.1", + "zen-observable": "^0.8.8" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "dist" + ], + "homepage": "https://github.com/sindresorhus/is#readme", + "keywords": [ + "type", + "types", + "is", + "check", + "checking", + "validate", + "validation", + "utility", + "util", + "typeof", + "instanceof", + "object", + "assert", + "assertion", + "test", + "kind", + "primitive", + "verify", + "compare" + ], + "license": "MIT", + "main": "dist/index.js", + "name": "@sindresorhus/is", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is.git" + }, + "scripts": { + "build": "del dist && tsc", + "lint": "tslint --format stylish --project .", + "prepublish": "npm run build && del dist/tests", + "test": "npm run lint && npm run build && ava dist/tests" + }, + "types": "dist/index.d.ts", + "version": "0.14.0" +} diff --git a/Project/Server/node_modules/@sindresorhus/is/readme.md b/Project/Server/node_modules/@sindresorhus/is/readme.md new file mode 100644 index 0000000..97c023b --- /dev/null +++ b/Project/Server/node_modules/@sindresorhus/is/readme.md @@ -0,0 +1,451 @@ +# is [![Build Status](https://travis-ci.org/sindresorhus/is.svg?branch=master)](https://travis-ci.org/sindresorhus/is) + +> Type check values: `is.string('🦄') //=> true` + + + + +## Install + +``` +$ npm install @sindresorhus/is +``` + + +## Usage + +```js +const is = require('@sindresorhus/is'); + +is('🦄'); +//=> 'string' + +is(new Map()); +//=> 'Map' + +is.number(6); +//=> true +``` + +When using `is` together with TypeScript, [type guards](http://www.typescriptlang.org/docs/handbook/advanced-types.html#type-guards-and-differentiating-types) are being used to infer the correct type inside if-else statements. + +```ts +import is from '@sindresorhus/is'; + +const padLeft = (value: string, padding: string | number) => { + if (is.number(padding)) { + // `padding` is typed as `number` + return Array(padding + 1).join(' ') + value; + } + + if (is.string(padding)) { + // `padding` is typed as `string` + return padding + value; + } + + throw new TypeError(`Expected 'padding' to be of type 'string' or 'number', got '${is(padding)}'.`); +} + +padLeft('🦄', 3); +//=> ' 🦄' + +padLeft('🦄', '🌈'); +//=> '🌈🦄' +``` + + +## API + +### is(value) + +Returns the type of `value`. + +Primitives are lowercase and object types are camelcase. + +Example: + +- `'undefined'` +- `'null'` +- `'string'` +- `'symbol'` +- `'Array'` +- `'Function'` +- `'Object'` + +Note: It will throw an error if you try to feed it object-wrapped primitives, as that's a bad practice. For example `new String('foo')`. + +### is.{method} + +All the below methods accept a value and returns a boolean for whether the value is of the desired type. + +#### Primitives + +##### .undefined(value) +##### .null(value) +##### .string(value) +##### .number(value) +##### .boolean(value) +##### .symbol(value) + +#### Built-in types + +##### .array(value) +##### .function(value) +##### .buffer(value) +##### .object(value) + +Keep in mind that [functions are objects too](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions). + +##### .numericString(value) + +Returns `true` for a string that represents a number. For example, `'42'` and `'-8'`. + +Note: `'NaN'` returns `false`, but `'Infinity'` and `'-Infinity'` return `true`. + +##### .regExp(value) +##### .date(value) +##### .error(value) +##### .nativePromise(value) +##### .promise(value) + +Returns `true` for any object with a `.then()` and `.catch()` method. Prefer this one over `.nativePromise()` as you usually want to allow userland promise implementations too. + +##### .generator(value) + +Returns `true` for any object that implements its own `.next()` and `.throw()` methods and has a function definition for `Symbol.iterator`. + +##### .generatorFunction(value) + +##### .asyncFunction(value) + +Returns `true` for any `async` function that can be called with the `await` operator. + +```js +is.asyncFunction(async () => {}); +// => true + +is.asyncFunction(() => {}); +// => false +``` + +##### .boundFunction(value) + +Returns `true` for any `bound` function. + +```js +is.boundFunction(() => {}); +// => true + +is.boundFunction(function () {}.bind(null)); +// => true + +is.boundFunction(function () {}); +// => false +``` + +##### .map(value) +##### .set(value) +##### .weakMap(value) +##### .weakSet(value) + +#### Typed arrays + +##### .int8Array(value) +##### .uint8Array(value) +##### .uint8ClampedArray(value) +##### .int16Array(value) +##### .uint16Array(value) +##### .int32Array(value) +##### .uint32Array(value) +##### .float32Array(value) +##### .float64Array(value) + +#### Structured data + +##### .arrayBuffer(value) +##### .sharedArrayBuffer(value) +##### .dataView(value) + +#### Emptiness + +##### .emptyString(value) + +Returns `true` if the value is a `string` and the `.length` is 0. + +##### .nonEmptyString(value) + +Returns `true` if the value is a `string` and the `.length` is more than 0. + +##### .emptyStringOrWhitespace(value) + +Returns `true` if `is.emptyString(value)` or if it's a `string` that is all whitespace. + +##### .emptyArray(value) + +Returns `true` if the value is an `Array` and the `.length` is 0. + +##### .nonEmptyArray(value) + +Returns `true` if the value is an `Array` and the `.length` is more than 0. + +##### .emptyObject(value) + +Returns `true` if the value is an `Object` and `Object.keys(value).length` is 0. + +Please note that `Object.keys` returns only own enumerable properties. Hence something like this can happen: + +```js +const object1 = {}; + +Object.defineProperty(object1, 'property1', { + value: 42, + writable: true, + enumerable: false, + configurable: true +}); + +is.emptyObject(object1); +// => true +``` + +##### .nonEmptyObject(value) + +Returns `true` if the value is an `Object` and `Object.keys(value).length` is more than 0. + +##### .emptySet(value) + +Returns `true` if the value is a `Set` and the `.size` is 0. + +##### .nonEmptySet(Value) + +Returns `true` if the value is a `Set` and the `.size` is more than 0. + +##### .emptyMap(value) + +Returns `true` if the value is a `Map` and the `.size` is 0. + +##### .nonEmptyMap(value) + +Returns `true` if the value is a `Map` and the `.size` is more than 0. + +#### Miscellaneous + +##### .directInstanceOf(value, class) + +Returns `true` if `value` is a direct instance of `class`. + +```js +is.directInstanceOf(new Error(), Error); +//=> true + +class UnicornError extends Error {} + +is.directInstanceOf(new UnicornError(), Error); +//=> false +``` + +##### .urlInstance(value) + +Returns `true` if `value` is an instance of the [`URL` class](https://developer.mozilla.org/en-US/docs/Web/API/URL). + +```js +const url = new URL('https://example.com'); + +is.urlInstance(url); +//=> true +``` + +### .url(value) + +Returns `true` if `value` is a URL string. + +Note: this only does basic checking using the [`URL` class](https://developer.mozilla.org/en-US/docs/Web/API/URL) constructor. + +```js +const url = 'https://example.com'; + +is.url(url); +//=> true + +is.url(new URL(url)); +//=> false +``` + +##### .truthy(value) + +Returns `true` for all values that evaluate to true in a boolean context: + +```js +is.truthy('🦄'); +//=> true + +is.truthy(undefined); +//=> false +``` + +##### .falsy(value) + +Returns `true` if `value` is one of: `false`, `0`, `''`, `null`, `undefined`, `NaN`. + +##### .nan(value) +##### .nullOrUndefined(value) +##### .primitive(value) + +JavaScript primitives are as follows: `null`, `undefined`, `string`, `number`, `boolean`, `symbol`. + +##### .integer(value) + +##### .safeInteger(value) + +Returns `true` if `value` is a [safe integer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger). + +##### .plainObject(value) + +An object is plain if it's created by either `{}`, `new Object()`, or `Object.create(null)`. + +##### .iterable(value) +##### .asyncIterable(value) +##### .class(value) + +Returns `true` for instances created by a class. + +##### .typedArray(value) + +##### .arrayLike(value) + +A `value` is array-like if it is not a function and has a `value.length` that is a safe integer greater than or equal to 0. + +```js +is.arrayLike(document.forms); +//=> true + +function foo() { + is.arrayLike(arguments); + //=> true +} +foo(); +``` + +##### .inRange(value, range) + +Check if `value` (number) is in the given `range`. The range is an array of two values, lower bound and upper bound, in no specific order. + +```js +is.inRange(3, [0, 5]); +is.inRange(3, [5, 0]); +is.inRange(0, [-2, 2]); +``` + +##### .inRange(value, upperBound) + +Check if `value` (number) is in the range of `0` to `upperBound`. + +```js +is.inRange(3, 10); +``` + +##### .domElement(value) + +Returns `true` if `value` is a DOM Element. + +##### .nodeStream(value) + +Returns `true` if `value` is a Node.js [stream](https://nodejs.org/api/stream.html). + +```js +const fs = require('fs'); + +is.nodeStream(fs.createReadStream('unicorn.png')); +//=> true +``` + +##### .observable(value) + +Returns `true` if `value` is an `Observable`. + +```js +const {Observable} = require('rxjs'); + +is.observable(new Observable()); +//=> true +``` + +##### .infinite(value) + +Check if `value` is `Infinity` or `-Infinity`. + +##### .even(value) + +Returns `true` if `value` is an even integer. + +##### .odd(value) + +Returns `true` if `value` is an odd integer. + +##### .any(predicate, ...values) + +Returns `true` if **any** of the input `values` returns true in the `predicate`: + +```js +is.any(is.string, {}, true, '🦄'); +//=> true + +is.any(is.boolean, 'unicorns', [], new Map()); +//=> false +``` + +##### .all(predicate, ...values) + +Returns `true` if **all** of the input `values` returns true in the `predicate`: + +```js +is.all(is.object, {}, new Map(), new Set()); +//=> true + +is.all(is.string, '🦄', [], 'unicorns'); +//=> false +``` + + +## FAQ + +### Why yet another type checking module? + +There are hundreds of type checking modules on npm, unfortunately, I couldn't find any that fit my needs: + +- Includes both type methods and ability to get the type +- Types of primitives returned as lowercase and object types as camelcase +- Covers all built-ins +- Unsurprising behavior +- Well-maintained +- Comprehensive test suite + +For the ones I found, pick 3 of these. + +The most common mistakes I noticed in these modules was using `instanceof` for type checking, forgetting that functions are objects, and omitting `symbol` as a primitive. + + +## Related + +- [ow](https://github.com/sindresorhus/ow) - Function argument validation for humans +- [is-stream](https://github.com/sindresorhus/is-stream) - Check if something is a Node.js stream +- [is-observable](https://github.com/sindresorhus/is-observable) - Check if a value is an Observable +- [file-type](https://github.com/sindresorhus/file-type) - Detect the file type of a Buffer/Uint8Array +- [is-ip](https://github.com/sindresorhus/is-ip) - Check if a string is an IP address +- [is-array-sorted](https://github.com/sindresorhus/is-array-sorted) - Check if an Array is sorted +- [is-error-constructor](https://github.com/sindresorhus/is-error-constructor) - Check if a value is an error constructor +- [is-empty-iterable](https://github.com/sindresorhus/is-empty-iterable) - Check if an Iterable is empty +- [is-blob](https://github.com/sindresorhus/is-blob) - Check if a value is a Blob - File-like object of immutable, raw data +- [has-emoji](https://github.com/sindresorhus/has-emoji) - Check whether a string has any emoji + + +## Created by + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Giora Guttsait](https://github.com/gioragutt) +- [Brandon Smith](https://github.com/brandon93s) + + +## License + +MIT diff --git a/Project/Server/node_modules/@szmarczak/http-timer/LICENSE b/Project/Server/node_modules/@szmarczak/http-timer/LICENSE new file mode 100644 index 0000000..15ad2e8 --- /dev/null +++ b/Project/Server/node_modules/@szmarczak/http-timer/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Szymon Marczak + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Project/Server/node_modules/@szmarczak/http-timer/README.md b/Project/Server/node_modules/@szmarczak/http-timer/README.md new file mode 100644 index 0000000..13279ed --- /dev/null +++ b/Project/Server/node_modules/@szmarczak/http-timer/README.md @@ -0,0 +1,70 @@ +# http-timer +> Timings for HTTP requests + +[![Build Status](https://travis-ci.org/szmarczak/http-timer.svg?branch=master)](https://travis-ci.org/szmarczak/http-timer) +[![Coverage Status](https://coveralls.io/repos/github/szmarczak/http-timer/badge.svg?branch=master)](https://coveralls.io/github/szmarczak/http-timer?branch=master) +[![install size](https://packagephobia.now.sh/badge?p=@szmarczak/http-timer)](https://packagephobia.now.sh/result?p=@szmarczak/http-timer) + +Inspired by the [`request` package](https://github.com/request/request). + +## Usage +```js +'use strict'; +const https = require('https'); +const timer = require('@szmarczak/http-timer'); + +const request = https.get('https://httpbin.org/anything'); +const timings = timer(request); + +request.on('response', response => { + response.on('data', () => {}); // Consume the data somehow + response.on('end', () => { + console.log(timings); + }); +}); + +// { start: 1535708511443, +// socket: 1535708511444, +// lookup: 1535708511444, +// connect: 1535708511582, +// upload: 1535708511887, +// response: 1535708512037, +// end: 1535708512040, +// phases: +// { wait: 1, +// dns: 0, +// tcp: 138, +// request: 305, +// firstByte: 150, +// download: 3, +// total: 597 } } +``` + +## API + +### timer(request) + +Returns: `Object` + +- `start` - Time when the request started. +- `socket` - Time when a socket was assigned to the request. +- `lookup` - Time when the DNS lookup finished. +- `connect` - Time when the socket successfully connected. +- `upload` - Time when the request finished uploading. +- `response` - Time when the request fired the `response` event. +- `end` - Time when the response fired the `end` event. +- `error` - Time when the request fired the `error` event. +- `phases` + - `wait` - `timings.socket - timings.start` + - `dns` - `timings.lookup - timings.socket` + - `tcp` - `timings.connect - timings.lookup` + - `request` - `timings.upload - timings.connect` + - `firstByte` - `timings.response - timings.upload` + - `download` - `timings.end - timings.response` + - `total` - `timings.end - timings.start` or `timings.error - timings.start` + +**Note**: The time is a `number` representing the milliseconds elapsed since the UNIX epoch. + +## License + +MIT diff --git a/Project/Server/node_modules/@szmarczak/http-timer/package.json b/Project/Server/node_modules/@szmarczak/http-timer/package.json new file mode 100644 index 0000000..62c7d3b --- /dev/null +++ b/Project/Server/node_modules/@szmarczak/http-timer/package.json @@ -0,0 +1,75 @@ +{ + "_from": "@szmarczak/http-timer@^1.1.2", + "_id": "@szmarczak/http-timer@1.1.2", + "_inBundle": false, + "_integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "_location": "/@szmarczak/http-timer", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@szmarczak/http-timer@^1.1.2", + "name": "@szmarczak/http-timer", + "escapedName": "@szmarczak%2fhttp-timer", + "scope": "@szmarczak", + "rawSpec": "^1.1.2", + "saveSpec": null, + "fetchSpec": "^1.1.2" + }, + "_requiredBy": [ + "/got" + ], + "_resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "_shasum": "b1665e2c461a2cd92f4c1bbf50d5454de0d4b421", + "_spec": "@szmarczak/http-timer@^1.1.2", + "_where": "E:\\Learn\\Java\\Project\\test\\Server\\node_modules\\got", + "author": { + "name": "Szymon Marczak" + }, + "bugs": { + "url": "https://github.com/szmarczak/http-timer/issues" + }, + "bundleDependencies": false, + "dependencies": { + "defer-to-connect": "^1.0.1" + }, + "deprecated": false, + "description": "Timings for HTTP requests", + "devDependencies": { + "ava": "^0.25.0", + "coveralls": "^3.0.2", + "nyc": "^12.0.2", + "p-event": "^2.1.0", + "xo": "^0.22.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "source" + ], + "homepage": "https://github.com/szmarczak/http-timer#readme", + "keywords": [ + "http", + "https", + "timer", + "timings" + ], + "license": "MIT", + "main": "source", + "name": "@szmarczak/http-timer", + "repository": { + "type": "git", + "url": "git+https://github.com/szmarczak/http-timer.git" + }, + "scripts": { + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "test": "xo && nyc ava" + }, + "version": "1.1.2", + "xo": { + "rules": { + "unicorn/filename-case": "camelCase" + } + } +} diff --git a/Project/Server/node_modules/@szmarczak/http-timer/source/index.js b/Project/Server/node_modules/@szmarczak/http-timer/source/index.js new file mode 100644 index 0000000..e294580 --- /dev/null +++ b/Project/Server/node_modules/@szmarczak/http-timer/source/index.js @@ -0,0 +1,99 @@ +'use strict'; +const deferToConnect = require('defer-to-connect'); + +module.exports = request => { + const timings = { + start: Date.now(), + socket: null, + lookup: null, + connect: null, + upload: null, + response: null, + end: null, + error: null, + phases: { + wait: null, + dns: null, + tcp: null, + request: null, + firstByte: null, + download: null, + total: null + } + }; + + const handleError = origin => { + const emit = origin.emit.bind(origin); + origin.emit = (event, ...args) => { + // Catches the `error` event + if (event === 'error') { + timings.error = Date.now(); + timings.phases.total = timings.error - timings.start; + + origin.emit = emit; + } + + // Saves the original behavior + return emit(event, ...args); + }; + }; + + let uploadFinished = false; + const onUpload = () => { + timings.upload = Date.now(); + timings.phases.request = timings.upload - timings.connect; + }; + + handleError(request); + + request.once('socket', socket => { + timings.socket = Date.now(); + timings.phases.wait = timings.socket - timings.start; + + const lookupListener = () => { + timings.lookup = Date.now(); + timings.phases.dns = timings.lookup - timings.socket; + }; + + socket.once('lookup', lookupListener); + + deferToConnect(socket, () => { + timings.connect = Date.now(); + + if (timings.lookup === null) { + socket.removeListener('lookup', lookupListener); + timings.lookup = timings.connect; + timings.phases.dns = timings.lookup - timings.socket; + } + + timings.phases.tcp = timings.connect - timings.lookup; + + if (uploadFinished && !timings.upload) { + onUpload(); + } + }); + }); + + request.once('finish', () => { + uploadFinished = true; + + if (timings.connect) { + onUpload(); + } + }); + + request.once('response', response => { + timings.response = Date.now(); + timings.phases.firstByte = timings.response - timings.upload; + + handleError(response); + + response.once('end', () => { + timings.end = Date.now(); + timings.phases.download = timings.end - timings.response; + timings.phases.total = timings.end - timings.start; + }); + }); + + return timings; +}; diff --git a/Project/Server/node_modules/@types/color-name/LICENSE b/Project/Server/node_modules/@types/color-name/LICENSE new file mode 100644 index 0000000..2107107 --- /dev/null +++ b/Project/Server/node_modules/@types/color-name/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/Project/Server/node_modules/@types/color-name/README.md b/Project/Server/node_modules/@types/color-name/README.md new file mode 100644 index 0000000..d08d108 --- /dev/null +++ b/Project/Server/node_modules/@types/color-name/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/color-name` + +# Summary +This package contains type definitions for color-name ( https://github.com/colorjs/color-name ). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/color-name + +Additional Details + * Last updated: Wed, 13 Feb 2019 16:16:48 GMT + * Dependencies: none + * Global values: none + +# Credits +These definitions were written by Junyoung Clare Jang . diff --git a/Project/Server/node_modules/@types/color-name/index.d.ts b/Project/Server/node_modules/@types/color-name/index.d.ts new file mode 100644 index 0000000..b5bff47 --- /dev/null +++ b/Project/Server/node_modules/@types/color-name/index.d.ts @@ -0,0 +1,161 @@ +// Type definitions for color-name 1.1 +// Project: https://github.com/colorjs/color-name +// Definitions by: Junyoung Clare Jang +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Tuple of Red, Green, and Blue + * @example + * // Red = 55, Green = 70, Blue = 0 + * const rgb: RGB = [55, 70, 0]; + */ +export type RGB = [number, number, number]; + +export const aliceblue: RGB; +export const antiquewhite: RGB; +export const aqua: RGB; +export const aquamarine: RGB; +export const azure: RGB; +export const beige: RGB; +export const bisque: RGB; +export const black: RGB; +export const blanchedalmond: RGB; +export const blue: RGB; +export const blueviolet: RGB; +export const brown: RGB; +export const burlywood: RGB; +export const cadetblue: RGB; +export const chartreuse: RGB; +export const chocolate: RGB; +export const coral: RGB; +export const cornflowerblue: RGB; +export const cornsilk: RGB; +export const crimson: RGB; +export const cyan: RGB; +export const darkblue: RGB; +export const darkcyan: RGB; +export const darkgoldenrod: RGB; +export const darkgray: RGB; +export const darkgreen: RGB; +export const darkgrey: RGB; +export const darkkhaki: RGB; +export const darkmagenta: RGB; +export const darkolivegreen: RGB; +export const darkorange: RGB; +export const darkorchid: RGB; +export const darkred: RGB; +export const darksalmon: RGB; +export const darkseagreen: RGB; +export const darkslateblue: RGB; +export const darkslategray: RGB; +export const darkslategrey: RGB; +export const darkturquoise: RGB; +export const darkviolet: RGB; +export const deeppink: RGB; +export const deepskyblue: RGB; +export const dimgray: RGB; +export const dimgrey: RGB; +export const dodgerblue: RGB; +export const firebrick: RGB; +export const floralwhite: RGB; +export const forestgreen: RGB; +export const fuchsia: RGB; +export const gainsboro: RGB; +export const ghostwhite: RGB; +export const gold: RGB; +export const goldenrod: RGB; +export const gray: RGB; +export const green: RGB; +export const greenyellow: RGB; +export const grey: RGB; +export const honeydew: RGB; +export const hotpink: RGB; +export const indianred: RGB; +export const indigo: RGB; +export const ivory: RGB; +export const khaki: RGB; +export const lavender: RGB; +export const lavenderblush: RGB; +export const lawngreen: RGB; +export const lemonchiffon: RGB; +export const lightblue: RGB; +export const lightcoral: RGB; +export const lightcyan: RGB; +export const lightgoldenrodyellow: RGB; +export const lightgray: RGB; +export const lightgreen: RGB; +export const lightgrey: RGB; +export const lightpink: RGB; +export const lightsalmon: RGB; +export const lightseagreen: RGB; +export const lightskyblue: RGB; +export const lightslategray: RGB; +export const lightslategrey: RGB; +export const lightsteelblue: RGB; +export const lightyellow: RGB; +export const lime: RGB; +export const limegreen: RGB; +export const linen: RGB; +export const magenta: RGB; +export const maroon: RGB; +export const mediumaquamarine: RGB; +export const mediumblue: RGB; +export const mediumorchid: RGB; +export const mediumpurple: RGB; +export const mediumseagreen: RGB; +export const mediumslateblue: RGB; +export const mediumspringgreen: RGB; +export const mediumturquoise: RGB; +export const mediumvioletred: RGB; +export const midnightblue: RGB; +export const mintcream: RGB; +export const mistyrose: RGB; +export const moccasin: RGB; +export const navajowhite: RGB; +export const navy: RGB; +export const oldlace: RGB; +export const olive: RGB; +export const olivedrab: RGB; +export const orange: RGB; +export const orangered: RGB; +export const orchid: RGB; +export const palegoldenrod: RGB; +export const palegreen: RGB; +export const paleturquoise: RGB; +export const palevioletred: RGB; +export const papayawhip: RGB; +export const peachpuff: RGB; +export const peru: RGB; +export const pink: RGB; +export const plum: RGB; +export const powderblue: RGB; +export const purple: RGB; +export const rebeccapurple: RGB; +export const red: RGB; +export const rosybrown: RGB; +export const royalblue: RGB; +export const saddlebrown: RGB; +export const salmon: RGB; +export const sandybrown: RGB; +export const seagreen: RGB; +export const seashell: RGB; +export const sienna: RGB; +export const silver: RGB; +export const skyblue: RGB; +export const slateblue: RGB; +export const slategray: RGB; +export const slategrey: RGB; +export const snow: RGB; +export const springgreen: RGB; +export const steelblue: RGB; +export const tan: RGB; +export const teal: RGB; +export const thistle: RGB; +export const tomato: RGB; +export const turquoise: RGB; +export const violet: RGB; +export const wheat: RGB; +export const white: RGB; +export const whitesmoke: RGB; +export const yellow: RGB; +export const yellowgreen: RGB; diff --git a/Project/Server/node_modules/@types/color-name/package.json b/Project/Server/node_modules/@types/color-name/package.json new file mode 100644 index 0000000..78794f8 --- /dev/null +++ b/Project/Server/node_modules/@types/color-name/package.json @@ -0,0 +1,52 @@ +{ + "_from": "@types/color-name@^1.1.1", + "_id": "@types/color-name@1.1.1", + "_inBundle": false, + "_integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "_location": "/@types/color-name", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@types/color-name@^1.1.1", + "name": "@types/color-name", + "escapedName": "@types%2fcolor-name", + "scope": "@types", + "rawSpec": "^1.1.1", + "saveSpec": null, + "fetchSpec": "^1.1.1" + }, + "_requiredBy": [ + "/ansi-styles" + ], + "_resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "_shasum": "1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0", + "_spec": "@types/color-name@^1.1.1", + "_where": "E:\\Learn\\Java\\Project\\test\\Server\\node_modules\\ansi-styles", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Junyoung Clare Jang", + "url": "https://github.com/Ailrun" + } + ], + "dependencies": {}, + "deprecated": false, + "description": "TypeScript definitions for color-name", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", + "license": "MIT", + "main": "", + "name": "@types/color-name", + "repository": { + "type": "git", + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" + }, + "scripts": {}, + "typeScriptVersion": "2.0", + "types": "index", + "typesPublisherContentHash": "e22c6881e2dcf766e32142cbb82d9acf9c08258bdf0da8e76c8a448d1be44ac7", + "version": "1.1.1" +} diff --git a/Project/Server/node_modules/abbrev/LICENSE b/Project/Server/node_modules/abbrev/LICENSE new file mode 100644 index 0000000..9bcfa9d --- /dev/null +++ b/Project/Server/node_modules/abbrev/LICENSE @@ -0,0 +1,46 @@ +This software is dual-licensed under the ISC and MIT licenses. +You may use this software under EITHER of the following licenses. + +---------- + +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------- + +Copyright Isaac Z. Schlueter and Contributors +All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/Project/Server/node_modules/abbrev/README.md b/Project/Server/node_modules/abbrev/README.md new file mode 100644 index 0000000..99746fe --- /dev/null +++ b/Project/Server/node_modules/abbrev/README.md @@ -0,0 +1,23 @@ +# abbrev-js + +Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev). + +Usage: + + var abbrev = require("abbrev"); + abbrev("foo", "fool", "folding", "flop"); + + // returns: + { fl: 'flop' + , flo: 'flop' + , flop: 'flop' + , fol: 'folding' + , fold: 'folding' + , foldi: 'folding' + , foldin: 'folding' + , folding: 'folding' + , foo: 'foo' + , fool: 'fool' + } + +This is handy for command-line scripts, or other cases where you want to be able to accept shorthands. diff --git a/Project/Server/node_modules/abbrev/abbrev.js b/Project/Server/node_modules/abbrev/abbrev.js new file mode 100644 index 0000000..7b1dc5d --- /dev/null +++ b/Project/Server/node_modules/abbrev/abbrev.js @@ -0,0 +1,61 @@ +module.exports = exports = abbrev.abbrev = abbrev + +abbrev.monkeyPatch = monkeyPatch + +function monkeyPatch () { + Object.defineProperty(Array.prototype, 'abbrev', { + value: function () { return abbrev(this) }, + enumerable: false, configurable: true, writable: true + }) + + Object.defineProperty(Object.prototype, 'abbrev', { + value: function () { return abbrev(Object.keys(this)) }, + enumerable: false, configurable: true, writable: true + }) +} + +function abbrev (list) { + if (arguments.length !== 1 || !Array.isArray(list)) { + list = Array.prototype.slice.call(arguments, 0) + } + for (var i = 0, l = list.length, args = [] ; i < l ; i ++) { + args[i] = typeof list[i] === "string" ? list[i] : String(list[i]) + } + + // sort them lexicographically, so that they're next to their nearest kin + args = args.sort(lexSort) + + // walk through each, seeing how much it has in common with the next and previous + var abbrevs = {} + , prev = "" + for (var i = 0, l = args.length ; i < l ; i ++) { + var current = args[i] + , next = args[i + 1] || "" + , nextMatches = true + , prevMatches = true + if (current === next) continue + for (var j = 0, cl = current.length ; j < cl ; j ++) { + var curChar = current.charAt(j) + nextMatches = nextMatches && curChar === next.charAt(j) + prevMatches = prevMatches && curChar === prev.charAt(j) + if (!nextMatches && !prevMatches) { + j ++ + break + } + } + prev = current + if (j === cl) { + abbrevs[current] = current + continue + } + for (var a = current.substr(0, j) ; j <= cl ; j ++) { + abbrevs[a] = current + a += current.charAt(j) + } + } + return abbrevs +} + +function lexSort (a, b) { + return a === b ? 0 : a > b ? 1 : -1 +} diff --git a/Project/Server/node_modules/abbrev/package.json b/Project/Server/node_modules/abbrev/package.json new file mode 100644 index 0000000..f880677 --- /dev/null +++ b/Project/Server/node_modules/abbrev/package.json @@ -0,0 +1,56 @@ +{ + "_from": "abbrev@1", + "_id": "abbrev@1.1.1", + "_inBundle": false, + "_integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "_location": "/abbrev", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "abbrev@1", + "name": "abbrev", + "escapedName": "abbrev", + "rawSpec": "1", + "saveSpec": null, + "fetchSpec": "1" + }, + "_requiredBy": [ + "/nopt" + ], + "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "_shasum": "f8f2c887ad10bf67f634f005b6987fed3179aac8", + "_spec": "abbrev@1", + "_where": "E:\\Learn\\Java\\Project\\test\\Server\\node_modules\\nopt", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/abbrev-js/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Like ruby's abbrev module, but in js", + "devDependencies": { + "tap": "^10.1" + }, + "files": [ + "abbrev.js" + ], + "homepage": "https://github.com/isaacs/abbrev-js#readme", + "license": "ISC", + "main": "abbrev.js", + "name": "abbrev", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/isaacs/abbrev-js.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test.js --100" + }, + "version": "1.1.1" +} diff --git a/Project/Server/node_modules/accepts/HISTORY.md b/Project/Server/node_modules/accepts/HISTORY.md new file mode 100644 index 0000000..0bf0417 --- /dev/null +++ b/Project/Server/node_modules/accepts/HISTORY.md @@ -0,0 +1,236 @@ +1.3.7 / 2019-04-29 +================== + + * deps: negotiator@0.6.2 + - Fix sorting charset, encoding, and language with extra parameters + +1.3.6 / 2019-04-28 +================== + + * deps: mime-types@~2.1.24 + - deps: mime-db@~1.40.0 + +1.3.5 / 2018-02-28 +================== + + * deps: mime-types@~2.1.18 + - deps: mime-db@~1.33.0 + +1.3.4 / 2017-08-22 +================== + + * deps: mime-types@~2.1.16 + - deps: mime-db@~1.29.0 + +1.3.3 / 2016-05-02 +================== + + * deps: mime-types@~2.1.11 + - deps: mime-db@~1.23.0 + * deps: negotiator@0.6.1 + - perf: improve `Accept` parsing speed + - perf: improve `Accept-Charset` parsing speed + - perf: improve `Accept-Encoding` parsing speed + - perf: improve `Accept-Language` parsing speed + +1.3.2 / 2016-03-08 +================== + + * deps: mime-types@~2.1.10 + - Fix extension of `application/dash+xml` + - Update primary extension for `audio/mp4` + - deps: mime-db@~1.22.0 + +1.3.1 / 2016-01-19 +================== + + * deps: mime-types@~2.1.9 + - deps: mime-db@~1.21.0 + +1.3.0 / 2015-09-29 +================== + + * deps: mime-types@~2.1.7 + - deps: mime-db@~1.19.0 + * deps: negotiator@0.6.0 + - Fix including type extensions in parameters in `Accept` parsing + - Fix parsing `Accept` parameters with quoted equals + - Fix parsing `Accept` parameters with quoted semicolons + - Lazy-load modules from main entry point + - perf: delay type concatenation until needed + - perf: enable strict mode + - perf: hoist regular expressions + - perf: remove closures getting spec properties + - perf: remove a closure from media type parsing + - perf: remove property delete from media type parsing + +1.2.13 / 2015-09-06 +=================== + + * deps: mime-types@~2.1.6 + - deps: mime-db@~1.18.0 + +1.2.12 / 2015-07-30 +=================== + + * deps: mime-types@~2.1.4 + - deps: mime-db@~1.16.0 + +1.2.11 / 2015-07-16 +=================== + + * deps: mime-types@~2.1.3 + - deps: mime-db@~1.15.0 + +1.2.10 / 2015-07-01 +=================== + + * deps: mime-types@~2.1.2 + - deps: mime-db@~1.14.0 + +1.2.9 / 2015-06-08 +================== + + * deps: mime-types@~2.1.1 + - perf: fix deopt during mapping + +1.2.8 / 2015-06-07 +================== + + * deps: mime-types@~2.1.0 + - deps: mime-db@~1.13.0 + * perf: avoid argument reassignment & argument slice + * perf: avoid negotiator recursive construction + * perf: enable strict mode + * perf: remove unnecessary bitwise operator + +1.2.7 / 2015-05-10 +================== + + * deps: negotiator@0.5.3 + - Fix media type parameter matching to be case-insensitive + +1.2.6 / 2015-05-07 +================== + + * deps: mime-types@~2.0.11 + - deps: mime-db@~1.9.1 + * deps: negotiator@0.5.2 + - Fix comparing media types with quoted values + - Fix splitting media types with quoted commas + +1.2.5 / 2015-03-13 +================== + + * deps: mime-types@~2.0.10 + - deps: mime-db@~1.8.0 + +1.2.4 / 2015-02-14 +================== + + * Support Node.js 0.6 + * deps: mime-types@~2.0.9 + - deps: mime-db@~1.7.0 + * deps: negotiator@0.5.1 + - Fix preference sorting to be stable for long acceptable lists + +1.2.3 / 2015-01-31 +================== + + * deps: mime-types@~2.0.8 + - deps: mime-db@~1.6.0 + +1.2.2 / 2014-12-30 +================== + + * deps: mime-types@~2.0.7 + - deps: mime-db@~1.5.0 + +1.2.1 / 2014-12-30 +================== + + * deps: mime-types@~2.0.5 + - deps: mime-db@~1.3.1 + +1.2.0 / 2014-12-19 +================== + + * deps: negotiator@0.5.0 + - Fix list return order when large accepted list + - Fix missing identity encoding when q=0 exists + - Remove dynamic building of Negotiator class + +1.1.4 / 2014-12-10 +================== + + * deps: mime-types@~2.0.4 + - deps: mime-db@~1.3.0 + +1.1.3 / 2014-11-09 +================== + + * deps: mime-types@~2.0.3 + - deps: mime-db@~1.2.0 + +1.1.2 / 2014-10-14 +================== + + * deps: negotiator@0.4.9 + - Fix error when media type has invalid parameter + +1.1.1 / 2014-09-28 +================== + + * deps: mime-types@~2.0.2 + - deps: mime-db@~1.1.0 + * deps: negotiator@0.4.8 + - Fix all negotiations to be case-insensitive + - Stable sort preferences of same quality according to client order + +1.1.0 / 2014-09-02 +================== + + * update `mime-types` + +1.0.7 / 2014-07-04 +================== + + * Fix wrong type returned from `type` when match after unknown extension + +1.0.6 / 2014-06-24 +================== + + * deps: negotiator@0.4.7 + +1.0.5 / 2014-06-20 +================== + + * fix crash when unknown extension given + +1.0.4 / 2014-06-19 +================== + + * use `mime-types` + +1.0.3 / 2014-06-11 +================== + + * deps: negotiator@0.4.6 + - Order by specificity when quality is the same + +1.0.2 / 2014-05-29 +================== + + * Fix interpretation when header not in request + * deps: pin negotiator@0.4.5 + +1.0.1 / 2014-01-18 +================== + + * Identity encoding isn't always acceptable + * deps: negotiator@~0.4.0 + +1.0.0 / 2013-12-27 +================== + + * Genesis diff --git a/Project/Server/node_modules/accepts/LICENSE b/Project/Server/node_modules/accepts/LICENSE new file mode 100644 index 0000000..0616607 --- /dev/null +++ b/Project/Server/node_modules/accepts/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Project/Server/node_modules/accepts/README.md b/Project/Server/node_modules/accepts/README.md new file mode 100644 index 0000000..66a2f54 --- /dev/null +++ b/Project/Server/node_modules/accepts/README.md @@ -0,0 +1,142 @@ +# accepts + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator). +Extracted from [koa](https://www.npmjs.com/package/koa) for general use. + +In addition to negotiator, it allows: + +- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])` + as well as `('text/html', 'application/json')`. +- Allows type shorthands such as `json`. +- Returns `false` when no types match +- Treats non-existent headers as `*` + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install accepts +``` + +## API + + + +```js +var accepts = require('accepts') +``` + +### accepts(req) + +Create a new `Accepts` object for the given `req`. + +#### .charset(charsets) + +Return the first accepted charset. If nothing in `charsets` is accepted, +then `false` is returned. + +#### .charsets() + +Return the charsets that the request accepts, in the order of the client's +preference (most preferred first). + +#### .encoding(encodings) + +Return the first accepted encoding. If nothing in `encodings` is accepted, +then `false` is returned. + +#### .encodings() + +Return the encodings that the request accepts, in the order of the client's +preference (most preferred first). + +#### .language(languages) + +Return the first accepted language. If nothing in `languages` is accepted, +then `false` is returned. + +#### .languages() + +Return the languages that the request accepts, in the order of the client's +preference (most preferred first). + +#### .type(types) + +Return the first accepted type (and it is returned as the same text as what +appears in the `types` array). If nothing in `types` is accepted, then `false` +is returned. + +The `types` array can contain full MIME types or file extensions. Any value +that is not a full MIME types is passed to `require('mime-types').lookup`. + +#### .types() + +Return the types that the request accepts, in the order of the client's +preference (most preferred first). + +## Examples + +### Simple type negotiation + +This simple example shows how to use `accepts` to return a different typed +respond body based on what the client wants to accept. The server lists it's +preferences in order and will get back the best match between the client and +server. + +```js +var accepts = require('accepts') +var http = require('http') + +function app (req, res) { + var accept = accepts(req) + + // the order of this list is significant; should be server preferred order + switch (accept.type(['json', 'html'])) { + case 'json': + res.setHeader('Content-Type', 'application/json') + res.write('{"hello":"world!"}') + break + case 'html': + res.setHeader('Content-Type', 'text/html') + res.write('hello, world!') + break + default: + // the fallback is text/plain, so no need to specify it above + res.setHeader('Content-Type', 'text/plain') + res.write('hello, world!') + break + } + + res.end() +} + +http.createServer(app).listen(3000) +``` + +You can test this out with the cURL program: +```sh +curl -I -H'Accept: text/html' http://localhost:3000/ +``` + +## License + +[MIT](LICENSE) + +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master +[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master +[node-version-image]: https://badgen.net/npm/node/accepts +[node-version-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/accepts +[npm-url]: https://npmjs.org/package/accepts +[npm-version-image]: https://badgen.net/npm/v/accepts +[travis-image]: https://badgen.net/travis/jshttp/accepts/master +[travis-url]: https://travis-ci.org/jshttp/accepts diff --git a/Project/Server/node_modules/accepts/index.js b/Project/Server/node_modules/accepts/index.js new file mode 100644 index 0000000..e9b2f63 --- /dev/null +++ b/Project/Server/node_modules/accepts/index.js @@ -0,0 +1,238 @@ +/*! + * accepts + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var Negotiator = require('negotiator') +var mime = require('mime-types') + +/** + * Module exports. + * @public + */ + +module.exports = Accepts + +/** + * Create a new Accepts object for the given req. + * + * @param {object} req + * @public + */ + +function Accepts (req) { + if (!(this instanceof Accepts)) { + return new Accepts(req) + } + + this.headers = req.headers + this.negotiator = new Negotiator(req) +} + +/** + * Check if the given `type(s)` is acceptable, returning + * the best match when true, otherwise `undefined`, in which + * case you should respond with 406 "Not Acceptable". + * + * The `type` value may be a single mime type string + * such as "application/json", the extension name + * such as "json" or an array `["json", "html", "text/plain"]`. When a list + * or array is given the _best_ match, if any is returned. + * + * Examples: + * + * // Accept: text/html + * this.types('html'); + * // => "html" + * + * // Accept: text/*, application/json + * this.types('html'); + * // => "html" + * this.types('text/html'); + * // => "text/html" + * this.types('json', 'text'); + * // => "json" + * this.types('application/json'); + * // => "application/json" + * + * // Accept: text/*, application/json + * this.types('image/png'); + * this.types('png'); + * // => undefined + * + * // Accept: text/*;q=.5, application/json + * this.types(['html', 'json']); + * this.types('html', 'json'); + * // => "json" + * + * @param {String|Array} types... + * @return {String|Array|Boolean} + * @public + */ + +Accepts.prototype.type = +Accepts.prototype.types = function (types_) { + var types = types_ + + // support flattened arguments + if (types && !Array.isArray(types)) { + types = new Array(arguments.length) + for (var i = 0; i < types.length; i++) { + types[i] = arguments[i] + } + } + + // no types, return all requested types + if (!types || types.length === 0) { + return this.negotiator.mediaTypes() + } + + // no accept header, return first given type + if (!this.headers.accept) { + return types[0] + } + + var mimes = types.map(extToMime) + var accepts = this.negotiator.mediaTypes(mimes.filter(validMime)) + var first = accepts[0] + + return first + ? types[mimes.indexOf(first)] + : false +} + +/** + * Return accepted encodings or best fit based on `encodings`. + * + * Given `Accept-Encoding: gzip, deflate` + * an array sorted by quality is returned: + * + * ['gzip', 'deflate'] + * + * @param {String|Array} encodings... + * @return {String|Array} + * @public + */ + +Accepts.prototype.encoding = +Accepts.prototype.encodings = function (encodings_) { + var encodings = encodings_ + + // support flattened arguments + if (encodings && !Array.isArray(encodings)) { + encodings = new Array(arguments.length) + for (var i = 0; i < encodings.length; i++) { + encodings[i] = arguments[i] + } + } + + // no encodings, return all requested encodings + if (!encodings || encodings.length === 0) { + return this.negotiator.encodings() + } + + return this.negotiator.encodings(encodings)[0] || false +} + +/** + * Return accepted charsets or best fit based on `charsets`. + * + * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5` + * an array sorted by quality is returned: + * + * ['utf-8', 'utf-7', 'iso-8859-1'] + * + * @param {String|Array} charsets... + * @return {String|Array} + * @public + */ + +Accepts.prototype.charset = +Accepts.prototype.charsets = function (charsets_) { + var charsets = charsets_ + + // support flattened arguments + if (charsets && !Array.isArray(charsets)) { + charsets = new Array(arguments.length) + for (var i = 0; i < charsets.length; i++) { + charsets[i] = arguments[i] + } + } + + // no charsets, return all requested charsets + if (!charsets || charsets.length === 0) { + return this.negotiator.charsets() + } + + return this.negotiator.charsets(charsets)[0] || false +} + +/** + * Return accepted languages or best fit based on `langs`. + * + * Given `Accept-Language: en;q=0.8, es, pt` + * an array sorted by quality is returned: + * + * ['es', 'pt', 'en'] + * + * @param {String|Array} langs... + * @return {Array|String} + * @public + */ + +Accepts.prototype.lang = +Accepts.prototype.langs = +Accepts.prototype.language = +Accepts.prototype.languages = function (languages_) { + var languages = languages_ + + // support flattened arguments + if (languages && !Array.isArray(languages)) { + languages = new Array(arguments.length) + for (var i = 0; i < languages.length; i++) { + languages[i] = arguments[i] + } + } + + // no languages, return all requested languages + if (!languages || languages.length === 0) { + return this.negotiator.languages() + } + + return this.negotiator.languages(languages)[0] || false +} + +/** + * Convert extnames to mime. + * + * @param {String} type + * @return {String} + * @private + */ + +function extToMime (type) { + return type.indexOf('/') === -1 + ? mime.lookup(type) + : type +} + +/** + * Check if mime is valid. + * + * @param {String} type + * @return {String} + * @private + */ + +function validMime (type) { + return typeof type === 'string' +} diff --git a/Project/Server/node_modules/accepts/package.json b/Project/Server/node_modules/accepts/package.json new file mode 100644 index 0000000..9cc0a2b --- /dev/null +++ b/Project/Server/node_modules/accepts/package.json @@ -0,0 +1,86 @@ +{ + "_from": "accepts@~1.3.7", + "_id": "accepts@1.3.7", + "_inBundle": false, + "_integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "_location": "/accepts", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "accepts@~1.3.7", + "name": "accepts", + "escapedName": "accepts", + "rawSpec": "~1.3.7", + "saveSpec": null, + "fetchSpec": "~1.3.7" + }, + "_requiredBy": [ + "/express" + ], + "_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "_shasum": "531bc726517a3b2b41f850021c6cc15eaab507cd", + "_spec": "accepts@~1.3.7", + "_where": "E:\\Learn\\Java\\Project\\test\\node_modules\\express", + "bugs": { + "url": "https://github.com/jshttp/accepts/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + } + ], + "dependencies": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + }, + "deprecated": false, + "description": "Higher-level content negotiation", + "devDependencies": { + "deep-equal": "1.0.1", + "eslint": "5.16.0", + "eslint-config-standard": "12.0.0", + "eslint-plugin-import": "2.17.2", + "eslint-plugin-markdown": "1.0.0", + "eslint-plugin-node": "8.0.1", + "eslint-plugin-promise": "4.1.1", + "eslint-plugin-standard": "4.0.0", + "mocha": "6.1.4", + "nyc": "14.0.0" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "index.js" + ], + "homepage": "https://github.com/jshttp/accepts#readme", + "keywords": [ + "content", + "negotiation", + "accept", + "accepts" + ], + "license": "MIT", + "name": "accepts", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/accepts.git" + }, + "scripts": { + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "test-travis": "nyc --reporter=text npm test" + }, + "version": "1.3.7" +} diff --git a/Project/Server/node_modules/after/.npmignore b/Project/Server/node_modules/after/.npmignore new file mode 100644 index 0000000..6c78602 --- /dev/null +++ b/Project/Server/node_modules/after/.npmignore @@ -0,0 +1,2 @@ +node_modules +.monitor diff --git a/Project/Server/node_modules/after/.travis.yml b/Project/Server/node_modules/after/.travis.yml new file mode 100644 index 0000000..afd72d0 --- /dev/null +++ b/Project/Server/node_modules/after/.travis.yml @@ -0,0 +1,12 @@ +language: node_js +node_js: + - 0.6 + - 0.8 + - 0.9 + - 0.10 + - 0.12 + - 4.2.4 + - 5.4.1 + - iojs-1 + - iojs-2 + - iojs-3 diff --git a/Project/Server/node_modules/after/LICENCE b/Project/Server/node_modules/after/LICENCE new file mode 100644 index 0000000..7c35130 --- /dev/null +++ b/Project/Server/node_modules/after/LICENCE @@ -0,0 +1,19 @@ +Copyright (c) 2011 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/Project/Server/node_modules/after/README.md b/Project/Server/node_modules/after/README.md new file mode 100644 index 0000000..fc69096 --- /dev/null +++ b/Project/Server/node_modules/after/README.md @@ -0,0 +1,115 @@ +# After [![Build Status][1]][2] + +Invoke callback after n calls + +## Status: production ready + +## Example + +```js +var after = require("after") +var db = require("./db") // some db. + +var updateUser = function (req, res) { + // use after to run two tasks in parallel, + // namely get request body and get session + // then run updateUser with the results + var next = after(2, updateUser) + var results = {} + + getJSONBody(req, res, function (err, body) { + if (err) return next(err) + + results.body = body + next(null, results) + }) + + getSessionUser(req, res, function (err, user) { + if (err) return next(err) + + results.user = user + next(null, results) + }) + + // now do the thing! + function updateUser(err, result) { + if (err) { + res.statusCode = 500 + return res.end("Unexpected Error") + } + + if (!result.user || result.user.role !== "admin") { + res.statusCode = 403 + return res.end("Permission Denied") + } + + db.put("users:" + req.params.userId, result.body, function (err) { + if (err) { + res.statusCode = 500 + return res.end("Unexpected Error") + } + + res.statusCode = 200 + res.end("Ok") + }) + } +} +``` + +## Naive Example + +```js +var after = require("after") + , next = after(3, logItWorks) + +next() +next() +next() // it works + +function logItWorks() { + console.log("it works!") +} +``` + +## Example with error handling + +```js +var after = require("after") + , next = after(3, logError) + +next() +next(new Error("oops")) // logs oops +next() // does nothing + +// This callback is only called once. +// If there is an error the callback gets called immediately +// this avoids the situation where errors get lost. +function logError(err) { + console.log(err) +} +``` + +## Installation + +`npm install after` + +## Tests + +`npm test` + +## Contributors + + - Raynos + - defunctzombie + +## MIT Licenced + + [1]: https://secure.travis-ci.org/Raynos/after.png + [2]: http://travis-ci.org/Raynos/after + [3]: http://raynos.org/blog/2/Flow-control-in-node.js + [4]: http://stackoverflow.com/questions/6852059/determining-the-end-of-asynchronous-operations-javascript/6852307#6852307 + [5]: http://stackoverflow.com/questions/6869872/in-javascript-what-are-best-practices-for-executing-multiple-asynchronous-functi/6870031#6870031 + [6]: http://stackoverflow.com/questions/6864397/javascript-performance-long-running-tasks/6889419#6889419 + [7]: http://stackoverflow.com/questions/6597493/synchronous-database-queries-with-node-js/6620091#6620091 + [8]: http://github.com/Raynos/iterators + [9]: http://github.com/Raynos/composite diff --git a/Project/Server/node_modules/after/index.js b/Project/Server/node_modules/after/index.js new file mode 100644 index 0000000..ec24879 --- /dev/null +++ b/Project/Server/node_modules/after/index.js @@ -0,0 +1,28 @@ +module.exports = after + +function after(count, callback, err_cb) { + var bail = false + err_cb = err_cb || noop + proxy.count = count + + return (count === 0) ? callback() : proxy + + function proxy(err, result) { + if (proxy.count <= 0) { + throw new Error('after called too many times') + } + --proxy.count + + // after first error, rest are passed to err_cb + if (err) { + bail = true + callback(err) + // future error callbacks will go to error handler + callback = err_cb + } else if (proxy.count === 0 && !bail) { + callback(null, result) + } + } +} + +function noop() {} diff --git a/Project/Server/node_modules/after/package.json b/Project/Server/node_modules/after/package.json new file mode 100644 index 0000000..024299a --- /dev/null +++ b/Project/Server/node_modules/after/package.json @@ -0,0 +1,63 @@ +{ + "_from": "after@0.8.2", + "_id": "after@0.8.2", + "_inBundle": false, + "_integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", + "_location": "/after", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "after@0.8.2", + "name": "after", + "escapedName": "after", + "rawSpec": "0.8.2", + "saveSpec": null, + "fetchSpec": "0.8.2" + }, + "_requiredBy": [ + "/engine.io-parser" + ], + "_resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", + "_shasum": "fedb394f9f0e02aa9768e702bda23b505fae7e1f", + "_spec": "after@0.8.2", + "_where": "E:\\Learn\\Java\\Project\\test\\Server\\node_modules\\engine.io-parser", + "author": { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + "bugs": { + "url": "https://github.com/Raynos/after/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Raynos", + "email": "raynos2@gmail.com", + "url": "http://raynos.org" + } + ], + "deprecated": false, + "description": "after - tiny flow control", + "devDependencies": { + "mocha": "~1.8.1" + }, + "homepage": "https://github.com/Raynos/after#readme", + "keywords": [ + "flowcontrol", + "after", + "flow", + "control", + "arch" + ], + "license": "MIT", + "name": "after", + "repository": { + "type": "git", + "url": "git://github.com/Raynos/after.git" + }, + "scripts": { + "test": "mocha --ui tdd --reporter spec test/*.js" + }, + "version": "0.8.2" +} diff --git a/Project/Server/node_modules/after/test/after-test.js b/Project/Server/node_modules/after/test/after-test.js new file mode 100644 index 0000000..0d63f4c --- /dev/null +++ b/Project/Server/node_modules/after/test/after-test.js @@ -0,0 +1,120 @@ +/*global suite, test*/ + +var assert = require("assert") + , after = require("../") + +test("exists", function () { + assert(typeof after === "function", "after is not a function") +}) + +test("after when called with 0 invokes", function (done) { + after(0, done) +}); + +test("after 1", function (done) { + var next = after(1, done) + next() +}) + +test("after 5", function (done) { + var next = after(5, done) + , i = 5 + + while (i--) { + next() + } +}) + +test("manipulate count", function (done) { + var next = after(1, done) + , i = 5 + + next.count = i + while (i--) { + next() + } +}) + +test("after terminates on error", function (done) { + var next = after(2, function(err) { + assert.equal(err.message, 'test'); + done(); + }) + next(new Error('test')) + next(new Error('test2')) +}) + +test('gee', function(done) { + done = after(2, done) + + function cb(err) { + assert.equal(err.message, 1); + done() + } + + var next = after(3, cb, function(err) { + assert.equal(err.message, 2) + done() + }); + + next() + next(new Error(1)) + next(new Error(2)) +}) + +test('eee', function(done) { + done = after(3, done) + + function cb(err) { + assert.equal(err.message, 1); + done() + } + + var next = after(3, cb, function(err) { + assert.equal(err.message, 2) + done() + }); + + next(new Error(1)) + next(new Error(2)) + next(new Error(2)) +}) + +test('gge', function(done) { + function cb(err) { + assert.equal(err.message, 1); + done() + } + + var next = after(3, cb, function(err) { + // should not happen + assert.ok(false); + }); + + next() + next() + next(new Error(1)) +}) + +test('egg', function(done) { + function cb(err) { + assert.equal(err.message, 1); + done() + } + + var next = after(3, cb, function(err) { + // should not happen + assert.ok(false); + }); + + next(new Error(1)) + next() + next() +}) + +test('throws on too many calls', function(done) { + var next = after(1, done); + next() + assert.throws(next, /after called too many times/); +}); + diff --git a/Project/Server/node_modules/ansi-align/CHANGELOG.md b/Project/Server/node_modules/ansi-align/CHANGELOG.md new file mode 100644 index 0000000..0db57f7 --- /dev/null +++ b/Project/Server/node_modules/ansi-align/CHANGELOG.md @@ -0,0 +1,51 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +# [3.0.0](https://github.com/nexdrew/ansi-align/compare/v2.0.0...v3.0.0) (2018-12-17) + + +### Bug Fixes + +* **package:** update string-width to version 3.0.0 ([#50](https://github.com/nexdrew/ansi-align/issues/50)) ([67f0d8f](https://github.com/nexdrew/ansi-align/commit/67f0d8f)) + + +### BREAKING CHANGES + +* **package:** Node 4 no longer supported, please update to Node 6+ or use ansi-align@2.0.0 + + + + +# [2.0.0](https://github.com/nexdrew/ansi-align/compare/v1.1.0...v2.0.0) (2017-05-01) + + +### Features + +* ES2015ify, dropping support for Node <4 ([#30](https://github.com/nexdrew/ansi-align/issues/30)) ([7b43f48](https://github.com/nexdrew/ansi-align/commit/7b43f48)) + + +### BREAKING CHANGES + +* Node 0.10 or 0.12 no longer supported, please update to Node 4+ or use ansi-align@1.1.0 + + + + +# [1.1.0](https://github.com/nexdrew/ansi-align/compare/v1.0.0...v1.1.0) (2016-06-06) + + +### Features + +* support left-alignment as no-op ([#3](https://github.com/nexdrew/ansi-align/issues/3)) ([e581db6](https://github.com/nexdrew/ansi-align/commit/e581db6)) + + + + +# 1.0.0 (2016-04-30) + + +### Features + +* initial commit ([1914d90](https://github.com/nexdrew/ansi-align/commit/1914d90)) diff --git a/Project/Server/node_modules/ansi-align/LICENSE b/Project/Server/node_modules/ansi-align/LICENSE new file mode 100644 index 0000000..ab601b6 --- /dev/null +++ b/Project/Server/node_modules/ansi-align/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/Project/Server/node_modules/ansi-align/README.md b/Project/Server/node_modules/ansi-align/README.md new file mode 100644 index 0000000..5e51682 --- /dev/null +++ b/Project/Server/node_modules/ansi-align/README.md @@ -0,0 +1,80 @@ +# ansi-align + +> align-text with ANSI support for CLIs + +[![Build Status](https://travis-ci.org/nexdrew/ansi-align.svg?branch=master)](https://travis-ci.org/nexdrew/ansi-align) +[![Coverage Status](https://coveralls.io/repos/github/nexdrew/ansi-align/badge.svg?branch=master)](https://coveralls.io/github/nexdrew/ansi-align?branch=master) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) +[![Greenkeeper badge](https://badges.greenkeeper.io/nexdrew/ansi-align.svg)](https://greenkeeper.io/) + +Easily center- or right- align a block of text, carefully ignoring ANSI escape codes. + +E.g. turn this: + +ansi text block no alignment :( + +Into this: + +ansi text block center aligned! + +## Install + +```sh +npm install --save ansi-align +``` + +```js +var ansiAlign = require('ansi-align') +``` + +## API + +### `ansiAlign(text, [opts])` + +Align the given text per the line with the greatest [`string-width`](https://github.com/sindresorhus/string-width), returning a new string (or array). + +#### Arguments + +- `text`: required, string or array + + The text to align. If a string is given, it will be split using either the `opts.split` value or `'\n'` by default. If an array is given, a different array of modified strings will be returned. + +- `opts`: optional, object + + Options to change behavior, see below. + +#### Options + +- `opts.align`: string, default `'center'` + + The alignment mode. Use `'center'` for center-alignment, `'right'` for right-alignment, or `'left'` for left-alignment. Note that the given `text` is assumed to be left-aligned already, so specifying `align: 'left'` just returns the `text` as is (no-op). + +- `opts.split`: string or RegExp, default `'\n'` + + The separator to use when splitting the text. Only used if text is given as a string. + +- `opts.pad`: string, default `' '` + + The value used to left-pad (prepend to) lines of lesser width. Will be repeated as necessary to adjust alignment to the line with the greatest width. + +### `ansiAlign.center(text)` + +Alias for `ansiAlign(text, { align: 'center' })`. + +### `ansiAlign.right(text)` + +Alias for `ansiAlign(text, { align: 'right' })`. + +### `ansiAlign.left(text)` + +Alias for `ansiAlign(text, { align: 'left' })`, which is a no-op. + +## Similar Packages + +- [`center-align`](https://github.com/jonschlinkert/center-align): Very close to this package, except it doesn't support ANSI codes. +- [`left-pad`](https://github.com/camwest/left-pad): Great for left-padding but does not support center alignment or ANSI codes. +- Pretty much anything by the [chalk](https://github.com/chalk) team + +## License + +ISC © Contributors diff --git a/Project/Server/node_modules/ansi-align/index.js b/Project/Server/node_modules/ansi-align/index.js new file mode 100644 index 0000000..67fa826 --- /dev/null +++ b/Project/Server/node_modules/ansi-align/index.js @@ -0,0 +1,61 @@ +'use strict' + +const stringWidth = require('string-width') + +function ansiAlign (text, opts) { + if (!text) return text + + opts = opts || {} + const align = opts.align || 'center' + + // short-circuit `align: 'left'` as no-op + if (align === 'left') return text + + const split = opts.split || '\n' + const pad = opts.pad || ' ' + const widthDiffFn = align !== 'right' ? halfDiff : fullDiff + + let returnString = false + if (!Array.isArray(text)) { + returnString = true + text = String(text).split(split) + } + + let width + let maxWidth = 0 + text = text.map(function (str) { + str = String(str) + width = stringWidth(str) + maxWidth = Math.max(width, maxWidth) + return { + str, + width + } + }).map(function (obj) { + return new Array(widthDiffFn(maxWidth, obj.width) + 1).join(pad) + obj.str + }) + + return returnString ? text.join(split) : text +} + +ansiAlign.left = function left (text) { + return ansiAlign(text, { align: 'left' }) +} + +ansiAlign.center = function center (text) { + return ansiAlign(text, { align: 'center' }) +} + +ansiAlign.right = function right (text) { + return ansiAlign(text, { align: 'right' }) +} + +module.exports = ansiAlign + +function halfDiff (maxWidth, curWidth) { + return Math.floor((maxWidth - curWidth) / 2) +} + +function fullDiff (maxWidth, curWidth) { + return maxWidth - curWidth +} diff --git a/Project/Server/node_modules/ansi-align/node_modules/string-width/index.js b/Project/Server/node_modules/ansi-align/node_modules/string-width/index.js new file mode 100644 index 0000000..33c9d6c --- /dev/null +++ b/Project/Server/node_modules/ansi-align/node_modules/string-width/index.js @@ -0,0 +1,39 @@ +'use strict'; +const stripAnsi = require('strip-ansi'); +const isFullwidthCodePoint = require('is-fullwidth-code-point'); +const emojiRegex = require('emoji-regex')(); + +module.exports = input => { + input = input.replace(emojiRegex, ' '); + + if (typeof input !== 'string' || input.length === 0) { + return 0; + } + + input = stripAnsi(input); + + let width = 0; + + for (let i = 0; i < input.length; i++) { + const code = input.codePointAt(i); + + // Ignore control characters + if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { + continue; + } + + // Ignore combining characters + if (code >= 0x300 && code <= 0x36F) { + continue; + } + + // Surrogates + if (code > 0xFFFF) { + i++; + } + + width += isFullwidthCodePoint(code) ? 2 : 1; + } + + return width; +}; diff --git a/Project/Server/node_modules/ansi-align/node_modules/string-width/license b/Project/Server/node_modules/ansi-align/node_modules/string-width/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/Project/Server/node_modules/ansi-align/node_modules/string-width/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Project/Server/node_modules/ansi-align/node_modules/string-width/package.json b/Project/Server/node_modules/ansi-align/node_modules/string-width/package.json new file mode 100644 index 0000000..bb37f3d --- /dev/null +++ b/Project/Server/node_modules/ansi-align/node_modules/string-width/package.json @@ -0,0 +1,88 @@ +{ + "_from": "string-width@^3.0.0", + "_id": "string-width@3.1.0", + "_inBundle": false, + "_integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "_location": "/ansi-align/string-width", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "string-width@^3.0.0", + "name": "string-width", + "escapedName": "string-width", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/ansi-align" + ], + "_resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "_shasum": "22767be21b62af1081574306f69ac51b62203961", + "_spec": "string-width@^3.0.0", + "_where": "E:\\Learn\\Java\\Project\\test\\Server\\node_modules\\ansi-align", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/string-width/issues" + }, + "bundleDependencies": false, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "deprecated": false, + "description": "Get the visual width of a string - the number of columns required to display it", + "devDependencies": { + "ava": "^1.0.1", + "xo": "^0.23.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/string-width#readme", + "keywords": [ + "string", + "str", + "character", + "char", + "unicode", + "width", + "visual", + "column", + "columns", + "fullwidth", + "full-width", + "full", + "ansi", + "escape", + "codes", + "cli", + "command-line", + "terminal", + "console", + "cjk", + "chinese", + "japanese", + "korean", + "fixed-width" + ], + "license": "MIT", + "name": "string-width", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/string-width.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.1.0" +} diff --git a/Project/Server/node_modules/ansi-align/node_modules/string-width/readme.md b/Project/Server/node_modules/ansi-align/node_modules/string-width/readme.md new file mode 100644 index 0000000..d39d95f --- /dev/null +++ b/Project/Server/node_modules/ansi-align/node_modules/string-width/readme.md @@ -0,0 +1,45 @@ +# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width) + +> Get the visual width of a string - the number of columns required to display it + +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. + +Useful to be able to measure the actual width of command-line output. + + +## Install + +``` +$ npm install string-width +``` + + +## Usage + +```js +const stringWidth = require('string-width'); + +stringWidth('古'); +//=> 2 + +stringWidth('\u001b[1m古\u001b[22m'); +//=> 2 + +stringWidth('a'); +//=> 1 + +stringWidth('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +// => 5 +``` + + +## Related + +- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module +- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string +- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/Project/Server/node_modules/ansi-align/package.json b/Project/Server/node_modules/ansi-align/package.json new file mode 100644 index 0000000..eefd9e0 --- /dev/null +++ b/Project/Server/node_modules/ansi-align/package.json @@ -0,0 +1,74 @@ +{ + "_from": "ansi-align@^3.0.0", + "_id": "ansi-align@3.0.0", + "_inBundle": false, + "_integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", + "_location": "/ansi-align", + "_phantomChildren": { + "emoji-regex": "7.0.3", + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "5.2.0" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-align@^3.0.0", + "name": "ansi-align", + "escapedName": "ansi-align", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/boxen" + ], + "_resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", + "_shasum": "b536b371cf687caaef236c18d3e21fe3797467cb", + "_spec": "ansi-align@^3.0.0", + "_where": "E:\\Learn\\Java\\Project\\test\\Server\\node_modules\\boxen", + "author": { + "name": "nexdrew" + }, + "bugs": { + "url": "https://github.com/nexdrew/ansi-align/issues" + }, + "bundleDependencies": false, + "dependencies": { + "string-width": "^3.0.0" + }, + "deprecated": false, + "description": "align-text with ANSI support for CLIs", + "devDependencies": { + "ava": "^1.0.1", + "chalk": "^2.4.1", + "coveralls": "^3.0.2", + "nyc": "^13.1.0", + "standard": "^12.0.1", + "standard-version": "^4.4.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/nexdrew/ansi-align#readme", + "keywords": [ + "ansi", + "align", + "cli", + "center", + "pad" + ], + "license": "ISC", + "main": "index.js", + "name": "ansi-align", + "repository": { + "type": "git", + "url": "git+https://github.com/nexdrew/ansi-align.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "release": "standard-version", + "test": "nyc ava" + }, + "version": "3.0.0" +} diff --git a/Project/Server/node_modules/ansi-regex/index.js b/Project/Server/node_modules/ansi-regex/index.js new file mode 100644 index 0000000..c254480 --- /dev/null +++ b/Project/Server/node_modules/ansi-regex/index.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports = options => { + options = Object.assign({ + onlyFirst: false + }, options); + + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, options.onlyFirst ? undefined : 'g'); +}; diff --git a/Project/Server/node_modules/ansi-regex/license b/Project/Server/node_modules/ansi-regex/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/Project/Server/node_modules/ansi-regex/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Project/Server/node_modules/ansi-regex/package.json b/Project/Server/node_modules/ansi-regex/package.json new file mode 100644 index 0000000..a6c32c1 --- /dev/null +++ b/Project/Server/node_modules/ansi-regex/package.json @@ -0,0 +1,85 @@ +{ + "_from": "ansi-regex@^4.1.0", + "_id": "ansi-regex@4.1.0", + "_inBundle": false, + "_integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "_location": "/ansi-regex", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-regex@^4.1.0", + "name": "ansi-regex", + "escapedName": "ansi-regex", + "rawSpec": "^4.1.0", + "saveSpec": null, + "fetchSpec": "^4.1.0" + }, + "_requiredBy": [ + "/strip-ansi" + ], + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "_shasum": "8b9f8f08cf1acb843756a839ca8c7e3168c51997", + "_spec": "ansi-regex@^4.1.0", + "_where": "E:\\Learn\\Java\\Project\\test\\Server\\node_modules\\strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-regex/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Regular expression for matching ANSI escape codes", + "devDependencies": { + "ava": "^0.25.0", + "xo": "^0.23.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/ansi-regex#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "license": "MIT", + "name": "ansi-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-regex.git" + }, + "scripts": { + "test": "xo && ava", + "view-supported": "node fixtures/view-codes.js" + }, + "version": "4.1.0" +} diff --git a/Project/Server/node_modules/ansi-regex/readme.md b/Project/Server/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000..d19c446 --- /dev/null +++ b/Project/Server/node_modules/ansi-regex/readme.md @@ -0,0 +1,87 @@ +# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) + +> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
+ +--- + + +## Install + +``` +$ npm install ansi-regex +``` + + +## Usage + +```js +const ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] + +'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); +//=> ['\u001B[4m'] + +'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); +//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] +``` + + +## API + +### ansiRegex([options]) + +Returns a regex for matching ANSI escape codes. + +#### options + +##### onlyFirst + +Type: `boolean`
+Default: `false` *(Matches any ANSI escape codes in a string)* + +Match only the first ANSI escape. + + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/Project/Server/node_modules/ansi-styles/index.d.ts b/Project/Server/node_modules/ansi-styles/index.d.ts new file mode 100644 index 0000000..7e9b2b7 --- /dev/null +++ b/Project/Server/node_modules/ansi-styles/index.d.ts @@ -0,0 +1,197 @@ +import * as cssColors from 'color-name'; + +declare namespace ansiStyles { + interface ColorConvert { + /** + The RGB color space. + + @param red - (`0`-`255`) + @param green - (`0`-`255`) + @param blue - (`0`-`255`) + */ + rgb(red: number, green: number, blue: number): string; + + /** + The RGB HEX color space. + + @param hex - A hexadecimal string containing RGB data. + */ + hex(hex: string): string; + + /** + @param keyword - A CSS color name. + */ + keyword(keyword: keyof typeof cssColors): string; + + /** + The HSL color space. + + @param hue - (`0`-`360`) + @param saturation - (`0`-`100`) + @param lightness - (`0`-`100`) + */ + hsl(hue: number, saturation: number, lightness: number): string; + + /** + The HSV color space. + + @param hue - (`0`-`360`) + @param saturation - (`0`-`100`) + @param value - (`0`-`100`) + */ + hsv(hue: number, saturation: number, value: number): string; + + /** + The HSV color space. + + @param hue - (`0`-`360`) + @param whiteness - (`0`-`100`) + @param blackness - (`0`-`100`) + */ + hwb(hue: number, whiteness: number, blackness: number): string; + + /** + Use a [4-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4-bit) to set text color. + */ + ansi(ansi: number): string; + + /** + Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color. + */ + ansi256(ansi: number): string; + } + + interface CSPair { + /** + The ANSI terminal control sequence for starting this style. + */ + readonly open: string; + + /** + The ANSI terminal control sequence for ending this style. + */ + readonly close: string; + } + + interface ColorBase { + readonly ansi: ColorConvert; + readonly ansi256: ColorConvert; + readonly ansi16m: ColorConvert; + + /** + The ANSI terminal control sequence for ending this color. + */ + readonly close: string; + } + + interface Modifier { + /** + Resets the current color chain. + */ + readonly reset: CSPair; + + /** + Make text bold. + */ + readonly bold: CSPair; + + /** + Emitting only a small amount of light. + */ + readonly dim: CSPair; + + /** + Make text italic. (Not widely supported) + */ + readonly italic: CSPair; + + /** + Make text underline. (Not widely supported) + */ + readonly underline: CSPair; + + /** + Inverse background and foreground colors. + */ + readonly inverse: CSPair; + + /** + Prints the text, but makes it invisible. + */ + readonly hidden: CSPair; + + /** + Puts a horizontal line through the center of the text. (Not widely supported) + */ + readonly strikethrough: CSPair; + } + + interface ForegroundColor { + readonly black: CSPair; + readonly red: CSPair; + readonly green: CSPair; + readonly yellow: CSPair; + readonly blue: CSPair; + readonly cyan: CSPair; + readonly magenta: CSPair; + readonly white: CSPair; + + /** + Alias for `blackBright`. + */ + readonly gray: CSPair; + + /** + Alias for `blackBright`. + */ + readonly grey: CSPair; + + readonly blackBright: CSPair; + readonly redBright: CSPair; + readonly greenBright: CSPair; + readonly yellowBright: CSPair; + readonly blueBright: CSPair; + readonly cyanBright: CSPair; + readonly magentaBright: CSPair; + readonly whiteBright: CSPair; + } + + interface BackgroundColor { + readonly bgBlack: CSPair; + readonly bgRed: CSPair; + readonly bgGreen: CSPair; + readonly bgYellow: CSPair; + readonly bgBlue: CSPair; + readonly bgCyan: CSPair; + readonly bgMagenta: CSPair; + readonly bgWhite: CSPair; + + /** + Alias for `bgBlackBright`. + */ + readonly bgGray: CSPair; + + /** + Alias for `bgBlackBright`. + */ + readonly bgGrey: CSPair; + + readonly bgBlackBright: CSPair; + readonly bgRedBright: CSPair; + readonly bgGreenBright: CSPair; + readonly bgYellowBright: CSPair; + readonly bgBlueBright: CSPair; + readonly bgCyanBright: CSPair; + readonly bgMagentaBright: CSPair; + readonly bgWhiteBright: CSPair; + } +} + +declare const ansiStyles: { + readonly modifier: ansiStyles.Modifier; + readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase; + readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase; + readonly codes: ReadonlyMap; +} & ansiStyles.BackgroundColor & ansiStyles.ForegroundColor & ansiStyles.Modifier; + +export = ansiStyles; diff --git a/Project/Server/node_modules/ansi-styles/index.js b/Project/Server/node_modules/ansi-styles/index.js new file mode 100644 index 0000000..5d82581 --- /dev/null +++ b/Project/Server/node_modules/ansi-styles/index.js @@ -0,0 +1,163 @@ +'use strict'; + +const wrapAnsi16 = (fn, offset) => (...args) => { + const code = fn(...args); + return `\u001B[${code + offset}m`; +}; + +const wrapAnsi256 = (fn, offset) => (...args) => { + const code = fn(...args); + return `\u001B[${38 + offset};5;${code}m`; +}; + +const wrapAnsi16m = (fn, offset) => (...args) => { + const rgb = fn(...args); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; +}; + +const ansi2ansi = n => n; +const rgb2rgb = (r, g, b) => [r, g, b]; + +const setLazyProperty = (object, property, get) => { + Object.defineProperty(object, property, { + get: () => { + const value = get(); + + Object.defineProperty(object, property, { + value, + enumerable: true, + configurable: true + }); + + return value; + }, + enumerable: true, + configurable: true + }); +}; + +/** @type {typeof import('color-convert')} */ +let colorConvert; +const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { + if (colorConvert === undefined) { + colorConvert = require('color-convert'); + } + + const offset = isBackground ? 10 : 0; + const styles = {}; + + for (const [sourceSpace, suite] of Object.entries(colorConvert)) { + const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; + if (sourceSpace === targetSpace) { + styles[name] = wrap(identity, offset); + } else if (typeof suite === 'object') { + styles[name] = wrap(suite[targetSpace], offset); + } + } + + return styles; +}; + +function assembleStyles() { + const codes = new Map(); + const styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + + // Bright color + blackBright: [90, 39], + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + + // Bright color + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + + // Alias bright black as gray (and grey) + styles.color.gray = styles.color.blackBright; + styles.bgColor.bgGray = styles.bgColor.bgBlackBright; + styles.color.grey = styles.color.blackBright; + styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; + + for (const [groupName, group] of Object.entries(styles)) { + for (const [styleName, style] of Object.entries(group)) { + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; + + group[styleName] = styles[styleName]; + + codes.set(style[0], style[1]); + } + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + } + + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false + }); + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + + setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); + setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); + setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); + setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); + setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); + setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); + + return styles; +} + +// Make the export immutable +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); diff --git a/Project/Server/node_modules/ansi-styles/license b/Project/Server/node_modules/ansi-styles/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/Project/Server/node_modules/ansi-styles/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Project/Server/node_modules/ansi-styles/package.json b/Project/Server/node_modules/ansi-styles/package.json new file mode 100644 index 0000000..9406b64 --- /dev/null +++ b/Project/Server/node_modules/ansi-styles/package.json @@ -0,0 +1,89 @@ +{ + "_from": "ansi-styles@^4.1.0", + "_id": "ansi-styles@4.2.1", + "_inBundle": false, + "_integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "_location": "/ansi-styles", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-styles@^4.1.0", + "name": "ansi-styles", + "escapedName": "ansi-styles", + "rawSpec": "^4.1.0", + "saveSpec": null, + "fetchSpec": "^4.1.0" + }, + "_requiredBy": [ + "/chalk" + ], + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "_shasum": "90ae75c424d008d2624c5bf29ead3177ebfcf359", + "_spec": "ansi-styles@^4.1.0", + "_where": "E:\\Learn\\Java\\Project\\test\\Server\\node_modules\\chalk", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-styles/issues" + }, + "bundleDependencies": false, + "dependencies": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + }, + "deprecated": false, + "description": "ANSI escape codes for styling strings in the terminal", + "devDependencies": { + "@types/color-convert": "^1.9.0", + "ava": "^2.3.0", + "svg-term-cli": "^2.1.1", + "tsd": "^0.11.0", + "xo": "^0.25.3" + }, + "engines": { + "node": ">=8" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "funding": "https://github.com/chalk/ansi-styles?sponsor=1", + "homepage": "https://github.com/chalk/ansi-styles#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "name": "ansi-styles", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-styles.git" + }, + "scripts": { + "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor", + "test": "xo && ava && tsd" + }, + "version": "4.2.1" +} diff --git a/Project/Server/node_modules/ansi-styles/readme.md b/Project/Server/node_modules/ansi-styles/readme.md new file mode 100644 index 0000000..2a1ef65 --- /dev/null +++ b/Project/Server/node_modules/ansi-styles/readme.md @@ -0,0 +1,158 @@ +# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) + +> [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal + +You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. + + + +## Install + +``` +$ npm install ansi-styles +``` + +## Usage + +```js +const style = require('ansi-styles'); + +console.log(`${style.green.open}Hello world!${style.green.close}`); + + +// Color conversion between 16/256/truecolor +// NOTE: If conversion goes to 16 colors or 256 colors, the original color +// may be degraded to fit that color palette. This means terminals +// that do not support 16 million colors will best-match the +// original color. +console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close); +console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close); +console.log(style.color.ansi16m.hex('#abcdef') + 'Hello world!' + style.color.close); +``` + +## API + +Each style has an `open` and `close` property. + +## Styles + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(Not widely supported)* +- `underline` +- `inverse` +- `hidden` +- `strikethrough` *(Not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` +- `magenta` +- `cyan` +- `white` +- `blackBright` (alias: `gray`, `grey`) +- `redBright` +- `greenBright` +- `yellowBright` +- `blueBright` +- `magentaBright` +- `cyanBright` +- `whiteBright` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` +- `bgBlackBright` (alias: `bgGray`, `bgGrey`) +- `bgRedBright` +- `bgGreenBright` +- `bgYellowBright` +- `bgBlueBright` +- `bgMagentaBright` +- `bgCyanBright` +- `bgWhiteBright` + +## Advanced usage + +By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. + +- `style.modifier` +- `style.color` +- `style.bgColor` + +###### Example + +```js +console.log(style.color.green.open); +``` + +Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values. + +###### Example + +```js +console.log(style.codes.get(36)); +//=> 39 +``` + +## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728) + +`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors. + +The following color spaces from `color-convert` are supported: + +- `rgb` +- `hex` +- `keyword` +- `hsl` +- `hsv` +- `hwb` +- `ansi` +- `ansi256` + +To use these, call the associated conversion function with the intended output, for example: + +```js +style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code +style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code + +style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code +style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code + +style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code +style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code +``` + +## Related + +- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/Project/Server/node_modules/anymatch/LICENSE b/Project/Server/node_modules/anymatch/LICENSE new file mode 100644 index 0000000..491766c --- /dev/null +++ b/Project/Server/node_modules/anymatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com) + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/Project/Server/node_modules/anymatch/README.md b/Project/Server/node_modules/anymatch/README.md new file mode 100644 index 0000000..1dd67f5 --- /dev/null +++ b/Project/Server/node_modules/anymatch/README.md @@ -0,0 +1,87 @@ +anymatch [![Build Status](https://travis-ci.org/micromatch/anymatch.svg?branch=master)](https://travis-ci.org/micromatch/anymatch) [![Coverage Status](https://img.shields.io/coveralls/micromatch/anymatch.svg?branch=master)](https://coveralls.io/r/micromatch/anymatch?branch=master) +====== +Javascript module to match a string against a regular expression, glob, string, +or function that takes the string as an argument and returns a truthy or falsy +value. The matcher can also be an array of any or all of these. Useful for +allowing a very flexible user-defined config to define things like file paths. + +__Note: This module has Bash-parity, please be aware that Windows-style backslashes are not supported as separators. See https://github.com/micromatch/micromatch#backslashes for more information.__ + + +Usage +----- +```sh +npm install anymatch +``` + +#### anymatch(matchers, testString, [returnIndex], [options]) +* __matchers__: (_Array|String|RegExp|Function_) +String to be directly matched, string with glob patterns, regular expression +test, function that takes the testString as an argument and returns a truthy +value if it should be matched, or an array of any number and mix of these types. +* __testString__: (_String|Array_) The string to test against the matchers. If +passed as an array, the first element of the array will be used as the +`testString` for non-function matchers, while the entire array will be applied +as the arguments for function matchers. +* __options__: (_Object_ [optional]_) Any of the [picomatch](https://github.com/micromatch/picomatch#options) options. + * __returnIndex__: (_Boolean [optional]_) If true, return the array index of +the first matcher that that testString matched, or -1 if no match, instead of a +boolean result. + +```js +const anymatch = require('anymatch'); + +const matchers = [ 'path/to/file.js', 'path/anyjs/**/*.js', /foo.js$/, string => string.includes('bar') && string.length > 10 ] ; + +anymatch(matchers, 'path/to/file.js'); // true +anymatch(matchers, 'path/anyjs/baz.js'); // true +anymatch(matchers, 'path/to/foo.js'); // true +anymatch(matchers, 'path/to/bar.js'); // true +anymatch(matchers, 'bar.js'); // false + +// returnIndex = true +anymatch(matchers, 'foo.js', {returnIndex: true}); // 2 +anymatch(matchers, 'path/anyjs/foo.js', {returnIndex: true}); // 1 + +// any picomatc + +// using globs to match directories and their children +anymatch('node_modules', 'node_modules'); // true +anymatch('node_modules', 'node_modules/somelib/index.js'); // false +anymatch('node_modules/**', 'node_modules/somelib/index.js'); // true +anymatch('node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // false +anymatch('**/node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // true + +const matcher = anymatch(matchers); +['foo.js', 'bar.js'].filter(matcher); // [ 'foo.js' ] +anymatch master* ❯ + +``` + +#### anymatch(matchers) +You can also pass in only your matcher(s) to get a curried function that has +already been bound to the provided matching criteria. This can be used as an +`Array#filter` callback. + +```js +var matcher = anymatch(matchers); + +matcher('path/to/file.js'); // true +matcher('path/anyjs/baz.js', true); // 1 + +['foo.js', 'bar.js'].filter(matcher); // ['foo.js'] +``` + +Changelog +---------- +[See release notes page on GitHub](https://github.com/micromatch/anymatch/releases) + +- **v3.0:** Removed `startIndex` and `endIndex` arguments. Node 8.x-only. +- **v2.0:** [micromatch](https://github.com/jonschlinkert/micromatch) moves away from minimatch-parity and inline with Bash. This includes handling backslashes differently (see https://github.com/micromatch/micromatch#backslashes for more information). +- **v1.2:** anymatch uses [micromatch](https://github.com/jonschlinkert/micromatch) +for glob pattern matching. Issues with glob pattern matching should be +reported directly to the [micromatch issue tracker](https://github.com/jonschlinkert/micromatch/issues). + +License +------- +[ISC](https://raw.github.com/micromatch/anymatch/master/LICENSE) diff --git a/Project/Server/node_modules/anymatch/index.d.ts b/Project/Server/node_modules/anymatch/index.d.ts new file mode 100644 index 0000000..196d061 --- /dev/null +++ b/Project/Server/node_modules/anymatch/index.d.ts @@ -0,0 +1,19 @@ +type AnymatchFn = (testString: string) => boolean; +type AnymatchPattern = string|RegExp|AnymatchFn; +type AnymatchMatcher = AnymatchPattern|AnymatchPattern[] +type AnymatchTester = { + (testString: string|any[], returnIndex: true): number; + (testString: string|any[]): boolean; +} + +type PicomatchOptions = {dot: boolean}; + +declare const anymatch: { + (matchers: AnymatchMatcher): AnymatchTester; + (matchers: AnymatchMatcher, testString: string|any[], returnIndex: true | PicomatchOptions): number; + (matchers: AnymatchMatcher, testString: string|any[]): boolean; +} + +export {AnymatchMatcher as Matcher} +export {AnymatchTester as Tester} +export default anymatch diff --git a/Project/Server/node_modules/anymatch/index.js b/Project/Server/node_modules/anymatch/index.js new file mode 100644 index 0000000..24529c8 --- /dev/null +++ b/Project/Server/node_modules/anymatch/index.js @@ -0,0 +1,102 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { value: true }); + +const picomatch = require('picomatch'); +const normalizePath = require('normalize-path'); + +/** + * @typedef {(testString: string) => boolean} AnymatchFn + * @typedef {string|RegExp|AnymatchFn} AnymatchPattern + * @typedef {AnymatchPattern|AnymatchPattern[]} AnymatchMatcher + */ +const BANG = '!'; +const DEFAULT_OPTIONS = {returnIndex: false}; +const arrify = (item) => Array.isArray(item) ? item : [item]; + +/** + * @param {AnymatchPattern} matcher + * @param {object} options + * @returns {AnymatchFn} + */ +const createPattern = (matcher, options) => { + if (typeof matcher === 'function') { + return matcher; + } + if (typeof matcher === 'string') { + const glob = picomatch(matcher, options); + return (string) => matcher === string || glob(string); + } + if (matcher instanceof RegExp) { + return (string) => matcher.test(string); + } + return (string) => false; +}; + +/** + * @param {Array} patterns + * @param {Array} negPatterns + * @param {String|Array} args + * @param {Boolean} returnIndex + * @returns {boolean|number} + */ +const matchPatterns = (patterns, negPatterns, args, returnIndex) => { + const isList = Array.isArray(args); + const _path = isList ? args[0] : args; + if (!isList && typeof _path !== 'string') { + throw new TypeError('anymatch: second argument must be a string: got ' + + Object.prototype.toString.call(_path)) + } + const path = normalizePath(_path); + + for (let index = 0; index < negPatterns.length; index++) { + const nglob = negPatterns[index]; + if (nglob(path)) { + return returnIndex ? -1 : false; + } + } + + const applied = isList && [path].concat(args.slice(1)); + for (let index = 0; index < patterns.length; index++) { + const pattern = patterns[index]; + if (isList ? pattern(...applied) : pattern(path)) { + return returnIndex ? index : true; + } + } + + return returnIndex ? -1 : false; +}; + +/** + * @param {AnymatchMatcher} matchers + * @param {Array|string} testString + * @param {object} options + * @returns {boolean|number|Function} + */ +const anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => { + if (matchers == null) { + throw new TypeError('anymatch: specify first argument'); + } + const opts = typeof options === 'boolean' ? {returnIndex: options} : options; + const returnIndex = opts.returnIndex || false; + + // Early cache for matchers. + const mtchers = arrify(matchers); + const negatedGlobs = mtchers + .filter(item => typeof item === 'string' && item.charAt(0) === BANG) + .map(item => item.slice(1)) + .map(item => picomatch(item, opts)); + const patterns = mtchers.map(matcher => createPattern(matcher, opts)); + + if (testString == null) { + return (testString, ri = false) => { + const returnIndex = typeof ri === 'boolean' ? ri : false; + return matchPatterns(patterns, negatedGlobs, testString, returnIndex); + } + } + + return matchPatterns(patterns, negatedGlobs, testString, returnIndex); +}; + +anymatch.default = anymatch; +module.exports = anymatch; diff --git a/Project/Server/node_modules/anymatch/package.json b/Project/Server/node_modules/anymatch/package.json new file mode 100644 index 0000000..ecb7582 --- /dev/null +++ b/Project/Server/node_modules/anymatch/package.json @@ -0,0 +1,76 @@ +{ + "_from": "anymatch@~3.1.1", + "_id": "anymatch@3.1.1", + "_inBundle": false, + "_integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "_location": "/anymatch", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "anymatch@~3.1.1", + "name": "anymatch", + "escapedName": "anymatch", + "rawSpec": "~3.1.1", + "saveSpec": null, + "fetchSpec": "~3.1.1" + }, + "_requiredBy": [ + "/chokidar" + ], + "_resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "_shasum": "c55ecf02185e2469259399310c173ce31233b142", + "_spec": "anymatch@~3.1.1", + "_where": "E:\\Learn\\Java\\Project\\test\\Server\\node_modules\\chokidar", + "author": { + "name": "Elan Shanker", + "url": "https://github.com/es128" + }, + "bugs": { + "url": "https://github.com/micromatch/anymatch/issues" + }, + "bundleDependencies": false, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "deprecated": false, + "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions", + "devDependencies": { + "mocha": "^6.1.3", + "nyc": "^14.0.0" + }, + "engines": { + "node": ">= 8" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "homepage": "https://github.com/micromatch/anymatch", + "keywords": [ + "match", + "any", + "string", + "file", + "fs", + "list", + "glob", + "regex", + "regexp", + "regular", + "expression", + "function" + ], + "license": "ISC", + "name": "anymatch", + "repository": { + "type": "git", + "url": "git+https://github.com/micromatch/anymatch.git" + }, + "scripts": { + "mocha": "mocha", + "test": "nyc mocha" + }, + "version": "3.1.1" +} diff --git a/Project/Server/node_modules/array-flatten/LICENSE b/Project/Server/node_modules/array-flatten/LICENSE new file mode 100644 index 0000000..983fbe8 --- /dev/null +++ b/Project/Server/node_modules/array-flatten/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Project/Server/node_modules/array-flatten/README.md b/Project/Server/node_modules/array-flatten/README.md new file mode 100644 index 0000000..91fa5b6 --- /dev/null +++ b/Project/Server/node_modules/array-flatten/README.md @@ -0,0 +1,43 @@ +# Array Flatten + +[![NPM version][npm-image]][npm-url] +[![NPM downloads][downloads-image]][downloads-url] +[![Build status][travis-image]][travis-url] +[![Test coverage][coveralls-image]][coveralls-url] + +> Flatten an array of nested arrays into a single flat array. Accepts an optional depth. + +## Installation + +``` +npm install array-flatten --save +``` + +## Usage + +```javascript +var flatten = require('array-flatten') + +flatten([1, [2, [3, [4, [5], 6], 7], 8], 9]) +//=> [1, 2, 3, 4, 5, 6, 7, 8, 9] + +flatten([1, [2, [3, [4, [5], 6], 7], 8], 9], 2) +//=> [1, 2, 3, [4, [5], 6], 7, 8, 9] + +(function () { + flatten(arguments) //=> [1, 2, 3] +})(1, [2, 3]) +``` + +## License + +MIT + +[npm-image]: https://img.shields.io/npm/v/array-flatten.svg?style=flat +[npm-url]: https://npmjs.org/package/array-flatten +[downloads-image]: https://img.shields.io/npm/dm/array-flatten.svg?style=flat +[downloads-url]: https://npmjs.org/package/array-flatten +[travis-image]: https://img.shields.io/travis/blakeembrey/array-flatten.svg?style=flat +[travis-url]: https://travis-ci.org/blakeembrey/array-flatten +[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/array-flatten.svg?style=flat +[coveralls-url]: https://coveralls.io/r/blakeembrey/array-flatten?branch=master diff --git a/Project/Server/node_modules/array-flatten/array-flatten.js b/Project/Server/node_modules/array-flatten/array-flatten.js new file mode 100644 index 0000000..089117b --- /dev/null +++ b/Project/Server/node_modules/array-flatten/array-flatten.js @@ -0,0 +1,64 @@ +'use strict' + +/** + * Expose `arrayFlatten`. + */ +module.exports = arrayFlatten + +/** + * Recursive flatten function with depth. + * + * @param {Array} array + * @param {Array} result + * @param {Number} depth + * @return {Array} + */ +function flattenWithDepth (array, result, depth) { + for (var i = 0; i < array.length; i++) { + var value = array[i] + + if (depth > 0 && Array.isArray(value)) { + flattenWithDepth(value, result, depth - 1) + } else { + result.push(value) + } + } + + return result +} + +/** + * Recursive flatten function. Omitting depth is slightly faster. + * + * @param {Array} array + * @param {Array} result + * @return {Array} + */ +function flattenForever (array, result) { + for (var i = 0; i < array.length; i++) { + var value = array[i] + + if (Array.isArray(value)) { + flattenForever(value, result) + } else { + result.push(value) + } + } + + return result +} + +/** + * Flatten an array, with the ability to define a depth. + * + * @param {Array} array + * @param {Number} depth + * @return {Array} + */ +function arrayFlatten (array, depth) { + if (depth == null) { + return flattenForever(array, []) + } + + return flattenWithDepth(array, [], depth) +} diff --git a/Project/Server/node_modules/array-flatten/package.json b/Project/Server/node_modules/array-flatten/package.json new file mode 100644 index 0000000..a65abef --- /dev/null +++ b/Project/Server/node_modules/array-flatten/package.json @@ -0,0 +1,64 @@ +{ + "_from": "array-flatten@1.1.1", + "_id": "array-flatten@1.1.1", + "_inBundle": false, + "_integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "_location": "/array-flatten", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "array-flatten@1.1.1", + "name": "array-flatten", + "escapedName": "array-flatten", + "rawSpec": "1.1.1", + "saveSpec": null, + "fetchSpec": "1.1.1" + }, + "_requiredBy": [ + "/express" + ], + "_resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "_shasum": "9a5f699051b1e7073328f2a008968b64ea2955d2", + "_spec": "array-flatten@1.1.1", + "_where": "E:\\Learn\\Java\\Project\\test\\node_modules\\express", + "author": { + "name": "Blake Embrey", + "email": "hello@blakeembrey.com", + "url": "http://blakeembrey.me" + }, + "bugs": { + "url": "https://github.com/blakeembrey/array-flatten/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Flatten an array of nested arrays into a single flat array", + "devDependencies": { + "istanbul": "^0.3.13", + "mocha": "^2.2.4", + "pre-commit": "^1.0.7", + "standard": "^3.7.3" + }, + "files": [ + "array-flatten.js", + "LICENSE" + ], + "homepage": "https://github.com/blakeembrey/array-flatten", + "keywords": [ + "array", + "flatten", + "arguments", + "depth" + ], + "license": "MIT", + "main": "array-flatten.js", + "name": "array-flatten", + "repository": { + "type": "git", + "url": "git://github.com/blakeembrey/array-flatten.git" + }, + "scripts": { + "test": "istanbul cover _mocha -- -R spec" + }, + "version": "1.1.1" +} diff --git a/Project/Server/node_modules/arraybuffer.slice/.npmignore b/Project/Server/node_modules/arraybuffer.slice/.npmignore new file mode 100644 index 0000000..cfbee8d --- /dev/null +++ b/Project/Server/node_modules/arraybuffer.slice/.npmignore @@ -0,0 +1,17 @@ +lib-cov +lcov.info +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results +build +.grunt + +node_modules diff --git a/Project/Server/node_modules/arraybuffer.slice/LICENCE b/Project/Server/node_modules/arraybuffer.slice/LICENCE new file mode 100644 index 0000000..35fa375 --- /dev/null +++ b/Project/Server/node_modules/arraybuffer.slice/LICENCE @@ -0,0 +1,18 @@ +Copyright (C) 2013 Rase- + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Project/Server/node_modules/arraybuffer.slice/Makefile b/Project/Server/node_modules/arraybuffer.slice/Makefile new file mode 100644 index 0000000..849887f --- /dev/null +++ b/Project/Server/node_modules/arraybuffer.slice/Makefile @@ -0,0 +1,8 @@ + +REPORTER = dot + +test: + @./node_modules/.bin/mocha \ + --reporter $(REPORTER) + +.PHONY: test diff --git a/Project/Server/node_modules/arraybuffer.slice/README.md b/Project/Server/node_modules/arraybuffer.slice/README.md new file mode 100644 index 0000000..15e465e --- /dev/null +++ b/Project/Server/node_modules/arraybuffer.slice/README.md @@ -0,0 +1,17 @@ +# How to +```javascript +var sliceBuffer = require('arraybuffer.slice'); +var ab = (new Int8Array(5)).buffer; +var sliced = sliceBuffer(ab, 1, 3); +sliced = sliceBuffer(ab, 1); +``` + +# Licence (MIT) +Copyright (C) 2013 Rase- + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Project/Server/node_modules/arraybuffer.slice/index.js b/Project/Server/node_modules/arraybuffer.slice/index.js new file mode 100644 index 0000000..11ac556 --- /dev/null +++ b/Project/Server/node_modules/arraybuffer.slice/index.js @@ -0,0 +1,29 @@ +/** + * An abstraction for slicing an arraybuffer even when + * ArrayBuffer.prototype.slice is not supported + * + * @api public + */ + +module.exports = function(arraybuffer, start, end) { + var bytes = arraybuffer.byteLength; + start = start || 0; + end = end || bytes; + + if (arraybuffer.slice) { return arraybuffer.slice(start, end); } + + if (start < 0) { start += bytes; } + if (end < 0) { end += bytes; } + if (end > bytes) { end = bytes; } + + if (start >= bytes || start >= end || bytes === 0) { + return new ArrayBuffer(0); + } + + var abv = new Uint8Array(arraybuffer); + var result = new Uint8Array(end - start); + for (var i = start, ii = 0; i < end; i++, ii++) { + result[ii] = abv[i]; + } + return result.buffer; +}; diff --git a/Project/Server/node_modules/arraybuffer.slice/package.json b/Project/Server/node_modules/arraybuffer.slice/package.json new file mode 100644 index 0000000..3c3b56f --- /dev/null +++ b/Project/Server/node_modules/arraybuffer.slice/package.json @@ -0,0 +1,44 @@ +{ + "_from": "arraybuffer.slice@~0.0.7", + "_id": "arraybuffer.slice@0.0.7", + "_inBundle": false, + "_integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", + "_location": "/arraybuffer.slice", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "arraybuffer.slice@~0.0.7", + "name": "arraybuffer.slice", + "escapedName": "arraybuffer.slice", + "rawSpec": "~0.0.7", + "saveSpec": null, + "fetchSpec": "~0.0.7" + }, + "_requiredBy": [ + "/engine.io-parser" + ], + "_resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", + "_shasum": "3bbc4275dd584cc1b10809b89d4e8b63a69e7675", + "_spec": "arraybuffer.slice@~0.0.7", + "_where": "E:\\Learn\\Java\\Project\\test\\Server\\node_modules\\engine.io-parser", + "bugs": { + "url": "https://github.com/rase-/arraybuffer.slice/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Exports a function for slicing ArrayBuffers (no polyfilling)", + "devDependencies": { + "expect.js": "0.2.0", + "mocha": "1.17.1" + }, + "homepage": "https://github.com/rase-/arraybuffer.slice", + "license": "MIT", + "name": "arraybuffer.slice", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/rase-/arraybuffer.slice.git" + }, + "version": "0.0.7" +} diff --git a/Project/Server/node_modules/arraybuffer.slice/test/slice-buffer.js b/Project/Server/node_modules/arraybuffer.slice/test/slice-buffer.js new file mode 100644 index 0000000..4778da6 --- /dev/null +++ b/Project/Server/node_modules/arraybuffer.slice/test/slice-buffer.js @@ -0,0 +1,227 @@ +/* + * Test dependencies + */ + +var sliceBuffer = require('../index.js'); +var expect = require('expect.js'); + +/** + * Tests + */ + +describe('sliceBuffer', function() { + describe('using standard slice', function() { + it('should slice correctly with only start provided', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, 3); + var sabv = new Uint8Array(sliced); + for (var i = 3, ii = 0; i < abv.length; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with start and end provided', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, 3, 8); + var sabv = new Uint8Array(sliced); + for (var i = 3, ii = 0; i < 8; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with negative start', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, -3); + var sabv = new Uint8Array(sliced); + for (var i = abv.length - 3, ii = 0; i < abv.length; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with negative end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, 0, -3); + var sabv = new Uint8Array(sliced); + for (var i = 0, ii = 0; i < abv.length - 3; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with negative start and end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, -6, -3); + var sabv = new Uint8Array(sliced); + for (var i = abv.length - 6, ii = 0; i < abv.length - 3; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with equal start and end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, 1, 1); + expect(sliced.byteLength).to.equal(0); + }); + + it('should slice correctly when end larger than buffer', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, 0, 100); + expect(new Uint8Array(sliced)).to.eql(abv); + }); + + it('shoud slice correctly when start larger than end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + + var sliced = sliceBuffer(abv.buffer, 6, 5); + expect(sliced.byteLength).to.equal(0); + }); + }); + + describe('using fallback', function() { + it('should slice correctly with only start provided', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + var sliced = sliceBuffer(ab, 3); + var sabv = new Uint8Array(sliced); + for (var i = 3, ii = 0; i < abv.length; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with start and end provided', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + + var sliced = sliceBuffer(ab, 3, 8); + var sabv = new Uint8Array(sliced); + for (var i = 3, ii = 0; i < 8; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with negative start', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + + var sliced = sliceBuffer(ab, -3); + var sabv = new Uint8Array(sliced); + for (var i = abv.length - 3, ii = 0; i < abv.length; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with negative end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + var sliced = sliceBuffer(ab, 0, -3); + var sabv = new Uint8Array(sliced); + for (var i = 0, ii = 0; i < abv.length - 3; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with negative start and end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + var sliced = sliceBuffer(ab, -6, -3); + var sabv = new Uint8Array(sliced); + for (var i = abv.length - 6, ii = 0; i < abv.length - 3; i++, ii++) { + expect(abv[i]).to.equal(sabv[ii]); + } + }); + + it('should slice correctly with equal start and end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + var sliced = sliceBuffer(ab, 1, 1); + expect(sliced.byteLength).to.equal(0); + }); + + it('should slice correctly when end larger than buffer', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + var sliced = sliceBuffer(ab, 0, 100); + var sabv = new Uint8Array(sliced); + for (var i = 0; i < abv.length; i++) { + expect(abv[i]).to.equal(sabv[i]); + } + }); + + it('shoud slice correctly when start larger than end', function() { + var abv = new Uint8Array(10); + for (var i = 0; i < abv.length; i++) { + abv[i] = i; + } + var ab = abv.buffer; + ab.slice = undefined; + + var sliced = sliceBuffer(ab, 6, 5); + expect(sliced.byteLength).to.equal(0); + }); + }); +}); diff --git a/Project/Server/node_modules/async-limiter/.eslintignore b/Project/Server/node_modules/async-limiter/.eslintignore new file mode 100644 index 0000000..e1661e5 --- /dev/null +++ b/Project/Server/node_modules/async-limiter/.eslintignore @@ -0,0 +1,2 @@ +coverage +.nyc_output \ No newline at end of file diff --git a/Project/Server/node_modules/async-limiter/.nycrc b/Project/Server/node_modules/async-limiter/.nycrc new file mode 100644 index 0000000..874c1de --- /dev/null +++ b/Project/Server/node_modules/async-limiter/.nycrc @@ -0,0 +1,10 @@ +{ + "check-coverage": false, + "lines": 99, + "statements": 99, + "functions": 99, + "branches": 99, + "include": [ + "index.js" + ] +} \ No newline at end of file diff --git a/Project/Server/node_modules/async-limiter/.travis.yml b/Project/Server/node_modules/async-limiter/.travis.yml new file mode 100644 index 0000000..37026e2 --- /dev/null +++ b/Project/Server/node_modules/async-limiter/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +node_js: + - "6" + - "8" + - "10" + - "node" +script: npm run travis +cache: + yarn: true diff --git a/Project/Server/node_modules/async-limiter/LICENSE b/Project/Server/node_modules/async-limiter/LICENSE new file mode 100644 index 0000000..9c91fb2 --- /dev/null +++ b/Project/Server/node_modules/async-limiter/LICENSE @@ -0,0 +1,8 @@ +The MIT License (MIT) +Copyright (c) 2017 Samuel Reed + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Project/Server/node_modules/async-limiter/index.js b/Project/Server/node_modules/async-limiter/index.js new file mode 100644 index 0000000..c9bd2f9 --- /dev/null +++ b/Project/Server/node_modules/async-limiter/index.js @@ -0,0 +1,67 @@ +'use strict'; + +function Queue(options) { + if (!(this instanceof Queue)) { + return new Queue(options); + } + + options = options || {}; + this.concurrency = options.concurrency || Infinity; + this.pending = 0; + this.jobs = []; + this.cbs = []; + this._done = done.bind(this); +} + +var arrayAddMethods = [ + 'push', + 'unshift', + 'splice' +]; + +arrayAddMethods.forEach(function(method) { + Queue.prototype[method] = function() { + var methodResult = Array.prototype[method].apply(this.jobs, arguments); + this._run(); + return methodResult; + }; +}); + +Object.defineProperty(Queue.prototype, 'length', { + get: function() { + return this.pending + this.jobs.length; + } +}); + +Queue.prototype._run = function() { + if (this.pending === this.concurrency) { + return; + } + if (this.jobs.length) { + var job = this.jobs.shift(); + this.pending++; + job(this._done); + this._run(); + } + + if (this.pending === 0) { + while (this.cbs.length !== 0) { + var cb = this.cbs.pop(); + process.nextTick(cb); + } + } +}; + +Queue.prototype.onDone = function(cb) { + if (typeof cb === 'function') { + this.cbs.push(cb); + this._run(); + } +}; + +function done() { + this.pending--; + this._run(); +} + +module.exports = Queue; diff --git a/Project/Server/node_modules/async-limiter/package.json b/Project/Server/node_modules/async-limiter/package.json new file mode 100644 index 0000000..6eb4a4e --- /dev/null +++ b/Project/Server/node_modules/async-limiter/package.json @@ -0,0 +1,69 @@ +{ + "_from": "async-limiter@~1.0.0", + "_id": "async-limiter@1.0.1", + "_inBundle": false, + "_integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "_location": "/async-limiter", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "async-limiter@~1.0.0", + "name": "async-limiter", + "escapedName": "async-limiter", + "rawSpec": "~1.0.0", + "saveSpec": null, + "fetchSpec": "~1.0.0" + }, + "_requiredBy": [ + "/engine.io-client/ws" + ], + "_resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "_shasum": "dd379e94f0db8310b08291f9d64c3209766617fd", + "_spec": "async-limiter@~1.0.0", + "_where": "E:\\Learn\\Java\\Project\\test\\Server\\node_modules\\engine.io-client\\node_modules\\ws", + "author": { + "name": "Samuel Reed" + }, + "bugs": { + "url": "https://github.com/strml/async-limiter/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "asynchronous function queue with adjustable concurrency", + "devDependencies": { + "coveralls": "^3.0.3", + "eslint": "^5.16.0", + "eslint-plugin-mocha": "^5.3.0", + "intelli-espower-loader": "^1.0.1", + "mocha": "^6.1.4", + "nyc": "^14.1.1", + "power-assert": "^1.6.1" + }, + "homepage": "https://github.com/strml/async-limiter#readme", + "keywords": [ + "throttle", + "async", + "limiter", + "asynchronous", + "job", + "task", + "concurrency", + "concurrent" + ], + "license": "MIT", + "name": "async-limiter", + "repository": { + "type": "git", + "url": "git+https://github.com/strml/async-limiter.git" + }, + "scripts": { + "coverage": "nyc npm test && nyc report --reporter=text-lcov | coveralls", + "example": "node example", + "lint": "eslint .", + "test": "mocha --require intelli-espower-loader test/", + "travis": "npm run lint && npm run test" + }, + "version": "1.0.1" +} diff --git a/Project/Server/node_modules/async-limiter/readme.md b/Project/Server/node_modules/async-limiter/readme.md new file mode 100644 index 0000000..fcaa22f --- /dev/null +++ b/Project/Server/node_modules/async-limiter/readme.md @@ -0,0 +1,132 @@ +# Async-Limiter + +A module for limiting concurrent asynchronous actions in flight. Forked from [queue](https://github.com/jessetane/queue). + +[![npm](http://img.shields.io/npm/v/async-limiter.svg?style=flat-square)](http://www.npmjs.org/async-limiter) +[![tests](https://img.shields.io/travis/STRML/async-limiter.svg?style=flat-square&branch=master)](https://travis-ci.org/STRML/async-limiter) +[![coverage](https://img.shields.io/coveralls/STRML/async-limiter.svg?style=flat-square&branch=master)](https://coveralls.io/r/STRML/async-limiter) + +This module exports a class `Limiter` that implements some of the `Array` API. +Pass async functions (ones that accept a callback or return a promise) to an instance's additive array methods. + +## Motivation + +Certain functions, like `zlib`, have [undesirable behavior](https://github.com/nodejs/node/issues/8871#issuecomment-250915913) when +run at infinite concurrency. + +In this case, it is actually faster, and takes far less memory, to limit concurrency. + +This module should do the absolute minimum work necessary to queue up functions. PRs are welcome that would +make this module faster or lighter, but new functionality is not desired. + +Style should confirm to nodejs/node style. + +## Example + +``` javascript +var Limiter = require('async-limiter') + +var t = new Limiter({concurrency: 2}); +var results = [] + +// add jobs using the familiar Array API +t.push(function (cb) { + results.push('two') + cb() +}) + +t.push( + function (cb) { + results.push('four') + cb() + }, + function (cb) { + results.push('five') + cb() + } +) + +t.unshift(function (cb) { + results.push('one') + cb() +}) + +t.splice(2, 0, function (cb) { + results.push('three') + cb() +}) + +// Jobs run automatically. If you want a callback when all are done, +// call 'onDone()'. +t.onDone(function () { + console.log('all done:', results) +}) +``` + +## Zlib Example + +```js +const zlib = require('zlib'); +const Limiter = require('async-limiter'); + +const message = {some: "data"}; +const payload = new Buffer(JSON.stringify(message)); + +// Try with different concurrency values to see how this actually +// slows significantly with higher concurrency! +// +// 5: 1398.607ms +// 10: 1375.668ms +// Infinity: 4423.300ms +// +const t = new Limiter({concurrency: 5}); +function deflate(payload, cb) { + t.push(function(done) { + zlib.deflate(payload, function(err, buffer) { + done(); + cb(err, buffer); + }); + }); +} + +console.time('deflate'); +for(let i = 0; i < 30000; ++i) { + deflate(payload, function (err, buffer) {}); +} +t.onDone(function() { + console.timeEnd('deflate'); +}); +``` + +## Install + +`npm install async-limiter` + +## Test + +`npm test` + +## API + +### `var t = new Limiter([opts])` +Constructor. `opts` may contain inital values for: +* `t.concurrency` + +## Instance methods + +### `t.onDone(fn)` +`fn` will be called once and only once, when the queue is empty. + +## Instance methods mixed in from `Array` +Mozilla has docs on how these methods work [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array). +### `t.push(element1, ..., elementN)` +### `t.unshift(element1, ..., elementN)` +### `t.splice(index , howMany[, element1[, ...[, elementN]]])` + +## Properties +### `t.concurrency` +Max number of jobs the queue should process concurrently, defaults to `Infinity`. + +### `t.length` +Jobs pending + jobs to process (readonly). + diff --git a/Project/Server/node_modules/backo2/.npmignore b/Project/Server/node_modules/backo2/.npmignore new file mode 100644 index 0000000..c2658d7 --- /dev/null +++ b/Project/Server/node_modules/backo2/.npmignore @@ -0,0 +1 @@ +node_modules/ diff --git a/Project/Server/node_modules/backo2/History.md b/Project/Server/node_modules/backo2/History.md new file mode 100644 index 0000000..8eb28b8 --- /dev/null +++ b/Project/Server/node_modules/backo2/History.md @@ -0,0 +1,12 @@ + +1.0.1 / 2014-02-17 +================== + + * go away decimal point + * history + +1.0.0 / 2014-02-17 +================== + + * add jitter option + * Initial commit diff --git a/Project/Server/node_modules/backo2/Makefile b/Project/Server/node_modules/backo2/Makefile new file mode 100644 index 0000000..9987df8 --- /dev/null +++ b/Project/Server/node_modules/backo2/Makefile @@ -0,0 +1,8 @@ + +test: + @./node_modules/.bin/mocha \ + --require should \ + --reporter dot \ + --bail + +.PHONY: test \ No newline at end of file diff --git a/Project/Server/node_modules/backo2/Readme.md b/Project/Server/node_modules/backo2/Readme.md new file mode 100644 index 0000000..0df2a39 --- /dev/null +++ b/Project/Server/node_modules/backo2/Readme.md @@ -0,0 +1,34 @@ +# backo + + Simple exponential backoff because the others seem to have weird abstractions. + +## Installation + +``` +$ npm install backo +``` + +## Options + + - `min` initial timeout in milliseconds [100] + - `max` max timeout [10000] + - `jitter` [0] + - `factor` [2] + +## Example + +```js +var Backoff = require('backo'); +var backoff = new Backoff({ min: 100, max: 20000 }); + +setTimeout(function(){ + something.reconnect(); +}, backoff.duration()); + +// later when something works +backoff.reset() +``` + +# License + + MIT diff --git a/Project/Server/node_modules/backo2/component.json b/Project/Server/node_modules/backo2/component.json new file mode 100644 index 0000000..994845a --- /dev/null +++ b/Project/Server/node_modules/backo2/component.json @@ -0,0 +1,11 @@ +{ + "name": "backo", + "repo": "segmentio/backo", + "dependencies": {}, + "version": "1.0.1", + "description": "simple backoff without the weird abstractions", + "keywords": ["backoff"], + "license": "MIT", + "scripts": ["index.js"], + "main": "index.js" +} diff --git a/Project/Server/node_modules/backo2/index.js b/Project/Server/node_modules/backo2/index.js new file mode 100644 index 0000000..fac4429 --- /dev/null +++ b/Project/Server/node_modules/backo2/index.js @@ -0,0 +1,85 @@ + +/** + * Expose `Backoff`. + */ + +module.exports = Backoff; + +/** + * Initialize backoff timer with `opts`. + * + * - `min` initial timeout in milliseconds [100] + * - `max` max timeout [10000] + * - `jitter` [0] + * - `factor` [2] + * + * @param {Object} opts + * @api public + */ + +function Backoff(opts) { + opts = opts || {}; + this.ms = opts.min || 100; + this.max = opts.max || 10000; + this.factor = opts.factor || 2; + this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0; + this.attempts = 0; +} + +/** + * Return the backoff duration. + * + * @return {Number} + * @api public + */ + +Backoff.prototype.duration = function(){ + var ms = this.ms * Math.pow(this.factor, this.attempts++); + if (this.jitter) { + var rand = Math.random(); + var deviation = Math.floor(rand * this.jitter * ms); + ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation; + } + return Math.min(ms, this.max) | 0; +}; + +/** + * Reset the number of attempts. + * + * @api public + */ + +Backoff.prototype.reset = function(){ + this.attempts = 0; +}; + +/** + * Set the minimum duration + * + * @api public + */ + +Backoff.prototype.setMin = function(min){ + this.ms = min; +}; + +/** + * Set the maximum duration + * + * @api public + */ + +Backoff.prototype.setMax = function(max){ + this.max = max; +}; + +/** + * Set the jitter + * + * @api public + */ + +Backoff.prototype.setJitter = function(jitter){ + this.jitter = jitter; +}; + diff --git a/Project/Server/node_modules/backo2/package.json b/Project/Server/node_modules/backo2/package.json new file mode 100644 index 0000000..9ab26e7 --- /dev/null +++ b/Project/Server/node_modules/backo2/package.json @@ -0,0 +1,47 @@ +{ + "_from": "backo2@1.0.2", + "_id": "backo2@1.0.2", + "_inBundle": false, + "_integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", + "_location": "/backo2", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "backo2@1.0.2", + "name": "backo2", + "escapedName": "backo2", + "rawSpec": "1.0.2", + "saveSpec": null, + "fetchSpec": "1.0.2" + }, + "_requiredBy": [ + "/socket.io-client" + ], + "_resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", + "_shasum": "31ab1ac8b129363463e35b3ebb69f4dfcfba7947", + "_spec": "backo2@1.0.2", + "_where": "E:\\Learn\\Java\\Project\\test\\Server\\node_modules\\socket.io-client", + "bugs": { + "url": "https://github.com/mokesmokes/backo/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "simple backoff based on segmentio/backo", + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "homepage": "https://github.com/mokesmokes/backo#readme", + "keywords": [ + "backoff" + ], + "license": "MIT", + "name": "backo2", + "repository": { + "type": "git", + "url": "git+https://github.com/mokesmokes/backo.git" + }, + "version": "1.0.2" +} diff --git a/Project/Server/node_modules/backo2/test/index.js b/Project/Server/node_modules/backo2/test/index.js new file mode 100644 index 0000000..ea1f6de --- /dev/null +++ b/Project/Server/node_modules/backo2/test/index.js @@ -0,0 +1,18 @@ + +var Backoff = require('..'); +var assert = require('assert'); + +describe('.duration()', function(){ + it('should increase the backoff', function(){ + var b = new Backoff; + + assert(100 == b.duration()); + assert(200 == b.duration()); + assert(400 == b.duration()); + assert(800 == b.duration()); + + b.reset(); + assert(100 == b.duration()); + assert(200 == b.duration()); + }) +}) \ No newline at end of file diff --git a/Project/Server/node_modules/balanced-match/.npmignore b/Project/Server/node_modules/balanced-match/.npmignore new file mode 100644 index 0000000..ae5d8c3 --- /dev/null +++ b/Project/Server/node_modules/balanced-match/.npmignore @@ -0,0 +1,5 @@ +test +.gitignore +.travis.yml +Makefile +example.js diff --git a/Project/Server/node_modules/balanced-match/LICENSE.md b/Project/Server/node_modules/balanced-match/LICENSE.md new file mode 100644 index 0000000..2cdc8e4 --- /dev/null +++ b/Project/Server/node_modules/balanced-match/LICENSE.md @@ -0,0 +1,21 @@ +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Project/Server/node_modules/balanced-match/README.md b/Project/Server/node_modules/balanced-match/README.md new file mode 100644 index 0000000..08e918c --- /dev/null +++ b/Project/Server/node_modules/balanced-match/README.md @@ -0,0 +1,91 @@ +# balanced-match + +Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! + +[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) +[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) + +[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) + +## Example + +Get the first matching pair of braces: + +```js +var balanced = require('balanced-match'); + +console.log(balanced('{', '}', 'pre{in{nested}}post')); +console.log(balanced('{', '}', 'pre{first}between{second}post')); +console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); +``` + +The matches are: + +```bash +$ node example.js +{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } +{ start: 3, + end: 9, + pre: 'pre', + body: 'first', + post: 'between{second}post' } +{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } +``` + +## API + +### var m = balanced(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +object with those keys: + +* **start** the index of the first match of `a` +* **end** the index of the matching `b` +* **pre** the preamble, `a` and `b` not included +* **body** the match, `a` and `b` not included +* **post** the postscript, `a` and `b` not included + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. + +### var r = balanced.range(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +array with indexes: `[ , ]`. + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install balanced-match +``` + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Project/Server/node_modules/balanced-match/index.js b/Project/Server/node_modules/balanced-match/index.js new file mode 100644 index 0000000..1685a76 --- /dev/null +++ b/Project/Server/node_modules/balanced-match/index.js @@ -0,0 +1,59 @@ +'use strict'; +module.exports = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; +} diff --git a/Project/Server/node_modules/balanced-match/package.json b/Project/Server/node_modules/balanced-match/package.json new file mode 100644 index 0000000..ae04426 --- /dev/null +++ b/Project/Server/node_modules/balanced-match/package.json @@ -0,0 +1,77 @@ +{ + "_from": "balanced-match@^1.0.0", + "_id": "balanced-match@1.0.0", + "_inBundle": false, + "_integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "_location": "/balanced-match", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "balanced-match@^1.0.0", + "name": "balanced-match", + "escapedName": "balanced-match", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/brace-expansion" + ], + "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767", + "_spec": "balanced-match@^1.0.0", + "_where": "E:\\Learn\\Java\\Project\\test\\Server\\node_modules\\brace-expansion", + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/balanced-match/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Match balanced character pairs, like \"{\" and \"}\"", + "devDependencies": { + "matcha": "^0.7.0", + "tape": "^4.6.0" + }, + "homepage": "https://github.com/juliangruber/balanced-match", + "keywords": [ + "match", + "regexp", + "test", + "balanced", + "parse" + ], + "license": "MIT", + "main": "index.js", + "name": "balanced-match", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/balanced-match.git" + }, + "scripts": { + "bench": "make bench", + "test": "make test" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "version": "1.0.0" +} diff --git a/Project/Server/node_modules/base64-arraybuffer/.npmignore b/Project/Server/node_modules/base64-arraybuffer/.npmignore new file mode 100644 index 0000000..332ee5a --- /dev/null +++ b/Project/Server/node_modules/base64-arraybuffer/.npmignore @@ -0,0 +1,3 @@ +/node_modules/ +Gruntfile.js +/test/ diff --git a/Project/Server/node_modules/base64-arraybuffer/.travis.yml b/Project/Server/node_modules/base64-arraybuffer/.travis.yml new file mode 100644 index 0000000..19259a5 --- /dev/null +++ b/Project/Server/node_modules/base64-arraybuffer/.travis.yml @@ -0,0 +1,19 @@ +language: node_js +node_js: +- '0.12' +- iojs-1 +- iojs-2 +- iojs-3 +- '4.1' +before_script: +- npm install +before_install: npm install -g npm@'>=2.13.5' +deploy: + provider: npm + email: niklasvh@gmail.com + api_key: + secure: oHV9ArprTj5WOk7MP1UF7QMJ70huXw+y7xXb5wF4+V2H8Hyfa5TfE0DiOmqrube1WXTeH1FLgq54shp/sJWi47Hkg/GyeoB5NnsPhYEaJkaON9UG5blML+ODiNVsEnq/1kNBQ8e0+0JItMPLGySKyFmuZ3yflulXKS8O88mfINo= + on: + tags: true + branch: master + repo: niklasvh/base64-arraybuffer diff --git a/Project/Server/node_modules/base64-arraybuffer/LICENSE-MIT b/Project/Server/node_modules/base64-arraybuffer/LICENSE-MIT new file mode 100644 index 0000000..ed27b41 --- /dev/null +++ b/Project/Server/node_modules/base64-arraybuffer/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) 2012 Niklas von Hertzen + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/Project/Server/node_modules/base64-arraybuffer/README.md b/Project/Server/node_modules/base64-arraybuffer/README.md new file mode 100644 index 0000000..50009e4 --- /dev/null +++ b/Project/Server/node_modules/base64-arraybuffer/README.md @@ -0,0 +1,20 @@ +# base64-arraybuffer + +[![Build Status](https://travis-ci.org/niklasvh/base64-arraybuffer.png)](https://travis-ci.org/niklasvh/base64-arraybuffer) +[![NPM Downloads](https://img.shields.io/npm/dm/base64-arraybuffer.svg)](https://www.npmjs.org/package/base64-arraybuffer) +[![NPM Version](https://img.shields.io/npm/v/base64-arraybuffer.svg)](https://www.npmjs.org/package/base64-arraybuffer) + +Encode/decode base64 data into ArrayBuffers + +## Getting Started +Install the module with: `npm install base64-arraybuffer` + +## API +The library encodes and decodes base64 to and from ArrayBuffers + + - __encode(buffer)__ - Encodes `ArrayBuffer` into base64 string + - __decode(str)__ - Decodes base64 string to `ArrayBuffer` + +## License +Copyright (c) 2012 Niklas von Hertzen +Licensed under the MIT license. diff --git a/Project/Server/node_modules/base64-arraybuffer/lib/base64-arraybuffer.js b/Project/Server/node_modules/base64-arraybuffer/lib/base64-arraybuffer.js new file mode 100644 index 0000000..362fbfa --- /dev/null +++ b/Project/Server/node_modules/base64-arraybuffer/lib/base64-arraybuffer.js @@ -0,0 +1,59 @@ +/* + * base64-arraybuffer + * https://github.com/niklasvh/base64-arraybuffer + * + * Copyright (c) 2012 Niklas von Hertzen + * Licensed under the MIT license. + */ +(function(chars){ + "use strict"; + + exports.encode = function(arraybuffer) { + var bytes = new Uint8Array(arraybuffer), + i, len = bytes.length, base64 = ""; + + for (i = 0; i < len; i+=3) { + base64 += chars[bytes[i] >> 2]; + base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)]; + base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)]; + base64 += chars[bytes[i + 2] & 63]; + } + + if ((len % 3) === 2) { + base64 = base64.substring(0, base64.length - 1) + "="; + } else if (len % 3 === 1) { + base64 = base64.substring(0, base64.length - 2) + "=="; + } + + return base64; + }; + + exports.decode = function(base64) { + var bufferLength = base64.length * 0.75, + len = base64.length, i, p = 0, + encoded1, encoded2, encoded3, encoded4; + + if (base64[base64.length - 1] === "=") { + bufferLength--; + if (base64[base64.length - 2] === "=") { + bufferLength--; + } + } + + var arraybuffer = new ArrayBuffer(bufferLength), + bytes = new Uint8Array(arraybuffer); + + for (i = 0; i < len; i+=4) { + encoded1 = chars.indexOf(base64[i]); + encoded2 = chars.indexOf(base64[i+1]); + encoded3 = chars.indexOf(base64[i+2]); + encoded4 = chars.indexOf(base64[i+3]); + + bytes[p++] = (encoded1 << 2) | (encoded2 >> 4); + bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2); + bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63); + } + + return arraybuffer; + }; +})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"); diff --git a/Project/Server/node_modules/base64-arraybuffer/package.json b/Project/Server/node_modules/base64-arraybuffer/package.json new file mode 100644 index 0000000..e97b4f8 --- /dev/null +++ b/Project/Server/node_modules/base64-arraybuffer/package.json @@ -0,0 +1,64 @@ +{ + "_from": "base64-arraybuffer@0.1.4", + "_id": "base64-arraybuffer@0.1.4", + "_inBundle": false, + "_integrity": "sha1-mBjHngWbE1X5fgQooBfIOOkLqBI=", + "_location": "/base64-arraybuffer", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "base64-arraybuffer@0.1.4", + "name": "base64-arraybuffer", + "escapedName": "base64-arraybuffer", + "rawSpec": "0.1.4", + "saveSpec": null, + "fetchSpec": "0.1.4" + }, + "_requiredBy": [ + "/engine.io-parser" + ], + "_resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz", + "_shasum": "9818c79e059b1355f97e0428a017c838e90ba812", + "_spec": "base64-arraybuffer@0.1.4", + "_where": "E:\\Learn\\Java\\Project\\test\\Server\\node_modules\\engine.io-parser", + "author": { + "name": "Niklas von Hertzen", + "email": "niklasvh@gmail.com", + "url": "http://hertzen.com" + }, + "bugs": { + "url": "https://github.com/niklasvh/base64-arraybuffer/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Encode/decode base64 data into ArrayBuffers", + "devDependencies": { + "grunt": "^0.4.5", + "grunt-cli": "^0.1.13", + "grunt-contrib-jshint": "^0.11.2", + "grunt-contrib-nodeunit": "^0.4.1", + "grunt-contrib-watch": "^0.6.1" + }, + "engines": { + "node": ">= 0.6.0" + }, + "homepage": "https://github.com/niklasvh/base64-arraybuffer", + "keywords": [], + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/niklasvh/base64-arraybuffer/blob/master/LICENSE-MIT" + } + ], + "main": "lib/base64-arraybuffer", + "name": "base64-arraybuffer", + "repository": { + "type": "git", + "url": "git+https://github.com/niklasvh/base64-arraybuffer.git" + }, + "scripts": { + "test": "grunt nodeunit" + }, + "version": "0.1.4" +} diff --git a/Project/Server/node_modules/base64id/CHANGELOG.md b/Project/Server/node_modules/base64id/CHANGELOG.md new file mode 100644 index 0000000..b2b8332 --- /dev/null +++ b/Project/Server/node_modules/base64id/CHANGELOG.md @@ -0,0 +1,16 @@ +# [2.0.0](https://github.com/faeldt/base64id/compare/1.0.0...2.0.0) (2019-05-27) + + +### Code Refactoring + +* **buffer:** replace deprecated Buffer constructor usage ([#11](https://github.com/faeldt/base64id/issues/11)) ([ccfba54](https://github.com/faeldt/base64id/commit/ccfba54)) + + +### BREAKING CHANGES + +* **buffer:** drop support for Node.js ≤ 4.4.x and 5.0.0 - 5.9.x + +See: https://nodejs.org/en/docs/guides/buffer-constructor-deprecation/ + + + diff --git a/Project/Server/node_modules/base64id/LICENSE b/Project/Server/node_modules/base64id/LICENSE new file mode 100644 index 0000000..0d03c83 --- /dev/null +++ b/Project/Server/node_modules/base64id/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2012-2016 Kristian Faeldt + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Project/Server/node_modules/base64id/README.md b/Project/Server/node_modules/base64id/README.md new file mode 100644 index 0000000..17689e6 --- /dev/null +++ b/Project/Server/node_modules/base64id/README.md @@ -0,0 +1,18 @@ +base64id +======== + +Node.js module that generates a base64 id. + +Uses crypto.randomBytes when available, falls back to unsafe methods for node.js <= 0.4. + +To increase performance, random bytes are buffered to minimize the number of synchronous calls to crypto.randomBytes. + +## Installation + + $ npm install base64id + +## Usage + + var base64id = require('base64id'); + + var id = base64id.generateId(); diff --git a/Project/Server/node_modules/base64id/lib/base64id.js b/Project/Server/node_modules/base64id/lib/base64id.js new file mode 100644 index 0000000..15afe74 --- /dev/null +++ b/Project/Server/node_modules/base64id/lib/base64id.js @@ -0,0 +1,103 @@ +/*! + * base64id v0.1.0 + */ + +/** + * Module dependencies + */ + +var crypto = require('crypto'); + +/** + * Constructor + */ + +var Base64Id = function() { }; + +/** + * Get random bytes + * + * Uses a buffer if available, falls back to crypto.randomBytes + */ + +Base64Id.prototype.getRandomBytes = function(bytes) { + + var BUFFER_SIZE = 4096 + var self = this; + + bytes = bytes || 12; + + if (bytes > BUFFER_SIZE) { + return crypto.randomBytes(bytes); + } + + var bytesInBuffer = parseInt(BUFFER_SIZE/bytes); + var threshold = parseInt(bytesInBuffer*0.85); + + if (!threshold) { + return crypto.randomBytes(bytes); + } + + if (this.bytesBufferIndex == null) { + this.bytesBufferIndex = -1; + } + + if (this.bytesBufferIndex == bytesInBuffer) { + this.bytesBuffer = null; + this.bytesBufferIndex = -1; + } + + // No buffered bytes available or index above threshold + if (this.bytesBufferIndex == -1 || this.bytesBufferIndex > threshold) { + + if (!this.isGeneratingBytes) { + this.isGeneratingBytes = true; + crypto.randomBytes(BUFFER_SIZE, function(err, bytes) { + self.bytesBuffer = bytes; + self.bytesBufferIndex = 0; + self.isGeneratingBytes = false; + }); + } + + // Fall back to sync call when no buffered bytes are available + if (this.bytesBufferIndex == -1) { + return crypto.randomBytes(bytes); + } + } + + var result = this.bytesBuffer.slice(bytes*this.bytesBufferIndex, bytes*(this.bytesBufferIndex+1)); + this.bytesBufferIndex++; + + return result; +} + +/** + * Generates a base64 id + * + * (Original version from socket.io ) + */ + +Base64Id.prototype.generateId = function () { + var rand = Buffer.alloc(15); // multiple of 3 for base64 + if (!rand.writeInt32BE) { + return Math.abs(Math.random() * Math.random() * Date.now() | 0).toString() + + Math.abs(Math.random() * Math.random() * Date.now() | 0).toString(); + } + this.sequenceNumber = (this.sequenceNumber + 1) | 0; + rand.writeInt32BE(this.sequenceNumber, 11); + if (crypto.randomBytes) { + this.getRandomBytes(12).copy(rand); + } else { + // not secure for node 0.4 + [0, 4, 8].forEach(function(i) { + rand.writeInt32BE(Math.random() * Math.pow(2, 32) | 0, i); + }); + } + return rand.toString('base64').replace(/\//g, '_').replace(/\+/g, '-'); +}; + +/** + * Export + */ + +exports = module.exports = new Base64Id(); diff --git a/Project/Server/node_modules/base64id/package.json b/Project/Server/node_modules/base64id/package.json new file mode 100644 index 0000000..18e33d6 --- /dev/null +++ b/Project/Server/node_modules/base64id/package.json @@ -0,0 +1,47 @@ +{ + "_from": "base64id@2.0.0", + "_id": "base64id@2.0.0", + "_inBundle": false, + "_integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", + "_location": "/base64id", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "base64id@2.0.0", + "name": "base64id", + "escapedName": "base64id", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/engine.io" + ], + "_resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", + "_shasum": "2770ac6bc47d312af97a8bf9a634342e0cd25cb6", + "_spec": "base64id@2.0.0", + "_where": "E:\\Learn\\Java\\Project\\test\\Server\\node_modules\\engine.io", + "author": { + "name": "Kristian Faeldt", + "email": "faeldt_kristian@cyberagent.co.jp" + }, + "bugs": { + "url": "https://github.com/faeldt/base64id/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Generates a base64 id", + "engines": { + "node": "^4.5.0 || >= 5.9" + }, + "homepage": "https://github.com/faeldt/base64id#readme", + "license": "MIT", + "main": "./lib/base64id.js", + "name": "base64id", + "repository": { + "type": "git", + "url": "git+https://github.com/faeldt/base64id.git" + }, + "version": "2.0.0" +} diff --git a/Project/Server/node_modules/better-assert/.npmignore b/Project/Server/node_modules/better-assert/.npmignore new file mode 100644 index 0000000..f1250e5 --- /dev/null +++ b/Project/Server/node_modules/better-assert/.npmignore @@ -0,0 +1,4 @@ +support +test +examples +*.sock diff --git a/Project/Server/node_modules/better-assert/History.md b/Project/Server/node_modules/better-assert/History.md new file mode 100644 index 0000000..cbb579b --- /dev/null +++ b/Project/Server/node_modules/better-assert/History.md @@ -0,0 +1,15 @@ + +1.0.0 / 2013-02-03 +================== + + * Stop using the removed magic __stack global getter + +0.1.0 / 2012-10-04 +================== + + * add throwing of AssertionError for test frameworks etc + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/Project/Server/node_modules/better-assert/Makefile b/Project/Server/node_modules/better-assert/Makefile new file mode 100644 index 0000000..36a3ed7 --- /dev/null +++ b/Project/Server/node_modules/better-assert/Makefile @@ -0,0 +1,5 @@ + +test: + @echo "populate me" + +.PHONY: test \ No newline at end of file diff --git a/Project/Server/node_modules/better-assert/Readme.md b/Project/Server/node_modules/better-assert/Readme.md new file mode 100644 index 0000000..d8d3a63 --- /dev/null +++ b/Project/Server/node_modules/better-assert/Readme.md @@ -0,0 +1,61 @@ + +# better-assert + + Better c-style assertions using [callsite](https://github.com/visionmedia/callsite) for + self-documenting failure messages. + +## Installation + + $ npm install better-assert + +## Example + + By default assertions are enabled, however the __NO_ASSERT__ environment variable + will deactivate them when truthy. + +```js +var assert = require('better-assert'); + +test(); + +function test() { + var user = { name: 'tobi' }; + assert('tobi' == user.name); + assert('number' == typeof user.age); +} + +AssertionError: 'number' == typeof user.age + at test (/Users/tj/projects/better-assert/example.js:9:3) + at Object. (/Users/tj/projects/better-assert/example.js:4:1) + at Module._compile (module.js:449:26) + at Object.Module._extensions..js (module.js:467:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Module.runMain (module.js:492:10) + at process.startup.processNextTick.process._tickCallback (node.js:244:9) +``` + +## License + +(The MIT License) + +Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Project/Server/node_modules/better-assert/example.js b/Project/Server/node_modules/better-assert/example.js new file mode 100644 index 0000000..688c29e --- /dev/null +++ b/Project/Server/node_modules/better-assert/example.js @@ -0,0 +1,10 @@ + +var assert = require('./'); + +test(); + +function test() { + var user = { name: 'tobi' }; + assert('tobi' == user.name); + assert('number' == typeof user.age); +} \ No newline at end of file diff --git a/Project/Server/node_modules/better-assert/index.js b/Project/Server/node_modules/better-assert/index.js new file mode 100644 index 0000000..fd1c9b7 --- /dev/null +++ b/Project/Server/node_modules/better-assert/index.js @@ -0,0 +1,38 @@ +/** + * Module dependencies. + */ + +var AssertionError = require('assert').AssertionError + , callsite = require('callsite') + , fs = require('fs') + +/** + * Expose `assert`. + */ + +module.exports = process.env.NO_ASSERT + ? function(){} + : assert; + +/** + * Assert the given `expr`. + */ + +function assert(expr) { + if (expr) return; + + var stack = callsite(); + var call = stack[1]; + var file = call.getFileName(); + var lineno = call.getLineNumber(); + var src = fs.readFileSync(file, 'utf8'); + var line = src.split('\n')[lineno-1]; + var src = line.match(/assert\((.*)\)/)[1]; + + var err = new AssertionError({ + message: src, + stackStartFunction: stack[0].getFunction() + }); + + throw err; +} diff --git a/Project/Server/node_modules/better-assert/package.json b/Project/Server/node_modules/better-assert/package.json new file mode 100644 index 0000000..d879bc2 --- /dev/null +++ b/Project/Server/node_modules/better-assert/package.json @@ -0,0 +1,65 @@ +{ + "_from": "better-assert@~1.0.0", + "_id": "better-assert@1.0.2", + "_inBundle": false, + "_integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", + "_location": "/better-assert", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "better-assert@~1.0.0", + "name": "better-assert", + "escapedName": "better-assert", + "rawSpec": "~1.0.0", + "saveSpec": null, + "fetchSpec": "~1.0.0" + }, + "_requiredBy": [ + "/parseqs", + "/parseuri" + ], + "_resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", + "_shasum": "40866b9e1b9e0b55b481894311e68faffaebc522", + "_spec": "better-assert@~1.0.0", + "_where": "E:\\Learn\\Java\\Project\\test\\Server\\node_modules\\parseqs", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "bugs": { + "url": "https://github.com/visionmedia/better-assert/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "TonyHe", + "email": "coolhzb@163.com" + }, + { + "name": "ForbesLindesay" + } + ], + "dependencies": { + "callsite": "1.0.0" + }, + "deprecated": false, + "description": "Better assertions for node, reporting the expr, filename, lineno etc", + "engines": { + "node": "*" + }, + "homepage": "https://github.com/visionmedia/better-assert#readme", + "keywords": [ + "assert", + "stack", + "trace", + "debug" + ], + "main": "index", + "name": "better-assert", + "repository": { + "type": "git", + "url": "git+https://github.com/visionmedia/better-assert.git" + }, + "version": "1.0.2" +} diff --git a/Project/Server/node_modules/binary-extensions/binary-extensions.json b/Project/Server/node_modules/binary-extensions/binary-extensions.json new file mode 100644 index 0000000..b33eac3 --- /dev/null +++ b/Project/Server/node_modules/binary-extensions/binary-extensions.json @@ -0,0 +1,256 @@ +[ + "3dm", + "3ds", + "3g2", + "3gp", + "7z", + "a", + "aac", + "adp", + "ai", + "aif", + "aiff", + "alz", + "ape", + "apk", + "appimage", + "ar", + "arj", + "asf", + "au", + "avi", + "bak", + "baml", + "bh", + "bin", + "bk", + "bmp", + "btif", + "bz2", + "bzip2", + "cab", + "caf", + "cgm", + "class", + "cmx", + "cpio", + "cr2", + "cur", + "dat", + "dcm", + "deb", + "dex", + "djvu", + "dll", + "dmg", + "dng", + "doc", + "docm", + "docx", + "dot", + "dotm", + "dra", + "DS_Store", + "dsk", + "dts", + "dtshd", + "dvb", + "dwg", + "dxf", + "ecelp4800", + "ecelp7470", + "ecelp9600", + "egg", + "eol", + "eot", + "epub", + "exe", + "f4v", + "fbs", + "fh", + "fla", + "flac", + "flatpak", + "fli", + "flv", + "fpx", + "fst", + "fvt", + "g3", + "gh", + "gif", + "graffle", + "gz", + "gzip", + "h261", + "h263", + "h264", + "icns", + "ico", + "ief", + "img", + "ipa", + "iso", + "jar", + "jpeg", + "jpg", + "jpgv", + "jpm", + "jxr", + "key", + "ktx", + "lha", + "lib", + "lvp", + "lz", + "lzh", + "lzma", + "lzo", + "m3u", + "m4a", + "m4v", + "mar", + "mdi", + "mht", + "mid", + "midi", + "mj2", + "mka", + "mkv", + "mmr", + "mng", + "mobi", + "mov", + "movie", + "mp3", + "mp4", + "mp4a", + "mpeg", + "mpg", + "mpga", + "mxu", + "nef", + "npx", + "numbers", + "nupkg", + "o", + "oga", + "ogg", + "ogv", + "otf", + "pages", + "pbm", + "pcx", + "pdb", + "pdf", + "pea", + "pgm", + "pic", + "png", + "pnm", + "pot", + "potm", + "potx", + "ppa", + "ppam", + "ppm", + "pps", + "ppsm", + "ppsx", + "ppt", + "pptm", + "pptx", + "psd", + "pya", + "pyc", + "pyo", + "pyv", + "qt", + "rar", + "ras", + "raw", + "resources", + "rgb", + "rip", + "rlc", + "rmf", + "rmvb", + "rpm", + "rtf", + "rz", + "s3m", + "s7z", + "scpt", + "sgi", + "shar", + "snap", + "sil", + "sketch", + "slk", + "smv", + "snk", + "so", + "stl", + "suo", + "sub", + "swf", + "tar", + "tbz", + "tbz2", + "tga", + "tgz", + "thmx", + "tif", + "tiff", + "tlz", + "ttc", + "ttf", + "txz", + "udf", + "uvh", + "uvi", + "uvm", + "uvp", + "uvs", + "uvu", + "viv", + "vob", + "war", + "wav", + "wax", + "wbmp", + "wdp", + "weba", + "webm", + "webp", + "whl", + "wim", + "wm", + "wma", + "wmv", + "wmx", + "woff", + "woff2", + "wrm", + "wvx", + "xbm", + "xif", + "xla", + "xlam", + "xls", + "xlsb", + "xlsm", + "xlsx", + "xlt", + "xltm", + "xltx", + "xm", + "xmind", + "xpi", + "xpm", + "xwd", + "xz", + "z", + "zip", + "zipx" +] diff --git a/Project/Server/node_modules/binary-extensions/binary-extensions.json.d.ts b/Project/Server/node_modules/binary-extensions/binary-extensions.json.d.ts new file mode 100644 index 0000000..94a248c --- /dev/null +++ b/Project/Server/node_modules/binary-extensions/binary-extensions.json.d.ts @@ -0,0 +1,3 @@ +declare const binaryExtensionsJson: readonly string[]; + +export = binaryExtensionsJson; diff --git a/Project/Server/node_modules/binary-extensions/index.d.ts b/Project/Server/node_modules/binary-extensions/index.d.ts new file mode 100644 index 0000000..f469ac5 --- /dev/null +++ b/Project/Server/node_modules/binary-extensions/index.d.ts @@ -0,0 +1,14 @@ +/** +List of binary file extensions. + +@example +``` +import binaryExtensions = require('binary-extensions'); + +console.log(binaryExtensions); +//=> ['3ds', '3g2', …] +``` +*/ +declare const binaryExtensions: readonly string[]; + +export = binaryExtensions; diff --git a/Project/Server/node_modules/binary-extensions/index.js b/Project/Server/node_modules/binary-extensions/index.js new file mode 100644 index 0000000..d46e468 --- /dev/null +++ b/Project/Server/node_modules/binary-extensions/index.js @@ -0,0 +1 @@ +module.exports = require('./binary-extensions.json'); diff --git a/Project/Server/node_modules/binary-extensions/license b/Project/Server/node_modules/binary-extensions/license new file mode 100644 index 0000000..401b1c7 --- /dev/null +++ b/Project/Server/node_modules/binary-extensions/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Project/Server/node_modules/binary-extensions/package.json b/Project/Server/node_modules/binary-extensions/package.json new file mode 100644 index 0000000..9f9d129 --- /dev/null +++ b/Project/Server/node_modules/binary-extensions/package.json @@ -0,0 +1,70 @@ +{ + "_from": "binary-extensions@^2.0.0", + "_id": "binary-extensions@2.1.0", + "_inBundle": false, + "_integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "_location": "/binary-extensions", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "binary-extensions@^2.0.0", + "name": "binary-extensions", + "escapedName": "binary-extensions", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/is-binary-path" + ], + "_resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "_shasum": "30fa40c9e7fe07dbc895678cd287024dea241dd9", + "_spec": "binary-extensions@^2.0.0", + "_where": "E:\\Learn\\Java\\Project\\test\\Server\\node_modules\\is-binary-path", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/binary-extensions/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "List of binary file extensions", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, + "engines": { + "node": ">=8" + }, + "files": [ + "index.js", + "index.d.ts", + "binary-extensions.json", + "binary-extensions.json.d.ts" + ], + "homepage": "https://github.com/sindresorhus/binary-extensions#readme", + "keywords": [ + "binary", + "extensions", + "extension", + "file", + "json", + "list", + "array" + ], + "license": "MIT", + "name": "binary-extensions", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/binary-extensions.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.1.0" +} diff --git a/Project/Server/node_modules/binary-extensions/readme.md b/Project/Server/node_modules/binary-extensions/readme.md new file mode 100644 index 0000000..344c52c --- /dev/null +++ b/Project/Server/node_modules/binary-extensions/readme.md @@ -0,0 +1,41 @@ +# binary-extensions [![Build Status](https://travis-ci.org/sindresorhus/binary-extensions.svg?branch=master)](https://travis-ci.org/sindresorhus/binary-extensions) + +> List of binary file extensions + +The list is just a [JSON file](binary-extensions.json) and can be used anywhere. + + +## Install + +``` +$ npm install binary-extensions +``` + + +## Usage + +```js +const binaryExtensions = require('binary-extensions'); + +console.log(binaryExtensions); +//=> ['3ds', '3g2', …] +``` + + +## Related + +- [is-binary-path](https://github.com/sindresorhus/is-binary-path) - Check if a filepath is a binary file +- [text-extensions](https://github.com/sindresorhus/text-extensions) - List of text file extensions + + +--- + + diff --git a/Project/Server/node_modules/blob/.idea/blob.iml b/Project/Server/node_modules/blob/.idea/blob.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/Project/Server/node_modules/blob/.idea/blob.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Project/Server/node_modules/blob/.idea/inspectionProfiles/profiles_settings.xml b/Project/Server/node_modules/blob/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..0eefe32 --- /dev/null +++ b/Project/Server/node_modules/blob/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/Project/Server/node_modules/blob/.idea/markdown-navigator.xml b/Project/Server/node_modules/blob/.idea/markdown-navigator.xml new file mode 100644 index 0000000..7753d6d --- /dev/null +++ b/Project/Server/node_modules/blob/.idea/markdown-navigator.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Project/Server/node_modules/blob/.idea/markdown-navigator/profiles_settings.xml b/Project/Server/node_modules/blob/.idea/markdown-navigator/profiles_settings.xml new file mode 100644 index 0000000..57927c5 --- /dev/null +++ b/Project/Server/node_modules/blob/.idea/markdown-navigator/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Project/Server/node_modules/blob/.idea/modules.xml b/Project/Server/node_modules/blob/.idea/modules.xml new file mode 100644 index 0000000..7905a56 --- /dev/null +++ b/Project/Server/node_modules/blob/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Project/Server/node_modules/blob/.idea/vcs.xml b/Project/Server/node_modules/blob/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/Project/Server/node_modules/blob/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Project/Server/node_modules/blob/.idea/workspace.xml b/Project/Server/node_modules/blob/.idea/workspace.xml new file mode 100644 index 0000000..31e803b --- /dev/null +++ b/Project/Server/node_modules/blob/.idea/workspace.xml @@ -0,0 +1,390 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + esprima-six + + + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+