]> prime8.dev >> repos - ttyd.git/commitdiff
Upgrade to xterm.js 2.3.1
authorShuanglei Tao <tsl0922@gmail.com>
Fri, 10 Feb 2017 15:54:37 +0000 (23:54 +0800)
committerShuanglei Tao <tsl0922@gmail.com>
Fri, 10 Feb 2017 15:54:57 +0000 (23:54 +0800)
html/package.json
html/yarn.lock
src/index.html

index 1b2f1928ace9d9bb183ca79b5fd9fb93b2f5ab4c..c91d866df93b82982974209d02ba8e1c5fc2a33b 100644 (file)
@@ -15,6 +15,6 @@
   "dependencies": {
     "gulp": "^3.9.1",
     "gulp-inline-source": "^3.0.0",
-    "xterm": "^2.2.3"
+    "xterm": "^2.3.1"
   }
 }
index b6dfba877413252492f1a240b0138d6a963c60c1..d6d54556f6baa44a43b9d0e94f88c4f62dd3883d 100644 (file)
@@ -1413,9 +1413,9 @@ wrappy@1:
   version "4.0.1"
   resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
 
-xterm@^2.2.3:
-  version "2.2.3"
-  resolved "https://registry.yarnpkg.com/xterm/-/xterm-2.2.3.tgz#4121bd5412952bcb191819de4566a4b4f793ed8a"
+xterm@^2.3.1:
+  version "2.3.1"
+  resolved "https://registry.yarnpkg.com/xterm/-/xterm-2.3.1.tgz#78acbcb1f88dac85916c7abb94424c827238849f"
 
 yargs@~3.10.0:
   version "3.10.0"
index 0bb92bdb0406110ce2047a1188e0c859e3e4d61e..a7ebd852ad3b348a937d568f22e74ce3ba481c25 100644 (file)
@@ -5,10 +5,11 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <title>ttyd - Terminal</title>
     <link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAcCAYAAAAAwr0iAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA0xpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OTgyRjc1RjA3MTZEMTFFNjg2M0NCOEY3RjJBMEY3N0EiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OTgyRjc1RUY3MTZEMTFFNjg2M0NCOEY3RjJBMEY3N0EiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjU3YmQxNjhjLWI5ZDctMTE3OS1hM2RlLWZmNjQyYTM4NTJmMCIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjU3YmQxNjhjLWI5ZDctMTE3OS1hM2RlLWZmNjQyYTM4NTJmMCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PhsssMYAAALDSURBVHjaxFa9jxJBFH8zDMdCYrhIAppgIjaG5C5RQ+zO2Gty5gpbY2KsbOyu1MrGGEtj/A9stLPXs6CjJ5GYIF6AE5IDBHZmfG92F4ZzvQAnyyO7O8zX+73f+5gRd3bvvSgffN4/l948YgASFhQ9aWhqM6+pYfrVjD5WH9NK8f7x8ebNnVtvWC6b/RaPxy8zxsxmbB5lIfNsIDMggreezqG1o9GIGj8E45zFNzYgnU4D5xyUUkBglpFAKfgWa5gFY89rNVvgJJMgSBkpjcViIISA4XAI4/EYkBXTdyYQ9LOUU9sw7bmG2lqgPwwAKSV9D/P5/G2csNtoNJ71+32HFjqOszyQkDY9xLbrjkEorSe+wYGc67o72Wz2dSqV+tjr9e4iiAfdbnfL+G4B10wtDV/nBSYAN5O053eivVqtvq1UKr/RDaVCofCyVCo9ogXE0qISppgsJ3GlCzzGkQHcOEgT8n2xWLyfy+XeDwaDK7Va7Xm73X4YUHaaRfMwcbIPdTNBGWBSwkP3Ewdr9Xr9FcbAUwpICkyKAXuTRdkIAxH4QThOEn61W2YSKruAVpeJiUQiYRQjqHImk9nDjDiPijnO+d7pdN5hXOwRuGXdYRggANIdM9sy2tTeGPsuNpvNJwgkRVUMpYPdV5dJURsIZZ9WBEB6aRhKkeeWSzi2j9kxk8vLFqsABFkvlWSYhoqdni6zY2dRfHJfYoErvxBFLb5expVUDFlYCwDpM8CU0pEDoADUGH9YCf8dgKuQSRagXoo/Lg0Da3CBVwm9syBKBv46FfHNIlc+BYFZQHe0yBnQPgN0HFtV8H8VmXko8ABgEOo1uIDZMbCWALRiQAR/gkvpqsU+Rcl4gW9zR6JLCXXQ5XTVAKR/sqIvGODl89BnJfLHcRJNceP6tQ9fDr4+RmRHmAUqoiLEkOnM1vb2pz8CDACUMgcHE3VMqAAAAABJRU5ErkJggg==" />
