{"version":3,"sources":["webpack:///webpack/bootstrap 75bb02f622408516a58c","webpack:///./~/xterm/lib/xterm.js","webpack:///./~/xterm/lib/EventEmitter.js","webpack:///./~/xterm/lib/EscapeSequences.js","webpack:///./~/xterm/lib/Charsets.js","webpack:///./~/xterm/lib/addons/attach/attach.js","webpack:///./~/xterm/lib/addons/fit/fit.js","webpack:///./~/xterm/lib/addons/fullscreen/fullscreen.js","webpack:///./~/xterm/lib/addons/terminado/terminado.js","webpack:///./~/xterm/lib/utils/Browser.js","webpack:///./~/xterm/lib/utils/Mouse.js","webpack:///./src/hterm.ts","webpack:///./src/websocket.ts","webpack:///./src/webtty.ts","webpack:///./src/xterm.ts","webpack:///./src/main.ts","webpack:///./~/xterm/lib/CompositionHelper.js","webpack:///./~/xterm/lib/InputHandler.js","webpack:///./~/xterm/lib/Linkifier.js","webpack:///./~/xterm/lib/Parser.js","webpack:///./~/xterm/lib/Renderer.js","webpack:///./~/xterm/lib/SelectionManager.js","webpack:///./~/xterm/lib/SelectionModel.js","webpack:///./~/xterm/lib/Viewport.js","webpack:///./~/xterm/lib/addons ^\\.\\/.*$","webpack:///./~/xterm/lib/addons/attach/package.json","webpack:///./~/xterm/lib/addons/fit/package.json","webpack:///./~/xterm/lib/addons/fullscreen/package.json","webpack:///./~/xterm/lib/addons/terminado/package.json","webpack:///./~/xterm/lib/handlers/Clipboard.js","webpack:///./~/xterm/lib/utils/CharMeasure.js","webpack:///./~/xterm/lib/utils/CircularList.js","webpack:///./~/xterm/lib/utils/DomElementObjectPool.js","webpack:///./~/xterm/lib/utils/Generic.js","webpack:///external \"hterm\"","webpack:///external \"lib\""],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;AChEA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,SAAS;AACnB;AACA;AACA;AACA,UAAU,QAAQ;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,UAAU,SAAS;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,gDAAgD,8CAA8C;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C,KAAK;AACL;AACA,2BAA2B,iBAAiB;AAC5C,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,eAAe;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,mCAAmC,yCAAyC,EAAE;AAC9E,iEAAiE,yCAAyC,EAAE;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,4CAA4C;AACtE,iCAAiC,wCAAwC;AACzE,gCAAgC,0CAA0C;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA,oBAAoB;AACpB;AACA,oBAAoB;AACpB;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,cAAc;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D,iEAAiE;AACjE,wHAAwH;AACxH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D,iEAAiE;AACjE,wHAAwH;AACxH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D,iEAAiE;AACjE,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D,iEAAiE;AACjE,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,mCAAmC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,eAAe;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,eAAe;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,eAAe;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,6BAA6B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC5lDA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;;;;;;;;AC1DA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qCAAqC;AACtC;;AAEA;;;;;;;;ACzCA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;;;;;;;AChKA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;;AAEA;AACA;AACA;AACA,aAAa,MAAM;AACnB,aAAa,UAAU;AACvB,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,MAAM;AACnB,aAAa,UAAU;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;;;;;;AC7HD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B;AAC/B;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;;;;;;ACrFD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA,aAAa,MAAM;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;;;;;;ACjDD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;;AAEA;AACA;AACA;AACA,aAAa,MAAM;AACnB,aAAa,UAAU;AACvB,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,8CAA8C,EAAE;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;;;;;;;;AC5HA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,uDAAuD,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,yBAAyB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,IAAI;AACxE;AACA;AACA,qEAAqE,GAAG;AACxE;AACA;AACA;AACA;AACA;AACA,qEAAqE,MAAM;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,GAAG,qBAAqB;;AAEzB;;;;;;;;ACx6BA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,2BAA2B,IAAI;AAC/B,sBAAsB,IAAI,KAAK,EAAE,IAAI,IAAI;AACzC;AACA,wBAAwB,IAAI;AAC5B;AACA;AACA,mFAAmF;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,gBAAgB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,+BAA+B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,+BAA+B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,mCAAmC,yBAAyB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,4BAA4B;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;AAEA;;;;;;;;ACzOA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA,2EAA2E,uBAAuB;AAClG,0EAA0E,2BAA2B;AACrG;AACA;AACA,0EAA0E,iCAAiC;AAC3G,0EAA0E,4BAA4B;AACtG,0EAA0E,sBAAsB;AAChG,0EAA0E,2BAA2B;AACrG,0EAA0E,0BAA0B;AACpG,2EAA2E,6CAA6C;AACxH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,4CAA4C;AAC/G;AACA,+CAA+C,8BAA8B;AAC7E,+CAA+C,8BAA8B;AAC7E,+CAA+C,8BAA8B;AAC7E,+CAA+C,gDAAgD;AAC/F,+CAA+C,oDAAoD;AACnG,+CAA+C,oDAAoD;AACnG,+CAA+C,oDAAoD;AACnG,+CAA+C,oDAAoD;AACnG,+CAA+C,oDAAoD;AACnG,+CAA+C,oDAAoD;AACnG,+CAA+C,oDAAoD;AACnG,+CAA+C,oDAAoD;AACnG,+CAA+C,oDAAoD;AACnG,+CAA+C,+BAA+B;AAC9E,+CAA+C,+BAA+B;AAC9E,+CAA+C,+BAA+B;AAC9E,gDAAgD,gCAAgC;AAChF,uBAAuB,wBAAwB,+BAA+B;AAC9E,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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;;;;;;;;AC7dA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,yBAAyB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mCAAmC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA,8CAA8C;AAC9C;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,0DAA0D;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,cAAc;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACrRA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sCAAsC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,8BAA8B;AACpF,oDAAoD,kCAAkC;AACtF,oDAAoD,kCAAkC;AACtF,kDAAkD,gCAAgC;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iBAAiB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,cAAc;AAChD,gCAAgC,eAAe;AAC/C;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF,yBAAyB,EAAE;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6EAA6E;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,4BAA4B,EAAE;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;;;;;;;;ACrZA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;;;;;;;;ACxEA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,+BAA+B,EAAE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;;;;;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uB;;;;;;AC7BA,kBAAkB,wD;;;;;;ACAlB,kBAAkB,kD;;;;;;;;;;;;ACAlB,kBAAkB,gE;;;;;;ACAlB,kBAAkB,8D;;;;;;;ACAlB;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpEA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,2BAA2B,EAAE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;;;;;;;;AClEA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,2BAA2B,yCAAyC;AACpE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,0CAA0C,eAAe;AACzD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,+BAA+B,gCAAgC;AAC/D;AACA;AACA;AACA;AACA;AACA,0CAA0C,YAAY;AACtD;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;;;;;;;;AClKA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;;;;;;;;AC5CA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACRA,uB;;;;;;ACAA,qB","file":"./dist/bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 14);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 75bb02f622408516a58c","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar CompositionHelper_1 = require(\"./CompositionHelper\");\nvar EventEmitter_1 = require(\"./EventEmitter\");\nvar Viewport_1 = require(\"./Viewport\");\nvar Clipboard_1 = require(\"./handlers/Clipboard\");\nvar CircularList_1 = require(\"./utils/CircularList\");\nvar EscapeSequences_1 = require(\"./EscapeSequences\");\nvar InputHandler_1 = require(\"./InputHandler\");\nvar Parser_1 = require(\"./Parser\");\nvar Renderer_1 = require(\"./Renderer\");\nvar Linkifier_1 = require(\"./Linkifier\");\nvar SelectionManager_1 = require(\"./SelectionManager\");\nvar CharMeasure_1 = require(\"./utils/CharMeasure\");\nvar Browser = require(\"./utils/Browser\");\nvar Mouse_1 = require(\"./utils/Mouse\");\nvar document = (typeof window != 'undefined') ? window.document : null;\nvar WRITE_BUFFER_PAUSE_THRESHOLD = 5;\nvar WRITE_BATCH_SIZE = 300;\nvar CURSOR_BLINK_INTERVAL = 600;\nfunction Terminal(options) {\n var self = this;\n if (!(this instanceof Terminal)) {\n return new Terminal(arguments[0], arguments[1], arguments[2]);\n }\n self.browser = Browser;\n self.cancel = Terminal.cancel;\n EventEmitter_1.EventEmitter.call(this);\n if (typeof options === 'number') {\n options = {\n cols: arguments[0],\n rows: arguments[1],\n handler: arguments[2]\n };\n }\n options = options || {};\n Object.keys(Terminal.defaults).forEach(function (key) {\n if (options[key] == null) {\n options[key] = Terminal.options[key];\n if (Terminal[key] !== Terminal.defaults[key]) {\n options[key] = Terminal[key];\n }\n }\n self[key] = options[key];\n });\n if (options.colors.length === 8) {\n options.colors = options.colors.concat(Terminal._colors.slice(8));\n }\n else if (options.colors.length === 16) {\n options.colors = options.colors.concat(Terminal._colors.slice(16));\n }\n else if (options.colors.length === 10) {\n options.colors = options.colors.slice(0, -2).concat(Terminal._colors.slice(8, -2), options.colors.slice(-2));\n }\n else if (options.colors.length === 18) {\n options.colors = options.colors.concat(Terminal._colors.slice(16, -2), options.colors.slice(-2));\n }\n this.colors = options.colors;\n this.options = options;\n this.parent = options.body || options.parent || (document ? document.getElementsByTagName('body')[0] : null);\n this.cols = options.cols || options.geometry[0];\n this.rows = options.rows || options.geometry[1];\n this.geometry = [this.cols, this.rows];\n if (options.handler) {\n this.on('data', options.handler);\n }\n this.ybase = 0;\n this.ydisp = 0;\n this.x = 0;\n this.y = 0;\n this.cursorState = 0;\n this.cursorHidden = false;\n this.convertEol;\n this.queue = '';\n this.scrollTop = 0;\n this.scrollBottom = this.rows - 1;\n this.customKeyEventHandler = null;\n this.cursorBlinkInterval = null;\n this.applicationKeypad = false;\n this.applicationCursor = false;\n this.originMode = false;\n this.insertMode = false;\n this.wraparoundMode = true;\n this.normal = null;\n this.charset = null;\n this.gcharset = null;\n this.glevel = 0;\n this.charsets = [null];\n this.decLocator;\n this.x10Mouse;\n this.vt200Mouse;\n this.vt300Mouse;\n this.normalMouse;\n this.mouseEvents;\n this.sendFocus;\n this.utfMouse;\n this.sgrMouse;\n this.urxvtMouse;\n this.element;\n this.children;\n this.refreshStart;\n this.refreshEnd;\n this.savedX;\n this.savedY;\n this.savedCols;\n this.readable = true;\n this.writable = true;\n this.defAttr = (0 << 18) | (257 << 9) | (256 << 0);\n this.curAttr = this.defAttr;\n this.params = [];\n this.currentParam = 0;\n this.prefix = '';\n this.postfix = '';\n this.inputHandler = new InputHandler_1.InputHandler(this);\n this.parser = new Parser_1.Parser(this.inputHandler, this);\n this.renderer = this.renderer || null;\n this.selectionManager = this.selectionManager || null;\n this.linkifier = this.linkifier || new Linkifier_1.Linkifier();\n this.writeBuffer = [];\n this.writeInProgress = false;\n this.xoffSentToCatchUp = false;\n this.writeStopped = false;\n this.surrogate_high = '';\n this.lines = new CircularList_1.CircularList(this.scrollback);\n var i = this.rows;\n while (i--) {\n this.lines.push(this.blankLine());\n }\n if (this.selectionManager) {\n this.selectionManager.setBuffer(this.lines);\n }\n this.tabs;\n this.setupStops();\n this.userScrolling = false;\n}\ninherits(Terminal, EventEmitter_1.EventEmitter);\nTerminal.prototype.eraseAttr = function () {\n return (this.defAttr & ~0x1ff) | (this.curAttr & 0x1ff);\n};\nTerminal.tangoColors = [\n '#2e3436',\n '#cc0000',\n '#4e9a06',\n '#c4a000',\n '#3465a4',\n '#75507b',\n '#06989a',\n '#d3d7cf',\n '#555753',\n '#ef2929',\n '#8ae234',\n '#fce94f',\n '#729fcf',\n '#ad7fa8',\n '#34e2e2',\n '#eeeeec'\n];\nTerminal.colors = (function () {\n var colors = Terminal.tangoColors.slice(), r = [0x00, 0x5f, 0x87, 0xaf, 0xd7, 0xff], i;\n i = 0;\n for (; i < 216; i++) {\n out(r[(i / 36) % 6 | 0], r[(i / 6) % 6 | 0], r[i % 6]);\n }\n i = 0;\n for (; i < 24; i++) {\n r = 8 + i * 10;\n out(r, r, r);\n }\n function out(r, g, b) {\n colors.push('#' + hex(r) + hex(g) + hex(b));\n }\n function hex(c) {\n c = c.toString(16);\n return c.length < 2 ? '0' + c : c;\n }\n return colors;\n})();\nTerminal._colors = Terminal.colors.slice();\nTerminal.vcolors = (function () {\n var out = [], colors = Terminal.colors, i = 0, color;\n for (; i < 256; i++) {\n color = parseInt(colors[i].substring(1), 16);\n out.push([\n (color >> 16) & 0xff,\n (color >> 8) & 0xff,\n color & 0xff\n ]);\n }\n return out;\n})();\nTerminal.defaults = {\n colors: Terminal.colors,\n theme: 'default',\n convertEol: false,\n termName: 'xterm',\n geometry: [80, 24],\n cursorBlink: false,\n cursorStyle: 'block',\n visualBell: false,\n popOnBell: false,\n scrollback: 1000,\n screenKeys: false,\n debug: false,\n cancelEvents: false,\n disableStdin: false,\n useFlowControl: false,\n tabStopWidth: 8\n};\nTerminal.options = {};\nTerminal.focus = null;\neach(keys(Terminal.defaults), function (key) {\n Terminal[key] = Terminal.defaults[key];\n Terminal.options[key] = Terminal.defaults[key];\n});\nTerminal.prototype.focus = function () {\n return this.textarea.focus();\n};\nTerminal.prototype.getOption = function (key, value) {\n if (!(key in Terminal.defaults)) {\n throw new Error('No option with key \"' + key + '\"');\n }\n if (typeof this.options[key] !== 'undefined') {\n return this.options[key];\n }\n return this[key];\n};\nTerminal.prototype.setOption = function (key, value) {\n if (!(key in Terminal.defaults)) {\n throw new Error('No option with key \"' + key + '\"');\n }\n switch (key) {\n case 'scrollback':\n if (value < this.rows) {\n var msg = 'Setting the scrollback value less than the number of rows ';\n msg += \"(\" + this.rows + \") is not allowed.\";\n console.warn(msg);\n return false;\n }\n if (this.options[key] !== value) {\n if (this.lines.length > value) {\n var amountToTrim = this.lines.length - value;\n var needsRefresh = (this.ydisp - amountToTrim < 0);\n this.lines.trimStart(amountToTrim);\n this.ybase = Math.max(this.ybase - amountToTrim, 0);\n this.ydisp = Math.max(this.ydisp - amountToTrim, 0);\n if (needsRefresh) {\n this.refresh(0, this.rows - 1);\n }\n }\n this.lines.maxLength = value;\n this.viewport.syncScrollArea();\n }\n break;\n }\n this[key] = value;\n this.options[key] = value;\n switch (key) {\n case 'cursorBlink':\n this.setCursorBlinking(value);\n break;\n case 'cursorStyle':\n this.element.classList.toggle(\"xterm-cursor-style-underline\", value === 'underline');\n this.element.classList.toggle(\"xterm-cursor-style-bar\", value === 'bar');\n break;\n case 'tabStopWidth':\n this.setupStops();\n break;\n }\n};\nTerminal.prototype.restartCursorBlinking = function () {\n this.setCursorBlinking(this.options.cursorBlink);\n};\nTerminal.prototype.setCursorBlinking = function (enabled) {\n this.element.classList.toggle('xterm-cursor-blink', enabled);\n this.clearCursorBlinkingInterval();\n if (enabled) {\n var self = this;\n this.cursorBlinkInterval = setInterval(function () {\n self.element.classList.toggle('xterm-cursor-blink-on');\n }, CURSOR_BLINK_INTERVAL);\n }\n};\nTerminal.prototype.clearCursorBlinkingInterval = function () {\n this.element.classList.remove('xterm-cursor-blink-on');\n if (this.cursorBlinkInterval) {\n clearInterval(this.cursorBlinkInterval);\n this.cursorBlinkInterval = null;\n }\n};\nTerminal.bindFocus = function (term) {\n on(term.textarea, 'focus', function (ev) {\n if (term.sendFocus) {\n term.send(EscapeSequences_1.C0.ESC + '[I');\n }\n term.element.classList.add('focus');\n term.showCursor();\n term.restartCursorBlinking.apply(term);\n Terminal.focus = term;\n term.emit('focus', { terminal: term });\n });\n};\nTerminal.prototype.blur = function () {\n return this.textarea.blur();\n};\nTerminal.bindBlur = function (term) {\n on(term.textarea, 'blur', function (ev) {\n term.refresh(term.y, term.y);\n if (term.sendFocus) {\n term.send(EscapeSequences_1.C0.ESC + '[O');\n }\n term.element.classList.remove('focus');\n term.clearCursorBlinkingInterval.apply(term);\n Terminal.focus = null;\n term.emit('blur', { terminal: term });\n });\n};\nTerminal.prototype.initGlobal = function () {\n var _this = this;\n var term = this;\n Terminal.bindKeys(this);\n Terminal.bindFocus(this);\n Terminal.bindBlur(this);\n on(this.element, 'copy', function (event) {\n if (_this.mouseEvents) {\n return;\n }\n Clipboard_1.copyHandler(event, term, _this.selectionManager);\n });\n var pasteHandlerWrapper = function (event) { return Clipboard_1.pasteHandler(event, term); };\n on(this.textarea, 'paste', pasteHandlerWrapper);\n on(this.element, 'paste', pasteHandlerWrapper);\n if (term.browser.isFirefox) {\n on(this.element, 'mousedown', function (event) {\n if (event.button == 2) {\n Clipboard_1.rightClickHandler(event, _this.textarea, _this.selectionManager);\n }\n });\n }\n else {\n on(this.element, 'contextmenu', function (event) {\n Clipboard_1.rightClickHandler(event, _this.textarea, _this.selectionManager);\n });\n }\n if (term.browser.isLinux) {\n on(this.element, 'auxclick', function (event) {\n if (event.button === 1) {\n Clipboard_1.moveTextAreaUnderMouseCursor(event, _this.textarea, _this.selectionManager);\n }\n });\n }\n};\nTerminal.bindKeys = function (term) {\n on(term.element, 'keydown', function (ev) {\n if (document.activeElement != this) {\n return;\n }\n term.keyDown(ev);\n }, true);\n on(term.element, 'keypress', function (ev) {\n if (document.activeElement != this) {\n return;\n }\n term.keyPress(ev);\n }, true);\n on(term.element, 'keyup', function (ev) {\n if (!wasMondifierKeyOnlyEvent(ev)) {\n term.focus(term);\n }\n }, true);\n on(term.textarea, 'keydown', function (ev) {\n term.keyDown(ev);\n }, true);\n on(term.textarea, 'keypress', function (ev) {\n term.keyPress(ev);\n this.value = '';\n }, true);\n on(term.textarea, 'compositionstart', term.compositionHelper.compositionstart.bind(term.compositionHelper));\n on(term.textarea, 'compositionupdate', term.compositionHelper.compositionupdate.bind(term.compositionHelper));\n on(term.textarea, 'compositionend', term.compositionHelper.compositionend.bind(term.compositionHelper));\n term.on('refresh', term.compositionHelper.updateCompositionElements.bind(term.compositionHelper));\n term.on('refresh', function (data) {\n term.queueLinkification(data.start, data.end);\n });\n};\nTerminal.prototype.insertRow = function (row) {\n if (typeof row != 'object') {\n row = document.createElement('div');\n }\n this.rowContainer.appendChild(row);\n this.children.push(row);\n return row;\n};\nTerminal.prototype.open = function (parent, focus) {\n var _this = this;\n var self = this, i = 0, div;\n this.parent = parent || this.parent;\n if (!this.parent) {\n throw new Error('Terminal requires a parent element.');\n }\n this.context = this.parent.ownerDocument.defaultView;\n this.document = this.parent.ownerDocument;\n this.body = this.document.getElementsByTagName('body')[0];\n this.element = this.document.createElement('div');\n this.element.classList.add('terminal');\n this.element.classList.add('xterm');\n this.element.classList.add('xterm-theme-' + this.theme);\n this.setCursorBlinking(this.options.cursorBlink);\n this.element.setAttribute('tabindex', 0);\n this.viewportElement = document.createElement('div');\n this.viewportElement.classList.add('xterm-viewport');\n this.element.appendChild(this.viewportElement);\n this.viewportScrollArea = document.createElement('div');\n this.viewportScrollArea.classList.add('xterm-scroll-area');\n this.viewportElement.appendChild(this.viewportScrollArea);\n this.selectionContainer = document.createElement('div');\n this.selectionContainer.classList.add('xterm-selection');\n this.element.appendChild(this.selectionContainer);\n this.rowContainer = document.createElement('div');\n this.rowContainer.classList.add('xterm-rows');\n this.element.appendChild(this.rowContainer);\n this.children = [];\n this.linkifier.attachToDom(document, this.children);\n this.helperContainer = document.createElement('div');\n this.helperContainer.classList.add('xterm-helpers');\n this.element.appendChild(this.helperContainer);\n this.textarea = document.createElement('textarea');\n this.textarea.classList.add('xterm-helper-textarea');\n this.textarea.setAttribute('autocorrect', 'off');\n this.textarea.setAttribute('autocapitalize', 'off');\n this.textarea.setAttribute('spellcheck', 'false');\n this.textarea.tabIndex = 0;\n this.textarea.addEventListener('focus', function () {\n self.emit('focus', { terminal: self });\n });\n this.textarea.addEventListener('blur', function () {\n self.emit('blur', { terminal: self });\n });\n this.helperContainer.appendChild(this.textarea);\n this.compositionView = document.createElement('div');\n this.compositionView.classList.add('composition-view');\n this.compositionHelper = new CompositionHelper_1.CompositionHelper(this.textarea, this.compositionView, this);\n this.helperContainer.appendChild(this.compositionView);\n this.charSizeStyleElement = document.createElement('style');\n this.helperContainer.appendChild(this.charSizeStyleElement);\n for (; i < this.rows; i++) {\n this.insertRow();\n }\n this.parent.appendChild(this.element);\n this.charMeasure = new CharMeasure_1.CharMeasure(document, this.helperContainer);\n this.charMeasure.on('charsizechanged', function () {\n self.updateCharSizeStyles();\n });\n this.charMeasure.measure();\n this.viewport = new Viewport_1.Viewport(this, this.viewportElement, this.viewportScrollArea, this.charMeasure);\n this.renderer = new Renderer_1.Renderer(this);\n this.selectionManager = new SelectionManager_1.SelectionManager(this, this.lines, this.rowContainer, this.charMeasure);\n this.selectionManager.on('refresh', function (data) {\n _this.renderer.refreshSelection(data.start, data.end);\n });\n this.selectionManager.on('newselection', function (text) {\n _this.textarea.value = text;\n _this.textarea.focus();\n _this.textarea.select();\n });\n this.on('scroll', function () { return _this.selectionManager.refresh(); });\n this.viewportElement.addEventListener('scroll', function () { return _this.selectionManager.refresh(); });\n this.refresh(0, this.rows - 1);\n this.initGlobal();\n if (typeof focus == 'undefined') {\n var message = 'You did not pass the `focus` argument in `Terminal.prototype.open()`.\\n';\n message += 'The `focus` argument now defaults to `true` but starting with xterm.js 3.0 ';\n message += 'it will default to `false`.';\n console.warn(message);\n focus = true;\n }\n if (focus) {\n this.focus();\n }\n on(this.element, 'click', function () {\n var selection = document.getSelection(), collapsed = selection.isCollapsed, isRange = typeof collapsed == 'boolean' ? !collapsed : selection.type == 'Range';\n if (!isRange) {\n self.focus();\n }\n });\n this.bindMouse();\n this.emit('open');\n};\nTerminal.loadAddon = function (addon, callback) {\n if (typeof exports === 'object' && typeof module === 'object') {\n return require('./addons/' + addon + '/' + addon);\n }\n else if (typeof define == 'function') {\n return require(['./addons/' + addon + '/' + addon], callback);\n }\n else {\n console.error('Cannot load a module without a CommonJS or RequireJS environment.');\n return false;\n }\n};\nTerminal.prototype.updateCharSizeStyles = function () {\n this.charSizeStyleElement.textContent =\n \".xterm-wide-char{width:\" + this.charMeasure.width * 2 + \"px;}\" +\n (\".xterm-normal-char{width:\" + this.charMeasure.width + \"px;}\") +\n (\".xterm-rows > div{height:\" + this.charMeasure.height + \"px;}\");\n};\nTerminal.prototype.bindMouse = function () {\n var el = this.element, self = this, pressed = 32;\n function sendButton(ev) {\n var button, pos;\n button = getButton(ev);\n pos = Mouse_1.getRawByteCoords(ev, self.rowContainer, self.charMeasure, self.cols, self.rows);\n if (!pos)\n return;\n sendEvent(button, pos);\n switch (ev.overrideType || ev.type) {\n case 'mousedown':\n pressed = button;\n break;\n case 'mouseup':\n pressed = 32;\n break;\n case 'wheel':\n break;\n }\n }\n function sendMove(ev) {\n var button = pressed, pos;\n pos = Mouse_1.getRawByteCoords(ev, self.rowContainer, self.charMeasure, self.cols, self.rows);\n if (!pos)\n return;\n button += 32;\n sendEvent(button, pos);\n }\n function encode(data, ch) {\n if (!self.utfMouse) {\n if (ch === 255)\n return data.push(0);\n if (ch > 127)\n ch = 127;\n data.push(ch);\n }\n else {\n if (ch === 2047)\n return data.push(0);\n if (ch < 127) {\n data.push(ch);\n }\n else {\n if (ch > 2047)\n ch = 2047;\n data.push(0xC0 | (ch >> 6));\n data.push(0x80 | (ch & 0x3F));\n }\n }\n }\n function sendEvent(button, pos) {\n if (self.vt300Mouse) {\n button &= 3;\n pos.x -= 32;\n pos.y -= 32;\n var data = EscapeSequences_1.C0.ESC + '[24';\n if (button === 0)\n data += '1';\n else if (button === 1)\n data += '3';\n else if (button === 2)\n data += '5';\n else if (button === 3)\n return;\n else\n data += '0';\n data += '~[' + pos.x + ',' + pos.y + ']\\r';\n self.send(data);\n return;\n }\n if (self.decLocator) {\n button &= 3;\n pos.x -= 32;\n pos.y -= 32;\n if (button === 0)\n button = 2;\n else if (button === 1)\n button = 4;\n else if (button === 2)\n button = 6;\n else if (button === 3)\n button = 3;\n self.send(EscapeSequences_1.C0.ESC + '['\n + button\n + ';'\n + (button === 3 ? 4 : 0)\n + ';'\n + pos.y\n + ';'\n + pos.x\n + ';'\n + (pos.page || 0)\n + '&w');\n return;\n }\n if (self.urxvtMouse) {\n pos.x -= 32;\n pos.y -= 32;\n pos.x++;\n pos.y++;\n self.send(EscapeSequences_1.C0.ESC + '[' + button + ';' + pos.x + ';' + pos.y + 'M');\n return;\n }\n if (self.sgrMouse) {\n pos.x -= 32;\n pos.y -= 32;\n self.send(EscapeSequences_1.C0.ESC + '[<'\n + (((button & 3) === 3 ? button & ~3 : button) - 32)\n + ';'\n + pos.x\n + ';'\n + pos.y\n + ((button & 3) === 3 ? 'm' : 'M'));\n return;\n }\n var data = [];\n encode(data, button);\n encode(data, pos.x);\n encode(data, pos.y);\n self.send(EscapeSequences_1.C0.ESC + '[M' + String.fromCharCode.apply(String, data));\n }\n function getButton(ev) {\n var button, shift, meta, ctrl, mod;\n switch (ev.overrideType || ev.type) {\n case 'mousedown':\n button = ev.button != null\n ? +ev.button\n : ev.which != null\n ? ev.which - 1\n : null;\n if (self.browser.isMSIE) {\n button = button === 1 ? 0 : button === 4 ? 1 : button;\n }\n break;\n case 'mouseup':\n button = 3;\n break;\n case 'DOMMouseScroll':\n button = ev.detail < 0\n ? 64\n : 65;\n break;\n case 'wheel':\n button = ev.wheelDeltaY > 0\n ? 64\n : 65;\n break;\n }\n shift = ev.shiftKey ? 4 : 0;\n meta = ev.metaKey ? 8 : 0;\n ctrl = ev.ctrlKey ? 16 : 0;\n mod = shift | meta | ctrl;\n if (self.vt200Mouse) {\n mod &= ctrl;\n }\n else if (!self.normalMouse) {\n mod = 0;\n }\n button = (32 + (mod << 2)) + button;\n return button;\n }\n on(el, 'mousedown', function (ev) {\n if (!self.mouseEvents)\n return;\n sendButton(ev);\n self.focus();\n if (self.vt200Mouse) {\n ev.overrideType = 'mouseup';\n sendButton(ev);\n return self.cancel(ev);\n }\n if (self.normalMouse)\n on(self.document, 'mousemove', sendMove);\n if (!self.x10Mouse) {\n on(self.document, 'mouseup', function up(ev) {\n sendButton(ev);\n if (self.normalMouse)\n off(self.document, 'mousemove', sendMove);\n off(self.document, 'mouseup', up);\n return self.cancel(ev);\n });\n }\n return self.cancel(ev);\n });\n on(el, 'wheel', function (ev) {\n if (!self.mouseEvents)\n return;\n if (self.x10Mouse\n || self.vt300Mouse\n || self.decLocator)\n return;\n sendButton(ev);\n return self.cancel(ev);\n });\n on(el, 'wheel', function (ev) {\n if (self.mouseEvents)\n return;\n self.viewport.onWheel(ev);\n return self.cancel(ev);\n });\n on(el, 'touchstart', function (ev) {\n if (self.mouseEvents)\n return;\n self.viewport.onTouchStart(ev);\n return self.cancel(ev);\n });\n on(el, 'touchmove', function (ev) {\n if (self.mouseEvents)\n return;\n self.viewport.onTouchMove(ev);\n return self.cancel(ev);\n });\n};\nTerminal.prototype.destroy = function () {\n this.readable = false;\n this.writable = false;\n this._events = {};\n this.handler = function () { };\n this.write = function () { };\n if (this.element && this.element.parentNode) {\n this.element.parentNode.removeChild(this.element);\n }\n};\nTerminal.prototype.refresh = function (start, end) {\n if (this.renderer) {\n this.renderer.queueRefresh(start, end);\n }\n};\nTerminal.prototype.queueLinkification = function (start, end) {\n if (this.linkifier) {\n for (var i = start; i <= end; i++) {\n this.linkifier.linkifyRow(i);\n }\n }\n};\nTerminal.prototype.showCursor = function () {\n if (!this.cursorState) {\n this.cursorState = 1;\n this.refresh(this.y, this.y);\n }\n};\nTerminal.prototype.scroll = function (isWrapped) {\n var row;\n if (this.lines.length === this.lines.maxLength) {\n this.lines.trimStart(1);\n this.ybase--;\n if (this.ydisp !== 0) {\n this.ydisp--;\n }\n }\n this.ybase++;\n if (!this.userScrolling) {\n this.ydisp = this.ybase;\n }\n row = this.ybase + this.rows - 1;\n row -= this.rows - 1 - this.scrollBottom;\n if (row === this.lines.length) {\n this.lines.push(this.blankLine(undefined, isWrapped));\n }\n else {\n this.lines.splice(row, 0, this.blankLine(undefined, isWrapped));\n }\n if (this.scrollTop !== 0) {\n if (this.ybase !== 0) {\n this.ybase--;\n if (!this.userScrolling) {\n this.ydisp = this.ybase;\n }\n }\n this.lines.splice(this.ybase + this.scrollTop, 1);\n }\n this.updateRange(this.scrollTop);\n this.updateRange(this.scrollBottom);\n this.emit('scroll', this.ydisp);\n};\nTerminal.prototype.scrollDisp = function (disp, suppressScrollEvent) {\n if (disp < 0) {\n if (this.ydisp === 0) {\n return;\n }\n this.userScrolling = true;\n }\n else if (disp + this.ydisp >= this.ybase) {\n this.userScrolling = false;\n }\n this.ydisp += disp;\n if (this.ydisp > this.ybase) {\n this.ydisp = this.ybase;\n }\n else if (this.ydisp < 0) {\n this.ydisp = 0;\n }\n if (!suppressScrollEvent) {\n this.emit('scroll', this.ydisp);\n }\n this.refresh(0, this.rows - 1);\n};\nTerminal.prototype.scrollPages = function (pageCount) {\n this.scrollDisp(pageCount * (this.rows - 1));\n};\nTerminal.prototype.scrollToTop = function () {\n this.scrollDisp(-this.ydisp);\n};\nTerminal.prototype.scrollToBottom = function () {\n this.scrollDisp(this.ybase - this.ydisp);\n};\nTerminal.prototype.write = function (data) {\n this.writeBuffer.push(data);\n if (this.options.useFlowControl && !this.xoffSentToCatchUp && this.writeBuffer.length >= WRITE_BUFFER_PAUSE_THRESHOLD) {\n this.send(EscapeSequences_1.C0.DC3);\n this.xoffSentToCatchUp = true;\n }\n if (!this.writeInProgress && this.writeBuffer.length > 0) {\n this.writeInProgress = true;\n var self = this;\n setTimeout(function () {\n self.innerWrite();\n });\n }\n};\nTerminal.prototype.innerWrite = function () {\n var writeBatch = this.writeBuffer.splice(0, WRITE_BATCH_SIZE);\n while (writeBatch.length > 0) {\n var data = writeBatch.shift();\n var l = data.length, i = 0, j, cs, ch, code, low, ch_width, row;\n if (this.xoffSentToCatchUp && writeBatch.length === 0 && this.writeBuffer.length === 0) {\n this.send(EscapeSequences_1.C0.DC1);\n this.xoffSentToCatchUp = false;\n }\n this.refreshStart = this.y;\n this.refreshEnd = this.y;\n var state = this.parser.parse(data);\n this.parser.setState(state);\n this.updateRange(this.y);\n this.refresh(this.refreshStart, this.refreshEnd);\n }\n if (this.writeBuffer.length > 0) {\n var self = this;\n setTimeout(function () {\n self.innerWrite();\n }, 0);\n }\n else {\n this.writeInProgress = false;\n }\n};\nTerminal.prototype.writeln = function (data) {\n this.write(data + '\\r\\n');\n};\nTerminal.prototype.attachCustomKeydownHandler = function (customKeydownHandler) {\n var message = 'attachCustomKeydownHandler() is DEPRECATED and will be removed soon. Please use attachCustomKeyEventHandler() instead.';\n console.warn(message);\n this.attachCustomKeyEventHandler(customKeydownHandler);\n};\nTerminal.prototype.attachCustomKeyEventHandler = function (customKeyEventHandler) {\n this.customKeyEventHandler = customKeyEventHandler;\n};\nTerminal.prototype.setHypertextLinkHandler = function (handler) {\n if (!this.linkifier) {\n throw new Error('Cannot attach a hypertext link handler before Terminal.open is called');\n }\n this.linkifier.setHypertextLinkHandler(handler);\n this.refresh(0, this.rows - 1);\n};\nTerminal.prototype.setHypertextValidationCallback = function (callback) {\n if (!this.linkifier) {\n throw new Error('Cannot attach a hypertext validation callback before Terminal.open is called');\n }\n this.linkifier.setHypertextValidationCallback(callback);\n this.refresh(0, this.rows - 1);\n};\nTerminal.prototype.registerLinkMatcher = function (regex, handler, options) {\n if (this.linkifier) {\n var matcherId = this.linkifier.registerLinkMatcher(regex, handler, options);\n this.refresh(0, this.rows - 1);\n return matcherId;\n }\n};\nTerminal.prototype.deregisterLinkMatcher = function (matcherId) {\n if (this.linkifier) {\n if (this.linkifier.deregisterLinkMatcher(matcherId)) {\n this.refresh(0, this.rows - 1);\n }\n }\n};\nTerminal.prototype.hasSelection = function () {\n return this.selectionManager.hasSelection;\n};\nTerminal.prototype.getSelection = function () {\n return this.selectionManager.selectionText;\n};\nTerminal.prototype.clearSelection = function () {\n this.selectionManager.clearSelection();\n};\nTerminal.prototype.selectAll = function () {\n this.selectionManager.selectAll();\n};\nTerminal.prototype.keyDown = function (ev) {\n if (this.customKeyEventHandler && this.customKeyEventHandler(ev) === false) {\n return false;\n }\n this.restartCursorBlinking();\n if (!this.compositionHelper.keydown.bind(this.compositionHelper)(ev)) {\n if (this.ybase !== this.ydisp) {\n this.scrollToBottom();\n }\n return false;\n }\n var self = this;\n var result = this.evaluateKeyEscapeSequence(ev);\n if (result.key === EscapeSequences_1.C0.DC3) {\n this.writeStopped = true;\n }\n else if (result.key === EscapeSequences_1.C0.DC1) {\n this.writeStopped = false;\n }\n if (result.scrollDisp) {\n this.scrollDisp(result.scrollDisp);\n return this.cancel(ev, true);\n }\n if (isThirdLevelShift(this, ev)) {\n return true;\n }\n if (result.cancel) {\n this.cancel(ev, true);\n }\n if (!result.key) {\n return true;\n }\n this.emit('keydown', ev);\n this.emit('key', result.key, ev);\n this.showCursor();\n this.handler(result.key);\n return this.cancel(ev, true);\n};\nTerminal.prototype.evaluateKeyEscapeSequence = function (ev) {\n var result = {\n cancel: false,\n key: undefined,\n scrollDisp: undefined\n };\n var modifiers = ev.shiftKey << 0 | ev.altKey << 1 | ev.ctrlKey << 2 | ev.metaKey << 3;\n switch (ev.keyCode) {\n case 8:\n if (ev.shiftKey) {\n result.key = EscapeSequences_1.C0.BS;\n break;\n }\n result.key = EscapeSequences_1.C0.DEL;\n break;\n case 9:\n if (ev.shiftKey) {\n result.key = EscapeSequences_1.C0.ESC + '[Z';\n break;\n }\n result.key = EscapeSequences_1.C0.HT;\n result.cancel = true;\n break;\n case 13:\n result.key = EscapeSequences_1.C0.CR;\n result.cancel = true;\n break;\n case 27:\n result.key = EscapeSequences_1.C0.ESC;\n result.cancel = true;\n break;\n case 37:\n if (modifiers) {\n result.key = EscapeSequences_1.C0.ESC + '[1;' + (modifiers + 1) + 'D';\n if (result.key == EscapeSequences_1.C0.ESC + '[1;3D') {\n result.key = (this.browser.isMac) ? EscapeSequences_1.C0.ESC + 'b' : EscapeSequences_1.C0.ESC + '[1;5D';\n }\n }\n else if (this.applicationCursor) {\n result.key = EscapeSequences_1.C0.ESC + 'OD';\n }\n else {\n result.key = EscapeSequences_1.C0.ESC + '[D';\n }\n break;\n case 39:\n if (modifiers) {\n result.key = EscapeSequences_1.C0.ESC + '[1;' + (modifiers + 1) + 'C';\n if (result.key == EscapeSequences_1.C0.ESC + '[1;3C') {\n result.key = (this.browser.isMac) ? EscapeSequences_1.C0.ESC + 'f' : EscapeSequences_1.C0.ESC + '[1;5C';\n }\n }\n else if (this.applicationCursor) {\n result.key = EscapeSequences_1.C0.ESC + 'OC';\n }\n else {\n result.key = EscapeSequences_1.C0.ESC + '[C';\n }\n break;\n case 38:\n if (modifiers) {\n result.key = EscapeSequences_1.C0.ESC + '[1;' + (modifiers + 1) + 'A';\n if (result.key == EscapeSequences_1.C0.ESC + '[1;3A') {\n result.key = EscapeSequences_1.C0.ESC + '[1;5A';\n }\n }\n else if (this.applicationCursor) {\n result.key = EscapeSequences_1.C0.ESC + 'OA';\n }\n else {\n result.key = EscapeSequences_1.C0.ESC + '[A';\n }\n break;\n case 40:\n if (modifiers) {\n result.key = EscapeSequences_1.C0.ESC + '[1;' + (modifiers + 1) + 'B';\n if (result.key == EscapeSequences_1.C0.ESC + '[1;3B') {\n result.key = EscapeSequences_1.C0.ESC + '[1;5B';\n }\n }\n else if (this.applicationCursor) {\n result.key = EscapeSequences_1.C0.ESC + 'OB';\n }\n else {\n result.key = EscapeSequences_1.C0.ESC + '[B';\n }\n break;\n case 45:\n if (!ev.shiftKey && !ev.ctrlKey) {\n result.key = EscapeSequences_1.C0.ESC + '[2~';\n }\n break;\n case 46:\n if (modifiers) {\n result.key = EscapeSequences_1.C0.ESC + '[3;' + (modifiers + 1) + '~';\n }\n else {\n result.key = EscapeSequences_1.C0.ESC + '[3~';\n }\n break;\n case 36:\n if (modifiers)\n result.key = EscapeSequences_1.C0.ESC + '[1;' + (modifiers + 1) + 'H';\n else if (this.applicationCursor)\n result.key = EscapeSequences_1.C0.ESC + 'OH';\n else\n result.key = EscapeSequences_1.C0.ESC + '[H';\n break;\n case 35:\n if (modifiers)\n result.key = EscapeSequences_1.C0.ESC + '[1;' + (modifiers + 1) + 'F';\n else if (this.applicationCursor)\n result.key = EscapeSequences_1.C0.ESC + 'OF';\n else\n result.key = EscapeSequences_1.C0.ESC + '[F';\n break;\n case 33:\n if (ev.shiftKey) {\n result.scrollDisp = -(this.rows - 1);\n }\n else {\n result.key = EscapeSequences_1.C0.ESC + '[5~';\n }\n break;\n case 34:\n if (ev.shiftKey) {\n result.scrollDisp = this.rows - 1;\n }\n else {\n result.key = EscapeSequences_1.C0.ESC + '[6~';\n }\n break;\n case 112:\n if (modifiers) {\n result.key = EscapeSequences_1.C0.ESC + '[1;' + (modifiers + 1) + 'P';\n }\n else {\n result.key = EscapeSequences_1.C0.ESC + 'OP';\n }\n break;\n case 113:\n if (modifiers) {\n result.key = EscapeSequences_1.C0.ESC + '[1;' + (modifiers + 1) + 'Q';\n }\n else {\n result.key = EscapeSequences_1.C0.ESC + 'OQ';\n }\n break;\n case 114:\n if (modifiers) {\n result.key = EscapeSequences_1.C0.ESC + '[1;' + (modifiers + 1) + 'R';\n }\n else {\n result.key = EscapeSequences_1.C0.ESC + 'OR';\n }\n break;\n case 115:\n if (modifiers) {\n result.key = EscapeSequences_1.C0.ESC + '[1;' + (modifiers + 1) + 'S';\n }\n else {\n result.key = EscapeSequences_1.C0.ESC + 'OS';\n }\n break;\n case 116:\n if (modifiers) {\n result.key = EscapeSequences_1.C0.ESC + '[15;' + (modifiers + 1) + '~';\n }\n else {\n result.key = EscapeSequences_1.C0.ESC + '[15~';\n }\n break;\n case 117:\n if (modifiers) {\n result.key = EscapeSequences_1.C0.ESC + '[17;' + (modifiers + 1) + '~';\n }\n else {\n result.key = EscapeSequences_1.C0.ESC + '[17~';\n }\n break;\n case 118:\n if (modifiers) {\n result.key = EscapeSequences_1.C0.ESC + '[18;' + (modifiers + 1) + '~';\n }\n else {\n result.key = EscapeSequences_1.C0.ESC + '[18~';\n }\n break;\n case 119:\n if (modifiers) {\n result.key = EscapeSequences_1.C0.ESC + '[19;' + (modifiers + 1) + '~';\n }\n else {\n result.key = EscapeSequences_1.C0.ESC + '[19~';\n }\n break;\n case 120:\n if (modifiers) {\n result.key = EscapeSequences_1.C0.ESC + '[20;' + (modifiers + 1) + '~';\n }\n else {\n result.key = EscapeSequences_1.C0.ESC + '[20~';\n }\n break;\n case 121:\n if (modifiers) {\n result.key = EscapeSequences_1.C0.ESC + '[21;' + (modifiers + 1) + '~';\n }\n else {\n result.key = EscapeSequences_1.C0.ESC + '[21~';\n }\n break;\n case 122:\n if (modifiers) {\n result.key = EscapeSequences_1.C0.ESC + '[23;' + (modifiers + 1) + '~';\n }\n else {\n result.key = EscapeSequences_1.C0.ESC + '[23~';\n }\n break;\n case 123:\n if (modifiers) {\n result.key = EscapeSequences_1.C0.ESC + '[24;' + (modifiers + 1) + '~';\n }\n else {\n result.key = EscapeSequences_1.C0.ESC + '[24~';\n }\n break;\n default:\n if (ev.ctrlKey && !ev.shiftKey && !ev.altKey && !ev.metaKey) {\n if (ev.keyCode >= 65 && ev.keyCode <= 90) {\n result.key = String.fromCharCode(ev.keyCode - 64);\n }\n else if (ev.keyCode === 32) {\n result.key = String.fromCharCode(0);\n }\n else if (ev.keyCode >= 51 && ev.keyCode <= 55) {\n result.key = String.fromCharCode(ev.keyCode - 51 + 27);\n }\n else if (ev.keyCode === 56) {\n result.key = String.fromCharCode(127);\n }\n else if (ev.keyCode === 219) {\n result.key = String.fromCharCode(27);\n }\n else if (ev.keyCode === 220) {\n result.key = String.fromCharCode(28);\n }\n else if (ev.keyCode === 221) {\n result.key = String.fromCharCode(29);\n }\n }\n else if (!this.browser.isMac && ev.altKey && !ev.ctrlKey && !ev.metaKey) {\n if (ev.keyCode >= 65 && ev.keyCode <= 90) {\n result.key = EscapeSequences_1.C0.ESC + String.fromCharCode(ev.keyCode + 32);\n }\n else if (ev.keyCode === 192) {\n result.key = EscapeSequences_1.C0.ESC + '`';\n }\n else if (ev.keyCode >= 48 && ev.keyCode <= 57) {\n result.key = EscapeSequences_1.C0.ESC + (ev.keyCode - 48);\n }\n }\n else if (this.browser.isMac && !ev.altKey && !ev.ctrlKey && ev.metaKey) {\n if (ev.keyCode === 65) {\n this.selectAll();\n }\n }\n break;\n }\n return result;\n};\nTerminal.prototype.setgLevel = function (g) {\n this.glevel = g;\n this.charset = this.charsets[g];\n};\nTerminal.prototype.setgCharset = function (g, charset) {\n this.charsets[g] = charset;\n if (this.glevel === g) {\n this.charset = charset;\n }\n};\nTerminal.prototype.keyPress = function (ev) {\n var key;\n if (this.customKeyEventHandler && this.customKeyEventHandler(ev) === false) {\n return false;\n }\n this.cancel(ev);\n if (ev.charCode) {\n key = ev.charCode;\n }\n else if (ev.which == null) {\n key = ev.keyCode;\n }\n else if (ev.which !== 0 && ev.charCode !== 0) {\n key = ev.which;\n }\n else {\n return false;\n }\n if (!key || ((ev.altKey || ev.ctrlKey || ev.metaKey) && !isThirdLevelShift(this, ev))) {\n return false;\n }\n key = String.fromCharCode(key);\n this.emit('keypress', key, ev);\n this.emit('key', key, ev);\n this.showCursor();\n this.handler(key);\n return true;\n};\nTerminal.prototype.send = function (data) {\n var self = this;\n if (!this.queue) {\n setTimeout(function () {\n self.handler(self.queue);\n self.queue = '';\n }, 1);\n }\n this.queue += data;\n};\nTerminal.prototype.bell = function () {\n if (!this.visualBell)\n return;\n var self = this;\n this.element.style.borderColor = 'white';\n setTimeout(function () {\n self.element.style.borderColor = '';\n }, 10);\n if (this.popOnBell)\n this.focus();\n};\nTerminal.prototype.log = function () {\n if (!this.debug)\n return;\n if (!this.context.console || !this.context.console.log)\n return;\n var args = Array.prototype.slice.call(arguments);\n this.context.console.log.apply(this.context.console, args);\n};\nTerminal.prototype.error = function () {\n if (!this.debug)\n return;\n if (!this.context.console || !this.context.console.error)\n return;\n var args = Array.prototype.slice.call(arguments);\n this.context.console.error.apply(this.context.console, args);\n};\nTerminal.prototype.resize = function (x, y) {\n if (isNaN(x) || isNaN(y)) {\n return;\n }\n if (y > this.getOption('scrollback')) {\n this.setOption('scrollback', y);\n }\n var line, el, i, j, ch, addToY;\n if (x === this.cols && y === this.rows) {\n return;\n }\n if (x < 1)\n x = 1;\n if (y < 1)\n y = 1;\n j = this.cols;\n if (j < x) {\n ch = [this.defAttr, ' ', 1];\n i = this.lines.length;\n while (i--) {\n while (this.lines.get(i).length < x) {\n this.lines.get(i).push(ch);\n }\n }\n }\n this.cols = x;\n this.setupStops(this.cols);\n j = this.rows;\n addToY = 0;\n if (j < y) {\n el = this.element;\n while (j++ < y) {\n if (this.lines.length < y + this.ybase) {\n if (this.ybase > 0 && this.lines.length <= this.ybase + this.y + addToY + 1) {\n this.ybase--;\n addToY++;\n if (this.ydisp > 0) {\n this.ydisp--;\n }\n }\n else {\n this.lines.push(this.blankLine());\n }\n }\n if (this.children.length < y) {\n this.insertRow();\n }\n }\n }\n else {\n while (j-- > y) {\n if (this.lines.length > y + this.ybase) {\n if (this.lines.length > this.ybase + this.y + 1) {\n this.lines.pop();\n }\n else {\n this.ybase++;\n this.ydisp++;\n }\n }\n if (this.children.length > y) {\n el = this.children.shift();\n if (!el)\n continue;\n el.parentNode.removeChild(el);\n }\n }\n }\n this.rows = y;\n if (this.y >= y) {\n this.y = y - 1;\n }\n if (addToY) {\n this.y += addToY;\n }\n if (this.x >= x) {\n this.x = x - 1;\n }\n this.scrollTop = 0;\n this.scrollBottom = y - 1;\n this.charMeasure.measure();\n this.refresh(0, this.rows - 1);\n this.normal = null;\n this.geometry = [this.cols, this.rows];\n this.emit('resize', { terminal: this, cols: x, rows: y });\n};\nTerminal.prototype.updateRange = function (y) {\n if (y < this.refreshStart)\n this.refreshStart = y;\n if (y > this.refreshEnd)\n this.refreshEnd = y;\n};\nTerminal.prototype.maxRange = function () {\n this.refreshStart = 0;\n this.refreshEnd = this.rows - 1;\n};\nTerminal.prototype.setupStops = function (i) {\n if (i != null) {\n if (!this.tabs[i]) {\n i = this.prevStop(i);\n }\n }\n else {\n this.tabs = {};\n i = 0;\n }\n for (; i < this.cols; i += this.getOption('tabStopWidth')) {\n this.tabs[i] = true;\n }\n};\nTerminal.prototype.prevStop = function (x) {\n if (x == null)\n x = this.x;\n while (!this.tabs[--x] && x > 0)\n ;\n return x >= this.cols\n ? this.cols - 1\n : x < 0 ? 0 : x;\n};\nTerminal.prototype.nextStop = function (x) {\n if (x == null)\n x = this.x;\n while (!this.tabs[++x] && x < this.cols)\n ;\n return x >= this.cols\n ? this.cols - 1\n : x < 0 ? 0 : x;\n};\nTerminal.prototype.eraseRight = function (x, y) {\n var line = this.lines.get(this.ybase + y);\n if (!line) {\n return;\n }\n var ch = [this.eraseAttr(), ' ', 1];\n for (; x < this.cols; x++) {\n line[x] = ch;\n }\n this.updateRange(y);\n};\nTerminal.prototype.eraseLeft = function (x, y) {\n var line = this.lines.get(this.ybase + y);\n if (!line) {\n return;\n }\n var ch = [this.eraseAttr(), ' ', 1];\n x++;\n while (x--) {\n line[x] = ch;\n }\n this.updateRange(y);\n};\nTerminal.prototype.clear = function () {\n if (this.ybase === 0 && this.y === 0) {\n return;\n }\n this.lines.set(0, this.lines.get(this.ybase + this.y));\n this.lines.length = 1;\n this.ydisp = 0;\n this.ybase = 0;\n this.y = 0;\n for (var i = 1; i < this.rows; i++) {\n this.lines.push(this.blankLine());\n }\n this.refresh(0, this.rows - 1);\n this.emit('scroll', this.ydisp);\n};\nTerminal.prototype.eraseLine = function (y) {\n this.eraseRight(0, y);\n};\nTerminal.prototype.blankLine = function (cur, isWrapped) {\n var attr = cur\n ? this.eraseAttr()\n : this.defAttr;\n var ch = [attr, ' ', 1], line = [], i = 0;\n if (isWrapped) {\n line.isWrapped = isWrapped;\n }\n for (; i < this.cols; i++) {\n line[i] = ch;\n }\n return line;\n};\nTerminal.prototype.ch = function (cur) {\n return cur\n ? [this.eraseAttr(), ' ', 1]\n : [this.defAttr, ' ', 1];\n};\nTerminal.prototype.is = function (term) {\n var name = this.termName;\n return (name + '').indexOf(term) === 0;\n};\nTerminal.prototype.handler = function (data) {\n if (this.options.disableStdin) {\n return;\n }\n if (this.ybase !== this.ydisp) {\n this.scrollToBottom();\n }\n this.emit('data', data);\n};\nTerminal.prototype.handleTitle = function (title) {\n this.emit('title', title);\n};\nTerminal.prototype.index = function () {\n this.y++;\n if (this.y > this.scrollBottom) {\n this.y--;\n this.scroll();\n }\n if (this.x >= this.cols) {\n this.x--;\n }\n};\nTerminal.prototype.reverseIndex = function () {\n var j;\n if (this.y === this.scrollTop) {\n this.lines.shiftElements(this.y + this.ybase, this.rows - 1, 1);\n this.lines.set(this.y + this.ybase, this.blankLine(true));\n this.updateRange(this.scrollTop);\n this.updateRange(this.scrollBottom);\n }\n else {\n this.y--;\n }\n};\nTerminal.prototype.reset = function () {\n this.options.rows = this.rows;\n this.options.cols = this.cols;\n var customKeyEventHandler = this.customKeyEventHandler;\n var cursorBlinkInterval = this.cursorBlinkInterval;\n Terminal.call(this, this.options);\n this.customKeyEventHandler = customKeyEventHandler;\n this.cursorBlinkInterval = cursorBlinkInterval;\n this.refresh(0, this.rows - 1);\n this.viewport.syncScrollArea();\n};\nTerminal.prototype.tabSet = function () {\n this.tabs[this.x] = true;\n};\nfunction on(el, type, handler, capture) {\n if (!Array.isArray(el)) {\n el = [el];\n }\n el.forEach(function (element) {\n element.addEventListener(type, handler, capture || false);\n });\n}\nfunction off(el, type, handler, capture) {\n el.removeEventListener(type, handler, capture || false);\n}\nfunction cancel(ev, force) {\n if (!this.cancelEvents && !force) {\n return;\n }\n ev.preventDefault();\n ev.stopPropagation();\n return false;\n}\nfunction inherits(child, parent) {\n function f() {\n this.constructor = child;\n }\n f.prototype = parent.prototype;\n child.prototype = new f;\n}\nfunction indexOf(obj, el) {\n var i = obj.length;\n while (i--) {\n if (obj[i] === el)\n return i;\n }\n return -1;\n}\nfunction isThirdLevelShift(term, ev) {\n var thirdLevelKey = (term.browser.isMac && ev.altKey && !ev.ctrlKey && !ev.metaKey) ||\n (term.browser.isMSWindows && ev.altKey && ev.ctrlKey && !ev.metaKey);\n if (ev.type == 'keypress') {\n return thirdLevelKey;\n }\n return thirdLevelKey && (!ev.keyCode || ev.keyCode > 47);\n}\nTerminal.prototype.matchColor = matchColor;\nfunction matchColor(r1, g1, b1) {\n var hash = (r1 << 16) | (g1 << 8) | b1;\n if (matchColor._cache[hash] != null) {\n return matchColor._cache[hash];\n }\n var ldiff = Infinity, li = -1, i = 0, c, r2, g2, b2, diff;\n for (; i < Terminal.vcolors.length; i++) {\n c = Terminal.vcolors[i];\n r2 = c[0];\n g2 = c[1];\n b2 = c[2];\n diff = matchColor.distance(r1, g1, b1, r2, g2, b2);\n if (diff === 0) {\n li = i;\n break;\n }\n if (diff < ldiff) {\n ldiff = diff;\n li = i;\n }\n }\n return matchColor._cache[hash] = li;\n}\nmatchColor._cache = {};\nmatchColor.distance = function (r1, g1, b1, r2, g2, b2) {\n return Math.pow(30 * (r1 - r2), 2)\n + Math.pow(59 * (g1 - g2), 2)\n + Math.pow(11 * (b1 - b2), 2);\n};\nfunction each(obj, iter, con) {\n if (obj.forEach)\n return obj.forEach(iter, con);\n for (var i = 0; i < obj.length; i++) {\n iter.call(con, obj[i], i, obj);\n }\n}\nfunction wasMondifierKeyOnlyEvent(ev) {\n return ev.keyCode === 16 ||\n ev.keyCode === 17 ||\n ev.keyCode === 18;\n}\nfunction keys(obj) {\n if (Object.keys)\n return Object.keys(obj);\n var key, keys = [];\n for (key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n keys.push(key);\n }\n }\n return keys;\n}\nTerminal.EventEmitter = EventEmitter_1.EventEmitter;\nTerminal.inherits = inherits;\nTerminal.on = on;\nTerminal.off = off;\nTerminal.cancel = cancel;\nmodule.exports = Terminal;\n\n//# sourceMappingURL=xterm.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/xterm.js\n// module id = 0\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n;\nvar EventEmitter = (function () {\n function EventEmitter() {\n this._events = this._events || {};\n }\n EventEmitter.prototype.on = function (type, listener) {\n this._events[type] = this._events[type] || [];\n this._events[type].push(listener);\n };\n EventEmitter.prototype.off = function (type, listener) {\n if (!this._events[type]) {\n return;\n }\n var obj = this._events[type];\n var i = obj.length;\n while (i--) {\n if (obj[i] === listener || obj[i].listener === listener) {\n obj.splice(i, 1);\n return;\n }\n }\n };\n EventEmitter.prototype.removeAllListeners = function (type) {\n if (this._events[type]) {\n delete this._events[type];\n }\n };\n EventEmitter.prototype.once = function (type, listener) {\n function on() {\n var args = Array.prototype.slice.call(arguments);\n this.off(type, on);\n return listener.apply(this, args);\n }\n on.listener = listener;\n return this.on(type, on);\n };\n EventEmitter.prototype.emit = function (type) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!this._events[type]) {\n return;\n }\n var obj = this._events[type];\n for (var i = 0; i < obj.length; i++) {\n obj[i].apply(this, args);\n }\n };\n EventEmitter.prototype.listeners = function (type) {\n return this._events[type] || [];\n };\n return EventEmitter;\n}());\nexports.EventEmitter = EventEmitter;\n\n//# sourceMappingURL=EventEmitter.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/EventEmitter.js\n// module id = 1\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar C0;\n(function (C0) {\n C0.NUL = '\\x00';\n C0.SOH = '\\x01';\n C0.STX = '\\x02';\n C0.ETX = '\\x03';\n C0.EOT = '\\x04';\n C0.ENQ = '\\x05';\n C0.ACK = '\\x06';\n C0.BEL = '\\x07';\n C0.BS = '\\x08';\n C0.HT = '\\x09';\n C0.LF = '\\x0a';\n C0.VT = '\\x0b';\n C0.FF = '\\x0c';\n C0.CR = '\\x0d';\n C0.SO = '\\x0e';\n C0.SI = '\\x0f';\n C0.DLE = '\\x10';\n C0.DC1 = '\\x11';\n C0.DC2 = '\\x12';\n C0.DC3 = '\\x13';\n C0.DC4 = '\\x14';\n C0.NAK = '\\x15';\n C0.SYN = '\\x16';\n C0.ETB = '\\x17';\n C0.CAN = '\\x18';\n C0.EM = '\\x19';\n C0.SUB = '\\x1a';\n C0.ESC = '\\x1b';\n C0.FS = '\\x1c';\n C0.GS = '\\x1d';\n C0.RS = '\\x1e';\n C0.US = '\\x1f';\n C0.SP = '\\x20';\n C0.DEL = '\\x7f';\n})(C0 = exports.C0 || (exports.C0 = {}));\n;\n\n//# sourceMappingURL=EscapeSequences.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/EscapeSequences.js\n// module id = 2\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CHARSETS = {};\nexports.DEFAULT_CHARSET = exports.CHARSETS['B'];\nexports.CHARSETS['0'] = {\n '`': '\\u25c6',\n 'a': '\\u2592',\n 'b': '\\u0009',\n 'c': '\\u000c',\n 'd': '\\u000d',\n 'e': '\\u000a',\n 'f': '\\u00b0',\n 'g': '\\u00b1',\n 'h': '\\u2424',\n 'i': '\\u000b',\n 'j': '\\u2518',\n 'k': '\\u2510',\n 'l': '\\u250c',\n 'm': '\\u2514',\n 'n': '\\u253c',\n 'o': '\\u23ba',\n 'p': '\\u23bb',\n 'q': '\\u2500',\n 'r': '\\u23bc',\n 's': '\\u23bd',\n 't': '\\u251c',\n 'u': '\\u2524',\n 'v': '\\u2534',\n 'w': '\\u252c',\n 'x': '\\u2502',\n 'y': '\\u2264',\n 'z': '\\u2265',\n '{': '\\u03c0',\n '|': '\\u2260',\n '}': '\\u00a3',\n '~': '\\u00b7'\n};\nexports.CHARSETS['A'] = {\n '#': '£'\n};\nexports.CHARSETS['B'] = null;\nexports.CHARSETS['4'] = {\n '#': '£',\n '@': '¾',\n '[': 'ij',\n '\\\\': '½',\n ']': '|',\n '{': '¨',\n '|': 'f',\n '}': '¼',\n '~': '´'\n};\nexports.CHARSETS['C'] =\n exports.CHARSETS['5'] = {\n '[': 'Ä',\n '\\\\': 'Ö',\n ']': 'Å',\n '^': 'Ü',\n '`': 'é',\n '{': 'ä',\n '|': 'ö',\n '}': 'å',\n '~': 'ü'\n };\nexports.CHARSETS['R'] = {\n '#': '£',\n '@': 'à ',\n '[': '°',\n '\\\\': 'ç',\n ']': '§',\n '{': 'é',\n '|': 'ù',\n '}': 'è',\n '~': '¨'\n};\nexports.CHARSETS['Q'] = {\n '@': 'à ',\n '[': 'â',\n '\\\\': 'ç',\n ']': 'ê',\n '^': 'î',\n '`': 'ô',\n '{': 'é',\n '|': 'ù',\n '}': 'è',\n '~': 'û'\n};\nexports.CHARSETS['K'] = {\n '@': '§',\n '[': 'Ä',\n '\\\\': 'Ö',\n ']': 'Ü',\n '{': 'ä',\n '|': 'ö',\n '}': 'ü',\n '~': 'ß'\n};\nexports.CHARSETS['Y'] = {\n '#': '£',\n '@': '§',\n '[': '°',\n '\\\\': 'ç',\n ']': 'é',\n '`': 'ù',\n '{': 'à ',\n '|': 'ò',\n '}': 'è',\n '~': 'ì'\n};\nexports.CHARSETS['E'] =\n exports.CHARSETS['6'] = {\n '@': 'Ä',\n '[': 'Æ',\n '\\\\': 'Ø',\n ']': 'Å',\n '^': 'Ü',\n '`': 'ä',\n '{': 'æ',\n '|': 'ø',\n '}': 'å',\n '~': 'ü'\n };\nexports.CHARSETS['Z'] = {\n '#': '£',\n '@': '§',\n '[': '¡',\n '\\\\': 'Ñ',\n ']': '¿',\n '{': '°',\n '|': 'ñ',\n '}': 'ç'\n};\nexports.CHARSETS['H'] =\n exports.CHARSETS['7'] = {\n '@': 'É',\n '[': 'Ä',\n '\\\\': 'Ö',\n ']': 'Å',\n '^': 'Ü',\n '`': 'é',\n '{': 'ä',\n '|': 'ö',\n '}': 'å',\n '~': 'ü'\n };\nexports.CHARSETS['='] = {\n '#': 'ù',\n '@': 'à ',\n '[': 'é',\n '\\\\': 'ç',\n ']': 'ê',\n '^': 'î',\n '_': 'è',\n '`': 'ô',\n '{': 'ä',\n '|': 'ö',\n '}': 'ü',\n '~': 'û'\n};\n\n//# sourceMappingURL=Charsets.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/Charsets.js\n// module id = 3\n// module chunks = 0","/**\n * Implements the attach method, that attaches the terminal to a WebSocket stream.\n * @module xterm/addons/attach/attach\n * @license MIT\n */\n\n(function (attach) {\n if (typeof exports === 'object' && typeof module === 'object') {\n /*\n * CommonJS environment\n */\n module.exports = attach(require('../../xterm'));\n } else if (typeof define == 'function') {\n /*\n * Require.js is available\n */\n define(['../../xterm'], attach);\n } else {\n /*\n * Plain browser environment\n */\n attach(window.Terminal);\n }\n})(function (Xterm) {\n 'use strict';\n\n var exports = {};\n\n /**\n * Attaches the given terminal to the given socket.\n *\n * @param {Xterm} term - The terminal to be attached to the given socket.\n * @param {WebSocket} socket - The socket to attach the current terminal.\n * @param {boolean} bidirectional - Whether the terminal should send data\n * to the socket as well.\n * @param {boolean} buffered - Whether the rendering of incoming data\n * should happen instantly or at a maximum\n * frequency of 1 rendering per 10ms.\n */\n exports.attach = function (term, socket, bidirectional, buffered) {\n bidirectional = (typeof bidirectional == 'undefined') ? true : bidirectional;\n term.socket = socket;\n\n term._flushBuffer = function () {\n term.write(term._attachSocketBuffer);\n term._attachSocketBuffer = null;\n clearTimeout(term._attachSocketBufferTimer);\n term._attachSocketBufferTimer = null;\n };\n\n term._pushToBuffer = function (data) {\n if (term._attachSocketBuffer) {\n term._attachSocketBuffer += data;\n } else {\n term._attachSocketBuffer = data;\n setTimeout(term._flushBuffer, 10);\n }\n };\n\n term._getMessage = function (ev) {\n if (buffered) {\n term._pushToBuffer(ev.data);\n } else {\n term.write(ev.data);\n }\n };\n\n term._sendData = function (data) {\n socket.send(data);\n };\n\n socket.addEventListener('message', term._getMessage);\n\n if (bidirectional) {\n term.on('data', term._sendData);\n }\n\n socket.addEventListener('close', term.detach.bind(term, socket));\n socket.addEventListener('error', term.detach.bind(term, socket));\n };\n\n /**\n * Detaches the given terminal from the given socket\n *\n * @param {Xterm} term - The terminal to be detached from the given socket.\n * @param {WebSocket} socket - The socket from which to detach the current\n * terminal.\n */\n exports.detach = function (term, socket) {\n term.off('data', term._sendData);\n\n socket = (typeof socket == 'undefined') ? term.socket : socket;\n\n if (socket) {\n socket.removeEventListener('message', term._getMessage);\n }\n\n delete term.socket;\n };\n\n /**\n * Attaches the current terminal to the given socket\n *\n * @param {WebSocket} socket - The socket to attach the current terminal.\n * @param {boolean} bidirectional - Whether the terminal should send data\n * to the socket as well.\n * @param {boolean} buffered - Whether the rendering of incoming data\n * should happen instantly or at a maximum\n * frequency of 1 rendering per 10ms.\n */\n Xterm.prototype.attach = function (socket, bidirectional, buffered) {\n return exports.attach(this, socket, bidirectional, buffered);\n };\n\n /**\n * Detaches the current terminal from the given socket.\n *\n * @param {WebSocket} socket - The socket from which to detach the current\n * terminal.\n */\n Xterm.prototype.detach = function (socket) {\n return exports.detach(this, socket);\n };\n\n return exports;\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/addons/attach/attach.js\n// module id = 4\n// module chunks = 0","/**\n * Fit terminal columns and rows to the dimensions of its DOM element.\n *\n * ## Approach\n * - Rows: Truncate the division of the terminal parent element height by the terminal row height.\n *\n * - Columns: Truncate the division of the terminal parent element width by the terminal character\n * width (apply display: inline at the terminal row and truncate its width with the current\n * number of columns).\n * @module xterm/addons/fit/fit\n * @license MIT\n */\n\n(function (fit) {\n if (typeof exports === 'object' && typeof module === 'object') {\n /*\n * CommonJS environment\n */\n module.exports = fit(require('../../xterm'));\n } else if (typeof define == 'function') {\n /*\n * Require.js is available\n */\n define(['../../xterm'], fit);\n } else {\n /*\n * Plain browser environment\n */\n fit(window.Terminal);\n }\n})(function (Xterm) {\n var exports = {};\n\n exports.proposeGeometry = function (term) {\n if (!term.element.parentElement) {\n return null;\n }\n var parentElementStyle = window.getComputedStyle(term.element.parentElement),\n parentElementHeight = parseInt(parentElementStyle.getPropertyValue('height')),\n parentElementWidth = Math.max(0, parseInt(parentElementStyle.getPropertyValue('width')) - 17),\n elementStyle = window.getComputedStyle(term.element),\n elementPaddingVer = parseInt(elementStyle.getPropertyValue('padding-top')) + parseInt(elementStyle.getPropertyValue('padding-bottom')),\n elementPaddingHor = parseInt(elementStyle.getPropertyValue('padding-right')) + parseInt(elementStyle.getPropertyValue('padding-left')),\n availableHeight = parentElementHeight - elementPaddingVer,\n availableWidth = parentElementWidth - elementPaddingHor,\n container = term.rowContainer,\n subjectRow = term.rowContainer.firstElementChild,\n contentBuffer = subjectRow.innerHTML,\n characterHeight,\n rows,\n characterWidth,\n cols,\n geometry;\n\n subjectRow.style.display = 'inline';\n subjectRow.innerHTML = 'W'; // Common character for measuring width, although on monospace\n characterWidth = subjectRow.getBoundingClientRect().width;\n subjectRow.style.display = ''; // Revert style before calculating height, since they differ.\n characterHeight = subjectRow.getBoundingClientRect().height;\n subjectRow.innerHTML = contentBuffer;\n\n rows = parseInt(availableHeight / characterHeight);\n cols = parseInt(availableWidth / characterWidth);\n\n geometry = {cols: cols, rows: rows};\n return geometry;\n };\n\n exports.fit = function (term) {\n var geometry = exports.proposeGeometry(term);\n\n if (geometry) {\n term.resize(geometry.cols, geometry.rows);\n }\n };\n\n Xterm.prototype.proposeGeometry = function () {\n return exports.proposeGeometry(this);\n };\n\n Xterm.prototype.fit = function () {\n return exports.fit(this);\n };\n\n return exports;\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/addons/fit/fit.js\n// module id = 5\n// module chunks = 0","/**\n * Fullscreen addon for xterm.js\n * @module xterm/addons/fullscreen/fullscreen\n * @license MIT\n */\n(function (fullscreen) {\n if (typeof exports === 'object' && typeof module === 'object') {\n /*\n * CommonJS environment\n */\n module.exports = fullscreen(require('../../xterm'));\n } else if (typeof define == 'function') {\n /*\n * Require.js is available\n */\n define(['../../xterm'], fullscreen);\n } else {\n /*\n * Plain browser environment\n */\n fullscreen(window.Terminal);\n }\n})(function (Xterm) {\n var exports = {};\n\n /**\n * Toggle the given terminal's fullscreen mode.\n * @param {Xterm} term - The terminal to toggle full screen mode\n * @param {boolean} fullscreen - Toggle fullscreen on (true) or off (false)\n */\n exports.toggleFullScreen = function (term, fullscreen) {\n var fn;\n\n if (typeof fullscreen == 'undefined') {\n fn = (term.element.classList.contains('fullscreen')) ? 'remove' : 'add';\n } else if (!fullscreen) {\n fn = 'remove';\n } else {\n fn = 'add';\n }\n\n term.element.classList[fn]('fullscreen');\n };\n\n Xterm.prototype.toggleFullscreen = function (fullscreen) {\n exports.toggleFullScreen(this, fullscreen);\n };\n\n return exports;\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/addons/fullscreen/fullscreen.js\n// module id = 6\n// module chunks = 0","/**\n * This module provides methods for attaching a terminal to a terminado WebSocket stream.\n *\n * @module xterm/addons/terminado/terminado\n * @license MIT\n */\n\n(function (attach) {\n if (typeof exports === 'object' && typeof module === 'object') {\n /*\n * CommonJS environment\n */\n module.exports = attach(require('../../xterm'));\n } else if (typeof define == 'function') {\n /*\n * Require.js is available\n */\n define(['../../xterm'], attach);\n } else {\n /*\n * Plain browser environment\n */\n attach(window.Terminal);\n }\n})(function (Xterm) {\n 'use strict';\n\n var exports = {};\n\n /**\n * Attaches the given terminal to the given socket.\n *\n * @param {Xterm} term - The terminal to be attached to the given socket.\n * @param {WebSocket} socket - The socket to attach the current terminal.\n * @param {boolean} bidirectional - Whether the terminal should send data\n * to the socket as well.\n * @param {boolean} buffered - Whether the rendering of incoming data\n * should happen instantly or at a maximum\n * frequency of 1 rendering per 10ms.\n */\n exports.terminadoAttach = function (term, socket, bidirectional, buffered) {\n bidirectional = (typeof bidirectional == 'undefined') ? true : bidirectional;\n term.socket = socket;\n\n term._flushBuffer = function () {\n term.write(term._attachSocketBuffer);\n term._attachSocketBuffer = null;\n clearTimeout(term._attachSocketBufferTimer);\n term._attachSocketBufferTimer = null;\n };\n\n term._pushToBuffer = function (data) {\n if (term._attachSocketBuffer) {\n term._attachSocketBuffer += data;\n } else {\n term._attachSocketBuffer = data;\n setTimeout(term._flushBuffer, 10);\n }\n };\n\n term._getMessage = function (ev) {\n var data = JSON.parse(ev.data)\n if( data[0] == \"stdout\" ) {\n if (buffered) {\n term._pushToBuffer(data[1]);\n } else {\n term.write(data[1]);\n }\n }\n };\n\n term._sendData = function (data) {\n socket.send(JSON.stringify(['stdin', data]));\n };\n\n term._setSize = function (size) {\n socket.send(JSON.stringify(['set_size', size.rows, size.cols]));\n };\n\n socket.addEventListener('message', term._getMessage);\n\n if (bidirectional) {\n term.on('data', term._sendData);\n }\n term.on('resize', term._setSize);\n\n socket.addEventListener('close', term.terminadoDetach.bind(term, socket));\n socket.addEventListener('error', term.terminadoDetach.bind(term, socket));\n };\n\n /**\n * Detaches the given terminal from the given socket\n *\n * @param {Xterm} term - The terminal to be detached from the given socket.\n * @param {WebSocket} socket - The socket from which to detach the current\n * terminal.\n */\n exports.terminadoDetach = function (term, socket) {\n term.off('data', term._sendData);\n\n socket = (typeof socket == 'undefined') ? term.socket : socket;\n\n if (socket) {\n socket.removeEventListener('message', term._getMessage);\n }\n\n delete term.socket;\n };\n\n /**\n * Attaches the current terminal to the given socket\n *\n * @param {WebSocket} socket - The socket to attach the current terminal.\n * @param {boolean} bidirectional - Whether the terminal should send data\n * to the socket as well.\n * @param {boolean} buffered - Whether the rendering of incoming data\n * should happen instantly or at a maximum\n * frequency of 1 rendering per 10ms.\n */\n Xterm.prototype.terminadoAttach = function (socket, bidirectional, buffered) {\n return exports.terminadoAttach(this, socket, bidirectional, buffered);\n };\n\n /**\n * Detaches the current terminal from the given socket.\n *\n * @param {WebSocket} socket - The socket from which to detach the current\n * terminal.\n */\n Xterm.prototype.terminadoDetach = function (socket) {\n return exports.terminadoDetach(this, socket);\n };\n\n return exports;\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/addons/terminado/terminado.js\n// module id = 7\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Generic_1 = require(\"./Generic\");\nvar isNode = (typeof navigator === 'undefined') ? true : false;\nvar userAgent = (isNode) ? 'node' : navigator.userAgent;\nvar platform = (isNode) ? 'node' : navigator.platform;\nexports.isFirefox = !!~userAgent.indexOf('Firefox');\nexports.isMSIE = !!~userAgent.indexOf('MSIE') || !!~userAgent.indexOf('Trident');\nexports.isMac = Generic_1.contains(['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'], platform);\nexports.isIpad = platform === 'iPad';\nexports.isIphone = platform === 'iPhone';\nexports.isMSWindows = Generic_1.contains(['Windows', 'Win16', 'Win32', 'WinCE'], platform);\nexports.isLinux = platform.indexOf('Linux') >= 0;\n\n//# sourceMappingURL=Browser.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/utils/Browser.js\n// module id = 8\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction getCoordsRelativeToElement(event, element) {\n if (event.pageX == null) {\n return null;\n }\n var x = event.pageX;\n var y = event.pageY;\n while (element && element !== self.document.documentElement) {\n x -= element.offsetLeft;\n y -= element.offsetTop;\n element = 'offsetParent' in element ? element.offsetParent : element.parentElement;\n }\n return [x, y];\n}\nexports.getCoordsRelativeToElement = getCoordsRelativeToElement;\nfunction getCoords(event, rowContainer, charMeasure, colCount, rowCount, isSelection) {\n var coords = getCoordsRelativeToElement(event, rowContainer);\n coords[0] = Math.ceil((coords[0] + (isSelection ? charMeasure.width / 2 : 0)) / charMeasure.width);\n coords[1] = Math.ceil(coords[1] / charMeasure.height);\n coords[0] = Math.min(Math.max(coords[0], 1), colCount + 1);\n coords[1] = Math.min(Math.max(coords[1], 1), rowCount + 1);\n return coords;\n}\nexports.getCoords = getCoords;\nfunction getRawByteCoords(event, rowContainer, charMeasure, colCount, rowCount) {\n var coords = getCoords(event, rowContainer, charMeasure, colCount, rowCount);\n var x = coords[0];\n var y = coords[1];\n x += 32;\n y += 32;\n return { x: x, y: y };\n}\nexports.getRawByteCoords = getRawByteCoords;\n\n//# sourceMappingURL=Mouse.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/utils/Mouse.js\n// module id = 9\n// module chunks = 0","import * as bare from \"hterm\";\nimport * as bareLib from \"htermLib\";\n\nexport class TermHterm {\n elem: HTMLElement;\n\n term: bare.Terminal;\n io: bare.IO;\n\n columns: number;\n rows: number;\n\n // to \"show\" the current message when removeMessage() is called\n message: string;\n\n constructor(elem: HTMLElement) {\n this.elem = elem;\n hterm.defaultStorage = new bareLib.Storage.Memory();\n this.term = new bare.Terminal();\n this.term.getPrefs().set(\"send-encoding\", \"raw\");\n this.term.decorate(this.elem);\n\n this.io = this.term.io.push();\n this.term.installKeyboard();\n };\n\n info(): { columns: number, rows: number } {\n return { columns: this.columns, rows: this.rows };\n };\n\n output(data: string) {\n if (this.term.io != null) {\n this.term.io.writeUTF16(data);\n }\n };\n\n showMessage(message: string, timeout: number) {\n this.message = message;\n if (timeout > 0) {\n this.term.io.showOverlay(message, timeout);\n } else {\n this.term.io.showOverlay(message, null);\n }\n };\n\n removeMessage(): void {\n // there is no hideOverlay(), so show the same message with 0 sec\n this.term.io.showOverlay(this.message, 0);\n }\n\n setWindowTitle(title: string) {\n this.term.setWindowTitle(title);\n };\n\n setPreferences(value: object) {\n Object.keys(value).forEach((key) => {\n this.term.getPrefs().set(key, value[key]);\n });\n };\n\n onInput(callback: (input: string) => void) {\n this.io.onVTKeystroke = (data) => {\n callback(data);\n };\n this.io.sendString = (data) => {\n callback(data);\n };\n };\n\n onResize(callback: (colmuns: number, rows: number) => void) {\n this.io.onTerminalResize = (columns: number, rows: number) => {\n this.columns = columns;\n this.rows = rows;\n callback(columns, rows);\n };\n };\n\n deactivate(): void {\n this.io.onVTKeystroke = null;\n this.io.sendString = null\n this.io.onTerminalResize = null;\n this.term.uninstallKeyboard();\n }\n\n reset(): void {\n this.removeMessage();\n this.term.installKeyboard();\n }\n\n close(): void {\n this.term.uninstallKeyboard();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/hterm.ts","export class ConnectionFactory {\n url: string;\n protocols: string[];\n\n constructor(url: string, protocols: string[]) {\n this.url = url;\n this.protocols = protocols;\n };\n\n create(): Connection {\n return new Connection(this.url, this.protocols);\n };\n}\n\nexport class Connection {\n bare: WebSocket;\n\n\n constructor(url: string, protocols: string[]) {\n this.bare = new WebSocket(url, protocols);\n }\n\n open() {\n // nothing todo for websocket\n };\n\n close() {\n this.bare.close();\n };\n\n send(data: string) {\n this.bare.send(data);\n };\n\n isOpen(): boolean {\n if (this.bare.readyState == WebSocket.CONNECTING ||\n this.bare.readyState == WebSocket.OPEN) {\n return true\n }\n return false\n }\n\n onOpen(callback: () => void) {\n this.bare.onopen = (event) => {\n callback();\n }\n };\n\n onReceive(callback: (data: string) => void) {\n this.bare.onmessage = (event) => {\n callback(event.data);\n }\n };\n\n onClose(callback: () => void) {\n this.bare.onclose = (event) => {\n callback();\n };\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/websocket.ts","export const protocols = [\"webtty\"];\n\nexport const msgInputUnknown = '0';\nexport const msgInput = '1';\nexport const msgPing = '2';\nexport const msgResizeTerminal = '3';\n\nexport const msgUnknownOutput = '0';\nexport const msgOutput = '1';\nexport const msgPong = '2';\nexport const msgSetWindowTitle = '3';\nexport const msgSetPreferences = '4';\nexport const msgSetReconnect = '5';\n\n\nexport interface Terminal {\n info(): { columns: number, rows: number };\n output(data: string): void;\n showMessage(message: string, timeout: number): void;\n removeMessage(): void;\n setWindowTitle(title: string): void;\n setPreferences(value: object): void;\n onInput(callback: (input: string) => void): void;\n onResize(callback: (colmuns: number, rows: number) => void): void;\n reset(): void;\n deactivate(): void;\n close(): void;\n}\n\nexport interface Connection {\n open(): void;\n close(): void;\n send(data: string): void;\n isOpen(): boolean;\n onOpen(callback: () => void): void;\n onReceive(callback: (data: string) => void): void;\n onClose(callback: () => void): void;\n}\n\nexport interface ConnectionFactory {\n create(): Connection;\n}\n\n\nexport class WebTTY {\n term: Terminal;\n connectionFactory: ConnectionFactory;\n args: string;\n authToken: string;\n reconnect: number;\n\n constructor(term: Terminal, connectionFactory: ConnectionFactory, args: string, authToken: string) {\n this.term = term;\n this.connectionFactory = connectionFactory;\n this.args = args;\n this.authToken = authToken;\n this.reconnect = -1;\n };\n\n open() {\n let connection = this.connectionFactory.create();\n let pingTimer: number;\n let reconnectTimeout: number;\n\n const setup = () => {\n connection.onOpen(() => {\n const termInfo = this.term.info();\n\n connection.send(JSON.stringify(\n {\n Arguments: this.args,\n AuthToken: this.authToken,\n }\n ));\n\n\n const resizeHandler = (colmuns: number, rows: number) => {\n connection.send(\n msgResizeTerminal + JSON.stringify(\n {\n columns: colmuns,\n rows: rows\n }\n )\n );\n };\n\n this.term.onResize(resizeHandler);\n resizeHandler(termInfo.columns, termInfo.rows);\n\n this.term.onInput(\n (input: string) => {\n connection.send(msgInput + input);\n }\n );\n\n pingTimer = setInterval(() => {\n connection.send(msgPing)\n }, 30 * 1000);\n\n });\n\n connection.onReceive((data) => {\n const payload = data.slice(1);\n switch (data[0]) {\n case msgOutput:\n this.term.output(\n decodeURIComponent(Array.prototype.map.call(atob(payload), function(c) {\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);\n }).join(''))\n );\n break;\n case msgPong:\n break;\n case msgSetWindowTitle:\n this.term.setWindowTitle(payload);\n break;\n case msgSetPreferences:\n const preferences = JSON.parse(payload);\n this.term.setPreferences(preferences);\n break;\n case msgSetReconnect:\n const autoReconnect = JSON.parse(payload);\n console.log(\"Enabling reconnect: \" + autoReconnect + \" seconds\")\n this.reconnect = autoReconnect;\n break;\n }\n });\n\n connection.onClose(() => {\n clearInterval(pingTimer);\n this.term.deactivate();\n this.term.showMessage(\"Connection Closed\", 0);\n if (this.reconnect > 0) {\n reconnectTimeout = setTimeout(() => {\n connection = this.connectionFactory.create();\n this.term.reset();\n setup();\n }, this.reconnect * 1000);\n }\n });\n\n connection.open();\n }\n\n setup();\n return () => {\n clearTimeout(reconnectTimeout);\n connection.close();\n }\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/webtty.ts","import * as bare from \"xterm\";\n\nbare.loadAddon(\"fit\");\n\nexport class TermXterm {\n elem: HTMLElement;\n\n message: HTMLElement;\n messageTimeout: number;\n messageTimer: number;\n\n term: bare;\n resizeListener: () => void;\n\n constructor(elem: HTMLElement) {\n this.elem = elem;\n this.term = new bare();\n\n this.message = elem.ownerDocument.createElement(\"div\");\n this.message.className = \"xterm-overlay\";\n this.messageTimeout = 2000;\n\n\n this.resizeListener = () => {\n this.term.fit();\n this.term.scrollToBottom();\n this.showMessage(String(this.term.cols) + \"x\" + String(this.term.rows), this.messageTimeout);\n };\n\n this.term.on(\"open\", () => {\n this.resizeListener();\n window.addEventListener(\"resize\", () => { this.resizeListener(); });\n });\n\n this.term.open(elem, true);\n };\n\n info(): { columns: number, rows: number } {\n return { columns: this.term.cols, rows: this.term.rows };\n };\n\n output(data: string) {\n this.term.write(data);\n };\n\n showMessage(message: string, timeout: number) {\n this.message.textContent = message;\n this.elem.appendChild(this.message);\n\n if (this.messageTimer) {\n clearTimeout(this.messageTimer);\n }\n if (timeout > 0) {\n this.messageTimer = setTimeout(() => {\n this.elem.removeChild(this.message);\n }, timeout);\n }\n };\n\n removeMessage(): void {\n if (this.message.parentNode == this.elem) {\n this.elem.removeChild(this.message);\n }\n }\n\n setWindowTitle(title: string) {\n document.title = title;\n };\n\n setPreferences(value: object) {\n };\n\n onInput(callback: (input: string) => void) {\n this.term.on(\"data\", (data) => {\n callback(data);\n });\n\n };\n\n onResize(callback: (colmuns: number, rows: number) => void) {\n this.term.on(\"resize\", (data) => {\n callback(data.cols, data.rows);\n });\n };\n\n deactivate(): void {\n this.term.off(\"data\");\n this.term.off(\"resize\");\n this.term.blur();\n }\n\n reset(): void {\n this.removeMessage();\n this.term.clear();\n }\n\n close(): void {\n window.removeEventListener(\"resize\", this.resizeListener);\n this.term.destroy();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/xterm.ts","import { TermHterm } from \"./hterm\";\nimport { TermXterm } from \"./xterm\";\nimport { Terminal, WebTTY, protocols } from \"./webtty\";\nimport { ConnectionFactory } from \"./websocket\";\n\n// @TODO remove these\ndeclare var gotty_auth_token: string;\ndeclare var gotty_term: string;\n\nconst elem = document.getElementById(\"terminal\")\n\nif (elem !== null) {\n var term: Terminal;\n if (gotty_term == \"hterm\") {\n term = new TermHterm(elem);\n } else {\n term = new TermXterm(elem);\n }\n const httpsEnabled = window.location.protocol == \"https:\";\n const url = (httpsEnabled ? 'wss://' : 'ws://') + window.location.host + window.location.pathname + 'ws';\n const args = window.location.search;\n const factory = new ConnectionFactory(url, protocols);\n const wt = new WebTTY(term, factory, args, gotty_auth_token);\n const closer = wt.open();\n\n window.addEventListener(\"unload\", () => {\n closer();\n term.close();\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/main.ts","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar CompositionHelper = (function () {\n function CompositionHelper(textarea, compositionView, terminal) {\n this.textarea = textarea;\n this.compositionView = compositionView;\n this.terminal = terminal;\n this.isComposing = false;\n this.isSendingComposition = false;\n this.compositionPosition = { start: null, end: null };\n }\n CompositionHelper.prototype.compositionstart = function () {\n this.isComposing = true;\n this.compositionPosition.start = this.textarea.value.length;\n this.compositionView.textContent = '';\n this.compositionView.classList.add('active');\n };\n CompositionHelper.prototype.compositionupdate = function (ev) {\n var _this = this;\n this.compositionView.textContent = ev.data;\n this.updateCompositionElements();\n setTimeout(function () {\n _this.compositionPosition.end = _this.textarea.value.length;\n }, 0);\n };\n CompositionHelper.prototype.compositionend = function () {\n this.finalizeComposition(true);\n };\n CompositionHelper.prototype.keydown = function (ev) {\n if (this.isComposing || this.isSendingComposition) {\n if (ev.keyCode === 229) {\n return false;\n }\n else if (ev.keyCode === 16 || ev.keyCode === 17 || ev.keyCode === 18) {\n return false;\n }\n else {\n this.finalizeComposition(false);\n }\n }\n if (ev.keyCode === 229) {\n this.handleAnyTextareaChanges();\n return false;\n }\n return true;\n };\n CompositionHelper.prototype.finalizeComposition = function (waitForPropogation) {\n var _this = this;\n this.compositionView.classList.remove('active');\n this.isComposing = false;\n this.clearTextareaPosition();\n if (!waitForPropogation) {\n this.isSendingComposition = false;\n var input = this.textarea.value.substring(this.compositionPosition.start, this.compositionPosition.end);\n this.terminal.handler(input);\n }\n else {\n var currentCompositionPosition_1 = {\n start: this.compositionPosition.start,\n end: this.compositionPosition.end,\n };\n this.isSendingComposition = true;\n setTimeout(function () {\n if (_this.isSendingComposition) {\n _this.isSendingComposition = false;\n var input = void 0;\n if (_this.isComposing) {\n input = _this.textarea.value.substring(currentCompositionPosition_1.start, currentCompositionPosition_1.end);\n }\n else {\n input = _this.textarea.value.substring(currentCompositionPosition_1.start);\n }\n _this.terminal.handler(input);\n }\n }, 0);\n }\n };\n CompositionHelper.prototype.handleAnyTextareaChanges = function () {\n var _this = this;\n var oldValue = this.textarea.value;\n setTimeout(function () {\n if (!_this.isComposing) {\n var newValue = _this.textarea.value;\n var diff = newValue.replace(oldValue, '');\n if (diff.length > 0) {\n _this.terminal.handler(diff);\n }\n }\n }, 0);\n };\n CompositionHelper.prototype.updateCompositionElements = function (dontRecurse) {\n var _this = this;\n if (!this.isComposing) {\n return;\n }\n var cursor = this.terminal.element.querySelector('.terminal-cursor');\n if (cursor) {\n var xtermRows = this.terminal.element.querySelector('.xterm-rows');\n var cursorTop = xtermRows.offsetTop + cursor.offsetTop;\n this.compositionView.style.left = cursor.offsetLeft + 'px';\n this.compositionView.style.top = cursorTop + 'px';\n this.compositionView.style.height = cursor.offsetHeight + 'px';\n this.compositionView.style.lineHeight = cursor.offsetHeight + 'px';\n var compositionViewBounds = this.compositionView.getBoundingClientRect();\n this.textarea.style.left = cursor.offsetLeft + 'px';\n this.textarea.style.top = cursorTop + 'px';\n this.textarea.style.width = compositionViewBounds.width + 'px';\n this.textarea.style.height = compositionViewBounds.height + 'px';\n this.textarea.style.lineHeight = compositionViewBounds.height + 'px';\n }\n if (!dontRecurse) {\n setTimeout(function () { return _this.updateCompositionElements(true); }, 0);\n }\n };\n ;\n CompositionHelper.prototype.clearTextareaPosition = function () {\n this.textarea.style.left = '';\n this.textarea.style.top = '';\n };\n ;\n return CompositionHelper;\n}());\nexports.CompositionHelper = CompositionHelper;\n\n//# sourceMappingURL=CompositionHelper.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/CompositionHelper.js\n// module id = 15\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar EscapeSequences_1 = require(\"./EscapeSequences\");\nvar Charsets_1 = require(\"./Charsets\");\nvar InputHandler = (function () {\n function InputHandler(_terminal) {\n this._terminal = _terminal;\n }\n InputHandler.prototype.addChar = function (char, code) {\n if (char >= ' ') {\n var ch_width = wcwidth(code);\n if (this._terminal.charset && this._terminal.charset[char]) {\n char = this._terminal.charset[char];\n }\n var row = this._terminal.y + this._terminal.ybase;\n if (!ch_width && this._terminal.x) {\n if (this._terminal.lines.get(row)[this._terminal.x - 1]) {\n if (!this._terminal.lines.get(row)[this._terminal.x - 1][2]) {\n if (this._terminal.lines.get(row)[this._terminal.x - 2])\n this._terminal.lines.get(row)[this._terminal.x - 2][1] += char;\n }\n else {\n this._terminal.lines.get(row)[this._terminal.x - 1][1] += char;\n }\n this._terminal.updateRange(this._terminal.y);\n }\n return;\n }\n if (this._terminal.x + ch_width - 1 >= this._terminal.cols) {\n if (this._terminal.wraparoundMode) {\n this._terminal.x = 0;\n this._terminal.y++;\n if (this._terminal.y > this._terminal.scrollBottom) {\n this._terminal.y--;\n this._terminal.scroll(true);\n }\n else {\n this._terminal.lines.get(this._terminal.y).isWrapped = true;\n }\n }\n else {\n if (ch_width === 2)\n return;\n }\n }\n row = this._terminal.y + this._terminal.ybase;\n if (this._terminal.insertMode) {\n for (var moves = 0; moves < ch_width; ++moves) {\n var removed = this._terminal.lines.get(this._terminal.y + this._terminal.ybase).pop();\n if (removed[2] === 0\n && this._terminal.lines.get(row)[this._terminal.cols - 2]\n && this._terminal.lines.get(row)[this._terminal.cols - 2][2] === 2) {\n this._terminal.lines.get(row)[this._terminal.cols - 2] = [this._terminal.curAttr, ' ', 1];\n }\n this._terminal.lines.get(row).splice(this._terminal.x, 0, [this._terminal.curAttr, ' ', 1]);\n }\n }\n this._terminal.lines.get(row)[this._terminal.x] = [this._terminal.curAttr, char, ch_width];\n this._terminal.x++;\n this._terminal.updateRange(this._terminal.y);\n if (ch_width === 2) {\n this._terminal.lines.get(row)[this._terminal.x] = [this._terminal.curAttr, '', 0];\n this._terminal.x++;\n }\n }\n };\n InputHandler.prototype.bell = function () {\n var _this = this;\n if (!this._terminal.visualBell) {\n return;\n }\n this._terminal.element.style.borderColor = 'white';\n setTimeout(function () { return _this._terminal.element.style.borderColor = ''; }, 10);\n if (this._terminal.popOnBell) {\n this._terminal.focus();\n }\n };\n InputHandler.prototype.lineFeed = function () {\n if (this._terminal.convertEol) {\n this._terminal.x = 0;\n }\n this._terminal.y++;\n if (this._terminal.y > this._terminal.scrollBottom) {\n this._terminal.y--;\n this._terminal.scroll();\n }\n if (this._terminal.x >= this._terminal.cols) {\n this._terminal.x--;\n }\n };\n InputHandler.prototype.carriageReturn = function () {\n this._terminal.x = 0;\n };\n InputHandler.prototype.backspace = function () {\n if (this._terminal.x > 0) {\n this._terminal.x--;\n }\n };\n InputHandler.prototype.tab = function () {\n this._terminal.x = this._terminal.nextStop();\n };\n InputHandler.prototype.shiftOut = function () {\n this._terminal.setgLevel(1);\n };\n InputHandler.prototype.shiftIn = function () {\n this._terminal.setgLevel(0);\n };\n InputHandler.prototype.insertChars = function (params) {\n var param, row, j, ch;\n param = params[0];\n if (param < 1)\n param = 1;\n row = this._terminal.y + this._terminal.ybase;\n j = this._terminal.x;\n ch = [this._terminal.eraseAttr(), ' ', 1];\n while (param-- && j < this._terminal.cols) {\n this._terminal.lines.get(row).splice(j++, 0, ch);\n this._terminal.lines.get(row).pop();\n }\n };\n InputHandler.prototype.cursorUp = function (params) {\n var param = params[0];\n if (param < 1) {\n param = 1;\n }\n this._terminal.y -= param;\n if (this._terminal.y < 0) {\n this._terminal.y = 0;\n }\n };\n InputHandler.prototype.cursorDown = function (params) {\n var param = params[0];\n if (param < 1) {\n param = 1;\n }\n this._terminal.y += param;\n if (this._terminal.y >= this._terminal.rows) {\n this._terminal.y = this._terminal.rows - 1;\n }\n if (this._terminal.x >= this._terminal.cols) {\n this._terminal.x--;\n }\n };\n InputHandler.prototype.cursorForward = function (params) {\n var param = params[0];\n if (param < 1) {\n param = 1;\n }\n this._terminal.x += param;\n if (this._terminal.x >= this._terminal.cols) {\n this._terminal.x = this._terminal.cols - 1;\n }\n };\n InputHandler.prototype.cursorBackward = function (params) {\n var param = params[0];\n if (param < 1) {\n param = 1;\n }\n if (this._terminal.x >= this._terminal.cols) {\n this._terminal.x--;\n }\n this._terminal.x -= param;\n if (this._terminal.x < 0) {\n this._terminal.x = 0;\n }\n };\n InputHandler.prototype.cursorNextLine = function (params) {\n var param = params[0];\n if (param < 1) {\n param = 1;\n }\n this._terminal.y += param;\n if (this._terminal.y >= this._terminal.rows) {\n this._terminal.y = this._terminal.rows - 1;\n }\n this._terminal.x = 0;\n };\n ;\n InputHandler.prototype.cursorPrecedingLine = function (params) {\n var param = params[0];\n if (param < 1) {\n param = 1;\n }\n this._terminal.y -= param;\n if (this._terminal.y < 0) {\n this._terminal.y = 0;\n }\n this._terminal.x = 0;\n };\n ;\n InputHandler.prototype.cursorCharAbsolute = function (params) {\n var param = params[0];\n if (param < 1) {\n param = 1;\n }\n this._terminal.x = param - 1;\n };\n InputHandler.prototype.cursorPosition = function (params) {\n var row, col;\n row = params[0] - 1;\n if (params.length >= 2) {\n col = params[1] - 1;\n }\n else {\n col = 0;\n }\n if (row < 0) {\n row = 0;\n }\n else if (row >= this._terminal.rows) {\n row = this._terminal.rows - 1;\n }\n if (col < 0) {\n col = 0;\n }\n else if (col >= this._terminal.cols) {\n col = this._terminal.cols - 1;\n }\n this._terminal.x = col;\n this._terminal.y = row;\n };\n InputHandler.prototype.cursorForwardTab = function (params) {\n var param = params[0] || 1;\n while (param--) {\n this._terminal.x = this._terminal.nextStop();\n }\n };\n InputHandler.prototype.eraseInDisplay = function (params) {\n var j;\n switch (params[0]) {\n case 0:\n this._terminal.eraseRight(this._terminal.x, this._terminal.y);\n j = this._terminal.y + 1;\n for (; j < this._terminal.rows; j++) {\n this._terminal.eraseLine(j);\n }\n break;\n case 1:\n this._terminal.eraseLeft(this._terminal.x, this._terminal.y);\n j = this._terminal.y;\n while (j--) {\n this._terminal.eraseLine(j);\n }\n break;\n case 2:\n j = this._terminal.rows;\n while (j--)\n this._terminal.eraseLine(j);\n break;\n case 3:\n var scrollBackSize = this._terminal.lines.length - this._terminal.rows;\n if (scrollBackSize > 0) {\n this._terminal.lines.trimStart(scrollBackSize);\n this._terminal.ybase = Math.max(this._terminal.ybase - scrollBackSize, 0);\n this._terminal.ydisp = Math.max(this._terminal.ydisp - scrollBackSize, 0);\n }\n break;\n }\n };\n InputHandler.prototype.eraseInLine = function (params) {\n switch (params[0]) {\n case 0:\n this._terminal.eraseRight(this._terminal.x, this._terminal.y);\n break;\n case 1:\n this._terminal.eraseLeft(this._terminal.x, this._terminal.y);\n break;\n case 2:\n this._terminal.eraseLine(this._terminal.y);\n break;\n }\n };\n InputHandler.prototype.insertLines = function (params) {\n var param, row, j;\n param = params[0];\n if (param < 1) {\n param = 1;\n }\n row = this._terminal.y + this._terminal.ybase;\n j = this._terminal.rows - 1 - this._terminal.scrollBottom;\n j = this._terminal.rows - 1 + this._terminal.ybase - j + 1;\n while (param--) {\n if (this._terminal.lines.length === this._terminal.lines.maxLength) {\n this._terminal.lines.trimStart(1);\n this._terminal.ybase--;\n this._terminal.ydisp--;\n row--;\n j--;\n }\n this._terminal.lines.splice(row, 0, this._terminal.blankLine(true));\n this._terminal.lines.splice(j, 1);\n }\n this._terminal.updateRange(this._terminal.y);\n this._terminal.updateRange(this._terminal.scrollBottom);\n };\n InputHandler.prototype.deleteLines = function (params) {\n var param, row, j;\n param = params[0];\n if (param < 1) {\n param = 1;\n }\n row = this._terminal.y + this._terminal.ybase;\n j = this._terminal.rows - 1 - this._terminal.scrollBottom;\n j = this._terminal.rows - 1 + this._terminal.ybase - j;\n while (param--) {\n if (this._terminal.lines.length === this._terminal.lines.maxLength) {\n this._terminal.lines.trimStart(1);\n this._terminal.ybase -= 1;\n this._terminal.ydisp -= 1;\n }\n this._terminal.lines.splice(j + 1, 0, this._terminal.blankLine(true));\n this._terminal.lines.splice(row, 1);\n }\n this._terminal.updateRange(this._terminal.y);\n this._terminal.updateRange(this._terminal.scrollBottom);\n };\n InputHandler.prototype.deleteChars = function (params) {\n var param, row, ch;\n param = params[0];\n if (param < 1) {\n param = 1;\n }\n row = this._terminal.y + this._terminal.ybase;\n ch = [this._terminal.eraseAttr(), ' ', 1];\n while (param--) {\n this._terminal.lines.get(row).splice(this._terminal.x, 1);\n this._terminal.lines.get(row).push(ch);\n }\n };\n InputHandler.prototype.scrollUp = function (params) {\n var param = params[0] || 1;\n while (param--) {\n this._terminal.lines.splice(this._terminal.ybase + this._terminal.scrollTop, 1);\n this._terminal.lines.splice(this._terminal.ybase + this._terminal.scrollBottom, 0, this._terminal.blankLine());\n }\n this._terminal.updateRange(this._terminal.scrollTop);\n this._terminal.updateRange(this._terminal.scrollBottom);\n };\n InputHandler.prototype.scrollDown = function (params) {\n var param = params[0] || 1;\n while (param--) {\n this._terminal.lines.splice(this._terminal.ybase + this._terminal.scrollBottom, 1);\n this._terminal.lines.splice(this._terminal.ybase + this._terminal.scrollTop, 0, this._terminal.blankLine());\n }\n this._terminal.updateRange(this._terminal.scrollTop);\n this._terminal.updateRange(this._terminal.scrollBottom);\n };\n InputHandler.prototype.eraseChars = function (params) {\n var param, row, j, ch;\n param = params[0];\n if (param < 1) {\n param = 1;\n }\n row = this._terminal.y + this._terminal.ybase;\n j = this._terminal.x;\n ch = [this._terminal.eraseAttr(), ' ', 1];\n while (param-- && j < this._terminal.cols) {\n this._terminal.lines.get(row)[j++] = ch;\n }\n };\n InputHandler.prototype.cursorBackwardTab = function (params) {\n var param = params[0] || 1;\n while (param--) {\n this._terminal.x = this._terminal.prevStop();\n }\n };\n InputHandler.prototype.charPosAbsolute = function (params) {\n var param = params[0];\n if (param < 1) {\n param = 1;\n }\n this._terminal.x = param - 1;\n if (this._terminal.x >= this._terminal.cols) {\n this._terminal.x = this._terminal.cols - 1;\n }\n };\n InputHandler.prototype.HPositionRelative = function (params) {\n var param = params[0];\n if (param < 1) {\n param = 1;\n }\n this._terminal.x += param;\n if (this._terminal.x >= this._terminal.cols) {\n this._terminal.x = this._terminal.cols - 1;\n }\n };\n InputHandler.prototype.repeatPrecedingCharacter = function (params) {\n var param = params[0] || 1, line = this._terminal.lines.get(this._terminal.ybase + this._terminal.y), ch = line[this._terminal.x - 1] || [this._terminal.defAttr, ' ', 1];\n while (param--) {\n line[this._terminal.x++] = ch;\n }\n };\n InputHandler.prototype.sendDeviceAttributes = function (params) {\n if (params[0] > 0) {\n return;\n }\n if (!this._terminal.prefix) {\n if (this._terminal.is('xterm') || this._terminal.is('rxvt-unicode') || this._terminal.is('screen')) {\n this._terminal.send(EscapeSequences_1.C0.ESC + '[?1;2c');\n }\n else if (this._terminal.is('linux')) {\n this._terminal.send(EscapeSequences_1.C0.ESC + '[?6c');\n }\n }\n else if (this._terminal.prefix === '>') {\n if (this._terminal.is('xterm')) {\n this._terminal.send(EscapeSequences_1.C0.ESC + '[>0;276;0c');\n }\n else if (this._terminal.is('rxvt-unicode')) {\n this._terminal.send(EscapeSequences_1.C0.ESC + '[>85;95;0c');\n }\n else if (this._terminal.is('linux')) {\n this._terminal.send(params[0] + 'c');\n }\n else if (this._terminal.is('screen')) {\n this._terminal.send(EscapeSequences_1.C0.ESC + '[>83;40003;0c');\n }\n }\n };\n InputHandler.prototype.linePosAbsolute = function (params) {\n var param = params[0];\n if (param < 1) {\n param = 1;\n }\n this._terminal.y = param - 1;\n if (this._terminal.y >= this._terminal.rows) {\n this._terminal.y = this._terminal.rows - 1;\n }\n };\n InputHandler.prototype.VPositionRelative = function (params) {\n var param = params[0];\n if (param < 1) {\n param = 1;\n }\n this._terminal.y += param;\n if (this._terminal.y >= this._terminal.rows) {\n this._terminal.y = this._terminal.rows - 1;\n }\n if (this._terminal.x >= this._terminal.cols) {\n this._terminal.x--;\n }\n };\n InputHandler.prototype.HVPosition = function (params) {\n if (params[0] < 1)\n params[0] = 1;\n if (params[1] < 1)\n params[1] = 1;\n this._terminal.y = params[0] - 1;\n if (this._terminal.y >= this._terminal.rows) {\n this._terminal.y = this._terminal.rows - 1;\n }\n this._terminal.x = params[1] - 1;\n if (this._terminal.x >= this._terminal.cols) {\n this._terminal.x = this._terminal.cols - 1;\n }\n };\n InputHandler.prototype.tabClear = function (params) {\n var param = params[0];\n if (param <= 0) {\n delete this._terminal.tabs[this._terminal.x];\n }\n else if (param === 3) {\n this._terminal.tabs = {};\n }\n };\n InputHandler.prototype.setMode = function (params) {\n if (params.length > 1) {\n for (var i = 0; i < params.length; i++) {\n this.setMode([params[i]]);\n }\n return;\n }\n if (!this._terminal.prefix) {\n switch (params[0]) {\n case 4:\n this._terminal.insertMode = true;\n break;\n case 20:\n break;\n }\n }\n else if (this._terminal.prefix === '?') {\n switch (params[0]) {\n case 1:\n this._terminal.applicationCursor = true;\n break;\n case 2:\n this._terminal.setgCharset(0, Charsets_1.DEFAULT_CHARSET);\n this._terminal.setgCharset(1, Charsets_1.DEFAULT_CHARSET);\n this._terminal.setgCharset(2, Charsets_1.DEFAULT_CHARSET);\n this._terminal.setgCharset(3, Charsets_1.DEFAULT_CHARSET);\n break;\n case 3:\n this._terminal.savedCols = this._terminal.cols;\n this._terminal.resize(132, this._terminal.rows);\n break;\n case 6:\n this._terminal.originMode = true;\n break;\n case 7:\n this._terminal.wraparoundMode = true;\n break;\n case 12:\n break;\n case 66:\n this._terminal.log('Serial port requested application keypad.');\n this._terminal.applicationKeypad = true;\n this._terminal.viewport.syncScrollArea();\n break;\n case 9:\n case 1000:\n case 1002:\n case 1003:\n this._terminal.x10Mouse = params[0] === 9;\n this._terminal.vt200Mouse = params[0] === 1000;\n this._terminal.normalMouse = params[0] > 1000;\n this._terminal.mouseEvents = true;\n this._terminal.element.classList.add('enable-mouse-events');\n this._terminal.selectionManager.disable();\n this._terminal.log('Binding to mouse events.');\n break;\n case 1004:\n this._terminal.sendFocus = true;\n break;\n case 1005:\n this._terminal.utfMouse = true;\n break;\n case 1006:\n this._terminal.sgrMouse = true;\n break;\n case 1015:\n this._terminal.urxvtMouse = true;\n break;\n case 25:\n this._terminal.cursorHidden = false;\n break;\n case 1049:\n ;\n case 47:\n case 1047:\n if (!this._terminal.normal) {\n var normal = {\n lines: this._terminal.lines,\n ybase: this._terminal.ybase,\n ydisp: this._terminal.ydisp,\n x: this._terminal.x,\n y: this._terminal.y,\n scrollTop: this._terminal.scrollTop,\n scrollBottom: this._terminal.scrollBottom,\n tabs: this._terminal.tabs\n };\n this._terminal.reset();\n this._terminal.viewport.syncScrollArea();\n this._terminal.normal = normal;\n this._terminal.showCursor();\n }\n break;\n }\n }\n };\n InputHandler.prototype.resetMode = function (params) {\n if (params.length > 1) {\n for (var i = 0; i < params.length; i++) {\n this.resetMode([params[i]]);\n }\n return;\n }\n if (!this._terminal.prefix) {\n switch (params[0]) {\n case 4:\n this._terminal.insertMode = false;\n break;\n case 20:\n break;\n }\n }\n else if (this._terminal.prefix === '?') {\n switch (params[0]) {\n case 1:\n this._terminal.applicationCursor = false;\n break;\n case 3:\n if (this._terminal.cols === 132 && this._terminal.savedCols) {\n this._terminal.resize(this._terminal.savedCols, this._terminal.rows);\n }\n delete this._terminal.savedCols;\n break;\n case 6:\n this._terminal.originMode = false;\n break;\n case 7:\n this._terminal.wraparoundMode = false;\n break;\n case 12:\n break;\n case 66:\n this._terminal.log('Switching back to normal keypad.');\n this._terminal.applicationKeypad = false;\n this._terminal.viewport.syncScrollArea();\n break;\n case 9:\n case 1000:\n case 1002:\n case 1003:\n this._terminal.x10Mouse = false;\n this._terminal.vt200Mouse = false;\n this._terminal.normalMouse = false;\n this._terminal.mouseEvents = false;\n this._terminal.element.classList.remove('enable-mouse-events');\n this._terminal.selectionManager.enable();\n break;\n case 1004:\n this._terminal.sendFocus = false;\n break;\n case 1005:\n this._terminal.utfMouse = false;\n break;\n case 1006:\n this._terminal.sgrMouse = false;\n break;\n case 1015:\n this._terminal.urxvtMouse = false;\n break;\n case 25:\n this._terminal.cursorHidden = true;\n break;\n case 1049:\n ;\n case 47:\n case 1047:\n if (this._terminal.normal) {\n this._terminal.lines = this._terminal.normal.lines;\n this._terminal.ybase = this._terminal.normal.ybase;\n this._terminal.ydisp = this._terminal.normal.ydisp;\n this._terminal.x = this._terminal.normal.x;\n this._terminal.y = this._terminal.normal.y;\n this._terminal.scrollTop = this._terminal.normal.scrollTop;\n this._terminal.scrollBottom = this._terminal.normal.scrollBottom;\n this._terminal.tabs = this._terminal.normal.tabs;\n this._terminal.normal = null;\n this._terminal.selectionManager.setBuffer(this._terminal.lines);\n this._terminal.refresh(0, this._terminal.rows - 1);\n this._terminal.viewport.syncScrollArea();\n this._terminal.showCursor();\n }\n break;\n }\n }\n };\n InputHandler.prototype.charAttributes = function (params) {\n if (params.length === 1 && params[0] === 0) {\n this._terminal.curAttr = this._terminal.defAttr;\n return;\n }\n var l = params.length, i = 0, flags = this._terminal.curAttr >> 18, fg = (this._terminal.curAttr >> 9) & 0x1ff, bg = this._terminal.curAttr & 0x1ff, p;\n for (; i < l; i++) {\n p = params[i];\n if (p >= 30 && p <= 37) {\n fg = p - 30;\n }\n else if (p >= 40 && p <= 47) {\n bg = p - 40;\n }\n else if (p >= 90 && p <= 97) {\n p += 8;\n fg = p - 90;\n }\n else if (p >= 100 && p <= 107) {\n p += 8;\n bg = p - 100;\n }\n else if (p === 0) {\n flags = this._terminal.defAttr >> 18;\n fg = (this._terminal.defAttr >> 9) & 0x1ff;\n bg = this._terminal.defAttr & 0x1ff;\n }\n else if (p === 1) {\n flags |= 1;\n }\n else if (p === 4) {\n flags |= 2;\n }\n else if (p === 5) {\n flags |= 4;\n }\n else if (p === 7) {\n flags |= 8;\n }\n else if (p === 8) {\n flags |= 16;\n }\n else if (p === 22) {\n flags &= ~1;\n }\n else if (p === 24) {\n flags &= ~2;\n }\n else if (p === 25) {\n flags &= ~4;\n }\n else if (p === 27) {\n flags &= ~8;\n }\n else if (p === 28) {\n flags &= ~16;\n }\n else if (p === 39) {\n fg = (this._terminal.defAttr >> 9) & 0x1ff;\n }\n else if (p === 49) {\n bg = this._terminal.defAttr & 0x1ff;\n }\n else if (p === 38) {\n if (params[i + 1] === 2) {\n i += 2;\n fg = this._terminal.matchColor(params[i] & 0xff, params[i + 1] & 0xff, params[i + 2] & 0xff);\n if (fg === -1)\n fg = 0x1ff;\n i += 2;\n }\n else if (params[i + 1] === 5) {\n i += 2;\n p = params[i] & 0xff;\n fg = p;\n }\n }\n else if (p === 48) {\n if (params[i + 1] === 2) {\n i += 2;\n bg = this._terminal.matchColor(params[i] & 0xff, params[i + 1] & 0xff, params[i + 2] & 0xff);\n if (bg === -1)\n bg = 0x1ff;\n i += 2;\n }\n else if (params[i + 1] === 5) {\n i += 2;\n p = params[i] & 0xff;\n bg = p;\n }\n }\n else if (p === 100) {\n fg = (this._terminal.defAttr >> 9) & 0x1ff;\n bg = this._terminal.defAttr & 0x1ff;\n }\n else {\n this._terminal.error('Unknown SGR attribute: %d.', p);\n }\n }\n this._terminal.curAttr = (flags << 18) | (fg << 9) | bg;\n };\n InputHandler.prototype.deviceStatus = function (params) {\n if (!this._terminal.prefix) {\n switch (params[0]) {\n case 5:\n this._terminal.send(EscapeSequences_1.C0.ESC + '[0n');\n break;\n case 6:\n this._terminal.send(EscapeSequences_1.C0.ESC + '['\n + (this._terminal.y + 1)\n + ';'\n + (this._terminal.x + 1)\n + 'R');\n break;\n }\n }\n else if (this._terminal.prefix === '?') {\n switch (params[0]) {\n case 6:\n this._terminal.send(EscapeSequences_1.C0.ESC + '[?'\n + (this._terminal.y + 1)\n + ';'\n + (this._terminal.x + 1)\n + 'R');\n break;\n case 15:\n break;\n case 25:\n break;\n case 26:\n break;\n case 53:\n break;\n }\n }\n };\n InputHandler.prototype.softReset = function (params) {\n this._terminal.cursorHidden = false;\n this._terminal.insertMode = false;\n this._terminal.originMode = false;\n this._terminal.wraparoundMode = true;\n this._terminal.applicationKeypad = false;\n this._terminal.viewport.syncScrollArea();\n this._terminal.applicationCursor = false;\n this._terminal.scrollTop = 0;\n this._terminal.scrollBottom = this._terminal.rows - 1;\n this._terminal.curAttr = this._terminal.defAttr;\n this._terminal.x = this._terminal.y = 0;\n this._terminal.charset = null;\n this._terminal.glevel = 0;\n this._terminal.charsets = [null];\n };\n InputHandler.prototype.setCursorStyle = function (params) {\n var param = params[0] < 1 ? 1 : params[0];\n switch (param) {\n case 1:\n case 2:\n this._terminal.setOption('cursorStyle', 'block');\n break;\n case 3:\n case 4:\n this._terminal.setOption('cursorStyle', 'underline');\n break;\n case 5:\n case 6:\n this._terminal.setOption('cursorStyle', 'bar');\n break;\n }\n var isBlinking = param % 2 === 1;\n this._terminal.setOption('cursorBlink', isBlinking);\n };\n InputHandler.prototype.setScrollRegion = function (params) {\n if (this._terminal.prefix)\n return;\n this._terminal.scrollTop = (params[0] || 1) - 1;\n this._terminal.scrollBottom = (params[1] && params[1] <= this._terminal.rows ? params[1] : this._terminal.rows) - 1;\n this._terminal.x = 0;\n this._terminal.y = 0;\n };\n InputHandler.prototype.saveCursor = function (params) {\n this._terminal.savedX = this._terminal.x;\n this._terminal.savedY = this._terminal.y;\n };\n InputHandler.prototype.restoreCursor = function (params) {\n this._terminal.x = this._terminal.savedX || 0;\n this._terminal.y = this._terminal.savedY || 0;\n };\n return InputHandler;\n}());\nexports.InputHandler = InputHandler;\nvar wcwidth = (function (opts) {\n var COMBINING = [\n [0x0300, 0x036F], [0x0483, 0x0486], [0x0488, 0x0489],\n [0x0591, 0x05BD], [0x05BF, 0x05BF], [0x05C1, 0x05C2],\n [0x05C4, 0x05C5], [0x05C7, 0x05C7], [0x0600, 0x0603],\n [0x0610, 0x0615], [0x064B, 0x065E], [0x0670, 0x0670],\n [0x06D6, 0x06E4], [0x06E7, 0x06E8], [0x06EA, 0x06ED],\n [0x070F, 0x070F], [0x0711, 0x0711], [0x0730, 0x074A],\n [0x07A6, 0x07B0], [0x07EB, 0x07F3], [0x0901, 0x0902],\n [0x093C, 0x093C], [0x0941, 0x0948], [0x094D, 0x094D],\n [0x0951, 0x0954], [0x0962, 0x0963], [0x0981, 0x0981],\n [0x09BC, 0x09BC], [0x09C1, 0x09C4], [0x09CD, 0x09CD],\n [0x09E2, 0x09E3], [0x0A01, 0x0A02], [0x0A3C, 0x0A3C],\n [0x0A41, 0x0A42], [0x0A47, 0x0A48], [0x0A4B, 0x0A4D],\n [0x0A70, 0x0A71], [0x0A81, 0x0A82], [0x0ABC, 0x0ABC],\n [0x0AC1, 0x0AC5], [0x0AC7, 0x0AC8], [0x0ACD, 0x0ACD],\n [0x0AE2, 0x0AE3], [0x0B01, 0x0B01], [0x0B3C, 0x0B3C],\n [0x0B3F, 0x0B3F], [0x0B41, 0x0B43], [0x0B4D, 0x0B4D],\n [0x0B56, 0x0B56], [0x0B82, 0x0B82], [0x0BC0, 0x0BC0],\n [0x0BCD, 0x0BCD], [0x0C3E, 0x0C40], [0x0C46, 0x0C48],\n [0x0C4A, 0x0C4D], [0x0C55, 0x0C56], [0x0CBC, 0x0CBC],\n [0x0CBF, 0x0CBF], [0x0CC6, 0x0CC6], [0x0CCC, 0x0CCD],\n [0x0CE2, 0x0CE3], [0x0D41, 0x0D43], [0x0D4D, 0x0D4D],\n [0x0DCA, 0x0DCA], [0x0DD2, 0x0DD4], [0x0DD6, 0x0DD6],\n [0x0E31, 0x0E31], [0x0E34, 0x0E3A], [0x0E47, 0x0E4E],\n [0x0EB1, 0x0EB1], [0x0EB4, 0x0EB9], [0x0EBB, 0x0EBC],\n [0x0EC8, 0x0ECD], [0x0F18, 0x0F19], [0x0F35, 0x0F35],\n [0x0F37, 0x0F37], [0x0F39, 0x0F39], [0x0F71, 0x0F7E],\n [0x0F80, 0x0F84], [0x0F86, 0x0F87], [0x0F90, 0x0F97],\n [0x0F99, 0x0FBC], [0x0FC6, 0x0FC6], [0x102D, 0x1030],\n [0x1032, 0x1032], [0x1036, 0x1037], [0x1039, 0x1039],\n [0x1058, 0x1059], [0x1160, 0x11FF], [0x135F, 0x135F],\n [0x1712, 0x1714], [0x1732, 0x1734], [0x1752, 0x1753],\n [0x1772, 0x1773], [0x17B4, 0x17B5], [0x17B7, 0x17BD],\n [0x17C6, 0x17C6], [0x17C9, 0x17D3], [0x17DD, 0x17DD],\n [0x180B, 0x180D], [0x18A9, 0x18A9], [0x1920, 0x1922],\n [0x1927, 0x1928], [0x1932, 0x1932], [0x1939, 0x193B],\n [0x1A17, 0x1A18], [0x1B00, 0x1B03], [0x1B34, 0x1B34],\n [0x1B36, 0x1B3A], [0x1B3C, 0x1B3C], [0x1B42, 0x1B42],\n [0x1B6B, 0x1B73], [0x1DC0, 0x1DCA], [0x1DFE, 0x1DFF],\n [0x200B, 0x200F], [0x202A, 0x202E], [0x2060, 0x2063],\n [0x206A, 0x206F], [0x20D0, 0x20EF], [0x302A, 0x302F],\n [0x3099, 0x309A], [0xA806, 0xA806], [0xA80B, 0xA80B],\n [0xA825, 0xA826], [0xFB1E, 0xFB1E], [0xFE00, 0xFE0F],\n [0xFE20, 0xFE23], [0xFEFF, 0xFEFF], [0xFFF9, 0xFFFB],\n [0x10A01, 0x10A03], [0x10A05, 0x10A06], [0x10A0C, 0x10A0F],\n [0x10A38, 0x10A3A], [0x10A3F, 0x10A3F], [0x1D167, 0x1D169],\n [0x1D173, 0x1D182], [0x1D185, 0x1D18B], [0x1D1AA, 0x1D1AD],\n [0x1D242, 0x1D244], [0xE0001, 0xE0001], [0xE0020, 0xE007F],\n [0xE0100, 0xE01EF]\n ];\n function bisearch(ucs) {\n var min = 0;\n var max = COMBINING.length - 1;\n var mid;\n if (ucs < COMBINING[0][0] || ucs > COMBINING[max][1])\n return false;\n while (max >= min) {\n mid = Math.floor((min + max) / 2);\n if (ucs > COMBINING[mid][1])\n min = mid + 1;\n else if (ucs < COMBINING[mid][0])\n max = mid - 1;\n else\n return true;\n }\n return false;\n }\n function wcwidth(ucs) {\n if (ucs === 0)\n return opts.nul;\n if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0))\n return opts.control;\n if (bisearch(ucs))\n return 0;\n if (isWide(ucs)) {\n return 2;\n }\n return 1;\n }\n function isWide(ucs) {\n return (ucs >= 0x1100 && (ucs <= 0x115f ||\n ucs === 0x2329 ||\n ucs === 0x232a ||\n (ucs >= 0x2e80 && ucs <= 0xa4cf && ucs !== 0x303f) ||\n (ucs >= 0xac00 && ucs <= 0xd7a3) ||\n (ucs >= 0xf900 && ucs <= 0xfaff) ||\n (ucs >= 0xfe10 && ucs <= 0xfe19) ||\n (ucs >= 0xfe30 && ucs <= 0xfe6f) ||\n (ucs >= 0xff00 && ucs <= 0xff60) ||\n (ucs >= 0xffe0 && ucs <= 0xffe6) ||\n (ucs >= 0x20000 && ucs <= 0x2fffd) ||\n (ucs >= 0x30000 && ucs <= 0x3fffd)));\n }\n return wcwidth;\n})({ nul: 0, control: 0 });\n\n//# sourceMappingURL=InputHandler.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/InputHandler.js\n// module id = 16\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar INVALID_LINK_CLASS = 'xterm-invalid-link';\nvar protocolClause = '(https?:\\\\/\\\\/)';\nvar domainCharacterSet = '[\\\\da-z\\\\.-]+';\nvar negatedDomainCharacterSet = '[^\\\\da-z\\\\.-]+';\nvar domainBodyClause = '(' + domainCharacterSet + ')';\nvar tldClause = '([a-z\\\\.]{2,6})';\nvar ipClause = '((\\\\d{1,3}\\\\.){3}\\\\d{1,3})';\nvar localHostClause = '(localhost)';\nvar portClause = '(:\\\\d{1,5})';\nvar hostClause = '((' + domainBodyClause + '\\\\.' + tldClause + ')|' + ipClause + '|' + localHostClause + ')' + portClause + '?';\nvar pathClause = '(\\\\/[\\\\/\\\\w\\\\.\\\\-%~]*)*';\nvar queryStringHashFragmentCharacterSet = '[0-9\\\\w\\\\[\\\\]\\\\(\\\\)\\\\/\\\\?\\\\!#@$%&\\'*+,:;~\\\\=\\\\.\\\\-]*';\nvar queryStringClause = '(\\\\?' + queryStringHashFragmentCharacterSet + ')?';\nvar hashFragmentClause = '(#' + queryStringHashFragmentCharacterSet + ')?';\nvar negatedPathCharacterSet = '[^\\\\/\\\\w\\\\.\\\\-%]+';\nvar bodyClause = hostClause + pathClause + queryStringClause + hashFragmentClause;\nvar start = '(?:^|' + negatedDomainCharacterSet + ')(';\nvar end = ')($|' + negatedPathCharacterSet + ')';\nvar strictUrlRegex = new RegExp(start + protocolClause + bodyClause + end);\nvar HYPERTEXT_LINK_MATCHER_ID = 0;\nvar Linkifier = (function () {\n function Linkifier() {\n this._nextLinkMatcherId = HYPERTEXT_LINK_MATCHER_ID;\n this._rowTimeoutIds = [];\n this._linkMatchers = [];\n this.registerLinkMatcher(strictUrlRegex, null, { matchIndex: 1 });\n }\n Linkifier.prototype.attachToDom = function (document, rows) {\n this._document = document;\n this._rows = rows;\n };\n Linkifier.prototype.linkifyRow = function (rowIndex) {\n if (!this._document) {\n return;\n }\n var timeoutId = this._rowTimeoutIds[rowIndex];\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n this._rowTimeoutIds[rowIndex] = setTimeout(this._linkifyRow.bind(this, rowIndex), Linkifier.TIME_BEFORE_LINKIFY);\n };\n Linkifier.prototype.setHypertextLinkHandler = function (handler) {\n this._linkMatchers[HYPERTEXT_LINK_MATCHER_ID].handler = handler;\n };\n Linkifier.prototype.setHypertextValidationCallback = function (callback) {\n this._linkMatchers[HYPERTEXT_LINK_MATCHER_ID].validationCallback = callback;\n };\n Linkifier.prototype.registerLinkMatcher = function (regex, handler, options) {\n if (options === void 0) { options = {}; }\n if (this._nextLinkMatcherId !== HYPERTEXT_LINK_MATCHER_ID && !handler) {\n throw new Error('handler must be defined');\n }\n var matcher = {\n id: this._nextLinkMatcherId++,\n regex: regex,\n handler: handler,\n matchIndex: options.matchIndex,\n validationCallback: options.validationCallback,\n priority: options.priority || 0\n };\n this._addLinkMatcherToList(matcher);\n return matcher.id;\n };\n Linkifier.prototype._addLinkMatcherToList = function (matcher) {\n if (this._linkMatchers.length === 0) {\n this._linkMatchers.push(matcher);\n return;\n }\n for (var i = this._linkMatchers.length - 1; i >= 0; i--) {\n if (matcher.priority <= this._linkMatchers[i].priority) {\n this._linkMatchers.splice(i + 1, 0, matcher);\n return;\n }\n }\n this._linkMatchers.splice(0, 0, matcher);\n };\n Linkifier.prototype.deregisterLinkMatcher = function (matcherId) {\n for (var i = 1; i < this._linkMatchers.length; i++) {\n if (this._linkMatchers[i].id === matcherId) {\n this._linkMatchers.splice(i, 1);\n return true;\n }\n }\n return false;\n };\n Linkifier.prototype._linkifyRow = function (rowIndex) {\n var row = this._rows[rowIndex];\n if (!row) {\n return;\n }\n var text = row.textContent;\n for (var i = 0; i < this._linkMatchers.length; i++) {\n var matcher = this._linkMatchers[i];\n var linkElements = this._doLinkifyRow(row, matcher);\n if (linkElements.length > 0) {\n if (matcher.validationCallback) {\n var _loop_1 = function (j) {\n var element = linkElements[j];\n matcher.validationCallback(element.textContent, element, function (isValid) {\n if (!isValid) {\n element.classList.add(INVALID_LINK_CLASS);\n }\n });\n };\n for (var j = 0; j < linkElements.length; j++) {\n _loop_1(j);\n }\n }\n return;\n }\n }\n };\n Linkifier.prototype._doLinkifyRow = function (row, matcher) {\n var result = [];\n var isHttpLinkMatcher = matcher.id === HYPERTEXT_LINK_MATCHER_ID;\n var nodes = row.childNodes;\n var match = row.textContent.match(matcher.regex);\n if (!match || match.length === 0) {\n return result;\n }\n var uri = match[typeof matcher.matchIndex !== 'number' ? 0 : matcher.matchIndex];\n var rowStartIndex = match.index + uri.length;\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n var searchIndex = node.textContent.indexOf(uri);\n if (searchIndex >= 0) {\n var linkElement = this._createAnchorElement(uri, matcher.handler, isHttpLinkMatcher);\n if (node.textContent.length === uri.length) {\n if (node.nodeType === 3) {\n this._replaceNode(node, linkElement);\n }\n else {\n var element = node;\n if (element.nodeName === 'A') {\n return result;\n }\n element.innerHTML = '';\n element.appendChild(linkElement);\n }\n }\n else if (node.childNodes.length > 1) {\n for (var j = 0; j < node.childNodes.length; j++) {\n var childNode = node.childNodes[j];\n var childSearchIndex = childNode.textContent.indexOf(uri);\n if (childSearchIndex !== -1) {\n this._replaceNodeSubstringWithNode(childNode, linkElement, uri, childSearchIndex);\n break;\n }\n }\n }\n else {\n var nodesAdded = this._replaceNodeSubstringWithNode(node, linkElement, uri, searchIndex);\n i += nodesAdded;\n }\n result.push(linkElement);\n match = row.textContent.substring(rowStartIndex).match(matcher.regex);\n if (!match || match.length === 0) {\n return result;\n }\n uri = match[typeof matcher.matchIndex !== 'number' ? 0 : matcher.matchIndex];\n rowStartIndex += match.index + uri.length;\n }\n }\n return result;\n };\n Linkifier.prototype._createAnchorElement = function (uri, handler, isHypertextLinkHandler) {\n var element = this._document.createElement('a');\n element.textContent = uri;\n element.draggable = false;\n if (isHypertextLinkHandler) {\n element.href = uri;\n element.target = '_blank';\n element.addEventListener('click', function (event) {\n if (handler) {\n return handler(event, uri);\n }\n });\n }\n else {\n element.addEventListener('click', function (event) {\n if (element.classList.contains(INVALID_LINK_CLASS)) {\n return;\n }\n return handler(event, uri);\n });\n }\n return element;\n };\n Linkifier.prototype._replaceNode = function (oldNode) {\n var newNodes = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n newNodes[_i - 1] = arguments[_i];\n }\n var parent = oldNode.parentNode;\n for (var i = 0; i < newNodes.length; i++) {\n parent.insertBefore(newNodes[i], oldNode);\n }\n parent.removeChild(oldNode);\n };\n Linkifier.prototype._replaceNodeSubstringWithNode = function (targetNode, newNode, substring, substringIndex) {\n if (targetNode.childNodes.length === 1) {\n targetNode = targetNode.childNodes[0];\n }\n if (targetNode.nodeType !== 3) {\n throw new Error('targetNode must be a text node or only contain a single text node');\n }\n var fullText = targetNode.textContent;\n if (substringIndex === 0) {\n var rightText_1 = fullText.substring(substring.length);\n var rightTextNode_1 = this._document.createTextNode(rightText_1);\n this._replaceNode(targetNode, newNode, rightTextNode_1);\n return 0;\n }\n if (substringIndex === targetNode.textContent.length - substring.length) {\n var leftText_1 = fullText.substring(0, substringIndex);\n var leftTextNode_1 = this._document.createTextNode(leftText_1);\n this._replaceNode(targetNode, leftTextNode_1, newNode);\n return 0;\n }\n var leftText = fullText.substring(0, substringIndex);\n var leftTextNode = this._document.createTextNode(leftText);\n var rightText = fullText.substring(substringIndex + substring.length);\n var rightTextNode = this._document.createTextNode(rightText);\n this._replaceNode(targetNode, leftTextNode, newNode, rightTextNode);\n return 1;\n };\n return Linkifier;\n}());\nLinkifier.TIME_BEFORE_LINKIFY = 200;\nexports.Linkifier = Linkifier;\n\n//# sourceMappingURL=Linkifier.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/Linkifier.js\n// module id = 17\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar EscapeSequences_1 = require(\"./EscapeSequences\");\nvar Charsets_1 = require(\"./Charsets\");\nvar normalStateHandler = {};\nnormalStateHandler[EscapeSequences_1.C0.BEL] = function (parser, handler) { return handler.bell(); };\nnormalStateHandler[EscapeSequences_1.C0.LF] = function (parser, handler) { return handler.lineFeed(); };\nnormalStateHandler[EscapeSequences_1.C0.VT] = normalStateHandler[EscapeSequences_1.C0.LF];\nnormalStateHandler[EscapeSequences_1.C0.FF] = normalStateHandler[EscapeSequences_1.C0.LF];\nnormalStateHandler[EscapeSequences_1.C0.CR] = function (parser, handler) { return handler.carriageReturn(); };\nnormalStateHandler[EscapeSequences_1.C0.BS] = function (parser, handler) { return handler.backspace(); };\nnormalStateHandler[EscapeSequences_1.C0.HT] = function (parser, handler) { return handler.tab(); };\nnormalStateHandler[EscapeSequences_1.C0.SO] = function (parser, handler) { return handler.shiftOut(); };\nnormalStateHandler[EscapeSequences_1.C0.SI] = function (parser, handler) { return handler.shiftIn(); };\nnormalStateHandler[EscapeSequences_1.C0.ESC] = function (parser, handler) { return parser.setState(ParserState.ESCAPED); };\nvar escapedStateHandler = {};\nescapedStateHandler['['] = function (parser, terminal) {\n terminal.params = [];\n terminal.currentParam = 0;\n parser.setState(ParserState.CSI_PARAM);\n};\nescapedStateHandler[']'] = function (parser, terminal) {\n terminal.params = [];\n terminal.currentParam = 0;\n parser.setState(ParserState.OSC);\n};\nescapedStateHandler['P'] = function (parser, terminal) {\n terminal.params = [];\n terminal.currentParam = 0;\n parser.setState(ParserState.DCS);\n};\nescapedStateHandler['_'] = function (parser, terminal) {\n parser.setState(ParserState.IGNORE);\n};\nescapedStateHandler['^'] = function (parser, terminal) {\n parser.setState(ParserState.IGNORE);\n};\nescapedStateHandler['c'] = function (parser, terminal) {\n terminal.reset();\n};\nescapedStateHandler['E'] = function (parser, terminal) {\n terminal.x = 0;\n terminal.index();\n parser.setState(ParserState.NORMAL);\n};\nescapedStateHandler['D'] = function (parser, terminal) {\n terminal.index();\n parser.setState(ParserState.NORMAL);\n};\nescapedStateHandler['M'] = function (parser, terminal) {\n terminal.reverseIndex();\n parser.setState(ParserState.NORMAL);\n};\nescapedStateHandler['%'] = function (parser, terminal) {\n terminal.setgLevel(0);\n terminal.setgCharset(0, Charsets_1.DEFAULT_CHARSET);\n parser.setState(ParserState.NORMAL);\n parser.skipNextChar();\n};\nescapedStateHandler[EscapeSequences_1.C0.CAN] = function (parser) { return parser.setState(ParserState.NORMAL); };\nvar csiParamStateHandler = {};\ncsiParamStateHandler['?'] = function (parser) { return parser.setPrefix('?'); };\ncsiParamStateHandler['>'] = function (parser) { return parser.setPrefix('>'); };\ncsiParamStateHandler['!'] = function (parser) { return parser.setPrefix('!'); };\ncsiParamStateHandler['0'] = function (parser) { return parser.setParam(parser.getParam() * 10); };\ncsiParamStateHandler['1'] = function (parser) { return parser.setParam(parser.getParam() * 10 + 1); };\ncsiParamStateHandler['2'] = function (parser) { return parser.setParam(parser.getParam() * 10 + 2); };\ncsiParamStateHandler['3'] = function (parser) { return parser.setParam(parser.getParam() * 10 + 3); };\ncsiParamStateHandler['4'] = function (parser) { return parser.setParam(parser.getParam() * 10 + 4); };\ncsiParamStateHandler['5'] = function (parser) { return parser.setParam(parser.getParam() * 10 + 5); };\ncsiParamStateHandler['6'] = function (parser) { return parser.setParam(parser.getParam() * 10 + 6); };\ncsiParamStateHandler['7'] = function (parser) { return parser.setParam(parser.getParam() * 10 + 7); };\ncsiParamStateHandler['8'] = function (parser) { return parser.setParam(parser.getParam() * 10 + 8); };\ncsiParamStateHandler['9'] = function (parser) { return parser.setParam(parser.getParam() * 10 + 9); };\ncsiParamStateHandler['$'] = function (parser) { return parser.setPostfix('$'); };\ncsiParamStateHandler['\"'] = function (parser) { return parser.setPostfix('\"'); };\ncsiParamStateHandler[' '] = function (parser) { return parser.setPostfix(' '); };\ncsiParamStateHandler['\\''] = function (parser) { return parser.setPostfix('\\''); };\ncsiParamStateHandler[';'] = function (parser) { return parser.finalizeParam(); };\ncsiParamStateHandler[EscapeSequences_1.C0.CAN] = function (parser) { return parser.setState(ParserState.NORMAL); };\nvar csiStateHandler = {};\ncsiStateHandler['@'] = function (handler, params, prefix) { return handler.insertChars(params); };\ncsiStateHandler['A'] = function (handler, params, prefix) { return handler.cursorUp(params); };\ncsiStateHandler['B'] = function (handler, params, prefix) { return handler.cursorDown(params); };\ncsiStateHandler['C'] = function (handler, params, prefix) { return handler.cursorForward(params); };\ncsiStateHandler['D'] = function (handler, params, prefix) { return handler.cursorBackward(params); };\ncsiStateHandler['E'] = function (handler, params, prefix) { return handler.cursorNextLine(params); };\ncsiStateHandler['F'] = function (handler, params, prefix) { return handler.cursorPrecedingLine(params); };\ncsiStateHandler['G'] = function (handler, params, prefix) { return handler.cursorCharAbsolute(params); };\ncsiStateHandler['H'] = function (handler, params, prefix) { return handler.cursorPosition(params); };\ncsiStateHandler['I'] = function (handler, params, prefix) { return handler.cursorForwardTab(params); };\ncsiStateHandler['J'] = function (handler, params, prefix) { return handler.eraseInDisplay(params); };\ncsiStateHandler['K'] = function (handler, params, prefix) { return handler.eraseInLine(params); };\ncsiStateHandler['L'] = function (handler, params, prefix) { return handler.insertLines(params); };\ncsiStateHandler['M'] = function (handler, params, prefix) { return handler.deleteLines(params); };\ncsiStateHandler['P'] = function (handler, params, prefix) { return handler.deleteChars(params); };\ncsiStateHandler['S'] = function (handler, params, prefix) { return handler.scrollUp(params); };\ncsiStateHandler['T'] = function (handler, params, prefix) {\n if (params.length < 2 && !prefix) {\n handler.scrollDown(params);\n }\n};\ncsiStateHandler['X'] = function (handler, params, prefix) { return handler.eraseChars(params); };\ncsiStateHandler['Z'] = function (handler, params, prefix) { return handler.cursorBackwardTab(params); };\ncsiStateHandler['`'] = function (handler, params, prefix) { return handler.charPosAbsolute(params); };\ncsiStateHandler['a'] = function (handler, params, prefix) { return handler.HPositionRelative(params); };\ncsiStateHandler['b'] = function (handler, params, prefix) { return handler.repeatPrecedingCharacter(params); };\ncsiStateHandler['c'] = function (handler, params, prefix) { return handler.sendDeviceAttributes(params); };\ncsiStateHandler['d'] = function (handler, params, prefix) { return handler.linePosAbsolute(params); };\ncsiStateHandler['e'] = function (handler, params, prefix) { return handler.VPositionRelative(params); };\ncsiStateHandler['f'] = function (handler, params, prefix) { return handler.HVPosition(params); };\ncsiStateHandler['g'] = function (handler, params, prefix) { return handler.tabClear(params); };\ncsiStateHandler['h'] = function (handler, params, prefix) { return handler.setMode(params); };\ncsiStateHandler['l'] = function (handler, params, prefix) { return handler.resetMode(params); };\ncsiStateHandler['m'] = function (handler, params, prefix) { return handler.charAttributes(params); };\ncsiStateHandler['n'] = function (handler, params, prefix) { return handler.deviceStatus(params); };\ncsiStateHandler['p'] = function (handler, params, prefix) {\n switch (prefix) {\n case '!':\n handler.softReset(params);\n break;\n }\n};\ncsiStateHandler['q'] = function (handler, params, prefix, postfix) {\n if (postfix === ' ') {\n handler.setCursorStyle(params);\n }\n};\ncsiStateHandler['r'] = function (handler, params) { return handler.setScrollRegion(params); };\ncsiStateHandler['s'] = function (handler, params) { return handler.saveCursor(params); };\ncsiStateHandler['u'] = function (handler, params) { return handler.restoreCursor(params); };\ncsiStateHandler[EscapeSequences_1.C0.CAN] = function (handler, params, prefix, postfix, parser) { return parser.setState(ParserState.NORMAL); };\nvar ParserState;\n(function (ParserState) {\n ParserState[ParserState[\"NORMAL\"] = 0] = \"NORMAL\";\n ParserState[ParserState[\"ESCAPED\"] = 1] = \"ESCAPED\";\n ParserState[ParserState[\"CSI_PARAM\"] = 2] = \"CSI_PARAM\";\n ParserState[ParserState[\"CSI\"] = 3] = \"CSI\";\n ParserState[ParserState[\"OSC\"] = 4] = \"OSC\";\n ParserState[ParserState[\"CHARSET\"] = 5] = \"CHARSET\";\n ParserState[ParserState[\"DCS\"] = 6] = \"DCS\";\n ParserState[ParserState[\"IGNORE\"] = 7] = \"IGNORE\";\n})(ParserState || (ParserState = {}));\nvar Parser = (function () {\n function Parser(_inputHandler, _terminal) {\n this._inputHandler = _inputHandler;\n this._terminal = _terminal;\n this._state = ParserState.NORMAL;\n }\n Parser.prototype.parse = function (data) {\n var l = data.length, j, cs, ch, code, low;\n this._position = 0;\n if (this._terminal.surrogate_high) {\n data = this._terminal.surrogate_high + data;\n this._terminal.surrogate_high = '';\n }\n for (; this._position < l; this._position++) {\n ch = data[this._position];\n code = data.charCodeAt(this._position);\n if (0xD800 <= code && code <= 0xDBFF) {\n low = data.charCodeAt(this._position + 1);\n if (isNaN(low)) {\n this._terminal.surrogate_high = ch;\n continue;\n }\n code = ((code - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;\n ch += data.charAt(this._position + 1);\n }\n if (0xDC00 <= code && code <= 0xDFFF)\n continue;\n switch (this._state) {\n case ParserState.NORMAL:\n if (ch in normalStateHandler) {\n normalStateHandler[ch](this, this._inputHandler);\n }\n else {\n this._inputHandler.addChar(ch, code);\n }\n break;\n case ParserState.ESCAPED:\n if (ch in escapedStateHandler) {\n escapedStateHandler[ch](this, this._terminal);\n break;\n }\n switch (ch) {\n case '(':\n case ')':\n case '*':\n case '+':\n case '-':\n case '.':\n switch (ch) {\n case '(':\n this._terminal.gcharset = 0;\n break;\n case ')':\n this._terminal.gcharset = 1;\n break;\n case '*':\n this._terminal.gcharset = 2;\n break;\n case '+':\n this._terminal.gcharset = 3;\n break;\n case '-':\n this._terminal.gcharset = 1;\n break;\n case '.':\n this._terminal.gcharset = 2;\n break;\n }\n this._state = ParserState.CHARSET;\n break;\n case '/':\n this._terminal.gcharset = 3;\n this._state = ParserState.CHARSET;\n this._position--;\n break;\n case 'N':\n break;\n case 'O':\n break;\n case 'n':\n this._terminal.setgLevel(2);\n break;\n case 'o':\n this._terminal.setgLevel(3);\n break;\n case '|':\n this._terminal.setgLevel(3);\n break;\n case '}':\n this._terminal.setgLevel(2);\n break;\n case '~':\n this._terminal.setgLevel(1);\n break;\n case '7':\n this._inputHandler.saveCursor();\n this._state = ParserState.NORMAL;\n break;\n case '8':\n this._inputHandler.restoreCursor();\n this._state = ParserState.NORMAL;\n break;\n case '#':\n this._state = ParserState.NORMAL;\n this._position++;\n break;\n case 'H':\n this._terminal.tabSet();\n this._state = ParserState.NORMAL;\n break;\n case '=':\n this._terminal.log('Serial port requested application keypad.');\n this._terminal.applicationKeypad = true;\n this._terminal.viewport.syncScrollArea();\n this._state = ParserState.NORMAL;\n break;\n case '>':\n this._terminal.log('Switching back to normal keypad.');\n this._terminal.applicationKeypad = false;\n this._terminal.viewport.syncScrollArea();\n this._state = ParserState.NORMAL;\n break;\n default:\n this._state = ParserState.NORMAL;\n this._terminal.error('Unknown ESC control: %s.', ch);\n break;\n }\n break;\n case ParserState.CHARSET:\n if (ch in Charsets_1.CHARSETS) {\n cs = Charsets_1.CHARSETS[ch];\n if (ch === '/') {\n this.skipNextChar();\n }\n }\n else {\n cs = Charsets_1.DEFAULT_CHARSET;\n }\n this._terminal.setgCharset(this._terminal.gcharset, cs);\n this._terminal.gcharset = null;\n this._state = ParserState.NORMAL;\n break;\n case ParserState.OSC:\n if (ch === EscapeSequences_1.C0.ESC || ch === EscapeSequences_1.C0.BEL) {\n if (ch === EscapeSequences_1.C0.ESC)\n this._position++;\n this._terminal.params.push(this._terminal.currentParam);\n switch (this._terminal.params[0]) {\n case 0:\n case 1:\n case 2:\n if (this._terminal.params[1]) {\n this._terminal.title = this._terminal.params[1];\n this._terminal.handleTitle(this._terminal.title);\n }\n break;\n case 3:\n break;\n case 4:\n case 5:\n break;\n case 10:\n case 11:\n case 12:\n case 13:\n case 14:\n case 15:\n case 16:\n case 17:\n case 18:\n case 19:\n break;\n case 46:\n break;\n case 50:\n break;\n case 51:\n break;\n case 52:\n break;\n case 104:\n case 105:\n case 110:\n case 111:\n case 112:\n case 113:\n case 114:\n case 115:\n case 116:\n case 117:\n case 118:\n break;\n }\n this._terminal.params = [];\n this._terminal.currentParam = 0;\n this._state = ParserState.NORMAL;\n }\n else {\n if (!this._terminal.params.length) {\n if (ch >= '0' && ch <= '9') {\n this._terminal.currentParam =\n this._terminal.currentParam * 10 + ch.charCodeAt(0) - 48;\n }\n else if (ch === ';') {\n this._terminal.params.push(this._terminal.currentParam);\n this._terminal.currentParam = '';\n }\n }\n else {\n this._terminal.currentParam += ch;\n }\n }\n break;\n case ParserState.CSI_PARAM:\n if (ch in csiParamStateHandler) {\n csiParamStateHandler[ch](this);\n break;\n }\n this.finalizeParam();\n this._state = ParserState.CSI;\n case ParserState.CSI:\n if (ch in csiStateHandler) {\n csiStateHandler[ch](this._inputHandler, this._terminal.params, this._terminal.prefix, this._terminal.postfix, this);\n }\n else {\n this._terminal.error('Unknown CSI code: %s.', ch);\n }\n this._state = ParserState.NORMAL;\n this._terminal.prefix = '';\n this._terminal.postfix = '';\n break;\n case ParserState.DCS:\n if (ch === EscapeSequences_1.C0.ESC || ch === EscapeSequences_1.C0.BEL) {\n if (ch === EscapeSequences_1.C0.ESC)\n this._position++;\n var pt = void 0;\n var valid = void 0;\n switch (this._terminal.prefix) {\n case '':\n break;\n case '$q':\n pt = this._terminal.currentParam;\n valid = false;\n switch (pt) {\n case '\"q':\n pt = '0\"q';\n break;\n case '\"p':\n pt = '61\"p';\n break;\n case 'r':\n pt = ''\n + (this._terminal.scrollTop + 1)\n + ';'\n + (this._terminal.scrollBottom + 1)\n + 'r';\n break;\n case 'm':\n pt = '0m';\n break;\n default:\n this._terminal.error('Unknown DCS Pt: %s.', pt);\n pt = '';\n break;\n }\n this._terminal.send(EscapeSequences_1.C0.ESC + 'P' + +valid + '$r' + pt + EscapeSequences_1.C0.ESC + '\\\\');\n break;\n case '+p':\n break;\n case '+q':\n pt = this._terminal.currentParam;\n valid = false;\n this._terminal.send(EscapeSequences_1.C0.ESC + 'P' + +valid + '+r' + pt + EscapeSequences_1.C0.ESC + '\\\\');\n break;\n default:\n this._terminal.error('Unknown DCS prefix: %s.', this._terminal.prefix);\n break;\n }\n this._terminal.currentParam = 0;\n this._terminal.prefix = '';\n this._state = ParserState.NORMAL;\n }\n else if (!this._terminal.currentParam) {\n if (!this._terminal.prefix && ch !== '$' && ch !== '+') {\n this._terminal.currentParam = ch;\n }\n else if (this._terminal.prefix.length === 2) {\n this._terminal.currentParam = ch;\n }\n else {\n this._terminal.prefix += ch;\n }\n }\n else {\n this._terminal.currentParam += ch;\n }\n break;\n case ParserState.IGNORE:\n if (ch === EscapeSequences_1.C0.ESC || ch === EscapeSequences_1.C0.BEL) {\n if (ch === EscapeSequences_1.C0.ESC)\n this._position++;\n this._state = ParserState.NORMAL;\n }\n break;\n }\n }\n return this._state;\n };\n Parser.prototype.setState = function (state) {\n this._state = state;\n };\n Parser.prototype.setPrefix = function (prefix) {\n this._terminal.prefix = prefix;\n };\n Parser.prototype.setPostfix = function (postfix) {\n this._terminal.postfix = postfix;\n };\n Parser.prototype.setParam = function (param) {\n this._terminal.currentParam = param;\n };\n Parser.prototype.getParam = function () {\n return this._terminal.currentParam;\n };\n Parser.prototype.finalizeParam = function () {\n this._terminal.params.push(this._terminal.currentParam);\n this._terminal.currentParam = 0;\n };\n Parser.prototype.skipNextChar = function () {\n this._position++;\n };\n return Parser;\n}());\nexports.Parser = Parser;\n\n//# sourceMappingURL=Parser.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/Parser.js\n// module id = 18\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar DomElementObjectPool_1 = require(\"./utils/DomElementObjectPool\");\nvar MAX_REFRESH_FRAME_SKIP = 5;\nvar FLAGS;\n(function (FLAGS) {\n FLAGS[FLAGS[\"BOLD\"] = 1] = \"BOLD\";\n FLAGS[FLAGS[\"UNDERLINE\"] = 2] = \"UNDERLINE\";\n FLAGS[FLAGS[\"BLINK\"] = 4] = \"BLINK\";\n FLAGS[FLAGS[\"INVERSE\"] = 8] = \"INVERSE\";\n FLAGS[FLAGS[\"INVISIBLE\"] = 16] = \"INVISIBLE\";\n})(FLAGS || (FLAGS = {}));\n;\nvar brokenBold = null;\nvar Renderer = (function () {\n function Renderer(_terminal) {\n this._terminal = _terminal;\n this._refreshRowsQueue = [];\n this._refreshFramesSkipped = 0;\n this._refreshAnimationFrame = null;\n this._spanElementObjectPool = new DomElementObjectPool_1.DomElementObjectPool('span');\n if (brokenBold === null) {\n brokenBold = checkBoldBroken(this._terminal.element);\n }\n this._spanElementObjectPool = new DomElementObjectPool_1.DomElementObjectPool('span');\n }\n Renderer.prototype.queueRefresh = function (start, end) {\n this._refreshRowsQueue.push({ start: start, end: end });\n if (!this._refreshAnimationFrame) {\n this._refreshAnimationFrame = window.requestAnimationFrame(this._refreshLoop.bind(this));\n }\n };\n Renderer.prototype._refreshLoop = function () {\n var skipFrame = this._terminal.writeBuffer.length > 0 && this._refreshFramesSkipped++ <= MAX_REFRESH_FRAME_SKIP;\n if (skipFrame) {\n this._refreshAnimationFrame = window.requestAnimationFrame(this._refreshLoop.bind(this));\n return;\n }\n this._refreshFramesSkipped = 0;\n var start;\n var end;\n if (this._refreshRowsQueue.length > 4) {\n start = 0;\n end = this._terminal.rows - 1;\n }\n else {\n start = this._refreshRowsQueue[0].start;\n end = this._refreshRowsQueue[0].end;\n for (var i = 1; i < this._refreshRowsQueue.length; i++) {\n if (this._refreshRowsQueue[i].start < start) {\n start = this._refreshRowsQueue[i].start;\n }\n if (this._refreshRowsQueue[i].end > end) {\n end = this._refreshRowsQueue[i].end;\n }\n }\n }\n this._refreshRowsQueue = [];\n this._refreshAnimationFrame = null;\n this._refresh(start, end);\n };\n Renderer.prototype._refresh = function (start, end) {\n var parent;\n if (end - start >= this._terminal.rows / 2) {\n parent = this._terminal.element.parentNode;\n if (parent) {\n this._terminal.element.removeChild(this._terminal.rowContainer);\n }\n }\n var width = this._terminal.cols;\n var y = start;\n if (end >= this._terminal.rows) {\n this._terminal.log('`end` is too large. Most likely a bad CSR.');\n end = this._terminal.rows - 1;\n }\n for (; y <= end; y++) {\n var row = y + this._terminal.ydisp;\n var line = this._terminal.lines.get(row);\n var x = void 0;\n if (this._terminal.y === y - (this._terminal.ybase - this._terminal.ydisp) &&\n this._terminal.cursorState &&\n !this._terminal.cursorHidden) {\n x = this._terminal.x;\n }\n else {\n x = -1;\n }\n var attr = this._terminal.defAttr;\n var documentFragment = document.createDocumentFragment();\n var innerHTML = '';\n var currentElement = void 0;\n while (this._terminal.children[y].children.length) {\n var child = this._terminal.children[y].children[0];\n this._terminal.children[y].removeChild(child);\n this._spanElementObjectPool.release(child);\n }\n for (var i = 0; i < width; i++) {\n var data = line[i][0];\n var ch = line[i][1];\n var ch_width = line[i][2];\n if (!ch_width) {\n continue;\n }\n if (i === x) {\n data = -1;\n }\n if (data !== attr) {\n if (attr !== this._terminal.defAttr) {\n if (innerHTML) {\n currentElement.innerHTML = innerHTML;\n innerHTML = '';\n }\n documentFragment.appendChild(currentElement);\n currentElement = null;\n }\n if (data !== this._terminal.defAttr) {\n if (innerHTML && !currentElement) {\n currentElement = this._spanElementObjectPool.acquire();\n }\n if (currentElement) {\n if (innerHTML) {\n currentElement.innerHTML = innerHTML;\n innerHTML = '';\n }\n documentFragment.appendChild(currentElement);\n }\n currentElement = this._spanElementObjectPool.acquire();\n if (data === -1) {\n currentElement.classList.add('reverse-video');\n currentElement.classList.add('terminal-cursor');\n }\n else {\n var bg = data & 0x1ff;\n var fg = (data >> 9) & 0x1ff;\n var flags = data >> 18;\n if (flags & FLAGS.BOLD) {\n if (!brokenBold) {\n currentElement.classList.add('xterm-bold');\n }\n if (fg < 8) {\n fg += 8;\n }\n }\n if (flags & FLAGS.UNDERLINE) {\n currentElement.classList.add('xterm-underline');\n }\n if (flags & FLAGS.BLINK) {\n currentElement.classList.add('xterm-blink');\n }\n if (flags & FLAGS.INVERSE) {\n var temp = bg;\n bg = fg;\n fg = temp;\n if ((flags & 1) && fg < 8) {\n fg += 8;\n }\n }\n if (flags & FLAGS.INVISIBLE) {\n currentElement.classList.add('xterm-hidden');\n }\n if (flags & FLAGS.INVERSE) {\n if (bg === 257) {\n bg = 15;\n }\n if (fg === 256) {\n fg = 0;\n }\n }\n if (bg < 256) {\n currentElement.classList.add(\"xterm-bg-color-\" + bg);\n }\n if (fg < 256) {\n currentElement.classList.add(\"xterm-color-\" + fg);\n }\n }\n }\n }\n if (ch_width === 2) {\n innerHTML += \"\" + ch + \"\";\n }\n else if (ch.charCodeAt(0) > 255) {\n innerHTML += \"\" + ch + \"\";\n }\n else {\n switch (ch) {\n case '&':\n innerHTML += '&';\n break;\n case '<':\n innerHTML += '<';\n break;\n case '>':\n innerHTML += '>';\n break;\n default:\n if (ch <= ' ') {\n innerHTML += ' ';\n }\n else {\n innerHTML += ch;\n }\n break;\n }\n }\n attr = data;\n }\n if (innerHTML && !currentElement) {\n currentElement = this._spanElementObjectPool.acquire();\n }\n if (currentElement) {\n if (innerHTML) {\n currentElement.innerHTML = innerHTML;\n innerHTML = '';\n }\n documentFragment.appendChild(currentElement);\n currentElement = null;\n }\n this._terminal.children[y].appendChild(documentFragment);\n }\n if (parent) {\n this._terminal.element.appendChild(this._terminal.rowContainer);\n }\n this._terminal.emit('refresh', { element: this._terminal.element, start: start, end: end });\n };\n ;\n Renderer.prototype.refreshSelection = function (start, end) {\n while (this._terminal.selectionContainer.children.length) {\n this._terminal.selectionContainer.removeChild(this._terminal.selectionContainer.children[0]);\n }\n if (!start || !end) {\n return;\n }\n var viewportStartRow = start[1] - this._terminal.ydisp;\n var viewportEndRow = end[1] - this._terminal.ydisp;\n var viewportCappedStartRow = Math.max(viewportStartRow, 0);\n var viewportCappedEndRow = Math.min(viewportEndRow, this._terminal.rows - 1);\n if (viewportCappedStartRow >= this._terminal.rows || viewportCappedEndRow < 0) {\n return;\n }\n var documentFragment = document.createDocumentFragment();\n var startCol = viewportStartRow === viewportCappedStartRow ? start[0] : 0;\n var endCol = viewportCappedStartRow === viewportCappedEndRow ? end[0] : this._terminal.cols;\n documentFragment.appendChild(this._createSelectionElement(viewportCappedStartRow, startCol, endCol));\n var middleRowsCount = viewportCappedEndRow - viewportCappedStartRow - 1;\n documentFragment.appendChild(this._createSelectionElement(viewportCappedStartRow + 1, 0, this._terminal.cols, middleRowsCount));\n if (viewportCappedStartRow !== viewportCappedEndRow) {\n var endCol_1 = viewportEndRow === viewportCappedEndRow ? end[0] : this._terminal.cols;\n documentFragment.appendChild(this._createSelectionElement(viewportCappedEndRow, 0, endCol_1));\n }\n this._terminal.selectionContainer.appendChild(documentFragment);\n };\n Renderer.prototype._createSelectionElement = function (row, colStart, colEnd, rowCount) {\n if (rowCount === void 0) { rowCount = 1; }\n var element = document.createElement('div');\n element.style.height = rowCount * this._terminal.charMeasure.height + \"px\";\n element.style.top = row * this._terminal.charMeasure.height + \"px\";\n element.style.left = colStart * this._terminal.charMeasure.width + \"px\";\n element.style.width = this._terminal.charMeasure.width * (colEnd - colStart) + \"px\";\n return element;\n };\n return Renderer;\n}());\nexports.Renderer = Renderer;\nfunction checkBoldBroken(terminal) {\n var document = terminal.ownerDocument;\n var el = document.createElement('span');\n el.innerHTML = 'hello world';\n terminal.appendChild(el);\n var w1 = el.offsetWidth;\n var h1 = el.offsetHeight;\n el.style.fontWeight = 'bold';\n var w2 = el.offsetWidth;\n var h2 = el.offsetHeight;\n terminal.removeChild(el);\n return w1 !== w2 || h1 !== h2;\n}\n\n//# sourceMappingURL=Renderer.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/Renderer.js\n// module id = 19\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Mouse = require(\"./utils/Mouse\");\nvar Browser = require(\"./utils/Browser\");\nvar EventEmitter_1 = require(\"./EventEmitter\");\nvar SelectionModel_1 = require(\"./SelectionModel\");\nvar DRAG_SCROLL_MAX_THRESHOLD = 50;\nvar DRAG_SCROLL_MAX_SPEED = 15;\nvar DRAG_SCROLL_INTERVAL = 50;\nvar CLEAR_MOUSE_DOWN_TIME = 400;\nvar CLEAR_MOUSE_DISTANCE = 10;\nvar WORD_SEPARATORS = ' ()[]{}\\'\"';\nvar LINE_DATA_CHAR_INDEX = 1;\nvar LINE_DATA_WIDTH_INDEX = 2;\nvar NON_BREAKING_SPACE_CHAR = String.fromCharCode(160);\nvar ALL_NON_BREAKING_SPACE_REGEX = new RegExp(NON_BREAKING_SPACE_CHAR, 'g');\nvar SelectionMode;\n(function (SelectionMode) {\n SelectionMode[SelectionMode[\"NORMAL\"] = 0] = \"NORMAL\";\n SelectionMode[SelectionMode[\"WORD\"] = 1] = \"WORD\";\n SelectionMode[SelectionMode[\"LINE\"] = 2] = \"LINE\";\n})(SelectionMode || (SelectionMode = {}));\nvar SelectionManager = (function (_super) {\n __extends(SelectionManager, _super);\n function SelectionManager(_terminal, _buffer, _rowContainer, _charMeasure) {\n var _this = _super.call(this) || this;\n _this._terminal = _terminal;\n _this._buffer = _buffer;\n _this._rowContainer = _rowContainer;\n _this._charMeasure = _charMeasure;\n _this._initListeners();\n _this.enable();\n _this._model = new SelectionModel_1.SelectionModel(_terminal);\n _this._lastMouseDownTime = 0;\n _this._activeSelectionMode = SelectionMode.NORMAL;\n return _this;\n }\n SelectionManager.prototype._initListeners = function () {\n var _this = this;\n this._bufferTrimListener = function (amount) { return _this._onTrim(amount); };\n this._mouseMoveListener = function (event) { return _this._onMouseMove(event); };\n this._mouseDownListener = function (event) { return _this._onMouseDown(event); };\n this._mouseUpListener = function (event) { return _this._onMouseUp(event); };\n };\n SelectionManager.prototype.disable = function () {\n this.clearSelection();\n this._buffer.off('trim', this._bufferTrimListener);\n this._rowContainer.removeEventListener('mousedown', this._mouseDownListener);\n };\n SelectionManager.prototype.enable = function () {\n this._buffer.on('trim', this._bufferTrimListener);\n this._rowContainer.addEventListener('mousedown', this._mouseDownListener);\n };\n SelectionManager.prototype.setBuffer = function (buffer) {\n this._buffer = buffer;\n this.clearSelection();\n };\n Object.defineProperty(SelectionManager.prototype, \"hasSelection\", {\n get: function () {\n var start = this._model.finalSelectionStart;\n var end = this._model.finalSelectionEnd;\n if (!start || !end) {\n return false;\n }\n return start[0] !== end[0] || start[1] !== end[1];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SelectionManager.prototype, \"selectionText\", {\n get: function () {\n var start = this._model.finalSelectionStart;\n var end = this._model.finalSelectionEnd;\n if (!start || !end) {\n return '';\n }\n var startRowEndCol = start[1] === end[1] ? end[0] : null;\n var result = [];\n result.push(this._translateBufferLineToString(this._buffer.get(start[1]), true, start[0], startRowEndCol));\n for (var i = start[1] + 1; i <= end[1] - 1; i++) {\n var bufferLine = this._buffer.get(i);\n var lineText = this._translateBufferLineToString(bufferLine, true);\n if (bufferLine.isWrapped) {\n result[result.length - 1] += lineText;\n }\n else {\n result.push(lineText);\n }\n }\n if (start[1] !== end[1]) {\n var bufferLine = this._buffer.get(end[1]);\n var lineText = this._translateBufferLineToString(bufferLine, true, 0, end[0]);\n if (bufferLine.isWrapped) {\n result[result.length - 1] += lineText;\n }\n else {\n result.push(lineText);\n }\n }\n var formattedResult = result.map(function (line) {\n return line.replace(ALL_NON_BREAKING_SPACE_REGEX, ' ');\n }).join(Browser.isMSWindows ? '\\r\\n' : '\\n');\n return formattedResult;\n },\n enumerable: true,\n configurable: true\n });\n SelectionManager.prototype.clearSelection = function () {\n this._model.clearSelection();\n this._removeMouseDownListeners();\n this.refresh();\n };\n SelectionManager.prototype._translateBufferLineToString = function (line, trimRight, startCol, endCol) {\n if (startCol === void 0) { startCol = 0; }\n if (endCol === void 0) { endCol = null; }\n var lineString = '';\n var widthAdjustedStartCol = startCol;\n var widthAdjustedEndCol = endCol;\n for (var i = 0; i < line.length; i++) {\n var char = line[i];\n lineString += char[LINE_DATA_CHAR_INDEX];\n if (char[LINE_DATA_WIDTH_INDEX] === 0) {\n if (startCol >= i) {\n widthAdjustedStartCol--;\n }\n if (endCol >= i) {\n widthAdjustedEndCol--;\n }\n }\n }\n var finalEndCol = widthAdjustedEndCol || line.length;\n if (trimRight) {\n var rightWhitespaceIndex = lineString.search(/\\s+$/);\n if (rightWhitespaceIndex !== -1) {\n finalEndCol = Math.min(finalEndCol, rightWhitespaceIndex);\n }\n if (finalEndCol <= widthAdjustedStartCol) {\n return '';\n }\n }\n return lineString.substring(widthAdjustedStartCol, finalEndCol);\n };\n SelectionManager.prototype.refresh = function (isNewSelection) {\n var _this = this;\n if (!this._refreshAnimationFrame) {\n this._refreshAnimationFrame = window.requestAnimationFrame(function () { return _this._refresh(); });\n }\n if (Browser.isLinux && isNewSelection) {\n var selectionText = this.selectionText;\n if (selectionText.length) {\n this.emit('newselection', this.selectionText);\n }\n }\n };\n SelectionManager.prototype._refresh = function () {\n this._refreshAnimationFrame = null;\n this.emit('refresh', { start: this._model.finalSelectionStart, end: this._model.finalSelectionEnd });\n };\n SelectionManager.prototype.selectAll = function () {\n this._model.isSelectAllActive = true;\n this.refresh();\n };\n SelectionManager.prototype._onTrim = function (amount) {\n var needsRefresh = this._model.onTrim(amount);\n if (needsRefresh) {\n this.refresh();\n }\n };\n SelectionManager.prototype._getMouseBufferCoords = function (event) {\n var coords = Mouse.getCoords(event, this._rowContainer, this._charMeasure, this._terminal.cols, this._terminal.rows, true);\n coords[0]--;\n coords[1]--;\n coords[1] += this._terminal.ydisp;\n return coords;\n };\n SelectionManager.prototype._getMouseEventScrollAmount = function (event) {\n var offset = Mouse.getCoordsRelativeToElement(event, this._rowContainer)[1];\n var terminalHeight = this._terminal.rows * this._charMeasure.height;\n if (offset >= 0 && offset <= terminalHeight) {\n return 0;\n }\n if (offset > terminalHeight) {\n offset -= terminalHeight;\n }\n offset = Math.min(Math.max(offset, -DRAG_SCROLL_MAX_THRESHOLD), DRAG_SCROLL_MAX_THRESHOLD);\n offset /= DRAG_SCROLL_MAX_THRESHOLD;\n return (offset / Math.abs(offset)) + Math.round(offset * (DRAG_SCROLL_MAX_SPEED - 1));\n };\n SelectionManager.prototype._onMouseDown = function (event) {\n if (event.button !== 0) {\n return;\n }\n event.preventDefault();\n this._dragScrollAmount = 0;\n this._setMouseClickCount(event);\n if (event.shiftKey) {\n this._onShiftClick(event);\n }\n else {\n if (this._clickCount === 1) {\n this._onSingleClick(event);\n }\n else if (this._clickCount === 2) {\n this._onDoubleClick(event);\n }\n else if (this._clickCount === 3) {\n this._onTripleClick(event);\n }\n }\n this._addMouseDownListeners();\n this.refresh(true);\n };\n SelectionManager.prototype._addMouseDownListeners = function () {\n var _this = this;\n this._rowContainer.ownerDocument.addEventListener('mousemove', this._mouseMoveListener);\n this._rowContainer.ownerDocument.addEventListener('mouseup', this._mouseUpListener);\n this._dragScrollIntervalTimer = setInterval(function () { return _this._dragScroll(); }, DRAG_SCROLL_INTERVAL);\n };\n SelectionManager.prototype._removeMouseDownListeners = function () {\n this._rowContainer.ownerDocument.removeEventListener('mousemove', this._mouseMoveListener);\n this._rowContainer.ownerDocument.removeEventListener('mouseup', this._mouseUpListener);\n clearInterval(this._dragScrollIntervalTimer);\n this._dragScrollIntervalTimer = null;\n };\n SelectionManager.prototype._onShiftClick = function (event) {\n if (this._model.selectionStart) {\n this._model.selectionEnd = this._getMouseBufferCoords(event);\n }\n };\n SelectionManager.prototype._onSingleClick = function (event) {\n this._model.selectionStartLength = 0;\n this._model.isSelectAllActive = false;\n this._activeSelectionMode = SelectionMode.NORMAL;\n this._model.selectionStart = this._getMouseBufferCoords(event);\n if (this._model.selectionStart) {\n this._model.selectionEnd = null;\n var char = this._buffer.get(this._model.selectionStart[1])[this._model.selectionStart[0]];\n if (char[LINE_DATA_WIDTH_INDEX] === 0) {\n this._model.selectionStart[0]++;\n }\n }\n };\n SelectionManager.prototype._onDoubleClick = function (event) {\n var coords = this._getMouseBufferCoords(event);\n if (coords) {\n this._activeSelectionMode = SelectionMode.WORD;\n this._selectWordAt(coords);\n }\n };\n SelectionManager.prototype._onTripleClick = function (event) {\n var coords = this._getMouseBufferCoords(event);\n if (coords) {\n this._activeSelectionMode = SelectionMode.LINE;\n this._selectLineAt(coords[1]);\n }\n };\n SelectionManager.prototype._setMouseClickCount = function (event) {\n var currentTime = (new Date()).getTime();\n if (currentTime - this._lastMouseDownTime > CLEAR_MOUSE_DOWN_TIME || this._distanceFromLastMousePosition(event) > CLEAR_MOUSE_DISTANCE) {\n this._clickCount = 0;\n }\n this._lastMouseDownTime = currentTime;\n this._lastMousePosition = [event.pageX, event.pageY];\n this._clickCount++;\n };\n SelectionManager.prototype._distanceFromLastMousePosition = function (event) {\n var result = Math.max(Math.abs(this._lastMousePosition[0] - event.pageX), Math.abs(this._lastMousePosition[1] - event.pageY));\n return result;\n };\n SelectionManager.prototype._onMouseMove = function (event) {\n var previousSelectionEnd = this._model.selectionEnd ? [this._model.selectionEnd[0], this._model.selectionEnd[1]] : null;\n this._model.selectionEnd = this._getMouseBufferCoords(event);\n if (this._activeSelectionMode === SelectionMode.LINE) {\n if (this._model.selectionEnd[1] < this._model.selectionStart[1]) {\n this._model.selectionEnd[0] = 0;\n }\n else {\n this._model.selectionEnd[0] = this._terminal.cols;\n }\n }\n else if (this._activeSelectionMode === SelectionMode.WORD) {\n this._selectToWordAt(this._model.selectionEnd);\n }\n this._dragScrollAmount = this._getMouseEventScrollAmount(event);\n if (this._dragScrollAmount > 0) {\n this._model.selectionEnd[0] = this._terminal.cols - 1;\n }\n else if (this._dragScrollAmount < 0) {\n this._model.selectionEnd[0] = 0;\n }\n if (this._model.selectionEnd[1] < this._buffer.length) {\n var char = this._buffer.get(this._model.selectionEnd[1])[this._model.selectionEnd[0]];\n if (char && char[2] === 0) {\n this._model.selectionEnd[0]++;\n }\n }\n if (!previousSelectionEnd ||\n previousSelectionEnd[0] !== this._model.selectionEnd[0] ||\n previousSelectionEnd[1] !== this._model.selectionEnd[1]) {\n this.refresh(true);\n }\n };\n SelectionManager.prototype._dragScroll = function () {\n if (this._dragScrollAmount) {\n this._terminal.scrollDisp(this._dragScrollAmount, false);\n if (this._dragScrollAmount > 0) {\n this._model.selectionEnd = [this._terminal.cols - 1, this._terminal.ydisp + this._terminal.rows];\n }\n else {\n this._model.selectionEnd = [0, this._terminal.ydisp];\n }\n this.refresh();\n }\n };\n SelectionManager.prototype._onMouseUp = function (event) {\n this._removeMouseDownListeners();\n };\n SelectionManager.prototype._convertViewportColToCharacterIndex = function (bufferLine, coords) {\n var charIndex = coords[0];\n for (var i = 0; coords[0] >= i; i++) {\n var char = bufferLine[i];\n if (char[LINE_DATA_WIDTH_INDEX] === 0) {\n charIndex--;\n }\n }\n return charIndex;\n };\n SelectionManager.prototype._getWordAt = function (coords) {\n var bufferLine = this._buffer.get(coords[1]);\n var line = this._translateBufferLineToString(bufferLine, false);\n var endIndex = this._convertViewportColToCharacterIndex(bufferLine, coords);\n var startIndex = endIndex;\n var charOffset = coords[0] - startIndex;\n var leftWideCharCount = 0;\n var rightWideCharCount = 0;\n if (line.charAt(startIndex) === ' ') {\n while (startIndex > 0 && line.charAt(startIndex - 1) === ' ') {\n startIndex--;\n }\n while (endIndex < line.length && line.charAt(endIndex + 1) === ' ') {\n endIndex++;\n }\n }\n else {\n var startCol = coords[0];\n var endCol = coords[0];\n if (bufferLine[startCol][LINE_DATA_WIDTH_INDEX] === 0) {\n leftWideCharCount++;\n startCol--;\n }\n if (bufferLine[endCol][LINE_DATA_WIDTH_INDEX] === 2) {\n rightWideCharCount++;\n endCol++;\n }\n while (startIndex > 0 && !this._isCharWordSeparator(line.charAt(startIndex - 1))) {\n if (bufferLine[startCol - 1][LINE_DATA_WIDTH_INDEX] === 0) {\n leftWideCharCount++;\n startCol--;\n }\n startIndex--;\n startCol--;\n }\n while (endIndex + 1 < line.length && !this._isCharWordSeparator(line.charAt(endIndex + 1))) {\n if (bufferLine[endCol + 1][LINE_DATA_WIDTH_INDEX] === 2) {\n rightWideCharCount++;\n endCol++;\n }\n endIndex++;\n endCol++;\n }\n }\n var start = startIndex + charOffset - leftWideCharCount;\n var length = Math.min(endIndex - startIndex + leftWideCharCount + rightWideCharCount + 1, this._terminal.cols);\n return { start: start, length: length };\n };\n SelectionManager.prototype._selectWordAt = function (coords) {\n var wordPosition = this._getWordAt(coords);\n this._model.selectionStart = [wordPosition.start, coords[1]];\n this._model.selectionStartLength = wordPosition.length;\n };\n SelectionManager.prototype._selectToWordAt = function (coords) {\n var wordPosition = this._getWordAt(coords);\n this._model.selectionEnd = [this._model.areSelectionValuesReversed() ? wordPosition.start : (wordPosition.start + wordPosition.length), coords[1]];\n };\n SelectionManager.prototype._isCharWordSeparator = function (char) {\n return WORD_SEPARATORS.indexOf(char) >= 0;\n };\n SelectionManager.prototype._selectLineAt = function (line) {\n this._model.selectionStart = [0, line];\n this._model.selectionStartLength = this._terminal.cols;\n };\n return SelectionManager;\n}(EventEmitter_1.EventEmitter));\nexports.SelectionManager = SelectionManager;\n\n//# sourceMappingURL=SelectionManager.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/SelectionManager.js\n// module id = 20\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar SelectionModel = (function () {\n function SelectionModel(_terminal) {\n this._terminal = _terminal;\n this.clearSelection();\n }\n SelectionModel.prototype.clearSelection = function () {\n this.selectionStart = null;\n this.selectionEnd = null;\n this.isSelectAllActive = false;\n this.selectionStartLength = 0;\n };\n Object.defineProperty(SelectionModel.prototype, \"finalSelectionStart\", {\n get: function () {\n if (this.isSelectAllActive) {\n return [0, 0];\n }\n if (!this.selectionEnd || !this.selectionStart) {\n return this.selectionStart;\n }\n return this.areSelectionValuesReversed() ? this.selectionEnd : this.selectionStart;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SelectionModel.prototype, \"finalSelectionEnd\", {\n get: function () {\n if (this.isSelectAllActive) {\n return [this._terminal.cols, this._terminal.ybase + this._terminal.rows - 1];\n }\n if (!this.selectionStart) {\n return null;\n }\n if (!this.selectionEnd || this.areSelectionValuesReversed()) {\n return [this.selectionStart[0] + this.selectionStartLength, this.selectionStart[1]];\n }\n if (this.selectionStartLength) {\n if (this.selectionEnd[1] === this.selectionStart[1]) {\n return [Math.max(this.selectionStart[0] + this.selectionStartLength, this.selectionEnd[0]), this.selectionEnd[1]];\n }\n }\n return this.selectionEnd;\n },\n enumerable: true,\n configurable: true\n });\n SelectionModel.prototype.areSelectionValuesReversed = function () {\n var start = this.selectionStart;\n var end = this.selectionEnd;\n return start[1] > end[1] || (start[1] === end[1] && start[0] > end[0]);\n };\n SelectionModel.prototype.onTrim = function (amount) {\n if (this.selectionStart) {\n this.selectionStart[1] -= amount;\n }\n if (this.selectionEnd) {\n this.selectionEnd[1] -= amount;\n }\n if (this.selectionEnd && this.selectionEnd[1] < 0) {\n this.clearSelection();\n return true;\n }\n if (this.selectionStart && this.selectionStart[1] < 0) {\n this.selectionStart[1] = 0;\n }\n return false;\n };\n return SelectionModel;\n}());\nexports.SelectionModel = SelectionModel;\n\n//# sourceMappingURL=SelectionModel.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/SelectionModel.js\n// module id = 21\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Viewport = (function () {\n function Viewport(terminal, viewportElement, scrollArea, charMeasure) {\n var _this = this;\n this.terminal = terminal;\n this.viewportElement = viewportElement;\n this.scrollArea = scrollArea;\n this.charMeasure = charMeasure;\n this.currentRowHeight = 0;\n this.lastRecordedBufferLength = 0;\n this.lastRecordedViewportHeight = 0;\n this.terminal.on('scroll', this.syncScrollArea.bind(this));\n this.terminal.on('resize', this.syncScrollArea.bind(this));\n this.viewportElement.addEventListener('scroll', this.onScroll.bind(this));\n setTimeout(function () { return _this.syncScrollArea(); }, 0);\n }\n Viewport.prototype.refresh = function () {\n if (this.charMeasure.height > 0) {\n var rowHeightChanged = this.charMeasure.height !== this.currentRowHeight;\n if (rowHeightChanged) {\n this.currentRowHeight = this.charMeasure.height;\n this.viewportElement.style.lineHeight = this.charMeasure.height + 'px';\n this.terminal.rowContainer.style.lineHeight = this.charMeasure.height + 'px';\n }\n var viewportHeightChanged = this.lastRecordedViewportHeight !== this.terminal.rows;\n if (rowHeightChanged || viewportHeightChanged) {\n this.lastRecordedViewportHeight = this.terminal.rows;\n this.viewportElement.style.height = this.charMeasure.height * this.terminal.rows + 'px';\n this.terminal.selectionContainer.style.height = this.viewportElement.style.height;\n }\n this.scrollArea.style.height = (this.charMeasure.height * this.lastRecordedBufferLength) + 'px';\n }\n };\n Viewport.prototype.syncScrollArea = function () {\n if (this.lastRecordedBufferLength !== this.terminal.lines.length) {\n this.lastRecordedBufferLength = this.terminal.lines.length;\n this.refresh();\n }\n else if (this.lastRecordedViewportHeight !== this.terminal.rows) {\n this.refresh();\n }\n else {\n if (this.charMeasure.height !== this.currentRowHeight) {\n this.refresh();\n }\n }\n var scrollTop = this.terminal.ydisp * this.currentRowHeight;\n if (this.viewportElement.scrollTop !== scrollTop) {\n this.viewportElement.scrollTop = scrollTop;\n }\n };\n Viewport.prototype.onScroll = function (ev) {\n var newRow = Math.round(this.viewportElement.scrollTop / this.currentRowHeight);\n var diff = newRow - this.terminal.ydisp;\n this.terminal.scrollDisp(diff, true);\n };\n Viewport.prototype.onWheel = function (ev) {\n if (ev.deltaY === 0) {\n return;\n }\n var multiplier = 1;\n if (ev.deltaMode === WheelEvent.DOM_DELTA_LINE) {\n multiplier = this.currentRowHeight;\n }\n else if (ev.deltaMode === WheelEvent.DOM_DELTA_PAGE) {\n multiplier = this.currentRowHeight * this.terminal.rows;\n }\n this.viewportElement.scrollTop += ev.deltaY * multiplier;\n ev.preventDefault();\n };\n ;\n Viewport.prototype.onTouchStart = function (ev) {\n this.lastTouchY = ev.touches[0].pageY;\n };\n ;\n Viewport.prototype.onTouchMove = function (ev) {\n var deltaY = this.lastTouchY - ev.touches[0].pageY;\n this.lastTouchY = ev.touches[0].pageY;\n if (deltaY === 0) {\n return;\n }\n this.viewportElement.scrollTop += deltaY;\n ev.preventDefault();\n };\n ;\n return Viewport;\n}());\nexports.Viewport = Viewport;\n\n//# sourceMappingURL=Viewport.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/Viewport.js\n// module id = 22\n// module chunks = 0","var map = {\n\t\"./attach/attach\": 4,\n\t\"./attach/attach.js\": 4,\n\t\"./attach/package.json\": 24,\n\t\"./fit/fit\": 5,\n\t\"./fit/fit.js\": 5,\n\t\"./fit/package.json\": 25,\n\t\"./fullscreen/fullscreen\": 6,\n\t\"./fullscreen/fullscreen.css\": 26,\n\t\"./fullscreen/fullscreen.js\": 6,\n\t\"./fullscreen/package.json\": 27,\n\t\"./terminado/package.json\": 28,\n\t\"./terminado/terminado\": 7,\n\t\"./terminado/terminado.js\": 7\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 23;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/addons ^\\.\\/.*$\n// module id = 23\n// module chunks = 0","module.exports = {\"name\":\"xterm.attach\",\"main\":\"attach.js\",\"private\":true}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/addons/attach/package.json\n// module id = 24\n// module chunks = 0","module.exports = {\"name\":\"xterm.fit\",\"main\":\"fit.js\",\"private\":true}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/addons/fit/package.json\n// module id = 25\n// module chunks = 0","module.exports = {\"name\":\"xterm.fullscreen\",\"main\":\"fullscreen.js\",\"private\":true}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/addons/fullscreen/package.json\n// module id = 27\n// module chunks = 0","module.exports = {\"name\":\"xterm.terminado\",\"main\":\"terminado.js\",\"private\":true}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/addons/terminado/package.json\n// module id = 28\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction prepareTextForTerminal(text, isMSWindows) {\n if (isMSWindows) {\n return text.replace(/\\r?\\n/g, '\\r');\n }\n return text;\n}\nexports.prepareTextForTerminal = prepareTextForTerminal;\nfunction copyHandler(ev, term, selectionManager) {\n if (term.browser.isMSIE) {\n window.clipboardData.setData('Text', selectionManager.selectionText);\n }\n else {\n ev.clipboardData.setData('text/plain', selectionManager.selectionText);\n }\n ev.preventDefault();\n}\nexports.copyHandler = copyHandler;\nfunction pasteHandler(ev, term) {\n ev.stopPropagation();\n var text;\n var dispatchPaste = function (text) {\n text = prepareTextForTerminal(text, term.browser.isMSWindows);\n term.handler(text);\n term.textarea.value = '';\n term.emit('paste', text);\n return term.cancel(ev);\n };\n if (term.browser.isMSIE) {\n if (window.clipboardData) {\n text = window.clipboardData.getData('Text');\n dispatchPaste(text);\n }\n }\n else {\n if (ev.clipboardData) {\n text = ev.clipboardData.getData('text/plain');\n dispatchPaste(text);\n }\n }\n}\nexports.pasteHandler = pasteHandler;\nfunction moveTextAreaUnderMouseCursor(ev, textarea) {\n textarea.style.position = 'fixed';\n textarea.style.width = '20px';\n textarea.style.height = '20px';\n textarea.style.left = (ev.clientX - 10) + 'px';\n textarea.style.top = (ev.clientY - 10) + 'px';\n textarea.style.zIndex = '1000';\n textarea.focus();\n setTimeout(function () {\n textarea.style.position = null;\n textarea.style.width = null;\n textarea.style.height = null;\n textarea.style.left = null;\n textarea.style.top = null;\n textarea.style.zIndex = null;\n }, 4);\n}\nexports.moveTextAreaUnderMouseCursor = moveTextAreaUnderMouseCursor;\nfunction rightClickHandler(ev, textarea, selectionManager) {\n moveTextAreaUnderMouseCursor(ev, textarea);\n textarea.value = selectionManager.selectionText;\n textarea.select();\n}\nexports.rightClickHandler = rightClickHandler;\n\n//# sourceMappingURL=Clipboard.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/handlers/Clipboard.js\n// module id = 29\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar EventEmitter_js_1 = require(\"../EventEmitter.js\");\nvar CharMeasure = (function (_super) {\n __extends(CharMeasure, _super);\n function CharMeasure(document, parentElement) {\n var _this = _super.call(this) || this;\n _this._document = document;\n _this._parentElement = parentElement;\n return _this;\n }\n Object.defineProperty(CharMeasure.prototype, \"width\", {\n get: function () {\n return this._width;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CharMeasure.prototype, \"height\", {\n get: function () {\n return this._height;\n },\n enumerable: true,\n configurable: true\n });\n CharMeasure.prototype.measure = function () {\n var _this = this;\n if (!this._measureElement) {\n this._measureElement = this._document.createElement('span');\n this._measureElement.style.position = 'absolute';\n this._measureElement.style.top = '0';\n this._measureElement.style.left = '-9999em';\n this._measureElement.textContent = 'W';\n this._measureElement.setAttribute('aria-hidden', 'true');\n this._parentElement.appendChild(this._measureElement);\n setTimeout(function () { return _this._doMeasure(); }, 0);\n }\n else {\n this._doMeasure();\n }\n };\n CharMeasure.prototype._doMeasure = function () {\n var geometry = this._measureElement.getBoundingClientRect();\n if (geometry.width === 0 || geometry.height === 0) {\n return;\n }\n if (this._width !== geometry.width || this._height !== geometry.height) {\n this._width = geometry.width;\n this._height = geometry.height;\n this.emit('charsizechanged');\n }\n };\n return CharMeasure;\n}(EventEmitter_js_1.EventEmitter));\nexports.CharMeasure = CharMeasure;\n\n//# sourceMappingURL=CharMeasure.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/utils/CharMeasure.js\n// module id = 30\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar EventEmitter_1 = require(\"../EventEmitter\");\nvar CircularList = (function (_super) {\n __extends(CircularList, _super);\n function CircularList(maxLength) {\n var _this = _super.call(this) || this;\n _this._array = new Array(maxLength);\n _this._startIndex = 0;\n _this._length = 0;\n return _this;\n }\n Object.defineProperty(CircularList.prototype, \"maxLength\", {\n get: function () {\n return this._array.length;\n },\n set: function (newMaxLength) {\n var newArray = new Array(newMaxLength);\n for (var i = 0; i < Math.min(newMaxLength, this.length); i++) {\n newArray[i] = this._array[this._getCyclicIndex(i)];\n }\n this._array = newArray;\n this._startIndex = 0;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CircularList.prototype, \"length\", {\n get: function () {\n return this._length;\n },\n set: function (newLength) {\n if (newLength > this._length) {\n for (var i = this._length; i < newLength; i++) {\n this._array[i] = undefined;\n }\n }\n this._length = newLength;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CircularList.prototype, \"forEach\", {\n get: function () {\n var _this = this;\n return function (callbackfn) {\n var i = 0;\n var length = _this.length;\n for (var i_1 = 0; i_1 < length; i_1++) {\n callbackfn(_this.get(i_1), i_1);\n }\n };\n },\n enumerable: true,\n configurable: true\n });\n CircularList.prototype.get = function (index) {\n return this._array[this._getCyclicIndex(index)];\n };\n CircularList.prototype.set = function (index, value) {\n this._array[this._getCyclicIndex(index)] = value;\n };\n CircularList.prototype.push = function (value) {\n this._array[this._getCyclicIndex(this._length)] = value;\n if (this._length === this.maxLength) {\n this._startIndex++;\n if (this._startIndex === this.maxLength) {\n this._startIndex = 0;\n }\n this.emit('trim', 1);\n }\n else {\n this._length++;\n }\n };\n CircularList.prototype.pop = function () {\n return this._array[this._getCyclicIndex(this._length-- - 1)];\n };\n CircularList.prototype.splice = function (start, deleteCount) {\n var items = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n items[_i - 2] = arguments[_i];\n }\n if (deleteCount) {\n for (var i = start; i < this._length - deleteCount; i++) {\n this._array[this._getCyclicIndex(i)] = this._array[this._getCyclicIndex(i + deleteCount)];\n }\n this._length -= deleteCount;\n }\n if (items && items.length) {\n for (var i = this._length - 1; i >= start; i--) {\n this._array[this._getCyclicIndex(i + items.length)] = this._array[this._getCyclicIndex(i)];\n }\n for (var i = 0; i < items.length; i++) {\n this._array[this._getCyclicIndex(start + i)] = items[i];\n }\n if (this._length + items.length > this.maxLength) {\n var countToTrim = (this._length + items.length) - this.maxLength;\n this._startIndex += countToTrim;\n this._length = this.maxLength;\n this.emit('trim', countToTrim);\n }\n else {\n this._length += items.length;\n }\n }\n };\n CircularList.prototype.trimStart = function (count) {\n if (count > this._length) {\n count = this._length;\n }\n this._startIndex += count;\n this._length -= count;\n this.emit('trim', count);\n };\n CircularList.prototype.shiftElements = function (start, count, offset) {\n if (count <= 0) {\n return;\n }\n if (start < 0 || start >= this._length) {\n throw new Error('start argument out of range');\n }\n if (start + offset < 0) {\n throw new Error('Cannot shift elements in list beyond index 0');\n }\n if (offset > 0) {\n for (var i = count - 1; i >= 0; i--) {\n this.set(start + i + offset, this.get(start + i));\n }\n var expandListBy = (start + count + offset) - this._length;\n if (expandListBy > 0) {\n this._length += expandListBy;\n while (this._length > this.maxLength) {\n this._length--;\n this._startIndex++;\n this.emit('trim', 1);\n }\n }\n }\n else {\n for (var i = 0; i < count; i++) {\n this.set(start + i + offset, this.get(start + i));\n }\n }\n };\n CircularList.prototype._getCyclicIndex = function (index) {\n return (this._startIndex + index) % this.maxLength;\n };\n return CircularList;\n}(EventEmitter_1.EventEmitter));\nexports.CircularList = CircularList;\n\n//# sourceMappingURL=CircularList.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/utils/CircularList.js\n// module id = 31\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar DomElementObjectPool = (function () {\n function DomElementObjectPool(type) {\n this.type = type;\n this._type = type;\n this._pool = [];\n this._inUse = {};\n }\n DomElementObjectPool.prototype.acquire = function () {\n var element;\n if (this._pool.length === 0) {\n element = this._createNew();\n }\n else {\n element = this._pool.pop();\n }\n this._inUse[element.getAttribute(DomElementObjectPool.OBJECT_ID_ATTRIBUTE)] = element;\n return element;\n };\n DomElementObjectPool.prototype.release = function (element) {\n if (!this._inUse[element.getAttribute(DomElementObjectPool.OBJECT_ID_ATTRIBUTE)]) {\n throw new Error('Could not release an element not yet acquired');\n }\n delete this._inUse[element.getAttribute(DomElementObjectPool.OBJECT_ID_ATTRIBUTE)];\n this._cleanElement(element);\n this._pool.push(element);\n };\n DomElementObjectPool.prototype._createNew = function () {\n var element = document.createElement(this._type);\n var id = DomElementObjectPool._objectCount++;\n element.setAttribute(DomElementObjectPool.OBJECT_ID_ATTRIBUTE, id.toString(10));\n return element;\n };\n DomElementObjectPool.prototype._cleanElement = function (element) {\n element.className = '';\n element.innerHTML = '';\n };\n return DomElementObjectPool;\n}());\nDomElementObjectPool.OBJECT_ID_ATTRIBUTE = 'data-obj-id';\nDomElementObjectPool._objectCount = 0;\nexports.DomElementObjectPool = DomElementObjectPool;\n\n//# sourceMappingURL=DomElementObjectPool.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/utils/DomElementObjectPool.js\n// module id = 32\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction contains(arr, el) {\n return arr.indexOf(el) >= 0;\n}\nexports.contains = contains;\n;\n\n//# sourceMappingURL=Generic.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/xterm/lib/utils/Generic.js\n// module id = 33\n// module chunks = 0","module.exports = hterm;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"hterm\"\n// module id = 34\n// module chunks = 0","module.exports = lib;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"lib\"\n// module id = 35\n// module chunks = 0"],"sourceRoot":""}