text: /** vim: et:ts=4:sw=4:sts=4
   * @license RequireJS 2.1.15 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
   * Available via the MIT or new BSD license.
   * see: http://github.com/jrburke/requirejs for details
   */
  
  /*!
   * jQuery JavaScript Library v2.1.1
   * http://jquery.com/
   *
   * Includes Sizzle.js
   * http://sizzlejs.com/
   *
   * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
   * Released under the MIT license
   * http://jquery.org/license
   *
   * Date: 2014-05-01T17:11Z
   */
  
  /*!
   * Sizzle CSS Selector Engine v1.10.19
   * http://sizzlejs.com/
   *
   * Copyright 2013 jQuery Foundation, Inc. and other contributors
   * Released under the MIT license
   * http://jquery.org/license
   *
   * Date: 2014-04-18
   */
  
  //     Underscore.js 1.7.0
  //     http://underscorejs.org
  //     (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  //     Underscore may be freely distributed under the MIT license.
  
  var requirejs,require,define;(function(global){function isFunction(e){return ostring.call(e)==="[object Function]"}function isArray(e){return ostring.call(e)==="[object Array]"}function each(e,t){if(e){var n;for(n=0;n<e.length;n+=1)if(e[n]&&t(e[n],n,e))break}}function eachReverse(e,t){if(e){var n;for(n=e.length-1;n>-1;n-=1)if(e[n]&&t(e[n],n,e))break}}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var n;for(n in e)if(hasProp(e,n)&&t(e[n],n))break}function mixin(e,t,n,r){return t&&eachProp(t,function(t,i){if(n||!hasProp(e,i))r&&typeof t=="object"&&t&&!isArray(t)&&!isFunction(t)&&!(t instanceof RegExp)?(e[i]||(e[i]={}),mixin(e[i],t,n,r)):e[i]=t}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeError(e,t,n,r){var i=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return i.requireType=e,i.requireModules=r,n&&(i.originalError=n),i}function newContext(e){function m(e){var t,n;for(t=0;t<e.length;t++){n=e[t];if(n===".")e.splice(t,1),t-=1;else if(n===".."){if(t===0||t==1&&e[2]===".."||e[t-1]==="..")continue;t>0&&(e.splice(t-1,2),t-=2)}}}function g(e,t,n){var r,i,s,u,a,f,l,c,h,p,d,v,g=t&&t.split("/"),y=o.map,b=y&&y["*"];e&&(e=e.split("/"),l=e.length-1,o.nodeIdCompat&&jsSuffixRegExp.test(e[l])&&(e[l]=e[l].replace(jsSuffixRegExp,"")),e[0].charAt(0)==="."&&g&&(v=g.slice(0,g.length-1),e=v.concat(e)),m(e),e=e.join("/"));if(n&&y&&(g||b)){s=e.split("/");e:for(u=s.length;u>0;u-=1){f=s.slice(0,u).join("/");if(g)for(a=g.length;a>0;a-=1){i=getOwn(y,g.slice(0,a).join("/"));if(i){i=getOwn(i,f);if(i){c=i,h=u;break e}}}!p&&b&&getOwn(b,f)&&(p=getOwn(b,f),d=u)}!c&&p&&(c=p,h=d),c&&(s.splice(0,h,c),e=s.join("/"))}return r=getOwn(o.pkgs,e),r?r:e}function y(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===r.contextName)return t.parentNode.removeChild(t),!0})}function b(e){var t=getOwn(o.paths,e);if(t&&isArray(t)&&t.length>1)return t.shift(),r.require.undef(e),r.makeRequire(null,{skipMap:!0})([e]),!0}function w(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function E(e,t,n,i){var s,o,u,a,f=null,l=t?t.name:null,h=e,p=!0,m="";return e||(p=!1,e="_@r"+(d+=1)),a=w(e),f=a[0],e=a[1],f&&(f=g(f,l,i),o=getOwn(c,f)),e&&(f?o&&o.normalize?m=o.normalize(e,function(e){return g(e,l,i)}):m=e.indexOf("!")===-1?g(e,l,i):e:(m=g(e,l,i),a=w(m),f=a[0],m=a[1],n=!0,s=r.nameToUrl(m))),u=f&&!o&&!n?"_unnormalized"+(v+=1):"",{prefix:f,name:m,parentMap:t,unnormalized:!!u,url:s,originalName:h,isDefine:p,id:(f?f+"!"+m:m)+u}}function S(e){var t=e.id,n=getOwn(u,t);return n||(n=u[t]=new r.Module(e)),n}function x(e,t,n){var r=e.id,i=getOwn(u,r);hasProp(c,r)&&(!i||i.defineEmitComplete)?t==="defined"&&n(c[r]):(i=S(e),i.error&&t==="error"?n(i.error):i.on(t,n))}function T(e,t){var n=e.requireModules,r=!1;t?t(e):(each(n,function(t){var n=getOwn(u,t);n&&(n.error=e,n.events.error&&(r=!0,n.emit("error",e)))}),r||req.onError(e))}function N(){globalDefQueue.length&&(apsp.apply(l,[l.length,0].concat(globalDefQueue)),globalDefQueue=[])}function C(e){delete u[e],delete a[e]}function k(e,t,n){var r=e.map.id;e.error?e.emit("error",e.error):(t[r]=!0,each(e.depMaps,function(r,i){var s=r.id,o=getOwn(u,s);o&&!e.depMatched[i]&&!n[s]&&(getOwn(t,s)?(e.defineDep(i,c[s]),e.check()):k(o,t,n))}),n[r]=!0)}function L(){var e,n,i=o.waitSeconds*1e3,u=i&&r.startTime+i<(new Date).getTime(),f=[],l=[],c=!1,h=!0;if(t)return;t=!0,eachProp(a,function(e){var t=e.map,r=t.id;if(!e.enabled)return;t.isDefine||l.push(e);if(!e.error)if(!e.inited&&u)b(r)?(n=!0,c=!0):(f.push(r),y(r));else if(!e.inited&&e.fetched&&t.isDefine){c=!0;if(!t.prefix)return h=!1}});if(u&&f.length)return e=makeError("timeout","Load timeout for modules: "+f,null,f),e.contextName=r.contextName,T(e);h&&each(l,function(e){k(e,{},{})}),(!u||n)&&c&&(isBrowser||isWebWorker)&&!s&&(s=setTimeout(function(){s=0,L()},50)),t=!1}function A(e){hasProp(c,e[0])||S(E(e[0],null,!0)).init(e[1],e[2])}function O(e,t,n,r){e.detachEvent&&!isOpera?r&&e.detachEvent(r,t):e.removeEventListener(n,t,!1)}function M(e){var t=e.currentTarget||e.srcElement;return O(t,r.onScriptLoad,"load","onreadystatechange"),O(t,r.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function _(){var e;N();while(l.length){e=l.shift();if(e[0]===null)return T(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));A(e)}}var t,n,r,i,s,o={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},u={},a={},f={},l=[],c={},h={},p={},d=1,v=1;return i={require:function(e){return e.require?e.require:e.require=r.makeRequire(e.map)},exports:function(e){e.usingExports=!0;if(e.map.isDefine)return e.exports?c[e.map.id]=e.exports:e.exports=c[e.map.id]={}},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(o.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},n=function(e){this.events=getOwn(f,e.id)||{},this.map=e,this.shim=getOwn(o.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},n.prototype={init:function(e,t,n,r){r=r||{};if(this.inited)return;this.factory=t,n?this.on("error",n):this.events.error&&(n=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=n,this.inited=!0,this.ignore=r.ignore,r.enabled||this.enabled?this.enable():this.check()},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(this.fetched)return;this.fetched=!0,r.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();r.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}))},load:function(){var e=this.map.url;h[e]||(h[e]=!0,r.load(this.map.id,e))},check:function(){if(!this.enabled||this.enabling)return;var e,t,n=this.map.id,i=this.depExports,s=this.exports,o=this.factory;if(!this.inited)this.fetch();else if(this.error)this.emit("error",this.error);else if(!this.defining){this.defining=!0;if(this.depCount<1&&!this.defined){if(isFunction(o)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{s=r.execCb(n,o,i,s)}catch(u){e=u}else s=r.execCb(n,o,i,s);this.map.isDefine&&s===undefined&&(t=this.module,t?s=t.exports:this.usingExports&&(s=this.exports));if(e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",T(this.error=e)}else s=o;this.exports=s,this.map.isDefine&&!this.ignore&&(c[n]=s,req.onResourceLoad&&req.onResourceLoad(r,this.map,this.depMaps)),C(n),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}},callPlugin:function(){var e=this.map,t=e.id,n=E(e.prefix);this.depMaps.push(n),x(n,"defined",bind(this,function(n){var i,s,a,f=getOwn(p,this.map.id),l=this.map.name,c=this.map.parentMap?this.map.parentMap.name:null,h=r.makeRequire(e.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){n.normalize&&(l=n.normalize(l,function(e){return g(e,c,!0)})||""),s=E(e.prefix+"!"+l,this.map.parentMap),x(s,"defined",bind(this,function(e){this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),a=getOwn(u,s.id),a&&(this.depMaps.push(s),this.events.error&&a.on("error",bind(this,function(e){this.emit("error",e)})),a.enable());return}if(f){this.map.url=r.nameToUrl(f),this.load();return}i=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})}),i.error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(u,function(e){e.map.id.indexOf(t+"_unnormalized")===0&&C(e.map.id)}),T(e)}),i.fromText=bind(this,function(n,s){var u=e.name,a=E(u),f=useInteractive;s&&(n=s),f&&(useInteractive=!1),S(a),hasProp(o.config,t)&&(o.config[u]=o.config[t]);try{req.exec(n)}catch(l){return T(makeError("fromtexteval","fromText eval for "+t+" failed: "+l,l,[t]))}f&&(useInteractive=!0),this.depMaps.push(a),r.completeLoad(u),h([u],i)}),n.load(e.name,h,i,o)})),r.enable(n,this),this.pluginMaps[n.id]=n},enable:function(){a[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var n,s,o;if(typeof e=="string"){e=E(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,o=getOwn(i,e.id);if(o){this.depExports[t]=o(this);return}this.depCount+=1,x(e,"defined",bind(this,function(e){this.defineDep(t,e),this.check()})),this.errback&&x(e,"error",bind(this,this.errback))}n=e.id,s=u[n],!hasProp(i,n)&&s&&!s.enabled&&r.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(u,e.id);t&&!t.enabled&&r.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var n=this.events[e];n||(n=this.events[e]=[]),n.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),e==="error"&&delete this.events[e]}},r={config:o,contextName:e,registry:u,defined:c,urlFetched:h,defQueue:l,Module:n,makeModuleMap:E,nextTick:req.nextTick,onError:T,configure:function(e){e.baseUrl&&e.baseUrl.charAt(e.baseUrl.length-1)!=="/"&&(e.baseUrl+="/");var t=o.shim,n={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){n[t]?(o[t]||(o[t]={}),mixin(o[t],e,!0,!0)):o[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(p[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,n){isArray(e)&&(e={deps:e}),(e.exports||e.init)&&!e.exportsFn&&(e.exportsFn=r.makeShimExports(e)),t[n]=e}),o.shim=t),e.packages&&each(e.packages,function(e){var t,n;e=typeof e=="string"?{name:e}:e,n=e.name,t=e.location,t&&(o.paths[n]=e.location),o.pkgs[n]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(u,function(e,t){!e.inited&&!e.map.unnormalized&&(e.map=E(t))}),(e.deps||e.callback)&&r.require(e.deps||[],e.callback)},makeShimExports:function(e){function t(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}return t},makeRequire:function(t,n){function s(o,a,f){var l,h,p;return n.enableBuildCallback&&a&&isFunction(a)&&(a.__requireJsBuild=!0),typeof o=="string"?isFunction(a)?T(makeError("requireargs","Invalid require call"),f):t&&hasProp(i,o)?i[o](u[t.id]):req.get?req.get(r,o,t,s):(h=E(o,t,!1,!0),l=h.id,hasProp(c,l)?c[l]:T(makeError("notloaded",'Module name "'+l+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(_(),r.nextTick(function(){_(),p=S(E(null,t)),p.skipMap=n.skipMap,p.init(o,a,f,{enabled:!0}),L()}),s)}return n=n||{},mixin(s,{isBrowser:isBrowser,toUrl:function(e){var n,i=e.lastIndexOf("."),s=e.split("/")[0],o=s==="."||s==="..";return i!==-1&&(!o||i>1)&&(n=e.substring(i,e.length),e=e.substring(0,i)),r.nameToUrl(g(e,t&&t.id,!0),n,!0)},defined:function(e){return hasProp(c,E(e,t,!1,!0).id)},specified:function(e){return e=E(e,t,!1,!0).id,hasProp(c,e)||hasProp(u,e)}}),t||(s.undef=function(e){N();var n=E(e,t,!0),r=getOwn(u,e);y(e),delete c[e],delete h[n.url],delete f[e],eachReverse(l,function(t,n){t[0]===e&&l.splice(n,1)}),r&&(r.events.defined&&(f[e]=r.events),C(e))}),s},enable:function(e){var t=getOwn(u,e.id);t&&S(e).enable()},completeLoad:function(e){var t,n,r,i=getOwn(o.shim,e)||{},s=i.exports;N();while(l.length){n=l.shift();if(n[0]===null){n[0]=e;if(t)break;t=!0}else n[0]===e&&(t=!0);A(n)}r=getOwn(u,e);if(!t&&!hasProp(c,e)&&r&&!r.inited){if(o.enforceDefine&&(!s||!getGlobal(s))){if(b(e))return;return T(makeError("nodefine","No define call for "+e,null,[e]))}A([e,i.deps||[],i.exportsFn])}L()},nameToUrl:function(e,t,n){var i,s,u,a,f,l,c,h=getOwn(o.pkgs,e);h&&(e=h),c=getOwn(p,e);if(c)return r.nameToUrl(c,t,n);if(req.jsExtRegExp.test(e))f=e+(t||"");else{i=o.paths,s=e.split("/");for(u=s.length;u>0;u-=1){a=s.slice(0,u).join("/"),l=getOwn(i,a);if(l){isArray(l)&&(l=l[0]),s.splice(0,u,l);break}}f=s.join("/"),f+=t||(/^data\:|\?/.test(f)||n?"":".js"),f=(f.charAt(0)==="/"||f.match(/^[\w\+\.\-]+:/)?"":o.baseUrl)+f}return o.urlArgs?f+((f.indexOf("?")===-1?"?":"&")+o.urlArgs):f},load:function(e,t){req.load(r,e,t)},execCb:function(e,t,n,r){return t.apply(r,n)},onScriptLoad:function(e){if(e.type==="load"||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=M(e);r.completeLoad(t.id)}},onScriptError:function(e){var t=M(e);if(!b(t.id))return T(makeError("scripterror","Script error for: "+t.id,e,[t.id]))}},r.require=r.makeRequire(),r}function getInteractiveScript(){return interactiveScript&&interactiveScript.readyState==="interactive"?interactiveScript:(eachReverse(scripts(),function(e){if(e.readyState==="interactive")return interactiveScript=e}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.1.15",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,ap=Array.prototype,apsp=ap.splice,isBrowser=typeof window!="undefined"&&typeof navigator!="undefined"&&!!window.document,isWebWorker=!isBrowser&&typeof importScripts!="undefined",readyRegExp=isBrowser&&navigator.platform==="PLAYSTATION 3"?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera=typeof opera!="undefined"&&opera.toString()==="[object Opera]",contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if(typeof define!="undefined")return;if(typeof requirejs!="undefined"){if(isFunction(requirejs))return;cfg=requirejs,requirejs=undefined}typeof require!="undefined"&&!isFunction(require)&&(cfg=require,require=undefined),req=requirejs=function(e,t,n,r){var i,s,o=defContextName;return!isArray(e)&&typeof e!="string"&&(s=e,isArray(t)?(e=t,t=n,n=r):e=[]),s&&s.context&&(o=s.context),i=getOwn(contexts,o),i||(i=contexts[o]=req.s.newContext(o)),s&&i.configure(s),i.require(e,t,n)},req.config=function(e){return req(e)},req.nextTick=typeof setTimeout!="undefined"?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,n){var r=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return r.type=e.scriptType||"text/javascript",r.charset="utf-8",r.async=!0,r},req.load=function(e,t,n){var r=e&&e.config||{},i;if(isBrowser)return i=req.createNode(r,t,n),i.setAttribute("data-requirecontext",e.contextName),i.setAttribute("data-requiremodule",t),i.attachEvent&&!(i.attachEvent.toString&&i.attachEvent.toString().indexOf("[native code")<0)&&!isOpera?(useInteractive=!0,i.attachEvent("onreadystatechange",e.onScriptLoad)):(i.addEventListener("load",e.onScriptLoad,!1),i.addEventListener("error",e.onScriptError,!1)),i.src=n,currentlyAddingScript=i,baseElement?head.insertBefore(i,baseElement):head.appendChild(i),currentlyAddingScript=null,i;if(isWebWorker)try{importScripts(n),e.completeLoad(t)}catch(s){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+n,s,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){head||(head=e.parentNode),dataMain=e.getAttribute("data-main");if(dataMain)return mainScript=dataMain,cfg.baseUrl||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(e,t,n){var r,i;typeof e!="string"&&(n=t,t=e,e=null),isArray(t)||(n=t,t=null),!t&&isFunction(n)&&(t=[],n.length&&(n.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(e,n){t.push(n)}),t=(n.length===1?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(r=currentlyAddingScript||getInteractiveScript(),r&&(e||(e=r.getAttribute("data-requiremodule")),i=contexts[r.getAttribute("data-requirecontext")])),(i?i.defQueue:globalDefQueue).push([e,t,n])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)})(this),define("../node_modules/requirejs/require",function(){}),function(e,t){typeof module=="object"&&typeof module.exports=="object"?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}(typeof window!="undefined"?window:this,function(window,noGlobal){function isArraylike(e){var t=e.length,n=jQuery.type(e);return n==="function"||jQuery.isWindow(e)?!1:e.nodeType===1&&t?!0:n==="array"||t===0||typeof t=="number"&&t>0&&t-1 in e}function winnow(e,t,n){if(jQuery.isFunction(t))return jQuery.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return jQuery.grep(e,function(e){return e===t!==n});if(typeof t=="string"){if(risSimple.test(t))return jQuery.filter(t,e,n);t=jQuery.filter(t,e)}return jQuery.grep(e,function(e){return indexOf.call(t,e)>=0!==n})}function sibling(e,t){while((e=e[t])&&e.nodeType!==1);return e}function createOptions(e){var t=optionsCache[e]={};return jQuery.each(e.match(rnotwhite)||[],function(e,n){t[n]=!0}),t}function completed(){document.removeEventListener("DOMContentLoaded",completed,!1),window.removeEventListener("load",completed,!1),jQuery.ready()}function Data(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=jQuery.expando+Math.random()}function dataAttr(e,t,n){var r;if(n===undefined&&e.nodeType===1){r="data-"+t.replace(rmultiDash,"-$1").toLowerCase(),n=e.getAttribute(r);if(typeof n=="string"){try{n=n==="true"?!0:n==="false"?!1:n==="null"?null:+n+""===n?+n:rbrace.test(n)?jQuery.parseJSON(n):n}catch(i){}data_user.set(e,t,n)}else n=undefined}return n}function returnTrue(){return!0}function returnFalse(){return!1}function safeActiveElement(){try{return document.activeElement}catch(e){}}function manipulationTarget(e,t){return jQuery.nodeName(e,"table")&&jQuery.nodeName(t.nodeType!==11?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function disableScript(e){return e.type=(e.getAttribute("type")!==null)+"/"+e.type,e}function restoreScript(e){var t=rscriptTypeMasked.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function setGlobalEval(e,t){var n=0,r=e.length;for(;n<r;n++)data_priv.set(e[n],"globalEval",!t||data_priv.get(t[n],"globalEval"))}function cloneCopyEvent(e,t){var n,r,i,s,o,u,a,f;if(t.nodeType!==1)return;if(data_priv.hasData(e)){s=data_priv.access(e),o=data_priv.set(t,s),f=s.events;if(f){delete o.handle,o.events={};for(i in f)for(n=0,r=f[i].length;n<r;n++)jQuery.event.add(t,i,f[i][n])}}data_user.hasData(e)&&(u=data_user.access(e),a=jQuery.extend({},u),data_user.set(t,a))}function getAll(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return t===undefined||t&&jQuery.nodeName(e,t)?jQuery.merge([e],n):n}function fixInput(e,t){var n=t.nodeName.toLowerCase();if(n==="input"&&rcheckableType.test(e.type))t.checked=e.checked;else if(n==="input"||n==="textarea")t.defaultValue=e.defaultValue}function actualDisplay(e,t){var n,r=jQuery(t.createElement(e)).appendTo(t.body),i=window.getDefaultComputedStyle&&(n=window.getDefaultComputedStyle(r[0]))?n.display:jQuery.css(r[0],"display");return r.detach(),i}function defaultDisplay(e){var t=document,n=elemdisplay[e];if(!n){n=actualDisplay(e,t);if(n==="none"||!n)iframe=(iframe||jQuery("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=iframe[0].contentDocument,t.write(),t.close(),n=actualDisplay(e,t),iframe.detach();elemdisplay[e]=n}return n}function curCSS(e,t,n){var r,i,s,o,u=e.style;return n=n||getStyles(e),n&&(o=n.getPropertyValue(t)||n[t]),n&&(o===""&&!jQuery.contains(e.ownerDocument,e)&&(o=jQuery.style(e,t)),rnumnonpx.test(o)&&rmargin.test(t)&&(r=u.width,i=u.minWidth,s=u.maxWidth,u.minWidth=u.maxWidth=u.width=o,o=n.width,u.width=r,u.minWidth=i,u.maxWidth=s)),o!==undefined?o+"":o}function addGetHookIf(e,t){return{get:function(){if(e()){delete this.get;return}return(this.get=t).apply(this,arguments)}}}function vendorPropName(e,t){if(t in e)return t;var n=t[0].toUpperCase()+t.slice(1),r=t,i=cssPrefixes.length;while(i--){t=cssPrefixes[i]+n;if(t in e)return t}return r}function setPositiveNumber(e,t,n){var r=rnumsplit.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function augmentWidthOrHeight(e,t,n,r,i){var s=n===(r?"border":"content")?4:t==="width"?1:0,o=0;for(;s<4;s+=2)n==="margin"&&(o+=jQuery.css(e,n+cssExpand[s],!0,i)),r?(n==="content"&&(o-=jQuery.css(e,"padding"+cssExpand[s],!0,i)),n!=="margin"&&(o-=jQuery.css(e,"border"+cssExpand[s]+"Width",!0,i))):(o+=jQuery.css(e,"padding"+cssExpand[s],!0,i),n!=="padding"&&(o+=jQuery.css(e,"border"+cssExpand[s]+"Width",!0,i)));return o}function getWidthOrHeight(e,t,n){var r=!0,i=t==="width"?e.offsetWidth:e.offsetHeight,s=getStyles(e),o=jQuery.css(e,"boxSizing",!1,s)==="border-box";if(i<=0||i==null){i=curCSS(e,t,s);if(i<0||i==null)i=e.style[t];if(rnumnonpx.test(i))return i;r=o&&(support.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+augmentWidthOrHeight(e,t,n||(o?"border":"content"),r,s)+"px"}function showHide(e,t){var n,r,i,s=[],o=0,u=e.length;for(;o<u;o++){r=e[o];if(!r.style)continue;s[o]=data_priv.get(r,"olddisplay"),n=r.style.display,t?(!s[o]&&n==="none"&&(r.style.display=""),r.style.display===""&&isHidden(r)&&(s[o]=data_priv.access(r,"olddisplay",defaultDisplay(r.nodeName)))):(i=isHidden(r),(n!=="none"||!i)&&data_priv.set(r,"olddisplay",i?n:jQuery.css(r,"display")))}for(o=0;o<u;o++){r=e[o];if(!r.style)continue;if(!t||r.style.display==="none"||r.style.display==="")r.style.display=t?s[o]||"":"none"}return e}function Tween(e,t,n,r,i){return new Tween.prototype.init(e,t,n,r,i)}function createFxNow(){return setTimeout(function(){fxNow=undefined}),fxNow=jQuery.now()}function genFx(e,t){var n,r=0,i={height:e};t=t?1:0;for(;r<4;r+=2-t)n=cssExpand[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function createTween(e,t,n){var r,i=(tweeners[t]||[]).concat(tweeners["*"]),s=0,o=i.length;for(;s<o;s++)if(r=i[s].call(n,t,e))return r}function defaultPrefilter(e,t,n){var r,i,s,o,u,a,f,l,c=this,h={},p=e.style,d=e.nodeType&&isHidden(e),v=data_priv.get(e,"fxshow");n.queue||(u=jQuery._queueHooks(e,"fx"),u.unqueued==null&&(u.unqueued=0,a=u.empty.fire,u.empty.fire=function(){u.unqueued||a()}),u.unqueued++,c.always(function(){c.always(function(){u.unqueued--,jQuery.queue(e,"fx").length||u.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],f=jQuery.css(e,"display"),l=f==="none"?data_priv.get(e,"olddisplay")||defaultDisplay(e.nodeName):f,l==="inline"&&jQuery.css(e,"float")==="none"&&(p.display="inline-block")),n.overflow&&(p.overflow="hidden",c.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t){i=t[r];if(rfxtypes.exec(i)){delete t[r],s=s||i==="toggle";if(i===(d?"hide":"show")){if(i!=="show"||!v||v[r]===undefined)continue;d=!0}h[r]=v&&v[r]||jQuery.style(e,r)}else f=undefined}if(!jQuery.isEmptyObject(h)){v?"hidden"in v&&(d=v.hidden):v=data_priv.access(e,"fxshow",{}),s&&(v.hidden=!d),d?jQuery(e).show():c.done(function(){jQuery(e).hide()}),c.done(function(){var t;data_priv.remove(e,"fxshow");for(t in h)jQuery.style(e,t,h[t])});for(r in h)o=createTween(d?v[r]:0,r,c),r in v||(v[r]=o.start,d&&(o.end=o.start,o.start=r==="width"||r==="height"?1:0))}else(f==="none"?defaultDisplay(e.nodeName):f)==="inline"&&(p.display=f)}function propFilter(e,t){var n,r,i,s,o;for(n in e){r=jQuery.camelCase(n),i=t[r],s=e[n],jQuery.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=jQuery.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function Animation(e,t,n){var r,i,s=0,o=animationPrefilters.length,u=jQuery.Deferred().always(function(){delete a.elem}),a=function(){if(i)return!1;var t=fxNow||createFxNow(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,s=1-r,o=0,a=f.tweens.length;for(;o<a;o++)f.tweens[o].run(s);return u.notifyWith(e,[f,s,n]),s<1&&a?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:jQuery.extend({},t),opts:jQuery.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:fxNow||createFxNow(),duration:n.duration,tweens:[],createTween:function(t,n){var r=jQuery.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(r),r},stop:function(t){var n=0,r=t?f.tweens.length:0;if(i)return this;i=!0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;propFilter(l,f.opts.specialEasing);for(;s<o;s++){r=animationPrefilters[s].call(f,e,l,f.opts);if(r)return r}return jQuery.map(l,createTween,f),jQuery.isFunction(f.opts.start)&&f.opts.start.call(e,f),jQuery.fx.timer(jQuery.extend(a,{elem:e,anim:f,queue:f.opts.queue})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function addToPrefiltersOrTransports(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i=0,s=t.toLowerCase().match(rnotwhite)||[];if(jQuery.isFunction(n))while(r=s[i++])r[0]==="+"?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function inspectPrefiltersOrTransports(e,t,n,r){function o(u){var a;return i[u]=!0,jQuery.each(e[u]||[],function(e,u){var f=u(t,n,r);if(typeof f=="string"&&!s&&!i[f])return t.dataTypes.unshift(f),o(f),!1;if(s)return!(a=f)}),a}var i={},s=e===transports;return o(t.dataTypes[0])||!i["*"]&&o("*")}function ajaxExtend(e,t){var n,r,i=jQuery.ajaxSettings.flatOptions||{};for(n in t)t[n]!==undefined&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&jQuery.extend(!0,e,r),e}function ajaxHandleResponses(e,t,n){var r,i,s,o,u=e.contents,a=e.dataTypes;while(a[0]==="*")a.shift(),r===undefined&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in u)if(u[i]&&u[i].test(r)){a.unshift(i);break}if(a[0]in n)s=a[0];else{for(i in n){if(!a[0]||e.converters[i+" "+a[0]]){s=i;break}o||(o=i)}s=s||o}if(s)return s!==a[0]&&a.unshift(s),n[s]}function ajaxConvert(e,t,n,r){var i,s,o,u,a,f={},l=e.dataTypes.slice();if(l[1])for(o in e.converters)f[o.toLowerCase()]=e.converters[o];s=l.shift();while(s){e.responseFields[s]&&(n[e.responseFields[s]]=t),!a&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),a=s,s=l.shift();if(s)if(s==="*")s=a;else if(a!=="*"&&a!==s){o=f[a+" "+s]||f["* "+s];if(!o)for(i in f){u=i.split(" ");if(u[1]===s){o=f[a+" "+u[0]]||f["* "+u[0]];if(o){o===!0?o=f[i]:f[i]!==!0&&(s=u[0],l.unshift(u[1]));break}}}if(o!==!0)if(o&&e["throws"])t=o(t);else try{t=o(t)}catch(c){return{state:"parsererror",error:o?c:"No conversion from "+a+" to "+s}}}}return{state:"success",data:t}}function buildParams(e,t,n,r){var i;if(jQuery.isArray(t))jQuery.each(t,function(t,i){n||rbracket.test(e)?r(e,i):buildParams(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&jQuery.type(t)==="object")for(i in t)buildParams(e+"["+i+"]",t[i],n,r);else r(e,t)}function getWindow(e){return jQuery.isWindow(e)?e:e.nodeType===9&&e.defaultView}var arr=[],slice=arr.slice,concat=arr.concat,push=arr.push,indexOf=arr.indexOf,class2type={},toString=class2type.toString,hasOwn=class2type.hasOwnProperty,support={},document=window.document,version="2.1.1",jQuery=function(e,t){return new jQuery.fn.init(e,t)},rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,rmsPrefix=/^-ms-/,rdashAlpha=/-([\da-z])/gi,fcamelCase=function(e,t){return t.toUpperCase()};jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,selector:"",length:0,toArray:function(){return slice.call(this)},get:function(e){return e!=null?e<0?this[e+this.length]:this[e]:slice.call(this)},pushStack:function(e){var t=jQuery.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return jQuery.each(this,e,t)},map:function(e){return this.pushStack(jQuery.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(slice.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:push,sort:arr.sort,splice:arr.splice},jQuery.extend=jQuery.fn.extend=function(){var e,t,n,r,i,s,o=arguments[0]||{},u=1,a=arguments.length,f=!1;typeof o=="boolean"&&(f=o,o=arguments[u]||{},u++),typeof o!="object"&&!jQuery.isFunction(o)&&(o={}),u===a&&(o=this,u--);for(;u<a;u++)if((e=arguments[u])!=null)for(t in e){n=o[t],r=e[t];if(o===r)continue;f&&r&&(jQuery.isPlainObject(r)||(i=jQuery.isArray(r)))?(i?(i=!1,s=n&&jQuery.isArray(n)?n:[]):s=n&&jQuery.isPlainObject(n)?n:{},o[t]=jQuery.extend(f,s,r)):r!==undefined&&(o[t]=r)}return o},jQuery.extend({expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return jQuery.type(e)==="function"},isArray:Array.isArray,isWindow:function(e){return e!=null&&e===e.window},isNumeric:function(e){return!jQuery.isArray(e)&&e-parseFloat(e)>=0},isPlainObject:function(e){return jQuery.type(e)!=="object"||e.nodeType||jQuery.isWindow(e)?!1:e.constructor&&!hasOwn.call(e.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return e==null?e+"":typeof e=="object"||typeof e=="function"?class2type[toString.call(e)]||"object":typeof e},globalEval:function(code){var script,indirect=eval;code=jQuery.trim(code),code&&(code.indexOf("use strict")===1?(script=document.createElement("script"),script.text=code,document.head.appendChild(script).parentNode.removeChild(script)):indirect(code))},camelCase:function(e){return e.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,s=e.length,o=isArraylike(e);if(n)if(o)for(;i<s;i++){r=t.apply(e[i],n);if(r===!1)break}else for(i in e){r=t.apply(e[i],n);if(r===!1)break}else if(o)for(;i<s;i++){r=t.call(e[i],i,e[i]);if(r===!1)break}else for(i in e){r=t.call(e[i],i,e[i]);if(r===!1)break}return e},trim:function(e){return e==null?"":(e+"").replace(rtrim,"")},makeArray:function(e,t){var n=t||[];return e!=null&&(isArraylike(Object(e))?jQuery.merge(n,typeof e=="string"?[e]:e):push.call(n,e)),n},inArray:function(e,t,n){return t==null?-1:indexOf.call(t,e,n)},merge:function(e,t){var n=+t.length,r=0,i=e.length;for(;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length,u=!n;for(;s<o;s++)r=!t(e[s],s),r!==u&&i.push(e[s]);return i},map:function(e,t,n){var r,i=0,s=e.length,o=isArraylike(e),u=[];if(o)for(;i<s;i++)r=t(e[i],i,n),r!=null&&u.push(r);else for(i in e)r=t(e[i],i,n),r!=null&&u.push(r);return concat.apply([],u)},guid:1,proxy:function(e,t){var n,r,i;return typeof t=="string"&&(n=e[t],t=e,e=n),jQuery.isFunction(e)?(r=slice.call(arguments,2),i=function(){return e.apply(t||this,r.concat(slice.call(arguments)))},i.guid=e.guid=e.guid||jQuery.guid++,i):undefined},now:Date.now,support:support}),jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){class2type["[object "+t+"]"]=t.toLowerCase()});var Sizzle=function(e){function st(e,t,r,i){var s,u,f,l,c,d,g,y,S,x;(t?t.ownerDocument||t:E)!==p&&h(t),t=t||p,r=r||[];if(!e||typeof e!="string")return r;if((l=t.nodeType)!==1&&l!==9)return[];if(v&&!i){if(s=Z.exec(e))if(f=s[1]){if(l===9){u=t.getElementById(f);if(!u||!u.parentNode)return r;if(u.id===f)return r.push(u),r}else if(t.ownerDocument&&(u=t.ownerDocument.getElementById(f))&&b(t,u)&&u.id===f)return r.push(u),r}else{if(s[2])return P.apply(r,t.getElementsByTagName(e)),r;if((f=s[3])&&n.getElementsByClassName&&t.getElementsByClassName)return P.apply(r,t.getElementsByClassName(f)),r}if(n.qsa&&(!m||!m.test(e))){y=g=w,S=t,x=l===9&&e;if(l===1&&t.nodeName.toLowerCase()!=="object"){d=o(e),(g=t.getAttribute("id"))?y=g.replace(tt,"\\$&"):t.setAttribute("id",y),y="[id='"+y+"'] ",c=d.length;while(c--)d[c]=y+mt(d[c]);S=et.test(e)&&dt(t.parentNode)||t,x=d.join(",")}if(x)try{return P.apply(r,S.querySelectorAll(x)),r}catch(T){}finally{g||t.removeAttribute("id")}}}return a(e.replace(z,"$1"),t,r,i)}function ot(){function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function ut(e){return e[w]=!0,e}function at(e){var t=p.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ft(e,t){var n=e.split("|"),i=e.length;while(i--)r.attrHandle[n[i]]=t}function lt(e,t){var n=t&&e,r=n&&e.nodeType===1&&t.nodeType===1&&(~t.sourceIndex||A)-(~e.sourceIndex||A);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function ht(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function pt(e){return ut(function(t){return t=+t,ut(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function dt(e){return e&&typeof e.getElementsByTagName!==L&&e}function vt(){}function mt(e){var t=0,n=e.length,r="";for(;t<n;t++)r+=e[t].value;return r}function gt(e,t,n){var r=t.dir,i=n&&r==="parentNode",s=x++;return t.first?function(t,n,s){while(t=t[r])if(t.nodeType===1||i)return e(t,n,s)}:function(t,n,o){var u,a,f=[S,s];if(o){while(t=t[r])if(t.nodeType===1||i)if(e(t,n,o))return!0}else while(t=t[r])if(t.nodeType===1||i){a=t[w]||(t[w]={});if((u=a[r])&&u[0]===S&&u[1]===s)return f[2]=u[2];a[r]=f;if(f[2]=e(t,n,o))return!0}}}function yt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function bt(e,t,n){var r=0,i=t.length;for(;r<i;r++)st(e,t[r],n);return n}function wt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function Et(e,t,n,r,i,s){return r&&!r[w]&&(r=Et(r)),i&&!i[w]&&(i=Et(i,s)),ut(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||bt(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?wt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=wt(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?B.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=wt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):P.apply(o,g)})}function St(e){var t,n,i,s=e.length,o=r.relative[e[0].type],u=o||r.relative[" "],a=o?1:0,l=gt(function(e){return e===t},u,!0),c=gt(function(e){return B.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==f)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];for(;a<s;a++)if(n=r.relative[e[a].type])h=[gt(yt(h),n)];else{n=r.filter[e[a].type].apply(null,e[a].matches);if(n[w]){i=++a;for(;i<s;i++)if(r.relative[e[i].type])break;return Et(a>1&&yt(h),a>1&&mt(e.slice(0,a-1).concat({value:e[a-2].type===" "?"*":""})).replace(z,"$1"),n,a<i&&St(e.slice(a,i)),i<s&&St(e=e.slice(i)),i<s&&mt(e))}h.push(n)}return yt(h)}function xt(e,t){var n=t.length>0,i=e.length>0,s=function(s,o,u,a,l){var c,h,d,v=0,m="0",g=s&&[],y=[],b=f,w=s||i&&r.find.TAG("*",l),E=S+=b==null?1:Math.random()||.1,x=w.length;l&&(f=o!==p&&o);for(;m!==x&&(c=w[m])!=null;m++){if(i&&c){h=0;while(d=e[h++])if(d(c,o,u)){a.push(c);break}l&&(S=E)}n&&((c=!d&&c)&&v--,s&&g.push(c))}v+=m;if(n&&m!==v){h=0;while(d=t[h++])d(g,y,o,u);if(s){if(v>0)while(m--)!g[m]&&!y[m]&&(y[m]=_.call(a));y=wt(y)}P.apply(a,y),l&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(a)}return l&&(S=E,f=b),g};return n?ut(s):s}var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w="sizzle"+ -(new Date),E=e.document,S=0,x=0,T=ot(),N=ot(),C=ot(),k=function(e,t){return e===t&&(c=!0),0},L=typeof undefined,A=1<<31,O={}.hasOwnProperty,M=[],_=M.pop,D=M.push,P=M.push,H=M.slice,B=M.indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},j="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",F="[\\x20\\t\\r\\n\\f]",I="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",q=I.replace("w","w#"),R="\\["+F+"*("+I+")(?:"+F+"*([*^$|!~]?=)"+F+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+q+"))|)"+F+"*\\]",U=":("+I+")(?:\\(("+"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|"+"((?:\\\\.|[^\\\\()[\\]]|"+R+")*)|"+".*"+")\\)|)",z=new RegExp("^"+F+"+|((?:^|[^\\\\])(?:\\\\.)*)"+F+"+$","g"),W=new RegExp("^"+F+"*,"+F+"*"),X=new RegExp("^"+F+"*([>+~]|"+F+")"+F+"*"),V=new RegExp("="+F+"*([^\\]'\"]*?)"+F+"*\\]","g"),$=new RegExp(U),J=new RegExp("^"+q+"$"),K={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I.replace("w","w*")+")"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+U),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+F+"*(even|odd|(([+-]|)(\\d*)n|)"+F+"*(?:([+-]|)"+F+"*(\\d+)|))"+F+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+F+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+F+"*((?:-\\d)?\\d*)"+F+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,G=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/[+~]/,tt=/'|\\/g,nt=new RegExp("\\\\([\\da-f]{1,6}"+F+"?|("+F+")|.)","ig"),rt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)};try{P.apply(M=H.call(E.childNodes),E.childNodes),M[E.childNodes.length].nodeType}catch(it){P={apply:M.length?function(e,t){D.apply(e,H.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}n=st.support={},s=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},h=st.setDocument=function(e){var t,i=e?e.ownerDocument||e:E,o=i.defaultView;if(i===p||i.nodeType!==9||!i.documentElement)return p;p=i,d=i.documentElement,v=!s(i),o&&o!==o.top&&(o.addEventListener?o.addEventListener("unload",function(){h()},!1):o.attachEvent&&o.attachEvent("onunload",function(){h()})),n.attributes=at(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=at(function(e){return e.appendChild(i.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Y.test(i.getElementsByClassName)&&at(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",e.getElementsByClassName("i").length===2}),n.getById=at(function(e){return d.appendChild(e).id=w,!i.getElementsByName||!i.getElementsByName(w).length}),n.getById?(r.find.ID=function(e,t){if(typeof t.getElementById!==L&&v){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},r.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){return e.getAttribute("id")===t}}):(delete r.find.ID,r.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){var n=typeof e.getAttributeNode!==L&&e.getAttributeNode("id");return n&&n.value===t}}),r.find.TAG=n.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==L)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],i=0,s=t.getElementsByTagName(e);if(e==="*"){while(n=s[i++])n.nodeType===1&&r.push(n);return r}return s},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(typeof t.getElementsByClassName!==L&&v)return t.getElementsByClassName(e)},g=[],m=[];if(n.qsa=Y.test(i.querySelectorAll))at(function(e){e.innerHTML="<select msallowclip=''><option selected=''></option></select>",e.querySelectorAll("[msallowclip^='']").length&&m.push("[*^$]="+F+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+F+"*(?:value|"+j+")"),e.querySelectorAll(":checked").length||m.push(":checked")}),at(function(e){var t=i.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+F+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")});return(n.matchesSelector=Y.test(y=d.matches||d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&at(function(e){n.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),g.push("!=",U)}),m=m.length&&new RegExp(m.join("|")),g=g.length&&new RegExp(g.join("|")),t=Y.test(d.compareDocumentPosition),b=t||Y.test(d.contains)?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!r&&r.nodeType===1&&!!(n.contains?n.contains(r):e.compareDocumentPosition&&e.compareDocumentPosition(r)&16)}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},k=t?function(e,t){if(e===t)return c=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r?r:(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,r&1||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===i||e.ownerDocument===E&&b(E,e)?-1:t===i||t.ownerDocument===E&&b(E,t)?1:l?B.call(l,e)-B.call(l,t):0:r&4?-1:1)}:function(e,t){if(e===t)return c=!0,0;var n,r=0,s=e.parentNode,o=t.parentNode,u=[e],a=[t];if(!s||!o)return e===i?-1:t===i?1:s?-1:o?1:l?B.call(l,e)-B.call(l,t):0;if(s===o)return lt(e,t);n=e;while(n=n.parentNode)u.unshift(n);n=t;while(n=n.parentNode)a.unshift(n);while(u[r]===a[r])r++;return r?lt(u[r],a[r]):u[r]===E?-1:a[r]===E?1:0},i},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){(e.ownerDocument||e)!==p&&h(e),t=t.replace(V,"='$1']");if(n.matchesSelector&&v&&(!g||!g.test(t))&&(!m||!m.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&e.document.nodeType!==11)return r}catch(i){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&h(e),b(e,t)},st.attr=function(e,t){(e.ownerDocument||e)!==p&&h(e);var i=r.attrHandle[t.toLowerCase()],s=i&&O.call(r.attrHandle,t.toLowerCase())?i(e,t,!v):undefined;return s!==undefined?s:n.attributes||!v?e.getAttribute(t):(s=e.getAttributeNode(t))&&s.specified?s.value:null},st.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,r=[],i=0,s=0;c=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(k);if(c){while(t=e[s++])t===e[s]&&(i=r.push(s));while(i--)e.splice(r[i],1)}return l=null,e},i=st.getText=function(e){var t,n="",r=0,s=e.nodeType;if(!s)while(t=e[r++])n+=i(t);else if(s===1||s===9||s===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(s===3||s===4)return e.nodeValue;return n},r=st.selectors={cacheLength:50,createPseudo:ut,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(nt,rt),e[3]=(e[3]||e[4]||e[5]||"").replace(nt,rt),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1].slice(0,3)==="nth"?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]==="even"||e[3]==="odd")),e[5]=+(e[7]+e[8]||e[3]==="odd")):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return K.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&$.test(n)&&(t=o(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(nt,rt).toLowerCase();return e==="*"?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|"+F+")"+e+"("+F+"|$)"))&&T(e,function(e){return t.test(typeof e.className=="string"&&e.className||typeof e.getAttribute!==L&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return i==null?t==="!=":t?(i+="",t==="="?i===n:t==="!="?i!==n:t==="^="?n&&i.indexOf(n)===0:t==="*="?n&&i.indexOf(n)>-1:t==="$="?n&&i.slice(-n.length)===n:t==="~="?(" "+i+" ").indexOf(n)>-1:t==="|="?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var s=e.slice(0,3)!=="nth",o=e.slice(-4)!=="last",u=t==="of-type";return r===1&&i===0?function(e){return!!e.parentNode}:function(t,n,a){var f,l,c,h,p,d,v=s!==o?"nextSibling":"previousSibling",m=t.parentNode,g=u&&t.nodeName.toLowerCase(),y=!a&&!u;if(m){if(s){while(v){c=t;while(c=c[v])if(u?c.nodeName.toLowerCase()===g:c.nodeType===1)return!1;d=v=e==="only"&&!d&&"nextSibling"}return!0}d=[o?m.firstChild:m.lastChild];if(o&&y){l=m[w]||(m[w]={}),f=l[e]||[],p=f[0]===S&&f[1],h=f[0]===S&&f[2],c=p&&m.childNodes[p];while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if(c.nodeType===1&&++h&&c===t){l[e]=[S,p,h];break}}else if(y&&(f=(t[w]||(t[w]={}))[e])&&f[0]===S)h=f[1];else while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if((u?c.nodeName.toLowerCase()===g:c.nodeType===1)&&++h){y&&((c[w]||(c[w]={}))[e]=[S,h]);if(c===t)break}return h-=i,h===r||h%r===0&&h/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return i[w]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ut(function(e,n){var r,s=i(e,t),o=s.length;while(o--)r=B.call(e,s[o]),e[r]=!(n[r]=s[o])}):function(e){return i(e,0,n)}):i}},pseudos:{not:ut(function(e){var t=[],n=[],r=u(e.replace(z,"$1"));return r[w]?ut(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:ut(function(e){return function(t){return st(e,t).length>0}}),contains:ut(function(e){return function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:ut(function(e){return J.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(nt,rt).toLowerCase(),function(t){var n;do if(n=v?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||n.indexOf(e+"-")===0;while((t=t.parentNode)&&t.nodeType===1);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return G.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},text:function(e){var t;return e.nodeName.toLowerCase()==="input"&&e.type==="text"&&((t=e.getAttribute("type"))==null||t.toLowerCase()==="text")},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[n<0?n+t:n]}),even:pt(function(e,t){var n=0;for(;n<t;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;n<t;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=n<0?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=n<0?n+t:n;for(;++r<t;)e.push(r);return e})}},r.pseudos.nth=r.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=ct(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=ht(t);return vt.prototype=r.filters=r.pseudos,r.setFilters=new vt,o=st.tokenize=function(e,t){var n,i,s,o,u,a,f,l=N[e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=r.preFilter;while(u){if(!n||(i=W.exec(u)))i&&(u=u.slice(i[0].length)||u),a.push(s=[]);n=!1;if(i=X.exec(u))n=i.shift(),s.push({value:n,type:i[0].replace(z," ")}),u=u.slice(n.length);for(o in r.filter)(i=K[o].exec(u))&&(!f[o]||(i=f[o](i)))&&(n=i.shift(),s.push({value:n,type:o,matches:i}),u=u.slice(n.length));if(!n)break}return t?u.length:u?st.error(e):N(e,a).slice(0)},u=st.compile=function(e,t){var n,r=[],i=[],s=C[e+" "];if(!s){t||(t=o(e)),n=t.length;while(n--)s=St(t[n]),s[w]?r.push(s):i.push(s);s=C(e,xt(i,r)),s.selector=e}return s},a=st.select=function(e,t,i,s){var a,f,l,c,h,p=typeof e=="function"&&e,d=!s&&o(e=p.selector||e);i=i||[];if(d.length===1){f=d[0]=d[0].slice(0);if(f.length>2&&(l=f[0]).type==="ID"&&n.getById&&t.nodeType===9&&v&&r.relative[f[1].type]){t=(r.find.ID(l.matches[0].replace(nt,rt),t)||[])[0];if(!t)return i;p&&(t=t.parentNode),e=e.slice(f.shift().value.length)}a=K.needsContext.test(e)?0:f.length;while(a--){l=f[a];if(r.relative[c=l.type])break;if(h=r.find[c])if(s=h(l.matches[0].replace(nt,rt),et.test(f[0].type)&&dt(t.parentNode)||t)){f.splice(a,1),e=s.length&&mt(f);if(!e)return P.apply(i,s),i;break}}}return(p||u(e,d))(s,t,!v,i,et.test(e)&&dt(t.parentNode)||t),i},n.sortStable=w.split("").sort(k).join("")===w,n.detectDuplicates=!!c,h(),n.sortDetached=at(function(e){return e.compareDocumentPosition(p.createElement("div"))&1}),at(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild.getAttribute("href")==="#"})||ft("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,t.toLowerCase()==="type"?1:2)}),(!n.attributes||!at(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),e.firstChild.getAttribute("value")===""}))&&ft("value",function(e,t,n){if(!n&&e.nodeName.toLowerCase()==="input")return e.defaultValue}),at(function(e){return e.getAttribute("disabled")==null})||ft(j,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),st}(window);jQuery.find=Sizzle,jQuery.expr=Sizzle.selectors,jQuery.expr[":"]=jQuery.expr.pseudos,jQuery.unique=Sizzle.uniqueSort,jQuery.text=Sizzle.getText,jQuery.isXMLDoc=Sizzle.isXML,jQuery.contains=Sizzle.contains;var rneedsContext=jQuery.expr.match.needsContext,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,risSimple=/^.[^:#\[\.,]*$/;jQuery.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),t.length===1&&r.nodeType===1?jQuery.find.matchesSelector(r,e)?[r]:[]:jQuery.find.matches(e,jQuery.grep(t,function(e){return e.nodeType===1}))},jQuery.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if(typeof e!="string")return this.pushStack(jQuery(e).filter(function(){for(t=0;t<n;t++)if(jQuery.contains(i[t],this))return!0}));for(t=0;t<n;t++)jQuery.find(e,i[t],r);return r=this.pushStack(n>1?jQuery.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(winnow(this,e||[],!1))},not:function(e){return this.pushStack(winnow(this,e||[],!0))},is:function(e){return!!winnow(this,typeof e=="string"&&rneedsContext.test(e)?jQuery(e):e||[],!1).length}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,init=jQuery.fn.init=function(e,t){var n,r;if(!e)return this;if(typeof e=="string"){e[0]==="<"&&e[e.length-1]===">"&&e.length>=3?n=[null,e,null]:n=rquickExpr.exec(e);if(n&&(n[1]||!t)){if(n[1]){t=t instanceof jQuery?t[0]:t,jQuery.merge(this,jQuery.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:document,!0));if(rsingleTag.test(n[1])&&jQuery.isPlainObject(t))for(n in t)jQuery.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return r=document.getElementById(n[2]),r&&r.parentNode&&(this.length=1,this[0]=r),this.context=document,this.selector=e,this}return!t||t.jquery?(t||rootjQuery).find(e):this.constructor(t).find(e)}return e.nodeType?(this.context=this[0]=e,this.length=1,this):jQuery.isFunction(e)?typeof rootjQuery.ready!="undefined"?rootjQuery.ready(e):e(jQuery):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),jQuery.makeArray(e,this))};init.prototype=jQuery.fn,rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:!0,contents:!0,next:!0,prev:!0};jQuery.extend({dir:function(e,t,n){var r=[],i=n!==undefined;while((e=e[t])&&e.nodeType!==9)if(e.nodeType===1){if(i&&jQuery(e).is(n))break;r.push(e)}return r},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}}),jQuery.fn.extend({has:function(e){var t=jQuery(e,this),n=t.length;return this.filter(function(){var e=0;for(;e<n;e++)if(jQuery.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,s=[],o=rneedsContext.test(e)||typeof e!="string"?jQuery(e,t||this.context):0;for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:n.nodeType===1&&jQuery.find.matchesSelector(n,e))){s.push(n);break}return this.pushStack(s.length>1?jQuery.unique(s):s)},index:function(e){return e?typeof e=="string"?indexOf.call(jQuery(e),this[0]):indexOf.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),jQuery(e,t))))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),jQuery.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return jQuery.dir(e,"parentNode")},parentsUntil:function(e,t,n){return jQuery.dir(e,"parentNode",n)},next:function(e){return sibling(e,"nextSibling")},prev:function(e){return sibling(e,"previousSibling")},nextAll:function(e){return jQuery.dir(e,"nextSibling")},prevAll:function(e){return jQuery.dir(e,"previousSibling")},nextUntil:function(e,t,n){return jQuery.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return jQuery.dir(e,"previousSibling",n)},siblings:function(e){return jQuery.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return jQuery.sibling(e.firstChild)},contents:function(e){return e.contentDocument||jQuery.merge([],e.childNodes)}},function(e,t){jQuery.fn[e]=function(n,r){var i=jQuery.map(this,t,n);return e.slice(-5)!=="Until"&&(r=n),r&&typeof r=="string"&&(i=jQuery.filter(r,i)),this.length>1&&(guaranteedUnique[e]||jQuery.unique(i),rparentsprev.test(e)&&i.reverse()),this.pushStack(i)}});var rnotwhite=/\S+/g,optionsCache={};jQuery.Callbacks=function(e){e=typeof e=="string"?optionsCache[e]||createOptions(e):jQuery.extend({},e);var t,n,r,i,s,o,u=[],a=!e.once&&[],f=function(c){t=e.memory&&c,n=!0,o=i||0,i=0,s=u.length,r=!0;for(;u&&o<s;o++)if(u[o].apply(c[0],c[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,u&&(a?a.length&&f(a.shift()):t?u=[]:l.disable())},l={add:function(){if(u){var n=u.length;(function o(t){jQuery.each(t,function(t,n){var r=jQuery.type(n);r==="function"?(!e.unique||!l.has(n))&&u.push(n):n&&n.length&&r!=="string"&&o(n)})})(arguments),r?s=u.length:t&&(i=n,f(t))}return this},remove:function(){return u&&jQuery.each(arguments,function(e,t){var n;while((n=jQuery.inArray(t,u,n))>-1)u.splice(n,1),r&&(n<=s&&s--,n<=o&&o--)}),this},has:function(e){return e?jQuery.inArray(e,u)>-1:!!u&&!!u.length},empty:function(){return u=[],s=0,this},disable:function(){return u=a=t=undefined,this},disabled:function(){return!u},lock:function(){return a=undefined,t||l.disable(),this},locked:function(){return!a},fireWith:function(e,t){return u&&(!n||a)&&(t=t||[],t=[e,t.slice?t.slice():t],r?a.push(t):f(t)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!n}};return l},jQuery.extend({Deferred:function(e){var t=[["resolve","done",jQuery.Callbacks("once memory"),"resolved"],["reject","fail",jQuery.Callbacks("once memory"),"rejected"],["notify","progress",jQuery.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return jQuery.Deferred(function(n){jQuery.each(t,function(t,s){var o=jQuery.isFunction(e[t])&&e[t];i[s[1]](function(){var e=o&&o.apply(this,arguments);e&&jQuery.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s[0]+"With"](this===r?n.promise():this,o?[e]:arguments)})}),e=null}).promise()},promise:function(e){return e!=null?jQuery.extend(e,r):r}},i={};return r.pipe=r.then,jQuery.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=function(){return i[s[0]+"With"](this===i?r:this,arguments),this},i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=slice.call(arguments),r=n.length,i=r!==1||e&&jQuery.isFunction(e.promise)?r:0,s=i===1?e:jQuery.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?slice.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&jQuery.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}});var readyList;jQuery.fn.ready=function(e){return jQuery.ready.promise().done(e),this},jQuery.extend({isReady:!1,readyWait:1,holdReady:function(e){e?jQuery.readyWait++:jQuery.ready(!0)},ready:function(e){if(e===!0?--jQuery.readyWait:jQuery.isReady)return;jQuery.isReady=!0;if(e!==!0&&--jQuery.readyWait>0)return;readyList.resolveWith(document,[jQuery]),jQuery.fn.triggerHandler&&(jQuery(document).triggerHandler("ready"),jQuery(document).off("ready"))}}),jQuery.ready.promise=function(e){return readyList||(readyList=jQuery.Deferred(),document.readyState==="complete"?setTimeout(jQuery.ready):(document.addEventListener("DOMContentLoaded",completed,!1),window.addEventListener("load",completed,!1))),readyList.promise(e)},jQuery.ready.promise();var access=jQuery.access=function(e,t,n,r,i,s,o){var u=0,a=e.length,f=n==null;if(jQuery.type(n)==="object"){i=!0;for(u in n)jQuery.access(e,t,u,n[u],!0,s,o)}else if(r!==undefined){i=!0,jQuery.isFunction(r)||(o=!0),f&&(o?(t.call(e,r),t=null):(f=t,t=function(e,t,n){return f.call(jQuery(e),n)}));if(t)for(;u<a;u++)t(e[u],n,o?r:r.call(e[u],u,t(e[u],n)))}return i?e:f?t.call(e):a?t(e[0],n):s};jQuery.acceptData=function(e){return e.nodeType===1||e.nodeType===9||!+e.nodeType},Data.uid=1,Data.accepts=jQuery.acceptData,Data.prototype={key:function(e){if(!Data.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=Data.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,jQuery.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),s=this.cache[i];if(typeof t=="string")s[t]=n;else if(jQuery.isEmptyObject(s))jQuery.extend(this.cache[i],t);else for(r in t)s[r]=t[r];return s},get:function(e,t){var n=this.cache[this.key(e)];return t===undefined?n:n[t]},access:function(e,t,n){var r;return t===undefined||t&&typeof t=="string"&&n===undefined?(r=this.get(e,t),r!==undefined?r:this.get(e,jQuery.camelCase(t))):(this.set(e,t,n),n!==undefined?n:t)},remove:function(e,t){var n,r,i,s=this.key(e),o=this.cache[s];if(t===undefined)this.cache[s]={};else{jQuery.isArray(t)?r=t.concat(t.map(jQuery.camelCase)):(i=jQuery.camelCase(t),t in o?r=[t,i]:(r=i,r=r in o?[r]:r.match(rnotwhite)||[])),n=r.length;while(n--)delete o[r[n]]}},hasData:function(e){return!jQuery.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var data_priv=new Data,data_user=new Data,rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rmultiDash=/([A-Z])/g;jQuery.extend({hasData:function(e){return data_user.hasData(e)||data_priv.hasData(e)},data:function(e,t,n){return data_user.access(e,t,n)},removeData:function(e,t){data_user.remove(e,t)},_data:function(e,t,n){return data_priv.access(e,t,n)},_removeData:function(e,t){data_priv.remove(e,t)}}),jQuery.fn.extend({data:function(e,t){var n,r,i,s=this[0],o=s&&s.attributes;if(e===undefined){if(this.length){i=data_user.get(s);if(s.nodeType===1&&!data_priv.get(s,"hasDataAttrs")){n=o.length;while(n--)o[n]&&(r=o[n].name,r.indexOf("data-")===0&&(r=jQuery.camelCase(r.slice(5)),dataAttr(s,r,i[r])));data_priv.set(s,"hasDataAttrs",!0)}}return i}return typeof e=="object"?this.each(function(){data_user.set(this,e)}):access(this,function(t){var n,r=jQuery.camelCase(e);if(s&&t===undefined){n=data_user.get(s,e);if(n!==undefined)return n;n=data_user.get(s,r);if(n!==undefined)return n;n=dataAttr(s,r,undefined);if(n!==undefined)return n;return}this.each(function(){var n=data_user.get(this,r);data_user.set(this,r,t),e.indexOf("-")!==-1&&n!==undefined&&data_user.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){data_user.remove(this,e)})}}),jQuery.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=data_priv.get(e,t),n&&(!r||jQuery.isArray(n)?r=data_priv.access(e,t,jQuery.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=jQuery.queue(e,t),r=n.length,i=n.shift(),s=jQuery._queueHooks(e,t),o=function(){jQuery.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return data_priv.get(e,n)||data_priv.access(e,n,{empty:jQuery.Callbacks("once memory").add(function(){data_priv.remove(e,[t+"queue",n])})})}}),jQuery.fn.extend({queue:function(e,t){var n=2;return typeof e!="string"&&(t=e,e="fx",n--),arguments.length<n?jQuery.queue(this[0],e):t===undefined?this:this.each(function(){var n=jQuery.queue(this,e,t);jQuery._queueHooks(this,e),e==="fx"&&n[0]!=="inprogress"&&jQuery.dequeue(this,e)})},dequeue:function(e){return this.each(function(){jQuery.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=jQuery.Deferred(),s=this,o=this.length,u=function(){--r||i.resolveWith(s,[s])};typeof e!="string"&&(t=e,e=undefined),e=e||"fx";while(o--)n=data_priv.get(s[o],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(u));return u(),i.promise(t)}});var pnum=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,cssExpand=["Top","Right","Bottom","Left"],isHidden=function(e,t){return e=t||e,jQuery.css(e,"display")==="none"||!jQuery.contains(e.ownerDocument,e)},rcheckableType=/^(?:checkbox|radio)$/i;(function(){var e=document.createDocumentFragment(),t=e.appendChild(document.createElement("div")),n=document.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),support.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",support.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue})();var strundefined=typeof undefined;support.focusinBubbles="onfocusin"in window;var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rtypenamespace=/^([^.]*)(?:\.(.+)|)$/;jQuery.event={global:{},add:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m=data_priv.get(e);if(!m)return;n.handler&&(s=n,n=s.handler,i=s.selector),n.guid||(n.guid=jQuery.guid++),(a=m.events)||(a=m.events={}),(o=m.handle)||(o=m.handle=function(t){return typeof jQuery!==strundefined&&jQuery.event.triggered!==t.type?jQuery.event.dispatch.apply(e,arguments):undefined}),t=(t||"").match(rnotwhite)||[""],f=t.length;while(f--){u=rtypenamespace.exec(t[f])||[],p=v=u[1],d=(u[2]||"").split(".").sort();if(!p)continue;c=jQuery.event.special[p]||{},p=(i?c.delegateType:c.bindType)||p,c=jQuery.event.special[p]||{},l=jQuery.extend({type:p,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&jQuery.expr.match.needsContext.test(i),namespace:d.join(".")},s),(h=a[p])||(h=a[p]=[],h.delegateCount=0,(!c.setup||c.setup.call(e,r,d,o)===!1)&&e.addEventListener&&e.addEventListener(p,o,!1)),c.add&&(c.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,l):h.push(l),jQuery.event.global[p]=!0}},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m=data_priv.hasData(e)&&data_priv.get(e);if(!m||!(a=m.events))return;t=(t||"").match(rnotwhite)||[""],f=t.length;while(f--){u=rtypenamespace.exec(t[f])||[],p=v=u[1],d=(u[2]||"").split(".").sort();if(!p){for(p in a)jQuery.event.remove(e,p+t[f],n,r,!0);continue}c=jQuery.event.special[p]||{},p=(r?c.delegateType:c.bindType)||p,h=a[p]||[],u=u[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=h.length;while(s--)l=h[s],(i||v===l.origType)&&(!n||n.guid===l.guid)&&(!u||u.test(l.namespace))&&(!r||r===l.selector||r==="**"&&l.selector)&&(h.splice(s,1),l.selector&&h.delegateCount--,c.remove&&c.remove.call(e,l));o&&!h.length&&((!c.teardown||c.teardown.call(e,d,m.handle)===!1)&&jQuery.removeEvent(e,p,m.handle),delete a[p])}jQuery.isEmptyObject(a)&&(delete m.handle,data_priv.remove(e,"events"))},trigger:function(e,t,n,r){var i,s,o,u,a,f,l,c=[n||document],h=hasOwn.call(e,"type")?e.type:e,p=hasOwn.call(e,"namespace")?e.namespace.split("."):[];s=o=n=n||document;if(n.nodeType===3||n.nodeType===8)return;if(rfocusMorph.test(h+jQuery.event.triggered))return;h.indexOf(".")>=0&&(p=h.split("."),h=p.shift(),p.sort()),a=h.indexOf(":")<0&&"on"+h,e=e[jQuery.expando]?e:new jQuery.Event(h,typeof e=="object"&&e),e.isTrigger=r?2:3,e.namespace=p.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=undefined,e.target||(e.target=n),t=t==null?[e]:jQuery.makeArray(t,[e]),l=jQuery.event.special[h]||{};if(!r&&l.trigger&&l.trigger.apply(n,t)===!1)return;if(!r&&!l.noBubble&&!jQuery.isWindow(n)){u=l.delegateType||h,rfocusMorph.test(u+h)||(s=s.parentNode);for(;s;s=s.parentNode)c.push(s),o=s;o===(n.ownerDocument||document)&&c.push(o.defaultView||o.parentWindow||window)}i=0;while((s=c[i++])&&!e.isPropagationStopped())e.type=i>1?u:l.bindType||h,f=(data_priv.get(s,"events")||{})[e.type]&&data_priv.get(s,"handle"),f&&f.apply(s,t),f=a&&s[a],f&&f.apply&&jQuery.acceptData(s)&&(e.result=f.apply(s,t),e.result===!1&&e.preventDefault());return e.type=h,!r&&!e.isDefaultPrevented()&&(!l._default||l._default.apply(c.pop(),t)===!1)&&jQuery.acceptData(n)&&a&&jQuery.isFunction(n[h])&&!jQuery.isWindow(n)&&(o=n[a],o&&(n[a]=null),jQuery.event.triggered=h,n[h](),jQuery.event.triggered=undefined,o&&(n[a]=o)),e.result},dispatch:function(e){e=jQuery.event.fix(e);var t,n,r,i,s,o=[],u=slice.call(arguments),a=(data_priv.get(this,"events")||{})[e.type]||[],f=jQuery.event.special[e.type]||{};u[0]=e,e.delegateTarget=this;if(f.preDispatch&&f.preDispatch.call(this,e)===!1)return;o=jQuery.event.handlers.call(this,e,a),t=0;while((i=o[t++])&&!e.isPropagationStopped()){e.currentTarget=i.elem,n=0;while((s=i.handlers[n++])&&!e.isImmediatePropagationStopped())if(!e.namespace_re||e.namespace_re.test(s.namespace))e.handleObj=s,e.data=s.data,r=((jQuery.event.special[s.origType]||{}).handle||s.handler).apply(i.elem,u),r!==undefined&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation())}return f.postDispatch&&f.postDispatch.call(this,e),e.result},handlers:function(e,t){var n,r,i,s,o=[],u=t.delegateCount,a=e.target;if(u&&a.nodeType&&(!e.button||e.type!=="click"))for(;a!==this;a=a.parentNode||this)if(a.disabled!==!0||e.type!=="click"){r=[];for(n=0;n<u;n++)s=t[n],i=s.selector+" ",r[i]===undefined&&(r[i]=s.needsContext?jQuery(i,this).index(a)>=0:jQuery.find(i,this,null,[a]).length),r[i]&&r.push(s);r.length&&o.push({elem:a,handlers:r})}return u<t.length&&o.push({elem:this,handlers:t.slice(u)}),o},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,s=t.button;return e.pageX==null&&t.clientX!=null&&(n=e.target.ownerDocument||document,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),!e.which&&s!==undefined&&(e.which=s&1?1:s&2?3:s&4?2:0),e}},fix:function(e){if(e[jQuery.expando])return e;var t,n,r,i=e.type,s=e,o=this.fixHooks[i];o||(this.fixHooks[i]=o=rmouseEvent.test(i)?this.mouseHooks:rkeyEvent.test(i)?this.keyHooks:{}),r=o.props?this.props.concat(o.props):this.props,e=new jQuery.Event(s),t=r.length;while(t--)n=r[t],e[n]=s[n];return e.target||(e.target=document),e.target.nodeType===3&&(e.target=e.target.parentNode),o.filter?o.filter(e,s):e},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==safeActiveElement()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===safeActiveElement()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(this.type==="checkbox"&&this.click&&jQuery.nodeName(this,"input"))return this.click(),!1},_default:function(e){return jQuery.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=jQuery.extend(new jQuery.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?jQuery.event.trigger(i,null,t):jQuery.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},jQuery.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},jQuery.Event=function(e,t){if(!(this instanceof jQuery.Event))return new jQuery.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.defaultPrevented===undefined&&e.returnValue===!1?returnTrue:returnFalse):this.type=e,t&&jQuery.extend(this,t),this.timeStamp=e&&e.timeStamp||jQuery.now(),this[jQuery.expando]=!0},jQuery.Event.prototype={isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=returnTrue,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=returnTrue,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){jQuery.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj;if(!i||i!==r&&!jQuery.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),support.focusinBubbles||jQuery.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){jQuery.event.simulate(t,e.target,jQuery.event.fix(e),!0)};jQuery.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=data_priv.access(r,t);i||r.addEventListener(e,n,!0),data_priv.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=data_priv.access(r,t)-1;i?data_priv.access(r,t,i):(r.removeEventListener(e,n,!0),data_priv.remove(r,t))}}}),jQuery.fn.extend({on:function(e,t,n,r,i){var s,o;if(typeof e=="object"){typeof t!="string"&&(n=n||t,t=undefined);for(o in e)this.on(o,t,n,e[o],i);return this}n==null&&r==null?(r=t,n=t=undefined):r==null&&(typeof t=="string"?(r=n,n=undefined):(r=n,n=t,t=undefined));if(r===!1)r=returnFalse;else if(!r)return this;return i===1&&(s=r,r=function(e){return jQuery().off(e),s.apply(this,arguments)},r.guid=s.guid||(s.guid=jQuery.guid++)),this.each(function(){jQuery.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,jQuery(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if(typeof e=="object"){for(i in e)this.off(i,t,e[i]);return this}if(t===!1||typeof t=="function")n=t,t=undefined;return n===!1&&(n=returnFalse),this.each(function(){jQuery.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){jQuery.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return jQuery.event.trigger(e,t,n,!0)}});var rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,rtagName=/<([\w:]+)/,rhtml=/<|&#?\w+;/,rnoInnerhtml=/<(?:script|style|link)/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/^$|\/(?:java|ecma)script/i,rscriptTypeMasked=/^true\/(.*)/,rcleanScript=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,wrapMap={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option,wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead,wrapMap.th=wrapMap.td,jQuery.extend({clone:function(e,t,n){var r,i,s,o,u=e.cloneNode(!0),a=jQuery.contains(e.ownerDocument,e);if(!support.noCloneChecked&&(e.nodeType===1||e.nodeType===11)&&!jQuery.isXMLDoc(e)){o=getAll(u),s=getAll(e);for(r=0,i=s.length;r<i;r++)fixInput(s[r],o[r])}if(t)if(n){s=s||getAll(e),o=o||getAll(u);for(r=0,i=s.length;r<i;r++)cloneCopyEvent(s[r],o[r])}else cloneCopyEvent(e,u);return o=getAll(u,"script"),o.length>0&&setGlobalEval(o,!a&&getAll(e,"script")),u},buildFragment:function(e,t,n,r){var i,s,o,u,a,f,l=t.createDocumentFragment(),c=[],h=0,p=e.length;for(;h<p;h++){i=e[h];if(i||i===0)if(jQuery.type(i)==="object")jQuery.merge(c,i.nodeType?[i]:i);else if(!rhtml.test(i))c.push(t.createTextNode(i));else{s=s||l.appendChild(t.createElement("div")),o=(rtagName.exec(i)||["",""])[1].toLowerCase(),u=wrapMap[o]||wrapMap._default,s.innerHTML=u[1]+i.replace(rxhtmlTag,"<$1></$2>")+u[2],f=u[0];while(f--)s=s.lastChild;jQuery.merge(c,s.childNodes),s=l.firstChild,s.textContent=""}}l.textContent="",h=0;while(i=c[h++]){if(r&&jQuery.inArray(i,r)!==-1)continue;a=jQuery.contains(i.ownerDocument,i),s=getAll(l.appendChild(i),"script"),a&&setGlobalEval(s);if(n){f=0;while(i=s[f++])rscriptType.test(i.type||"")&&n.push(i)}}return l},cleanData:function(e){var t,n,r,i,s=jQuery.event.special,o=0;for(;(n=e[o])!==undefined;o++){if(jQuery.acceptData(n)){i=n[data_priv.expando];if(i&&(t=data_priv.cache[i])){if(t.events)for(r in t.events)s[r]?jQuery.event.remove(n,r):jQuery.removeEvent(n,r,t.handle);data_priv.cache[i]&&delete data_priv.cache[i]}}delete data_user.cache[n[data_user.expando]]}}}),jQuery.fn.extend({text:function(e){return access(this,function(e){return e===undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9)this.textContent=e})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=manipulationTarget(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=manipulationTarget(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?jQuery.filter(e,this):this,i=0;for(;(n=r[i])!=null;i++)!t&&n.nodeType===1&&jQuery.cleanData(getAll(n)),n.parentNode&&(t&&jQuery.contains(n.ownerDocument,n)&&setGlobalEval(getAll(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++)e.nodeType===1&&(jQuery.cleanData(getAll(e,!1)),e.textContent="");return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return jQuery.clone(this,e,t)})},html:function(e){return access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined&&t.nodeType===1)return t.innerHTML;if(typeof e=="string"&&!rnoInnerhtml.test(e)&&!wrapMap[(rtagName.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(rxhtmlTag,"<$1></$2>");try{for(;n<r;n++)t=this[n]||{},t.nodeType===1&&(jQuery.cleanData(getAll(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,jQuery.cleanData(getAll(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=concat.apply([],e);var n,r,i,s,o,u,a=0,f=this.length,l=this,c=f-1,h=e[0],p=jQuery.isFunction(h);if(p||f>1&&typeof h=="string"&&!support.checkClone&&rchecked.test(h))return this.each(function(n){var r=l.eq(n);p&&(e[0]=h.call(this,n,r.html())),r.domManip(e,t)});if(f){n=jQuery.buildFragment(e,this[0].ownerDocument,!1,this),r=n.firstChild,n.childNodes.length===1&&(n=r);if(r){i=jQuery.map(getAll(n,"script"),disableScript),s=i.length;for(;a<f;a++)o=n,a!==c&&(o=jQuery.clone(o,!0,!0),s&&jQuery.merge(i,getAll(o,"script"))),t.call(this[a],o,a);if(s){u=i[i.length-1].ownerDocument,jQuery.map(i,restoreScript);for(a=0;a<s;a++)o=i[a],rscriptType.test(o.type||"")&&!data_priv.access(o,"globalEval")&&jQuery.contains(u,o)&&(o.src?jQuery._evalUrl&&jQuery._evalUrl(o.src):jQuery.globalEval(o.textContent.replace(rcleanScript,"")))}}}return this}}),jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){jQuery.fn[e]=function(e){var n,r=[],i=jQuery(e),s=i.length-1,o=0;for(;o<=s;o++)n=o===s?this:this.clone(!0),jQuery(i[o])[t](n),push.apply(r,n.get());return this.pushStack(r)}});var iframe,elemdisplay={},rmargin=/^margin/,rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i"),getStyles=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)};(function(){function s(){i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",i.innerHTML="",n.appendChild(r);var s=window.getComputedStyle(i,null);e=s.top!=="1%",t=s.width==="4px",n.removeChild(r)}var e,t,n=document.documentElement,r=document.createElement("div"),i=document.createElement("div");if(!i.style)return;i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",support.clearCloneStyle=i.style.backgroundClip==="content-box",r.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",r.appendChild(i),window.getComputedStyle&&jQuery.extend(support,{pixelPosition:function(){return s(),e},boxSizingReliable:function(){return t==null&&s(),t},reliableMarginRight:function(){var e,t=i.appendChild(document.createElement("div"));return t.style.cssText=i.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",i.style.width="1px",n.appendChild(r),e=!parseFloat(window.getComputedStyle(t,null).marginRight),n.removeChild(r),e}})})(),jQuery.swap=function(e,t,n,r){var i,s,o={};for(s in t)o[s]=e.style[s],e.style[s]=t[s];i=n.apply(e,r||[]);for(s in t)e.style[s]=o[s];return i};var rdisplayswap=/^(none|table(?!-c[ea]).+)/,rnumsplit=new RegExp("^("+pnum+")(.*)$","i"),rrelNum=new RegExp("^([+-])=("+pnum+")","i"),cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:"0",fontWeight:"400"},cssPrefixes=["Webkit","O","Moz","ms"];jQuery.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=curCSS(e,"opacity");return n===""?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var i,s,o,u=jQuery.camelCase(t),a=e.style;t=jQuery.cssProps[u]||(jQuery.cssProps[u]=vendorPropName(a,u)),o=jQuery.cssHooks[t]||jQuery.cssHooks[u];if(n===undefined)return o&&"get"in o&&(i=o.get(e,!1,r))!==undefined?i:a[t];s=typeof n,s==="string"&&(i=rrelNum.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(jQuery.css(e,t)),s="number");if(n==null||n!==n)return;s==="number"&&!jQuery.cssNumber[u]&&(n+="px"),!support.clearCloneStyle&&n===""&&t.indexOf("background")===0&&(a[t]="inherit");if(!o||!("set"in o)||(n=o.set(e,n,r))!==undefined)a[t]=n},css:function(e,t,n,r){var i,s,o,u=jQuery.camelCase(t);return t=jQuery.cssProps[u]||(jQuery.cssProps[u]=vendorPropName(e.style,u)),o=jQuery.cssHooks[t]||jQuery.cssHooks[u],o&&"get"in o&&(i=o.get(e,!0,n)),i===undefined&&(i=curCSS(e,t,r)),i==="normal"&&t in cssNormalTransform&&(i=cssNormalTransform[t]),n===""||n?(s=parseFloat(i),n===!0||jQuery.isNumeric(s)?s||0:i):i}}),jQuery.each(["height","width"],function(e,t){jQuery.cssHooks[t]={get:function(e,n,r){if(n)return rdisplayswap.test(jQuery.css(e,"display"))&&e.offsetWidth===0?jQuery.swap(e,cssShow,function(){return getWidthOrHeight(e,t,r)}):getWidthOrHeight(e,t,r)},set:function(e,n,r){var i=r&&getStyles(e);return setPositiveNumber(e,n,r?augmentWidthOrHeight(e,t,r,jQuery.css(e,"boxSizing",!1,i)==="border-box",i):0)}}}),jQuery.cssHooks.marginRight=addGetHookIf(support.reliableMarginRight,function(e,t){if(t)return jQuery.swap(e,{display:"inline-block"},curCSS,[e,"marginRight"])}),jQuery.each({margin:"",padding:"",border:"Width"},function(e,t){jQuery.cssHooks[e+t]={expand:function(n){var r=0,i={},s=typeof n=="string"?n.split(" "):[n];for(;r<4;r++)i[e+cssExpand[r]+t]=s[r]||s[r-2]||s[0];return i}},rmargin.test(e)||(jQuery.cssHooks[e+t].set=setPositiveNumber)}),jQuery.fn.extend({css:function(e,t){return access(this,function(e,t,n){var r,i,s={},o=0;if(jQuery.isArray(t)){r=getStyles(e),i=t.length;for(;o<i;o++)s[t[o]]=jQuery.css(e,t[o],!1,r);return s}return n!==undefined?jQuery.style(e,t,n):jQuery.css(e,t)},e,t,arguments.length>1)},show:function(){return showHide(this,!0)},hide:function(){return showHide(this)},toggle:function(e){return typeof e=="boolean"?e?this.show():this.hide():this.each(function(){isHidden(this)?jQuery(this).show():jQuery(this).hide()})}}),jQuery.Tween=Tween,Tween.prototype={constructor:Tween,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(jQuery.cssNumber[n]?"":"px")},cur:function(){var e=Tween.propHooks[this.prop];return e&&e.get?e.get(this):Tween.propHooks._default.get(this)},run:function(e){var t,n=Tween.propHooks[this.prop];return this.options.duration?this.pos=t=jQuery.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Tween.propHooks._default.set(this),this}},Tween.prototype.init.prototype=Tween.prototype,Tween.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=jQuery.css(e.elem,e.prop,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){jQuery.fx.step[e.prop]?jQuery.fx.step[e.prop](e):e.elem.style&&(e.elem.style[jQuery.cssProps[e.prop]]!=null||jQuery.cssHooks[e.prop])?jQuery.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},jQuery.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},jQuery.fx=Tween.prototype.init,jQuery.fx.step={};var fxNow,timerId,rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i"),rrun=/queueHooks$/,animationPrefilters=[defaultPrefilter],tweeners={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=rfxnum.exec(t),s=i&&i[3]||(jQuery.cssNumber[e]?"":"px"),o=(jQuery.cssNumber[e]||s!=="px"&&+r)&&rfxnum.exec(jQuery.css(n.elem,e)),u=1,a=20;if(o&&o[3]!==s){s=s||o[3],i=i||[],o=+r||1;do u=u||".5",o/=u,jQuery.style(n.elem,e,o+s);while(u!==(u=n.cur()/r)&&u!==1&&--a)}return i&&(o=n.start=+o||+r||0,n.unit=s,n.end=i[1]?o+(i[1]+1)*i[2]:+i[2]),n}]};jQuery.Animation=jQuery.extend(Animation,{tweener:function(e,t){jQuery.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],tweeners[n]=tweeners[n]||[],tweeners[n].unshift(t)},prefilter:function(e,t){t?animationPrefilters.unshift(e):animationPrefilters.push(e)}}),jQuery.speed=function(e,t,n){var r=e&&typeof e=="object"?jQuery.extend({},e):{complete:n||!n&&t||jQuery.isFunction(e)&&e,duration:e,easing:n&&t||t&&!jQuery.isFunction(t)&&t};r.duration=jQuery.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in jQuery.fx.speeds?jQuery.fx.speeds[r.duration]:jQuery.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){jQuery.isFunction(r.old)&&r.old.call(this),r.queue&&jQuery.dequeue(this,r.queue)},r},jQuery.fn.extend({fadeTo:function(e,t,n,r){return this.filter(isHidden).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=jQuery.isEmptyObject(e),s=jQuery.speed(t,n,r),o=function(){var t=Animation(this,jQuery.extend({},e),s);(i||data_priv.get(this,"finish"))&&t.stop(!0)};return o.finish=o,i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return typeof e!="string"&&(n=t,t=e,e=undefined),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=e!=null&&e+"queueHooks",s=jQuery.timers,o=data_priv.get(this);if(i)o[i]&&o[i].stop&&r(o[i]);else for(i in o)o[i]&&o[i].stop&&rrun.test(i)&&r(o[i]);for(i=s.length;i--;)s[i].elem===this&&(e==null||s[i].queue===e)&&(s[i].anim.stop(n),t=!1,s.splice(i,1));(t||!n)&&jQuery.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=data_priv.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],s=jQuery.timers,o=r?r.length:0;n.finish=!0,jQuery.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0);for(t=s.length;t--;)s[t].elem===this&&s[t].queue===e&&(s[t].anim.stop(!0),s.splice(t,1));for(t=0;t<o;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),jQuery.each(["toggle","show","hide"],function(e,t){var n=jQuery.fn[t];jQuery.fn[t]=function(e,r,i){return e==null||typeof e=="boolean"?n.apply(this,arguments):this.animate(genFx(t,!0),e,r,i)}}),jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){jQuery.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),jQuery.timers=[],jQuery.fx.tick=function(){var e,t=0,n=jQuery.timers;fxNow=jQuery.now();for(;t<n.length;t++)e=n[t],!e()&&n[t]===e&&n.splice(t--,1);n.length||jQuery.fx.stop(),fxNow=undefined},jQuery.fx.timer=function(e){jQuery.timers.push(e),e()?jQuery.fx.start():jQuery.timers.pop()},jQuery.fx.interval=13,jQuery.fx.start=function(){timerId||(timerId=setInterval(jQuery.fx.tick,jQuery.fx.interval))},jQuery.fx.stop=function(){clearInterval(timerId),timerId=null},jQuery.fx.speeds={slow:600,fast:200,_default:400},jQuery.fn.delay=function(e,t){return e=jQuery.fx?jQuery.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},function(){var e=document.createElement("input"),t=document.createElement("select"),n=t.appendChild(document.createElement("option"));e.type="checkbox",support.checkOn=e.value!=="",support.optSelected=n.selected,t.disabled=!0,support.optDisabled=!n.disabled,e=document.createElement("input"),e.value="t",e.type="radio",support.radioValue=e.value==="t"}();var nodeHook,boolHook,attrHandle=jQuery.expr.attrHandle;jQuery.fn.extend({attr:function(e,t){return access(this,jQuery.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){jQuery.removeAttr(this,e)})}}),jQuery.extend({attr:function(e,t,n){var r,i,s=e.nodeType;if(!e||s===3||s===8||s===2)return;if(typeof e.getAttribute===strundefined)return jQuery.prop(e,t,n);if(s!==1||!jQuery.isXMLDoc(e))t=t.toLowerCase(),r=jQuery.attrHooks[t]||(jQuery.expr.match.bool.test(t)?boolHook:nodeHook);if(n===undefined)return r&&"get"in r&&(i=r.get(e,t))!==null?i:(i=jQuery.find.attr(e,t),i==null?undefined:i);if(n!==null)return r&&"set"in r&&(i=r.set(e,n,t))!==undefined?i:(e.setAttribute(t,n+""),n);jQuery.removeAttr(e,t)},removeAttr:function(e,t){var n,r,i=0,s=t&&t.match(rnotwhite);if(s&&e.nodeType===1)while(n=s[i++])r=jQuery.propFix[n]||n,jQuery.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!support.radioValue&&t==="radio"&&jQuery.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),boolHook={set:function(e,t,n){return t===!1?jQuery.removeAttr(e,n):e.setAttribute(n,n),n}},jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(e,t){var n=attrHandle[t]||jQuery.find.attr;attrHandle[t]=function(e,t,r){var i,s;return r||(s=attrHandle[t],attrHandle[t]=i,i=n(e,t,r)!=null?t.toLowerCase():null,attrHandle[t]=s),i}});var rfocusable=/^(?:input|select|textarea|button)$/i;jQuery.fn.extend({prop:function(e,t){return access(this,jQuery.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[jQuery.propFix[e]||e]})}}),jQuery.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,s,o=e.nodeType;if(!e||o===3||o===8||o===2)return;return s=o!==1||!jQuery.isXMLDoc(e),s&&(t=jQuery.propFix[t]||t,i=jQuery.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=n:i&&"get"in i&&(r=i.get(e,t))!==null?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||rfocusable.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),support.optSelected||(jQuery.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this});var rclass=/[\t\r\n\f]/g;jQuery.fn.extend({addClass:function(e){var t,n,r,i,s,o,u=typeof e=="string"&&e,a=0,f=this.length;if(jQuery.isFunction(e))return this.each(function(t){jQuery(this).addClass(e.call(this,t,this.className))});if(u){t=(e||"").match(rnotwhite)||[];for(;a<f;a++){n=this[a],r=n.nodeType===1&&(n.className?(" "+n.className+" ").replace(rclass," "):" ");if(r){s=0;while(i=t[s++])r.indexOf(" "+i+" ")<0&&(r+=i+" ");o=jQuery.trim(r),n.className!==o&&(n.className=o)}}}return this},removeClass:function(e){var t,n,r,i,s,o,u=arguments.length===0||typeof e=="string"&&e,a=0,f=this.length;if(jQuery.isFunction(e))return this.each(function(t){jQuery(this).removeClass(e.call(this,t,this.className))});if(u){t=(e||"").match(rnotwhite)||[];for(;a<f;a++){n=this[a],r=n.nodeType===1&&(n.className?(" "+n.className+" ").replace(rclass," "):"");if(r){s=0;while(i=t[s++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");o=e?jQuery.trim(r):"",n.className!==o&&(n.className=o)}}}return this},toggleClass:function(e,t){var n=typeof e;return typeof t=="boolean"&&n==="string"?t?this.addClass(e):this.removeClass(e):jQuery.isFunction(e)?this.each(function(n){jQuery(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var t,r=0,i=jQuery(this),s=e.match(rnotwhite)||[];while(t=s[r++])i.hasClass(t)?i.removeClass(t):i.addClass(t)}else if(n===strundefined||n==="boolean")this.className&&data_priv.set(this,"__className__",this.className),this.className=this.className||e===!1?"":data_priv.get(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(rclass," ").indexOf(t)>=0)return!0;return!1}});var rreturn=/\r/g;jQuery.fn.extend({val:function(e){var t,n,r,i=this[0];if(!arguments.length){if(i)return t=jQuery.valHooks[i.type]||jQuery.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:(n=i.value,typeof n=="string"?n.replace(rreturn,""):n==null?"":n);return}return r=jQuery.isFunction(e),this.each(function(n){var i;if(this.nodeType!==1)return;r?i=e.call(this,n,jQuery(this).val()):i=e,i==null?i="":typeof i=="number"?i+="":jQuery.isArray(i)&&(i=jQuery.map(i,function(e){return e==null?"":e+""})),t=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!t||!("set"in t)||t.set(this,i,"value")===undefined)this.value=i})}}),jQuery.extend({valHooks:{option:{get:function(e){var t=jQuery.find.attr(e,"value");return t!=null?t:jQuery.trim(jQuery.text(e))}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!jQuery.nodeName(n.parentNode,"optgroup"))){t=jQuery(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n,r,i=e.options,s=jQuery.makeArray(t),o=i.length;while(o--){r=i[o];if(r.selected=jQuery.inArray(r.value,s)>=0)n=!0}return n||(e.selectedIndex=-1),s}}}}),jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(e,t){if(jQuery.isArray(t))return e.checked=jQuery.inArray(jQuery(e).val(),t)>=0}},support.checkOn||(jQuery.valHooks[this].get=function(e){return e.getAttribute("value")===null?"on":e.value})}),jQuery.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){jQuery.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),jQuery.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)}});var nonce=jQuery.now(),rquery=/\?/;jQuery.parseJSON=function(e){return JSON.parse(e+"")},jQuery.parseXML=function(e){var t,n;if(!e||typeof e!="string")return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=undefined}return(!t||t.getElementsByTagName("parsererror").length)&&jQuery.error("Invalid XML: "+e),t};var ajaxLocParts,ajaxLocation,rhash=/#.*$/,rts=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rurl=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,prefilters={},transports={},allTypes="*/".concat("*");try{ajaxLocation=location.href}catch(e){ajaxLocation=document.createElement("a"),ajaxLocation.href="",ajaxLocation=ajaxLocation.href}ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[],jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ajaxLocation,type:"GET",isLocal:rlocalProtocol.test(ajaxLocParts[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":jQuery.parseJSON,"text xml":jQuery.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?ajaxExtend(ajaxExtend(e,jQuery.ajaxSettings),t):ajaxExtend(jQuery.ajaxSettings,e)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(e,t){function S(e,t,s,u){var f,m,g,b,E,S=t;if(y===2)return;y=2,o&&clearTimeout(o),n=undefined,i=u||"",w.readyState=e>0?4:0,f=e>=200&&e<300||e===304,s&&(b=ajaxHandleResponses(l,w,s)),b=ajaxConvert(l,b,w,f);if(f)l.ifModified&&(E=w.getResponseHeader("Last-Modified"),E&&(jQuery.lastModified[r]=E),E=w.getResponseHeader("etag"),E&&(jQuery.etag[r]=E)),e===204||l.type==="HEAD"?S="nocontent":e===304?S="notmodified":(S=b.state,m=b.data,g=b.error,f=!g);else{g=S;if(e||!S)S="error",e<0&&(e=0)}w.status=e,w.statusText=(t||S)+"",f?p.resolveWith(c,[m,S,w]):p.rejectWith(c,[w,S,g]),w.statusCode(v),v=undefined,a&&h.trigger(f?"ajaxSuccess":"ajaxError",[w,l,f?m:g]),d.fireWith(c,[w,S]),a&&(h.trigger("ajaxComplete",[w,l]),--jQuery.active||jQuery.event.trigger("ajaxStop"))}typeof e=="object"&&(t=e,e=undefined),t=t||{};var n,r,i,s,o,u,a,f,l=jQuery.ajaxSetup({},t),c=l.context||l,h=l.context&&(c.nodeType||c.jquery)?jQuery(c):jQuery.event,p=jQuery.Deferred(),d=jQuery.Callbacks("once memory"),v=l.statusCode||{},m={},g={},y=0,b="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(y===2){if(!s){s={};while(t=rheaders.exec(i))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return t==null?null:t},getAllResponseHeaders:function(){return y===2?i:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return y||(e=g[n]=g[n]||e,m[e]=t),this},overrideMimeType:function(e){return y||(l.mimeType=e),this},statusCode:function(e){var t;if(e)if(y<2)for(t in e)v[t]=[v[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||b;return n&&n.abort(t),S(0,t),this}};p.promise(w).complete=d.add,w.success=w.done,w.error=w.fail,l.url=((e||l.url||ajaxLocation)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//"),l.type=t.method||t.type||l.method||l.type,l.dataTypes=jQuery.trim(l.dataType||"*").toLowerCase().match(rnotwhite)||[""],l.crossDomain==null&&(u=rurl.exec(l.url.toLowerCase()),l.crossDomain=!(!u||u[1]===ajaxLocParts[1]&&u[2]===ajaxLocParts[2]&&(u[3]||(u[1]==="http:"?"80":"443"))===(ajaxLocParts[3]||(ajaxLocParts[1]==="http:"?"80":"443")))),l.data&&l.processData&&typeof l.data!="string"&&(l.data=jQuery.param(l.data,l.traditional)),inspectPrefiltersOrTransports(prefilters,l,t,w);if(y===2)return w;a=l.global,a&&jQuery.active++===0&&jQuery.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!rnoContent.test(l.type),r=l.url,l.hasContent||(l.data&&(r=l.url+=(rquery.test(r)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=rts.test(r)?r.replace(rts,"$1_="+nonce++):r+(rquery.test(r)?"&":"?")+"_="+nonce++)),l.ifModified&&(jQuery.lastModified[r]&&w.setRequestHeader("If-Modified-Since",jQuery.lastModified[r]),jQuery.etag[r]&&w.setRequestHeader("If-None-Match",jQuery.etag[r])),(l.data&&l.hasContent&&l.contentType!==!1||t.contentType)&&w.setRequestHeader("Content-Type",l.contentType),w.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):l.accepts["*"]);for(f in l.headers)w.setRequestHeader(f,l.headers[f]);if(!l.beforeSend||l.beforeSend.call(c,w,l)!==!1&&y!==2){b="abort";for(f in{success:1,error:1,complete:1})w[f](l[f]);n=inspectPrefiltersOrTransports(transports,l,t,w);if(!n)S(-1,"No Transport");else{w.readyState=1,a&&h.trigger("ajaxSend",[w,l]),l.async&&l.timeout>0&&(o=setTimeout(function(){w.abort("timeout")},l.timeout));try{y=1,n.send(m,S)}catch(E){if(!(y<2))throw E;S(-1,E)}}return w}return w.abort()},getJSON:function(e,t,n){return jQuery.get(e,t,n,"json")},getScript:function(e,t){return jQuery.get(e,undefined,t,"script")}}),jQuery.each(["get","post"],function(e,t){jQuery[t]=function(e,n,r,i){return jQuery.isFunction(n)&&(i=i||r,r=n,n=undefined),jQuery.ajax({url:e,type:t,dataType:i,data:n,success:r})}}),jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){jQuery.fn[t]=function(e){return this.on(t,e)}}),jQuery._evalUrl=function(e){return jQuery.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},jQuery.fn.extend({wrapAll:function(e){var t;return jQuery.isFunction(e)?this.each(function(t){jQuery(this).wrapAll(e.call(this,t))}):(this[0]&&(t=jQuery(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return jQuery.isFunction(e)?this.each(function(t){jQuery(this).wrapInner(e.call(this,t))}):this.each(function(){var t=jQuery(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=jQuery.isFunction(e);return this.each(function(n){jQuery(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){jQuery.nodeName(this,"body")||jQuery(this).replaceWith(this.childNodes)}).end()}}),jQuery.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},jQuery.expr.filters.visible=function(e){return!jQuery.expr.filters.hidden(e)};var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;jQuery.param=function(e,t){var n,r=[],i=function(e,t){t=jQuery.isFunction(t)?t():t==null?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};t===undefined&&(t=jQuery.ajaxSettings&&jQuery.ajaxSettings.traditional);if(jQuery.isArray(e)||e.jquery&&!jQuery.isPlainObject(e))jQuery.each(e,function(){i(this.name,this.value)});else for(n in e)buildParams(n,e[n],t,i);return r.join("&").replace(r20,"+")},jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=jQuery.prop(this,"elements");return e?jQuery.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(e)&&(this.checked||!rcheckableType.test(e))}).map(function(e,t){var n=jQuery(this).val();return n==null?null:jQuery.isArray(n)?jQuery.map(n,function(e){return{name:t.name,value:e.replace(rCRLF,"\r\n")}}):{name:t.name,value:n.replace(rCRLF,"\r\n")}}).get()}}),jQuery.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var xhrId=0,xhrCallbacks={},xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();window.ActiveXObject&&jQuery(window).on("unload",function(){for(var e in xhrCallbacks)xhrCallbacks[e]()}),support.cors=!!xhrSupported&&"withCredentials"in xhrSupported,support.ajax=xhrSupported=!!xhrSupported,jQuery.ajaxTransport(function(e){var t;if(support.cors||xhrSupported&&!e.crossDomain)return{send:function(n,r){var i,s=e.xhr(),o=++xhrId;s.open(e.type,e.url,e.async,e.username,e.password);if(e.xhrFields)for(i in e.xhrFields)s[i]=e.xhrFields[i];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),!e.crossDomain&&!n["X-Requested-With"]&&(n["X-Requested-With"]="XMLHttpRequest");for(i in n)s.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete xhrCallbacks[o],t=s.onload=s.onerror=null,e==="abort"?s.abort():e==="error"?r(s.status,s.statusText):r(xhrSuccessStatus[s.status]||s.status,s.statusText,typeof s.responseText=="string"?{text:s.responseText}:undefined,s.getAllResponseHeaders()))}},s.onload=t(),s.onerror=t("error"),t=xhrCallbacks[o]=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(u){if(t)throw u}},abort:function(){t&&t()}}}),jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return jQuery.globalEval(e),e}}}),jQuery.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),jQuery.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=jQuery("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i(e.type==="error"?404:200,e.type)}),document.head.appendChild(t[0])},abort:function(){n&&n()}}}});var oldCallbacks=[],rjsonp=/(=)\?(?=&|$)|\?\?/;jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=oldCallbacks.pop()||jQuery.expando+"_"+nonce++;return this[e]=!0,e}}),jQuery.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,s,o=e.jsonp!==!1&&(rjsonp.test(e.url)?"url":typeof e.data=="string"&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&rjsonp.test(e.data)&&"data");if(o||e.dataTypes[0]==="jsonp")return r=e.jsonpCallback=jQuery.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,o?e[o]=e[o].replace(rjsonp,"$1"+r):e.jsonp!==!1&&(e.url+=(rquery.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||jQuery.error(r+" was not called"),s[0]},e.dataTypes[0]="json",i=window[r],window[r]=function(){s=arguments},n.always(function(){window[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,oldCallbacks.push(r)),s&&jQuery.isFunction(i)&&i(s[0]),s=i=undefined}),"script"}),jQuery.parseHTML=function(e,t,n){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(n=t,t=!1),t=t||document;var r=rsingleTag.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=jQuery.buildFragment([e],t,i),i&&i.length&&jQuery(i).remove(),jQuery.merge([],r.childNodes))};var _load=jQuery.fn.load;jQuery.fn.load=function(e,t,n){if(typeof e!="string"&&_load)return _load.apply(this,arguments);var r,i,s,o=this,u=e.indexOf(" ");return u>=0&&(r=jQuery.trim(e.slice(u)),e=e.slice(0,u)),jQuery.isFunction(t)?(n=t,t=undefined):t&&typeof t=="object"&&(i="POST"),o.length>0&&jQuery.ajax({url:e,type:i,dataType:"html",data:t}).done(function(e){s=arguments,o.html(r?jQuery("<div>").append(jQuery.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){o.each(n,s||[e.responseText,t,e])}),this},jQuery.expr.filters.animated=function(e){return jQuery.grep(jQuery.timers,function(t){return e===t.elem}).length};var docElem=window.document.documentElement;jQuery.offset={setOffset:function(e,t,n){var r,i,s,o,u,a,f,l=jQuery.css(e,"position"),c=jQuery(e),h={};l==="static"&&(e.style.position="relative"),u=c.offset(),s=jQuery.css(e,"top"),a=jQuery.css(e,"left"),f=(l==="absolute"||l==="fixed")&&(s+a).indexOf("auto")>-1,f?(r=c.position(),o=r.top,i=r.left):(o=parseFloat(s)||0,i=parseFloat(a)||0),jQuery.isFunction(t)&&(t=t.call(e,n,u)),t.top!=null&&(h.top=t.top-u.top+o),t.left!=null&&(h.left=t.left-u.left+i),"using"in t?t.using.call(e,h):c.css(h)}},jQuery.fn.extend({offset:function(e){if(arguments.length)return e===undefined?this:this.each(function(t){jQuery.offset.setOffset(this,e,t)});var t,n,r=this[0],i={top:0,left:0},s=r&&r.ownerDocument;if(!s)return;return t=s.documentElement,jQuery.contains(t,r)?(typeof r.getBoundingClientRect!==strundefined&&(i=r.getBoundingClientRect()),n=getWindow(s),{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i},position:function(){if(!this[0])return;var e,t,n=this[0],r={top:0,left:0};return jQuery.css(n,"position")==="fixed"?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),jQuery.nodeName(e[0],"html")||(r=e.offset()),r.top+=jQuery.css(e[0],"borderTopWidth",!0),r.left+=jQuery.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-jQuery.css(n,"marginTop",!0),left:t.left-r.left-jQuery.css(n,"marginLeft",!0)}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||docElem;while(e&&!jQuery.nodeName(e,"html")&&jQuery.css(e,"position")==="static")e=e.offsetParent;return e||docElem})}}),jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;jQuery.fn[e]=function(r){return access(this,function(e,r,i){var s=getWindow(e);if(i===undefined)return s?s[t]:e[r];s?s.scrollTo(n?window.pageXOffset:i,n?i:window.pageYOffset):e[r]=i},e,r,arguments.length,null)}}),jQuery.each(["top","left"],function(e,t){jQuery.cssHooks[t]=addGetHookIf(support.pixelPosition,function(e,n){if(n)return n=curCSS(e,t),rnumnonpx.test(n)?jQuery(e).position()[t]+"px":n})}),jQuery.each({Height:"height",Width:"width"},function(e,t){jQuery.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){jQuery.fn[r]=function(r,i){var s=arguments.length&&(n||typeof r!="boolean"),o=n||(r===!0||i===!0?"margin":"border");return access(this,function(t,n,r){var i;return jQuery.isWindow(t)?t.document.documentElement["client"+e]:t.nodeType===9?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):r===undefined?jQuery.css(t,n,o):jQuery.style(t,n,r,o)},t,s?r:undefined,s,null)}})}),jQuery.fn.size=function(){return this.length},jQuery.fn.andSelf=jQuery.fn.addBack,typeof define=="function"&&define.amd&&define("jquery",[],function(){return jQuery});var _jQuery=window.jQuery,_$=window.$;return jQuery.noConflict=function(e){return window.$===jQuery&&(window.$=_$),e&&window.jQuery===jQuery&&(window.jQuery=_jQuery),jQuery},typeof noGlobal===strundefined&&(window.jQuery=window.$=jQuery),jQuery}),function(){var e=this,t=e._,n=Array.prototype,r=Object.prototype,i=Function.prototype,s=n.push,o=n.slice,u=n.concat,a=r.toString,f=r.hasOwnProperty,l=Array.isArray,c=Object.keys,h=i.bind,p=function(e){if(e instanceof p)return e;if(!(this instanceof p))return new p(e);this._wrapped=e};typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=p),exports._=p):e._=p,p.VERSION="1.7.0";var d=function(e,t,n){if(t===void 0)return e;switch(n==null?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,s){return e.call(t,n,r,i,s)}}return function(){return e.apply(t,arguments)}};p.iteratee=function(e,t,n){return e==null?p.identity:p.isFunction(e)?d(e,t,n):p.isObject(e)?p.matches(e):p.property(e)},p.each=p.forEach=function(e,t,n){if(e==null)return e;t=d(t,n);var r,i=e.length;if(i===+i)for(r=0;r<i;r++)t(e[r],r,e);else{var s=p.keys(e);for(r=0,i=s.length;r<i;r++)t(e[s[r]],s[r],e)}return e},p.map=p.collect=function(e,t,n){if(e==null)return[];t=p.iteratee(t,n);var r=e.length!==+e.length&&p.keys(e),i=(r||e).length,s=Array(i),o;for(var u=0;u<i;u++)o=r?r[u]:u,s[u]=t(e[o],o,e);return s};var v="Reduce of empty array with no initial value";p.reduce=p.foldl=p.inject=function(e,t,n,r){e==null&&(e=[]),t=d(t,r,4);var i=e.length!==+e.length&&p.keys(e),s=(i||e).length,o=0,u;if(arguments.length<3){if(!s)throw new TypeError(v);n=e[i?i[o++]:o++]}for(;o<s;o++)u=i?i[o]:o,n=t(n,e[u],u,e);return n},p.reduceRight=p.foldr=function(e,t,n,r){e==null&&(e=[]),t=d(t,r,4);var i=e.length!==+e.length&&p.keys(e),s=(i||e).length,o;if(arguments.length<3){if(!s)throw new TypeError(v);n=e[i?i[--s]:--s]}while(s--)o=i?i[s]:s,n=t(n,e[o],o,e);return n},p.find=p.detect=function(e,t,n){var r;return t=p.iteratee(t,n),p.some(e,function(e,n,i){if(t(e,n,i))return r=e,!0}),r},p.filter=p.select=function(e,t,n){var r=[];return e==null?r:(t=p.iteratee(t,n),p.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r)},p.reject=function(e,t,n){return p.filter(e,p.negate(p.iteratee(t)),n)},p.every=p.all=function(e,t,n){if(e==null)return!0;t=p.iteratee(t,n);var r=e.length!==+e.length&&p.keys(e),i=(r||e).length,s,o;for(s=0;s<i;s++){o=r?r[s]:s;if(!t(e[o],o,e))return!1}return!0},p.some=p.any=function(e,t,n){if(e==null)return!1;t=p.iteratee(t,n);var r=e.length!==+e.length&&p.keys(e),i=(r||e).length,s,o;for(s=0;s<i;s++){o=r?r[s]:s;if(t(e[o],o,e))return!0}return!1},p.contains=p.include=function(e,t){return e==null?!1:(e.length!==+e.length&&(e=p.values(e)),p.indexOf(e,t)>=0)},p.invoke=function(e,t){var n=o.call(arguments,2),r=p.isFunction(t);return p.map(e,function(e){return(r?t:e[t]).apply(e,n)})},p.pluck=function(e,t){return p.map(e,p.property(t))},p.where=function(e,t){return p.filter(e,p.matches(t))},p.findWhere=function(e,t){return p.find(e,p.matches(t))},p.max=function(e,t,n){var r=-Infinity,i=-Infinity,s,o;if(t==null&&e!=null){e=e.length===+e.length?e:p.values(e);for(var u=0,a=e.length;u<a;u++)s=e[u],s>r&&(r=s)}else t=p.iteratee(t,n),p.each(e,function(e,n,s){o=t(e,n,s);if(o>i||o===-Infinity&&r===-Infinity)r=e,i=o});return r},p.min=function(e,t,n){var r=Infinity,i=Infinity,s,o;if(t==null&&e!=null){e=e.length===+e.length?e:p.values(e);for(var u=0,a=e.length;u<a;u++)s=e[u],s<r&&(r=s)}else t=p.iteratee(t,n),p.each(e,function(e,n,s){o=t(e,n,s);if(o<i||o===Infinity&&r===Infinity)r=e,i=o});return r},p.shuffle=function(e){var t=e&&e.length===+e.length?e:p.values(e),n=t.length,r=Array(n);for(var i=0,s;i<n;i++)s=p.random(0,i),s!==i&&(r[i]=r[s]),r[s]=t[i];return r},p.sample=function(e,t,n){return t==null||n?(e.length!==+e.length&&(e=p.values(e)),e[p.random(e.length-1)]):p.shuffle(e).slice(0,Math.max(0,t))},p.sortBy=function(e,t,n){return t=p.iteratee(t,n),p.pluck(p.map(e,function(e,n,r){return{value:e,index:n,criteria:t(e,n,r)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||n===void 0)return 1;if(n<r||r===void 0)return-1}return e.index-t.index}),"value")};var m=function(e){return function(t,n,r){var i={};return n=p.iteratee(n,r),p.each(t,function(r,s){var o=n(r,s,t);e(i,r,o)}),i}};p.groupBy=m(function(e,t,n){p.has(e,n)?e[n].push(t):e[n]=[t]}),p.indexBy=m(function(e,t,n){e[n]=t}),p.countBy=m(function(e,t,n){p.has(e,n)?e[n]++:e[n]=1}),p.sortedIndex=function(e,t,n,r){n=p.iteratee(n,r,1);var i=n(t),s=0,o=e.length;while(s<o){var u=s+o>>>1;n(e[u])<i?s=u+1:o=u}return s},p.toArray=function(e){return e?p.isArray(e)?o.call(e):e.length===+e.length?p.map(e,p.identity):p.values(e):[]},p.size=function(e){return e==null?0:e.length===+e.length?e.length:p.keys(e).length},p.partition=function(e,t,n){t=p.iteratee(t,n);var r=[],i=[];return p.each(e,function(e,n,s){(t(e,n,s)?r:i).push(e)}),[r,i]},p.first=p.head=p.take=function(e,t,n){return e==null?void 0:t==null||n?e[0]:t<0?[]:o.call(e,0,t)},p.initial=function(e,t,n){return o.call(e,0,Math.max(0,e.length-(t==null||n?1:t)))},p.last=function(e,t,n){return e==null?void 0:t==null||n?e[e.length-1]:o.call(e,Math.max(e.length-t,0))},p.rest=p.tail=p.drop=function(e,t,n){return o.call(e,t==null||n?1:t)},p.compact=function(e){return p.filter(e,p.identity)};var g=function(e,t,n,r){if(t&&p.every(e,p.isArray))return u.apply(r,e);for(var i=0,o=e.length;i<o;i++){var a=e[i];!p.isArray(a)&&!p.isArguments(a)?n||r.push(a):t?s.apply(r,a):g(a,t,n,r)}return r};p.flatten=function(e,t){return g(e,t,!1,[])},p.without=function(e){return p.difference(e,o.call(arguments,1))},p.uniq=p.unique=function(e,t,n,r){if(e==null)return[];p.isBoolean(t)||(r=n,n=t,t=!1),n!=null&&(n=p.iteratee(n,r));var i=[],s=[];for(var o=0,u=e.length;o<u;o++){var a=e[o];if(t)(!o||s!==a)&&i.push(a),s=a;else if(n){var f=n(a,o,e);p.indexOf(s,f)<0&&(s.push(f),i.push(a))}else p.indexOf(i,a)<0&&i.push(a)}return i},p.union=function(){return p.uniq(g(arguments,!0,!0,[]))},p.intersection=function(e){if(e==null)return[];var t=[],n=arguments.length;for(var r=0,i=e.length;r<i;r++){var s=e[r];if(p.contains(t,s))continue;for(var o=1;o<n;o++)if(!p.contains(arguments[o],s))break;o===n&&t.push(s)}return t},p.difference=function(e){var t=g(o.call(arguments,1),!0,!0,[]);return p.filter(e,function(e){return!p.contains(t,e)})},p.zip=function(e){if(e==null)return[];var t=p.max(arguments,"length").length,n=Array(t);for(var r=0;r<t;r++)n[r]=p.pluck(arguments,r);return n},p.object=function(e,t){if(e==null)return{};var n={};for(var r=0,i=e.length;r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},p.indexOf=function(e,t,n){if(e==null)return-1;var r=0,i=e.length;if(n){if(typeof n!="number")return r=p.sortedIndex(e,t),e[r]===t?r:-1;r=n<0?Math.max(0,i+n):n}for(;r<i;r++)if(e[r]===t)return r;return-1},p.lastIndexOf=function(e,t,n){if(e==null)return-1;var r=e.length;typeof n=="number"&&(r=n<0?r+n+1:Math.min(r,n+1));while(--r>=0)if(e[r]===t)return r;return-1},p.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=n||1;var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r);for(var s=0;s<r;s++,e+=n)i[s]=e;return i};var y=function(){};p.bind=function(e,t){var n,r;if(h&&e.bind===h)return h.apply(e,o.call(arguments,1));if(!p.isFunction(e))throw new TypeError("Bind must be called on a function");return n=o.call(arguments,2),r=function(){if(this instanceof r){y.prototype=e.prototype;var i=new y;y.prototype=null;var s=e.apply(i,n.concat(o.call(arguments)));return p.isObject(s)?s:i}return e.apply(t,n.concat(o.call(arguments)))},r},p.partial=function(e){var t=o.call(arguments,1);return function(){var n=0,r=t.slice();for(var i=0,s=r.length;i<s;i++)r[i]===p&&(r[i]=arguments[n++]);while(n<arguments.length)r.push(arguments[n++]);return e.apply(this,r)}},p.bindAll=function(e){var t,n=arguments.length,r;if(n<=1)throw new Error("bindAll must be passed function names");for(t=1;t<n;t++)r=arguments[t],e[r]=p.bind(e[r],e);return e},p.memoize=function(e,t){var n=function(r){var i=n.cache,s=t?t.apply(this,arguments):r;return p.has(i,s)||(i[s]=e.apply(this,arguments)),i[s]};return n.cache={},n},p.delay=function(e,t){var n=o.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},p.defer=function(e){return p.delay.apply(p,[e,1].concat(o.call(arguments,1)))},p.throttle=function(e,t,n){var r,i,s,o=null,u=0;n||(n={});var a=function(){u=n.leading===!1?0:p.now(),o=null,s=e.apply(r,i),o||(r=i=null)};return function(){var f=p.now();!u&&n.leading===!1&&(u=f);var l=t-(f-u);return r=this,i=arguments,l<=0||l>t?(clearTimeout(o),o=null,u=f,s=e.apply(r,i),o||(r=i=null)):!o&&n.trailing!==!1&&(o=setTimeout(a,l)),s}},p.debounce=function(e,t,n){var r,i,s,o,u,a=function(){var f=p.now()-o;f<t&&f>0?r=setTimeout(a,t-f):(r=null,n||(u=e.apply(s,i),r||(s=i=null)))};return function(){s=this,i=arguments,o=p.now();var f=n&&!r;return r||(r=setTimeout(a,t)),f&&(u=e.apply(s,i),s=i=null),u}},p.wrap=function(e,t){return p.partial(t,e)},p.negate=function(e){return function(){return!e.apply(this,arguments)}},p.compose=function(){var e=arguments,t=e.length-1;return function(){var n=t,r=e[t].apply(this,arguments);while(n--)r=e[n].call(this,r);return r}},p.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},p.before=function(e,t){var n;return function(){return--e>0?n=t.apply(this,arguments):t=null,n}},p.once=p.partial(p.before,2),p.keys=function(e){if(!p.isObject(e))return[];if(c)return c(e);var t=[];for(var n in e)p.has(e,n)&&t.push(n);return t},p.values=function(e){var t=p.keys(e),n=t.length,r=Array(n);for(var i=0;i<n;i++)r[i]=e[t[i]];return r},p.pairs=function(e){var t=p.keys(e),n=t.length,r=Array(n);for(var i=0;i<n;i++)r[i]=[t[i],e[t[i]]];return r},p.invert=function(e){var t={},n=p.keys(e);for(var r=0,i=n.length;r<i;r++)t[e[n[r]]]=n[r];return t},p.functions=p.methods=function(e){var t=[];for(var n in e)p.isFunction(e[n])&&t.push(n);return t.sort()},p.extend=function(e){if(!p.isObject(e))return e;var t,n;for(var r=1,i=arguments.length;r<i;r++){t=arguments[r];for(n in t)f.call(t,n)&&(e[n]=t[n])}return e},p.pick=function(e,t,n){var r={},i;if(e==null)return r;if(p.isFunction(t)){t=d(t,n);for(i in e){var s=e[i];t(s,i,e)&&(r[i]=s)}}else{var a=u.apply([],o.call(arguments,1));e=new Object(e);for(var f=0,l=a.length;f<l;f++)i=a[f],i in e&&(r[i]=e[i])}return r},p.omit=function(e,t,n){if(p.isFunction(t))t=p.negate(t);else{var r=p.map(u.apply([],o.call(arguments,1)),String);t=function(e,t){return!p.contains(r,t)}}return p.pick(e,t,n)},p.defaults=function(e){if(!p.isObject(e))return e;for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t];for(var i in r)e[i]===void 0&&(e[i]=r[i])}return e},p.clone=function(e){return p.isObject(e)?p.isArray(e)?e.slice():p.extend({},e):e},p.tap=function(e,t){return t(e),e};var b=function(e,t,n,r){if(e===t)return e!==0||1/e===1/t;if(e==null||t==null)return e===t;e instanceof p&&(e=e._wrapped),t instanceof p&&(t=t._wrapped);var i=a.call(e);if(i!==a.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":if(+e!==+e)return+t!==+t;return+e===0?1/+e===1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t}if(typeof e!="object"||typeof t!="object")return!1;var s=n.length;while(s--)if(n[s]===e)return r[s]===t;var o=e.constructor,u=t.constructor;if(o!==u&&"constructor"in e&&"constructor"in t&&!(p.isFunction(o)&&o instanceof o&&p.isFunction(u)&&u instanceof u))return!1;n.push(e),r.push(t);var f,l;if(i==="[object Array]"){f=e.length,l=f===t.length;if(l)while(f--)if(!(l=b(e[f],t[f],n,r)))break}else{var c=p.keys(e),h;f=c.length,l=p.keys(t).length===f;if(l)while(f--){h=c[f];if(!(l=p.has(t,h)&&b(e[h],t[h],n,r)))break}}return n.pop(),r.pop(),l};p.isEqual=function(e,t){return b(e,t,[],[])},p.isEmpty=function(e){if(e==null)return!0;if(p.isArray(e)||p.isString(e)||p.isArguments(e))return e.length===0;for(var t in e)if(p.has(e,t))return!1;return!0},p.isElement=function(e){return!!e&&e.nodeType===1},p.isArray=l||function(e){return a.call(e)==="[object Array]"},p.isObject=function(e){var t=typeof e;return t==="function"||t==="object"&&!!e},p.each(["Arguments","Function","String","Number","Date","RegExp"],function(e){p["is"+e]=function(t){return a.call(t)==="[object "+e+"]"}}),p.isArguments(arguments)||(p.isArguments=function(e){return p.has(e,"callee")}),typeof /./!="function"&&(p.isFunction=function(e){return typeof e=="function"||!1}),p.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},p.isNaN=function(e){return p.isNumber(e)&&e!==+e},p.isBoolean=function(e){return e===!0||e===!1||a.call(e)==="[object Boolean]"},p.isNull=function(e){return e===null},p.isUndefined=function(e){return e===void 0},p.has=function(e,t){return e!=null&&f.call(e,t)},p.noConflict=function(){return e._=t,this},p.identity=function(e){return e},p.constant=function(e){return function(){return e}},p.noop=function(){},p.property=function(e){return function(t){return t[e]}},p.matches=function(e){var t=p.pairs(e),n=t.length;return function(e){if(e==null)return!n;e=new Object(e);for(var r=0;r<n;r++){var i=t[r],s=i[0];if(i[1]!==e[s]||!(s in e))return!1}return!0}},p.times=function(e,t,n){var r=Array(Math.max(0,e));t=d(t,n,1);for(var i=0;i<e;i++)r[i]=t(i);return r},p.random=function(e,t){return t==null&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},p.now=Date.now||function(){return(new Date).getTime()};var w={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},E=p.invert(w),S=function(e){var t=function(t){return e[t]},n="(?:"+p.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=e==null?"":""+e,r.test(e)?e.replace(i,t):e}};p.escape=S(w),p.unescape=S(E),p.result=function(e,t){if(e==null)return void 0;var n=e[t];return p.isFunction(n)?e[t]():n};var x=0;p.uniqueId=function(e){var t=++x+"";return e?e+t:t},p.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var T=/(.)^/,N={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},C=/\\|'|\r|\n|\u2028|\u2029/g,k=function(e){return"\\"+N[e]};p.template=function(e,t,n){!t&&n&&(t=n),t=p.defaults({},t,p.templateSettings);var r=RegExp([(t.escape||T).source,(t.interpolate||T).source,(t.evaluate||T).source].join("|")+"|$","g"),i=0,s="__p+='";e.replace(r,function(t,n,r,o,u){return s+=e.slice(i,u).replace(C,k),i=u+t.length,n?s+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?s+="'+\n((__t=("+r+"))==null?'':__t)+\n'":o&&(s+="';\n"+o+"\n__p+='"),t}),s+="';\n",t.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{var o=new Function(t.variable||"obj","_",s)}catch(u){throw u.source=s,u}var a=function(e){return o.call(this,e,p)},f=t.variable||"obj";return a.source="function("+f+"){\n"+s+"}",a},p.chain=function(e){var t=p(e);return t._chain=!0,t};var L=function(e){return this._chain?p(e).chain():e};p.mixin=function(e){p.each(p.functions(e),function(t){var n=p[t]=e[t];p.prototype[t]=function(){var e=[this._wrapped];return s.apply(e,arguments),L.call(this,n.apply(p,e))}})},p.mixin(p),p.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=n[e];p.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),(e==="shift"||e==="splice")&&n.length===0&&delete n[0],L.call(this,n)}}),p.each(["concat","join","slice"],function(e){var t=n[e];p.prototype[e]=function(){return L.call(this,t.apply(this._wrapped,arguments))}}),p.prototype.value=function(){return this._wrapped},typeof define=="function"&&define.amd&&define("underscore",[],function(){return p})}.call(this),function(){var e,t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P,H,B,j,F,I,q,R,U,z,W,X,V,$,J,K,Q,G,Y,Z,et,tt,nt,rt,it,st,ot,ut,at,ft,lt,ct,ht,pt,dt,vt,mt,gt={}.hasOwnProperty,yt=function(e,t){function r(){this.constructor=e}for(var n in t)gt.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},bt=[].slice,wt=function(e,t){return function(){return e.apply(t,arguments)}};e={toString:function(){return"Bacon"}},e.version="0.7.70",c=(typeof global!="undefined"&&global!==null?global:this).Error,nt=function(){},J=function(e,t){return t},U=function(e,t){return e},M=function(e){return e.slice(0)},x=function(e,t){if(!t)throw new c(e)},A=function(e){if(e instanceof v&&!(e instanceof m))throw new c("Observable is not a Property : "+e)},N=function(e){if(!(e instanceof l))throw new c("not an EventStream : "+e)},L=function(e){if(!(e instanceof v))throw new c("not an Observable : "+e)},C=function(e){return x("not a function : "+e,E.isFunction(e))},X=function(e){return e instanceof Array},$=function(e){return e instanceof v},T=function(e){if(!X(e))throw new c("not an array : "+e)},k=function(e){return x("no arguments supported",e.length===0)},O=function(e){if(typeof e!="string")throw new c("not a string : "+e)},E={indexOf:Array.prototype.indexOf?function(e,t){return e.indexOf(t)}:function(e,t){var n,r,i,s;for(n=r=0,i=e.length;r<i;n=++r){s=e[n];if(t===s)return n}return-1},indexWhere:function(e,t){var n,r,i,s;for(n=r=0,i=e.length;r<i;n=++r){s=e[n];if(t(s))return n}return-1},head:function(e){return e[0]},always:function(e){return function(){return e}},negate:function(e){return function(t){return!e(t)}},empty:function(e){return e.length===0},tail:function(e){return e.slice(1,e.length)},filter:function(e,t){var n,r,i,s;n=[];for(r=0,i=t.length;r<i;r++)s=t[r],e(s)&&n.push(s);return n},map:function(e,t){var n,r,i,s;i=[];for(n=0,r=t.length;n<r;n++)s=t[n],i.push(e(s));return i},each:function(e,t){var n,r;for(n in e){if(!gt.call(e,n))continue;r=e[n],t(n,r)}return void 0},toArray:function(e){return X(e)?e:[e]},contains:function(e,t){return E.indexOf(e,t)!==-1},id:function(e){return e},last:function(e){return e[e.length-1]},all:function(e,t){var n,r,i;t==null&&(t=E.id);for(n=0,r=e.length;n<r;n++){i=e[n];if(!t(i))return!1}return!0},any:function(e,t){var n,r,i;t==null&&(t=E.id);for(n=0,r=e.length;n<r;n++){i=e[n];if(t(i))return!0}return!1},without:function(e,t){return E.filter(function(t){return t!==e},t)},remove:function(e,t){var n;n=E.indexOf(t,e);if(n>=0)return t.splice(n,1)},fold:function(e,t,n){var r,i,s;for(r=0,i=e.length;r<i;r++)s=e[r],t=n(t,s);return t},flatMap:function(e,t){return E.fold(t,[],function(t,n){return t.concat(e(n))})},cached:function(e){var t;return t=d,function(){return t===d&&(t=e(),e=void 0),t}},isFunction:function(e){return typeof e=="function"},toString:function(e){var t,n,r,i;try{return it++,e==null?"undefined":E.isFunction(e)?"function":X(e)?it>5?"[..]":"["+E.map(E.toString,e).toString()+"]":(e!=null?e.toString:void 0)!=null&&e.toString!==Object.prototype.toString?e.toString():typeof e=="object"?it>5?"{..}":(n=function(){var n;n=[];for(r in e){if(!gt.call(e,r))continue;i=function(){try{return e[r]}catch(n){return t=n,t}}(),n.push(E.toString(r)+":"+E.toString(i))}return n}(),"{"+n+"}"):e}finally{it--}}},it=0,e._=E,w=e.UpdateBarrier=function(){var t,n,r,i,s,o,u,a,f,l,c,h,p,d;return l=void 0,c=[],h={},n=[],r=0,t=function(e){return l?n.push(e):e()},p=function(e,t){var n;return l?(n=h[e.id],n==null?(n=h[e.id]=[t],c.push(e)):n.push(t)):t()},s=function(){while(c.length>0)u(0);return void 0},u=function(e){var t,n,r,i,s,u;i=c[e],s=i.id,u=h[s],c.splice(e,1),delete h[s],o(i);for(n=0,r=u.length;n<r;n++)t=u[n],t();return void 0},o=function(e){var t,n,r,i,s;n=e.internalDeps();for(i=0,s=n.length;i<s;i++)t=n[i],o(t),h[t.id]&&(r=E.indexOf(c,t),u(r));return void 0},f=function(e,t,i,o){var u,a;if(l)return i.apply(t,o);l=e;try{a=i.apply(t,o),s()}finally{l=void 0;while(r<n.length)u=n[r],r++,u();r=0,n=[]}return a},i=function(){return l?l.id:void 0},d=function(n,r){var i,s,o,u;return u=!1,s=!1,i=function(){return s=!0},o=function(){return u=!0,i()},i=n.dispatcher.subscribe(function(n){return t(function(){var t;if(!u){t=r(n);if(t===e.noMore)return o()}})}),s&&i(),o},a=function(){return c.length>0},{whenDoneWith:p,hasWaiters:a,inTransaction:f,currentEventId:i,wrappedSubscribe:d,afterTransaction:t}}(),b=function(){function e(e,t,n){this.obs=e,this.sync=t,this.lazy=n!=null?n:!1,this.queue=[]}return e.prototype.subscribe=function(e){return this.obs.dispatcher.subscribe(e)},e.prototype.toString=function(){return this.obs.toString()},e.prototype.markEnded=function(){return this.ended=!0},e.prototype.consume=function(){return this.lazy?{value:E.always(this.queue[0])}:this.queue[0]},e.prototype.push=function(e){return this.queue=[e]},e.prototype.mayHave=function(){return!0},e.prototype.hasAtLeast=function(){return this.queue.length},e.prototype.flatten=!0,e}(),i=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return yt(t,e),t.prototype.consume=function(){return this.queue.shift()},t.prototype.push=function(e){return this.queue.push(e)},t.prototype.mayHave=function(e){return!this.ended||this.queue.length>=e},t.prototype.hasAtLeast=function(e){return this.queue.length>=e},t.prototype.flatten=!1,t}(b),t=function(e){function t(e){t.__super__.constructor.call(this,e,!0)}return yt(t,e),t.prototype.consume=function(){var e;return e=this.queue,this.queue=[],{value:function(){return e}}},t.prototype.push=function(e){return this.queue.push(e.value())},t.prototype.hasAtLeast=function(){return!0},t}(b),b.isTrigger=function(e){return e instanceof b?e.sync:e instanceof l},b.fromObservable=function(e){return e instanceof b?e:e instanceof m?new b(e,!1):new i(e,!0)},s=function(){function e(e,t,n){this.context=e,this.method=t,this.args=n}return e.prototype.deps=function(){return this.cached||(this.cached=I([this.context].concat(this.args)))},e.prototype.toString=function(){return E.toString(this.context)+"."+E.toString(this.method)+"("+E.map(E.toString,this.args)+")"},e}(),H=function(){var e,t,n;return t=arguments[0],n=arguments[1],e=3<=arguments.length?bt.call(arguments,2):[],(t||n)instanceof s?t||n:new s(t,n,e)},vt=function(e,t){return t.desc=e,t},I=function(e){return X(e)?E.flatMap(I,e):$(e)?[e]:e instanceof b?[e.obs]:[]},e.Desc=s,e.Desc.empty=new e.Desc("","",[]),mt=function(e){return function(){var t,n,r,i;return r=arguments[0],t=2<=arguments.length?bt.call(arguments,1):[],typeof r=="object"&&t.length&&(n=r,i=t[0],r=function(){return n[i].apply(n,arguments)},t=t.slice(1)),e.apply(null,[r].concat(bt.call(t)))}},G=function(e){return e=Array.prototype.slice.call(e),Y.apply(null,e)},rt=function(e,t){return function(){var n;return n=1<=arguments.length?bt.call(arguments,0):[],e.apply(null,t.concat(n))}},pt=function(e){return function(t){return function(n){var r;return n==null?void 0:(r=n[t],E.isFunction(r)?r.apply(n,e):r)}}},lt=function(e,t){var n,r;return r=e.slice(1).split("."),n=E.map(pt(t),r),function(t){var r,i;for(r=0,i=n.length;r<i;r++)e=n[r],t=e(t);return t}},V=function(e){return typeof e=="string"&&e.length>1&&e.charAt(0)==="."},Y=mt(function(){var e,t;return t=arguments[0],e=2<=arguments.length?bt.call(arguments,1):[],E.isFunction(t)?e.length?rt(t,e):t:V(t)?lt(t,e):E.always(t)}),Q=function(e,t){return Y.apply(null,[e].concat(bt.call(t)))},P=function(e,t,n,r){var i;return t instanceof m?(i=t.sampledBy(e,function(e,t){return[e,t]}),r.call(i,function(e){var t,n;return t=e[0],n=e[1],t}).map(function(e){var t,n;return t=e[0],n=e[1],n})):(t=Q(t,n),r.call(e,t))},at=function(e){var t;if(E.isFunction(e))return e;if(V(e))return t=ct(e),function(e,n){return e[t](n)};throw new c("not a function or a field key: "+e)},ct=function(e){return e.slice(1)},y=function(){function e(e){this.value=e}return e.prototype.getOrElse=function(){return this.value},e.prototype.get=function(){return this.value},e.prototype.filter=function(t){return t(this.value)?new e(this.value):d},e.prototype.map=function(t){return new e(t(this.value))},e.prototype.forEach=function(e){return e(this.value)},e.prototype.isDefined=!0,e.prototype.toArray=function(){return[this.value]},e.prototype.inspect=function(){return"Some("+this.value+")"},e.prototype.toString=function(){return this.inspect()},e}(),d={getOrElse:function(e){return e},filter:function(){return d},map:function(){return d},forEach:function(){},isDefined:!1,toArray:function(){return[]},inspect:function(){return"None"},toString:function(){return this.inspect()}},ht=function(e){return e instanceof y||e===d?e:new y(e)},e.noMore=["<no-more>"],e.more=["<more>"],j=0,f=function(){function e(){this.id=++j}return e.prototype.isEvent=function(){return!0},e.prototype.isEnd=function(){return!1},e.prototype.isInitial=function(){return!1},e.prototype.isNext=function(){return!1},e.prototype.isError=function(){return!1},e.prototype.hasValue=function(){return!1},e.prototype.filter=function(){return!0},e.prototype.inspect=function(){return this.toString()},e.prototype.log=function(){return this.toString()},e}(),p=function(e){function t(e,n){t.__super__.constructor.call(this),!n&&E.isFunction(e)||e instanceof t?(this.valueF=e,this.valueInternal=void 0):(this.valueF=void 0,this.valueInternal=e)}return yt(t,e),t.prototype.isNext=function(){return!0},t.prototype.hasValue=function(){return!0},t.prototype.value=function(){return this.valueF instanceof t?(this.valueInternal=this.valueF.value(),this.valueF=void 0):this.valueF&&(this.valueInternal=this.valueF(),this.valueF=void 0),this.valueInternal},t.prototype.fmap=function(e){var t,n;return this.valueInternal?(n=this.valueInternal,this.apply(function(){return e(n)})):(t=this,this.apply(function(){return e(t.value())}))},t.prototype.apply=function(e){return new t(e)},t.prototype.filter=function(e){return e(this.value())},t.prototype.toString=function(){return E.toString(this.value())},t.prototype.log=function(){return this.value()},t}(f),h=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return yt(t,e),t.prototype.isInitial=function(){return!0},t.prototype.isNext=function(){return!1},t.prototype.apply=function(e){return new t(e)},t.prototype.toNext=function(){return new p(this)},t}(p),u=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return yt(t,e),t.prototype.isEnd=function(){return!0},t.prototype.fmap=function(){return this},t.prototype.apply=function(){return this},t.prototype.toString=function(){return"<end>"},t}(f),a=function(e){function t(e){this.error=e}return yt(t,e),t.prototype.isError=function(){return!0},t.prototype.fmap=function(){return this},t.prototype.apply=function(){return this},t.prototype.toString=function(){return"<error> "+E.toString(this.error)},t}(f),e.Event=f,e.Initial=h,e.Next=p,e.End=u,e.Error=a,W=function(e){return new h(e,!0)},tt=function(e){return new p(e,!0)},B=function(){return new u},ft=function(e){return e instanceof f?e:tt(e)},z=0,ot=function(){},v=function(){function e(e){this.desc=e,this.id=++z,this.initialDesc=this.desc}return e.prototype.subscribe=function(e){return w.wrappedSubscribe(this,e)},e.prototype.subscribeInternal=function(e){return this.dispatcher.subscribe(e)},e.prototype.onValue=function(){var e;return e=G(arguments),this.subscribe(function(t){if(t.hasValue())return e(t.value())})},e.prototype.onValues=function(e){return this.onValue(function(t){return e.apply(null,t)})},e.prototype.onError=function(){var e;return e=G(arguments),this.subscribe(function(t){if(t.isError())return e(t.error)})},e.prototype.onEnd=function(){var e;return e=G(arguments),this.subscribe(function(t){if(t.isEnd())return e()})},e.prototype.name=function(e){return this._name=e,this},e.prototype.withDescription=function(){return this.desc=H.apply(null,arguments),this},e.prototype.toString=function(){return this._name?this._name:this.desc.toString()},e.prototype.internalDeps=function(){return this.initialDesc.deps()},e}(),v.prototype.assign=v.prototype.onValue,v.prototype.forEach=v.prototype.onValue,v.prototype.inspect=v.prototype.toString,e.Observable=v,r=function(){function e(e){var t,n,r;e==null&&(e=[]),this.unsubscribe=wt(this.unsubscribe,this),this.unsubscribed=!1,this.subscriptions=[],this.starting=[];for(t=0,n=e.length;t<n;t++)r=e[t],this.add(r)}return e.prototype.add=function(e){var t,n,r;if(this.unsubscribed)return;return t=!1,n=nt,this.starting.push(e),r=function(r){return function(){if(r.unsubscribed)return;return t=!0,r.remove(n),E.remove(e,r.starting)}}(this),n=e(this.unsubscribe,r),!this.unsubscribed&&!t?this.subscriptions.push(n):n(),E.remove(e,this.starting),n},e.prototype.remove=function(e){if(this.unsubscribed)return;if(E.remove(e,this.subscriptions)!==void 0)return e()},e.prototype.unsubscribe=function(){var e,t,n,r;if(this.unsubscribed)return;this.unsubscribed=!0,n=this.subscriptions;for(e=0,t=n.length;e<t;e++)r=n[e],r();return this.subscriptions=[],this.starting=[]},e.prototype.count=function(){return this.unsubscribed?0:this.subscriptions.length+this.starting.length},e.prototype.empty=function(){return this.count()===0},e}(),e.CompositeUnsubscribe=r,o=function(){function t(e,t){this._subscribe=e,this._handleEvent=t,this.subscribe=wt(this.subscribe,this),this.handleEvent=wt(this.handleEvent,this),this.subscriptions=[],this.queue=[]}return t.prototype.pushing=!1,t.prototype.ended=!1,t.prototype.prevError=void 0,t.prototype.unsubSrc=void 0,t.prototype.hasSubscribers=function(){return this.subscriptions.length>0},t.prototype.removeSub=function(e){return this.subscriptions=E.without(e,this.subscriptions)},t.prototype.push=function(e){return e.isEnd()&&(this.ended=!0),w.inTransaction(e,this,this.pushIt,[e])},t.prototype.pushToSubscriptions=function(t){var n,r,i,s,o,u;try{u=this.subscriptions;for(r=0,i=u.length;r<i;r++)o=u[r],s=o.sink(t),(s===e.noMore||t.isEnd())&&this.removeSub(o);return!0}catch(a){throw n=a,this.pushing=!1,this.queue=[],n}},t.prototype.pushIt=function(t){if(!this.pushing){if(t===this.prevError)return;t.isError()&&(this.prevError=t),this.pushing=!0,this.pushToSubscriptions(t),this.pushing=!1;while(this.queue.length)t=this.queue.shift(),this.push(t);return this.hasSubscribers()?e.more:(this.unsubscribeFromSource(),e.noMore)}return this.queue.push(t),e.more},t.prototype.handleEvent=function(e){return this._handleEvent?this._handleEvent(e):this.push(e)},t.prototype.unsubscribeFromSource=function(){return this.unsubSrc&&this.unsubSrc(),this.unsubSrc=void 0},t.prototype.subscribe=function(e){var t;return this.ended?(e(B()),nt):(C(e),t={sink:e},this.subscriptions.push(t),this.subscriptions.length===1&&(this.unsubSrc=this._subscribe(this.handleEvent),C(this.unsubSrc)),function(e){return function(){e.removeSub(t);if(!e.hasSubscribers())return e.unsubscribeFromSource()}}(this))},t}(),e.Dispatcher=o,l=function(t){function n(e,t,r){E.isFunction(e)&&(r=t,t=e,e=s.empty),n.__super__.constructor.call(this,e),C(t),this.dispatcher=new o(t,r),ot(this)}return yt(n,t),n.prototype.toProperty=function(t){var n,r;return r=arguments.length===0?d:ht(function(){return t}),n=this.dispatcher,new m(new e.Desc(this,"toProperty",[t]),function(t){var i,s,o,u;return i=!1,u=nt,s=e.more,o=function(){if(!i)return r.forEach(function(n){i=!0,s=t(new h(n));if(s===e.noMore)return u(),u=nt})},u=n.subscribe(function(n){if(n.hasValue())return i&&n.isInitial()?e.more:(n.isInitial()||o(),i=!0,r=new y(n),t(n));n.isEnd()&&(s=o());if(s!==e.noMore)return t(n)}),o(),u})},n.prototype.toEventStream=function(){return this},n.prototype.withHandler=function(t){return new n(new e.Desc(this,"withHandler",[t]),this.dispatcher.subscribe,t)},n}(v),e.EventStream=l,e.never=function(){return new l(H(e,"never"),function(e){return e(B()),nt})},e.when=function(){var t,n,r,i,s,o,u,a,f,c,h,p,d,v,m,g,y,S,T,N;if(arguments.length===0)return e.never();u=arguments.length,N="when: expecting arguments in the form (Observable+,function)+",x(N,u%2===0),S=[],d=[],n=0,v=[];while(n<u){v[n]=arguments[n],v[n+1]=arguments[n+1],p=E.toArray(arguments[n]),t=_(arguments[n+1]),h={f:t,ixs:[]},T=!1;for(s=0,a=p.length;s<a;s++){y=p[s],r=E.indexOf(S,y),T||(T=b.isTrigger(y)),r<0&&(S.push(y),r=S.length-1),m=h.ixs;for(o=0,f=m.length;o<f;o++)i=m[o],i.index===r&&i.count++;h.ixs.push({index:r,count:1})}x("At least one EventStream required",T||!p.length),p.length>0&&d.push(h),n+=2}return S.length?(S=E.map(b.fromObservable,S),c=E.any(S,function(e){return e.flatten})&&D(E.map(function(e){return e.obs},S)),g=new l(new e.Desc(e,"when",v),function(t){var r,i,s,o,u,a,f;return f=[],s=!1,o=function(e){var t,r,i;i=e.ixs;for(t=0,r=i.length;t<r;t++){n=i[t];if(!S[n.index].hasAtLeast(n.count))return!1}return!0},i=function(e){return!e.sync||e.ended},r=function(e){var t,r,i;i=e.ixs;for(t=0,r=i.length;t<r;t++){n=i[t];if(!S[n.index].mayHave(n.count))return!0}},u=function(e){return!e.source.flatten},a=function(a){return function(l){var h,p,v;return p=function(){return w.whenDoneWith(g,h)},v=function(){var r,i,s,a,l,c;if(!(f.length>0))return e.more;l=e.more,c=f.pop();for(i=0,s=d.length;i<s;i++){a=d[i];if(o(a))return r=function(){var e,t,r,i;r=a.ixs,i=[];for(t=0,e=r.length;t<e;t++)n=r[t],i.push(S[n.index].consume());return i}(),l=t(c.e.apply(function(){var e,t;return t=function(){var t,n,i;i=[];for(n=0,t=r.length;n<t;n++)e=r[n],i.push(e.value());return i}(),a.f.apply(a,t)})),f.length&&(f=E.filter(u,f)),l===e.noMore?l:v()}},h=function(){var n;return n=v(),s&&(E.all(S,i)||E.all(d,r))&&(n=e.noMore,t(B())),n===e.noMore&&l(),n},a.subscribe(function(n){var r;return n.isEnd()?(s=!0,a.markEnded(),p()):n.isError()?r=t(n):(a.push(n),a.sync&&(f.push({source:a,e:n}),c||w.hasWaiters()?p():h())),r===e.noMore&&l(),r||e.more})}},(new e.CompositeUnsubscribe(function(){var e,t,n;n=[];for(e=0,t=S.length;e<t;e++)y=S[e],n.push(a(y));return n}())).unsubscribe})):e.never()},D=function(e,t){var n;return t==null&&(t=[]),n=function(e){var r;return E.contains(t,e)?!0:(r=e.internalDeps(),r.length?(t.push(e),E.any(r,n)):(t.push(e),!1))},E.any(e,n)},_=function(e){return E.isFunction(e)?e:E.always(e)},e.groupSimultaneous=function(){var n,r,i;return i=1<=arguments.length?bt.call(arguments,0):[],i.length===1&&X(i[0])&&(i=i[0]),r=function(){var e,r,s;s=[];for(e=0,r=i.length;e<r;e++)n=i[e],s.push(new t(n));return s}(),vt(new e.Desc(e,"groupSimultaneous",i),e.when(r,function(){var e;return e=1<=arguments.length?bt.call(arguments,0):[],e}))},g=function(t){function n(e,t,r){this.property=e,this.subscribe=wt(this.subscribe,this),n.__super__.constructor.call(this,t,r),this.current=d,this.currentValueRootId=void 0,this.propertyEnded=!1}return yt(n,t),n.prototype.push=function(e){return e.isEnd()&&(this.propertyEnded=!0),e.hasValue()&&(this.current=new y(e),this.currentValueRootId=w.currentEventId()),n.__super__.push.call(this,e)},n.prototype.maybeSubSource=function(t,n){return n===e.noMore?nt:this.propertyEnded?(t(B()),nt):o.prototype.subscribe.call(this,t)},n.prototype.subscribe=function(t){var n,r,i,s;return r=!1,i=e.more,this.current.isDefined&&(this.hasSubscribers()||this.propertyEnded)?(n=w.currentEventId(),s=this.currentValueRootId,!this.propertyEnded&&s&&n&&n!==s?(w.whenDoneWith(this.property,function(e){return function(){if(e.currentValueRootId===s)return t(W(e.current.get().value()))}}(this)),this.maybeSubSource(t,i)):(w.inTransaction(void 0,this,function(){return i=t(W(this.current.get().value()))},[]),this.maybeSubSource(t,i))):this.maybeSubSource(t,i)},n}(o),m=function(t){function n(e,t,r){n.__super__.constructor.call(this,e),C(t),this.dispatcher=new g(this,t,r),ot(this)}return yt(n,t),n.prototype.changes=function(){return new l(new e.Desc(this,"changes",[]),function(e){return function(t){return e.dispatcher.subscribe(function(e){if(!e.isInitial())return t(e)})}}(this))},n.prototype.withHandler=function(t){return new n(new e.Desc(this,"withHandler",[t]),this.dispatcher.subscribe,t)},n.prototype.toProperty=function(){return k(arguments),this},n.prototype.toEventStream=function(){return new l(new e.Desc(this,"toEventStream",[]),function(e){return function(t){return e.dispatcher.subscribe(function(e){return e.isInitial()&&(e=e.toNext()),t(e)})}}(this))},n}(v),e.Property=m,e.constant=function(t){return new m(new e.Desc(e,"constant",[t]),function(e){return e(W(t)),e(B()),nt})},e.fromBinder=function(t,n){return n==null&&(n=E.id),new l(new e.Desc(e,"fromBinder",[t,n]),function(r){var i,s,o,u;return u=!1,i=!1,s=function(){if(!u)return typeof o!="undefined"&&o!==null?(o(),u=!0):i=!0},o=t(function(){var t,i,o,u,a,l;t=1<=arguments.length?bt.call(arguments,0):[],l=n.apply(this,t),X(l)&&E.last(l)instanceof f||(l=[l]),a=e.more;for(o=0,u=l.length;o<u;o++){i=l[o],a=r(i=ft(i));if(a===e.noMore||i.isEnd())return s(),a}return a}),i&&s(),s})},F=[["addEventListener","removeEventListener"],["addListener","removeListener"],["on","off"],["bind","unbind"]],q=function(e){var t,n,r,i;for(t=0,n=F.length;t<n;t++){i=F[t],r=[e[i[0]],e[i[1]]];if(r[0]&&r[1])return r}throw new a("No suitable event methods in "+e)},e.fromEventTarget=function(t,n,r){var i,s,o;return i=q(t),s=i[0],o=i[1],vt(new e.Desc(e,"fromEvent",[t,n]),e.fromBinder(function(e){return s.call(t,n,e),function(){return o.call(t,n,e)}},r))},e.fromEvent=e.fromEventTarget,e.Observable.prototype.map=function(){var t,n;return n=arguments[0],t=2<=arguments.length?bt.call(arguments,1):[],P(this,n,t,function(t){return vt(new e.Desc(this,"map",[t]),this.withHandler(function(e){return this.push(e.fmap(t))}))})},e.combineAsArray=function(){var t,n,r,i,s,o,u;u=1<=arguments.length?bt.call(arguments,0):[],u.length===1&&X(u[0])&&(u=u[0]);for(t=n=0,r=u.length;n<r;t=++n)o=u[t],$(o)||(u[t]=e.constant(o));return u.length?(s=function(){var e,t,n;n=[];for(e=0,t=u.length;e<t;e++)i=u[e],n.push(new b(i,!0));return n}(),vt(new e.Desc(e,"combineAsArray",u),e.when(s,function(){var e;return e=1<=arguments.length?bt.call(arguments,0):[],e}).toProperty())):e.constant([])},e.onValues=function(){var t,n,r;return r=2<=arguments.length?bt.call(arguments,0,n=arguments.length-1):(n=0,[]),t=arguments[n++],e.combineAsArray(r).onValues(t)},e.combineWith=function(){var t,n;return t=arguments[0],n=2<=arguments.length?bt.call(arguments,1):[],vt(new e.Desc(e,"combineWith",[t].concat(bt.call(n))),e.combineAsArray(n).map(function(e){return t.apply(null,e)}))},e.Observable.prototype.combine=function(t,n){var r;return r=at(n),vt(new e.Desc(this,"combine",[t,n]),e.combineAsArray(this,t).map(function(e){return r(e[0],e[1])}))},e.Observable.prototype.withStateMachine=function(t,n){var r;return r=t,vt(new e.Desc(this,"withStateMachine",[t,n]),this.withHandler(function(t){var i,s,o,u,a,f,l;i=n(r,t),u=i[0],f=i[1],r=u,l=e.more;for(s=0,o=f.length;s<o;s++){a=f[s],l=this.push(a);if(l===e.noMore)return l}return l}))},e.Observable.prototype.skipDuplicates=function(t){return t==null&&(t=function(e,t){return e===t}),vt(new e.Desc(this,"skipDuplicates",[]),this.withStateMachine(d,function(e,n){return n.hasValue()?n.isInitial()||e===d||!t(e.get(),n.value())?[new y(n.value()),[n]]:[e,[]]:[e,[n]]}))},e.Observable.prototype.awaiting=function(t){return vt(new e.Desc(this,"awaiting",[t]),e.groupSimultaneous(this,t).map(function(e){var t,n;return t=e[0],n=e[1],n.length===0}).toProperty(!1).skipDuplicates())},e.Observable.prototype.not=function(){return vt(new e.Desc(this,"not",[]),this.map(function(e){return!e}))},e.Property.prototype.and=function(t){return vt(new e.Desc(this,"and",[t]),this.combine(t,function(e,t){return e&&t}))},e.Property.prototype.or=function(t){return vt(new e.Desc(this,"or",[t]),this.combine(t,function(e,t){return e||t}))},e.scheduler={setTimeout:function(e,t){return setTimeout(e,t)},setInterval:function(e,t){return setInterval(e,t)},clearInterval:function(e){return clearInterval(e)},clearTimeout:function(e){return clearTimeout(e)},now:function(){return(new Date).getTime()}},e.EventStream.prototype.bufferWithTime=function(t){return vt(new e.Desc(this,"bufferWithTime",[t]),this.bufferWithTimeOrCount(t,Number.MAX_VALUE))},e.EventStream.prototype.bufferWithCount=function(t){return vt(new e.Desc(this,"bufferWithCount",[t]),this.bufferWithTimeOrCount(void 0,t))},e.EventStream.prototype.bufferWithTimeOrCount=function(t,n){var r;return r=function(e){if(e.values.length===n)return e.flush();if(t!==void 0)return e.schedule()},vt(new e.Desc(this,"bufferWithTimeOrCount",[t,n]),this.buffer(t,r,r))},e.EventStream.prototype.buffer=function(t,n,r){var i,s,o;return n==null&&(n=nt),r==null&&(r=nt),i={scheduled:null,end:void 0,values:[],flush:function(){var t,n;this.scheduled&&(e.scheduler.clearTimeout(this.scheduled),this.scheduled=null);if(this.values.length>0){n=this.values,this.values=[],t=this.push(tt(n));if(this.end!=null)return this.push(this.end);if(t!==e.noMore)return r(this)}else if(this.end!=null)return this.push(this.end)},schedule:function(){if(!this.scheduled)return this.scheduled=t(function(e){return function(){return e.flush()}}(this))}},o=e.more,E.isFunction(t)||(s=t,t=function(t){return e.scheduler.setTimeout(t,s)}),vt(new e.Desc(this,"buffer",[]),this.withHandler(function(e){return i.push=function(e){return function(t){return e.push(t)}}(this),e.isError()?o=this.push(e):e.isEnd()?(i.end=e,i.scheduled||i.flush()):(i.values.push(e.value()),n(i)),o}))},e.Observable.prototype.filter=function(){var t,n;return n=arguments[0],t=2<=arguments.length?bt.call(arguments,1):[],A(n),P(this,n,t,function(t){return vt(new e.Desc(this,"filter",[t]),this.withHandler(function(n){return n.filter(t)?this.push(n):e.more}))})},e.once=function(t){return new l(new s(e,"once",[t]),function(e){return e(ft(t)),e(B()),nt})},e.EventStream.prototype.concat=function(t){var n;return n=this,new l(new e.Desc(n,"concat",[t]),function(e){var r,i;return i=nt,r=n.dispatcher.subscribe(function(n){return n.isEnd()?i=t.dispatcher.subscribe(e):e(n)}),function(){return r(),i()}})},e.Observable.prototype.flatMap=function(){return R(this,et(arguments))},e.Observable.prototype.flatMapFirst=function(){return R(this,et(arguments),!0)},R=function(t,n,i,s){var o,u,a;return a=[t],o=[],u=new l(new e.Desc(t,"flatMap"+(i?"First":""),[n]),function(u){var a,f,l,c,p;return l=new r,c=[],p=function(t){var r;return r=Z(n(t.value())),o.push(r),l.add(function(t,n){return r.dispatcher.subscribe(function(i){var s;return i.isEnd()?(E.remove(r,o),f(),a(n),e.noMore):(i instanceof h&&(i=i.toNext()),s=u(i),s===e.noMore&&t(),s)})})},f=function(){var e;e=c.shift();if(e)return p(e)},a=function(e){e();if(l.empty())return u(B())},l.add(function(n,r){return t.dispatcher.subscribe(function(t){return t.isEnd()?a(r):t.isError()?u(t):i&&l.count()>1?e.more:l.unsubscribed?e.noMore:s&&l.count()>s?c.push(t):p(t)})}),l.unsubscribe}),u.internalDeps=function(){return o.length?a.concat(o):a},u},et=function(e){return e.length===1&&$(e[0])?E.always(e[0]):G(e)},Z=function(t){return $(t)?t:e.once(t)},e.Observable.prototype.flatMapWithConcurrencyLimit=function(){var t,n;return n=arguments[0],t=2<=arguments.length?bt.call(arguments,1):[],vt(new e.Desc(this,"flatMapWithConcurrencyLimit",[n].concat(bt.call(t))),R(this,et(t),!1,n))},e.Observable.prototype.flatMapConcat=function(){return vt(new e.Desc(this,"flatMapConcat",Array.prototype.slice.call(arguments,0)),this.flatMapWithConcurrencyLimit.apply(this,[1].concat(bt.call(arguments))))},e.later=function(t,n){return vt(new e.Desc(e,"later",[t,n]),e.fromBinder(function(r){var i,s;return s=function(){return r([n,B()])},i=e.scheduler.setTimeout(s,t),function(){return e.scheduler.clearTimeout(i)}}))},e.Observable.prototype.bufferingThrottle=function(t){return vt(new e.Desc(this,"bufferingThrottle",[t]),this.flatMapConcat(function(n){return e.once(n).concat(e.later(t).filter(!1))}))},e.Property.prototype.bufferingThrottle=function(){return e.Observable.prototype.bufferingThrottle.apply(this,arguments).toProperty()},n=function(t){function n(){this.guardedSink=wt(this.guardedSink,this),this.subscribeAll=wt(this.subscribeAll,this),this.unsubAll=wt(this.unsubAll,this),this.sink=void 0,this.subscriptions=[],this.ended=!1,n.__super__.constructor.call(this,new e.Desc(e,"Bus",[]),this.subscribeAll)}return yt(n,t),n.prototype.unsubAll=function(){var e,t,n,r;n=this.subscriptions;for(e=0,t=n.length;e<t;e++)r=n[e],typeof r.unsub=="function"&&r.unsub();return void 0},n.prototype.subscribeAll=function(e){var t,n,r,i;if(this.ended)e(B());else{this.sink=e,r=M(this.subscriptions);for(t=0,n=r.length;t<n;t++)i=r[t],this.subscribeInput(i)}return this.unsubAll},n.prototype.guardedSink=function(t){return function(n){return function(r){return r.isEnd()?(n.unsubscribeInput(t),e.noMore):n.sink(r)}}(this)},n.prototype.subscribeInput=function(e){return e.unsub=e.input.dispatcher.subscribe(this.guardedSink(e.input))},n.prototype.unsubscribeInput=function(e){var t,n,r,i,s;i=this.subscriptions;for(t=n=0,r=i.length;n<r;t=++n){s=i[t];if(s.input===e){typeof s.unsub=="function"&&s.unsub(),this.subscriptions.splice(t,1);return}}},n.prototype.plug=function(e){var t;L(e);if(this.ended)return;return t={input:e},this.subscriptions.push(t),this.sink!=null&&this.subscribeInput(t),function(t){return function(){return t.unsubscribeInput(e)}}(this)},n.prototype.end=function(){return this.ended=!0,this.unsubAll(),typeof this.sink=="function"?this.sink(B()):void 0},n.prototype.push=function(e){if(!this.ended)return typeof this.sink=="function"?this.sink(tt(e)):void 0},n.prototype.error=function(e){return typeof this.sink=="function"?this.sink(new a(e)):void 0},n}(l),e.Bus=n,K=function(t,n){return mt(function(){var r,i,s;return i=arguments[0],r=2<=arguments.length?bt.call(arguments,1):[],s=rt(n,[function(e,t){return i.apply(null,bt.call(e).concat([t]))}]),vt(new e.Desc(e,t,[i].concat(bt.call(r))),e.combineAsArray(r).flatMap(s))})},e.fromCallback=K("fromCallback",function(){var t,n;return n=arguments[0],t=2<=arguments.length?bt.call(arguments,1):[],e.fromBinder(function(e){return Q(n,t)(e),nt},function(e){return[e,B()]})}),e.fromNodeCallback=K("fromNodeCallback",function(){var t,n;return n=arguments[0],t=2<=arguments.length?bt.call(arguments,1):[],e.fromBinder(function(e){return Q(n,t)(e),nt},function(e,t){return e?[new a(e),B()]:[t,B()]})}),e.combineTemplate=function(t){var n,r,i,s,o,u,a,f,l,c,h;return a=[],h=[],u=function(e){return e[e.length-1]},c=function(e,t,n){return u(e)[t]=n},n=function(e,t){return function(n,r){return c(n,e,r[t])}},o=function(e,t){return function(n){return c(n,e,t)}},f=function(e){return X(e)?[]:{}},l=function(e,t){return function(n){var r;return r=f(t),c(n,e,r),n.push(r)}},i=function(e,t){var r;return $(t)?(h.push(t),a.push(n(e,h.length-1))):t!==Object(t)||typeof t=="function"||t instanceof RegExp||t instanceof Date?a.push(o(e,t)):(r=function(e){return e.pop()},a.push(l(e,t)),s(t),a.push(r))},s=function(e){return E.each(e,i)},s(t),r=function(e){var n,r,i,s,o;o=f(t),n=[o];for(i=0,s=a.length;i<s;i++)r=a[i],r(n,e);return o},vt(new e.Desc(e,"combineTemplate",[t]),e.combineAsArray(h).map(r))},S=function(t,n){var r;return r=new l(H(t,"justInitValue"),function(n){var i,s;return s=void 0,i=t.dispatcher.subscribe(function(t){return t.isEnd()||(s=t),e.noMore}),w.whenDoneWith(r,function(){return s!=null&&n(s),n(B())}),i}),r.concat(n).toProperty()},e.Observable.prototype.mapEnd=function(){var t;return t=G(arguments),vt(new e.Desc(this,"mapEnd",[t]),this.withHandler(function(n){return n.isEnd()?(this.push(tt(t(n))),this.push(B()),e.noMore):this.push(n)}))},e.Observable.prototype.skipErrors=function(){return vt(new e.Desc(this,"skipErrors",[]),this.withHandler(function(t){return t.isError()?e.more:this.push(t)}))},e.EventStream.prototype.takeUntil=function(t){var n;return n={},vt(new e.Desc(this,"takeUntil",[t]),e.groupSimultaneous(this.mapEnd(n),t.skipErrors()).withHandler(function(r){var i,s,o,u,a,f;if(!r.hasValue())return this.push(r);u=r.value(),i=u[0],t=u[1];if(t.length)return this.push(B());a=e.more;for(s=0,o=i.length;s<o;s++)f=i[s],f===n?a=this.push(B()):a=this.push(tt(f));return a}))},e.Property.prototype.takeUntil=function(t){var n;return n=this.changes().takeUntil(t),vt(new e.Desc(this,"takeUntil",[t]),S(this,n))},e.Observable.prototype.flatMapLatest=function(){var t,n;return t=et(arguments),n=this.toEventStream(),vt(new e.Desc(this,"flatMapLatest",[t]),n.flatMap(function(e){return Z(t(e)).takeUntil(n)}))},e.Property.prototype.delayChanges=function(e,t){return vt(e,S(this,t(this.changes())))},e.EventStream.prototype.delay=function(t){return vt(new e.Desc(this,"delay",[t]),this.flatMap(function(n){return e.later(t,n)}))},e.Property.prototype.delay=function(t){return this.delayChanges(new e.Desc(this,"delay",[t]),function(e){return e.delay(t)})},e.EventStream.prototype.debounce=function(t){return vt(new e.Desc(this,"debounce",[t]),this.flatMapLatest(function(n){return e.later(t,n)}))},e.Property.prototype.debounce=function(t){return this.delayChanges(new e.Desc(this,"debounce",[t]),function(e){return e.debounce(t)})},e.EventStream.prototype.debounceImmediate=function(t){return vt(new e.Desc(this,"debounceImmediate",[t]),this.flatMapFirst(function(n){return e.once(n).concat(e.later(t).filter(!1))}))},e.Observable.prototype.decode=function(t){return vt(new e.Desc(this,"decode",[t]),this.combine(e.combineTemplate(t),function(e,t){return t[e]}))},e.Observable.prototype.scan=function(t,n){var r,i,s,o;return n=at(n),r=ht(t),i=!1,o=function(t){return function(o){var u,a,f,l;return u=!1,l=nt,a=e.more,f=function(){if(!u)return r.forEach(function(t){u=i=!0,a=o(new h(function(){return t}));if(a===e.noMore)return l(),l=nt})},l=t.dispatcher.subscribe(function(t){var s,l;if(t.hasValue())return i&&t.isInitial()?e.more:(t.isInitial()||f(),u=i=!0,l=r.getOrElse(void 0),s=n(l,t.value()),r=new y(s),o(t.apply(function(){return s})));t.isEnd()&&(a=f());if(a!==e.noMore)return o(t)}),w.whenDoneWith(s,f),l}}(this),s=new m(new e.Desc(this,"scan",[t,n]),o)},e.Observable.prototype.diff=function(t,n){return n=at(n),vt(new e.Desc(this,"diff",[t,n]),this.scan([t],function(e,t){return[t,n(e[0],t)]}).filter(function(e){return e.length===2}).map(function(e){return e[1]}))},e.Observable.prototype.doAction=function(){var t;return t=G(arguments),vt(new e.Desc(this,"doAction",[t]),this.withHandler(function(e){return e.hasValue()&&t(e.value()),this.push(e)}))},e.Observable.prototype.doError=function(){var t;return t=G(arguments),vt(new e.Desc(this,"doError",[t]),this.withHandler(function(e){return e.isError()&&t(e.error),this.push(e)}))},e.Observable.prototype.doLog=function(){var t;return t=1<=arguments.length?bt.call(arguments,0):[],vt(new e.Desc(this,"doLog",t),this.withHandler(function(e){return typeof console!="undefined"&&console!==null&&typeof console.log=="function"&&console.log.apply(console,bt.call(t).concat([e.log()])),this.push(e)}))},e.Observable.prototype.endOnError=function(){var t,n;return n=arguments[0],t=2<=arguments.length?bt.call(arguments,1):[],n==null&&(n=!0),P(this,n,t,function(t){return vt(new e.Desc(this,"endOnError",[]),this.withHandler(function(e){return e.isError()&&t(e.error)?(this.push(e),this.push(B())):this.push(e)}))})},v.prototype.errors=function(){return vt(new e.Desc(this,"errors",[]),this.filter(function(){return!1}))},dt=function(e){return[e,B()]},e.fromPromise=function(t,n,r){return r==null&&(r=dt),vt(new e.Desc(e,"fromPromise",[t]),e.fromBinder(function(e){var r;return(r=t.then(e,function(t){return e(new a(t))}))!=null&&typeof r.done=="function"&&r.done(),function(){if(n)return typeof t.abort=="function"?t.abort():void 0}},r))},e.Observable.prototype.mapError=function(){var t;return t=G(arguments),vt(new e.Desc(this,"mapError",[t]),this.withHandler(function(e){return e.isError()?this.push(tt(t(e.error))):this.push(e)}))},e.Observable.prototype.flatMapError=function(t){return vt(new e.Desc(this,"flatMapError",[t]),this.mapError(function(e){return new a(e)}).flatMap(function(n){return n instanceof a?t(n.error):e.once(n)}))},e.EventStream.prototype.sampledBy=function(t,n){return vt(new e.Desc(this,"sampledBy",[t,n]),this.toProperty().sampledBy(t,n))},e.Property.prototype.sampledBy=function(t,n){var r,i,s,o,u;return n!=null?n=at(n):(r=!0,n=function(e){return e.value()}),u=new b(this,!1,r),s=new b(t,!0,r),o=e.when([u,s],n),i=t instanceof m?o.toProperty():o,vt(new e.Desc(this,"sampledBy",[t,n]),i)},e.Property.prototype.sample=function(t){return vt(new e.Desc(this,"sample",[t]),this.sampledBy(e.interval(t,{})))},e.Observable.prototype.map=function(){var t,n;return n=arguments[0],t=2<=arguments.length?bt.call(arguments,1):[],n instanceof m?n.sampledBy(this,U):P(this,n,t,function(t){return vt(new e.Desc(this,"map",[t]),this.withHandler(function(e){return this.push(e.fmap(t))}))})},e.Observable.prototype.fold=function(t,n){return vt(new e.Desc(this,"fold",[t,n]),this.scan(t,n).sampledBy(this.filter(!1).mapEnd().toProperty()))},v.prototype.reduce=v.prototype.fold,e.fromPoll=function(t,n){return vt(new e.Desc(e,"fromPoll",[t,n]),e.fromBinder(function(n){var r;return r=e.scheduler.setInterval(n,t),function(){return e.scheduler.clearInterval(r)}},n))},e.Observable.prototype.groupBy=function(t,n){var r,i;return n==null&&(n=e._.id),i={},r=this,r.filter(function(e){return!i[t(e)]}).map(function(s){var o,u,a,f;return u=t(s),f=r.filter(function(e){return t(e)===u}),o=e.once(s).concat(f),a=n(o,s).withHandler(function(e){this.push(e);if(e.isEnd())return delete i[u]}),i[u]=a})},e.fromArray=function(t){var n;return T(t),t.length?(n=0,new l(new e.Desc(e,"fromArray",[t]),function(r){var i,s,o,u,a;return a=!1,u=e.more,o=!1,s=!1,i=function(){var f;s=!0;if(o)return;o=!0;while(s)s=!1,u!==e.noMore&&!a&&(f=t[n++],u=r(ft(f)),u!==e.noMore&&(n===t.length?r(B()):w.afterTransaction(i)));return o=!1},i(),function(){return a=!0}})):vt(new e.Desc(e,"fromArray",t),e.never())},e.EventStream.prototype.holdWhen=function(t){var n,i,s;return i=!1,n=[],s=this,new l(new e.Desc(this,"holdWhen",[t]),function(e){var o,u,a;return o=new r,a=!1,u=function(t){typeof t=="function"&&t();if(o.empty()&&a)return e(B())},o.add(function(r,s){return t.subscribeInternal(function(t){var r,o,a,f,l;if(!t.hasValue())return t.isEnd()?u(s):e(t);i=t.value();if(!i){f=n,n=[],a=[];for(r=0,o=f.length;r<o;r++)l=f[r],a.push(e(tt(l)));return a}})}),o.add(function(t,r){return s.subscribeInternal(function(t){return i&&t.hasValue()?n.push(t.value()):t.isEnd()&&n.length?u(r):e(t)})}),a=!0,u(),o.unsubscribe})},e.interval=function(t,n){return n==null&&(n={}),vt(new e.Desc(e,"interval",[t,n]),e.fromPoll(t,function(){return tt(n)}))},e.$={},e.$.asEventStream=function(t,n,r){var i;return E.isFunction(n)&&(i=[n,void 0],r=i[0],n=i[1]),vt(new e.Desc(this.selector||this,"asEventStream",[t]),e.fromBinder(function(e){return function(r){return e.on(t,n,r),function(){return e.off(t,n,r)}}}(this),r))},(st=typeof jQuery!=="undefined"&&jQuery!==null?jQuery:typeof Zepto!=="undefined"&&Zepto!==null?Zepto:void 0)!=null&&(st.fn.asEventStream=e.$.asEventStream),e.Observable.prototype.log=function(){var e;return e=1<=arguments.length?bt.call(arguments,0):[],this.subscribe(function(t){return typeof console!="undefined"&&console!==null?typeof console.log=="function"?console.log.apply(console,bt.call(e).concat([t.log()])):void 0:void 0}),this},e.EventStream.prototype.merge=function(t){var n;return N(t),n=this,vt(new e.Desc(n,"merge",[t]),e.mergeAll(this,t))},e.mergeAll=function(){var t;return t=1<=arguments.length?bt.call(arguments,0):[],X(t[0])&&(t=t[0]),t.length?new l(new e.Desc(e,"mergeAll",t),function(n){var r,i,s;return r=0,s=function(i){return function(s){return i.dispatcher.subscribe(function(i){var o;return i.isEnd()?(r++,r===t.length?n(B()):e.more):(o=n(i),o===e.noMore&&s(),o)})}},i=E.map(s,t),(new e.CompositeUnsubscribe(i)).unsubscribe}):e.never()},e.repeatedly=function(t,n){var r;return r=0,vt(new e.Desc(e,"repeatedly",[t,n]),e.fromPoll(t,function(){return n[r++%n.length]}))},e.repeat=function(t){var n;return n=0,e.fromBinder(function(r){var i,s,o,u,a;return i=!1,o=e.more,a=function(){},s=function(e){return e.isEnd()?i?u():i=!0:o=r(e)},u=function(){var u;i=!0;while(i&&o!==e.noMore)u=t(n++),i=!1,u?a=u.subscribeInternal(s):r(B());return i=!0},u(),function(){return a()}})},e.retry=function(t){var n,r,i,s,o,u,a;if(!E.isFunction(t.source))throw new c("'source' option has to be a function");return a=t.source,u=t.retries||0,o=t.maxRetries||u,n=t.delay||function(){return 0},s=t.isRetryable||function(){return!0},i=!1,r=null,vt(new e.Desc(e,"retry",[t]),e.repeat(function(){var t,f,l;return i?null:(l=function(){return a().endOnError().withHandler(function(e){if(!e.isError())return e.hasValue()&&(r=null,i=!0),this.push(e);r=e;if(!(s(r.error)&&u>0))return i=!0,this.push(e)})},r?(t={error:r.error,retriesDone:o-u},f=e.later(n(t)).filter(!1),u-=1,f.concat(e.once().flatMap(l))):l())}))},e.sequentially=function(t,n){var r;return r=0,vt(new e.Desc(e,"sequentially",[t,n]),e.fromPoll(t,function(){var e;return e=n[r++],r<n.length?e:r===n.length?[e,B()]:B()}))},e.Observable.prototype.skip=function(t){return vt(new e.Desc(this,"skip",[t]),this.withHandler(function(n){return n.hasValue()?t>0?(t--,e.more):this.push(n):this.push(n)}))},e.Observable.prototype.take=function(t){return t<=0?e.never():vt(new e.Desc(this,"take",[t]),this.withHandler(function(n){return n.hasValue()?(t--,t>0?this.push(n):(t===0&&this.push(n),this.push(B()),e.noMore)):this.push(n)}))},e.EventStream.prototype.skipUntil=function(t){var n;return n=t.take(1).map(!0).toProperty(!1),vt(new e.Desc(this,"skipUntil",[t]),this.filter(n))},e.EventStream.prototype.skipWhile=function(){var t,n,r;return n=arguments[0],t=2<=arguments.length?bt.call(arguments,1):[],A(n),r=!1,P(this,n,t,function(t){return vt(new e.Desc(this,"skipWhile",[t]),this.withHandler(function(n){return r||!n.hasValue()||!t(n.value())?(n.hasValue()&&(r=!0),this.push(n)):e.more}))})},e.Observable.prototype.slidingWindow=function(t,n){return n==null&&(n=0),vt(new e.Desc(this,"slidingWindow",[t,n]),this.scan([],function(e,n){return e.concat([n]).slice(-t)}).filter(function(e){return e.length>=n}))},e.spy=function(e){return ut.push(e)},ut=[],ot=function(e){var t,n,r;if(ut.length&&!ot.running)try{ot.running=!0;for(t=0,n=ut.length;t<n;t++)r=ut[t],r(e)}finally{delete ot.running}return void 0},e.Property.prototype.startWith=function(t){return vt(new e.Desc(this,"startWith",[t]),this.scan(t,function(e,t){return t}))},e.EventStream.prototype.startWith=function(t){return vt(new e.Desc(this,"startWith",[t]),e.once(t).concat(this))},e.Observable.prototype.takeWhile=function(){var t,n;return n=arguments[0],t=2<=arguments.length?bt.call(arguments,1):[],A(n),P(this,n,t,function(t){return vt(new e.Desc(this,"takeWhile",[t]),this.withHandler(function(n){return n.filter(t)?this.push(n):(this.push(B()),e.noMore)}))})},e.update=function(){var t,n,r,i;n=arguments[0],i=2<=arguments.length?bt.call(arguments,1):[],r=function(e){return function(){var t;return t=1<=arguments.length?bt.call(arguments,0):[],function(n){return e.apply(null,[n].concat(t))}}},t=i.length-1;while(t>0)i[t]instanceof Function||(i[t]=function(e){return function(){return e}}(i[t])),i[t]=r(i[t]),t-=2;return vt(new e.Desc(e,"update",[n].concat(bt.call(i))),e.when.apply(e,i).scan(n,function(e,t){return t(e)}))},e.zipAsArray=function(){var t;return t=1<=arguments.length?bt.call(arguments,0):[],X(t[0])&&(t=t[0]),vt(new e.Desc(e,"zipAsArray",t),e.zipWith(t,function(){var e;return e=1<=arguments.length?bt.call(arguments,0):[],e}))},e.zipWith=function(){var t,n,r;return t=arguments[0],r=2<=arguments.length?bt.call(arguments,1):[],E.isFunction(t)||(n=[t,r[0]],r=n[0],t=n[1]),r=E.map(function(e){return e.toEventStream()},r),vt(new e.Desc(e,"zipWith",[t].concat(bt.call(r))),e.when(r,t))},e.Observable.prototype.zip=function(t,n){return n==null&&(n=Array),vt(new e.Desc(this,"zip",[t]),e.zipWith([this,t],n))},e.Observable.prototype.first=function(){return vt(new e.Desc(this,"first",[]),this.take(1))},e.Observable.prototype.last=function(){var t;return vt(new e.Desc(this,"last",[]),this.withHandler(function(n){if(n.isEnd())return t&&this.push(t),this.push(B()),e.noMore;t=n}))},e.EventStream.prototype.throttle=function(t){return vt(new e.Desc(this,"throttle",[t]),this.bufferWithTime(t).map(function(e){return e[e.length-1]}))},e.Property.prototype.throttle=function(t){return this.delayChanges(new e.Desc(this,"throttle",[t]),function(e){return e.throttle(t)})},v.prototype.firstToPromise=function(t){var n=this;if(typeof t!="function"){if(typeof Promise!="function")throw new c("There isn't default Promise, use shim or parameter");t=Promise}return new t(function(t,r){return n.subscribe(function(n){return n.hasValue()&&t(n.value()),n.isError()&&r(n.error),e.noMore})})},v.prototype.toPromise=function(e){return this.last().firstToPromise(e)},typeof define!="undefined"&&define!==null&&define.amd!=null?(define("bacon",[],function(){return e}),this.Bacon=e):typeof module!="undefined"&&module!==null&&module.exports!=null?(module.exports=e,e.Bacon=e):this.Bacon=e}.call(this),define("Grid",["require","underscore"],function(e){function r(e){function s(){var e=this;for(var t=0;t<e.height;t++)e.pieces.push(new Array(e.width));for(var n=0;n<e.width;n++)for(var r=0;r<e.height;r++)e.pieces[r][n]=new i(n,r)}e=e||{},this.gravity=e.gravity||"down",this.width=e.width||10,this.height=e.height||10,this.matchesNeeded=e.matchesNeeded||3,this.pieces=[],s.call(this),r.prototype.getMatches=function(){function i(t){function r(t,i,s,o){return i>=t.length?(s.length>=e.matchesNeeded&&o.push(s),o):(s.length!==0&&s[0].type!==t[i].type||t[i].type==n?(s.length>=e.matchesNeeded&&o.push(s),s=[t[i]]):s.push(t[i]),r(t,++i,s,o))}return r(t,0,[],[])}var e=this,r=[];return this.getRows().concat(this.getColumns()).forEach(function(e){var n=t.flatten(i(e));t.isEmpty(n)||r.push(n)}),r},r.prototype.clearMatches=function(){var e=this,r=this.getMatches();return t.forEach(r,function(r){t.forEach(r,function(t){e.setPiece(t.x,t.y,new i(t.x,t.y,n))})}),r},r.prototype.applyGravity=function(){var e=this;if(!e.gravity)return[];var t=[];for(var r=0;r<e.width;r++){var i=this.getColumns()[r],s=0;for(var o=i.length-1;o>=0;o--)i[o].type===n?s++:s>0&&t.push({x:r,y:o,move:s})}return e.movePieces(t),t},r.prototype.movePieces=function(e){var t=this;e.forEach(function(e){var r=t.getPiece(e.x,e.y);r.y+=e.move,t.getPiece(r.x,r.y).type!=n&&console.log("ERROR: Moved on actual piece"),t.setPiece(e.x,e.y,new i(e.x,e.y,n)),t.setPiece(r.x,r.y,r)})},r.prototype.setPieces=function(e){var t=this;for(var n=0;n<t.height;n++)for(var r=0;r<t.width;r++)this.setPiece(r,n,new i(r,n,e[n][r]))},r.prototype.getPieces=function(){var e=this;return e.pieces},r.prototype.getPiece=function(e,t){var n,r=this;try{n=r.pieces[t][e]}catch(i){console.log("Invalid coords, x: "+e+", y: "+t)}return n},r.prototype.setPiece=function(e,t,n){var r=this;r.pieces[t][e]=n},r.prototype.debugPrint=function(){function r(e){return(e.toString()+"     ").slice(0,5)}var e=this,n="";t.range(e.height).forEach(function(i){t.range(e.width).forEach(function(t){n+=r(e.getPiece(t,i).type)+" "}),n+="\n"}),console.log(n)},r.prototype.getEmptyPiecesPerColumn=function(){var e=[];return this.getColumns().forEach(function(r){e.push(t.filter(r,function(e){return e.type===n}).length)}),e},r.prototype.getRows=function(){return this.getPieces()},r.prototype.getColumns=function(){return t.zip.apply(this,this.getPieces())},r.prototype.swap=function(e,t){this.setPiece(t.x,t.y,new i(t.x,t.y,e.type)),this.setPiece(e.x,e.y,new i(e.x,e.y,t.type))},r.prototype.getAvailableMoves=function(){function r(e,t,r){var i;return n.swap(e,t),n.getMatches().length>0&&(i={x:e.x,y:e.y,direction:r}),n.swap(n.getPiece(e.x,e.y),n.getPiece(t.x,t.y)),i}if(this.getMatches().length>0)return[];var e=[],n=this;return n.getRows().forEach(function(t){t.forEach(function(t){t.x+1<n.width&&e.push(r(t,n.getPiece(t.x+1,t.y),"right")),t.y+1<n.height&&e.push(r(t,n.getPiece(t.x,t.y+1),"down"))})}),t.filter(e,function(e){return e!=undefined})}}function i(e,t,n){return{x:e,y:t,type:n}}var t=e("underscore"),n="empty";return r}),function(){var e,t,n=[].slice;t=function(e){var t,r,i,s,o,u,a,f,l,c,h,p;return u=function(e){return e},l=function(e){return e.length>0},s=function(e,t,n){var r,i,s;for(i=0,s=e.length;i<s;i++)r=e[i],t=n(t,r);return t},f=function(t){return t instanceof e.Property},o=0,a=1,i=function(e,t){return e===t},c=function(e){return function(t,n){return!t.initial&&e(t.value,n.value)}},r=e.Model=function(n){var s,o,f,l,d,v,m,g;return d=a++,o=i,v=0,l=new e.Bus,m=new e.Bus,s=void 0,g=e.update({initial:!0},[l],function(e,t){var n,r,i,s,o,u;return u=e.value,o=t.source,r=t.f,s=r(u),i=[d],n=s!==u,{source:o,value:s,modStack:i,changed:n}},[m],function(e,t){return t}).skipDuplicates(c(o)).changes().toProperty(),f=g.map(".value").skipDuplicates(o),f.dispatcher.subscribe(function(e){if(e.hasValue())return s=e.value()}),f.id||(f.id=d),f.addSyncSource=function(t){return m.plug(t.filter(function(t){return t.changed&&!e._.contains(t.modStack,d)}).doAction(function(){return e.Model.syncCount++}).map(function(e){return h(e,"modStack",e.modStack.concat([d]))}).map(function(e){return p.set(e,f.syncConverter(p.get(e)))}))},f.apply=function(e){return l.plug(e.toEventStream().map(function(t){return{source:e,f:t}})),g.changes().filter(function(t){return t.source!==e}).map(function(e){return e.value})},f.addSource=function(e){return f.apply(e.map(function(e){return function(){return e}}))},f.modify=function(t){return f.apply(e.once(t))},f.set=function(e){return f.modify(function(){return e})},f.get=function(){return s},f.syncEvents=function(){return g.toEventStream()},f.bind=function(e){return this.addSyncSource(e.syncEvents()),e.addSyncSource(this.syncEvents())},f.lens=function(e){var n;return e=t(e),n=r(),this.addSyncSource(f.sampledBy(n.syncEvents(),function(t,n){return p.set(n,e.set(t,n.value))})),n.addSyncSource(this.syncEvents().map(function(t){return p.set(t,e.get(t.value))})),n},f.syncConverter=u,arguments.length>=1&&f.set(n),f},e.Model.syncCount=0,r.combine=function(e){var n,i,s,o,u,a;if(typeof e!="object")return r(e);if(f(e))return e;n=e instanceof Array?[]:{},u=r(n);for(i in e)a=e[i],s=t.objectLens(i),o=u.lens(s),o.bind(r.combine(a));return u},e.Binding=function(t){var n,r,i,s,o,u,a;return s=t.initValue,i=t.get,n=t.events,a=t.set,o=n.map(i),s!=null?a(s):s=i(),u=e.Model(s),r=u.addSource(o),r.assign(a),u},t=e.Lens=function(e){return typeof e=="object"?e:t.objectLens(e)},t.id=t({get:function(e){return e},set:function(e,t){return t}}),t.objectLens=function(n){var r,i;return i=function(e){return t({get:function(t){return t!=null?t[e]:void 0},set:function(t,n){return h(t,e,n)}})},r=e._.filter(l,n.split(".")),t.compose.apply(t,e._.map(i,r))},t.compose=function(){var e,r;return e=1<=arguments.length?n.call(arguments,0):[],r=function(e,n){return t({get:function(t){return n.get(e.get(t))},set:function(t,r){var i,s;return i=e.get(t),s=n.set(i,r),e.set(t,s)}})},s(e,t.id,r)},p=t.objectLens("value"),h=function(e,t,n){var r,i,s;r=e instanceof Array?[]:{};for(i in e)s=e[i],r[i]=s;return t!=null&&(r[t]=n),r},e},typeof module!="undefined"&&module!==null?(e=require("baconjs"),module.exports=t(e)):typeof define=="function"&&define.amd?define("bacon.model",["bacon"],t):t(this.Bacon)}.call(this),function(){var e,t,n,r,i=[].slice;r=function(e,t,n){var r,s,o,u,a,f,l,c,h,p,d,v,m,g,y;c=function(e){return e.length>0},s=function(e){if(!(e instanceof jQuery||e instanceof Array))throw new Error("Value must be either a jQuery object or an Array of jQuery objects")},r=function(e){var t,r,i,s;if(e instanceof jQuery)return e;r=n();for(i=0,s=e.length;i<s;i++)t=e[i],t instanceof jQuery&&(r=r.add(t));return r},h={indexOf:Array.prototype.indexOf?function(e,t){return e.indexOf(t)}:function(e,t){var n,r,i,s;for(n=i=0,s=e.length;i<s;n=++i){r=e[n];if(t===r)return n}return-1}},e.$.Model=e.Model,e.$.textFieldValue=function(t,n){var r,i,s;return s=function(){return t.val()||""},r=function(){return e.interval(50).take(10).map(s).filter(c).take(1)},i=t.asEventStream("keyup input").merge(t.asEventStream("cut paste").delay(1)).merge(r()),e.Binding({initValue:n,get:s,events:i,set:function(e){return t.val(e)}})},e.$.checkBoxValue=function(t,n){return e.Binding({initValue:n,get:function(){return t.prop("checked")||!1},events:t.asEventStream("change"),set:function(e){return t.prop("checked",e)}})},e.$.selectValue=function(t,n){return e.Binding({initValue:n,get:function(){return t.val()},events:t.asEventStream("change"),set:function(e){return t.val(e)}})},e.$.radioGroupValue=function(t,i){return s(t),t=r(t),e.Binding({initValue:i,get:function(){return t.filter(":checked").first().val()},events:t.asEventStream("change"),set:function(e){return t.each(function(t,r){return n(r).prop("checked",r.value===e)})}})},e.$.intRadioGroupValue=function(t,n){var r;return r=e.$.radioGroupValue(t),e.Binding({initValue:n,get:function(){var e;return e=r.get(),e!=null?parseInt(e):e},events:r.syncEvents(),set:function(e){var t;return t=e!=null?Number(e).toString():e,r.set(t)}})},e.$.checkBoxGroupValue=function(t,i){return s(t),t=r(t),e.Binding({initValue:i,get:function(){return t.filter(":checked").map(function(e,t){return n(t).val()}).toArray()},events:t.asEventStream("change"),set:function(e){return t.each(function(t,r){return n(r).prop("checked",h.indexOf(e,n(r).val())>=0)})}})},e.$.ajax=function(t,r){return e.fromPromise(n.ajax(t),r)},e.$.ajaxGet=function(t,n,r,i){return e.$.ajax({url:t,dataType:r,data:n},i)},e.$.ajaxGetJSON=function(t,n,r){return e.$.ajax({url:t,dataType:"json",data:n},r)},e.$.ajaxPost=function(t,n,r,i){return e.$.ajax({url:t,dataType:r,data:n,type:"POST"},i)},e.$.ajaxGetScript=function(t,n){return e.$.ajax({url:t,dataType:"script"},n)},e.$.lazyAjax=function(t){return e.once(t).flatMap(e.$.ajax)},e.Observable.prototype.ajax=function(){return this.flatMapLatest(e.$.ajax)},e.Observable.prototype.toDeferred=function(){var e,t;return t=void 0,e=n.Deferred(),this.take(1).endOnError().subscribe(function(n){if(n.hasValue())return t=n.value(),e.notify(t);if(n.isError())return e.reject(n.error);if(n.isEnd())return e.resolve(t)}),e},f=["keydown","keyup","keypress","click","dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","mouseout","mouseover","dragstart","drag","dragenter","dragleave","dragover","drop","dragend","resize","scroll","select","change","submit","blur","focus","focusin","focusout","load","unload"],l={},p=function(e){return l[e+"E"]=function(){var t;return t=1<=arguments.length?i.call(arguments,0):[],this.asEventStream.apply(this,[e].concat(i.call(t)))}};for(v=0,g=f.length;v<g;v++)o=f[v],p(o);u=["animate","show","hide","toggle","fadeIn","fadeOut","fadeTo","fadeToggle","slideDown","slideUp","slideToggle"],a={},d=function(t){return a[t+"E"]=function(){var n;return n=1<=arguments.length?i.call(arguments,0):[],e.fromPromise(this[t].apply(this,n).promise())}};for(m=0,y=u.length;m<y;m++)o=u[m],d(o);if(n!=null?n.fn:void 0)n.fn.extend(l),n.fn.extend(a),n.fn.asEventStream=e.$.asEventStream;return e.$},typeof module!="undefined"&&module!==null?(t=require("baconjs"),n=require("bacon.model"),e=require("jquery"),module.exports=r(t,n,e)):typeof define=="function"&&define.amd?define("bacon.jquery",["bacon","bacon.model","jquery"],r):r(this.Bacon,this.BaconModel,this.$)}.call(this),define("app",["require","jquery","underscore","bacon","Grid","bacon.model","bacon.jquery"],function(e){function P(){y.text("Highscore: "+v),I(m),q(m),E.push(m.clearMatches())}function H(e){var t=0;return e.forEach(function(e){e[0].type==="pig"?t+=e.length*h:t+=e.length}),t}function B(e){return G(e)?0:n.reduce(e,function(e,t){return t[0].type==="pig"?e+t.length-2+p:e+t.length-2},0)}function j(e){var r=t();return n.forEach(e,function(e){n.forEach(e,function(e){r=r.add(J(e))})}),r}function F(e,t){var i=[],s=t.hasValue()?t.value():null;return e.length===0||e.length===2?i=[s]:e.length===1&&!n.isEqual(e[0],s)&&(i=[e[0],s]),[i,[new r.Next(i)]]}function I(e){e.setPieces(n.map(e.getPieces(),function(e){return n.map(e,function(){return n.sample(d)})}))}function q(e){g.empty(),e.getPieces().forEach(function(e){n.chain(e).filter(function(e){return e.type!=="empty"}).forEach(function(e){g.append(R(e))})})}function R(e){var n=t('<div class="piece"></div>');return n.data({x:e.x,y:e.y,type:e.type}).css({left:e.x*a,top:e.y*a}).addClass(e.type),n}function U(e){return e>=0}function z(e){var n=t(e.target);return{piece:m.getPiece(n.data("x"),n.data("y")),el:e.target}}function W(){t.when(t(".piece",g).animate({opacity:"0"},500)).done(function(){I(m),q(m),t(".piece",g).css({opacity:"0"}),t.when(t(".piece",g).animate({opacity:"1"},500)).done(function(){E.push(m.clearMatches())})})}function X(){var e=[],t=m.getEmptyPiecesPerColumn();return t.forEach(function(t,r){for(var i=0;i<t;i++){var s=n.sample(d),o={x:r,y:i-t,type:s};m.setPiece(r,i,{x:r,y:i,type:o.type}),g.append(R(o)),e.push({x:o.x,y:o.y,move:t})}}),e}function V(e){function n(e){return 250*Math.sqrt(e.move)}var t=[];return e.forEach(function(e){var r=a*e.move,i=J(e);i.data("y",i.data("y")+e.move),t.push(i.animateE({top:"+="+r+"px"},n(e),K))}),r.combineAsArray(t)}function $(e){function s(e,t){return Math.abs(e.x-t.x)===1&&Math.abs(e.y-t.y)===0}function o(e,t){return Math.abs(e.x-t.x)===0&&Math.abs(e.y-t.y)===1}var t=e[0].piece,n=e[1].piece;if(s(t,n)||o(t,n)){var r=t.type,i=n.type;t.type=i,n.type=r,m.getMatches().length>0?(q(m),E.push(m.clearMatches())):(t.type=r,n.type=i)}}function J(e){return t(".piece").filter(function(){var n=t(this);return n.data("x")===e.x&&n.data("y")===e.y})}function K(e,t,n,r){return e/=r,n*e*e+t}function Q(e,t){return e+t}function G(e){return e.length===0}function Y(e){return!G(e)}var t=e("jquery"),n=e("underscore"),r=e("bacon"),i=e("Grid");e("bacon.model"),e("bacon.jquery"),t.fn.asEventStream=r.$.asEventStream;var s=!0,o=s?console.log.bind(console):function(){},u=10,a=100,f=800,l=400,c=-1,h=2,p=2,d=["chicken","giraffe","goat","pig"],v=localStorage.getItem("highscore")||0,m=new i({width:5,height:5,matchesNeeded:3}),g=t(".gameArea"),y=t(".high-score"),b=t(".score"),w=t(".time"),E=new r.Bus,S=r.fromBinder(function(e){function t(n){setTimeout(function(){e(c),n>l?t(n-2):t(n)},n)}t(f)}),x=E.map(B),T=S.merge(x).scan(u,Q).takeWhile(U),N=E.map(H).scan(0,Q).skipDuplicates(),C=N.map(Math.max,v).skipDuplicates(),k=g.asEventStream("click",".piece",z).takeWhile(T),L=k.withStateMachine([],F).takeWhile(T),A=E.map(j).filter(Y),O=A.flatMap(function(e){return r.fromPromise(t.when(e.fadeTo(500,0)))}),M=O.map(function(){return m.applyGravity().concat(X())}).filter(Y),_=E.filter(G).map(function(){return m.getAvailableMoves()}),D=M.flatMap(V);return T.onValue(function(e){w.text(e)}),T.onEnd(function(){g.animate({opacity:.2},1e3),w.text("GAME OVER")}),L.onValue(function(e){t(".piece").removeClass("highlight");if(!e||e.length===0)return;e.length===1?t(e[0].el).addClass("highlight"):$(e)}),O.onValue(function(e){e.remove()}),D.onValue(function(){E.push(m.clearMatches())}),N.onValue(function(e){b.text("Score: "+e)}),C.onValue(function(e){localStorage.setItem("highscore",e)}),A.onValue(t.noop),_.filter(G).onValue(W),{init:P}}),require(["app"],function(e){e.init()}),define("main",function(){});