-    <style>.terminal{background-color:#000;color:#fff;font-family:courier-new,courier,monospace;font-feature-settings:"liga" 0;position:relative}.terminal.focus,.terminal:focus{outline:none}.terminal .xterm-helpers{position:absolute;top:0}.terminal .xterm-helper-textarea{position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-10;white-space:nowrap;overflow:hidden;resize:none}.terminal .terminal-cursor{background-color:#fff;color:#000}.terminal:not(.focus) .terminal-cursor{outline:1px solid #fff;outline-offset:-1px;background-color:transparent}.terminal.focus .terminal-cursor.blinking{animation:blink-cursor 1.2s infinite step-end}@keyframes blink-cursor{0%{background-color:#fff;color:#000}50%{background-color:transparent;color:#fff}}.terminal .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.terminal .composition-view.active{display:block}.terminal .xterm-viewport{background-color:#000;overflow-y:scroll}.terminal .xterm-rows{position:absolute;left:0;top:0}.terminal .xterm-rows>div{white-space:nowrap}.terminal .xterm-scroll-area{visibility:hidden}.terminal .xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;left:-9999em}.terminal .xterm-bold{font-weight:700}.terminal .xterm-underline{text-decoration:underline}.terminal .xterm-blink{text-decoration:blink}.terminal .xterm-hidden{visibility:hidden}.terminal .xterm-color-0{color:#2e3436}.terminal .xterm-bg-color-0{background-color:#2e3436}.terminal .xterm-color-1{color:#c00}.terminal .xterm-bg-color-1{background-color:#c00}.terminal .xterm-color-2{color:#4e9a06}.terminal .xterm-bg-color-2{background-color:#4e9a06}.terminal .xterm-color-3{color:#c4a000}.terminal .xterm-bg-color-3{background-color:#c4a000}.terminal .xterm-color-4{color:#3465a4}.terminal .xterm-bg-color-4{background-color:#3465a4}.terminal .xterm-color-5{color:#75507b}.terminal .xterm-bg-color-5{background-color:#75507b}.terminal .xterm-color-6{color:#06989a}.terminal .xterm-bg-color-6{background-color:#06989a}.terminal .xterm-color-7{color:#d3d7cf}.terminal .xterm-bg-color-7{background-color:#d3d7cf}.terminal .xterm-color-8{color:#555753}.terminal .xterm-bg-color-8{background-color:#555753}.terminal .xterm-color-9{color:#ef2929}.terminal .xterm-bg-color-9{background-color:#ef2929}.terminal .xterm-color-10{color:#8ae234}.terminal .xterm-bg-color-10{background-color:#8ae234}.terminal .xterm-color-11{color:#fce94f}.terminal .xterm-bg-color-11{background-color:#fce94f}.terminal .xterm-color-12{color:#729fcf}.terminal .xterm-bg-color-12{background-color:#729fcf}.terminal .xterm-color-13{color:#ad7fa8}.terminal .xterm-bg-color-13{background-color:#ad7fa8}.terminal .xterm-color-14{color:#34e2e2}.terminal .xterm-bg-color-14{background-color:#34e2e2}.terminal .xterm-color-15{color:#eeeeec}.terminal .xterm-bg-color-15{background-color:#eeeeec}.terminal .xterm-color-16{color:#000}.terminal .xterm-bg-color-16{background-color:#000}.terminal .xterm-color-17{color:#00005f}.terminal .xterm-bg-color-17{background-color:#00005f}.terminal .xterm-color-18{color:#000087}.terminal .xterm-bg-color-18{background-color:#000087}.terminal .xterm-color-19{color:#0000af}.terminal .xterm-bg-color-19{background-color:#0000af}.terminal .xterm-color-20{color:#0000d7}.terminal .xterm-bg-color-20{background-color:#0000d7}.terminal .xterm-color-21{color:#00f}.terminal .xterm-bg-color-21{background-color:#00f}.terminal .xterm-color-22{color:#005f00}.terminal .xterm-bg-color-22{background-color:#005f00}.terminal .xterm-color-23{color:#005f5f}.terminal .xterm-bg-color-23{background-color:#005f5f}.terminal .xterm-color-24{color:#005f87}.terminal .xterm-bg-color-24{background-color:#005f87}.terminal .xterm-color-25{color:#005faf}.terminal .xterm-bg-color-25{background-color:#005faf}.terminal .xterm-color-26{color:#005fd7}.terminal .xterm-bg-color-26{background-color:#005fd7}.terminal .xterm-color-27{color:#005fff}.terminal .xterm-bg-color-27{background-color:#005fff}.terminal .xterm-color-28{color:#008700}.terminal .xterm-bg-color-28{background-color:#008700}.terminal .xterm-color-29{color:#00875f}.terminal .xterm-bg-color-29{background-color:#00875f}.terminal .xterm-color-30{color:#008787}.terminal .xterm-bg-color-30{background-color:#008787}.terminal .xterm-color-31{color:#0087af}.terminal .xterm-bg-color-31{background-color:#0087af}.terminal .xterm-color-32{color:#0087d7}.terminal .xterm-bg-color-32{background-color:#0087d7}.terminal .xterm-color-33{color:#0087ff}.terminal .xterm-bg-color-33{background-color:#0087ff}.terminal .xterm-color-34{color:#00af00}.terminal .xterm-bg-color-34{background-color:#00af00}.terminal .xterm-color-35{color:#00af5f}.terminal .xterm-bg-color-35{background-color:#00af5f}.terminal .xterm-color-36{color:#00af87}.terminal .xterm-bg-color-36{background-color:#00af87}.terminal .xterm-color-37{color:#00afaf}.terminal .xterm-bg-color-37{background-color:#00afaf}.terminal .xterm-color-38{color:#00afd7}.terminal .xterm-bg-color-38{background-color:#00afd7}.terminal .xterm-color-39{color:#00afff}.terminal .xterm-bg-color-39{background-color:#00afff}.terminal .xterm-color-40{color:#00d700}.terminal .xterm-bg-color-40{background-color:#00d700}.terminal .xterm-color-41{color:#00d75f}.terminal .xterm-bg-color-41{background-color:#00d75f}.terminal .xterm-color-42{color:#00d787}.terminal .xterm-bg-color-42{background-color:#00d787}.terminal .xterm-color-43{color:#00d7af}.terminal .xterm-bg-color-43{background-color:#00d7af}.terminal .xterm-color-44{color:#00d7d7}.terminal .xterm-bg-color-44{background-color:#00d7d7}.terminal .xterm-color-45{color:#00d7ff}.terminal .xterm-bg-color-45{background-color:#00d7ff}.terminal .xterm-color-46{color:#0f0}.terminal .xterm-bg-color-46{background-color:#0f0}.terminal .xterm-color-47{color:#00ff5f}.terminal .xterm-bg-color-47{background-color:#00ff5f}.terminal .xterm-color-48{color:#00ff87}.terminal .xterm-bg-color-48{background-color:#00ff87}.terminal .xterm-color-49{color:#00ffaf}.terminal .xterm-bg-color-49{background-color:#00ffaf}.terminal .xterm-color-50{color:#00ffd7}.terminal .xterm-bg-color-50{background-color:#00ffd7}.terminal .xterm-color-51{color:#0ff}.terminal .xterm-bg-color-51{background-color:#0ff}.terminal .xterm-color-52{color:#5f0000}.terminal .xterm-bg-color-52{background-color:#5f0000}.terminal .xterm-color-53{color:#5f005f}.terminal .xterm-bg-color-53{background-color:#5f005f}.terminal .xterm-color-54{color:#5f0087}.terminal .xterm-bg-color-54{background-color:#5f0087}.terminal .xterm-color-55{color:#5f00af}.terminal .xterm-bg-color-55{background-color:#5f00af}.terminal .xterm-color-56{color:#5f00d7}.terminal .xterm-bg-color-56{background-color:#5f00d7}.terminal .xterm-color-57{color:#5f00ff}.terminal .xterm-bg-color-57{background-color:#5f00ff}.terminal .xterm-color-58{color:#5f5f00}.terminal .xterm-bg-color-58{background-color:#5f5f00}.terminal .xterm-color-59{color:#5f5f5f}.terminal .xterm-bg-color-59{background-color:#5f5f5f}.terminal .xterm-color-60{color:#5f5f87}.terminal .xterm-bg-color-60{background-color:#5f5f87}.terminal .xterm-color-61{color:#5f5faf}.terminal .xterm-bg-color-61{background-color:#5f5faf}.terminal .xterm-color-62{color:#5f5fd7}.terminal .xterm-bg-color-62{background-color:#5f5fd7}.terminal .xterm-color-63{color:#5f5fff}.terminal .xterm-bg-color-63{background-color:#5f5fff}.terminal .xterm-color-64{color:#5f8700}.terminal .xterm-bg-color-64{background-color:#5f8700}.terminal .xterm-color-65{color:#5f875f}.terminal .xterm-bg-color-65{background-color:#5f875f}.terminal .xterm-color-66{color:#5f8787}.terminal .xterm-bg-color-66{background-color:#5f8787}.terminal .xterm-color-67{color:#5f87af}.terminal .xterm-bg-color-67{background-color:#5f87af}.terminal .xterm-color-68{color:#5f87d7}.terminal .xterm-bg-color-68{background-color:#5f87d7}.terminal .xterm-color-69{color:#5f87ff}.terminal .xterm-bg-color-69{background-color:#5f87ff}.terminal .xterm-color-70{color:#5faf00}.terminal .xterm-bg-color-70{background-color:#5faf00}.terminal .xterm-color-71{color:#5faf5f}.terminal .xterm-bg-color-71{background-color:#5faf5f}.terminal .xterm-color-72{color:#5faf87}.terminal .xterm-bg-color-72{background-color:#5faf87}.terminal .xterm-color-73{color:#5fafaf}.terminal .xterm-bg-color-73{background-color:#5fafaf}.terminal .xterm-color-74{color:#5fafd7}.terminal .xterm-bg-color-74{background-color:#5fafd7}.terminal .xterm-color-75{color:#5fafff}.terminal .xterm-bg-color-75{background-color:#5fafff}.terminal .xterm-color-76{color:#5fd700}.terminal .xterm-bg-color-76{background-color:#5fd700}.terminal .xterm-color-77{color:#5fd75f}.terminal .xterm-bg-color-77{background-color:#5fd75f}.terminal .xterm-color-78{color:#5fd787}.terminal .xterm-bg-color-78{background-color:#5fd787}.terminal .xterm-color-79{color:#5fd7af}.terminal .xterm-bg-color-79{background-color:#5fd7af}.terminal .xterm-color-80{color:#5fd7d7}.terminal .xterm-bg-color-80{background-color:#5fd7d7}.terminal .xterm-color-81{color:#5fd7ff}.terminal .xterm-bg-color-81{background-color:#5fd7ff}.terminal .xterm-color-82{color:#5fff00}.terminal .xterm-bg-color-82{background-color:#5fff00}.terminal .xterm-color-83{color:#5fff5f}.terminal .xterm-bg-color-83{background-color:#5fff5f}.terminal .xterm-color-84{color:#5fff87}.terminal .xterm-bg-color-84{background-color:#5fff87}.terminal .xterm-color-85{color:#5fffaf}.terminal .xterm-bg-color-85{background-color:#5fffaf}.terminal .xterm-color-86{color:#5fffd7}.terminal .xterm-bg-color-86{background-color:#5fffd7}.terminal .xterm-color-87{color:#5fffff}.terminal .xterm-bg-color-87{background-color:#5fffff}.terminal .xterm-color-88{color:#870000}.terminal .xterm-bg-color-88{background-color:#870000}.terminal .xterm-color-89{color:#87005f}.terminal .xterm-bg-color-89{background-color:#87005f}.terminal .xterm-color-90{color:#870087}.terminal .xterm-bg-color-90{background-color:#870087}.terminal .xterm-color-91{color:#8700af}.terminal .xterm-bg-color-91{background-color:#8700af}.terminal .xterm-color-92{color:#8700d7}.terminal .xterm-bg-color-92{background-color:#8700d7}.terminal .xterm-color-93{color:#8700ff}.terminal .xterm-bg-color-93{background-color:#8700ff}.terminal .xterm-color-94{color:#875f00}.terminal .xterm-bg-color-94{background-color:#875f00}.terminal .xterm-color-95{color:#875f5f}.terminal .xterm-bg-color-95{background-color:#875f5f}.terminal .xterm-color-96{color:#875f87}.terminal .xterm-bg-color-96{background-color:#875f87}.terminal .xterm-color-97{color:#875faf}.terminal .xterm-bg-color-97{background-color:#875faf}.terminal .xterm-color-98{color:#875fd7}.terminal .xterm-bg-color-98{background-color:#875fd7}.terminal .xterm-color-99{color:#875fff}.terminal .xterm-bg-color-99{background-color:#875fff}.terminal .xterm-color-100{color:#878700}.terminal .xterm-bg-color-100{background-color:#878700}.terminal .xterm-color-101{color:#87875f}.terminal .xterm-bg-color-101{background-color:#87875f}.terminal .xterm-color-102{color:#878787}.terminal .xterm-bg-color-102{background-color:#878787}.terminal .xterm-color-103{color:#8787af}.terminal .xterm-bg-color-103{background-color:#8787af}.terminal .xterm-color-104{color:#8787d7}.terminal .xterm-bg-color-104{background-color:#8787d7}.terminal .xterm-color-105{color:#8787ff}.terminal .xterm-bg-color-105{background-color:#8787ff}.terminal .xterm-color-106{color:#87af00}.terminal .xterm-bg-color-106{background-color:#87af00}.terminal .xterm-color-107{color:#87af5f}.terminal .xterm-bg-color-107{background-color:#87af5f}.terminal .xterm-color-108{color:#87af87}.terminal .xterm-bg-color-108{background-color:#87af87}.terminal .xterm-color-109{color:#87afaf}.terminal .xterm-bg-color-109{background-color:#87afaf}.terminal .xterm-color-110{color:#87afd7}.terminal .xterm-bg-color-110{background-color:#87afd7}.terminal .xterm-color-111{color:#87afff}.terminal .xterm-bg-color-111{background-color:#87afff}.terminal .xterm-color-112{color:#87d700}.terminal .xterm-bg-color-112{background-color:#87d700}.terminal .xterm-color-113{color:#87d75f}.terminal .xterm-bg-color-113{background-color:#87d75f}.terminal .xterm-color-114{color:#87d787}.terminal .xterm-bg-color-114{background-color:#87d787}.terminal .xterm-color-115{color:#87d7af}.terminal .xterm-bg-color-115{background-color:#87d7af}.terminal .xterm-color-116{color:#87d7d7}.terminal .xterm-bg-color-116{background-color:#87d7d7}.terminal .xterm-color-117{color:#87d7ff}.terminal .xterm-bg-color-117{background-color:#87d7ff}.terminal .xterm-color-118{color:#87ff00}.terminal .xterm-bg-color-118{background-color:#87ff00}.terminal .xterm-color-119{color:#87ff5f}.terminal .xterm-bg-color-119{background-color:#87ff5f}.terminal .xterm-color-120{color:#87ff87}.terminal .xterm-bg-color-120{background-color:#87ff87}.terminal .xterm-color-121{color:#87ffaf}.terminal .xterm-bg-color-121{background-color:#87ffaf}.terminal .xterm-color-122{color:#87ffd7}.terminal .xterm-bg-color-122{background-color:#87ffd7}.terminal .xterm-color-123{color:#87ffff}.terminal .xterm-bg-color-123{background-color:#87ffff}.terminal .xterm-color-124{color:#af0000}.terminal .xterm-bg-color-124{background-color:#af0000}.terminal .xterm-color-125{color:#af005f}.terminal .xterm-bg-color-125{background-color:#af005f}.terminal .xterm-color-126{color:#af0087}.terminal .xterm-bg-color-126{background-color:#af0087}.terminal .xterm-color-127{color:#af00af}.terminal .xterm-bg-color-127{background-color:#af00af}.terminal .xterm-color-128{color:#af00d7}.terminal .xterm-bg-color-128{background-color:#af00d7}.terminal .xterm-color-129{color:#af00ff}.terminal .xterm-bg-color-129{background-color:#af00ff}.terminal .xterm-color-130{color:#af5f00}.terminal .xterm-bg-color-130{background-color:#af5f00}.terminal .xterm-color-131{color:#af5f5f}.terminal .xterm-bg-color-131{background-color:#af5f5f}.terminal .xterm-color-132{color:#af5f87}.terminal .xterm-bg-color-132{background-color:#af5f87}.terminal .xterm-color-133{color:#af5faf}.terminal .xterm-bg-color-133{background-color:#af5faf}.terminal .xterm-color-134{color:#af5fd7}.terminal .xterm-bg-color-134{background-color:#af5fd7}.terminal .xterm-color-135{color:#af5fff}.terminal .xterm-bg-color-135{background-color:#af5fff}.terminal .xterm-color-136{color:#af8700}.terminal .xterm-bg-color-136{background-color:#af8700}.terminal .xterm-color-137{color:#af875f}.terminal .xterm-bg-color-137{background-color:#af875f}.terminal .xterm-color-138{color:#af8787}.terminal .xterm-bg-color-138{background-color:#af8787}.terminal .xterm-color-139{color:#af87af}.terminal .xterm-bg-color-139{background-color:#af87af}.terminal .xterm-color-140{color:#af87d7}.terminal .xterm-bg-color-140{background-color:#af87d7}.terminal .xterm-color-141{color:#af87ff}.terminal .xterm-bg-color-141{background-color:#af87ff}.terminal .xterm-color-142{color:#afaf00}.terminal .xterm-bg-color-142{background-color:#afaf00}.terminal .xterm-color-143{color:#afaf5f}.terminal .xterm-bg-color-143{background-color:#afaf5f}.terminal .xterm-color-144{color:#afaf87}.terminal .xterm-bg-color-144{background-color:#afaf87}.terminal .xterm-color-145{color:#afafaf}.terminal .xterm-bg-color-145{background-color:#afafaf}.terminal .xterm-color-146{color:#afafd7}.terminal .xterm-bg-color-146{background-color:#afafd7}.terminal .xterm-color-147{color:#afafff}.terminal .xterm-bg-color-147{background-color:#afafff}.terminal .xterm-color-148{color:#afd700}.terminal .xterm-bg-color-148{background-color:#afd700}.terminal .xterm-color-149{color:#afd75f}.terminal .xterm-bg-color-149{background-color:#afd75f}.terminal .xterm-color-150{color:#afd787}.terminal .xterm-bg-color-150{background-color:#afd787}.terminal .xterm-color-151{color:#afd7af}.terminal .xterm-bg-color-151{background-color:#afd7af}.terminal .xterm-color-152{color:#afd7d7}.terminal .xterm-bg-color-152{background-color:#afd7d7}.terminal .xterm-color-153{color:#afd7ff}.terminal .xterm-bg-color-153{background-color:#afd7ff}.terminal .xterm-color-154{color:#afff00}.terminal .xterm-bg-color-154{background-color:#afff00}.terminal .xterm-color-155{color:#afff5f}.terminal .xterm-bg-color-155{background-color:#afff5f}.terminal .xterm-color-156{color:#afff87}.terminal .xterm-bg-color-156{background-color:#afff87}.terminal .xterm-color-157{color:#afffaf}.terminal .xterm-bg-color-157{background-color:#afffaf}.terminal .xterm-color-158{color:#afffd7}.terminal .xterm-bg-color-158{background-color:#afffd7}.terminal .xterm-color-159{color:#afffff}.terminal .xterm-bg-color-159{background-color:#afffff}.terminal .xterm-color-160{color:#d70000}.terminal .xterm-bg-color-160{background-color:#d70000}.terminal .xterm-color-161{color:#d7005f}.terminal .xterm-bg-color-161{background-color:#d7005f}.terminal .xterm-color-162{color:#d70087}.terminal .xterm-bg-color-162{background-color:#d70087}.terminal .xterm-color-163{color:#d700af}.terminal .xterm-bg-color-163{background-color:#d700af}.terminal .xterm-color-164{color:#d700d7}.terminal .xterm-bg-color-164{background-color:#d700d7}.terminal .xterm-color-165{color:#d700ff}.terminal .xterm-bg-color-165{background-color:#d700ff}.terminal .xterm-color-166{color:#d75f00}.terminal .xterm-bg-color-166{background-color:#d75f00}.terminal .xterm-color-167{color:#d75f5f}.terminal .xterm-bg-color-167{background-color:#d75f5f}.terminal .xterm-color-168{color:#d75f87}.terminal .xterm-bg-color-168{background-color:#d75f87}.terminal .xterm-color-169{color:#d75faf}.terminal .xterm-bg-color-169{background-color:#d75faf}.terminal .xterm-color-170{color:#d75fd7}.terminal .xterm-bg-color-170{background-color:#d75fd7}.terminal .xterm-color-171{color:#d75fff}.terminal .xterm-bg-color-171{background-color:#d75fff}.terminal .xterm-color-172{color:#d78700}.terminal .xterm-bg-color-172{background-color:#d78700}.terminal .xterm-color-173{color:#d7875f}.terminal .xterm-bg-color-173{background-color:#d7875f}.terminal .xterm-color-174{color:#d78787}.terminal .xterm-bg-color-174{background-color:#d78787}.terminal .xterm-color-175{color:#d787af}.terminal .xterm-bg-color-175{background-color:#d787af}.terminal .xterm-color-176{color:#d787d7}.terminal .xterm-bg-color-176{background-color:#d787d7}.terminal .xterm-color-177{color:#d787ff}.terminal .xterm-bg-color-177{background-color:#d787ff}.terminal .xterm-color-178{color:#d7af00}.terminal .xterm-bg-color-178{background-color:#d7af00}.terminal .xterm-color-179{color:#d7af5f}.terminal .xterm-bg-color-179{background-color:#d7af5f}.terminal .xterm-color-180{color:#d7af87}.terminal .xterm-bg-color-180{background-color:#d7af87}.terminal .xterm-color-181{color:#d7afaf}.terminal .xterm-bg-color-181{background-color:#d7afaf}.terminal .xterm-color-182{color:#d7afd7}.terminal .xterm-bg-color-182{background-color:#d7afd7}.terminal .xterm-color-183{color:#d7afff}.terminal .xterm-bg-color-183{background-color:#d7afff}.terminal .xterm-color-184{color:#d7d700}.terminal .xterm-bg-color-184{background-color:#d7d700}.terminal .xterm-color-185{color:#d7d75f}.terminal .xterm-bg-color-185{background-color:#d7d75f}.terminal .xterm-color-186{color:#d7d787}.terminal .xterm-bg-color-186{background-color:#d7d787}.terminal .xterm-color-187{color:#d7d7af}.terminal .xterm-bg-color-187{background-color:#d7d7af}.terminal .xterm-color-188{color:#d7d7d7}.terminal .xterm-bg-color-188{background-color:#d7d7d7}.terminal .xterm-color-189{color:#d7d7ff}.terminal .xterm-bg-color-189{background-color:#d7d7ff}.terminal .xterm-color-190{color:#d7ff00}.terminal .xterm-bg-color-190{background-color:#d7ff00}.terminal .xterm-color-191{color:#d7ff5f}.terminal .xterm-bg-color-191{background-color:#d7ff5f}.terminal .xterm-color-192{color:#d7ff87}.terminal .xterm-bg-color-192{background-color:#d7ff87}.terminal .xterm-color-193{color:#d7ffaf}.terminal .xterm-bg-color-193{background-color:#d7ffaf}.terminal .xterm-color-194{color:#d7ffd7}.terminal .xterm-bg-color-194{background-color:#d7ffd7}.terminal .xterm-color-195{color:#d7ffff}.terminal .xterm-bg-color-195{background-color:#d7ffff}.terminal .xterm-color-196{color:red}.terminal .xterm-bg-color-196{background-color:red}.terminal .xterm-color-197{color:#ff005f}.terminal .xterm-bg-color-197{background-color:#ff005f}.terminal .xterm-color-198{color:#ff0087}.terminal .xterm-bg-color-198{background-color:#ff0087}.terminal .xterm-color-199{color:#ff00af}.terminal .xterm-bg-color-199{background-color:#ff00af}.terminal .xterm-color-200{color:#ff00d7}.terminal .xterm-bg-color-200{background-color:#ff00d7}.terminal .xterm-color-201{color:#f0f}.terminal .xterm-bg-color-201{background-color:#f0f}.terminal .xterm-color-202{color:#ff5f00}.terminal .xterm-bg-color-202{background-color:#ff5f00}.terminal .xterm-color-203{color:#ff5f5f}.terminal .xterm-bg-color-203{background-color:#ff5f5f}.terminal .xterm-color-204{color:#ff5f87}.terminal .xterm-bg-color-204{background-color:#ff5f87}.terminal .xterm-color-205{color:#ff5faf}.terminal .xterm-bg-color-205{background-color:#ff5faf}.terminal .xterm-color-206{color:#ff5fd7}.terminal .xterm-bg-color-206{background-color:#ff5fd7}.terminal .xterm-color-207{color:#ff5fff}.terminal .xterm-bg-color-207{background-color:#ff5fff}.terminal .xterm-color-208{color:#ff8700}.terminal .xterm-bg-color-208{background-color:#ff8700}.terminal .xterm-color-209{color:#ff875f}.terminal .xterm-bg-color-209{background-color:#ff875f}.terminal .xterm-color-210{color:#ff8787}.terminal .xterm-bg-color-210{background-color:#ff8787}.terminal .xterm-color-211{color:#ff87af}.terminal .xterm-bg-color-211{background-color:#ff87af}.terminal .xterm-color-212{color:#ff87d7}.terminal .xterm-bg-color-212{background-color:#ff87d7}.terminal .xterm-color-213{color:#ff87ff}.terminal .xterm-bg-color-213{background-color:#ff87ff}.terminal .xterm-color-214{color:#ffaf00}.terminal .xterm-bg-color-214{background-color:#ffaf00}.terminal .xterm-color-215{color:#ffaf5f}.terminal .xterm-bg-color-215{background-color:#ffaf5f}.terminal .xterm-color-216{color:#ffaf87}.terminal .xterm-bg-color-216{background-color:#ffaf87}.terminal .xterm-color-217{color:#ffafaf}.terminal .xterm-bg-color-217{background-color:#ffafaf}.terminal .xterm-color-218{color:#ffafd7}.terminal .xterm-bg-color-218{background-color:#ffafd7}.terminal .xterm-color-219{color:#ffafff}.terminal .xterm-bg-color-219{background-color:#ffafff}.terminal .xterm-color-220{color:gold}.terminal .xterm-bg-color-220{background-color:gold}.terminal .xterm-color-221{color:#ffd75f}.terminal .xterm-bg-color-221{background-color:#ffd75f}.terminal .xterm-color-222{color:#ffd787}.terminal .xterm-bg-color-222{background-color:#ffd787}.terminal .xterm-color-223{color:#ffd7af}.terminal .xterm-bg-color-223{background-color:#ffd7af}.terminal .xterm-color-224{color:#ffd7d7}.terminal .xterm-bg-color-224{background-color:#ffd7d7}.terminal .xterm-color-225{color:#ffd7ff}.terminal .xterm-bg-color-225{background-color:#ffd7ff}.terminal .xterm-color-226{color:#ff0}.terminal .xterm-bg-color-226{background-color:#ff0}.terminal .xterm-color-227{color:#ffff5f}.terminal .xterm-bg-color-227{background-color:#ffff5f}.terminal .xterm-color-228{color:#ffff87}.terminal .xterm-bg-color-228{background-color:#ffff87}.terminal .xterm-color-229{color:#ffffaf}.terminal .xterm-bg-color-229{background-color:#ffffaf}.terminal .xterm-color-230{color:#ffffd7}.terminal .xterm-bg-color-230{background-color:#ffffd7}.terminal .xterm-color-231{color:#fff}.terminal .xterm-bg-color-231{background-color:#fff}.terminal .xterm-color-232{color:#080808}.terminal .xterm-bg-color-232{background-color:#080808}.terminal .xterm-color-233{color:#121212}.terminal .xterm-bg-color-233{background-color:#121212}.terminal .xterm-color-234{color:#1c1c1c}.terminal .xterm-bg-color-234{background-color:#1c1c1c}.terminal .xterm-color-235{color:#262626}.terminal .xterm-bg-color-235{background-color:#262626}.terminal .xterm-color-236{color:#303030}.terminal .xterm-bg-color-236{background-color:#303030}.terminal .xterm-color-237{color:#3a3a3a}.terminal .xterm-bg-color-237{background-color:#3a3a3a}.terminal .xterm-color-238{color:#444}.terminal .xterm-bg-color-238{background-color:#444}.terminal .xterm-color-239{color:#4e4e4e}.terminal .xterm-bg-color-239{background-color:#4e4e4e}.terminal .xterm-color-240{color:#585858}.terminal .xterm-bg-color-240{background-color:#585858}.terminal .xterm-color-241{color:#626262}.terminal .xterm-bg-color-241{background-color:#626262}.terminal .xterm-color-242{color:#6c6c6c}.terminal .xterm-bg-color-242{background-color:#6c6c6c}.terminal .xterm-color-243{color:#767676}.terminal .xterm-bg-color-243{background-color:#767676}.terminal .xterm-color-244{color:gray}.terminal .xterm-bg-color-244{background-color:gray}.terminal .xterm-color-245{color:#8a8a8a}.terminal .xterm-bg-color-245{background-color:#8a8a8a}.terminal .xterm-color-246{color:#949494}.terminal .xterm-bg-color-246{background-color:#949494}.terminal .xterm-color-247{color:#9e9e9e}.terminal .xterm-bg-color-247{background-color:#9e9e9e}.terminal .xterm-color-248{color:#a8a8a8}.terminal .xterm-bg-color-248{background-color:#a8a8a8}.terminal .xterm-color-249{color:#b2b2b2}.terminal .xterm-bg-color-249{background-color:#b2b2b2}.terminal .xterm-color-250{color:#bcbcbc}.terminal .xterm-bg-color-250{background-color:#bcbcbc}.terminal .xterm-color-251{color:#c6c6c6}.terminal .xterm-bg-color-251{background-color:#c6c6c6}.terminal .xterm-color-252{color:#d0d0d0}.terminal .xterm-bg-color-252{background-color:#d0d0d0}.terminal .xterm-color-253{color:#dadada}.terminal .xterm-bg-color-253{background-color:#dadada}.terminal .xterm-color-254{color:#e4e4e4}.terminal .xterm-bg-color-254{background-color:#e4e4e4}.terminal .xterm-color-255{color:#eee}.terminal .xterm-bg-color-255{background-color:#eee}</style>
+    <style>.terminal{background-color:#000;color:#fff;font-family:courier-new,courier,monospace;font-feature-settings:"liga" 0;position:relative}.terminal.focus,.terminal:focus{outline:none}.terminal .xterm-helpers{position:absolute;top:0}.terminal .xterm-helper-textarea{position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-10;white-space:nowrap;overflow:hidden;resize:none}.terminal:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar) .terminal-cursor{background-color:#fff;color:#000}.terminal:not(.focus) .terminal-cursor{outline:1px solid #fff;outline-offset:-1px;background-color:transparent}.terminal:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar).focus.xterm-cursor-blink .terminal-cursor{animation:xterm-cursor-blink 1.2s infinite step-end}@keyframes xterm-cursor-blink{0%{background-color:#fff;color:#000}50%{background-color:transparent;color:#fff}}.terminal.xterm-cursor-style-bar .terminal-cursor,.terminal.xterm-cursor-style-underline .terminal-cursor{position:relative}.terminal.xterm-cursor-style-bar .terminal-cursor::before,.terminal.xterm-cursor-style-underline .terminal-cursor::before{content:"";display:block;position:absolute;background-color:#fff}.terminal.xterm-cursor-style-bar .terminal-cursor::before{top:0;bottom:0;left:0;width:1px}.terminal.xterm-cursor-style-underline .terminal-cursor::before{bottom:0;left:0;right:0;height:1px}.terminal.xterm-cursor-style-bar.focus.xterm-cursor-blink .terminal-cursor::before,.terminal.xterm-cursor-style-underline.focus.xterm-cursor-blink .terminal-cursor::before{animation:xterm-cursor-non-bar-blink 1.2s infinite step-end}@keyframes xterm-cursor-non-bar-blink{0%{background-color:#fff}50%{background-color:transparent}}.terminal .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.terminal .composition-view.active{display:block}.terminal .xterm-viewport{background-color:#000;overflow-y:scroll}.terminal .xterm-wide-char{display:inline-block}.terminal .xterm-rows{position:absolute;left:0;top:0}.terminal .xterm-rows>div{white-space:nowrap}.terminal .xterm-scroll-area{visibility:hidden}.terminal .xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;left:-9999em}.terminal .xterm-bold{font-weight:700}.terminal .xterm-underline{text-decoration:underline}.terminal .xterm-blink{text-decoration:blink}.terminal .xterm-hidden{visibility:hidden}.terminal .xterm-color-0{color:#2e3436}.terminal .xterm-bg-color-0{background-color:#2e3436}.terminal .xterm-color-1{color:#c00}.terminal .xterm-bg-color-1{background-color:#c00}.terminal .xterm-color-2{color:#4e9a06}.terminal .xterm-bg-color-2{background-color:#4e9a06}.terminal .xterm-color-3{color:#c4a000}.terminal .xterm-bg-color-3{background-color:#c4a000}.terminal .xterm-color-4{color:#3465a4}.terminal .xterm-bg-color-4{background-color:#3465a4}.terminal .xterm-color-5{color:#75507b}.terminal .xterm-bg-color-5{background-color:#75507b}.terminal .xterm-color-6{color:#06989a}.terminal .xterm-bg-color-6{background-color:#06989a}.terminal .xterm-color-7{color:#d3d7cf}.terminal .xterm-bg-color-7{background-color:#d3d7cf}.terminal .xterm-color-8{color:#555753}.terminal .xterm-bg-color-8{background-color:#555753}.terminal .xterm-color-9{color:#ef2929}.terminal .xterm-bg-color-9{background-color:#ef2929}.terminal .xterm-color-10{color:#8ae234}.terminal .xterm-bg-color-10{background-color:#8ae234}.terminal .xterm-color-11{color:#fce94f}.terminal .xterm-bg-color-11{background-color:#fce94f}.terminal .xterm-color-12{color:#729fcf}.terminal .xterm-bg-color-12{background-color:#729fcf}.terminal .xterm-color-13{color:#ad7fa8}.terminal .xterm-bg-color-13{background-color:#ad7fa8}.terminal .xterm-color-14{color:#34e2e2}.terminal .xterm-bg-color-14{background-color:#34e2e2}.terminal .xterm-color-15{color:#eeeeec}.terminal .xterm-bg-color-15{background-color:#eeeeec}.terminal .xterm-color-16{color:#000}.terminal .xterm-bg-color-16{background-color:#000}.terminal .xterm-color-17{color:#00005f}.terminal .xterm-bg-color-17{background-color:#00005f}.terminal .xterm-color-18{color:#000087}.terminal .xterm-bg-color-18{background-color:#000087}.terminal .xterm-color-19{color:#0000af}.terminal .xterm-bg-color-19{background-color:#0000af}.terminal .xterm-color-20{color:#0000d7}.terminal .xterm-bg-color-20{background-color:#0000d7}.terminal .xterm-color-21{color:#00f}.terminal .xterm-bg-color-21{background-color:#00f}.terminal .xterm-color-22{color:#005f00}.terminal .xterm-bg-color-22{background-color:#005f00}.terminal .xterm-color-23{color:#005f5f}.terminal .xterm-bg-color-23{background-color:#005f5f}.terminal .xterm-color-24{color:#005f87}.terminal .xterm-bg-color-24{background-color:#005f87}.terminal .xterm-color-25{color:#005faf}.terminal .xterm-bg-color-25{background-color:#005faf}.terminal .xterm-color-26{color:#005fd7}.terminal .xterm-bg-color-26{background-color:#005fd7}.terminal .xterm-color-27{color:#005fff}.terminal .xterm-bg-color-27{background-color:#005fff}.terminal .xterm-color-28{color:#008700}.terminal .xterm-bg-color-28{background-color:#008700}.terminal .xterm-color-29{color:#00875f}.terminal .xterm-bg-color-29{background-color:#00875f}.terminal .xterm-color-30{color:#008787}.terminal .xterm-bg-color-30{background-color:#008787}.terminal .xterm-color-31{color:#0087af}.terminal .xterm-bg-color-31{background-color:#0087af}.terminal .xterm-color-32{color:#0087d7}.terminal .xterm-bg-color-32{background-color:#0087d7}.terminal .xterm-color-33{color:#0087ff}.terminal .xterm-bg-color-33{background-color:#0087ff}.terminal .xterm-color-34{color:#00af00}.terminal .xterm-bg-color-34{background-color:#00af00}.terminal .xterm-color-35{color:#00af5f}.terminal .xterm-bg-color-35{background-color:#00af5f}.terminal .xterm-color-36{color:#00af87}.terminal .xterm-bg-color-36{background-color:#00af87}.terminal .xterm-color-37{color:#00afaf}.terminal .xterm-bg-color-37{background-color:#00afaf}.terminal .xterm-color-38{color:#00afd7}.terminal .xterm-bg-color-38{background-color:#00afd7}.terminal .xterm-color-39{color:#00afff}.terminal .xterm-bg-color-39{background-color:#00afff}.terminal .xterm-color-40{color:#00d700}.terminal .xterm-bg-color-40{background-color:#00d700}.terminal .xterm-color-41{color:#00d75f}.terminal .xterm-bg-color-41{background-color:#00d75f}.terminal .xterm-color-42{color:#00d787}.terminal .xterm-bg-color-42{background-color:#00d787}.terminal .xterm-color-43{color:#00d7af}.terminal .xterm-bg-color-43{background-color:#00d7af}.terminal .xterm-color-44{color:#00d7d7}.terminal .xterm-bg-color-44{background-color:#00d7d7}.terminal .xterm-color-45{color:#00d7ff}.terminal .xterm-bg-color-45{background-color:#00d7ff}.terminal .xterm-color-46{color:#0f0}.terminal .xterm-bg-color-46{background-color:#0f0}.terminal .xterm-color-47{color:#00ff5f}.terminal .xterm-bg-color-47{background-color:#00ff5f}.terminal .xterm-color-48{color:#00ff87}.terminal .xterm-bg-color-48{background-color:#00ff87}.terminal .xterm-color-49{color:#00ffaf}.terminal .xterm-bg-color-49{background-color:#00ffaf}.terminal .xterm-color-50{color:#00ffd7}.terminal .xterm-bg-color-50{background-color:#00ffd7}.terminal .xterm-color-51{color:#0ff}.terminal .xterm-bg-color-51{background-color:#0ff}.terminal .xterm-color-52{color:#5f0000}.terminal .xterm-bg-color-52{background-color:#5f0000}.terminal .xterm-color-53{color:#5f005f}.terminal .xterm-bg-color-53{background-color:#5f005f}.terminal .xterm-color-54{color:#5f0087}.terminal .xterm-bg-color-54{background-color:#5f0087}.terminal .xterm-color-55{color:#5f00af}.terminal .xterm-bg-color-55{background-color:#5f00af}.terminal .xterm-color-56{color:#5f00d7}.terminal .xterm-bg-color-56{background-color:#5f00d7}.terminal .xterm-color-57{color:#5f00ff}.terminal .xterm-bg-color-57{background-color:#5f00ff}.terminal .xterm-color-58{color:#5f5f00}.terminal .xterm-bg-color-58{background-color:#5f5f00}.terminal .xterm-color-59{color:#5f5f5f}.terminal .xterm-bg-color-59{background-color:#5f5f5f}.terminal .xterm-color-60{color:#5f5f87}.terminal .xterm-bg-color-60{background-color:#5f5f87}.terminal .xterm-color-61{color:#5f5faf}.terminal .xterm-bg-color-61{background-color:#5f5faf}.terminal .xterm-color-62{color:#5f5fd7}.terminal .xterm-bg-color-62{background-color:#5f5fd7}.terminal .xterm-color-63{color:#5f5fff}.terminal .xterm-bg-color-63{background-color:#5f5fff}.terminal .xterm-color-64{color:#5f8700}.terminal .xterm-bg-color-64{background-color:#5f8700}.terminal .xterm-color-65{color:#5f875f}.terminal .xterm-bg-color-65{background-color:#5f875f}.terminal .xterm-color-66{color:#5f8787}.terminal .xterm-bg-color-66{background-color:#5f8787}.terminal .xterm-color-67{color:#5f87af}.terminal .xterm-bg-color-67{background-color:#5f87af}.terminal .xterm-color-68{color:#5f87d7}.terminal .xterm-bg-color-68{background-color:#5f87d7}.terminal .xterm-color-69{color:#5f87ff}.terminal .xterm-bg-color-69{background-color:#5f87ff}.terminal .xterm-color-70{color:#5faf00}.terminal .xterm-bg-color-70{background-color:#5faf00}.terminal .xterm-color-71{color:#5faf5f}.terminal .xterm-bg-color-71{background-color:#5faf5f}.terminal .xterm-color-72{color:#5faf87}.terminal .xterm-bg-color-72{background-color:#5faf87}.terminal .xterm-color-73{color:#5fafaf}.terminal .xterm-bg-color-73{background-color:#5fafaf}.terminal .xterm-color-74{color:#5fafd7}.terminal .xterm-bg-color-74{background-color:#5fafd7}.terminal .xterm-color-75{color:#5fafff}.terminal .xterm-bg-color-75{background-color:#5fafff}.terminal .xterm-color-76{color:#5fd700}.terminal .xterm-bg-color-76{background-color:#5fd700}.terminal .xterm-color-77{color:#5fd75f}.terminal .xterm-bg-color-77{background-color:#5fd75f}.terminal .xterm-color-78{color:#5fd787}.terminal .xterm-bg-color-78{background-color:#5fd787}.terminal .xterm-color-79{color:#5fd7af}.terminal .xterm-bg-color-79{background-color:#5fd7af}.terminal .xterm-color-80{color:#5fd7d7}.terminal .xterm-bg-color-80{background-color:#5fd7d7}.terminal .xterm-color-81{color:#5fd7ff}.terminal .xterm-bg-color-81{background-color:#5fd7ff}.terminal .xterm-color-82{color:#5fff00}.terminal .xterm-bg-color-82{background-color:#5fff00}.terminal .xterm-color-83{color:#5fff5f}.terminal .xterm-bg-color-83{background-color:#5fff5f}.terminal .xterm-color-84{color:#5fff87}.terminal .xterm-bg-color-84{background-color:#5fff87}.terminal .xterm-color-85{color:#5fffaf}.terminal .xterm-bg-color-85{background-color:#5fffaf}.terminal .xterm-color-86{color:#5fffd7}.terminal .xterm-bg-color-86{background-color:#5fffd7}.terminal .xterm-color-87{color:#5fffff}.terminal .xterm-bg-color-87{background-color:#5fffff}.terminal .xterm-color-88{color:#870000}.terminal .xterm-bg-color-88{background-color:#870000}.terminal .xterm-color-89{color:#87005f}.terminal .xterm-bg-color-89{background-color:#87005f}.terminal .xterm-color-90{color:#870087}.terminal .xterm-bg-color-90{background-color:#870087}.terminal .xterm-color-91{color:#8700af}.terminal .xterm-bg-color-91{background-color:#8700af}.terminal .xterm-color-92{color:#8700d7}.terminal .xterm-bg-color-92{background-color:#8700d7}.terminal .xterm-color-93{color:#8700ff}.terminal .xterm-bg-color-93{background-color:#8700ff}.terminal .xterm-color-94{color:#875f00}.terminal .xterm-bg-color-94{background-color:#875f00}.terminal .xterm-color-95{color:#875f5f}.terminal .xterm-bg-color-95{background-color:#875f5f}.terminal .xterm-color-96{color:#875f87}.terminal .xterm-bg-color-96{background-color:#875f87}.terminal .xterm-color-97{color:#875faf}.terminal .xterm-bg-color-97{background-color:#875faf}.terminal .xterm-color-98{color:#875fd7}.terminal .xterm-bg-color-98{background-color:#875fd7}.terminal .xterm-color-99{color:#875fff}.terminal .xterm-bg-color-99{background-color:#875fff}.terminal .xterm-color-100{color:#878700}.terminal .xterm-bg-color-100{background-color:#878700}.terminal .xterm-color-101{color:#87875f}.terminal .xterm-bg-color-101{background-color:#87875f}.terminal .xterm-color-102{color:#878787}.terminal .xterm-bg-color-102{background-color:#878787}.terminal .xterm-color-103{color:#8787af}.terminal .xterm-bg-color-103{background-color:#8787af}.terminal .xterm-color-104{color:#8787d7}.terminal .xterm-bg-color-104{background-color:#8787d7}.terminal .xterm-color-105{color:#8787ff}.terminal .xterm-bg-color-105{background-color:#8787ff}.terminal .xterm-color-106{color:#87af00}.terminal .xterm-bg-color-106{background-color:#87af00}.terminal .xterm-color-107{color:#87af5f}.terminal .xterm-bg-color-107{background-color:#87af5f}.terminal .xterm-color-108{color:#87af87}.terminal .xterm-bg-color-108{background-color:#87af87}.terminal .xterm-color-109{color:#87afaf}.terminal .xterm-bg-color-109{background-color:#87afaf}.terminal .xterm-color-110{color:#87afd7}.terminal .xterm-bg-color-110{background-color:#87afd7}.terminal .xterm-color-111{color:#87afff}.terminal .xterm-bg-color-111{background-color:#87afff}.terminal .xterm-color-112{color:#87d700}.terminal .xterm-bg-color-112{background-color:#87d700}.terminal .xterm-color-113{color:#87d75f}.terminal .xterm-bg-color-113{background-color:#87d75f}.terminal .xterm-color-114{color:#87d787}.terminal .xterm-bg-color-114{background-color:#87d787}.terminal .xterm-color-115{color:#87d7af}.terminal .xterm-bg-color-115{background-color:#87d7af}.terminal .xterm-color-116{color:#87d7d7}.terminal .xterm-bg-color-116{background-color:#87d7d7}.terminal .xterm-color-117{color:#87d7ff}.terminal .xterm-bg-color-117{background-color:#87d7ff}.terminal .xterm-color-118{color:#87ff00}.terminal .xterm-bg-color-118{background-color:#87ff00}.terminal .xterm-color-119{color:#87ff5f}.terminal .xterm-bg-color-119{background-color:#87ff5f}.terminal .xterm-color-120{color:#87ff87}.terminal .xterm-bg-color-120{background-color:#87ff87}.terminal .xterm-color-121{color:#87ffaf}.terminal .xterm-bg-color-121{background-color:#87ffaf}.terminal .xterm-color-122{color:#87ffd7}.terminal .xterm-bg-color-122{background-color:#87ffd7}.terminal .xterm-color-123{color:#87ffff}.terminal .xterm-bg-color-123{background-color:#87ffff}.terminal .xterm-color-124{color:#af0000}.terminal .xterm-bg-color-124{background-color:#af0000}.terminal .xterm-color-125{color:#af005f}.terminal .xterm-bg-color-125{background-color:#af005f}.terminal .xterm-color-126{color:#af0087}.terminal .xterm-bg-color-126{background-color:#af0087}.terminal .xterm-color-127{color:#af00af}.terminal .xterm-bg-color-127{background-color:#af00af}.terminal .xterm-color-128{color:#af00d7}.terminal .xterm-bg-color-128{background-color:#af00d7}.terminal .xterm-color-129{color:#af00ff}.terminal .xterm-bg-color-129{background-color:#af00ff}.terminal .xterm-color-130{color:#af5f00}.terminal .xterm-bg-color-130{background-color:#af5f00}.terminal .xterm-color-131{color:#af5f5f}.terminal .xterm-bg-color-131{background-color:#af5f5f}.terminal .xterm-color-132{color:#af5f87}.terminal .xterm-bg-color-132{background-color:#af5f87}.terminal .xterm-color-133{color:#af5faf}.terminal .xterm-bg-color-133{background-color:#af5faf}.terminal .xterm-color-134{color:#af5fd7}.terminal .xterm-bg-color-134{background-color:#af5fd7}.terminal .xterm-color-135{color:#af5fff}.terminal .xterm-bg-color-135{background-color:#af5fff}.terminal .xterm-color-136{color:#af8700}.terminal .xterm-bg-color-136{background-color:#af8700}.terminal .xterm-color-137{color:#af875f}.terminal .xterm-bg-color-137{background-color:#af875f}.terminal .xterm-color-138{color:#af8787}.terminal .xterm-bg-color-138{background-color:#af8787}.terminal .xterm-color-139{color:#af87af}.terminal .xterm-bg-color-139{background-color:#af87af}.terminal .xterm-color-140{color:#af87d7}.terminal .xterm-bg-color-140{background-color:#af87d7}.terminal .xterm-color-141{color:#af87ff}.terminal .xterm-bg-color-141{background-color:#af87ff}.terminal .xterm-color-142{color:#afaf00}.terminal .xterm-bg-color-142{background-color:#afaf00}.terminal .xterm-color-143{color:#afaf5f}.terminal .xterm-bg-color-143{background-color:#afaf5f}.terminal .xterm-color-144{color:#afaf87}.terminal .xterm-bg-color-144{background-color:#afaf87}.terminal .xterm-color-145{color:#afafaf}.terminal .xterm-bg-color-145{background-color:#afafaf}.terminal .xterm-color-146{color:#afafd7}.terminal .xterm-bg-color-146{background-color:#afafd7}.terminal .xterm-color-147{color:#afafff}.terminal .xterm-bg-color-147{background-color:#afafff}.terminal .xterm-color-148{color:#afd700}.terminal .xterm-bg-color-148{background-color:#afd700}.terminal .xterm-color-149{color:#afd75f}.terminal .xterm-bg-color-149{background-color:#afd75f}.terminal .xterm-color-150{color:#afd787}.terminal .xterm-bg-color-150{background-color:#afd787}.terminal .xterm-color-151{color:#afd7af}.terminal .xterm-bg-color-151{background-color:#afd7af}.terminal .xterm-color-152{color:#afd7d7}.terminal .xterm-bg-color-152{background-color:#afd7d7}.terminal .xterm-color-153{color:#afd7ff}.terminal .xterm-bg-color-153{background-color:#afd7ff}.terminal .xterm-color-154{color:#afff00}.terminal .xterm-bg-color-154{background-color:#afff00}.terminal .xterm-color-155{color:#afff5f}.terminal .xterm-bg-color-155{background-color:#afff5f}.terminal .xterm-color-156{color:#afff87}.terminal .xterm-bg-color-156{background-color:#afff87}.terminal .xterm-color-157{color:#afffaf}.terminal .xterm-bg-color-157{background-color:#afffaf}.terminal .xterm-color-158{color:#afffd7}.terminal .xterm-bg-color-158{background-color:#afffd7}.terminal .xterm-color-159{color:#afffff}.terminal .xterm-bg-color-159{background-color:#afffff}.terminal .xterm-color-160{color:#d70000}.terminal .xterm-bg-color-160{background-color:#d70000}.terminal .xterm-color-161{color:#d7005f}.terminal .xterm-bg-color-161{background-color:#d7005f}.terminal .xterm-color-162{color:#d70087}.terminal .xterm-bg-color-162{background-color:#d70087}.terminal .xterm-color-163{color:#d700af}.terminal .xterm-bg-color-163{background-color:#d700af}.terminal .xterm-color-164{color:#d700d7}.terminal .xterm-bg-color-164{background-color:#d700d7}.terminal .xterm-color-165{color:#d700ff}.terminal .xterm-bg-color-165{background-color:#d700ff}.terminal .xterm-color-166{color:#d75f00}.terminal .xterm-bg-color-166{background-color:#d75f00}.terminal .xterm-color-167{color:#d75f5f}.terminal .xterm-bg-color-167{background-color:#d75f5f}.terminal .xterm-color-168{color:#d75f87}.terminal .xterm-bg-color-168{background-color:#d75f87}.terminal .xterm-color-169{color:#d75faf}.terminal .xterm-bg-color-169{background-color:#d75faf}.terminal .xterm-color-170{color:#d75fd7}.terminal .xterm-bg-color-170{background-color:#d75fd7}.terminal .xterm-color-171{color:#d75fff}.terminal .xterm-bg-color-171{background-color:#d75fff}.terminal .xterm-color-172{color:#d78700}.terminal .xterm-bg-color-172{background-color:#d78700}.terminal .xterm-color-173{color:#d7875f}.terminal .xterm-bg-color-173{background-color:#d7875f}.terminal .xterm-color-174{color:#d78787}.terminal .xterm-bg-color-174{background-color:#d78787}.terminal .xterm-color-175{color:#d787af}.terminal .xterm-bg-color-175{background-color:#d787af}.terminal .xterm-color-176{color:#d787d7}.terminal .xterm-bg-color-176{background-color:#d787d7}.terminal .xterm-color-177{color:#d787ff}.terminal .xterm-bg-color-177{background-color:#d787ff}.terminal .xterm-color-178{color:#d7af00}.terminal .xterm-bg-color-178{background-color:#d7af00}.terminal .xterm-color-179{color:#d7af5f}.terminal .xterm-bg-color-179{background-color:#d7af5f}.terminal .xterm-color-180{color:#d7af87}.terminal .xterm-bg-color-180{background-color:#d7af87}.terminal .xterm-color-181{color:#d7afaf}.terminal .xterm-bg-color-181{background-color:#d7afaf}.terminal .xterm-color-182{color:#d7afd7}.terminal .xterm-bg-color-182{background-color:#d7afd7}.terminal .xterm-color-183{color:#d7afff}.terminal .xterm-bg-color-183{background-color:#d7afff}.terminal .xterm-color-184{color:#d7d700}.terminal .xterm-bg-color-184{background-color:#d7d700}.terminal .xterm-color-185{color:#d7d75f}.terminal .xterm-bg-color-185{background-color:#d7d75f}.terminal .xterm-color-186{color:#d7d787}.terminal .xterm-bg-color-186{background-color:#d7d787}.terminal .xterm-color-187{color:#d7d7af}.terminal .xterm-bg-color-187{background-color:#d7d7af}.terminal .xterm-color-188{color:#d7d7d7}.terminal .xterm-bg-color-188{background-color:#d7d7d7}.terminal .xterm-color-189{color:#d7d7ff}.terminal .xterm-bg-color-189{background-color:#d7d7ff}.terminal .xterm-color-190{color:#d7ff00}.terminal .xterm-bg-color-190{background-color:#d7ff00}.terminal .xterm-color-191{color:#d7ff5f}.terminal .xterm-bg-color-191{background-color:#d7ff5f}.terminal .xterm-color-192{color:#d7ff87}.terminal .xterm-bg-color-192{background-color:#d7ff87}.terminal .xterm-color-193{color:#d7ffaf}.terminal .xterm-bg-color-193{background-color:#d7ffaf}.terminal .xterm-color-194{color:#d7ffd7}.terminal .xterm-bg-color-194{background-color:#d7ffd7}.terminal .xterm-color-195{color:#d7ffff}.terminal .xterm-bg-color-195{background-color:#d7ffff}.terminal .xterm-color-196{color:red}.terminal .xterm-bg-color-196{background-color:red}.terminal .xterm-color-197{color:#ff005f}.terminal .xterm-bg-color-197{background-color:#ff005f}.terminal .xterm-color-198{color:#ff0087}.terminal .xterm-bg-color-198{background-color:#ff0087}.terminal .xterm-color-199{color:#ff00af}.terminal .xterm-bg-color-199{background-color:#ff00af}.terminal .xterm-color-200{color:#ff00d7}.terminal .xterm-bg-color-200{background-color:#ff00d7}.terminal .xterm-color-201{color:#f0f}.terminal .xterm-bg-color-201{background-color:#f0f}.terminal .xterm-color-202{color:#ff5f00}.terminal .xterm-bg-color-202{background-color:#ff5f00}.terminal .xterm-color-203{color:#ff5f5f}.terminal .xterm-bg-color-203{background-color:#ff5f5f}.terminal .xterm-color-204{color:#ff5f87}.terminal .xterm-bg-color-204{background-color:#ff5f87}.terminal .xterm-color-205{color:#ff5faf}.terminal .xterm-bg-color-205{background-color:#ff5faf}.terminal .xterm-color-206{color:#ff5fd7}.terminal .xterm-bg-color-206{background-color:#ff5fd7}.terminal .xterm-color-207{color:#ff5fff}.terminal .xterm-bg-color-207{background-color:#ff5fff}.terminal .xterm-color-208{color:#ff8700}.terminal .xterm-bg-color-208{background-color:#ff8700}.terminal .xterm-color-209{color:#ff875f}.terminal .xterm-bg-color-209{background-color:#ff875f}.terminal .xterm-color-210{color:#ff8787}.terminal .xterm-bg-color-210{background-color:#ff8787}.terminal .xterm-color-211{color:#ff87af}.terminal .xterm-bg-color-211{background-color:#ff87af}.terminal .xterm-color-212{color:#ff87d7}.terminal .xterm-bg-color-212{background-color:#ff87d7}.terminal .xterm-color-213{color:#ff87ff}.terminal .xterm-bg-color-213{background-color:#ff87ff}.terminal .xterm-color-214{color:#ffaf00}.terminal .xterm-bg-color-214{background-color:#ffaf00}.terminal .xterm-color-215{color:#ffaf5f}.terminal .xterm-bg-color-215{background-color:#ffaf5f}.terminal .xterm-color-216{color:#ffaf87}.terminal .xterm-bg-color-216{background-color:#ffaf87}.terminal .xterm-color-217{color:#ffafaf}.terminal .xterm-bg-color-217{background-color:#ffafaf}.terminal .xterm-color-218{color:#ffafd7}.terminal .xterm-bg-color-218{background-color:#ffafd7}.terminal .xterm-color-219{color:#ffafff}.terminal .xterm-bg-color-219{background-color:#ffafff}.terminal .xterm-color-220{color:gold}.terminal .xterm-bg-color-220{background-color:gold}.terminal .xterm-color-221{color:#ffd75f}.terminal .xterm-bg-color-221{background-color:#ffd75f}.terminal .xterm-color-222{color:#ffd787}.terminal .xterm-bg-color-222{background-color:#ffd787}.terminal .xterm-color-223{color:#ffd7af}.terminal .xterm-bg-color-223{background-color:#ffd7af}.terminal .xterm-color-224{color:#ffd7d7}.terminal .xterm-bg-color-224{background-color:#ffd7d7}.terminal .xterm-color-225{color:#ffd7ff}.terminal .xterm-bg-color-225{background-color:#ffd7ff}.terminal .xterm-color-226{color:#ff0}.terminal .xterm-bg-color-226{background-color:#ff0}.terminal .xterm-color-227{color:#ffff5f}.terminal .xterm-bg-color-227{background-color:#ffff5f}.terminal .xterm-color-228{color:#ffff87}.terminal .xterm-bg-color-228{background-color:#ffff87}.terminal .xterm-color-229{color:#ffffaf}.terminal .xterm-bg-color-229{background-color:#ffffaf}.terminal .xterm-color-230{color:#ffffd7}.terminal .xterm-bg-color-230{background-color:#ffffd7}.terminal .xterm-color-231{color:#fff}.terminal .xterm-bg-color-231{background-color:#fff}.terminal .xterm-color-232{color:#080808}.terminal .xterm-bg-color-232{background-color:#080808}.terminal .xterm-color-233{color:#121212}.terminal .xterm-bg-color-233{background-color:#121212}.terminal .xterm-color-234{color:#1c1c1c}.terminal .xterm-bg-color-234{background-color:#1c1c1c}.terminal .xterm-color-235{color:#262626}.terminal .xterm-bg-color-235{background-color:#262626}.terminal .xterm-color-236{color:#303030}.terminal .xterm-bg-color-236{background-color:#303030}.terminal .xterm-color-237{color:#3a3a3a}.terminal .xterm-bg-color-237{background-color:#3a3a3a}.terminal .xterm-color-238{color:#444}.terminal .xterm-bg-color-238{background-color:#444}.terminal .xterm-color-239{color:#4e4e4e}.terminal .xterm-bg-color-239{background-color:#4e4e4e}.terminal .xterm-color-240{color:#585858}.terminal .xterm-bg-color-240{background-color:#585858}.terminal .xterm-color-241{color:#626262}.terminal .xterm-bg-color-241{background-color:#626262}.terminal .xterm-color-242{color:#6c6c6c}.terminal .xterm-bg-color-242{background-color:#6c6c6c}.terminal .xterm-color-243{color:#767676}.terminal .xterm-bg-color-243{background-color:#767676}.terminal .xterm-color-244{color:gray}.terminal .xterm-bg-color-244{background-color:gray}.terminal .xterm-color-245{color:#8a8a8a}.terminal .xterm-bg-color-245{background-color:#8a8a8a}.terminal .xterm-color-246{color:#949494}.terminal .xterm-bg-color-246{background-color:#949494}.terminal .xterm-color-247{color:#9e9e9e}.terminal .xterm-bg-color-247{background-color:#9e9e9e}.terminal .xterm-color-248{color:#a8a8a8}.terminal .xterm-bg-color-248{background-color:#a8a8a8}.terminal .xterm-color-249{color:#b2b2b2}.terminal .xterm-bg-color-249{background-color:#b2b2b2}.terminal .xterm-color-250{color:#bcbcbc}.terminal .xterm-bg-color-250{background-color:#bcbcbc}.terminal .xterm-color-251{color:#c6c6c6}.terminal .xterm-bg-color-251{background-color:#c6c6c6}.terminal .xterm-color-252{color:#d0d0d0}.terminal .xterm-bg-color-252{background-color:#d0d0d0}.terminal .xterm-color-253{color:#dadada}.terminal .xterm-bg-color-253{background-color:#dadada}.terminal .xterm-color-254{color:#e4e4e4}.terminal .xterm-bg-color-254{background-color:#e4e4e4}.terminal .xterm-color-255{color:#eee}.terminal .xterm-bg-color-255{background-color:#eee}</style>
     <style>#terminal-container,body{position:absolute;height:100%;width:100%;margin:0;padding:0;font-size:15px;font-variant-ligatures:none;-webkit-font-smoothing:antialiased;background-color:#101010}.terminal{background-color:#101010;color:#f0f0f0;font-family:"DejaVu Sans Mono","Everson Mono",FreeMono,Menlo,Terminal,monospace;position:fixed;top:0;bottom:0;left:0;right:0;width:auto;height:auto}.terminal .xterm-viewport{background-color:#101010;overflow-x:hidden}.terminal .terminal-cursor{background-color:#f0f0f0;color:#101010;opacity:.7}.terminal:not(.focus) .terminal-cursor{outline:1px solid #f0f0f0}@keyframes blink-cursor{0%{background-color:#f0f0f0;color:#101010}50%{background-color:transparent;color:#f0f0f0}}</style>
-    <script>!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Terminal=t()}}(function(){var t;return function t(e,s,i){function r(a,h){if(!s[a]){if(!e[a]){var n="function"==typeof require&&require;if(!h&&n)return n(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=s[a]={exports:{}};e[a][0].call(l.exports,function(t){var s=e[a][1][t];return r(s?s:t)},l,l.exports,t,e,s,i)}return s[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(t,e,s){"use strict";var i=function(){function t(t,e,s){this.textarea=t,this.compositionView=e,this.terminal=s,this.isComposing=!1,this.isSendingComposition=!1,this.compositionPosition={start:null,end:null}}return t.prototype.compositionstart=function(){this.isComposing=!0,this.compositionPosition.start=this.textarea.value.length,this.compositionView.textContent="",this.compositionView.classList.add("active")},t.prototype.compositionupdate=function(t){this.compositionView.textContent=t.data,this.updateCompositionElements();var e=this;setTimeout(function(){e.compositionPosition.end=e.textarea.value.length},0)},t.prototype.compositionend=function(){this.finalizeComposition(!0)},t.prototype.keydown=function(t){if(this.isComposing||this.isSendingComposition){if(229===t.keyCode)return!1;if(16===t.keyCode||17===t.keyCode||18===t.keyCode)return!1;this.finalizeComposition(!1)}return 229!==t.keyCode||(this.handleAnyTextareaChanges(),!1)},t.prototype.finalizeComposition=function(t){if(this.compositionView.classList.remove("active"),this.isComposing=!1,this.clearTextareaPosition(),t){var e={start:this.compositionPosition.start,end:this.compositionPosition.end},s=this;this.isSendingComposition=!0,setTimeout(function(){if(s.isSendingComposition){s.isSendingComposition=!1;var t;t=s.isComposing?s.textarea.value.substring(e.start,e.end):s.textarea.value.substring(e.start),s.terminal.handler(t)}},0)}else{this.isSendingComposition=!1;var i=this.textarea.value.substring(this.compositionPosition.start,this.compositionPosition.end);this.terminal.handler(i)}},t.prototype.handleAnyTextareaChanges=function(){var t=this.textarea.value,e=this;setTimeout(function(){if(!e.isComposing){var s=e.textarea.value,i=s.replace(t,"");i.length>0&&e.terminal.handler(i)}},0)},t.prototype.updateCompositionElements=function(t){if(this.isComposing){var e=this.terminal.element.querySelector(".terminal-cursor");if(e){var s=this.terminal.element.querySelector(".xterm-rows"),i=s.offsetTop+e.offsetTop;this.compositionView.style.left=e.offsetLeft+"px",this.compositionView.style.top=i+"px",this.compositionView.style.height=e.offsetHeight+"px",this.compositionView.style.lineHeight=e.offsetHeight+"px";var r=this.compositionView.getBoundingClientRect();this.textarea.style.left=e.offsetLeft+"px",this.textarea.style.top=i+"px",this.textarea.style.width=r.width+"px",this.textarea.style.height=r.height+"px",this.textarea.style.lineHeight=r.height+"px"}t||setTimeout(this.updateCompositionElements.bind(this,!0),0)}},t.prototype.clearTextareaPosition=function(){this.textarea.style.left="",this.textarea.style.top=""},t}();s.CompositionHelper=i},{}],2:[function(t,e,s){"use strict";function i(){this._events=this._events||{}}s.EventEmitter=i,i.prototype.addListener=function(t,e){this._events[t]=this._events[t]||[],this._events[t].push(e)},i.prototype.on=i.prototype.addListener,i.prototype.removeListener=function(t,e){if(this._events[t])for(var s=this._events[t],i=s.length;i--;)if(s[i]===e||s[i].listener===e)return void s.splice(i,1)},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(t){this._events[t]&&delete this._events[t]},i.prototype.once=function(t,e){function s(){var i=Array.prototype.slice.call(arguments);return this.removeListener(t,s),e.apply(this,i)}return s.listener=e,this.on(t,s)},i.prototype.emit=function(t){if(this._events[t])for(var e=Array.prototype.slice.call(arguments,1),s=this._events[t],i=s.length,r=0;r<i;r++)s[r].apply(this,e)},i.prototype.listeners=function(t){return this._events[t]=this._events[t]||[]}},{}],3:[function(t,e,s){"use strict";var i=function(){function t(t,e,s,i){this.terminal=t,this.viewportElement=e,this.scrollArea=s,this.charMeasureElement=i,this.currentRowHeight=0,this.lastRecordedBufferLength=0,this.lastRecordedViewportHeight=0,this.terminal.on("scroll",this.syncScrollArea.bind(this)),this.terminal.on("resize",this.syncScrollArea.bind(this)),this.viewportElement.addEventListener("scroll",this.onScroll.bind(this)),this.syncScrollArea()}return t.prototype.refresh=function(t){var e=t||this.charMeasureElement.getBoundingClientRect();if(e.height>0){var s=e.height!==this.currentRowHeight;s&&(this.currentRowHeight=e.height,this.viewportElement.style.lineHeight=e.height+"px",this.terminal.rowContainer.style.lineHeight=e.height+"px");var i=this.lastRecordedViewportHeight!==this.terminal.rows;(s||i)&&(this.lastRecordedViewportHeight=this.terminal.rows,this.viewportElement.style.height=e.height*this.terminal.rows+"px"),this.scrollArea.style.height=e.height*this.lastRecordedBufferLength+"px"}},t.prototype.syncScrollArea=function(){if(this.lastRecordedBufferLength!==this.terminal.lines.length)this.lastRecordedBufferLength=this.terminal.lines.length,this.refresh();else if(this.lastRecordedViewportHeight!==this.terminal.rows)this.refresh();else{var t=this.charMeasureElement.getBoundingClientRect();t.height!==this.currentRowHeight&&this.refresh(t)}var e=this.terminal.ydisp*this.currentRowHeight;this.viewportElement.scrollTop!==e&&(this.viewportElement.scrollTop=e)},t.prototype.onScroll=function(t){var e=Math.round(this.viewportElement.scrollTop/this.currentRowHeight),s=e-this.terminal.ydisp;this.terminal.scrollDisp(s,!0)},t.prototype.onWheel=function(t){if(0!==t.deltaY){var e=1;t.deltaMode===WheelEvent.DOM_DELTA_LINE?e=this.currentRowHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e=this.currentRowHeight*this.terminal.rows),this.viewportElement.scrollTop+=t.deltaY*e,t.preventDefault()}},t}();s.Viewport=i},{}],4:[function(t,e,s){"use strict";function i(t){var e=String.fromCharCode(32),s=String.fromCharCode(160),i=new RegExp(s,"g"),r=t.split("\n").map(function(t){var s=t.replace(/\s+$/g,"").replace(i,e);return s}).join("\n");return r}function r(t,e){var s=window.getSelection().toString(),r=i(s);e.browser.isMSIE?window.clipboardData.setData("Text",r):t.clipboardData.setData("text/plain",r),t.preventDefault()}function o(t,e){t.stopPropagation();var s,i=function(s){return e.handler(s),e.textarea.value="",e.cancel(t)};e.browser.isMSIE?window.clipboardData&&(s=window.clipboardData.getData("Text"),i(s)):t.clipboardData&&(s=t.clipboardData.getData("text/plain"),i(s))}function a(t,e){var s=document.getSelection(),r=i(s.toString()),o=!1,a=t.clientX,h=t.clientY;if(s.rangeCount){for(var n=s.getRangeAt(0),c=n.getClientRects(),l=0;l<c.length;l++){var p=c[l];if(o=a>p.left&&a<p.right&&h>p.top&&h<p.bottom)break}!r.match(/^\s$/)&&r.length||(o=!1)}o||(e.textarea.style.position="fixed",e.textarea.style.width="20px",e.textarea.style.height="20px",e.textarea.style.left=a-10+"px",e.textarea.style.top=h-10+"px",e.textarea.style.zIndex="1000",e.textarea.focus(),setTimeout(function(){e.textarea.style.position=null,e.textarea.style.width=null,e.textarea.style.height=null,e.textarea.style.left=null,e.textarea.style.top=null,e.textarea.style.zIndex=null},4))}s.prepareTextForClipboard=i,s.copyHandler=r,s.pasteHandler=o,s.rightClickHandler=a},{}],5:[function(t,e,s){"use strict";var i=t("./Generic.js"),r="undefined"==typeof navigator,o=r?"node":navigator.userAgent,a=r?"node":navigator.platform;s.isFirefox=!!~o.indexOf("Firefox"),s.isMSIE=!!~o.indexOf("MSIE")||!!~o.indexOf("Trident"),s.isMac=i.contains(["Macintosh","MacIntel","MacPPC","Mac68K"],a),s.isIpad="iPad"===a,s.isIphone="iPhone"===a,s.isMSWindows=i.contains(["Windows","Win16","Win32","WinCE"],a)},{"./Generic.js":6}],6:[function(t,e,s){"use strict";s.contains=function(t,e){return t.indexOf(e)>=0}},{}],7:[function(e,s,i){"use strict";function r(t){var e=this;if(!(this instanceof r))return new r(arguments[0],arguments[1],arguments[2]);e.browser=k,e.cancel=r.cancel,y.EventEmitter.call(this),"number"==typeof t&&(t={cols:arguments[0],rows:arguments[1],handler:arguments[2]}),t=t||{},Object.keys(r.defaults).forEach(function(s){null==t[s]&&(t[s]=r.options[s],r[s]!==r.defaults[s]&&(t[s]=r[s])),e[s]=t[s]}),8===t.colors.length?t.colors=t.colors.concat(r._colors.slice(8)):16===t.colors.length?t.colors=t.colors.concat(r._colors.slice(16)):10===t.colors.length?t.colors=t.colors.slice(0,-2).concat(r._colors.slice(8,-2),t.colors.slice(-2)):18===t.colors.length&&(t.colors=t.colors.concat(r._colors.slice(16,-2),t.colors.slice(-2))),this.colors=t.colors,this.options=t,this.parent=t.body||t.parent||(v?v.getElementsByTagName("body")[0]:null),this.cols=t.cols||t.geometry[0],this.rows=t.rows||t.geometry[1],this.geometry=[this.cols,this.rows],t.handler&&this.on("data",t.handler),this.ybase=0,this.ydisp=0,this.x=0,this.y=0,this.isRefreshing=!1,this.cursorState=0,this.cursorHidden=!1,this.convertEol,this.state=0,this.queue="",this.scrollTop=0,this.scrollBottom=this.rows-1,this.customKeydownHandler=null,this.applicationKeypad=!1,this.applicationCursor=!1,this.originMode=!1,this.insertMode=!1,this.wraparoundMode=!0,this.normal=null,this.charset=null,this.gcharset=null,this.glevel=0,this.charsets=[null],this.decLocator,this.x10Mouse,this.vt200Mouse,this.vt300Mouse,this.normalMouse,this.mouseEvents,this.sendFocus,this.utfMouse,this.sgrMouse,this.urxvtMouse,this.element,this.children,this.refreshStart,this.refreshEnd,this.savedX,this.savedY,this.savedCols,this.readable=!0,this.writable=!0,this.defAttr=131840,this.curAttr=this.defAttr,this.params=[],this.currentParam=0,this.prefix="",this.postfix="",this.surrogate_high="",this.lines=[];for(var s=this.rows;s--;)this.lines.push(this.blankLine());this.tabs,this.setupStops(),this.userScrolling=!1}function o(t,e,s,i){Array.isArray(t)||(t=[t]),t.forEach(function(t){t.addEventListener(e,s,i||!1)})}function a(t,e,s,i){t.removeEventListener(e,s,i||!1)}function h(t,e){if(this.cancelEvents||e)return t.preventDefault(),t.stopPropagation(),!1}function n(t,e){function s(){this.constructor=t}s.prototype=e.prototype,t.prototype=new s}function c(t){var e=t.getElementsByTagName("body")[0],s=t.createElement("span");s.innerHTML="hello world",e.appendChild(s);var i=s.scrollWidth;s.style.fontWeight="bold";var r=s.scrollWidth;return e.removeChild(s),i!==r}function l(t,e){var s=t.browser.isMac&&e.altKey&&!e.ctrlKey&&!e.metaKey||t.browser.isMSWindows&&e.altKey&&e.ctrlKey&&!e.metaKey;return"keypress"==e.type?s:s&&(!e.keyCode||e.keyCode>47)}function p(t,e,s){var i=t<<16|e<<8|s;if(null!=p._cache[i])return p._cache[i];for(var o,a,h,n,c,l=1/0,u=-1,f=0;f<r.vcolors.length;f++){if(o=r.vcolors[f],a=o[0],h=o[1],n=o[2],c=p.distance(t,e,s,a,h,n),0===c){u=f;break}c<l&&(l=c,u=f)}return p._cache[i]=u}function u(t,e,s){if(t.forEach)return t.forEach(e,s);for(var i=0;i<t.length;i++)e.call(s,t[i],i,t)}function f(t){if(Object.keys)return Object.keys(t);var e,s=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&s.push(e);return s}var d=e("./CompositionHelper.js"),y=e("./EventEmitter.js"),m=e("./Viewport.js"),b=e("./handlers/Clipboard.js"),k=e("./utils/Browser"),v="undefined"!=typeof window?window.document:null,g=0,w=1,x=2,C=3,S=4,E=5,M=6;n(r,y.EventEmitter),r.prototype.eraseAttr=function(){return this.defAttr&-512|511&this.curAttr},r.tangoColors=["#2e3436","#cc0000","#4e9a06","#c4a000","#3465a4","#75507b","#06989a","#d3d7cf","#555753","#ef2929","#8ae234","#fce94f","#729fcf","#ad7fa8","#34e2e2","#eeeeec"],r.colors=function(){function t(t,s,r){i.push("#"+e(t)+e(s)+e(r))}function e(t){return t=t.toString(16),t.length<2?"0"+t:t}var s,i=r.tangoColors.slice(),o=[0,95,135,175,215,255];for(s=0;s<216;s++)t(o[s/36%6|0],o[s/6%6|0],o[s%6]);for(s=0;s<24;s++)o=8+10*s,t(o,o,o);return i}(),r._colors=r.colors.slice(),r.vcolors=function(){for(var t,e=[],s=r.colors,i=0;i<256;i++)t=parseInt(s[i].substring(1),16),e.push([t>>16&255,t>>8&255,255&t]);return e}(),r.defaults={colors:r.colors,theme:"default",convertEol:!1,termName:"xterm",geometry:[80,24],cursorBlink:!1,visualBell:!1,popOnBell:!1,scrollback:1e3,screenKeys:!1,debug:!1,cancelEvents:!1},r.options={},r.focus=null,u(f(r.defaults),function(t){r[t]=r.defaults[t],r.options[t]=r.defaults[t]}),r.prototype.focus=function(){return this.textarea.focus()},r.prototype.getOption=function(t,e){if(!(t in r.defaults))throw new Error('No option with key "'+t+'"');return"undefined"!=typeof this.options[t]?this.options[t]:this[t]},r.prototype.setOption=function(t,e){if(!(t in r.defaults))throw new Error('No option with key "'+t+'"');this[t]=e,this.options[t]=e},r.bindFocus=function(t){o(t.textarea,"focus",function(e){t.sendFocus&&t.send("\e[I"),t.element.classList.add("focus"),t.showCursor(),r.focus=t,t.emit("focus",{terminal:t})})},r.prototype.blur=function(){return this.textarea.blur()},r.bindBlur=function(t){o(t.textarea,"blur",function(e){t.refresh(t.y,t.y),t.sendFocus&&t.send("\e[O"),t.element.classList.remove("focus"),r.focus=null,t.emit("blur",{terminal:t})})},r.prototype.initGlobal=function(){function t(t){b.rightClickHandler.call(this,t,e)}var e=this;r.bindKeys(this),r.bindFocus(this),r.bindBlur(this),o(this.element,"copy",function(t){b.copyHandler.call(this,t,e)}),o(this.textarea,"paste",function(t){b.pasteHandler.call(this,t,e)}),o(this.element,"paste",function(t){b.pasteHandler.call(this,t,e)}),e.browser.isFirefox?o(this.element,"mousedown",function(e){2==e.button&&t(e)}):o(this.element,"contextmenu",t)},r.bindKeys=function(t){o(t.element,"keydown",function(e){v.activeElement==this&&t.keyDown(e)},!0),o(t.element,"keypress",function(e){v.activeElement==this&&t.keyPress(e)},!0),o(t.element,"keyup",t.focus.bind(t)),o(t.textarea,"keydown",function(e){t.keyDown(e)},!0),o(t.textarea,"keypress",function(e){t.keyPress(e),this.value=""},!0),o(t.textarea,"compositionstart",t.compositionHelper.compositionstart.bind(t.compositionHelper)),o(t.textarea,"compositionupdate",t.compositionHelper.compositionupdate.bind(t.compositionHelper)),o(t.textarea,"compositionend",t.compositionHelper.compositionend.bind(t.compositionHelper)),t.on("refresh",t.compositionHelper.updateCompositionElements.bind(t.compositionHelper))},r.prototype.insertRow=function(t){return"object"!=typeof t&&(t=v.createElement("div")),this.rowContainer.appendChild(t),this.children.push(t),t},r.prototype.open=function(t){var e=this,s=0;if(this.parent=t||this.parent,!this.parent)throw new Error("Terminal requires a parent element.");for(this.context=this.parent.ownerDocument.defaultView,this.document=this.parent.ownerDocument,this.body=this.document.getElementsByTagName("body")[0],this.element=this.document.createElement("div"),this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.classList.add("xterm-theme-"+this.theme),this.element.style.height,this.element.setAttribute("tabindex",0),this.viewportElement=v.createElement("div"),this.viewportElement.classList.add("xterm-viewport"),this.element.appendChild(this.viewportElement),this.viewportScrollArea=v.createElement("div"),this.viewportScrollArea.classList.add("xterm-scroll-area"),this.viewportElement.appendChild(this.viewportScrollArea),this.rowContainer=v.createElement("div"),this.rowContainer.classList.add("xterm-rows"),this.element.appendChild(this.rowContainer),this.children=[],this.helperContainer=v.createElement("div"),this.helperContainer.classList.add("xterm-helpers"),this.element.appendChild(this.helperContainer),this.textarea=v.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.textarea.addEventListener("focus",function(){e.emit("focus",{terminal:e})}),this.textarea.addEventListener("blur",function(){e.emit("blur",{terminal:e})}),this.helperContainer.appendChild(this.textarea),this.compositionView=v.createElement("div"),this.compositionView.classList.add("composition-view"),this.compositionHelper=new d.CompositionHelper(this.textarea,this.compositionView,this),this.helperContainer.appendChild(this.compositionView),this.charMeasureElement=v.createElement("div"),this.charMeasureElement.classList.add("xterm-char-measure-element"),this.charMeasureElement.innerHTML="W",this.helperContainer.appendChild(this.charMeasureElement);s<this.rows;s++)this.insertRow();this.parent.appendChild(this.element),this.viewport=new m.Viewport(this,this.viewportElement,this.viewportScrollArea,this.charMeasureElement),this.refresh(0,this.rows-1),this.initGlobal(),this.focus(),o(this.element,"click",function(){var t=v.getSelection(),s=t.isCollapsed,i="boolean"==typeof s?!s:"Range"==t.type;i||e.focus()}),this.bindMouse(),null==r.brokenBold&&(r.brokenBold=c(this.document)),this.emit("open")},r.loadAddon=function(r,o){return"object"==typeof i&&"object"==typeof s?e("./addons/"+r+"/"+r):"function"==typeof t?e(["./addons/"+r+"/"+r],o):(console.error("Cannot load a module without a CommonJS or RequireJS environment."),!1)},r.prototype.bindMouse=function(){function t(t){var e,s;if(e=r(t),s=h(t))switch(i(e,s),t.overrideType||t.type){case"mousedown":l=e;break;case"mouseup":l=32;break;case"wheel":}}function e(t){var e,s=l;e=h(t),e&&(s+=32,i(s,e))}function s(t,e){if(c.utfMouse){if(2047===e)return t.push(0);e<127?t.push(e):(e>2047&&(e=2047),t.push(192|e>>6),t.push(128|63&e))}else{if(255===e)return t.push(0);e>127&&(e=127),t.push(e)}}function i(t,e){if(c.vt300Mouse){t&=3,e.x-=32,e.y-=32;var i="\e[24";if(0===t)i+="1";else if(1===t)i+="3";else if(2===t)i+="5";else{if(3===t)return;i+="0"}return i+="~["+e.x+","+e.y+"]\r",void c.send(i)}if(c.decLocator)return t&=3,e.x-=32,e.y-=32,0===t?t=2:1===t?t=4:2===t?t=6:3===t&&(t=3),void c.send("\e["+t+";"+(3===t?4:0)+";"+e.y+";"+e.x+";"+(e.page||0)+"&w");if(c.urxvtMouse)return e.x-=32,e.y-=32,e.x++,e.y++,void c.send("\e["+t+";"+e.x+";"+e.y+"M");if(c.sgrMouse)return e.x-=32,e.y-=32,void c.send("\e[<"+((3===(3&t)?t&-4:t)-32)+";"+e.x+";"+e.y+(3===(3&t)?"m":"M"));var i=[];s(i,t),s(i,e.x),s(i,e.y),c.send("\e[M"+String.fromCharCode.apply(String,i))}function r(t){var e,s,i,r,o;switch(t.overrideType||t.type){case"mousedown":e=null!=t.button?+t.button:null!=t.which?t.which-1:null,c.browser.isMSIE&&(e=1===e?0:4===e?1:e);break;case"mouseup":e=3;break;case"DOMMouseScroll":e=t.detail<0?64:65;break;case"wheel":e=t.wheelDeltaY>0?64:65}return s=t.shiftKey?4:0,i=t.metaKey?8:0,r=t.ctrlKey?16:0,o=s|i|r,c.vt200Mouse?o&=r:c.normalMouse||(o=0),e=32+(o<<2)+e}function h(t){var e,s,i,r,o;if(null!=t.pageX){for(e=t.pageX,s=t.pageY,o=c.element;o&&o!==c.document.documentElement;)e-=o.offsetLeft,s-=o.offsetTop,o="offsetParent"in o?o.offsetParent:o.parentNode;return i=c.element.clientWidth,r=c.element.clientHeight,e=Math.ceil(e/i*c.cols),s=Math.ceil(s/r*c.rows),e<0&&(e=0),e>c.cols&&(e=c.cols),s<0&&(s=0),s>c.rows&&(s=c.rows),e+=32,s+=32,{x:e,y:s,type:"wheel"}}}var n=this.element,c=this,l=32;o(n,"mousedown",function(s){if(c.mouseEvents)return t(s),c.focus(),c.vt200Mouse?(s.overrideType="mouseup",t(s),c.cancel(s)):(c.normalMouse&&o(c.document,"mousemove",e),c.x10Mouse||o(c.document,"mouseup",function s(i){return t(i),c.normalMouse&&a(c.document,"mousemove",e),a(c.document,"mouseup",s),c.cancel(i)}),c.cancel(s))}),o(n,"wheel",function(e){if(c.mouseEvents&&!(c.x10Mouse||c.vt300Mouse||c.decLocator))return t(e),c.cancel(e)}),o(n,"wheel",function(t){if(!c.mouseEvents)return c.viewport.onWheel(t),c.cancel(t)})},r.prototype.destroy=function(){this.readable=!1,this.writable=!1,this._events={},this.handler=function(){},this.write=function(){},this.element.parentNode&&this.element.parentNode.removeChild(this.element)},r.flags={BOLD:1,UNDERLINE:2,BLINK:4,INVERSE:8,INVISIBLE:16},r.prototype.refresh=function(t,e,s){var i=this;if(s="undefined"==typeof s||s)return void(this._refreshIsQueued?this._fullRefreshNext=!0:(setTimeout(function(){i.refresh(t,e,!1)},34),this._refreshIsQueued=!0));this._refreshIsQueued=!1,this._fullRefreshNext&&(t=0,e=this.rows-1,this._fullRefreshNext=!1);var o,a,h,n,c,l,p,u,f,d,y,m,b,k,g;v.activeElement;for(e-t>=this.rows/2&&(g=this.element.parentNode,g&&this.element.removeChild(this.rowContainer)),u=this.cols,a=t,e>=this.rows.length&&(this.log("`end` is too large. Most likely a bad CSR."),e=this.rows.length-1);a<=e;a++){for(k=a+this.ydisp,n=this.lines[k],c="",o=this.y===a-(this.ybase-this.ydisp)&&this.cursorState&&!this.cursorHidden?this.x:-1,d=this.defAttr,h=0;h<u;h++)if(f=n[h][0],l=n[h][1],p=n[h][2]){if(h===o&&(f=-1),f!==d&&(d!==this.defAttr&&(c+="</span>"),f!==this.defAttr))if(f===-1)c+='<span class="reverse-video terminal-cursor',this.cursorBlink&&(c+=" blinking"),c+='">';else{var w=[];y=511&f,m=f>>9&511,b=f>>18,b&r.flags.BOLD&&(r.brokenBold||w.push("xterm-bold"),m<8&&(m+=8)),b&r.flags.UNDERLINE&&w.push("xterm-underline"),b&r.flags.BLINK&&w.push("xterm-blink"),b&r.flags.INVERSE&&(y=[m,m=y][0],1&b&&m<8&&(m+=8)),b&r.flags.INVISIBLE&&w.push("xterm-hidden"),b&r.flags.INVERSE&&(257==y&&(y=15),256==m&&(m=0)),y<256&&w.push("xterm-bg-color-"+y),m<256&&w.push("xterm-color-"+m),c+="<span",w.length&&(c+=' class="'+w.join(" ")+'"'),c+=">"}switch(l){case"&":c+="&amp;";break;case"<":c+="&lt;";break;case">":c+="&gt;";break;default:c+=l<=" "?"&nbsp;":l}d=f}d!==this.defAttr&&(c+="</span>"),this.children[a].innerHTML=c}g&&this.element.appendChild(this.rowContainer),this.emit("refresh",{element:this.element,start:t,end:e})},r.prototype.showCursor=function(){this.cursorState||(this.cursorState=1,this.refresh(this.y,this.y))},r.prototype.scroll=function(){var t;++this.ybase===this.scrollback&&(this.ybase=this.ybase/2|0,this.lines=this.lines.slice(-(this.ybase+this.rows)+1)),this.userScrolling||(this.ydisp=this.ybase),t=this.ybase+this.rows-1,t-=this.rows-1-this.scrollBottom,t===this.lines.length?this.lines.push(this.blankLine()):this.lines.splice(t,0,this.blankLine()),0!==this.scrollTop&&(0!==this.ybase&&(this.ybase--,this.userScrolling||(this.ydisp=this.ybase)),this.lines.splice(this.ybase+this.scrollTop,1)),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom),this.emit("scroll",this.ydisp)},r.prototype.scrollDisp=function(t,e){t<0?this.userScrolling=!0:t+this.ydisp>=this.ybase&&(this.userScrolling=!1),this.ydisp+=t,this.ydisp>this.ybase?this.ydisp=this.ybase:this.ydisp<0&&(this.ydisp=0),e||this.emit("scroll",this.ydisp),this.refresh(0,this.rows-1)},r.prototype.scrollPages=function(t){this.scrollDisp(t*(this.rows-1))},r.prototype.scrollToTop=function(){this.scrollDisp(-this.ydisp)},r.prototype.scrollToBottom=function(){this.scrollDisp(this.ybase-this.ydisp)},r.prototype.write=function(t){var e,s,i,o,a,h,n=t.length,c=0;for(this.refreshStart=this.y,this.refreshEnd=this.y,this.surrogate_high&&(t=this.surrogate_high+t,this.surrogate_high="");c<n;c++){if(s=t[c],i=t.charCodeAt(c),55296<=i&&i<=56319){if(o=t.charCodeAt(c+1),isNaN(o)){this.surrogate_high=s;continue}i=1024*(i-55296)+(o-56320)+65536,s+=t.charAt(c+1)}if(!(56320<=i&&i<=57343))switch(this.state){case g:switch(s){case"\a":this.bell();break;case"\n":case"\v":case"\f":this.convertEol&&(this.x=0),this.y++,this.y>this.scrollBottom&&(this.y--,this.scroll());break;case"\r":this.x=0;break;case"\b":this.x>0&&this.x--;break;case"\t":this.x=this.nextStop();break;case"\ e":this.setgLevel(1);break;case"\ f":this.setgLevel(0);break;case"\e":this.state=w;break;default:if(a=A(i),s>=" "){if(this.charset&&this.charset[s]&&(s=this.charset[s]),h=this.y+this.ybase,!a&&this.x){this.lines[h][this.x-1]&&(this.lines[h][this.x-1][2]?this.lines[h][this.x-1][1]+=s:this.lines[h][this.x-2]&&(this.lines[h][this.x-2][1]+=s),this.updateRange(this.y));break}if(this.x+a-1>=this.cols)if(this.wraparoundMode)this.x=0,this.y++,this.y>this.scrollBottom&&(this.y--,this.scroll());else if(this.x=this.cols-1,2===a)continue;if(h=this.y+this.ybase,this.insertMode)for(var l=0;l<a;++l){var p=this.lines[this.y+this.ybase].pop();0===p[2]&&this.lines[h][this.cols-2]&&2===this.lines[h][this.cols-2][2]&&(this.lines[h][this.cols-2]=[this.curAttr," ",1]),this.lines[h].splice(this.x,0,[this.curAttr," ",1])}this.lines[h][this.x]=[this.curAttr,s,a],this.x++,this.updateRange(this.y),2===a&&(this.lines[h][this.x]=[this.curAttr,"",0],this.x++)}}break;case w:switch(s){case"[":this.params=[],this.currentParam=0,this.state=x;break;case"]":this.params=[],this.currentParam=0,this.state=C;break;case"P":this.params=[],this.currentParam=0,this.state=E;break;case"_":this.state=M;break;case"^":this.state=M;break;case"c":this.reset();break;case"E":this.x=0;case"D":this.index();break;case"M":this.reverseIndex();break;case"%":this.setgLevel(0),this.setgCharset(0,r.charsets.US),this.state=g,c++;break;case"(":case")":case"*":case"+":case"-":case".":switch(s){case"(":this.gcharset=0;break;case")":this.gcharset=1;break;case"*":this.gcharset=2;break;case"+":this.gcharset=3;break;case"-":this.gcharset=1;break;case".":this.gcharset=2}this.state=S;break;case"/":this.gcharset=3,this.state=S,c--;break;case"N":break;case"O":break;case"n":this.setgLevel(2);break;case"o":this.setgLevel(3);break;case"|":this.setgLevel(3);break;case"}":this.setgLevel(2);break;case"~":this.setgLevel(1);break;case"7":this.saveCursor(),this.state=g;break;case"8":this.restoreCursor(),this.state=g;break;case"#":this.state=g,c++;break;case"H":this.tabSet();break;case"=":this.log("Serial port requested application keypad."),this.applicationKeypad=!0,this.viewport.syncScrollArea(),this.state=g;break;case">":this.log("Switching back to normal keypad."),this.applicationKeypad=!1,this.viewport.syncScrollArea(),this.state=g;break;default:this.state=g,this.error("Unknown ESC control: %s.",s)}break;case S:switch(s){case"0":e=r.charsets.SCLD;break;case"A":e=r.charsets.UK;break;case"B":e=r.charsets.US;break;case"4":e=r.charsets.Dutch;break;case"C":case"5":e=r.charsets.Finnish;break;case"R":e=r.charsets.French;break;case"Q":e=r.charsets.FrenchCanadian;break;case"K":e=r.charsets.German;break;case"Y":e=r.charsets.Italian;break;case"E":case"6":e=r.charsets.NorwegianDanish;break;case"Z":e=r.charsets.Spanish;break;case"H":case"7":e=r.charsets.Swedish;break;case"=":e=r.charsets.Swiss;break;case"/":e=r.charsets.ISOLatin,c++;break;default:e=r.charsets.US}this.setgCharset(this.gcharset,e),this.gcharset=null,this.state=g;break;case C:if("\e"===s||"\a"===s){switch("\e"===s&&c++,this.params.push(this.currentParam),this.params[0]){case 0:case 1:case 2:this.params[1]&&(this.title=this.params[1],this.handleTitle(this.title));break;case 3:break;case 4:case 5:break;case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:break;case 46:break;case 50:break;case 51:break;case 52:break;case 104:case 105:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:}this.params=[],this.currentParam=0,this.state=g}else this.params.length?this.currentParam+=s:s>="0"&&s<="9"?this.currentParam=10*this.currentParam+s.charCodeAt(0)-48:";"===s&&(this.params.push(this.currentParam),this.currentParam="");break;case x:if("?"===s||">"===s||"!"===s){this.prefix=s;break}if(s>="0"&&s<="9"){this.currentParam=10*this.currentParam+s.charCodeAt(0)-48;break}if("$"===s||'"'===s||" "===s||"'"===s){this.postfix=s;break}if(this.params.push(this.currentParam),this.currentParam=0,";"===s)break;switch(this.state=g,s){case"A":this.cursorUp(this.params);break;case"B":this.cursorDown(this.params);break;case"C":this.cursorForward(this.params);break;case"D":this.cursorBackward(this.params);break;case"H":this.cursorPos(this.params);break;case"J":this.eraseInDisplay(this.params);break;case"K":this.eraseInLine(this.params);break;case"m":this.prefix||this.charAttributes(this.params);break;case"n":this.prefix||this.deviceStatus(this.params);break;case"@":this.insertChars(this.params);break;case"E":this.cursorNextLine(this.params);break;case"F":this.cursorPrecedingLine(this.params);break;case"G":this.cursorCharAbsolute(this.params);break;case"L":this.insertLines(this.params);break;case"M":this.deleteLines(this.params);break;case"P":this.deleteChars(this.params);break;case"X":this.eraseChars(this.params);break;case"`":this.charPosAbsolute(this.params);break;case"a":this.HPositionRelative(this.params);break;case"c":this.sendDeviceAttributes(this.params);break;case"d":this.linePosAbsolute(this.params);break;case"e":this.VPositionRelative(this.params);break;case"f":this.HVPosition(this.params);break;case"h":this.setMode(this.params);break;case"l":this.resetMode(this.params);break;case"r":this.setScrollRegion(this.params);break;case"s":this.saveCursor(this.params);break;case"u":this.restoreCursor(this.params);break;case"I":this.cursorForwardTab(this.params);break;case"S":this.scrollUp(this.params);break;case"T":this.params.length<2&&!this.prefix&&this.scrollDown(this.params);break;case"Z":this.cursorBackwardTab(this.params);break;case"b":this.repeatPrecedingCharacter(this.params);break;case"g":this.tabClear(this.params);break;case"p":switch(this.prefix){case"!":this.softReset(this.params)}break;default:this.error("Unknown CSI code: %s.",s)}this.prefix="",this.postfix="";break;case E:if("\e"===s||"\a"===s){switch("\e"===s&&c++,this.prefix){case"":break;case"$q":var u=this.currentParam,f=!1;switch(u){case'"q':u='0"q';break;case'"p':u='61"p';break;case"r":u=""+(this.scrollTop+1)+";"+(this.scrollBottom+1)+"r";break;case"m":u="0m";break;default:this.error("Unknown DCS Pt: %s.",u),u=""}this.send("\eP"+ +f+"$r"+u+"\e\\");break;case"+p":break;case"+q":var u=this.currentParam,f=!1;this.send("\eP"+ +f+"+r"+u+"\e\\");break;default:this.error("Unknown DCS prefix: %s.",this.prefix)}this.currentParam=0,this.prefix="",this.state=g}else this.currentParam?this.currentParam+=s:this.prefix||"$"===s||"+"===s?2===this.prefix.length?this.currentParam=s:this.prefix+=s:this.currentParam=s;break;case M:"\e"!==s&&"\a"!==s||("\e"===s&&c++,this.state=g)}}this.updateRange(this.y),this.refresh(this.refreshStart,this.refreshEnd)},r.prototype.writeln=function(t){this.write(t+"\r\n")},r.prototype.attachCustomKeydownHandler=function(t){this.customKeydownHandler=t},r.prototype.keyDown=function(t){if(this.customKeydownHandler&&this.customKeydownHandler(t)===!1)return!1;if(!this.compositionHelper.keydown.bind(this.compositionHelper)(t))return this.ybase!==this.ydisp&&this.scrollToBottom(),!1;var e=this.evaluateKeyEscapeSequence(t);return e.scrollDisp?(this.scrollDisp(e.scrollDisp),this.cancel(t,!0)):!!l(this,t)||(e.cancel&&this.cancel(t,!0),!e.key||(this.emit("keydown",t),this.emit("key",e.key,t),this.showCursor(),this.handler(e.key),this.cancel(t,!0)))},r.prototype.evaluateKeyEscapeSequence=function(t){var e={cancel:!1,key:void 0,scrollDisp:void 0},s=t.shiftKey<<0|t.altKey<<1|t.ctrlKey<<2|t.metaKey<<3;switch(t.keyCode){case 8:if(t.shiftKey){e.key="\b";break}e.key="\7f";break;case 9:if(t.shiftKey){e.key="\e[Z";break}e.key="\t",e.cancel=!0;break;case 13:e.key="\r",e.cancel=!0;break;case 27:e.key="\e",e.cancel=!0;break;case 37:s?(e.key="\e[1;"+(s+1)+"D","\e[1;3D"==e.key&&(e.key="\e[1;5D")):this.applicationCursor?e.key="\eOD":e.key="\e[D";break;case 39:s?(e.key="\e[1;"+(s+1)+"C","\e[1;3C"==e.key&&(e.key="\e[1;5C")):this.applicationCursor?e.key="\eOC":e.key="\e[C";break;case 38:s?(e.key="\e[1;"+(s+1)+"A","\e[1;3A"==e.key&&(e.key="\e[1;5A")):this.applicationCursor?e.key="\eOA":e.key="\e[A";break;case 40:s?(e.key="\e[1;"+(s+1)+"B","\e[1;3B"==e.key&&(e.key="\e[1;5B")):this.applicationCursor?e.key="\eOB":e.key="\e[B";break;case 45:t.shiftKey||t.ctrlKey||(e.key="\e[2~");break;case 46:s?e.key="\e[3;"+(s+1)+"~":e.key="\e[3~";break;case 36:s?e.key="\e[1;"+(s+1)+"H":this.applicationCursor?e.key="\eOH":e.key="\e[H";break;case 35:s?e.key="\e[1;"+(s+1)+"F":this.applicationCursor?e.key="\eOF":e.key="\e[F";
-break;case 33:t.shiftKey?e.scrollDisp=-(this.rows-1):e.key="\e[5~";break;case 34:t.shiftKey?e.scrollDisp=this.rows-1:e.key="\e[6~";break;case 112:s?e.key="\e[1;"+(s+1)+"P":e.key="\eOP";break;case 113:s?e.key="\e[1;"+(s+1)+"Q":e.key="\eOQ";break;case 114:s?e.key="\e[1;"+(s+1)+"R":e.key="\eOR";break;case 115:s?e.key="\e[1;"+(s+1)+"S":e.key="\eOS";break;case 116:s?e.key="\e[15;"+(s+1)+"~":e.key="\e[15~";break;case 117:s?e.key="\e[17;"+(s+1)+"~":e.key="\e[17~";break;case 118:s?e.key="\e[18;"+(s+1)+"~":e.key="\e[18~";break;case 119:s?e.key="\e[19;"+(s+1)+"~":e.key="\e[19~";break;case 120:s?e.key="\e[20;"+(s+1)+"~":e.key="\e[20~";break;case 121:s?e.key="\e[21;"+(s+1)+"~":e.key="\e[21~";break;case 122:s?e.key="\e[23;"+(s+1)+"~":e.key="\e[23~";break;case 123:s?e.key="\e[24;"+(s+1)+"~":e.key="\e[24~";break;default:!t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?this.browser.isMac||!t.altKey||t.ctrlKey||t.metaKey||(t.keyCode>=65&&t.keyCode<=90?e.key="\e"+String.fromCharCode(t.keyCode+32):192===t.keyCode?e.key="\e`":t.keyCode>=48&&t.keyCode<=57&&(e.key="\e"+(t.keyCode-48))):t.keyCode>=65&&t.keyCode<=90?e.key=String.fromCharCode(t.keyCode-64):32===t.keyCode?e.key=String.fromCharCode(0):t.keyCode>=51&&t.keyCode<=55?e.key=String.fromCharCode(t.keyCode-51+27):56===t.keyCode?e.key=String.fromCharCode(127):219===t.keyCode?e.key=String.fromCharCode(27):220===t.keyCode?e.key=String.fromCharCode(28):221===t.keyCode&&(e.key=String.fromCharCode(29))}return e},r.prototype.setgLevel=function(t){this.glevel=t,this.charset=this.charsets[t]},r.prototype.setgCharset=function(t,e){this.charsets[t]=e,this.glevel===t&&(this.charset=e)},r.prototype.keyPress=function(t){var e;if(this.cancel(t),t.charCode)e=t.charCode;else if(null==t.which)e=t.keyCode;else{if(0===t.which||0===t.charCode)return!1;e=t.which}return!(!e||(t.altKey||t.ctrlKey||t.metaKey)&&!l(this,t))&&(e=String.fromCharCode(e),this.emit("keypress",e,t),this.emit("key",e,t),this.showCursor(),this.handler(e),!1)},r.prototype.send=function(t){var e=this;this.queue||setTimeout(function(){e.handler(e.queue),e.queue=""},1),this.queue+=t},r.prototype.bell=function(){if(this.visualBell){var t=this;this.element.style.borderColor="white",setTimeout(function(){t.element.style.borderColor=""},10),this.popOnBell&&this.focus()}},r.prototype.log=function(){if(this.debug&&this.context.console&&this.context.console.log){var t=Array.prototype.slice.call(arguments);this.context.console.log.apply(this.context.console,t)}},r.prototype.error=function(){if(this.debug&&this.context.console&&this.context.console.error){var t=Array.prototype.slice.call(arguments);this.context.console.error.apply(this.context.console,t)}},r.prototype.resize=function(t,e){var s,i,r,o,a;if(t!==this.cols||e!==this.rows){if(t<1&&(t=1),e<1&&(e=1),r=this.cols,r<t)for(o=[this.defAttr," ",1],i=this.lines.length;i--;)for(;this.lines[i].length<t;)this.lines[i].push(o);else for(i=this.lines.length;i--;)for(;this.lines[i].length>t;)this.lines[i].pop();if(this.setupStops(r),this.cols=t,r=this.rows,a=0,r<e)for(s=this.element;r++<e;)this.lines.length<e+this.ybase&&(this.ybase>0&&this.lines.length<=this.ybase+this.y+a+1?(this.ybase--,a++,this.ydisp>0&&this.ydisp--):this.lines.push(this.blankLine())),this.children.length<e&&this.insertRow();else for(;r-- >e;)if(this.lines.length>e+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++)),this.children.length>e){if(s=this.children.shift(),!s)continue;s.parentNode.removeChild(s)}this.rows=e,this.y>=e&&(this.y=e-1),a&&(this.y+=a),this.x>=t&&(this.x=t-1),this.scrollTop=0,this.scrollBottom=e-1,this.refresh(0,this.rows-1),this.normal=null,this.geometry=[this.cols,this.rows],this.emit("resize",{terminal:this,cols:t,rows:e})}},r.prototype.updateRange=function(t){t<this.refreshStart&&(this.refreshStart=t),t>this.refreshEnd&&(this.refreshEnd=t)},r.prototype.maxRange=function(){this.refreshStart=0,this.refreshEnd=this.rows-1},r.prototype.setupStops=function(t){for(null!=t?this.tabs[t]||(t=this.prevStop(t)):(this.tabs={},t=0);t<this.cols;t+=8)this.tabs[t]=!0},r.prototype.prevStop=function(t){for(null==t&&(t=this.x);!this.tabs[--t]&&t>0;);return t>=this.cols?this.cols-1:t<0?0:t},r.prototype.nextStop=function(t){for(null==t&&(t=this.x);!this.tabs[++t]&&t<this.cols;);return t>=this.cols?this.cols-1:t<0?0:t},r.prototype.eraseRight=function(t,e){for(var s=this.lines[this.ybase+e],i=[this.eraseAttr()," ",1];t<this.cols;t++)s[t]=i;this.updateRange(e)},r.prototype.eraseLeft=function(t,e){var s=this.lines[this.ybase+e],i=[this.eraseAttr()," ",1];for(t++;t--;)s[t]=i;this.updateRange(e)},r.prototype.clear=function(){if(0!==this.ybase||0!==this.y){this.lines=[this.lines[this.ybase+this.y]],this.ydisp=0,this.ybase=0,this.y=0;for(var t=1;t<this.rows;t++)this.lines.push(this.blankLine());this.refresh(0,this.rows-1),this.emit("scroll",this.ydisp)}},r.prototype.eraseLine=function(t){this.eraseRight(0,t)},r.prototype.blankLine=function(t){for(var e=t?this.eraseAttr():this.defAttr,s=[e," ",1],i=[],r=0;r<this.cols;r++)i[r]=s;return i},r.prototype.ch=function(t){return t?[this.eraseAttr()," ",1]:[this.defAttr," ",1]},r.prototype.is=function(t){var e=this.termName;return 0===(e+"").indexOf(t)},r.prototype.handler=function(t){this.ybase!==this.ydisp&&this.scrollToBottom(),this.emit("data",t)},r.prototype.handleTitle=function(t){this.emit("title",t)},r.prototype.index=function(){this.y++,this.y>this.scrollBottom&&(this.y--,this.scroll()),this.state=g},r.prototype.reverseIndex=function(){var t;this.y--,this.y<this.scrollTop&&(this.y++,this.lines.splice(this.y+this.ybase,0,this.blankLine(!0)),t=this.rows-1-this.scrollBottom,this.lines.splice(this.rows-1+this.ybase-t+1,1),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom)),this.state=g},r.prototype.reset=function(){this.options.rows=this.rows,this.options.cols=this.cols;var t=this.customKeydownHandler;r.call(this,this.options),this.customKeydownHandler=t,this.refresh(0,this.rows-1),this.viewport.syncScrollArea()},r.prototype.tabSet=function(){this.tabs[this.x]=!0,this.state=g},r.prototype.cursorUp=function(t){var e=t[0];e<1&&(e=1),this.y-=e,this.y<0&&(this.y=0)},r.prototype.cursorDown=function(t){var e=t[0];e<1&&(e=1),this.y+=e,this.y>=this.rows&&(this.y=this.rows-1)},r.prototype.cursorForward=function(t){var e=t[0];e<1&&(e=1),this.x+=e,this.x>=this.cols&&(this.x=this.cols-1)},r.prototype.cursorBackward=function(t){var e=t[0];e<1&&(e=1),this.x-=e,this.x<0&&(this.x=0)},r.prototype.cursorPos=function(t){var e,s;e=t[0]-1,s=t.length>=2?t[1]-1:0,e<0?e=0:e>=this.rows&&(e=this.rows-1),s<0?s=0:s>=this.cols&&(s=this.cols-1),this.x=s,this.y=e},r.prototype.eraseInDisplay=function(t){var e;switch(t[0]){case 0:for(this.eraseRight(this.x,this.y),e=this.y+1;e<this.rows;e++)this.eraseLine(e);break;case 1:for(this.eraseLeft(this.x,this.y),e=this.y;e--;)this.eraseLine(e);break;case 2:for(e=this.rows;e--;)this.eraseLine(e);break;case 3:}},r.prototype.eraseInLine=function(t){switch(t[0]){case 0:this.eraseRight(this.x,this.y);break;case 1:this.eraseLeft(this.x,this.y);break;case 2:this.eraseLine(this.y)}},r.prototype.charAttributes=function(t){if(1===t.length&&0===t[0])return void(this.curAttr=this.defAttr);for(var e,s=t.length,i=0,r=this.curAttr>>18,o=this.curAttr>>9&511,a=511&this.curAttr;i<s;i++)e=t[i],e>=30&&e<=37?o=e-30:e>=40&&e<=47?a=e-40:e>=90&&e<=97?(e+=8,o=e-90):e>=100&&e<=107?(e+=8,a=e-100):0===e?(r=this.defAttr>>18,o=this.defAttr>>9&511,a=511&this.defAttr):1===e?r|=1:4===e?r|=2:5===e?r|=4:7===e?r|=8:8===e?r|=16:22===e?r&=-2:24===e?r&=-3:25===e?r&=-5:27===e?r&=-9:28===e?r&=-17:39===e?o=this.defAttr>>9&511:49===e?a=511&this.defAttr:38===e?2===t[i+1]?(i+=2,o=p(255&t[i],255&t[i+1],255&t[i+2]),o===-1&&(o=511),i+=2):5===t[i+1]&&(i+=2,e=255&t[i],o=e):48===e?2===t[i+1]?(i+=2,a=p(255&t[i],255&t[i+1],255&t[i+2]),a===-1&&(a=511),i+=2):5===t[i+1]&&(i+=2,e=255&t[i],a=e):100===e?(o=this.defAttr>>9&511,a=511&this.defAttr):this.error("Unknown SGR attribute: %d.",e);this.curAttr=r<<18|o<<9|a},r.prototype.deviceStatus=function(t){if(this.prefix){if("?"===this.prefix)switch(t[0]){case 6:this.send("\e[?"+(this.y+1)+";"+(this.x+1)+"R");break;case 15:break;case 25:break;case 26:break;case 53:}}else switch(t[0]){case 5:this.send("\e[0n");break;case 6:this.send("\e["+(this.y+1)+";"+(this.x+1)+"R")}},r.prototype.insertChars=function(t){var e,s,i,r;for(e=t[0],e<1&&(e=1),s=this.y+this.ybase,i=this.x,r=[this.eraseAttr()," ",1];e--&&i<this.cols;)this.lines[s].splice(i++,0,r),this.lines[s].pop()},r.prototype.cursorNextLine=function(t){var e=t[0];e<1&&(e=1),this.y+=e,this.y>=this.rows&&(this.y=this.rows-1),this.x=0},r.prototype.cursorPrecedingLine=function(t){var e=t[0];e<1&&(e=1),this.y-=e,this.y<0&&(this.y=0),this.x=0},r.prototype.cursorCharAbsolute=function(t){var e=t[0];e<1&&(e=1),this.x=e-1},r.prototype.insertLines=function(t){var e,s,i;for(e=t[0],e<1&&(e=1),s=this.y+this.ybase,i=this.rows-1-this.scrollBottom,i=this.rows-1+this.ybase-i+1;e--;)this.lines.splice(s,0,this.blankLine(!0)),this.lines.splice(i,1);this.updateRange(this.y),this.updateRange(this.scrollBottom)},r.prototype.deleteLines=function(t){var e,s,i;for(e=t[0],e<1&&(e=1),s=this.y+this.ybase,i=this.rows-1-this.scrollBottom,i=this.rows-1+this.ybase-i;e--;)this.lines.splice(i+1,0,this.blankLine(!0)),this.lines.splice(s,1);this.updateRange(this.y),this.updateRange(this.scrollBottom)},r.prototype.deleteChars=function(t){var e,s,i;for(e=t[0],e<1&&(e=1),s=this.y+this.ybase,i=[this.eraseAttr()," ",1];e--;)this.lines[s].splice(this.x,1),this.lines[s].push(i)},r.prototype.eraseChars=function(t){var e,s,i,r;for(e=t[0],e<1&&(e=1),s=this.y+this.ybase,i=this.x,r=[this.eraseAttr()," ",1];e--&&i<this.cols;)this.lines[s][i++]=r},r.prototype.charPosAbsolute=function(t){var e=t[0];e<1&&(e=1),this.x=e-1,this.x>=this.cols&&(this.x=this.cols-1)},r.prototype.HPositionRelative=function(t){var e=t[0];e<1&&(e=1),this.x+=e,this.x>=this.cols&&(this.x=this.cols-1)},r.prototype.sendDeviceAttributes=function(t){t[0]>0||(this.prefix?">"===this.prefix&&(this.is("xterm")?this.send("\e[>0;276;0c"):this.is("rxvt-unicode")?this.send("\e[>85;95;0c"):this.is("linux")?this.send(t[0]+"c"):this.is("screen")&&this.send("\e[>83;40003;0c")):this.is("xterm")||this.is("rxvt-unicode")||this.is("screen")?this.send("\e[?1;2c"):this.is("linux")&&this.send("\e[?6c"))},r.prototype.linePosAbsolute=function(t){var e=t[0];e<1&&(e=1),this.y=e-1,this.y>=this.rows&&(this.y=this.rows-1)},r.prototype.VPositionRelative=function(t){var e=t[0];e<1&&(e=1),this.y+=e,this.y>=this.rows&&(this.y=this.rows-1)},r.prototype.HVPosition=function(t){t[0]<1&&(t[0]=1),t[1]<1&&(t[1]=1),this.y=t[0]-1,this.y>=this.rows&&(this.y=this.rows-1),this.x=t[1]-1,this.x>=this.cols&&(this.x=this.cols-1)},r.prototype.setMode=function(t){if("object"!=typeof t)if(this.prefix){if("?"===this.prefix)switch(t){case 1:this.applicationCursor=!0;break;case 2:this.setgCharset(0,r.charsets.US),this.setgCharset(1,r.charsets.US),this.setgCharset(2,r.charsets.US),this.setgCharset(3,r.charsets.US);break;case 3:this.savedCols=this.cols,this.resize(132,this.rows);break;case 6:this.originMode=!0;break;case 7:this.wraparoundMode=!0;break;case 12:break;case 66:this.log("Serial port requested application keypad."),this.applicationKeypad=!0,this.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this.x10Mouse=9===t,this.vt200Mouse=1e3===t,this.normalMouse=t>1e3,this.mouseEvents=!0,this.element.style.cursor="default",this.log("Binding to mouse events.");break;case 1004:this.sendFocus=!0;break;case 1005:this.utfMouse=!0;break;case 1006:this.sgrMouse=!0;break;case 1015:this.urxvtMouse=!0;break;case 25:this.cursorHidden=!1;break;case 1049:case 47:case 1047:if(!this.normal){var e={lines:this.lines,ybase:this.ybase,ydisp:this.ydisp,x:this.x,y:this.y,scrollTop:this.scrollTop,scrollBottom:this.scrollBottom,tabs:this.tabs};this.reset(),this.normal=e,this.showCursor()}}}else switch(t){case 4:this.insertMode=!0;break;case 20:}else for(var s=t.length,i=0;i<s;i++)this.setMode(t[i])},r.prototype.resetMode=function(t){if("object"!=typeof t)if(this.prefix){if("?"===this.prefix)switch(t){case 1:this.applicationCursor=!1;break;case 3:132===this.cols&&this.savedCols&&this.resize(this.savedCols,this.rows),delete this.savedCols;break;case 6:this.originMode=!1;break;case 7:this.wraparoundMode=!1;break;case 12:break;case 66:this.log("Switching back to normal keypad."),this.applicationKeypad=!1,this.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this.x10Mouse=!1,this.vt200Mouse=!1,this.normalMouse=!1,this.mouseEvents=!1,this.element.style.cursor="";break;case 1004:this.sendFocus=!1;break;case 1005:this.utfMouse=!1;break;case 1006:this.sgrMouse=!1;break;case 1015:this.urxvtMouse=!1;break;case 25:this.cursorHidden=!0;break;case 1049:case 47:case 1047:this.normal&&(this.lines=this.normal.lines,this.ybase=this.normal.ybase,this.ydisp=this.normal.ydisp,this.x=this.normal.x,this.y=this.normal.y,this.scrollTop=this.normal.scrollTop,this.scrollBottom=this.normal.scrollBottom,this.tabs=this.normal.tabs,this.normal=null,this.refresh(0,this.rows-1),this.showCursor())}}else switch(t){case 4:this.insertMode=!1;break;case 20:}else for(var e=t.length,s=0;s<e;s++)this.resetMode(t[s])},r.prototype.setScrollRegion=function(t){this.prefix||(this.scrollTop=(t[0]||1)-1,this.scrollBottom=(t[1]||this.rows)-1,this.x=0,this.y=0)},r.prototype.saveCursor=function(t){this.savedX=this.x,this.savedY=this.y},r.prototype.restoreCursor=function(t){this.x=this.savedX||0,this.y=this.savedY||0},r.prototype.cursorForwardTab=function(t){for(var e=t[0]||1;e--;)this.x=this.nextStop()},r.prototype.scrollUp=function(t){for(var e=t[0]||1;e--;)this.lines.splice(this.ybase+this.scrollTop,1),this.lines.splice(this.ybase+this.scrollBottom,0,this.blankLine());this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom)},r.prototype.scrollDown=function(t){for(var e=t[0]||1;e--;)this.lines.splice(this.ybase+this.scrollBottom,1),this.lines.splice(this.ybase+this.scrollTop,0,this.blankLine());this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom)},r.prototype.initMouseTracking=function(t){},r.prototype.resetTitleModes=function(t){},r.prototype.cursorBackwardTab=function(t){for(var e=t[0]||1;e--;)this.x=this.prevStop()},r.prototype.repeatPrecedingCharacter=function(t){for(var e=t[0]||1,s=this.lines[this.ybase+this.y],i=s[this.x-1]||[this.defAttr," ",1];e--;)s[this.x++]=i},r.prototype.tabClear=function(t){var e=t[0];e<=0?delete this.tabs[this.x]:3===e&&(this.tabs={})},r.prototype.mediaCopy=function(t){},r.prototype.setResources=function(t){},r.prototype.disableModifiers=function(t){},r.prototype.setPointerMode=function(t){},r.prototype.softReset=function(t){this.cursorHidden=!1,this.insertMode=!1,this.originMode=!1,this.wraparoundMode=!1,this.applicationKeypad=!1,this.viewport.syncScrollArea(),this.applicationCursor=!1,this.scrollTop=0,this.scrollBottom=this.rows-1,this.curAttr=this.defAttr,this.x=this.y=0,this.charset=null,this.glevel=0,this.charsets=[null]},r.prototype.requestAnsiMode=function(t){},r.prototype.requestPrivateMode=function(t){},r.prototype.setConformanceLevel=function(t){},r.prototype.loadLEDs=function(t){},r.prototype.setCursorStyle=function(t){},r.prototype.setCharProtectionAttr=function(t){},r.prototype.restorePrivateValues=function(t){},r.prototype.setAttrInRectangle=function(t){for(var e,s,i=t[0],r=t[1],o=t[2],a=t[3],h=t[4];i<o+1;i++)for(e=this.lines[this.ybase+i],s=r;s<a;s++)e[s]=[h,e[s][1]];this.updateRange(t[0]),this.updateRange(t[2])},r.prototype.fillRectangle=function(t){for(var e,s,i=t[0],r=t[1],o=t[2],a=t[3],h=t[4];r<a+1;r++)for(e=this.lines[this.ybase+r],s=o;s<h;s++)e[s]=[e[s][0],String.fromCharCode(i)];this.updateRange(t[1]),this.updateRange(t[3])},r.prototype.enableLocatorReporting=function(t){t[0]>0},r.prototype.eraseRectangle=function(t){var e,s,i,r=t[0],o=t[1],a=t[2],h=t[3];for(i=[this.eraseAttr()," ",1];r<a+1;r++)for(e=this.lines[this.ybase+r],s=o;s<h;s++)e[s]=i;this.updateRange(t[0]),this.updateRange(t[2])},r.prototype.insertColumns=function(){for(var t,e=params[0],s=this.ybase+this.rows,i=[this.eraseAttr()," ",1];e--;)for(t=this.ybase;t<s;t++)this.lines[t].splice(this.x+1,0,i),this.lines[t].pop();this.maxRange()},r.prototype.deleteColumns=function(){for(var t,e=params[0],s=this.ybase+this.rows,i=[this.eraseAttr()," ",1];e--;)for(t=this.ybase;t<s;t++)this.lines[t].splice(this.x,1),this.lines[t].push(i);this.maxRange()},r.charsets={},r.charsets.SCLD={"`":"◆",a:"▒",b:"\t",c:"\f",d:"\r",e:"\n",f:"°",g:"±",h:"␤",i:"\v",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},r.charsets.UK=null,r.charsets.US=null,r.charsets.Dutch=null,r.charsets.Finnish=null,r.charsets.French=null,r.charsets.FrenchCanadian=null,r.charsets.German=null,r.charsets.Italian=null,r.charsets.NorwegianDanish=null,r.charsets.Spanish=null,r.charsets.Swedish=null,r.charsets.Swiss=null,r.charsets.ISOLatin=null,p._cache={},p.distance=function(t,e,s,i,r,o){return Math.pow(30*(t-i),2)+Math.pow(59*(e-r),2)+Math.pow(11*(s-o),2)};var A=function(t){function e(t){var e,s=0,r=i.length-1;if(t<i[0][0]||t>i[r][1])return!1;for(;r>=s;)if(e=Math.floor((s+r)/2),t>i[e][1])s=e+1;else{if(!(t<i[e][0]))return!0;r=e-1}return!1}function s(s){return 0===s?t.nul:s<32||s>=127&&s<160?t.control:e(s)?0:1+(s>=4352&&(s<=4447||9001==s||9002==s||s>=11904&&s<=42191&&12351!=s||s>=44032&&s<=55203||s>=63744&&s<=64255||s>=65040&&s<=65049||s>=65072&&s<=65135||s>=65280&&s<=65376||s>=65504&&s<=65510||s>=131072&&s<=196605||s>=196608&&s<=262141))}var i=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];return s}({nul:0,control:0});r.EventEmitter=y.EventEmitter,r.inherits=n,r.on=o,r.off=a,r.cancel=h,s.exports=r},{"./CompositionHelper.js":1,"./EventEmitter.js":2,"./Viewport.js":3,"./handlers/Clipboard.js":4,"./utils/Browser":5}]},{},[7])(7)});</script>
+    <script>!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Terminal=t()}}(function(){var t;return function t(e,i,s){function r(a,o){if(!i[a]){if(!e[a]){var h="function"==typeof require&&require;if(!o&&h)return h(a,!0);if(n)return n(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[a]={exports:{}};e[a][0].call(c.exports,function(t){var i=e[a][1][t];return r(i?i:t)},c,c.exports,t,e,i,s)}return i[a].exports}for(var n="function"==typeof require&&require,a=0;a<s.length;a++)r(s[a]);return r}({1:[function(t,e,i){"use strict";i.CHARSETS={},i.DEFAULT_CHARSET=i.CHARSETS.B,i.CHARSETS[0]={"`":"◆",a:"▒",b:"\t",c:"\f",d:"\r",e:"\n",f:"°",g:"±",h:"␤",i:"\v",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},i.CHARSETS.A={"#":"£"},i.CHARSETS.B=null,i.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},i.CHARSETS.C=i.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},i.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},i.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},i.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},i.CHARSETS.E=i.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},i.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},i.CHARSETS.H=i.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},{}],2:[function(t,e,i){"use strict";var s=function(){function t(t,e,i){this.textarea=t,this.compositionView=e,this.terminal=i,this.isComposing=!1,this.isSendingComposition=!1,this.compositionPosition={start:null,end:null}}return t.prototype.compositionstart=function(){this.isComposing=!0,this.compositionPosition.start=this.textarea.value.length,this.compositionView.textContent="",this.compositionView.classList.add("active")},t.prototype.compositionupdate=function(t){var e=this;this.compositionView.textContent=t.data,this.updateCompositionElements(),setTimeout(function(){e.compositionPosition.end=e.textarea.value.length},0)},t.prototype.compositionend=function(){this.finalizeComposition(!0)},t.prototype.keydown=function(t){if(this.isComposing||this.isSendingComposition){if(229===t.keyCode)return!1;if(16===t.keyCode||17===t.keyCode||18===t.keyCode)return!1;this.finalizeComposition(!1)}return 229!==t.keyCode||(this.handleAnyTextareaChanges(),!1)},t.prototype.finalizeComposition=function(t){var e=this;if(this.compositionView.classList.remove("active"),this.isComposing=!1,this.clearTextareaPosition(),t){var i={start:this.compositionPosition.start,end:this.compositionPosition.end};this.isSendingComposition=!0,setTimeout(function(){if(e.isSendingComposition){e.isSendingComposition=!1;var t=void 0;t=e.isComposing?e.textarea.value.substring(i.start,i.end):e.textarea.value.substring(i.start),e.terminal.handler(t)}},0)}else{this.isSendingComposition=!1;var s=this.textarea.value.substring(this.compositionPosition.start,this.compositionPosition.end);this.terminal.handler(s)}},t.prototype.handleAnyTextareaChanges=function(){var t=this,e=this.textarea.value;setTimeout(function(){if(!t.isComposing){var i=t.textarea.value,s=i.replace(e,"");s.length>0&&t.terminal.handler(s)}},0)},t.prototype.updateCompositionElements=function(t){var e=this;if(this.isComposing){var i=this.terminal.element.querySelector(".terminal-cursor");if(i){var s=this.terminal.element.querySelector(".xterm-rows"),r=s.offsetTop+i.offsetTop;this.compositionView.style.left=i.offsetLeft+"px",this.compositionView.style.top=r+"px",this.compositionView.style.height=i.offsetHeight+"px",this.compositionView.style.lineHeight=i.offsetHeight+"px";var n=this.compositionView.getBoundingClientRect();this.textarea.style.left=i.offsetLeft+"px",this.textarea.style.top=r+"px",this.textarea.style.width=n.width+"px",this.textarea.style.height=n.height+"px",this.textarea.style.lineHeight=n.height+"px"}t||setTimeout(function(){return e.updateCompositionElements(!0)},0)}},t.prototype.clearTextareaPosition=function(){this.textarea.style.left="",this.textarea.style.top=""},t}();i.CompositionHelper=s},{}],3:[function(t,e,i){"use strict";var s;!function(t){t.NUL="\0",t.SOH="\ 1",t.STX="\ 2",t.ETX="\ 3",t.EOT="\ 4",t.ENQ="\ 5",t.ACK="\ 6",t.BEL="\a",t.BS="\b",t.HT="\t",t.LF="\n",t.VT="\v",t.FF="\f",t.CR="\r",t.SO="\ e",t.SI="\ f",t.DLE="\10",t.DC1="\11",t.DC2="\12",t.DC3="\13",t.DC4="\14",t.NAK="\15",t.SYN="\16",t.ETB="\17",t.CAN="\18",t.EM="\19",t.SUB="\1a",t.ESC="\e",t.FS="\1c",t.GS="\1d",t.RS="\1e",t.US="\1f",t.SP=" ",t.DEL="\7f"}(s=i.C0||(i.C0={}))},{}],4:[function(t,e,i){"use strict";var s=function(){function t(){this._events=this._events||{}}return t.prototype.on=function(t,e){this._events[t]=this._events[t]||[],this._events[t].push(e)},t.prototype.off=function(t,e){if(this._events[t])for(var i=this._events[t],s=i.length;s--;)if(i[s]===e||i[s].listener===e)return void i.splice(s,1)},t.prototype.removeAllListeners=function(t){this._events[t]&&delete this._events[t]},t.prototype.once=function(t,e){function i(){var s=Array.prototype.slice.call(arguments);return this.off(t,i),e.apply(this,s)}return i.listener=e,this.on(t,i)},t.prototype.emit=function(t){if(this._events[t])for(var e=Array.prototype.slice.call(arguments,1),i=this._events[t],s=0;s<i.length;s++)i[s].apply(this,e)},t.prototype.listeners=function(t){return this._events[t]||[]},t}();i.EventEmitter=s},{}],5:[function(t,e,i){"use strict";var s=t("./EscapeSequences"),r=t("./Charsets"),n=function(){function t(t){this._terminal=t}return t.prototype.addChar=function(t,e){if(t>=" "){var i=a(e);this._terminal.charset&&this._terminal.charset[t]&&(t=this._terminal.charset[t]);var s=this._terminal.y+this._terminal.ybase;if(!i&&this._terminal.x)return void(this._terminal.lines.get(s)[this._terminal.x-1]&&(this._terminal.lines.get(s)[this._terminal.x-1][2]?this._terminal.lines.get(s)[this._terminal.x-1][1]+=t:this._terminal.lines.get(s)[this._terminal.x-2]&&(this._terminal.lines.get(s)[this._terminal.x-2][1]+=t),this._terminal.updateRange(this._terminal.y)));if(this._terminal.x+i-1>=this._terminal.cols)if(this._terminal.wraparoundMode)this._terminal.x=0,this._terminal.y++,this._terminal.y>this._terminal.scrollBottom&&(this._terminal.y--,this._terminal.scroll());else if(2===i)return;if(s=this._terminal.y+this._terminal.ybase,this._terminal.insertMode)for(var r=0;r<i;++r){var n=this._terminal.lines.get(this._terminal.y+this._terminal.ybase).pop();0===n[2]&&this._terminal.lines.get(s)[this._terminal.cols-2]&&2===this._terminal.lines.get(s)[this._terminal.cols-2][2]&&(this._terminal.lines.get(s)[this._terminal.cols-2]=[this._terminal.curAttr," ",1]),this._terminal.lines.get(s).splice(this._terminal.x,0,[this._terminal.curAttr," ",1])}this._terminal.lines.get(s)[this._terminal.x]=[this._terminal.curAttr,t,i],this._terminal.x++,this._terminal.updateRange(this._terminal.y),2===i&&(this._terminal.lines.get(s)[this._terminal.x]=[this._terminal.curAttr,"",0],this._terminal.x++)}},t.prototype.bell=function(){var t=this;this._terminal.visualBell&&(this._terminal.element.style.borderColor="white",setTimeout(function(){return t._terminal.element.style.borderColor=""},10),this._terminal.popOnBell&&this._terminal.focus())},t.prototype.lineFeed=function(){this._terminal.convertEol&&(this._terminal.x=0),this._terminal.y++,this._terminal.y>this._terminal.scrollBottom&&(this._terminal.y--,this._terminal.scroll()),this._terminal.x>=this._terminal.cols&&this._terminal.x--},t.prototype.carriageReturn=function(){this._terminal.x=0},t.prototype.backspace=function(){this._terminal.x>0&&this._terminal.x--},t.prototype.tab=function(){this._terminal.x=this._terminal.nextStop()},t.prototype.shiftOut=function(){this._terminal.setgLevel(1)},t.prototype.shiftIn=function(){this._terminal.setgLevel(0)},t.prototype.insertChars=function(t){var e,i,s,r;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,s=this._terminal.x,r=[this._terminal.eraseAttr()," ",1];e--&&s<this._terminal.cols;)this._terminal.lines.get(i).splice(s++,0,r),this._terminal.lines.get(i).pop()},t.prototype.cursorUp=function(t){var e=t[0];e<1&&(e=1),this._terminal.y-=e,this._terminal.y<0&&(this._terminal.y=0)},t.prototype.cursorDown=function(t){var e=t[0];e<1&&(e=1),this._terminal.y+=e,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x>=this._terminal.cols&&this._terminal.x--},t.prototype.cursorForward=function(t){var e=t[0];e<1&&(e=1),this._terminal.x+=e,this._terminal.x>=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},t.prototype.cursorBackward=function(t){var e=t[0];e<1&&(e=1),this._terminal.x>=this._terminal.cols&&this._terminal.x--,this._terminal.x-=e,this._terminal.x<0&&(this._terminal.x=0)},t.prototype.cursorNextLine=function(t){var e=t[0];e<1&&(e=1),this._terminal.y+=e,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x=0},t.prototype.cursorPrecedingLine=function(t){var e=t[0];e<1&&(e=1),this._terminal.y-=e,this._terminal.y<0&&(this._terminal.y=0),this._terminal.x=0},t.prototype.cursorCharAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.x=e-1},t.prototype.cursorPosition=function(t){var e,i;e=t[0]-1,i=t.length>=2?t[1]-1:0,e<0?e=0:e>=this._terminal.rows&&(e=this._terminal.rows-1),i<0?i=0:i>=this._terminal.cols&&(i=this._terminal.cols-1),this._terminal.x=i,this._terminal.y=e},t.prototype.cursorForwardTab=function(t){for(var e=t[0]||1;e--;)this._terminal.x=this._terminal.nextStop()},t.prototype.eraseInDisplay=function(t){var e;switch(t[0]){case 0:for(this._terminal.eraseRight(this._terminal.x,this._terminal.y),e=this._terminal.y+1;e<this._terminal.rows;e++)this._terminal.eraseLine(e);break;case 1:for(this._terminal.eraseLeft(this._terminal.x,this._terminal.y),e=this._terminal.y;e--;)this._terminal.eraseLine(e);break;case 2:for(e=this._terminal.rows;e--;)this._terminal.eraseLine(e);break;case 3:}},t.prototype.eraseInLine=function(t){switch(t[0]){case 0:this._terminal.eraseRight(this._terminal.x,this._terminal.y);break;case 1:this._terminal.eraseLeft(this._terminal.x,this._terminal.y);break;case 2:this._terminal.eraseLine(this._terminal.y)}},t.prototype.insertLines=function(t){var e,i,s;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,s=this._terminal.rows-1-this._terminal.scrollBottom,s=this._terminal.rows-1+this._terminal.ybase-s+1;e--;)this._terminal.lines.length===this._terminal.lines.maxLength&&(this._terminal.lines.trimStart(1),this._terminal.ybase--,this._terminal.ydisp--,i--,s--),this._terminal.lines.splice(i,0,this._terminal.blankLine(!0)),this._terminal.lines.splice(s,1);this._terminal.updateRange(this._terminal.y),this._terminal.updateRange(this._terminal.scrollBottom)},t.prototype.deleteLines=function(t){var e,i,s;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,s=this._terminal.rows-1-this._terminal.scrollBottom,s=this._terminal.rows-1+this._terminal.ybase-s;e--;)this._terminal.lines.length===this._terminal.lines.maxLength&&(this._terminal.lines.trimStart(1),this._terminal.ybase-=1,this._terminal.ydisp-=1),this._terminal.lines.splice(s+1,0,this._terminal.blankLine(!0)),this._terminal.lines.splice(i,1);this._terminal.updateRange(this._terminal.y),this._terminal.updateRange(this._terminal.scrollBottom)},t.prototype.deleteChars=function(t){var e,i,s;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,s=[this._terminal.eraseAttr()," ",1];e--;)this._terminal.lines.get(i).splice(this._terminal.x,1),this._terminal.lines.get(i).push(s)},t.prototype.scrollUp=function(t){for(var e=t[0]||1;e--;)this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollTop,1),this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollBottom,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.scrollTop),this._terminal.updateRange(this._terminal.scrollBottom)},t.prototype.scrollDown=function(t){for(var e=t[0]||1;e--;)this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollBottom,1),this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollTop,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.scrollTop),this._terminal.updateRange(this._terminal.scrollBottom)},t.prototype.eraseChars=function(t){var e,i,s,r;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,s=this._terminal.x,r=[this._terminal.eraseAttr()," ",1];e--&&s<this._terminal.cols;)this._terminal.lines.get(i)[s++]=r},t.prototype.cursorBackwardTab=function(t){for(var e=t[0]||1;e--;)this._terminal.x=this._terminal.prevStop()},t.prototype.charPosAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.x=e-1,this._terminal.x>=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},t.prototype.HPositionRelative=function(t){var e=t[0];e<1&&(e=1),this._terminal.x+=e,this._terminal.x>=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},t.prototype.repeatPrecedingCharacter=function(t){for(var e=t[0]||1,i=this._terminal.lines.get(this._terminal.ybase+this._terminal.y),s=i[this._terminal.x-1]||[this._terminal.defAttr," ",1];e--;)i[this._terminal.x++]=s},t.prototype.sendDeviceAttributes=function(t){t[0]>0||(this._terminal.prefix?">"===this._terminal.prefix&&(this._terminal.is("xterm")?this._terminal.send(s.C0.ESC+"[>0;276;0c"):this._terminal.is("rxvt-unicode")?this._terminal.send(s.C0.ESC+"[>85;95;0c"):this._terminal.is("linux")?this._terminal.send(t[0]+"c"):this._terminal.is("screen")&&this._terminal.send(s.C0.ESC+"[>83;40003;0c")):this._terminal.is("xterm")||this._terminal.is("rxvt-unicode")||this._terminal.is("screen")?this._terminal.send(s.C0.ESC+"[?1;2c"):this._terminal.is("linux")&&this._terminal.send(s.C0.ESC+"[?6c"))},t.prototype.linePosAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.y=e-1,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1)},t.prototype.VPositionRelative=function(t){var e=t[0];e<1&&(e=1),this._terminal.y+=e,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x>=this._terminal.cols&&this._terminal.x--},t.prototype.HVPosition=function(t){t[0]<1&&(t[0]=1),t[1]<1&&(t[1]=1),this._terminal.y=t[0]-1,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x=t[1]-1,this._terminal.x>=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},t.prototype.tabClear=function(t){var e=t[0];e<=0?delete this._terminal.tabs[this._terminal.x]:3===e&&(this._terminal.tabs={})},t.prototype.setMode=function(t){if(t.length>1)for(var e=0;e<t.length;e++)this.setMode([t[e]]);else if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 1:this._terminal.applicationCursor=!0;break;case 2:this._terminal.setgCharset(0,r.DEFAULT_CHARSET),this._terminal.setgCharset(1,r.DEFAULT_CHARSET),this._terminal.setgCharset(2,r.DEFAULT_CHARSET),this._terminal.setgCharset(3,r.DEFAULT_CHARSET);break;case 3:this._terminal.savedCols=this._terminal.cols,this._terminal.resize(132,this._terminal.rows);break;case 6:this._terminal.originMode=!0;break;case 7:this._terminal.wraparoundMode=!0;break;case 12:break;case 66:this._terminal.log("Serial port requested application keypad."),this._terminal.applicationKeypad=!0,this._terminal.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this._terminal.x10Mouse=9===t[0],this._terminal.vt200Mouse=1e3===t[0],this._terminal.normalMouse=t[0]>1e3,this._terminal.mouseEvents=!0,this._terminal.element.style.cursor="default",this._terminal.log("Binding to mouse events.");break;case 1004:this._terminal.sendFocus=!0;break;case 1005:this._terminal.utfMouse=!0;break;case 1006:this._terminal.sgrMouse=!0;break;case 1015:this._terminal.urxvtMouse=!0;break;case 25:this._terminal.cursorHidden=!1;break;case 1049:case 47:case 1047:if(!this._terminal.normal){var i={lines:this._terminal.lines,ybase:this._terminal.ybase,ydisp:this._terminal.ydisp,x:this._terminal.x,y:this._terminal.y,scrollTop:this._terminal.scrollTop,scrollBottom:this._terminal.scrollBottom,tabs:this._terminal.tabs};this._terminal.reset(),this._terminal.viewport.syncScrollArea(),this._terminal.normal=i,this._terminal.showCursor()}}}else switch(t[0]){case 4:this._terminal.insertMode=!0;break;case 20:}},t.prototype.resetMode=function(t){if(t.length>1)for(var e=0;e<t.length;e++)this.resetMode([t[e]]);else if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 1:this._terminal.applicationCursor=!1;break;case 3:132===this._terminal.cols&&this._terminal.savedCols&&this._terminal.resize(this._terminal.savedCols,this._terminal.rows),delete this._terminal.savedCols;break;case 6:this._terminal.originMode=!1;break;case 7:this._terminal.wraparoundMode=!1;break;case 12:break;case 66:this._terminal.log("Switching back to normal keypad."),this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this._terminal.x10Mouse=!1,this._terminal.vt200Mouse=!1,this._terminal.normalMouse=!1,this._terminal.mouseEvents=!1,this._terminal.element.style.cursor="";break;case 1004:this._terminal.sendFocus=!1;break;case 1005:this._terminal.utfMouse=!1;break;case 1006:this._terminal.sgrMouse=!1;break;case 1015:this._terminal.urxvtMouse=!1;break;case 25:this._terminal.cursorHidden=!0;break;case 1049:case 47:case 1047:this._terminal.normal&&(this._terminal.lines=this._terminal.normal.lines,this._terminal.ybase=this._terminal.normal.ybase,this._terminal.ydisp=this._terminal.normal.ydisp,this._terminal.x=this._terminal.normal.x,this._terminal.y=this._terminal.normal.y,this._terminal.scrollTop=this._terminal.normal.scrollTop,this._terminal.scrollBottom=this._terminal.normal.scrollBottom,this._terminal.tabs=this._terminal.normal.tabs,this._terminal.normal=null,this._terminal.refresh(0,this._terminal.rows-1),this._terminal.viewport.syncScrollArea(),this._terminal.showCursor())}}else switch(t[0]){case 4:this._terminal.insertMode=!1;break;case 20:}},t.prototype.charAttributes=function(t){if(1===t.length&&0===t[0])return void(this._terminal.curAttr=this._terminal.defAttr);for(var e,i=t.length,s=0,r=this._terminal.curAttr>>18,n=this._terminal.curAttr>>9&511,a=511&this._terminal.curAttr;s<i;s++)e=t[s],e>=30&&e<=37?n=e-30:e>=40&&e<=47?a=e-40:e>=90&&e<=97?(e+=8,n=e-90):e>=100&&e<=107?(e+=8,a=e-100):0===e?(r=this._terminal.defAttr>>18,n=this._terminal.defAttr>>9&511,a=511&this._terminal.defAttr):1===e?r|=1:4===e?r|=2:5===e?r|=4:7===e?r|=8:8===e?r|=16:22===e?r&=-2:24===e?r&=-3:25===e?r&=-5:27===e?r&=-9:28===e?r&=-17:39===e?n=this._terminal.defAttr>>9&511:49===e?a=511&this._terminal.defAttr:38===e?2===t[s+1]?(s+=2,n=this._terminal.matchColor(255&t[s],255&t[s+1],255&t[s+2]),n===-1&&(n=511),s+=2):5===t[s+1]&&(s+=2,e=255&t[s],n=e):48===e?2===t[s+1]?(s+=2,a=this._terminal.matchColor(255&t[s],255&t[s+1],255&t[s+2]),a===-1&&(a=511),s+=2):5===t[s+1]&&(s+=2,e=255&t[s],a=e):100===e?(n=this._terminal.defAttr>>9&511,a=511&this._terminal.defAttr):this._terminal.error("Unknown SGR attribute: %d.",e);this._terminal.curAttr=r<<18|n<<9|a},t.prototype.deviceStatus=function(t){if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 6:this._terminal.send(s.C0.ESC+"[?"+(this._terminal.y+1)+";"+(this._terminal.x+1)+"R");break;case 15:break;case 25:break;case 26:break;case 53:}}else switch(t[0]){case 5:this._terminal.send(s.C0.ESC+"[0n");break;case 6:this._terminal.send(s.C0.ESC+"["+(this._terminal.y+1)+";"+(this._terminal.x+1)+"R")}},t.prototype.softReset=function(t){this._terminal.cursorHidden=!1,this._terminal.insertMode=!1,this._terminal.originMode=!1,this._terminal.wraparoundMode=!1,this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea(),this._terminal.applicationCursor=!1,this._terminal.scrollTop=0,this._terminal.scrollBottom=this._terminal.rows-1,this._terminal.curAttr=this._terminal.defAttr,this._terminal.x=this._terminal.y=0,this._terminal.charset=null,this._terminal.glevel=0,this._terminal.charsets=[null]},t.prototype.setCursorStyle=function(t){var e=t[0]<1?1:t[0];switch(e){case 1:case 2:this._terminal.setOption("cursorStyle","block");break;case 3:case 4:this._terminal.setOption("cursorStyle","underline");break;case 5:case 6:this._terminal.setOption("cursorStyle","bar")}var i=e%2===1;this._terminal.setOption("cursorBlink",i)},t.prototype.setScrollRegion=function(t){this._terminal.prefix||(this._terminal.scrollTop=(t[0]||1)-1,this._terminal.scrollBottom=(t[1]&&t[1]<=this._terminal.rows?t[1]:this._terminal.rows)-1,this._terminal.x=0,this._terminal.y=0)},t.prototype.saveCursor=function(t){this._terminal.savedX=this._terminal.x,this._terminal.savedY=this._terminal.y},t.prototype.restoreCursor=function(t){this._terminal.x=this._terminal.savedX||0,this._terminal.y=this._terminal.savedY||0},t}();i.InputHandler=n;var a=function(t){function e(t){var e,i=0,s=r.length-1;if(t<r[0][0]||t>r[s][1])return!1;for(;s>=i;)if(e=Math.floor((i+s)/2),t>r[e][1])i=e+1;else{if(!(t<r[e][0]))return!0;s=e-1}return!1}function i(i){return 0===i?t.nul:i<32||i>=127&&i<160?t.control:e(i)?0:s(i)?2:1}function s(t){return t>=4352&&(t<=4447||9001===t||9002===t||t>=11904&&t<=42191&&12351!==t||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65135||t>=65280&&t<=65376||t>=65504&&t<=65510||t>=131072&&t<=196605||t>=196608&&t<=262141)}var r=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];return i}({nul:0,control:0})},{"./Charsets":1,"./EscapeSequences":3}],6:[function(t,e,i){"use strict";var s=t("./EscapeSequences"),r=t("./Charsets"),n={};n[s.C0.BEL]=function(t,e){return e.bell()},n[s.C0.LF]=function(t,e){return e.lineFeed()},n[s.C0.VT]=n[s.C0.LF],n[s.C0.FF]=n[s.C0.LF],n[s.C0.CR]=function(t,e){return e.carriageReturn()},n[s.C0.BS]=function(t,e){return e.backspace()},n[s.C0.HT]=function(t,e){return e.tab()},n[s.C0.SO]=function(t,e){return e.shiftOut()},n[s.C0.SI]=function(t,e){return e.shiftIn()},n[s.C0.ESC]=function(t,e){return t.setState(l.ESCAPED)};var a={};a["["]=function(t,e){e.params=[],e.currentParam=0,t.setState(l.CSI_PARAM)},a["]"]=function(t,e){e.params=[],e.currentParam=0,t.setState(l.OSC)},a.P=function(t,e){e.params=[],e.currentParam=0,t.setState(l.DCS)},a._=function(t,e){t.setState(l.IGNORE)},a["^"]=function(t,e){t.setState(l.IGNORE)},a.c=function(t,e){e.reset()},a.E=function(t,e){e.x=0,e.index(),t.setState(l.NORMAL)},a.D=function(t,e){e.index(),t.setState(l.NORMAL)},a.M=function(t,e){e.reverseIndex(),t.setState(l.NORMAL)},a["%"]=function(t,e){e.setgLevel(0),e.setgCharset(0,r.DEFAULT_CHARSET),t.setState(l.NORMAL),t.skipNextChar()},a[s.C0.CAN]=function(t){return t.setState(l.NORMAL)};var o={};o["?"]=function(t){return t.setPrefix("?")},o[">"]=function(t){return t.setPrefix(">")},o["!"]=function(t){return t.setPrefix("!")},o[0]=function(t){return t.setParam(10*t.getParam())},o[1]=function(t){return t.setParam(10*t.getParam()+1)},o[2]=function(t){return t.setParam(10*t.getParam()+2)},o[3]=function(t){return t.setParam(10*t.getParam()+3)},o[4]=function(t){return t.setParam(10*t.getParam()+4)},o[5]=function(t){return t.setParam(10*t.getParam()+5)},o[6]=function(t){return t.setParam(10*t.getParam()+6)},o[7]=function(t){return t.setParam(10*t.getParam()+7)},o[8]=function(t){return t.setParam(10*t.getParam()+8)},o[9]=function(t){return t.setParam(10*t.getParam()+9)},o.$=function(t){return t.setPostfix("$")},o['"']=function(t){return t.setPostfix('"')},o[" "]=function(t){return t.setPostfix(" ")},o["'"]=function(t){return t.setPostfix("'")},o[";"]=function(t){return t.finalizeParam()},o[s.C0.CAN]=function(t){return t.setState(l.NORMAL)};var h={};h["@"]=function(t,e,i){return t.insertChars(e)},h.A=function(t,e,i){return t.cursorUp(e)},h.B=function(t,e,i){return t.cursorDown(e)},h.C=function(t,e,i){return t.cursorForward(e)},h.D=function(t,e,i){return t.cursorBackward(e)},h.E=function(t,e,i){return t.cursorNextLine(e)},h.F=function(t,e,i){return t.cursorPrecedingLine(e)},h.G=function(t,e,i){return t.cursorCharAbsolute(e)},h.H=function(t,e,i){return t.cursorPosition(e)},h.I=function(t,e,i){return t.cursorForwardTab(e)},h.J=function(t,e,i){return t.eraseInDisplay(e)},h.K=function(t,e,i){return t.eraseInLine(e)},h.L=function(t,e,i){return t.insertLines(e)},h.M=function(t,e,i){return t.deleteLines(e)},h.P=function(t,e,i){return t.deleteChars(e)},h.S=function(t,e,i){return t.scrollUp(e)},h.T=function(t,e,i){e.length<2&&!i&&t.scrollDown(e)},h.X=function(t,e,i){return t.eraseChars(e)},h.Z=function(t,e,i){return t.cursorBackwardTab(e)},h["`"]=function(t,e,i){return t.charPosAbsolute(e)},h.a=function(t,e,i){return t.HPositionRelative(e)},h.b=function(t,e,i){return t.repeatPrecedingCharacter(e)},h.c=function(t,e,i){return t.sendDeviceAttributes(e)},h.d=function(t,e,i){return t.linePosAbsolute(e)},h.e=function(t,e,i){return t.VPositionRelative(e)},h.f=function(t,e,i){return t.HVPosition(e)},h.g=function(t,e,i){return t.tabClear(e)},h.h=function(t,e,i){return t.setMode(e)},h.l=function(t,e,i){return t.resetMode(e)},h.m=function(t,e,i){return t.charAttributes(e)},h.n=function(t,e,i){return t.deviceStatus(e)},h.p=function(t,e,i){switch(i){case"!":t.softReset(e)}},h.q=function(t,e,i,s){" "===s&&t.setCursorStyle(e)},h.r=function(t,e){return t.setScrollRegion(e)},h.s=function(t,e){return t.saveCursor(e)},h.u=function(t,e){return t.restoreCursor(e)},h[s.C0.CAN]=function(t,e,i,s,r){return r.setState(l.NORMAL)};var l;!function(t){t[t.NORMAL=0]="NORMAL",t[t.ESCAPED=1]="ESCAPED",t[t.CSI_PARAM=2]="CSI_PARAM",t[t.CSI=3]="CSI",t[t.OSC=4]="OSC",t[t.CHARSET=5]="CHARSET",t[t.DCS=6]="DCS",t[t.IGNORE=7]="IGNORE"}(l||(l={}));var c=function(){function t(t,e){this._inputHandler=t,this._terminal=e,this._state=l.NORMAL}return t.prototype.parse=function(t){var e,i,c,u,m=t.length;for(this._position=0,this._terminal.surrogate_high&&(t=this._terminal.surrogate_high+t,this._terminal.surrogate_high="");this._position<m;this._position++){if(i=t[this._position],c=t.charCodeAt(this._position),55296<=c&&c<=56319){if(u=t.charCodeAt(this._position+1),isNaN(u)){this._terminal.surrogate_high=i;continue}c=1024*(c-55296)+(u-56320)+65536,i+=t.charAt(this._position+1)}if(!(56320<=c&&c<=57343))switch(this._state){case l.NORMAL:i in n?n[i](this,this._inputHandler):this._inputHandler.addChar(i,c);break;case l.ESCAPED:if(i in a){a[i](this,this._terminal);break}switch(i){case"(":case")":case"*":case"+":case"-":case".":switch(i){case"(":this._terminal.gcharset=0;break;case")":this._terminal.gcharset=1;break;case"*":this._terminal.gcharset=2;break;case"+":this._terminal.gcharset=3;break;case"-":this._terminal.gcharset=1;break;case".":this._terminal.gcharset=2}this._state=l.CHARSET;break;case"/":this._terminal.gcharset=3,this._state=l.CHARSET,this._position--;break;case"N":break;case"O":break;case"n":this._terminal.setgLevel(2);break;case"o":this._terminal.setgLevel(3);break;case"|":this._terminal.setgLevel(3);break;case"}":this._terminal.setgLevel(2);break;case"~":this._terminal.setgLevel(1);break;case"7":this._inputHandler.saveCursor(),this._state=l.NORMAL;break;case"8":this._inputHandler.restoreCursor(),this._state=l.NORMAL;break;case"#":this._state=l.NORMAL,this._position++;break;case"H":this._terminal.tabSet(),this._state=l.NORMAL;break;case"=":this._terminal.log("Serial port requested application keypad."),this._terminal.applicationKeypad=!0,this._terminal.viewport.syncScrollArea(),this._state=l.NORMAL;break;case">":this._terminal.log("Switching back to normal keypad."),this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea(),this._state=l.NORMAL;break;default:this._state=l.NORMAL,this._terminal.error("Unknown ESC control: %s.",i)}break;case l.CHARSET:i in r.CHARSETS?(e=r.CHARSETS[i],"/"===i&&this.skipNextChar()):e=r.DEFAULT_CHARSET,this._terminal.setgCharset(this._terminal.gcharset,e),this._terminal.gcharset=null,this._state=l.NORMAL;break;case l.OSC:if(i===s.C0.ESC||i===s.C0.BEL){switch(i===s.C0.ESC&&this._position++,this._terminal.params.push(this._terminal.currentParam),this._terminal.params[0]){case 0:case 1:case 2:this._terminal.params[1]&&(this._terminal.title=this._terminal.params[1],this._terminal.handleTitle(this._terminal.title));break;case 3:break;case 4:case 5:break;case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:break;case 46:break;case 50:break;case 51:break;case 52:break;case 104:case 105:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:}this._terminal.params=[],this._terminal.currentParam=0,this._state=l.NORMAL}else this._terminal.params.length?this._terminal.currentParam+=i:i>="0"&&i<="9"?this._terminal.currentParam=10*this._terminal.currentParam+i.charCodeAt(0)-48:";"===i&&(this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam="");break;case l.CSI_PARAM:if(i in o){o[i](this);break}this.finalizeParam(),this._state=l.CSI;case l.CSI:i in h?h[i](this._inputHandler,this._terminal.params,this._terminal.prefix,this._terminal.postfix,this):this._terminal.error("Unknown CSI code: %s.",i),this._state=l.NORMAL,this._terminal.prefix="",this._terminal.postfix="";break;case l.DCS:if(i===s.C0.ESC||i===s.C0.BEL){switch(i===s.C0.ESC&&this._position++,this._terminal.prefix){case"":break;case"$q":var p=this._terminal.currentParam,f=!1;switch(p){case'"q':p='0"q';break;case'"p':p='61"p';break;case"r":p=""+(this._terminal.scrollTop+1)+";"+(this._terminal.scrollBottom+1)+"r";break;case"m":p="0m";break;default:this._terminal.error("Unknown DCS Pt: %s.",p),p=""}this._terminal.send(s.C0.ESC+"P"+ +f+"$r"+p+s.C0.ESC+"\\");break;case"+p":break;case"+q":p=this._terminal.currentParam,f=!1,this._terminal.send(s.C0.ESC+"P"+ +f+"+r"+p+s.C0.ESC+"\\");break;default:this._terminal.error("Unknown DCS prefix: %s.",this._terminal.prefix)}this._terminal.currentParam=0,
+this._terminal.prefix="",this._state=l.NORMAL}else this._terminal.currentParam?this._terminal.currentParam+=i:this._terminal.prefix||"$"===i||"+"===i?2===this._terminal.prefix.length?this._terminal.currentParam=i:this._terminal.prefix+=i:this._terminal.currentParam=i;break;case l.IGNORE:i!==s.C0.ESC&&i!==s.C0.BEL||(i===s.C0.ESC&&this._position++,this._state=l.NORMAL)}}},t.prototype.setState=function(t){this._state=t},t.prototype.setPrefix=function(t){this._terminal.prefix=t},t.prototype.setPostfix=function(t){this._terminal.postfix=t},t.prototype.setParam=function(t){this._terminal.currentParam=t},t.prototype.getParam=function(){return this._terminal.currentParam},t.prototype.finalizeParam=function(){this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam=0},t.prototype.skipNextChar=function(){this._position++},t}();i.Parser=c},{"./Charsets":1,"./EscapeSequences":3}],7:[function(t,e,i){"use strict";function s(t){var e=t.getElementsByTagName("body")[0],i=t.createElement("span");i.innerHTML="hello world",e.appendChild(i);var s=i.scrollWidth;i.style.fontWeight="bold";var r=i.scrollWidth;return e.removeChild(i),s!==r}var r,n=5;!function(t){t[t.BOLD=1]="BOLD",t[t.UNDERLINE=2]="UNDERLINE",t[t.BLINK=4]="BLINK",t[t.INVERSE=8]="INVERSE",t[t.INVISIBLE=16]="INVISIBLE"}(r||(r={}));var a=null,o=function(){function t(t){this._terminal=t,this._refreshRowsQueue=[],this._refreshFramesSkipped=0,this._refreshAnimationFrame=null,null===a&&(a=s(this._terminal.document))}return t.prototype.queueRefresh=function(t,e){this._refreshRowsQueue.push({start:t,end:e}),this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(this._refreshLoop.bind(this)))},t.prototype._refreshLoop=function(){var t=this._terminal.writeBuffer.length>0&&this._refreshFramesSkipped++<=n;if(t)return void(this._refreshAnimationFrame=window.requestAnimationFrame(this._refreshLoop.bind(this)));this._refreshFramesSkipped=0;var e,i;if(this._refreshRowsQueue.length>4)e=0,i=this._terminal.rows-1;else{e=this._refreshRowsQueue[0].start,i=this._refreshRowsQueue[0].end;for(var s=1;s<this._refreshRowsQueue.length;s++)this._refreshRowsQueue[s].start<e&&(e=this._refreshRowsQueue[s].start),this._refreshRowsQueue[s].end>i&&(i=this._refreshRowsQueue[s].end)}this._refreshRowsQueue=[],this._refreshAnimationFrame=null,this._refresh(e,i)},t.prototype._refresh=function(t,e){var i,s,n,o,h,l,c,u,m,p,f,_,d,y,C;document.activeElement;for(e-t>=this._terminal.rows/2&&(C=this._terminal.element.parentNode,C&&this._terminal.element.removeChild(this._terminal.rowContainer)),u=this._terminal.cols,s=t,e>=this._terminal.rows&&(this._terminal.log("`end` is too large. Most likely a bad CSR."),e=this._terminal.rows-1);s<=e;s++)if(y=s+this._terminal.ydisp,o=this._terminal.lines.get(y),o&&this._terminal.children[s]){for(h="",i=this._terminal.y===s-(this._terminal.ybase-this._terminal.ydisp)&&this._terminal.cursorState&&!this._terminal.cursorHidden?this._terminal.x:-1,p=this._terminal.defAttr,n=0;n<u;n++)if(o[n]&&(m=o[n][0],l=o[n][1],c=o[n][2])){if(n===i&&(m=-1),m!==p&&(p!==this._terminal.defAttr&&(h+="</span>"),m!==this._terminal.defAttr))if(m===-1)h+='<span class="reverse-video terminal-cursor">';else{var g=[];f=511&m,_=m>>9&511,d=m>>18,d&r.BOLD&&(a||g.push("xterm-bold"),_<8&&(_+=8)),d&r.UNDERLINE&&g.push("xterm-underline"),d&r.BLINK&&g.push("xterm-blink"),d&r.INVERSE&&(f=[_,_=f][0],1&d&&_<8&&(_+=8)),d&r.INVISIBLE&&g.push("xterm-hidden"),d&r.INVERSE&&(257===f&&(f=15),256===_&&(_=0)),f<256&&g.push("xterm-bg-color-"+f),_<256&&g.push("xterm-color-"+_),h+="<span",g.length&&(h+=' class="'+g.join(" ")+'"'),h+=">"}switch(2===c&&(h+='<span class="xterm-wide-char">'),l){case"&":h+="&amp;";break;case"<":h+="&lt;";break;case">":h+="&gt;";break;default:h+=l<=" "?"&nbsp;":l}2===c&&(h+="</span>"),p=m}p!==this._terminal.defAttr&&(h+="</span>"),this._terminal.children[s].innerHTML=h}C&&this._terminal.element.appendChild(this._terminal.rowContainer),this._terminal.emit("refresh",{element:this._terminal.element,start:t,end:e})},t}();i.Renderer=o},{}],8:[function(t,e,i){"use strict";var s=function(){function t(t,e,i,s){this.terminal=t,this.viewportElement=e,this.scrollArea=i,this.charMeasure=s,this.currentRowHeight=0,this.lastRecordedBufferLength=0,this.lastRecordedViewportHeight=0,this.terminal.on("scroll",this.syncScrollArea.bind(this)),this.terminal.on("resize",this.syncScrollArea.bind(this)),this.viewportElement.addEventListener("scroll",this.onScroll.bind(this)),this.syncScrollArea()}return t.prototype.refresh=function(){if(this.charMeasure.height>0){var t=this.charMeasure.height!==this.currentRowHeight;t&&(this.currentRowHeight=this.charMeasure.height,this.viewportElement.style.lineHeight=this.charMeasure.height+"px",this.terminal.rowContainer.style.lineHeight=this.charMeasure.height+"px");var e=this.lastRecordedViewportHeight!==this.terminal.rows;(t||e)&&(this.lastRecordedViewportHeight=this.terminal.rows,this.viewportElement.style.height=this.charMeasure.height*this.terminal.rows+"px"),this.scrollArea.style.height=this.charMeasure.height*this.lastRecordedBufferLength+"px"}},t.prototype.syncScrollArea=function(){this.lastRecordedBufferLength!==this.terminal.lines.length?(this.lastRecordedBufferLength=this.terminal.lines.length,this.refresh()):this.lastRecordedViewportHeight!==this.terminal.rows?this.refresh():this.charMeasure.height!==this.currentRowHeight&&this.refresh();var t=this.terminal.ydisp*this.currentRowHeight;this.viewportElement.scrollTop!==t&&(this.viewportElement.scrollTop=t)},t.prototype.onScroll=function(t){var e=Math.round(this.viewportElement.scrollTop/this.currentRowHeight),i=e-this.terminal.ydisp;this.terminal.scrollDisp(i,!0)},t.prototype.onWheel=function(t){if(0!==t.deltaY){var e=1;t.deltaMode===WheelEvent.DOM_DELTA_LINE?e=this.currentRowHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e=this.currentRowHeight*this.terminal.rows),this.viewportElement.scrollTop+=t.deltaY*e,t.preventDefault()}},t}();i.Viewport=s},{}],9:[function(t,e,i){"use strict";function s(t){var e=String.fromCharCode(32),i=String.fromCharCode(160),s=new RegExp(i,"g"),r=t.split("\n").map(function(t){var i=t.replace(/\s+$/g,"").replace(s,e);return i}).join("\n");return r}function r(t,e){var i=window.getSelection().toString(),r=s(i);e.browser.isMSIE?window.clipboardData.setData("Text",r):t.clipboardData.setData("text/plain",r),t.preventDefault()}function n(t,e){t.stopPropagation();var i,s=function(i){return e.handler(i),e.textarea.value="",e.cancel(t)};e.browser.isMSIE?window.clipboardData&&(i=window.clipboardData.getData("Text"),s(i)):t.clipboardData&&(i=t.clipboardData.getData("text/plain"),s(i))}function a(t,e){var i=document.getSelection(),r=s(i.toString()),n=!1,a=t.clientX,o=t.clientY;if(i.rangeCount){for(var h=i.getRangeAt(0),l=h.getClientRects(),c=0;c<l.length;c++){var u=l[c];if(n=a>u.left&&a<u.right&&o>u.top&&o<u.bottom)break}!r.match(/^\s$/)&&r.length||(n=!1)}n||(e.textarea.style.position="fixed",e.textarea.style.width="20px",e.textarea.style.height="20px",e.textarea.style.left=a-10+"px",e.textarea.style.top=o-10+"px",e.textarea.style.zIndex="1000",e.textarea.focus(),setTimeout(function(){e.textarea.style.position=null,e.textarea.style.width=null,e.textarea.style.height=null,e.textarea.style.left=null,e.textarea.style.top=null,e.textarea.style.zIndex=null},4))}i.prepareTextForClipboard=s,i.copyHandler=r,i.pasteHandler=n,i.rightClickHandler=a},{}],10:[function(t,e,i){"use strict";var s=t("./Generic"),r="undefined"==typeof navigator,n=r?"node":navigator.userAgent,a=r?"node":navigator.platform;i.isFirefox=!!~n.indexOf("Firefox"),i.isMSIE=!!~n.indexOf("MSIE")||!!~n.indexOf("Trident"),i.isMac=s.contains(["Macintosh","MacIntel","MacPPC","Mac68K"],a),i.isIpad="iPad"===a,i.isIphone="iPhone"===a,i.isMSWindows=s.contains(["Windows","Win16","Win32","WinCE"],a)},{"./Generic":13}],11:[function(t,e,i){"use strict";var s=this&&this.__extends||function(t,e){function i(){this.constructor=t}for(var s in e)e.hasOwnProperty(s)&&(t[s]=e[s]);t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},r=t("../EventEmitter.js"),n=function(t){function e(e){var i=t.call(this)||this;return i._parentElement=e,i}return s(e,t),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),e.prototype.measure=function(){var t=this;this._measureElement?this._doMeasure():(this._measureElement=document.createElement("span"),this._measureElement.style.position="absolute",this._measureElement.style.top="0",this._measureElement.style.left="-9999em",this._measureElement.textContent="W",this._parentElement.appendChild(this._measureElement),setTimeout(function(){return t._doMeasure()},0))},e.prototype._doMeasure=function(){var t=this._measureElement.getBoundingClientRect();0!==t.width&&0!==t.height&&(this._width===t.width&&this._height===t.height||(this._width=t.width,this._height=t.height,this.emit("charsizechanged")))},e}(r.EventEmitter);i.CharMeasure=n},{"../EventEmitter.js":4}],12:[function(t,e,i){"use strict";var s=function(){function t(t){this._array=new Array(t),this._startIndex=0,this._length=0}return Object.defineProperty(t.prototype,"maxLength",{get:function(){return this._array.length},set:function(t){for(var e=new Array(t),i=0;i<Math.min(t,this.length);i++)e[i]=this._array[this._getCyclicIndex(i)];this._array=e,this._startIndex=0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._length},set:function(t){if(t>this._length)for(var e=this._length;e<t;e++)this._array[e]=void 0;this._length=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"forEach",{get:function(){return this._array.forEach},enumerable:!0,configurable:!0}),t.prototype.get=function(t){return this._array[this._getCyclicIndex(t)]},t.prototype.set=function(t,e){this._array[this._getCyclicIndex(t)]=e},t.prototype.push=function(t){this._array[this._getCyclicIndex(this._length)]=t,this._length===this.maxLength?(this._startIndex++,this._startIndex===this.maxLength&&(this._startIndex=0)):this._length++},t.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length-- -1)]},t.prototype.splice=function(t,e){for(var i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];if(e){for(var r=t;r<this._length-e;r++)this._array[this._getCyclicIndex(r)]=this._array[this._getCyclicIndex(r+e)];this._length-=e}if(i&&i.length){for(var r=this._length-1;r>=t;r--)this._array[this._getCyclicIndex(r+i.length)]=this._array[this._getCyclicIndex(r)];for(var r=0;r<i.length;r++)this._array[this._getCyclicIndex(t+r)]=i[r];this._length+i.length>this.maxLength?(this._startIndex+=this._length+i.length-this.maxLength,this._length=this.maxLength):this._length+=i.length}},t.prototype.trimStart=function(t){t>this._length&&(t=this._length),this._startIndex+=t,this._length-=t},t.prototype.shiftElements=function(t,e,i){if(!(e<=0)){if(t<0||t>=this._length)throw new Error("start argument out of range");if(t+i<0)throw new Error("Cannot shift elements in list beyond index 0");if(i>0){for(var s=e-1;s>=0;s--)this.set(t+s+i,this.get(t+s));var r=t+e+i-this._length;if(r>0)for(this._length+=r;this._length>this.maxLength;)this._length--,this._startIndex++}else for(var s=0;s<e;s++)this.set(t+s+i,this.get(t+s))}},t.prototype._getCyclicIndex=function(t){return(this._startIndex+t)%this.maxLength},t}();i.CircularList=s},{}],13:[function(t,e,i){"use strict";function s(t,e){return t.indexOf(e)>=0}i.contains=s},{}],14:[function(e,i,s){"use strict";function r(t){var e=this;if(!(this instanceof r))return new r(arguments[0],arguments[1],arguments[2]);e.browser=x,e.cancel=r.cancel,_.EventEmitter.call(this),"number"==typeof t&&(t={cols:arguments[0],rows:arguments[1],handler:arguments[2]}),t=t||{},Object.keys(r.defaults).forEach(function(i){null==t[i]&&(t[i]=r.options[i],r[i]!==r.defaults[i]&&(t[i]=r[i])),e[i]=t[i]}),8===t.colors.length?t.colors=t.colors.concat(r._colors.slice(8)):16===t.colors.length?t.colors=t.colors.concat(r._colors.slice(16)):10===t.colors.length?t.colors=t.colors.slice(0,-2).concat(r._colors.slice(8,-2),t.colors.slice(-2)):18===t.colors.length&&(t.colors=t.colors.concat(r._colors.slice(16,-2),t.colors.slice(-2))),this.colors=t.colors,this.options=t,this.parent=t.body||t.parent||(k?k.getElementsByTagName("body")[0]:null),this.cols=t.cols||t.geometry[0],this.rows=t.rows||t.geometry[1],this.geometry=[this.cols,this.rows],t.handler&&this.on("data",t.handler),this.ybase=0,this.ydisp=0,this.x=0,this.y=0,this.cursorState=0,this.cursorHidden=!1,this.convertEol,this.queue="",this.scrollTop=0,this.scrollBottom=this.rows-1,this.customKeydownHandler=null,this.applicationKeypad=!1,this.applicationCursor=!1,this.originMode=!1,this.insertMode=!1,this.wraparoundMode=!0,this.normal=null,this.charset=null,this.gcharset=null,this.glevel=0,this.charsets=[null],this.decLocator,this.x10Mouse,this.vt200Mouse,this.vt300Mouse,this.normalMouse,this.mouseEvents,this.sendFocus,this.utfMouse,this.sgrMouse,this.urxvtMouse,this.element,this.children,this.refreshStart,this.refreshEnd,this.savedX,this.savedY,this.savedCols,this.readable=!0,this.writable=!0,this.defAttr=131840,this.curAttr=this.defAttr,this.params=[],this.currentParam=0,this.prefix="",this.postfix="",this.inputHandler=new b.InputHandler(this),this.parser=new S.Parser(this.inputHandler,this),this.renderer=this.renderer||null,this.writeBuffer=[],this.writeInProgress=!1,this.xoffSentToCatchUp=!1,this.writeStopped=!1,this.surrogate_high="",this.lines=new C.CircularList(this.scrollback);for(var i=this.rows;i--;)this.lines.push(this.blankLine());this.tabs,this.setupStops(),this.userScrolling=!1}function n(t,e,i,s){Array.isArray(t)||(t=[t]),t.forEach(function(t){t.addEventListener(e,i,s||!1)})}function a(t,e,i,s){t.removeEventListener(e,i,s||!1)}function o(t,e){if(this.cancelEvents||e)return t.preventDefault(),t.stopPropagation(),!1}function h(t,e){function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i}function l(t,e){var i=t.browser.isMac&&e.altKey&&!e.ctrlKey&&!e.metaKey||t.browser.isMSWindows&&e.altKey&&e.ctrlKey&&!e.metaKey;return"keypress"==e.type?i:i&&(!e.keyCode||e.keyCode>47)}function c(t,e,i){var s=t<<16|e<<8|i;if(null!=c._cache[s])return c._cache[s];for(var n,a,o,h,l,u=1/0,m=-1,p=0;p<r.vcolors.length;p++){if(n=r.vcolors[p],a=n[0],o=n[1],h=n[2],l=c.distance(t,e,i,a,o,h),0===l){m=p;break}l<u&&(u=l,m=p)}return c._cache[s]=m}function u(t,e,i){if(t.forEach)return t.forEach(e,i);for(var s=0;s<t.length;s++)e.call(i,t[s],s,t)}function m(t){return 16===t.keyCode||17===t.keyCode||18===t.keyCode}function p(t){if(Object.keys)return Object.keys(t);var e,i=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.push(e);return i}var f=e("./CompositionHelper"),_=e("./EventEmitter"),d=e("./Viewport"),y=e("./handlers/Clipboard"),C=e("./utils/CircularList"),g=e("./EscapeSequences"),b=e("./InputHandler"),S=e("./Parser"),v=e("./Renderer"),w=e("./utils/CharMeasure"),x=e("./utils/Browser"),k="undefined"!=typeof window?window.document:null,E=5,A=300;h(r,_.EventEmitter),r.prototype.eraseAttr=function(){return this.defAttr&-512|511&this.curAttr},r.tangoColors=["#2e3436","#cc0000","#4e9a06","#c4a000","#3465a4","#75507b","#06989a","#d3d7cf","#555753","#ef2929","#8ae234","#fce94f","#729fcf","#ad7fa8","#34e2e2","#eeeeec"],r.colors=function(){function t(t,i,r){s.push("#"+e(t)+e(i)+e(r))}function e(t){return t=t.toString(16),t.length<2?"0"+t:t}var i,s=r.tangoColors.slice(),n=[0,95,135,175,215,255];for(i=0;i<216;i++)t(n[i/36%6|0],n[i/6%6|0],n[i%6]);for(i=0;i<24;i++)n=8+10*i,t(n,n,n);return s}(),r._colors=r.colors.slice(),r.vcolors=function(){for(var t,e=[],i=r.colors,s=0;s<256;s++)t=parseInt(i[s].substring(1),16),e.push([t>>16&255,t>>8&255,255&t]);return e}(),r.defaults={colors:r.colors,theme:"default",convertEol:!1,termName:"xterm",geometry:[80,24],cursorBlink:!1,cursorStyle:"block",visualBell:!1,popOnBell:!1,scrollback:1e3,screenKeys:!1,debug:!1,cancelEvents:!1,disableStdin:!1,useFlowControl:!1,tabStopWidth:8},r.options={},r.focus=null,u(p(r.defaults),function(t){r[t]=r.defaults[t],r.options[t]=r.defaults[t]}),r.prototype.focus=function(){return this.textarea.focus()},r.prototype.getOption=function(t,e){if(!(t in r.defaults))throw new Error('No option with key "'+t+'"');return"undefined"!=typeof this.options[t]?this.options[t]:this[t]},r.prototype.setOption=function(t,e){if(!(t in r.defaults))throw new Error('No option with key "'+t+'"');switch(t){case"scrollback":if(this.options[t]!==e){if(this.lines.length>e){var i=this.lines.length-e,s=this.ydisp-i<0;this.lines.trimStart(i),this.ybase=Math.max(this.ybase-i,0),this.ydisp=Math.max(this.ydisp-i,0),s&&this.refresh(0,this.rows-1)}this.lines.maxLength=e,this.viewport.syncScrollArea()}}switch(this[t]=e,this.options[t]=e,t){case"cursorBlink":this.element.classList.toggle("xterm-cursor-blink",e);break;case"cursorStyle":this.element.classList.toggle("xterm-cursor-style-underline","underline"===e),this.element.classList.toggle("xterm-cursor-style-bar","bar"===e);break;case"tabStopWidth":this.setupStops()}},r.bindFocus=function(t){n(t.textarea,"focus",function(e){t.sendFocus&&t.send(g.C0.ESC+"[I"),t.element.classList.add("focus"),t.showCursor(),r.focus=t,t.emit("focus",{terminal:t})})},r.prototype.blur=function(){return this.textarea.blur()},r.bindBlur=function(t){n(t.textarea,"blur",function(e){t.refresh(t.y,t.y),t.sendFocus&&t.send(g.C0.ESC+"[O"),t.element.classList.remove("focus"),r.focus=null,t.emit("blur",{terminal:t})})},r.prototype.initGlobal=function(){function t(t){y.rightClickHandler.call(this,t,e)}var e=this;r.bindKeys(this),r.bindFocus(this),r.bindBlur(this),n(this.element,"copy",function(t){y.copyHandler.call(this,t,e)}),n(this.textarea,"paste",function(t){y.pasteHandler.call(this,t,e)}),n(this.element,"paste",function(t){y.pasteHandler.call(this,t,e)}),e.browser.isFirefox?n(this.element,"mousedown",function(e){2==e.button&&t(e)}):n(this.element,"contextmenu",t)},r.bindKeys=function(t){n(t.element,"keydown",function(e){k.activeElement==this&&t.keyDown(e)},!0),n(t.element,"keypress",function(e){k.activeElement==this&&t.keyPress(e)},!0),n(t.element,"keyup",function(e){m(e)||t.focus(t)},!0),n(t.textarea,"keydown",function(e){t.keyDown(e)},!0),n(t.textarea,"keypress",function(e){t.keyPress(e),this.value=""},!0),n(t.textarea,"compositionstart",t.compositionHelper.compositionstart.bind(t.compositionHelper)),n(t.textarea,"compositionupdate",t.compositionHelper.compositionupdate.bind(t.compositionHelper)),n(t.textarea,"compositionend",t.compositionHelper.compositionend.bind(t.compositionHelper)),t.on("refresh",t.compositionHelper.updateCompositionElements.bind(t.compositionHelper))},r.prototype.insertRow=function(t){return"object"!=typeof t&&(t=k.createElement("div")),this.rowContainer.appendChild(t),this.children.push(t),t},r.prototype.open=function(t){var e=this,i=0;if(this.parent=t||this.parent,!this.parent)throw new Error("Terminal requires a parent element.");for(this.context=this.parent.ownerDocument.defaultView,this.document=this.parent.ownerDocument,this.body=this.document.getElementsByTagName("body")[0],this.element=this.document.createElement("div"),this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.classList.add("xterm-theme-"+this.theme),this.element.classList.toggle("xterm-cursor-blink",this.options.cursorBlink),this.element.style.height,this.element.setAttribute("tabindex",0),this.viewportElement=k.createElement("div"),this.viewportElement.classList.add("xterm-viewport"),this.element.appendChild(this.viewportElement),this.viewportScrollArea=k.createElement("div"),this.viewportScrollArea.classList.add("xterm-scroll-area"),this.viewportElement.appendChild(this.viewportScrollArea),this.rowContainer=k.createElement("div"),this.rowContainer.classList.add("xterm-rows"),this.element.appendChild(this.rowContainer),this.children=[],this.helperContainer=k.createElement("div"),this.helperContainer.classList.add("xterm-helpers"),this.element.appendChild(this.helperContainer),this.textarea=k.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.textarea.addEventListener("focus",function(){e.emit("focus",{terminal:e})}),this.textarea.addEventListener("blur",function(){e.emit("blur",{terminal:e})}),this.helperContainer.appendChild(this.textarea),this.compositionView=k.createElement("div"),this.compositionView.classList.add("composition-view"),this.compositionHelper=new f.CompositionHelper(this.textarea,this.compositionView,this),this.helperContainer.appendChild(this.compositionView),this.charSizeStyleElement=k.createElement("style"),this.helperContainer.appendChild(this.charSizeStyleElement);i<this.rows;i++)this.insertRow();this.parent.appendChild(this.element),this.charMeasure=new w.CharMeasure(this.helperContainer),this.charMeasure.on("charsizechanged",function(){e.updateCharSizeCSS()}),this.charMeasure.measure(),this.viewport=new d.Viewport(this,this.viewportElement,this.viewportScrollArea,this.charMeasure),this.renderer=new v.Renderer(this),this.refresh(0,this.rows-1),this.initGlobal(),this.focus(),n(this.element,"click",function(){var t=k.getSelection(),i=t.isCollapsed,s="boolean"==typeof i?!i:"Range"==t.type;s||e.focus()}),this.bindMouse(),this.emit("open")},r.loadAddon=function(r,n){return"object"==typeof s&&"object"==typeof i?e("./addons/"+r+"/"+r):"function"==typeof t?e(["./addons/"+r+"/"+r],n):(console.error("Cannot load a module without a CommonJS or RequireJS environment."),!1)},r.prototype.updateCharSizeCSS=function(){this.charSizeStyleElement.textContent=".xterm-wide-char{width:"+2*this.charMeasure.width+"px;}"},r.prototype.bindMouse=function(){function t(t){var e,i;if(e=r(t),i=o(t))switch(s(e,i),t.overrideType||t.type){case"mousedown":c=e;break;case"mouseup":c=32;break;case"wheel":}}function e(t){var e,i=c;e=o(t),e&&(i+=32,s(i,e))}function i(t,e){if(l.utfMouse){if(2047===e)return t.push(0);e<127?t.push(e):(e>2047&&(e=2047),t.push(192|e>>6),t.push(128|63&e))}else{if(255===e)return t.push(0);e>127&&(e=127),t.push(e)}}function s(t,e){if(l.vt300Mouse){t&=3,e.x-=32,e.y-=32;var s=g.C0.ESC+"[24";if(0===t)s+="1";else if(1===t)s+="3";else if(2===t)s+="5";else{if(3===t)return;s+="0"}return s+="~["+e.x+","+e.y+"]\r",void l.send(s)}if(l.decLocator)return t&=3,e.x-=32,e.y-=32,0===t?t=2:1===t?t=4:2===t?t=6:3===t&&(t=3),void l.send(g.C0.ESC+"["+t+";"+(3===t?4:0)+";"+e.y+";"+e.x+";"+(e.page||0)+"&w");if(l.urxvtMouse)return e.x-=32,e.y-=32,e.x++,e.y++,void l.send(g.C0.ESC+"["+t+";"+e.x+";"+e.y+"M");if(l.sgrMouse)return e.x-=32,e.y-=32,void l.send(g.C0.ESC+"[<"+((3===(3&t)?t&-4:t)-32)+";"+e.x+";"+e.y+(3===(3&t)?"m":"M"));var s=[];i(s,t),i(s,e.x),i(s,e.y),l.send(g.C0.ESC+"[M"+String.fromCharCode.apply(String,s))}function r(t){var e,i,s,r,n;switch(t.overrideType||t.type){case"mousedown":e=null!=t.button?+t.button:null!=t.which?t.which-1:null,l.browser.isMSIE&&(e=1===e?0:4===e?1:e);break;case"mouseup":e=3;break;case"DOMMouseScroll":e=t.detail<0?64:65;break;case"wheel":e=t.wheelDeltaY>0?64:65}return i=t.shiftKey?4:0,s=t.metaKey?8:0,r=t.ctrlKey?16:0,n=i|s|r,l.vt200Mouse?n&=r:l.normalMouse||(n=0),e=32+(n<<2)+e}function o(t){var e,i,s,r,n;if(null!=t.pageX){for(e=t.pageX,i=t.pageY,n=l.element;n&&n!==l.document.documentElement;)e-=n.offsetLeft,i-=n.offsetTop,n="offsetParent"in n?n.offsetParent:n.parentNode;return s=l.element.clientWidth,r=l.element.clientHeight,e=Math.ceil(e/s*l.cols),i=Math.ceil(i/r*l.rows),e<0&&(e=0),e>l.cols&&(e=l.cols),i<0&&(i=0),i>l.rows&&(i=l.rows),e+=32,i+=32,{x:e,y:i,type:"wheel"}}}var h=this.element,l=this,c=32;n(h,"mousedown",function(i){if(l.mouseEvents)return t(i),l.focus(),l.vt200Mouse?(i.overrideType="mouseup",t(i),l.cancel(i)):(l.normalMouse&&n(l.document,"mousemove",e),l.x10Mouse||n(l.document,"mouseup",function i(s){return t(s),l.normalMouse&&a(l.document,"mousemove",e),a(l.document,"mouseup",i),l.cancel(s)}),l.cancel(i))}),n(h,"wheel",function(e){if(l.mouseEvents&&!(l.x10Mouse||l.vt300Mouse||l.decLocator))return t(e),l.cancel(e)}),n(h,"wheel",function(t){if(!l.mouseEvents)return l.viewport.onWheel(t),l.cancel(t)})},r.prototype.destroy=function(){this.readable=!1,this.writable=!1,this._events={},this.handler=function(){},this.write=function(){},this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},r.prototype.refresh=function(t,e){this.renderer&&this.renderer.queueRefresh(t,e)},r.prototype.showCursor=function(){this.cursorState||(this.cursorState=1,this.refresh(this.y,this.y))},r.prototype.scroll=function(){var t;this.lines.length===this.lines.maxLength&&(this.lines.trimStart(1),this.ybase--,0!==this.ydisp&&this.ydisp--),this.ybase++,this.userScrolling||(this.ydisp=this.ybase),t=this.ybase+this.rows-1,t-=this.rows-1-this.scrollBottom,t===this.lines.length?this.lines.push(this.blankLine()):this.lines.splice(t,0,this.blankLine()),0!==this.scrollTop&&(0!==this.ybase&&(this.ybase--,this.userScrolling||(this.ydisp=this.ybase)),this.lines.splice(this.ybase+this.scrollTop,1)),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom),this.emit("scroll",this.ydisp)},r.prototype.scrollDisp=function(t,e){t<0?this.userScrolling=!0:t+this.ydisp>=this.ybase&&(this.userScrolling=!1),this.ydisp+=t,this.ydisp>this.ybase?this.ydisp=this.ybase:this.ydisp<0&&(this.ydisp=0),e||this.emit("scroll",this.ydisp),this.refresh(0,this.rows-1)},r.prototype.scrollPages=function(t){this.scrollDisp(t*(this.rows-1))},r.prototype.scrollToTop=function(){this.scrollDisp(-this.ydisp)},r.prototype.scrollToBottom=function(){this.scrollDisp(this.ybase-this.ydisp)},r.prototype.write=function(t){if(this.writeBuffer.push(t),this.options.useFlowControl&&!this.xoffSentToCatchUp&&this.writeBuffer.length>=E&&(this.send(g.C0.DC3),this.xoffSentToCatchUp=!0),!this.writeInProgress&&this.writeBuffer.length>0){this.writeInProgress=!0;var e=this;setTimeout(function(){e.innerWrite()})}},r.prototype.innerWrite=function(){for(var t=this.writeBuffer.splice(0,A);t.length>0;){var e=t.shift();e.length;this.xoffSentToCatchUp&&0===t.length&&0===this.writeBuffer.length&&(this.send(g.C0.DC1),this.xoffSentToCatchUp=!1),this.refreshStart=this.y,this.refreshEnd=this.y,this.parser.parse(e),this.updateRange(this.y),this.refresh(this.refreshStart,this.refreshEnd)}if(this.writeBuffer.length>0){var i=this;setTimeout(function(){i.innerWrite()},0)}else this.writeInProgress=!1},r.prototype.writeln=function(t){this.write(t+"\r\n")},r.prototype.attachCustomKeydownHandler=function(t){this.customKeydownHandler=t},r.prototype.keyDown=function(t){if(this.customKeydownHandler&&this.customKeydownHandler(t)===!1)return!1;if(!this.compositionHelper.keydown.bind(this.compositionHelper)(t))return this.ybase!==this.ydisp&&this.scrollToBottom(),!1;var e=this.evaluateKeyEscapeSequence(t);return e.key===g.C0.DC3?this.writeStopped=!0:e.key===g.C0.DC1&&(this.writeStopped=!1),e.scrollDisp?(this.scrollDisp(e.scrollDisp),this.cancel(t,!0)):!!l(this,t)||(e.cancel&&this.cancel(t,!0),!e.key||(this.emit("keydown",t),this.emit("key",e.key,t),this.showCursor(),this.handler(e.key),this.cancel(t,!0)))},r.prototype.evaluateKeyEscapeSequence=function(t){var e={cancel:!1,key:void 0,scrollDisp:void 0},i=t.shiftKey<<0|t.altKey<<1|t.ctrlKey<<2|t.metaKey<<3;switch(t.keyCode){case 8:if(t.shiftKey){e.key=g.C0.BS;break}e.key=g.C0.DEL;break;case 9:if(t.shiftKey){e.key=g.C0.ESC+"[Z";break}e.key=g.C0.HT,e.cancel=!0;break;case 13:e.key=g.C0.CR,e.cancel=!0;break;case 27:e.key=g.C0.ESC,e.cancel=!0;break;case 37:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"D",e.key==g.C0.ESC+"[1;3D"&&(e.key=this.browser.isMac?g.C0.ESC+"b":g.C0.ESC+"[1;5D")):this.applicationCursor?e.key=g.C0.ESC+"OD":e.key=g.C0.ESC+"[D";break;case 39:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"C",e.key==g.C0.ESC+"[1;3C"&&(e.key=this.browser.isMac?g.C0.ESC+"f":g.C0.ESC+"[1;5C")):this.applicationCursor?e.key=g.C0.ESC+"OC":e.key=g.C0.ESC+"[C";break;case 38:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"A",e.key==g.C0.ESC+"[1;3A"&&(e.key=g.C0.ESC+"[1;5A")):this.applicationCursor?e.key=g.C0.ESC+"OA":e.key=g.C0.ESC+"[A";break;case 40:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"B",e.key==g.C0.ESC+"[1;3B"&&(e.key=g.C0.ESC+"[1;5B")):this.applicationCursor?e.key=g.C0.ESC+"OB":e.key=g.C0.ESC+"[B";break;case 45:t.shiftKey||t.ctrlKey||(e.key=g.C0.ESC+"[2~");break;case 46:i?e.key=g.C0.ESC+"[3;"+(i+1)+"~":e.key=g.C0.ESC+"[3~";break;case 36:i?e.key=g.C0.ESC+"[1;"+(i+1)+"H":this.applicationCursor?e.key=g.C0.ESC+"OH":e.key=g.C0.ESC+"[H";break;case 35:i?e.key=g.C0.ESC+"[1;"+(i+1)+"F":this.applicationCursor?e.key=g.C0.ESC+"OF":e.key=g.C0.ESC+"[F";break;case 33:t.shiftKey?e.scrollDisp=-(this.rows-1):e.key=g.C0.ESC+"[5~";break;case 34:t.shiftKey?e.scrollDisp=this.rows-1:e.key=g.C0.ESC+"[6~";break;case 112:i?e.key=g.C0.ESC+"[1;"+(i+1)+"P":e.key=g.C0.ESC+"OP";break;case 113:i?e.key=g.C0.ESC+"[1;"+(i+1)+"Q":e.key=g.C0.ESC+"OQ";break;case 114:i?e.key=g.C0.ESC+"[1;"+(i+1)+"R":e.key=g.C0.ESC+"OR";break;case 115:i?e.key=g.C0.ESC+"[1;"+(i+1)+"S":e.key=g.C0.ESC+"OS";break;case 116:i?e.key=g.C0.ESC+"[15;"+(i+1)+"~":e.key=g.C0.ESC+"[15~";break;case 117:i?e.key=g.C0.ESC+"[17;"+(i+1)+"~":e.key=g.C0.ESC+"[17~";break;case 118:i?e.key=g.C0.ESC+"[18;"+(i+1)+"~":e.key=g.C0.ESC+"[18~";break;case 119:i?e.key=g.C0.ESC+"[19;"+(i+1)+"~":e.key=g.C0.ESC+"[19~";break;case 120:i?e.key=g.C0.ESC+"[20;"+(i+1)+"~":e.key=g.C0.ESC+"[20~";break;case 121:i?e.key=g.C0.ESC+"[21;"+(i+1)+"~":e.key=g.C0.ESC+"[21~";break;case 122:i?e.key=g.C0.ESC+"[23;"+(i+1)+"~":e.key=g.C0.ESC+"[23~";break;case 123:i?e.key=g.C0.ESC+"[24;"+(i+1)+"~":e.key=g.C0.ESC+"[24~";break;default:!t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?this.browser.isMac||!t.altKey||t.ctrlKey||t.metaKey||(t.keyCode>=65&&t.keyCode<=90?e.key=g.C0.ESC+String.fromCharCode(t.keyCode+32):192===t.keyCode?e.key=g.C0.ESC+"`":t.keyCode>=48&&t.keyCode<=57&&(e.key=g.C0.ESC+(t.keyCode-48))):t.keyCode>=65&&t.keyCode<=90?e.key=String.fromCharCode(t.keyCode-64):32===t.keyCode?e.key=String.fromCharCode(0):t.keyCode>=51&&t.keyCode<=55?e.key=String.fromCharCode(t.keyCode-51+27):56===t.keyCode?e.key=String.fromCharCode(127):219===t.keyCode?e.key=String.fromCharCode(27):220===t.keyCode?e.key=String.fromCharCode(28):221===t.keyCode&&(e.key=String.fromCharCode(29))}return e},r.prototype.setgLevel=function(t){this.glevel=t,this.charset=this.charsets[t]},r.prototype.setgCharset=function(t,e){this.charsets[t]=e,this.glevel===t&&(this.charset=e)},r.prototype.keyPress=function(t){var e;if(this.cancel(t),t.charCode)e=t.charCode;else if(null==t.which)e=t.keyCode;else{if(0===t.which||0===t.charCode)return!1;e=t.which}return!(!e||(t.altKey||t.ctrlKey||t.metaKey)&&!l(this,t))&&(e=String.fromCharCode(e),this.emit("keypress",e,t),this.emit("key",e,t),this.showCursor(),this.handler(e),!1)},r.prototype.send=function(t){var e=this;this.queue||setTimeout(function(){e.handler(e.queue),e.queue=""},1),this.queue+=t},r.prototype.bell=function(){if(this.visualBell){var t=this;this.element.style.borderColor="white",setTimeout(function(){t.element.style.borderColor=""},10),this.popOnBell&&this.focus()}},r.prototype.log=function(){if(this.debug&&this.context.console&&this.context.console.log){var t=Array.prototype.slice.call(arguments);this.context.console.log.apply(this.context.console,t)}},r.prototype.error=function(){if(this.debug&&this.context.console&&this.context.console.error){var t=Array.prototype.slice.call(arguments);this.context.console.error.apply(this.context.console,t)}},r.prototype.resize=function(t,e){if(!isNaN(t)&&!isNaN(e)){var i,s,r,n,a;if(t!==this.cols||e!==this.rows){if(t<1&&(t=1),e<1&&(e=1),r=this.cols,r<t)for(n=[this.defAttr," ",1],s=this.lines.length;s--;)for(;this.lines.get(s).length<t;)this.lines.get(s).push(n);else for(s=this.lines.length;s--;)for(;this.lines.get(s).length>t;)this.lines.get(s).pop();
+if(this.cols=t,this.setupStops(this.cols),r=this.rows,a=0,r<e)for(i=this.element;r++<e;)this.lines.length<e+this.ybase&&(this.ybase>0&&this.lines.length<=this.ybase+this.y+a+1?(this.ybase--,a++,this.ydisp>0&&this.ydisp--):this.lines.push(this.blankLine())),this.children.length<e&&this.insertRow();else for(;r-- >e;)if(this.lines.length>e+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++)),this.children.length>e){if(i=this.children.shift(),!i)continue;i.parentNode.removeChild(i)}this.rows=e,this.y>=e&&(this.y=e-1),a&&(this.y+=a),this.x>=t&&(this.x=t-1),this.scrollTop=0,this.scrollBottom=e-1,this.charMeasure.measure(),this.refresh(0,this.rows-1),this.normal=null,this.geometry=[this.cols,this.rows],this.emit("resize",{terminal:this,cols:t,rows:e})}}},r.prototype.updateRange=function(t){t<this.refreshStart&&(this.refreshStart=t),t>this.refreshEnd&&(this.refreshEnd=t)},r.prototype.maxRange=function(){this.refreshStart=0,this.refreshEnd=this.rows-1},r.prototype.setupStops=function(t){for(null!=t?this.tabs[t]||(t=this.prevStop(t)):(this.tabs={},t=0);t<this.cols;t+=this.getOption("tabStopWidth"))this.tabs[t]=!0},r.prototype.prevStop=function(t){for(null==t&&(t=this.x);!this.tabs[--t]&&t>0;);return t>=this.cols?this.cols-1:t<0?0:t},r.prototype.nextStop=function(t){for(null==t&&(t=this.x);!this.tabs[++t]&&t<this.cols;);return t>=this.cols?this.cols-1:t<0?0:t},r.prototype.eraseRight=function(t,e){var i=this.lines.get(this.ybase+e);if(i){for(var s=[this.eraseAttr()," ",1];t<this.cols;t++)i[t]=s;this.updateRange(e)}},r.prototype.eraseLeft=function(t,e){var i=this.lines.get(this.ybase+e);if(i){var s=[this.eraseAttr()," ",1];for(t++;t--;)i[t]=s;this.updateRange(e)}},r.prototype.clear=function(){if(0!==this.ybase||0!==this.y){this.lines.set(0,this.lines.get(this.ybase+this.y)),this.lines.length=1,this.ydisp=0,this.ybase=0,this.y=0;for(var t=1;t<this.rows;t++)this.lines.push(this.blankLine());this.refresh(0,this.rows-1),this.emit("scroll",this.ydisp)}},r.prototype.eraseLine=function(t){this.eraseRight(0,t)},r.prototype.blankLine=function(t){for(var e=t?this.eraseAttr():this.defAttr,i=[e," ",1],s=[],r=0;r<this.cols;r++)s[r]=i;return s},r.prototype.ch=function(t){return t?[this.eraseAttr()," ",1]:[this.defAttr," ",1]},r.prototype.is=function(t){var e=this.termName;return 0===(e+"").indexOf(t)},r.prototype.handler=function(t){this.options.disableStdin||(this.ybase!==this.ydisp&&this.scrollToBottom(),this.emit("data",t))},r.prototype.handleTitle=function(t){this.emit("title",t)},r.prototype.index=function(){this.y++,this.y>this.scrollBottom&&(this.y--,this.scroll()),this.x>=this.cols&&this.x--},r.prototype.reverseIndex=function(){this.y===this.scrollTop?(this.lines.shiftElements(this.y+this.ybase,this.rows-1,1),this.lines.set(this.y+this.ybase,this.blankLine(!0)),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom)):this.y--},r.prototype.reset=function(){this.options.rows=this.rows,this.options.cols=this.cols;var t=this.customKeydownHandler;r.call(this,this.options),this.customKeydownHandler=t,this.refresh(0,this.rows-1),this.viewport.syncScrollArea()},r.prototype.tabSet=function(){this.tabs[this.x]=!0},r.prototype.matchColor=c,c._cache={},c.distance=function(t,e,i,s,r,n){return Math.pow(30*(t-s),2)+Math.pow(59*(e-r),2)+Math.pow(11*(i-n),2)},r.EventEmitter=_.EventEmitter,r.inherits=h,r.on=n,r.off=a,r.cancel=o,i.exports=r},{"./CompositionHelper":2,"./EscapeSequences":3,"./EventEmitter":4,"./InputHandler":5,"./Parser":6,"./Renderer":7,"./Viewport":8,"./handlers/Clipboard":9,"./utils/Browser":10,"./utils/CharMeasure":11,"./utils/CircularList":12}]},{},[14])(14)});</script>
     <script>!function(e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("../../xterm")):"function"==typeof define?define(["../../xterm"],e):e(window.Terminal)}(function(e){var t={};return t.proposeGeometry=function(e){var t,r,n,o,i,p=window.getComputedStyle(e.element.parentElement),a=parseInt(p.getPropertyValue("height")),s=Math.max(0,parseInt(p.getPropertyValue("width"))-17),l=window.getComputedStyle(e.element),d=parseInt(l.getPropertyValue("padding-top"))+parseInt(l.getPropertyValue("padding-bottom")),u=parseInt(l.getPropertyValue("padding-right"))+parseInt(l.getPropertyValue("padding-left")),y=a-d,f=s-u,g=(e.rowContainer,e.rowContainer.firstElementChild),m=g.innerHTML;return g.style.display="inline",g.innerHTML="W",n=g.getBoundingClientRect().width,g.style.display="",t=parseInt(g.offsetHeight),g.innerHTML=m,r=parseInt(y/t),o=parseInt(f/n),i={cols:o,rows:r}},t.fit=function(e){var r=t.proposeGeometry(e);e.resize(r.cols,r.rows)},e.prototype.proposeGeometry=function(){return t.proposeGeometry(this)},e.prototype.fit=function(){return t.fit(this)},t});</script>
     <script>UTF8Decoder=function(){this.bytesLeft=0,this.codePoint=0,this.lowerBound=0},UTF8Decoder.prototype.decode=function(t){for(var e="",o=0;o<t.length;o++){var i=t.charCodeAt(o);if(0==this.bytesLeft)i<=127?e+=t.charAt(o):192<=i&&i<=223?(this.codePoint=i-192,this.bytesLeft=1,this.lowerBound=128):224<=i&&i<=239?(this.codePoint=i-224,this.bytesLeft=2,this.lowerBound=2048):240<=i&&i<=247?(this.codePoint=i-240,this.bytesLeft=3,this.lowerBound=65536):248<=i&&i<=251?(this.codePoint=i-248,this.bytesLeft=4,this.lowerBound=2097152):252<=i&&i<=253?(this.codePoint=i-252,this.bytesLeft=5,this.lowerBound=67108864):e+="�";else if(128<=i&&i<=191){if(this.bytesLeft--,this.codePoint=(this.codePoint<<6)+(i-128),0==this.bytesLeft){var r=this.codePoint;r<this.lowerBound||55296<=r&&r<=57343||r>1114111?e+="�":r<65536?e+=String.fromCharCode(r):(r-=65536,e+=String.fromCharCode(55296+(r>>>10&1023),56320+(1023&r)))}}else e+="�",this.bytesLeft=0,o--}return e},Terminal.prototype.decodeUTF8=function(t){return(new UTF8Decoder).decode(t)},Terminal.prototype.encodeUTF8=function(t){for(var e="",o=0;o<t.length;o++){var i=t.charCodeAt(o);if(56320<=i&&i<=57343)i=65533;else if(55296<=i&&i<=56319)if(o+1<t.length){var r=t.charCodeAt(o+1);56320<=r&&r<=57343?(i=65536+((1023&i)<<10)+(1023&r),o++):i=65533}else i=65533;var n;if(i<=127)e+=t.charAt(o);else for(i<=2047?(e+=String.fromCharCode(192|i>>>6),n=1):i<=65535?(e+=String.fromCharCode(224|i>>>12),n=2):(e+=String.fromCharCode(240|i>>>18),n=3);n>0;)n--,e+=String.fromCharCode(128|i>>>6*n&63)}return e},Terminal.prototype.writeUTF8=function(t){this.write(this.decodeUTF8(t))};</script>
     <script>Terminal.prototype.showOverlay=function(e,t){if(!this.overlayNode_){if(!this.element)return;this.overlayNode_=document.createElement("div"),this.overlayNode_.style.cssText="border-radius: 15px;font-size: xx-large;opacity: 0.75;padding: 0.2em 0.5em 0.2em 0.5em;position: absolute;-webkit-user-select: none;-webkit-transition: opacity 180ms ease-in;-moz-user-select: none;-moz-transition: opacity 180ms ease-in;",this.overlayNode_.addEventListener("mousedown",function(e){e.preventDefault(),e.stopPropagation()},!0)}this.overlayNode_.style.color="#101010",this.overlayNode_.style.backgroundColor="#f0f0f0",this.overlayNode_.textContent=e,this.overlayNode_.style.opacity="0.75",this.overlayNode_.parentNode||this.element.appendChild(this.overlayNode_);var o=this.element.getBoundingClientRect(),i=this.overlayNode_.getBoundingClientRect();this.overlayNode_.style.top=(o.height-i.height)/2+"px",this.overlayNode_.style.left=(o.width-i.width)/2+"px";var l=this;this.overlayTimeout_&&clearTimeout(this.overlayTimeout_),null!==t&&(this.overlayTimeout_=setTimeout(function(){l.overlayNode_.style.opacity="0",l.overlayTimeout_=setTimeout(function(){l.overlayNode_.parentNode&&l.overlayNode_.parentNode.removeChild(l.overlayNode_),l.overlayTimeout_=null,l.overlayNode_.style.opacity="0.75"},200)},t||1500))};</script>