/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
/*!
  © Microsoft. All rights reserved.

  This library is supported for use in Windows Store apps only.

  Build: 1.0.9200.20602.win8_ldr.130108-1504
  
  Version: Microsoft.WinJS.1.0
*/
"undefined"==typeof WinJS&&(!function(e){e.setImmediate||(e.setImmediate="undefined"!=typeof process&&"function"==typeof process.nextTick?function(e){return process.nextTick(e)}:function(e){return setTimeout(e,0)})}(this),function(e,t){"use strict";function r(e,r){var n,o,i,s=Object.keys(r);for(o=0,i=s.length;i>o;o++){var a=s[o],c=95!==a.charCodeAt(0),u=r[a];!u||"object"!=typeof u||u.value===t&&"function"!=typeof u.get&&"function"!=typeof u.set?c?e[a]=u:(n=n||{},n[a]={value:u,enumerable:c,configurable:!0,writable:!0}):(u.enumerable===t&&(u.enumerable=c),n=n||{},n[a]=u)}n&&Object.defineProperties(e,n)}!function(t){function n(e,t,n){for(var o=e,i=t.split("."),s=0,a=i.length;a>s;s++){var c=i[s];o[c]||Object.defineProperty(o,c,{value:{},writable:!1,enumerable:!0,configurable:!0}),o=o[c]}return n&&r(o,n),o}function o(t,r){return n(e,t,r)}e[t]||(e[t]=Object.create(Object.prototype));var i=e[t];i.Namespace||(i.Namespace=Object.create(Object.prototype)),Object.defineProperties(i.Namespace,{defineWithParent:{value:n,writable:!0,enumerable:!0,configurable:!0},define:{value:o,writable:!0,enumerable:!0,configurable:!0}})}("WinJS"),function(e){function t(t,n,o){return t=t||function(){},e.Utilities.markSupportedForProcessing(t),n&&r(t.prototype,n),o&&r(t,o),t}function n(n,o,i,s){if(n){o=o||function(){};var a=n.prototype;return o.prototype=Object.create(a),e.Utilities.markSupportedForProcessing(o),Object.defineProperty(o.prototype,"constructor",{value:o,writable:!0,configurable:!0,enumerable:!0}),i&&r(o.prototype,i),s&&r(o,s),o}return t(o,i,s)}function o(e){e=e||function(){};var t,n;for(t=1,n=arguments.length;n>t;t++)r(e.prototype,arguments[t]);return e}e.Namespace.define("WinJS.Class",{define:t,derive:n,mix:o})}(e.WinJS)}(this),function(e,t){"use strict";function r(e){return e}function n(e,t,r){return e.split(".").reduce(function(e,t){return e?r(e[t]):null},t)}var o=!!e.Windows,i={notSupportedForProcessing:"Value is not supported within a declarative processing context, if you want it to be supported mark it using WinJS.Utilities.markSupportedForProcessing. The value was: '{0}'"};t.Namespace.define("WinJS.Utilities",{_setHasWinRT:{value:function(e){o=e},configurable:!1,writable:!1,enumerable:!1},hasWinRT:{get:function(){return o},configurable:!1,enumerable:!0},_getMemberFiltered:n,getMember:function(t,o){return t?n(t,o||e,r):null},ready:function(r,n){return new t.Promise(function(o,i){function s(){if(r)try{r(),o()}catch(e){i(e)}else o()}var a=t.Utilities.testReadyState;a||(a=e.document?document.readyState:"complete"),"complete"===a||e.document&&null!==document.body?n?e.setImmediate(s):s():e.addEventListener("DOMContentLoaded",s,!1)})},strictProcessing:{get:function(){return!0},configurable:!1,enumerable:!0},markSupportedForProcessing:{value:function(e){return e.supportedForProcessing=!0,e},configurable:!1,writable:!1,enumerable:!0},requireSupportedForProcessing:{value:function(r){var n=!0;switch(n=n&&!(r===e),n=n&&!(r===e.location),n=n&&!(r instanceof HTMLIFrameElement),n=n&&!("function"==typeof r&&!r.supportedForProcessing),e.frames.length){case 0:break;case 1:n=n&&!(r===e.frames[0]);break;default:for(var o=0,s=e.frames.length;n&&s>o;o++)n=n&&!(r===e.frames[o])}if(n)return r;throw new t.ErrorFromName("WinJS.Utilities.requireSupportedForProcessing",t.Resources._formatString(i.notSupportedForProcessing,r))},configurable:!1,writable:!1,enumerable:!0}}),t.Namespace.define("WinJS",{validation:!1,strictProcessing:{value:function(){},configurable:!1,writable:!1,enumerable:!1}})}(this,this.WinJS),function(e){"use strict";function t(e,t,r){var n=e;return"function"==typeof n&&(n=n()),(r&&i.test(r)?"":r?r+": ":"")+(t?t.replace(o,":")+": ":"")+n}function r(t,r,n){var o=e.Utilities.formatLog(t,r,n);console[n&&i.test(n)?n:"log"](o)}function n(e){return e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")}var o=/\s+/g,i=/^(error|warn|info|log)$/;e.Namespace.define("WinJS.Utilities",{startLog:function(t){t=t||{},"string"==typeof t&&(t={tags:t});var i=t.type&&new RegExp("^("+n(t.type).replace(o," ").split(" ").join("|")+")$"),s=t.excludeTags&&new RegExp("(^|\\s)("+n(t.excludeTags).replace(o," ").split(" ").join("|")+")(\\s|$)","i"),a=t.tags&&new RegExp("(^|\\s)("+n(t.tags).replace(o," ").split(" ").join("|")+")(\\s|$)","i"),c=t.action||r;if(!(i||s||a||e.log))return e.log=c,void 0;var u=function(e,t,r){i&&!i.test(r)||s&&s.test(t)||a&&!a.test(t)||c(e,t,r),u.next&&u.next(e,t,r)};u.next=e.log,e.log=u},stopLog:function(){delete e.log},formatLog:t})}(this.WinJS),function(e){"use strict";function t(e){var t="_on"+e+"state";return{get:function(){var e=this[t];return e&&e.userHandler},set:function(r){var n=this[t];r?(n||(n={wrapper:function(e){return n.userHandler(e)},userHandler:r},Object.defineProperty(this,t,{value:n,enumerable:!1,writable:!0,configurable:!0}),this.addEventListener(e,n.wrapper,!1)),n.userHandler=r):n&&(this.removeEventListener(e,n.wrapper,!1),this[t]=null)},enumerable:!0}}function r(){for(var e={},r=0,n=arguments.length;n>r;r++){var o=arguments[r];e["on"+o]=t(o)}return e}var n=e.Class.define(function(e,t,r){this.detail=t,this.target=r,this.timeStamp=Date.now(),this.type=e},{bubbles:{value:!1,writable:!1},cancelable:{value:!1,writable:!1},currentTarget:{get:function(){return this.target}},defaultPrevented:{get:function(){return this._preventDefaultCalled}},trusted:{value:!1,writable:!1},eventPhase:{value:0,writable:!1},target:null,timeStamp:null,type:null,preventDefault:function(){this._preventDefaultCalled=!0},stopImmediatePropagation:function(){this._stopImmediatePropagationCalled=!0},stopPropagation:function(){}},{supportedForProcessing:!1}),o={_listeners:null,addEventListener:function(e,t,r){r=r||!1,this._listeners=this._listeners||{};for(var n=this._listeners[e]=this._listeners[e]||[],o=0,i=n.length;i>o;o++){var s=n[o];if(s.useCapture===r&&s.listener===t)return}n.push({listener:t,useCapture:r})},dispatchEvent:function(e,t){var r=this._listeners&&this._listeners[e];if(r){var o=new n(e,t,this);r=r.slice(0,r.length);for(var i=0,s=r.length;s>i&&!o._stopImmediatePropagationCalled;i++)r[i].listener(o);return o.defaultPrevented||!1}return!1},removeEventListener:function(e,t,r){r=r||!1;var n=this._listeners&&this._listeners[e];if(n)for(var o=0,i=n.length;i>o;o++){var s=n[o];if(s.listener===t&&s.useCapture===r){n.splice(o,1),0===n.length&&delete this._listeners[e];break}}}};e.Namespace.define("WinJS.Utilities",{_createEventProperty:t,createEventProperties:r,eventMixin:o})}(this.WinJS),function(e,t,r){"use strict";var n,o=!1,i="contextchanged",s=t.Class.mix(t.Class.define(null,{},{supportedForProcessing:!1}),t.Utilities.eventMixin),a=new s,c={malformedFormatStringInput:"Malformed, did you mean to escape your '{0}'?"};t.Namespace.define("WinJS.Resources",{addEventListener:function(e,r,n){if(t.Utilities.hasWinRT&&!o&&e===i)try{Windows.ApplicationModel.Resources.Core.ResourceManager.current.defaultContext.qualifierValues.addEventListener("mapchanged",function(e){t.Resources.dispatchEvent(i,{qualifier:e.key,changed:e.target[e.key]})},!1),o=!0}catch(s){}a.addEventListener(e,r,n)},removeEventListener:a.removeEventListener.bind(a),dispatchEvent:a.dispatchEvent.bind(a),_formatString:function(e){var r=arguments;return r.length>1&&(e=e.replace(/({{)|(}})|{(\d+)}|({)|(})/g,function(e,n,o,i,s,a){if(s||a)throw t.Resources._formatString(c.malformedFormatStringInput,s||a);return n&&"{"||o&&"}"||r[(0|i)+1]})),e},_getStringWinRT:function(e){if(!n){var t=Windows.ApplicationModel.Resources.Core.ResourceManager.current.mainResourceMap;try{n=t.getSubtree("Resources")}catch(o){}n||(n=t)}var i,s,a;try{a=n.getValue(e),a&&(i=a.valueAsString,i===r&&(i=a.toString()))}catch(o){}if(!i)return{value:e,empty:!0};try{s=a.getQualifierValue("Language")}catch(o){return{value:i}}return{value:i,lang:s}},_getStringJS:function(t){var r=e.strings&&e.strings[t];return"string"==typeof r&&(r={value:r}),r||{value:t,empty:!0}}}),Object.defineProperties(t.Resources,t.Utilities.createEventProperties(i));var u;t.Resources.getString=function(e){return(u=u||(t.Utilities.hasWinRT?t.Resources._getStringWinRT:t.Resources._getStringJS))(e)}}(this,this.WinJS),function(e,t,r){"use strict";function n(){}function o(e,t){var r;r=t&&"object"==typeof t&&"function"==typeof t.then?j:W,e._value=t,e._setState(r)}function i(e,t,r,n,o,i){return{exception:e,error:t,promise:r,handler:i,id:n,parent:o}}function s(e,t,r,n){var o=r._isException,s=r._errorId;return i(o?t:null,o?null:t,e,s,r,n)}function a(e,t,r){var n=r._isException,o=r._errorId;return _(e,o,n),i(n?t:null,n?null:t,e,o,r)}function c(e,t){var r=++U;return _(e,r),i(null,t,e,r)}function u(e,t){var r=++U;return _(e,r,!0),i(t,null,e,r)}function l(e,t,r,n){g(e,{c:t,e:r,p:n})}function f(e,t,r,n){e._value=t,d(e,t,r,n),e._setState(z)}function p(e,t){var r=e._value,n=e._listeners;if(n){e._listeners=null;var o,i;for(o=0,i=Array.isArray(n)?n.length:1;i>o;o++){var s=1===i?n:n[o],a=s.c,c=s.promise;if(c){try{c._setCompleteValue(a?a(r):r)}catch(u){c._setExceptionValue(u)}c._state!==j&&c._listeners&&t.push(c)}else D.prototype.done.call(e,a)}}}function h(e,t){var r=e._value,n=e._listeners;if(n){e._listeners=null;var o,i;for(o=0,i=Array.isArray(n)?n.length:1;i>o;o++){var a=1===i?n:n[o],c=a.e,u=a.promise;if(u){try{c?(c.handlesOnError||d(u,r,s,e,c),u._setCompleteValue(c(r))):u._setChainedErrorValue(r,e)}catch(l){u._setExceptionValue(l)}u._state!==j&&u._listeners&&t.push(u)}else V.prototype.done.call(e,null,c)}}}function d(e,t,r,n,o){if(P._listeners[S]){if(t instanceof Error&&t.message===O)return;P.dispatchEvent(S,r(e,t,n,o))}}function m(e,t){var r=e._listeners;if(r){var n,o;for(n=0,o=Array.isArray(r)?r.length:1;o>n;n++){var i=1===o?r:r[n],s=i.p;if(s)try{s(t)}catch(a){}i.c||i.e||!i.promise||i.promise._progress(t)}}}function g(e,t){var r=e._listeners;r?(r=Array.isArray(r)?r:[r],r.push(t)):r=t,e._listeners=r}function _(e,t,r){e._isException=r||!1,e._errorId=t}function v(e,t,r,n){e._value=t,d(e,t,r,n),e._setState(H)}function y(e,t){var r;r=t&&"object"==typeof t&&"function"==typeof t.then?j:I,e._value=t,e._setState(r)}function b(e,t,r,n){var o=new F(e);return g(e,{promise:o,c:t,e:r,p:n}),o}function E(e){var r;return new t.Promise(function(t){e?r=setTimeout(t,e):setImmediate(t)},function(){r&&clearTimeout(r)})}function w(e,t){var r=function(){t.cancel()},n=function(){e.cancel()};return e.then(r),t.then(n,n),t}e.Debug&&(e.Debug.setNonUserCodeExceptions=!0);var x=t.Class.mix(t.Class.define(null,{},{supportedForProcessing:!1}),t.Utilities.eventMixin),P=new x;P._listeners={};var S="error",O="Canceled",M=!1,T={promise:1,thenPromise:2,errorPromise:4,exceptionPromise:8,completePromise:16};T.all=T.promise|T.thenPromise|T.errorPromise|T.exceptionPromise|T.completePromise;var C,R,j,A,k,L,W,I,z,H,U=1;C={name:"created",enter:function(e){e._setState(R)},cancel:n,done:n,then:n,_completed:n,_error:n,_notify:n,_progress:n,_setCompleteValue:n,_setErrorValue:n},R={name:"working",enter:n,cancel:function(e){e._setState(k)},done:l,then:b,_completed:o,_error:f,_notify:n,_progress:m,_setCompleteValue:y,_setErrorValue:v},j={name:"waiting",enter:function(e){var t=e._value,r=function(n){t._errorId?e._chainedError(n,t):(d(e,n,s,t,r),e._error(n))};r.handlesOnError=!0,t.then(e._completed.bind(e),r,e._progress.bind(e))},cancel:function(e){e._setState(A)},done:l,then:b,_completed:o,_error:f,_notify:n,_progress:m,_setCompleteValue:y,_setErrorValue:v},A={name:"waiting_canceled",enter:function(e){e._setState(L);var t=e._value;t.cancel&&t.cancel()},cancel:n,done:l,then:b,_completed:o,_error:f,_notify:n,_progress:m,_setCompleteValue:y,_setErrorValue:v},k={name:"canceled",enter:function(e){e._setState(L),e._cancelAction()},cancel:n,done:l,then:b,_completed:o,_error:f,_notify:n,_progress:m,_setCompleteValue:y,_setErrorValue:v},L={name:"canceling",enter:function(e){var t=new Error(O);t.name=t.message,e._value=t,e._setState(z)},cancel:n,done:n,then:n,_completed:n,_error:n,_notify:n,_progress:n,_setCompleteValue:n,_setErrorValue:n},W={name:"complete_notify",enter:function(e){if(e.done=D.prototype.done,e.then=D.prototype.then,e._listeners)for(var t,r=[e];r.length;)t=r.pop(),t._state._notify(t,r);e._setState(I)},cancel:n,done:null,then:null,_completed:n,_error:n,_notify:p,_progress:n,_setCompleteValue:n,_setErrorValue:n},I={name:"success",enter:function(e){e.done=D.prototype.done,e.then=D.prototype.then,e._cleanupAction()},cancel:n,done:null,then:null,_completed:n,_error:n,_notify:p,_progress:n,_setCompleteValue:n,_setErrorValue:n},z={name:"error_notify",enter:function(e){if(e.done=V.prototype.done,e.then=V.prototype.then,e._listeners)for(var t,r=[e];r.length;)t=r.pop(),t._state._notify(t,r);e._setState(H)},cancel:n,done:null,then:null,_completed:n,_error:n,_notify:h,_progress:n,_setCompleteValue:n,_setErrorValue:n},H={name:"error",enter:function(e){e.done=V.prototype.done,e.then=V.prototype.then,e._cleanupAction()},cancel:n,done:null,then:null,_completed:n,_error:n,_notify:h,_progress:n,_setCompleteValue:n,_setErrorValue:n};var N,q=t.Class.define(null,{_listeners:null,_nextState:null,_state:null,_value:null,cancel:function(){this._state.cancel(this),this._run()},done:function(e,t,r){this._state.done(this,e,t,r)},then:function(e,t,r){return this._state.then(this,e,t,r)},_chainedError:function(e,t){var r=this._state._error(this,e,a,t);return this._run(),r},_completed:function(e){var t=this._state._completed(this,e);return this._run(),t},_error:function(e){var t=this._state._error(this,e,c);return this._run(),t},_progress:function(e){this._state._progress(this,e)},_setState:function(e){this._nextState=e},_setCompleteValue:function(e){this._state._setCompleteValue(this,e),this._run()},_setChainedErrorValue:function(e,t){var r=this._state._setErrorValue(this,e,a,t);return this._run(),r},_setExceptionValue:function(e){var t=this._state._setErrorValue(this,e,u);return this._run(),t},_run:function(){for(;this._nextState;)this._state=this._nextState,this._nextState=null,this._state.enter(this)}},{supportedForProcessing:!1}),F=t.Class.derive(q,function(e){M&&(M===!0||M&T.thenPromise)&&(this._stack=t.Promise._getStack()),this._creator=e,this._setState(C),this._run()},{_creator:null,_cancelAction:function(){this._creator&&this._creator.cancel()},_cleanupAction:function(){this._creator=null}},{supportedForProcessing:!1}),V=t.Class.define(function(e){M&&(M===!0||M&T.errorPromise)&&(this._stack=t.Promise._getStack()),this._value=e,d(this,e,c)},{cancel:function(){},done:function(e,t){var r=this._value;if(t)try{t.handlesOnError||d(null,r,s,this,t);var n=t(r);return n&&"object"==typeof n&&"function"==typeof n.done&&n.done(),void 0}catch(o){r=o}r instanceof Error&&r.message===O||setImmediate(function(){throw r})},then:function(e,t){if(!t)return this;var r,n=this._value;try{t.handlesOnError||d(null,n,s,this,t),r=new D(t(n))}catch(o){r=o===n?this:new J(o)}return r}},{supportedForProcessing:!1}),J=t.Class.derive(V,function(e){M&&(M===!0||M&T.exceptionPromise)&&(this._stack=t.Promise._getStack()),this._value=e,d(this,e,u)},{},{supportedForProcessing:!1}),D=t.Class.define(function(e){if(M&&(M===!0||M&T.completePromise)&&(this._stack=t.Promise._getStack()),e&&"object"==typeof e&&"function"==typeof e.then){var r=new F(null);return r._setCompleteValue(e),r}this._value=e},{cancel:function(){},done:function(e){if(e)try{var t=e(this._value);t&&"object"==typeof t&&"function"==typeof t.done&&t.done()}catch(r){setImmediate(function(){throw r})}},then:function(e){try{var t=e?e(this._value):this._value;return t===this._value?this:new D(t)}catch(r){return new J(r)}}},{supportedForProcessing:!1}),$=t.Class.derive(q,function(e,r){M&&(M===!0||M&T.promise)&&(this._stack=t.Promise._getStack()),this._oncancel=r,this._setState(C),this._run();try{var n=this._completed.bind(this),o=this._error.bind(this),i=this._progress.bind(this);e(n,o,i)}catch(s){this._setExceptionValue(s)}},{_oncancel:null,_cancelAction:function(){try{if(!this._oncancel)throw new Error("Promise did not implement oncancel");this._oncancel()}catch(e){{e.message,e.stack}P.dispatchEvent("error",e)}},_cleanupAction:function(){this._oncancel=null}},{addEventListener:function(e,t,r){P.addEventListener(e,t,r)},any:function(e){return new $(function(r,n){{var o=Object.keys(e);Array.isArray(e)?[]:{}}0===o.length&&r();var i=0;o.forEach(function(s){$.as(e[s]).then(function(){r({key:s,value:e[s]})},function(a){return a instanceof Error&&a.name===O?(++i===o.length&&r(t.Promise.cancel),void 0):(n({key:s,value:e[s]}),void 0)})})},function(){var t=Object.keys(e);t.forEach(function(t){var r=$.as(e[t]);"function"==typeof r.cancel&&r.cancel()})})},as:function(e){return e&&"object"==typeof e&&"function"==typeof e.then?e:new D(e)},cancel:{get:function(){return N=N||new V(new t.ErrorFromName(O))}},dispatchEvent:function(e,t){return P.dispatchEvent(e,t)},is:function(e){return e&&"object"==typeof e&&"function"==typeof e.then},join:function(e){return new $(function(n,o,i){var s=Object.keys(e),a=Array.isArray(e)?[]:{},c=Array.isArray(e)?[]:{},u=0,l=s.length,f=function(e){if(0===--l){var r=Object.keys(a).length;if(0===r)n(c);else{var u=0;s.forEach(function(e){var t=a[e];t instanceof Error&&t.name===O&&u++}),u===r?n(t.Promise.cancel):o(a)}}else i({Key:e,Done:!0})};return s.forEach(function(t){var n=e[t];n===r?u++:$.then(n,function(e){c[t]=e,f(t)},function(e){a[t]=e,f(t)})}),l-=u,0===l?(n(c),void 0):void 0},function(){Object.keys(e).forEach(function(t){var r=$.as(e[t]);"function"==typeof r.cancel&&r.cancel()})})},removeEventListener:function(e,t,r){P.removeEventListener(e,t,r)},supportedForProcessing:!1,then:function(e,t,r,n){return $.as(e).then(t,r,n)},thenEach:function(e,t,r,n){var o=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(i){o[i]=$.as(e[i]).then(t,r,n)}),$.join(o)},timeout:function(e,t){var r=E(e);return t?w(r,t):r},wrap:function(e){return new D(e)},wrapError:function(e){return new V(e)},_veryExpensiveTagWithStack:{get:function(){return M},set:function(e){M=e}},_veryExpensiveTagWithStack_tag:T,_getStack:function(){if(Debug.debuggerEnabled)try{throw new Error}catch(e){return e.stack}}});Object.defineProperties($,t.Utilities.createEventProperties(S));var B=t.Class.derive(q,function(e){this._oncancel=e,this._setState(C),this._run()},{_cancelAction:function(){this._oncancel&&this._oncancel()},_cleanupAction:function(){this._oncancel=null}},{supportedForProcessing:!1}),G=t.Class.define(function(e){this._promise=new B(e)},{promise:{get:function(){return this._promise}},cancel:function(){this._promise.cancel()},complete:function(e){this._promise._completed(e)},error:function(e){this._promise._error(e)},progress:function(e){this._promise._progress(e)}},{supportedForProcessing:!1});t.Namespace.define("WinJS",{Promise:$,_Signal:G})}(this,this.WinJS),function(e,t){"use strict";t.Namespace.define("WinJS",{ErrorFromName:t.Class.derive(Error,function(e,t){this.name=e,this.message=t||e},{},{supportedForProcessing:!1})})}(this,this.WinJS),function(e){"use strict";e.Namespace.define("WinJS",{xhr:function(t){var r;return new e.Promise(function(e,n,o){r=new XMLHttpRequest,r.onreadystatechange=function(){r._canceled||(4===r.readyState?(r.status>=200&&r.status<300||1223===r.status?e(r):n(r),r.onreadystatechange=function(){}):o(r))},r.open(t.type||"GET",t.url,!0,t.user,t.password),r.responseType=t.responseType||"",Object.keys(t.headers||{}).forEach(function(e){r.setRequestHeader(e,t.headers[e])}),t.customRequestInitializer&&t.customRequestInitializer(r),r.send(t.data)},function(){r._canceled=!0,r.abort()})}})}(this.WinJS),function(e,t){"use strict";var r,n,o,i,s,a,c={nonStaticHTML:"Unable to add dynamic content. A script attempted to inject dynamic content, or elements previously modified dynamically, that might be unsafe. For example, using the innerHTML property or the document.write method to add a script element will generate this exception. If the content is safe and from a trusted source, use a method to explicitly manipulate elements and attributes, such as createElement, or use setInnerHTMLUnsafe (or other unsafe method)."};r=n=function(e,t){e.innerHTML=t},o=i=function(e,t){e.outerHTML=t},s=a=function(e,t,r){e.insertAdjacentHTML(t,r)};var u=e.MSApp;if(u)n=function(e,t){u.execUnsafeLocalFunction(function(){e.innerHTML=t})},i=function(e,t){u.execUnsafeLocalFunction(function(){e.outerHTML=t})},a=function(e,t,r){u.execUnsafeLocalFunction(function(){e.insertAdjacentHTML(t,r)})};else if(e.msIsStaticHTML){var l=function(r){if(!e.msIsStaticHTML(r))throw new t.ErrorFromName("WinJS.Utitilies.NonStaticHTML",c.nonStaticHTML)};r=function(e,t){l(t),e.innerHTML=t},o=function(e,t){l(t),e.outerHTML=t},s=function(e,t,r){l(r),e.insertAdjacentHTML(t,r)}}t.Namespace.define("WinJS.Utilities",{setInnerHTML:r,setInnerHTMLUnsafe:n,setOuterHTML:o,setOuterHTMLUnsafe:i,insertAdjacentHTML:s,insertAdjacentHTMLUnsafe:a})}(this,this.WinJS)),function(e){"undefined"==typeof exports&&"function"==typeof define&&define.amd?define("vs/base/common/winjs.base.raw",e.WinJS):module.exports=e.WinJS}(this),define("vs/base/common/types",["require","exports"],function(e,t){function r(e){return Array.isArray?Array.isArray(e):e&&"number"==typeof e.length&&e.constructor===Array?!0:!1}function n(e){return"string"==typeof e||e instanceof String?!0:!1}function o(e){return"undefined"==typeof e||null===e?!1:"[object Object]"===Object.prototype.toString.call(e)}function i(e){return("number"==typeof e||e instanceof Number)&&!isNaN(e)?!0:!1}function s(e){return e===!0||e===!1}function a(e){return"undefined"==typeof e}function c(e){return a(e)||null===e}function u(e){if(!o(e))return!1;for(var t in e)if(h.call(e,t))return!1;return!0}function l(e){return"[object Function]"===Object.prototype.toString.call(e)}function f(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return e&&e.length>0&&e.every(function(e){return l(e)})}function p(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=Object.create(e.prototype);return e.apply(n,t),n}t.isArray=r,t.isString=n,t.isObject=o,t.isNumber=i,t.isBoolean=s,t.isUndefined=a,t.isUndefinedOrNull=c;var h=Object.prototype.hasOwnProperty;t.isEmptyObject=u,t.isFunction=l,t.areFunctions=f,t.create=p}),define("vs/base/common/objects",["require","exports","vs/base/common/types"],function(e,t,r){function n(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;var t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(r){t[r]=e[r]&&"object"==typeof e[r]?n(e[r]):e[r]}),t}function o(e){if(!e||"object"!=typeof e)return e;var t=Array.isArray(e)?[]:{};return Object.getOwnPropertyNames(e).forEach(function(r){t[r]=e[r]&&"object"==typeof e[r]?o(e[r]):e[r]}),t}function i(e,t){return s(e,t,[])}function s(e,t,n){if(r.isUndefinedOrNull(e))return e;var o=t(e);if("undefined"!=typeof o)return o;if(r.isArray(e)){for(var i=[],a=0;a<e.length;a++)i.push(s(e[a],t,n));return i}if(r.isObject(e)){if(n.indexOf(e)>=0)throw new Error("Cannot clone recursive data-structure");n.push(e);var c={};for(var u in e)_.call(e,u)&&(c[u]=s(e[u],t,n));return n.pop(),c}return e}function a(e,t,n){return void 0===n&&(n=!0),r.isObject(e)?(r.isObject(t)&&Object.keys(t).forEach(function(o){o in e?n&&(r.isObject(e[o])&&r.isObject(t[o])?a(e[o],t[o],n):e[o]=t[o]):e[o]=t[o]}),e):t}function c(e,t){return Object.keys(t).forEach(function(r){return e[r]=t[r]}),e}function u(e,t){return a(n(t),e||{})}function l(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;var r,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(r=0;r<e.length;r++)if(!l(e[r],t[r]))return!1}else{var o=[];for(n in e)o.push(n);o.sort();var i=[];for(n in t)i.push(n);if(i.sort(),!l(o,i))return!1;for(r=0;r<o.length;r++)if(!l(e[o[r]],t[o[r]]))return!1}return!0}function f(e,t,r){"undefined"==typeof e[t]&&(e[t]=r)}function p(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=!0;return t}function h(e,t){void 0===t&&(t=!1),t&&(e=e.map(function(e){return e.toLowerCase()}));var r=p(e);return t?function(e){return void 0!==r[e.toLowerCase()]&&r.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==r[e]&&r.hasOwnProperty(e)}}function d(e,t){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t=t||function(){};var n=e.prototype,o=t.prototype;t.prototype=Object.create(n);for(var r in o)o.hasOwnProperty(r)&&Object.defineProperty(t.prototype,r,Object.getOwnPropertyDescriptor(o,r));Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,configurable:!0,enumerable:!0})}function m(e){var t=[];return JSON.stringify(e,function(e,n){if(r.isObject(n)||Array.isArray(n)){if(-1!==t.indexOf(n))return"[Circular]";t.push(n)}return n})}var g=function(){function e(e,t){this.first=e,this.second=t}return e}();t.Tuple=g,t.clone=n,t.deepClone=o;var _=Object.prototype.hasOwnProperty;t.cloneAndChange=i,t.mixin=a,t.assign=c,t.withDefaults=u,t.equals=l,t.ensureProperty=f,t.arrayToHash=p,t.createKeywordMatcher=h,t.derive=d,t.safeStringify=m}),define("vs/base/common/platform",["require","exports"],function(e,t){function r(){return"undefined"!=typeof f.Worker}var n=!1,o=!1,i=!1,s=!1,a=!1,c=!1;if("object"==typeof process)n="win32"===process.platform,o="darwin"===process.platform,i="linux"===process.platform,s=!0;else if("object"==typeof navigator){var u=navigator.userAgent;n=u.indexOf("Windows")>=0,o=u.indexOf("Macintosh")>=0,i=u.indexOf("Linux")>=0,a=!0,c=!!self.QUnit}!function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(t.Platform||(t.Platform={}));var l=t.Platform;t._platform=l.Web,s&&(o?t._platform=l.Mac:n?t._platform=l.Windows:i&&(t._platform=l.Linux)),t.isWindows=n,t.isMacintosh=o,t.isLinux=i,t.isNative=s,t.isWeb=a,t.isQunit=c,t.platform=t._platform;var f="object"==typeof self?self:global;t.globals=f,t.hasWebWorkerSupport=r,t.setTimeout=f.setTimeout.bind(f),t.clearTimeout=f.clearTimeout.bind(f),t.setInterval=f.setInterval.bind(f),t.clearInterval=f.clearInterval.bind(f)}),define("vs/base/common/strings",["require","exports","vs/nls!vs/base/common/worker/workerServer"],function(e,t,r){function n(e,t,r){void 0===r&&(r="0");for(var n=""+e,o=[n],i=n.length;t>i;i++)o.push(r);return o.reverse().join("")}function o(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return 0===t.length?e:e.replace(J,function(e,r){var n=parseInt(r,10);return isNaN(n)||0>n||n>=t.length?e:t[n]})}function i(e){return void 0===e&&(e=new Date),r.localize("vs_base_common_strings",0,n(e.getMonth()+1,2),n(e.getDate(),2),n(e.getFullYear(),4),n(e.getHours(),2),n(e.getMinutes(),2),n(e.getSeconds(),2))}function s(e){return void 0===e&&(e=new Date),r.localize("vs_base_common_strings",1,n(e.getHours(),2),n(e.getMinutes(),2),n(e.getSeconds(),2))}function a(e){return e.replace(/[<|>|&]/g,function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}})}function c(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}function u(e,t,r){return e.replace(new RegExp(c(t.toString()),"g"),r)}function l(e,t){void 0===t&&(t=" ");var r=f(e,t);return p(r,t)}function f(e,t){if(!e||!t)return e;var r=t.length;if(0===r||0===e.length)return e;for(var n=0,o=-1;(o=e.indexOf(t,n))===n;)n+=r;return e.substring(n)}function p(e,t){if(!e||!t)return e;var r=t.length,n=e.length;if(0===r||0===n)return e;for(var o=n,i=-1;;){if(i=e.lastIndexOf(t,o-1),-1===i||i+r!==o)break;if(0===i)return"";o=i}return e.substring(0,o)}function h(e){return e.replace(/(^\s+|\s+$)/g,"")}function d(e){return e.replace(/\s+/g," ")}function m(e){var t=(new Date).getTime(),n=(t-e)/1e3;if(60>n)return r.localize("vs_base_common_strings",2,Math.floor(n));var o=n/60;if(60>o)return r.localize("vs_base_common_strings",3,Math.floor(o));var i=o/60;if(24>i)return r.localize("vs_base_common_strings",4,Math.floor(i));var s=i/24;return r.localize("vs_base_common_strings",5,Math.floor(s))}function g(e){var t=(new Date).getTime(),n=(t-e)/1e3;if(60>n)return r.localize("vs_base_common_strings",6);var o=n/60;if(60>o)return 1===Math.floor(o)?r.localize("vs_base_common_strings",7):r.localize("vs_base_common_strings",8,Math.floor(o));var i=o/60;if(24>i)return 1===Math.floor(i)?r.localize("vs_base_common_strings",9):r.localize("vs_base_common_strings",10,Math.floor(i));var s=i/24;return 1===Math.floor(s)?r.localize("vs_base_common_strings",11):s>6&&8>s?r.localize("vs_base_common_strings",12):s>30&&40>s?r.localize("vs_base_common_strings",13):r.localize("vs_base_common_strings",14,Math.floor(s))}function _(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function v(e){return u(e,"*","")}function y(e,t){if(e.length<t.length)return!1;for(var r=0;r<t.length;r++)if(e[r]!==t[r])return!1;return!0}function b(e,t){var r=e.length-t.length;return r>0?e.lastIndexOf(t)===e.length-t.length:0===r?e===t:!1}function E(e,t,r,n){return void 0===n&&(n=""),e.substring(0,t)+n+e.substring(t+r)}function w(e,t,r,n){if(""===e)throw new Error("Cannot create regex from empty string");t||(e=e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")),n&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var o="g";return r||(o+="i"),new RegExp(e,o)}function x(e){var t=e.exec("");return t&&0===e.lastIndex}function P(e,t){if(!e)return e;if(t){for(var r=e.split("/"),n=0,o=r.length;o>n;n++)r[n]=encodeURIComponent(r[n]);return r.join("/")}return encodeURIComponent(e)}function S(e){return/^\w[\w.]*$/.test(e)}function O(e){return!e||!e.trim()}function M(e,t,r){return t&&(e="^"+e),r&&(e+="$"),e}function T(e,t){if(x(new RegExp(e,t)))throw new Error("Regular expression /"+e+"/g results in infinitive matches")}function C(e){return e?(0===e.indexOf("/")&&(e=e.substring(1)),P(e,!0)):""}function R(e,t){return"["+e+"m"+t+"[0m"}function j(e){for(var t=0,r=e.length;r>t;t++)if(" "!==e.charAt(t)&&"	"!==e.charAt(t))return t;return-1}function A(e){for(var t=0,r=e.length;r>t;t++)if(" "!==e.charAt(t)&&"	"!==e.charAt(t))return e.substring(0,t);return e}function k(e){for(var t=e.length-1;t>=0;t--)if(" "!==e.charAt(t)&&"	"!==e.charAt(t))return t;return-1}function L(e,t){return e.localeCompare(t)}function W(e){return e>=97&&122>=e||e>=65&&90>=e}function I(e,t){var r=e.length,n=t.length;if(r!==n)return!1;for(var o=0;r>o;o++){var i=e.charCodeAt(o),s=t.charCodeAt(o);if(i!==s)if(W(i)&&W(s)){var a=Math.abs(i-s);if(0!==a&&32!==a)return!1}else if(String.fromCharCode(i).toLocaleLowerCase()!==String.fromCharCode(s).toLocaleLowerCase())return!1}return!0}function z(e,t){var r,n=Math.min(e.length,t.length);for(r=0;n>r;r++)if(e.charCodeAt(r)!==t.charCodeAt(r))return r;return n}function H(e,t){var r,n=Math.min(e.length,t.length),o=e.length-1,i=t.length-1;for(r=0;n>r;r++)if(e.charCodeAt(o-r)!==t.charCodeAt(i-r))return r;return n}function U(e,t,r){void 0===r&&(r=4);var n=Math.abs(e.length-t.length);if(n>r)return 0;var o,i,s=[],a=[];for(o=0;o<t.length+1;++o)a.push(0);for(o=0;o<e.length+1;++o)s.push(a);for(o=1;o<e.length+1;++o)for(i=1;i<t.length+1;++i)s[o][i]=e[o-1]===t[i-1]?s[o-1][i-1]+1:Math.max(s[o-1][i],s[o][i-1]);return s[e.length][t.length]-Math.sqrt(n)}function N(e){for(var t,r=/\r\n|\r|\n/g,n=[0];t=r.exec(e);)n.push(r.lastIndex);return n}function q(e,r){if(e.length<r)return e;for(var n=e.split(/\b/),o=0,i=n.length-1;i>=0;i--)if(o+=n[i].length,o>r){n.splice(0,i);break}return n.join(t.empty).replace(/^\s/,t.empty)}function F(e){return e&&(e=e.replace(D,""),e=e.replace($,"\n"),e=e.replace(B,""),e=e.replace(G,"")),e}function V(e){return e&&e.length>0&&e.charCodeAt(0)===Y}t.empty="",t.pad=n;var J=/{(\d+)}/g;t.format=o,t.formatDate=i,t.formatTime=s,t.escape=a,t.escapeRegExpCharacters=c,t.replaceAll=u,t.trim=l,t.ltrim=f,t.rtrim=p,t.trimWhitespace=h,t.normalize=d,t.conciseformatDiff=m,t.verboseformatDiff=g,t.convertSimple2RegExpPattern=_,t.stripWildcards=v,t.startsWith=y,t.endsWith=b,t.splice=E,t.createRegExp=w,t.regExpLeadsToEndlessLoop=x,t.encodeURIPart=P,t.isCamelCasePattern=S,t.isFalsyOrWhitespace=O,t.anchorPattern=M,t.assertRegExp=T,t.normalizePath=C,t.colorize=R,t.firstNonWhitespaceIndex=j,t.getLeadingWhitespace=A,t.lastNonWhitespaceIndex=k,t.localeCompare=L,t.equalsIgnoreCase=I,t.commonPrefixLength=z,t.commonSuffixLength=H,t.difference=U,t.computeLineStarts=N,t.lcut=q;
var D=/\x1B\x5B[12]?K/g,$=/\xA/g,B=/\x1b\[\d+m/g,G=/\x1b\[0?m/g;t.removeAnsiEscapeCodes=F;var Y=65279;t.UTF8_BOM_CHARACTER=String.fromCharCode(Y),t.startsWithUTF8BOM=V}),define("vs/base/common/errors",["require","exports","vs/nls!vs/base/common/worker/workerServer","vs/base/common/objects","vs/base/common/platform","vs/base/common/types","vs/base/common/strings"],function(e,t,r,n,o,i,s){function a(e){t.errorHandler.setUnexpectedErrorHandler(e)}function c(e){d(e)||t.errorHandler.onUnexpectedError(e)}function u(e){if(!(e instanceof Error))return e;var t={};return e.stacktrace?t.stack=e.stacktrace:e.stack&&(t.stack=e.stack),t.message=e.toString(),t}function l(e,t){var r=new w(e);return t?r.verboseMessage:r.message}function f(e,t){return t&&e.message&&(e.stack||e.stacktrace)?r.localize("vs_base_common_errors",7,e.message,e.stack||e.stacktrace):e.message?e.message:r.localize("vs_base_common_errors",8)}function p(e,t){if(void 0===e&&(e=null),void 0===t&&(t=!1),!e)return r.localize("vs_base_common_errors",9);if(i.isString(e))return e;if(!i.isUndefinedOrNull(e.status))return l(e,t);if(e.detail){var n=e.detail;if(n.error){if(n.error&&!i.isUndefinedOrNull(n.error.status))return l(n.error,t);if(!i.isArray(n.error))return f(n.error,t);for(var o=0;o<n.error.length;o++)if(n.error[o]&&!i.isUndefinedOrNull(n.error[o].status))return l(n.error[o],t)}if(n.exception)return i.isUndefinedOrNull(n.exception.status)?f(n.exception,t):l(n.exception,t)}return e.stack?f(e,t):e.message?e.message:r.localize("vs_base_common_errors",10)}function h(e){if(e)if(i.isArray(e)){for(var t=0;t<e.length;t++)if(e[t]&&e[t].status)return e[t].status}else if(e.status)return e.status;return-1}function d(e){return e instanceof Error&&e.name===x&&e.message===x}function m(){var e=new Error(x);return e.name=e.message,e}function g(){return new Error(r.localize("vs_base_common_errors",11))}function _(e){return e?new Error(r.localize("vs_base_common_errors",12,e)):new Error(r.localize("vs_base_common_errors",13))}function v(e){return e?new Error(r.localize("vs_base_common_errors",14,e)):new Error(r.localize("vs_base_common_errors",15))}function y(e){return o.isWeb?new Error(r.localize("vs_base_common_errors",16)):new Error(r.localize("vs_base_common_errors",17,JSON.stringify(e)))}function b(e,t){void 0===t&&(t=null);var r=new Error(e);return t&&(r.actions=t),r}var E=function(){function e(){this.listeners=[],this.unexpectedErrorHandler=function(e){o.setTimeout(function(){if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e},0)}}return e.prototype.addListener=function(e){var t=this;return this.listeners.push(e),function(){t._removeListener(e)}},e.prototype.emit=function(e){this.listeners.forEach(function(t){t(e)})},e.prototype._removeListener=function(e){this.listeners.splice(this.listeners.indexOf(e),1)},e.prototype.setUnexpectedErrorHandler=function(e){this.unexpectedErrorHandler=e},e.prototype.getUnexpectedErrorHandler=function(){return this.unexpectedErrorHandler},e.prototype.onUnexpectedError=function(e){this.unexpectedErrorHandler(e),this.emit(e)},e}();t.ErrorHandler=E,t.errorHandler=new E,t.setUnexpectedErrorHandler=a,t.onUnexpectedError=c,t.transformErrorForSerialization=u;var w=function(){function e(e){this.status=e.status,this.statusText=e.statusText,this.name="ConnectionError";try{this.responseText=e.responseText}catch(t){this.responseText=""}if(this.errorMessage=null,this.errorCode=null,this.errorObject=null,this.responseText)try{var r=JSON.parse(this.responseText);this.errorMessage=r.message,this.errorCode=r.code,this.errorObject=r}catch(n){}}return Object.defineProperty(e.prototype,"message",{get:function(){return this.connectionErrorToMessage(this,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"verboseMessage",{get:function(){return this.connectionErrorToMessage(this,!0)},enumerable:!0,configurable:!0}),e.prototype.connectionErrorDetailsToMessage=function(e,t){var n=e.errorCode,o=e.errorMessage;return null!==n&&null!==o?r.localize("vs_base_common_errors",0,s.rtrim(o,"."),n):null!==o?o:t&&null!==e.responseText?e.responseText:null},e.prototype.connectionErrorToMessage=function(e,t){var n=this.connectionErrorDetailsToMessage(e,t);return 401===e.status?null!==n?r.localize("vs_base_common_errors",1,n):r.localize("vs_base_common_errors",2):n?n:e.status>0&&null!==e.statusText?t&&null!==e.responseText&&e.responseText.length>0?r.localize("vs_base_common_errors",3,e.statusText,e.status,e.responseText):r.localize("vs_base_common_errors",4,e.statusText,e.status):t&&null!==e.responseText&&e.responseText.length>0?r.localize("vs_base_common_errors",5,e.responseText):r.localize("vs_base_common_errors",6)},e}();t.ConnectionError=w,n.derive(Error,w),t.toErrorMessage=p,t.getHttpStatus=h;var x="Canceled";t.isPromiseCanceledError=d,t.canceled=m,t.notImplemented=g,t.illegalArgument=_,t.illegalState=v,t.loaderError=y,t.error=b}),define("vs/base/common/winjs.base",["./winjs.base.raw","vs/base/common/errors","vs/base/common/platform"],function(e,t,r){"use strict";function n(e){if(!r.isNative){var n=e.detail,o=n.id;if(n.parent)return n.handler&&s&&delete s[o],void 0;s[o]=n,1===Object.keys(s).length&&setTimeout(function(){var e=s;s={},Object.keys(e).forEach(function(r){var n=e[r];n.exception?t.onUnexpectedError(n.exception):n.error&&t.onUnexpectedError(n.error),console.log("WARNING: Promise with no error callback:"+n.id),console.log(n),n.exception&&console.log(n.exception.stack)})},0)}}function o(e,t,r){var n,o,s,a=new i.Promise(function(e,t,r){n=e,o=t,s=r},function(){e.cancel()});return e.then(function(e){t&&t(e),n(e)},function(e){r&&r(e),o(e)},s),a}var i=e,s={};return i.Promise.addEventListener("error",n),{decoratePromise:o,Class:i.Class,xhr:i.xhr,Promise:i.Promise,TPromise:i.Promise,PPromise:i.Promise,Utilities:i.Utilities}}),define("vs/base/common/worker/workerProtocol",["require","exports","vs/base/common/winjs.base"],function(e,t,r){t.MessageType={INITIALIZE:"$initialize",REPLY:"$reply",PRINT:"$print"},t.ReplyType={COMPLETE:"complete",ERROR:"error",PROGRESS:"progress"},t.PrintType={LOG:"log",DEBUG:"debug",INFO:"info",WARN:"warn",ERROR:"error"};var n=function(){function e(e){this._requester=e,this._bigHandler=null}return e.prototype.callOnRemote=function(e,t,r){return this._requester.request("_proxyObj",{proxyId:e,path:t,args:r})},e.prototype.registerBigHandler=function(e){this._bigHandler=e},e.prototype.handleMessage=function(e){if(!this._bigHandler)throw new Error("got message before big handler attached!");return this._invokeHandler(e.proxyId,e.path,e.args)},e.prototype._invokeHandler=function(e,t,n){try{return r.TPromise.as(this._bigHandler.handle(e,t,n))}catch(o){return r.Promise.wrapError(o)}},e}();t.RemoteCom=n}),define("vs/base/common/remote",["require","exports"],function(e,t){function r(e,t,r){var o={$__IS_REMOTE_OBJ:!0};for(var i in r.prototype)"function"==typeof r.prototype[i]&&(o[i]=n(e,t,i));return o}function n(e,t,r){return function(){for(var n=[],o=0;o<arguments.length;o++)n[o-0]=arguments[o];return e.callOnRemote(t,r,n)}}var o=Object.prototype.hasOwnProperty;t.createProxyFromCtor=r;var i=function(){function e(e){this._remoteCom=e}return e.prototype.canSerialize=function(e){return"string"==typeof e.$__CREATE__PROXY__REQUEST},e.prototype.serialize=function(e,t){for(var r={methods:[],props:{}},n=Object.keys(e),o=0;o<n.length;o++){var i=n[o];"function"==typeof e[i]?r.methods.push(i):r.props[i]=t(e[i])}return{$isProxyDescriptor:!0,proxyId:e.$__CREATE__PROXY__REQUEST,desc:r}},e.prototype.canDeserialize=function(e){return e.$isProxyDescriptor===!0},e.prototype.deserialize=function(e,t){for(var r={$__IS_REMOTE_OBJ:!0},i=e.desc.methods,s=0;s<i.length;s++)r[i[s]]=n(this._remoteCom,e.proxyId,i[s]);var a=e.desc.props;for(var c in a)o.call(a,c)&&(r[c]=t(a[c]));return r},e}();t.ProxiesMarshallingContribution=i}),define("vs/base/common/marshalling",["require","exports","vs/base/common/objects","vs/base/common/types"],function(e,t,r,n){function o(e){u.push(e)}function i(e){return r.cloneAndChange(e,function(e){if("object"==typeof e){for(var t=0;t<u.length;t++){var r=u[t];if(r.canSerialize(e))return r.serialize(e,i)}if(l&&l.canSerialize(e))return l.serialize(e,i)}return void 0})}function s(e){return r.cloneAndChange(e,function(e){if(n.isObject(e)){for(var t=0;t<u.length;t++){var r=u[t];if(r.canDeserialize(e))return r.deserialize(e,s)}if(l&&l.canDeserialize(e))return l.deserialize(e,s)}return void 0})}function a(e,t){void 0===t&&(t=null),l=t;var r=JSON.stringify(i(e));return l=null,r}function c(e,t){void 0===t&&(t=null),l=t;var r=s(JSON.parse(e));return l=null,r}var u=[];t.registerMarshallingContribution=o;var l=null;t.serialize=i,t.deserialize=s,o({canSerialize:function(e){return e instanceof RegExp},serialize:function(e){var t="";return e.global?t+="g":e.ignoreCase?t+="i":e.multiline&&(t+="m"),{$isRegExp:!0,source:e.source,flags:t}},canDeserialize:function(e){return e.$isRegExp},deserialize:function(e){return new RegExp(e.source,e.flags)}}),t.marshallObject=a,t.demarshallObject=c}),define("vs/base/common/worker/workerServer",["require","exports","vs/base/common/winjs.base","vs/base/common/worker/workerProtocol","vs/base/common/errors","vs/base/common/remote","vs/base/common/marshalling"],function(e,t,r,n,o,i,s){function a(e){return new c(e)}var c=function(){function t(e){this._postSerializedMessage=e,this._workerId=0,this._requestHandler=null,this._lastReq=0,this._awaitedReplies={},this._bindConsole(),this._remoteCom=new n.RemoteCom(this),this._proxiesMarshalling=new i.ProxiesMarshallingContribution(this._remoteCom)}return t.prototype.getRemoteCom=function(){return this._remoteCom},t.prototype._bindConsole=function(){self.console={log:this._sendPrintMessage.bind(this,n.PrintType.LOG),debug:this._sendPrintMessage.bind(this,n.PrintType.DEBUG),info:this._sendPrintMessage.bind(this,n.PrintType.INFO),warn:this._sendPrintMessage.bind(this,n.PrintType.WARN),error:this._sendPrintMessage.bind(this,n.PrintType.ERROR)},o.setUnexpectedErrorHandler(function(e){self.console.error(e)})},t.prototype._sendPrintMessage=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=t.map(function(e){return e instanceof Error?o.transformErrorForSerialization(e):e}),s={monacoWorker:!0,from:this._workerId,req:"0",type:n.MessageType.PRINT,level:e,payload:1===i.length?i[0]:i};this._postMessage(s)},t.prototype._sendReply=function(e,t,r){var i={monacoWorker:!0,from:this._workerId,req:"0",id:e,type:n.MessageType.REPLY,action:t,payload:r instanceof Error?o.transformErrorForSerialization(r):r};this._postMessage(i)},t.prototype.request=function(e,t){if("$"===e.charAt(0))throw new Error("Illegal requestName: "+e);var n=String(++this._lastReq),o={monacoWorker:!0,from:this._workerId,req:n,type:e,payload:t},i={c:null,e:null,p:null},s=new r.Promise(function(e,t,r){i.c=e,i.e=t,i.p=r});return this._awaitedReplies[n]=i,this._postMessage(o),s},t.prototype.loadModule=function(t,r,n){e([t],function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];r(e[0])},n)},t.prototype.onmessage=function(e){this._onmessage(s.demarshallObject(e,this._proxiesMarshalling))},t.prototype._postMessage=function(e){this._postSerializedMessage(s.marshallObject(e,this._proxiesMarshalling))},t.prototype._onmessage=function(e){var t=this;if(e.type===n.MessageType.REPLY){var r=e;if(!r.seq||!this._awaitedReplies.hasOwnProperty(r.seq))return console.error("Worker received unexpected reply from main thread",e),void 0;var o=this._awaitedReplies[r.seq];return delete this._awaitedReplies[r.seq],r.err?o.e(r.err):o.c(r.payload),void 0}var i=this._sendReply.bind(this,e.id,n.ReplyType.COMPLETE),s=this._sendReply.bind(this,e.id,n.ReplyType.ERROR),a=this._sendReply.bind(this,e.id,n.ReplyType.PROGRESS);switch(e.type){case n.MessageType.INITIALIZE:this._workerId=e.payload.id;var c=e.payload.loaderConfiguration;c&&("undefined"!=typeof c.baseUrl&&delete c.baseUrl,"undefined"!=typeof c.paths&&"undefined"!=typeof c.paths.vs&&delete c.paths.vs,c.catchError=!0,self.require.config(c));var u=e.payload.MonacoEnvironment;u&&(self.MonacoEnvironment=u),this.loadModule(e.payload.moduleId,function(e){t._requestHandler=e.value,i()},s);break;default:this._handleMessage(e,i,s,a)}},t.prototype._handleMessage=function(e,t,r,n){if("_proxyObj"===e.type)return this._remoteCom.handleMessage(e.payload).then(t,r,n),void 0;if(!this._requestHandler)return r("Request handler not loaded"),void 0;if(e.type in this._requestHandler&&"function"==typeof this._requestHandler[e.type])try{this._requestHandler[e.type].call(this._requestHandler,this,t,r,n,e.payload)}catch(i){r(o.transformErrorForSerialization(i))}else this._requestHandler.request(this,t,r,n,e)},t}();t.WorkerServer=c,t.create=a});