<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Impact Webview</title>

    <!-- META -->
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <meta name="format-detection" content="telephone=no">

    <!-- JS -->
    <script type="text/javascript">
      if(!window.applifierimpact || !window.unityads) {
        window.applifierimpact = window.unityads = new function() {
          this.cachedCalls = [];
          this.init = function(data) {
            this.cachedCalls.push(['init', data]);
            return "cached";
          };
          this.setView = function(view, data) {
            this.cachedCalls.push(['setView', view, data]);
            return "cached";
          };
          this.handleNativeEvent = function(type, data) {
            this.cachedCalls.push(['handleNativeEvent', type, data]);
            return "cached";
          };
        };
      }
    </script>
    <style type="text/css">html{width:100%;height:100%}
body.iphone,body.ipad,body.android{width:100%;height:100%;margin:0;padding:0;font-family:Helvetica,sans-serif;color:#000;background-color:#000;-webkit-text-size-adjust:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;-webkit-user-drag:none;font-weight:lighter}
body.iphone .page-container,body.ipad .page-container,body.android .page-container{width:100%;height:100%;overflow:hidden;position:absolute;top:0;left:0;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(100%,#fff),color-stop(0%,#bfbfbf));background:-webkit-linear-gradient(top,#fff,#bfbfbf)}
body.iphone .none-screen,body.ipad .none-screen,body.android .none-screen{display:none}
body.iphone .campaigns-container,body.ipad .campaigns-container,body.android .campaigns-container{position:absolute;top:0;bottom:0;width:100%;margin:auto}
body.iphone .header-container,body.ipad .header-container,body.android .header-container{width:100%;overflow:hidden;}
body.iphone .header-container .item-container,body.ipad .header-container .item-container,body.android .header-container .item-container{width:100%;opacity:0;float:left;}
body.iphone .header-container .item-container .item-image,body.ipad .header-container .item-container .item-image,body.android .header-container .item-container .item-image{float:left}
body.iphone .header-container .item-container .item-text-small,body.ipad .header-container .item-container .item-text-small,body.android .header-container .item-container .item-text-small{color:#007aff}
body.iphone .video-container,body.ipad .video-container,body.android .video-container{overflow:hidden;}
body.iphone .video-container #scroller-container,body.ipad .video-container #scroller-container,body.android .video-container #scroller-container{position:relative;z-index:1;overflow:visible !important;margin:0 auto;}
body.iphone .video-container #scroller-container #scroller,body.ipad .video-container #scroller-container #scroller,body.android .video-container #scroller-container #scroller{float:left;}
body.iphone .video-container #scroller-container #scroller ul,body.ipad .video-container #scroller-container #scroller ul,body.android .video-container #scroller-container #scroller ul{list-style:none;}
body.iphone .video-container #scroller-container #scroller ul li,body.ipad .video-container #scroller-container #scroller ul li,body.android .video-container #scroller-container #scroller ul li{box-sizing:border-box;display:block;float:left;background-repeat:no-repeat;background-position:top}
body.iphone .btn-play-bg,body.ipad .btn-play-bg,body.android .btn-play-bg{display:block;position:relative}
body.iphone .btn-play,body.ipad .btn-play,body.android .btn-play{display:block;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,rgba(0,0,0,0.25)),color-stop(100%,#000));background:-webkit-linear-gradient(top,rgba(0,0,0,0.25),#000);text-align:center;position:absolute;top:0;left:0;bottom:0;right:0;margin:auto}
body.iphone .btn-play span,body.ipad .btn-play span,body.android .btn-play span{color:#fff}
body.iphone #navigation-container,body.ipad #navigation-container,body.android #navigation-container{text-align:center;}
body.iphone #navigation-container #indicator,body.ipad #navigation-container #indicator,body.android #navigation-container #indicator{display:inline-block;list-style:none;}
body.iphone #navigation-container #indicator li,body.ipad #navigation-container #indicator li,body.android #navigation-container #indicator li{float:left;list-style:none;background-color:rgba(0,0,0,0.4)}
body.iphone #navigation-container #indicator li.active,body.ipad #navigation-container #indicator li.active,body.android #navigation-container #indicator li.active{background-color:#007aff}
body.iphone #game-info,body.ipad #game-info,body.android #game-info{display:block;list-style:none;}
body.iphone #game-info li,body.ipad #game-info li,body.android #game-info li{text-align:center;display:none;}
body.iphone #game-info li .description,body.ipad #game-info li .description,body.android #game-info li .description{color:#007aff}
body.iphone #game-info li.active,body.ipad #game-info li.active,body.android #game-info li.active{display:block}
body.iphone .btn-watch-now,body.ipad .btn-watch-now,body.android .btn-watch-now{color:#fff;display:block;text-align:center;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#4aaef0),color-stop(100%,#016add));background:-webkit-linear-gradient(top,#4aaef0,#016add)}
body.iphone .btn-watch-now.disabled,body.ipad .btn-watch-now.disabled,body.android .btn-watch-now.disabled{-webkit-box-shadow:none;opacity:.25}
body.iphone .btn-watch-now:active,body.ipad .btn-watch-now:active,body.android .btn-watch-now:active{opacity:.5}
body.iphone .campaign-container,body.ipad .campaign-container,body.android .campaign-container{width:100%;height:100%}
body.iphone .btn-close-region,body.ipad .btn-close-region,body.android .btn-close-region{position:absolute;z-index:1}
body.iphone .btn-watch-again-region,body.ipad .btn-watch-again-region,body.android .btn-watch-again-region{position:absolute;z-index:1}
body.iphone a.btn-watch-again,body.ipad a.btn-watch-again,body.android a.btn-watch-again,body.iphone a.btn-close,body.ipad a.btn-close,body.android a.btn-close{z-index:1;position:absolute;background-color:rgba(255,255,255,0.5);color:#007aff;text-align:center}
body.iphone a.btn-watch-again,body.ipad a.btn-watch-again,body.android a.btn-watch-again{-webkit-transform:rotate(90deg)}
body.iphone .game-background,body.ipad .game-background,body.android .game-background{width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;background-color:#000;position:absolute;top:0;bottom:47%}
body.iphone .end-screen-info-background,body.ipad .end-screen-info-background,body.android .end-screen-info-background{position:absolute;bottom:0;width:100%;height:47%;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(100%,#fff),color-stop(0%,#bfbfbf));background:-webkit-linear-gradient(top,#fff,#bfbfbf)}
body.iphone .name-container,body.ipad .name-container,body.android .name-container{color:#1f1e1e}
body.iphone .game-icon,body.ipad .game-icon,body.android .game-icon{float:left;background-color:#fff;background-size:cover}
body.iphone .store-container,body.ipad .store-container,body.android .store-container{float:left}
body.iphone .game-rating,body.ipad .game-rating,body.android .game-rating{color:#fff;display:inline-block;position:relative}
body.iphone .game-rating-mask,body.ipad .game-rating-mask,body.android .game-rating-mask{color:#ff8e00;position:absolute;left:0;width:0%;height:100%;overflow:hidden;font-size:inherit}
body.iphone .game-rating-count,body.ipad .game-rating-count,body.android .game-rating-count{color:#7c7c7c}
body.iphone .game-rating-br,body.ipad .game-rating-br,body.android .game-rating-br{display:none}
body.iphone .game-rating-postfix,body.ipad .game-rating-postfix,body.android .game-rating-postfix{display:none}
body.iphone .download-container,body.ipad .download-container,body.android .download-container{text-align:center;clear:both}
body.iphone .btn-download,body.ipad .btn-download,body.android .btn-download{color:#fff;display:block;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#4aaef0),color-stop(100%,#016add));background:-webkit-linear-gradient(top,#4aaef0,#016add);text-shadow:0 -1px #217fea;left:0;right:0;}
body.iphone .btn-download .icon-download,body.ipad .btn-download .icon-download,body.android .btn-download .icon-download{-webkit-transform:rotate(90deg);display:block;float:left;background-color:rgba(0,0,0,0.15)}
body.iphone .download-text-alt,body.ipad .download-text-alt,body.android .download-text-alt{display:none}
body.iphone .download-text-fresh,body.ipad .download-text-fresh,body.android .download-text-fresh{display:none}
body.iphone .download-text-fresh-alt2,body.ipad .download-text-fresh-alt2,body.android .download-text-fresh-alt2{display:none}
body.iphone .download-text-fresh-alt3,body.ipad .download-text-fresh-alt3,body.android .download-text-fresh-alt3{display:none}
body.iphone .download-explanation,body.ipad .download-explanation,body.android .download-explanation{display:none}
body.iphone .everyplay-gameads-logo,body.ipad .everyplay-gameads-logo,body.android .everyplay-gameads-logo{background-image:url("img/unityads.png");background-position:center;background-size:cover;margin:auto;position:absolute;left:0;right:0}
body.iphone .download-explanation-fresh,body.ipad .download-explanation-fresh,body.android .download-explanation-fresh{display:none}
body.iphone .store-badge-container,body.ipad .store-badge-container,body.android .store-badge-container{display:none}
body.iphone.landscape .game-background,body.ipad.landscape .game-background,body.android.landscape .game-background{width:53%;bottom:0}
body.iphone.landscape .end-screen-info-background,body.ipad.landscape .end-screen-info-background,body.android.landscape .end-screen-info-background{width:47%;height:100%;right:0}
body.iphone .popup-background,body.ipad .popup-background,body.android .popup-background{visibility:hidden;position:absolute;top:0;left:0;background-color:rgba(0,0,0,0.75);width:100%;height:100%;z-index:100;text-align:center;background-size:cover}
body.iphone .spinner-container,body.ipad .spinner-container,body.android .spinner-container{display:inline-block;text-align:center;background-color:#000;color:#fff}
body.iphone .spinner-text,body.ipad .spinner-text,body.android .spinner-text{float:left}
body.iphone .spinner-animation,body.ipad .spinner-animation,body.android .spinner-animation{width:24px;height:24px;float:left;margin-right:15px;border:4px solid #fff;border-left-color:transparent;border-right-color:transparent;border-radius:200px;-webkit-animation:spinner 1s linear infinite}
@-webkit-keyframes spinner{0%{-webkit-transform:rotate(0)}
100%{-webkit-transform:rotate(360deg)}
}body.iphone .error-container,body.ipad .error-container,body.android .error-container{display:inline-block;text-align:center;background-color:#000;color:#fff}
body.iphone .btn-ok,body.ipad .btn-ok,body.android .btn-ok{display:block;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#4aaef0),color-stop(100%,#016add));background:-webkit-linear-gradient(top,#4aaef0,#016add)}
body.iphone .campaigns-container,body.ipad .campaigns-container,body.android .campaigns-container{height:260px}
body.iphone .start-screen a.btn-close,body.ipad .start-screen a.btn-close,body.android .start-screen a.btn-close{margin-top:10px}
body.iphone .header-container,body.ipad .header-container,body.android .header-container{margin-top:10px;}
body.iphone .header-container .item-container,body.ipad .header-container .item-container,body.android .header-container .item-container{margin:10px;}
body.iphone .header-container .item-container .item-image,body.ipad .header-container .item-container .item-image,body.android .header-container .item-container .item-image{width:50px;height:50px;background-size:50px;border-radius:10pt;-webkit-box-shadow:0 3px 3px rgba(0,0,0,0.2);margin:0 15px 0 0}
body.iphone .header-container .item-container .item-text-small,body.ipad .header-container .item-container .item-text-small,body.android .header-container .item-container .item-text-small{padding:8px 0 0 0;font-size:12px}
body.iphone .header-container .item-container .item-text-large,body.ipad .header-container .item-container .item-text-large,body.android .header-container .item-container .item-text-large{font-size:20px}
body.iphone .video-container #scroller-container,body.ipad .video-container #scroller-container,body.android .video-container #scroller-container{padding:0;width:280px;height:167px;}
body.iphone .video-container #scroller-container #scroller,body.ipad .video-container #scroller-container #scroller,body.android .video-container #scroller-container #scroller{width:810px;height:100%;padding:0;}
body.iphone .video-container #scroller-container #scroller ul,body.ipad .video-container #scroller-container #scroller ul,body.android .video-container #scroller-container #scroller ul{margin:0;padding:0;}
body.iphone .video-container #scroller-container #scroller ul li,body.ipad .video-container #scroller-container #scroller ul li,body.android .video-container #scroller-container #scroller ul li{margin:10px 0;width:280px;height:146px;background-size:260px 146px}
body.iphone #navigation-container,body.ipad #navigation-container,body.android #navigation-container{padding-top:12px;}
body.iphone #navigation-container #indicator,body.ipad #navigation-container #indicator,body.android #navigation-container #indicator{margin:4px auto;padding:0;}
body.iphone #navigation-container #indicator li,body.ipad #navigation-container #indicator li,body.android #navigation-container #indicator li{padding:0;margin:0 4px 0 0;text-indent:-9999em;width:8px;height:8px;border-radius:5px;-webkit-box-shadow:inset 0 2px 2px rgba(0,0,0,0.2),0 1px 0 rgba(255,255,255,0.1)}
body.iphone #navigation-container #indicator li.active,body.ipad #navigation-container #indicator li.active,body.android #navigation-container #indicator li.active{-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.2)}
body.iphone #navigation-container #indicator li:last-child,body.ipad #navigation-container #indicator li:last-child,body.android #navigation-container #indicator li:last-child{margin:0}
body.iphone .btn-play-bg,body.ipad .btn-play-bg,body.android .btn-play-bg{width:258px;height:144px;margin:0 auto;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,0.5);border:1px solid rgba(162,218,255,0.5)}
body.iphone .btn-play,body.ipad .btn-play,body.android .btn-play{width:50px;height:50px;font-size:25px;line-height:52px;border-radius:200px;border:4px solid #fff;-webkit-box-shadow:0 4px 4px rgba(0,0,0,0.5),inset 0 -2px 5px rgba(0,150,255,0.5),inset 2px 0 5px rgba(0,150,255,0.5),inset -2px 0 5px rgba(0,150,255,0.5);text-shadow:0 4px 4px rgba(0,0,0,0.5)}
body.iphone .btn-play span,body.ipad .btn-play span,body.android .btn-play span{margin-left:5px;font-size:25px}
body.iphone #game-info,body.ipad #game-info,body.android #game-info{margin:0;padding:0;}
body.iphone #game-info li .game-name,body.ipad #game-info li .game-name,body.android #game-info li .game-name{font-size:16px}
body.iphone #game-info li .description,body.ipad #game-info li .description,body.android #game-info li .description{padding:0;font-size:12px}
body.iphone .btn-watch-now,body.ipad .btn-watch-now,body.android .btn-watch-now{padding:15px 25px 15px 25px;border-radius:5px;font-size:22px;line-height:20px;width:150px;margin:25px auto 0 auto}
body.iphone .btn-watch-now.disabled,body.ipad .btn-watch-now.disabled,body.android .btn-watch-now.disabled{-webkit-box-shadow:none;opacity:.25}
body.iphone .btn-watch-now:active,body.ipad .btn-watch-now:active,body.android .btn-watch-now:active{opacity:.5}
body.iphone.landscape .btn-watch-now,body.ipad.landscape .btn-watch-now,body.android.landscape .btn-watch-now{display:none}
body.iphone.landscape .header-container,body.ipad.landscape .header-container,body.android.landscape .header-container{margin-top:0}
body.iphone.landscape .campaigns-container,body.ipad.landscape .campaigns-container,body.android.landscape .campaigns-container{height:185px}
body.iphone .btn-close-region,body.ipad .btn-close-region,body.android .btn-close-region{top:0;right:0;width:55px;height:55px}
body.iphone .btn-watch-again-region,body.ipad .btn-watch-again-region,body.android .btn-watch-again-region{top:0;left:0;width:55px;height:55px}
body.iphone a.btn-watch-again,body.ipad a.btn-watch-again,body.android a.btn-watch-again,body.iphone a.btn-close,body.ipad a.btn-close,body.android a.btn-close{top:10px;font-size:28px;width:32px;height:32px;border-radius:17px}
body.iphone a.btn-watch-again,body.ipad a.btn-watch-again,body.android a.btn-watch-again{line-height:33px;left:10px}
body.iphone a.btn-close,body.ipad a.btn-close,body.android a.btn-close{line-height:28px;right:10px}
body.iphone .game-background,body.ipad .game-background,body.android .game-background{-webkit-box-shadow:0 4px 0 0 #007aff}
body.iphone .end-screen-info-background,body.ipad .end-screen-info-background,body.android .end-screen-info-background{border-top:4px solid #007aff;-webkit-box-shadow:0 -5px 10px rgba(28,28,28,0.5)}
body.iphone .name-container,body.ipad .name-container,body.android .name-container{font-size:20pt;text-overflow:ellipsis;-webkit-line-clamp:2;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}
body.iphone .game-info,body.ipad .game-info,body.android .game-info{margin-top:20px;margin-left:18px;}
body.iphone .game-info .name-container,body.ipad .game-info .name-container,body.android .game-info .name-container{padding-left:10px;padding-right:10px;padding-top:8px;font-size:17pt}
body.iphone .game-icon,body.ipad .game-icon,body.android .game-icon{width:75px;height:75px;border-radius:18pt;margin-bottom:20px}
body.iphone .store-container,body.ipad .store-container,body.android .store-container{margin-left:10px;margin-top:5px}
body.iphone .game-rating,body.ipad .game-rating,body.android .game-rating{font-size:20px;letter-spacing:5px}
body.iphone .game-rating-count,body.ipad .game-rating-count,body.android .game-rating-count{font-size:17px}
body.iphone .btn-download,body.ipad .btn-download,body.android .btn-download{margin:0 15px 0 15px;padding:10px 10px 10px 10px;border-radius:10px;font-size:18pt;line-height:24pt;margin-top:45px;}
body.iphone .btn-download .icon-download,body.ipad .btn-download .icon-download,body.android .btn-download .icon-download{width:32px;height:32px;border-radius:16px;font-size:20px;line-height:29px}
body.iphone .everyplay-gameads-logo,body.ipad .everyplay-gameads-logo,body.android .everyplay-gameads-logo{width:68px;height:16px;bottom:10px}
body.iphone.landscape .end-screen-info-background,body.ipad.landscape .end-screen-info-background,body.android.landscape .end-screen-info-background{border-top:none;border-left:4px solid #007aff}
body.iphone.landscape .btn-close-region,body.ipad.landscape .btn-close-region,body.android.landscape .btn-close-region{top:0;bottom:auto}
body.iphone.landscape .btn-watch-again-region,body.ipad.landscape .btn-watch-again-region,body.android.landscape .btn-watch-again-region{top:auto;bottom:0;left:0}
body.iphone.landscape a.btn-watch-again,body.ipad.landscape a.btn-watch-again,body.android.landscape a.btn-watch-again{top:auto;bottom:10px;left:10px}
body.iphone.landscape a.btn-close,body.ipad.landscape a.btn-close,body.android.landscape a.btn-close{top:10px;bottom:auto}
body.iphone.landscape .end-screen .btn-close-region,body.ipad.landscape .end-screen .btn-close-region,body.android.landscape .end-screen .btn-close-region{left:0;right:auto}
body.iphone.landscape .end-screen a.btn-close,body.ipad.landscape .end-screen a.btn-close,body.android.landscape .end-screen a.btn-close{left:10px}
body.iphone.landscape .start-screen .btn-close-region,body.ipad.landscape .start-screen .btn-close-region,body.android.landscape .start-screen .btn-close-region{right:0;left:auto}
body.iphone.landscape .start-screen a.btn-close,body.ipad.landscape .start-screen a.btn-close,body.android.landscape .start-screen a.btn-close{right:10px;margin-top:0}
body.iphone.landscape .game-info,body.ipad.landscape .game-info,body.android.landscape .game-info{margin-top:25px;margin-left:auto;text-align:center}
body.iphone.landscape .game-icon,body.ipad.landscape .game-icon,body.android.landscape .game-icon{left:0;right:0;position:absolute;margin:auto}
body.iphone.landscape .game-icon-shadow,body.ipad.landscape .game-icon-shadow,body.android.landscape .game-icon-shadow{background-image:url("img/icon_shadow.png");background-position:center;background-size:cover;margin:auto;position:absolute;left:0;right:0;width:79px;height:12px;margin-top:79px}
body.iphone.landscape .name-container,body.ipad.landscape .name-container,body.android.landscape .name-container{font-size:18pt;padding-top:95px}
body.iphone.landscape .store-container,body.ipad.landscape .store-container,body.android.landscape .store-container{float:none;clear:both;margin-left:auto;padding-top:0;text-align:center}
body.iphone.landscape .btn-download,body.ipad.landscape .btn-download,body.android.landscape .btn-download{font-size:11pt;padding:5px 10px 5px 10px;margin-top:15px}
body.iphone.landscape .icon-download,body.ipad.landscape .icon-download,body.android.landscape .icon-download{line-height:22pt}
body.iphone.landscape .everyplay-gameads-logo,body.ipad.landscape .everyplay-gameads-logo,body.android.landscape .everyplay-gameads-logo{bottom:20px}
body.iphone .spinner-container,body.ipad .spinner-container,body.android .spinner-container{padding:10px 15px;border-radius:10px;-webkit-box-shadow:0 0 50px #fff;border:3px solid #fff;letter-spacing:1px}
body.iphone .spinner-text,body.ipad .spinner-text,body.android .spinner-text{line-height:32px}
body.iphone .error-container,body.ipad .error-container,body.android .error-container{padding:10px 15px;border-radius:20px;-webkit-box-shadow:0 0 20px #fff;border:3px solid #fff;letter-spacing:1px}
body.iphone .error-text,body.ipad .error-text,body.android .error-text{line-height:32px}
body.iphone .btn-ok,body.ipad .btn-ok,body.android .btn-ok{padding:5px;margin:5px 0;-webkit-box-shadow:0 8px 8px rgba(0,0,0,0.5);border-radius:10px;font-size:18px;line-height:20px}
@media screen and (max-height: 320px) and (max-width: 427px),screen and (max-height: 427px) and (max-width: 320px){body.iphone .game-icon,body.ipad .game-icon,body.android .game-icon{width:60px;height:60px;border-radius:12pt}
body.iphone .game-info,body.ipad .game-info,body.android .game-info{margin-top:15px;}
body.iphone .game-info .name-container,body.ipad .game-info .name-container,body.android .game-info .name-container{font-size:15pt}
body.iphone .btn-download,body.ipad .btn-download,body.android .btn-download{padding:5px 5px 5px 5px;font-size:16pt}
body.iphone.landscape .game-icon-shadow,body.ipad.landscape .game-icon-shadow,body.android.landscape .game-icon-shadow{margin-top:67px}
body.iphone.landscape .game-info,body.ipad.landscape .game-info,body.android.landscape .game-info{margin-top:35px;}
body.iphone.landscape .game-info .name-container,body.ipad.landscape .game-info .name-container,body.android.landscape .game-info .name-container{font-size:13pt}
body.iphone.landscape .game-rating,body.ipad.landscape .game-rating,body.android.landscape .game-rating{font-size:17px}
body.iphone.landscape .btn-download,body.ipad.landscape .btn-download,body.android.landscape .btn-download{font-size:9pt;padding:5px 5px 5px 5px;}
body.iphone.landscape .btn-download .icon-download,body.ipad.landscape .btn-download .icon-download,body.android.landscape .btn-download .icon-download{width:24px;height:24px;font-size:15px;margin-top:3px;line-height:24px}
}@media screen and (min-height: 568px) and (min-width: 320px),screen and (min-height: 320px) and (min-width: 568px){body.iphone .game-info,body.ipad .game-info,body.android .game-info{margin-top:22px}
body.iphone .name-container,body.ipad .name-container,body.android .name-container{padding-top:10px}
body.iphone .store-container,body.ipad .store-container,body.android .store-container{margin-top:10px}
body.iphone .btn-download,body.ipad .btn-download,body.android .btn-download{margin-top:65px;padding:15px 10px 15px 10px}
body.iphone .everyplay-gameads-logo,body.ipad .everyplay-gameads-logo,body.android .everyplay-gameads-logo{bottom:20px}
body.iphone.landscape .btn-download,body.ipad.landscape .btn-download,body.android.landscape .btn-download{font-size:14pt}
}@media screen and (min-height: 360px) and (min-width: 640px),screen and (min-height: 640px) and (min-width: 360px){body.iphone .btn-watch-again-region,body.ipad .btn-watch-again-region,body.android .btn-watch-again-region{width:75px;height:75px}
body.iphone .btn-close-region,body.ipad .btn-close-region,body.android .btn-close-region{width:75px;height:75px}
body.iphone .game-info,body.ipad .game-info,body.android .game-info{margin-top:35px}
body.iphone .game-icon,body.ipad .game-icon,body.android .game-icon{width:85px;height:85px}
body.iphone .name-container,body.ipad .name-container,body.android .name-container{font-size:20pt}
body.iphone .game-rating,body.ipad .game-rating,body.android .game-rating{font-size:25px}
body.iphone .game-rating-count,body.ipad .game-rating-count,body.android .game-rating-count{font-size:21px}
body.iphone .btn-download,body.ipad .btn-download,body.android .btn-download{margin-top:90px}
body.iphone.landscape .game-info,body.ipad.landscape .game-info,body.android.landscape .game-info{margin-top:20px}
body.iphone.landscape .game-icon-shadow,body.ipad.landscape .game-icon-shadow,body.android.landscape .game-icon-shadow{margin-top:90px}
body.iphone.landscape .name-container,body.ipad.landscape .name-container,body.android.landscape .name-container{padding-top:115px}
body.iphone.landscape .btn-download,body.ipad.landscape .btn-download,body.android.landscape .btn-download{padding:10px 10px 10px 10px}
}@media screen and (min-height: 384px) and (min-width: 640px),screen and (min-height: 640px) and (min-width: 384px){body.iphone.landscape .game-info,body.ipad.landscape .game-info,body.android.landscape .game-info{margin-top:45px}
body.iphone.landscape .btn-download,body.ipad.landscape .btn-download,body.android.landscape .btn-download{padding:15px 10px 15px 10px;font-size:16pt}
}@media screen and (min-height: 424px) and (min-width: 753px),screen and (min-height: 753px) and (min-width: 424px){body.iphone .game-info,body.ipad .game-info,body.android .game-info{margin-top:50px;}
body.iphone .game-info .name-container,body.ipad .game-info .name-container,body.android .game-info .name-container{font-size:21pt}
body.iphone .game-icon,body.ipad .game-icon,body.android .game-icon{width:100px;height:100px}
body.iphone .game-rating,body.ipad .game-rating,body.android .game-rating{font-size:30px}
body.iphone .game-rating-count,body.ipad .game-rating-count,body.android .game-rating-count{font-size:24px}
body.iphone .btn-download,body.ipad .btn-download,body.android .btn-download{padding:25px 20px 25px 20px;font-size:22pt;line-height:22pt}
body.iphone .everyplay-gameads-logo,body.ipad .everyplay-gameads-logo,body.android .everyplay-gameads-logo{width:102px;height:24px}
body.iphone.landscape .game-info,body.ipad.landscape .game-info,body.android.landscape .game-info{margin-top:35px}
body.iphone.landscape .name-container,body.ipad.landscape .name-container,body.android.landscape .name-container{padding-top:125px}
body.iphone.landscape .game-icon-shadow,body.ipad.landscape .game-icon-shadow,body.android.landscape .game-icon-shadow{margin-top:105px}
body.iphone.landscape .btn-download,body.ipad.landscape .btn-download,body.android.landscape .btn-download{font-size:19pt;line-height:19pt}
}@media screen and (min-height: 540px) and (min-width: 960px),screen and (min-height: 960px) and (min-width: 540px){body.iphone .btn-watch-again-region,body.ipad .btn-watch-again-region,body.android .btn-watch-again-region,body.iphone .btn-close-region,body.ipad .btn-close-region,body.android .btn-close-region{width:95px;height:95px}
body.iphone a.btn-watch-again,body.ipad a.btn-watch-again,body.android a.btn-watch-again,body.iphone a.btn-close,body.ipad a.btn-close,body.android a.btn-close{top:20px;width:50px;height:50px;border-radius:25px;font-size:42px}
body.iphone a.btn-watch-again,body.ipad a.btn-watch-again,body.android a.btn-watch-again{left:20px;line-height:50px}
body.iphone a.btn-close,body.ipad a.btn-close,body.android a.btn-close{right:20px;line-height:45px}
body.iphone .game-icon,body.ipad .game-icon,body.android .game-icon{width:130px;height:130px}
body.iphone .game-info,body.ipad .game-info,body.android .game-info{margin-top:60px;}
body.iphone .game-info .name-container,body.ipad .game-info .name-container,body.android .game-info .name-container{font-size:27pt}
body.iphone .game-rating,body.ipad .game-rating,body.android .game-rating{font-size:40px}
body.iphone .game-rating-count,body.ipad .game-rating-count,body.android .game-rating-count{font-size:30px}
body.iphone .btn-download,body.ipad .btn-download,body.android .btn-download{padding:30px 25px 30px 25px;font-size:26pt;line-height:26pt;margin-top:120px;}
body.iphone .btn-download .icon-download,body.ipad .btn-download .icon-download,body.android .btn-download .icon-download{width:50px;height:50px;font-size:30px;line-height:47px;border-radius:25px;margin-top:-7px}
body.iphone.landscape .end-screen-info,body.ipad.landscape .end-screen-info,body.android.landscape .end-screen-info{margin:30px}
body.iphone.landscape a.btn-watch-again,body.ipad.landscape a.btn-watch-again,body.android.landscape a.btn-watch-again{bottom:20px;left:20px;top:auto}
body.iphone.landscape .end-screen a.btn-close,body.ipad.landscape .end-screen a.btn-close,body.android.landscape .end-screen a.btn-close{top:20px;left:20px;right:auto}
body.iphone.landscape .game-icon-shadow,body.ipad.landscape .game-icon-shadow,body.android.landscape .game-icon-shadow{margin-top:145px;width:119px;height:18px}
body.iphone.landscape .name-container,body.ipad.landscape .name-container,body.android.landscape .name-container{padding-top:175px}
body.iphone.landscape .btn-download,body.ipad.landscape .btn-download,body.android.landscape .btn-download{padding:25px 20px 25px 20px;font-size:21pt;line-height:21pt}
body.iphone.landscape .icon-download,body.ipad.landscape .icon-download,body.android.landscape .icon-download{margin-top:-11px}
}@media screen and (min-height: 600px) and (min-width: 906px),screen and (min-height: 906px) and (min-width: 600px){body.iphone .end-screen-info,body.ipad .end-screen-info,body.android .end-screen-info{margin:30px}
body.iphone .game-info,body.ipad .game-info,body.android .game-info{margin-top:70px;}
body.iphone .game-info .name-container,body.ipad .game-info .name-container,body.android .game-info .name-container{font-size:29pt}
body.iphone.landscape .game-info,body.ipad.landscape .game-info,body.android.landscape .game-info{margin-top:70px}
}@media screen and (min-height: 600px) and (min-width: 1024px),screen and (min-height: 1024px) and (min-width: 600px){body.iphone .game-info,body.ipad .game-info,body.android .game-info{margin-top:50px;}
body.iphone .game-info .name-container,body.ipad .game-info .name-container,body.android .game-info .name-container{font-size:31pt}
body.iphone .game-rating,body.ipad .game-rating,body.android .game-rating{font-size:45px}
body.iphone .game-rating-count,body.ipad .game-rating-count,body.android .game-rating-count{font-size:35px}
body.iphone .everyplay-gameads-logo,body.ipad .everyplay-gameads-logo,body.android .everyplay-gameads-logo{width:153px;height:36px}
body.iphone.landscape .game-info,body.ipad.landscape .game-info,body.android.landscape .game-info{margin-top:40px}
body.iphone.landscape .btn-download,body.ipad.landscape .btn-download,body.android.landscape .btn-download{padding:30px 20px 30px 20px;font-size:24pt;line-height:24pt;margin-top:30px}
}@media screen and (min-height: 768px) and (min-width: 1024px),screen and (min-height: 1024px) and (min-width: 768px){body.iphone .game-info,body.ipad .game-info,body.android .game-info{margin-top:50px;}
body.iphone .game-info .name-container,body.ipad .game-info .name-container,body.android .game-info .name-container{padding-left:30px;font-size:38pt}
body.iphone .store-container,body.ipad .store-container,body.android .store-container{margin-left:30px}
body.iphone .game-rating,body.ipad .game-rating,body.android .game-rating{font-size:50px;letter-spacing:15px}
body.iphone .game-rating-count,body.ipad .game-rating-count,body.android .game-rating-count{font-size:40px}
body.iphone.landscape .game-info,body.ipad.landscape .game-info,body.android.landscape .game-info{margin-top:140px;}
body.iphone.landscape .game-info .name-container,body.ipad.landscape .game-info .name-container,body.android.landscape .game-info .name-container{font-size:32pt;padding-left:10px}
body.iphone.landscape .game-rating,body.ipad.landscape .game-rating,body.android.landscape .game-rating{font-size:45px;letter-spacing:5px}
}@media screen and (min-height: 800px) and (min-width: 1280px),screen and (min-height: 1280px) and (min-width: 800px){body.iphone .btn-close-region,body.ipad .btn-close-region,body.android .btn-close-region,body.iphone .btn-watch-again-region,body.ipad .btn-watch-again-region,body.android .btn-watch-again-region{width:130px;height:130px}
body.iphone a.btn-close,body.ipad a.btn-close,body.android a.btn-close,body.iphone a.btn-watch-again,body.ipad a.btn-watch-again,body.android a.btn-watch-again{width:75px;height:75px;border-radius:45px;font-size:80px}
body.iphone a.btn-watch-again,body.ipad a.btn-watch-again,body.android a.btn-watch-again{line-height:75px}
body.iphone a.btn-close,body.ipad a.btn-close,body.android a.btn-close{line-height:60px}
body.iphone .game-info,body.ipad .game-info,body.android .game-info{margin-top:70px}
body.iphone .game-icon,body.ipad .game-icon,body.android .game-icon{width:150px;height:150px}
body.iphone .game-rating,body.ipad .game-rating,body.android .game-rating{font-size:55px}
body.iphone .game-rating-count,body.ipad .game-rating-count,body.android .game-rating-count{font-size:45px}
body.iphone .btn-download,body.ipad .btn-download,body.android .btn-download{padding:45px 25px 45px 25px;font-size:35pt;line-height:35pt;margin-top:160px;}
body.iphone .btn-download .icon-download,body.ipad .btn-download .icon-download,body.android .btn-download .icon-download{width:75px;height:75px;border-radius:45px;font-size:45px;line-height:73px;margin-top:-15px}
body.iphone.landscape .game-icon-shadow,body.ipad.landscape .game-icon-shadow,body.android.landscape .game-icon-shadow{margin-top:165px}
body.iphone.landscape .game-info,body.ipad.landscape .game-info,body.android.landscape .game-info{margin-top:120px;}
body.iphone.landscape .game-info .name-container,body.ipad.landscape .game-info .name-container,body.android.landscape .game-info .name-container{font-size:37pt;padding-top:200px}
body.iphone.landscape .btn-download,body.ipad.landscape .btn-download,body.android.landscape .btn-download{padding:40px 20px 40px 20px;font-size:30pt;line-height:30pt}
}body.iphone.uglified .game-info{margin-bottom:5px;margin-top:10px;margin-left:0;text-align:center}
body.iphone.uglified .game-icon{display:none}
body.iphone.uglified .game-background{width:85%;margin:auto;left:0;right:0;margin-left:25px;margin-right:25px;box-shadow:1px 1px 3px 1px #808080;border-radius:0 0 10px 10px}
body.iphone.uglified .end-screen-info-background{border-top:none;box-shadow:none;background-image:none;background:none}
body.iphone.uglified .btn-close{box-shadow:1px 1px 2px -1px #808080}
body.iphone.uglified .btn-watch-again{box-shadow:1px -1px 2px -1px #808080}
body.iphone.uglified .game-store-info{display:none}
body.iphone.uglified .icon-download{display:none}
body.iphone.uglified .download-text{display:none}
body.iphone.uglified .download-text-alt{display:inline;font-size:16pt;line-height:16pt}
body.iphone.uglified .btn-download{width:150px;height:30px;margin:auto;margin-bottom:10px;border-radius:4px;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#76e13c),color-stop(100%,#107c01));background:-webkit-linear-gradient(top,#76e13c,#107c01);text-shadow:none}
body.iphone.uglified .store-badge-container{display:block;background-image:url("img/appstorebadge.png");background-position:center;background-size:cover;margin:auto;position:absolute;left:0;right:0;width:175px;height:48px}
body.iphone.uglified.landscape .game-info{margin-top:20px}
body.iphone.uglified.landscape .game-icon{display:block}
body.iphone.uglified.landscape .game-background{width:54%;margin-top:25px;margin-bottom:25px;border-radius:0 10px 10px 0;box-shadow:1px 3px 5px 0 #808080;left:auto;right:auto;margin-left:0;margin-right:0}
body.iphone.uglified.landscape .end-screen-info-background{border-left:none;box-shadow:none;width:45%}
body.iphone.uglified.landscape .btn-download{width:150px;height:38px}
body.iphone.uglified.landscape .download-text-alt{line-height:30pt}
body.iphone.uglified.landscape .everyplay-gameads-logo{bottom:10px}
@media screen and (min-height: 568px) and (min-width: 320px),screen and (min-height: 320px) and (min-width: 568px){body.iphone.uglified .game-background{bottom:44%}
body.iphone.uglified .end-screen-info-background{height:43%}
body.iphone.uglified .everyplay-gameads-logo{bottom:10px}
body.iphone.uglified.landscape .game-info{margin-top:15px}
body.iphone.uglified.landscape .game-background{width:59%;bottom:0}
body.iphone.uglified.landscape .end-screen-info-background{width:40%;height:100%}
}</style>
    <script type="text/javascript">/**
 * almond 0.2.5 Copyright (c) 2011-2012, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/jrburke/almond for details
 */

// > http://underscorejs.org
// > (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
// > Underscore may be freely distributed under the MIT license.

/* Zepto v1.0-3-g342d490 - zepto event fx ajax touch - zeptojs.com/license */

//     (c) 2010-2013 Jeremy Ashkenas, DocumentCloud Inc.
//     Backbone may be freely distributed under the MIT license.
//     For all details and documentation:
//     http://backbonejs.org

// i18next, v1.7.2
// Copyright (c)2014 Jan Mühlemann (jamuhl).
// Distributed under MIT license
// http://i18next.com

/**
 * RequireJS i18next Plugin
 * 
 * @version 0.4.0
 * @copyright 2013-2014 Jacob van Mourik
 * @license MIT
 */

/*! iScroll v5.1.1 ~ (c) 2008-2014 Matteo Spinelli ~ http://cubiq.org/license */

/**
 * @license RequireJS text 2.0.7 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/requirejs/text for details
 */

(function() {
  var t, e, n;
  (function(i) {
    function r(t, e) {
      return w.call(t, e);
    }
    function s(t, e) {
      var n, i, r, s, a, o, l, u, c, h, p = e && e.split("/"), f = b.map, d = f && f["*"] || {};
      if (t && "." === t.charAt(0)) if (e) {
        for (p = p.slice(0, p.length - 1), t = p.concat(t.split("/")), u = 0; u < t.length; u += 1) if (h = t[u], 
        "." === h) t.splice(u, 1), u -= 1; else if (".." === h) {
          if (1 === u && (".." === t[2] || ".." === t[0])) break;
          u > 0 && (t.splice(u - 1, 2), u -= 2);
        }
        t = t.join("/");
      } else 0 === t.indexOf("./") && (t = t.substring(2));
      if ((p || d) && f) {
        for (n = t.split("/"), u = n.length; u > 0; u -= 1) {
          if (i = n.slice(0, u).join("/"), p) for (c = p.length; c > 0; c -= 1) if (r = f[p.slice(0, c).join("/")], 
          r && (r = r[i])) {
            s = r, a = u;
            break;
          }
          if (s) break;
          !o && d && d[i] && (o = d[i], l = u);
        }
        !s && o && (s = o, a = l), s && (n.splice(0, a, s), t = n.join("/"));
      }
      return t;
    }
    function a(t, e) {
      return function() {
        return f.apply(i, x.call(arguments, 0).concat([ t, e ]));
      };
    }
    function o(t) {
      return function(e) {
        return s(e, t);
      };
    }
    function l(t) {
      return function(e) {
        g[t] = e;
      };
    }
    function u(t) {
      if (r(v, t)) {
        var e = v[t];
        delete v[t], y[t] = !0, p.apply(i, e);
      }
      if (!r(g, t) && !r(y, t)) throw new Error("No " + t);
      return g[t];
    }
    function c(t) {
      var e, n = t ? t.indexOf("!") : -1;
      return n > -1 && (e = t.substring(0, n), t = t.substring(n + 1, t.length)), [ e, t ];
    }
    function h(t) {
      return function() {
        return b && b.config && b.config[t] || {};
      };
    }
    var p, f, d, m, g = {}, v = {}, b = {}, y = {}, w = Object.prototype.hasOwnProperty, x = [].slice;
    d = function(t, e) {
      var n, i = c(t), r = i[0];
      return t = i[1], r && (r = s(r, e), n = u(r)), r ? t = n && n.normalize ? n.normalize(t, o(e)) : s(t, e) : (t = s(t, e), 
      i = c(t), r = i[0], t = i[1], r && (n = u(r))), {
        f: r ? r + "!" + t : t,
        n: t,
        pr: r,
        p: n
      };
    }, m = {
      require: function(t) {
        return a(t);
      },
      exports: function(t) {
        var e = g[t];
        return "undefined" != typeof e ? e : g[t] = {};
      },
      module: function(t) {
        return {
          id: t,
          uri: "",
          exports: g[t],
          config: h(t)
        };
      }
    }, p = function(t, e, n, s) {
      var o, c, h, p, f, b, w = [];
      if (s = s || t, "function" == typeof n) {
        for (e = !e.length && n.length ? [ "require", "exports", "module" ] : e, f = 0; f < e.length; f += 1) if (p = d(e[f], s), 
        c = p.f, "require" === c) w[f] = m.require(t); else if ("exports" === c) w[f] = m.exports(t), 
        b = !0; else if ("module" === c) o = w[f] = m.module(t); else if (r(g, c) || r(v, c) || r(y, c)) w[f] = u(c); else {
          if (!p.p) throw new Error(t + " missing " + c);
          p.p.load(p.n, a(s, !0), l(c), {}), w[f] = g[c];
        }
        h = n.apply(g[t], w), t && (o && o.exports !== i && o.exports !== g[t] ? g[t] = o.exports : h === i && b || (g[t] = h));
      } else t && (g[t] = n);
    }, t = e = f = function(t, e, n, r, s) {
      return "string" == typeof t ? m[t] ? m[t](e) : u(d(t, e).f) : (t.splice || (b = t, 
      e.splice ? (t = e, e = n, n = null) : t = i), e = e || function() {}, "function" == typeof n && (n = r, 
      r = s), r ? p(i, t, e, n) : setTimeout(function() {
        p(i, t, e, n);
      }, 4), f);
    }, f.config = function(t) {
      return b = t, b.deps && f(b.deps, b.callback), f;
    }, n = function(t, e, n) {
      e.splice || (n = e, e = []), r(g, t) || r(v, t) || (v[t] = [ t, e, n ]);
    }, n.amd = {
      jQuery: !0
    };
  })(), n("vendor/almond", function() {}), function() {
    var t = this, e = t._, n = {}, i = Array.prototype, r = Object.prototype, s = Function.prototype, a = i.push, o = i.slice, l = i.concat, u = r.toString, c = r.hasOwnProperty, h = i.forEach, p = i.map, f = i.reduce, d = i.reduceRight, m = i.filter, g = i.every, v = i.some, b = i.indexOf, y = i.lastIndexOf, w = Array.isArray, x = Object.keys, S = s.bind, k = function(t) {
      return t instanceof k ? t : this instanceof k ? (this._wrapped = t, void 0) : new k(t);
    };
    "undefined" != typeof exports ? ("undefined" != typeof module && module.exports && (exports = module.exports = k), 
    exports._ = k) : t._ = k, k.VERSION = "1.4.4";
    var T = k.each = k.forEach = function(t, e, i) {
      if (null != t) if (h && t.forEach === h) t.forEach(e, i); else if (t.length === +t.length) {
        for (var r = 0, s = t.length; s > r; r++) if (e.call(i, t[r], r, t) === n) return;
      } else for (var a in t) if (k.has(t, a) && e.call(i, t[a], a, t) === n) return;
    };
    k.map = k.collect = function(t, e, n) {
      var i = [];
      return null == t ? i : p && t.map === p ? t.map(e, n) : (T(t, function(t, r, s) {
        i[i.length] = e.call(n, t, r, s);
      }), i);
    };
    var _ = "Reduce of empty array with no initial value";
    k.reduce = k.foldl = k.inject = function(t, e, n, i) {
      var r = arguments.length > 2;
      if (null == t && (t = []), f && t.reduce === f) return i && (e = k.bind(e, i)), 
      r ? t.reduce(e, n) : t.reduce(e);
      if (T(t, function(t, s, a) {
        r ? n = e.call(i, n, t, s, a) : (n = t, r = !0);
      }), !r) throw new TypeError(_);
      return n;
    }, k.reduceRight = k.foldr = function(t, e, n, i) {
      var r = arguments.length > 2;
      if (null == t && (t = []), d && t.reduceRight === d) return i && (e = k.bind(e, i)), 
      r ? t.reduceRight(e, n) : t.reduceRight(e);
      var s = t.length;
      if (s !== +s) {
        var a = k.keys(t);
        s = a.length;
      }
      if (T(t, function(o, l, u) {
        l = a ? a[--s] : --s, r ? n = e.call(i, n, t[l], l, u) : (n = t[l], r = !0);
      }), !r) throw new TypeError(_);
      return n;
    }, k.find = k.detect = function(t, e, n) {
      var i;
      return E(t, function(t, r, s) {
        return e.call(n, t, r, s) ? (i = t, !0) : void 0;
      }), i;
    }, k.filter = k.select = function(t, e, n) {
      var i = [];
      return null == t ? i : m && t.filter === m ? t.filter(e, n) : (T(t, function(t, r, s) {
        e.call(n, t, r, s) && (i[i.length] = t);
      }), i);
    }, k.reject = function(t, e, n) {
      return k.filter(t, function(t, i, r) {
        return !e.call(n, t, i, r);
      }, n);
    }, k.every = k.all = function(t, e, i) {
      e || (e = k.identity);
      var r = !0;
      return null == t ? r : g && t.every === g ? t.every(e, i) : (T(t, function(t, s, a) {
        return (r = r && e.call(i, t, s, a)) ? void 0 : n;
      }), !!r);
    };
    var E = k.some = k.any = function(t, e, i) {
      e || (e = k.identity);
      var r = !1;
      return null == t ? r : v && t.some === v ? t.some(e, i) : (T(t, function(t, s, a) {
        return r || (r = e.call(i, t, s, a)) ? n : void 0;
      }), !!r);
    };
    k.contains = k.include = function(t, e) {
      return null == t ? !1 : b && t.indexOf === b ? -1 != t.indexOf(e) : E(t, function(t) {
        return t === e;
      });
    }, k.invoke = function(t, e) {
      var n = o.call(arguments, 2), i = k.isFunction(e);
      return k.map(t, function(t) {
        return (i ? e : t[e]).apply(t, n);
      });
    }, k.pluck = function(t, e) {
      return k.map(t, function(t) {
        return t[e];
      });
    }, k.where = function(t, e, n) {
      return k.isEmpty(e) ? n ? null : [] : k[n ? "find" : "filter"](t, function(t) {
        for (var n in e) if (e[n] !== t[n]) return !1;
        return !0;
      });
    }, k.findWhere = function(t, e) {
      return k.where(t, e, !0);
    }, k.max = function(t, e, n) {
      if (!e && k.isArray(t) && t[0] === +t[0] && t.length < 65535) return Math.max.apply(Math, t);
      if (!e && k.isEmpty(t)) return -1/0;
      var i = {
        computed: -1/0,
        value: -1/0
      };
      return T(t, function(t, r, s) {
        var a = e ? e.call(n, t, r, s) : t;
        a >= i.computed && (i = {
          value: t,
          computed: a
        });
      }), i.value;
    }, k.min = function(t, e, n) {
      if (!e && k.isArray(t) && t[0] === +t[0] && t.length < 65535) return Math.min.apply(Math, t);
      if (!e && k.isEmpty(t)) return 1/0;
      var i = {
        computed: 1/0,
        value: 1/0
      };
      return T(t, function(t, r, s) {
        var a = e ? e.call(n, t, r, s) : t;
        a < i.computed && (i = {
          value: t,
          computed: a
        });
      }), i.value;
    }, k.shuffle = function(t) {
      var e, n = 0, i = [];
      return T(t, function(t) {
        e = k.random(n++), i[n - 1] = i[e], i[e] = t;
      }), i;
    };
    var N = function(t) {
      return k.isFunction(t) ? t : function(e) {
        return e[t];
      };
    };
    k.sortBy = function(t, e, n) {
      var i = N(e);
      return k.pluck(k.map(t, function(t, e, r) {
        return {
          value: t,
          index: e,
          criteria: i.call(n, t, e, r)
        };
      }).sort(function(t, e) {
        var n = t.criteria, i = e.criteria;
        if (n !== i) {
          if (n > i || void 0 === n) return 1;
          if (i > n || void 0 === i) return -1;
        }
        return t.index < e.index ? -1 : 1;
      }), "value");
    };
    var P = function(t, e, n, i) {
      var r = {}, s = N(e || k.identity);
      return T(t, function(e, a) {
        var o = s.call(n, e, a, t);
        i(r, o, e);
      }), r;
    };
    k.groupBy = function(t, e, n) {
      return P(t, e, n, function(t, e, n) {
        (k.has(t, e) ? t[e] : t[e] = []).push(n);
      });
    }, k.countBy = function(t, e, n) {
      return P(t, e, n, function(t, e) {
        k.has(t, e) || (t[e] = 0), t[e]++;
      });
    }, k.sortedIndex = function(t, e, n, i) {
      n = null == n ? k.identity : N(n);
      for (var r = n.call(i, e), s = 0, a = t.length; a > s; ) {
        var o = s + a >>> 1;
        n.call(i, t[o]) < r ? s = o + 1 : a = o;
      }
      return s;
    }, k.toArray = function(t) {
      return t ? k.isArray(t) ? o.call(t) : t.length === +t.length ? k.map(t, k.identity) : k.values(t) : [];
    }, k.size = function(t) {
      return null == t ? 0 : t.length === +t.length ? t.length : k.keys(t).length;
    }, k.first = k.head = k.take = function(t, e, n) {
      return null == t ? void 0 : null == e || n ? t[0] : o.call(t, 0, e);
    }, k.initial = function(t, e, n) {
      return o.call(t, 0, t.length - (null == e || n ? 1 : e));
    }, k.last = function(t, e, n) {
      return null == t ? void 0 : null == e || n ? t[t.length - 1] : o.call(t, Math.max(t.length - e, 0));
    }, k.rest = k.tail = k.drop = function(t, e, n) {
      return o.call(t, null == e || n ? 1 : e);
    }, k.compact = function(t) {
      return k.filter(t, k.identity);
    };
    var C = function(t, e, n) {
      return T(t, function(t) {
        k.isArray(t) ? e ? a.apply(n, t) : C(t, e, n) : n.push(t);
      }), n;
    };
    k.flatten = function(t, e) {
      return C(t, e, []);
    }, k.without = function(t) {
      return k.difference(t, o.call(arguments, 1));
    }, k.uniq = k.unique = function(t, e, n, i) {
      k.isFunction(e) && (i = n, n = e, e = !1);
      var r = n ? k.map(t, n, i) : t, s = [], a = [];
      return T(r, function(n, i) {
        (e ? i && a[a.length - 1] === n : k.contains(a, n)) || (a.push(n), s.push(t[i]));
      }), s;
    }, k.union = function() {
      return k.uniq(l.apply(i, arguments));
    }, k.intersection = function(t) {
      var e = o.call(arguments, 1);
      return k.filter(k.uniq(t), function(t) {
        return k.every(e, function(e) {
          return k.indexOf(e, t) >= 0;
        });
      });
    }, k.difference = function(t) {
      var e = l.apply(i, o.call(arguments, 1));
      return k.filter(t, function(t) {
        return !k.contains(e, t);
      });
    }, k.zip = function() {
      for (var t = o.call(arguments), e = k.max(k.pluck(t, "length")), n = new Array(e), i = 0; e > i; i++) n[i] = k.pluck(t, "" + i);
      return n;
    }, k.object = function(t, e) {
      if (null == t) return {};
      for (var n = {}, i = 0, r = t.length; r > i; i++) e ? n[t[i]] = e[i] : n[t[i][0]] = t[i][1];
      return n;
    }, k.indexOf = function(t, e, n) {
      if (null == t) return -1;
      var i = 0, r = t.length;
      if (n) {
        if ("number" != typeof n) return i = k.sortedIndex(t, e), t[i] === e ? i : -1;
        i = 0 > n ? Math.max(0, r + n) : n;
      }
      if (b && t.indexOf === b) return t.indexOf(e, n);
      for (;r > i; i++) if (t[i] === e) return i;
      return -1;
    }, k.lastIndexOf = function(t, e, n) {
      if (null == t) return -1;
      var i = null != n;
      if (y && t.lastIndexOf === y) return i ? t.lastIndexOf(e, n) : t.lastIndexOf(e);
      for (var r = i ? n : t.length; r--; ) if (t[r] === e) return r;
      return -1;
    }, k.range = function(t, e, n) {
      arguments.length <= 1 && (e = t || 0, t = 0), n = arguments[2] || 1;
      for (var i = Math.max(Math.ceil((e - t) / n), 0), r = 0, s = new Array(i); i > r; ) s[r++] = t, 
      t += n;
      return s;
    }, k.bind = function(t, e) {
      if (t.bind === S && S) return S.apply(t, o.call(arguments, 1));
      var n = o.call(arguments, 2);
      return function() {
        return t.apply(e, n.concat(o.call(arguments)));
      };
    }, k.partial = function(t) {
      var e = o.call(arguments, 1);
      return function() {
        return t.apply(this, e.concat(o.call(arguments)));
      };
    }, k.bindAll = function(t) {
      var e = o.call(arguments, 1);
      return 0 === e.length && (e = k.functions(t)), T(e, function(e) {
        t[e] = k.bind(t[e], t);
      }), t;
    }, k.memoize = function(t, e) {
      var n = {};
      return e || (e = k.identity), function() {
        var i = e.apply(this, arguments);
        return k.has(n, i) ? n[i] : n[i] = t.apply(this, arguments);
      };
    }, k.delay = function(t, e) {
      var n = o.call(arguments, 2);
      return setTimeout(function() {
        return t.apply(null, n);
      }, e);
    }, k.defer = function(t) {
      return k.delay.apply(k, [ t, 1 ].concat(o.call(arguments, 1)));
    }, k.throttle = function(t, e) {
      var n, i, r, s, a = 0, o = function() {
        a = new Date(), r = null, s = t.apply(n, i);
      };
      return function() {
        var l = new Date(), u = e - (l - a);
        return n = this, i = arguments, 0 >= u ? (clearTimeout(r), r = null, a = l, s = t.apply(n, i)) : r || (r = setTimeout(o, u)), 
        s;
      };
    }, k.debounce = function(t, e, n) {
      var i, r;
      return function() {
        var s = this, a = arguments, o = function() {
          i = null, n || (r = t.apply(s, a));
        }, l = n && !i;
        return clearTimeout(i), i = setTimeout(o, e), l && (r = t.apply(s, a)), r;
      };
    }, k.once = function(t) {
      var e, n = !1;
      return function() {
        return n ? e : (n = !0, e = t.apply(this, arguments), t = null, e);
      };
    }, k.wrap = function(t, e) {
      return function() {
        var n = [ t ];
        return a.apply(n, arguments), e.apply(this, n);
      };
    }, k.compose = function() {
      var t = arguments;
      return function() {
        for (var e = arguments, n = t.length - 1; n >= 0; n--) e = [ t[n].apply(this, e) ];
        return e[0];
      };
    }, k.after = function(t, e) {
      return 0 >= t ? e() : function() {
        return --t < 1 ? e.apply(this, arguments) : void 0;
      };
    }, k.keys = x || function(t) {
      if (t !== Object(t)) throw new TypeError("Invalid object");
      var e = [];
      for (var n in t) k.has(t, n) && (e[e.length] = n);
      return e;
    }, k.values = function(t) {
      var e = [];
      for (var n in t) k.has(t, n) && e.push(t[n]);
      return e;
    }, k.pairs = function(t) {
      var e = [];
      for (var n in t) k.has(t, n) && e.push([ n, t[n] ]);
      return e;
    }, k.invert = function(t) {
      var e = {};
      for (var n in t) k.has(t, n) && (e[t[n]] = n);
      return e;
    }, k.functions = k.methods = function(t) {
      var e = [];
      for (var n in t) k.isFunction(t[n]) && e.push(n);
      return e.sort();
    }, k.extend = function(t) {
      return T(o.call(arguments, 1), function(e) {
        if (e) for (var n in e) t[n] = e[n];
      }), t;
    }, k.pick = function(t) {
      var e = {}, n = l.apply(i, o.call(arguments, 1));
      return T(n, function(n) {
        n in t && (e[n] = t[n]);
      }), e;
    }, k.omit = function(t) {
      var e = {}, n = l.apply(i, o.call(arguments, 1));
      for (var r in t) k.contains(n, r) || (e[r] = t[r]);
      return e;
    }, k.defaults = function(t) {
      return T(o.call(arguments, 1), function(e) {
        if (e) for (var n in e) null == t[n] && (t[n] = e[n]);
      }), t;
    }, k.clone = function(t) {
      return k.isObject(t) ? k.isArray(t) ? t.slice() : k.extend({}, t) : t;
    }, k.tap = function(t, e) {
      return e(t), t;
    };
    var A = function(t, e, n, i) {
      if (t === e) return 0 !== t || 1 / t == 1 / e;
      if (null == t || null == e) return t === e;
      t instanceof k && (t = t._wrapped), e instanceof k && (e = e._wrapped);
      var r = u.call(t);
      if (r != u.call(e)) return !1;
      switch (r) {
       case "[object String]":
        return t == String(e);

       case "[object Number]":
        return t != +t ? e != +e : 0 == t ? 1 / t == 1 / e : t == +e;

       case "[object Date]":
       case "[object Boolean]":
        return +t == +e;

       case "[object RegExp]":
        return t.source == e.source && t.global == e.global && t.multiline == e.multiline && t.ignoreCase == e.ignoreCase;
      }
      if ("object" != typeof t || "object" != typeof e) return !1;
      for (var s = n.length; s--; ) if (n[s] == t) return i[s] == e;
      n.push(t), i.push(e);
      var a = 0, o = !0;
      if ("[object Array]" == r) {
        if (a = t.length, o = a == e.length) for (;a-- && (o = A(t[a], e[a], n, i)); ) ;
      } else {
        var l = t.constructor, c = e.constructor;
        if (l !== c && !(k.isFunction(l) && l instanceof l && k.isFunction(c) && c instanceof c)) return !1;
        for (var h in t) if (k.has(t, h) && (a++, !(o = k.has(e, h) && A(t[h], e[h], n, i)))) break;
        if (o) {
          for (h in e) if (k.has(e, h) && !a--) break;
          o = !a;
        }
      }
      return n.pop(), i.pop(), o;
    };
    k.isEqual = function(t, e) {
      return A(t, e, [], []);
    }, k.isEmpty = function(t) {
      if (null == t) return !0;
      if (k.isArray(t) || k.isString(t)) return 0 === t.length;
      for (var e in t) if (k.has(t, e)) return !1;
      return !0;
    }, k.isElement = function(t) {
      return !(!t || 1 !== t.nodeType);
    }, k.isArray = w || function(t) {
      return "[object Array]" == u.call(t);
    }, k.isObject = function(t) {
      return t === Object(t);
    }, T([ "Arguments", "Function", "String", "Number", "Date", "RegExp" ], function(t) {
      k["is" + t] = function(e) {
        return u.call(e) == "[object " + t + "]";
      };
    }), k.isArguments(arguments) || (k.isArguments = function(t) {
      return !(!t || !k.has(t, "callee"));
    }), "function" != typeof /./ && (k.isFunction = function(t) {
      return "function" == typeof t;
    }), k.isFinite = function(t) {
      return isFinite(t) && !isNaN(parseFloat(t));
    }, k.isNaN = function(t) {
      return k.isNumber(t) && t != +t;
    }, k.isBoolean = function(t) {
      return t === !0 || t === !1 || "[object Boolean]" == u.call(t);
    }, k.isNull = function(t) {
      return null === t;
    }, k.isUndefined = function(t) {
      return void 0 === t;
    }, k.has = function(t, e) {
      return c.call(t, e);
    }, k.noConflict = function() {
      return t._ = e, this;
    }, k.identity = function(t) {
      return t;
    }, k.times = function(t, e, n) {
      for (var i = Array(t), r = 0; t > r; r++) i[r] = e.call(n, r);
      return i;
    }, k.random = function(t, e) {
      return null == e && (e = t, t = 0), t + Math.floor(Math.random() * (e - t + 1));
    };
    var O = {
      escape: {
        "&": "&amp;",
        "<": "&lt;",
        ">": "&gt;",
        '"': "&quot;",
        "'": "&#x27;",
        "/": "&#x2F;"
      }
    };
    O.unescape = k.invert(O.escape);
    var j = {
      escape: new RegExp("[" + k.keys(O.escape).join("") + "]", "g"),
      unescape: new RegExp("(" + k.keys(O.unescape).join("|") + ")", "g")
    };
    k.each([ "escape", "unescape" ], function(t) {
      k[t] = function(e) {
        return null == e ? "" : ("" + e).replace(j[t], function(e) {
          return O[t][e];
        });
      };
    }), k.result = function(t, e) {
      if (null == t) return null;
      var n = t[e];
      return k.isFunction(n) ? n.call(t) : n;
    }, k.mixin = function(t) {
      T(k.functions(t), function(e) {
        var n = k[e] = t[e];
        k.prototype[e] = function() {
          var t = [ this._wrapped ];
          return a.apply(t, arguments), X.call(this, n.apply(k, t));
        };
      });
    };
    var I = 0;
    k.uniqueId = function(t) {
      var e = ++I + "";
      return t ? t + e : e;
    }, k.templateSettings = {
      evaluate: /<%([\s\S]+?)%>/g,
      interpolate: /<%=([\s\S]+?)%>/g,
      escape: /<%-([\s\S]+?)%>/g
    };
    var z = /(.)^/, D = {
      "'": "'",
      "\\": "\\",
      "\r": "r",
      "\n": "n",
      "	": "t",
      "\u2028": "u2028",
      "\u2029": "u2029"
    }, R = /\\|'|\r|\n|\t|\u2028|\u2029/g;
    k.template = function(t, e, n) {
      var i;
      n = k.defaults({}, n, k.templateSettings);
      var r = new RegExp([ (n.escape || z).source, (n.interpolate || z).source, (n.evaluate || z).source ].join("|") + "|$", "g"), s = 0, a = "__p+='";
      t.replace(r, function(e, n, i, r, o) {
        return a += t.slice(s, o).replace(R, function(t) {
          return "\\" + D[t];
        }), n && (a += "'+\n((__t=(" + n + "))==null?'':_.escape(__t))+\n'"), i && (a += "'+\n((__t=(" + i + "))==null?'':__t)+\n'"), 
        r && (a += "';\n" + r + "\n__p+='"), s = o + e.length, e;
      }), a += "';\n", n.variable || (a = "with(obj||{}){\n" + a + "}\n"), a = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n" + a + "return __p;\n";
      try {
        i = new Function(n.variable || "obj", "_", a);
      } catch (o) {
        throw o.source = a, o;
      }
      if (e) return i(e, k);
      var l = function(t) {
        return i.call(this, t, k);
      };
      return l.source = "function(" + (n.variable || "obj") + "){\n" + a + "}", l;
    }, k.chain = function(t) {
      return k(t).chain();
    };
    var X = function(t) {
      return this._chain ? k(t).chain() : t;
    };
    k.mixin(k), T([ "pop", "push", "reverse", "shift", "sort", "splice", "unshift" ], function(t) {
      var e = i[t];
      k.prototype[t] = function() {
        var n = this._wrapped;
        return e.apply(n, arguments), "shift" != t && "splice" != t || 0 !== n.length || delete n[0], 
        X.call(this, n);
      };
    }), T([ "concat", "join", "slice" ], function(t) {
      var e = i[t];
      k.prototype[t] = function() {
        return X.call(this, e.apply(this._wrapped, arguments));
      };
    }), k.extend(k.prototype, {
      chain: function() {
        return this._chain = !0, this;
      },
      value: function() {
        return this._wrapped;
      }
    });
  }.call(this), n("underscore", function(t) {
    return function() {
      var e;
      return e || t._;
    };
  }(this));
  var i = function() {
    function t(t) {
      return null == t ? String(t) : q[J.call(t)] || "object";
    }
    function e(e) {
      return "function" == t(e);
    }
    function n(t) {
      return null != t && t == t.window;
    }
    function i(t) {
      return null != t && t.nodeType == t.DOCUMENT_NODE;
    }
    function r(e) {
      return "object" == t(e);
    }
    function s(t) {
      return r(t) && !n(t) && t.__proto__ == Object.prototype;
    }
    function a(t) {
      return t instanceof Array;
    }
    function o(t) {
      return "number" == typeof t.length;
    }
    function l(t) {
      return A.call(t, function(t) {
        return null != t;
      });
    }
    function u(t) {
      return t.length > 0 ? T.fn.concat.apply([], t) : t;
    }
    function c(t) {
      return t.replace(/::/g, "/").replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2").replace(/([a-z\d])([A-Z])/g, "$1_$2").replace(/_/g, "-").toLowerCase();
    }
    function h(t) {
      return t in I ? I[t] : I[t] = new RegExp("(^|\\s)" + t + "(\\s|$)");
    }
    function p(t, e) {
      return "number" != typeof e || D[c(t)] ? e : e + "px";
    }
    function f(t) {
      var e, n;
      return j[t] || (e = O.createElement(t), O.body.appendChild(e), n = z(e, "").getPropertyValue("display"), 
      e.parentNode.removeChild(e), "none" == n && (n = "block"), j[t] = n), j[t];
    }
    function d(t) {
      return "children" in t ? C.call(t.children) : T.map(t.childNodes, function(t) {
        return 1 == t.nodeType ? t : void 0;
      });
    }
    function m(t, e, n) {
      for (k in e) n && (s(e[k]) || a(e[k])) ? (s(e[k]) && !s(t[k]) && (t[k] = {}), a(e[k]) && !a(t[k]) && (t[k] = []), 
      m(t[k], e[k], n)) : e[k] !== S && (t[k] = e[k]);
    }
    function g(t, e) {
      return e === S ? T(t) : T(t).filter(e);
    }
    function v(t, n, i, r) {
      return e(n) ? n.call(t, i, r) : n;
    }
    function b(t, e, n) {
      null == n ? t.removeAttribute(e) : t.setAttribute(e, n);
    }
    function y(t, e) {
      var n = t.className, i = n && n.baseVal !== S;
      return e === S ? i ? n.baseVal : n : (i ? n.baseVal = e : t.className = e, void 0);
    }
    function w(t) {
      var e;
      try {
        return t ? "true" == t || ("false" == t ? !1 : "null" == t ? null : isNaN(e = Number(t)) ? /^[\[\{]/.test(t) ? T.parseJSON(t) : t : e) : t;
      } catch (n) {
        return t;
      }
    }
    function x(t, e) {
      e(t);
      for (var n in t.childNodes) x(t.childNodes[n], e);
    }
    var S, k, T, _, E, N, P = [], C = P.slice, A = P.filter, O = window.document, j = {}, I = {}, z = O.defaultView.getComputedStyle, D = {
      "column-count": 1,
      columns: 1,
      "font-weight": 1,
      "line-height": 1,
      opacity: 1,
      "z-index": 1,
      zoom: 1
    }, R = /^\s*<(\w+|!)[^>]*>/, X = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, M = /^(?:body|html)$/i, L = [ "val", "css", "html", "text", "data", "width", "height", "offset" ], H = [ "after", "prepend", "before", "append" ], Y = O.createElement("table"), B = O.createElement("tr"), F = {
      tr: O.createElement("tbody"),
      tbody: Y,
      thead: Y,
      tfoot: Y,
      td: B,
      th: B,
      "*": O.createElement("div")
    }, $ = /complete|loaded|interactive/, V = /^\.([\w-]+)$/, W = /^#([\w-]*)$/, U = /^[\w-]+$/, q = {}, J = q.toString, G = {}, K = O.createElement("div");
    return G.matches = function(t, e) {
      if (!t || 1 !== t.nodeType) return !1;
      var n = t.webkitMatchesSelector || t.mozMatchesSelector || t.oMatchesSelector || t.matchesSelector;
      if (n) return n.call(t, e);
      var i, r = t.parentNode, s = !r;
      return s && (r = K).appendChild(t), i = ~G.qsa(r, e).indexOf(t), s && K.removeChild(t), 
      i;
    }, E = function(t) {
      return t.replace(/-+(.)?/g, function(t, e) {
        return e ? e.toUpperCase() : "";
      });
    }, N = function(t) {
      return A.call(t, function(e, n) {
        return t.indexOf(e) == n;
      });
    }, G.fragment = function(t, e, n) {
      t.replace && (t = t.replace(X, "<$1></$2>")), e === S && (e = R.test(t) && RegExp.$1), 
      e in F || (e = "*");
      var i, r, a = F[e];
      return a.innerHTML = "" + t, r = T.each(C.call(a.childNodes), function() {
        a.removeChild(this);
      }), s(n) && (i = T(r), T.each(n, function(t, e) {
        L.indexOf(t) > -1 ? i[t](e) : i.attr(t, e);
      })), r;
    }, G.Z = function(t, e) {
      return t = t || [], t.__proto__ = T.fn, t.selector = e || "", t;
    }, G.isZ = function(t) {
      return t instanceof G.Z;
    }, G.init = function(t, n) {
      if (t) {
        if (e(t)) return T(O).ready(t);
        if (G.isZ(t)) return t;
        var i;
        if (a(t)) i = l(t); else if (r(t)) i = [ s(t) ? T.extend({}, t) : t ], t = null; else if (R.test(t)) i = G.fragment(t.trim(), RegExp.$1, n), 
        t = null; else {
          if (n !== S) return T(n).find(t);
          i = G.qsa(O, t);
        }
        return G.Z(i, t);
      }
      return G.Z();
    }, T = function(t, e) {
      return G.init(t, e);
    }, T.extend = function(t) {
      var e, n = C.call(arguments, 1);
      return "boolean" == typeof t && (e = t, t = n.shift()), n.forEach(function(n) {
        m(t, n, e);
      }), t;
    }, G.qsa = function(t, e) {
      var n;
      return i(t) && W.test(e) ? (n = t.getElementById(RegExp.$1)) ? [ n ] : [] : 1 !== t.nodeType && 9 !== t.nodeType ? [] : C.call(V.test(e) ? t.getElementsByClassName(RegExp.$1) : U.test(e) ? t.getElementsByTagName(e) : t.querySelectorAll(e));
    }, T.contains = function(t, e) {
      return t !== e && t.contains(e);
    }, T.type = t, T.isFunction = e, T.isWindow = n, T.isArray = a, T.isPlainObject = s, 
    T.isEmptyObject = function(t) {
      var e;
      for (e in t) return !1;
      return !0;
    }, T.inArray = function(t, e, n) {
      return P.indexOf.call(e, t, n);
    }, T.camelCase = E, T.trim = function(t) {
      return t.trim();
    }, T.uuid = 0, T.support = {}, T.expr = {}, T.map = function(t, e) {
      var n, i, r, s = [];
      if (o(t)) for (i = 0; i < t.length; i++) n = e(t[i], i), null != n && s.push(n); else for (r in t) n = e(t[r], r), 
      null != n && s.push(n);
      return u(s);
    }, T.each = function(t, e) {
      var n, i;
      if (o(t)) {
        for (n = 0; n < t.length; n++) if (e.call(t[n], n, t[n]) === !1) return t;
      } else for (i in t) if (e.call(t[i], i, t[i]) === !1) return t;
      return t;
    }, T.grep = function(t, e) {
      return A.call(t, e);
    }, window.JSON && (T.parseJSON = JSON.parse), T.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(t, e) {
      q["[object " + e + "]"] = e.toLowerCase();
    }), T.fn = {
      forEach: P.forEach,
      reduce: P.reduce,
      push: P.push,
      sort: P.sort,
      indexOf: P.indexOf,
      concat: P.concat,
      map: function(t) {
        return T(T.map(this, function(e, n) {
          return t.call(e, n, e);
        }));
      },
      slice: function() {
        return T(C.apply(this, arguments));
      },
      ready: function(t) {
        return $.test(O.readyState) ? t(T) : O.addEventListener("DOMContentLoaded", function() {
          t(T);
        }, !1), this;
      },
      get: function(t) {
        return t === S ? C.call(this) : this[t >= 0 ? t : t + this.length];
      },
      toArray: function() {
        return this.get();
      },
      size: function() {
        return this.length;
      },
      remove: function() {
        return this.each(function() {
          null != this.parentNode && this.parentNode.removeChild(this);
        });
      },
      each: function(t) {
        return P.every.call(this, function(e, n) {
          return t.call(e, n, e) !== !1;
        }), this;
      },
      filter: function(t) {
        return e(t) ? this.not(this.not(t)) : T(A.call(this, function(e) {
          return G.matches(e, t);
        }));
      },
      add: function(t, e) {
        return T(N(this.concat(T(t, e))));
      },
      is: function(t) {
        return this.length > 0 && G.matches(this[0], t);
      },
      not: function(t) {
        var n = [];
        if (e(t) && t.call !== S) this.each(function(e) {
          t.call(this, e) || n.push(this);
        }); else {
          var i = "string" == typeof t ? this.filter(t) : o(t) && e(t.item) ? C.call(t) : T(t);
          this.forEach(function(t) {
            i.indexOf(t) < 0 && n.push(t);
          });
        }
        return T(n);
      },
      has: function(t) {
        return this.filter(function() {
          return r(t) ? T.contains(this, t) : T(this).find(t).size();
        });
      },
      eq: function(t) {
        return -1 === t ? this.slice(t) : this.slice(t, +t + 1);
      },
      first: function() {
        var t = this[0];
        return t && !r(t) ? t : T(t);
      },
      last: function() {
        var t = this[this.length - 1];
        return t && !r(t) ? t : T(t);
      },
      find: function(t) {
        var e, n = this;
        return e = "object" == typeof t ? T(t).filter(function() {
          var t = this;
          return P.some.call(n, function(e) {
            return T.contains(e, t);
          });
        }) : 1 == this.length ? T(G.qsa(this[0], t)) : this.map(function() {
          return G.qsa(this, t);
        });
      },
      closest: function(t, e) {
        var n = this[0], r = !1;
        for ("object" == typeof t && (r = T(t)); n && !(r ? r.indexOf(n) >= 0 : G.matches(n, t)); ) n = n !== e && !i(n) && n.parentNode;
        return T(n);
      },
      parents: function(t) {
        for (var e = [], n = this; n.length > 0; ) n = T.map(n, function(t) {
          return (t = t.parentNode) && !i(t) && e.indexOf(t) < 0 ? (e.push(t), t) : void 0;
        });
        return g(e, t);
      },
      parent: function(t) {
        return g(N(this.pluck("parentNode")), t);
      },
      children: function(t) {
        return g(this.map(function() {
          return d(this);
        }), t);
      },
      contents: function() {
        return this.map(function() {
          return C.call(this.childNodes);
        });
      },
      siblings: function(t) {
        return g(this.map(function(t, e) {
          return A.call(d(e.parentNode), function(t) {
            return t !== e;
          });
        }), t);
      },
      empty: function() {
        return this.each(function() {
          this.innerHTML = "";
        });
      },
      pluck: function(t) {
        return T.map(this, function(e) {
          return e[t];
        });
      },
      show: function() {
        return this.each(function() {
          "none" == this.style.display && (this.style.display = null), "none" == z(this, "").getPropertyValue("display") && (this.style.display = f(this.nodeName));
        });
      },
      replaceWith: function(t) {
        return this.before(t).remove();
      },
      wrap: function(t) {
        var n = e(t);
        if (this[0] && !n) var i = T(t).get(0), r = i.parentNode || this.length > 1;
        return this.each(function(e) {
          T(this).wrapAll(n ? t.call(this, e) : r ? i.cloneNode(!0) : i);
        });
      },
      wrapAll: function(t) {
        if (this[0]) {
          T(this[0]).before(t = T(t));
          for (var e; (e = t.children()).length; ) t = e.first();
          T(t).append(this);
        }
        return this;
      },
      wrapInner: function(t) {
        var n = e(t);
        return this.each(function(e) {
          var i = T(this), r = i.contents(), s = n ? t.call(this, e) : t;
          r.length ? r.wrapAll(s) : i.append(s);
        });
      },
      unwrap: function() {
        return this.parent().each(function() {
          T(this).replaceWith(T(this).children());
        }), this;
      },
      clone: function() {
        return this.map(function() {
          return this.cloneNode(!0);
        });
      },
      hide: function() {
        return this.css("display", "none");
      },
      toggle: function(t) {
        return this.each(function() {
          var e = T(this);
          (t === S ? "none" == e.css("display") : t) ? e.show() : e.hide();
        });
      },
      prev: function(t) {
        return T(this.pluck("previousElementSibling")).filter(t || "*");
      },
      next: function(t) {
        return T(this.pluck("nextElementSibling")).filter(t || "*");
      },
      html: function(t) {
        return t === S ? this.length > 0 ? this[0].innerHTML : null : this.each(function(e) {
          var n = this.innerHTML;
          T(this).empty().append(v(this, t, e, n));
        });
      },
      text: function(t) {
        return t === S ? this.length > 0 ? this[0].textContent : null : this.each(function() {
          this.textContent = t;
        });
      },
      attr: function(t, e) {
        var n;
        return "string" == typeof t && e === S ? 0 == this.length || 1 !== this[0].nodeType ? S : "value" == t && "INPUT" == this[0].nodeName ? this.val() : !(n = this[0].getAttribute(t)) && t in this[0] ? this[0][t] : n : this.each(function(n) {
          if (1 === this.nodeType) if (r(t)) for (k in t) b(this, k, t[k]); else b(this, t, v(this, e, n, this.getAttribute(t)));
        });
      },
      removeAttr: function(t) {
        return this.each(function() {
          1 === this.nodeType && b(this, t);
        });
      },
      prop: function(t, e) {
        return e === S ? this[0] && this[0][t] : this.each(function(n) {
          this[t] = v(this, e, n, this[t]);
        });
      },
      data: function(t, e) {
        var n = this.attr("data-" + c(t), e);
        return null !== n ? w(n) : S;
      },
      val: function(t) {
        return t === S ? this[0] && (this[0].multiple ? T(this[0]).find("option").filter(function() {
          return this.selected;
        }).pluck("value") : this[0].value) : this.each(function(e) {
          this.value = v(this, t, e, this.value);
        });
      },
      offset: function(t) {
        if (t) return this.each(function(e) {
          var n = T(this), i = v(this, t, e, n.offset()), r = n.offsetParent().offset(), s = {
            top: i.top - r.top,
            left: i.left - r.left
          };
          "static" == n.css("position") && (s.position = "relative"), n.css(s);
        });
        if (0 == this.length) return null;
        var e = this[0].getBoundingClientRect();
        return {
          left: e.left + window.pageXOffset,
          top: e.top + window.pageYOffset,
          width: Math.round(e.width),
          height: Math.round(e.height)
        };
      },
      css: function(e, n) {
        if (arguments.length < 2 && "string" == typeof e) return this[0] && (this[0].style[E(e)] || z(this[0], "").getPropertyValue(e));
        var i = "";
        if ("string" == t(e)) n || 0 === n ? i = c(e) + ":" + p(e, n) : this.each(function() {
          this.style.removeProperty(c(e));
        }); else for (k in e) e[k] || 0 === e[k] ? i += c(k) + ":" + p(k, e[k]) + ";" : this.each(function() {
          this.style.removeProperty(c(k));
        });
        return this.each(function() {
          this.style.cssText += ";" + i;
        });
      },
      index: function(t) {
        return t ? this.indexOf(T(t)[0]) : this.parent().children().indexOf(this[0]);
      },
      hasClass: function(t) {
        return P.some.call(this, function(t) {
          return this.test(y(t));
        }, h(t));
      },
      addClass: function(t) {
        return this.each(function(e) {
          _ = [];
          var n = y(this), i = v(this, t, e, n);
          i.split(/\s+/g).forEach(function(t) {
            T(this).hasClass(t) || _.push(t);
          }, this), _.length && y(this, n + (n ? " " : "") + _.join(" "));
        });
      },
      removeClass: function(t) {
        return this.each(function(e) {
          return t === S ? y(this, "") : (_ = y(this), v(this, t, e, _).split(/\s+/g).forEach(function(t) {
            _ = _.replace(h(t), " ");
          }), y(this, _.trim()), void 0);
        });
      },
      toggleClass: function(t, e) {
        return this.each(function(n) {
          var i = T(this), r = v(this, t, n, y(this));
          r.split(/\s+/g).forEach(function(t) {
            (e === S ? !i.hasClass(t) : e) ? i.addClass(t) : i.removeClass(t);
          });
        });
      },
      scrollTop: function() {
        return this.length ? "scrollTop" in this[0] ? this[0].scrollTop : this[0].scrollY : void 0;
      },
      position: function() {
        if (this.length) {
          var t = this[0], e = this.offsetParent(), n = this.offset(), i = M.test(e[0].nodeName) ? {
            top: 0,
            left: 0
          } : e.offset();
          return n.top -= parseFloat(T(t).css("margin-top")) || 0, n.left -= parseFloat(T(t).css("margin-left")) || 0, 
          i.top += parseFloat(T(e[0]).css("border-top-width")) || 0, i.left += parseFloat(T(e[0]).css("border-left-width")) || 0, 
          {
            top: n.top - i.top,
            left: n.left - i.left
          };
        }
      },
      offsetParent: function() {
        return this.map(function() {
          for (var t = this.offsetParent || O.body; t && !M.test(t.nodeName) && "static" == T(t).css("position"); ) t = t.offsetParent;
          return t;
        });
      }
    }, T.fn.detach = T.fn.remove, [ "width", "height" ].forEach(function(t) {
      T.fn[t] = function(e) {
        var r, s = this[0], a = t.replace(/./, function(t) {
          return t[0].toUpperCase();
        });
        return e === S ? n(s) ? s["inner" + a] : i(s) ? s.documentElement["offset" + a] : (r = this.offset()) && r[t] : this.each(function(n) {
          s = T(this), s.css(t, v(this, e, n, s[t]()));
        });
      };
    }), H.forEach(function(e, n) {
      var i = n % 2;
      T.fn[e] = function() {
        var e, r, s = T.map(arguments, function(n) {
          return e = t(n), "object" == e || "array" == e || null == n ? n : G.fragment(n);
        }), a = this.length > 1;
        return s.length < 1 ? this : this.each(function(t, e) {
          r = i ? e : e.parentNode, e = 0 == n ? e.nextSibling : 1 == n ? e.firstChild : 2 == n ? e : null, 
          s.forEach(function(t) {
            if (a) t = t.cloneNode(!0); else if (!r) return T(t).remove();
            x(r.insertBefore(t, e), function(t) {
              null == t.nodeName || "SCRIPT" !== t.nodeName.toUpperCase() || t.type && "text/javascript" !== t.type || t.src || window.eval.call(window, t.innerHTML);
            });
          });
        });
      }, T.fn[i ? e + "To" : "insert" + (n ? "Before" : "After")] = function(t) {
        return T(t)[e](this), this;
      };
    }), G.Z.prototype = T.fn, G.uniq = N, G.deserializeValue = w, T.zepto = G, T;
  }();
  window.Zepto = i, "$" in window || (window.$ = i), function(t) {
    function e(t) {
      return t._zid || (t._zid = f++);
    }
    function n(t, n, s, a) {
      if (n = i(n), n.ns) var o = r(n.ns);
      return (p[e(t)] || []).filter(function(t) {
        return !(!t || n.e && t.e != n.e || n.ns && !o.test(t.ns) || s && e(t.fn) !== e(s) || a && t.sel != a);
      });
    }
    function i(t) {
      var e = ("" + t).split(".");
      return {
        e: e[0],
        ns: e.slice(1).sort().join(" ")
      };
    }
    function r(t) {
      return new RegExp("(?:^| )" + t.replace(" ", " .* ?") + "(?: |$)");
    }
    function s(e, n, i) {
      "string" != t.type(e) ? t.each(e, i) : e.split(/\s/).forEach(function(t) {
        i(t, n);
      });
    }
    function a(t, e) {
      return t.del && ("focus" == t.e || "blur" == t.e) || !!e;
    }
    function o(t) {
      return m[t] || t;
    }
    function l(n, r, l, u, c, h) {
      var f = e(n), d = p[f] || (p[f] = []);
      s(r, l, function(e, r) {
        var s = i(e);
        s.fn = r, s.sel = u, s.e in m && (r = function(e) {
          var n = e.relatedTarget;
          return !n || n !== this && !t.contains(this, n) ? s.fn.apply(this, arguments) : void 0;
        }), s.del = c && c(r, e);
        var l = s.del || r;
        s.proxy = function(t) {
          var e = l.apply(n, [ t ].concat(t.data));
          return e === !1 && (t.preventDefault(), t.stopPropagation()), e;
        }, s.i = d.length, d.push(s), n.addEventListener(o(s.e), s.proxy, a(s, h));
      });
    }
    function u(t, i, r, l, u) {
      var c = e(t);
      s(i || "", r, function(e, i) {
        n(t, e, i, l).forEach(function(e) {
          delete p[c][e.i], t.removeEventListener(o(e.e), e.proxy, a(e, u));
        });
      });
    }
    function c(e) {
      var n, i = {
        originalEvent: e
      };
      for (n in e) b.test(n) || void 0 === e[n] || (i[n] = e[n]);
      return t.each(y, function(t, n) {
        i[t] = function() {
          return this[n] = g, e[t].apply(e, arguments);
        }, i[n] = v;
      }), i;
    }
    function h(t) {
      if (!("defaultPrevented" in t)) {
        t.defaultPrevented = !1;
        var e = t.preventDefault;
        t.preventDefault = function() {
          this.defaultPrevented = !0, e.call(this);
        };
      }
    }
    var p = (t.zepto.qsa, {}), f = 1, d = {}, m = {
      mouseenter: "mouseover",
      mouseleave: "mouseout"
    };
    d.click = d.mousedown = d.mouseup = d.mousemove = "MouseEvents", t.event = {
      add: l,
      remove: u
    }, t.proxy = function(n, i) {
      if (t.isFunction(n)) {
        var r = function() {
          return n.apply(i, arguments);
        };
        return r._zid = e(n), r;
      }
      if ("string" == typeof i) return t.proxy(n[i], n);
      throw new TypeError("expected function");
    }, t.fn.bind = function(t, e) {
      return this.each(function() {
        l(this, t, e);
      });
    }, t.fn.unbind = function(t, e) {
      return this.each(function() {
        u(this, t, e);
      });
    }, t.fn.one = function(t, e) {
      return this.each(function(n, i) {
        l(this, t, e, null, function(t, e) {
          return function() {
            var n = t.apply(i, arguments);
            return u(i, e, t), n;
          };
        });
      });
    };
    var g = function() {
      return !0;
    }, v = function() {
      return !1;
    }, b = /^([A-Z]|layer[XY]$)/, y = {
      preventDefault: "isDefaultPrevented",
      stopImmediatePropagation: "isImmediatePropagationStopped",
      stopPropagation: "isPropagationStopped"
    };
    t.fn.delegate = function(e, n, i) {
      return this.each(function(r, s) {
        l(s, n, i, e, function(n) {
          return function(i) {
            var r, a = t(i.target).closest(e, s).get(0);
            return a ? (r = t.extend(c(i), {
              currentTarget: a,
              liveFired: s
            }), n.apply(a, [ r ].concat([].slice.call(arguments, 1)))) : void 0;
          };
        });
      });
    }, t.fn.undelegate = function(t, e, n) {
      return this.each(function() {
        u(this, e, n, t);
      });
    }, t.fn.live = function(e, n) {
      return t(document.body).delegate(this.selector, e, n), this;
    }, t.fn.die = function(e, n) {
      return t(document.body).undelegate(this.selector, e, n), this;
    }, t.fn.on = function(e, n, i) {
      return !n || t.isFunction(n) ? this.bind(e, n || i) : this.delegate(n, e, i);
    }, t.fn.off = function(e, n, i) {
      return !n || t.isFunction(n) ? this.unbind(e, n || i) : this.undelegate(n, e, i);
    }, t.fn.trigger = function(e, n) {
      return ("string" == typeof e || t.isPlainObject(e)) && (e = t.Event(e)), h(e), e.data = n, 
      this.each(function() {
        "dispatchEvent" in this && this.dispatchEvent(e);
      });
    }, t.fn.triggerHandler = function(e, i) {
      var r, s;
      return this.each(function(a, o) {
        r = c("string" == typeof e ? t.Event(e) : e), r.data = i, r.target = o, t.each(n(o, e.type || e), function(t, e) {
          return s = e.proxy(r), r.isImmediatePropagationStopped() ? !1 : void 0;
        });
      }), s;
    }, "focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e) {
      t.fn[e] = function(t) {
        return t ? this.bind(e, t) : this.trigger(e);
      };
    }), [ "focus", "blur" ].forEach(function(e) {
      t.fn[e] = function(t) {
        return t ? this.bind(e, t) : this.each(function() {
          try {
            this[e]();
          } catch (t) {}
        }), this;
      };
    }), t.Event = function(t, e) {
      "string" != typeof t && (e = t, t = e.type);
      var n = document.createEvent(d[t] || "Events"), i = !0;
      if (e) for (var r in e) "bubbles" == r ? i = !!e[r] : n[r] = e[r];
      return n.initEvent(t, i, !0, null, null, null, null, null, null, null, null, null, null, null, null), 
      n.isDefaultPrevented = function() {
        return this.defaultPrevented;
      }, n;
    };
  }(i), function(t, e) {
    function n(t) {
      return i(t.replace(/([a-z])([A-Z])/, "$1-$2"));
    }
    function i(t) {
      return t.toLowerCase();
    }
    function r(t) {
      return s ? s + t : i(t);
    }
    var s, a, o, l, u, c, h, p, f = "", d = {
      Webkit: "webkit",
      Moz: "",
      O: "o",
      ms: "MS"
    }, m = window.document, g = m.createElement("div"), v = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i, b = {};
    t.each(d, function(t, n) {
      return g.style[t + "TransitionProperty"] !== e ? (f = "-" + i(t) + "-", s = n, !1) : void 0;
    }), a = f + "transform", b[o = f + "transition-property"] = b[l = f + "transition-duration"] = b[u = f + "transition-timing-function"] = b[c = f + "animation-name"] = b[h = f + "animation-duration"] = b[p = f + "animation-timing-function"] = "", 
    t.fx = {
      off: s === e && g.style.transitionProperty === e,
      speeds: {
        _default: 400,
        fast: 200,
        slow: 600
      },
      cssPrefix: f,
      transitionEnd: r("TransitionEnd"),
      animationEnd: r("AnimationEnd")
    }, t.fn.animate = function(e, n, i, r) {
      return t.isPlainObject(n) && (i = n.easing, r = n.complete, n = n.duration), n && (n = ("number" == typeof n ? n : t.fx.speeds[n] || t.fx.speeds._default) / 1e3), 
      this.anim(e, n, i, r);
    }, t.fn.anim = function(i, r, s, f) {
      var d, m, g, y = {}, w = "", x = this, S = t.fx.transitionEnd;
      if (r === e && (r = .4), t.fx.off && (r = 0), "string" == typeof i) y[c] = i, y[h] = r + "s", 
      y[p] = s || "linear", S = t.fx.animationEnd; else {
        m = [];
        for (d in i) v.test(d) ? w += d + "(" + i[d] + ") " : (y[d] = i[d], m.push(n(d)));
        w && (y[a] = w, m.push(a)), r > 0 && "object" == typeof i && (y[o] = m.join(", "), 
        y[l] = r + "s", y[u] = s || "linear");
      }
      return g = function(e) {
        if ("undefined" != typeof e) {
          if (e.target !== e.currentTarget) return;
          t(e.target).unbind(S, g);
        }
        t(this).css(b), f && f.call(this);
      }, r > 0 && this.bind(S, g), this.size() && this.get(0).clientLeft, this.css(y), 
      0 >= r && setTimeout(function() {
        x.each(function() {
          g.call(this);
        });
      }, 0), this;
    }, g = null;
  }(i), function(t) {
    function e(e, n, i) {
      var r = t.Event(n);
      return t(e).trigger(r, i), !r.defaultPrevented;
    }
    function n(t, n, i, r) {
      return t.global ? e(n || b, i, r) : void 0;
    }
    function i(e) {
      e.global && 0 === t.active++ && n(e, null, "ajaxStart");
    }
    function r(e) {
      e.global && !--t.active && n(e, null, "ajaxStop");
    }
    function s(t, e) {
      var i = e.context;
      return e.beforeSend.call(i, t, e) === !1 || n(e, i, "ajaxBeforeSend", [ t, e ]) === !1 ? !1 : (n(e, i, "ajaxSend", [ t, e ]), 
      void 0);
    }
    function a(t, e, i) {
      var r = i.context, s = "success";
      i.success.call(r, t, s, e), n(i, r, "ajaxSuccess", [ e, i, t ]), l(s, e, i);
    }
    function o(t, e, i, r) {
      var s = r.context;
      r.error.call(s, i, e, t), n(r, s, "ajaxError", [ i, r, t ]), l(e, i, r);
    }
    function l(t, e, i) {
      var s = i.context;
      i.complete.call(s, e, t), n(i, s, "ajaxComplete", [ e, i ]), r(i);
    }
    function u() {}
    function c(t) {
      return t && (t = t.split(";", 2)[0]), t && (t == k ? "html" : t == S ? "json" : w.test(t) ? "script" : x.test(t) && "xml") || "text";
    }
    function h(t, e) {
      return (t + "&" + e).replace(/[&?]{1,2}/, "?");
    }
    function p(e) {
      e.processData && e.data && "string" != t.type(e.data) && (e.data = t.param(e.data, e.traditional)), 
      !e.data || e.type && "GET" != e.type.toUpperCase() || (e.url = h(e.url, e.data));
    }
    function f(e, n, i, r) {
      var s = !t.isFunction(n);
      return {
        url: e,
        data: s ? n : void 0,
        success: s ? t.isFunction(i) ? i : void 0 : n,
        dataType: s ? r || i : i
      };
    }
    function d(e, n, i, r) {
      var s, a = t.isArray(n);
      t.each(n, function(n, o) {
        s = t.type(o), r && (n = i ? r : r + "[" + (a ? "" : n) + "]"), !r && a ? e.add(o.name, o.value) : "array" == s || !i && "object" == s ? d(e, o, i, n) : e.add(n, o);
      });
    }
    var m, g, v = 0, b = window.document, y = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, w = /^(?:text|application)\/javascript/i, x = /^(?:text|application)\/xml/i, S = "application/json", k = "text/html", T = /^\s*$/;
    t.active = 0, t.ajaxJSONP = function(e) {
      if (!("type" in e)) return t.ajax(e);
      var n, i = "jsonp" + ++v, r = b.createElement("script"), l = function() {
        clearTimeout(n), t(r).remove(), delete window[i];
      }, c = function(t) {
        l(), t && "timeout" != t || (window[i] = u), o(null, t || "abort", h, e);
      }, h = {
        abort: c
      };
      return s(h, e) === !1 ? (c("abort"), !1) : (window[i] = function(t) {
        l(), a(t, h, e);
      }, r.onerror = function() {
        c("error");
      }, r.src = e.url.replace(/=\?/, "=" + i), t("head").append(r), e.timeout > 0 && (n = setTimeout(function() {
        c("timeout");
      }, e.timeout)), h);
    }, t.ajaxSettings = {
      type: "GET",
      beforeSend: u,
      success: u,
      error: u,
      complete: u,
      context: null,
      global: !0,
      xhr: function() {
        return new window.XMLHttpRequest();
      },
      accepts: {
        script: "text/javascript, application/javascript",
        json: S,
        xml: "application/xml, text/xml",
        html: k,
        text: "text/plain"
      },
      crossDomain: !1,
      timeout: 0,
      processData: !0,
      cache: !0
    }, t.ajax = function(e) {
      var n = t.extend({}, e || {});
      for (m in t.ajaxSettings) void 0 === n[m] && (n[m] = t.ajaxSettings[m]);
      i(n), n.crossDomain || (n.crossDomain = /^([\w-]+:)?\/\/([^\/]+)/.test(n.url) && RegExp.$2 != window.location.host), 
      n.url || (n.url = window.location.toString()), p(n), n.cache === !1 && (n.url = h(n.url, "_=" + Date.now()));
      var r = n.dataType, l = /=\?/.test(n.url);
      if ("jsonp" == r || l) return l || (n.url = h(n.url, "callback=?")), t.ajaxJSONP(n);
      var f, d = n.accepts[r], v = {}, b = /^([\w-]+:)\/\//.test(n.url) ? RegExp.$1 : window.location.protocol, y = n.xhr();
      n.crossDomain || (v["X-Requested-With"] = "XMLHttpRequest"), d && (v.Accept = d, 
      d.indexOf(",") > -1 && (d = d.split(",", 2)[0]), y.overrideMimeType && y.overrideMimeType(d)), 
      (n.contentType || n.contentType !== !1 && n.data && "GET" != n.type.toUpperCase()) && (v["Content-Type"] = n.contentType || "application/x-www-form-urlencoded"), 
      n.headers = t.extend(v, n.headers || {}), y.onreadystatechange = function() {
        if (4 == y.readyState) {
          y.onreadystatechange = u, clearTimeout(f);
          var e, i = !1;
          if (y.status >= 200 && y.status < 300 || 304 == y.status || 0 == y.status && "file:" == b) {
            r = r || c(y.getResponseHeader("content-type")), e = y.responseText;
            try {
              "script" == r ? (1, eval)(e) : "xml" == r ? e = y.responseXML : "json" == r && (e = T.test(e) ? null : t.parseJSON(e));
            } catch (s) {
              i = s;
            }
            i ? o(i, "parsererror", y, n) : a(e, y, n);
          } else o(null, y.status ? "error" : "abort", y, n);
        }
      };
      var w = "async" in n ? n.async : !0;
      y.open(n.type, n.url, w);
      for (g in n.headers) y.setRequestHeader(g, n.headers[g]);
      return s(y, n) === !1 ? (y.abort(), !1) : (n.timeout > 0 && (f = setTimeout(function() {
        y.onreadystatechange = u, y.abort(), o(null, "timeout", y, n);
      }, n.timeout)), y.send(n.data ? n.data : null), y);
    }, t.get = function() {
      return t.ajax(f.apply(null, arguments));
    }, t.post = function() {
      var e = f.apply(null, arguments);
      return e.type = "POST", t.ajax(e);
    }, t.getJSON = function() {
      var e = f.apply(null, arguments);
      return e.dataType = "json", t.ajax(e);
    }, t.fn.load = function(e, n, i) {
      if (!this.length) return this;
      var r, s = this, a = e.split(/\s/), o = f(e, n, i), l = o.success;
      return a.length > 1 && (o.url = a[0], r = a[1]), o.success = function(e) {
        s.html(r ? t("<div>").html(e.replace(y, "")).find(r) : e), l && l.apply(s, arguments);
      }, t.ajax(o), this;
    };
    var _ = encodeURIComponent;
    t.param = function(t, e) {
      var n = [];
      return n.add = function(t, e) {
        this.push(_(t) + "=" + _(e));
      }, d(n, t, e), n.join("&").replace(/%20/g, "+");
    };
  }(i), function(t) {
    function e(t) {
      return "tagName" in t ? t : t.parentNode;
    }
    function n(t, e, n, i) {
      var r = Math.abs(t - e), s = Math.abs(n - i);
      return r >= s ? t - e > 0 ? "Left" : "Right" : n - i > 0 ? "Up" : "Down";
    }
    function i() {
      u = null, c.last && (c.el.trigger("longTap"), c = {});
    }
    function r() {
      u && clearTimeout(u), u = null;
    }
    function s() {
      a && clearTimeout(a), o && clearTimeout(o), l && clearTimeout(l), u && clearTimeout(u), 
      a = o = l = u = null, c = {};
    }
    var a, o, l, u, c = {}, h = 750;
    t(document).ready(function() {
      var p, f;
      t(document.body).bind("touchstart", function(n) {
        p = Date.now(), f = p - (c.last || p), c.el = t(e(n.touches[0].target)), a && clearTimeout(a), 
        c.x1 = n.touches[0].pageX, c.y1 = n.touches[0].pageY, f > 0 && 250 >= f && (c.isDoubleTap = !0), 
        c.last = p, u = setTimeout(i, h);
      }).bind("touchmove", function(t) {
        r(), c.x2 = t.touches[0].pageX, c.y2 = t.touches[0].pageY, Math.abs(c.x1 - c.x2) > 10 && t.preventDefault();
      }).bind("touchend", function() {
        r(), c.x2 && Math.abs(c.x1 - c.x2) > 30 || c.y2 && Math.abs(c.y1 - c.y2) > 30 ? l = setTimeout(function() {
          c.el && (c.el.trigger("swipe"), c.el.trigger("swipe" + n(c.x1, c.x2, c.y1, c.y2))), 
          c = {};
        }, 0) : "last" in c && (o = setTimeout(function() {
          var e = t.Event("tap");
          e.cancelTouch = s, c.el.trigger(e), c.isDoubleTap ? (c.el.trigger("doubleTap"), 
          c = {}) : a = setTimeout(function() {
            a = null, c.el.trigger("singleTap"), c = {};
          }, 250);
        }, 0));
      }).bind("touchcancel", s), t(window).bind("scroll", s);
    }), [ "swipe", "swipeLeft", "swipeRight", "swipeUp", "swipeDown", "doubleTap", "tap", "singleTap", "longTap" ].forEach(function(e) {
      t.fn[e] = function(t) {
        return this.bind(e, t);
      };
    });
  }(i), n("zepto", function(t) {
    return function() {
      var e;
      return e || t.$;
    };
  }(this)), function() {
    var t, n = this, i = n.Backbone, r = [], s = r.push, a = r.slice, o = r.splice;
    t = "undefined" != typeof exports ? exports : n.Backbone = {}, t.VERSION = "1.0.0";
    var l = n._;
    l || "undefined" == typeof e || (l = e("underscore")), t.$ = n.jQuery || n.Zepto || n.ender || n.$, 
    t.noConflict = function() {
      return n.Backbone = i, this;
    }, t.emulateHTTP = !1, t.emulateJSON = !1;
    var u = t.Events = {
      on: function(t, e, n) {
        if (!h(this, "on", t, [ e, n ]) || !e) return this;
        this._events || (this._events = {});
        var i = this._events[t] || (this._events[t] = []);
        return i.push({
          callback: e,
          context: n,
          ctx: n || this
        }), this;
      },
      once: function(t, e, n) {
        if (!h(this, "once", t, [ e, n ]) || !e) return this;
        var i = this, r = l.once(function() {
          i.off(t, r), e.apply(this, arguments);
        });
        return r._callback = e, this.on(t, r, n);
      },
      off: function(t, e, n) {
        var i, r, s, a, o, u, c, p;
        if (!this._events || !h(this, "off", t, [ e, n ])) return this;
        if (!t && !e && !n) return this._events = {}, this;
        for (a = t ? [ t ] : l.keys(this._events), o = 0, u = a.length; u > o; o++) if (t = a[o], 
        s = this._events[t]) {
          if (this._events[t] = i = [], e || n) for (c = 0, p = s.length; p > c; c++) r = s[c], 
          (e && e !== r.callback && e !== r.callback._callback || n && n !== r.context) && i.push(r);
          i.length || delete this._events[t];
        }
        return this;
      },
      trigger: function(t) {
        if (!this._events) return this;
        var e = a.call(arguments, 1);
        if (!h(this, "trigger", t, e)) return this;
        var n = this._events[t], i = this._events.all;
        return n && p(n, e), i && p(i, arguments), this;
      },
      stopListening: function(t, e, n) {
        var i = this._listeners;
        if (!i) return this;
        var r = !e && !n;
        "object" == typeof e && (n = this), t && ((i = {})[t._listenerId] = t);
        for (var s in i) i[s].off(e, n, this), r && delete this._listeners[s];
        return this;
      }
    }, c = /\s+/, h = function(t, e, n, i) {
      if (!n) return !0;
      if ("object" == typeof n) {
        for (var r in n) t[e].apply(t, [ r, n[r] ].concat(i));
        return !1;
      }
      if (c.test(n)) {
        for (var s = n.split(c), a = 0, o = s.length; o > a; a++) t[e].apply(t, [ s[a] ].concat(i));
        return !1;
      }
      return !0;
    }, p = function(t, e) {
      var n, i = -1, r = t.length, s = e[0], a = e[1], o = e[2];
      switch (e.length) {
       case 0:
        for (;++i < r; ) (n = t[i]).callback.call(n.ctx);
        return;

       case 1:
        for (;++i < r; ) (n = t[i]).callback.call(n.ctx, s);
        return;

       case 2:
        for (;++i < r; ) (n = t[i]).callback.call(n.ctx, s, a);
        return;

       case 3:
        for (;++i < r; ) (n = t[i]).callback.call(n.ctx, s, a, o);
        return;

       default:
        for (;++i < r; ) (n = t[i]).callback.apply(n.ctx, e);
      }
    }, f = {
      listenTo: "on",
      listenToOnce: "once"
    };
    l.each(f, function(t, e) {
      u[e] = function(e, n, i) {
        var r = this._listeners || (this._listeners = {}), s = e._listenerId || (e._listenerId = l.uniqueId("l"));
        return r[s] = e, "object" == typeof n && (i = this), e[t](n, i, this), this;
      };
    }), u.bind = u.on, u.unbind = u.off, l.extend(t, u);
    var d = t.Model = function(t, e) {
      var n, i = t || {};
      e || (e = {}), this.cid = l.uniqueId("c"), this.attributes = {}, l.extend(this, l.pick(e, m)), 
      e.parse && (i = this.parse(i, e) || {}), (n = l.result(this, "defaults")) && (i = l.defaults({}, i, n)), 
      this.set(i, e), this.changed = {}, this.initialize.apply(this, arguments);
    }, m = [ "url", "urlRoot", "collection" ];
    l.extend(d.prototype, u, {
      changed: null,
      validationError: null,
      idAttribute: "id",
      initialize: function() {},
      toJSON: function() {
        return l.clone(this.attributes);
      },
      sync: function() {
        return t.sync.apply(this, arguments);
      },
      get: function(t) {
        return this.attributes[t];
      },
      escape: function(t) {
        return l.escape(this.get(t));
      },
      has: function(t) {
        return null != this.get(t);
      },
      set: function(t, e, n) {
        var i, r, s, a, o, u, c, h;
        if (null == t) return this;
        if ("object" == typeof t ? (r = t, n = e) : (r = {})[t] = e, n || (n = {}), !this._validate(r, n)) return !1;
        s = n.unset, o = n.silent, a = [], u = this._changing, this._changing = !0, u || (this._previousAttributes = l.clone(this.attributes), 
        this.changed = {}), h = this.attributes, c = this._previousAttributes, this.idAttribute in r && (this.id = r[this.idAttribute]);
        for (i in r) e = r[i], l.isEqual(h[i], e) || a.push(i), l.isEqual(c[i], e) ? delete this.changed[i] : this.changed[i] = e, 
        s ? delete h[i] : h[i] = e;
        if (!o) {
          a.length && (this._pending = !0);
          for (var p = 0, f = a.length; f > p; p++) this.trigger("change:" + a[p], this, h[a[p]], n);
        }
        if (u) return this;
        if (!o) for (;this._pending; ) this._pending = !1, this.trigger("change", this, n);
        return this._pending = !1, this._changing = !1, this;
      },
      unset: function(t, e) {
        return this.set(t, void 0, l.extend({}, e, {
          unset: !0
        }));
      },
      clear: function(t) {
        var e = {};
        for (var n in this.attributes) e[n] = void 0;
        return this.set(e, l.extend({}, t, {
          unset: !0
        }));
      },
      hasChanged: function(t) {
        return null == t ? !l.isEmpty(this.changed) : l.has(this.changed, t);
      },
      changedAttributes: function(t) {
        if (!t) return this.hasChanged() ? l.clone(this.changed) : !1;
        var e, n = !1, i = this._changing ? this._previousAttributes : this.attributes;
        for (var r in t) l.isEqual(i[r], e = t[r]) || ((n || (n = {}))[r] = e);
        return n;
      },
      previous: function(t) {
        return null != t && this._previousAttributes ? this._previousAttributes[t] : null;
      },
      previousAttributes: function() {
        return l.clone(this._previousAttributes);
      },
      fetch: function(t) {
        t = t ? l.clone(t) : {}, void 0 === t.parse && (t.parse = !0);
        var e = this, n = t.success;
        return t.success = function(i) {
          return e.set(e.parse(i, t), t) ? (n && n(e, i, t), e.trigger("sync", e, i, t), void 0) : !1;
        }, M(this, t), this.sync("read", this, t);
      },
      save: function(t, e, n) {
        var i, r, s, a = this.attributes;
        if (null == t || "object" == typeof t ? (i = t, n = e) : (i = {})[t] = e, !(!i || n && n.wait || this.set(i, n))) return !1;
        if (n = l.extend({
          validate: !0
        }, n), !this._validate(i, n)) return !1;
        i && n.wait && (this.attributes = l.extend({}, a, i)), void 0 === n.parse && (n.parse = !0);
        var o = this, u = n.success;
        return n.success = function(t) {
          o.attributes = a;
          var e = o.parse(t, n);
          return n.wait && (e = l.extend(i || {}, e)), l.isObject(e) && !o.set(e, n) ? !1 : (u && u(o, t, n), 
          o.trigger("sync", o, t, n), void 0);
        }, M(this, n), r = this.isNew() ? "create" : n.patch ? "patch" : "update", "patch" === r && (n.attrs = i), 
        s = this.sync(r, this, n), i && n.wait && (this.attributes = a), s;
      },
      destroy: function(t) {
        t = t ? l.clone(t) : {};
        var e = this, n = t.success, i = function() {
          e.trigger("destroy", e, e.collection, t);
        };
        if (t.success = function(r) {
          (t.wait || e.isNew()) && i(), n && n(e, r, t), e.isNew() || e.trigger("sync", e, r, t);
        }, this.isNew()) return t.success(), !1;
        M(this, t);
        var r = this.sync("delete", this, t);
        return t.wait || i(), r;
      },
      url: function() {
        var t = l.result(this, "urlRoot") || l.result(this.collection, "url") || X();
        return this.isNew() ? t : t + ("/" === t.charAt(t.length - 1) ? "" : "/") + encodeURIComponent(this.id);
      },
      parse: function(t) {
        return t;
      },
      clone: function() {
        return new this.constructor(this.attributes);
      },
      isNew: function() {
        return null == this.id;
      },
      isValid: function(t) {
        return this._validate({}, l.extend(t || {}, {
          validate: !0
        }));
      },
      _validate: function(t, e) {
        if (!e.validate || !this.validate) return !0;
        t = l.extend({}, this.attributes, t);
        var n = this.validationError = this.validate(t, e) || null;
        return n ? (this.trigger("invalid", this, n, l.extend(e || {}, {
          validationError: n
        })), !1) : !0;
      }
    });
    var g = [ "keys", "values", "pairs", "invert", "pick", "omit" ];
    l.each(g, function(t) {
      d.prototype[t] = function() {
        var e = a.call(arguments);
        return e.unshift(this.attributes), l[t].apply(l, e);
      };
    });
    var v = t.Collection = function(t, e) {
      e || (e = {}), e.url && (this.url = e.url), e.model && (this.model = e.model), void 0 !== e.comparator && (this.comparator = e.comparator), 
      this._reset(), this.initialize.apply(this, arguments), t && this.reset(t, l.extend({
        silent: !0
      }, e));
    }, b = {
      add: !0,
      remove: !0,
      merge: !0
    }, y = {
      add: !0,
      merge: !1,
      remove: !1
    };
    l.extend(v.prototype, u, {
      model: d,
      initialize: function() {},
      toJSON: function(t) {
        return this.map(function(e) {
          return e.toJSON(t);
        });
      },
      sync: function() {
        return t.sync.apply(this, arguments);
      },
      add: function(t, e) {
        return this.set(t, l.defaults(e || {}, y));
      },
      remove: function(t, e) {
        t = l.isArray(t) ? t.slice() : [ t ], e || (e = {});
        var n, i, r, s;
        for (n = 0, i = t.length; i > n; n++) s = this.get(t[n]), s && (delete this._byId[s.id], 
        delete this._byId[s.cid], r = this.indexOf(s), this.models.splice(r, 1), this.length--, 
        e.silent || (e.index = r, s.trigger("remove", s, this, e)), this._removeReference(s));
        return this;
      },
      set: function(t, e) {
        e = l.defaults(e || {}, b), e.parse && (t = this.parse(t, e)), l.isArray(t) || (t = t ? [ t ] : []);
        var n, i, r, a, u, c = e.at, h = this.comparator && null == c && e.sort !== !1, p = l.isString(this.comparator) ? this.comparator : null, f = [], d = [], m = {};
        for (n = 0, i = t.length; i > n; n++) (r = this._prepareModel(t[n], e)) && ((a = this.get(r)) ? (e.remove && (m[a.cid] = !0), 
        e.merge && (a.set(r.attributes, e), h && !u && a.hasChanged(p) && (u = !0))) : e.add && (f.push(r), 
        r.on("all", this._onModelEvent, this), this._byId[r.cid] = r, null != r.id && (this._byId[r.id] = r)));
        if (e.remove) {
          for (n = 0, i = this.length; i > n; ++n) m[(r = this.models[n]).cid] || d.push(r);
          d.length && this.remove(d, e);
        }
        if (f.length && (h && (u = !0), this.length += f.length, null != c ? o.apply(this.models, [ c, 0 ].concat(f)) : s.apply(this.models, f)), 
        u && this.sort({
          silent: !0
        }), e.silent) return this;
        for (n = 0, i = f.length; i > n; n++) (r = f[n]).trigger("add", r, this, e);
        return u && this.trigger("sort", this, e), this;
      },
      reset: function(t, e) {
        e || (e = {});
        for (var n = 0, i = this.models.length; i > n; n++) this._removeReference(this.models[n]);
        return e.previousModels = this.models, this._reset(), this.add(t, l.extend({
          silent: !0
        }, e)), e.silent || this.trigger("reset", this, e), this;
      },
      push: function(t, e) {
        return t = this._prepareModel(t, e), this.add(t, l.extend({
          at: this.length
        }, e)), t;
      },
      pop: function(t) {
        var e = this.at(this.length - 1);
        return this.remove(e, t), e;
      },
      unshift: function(t, e) {
        return t = this._prepareModel(t, e), this.add(t, l.extend({
          at: 0
        }, e)), t;
      },
      shift: function(t) {
        var e = this.at(0);
        return this.remove(e, t), e;
      },
      slice: function(t, e) {
        return this.models.slice(t, e);
      },
      get: function(t) {
        return null == t ? void 0 : this._byId[null != t.id ? t.id : t.cid || t];
      },
      at: function(t) {
        return this.models[t];
      },
      where: function(t, e) {
        return l.isEmpty(t) ? e ? void 0 : [] : this[e ? "find" : "filter"](function(e) {
          for (var n in t) if (t[n] !== e.get(n)) return !1;
          return !0;
        });
      },
      findWhere: function(t) {
        return this.where(t, !0);
      },
      sort: function(t) {
        if (!this.comparator) throw new Error("Cannot sort a set without a comparator");
        return t || (t = {}), l.isString(this.comparator) || 1 === this.comparator.length ? this.models = this.sortBy(this.comparator, this) : this.models.sort(l.bind(this.comparator, this)), 
        t.silent || this.trigger("sort", this, t), this;
      },
      sortedIndex: function(t, e, n) {
        e || (e = this.comparator);
        var i = l.isFunction(e) ? e : function(t) {
          return t.get(e);
        };
        return l.sortedIndex(this.models, t, i, n);
      },
      pluck: function(t) {
        return l.invoke(this.models, "get", t);
      },
      fetch: function(t) {
        t = t ? l.clone(t) : {}, void 0 === t.parse && (t.parse = !0);
        var e = t.success, n = this;
        return t.success = function(i) {
          var r = t.reset ? "reset" : "set";
          n[r](i, t), e && e(n, i, t), n.trigger("sync", n, i, t);
        }, M(this, t), this.sync("read", this, t);
      },
      create: function(t, e) {
        if (e = e ? l.clone(e) : {}, !(t = this._prepareModel(t, e))) return !1;
        e.wait || this.add(t, e);
        var n = this, i = e.success;
        return e.success = function(r) {
          e.wait && n.add(t, e), i && i(t, r, e);
        }, t.save(null, e), t;
      },
      parse: function(t) {
        return t;
      },
      clone: function() {
        return new this.constructor(this.models);
      },
      _reset: function() {
        this.length = 0, this.models = [], this._byId = {};
      },
      _prepareModel: function(t, e) {
        if (t instanceof d) return t.collection || (t.collection = this), t;
        e || (e = {}), e.collection = this;
        var n = new this.model(t, e);
        return n._validate(t, e) ? n : (this.trigger("invalid", this, t, e), !1);
      },
      _removeReference: function(t) {
        this === t.collection && delete t.collection, t.off("all", this._onModelEvent, this);
      },
      _onModelEvent: function(t, e, n, i) {
        ("add" !== t && "remove" !== t || n === this) && ("destroy" === t && this.remove(e, i), 
        e && t === "change:" + e.idAttribute && (delete this._byId[e.previous(e.idAttribute)], 
        null != e.id && (this._byId[e.id] = e)), this.trigger.apply(this, arguments));
      }
    });
    var w = [ "forEach", "each", "map", "collect", "reduce", "foldl", "inject", "reduceRight", "foldr", "find", "detect", "filter", "select", "reject", "every", "all", "some", "any", "include", "contains", "invoke", "max", "min", "toArray", "size", "first", "head", "take", "initial", "rest", "tail", "drop", "last", "without", "indexOf", "shuffle", "lastIndexOf", "isEmpty", "chain" ];
    l.each(w, function(t) {
      v.prototype[t] = function() {
        var e = a.call(arguments);
        return e.unshift(this.models), l[t].apply(l, e);
      };
    });
    var x = [ "groupBy", "countBy", "sortBy" ];
    l.each(x, function(t) {
      v.prototype[t] = function(e, n) {
        var i = l.isFunction(e) ? e : function(t) {
          return t.get(e);
        };
        return l[t](this.models, i, n);
      };
    });
    var S = t.View = function(t) {
      this.cid = l.uniqueId("view"), this._configure(t || {}), this._ensureElement(), 
      this.initialize.apply(this, arguments), this.delegateEvents();
    }, k = /^(\S+)\s*(.*)$/, T = [ "model", "collection", "el", "id", "attributes", "className", "tagName", "events" ];
    l.extend(S.prototype, u, {
      tagName: "div",
      $: function(t) {
        return this.$el.find(t);
      },
      initialize: function() {},
      render: function() {
        return this;
      },
      remove: function() {
        return this.$el.remove(), this.stopListening(), this;
      },
      setElement: function(e, n) {
        return this.$el && this.undelegateEvents(), this.$el = e instanceof t.$ ? e : t.$(e), 
        this.el = this.$el[0], n !== !1 && this.delegateEvents(), this;
      },
      delegateEvents: function(t) {
        if (!t && !(t = l.result(this, "events"))) return this;
        this.undelegateEvents();
        for (var e in t) {
          var n = t[e];
          if (l.isFunction(n) || (n = this[t[e]]), n) {
            var i = e.match(k), r = i[1], s = i[2];
            n = l.bind(n, this), r += ".delegateEvents" + this.cid, "" === s ? this.$el.on(r, n) : this.$el.on(r, s, n);
          }
        }
        return this;
      },
      undelegateEvents: function() {
        return this.$el.off(".delegateEvents" + this.cid), this;
      },
      _configure: function(t) {
        this.options && (t = l.extend({}, l.result(this, "options"), t)), l.extend(this, l.pick(t, T)), 
        this.options = t;
      },
      _ensureElement: function() {
        if (this.el) this.setElement(l.result(this, "el"), !1); else {
          var e = l.extend({}, l.result(this, "attributes"));
          this.id && (e.id = l.result(this, "id")), this.className && (e["class"] = l.result(this, "className"));
          var n = t.$("<" + l.result(this, "tagName") + ">").attr(e);
          this.setElement(n, !1);
        }
      }
    }), t.sync = function(e, n, i) {
      var r = _[e];
      l.defaults(i || (i = {}), {
        emulateHTTP: t.emulateHTTP,
        emulateJSON: t.emulateJSON
      });
      var s = {
        type: r,
        dataType: "json"
      };
      if (i.url || (s.url = l.result(n, "url") || X()), null != i.data || !n || "create" !== e && "update" !== e && "patch" !== e || (s.contentType = "application/json", 
      s.data = JSON.stringify(i.attrs || n.toJSON(i))), i.emulateJSON && (s.contentType = "application/x-www-form-urlencoded", 
      s.data = s.data ? {
        model: s.data
      } : {}), i.emulateHTTP && ("PUT" === r || "DELETE" === r || "PATCH" === r)) {
        s.type = "POST", i.emulateJSON && (s.data._method = r);
        var a = i.beforeSend;
        i.beforeSend = function(t) {
          return t.setRequestHeader("X-HTTP-Method-Override", r), a ? a.apply(this, arguments) : void 0;
        };
      }
      "GET" === s.type || i.emulateJSON || (s.processData = !1), "PATCH" !== s.type || !window.ActiveXObject || window.external && window.external.msActiveXFilteringEnabled || (s.xhr = function() {
        return new ActiveXObject("Microsoft.XMLHTTP");
      });
      var o = i.xhr = t.ajax(l.extend(s, i));
      return n.trigger("request", n, o, i), o;
    };
    var _ = {
      create: "POST",
      update: "PUT",
      patch: "PATCH",
      "delete": "DELETE",
      read: "GET"
    };
    t.ajax = function() {
      return t.$.ajax.apply(t.$, arguments);
    };
    var E = t.Router = function(t) {
      t || (t = {}), t.routes && (this.routes = t.routes), this._bindRoutes(), this.initialize.apply(this, arguments);
    }, N = /\((.*?)\)/g, P = /(\(\?)?:\w+/g, C = /\*\w+/g, A = /[\-{}\[\]+?.,\\\^$|#\s]/g;
    l.extend(E.prototype, u, {
      initialize: function() {},
      route: function(e, n, i) {
        l.isRegExp(e) || (e = this._routeToRegExp(e)), l.isFunction(n) && (i = n, n = ""), 
        i || (i = this[n]);
        var r = this;
        return t.history.route(e, function(s) {
          var a = r._extractParameters(e, s);
          i && i.apply(r, a), r.trigger.apply(r, [ "route:" + n ].concat(a)), r.trigger("route", n, a), 
          t.history.trigger("route", r, n, a);
        }), this;
      },
      navigate: function(e, n) {
        return t.history.navigate(e, n), this;
      },
      _bindRoutes: function() {
        if (this.routes) {
          this.routes = l.result(this, "routes");
          for (var t, e = l.keys(this.routes); null != (t = e.pop()); ) this.route(t, this.routes[t]);
        }
      },
      _routeToRegExp: function(t) {
        return t = t.replace(A, "\\{COMPILED_JS}").replace(N, "(?:$1)?").replace(P, function(t, e) {
          return e ? t : "([^/]+)";
        }).replace(C, "(.*?)"), new RegExp("^" + t + "$");
      },
      _extractParameters: function(t, e) {
        var n = t.exec(e).slice(1);
        return l.map(n, function(t) {
          return t ? decodeURIComponent(t) : null;
        });
      }
    });
    var O = t.History = function() {
      this.handlers = [], l.bindAll(this, "checkUrl"), "undefined" != typeof window && (this.location = window.location, 
      this.history = window.history);
    }, j = /^[#\/]|\s+$/g, I = /^\/+|\/+$/g, z = /msie [\w.]+/, D = /\/$/;
    O.started = !1, l.extend(O.prototype, u, {
      interval: 50,
      getHash: function(t) {
        var e = (t || this).location.href.match(/#(.*)$/);
        return e ? e[1] : "";
      },
      getFragment: function(t, e) {
        if (null == t) if (this._hasPushState || !this._wantsHashChange || e) {
          t = this.location.pathname;
          var n = this.root.replace(D, "");
          t.indexOf(n) || (t = t.substr(n.length));
        } else t = this.getHash();
        return t.replace(j, "");
      },
      start: function(e) {
        if (O.started) throw new Error("Backbone.history has already been started");
        O.started = !0, this.options = l.extend({}, {
          root: "/"
        }, this.options, e), this.root = this.options.root, this._wantsHashChange = this.options.hashChange !== !1, 
        this._wantsPushState = !!this.options.pushState, this._hasPushState = !!(this.options.pushState && this.history && this.history.pushState);
        var n = this.getFragment(), i = document.documentMode, r = z.exec(navigator.userAgent.toLowerCase()) && (!i || 7 >= i);
        this.root = ("/" + this.root + "/").replace(I, "/"), r && this._wantsHashChange && (this.iframe = t.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow, 
        this.navigate(n)), this._hasPushState ? t.$(window).on("popstate", this.checkUrl) : this._wantsHashChange && "onhashchange" in window && !r ? t.$(window).on("hashchange", this.checkUrl) : this._wantsHashChange && (this._checkUrlInterval = setInterval(this.checkUrl, this.interval)), 
        this.fragment = n;
        var s = this.location, a = s.pathname.replace(/[^\/]$/, "{COMPILED_JS}/") === this.root;
        return this._wantsHashChange && this._wantsPushState && !this._hasPushState && !a ? (this.fragment = this.getFragment(null, !0), 
        this.location.replace(this.root + this.location.search + "#" + this.fragment), !0) : (this._wantsPushState && this._hasPushState && a && s.hash && (this.fragment = this.getHash().replace(j, ""), 
        this.history.replaceState({}, document.title, this.root + this.fragment + s.search)), 
        this.options.silent ? void 0 : this.loadUrl());
      },
      stop: function() {
        t.$(window).off("popstate", this.checkUrl).off("hashchange", this.checkUrl), clearInterval(this._checkUrlInterval), 
        O.started = !1;
      },
      route: function(t, e) {
        this.handlers.unshift({
          route: t,
          callback: e
        });
      },
      checkUrl: function() {
        var t = this.getFragment();
        return t === this.fragment && this.iframe && (t = this.getFragment(this.getHash(this.iframe))), 
        t === this.fragment ? !1 : (this.iframe && this.navigate(t), this.loadUrl() || this.loadUrl(this.getHash()), 
        void 0);
      },
      loadUrl: function(t) {
        var e = this.fragment = this.getFragment(t), n = l.any(this.handlers, function(t) {
          return t.route.test(e) ? (t.callback(e), !0) : void 0;
        });
        return n;
      },
      navigate: function(t, e) {
        if (!O.started) return !1;
        if (e && e !== !0 || (e = {
          trigger: e
        }), t = this.getFragment(t || ""), this.fragment !== t) {
          this.fragment = t;
          var n = this.root + t;
          if (this._hasPushState) this.history[e.replace ? "replaceState" : "pushState"]({}, document.title, n); else {
            if (!this._wantsHashChange) return this.location.assign(n);
            this._updateHash(this.location, t, e.replace), this.iframe && t !== this.getFragment(this.getHash(this.iframe)) && (e.replace || this.iframe.document.open().close(), 
            this._updateHash(this.iframe.location, t, e.replace));
          }
          e.trigger && this.loadUrl(t);
        }
      },
      _updateHash: function(t, e, n) {
        if (n) {
          var i = t.href.replace(/(javascript:|#).*$/, "");
          t.replace(i + "#" + e);
        } else t.hash = "#" + e;
      }
    }), t.history = new O();
    var R = function(t, e) {
      var n, i = this;
      n = t && l.has(t, "constructor") ? t.constructor : function() {
        return i.apply(this, arguments);
      }, l.extend(n, i, e);
      var r = function() {
        this.constructor = n;
      };
      return r.prototype = i.prototype, n.prototype = new r(), t && l.extend(n.prototype, t), 
      n.__super__ = i.prototype, n;
    };
    d.extend = v.extend = E.extend = S.extend = O.extend = R;
    var X = function() {
      throw new Error('A "url" property or function must be specified');
    }, M = function(t, e) {
      var n = e.error;
      e.error = function(i) {
        n && n(t, i, e), t.trigger("error", t, i, e);
      };
    };
  }.call(this), n("backbone", [ "underscore", "zepto" ], function(t) {
    return function() {
      var e;
      return e || t.Backbone;
    };
  }(this)), n("util", [ "zepto", "underscore" ], function(t, e) {
    return {
      addUrlParameters: function(t, e) {
        var n = t.toString();
        n += -1 !== n.indexOf("?") ? "&" : "?";
        var i = [];
        for (var r in e) if (e.hasOwnProperty(r)) {
          var s = e[r];
          void 0 !== s && i.push(r + "=" + s);
        }
        return n += i.join("&");
      },
      parseUrlParameters: function(t) {
        var n = {}, i = -1 !== t.indexOf("?") ? t.split("?")[1] : null;
        return i && i.length > 1 && e.each(i.split("&"), function(t) {
          var e = t.split("=");
          n[decodeURIComponent(e[0])] = e.length > 1 ? decodeURIComponent(e[1]) : null;
        }), n;
      },
      createIframe: function(t, e, n, i, r) {
        e = e || 0, n = n || 0;
        var s = function(t, e, n) {
          var a = document.createElement("iframe");
          if (a.style.position = "absolute", a.style.top = "-2000px", a.style.left = "0px", 
          a.src = t, e > 0) {
            var o = setTimeout(function() {
              i && i(), console.log("Retrying iframe url: " + t), a.parentNode.removeChild(a), 
              s(t, e - 1, n);
            }, n);
            a.onload = function() {
              clearTimeout(o), r && r();
            };
          }
          document.getElementsByTagName("body")[0].appendChild(a);
        };
        s(t, e, n);
      },
      xhrCall: function(e, n, i, r, s, a) {
        var o = function(e, n, i, r, s, a) {
          t.ajax({
            url: e,
            timeout: r,
            async: n,
            cache: !1,
            success: function(t) {
              a && a(t);
            },
            error: function() {
              i > 0 ? (s && s(), console.log("Retrying xhr url: " + e), o(e, n, i - 1, r, s, a)) : a && a(null);
            }
          });
        };
        o(e, n, i, r, s, a);
      },
      fetchStoreData: function(e, n) {
        var i = {};
        t.ajax({
          url: "http://itunes.apple.com/lookup?id=" + e + "&callback=?",
          success: function(t) {
            t && t.results && 1 === t.results.length && (t = t.results[0], "artworkUrl512" in t && (i.icon = t.artworkUrl512), 
            "averageUserRating" in t && "userRatingCount" in t && (i.rating = 20 * parseFloat(t.averageUserRating), 
            i.ratingCount = t.userRatingCount));
          },
          complete: function() {
            n(i);
          }
        });
      },
      stringifyObject: function(t) {
        if ("JSON" in window) return JSON.stringify(t);
        var e = typeof t;
        if ("object" !== e || null === t) return "string" === e && (t = '"' + t + '"'), 
        String(t);
        var n, i, r = [], s = t && t.constructor === Array;
        for (n in t) t.hasOwnProperty(n) && (i = t[n], e = typeof i, "string" === e ? i = '"' + i + '"' : "object" === e && null !== i && (i = this.stringifyObject(i)), 
        r.push((s ? "" : '"' + n + '":') + String(i)));
        return (s ? "[" : "{") + String(r) + (s ? "]" : "}");
      }
    };
  }), n("event_tracking", [ "zepto", "underscore", "util" ], function(t, e, n) {
    var i = {
      types: {
        PLAY: "videoAnalyticsEventPlay",
        ERROR: "videoAnalyticsEventError",
        ABORT: "videoAnalyticsEventAbort",
        CACHING: "videoAnalyticsEventCaching"
      },
      labels: {
        BACK: "back",
        EXIT: "exit",
        START: "start",
        COMPLETED: "completed",
        FAILED: "failed"
      }
    }, r = {
      video: {
        START: "start_ok",
        ERROR: "playback_error",
        ABORT: "abort_by_",
        CACHE: "cache_"
      }
    }, s = {
      setupGA: function() {
        window._gaq = [], window._gaq.push([ "_setAccount", "UA-37041190-1" ]), window._gaq.push([ "_setSampleRate", "1" ]);
        var e = document.createElement("script");
        e.type = "text/javascript", e.async = !0, e.src = ("https:" === document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js", 
        t("head").append(e);
      },
      setupSession: function() {
        this.setCustomVariable("connectionType", window.applifierimpact.properties.get("connectionType")), 
        this.setCustomVariable("gameId", window.applifierimpact.properties.get("gameId"), 2), 
        this.setCustomVariable("devicePixelRatio", "devicePixelRatio" in window ? window.devicePixelRatio.toString() : "undefined", 3), 
        this.setCustomVariable("abGroup", window.applifierimpact.properties.get("ab_group").toString(), 4);
        var t = window.applifierimpact.properties.get("zone");
        t && this.setCustomVariable("zoneId", t, 5);
      },
      parseAndTrackEvents: function(t) {
        var n = this;
        e.each(t, function(t) {
          var e = n._parseEvent(t);
          e && n.trackEvent("video", e.action, e.label, e.value);
        });
      },
      setCustomVariable: function(t, e, n, i) {
        n || (n = 1), i || (i = 2), this._GACall([ "_setCustomVar", n, t, e, i ]);
      },
      trackPageview: function() {
        this._GACall([ "_trackPageview" ]);
      },
      trackEvent: function(t, e, n, i) {
        if ("error" === t) {
          var r = [ "_trackEvent", t, e ];
          n && r.push(n), i && r.push(i), this._GACall(r);
        }
      },
      trackError: function(t, e, n) {
        console.log("trackError:" + t), window._gaq && window._gaq.push([ "_trackEvent", "JS Error", t, e + " (" + n + ")", 0, !0 ]);
      },
      _parseEvent: function(t) {
        var e, s, a, o = 0, l = t.eventType, u = t.data;
        if (console.log("Tracking data: " + n.stringifyObject(t)), !u) return console.error("Cannot parse event data"), 
        void 0;
        switch ("bufferingDuration" in u && (o = parseInt(u.bufferingDuration / 1e3, 10)), 
        e = "play_" + u.videoPlaybackType, l) {
         case i.types.PLAY:
          s = r.video.START, a = o;
          break;

         case i.types.ERROR:
          s = r.video.ERROR;
          break;

         case i.types.ABORT:
          s = r.video.ABORT + u.eventValue, a = o;
          break;

         case i.types.CACHING:
          e = "caching_status", s = r.video.CACHE + u.eventValue;
        }
        return {
          action: e,
          label: s,
          value: a
        };
      },
      _GACall: function(t) {
        window._gaq && (console.log("GoogleAnalytics call:" + t), window._gaq.push(t));
      }
    };
    return s;
  }), n("models/campaign", [ "backbone" ], function(t) {
    return t.Model.extend({
      parse: function(t) {
        return t.rating && (t.rating = 20 * parseFloat(t.rating) - 2), t;
      }
    });
  }), n("collections/campaigns", [ "backbone", "models/campaign" ], function(t, e) {
    return t.Collection.extend({
      model: e
    });
  }), n("models/item", [ "backbone" ], function(t) {
    return t.Model.extend({
      validate: function(t) {
        for (var e in t) if (t.hasOwnProperty(e)) {
          var n = t[e];
          if ("string" == typeof n && !n.length) return !console.log('Item attribute "' + e + '" is empty.');
        }
      }
    });
  }), n("collections/items", [ "backbone", "models/item" ], function(t, e) {
    return t.Collection.extend({
      model: e
    });
  }), n("models/zone", [ "backbone", "collections/items" ], function(t, e) {
    return t.Model.extend({
      idAttribute: "id",
      initialize: function(t) {
        this.items = new e(t.rewardItems);
      },
      parse: function(t) {
        this.items.reset(t.rewardItems);
      }
    });
  }), n("collections/zones", [ "backbone", "models/zone" ], function(t, e) {
    return t.Collection.extend({
      model: e
    });
  }), n("models/properties", [ "backbone" ], function(t) {
    return t.Model.extend({
      parse: function(t) {
        if (t.iOSVersion && (t.iOSVersion = parseFloat(t.iOSVersion)), t.deviceType) {
          var e = parseInt(t.deviceType, 10);
          isNaN(e) ? t.deviceType.match(/iphone/i) || t.deviceType.match(/ipod/i) ? t.deviceType = "iphone" : t.deviceType.match(/ipad/i) && (t.deviceType = "ipad") : t.deviceType = "android";
        }
        return t.sdkVersion && (t.sdkVersion = parseInt(t.sdkVersion, 10)), t;
      }
    });
  }), function(t, e) {
    "object" == typeof exports ? module.exports = e() : "function" == typeof n && n.amd && n("i18next", [], e);
  }(this, function() {
    function t(t, e) {
      if (!e || "function" == typeof e) return t;
      for (var n in e) t[n] = e[n];
      return t;
    }
    function e(t, e, n) {
      var i, r = 0, s = t.length, a = void 0 === s || "function" == typeof t;
      if (n) if (a) {
        for (i in t) if (e.apply(t[i], n) === !1) break;
      } else for (;s > r && e.apply(t[r++], n) !== !1; ) ; else if (a) {
        for (i in t) if (e.call(t[i], i, t[i]) === !1) break;
      } else for (;s > r && e.call(t[r], r, t[r++]) !== !1; ) ;
      return t;
    }
    function n(t) {
      return "string" == typeof t ? t.replace(/[&<>"'\/]/g, function(t) {
        return I[t];
      }) : t;
    }
    function i(t) {
      var e = function(t) {
        if (window.XMLHttpRequest) return t(null, new XMLHttpRequest());
        if (window.ActiveXObject) try {
          return t(null, new ActiveXObject("Msxml2.XMLHTTP"));
        } catch (e) {
          return t(null, new ActiveXObject("Microsoft.XMLHTTP"));
        }
        return t(new Error());
      }, n = function(t) {
        if ("string" == typeof t) return t;
        var e = [];
        for (var n in t) t.hasOwnProperty(n) && e.push(encodeURIComponent(n) + "=" + encodeURIComponent(t[n]));
        return e.join("&");
      }, i = function(t) {
        t = t.replace(/\r\n/g, "\n");
        for (var e = "", n = 0; n < t.length; n++) {
          var i = t.charCodeAt(n);
          128 > i ? e += String.fromCharCode(i) : i > 127 && 2048 > i ? (e += String.fromCharCode(192 | i >> 6), 
          e += String.fromCharCode(128 | 63 & i)) : (e += String.fromCharCode(224 | i >> 12), 
          e += String.fromCharCode(128 | 63 & i >> 6), e += String.fromCharCode(128 | 63 & i));
        }
        return e;
      }, r = function(t) {
        var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
        t = i(t);
        var n, r, s, a, o, l, u, c = "", h = 0;
        do n = t.charCodeAt(h++), r = t.charCodeAt(h++), s = t.charCodeAt(h++), a = n >> 2, 
        o = (3 & n) << 4 | r >> 4, l = (15 & r) << 2 | s >> 6, u = 63 & s, isNaN(r) ? l = u = 64 : isNaN(s) && (u = 64), 
        c += e.charAt(a) + e.charAt(o) + e.charAt(l) + e.charAt(u), n = r = s = "", a = o = l = u = ""; while (h < t.length);
        return c;
      }, s = function() {
        for (var t = arguments[0], e = 1; e < arguments.length; e++) {
          var n = arguments[e];
          for (var i in n) n.hasOwnProperty(i) && (t[i] = n[i]);
        }
        return t;
      }, a = function(t, i, r, o) {
        "function" == typeof r && (o = r, r = {}), r.cache = r.cache || !1, r.data = r.data || {}, 
        r.headers = r.headers || {}, r.jsonp = r.jsonp || !1, r.async = void 0 === r.async ? !0 : r.async;
        var l, u = s({
          accept: "*/*",
          "content-type": "application/x-www-form-urlencoded;charset=UTF-8"
        }, a.headers, r.headers);
        if (l = "application/json" === u["content-type"] ? JSON.stringify(r.data) : n(r.data), 
        "GET" === t) {
          var c = [];
          if (l && (c.push(l), l = null), r.cache || c.push("_=" + new Date().getTime()), 
          r.jsonp && (c.push("callback=" + r.jsonp), c.push("jsonp=" + r.jsonp)), c = c.join("&"), 
          c.length > 1 && (i += i.indexOf("?") > -1 ? "&" + c : "?" + c), r.jsonp) {
            var h = document.getElementsByTagName("head")[0], p = document.createElement("script");
            return p.type = "text/javascript", p.src = i, h.appendChild(p), void 0;
          }
        }
        e(function(e, n) {
          if (e) return o(e);
          n.open(t, i, r.async);
          for (var s in u) u.hasOwnProperty(s) && n.setRequestHeader(s, u[s]);
          n.onreadystatechange = function() {
            if (4 === n.readyState) {
              var t = n.responseText || "";
              if (!o) return;
              o(n.status, {
                text: function() {
                  return t;
                },
                json: function() {
                  return JSON.parse(t);
                }
              });
            }
          }, n.send(l);
        });
      }, o = {
        authBasic: function(t, e) {
          a.headers.Authorization = "Basic " + r(t + ":" + e);
        },
        connect: function(t, e, n) {
          return a("CONNECT", t, e, n);
        },
        del: function(t, e, n) {
          return a("DELETE", t, e, n);
        },
        get: function(t, e, n) {
          return a("GET", t, e, n);
        },
        head: function(t, e, n) {
          return a("HEAD", t, e, n);
        },
        headers: function(t) {
          a.headers = t || {};
        },
        isAllowed: function(t, e, n) {
          this.options(t, function(t, i) {
            n(-1 !== i.text().indexOf(e));
          });
        },
        options: function(t, e, n) {
          return a("OPTIONS", t, e, n);
        },
        patch: function(t, e, n) {
          return a("PATCH", t, e, n);
        },
        post: function(t, e, n) {
          return a("POST", t, e, n);
        },
        put: function(t, e, n) {
          return a("PUT", t, e, n);
        },
        trace: function(t, e, n) {
          return a("TRACE", t, e, n);
        }
      }, l = t.type ? t.type.toLowerCase() : "get";
      o[l](t.url, t, function(e, n) {
        200 === e ? t.success(n.json(), e, null) : t.error(n.text(), e, null);
      });
    }
    function r(t, e) {
      "function" == typeof t && (e = t, t = {}), t = t || {}, R.extend(j, t), delete j.fixLng, 
      "string" == typeof j.ns && (j.ns = {
        namespaces: [ j.ns ],
        defaultNs: j.ns
      }), "string" == typeof j.fallbackNS && (j.fallbackNS = [ j.fallbackNS ]), j.interpolationPrefixEscaped = R.regexEscape(j.interpolationPrefix), 
      j.interpolationSuffixEscaped = R.regexEscape(j.interpolationSuffix), j.lng || (j.lng = R.detectLanguage()), 
      j.lng ? j.useCookie && R.cookie.create(j.cookieName, j.lng, j.cookieExpirationTime, j.cookieDomain) : (j.lng = j.fallbackLng, 
      j.useCookie && R.cookie.remove(j.cookieName)), A = R.toLanguages(j.lng), _ = A[0], 
      R.log("currentLng set to: " + _);
      var n = y;
      t.fixLng && (n = function(t, e) {
        return e = e || {}, e.lng = e.lng || n.lng, y(t, e);
      }, n.lng = _), M.setCurrentLng(_), E && j.setJqueryExt && f();
      var i;
      if (E && E.Deferred && (i = E.Deferred()), !j.resStore) {
        var r = R.toLanguages(j.lng);
        "string" == typeof j.preload && (j.preload = [ j.preload ]);
        for (var s = 0, a = j.preload.length; a > s; s++) for (var o = R.toLanguages(j.preload[s]), l = 0, u = o.length; u > l; l++) r.indexOf(o[l]) < 0 && r.push(o[l]);
        return N.sync.load(r, j, function(t, r) {
          P = r, O = !0, e && e(n), i && i.resolve(n);
        }), i ? i.promise() : void 0;
      }
      return P = j.resStore, O = !0, e && e(n), i && i.resolve(n), i ? i.promise() : void 0;
    }
    function s(t, e) {
      "string" == typeof t && (t = [ t ]);
      for (var n = 0, i = t.length; i > n; n++) j.preload.indexOf(t[n]) < 0 && j.preload.push(t[n]);
      return r(e);
    }
    function a(t, e, n) {
      "string" != typeof e ? (n = e, e = j.ns.defaultNs) : j.ns.namespaces.indexOf(e) < 0 && j.ns.namespaces.push(e), 
      P[t] = P[t] || {}, P[t][e] = P[t][e] || {}, R.extend(P[t][e], n);
    }
    function o(t, e) {
      "string" != typeof e && (e = j.ns.defaultNs), P[t] = P[t] || {}, P[t][e] = {};
    }
    function l(t) {
      j.ns.defaultNs = t;
    }
    function u(t, e) {
      c([ t ], e);
    }
    function c(t, e) {
      var n = {
        dynamicLoad: j.dynamicLoad,
        resGetPath: j.resGetPath,
        getAsync: j.getAsync,
        customLoad: j.customLoad,
        ns: {
          namespaces: t,
          defaultNs: ""
        }
      }, i = R.toLanguages(j.lng);
      "string" == typeof j.preload && (j.preload = [ j.preload ]);
      for (var r = 0, s = j.preload.length; s > r; r++) for (var a = R.toLanguages(j.preload[r]), o = 0, l = a.length; l > o; o++) i.indexOf(a[o]) < 0 && i.push(a[o]);
      for (var u = [], c = 0, h = i.length; h > c; c++) {
        var p = !1, f = P[i[c]];
        if (f) for (var d = 0, m = t.length; m > d; d++) f[t[d]] || (p = !0); else p = !0;
        p && u.push(i[c]);
      }
      u.length ? N.sync._fetch(u, n, function(n, i) {
        var r = t.length * u.length;
        R.each(t, function(t, n) {
          j.ns.namespaces.indexOf(n) < 0 && j.ns.namespaces.push(n), R.each(u, function(t, s) {
            P[s] = P[s] || {}, P[s][n] = i[s][n], r--, 0 === r && e && (j.useLocalStorage && N.sync._storeLocal(P), 
            e());
          });
        });
      }) : e && e();
    }
    function h(t, e, n) {
      return "function" == typeof e ? (n = e, e = {}) : e || (e = {}), e.lng = t, r(e, n);
    }
    function p() {
      return _;
    }
    function f() {
      function t(t, e, n) {
        if (0 !== e.length) {
          var i = "text";
          if (0 === e.indexOf("[")) {
            var r = e.split("]");
            e = r[1], i = r[0].substr(1, r[0].length - 1);
          }
          e.indexOf(";") === e.length - 1 && (e = e.substr(0, e.length - 2));
          var s;
          "html" === i ? (s = j.defaultValueFromContent ? E.extend({
            defaultValue: t.html()
          }, n) : n, t.html(E.t(e, s))) : "text" === i ? (s = j.defaultValueFromContent ? E.extend({
            defaultValue: t.text()
          }, n) : n, t.text(E.t(e, s))) : "prepend" === i ? (s = j.defaultValueFromContent ? E.extend({
            defaultValue: t.html()
          }, n) : n, t.prepend(E.t(e, s))) : "append" === i ? (s = j.defaultValueFromContent ? E.extend({
            defaultValue: t.html()
          }, n) : n, t.append(E.t(e, s))) : (s = j.defaultValueFromContent ? E.extend({
            defaultValue: t.attr(i)
          }, n) : n, t.attr(i, E.t(e, s)));
        }
      }
      function e(e, n) {
        var i = e.attr(j.selectorAttr);
        if (i || "undefined" == typeof i || i === !1 || (i = e.text() || e.val()), i) {
          var r = e, s = e.data("i18n-target");
          if (s && (r = e.find(s) || e), n || j.useDataAttrOptions !== !0 || (n = e.data("i18n-options")), 
          n = n || {}, i.indexOf(";") >= 0) {
            var a = i.split(";");
            E.each(a, function(e, i) {
              "" !== i && t(r, i, n);
            });
          } else t(r, i, n);
          j.useDataAttrOptions === !0 && e.data("i18n-options", n);
        }
      }
      E.t = E.t || y, E.fn.i18n = function(t) {
        return this.each(function() {
          e(E(this), t);
          var n = E(this).find("[" + j.selectorAttr + "]");
          n.each(function() {
            e(E(this), t);
          });
        });
      };
    }
    function d(t, e, n, i) {
      if (!t) return t;
      if (i = i || e, t.indexOf(i.interpolationPrefix || j.interpolationPrefix) < 0) return t;
      var r = i.interpolationPrefix ? R.regexEscape(i.interpolationPrefix) : j.interpolationPrefixEscaped, s = i.interpolationSuffix ? R.regexEscape(i.interpolationSuffix) : j.interpolationSuffixEscaped, a = "HTML" + s;
      return R.each(e, function(e, o) {
        var l = n ? n + j.keyseparator + e : e;
        "object" == typeof o && null !== o ? t = d(t, o, l, i) : i.escapeInterpolation || j.escapeInterpolation ? (t = t.replace(new RegExp([ r, l, a ].join(""), "g"), o), 
        t = t.replace(new RegExp([ r, l, s ].join(""), "g"), R.escape(o))) : t = t.replace(new RegExp([ r, l, s ].join(""), "g"), o);
      }), t;
    }
    function m(t, e) {
      var n = ",", i = "{", r = "}", s = R.extend({}, e);
      for (delete s.postProcess; -1 != t.indexOf(j.reusePrefix) && (C++, !(C > j.maxRecursion)); ) {
        var a = t.lastIndexOf(j.reusePrefix), o = t.indexOf(j.reuseSuffix, a) + j.reuseSuffix.length, l = t.substring(a, o), u = l.replace(j.reusePrefix, "").replace(j.reuseSuffix, "");
        if (-1 != u.indexOf(n)) {
          var c = u.indexOf(n);
          if (-1 != u.indexOf(i, c) && -1 != u.indexOf(r, c)) {
            var h = u.indexOf(i, c), p = u.indexOf(r, h) + r.length;
            try {
              s = R.extend(s, JSON.parse(u.substring(h, p))), u = u.substring(0, c);
            } catch (f) {}
          }
        }
        var d = S(u, s);
        t = t.replace(l, d);
      }
      return t;
    }
    function g(t) {
      return t.context && ("string" == typeof t.context || "number" == typeof t.context);
    }
    function v(t) {
      return void 0 !== t.count && "string" != typeof t.count && 1 !== t.count;
    }
    function b(t, e) {
      e = e || {};
      var n = w(t, e), i = k(t, e);
      return void 0 !== i || i === n;
    }
    function y(t, e) {
      return e = e || {}, O ? (C = 0, S.apply(null, arguments)) : (R.log("i18next not finished initialization. you might have called t function before loading resources finished."), 
      e.defaultValue || "");
    }
    function w(t, e) {
      return void 0 !== e.defaultValue ? e.defaultValue : t;
    }
    function x() {
      for (var t = [], e = 1; e < arguments.length; e++) t.push(arguments[e]);
      return {
        postProcess: "sprintf",
        sprintf: t
      };
    }
    function S(t, e) {
      if ("string" == typeof e ? "sprintf" === j.shortcutFunction ? e = x.apply(null, arguments) : "defaultValue" === j.shortcutFunction && (e = {
        defaultValue: e
      }) : e = e || {}, void 0 === t || null === t) return "";
      "string" == typeof t && (t = [ t ]);
      var n = t[0];
      if (t.length > 1) for (var i = 0; i < t.length && (n = t[i], !b(n)); i++) ;
      var r, s = w(n, e), a = k(n, e), o = e.lng ? R.toLanguages(e.lng) : A, l = e.ns || j.ns.defaultNs;
      n.indexOf(j.nsseparator) > -1 && (r = n.split(j.nsseparator), l = r[0], n = r[1]), 
      void 0 === a && j.sendMissing && (e.lng ? X.postMissing(o[0], l, n, s, o) : X.postMissing(j.lng, l, n, s, o));
      var u = e.postProcess || j.postProcess;
      void 0 !== a && u && L[u] && (a = L[u](a, n, e));
      var c = s;
      if (s.indexOf(j.nsseparator) > -1 && (r = s.split(j.nsseparator), c = r[1]), c === n && j.parseMissingKey && (s = j.parseMissingKey(s)), 
      void 0 === a && (s = d(s, e), s = m(s, e), u && L[u])) {
        var h = w(n, e);
        a = L[u](h, n, e);
      }
      return void 0 !== a ? a : s;
    }
    function k(t, e) {
      e = e || {};
      var n, i, r = w(t, e), s = A;
      if (!P) return r;
      if (e.lng && (s = R.toLanguages(e.lng), !P[s[0]])) {
        var a = j.getAsync;
        j.getAsync = !1, N.sync.load(s, j, function(t, e) {
          R.extend(P, e), j.getAsync = a;
        });
      }
      var o = e.ns || j.ns.defaultNs;
      if (t.indexOf(j.nsseparator) > -1) {
        var l = t.split(j.nsseparator);
        o = l[0], t = l[1];
      }
      if (g(e)) {
        n = R.extend({}, e), delete n.context, n.defaultValue = j.contextNotFound;
        var u = o + j.nsseparator + t + "_" + e.context;
        if (i = y(u, n), i != j.contextNotFound) return d(i, {
          context: e.context
        });
      }
      if (v(e)) {
        n = R.extend({}, e), delete n.count, n.defaultValue = j.pluralNotFound;
        var c = o + j.nsseparator + t + j.pluralSuffix, h = M.get(s[0], e.count);
        if (h >= 0 ? c = c + "_" + h : 1 === h && (c = o + j.nsseparator + t), i = y(c, n), 
        i != j.pluralNotFound) return d(i, {
          count: e.count,
          interpolationPrefix: e.interpolationPrefix,
          interpolationSuffix: e.interpolationSuffix
        });
      }
      for (var p, f = t.split(j.keyseparator), b = 0, x = s.length; x > b && void 0 === p; b++) {
        for (var T = s[b], _ = 0, E = P[T] && P[T][o]; f[_]; ) E = E && E[f[_]], _++;
        if (void 0 !== E) {
          var C = Object.prototype.toString.apply(E);
          if ("string" == typeof E) E = d(E, e), E = m(E, e); else if ("[object Array]" !== C || j.returnObjectTrees || e.returnObjectTrees) {
            if (null === E && j.fallbackOnNull === !0) E = void 0; else if (null !== E) if (j.returnObjectTrees || e.returnObjectTrees) {
              if ("[object Number]" !== C && "[object Function]" !== C && "[object RegExp]" !== C) {
                var O = "[object Array]" === C ? [] : {};
                R.each(E, function(n) {
                  O[n] = S(o + j.nsseparator + t + j.keyseparator + n, e);
                }), E = O;
              }
            } else j.objectTreeKeyHandler && "function" == typeof j.objectTreeKeyHandler ? E = j.objectTreeKeyHandler(t, E, T, o, e) : (E = "key '" + o + ":" + t + " (" + T + ")' " + "returned an object instead of string.", 
            R.log(E));
          } else E = E.join("\n"), E = d(E, e), E = m(E, e);
          "string" == typeof E && "" === E.trim() && j.fallbackOnEmpty === !0 && (E = void 0), 
          p = E;
        }
      }
      if (void 0 === p && !e.isFallbackLookup && (j.fallbackToDefaultNS === !0 || j.fallbackNS && j.fallbackNS.length > 0)) if (e.isFallbackLookup = !0, 
      j.fallbackNS.length) {
        for (var I = 0, z = j.fallbackNS.length; z > I; I++) if (p = k(j.fallbackNS[I] + j.nsseparator + t, e)) {
          var D = p.indexOf(j.nsseparator) > -1 ? p.split(j.nsseparator)[1] : p, X = r.indexOf(j.nsseparator) > -1 ? r.split(j.nsseparator)[1] : r;
          if (D !== X) break;
        }
      } else p = k(t, e);
      return p;
    }
    function T() {
      var t, e = [];
      if ("undefined" != typeof window && (function() {
        for (var t = window.location.search.substring(1), n = t.split("&"), i = 0; i < n.length; i++) {
          var r = n[i].indexOf("=");
          if (r > 0) {
            var s = n[i].substring(0, r), a = n[i].substring(r + 1);
            e[s] = a;
          }
        }
      }(), e[j.detectLngQS] && (t = e[j.detectLngQS])), !t && "undefined" != typeof document && j.useCookie) {
        var n = R.cookie.read(j.cookieName);
        n && (t = n);
      }
      return t || "undefined" == typeof navigator || (t = navigator.language ? navigator.language : navigator.userLanguage), 
      t;
    }
    Array.prototype.indexOf || (Array.prototype.indexOf = function(t) {
      if (null == this) throw new TypeError();
      var e = Object(this), n = e.length >>> 0;
      if (0 === n) return -1;
      var i = 0;
      if (arguments.length > 0 && (i = Number(arguments[1]), i != i ? i = 0 : 0 != i && 1/0 != i && i != -1/0 && (i = (i > 0 || -1) * Math.floor(Math.abs(i)))), 
      i >= n) return -1;
      for (var r = i >= 0 ? i : Math.max(n - Math.abs(i), 0); n > r; r++) if (r in e && e[r] === t) return r;
      return -1;
    }), Array.prototype.lastIndexOf || (Array.prototype.lastIndexOf = function(t) {
      if (null == this) throw new TypeError();
      var e = Object(this), n = e.length >>> 0;
      if (0 === n) return -1;
      var i = n;
      arguments.length > 1 && (i = Number(arguments[1]), i != i ? i = 0 : 0 != i && i != 1 / 0 && i != -(1 / 0) && (i = (i > 0 || -1) * Math.floor(Math.abs(i))));
      for (var r = i >= 0 ? Math.min(i, n - 1) : n - Math.abs(i); r >= 0; r--) if (r in e && e[r] === t) return r;
      return -1;
    });
    var _, E = void 0, N = {}, P = {}, C = 0, A = [], O = !1, j = {
      lng: void 0,
      load: "all",
      preload: [],
      lowerCaseLng: !1,
      returnObjectTrees: !1,
      fallbackLng: "dev",
      fallbackNS: [],
      detectLngQS: "setLng",
      ns: "translation",
      fallbackOnNull: !0,
      fallbackOnEmpty: !1,
      fallbackToDefaultNS: !1,
      nsseparator: ":",
      keyseparator: ".",
      selectorAttr: "data-i18n",
      debug: !1,
      resGetPath: "locales/__lng__/__ns__.json",
      resPostPath: "locales/add/__lng__/__ns__",
      getAsync: !0,
      postAsync: !0,
      resStore: void 0,
      useLocalStorage: !1,
      localStorageExpirationTime: 6048e5,
      dynamicLoad: !1,
      sendMissing: !1,
      sendMissingTo: "fallback",
      sendType: "POST",
      interpolationPrefix: "__",
      interpolationSuffix: "__",
      reusePrefix: "$t(",
      reuseSuffix: ")",
      pluralSuffix: "_plural",
      pluralNotFound: [ "plural_not_found", Math.random() ].join(""),
      contextNotFound: [ "context_not_found", Math.random() ].join(""),
      escapeInterpolation: !1,
      setJqueryExt: !0,
      defaultValueFromContent: !0,
      useDataAttrOptions: !1,
      cookieExpirationTime: void 0,
      useCookie: !0,
      cookieName: "i18next",
      cookieDomain: void 0,
      objectTreeKeyHandler: void 0,
      postProcess: void 0,
      parseMissingKey: void 0,
      shortcutFunction: "sprintf"
    }, I = {
      "&": "&amp;",
      "<": "&lt;",
      ">": "&gt;",
      '"': "&quot;",
      "'": "&#39;",
      "/": "&#x2F;"
    }, z = {
      create: function(t, e, n, i) {
        var r;
        if (n) {
          var s = new Date();
          s.setTime(s.getTime() + 1e3 * 60 * n), r = "; expires=" + s.toGMTString();
        } else r = "";
        i = i ? "domain=" + i + ";" : "", document.cookie = t + "=" + e + r + ";" + i + "path=/";
      },
      read: function(t) {
        for (var e = t + "=", n = document.cookie.split(";"), i = 0; i < n.length; i++) {
          for (var r = n[i]; " " == r.charAt(0); ) r = r.substring(1, r.length);
          if (0 === r.indexOf(e)) return r.substring(e.length, r.length);
        }
        return null;
      },
      remove: function(t) {
        this.create(t, "", -1);
      }
    }, D = {
      create: function() {},
      read: function() {
        return null;
      },
      remove: function() {}
    }, R = {
      extend: E ? E.extend : t,
      each: E ? E.each : e,
      ajax: E ? E.ajax : "undefined" != typeof document ? i : function() {},
      cookie: "undefined" != typeof document ? z : D,
      detectLanguage: T,
      escape: n,
      log: function(t) {
        j.debug && "undefined" != typeof console && console.log(t);
      },
      toLanguages: function(t) {
        var e = [];
        if ("string" == typeof t && t.indexOf("-") > -1) {
          var n = t.split("-");
          t = j.lowerCaseLng ? n[0].toLowerCase() + "-" + n[1].toLowerCase() : n[0].toLowerCase() + "-" + n[1].toUpperCase(), 
          "unspecific" !== j.load && e.push(t), "current" !== j.load && e.push(n[0]);
        } else e.push(t);
        return -1 === e.indexOf(j.fallbackLng) && j.fallbackLng && e.push(j.fallbackLng), 
        e;
      },
      regexEscape: function(t) {
        return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\{COMPILED_JS}");
      }
    };
    R.applyReplacement = d;
    var X = {
      load: function(t, e, n) {
        e.useLocalStorage ? X._loadLocal(t, e, function(i, r) {
          for (var s = [], a = 0, o = t.length; o > a; a++) r[t[a]] || s.push(t[a]);
          s.length > 0 ? X._fetch(s, e, function(t, e) {
            R.extend(r, e), X._storeLocal(e), n(null, r);
          }) : n(null, r);
        }) : X._fetch(t, e, function(t, e) {
          n(null, e);
        });
      },
      _loadLocal: function(t, e, n) {
        var i = {}, r = new Date().getTime();
        if (window.localStorage) {
          var s = t.length;
          R.each(t, function(t, a) {
            var o = window.localStorage.getItem("res_" + a);
            o && (o = JSON.parse(o), o.i18nStamp && o.i18nStamp + e.localStorageExpirationTime > r && (i[a] = o)), 
            s--, 0 === s && n(null, i);
          });
        }
      },
      _storeLocal: function(t) {
        if (window.localStorage) for (var e in t) t[e].i18nStamp = new Date().getTime(), 
        window.localStorage.setItem("res_" + e, JSON.stringify(t[e]));
      },
      _fetch: function(t, e, n) {
        var i = e.ns, r = {};
        if (e.dynamicLoad) {
          var s = function(t, e) {
            n(null, e);
          };
          if ("function" == typeof e.customLoad) e.customLoad(t, i.namespaces, e, s); else {
            var a = d(e.resGetPath, {
              lng: t.join("+"),
              ns: i.namespaces.join("+")
            });
            R.ajax({
              url: a,
              success: function(t) {
                R.log("loaded: " + a), s(null, t);
              },
              error: function(t, e, n) {
                R.log("failed loading: " + a), s("failed loading resource.json error: " + n);
              },
              dataType: "json",
              async: e.getAsync
            });
          }
        } else {
          var o, l = i.namespaces.length * t.length;
          R.each(i.namespaces, function(i, s) {
            R.each(t, function(t, i) {
              var a = function(t, e) {
                t && (o = o || [], o.push(t)), r[i] = r[i] || {}, r[i][s] = e, l--, 0 === l && n(o, r);
              };
              "function" == typeof e.customLoad ? e.customLoad(i, s, e, a) : X._fetchOne(i, s, e, a);
            });
          });
        }
      },
      _fetchOne: function(t, e, n, i) {
        var r = d(n.resGetPath, {
          lng: t,
          ns: e
        });
        R.ajax({
          url: r,
          success: function(t) {
            R.log("loaded: " + r), i(null, t);
          },
          error: function(t, e, n) {
            200 == n.status ? R.log("There is a typo in: " + r) : 404 == n.status ? R.log("Does not exist: " + r) : R.log(n.status + " when loading " + r), 
            i(n, {});
          },
          dataType: "json",
          async: n.getAsync
        });
      },
      postMissing: function(t, e, n, i, r) {
        var s = {};
        s[n] = i;
        var a = [];
        if ("fallback" === j.sendMissingTo && j.fallbackLng !== !1) a.push({
          lng: j.fallbackLng,
          url: d(j.resPostPath, {
            lng: j.fallbackLng,
            ns: e
          })
        }); else if ("current" === j.sendMissingTo || "fallback" === j.sendMissingTo && j.fallbackLng === !1) a.push({
          lng: t,
          url: d(j.resPostPath, {
            lng: t,
            ns: e
          })
        }); else if ("all" === j.sendMissingTo) for (var o = 0, l = r.length; l > o; o++) a.push({
          lng: r[o],
          url: d(j.resPostPath, {
            lng: r[o],
            ns: e
          })
        });
        for (var u = 0, c = a.length; c > u; u++) {
          var h = a[u];
          R.ajax({
            url: h.url,
            type: j.sendType,
            data: s,
            success: function() {
              R.log("posted missing key '" + n + "' to: " + h.url);
              for (var t = n.split("."), r = 0, s = P[h.lng][e]; t[r]; ) s = s[t[r]] = r === t.length - 1 ? i : s[t[r]] || {}, 
              r++;
            },
            error: function() {
              R.log("failed posting missing key '" + n + "' to: " + h.url);
            },
            dataType: "json",
            async: j.postAsync
          });
        }
      }
    }, M = {
      rules: {
        ach: {
          name: "Acholi",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(t > 1);
          }
        },
        af: {
          name: "Afrikaans",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        ak: {
          name: "Akan",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(t > 1);
          }
        },
        am: {
          name: "Amharic",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(t > 1);
          }
        },
        an: {
          name: "Aragonese",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        ar: {
          name: "Arabic",
          numbers: [ 0, 1, 2, 3, 11, 100 ],
          plurals: function(t) {
            return Number(0 === t ? 0 : 1 == t ? 1 : 2 == t ? 2 : t % 100 >= 3 && 10 >= t % 100 ? 3 : t % 100 >= 11 ? 4 : 5);
          }
        },
        arn: {
          name: "Mapudungun",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(t > 1);
          }
        },
        ast: {
          name: "Asturian",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        ay: {
          name: "Aymará",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        az: {
          name: "Azerbaijani",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        be: {
          name: "Belarusian",
          numbers: [ 1, 2, 5 ],
          plurals: function(t) {
            return Number(1 == t % 10 && 11 != t % 100 ? 0 : t % 10 >= 2 && 4 >= t % 10 && (10 > t % 100 || t % 100 >= 20) ? 1 : 2);
          }
        },
        bg: {
          name: "Bulgarian",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        bn: {
          name: "Bengali",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        bo: {
          name: "Tibetan",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        br: {
          name: "Breton",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(t > 1);
          }
        },
        bs: {
          name: "Bosnian",
          numbers: [ 1, 2, 5 ],
          plurals: function(t) {
            return Number(1 == t % 10 && 11 != t % 100 ? 0 : t % 10 >= 2 && 4 >= t % 10 && (10 > t % 100 || t % 100 >= 20) ? 1 : 2);
          }
        },
        ca: {
          name: "Catalan",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        cgg: {
          name: "Chiga",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        cs: {
          name: "Czech",
          numbers: [ 1, 2, 5 ],
          plurals: function(t) {
            return Number(1 == t ? 0 : t >= 2 && 4 >= t ? 1 : 2);
          }
        },
        csb: {
          name: "Kashubian",
          numbers: [ 1, 2, 5 ],
          plurals: function(t) {
            return Number(1 == t ? 0 : t % 10 >= 2 && 4 >= t % 10 && (10 > t % 100 || t % 100 >= 20) ? 1 : 2);
          }
        },
        cy: {
          name: "Welsh",
          numbers: [ 1, 2, 3, 8 ],
          plurals: function(t) {
            return Number(1 == t ? 0 : 2 == t ? 1 : 8 != t && 11 != t ? 2 : 3);
          }
        },
        da: {
          name: "Danish",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        de: {
          name: "German",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        dz: {
          name: "Dzongkha",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        el: {
          name: "Greek",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        en: {
          name: "English",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        eo: {
          name: "Esperanto",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        es: {
          name: "Spanish",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        es_ar: {
          name: "Argentinean Spanish",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        et: {
          name: "Estonian",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        eu: {
          name: "Basque",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        fa: {
          name: "Persian",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        fi: {
          name: "Finnish",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        fil: {
          name: "Filipino",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(t > 1);
          }
        },
        fo: {
          name: "Faroese",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        fr: {
          name: "French",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(t > 1);
          }
        },
        fur: {
          name: "Friulian",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        fy: {
          name: "Frisian",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        ga: {
          name: "Irish",
          numbers: [ 1, 2, 3, 7, 11 ],
          plurals: function(t) {
            return Number(1 == t ? 0 : 2 == t ? 1 : 7 > t ? 2 : 11 > t ? 3 : 4);
          }
        },
        gd: {
          name: "Scottish Gaelic",
          numbers: [ 1, 2, 3, 20 ],
          plurals: function(t) {
            return Number(1 == t || 11 == t ? 0 : 2 == t || 12 == t ? 1 : t > 2 && 20 > t ? 2 : 3);
          }
        },
        gl: {
          name: "Galician",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        gu: {
          name: "Gujarati",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        gun: {
          name: "Gun",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(t > 1);
          }
        },
        ha: {
          name: "Hausa",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        he: {
          name: "Hebrew",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        hi: {
          name: "Hindi",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        hr: {
          name: "Croatian",
          numbers: [ 1, 2, 5 ],
          plurals: function(t) {
            return Number(1 == t % 10 && 11 != t % 100 ? 0 : t % 10 >= 2 && 4 >= t % 10 && (10 > t % 100 || t % 100 >= 20) ? 1 : 2);
          }
        },
        hu: {
          name: "Hungarian",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        hy: {
          name: "Armenian",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        ia: {
          name: "Interlingua",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        id: {
          name: "Indonesian",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        is: {
          name: "Icelandic",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t % 10 || 11 == t % 100);
          }
        },
        it: {
          name: "Italian",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        ja: {
          name: "Japanese",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        jbo: {
          name: "Lojban",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        jv: {
          name: "Javanese",
          numbers: [ 0, 1 ],
          plurals: function(t) {
            return Number(0 !== t);
          }
        },
        ka: {
          name: "Georgian",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        kk: {
          name: "Kazakh",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        km: {
          name: "Khmer",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        kn: {
          name: "Kannada",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        ko: {
          name: "Korean",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        ku: {
          name: "Kurdish",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        kw: {
          name: "Cornish",
          numbers: [ 1, 2, 3, 4 ],
          plurals: function(t) {
            return Number(1 == t ? 0 : 2 == t ? 1 : 3 == t ? 2 : 3);
          }
        },
        ky: {
          name: "Kyrgyz",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        lb: {
          name: "Letzeburgesch",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        ln: {
          name: "Lingala",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(t > 1);
          }
        },
        lo: {
          name: "Lao",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        lt: {
          name: "Lithuanian",
          numbers: [ 1, 2, 10 ],
          plurals: function(t) {
            return Number(1 == t % 10 && 11 != t % 100 ? 0 : t % 10 >= 2 && (10 > t % 100 || t % 100 >= 20) ? 1 : 2);
          }
        },
        lv: {
          name: "Latvian",
          numbers: [ 0, 1, 2 ],
          plurals: function(t) {
            return Number(1 == t % 10 && 11 != t % 100 ? 0 : 0 !== t ? 1 : 2);
          }
        },
        mai: {
          name: "Maithili",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        mfe: {
          name: "Mauritian Creole",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(t > 1);
          }
        },
        mg: {
          name: "Malagasy",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(t > 1);
          }
        },
        mi: {
          name: "Maori",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(t > 1);
          }
        },
        mk: {
          name: "Macedonian",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 == t || 1 == t % 10 ? 0 : 1);
          }
        },
        ml: {
          name: "Malayalam",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        mn: {
          name: "Mongolian",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        mnk: {
          name: "Mandinka",
          numbers: [ 0, 1, 2 ],
          plurals: function(t) {
            return Number(1 == t ? 1 : 2);
          }
        },
        mr: {
          name: "Marathi",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        ms: {
          name: "Malay",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        mt: {
          name: "Maltese",
          numbers: [ 1, 2, 11, 20 ],
          plurals: function(t) {
            return Number(1 == t ? 0 : 0 === t || t % 100 > 1 && 11 > t % 100 ? 1 : t % 100 > 10 && 20 > t % 100 ? 2 : 3);
          }
        },
        nah: {
          name: "Nahuatl",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        nap: {
          name: "Neapolitan",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        nb: {
          name: "Norwegian Bokmal",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        ne: {
          name: "Nepali",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        nl: {
          name: "Dutch",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        nn: {
          name: "Norwegian Nynorsk",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        no: {
          name: "Norwegian",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        nso: {
          name: "Northern Sotho",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        oc: {
          name: "Occitan",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(t > 1);
          }
        },
        or: {
          name: "Oriya",
          numbers: [ 2, 1 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        pa: {
          name: "Punjabi",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        pap: {
          name: "Papiamento",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        pl: {
          name: "Polish",
          numbers: [ 1, 2, 5 ],
          plurals: function(t) {
            return Number(1 == t ? 0 : t % 10 >= 2 && 4 >= t % 10 && (10 > t % 100 || t % 100 >= 20) ? 1 : 2);
          }
        },
        pms: {
          name: "Piemontese",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        ps: {
          name: "Pashto",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        pt: {
          name: "Portuguese",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        pt_br: {
          name: "Brazilian Portuguese",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        rm: {
          name: "Romansh",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        ro: {
          name: "Romanian",
          numbers: [ 1, 2, 20 ],
          plurals: function(t) {
            return Number(1 == t ? 0 : 0 === t || t % 100 > 0 && 20 > t % 100 ? 1 : 2);
          }
        },
        ru: {
          name: "Russian",
          numbers: [ 1, 2, 5 ],
          plurals: function(t) {
            return Number(1 == t % 10 && 11 != t % 100 ? 0 : t % 10 >= 2 && 4 >= t % 10 && (10 > t % 100 || t % 100 >= 20) ? 1 : 2);
          }
        },
        sah: {
          name: "Yakut",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        sco: {
          name: "Scots",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        se: {
          name: "Northern Sami",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        si: {
          name: "Sinhala",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        sk: {
          name: "Slovak",
          numbers: [ 1, 2, 5 ],
          plurals: function(t) {
            return Number(1 == t ? 0 : t >= 2 && 4 >= t ? 1 : 2);
          }
        },
        sl: {
          name: "Slovenian",
          numbers: [ 5, 1, 2, 3 ],
          plurals: function(t) {
            return Number(1 == t % 100 ? 1 : 2 == t % 100 ? 2 : 3 == t % 100 || 4 == t % 100 ? 3 : 0);
          }
        },
        so: {
          name: "Somali",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        son: {
          name: "Songhay",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        sq: {
          name: "Albanian",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        sr: {
          name: "Serbian",
          numbers: [ 1, 2, 5 ],
          plurals: function(t) {
            return Number(1 == t % 10 && 11 != t % 100 ? 0 : t % 10 >= 2 && 4 >= t % 10 && (10 > t % 100 || t % 100 >= 20) ? 1 : 2);
          }
        },
        su: {
          name: "Sundanese",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        sv: {
          name: "Swedish",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        sw: {
          name: "Swahili",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        ta: {
          name: "Tamil",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        te: {
          name: "Telugu",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        tg: {
          name: "Tajik",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(t > 1);
          }
        },
        th: {
          name: "Thai",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        ti: {
          name: "Tigrinya",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(t > 1);
          }
        },
        tk: {
          name: "Turkmen",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        tr: {
          name: "Turkish",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(t > 1);
          }
        },
        tt: {
          name: "Tatar",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        ug: {
          name: "Uyghur",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        uk: {
          name: "Ukrainian",
          numbers: [ 1, 2, 5 ],
          plurals: function(t) {
            return Number(1 == t % 10 && 11 != t % 100 ? 0 : t % 10 >= 2 && 4 >= t % 10 && (10 > t % 100 || t % 100 >= 20) ? 1 : 2);
          }
        },
        ur: {
          name: "Urdu",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        uz: {
          name: "Uzbek",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(t > 1);
          }
        },
        vi: {
          name: "Vietnamese",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        wa: {
          name: "Walloon",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(t > 1);
          }
        },
        wo: {
          name: "Wolof",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        },
        yo: {
          name: "Yoruba",
          numbers: [ 1, 2 ],
          plurals: function(t) {
            return Number(1 != t);
          }
        },
        zh: {
          name: "Chinese",
          numbers: [ 1 ],
          plurals: function() {
            return 0;
          }
        }
      },
      addRule: function(t, e) {
        M.rules[t] = e;
      },
      setCurrentLng: function(t) {
        if (!M.currentRule || M.currentRule.lng !== t) {
          var e = t.split("-");
          M.currentRule = {
            lng: t,
            rule: M.rules[e[0]]
          };
        }
      },
      get: function(t, e) {
        function n(e, n) {
          var i;
          if (i = M.currentRule && M.currentRule.lng === t ? M.currentRule.rule : M.rules[e]) {
            var r = i.plurals(n), s = i.numbers[r];
            return 2 === i.numbers.length && 1 === i.numbers[0] && (2 === s ? s = -1 : 1 === s && (s = 1)), 
            s;
          }
          return 1 === n ? "1" : "-1";
        }
        var i = t.split("-");
        return n(i[0], e);
      }
    }, L = {}, H = function(t, e) {
      L[t] = e;
    }, Y = function() {
      function t(t) {
        return Object.prototype.toString.call(t).slice(8, -1).toLowerCase();
      }
      function e(t, e) {
        for (var n = []; e > 0; n[--e] = t) ;
        return n.join("");
      }
      var n = function() {
        return n.cache.hasOwnProperty(arguments[0]) || (n.cache[arguments[0]] = n.parse(arguments[0])), 
        n.format.call(null, n.cache[arguments[0]], arguments);
      };
      return n.format = function(n, i) {
        var r, s, a, o, l, u, c, h = 1, p = n.length, f = "", d = [];
        for (s = 0; p > s; s++) if (f = t(n[s]), "string" === f) d.push(n[s]); else if ("array" === f) {
          if (o = n[s], o[2]) for (r = i[h], a = 0; a < o[2].length; a++) {
            if (!r.hasOwnProperty(o[2][a])) throw Y('[sprintf] property "%s" does not exist', o[2][a]);
            r = r[o[2][a]];
          } else r = o[1] ? i[o[1]] : i[h++];
          if (/[^s]/.test(o[8]) && "number" != t(r)) throw Y("[sprintf] expecting number but found %s", t(r));
          switch (o[8]) {
           case "b":
            r = r.toString(2);
            break;

           case "c":
            r = String.fromCharCode(r);
            break;

           case "d":
            r = parseInt(r, 10);
            break;

           case "e":
            r = o[7] ? r.toExponential(o[7]) : r.toExponential();
            break;

           case "f":
            r = o[7] ? parseFloat(r).toFixed(o[7]) : parseFloat(r);
            break;

           case "o":
            r = r.toString(8);
            break;

           case "s":
            r = (r = String(r)) && o[7] ? r.substring(0, o[7]) : r;
            break;

           case "u":
            r = Math.abs(r);
            break;

           case "x":
            r = r.toString(16);
            break;

           case "X":
            r = r.toString(16).toUpperCase();
          }
          r = /[def]/.test(o[8]) && o[3] && r >= 0 ? "+" + r : r, u = o[4] ? "0" == o[4] ? "0" : o[4].charAt(1) : " ", 
          c = o[6] - String(r).length, l = o[6] ? e(u, c) : "", d.push(o[5] ? r + l : l + r);
        }
        return d.join("");
      }, n.cache = {}, n.parse = function(t) {
        for (var e = t, n = [], i = [], r = 0; e; ) {
          if (null !== (n = /^[^\x25]+/.exec(e))) i.push(n[0]); else if (null !== (n = /^\x25{2}/.exec(e))) i.push("%"); else {
            if (null === (n = /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(e))) throw "[sprintf] huh?";
            if (n[2]) {
              r |= 1;
              var s = [], a = n[2], o = [];
              if (null === (o = /^([a-z_][a-z_\d]*)/i.exec(a))) throw "[sprintf] huh?";
              for (s.push(o[1]); "" !== (a = a.substring(o[0].length)); ) if (null !== (o = /^\.([a-z_][a-z_\d]*)/i.exec(a))) s.push(o[1]); else {
                if (null === (o = /^\[(\d+)\]/.exec(a))) throw "[sprintf] huh?";
                s.push(o[1]);
              }
              n[2] = s;
            } else r |= 2;
            if (3 === r) throw "[sprintf] mixing positional and named placeholders is not (yet) supported";
            i.push(n);
          }
          e = e.substring(n[0].length);
        }
        return i;
      }, n;
    }(), B = function(t, e) {
      return e.unshift(t), Y.apply(null, e);
    };
    return H("sprintf", function(t, e, n) {
      return n.sprintf ? "[object Array]" === Object.prototype.toString.apply(n.sprintf) ? B(t, n.sprintf) : "object" == typeof n.sprintf ? Y(t, n.sprintf) : t : t;
    }), N.init = r, N.setLng = h, N.preload = s, N.addResourceBundle = a, N.removeResourceBundle = o, 
    N.loadNamespace = u, N.loadNamespaces = c, N.setDefaultNamespace = l, N.t = y, N.translate = y, 
    N.exists = b, N.detectLanguage = R.detectLanguage, N.pluralExtensions = M, N.sync = X, 
    N.functions = R, N.lng = p, N.addPostProcessor = H, N.options = j, N;
  }), n("i18n", [ "i18next" ], function(t) {
    var e, n = {}, i = t.functions, r = t.options;
    return e = {
      version: "0.4.0",
      pluginBuilder: "./vendor/require-i18next-builder",
      resourceExists: function(t, e, i) {
        return n[t] && n[t][e] && n[t][e][i];
      },
      addResource: function(t, e, i, r) {
        n[t] = n[t] || {}, n[t][e] = n[t][e] || {}, n[t][e][i] = r;
      },
      getResources: function(t, e) {
        var r = {};
        return i.each(n, function(s) {
          n[s][t] && n[s][t][e] && i.extend(r, n[s][t][e]);
        }), r;
      },
      parseName: function(t) {
        var e = t.split(":");
        return {
          module: e[0],
          namespaces: e[1] ? e[1].split(",") : []
        };
      },
      load: function(n, s, a, o) {
        var l = e.parseName(n), u = i.extend({}, o.i18next), c = l.namespaces, h = l.module, p = u.supportedLngs;
        p && p[h] && (p = p[h]), "string" == typeof r.ns ? (c.unshift(u.ns || r.ns), u.ns = {
          defaultNs: c[0],
          namespaces: c
        }) : (u.ns = r.ns, i.each(c, function(t, e) {
          -1 == u.ns.namespaces.indexOf(e) && u.ns.namespaces.push(e);
        })), u.customLoad = function(t, n, r, s) {
          if (e.resourceExists(h, t, n)) return s(null, e.getResources(t, n)), void 0;
          if (p && (!p[t] || -1 == p[t].indexOf(n))) return i.log("no locale support found for " + t + " with namespace " + n), 
          s(null, {}), void 0;
          var a = i.applyReplacement(r.resGetPath, {
            lng: t,
            ns: n
          });
          i.ajax({
            url: a,
            dataType: "json",
            async: r.async,
            success: function(r) {
              e.addResource(h, t, n, r), i.log("loaded: " + a), s(null, e.getResources(t, n));
            },
            error: function(t, e, n) {
              i.log("failed loading: " + a), s(n, {});
            }
          });
        }, delete u.supportedLngs, t.init(u, function() {
          a(t);
        });
      }
    };
  }), n("i18next-init", [ "i18next" ], function(t) {
    return t.init({
      getAsync: !1,
      ns: "gameads",
      resGetPath: "locale/__lng__/__ns__.json",
      fallbackLng: "en",
      resStore: {
        en: {
          gameads: {
            locale: "en",
            "Watch now!": "Watch now!",
            "No campaigns available, try again later": "No campaigns available, try again later",
            "Watch a game trailer, get": "Watch a game trailer, get",
            Buffering: "Buffering",
            Loading: "Loading",
            "Unknown error": "Unknown error",
            "Video playback error": "Video playback error",
            Ratings: "Ratings",
            "Download For Free": "Download For Free",
            "Downloading won't stop your gaming": "Downloading won't stop your gaming"
          }
        },
        es: {
          gameads: {
            locale: "es",
            "Watch now!": "¡Ver ahora!",
            "No campaigns available, try again later": "No hay campañas disponibles, inténtalo más tarde.",
            "Watch a game trailer, get": "Ve un tráiler de un videojuego y obtén",
            Buffering: "Buffering",
            Loading: "Cargando",
            "Unknown error": "Error desconocido",
            "Video playback error": "Error de reproducción de video",
            Ratings: "Valoraciones",
            "Download For Free": "Descarga Gratis",
            "Downloading won't stop your gaming": "Descargar no interrumpirá tu sesión de juego."
          }
        },
        fi: {
          gameads: {
            locale: "fi",
            "Watch now!": "Katso nyt!",
            "No campaigns available, try again later": "Ei mainoksia, yritä myöhemmin uudelleen",
            "Watch a game trailer, get": "Katso pelin video, niin saat",
            Buffering: "Puskuroidaan",
            Loading: "Ladataan",
            "Unknown error": "Tuntematon virhe",
            "Video playback error": "Virhe videon toistossa",
            Ratings: "Arvostelua",
            "Download For Free": "Lataa ilmaiseksi",
            "Downloading won't stop your gaming": "Lataaminen ei keskeytä peliäsi"
          }
        },
        fr: {
          gameads: {
            locale: "fr",
            "Watch now!": "Regarder maintenant!",
            "No campaigns available, try again later": "Pas de campagnes disponibles, veuillez réessayer plus tard",
            "Watch a game trailer, get": "Regarder la bande-annonce du jeu",
            Buffering: "Mise en mémoire tampon",
            Loading: "Chargement",
            "Unknown error": "Erreur inconnue",
            "Video playback error": "Erreur lors du chargement de la vidéo",
            Ratings: "Evaluations",
            "Download For Free": "Téléchargement gratuit",
            "Downloading won't stop your gaming": "Continuez a jouer pendant le téléchargement"
          }
        },
        it: {
          gameads: {
            locale: "it",
            "Watch now!": "Guarda ora!",
            "No campaigns available, try again later": "Nessuna campagna disponibile, prova più tardi",
            "Watch a game trailer, get": "Guarda il trailer di un gioco, guarda",
            Buffering: "Buffering",
            Loading: "Caricamento",
            "Unknown error": "Errore sconosciuto",
            "Video playback error": "Errore di riproduzione del video",
            Ratings: "Valutazioni",
            "Download For Free": "Scarica gratis",
            "Downloading won't stop your gaming": "Il download non interromperà il gioco"
          }
        },
        ja: {
          gameads: {
            locale: "ja",
            "Watch now!": "今すぐ見る！",
            "No campaigns available, try again later": "広告がありません、また後でお願いします",
            "Watch a game trailer, get": "ビデオを見てゲームをダウンロード",
            Buffering: "バッファリング中",
            Loading: "ローディング中",
            "Unknown error": "未知のエラー",
            "Video playback error": "ビデオ再生エラー",
            Ratings: "レーティング",
            "Download For Free": '無料<wbr><span style="white-space:nowrap">ダウンロード</span>',
            "Downloading won't stop your gaming": 'このダウンロードで<wbr><span style="white-space:nowrap">ゲームは中断されません</span>'
          }
        },
        ko: {
          gameads: {
            locale: "ko",
            "Watch now!": "지금 보기",
            "No campaigns available, try again later": "지금 광고가 없습니다. 다음에 시도하세요",
            "Watch a game trailer, get": "게임 트레일러를 보고 다음 보상을 받으세요.",
            Buffering: "버퍼링",
            Loading: "로딩 중",
            "Unknown error": "알 수 없는 오류",
            "Video playback error": "동영상 재생 오류",
            Ratings: "평가",
            "Download For Free": "무료 다운로드",
            "Downloading won't stop your gaming": "다운로드 중에도 계속 게임할 수 있습니다"
          }
        },
        ru: {
          gameads: {
            locale: "ru",
            "Watch now!": "Посмотреть сеичас!",
            "No campaigns available, try again later": "Нет рекламы, пожалуйста, повторите попытку позже",
            "Watch a game trailer, get": "Посмотрите трайлер игры и получите",
            Buffering: "Буферизация",
            Loading: "загрузка",
            "Unknown error": "Неизвестная ошибка",
            "Video playback error": "Ошибка воспроизведение видео",
            Ratings: "Рейтинги",
            "Download For Free": "Скачать бесплатно",
            "Downloading won't stop your gaming": "загрузка не остановит вашу игру"
          }
        },
        "zh-CN": {
          gameads: {
            locale: "zh-CN",
            "Watch now!": "开始播放",
            "No campaigns available, try again later": "没有可播视频，请稍后再试",
            "Watch a game trailer, get": "观看视频，获得",
            Buffering: "正在缓冲",
            Loading: "加载中",
            "Unknown error": "未知错误",
            "Video playback error": "视频播放出错",
            Ratings: "评分",
            "Download For Free": "免费下载",
            "Downloading won't stop your gaming": "点击下载不会中断当前游戏"
          }
        },
        "zh-TW": {
          gameads: {
            locale: "zh-TW",
            "Watch now!": "馬上觀看！",
            "No campaigns available, try again later": "沒有可用視頻，請稍後再試",
            "Watch a game trailer, get": "看視頻，獲取",
            Buffering: "正在緩衝",
            Loading: "讀取中",
            "Unknown error": "未知錯誤",
            "Video playback error": "視頻播放出錯",
            Ratings: "評分",
            "Download For Free": "免費下載",
            "Downloading won't stop your gaming": "下載不會中斷當前遊戲"
          }
        }
      }
    }), t;
  }), n("i18n!", [ "i18next-init" ], function(t) {
    return t;
  }), n("controllers/native", [ "zepto", "underscore", "backbone", "collections/campaigns", "collections/zones", "collections/items", "models/campaign", "models/zone", "models/item", "models/properties", "i18n!" ], function(t, e, n, i, r, s, a, o, l, u, c) {
    return console.log(c.t("locale")), function() {
      this.campaigns = null, this.zones = null, this.item = null, this.items = null, this.properties = null, 
      this.init = function(t) {
        this.campaigns = new i(t.campaignData.data.campaigns, {
          parse: !0
        }), this.campaigns.forEach(function(t) {
          t.set("completed", !1);
        }), "zones" in t.campaignData.data && t.campaignData.data.zones && (this.zones = new r(t.campaignData.data.zones)), 
        "item" in t.campaignData.data && t.campaignData.data.item && (this.item = new l(t.campaignData.data.item)), 
        "items" in t.campaignData.data && t.campaignData.data.items && (this.items = new s(t.campaignData.data.items)), 
        delete t.campaignData.data.campaigns, delete t.campaignData.data.zones, delete t.campaignData.data.item, 
        delete t.campaignData.data.items;
        var a = t.campaignData.data;
        delete t.campaignData, this.properties = new u(e.extend(t, a), {
          parse: !0
        });
        var o = new RegExp([ "cn", "it", "jp", "ru", "tw", "fr", "kr", "fi" ].join("|"), "i");
        return this.properties.get("country").match(o) || c.setLng("en"), this._send = "android" === this.properties.get("platform") && "applifierimpactnative" in window && window.applifierimpactnative.handleWebEvent ? this._sendAndroid : "android" === this.properties.get("platform") && "unityadsnativebridge" in window && window.unityadsnativebridge.handleWebEvent ? this._sendAndroidNew : "ios" === this.properties.get("platform") && this.properties.get("sdkVersion") >= 1300 ? this._sendIosNew : this._sendIos, 
        this.campaigns.length ? (n.trigger("init", t), this._send("initComplete"), "true") : "false";
      }, this.setView = function(t, e) {
        return n.trigger("setView", t, e), "true";
      }, this.handleNativeEvent = function(t, e) {
        return n.trigger(t, e), "true";
      }, this.playVideo = function(t, e) {
        n.trigger("playVideo", t, e), this._send("playVideo", {
          campaignId: t.get("id"),
          rewatch: e || !1
        });
      }, this.appStore = function(t, e, n) {
        var i = this.properties.get("deviceType").match(/android/i), r = "ipad" === this.properties.get("deviceType"), s = this.properties.get("iOSVersion") >= 8;
        this.properties.get("sdkVersion") < 1404 && !i && s && !r && (n = !0), this._send("appStore", {
          clickUrl: t,
          iTunesId: e,
          bypassAppSheet: n || !1
        });
      }, this.close = function(t) {
        this._send("close", {
          view: t
        });
      }, this._sendAndroid = function(t, e) {
        console.log(window.applifierimpactnative.handleWebEvent(t, JSON.stringify({
          data: e || {}
        })));
      }, this._sendAndroidNew = function(t, e) {
        console.log(window.unityadsnativebridge.handleWebEvent(t, JSON.stringify({
          data: e || {}
        })));
      }, this._sendIosNew = function(e, n) {
        t.post("http://nativebridge.unityads.unity3d.com/", JSON.stringify({
          type: e,
          data: n || {}
        }), function(t) {
          console.log(t);
        });
      }, this._sendIos = function(e, n) {
        t.post("http://client.impact.applifier.com/", JSON.stringify({
          type: e,
          data: n || {}
        }), function(t) {
          console.log(t);
        });
      };
    };
  }), n("controllers/events", [ "backbone", "zepto", "event_tracking" ], function(t, e, n) {
    return function(i) {
      var r = "https://log.applifier.com/impact";
      t.on("open", function(t) {
        var n = {
          applicationId: i.properties.get("gameId"),
          tid: i.properties.get("gamerId"),
          type: "open",
          view: "none",
          ab_group: i.properties.get("ab_group"),
          campaigns: t.pluck("id")
        }, s = i.properties.get("zone");
        s && (n.zone = s), console.log("Sending open event for parameters: " + n.applicationId + ", " + n.tid + ", " + n.campaigns.join(", ") + (n.zone ? ", " + n.zone : "")), 
        e.post(r, n);
      }), t.on("scroll", function(t) {
        try {
          var n = {
            applicationId: i.properties.get("gameId"),
            tid: i.properties.get("gamerId"),
            type: "scroll",
            view: "offer",
            ab_group: i.properties.get("ab_group"),
            campaign: t.get("id")
          }, s = i.properties.get("zone");
          s && (n.zone = s), console.log("Sending scroll event for parameters: " + n.applicationId + ", " + n.tid + ", " + n.campaign + (n.zone ? ", " + n.zone : "")), 
          e.post(r, n);
        } catch (a) {}
      }), t.on("click", function(t) {
        var n = {
          applicationId: i.properties.get("gameId"),
          tid: i.properties.get("gamerId"),
          type: "click",
          view: "mobile",
          ab_group: i.properties.get("ab_group"),
          campaign: t.get("id")
        }, s = i.properties.get("zone");
        s && (n.zone = s), console.log("Sending click event for parameters: " + n.applicationId + ", " + n.tid + ", " + n.campaign + (n.zone ? ", " + n.zone : "")), 
        e.post(r, n);
      }), t.on("close", function(t) {
        var n = {
          applicationId: i.properties.get("gameId"),
          tid: i.properties.get("gamerId"),
          type: "close",
          ab_group: i.properties.get("ab_group"),
          view: t
        }, s = i.properties.get("zone");
        s && (n.zone = s), console.log("Sending close event for parameters: " + n.applicationId + ", " + n.tid + ", " + n.view + (n.zone ? ", " + n.zone : "")), 
        e.post(r, n);
      }), t.on("googleAnalyticsEvent", function(t) {
        n.parseAndTrackEvents(t.events);
      }), t.on("reset:impact", function() {
        t.off("googleAnalyticsEvent"), t.off("close"), t.off("click"), t.off("open"), t.off("scroll");
      });
    };
  }), function(t, e, n) {
    function i(t, n) {
      this.wrapper = "string" == typeof t ? e.querySelector(t) : t, this.scroller = this.wrapper.children[0], 
      this.scrollerStyle = this.scroller.style, this.options = {
        resizeScrollbars: !0,
        mouseWheelSpeed: 20,
        snapThreshold: .334,
        startX: 0,
        startY: 0,
        scrollY: !0,
        directionLockThreshold: 5,
        momentum: !0,
        bounce: !0,
        bounceTime: 600,
        bounceEasing: "",
        preventDefault: !0,
        preventDefaultException: {
          tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/
        },
        HWCompositing: !0,
        useTransition: !0,
        useTransform: !0
      };
      for (var i in n) this.options[i] = n[i];
      this.translateZ = this.options.HWCompositing && o.hasPerspective ? " translateZ(0)" : "", 
      this.options.useTransition = o.hasTransition && this.options.useTransition, this.options.useTransform = o.hasTransform && this.options.useTransform, 
      this.options.eventPassthrough = this.options.eventPassthrough === !0 ? "vertical" : this.options.eventPassthrough, 
      this.options.preventDefault = !this.options.eventPassthrough && this.options.preventDefault, 
      this.options.scrollY = "vertical" == this.options.eventPassthrough ? !1 : this.options.scrollY, 
      this.options.scrollX = "horizontal" == this.options.eventPassthrough ? !1 : this.options.scrollX, 
      this.options.freeScroll = this.options.freeScroll && !this.options.eventPassthrough, 
      this.options.directionLockThreshold = this.options.eventPassthrough ? 0 : this.options.directionLockThreshold, 
      this.options.bounceEasing = "string" == typeof this.options.bounceEasing ? o.ease[this.options.bounceEasing] || o.ease.circular : this.options.bounceEasing, 
      this.options.resizePolling = void 0 === this.options.resizePolling ? 60 : this.options.resizePolling, 
      this.options.tap === !0 && (this.options.tap = "tap"), "scale" == this.options.shrinkScrollbars && (this.options.useTransition = !1), 
      this.options.invertWheelDirection = this.options.invertWheelDirection ? -1 : 1, 
      this.x = 0, this.y = 0, this.directionX = 0, this.directionY = 0, this._events = {}, 
      this._init(), this.refresh(), this.scrollTo(this.options.startX, this.options.startY), 
      this.enable();
    }
    function r(t, n, i) {
      var r = e.createElement("div"), s = e.createElement("div");
      return i === !0 && (r.style.cssText = "position:absolute;z-index:9999", s.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px"), 
      s.className = "iScrollIndicator", "h" == t ? (i === !0 && (r.style.cssText += ";height:7px;left:2px;right:2px;bottom:0", 
      s.style.height = "100%"), r.className = "iScrollHorizontalScrollbar") : (i === !0 && (r.style.cssText += ";width:7px;bottom:2px;top:2px;right:1px", 
      s.style.width = "100%"), r.className = "iScrollVerticalScrollbar"), r.style.cssText += ";overflow:hidden", 
      n || (r.style.pointerEvents = "none"), r.appendChild(s), r;
    }
    function s(n, i) {
      this.wrapper = "string" == typeof i.el ? e.querySelector(i.el) : i.el, this.wrapperStyle = this.wrapper.style, 
      this.indicator = this.wrapper.children[0], this.indicatorStyle = this.indicator.style, 
      this.scroller = n, this.options = {
        listenX: !0,
        listenY: !0,
        interactive: !1,
        resize: !0,
        defaultScrollbars: !1,
        shrink: !1,
        fade: !1,
        speedRatioX: 0,
        speedRatioY: 0
      };
      for (var r in i) this.options[r] = i[r];
      this.sizeRatioX = 1, this.sizeRatioY = 1, this.maxPosX = 0, this.maxPosY = 0, this.options.interactive && (this.options.disableTouch || (o.addEvent(this.indicator, "touchstart", this), 
      o.addEvent(t, "touchend", this)), this.options.disablePointer || (o.addEvent(this.indicator, "MSPointerDown", this), 
      o.addEvent(t, "MSPointerUp", this)), this.options.disableMouse || (o.addEvent(this.indicator, "mousedown", this), 
      o.addEvent(t, "mouseup", this))), this.options.fade && (this.wrapperStyle[o.style.transform] = this.scroller.translateZ, 
      this.wrapperStyle[o.style.transitionDuration] = o.isBadAndroid ? "0.001s" : "0ms", 
      this.wrapperStyle.opacity = "0");
    }
    var a = t.requestAnimationFrame || t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || t.oRequestAnimationFrame || t.msRequestAnimationFrame || function(e) {
      t.setTimeout(e, 1e3 / 60);
    }, o = function() {
      function i(t) {
        return a === !1 ? !1 : "" === a ? t : a + t.charAt(0).toUpperCase() + t.substr(1);
      }
      var r = {}, s = e.createElement("div").style, a = function() {
        for (var t, e = [ "t", "webkitT", "MozT", "msT", "OT" ], n = 0, i = e.length; i > n; n++) if (t = e[n] + "ransform", 
        t in s) return e[n].substr(0, e[n].length - 1);
        return !1;
      }();
      r.getTime = Date.now || function() {
        return new Date().getTime();
      }, r.extend = function(t, e) {
        for (var n in e) t[n] = e[n];
      }, r.addEvent = function(t, e, n, i) {
        t.addEventListener(e, n, !!i);
      }, r.removeEvent = function(t, e, n, i) {
        t.removeEventListener(e, n, !!i);
      }, r.momentum = function(t, e, i, r, s, a) {
        var o, l, u = t - e, c = n.abs(u) / i;
        return a = void 0 === a ? 6e-4 : a, o = t + c * c / (2 * a) * (0 > u ? -1 : 1), 
        l = c / a, r > o ? (o = s ? r - s / 2.5 * (c / 8) : r, u = n.abs(o - t), l = u / c) : o > 0 && (o = s ? s / 2.5 * (c / 8) : 0, 
        u = n.abs(t) + o, l = u / c), {
          destination: n.round(o),
          duration: l
        };
      };
      var o = i("transform");
      return r.extend(r, {
        hasTransform: o !== !1,
        hasPerspective: i("perspective") in s,
        hasTouch: "ontouchstart" in t,
        hasPointer: navigator.msPointerEnabled,
        hasTransition: i("transition") in s
      }), r.isBadAndroid = /Android /.test(t.navigator.appVersion) && !/Chrome\/\d/.test(t.navigator.appVersion), 
      r.extend(r.style = {}, {
        transform: o,
        transitionTimingFunction: i("transitionTimingFunction"),
        transitionDuration: i("transitionDuration"),
        transitionDelay: i("transitionDelay"),
        transformOrigin: i("transformOrigin")
      }), r.hasClass = function(t, e) {
        var n = new RegExp("(^|\\s)" + e + "(\\s|$)");
        return n.test(t.className);
      }, r.addClass = function(t, e) {
        if (!r.hasClass(t, e)) {
          var n = t.className.split(" ");
          n.push(e), t.className = n.join(" ");
        }
      }, r.removeClass = function(t, e) {
        if (r.hasClass(t, e)) {
          var n = new RegExp("(^|\\s)" + e + "(\\s|$)", "g");
          t.className = t.className.replace(n, " ");
        }
      }, r.offset = function(t) {
        for (var e = -t.offsetLeft, n = -t.offsetTop; t = t.offsetParent; ) e -= t.offsetLeft, 
        n -= t.offsetTop;
        return {
          left: e,
          top: n
        };
      }, r.preventDefaultException = function(t, e) {
        for (var n in e) if (e[n].test(t[n])) return !0;
        return !1;
      }, r.extend(r.eventType = {}, {
        touchstart: 1,
        touchmove: 1,
        touchend: 1,
        mousedown: 2,
        mousemove: 2,
        mouseup: 2,
        MSPointerDown: 3,
        MSPointerMove: 3,
        MSPointerUp: 3
      }), r.extend(r.ease = {}, {
        quadratic: {
          style: "cubic-bezier(0.25, 0.46, 0.45, 0.94)",
          fn: function(t) {
            return t * (2 - t);
          }
        },
        circular: {
          style: "cubic-bezier(0.1, 0.57, 0.1, 1)",
          fn: function(t) {
            return n.sqrt(1 - --t * t);
          }
        },
        back: {
          style: "cubic-bezier(0.175, 0.885, 0.32, 1.275)",
          fn: function(t) {
            var e = 4;
            return (t -= 1) * t * ((e + 1) * t + e) + 1;
          }
        },
        bounce: {
          style: "",
          fn: function(t) {
            return (t /= 1) < 1 / 2.75 ? 7.5625 * t * t : 2 / 2.75 > t ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : 2.5 / 2.75 > t ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;
          }
        },
        elastic: {
          style: "",
          fn: function(t) {
            var e = .22, i = .4;
            return 0 === t ? 0 : 1 == t ? 1 : i * n.pow(2, -10 * t) * n.sin((t - e / 4) * 2 * n.PI / e) + 1;
          }
        }
      }), r.tap = function(t, n) {
        var i = e.createEvent("Event");
        i.initEvent(n, !0, !0), i.pageX = t.pageX, i.pageY = t.pageY, t.target.dispatchEvent(i);
      }, r.click = function(t) {
        var n, i = t.target;
        /(SELECT|INPUT|TEXTAREA)/i.test(i.tagName) || (n = e.createEvent("MouseEvents"), 
        n.initMouseEvent("click", !0, !0, t.view, 1, i.screenX, i.screenY, i.clientX, i.clientY, t.ctrlKey, t.altKey, t.shiftKey, t.metaKey, 0, null), 
        n._constructed = !0, i.dispatchEvent(n));
      }, r;
    }();
    i.prototype = {
      version: "5.1.1",
      _init: function() {
        this._initEvents(), (this.options.scrollbars || this.options.indicators) && this._initIndicators(), 
        this.options.mouseWheel && this._initWheel(), this.options.snap && this._initSnap(), 
        this.options.keyBindings && this._initKeys();
      },
      destroy: function() {
        this._initEvents(!0), this._execEvent("destroy");
      },
      _transitionEnd: function(t) {
        t.target == this.scroller && this.isInTransition && (this._transitionTime(), this.resetPosition(this.options.bounceTime) || (this.isInTransition = !1, 
        this._execEvent("scrollEnd")));
      },
      _start: function(t) {
        if (!(1 != o.eventType[t.type] && 0 !== t.button || !this.enabled || this.initiated && o.eventType[t.type] !== this.initiated)) {
          !this.options.preventDefault || o.isBadAndroid || o.preventDefaultException(t.target, this.options.preventDefaultException) || t.preventDefault();
          var e, i = t.touches ? t.touches[0] : t;
          this.initiated = o.eventType[t.type], this.moved = !1, this.distX = 0, this.distY = 0, 
          this.directionX = 0, this.directionY = 0, this.directionLocked = 0, this._transitionTime(), 
          this.startTime = o.getTime(), this.options.useTransition && this.isInTransition ? (this.isInTransition = !1, 
          e = this.getComputedPosition(), this._translate(n.round(e.x), n.round(e.y)), this._execEvent("scrollEnd")) : !this.options.useTransition && this.isAnimating && (this.isAnimating = !1, 
          this._execEvent("scrollEnd")), this.startX = this.x, this.startY = this.y, this.absStartX = this.x, 
          this.absStartY = this.y, this.pointX = i.pageX, this.pointY = i.pageY, this._execEvent("beforeScrollStart");
        }
      },
      _move: function(t) {
        if (this.enabled && o.eventType[t.type] === this.initiated) {
          this.options.preventDefault && t.preventDefault();
          var e, i, r, s, a = t.touches ? t.touches[0] : t, l = a.pageX - this.pointX, u = a.pageY - this.pointY, c = o.getTime();
          if (this.pointX = a.pageX, this.pointY = a.pageY, this.distX += l, this.distY += u, 
          r = n.abs(this.distX), s = n.abs(this.distY), !(c - this.endTime > 300 && 10 > r && 10 > s)) {
            if (this.directionLocked || this.options.freeScroll || (this.directionLocked = r > s + this.options.directionLockThreshold ? "h" : s >= r + this.options.directionLockThreshold ? "v" : "n"), 
            "h" == this.directionLocked) {
              if ("vertical" == this.options.eventPassthrough) t.preventDefault(); else if ("horizontal" == this.options.eventPassthrough) return this.initiated = !1, 
              void 0;
              u = 0;
            } else if ("v" == this.directionLocked) {
              if ("horizontal" == this.options.eventPassthrough) t.preventDefault(); else if ("vertical" == this.options.eventPassthrough) return this.initiated = !1, 
              void 0;
              l = 0;
            }
            l = this.hasHorizontalScroll ? l : 0, u = this.hasVerticalScroll ? u : 0, e = this.x + l, 
            i = this.y + u, (e > 0 || e < this.maxScrollX) && (e = this.options.bounce ? this.x + l / 3 : e > 0 ? 0 : this.maxScrollX), 
            (i > 0 || i < this.maxScrollY) && (i = this.options.bounce ? this.y + u / 3 : i > 0 ? 0 : this.maxScrollY), 
            this.directionX = l > 0 ? -1 : 0 > l ? 1 : 0, this.directionY = u > 0 ? -1 : 0 > u ? 1 : 0, 
            this.moved || this._execEvent("scrollStart"), this.moved = !0, this._translate(e, i), 
            c - this.startTime > 300 && (this.startTime = c, this.startX = this.x, this.startY = this.y);
          }
        }
      },
      _end: function(t) {
        if (this.enabled && o.eventType[t.type] === this.initiated) {
          this.options.preventDefault && !o.preventDefaultException(t.target, this.options.preventDefaultException) && t.preventDefault();
          var e, i, r = (t.changedTouches ? t.changedTouches[0] : t, o.getTime() - this.startTime), s = n.round(this.x), a = n.round(this.y), l = n.abs(s - this.startX), u = n.abs(a - this.startY), c = 0, h = "";
          if (this.isInTransition = 0, this.initiated = 0, this.endTime = o.getTime(), !this.resetPosition(this.options.bounceTime)) {
            if (this.scrollTo(s, a), !this.moved) return this.options.tap && o.tap(t, this.options.tap), 
            this.options.click && o.click(t), this._execEvent("scrollCancel"), void 0;
            if (this._events.flick && 200 > r && 100 > l && 100 > u) return this._execEvent("flick"), 
            void 0;
            if (this.options.momentum && 300 > r && (e = this.hasHorizontalScroll ? o.momentum(this.x, this.startX, r, this.maxScrollX, this.options.bounce ? this.wrapperWidth : 0, this.options.deceleration) : {
              destination: s,
              duration: 0
            }, i = this.hasVerticalScroll ? o.momentum(this.y, this.startY, r, this.maxScrollY, this.options.bounce ? this.wrapperHeight : 0, this.options.deceleration) : {
              destination: a,
              duration: 0
            }, s = e.destination, a = i.destination, c = n.max(e.duration, i.duration), this.isInTransition = 1), 
            this.options.snap) {
              var p = this._nearestSnap(s, a);
              this.currentPage = p, c = this.options.snapSpeed || n.max(n.max(n.min(n.abs(s - p.x), 1e3), n.min(n.abs(a - p.y), 1e3)), 300), 
              s = p.x, a = p.y, this.directionX = 0, this.directionY = 0, h = this.options.bounceEasing;
            }
            return s != this.x || a != this.y ? ((s > 0 || s < this.maxScrollX || a > 0 || a < this.maxScrollY) && (h = o.ease.quadratic), 
            this.scrollTo(s, a, c, h), void 0) : (this._execEvent("scrollEnd"), void 0);
          }
        }
      },
      _resize: function() {
        var t = this;
        clearTimeout(this.resizeTimeout), this.resizeTimeout = setTimeout(function() {
          t.refresh();
        }, this.options.resizePolling);
      },
      resetPosition: function(t) {
        var e = this.x, n = this.y;
        return t = t || 0, !this.hasHorizontalScroll || this.x > 0 ? e = 0 : this.x < this.maxScrollX && (e = this.maxScrollX), 
        !this.hasVerticalScroll || this.y > 0 ? n = 0 : this.y < this.maxScrollY && (n = this.maxScrollY), 
        e == this.x && n == this.y ? !1 : (this.scrollTo(e, n, t, this.options.bounceEasing), 
        !0);
      },
      disable: function() {
        this.enabled = !1;
      },
      enable: function() {
        this.enabled = !0;
      },
      refresh: function() {
        this.wrapper.offsetHeight, this.wrapperWidth = this.wrapper.clientWidth, this.wrapperHeight = this.wrapper.clientHeight, 
        this.scrollerWidth = this.scroller.offsetWidth, this.scrollerHeight = this.scroller.offsetHeight, 
        this.maxScrollX = this.wrapperWidth - this.scrollerWidth, this.maxScrollY = this.wrapperHeight - this.scrollerHeight, 
        this.hasHorizontalScroll = this.options.scrollX && this.maxScrollX < 0, this.hasVerticalScroll = this.options.scrollY && this.maxScrollY < 0, 
        this.hasHorizontalScroll || (this.maxScrollX = 0, this.scrollerWidth = this.wrapperWidth), 
        this.hasVerticalScroll || (this.maxScrollY = 0, this.scrollerHeight = this.wrapperHeight), 
        this.endTime = 0, this.directionX = 0, this.directionY = 0, this.wrapperOffset = o.offset(this.wrapper), 
        this._execEvent("refresh"), this.resetPosition();
      },
      on: function(t, e) {
        this._events[t] || (this._events[t] = []), this._events[t].push(e);
      },
      off: function(t, e) {
        if (this._events[t]) {
          var n = this._events[t].indexOf(e);
          n > -1 && this._events[t].splice(n, 1);
        }
      },
      _execEvent: function(t) {
        if (this._events[t]) {
          var e = 0, n = this._events[t].length;
          if (n) for (;n > e; e++) this._events[t][e].apply(this, [].slice.call(arguments, 1));
        }
      },
      scrollBy: function(t, e, n, i) {
        t = this.x + t, e = this.y + e, n = n || 0, this.scrollTo(t, e, n, i);
      },
      scrollTo: function(t, e, n, i) {
        i = i || o.ease.circular, this.isInTransition = this.options.useTransition && n > 0, 
        !n || this.options.useTransition && i.style ? (this._transitionTimingFunction(i.style), 
        this._transitionTime(n), this._translate(t, e)) : this._animate(t, e, n, i.fn);
      },
      scrollToElement: function(t, e, i, r, s) {
        if (t = t.nodeType ? t : this.scroller.querySelector(t)) {
          var a = o.offset(t);
          a.left -= this.wrapperOffset.left, a.top -= this.wrapperOffset.top, i === !0 && (i = n.round(t.offsetWidth / 2 - this.wrapper.offsetWidth / 2)), 
          r === !0 && (r = n.round(t.offsetHeight / 2 - this.wrapper.offsetHeight / 2)), a.left -= i || 0, 
          a.top -= r || 0, a.left = a.left > 0 ? 0 : a.left < this.maxScrollX ? this.maxScrollX : a.left, 
          a.top = a.top > 0 ? 0 : a.top < this.maxScrollY ? this.maxScrollY : a.top, e = void 0 === e || null === e || "auto" === e ? n.max(n.abs(this.x - a.left), n.abs(this.y - a.top)) : e, 
          this.scrollTo(a.left, a.top, e, s);
        }
      },
      _transitionTime: function(t) {
        if (t = t || 0, this.scrollerStyle[o.style.transitionDuration] = t + "ms", !t && o.isBadAndroid && (this.scrollerStyle[o.style.transitionDuration] = "0.001s"), 
        this.indicators) for (var e = this.indicators.length; e--; ) this.indicators[e].transitionTime(t);
      },
      _transitionTimingFunction: function(t) {
        if (this.scrollerStyle[o.style.transitionTimingFunction] = t, this.indicators) for (var e = this.indicators.length; e--; ) this.indicators[e].transitionTimingFunction(t);
      },
      _translate: function(t, e) {
        if (this.options.useTransform ? this.scrollerStyle[o.style.transform] = "translate(" + t + "px," + e + "px)" + this.translateZ : (t = n.round(t), 
        e = n.round(e), this.scrollerStyle.left = t + "px", this.scrollerStyle.top = e + "px"), 
        this.x = t, this.y = e, this.indicators) for (var i = this.indicators.length; i--; ) this.indicators[i].updatePosition();
      },
      _initEvents: function(e) {
        var n = e ? o.removeEvent : o.addEvent, i = this.options.bindToWrapper ? this.wrapper : t;
        n(t, "orientationchange", this), n(t, "resize", this), this.options.click && n(this.wrapper, "click", this, !0), 
        this.options.disableMouse || (n(this.wrapper, "mousedown", this), n(i, "mousemove", this), 
        n(i, "mousecancel", this), n(i, "mouseup", this)), o.hasPointer && !this.options.disablePointer && (n(this.wrapper, "MSPointerDown", this), 
        n(i, "MSPointerMove", this), n(i, "MSPointerCancel", this), n(i, "MSPointerUp", this)), 
        o.hasTouch && !this.options.disableTouch && (n(this.wrapper, "touchstart", this), 
        n(i, "touchmove", this), n(i, "touchcancel", this), n(i, "touchend", this)), n(this.scroller, "transitionend", this), 
        n(this.scroller, "webkitTransitionEnd", this), n(this.scroller, "oTransitionEnd", this), 
        n(this.scroller, "MSTransitionEnd", this);
      },
      getComputedPosition: function() {
        var e, n, i = t.getComputedStyle(this.scroller, null);
        return this.options.useTransform ? (i = i[o.style.transform].split(")")[0].split(", "), 
        e = +(i[12] || i[4]), n = +(i[13] || i[5])) : (e = +i.left.replace(/[^-\d.]/g, ""), 
        n = +i.top.replace(/[^-\d.]/g, "")), {
          x: e,
          y: n
        };
      },
      _initIndicators: function() {
        function t(t) {
          for (var e = o.indicators.length; e--; ) t.call(o.indicators[e]);
        }
        var e, n = this.options.interactiveScrollbars, i = "string" != typeof this.options.scrollbars, a = [], o = this;
        this.indicators = [], this.options.scrollbars && (this.options.scrollY && (e = {
          el: r("v", n, this.options.scrollbars),
          interactive: n,
          defaultScrollbars: !0,
          customStyle: i,
          resize: this.options.resizeScrollbars,
          shrink: this.options.shrinkScrollbars,
          fade: this.options.fadeScrollbars,
          listenX: !1
        }, this.wrapper.appendChild(e.el), a.push(e)), this.options.scrollX && (e = {
          el: r("h", n, this.options.scrollbars),
          interactive: n,
          defaultScrollbars: !0,
          customStyle: i,
          resize: this.options.resizeScrollbars,
          shrink: this.options.shrinkScrollbars,
          fade: this.options.fadeScrollbars,
          listenY: !1
        }, this.wrapper.appendChild(e.el), a.push(e))), this.options.indicators && (a = a.concat(this.options.indicators));
        for (var l = a.length; l--; ) this.indicators.push(new s(this, a[l]));
        this.options.fadeScrollbars && (this.on("scrollEnd", function() {
          t(function() {
            this.fade();
          });
        }), this.on("scrollCancel", function() {
          t(function() {
            this.fade();
          });
        }), this.on("scrollStart", function() {
          t(function() {
            this.fade(1);
          });
        }), this.on("beforeScrollStart", function() {
          t(function() {
            this.fade(1, !0);
          });
        })), this.on("refresh", function() {
          t(function() {
            this.refresh();
          });
        }), this.on("destroy", function() {
          t(function() {
            this.destroy();
          }), delete this.indicators;
        });
      },
      _initWheel: function() {
        o.addEvent(this.wrapper, "wheel", this), o.addEvent(this.wrapper, "mousewheel", this), 
        o.addEvent(this.wrapper, "DOMMouseScroll", this), this.on("destroy", function() {
          o.removeEvent(this.wrapper, "wheel", this), o.removeEvent(this.wrapper, "mousewheel", this), 
          o.removeEvent(this.wrapper, "DOMMouseScroll", this);
        });
      },
      _wheel: function(t) {
        if (this.enabled) {
          t.preventDefault(), t.stopPropagation();
          var e, i, r, s, a = this;
          if (void 0 === this.wheelTimeout && a._execEvent("scrollStart"), clearTimeout(this.wheelTimeout), 
          this.wheelTimeout = setTimeout(function() {
            a._execEvent("scrollEnd"), a.wheelTimeout = void 0;
          }, 400), "deltaX" in t) e = -t.deltaX, i = -t.deltaY; else if ("wheelDeltaX" in t) e = t.wheelDeltaX / 120 * this.options.mouseWheelSpeed, 
          i = t.wheelDeltaY / 120 * this.options.mouseWheelSpeed; else if ("wheelDelta" in t) e = i = t.wheelDelta / 120 * this.options.mouseWheelSpeed; else {
            if (!("detail" in t)) return;
            e = i = -t.detail / 3 * this.options.mouseWheelSpeed;
          }
          if (e *= this.options.invertWheelDirection, i *= this.options.invertWheelDirection, 
          this.hasVerticalScroll || (e = i, i = 0), this.options.snap) return r = this.currentPage.pageX, 
          s = this.currentPage.pageY, e > 0 ? r-- : 0 > e && r++, i > 0 ? s-- : 0 > i && s++, 
          this.goToPage(r, s), void 0;
          r = this.x + n.round(this.hasHorizontalScroll ? e : 0), s = this.y + n.round(this.hasVerticalScroll ? i : 0), 
          r > 0 ? r = 0 : r < this.maxScrollX && (r = this.maxScrollX), s > 0 ? s = 0 : s < this.maxScrollY && (s = this.maxScrollY), 
          this.scrollTo(r, s, 0);
        }
      },
      _initSnap: function() {
        this.currentPage = {}, "string" == typeof this.options.snap && (this.options.snap = this.scroller.querySelectorAll(this.options.snap)), 
        this.on("refresh", function() {
          var t, e, i, r, s, a, o = 0, l = 0, u = 0, c = this.options.snapStepX || this.wrapperWidth, h = this.options.snapStepY || this.wrapperHeight;
          if (this.pages = [], this.wrapperWidth && this.wrapperHeight && this.scrollerWidth && this.scrollerHeight) {
            if (this.options.snap === !0) for (i = n.round(c / 2), r = n.round(h / 2); u > -this.scrollerWidth; ) {
              for (this.pages[o] = [], t = 0, s = 0; s > -this.scrollerHeight; ) this.pages[o][t] = {
                x: n.max(u, this.maxScrollX),
                y: n.max(s, this.maxScrollY),
                width: c,
                height: h,
                cx: u - i,
                cy: s - r
              }, s -= h, t++;
              u -= c, o++;
            } else for (a = this.options.snap, t = a.length, e = -1; t > o; o++) (0 === o || a[o].offsetLeft <= a[o - 1].offsetLeft) && (l = 0, 
            e++), this.pages[l] || (this.pages[l] = []), u = n.max(-a[o].offsetLeft, this.maxScrollX), 
            s = n.max(-a[o].offsetTop, this.maxScrollY), i = u - n.round(a[o].offsetWidth / 2), 
            r = s - n.round(a[o].offsetHeight / 2), this.pages[l][e] = {
              x: u,
              y: s,
              width: a[o].offsetWidth,
              height: a[o].offsetHeight,
              cx: i,
              cy: r
            }, u > this.maxScrollX && l++;
            this.goToPage(this.currentPage.pageX || 0, this.currentPage.pageY || 0, 0), 0 === this.options.snapThreshold % 1 ? (this.snapThresholdX = this.options.snapThreshold, 
            this.snapThresholdY = this.options.snapThreshold) : (this.snapThresholdX = n.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width * this.options.snapThreshold), 
            this.snapThresholdY = n.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height * this.options.snapThreshold));
          }
        }), this.on("flick", function() {
          var t = this.options.snapSpeed || n.max(n.max(n.min(n.abs(this.x - this.startX), 1e3), n.min(n.abs(this.y - this.startY), 1e3)), 300);
          this.goToPage(this.currentPage.pageX + this.directionX, this.currentPage.pageY + this.directionY, t);
        });
      },
      _nearestSnap: function(t, e) {
        if (!this.pages.length) return {
          x: 0,
          y: 0,
          pageX: 0,
          pageY: 0
        };
        var i = 0, r = this.pages.length, s = 0;
        if (n.abs(t - this.absStartX) < this.snapThresholdX && n.abs(e - this.absStartY) < this.snapThresholdY) return this.currentPage;
        for (t > 0 ? t = 0 : t < this.maxScrollX && (t = this.maxScrollX), e > 0 ? e = 0 : e < this.maxScrollY && (e = this.maxScrollY); r > i; i++) if (t >= this.pages[i][0].cx) {
          t = this.pages[i][0].x;
          break;
        }
        for (r = this.pages[i].length; r > s; s++) if (e >= this.pages[0][s].cy) {
          e = this.pages[0][s].y;
          break;
        }
        return i == this.currentPage.pageX && (i += this.directionX, 0 > i ? i = 0 : i >= this.pages.length && (i = this.pages.length - 1), 
        t = this.pages[i][0].x), s == this.currentPage.pageY && (s += this.directionY, 0 > s ? s = 0 : s >= this.pages[0].length && (s = this.pages[0].length - 1), 
        e = this.pages[0][s].y), {
          x: t,
          y: e,
          pageX: i,
          pageY: s
        };
      },
      goToPage: function(t, e, i, r) {
        r = r || this.options.bounceEasing, t >= this.pages.length ? t = this.pages.length - 1 : 0 > t && (t = 0), 
        e >= this.pages[t].length ? e = this.pages[t].length - 1 : 0 > e && (e = 0);
        var s = this.pages[t][e].x, a = this.pages[t][e].y;
        i = void 0 === i ? this.options.snapSpeed || n.max(n.max(n.min(n.abs(s - this.x), 1e3), n.min(n.abs(a - this.y), 1e3)), 300) : i, 
        this.currentPage = {
          x: s,
          y: a,
          pageX: t,
          pageY: e
        }, this.scrollTo(s, a, i, r);
      },
      next: function(t, e) {
        var n = this.currentPage.pageX, i = this.currentPage.pageY;
        n++, n >= this.pages.length && this.hasVerticalScroll && (n = 0, i++), this.goToPage(n, i, t, e);
      },
      prev: function(t, e) {
        var n = this.currentPage.pageX, i = this.currentPage.pageY;
        n--, 0 > n && this.hasVerticalScroll && (n = 0, i--), this.goToPage(n, i, t, e);
      },
      _initKeys: function() {
        var e, n = {
          pageUp: 33,
          pageDown: 34,
          end: 35,
          home: 36,
          left: 37,
          up: 38,
          right: 39,
          down: 40
        };
        if ("object" == typeof this.options.keyBindings) for (e in this.options.keyBindings) "string" == typeof this.options.keyBindings[e] && (this.options.keyBindings[e] = this.options.keyBindings[e].toUpperCase().charCodeAt(0)); else this.options.keyBindings = {};
        for (e in n) this.options.keyBindings[e] = this.options.keyBindings[e] || n[e];
        o.addEvent(t, "keydown", this), this.on("destroy", function() {
          o.removeEvent(t, "keydown", this);
        });
      },
      _key: function(t) {
        if (this.enabled) {
          var e, i = this.options.snap, r = i ? this.currentPage.pageX : this.x, s = i ? this.currentPage.pageY : this.y, a = o.getTime(), l = this.keyTime || 0, u = .25;
          switch (this.options.useTransition && this.isInTransition && (e = this.getComputedPosition(), 
          this._translate(n.round(e.x), n.round(e.y)), this.isInTransition = !1), this.keyAcceleration = 200 > a - l ? n.min(this.keyAcceleration + u, 50) : 0, 
          t.keyCode) {
           case this.options.keyBindings.pageUp:
            this.hasHorizontalScroll && !this.hasVerticalScroll ? r += i ? 1 : this.wrapperWidth : s += i ? 1 : this.wrapperHeight;
            break;

           case this.options.keyBindings.pageDown:
            this.hasHorizontalScroll && !this.hasVerticalScroll ? r -= i ? 1 : this.wrapperWidth : s -= i ? 1 : this.wrapperHeight;
            break;

           case this.options.keyBindings.end:
            r = i ? this.pages.length - 1 : this.maxScrollX, s = i ? this.pages[0].length - 1 : this.maxScrollY;
            break;

           case this.options.keyBindings.home:
            r = 0, s = 0;
            break;

           case this.options.keyBindings.left:
            r += i ? -1 : 5 + this.keyAcceleration >> 0;
            break;

           case this.options.keyBindings.up:
            s += i ? 1 : 5 + this.keyAcceleration >> 0;
            break;

           case this.options.keyBindings.right:
            r -= i ? -1 : 5 + this.keyAcceleration >> 0;
            break;

           case this.options.keyBindings.down:
            s -= i ? 1 : 5 + this.keyAcceleration >> 0;
            break;

           default:
            return;
          }
          if (i) return this.goToPage(r, s), void 0;
          r > 0 ? (r = 0, this.keyAcceleration = 0) : r < this.maxScrollX && (r = this.maxScrollX, 
          this.keyAcceleration = 0), s > 0 ? (s = 0, this.keyAcceleration = 0) : s < this.maxScrollY && (s = this.maxScrollY, 
          this.keyAcceleration = 0), this.scrollTo(r, s, 0), this.keyTime = a;
        }
      },
      _animate: function(t, e, n, i) {
        function r() {
          var p, f, d, m = o.getTime();
          return m >= h ? (s.isAnimating = !1, s._translate(t, e), s.resetPosition(s.options.bounceTime) || s._execEvent("scrollEnd"), 
          void 0) : (m = (m - c) / n, d = i(m), p = (t - l) * d + l, f = (e - u) * d + u, 
          s._translate(p, f), s.isAnimating && a(r), void 0);
        }
        var s = this, l = this.x, u = this.y, c = o.getTime(), h = c + n;
        this.isAnimating = !0, r();
      },
      handleEvent: function(t) {
        switch (t.type) {
         case "touchstart":
         case "MSPointerDown":
         case "mousedown":
          this._start(t);
          break;

         case "touchmove":
         case "MSPointerMove":
         case "mousemove":
          this._move(t);
          break;

         case "touchend":
         case "MSPointerUp":
         case "mouseup":
         case "touchcancel":
         case "MSPointerCancel":
         case "mousecancel":
          this._end(t);
          break;

         case "orientationchange":
         case "resize":
          this._resize();
          break;

         case "transitionend":
         case "webkitTransitionEnd":
         case "oTransitionEnd":
         case "MSTransitionEnd":
          this._transitionEnd(t);
          break;

         case "wheel":
         case "DOMMouseScroll":
         case "mousewheel":
          this._wheel(t);
          break;

         case "keydown":
          this._key(t);
          break;

         case "click":
          t._constructed || (t.preventDefault(), t.stopPropagation());
        }
      }
    }, s.prototype = {
      handleEvent: function(t) {
        switch (t.type) {
         case "touchstart":
         case "MSPointerDown":
         case "mousedown":
          this._start(t);
          break;

         case "touchmove":
         case "MSPointerMove":
         case "mousemove":
          this._move(t);
          break;

         case "touchend":
         case "MSPointerUp":
         case "mouseup":
         case "touchcancel":
         case "MSPointerCancel":
         case "mousecancel":
          this._end(t);
        }
      },
      destroy: function() {
        this.options.interactive && (o.removeEvent(this.indicator, "touchstart", this), 
        o.removeEvent(this.indicator, "MSPointerDown", this), o.removeEvent(this.indicator, "mousedown", this), 
        o.removeEvent(t, "touchmove", this), o.removeEvent(t, "MSPointerMove", this), o.removeEvent(t, "mousemove", this), 
        o.removeEvent(t, "touchend", this), o.removeEvent(t, "MSPointerUp", this), o.removeEvent(t, "mouseup", this)), 
        this.options.defaultScrollbars && this.wrapper.parentNode.removeChild(this.wrapper);
      },
      _start: function(e) {
        var n = e.touches ? e.touches[0] : e;
        e.preventDefault(), e.stopPropagation(), this.transitionTime(), this.initiated = !0, 
        this.moved = !1, this.lastPointX = n.pageX, this.lastPointY = n.pageY, this.startTime = o.getTime(), 
        this.options.disableTouch || o.addEvent(t, "touchmove", this), this.options.disablePointer || o.addEvent(t, "MSPointerMove", this), 
        this.options.disableMouse || o.addEvent(t, "mousemove", this), this.scroller._execEvent("beforeScrollStart");
      },
      _move: function(t) {
        var e, n, i, r, s = t.touches ? t.touches[0] : t;
        o.getTime(), this.moved || this.scroller._execEvent("scrollStart"), this.moved = !0, 
        e = s.pageX - this.lastPointX, this.lastPointX = s.pageX, n = s.pageY - this.lastPointY, 
        this.lastPointY = s.pageY, i = this.x + e, r = this.y + n, this._pos(i, r), t.preventDefault(), 
        t.stopPropagation();
      },
      _end: function(e) {
        if (this.initiated) {
          if (this.initiated = !1, e.preventDefault(), e.stopPropagation(), o.removeEvent(t, "touchmove", this), 
          o.removeEvent(t, "MSPointerMove", this), o.removeEvent(t, "mousemove", this), this.scroller.options.snap) {
            var i = this.scroller._nearestSnap(this.scroller.x, this.scroller.y), r = this.options.snapSpeed || n.max(n.max(n.min(n.abs(this.scroller.x - i.x), 1e3), n.min(n.abs(this.scroller.y - i.y), 1e3)), 300);
            (this.scroller.x != i.x || this.scroller.y != i.y) && (this.scroller.directionX = 0, 
            this.scroller.directionY = 0, this.scroller.currentPage = i, this.scroller.scrollTo(i.x, i.y, r, this.scroller.options.bounceEasing));
          }
          this.moved && this.scroller._execEvent("scrollEnd");
        }
      },
      transitionTime: function(t) {
        t = t || 0, this.indicatorStyle[o.style.transitionDuration] = t + "ms", !t && o.isBadAndroid && (this.indicatorStyle[o.style.transitionDuration] = "0.001s");
      },
      transitionTimingFunction: function(t) {
        this.indicatorStyle[o.style.transitionTimingFunction] = t;
      },
      refresh: function() {
        this.transitionTime(), this.indicatorStyle.display = this.options.listenX && !this.options.listenY ? this.scroller.hasHorizontalScroll ? "block" : "none" : this.options.listenY && !this.options.listenX ? this.scroller.hasVerticalScroll ? "block" : "none" : this.scroller.hasHorizontalScroll || this.scroller.hasVerticalScroll ? "block" : "none", 
        this.scroller.hasHorizontalScroll && this.scroller.hasVerticalScroll ? (o.addClass(this.wrapper, "iScrollBothScrollbars"), 
        o.removeClass(this.wrapper, "iScrollLoneScrollbar"), this.options.defaultScrollbars && this.options.customStyle && (this.options.listenX ? this.wrapper.style.right = "8px" : this.wrapper.style.bottom = "8px")) : (o.removeClass(this.wrapper, "iScrollBothScrollbars"), 
        o.addClass(this.wrapper, "iScrollLoneScrollbar"), this.options.defaultScrollbars && this.options.customStyle && (this.options.listenX ? this.wrapper.style.right = "2px" : this.wrapper.style.bottom = "2px")), 
        this.wrapper.offsetHeight, this.options.listenX && (this.wrapperWidth = this.wrapper.clientWidth, 
        this.options.resize ? (this.indicatorWidth = n.max(n.round(this.wrapperWidth * this.wrapperWidth / (this.scroller.scrollerWidth || this.wrapperWidth || 1)), 8), 
        this.indicatorStyle.width = this.indicatorWidth + "px") : this.indicatorWidth = this.indicator.clientWidth, 
        this.maxPosX = this.wrapperWidth - this.indicatorWidth, "clip" == this.options.shrink ? (this.minBoundaryX = -this.indicatorWidth + 8, 
        this.maxBoundaryX = this.wrapperWidth - 8) : (this.minBoundaryX = 0, this.maxBoundaryX = this.maxPosX), 
        this.sizeRatioX = this.options.speedRatioX || this.scroller.maxScrollX && this.maxPosX / this.scroller.maxScrollX), 
        this.options.listenY && (this.wrapperHeight = this.wrapper.clientHeight, this.options.resize ? (this.indicatorHeight = n.max(n.round(this.wrapperHeight * this.wrapperHeight / (this.scroller.scrollerHeight || this.wrapperHeight || 1)), 8), 
        this.indicatorStyle.height = this.indicatorHeight + "px") : this.indicatorHeight = this.indicator.clientHeight, 
        this.maxPosY = this.wrapperHeight - this.indicatorHeight, "clip" == this.options.shrink ? (this.minBoundaryY = -this.indicatorHeight + 8, 
        this.maxBoundaryY = this.wrapperHeight - 8) : (this.minBoundaryY = 0, this.maxBoundaryY = this.maxPosY), 
        this.maxPosY = this.wrapperHeight - this.indicatorHeight, this.sizeRatioY = this.options.speedRatioY || this.scroller.maxScrollY && this.maxPosY / this.scroller.maxScrollY), 
        this.updatePosition();
      },
      updatePosition: function() {
        var t = this.options.listenX && n.round(this.sizeRatioX * this.scroller.x) || 0, e = this.options.listenY && n.round(this.sizeRatioY * this.scroller.y) || 0;
        this.options.ignoreBoundaries || (t < this.minBoundaryX ? ("scale" == this.options.shrink && (this.width = n.max(this.indicatorWidth + t, 8), 
        this.indicatorStyle.width = this.width + "px"), t = this.minBoundaryX) : t > this.maxBoundaryX ? "scale" == this.options.shrink ? (this.width = n.max(this.indicatorWidth - (t - this.maxPosX), 8), 
        this.indicatorStyle.width = this.width + "px", t = this.maxPosX + this.indicatorWidth - this.width) : t = this.maxBoundaryX : "scale" == this.options.shrink && this.width != this.indicatorWidth && (this.width = this.indicatorWidth, 
        this.indicatorStyle.width = this.width + "px"), e < this.minBoundaryY ? ("scale" == this.options.shrink && (this.height = n.max(this.indicatorHeight + 3 * e, 8), 
        this.indicatorStyle.height = this.height + "px"), e = this.minBoundaryY) : e > this.maxBoundaryY ? "scale" == this.options.shrink ? (this.height = n.max(this.indicatorHeight - 3 * (e - this.maxPosY), 8), 
        this.indicatorStyle.height = this.height + "px", e = this.maxPosY + this.indicatorHeight - this.height) : e = this.maxBoundaryY : "scale" == this.options.shrink && this.height != this.indicatorHeight && (this.height = this.indicatorHeight, 
        this.indicatorStyle.height = this.height + "px")), this.x = t, this.y = e, this.scroller.options.useTransform ? this.indicatorStyle[o.style.transform] = "translate(" + t + "px," + e + "px)" + this.scroller.translateZ : (this.indicatorStyle.left = t + "px", 
        this.indicatorStyle.top = e + "px");
      },
      _pos: function(t, e) {
        0 > t ? t = 0 : t > this.maxPosX && (t = this.maxPosX), 0 > e ? e = 0 : e > this.maxPosY && (e = this.maxPosY), 
        t = this.options.listenX ? n.round(t / this.sizeRatioX) : this.scroller.x, e = this.options.listenY ? n.round(e / this.sizeRatioY) : this.scroller.y, 
        this.scroller.scrollTo(t, e);
      },
      fade: function(t, e) {
        if (!e || this.visible) {
          clearTimeout(this.fadeTimeout), this.fadeTimeout = null;
          var n = t ? 250 : 500, i = t ? 0 : 300;
          t = t ? "1" : "0", this.wrapperStyle[o.style.transitionDuration] = n + "ms", this.fadeTimeout = setTimeout(function(t) {
            this.wrapperStyle.opacity = t, this.visible = +t;
          }.bind(this, t), i);
        }
      }
    }, i.utils = o, "undefined" != typeof module && module.exports ? module.exports = i : t.IScroll = i;
  }(window, document, Math), n("iscroll", function(t) {
    return function() {
      var e;
      return e || t.iScroll;
    };
  }(this)), n("views/page", [ "backbone" ], function(t) {
    return t.View.extend({
      className: "page-container",
      close: function(e) {
        e && e.preventDefault(), this.closed || (this.closed = !0, t.trigger("close", this.pageName), 
        this.nativeInterface.close(this.pageName));
      },
      initialize: function() {
        this.nativeInterface = this.options.nativeInterface;
      },
      templateData: function() {
        return this.collection ? this.collection.toJSON() : this.model ? this.model.toJSON() : {};
      },
      render: function() {
        return this.$el.html(this.template(this.templateData())), this.hide(), this;
      },
      show: function() {
        this.$el.css("visibility", "visible"), this.closed = !1;
      },
      visible: function() {
        return "visible" === this.$el.css("visibility");
      },
      hide: function() {
        this.$el.css("visibility", "hidden");
      }
    });
  }), n("text", [ "module" ], function(t) {
    var n, i, r, s, a = [ "Msxml2.XMLHTTP", "Microsoft.XMLHTTP", "Msxml2.XMLHTTP.4.0" ], o = /^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, l = /<body[^>]*>\s*([\s\S]+)\s*<\/body>/im, u = "undefined" != typeof location && location.href, c = u && location.protocol && location.protocol.replace(/\:/, ""), h = u && location.hostname, p = u && (location.port || void 0), f = {}, d = t.config && t.config() || {};
    return n = {
      version: "2.0.7",
      strip: function(t) {
        if (t) {
          t = t.replace(o, "");
          var e = t.match(l);
          e && (t = e[1]);
        } else t = "";
        return t;
      },
      jsEscape: function(t) {
        return t.replace(/(['\\])/g, "\\$1").replace(/[\f]/g, "\\f").replace(/[\b]/g, "\\b").replace(/[\n]/g, "\\n").replace(/[\t]/g, "\\t").replace(/[\r]/g, "\\r").replace(/[\u2028]/g, "\\u2028").replace(/[\u2029]/g, "\\u2029");
      },
      createXhr: d.createXhr || function() {
        var t, e, n;
        if ("undefined" != typeof XMLHttpRequest) return new XMLHttpRequest();
        if ("undefined" != typeof ActiveXObject) for (e = 0; 3 > e; e += 1) {
          n = a[e];
          try {
            t = new ActiveXObject(n);
          } catch (i) {}
          if (t) {
            a = [ n ];
            break;
          }
        }
        return t;
      },
      parseName: function(t) {
        var e, n, i, r = !1, s = t.indexOf("."), a = 0 === t.indexOf("./") || 0 === t.indexOf("../");
        return -1 !== s && (!a || s > 1) ? (e = t.substring(0, s), n = t.substring(s + 1, t.length)) : e = t, 
        i = n || e, s = i.indexOf("!"), -1 !== s && (r = "strip" === i.substring(s + 1), 
        i = i.substring(0, s), n ? n = i : e = i), {
          moduleName: e,
          ext: n,
          strip: r
        };
      },
      xdRegExp: /^((\w+)\:)?\/\/([^\/\\]+)/,
      useXhr: function(t, e, i, r) {
        var s, a, o, l = n.xdRegExp.exec(t);
        return l ? (s = l[2], a = l[3], a = a.split(":"), o = a[1], a = a[0], !(s && s !== e || a && a.toLowerCase() !== i.toLowerCase() || (o || a) && o !== r)) : !0;
      },
      finishLoad: function(t, e, i, r) {
        i = e ? n.strip(i) : i, d.isBuild && (f[t] = i), r(i);
      },
      load: function(t, e, i, r) {
        if (r.isBuild && !r.inlineText) return i(), void 0;
        d.isBuild = r.isBuild;
        var s = n.parseName(t), a = s.moduleName + (s.ext ? "." + s.ext : ""), o = e.toUrl(a), l = d.useXhr || n.useXhr;
        !u || l(o, c, h, p) ? n.get(o, function(e) {
          n.finishLoad(t, s.strip, e, i);
        }, function(t) {
          i.error && i.error(t);
        }) : e([ a ], function(t) {
          n.finishLoad(s.moduleName + "." + s.ext, s.strip, t, i);
        });
      },
      write: function(t, e, i) {
        if (f.hasOwnProperty(e)) {
          var r = n.jsEscape(f[e]);
          i.asModule(t + "!" + e, "define(function () { return '" + r + "';});\n");
        }
      },
      writeFile: function(t, e, i, r, s) {
        var a = n.parseName(e), o = a.ext ? "." + a.ext : "", l = a.moduleName + o, u = i.toUrl(a.moduleName + o) + ".js";
        n.load(l, i, function() {
          var e = function(t) {
            return r(u, t);
          };
          e.asModule = function(t, e) {
            return r.asModule(t, u, e);
          }, n.write(t, l, e, s);
        }, s);
      }
    }, "node" === d.env || !d.env && "undefined" != typeof process && process.versions && process.versions.node ? (i = e.nodeRequire("fs"), 
    n.get = function(t, e, n) {
      try {
        var r = i.readFileSync(t, "utf8");
        0 === r.indexOf("﻿") && (r = r.substring(1)), e(r);
      } catch (s) {
        n(s);
      }
    }) : "xhr" === d.env || !d.env && n.createXhr() ? n.get = function(t, e, i, r) {
      var s, a = n.createXhr();
      if (a.open("GET", t, !0), r) for (s in r) r.hasOwnProperty(s) && a.setRequestHeader(s.toLowerCase(), r[s]);
      d.onXhr && d.onXhr(a, t), a.onreadystatechange = function() {
        var n, r;
        4 === a.readyState && (n = a.status, n > 399 && 600 > n ? (r = new Error(t + " HTTP status: " + n), 
        r.xhr = a, i(r)) : e(a.responseText), d.onXhrComplete && d.onXhrComplete(a, t));
      }, a.send(null);
    } : "rhino" === d.env || !d.env && "undefined" != typeof Packages && "undefined" != typeof java ? n.get = function(t, e) {
      var n, i, r = "utf-8", s = new java.io.File(t), a = java.lang.System.getProperty("line.separator"), o = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(s), r)), l = "";
      try {
        for (n = new java.lang.StringBuffer(), i = o.readLine(), i && i.length() && 65279 === i.charAt(0) && (i = i.substring(1)), 
        null !== i && n.append(i); null !== (i = o.readLine()); ) n.append(a), n.append(i);
        l = String(n.toString());
      } finally {
        o.close();
      }
      e(l);
    } : ("xpconnect" === d.env || !d.env && "undefined" != typeof Components && Components.classes && Components.interfaces) && (r = Components.classes, 
    s = Components.interfaces, Components.utils["import"]("resource://gre/modules/FileUtils.jsm"), 
    n.get = function(t, e) {
      var n, i, a = {}, o = new FileUtils.File(t);
      try {
        n = r["@mozilla.org/network/file-input-stream;1"].createInstance(s.nsIFileInputStream), 
        n.init(o, 1, 0, !1), i = r["@mozilla.org/intl/converter-input-stream;1"].createInstance(s.nsIConverterInputStream), 
        i.init(n, "utf-8", n.available(), s.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER), 
        i.readString(n.available(), a), i.close(), n.close(), e(a.value);
      } catch (l) {
        throw new Error((o && o.path || "") + ": " + l);
      }
    }), n;
  }), n("text!templates/impact/start-screen.html", [], function() {
    return '<% if(data.campaigns.length) { %>\n<div class="btn-close-region"><a class="btn-close">&#215;</a></div>\n\n<div class="header-container"></div>\n\n<div class="campaigns-container">\n  <div class="video-container">\n    <div id="scroller-container">\n      <div id="scroller">\n        <ul>\n        <% _.each(data.campaigns, function(campaign) { %>\n          <li class="video" style="background-image: url(\'<%= campaign.picture %>\')">\n            <a class="btn-play-bg" data-id="<%= campaign.id %>">\n              <span class="btn-play"><span>&#9654;</span></span>\n            </a>\n          </li>\n        <% }); %>\n        </ul>\n      </div>\n    </div>\n  </div>\n\n  <div id="navigation-container">\n    <ul id="indicator">\n      <% _.each(data.campaigns, function(campaign, index) { %>\n      <li id="indicator_<%= index + 1%>"></li>\n      <% }); %>\n    </ul>\n  </div>\n\n  <div id="footer">\n    <ul id="game-info">\n    <% _.each(data.campaigns, function(campaign, index) { %>\n      <li id="game_info_<%= index + 1 %>">\n        <div class="game-name"><%= campaign.gameName %></div>\n        <div class="description"><%= campaign.tagLine %></div>\n      </li>\n    <% }); %>\n    </ul>\n  </div>\n\n  <a class="btn-watch-now"><%= data.i18n.t("Watch now!") %></a>\n</div>\n<% } else { %>\n<a class="btn-close">&#215;</a>\n\n<div class="empty-container">\n  <%= data.i18n.t("No campaigns available, try again later") %>.\n</div>\n<% } %>\n';
  }), n("text!templates/impact/item.html", [], function() {
    return '<div class="item-container">\n  <div class="item-image" style="background-image: url(\'<%= data.item.picture %>\')"></div>\n  <div class="item-text-small"><%= data.i18n.t("Watch a game trailer, get") %></div>\n  <div class="item-text-large"><%= data.item.name %></div>\n</div>\n';
  }), n("views/impact/startScreen", [ "backbone", "zepto", "underscore", "i18n!", "iscroll", "views/page", "text!templates/impact/start-screen.html", "text!templates/impact/item.html" ], function(t, e, n, i, r, s, a, o) {
    return n.templateSettings.variable = "data", s.extend({
      pageName: "offer",
      template: n.template(a),
      itemTemplate: n.template(o),
      itemsCache: {},
      events: function() {
        return this.collection.length > 1 ? {
          "tap .btn-close-region": "close",
          "tap .btn-close": "close",
          "click .btn-play-bg": "play",
          "tap .btn-watch-now": "watchNow"
        } : {
          "tap .btn-close-region": "close",
          "tap .btn-close": "close",
          "tap .btn-play-bg": "play",
          "tap .btn-watch-now": "watchNow"
        };
      },
      play: function(t) {
        t.preventDefault();
        var n = e(t.currentTarget).attr("data-id");
        this.nativeInterface.playVideo(this.collection.get(n));
      },
      initialize: function() {
        if (this.constructor.__super__.initialize.apply(this, arguments), this.item = this.options.item, 
        this.scrolling = !1, this.options.zones) {
          var t = this;
          n.each(this.options.zones.models, function(r) {
            n.each(r.items.models, function(n) {
              t.itemsCache[r.get("id") + "-" + n.get("key")] = e(t.itemTemplate({
                item: n.toJSON(),
                i18n: i
              }));
            });
          });
        } else this.options.items && n.each(this.options.items.models, function(t) {
          this.itemsCache[t.get("itemKey")] = e(this.itemTemplate({
            item: t.toJSON(),
            i18n: i
          }));
        }, this);
        this.activeCampaign = null;
      },
      templateData: function() {
        return {
          campaigns: n.filter(this.collection.toJSON(), function(t) {
            return !t.error && !t.completed;
          }),
          i18n: i
        };
      },
      render: function() {
        return this.constructor.__super__.render.apply(this, arguments), this.setActiveCampaign(1), 
        this;
      },
      setActiveCampaign: function(t) {
        n.each([ "#indicator_", "#game_info_" ], function(e) {
          this.$(e + this.activeCampaign).removeClass("active"), this.$(e + t).addClass("active");
        }, this), this.activeCampaign = t;
      },
      setItem: function(t, n) {
        if (t) {
          this.item = t;
          var i = null;
          i = n ? this.itemsCache[n + "-" + t.get("key")] : this.itemsCache[t.get("itemKey")], 
          i.css("opacity", 0), e(".header-container", this.$el).html(i), i.animate({
            opacity: 1
          }, 200);
        }
      },
      toggleWatchNow: function(t) {
        var e = this.$(".btn-watch-now");
        t ? e.removeClass("disabled") : e.addClass("disabled");
      },
      watchNow: function(t) {
        t.preventDefault(), this.scrolling || this.nativeInterface.playVideo(this.nativeInterface.campaigns.at(this.activeCampaign - 1));
      },
      initScroller: function() {
        var e = this;
        r = r || window.IScroll;
        var n = this.$("#scroller-container")[0];
        n && (this.iScroll && (this.iScroll.destroy(), this.iScroll = null), this.$("#scroller", n).css("width", this.$("#scroller ul li", n).width() * this.collection.length), 
        this.collection.length > 1 && (this.iScroll = new r(n, {
          click: !0,
          momentum: !1,
          scrollX: !0,
          scrollY: !1,
          snap: "li"
        }), this.iScroll.on("scrollStart", function() {
          e.toggleWatchNow(!1);
        }), this.iScroll.on("scrollEnd", function() {
          e.setActiveCampaign(this.currentPage.pageX + 1), e.toggleWatchNow(!0), t.trigger("scroll", e.nativeInterface.campaigns.at(e.activeCampaign - 1));
        })));
      },
      remove: function() {
        this.iScroll && (this.iScroll.destroy(), this.iScroll = null), this.constructor.__super__.remove.apply(this, arguments);
      }
    });
  }), n("text!templates/impact/end-screen.html", [], function() {
    return '<div class="btn-watch-again-region"><a class="btn-watch-again">&#8635;</a></div>\n<div class="btn-close-region"><a class="btn-close">&#215;</a></div>\n<div class="campaign-container">\n  <div class="game-background" style="background-image: url(<%= data.endScreenPortrait %><%= data.endScreen ? \'), url(\' + data.endScreen + \');\' : \');\' %>"></div>\n  <div class="end-screen-info-background">\n    <div class="end-screen-stripe"></div>\n    <div class="end-screen-info">\n      <div class="game-info">\n        <div class="game-icon" style="background-image: url(<%= data.gameIcon %>)"></div>\n        <div class="game-icon-shadow"></div>\n        <div class="name-container"><%= data.gameName %></div>\n      </div>\n      <div class="store-container">\n        <a class="store-button"></a>\n        <div class="game-store-info">\n          <span class="game-rating"><span class="game-rating-mask">&#9733;&#9733;&#9733;&#9733;&#9733;</span>&#9733;&#9733;&#9733;&#9733;&#9733;</span>\n          <br class="game-rating-br">\n          <span class="game-rating-count">(<span class="game-rating-count-number">0</span><span class="game-rating-postfix"> <%= data.i18n.t("Ratings") %></span>)</span>\n        </div>\n      </div>\n      <div class="download-container">\n        <a class="btn-download"><span class="icon-download">&#8677;</span><span class="download-text"><%= data.i18n.t("Download For Free") %></span><span class="download-text-alt">GET IT NOW!</span><span class="buy-text" style="display: none">Download Now</span></a>\n      </div>\n      <div class="store-badge-container">\n        <a class="btn-store-badge"></a>\n      </div>\n      <div class="everyplay-gameads-logo"></div>\n    </div>\n  </div>\n</div>\n';
  }), n("views/impact/endScreen", [ "backbone", "zepto", "underscore", "i18n!", "util", "event_tracking", "views/page", "text!templates/impact/end-screen.html" ], function(t, e, n, i, r, s, a, o) {
    return n.templateSettings.variable = "data", a.extend({
      pageName: "completed",
      template: n.template(o),
      events: {
        "tap .btn-close-region": "close",
        "tap .btn-close": "close",
        "tap .game-background": "download",
        "tap .btn-download": "download",
        "tap .store-button": "download",
        "tap .game-icon": "download",
        "tap .store-badge-container": "download",
        "tap .btn-watch-again-region": "watchAgain",
        "tap .btn-watch-again": "watchAgain"
      },
      initialize: function() {
        this.constructor.__super__.initialize.apply(this, arguments), this.currentBackgroundOrientation = "landscape", 
        this.resizeHandler = n.bind(function(t) {
          this.currentBackgroundOrientation !== t && this.switchBackground(this.currentBackgroundOrientation = t);
        }, this), t.on("orientation", this.resizeHandler);
      },
      render: function() {
        var t = this.constructor.__super__.render.apply(this, arguments);
        this.model.get("gameIcon") || this.$(".game-icon").remove();
        var e = parseInt(this.model.get("gameId"));
        return (14123 === e || 131622364 === e || 26686 === e || 39650 === e) && (this.$(".download-text-alt").hide(), 
        this.$(".download-text").hide(), this.$(".buy-text").show()), this.renderRatings(this.model.get("rating"), this.model.get("ratingCount")), 
        t;
      },
      renderRatings: function(t, e) {
        t && e ? (this.$(".game-rating-mask").css("width", t + "%"), this.$(".game-rating-count-number").text(e)) : this.$(".game-store-info").css("visibility", "hidden");
      },
      templateData: function() {
        var t = this.constructor.__super__.templateData.apply(this, arguments);
        return t.i18n = i, t;
      },
      handleAttribution: function(t, e, n) {
        var i = this.model.get("attributionUrlXHR");
        i ? r.xhrCall(r.addUrlParameters(t, {
          _: Date.now()
        }), !0, 10, 3e4, function() {
          e && e();
        }, function(t) {
          n && n(t);
        }) : r.createIframe(r.addUrlParameters(t, {
          _: Date.now()
        }), 10, 3e4, function() {
          e && e();
        }, function() {
          n && n();
        });
      },
      viewAttributionHandler: function() {
        var t = this.model.get("viewAttributionUrl");
        t && this.handleAttribution(t);
      },
      initAutoClose: function() {
        var t = this.nativeInterface.properties.get("autoCloseAfterSeconds");
        t && t > 0 && (console.log("Auto closing in " + t + " seconds"), this.autoCloseTimer = setTimeout(e.proxy(function() {
          this.close();
        }, this), 1e3 * t));
      },
      switchBackground: function(t) {
        var e = this.$(".game-background");
        e.css("background-image", e.css("background-image").split(",").reverse().join(",")), 
        console.log("Switched end screen background to: " + t);
      },
      download: function(t) {
        t.preventDefault(), t.currentTarget && s.trackEvent("endscreen", "clicked", t.currentTarget.className);
        var e = this.nativeInterface.properties.get("zone"), n = this.model.get("clickUrl");
        e && (n = r.addUrlParameters(n, {
          zone: this.nativeInterface.properties.get("zone")
        }));
        var i = this.model.get("id"), a = this.model.get("customClickUrl"), o = this.model.get("ignoreImpressionTracking"), l = this.model.get("startAttributionUrl"), u = this.model.get("viewAttributionUrl"), c = this.model.get("clickAttributionUrl");
        if (s.trackEvent("click", "called", i), r.xhrCall(r.addUrlParameters(n, {
          redirect: !1
        }), !0, 10, 3e4, function() {
          s.trackEvent("click", "retried", i);
        }), !this.nativeInterface.properties.get("deviceType").match(/android/i) && this.nativeInterface.properties.get("iOSVersion") >= 8 && (n = "http://itunes.apple.com/" + this.model.get("appStoreCountry") + "/app/id" + this.model.get("iTunesId")), 
        c) this.model.get("clickAttributionUrlFollowRedirects") ? this.nativeInterface.appStore(c) : (this.handleAttribution(c), 
        this.nativeInterface.appStore(n, this.model.get("iTunesId"), this.model.get("bypassAppSheet"))); else if (l || u) this.nativeInterface.appStore(n, this.model.get("iTunesId"), this.model.get("bypassAppSheet")); else if (o && -1 !== a.indexOf("gree-apps.net")) {
          var h = a.replace("&no_redirect=true", "");
          this.nativeInterface.appStore(h);
        } else if (o && -1 !== a.indexOf("ad-x.co.uk")) {
          var p = a.replace("&redirect=off", "");
          this.nativeInterface.appStore(p);
        } else if (-1 !== a.indexOf("adtrack.king.com")) if (this.nativeInterface.properties.get("deviceType").match(/android/i)) {
          var f = a.replace("&linkId=NO_REDIRECT", "");
          this.nativeInterface.appStore(f);
        } else r.createIframe(a, 10, 3e4), this.nativeInterface.appStore(n, this.model.get("iTunesId"), this.model.get("bypassAppSheet")); else if (-1 !== a.indexOf("hastrk")) {
          var d = a.replace("action=impression", "action=click").replace("action%3Dimpression", "action%3Dclick");
          r.createIframe(d, 10, 3e4), this.nativeInterface.appStore(n, this.model.get("iTunesId"), this.model.get("bypassAppSheet"));
        } else !this.nativeInterface.properties.get("deviceType").match(/android/i) && this.nativeInterface.properties.get("iOSVersion") < 6 ? this.nativeInterface.appStore("http://itunes.apple.com/" + this.model.get("appStoreCountry") + "/app/id" + this.model.get("iTunesId")) : this.nativeInterface.appStore(n, this.model.get("iTunesId"), this.model.get("bypassAppSheet"));
      },
      watchAgain: function(t) {
        t.preventDefault();
        var e = this;
        this.watchAgainTriggered || (this.watchAgainTriggered = !0, s.trackEvent("endscreen", "clicked", "rewatch"), 
        this.nativeInterface.playVideo(this.model, !0), setTimeout(function() {
          e.watchAgainTriggered = !1;
        }, 1e3));
      },
      show: function() {
        var t = e("body");
        t.hasClass("landscape") && "landscape" !== this.currentBackgroundOrientation ? this.switchBackground(this.currentBackgroundOrientation = "landscape") : t.hasClass("portrait") && "portrait" !== this.currentBackgroundOrientation && this.switchBackground(this.currentBackgroundOrientation = "portrait"), 
        this.constructor.__super__.show.apply(this, arguments);
      },
      close: function(t) {
        this.autoCloseTimer && (clearTimeout(this.autoCloseTimer), this.autoCloseTimer = null), 
        t && !this.closed && s.trackEvent("endscreen", "clicked", "close"), this.constructor.__super__.close.apply(this, arguments);
      },
      remove: function() {
        t.off("orientation", this.resizeHandler), this.constructor.__super__.remove.apply(this, arguments);
      }
    });
  }), n("text!templates/impact/none.html", [], function() {
    return '<a class="btn-close">&#215;</a>';
  }), n("views/none", [ "backbone", "zepto", "underscore", "views/page", "text!templates/impact/none.html" ], function(t, e, n, i, r) {
    return n.templateSettings.variable = "data", i.extend({
      pageName: "none",
      template: n.template(r),
      events: {
        "tap .btn-close": "close"
      },
      setItem: function() {}
    });
  }), n("views/popup", [ "backbone", "zepto" ], function(t, e) {
    return t.View.extend({
      className: "popup-background",
      initialize: function() {
        this.positionProxy = e.proxy(this.position, this), this.nativeInterface = this.options.nativeInterface;
      },
      templateData: function() {
        return this.collection ? this.collection.toJSON() : this.model ? this.model.toJSON() : {};
      },
      render: function() {
        return this.$el.html(this.template(this.templateData())), this.position(), this.$el.css("visibility", "hidden"), 
        this;
      },
      show: function() {
        this.$el.css("visibility", "visible"), this.position(), window.addEventListener("resize", this.positionProxy);
      },
      hide: function() {
        window.removeEventListener("resize", this.positionProxy), this.$el.css("visibility", "hidden");
      },
      position: function() {
        this.$el.css("line-height", window.innerHeight + "px");
      }
    });
  }), n("text!templates/impact/spinner.html", [], function() {
    return '<div class="spinner-container">\n  <div class="spinner-animation"></div>\n  <div class="spinner-text"></div>\n</div>';
  }), n("views/spinner", [ "backbone", "zepto", "underscore", "i18n!", "event_tracking", "views/popup", "text!templates/impact/spinner.html" ], function(t, e, n, i, r, s, a) {
    return s.extend({
      template: n.template(a),
      textMap: {
        loading: i.t("Loading") + "...",
        buffering: i.t("Buffering") + "..."
      },
      initialize: function() {
        this.constructor.__super__.initialize.apply(this, arguments), t.on("showSpinner", this.show, this), 
        t.on("hideSpinner", this.hide, this);
      },
      render: function() {
        var t = this.constructor.__super__.render.apply(this, arguments), e = this.nativeInterface.properties.get("customOptions");
        return e && e.bufferingBackground && this.$el.css("background", e.bufferingBackground), 
        t;
      },
      show: function(t) {
        var n = t && t.textKey && t.textKey.length && t.textKey in this.textMap ? t.textKey : "loading";
        if (this.$(".spinner-text").text(this.textMap[n]), "buffering" === n) {
          var i = this;
          this.showCloseTimer || (this.showCloseTimer = setTimeout(function() {
            r.trackEvent("video", "buffering", "cancel_shown");
            var t = i.tempClose = e('<a class="btn-close" style="z-index: 1000">&#215;</a>');
            t.on("tap", function(e) {
              r.trackEvent("video", "buffering", "cancel_pressed"), e.preventDefault(), t.remove(), 
              i.hide(), i.nativeInterface.close("buffering");
            }), e("body").append(t);
          }, 5e3));
        } else this.constructor.__super__.show.apply(this, arguments);
      },
      hide: function() {
        this.showCloseTimer && (this.tempClose && (this.tempClose.remove(), this.tempClose = null), 
        clearTimeout(this.showCloseTimer), this.showCloseTimer = null), this.constructor.__super__.hide.apply(this, arguments);
      }
    });
  }), n("text!templates/impact/error.html", [], function() {
    return '<div class="error-container">\n  <div class="error-text"></div>\n  <a class="btn-ok">Ok</a>\n</div>';
  }), n("views/error", [ "backbone", "zepto", "underscore", "i18n!", "event_tracking", "views/popup", "text!templates/impact/error.html" ], function(t, e, n, i, r, s, a) {
    return s.extend({
      template: n.template(a),
      textMap: {
        unknownError: i.t("Unknown error"),
        videoPlaybackError: i.t("Video playback error")
      },
      events: {
        "click .btn-ok": "hide"
      },
      initialize: function() {
        this.constructor.__super__.initialize.apply(this, arguments), t.on("showError", this.show, this), 
        t.on("hideError", this.hide, this);
      },
      show: function(t) {
        var e = t && t.textKey && t.textKey.length && t.textKey in this.textMap ? t.textKey : "unknownError", n = this.textMap[e];
        if ("videoPlaybackError" === e) {
          var i = this.nativeInterface.properties.get("platform");
          "ios" === i && this.nativeInterface.lastCampaignId ? (this.nativeInterface.campaigns.get(this.nativeInterface.lastCampaignId).set({
            error: "videoPlaybackError"
          }), r.trackEvent("error", "Video playback error", this.nativeInterface.lastCampaignId)) : "android" === i && (this.nativeInterface.lastError = "videoPlaybackError");
        }
        this.$(".error-text").text(n), this.constructor.__super__.show.apply(this, arguments);
      }
    });
  }), n("controllers/views", [ "backbone", "zepto", "underscore", "views/impact/startScreen", "views/impact/endScreen", "views/none", "views/spinner", "views/error" ], function(t, e, n, i, r, s, a, o) {
    return function(t) {
      var n = e("body");
      this.views = {
        start: null,
        completed: null,
        none: new s({
          nativeInterface: t
        })
      }, this.popups = {
        spinner: new a({
          nativeInterface: t
        }),
        error: new o({
          nativeInterface: t
        })
      }, n.append(this.views.none.render().$el), this.views.none.$el.addClass("none-screen");
      for (var l in this.popups) this.popups.hasOwnProperty(l) && n.append(this.popups[l].render().$el);
      this.get = function(t) {
        return this.views[t];
      }, this.render = function(e, a) {
        console.log("Rendering: " + e);
        var o = this.views[e];
        switch (o && (o.remove(), o = null), e) {
         case "start":
          16 === parseInt(t.properties.get("gameId")) ? (this.views.start = new i({
            nativeInterface: t,
            collection: t.campaigns,
            item: t.item,
            items: t.items,
            zones: t.zones
          }), n.append(this.views.start.render().$el), this.views.start.$el.addClass("start-screen"), 
          this.views.start.initScroller()) : (this.views.start = new s({
            nativeInterface: t
          }), n.append(this.views.start.render().$el), this.views.start.$el.addClass("none-screen"));
          break;

         case "completed":
          this.views.completed = new r({
            nativeInterface: t,
            model: a,
            properties: t.properties
          }), n.append(this.views.completed.render().$el), this.views.completed.$el.addClass("end-screen");
        }
      }, this.show = function(t) {
        console.log("Showing: " + t), this.views[t].show();
      }, this.hide = function() {
        console.log("Hiding all views");
        for (var t in this.views) if (this.views.hasOwnProperty(t)) {
          var e = this.views[t];
          e && e.hide();
        }
      };
    };
  }), n("impact", [ "backbone", "zepto", "underscore", "event_tracking", "controllers/native", "controllers/events", "controllers/views" ], function(t, e, n, i, r, s, a) {
    function o(t) {
      l.addClass(t);
    }
    var l = e("body"), u = function() {
      console.log("Resize handler called");
      var e = l.hasClass("landscape") ? "landscape" : l.hasClass("portrait") ? "portrait" : null, n = window.innerWidth / window.innerHeight >= 1 ? "landscape" : "portrait";
      e ? e !== n && (console.log("Resize handler changing orientation to " + n), l.removeClass(e), 
      l.addClass(n), t.trigger("orientation", n)) : (l.addClass(n), t.trigger("orientation", n));
    };
    window.addEventListener("resize", u), u(), window.addEventListener("touchmove", function(t) {
      return t.preventDefault(), !1;
    });
    var c = new r(), h = null, p = null;
    t.on("init", function() {
      l.removeClass("iphone ipad android unknown"), "ios" === c.properties.get("platform") ? "11386" === c.properties.get("gameId") ? o("iphone") : "ipad" !== c.properties.get("deviceType") || window.navigator.userAgent.match(/ipad/i) ? o(c.properties.get("deviceType")) : o("iphone") : o(c.properties.get("deviceType")), 
      h = new s(c), p = new a(c), i.setupGA(), window.onerror = i.trackError, p.render("start"), 
      16 != c.properties.get("gameId") && t.trigger("showSpinner", {
        textKey: "buffering"
      });
    }), t.on("playVideo", function(t, e) {
      e || p.render("completed", t);
    }), t.on("videoCompleted", function(e) {
      setTimeout(u, 1e3), t.trigger("hideSpinner");
      var n = p.get("completed"), r = c.campaigns.get(e.campaignId);
      n ? r && 19655 === r.get("gameId") ? p.get("completed").close() : (p.hide(), p.show("completed")) : (p.render("completed", r), 
      p.hide(), p.show("completed"), n = p.get("completed")), n && (i.trackEvent("endscreen", "shown", n.currentBackgroundOrientation), 
      n.initAutoClose()), c.lastError || n.viewAttributionHandler();
      var s = c.properties.get("platform");
      "ios" === s ? c.lastCampaignId = e.campaignId : "android" === s && c.lastError && "videoPlaybackError" === c.lastError && (i.trackEvent("error", "Video playback error", e.campaignId), 
      r.set({
        error: "videoPlaybackError"
      }), c.lastError = null), r.set({
        completed: !0
      });
    });
    var f = n.once(function() {
      i.setupSession(), i.trackPageview();
    });
    t.on("setView", function(e, n) {
      switch (p.hide(), e) {
       case "start":
        var i = p.get("start"), r = n.action, s = n.itemKey, a = n.zone;
        if (r && "open" === r) {
          if (a && c.properties.set("zone", a), f(), t.trigger("open", c.campaigns), s) {
            var o = null;
            o = c.zones && a ? c.zones.get(a).items.find(function(t) {
              return t.get("key") === s ? t : void 0;
            }) : c.items.find(function(t) {
              return t.get("itemKey") === s ? t : void 0;
            }), o && i.setItem(o, a);
          } else i.setItem(c.item);
          if (16 != c.properties.get("gameId")) {
            var l = c.campaigns.where({
              completed: !1
            });
            l.length > 0 && setTimeout(function() {
              p.get("completed") && p.get("completed").visible() || c.playVideo(l[0]);
            }, 500);
          }
        } else i.setItem(c.item);
        p.show("start");
        break;

       case "completed":
        f();
        var u = p.get("completed"), h = n.campaignId;
        if (!u && h || h && u.model.get("id") !== h) {
          var d = c.campaigns.get(h);
          d && p.render("completed", d);
        }
        p.show("completed");
        break;

       case "none":
        p.show("none");
      }
    }), window.unityadsnativebridge && window.unityadsnativebridge.handleWebEvent("loadComplete", '{"data":{}}');
    var d = null;
    window.unityads && window.unityads.cachedCalls && window.unityads.cachedCalls.length && (d = window.unityads.cachedCalls), 
    window.unityads = window.applifierimpact = c, d && (console.dir(d), d.forEach(function(t) {
      window.unityads[t.shift()].apply(window.unityads, t);
    }));
  }), e([ "impact" ]);
})();</script>
  </head>
  <body></body>
</html>
