/*! Copyright (c) Microsoft Corporation.  All Rights Reserved. Licensed under the MIT License. */
var WinJS_Init=function(n,t){var i=typeof n!="undefined"?n:typeof t!="undefined"?t:typeof global!="undefined"?global:{};(function(n){typeof define=="function"&&define.amd?define([],n):(i.msWriteProfilerMark&&msWriteProfilerMark("WinJS.4.4 4.4.0.winjs.2016.5.19 base.js,StartTM"),typeof exports=="object"&&typeof exports.nodeName!="string"?n():n(i.WinJS),i.msWriteProfilerMark&&msWriteProfilerMark("WinJS.4.4 4.4.0.winjs.2016.5.19 base.js,StopTM"))})(function(){var u,r;return function(){"use strict";function t(n,t){n=n||"";var i=n.split("/");return i.pop(),t.map(function(n){if(n[0]==="."){var r=n.split("/"),t=i.slice(0);return r.forEach(function(n){n===".."?t.pop():n!=="."&&t.push(n)}),t.join("/")}return n})}function f(r,f,e){return r.map(function(r){if(r==="exports")return e;if(r==="require")return function(n,i){u(t(f,n),i)};var o=n[r];if(!o)throw new Error("Undefined dependency: "+r);return o.resolved||(o.resolved=i(o.dependencies,o.factory,r,o.exports),typeof o.resolved=="undefined"&&(o.resolved=o.exports)),o.resolved})}function i(n,t,i,r){var u=f(n,i,r);return t&&t.apply?t.apply(null,u):t}var n={};r=function(i,r,u){Array.isArray(r)||(u=r,r=[]);var f={dependencies:t(i,r),factory:u};r.indexOf("exports")!==-1&&(f.exports={});n[i]=f};u=function(n,t){Array.isArray(n)||(n=[n]);i(n,t)}}(),r("amd",function(){}),r("WinJS/Core/_WinJS",{}),r("WinJS/Core/_Global",[],function(){"use strict";return typeof n!="undefined"?n:typeof t!="undefined"?t:typeof global!="undefined"?global:{}}),r("WinJS/Core/_BaseCoreUtils",["./_Global"],function(n){"use strict";function i(n){return n.supportedForProcessing=!0,n}var t=!!n.Windows;return{hasWinRT:t,markSupportedForProcessing:i,_setImmediate:n.setImmediate?n.setImmediate.bind(n):function(t){n.setTimeout(t,0)}}}),r("WinJS/Core/_WriteProfilerMark",["./_Global"],function(n){"use strict";return n.msWriteProfilerMark||function(){}}),r("WinJS/Core/_Base",["./_WinJS","./_Global","./_BaseCoreUtils","./_WriteProfilerMark"],function(n,t,i,r){"use strict";function u(n,t,i){for(var s=Object.keys(t),h=Array.isArray(n),u,e=0,c=s.length;e<c;e++){var f=s[e],o=f.charCodeAt(0)!==95,r=t[f];if(r&&typeof r=="object"&&(r.value!==undefined||typeof r.get=="function"||typeof r.set=="function")){r.enumerable===undefined&&(r.enumerable=o);i&&r.setName&&typeof r.setName=="function"&&r.setName(i+"."+f);u=u||{};u[f]=r;continue}if(!o){u=u||{};u[f]={value:r,enumerable:o,configurable:!0,writable:!0};continue}h?n.forEach(function(n){n[f]=r}):n[f]=r}u&&(h?n.forEach(function(n){Object.defineProperties(n,u)}):Object.defineProperties(n,u))}return function(){function e(i,r){var u=i||{},f,e,s,o;if(r)for(f=r.split("."),u===t&&f[0]==="WinJS"&&(u=n,f.splice(0,1)),e=0,s=f.length;e<s;e++)o=f[e],u[o]||Object.defineProperty(u,o,{value:{},writable:!1,enumerable:!0,configurable:!0}),u=u[o];return u}function o(n,t,i){var r=e(n,t);return i&&u(r,i,t||"<ANONYMOUS>"),r}function s(n,i){return o(t,n,i)}function h(n){var f,t=i.uninitialized,u;return{setName:function(n){f=n},get:function(){switch(t){case i.initialized:return u;case i.uninitialized:t=i.working;try{r("WinJS.Namespace._lazy:"+f+",StartTM");u=n()}finally{r("WinJS.Namespace._lazy:"+f+",StopTM");t=i.uninitialized}return n=null,t=i.initialized,u;case i.working:throw"Illegal: reentrancy on initialization";default:throw"Illegal";}},set:function(n){switch(t){case i.working:throw"Illegal: reentrancy on initialization";default:t=i.initialized;u=n}},enumerable:!0,configurable:!0}}function c(n,i,r){var o=[n],f=null;return i&&(f=e(t,i),o.push(f)),u(o,r,i||"<ANONYMOUS>"),f}var f=n,i;f.Namespace||(f.Namespace=Object.create(Object.prototype));i={uninitialized:1,working:2,initialized:3};Object.defineProperties(f.Namespace,{defineWithParent:{value:o,writable:!0,enumerable:!0,configurable:!0},define:{value:s,writable:!0,enumerable:!0,configurable:!0},_lazy:{value:h,writable:!0,enumerable:!0,configurable:!0},_moduleDefine:{value:c,writable:!0,enumerable:!0,configurable:!0}})}(),function(){function t(n,t,r){return n=n||function(){},i.markSupportedForProcessing(n),t&&u(n.prototype,t),r&&u(n,r),n}function r(n,r,f,e){if(n){r=r||function(){};var o=n.prototype;return r.prototype=Object.create(o),i.markSupportedForProcessing(r),Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,configurable:!0,enumerable:!0}),f&&u(r.prototype,f),e&&u(r,e),r}return t(r,f,e)}function f(n){n=n||function(){};for(var t=1,i=arguments.length;t<i;t++)u(n.prototype,arguments[t]);return n}n.Namespace.define("WinJS.Class",{define:t,derive:r,mix:f})}(),{Namespace:n.Namespace,Class:n.Class}}),r("WinJS/Core/_ErrorFromName",["./_Base"],function(n){"use strict";var t=n.Class.derive(Error,function(n,t){this.name=n;this.message=t||n},{},{supportedForProcessing:!1});return n.Namespace.define("WinJS",{ErrorFromName:t}),t}),r("WinJS/Core/_WinRT",["exports","./_Global","./_Base",],function(n,t,i){"use strict";n.msGetWeakWinRTProperty=t.msGetWeakWinRTProperty;n.msSetWeakWinRTProperty=t.msSetWeakWinRTProperty;var r=!1;try{t.Windows.UI.ViewManagement.InputPane.getForCurrentView();r=!0}catch(u){}["Windows.ApplicationModel.DesignMode.designModeEnabled","Windows.ApplicationModel.Resources.Core.ResourceContext","Windows.ApplicationModel.Resources.Core.ResourceManager","Windows.ApplicationModel.Search.SearchQueryLinguisticDetails","Windows.Data.Text.SemanticTextQuery","Windows.Foundation.Collections.CollectionChange","Windows.Foundation.Diagnostics","Windows.Foundation.Uri","Windows.Globalization.ApplicationLanguages","Windows.Globalization.Calendar","Windows.Globalization.DateTimeFormatting","Windows.Globalization.Language","Windows.Phone.UI.Input.HardwareButtons","Windows.Storage.ApplicationData","Windows.Storage.CreationCollisionOption","Windows.Storage.BulkAccess.FileInformationFactory","Windows.Storage.FileIO","Windows.Storage.FileProperties.ThumbnailType","Windows.Storage.FileProperties.ThumbnailMode","Windows.Storage.FileProperties.ThumbnailOptions","Windows.Storage.KnownFolders","Windows.Storage.Search.FolderDepth","Windows.Storage.Search.IndexerOption","Windows.Storage.Streams.RandomAccessStreamReference","Windows.UI.ApplicationSettings.SettingsEdgeLocation","Windows.UI.ApplicationSettings.SettingsCommand","Windows.UI.ApplicationSettings.SettingsPane","Windows.UI.Core.AnimationMetrics","Windows.UI.Core.SystemNavigationManager","Windows.UI.Input.EdgeGesture","Windows.UI.Input.EdgeGestureKind","Windows.UI.Input.PointerPoint","Windows.UI.ViewManagement.HandPreference","Windows.UI.ViewManagement.InputPane","Windows.UI.ViewManagement.UIColorType","Windows.UI.ViewManagement.UISettings","Windows.UI.WebUI.Core.WebUICommandBar","Windows.UI.WebUI.Core.WebUICommandBarBitmapIcon","Windows.UI.WebUI.Core.WebUICommandBarClosedDisplayMode","Windows.UI.WebUI.Core.WebUICommandBarIconButton","Windows.UI.WebUI.Core.WebUICommandBarSymbolIcon","Windows.UI.WebUI.WebUIApplication",].forEach(function(u){var f=u.split("."),e={};e[f[f.length-1]]={get:function(){return r?f.reduce(function(n,t){return n?n[t]:null},t):null}};i.Namespace.defineWithParent(n,f.slice(0,-1).join("."),e)})}),r("WinJS/Core/_Events",["exports","./_Base"],function(n,t){"use strict";function i(n){var t="_on"+n+"state";return{get:function(){var n=this[t];return n&&n.userHandler},set:function(i){var r=this[t];i?(r||(r={wrapper:function(n){return r.userHandler(n)},userHandler:i},Object.defineProperty(this,t,{value:r,enumerable:!1,writable:!0,configurable:!0}),this.addEventListener(n,r.wrapper,!1)),r.userHandler=i):r&&(this.removeEventListener(n,r.wrapper,!1),this[t]=null)},enumerable:!0}}function r(){for(var t,r={},n=0,u=arguments.length;n<u;n++)t=arguments[n],r["on"+t]=i(t);return r}var u=t.Class.define(function(n,t,i){this.detail=t;this.target=i;this.timeStamp=Date.now();this.type=n},{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}),f={_listeners:null,addEventListener:function(n,t,i){var r,u,e,f;for(i=i||!1,this._listeners=this._listeners||{},r=this._listeners[n]=this._listeners[n]||[],u=0,e=r.length;u<e;u++)if(f=r[u],f.useCapture===i&&f.listener===t)return;r.push({listener:t,useCapture:i})},dispatchEvent:function(n,t){var i=this._listeners&&this._listeners[n],r,f,e;if(i){for(r=new u(n,t,this),i=i.slice(0,i.length),f=0,e=i.length;f<e&&!r._stopImmediatePropagationCalled;f++)i[f].listener(r);return r.defaultPrevented||!1}return!1},removeEventListener:function(n,t,i){var r,u,e,f;if(i=i||!1,r=this._listeners&&this._listeners[n],r)for(u=0,e=r.length;u<e;u++)if(f=r[u],f.listener===t&&f.useCapture===i){r.splice(u,1);r.length===0&&delete this._listeners[n];break}}};t.Namespace._moduleDefine(n,"WinJS.Utilities",{_createEventProperty:i,createEventProperties:r,eventMixin:f})}),r("require-json",{load:function(n){throw new Error("Dynamic load not allowed: "+n);}}),r("require-json!strings/en-us/Microsoft.WinJS.resjson",{"tv/scrollViewerPageDown":"Page Down","tv/scrollViewerPageUp":"Page Up","ui/appBarAriaLabel":"App Bar","ui/appBarCommandAriaLabel":"App Bar Item","ui/appBarOverflowButtonAriaLabel":"View more","ui/autoSuggestBoxAriaLabel":"Autosuggestbox","ui/autoSuggestBoxAriaLabelInputNoPlaceHolder":"Autosuggestbox, enter to submit query, esc to clear text","ui/autoSuggestBoxAriaLabelInputPlaceHolder":"Autosuggestbox, {0}, enter to submit query, esc to clear text","ui/autoSuggestBoxAriaLabelQuery":"Suggestion: {0}","_ui/autoSuggestBoxAriaLabelQuery.comment":"Suggestion: query text (example: Suggestion: contoso)","ui/autoSuggestBoxAriaLabelSeparator":"Separator: {0}","_ui/autoSuggestBoxAriaLabelSeparator.comment":"Separator: separator text (example: Separator: People or Separator: Apps)","ui/autoSuggestBoxAriaLabelResult":"Result: {0}, {1}","_ui/autoSuggestBoxAriaLabelResult.comment":"Result: text, detailed text (example: Result: contoso, www.contoso.com)","ui/averageRating":"Average Rating","ui/backbuttonarialabel":"Back","ui/chapterSkipBackMediaCommandDisplayText":"Chapter back","ui/chapterSkipForwardMediaCommandDisplayText":"Chapter forward","ui/clearYourRating":"Clear your rating","ui/closedCaptionsLabelNone":"Off","ui/closedCaptionsMediaCommandDisplayText":"Closed captioning","ui/closeOverlay":"Close","ui/commandingSurfaceAriaLabel":"CommandingSurface","ui/commandingSurfaceOverflowButtonAriaLabel":"View more","ui/datePicker":"Date Picker","ui/fastForwardMediaCommandDisplayText":"Fast forward","ui/fastForwardFeedbackDisplayText":" {0}X","ui/fastForwardFeedbackSlowMotionDisplayText":"0.5X","ui/flipViewPanningContainerAriaLabel":"Scrolling Container","ui/flyoutAriaLabel":"Flyout","ui/goToFullScreenButtonLabel":"Go full screen","ui/goToLiveMediaCommandDisplayText":"LIVE","ui/hubViewportAriaLabel":"Scrolling Container","ui/listViewViewportAriaLabel":"Scrolling Container","ui/mediaErrorAborted":"Playback was interrupted. Please try again.","ui/mediaErrorNetwork":"There was a network connection error.","ui/mediaErrorDecode":"The content could not be decoded","ui/mediaErrorSourceNotSupported":"This content type is not supported.","ui/mediaErrorUnknown":"There was an unknown error.","ui/mediaPlayerAudioTracksButtonLabel":"Audio tracks","ui/mediaPlayerCastButtonLabel":"Cast","ui/mediaPlayerChapterSkipBackButtonLabel":"Previous","ui/mediaPlayerChapterSkipForwardButtonLabel":"Next","ui/mediaPlayerClosedCaptionsButtonLabel":"Closed captions","ui/mediaPlayerFastForwardButtonLabel":"Fast forward","ui/mediaPlayerFullscreenButtonLabel":"Fullscreen","ui/mediaPlayerLiveButtonLabel":"LIVE","ui/mediaPlayerNextTrackButtonLabel":"Next","ui/mediaPlayerOverlayActiveOptionIndicator":"(On)","ui/mediaPlayerPauseButtonLabel":"Pause","ui/mediaPlayerPlayButtonLabel":"Play","ui/mediaPlayerPlayFromBeginningButtonLabel":"Replay","ui/mediaPlayerPlayRateButtonLabel":"Playback rate","ui/mediaPlayerPreviousTrackButtonLabel":"Previous","ui/mediaPlayerRewindButtonLabel":"Rewind","ui/mediaPlayerStopButtonLabel":"Stop","ui/mediaPlayerTimeSkipBackButtonLabel":"8 second replay","ui/mediaPlayerTimeSkipForwardButtonLabel":"30 second skip","ui/mediaPlayerToggleSnapButtonLabel":"Snap","ui/mediaPlayerVolumeButtonLabel":"Volume","ui/mediaPlayerZoomButtonLabel":"Zoom","ui/menuCommandAriaLabel":"Menu Item","ui/menuAriaLabel":"Menu","ui/navBarContainerViewportAriaLabel":"Scrolling Container","ui/nextTrackMediaCommandDisplayText":"Next track","ui/off":"Off","ui/on":"On","ui/pauseMediaCommandDisplayText":"Pause","ui/playFromBeginningMediaCommandDisplayText":"Play again","ui/playbackRateHalfSpeedLabel":"0.5x","ui/playbackRateNormalSpeedLabel":"Normal","ui/playbackRateOneAndHalfSpeedLabel":"1.5x","ui/playbackRateDoubleSpeedLabel":"2x","ui/playMediaCommandDisplayText":"Play","ui/pivotAriaLabel":"Pivot","ui/pivotViewportAriaLabel":"Scrolling Container","ui/replayMediaCommandDisplayText":"Play again","ui/rewindMediaCommandDisplayText":"Rewind","ui/rewindFeedbackDisplayText":" {0}X","ui/rewindFeedbackSlowMotionDisplayText":"0.5X","ui/searchBoxAriaLabel":"Searchbox","ui/searchBoxAriaLabelInputNoPlaceHolder":"Searchbox, enter to submit query, esc to clear text","ui/searchBoxAriaLabelInputPlaceHolder":"Searchbox, {0}, enter to submit query, esc to clear text","ui/searchBoxAriaLabelButton":"Click to submit query","ui/seeMore":"See more","ui/selectAMPM":"Select A.M P.M","ui/selectDay":"Select Day","ui/selectHour":"Select Hour","ui/selectMinute":"Select Minute","ui/selectMonth":"Select Month","ui/selectYear":"Select Year","ui/settingsFlyoutAriaLabel":"Settings Flyout","ui/stopMediaCommandDisplayText":"Stop","ui/tentativeRating":"Tentative Rating","ui/timePicker":"Time Picker","ui/timeSeparator":":","ui/timeSkipBackMediaCommandDisplayText":"Skip back","ui/timeSkipForwardMediaCommandDisplayText":"Skip forward","ui/toolbarAriaLabel":"ToolBar","ui/toolbarOverflowButtonAriaLabel":"View more","ui/unrated":"Unrated","ui/userRating":"User Rating","ui/zoomMediaCommandDisplayText":"Zoom","ui/appBarIcons/previous":"","_ui/appBarIcons/previous.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/next":"","_ui/appBarIcons/next.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/play":"","_ui/appBarIcons/play.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/pause":"","_ui/appBarIcons/pause.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/edit":"","_ui/appBarIcons/edit.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/save":"","_ui/appBarIcons/save.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/clear":"","_ui/appBarIcons/clear.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/delete":"","_ui/appBarIcons/delete.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/remove":"","_ui/appBarIcons/remove.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/add":"","_ui/appBarIcons/add.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/cancel":"","_ui/appBarIcons/cancel.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/accept":"","_ui/appBarIcons/accept.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/more":"","_ui/appBarIcons/more.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/redo":"","_ui/appBarIcons/redo.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/undo":"","_ui/appBarIcons/undo.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/home":"","_ui/appBarIcons/home.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/up":"","_ui/appBarIcons/up.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/forward":"","_ui/appBarIcons/forward.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/right":"","_ui/appBarIcons/right.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/back":"","_ui/appBarIcons/back.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/left":"","_ui/appBarIcons/left.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/favorite":"","_ui/appBarIcons/favorite.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/camera":"","_ui/appBarIcons/camera.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/settings":"","_ui/appBarIcons/settings.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/video":"","_ui/appBarIcons/video.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/sync":"","_ui/appBarIcons/sync.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/download":"","_ui/appBarIcons/download.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/mail":"","_ui/appBarIcons/mail.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/find":"","_ui/appBarIcons/find.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/help":"","_ui/appBarIcons/help.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/upload":"","_ui/appBarIcons/upload.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/emoji":"","_ui/appBarIcons/emoji.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/twopage":"","_ui/appBarIcons/twopage.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/leavechat":"","_ui/appBarIcons/leavechat.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/mailforward":"","_ui/appBarIcons/mailforward.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/clock":"","_ui/appBarIcons/clock.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/send":"","_ui/appBarIcons/send.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/crop":"","_ui/appBarIcons/crop.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/rotatecamera":"","_ui/appBarIcons/rotatecamera.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/people":"","_ui/appBarIcons/people.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/closepane":"","_ui/appBarIcons/closepane.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/openpane":"","_ui/appBarIcons/openpane.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/world":"","_ui/appBarIcons/world.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/flag":"","_ui/appBarIcons/flag.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/previewlink":"","_ui/appBarIcons/previewlink.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/globe":"","_ui/appBarIcons/globe.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/trim":"","_ui/appBarIcons/trim.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/attachcamera":"","_ui/appBarIcons/attachcamera.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/zoomin":"","_ui/appBarIcons/zoomin.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/bookmarks":"","_ui/appBarIcons/bookmarks.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/document":"","_ui/appBarIcons/document.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/protecteddocument":"","_ui/appBarIcons/protecteddocument.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/page":"","_ui/appBarIcons/page.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/bullets":"","_ui/appBarIcons/bullets.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/comment":"","_ui/appBarIcons/comment.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/mail2":"","_ui/appBarIcons/mail2.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/contactinfo":"","_ui/appBarIcons/contactinfo.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/hangup":"","_ui/appBarIcons/hangup.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/viewall":"","_ui/appBarIcons/viewall.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/mappin":"","_ui/appBarIcons/mappin.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/phone":"","_ui/appBarIcons/phone.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/videochat":"","_ui/appBarIcons/videochat.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/switch":"","_ui/appBarIcons/switch.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/contact":"","_ui/appBarIcons/contact.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/rename":"","_ui/appBarIcons/rename.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/pin":"","_ui/appBarIcons/pin.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/musicinfo":"","_ui/appBarIcons/musicinfo.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/go":"","_ui/appBarIcons/go.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/keyboard":"","_ui/appBarIcons/keyboard.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/dockleft":"","_ui/appBarIcons/dockleft.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/dockright":"","_ui/appBarIcons/dockright.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/dockbottom":"","_ui/appBarIcons/dockbottom.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/remote":"","_ui/appBarIcons/remote.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/refresh":"","_ui/appBarIcons/refresh.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/rotate":"","_ui/appBarIcons/rotate.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/shuffle":"","_ui/appBarIcons/shuffle.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/list":"","_ui/appBarIcons/list.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/shop":"","_ui/appBarIcons/shop.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/selectall":"","_ui/appBarIcons/selectall.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/orientation":"","_ui/appBarIcons/orientation.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/import":"","_ui/appBarIcons/import.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/importall":"","_ui/appBarIcons/importall.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/browsephotos":"","_ui/appBarIcons/browsephotos.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/webcam":"","_ui/appBarIcons/webcam.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/pictures":"","_ui/appBarIcons/pictures.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/savelocal":"","_ui/appBarIcons/savelocal.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/caption":"","_ui/appBarIcons/caption.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/stop":"","_ui/appBarIcons/stop.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/showresults":"","_ui/appBarIcons/showresults.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/volume":"","_ui/appBarIcons/volume.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/repair":"","_ui/appBarIcons/repair.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/message":"","_ui/appBarIcons/message.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/page2":"","_ui/appBarIcons/page2.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/calendarday":"","_ui/appBarIcons/calendarday.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/calendarweek":"","_ui/appBarIcons/calendarweek.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/calendar":"","_ui/appBarIcons/calendar.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/characters":"","_ui/appBarIcons/characters.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/mailreplyall":"","_ui/appBarIcons/mailreplyall.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/read":"","_ui/appBarIcons/read.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/link":"","_ui/appBarIcons/link.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/accounts":"","_ui/appBarIcons/accounts.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/showbcc":"","_ui/appBarIcons/showbcc.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/hidebcc":"","_ui/appBarIcons/hidebcc.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/cut":"","_ui/appBarIcons/cut.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/attach":"","_ui/appBarIcons/attach.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/paste":"","_ui/appBarIcons/paste.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/filter":"","_ui/appBarIcons/filter.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/copy":"","_ui/appBarIcons/copy.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/emoji2":"","_ui/appBarIcons/emoji2.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/important":"","_ui/appBarIcons/important.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/mailreply":"","_ui/appBarIcons/mailreply.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/slideshow":"","_ui/appBarIcons/slideshow.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/sort":"","_ui/appBarIcons/sort.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/manage":"","_ui/appBarIcons/manage.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/allapps":"","_ui/appBarIcons/allapps.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/disconnectdrive":"","_ui/appBarIcons/disconnectdrive.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/mapdrive":"","_ui/appBarIcons/mapdrive.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/newwindow":"","_ui/appBarIcons/newwindow.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/openwith":"","_ui/appBarIcons/openwith.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/contactpresence":"","_ui/appBarIcons/contactpresence.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/priority":"","_ui/appBarIcons/priority.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/uploadskydrive":"","_ui/appBarIcons/uploadskydrive.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/gototoday":"","_ui/appBarIcons/gototoday.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/font":"","_ui/appBarIcons/font.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/fontcolor":"","_ui/appBarIcons/fontcolor.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/contact2":"","_ui/appBarIcons/contact2.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/folder":"","_ui/appBarIcons/folder.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/audio":"","_ui/appBarIcons/audio.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/placeholder":"","_ui/appBarIcons/placeholder.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/view":"","_ui/appBarIcons/view.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/setlockscreen":"","_ui/appBarIcons/setlockscreen.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/settile":"","_ui/appBarIcons/settile.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/cc":"","_ui/appBarIcons/cc.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/stopslideshow":"","_ui/appBarIcons/stopslideshow.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/permissions":"","_ui/appBarIcons/permissions.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/highlight":"","_ui/appBarIcons/highlight.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/disableupdates":"","_ui/appBarIcons/disableupdates.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/unfavorite":"","_ui/appBarIcons/unfavorite.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/unpin":"","_ui/appBarIcons/unpin.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/openlocal":"","_ui/appBarIcons/openlocal.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/mute":"","_ui/appBarIcons/mute.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/italic":"","_ui/appBarIcons/italic.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/underline":"","_ui/appBarIcons/underline.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/bold":"","_ui/appBarIcons/bold.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/movetofolder":"","_ui/appBarIcons/movetofolder.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/likedislike":"","_ui/appBarIcons/likedislike.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/dislike":"","_ui/appBarIcons/dislike.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/like":"","_ui/appBarIcons/like.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/alignright":"","_ui/appBarIcons/alignright.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/aligncenter":"","_ui/appBarIcons/aligncenter.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/alignleft":"","_ui/appBarIcons/alignleft.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/zoom":"","_ui/appBarIcons/zoom.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/zoomout":"","_ui/appBarIcons/zoomout.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/openfile":"","_ui/appBarIcons/openfile.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/otheruser":"","_ui/appBarIcons/otheruser.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/admin":"","_ui/appBarIcons/admin.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/street":"","_ui/appBarIcons/street.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/map":"","_ui/appBarIcons/map.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/clearselection":"","_ui/appBarIcons/clearselection.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/fontdecrease":"","_ui/appBarIcons/fontdecrease.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/fontincrease":"","_ui/appBarIcons/fontincrease.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/fontsize":"","_ui/appBarIcons/fontsize.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/cellphone":"","_ui/appBarIcons/cellphone.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/reshare":"","_ui/appBarIcons/reshare.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/tag":"","_ui/appBarIcons/tag.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/repeatone":"","_ui/appBarIcons/repeatone.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/repeatall":"","_ui/appBarIcons/repeatall.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/outlinestar":"","_ui/appBarIcons/outlinestar.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/solidstar":"","_ui/appBarIcons/solidstar.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/calculator":"","_ui/appBarIcons/calculator.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/directions":"","_ui/appBarIcons/directions.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/target":"","_ui/appBarIcons/target.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/library":"","_ui/appBarIcons/library.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/phonebook":"","_ui/appBarIcons/phonebook.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/memo":"","_ui/appBarIcons/memo.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/microphone":"","_ui/appBarIcons/microphone.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/postupdate":"","_ui/appBarIcons/postupdate.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/backtowindow":"","_ui/appBarIcons/backtowindow.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/fullscreen":"","_ui/appBarIcons/fullscreen.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/newfolder":"","_ui/appBarIcons/newfolder.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/calendarreply":"","_ui/appBarIcons/calendarreply.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/unsyncfolder":"","_ui/appBarIcons/unsyncfolder.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/reporthacked":"","_ui/appBarIcons/reporthacked.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/syncfolder":"","_ui/appBarIcons/syncfolder.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/blockcontact":"","_ui/appBarIcons/blockcontact.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/switchapps":"","_ui/appBarIcons/switchapps.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/addfriend":"","_ui/appBarIcons/addfriend.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/touchpointer":"","_ui/appBarIcons/touchpointer.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/gotostart":"","_ui/appBarIcons/gotostart.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/zerobars":"","_ui/appBarIcons/zerobars.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/onebar":"","_ui/appBarIcons/onebar.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/twobars":"","_ui/appBarIcons/twobars.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/threebars":"","_ui/appBarIcons/threebars.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/fourbars":"","_ui/appBarIcons/fourbars.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/scan":"","_ui/appBarIcons/scan.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/preview":"","_ui/appBarIcons/preview.comment":"{Locked=qps-ploc,qps-plocm}","ui/appBarIcons/hamburger":"","_ui/appBarIcons/hamburger.comment":"{Locked=qps-ploc,qps-plocm}"}),r("WinJS/Core/_Resources",["exports","./_Global","./_WinRT","./_Base","./_Events","require-json!strings/en-us/Microsoft.WinJS.resjson",],function(n,t,i,r,u,f){"use strict";function a(n){var t=c("ms-resource:///Microsoft.WinJS/"+n);return t.empty&&(t=p(n)),t}function p(n){var t=f[n];return typeof t=="string"&&(t={value:t}),t||{value:n,empty:!0}}function l(n){var t=arguments;return t.length>1&&(n=n.replace(/({{)|(}})|{(\d+)}|({)|(})/g,function(n,i,r,u,f,e){if(f||e)throw l(k.malformedFormatStringInput,f||e);return i&&"{"||r&&"}"||t[(u|0)+1]})),n}var e,v=!1,s="contextchanged",h,w=r.Class.mix(r.Class.define(null,{},{supportedForProcessing:!1}),u.eventMixin),o=new w,b=u._createEventProperty,k={get malformedFormatStringInput(){return"Malformed, did you mean to escape your '{0}'?"}},y,c;r.Namespace.define("WinJS.Resources",{_getWinJSString:a});r.Namespace._moduleDefine(n,"WinJS.Resources",{addEventListener:function(t,r,u){if(i.Windows.ApplicationModel.Resources.Core.ResourceManager&&!v&&t===s)try{var f=n._getResourceContext();f?f.qualifierValues.addEventListener("mapchanged",function(t){n.dispatchEvent(s,{qualifier:t.key,changed:t.target[t.key]})},!1):i.Windows.ApplicationModel.Resources.Core.ResourceManager.current.defaultContext.qualifierValues.addEventListener("mapchanged",function(t){n.dispatchEvent(s,{qualifier:t.key,changed:t.target[t.key]})},!1);v=!0}catch(e){}o.addEventListener(t,r,u)},removeEventListener:o.removeEventListener.bind(o),dispatchEvent:o.dispatchEvent.bind(o),_formatString:l,_getStringWinRT:function(t){var f,r,s,u,o;if(!e){f=i.Windows.ApplicationModel.Resources.Core.ResourceManager.current.mainResourceMap;try{e=f.getSubtree("Resources")}catch(h){}e||(e=f)}try{o=n._getResourceContext();u=o?e.getValue(t,o):e.getValue(t);u&&(r=u.valueAsString,r===undefined&&(r=u.toString()))}catch(h){}if(!r)return n._getStringJS(t);try{s=u.getQualifierValue("Language")}catch(h){return{value:r}}return{value:r,lang:s}},_getStringJS:function(n){var i=t.strings&&t.strings[n];return typeof i=="string"&&(i={value:i}),i||{value:n,empty:!0}},_getResourceContext:function(){if(t.document&&typeof h=="undefined"){var n=i.Windows.ApplicationModel.Resources.Core.ResourceContext;h=n.getForCurrentView?n.getForCurrentView():null}return h},oncontextchanged:b(s)});y=i.Windows.ApplicationModel.Resources.Core.ResourceManager?n._getStringWinRT:n._getStringJS;c=function(n){return y(n)};r.Namespace._moduleDefine(n,null,{_formatString:l,_getWinJSString:a});r.Namespace._moduleDefine(n,"WinJS.Resources",{getString:{get:function(){return c},set:function(n){c=n}}})}),r("WinJS/Core/_Trace",["./_Global"],function(n){"use strict";function t(n){return n}return{_traceAsyncOperationStarting:n.Debug&&n.Debug.msTraceAsyncOperationStarting&&n.Debug.msTraceAsyncOperationStarting.bind(n.Debug)||t,_traceAsyncOperationCompleted:n.Debug&&n.Debug.msTraceAsyncOperationCompleted&&n.Debug.msTraceAsyncOperationCompleted.bind(n.Debug)||t,_traceAsyncCallbackStarting:n.Debug&&n.Debug.msTraceAsyncCallbackStarting&&n.Debug.msTraceAsyncCallbackStarting.bind(n.Debug)||t,_traceAsyncCallbackCompleted:n.Debug&&n.Debug.msTraceAsyncCallbackCompleted&&n.Debug.msTraceAsyncCallbackCompleted.bind(n.Debug)||t}}),r("WinJS/Promise/_StateMachine",["../Core/_Global","../Core/_BaseCoreUtils","../Core/_Base","../Core/_ErrorFromName","../Core/_Events","../Core/_Trace"],function(n,t,i,r,u,f){"use strict";function e(){}function g(n,t){var i;i=t&&typeof t=="object"&&typeof t.then=="function"?p:dt;n._value=t;n._setState(i)}function nt(n,t,i,r,u,f){return{exception:n,error:t,promise:i,handler:f,id:r,parent:u}}function tt(n,t,i,r){var u=i._isException,f=i._errorId;return nt(u?t:null,u?null:t,n,f,i,r)}function gt(n,t,i){var r=i._isException,u=i._errorId;return vt(n,u,r),nt(r?t:null,r?null:t,n,u,i)}function ni(n,t){var i=++ht;return vt(n,i),nt(null,t,n,i)}function ti(n,t){var i=++ht;return vt(n,i,!0),nt(t,null,n,i)}function it(n,t,i,r){var u=f._traceAsyncOperationStarting("WinJS.Promise.done");at(n,{c:t,e:i,p:r,asyncOpID:u})}function rt(n,t,i,r){n._value=t;l(n,t,i,r);n._setState(lt)}function ii(t,i){var l=t._value,u=t._listeners,e,s;if(u)for(t._listeners=null,e=0,s=Array.isArray(u)?u.length:1;e<s;e++){var o=s===1?u:u[e],h=o.c,r=o.promise;if(f._traceAsyncOperationCompleted(o.asyncOpID,n.Debug&&n.Debug.MS_ASYNC_OP_STATUS_SUCCESS),r){f._traceAsyncCallbackStarting(o.asyncOpID);try{r._setCompleteValue(h?h(l):l)}catch(a){r._setExceptionValue(a)}finally{f._traceAsyncCallbackCompleted()}r._state!==p&&r._listeners&&i.push(r)}else c.prototype.done.call(t,h)}}function ri(t,i){var u=t._value,e=t._listeners,s,c,v;if(e)for(t._listeners=null,s=0,c=Array.isArray(e)?e.length:1;s<c;s++){var h=c===1?e:e[s],o=h.e,r=h.promise,w=n.Debug&&(u&&u.name===y?n.Debug.MS_ASYNC_OP_STATUS_CANCELED:n.Debug.MS_ASYNC_OP_STATUS_ERROR);if(f._traceAsyncOperationCompleted(h.asyncOpID,w),r){v=!1;try{o?(f._traceAsyncCallbackStarting(h.asyncOpID),v=!0,o.handlesOnError||l(r,u,tt,t,o),r._setCompleteValue(o(u))):r._setChainedErrorValue(u,t)}catch(b){r._setExceptionValue(b)}finally{v&&f._traceAsyncCallbackCompleted()}r._state!==p&&r._listeners&&i.push(r)}else a.prototype.done.call(t,null,o)}}function l(n,t,i,r,u){if(v._listeners[st]){if(t instanceof Error&&t.message===y)return;v.dispatchEvent(st,i(n,t,r,u))}}function ut(n,t){var r=n._listeners,u,f,i,e;if(r)for(u=0,f=Array.isArray(r)?r.length:1;u<f;u++){if(i=f===1?r:r[u],e=i.p,e)try{e(t)}catch(o){}i.c||i.e||!i.promise||i.promise._progress(t)}}function at(n,t){var i=n._listeners;i?(i=Array.isArray(i)?i:[i],i.push(t)):i=t;n._listeners=i}function vt(n,t,i){n._isException=i||!1;n._errorId=t}function ft(n,t,i,r){n._value=t;l(n,t,i,r);n._setState(k)}function et(n,t){var i;i=t&&typeof t=="object"&&typeof t.then=="function"?p:b;n._value=t;n._setState(i)}function ot(n,t,i,r){var u=new yt(n),e=f._traceAsyncOperationStarting("WinJS.Promise.then");return at(n,{promise:u,c:t,e:i,p:r,asyncOpID:e}),u}function ei(i){var r;return new o(function(u){i?r=n.setTimeout(u,i):t._setImmediate(u)},function(){r&&n.clearTimeout(r)})}function oi(n,t){var r=function(){t.cancel()},i=function(){n.cancel()};return n.then(r),t.then(i,i),t}var pt,v,ht,w,wt,p,bt,kt,ct,dt,b,lt,k,d,fi,o;n.Debug&&(n.Debug.setNonUserCodeExceptions=!0);pt=i.Class.mix(i.Class.define(null,{},{supportedForProcessing:!1}),u.eventMixin);v=new pt;v._listeners={};var st="error",y="Canceled",s=!1,h={promise:1,thenPromise:2,errorPromise:4,exceptionPromise:8,completePromise:16};h.all=h.promise|h.thenPromise|h.errorPromise|h.exceptionPromise|h.completePromise;ht=1;w={name:"created",enter:function(n){n._setState(wt)},cancel:e,done:e,then:e,_completed:e,_error:e,_notify:e,_progress:e,_setCompleteValue:e,_setErrorValue:e};wt={name:"working",enter:e,cancel:function(n){n._setState(kt)},done:it,then:ot,_completed:g,_error:rt,_notify:e,_progress:ut,_setCompleteValue:et,_setErrorValue:ft};p={name:"waiting",enter:function(n){var t=n._value,i;t instanceof yt&&t._state!==k&&t._state!==b?at(t,{promise:n}):(i=function(r){t._errorId?n._chainedError(r,t):(l(n,r,tt,t,i),n._error(r))},i.handlesOnError=!0,t.then(n._completed.bind(n),i,n._progress.bind(n)))},cancel:function(n){n._setState(bt)},done:it,then:ot,_completed:g,_error:rt,_notify:e,_progress:ut,_setCompleteValue:et,_setErrorValue:ft};bt={name:"waiting_canceled",enter:function(n){n._setState(ct);var t=n._value;t.cancel&&t.cancel()},cancel:e,done:it,then:ot,_completed:g,_error:rt,_notify:e,_progress:ut,_setCompleteValue:et,_setErrorValue:ft};kt={name:"canceled",enter:function(n){n._setState(ct);n._cancelAction()},cancel:e,done:it,then:ot,_completed:g,_error:rt,_notify:e,_progress:ut,_setCompleteValue:et,_setErrorValue:ft};ct={name:"canceling",enter:function(n){var t=new Error(y);t.name=t.message;n._value=t;n._setState(lt)},cancel:e,done:e,then:e,_completed:e,_error:e,_notify:e,_progress:e,_setCompleteValue:e,_setErrorValue:e};dt={name:"complete_notify",enter:function(n){if(n.done=c.prototype.done,n.then=c.prototype.then,n._listeners)for(var t=[n],i;t.length;)i=t.shift(),i._state._notify(i,t);n._setState(b)},cancel:e,done:null,then:null,_completed:e,_error:e,_notify:ii,_progress:e,_setCompleteValue:e,_setErrorValue:e};b={name:"success",enter:function(n){n.done=c.prototype.done;n.then=c.prototype.then;n._cleanupAction()},cancel:e,done:null,then:null,_completed:e,_error:e,_notify:ii,_progress:e,_setCompleteValue:e,_setErrorValue:e};lt={name:"error_notify",enter:function(n){if(n.done=a.prototype.done,n.then=a.prototype.then,n._listeners)for(var t=[n],i;t.length;)i=t.shift(),i._state._notify(i,t);n._setState(k)},cancel:e,done:null,then:null,_completed:e,_error:e,_notify:ri,_progress:e,_setCompleteValue:e,_setErrorValue:e};k={name:"error",enter:function(n){n.done=a.prototype.done;n.then=a.prototype.then;n._cleanupAction()},cancel:e,done:null,then:null,_completed:e,_error:e,_notify:ri,_progress:e,_setCompleteValue:e,_setErrorValue:e};d=i.Class.define(null,{_listeners:null,_nextState:null,_state:null,_value:null,cancel:function(){this._state.cancel(this);this._run()},done:function(n,t,i){this._state.done(this,n,t,i)},then:function(n,t,i){return this._state.then(this,n,t,i)},_chainedError:function(n,t){var i=this._state._error(this,n,gt,t);return this._run(),i},_completed:function(n){var t=this._state._completed(this,n);return this._run(),t},_error:function(n){var t=this._state._error(this,n,ni);return this._run(),t},_progress:function(n){this._state._progress(this,n)},_setState:function(n){this._nextState=n},_setCompleteValue:function(n){this._state._setCompleteValue(this,n);this._run()},_setChainedErrorValue:function(n,t){var i=this._state._setErrorValue(this,n,gt,t);return this._run(),i},_setExceptionValue:function(n){var t=this._state._setErrorValue(this,n,ti);return this._run(),t},_run:function(){while(this._nextState)this._state=this._nextState,this._nextState=null,this._state.enter(this)}},{supportedForProcessing:!1});var yt=i.Class.derive(d,function(n){s&&(s===!0||s&h.thenPromise)&&(this._stack=o._getStack());this._creator=n;this._setState(w);this._run()},{_creator:null,_cancelAction:function(){this._creator&&this._creator.cancel()},_cleanupAction:function(){this._creator=null}},{supportedForProcessing:!1}),a=i.Class.define(function(n){s&&(s===!0||s&h.errorPromise)&&(this._stack=o._getStack());this._value=n;l(this,n,ni)},{cancel:function(){},done:function(n,t){var i=this._value,r;if(t)try{t.handlesOnError||l(null,i,tt,this,t);r=t(i);r&&typeof r=="object"&&typeof r.done=="function"&&r.done();return}catch(u){i=u}i instanceof Error&&i.message===y||o._doneHandler(i)},then:function(n,t){if(!t)return this;var i,r=this._value;try{t.handlesOnError||l(null,r,tt,this,t);i=new c(t(r))}catch(u){i=u===r?this:new ui(u)}return i}},{supportedForProcessing:!1}),ui=i.Class.derive(a,function(n){s&&(s===!0||s&h.exceptionPromise)&&(this._stack=o._getStack());this._value=n;l(this,n,ti)},{},{supportedForProcessing:!1}),c=i.Class.define(function(n){if(s&&(s===!0||s&h.completePromise)&&(this._stack=o._getStack()),n&&typeof n=="object"&&typeof n.then=="function"){var t=new yt(null);return t._setCompleteValue(n),t}this._value=n},{cancel:function(){},done:function(n){if(n)try{var t=n(this._value);t&&typeof t=="object"&&typeof t.done=="function"&&t.done()}catch(i){o._doneHandler(i)}},then:function(n){try{var t=n?n(this._value):this._value;return t===this._value?this:new c(t)}catch(i){return new ui(i)}}},{supportedForProcessing:!1});return o=i.Class.derive(d,function(n,t){s&&(s===!0||s&h.promise)&&(this._stack=o._getStack());this._oncancel=t;this._setState(w);this._run();try{var i=this._completed.bind(this),r=this._error.bind(this),u=this._progress.bind(this);n(i,r,u)}catch(f){this._setExceptionValue(f)}},{_oncancel:null,_cancelAction:function(){if(this._oncancel)try{this._oncancel()}catch(n){}},_cleanupAction:function(){this._oncancel=null}},{addEventListener:function(n,t,i){v.addEventListener(n,t,i)},any:function(n){return new o(function(t,i){var r=Object.keys(n),u;r.length===0&&t();u=0;r.forEach(function(f){o.as(n[f]).then(function(){t({key:f,value:n[f]})},function(e){if(e instanceof Error&&e.name===y){++u===r.length&&t(o.cancel);return}i({key:f,value:n[f]})})})},function(){var t=Object.keys(n);t.forEach(function(t){var i=o.as(n[t]);typeof i.cancel=="function"&&i.cancel()})})},as:function(n){return n&&typeof n=="object"&&typeof n.then=="function"?n:new c(n)},cancel:{get:function(){return fi=fi||new a(new r(y))}},dispatchEvent:function(n,t){return v.dispatchEvent(n,t)},is:function(n){return n&&typeof n=="object"&&typeof n.then=="function"},join:function(n){return new o(function(t,i,r){var f=Object.keys(n),u=Array.isArray(n)?[]:{},e=Array.isArray(n)?[]:{},h=0,s=f.length,c=function(n){var h,c;--s==0?(h=Object.keys(u).length,h===0?t(e):(c=0,f.forEach(function(n){var t=u[n];t instanceof Error&&t.name===y&&c++}),c===h?t(o.cancel):i(u))):r({Key:n,Done:!0})};if(f.forEach(function(t){var i=n[t];i===undefined?h++:o.then(i,function(n){e[t]=n;c(t)},function(n){u[t]=n;c(t)})}),s-=h,s===0){t(e);return}},function(){Object.keys(n).forEach(function(t){var i=o.as(n[t]);typeof i.cancel=="function"&&i.cancel()})})},removeEventListener:function(n,t,i){v.removeEventListener(n,t,i)},supportedForProcessing:!1,then:function(n,t,i,r){return o.as(n).then(t,i,r)},thenEach:function(n,t,i,r){var u=Array.isArray(n)?[]:{};return Object.keys(n).forEach(function(f){u[f]=o.as(n[f]).then(t,i,r)}),o.join(u)},timeout:function(n,t){var i=ei(n);return t?oi(i,t):i},wrap:function(n){return new c(n)},wrapError:function(n){return new a(n)},_veryExpensiveTagWithStack:{get:function(){return s},set:function(n){s=n}},_veryExpensiveTagWithStack_tag:h,_getStack:function(){if(n.Debug&&n.Debug.debuggerEnabled)try{throw new Error;}catch(t){return t.stack}},_cancelBlocker:function(n,t){if(!o.is(n))return o.wrap(n);var i,r,u=new o(function(n,t){i=n;r=t},function(){i=null;r=null;t&&t()});return n.then(function(n){i&&i(n)},function(n){r&&r(n)}),u}}),Object.defineProperties(o,u.createEventProperties(st)),o._doneHandler=function(n){t._setImmediate(function(){throw n;})},{PromiseStateMachine:d,Promise:o,state_created:w}}),r("WinJS/Promise",["./Core/_Base","./Promise/_StateMachine"],function(n,t){"use strict";return n.Namespace.define("WinJS",{Promise:t.Promise}),t.Promise}),r("WinJS/Core/_Log",["exports","./_Global","./_Base",],function(n,t,i){"use strict";function o(n,t,i){var u=n;return typeof u=="function"&&(u=u()),(i&&f.test(i)?"":i?i+": ":"")+(t?t.replace(r,":")+": ":"")+u}function s(i,r,u){var e=n.formatLog(i,r,u);t.console&&t.console[u&&f.test(u)?u:"log"](e)}function u(n){return n.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")}var r=/\s+/g,f=/^(error|warn|info|log)$/,e=null;i.Namespace._moduleDefine(n,"WinJS.Utilities",{startLog:function(t){var i;t=t||{};typeof t=="string"&&(t={tags:t});var f=t.type&&new RegExp("^("+u(t.type).replace(r," ").split(" ").join("|")+")$"),e=t.excludeTags&&new RegExp("(^|\\s)("+u(t.excludeTags).replace(r," ").split(" ").join("|")+")(\\s|$)","i"),o=t.tags&&new RegExp("(^|\\s)("+u(t.tags).replace(r," ").split(" ").join("|")+")(\\s|$)","i"),h=t.action||s;if(!f&&!e&&!o&&!n.log){n.log=h;return}i=function(n,t,r){f&&!f.test(r)||e&&e.test(t)||o&&!o.test(t)||h(n,t,r);i.next&&i.next(n,t,r)};i.next=n.log;n.log=i},stopLog:function(){n.log=null},formatLog:o});i.Namespace._moduleDefine(n,"WinJS",{log:{get:function(){return e},set:function(n){e=n}}})}),r("WinJS/Scheduler",["exports","./Core/_Global","./Core/_Base","./Core/_ErrorFromName","./Core/_Log","./Core/_Resources","./Core/_Trace","./Core/_WriteProfilerMark","./Promise"],function(n,t,i,r,u,f,e,o,s){"use strict";function ii(n){var r={},t="_prev"+n,i="_next"+n;return r["_remove"+n]=function(){var n=this[t],r=this[i];r&&(r[t]=n);n&&(n[i]=r);this[t]=null;this[i]=null},r["_insert"+n+"Before"]=function(n){var r=this[t];return r&&(r[i]=n),n[i]=this,n[t]=r,this[t]=n,n},r["_insert"+n+"After"]=function(n){var r=this[i];return this[i]=n,n[i]=r,n[t]=this,r&&(r[t]=n),n},r}function fi(n,t,i){return i!==undefined?"("+n+";"+t+";"+i+")":t!==undefined?"("+n+";"+t+")":n!==undefined?"("+n+")":""}function tt(n,t,i,r){o("WinJS.Scheduler:"+n+fi(i,r)+","+t)}function v(n,t,i,r,u){var f=n.name||r!==undefined||u!==undefined;o("WinJS.Scheduler:"+t+":"+n.id+(f?fi(n.name,r,u):"")+","+i)}function c(){return!1}function ft(n){throw"Illegal call by job("+n.id+") in state: "+this.name;}function g(n){return function(t,i,r){t._setState(n,i,r)}}function wt(n,t){n._setPriority(t)}function lr(n,t){function f(n,t){u.log&&u.log(t+": MARKER: "+n.name,"winjs scheduler","log")}function e(n,t){u.log&&u.log(t+": JOB("+n.id+"): state: "+(n._state?n._state.name:"")+(n.name?", name: "+n.name:""),"winjs scheduler","log")}u.log&&u.log("highWaterMark: "+a,"winjs scheduler","log");var r=0,o=t?bt[bt.length-1]:bt[0],i=o;do i instanceof h&&f(i,r),i instanceof it&&e(i,r),r++,i=t?i["_prev"+n]:i["_next"+n];while(i)}function ar(){function u(t,i){n+="    "+(i?"*":" ")+"id: "+t.id+", priority: "+w(t.priority).name+(t.name?", name: "+t.name:"")+"\n"}var n="",t,r,i,f;for(n+="Jobs:\n",t=w(a),r=0,pt&&(u(pt,!0),r++);t.priority>=p.min;)t instanceof it&&(u(t,!1),r++),t=t._nextJob;for(r===0&&(n+="     None\n"),n+="Drain requests:\n",i=0,f=y.length;i<f;i++)n+="    "+(i===0?"*":" ")+"priority: "+w(y[i].priority).name+", name: "+y[i].name+"\n";return y.length===0&&(n+="     None\n"),n}function vr(){var n=bt[0];do{if(n instanceof it)return!1;n=n._nextJob}while(n);return!0}function rr(){return y.length===0?null:y[0].priority}function si(n){tt("drain","StartTM",n.name,w(n.priority).name)}function ur(n,t){t&&tt("drain-canceled","info",n.name,w(n.priority).name);tt("drain","StopTM",n.name,w(n.priority).name)}function yr(n,t,i){y.push({priority:n,complete:t,name:i});y.length===1&&(si(y[0]),n>a&&(a=n,ct=!0))}function pr(n,t){for(var r=y.length,i=0;i<r;i++)if(y[i].complete===n){i===0&&(ur(y[0],t),y[1]&&si(y[1]));y.splice(i,1);break}}function wr(){var n=y.shift();n&&(ur(n),y[0]&&si(y[0]),n.complete())}function fr(){var t=!1,n;if(!!y.length)for(n=rr();+n===n&&n>a;)kt=n,wr(),t=!0,n=rr();return t}function gt(n){return n>=p.aboveNormal+1?l.HIGH:n>=p.belowNormal?l.NORMAL:l.IDLE}function kr(n,t){return lt[n]>=lt[t]}function dr(n,t){return lt[n]>lt[t]}function er(n){switch(n){case l.HIGH:return!1;case l.NORMAL:return l.isTaskScheduledAtPriorityOrHigher(l.HIGH);case l.IDLE:return l.isTaskScheduledAtPriorityOrHigher(l.NORMAL)}}function gr(n,t){var i=w(t);i.priority>a&&(a=i.priority,ct=!0);i._insertJobAfter(n)}function ci(n,t){var i=w(t);i.priority>a&&(a=i.priority,ct=!0);i._nextMarker._insertJobBefore(n)}function li(n){return n=n|0,n=Math.max(n,cr),Math.min(n,tr)}function w(n){return n=li(n),bt[-1*(n-tr)]}function nu(n){var c,s,e,b;ni=!0;tt("timeslice","StartTM");var r,u=!0,t,i,o=!1,f=!1;ct=!1;try{for(var k=ai(),d=k+ir,h=function(){return(o=!1,ct)?!0:er(gt(a))?!0:!y.length?ai()>d?(o=!0,!0):!1:!1};a>=p.min&&!h()&&!f;){r=!1;t=w(a)._nextJob;do kt=t.priority,t instanceof it?(i!==t.priority&&(+i===i&&tt("priority","StopTM",w(i).name),tt("priority","StartTM",w(t.priority).name),i=t.priority),r=!0,u=!1,pt=t,v(pt,"job-running","StartTM",w(kt).name),t._execute(h),v(pt,"job-running","StopTM",w(kt).name),pt=null,u=!0):(c=gt(a),a=t.priority,r=fr(),s=gt(a),dr(c,s)&&(!dt||l.isTaskScheduledAtPriorityOrHigher(s))&&(f=!0)),t=t._nextJob;while(t&&!r&&!f&&!er(gt(a)));ct=!1}}finally{for(pt=null,u||(v(t,"job-error","info"),v(t,"job-running","StopTM",w(kt).name),t.cancel()),+i===i&&tt("priority","StopTM",w(i).name),e=!1;a>=p.min&&!e;){r=!1;t=w(a)._nextJob;do t instanceof it?e=!0:(a=t.priority,r=fr()),t=t._nextJob;while(t&&!r&&!e)}b=u?o?"timeslice exhausted":a<p.min?"jobs exhausted":f?"reached WWA priority boundary":"WWA host work":"job error";n&&(ui=null);ni=!1;a>=p.min&&pi();tt("yielding","info",b);tt("timeslice","StopTM")}}function pi(n){var t,i,r;(+n!==n&&(n=a),t=gt(n),ni)||ui&&(!dt||kr(ui,t))||(i=++vi,r=function(){yi<i&&(yi=vi,nu(!0))},l.execAsyncAtPriority(r,t),ui=t)}function tu(n,t){var u=hr++,i,r;return t===undefined&&(t="Drain Request "+u),n=+n===n?n:p.min,n=li(n),r=new s(function(r){i=r;yr(n,i,t)},function(){pr(i,!0)}),ni||pi(),r}function iu(n){return l.execAtPriority(n,l.HIGH)}function ru(){return new ki}function or(n,t,i,r){t=t||p.normal;i=i||null;var u=++sr,f=e._traceAsyncOperationStarting("WinJS.Utilities.Scheduler.schedule: "+u+fi(r));return r=r||"",new it(u,n,t,i,r,f)}function uu(){if(ni)return kt;switch(l.getCurrentPriority()){case l.HIGH:return p.high;case l.NORMAL:return p.normal;case l.IDLE:return p.idle}}function ti(n){return function(t,i){var r;return new s(function(u){r=or(function(){u(t)},n,null,i)},function(){r.cancel()})}}var wi,it,h,lt,ai,vi,yi;i.Namespace.define("WinJS.Utilities",{_linkedListMixin:ii});wi={get jobInfoIsNoLongerValid(){return"The job info object can only be used while the job is running"}};it=i.Class.define(function(n,t,i,r,u,f){this._id=n;this._work=t;this._context=r;this._name=u;this._asyncOpID=f;this._setPriority(i);this._setState(di);v(this,"job-scheduled","info")},{completed:{get:function(){return!!this._state.completed}},id:{get:function(){return this._id}},name:{get:function(){return this._name},set:function(n){this._name=n}},owner:{get:function(){return this._owner},set:function(n){this._owner&&this._owner._remove(this);this._owner=n;this._owner&&this._owner._add(this)}},priority:{get:function(){return this._priority},set:function(n){n=li(n);this._state.setPriority(this,n)}},cancel:function(){this._state.cancel(this)},pause:function(){this._state.pause(this)},resume:function(){this._state.resume(this)},_execute:function(n){this._state.execute(this,n)},_executeDone:function(n){return this._state.executeDone(this,n)},_blockedDone:function(n){return this._state.blockedDone(this,n)},_setPriority:function(n){+this._priority===this._priority&&this._priority!==n&&v(this,"job-priority-changed","info",w(this._priority).name,w(n).name);this._priority=n},_setState:function(n,t,i){this._state&&u.log&&u.log("Transitioning job ("+this.id+") from: "+this._state.name+" to: "+n.name,"winjs scheduler","log");this._state=n;this._state.enter(this,t,i)}});i.Class.mix(it,ii("Job"));var k={complete:1,"continue":2,block:3},bi=i.Class.define(function(n,t){this._job=t;this._result=null;this._yieldPolicy=k.complete;this._shouldYield=n},{job:{get:function(){return this._throwIfDisabled(),this._job}},shouldYield:{get:function(){return this._throwIfDisabled(),this._shouldYield()}},setPromise:function(n){this._throwIfDisabled();this._result=n;this._yieldPolicy=k.block},setWork:function(n){this._throwIfDisabled();this._result=n;this._yieldPolicy=k.continue},_disablePublicApi:function(){this._publicApiDisabled=!0},_throwIfDisabled:function(){if(this._publicApiDisabled)throw new r("WinJS.Utilities.Scheduler.JobInfoIsNoLongerValid",wi.jobInfoIsNoLongerValid);}}),ki=i.Class.define(function(){this._jobs={}},{cancelAll:function(){var t=this._jobs,i=Object.keys(t),n,r;for(this._jobs={},n=0,r=i.length;n<r;n++)t[i[n]].cancel()},_add:function(n){this._jobs[n.id]=n},_remove:function(n){delete this._jobs[n.id]}});var b=i.Class.define(function(n){this.name=n;this.enter=ft;this.execute=ft;this.executeDone=ft;this.blockedDone=ft;this.cancel=ft;this.pause=ft;this.resume=ft;this.setPriority=ft}),di=new b("created"),rt=new b("scheduled"),at=new b("paused"),d=new b("canceled"),vt=new b("running"),et=new b("running_paused"),yt=new b("running_resumed"),ut=new b("running_canceled"),gi=new b("running_canceled_blocked"),ri=new b("cooperative_yield"),ei=new b("cooperative_yield_paused"),oi=new b("blocked"),ot=new b("blocked_waiting"),nr=new b("blocked_paused"),st=new b("blocked_paused_waiting"),ht=new b("blocked_canceled"),nt=new b("complete");di.enter=function(n){ci(n,n.priority);n._setState(rt)};rt.enter=function(){pi()};rt.execute=g(vt);rt.cancel=g(d);rt.pause=g(at);rt.resume=c;rt.setPriority=function(n,t){n.priority!==t&&(n._setPriority(t),n.pause(),n.resume())};at.enter=function(n){v(n,"job-paused","info");n._removeJob()};at.cancel=g(d);at.pause=c;at.resume=function(n){v(n,"job-resumed","info");ci(n,n.priority);n._setState(rt)};at.setPriority=wt;d.enter=function(n){v(n,"job-canceled","info");e._traceAsyncOperationCompleted(n._asyncOpID,t.Debug&&t.Debug.MS_ASYNC_OP_STATUS_CANCELED);n._removeJob();n._work=null;n._context=null;n.owner=null};d.cancel=c;d.pause=c;d.resume=c;d.setPriority=c;vt.enter=function(n,t){var i,f;n._removeJob();var r=n.priority,o=n._work,u=n._context;n._work=null;n._context=null;i=new bi(t,n);e._traceAsyncCallbackStarting(n._asyncOpID);try{l.execAtPriority(function(){o.call(u,i)},gt(r))}finally{e._traceAsyncCallbackCompleted();i._disablePublicApi()}n._context=u;f=n._executeDone(i._yieldPolicy);n._setState(f,i._result,r)};vt.executeDone=function(n,t){switch(t){case k.complete:return nt;case k.continue:return ri;case k.block:return oi}};vt.cancel=function(n){ct=!0;n._setState(ut)};vt.pause=function(n){ct=!0;n._setState(et)};vt.resume=c;vt.setPriority=wt;et.enter=c;et.executeDone=function(n,t){switch(t){case k.complete:return nt;case k.continue:return ei;case k.block:return nr}};et.cancel=g(ut);et.pause=c;et.resume=g(yt);et.setPriority=wt;yt.enter=c;yt.executeDone=function(n,t){switch(t){case k.complete:return nt;case k.continue:return ri;case k.block:return oi}};yt.cancel=g(ut);yt.pause=g(et);yt.resume=c;yt.setPriority=wt;ut.enter=c;ut.executeDone=function(n,t){switch(t){case k.complete:case k.continue:return d;case k.block:return gi}};ut.cancel=c;ut.pause=c;ut.resume=c;ut.setPriority=c;gi.enter=function(n,t){t.cancel();n._setState(d)};ri.enter=function(n,t,i){v(n,"job-yielded","info");i===n.priority?gr(n,n.priority):ci(n,n.priority);n._work=t;n._setState(rt)};ei.enter=function(n,t){v(n,"job-yielded","info");n._work=t;n._setState(at)};oi.enter=function(n,t,i){v(n,"job-blocked","StartTM");n._work=t;n._setState(ot);t.done(function(t){v(n,"job-blocked","StopTM");var r=n._blockedDone(t);n._setState(r,t,i)},function(t){return t&&t.name==="Canceled"||v(n,"job-error","info"),v(n,"job-blocked","StopTM"),n._setState(d),s.wrapError(t)})};ot.enter=c;ot.blockedDone=function(n,t){return typeof t=="function"?ri:nt};ot.cancel=g(ht);ot.pause=g(st);ot.resume=c;ot.setPriority=wt;nr.enter=function(n,t,i){v(n,"job-blocked","StartTM");n._work=t;n._setState(st);t.done(function(t){v(n,"job-blocked","StopTM");var r=n._blockedDone(t);n._setState(r,t,i)},function(t){return t&&t.name==="Canceled"||v(n,"job-error","info"),v(n,"job-blocked","StopTM"),n._setState(d),s.wrapError(t)})};st.enter=c;st.blockedDone=function(n,t){return typeof t=="function"?ei:nt};st.cancel=g(ht);st.pause=c;st.resume=g(ot);st.setPriority=wt;ht.enter=function(n){n._work.cancel();n._work=null};ht.blockedDone=function(){return d};ht.cancel=c;ht.pause=c;ht.resume=c;ht.setPriority=c;nt.completed=!0;nt.enter=function(n){e._traceAsyncOperationCompleted(n._asyncOpID,t.Debug&&t.Debug.MS_ASYNC_OP_STATUS_SUCCESS);n._work=null;n._context=null;n.owner=null;v(n,"job-completed","info")};nt.cancel=c;nt.pause=c;nt.resume=c;nt.setPriority=c;h=i.Class.define(function(n,t){this.priority=n;this.name=t},{});i.Class.mix(h,ii("Job"),ii("Marker"));var sr=0,hr=0,cr=-15,tr=15,p={max:15,high:13,aboveNormal:9,normal:0,belowNormal:-9,idle:-13,min:-15},bt=[new h(15,"max"),new h(14,"14"),new h(13,"high"),new h(12,"12"),new h(11,"11"),new h(10,"10"),new h(9,"aboveNormal"),new h(8,"8"),new h(7,"7"),new h(6,"6"),new h(5,"5"),new h(4,"4"),new h(3,"3"),new h(2,"2"),new h(1,"1"),new h(0,"normal"),new h(-1,"-1"),new h(-2,"-2"),new h(-3,"-3"),new h(-4,"-4"),new h(-5,"-5"),new h(-6,"-6"),new h(-7,"-7"),new h(-8,"-8"),new h(-9,"belowNormal"),new h(-10,"-10"),new h(-11,"-11"),new h(-12,"-12"),new h(-13,"idle"),new h(-14,"-14"),new h(-15,"min"),new h(-16,"<TAIL>")];var ui=null,ni,kt,pt=null,dt=!!(t.MSApp&&t.MSApp.execAtPriority),y=[],ct,ir=30,a=p.min;bt.reduce(function(n,t){return n&&(n._insertJobAfter(t),n._insertMarkerAfter(t)),t});var br=t.setImmediate?t.setImmediate.bind(t):function(n){t.setTimeout(n,16)},hi={execAsyncAtPriority:function(n,i){i===l.HIGH&&t.setTimeout(n,0);br(n)},execAtPriority:function(n){return n()},getCurrentPriority:function(){return hi.NORMAL},isTaskScheduledAtPriorityOrHigher:function(){return!1},HIGH:"high",NORMAL:"normal",IDLE:"idle"},l=dt?t.MSApp:hi;lt={};lt[l.IDLE]=1;lt[l.NORMAL]=2;lt[l.HIGH]=3;ai=t.performance&&t.performance.now&&t.performance.now.bind(t.performance)||Date.now.bind(Date);vi=0;yi=0;i.Namespace._moduleDefine(n,"WinJS.Utilities.Scheduler",{Priority:p,schedule:or,createOwnerToken:ru,execHigh:iu,requestDrain:tu,currentPriority:{get:uu},schedulePromiseHigh:ti(p.high),schedulePromiseAboveNormal:ti(p.aboveNormal),schedulePromiseNormal:ti(p.normal),schedulePromiseBelowNormal:ti(p.belowNormal),schedulePromiseIdle:ti(p.idle),retrieveState:ar,_JobNode:it,_JobInfo:bi,_OwnerToken:ki,_dumpList:lr,_isEmpty:{get:vr},_usingWwaScheduler:{get:function(){return dt},set:function(n){dt=n;l=dt?t.MSApp:hi}},_MSApp:{get:function(){return l},set:function(n){l=n}},_TIME_SLICE:ir})}),r("WinJS/Core/_BaseUtils",["exports","./_Global","./_Base","./_BaseCoreUtils","./_ErrorFromName","./_Resources","./_Trace","../Promise","../Scheduler"],function(n,t,i,r,u,f,e,o,s){"use strict";function g(n){return n}function p(n,t,i){return n.split(".").reduce(function(n,t){return n?i(n[t]):null},t)}function nt(n,i){return n?p(n,i||t,g):null}function w(n){return n.length>0&&n.indexOf("-moz")!==0&&n.charAt(0)==="-"&&(n=n.slice(1)),n.replace(/\-[a-z]/g,function(n){return n[1].toUpperCase()})}function b(n,t){return n===""?t:n+t.charAt(0).toUpperCase()+t.slice(1)}function a(n,t){return(n!==""?"-"+n.toLowerCase()+"-":"")+t}function tt(){var r,c,n,l,u,v,f,o,y;if(!t.document)return{};var i={},p=t.document.documentElement.style,s=["","webkit","ms","Moz"],h=["animation","transition","transform","animation-name","animation-duration","animation-delay","animation-timing-function","animation-iteration-count","animation-direction","animation-fill-mode","grid-column","grid-columns","grid-column-span","grid-row","grid-rows","grid-row-span","transform-origin","transition-property","transition-duration","transition-delay","transition-timing-function","scroll-snap-points-x","scroll-snap-points-y","scroll-chaining","scroll-limit","scroll-limit-x-max","scroll-limit-x-min","scroll-limit-y-max","scroll-limit-y-min","scroll-snap-type","scroll-snap-x","scroll-snap-y","touch-action","overflow-style","user-select"],e={};for(r=0,c=h.length;r<c;r++)for(n=h[r],l=w(n),u=0,v=s.length;u<v;u++)if(f=s[u],o=b(f,l),o in p){y=a(f,n);i[n]={cssName:y,scriptName:o};e[n]=f;break}return i.animationPrefix=a(e.animation,""),i.keyframes=a(e.animation,"keyframes"),i}function it(){for(var u,f,c,o,n,l,r,i={},s=["","WebKit"],h=[{eventObject:"TransitionEvent",events:["transitionStart","transitionEnd"]},{eventObject:"AnimationEvent",events:["animationStart","animationEnd"]}],e=0,a=h.length;e<a;e++){for(u=h[e],f="",n=0,c=s.length;n<c;n++)if(o=s[n],o+u.eventObject in t){f=o.toLowerCase();break}for(n=0,l=u.events.length;n<l;n++)r=u.events[n],i[r]=b(f,r),f===""&&(i[r]=i[r].toLowerCase())}return i.manipulationStateChanged="MSManipulationEvent"in t?"ManipulationEvent":null,i}function rt(n,t){function e(){return o.timeout(n).then(function(){i=null})}var i=null,f=null,r=null,u=null;return function(){f?(r=this,u=[].slice.call(arguments,0)):i?(r=this,u=[].slice.call(arguments,0),f=i.then(function(){var o=r,n;r=null;n=u;u=null;i=e();f=null;t.apply(o,n)})):(i=e(),t.apply(this,arguments))}}var k={get notSupportedForProcessing(){return"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}'"}},c,d=0,h={},v=!1,l=t.navigator.platform,y=l==="iPhone"||l==="iPad"||l==="iPod";i.Namespace._moduleDefine(n,"WinJS.Utilities",{_setHasWinRT:{value:function(n){r.hasWinRT=n},configurable:!1,writable:!1,enumerable:!1},hasWinRT:{get:function(){return r.hasWinRT},configurable:!1,enumerable:!0},_setIsiOS:{value:function(n){y=n},configurable:!1,writable:!1,enumerable:!1},_isiOS:{get:function(){return y},configurable:!1,enumerable:!0},_getMemberFiltered:p,getMember:nt,_browserStyleEquivalents:tt(),_browserEventEquivalents:it(),_getCamelCasedName:w,ready:function ut(n,i){return new o(function(r,u){function f(){if(n)try{n();r()}catch(t){u(t)}else r()}var e=ut._testReadyState;e||(e=t.document?t.document.readyState:"complete");e==="complete"||t.document&&t.document.body!==null?i?s.schedule(function(){f()},s.Priority.normal,null,"WinJS.Utilities.ready"):f():t.addEventListener("DOMContentLoaded",f,!1)})},strictProcessing:{get:function(){return!0},configurable:!1,enumerable:!0},markSupportedForProcessing:{value:r.markSupportedForProcessing,configurable:!1,writable:!1,enumerable:!0},requireSupportedForProcessing:{value:function(n){var i=!0,r,e;i=i&&n!==t;i=i&&n!==t.location;i=i&&!(n instanceof t.HTMLIFrameElement);i=i&&!(typeof n=="function"&&!n.supportedForProcessing);switch(t.frames.length){case 0:break;case 1:i=i&&n!==t.frames[0];break;default:for(r=0,e=t.frames.length;i&&r<e;r++)i=i&&n!==t.frames[r]}if(i)return n;throw new u("WinJS.Utilities.requireSupportedForProcessing",f._formatString(k.notSupportedForProcessing,n));},configurable:!1,writable:!1,enumerable:!0},_setImmediate:r._setImmediate,_requestAnimationFrame:t.requestAnimationFrame?t.requestAnimationFrame.bind(t):function(n){var i=++d;return h[i]=n,c=c||t.setTimeout(function(){var n=h,t=Date.now();h={};c=null;Object.keys(n).forEach(function(i){n[i](t)})},16),i},_cancelAnimationFrame:t.cancelAnimationFrame?t.cancelAnimationFrame.bind(t):function(n){delete h[n]},_yieldForEvents:t.setImmediate?t.setImmediate.bind(t):function(n){t.setTimeout(n,0)},_yieldForDomModification:t.setImmediate?t.setImmediate.bind(t):function(n){t.setTimeout(n,0)},_throttledFunction:rt,_shallowCopy:function(n){return this._mergeAll([n])},_merge:function(n,t){return this._mergeAll([n,t])},_mergeAll:function(n){var t={};return n.forEach(function(n){Object.keys(n).forEach(function(i){t[i]=n[i]})}),t},_getProfilerMarkIdentifier:function(n){var t="";return n.id&&(t+=" id='"+n.id+"'"),n.className&&(t+=" class='"+n.className+"'"),t},_now:function(){return t.performance&&t.performance.now&&t.performance.now()||Date.now()},_traceAsyncOperationStarting:e._traceAsyncOperationStarting,_traceAsyncOperationCompleted:e._traceAsyncOperationCompleted,_traceAsyncCallbackStarting:e._traceAsyncCallbackStarting,_traceAsyncCallbackCompleted:e._traceAsyncCallbackCompleted,_version:"4.4.0"});i.Namespace._moduleDefine(n,"WinJS",{validation:{get:function(){return v},set:function(n){v=n}}});i.Namespace.define("WinJS",{strictProcessing:{value:function(){},configurable:!1,writable:!1,enumerable:!1}})}),r("WinJS/Utilities/_ElementUtilities",["exports","../Core/_Global","../Core/_Base","../Core/_BaseUtils","../Core/_WinRT","../Promise","../Scheduler"],function(n,t,i,r,u,f,e){"use strict";function ui(){return b||(b={},Object.keys(t.CSS2Properties.prototype).forEach(function(n){b[n]=""})),b}function l(n,i){return t.getComputedStyle(n,i)||ui()}function v(n){for(var i=n.length,t=i-1;t>=0;t--)n[t]||(n.splice(t,1),i--);return i}function d(n){var t=n.className||"";return typeof t=="string"?t:t.baseVal||""}function y(n,t){var i=n.className||"";return typeof i=="string"?n.className=t:n.className.baseVal=t,n}function rt(n,t){var h,r,o,s,i;if(n.classList){if(t.indexOf(" ")<0)n.classList.add(t);else for(r=t.split(" "),v(r),i=0,h=r.length;i<h;i++)n.classList.add(r[i]);return n}var c=d(n),f=c.split(" "),e=v(f),u;if(t.indexOf(" ")>=0){for(r=t.split(" "),v(r),i=0;i<e;i++)o=r.indexOf(f[i]),o>=0&&r.splice(o,1);r.length>0&&(u=r.join(" "))}else{for(s=!1,i=0;i<e;i++)if(f[i]===t){s=!0;break}s||(u=t)}return u&&(e>0&&f[0].length>0?y(n,c+" "+u):y(n,u)),n}function ut(n,t){var e,f,r,o,s,u,h,i;if(n.classList){if(n.classList.length===0)return n;for(r=t.split(" "),v(r),i=0,e=r.length;i<e;i++)n.classList.remove(r[i]);return n}if(f=d(n),t.indexOf(" ")>=0)r=t.split(" "),o=v(r);else{if(f.indexOf(t)<0)return n;r=[t];o=1}for(u=f.split(" "),h=v(u),i=h-1;i>=0;i--)r.indexOf(u[i])>=0&&(u.splice(i,1),s=!0);return s&&y(n,u.join(" ")),n}function fi(n,t){var r;if(n.classList)return n.classList.toggle(t),n;var u=d(n),i=u.trim().split(" "),f=i.length,e=!1;for(r=0;r<f;r++)i[r]===t&&(e=!0);return e?y(n,i.reduce(function(n,i){return i===t?n:n&&n.length>0?n+" "+i:i},"")):f>0&&i[0].length>0?y(n,u+" "+t):y(n,u+t),n}function ei(n,t,i){n.getAttribute(t)!==""+i&&n.setAttribute(t,i)}function ft(n,t,i,r){var u=Math.max(t,Math.min(i,+n));return u===0?0:u||Math.max(t,Math.min(i,r))}function kt(n,t){if(!wt.test(t)&&bt.test(t)){var i=n.style.left;return n.style.left=t,t=n.style.pixelLeft,n.style.left=i,t}return Math.round(parseFloat(t))||0}function o(n,t){return kt(n,l(n,null)[t])}function p(n){return parseFloat(n)||0}function s(n,t){return p(l(n,null)[t])}function oi(n){var t=l(n);return{top:p(t.marginTop),right:p(t.marginRight),bottom:p(t.marginBottom),left:p(t.marginLeft)}}function dt(n,t,i,r,u){var f=t.toLowerCase();n._eventsMap||(n._eventsMap={});n._eventsMap[f]||(n._eventsMap[f]=[]);n._eventsMap[f].push({listener:i,useCapture:r,data:u})}function ot(n,t,i,r){var o=t.toLowerCase(),f=n._eventsMap&&n._eventsMap[o],u,e;if(f)for(u=f.length-1;u>=0;u--)if(e=f[u],e.listener===i&&!!r==!!e.useCapture)return f.splice(u,1),e;return null}function ci(n,t){var i=t.toLowerCase();return n._eventsMap&&n._eventsMap[i]&&n._eventsMap[i].slice(0)||[]}function g(n,t,i){for(var u,r,f;n;){for(u=ci(n,t),r=0,f=u.length;r<f;r++)u[r].listener.call(n,i);n=n.parentNode}}function st(n){return(n.relatedTarget&&n.relatedTarget.tagName==="IFRAME"||n.target&&n.target.tagName==="IFRAME")&&(n.relatedTarget=null),n}function gt(n,t,i,r){if(r)throw"This custom WinJS event only supports bubbling";dt(n,t,i,r)}function li(n,t){var f=t.changedTouches,u=null,r,e;if(!f)return u;for(r=0,e=f.length;r<e;r++){var i=f[r],o=new nt(t,{pointerType:et.MSPOINTER_TYPE_TOUCH,pointerId:i.identifier,isPrimary:r===0,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY,pageX:i.pageX,pageY:i.pageY,radiusX:i.radiusX,radiusY:i.radiusY,rotationAngle:i.rotationAngle,force:i.force,_currentTouch:i}),s=n(o);u=u||s}return u}function ai(n,t){return t.pointerType=et.MSPOINTER_TYPE_MOUSE,t.pointerId=-1,t.isPrimary=!0,n(t)}function vi(n,t){return n(t)}function yi(n,i,r,u){var e=i.toLowerCase(),s,h,c,f=tt[e],o;t.MSPointerEvent?(c=function(n){return n._normalizedType=e,o=!0,vi(r,n)},n.addEventListener(f.mspointer,c,u)):(f.mouse&&(s=function(n){if(n._normalizedType=e,!o)return ai(r,n);o=!1},n.addEventListener(f.mouse,s,u)),f.touch&&(h=function(n){return n._normalizedType=e,o=!0,li(r,n)},n.addEventListener(f.touch,h,u)));dt(n,i,r,u,{mouseWrapper:s,touchWrapper:h,mspointerWrapper:c})}function pi(n,t,i,r){var e=t.toLowerCase(),u=ot(n,t,i,r),f;u&&(f=tt[e],u.data.mouseWrapper&&n.removeEventListener(f.mouse,u.data.mouseWrapper,r),u.data.touchWrapper&&n.removeEventListener(f.touch,u.data.touchWrapper,r),u.data.mspointerWrapper&&n.removeEventListener(f.mspointer,u.data.mspointerWrapper,r))}function ti(){var n=t.document.createElement("div"),i;n.style.direction="rtl";n.innerHTML="<div style='width: 100px; height: 100px; overflow: scroll; visibility:hidden'><div style='width: 10000px; height: 100px;'><\/div><\/div>";t.document.body.appendChild(n);i=n.firstChild;i.scrollLeft>0&&(at=!0);i.scrollLeft+=100;i.scrollLeft===0&&(ni=!0);t.document.body.removeChild(n);lt=!0}function vt(n){var i=l(n),t=n.scrollLeft;return i.direction==="rtl"&&(lt||ti(),at&&(t=n.scrollWidth-n.clientWidth-t),t=Math.abs(t)),{scrollLeft:t,scrollTop:n.scrollTop}}function yt(n,t,i){if(t!==undefined){var r=l(n);r.direction==="rtl"&&(lt||ti(),ni?t=-t:at&&(t=n.scrollWidth-n.clientWidth-t));n.scrollLeft=t}i!==undefined&&(n.scrollTop=i)}function ii(n){return vt(n)}function di(n,t){t=t||{};yt(n,t.scrollLeft,t.scrollTop)}function ri(n){return n.uniqueID||n._uniqueID||(n._uniqueID="element__"+ ++tr),n.uniqueID||n._uniqueID}function ir(n){n.id||(n.id=ri(n))}function rr(n){var i=t.document.documentElement,r=ii(i);return{left:n.clientX+(t.document.body.dir==="rtl"?-r.scrollLeft:r.scrollLeft),top:n.clientY+i.scrollTop}}function ur(n,t){for(var r,u=[],i=0,f=t.length;i<f;i++)r=n.querySelector("."+t[i]),r&&u.push(r);return u}var w,b,wt,bt,ht,c,nt,tt,h,a,pt,k;if(t.document){w=167;b=null;wt=/^-?\d+\.?\d*(px)?$/i;bt=/^-?\d+/i;var si=t.MSGestureEvent||{MSGESTURE_FLAG_BEGIN:1,MSGESTURE_FLAG_CANCEL:4,MSGESTURE_FLAG_END:2,MSGESTURE_FLAG_INERTIA:8,MSGESTURE_FLAG_NONE:0},hi=t.MSManipulationEvent||{MS_MANIPULATION_STATE_ACTIVE:1,MS_MANIPULATION_STATE_CANCELLED:6,MS_MANIPULATION_STATE_COMMITTED:7,MS_MANIPULATION_STATE_DRAGGING:5,MS_MANIPULATION_STATE_INERTIA:2,MS_MANIPULATION_STATE_PRESELECT:3,MS_MANIPULATION_STATE_SELECTING:4,MS_MANIPULATION_STATE_STOPPED:0},et=t.MSPointerEvent||{MSPOINTER_TYPE_TOUCH:"touch",MSPOINTER_TYPE_PEN:"pen",MSPOINTER_TYPE_MOUSE:"mouse"};ht="onfocusin"in t.document.documentElement;c=null;t.addEventListener(ht?"focusout":"blur",function(n){if(n.target===t){var i=c;i&&g(i,"focusout",st({type:"focusout",target:i,relatedTarget:null}));c=null}});t.document.documentElement.addEventListener(ht?"focusin":"focus",function(n){var t=c;c=n.target;t&&g(t,"focusout",st({type:"focusout",target:t,relatedTarget:c}));c&&g(c,"focusin",st({type:"focusin",target:c,relatedTarget:t}))},!0);nt=function(n,t){t=t||{};this.__eventObject=n;var i=this;Object.keys(t).forEach(function(n){Object.defineProperty(i,n,{value:t[n]})})};["altKey","AT_TARGET","bubbles","BUBBLING_PHASE","button","buttons","cancelable","cancelBubble","CAPTURING_PHASE","clientX","clientY","ctrlKey","currentTarget","defaultPrevented","detail","eventPhase","fromElement","getModifierState","height","hwTimestamp","initEvent","initMouseEvent","initPointerEvent","initUIEvent","isPrimary","isTrusted","layerX","layerY","metaKey","offsetX","offsetY","pageX","pageY","pointerId","pointerType","pressure","preventDefault","relatedTarget","rotation","screenX","screenY","shiftKey","srcElement","stopImmediatePropagation","stopPropagation","target","tiltX","tiltY","timeStamp","toElement","type","view","which","width","x","y","_normalizedType","_fakedBySemanticZoom"].forEach(function(n){Object.defineProperty(nt.prototype,n,{get:function(){var t=this.__eventObject[n];return typeof t=="function"?t.bind(this.__eventObject):t},configurable:!0})});tt={pointerdown:{touch:"touchstart",mspointer:"MSPointerDown",mouse:"mousedown"},pointerup:{touch:"touchend",mspointer:"MSPointerUp",mouse:"mouseup"},pointermove:{touch:"touchmove",mspointer:"MSPointerMove",mouse:"mousemove"},pointerenter:{touch:"touchenter",mspointer:"MSPointerEnter",mouse:"mouseenter"},pointerover:{touch:null,mspointer:"MSPointerOver",mouse:"mouseover"},pointerout:{touch:"touchleave",mspointer:"MSPointerOut",mouse:"mouseout"},pointercancel:{touch:"touchcancel",mspointer:"MSPointerCancel",mouse:null}};h={focusout:{register:gt,unregister:ot},focusin:{register:gt,unregister:ot}};t.PointerEvent||(a={register:yi,unregister:pi},h.pointerdown=a,h.pointerup=a,h.pointermove=a,h.pointerenter=a,h.pointerover=a,h.pointerout=a,h.pointercancel=a);var wi=i.Class.define(function(n){this._callback=n;this._toDispose=[];this._attributeFilter=[];this._scheduled=!1;this._pendingChanges=[];this._observerCount=0;this._handleCallback=this._handleCallback.bind(this);this._targetElements=[]},{observe:function(n,t){this._targetElements.indexOf(n)===-1&&this._targetElements.push(n);this._observerCount++;t.attributes&&this._addRemovableListener(n,"DOMAttrModified",this._handleCallback);t.attributeFilter&&(this._attributeFilter=t.attributeFilter)},disconnect:function(){this._observerCount=0;this._targetElements=[];this._toDispose.forEach(function(n){n()})},_addRemovableListener:function(n,t,i){n.addEventListener(t,i);this._toDispose.push(function(){n.removeEventListener(t,i)})},_handleCallback:function(n){var t,i;(n.stopPropagation(),t=n.attrName,this._attributeFilter.length&&this._attributeFilter.indexOf(t)===-1)||this._targetElements.indexOf(n.target)!==-1&&(i=t.indexOf("aria")>=0,t==="tabindex"&&(t="tabIndex"),this._pendingChanges.push({type:"attributes",target:n.target,attributeName:t}),this._observerCount!==1||i?this._scheduled===!1&&(this._scheduled=!0,r._setImmediate(this._dispatchEvent.bind(this))):this._dispatchEvent())},_dispatchEvent:function(){try{this._callback(this._pendingChanges)}finally{this._pendingChanges=[];this._scheduled=!1}}},{_isShim:!0}),bi=t.MutationObserver||wi,ct=null,ki=i.Class.define(function(){t.addEventListener("resize",this._handleResize.bind(this))},{subscribe:function(n,t){n.addEventListener(this._resizeEvent,t);rt(n,this._resizeClass)},unsubscribe:function(n,t){ut(n,this._resizeClass);n.removeEventListener(this._resizeEvent,t)},_handleResize:function(){for(var i,r=t.document.querySelectorAll("."+this._resizeClass),u=r.length,n=0;n<u;n++)i=t.document.createEvent("Event"),i.initEvent(this._resizeEvent,!1,!0),r[n].dispatchEvent(i)},_resizeClass:{get:function(){return"win-element-resize"}},_resizeEvent:{get:function(){return"WinJSElementResize"}}}),it=i.Class.define(function(n,t,i){i=i||{};this.registerThruWinJSCustomEvents=!!i.registerThruWinJSCustomEvents;this.objectName=n;this.object=t;this.capture={};this.bubble={}},{addEventListener:function(t,i,r,u){i=i.toLowerCase();var e=this._getHandlers(u),f=e[i];f||(f=this._getListener(i,u),f.refCount=0,e[i]=f,this.registerThruWinJSCustomEvents?n._addEventListener(this.object,i,f,u):this.object.addEventListener(i,f,u));f.refCount++;t.addEventListener(this._getEventName(i,u),r);rt(t,this._getClassName(i,u))},removeEventListener:function(t,i,r,u){i=i.toLowerCase();var e=this._getHandlers(u),f=e[i];f&&(f.refCount--,f.refCount===0&&(this.registerThruWinJSCustomEvents?n._removeEventListener(this.object,i,f,u):this.object.removeEventListener(i,f,u),delete e[i]));ut(t,this._getClassName(i,u));t.removeEventListener(this._getEventName(i,u),r)},_getHandlers:function(n){return n?this.capture:this.bubble},_getClassName:function(n,t){var i=t?"capture":"bubble";return"win-"+this.objectName.toLowerCase()+"-event-"+n+i},_getEventName:function(n,t){var i=t?"capture":"bubble";return"WinJS"+this.objectName+"Event-"+n+i},_getListener:function(n,i){var r=function(r){for(var u,s,o=t.document.querySelectorAll("."+this._getClassName(n,i)),h=o.length,f=!1,e=0;e<h;e++)u=t.document.createEvent("Event"),u.initEvent(this._getEventName(n,i),!1,!0),u.detail={originalEvent:r},s=o[e].dispatchEvent(u),f=f||!s;return f};return r.bind(this)}}),lt=!1,at=!1,ni=!1;var gi=t.navigator.msManipulationViewsEnabled||t.navigator.userAgent.indexOf("MSAppHost")>=0,nr=!!(t.MSPointerEvent||t.TouchEvent),tr=0;pt=".win-selectionborder, .win-selectionbackground, .win-selectioncheckmark, .win-selectioncheckmarkbackground";k="_msDataKey";i.Namespace._moduleDefine(n,"WinJS.Utilities",{_dataKey:k,_supportsSnapPoints:{get:function(){return gi}},_supportsTouchDetection:{get:function(){return nr}},_uniqueID:ri,_ensureId:ir,_clamp:ft,_getCursorPos:rr,_getElementsByClasses:ur,_createGestureRecognizer:function(){if(t.MSGesture)return new t.MSGesture;var n=function(){};return{addEventListener:n,removeEventListener:n,addPointer:n,stop:n}},_MSGestureEvent:si,_MSManipulationEvent:hi,_elementsFromPoint:function(n,i){if(t.document.msElementsFromPoint)return t.document.msElementsFromPoint(n,i);var r=t.document.elementFromPoint(n,i);return r?[r]:null},_matchesSelector:function(n,t){var i=n.matches||n.msMatchesSelector||n.mozMatchesSelector||n.webkitMatchesSelector;return i.call(n,t)},_selectionPartsSelector:pt,_isSelectionRendered:function(n){return n.querySelectorAll(pt).length>0},_addEventListener:function(n,t,i,u){var o=t&&t.toLowerCase(),f=h[o],e=r._browserEventEquivalents[t];f?f.register(n,t,i,u):e?n.addEventListener(e,i,u):n.addEventListener(t,i,u)},_removeEventListener:function(n,t,i,u){var o=t&&t.toLowerCase(),f=h[o],e=r._browserEventEquivalents[t];f?f.unregister(n,t,i,u):e?n.removeEventListener(e,i,u):n.removeEventListener(t,i,u)},_initEventImpl:function(n,i,r){r=r.toLowerCase();var u=tt[r];if(u)switch(n.toLowerCase()){case"pointer":t.PointerEvent||(arguments[2]=u.mspointer);break;default:arguments[2]=u[n.toLowerCase()]}i["init"+n+"Event"].apply(i,Array.prototype.slice.call(arguments,2))},_initMouseEvent:function(n){this._initEventImpl.apply(this,["Mouse",n].concat(Array.prototype.slice.call(arguments,1)))},_initPointerEvent:function(n){this._initEventImpl.apply(this,["Pointer",n].concat(Array.prototype.slice.call(arguments,1)))},_PointerEventProxy:nt,_bubbleEvent:g,_setPointerCapture:function(n,t){n.setPointerCapture&&n.setPointerCapture(t)},_releasePointerCapture:function(n,t){n.releasePointerCapture&&n.releasePointerCapture(t)},_MSPointerEvent:et,_getComputedStyle:l,_zoomToDuration:w,_zoomTo:function(n,t){this._supportsSnapPoints&&n.msZoomTo?n.msZoomTo(t):e.schedule(function(){var i=vt(n),o=typeof n._zoomToDestX=="number"?n._zoomToDestX:i.scrollLeft,s=typeof n._zoomToDestY=="number"?n._zoomToDestY:i.scrollTop,u=l(n),c=n.scrollWidth-parseInt(u.width,10)-parseInt(u.paddingLeft,10)-parseInt(u.paddingRight,10),a=n.scrollHeight-parseInt(u.height,10)-parseInt(u.paddingTop,10)-parseInt(u.paddingBottom,10),f,e;if(typeof t.contentX!="number"&&(t.contentX=o),typeof t.contentY!="number"&&(t.contentY=s),f=ft(t.contentX,0,c),e=ft(t.contentY,0,a),f!==o||e!==s){n._zoomToId=n._zoomToId||0;n._zoomToId++;n._zoomToDestX=f;n._zoomToDestY=e;var v=n._zoomToId,y=r._now(),p=(n._zoomToDestX-i.scrollLeft)/w,b=(n._zoomToDestY-i.scrollTop)/w,h=function(){var t=r._now()-y;n._zoomToId===v&&(t>w?(yt(n,n._zoomToDestX,n._zoomToDestY),n._zoomToDestX=null,n._zoomToDestY=null):(yt(n,i.scrollLeft+t*p,i.scrollTop+t*b),r._requestAnimationFrame(h)))};r._requestAnimationFrame(h)}},e.Priority.high,null,"WinJS.Utilities._zoomTo")},_setActive:function(n,i){var r=!0,u,f;try{t.HTMLElement&&t.HTMLElement.prototype.setActive?n.setActive():(i&&(u=i.scrollLeft,f=i.scrollTop),n.focus(),i&&(i.scrollLeft=u,i.scrollTop=f))}catch(e){r=!1}return r},_MutationObserver:bi,_resizeNotifier:{get:function(){return ct||(ct=new ki),ct}},_GenericListener:it,_globalListener:new it("Global",t,{registerThruWinJSCustomEvents:!0}),_documentElementListener:new it("DocumentElement",t.document.documentElement,{registerThruWinJSCustomEvents:!0}),_inputPaneListener:u.Windows.UI.ViewManagement.InputPane?new it("InputPane",u.Windows.UI.ViewManagement.InputPane.getForCurrentView()):{addEventListener:function(){},removeEventListener:function(){}},_addInsertedNotifier:function(i){var u=t.document.createElement("div");return u.style[r._browserStyleEquivalents["animation-name"].scriptName]="WinJS-node-inserted",u.style[r._browserStyleEquivalents["animation-duration"].scriptName]="0.01s",u.style.position="absolute",i.appendChild(u),n._addEventListener(u,"animationStart",function(n){if(n.animationName==="WinJS-node-inserted"){var n=t.document.createEvent("Event");n.initEvent("WinJSNodeInserted",!1,!0);i.dispatchEvent(n)}},!1),u},_inDom:function(i){return new f(function(r){if(t.document.body.contains(i))r();else{var u=function(){i.removeEventListener("WinJSNodeInserted",u,!1);r()};n._addInsertedNotifier(i);i.addEventListener("WinJSNodeInserted",u,!1)}})},_setFlexStyle:function(n,t){var i=n.style;typeof t.grow!="undefined"&&(i.msFlexPositive=t.grow,i.webkitFlexGrow=t.grow,i.flexGrow=t.grow);typeof t.shrink!="undefined"&&(i.msFlexNegative=t.shrink,i.webkitFlexShrink=t.shrink,i.flexShrink=t.shrink);typeof t.basis!="undefined"&&(i.msFlexPreferredSize=t.basis,i.webkitFlexBasis=t.basis,i.flexBasis=t.basis)},Key:{backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pause:19,capsLock:20,escape:27,space:32,pageUp:33,pageDown:34,end:35,home:36,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40,insert:45,deleteKey:46,num0:48,num1:49,num2:50,num3:51,num4:52,num5:53,num6:54,num7:55,num8:56,num9:57,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftWindows:91,rightWindows:92,menu:93,numPad0:96,numPad1:97,numPad2:98,numPad3:99,numPad4:100,numPad5:101,numPad6:102,numPad7:103,numPad8:104,numPad9:105,multiply:106,add:107,subtract:109,decimalPoint:110,divide:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NavigationView:136,NavigationMenu:137,NavigationUp:138,NavigationDown:139,NavigationLeft:140,NavigationRight:141,NavigationAccept:142,NavigationCancel:143,numLock:144,scrollLock:145,browserBack:166,browserForward:167,semicolon:186,equal:187,comma:188,dash:189,period:190,forwardSlash:191,graveAccent:192,GamepadA:195,GamepadB:196,GamepadX:197,GamepadY:198,GamepadRightShoulder:199,GamepadLeftShoulder:200,GamepadLeftTrigger:201,GamepadRightTrigger:202,GamepadDPadUp:203,GamepadDPadDown:204,GamepadDPadLeft:205,GamepadDPadRight:206,GamepadMenu:207,GamepadView:208,GamepadLeftThumbstick:209,GamepadRightThumbstick:210,GamepadLeftThumbstickUp:211,GamepadLeftThumbstickDown:212,GamepadLeftThumbstickRight:213,GamepadLeftThumbstickLeft:214,GamepadRightThumbstickUp:215,GamepadRightThumbstickDown:216,GamepadRightThumbstickRight:217,GamepadRightThumbstickLeft:218,openBracket:219,backSlash:220,closeBracket:221,singleQuote:222,IME:229},data:function(n){return n[k]||(n[k]={}),n[k]},hasClass:function(n,t){var i;if(n.classList)return n.classList.contains(t);var u=d(n),r=u.trim().split(" "),f=r.length;for(i=0;i<f;i++)if(r[i]===t)return!0;return!1},addClass:rt,removeClass:ut,toggleClass:fi,_setAttribute:ei,getRelativeLeft:function(n,t){if(!n)return 0;for(var r=n.offsetLeft,i=n.parentNode;i;){if(r-=i.offsetLeft,i===t)break;i=i.parentNode}return r},getRelativeTop:function(n,t){if(!n)return 0;for(var r=n.offsetTop,i=n.parentNode;i;){if(r-=i.offsetTop,i===t)break;i=i.parentNode}return r},getScrollPosition:ii,setScrollPosition:di,empty:function(n){if(n.childNodes&&n.childNodes.length>0)for(var t=n.childNodes.length-1;t>=0;t--)n.removeChild(n.childNodes.item(t));return n},_isDOMElement:function(n){return n&&typeof n=="object"&&typeof n.tagName=="string"},getContentWidth:function(n){var t=o(n,"borderLeftWidth")+o(n,"borderRightWidth"),i=o(n,"paddingLeft")+o(n,"paddingRight");return n.offsetWidth-t-i},_getPreciseContentWidth:function(n){var t=s(n,"borderLeftWidth")+s(n,"borderRightWidth"),i=s(n,"paddingLeft")+s(n,"paddingRight");return n.offsetWidth-t-i},getTotalWidth:function(n){var t=o(n,"marginLeft")+o(n,"marginRight");return n.offsetWidth+t},_getPreciseTotalWidth:function(n){var t=s(n,"marginLeft")+s(n,"marginRight");return n.offsetWidth+t},getContentHeight:function(n){var t=o(n,"borderTopWidth")+o(n,"borderBottomWidth"),i=o(n,"paddingTop")+o(n,"paddingBottom");return n.offsetHeight-t-i},_getPreciseContentHeight:function(n){var t=s(n,"borderTopWidth")+s(n,"borderBottomWidth"),i=s(n,"paddingTop")+s(n,"paddingBottom");return n.offsetHeight-t-i},getTotalHeight:function(n){var t=o(n,"marginTop")+o(n,"marginBottom");return n.offsetHeight+t},_getPreciseTotalHeight:function(n){var t=s(n,"marginTop")+s(n,"marginBottom");return n.offsetHeight+t},getPosition:function(t){return n._getPositionRelativeTo(t,null)},getTabIndex:function(n){var i,t;return n.disabled?-1:(i=n.getAttribute("tabindex"),i===null||i===undefined)?(t=n.tagName,/BUTTON|COMMAND|MENUITEM|OBJECT|SELECT|TEXTAREA/.test(t)||n.href&&(t==="A"||t==="AREA"||t==="LINK")||t==="INPUT"&&n.type!=="hidden"||t==="TH"&&n.sorted)?0:-1:parseInt(i,10)},convertToPixels:kt,_convertToPrecisePixels:p,_getPreciseMargins:oi,eventWithinElement:function(n,t){var i=t.relatedTarget;return i&&i!==n?n.contains(i):!1},_deprecated:function(n){t.console&&t.console.warn(n)},_syncRenderer:function(n,i){if(i=i||"div",typeof n=="function")return function(t,i){return i?(i.appendChild(n(t)),i):n(t)};var r;return typeof n.render=="function"?r=n:n.winControl&&typeof n.winControl.render=="function"&&(r=n.winControl),function(n,u){var e=u||t.document.createElement(i),f,o;return r.render(n,e),u?u:(f=e.firstElementChild,f&&e.dispose&&(o=f.dispose,f.dispose=function(){f.dispose=o;e.appendChild(f);e.dispose()}),f)}},_getPositionRelativeTo:function(n,i){for(var f=n,e=n.offsetParent,r=n.offsetTop,u=n.offsetLeft,o;(n=n.parentNode)&&n!==i&&n!==t.document.body&&n!==t.document.documentElement;)r-=n.scrollTop,o=l(n,null).direction,u-=o!=="rtl"?n.scrollLeft:-vt(n).scrollLeft,n===e&&(r+=n.offsetTop,u+=n.offsetLeft,e=n.offsetParent);return{left:u,top:r,width:f.offsetWidth,height:f.offsetHeight}},_getHighAndLowTabIndices:function(n){for(var u,t,e=n.getElementsByTagName("*"),i=0,r=0,o=!1,f=0,s=e.length;f<s;f++)u=e[f].getAttribute("tabIndex"),u!==null&&u!==undefined&&(t=parseInt(u,10),t>0&&(t<i||i===0)&&(i=t),o||(t===0?(o=!0,r=0):t>r&&(r=t)));return{highest:r,lowest:i}},_getLowestTabIndexInList:function(n){for(var t=0,i,r=0;r<n.length;r++)i=parseInt(n[r].getAttribute("tabIndex"),10),0<i&&(i<t||!t)&&(t=i);return t},_getHighestTabIndexInList:function(n){for(var i=0,t,r=0;r<n.length;r++){if(t=parseInt(n[r].getAttribute("tabIndex"),10),t===0)return t;i<t&&(i=t)}return i},_hasCursorKeysBehaviors:function(n){return n.tagName==="SELECT"||n.tagName==="TEXTAREA"?!0:n.tagName==="INPUT"?n.type===""||n.type==="date"||n.type==="datetime"||n.type==="datetime-local"||n.type==="email"||n.type==="month"||n.type==="number"||n.type==="password"||n.type==="range"||n.type==="search"||n.type==="tel"||n.type==="text"||n.type==="time"||n.type==="url"||n.type==="week":!1},_reparentChildren:function(n,t){for(var i=n.firstChild,r;i;)r=i.nextSibling,t.appendChild(i),i=r},_maintainFocus:function(i){var r=t.document.activeElement;i();n._trySetActiveOnAnyElement(r)},_trySetActiveOnAnyElement:function(t,i){return n._tryFocusOnAnyElement(t,!0,i)},_tryFocusOnAnyElement:function(i,r,u){var f=t.document.activeElement;return i===f?!0:(r?n._setActive(i,u):i.focus(),f!==t.document.activeElement)},_trySetActive:function(n,t){return this._tryFocus(n,!0,t)},_tryFocus:function(i,r,u){var f=t.document.activeElement,e;return i===f?!0:(e=n.getTabIndex(i)>=0,!e)?!1:(r?n._setActive(i,u):i.focus(),f!==t.document.activeElement)?!0:!1},_setActiveFirstFocusableElement:function(n,t){return this._focusFirstFocusableElement(n,!0,t)},_focusFirstFocusableElement:function(n,t,i){for(var u=n.getElementsByTagName("*"),e=this._getLowestTabIndexInList(u),f=0,r;e;){for(r=0;r<u.length;r++)if(u[r].tabIndex===e){if(this._tryFocus(u[r],t,i))return!0}else e<u[r].tabIndex&&(u[r].tabIndex<f||f===0)&&(f=u[r].tabIndex);e=f;f=0}for(r=0;r<u.length;r++)if(this._tryFocus(u[r],t,i))return!0;return!1},_setActiveLastFocusableElement:function(n,t){return this._focusLastFocusableElement(n,!0,t)},_focusLastFocusableElement:function(n,t,i){var u=n.getElementsByTagName("*"),e=this._getHighestTabIndexInList(u),f=0,r;if(e===0){for(r=u.length-1;r>=0;r--)if(u[r].tabIndex===e){if(this._tryFocus(u[r],t,i))return!0}else f<u[r].tabIndex&&(f=u[r].tabIndex);e=f;f=0}while(e){for(r=u.length-1;r>=0;r--)if(u[r].tabIndex===e){if(this._tryFocus(u[r],t,i))return!0}else f<u[r].tabIndex&&u[r].tabIndex<e&&(f=u[r].tabIndex);e=f;f=0}for(r=u.length-2;r>0;r--)if(this._tryFocus(u[r],t,i))return!0;return!1}})}}),r("WinJS/ControlProcessor/_OptionsLexer",["exports","../Core/_Base"],function(n,t){"use strict";t.Namespace._moduleDefine(n,"WinJS.UI",{_optionsLexer:t.Namespace._lazy(function(){function i(t){return{type:n.reservedWord,value:t,length:t.length,keyword:!0}}function u(n){switch(n.charCodeAt(0)){case 98:switch(n){case"break":return i(n)}break;case 99:switch(n){case"case":case"catch":case"class":case"const":case"continue":return i(n)}break;case 100:switch(n){case"debugger":case"default":case"delete":case"do":return i(n)}break;case 101:switch(n){case"else":case"enum":case"export":case"extends":return i(n)}break;case 102:switch(n){case"false":return t.falseLiteral;case"finally":case"for":case"function":return i(n)}break;case 105:switch(n){case"if":case"import":case"in":case"instanceof":return i(n)}break;case 110:switch(n){case"null":return t.nullLiteral;case"new":return i(n)}break;case 114:switch(n){case"return":return i(n)}break;case 115:switch(n){case"super":case"switch":return i(n)}break;case 116:switch(n){case"true":return t.trueLiteral;case"this":return t.thisKeyword;case"throw":case"try":case"typeof":return i(n)}break;case 118:switch(n){case"var":case"void":return i(n)}break;case 119:switch(n){case"while":case"with":return i(n)}}return}var n={leftBrace:1,rightBrace:2,leftBracket:3,rightBracket:4,separator:5,colon:6,semicolon:7,comma:8,dot:9,nullLiteral:10,trueLiteral:11,falseLiteral:12,numberLiteral:13,stringLiteral:14,identifier:15,reservedWord:16,thisKeyword:17,leftParentheses:18,rightParentheses:19,eof:20,error:21},t={leftBrace:{type:n.leftBrace,length:1},rightBrace:{type:n.rightBrace,length:1},leftBracket:{type:n.leftBracket,length:1},rightBracket:{type:n.rightBracket,length:1},colon:{type:n.colon,length:1},semicolon:{type:n.semicolon,length:1},comma:{type:n.comma,length:1},dot:{type:n.dot,length:1},nullLiteral:{type:n.nullLiteral,length:4,value:null,keyword:!0},trueLiteral:{type:n.trueLiteral,length:4,value:!0,keyword:!0},falseLiteral:{type:n.falseLiteral,length:5,value:!1,keyword:!0},thisKeyword:{type:n.thisKeyword,length:4,value:"this",keyword:!0},leftParentheses:{type:n.leftParentheses,length:1},rightParentheses:{type:n.rightParentheses,length:1},eof:{type:n.eof,length:0}},r=function(){function h(n,t,r,u){switch(n){case n>=97&&n<=122&&n:case n>=65&&n<=90&&n:case 36:case 95:return!0;case s(n)&&n:case e(n)&&n:return!1;case n>127&&n:return!0;case 92:return r+4<u&&t.charCodeAt(r)===117&&i(t.charCodeAt(r+1))&&i(t.charCodeAt(r+2))&&i(t.charCodeAt(r+3))&&i(t.charCodeAt(r+4))?!0:!1;default:return!1}}function c(n,t,r){for(var f=!1,u;t<r;){u=n.charCodeAt(t);switch(u){case u>=97&&u<=122&&u:case u>=65&&u<=90&&u:case 36:case 95:break;case s(u)&&u:case e(u)&&u:return f?-t:t;case u>127&&u:break;case u>=48&&u<=57&&u:break;case 92:if(t+5<r&&n.charCodeAt(t+1)===117&&i(n.charCodeAt(t+2))&&i(n.charCodeAt(t+3))&&i(n.charCodeAt(t+4))&&i(n.charCodeAt(t+5))){t+=5;f=!0;break}return f?-t:t;default:return f?-t:t}t++}return f?-t:t}function l(t,i,r){var e=i,o,f,s;return(i=c(t,i,r),o=!1,i<0&&(i=-i,o=!0),f=t.substr(e,i-e),o&&(f=""+JSON.parse('"'+f+'"')),s=u(f),s)?s:{type:n.identifier,length:i-e,value:f}}function i(n){switch(n){case n>=48&&n<=57&&n:case n>=97&&n<=102&&n:case n>=65&&n<=70&&n:return!0;default:return!1}}function a(n,t,r){while(t<r&&i(n.charCodeAt(t)))t++;return t}function r(n){switch(n){case n>=48&&n<=57&&n:return!0;default:return!1}}function o(n,t,i){while(t<i&&r(n.charCodeAt(t)))t++;return t}function v(n,t,i){var u,f;return t=o(n,t,i),t<i&&n.charCodeAt(t)===46&&t+1<i&&r(n.charCodeAt(t+1))&&(t=o(n,t+2,i)),t<i&&(u=n.charCodeAt(t),(u===101||u===69)&&(f=t+1,f<i&&(u=n.charCodeAt(f),(u===43||u===45)&&f++,t=o(n,f,i)))),t}function f(t,i,r,u){var r=v(t,r,u),f=r-i;return{type:n.numberLiteral,length:f,value:+t.substr(i,f)}}function e(n){switch(n){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function y(t,i,r){var o=i,s=t.charCodeAt(i),f=!1,u,h;for(i++;i<r&&!e(t.charCodeAt(i));){if(i+1<r&&t.charCodeAt(i)===92){f=!0;switch(t.charCodeAt(i+1)){case s:case 92:case 10:case 8232:case 8233:i+=2;continue;case 13:i+=i+2<r&&t.charCodeAt(i+2)===10?3:2;continue}}if(i++,t.charCodeAt(i-1)===s)break}return u=i-o,f=f||u===1||t.charCodeAt(i-1)!==s,h=f?eval(t.substr(o,u)):t.substr(o+1,u-2),{type:n.stringLiteral,length:u,value:h}}function s(n){switch(n){case 9:case 11:case 12:case 32:case 160:case 65279:return!0;case n<5760&&n:return!1;case 5760:case 6158:case n>=8192&&n<=8202&&n:case 8239:case 8287:case 12288:return!0;default:return!1}}function p(n,t,i){while(t<i){var r=n.charCodeAt(t);switch(r){case 9:case 11:case 12:case 32:case 160:case 65279:break;case r<5760&&r:return t;case 5760:case 6158:case r>=8192&&r<=8202&&r:case 8239:case 8287:case 12288:break;default:return t}t++}return t}function w(i,u,o,c){for(var w,b,v,d,k,g,nt;o<c;){w=o;b=u.charCodeAt(o++);switch(b){case s(b)&&b:case e(b)&&b:o=p(u,o,c);v={type:n.separator,length:o-w};continue;case 34:case 39:v=y(u,o-1,c);break;case 40:v=t.leftParentheses;break;case 41:v=t.rightParentheses;break;case 43:case 45:if(o<c)if(d=u.charCodeAt(o),d===46){if(k=o+1,k<c&&r(u.charCodeAt(k))){v=f(u,w,k,c);break}}else if(r(d)){v=f(u,w,o,c);break}v={type:n.error,length:o-w,value:u.substring(w,o)};break;case 44:v=t.comma;break;case 46:v=t.dot;o<c&&r(u.charCodeAt(o))&&(v=f(u,w,o,c));break;case 48:g=o<c?u.charCodeAt(o):0;g===120||g===88?(nt=a(u,o+1,c),v={type:n.numberLiteral,length:nt-w,value:+u.substr(w,nt-w)}):v=f(u,w,o,c);break;case b>=49&&b<=57&&b:v=f(u,w,o,c);break;case 58:v=t.colon;break;case 59:v=t.semicolon;break;case 91:v=t.leftBracket;break;case 93:v=t.rightBracket;break;case 123:v=t.leftBrace;break;case 125:v=t.rightBrace;break;default:if(h(b,u,o,c)){v=l(u,o-1,c);break}v={type:n.error,length:o-w,value:u.substring(w,o)}}o+=v.length-1;i.push(v)}}return function(n){var i=[];return w(i,n,0,n.length),i.push(t.eof),i}}();return r.tokenType=n,r})})}),r("WinJS/ControlProcessor/_OptionsParser",["exports","../Core/_Base","../Core/_BaseUtils","../Core/_ErrorFromName","../Core/_Resources","./_OptionsLexer"],function(n,t,i,r,u,f){"use strict";function s(){throw"Illegal";}function v(n){for(var i=Object.keys(e.tokenType),t=0,r=i.length;t<r;t++)if(n===e.tokenType[i[t]])return i[t];return"<unknown>"}var c={get invalidOptionsRecord(){return"Invalid options record: '{0}', expected to be in the format of an object literal. {1}"},get unexpectedTokenExpectedToken(){return"Unexpected token: {0}, expected token: {1}, at offset {2}"},get unexpectedTokenExpectedTokens(){return"Unexpected token: {0}, expected one of: {1}, at offset {2}"},get unexpectedTokenGeneric(){return"Unexpected token: {0}, at offset {1}"}},e=t.Namespace.defineWithParent(null,null,{lexer:t.Namespace._lazy(function(){return f._optionsLexer}),tokenType:t.Namespace._lazy(function(){return f._optionsLexer.tokenType})}),a=i.requireSupportedForProcessing,o=t.Namespace.defineWithParent(null,null,{BaseInterpreter:t.Namespace._lazy(function(){return t.Class.define(null,{_error:function(n){throw new r("WinJS.UI.ParseError",n);},_currentOffset:function(){for(var i=this._pos,t=0,n=0;n<i;n++)t+=this._tokens[n].length;return t},_evaluateAccessExpression:function(n){var t,i;switch(this._current.type){case e.tokenType.dot:this._read();switch(this._current.type){case e.tokenType.identifier:case this._current.keyword&&this._current.type:return t=this._current.value,this._read(),n[t];default:this._unexpectedToken(e.tokenType.identifier,e.tokenType.reservedWord)}return;case e.tokenType.leftBracket:return this._read(),i=this._evaluateValue(),this._read(e.tokenType.rightBracket),n[i]}},_evaluateAccessExpressions:function(n){for(;;)switch(this._current.type){case e.tokenType.dot:case e.tokenType.leftBracket:n=this._evaluateAccessExpression(n);break;default:return n}},_evaluateIdentifier:function(n,t){var i=this._readIdentifier();return n?t[i]:this._context[i]},_evaluateIdentifierExpression:function(){var n=this._evaluateIdentifier(!1);switch(this._current.type){case e.tokenType.dot:case e.tokenType.leftBracket:return this._evaluateAccessExpressions(n);default:return n}},_initialize:function(n,t,i,r){this._originalSource=t;this._tokens=n;this._context=i;this._functionContext=r;this._pos=0;this._current=this._tokens[0]},_read:function(n){n&&this._current.type!==n&&this._unexpectedToken(n);this._current!==e.tokenType.eof&&(this._current=this._tokens[++this._pos])},_peek:function(n){if(!n||this._current.type===n)return this._current!==e.tokenType.eof?this._tokens[this._pos+1]:void 0},_readAccessExpression:function(n){switch(this._current.type){case e.tokenType.dot:this._read();switch(this._current.type){case e.tokenType.identifier:case this._current.keyword&&this._current.type:n.push(this._current.value);this._read();break;default:this._unexpectedToken(e.tokenType.identifier,e.tokenType.reservedWord)}return;case e.tokenType.leftBracket:this._read();n.push(this._evaluateValue());this._read(e.tokenType.rightBracket);return}},_readAccessExpressions:function(n){for(;;)switch(this._current.type){case e.tokenType.dot:case e.tokenType.leftBracket:this._readAccessExpression(n);break;default:return}},_readIdentifier:function(){var n=this._current.value;return this._read(e.tokenType.identifier),n},_readIdentifierExpression:function(){var n=[];this._peek(e.tokenType.thisKeyword)&&n.length===0?this._read():n.push(this._readIdentifier());switch(this._current.type){case e.tokenType.dot:case e.tokenType.leftBracket:this._readAccessExpressions(n)}return n},_unexpectedToken:function(n){var i=this._current.type===e.tokenType.error?"'"+this._current.value+"'":v(this._current.type),r,t,f;if(n)if(arguments.length===1)n=v(n),this._error(u._formatString(c.unexpectedTokenExpectedToken,i,n,this._currentOffset()));else{for(r=[],t=0,f=arguments.length;t<f;t++)r.push(v(arguments[t]));n=r.join(", ");this._error(u._formatString(c.unexpectedTokenExpectedTokens,i,n,this._currentOffset()))}else this._error(u._formatString(c.unexpectedTokenGeneric,i,this._currentOffset()))}},{supportedForProcessing:!1})}),OptionsInterpreter:t.Namespace._lazy(function(){return t.Class.derive(o.BaseInterpreter,function(n,t,i,r){this._initialize(n,t,i,r)},{_error:function(n){throw new r("WinJS.UI.ParseError",u._formatString(c.invalidOptionsRecord,this._originalSource,n));},_evaluateArrayLiteral:function(){var n=[];return this._read(e.tokenType.leftBracket),this._readArrayElements(n),this._read(e.tokenType.rightBracket),n},_evaluateObjectLiteral:function(){var n={};return this._read(e.tokenType.leftBrace),this._readObjectProperties(n),this._tryReadComma(),this._read(e.tokenType.rightBrace),n},_evaluateOptionsLiteral:function(){var n=this._evaluateValue();return this._current.type!==e.tokenType.eof&&this._unexpectedToken(e.tokenType.eof),n},_peekValue:function(){switch(this._current.type){case e.tokenType.falseLiteral:case e.tokenType.nullLiteral:case e.tokenType.stringLiteral:case e.tokenType.trueLiteral:case e.tokenType.numberLiteral:case e.tokenType.leftBrace:case e.tokenType.leftBracket:case e.tokenType.identifier:return!0;default:return!1}},_evaluateValue:function(){switch(this._current.type){case e.tokenType.falseLiteral:case e.tokenType.nullLiteral:case e.tokenType.stringLiteral:case e.tokenType.trueLiteral:case e.tokenType.numberLiteral:var n=this._current.value;return this._read(),n;case e.tokenType.leftBrace:return this._evaluateObjectLiteral();case e.tokenType.leftBracket:return this._evaluateArrayLiteral();case e.tokenType.identifier:return this._peek(e.tokenType.identifier).type===e.tokenType.leftParentheses?a(this._evaluateObjectQueryExpression()):a(this._evaluateIdentifierExpression());default:this._unexpectedToken(e.tokenType.falseLiteral,e.tokenType.nullLiteral,e.tokenType.stringLiteral,e.tokenType.trueLiteral,e.tokenType.numberLiteral,e.tokenType.leftBrace,e.tokenType.leftBracket,e.tokenType.identifier)}},_tryReadElement:function(n){return this._peekValue()?(n.push(this._evaluateValue()),!0):!1},_tryReadComma:function(){return this._peek(e.tokenType.comma)?(this._read(),!0):!1},_tryReadElision:function(n){for(var t=!1;this._tryReadComma();)n.push(undefined),t=!0;return t},_readArrayElements:function(n){while(!this._peek(e.tokenType.rightBracket)){var i=this._tryReadElision(n),t=this._tryReadElement(n),r=this._peek(e.tokenType.comma);if(t&&r)this._read();else if(t||i)break;else{this._unexpectedToken(e.tokenType.falseLiteral,e.tokenType.nullLiteral,e.tokenType.stringLiteral,e.tokenType.trueLiteral,e.tokenType.numberLiteral,e.tokenType.leftBrace,e.tokenType.leftBracket,e.tokenType.identifier);break}}},_readObjectProperties:function(n){while(!this._peek(e.tokenType.rightBrace)){var t=this._tryReadObjectProperty(n),i=this._peek(e.tokenType.comma);if(t&&i)this._read();else if(t)break;else{this._unexpectedToken(e.tokenType.numberLiteral,e.tokenType.stringLiteral,e.tokenType.identifier);break}}},_tryReadObjectProperty:function(n){switch(this._current.type){case e.tokenType.numberLiteral:case e.tokenType.stringLiteral:case e.tokenType.identifier:case this._current.keyword&&this._current.type:var t=this._current.value;return this._read(),this._read(e.tokenType.colon),n[t]=this._evaluateValue(),!0;default:return!1}},_failReadObjectProperty:function(){this._unexpectedToken(e.tokenType.numberLiteral,e.tokenType.stringLiteral,e.tokenType.identifier,e.tokenType.reservedWord)},_evaluateObjectQueryExpression:function(){var i=this._current.value,t,n;this._read(e.tokenType.identifier);this._read(e.tokenType.leftParentheses);t=this._current.value;this._read(e.tokenType.stringLiteral);this._read(e.tokenType.rightParentheses);n=a(this._functionContext[i])(t);switch(this._current.type){case e.tokenType.dot:case e.tokenType.leftBracket:return this._evaluateAccessExpressions(n);default:return n}},run:function(){return this._evaluateOptionsLiteral()}},{supportedForProcessing:!1})}),OptionsParser:t.Namespace._lazy(function(){return t.Class.derive(o.OptionsInterpreter,function(n,t){this._initialize(n,t)},{_evaluateAccessExpression:s,_evaluateAccessExpressions:s,_evaluateIdentifier:s,_evaluateIdentifierExpression:s,_evaluateObjectQueryExpression:s,_evaluateValue:function(){switch(this._current.type){case e.tokenType.falseLiteral:case e.tokenType.nullLiteral:case e.tokenType.stringLiteral:case e.tokenType.trueLiteral:case e.tokenType.numberLiteral:var n=this._current.value;return this._read(),n;case e.tokenType.leftBrace:return this._evaluateObjectLiteral();case e.tokenType.leftBracket:return this._evaluateArrayLiteral();case e.tokenType.identifier:return this._peek(e.tokenType.identifier).type===e.tokenType.leftParentheses?this._readObjectQueryExpression():this._readIdentifierExpression();default:this._unexpectedToken(e.tokenType.falseLiteral,e.tokenType.nullLiteral,e.tokenType.stringLiteral,e.tokenType.trueLiteral,e.tokenType.numberLiteral,e.tokenType.leftBrace,e.tokenType.leftBracket,e.tokenType.identifier)}},_readIdentifierExpression:function(){var n=o.BaseInterpreter.prototype._readIdentifierExpression.call(this);return new h(n)},_readObjectQueryExpression:function(){var r=this._current.value,i,n,t;this._read(e.tokenType.identifier);this._read(e.tokenType.leftParentheses);i=this._current.value;this._read(e.tokenType.stringLiteral);this._read(e.tokenType.rightParentheses);n=new l(r,i);switch(this._current.type){case e.tokenType.dot:case e.tokenType.leftBracket:return t=[n],this._readAccessExpressions(t),new h(t);default:return n}}},{supportedForProcessing:!1})})}),y=function(n,t,i){var r=e.lexer(n),u=new o.OptionsInterpreter(r,n,t||{},i||{});return u.run()},p,l,h;Object.defineProperty(y,"_BaseInterpreter",{get:function(){return o.BaseInterpreter}});p=function(n){var t=e.lexer(n),i=new o.OptionsParser(t,n);return i.run()};l=t.Class.define(function(n,t){this.target=n;this.arg0Value=t});l.supportedForProcessing=!1;h=t.Class.define(function(n){this.parts=n});h.supportedForProcessing=!1;t.Namespace._moduleDefine(n,"WinJS.UI",{optionsParser:y,_optionsParser:p,_CallExpression:l,_IdentifierExpression:h})}),r("WinJS/XYFocus",["require","exports","./Core/_Global","./Core/_Base","./Core/_BaseUtils","./Utilities/_ElementUtilities","./Core/_Events","./ControlProcessor/_OptionsParser"],function(t,i,r,u,f,e,o,s){"use strict";function ft(n,t){var i=st(n,t);return i?i.target:null}function ot(n,t){var i,u;return(r.window.pageYOffset===0&&(n==="up"||n==="down")&&(n="down",t=t||{},t.referenceRect=b(),t.referenceRect.left=0,t.referenceRect.right=r.window.innerWidth,t.referenceRect.width=r.window.innerWidth,t.referenceRect.top=-2,t.referenceRect.bottom=-1,t.referenceRect.height=1),i=ft(n,t),i&&(u=r.document.activeElement,ht(i,-1)))?(rt.dispatchEvent(it.focusChanged,{previousFocusElement:u,keyCode:-1}),i):null}function g(t,u,f,o){function at(n,t){var i=b();n===k.left||n===k.right?(i.top=Math.max(t.targetRect.top,t.referenceRect.top,l?l.top:Number.MIN_VALUE),i.bottom=Math.min(t.targetRect.bottom,t.referenceRect.bottom,l?l.bottom:Number.MAX_VALUE),i.bottom<=i.top&&(i.top=t.targetRect.top,i.bottom=t.targetRect.bottom),i.height=i.bottom-i.top,i.width=Number.MAX_VALUE,i.left=Number.MIN_VALUE,i.right=Number.MAX_VALUE):(i.left=Math.max(t.targetRect.left,t.referenceRect.left,l?l.left:Number.MIN_VALUE),i.right=Math.min(t.targetRect.right,t.referenceRect.right,l?l.right:Number.MAX_VALUE),i.right<=i.left&&(i.left=t.targetRect.left,i.right=t.targetRect.right),i.width=i.right-i.left,i.height=Number.MAX_VALUE,i.top=Number.MIN_VALUE,i.bottom=Number.MAX_VALUE);l=i}var g,nt,h,v,tt,et,ot;f||r.document.activeElement!==p?(l=null,p=null,d=null):p&&d&&(g=w(p.getBoundingClientRect()),(g.left!==d.left||g.top!==d.top)&&(l=null,p=null,d=null));var ut=r.document.activeElement,vt=p,s=st(t,{focusRoot:i.focusRoot,historyRect:l,referenceElement:p,referenceRect:f});if(s&&ht(s.target,u))return at(t,s),p=s.target,d=s.targetRect,e.hasClass(s.target,a.toggleMode)&&e.removeClass(s.target,a.toggleModeActive),s.target.tagName==="IFRAME"&&(nt=s.target,y.isXYFocusEnabled(nt)&&(h=w({left:s.referenceRect.left-s.targetRect.left,top:s.referenceRect.top-s.targetRect.top,width:s.referenceRect.width,height:s.referenceRect.height}),v={},v[c.messageDataProperty]={type:c.dFocusEnter,direction:t,referenceRect:h,keyCode:u},nt.contentWindow.postMessage(v,"*"))),rt.dispatchEvent(it.focusChanged,{previousFocusElement:ut,keyCode:u}),!0;if(t==="up"){if(r.window.pageYOffset>0)return r.window.scrollTo(n.pageXOffset,0),!1}else if(t==="down"){var ct=r.document.documentElement.scrollHeight,lt=r.window.innerHeight,ft=ct-lt;if(r.window.pageYOffset<ft)return r.window.scrollTo(r.window.pageXOffset,ft),!1}return!o&&top!==r.window?(h=f,h||(h=r.document.activeElement?w(r.document.activeElement.getBoundingClientRect()):b()),v={},v[c.messageDataProperty]={type:c.dFocusExit,direction:t,referenceRect:h,keyCode:u},r.parent.postMessage(v,"*"),!0):(tt=r.window.CortanaApp,tt&&(t==="up"||t==="down")&&(et=yt(r.document.activeElement.getBoundingClientRect()||b()),ot=tt.tryMoveFocus(t,et),ot))?(ut.blur(),!0):!1}function st(n,t){function o(n,t,i,r){if(n>=r||t<=i)return 0;var f=Math.min(t,r)-Math.max(n,i),u=Math.min(r-i,t-n);return u===0?0:f/u}function it(n,t,i,r,u){var c=0,e,f,s=0,h=0;switch(n){case k.left:if(u.left>=r.left)break;e=o(r.top,r.bottom,u.top,u.bottom);f=r.left-u.right;e>0?h=o(i.top,i.bottom,u.top,u.bottom):s=r.bottom<=u.top?u.top-r.bottom:r.top-u.bottom;break;case k.right:if(u.right<=r.right)break;e=o(r.top,r.bottom,u.top,u.bottom);f=u.left-r.right;e>0?h=o(i.top,i.bottom,u.top,u.bottom):s=r.bottom<=u.top?u.top-r.bottom:r.top-u.bottom;break;case k.up:if(u.top>=r.top)break;e=o(r.left,r.right,u.left,u.right);f=r.top-u.bottom;e>0?h=o(i.left,i.right,u.left,u.right):s=r.right<=u.left?u.left-r.right:r.left-u.right;break;case k.down:if(u.bottom<=r.bottom)break;e=o(r.left,r.right,u.left,u.right);f=u.top-r.bottom;e>0?h=o(i.left,i.right,u.left,u.right):s=r.right<=u.left?u.left-r.right:r.left-u.right}return f>=0&&(f=t-f,s=t-s,f>=0&&s>=0&&(f+=f*e,c=f*ut.primaryAxisDistanceWeight+s*ut.secondaryAxisDistanceWeight+h*ut.percentInHistoryShadowWeight)),c}function rt(n,t){var i,u;return(n||t)&&(!n||n.parentNode)||r.document.activeElement!==r.document.body&&(n=r.document.activeElement),n?(i=n,u=w(i.getBoundingClientRect())):u=t?w(t):b(),{element:i,rect:u}}var nt,u,v,y,p,h,l,e,d,a,tt,c,f,g;if(t=t||{},t.focusRoot=t.focusRoot||i.focusRoot||r.document.body,t.historyRect=t.historyRect||b(),nt=Math.max(r.screen.availHeight,r.screen.availWidth),u=rt(t.referenceElement,t.referenceRect),u.element&&(v=u.element.getAttribute(et.focusOverride)||u.element.getAttribute(et.focusOverrideLegacy),v&&(y=s.optionsParser(v),p=y[n]||y[n[0].toUpperCase()+n.substr(1)],p))){for(l=u.element;!h&&l;)h=l.querySelector(p),l=l.parentElement;if(h)return h===r.document.activeElement?null:{target:h,targetRect:w(h.getBoundingClientRect()),referenceRect:u.rect,usedOverride:!0}}for(e={element:null,rect:null,score:0},d=t.focusRoot.querySelectorAll("*"),a=0,tt=d.length;a<tt;a++)if((c=d[a],u.element!==c&&ct(c)&&!wt(c))&&(f=w(c.getBoundingClientRect()),f.width!==0&&f.height!==0)){if(n==="up"||n==="down")f.left=0,f.right=r.window.innerWidth,f.width=r.window.innerWidth;else if((n==="left"||n==="right")&&(f.top>u.rect.bottom||f.bottom<u.rect.top))continue;g=it(n,nt,t.historyRect,u.rect,f);g>e.score&&(e.element=c,e.rect=f,e.score=g)}return e.element?{target:e.element,targetRect:e.rect,referenceRect:u.rect,usedOverride:!1}:null}function b(){return{top:-1,bottom:-1,right:-1,left:-1,height:0,width:0}}function w(n){return{top:Math.floor(n.top),bottom:Math.floor(n.top+n.height),right:Math.floor(n.left+n.width),left:Math.floor(n.left),height:Math.floor(n.height),width:Math.floor(n.width)}}function yt(n){var t=r.window.devicePixelRatio;return{height:(Math.floor(n.height)|0)*t,width:(Math.floor(n.width)|0)*t,x:(Math.floor(n.left)|0)*t,y:((Math.floor(n.top)|0)+r.window.screenTop)*t}}function ht(n,t){var u=rt.dispatchEvent(it.focusChanging,{nextFocusElement:n,keyCode:t}),i;return u||(n.focus(),i=w(n.getBoundingClientRect()),i.top<v?r.window.scrollTo(r.window.pageXOffset,r.window.pageYOffset-v):i.bottom>r.window.innerHeight-v&&r.window.scrollTo(r.window.pageXOffset,r.window.pageYOffset+v)),r.document.activeElement===n}function ct(n){var t=n.tagName,i;return!n.hasAttribute("tabindex")&&vt.indexOf(t)===-1&&!e.hasClass(n,a.focusable)?!1:t==="IFRAME"&&!y.isXYFocusEnabled(n)?!1:t==="DIV"&&n.winControl&&n.winControl.disabled?!1:t==="A"&&(!n.hasAttribute("href")||!n.getAttribute("href"))?!1:(i=e._getComputedStyle(n),n.getAttribute("tabIndex")==="-1"||i.display==="none"||i.visibility==="hidden"||n.disabled)?!1:!0}function pt(n){for(var t=n.parentElement;t&&!lt(t);)t=t.parentElement;return t}function wt(n){var t=pt(n);return t&&!e.hasClass(t,a.toggleModeActive)}function lt(n){if(e.hasClass(n,a.toggleMode))return!0;if(n.tagName==="INPUT"){var t=n.type.toLowerCase();if(t==="date"||t==="datetime"||t==="datetime-local"||t==="email"||t==="month"||t==="number"||t==="password"||t==="range"||t==="search"||t==="tel"||t==="text"||t==="time"||t==="url"||t==="week")return!0}else if(n.tagName==="TEXTAREA")return!0;return!1}function at(n){var i=!1,r=!1,u=!1,t;return n&&(i=e._matchesSelector(n,"."+a.suspended+", ."+a.suspended+" *"),r=lt(n),u=e.hasClass(n,a.toggleModeActive)),t=nt.RestState,i?t=nt.SuspendedState:r&&(t=u?nt.ToggleModeActiveState:nt.ToggleModeRestState),t}function bt(n){function c(i){t.top=-1;t.bottom=0;i&&(t.top+=v,t.bottom+=v);e.xyFocus("down",n.keyCode,t)}function l(i){t.top=f;t.bottom=f+1;i&&(t.top-=v,t.bottom-=v);e.xyFocus("up",n.keyCode,t)}var e,u,a,o,p,s,h;if(!n.defaultPrevented){e=at(r.document.activeElement);u="";i.keyCodeMap.up.indexOf(n.keyCode)!==-1?u="up":i.keyCodeMap.down.indexOf(n.keyCode)!==-1?u="down":i.keyCodeMap.left.indexOf(n.keyCode)!==-1?u="left":i.keyCodeMap.right.indexOf(n.keyCode)!==-1&&(u="right");u&&(a=e.xyFocus(u,n.keyCode),a&&n.preventDefault());var y=r.window.innerWidth,f=r.window.innerHeight,t=b();t.left=0;t.right=y;t.width=y;t.height=1;i.keyCodeMap.pageUp.indexOf(n.keyCode)!==-1?r.window.pageYOffset>0?(o=Math.max(r.window.pageYOffset-f,0),o!==0&&(o+=v),r.window.scrollTo(r.window.pageXOffset,o),l(!0)):c(!1):i.keyCodeMap.pageDown.indexOf(n.keyCode)!==-1?(p=r.document.documentElement.scrollHeight,s=p-f,r.window.pageYOffset<s?(h=Math.min(r.window.pageYOffset+f,s),h!==s&&(h-=v),r.window.scrollTo(r.window.pageXOffset,h),c(!0)):l(!1)):i.keyCodeMap.home.indexOf(n.keyCode)!==-1?c(!1):i.keyCodeMap.end.indexOf(n.keyCode)!==-1&&l(!1)}}function kt(n){var t,i;n.defaultPrevented||(t=r.window.CortanaApp,t&&(i=t.tryHandleKeyEvent(n.keyCode),i&&n.preventDefault()))}function dt(n){if(!n.defaultPrevented){var t=r.document.activeElement,u=!1,f=at(t);i.keyCodeMap.accept.indexOf(n.keyCode)!==-1?u=f.accept(t):i.keyCodeMap.cancel.indexOf(n.keyCode)!==-1&&(u=f.cancel(t));u&&n.preventDefault()}}var h=e.Key,et={focusOverride:"data-win-xyfocus",focusOverrideLegacy:"data-win-focus"},a={focusable:"win-focusable",suspended:"win-xyfocus-suspended",toggleMode:"win-xyfocus-togglemode",toggleModeActive:"win-xyfocus-togglemode-active",xboxPlatform:"win-xbox"},c={messageDataProperty:"msWinJSXYFocusControlMessage",register:"register",unregister:"unregister",dFocusEnter:"dFocusEnter",dFocusExit:"dFocusExit"},k={left:"left",right:"right",up:"up",down:"down"},it={focusChanging:"focuschanging",focusChanged:"focuschanged"},vt=["A","BUTTON","IFRAME","INPUT","SELECT","TEXTAREA"],ut={primaryAxisDistanceWeight:30,secondaryAxisDistanceWeight:20,percentInHistoryShadowWeight:1e5},v=60,p,d,l,nt,y,tt,rt;i.keyCodeMap={left:[],right:[],up:[],down:[],accept:[],cancel:[],pageUp:[],pageDown:[],home:[],end:[]};i.focusRoot;i.findNextFocusElement=ft;i.moveFocus=ot,function(n){function f(n){return n&&n.click&&n.click(),!1}function t(){for(var t=[],n=0;n<arguments.length;n++)t[+n]=arguments[n];return!1}var o=function(){function n(){}return n.accept=f,n.cancel=t,n.xyFocus=g,n}(),i,r,u;n.RestState=o;i=function(){function n(){}return n.accept=t,n.cancel=t,n.xyFocus=t,n}();n.SuspendedState=i;r=function(){function n(){}return n.accept=function(n){return e.addClass(n,a.toggleModeActive),!0},n.cancel=t,n.xyFocus=g,n}();n.ToggleModeRestState=r;u=function(){function n(){}return n.cancel=function(n){return n&&e.removeClass(n,a.toggleModeActive),!0},n.accept=f,n.xyFocus=t,n}();n.ToggleModeActiveState=u}(nt||(nt={})),function(n){function u(){return i(function(){return!1}),t.length}function f(n){var i=r.document.querySelectorAll("IFRAME"),t=Array.prototype.filter.call(i,function(t){return t.contentWindow===n});return t.length?t[0]:null}function e(n){var t=!1;return i(function(i){i===n&&(t=!0)}),t}function o(n){t.push(n)}function s(n){var r=-1;i(function(t,i){t===n&&(r=i)});r!==-1&&t.splice(r,1)}function i(n){for(var r,i=t.length-1;i>=0;i--)try{r=t[i];r.contentWindow?n(r,i):t.splice(i,1)}catch(u){t.splice(i,1)}}var t=[];n.count=u;n.getIFrameFromWindow=f;n.isXYFocusEnabled=e;n.registerIFrame=o;n.unregisterIFrame=s}(y||(y={}));r.document&&(i.keyCodeMap.left.push(h.GamepadLeftThumbstickLeft,h.GamepadDPadLeft,h.NavigationLeft),i.keyCodeMap.right.push(h.GamepadLeftThumbstickRight,h.GamepadDPadRight,h.NavigationRight),i.keyCodeMap.up.push(h.GamepadLeftThumbstickUp,h.GamepadDPadUp,h.NavigationUp),i.keyCodeMap.down.push(h.GamepadLeftThumbstickDown,h.GamepadDPadDown,h.NavigationDown),i.keyCodeMap.accept.push(h.GamepadA,h.NavigationAccept),i.keyCodeMap.cancel.push(h.GamepadB,h.NavigationCancel),i.keyCodeMap.pageUp.push(h.GamepadLeftTrigger),i.keyCodeMap.pageDown.push(h.GamepadRightTrigger),r.addEventListener("message",function(n){var f=null,u,o,t,i,e;try{if(f=n.source,!f)return}catch(n){return}if(n.data&&n.data[c.messageDataProperty]){u=n.data[c.messageDataProperty];switch(u.type){case c.register:t=y.getIFrameFromWindow(f);t&&y.registerIFrame(t);break;case c.unregister:t=y.getIFrameFromWindow(f);t&&y.unregisterIFrame(t);break;case c.dFocusEnter:o=g(u.direction,-1,u.referenceRect,!0);o||(ct(r.document.body)?r.document.body.focus():g(u.direction,-1));break;case c.dFocusExit:if(t=y.getIFrameFromWindow(f),r.document.activeElement!==t)break;i=u.referenceRect;e=t.getBoundingClientRect();i.left+=e.left;i.top+=e.top;typeof i.right=="number"&&(i.right+=e.left);typeof i.bottom=="number"&&(i.bottom+=e.top);g(u.direction,-1,i)}}}),f.ready().then(function(){if(e.hasWinRT&&r.Windows&&r.Windows.Xbox&&e.addClass(r.document.body,a.xboxPlatform),r.document.addEventListener("keydown",dt,!0),r.document.addEventListener("keydown",bt),r.document.addEventListener("keyup",kt),r.top!==r.window){var n={};n[c.messageDataProperty]={type:c.register,version:1};r.parent.postMessage(n,"*")}}),tt={focusRoot:{get:function(){return i.focusRoot},set:function(n){i.focusRoot=n}},findNextFocusElement:ft,keyCodeMap:i.keyCodeMap,moveFocus:ot,onfocuschanged:o._createEventProperty(it.focusChanged),onfocuschanging:o._createEventProperty(it.focusChanging),_xyFocus:g,_iframeHelper:y},tt=f._merge(tt,o.eventMixin),tt._listeners={},rt=tt,u.Namespace.define("WinJS.UI.XYFocus",tt))}),r("base",["WinJS/Core/_WinJS","WinJS/XYFocus",],function(n){"use strict";return n.Namespace.define("WinJS.Utilities",{_require:u,_define:r}),n}),u(["WinJS/Core/_WinJS","base"],function(n){i.WinJS=n;typeof module!="undefined"&&(module.exports=n)}),i.WinJS}),function(n){n.UI.XYFocus.keyCodeMap.up.push(n.Utilities.Key.upArrow);n.UI.XYFocus.keyCodeMap.down.push(n.Utilities.Key.downArrow);n.UI.XYFocus.keyCodeMap.left.push(n.Utilities.Key.leftArrow);n.UI.XYFocus.keyCodeMap.right.push(n.Utilities.Key.rightArrow)}(i.WinJS)}